semaphor 0.0.55 → 0.0.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { P as A, b as w, j as e, Q as ps, R as fs, U as k, V as Gs, W as gs, X as js, Y as bs, Z as ys, _ as B, $ as ae, a0 as Js, J as Qs, O as Ae, a1 as Ra, a2 as _a, a3 as Ha, a4 as Ba, a5 as $a, a6 as Pa, a7 as Es, a8 as He, a9 as Ke, aa as Xe, T as vs, e as Ws, g as Ns, ab as Oe, ac as Me, f as Y, ad as Te, ae as Le, af as Be, ag as Ee, ah as X, ai as Cs, G as i, aj as Ue, ak as Ge, al as Ka, am as Je, w as Ys, v as Xs, t as he, an as Ua, r as Ga, N as Zs, s as Ja, ao as Qa, B as Wa, ap as ea, aq as Ya, L as $e, S as Ss, z as Xa, n as Ds, ar as ds, A as hs, u as ss, as as Ce, at as ze, au as sa, av as aa, aw as ta, ax as na, ay as ra, az as Za, aA as et, aB as la, aC as st, aD as at, aE as tt, aF as nt, aG as rt, aH as ms, aI as lt, aJ as _e, aK as us, aL as Fe, aM as xs, aN as Is, aO as it, aP as ot, aQ as ct, aR as dt, aS as ht, aT as is, aU as mt, aV as Vs, aW as ut, aX as qs, aY as xt, aZ as pt, a_ as ft, a$ as ia, l as gt, C as jt, E as Rs, d as bt, h as yt, i as vt, o as Nt, b0 as Ct, m as St, H as kt, b1 as wt, b2 as zt, b3 as Ft, b4 as os, b5 as Ot, b6 as cs, b7 as _s, K as Mt, b8 as Tt, b9 as ks, ba as Lt, bb as ws, bc as De, bd as oa, be as At, bf as Et, bg as Dt, bh as It, bi as Vt, bj as qt, bk as Se, bl as q, bm as R, bn as zs, bo as _, bp as Hs, bq as Rt, br as _t, bs as Ht, bt as Bt, bu as Bs, bv as $t, bw as Pt, bx as Kt, by as Ut, bz as Gt, bA as Jt } from "./index-4dMDhcWj.js";
1
+ import { P as A, b as w, j as e, Q as ps, R as fs, U as k, V as Gs, W as gs, X as js, Y as bs, Z as ys, _ as B, $ as ae, a0 as Js, J as Qs, O as Ae, a1 as Ra, a2 as _a, a3 as Ha, a4 as Ba, a5 as $a, a6 as Pa, a7 as Es, a8 as He, a9 as Ke, aa as Xe, T as vs, e as Ws, g as Ns, ab as Oe, ac as Me, f as Y, ad as Te, ae as Le, af as Be, ag as Ee, ah as X, ai as Cs, G as i, aj as Ue, ak as Ge, al as Ka, am as Je, w as Ys, v as Xs, t as he, an as Ua, r as Ga, N as Zs, s as Ja, ao as Qa, B as Wa, ap as ea, aq as Ya, L as $e, S as Ss, z as Xa, n as Ds, ar as ds, A as hs, u as ss, as as Ce, at as ze, au as sa, av as aa, aw as ta, ax as na, ay as ra, az as Za, aA as et, aB as la, aC as st, aD as at, aE as tt, aF as nt, aG as rt, aH as ms, aI as lt, aJ as _e, aK as us, aL as Fe, aM as xs, aN as Is, aO as it, aP as ot, aQ as ct, aR as dt, aS as ht, aT as is, aU as mt, aV as Vs, aW as ut, aX as qs, aY as xt, aZ as pt, a_ as ft, a$ as ia, l as gt, C as jt, E as Rs, d as bt, h as yt, i as vt, o as Nt, b0 as Ct, m as St, H as kt, b1 as wt, b2 as zt, b3 as Ft, b4 as os, b5 as Ot, b6 as cs, b7 as _s, K as Mt, b8 as Tt, b9 as ks, ba as Lt, bb as ws, bc as De, bd as oa, be as At, bf as Et, bg as Dt, bh as It, bi as Vt, bj as qt, bk as Se, bl as q, bm as R, bn as zs, bo as _, bp as Hs, bq as Rt, br as _t, bs as Ht, bt as Bt, bu as Bs, bv as $t, bw as Pt, bx as Kt, by as Ut, bz as Gt, bA as Jt } from "./index-zWnvf9QX.js";
2
2
  import me, { useState as T, useEffect as P, useMemo as Qt, useRef as Pe } from "react";
