@isardsat/editorial-admin 6.3.1 → 6.3.3

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,61 @@
1
+ import{p as e,a as d,x as y,y as de,v as le,z as ce,R as ue,w as he,O as pe}from"./chunk-EF7DTUVF-CZaHNoTs.js";import{u as xe,e as D,h as fe}from"./authSlice-DST6tNnU.js";import{a as U,b as be,d as ge,f as me,g as je,u as ve,h as we}from"./editorialApi-CqxxtYzA.js";import{R as W,C as Q,a as X,T as Z,D as Y,P as J,O as ee,b as ye,c as Ne,d as Ce,e as Se,f as _e,g as ke,A as Me,u as ze,E as De}from"./index-b1VEd5BJ.js";import{c as i}from"./utils-BSDwSRl3.js";import{c as f}from"./createLucideIcon-BOhrmKcl.js";import{B as k,S as E,c as Ee,u as Re}from"./button-DjJX-cbR.js";import{u as Oe,c as Ae,P as R,a as Pe,b as Ie,d as Te}from"./index-B0NebLYn.js";import{C as $}from"./chevron-down-CYVLN3e-.js";import"./tslib.es6-De9GV7Vy.js";import"./index-BnyqKVWo.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 $e=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Le=f("arrow-down",$e);/**
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 Be=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Ge=f("arrow-up",Be);/**
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 He=[["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"}]],Fe=f("blocks",He);/**
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 qe=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ve=f("chevron-right",qe);/**
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 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"}]],Ue=f("files",Ke);/**
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 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=f("grid-3x3",We);/**
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 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=f("heart",Xe);/**
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 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=f("log-out",Ye);/**
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 et=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],tt=f("panel-left",et);/**
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 at=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],st=f("square",at);/**
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 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=f("upload",nt);/**
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 it=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],te=f("x",it);function rt({...t}){return e.jsx(W,{"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:i("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:i("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:i("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:i("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:i("text-lg leading-none font-semibold",t),...a})}function xt({className:t,...a}){return e.jsx(Y,{"data-slot":"dialog-description",className:i("text-muted-foreground text-sm",t),...a})}const ft="#181717",bt=d.forwardRef(function({title:a="GitHub",color:n="currentColor",size:s=24,...o},r){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:r,...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",L=d.forwardRef(function({title:a="Swagger",color:n="currentColor",size:s=24,...o},r){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:r,...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 mt({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(k,{asChild:!0,variant:"ghost",children:e.jsxs(y,{to:"https://lobelia-earth.github.io/editorial/",children:[e.jsx(L,{size:14}),"Documentation"]})}),e.jsx(k,{asChild:!0,variant:"ghost",children:e.jsxs(y,{to:"/doc",children:[e.jsx(L,{size:14}),"Swagger API UI"]})}),e.jsx(k,{asChild:!0,variant:"ghost",children:e.jsxs(y,{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(y,{to:"https://lobelia.earth",className:"underline hover:text-blue-500",children:"Lobelia.earth"})]})})]})})}function jt({className:t,orientation:a="horizontal",decorative:n=!0,...s}){return e.jsx(ye,{"data-slot":"separator-root",decorative:n,orientation:a,className:i("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 vt({...t}){return e.jsx(W,{"data-slot":"sheet",...t})}function wt({...t}){return e.jsx(J,{"data-slot":"sheet-portal",...t})}function yt({className:t,...a}){return e.jsx(ee,{"data-slot":"sheet-overlay",className:i("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 Nt({className:t,children:a,side:n="right",...s}){return e.jsxs(wt,{children:[e.jsx(yt,{}),e.jsxs(Q,{"data-slot":"sheet-content",className:i("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 Ct({className:t,...a}){return e.jsx("div",{"data-slot":"sheet-header",className:i("flex flex-col gap-1.5 p-4",t),...a})}function St({className:t,...a}){return e.jsx(Z,{"data-slot":"sheet-title",className:i("text-foreground font-semibold",t),...a})}function _t({className:t,...a}){return e.jsx(Y,{"data-slot":"sheet-description",className:i("text-muted-foreground text-sm",t),...a})}function ae({delayDuration:t=0,...a}){return e.jsx(Ne,{"data-slot":"tooltip-provider",delayDuration:t,...a})}function kt({...t}){return e.jsx(ae,{children:e.jsx(Ce,{"data-slot":"tooltip",...t})})}function Mt({...t}){return e.jsx(Se,{"data-slot":"tooltip-trigger",...t})}function zt({className:t,sideOffset:a=0,children:n,...s}){return e.jsx(_e,{children:e.jsxs(ke,{"data-slot":"tooltip-content",sideOffset:a,className:i("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(Me,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const z=768;function Dt(){const[t,a]=d.useState(void 0);return d.useEffect(()=>{const n=window.matchMedia(`(max-width: ${z-1}px)`),s=()=>{a(window.innerWidth<z)};return n.addEventListener("change",s),a(window.innerWidth<z),()=>n.removeEventListener("change",s)},[]),!!t}const Et="sidebar_state",Rt=60*60*24*7,Ot="16rem",At="18rem",Pt="3rem",It="b",se=d.createContext(null);function O(){const t=d.useContext(se);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function Tt({defaultOpen:t=!0,open:a,onOpenChange:n,className:s,style:o,children:r,...l}){const p=Dt(),[x,u]=d.useState(!1),[g,C]=d.useState(t),m=a??g,j=d.useCallback(h=>{const c=typeof h=="function"?h(m):h;n?n(c):C(c),document.cookie=`${Et}=${c}; path=/; max-age=${Rt}`},[n,m]),v=d.useCallback(()=>p?u(h=>!h):j(h=>!h),[p,j,u]);d.useEffect(()=>{const h=c=>{c.key===It&&(c.metaKey||c.ctrlKey)&&(c.preventDefault(),v())};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[v]);const N=m?"expanded":"collapsed",S=d.useMemo(()=>({state:N,open:m,setOpen:j,isMobile:p,openMobile:x,setOpenMobile:u,toggleSidebar:v}),[N,m,j,p,x,u,v]);return e.jsx(se.Provider,{value:S,children:e.jsx(ae,{delayDuration:0,children:e.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Ot,"--sidebar-width-icon":Pt,...o},className:i("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",s),...l,children:r})})})}function $t({side:t="left",variant:a="sidebar",collapsible:n="offcanvas",className:s,children:o,...r}){const{isMobile:l,state:p,openMobile:x,setOpenMobile:u}=O();return n==="none"?e.jsx("div",{"data-slot":"sidebar",className:i("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",s),...r,children:o}):l?e.jsx(vt,{open:x,onOpenChange:u,...r,children:e.jsxs(Nt,{"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":At},side:t,children:[e.jsxs(Ct,{className:"sr-only",children:[e.jsx(St,{children:"Sidebar"}),e.jsx(_t,{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":p,"data-collapsible":p==="collapsed"?n:"","data-variant":a,"data-side":t,"data-slot":"sidebar",children:[e.jsx("div",{"data-slot":"sidebar-gap",className:i("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:i("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),...r,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 Lt({className:t,onClick:a,...n}){const{toggleSidebar:s}=O();return e.jsxs(k,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:i("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 Bt({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:i("flex flex-col gap-2 p-2",t),...a})}function Gt({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:i("flex flex-col gap-2 p-2",t),...a})}function Ht({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:i("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:i("relative flex w-full min-w-0 flex-col p-2",t),...a})}function B({className:t,asChild:a=!1,...n}){const s=a?E:"div";return e.jsx(s,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:i("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 G({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:i("w-full text-sm",t),...a})}function H({className:t,...a}){return e.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:i("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:i("group/menu-item relative",t),...a})}const Ft=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:r,...l}){const p=t?E:"button",{isMobile:x,state:u}=O(),g=e.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":s,"data-active":a,className:i(Ft({variant:n,size:s}),r),...l});return o?(typeof o=="string"&&(o={children:o}),e.jsxs(kt,{children:[e.jsx(Mt,{asChild:!0,children:g}),e.jsx(zt,{side:"right",align:"center",hidden:u!=="collapsed"||x,...o})]})):g}function qt({className:t,...a}){return e.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:i("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 Vt({asChild:t=!1,size:a="md",isActive:n=!1,className:s,...o}){const r=t?E:"a";return e.jsx(r,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":a,"data-active":n,className:i("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 F({singleton:t}){const{data:a}=U(),{data:n}=be();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(de,{to:t?`/admin/dashboard/${s}/default`:`/admin/dashboard/${s}`,className:({isActive:r,isPending:l})=>l?"pending":r?"active":"",children:({isActive:r})=>e.jsx(Vt,{isActive:r,asChild:!0,children:e.jsxs("div",{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 M="Collapsible",[Kt,ca]=Ae(M),[Ut,A]=Kt(M),ne=d.forwardRef((t,a)=>{const{__scopeCollapsible:n,open:s,defaultOpen:o,disabled:r,onOpenChange:l,...p}=t,[x,u]=Oe({prop:s,defaultProp:o??!1,onChange:l,caller:M});return e.jsx(Ut,{scope:n,disabled:r,contentId:ze(),open:x,onOpenToggle:d.useCallback(()=>u(g=>!g),[u]),children:e.jsx(R.div,{"data-state":I(x),"data-disabled":r?"":void 0,...p,ref:a})})});ne.displayName=M;var oe="CollapsibleTrigger",ie=d.forwardRef((t,a)=>{const{__scopeCollapsible:n,...s}=t,o=A(oe,n);return e.jsx(R.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:Pe(t.onClick,o.onOpenToggle)})});ie.displayName=oe;var P="CollapsibleContent",re=d.forwardRef((t,a)=>{const{forceMount:n,...s}=t,o=A(P,t.__scopeCollapsible);return e.jsx(Ie,{present:n||o.open,children:({present:r})=>e.jsx(Wt,{...s,ref:a,present:r})})});re.displayName=P;var Wt=d.forwardRef((t,a)=>{const{__scopeCollapsible:n,present:s,children:o,...r}=t,l=A(P,n),[p,x]=d.useState(s),u=d.useRef(null),g=Re(a,u),C=d.useRef(0),m=C.current,j=d.useRef(0),v=j.current,N=l.open||p,S=d.useRef(N),h=d.useRef(void 0);return d.useEffect(()=>{const c=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(c)},[]),Te(()=>{const c=u.current;if(c){h.current=h.current||{transitionDuration:c.style.transitionDuration,animationName:c.style.animationName},c.style.transitionDuration="0s",c.style.animationName="none";const T=c.getBoundingClientRect();C.current=T.height,j.current=T.width,S.current||(c.style.transitionDuration=h.current.transitionDuration,c.style.animationName=h.current.animationName),x(s)}},[l.open,s]),e.jsx(R.div,{"data-state":I(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!N,...r,ref:g,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...t.style},children:N&&o})});function I(t){return t?"open":"closed"}var Qt=ne;function q({...t}){return e.jsx(Qt,{"data-slot":"collapsible",...t})}function V({...t}){return e.jsx(ie,{"data-slot":"collapsible-trigger",...t})}function K({...t}){return e.jsx(re,{"data-slot":"collapsible-content",...t})}function Xt(){const t=xe(),[a,n]=d.useState(!1),[s]=ge(),[o]=me(),[r]=je(),{data:l}=ve(),{data:p}=we(),x=D(u=>u.auth.role);return e.jsxs($t,{className:"z-50",children:[e.jsx(mt,{isOpen:a,setOpen:n}),e.jsx(Bt,{className:"h-14 justify-center",children:e.jsx(_,{children:e.jsx(y,{to:"/admin/dashboard",className:"text-3xl font-semibold tracking-tight transition-colors",children:l==null?void 0:l.name})})}),e.jsxs(Ht,{children:[e.jsxs(_,{children:[e.jsx(B,{children:"Content"}),e.jsx(G,{children:e.jsxs(H,{children:[e.jsx(q,{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(F,{})})]})}),e.jsx(q,{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(F,{singleton:!0})})]})}),e.jsx(w,{children:e.jsx(b,{asChild:!0,children:e.jsxs(y,{to:"/admin/dashboard/files",children:[e.jsx(Ue,{}),e.jsx("span",{children:"Files"})]})})}),e.jsx(w,{children:e.jsxs(b,{disabled:!0,children:[e.jsx(Fe,{}),e.jsx("span",{children:"Components"})]})})]})})]}),e.jsxs(_,{children:[e.jsx(B,{children:"Actions"}),e.jsx(G,{children:e.jsxs(H,{children:[x==="developer"&&e.jsxs(e.Fragment,{children:[e.jsx(w,{children:e.jsxs(b,{className:"cursor-pointer",onClick:()=>o(),children:[e.jsx(Le,{}),e.jsx("span",{children:"Pull from repo"})]})}),e.jsx(w,{children:e.jsxs(b,{className:"cursor-pointer",onClick:()=>r(),children:[e.jsx(Ge,{}),e.jsx("span",{children:"Push to repo"})]})})]}),e.jsx(w,{children:e.jsxs(b,{className:"cursor-pointer",onClick:()=>s(),children:[e.jsx(ot,{}),e.jsx("span",{children:"Publish"})]})})]})})]}),e.jsx(_,{})]}),e.jsxs(Gt,{children:[e.jsx(b,{asChild:!0,children:e.jsxs(y,{to:l==null?void 0:l.previewUrl,children:["Preview",e.jsx(De,{className:"ml-auto"})]})}),e.jsx(b,{className:"cursor-pointer",onClick:()=>n(!0),children:"About"}),e.jsxs(b,{className:"cursor-pointer",onClick:()=>t(fe()),children:[e.jsx(Je,{}),"Log out"]})]})]})}function Zt({children:t}){const a=le(),n=D(o=>o.auth.user),s=D(o=>o.auth.isLoading);return d.useEffect(()=>{!s&&!n&&a("/admin")},[s,a,n]),s||!n?null:t}function Yt(){const{pathname:t}=ce(),{data:a}=U(),n=t.split("/").filter(s=>!["admin","dashboard"].includes(s)&&s!=="");return a?e.jsx(e.Fragment,{children:n.map((s,o,r)=>e.jsxs(ue.Fragment,{children:[r.length>1&&o>=1&&e.jsx(Ve,{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 ua=he(function(){return e.jsx(Zt,{children:e.jsxs(Tt,{className:"flex h-full",children:[e.jsx(Xt,{}),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(Lt,{}),e.jsx(jt,{orientation:"vertical",className:"h-4"}),e.jsx(Yt,{})]})}),e.jsx(pe,{})]})]})})});export{ua as default};
@@ -8,12 +8,12 @@ import{p as e,a as j,x as u,w as g}from"./chunk-EF7DTUVF-CZaHNoTs.js";import{e a
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */const H=[["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"}]],C=o("ellipsis",H);/**
11
+ */const H=[["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",H);/**
12
12
  * @license lucide-react v0.487.0 - ISC
13
13
  *
14
14
  * This source code is licensed under the ISC license.
15
15
  * See the LICENSE file in the root directory of this source tree.
16
- */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"}],["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"}]],T=o("file-image",$);/**
16
+ */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"}],["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"}]],T=o("file-image",C);/**
17
17
  * @license lucide-react v0.487.0 - ISC
18
18
  *
19
19
  * This source code is licensed under the ISC license.
@@ -33,4 +33,4 @@ import{p as e,a as j,x as u,w as g}from"./chunk-EF7DTUVF-CZaHNoTs.js";import{e a
33
33
  *
34
34
  * This source code is licensed under the ISC license.
35
35
  * See the LICENSE file in the root directory of this source tree.
36
- */const V=[["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"}]],P=o("folder",V),Z=["txt","md","html","pdf"],A=["svg","webp","png","jpeg","jpg"],R=[{Icon:T,test:s=>A.some(i=>s.name.endsWith(i))},{Icon:I,test:s=>Z.some(i=>s.name.endsWith(i))}],W={Icon:S},p=({node:s,level:i=0,onDelete:c})=>{const[a,d]=j.useState(!1),x=v(N),m=R.find(t=>t.test(s))??W,l=s.type==="directory",h=l?"div":u,f=()=>{l&&d(!a)};return e.jsxs("div",{className:"select-none",children:[e.jsxs(h,{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:f,children:[l?e.jsx(F,{size:16,className:b("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(P,{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?"--":z(s.size)})}),x==="developer"&&e.jsxs("div",{className:"flex items-center gap-1 ml-4 group-hover:visible invisible z-20",children:[e.jsxs("button",{className:_("hover:text-yellow-500 p-1 hover:bg-muted rounded-clsx",l&&"invisible"),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(),c(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,y)=>e.jsx(p,{node:t,level:i+1,onDelete:c},`${t.name}-${y}`))})]})};function G(){const{data:s,isLoading:i}=k(),[c]=w();return!s||i?null:s.toSorted(a=>a.type==="directory"?-1:1).map(a=>e.jsx(p,{node:a,onDelete:c},a.name))}const ee=g(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(C,{size:14})]})]}),e.jsx(G,{})]})})})});export{ee as default};
36
+ */const V=[["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"}]],P=o("folder",V),Z=["txt","md","html","pdf"],A=["svg","webp","png","jpeg","jpg"],R=[{Icon:T,test:s=>A.some(i=>s.name.endsWith(i))},{Icon:I,test:s=>Z.some(i=>s.name.endsWith(i))}],W={Icon:S},p=({node:s,level:i=0,onDelete:c})=>{const[a,d]=j.useState(!1),x=v(N),m=R.find(t=>t.test(s))??W,l=s.type==="directory",h=l?"div":u,f=()=>{l&&d(!a)};return e.jsxs("div",{className:"select-none",children:[e.jsxs(h,{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:f,children:[l?e.jsx(F,{size:16,className:b("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(P,{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?"--":z(s.size)})}),x==="developer"&&e.jsxs("div",{className:"flex items-center gap-1 ml-4 group-hover:visible invisible z-20",children:[e.jsxs("button",{className:_("hover:text-yellow-500 p-1 hover:bg-muted rounded-clsx",l&&"invisible"),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(),c(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,y)=>e.jsx(p,{node:t,level:i+1,onDelete:c},`${t.name}-${y}`))})]})};function G(){const{data:s,isLoading:i}=k(),[c]=w();return!s||i?null:s.toSorted(a=>a.type==="directory"?-1:1).map(a=>e.jsx(p,{node:a,onDelete:c},a.name))}const ee=g(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($,{size:14})]})]}),e.jsx(G,{})]})})})});export{ee as default};
@@ -1 +1 @@
1
- window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-DxhHtLqO.js","imports":["/assets/chunk-EF7DTUVF-CZaHNoTs.js","/assets/index-BnyqKVWo.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":true,"module":"/assets/root-Cuw5kjHy.js","imports":["/assets/chunk-EF7DTUVF-CZaHNoTs.js","/assets/index-BnyqKVWo.js","/assets/authSlice-DST6tNnU.js","/assets/editorialApi-CqxxtYzA.js","/assets/tslib.es6-De9GV7Vy.js"],"css":["/assets/root-DdgoqUZJ.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-BkOGwoQz.js","imports":["/assets/chunk-EF7DTUVF-CZaHNoTs.js","/assets/button-DjJX-cbR.js","/assets/input-DA43W1bc.js","/assets/utils-BSDwSRl3.js","/assets/createLucideIcon-BOhrmKcl.js","/assets/authSlice-DST6tNnU.js","/assets/index-B0NebLYn.js","/assets/index-BnyqKVWo.js","/assets/tslib.es6-De9GV7Vy.js","/assets/editorialApi-CqxxtYzA.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-D6uAMjWG.js","imports":["/assets/chunk-EF7DTUVF-CZaHNoTs.js","/assets/authSlice-DST6tNnU.js","/assets/editorialApi-CqxxtYzA.js","/assets/index-b1VEd5BJ.js","/assets/utils-BSDwSRl3.js","/assets/createLucideIcon-BOhrmKcl.js","/assets/button-DjJX-cbR.js","/assets/index-B0NebLYn.js","/assets/chevron-down-CYVLN3e-.js","/assets/tslib.es6-De9GV7Vy.js","/assets/index-BnyqKVWo.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-BjYHjaPP.js","imports":["/assets/chunk-EF7DTUVF-CZaHNoTs.js","/assets/utils-BSDwSRl3.js","/assets/editorialApi-CqxxtYzA.js","/assets/index-CQvFoK7s.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-B-0plYyF.js","imports":["/assets/chunk-EF7DTUVF-CZaHNoTs.js","/assets/itemForm-CnzvRzeD.js","/assets/editorialApi-CqxxtYzA.js","/assets/button-DjJX-cbR.js","/assets/utils-BSDwSRl3.js","/assets/input-DA43W1bc.js","/assets/index-B0NebLYn.js","/assets/index-BnyqKVWo.js","/assets/createLucideIcon-BOhrmKcl.js","/assets/index-b1VEd5BJ.js","/assets/tslib.es6-De9GV7Vy.js"],"css":["/assets/itemForm-BVtnhZqg.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-U37ELAZn.js","imports":["/assets/chunk-EF7DTUVF-CZaHNoTs.js","/assets/button-DjJX-cbR.js","/assets/editorialApi-CqxxtYzA.js","/assets/index-CQvFoK7s.js","/assets/utils-BSDwSRl3.js","/assets/trash-CYTPibS3.js","/assets/createLucideIcon-BOhrmKcl.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-Dt2belpf.js","imports":["/assets/chunk-EF7DTUVF-CZaHNoTs.js","/assets/itemForm-CnzvRzeD.js","/assets/editorialApi-CqxxtYzA.js","/assets/button-DjJX-cbR.js","/assets/utils-BSDwSRl3.js","/assets/input-DA43W1bc.js","/assets/index-B0NebLYn.js","/assets/index-BnyqKVWo.js","/assets/createLucideIcon-BOhrmKcl.js","/assets/index-b1VEd5BJ.js","/assets/tslib.es6-De9GV7Vy.js"],"css":["/assets/itemForm-BVtnhZqg.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-Bal43yfa.js","imports":["/assets/chunk-EF7DTUVF-CZaHNoTs.js","/assets/authSlice-DST6tNnU.js","/assets/editorialApi-CqxxtYzA.js","/assets/utils-BSDwSRl3.js","/assets/createLucideIcon-BOhrmKcl.js","/assets/chevron-down-CYVLN3e-.js","/assets/trash-CYTPibS3.js","/assets/tslib.es6-De9GV7Vy.js"],"css":[]}},"url":"/assets/manifest-8cebdeb7.js","version":"8cebdeb7"};
1
+ window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-DxhHtLqO.js","imports":["/assets/chunk-EF7DTUVF-CZaHNoTs.js","/assets/index-BnyqKVWo.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":true,"module":"/assets/root-Cuw5kjHy.js","imports":["/assets/chunk-EF7DTUVF-CZaHNoTs.js","/assets/index-BnyqKVWo.js","/assets/authSlice-DST6tNnU.js","/assets/editorialApi-CqxxtYzA.js","/assets/tslib.es6-De9GV7Vy.js"],"css":["/assets/root-DdgoqUZJ.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-BkOGwoQz.js","imports":["/assets/chunk-EF7DTUVF-CZaHNoTs.js","/assets/button-DjJX-cbR.js","/assets/input-DA43W1bc.js","/assets/utils-BSDwSRl3.js","/assets/createLucideIcon-BOhrmKcl.js","/assets/authSlice-DST6tNnU.js","/assets/index-B0NebLYn.js","/assets/index-BnyqKVWo.js","/assets/tslib.es6-De9GV7Vy.js","/assets/editorialApi-CqxxtYzA.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-CvH5YBY6.js","imports":["/assets/chunk-EF7DTUVF-CZaHNoTs.js","/assets/authSlice-DST6tNnU.js","/assets/editorialApi-CqxxtYzA.js","/assets/index-b1VEd5BJ.js","/assets/utils-BSDwSRl3.js","/assets/createLucideIcon-BOhrmKcl.js","/assets/button-DjJX-cbR.js","/assets/index-B0NebLYn.js","/assets/chevron-down-CYVLN3e-.js","/assets/tslib.es6-De9GV7Vy.js","/assets/index-BnyqKVWo.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-BjYHjaPP.js","imports":["/assets/chunk-EF7DTUVF-CZaHNoTs.js","/assets/utils-BSDwSRl3.js","/assets/editorialApi-CqxxtYzA.js","/assets/index-CQvFoK7s.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-B-0plYyF.js","imports":["/assets/chunk-EF7DTUVF-CZaHNoTs.js","/assets/itemForm-CnzvRzeD.js","/assets/editorialApi-CqxxtYzA.js","/assets/button-DjJX-cbR.js","/assets/utils-BSDwSRl3.js","/assets/input-DA43W1bc.js","/assets/index-B0NebLYn.js","/assets/index-BnyqKVWo.js","/assets/createLucideIcon-BOhrmKcl.js","/assets/index-b1VEd5BJ.js","/assets/tslib.es6-De9GV7Vy.js"],"css":["/assets/itemForm-BVtnhZqg.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-U37ELAZn.js","imports":["/assets/chunk-EF7DTUVF-CZaHNoTs.js","/assets/button-DjJX-cbR.js","/assets/editorialApi-CqxxtYzA.js","/assets/index-CQvFoK7s.js","/assets/utils-BSDwSRl3.js","/assets/trash-CYTPibS3.js","/assets/createLucideIcon-BOhrmKcl.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-Dt2belpf.js","imports":["/assets/chunk-EF7DTUVF-CZaHNoTs.js","/assets/itemForm-CnzvRzeD.js","/assets/editorialApi-CqxxtYzA.js","/assets/button-DjJX-cbR.js","/assets/utils-BSDwSRl3.js","/assets/input-DA43W1bc.js","/assets/index-B0NebLYn.js","/assets/index-BnyqKVWo.js","/assets/createLucideIcon-BOhrmKcl.js","/assets/index-b1VEd5BJ.js","/assets/tslib.es6-De9GV7Vy.js"],"css":["/assets/itemForm-BVtnhZqg.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-7tsycrA_.js","imports":["/assets/chunk-EF7DTUVF-CZaHNoTs.js","/assets/authSlice-DST6tNnU.js","/assets/editorialApi-CqxxtYzA.js","/assets/utils-BSDwSRl3.js","/assets/createLucideIcon-BOhrmKcl.js","/assets/chevron-down-CYVLN3e-.js","/assets/trash-CYTPibS3.js","/assets/tslib.es6-De9GV7Vy.js"],"css":[]}},"url":"/assets/manifest-e453e863.js","version":"e453e863"};
@@ -1,4 +1,4 @@
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"/><link rel="modulepreload" href="/assets/manifest-8cebdeb7.js"/><link rel="modulepreload" href="/assets/entry.client-DxhHtLqO.js"/><link rel="modulepreload" href="/assets/chunk-EF7DTUVF-CZaHNoTs.js"/><link rel="modulepreload" href="/assets/index-BnyqKVWo.js"/><link rel="modulepreload" href="/assets/root-Cuw5kjHy.js"/><link rel="modulepreload" href="/assets/authSlice-DST6tNnU.js"/><link rel="modulepreload" href="/assets/editorialApi-CqxxtYzA.js"/><link rel="modulepreload" href="/assets/tslib.es6-De9GV7Vy.js"/><title>Editorial Admin</title><link rel="stylesheet" href="/assets/root-DdgoqUZJ.css"/></head><body class="h-full min-h-screen bg-background font-sans antialiased"><div class="flex items-center justify-center min-h-screen"><div class="text-center"><div class="animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600 mx-auto mb-4"></div><p class="text-gray-600">Initializing Firebase...</p></div></div><script>window.__reactRouterContext = {"basename":"/","future":{"unstable_middleware":false,"unstable_optimizeDeps":false,"unstable_splitRouteModules":false,"unstable_subResourceIntegrity":false,"unstable_viteEnvironmentApi":false},"routeDiscovery":{"mode":"initial"},"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-8cebdeb7.js";
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"/><link rel="modulepreload" href="/assets/manifest-e453e863.js"/><link rel="modulepreload" href="/assets/entry.client-DxhHtLqO.js"/><link rel="modulepreload" href="/assets/chunk-EF7DTUVF-CZaHNoTs.js"/><link rel="modulepreload" href="/assets/index-BnyqKVWo.js"/><link rel="modulepreload" href="/assets/root-Cuw5kjHy.js"/><link rel="modulepreload" href="/assets/authSlice-DST6tNnU.js"/><link rel="modulepreload" href="/assets/editorialApi-CqxxtYzA.js"/><link rel="modulepreload" href="/assets/tslib.es6-De9GV7Vy.js"/><title>Editorial Admin</title><link rel="stylesheet" href="/assets/root-DdgoqUZJ.css"/></head><body class="h-full min-h-screen bg-background font-sans antialiased"><div class="flex items-center justify-center min-h-screen"><div class="text-center"><div class="animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600 mx-auto mb-4"></div><p class="text-gray-600">Initializing Firebase...</p></div></div><script>window.__reactRouterContext = {"basename":"/","future":{"unstable_middleware":false,"unstable_optimizeDeps":false,"unstable_splitRouteModules":false,"unstable_subResourceIntegrity":false,"unstable_viteEnvironmentApi":false},"routeDiscovery":{"mode":"initial"},"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-e453e863.js";
2
2
  import * as route0 from "/assets/root-Cuw5kjHy.js";
3
3
 
4
4
  window.__reactRouterRouteModules = {"root":route0};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isardsat/editorial-admin",
3
- "version": "6.3.1",
3
+ "version": "6.3.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -78,7 +78,7 @@
78
78
  "tailwindcss-animate": "^1.0.7",
79
79
  "vaul": "^1.1.2",
80
80
  "zod": "^3",
81
- "@isardsat/editorial-common": "^6.3.1"
81
+ "@isardsat/editorial-common": "^6.3.3"
82
82
  },
83
83
  "devDependencies": {
84
84
  "@react-router/dev": "^7.5.3",
@@ -1,61 +0,0 @@
1
- import{p as e,a as d,x as N,y as re,v as de,z as le,R as ce,w as ue,O as he}from"./chunk-EF7DTUVF-CZaHNoTs.js";import{u as pe,e as z,h as xe}from"./authSlice-DST6tNnU.js";import{a as K,b as fe,d as be,f as ge,g as me,u as je,h as ve}from"./editorialApi-CqxxtYzA.js";import{R as U,C as W,a as Q,T as X,D as Z,P as Y,O as J,b as we,c as ye,d as Ne,e as Ce,f as Se,g as _e,A as ke,u as Me,E as ze}from"./index-b1VEd5BJ.js";import{c as i}from"./utils-BSDwSRl3.js";import{c as f}from"./createLucideIcon-BOhrmKcl.js";import{B as E,S as R,c as Ee,u as Re}from"./button-DjJX-cbR.js";import{u as De,c as Oe,P as D,a as Ae,b as Pe,d as Ie}from"./index-B0NebLYn.js";import{C as $}from"./chevron-down-CYVLN3e-.js";import"./tslib.es6-De9GV7Vy.js";import"./index-BnyqKVWo.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 Te=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],$e=f("arrow-down",Te);/**
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"}]],Be=f("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 Ge=[["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=f("blocks",Ge);/**
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 Fe=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],qe=f("chevron-right",Fe);/**
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 Ve=[["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=f("files",Ve);/**
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=[["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"}]],We=f("grid-3x3",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 Qe=[["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"}]],Xe=f("heart",Qe);/**
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 Ze=[["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"}]],Ye=f("log-out",Ze);/**
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 Je=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],et=f("panel-left",Je);/**
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 tt=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],at=f("square",tt);/**
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 st=[["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"}]],nt=f("upload",st);/**
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 ot=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ee=f("x",ot);function it({...t}){return e.jsx(U,{"data-slot":"dialog",...t})}function rt({...t}){return e.jsx(Y,{"data-slot":"dialog-portal",...t})}function dt({className:t,...a}){return e.jsx(J,{"data-slot":"dialog-overlay",className:i("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 lt({className:t,children:a,...n}){return e.jsxs(rt,{"data-slot":"dialog-portal",children:[e.jsx(dt,{}),e.jsxs(W,{"data-slot":"dialog-content",className:i("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(Q,{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(ee,{}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function ct({className:t,...a}){return e.jsx("div",{"data-slot":"dialog-header",className:i("flex flex-col gap-2 text-center sm:text-left",t),...a})}function ut({className:t,...a}){return e.jsx("div",{"data-slot":"dialog-footer",className:i("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...a})}function ht({className:t,...a}){return e.jsx(X,{"data-slot":"dialog-title",className:i("text-lg leading-none font-semibold",t),...a})}function pt({className:t,...a}){return e.jsx(Z,{"data-slot":"dialog-description",className:i("text-muted-foreground text-sm",t),...a})}const xt="#181717",ft=d.forwardRef(function({title:a="GitHub",color:n="currentColor",size:s=24,...o},r){return n==="default"&&(n=xt),e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:s,height:s,fill:n,viewBox:"0 0 24 24",ref:r,...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"})]})}),bt="#85EA2D",gt=d.forwardRef(function({title:a="Swagger",color:n="currentColor",size:s=24,...o},r){return n==="default"&&(n=bt),e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:s,height:s,fill:n,viewBox:"0 0 24 24",ref:r,...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 mt({isOpen:t,setOpen:a}){return e.jsx(it,{open:t,onOpenChange:n=>a(n),children:e.jsxs(lt,{children:[e.jsxs(ct,{children:[e.jsx(ht,{children:"Editorial"}),e.jsx(pt,{children:"A simple CMS for static websites"})]}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx(E,{asChild:!0,variant:"ghost",children:e.jsxs(N,{to:"/doc",children:[e.jsx(gt,{size:14}),"Swagger API UI"]})}),e.jsx(E,{asChild:!0,variant:"ghost",children:e.jsxs(N,{to:"https://github.com/Lobelia-Earth/editorial",children:[e.jsx(ft,{size:14}),"GitHub repository"]})})]}),e.jsx(ut,{children:e.jsxs("p",{className:"flex items-center gap-1",children:["Created with",e.jsx(Xe,{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"})]})})]})})}function jt({className:t,orientation:a="horizontal",decorative:n=!0,...s}){return e.jsx(we,{"data-slot":"separator-root",decorative:n,orientation:a,className:i("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 vt({...t}){return e.jsx(U,{"data-slot":"sheet",...t})}function wt({...t}){return e.jsx(Y,{"data-slot":"sheet-portal",...t})}function yt({className:t,...a}){return e.jsx(J,{"data-slot":"sheet-overlay",className:i("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 Nt({className:t,children:a,side:n="right",...s}){return e.jsxs(wt,{children:[e.jsx(yt,{}),e.jsxs(W,{"data-slot":"sheet-content",className:i("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(Q,{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(ee,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Ct({className:t,...a}){return e.jsx("div",{"data-slot":"sheet-header",className:i("flex flex-col gap-1.5 p-4",t),...a})}function St({className:t,...a}){return e.jsx(X,{"data-slot":"sheet-title",className:i("text-foreground font-semibold",t),...a})}function _t({className:t,...a}){return e.jsx(Z,{"data-slot":"sheet-description",className:i("text-muted-foreground text-sm",t),...a})}function te({delayDuration:t=0,...a}){return e.jsx(ye,{"data-slot":"tooltip-provider",delayDuration:t,...a})}function kt({...t}){return e.jsx(te,{children:e.jsx(Ne,{"data-slot":"tooltip",...t})})}function Mt({...t}){return e.jsx(Ce,{"data-slot":"tooltip-trigger",...t})}function zt({className:t,sideOffset:a=0,children:n,...s}){return e.jsx(Se,{children:e.jsxs(_e,{"data-slot":"tooltip-content",sideOffset:a,className:i("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 Et(){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 Rt="sidebar_state",Dt=60*60*24*7,Ot="16rem",At="18rem",Pt="3rem",It="b",ae=d.createContext(null);function O(){const t=d.useContext(ae);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function Tt({defaultOpen:t=!0,open:a,onOpenChange:n,className:s,style:o,children:r,...l}){const p=Et(),[x,u]=d.useState(!1),[g,C]=d.useState(t),m=a??g,j=d.useCallback(h=>{const c=typeof h=="function"?h(m):h;n?n(c):C(c),document.cookie=`${Rt}=${c}; path=/; max-age=${Dt}`},[n,m]),v=d.useCallback(()=>p?u(h=>!h):j(h=>!h),[p,j,u]);d.useEffect(()=>{const h=c=>{c.key===It&&(c.metaKey||c.ctrlKey)&&(c.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:p,openMobile:x,setOpenMobile:u,toggleSidebar:v}),[y,m,j,p,x,u,v]);return e.jsx(ae.Provider,{value:S,children:e.jsx(te,{delayDuration:0,children:e.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Ot,"--sidebar-width-icon":Pt,...o},className:i("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",s),...l,children:r})})})}function $t({side:t="left",variant:a="sidebar",collapsible:n="offcanvas",className:s,children:o,...r}){const{isMobile:l,state:p,openMobile:x,setOpenMobile:u}=O();return n==="none"?e.jsx("div",{"data-slot":"sidebar",className:i("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",s),...r,children:o}):l?e.jsx(vt,{open:x,onOpenChange:u,...r,children:e.jsxs(Nt,{"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":At},side:t,children:[e.jsxs(Ct,{className:"sr-only",children:[e.jsx(St,{children:"Sidebar"}),e.jsx(_t,{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":p,"data-collapsible":p==="collapsed"?n:"","data-variant":a,"data-side":t,"data-slot":"sidebar",children:[e.jsx("div",{"data-slot":"sidebar-gap",className:i("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:i("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),...r,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 Lt({className:t,onClick:a,...n}){const{toggleSidebar:s}=O();return e.jsxs(E,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:i("size-7",t),onClick:o=>{a==null||a(o),s()},...n,children:[e.jsx(et,{}),e.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function Bt({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:i("flex flex-col gap-2 p-2",t),...a})}function Gt({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:i("flex flex-col gap-2 p-2",t),...a})}function Ht({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:i("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:i("relative flex w-full min-w-0 flex-col p-2",t),...a})}function L({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:i("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 B({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:i("w-full text-sm",t),...a})}function G({className:t,...a}){return e.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:i("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:i("group/menu-item relative",t),...a})}const Ft=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:r,...l}){const p=t?R:"button",{isMobile:x,state:u}=O(),g=e.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":s,"data-active":a,className:i(Ft({variant:n,size:s}),r),...l});return o?(typeof o=="string"&&(o={children:o}),e.jsxs(kt,{children:[e.jsx(Mt,{asChild:!0,children:g}),e.jsx(zt,{side:"right",align:"center",hidden:u!=="collapsed"||x,...o})]})):g}function qt({className:t,...a}){return e.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:i("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 Vt({asChild:t=!1,size:a="md",isActive:n=!1,className:s,...o}){const r=t?R:"a";return e.jsx(r,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":a,"data-active":n,className:i("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 H({singleton:t}){const{data:a}=K(),{data:n}=fe();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(re,{to:t?`/admin/dashboard/${s}/default`:`/admin/dashboard/${s}`,className:({isActive:r,isPending:l})=>l?"pending":r?"active":"",children:({isActive:r})=>e.jsx(Vt,{isActive:r,asChild:!0,children:e.jsxs("div",{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 k="Collapsible",[Kt,ca]=Oe(k),[Ut,A]=Kt(k),se=d.forwardRef((t,a)=>{const{__scopeCollapsible:n,open:s,defaultOpen:o,disabled:r,onOpenChange:l,...p}=t,[x,u]=De({prop:s,defaultProp:o??!1,onChange:l,caller:k});return e.jsx(Ut,{scope:n,disabled:r,contentId:Me(),open:x,onOpenToggle:d.useCallback(()=>u(g=>!g),[u]),children:e.jsx(D.div,{"data-state":I(x),"data-disabled":r?"":void 0,...p,ref:a})})});se.displayName=k;var ne="CollapsibleTrigger",oe=d.forwardRef((t,a)=>{const{__scopeCollapsible:n,...s}=t,o=A(ne,n);return e.jsx(D.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:Ae(t.onClick,o.onOpenToggle)})});oe.displayName=ne;var P="CollapsibleContent",ie=d.forwardRef((t,a)=>{const{forceMount:n,...s}=t,o=A(P,t.__scopeCollapsible);return e.jsx(Pe,{present:n||o.open,children:({present:r})=>e.jsx(Wt,{...s,ref:a,present:r})})});ie.displayName=P;var Wt=d.forwardRef((t,a)=>{const{__scopeCollapsible:n,present:s,children:o,...r}=t,l=A(P,n),[p,x]=d.useState(s),u=d.useRef(null),g=Re(a,u),C=d.useRef(0),m=C.current,j=d.useRef(0),v=j.current,y=l.open||p,S=d.useRef(y),h=d.useRef(void 0);return d.useEffect(()=>{const c=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(c)},[]),Ie(()=>{const c=u.current;if(c){h.current=h.current||{transitionDuration:c.style.transitionDuration,animationName:c.style.animationName},c.style.transitionDuration="0s",c.style.animationName="none";const T=c.getBoundingClientRect();C.current=T.height,j.current=T.width,S.current||(c.style.transitionDuration=h.current.transitionDuration,c.style.animationName=h.current.animationName),x(s)}},[l.open,s]),e.jsx(D.div,{"data-state":I(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!y,...r,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 Qt=se;function F({...t}){return e.jsx(Qt,{"data-slot":"collapsible",...t})}function q({...t}){return e.jsx(oe,{"data-slot":"collapsible-trigger",...t})}function V({...t}){return e.jsx(ie,{"data-slot":"collapsible-content",...t})}function Xt(){const t=pe(),[a,n]=d.useState(!1),[s]=be(),[o]=ge(),[r]=me(),{data:l}=je(),{data:p}=ve(),x=z(u=>u.auth.role);return e.jsxs($t,{className:"z-50",children:[e.jsx(mt,{isOpen:a,setOpen:n}),e.jsx(Bt,{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:l==null?void 0:l.name})})}),e.jsxs(Ht,{children:[e.jsxs(_,{children:[e.jsx(L,{children:"Content"}),e.jsx(B,{children:e.jsxs(G,{children:[e.jsx(F,{className:"group/collapsible",children:e.jsxs(w,{children:[e.jsx(q,{asChild:!0,children:e.jsxs(b,{className:"group",children:[e.jsx(We,{}),e.jsx("span",{children:"Collections"}),e.jsx($,{className:"transition-transform ml-auto -mr-[2px] group-data-[state=open]:rotate-180"})]})}),e.jsx(V,{children:e.jsx(H,{})})]})}),e.jsx(F,{className:"group/collapsible",children:e.jsxs(w,{children:[e.jsx(q,{asChild:!0,children:e.jsxs(b,{className:"group",children:[e.jsx(at,{}),e.jsx("span",{children:"Singles"}),e.jsx($,{className:"transition-transform ml-auto -mr-[2px] group-data-[state=open]:rotate-180"})]})}),e.jsx(V,{children:e.jsx(H,{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(_,{children:[e.jsx(L,{children:"Actions"}),e.jsx(B,{children:e.jsxs(G,{children:[x==="developer"&&e.jsxs(e.Fragment,{children:[e.jsx(w,{children:e.jsxs(b,{className:"cursor-pointer",onClick:()=>o(),children:[e.jsx($e,{}),e.jsx("span",{children:"Pull from repo"})]})}),e.jsx(w,{children:e.jsxs(b,{className:"cursor-pointer",onClick:()=>r(),children:[e.jsx(Be,{}),e.jsx("span",{children:"Push to repo"})]})})]}),e.jsx(w,{children:e.jsxs(b,{className:"cursor-pointer",onClick:()=>s(),children:[e.jsx(nt,{}),e.jsx("span",{children:"Publish"})]})})]})})]}),e.jsx(_,{})]}),e.jsxs(Gt,{children:[e.jsx(b,{asChild:!0,children:e.jsxs(N,{to:l==null?void 0:l.previewUrl,children:["Preview",e.jsx(ze,{className:"ml-auto"})]})}),e.jsx(b,{className:"cursor-pointer",onClick:()=>n(!0),children:"About"}),e.jsxs(b,{className:"cursor-pointer",onClick:()=>t(xe()),children:[e.jsx(Ye,{}),"Log out"]})]})]})}function Zt({children:t}){const a=de(),n=z(o=>o.auth.user),s=z(o=>o.auth.isLoading);return d.useEffect(()=>{!s&&!n&&a("/admin")},[s,a,n]),s||!n?null:t}function Yt(){const{pathname:t}=le(),{data:a}=K(),n=t.split("/").filter(s=>!["admin","dashboard"].includes(s)&&s!=="");return a?e.jsx(e.Fragment,{children:n.map((s,o,r)=>e.jsxs(ce.Fragment,{children:[r.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 ua=ue(function(){return e.jsx(Zt,{children:e.jsxs(Tt,{className:"flex h-full",children:[e.jsx(Xt,{}),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(Lt,{}),e.jsx(jt,{orientation:"vertical",className:"h-4"}),e.jsx(Yt,{})]})}),e.jsx(he,{})]})]})})});export{ua as default};