@isardsat/editorial-admin 6.0.4 → 6.0.6

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.
@@ -0,0 +1,6 @@
1
+ import{c as o}from"./createLucideIcon-R2-3a7hN.js";/**
2
+ * @license lucide-react v0.487.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const n=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],e=o("chevron-down",n);export{e as C};
@@ -0,0 +1,66 @@
1
+ import{w as le}from"./react-redux-kbMjYGuQ.js";import{n as e,a as d,t as N,N as ce,q as ue,v as he,w as pe,O as xe}from"./chunk-KNED5TY2-DAA_sFzt.js";import{u as fe,d as E,e as be}from"./authSlice-B3Tyl-Nw.js";import{u as W,a as ge,b as me,c as je,d as ve}from"./editorialApi-fQchmMa9.js";import{R as U,C as Q,a as X,T as Z,D as Y,P as J,O as ee,b as we,c as ye,d as Ne,e as Ce,f as Se,A as _e,u as ke}from"./index-Bd1u2_LZ.js";import{c as r}from"./utils-DslUJpbf.js";import{c as x}from"./createLucideIcon-R2-3a7hN.js";import{B as O,S as R,c as Me,u as Ee}from"./button-Da66T3Bb.js";import{P as k,u as Oe,c as Re,a as ze,b as Ae,d as De}from"./index-BvKqmqc2.js";import{C as $}from"./chevron-down-D_Gla76b.js";import"./tslib.es6-CDuPK5Eb.js";import"./index-C-vcF2DZ.js";const Pe={};/**
2
+ * @license lucide-react v0.487.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const Ie=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Te=x("arrow-down",Ie);/**
7
+ * @license lucide-react v0.487.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const $e=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Le=x("arrow-up",$e);/**
12
+ * @license lucide-react v0.487.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const Be=[["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["path",{d:"M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3",key:"1fpvtg"}]],He=x("blocks",Be);/**
17
+ * @license lucide-react v0.487.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const Ge=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],qe=x("chevron-right",Ge);/**
22
+ * @license lucide-react v0.487.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const Fe=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Ve=x("external-link",Fe);/**
27
+ * @license lucide-react v0.487.0 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */const Ke=[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]],We=x("files",Ke);/**
32
+ * @license lucide-react v0.487.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */const Ue=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],Qe=x("grid-3x3",Ue);/**
37
+ * @license lucide-react v0.487.0 - ISC
38
+ *
39
+ * This source code is licensed under the ISC license.
40
+ * See the LICENSE file in the root directory of this source tree.
41
+ */const Xe=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]],Ze=x("heart",Xe);/**
42
+ * @license lucide-react v0.487.0 - ISC
43
+ *
44
+ * This source code is licensed under the ISC license.
45
+ * See the LICENSE file in the root directory of this source tree.
46
+ */const Ye=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],Je=x("log-out",Ye);/**
47
+ * @license lucide-react v0.487.0 - ISC
48
+ *
49
+ * This source code is licensed under the ISC license.
50
+ * See the LICENSE file in the root directory of this source tree.
51
+ */const et=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],tt=x("panel-left",et);/**
52
+ * @license lucide-react v0.487.0 - ISC
53
+ *
54
+ * This source code is licensed under the ISC license.
55
+ * See the LICENSE file in the root directory of this source tree.
56
+ */const at=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],st=x("square",at);/**
57
+ * @license lucide-react v0.487.0 - ISC
58
+ *
59
+ * This source code is licensed under the ISC license.
60
+ * See the LICENSE file in the root directory of this source tree.
61
+ */const nt=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],ot=x("upload",nt);/**
62
+ * @license lucide-react v0.487.0 - ISC
63
+ *
64
+ * This source code is licensed under the ISC license.
65
+ * See the LICENSE file in the root directory of this source tree.
66
+ */const it=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],te=x("x",it);function rt({...t}){return e.jsx(U,{"data-slot":"dialog",...t})}function dt({...t}){return e.jsx(J,{"data-slot":"dialog-portal",...t})}function lt({className:t,...a}){return e.jsx(ee,{"data-slot":"dialog-overlay",className:r("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/50",t),...a})}function ct({className:t,children:a,...n}){return e.jsxs(dt,{"data-slot":"dialog-portal",children:[e.jsx(lt,{}),e.jsxs(Q,{"data-slot":"dialog-content",className:r("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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...n,children:[a,e.jsxs(X,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[e.jsx(te,{}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function ut({className:t,...a}){return e.jsx("div",{"data-slot":"dialog-header",className:r("flex flex-col gap-2 text-center sm:text-left",t),...a})}function ht({className:t,...a}){return e.jsx("div",{"data-slot":"dialog-footer",className:r("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...a})}function pt({className:t,...a}){return e.jsx(Z,{"data-slot":"dialog-title",className:r("text-lg leading-none font-semibold",t),...a})}function xt({className:t,...a}){return e.jsx(Y,{"data-slot":"dialog-description",className:r("text-muted-foreground text-sm",t),...a})}const ft="#181717",bt=d.forwardRef(function({title:a="GitHub",color:n="currentColor",size:s=24,...o},i){return n==="default"&&(n=ft),e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:s,height:s,fill:n,viewBox:"0 0 24 24",ref:i,...o,children:[e.jsx("title",{children:a}),e.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]})}),gt="#85EA2D",mt=d.forwardRef(function({title:a="Swagger",color:n="currentColor",size:s=24,...o},i){return n==="default"&&(n=gt),e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:s,height:s,fill:n,viewBox:"0 0 24 24",ref:i,...o,children:[e.jsx("title",{children:a}),e.jsx("path",{d:"M12 0C5.383 0 0 5.383 0 12s5.383 12 12 12c6.616 0 12-5.383 12-12S18.616 0 12 0zm0 1.144c5.995 0 10.856 4.86 10.856 10.856 0 5.995-4.86 10.856-10.856 10.856-5.996 0-10.856-4.86-10.856-10.856C1.144 6.004 6.004 1.144 12 1.144zM8.37 5.868a6.707 6.707 0 0 0-.423.005c-.983.056-1.573.517-1.735 1.472-.115.665-.096 1.348-.143 2.017-.013.35-.05.697-.115 1.038-.134.609-.397.798-1.016.83a2.65 2.65 0 0 0-.244.042v1.463c1.126.055 1.278.452 1.37 1.629.033.429-.013.858.015 1.287.018.406.073.808.156 1.2.259 1.075 1.307 1.435 2.575 1.218v-1.283c-.203 0-.383.005-.558 0-.43-.013-.591-.12-.632-.535-.056-.535-.042-1.08-.075-1.62-.064-1.001-.175-1.988-1.153-2.625.503-.37.868-.812.983-1.398.083-.41.134-.821.166-1.237.028-.415-.023-.84.014-1.25.06-.665.102-.937.9-.91.12 0 .235-.017.369-.027v-1.31c-.16 0-.31-.004-.454-.006zm7.593.009a4.247 4.247 0 0 0-.813.06v1.274c.245 0 .434 0 .623.005.328.004.577.13.61.494.032.332.031.669.064 1.006.065.669.101 1.347.217 2.007.102.544.475.95.941 1.283-.817.549-1.057 1.333-1.098 2.215-.023.604-.037 1.213-.069 1.822-.028.554-.222.734-.78.748-.157.004-.31.018-.484.028v1.305c.327 0 .627.019.927 0 .932-.055 1.495-.507 1.68-1.412.078-.498.124-1 .138-1.504.032-.461.028-.927.074-1.384.069-.715.397-1.01 1.112-1.057a.972.972 0 0 0 .199-.046v-1.463c-.12-.014-.204-.027-.291-.032-.536-.023-.804-.203-.937-.71a5.146 5.146 0 0 1-.152-.993c-.037-.618-.033-1.241-.074-1.86-.08-1.192-.794-1.753-1.887-1.786zm-6.89 5.28a.844.844 0 0 0-.083 1.684h.055a.83.83 0 0 0 .877-.78v-.046a.845.845 0 0 0-.83-.858zm2.911 0a.808.808 0 0 0-.834.78c0 .027 0 .05.004.078 0 .503.342.826.859.826.507 0 .826-.332.826-.853-.005-.503-.342-.836-.855-.831zm2.963 0a.861.861 0 0 0-.876.835c0 .47.378.849.849.849h.009c.425.074.853-.337.881-.83.023-.457-.392-.854-.863-.854z"})]})});function jt({isOpen:t,setOpen:a}){return e.jsx(rt,{open:t,onOpenChange:n=>a(n),children:e.jsxs(ct,{children:[e.jsxs(ut,{children:[e.jsx(pt,{children:"Editorial"}),e.jsx(xt,{children:"A simple CMS for static websites"})]}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx(O,{asChild:!0,variant:"ghost",children:e.jsxs(N,{to:"/doc",children:[e.jsx(mt,{size:14}),"Swagger API UI"]})}),e.jsx(O,{asChild:!0,variant:"ghost",children:e.jsxs(N,{to:"https://github.com/Lobelia-Earth/editorial",children:[e.jsx(bt,{size:14}),"GitHub repository"]})})]}),e.jsx(ht,{children:e.jsxs("p",{className:"flex items-center gap-1",children:["Created with",e.jsx(Ze,{size:14,className:"stroke-red-500 fill-red-500"})," by"," ",e.jsx(N,{to:"https://lobelia.earth",className:"underline hover:text-blue-500",children:"Lobelia.earth"})]})})]})})}var vt="Separator",L="horizontal",wt=["horizontal","vertical"],ae=d.forwardRef((t,a)=>{const{decorative:n,orientation:s=L,...o}=t,i=yt(s)?s:L,u=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return e.jsx(k.div,{"data-orientation":i,...u,...o,ref:a})});ae.displayName=vt;function yt(t){return wt.includes(t)}var Nt=ae;function Ct({className:t,orientation:a="horizontal",decorative:n=!0,...s}){return e.jsx(Nt,{"data-slot":"separator-root",decorative:n,orientation:a,className:r("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...s})}function St({...t}){return e.jsx(U,{"data-slot":"sheet",...t})}function _t({...t}){return e.jsx(J,{"data-slot":"sheet-portal",...t})}function kt({className:t,...a}){return e.jsx(ee,{"data-slot":"sheet-overlay",className:r("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/50",t),...a})}function Mt({className:t,children:a,side:n="right",...s}){return e.jsxs(_t,{children:[e.jsx(kt,{}),e.jsxs(Q,{"data-slot":"sheet-content",className:r("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",t),...s,children:[a,e.jsxs(X,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[e.jsx(te,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Et({className:t,...a}){return e.jsx("div",{"data-slot":"sheet-header",className:r("flex flex-col gap-1.5 p-4",t),...a})}function Ot({className:t,...a}){return e.jsx(Z,{"data-slot":"sheet-title",className:r("text-foreground font-semibold",t),...a})}function Rt({className:t,...a}){return e.jsx(Y,{"data-slot":"sheet-description",className:r("text-muted-foreground text-sm",t),...a})}function se({delayDuration:t=0,...a}){return e.jsx(we,{"data-slot":"tooltip-provider",delayDuration:t,...a})}function zt({...t}){return e.jsx(se,{children:e.jsx(ye,{"data-slot":"tooltip",...t})})}function At({...t}){return e.jsx(Ne,{"data-slot":"tooltip-trigger",...t})}function Dt({className:t,sideOffset:a=0,children:n,...s}){return e.jsx(Ce,{children:e.jsxs(Se,{"data-slot":"tooltip-content",sideOffset:a,className:r("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t),...s,children:[n,e.jsx(_e,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const M=768;function Pt(){const[t,a]=d.useState(void 0);return d.useEffect(()=>{const n=window.matchMedia(`(max-width: ${M-1}px)`),s=()=>{a(window.innerWidth<M)};return n.addEventListener("change",s),a(window.innerWidth<M),()=>n.removeEventListener("change",s)},[]),!!t}const It="sidebar_state",Tt=60*60*24*7,$t="16rem",Lt="18rem",Bt="3rem",Ht="b",ne=d.createContext(null);function z(){const t=d.useContext(ne);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function Gt({defaultOpen:t=!0,open:a,onOpenChange:n,className:s,style:o,children:i,...c}){const u=Pt(),[f,p]=d.useState(!1),[g,C]=d.useState(t),m=a??g,j=d.useCallback(h=>{const l=typeof h=="function"?h(m):h;n?n(l):C(l),document.cookie=`${It}=${l}; path=/; max-age=${Tt}`},[n,m]),v=d.useCallback(()=>u?p(h=>!h):j(h=>!h),[u,j,p]);d.useEffect(()=>{const h=l=>{l.key===Ht&&(l.metaKey||l.ctrlKey)&&(l.preventDefault(),v())};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[v]);const y=m?"expanded":"collapsed",S=d.useMemo(()=>({state:y,open:m,setOpen:j,isMobile:u,openMobile:f,setOpenMobile:p,toggleSidebar:v}),[y,m,j,u,f,p,v]);return e.jsx(ne.Provider,{value:S,children:e.jsx(se,{delayDuration:0,children:e.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":$t,"--sidebar-width-icon":Bt,...o},className:r("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",s),...c,children:i})})})}function qt({side:t="left",variant:a="sidebar",collapsible:n="offcanvas",className:s,children:o,...i}){const{isMobile:c,state:u,openMobile:f,setOpenMobile:p}=z();return n==="none"?e.jsx("div",{"data-slot":"sidebar",className:r("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",s),...i,children:o}):c?e.jsx(St,{open:f,onOpenChange:p,...i,children:e.jsxs(Mt,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":Lt},side:t,children:[e.jsxs(Et,{className:"sr-only",children:[e.jsx(Ot,{children:"Sidebar"}),e.jsx(Rt,{children:"Displays the mobile sidebar."})]}),e.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):e.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":u,"data-collapsible":u==="collapsed"?n:"","data-variant":a,"data-side":t,"data-slot":"sidebar",children:[e.jsx("div",{"data-slot":"sidebar-gap",className:r("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",a==="floating"||a==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),e.jsx("div",{"data-slot":"sidebar-container",className:r("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",t==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",a==="floating"||a==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",s),...i,children:e.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:o})})]})}function Ft({className:t,onClick:a,...n}){const{toggleSidebar:s}=z();return e.jsxs(O,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:r("size-7",t),onClick:o=>{a==null||a(o),s()},...n,children:[e.jsx(tt,{}),e.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function Vt({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:r("flex flex-col gap-2 p-2",t),...a})}function Kt({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:r("flex flex-col gap-2 p-2",t),...a})}function Wt({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:r("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),...a})}function _({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:r("relative flex w-full min-w-0 flex-col p-2",t),...a})}function B({className:t,asChild:a=!1,...n}){const s=a?R:"div";return e.jsx(s,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:r("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",t),...n})}function H({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:r("w-full text-sm",t),...a})}function G({className:t,...a}){return e.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:r("flex w-full min-w-0 flex-col gap-1",t),...a})}function w({className:t,...a}){return e.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:r("group/menu-item relative",t),...a})}const Ut=Me("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function b({asChild:t=!1,isActive:a=!1,variant:n="default",size:s="default",tooltip:o,className:i,...c}){const u=t?R:"button",{isMobile:f,state:p}=z(),g=e.jsx(u,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":s,"data-active":a,className:r(Ut({variant:n,size:s}),i),...c});return o?(typeof o=="string"&&(o={children:o}),e.jsxs(zt,{children:[e.jsx(At,{asChild:!0,children:g}),e.jsx(Dt,{side:"right",align:"center",hidden:p!=="collapsed"||f,...o})]})):g}function Qt({className:t,...a}){return e.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:r("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",t),...a})}function Xt({asChild:t=!1,size:a="md",isActive:n=!1,className:s,...o}){const i=t?R:"a";return e.jsx(i,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":a,"data-active":n,className:r("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",a==="sm"&&"text-xs",a==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",s),...o})}function q({singleton:t}){const{data:a}=W(),{data:n}=ge();return a?e.jsx(e.Fragment,{children:Object.entries(a).filter(([,s])=>t?s.singleton:!s.singleton).map(([s,o])=>e.jsx(Qt,{children:e.jsx(ce,{to:t?`/admin/dashboard/${s}/default`:`/admin/dashboard/${s}`,className:({isActive:i,isPending:c})=>c?"pending":i?"active":"",children:({isActive:i})=>e.jsxs(Xt,{isActive:i,children:[e.jsx("span",{className:"inline-block overflow-hidden whitespace-nowrap text-ellipsis text-nowrap w-full",children:o.displayName}),!t&&n&&e.jsx("span",{className:"text-xs text-gray-500 ml-auto pr-1",children:Object.keys(n[s]).length})]})})},o.displayName))}):null}var A="Collapsible",[Zt,ba]=Re(A),[Yt,D]=Zt(A),oe=d.forwardRef((t,a)=>{const{__scopeCollapsible:n,open:s,defaultOpen:o,disabled:i,onOpenChange:c,...u}=t,[f=!1,p]=Oe({prop:s,defaultProp:o,onChange:c});return e.jsx(Yt,{scope:n,disabled:i,contentId:ke(),open:f,onOpenToggle:d.useCallback(()=>p(g=>!g),[p]),children:e.jsx(k.div,{"data-state":I(f),"data-disabled":i?"":void 0,...u,ref:a})})});oe.displayName=A;var ie="CollapsibleTrigger",re=d.forwardRef((t,a)=>{const{__scopeCollapsible:n,...s}=t,o=D(ie,n);return e.jsx(k.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":I(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...s,ref:a,onClick:ze(t.onClick,o.onOpenToggle)})});re.displayName=ie;var P="CollapsibleContent",de=d.forwardRef((t,a)=>{const{forceMount:n,...s}=t,o=D(P,t.__scopeCollapsible);return e.jsx(Ae,{present:n||o.open,children:({present:i})=>e.jsx(Jt,{...s,ref:a,present:i})})});de.displayName=P;var Jt=d.forwardRef((t,a)=>{const{__scopeCollapsible:n,present:s,children:o,...i}=t,c=D(P,n),[u,f]=d.useState(s),p=d.useRef(null),g=Ee(a,p),C=d.useRef(0),m=C.current,j=d.useRef(0),v=j.current,y=c.open||u,S=d.useRef(y),h=d.useRef(void 0);return d.useEffect(()=>{const l=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(l)},[]),De(()=>{const l=p.current;if(l){h.current=h.current||{transitionDuration:l.style.transitionDuration,animationName:l.style.animationName},l.style.transitionDuration="0s",l.style.animationName="none";const T=l.getBoundingClientRect();C.current=T.height,j.current=T.width,S.current||(l.style.transitionDuration=h.current.transitionDuration,l.style.animationName=h.current.animationName),f(s)}},[c.open,s]),e.jsx(k.div,{"data-state":I(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!y,...i,ref:g,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...t.style},children:y&&o})});function I(t){return t?"open":"closed"}var ea=oe;function F({...t}){return e.jsx(ea,{"data-slot":"collapsible",...t})}function V({...t}){return e.jsx(re,{"data-slot":"collapsible-trigger",...t})}function K({...t}){return e.jsx(de,{"data-slot":"collapsible-content",...t})}function ta(){const t=fe(),[a,n]=d.useState(!1),[s]=me(),[o]=je(),[i]=ve(),c=E(u=>u.auth.role);return e.jsxs(qt,{className:"z-50",children:[e.jsx(jt,{isOpen:a,setOpen:n}),e.jsx(Vt,{className:"h-14 justify-center",children:e.jsx(_,{children:e.jsx(N,{to:"/admin/dashboard",className:"text-3xl font-semibold tracking-tight transition-colors",children:"WEkEO"})})}),e.jsxs(Wt,{children:[e.jsxs(_,{children:[e.jsx(B,{children:"Content"}),e.jsx(H,{children:e.jsxs(G,{children:[e.jsx(F,{className:"group/collapsible",children:e.jsxs(w,{children:[e.jsx(V,{asChild:!0,children:e.jsxs(b,{className:"group",children:[e.jsx(Qe,{}),e.jsx("span",{children:"Collections"}),e.jsx($,{className:"transition-transform ml-auto -mr-[2px] group-data-[state=open]:rotate-180"})]})}),e.jsx(K,{children:e.jsx(q,{})})]})}),e.jsx(F,{className:"group/collapsible",children:e.jsxs(w,{children:[e.jsx(V,{asChild:!0,children:e.jsxs(b,{className:"group",children:[e.jsx(st,{}),e.jsx("span",{children:"Singles"}),e.jsx($,{className:"transition-transform ml-auto -mr-[2px] group-data-[state=open]:rotate-180"})]})}),e.jsx(K,{children:e.jsx(q,{singleton:!0})})]})}),e.jsx(w,{children:e.jsx(b,{asChild:!0,children:e.jsxs(N,{to:"/admin/dashboard/files",children:[e.jsx(We,{}),e.jsx("span",{children:"Files"})]})})}),e.jsx(w,{children:e.jsxs(b,{disabled:!0,children:[e.jsx(He,{}),e.jsx("span",{children:"Components"})]})})]})})]}),e.jsxs(_,{children:[e.jsx(B,{children:"Actions"}),e.jsx(H,{children:e.jsxs(G,{children:[c==="developer"&&e.jsxs(e.Fragment,{children:[e.jsx(w,{children:e.jsxs(b,{onClick:()=>o(),children:[e.jsx(Te,{}),e.jsx("span",{children:"Pull from repo"})]})}),e.jsx(w,{children:e.jsxs(b,{onClick:()=>i(),children:[e.jsx(Le,{}),e.jsx("span",{children:"Push to repo"})]})})]}),e.jsx(w,{children:e.jsxs(b,{onClick:()=>s(),children:[e.jsx(ot,{}),e.jsx("span",{children:"Publish"})]})})]})})]}),e.jsx(_,{})]}),e.jsxs(Kt,{children:[e.jsx(b,{asChild:!0,children:e.jsxs(N,{to:Pe.PREVIEW_URL,children:["Preview",e.jsx(Ve,{className:"ml-auto"})]})}),e.jsx(b,{onClick:()=>n(!0),children:"About"}),e.jsxs(b,{onClick:()=>t(be()),children:[e.jsx(Je,{}),"Log out"]})]})]})}function aa({children:t}){const a=ue(),n=E(o=>o.auth.user),s=E(o=>o.auth.isLoading);return d.useEffect(()=>{!s&&!n&&a("/")},[s,a,n]),s||!n?null:t}function sa(){const{pathname:t}=he(),{data:a}=W(),n=t.split("/").filter(s=>!["admin","dashboard"].includes(s)&&s!=="");return a?e.jsx(e.Fragment,{children:n.map((s,o,i)=>e.jsxs(pe.Fragment,{children:[i.length>1&&o>=1&&e.jsx(qe,{size:12,className:"text-gray-500 pt-[1px]"}),e.jsx("p",{className:"text-sm leading-none tracking-tight capitalize text-gray-500 last:text-foreground",children:a[s]?a[s].displayName:s},s)]},o))}):null}const ga=le(function(){return e.jsx(aa,{children:e.jsxs(Gt,{className:"flex h-full",children:[e.jsx(ta,{}),e.jsxs("main",{className:"flex flex-col flex-1 h-full w-0",children:[e.jsx("header",{className:"flex sticky bg-sidebar dark:bg-sidebar z-40 top-0 h-14 shrink-0 items-center gap-2 border-b",children:e.jsxs("div",{className:"flex items-center gap-2 px-3",children:[e.jsx(Ft,{}),e.jsx(Ct,{orientation:"vertical",className:"h-4"}),e.jsx(sa,{})]})}),e.jsx(xe,{})]})]})})});export{ga as default};
@@ -0,0 +1,36 @@
1
+ import{w as y}from"./react-redux-kbMjYGuQ.js";import{n as e,a as j,t as g}from"./chunk-KNED5TY2-DAA_sFzt.js";import{m as u,n as v}from"./editorialApi-fQchmMa9.js";import{c as N,f as k}from"./utils-DslUJpbf.js";import{c as o}from"./createLucideIcon-R2-3a7hN.js";import{C as w}from"./chevron-down-D_Gla76b.js";import{T as n}from"./trash-wq_ppIxP.js";/**
2
+ * @license lucide-react v0.487.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const b=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],r=o("copy",b);/**
7
+ * @license lucide-react v0.487.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const z=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],_=o("ellipsis",z);/**
12
+ * @license lucide-react v0.487.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const F=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]],M=o("file-image",F);/**
17
+ * @license lucide-react v0.487.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const H=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],C=o("file-text",H);/**
22
+ * @license lucide-react v0.487.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const $=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],T=o("file",$);/**
27
+ * @license lucide-react v0.487.0 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */const I=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],L=o("folder-open",I);/**
32
+ * @license lucide-react v0.487.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */const q=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],D=o("folder",q),E=["txt","md","html","pdf"],S=["svg","webp","png","jpeg","jpg"],V=[{Icon:M,test:s=>S.some(i=>s.name.endsWith(i))},{Icon:C,test:s=>E.some(i=>s.name.endsWith(i))}],P={Icon:T},d=({node:s,level:i=0,onDelete:c})=>{const[a,p]=j.useState(!1),m=V.find(t=>t.test(s))??P,l=s.type==="directory",x=l?"div":g,h=()=>{l&&p(!a)};return e.jsxs("div",{className:"select-none",children:[e.jsxs(x,{to:s.path,target:"_blank",className:"flex items-center gap-2 h-10 p-2 group hover:bg-muted/50 cursor-pointer",style:{paddingLeft:`calc(0.5rem + ${i*20}px)`},onClick:h,children:[l?e.jsx(w,{size:16,className:N("transition-transform",{"rotate-180":a})}):e.jsx("div",{className:"w-4"}),e.jsxs("div",{className:"flex flex-grow w-24 items-center gap-2 ml-2",children:[l?a?e.jsx(L,{size:16,className:"text-yellow-500"}):e.jsx(D,{size:16,className:"text-yellow-500"}):e.jsx(m.Icon,{size:16,className:" text-gray-500"}),e.jsx("span",{className:"text-sm whitespace-nowrap text-ellipsis overflow-hidden w-full",children:s.name})]}),e.jsx("div",{className:"flex w-24 justify-end gap-2",children:e.jsx("span",{className:"text-sm text-gray-500",children:l?"--":k(s.size)})}),e.jsxs("div",{className:"flex items-center gap-1 ml-4 group-hover:visible invisible z-20",children:[l?e.jsx(r,{className:"invisible",size:16}):e.jsxs("button",{className:"hover:text-yellow-500 p-1 hover:bg-muted rounded-sm",onClick:t=>{t.preventDefault(),t.stopPropagation(),navigator.clipboard.writeText(s.path)},children:[e.jsx(r,{size:16}),e.jsx("span",{className:"sr-only",children:"Copy file URL"})]}),e.jsxs("button",{className:"hover:text-red-500 p-1 hover:bg-muted rounded-sm",onClick:t=>{t.preventDefault(),t.stopPropagation(),c(s.path)},children:[e.jsx(n,{size:16}),e.jsx("span",{className:"sr-only",children:"Delete this file"})]})]})]}),l&&a&&s.children&&e.jsx("div",{children:s.children.map((t,f)=>e.jsx(d,{node:t,level:i+1,onDelete:c},`${t.name}-${f}`))})]})};function Z(){const{data:s,isLoading:i}=u(),[c]=v();return!s||i?null:s.toSorted(a=>a.type==="directory"?-1:1).map(a=>e.jsx(d,{node:a,onDelete:c},a.name))}const B=y(function(){return e.jsx("div",{className:"overflow-auto flex flex-1 p-4 gap-4",children:e.jsx("div",{className:"flex flex-col flex-1 gap-8",children:e.jsxs("div",{className:"overflow-auto h-full max-w-[800px] rounded-xl border",children:[e.jsxs("div",{className:"sticky top-0 bg-white flex items-center gap-2 py-1 px-2 border-b group",children:[e.jsx("div",{className:"w-4"}),e.jsx("div",{className:"flex flex-grow items-center gap-2 ml-2",children:e.jsx("span",{className:"text-sm font-semibold",children:"Name"})}),e.jsx("div",{className:"flex w-24 items-center gap-2 ml-2",children:e.jsx("span",{className:"text-sm font-semibold",children:"Size"})}),e.jsxs("div",{className:"flex items-center gap-1 invisible",children:[e.jsx(r,{size:14}),e.jsx(n,{size:14}),e.jsx(_,{size:14})]})]}),e.jsx(Z,{})]})})})});export{B as default};
@@ -0,0 +1,11 @@
1
+ import{w as et}from"./react-redux-kbMjYGuQ.js";import{a as Re,n as x,q as tt}from"./chunk-KNED5TY2-DAA_sFzt.js";import{B as rt}from"./button-Da66T3Bb.js";import{g as Ne,s as ke,a as st,u as nt,F as at,b as be,c as we,d as $e,e as Te,I as Ve,f as Ze,C as it}from"./input-BmmdOdbj.js";import{c as ot}from"./utils-DslUJpbf.js";import{c as De}from"./createLucideIcon-R2-3a7hN.js";import{u as dt,d as je,l as ct}from"./authSlice-B3Tyl-Nw.js";import"./index-BvKqmqc2.js";import"./index-C-vcF2DZ.js";import"./tslib.es6-CDuPK5Eb.js";/**
2
+ * @license lucide-react v0.487.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const ut=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],lt=De("loader-circle",ut);/**
7
+ * @license lucide-react v0.487.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const ft=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],ht=De("loader",ft),Ue=Re.forwardRef(({className:r,...e},t)=>x.jsx(lt,{ref:t,className:ot(r,"animate-spin"),...e}));Ue.displayName=ht.displayName;const Pe=(r,e,t)=>{if(r&&"reportValidity"in r){const s=Ne(t,e);r.setCustomValidity(s&&s.message||""),r.reportValidity()}},Fe=(r,e)=>{for(const t in e.fields){const s=e.fields[t];s&&s.ref&&"reportValidity"in s.ref?Pe(s.ref,t,r):s.refs&&s.refs.forEach(n=>Pe(n,t,r))}},mt=(r,e)=>{e.shouldUseNativeValidation&&Fe(r,e);const t={};for(const s in r){const n=Ne(e.fields,s),a=Object.assign(r[s]||{},{ref:n&&n.ref});if(pt(e.names||Object.keys(r),s)){const i=Object.assign({},Ne(t,s));ke(i,"root",a),ke(t,s,i)}else ke(t,s,a)}return t},pt=(r,e)=>r.some(t=>t.startsWith(e+"."));var yt=function(r,e){for(var t={};r.length;){var s=r[0],n=s.code,a=s.message,i=s.path.join(".");if(!t[i])if("unionErrors"in s){var o=s.unionErrors[0].errors[0];t[i]={message:o.message,type:o.code}}else t[i]={message:a,type:n};if("unionErrors"in s&&s.unionErrors.forEach(function(p){return p.errors.forEach(function(T){return r.push(T)})}),e){var u=t[i].types,c=u&&u[s.code];t[i]=st(i,e,t,n,c?[].concat(c,s.message):s.message)}r.shift()}return t},vt=function(r,e,t){return t===void 0&&(t={}),function(s,n,a){try{return Promise.resolve(function(i,o){try{var u=Promise.resolve(r[t.mode==="sync"?"parse":"parseAsync"](s,e)).then(function(c){return a.shouldUseNativeValidation&&Fe({},a),{errors:{},values:t.raw?s:c}})}catch(c){return o(c)}return u&&u.then?u.then(void 0,o):u}(0,function(i){if(function(o){return Array.isArray(o==null?void 0:o.errors)}(i))return{values:{},errors:mt(yt(i.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw i}))}catch(i){return Promise.reject(i)}}},_;(function(r){r.assertEqual=n=>n;function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{const a={};for(const i of n)a[i]=i;return a},r.getValidEnumValues=n=>{const a=r.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(const o of a)i[o]=n[o];return r.objectValues(i)},r.objectValues=n=>r.objectKeys(n).map(function(a){return n[a]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const a=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},r.find=(n,a)=>{for(const i of n)if(a(i))return i},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function s(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}r.joinValues=s,r.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(_||(_={}));var Se;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(Se||(Se={}));const f=_.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),R=r=>{switch(typeof r){case"undefined":return f.undefined;case"string":return f.string;case"number":return isNaN(r)?f.nan:f.number;case"boolean":return f.boolean;case"function":return f.function;case"bigint":return f.bigint;case"symbol":return f.symbol;case"object":return Array.isArray(r)?f.array:r===null?f.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?f.promise:typeof Map<"u"&&r instanceof Map?f.map:typeof Set<"u"&&r instanceof Set?f.set:typeof Date<"u"&&r instanceof Date?f.date:f.object;default:return f.unknown}},d=_.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"]),gt=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class Z extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(a){return a.message},s={_errors:[]},n=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)s._errors.push(t(i));else{let o=s,u=0;for(;u<i.path.length;){const c=i.path[u];u===i.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(t(i))):o[c]=o[c]||{_errors:[]},o=o[c],u++}}};return n(this),s}static assert(e){if(!(e instanceof Z))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,_.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},s=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):s.push(e(n));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}}Z.create=r=>new Z(r);const q=(r,e)=>{let t;switch(r.code){case d.invalid_type:r.received===f.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,_.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${_.joinValues(r.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${_.joinValues(r.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${_.joinValues(r.options)}, received '${r.received}'`;break;case d.invalid_arguments:t="Invalid function arguments";break;case d.invalid_return_type:t="Invalid function return type";break;case d.invalid_date:t="Invalid date";break;case d.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:_.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case d.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case d.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case d.custom:t="Invalid input";break;case d.invalid_intersection_types:t="Intersection results could not be merged";break;case d.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case d.not_finite:t="Number must be finite";break;default:t=e.defaultError,_.assertNever(r)}return{message:t}};let Be=q;function _t(r){Be=r}function fe(){return Be}const he=r=>{const{data:e,path:t,errorMaps:s,issueData:n}=r,a=[...t,...n.path||[]],i={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.message};let o="";const u=s.filter(c=>!!c).slice().reverse();for(const c of u)o=c(i,{data:e,defaultError:o}).message;return{...n,path:a,message:o}},xt=[];function l(r,e){const t=fe(),s=he({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===q?void 0:q].filter(n=>!!n)});r.common.issues.push(s)}class b{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const s=[];for(const n of t){if(n.status==="aborted")return y;n.status==="dirty"&&e.dirty(),s.push(n.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const n of t){const a=await n.key,i=await n.value;s.push({key:a,value:i})}return b.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};for(const n of t){const{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return y;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(s[a.value]=i.value)}return{status:e.value,value:s}}}const y=Object.freeze({status:"aborted"}),B=r=>({status:"dirty",value:r}),w=r=>({status:"valid",value:r}),Ee=r=>r.status==="aborted",Ae=r=>r.status==="dirty",z=r=>r.status==="valid",X=r=>typeof Promise<"u"&&r instanceof Promise;function me(r,e,t,s){if(typeof e=="function"?r!==e||!0:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(r)}function We(r,e,t,s,n){if(typeof e=="function"?r!==e||!0:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(r,t),t}var h;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(h||(h={}));var H,G;class E{constructor(e,t,s,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Le=(r,e)=>{if(z(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new Z(r.common.issues);return this._error=t,this._error}}};function v(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:s,description:n}=r;if(e&&(t||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(i,o)=>{var u,c;const{message:p}=r;return i.code==="invalid_enum_value"?{message:p??o.defaultError}:typeof o.data>"u"?{message:(u=p??s)!==null&&u!==void 0?u:o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:(c=p??t)!==null&&c!==void 0?c:o.defaultError}},description:n}}class g{get description(){return this._def.description}_getType(e){return R(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:R(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new b,ctx:{common:e.parent.common,data:e.data,parsedType:R(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(X(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){var s;const n={common:{issues:[],async:(s=t==null?void 0:t.async)!==null&&s!==void 0?s:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:R(e)},a=this._parseSync({data:e,path:n.path,parent:n});return Le(n,a)}"~validate"(e){var t,s;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:R(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:n});return z(a)?{value:a.value}:{issues:n.common.issues}}catch(a){!((s=(t=a==null?void 0:a.message)===null||t===void 0?void 0:t.toLowerCase())===null||s===void 0)&&s.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(a=>z(a)?{value:a.value}:{issues:n.common.issues})}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:R(e)},n=this._parse({data:e,path:s.path,parent:s}),a=await(X(n)?n:Promise.resolve(n));return Le(s,a)}refine(e,t){const s=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,a)=>{const i=e(n),o=()=>a.addIssue({code:d.custom,...s(n)});return typeof Promise<"u"&&i instanceof Promise?i.then(u=>u?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((s,n)=>e(s)?!0:(n.addIssue(typeof t=="function"?t(s,n):t),!1))}_refinement(e){return new j({schema:this,typeName:m.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:t=>this["~validate"](t)}}optional(){return S.create(this,this._def)}nullable(){return P.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return N.create(this)}promise(){return Y.create(this,this._def)}or(e){return te.create([this,e],this._def)}and(e){return re.create(this,e,this._def)}transform(e){return new j({...v(this._def),schema:this,typeName:m.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new oe({...v(this._def),innerType:this,defaultValue:t,typeName:m.ZodDefault})}brand(){return new Ie({typeName:m.ZodBranded,type:this,...v(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new de({...v(this._def),innerType:this,catchValue:t,typeName:m.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ue.create(this,e)}readonly(){return ce.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const kt=/^c[^\s-]{8,}$/i,bt=/^[0-9a-z]+$/,wt=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Tt=/^[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,Zt=/^[a-z0-9_-]{21}$/i,Ct=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Nt=/^[-+]?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)?)??$/,jt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,St="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ce;const Et=/^(?:(?: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])$/,At=/^(?:(?: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])$/,Ot=/^(([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]))$/,Rt=/^(([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])$/,It=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Mt=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,qe="((\\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])))",$t=new RegExp(`^${qe}$`);function Je(r){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Vt(r){return new RegExp(`^${Je(r)}$`)}function Ye(r){let e=`${qe}T${Je(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Pt(r,e){return!!((e==="v4"||!e)&&Et.test(r)||(e==="v6"||!e)&&Ot.test(r))}function Lt(r,e){if(!Ct.test(r))return!1;try{const[t]=r.split("."),s=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(s));return!(typeof n!="object"||n===null||!n.typ||!n.alg||e&&n.alg!==e)}catch{return!1}}function zt(r,e){return!!((e==="v4"||!e)&&At.test(r)||(e==="v6"||!e)&&Rt.test(r))}class C extends g{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==f.string){const a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:f.string,received:a.parsedType}),y}const s=new b;let n;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="max")e.data.length>a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.length<a.value;(i||o)&&(n=this._getOrReturnCtx(e,n),i?l(n,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&l(n,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),s.dirty())}else if(a.kind==="email")jt.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"email",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="emoji")Ce||(Ce=new RegExp(St,"u")),Ce.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"emoji",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="uuid")Tt.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"uuid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="nanoid")Zt.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"nanoid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid")kt.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"cuid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid2")bt.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"cuid2",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="ulid")wt.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"ulid",code:d.invalid_string,message:a.message}),s.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),l(n,{validation:"url",code:d.invalid_string,message:a.message}),s.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"regex",code:d.invalid_string,message:a.message}),s.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),s.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_string,validation:{startsWith:a.value},message:a.message}),s.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_string,validation:{endsWith:a.value},message:a.message}),s.dirty()):a.kind==="datetime"?Ye(a).test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_string,validation:"datetime",message:a.message}),s.dirty()):a.kind==="date"?$t.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_string,validation:"date",message:a.message}),s.dirty()):a.kind==="time"?Vt(a).test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_string,validation:"time",message:a.message}),s.dirty()):a.kind==="duration"?Nt.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"duration",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="ip"?Pt(e.data,a.version)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"ip",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="jwt"?Lt(e.data,a.alg)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"jwt",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="cidr"?zt(e.data,a.version)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"cidr",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="base64"?It.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"base64",code:d.invalid_string,message:a.message}),s.dirty()):a.kind==="base64url"?Mt.test(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{validation:"base64url",code:d.invalid_string,message:a.message}),s.dirty()):_.assertNever(a);return{status:s.value,value:e.data}}_regex(e,t,s){return this.refinement(n=>e.test(n),{validation:t,code:d.invalid_string,...h.errToObj(s)})}_addCheck(e){return new C({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...h.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...h.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...h.errToObj(e)})}datetime(e){var t,s;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:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,local:(s=e==null?void 0:e.local)!==null&&s!==void 0?s:!1,...h.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,...h.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...h.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...h.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new C({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new C({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new C({...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 t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}C.create=r=>{var e;return new C({checks:[],typeName:m.ZodString,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...v(r)})};function Dt(r,e){const t=(r.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,n=t>s?t:s,a=parseInt(r.toFixed(n).replace(".","")),i=parseInt(e.toFixed(n).replace(".",""));return a%i/Math.pow(10,n)}class M extends g{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)!==f.number){const a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:f.number,received:a.parsedType}),y}let s;const n=new b;for(const a of this._def.checks)a.kind==="int"?_.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?Dt(e.data,a.value)!==0&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.not_finite,message:a.message}),n.dirty()):_.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,s,n){return new M({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:h.toString(n)}]})}_addCheck(e){return new M({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&_.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(t===null||s.value>t)&&(t=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}}M.create=r=>new M({checks:[],typeName:m.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...v(r)});class $ extends g{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)!==f.bigint)return this._getInvalidInput(e);let s;const n=new b;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):_.assertNever(a);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return l(t,{code:d.invalid_type,expected:f.bigint,received:t.parsedType}),y}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,s,n){return new $({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:h.toString(n)}]})}_addCheck(e){return new $({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}$.create=r=>{var e;return new $({checks:[],typeName:m.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...v(r)})};class Q extends g{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==f.boolean){const s=this._getOrReturnCtx(e);return l(s,{code:d.invalid_type,expected:f.boolean,received:s.parsedType}),y}return w(e.data)}}Q.create=r=>new Q({typeName:m.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...v(r)});class D extends g{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==f.date){const a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:f.date,received:a.parsedType}),y}if(isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_date}),y}const s=new b;let n;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),s.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),s.dirty()):_.assertNever(a);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new D({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}D.create=r=>new D({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:m.ZodDate,...v(r)});class pe extends g{_parse(e){if(this._getType(e)!==f.symbol){const s=this._getOrReturnCtx(e);return l(s,{code:d.invalid_type,expected:f.symbol,received:s.parsedType}),y}return w(e.data)}}pe.create=r=>new pe({typeName:m.ZodSymbol,...v(r)});class K extends g{_parse(e){if(this._getType(e)!==f.undefined){const s=this._getOrReturnCtx(e);return l(s,{code:d.invalid_type,expected:f.undefined,received:s.parsedType}),y}return w(e.data)}}K.create=r=>new K({typeName:m.ZodUndefined,...v(r)});class ee extends g{_parse(e){if(this._getType(e)!==f.null){const s=this._getOrReturnCtx(e);return l(s,{code:d.invalid_type,expected:f.null,received:s.parsedType}),y}return w(e.data)}}ee.create=r=>new ee({typeName:m.ZodNull,...v(r)});class J extends g{constructor(){super(...arguments),this._any=!0}_parse(e){return w(e.data)}}J.create=r=>new J({typeName:m.ZodAny,...v(r)});class L extends g{constructor(){super(...arguments),this._unknown=!0}_parse(e){return w(e.data)}}L.create=r=>new L({typeName:m.ZodUnknown,...v(r)});class I extends g{_parse(e){const t=this._getOrReturnCtx(e);return l(t,{code:d.invalid_type,expected:f.never,received:t.parsedType}),y}}I.create=r=>new I({typeName:m.ZodNever,...v(r)});class ye extends g{_parse(e){if(this._getType(e)!==f.undefined){const s=this._getOrReturnCtx(e);return l(s,{code:d.invalid_type,expected:f.void,received:s.parsedType}),y}return w(e.data)}}ye.create=r=>new ye({typeName:m.ZodVoid,...v(r)});class N extends g{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),n=this._def;if(t.parsedType!==f.array)return l(t,{code:d.invalid_type,expected:f.array,received:t.parsedType}),y;if(n.exactLength!==null){const i=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;(i||o)&&(l(t,{code:i?d.too_big:d.too_small,minimum:o?n.exactLength.value:void 0,maximum:i?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),s.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(l(t,{code:d.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),s.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(l(t,{code:d.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>n.type._parseAsync(new E(t,i,t.path,o)))).then(i=>b.mergeArray(s,i));const a=[...t.data].map((i,o)=>n.type._parseSync(new E(t,i,t.path,o)));return b.mergeArray(s,a)}get element(){return this._def.type}min(e,t){return new N({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new N({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new N({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}}N.create=(r,e)=>new N({type:r,minLength:null,maxLength:null,exactLength:null,typeName:m.ZodArray,...v(e)});function F(r){if(r instanceof k){const e={};for(const t in r.shape){const s=r.shape[t];e[t]=S.create(F(s))}return new k({...r._def,shape:()=>e})}else return r instanceof N?new N({...r._def,type:F(r.element)}):r instanceof S?S.create(F(r.unwrap())):r instanceof P?P.create(F(r.unwrap())):r instanceof A?A.create(r.items.map(e=>F(e))):r}class k extends g{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(),t=_.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==f.object){const c=this._getOrReturnCtx(e);return l(c,{code:d.invalid_type,expected:f.object,received:c.parsedType}),y}const{status:s,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof I&&this._def.unknownKeys==="strip"))for(const c in n.data)i.includes(c)||o.push(c);const u=[];for(const c of i){const p=a[c],T=n.data[c];u.push({key:{status:"valid",value:c},value:p._parse(new E(n,T,n.path,c)),alwaysSet:c in n.data})}if(this._def.catchall instanceof I){const c=this._def.unknownKeys;if(c==="passthrough")for(const p of o)u.push({key:{status:"valid",value:p},value:{status:"valid",value:n.data[p]}});else if(c==="strict")o.length>0&&(l(n,{code:d.unrecognized_keys,keys:o}),s.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const p of o){const T=n.data[p];u.push({key:{status:"valid",value:p},value:c._parse(new E(n,T,n.path,p)),alwaysSet:p in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const c=[];for(const p of u){const T=await p.key,Me=await p.value;c.push({key:T,value:Me,alwaysSet:p.alwaysSet})}return c}).then(c=>b.mergeObjectSync(s,c)):b.mergeObjectSync(s,u)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new k({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var n,a,i,o;const u=(i=(a=(n=this._def).errorMap)===null||a===void 0?void 0:a.call(n,t,s).message)!==null&&i!==void 0?i:s.defaultError;return t.code==="unrecognized_keys"?{message:(o=h.errToObj(e).message)!==null&&o!==void 0?o:u}:{message:u}}}:{}})}strip(){return new k({...this._def,unknownKeys:"strip"})}passthrough(){return new k({...this._def,unknownKeys:"passthrough"})}extend(e){return new k({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new k({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:m.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new k({...this._def,catchall:e})}pick(e){const t={};return _.objectKeys(e).forEach(s=>{e[s]&&this.shape[s]&&(t[s]=this.shape[s])}),new k({...this._def,shape:()=>t})}omit(e){const t={};return _.objectKeys(this.shape).forEach(s=>{e[s]||(t[s]=this.shape[s])}),new k({...this._def,shape:()=>t})}deepPartial(){return F(this)}partial(e){const t={};return _.objectKeys(this.shape).forEach(s=>{const n=this.shape[s];e&&!e[s]?t[s]=n:t[s]=n.optional()}),new k({...this._def,shape:()=>t})}required(e){const t={};return _.objectKeys(this.shape).forEach(s=>{if(e&&!e[s])t[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof S;)a=a._def.innerType;t[s]=a}}),new k({...this._def,shape:()=>t})}keyof(){return He(_.objectKeys(this.shape))}}k.create=(r,e)=>new k({shape:()=>r,unknownKeys:"strip",catchall:I.create(),typeName:m.ZodObject,...v(e)});k.strictCreate=(r,e)=>new k({shape:()=>r,unknownKeys:"strict",catchall:I.create(),typeName:m.ZodObject,...v(e)});k.lazycreate=(r,e)=>new k({shape:r,unknownKeys:"strip",catchall:I.create(),typeName:m.ZodObject,...v(e)});class te extends g{_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;function n(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new Z(o.ctx.common.issues));return l(t,{code:d.invalid_union,unionErrors:i}),y}if(t.common.async)return Promise.all(s.map(async a=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);{let a;const i=[];for(const u of s){const c={...t,common:{...t.common,issues:[]},parent:null},p=u._parseSync({data:t.data,path:t.path,parent:c});if(p.status==="valid")return p;p.status==="dirty"&&!a&&(a={result:p,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(u=>new Z(u));return l(t,{code:d.invalid_union,unionErrors:o}),y}}get options(){return this._def.options}}te.create=(r,e)=>new te({options:r,typeName:m.ZodUnion,...v(e)});const O=r=>r instanceof ne?O(r.schema):r instanceof j?O(r.innerType()):r instanceof ae?[r.value]:r instanceof V?r.options:r instanceof ie?_.objectValues(r.enum):r instanceof oe?O(r._def.innerType):r instanceof K?[void 0]:r instanceof ee?[null]:r instanceof S?[void 0,...O(r.unwrap())]:r instanceof P?[null,...O(r.unwrap())]:r instanceof Ie||r instanceof ce?O(r.unwrap()):r instanceof de?O(r._def.innerType):[];class _e extends g{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.object)return l(t,{code:d.invalid_type,expected:f.object,received:t.parsedType}),y;const s=this.discriminator,n=t.data[s],a=this.optionsMap.get(n);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(l(t,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),y)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,s){const n=new Map;for(const a of t){const i=O(a.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of i){if(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,a)}}return new _e({typeName:m.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...v(s)})}}function Oe(r,e){const t=R(r),s=R(e);if(r===e)return{valid:!0,data:r};if(t===f.object&&s===f.object){const n=_.objectKeys(e),a=_.objectKeys(r).filter(o=>n.indexOf(o)!==-1),i={...r,...e};for(const o of a){const u=Oe(r[o],e[o]);if(!u.valid)return{valid:!1};i[o]=u.data}return{valid:!0,data:i}}else if(t===f.array&&s===f.array){if(r.length!==e.length)return{valid:!1};const n=[];for(let a=0;a<r.length;a++){const i=r[a],o=e[a],u=Oe(i,o);if(!u.valid)return{valid:!1};n.push(u.data)}return{valid:!0,data:n}}else return t===f.date&&s===f.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class re extends g{_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=(a,i)=>{if(Ee(a)||Ee(i))return y;const o=Oe(a.value,i.value);return o.valid?((Ae(a)||Ae(i))&&t.dirty(),{status:t.value,value:o.data}):(l(s,{code:d.invalid_intersection_types}),y)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}re.create=(r,e,t)=>new re({left:r,right:e,typeName:m.ZodIntersection,...v(t)});class A extends g{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==f.array)return l(s,{code:d.invalid_type,expected:f.array,received:s.parsedType}),y;if(s.data.length<this._def.items.length)return l(s,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),y;!this._def.rest&&s.data.length>this._def.items.length&&(l(s,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...s.data].map((i,o)=>{const u=this._def.items[o]||this._def.rest;return u?u._parse(new E(s,i,s.path,o)):null}).filter(i=>!!i);return s.common.async?Promise.all(a).then(i=>b.mergeArray(t,i)):b.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new A({...this._def,rest:e})}}A.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new A({items:r,typeName:m.ZodTuple,rest:null,...v(e)})};class se extends g{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==f.object)return l(s,{code:d.invalid_type,expected:f.object,received:s.parsedType}),y;const n=[],a=this._def.keyType,i=this._def.valueType;for(const o in s.data)n.push({key:a._parse(new E(s,o,s.path,o)),value:i._parse(new E(s,s.data[o],s.path,o)),alwaysSet:o in s.data});return s.common.async?b.mergeObjectAsync(t,n):b.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,s){return t instanceof g?new se({keyType:e,valueType:t,typeName:m.ZodRecord,...v(s)}):new se({keyType:C.create(),valueType:e,typeName:m.ZodRecord,...v(t)})}}class ve extends g{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==f.map)return l(s,{code:d.invalid_type,expected:f.map,received:s.parsedType}),y;const n=this._def.keyType,a=this._def.valueType,i=[...s.data.entries()].map(([o,u],c)=>({key:n._parse(new E(s,o,s.path,[c,"key"])),value:a._parse(new E(s,u,s.path,[c,"value"]))}));if(s.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const u of i){const c=await u.key,p=await u.value;if(c.status==="aborted"||p.status==="aborted")return y;(c.status==="dirty"||p.status==="dirty")&&t.dirty(),o.set(c.value,p.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const u of i){const c=u.key,p=u.value;if(c.status==="aborted"||p.status==="aborted")return y;(c.status==="dirty"||p.status==="dirty")&&t.dirty(),o.set(c.value,p.value)}return{status:t.value,value:o}}}}ve.create=(r,e,t)=>new ve({valueType:e,keyType:r,typeName:m.ZodMap,...v(t)});class U extends g{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==f.set)return l(s,{code:d.invalid_type,expected:f.set,received:s.parsedType}),y;const n=this._def;n.minSize!==null&&s.data.size<n.minSize.value&&(l(s,{code:d.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&s.data.size>n.maxSize.value&&(l(s,{code:d.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const a=this._def.valueType;function i(u){const c=new Set;for(const p of u){if(p.status==="aborted")return y;p.status==="dirty"&&t.dirty(),c.add(p.value)}return{status:t.value,value:c}}const o=[...s.data.values()].map((u,c)=>a._parse(new E(s,u,s.path,c)));return s.common.async?Promise.all(o).then(u=>i(u)):i(o)}min(e,t){return new U({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new U({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}U.create=(r,e)=>new U({valueType:r,minSize:null,maxSize:null,typeName:m.ZodSet,...v(e)});class W extends g{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.function)return l(t,{code:d.invalid_type,expected:f.function,received:t.parsedType}),y;function s(o,u){return he({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,fe(),q].filter(c=>!!c),issueData:{code:d.invalid_arguments,argumentsError:u}})}function n(o,u){return he({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,fe(),q].filter(c=>!!c),issueData:{code:d.invalid_return_type,returnTypeError:u}})}const a={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof Y){const o=this;return w(async function(...u){const c=new Z([]),p=await o._def.args.parseAsync(u,a).catch(xe=>{throw c.addIssue(s(u,xe)),c}),T=await Reflect.apply(i,this,p);return await o._def.returns._def.type.parseAsync(T,a).catch(xe=>{throw c.addIssue(n(T,xe)),c})})}else{const o=this;return w(function(...u){const c=o._def.args.safeParse(u,a);if(!c.success)throw new Z([s(u,c.error)]);const p=Reflect.apply(i,this,c.data),T=o._def.returns.safeParse(p,a);if(!T.success)throw new Z([n(p,T.error)]);return T.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new W({...this._def,args:A.create(e).rest(L.create())})}returns(e){return new W({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,s){return new W({args:e||A.create([]).rest(L.create()),returns:t||L.create(),typeName:m.ZodFunction,...v(s)})}}class ne extends g{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ne.create=(r,e)=>new ne({getter:r,typeName:m.ZodLazy,...v(e)});class ae extends g{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return l(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),y}return{status:"valid",value:e.data}}get value(){return this._def.value}}ae.create=(r,e)=>new ae({value:r,typeName:m.ZodLiteral,...v(e)});function He(r,e){return new V({values:r,typeName:m.ZodEnum,...v(e)})}class V extends g{constructor(){super(...arguments),H.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),s=this._def.values;return l(t,{expected:_.joinValues(s),received:t.parsedType,code:d.invalid_type}),y}if(me(this,H)||We(this,H,new Set(this._def.values)),!me(this,H).has(e.data)){const t=this._getOrReturnCtx(e),s=this._def.values;return l(t,{received:t.data,code:d.invalid_enum_value,options:s}),y}return w(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return V.create(e,{...this._def,...t})}exclude(e,t=this._def){return V.create(this.options.filter(s=>!e.includes(s)),{...this._def,...t})}}H=new WeakMap;V.create=He;class ie extends g{constructor(){super(...arguments),G.set(this,void 0)}_parse(e){const t=_.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==f.string&&s.parsedType!==f.number){const n=_.objectValues(t);return l(s,{expected:_.joinValues(n),received:s.parsedType,code:d.invalid_type}),y}if(me(this,G)||We(this,G,new Set(_.getValidEnumValues(this._def.values))),!me(this,G).has(e.data)){const n=_.objectValues(t);return l(s,{received:s.data,code:d.invalid_enum_value,options:n}),y}return w(e.data)}get enum(){return this._def.values}}G=new WeakMap;ie.create=(r,e)=>new ie({values:r,typeName:m.ZodNativeEnum,...v(e)});class Y extends g{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.promise&&t.common.async===!1)return l(t,{code:d.invalid_type,expected:f.promise,received:t.parsedType}),y;const s=t.parsedType===f.promise?t.data:Promise.resolve(t.data);return w(s.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Y.create=(r,e)=>new Y({type:r,typeName:m.ZodPromise,...v(e)});class j extends g{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===m.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:i=>{l(s,i),i.fatal?t.abort():t.dirty()},get path(){return s.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){const i=n.transform(s.data,a);if(s.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return y;const u=await this._def.schema._parseAsync({data:o,path:s.path,parent:s});return u.status==="aborted"?y:u.status==="dirty"||t.value==="dirty"?B(u.value):u});{if(t.value==="aborted")return y;const o=this._def.schema._parseSync({data:i,path:s.path,parent:s});return o.status==="aborted"?y:o.status==="dirty"||t.value==="dirty"?B(o.value):o}}if(n.type==="refinement"){const i=o=>{const u=n.refinement(o,a);if(s.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(s.common.async===!1){const o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?y:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>o.status==="aborted"?y:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(s.common.async===!1){const i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!z(i))return i;const o=n.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(i=>z(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:t.value,value:o})):i);_.assertNever(n)}}j.create=(r,e,t)=>new j({schema:r,typeName:m.ZodEffects,effect:e,...v(t)});j.createWithPreprocess=(r,e,t)=>new j({schema:e,effect:{type:"preprocess",transform:r},typeName:m.ZodEffects,...v(t)});class S extends g{_parse(e){return this._getType(e)===f.undefined?w(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}S.create=(r,e)=>new S({innerType:r,typeName:m.ZodOptional,...v(e)});class P extends g{_parse(e){return this._getType(e)===f.null?w(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}P.create=(r,e)=>new P({innerType:r,typeName:m.ZodNullable,...v(e)});class oe extends g{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===f.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}oe.create=(r,e)=>new oe({innerType:r,typeName:m.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...v(e)});class de extends g{_parse(e){const{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return X(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Z(s.common.issues)},input:s.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Z(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}de.create=(r,e)=>new de({innerType:r,typeName:m.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...v(e)});class ge extends g{_parse(e){if(this._getType(e)!==f.nan){const s=this._getOrReturnCtx(e);return l(s,{code:d.invalid_type,expected:f.nan,received:s.parsedType}),y}return{status:"valid",value:e.data}}}ge.create=r=>new ge({typeName:m.ZodNaN,...v(r)});const Ut=Symbol("zod_brand");class Ie extends g{_parse(e){const{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}}class ue extends g{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?y:a.status==="dirty"?(t.dirty(),B(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})})();{const n=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?y:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:s.path,parent:s})}}static create(e,t){return new ue({in:e,out:t,typeName:m.ZodPipeline})}}class ce extends g{_parse(e){const t=this._def.innerType._parse(e),s=n=>(z(n)&&(n.value=Object.freeze(n.value)),n);return X(t)?t.then(n=>s(n)):s(t)}unwrap(){return this._def.innerType}}ce.create=(r,e)=>new ce({innerType:r,typeName:m.ZodReadonly,...v(e)});function Ge(r,e={},t){return r?J.create().superRefine((s,n)=>{var a,i;if(!r(s)){const o=typeof e=="function"?e(s):typeof e=="string"?{message:e}:e,u=(i=(a=o.fatal)!==null&&a!==void 0?a:t)!==null&&i!==void 0?i:!0,c=typeof o=="string"?{message:o}:o;n.addIssue({code:"custom",...c,fatal:u})}}):J.create()}const Ft={object:k.lazycreate};var m;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(m||(m={}));const Bt=(r,e={message:`Input not instance of ${r.name}`})=>Ge(t=>t instanceof r,e),Xe=C.create,Qe=M.create,Wt=ge.create,qt=$.create,Ke=Q.create,Jt=D.create,Yt=pe.create,Ht=K.create,Gt=ee.create,Xt=J.create,Qt=L.create,Kt=I.create,er=ye.create,tr=N.create,rr=k.create,sr=k.strictCreate,nr=te.create,ar=_e.create,ir=re.create,or=A.create,dr=se.create,cr=ve.create,ur=U.create,lr=W.create,fr=ne.create,hr=ae.create,mr=V.create,pr=ie.create,yr=Y.create,ze=j.create,vr=S.create,gr=P.create,_r=j.createWithPreprocess,xr=ue.create,kr=()=>Xe().optional(),br=()=>Qe().optional(),wr=()=>Ke().optional(),Tr={string:r=>C.create({...r,coerce:!0}),number:r=>M.create({...r,coerce:!0}),boolean:r=>Q.create({...r,coerce:!0}),bigint:r=>$.create({...r,coerce:!0}),date:r=>D.create({...r,coerce:!0})},Zr=y;var le=Object.freeze({__proto__:null,defaultErrorMap:q,setErrorMap:_t,getErrorMap:fe,makeIssue:he,EMPTY_PATH:xt,addIssueToContext:l,ParseStatus:b,INVALID:y,DIRTY:B,OK:w,isAborted:Ee,isDirty:Ae,isValid:z,isAsync:X,get util(){return _},get objectUtil(){return Se},ZodParsedType:f,getParsedType:R,ZodType:g,datetimeRegex:Ye,ZodString:C,ZodNumber:M,ZodBigInt:$,ZodBoolean:Q,ZodDate:D,ZodSymbol:pe,ZodUndefined:K,ZodNull:ee,ZodAny:J,ZodUnknown:L,ZodNever:I,ZodVoid:ye,ZodArray:N,ZodObject:k,ZodUnion:te,ZodDiscriminatedUnion:_e,ZodIntersection:re,ZodTuple:A,ZodRecord:se,ZodMap:ve,ZodSet:U,ZodFunction:W,ZodLazy:ne,ZodLiteral:ae,ZodEnum:V,ZodNativeEnum:ie,ZodPromise:Y,ZodEffects:j,ZodTransformer:j,ZodOptional:S,ZodNullable:P,ZodDefault:oe,ZodCatch:de,ZodNaN:ge,BRAND:Ut,ZodBranded:Ie,ZodPipeline:ue,ZodReadonly:ce,custom:Ge,Schema:g,ZodSchema:g,late:Ft,get ZodFirstPartyTypeKind(){return m},coerce:Tr,any:Xt,array:tr,bigint:qt,boolean:Ke,date:Jt,discriminatedUnion:ar,effect:ze,enum:mr,function:lr,instanceof:Bt,intersection:ir,lazy:fr,literal:hr,map:cr,nan:Wt,nativeEnum:pr,never:Kt,null:Gt,nullable:gr,number:Qe,object:rr,oboolean:wr,onumber:br,optional:vr,ostring:kr,pipeline:xr,preprocess:_r,promise:yr,record:dr,set:ur,strictObject:sr,string:Xe,symbol:Yt,transformer:ze,tuple:or,undefined:Ht,union:nr,unknown:Qt,void:er,NEVER:Zr,ZodIssueCode:d,quotelessJson:gt,ZodError:Z});const Cr=le.object({email:le.string().nonempty("Please enter your email").email(),password:le.string().nonempty("Please enter your password"),remember:le.boolean()});function Nr(){"use no memo";const r=dt(),e=je(n=>n.auth.isLoading),t=nt({resolver:vt(Cr),defaultValues:{email:"",password:"",remember:!1}}),s=Re.useCallback(({email:n,password:a,remember:i})=>{r(ct({email:n,password:a,remember:i}))},[r]);return x.jsx("div",{className:"flex flex-col",children:x.jsx(at,{...t,children:x.jsxs("form",{onSubmit:t.handleSubmit(s),className:"space-y-4",children:[x.jsx(be,{control:t.control,name:"email",rules:{required:!0},render:({field:n})=>x.jsxs(we,{children:[x.jsx($e,{className:"flex gap-1 items-baseline",children:"Email"}),x.jsx(Te,{children:x.jsx(Ve,{placeholder:"callasmaria@example.com",...n})}),x.jsx(Ze,{})]})}),x.jsx(be,{name:"password",control:t.control,rules:{required:!0},render:({field:n})=>x.jsxs(we,{children:[x.jsx($e,{className:"flex gap-1 items-baseline",children:"Password"}),x.jsx(Te,{children:x.jsx(Ve,{type:"password",...n})}),x.jsx(Ze,{})]})}),x.jsx(be,{name:"remember",control:t.control,render:({field:n})=>x.jsxs(we,{children:[x.jsx(Te,{children:x.jsxs("div",{className:"flex items-center space-x-2",children:[x.jsx(it,{id:"remember",checked:n.value,onCheckedChange:n.onChange}),x.jsx("label",{htmlFor:"remember",className:"text-sm leading-none",children:"Remember me"})]})}),x.jsx(Ze,{})]})}),x.jsx(rt,{type:"submit",disabled:!t.formState.isValid||e,className:"w-full",children:e?x.jsx(Ue,{className:"absolute"}):"Login"})]})})})}const Pr=et(function(){const e=tt(),t=je(n=>n.auth.user),s=je(n=>n.auth.isLoading);return Re.useEffect(()=>{t&&e("/admin/dashboard")},[e,t]),s||t?null:x.jsx("div",{className:"flex w-full h-full",children:x.jsxs("div",{className:"self-center space-y-8 w-72 mx-auto",children:[x.jsxs("div",{className:"flex flex-col space-y-2 text-center",children:[x.jsx("h1",{className:"text-2xl font-semibold tracking-tight leading-none",children:"Editorial Admin"}),x.jsx("p",{className:"text-sm text-muted-foreground",children:"Enter your details below to login"})]}),x.jsx(Nr,{})]})})});export{Pr as default};
@@ -1 +1 @@
1
- window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-BGu2H8xv.js","imports":["/assets/chunk-KNED5TY2-DAA_sFzt.js","/assets/index-C-vcF2DZ.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":true,"module":"/assets/root-wKvfXBjk.js","imports":["/assets/chunk-KNED5TY2-DAA_sFzt.js","/assets/index-C-vcF2DZ.js","/assets/react-redux-kbMjYGuQ.js","/assets/authSlice-B3Tyl-Nw.js","/assets/editorialApi-fQchmMa9.js","/assets/tslib.es6-CDuPK5Eb.js"],"css":["/assets/root-DS7N36v7.css"]},"routes/home":{"id":"routes/home","parentId":"root","path":"/admin","index":true,"hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/home-oYP3wzz9.js","imports":["/assets/react-redux-kbMjYGuQ.js","/assets/chunk-KNED5TY2-DAA_sFzt.js","/assets/button-Da66T3Bb.js","/assets/input-BmmdOdbj.js","/assets/utils-DslUJpbf.js","/assets/createLucideIcon-R2-3a7hN.js","/assets/authSlice-B3Tyl-Nw.js","/assets/index-BvKqmqc2.js","/assets/index-C-vcF2DZ.js","/assets/tslib.es6-CDuPK5Eb.js"],"css":[]},"routes/dashboard._layout":{"id":"routes/dashboard._layout","parentId":"root","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._layout-fM4SW8Or.js","imports":["/assets/react-redux-kbMjYGuQ.js","/assets/chunk-KNED5TY2-DAA_sFzt.js","/assets/chevron-down-8tTu7uK2.js","/assets/authSlice-B3Tyl-Nw.js","/assets/editorialApi-fQchmMa9.js","/assets/index-Bd1u2_LZ.js","/assets/utils-DslUJpbf.js","/assets/createLucideIcon-R2-3a7hN.js","/assets/button-Da66T3Bb.js","/assets/index-BvKqmqc2.js","/assets/tslib.es6-CDuPK5Eb.js","/assets/index-C-vcF2DZ.js"],"css":[]},"routes/dashboard":{"id":"routes/dashboard","parentId":"routes/dashboard._layout","path":"/admin/dashboard","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard-BTu7-8Ba.js","imports":["/assets/react-redux-kbMjYGuQ.js","/assets/chunk-KNED5TY2-DAA_sFzt.js","/assets/utils-DslUJpbf.js","/assets/editorialApi-fQchmMa9.js","/assets/index-DeO5nu0f.js"],"css":[]},"routes/dashboard.$collection.new":{"id":"routes/dashboard.$collection.new","parentId":"routes/dashboard._layout","path":"/admin/dashboard/:collectionId/new","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._collection.new-BFe8yV0Z.js","imports":["/assets/react-redux-kbMjYGuQ.js","/assets/chunk-KNED5TY2-DAA_sFzt.js","/assets/itemForm-DlRBjBsd.js","/assets/editorialApi-fQchmMa9.js","/assets/button-Da66T3Bb.js","/assets/utils-DslUJpbf.js","/assets/input-BmmdOdbj.js","/assets/index-BvKqmqc2.js","/assets/index-C-vcF2DZ.js","/assets/createLucideIcon-R2-3a7hN.js","/assets/index-Bd1u2_LZ.js","/assets/tslib.es6-CDuPK5Eb.js"],"css":["/assets/itemForm-CDbHkFXh.css"]},"routes/dashboard.$collection":{"id":"routes/dashboard.$collection","parentId":"routes/dashboard._layout","path":"/admin/dashboard/:collectionId","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._collection-MtSHvYYW.js","imports":["/assets/react-redux-kbMjYGuQ.js","/assets/chunk-KNED5TY2-DAA_sFzt.js","/assets/button-Da66T3Bb.js","/assets/editorialApi-fQchmMa9.js","/assets/index-DeO5nu0f.js","/assets/utils-DslUJpbf.js","/assets/trash-wq_ppIxP.js","/assets/createLucideIcon-R2-3a7hN.js"],"css":[]},"routes/dashboard.$collection.$document":{"id":"routes/dashboard.$collection.$document","parentId":"routes/dashboard._layout","path":"/admin/dashboard/:collectionId/:documentId","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._collection._document-CRkC98aa.js","imports":["/assets/react-redux-kbMjYGuQ.js","/assets/chunk-KNED5TY2-DAA_sFzt.js","/assets/itemForm-DlRBjBsd.js","/assets/editorialApi-fQchmMa9.js","/assets/button-Da66T3Bb.js","/assets/utils-DslUJpbf.js","/assets/input-BmmdOdbj.js","/assets/index-BvKqmqc2.js","/assets/index-C-vcF2DZ.js","/assets/createLucideIcon-R2-3a7hN.js","/assets/index-Bd1u2_LZ.js","/assets/tslib.es6-CDuPK5Eb.js"],"css":["/assets/itemForm-CDbHkFXh.css"]},"routes/dashboard.files":{"id":"routes/dashboard.files","parentId":"routes/dashboard._layout","path":"/admin/dashboard/files","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard.files-ieQA7EmW.js","imports":["/assets/react-redux-kbMjYGuQ.js","/assets/chunk-KNED5TY2-DAA_sFzt.js","/assets/chevron-down-8tTu7uK2.js","/assets/editorialApi-fQchmMa9.js","/assets/utils-DslUJpbf.js","/assets/createLucideIcon-R2-3a7hN.js","/assets/trash-wq_ppIxP.js"],"css":[]}},"url":"/assets/manifest-9974ee04.js","version":"9974ee04"};
1
+ window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-BGu2H8xv.js","imports":["/assets/chunk-KNED5TY2-DAA_sFzt.js","/assets/index-C-vcF2DZ.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":true,"module":"/assets/root-wKvfXBjk.js","imports":["/assets/chunk-KNED5TY2-DAA_sFzt.js","/assets/index-C-vcF2DZ.js","/assets/react-redux-kbMjYGuQ.js","/assets/authSlice-B3Tyl-Nw.js","/assets/editorialApi-fQchmMa9.js","/assets/tslib.es6-CDuPK5Eb.js"],"css":["/assets/root-DS7N36v7.css"]},"routes/home":{"id":"routes/home","parentId":"root","path":"/admin","index":true,"hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/home-C2nWtN4c.js","imports":["/assets/react-redux-kbMjYGuQ.js","/assets/chunk-KNED5TY2-DAA_sFzt.js","/assets/button-Da66T3Bb.js","/assets/input-BmmdOdbj.js","/assets/utils-DslUJpbf.js","/assets/createLucideIcon-R2-3a7hN.js","/assets/authSlice-B3Tyl-Nw.js","/assets/index-BvKqmqc2.js","/assets/index-C-vcF2DZ.js","/assets/tslib.es6-CDuPK5Eb.js"],"css":[]},"routes/dashboard._layout":{"id":"routes/dashboard._layout","parentId":"root","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._layout-BjRnQPQr.js","imports":["/assets/react-redux-kbMjYGuQ.js","/assets/chunk-KNED5TY2-DAA_sFzt.js","/assets/authSlice-B3Tyl-Nw.js","/assets/editorialApi-fQchmMa9.js","/assets/index-Bd1u2_LZ.js","/assets/utils-DslUJpbf.js","/assets/createLucideIcon-R2-3a7hN.js","/assets/button-Da66T3Bb.js","/assets/index-BvKqmqc2.js","/assets/chevron-down-D_Gla76b.js","/assets/tslib.es6-CDuPK5Eb.js","/assets/index-C-vcF2DZ.js"],"css":[]},"routes/dashboard":{"id":"routes/dashboard","parentId":"routes/dashboard._layout","path":"/admin/dashboard","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard-BTu7-8Ba.js","imports":["/assets/react-redux-kbMjYGuQ.js","/assets/chunk-KNED5TY2-DAA_sFzt.js","/assets/utils-DslUJpbf.js","/assets/editorialApi-fQchmMa9.js","/assets/index-DeO5nu0f.js"],"css":[]},"routes/dashboard.$collection.new":{"id":"routes/dashboard.$collection.new","parentId":"routes/dashboard._layout","path":"/admin/dashboard/:collectionId/new","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._collection.new-BFe8yV0Z.js","imports":["/assets/react-redux-kbMjYGuQ.js","/assets/chunk-KNED5TY2-DAA_sFzt.js","/assets/itemForm-DlRBjBsd.js","/assets/editorialApi-fQchmMa9.js","/assets/button-Da66T3Bb.js","/assets/utils-DslUJpbf.js","/assets/input-BmmdOdbj.js","/assets/index-BvKqmqc2.js","/assets/index-C-vcF2DZ.js","/assets/createLucideIcon-R2-3a7hN.js","/assets/index-Bd1u2_LZ.js","/assets/tslib.es6-CDuPK5Eb.js"],"css":["/assets/itemForm-CDbHkFXh.css"]},"routes/dashboard.$collection":{"id":"routes/dashboard.$collection","parentId":"routes/dashboard._layout","path":"/admin/dashboard/:collectionId","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._collection-MtSHvYYW.js","imports":["/assets/react-redux-kbMjYGuQ.js","/assets/chunk-KNED5TY2-DAA_sFzt.js","/assets/button-Da66T3Bb.js","/assets/editorialApi-fQchmMa9.js","/assets/index-DeO5nu0f.js","/assets/utils-DslUJpbf.js","/assets/trash-wq_ppIxP.js","/assets/createLucideIcon-R2-3a7hN.js"],"css":[]},"routes/dashboard.$collection.$document":{"id":"routes/dashboard.$collection.$document","parentId":"routes/dashboard._layout","path":"/admin/dashboard/:collectionId/:documentId","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._collection._document-CRkC98aa.js","imports":["/assets/react-redux-kbMjYGuQ.js","/assets/chunk-KNED5TY2-DAA_sFzt.js","/assets/itemForm-DlRBjBsd.js","/assets/editorialApi-fQchmMa9.js","/assets/button-Da66T3Bb.js","/assets/utils-DslUJpbf.js","/assets/input-BmmdOdbj.js","/assets/index-BvKqmqc2.js","/assets/index-C-vcF2DZ.js","/assets/createLucideIcon-R2-3a7hN.js","/assets/index-Bd1u2_LZ.js","/assets/tslib.es6-CDuPK5Eb.js"],"css":["/assets/itemForm-CDbHkFXh.css"]},"routes/dashboard.files":{"id":"routes/dashboard.files","parentId":"routes/dashboard._layout","path":"/admin/dashboard/files","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard.files-DKh39mcB.js","imports":["/assets/react-redux-kbMjYGuQ.js","/assets/chunk-KNED5TY2-DAA_sFzt.js","/assets/editorialApi-fQchmMa9.js","/assets/utils-DslUJpbf.js","/assets/createLucideIcon-R2-3a7hN.js","/assets/chevron-down-D_Gla76b.js","/assets/trash-wq_ppIxP.js"],"css":[]}},"url":"/assets/manifest-2ff77582.js","version":"2ff77582"};
@@ -1,11 +1,11 @@
1
- <!DOCTYPE html><html lang="en" class="min-h-screen"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Editorial Admin</title><link rel="modulepreload" href="/assets/manifest-9974ee04.js"/><link rel="modulepreload" href="/assets/entry.client-BGu2H8xv.js"/><link rel="modulepreload" href="/assets/chunk-KNED5TY2-DAA_sFzt.js"/><link rel="modulepreload" href="/assets/index-C-vcF2DZ.js"/><link rel="modulepreload" href="/assets/root-wKvfXBjk.js"/><link rel="modulepreload" href="/assets/react-redux-kbMjYGuQ.js"/><link rel="modulepreload" href="/assets/authSlice-B3Tyl-Nw.js"/><link rel="modulepreload" href="/assets/editorialApi-fQchmMa9.js"/><link rel="modulepreload" href="/assets/tslib.es6-CDuPK5Eb.js"/><link rel="stylesheet" href="/assets/root-DS7N36v7.css"/></head><body class="h-full min-h-screen bg-background font-sans antialiased"><script>
1
+ <!DOCTYPE html><html lang="en" class="min-h-screen"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Editorial Admin</title><link rel="modulepreload" href="/assets/manifest-2ff77582.js"/><link rel="modulepreload" href="/assets/entry.client-BGu2H8xv.js"/><link rel="modulepreload" href="/assets/chunk-KNED5TY2-DAA_sFzt.js"/><link rel="modulepreload" href="/assets/index-C-vcF2DZ.js"/><link rel="modulepreload" href="/assets/root-wKvfXBjk.js"/><link rel="modulepreload" href="/assets/react-redux-kbMjYGuQ.js"/><link rel="modulepreload" href="/assets/authSlice-B3Tyl-Nw.js"/><link rel="modulepreload" href="/assets/editorialApi-fQchmMa9.js"/><link rel="modulepreload" href="/assets/tslib.es6-CDuPK5Eb.js"/><link rel="stylesheet" href="/assets/root-DS7N36v7.css"/></head><body class="h-full min-h-screen bg-background font-sans antialiased"><script>
2
2
  console.log(
3
3
  "💿 Hey developer 👋. You can provide a way better UX than this " +
4
4
  "when your app is loading JS modules and/or running `clientLoader` " +
5
5
  "functions. Check out https://remix.run/route/hydrate-fallback " +
6
6
  "for more information."
7
7
  );
8
- </script><script>window.__reactRouterContext = {"basename":"/","future":{"unstable_middleware":false,"unstable_optimizeDeps":false,"unstable_splitRouteModules":false,"unstable_subResourceIntegrity":false,"unstable_viteEnvironmentApi":false},"ssr":false,"isSpaMode":true};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());</script><script type="module" async="">import "/assets/manifest-9974ee04.js";
8
+ </script><script>window.__reactRouterContext = {"basename":"/","future":{"unstable_middleware":false,"unstable_optimizeDeps":false,"unstable_splitRouteModules":false,"unstable_subResourceIntegrity":false,"unstable_viteEnvironmentApi":false},"ssr":false,"isSpaMode":true};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());</script><script type="module" async="">import "/assets/manifest-2ff77582.js";
9
9
  import * as route0 from "/assets/root-wKvfXBjk.js";
10
10
 
11
11
  window.__reactRouterRouteModules = {"root":route0};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isardsat/editorial-admin",
3
- "version": "6.0.4",
3
+ "version": "6.0.6",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -78,8 +78,8 @@
78
78
  "tailwindcss": "^4.1.3",
79
79
  "tailwindcss-animate": "^1.0.7",
80
80
  "vaul": "^1.1.2",
81
- "zod": "^4.0.2",
82
- "@isardsat/editorial-common": "^6.0.4"
81
+ "zod": "^3",
82
+ "@isardsat/editorial-common": "^6.0.6"
83
83
  },
84
84
  "devDependencies": {
85
85
  "@react-router/dev": "^7.5.3",
@@ -1,6 +0,0 @@
1
- import{c as o}from"./createLucideIcon-R2-3a7hN.js";const e={EDITORIAL_API_URL:"/"};/**
2
- * @license lucide-react v0.487.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const n=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],t=o("chevron-down",n);export{t as C,e as c};
@@ -1,66 +0,0 @@
1
- import{w as ce}from"./react-redux-kbMjYGuQ.js";import{n as e,a as d,t as N,N as ue,q as he,v as pe,w as xe,O as fe}from"./chunk-KNED5TY2-DAA_sFzt.js";import{c as K,C as L}from"./chevron-down-8tTu7uK2.js";import{u as be,d as E,e as ge}from"./authSlice-B3Tyl-Nw.js";import{u as W,a as me,b as je,c as ve,d as we}from"./editorialApi-fQchmMa9.js";import{R as Q,C as X,a as Z,T as Y,D as J,P as ee,O as te,b as ye,c as Ne,d as Ce,e as _e,f as Se,A as ke,u as Me}from"./index-Bd1u2_LZ.js";import{c as r}from"./utils-DslUJpbf.js";import{c as x}from"./createLucideIcon-R2-3a7hN.js";import{B as O,S as R,c as Ee,u as Oe}from"./button-Da66T3Bb.js";import{P as k,u as Re,c as Ae,a as ze,b as De,d as Pe}from"./index-BvKqmqc2.js";import"./tslib.es6-CDuPK5Eb.js";import"./index-C-vcF2DZ.js";/**
2
- * @license lucide-react v0.487.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const Ie=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Te=x("arrow-down",Ie);/**
7
- * @license lucide-react v0.487.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const Le=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],$e=x("arrow-up",Le);/**
12
- * @license lucide-react v0.487.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const Be=[["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["path",{d:"M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3",key:"1fpvtg"}]],He=x("blocks",Be);/**
17
- * @license lucide-react v0.487.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */const Ge=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],qe=x("chevron-right",Ge);/**
22
- * @license lucide-react v0.487.0 - ISC
23
- *
24
- * This source code is licensed under the ISC license.
25
- * See the LICENSE file in the root directory of this source tree.
26
- */const Fe=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Ve=x("external-link",Fe);/**
27
- * @license lucide-react v0.487.0 - ISC
28
- *
29
- * This source code is licensed under the ISC license.
30
- * See the LICENSE file in the root directory of this source tree.
31
- */const Ue=[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]],Ke=x("files",Ue);/**
32
- * @license lucide-react v0.487.0 - ISC
33
- *
34
- * This source code is licensed under the ISC license.
35
- * See the LICENSE file in the root directory of this source tree.
36
- */const We=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],Qe=x("grid-3x3",We);/**
37
- * @license lucide-react v0.487.0 - ISC
38
- *
39
- * This source code is licensed under the ISC license.
40
- * See the LICENSE file in the root directory of this source tree.
41
- */const Xe=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]],Ze=x("heart",Xe);/**
42
- * @license lucide-react v0.487.0 - ISC
43
- *
44
- * This source code is licensed under the ISC license.
45
- * See the LICENSE file in the root directory of this source tree.
46
- */const Ye=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],Je=x("log-out",Ye);/**
47
- * @license lucide-react v0.487.0 - ISC
48
- *
49
- * This source code is licensed under the ISC license.
50
- * See the LICENSE file in the root directory of this source tree.
51
- */const et=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],tt=x("panel-left",et);/**
52
- * @license lucide-react v0.487.0 - ISC
53
- *
54
- * This source code is licensed under the ISC license.
55
- * See the LICENSE file in the root directory of this source tree.
56
- */const at=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],st=x("square",at);/**
57
- * @license lucide-react v0.487.0 - ISC
58
- *
59
- * This source code is licensed under the ISC license.
60
- * See the LICENSE file in the root directory of this source tree.
61
- */const nt=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],ot=x("upload",nt);/**
62
- * @license lucide-react v0.487.0 - ISC
63
- *
64
- * This source code is licensed under the ISC license.
65
- * See the LICENSE file in the root directory of this source tree.
66
- */const it=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ae=x("x",it);function rt({...t}){return e.jsx(Q,{"data-slot":"dialog",...t})}function dt({...t}){return e.jsx(ee,{"data-slot":"dialog-portal",...t})}function lt({className:t,...a}){return e.jsx(te,{"data-slot":"dialog-overlay",className:r("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/50",t),...a})}function ct({className:t,children:a,...n}){return e.jsxs(dt,{"data-slot":"dialog-portal",children:[e.jsx(lt,{}),e.jsxs(X,{"data-slot":"dialog-content",className:r("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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...n,children:[a,e.jsxs(Z,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[e.jsx(ae,{}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function ut({className:t,...a}){return e.jsx("div",{"data-slot":"dialog-header",className:r("flex flex-col gap-2 text-center sm:text-left",t),...a})}function ht({className:t,...a}){return e.jsx("div",{"data-slot":"dialog-footer",className:r("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...a})}function pt({className:t,...a}){return e.jsx(Y,{"data-slot":"dialog-title",className:r("text-lg leading-none font-semibold",t),...a})}function xt({className:t,...a}){return e.jsx(J,{"data-slot":"dialog-description",className:r("text-muted-foreground text-sm",t),...a})}const ft="#181717",bt=d.forwardRef(function({title:a="GitHub",color:n="currentColor",size:s=24,...o},i){return n==="default"&&(n=ft),e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:s,height:s,fill:n,viewBox:"0 0 24 24",ref:i,...o,children:[e.jsx("title",{children:a}),e.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]})}),gt="#85EA2D",mt=d.forwardRef(function({title:a="Swagger",color:n="currentColor",size:s=24,...o},i){return n==="default"&&(n=gt),e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:s,height:s,fill:n,viewBox:"0 0 24 24",ref:i,...o,children:[e.jsx("title",{children:a}),e.jsx("path",{d:"M12 0C5.383 0 0 5.383 0 12s5.383 12 12 12c6.616 0 12-5.383 12-12S18.616 0 12 0zm0 1.144c5.995 0 10.856 4.86 10.856 10.856 0 5.995-4.86 10.856-10.856 10.856-5.996 0-10.856-4.86-10.856-10.856C1.144 6.004 6.004 1.144 12 1.144zM8.37 5.868a6.707 6.707 0 0 0-.423.005c-.983.056-1.573.517-1.735 1.472-.115.665-.096 1.348-.143 2.017-.013.35-.05.697-.115 1.038-.134.609-.397.798-1.016.83a2.65 2.65 0 0 0-.244.042v1.463c1.126.055 1.278.452 1.37 1.629.033.429-.013.858.015 1.287.018.406.073.808.156 1.2.259 1.075 1.307 1.435 2.575 1.218v-1.283c-.203 0-.383.005-.558 0-.43-.013-.591-.12-.632-.535-.056-.535-.042-1.08-.075-1.62-.064-1.001-.175-1.988-1.153-2.625.503-.37.868-.812.983-1.398.083-.41.134-.821.166-1.237.028-.415-.023-.84.014-1.25.06-.665.102-.937.9-.91.12 0 .235-.017.369-.027v-1.31c-.16 0-.31-.004-.454-.006zm7.593.009a4.247 4.247 0 0 0-.813.06v1.274c.245 0 .434 0 .623.005.328.004.577.13.61.494.032.332.031.669.064 1.006.065.669.101 1.347.217 2.007.102.544.475.95.941 1.283-.817.549-1.057 1.333-1.098 2.215-.023.604-.037 1.213-.069 1.822-.028.554-.222.734-.78.748-.157.004-.31.018-.484.028v1.305c.327 0 .627.019.927 0 .932-.055 1.495-.507 1.68-1.412.078-.498.124-1 .138-1.504.032-.461.028-.927.074-1.384.069-.715.397-1.01 1.112-1.057a.972.972 0 0 0 .199-.046v-1.463c-.12-.014-.204-.027-.291-.032-.536-.023-.804-.203-.937-.71a5.146 5.146 0 0 1-.152-.993c-.037-.618-.033-1.241-.074-1.86-.08-1.192-.794-1.753-1.887-1.786zm-6.89 5.28a.844.844 0 0 0-.083 1.684h.055a.83.83 0 0 0 .877-.78v-.046a.845.845 0 0 0-.83-.858zm2.911 0a.808.808 0 0 0-.834.78c0 .027 0 .05.004.078 0 .503.342.826.859.826.507 0 .826-.332.826-.853-.005-.503-.342-.836-.855-.831zm2.963 0a.861.861 0 0 0-.876.835c0 .47.378.849.849.849h.009c.425.074.853-.337.881-.83.023-.457-.392-.854-.863-.854z"})]})});function jt({isOpen:t,setOpen:a}){return e.jsx(rt,{open:t,onOpenChange:n=>a(n),children:e.jsxs(ct,{children:[e.jsxs(ut,{children:[e.jsx(pt,{children:"Editorial"}),e.jsx(xt,{children:"A simple CMS for static websites"})]}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx(O,{asChild:!0,variant:"ghost",children:e.jsxs(N,{to:new URL("/doc",K.EDITORIAL_API_URL).href,children:[e.jsx(mt,{size:14}),"Swagger API UI"]})}),e.jsx(O,{asChild:!0,variant:"ghost",children:e.jsxs(N,{to:"https://github.com/Lobelia-Earth/editorial",children:[e.jsx(bt,{size:14}),"GitHub repository"]})})]}),e.jsx(ht,{children:e.jsxs("p",{className:"flex items-center gap-1",children:["Created with",e.jsx(Ze,{size:14,className:"stroke-red-500 fill-red-500"})," by"," ",e.jsx(N,{to:"https://lobelia.earth",className:"underline hover:text-blue-500",children:"Lobelia.earth"})]})})]})})}var vt="Separator",$="horizontal",wt=["horizontal","vertical"],se=d.forwardRef((t,a)=>{const{decorative:n,orientation:s=$,...o}=t,i=yt(s)?s:$,u=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return e.jsx(k.div,{"data-orientation":i,...u,...o,ref:a})});se.displayName=vt;function yt(t){return wt.includes(t)}var Nt=se;function Ct({className:t,orientation:a="horizontal",decorative:n=!0,...s}){return e.jsx(Nt,{"data-slot":"separator-root",decorative:n,orientation:a,className:r("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...s})}function _t({...t}){return e.jsx(Q,{"data-slot":"sheet",...t})}function St({...t}){return e.jsx(ee,{"data-slot":"sheet-portal",...t})}function kt({className:t,...a}){return e.jsx(te,{"data-slot":"sheet-overlay",className:r("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/50",t),...a})}function Mt({className:t,children:a,side:n="right",...s}){return e.jsxs(St,{children:[e.jsx(kt,{}),e.jsxs(X,{"data-slot":"sheet-content",className:r("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",t),...s,children:[a,e.jsxs(Z,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[e.jsx(ae,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Et({className:t,...a}){return e.jsx("div",{"data-slot":"sheet-header",className:r("flex flex-col gap-1.5 p-4",t),...a})}function Ot({className:t,...a}){return e.jsx(Y,{"data-slot":"sheet-title",className:r("text-foreground font-semibold",t),...a})}function Rt({className:t,...a}){return e.jsx(J,{"data-slot":"sheet-description",className:r("text-muted-foreground text-sm",t),...a})}function ne({delayDuration:t=0,...a}){return e.jsx(ye,{"data-slot":"tooltip-provider",delayDuration:t,...a})}function At({...t}){return e.jsx(ne,{children:e.jsx(Ne,{"data-slot":"tooltip",...t})})}function zt({...t}){return e.jsx(Ce,{"data-slot":"tooltip-trigger",...t})}function Dt({className:t,sideOffset:a=0,children:n,...s}){return e.jsx(_e,{children:e.jsxs(Se,{"data-slot":"tooltip-content",sideOffset:a,className:r("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t),...s,children:[n,e.jsx(ke,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const M=768;function Pt(){const[t,a]=d.useState(void 0);return d.useEffect(()=>{const n=window.matchMedia(`(max-width: ${M-1}px)`),s=()=>{a(window.innerWidth<M)};return n.addEventListener("change",s),a(window.innerWidth<M),()=>n.removeEventListener("change",s)},[]),!!t}const It="sidebar_state",Tt=60*60*24*7,Lt="16rem",$t="18rem",Bt="3rem",Ht="b",oe=d.createContext(null);function A(){const t=d.useContext(oe);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function Gt({defaultOpen:t=!0,open:a,onOpenChange:n,className:s,style:o,children:i,...c}){const u=Pt(),[f,p]=d.useState(!1),[g,C]=d.useState(t),m=a??g,j=d.useCallback(h=>{const l=typeof h=="function"?h(m):h;n?n(l):C(l),document.cookie=`${It}=${l}; path=/; max-age=${Tt}`},[n,m]),v=d.useCallback(()=>u?p(h=>!h):j(h=>!h),[u,j,p]);d.useEffect(()=>{const h=l=>{l.key===Ht&&(l.metaKey||l.ctrlKey)&&(l.preventDefault(),v())};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[v]);const y=m?"expanded":"collapsed",_=d.useMemo(()=>({state:y,open:m,setOpen:j,isMobile:u,openMobile:f,setOpenMobile:p,toggleSidebar:v}),[y,m,j,u,f,p,v]);return e.jsx(oe.Provider,{value:_,children:e.jsx(ne,{delayDuration:0,children:e.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Lt,"--sidebar-width-icon":Bt,...o},className:r("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",s),...c,children:i})})})}function qt({side:t="left",variant:a="sidebar",collapsible:n="offcanvas",className:s,children:o,...i}){const{isMobile:c,state:u,openMobile:f,setOpenMobile:p}=A();return n==="none"?e.jsx("div",{"data-slot":"sidebar",className:r("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",s),...i,children:o}):c?e.jsx(_t,{open:f,onOpenChange:p,...i,children:e.jsxs(Mt,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":$t},side:t,children:[e.jsxs(Et,{className:"sr-only",children:[e.jsx(Ot,{children:"Sidebar"}),e.jsx(Rt,{children:"Displays the mobile sidebar."})]}),e.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):e.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":u,"data-collapsible":u==="collapsed"?n:"","data-variant":a,"data-side":t,"data-slot":"sidebar",children:[e.jsx("div",{"data-slot":"sidebar-gap",className:r("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",a==="floating"||a==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),e.jsx("div",{"data-slot":"sidebar-container",className:r("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",t==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",a==="floating"||a==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",s),...i,children:e.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:o})})]})}function Ft({className:t,onClick:a,...n}){const{toggleSidebar:s}=A();return e.jsxs(O,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:r("size-7",t),onClick:o=>{a==null||a(o),s()},...n,children:[e.jsx(tt,{}),e.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function Vt({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:r("flex flex-col gap-2 p-2",t),...a})}function Ut({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:r("flex flex-col gap-2 p-2",t),...a})}function Kt({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:r("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),...a})}function S({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:r("relative flex w-full min-w-0 flex-col p-2",t),...a})}function B({className:t,asChild:a=!1,...n}){const s=a?R:"div";return e.jsx(s,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:r("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",t),...n})}function H({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:r("w-full text-sm",t),...a})}function G({className:t,...a}){return e.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:r("flex w-full min-w-0 flex-col gap-1",t),...a})}function w({className:t,...a}){return e.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:r("group/menu-item relative",t),...a})}const Wt=Ee("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function b({asChild:t=!1,isActive:a=!1,variant:n="default",size:s="default",tooltip:o,className:i,...c}){const u=t?R:"button",{isMobile:f,state:p}=A(),g=e.jsx(u,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":s,"data-active":a,className:r(Wt({variant:n,size:s}),i),...c});return o?(typeof o=="string"&&(o={children:o}),e.jsxs(At,{children:[e.jsx(zt,{asChild:!0,children:g}),e.jsx(Dt,{side:"right",align:"center",hidden:p!=="collapsed"||f,...o})]})):g}function Qt({className:t,...a}){return e.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:r("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",t),...a})}function Xt({asChild:t=!1,size:a="md",isActive:n=!1,className:s,...o}){const i=t?R:"a";return e.jsx(i,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":a,"data-active":n,className:r("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",a==="sm"&&"text-xs",a==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",s),...o})}function q({singleton:t}){const{data:a}=W(),{data:n}=me();return a?e.jsx(e.Fragment,{children:Object.entries(a).filter(([,s])=>t?s.singleton:!s.singleton).map(([s,o])=>e.jsx(Qt,{children:e.jsx(ue,{to:t?`/admin/dashboard/${s}/default`:`/admin/dashboard/${s}`,className:({isActive:i,isPending:c})=>c?"pending":i?"active":"",children:({isActive:i})=>e.jsxs(Xt,{isActive:i,children:[e.jsx("span",{className:"inline-block overflow-hidden whitespace-nowrap text-ellipsis text-nowrap w-full",children:o.displayName}),!t&&n&&e.jsx("span",{className:"text-xs text-gray-500 ml-auto pr-1",children:Object.keys(n[s]).length})]})})},o.displayName))}):null}var z="Collapsible",[Zt,ba]=Ae(z),[Yt,D]=Zt(z),ie=d.forwardRef((t,a)=>{const{__scopeCollapsible:n,open:s,defaultOpen:o,disabled:i,onOpenChange:c,...u}=t,[f=!1,p]=Re({prop:s,defaultProp:o,onChange:c});return e.jsx(Yt,{scope:n,disabled:i,contentId:Me(),open:f,onOpenToggle:d.useCallback(()=>p(g=>!g),[p]),children:e.jsx(k.div,{"data-state":I(f),"data-disabled":i?"":void 0,...u,ref:a})})});ie.displayName=z;var re="CollapsibleTrigger",de=d.forwardRef((t,a)=>{const{__scopeCollapsible:n,...s}=t,o=D(re,n);return e.jsx(k.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":I(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...s,ref:a,onClick:ze(t.onClick,o.onOpenToggle)})});de.displayName=re;var P="CollapsibleContent",le=d.forwardRef((t,a)=>{const{forceMount:n,...s}=t,o=D(P,t.__scopeCollapsible);return e.jsx(De,{present:n||o.open,children:({present:i})=>e.jsx(Jt,{...s,ref:a,present:i})})});le.displayName=P;var Jt=d.forwardRef((t,a)=>{const{__scopeCollapsible:n,present:s,children:o,...i}=t,c=D(P,n),[u,f]=d.useState(s),p=d.useRef(null),g=Oe(a,p),C=d.useRef(0),m=C.current,j=d.useRef(0),v=j.current,y=c.open||u,_=d.useRef(y),h=d.useRef(void 0);return d.useEffect(()=>{const l=requestAnimationFrame(()=>_.current=!1);return()=>cancelAnimationFrame(l)},[]),Pe(()=>{const l=p.current;if(l){h.current=h.current||{transitionDuration:l.style.transitionDuration,animationName:l.style.animationName},l.style.transitionDuration="0s",l.style.animationName="none";const T=l.getBoundingClientRect();C.current=T.height,j.current=T.width,_.current||(l.style.transitionDuration=h.current.transitionDuration,l.style.animationName=h.current.animationName),f(s)}},[c.open,s]),e.jsx(k.div,{"data-state":I(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!y,...i,ref:g,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...t.style},children:y&&o})});function I(t){return t?"open":"closed"}var ea=ie;function F({...t}){return e.jsx(ea,{"data-slot":"collapsible",...t})}function V({...t}){return e.jsx(de,{"data-slot":"collapsible-trigger",...t})}function U({...t}){return e.jsx(le,{"data-slot":"collapsible-content",...t})}function ta(){const t=be(),[a,n]=d.useState(!1),[s]=je(),[o]=ve(),[i]=we(),c=E(u=>u.auth.role);return e.jsxs(qt,{className:"z-50",children:[e.jsx(jt,{isOpen:a,setOpen:n}),e.jsx(Vt,{className:"h-14 justify-center",children:e.jsx(S,{children:e.jsx(N,{to:"/admin/dashboard",className:"text-3xl font-semibold tracking-tight transition-colors",children:"WEkEO"})})}),e.jsxs(Kt,{children:[e.jsxs(S,{children:[e.jsx(B,{children:"Content"}),e.jsx(H,{children:e.jsxs(G,{children:[e.jsx(F,{className:"group/collapsible",children:e.jsxs(w,{children:[e.jsx(V,{asChild:!0,children:e.jsxs(b,{className:"group",children:[e.jsx(Qe,{}),e.jsx("span",{children:"Collections"}),e.jsx(L,{className:"transition-transform ml-auto -mr-[2px] group-data-[state=open]:rotate-180"})]})}),e.jsx(U,{children:e.jsx(q,{})})]})}),e.jsx(F,{className:"group/collapsible",children:e.jsxs(w,{children:[e.jsx(V,{asChild:!0,children:e.jsxs(b,{className:"group",children:[e.jsx(st,{}),e.jsx("span",{children:"Singles"}),e.jsx(L,{className:"transition-transform ml-auto -mr-[2px] group-data-[state=open]:rotate-180"})]})}),e.jsx(U,{children:e.jsx(q,{singleton:!0})})]})}),e.jsx(w,{children:e.jsx(b,{asChild:!0,children:e.jsxs(N,{to:"/admin/dashboard/files",children:[e.jsx(Ke,{}),e.jsx("span",{children:"Files"})]})})}),e.jsx(w,{children:e.jsxs(b,{disabled:!0,children:[e.jsx(He,{}),e.jsx("span",{children:"Components"})]})})]})})]}),e.jsxs(S,{children:[e.jsx(B,{children:"Actions"}),e.jsx(H,{children:e.jsxs(G,{children:[c==="developer"&&e.jsxs(e.Fragment,{children:[e.jsx(w,{children:e.jsxs(b,{onClick:()=>o(),children:[e.jsx(Te,{}),e.jsx("span",{children:"Pull from repo"})]})}),e.jsx(w,{children:e.jsxs(b,{onClick:()=>i(),children:[e.jsx($e,{}),e.jsx("span",{children:"Push to repo"})]})})]}),e.jsx(w,{children:e.jsxs(b,{onClick:()=>s(),children:[e.jsx(ot,{}),e.jsx("span",{children:"Publish"})]})})]})})]}),e.jsx(S,{})]}),e.jsxs(Ut,{children:[e.jsx(b,{asChild:!0,children:e.jsxs(N,{to:K.PREVIEW_URL,children:["Preview",e.jsx(Ve,{className:"ml-auto"})]})}),e.jsx(b,{onClick:()=>n(!0),children:"About"}),e.jsxs(b,{onClick:()=>t(ge()),children:[e.jsx(Je,{}),"Log out"]})]})]})}function aa({children:t}){const a=he(),n=E(o=>o.auth.user),s=E(o=>o.auth.isLoading);return d.useEffect(()=>{!s&&!n&&a("/")},[s,a,n]),s||!n?null:t}function sa(){const{pathname:t}=pe(),{data:a}=W(),n=t.split("/").filter(s=>!["admin","dashboard"].includes(s)&&s!=="");return a?e.jsx(e.Fragment,{children:n.map((s,o,i)=>e.jsxs(xe.Fragment,{children:[i.length>1&&o>=1&&e.jsx(qe,{size:12,className:"text-gray-500 pt-[1px]"}),e.jsx("p",{className:"text-sm leading-none tracking-tight capitalize text-gray-500 last:text-foreground",children:a[s]?a[s].displayName:s},s)]},o))}):null}const ga=ce(function(){return e.jsx(aa,{children:e.jsxs(Gt,{className:"flex h-full",children:[e.jsx(ta,{}),e.jsxs("main",{className:"flex flex-col flex-1 h-full w-0",children:[e.jsx("header",{className:"flex sticky bg-sidebar dark:bg-sidebar z-40 top-0 h-14 shrink-0 items-center gap-2 border-b",children:e.jsxs("div",{className:"flex items-center gap-2 px-3",children:[e.jsx(Ft,{}),e.jsx(Ct,{orientation:"vertical",className:"h-4"}),e.jsx(sa,{})]})}),e.jsx(fe,{})]})]})})});export{ga as default};
@@ -1,36 +0,0 @@
1
- import{w as y}from"./react-redux-kbMjYGuQ.js";import{n as e,a as j,t as g}from"./chunk-KNED5TY2-DAA_sFzt.js";import{C as u,c as v}from"./chevron-down-8tTu7uK2.js";import{m as N,n as w}from"./editorialApi-fQchmMa9.js";import{c as k,f as b}from"./utils-DslUJpbf.js";import{c}from"./createLucideIcon-R2-3a7hN.js";import{T as r}from"./trash-wq_ppIxP.js";/**
2
- * @license lucide-react v0.487.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const z=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],n=c("copy",z);/**
7
- * @license lucide-react v0.487.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const _=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],F=c("ellipsis",_);/**
12
- * @license lucide-react v0.487.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const M=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]],H=c("file-image",M);/**
17
- * @license lucide-react v0.487.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */const I=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],L=c("file-text",I);/**
22
- * @license lucide-react v0.487.0 - ISC
23
- *
24
- * This source code is licensed under the ISC license.
25
- * See the LICENSE file in the root directory of this source tree.
26
- */const C=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],T=c("file",C);/**
27
- * @license lucide-react v0.487.0 - ISC
28
- *
29
- * This source code is licensed under the ISC license.
30
- * See the LICENSE file in the root directory of this source tree.
31
- */const $=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],E=c("folder-open",$);/**
32
- * @license lucide-react v0.487.0 - ISC
33
- *
34
- * This source code is licensed under the ISC license.
35
- * See the LICENSE file in the root directory of this source tree.
36
- */const D=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],q=c("folder",D),S=["txt","md","html","pdf"],V=["svg","webp","png","jpeg","jpg"],P=[{Icon:H,test:s=>V.some(i=>s.name.endsWith(i))},{Icon:L,test:s=>S.some(i=>s.name.endsWith(i))}],R={Icon:T},d=({node:s,level:i=0,onDelete:o})=>{const[a,p]=j.useState(!1),m=P.find(t=>t.test(s))??R,l=s.type==="directory",x=l?"div":g,h=()=>{l&&p(!a)};return e.jsxs("div",{className:"select-none",children:[e.jsxs(x,{to:new URL(s.path,v.EDITORIAL_API_URL),target:"_blank",className:"flex items-center gap-2 h-10 p-2 group hover:bg-muted/50 cursor-pointer",style:{paddingLeft:`calc(0.5rem + ${i*20}px)`},onClick:h,children:[l?e.jsx(u,{size:16,className:k("transition-transform",{"rotate-180":a})}):e.jsx("div",{className:"w-4"}),e.jsxs("div",{className:"flex flex-grow w-24 items-center gap-2 ml-2",children:[l?a?e.jsx(E,{size:16,className:"text-yellow-500"}):e.jsx(q,{size:16,className:"text-yellow-500"}):e.jsx(m.Icon,{size:16,className:" text-gray-500"}),e.jsx("span",{className:"text-sm whitespace-nowrap text-ellipsis overflow-hidden w-full",children:s.name})]}),e.jsx("div",{className:"flex w-24 justify-end gap-2",children:e.jsx("span",{className:"text-sm text-gray-500",children:l?"--":b(s.size)})}),e.jsxs("div",{className:"flex items-center gap-1 ml-4 group-hover:visible invisible z-20",children:[l?e.jsx(n,{className:"invisible",size:16}):e.jsxs("button",{className:"hover:text-yellow-500 p-1 hover:bg-muted rounded-sm",onClick:t=>{t.preventDefault(),t.stopPropagation(),navigator.clipboard.writeText(s.path)},children:[e.jsx(n,{size:16}),e.jsx("span",{className:"sr-only",children:"Copy file URL"})]}),e.jsxs("button",{className:"hover:text-red-500 p-1 hover:bg-muted rounded-sm",onClick:t=>{t.preventDefault(),t.stopPropagation(),o(s.path)},children:[e.jsx(r,{size:16}),e.jsx("span",{className:"sr-only",children:"Delete this file"})]})]})]}),l&&a&&s.children&&e.jsx("div",{children:s.children.map((t,f)=>e.jsx(d,{node:t,level:i+1,onDelete:o},`${t.name}-${f}`))})]})};function A(){const{data:s,isLoading:i}=N(),[o]=w();return!s||i?null:s.toSorted(a=>a.type==="directory"?-1:1).map(a=>e.jsx(d,{node:a,onDelete:o},a.name))}const J=y(function(){return e.jsx("div",{className:"overflow-auto flex flex-1 p-4 gap-4",children:e.jsx("div",{className:"flex flex-col flex-1 gap-8",children:e.jsxs("div",{className:"overflow-auto h-full max-w-[800px] rounded-xl border",children:[e.jsxs("div",{className:"sticky top-0 bg-white flex items-center gap-2 py-1 px-2 border-b group",children:[e.jsx("div",{className:"w-4"}),e.jsx("div",{className:"flex flex-grow items-center gap-2 ml-2",children:e.jsx("span",{className:"text-sm font-semibold",children:"Name"})}),e.jsx("div",{className:"flex w-24 items-center gap-2 ml-2",children:e.jsx("span",{className:"text-sm font-semibold",children:"Size"})}),e.jsxs("div",{className:"flex items-center gap-1 invisible",children:[e.jsx(n,{size:14}),e.jsx(r,{size:14}),e.jsx(F,{size:14})]})]}),e.jsx(A,{})]})})})});export{J as default};
@@ -1,36 +0,0 @@
1
- import{w as en}from"./react-redux-kbMjYGuQ.js";import{a as ie,n as h,q as nn}from"./chunk-KNED5TY2-DAA_sFzt.js";import{B as tn}from"./button-Da66T3Bb.js";import{g as Q,s as q,a as rn,u as on,F as sn,b as G,c as X,d as fe,e as Y,I as me,f as H,C as cn}from"./input-BmmdOdbj.js";import{c as un}from"./utils-DslUJpbf.js";import{c as Te}from"./createLucideIcon-R2-3a7hN.js";import{u as an,d as ee,l as ln}from"./authSlice-B3Tyl-Nw.js";import"./index-BvKqmqc2.js";import"./index-C-vcF2DZ.js";import"./tslib.es6-CDuPK5Eb.js";/**
2
- * @license lucide-react v0.487.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const dn=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],pn=Te("loader-circle",dn);/**
7
- * @license lucide-react v0.487.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const hn=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],fn=Te("loader",hn),Re=ie.forwardRef(({className:e,...n},t)=>h.jsx(pn,{ref:t,className:un(e,"animate-spin"),...n}));Re.displayName=fn.displayName;const _e=(e,n,t)=>{if(e&&"reportValidity"in e){const r=Q(t,n);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},Ce=(e,n)=>{for(const t in n.fields){const r=n.fields[t];r&&r.ref&&"reportValidity"in r.ref?_e(r.ref,t,e):r.refs&&r.refs.forEach(o=>_e(o,t,e))}},mn=(e,n)=>{n.shouldUseNativeValidation&&Ce(e,n);const t={};for(const r in e){const o=Q(n.fields,r),i=Object.assign(e[r]||{},{ref:o&&o.ref});if(_n(n.names||Object.keys(e),r)){const s=Object.assign({},Q(t,r));q(s,"root",i),q(t,r,s)}else q(t,r,i)}return t},_n=(e,n)=>e.some(t=>t.startsWith(n+"."));var gn=function(e,n){for(var t={};e.length;){var r=e[0],o=r.code,i=r.message,s=r.path.join(".");if(!t[s])if("unionErrors"in r){var u=r.unionErrors[0].errors[0];t[s]={message:u.message,type:u.code}}else t[s]={message:i,type:o};if("unionErrors"in r&&r.unionErrors.forEach(function(w){return w.errors.forEach(function(p){return e.push(p)})}),n){var a=t[s].types,d=a&&a[r.code];t[s]=rn(s,n,t,o,d?[].concat(d,r.message):r.message)}e.shift()}return t},vn=function(e,n,t){return t===void 0&&(t={}),function(r,o,i){try{return Promise.resolve(function(s,u){try{var a=Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](r,n)).then(function(d){return i.shouldUseNativeValidation&&Ce({},i),{errors:{},values:t.raw?r:d}})}catch(d){return u(d)}return a&&a.then?a.then(void 0,u):a}(0,function(s){if(function(u){return Array.isArray(u==null?void 0:u.errors)}(s))return{values:{},errors:mn(gn(s.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw s}))}catch(s){return Promise.reject(s)}}};function c(e,n,t){function r(u,a){var d;Object.defineProperty(u,"_zod",{value:u._zod??{},enumerable:!1}),(d=u._zod).traits??(d.traits=new Set),u._zod.traits.add(e),n(u,a);for(const w in s.prototype)w in u||Object.defineProperty(u,w,{value:s.prototype[w].bind(u)});u._zod.constr=s,u._zod.def=a}const o=(t==null?void 0:t.Parent)??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function s(u){var a;const d=t!=null&&t.Parent?new i:this;r(d,u),(a=d._zod).deferred??(a.deferred=[]);for(const w of d._zod.deferred)w();return d}return Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:u=>{var a,d;return t!=null&&t.Parent&&u instanceof t.Parent?!0:(d=(a=u==null?void 0:u._zod)==null?void 0:a.traits)==null?void 0:d.has(e)}}),Object.defineProperty(s,"name",{value:e}),s}class T extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const De={};function E(e){return De}function zn(e){const n=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>n.indexOf(+r)===-1).map(([r,o])=>o)}function wn(e,n){return typeof n=="bigint"?n.toString():n}function Ue(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function se(e){return e==null}function ce(e){const n=e.startsWith("^")?1:0,t=e.endsWith("$")?e.length-1:e.length;return e.slice(n,t)}function _(e,n,t){Object.defineProperty(e,n,{get(){{const r=t();return e[n]=r,r}},set(r){Object.defineProperty(e,n,{value:r})},configurable:!0})}function ue(e,n,t){Object.defineProperty(e,n,{value:t,writable:!0,enumerable:!0,configurable:!0})}function S(e){return JSON.stringify(e)}const Ne=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function ne(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Zn=Ue(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const n=Function;return new n(""),!0}catch{return!1}});function te(e){if(ne(e)===!1)return!1;const n=e.constructor;if(n===void 0)return!0;const t=n.prototype;return!(ne(t)===!1||Object.prototype.hasOwnProperty.call(t,"isPrototypeOf")===!1)}const $n=new Set(["string","number","symbol"]);function W(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function I(e,n,t){const r=new e._zod.constr(n??e._zod.def);return(!n||t!=null&&t.parent)&&(r._zod.parent=e),r}function l(e){const n=e;if(!n)return{};if(typeof n=="string")return{error:()=>n};if((n==null?void 0:n.message)!==void 0){if((n==null?void 0:n.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");n.error=n.message}return delete n.message,typeof n.error=="string"?{...n,error:()=>n.error}:n}function kn(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}function bn(e,n){const t={},r=e._zod.def;for(const o in n){if(!(o in r.shape))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(t[o]=r.shape[o])}return I(e,{...e._zod.def,shape:t,checks:[]})}function yn(e,n){const t={...e._zod.def.shape},r=e._zod.def;for(const o in n){if(!(o in r.shape))throw new Error(`Unrecognized key: "${o}"`);n[o]&&delete t[o]}return I(e,{...e._zod.def,shape:t,checks:[]})}function jn(e,n){if(!te(n))throw new Error("Invalid input to extend: expected a plain object");const t={...e._zod.def,get shape(){const r={...e._zod.def.shape,...n};return ue(this,"shape",r),r},checks:[]};return I(e,t)}function xn(e,n){return I(e,{...e._zod.def,get shape(){const t={...e._zod.def.shape,...n._zod.def.shape};return ue(this,"shape",t),t},catchall:n._zod.def.catchall,checks:[]})}function En(e,n,t){const r=n._zod.def.shape,o={...r};if(t)for(const i in t){if(!(i in r))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(o[i]=e?new e({type:"optional",innerType:r[i]}):r[i])}else for(const i in r)o[i]=e?new e({type:"optional",innerType:r[i]}):r[i];return I(n,{...n._zod.def,shape:o,checks:[]})}function Pn(e,n,t){const r=n._zod.def.shape,o={...r};if(t)for(const i in t){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(o[i]=new e({type:"nonoptional",innerType:r[i]}))}else for(const i in r)o[i]=new e({type:"nonoptional",innerType:r[i]});return I(n,{...n._zod.def,shape:o,checks:[]})}function A(e,n=0){var t;for(let r=n;r<e.issues.length;r++)if(((t=e.issues[r])==null?void 0:t.continue)!==!0)return!0;return!1}function ae(e,n){return n.map(t=>{var r;return(r=t).path??(r.path=[]),t.path.unshift(e),t})}function N(e){return typeof e=="string"?e:e==null?void 0:e.message}function P(e,n,t){var o,i,s,u,a,d;const r={...e,path:e.path??[]};if(!e.message){const w=N((s=(i=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:i.error)==null?void 0:s.call(i,e))??N((u=n==null?void 0:n.error)==null?void 0:u.call(n,e))??N((a=t.customError)==null?void 0:a.call(t,e))??N((d=t.localeError)==null?void 0:d.call(t,e))??"Invalid input";r.message=w}return delete r.inst,delete r.continue,n!=null&&n.reportInput||delete r.input,r}function le(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function R(...e){const[n,t,r]=e;return typeof n=="string"?{message:n,code:"custom",input:t,inst:r}:{...n}}const Le=(e,n)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:n,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(n,wn,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Fe=c("$ZodError",Le),Ve=c("$ZodError",Le,{Parent:Error});function In(e,n=t=>t.message){const t={},r=[];for(const o of e.issues)o.path.length>0?(t[o.path[0]]=t[o.path[0]]||[],t[o.path[0]].push(n(o))):r.push(n(o));return{formErrors:r,fieldErrors:t}}function On(e,n){const t=n||function(i){return i.message},r={_errors:[]},o=i=>{for(const s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(u=>o({issues:u}));else if(s.code==="invalid_key")o({issues:s.issues});else if(s.code==="invalid_element")o({issues:s.issues});else if(s.path.length===0)r._errors.push(t(s));else{let u=r,a=0;for(;a<s.path.length;){const d=s.path[a];a===s.path.length-1?(u[d]=u[d]||{_errors:[]},u[d]._errors.push(t(s))):u[d]=u[d]||{_errors:[]},u=u[d],a++}}};return o(e),r}const Sn=e=>(n,t,r,o)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},s=n._zod.run({value:t,issues:[]},i);if(s instanceof Promise)throw new T;if(s.issues.length){const u=new((o==null?void 0:o.Err)??e)(s.issues.map(a=>P(a,i,E())));throw Ne(u,o==null?void 0:o.callee),u}return s.value},An=e=>async(n,t,r,o)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let s=n._zod.run({value:t,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){const u=new((o==null?void 0:o.Err)??e)(s.issues.map(a=>P(a,i,E())));throw Ne(u,o==null?void 0:o.callee),u}return s.value},Me=e=>(n,t,r)=>{const o=r?{...r,async:!1}:{async:!1},i=n._zod.run({value:t,issues:[]},o);if(i instanceof Promise)throw new T;return i.issues.length?{success:!1,error:new(e??Fe)(i.issues.map(s=>P(s,o,E())))}:{success:!0,data:i.value}},Tn=Me(Ve),We=e=>async(n,t,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let i=n._zod.run({value:t,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>P(s,o,E())))}:{success:!0,data:i.value}},Rn=We(Ve),Cn=/^[cC][^\s-]{8,}$/,Dn=/^[0-9a-z]+$/,Un=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Nn=/^[0-9a-vA-V]{20}$/,Ln=/^[A-Za-z0-9]{27}$/,Fn=/^[a-zA-Z0-9_-]{21}$/,Vn=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Mn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ge=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,Wn=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Bn="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Kn(){return new RegExp(Bn,"u")}const Jn=/^(?:(?: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])$/,qn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,Gn=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,Xn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Yn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Be=/^[A-Za-z0-9_-]*$/,Hn=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,Qn=/^\+(?:[0-9]){6,14}[0-9]$/,Ke="(?:(?:\\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])))",et=new RegExp(`^${Ke}$`);function Je(e){const n="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${n}`:e.precision===0?`${n}:[0-5]\\d`:`${n}:[0-5]\\d\\.\\d{${e.precision}}`:`${n}(?::[0-5]\\d(?:\\.\\d+)?)?`}function nt(e){return new RegExp(`^${Je(e)}$`)}function tt(e){const n=Je({precision:e.precision}),t=["Z"];e.local&&t.push(""),e.offset&&t.push("([+-]\\d{2}:\\d{2})");const r=`${n}(?:${t.join("|")})`;return new RegExp(`^${Ke}T(?:${r})$`)}const rt=e=>{const n=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},ot=/true|false/i,it=/^[^A-Z]*$/,st=/^[^a-z]*$/,j=c("$ZodCheck",(e,n)=>{var t;e._zod??(e._zod={}),e._zod.def=n,(t=e._zod).onattach??(t.onattach=[])}),ct=c("$ZodCheckMaxLength",(e,n)=>{var t;j.init(e,n),(t=e._zod.def).when??(t.when=r=>{const o=r.value;return!se(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<o&&(r._zod.bag.maximum=n.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=n.maximum)return;const s=le(o);r.issues.push({origin:s,code:"too_big",maximum:n.maximum,inclusive:!0,input:o,inst:e,continue:!n.abort})}}),ut=c("$ZodCheckMinLength",(e,n)=>{var t;j.init(e,n),(t=e._zod.def).when??(t.when=r=>{const o=r.value;return!se(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>o&&(r._zod.bag.minimum=n.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=n.minimum)return;const s=le(o);r.issues.push({origin:s,code:"too_small",minimum:n.minimum,inclusive:!0,input:o,inst:e,continue:!n.abort})}}),at=c("$ZodCheckLengthEquals",(e,n)=>{var t;j.init(e,n),(t=e._zod.def).when??(t.when=r=>{const o=r.value;return!se(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=n.length,o.maximum=n.length,o.length=n.length}),e._zod.check=r=>{const o=r.value,i=o.length;if(i===n.length)return;const s=le(o),u=i>n.length;r.issues.push({origin:s,...u?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!n.abort})}}),B=c("$ZodCheckStringFormat",(e,n)=>{var t,r;j.init(e,n),e._zod.onattach.push(o=>{const i=o._zod.bag;i.format=n.format,n.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(n.pattern))}),n.pattern?(t=e._zod).check??(t.check=o=>{n.pattern.lastIndex=0,!n.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:n.format,input:o.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:e,continue:!n.abort})}):(r=e._zod).check??(r.check=()=>{})}),lt=c("$ZodCheckRegex",(e,n)=>{B.init(e,n),e._zod.check=t=>{n.pattern.lastIndex=0,!n.pattern.test(t.value)&&t.issues.push({origin:"string",code:"invalid_format",format:"regex",input:t.value,pattern:n.pattern.toString(),inst:e,continue:!n.abort})}}),dt=c("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=it),B.init(e,n)}),pt=c("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=st),B.init(e,n)}),ht=c("$ZodCheckIncludes",(e,n)=>{j.init(e,n);const t=W(n.includes),r=new RegExp(typeof n.position=="number"?`^.{${n.position}}${t}`:t);n.pattern=r,e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=o=>{o.value.includes(n.includes,n.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input:o.value,inst:e,continue:!n.abort})}}),ft=c("$ZodCheckStartsWith",(e,n)=>{j.init(e,n);const t=new RegExp(`^${W(n.prefix)}.*`);n.pattern??(n.pattern=t),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(t)}),e._zod.check=r=>{r.value.startsWith(n.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:r.value,inst:e,continue:!n.abort})}}),mt=c("$ZodCheckEndsWith",(e,n)=>{j.init(e,n);const t=new RegExp(`.*${W(n.suffix)}$`);n.pattern??(n.pattern=t),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(t)}),e._zod.check=r=>{r.value.endsWith(n.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:r.value,inst:e,continue:!n.abort})}}),_t=c("$ZodCheckOverwrite",(e,n)=>{j.init(e,n),e._zod.check=t=>{t.value=n.tx(t.value)}});class gt{constructor(n=[]){this.content=[],this.indent=0,this&&(this.args=n)}indented(n){this.indent+=1,n(this),this.indent-=1}write(n){if(typeof n=="function"){n(this,{execution:"sync"}),n(this,{execution:"async"});return}const r=n.split(`
12
- `).filter(s=>s),o=Math.min(...r.map(s=>s.length-s.trimStart().length)),i=r.map(s=>s.slice(o)).map(s=>" ".repeat(this.indent*2)+s);for(const s of i)this.content.push(s)}compile(){const n=Function,t=this==null?void 0:this.args,o=[...((this==null?void 0:this.content)??[""]).map(i=>` ${i}`)];return new n(...t,o.join(`
13
- `))}}const vt={major:4,minor:0,patch:2},Z=c("$ZodType",(e,n)=>{var o;var t;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=vt;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const i of r)for(const s of i._zod.onattach)s(e);if(r.length===0)(t=e._zod).deferred??(t.deferred=[]),(o=e._zod.deferred)==null||o.push(()=>{e._zod.run=e._zod.parse});else{const i=(s,u,a)=>{let d=A(s),w;for(const p of u){if(p._zod.def.when){if(!p._zod.def.when(s))continue}else if(d)continue;const f=s.issues.length,m=p._zod.check(s);if(m instanceof Promise&&(a==null?void 0:a.async)===!1)throw new T;if(w||m instanceof Promise)w=(w??Promise.resolve()).then(async()=>{await m,s.issues.length!==f&&(d||(d=A(s,f)))});else{if(s.issues.length===f)continue;d||(d=A(s,f))}}return w?w.then(()=>s):s};e._zod.run=(s,u)=>{const a=e._zod.parse(s,u);if(a instanceof Promise){if(u.async===!1)throw new T;return a.then(d=>i(d,r,u))}return i(a,r,u)}}e["~standard"]={validate:i=>{var s;try{const u=Tn(e,i);return u.success?{value:u.data}:{issues:(s=u.error)==null?void 0:s.issues}}catch{return Rn(e,i).then(a=>{var d;return a.success?{value:a.data}:{issues:(d=a.error)==null?void 0:d.issues}})}},vendor:"zod",version:1}}),de=c("$ZodString",(e,n)=>{var t;Z.init(e,n),e._zod.pattern=[...((t=e==null?void 0:e._zod.bag)==null?void 0:t.patterns)??[]].pop()??rt(e._zod.bag),e._zod.parse=(r,o)=>{if(n.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),g=c("$ZodStringFormat",(e,n)=>{B.init(e,n),de.init(e,n)}),zt=c("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=Mn),g.init(e,n)}),wt=c("$ZodUUID",(e,n)=>{if(n.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[n.version];if(r===void 0)throw new Error(`Invalid UUID version: "${n.version}"`);n.pattern??(n.pattern=ge(r))}else n.pattern??(n.pattern=ge());g.init(e,n)}),Zt=c("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=Wn),g.init(e,n)}),$t=c("$ZodURL",(e,n)=>{g.init(e,n),e._zod.check=t=>{try{const r=t.value,o=new URL(r),i=o.href;n.hostname&&(n.hostname.lastIndex=0,n.hostname.test(o.hostname)||t.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Hn.source,input:t.value,inst:e,continue:!n.abort})),n.protocol&&(n.protocol.lastIndex=0,n.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||t.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:n.protocol.source,input:t.value,inst:e,continue:!n.abort})),!r.endsWith("/")&&i.endsWith("/")?t.value=i.slice(0,-1):t.value=i;return}catch{t.issues.push({code:"invalid_format",format:"url",input:t.value,inst:e,continue:!n.abort})}}}),kt=c("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=Kn()),g.init(e,n)}),bt=c("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=Fn),g.init(e,n)}),yt=c("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=Cn),g.init(e,n)}),jt=c("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=Dn),g.init(e,n)}),xt=c("$ZodULID",(e,n)=>{n.pattern??(n.pattern=Un),g.init(e,n)}),Et=c("$ZodXID",(e,n)=>{n.pattern??(n.pattern=Nn),g.init(e,n)}),Pt=c("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=Ln),g.init(e,n)}),It=c("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=tt(n)),g.init(e,n)}),Ot=c("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=et),g.init(e,n)}),St=c("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=nt(n)),g.init(e,n)}),At=c("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=Vn),g.init(e,n)}),Tt=c("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=Jn),g.init(e,n),e._zod.onattach.push(t=>{const r=t._zod.bag;r.format="ipv4"})}),Rt=c("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=qn),g.init(e,n),e._zod.onattach.push(t=>{const r=t._zod.bag;r.format="ipv6"}),e._zod.check=t=>{try{new URL(`http://[${t.value}]`)}catch{t.issues.push({code:"invalid_format",format:"ipv6",input:t.value,inst:e,continue:!n.abort})}}}),Ct=c("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=Gn),g.init(e,n)}),Dt=c("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=Xn),g.init(e,n),e._zod.check=t=>{const[r,o]=t.value.split("/");try{if(!o)throw new Error;const i=Number(o);if(`${i}`!==o)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${r}]`)}catch{t.issues.push({code:"invalid_format",format:"cidrv6",input:t.value,inst:e,continue:!n.abort})}}});function qe(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Ut=c("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=Yn),g.init(e,n),e._zod.onattach.push(t=>{t._zod.bag.contentEncoding="base64"}),e._zod.check=t=>{qe(t.value)||t.issues.push({code:"invalid_format",format:"base64",input:t.value,inst:e,continue:!n.abort})}});function Nt(e){if(!Be.test(e))return!1;const n=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),t=n.padEnd(Math.ceil(n.length/4)*4,"=");return qe(t)}const Lt=c("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=Be),g.init(e,n),e._zod.onattach.push(t=>{t._zod.bag.contentEncoding="base64url"}),e._zod.check=t=>{Nt(t.value)||t.issues.push({code:"invalid_format",format:"base64url",input:t.value,inst:e,continue:!n.abort})}}),Ft=c("$ZodE164",(e,n)=>{n.pattern??(n.pattern=Qn),g.init(e,n)});function Vt(e,n=null){try{const t=e.split(".");if(t.length!==3)return!1;const[r]=t;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||n&&(!("alg"in o)||o.alg!==n))}catch{return!1}}const Mt=c("$ZodJWT",(e,n)=>{g.init(e,n),e._zod.check=t=>{Vt(t.value,n.alg)||t.issues.push({code:"invalid_format",format:"jwt",input:t.value,inst:e,continue:!n.abort})}}),Wt=c("$ZodBoolean",(e,n)=>{Z.init(e,n),e._zod.pattern=ot,e._zod.parse=(t,r)=>{if(n.coerce)try{t.value=!!t.value}catch{}const o=t.value;return typeof o=="boolean"||t.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),t}}),Bt=c("$ZodUnknown",(e,n)=>{Z.init(e,n),e._zod.parse=t=>t}),Kt=c("$ZodNever",(e,n)=>{Z.init(e,n),e._zod.parse=(t,r)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function ve(e,n,t){e.issues.length&&n.issues.push(...ae(t,e.issues)),n.value[t]=e.value}const Jt=c("$ZodArray",(e,n)=>{Z.init(e,n),e._zod.parse=(t,r)=>{const o=t.value;if(!Array.isArray(o))return t.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),t;t.value=Array(o.length);const i=[];for(let s=0;s<o.length;s++){const u=o[s],a=n.element._zod.run({value:u,issues:[]},r);a instanceof Promise?i.push(a.then(d=>ve(d,t,s))):ve(a,t,s)}return i.length?Promise.all(i).then(()=>t):t}});function L(e,n,t){e.issues.length&&n.issues.push(...ae(t,e.issues)),n.value[t]=e.value}function ze(e,n,t,r){e.issues.length?r[t]===void 0?t in r?n.value[t]=void 0:n.value[t]=e.value:n.issues.push(...ae(t,e.issues)):e.value===void 0?t in r&&(n.value[t]=void 0):n.value[t]=e.value}const qt=c("$ZodObject",(e,n)=>{Z.init(e,n);const t=Ue(()=>{const p=Object.keys(n.shape);for(const m of p)if(!(n.shape[m]instanceof Z))throw new Error(`Invalid element at key "${m}": expected a Zod schema`);const f=kn(n.shape);return{shape:n.shape,keys:p,keySet:new Set(p),numKeys:p.length,optionalKeys:new Set(f)}});_(e._zod,"propValues",()=>{const p=n.shape,f={};for(const m in p){const y=p[m]._zod;if(y.values){f[m]??(f[m]=new Set);for(const x of y.values)f[m].add(x)}}return f});const r=p=>{const f=new gt(["shape","payload","ctx"]),m=t.value,y=b=>{const v=S(b);return`shape[${v}]._zod.run({ value: input[${v}], issues: [] }, ctx)`};f.write("const input = payload.value;");const x=Object.create(null);let J=0;for(const b of m.keys)x[b]=`key_${J++}`;f.write("const newResult = {}");for(const b of m.keys)if(m.optionalKeys.has(b)){const v=x[b];f.write(`const ${v} = ${y(b)};`);const $=S(b);f.write(`
14
- if (${v}.issues.length) {
15
- if (input[${$}] === undefined) {
16
- if (${$} in input) {
17
- newResult[${$}] = undefined;
18
- }
19
- } else {
20
- payload.issues = payload.issues.concat(
21
- ${v}.issues.map((iss) => ({
22
- ...iss,
23
- path: iss.path ? [${$}, ...iss.path] : [${$}],
24
- }))
25
- );
26
- }
27
- } else if (${v}.value === undefined) {
28
- if (${$} in input) newResult[${$}] = undefined;
29
- } else {
30
- newResult[${$}] = ${v}.value;
31
- }
32
- `)}else{const v=x[b];f.write(`const ${v} = ${y(b)};`),f.write(`
33
- if (${v}.issues.length) payload.issues = payload.issues.concat(${v}.issues.map(iss => ({
34
- ...iss,
35
- path: iss.path ? [${S(b)}, ...iss.path] : [${S(b)}]
36
- })));`),f.write(`newResult[${S(b)}] = ${v}.value`)}f.write("payload.value = newResult;"),f.write("return payload;");const D=f.compile();return(b,v)=>D(p,b,v)};let o;const i=ne,s=!De.jitless,a=s&&Zn.value,d=n.catchall;let w;e._zod.parse=(p,f)=>{w??(w=t.value);const m=p.value;if(!i(m))return p.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),p;const y=[];if(s&&a&&(f==null?void 0:f.async)===!1&&f.jitless!==!0)o||(o=r(n.shape)),p=o(p,f);else{p.value={};const v=w.shape;for(const $ of w.keys){const O=v[$],U=O._zod.run({value:m[$],issues:[]},f),pe=O._zod.optin==="optional"&&O._zod.optout==="optional";U instanceof Promise?y.push(U.then(he=>pe?ze(he,p,$,m):L(he,p,$))):pe?ze(U,p,$,m):L(U,p,$)}}if(!d)return y.length?Promise.all(y).then(()=>p):p;const x=[],J=w.keySet,D=d._zod,b=D.def.type;for(const v of Object.keys(m)){if(J.has(v))continue;if(b==="never"){x.push(v);continue}const $=D.run({value:m[v],issues:[]},f);$ instanceof Promise?y.push($.then(O=>L(O,p,v))):L($,p,v)}return x.length&&p.issues.push({code:"unrecognized_keys",keys:x,input:m,inst:e}),y.length?Promise.all(y).then(()=>p):p}});function we(e,n,t,r){for(const o of e)if(o.issues.length===0)return n.value=o.value,n;return n.issues.push({code:"invalid_union",input:n.value,inst:t,errors:e.map(o=>o.issues.map(i=>P(i,r,E())))}),n}const Gt=c("$ZodUnion",(e,n)=>{Z.init(e,n),_(e._zod,"optin",()=>n.options.some(t=>t._zod.optin==="optional")?"optional":void 0),_(e._zod,"optout",()=>n.options.some(t=>t._zod.optout==="optional")?"optional":void 0),_(e._zod,"values",()=>{if(n.options.every(t=>t._zod.values))return new Set(n.options.flatMap(t=>Array.from(t._zod.values)))}),_(e._zod,"pattern",()=>{if(n.options.every(t=>t._zod.pattern)){const t=n.options.map(r=>r._zod.pattern);return new RegExp(`^(${t.map(r=>ce(r.source)).join("|")})$`)}}),e._zod.parse=(t,r)=>{let o=!1;const i=[];for(const s of n.options){const u=s._zod.run({value:t.value,issues:[]},r);if(u instanceof Promise)i.push(u),o=!0;else{if(u.issues.length===0)return u;i.push(u)}}return o?Promise.all(i).then(s=>we(s,t,e,r)):we(i,t,e,r)}}),Xt=c("$ZodIntersection",(e,n)=>{Z.init(e,n),e._zod.parse=(t,r)=>{const o=t.value,i=n.left._zod.run({value:o,issues:[]},r),s=n.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([a,d])=>Ze(t,a,d)):Ze(t,i,s)}});function re(e,n){if(e===n)return{valid:!0,data:e};if(e instanceof Date&&n instanceof Date&&+e==+n)return{valid:!0,data:e};if(te(e)&&te(n)){const t=Object.keys(n),r=Object.keys(e).filter(i=>t.indexOf(i)!==-1),o={...e,...n};for(const i of r){const s=re(e[i],n[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};const t=[];for(let r=0;r<e.length;r++){const o=e[r],i=n[r],s=re(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};t.push(s.data)}return{valid:!0,data:t}}return{valid:!1,mergeErrorPath:[]}}function Ze(e,n,t){if(n.issues.length&&e.issues.push(...n.issues),t.issues.length&&e.issues.push(...t.issues),A(e))return e;const r=re(n.value,t.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const Yt=c("$ZodEnum",(e,n)=>{Z.init(e,n);const t=zn(n.entries);e._zod.values=new Set(t),e._zod.pattern=new RegExp(`^(${t.filter(r=>$n.has(typeof r)).map(r=>typeof r=="string"?W(r):r.toString()).join("|")})$`),e._zod.parse=(r,o)=>{const i=r.value;return e._zod.values.has(i)||r.issues.push({code:"invalid_value",values:t,input:i,inst:e}),r}}),Ht=c("$ZodTransform",(e,n)=>{Z.init(e,n),e._zod.parse=(t,r)=>{const o=n.transform(t.value,t);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(t.value=s,t));if(o instanceof Promise)throw new T;return t.value=o,t}}),Qt=c("$ZodOptional",(e,n)=>{Z.init(e,n),e._zod.optin="optional",e._zod.optout="optional",_(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),_(e._zod,"pattern",()=>{const t=n.innerType._zod.pattern;return t?new RegExp(`^(${ce(t.source)})?$`):void 0}),e._zod.parse=(t,r)=>n.innerType._zod.optin==="optional"?n.innerType._zod.run(t,r):t.value===void 0?t:n.innerType._zod.run(t,r)}),er=c("$ZodNullable",(e,n)=>{Z.init(e,n),_(e._zod,"optin",()=>n.innerType._zod.optin),_(e._zod,"optout",()=>n.innerType._zod.optout),_(e._zod,"pattern",()=>{const t=n.innerType._zod.pattern;return t?new RegExp(`^(${ce(t.source)}|null)$`):void 0}),_(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),e._zod.parse=(t,r)=>t.value===null?t:n.innerType._zod.run(t,r)}),nr=c("$ZodDefault",(e,n)=>{Z.init(e,n),e._zod.optin="optional",_(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(t,r)=>{if(t.value===void 0)return t.value=n.defaultValue,t;const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(i=>$e(i,n)):$e(o,n)}});function $e(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const tr=c("$ZodPrefault",(e,n)=>{Z.init(e,n),e._zod.optin="optional",_(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(t,r)=>(t.value===void 0&&(t.value=n.defaultValue),n.innerType._zod.run(t,r))}),rr=c("$ZodNonOptional",(e,n)=>{Z.init(e,n),_(e._zod,"values",()=>{const t=n.innerType._zod.values;return t?new Set([...t].filter(r=>r!==void 0)):void 0}),e._zod.parse=(t,r)=>{const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(i=>ke(i,e)):ke(o,e)}});function ke(e,n){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:n}),e}const or=c("$ZodCatch",(e,n)=>{Z.init(e,n),e._zod.optin="optional",_(e._zod,"optout",()=>n.innerType._zod.optout),_(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(t,r)=>{const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(i=>(t.value=i.value,i.issues.length&&(t.value=n.catchValue({...t,error:{issues:i.issues.map(s=>P(s,r,E()))},input:t.value}),t.issues=[]),t)):(t.value=o.value,o.issues.length&&(t.value=n.catchValue({...t,error:{issues:o.issues.map(i=>P(i,r,E()))},input:t.value}),t.issues=[]),t)}}),ir=c("$ZodPipe",(e,n)=>{Z.init(e,n),_(e._zod,"values",()=>n.in._zod.values),_(e._zod,"optin",()=>n.in._zod.optin),_(e._zod,"optout",()=>n.out._zod.optout),e._zod.parse=(t,r)=>{const o=n.in._zod.run(t,r);return o instanceof Promise?o.then(i=>be(i,n,r)):be(o,n,r)}});function be(e,n,t){return A(e)?e:n.out._zod.run({value:e.value,issues:e.issues},t)}const sr=c("$ZodReadonly",(e,n)=>{Z.init(e,n),_(e._zod,"propValues",()=>n.innerType._zod.propValues),_(e._zod,"values",()=>n.innerType._zod.values),_(e._zod,"optin",()=>n.innerType._zod.optin),_(e._zod,"optout",()=>n.innerType._zod.optout),e._zod.parse=(t,r)=>{const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(ye):ye(o)}});function ye(e){return e.value=Object.freeze(e.value),e}const cr=c("$ZodCustom",(e,n)=>{j.init(e,n),Z.init(e,n),e._zod.parse=(t,r)=>t,e._zod.check=t=>{const r=t.value,o=n.fn(r);if(o instanceof Promise)return o.then(i=>je(i,t,r,e));je(o,t,r,e)}});function je(e,n,t,r){if(!e){const o={code:"custom",input:t,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),n.issues.push(R(o))}}class ur{constructor(){this._map=new Map,this._idmap=new Map}add(n,...t){const r=t[0];if(this._map.set(n,r),r&&typeof r=="object"&&"id"in r){if(this._idmap.has(r.id))throw new Error(`ID ${r.id} already exists in the registry`);this._idmap.set(r.id,n)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(n){const t=this._map.get(n);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(n),this}get(n){const t=n._zod.parent;if(t){const r={...this.get(t)??{}};return delete r.id,{...r,...this._map.get(n)}}return this._map.get(n)}has(n){return this._map.has(n)}}function ar(){return new ur}const F=ar();function lr(e,n){return new e({type:"string",...l(n)})}function dr(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...l(n)})}function xe(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...l(n)})}function pr(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...l(n)})}function hr(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...l(n)})}function fr(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...l(n)})}function mr(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...l(n)})}function _r(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...l(n)})}function gr(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...l(n)})}function vr(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...l(n)})}function zr(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...l(n)})}function wr(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...l(n)})}function Zr(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...l(n)})}function $r(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...l(n)})}function kr(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...l(n)})}function br(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...l(n)})}function yr(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...l(n)})}function jr(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...l(n)})}function xr(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...l(n)})}function Er(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...l(n)})}function Pr(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...l(n)})}function Ir(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...l(n)})}function Or(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...l(n)})}function Sr(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...l(n)})}function Ar(e,n){return new e({type:"string",format:"date",check:"string_format",...l(n)})}function Tr(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...l(n)})}function Rr(e,n){return new e({type:"string",format:"duration",check:"string_format",...l(n)})}function Cr(e,n){return new e({type:"boolean",...l(n)})}function Dr(e){return new e({type:"unknown"})}function Ur(e,n){return new e({type:"never",...l(n)})}function Ge(e,n){return new ct({check:"max_length",...l(n),maximum:e})}function M(e,n){return new ut({check:"min_length",...l(n),minimum:e})}function Xe(e,n){return new at({check:"length_equals",...l(n),length:e})}function Nr(e,n){return new lt({check:"string_format",format:"regex",...l(n),pattern:e})}function Lr(e){return new dt({check:"string_format",format:"lowercase",...l(e)})}function Fr(e){return new pt({check:"string_format",format:"uppercase",...l(e)})}function Vr(e,n){return new ht({check:"string_format",format:"includes",...l(n),includes:e})}function Mr(e,n){return new ft({check:"string_format",format:"starts_with",...l(n),prefix:e})}function Wr(e,n){return new mt({check:"string_format",format:"ends_with",...l(n),suffix:e})}function C(e){return new _t({check:"overwrite",tx:e})}function Br(e){return C(n=>n.normalize(e))}function Kr(){return C(e=>e.trim())}function Jr(){return C(e=>e.toLowerCase())}function qr(){return C(e=>e.toUpperCase())}function Gr(e,n,t){return new e({type:"array",element:n,...l(t)})}function Xr(e,n,t){return new e({type:"custom",check:"custom",fn:n,...l(t)})}const Yr=c("ZodISODateTime",(e,n)=>{It.init(e,n),z.init(e,n)});function Hr(e){return Sr(Yr,e)}const Qr=c("ZodISODate",(e,n)=>{Ot.init(e,n),z.init(e,n)});function eo(e){return Ar(Qr,e)}const no=c("ZodISOTime",(e,n)=>{St.init(e,n),z.init(e,n)});function to(e){return Tr(no,e)}const ro=c("ZodISODuration",(e,n)=>{At.init(e,n),z.init(e,n)});function oo(e){return Rr(ro,e)}const io=(e,n)=>{Fe.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>On(e,t)},flatten:{value:t=>In(e,t)},addIssue:{value:t=>e.issues.push(t)},addIssues:{value:t=>e.issues.push(...t)},isEmpty:{get(){return e.issues.length===0}}})},K=c("ZodError",io,{Parent:Error}),so=Sn(K),co=An(K),uo=Me(K),ao=We(K),k=c("ZodType",(e,n)=>(Z.init(e,n),e.def=n,Object.defineProperty(e,"_def",{value:n}),e.check=(...t)=>e.clone({...n,checks:[...n.checks??[],...t.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),e.clone=(t,r)=>I(e,t,r),e.brand=()=>e,e.register=(t,r)=>(t.add(e,r),e),e.parse=(t,r)=>so(e,t,r,{callee:e.parse}),e.safeParse=(t,r)=>uo(e,t,r),e.parseAsync=async(t,r)=>co(e,t,r,{callee:e.parseAsync}),e.safeParseAsync=async(t,r)=>ao(e,t,r),e.spa=e.safeParseAsync,e.refine=(t,r)=>e.check(oi(t,r)),e.superRefine=t=>e.check(ii(t)),e.overwrite=t=>e.check(C(t)),e.optional=()=>Oe(e),e.nullable=()=>Se(e),e.nullish=()=>Oe(Se(e)),e.nonoptional=t=>Xo(e,t),e.array=()=>Ro(e),e.or=t=>No([e,t]),e.and=t=>Fo(e,t),e.transform=t=>Ae(e,Wo(t)),e.default=t=>Jo(e,t),e.prefault=t=>Go(e,t),e.catch=t=>Ho(e,t),e.pipe=t=>Ae(e,t),e.readonly=()=>ni(e),e.describe=t=>{const r=e.clone();return F.add(r,{description:t}),r},Object.defineProperty(e,"description",{get(){var t;return(t=F.get(e))==null?void 0:t.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return F.get(e);const r=e.clone();return F.add(r,t[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Ye=c("_ZodString",(e,n)=>{de.init(e,n),k.init(e,n);const t=e._zod.bag;e.format=t.format??null,e.minLength=t.minimum??null,e.maxLength=t.maximum??null,e.regex=(...r)=>e.check(Nr(...r)),e.includes=(...r)=>e.check(Vr(...r)),e.startsWith=(...r)=>e.check(Mr(...r)),e.endsWith=(...r)=>e.check(Wr(...r)),e.min=(...r)=>e.check(M(...r)),e.max=(...r)=>e.check(Ge(...r)),e.length=(...r)=>e.check(Xe(...r)),e.nonempty=(...r)=>e.check(M(1,...r)),e.lowercase=r=>e.check(Lr(r)),e.uppercase=r=>e.check(Fr(r)),e.trim=()=>e.check(Kr()),e.normalize=(...r)=>e.check(Br(...r)),e.toLowerCase=()=>e.check(Jr()),e.toUpperCase=()=>e.check(qr())}),lo=c("ZodString",(e,n)=>{de.init(e,n),Ye.init(e,n),e.email=t=>e.check(dr(po,t)),e.url=t=>e.check(_r(ho,t)),e.jwt=t=>e.check(Or(Eo,t)),e.emoji=t=>e.check(gr(fo,t)),e.guid=t=>e.check(xe(Pe,t)),e.uuid=t=>e.check(pr(V,t)),e.uuidv4=t=>e.check(hr(V,t)),e.uuidv6=t=>e.check(fr(V,t)),e.uuidv7=t=>e.check(mr(V,t)),e.nanoid=t=>e.check(vr(mo,t)),e.guid=t=>e.check(xe(Pe,t)),e.cuid=t=>e.check(zr(_o,t)),e.cuid2=t=>e.check(wr(go,t)),e.ulid=t=>e.check(Zr(vo,t)),e.base64=t=>e.check(Er(yo,t)),e.base64url=t=>e.check(Pr(jo,t)),e.xid=t=>e.check($r(zo,t)),e.ksuid=t=>e.check(kr(wo,t)),e.ipv4=t=>e.check(br(Zo,t)),e.ipv6=t=>e.check(yr($o,t)),e.cidrv4=t=>e.check(jr(ko,t)),e.cidrv6=t=>e.check(xr(bo,t)),e.e164=t=>e.check(Ir(xo,t)),e.datetime=t=>e.check(Hr(t)),e.date=t=>e.check(eo(t)),e.time=t=>e.check(to(t)),e.duration=t=>e.check(oo(t))});function Ee(e){return lr(lo,e)}const z=c("ZodStringFormat",(e,n)=>{g.init(e,n),Ye.init(e,n)}),po=c("ZodEmail",(e,n)=>{Zt.init(e,n),z.init(e,n)}),Pe=c("ZodGUID",(e,n)=>{zt.init(e,n),z.init(e,n)}),V=c("ZodUUID",(e,n)=>{wt.init(e,n),z.init(e,n)}),ho=c("ZodURL",(e,n)=>{$t.init(e,n),z.init(e,n)}),fo=c("ZodEmoji",(e,n)=>{kt.init(e,n),z.init(e,n)}),mo=c("ZodNanoID",(e,n)=>{bt.init(e,n),z.init(e,n)}),_o=c("ZodCUID",(e,n)=>{yt.init(e,n),z.init(e,n)}),go=c("ZodCUID2",(e,n)=>{jt.init(e,n),z.init(e,n)}),vo=c("ZodULID",(e,n)=>{xt.init(e,n),z.init(e,n)}),zo=c("ZodXID",(e,n)=>{Et.init(e,n),z.init(e,n)}),wo=c("ZodKSUID",(e,n)=>{Pt.init(e,n),z.init(e,n)}),Zo=c("ZodIPv4",(e,n)=>{Tt.init(e,n),z.init(e,n)}),$o=c("ZodIPv6",(e,n)=>{Rt.init(e,n),z.init(e,n)}),ko=c("ZodCIDRv4",(e,n)=>{Ct.init(e,n),z.init(e,n)}),bo=c("ZodCIDRv6",(e,n)=>{Dt.init(e,n),z.init(e,n)}),yo=c("ZodBase64",(e,n)=>{Ut.init(e,n),z.init(e,n)}),jo=c("ZodBase64URL",(e,n)=>{Lt.init(e,n),z.init(e,n)}),xo=c("ZodE164",(e,n)=>{Ft.init(e,n),z.init(e,n)}),Eo=c("ZodJWT",(e,n)=>{Mt.init(e,n),z.init(e,n)}),Po=c("ZodBoolean",(e,n)=>{Wt.init(e,n),k.init(e,n)});function Io(e){return Cr(Po,e)}const Oo=c("ZodUnknown",(e,n)=>{Bt.init(e,n),k.init(e,n)});function Ie(){return Dr(Oo)}const So=c("ZodNever",(e,n)=>{Kt.init(e,n),k.init(e,n)});function Ao(e){return Ur(So,e)}const To=c("ZodArray",(e,n)=>{Jt.init(e,n),k.init(e,n),e.element=n.element,e.min=(t,r)=>e.check(M(t,r)),e.nonempty=t=>e.check(M(1,t)),e.max=(t,r)=>e.check(Ge(t,r)),e.length=(t,r)=>e.check(Xe(t,r)),e.unwrap=()=>e.element});function Ro(e,n){return Gr(To,e,n)}const Co=c("ZodObject",(e,n)=>{qt.init(e,n),k.init(e,n),_(e,"shape",()=>n.shape),e.keyof=()=>Vo(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ie()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ie()}),e.strict=()=>e.clone({...e._zod.def,catchall:Ao()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>jn(e,t),e.merge=t=>xn(e,t),e.pick=t=>bn(e,t),e.omit=t=>yn(e,t),e.partial=(...t)=>En(He,e,t[0]),e.required=(...t)=>Pn(Qe,e,t[0])});function Do(e,n){const t={type:"object",get shape(){return ue(this,"shape",{...e}),this.shape},...l(n)};return new Co(t)}const Uo=c("ZodUnion",(e,n)=>{Gt.init(e,n),k.init(e,n),e.options=n.options});function No(e,n){return new Uo({type:"union",options:e,...l(n)})}const Lo=c("ZodIntersection",(e,n)=>{Xt.init(e,n),k.init(e,n)});function Fo(e,n){return new Lo({type:"intersection",left:e,right:n})}const oe=c("ZodEnum",(e,n)=>{Yt.init(e,n),k.init(e,n),e.enum=n.entries,e.options=Object.values(n.entries);const t=new Set(Object.keys(n.entries));e.extract=(r,o)=>{const i={};for(const s of r)if(t.has(s))i[s]=n.entries[s];else throw new Error(`Key ${s} not found in enum`);return new oe({...n,checks:[],...l(o),entries:i})},e.exclude=(r,o)=>{const i={...n.entries};for(const s of r)if(t.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new oe({...n,checks:[],...l(o),entries:i})}});function Vo(e,n){const t=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new oe({type:"enum",entries:t,...l(n)})}const Mo=c("ZodTransform",(e,n)=>{Ht.init(e,n),k.init(e,n),e._zod.parse=(t,r)=>{t.addIssue=i=>{if(typeof i=="string")t.issues.push(R(i,t.value,n));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=t.value),s.inst??(s.inst=e),s.continue??(s.continue=!0),t.issues.push(R(s))}};const o=n.transform(t.value,t);return o instanceof Promise?o.then(i=>(t.value=i,t)):(t.value=o,t)}});function Wo(e){return new Mo({type:"transform",transform:e})}const He=c("ZodOptional",(e,n)=>{Qt.init(e,n),k.init(e,n),e.unwrap=()=>e._zod.def.innerType});function Oe(e){return new He({type:"optional",innerType:e})}const Bo=c("ZodNullable",(e,n)=>{er.init(e,n),k.init(e,n),e.unwrap=()=>e._zod.def.innerType});function Se(e){return new Bo({type:"nullable",innerType:e})}const Ko=c("ZodDefault",(e,n)=>{nr.init(e,n),k.init(e,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Jo(e,n){return new Ko({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():n}})}const qo=c("ZodPrefault",(e,n)=>{tr.init(e,n),k.init(e,n),e.unwrap=()=>e._zod.def.innerType});function Go(e,n){return new qo({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():n}})}const Qe=c("ZodNonOptional",(e,n)=>{rr.init(e,n),k.init(e,n),e.unwrap=()=>e._zod.def.innerType});function Xo(e,n){return new Qe({type:"nonoptional",innerType:e,...l(n)})}const Yo=c("ZodCatch",(e,n)=>{or.init(e,n),k.init(e,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ho(e,n){return new Yo({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const Qo=c("ZodPipe",(e,n)=>{ir.init(e,n),k.init(e,n),e.in=n.in,e.out=n.out});function Ae(e,n){return new Qo({type:"pipe",in:e,out:n})}const ei=c("ZodReadonly",(e,n)=>{sr.init(e,n),k.init(e,n)});function ni(e){return new ei({type:"readonly",innerType:e})}const ti=c("ZodCustom",(e,n)=>{cr.init(e,n),k.init(e,n)});function ri(e){const n=new j({check:"custom"});return n._zod.check=e,n}function oi(e,n={}){return Xr(ti,e,n)}function ii(e){const n=ri(t=>(t.addIssue=r=>{if(typeof r=="string")t.issues.push(R(r,t.value,n._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=t.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),t.issues.push(R(o))}},e(t.value,t)));return n}const si=Do({email:Ee().nonempty("Please enter your email").email(),password:Ee().nonempty("Please enter your password"),remember:Io()});function ci(){"use no memo";const e=an(),n=ee(o=>o.auth.isLoading),t=on({resolver:vn(si),defaultValues:{email:"",password:"",remember:!1}}),r=ie.useCallback(({email:o,password:i,remember:s})=>{e(ln({email:o,password:i,remember:s}))},[e]);return h.jsx("div",{className:"flex flex-col",children:h.jsx(sn,{...t,children:h.jsxs("form",{onSubmit:t.handleSubmit(r),className:"space-y-4",children:[h.jsx(G,{control:t.control,name:"email",rules:{required:!0},render:({field:o})=>h.jsxs(X,{children:[h.jsx(fe,{className:"flex gap-1 items-baseline",children:"Email"}),h.jsx(Y,{children:h.jsx(me,{placeholder:"callasmaria@example.com",...o})}),h.jsx(H,{})]})}),h.jsx(G,{name:"password",control:t.control,rules:{required:!0},render:({field:o})=>h.jsxs(X,{children:[h.jsx(fe,{className:"flex gap-1 items-baseline",children:"Password"}),h.jsx(Y,{children:h.jsx(me,{type:"password",...o})}),h.jsx(H,{})]})}),h.jsx(G,{name:"remember",control:t.control,render:({field:o})=>h.jsxs(X,{children:[h.jsx(Y,{children:h.jsxs("div",{className:"flex items-center space-x-2",children:[h.jsx(cn,{id:"remember",checked:o.value,onCheckedChange:o.onChange}),h.jsx("label",{htmlFor:"remember",className:"text-sm leading-none",children:"Remember me"})]})}),h.jsx(H,{})]})}),h.jsx(tn,{type:"submit",disabled:!t.formState.isValid||n,className:"w-full",children:n?h.jsx(Re,{className:"absolute"}):"Login"})]})})})}const vi=en(function(){const n=nn(),t=ee(o=>o.auth.user),r=ee(o=>o.auth.isLoading);return ie.useEffect(()=>{t&&n("/admin/dashboard")},[n,t]),r||t?null:h.jsx("div",{className:"flex w-full h-full",children:h.jsxs("div",{className:"self-center space-y-8 w-72 mx-auto",children:[h.jsxs("div",{className:"flex flex-col space-y-2 text-center",children:[h.jsx("h1",{className:"text-2xl font-semibold tracking-tight leading-none",children:"Editorial Admin"}),h.jsx("p",{className:"text-sm text-muted-foreground",children:"Enter your details below to login"})]}),h.jsx(ci,{})]})})});export{vi as default};