3
3
  /**
4
4
  * @license lucide-react v0.379.0 - ISC
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("./index-rFYihWWq.js"),f=require("react");/**
1
+ "use strict";const e=require("./index-4pZ8PdhQ.js"),f=require("react");/**
2
2
  * @license lucide-react v0.379.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -427,7 +427,7 @@ You can add a description to the \`${Sc}\` by passing a \`${M5}\` component as a
427
427
 
428
428
  Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Sc}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
429
429
 
430
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return V.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},vge=P5,bge=T5,j5=D5,z5=$5,B5=N5,V5=F5,H5=k5,W5=I5;const yge=vge,xge=bge,U5=V.forwardRef(({className:e,...t},n)=>O.jsx(j5,{className:Ce("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));U5.displayName=j5.displayName;const q5=V.forwardRef(({className:e,...t},n)=>O.jsx(xge,{children:O.jsxs(au,{children:[O.jsx(U5,{}),O.jsx(z5,{ref:n,className:Ce("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]})}));q5.displayName=z5.displayName;const G5=({className:e,...t})=>O.jsx("div",{className:Ce("flex flex-col space-y-2 text-center sm:text-left",e),...t});G5.displayName="AlertDialogHeader";const Y5=({className:e,...t})=>O.jsx("div",{className:Ce("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Y5.displayName="AlertDialogFooter";const K5=V.forwardRef(({className:e,...t},n)=>O.jsx(H5,{ref:n,className:Ce("text-lg font-semibold",e),...t}));K5.displayName=H5.displayName;const X5=V.forwardRef(({className:e,...t},n)=>O.jsx(W5,{ref:n,className:Ce("text-sm text-muted-foreground",e),...t}));X5.displayName=W5.displayName;const Q5=V.forwardRef(({className:e,...t},n)=>O.jsx(B5,{ref:n,className:Ce(Vd(),e),...t}));Q5.displayName=B5.displayName;const J5=V.forwardRef(({className:e,...t},n)=>O.jsx(V5,{ref:n,className:Ce(Vd({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));J5.displayName=V5.displayName;function wge({open:e,setOpen:t}){const n=ke(i=>i.selectedSheetId),{deleteSheet:r}=Mo();function o(){n&&(r(n),t(!1))}return O.jsx(yge,{open:e,onOpenChange:t,children:O.jsxs(q5,{children:[O.jsxs(G5,{children:[O.jsx(K5,{children:"Delete Sheet"}),O.jsx(X5,{children:"Are you sure you want to delete this sheet along with all its cards? This action cannot be undone."})]}),O.jsxs(Y5,{children:[O.jsx(J5,{children:"Cancel"}),O.jsx(Q5,{onClick:o,children:"Delete"})]})]})})}function Z5(){var b,x;const[e,t]=m.useState(!1),n=ke(w=>{var _;return(_=w.dashboard)==null?void 0:_.sheets}),{showAssistant:r}=ma(),o=m.useRef(null),[i,s]=m.useState(!1),a=ke(w=>w.isDashboardEditing),l=ke(w=>w.themeStyle);ke(w=>w.isVisualEditing);const c=ke(w=>w.selectedSheetId),{setSelectedSheetId:u,setSheetTitle:f,addSheet:h}=Mo();if(!n)return null;function g(w){var _,S;w?((_=o.current)==null||_.resize(35),s(!0)):(s(!1),(S=o.current)==null||S.resize(0))}function v(){const w={id:la(),title:"New Sheet"};h(w)}return O.jsxs(LD,{role:"dashboard-tabs-container",className:Ce("relative flex grow flex-col",l==null?void 0:l.dashboardTabsContainer),onValueChange:w=>{u(w)},value:c||n[0].id,children:[O.jsx("div",{children:(n.length>1||a)&&O.jsxs($w,{role:"tab-list",className:"flex h-11 items-center justify-start gap-2 rounded-none bg-transparent px-2.5 py-3",children:[n==null?void 0:n.map(w=>{var _,S;return O.jsx(is,{text:w.title,onSave:R=>f(w.id,R),children:O.jsxs(Aw,{style:{borderRadius:(S=(_=l==null?void 0:l.chart)==null?void 0:_.options)==null?void 0:S.borderRadius},onClick:()=>u(w.id),className:"flex items-center gap-1 rounded-none border px-2 py-1",value:w.id,children:[w.title,a&&c===w.id&&n.length>1&&O.jsx(Dm,{className:"ml-1 size-3",onClick:()=>t(!0)})]})},w.id)}),a&&O.jsx("div",{style:{borderRadius:(x=(b=l==null?void 0:l.chart)==null?void 0:b.options)==null?void 0:x.borderRadius},className:"flex h-7 items-center justify-center border-none bg-muted p-2 hover:cursor-pointer dark:border-l-background",onClick:v,children:O.jsx(R1,{className:"size-3"})})]})}),O.jsxs(YN,{className:"grow",direction:"horizontal",children:[O.jsx(iw,{children:O.jsx("div",{style:{},children:n==null?void 0:n.map(w=>O.jsx(kw,{className:Ce("mt-0",{"bg-muted":(l==null?void 0:l.canvasTheme)==="muted"||!(l!=null&&l.canvasTheme)}),value:w.id,children:O.jsx(Bae,{})},w.id))})}),r===!0&&O.jsxs(O.Fragment,{children:[O.jsx(npe,{open:i,onTabClick:g,withHandle:!0}),O.jsx(iw,{onResize:w=>{w<1?s(!1):i||s(!0)},defaultSize:0,ref:o,children:O.jsx(Ihe,{})})]})]}),O.jsx(wge,{open:e,setOpen:t})]})}function eL({children:e}){return O.jsx(mB,{defaultTheme:"system",storageKey:"vite-ui-theme",children:O.jsx(PJ,{delayDuration:0,children:e})})}function tL(e){return O.jsx(dk,{dashboardProps:e,children:O.jsx(eL,{children:O.jsx(ED,{...e,children:O.jsx(Z5,{})})})})}const nL=m.forwardRef((e,t)=>{const{children:n,...r}=e,o=m.Children.toArray(n),i=o.find(Sge);if(i){const s=i.props.children,a=o.map(l=>l===i?m.Children.count(s)>1?m.Children.only(null):m.isValidElement(s)?s.props.children:null:l);return m.createElement(lw,he({},r,{ref:t}),m.isValidElement(s)?m.cloneElement(s,void 0,a):null)}return m.createElement(lw,he({},r,{ref:t}),n)});nL.displayName="Slot";const lw=m.forwardRef((e,t)=>{const{children:n,...r}=e;return m.isValidElement(n)?m.cloneElement(n,{...Cge(r,n.props),ref:t?cs(t,n.ref):n.ref}):m.Children.count(n)>1?m.Children.only(null):null});lw.displayName="SlotClone";const _ge=({children:e})=>m.createElement(m.Fragment,null,e);function Sge(e){return m.isValidElement(e)&&e.type===_ge}function Cge(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const cw=["Enter"," "],Ege=["ArrowDown","PageUp","Home"],rL=["ArrowUp","PageDown","End"],Rge=[...Ege,...rL],Oge={ltr:[...cw,"ArrowRight"],rtl:[...cw,"ArrowLeft"]},Pge={ltr:["ArrowLeft"],rtl:["ArrowRight"]},cv="Menu",[ff,Tge,Dge]=um(cv),[Al,oL]=Zn(cv,[Dge,Ti,ou]),aS=Ti(),iL=ou(),[$ge,kl]=Al(cv),[Age,eh]=Al(cv),kge=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:s=!0}=e,a=aS(t),[l,c]=m.useState(null),u=m.useRef(!1),f=Ln(i),h=_l(o);return m.useEffect(()=>{const g=()=>{u.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>u.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),m.createElement(Bf,a,m.createElement($ge,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:c},m.createElement(Age,{scope:t,onClose:m.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:u,dir:h,modal:s},r)))},sL=m.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=aS(n);return m.createElement(Vf,he({},o,r,{ref:t}))}),aL="MenuPortal",[Mge,lL]=Al(aL,{forceMount:void 0}),Ige=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=kl(aL,t);return m.createElement(Mge,{scope:t,forceMount:n},m.createElement(er,{present:n||i.open},m.createElement(M1,{asChild:!0,container:o},r)))},Qo="MenuContent",[Nge,lS]=Al(Qo),Lge=m.forwardRef((e,t)=>{const n=lL(Qo,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=kl(Qo,e.__scopeMenu),s=eh(Qo,e.__scopeMenu);return m.createElement(ff.Provider,{scope:e.__scopeMenu},m.createElement(er,{present:r||i.open},m.createElement(ff.Slot,{scope:e.__scopeMenu},s.modal?m.createElement(Fge,he({},o,{ref:t})):m.createElement(jge,he({},o,{ref:t})))))}),Fge=m.forwardRef((e,t)=>{const n=kl(Qo,e.__scopeMenu),r=m.useRef(null),o=_t(t,r);return m.useEffect(()=>{const i=r.current;if(i)return Fm(i)},[]),m.createElement(cS,he({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Me(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),jge=m.forwardRef((e,t)=>{const n=kl(Qo,e.__scopeMenu);return m.createElement(cS,he({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),cS=m.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,onDismiss:g,disableOutsideScroll:v,...b}=e,x=kl(Qo,n),w=eh(Qo,n),_=aS(n),S=iL(n),R=Tge(n),[C,P]=m.useState(null),$=m.useRef(null),k=_t(t,$,x.onContentChange),I=m.useRef(0),A=m.useRef(""),L=m.useRef(0),j=m.useRef(null),K=m.useRef("right"),Z=m.useRef(0),B=v?r_:m.Fragment,Q=v?{as:nL,allowPinchZoom:!0}:void 0,W=oe=>{var D,H;const J=A.current+oe,N=R().filter(te=>!te.disabled),ce=document.activeElement,le=(D=N.find(te=>te.ref.current===ce))===null||D===void 0?void 0:D.textValue,de=N.map(te=>te.textValue),pe=ome(de,J,le),ie=(H=N.find(te=>te.textValue===pe))===null||H===void 0?void 0:H.ref.current;(function te(ae){A.current=ae,window.clearTimeout(I.current),ae!==""&&(I.current=window.setTimeout(()=>te(""),1e3))})(J),ie&&setTimeout(()=>ie.focus())};m.useEffect(()=>()=>window.clearTimeout(I.current),[]),Z1();const Y=m.useCallback(oe=>{var D,H;return K.current===((D=j.current)===null||D===void 0?void 0:D.side)&&sme(oe,(H=j.current)===null||H===void 0?void 0:H.area)},[]);return m.createElement(Nge,{scope:n,searchRef:A,onItemEnter:m.useCallback(oe=>{Y(oe)&&oe.preventDefault()},[Y]),onItemLeave:m.useCallback(oe=>{var D;Y(oe)||((D=$.current)===null||D===void 0||D.focus(),P(null))},[Y]),onTriggerLeave:m.useCallback(oe=>{Y(oe)&&oe.preventDefault()},[Y]),pointerGraceTimerRef:L,onPointerGraceIntentChange:m.useCallback(oe=>{j.current=oe},[])},m.createElement(B,Q,m.createElement(e_,{asChild:!0,trapped:o,onMountAutoFocus:Me(i,oe=>{var D;oe.preventDefault(),(D=$.current)===null||D===void 0||D.focus()}),onUnmountAutoFocus:s},m.createElement(jf,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,onDismiss:g},m.createElement(Pw,he({asChild:!0},S,{dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:P,onEntryFocus:Me(l,oe=>{w.isUsingKeyboardRef.current||oe.preventDefault()})}),m.createElement(Hf,he({role:"menu","aria-orientation":"vertical","data-state":hL(x.open),"data-radix-menu-content":"",dir:w.dir},_,b,{ref:k,style:{outline:"none",...b.style},onKeyDown:Me(b.onKeyDown,oe=>{const H=oe.target.closest("[data-radix-menu-content]")===oe.currentTarget,J=oe.ctrlKey||oe.altKey||oe.metaKey,N=oe.key.length===1;H&&(oe.key==="Tab"&&oe.preventDefault(),!J&&N&&W(oe.key));const ce=$.current;if(oe.target!==ce||!Rge.includes(oe.key))return;oe.preventDefault();const de=R().filter(pe=>!pe.disabled).map(pe=>pe.ref.current);rL.includes(oe.key)&&de.reverse(),nme(de)}),onBlur:Me(e.onBlur,oe=>{oe.currentTarget.contains(oe.target)||(window.clearTimeout(I.current),A.current="")}),onPointerMove:Me(e.onPointerMove,hf(oe=>{const D=oe.target,H=Z.current!==oe.clientX;if(oe.currentTarget.contains(D)&&H){const J=oe.clientX>Z.current?"right":"left";K.current=J,Z.current=oe.clientX}}))})))))))}),zge=m.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.createElement(Qe.div,he({role:"group"},r,{ref:t}))}),Bge=m.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.createElement(Qe.div,he({},r,{ref:t}))}),uw="MenuItem",O2="menu.itemSelect",uS=m.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=m.useRef(null),s=eh(uw,e.__scopeMenu),a=lS(uw,e.__scopeMenu),l=_t(t,i),c=m.useRef(!1),u=()=>{const f=i.current;if(!n&&f){const h=new CustomEvent(O2,{bubbles:!0,cancelable:!0});f.addEventListener(O2,g=>r==null?void 0:r(g),{once:!0}),OD(f,h),h.defaultPrevented?c.current=!1:s.onClose()}};return m.createElement(cL,he({},o,{ref:l,disabled:n,onClick:Me(e.onClick,u),onPointerDown:f=>{var h;(h=e.onPointerDown)===null||h===void 0||h.call(e,f),c.current=!0},onPointerUp:Me(e.onPointerUp,f=>{var h;c.current||(h=f.currentTarget)===null||h===void 0||h.click()}),onKeyDown:Me(e.onKeyDown,f=>{const h=a.searchRef.current!=="";n||h&&f.key===" "||cw.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})}))}),cL=m.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,s=lS(uw,n),a=iL(n),l=m.useRef(null),c=_t(t,l),[u,f]=m.useState(!1),[h,g]=m.useState("");return m.useEffect(()=>{const v=l.current;if(v){var b;g(((b=v.textContent)!==null&&b!==void 0?b:"").trim())}},[i.children]),m.createElement(ff.ItemSlot,{scope:n,disabled:r,textValue:o??h},m.createElement(Tw,he({asChild:!0},a,{focusable:!r}),m.createElement(Qe.div,he({role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},i,{ref:c,onPointerMove:Me(e.onPointerMove,hf(v=>{r?s.onItemLeave(v):(s.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus())})),onPointerLeave:Me(e.onPointerLeave,hf(v=>s.onItemLeave(v))),onFocus:Me(e.onFocus,()=>f(!0)),onBlur:Me(e.onBlur,()=>f(!1))}))))}),Vge=m.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return m.createElement(dL,{scope:e.__scopeMenu,checked:n},m.createElement(uS,he({role:"menuitemcheckbox","aria-checked":Jg(n)?"mixed":n},o,{ref:t,"data-state":dS(n),onSelect:Me(o.onSelect,()=>r==null?void 0:r(Jg(n)?!0:!n),{checkForDefaultPrevented:!1})})))}),Hge="MenuRadioGroup",[Wge,Uge]=Al(Hge,{value:void 0,onValueChange:()=>{}}),qge=m.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=Ln(r);return m.createElement(Wge,{scope:e.__scopeMenu,value:n,onValueChange:i},m.createElement(zge,he({},o,{ref:t})))}),Gge="MenuRadioItem",Yge=m.forwardRef((e,t)=>{const{value:n,...r}=e,o=Uge(Gge,e.__scopeMenu),i=n===o.value;return m.createElement(dL,{scope:e.__scopeMenu,checked:i},m.createElement(uS,he({role:"menuitemradio","aria-checked":i},r,{ref:t,"data-state":dS(i),onSelect:Me(r.onSelect,()=>{var s;return(s=o.onValueChange)===null||s===void 0?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})))}),uL="MenuItemIndicator",[dL,Kge]=Al(uL,{checked:!1}),Xge=m.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=Kge(uL,n);return m.createElement(er,{present:r||Jg(i.checked)||i.checked===!0},m.createElement(Qe.span,he({},o,{ref:t,"data-state":dS(i.checked)})))}),Qge=m.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.createElement(Qe.div,he({role:"separator","aria-orientation":"horizontal"},r,{ref:t}))}),Jge="MenuSub",[Cye,fL]=Al(Jge),Hp="MenuSubTrigger",Zge=m.forwardRef((e,t)=>{const n=kl(Hp,e.__scopeMenu),r=eh(Hp,e.__scopeMenu),o=fL(Hp,e.__scopeMenu),i=lS(Hp,e.__scopeMenu),s=m.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=i,c={__scopeMenu:e.__scopeMenu},u=m.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return m.useEffect(()=>u,[u]),m.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),l(null)}},[a,l]),m.createElement(sL,he({asChild:!0},c),m.createElement(cL,he({id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":hL(n.open)},e,{ref:cs(t,o.onTriggerChange),onClick:f=>{var h;(h=e.onClick)===null||h===void 0||h.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Me(e.onPointerMove,hf(f=>{i.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(i.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:Me(e.onPointerLeave,hf(f=>{var h;u();const g=(h=n.content)===null||h===void 0?void 0:h.getBoundingClientRect();if(g){var v;const b=(v=n.content)===null||v===void 0?void 0:v.dataset.side,x=b==="right",w=x?-5:5,_=g[x?"left":"right"],S=g[x?"right":"left"];i.onPointerGraceIntentChange({area:[{x:f.clientX+w,y:f.clientY},{x:_,y:g.top},{x:S,y:g.top},{x:S,y:g.bottom},{x:_,y:g.bottom}],side:b}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(f),f.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:Me(e.onKeyDown,f=>{const h=i.searchRef.current!=="";if(!(e.disabled||h&&f.key===" ")&&Oge[r.dir].includes(f.key)){var g;n.onOpenChange(!0),(g=n.content)===null||g===void 0||g.focus(),f.preventDefault()}})})))}),eme="MenuSubContent",tme=m.forwardRef((e,t)=>{const n=lL(Qo,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=kl(Qo,e.__scopeMenu),s=eh(Qo,e.__scopeMenu),a=fL(eme,e.__scopeMenu),l=m.useRef(null),c=_t(t,l);return m.createElement(ff.Provider,{scope:e.__scopeMenu},m.createElement(er,{present:r||i.open},m.createElement(ff.Slot,{scope:e.__scopeMenu},m.createElement(cS,he({id:a.contentId,"aria-labelledby":a.triggerId},o,{ref:c,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{var f;s.isUsingKeyboardRef.current&&((f=l.current)===null||f===void 0||f.focus()),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:Me(e.onFocusOutside,u=>{u.target!==a.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:Me(e.onEscapeKeyDown,u=>{s.onClose(),u.preventDefault()}),onKeyDown:Me(e.onKeyDown,u=>{const f=u.currentTarget.contains(u.target),h=Pge[s.dir].includes(u.key);if(f&&h){var g;i.onOpenChange(!1),(g=a.trigger)===null||g===void 0||g.focus(),u.preventDefault()}})})))))});function hL(e){return e?"open":"closed"}function Jg(e){return e==="indeterminate"}function dS(e){return Jg(e)?"indeterminate":e?"checked":"unchecked"}function nme(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function rme(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function ome(e,t,n){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=rme(e,Math.max(i,0));o.length===1&&(s=s.filter(c=>c!==n));const l=s.find(c=>c.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function ime(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i].x,l=t[i].y,c=t[s].x,u=t[s].y;l>r!=u>r&&n<(c-a)*(r-l)/(u-l)+a&&(o=!o)}return o}function sme(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return ime(n,t)}function hf(e){return t=>t.pointerType==="mouse"?e(t):void 0}const ame=kge,lme=sL,cme=Ige,ume=Lge,dme=Bge,fme=uS,hme=Vge,pme=qge,gme=Yge,mme=Xge,vme=Qge,bme=Zge,yme=tme,pL="DropdownMenu",[xme,Eye]=Zn(pL,[oL]),ho=oL(),[wme,gL]=xme(pL),_me=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:s,modal:a=!0}=e,l=ho(t),c=m.useRef(null),[u=!1,f]=xr({prop:o,defaultProp:i,onChange:s});return m.createElement(wme,{scope:t,triggerId:Jo(),triggerRef:c,contentId:Jo(),open:u,onOpenChange:f,onOpenToggle:m.useCallback(()=>f(h=>!h),[f]),modal:a},m.createElement(ame,he({},l,{open:u,onOpenChange:f,dir:r,modal:a}),n))},Sme="DropdownMenuTrigger",Cme=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=gL(Sme,n),s=ho(n);return m.createElement(lme,he({asChild:!0},s),m.createElement(Qe.button,he({type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r},o,{ref:cs(t,i.triggerRef),onPointerDown:Me(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(i.onOpenToggle(),i.open||a.preventDefault())}),onKeyDown:Me(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&i.onOpenToggle(),a.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})))}),Eme=e=>{const{__scopeDropdownMenu:t,...n}=e,r=ho(t);return m.createElement(cme,he({},r,n))},Rme="DropdownMenuContent",Ome=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=gL(Rme,n),i=ho(n),s=m.useRef(!1);return m.createElement(ume,he({id:o.contentId,"aria-labelledby":o.triggerId},i,r,{ref:t,onCloseAutoFocus:Me(e.onCloseAutoFocus,a=>{var l;s.current||(l=o.triggerRef.current)===null||l===void 0||l.focus(),s.current=!1,a.preventDefault()}),onInteractOutside:Me(e.onInteractOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;(!o.modal||u)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),Pme=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ho(n);return m.createElement(dme,he({},o,r,{ref:t}))}),Tme=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ho(n);return m.createElement(fme,he({},o,r,{ref:t}))}),Dme=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ho(n);return m.createElement(hme,he({},o,r,{ref:t}))}),$me=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ho(n);return m.createElement(pme,he({},o,r,{ref:t}))}),Ame=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ho(n);return m.createElement(gme,he({},o,r,{ref:t}))}),kme=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ho(n);return m.createElement(mme,he({},o,r,{ref:t}))}),Mme=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ho(n);return m.createElement(vme,he({},o,r,{ref:t}))}),Ime=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ho(n);return m.createElement(bme,he({},o,r,{ref:t}))}),Nme=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ho(n);return m.createElement(yme,he({},o,r,{ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),Lme=_me,Fme=Cme,jme=Eme,mL=Ome,vL=Pme,bL=Tme,yL=Dme,zme=$me,xL=Ame,wL=kme,_L=Mme,SL=Ime,CL=Nme,Bme=Lme,Vme=Fme,Hme=zme,Wme=V.forwardRef(({className:e,inset:t,children:n,...r},o)=>O.jsxs(SL,{ref:o,className:Ce("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,O.jsx(C1,{className:"ml-auto h-4 w-4"})]}));Wme.displayName=SL.displayName;const Ume=V.forwardRef(({className:e,...t},n)=>O.jsx(CL,{ref:n,className:Ce("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[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",e),...t}));Ume.displayName=CL.displayName;const EL=V.forwardRef(({className:e,sideOffset:t=4,...n},r)=>O.jsx(jme,{children:O.jsx(au,{children:O.jsx(mL,{ref:r,sideOffset:t,className:Ce("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[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",e),...n})})}));EL.displayName=mL.displayName;const qme=V.forwardRef(({className:e,inset:t,...n},r)=>O.jsx(bL,{ref:r,className:Ce("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));qme.displayName=bL.displayName;const Gme=V.forwardRef(({className:e,children:t,checked:n,...r},o)=>O.jsxs(yL,{ref:o,className:Ce("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[O.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:O.jsx(wL,{children:O.jsx(Ff,{className:"h-4 w-4"})})}),t]}));Gme.displayName=yL.displayName;const RL=V.forwardRef(({className:e,children:t,...n},r)=>O.jsxs(xL,{ref:r,className:Ce("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[O.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:O.jsx(wL,{children:O.jsx(LA,{className:"h-2 w-2 fill-current"})})}),t]}));RL.displayName=xL.displayName;const OL=V.forwardRef(({className:e,inset:t,...n},r)=>O.jsx(vL,{ref:r,className:Ce("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));OL.displayName=vL.displayName;const PL=V.forwardRef(({className:e,...t},n)=>O.jsx(_L,{ref:n,className:Ce("-mx-1 my-1 h-px bg-muted",e),...t}));PL.displayName=_L.displayName;function Yme(e){var t;return{...e,sheets:(t=e==null?void 0:e.sheets)==null?void 0:t.map(n=>{var r;return{...n,frames:(r=n.frames)==null?void 0:r.map(o=>{var i;return{...o,cards:(i=o.cards)==null?void 0:i.map(s=>TL(s))}})}})}}function TL(e){var t,n,r,o;return{...e,cfg:{...e.cfg,data:{...(t=e.cfg)==null?void 0:t.data,labels:[],datasets:(o=(r=(n=e.cfg)==null?void 0:n.data)==null?void 0:r.datasets)==null?void 0:o.map(i=>({...i,data:[]}))}},customCfg:Kme(e.customCfg),data:[]}}function Kme(e){var t,n;return e?{...e,data:{...e==null?void 0:e.data,labels:[],datasets:(n=(t=e==null?void 0:e.data)==null?void 0:t.datasets)==null?void 0:n.map(r=>({...r,data:[]}))}}:null}function DL(e){return`semaphor:bookmark:${e}`}const Xme=C5,Qme=E5,Jme=R5,$L=V.forwardRef(({className:e,...t},n)=>O.jsx(nS,{ref:n,className:Ce("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));$L.displayName=nS.displayName;const AL=V.forwardRef(({className:e,children:t,...n},r)=>O.jsx(Jme,{children:O.jsxs(au,{children:[O.jsx($L,{}),O.jsxs(rS,{ref:r,className:Ce("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,O.jsxs(sS,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[O.jsx(Dm,{className:"h-4 w-4"}),O.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}));AL.displayName=rS.displayName;const kL=({className:e,...t})=>O.jsx("div",{className:Ce("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});kL.displayName="DialogHeader";const ML=({className:e,...t})=>O.jsx("div",{className:Ce("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ML.displayName="DialogFooter";const IL=V.forwardRef(({className:e,...t},n)=>O.jsx(oS,{ref:n,className:Ce("text-lg font-semibold leading-none tracking-tight",e),...t}));IL.displayName=oS.displayName;const NL=V.forwardRef(({className:e,...t},n)=>O.jsx(iS,{ref:n,className:Ce("text-sm text-muted-foreground",e),...t}));NL.displayName=iS.displayName;const LL="Checkbox",[Zme,Rye]=Zn(LL),[eve,tve]=Zme(LL),nve=m.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:s,disabled:a,value:l="on",onCheckedChange:c,...u}=e,[f,h]=m.useState(null),g=_t(t,S=>h(S)),v=m.useRef(!1),b=f?!!f.closest("form"):!0,[x=!1,w]=xr({prop:o,defaultProp:i,onChange:c}),_=m.useRef(x);return m.useEffect(()=>{const S=f==null?void 0:f.form;if(S){const R=()=>w(_.current);return S.addEventListener("reset",R),()=>S.removeEventListener("reset",R)}},[f,w]),m.createElement(eve,{scope:n,state:x,disabled:a},m.createElement(Qe.button,he({type:"button",role:"checkbox","aria-checked":dl(x)?"mixed":x,"aria-required":s,"data-state":FL(x),"data-disabled":a?"":void 0,disabled:a,value:l},u,{ref:g,onKeyDown:Me(e.onKeyDown,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:Me(e.onClick,S=>{w(R=>dl(R)?!0:!R),b&&(v.current=S.isPropagationStopped(),v.current||S.stopPropagation())})})),b&&m.createElement(ive,{control:f,bubbles:!v.current,name:r,value:l,checked:x,required:s,disabled:a,style:{transform:"translateX(-100%)"}}))}),rve="CheckboxIndicator",ove=m.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=tve(rve,n);return m.createElement(er,{present:r||dl(i.state)||i.state===!0},m.createElement(Qe.span,he({"data-state":FL(i.state),"data-disabled":i.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))}),ive=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=m.useRef(null),s=Lm(n),a=km(t);return m.useEffect(()=>{const l=i.current,c=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(c,"checked").set;if(s!==n&&f){const h=new Event("click",{bubbles:r});l.indeterminate=dl(n),f.call(l,dl(n)?!1:n),l.dispatchEvent(h)}},[s,n,r]),m.createElement("input",he({type:"checkbox","aria-hidden":!0,defaultChecked:dl(n)?!1:n},o,{tabIndex:-1,ref:i,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function dl(e){return e==="indeterminate"}function FL(e){return dl(e)?"indeterminate":e?"checked":"unchecked"}const jL=nve,sve=ove,zL=V.forwardRef(({className:e,...t},n)=>O.jsx(jL,{ref:n,className:Ce("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:O.jsx(sve,{className:Ce("flex items-center justify-center text-current"),children:O.jsx(Ff,{className:"h-4 w-4"})})}));zL.displayName=jL.displayName;const BL=m.forwardRef(({className:e,...t},n)=>O.jsx("div",{role:"editor-panel",ref:n,className:Ce("flex grow h-full",e),...t}));BL.displayName="EditorPanel";const VL=m.forwardRef(({className:e,...t},n)=>O.jsx("div",{ref:n,className:Ce(" flex flex-col space-y-2 w-[270px]",e),...t}));VL.displayName="EditorAside";const HL=m.forwardRef(({className:e,...t},n)=>O.jsx("div",{ref:n,className:Ce(" grow",e),...t}));HL.displayName="EditorMain";function ave(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function T2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?P2(Object(n),!0).forEach(function(r){ave(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lve(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function cve(e,t){if(e==null)return{};var n=lve(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uve(e,t){return dve(e)||fve(e,t)||hve(e,t)||pve()}function dve(e){if(Array.isArray(e))return e}function fve(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,o=!1,i=void 0;try{for(var s=e[Symbol.iterator](),a;!(r=(a=s.next()).done)&&(n.push(a.value),!(t&&n.length===t));r=!0);}catch(l){o=!0,i=l}finally{try{!r&&s.return!=null&&s.return()}finally{if(o)throw i}}return n}}function hve(e,t){if(e){if(typeof e=="string")return D2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return D2(e,t)}}function D2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
430
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return V.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},vge=P5,bge=T5,j5=D5,z5=$5,B5=N5,V5=F5,H5=k5,W5=I5;const yge=vge,xge=bge,U5=V.forwardRef(({className:e,...t},n)=>O.jsx(j5,{className:Ce("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));U5.displayName=j5.displayName;const q5=V.forwardRef(({className:e,...t},n)=>O.jsx(xge,{children:O.jsxs(au,{children:[O.jsx(U5,{}),O.jsx(z5,{ref:n,className:Ce("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]})}));q5.displayName=z5.displayName;const G5=({className:e,...t})=>O.jsx("div",{className:Ce("flex flex-col space-y-2 text-center sm:text-left",e),...t});G5.displayName="AlertDialogHeader";const Y5=({className:e,...t})=>O.jsx("div",{className:Ce("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Y5.displayName="AlertDialogFooter";const K5=V.forwardRef(({className:e,...t},n)=>O.jsx(H5,{ref:n,className:Ce("text-lg font-semibold",e),...t}));K5.displayName=H5.displayName;const X5=V.forwardRef(({className:e,...t},n)=>O.jsx(W5,{ref:n,className:Ce("text-sm text-muted-foreground",e),...t}));X5.displayName=W5.displayName;const Q5=V.forwardRef(({className:e,...t},n)=>O.jsx(B5,{ref:n,className:Ce(Vd(),e),...t}));Q5.displayName=B5.displayName;const J5=V.forwardRef(({className:e,...t},n)=>O.jsx(V5,{ref:n,className:Ce(Vd({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));J5.displayName=V5.displayName;function wge({open:e,setOpen:t}){const n=ke(i=>i.selectedSheetId),{deleteSheet:r}=Mo();function o(){n&&(r(n),t(!1))}return O.jsx(yge,{open:e,onOpenChange:t,children:O.jsxs(q5,{children:[O.jsxs(G5,{children:[O.jsx(K5,{children:"Delete Sheet"}),O.jsx(X5,{children:"Are you sure you want to delete this sheet along with all its cards? This action cannot be undone."})]}),O.jsxs(Y5,{children:[O.jsx(J5,{children:"Cancel"}),O.jsx(Q5,{onClick:o,children:"Delete"})]})]})})}function Z5(){var b,x;const[e,t]=m.useState(!1),n=ke(w=>{var _;return(_=w.dashboard)==null?void 0:_.sheets}),{showAssistant:r}=ma(),o=m.useRef(null),[i,s]=m.useState(!1),a=ke(w=>w.isDashboardEditing),l=ke(w=>w.themeStyle);ke(w=>w.isVisualEditing);const c=ke(w=>w.selectedSheetId),{setSelectedSheetId:u,setSheetTitle:f,addSheet:h}=Mo();if(!n)return null;function g(w){var _,S;w?((_=o.current)==null||_.resize(35),s(!0)):(s(!1),(S=o.current)==null||S.resize(0))}function v(){const w={id:la(),title:"New Sheet"};h(w)}return O.jsxs(LD,{role:"dashboard-tabs-container",className:Ce("relative flex grow flex-col",l==null?void 0:l.dashboardTabsContainer),onValueChange:w=>{u(w)},value:c||n[0].id,children:[O.jsx("div",{children:(n.length>1||a)&&O.jsxs($w,{role:"tab-list",className:"flex h-11 items-center justify-start gap-2 rounded-none bg-transparent px-2.5 py-3",children:[n==null?void 0:n.map(w=>{var _,S;return O.jsx(is,{text:w.title,onSave:R=>f(w.id,R),children:O.jsxs(Aw,{style:{borderRadius:(S=(_=l==null?void 0:l.chart)==null?void 0:_.options)==null?void 0:S.borderRadius},onClick:()=>u(w.id),className:"flex items-center gap-1 rounded-none border px-2 py-1",value:w.id,children:[w.title,a&&c===w.id&&n.length>1&&O.jsx(Dm,{className:"ml-1 size-3",onClick:()=>t(!0)})]})},w.id)}),a&&O.jsx("div",{style:{borderRadius:(x=(b=l==null?void 0:l.chart)==null?void 0:b.options)==null?void 0:x.borderRadius},className:"flex h-7 items-center justify-center border-none bg-muted p-2 hover:cursor-pointer dark:border-l-background",onClick:v,children:O.jsx(R1,{className:"size-3"})})]})}),O.jsxs(YN,{className:"grow",direction:"horizontal",children:[O.jsx(iw,{children:O.jsx("div",{style:{},children:n==null?void 0:n.map(w=>O.jsx(kw,{className:Ce("mt-0",{"bg-muted":(l==null?void 0:l.canvasTheme)==="muted"||!(l!=null&&l.canvasTheme)}),value:w.id,children:O.jsx(Bae,{})},w.id))})}),r===!0&&O.jsxs(O.Fragment,{children:[O.jsx(npe,{open:i,onTabClick:g,withHandle:!0}),O.jsx(iw,{onResize:w=>{w<1?s(!1):i||s(!0)},defaultSize:0,ref:o,children:O.jsx(Ihe,{})})]})]}),O.jsx(wge,{open:e,setOpen:t})]})}function eL({children:e}){return O.jsx(mB,{defaultTheme:"system",storageKey:"vite-ui-theme",children:O.jsx(PJ,{delayDuration:0,children:e})})}function tL(e){return typeof document>"u"?null:O.jsx(dk,{dashboardProps:e,children:O.jsx(eL,{children:O.jsx(ED,{...e,children:O.jsx(Z5,{})})})})}const nL=m.forwardRef((e,t)=>{const{children:n,...r}=e,o=m.Children.toArray(n),i=o.find(Sge);if(i){const s=i.props.children,a=o.map(l=>l===i?m.Children.count(s)>1?m.Children.only(null):m.isValidElement(s)?s.props.children:null:l);return m.createElement(lw,he({},r,{ref:t}),m.isValidElement(s)?m.cloneElement(s,void 0,a):null)}return m.createElement(lw,he({},r,{ref:t}),n)});nL.displayName="Slot";const lw=m.forwardRef((e,t)=>{const{children:n,...r}=e;return m.isValidElement(n)?m.cloneElement(n,{...Cge(r,n.props),ref:t?cs(t,n.ref):n.ref}):m.Children.count(n)>1?m.Children.only(null):null});lw.displayName="SlotClone";const _ge=({children:e})=>m.createElement(m.Fragment,null,e);function Sge(e){return m.isValidElement(e)&&e.type===_ge}function Cge(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const cw=["Enter"," "],Ege=["ArrowDown","PageUp","Home"],rL=["ArrowUp","PageDown","End"],Rge=[...Ege,...rL],Oge={ltr:[...cw,"ArrowRight"],rtl:[...cw,"ArrowLeft"]},Pge={ltr:["ArrowLeft"],rtl:["ArrowRight"]},cv="Menu",[ff,Tge,Dge]=um(cv),[Al,oL]=Zn(cv,[Dge,Ti,ou]),aS=Ti(),iL=ou(),[$ge,kl]=Al(cv),[Age,eh]=Al(cv),kge=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:s=!0}=e,a=aS(t),[l,c]=m.useState(null),u=m.useRef(!1),f=Ln(i),h=_l(o);return m.useEffect(()=>{const g=()=>{u.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>u.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),m.createElement(Bf,a,m.createElement($ge,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:c},m.createElement(Age,{scope:t,onClose:m.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:u,dir:h,modal:s},r)))},sL=m.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=aS(n);return m.createElement(Vf,he({},o,r,{ref:t}))}),aL="MenuPortal",[Mge,lL]=Al(aL,{forceMount:void 0}),Ige=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=kl(aL,t);return m.createElement(Mge,{scope:t,forceMount:n},m.createElement(er,{present:n||i.open},m.createElement(M1,{asChild:!0,container:o},r)))},Qo="MenuContent",[Nge,lS]=Al(Qo),Lge=m.forwardRef((e,t)=>{const n=lL(Qo,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=kl(Qo,e.__scopeMenu),s=eh(Qo,e.__scopeMenu);return m.createElement(ff.Provider,{scope:e.__scopeMenu},m.createElement(er,{present:r||i.open},m.createElement(ff.Slot,{scope:e.__scopeMenu},s.modal?m.createElement(Fge,he({},o,{ref:t})):m.createElement(jge,he({},o,{ref:t})))))}),Fge=m.forwardRef((e,t)=>{const n=kl(Qo,e.__scopeMenu),r=m.useRef(null),o=_t(t,r);return m.useEffect(()=>{const i=r.current;if(i)return Fm(i)},[]),m.createElement(cS,he({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Me(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),jge=m.forwardRef((e,t)=>{const n=kl(Qo,e.__scopeMenu);return m.createElement(cS,he({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),cS=m.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,onDismiss:g,disableOutsideScroll:v,...b}=e,x=kl(Qo,n),w=eh(Qo,n),_=aS(n),S=iL(n),R=Tge(n),[C,P]=m.useState(null),$=m.useRef(null),k=_t(t,$,x.onContentChange),I=m.useRef(0),A=m.useRef(""),L=m.useRef(0),j=m.useRef(null),K=m.useRef("right"),Z=m.useRef(0),B=v?r_:m.Fragment,Q=v?{as:nL,allowPinchZoom:!0}:void 0,W=oe=>{var D,H;const J=A.current+oe,N=R().filter(te=>!te.disabled),ce=document.activeElement,le=(D=N.find(te=>te.ref.current===ce))===null||D===void 0?void 0:D.textValue,de=N.map(te=>te.textValue),pe=ome(de,J,le),ie=(H=N.find(te=>te.textValue===pe))===null||H===void 0?void 0:H.ref.current;(function te(ae){A.current=ae,window.clearTimeout(I.current),ae!==""&&(I.current=window.setTimeout(()=>te(""),1e3))})(J),ie&&setTimeout(()=>ie.focus())};m.useEffect(()=>()=>window.clearTimeout(I.current),[]),Z1();const Y=m.useCallback(oe=>{var D,H;return K.current===((D=j.current)===null||D===void 0?void 0:D.side)&&sme(oe,(H=j.current)===null||H===void 0?void 0:H.area)},[]);return m.createElement(Nge,{scope:n,searchRef:A,onItemEnter:m.useCallback(oe=>{Y(oe)&&oe.preventDefault()},[Y]),onItemLeave:m.useCallback(oe=>{var D;Y(oe)||((D=$.current)===null||D===void 0||D.focus(),P(null))},[Y]),onTriggerLeave:m.useCallback(oe=>{Y(oe)&&oe.preventDefault()},[Y]),pointerGraceTimerRef:L,onPointerGraceIntentChange:m.useCallback(oe=>{j.current=oe},[])},m.createElement(B,Q,m.createElement(e_,{asChild:!0,trapped:o,onMountAutoFocus:Me(i,oe=>{var D;oe.preventDefault(),(D=$.current)===null||D===void 0||D.focus()}),onUnmountAutoFocus:s},m.createElement(jf,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,onDismiss:g},m.createElement(Pw,he({asChild:!0},S,{dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:P,onEntryFocus:Me(l,oe=>{w.isUsingKeyboardRef.current||oe.preventDefault()})}),m.createElement(Hf,he({role:"menu","aria-orientation":"vertical","data-state":hL(x.open),"data-radix-menu-content":"",dir:w.dir},_,b,{ref:k,style:{outline:"none",...b.style},onKeyDown:Me(b.onKeyDown,oe=>{const H=oe.target.closest("[data-radix-menu-content]")===oe.currentTarget,J=oe.ctrlKey||oe.altKey||oe.metaKey,N=oe.key.length===1;H&&(oe.key==="Tab"&&oe.preventDefault(),!J&&N&&W(oe.key));const ce=$.current;if(oe.target!==ce||!Rge.includes(oe.key))return;oe.preventDefault();const de=R().filter(pe=>!pe.disabled).map(pe=>pe.ref.current);rL.includes(oe.key)&&de.reverse(),nme(de)}),onBlur:Me(e.onBlur,oe=>{oe.currentTarget.contains(oe.target)||(window.clearTimeout(I.current),A.current="")}),onPointerMove:Me(e.onPointerMove,hf(oe=>{const D=oe.target,H=Z.current!==oe.clientX;if(oe.currentTarget.contains(D)&&H){const J=oe.clientX>Z.current?"right":"left";K.current=J,Z.current=oe.clientX}}))})))))))}),zge=m.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.createElement(Qe.div,he({role:"group"},r,{ref:t}))}),Bge=m.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.createElement(Qe.div,he({},r,{ref:t}))}),uw="MenuItem",O2="menu.itemSelect",uS=m.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=m.useRef(null),s=eh(uw,e.__scopeMenu),a=lS(uw,e.__scopeMenu),l=_t(t,i),c=m.useRef(!1),u=()=>{const f=i.current;if(!n&&f){const h=new CustomEvent(O2,{bubbles:!0,cancelable:!0});f.addEventListener(O2,g=>r==null?void 0:r(g),{once:!0}),OD(f,h),h.defaultPrevented?c.current=!1:s.onClose()}};return m.createElement(cL,he({},o,{ref:l,disabled:n,onClick:Me(e.onClick,u),onPointerDown:f=>{var h;(h=e.onPointerDown)===null||h===void 0||h.call(e,f),c.current=!0},onPointerUp:Me(e.onPointerUp,f=>{var h;c.current||(h=f.currentTarget)===null||h===void 0||h.click()}),onKeyDown:Me(e.onKeyDown,f=>{const h=a.searchRef.current!=="";n||h&&f.key===" "||cw.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})}))}),cL=m.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,s=lS(uw,n),a=iL(n),l=m.useRef(null),c=_t(t,l),[u,f]=m.useState(!1),[h,g]=m.useState("");return m.useEffect(()=>{const v=l.current;if(v){var b;g(((b=v.textContent)!==null&&b!==void 0?b:"").trim())}},[i.children]),m.createElement(ff.ItemSlot,{scope:n,disabled:r,textValue:o??h},m.createElement(Tw,he({asChild:!0},a,{focusable:!r}),m.createElement(Qe.div,he({role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},i,{ref:c,onPointerMove:Me(e.onPointerMove,hf(v=>{r?s.onItemLeave(v):(s.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus())})),onPointerLeave:Me(e.onPointerLeave,hf(v=>s.onItemLeave(v))),onFocus:Me(e.onFocus,()=>f(!0)),onBlur:Me(e.onBlur,()=>f(!1))}))))}),Vge=m.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return m.createElement(dL,{scope:e.__scopeMenu,checked:n},m.createElement(uS,he({role:"menuitemcheckbox","aria-checked":Jg(n)?"mixed":n},o,{ref:t,"data-state":dS(n),onSelect:Me(o.onSelect,()=>r==null?void 0:r(Jg(n)?!0:!n),{checkForDefaultPrevented:!1})})))}),Hge="MenuRadioGroup",[Wge,Uge]=Al(Hge,{value:void 0,onValueChange:()=>{}}),qge=m.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=Ln(r);return m.createElement(Wge,{scope:e.__scopeMenu,value:n,onValueChange:i},m.createElement(zge,he({},o,{ref:t})))}),Gge="MenuRadioItem",Yge=m.forwardRef((e,t)=>{const{value:n,...r}=e,o=Uge(Gge,e.__scopeMenu),i=n===o.value;return m.createElement(dL,{scope:e.__scopeMenu,checked:i},m.createElement(uS,he({role:"menuitemradio","aria-checked":i},r,{ref:t,"data-state":dS(i),onSelect:Me(r.onSelect,()=>{var s;return(s=o.onValueChange)===null||s===void 0?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})))}),uL="MenuItemIndicator",[dL,Kge]=Al(uL,{checked:!1}),Xge=m.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=Kge(uL,n);return m.createElement(er,{present:r||Jg(i.checked)||i.checked===!0},m.createElement(Qe.span,he({},o,{ref:t,"data-state":dS(i.checked)})))}),Qge=m.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.createElement(Qe.div,he({role:"separator","aria-orientation":"horizontal"},r,{ref:t}))}),Jge="MenuSub",[Cye,fL]=Al(Jge),Hp="MenuSubTrigger",Zge=m.forwardRef((e,t)=>{const n=kl(Hp,e.__scopeMenu),r=eh(Hp,e.__scopeMenu),o=fL(Hp,e.__scopeMenu),i=lS(Hp,e.__scopeMenu),s=m.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=i,c={__scopeMenu:e.__scopeMenu},u=m.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return m.useEffect(()=>u,[u]),m.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),l(null)}},[a,l]),m.createElement(sL,he({asChild:!0},c),m.createElement(cL,he({id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":hL(n.open)},e,{ref:cs(t,o.onTriggerChange),onClick:f=>{var h;(h=e.onClick)===null||h===void 0||h.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Me(e.onPointerMove,hf(f=>{i.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(i.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:Me(e.onPointerLeave,hf(f=>{var h;u();const g=(h=n.content)===null||h===void 0?void 0:h.getBoundingClientRect();if(g){var v;const b=(v=n.content)===null||v===void 0?void 0:v.dataset.side,x=b==="right",w=x?-5:5,_=g[x?"left":"right"],S=g[x?"right":"left"];i.onPointerGraceIntentChange({area:[{x:f.clientX+w,y:f.clientY},{x:_,y:g.top},{x:S,y:g.top},{x:S,y:g.bottom},{x:_,y:g.bottom}],side:b}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(f),f.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:Me(e.onKeyDown,f=>{const h=i.searchRef.current!=="";if(!(e.disabled||h&&f.key===" ")&&Oge[r.dir].includes(f.key)){var g;n.onOpenChange(!0),(g=n.content)===null||g===void 0||g.focus(),f.preventDefault()}})})))}),eme="MenuSubContent",tme=m.forwardRef((e,t)=>{const n=lL(Qo,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=kl(Qo,e.__scopeMenu),s=eh(Qo,e.__scopeMenu),a=fL(eme,e.__scopeMenu),l=m.useRef(null),c=_t(t,l);return m.createElement(ff.Provider,{scope:e.__scopeMenu},m.createElement(er,{present:r||i.open},m.createElement(ff.Slot,{scope:e.__scopeMenu},m.createElement(cS,he({id:a.contentId,"aria-labelledby":a.triggerId},o,{ref:c,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{var f;s.isUsingKeyboardRef.current&&((f=l.current)===null||f===void 0||f.focus()),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:Me(e.onFocusOutside,u=>{u.target!==a.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:Me(e.onEscapeKeyDown,u=>{s.onClose(),u.preventDefault()}),onKeyDown:Me(e.onKeyDown,u=>{const f=u.currentTarget.contains(u.target),h=Pge[s.dir].includes(u.key);if(f&&h){var g;i.onOpenChange(!1),(g=a.trigger)===null||g===void 0||g.focus(),u.preventDefault()}})})))))});function hL(e){return e?"open":"closed"}function Jg(e){return e==="indeterminate"}function dS(e){return Jg(e)?"indeterminate":e?"checked":"unchecked"}function nme(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function rme(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function ome(e,t,n){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=rme(e,Math.max(i,0));o.length===1&&(s=s.filter(c=>c!==n));const l=s.find(c=>c.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function ime(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i].x,l=t[i].y,c=t[s].x,u=t[s].y;l>r!=u>r&&n<(c-a)*(r-l)/(u-l)+a&&(o=!o)}return o}function sme(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return ime(n,t)}function hf(e){return t=>t.pointerType==="mouse"?e(t):void 0}const ame=kge,lme=sL,cme=Ige,ume=Lge,dme=Bge,fme=uS,hme=Vge,pme=qge,gme=Yge,mme=Xge,vme=Qge,bme=Zge,yme=tme,pL="DropdownMenu",[xme,Eye]=Zn(pL,[oL]),ho=oL(),[wme,gL]=xme(pL),_me=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:s,modal:a=!0}=e,l=ho(t),c=m.useRef(null),[u=!1,f]=xr({prop:o,defaultProp:i,onChange:s});return m.createElement(wme,{scope:t,triggerId:Jo(),triggerRef:c,contentId:Jo(),open:u,onOpenChange:f,onOpenToggle:m.useCallback(()=>f(h=>!h),[f]),modal:a},m.createElement(ame,he({},l,{open:u,onOpenChange:f,dir:r,modal:a}),n))},Sme="DropdownMenuTrigger",Cme=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=gL(Sme,n),s=ho(n);return m.createElement(lme,he({asChild:!0},s),m.createElement(Qe.button,he({type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r},o,{ref:cs(t,i.triggerRef),onPointerDown:Me(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(i.onOpenToggle(),i.open||a.preventDefault())}),onKeyDown:Me(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&i.onOpenToggle(),a.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})))}),Eme=e=>{const{__scopeDropdownMenu:t,...n}=e,r=ho(t);return m.createElement(cme,he({},r,n))},Rme="DropdownMenuContent",Ome=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=gL(Rme,n),i=ho(n),s=m.useRef(!1);return m.createElement(ume,he({id:o.contentId,"aria-labelledby":o.triggerId},i,r,{ref:t,onCloseAutoFocus:Me(e.onCloseAutoFocus,a=>{var l;s.current||(l=o.triggerRef.current)===null||l===void 0||l.focus(),s.current=!1,a.preventDefault()}),onInteractOutside:Me(e.onInteractOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;(!o.modal||u)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),Pme=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ho(n);return m.createElement(dme,he({},o,r,{ref:t}))}),Tme=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ho(n);return m.createElement(fme,he({},o,r,{ref:t}))}),Dme=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ho(n);return m.createElement(hme,he({},o,r,{ref:t}))}),$me=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ho(n);return m.createElement(pme,he({},o,r,{ref:t}))}),Ame=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ho(n);return m.createElement(gme,he({},o,r,{ref:t}))}),kme=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ho(n);return m.createElement(mme,he({},o,r,{ref:t}))}),Mme=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ho(n);return m.createElement(vme,he({},o,r,{ref:t}))}),Ime=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ho(n);return m.createElement(bme,he({},o,r,{ref:t}))}),Nme=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ho(n);return m.createElement(yme,he({},o,r,{ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),Lme=_me,Fme=Cme,jme=Eme,mL=Ome,vL=Pme,bL=Tme,yL=Dme,zme=$me,xL=Ame,wL=kme,_L=Mme,SL=Ime,CL=Nme,Bme=Lme,Vme=Fme,Hme=zme,Wme=V.forwardRef(({className:e,inset:t,children:n,...r},o)=>O.jsxs(SL,{ref:o,className:Ce("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,O.jsx(C1,{className:"ml-auto h-4 w-4"})]}));Wme.displayName=SL.displayName;const Ume=V.forwardRef(({className:e,...t},n)=>O.jsx(CL,{ref:n,className:Ce("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[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",e),...t}));Ume.displayName=CL.displayName;const EL=V.forwardRef(({className:e,sideOffset:t=4,...n},r)=>O.jsx(jme,{children:O.jsx(au,{children:O.jsx(mL,{ref:r,sideOffset:t,className:Ce("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[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",e),...n})})}));EL.displayName=mL.displayName;const qme=V.forwardRef(({className:e,inset:t,...n},r)=>O.jsx(bL,{ref:r,className:Ce("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));qme.displayName=bL.displayName;const Gme=V.forwardRef(({className:e,children:t,checked:n,...r},o)=>O.jsxs(yL,{ref:o,className:Ce("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[O.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:O.jsx(wL,{children:O.jsx(Ff,{className:"h-4 w-4"})})}),t]}));Gme.displayName=yL.displayName;const RL=V.forwardRef(({className:e,children:t,...n},r)=>O.jsxs(xL,{ref:r,className:Ce("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[O.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:O.jsx(wL,{children:O.jsx(LA,{className:"h-2 w-2 fill-current"})})}),t]}));RL.displayName=xL.displayName;const OL=V.forwardRef(({className:e,inset:t,...n},r)=>O.jsx(vL,{ref:r,className:Ce("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));OL.displayName=vL.displayName;const PL=V.forwardRef(({className:e,...t},n)=>O.jsx(_L,{ref:n,className:Ce("-mx-1 my-1 h-px bg-muted",e),...t}));PL.displayName=_L.displayName;function Yme(e){var t;return{...e,sheets:(t=e==null?void 0:e.sheets)==null?void 0:t.map(n=>{var r;return{...n,frames:(r=n.frames)==null?void 0:r.map(o=>{var i;return{...o,cards:(i=o.cards)==null?void 0:i.map(s=>TL(s))}})}})}}function TL(e){var t,n,r,o;return{...e,cfg:{...e.cfg,data:{...(t=e.cfg)==null?void 0:t.data,labels:[],datasets:(o=(r=(n=e.cfg)==null?void 0:n.data)==null?void 0:r.datasets)==null?void 0:o.map(i=>({...i,data:[]}))}},customCfg:Kme(e.customCfg),data:[]}}function Kme(e){var t,n;return e?{...e,data:{...e==null?void 0:e.data,labels:[],datasets:(n=(t=e==null?void 0:e.data)==null?void 0:t.datasets)==null?void 0:n.map(r=>({...r,data:[]}))}}:null}function DL(e){return`semaphor:bookmark:${e}`}const Xme=C5,Qme=E5,Jme=R5,$L=V.forwardRef(({className:e,...t},n)=>O.jsx(nS,{ref:n,className:Ce("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));$L.displayName=nS.displayName;const AL=V.forwardRef(({className:e,children:t,...n},r)=>O.jsx(Jme,{children:O.jsxs(au,{children:[O.jsx($L,{}),O.jsxs(rS,{ref:r,className:Ce("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,O.jsxs(sS,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[O.jsx(Dm,{className:"h-4 w-4"}),O.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}));AL.displayName=rS.displayName;const kL=({className:e,...t})=>O.jsx("div",{className:Ce("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});kL.displayName="DialogHeader";const ML=({className:e,...t})=>O.jsx("div",{className:Ce("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ML.displayName="DialogFooter";const IL=V.forwardRef(({className:e,...t},n)=>O.jsx(oS,{ref:n,className:Ce("text-lg font-semibold leading-none tracking-tight",e),...t}));IL.displayName=oS.displayName;const NL=V.forwardRef(({className:e,...t},n)=>O.jsx(iS,{ref:n,className:Ce("text-sm text-muted-foreground",e),...t}));NL.displayName=iS.displayName;const LL="Checkbox",[Zme,Rye]=Zn(LL),[eve,tve]=Zme(LL),nve=m.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:s,disabled:a,value:l="on",onCheckedChange:c,...u}=e,[f,h]=m.useState(null),g=_t(t,S=>h(S)),v=m.useRef(!1),b=f?!!f.closest("form"):!0,[x=!1,w]=xr({prop:o,defaultProp:i,onChange:c}),_=m.useRef(x);return m.useEffect(()=>{const S=f==null?void 0:f.form;if(S){const R=()=>w(_.current);return S.addEventListener("reset",R),()=>S.removeEventListener("reset",R)}},[f,w]),m.createElement(eve,{scope:n,state:x,disabled:a},m.createElement(Qe.button,he({type:"button",role:"checkbox","aria-checked":dl(x)?"mixed":x,"aria-required":s,"data-state":FL(x),"data-disabled":a?"":void 0,disabled:a,value:l},u,{ref:g,onKeyDown:Me(e.onKeyDown,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:Me(e.onClick,S=>{w(R=>dl(R)?!0:!R),b&&(v.current=S.isPropagationStopped(),v.current||S.stopPropagation())})})),b&&m.createElement(ive,{control:f,bubbles:!v.current,name:r,value:l,checked:x,required:s,disabled:a,style:{transform:"translateX(-100%)"}}))}),rve="CheckboxIndicator",ove=m.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=tve(rve,n);return m.createElement(er,{present:r||dl(i.state)||i.state===!0},m.createElement(Qe.span,he({"data-state":FL(i.state),"data-disabled":i.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))}),ive=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=m.useRef(null),s=Lm(n),a=km(t);return m.useEffect(()=>{const l=i.current,c=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(c,"checked").set;if(s!==n&&f){const h=new Event("click",{bubbles:r});l.indeterminate=dl(n),f.call(l,dl(n)?!1:n),l.dispatchEvent(h)}},[s,n,r]),m.createElement("input",he({type:"checkbox","aria-hidden":!0,defaultChecked:dl(n)?!1:n},o,{tabIndex:-1,ref:i,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function dl(e){return e==="indeterminate"}function FL(e){return dl(e)?"indeterminate":e?"checked":"unchecked"}const jL=nve,sve=ove,zL=V.forwardRef(({className:e,...t},n)=>O.jsx(jL,{ref:n,className:Ce("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:O.jsx(sve,{className:Ce("flex items-center justify-center text-current"),children:O.jsx(Ff,{className:"h-4 w-4"})})}));zL.displayName=jL.displayName;const BL=m.forwardRef(({className:e,...t},n)=>O.jsx("div",{role:"editor-panel",ref:n,className:Ce("flex grow h-full",e),...t}));BL.displayName="EditorPanel";const VL=m.forwardRef(({className:e,...t},n)=>O.jsx("div",{ref:n,className:Ce(" flex flex-col space-y-2 w-[270px]",e),...t}));VL.displayName="EditorAside";const HL=m.forwardRef(({className:e,...t},n)=>O.jsx("div",{ref:n,className:Ce(" grow",e),...t}));HL.displayName="EditorMain";function ave(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function T2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?P2(Object(n),!0).forEach(function(r){ave(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lve(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function cve(e,t){if(e==null)return{};var n=lve(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uve(e,t){return dve(e)||fve(e,t)||hve(e,t)||pve()}function dve(e){if(Array.isArray(e))return e}function fve(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,o=!1,i=void 0;try{for(var s=e[Symbol.iterator](),a;!(r=(a=s.next()).done)&&(n.push(a.value),!(t&&n.length===t));r=!0);}catch(l){o=!0,i=l}finally{try{!r&&s.return!=null&&s.return()}finally{if(o)throw i}}return n}}function hve(e,t){if(e){if(typeof e=="string")return D2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return D2(e,t)}}function D2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
431
431
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function A2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$2(Object(n),!0).forEach(function(r){gve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mve(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(o,i){return i(o)},r)}}function cd(e){return function t(){for(var n=this,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return t.apply(n,[].concat(o,a))}}}function Zg(e){return{}.toString.call(e).includes("Object")}function vve(e){return!Object.keys(e).length}function pf(e){return typeof e=="function"}function bve(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function yve(e,t){return Zg(t)||ia("changeType"),Object.keys(t).some(function(n){return!bve(e,n)})&&ia("changeField"),t}function xve(e){pf(e)||ia("selectorType")}function wve(e){pf(e)||Zg(e)||ia("handlerType"),Zg(e)&&Object.values(e).some(function(t){return!pf(t)})&&ia("handlersType")}function _ve(e){e||ia("initialIsRequired"),Zg(e)||ia("initialType"),vve(e)&&ia("initialContent")}function Sve(e,t){throw new Error(e[t]||e.default)}var Cve={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},ia=cd(Sve)(Cve),Wp={changes:yve,selector:xve,handler:wve,initial:_ve};function Eve(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Wp.initial(e),Wp.handler(t);var n={current:e},r=cd(Pve)(n,t),o=cd(Ove)(n),i=cd(Wp.changes)(e),s=cd(Rve)(n);function a(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(u){return u};return Wp.selector(c),c(n.current)}function l(c){mve(r,o,i,s)(c)}return[a,l]}function Rve(e,t){return pf(t)?t(e.current):t}function Ove(e,t){return e.current=A2(A2({},e.current),t),t}function Pve(e,t,n){return pf(t)?t(e.current):Object.keys(n).forEach(function(r){var o;return(o=t[r])===null||o===void 0?void 0:o.call(t,e.current[r])}),n}var Tve={create:Eve},Dve={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};function $ve(e){return function t(){for(var n=this,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return t.apply(n,[].concat(o,a))}}}function Ave(e){return{}.toString.call(e).includes("Object")}function kve(e){return e||k2("configIsRequired"),Ave(e)||k2("configType"),e.urls?(Mve(),{paths:{vs:e.urls.monacoBase}}):e}function Mve(){console.warn(WL.deprecation)}function Ive(e,t){throw new Error(e[t]||e.default)}var WL={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
432
432
  You are using deprecated way of configuration.
433
433
 
@@ -53574,7 +53574,7 @@ function sge({ children: e }) {
53574
53574
  return /* @__PURE__ */ R.jsx(Iz, { defaultTheme: "system", storageKey: "vite-ui-theme", children: /* @__PURE__ */ R.jsx(JQ, { delayDuration: 0, children: e }) });
53575
53575
  }
53576
53576
  function age(e) {
53577
- return /* @__PURE__ */ R.jsx(fJ, { dashboardProps: e, children: /* @__PURE__ */ R.jsx(sge, { children: /* @__PURE__ */ R.jsx(jz, { ...e, children: /* @__PURE__ */ R.jsx(ige, {}) }) }) });
53577
+ return typeof document > "u" ? null : /* @__PURE__ */ R.jsx(fJ, { dashboardProps: e, children: /* @__PURE__ */ R.jsx(sge, { children: /* @__PURE__ */ R.jsx(jz, { ...e, children: /* @__PURE__ */ R.jsx(ige, {}) }) }) });
53578
53578
  }
53579
53579
  const B5 = /* @__PURE__ */ be((e, t) => {
53580
53580
  const { children: n, ...r } = e, o = Kt.toArray(n), i = o.find(cge);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-rFYihWWq.js");require("react");require("react-dom");exports.Dashboard=e.Dashboard;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-4pZ8PdhQ.js");require("react");require("react-dom");exports.Dashboard=e.Dashboard;
@@ -1,4 +1,4 @@
1
- import { D as p } from "../chunks/index-4dMDhcWj.js";
1
+ import { D as p } from "../chunks/index-zWnvf9QX.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  export {
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-rFYihWWq.js"),d=require("./chunks/dashboard-plus-QXDTTTq6.js"),I=require("react");require("react-dom");function N({card:t,footer:u,className:m,...c}){const{customCards:r}=e.useSemaphorContext(),h=I.useRef(null),{isError:p,isLoading:n,isFetching:i,cfg:x,visualKey:C,handleDatapointClick:f}=e.useDashboardCard(t),a=e.useDashboardStore(s=>s.themeStyle),l=e.useDashboardStore(s=>s.selectedSheetId),E=e.useDashboardStore(s=>s.selectedCardId),j=e.useDashboardStore(s=>s.isDashboardEditing),{setCardTitle:g,setCardDescription:D,setSelectedCardId:b}=e.useDashboardActions();function S(s){s.stopPropagation(),b(l,t.id)}function T(){if(r&&r.length>0){const s=r.find(o=>o.cardId===t.id);if(s&&s.replaceDefault){const o=s.content;if(o)return e.jsxRuntimeExports.jsx(o,{card:t})}}return t.type==="kpi"?t.data&&t.data.length>0&&e.jsxRuntimeExports.jsx(e.KPICard,{isLoading:n||i,card:t}):y}function R(){if(p)return e.jsxRuntimeExports.jsx("p",{className:"text-sm",children:"Oops! It seems like something went wrong. Please review your connection or filters."});if(t.type==="table"&&t.data&&t.data.length>0)return e.jsxRuntimeExports.jsxs(e.ScrollArea,{children:[e.jsxRuntimeExports.jsx(e.TableVisual,{card:t,data:t.data}),e.jsxRuntimeExports.jsx(e.ScrollBar,{orientation:"horizontal"})]});if(r&&r.length>0){const s=r.find(o=>o.cardId===t.id);if(s&&s.content){const o=s.content;return e.jsxRuntimeExports.jsx(o,{card:t})}}if(x)return e.jsxRuntimeExports.jsx(e.ChartJsVisual,{cfg:x,onDatapointClick:f},C)}function A(){if(r&&r.length>0){const s=r.find(o=>o.cardId===t.id);if(s&&s.footer){const o=s.footer;if(o)return e.jsxRuntimeExports.jsx(o,{card:t})}}return u||null}if(!t.id)return null;const y=e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs(e.CardHeader,{className:"pb-4",children:[e.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxRuntimeExports.jsx(e.Editable,{text:t.title,onSave:s=>g(l,t.id,s),children:e.jsxRuntimeExports.jsx(e.CardTitle,{className:"text-base",children:t.title})}),t.refreshInterval&&e.jsxRuntimeExports.jsxs(e.Tooltip,{children:[e.jsxRuntimeExports.jsx(e.TooltipTrigger,{className:"pr-1",children:e.jsxRuntimeExports.jsx("div",{className:e.cn("h-2 w-2 rounded-full bg-green-500 transition-opacity",{"opacity-10":n||i})})}),e.jsxRuntimeExports.jsx(e.TooltipContent,{side:"right",align:"center",children:e.jsxRuntimeExports.jsx("p",{className:"text-xs",children:`Realtime (${t==null?void 0:t.refreshInterval})`})})]}),!t.refreshInterval&&(n||i)&&e.jsxRuntimeExports.jsx(e.LoaderCircle,{className:"h-4 w-4 animate-spin text-muted-foreground"})]}),e.jsxRuntimeExports.jsx(e.Editable,{text:(t==null?void 0:t.description)||"",onSave:s=>D(l,t.id,s),children:e.jsxRuntimeExports.jsxs(e.CardDescription,{children:[" ",t.description]})})]}),e.jsxRuntimeExports.jsx(e.CardContent,{className:"relative flex grow flex-col overflow-auto pb-0",children:R()}),e.jsxRuntimeExports.jsx(e.CardFooter,{children:A()})]});return e.jsxRuntimeExports.jsx(e.Card,{tabIndex:-1,ref:h,role:"dashboard-card",onClick:S,className:e.cn("relative flex h-full flex-col rounded-sm",{"border-dashed border-foreground/50":E===t.id&&j},a==null?void 0:a.dashboardCard,m),...c,children:T()})}exports.BOOLEAN_DATA_TYPES=e.BOOLEAN_DATA_TYPES;exports.DATE_DATA_TYPES=e.DATE_DATA_TYPES;exports.Dashboard=e.Dashboard;exports.DashboardWC=e.DashboardWC;exports.NUMBER_DATA_TYPES=e.NUMBER_DATA_TYPES;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.TEXT_DATA_TYPES=e.TEXT_DATA_TYPES;exports.cleanCard=e.cleanCard;exports.createSqlGenConfig=e.createSqlGenConfig;exports.fmt=e.fmt;exports.getBookmarkKey=e.getBookmarkKey;exports.getColumnDataType=e.getColumnDataType;exports.getDashbaordStateWithoutData=e.getDashbaordStateWithoutData;exports.getFilterValueType=e.getFilterValueType;exports.getQualifiedTableName=e.getQualifiedTableName;exports.getSql=e.getSql;exports.isColumnInSqlGen=e.isColumnInSqlGen;exports.resolveDataType=e.resolveDataType;exports.useCard=e.useCard;exports.useDashboardActions=e.useDashboardActions;exports.useDashboardStore=e.useDashboardStore;exports.useEditorActions=e.useEditorActions;exports.useEditorStore=e.useEditorStore;exports.SelectComponent=d.SelectComponent;exports.Surfboard=d.DashboardPlus;exports.useEditorAside=d.useEditorAside;exports.DashboardCard=N;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-4pZ8PdhQ.js"),d=require("./chunks/dashboard-plus-vDd1CCpS.js"),I=require("react");require("react-dom");function N({card:t,footer:u,className:m,...c}){const{customCards:r}=e.useSemaphorContext(),h=I.useRef(null),{isError:p,isLoading:n,isFetching:i,cfg:x,visualKey:C,handleDatapointClick:f}=e.useDashboardCard(t),a=e.useDashboardStore(s=>s.themeStyle),l=e.useDashboardStore(s=>s.selectedSheetId),E=e.useDashboardStore(s=>s.selectedCardId),j=e.useDashboardStore(s=>s.isDashboardEditing),{setCardTitle:g,setCardDescription:D,setSelectedCardId:b}=e.useDashboardActions();function S(s){s.stopPropagation(),b(l,t.id)}function T(){if(r&&r.length>0){const s=r.find(o=>o.cardId===t.id);if(s&&s.replaceDefault){const o=s.content;if(o)return e.jsxRuntimeExports.jsx(o,{card:t})}}return t.type==="kpi"?t.data&&t.data.length>0&&e.jsxRuntimeExports.jsx(e.KPICard,{isLoading:n||i,card:t}):y}function R(){if(p)return e.jsxRuntimeExports.jsx("p",{className:"text-sm",children:"Oops! It seems like something went wrong. Please review your connection or filters."});if(t.type==="table"&&t.data&&t.data.length>0)return e.jsxRuntimeExports.jsxs(e.ScrollArea,{children:[e.jsxRuntimeExports.jsx(e.TableVisual,{card:t,data:t.data}),e.jsxRuntimeExports.jsx(e.ScrollBar,{orientation:"horizontal"})]});if(r&&r.length>0){const s=r.find(o=>o.cardId===t.id);if(s&&s.content){const o=s.content;return e.jsxRuntimeExports.jsx(o,{card:t})}}if(x)return e.jsxRuntimeExports.jsx(e.ChartJsVisual,{cfg:x,onDatapointClick:f},C)}function A(){if(r&&r.length>0){const s=r.find(o=>o.cardId===t.id);if(s&&s.footer){const o=s.footer;if(o)return e.jsxRuntimeExports.jsx(o,{card:t})}}return u||null}if(!t.id)return null;const y=e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs(e.CardHeader,{className:"pb-4",children:[e.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxRuntimeExports.jsx(e.Editable,{text:t.title,onSave:s=>g(l,t.id,s),children:e.jsxRuntimeExports.jsx(e.CardTitle,{className:"text-base",children:t.title})}),t.refreshInterval&&e.jsxRuntimeExports.jsxs(e.Tooltip,{children:[e.jsxRuntimeExports.jsx(e.TooltipTrigger,{className:"pr-1",children:e.jsxRuntimeExports.jsx("div",{className:e.cn("h-2 w-2 rounded-full bg-green-500 transition-opacity",{"opacity-10":n||i})})}),e.jsxRuntimeExports.jsx(e.TooltipContent,{side:"right",align:"center",children:e.jsxRuntimeExports.jsx("p",{className:"text-xs",children:`Realtime (${t==null?void 0:t.refreshInterval})`})})]}),!t.refreshInterval&&(n||i)&&e.jsxRuntimeExports.jsx(e.LoaderCircle,{className:"h-4 w-4 animate-spin text-muted-foreground"})]}),e.jsxRuntimeExports.jsx(e.Editable,{text:(t==null?void 0:t.description)||"",onSave:s=>D(l,t.id,s),children:e.jsxRuntimeExports.jsxs(e.CardDescription,{children:[" ",t.description]})})]}),e.jsxRuntimeExports.jsx(e.CardContent,{className:"relative flex grow flex-col overflow-auto pb-0",children:R()}),e.jsxRuntimeExports.jsx(e.CardFooter,{children:A()})]});return e.jsxRuntimeExports.jsx(e.Card,{tabIndex:-1,ref:h,role:"dashboard-card",onClick:S,className:e.cn("relative flex h-full flex-col rounded-sm",{"border-dashed border-foreground/50":E===t.id&&j},a==null?void 0:a.dashboardCard,m),...c,children:T()})}exports.BOOLEAN_DATA_TYPES=e.BOOLEAN_DATA_TYPES;exports.DATE_DATA_TYPES=e.DATE_DATA_TYPES;exports.Dashboard=e.Dashboard;exports.DashboardWC=e.DashboardWC;exports.NUMBER_DATA_TYPES=e.NUMBER_DATA_TYPES;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.TEXT_DATA_TYPES=e.TEXT_DATA_TYPES;exports.cleanCard=e.cleanCard;exports.createSqlGenConfig=e.createSqlGenConfig;exports.fmt=e.fmt;exports.getBookmarkKey=e.getBookmarkKey;exports.getColumnDataType=e.getColumnDataType;exports.getDashbaordStateWithoutData=e.getDashbaordStateWithoutData;exports.getFilterValueType=e.getFilterValueType;exports.getQualifiedTableName=e.getQualifiedTableName;exports.getSql=e.getSql;exports.isColumnInSqlGen=e.isColumnInSqlGen;exports.resolveDataType=e.resolveDataType;exports.useCard=e.useCard;exports.useDashboardActions=e.useDashboardActions;exports.useDashboardStore=e.useDashboardStore;exports.useEditorActions=e.useEditorActions;exports.useEditorStore=e.useEditorStore;exports.SelectComponent=d.SelectComponent;exports.Surfboard=d.DashboardPlus;exports.useEditorAside=d.useEditorAside;exports.DashboardCard=N;
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { u as _, a as k, b as n, c as w, j as s, C as F, E as f, d as P, T as R, e as B, f as h, g as L, L as q, h as K, i as O, k as Y, l as G, K as V, S as z, m as H, n as J, o as M } from "./chunks/index-4dMDhcWj.js";
2
- import { B as se, s as te, D as ae, q as oe, N as ne, I as re, r as ie, M as le, w as de, t as ue, O as ce, y as fe, J as he, x as Ce, A as xe, v as me, z as pe, F as ge, p as je, H as De, G as be } from "./chunks/index-4dMDhcWj.js";
3
- import { S as Te, D as Ee, u as Ie } from "./chunks/dashboard-plus-VD8IOw-T.js";
1
+ import { u as _, a as k, b as n, c as w, j as s, C as F, E as f, d as P, T as R, e as B, f as h, g as L, L as q, h as K, i as O, k as Y, l as G, K as V, S as z, m as H, n as J, o as M } from "./chunks/index-zWnvf9QX.js";
2
+ import { B as se, s as te, D as ae, q as oe, N as ne, I as re, r as ie, M as le, w as de, t as ue, O as ce, y as fe, J as he, x as Ce, A as xe, v as me, z as pe, F as ge, p as je, H as De, G as be } from "./chunks/index-zWnvf9QX.js";
3
+ import { S as Te, D as Ee, u as Ie } from "./chunks/dashboard-plus-qOIvgNim.js";
4
4
  import Q from "react";
5
5
  import "react-dom";
6
6
  function $({
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/dashboard-plus-QXDTTTq6.js");require("../chunks/index-rFYihWWq.js");require("react");require("react-dom");exports.Surfboard=r.DashboardPlus;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/dashboard-plus-vDd1CCpS.js");require("../chunks/index-4pZ8PdhQ.js");require("react");require("react-dom");exports.Surfboard=r.DashboardPlus;
@@ -1,5 +1,5 @@
1
- import { D as i } from "../chunks/dashboard-plus-VD8IOw-T.js";
2
- import "../chunks/index-4dMDhcWj.js";
1
+ import { D as i } from "../chunks/dashboard-plus-qOIvgNim.js";
2
+ import "../chunks/index-zWnvf9QX.js";
3
3
  import "react";
4
4
  import "react-dom";
5
5
  export {
@@ -70,7 +70,7 @@ export declare type ConnectionPolicy = {
70
70
 
71
71
  export declare type CustomCard = CardWithContent | CardWithFooter;
72
72
 
73
- export declare function Dashboard(props: DashboardProps): JSX_2.Element;
73
+ export declare function Dashboard(props: DashboardProps): JSX_2.Element | null;
74
74
 
75
75
  export declare type DashboardProps = {
76
76
  id?: string;
@@ -197,7 +197,7 @@ export declare function createSqlGenConfig(column: TDataColumn, preSqlGen: SqlGe
197
197
 
198
198
  export declare type CustomCard = CardWithContent | CardWithFooter;
199
199
 
200
- export declare function Dashboard(props: DashboardProps): JSX_2.Element;
200
+ export declare function Dashboard(props: DashboardProps): JSX_2.Element | null;
201
201
 
202
202
  export declare function DashboardCard({ card, footer, className, ...props }: DashboardCardProps): JSX_2.Element | null;
203
203
 
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.0.55",
8
+ "version": "0.0.57",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",