@lunora/studio 1.0.0-alpha.43 → 1.0.0-alpha.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/standalone/{chunk-W3SHEIAL.js → chunk-245TEXSO.js} +2 -2
  2. package/dist/standalone/{chunk-ISDZPW3V.js → chunk-2BBENYBY.js} +1 -1
  3. package/dist/standalone/{chunk-2ANAF4ZM.js → chunk-34B5ECBI.js} +1 -1
  4. package/dist/standalone/{chunk-GUI5GFFI.js → chunk-3IJLM4GF.js} +1 -1
  5. package/dist/standalone/{chunk-7MVSQS7B.js → chunk-3JO76DWI.js} +1 -1
  6. package/dist/standalone/{chunk-IN2SYVJB.js → chunk-3SKIYIBN.js} +1 -1
  7. package/dist/standalone/chunk-4WGGEF73.js +8 -0
  8. package/dist/standalone/{chunk-GTLEWM5Y.js → chunk-5KUKYIU6.js} +1 -1
  9. package/dist/standalone/{chunk-EQZQOTJY.js → chunk-6CRKDJNL.js} +1 -1
  10. package/dist/standalone/{chunk-BX5MKYOC.js → chunk-6HW2RKAX.js} +1 -1
  11. package/dist/standalone/{chunk-5C4TSNE6.js → chunk-73BV73BI.js} +1 -1
  12. package/dist/standalone/{chunk-BGXOXASQ.js → chunk-7JOVXGO4.js} +1 -1
  13. package/dist/standalone/{chunk-J73VHFCL.js → chunk-7KR346F4.js} +1 -1
  14. package/dist/standalone/{chunk-6VO23MMW.js → chunk-7XTR7BWT.js} +1 -1
  15. package/dist/standalone/{chunk-JPRH6DPK.js → chunk-AFCBRDRQ.js} +1 -1
  16. package/dist/standalone/{chunk-UKDJ4H7I.js → chunk-ATG3655M.js} +1 -1
  17. package/dist/standalone/{chunk-HZK5RQHG.js → chunk-AX7GYUQC.js} +1 -1
  18. package/dist/standalone/{chunk-ZFNBPAIZ.js → chunk-B4TTGYIX.js} +1 -1
  19. package/dist/standalone/{chunk-W3JK4YWR.js → chunk-BGHGKAOM.js} +1 -1
  20. package/dist/standalone/{chunk-HYDJNCGW.js → chunk-BL45HXOJ.js} +1 -1
  21. package/dist/standalone/{chunk-RHZ4M2NZ.js → chunk-EOSXQTSQ.js} +1 -1
  22. package/dist/standalone/{chunk-6HSHEMZV.js → chunk-ERUIC6WI.js} +1 -1
  23. package/dist/standalone/{chunk-OZACQNKG.js → chunk-ERXJPMCU.js} +1 -1
  24. package/dist/standalone/{chunk-WIHXMNUY.js → chunk-GNMTLLGB.js} +1 -1
  25. package/dist/standalone/{chunk-THNBTMUF.js → chunk-I34RPZ7P.js} +1 -1
  26. package/dist/standalone/{chunk-KYJPPVGB.js → chunk-I4RSHYDW.js} +1 -1
  27. package/dist/standalone/{chunk-KQV4NGH3.js → chunk-ICIQ2GWQ.js} +1 -1
  28. package/dist/standalone/{chunk-JHKMUTIF.js → chunk-J75M4LTW.js} +1 -1
  29. package/dist/standalone/{chunk-HN6KJXYQ.js → chunk-JEVKZIHN.js} +1 -1
  30. package/dist/standalone/{chunk-KUH4P5F5.js → chunk-KFNNMXUZ.js} +1 -1
  31. package/dist/standalone/{chunk-YBGC4PPD.js → chunk-KMNEQEHM.js} +1 -1
  32. package/dist/standalone/chunk-M5OMEMQ3.js +1 -0
  33. package/dist/standalone/{chunk-TMYVNQ66.js → chunk-MP5MTWY5.js} +1 -1
  34. package/dist/standalone/{chunk-PNDNXS5Z.js → chunk-O4YNKFCZ.js} +1 -1
  35. package/dist/standalone/{chunk-IOANPSJN.js → chunk-OLUEBOHS.js} +1 -1
  36. package/dist/standalone/{chunk-N2X2OO4V.js → chunk-OOETIPAO.js} +1 -1
  37. package/dist/standalone/{chunk-MJWVMKQ4.js → chunk-OQPT2BEZ.js} +1 -1
  38. package/dist/standalone/{chunk-WLDVXVI2.js → chunk-P7AMKXU2.js} +1 -1
  39. package/dist/standalone/{chunk-UJB2LEI4.js → chunk-PBXQ5QS4.js} +1 -1
  40. package/dist/standalone/{chunk-TDZ44E5I.js → chunk-PKIPNNRD.js} +1 -1
  41. package/dist/standalone/{chunk-NGKITPQP.js → chunk-PXR5E7AX.js} +1 -1
  42. package/dist/standalone/{chunk-447TAUFD.js → chunk-QB3QUTSJ.js} +1 -1
  43. package/dist/standalone/{chunk-MLZYX5CQ.js → chunk-QQH2YTBW.js} +1 -1
  44. package/dist/standalone/{chunk-KBB75WNT.js → chunk-S6JKSFSO.js} +1 -1
  45. package/dist/standalone/{chunk-L2TJVSDQ.js → chunk-T4XWXBKR.js} +1 -1
  46. package/dist/standalone/{chunk-Q7DMUTUE.js → chunk-TU5ZNEZ4.js} +1 -1
  47. package/dist/standalone/{chunk-3OIHOXVV.js → chunk-WATFBATD.js} +1 -1
  48. package/dist/standalone/{chunk-LBN7LPVK.js → chunk-WKUGR7ER.js} +1 -1
  49. package/dist/standalone/{chunk-UGUEC6BC.js → chunk-WKWKAU22.js} +1 -1
  50. package/dist/standalone/{chunk-YJAPWSDC.js → chunk-WSMZLZWM.js} +1 -1
  51. package/dist/standalone/{chunk-6JIZ34MB.js → chunk-XFPHUG7M.js} +1 -1
  52. package/dist/standalone/{chunk-KA5YB3VP.js → chunk-YSF43KIJ.js} +1 -1
  53. package/dist/standalone/{chunk-TIQISBGK.js → chunk-ZSNXQT4N.js} +1 -1
  54. package/dist/standalone/{chunk-25AYY4H7.js → chunk-ZTOATVB7.js} +1 -1
  55. package/dist/standalone/studio.js +1 -1
  56. package/dist/styles.css +1 -1
  57. package/package.json +6 -6
  58. package/dist/standalone/chunk-XLXNLJ4N.js +0 -1
  59. package/dist/standalone/chunk-ZEJB6DXU.js +0 -8
  60. /package/dist/standalone/{chunk-E75ANNWX.js → chunk-2GMEK2W3.js} +0 -0
@@ -1,3 +1,3 @@
1
- import{a as Hn}from"./chunk-ZPUO7FNI.js";import{a as oo,b as so,c as ro,d as Tn,e as ls}from"./chunk-IXDH4GL5.js";import{$ as Sn,A as Gt,C as xn,D as j,E as bn,F as yn,I as Kt,L as gt,M as qo,N as Qt,P as Go,Q as Cn,R as Pn,S as Ko,T as Yt,U as Jt,V as Xt,W as eo,X as Qo,Y as to,_ as Rn,aa as Yo,b as sn,ba as Jo,ea as Xo,fa as st,ga as Nn,ha as no,i as cn,ia as En,j as dn,ja as ue,k as pn,ka as es,l as Ks,m as jo,ma as ts,na as os,o as Uo,oa as ss,p as un,pa as rs,q as zo,qa as ns,ra as as,s as fn,sa as wn,ta as kn,u as mn,ua as is,v as gn,va as On,w as hn,x as Wo,y as Zo,z as vn}from"./chunk-KSKXW5PX.js";import{f as Jr}from"./chunk-ZIGWVHCS.js";import{a as Fn}from"./chunk-7TJJXVSE.js";import{a as $r,b as jr,d as Ur,e as ft,f as Ho,g as zr,h as Wr,i as Zr,j as qr,k as Gr}from"./chunk-WI7GWFEG.js";import{a as cs}from"./chunk-KZ6INM5M.js";import{c as Mn,h as _n,k as Qs}from"./chunk-4QHKBC77.js";import{B as rn,C as nn,I as He,J as an,K as qt,O as A,P as Y,R as ln,e as ye,p as vo,q as on}from"./chunk-3CJW6NWG.js";import{b as ht,c as ao}from"./chunk-UK64ZSUW.js";import{a as mt,c as en,h as $o,i as tn}from"./chunk-O3NAGRTR.js";import{a as Hr}from"./chunk-HV7G6DFP.js";import{a as St}from"./chunk-BOXSWNXZ.js";import{a as In}from"./chunk-TAD43CG5.js";import{b as io}from"./chunk-RHZ4M2NZ.js";import{a as ct,e as Ys}from"./chunk-SEU5V7I6.js";import{a as Gs,b as ho}from"./chunk-ZPP2KOR4.js";import{a as lt,i as Rt,j as F}from"./chunk-CKSHCYGC.js";import{f as qs}from"./chunk-XLXNLJ4N.js";import{a as Xr}from"./chunk-ZHVTQ37P.js";import{a as be}from"./chunk-3OA7PECS.js";import{a as Kr,b as Qr,c as Yr,d as ae,e as Dn,f as An,k as $e,l as Vn,m as Bn,n as Ln}from"./chunk-E75ANNWX.js";import{b as Zs}from"./chunk-JHKMUTIF.js";import{a,d as Ws,e as S,f as M,g as Fo,h as go,j as z}from"./chunk-RRCPZMC2.js";var B=S(Fo(),1);var ut=S(M(),1),q=S(M(),1);var i=S(go(),1);var $n=S(M(),1),vt=S(go(),1);var vi={border:"1px solid var(--destructive)",color:"var(--destructive)",padding:12},xi={overflow:"auto",whiteSpace:"pre-wrap"},ds=class extends $n.Component{static{a(this,"ErrorBoundary")}static getDerivedStateFromError(e){return{error:e}}state={error:null};componentDidCatch(e,o){console.error("[lunora-studio] panel error",e,o.componentStack)}reset=a(()=>{this.setState({error:null})},"reset");render(){let{children:e,fallbackTitle:o,label:s,retryLabel:r}=this.props,{error:n}=this.state;if(n===null)return(0,vt.jsxDEV)(vt.Fragment,{children:e},void 0,!1);let l=o??(s===void 0?"Something went wrong":`${s} failed`);return(0,vt.jsxDEV)("div",{"data-testid":"dash-error-boundary",role:"alert",style:vi,children:[(0,vt.jsxDEV)("strong",{children:l},void 0,!1),(0,vt.jsxDEV)("pre",{"data-testid":"dash-error-message",style:xi,children:n.message},void 0,!1),(0,vt.jsxDEV)("button",{"data-testid":"dash-error-retry",onClick:this.reset,type:"button",children:r??"Try again"},void 0,!1)]},void 0,!0)}};var Ct={};Ws(Ct,{Arrow:()=>nr,Backdrop:()=>ar,Close:()=>cr,Description:()=>lr,Handle:()=>bo,Popup:()=>rr,Portal:()=>er,Positioner:()=>tr,Root:()=>zn,Title:()=>ir,Trigger:()=>Js,Viewport:()=>dr,createHandle:()=>ra});var dt=S(M(),1);var ps=S(M(),1);var us=ps.createContext(void 0);us.displayName="PopoverRootContext";function oe(t){let e=ps.useContext(us);if(e===void 0&&!t)throw new Error("Base UI: PopoverRootContext is missing. Popover parts must be placed within <Popover.Root>.");return e}a(oe,"usePopoverRootContext");var xt=S(M(),1),jn=S(Hr(),1);function bi(){return{...oo(),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}a(bi,"createInitialState");var yi={...ro,disabled:j(t=>t.disabled),instantType:j(t=>t.instantType),openMethod:j(t=>t.openMethod),openChangeReason:j(t=>t.openChangeReason),modal:j(t=>t.modal),focusManagerModal:j(t=>t.focusManagerModal),stickIfOpen:j(t=>t.stickIfOpen),titleElementId:j(t=>t.titleElementId),descriptionElementId:j(t=>t.descriptionElementId),openOnHover:j(t=>t.openOnHover),closeDelay:j(t=>t.closeDelay),hasViewport:j(t=>t.hasViewport)},lo=class t extends Kt{static{a(this,"PopoverStore")}constructor(e,o,s=!1){let r={...bi(),...e},n=new to;r.open&&e?.mounted===void 0&&(r.mounted=!0),r.floatingRootContext=so(n,o,s),super(r,{popupRef:xt.createRef(),backdropRef:xt.createRef(),internalBackdropRef:xt.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:xt.createRef(),beforeContentFocusGuardRef:xt.createRef(),stickIfOpenTimeout:new rn,triggerElements:n},yi)}setOpen=a((e,o)=>{let s=o.reason===A.triggerHover,r=o.reason===A.triggerPress&&o.event.detail===0,n=!e&&(o.reason===A.escapeKey||o.reason==null),l=Cn(o),d=this.select("activeTriggerId");if(!e&&o.reason===A.closePress&&o.trigger==null&&d!=null&&(o.trigger=this.context.triggerElements.getById(d)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(e,o),o.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,o);let p=a(()=>{let c={open:e,openChangeReason:o.reason};Go(c,e,o.trigger,l()),this.update(c)},"changeState");s?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set("stickIfOpen",!1)}),jn.flushSync(p)):p(),r||n?this.set("instantType",r?"click":"dismiss"):o.reason===A.focusOut?this.set("instantType","focus"):this.set("instantType",void 0)},"setOpen");static useStore(e,o){let{store:s,internalStore:r}=Qt(e,(n,l)=>new t(o,n,l));return xt.useEffect(()=>r?.disposeEffect(),[r]),s}disposeEffect=a(()=>this.context.stickIfOpenTimeout.disposeEffect(),"disposeEffect")};var Nt=S(be(),1);function Un({props:t}){let{children:e,open:o,defaultOpen:s=!1,onOpenChange:r,onOpenChangeComplete:n,modal:l=!1,handle:d,triggerId:p,defaultTriggerId:c=null}=t,u=lo.useStore(d?.store,{modal:l,open:s,openProp:o,activeTriggerId:c,triggerIdProp:p});Ko(u,o,s,c),u.useControlledProp("openProp",o),u.useControlledProp("triggerIdProp",p);let g=u.useState("open"),m=u.useState("mounted"),h=u.useState("payload"),f=fn()!=null;u.useContextCallback("onOpenChange",r),u.useContextCallback("onOpenChangeComplete",n),Qo(u,g),Jt(u);let{forceUnmount:v}=Xt(g,u,()=>{u.update({stickIfOpen:!0,openChangeReason:null})});u.useSyncedValues({modal:l,nested:f}),dt.useEffect(()=>{g||u.context.stickIfOpenTimeout.clear()},[u,g]);let x=dt.useCallback(()=>{u.setOpen(!1,Y(A.imperativeAction))},[u]);dt.useImperativeHandle(t.actionsRef,()=>({unmount:v,close:x}),[v,x]);let b=g||m,C=dt.useMemo(()=>({store:u}),[u]);return(0,Nt.jsxs)(us.Provider,{value:C,children:[b&&(0,Nt.jsx)(Ci,{store:u,modal:l}),typeof e=="function"?e({payload:h}):e]})}a(Un,"PopoverRootComponent");function zn(t){return oe(!0)?(0,Nt.jsx)(Un,{props:t}):(0,Nt.jsx)(hn,{children:(0,Nt.jsx)(Un,{props:t})})}a(zn,"PopoverRoot");function Ci({store:t,modal:e}){let o=t.useState("floatingRootContext"),s=Gt(o,{outsidePressEvent:{mouse:e==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),r=s.reference??Rt,n=s.trigger??Rt,l=dt.useMemo(()=>lt(gt,s.floating),[s.floating]);return eo(t,{activeTriggerProps:r,inactiveTriggerProps:n,popupProps:l}),null}a(Ci,"PopoverInteractions");var bt=S(M(),1);var Et=S(be(),1);var Js=bt.forwardRef(a(function(e,o){let{render:s,className:r,style:n,disabled:l=!1,nativeButton:d=!0,handle:p,payload:c,openOnHover:u=!1,delay:g=300,closeDelay:m=0,id:h,...f}=e,v=oe(!0),x=p?.store??v?.store;if(!x)throw new Error("Base UI: <Popover.Trigger> must be either used within a <Popover.Root> component or provided with a handle.");let b=ye(h),C=x.useState("isTriggerActive",b),P=x.useState("floatingRootContext"),N=x.useState("isOpenedByTrigger",b),R=x.useState("triggerPopupId",b),E=bt.useRef(null),{registerTrigger:T,isMountedByThisTrigger:k}=Yt(b,E,x,{payload:c,disabled:l,openOnHover:u,closeDelay:m}),w=x.useState("openChangeReason"),O=x.useState("stickIfOpen"),V=x.useState("openMethod"),W=x.useState("focusManagerModal"),D=Jo(P,{enabled:!l&&P!=null&&u&&(V!=="touch"||w!==A.triggerPress),mouseOnly:!0,move:!1,handleClose:Xo(),restMs:g,delay:{close:m},triggerElementRef:E,isActiveTrigger:C,isClosing:a(()=>x.select("transitionStatus")==="ending","isClosing")}),H=Zo(P,{enabled:P!=null,stickIfOpen:O}),$=es(()=>x.select("open"),ee=>{x.set("openMethod",ee)}),Z=x.useState("triggerProps",k),{getButtonProps:K,buttonRef:I}=ht({disabled:l,native:d}),_={open(ee){return ee&&w===A.triggerPress?En.open(ee):no.open(ee)}},{preFocusGuardRef:U,handlePreFocusGuardFocus:te,handleFocusTargetFocus:re}=Tn(x,E),J=F("button",e,{state:{disabled:l,open:N},ref:[I,o,T,E],props:[H.reference,D,Z,$,{[jo]:"",id:b,"aria-haspopup":"dialog","aria-expanded":N,"aria-controls":R},f,K],stateAttributesMapping:_});return k&&!W?(0,Et.jsxs)(bt.Fragment,{children:[(0,Et.jsx)(Ks,{ref:U,onFocus:te}),(0,Et.jsx)(bt.Fragment,{children:J},b),(0,Et.jsx)(Ks,{ref:x.context.triggerFocusTargetRef,onFocus:re})]}):(0,Et.jsx)(bt.Fragment,{children:J},b)},"PopoverTrigger"));Js.displayName="PopoverTrigger";var Zn=S(M(),1);var fs=S(M(),1);var ms=fs.createContext(void 0);ms.displayName="PopoverPortalContext";function Wn(){let t=fs.useContext(ms);if(t===void 0)throw new Error("Base UI: <Popover.Portal> is missing.");return t}a(Wn,"usePopoverPortalContext");var Xs=S(be(),1);var er=Zn.forwardRef(a(function(e,o){let{keepMounted:s=!1,...r}=e,{store:n}=oe();return n.useState("mounted")||s?(0,Xs.jsx)(ms.Provider,{value:s,children:(0,Xs.jsx)(zo,{ref:o,...r})}):null},"PopoverPortal"));er.displayName="PopoverPortal";var po=S(M(),1);var gs=S(M(),1);var hs=gs.createContext(void 0);hs.displayName="PopoverPositionerContext";function co(){let t=gs.useContext(hs);if(!t)throw new Error("Base UI: PopoverPositionerContext is missing. PopoverPositioner parts must be placed within <Popover.Positioner>.");return t}a(co,"usePopoverPositionerContext");var xo=S(be(),1);var tr=po.forwardRef(a(function(e,o){let{render:s,className:r,style:n,anchor:l,positionMethod:d="absolute",side:p="bottom",align:c="center",sideOffset:u=0,alignOffset:g=0,collisionBoundary:m="clipping-ancestors",collisionPadding:h=5,arrowPadding:f=5,sticky:v=!1,disableAnchorTracking:x=!1,collisionAvoidance:b=Uo,...C}=e,{store:P}=oe(),N=Wn(),R=mn(),E=P.useState("floatingRootContext"),T=P.useState("mounted"),k=P.useState("open"),w=P.useState("openChangeReason"),O=P.useState("activeTriggerElement"),V=P.useState("modal"),W=P.useState("openMethod"),D=P.useState("positionerElement"),H=P.useState("instantType"),$=P.useState("transitionStatus"),Z=P.useState("hasViewport"),K=po.useRef(null),I=an(D,!1,!1),_=ss({anchor:l,floatingRootContext:E,positionMethod:d,mounted:T,side:p,sideOffset:u,align:c,alignOffset:g,arrowPadding:f,collisionBoundary:m,collisionPadding:h,sticky:v,disableAnchorTracking:x,keepMounted:N,nodeId:R,collisionAvoidance:b,adaptiveOrigin:Z?os:void 0}),U=E.useState("domReferenceElement");mt(()=>{let J=U,ee=K.current;if(J&&(K.current=J),ee&&J&&J!==ee){P.set("instantType",void 0);let ie=new AbortController;return I(()=>{P.set("instantType","trigger-change")},ie.signal),()=>{ie.abort()}}},[U,I,P]),kn(k&&V===!0&&w!==A.triggerHover,W==="touch",D,O);let te=po.useCallback(J=>{P.set("positionerElement",J)},[P]),re={open:k,side:_.side,align:_.align,anchorHidden:_.anchorHidden,instant:H},ne=as(e,re,{styles:_.positionerStyles,transitionStatus:$,props:C,refs:[o,te],hidden:!T,inert:!k});return(0,xo.jsxs)(hs.Provider,{value:_,children:[T&&V===!0&&w!==A.triggerHover&&(0,xo.jsx)(rs,{ref:P.context.internalBackdropRef,inert:ts(!k),cutout:O}),(0,xo.jsx)(gn,{id:R,children:ne})]})},"PopoverPositioner"));tr.displayName="PopoverPositioner";var vs=S(M(),1);var yt=S(M(),1);var qn=S(be(),1);var or=yt.createContext(void 0);or.displayName="ClosePartContext";function Gn(){let[t,e]=yt.useState(0),o=en(()=>(e(r=>r+1),()=>{e(r=>Math.max(0,r-1))}));return{context:yt.useMemo(()=>({register:o}),[o]),hasClosePart:t>0}}a(Gn,"useClosePartCount");function Kn(t){let{value:e,children:o}=t;return(0,qn.jsx)(or.Provider,{value:e,children:o})}a(Kn,"ClosePartProvider");function Qn(){let t=yt.useContext(or);mt(()=>t?.register(),[t])}a(Qn,"useClosePartRegistration");var sr=S(be(),1);var Pi={...ue,...He},rr=vs.forwardRef(a(function(e,o){let{render:s,className:r,style:n,initialFocus:l,finalFocus:d,...p}=e,{store:c}=oe(),u=co(),g=On(!0)!=null,{context:m,hasClosePart:h}=Gn(),f=c.useState("open"),v=c.useState("openMethod"),x=c.useState("instantType"),b=c.useState("transitionStatus"),C=c.useState("popupProps"),P=c.useState("titleElementId"),N=c.useState("descriptionElementId"),R=c.useState("modal"),E=c.useState("mounted"),T=c.useState("openChangeReason"),k=c.useState("activeTriggerElement"),w=c.useState("floatingRootContext"),O=w.useState("floatingId"),V=c.useState("disabled"),W=c.useState("openOnHover"),D=c.useState("closeDelay"),H=p.id??O;qt({open:f,ref:c.context.popupRef,onComplete(){f&&c.context.onOpenChangeComplete?.(!0)}}),Yo(w,{enabled:W&&!V,closeDelay:D});let $=l===void 0?qo(c.context.popupRef):l,Z=R!==!1&&h;c.useSyncedValue("focusManagerModal",Z);let K=vs.useCallback(U=>{c.set("popupElement",U)},[c]),I={open:f,side:u.side,align:u.align,instant:x,transitionStatus:b},_=F("div",e,{state:I,ref:[o,c.context.popupRef,K],props:[C,{id:H,role:"dialog",...gt,"aria-labelledby":P,"aria-describedby":N,onKeyDown(U){g&&is.has(U.key)&&U.stopPropagation()}},ns(b),p],stateAttributesMapping:Pi});return(0,sr.jsx)(Wo,{context:w,openInteractionType:v,modal:Z,disabled:!E||T===A.triggerHover,initialFocus:$,returnFocus:d,restoreFocus:"popup",previousFocusableElement:tn(k)?k:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:(0,sr.jsx)(Kn,{value:m,children:_})})},"PopoverPopup"));rr.displayName="PopoverPopup";var Yn=S(M(),1);var nr=Yn.forwardRef(a(function(e,o){let{render:s,className:r,style:n,...l}=e,{store:d}=oe(),p=d.useState("open"),{arrowRef:c,side:u,align:g,arrowUncentered:m,arrowStyles:h}=co();return F("div",e,{state:{open:p,side:u,align:g,uncentered:m},ref:[o,c],props:[{style:h,"aria-hidden":!0},l],stateAttributesMapping:ue})},"PopoverArrow"));nr.displayName="PopoverArrow";var Jn=S(M(),1);var Ri={...ue,...He},ar=Jn.forwardRef(a(function(e,o){let{render:s,className:r,style:n,...l}=e,{store:d}=oe(),p=d.useState("open"),c=d.useState("mounted"),u=d.useState("transitionStatus"),g=d.useState("openChangeReason");return F("div",e,{state:{open:p,transitionStatus:u},ref:[d.context.backdropRef,o],props:[{role:"presentation",hidden:!c,style:{pointerEvents:g===A.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},l],stateAttributesMapping:Ri})},"PopoverBackdrop"));ar.displayName="PopoverBackdrop";var Xn=S(M(),1);var ir=Xn.forwardRef(a(function(e,o){let{render:s,className:r,style:n,...l}=e,{store:d}=oe(),p=ye(l.id);return d.useSyncedValueWithCleanup("titleElementId",p),F("h2",e,{ref:o,props:[{id:p},l]})},"PopoverTitle"));ir.displayName="PopoverTitle";var ea=S(M(),1);var lr=ea.forwardRef(a(function(e,o){let{render:s,className:r,style:n,...l}=e,{store:d}=oe(),p=ye(l.id);return d.useSyncedValueWithCleanup("descriptionElementId",p),F("p",e,{ref:o,props:[{id:p},l]})},"PopoverDescription"));lr.displayName="PopoverDescription";var ta=S(M(),1);var cr=ta.forwardRef(a(function(e,o){let{render:s,className:r,style:n,disabled:l=!1,nativeButton:d=!0,...p}=e,{buttonRef:c,getButtonProps:u}=ht({disabled:l,focusableWhenDisabled:!1,native:d}),{store:g}=oe();return Qn(),F("button",e,{ref:[o,c],props:[{onClick(h){g.setOpen(!1,Y(A.closePress,h.nativeEvent))}},p,u]})},"PopoverClose"));cr.displayName="PopoverClose";var sa=S(M(),1);var oa=(function(t){return t.popupWidth="--popup-width",t.popupHeight="--popup-height",t})({});var Si={activationDirection:a(t=>t?{"data-activation-direction":t}:null,"activationDirection")},dr=sa.forwardRef(a(function(e,o){let{render:s,className:r,style:n,children:l,...d}=e,{store:p}=oe(),{side:c}=co(),u=p.useState("instantType"),{children:g,state:m}=ls({store:p,side:c,cssVars:oa,children:l}),h={activationDirection:m.activationDirection,transitioning:m.transitioning,instant:u};return F("div",e,{state:h,ref:o,props:[d,{children:g}],stateAttributesMapping:Si})},"PopoverViewport"));dr.displayName="PopoverViewport";var bo=class{static{a(this,"PopoverHandle")}constructor(){this.store=new lo}open(e){let o=e?this.store.context.triggerElements.getById(e)??void 0:void 0;if(e&&!o)throw new Error(`Base UI: PopoverHandle.open: No trigger found with id "${e}".`);this.store.setOpen(!0,Y(A.imperativeAction,void 0,o))}close(){this.store.setOpen(!1,Y(A.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function ra(){return new bo}a(ra,"createPopoverHandle");var fe={};Ws(fe,{Backdrop:()=>pr,Close:()=>ur,Description:()=>fr,Handle:()=>So,Popup:()=>mr,Portal:()=>gr,Root:()=>xa,Title:()=>xr,Trigger:()=>br,Viewport:()=>vr,createHandle:()=>Ca});var na=S(M(),1);var yo=S(M(),1);var Co=yo.createContext(!1);Co.displayName="IsDrawerContext";var xs=yo.createContext(void 0);xs.displayName="DialogRootContext";function le(t){let e=yo.useContext(xs);if(t===!1&&e===void 0)throw new Error("Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.");return e}a(le,"useDialogRootContext");var Ni={...ue,...He},pr=na.forwardRef(a(function(e,o){let{render:s,className:r,style:n,forceRender:l=!1,...d}=e,{store:p}=le(),c=p.useState("open"),u=p.useState("nested"),g=p.useState("mounted"),m=p.useState("transitionStatus");return F("div",e,{state:{open:c,transitionStatus:m},ref:[p.context.backdropRef,o],stateAttributesMapping:Ni,props:[{role:"presentation",hidden:!g,style:{userSelect:"none",WebkitUserSelect:"none"}},d],enabled:l||!u})},"DialogBackdrop"));pr.displayName="DialogBackdrop";var aa=S(M(),1);var ur=aa.forwardRef(a(function(e,o){let{render:s,className:r,style:n,disabled:l=!1,nativeButton:d=!0,...p}=e,{store:c}=le(),u=c.useState("open"),{getButtonProps:g,buttonRef:m}=ht({disabled:l,native:d}),h={disabled:l};function f(v){u&&c.setOpen(!1,Y(A.closePress,v.nativeEvent))}return a(f,"handleClick"),F("button",e,{state:h,ref:[o,m],props:[{onClick:f},p,g]})},"DialogClose"));ur.displayName="DialogClose";var ia=S(M(),1);var fr=ia.forwardRef(a(function(e,o){let{render:s,className:r,style:n,id:l,...d}=e,{store:p}=le(),c=ye(l);return p.useSyncedValueWithCleanup("descriptionElementId",c),F("p",e,{ref:o,props:[{id:c},d]})},"DialogDescription"));fr.displayName="DialogDescription";var da=S(M(),1);var la=(function(t){return t.nestedDialogs="--nested-dialogs",t})({});var ca=(function(t){return t[t.open=st.open]="open",t[t.closed=st.closed]="closed",t[t.startingStyle=st.startingStyle]="startingStyle",t[t.endingStyle=st.endingStyle]="endingStyle",t.nested="data-nested",t.nestedDialogOpen="data-nested-dialog-open",t})({});var bs=S(M(),1);var ys=bs.createContext(void 0);ys.displayName="DialogPortalContext";function Cs(){let t=bs.useContext(ys);if(t===void 0)throw new Error("Base UI: <Dialog.Portal> is missing.");return t}a(Cs,"useDialogPortalContext");var pa=S(be(),1);var Ei={...ue,...He,nestedDialogOpen(t){return t?{[ca.nestedDialogOpen]:""}:null}},mr=da.forwardRef(a(function(e,o){let{render:s,className:r,style:n,finalFocus:l,initialFocus:d,...p}=e,{store:c}=le(),u=c.useState("descriptionElementId"),g=c.useState("disablePointerDismissal"),m=c.useState("floatingRootContext"),h=c.useState("popupProps"),f=c.useState("modal"),v=c.useState("mounted"),x=c.useState("nested"),b=c.useState("nestedOpenDialogCount"),C=c.useState("open"),P=c.useState("openMethod"),N=c.useState("titleElementId"),R=c.useState("transitionStatus"),E=c.useState("role"),T=m.useState("floatingId"),k=p.id??T;Cs(),qt({open:C,ref:c.context.popupRef,onComplete(){C&&c.context.onOpenChangeComplete?.(!0)}});let w=d===void 0?qo(c.context.popupRef):d,O=b>0,V=c.useStateSetter("popupElement"),D=F("div",e,{state:{open:C,nested:x,transitionStatus:R,nestedDialogOpen:O},props:[h,{id:k,"aria-labelledby":N??void 0,"aria-describedby":u??void 0,role:E,...gt,hidden:!v,onKeyDown(H){is.has(H.key)&&H.stopPropagation()},style:{[la.nestedDialogs]:b}},p],ref:[o,c.context.popupRef,V],stateAttributesMapping:Ei});return(0,pa.jsx)(Wo,{context:m,openInteractionType:P,disabled:!v,closeOnFocusOut:!g,initialFocus:w,returnFocus:l,modal:f!==!1,restoreFocus:"popup",children:D})},"DialogPopup"));mr.displayName="DialogPopup";var ua=S(M(),1);var Po=S(be(),1);var gr=ua.forwardRef(a(function(e,o){let{keepMounted:s=!1,...r}=e,{store:n}=le(),l=n.useState("mounted"),d=n.useState("modal"),p=n.useState("open");return l||s?(0,Po.jsx)(ys.Provider,{value:s,children:(0,Po.jsxs)(zo,{ref:o,...r,children:[l&&d===!0&&(0,Po.jsx)(rs,{ref:n.context.internalBackdropRef,inert:ts(!p)}),e.children]})}):null},"DialogPortal"));gr.displayName="DialogPortal";var va=S(M(),1);var ga=S(M(),1);var pt=S(M(),1);function fa(t){let{store:e,actionsRef:o}=t,s=e.useState("open");Qo(e,s),Jt(e);let{forceUnmount:r}=Xt(s,e),n=pt.useCallback(()=>{e.setOpen(!1,Y(A.imperativeAction))},[e]);pt.useImperativeHandle(o,()=>({unmount:r,close:n}),[r,n])}a(fa,"useDialogRoot");function ma({store:t,parentContext:e,isDrawer:o}){let s=t.useState("open"),r=t.useState("disablePointerDismissal"),n=t.useState("modal"),l=t.useState("popupElement"),d=t.useState("floatingRootContext"),[p,c]=pt.useState(0),[u,g]=pt.useState(0),m=p===0,h=Gt(d,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:n==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(b){if(!t.context.outsidePressEnabledRef.current||"button"in b&&b.button!==0||"touches"in b&&b.touches.length!==1)return!1;let C=on(b);return m&&!r?n&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===C||t.context.backdropRef.current===C||vo(C,l)&&!C?.hasAttribute("data-base-ui-portal"):!0:!1},escapeKey:m});wn(s&&n===!0,l),t.useContextCallback("onNestedDialogOpen",(b,C)=>{c(b),g(C)}),t.useContextCallback("onNestedDialogClose",()=>{c(0),g(0)}),pt.useEffect(()=>(e?.onNestedDialogOpen&&s&&e.onNestedDialogOpen(p+1,u+(o?1:0)),e?.onNestedDialogClose&&!s&&e.onNestedDialogClose(),()=>{e?.onNestedDialogClose&&s&&e.onNestedDialogClose()}),[o,s,p,u,e]);let f=h.reference??Rt,v=h.trigger??Rt,x=h.floating??Rt;return eo(t,{activeTriggerProps:f,inactiveTriggerProps:v,popupProps:x,nestedOpenDialogCount:p,nestedOpenDrawerCount:u}),null}a(ma,"DialogInteractions");var Ps=S(M(),1);var Ti={...ro,modal:j(t=>t.modal),nested:j(t=>t.nested),nestedOpenDialogCount:j(t=>t.nestedOpenDialogCount),nestedOpenDrawerCount:j(t=>t.nestedOpenDrawerCount),disablePointerDismissal:j(t=>t.disablePointerDismissal),openMethod:j(t=>t.openMethod),descriptionElementId:j(t=>t.descriptionElementId),titleElementId:j(t=>t.titleElementId),viewportElement:j(t=>t.viewportElement),role:j(t=>t.role)},uo=class t extends Kt{static{a(this,"DialogStore")}constructor(e,o,s=!1){let r=new to,n=wi(e);n.floatingRootContext=so(r,o,s),super(n,{popupRef:Ps.createRef(),backdropRef:Ps.createRef(),internalBackdropRef:Ps.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:r,onOpenChange:void 0,onOpenChangeComplete:void 0},Ti)}setOpen=a((e,o)=>{if(o.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!e&&o.trigger==null&&this.state.activeTriggerId!=null&&(o.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,o),o.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,o);let s={open:e};Go(s,e,o.trigger),this.update(s)},"setOpen");static useStore(e,o){return Qt(e,(r,n)=>new t(o,r,n),!0).store}};function wi(t={}){return{...oo(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...t}}a(wi,"createInitialState");var Ro=S(be(),1);function ha(t,e="dialog"){let{children:o,open:s,defaultOpen:r=!1,onOpenChange:n,onOpenChangeComplete:l,disablePointerDismissal:d=!1,modal:p=!0,actionsRef:c,handle:u,triggerId:g,defaultTriggerId:m=null}=t,h=e==="drawer",f=e==="alert-dialog",v=f?!0:p,x=f||d,b=f?"alertdialog":"dialog",C=le(!0),N={modal:v,disablePointerDismissal:x,nested:!!C,role:b},R=uo.useStore(u?.store,{open:r,openProp:s,activeTriggerId:m,triggerIdProp:g,...N});xn(()=>{let V=s===void 0&&R.state.open===!1&&r===!0?{open:!0,activeTriggerId:m}:null;f?R.update(V?{...N,...V}:N):V&&R.update(V)}),R.useControlledProp("openProp",s),R.useControlledProp("triggerIdProp",g),R.useSyncedValues(N),R.useContextCallback("onOpenChange",n),R.useContextCallback("onOpenChangeComplete",l);let E=R.useState("open"),T=R.useState("mounted"),k=R.useState("payload");fa({store:R,actionsRef:c});let w=E||T,O=ga.useMemo(()=>({store:R}),[R]);return(0,Ro.jsx)(Co.Provider,{value:!1,children:(0,Ro.jsxs)(xs.Provider,{value:O,children:[w&&(0,Ro.jsx)(ma,{store:R,parentContext:C?.store.context,isDrawer:h}),typeof o=="function"?o({payload:k}):o]})})}a(ha,"useRenderDialogRoot");function xa(t){let e=va.useContext(Co)?"drawer":"dialog";return ha(t,e)}a(xa,"DialogRoot");var ba=S(M(),1);var hr=(function(t){return t[t.open=st.open]="open",t[t.closed=st.closed]="closed",t[t.startingStyle=st.startingStyle]="startingStyle",t[t.endingStyle=st.endingStyle]="endingStyle",t.nested="data-nested",t.nestedDialogOpen="data-nested-dialog-open",t})({});var ki={...ue,...He,nested(t){return t?{[hr.nested]:""}:null},nestedDialogOpen(t){return t?{[hr.nestedDialogOpen]:""}:null}},vr=ba.forwardRef(a(function(e,o){let{render:s,className:r,style:n,children:l,...d}=e,p=Cs(),{store:c}=le(),u=c.useState("open"),g=c.useState("nested"),m=c.useState("transitionStatus"),h=c.useState("nestedOpenDialogCount"),f=c.useState("mounted"),v=c.useStateSetter("viewportElement"),x=h>0;return F("div",e,{enabled:p||f,state:{open:u,nested:g,transitionStatus:m,nestedDialogOpen:x},ref:[o,v],stateAttributesMapping:ki,props:[{role:"presentation",hidden:!f,style:{pointerEvents:u?void 0:"none"},children:l},d]})},"DialogViewport"));vr.displayName="DialogViewport";var ya=S(M(),1);var xr=ya.forwardRef(a(function(e,o){let{render:s,className:r,style:n,id:l,...d}=e,{store:p}=le(),c=ye(l);return p.useSyncedValueWithCleanup("titleElementId",c),F("h2",e,{ref:o,props:[{id:c},d]})},"DialogTitle"));xr.displayName="DialogTitle";var Rs=S(M(),1);var br=Rs.forwardRef(a(function(e,o){let{render:s,className:r,style:n,disabled:l=!1,nativeButton:d=!0,id:p,payload:c,handle:u,...g}=e,m=le(!0),h=u?.store??m?.store;if(!h)throw new Error("Base UI: <Dialog.Trigger> must be used within <Dialog.Root> or provided with a handle.");let f=ye(p),v=h.useState("floatingRootContext"),x=h.useState("isOpenedByTrigger",f),b=h.useState("triggerPopupId",f),C=Rs.useRef(null),{registerTrigger:P,isMountedByThisTrigger:N}=Yt(f,C,h,{payload:c}),{getButtonProps:R,buttonRef:E}=ht({disabled:l,native:d}),T=Zo(v,{enabled:v!=null}),k=es(()=>h.select("open"),V=>{h.set("openMethod",V)}),w={disabled:l,open:x},O=h.useState("triggerProps",N);return F("button",e,{state:w,ref:[E,o,P,C],props:[T.reference,O,k,{[jo]:"",id:f,"aria-haspopup":"dialog","aria-expanded":x,"aria-controls":b},g,R],stateAttributesMapping:no})},"DialogTrigger"));br.displayName="DialogTrigger";var So=class{static{a(this,"DialogHandle")}constructor(e){this.store=e??new uo}open(e){let o=e?this.store.context.triggerElements.getById(e):void 0;e&&!o&&console.warn(`Base UI: DialogHandle.open: No trigger found with id "${e}". The dialog will open, but the trigger will not be associated with the dialog.`),this.store.setOpen(!0,Y(A.imperativeAction,void 0,o))}openWithPayload(e){this.store.set("payload",e),this.store.setOpen(!0,Y(A.imperativeAction,void 0,void 0))}close(){this.store.setOpen(!1,Y(A.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function Ca(){return new So}a(Ca,"createDialogHandle");var nt={};Ws(nt,{Arrow:()=>Tr,Handle:()=>No,Popup:()=>Er,Portal:()=>Sr,Positioner:()=>Nr,Provider:()=>Or,Root:()=>yr,Trigger:()=>Cr,Viewport:()=>Mr,createHandle:()=>Va});var rt=S(M(),1);var Ss=S(M(),1);var Ns=Ss.createContext(void 0);Ns.displayName="TooltipRootContext";function je(t){let e=Ss.useContext(Ns);if(e===void 0&&!t)throw new Error("Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>.");return e}a(je,"useTooltipRootContext");var Pa=S(M(),1);var Oi={...ro,disabled:j(t=>t.disabled),instantType:j(t=>t.instantType),isInstantPhase:j(t=>t.isInstantPhase),trackCursorAxis:j(t=>t.trackCursorAxis),disableHoverablePopup:j(t=>t.disableHoverablePopup),lastOpenChangeReason:j(t=>t.openChangeReason),closeOnClick:j(t=>t.closeOnClick),closeDelay:j(t=>t.closeDelay),hasViewport:j(t=>t.hasViewport)},fo=class t extends Kt{static{a(this,"TooltipStore")}constructor(e,o,s=!1){let r=new to,n={...Mi(),...e};n.floatingRootContext=so(r,o,s),super(n,{popupRef:Pa.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:r},Oi)}setOpen=a((e,o)=>{Pn(this,e,o,{extraState:{openChangeReason:o.reason}})},"setOpen");cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,Y(A.triggerPress,e))}static useStore(e,o){return Qt(e,(r,n)=>new t(o,r,n)).store}};function Mi(){return{...oo(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}a(Mi,"createInitialState");var Es=S(be(),1);var yr=bn(a(function(e){let{disabled:o=!1,defaultOpen:s=!1,open:r,disableHoverablePopup:n=!1,trackCursorAxis:l="none",actionsRef:d,onOpenChange:p,onOpenChangeComplete:c,handle:u,triggerId:g,defaultTriggerId:m=null,children:h}=e,f=fo.useStore(u?.store,{open:s,openProp:r,activeTriggerId:m,triggerIdProp:g});Ko(f,r,s,m),f.useControlledProp("openProp",r),f.useControlledProp("triggerIdProp",g),f.useContextCallback("onOpenChange",p),f.useContextCallback("onOpenChangeComplete",c);let v=f.useState("open"),x=!o&&v,b=f.useState("activeTriggerId"),C=f.useState("mounted"),P=f.useState("payload");f.useSyncedValues({trackCursorAxis:l,disableHoverablePopup:n}),f.useSyncedValue("disabled",o),Jt(f,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:N,transitionStatus:R}=Xt(x,f),E=f.useState("isInstantPhase"),T=f.useState("instantType"),k=f.useState("lastOpenChangeReason"),w=rt.useRef(null);mt(()=>{v&&o&&f.setOpen(!1,Y(A.disabled))},[v,o,f]),mt(()=>{R==="ending"&&k===A.none||R!=="ending"&&E?(T!=="delay"&&(w.current=T),f.set("instantType","delay")):w.current!==null&&(f.set("instantType",w.current),w.current=null)},[R,E,k,T,f]),mt(()=>{x&&b==null&&f.set("payload",void 0)},[f,b,x]);let O=rt.useCallback(()=>{f.setOpen(!1,Y(A.imperativeAction))},[f]);rt.useImperativeHandle(d,()=>({unmount:N,close:O}),[N,O]);let V=x||C||!o&&l!=="none";return(0,Es.jsxs)(Ns.Provider,{value:f,children:[V&&(0,Es.jsx)(_i,{store:f,disabled:o,trackCursorAxis:l}),typeof h=="function"?h({payload:P}):h]})},"TooltipRoot"));yr.displayName="TooltipRoot";function _i({store:t,disabled:e,trackCursorAxis:o}){let s=t.useState("floatingRootContext"),r=Gt(s,{enabled:!e,referencePress:a(()=>t.select("closeOnClick"),"referencePress")}),n=vn(s,{enabled:!e&&o!=="none",axis:o==="none"?void 0:o}),l=rt.useMemo(()=>lt(n.reference,r.reference),[n.reference,r.reference]),d=rt.useMemo(()=>lt(n.trigger,r.trigger),[n.trigger,r.trigger]),p=rt.useMemo(()=>lt(gt,n.floating,r.floating),[n.floating,r.floating]);return eo(t,{activeTriggerProps:l,inactiveTriggerProps:d,popupProps:p}),null}a(_i,"TooltipInteractions");var ks=S(M(),1);var Ts=S(M(),1);var ws=Ts.createContext(void 0);ws.displayName="TooltipProviderContext";function Ra(){return Ts.useContext(ws)}a(Ra,"useTooltipProviderContext");var Sa=(function(t){return t[t.popupOpen=Nn.popupOpen]="popupOpen",t.triggerDisabled="data-trigger-disabled",t})({});var Ea="data-base-ui-tooltip-trigger";function Na(t){if("composedPath"in t){let o=t.composedPath();for(let s=0;s<o.length;s+=1){let r=o[s];if($o(r))return r}}let e=t.target;return $o(e)?e:null}a(Na,"getTargetElement");function Ii(t){let e=t;for(;e;){if(e.hasAttribute(Ea))return e;let o=e.parentElement;if(o){e=o;continue}let s=e.getRootNode();e="host"in s&&$o(s.host)?s.host:null}return null}a(Ii,"closestEnabledTooltipTrigger");var Cr=yn(a(function(e,o){let{render:s,className:r,style:n,handle:l,payload:d,disabled:p,delay:c,closeOnClick:u=!0,closeDelay:g,id:m,...h}=e,f=je(!0),v=l?.store??f;if(!v)throw new Error("Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle.");let x=ye(m),b=v.useState("isTriggerActive",x),C=v.useState("isOpenedByTrigger",x),P=v.useState("floatingRootContext"),N=ks.useRef(null),R=c??600,E=g??0,{registerTrigger:T,isMountedByThisTrigger:k}=Yt(x,N,v,{payload:d,closeOnClick:u,closeDelay:E}),w=Ra(),{delayRef:O,isInstantPhase:V,hasProvider:W}=dn(P,{open:C}),D=Sn(P);v.useSyncedValue("isInstantPhase",V);let H=v.useState("disabled"),$=p??H,Z=pn($),K=v.useState("trackCursorAxis"),I=v.useState("disableHoverablePopup"),_=ks.useRef(!1),U=nn(),te=ks.useRef(void 0);function re(){let L=w?.delay,Q=typeof O.current=="object"?O.current.open:void 0,X=R;return W&&(Q!==0?X=c??L??R:X=0),X}a(re,"getOpenDelay");function ne(L){let Q=N.current;if(!Q||!L)return!1;let X=Ii(L);return X!==null&&X!==Q&&vo(Q,X)}a(ne,"isEnabledNestedTriggerTarget");function J(L){let Q=ne(L);return _.current=Q,Q&&(D.openChangeTimeout.clear(),D.restTimeout.clear(),D.restTimeoutPending=!1,U.clear()),Q}a(J,"detectNestedTriggerHover");let ee=Jo(P,{enabled:!$,mouseOnly:!0,move:!1,handleClose:!I&&K!=="both"?Xo():null,restMs:re,delay(){let L=typeof O.current=="object"?O.current.close:void 0,Q=E;return g==null&&W&&(Q=L),{close:Q}},triggerElementRef:N,isActiveTrigger:b,isClosing:a(()=>v.select("transitionStatus")==="ending","isClosing"),shouldOpen(){return!_.current}}),ie=Rn(P,{enabled:!$}).reference,Be=a(L=>{let Q=_.current,X=Na(L),xe=J(X),se=N.current,Fe=se&&X&&vo(se,X);if(xe&&v.select("open")&&v.select("lastOpenChangeReason")===A.triggerHover){v.setOpen(!1,Y(A.triggerHover,L));return}if(Q&&!xe&&Fe&&!Z.current&&!v.select("open")&&se&&sn(te.current)){let de=a(()=>{!_.current&&!Z.current&&!v.select("open")&&v.setOpen(!0,Y(A.triggerHover,L,se))},"open"),pe=re();pe===0?(U.clear(),de()):U.start(pe,de)}},"handleNestedTriggerHover"),me=v.useState("triggerProps",k);return F("button",e,{state:{open:C},ref:[o,T,N],props:[ee,ie,k||K!=="none"?me:void 0,{onMouseOver(L){Be(L.nativeEvent)},onFocus(L){ne(Na(L.nativeEvent))&&L.preventBaseUIHandler()},onMouseLeave(){_.current=!1,U.clear(),te.current=void 0},onPointerEnter(L){te.current=L.pointerType},onPointerDown(L){te.current=L.pointerType,v.set("closeOnClick",u),u&&!v.select("open")&&v.cancelPendingOpen(L.nativeEvent)},onClick(L){u&&!v.select("open")&&v.cancelPendingOpen(L.nativeEvent)},id:x,[Sa.triggerDisabled]:$?"":void 0,[Ea]:$?void 0:""},h],stateAttributesMapping:no})},"TooltipTrigger"));Cr.displayName="TooltipTrigger";var Oa=S(M(),1);var Os=S(M(),1);var Ms=Os.createContext(void 0);Ms.displayName="TooltipPortalContext";function Ta(){let t=Os.useContext(Ms);if(t===void 0)throw new Error("Base UI: <Tooltip.Portal> is missing.");return t}a(Ta,"useTooltipPortalContext");var _s=S(M(),1),wa=S(Hr(),1);var ka=S(be(),1);var Pr=_s.forwardRef(a(function(e,o){let{children:s,container:r,className:n,render:l,style:d,...p}=e,{portalNode:c,portalSubtree:u}=un({container:r,ref:o,componentProps:e,elementProps:p});return!u&&!c?null:(0,ka.jsxs)(_s.Fragment,{children:[u,c&&wa.createPortal(s,c)]})},"FloatingPortalLite"));Pr.displayName="FloatingPortalLite";var Rr=S(be(),1);var Sr=Oa.forwardRef(a(function(e,o){let{keepMounted:s=!1,...r}=e;return je().useState("mounted")||s?(0,Rr.jsx)(Ms.Provider,{value:s,children:(0,Rr.jsx)(Pr,{ref:o,...r})}):null},"TooltipPortal"));Sr.displayName="TooltipPortal";var As=S(M(),1);var Is=S(M(),1);var Ds=Is.createContext(void 0);Ds.displayName="TooltipPositionerContext";function mo(){let t=Is.useContext(Ds);if(t===void 0)throw new Error("Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>.");return t}a(mo,"useTooltipPositionerContext");var Ma=S(be(),1);var Nr=As.forwardRef(a(function(e,o){let{render:s,className:r,anchor:n,positionMethod:l="absolute",side:d="top",align:p="center",sideOffset:c=0,alignOffset:u=0,collisionBoundary:g="clipping-ancestors",collisionPadding:m=5,arrowPadding:h=5,sticky:f=!1,disableAnchorTracking:v=!1,collisionAvoidance:x=Uo,style:b,...C}=e,P=je(),N=Ta(),R=P.useState("open"),E=P.useState("mounted"),T=P.useState("trackCursorAxis"),k=P.useState("disableHoverablePopup"),w=P.useState("floatingRootContext"),O=P.useState("instantType"),V=P.useState("transitionStatus"),W=P.useState("hasViewport"),D=ss({anchor:n,positionMethod:l,floatingRootContext:w,mounted:E,side:d,sideOffset:c,align:p,alignOffset:u,collisionBoundary:g,collisionPadding:m,sticky:f,arrowPadding:h,disableAnchorTracking:v,keepMounted:N,collisionAvoidance:x,adaptiveOrigin:W?os:void 0}),H=As.useMemo(()=>({open:R,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:T!=="none"?"tracking-cursor":O}),[R,D.side,D.align,D.anchorHidden,T,O]),$=as(e,H,{styles:D.positionerStyles,transitionStatus:V,props:C,refs:[o,P.useStateSetter("positionerElement")],hidden:!E,inert:!R||T==="both"||k});return(0,Ma.jsx)(Ds.Provider,{value:D,children:$})},"TooltipPositioner"));Nr.displayName="TooltipPositioner";var _a=S(M(),1);var Di={...ue,...He},Er=_a.forwardRef(a(function(e,o){let{render:s,className:r,style:n,...l}=e,d=je(),{side:p,align:c}=mo(),u=d.useState("open"),g=d.useState("instantType"),m=d.useState("transitionStatus"),h=d.useState("popupProps"),f=d.useState("floatingRootContext"),v=d.useState("disabled"),x=d.useState("closeDelay");qt({open:u,ref:d.context.popupRef,onComplete(){u&&d.context.onOpenChangeComplete?.(!0)}}),Yo(f,{enabled:!v,closeDelay:x});let b=d.useStateSetter("popupElement");return F("div",e,{state:{open:u,side:p,align:c,instant:g,transitionStatus:m},ref:[o,d.context.popupRef,b],props:[h,ns(m),l],stateAttributesMapping:Di})},"TooltipPopup"));Er.displayName="TooltipPopup";var Ia=S(M(),1);var Tr=Ia.forwardRef(a(function(e,o){let{render:s,className:r,style:n,...l}=e,d=je(),{arrowRef:p,side:c,align:u,arrowUncentered:g,arrowStyles:m}=mo(),h=d.useState("open"),f=d.useState("instantType");return F("div",e,{state:{open:h,side:c,align:u,uncentered:g,instant:f},ref:[o,p],props:[{style:m,"aria-hidden":!0},l],stateAttributesMapping:ue})},"TooltipArrow"));Tr.displayName="TooltipArrow";var wr=S(M(),1);var kr=S(be(),1);var Or=a(function(e){let{delay:o,closeDelay:s,timeout:r=400}=e,n=wr.useMemo(()=>({delay:o,closeDelay:s}),[o,s]),l=wr.useMemo(()=>({open:o,close:s}),[o,s]);return(0,kr.jsx)(ws.Provider,{value:n,children:(0,kr.jsx)(cn,{delay:l,timeoutMs:r,children:e.children})})},"TooltipProvider");Or.displayName="TooltipProvider";var Aa=S(M(),1);var Da=(function(t){return t.popupWidth="--popup-width",t.popupHeight="--popup-height",t})({});var Ai={activationDirection:a(t=>t?{"data-activation-direction":t}:null,"activationDirection")},Mr=Aa.forwardRef(a(function(e,o){let{render:s,className:r,style:n,children:l,...d}=e,p=je(),c=mo(),u=p.useState("instantType"),{children:g,state:m}=ls({store:p,side:c.side,cssVars:Da,children:l}),h={activationDirection:m.activationDirection,transitioning:m.transitioning,instant:u};return F("div",e,{state:h,ref:o,props:[d,{children:g}],stateAttributesMapping:Ai})},"TooltipViewport"));Mr.displayName="TooltipViewport";var No=class{static{a(this,"TooltipHandle")}constructor(){this.store=new fo}open(e){let o=e?this.store.context.triggerElements.getById(e):void 0;if(e&&!o)throw new Error(`Base UI: TooltipHandle.open: No trigger found with id "${e}".`);this.store.setOpen(!0,Y(A.imperativeAction,void 0,o))}close(){this.store.setOpen(!1,Y(A.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function Va(){return new No}a(Va,"createTooltipHandle");var Ce=S(Fo(),1);var Ue=S(M(),1);var y=S(go(),1);var Vi=Dn(St.studioFeatures),$a={analytics:!0,auth:!0,containers:!0,flags:!0,kv:!0,mail:!0,payments:!0,queues:!0,scheduler:!0,storage:!0,vectors:!0,workflows:!0},Bi=a(t=>{if(t===null||typeof t!="object")return $a;let e=t,o=a(s=>typeof e[s]=="boolean"?e[s]:!0,"flag");return{analytics:o("analytics"),auth:o("auth"),containers:o("containers"),flags:o("flags"),kv:o("kv"),mail:o("mail"),payments:o("payments"),queues:o("queues"),scheduler:o("scheduler"),storage:o("storage"),vectors:o("vectors"),workflows:o("workflows")}},"coerceFeatures"),Dr=a(()=>{let t=(0,Ce.c)(3),e=qs(),[o,s]=(0,Ue.useState)($a),r,n;return t[0]!==e?(r=a(()=>{$e((async()=>{try{s(Bi(await e.query(Vi,{},An(""))))}catch{}})())},"t0"),n=[e],t[0]=e,t[1]=r,t[2]=n):(r=t[1],n=t[2]),(0,Ue.useEffect)(r,n),o},"useStudioFeatures"),Li=a(()=>{let t=(0,Ce.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,y.jsxDEV)("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,y.jsxDEV)("path",{d:"m9 6 6 6-6 6",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1)},void 0,!1),t[0]=e):e=t[0],e},"ChevronRight$1"),Fi=a(t=>{let e=(0,Ce.c)(24),{group:o}=t,s=ae(),r=ft(),n;e[0]!==o.tab||e[1]!==r?(n=a(()=>{$e(r({to:`/${o.tab}`}))},"t1"),e[0]=o.tab,e[1]=r,e[2]=n):n=e[2];let l=n,d=o.bindings.length,p;e[3]!==o.label?(p=(0,y.jsxDEV)("span",{className:"text-sm font-medium text-foreground",children:o.label},void 0,!1),e[3]=o.label,e[4]=p):p=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=(0,y.jsxDEV)(Li,{},void 0,!1),e[5]=c):c=e[5];let u;e[6]!==p?(u=(0,y.jsxDEV)("div",{className:"flex items-center justify-between",children:[p,c]},void 0,!0),e[6]=p,e[7]=u):u=e[7];let g;e[8]!==d||e[9]!==s?(g=d===1?s("1 binding"):s("{count} bindings",{count:d}),e[8]=d,e[9]=s,e[10]=g):g=e[10];let m;e[11]!==g?(m=(0,y.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:g},void 0,!1),e[11]=g,e[12]=m):m=e[12];let h;e[13]!==d||e[14]!==o.bindings?(h=d>0&&(0,y.jsxDEV)("div",{className:"flex flex-wrap gap-1.5",children:o.bindings.map(ji)},void 0,!1),e[13]=d,e[14]=o.bindings,e[15]=h):h=e[15];let f;e[16]!==u||e[17]!==m||e[18]!==h?(f=(0,y.jsxDEV)(Ys,{className:"flex flex-col gap-2 py-4",children:[u,m,h]},void 0,!0),e[16]=u,e[17]=m,e[18]=h,e[19]=f):f=e[19];let v;return e[20]!==o.testId||e[21]!==l||e[22]!==f?(v=(0,y.jsxDEV)(ct,{className:"cursor-pointer gap-0 py-0 transition-colors hover:bg-muted/40","data-testid":o.testId,onClick:l,children:f},void 0,!1),e[20]=o.testId,e[21]=l,e[22]=f,e[23]=v):v=e[23],v},"BindingCard"),Ba=["kv","files","vectors"],Hi=a((t,e)=>[...t.filter(o=>o.tab!==e.tab),e].toSorted((o,s)=>Ba.indexOf(o.tab)-Ba.indexOf(s.tab)),"upsertCard"),$i=a(()=>{let t=(0,Ce.c)(19),e=qs(),o=Dr(),s=ae(),r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=[],t[0]=r):r=t[0];let[n,l]=(0,Ue.useState)(r),d,p;if(t[1]!==e||t[2]!==o.kv||t[3]!==o.storage||t[4]!==o.vectors||t[5]!==s?(d=a(()=>{let f={cancelled:!1},v=[{enabled:o.kv,label:s("KV Namespaces"),load:a(async()=>(await e.listKvNamespaces()).map(Ui),"load"),tab:"kv",testId:"home-binding-kv"},{enabled:o.storage,label:s("R2 Buckets"),load:a(()=>e.listStorageBuckets(),"load"),tab:"files",testId:"home-binding-r2"},{enabled:o.vectors,label:s("Vectorize Indexes"),load:a(async()=>(await e.listVectorIndexes()).map(zi),"load"),tab:"vectors",testId:"home-binding-vectors"}];for(let x of v)x.enabled&&$e((async()=>{try{let b=await x.load();if(!f.cancelled){let C={bindings:b,label:x.label,tab:x.tab,testId:x.testId};l(P=>Hi(P,C))}}catch{}})());return()=>{f.cancelled=!0}},"t1"),p=[e,o.kv,o.storage,o.vectors,s],t[1]=e,t[2]=o.kv,t[3]=o.storage,t[4]=o.vectors,t[5]=s,t[6]=d,t[7]=p):(d=t[6],p=t[7]),(0,Ue.useEffect)(d,p),n.length===0)return null;let c;t[8]!==s?(c=s("Bindings"),t[8]=s,t[9]=c):c=t[9];let u;t[10]!==c?(u=(0,y.jsxDEV)("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:c},void 0,!1),t[10]=c,t[11]=u):u=t[11];let g;t[12]!==n?(g=n.map(Wi),t[12]=n,t[13]=g):g=t[13];let m;t[14]!==g?(m=(0,y.jsxDEV)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:g},void 0,!1),t[14]=g,t[15]=m):m=t[15];let h;return t[16]!==u||t[17]!==m?(h=(0,y.jsxDEV)("section",{className:"flex flex-col gap-3","data-testid":"home-bindings",children:[u,m]},void 0,!0),t[16]=u,t[17]=m,t[18]=h):h=t[18],h},"BindingsOverview");function ji(t){return(0,y.jsxDEV)(ho,{variant:"secondary",children:t},t,!1)}a(ji,"_temp$1");function Ui(t){return t.binding}a(Ui,"_temp2$1");function zi(t){return t.name}a(zi,"_temp3$1");function Wi(t){return(0,y.jsxDEV)(Fi,{group:t},t.tab,!1)}a(Wi,"_temp4");var Zi=[{name:"lunora_list_functions",summary:"list every query, mutation, and action with its path"},{name:"lunora_list_tables",summary:"list the schema's tables"},{name:"lunora_get_function_schema",summary:"read a function's argument JSON Schema before calling it"},{name:"lunora_run_query",summary:"run a read-only query"},{name:"lunora_run_mutation",summary:"run a mutation \u2014 writes; only when LUNORA_MCP_ALLOW_WRITES is set"},{name:"lunora_run_action",summary:"run an action \u2014 writes/effects; only when LUNORA_MCP_ALLOW_WRITES is set"}],qi=a(t=>JSON.stringify({mcpServers:{lunora:{args:["-y","@lunora/mcp"],command:"npx",env:{LUNORA_ADMIN_TOKEN:"<your-admin-token>",LUNORA_URL:t}}}},null,2),"buildMcpConfig"),Gi=a(t=>{let e=Zi.map(o=>`- ${o.name} \u2014 ${o.summary}`).join(`
1
+ import{a as Hn}from"./chunk-ZPUO7FNI.js";import{a as oo,b as so,c as ro,d as Tn,e as ls}from"./chunk-IXDH4GL5.js";import{$ as Sn,A as Gt,C as xn,D as j,E as bn,F as yn,I as Kt,L as gt,M as qo,N as Qt,P as Go,Q as Cn,R as Pn,S as Ko,T as Yt,U as Jt,V as Xt,W as eo,X as Qo,Y as to,_ as Rn,aa as Yo,b as sn,ba as Jo,ea as Xo,fa as st,ga as Nn,ha as no,i as cn,ia as En,j as dn,ja as ue,k as pn,ka as es,l as Ks,m as jo,ma as ts,na as os,o as Uo,oa as ss,p as un,pa as rs,q as zo,qa as ns,ra as as,s as fn,sa as wn,ta as kn,u as mn,ua as is,v as gn,va as On,w as hn,x as Wo,y as Zo,z as vn}from"./chunk-KSKXW5PX.js";import{f as Jr}from"./chunk-ZIGWVHCS.js";import{a as Fn}from"./chunk-7TJJXVSE.js";import{a as $r,b as jr,d as Ur,e as ft,f as Ho,g as zr,h as Wr,i as Zr,j as qr,k as Gr}from"./chunk-WI7GWFEG.js";import{a as cs}from"./chunk-KZ6INM5M.js";import{c as Mn,h as _n,k as Qs}from"./chunk-4QHKBC77.js";import{B as rn,C as nn,I as He,J as an,K as qt,O as A,P as Y,R as ln,e as ye,p as vo,q as on}from"./chunk-3CJW6NWG.js";import{b as ht,c as ao}from"./chunk-UK64ZSUW.js";import{a as mt,c as en,h as $o,i as tn}from"./chunk-O3NAGRTR.js";import{a as Hr}from"./chunk-HV7G6DFP.js";import{a as St}from"./chunk-BOXSWNXZ.js";import{a as In}from"./chunk-TAD43CG5.js";import{b as io}from"./chunk-EOSXQTSQ.js";import{a as ct,e as Ys}from"./chunk-SEU5V7I6.js";import{a as Gs,b as ho}from"./chunk-ZPP2KOR4.js";import{a as lt,i as Rt,j as F}from"./chunk-CKSHCYGC.js";import{f as qs}from"./chunk-M5OMEMQ3.js";import{a as Xr}from"./chunk-ZHVTQ37P.js";import{a as be}from"./chunk-3OA7PECS.js";import{a as Kr,b as Qr,c as Yr,d as ae,e as Dn,f as An,k as $e,l as Vn,m as Bn,n as Ln}from"./chunk-2GMEK2W3.js";import{b as Zs}from"./chunk-J75M4LTW.js";import{a,d as Ws,e as S,f as M,g as Fo,h as go,j as z}from"./chunk-RRCPZMC2.js";var B=S(Fo(),1);var ut=S(M(),1),q=S(M(),1);var i=S(go(),1);var $n=S(M(),1),vt=S(go(),1);var vi={border:"1px solid var(--destructive)",color:"var(--destructive)",padding:12},xi={overflow:"auto",whiteSpace:"pre-wrap"},ds=class extends $n.Component{static{a(this,"ErrorBoundary")}static getDerivedStateFromError(e){return{error:e}}state={error:null};componentDidCatch(e,o){console.error("[lunora-studio] panel error",e,o.componentStack)}reset=a(()=>{this.setState({error:null})},"reset");render(){let{children:e,fallbackTitle:o,label:s,retryLabel:r}=this.props,{error:n}=this.state;if(n===null)return(0,vt.jsxDEV)(vt.Fragment,{children:e},void 0,!1);let l=o??(s===void 0?"Something went wrong":`${s} failed`);return(0,vt.jsxDEV)("div",{"data-testid":"dash-error-boundary",role:"alert",style:vi,children:[(0,vt.jsxDEV)("strong",{children:l},void 0,!1),(0,vt.jsxDEV)("pre",{"data-testid":"dash-error-message",style:xi,children:n.message},void 0,!1),(0,vt.jsxDEV)("button",{"data-testid":"dash-error-retry",onClick:this.reset,type:"button",children:r??"Try again"},void 0,!1)]},void 0,!0)}};var Ct={};Ws(Ct,{Arrow:()=>nr,Backdrop:()=>ar,Close:()=>cr,Description:()=>lr,Handle:()=>bo,Popup:()=>rr,Portal:()=>er,Positioner:()=>tr,Root:()=>zn,Title:()=>ir,Trigger:()=>Js,Viewport:()=>dr,createHandle:()=>ra});var dt=S(M(),1);var ps=S(M(),1);var us=ps.createContext(void 0);us.displayName="PopoverRootContext";function oe(t){let e=ps.useContext(us);if(e===void 0&&!t)throw new Error("Base UI: PopoverRootContext is missing. Popover parts must be placed within <Popover.Root>.");return e}a(oe,"usePopoverRootContext");var xt=S(M(),1),jn=S(Hr(),1);function bi(){return{...oo(),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}a(bi,"createInitialState");var yi={...ro,disabled:j(t=>t.disabled),instantType:j(t=>t.instantType),openMethod:j(t=>t.openMethod),openChangeReason:j(t=>t.openChangeReason),modal:j(t=>t.modal),focusManagerModal:j(t=>t.focusManagerModal),stickIfOpen:j(t=>t.stickIfOpen),titleElementId:j(t=>t.titleElementId),descriptionElementId:j(t=>t.descriptionElementId),openOnHover:j(t=>t.openOnHover),closeDelay:j(t=>t.closeDelay),hasViewport:j(t=>t.hasViewport)},lo=class t extends Kt{static{a(this,"PopoverStore")}constructor(e,o,s=!1){let r={...bi(),...e},n=new to;r.open&&e?.mounted===void 0&&(r.mounted=!0),r.floatingRootContext=so(n,o,s),super(r,{popupRef:xt.createRef(),backdropRef:xt.createRef(),internalBackdropRef:xt.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:xt.createRef(),beforeContentFocusGuardRef:xt.createRef(),stickIfOpenTimeout:new rn,triggerElements:n},yi)}setOpen=a((e,o)=>{let s=o.reason===A.triggerHover,r=o.reason===A.triggerPress&&o.event.detail===0,n=!e&&(o.reason===A.escapeKey||o.reason==null),l=Cn(o),d=this.select("activeTriggerId");if(!e&&o.reason===A.closePress&&o.trigger==null&&d!=null&&(o.trigger=this.context.triggerElements.getById(d)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(e,o),o.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,o);let p=a(()=>{let c={open:e,openChangeReason:o.reason};Go(c,e,o.trigger,l()),this.update(c)},"changeState");s?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set("stickIfOpen",!1)}),jn.flushSync(p)):p(),r||n?this.set("instantType",r?"click":"dismiss"):o.reason===A.focusOut?this.set("instantType","focus"):this.set("instantType",void 0)},"setOpen");static useStore(e,o){let{store:s,internalStore:r}=Qt(e,(n,l)=>new t(o,n,l));return xt.useEffect(()=>r?.disposeEffect(),[r]),s}disposeEffect=a(()=>this.context.stickIfOpenTimeout.disposeEffect(),"disposeEffect")};var Nt=S(be(),1);function Un({props:t}){let{children:e,open:o,defaultOpen:s=!1,onOpenChange:r,onOpenChangeComplete:n,modal:l=!1,handle:d,triggerId:p,defaultTriggerId:c=null}=t,u=lo.useStore(d?.store,{modal:l,open:s,openProp:o,activeTriggerId:c,triggerIdProp:p});Ko(u,o,s,c),u.useControlledProp("openProp",o),u.useControlledProp("triggerIdProp",p);let g=u.useState("open"),m=u.useState("mounted"),h=u.useState("payload"),f=fn()!=null;u.useContextCallback("onOpenChange",r),u.useContextCallback("onOpenChangeComplete",n),Qo(u,g),Jt(u);let{forceUnmount:v}=Xt(g,u,()=>{u.update({stickIfOpen:!0,openChangeReason:null})});u.useSyncedValues({modal:l,nested:f}),dt.useEffect(()=>{g||u.context.stickIfOpenTimeout.clear()},[u,g]);let x=dt.useCallback(()=>{u.setOpen(!1,Y(A.imperativeAction))},[u]);dt.useImperativeHandle(t.actionsRef,()=>({unmount:v,close:x}),[v,x]);let b=g||m,C=dt.useMemo(()=>({store:u}),[u]);return(0,Nt.jsxs)(us.Provider,{value:C,children:[b&&(0,Nt.jsx)(Ci,{store:u,modal:l}),typeof e=="function"?e({payload:h}):e]})}a(Un,"PopoverRootComponent");function zn(t){return oe(!0)?(0,Nt.jsx)(Un,{props:t}):(0,Nt.jsx)(hn,{children:(0,Nt.jsx)(Un,{props:t})})}a(zn,"PopoverRoot");function Ci({store:t,modal:e}){let o=t.useState("floatingRootContext"),s=Gt(o,{outsidePressEvent:{mouse:e==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),r=s.reference??Rt,n=s.trigger??Rt,l=dt.useMemo(()=>lt(gt,s.floating),[s.floating]);return eo(t,{activeTriggerProps:r,inactiveTriggerProps:n,popupProps:l}),null}a(Ci,"PopoverInteractions");var bt=S(M(),1);var Et=S(be(),1);var Js=bt.forwardRef(a(function(e,o){let{render:s,className:r,style:n,disabled:l=!1,nativeButton:d=!0,handle:p,payload:c,openOnHover:u=!1,delay:g=300,closeDelay:m=0,id:h,...f}=e,v=oe(!0),x=p?.store??v?.store;if(!x)throw new Error("Base UI: <Popover.Trigger> must be either used within a <Popover.Root> component or provided with a handle.");let b=ye(h),C=x.useState("isTriggerActive",b),P=x.useState("floatingRootContext"),N=x.useState("isOpenedByTrigger",b),R=x.useState("triggerPopupId",b),E=bt.useRef(null),{registerTrigger:T,isMountedByThisTrigger:k}=Yt(b,E,x,{payload:c,disabled:l,openOnHover:u,closeDelay:m}),w=x.useState("openChangeReason"),O=x.useState("stickIfOpen"),V=x.useState("openMethod"),W=x.useState("focusManagerModal"),D=Jo(P,{enabled:!l&&P!=null&&u&&(V!=="touch"||w!==A.triggerPress),mouseOnly:!0,move:!1,handleClose:Xo(),restMs:g,delay:{close:m},triggerElementRef:E,isActiveTrigger:C,isClosing:a(()=>x.select("transitionStatus")==="ending","isClosing")}),H=Zo(P,{enabled:P!=null,stickIfOpen:O}),$=es(()=>x.select("open"),ee=>{x.set("openMethod",ee)}),Z=x.useState("triggerProps",k),{getButtonProps:K,buttonRef:I}=ht({disabled:l,native:d}),_={open(ee){return ee&&w===A.triggerPress?En.open(ee):no.open(ee)}},{preFocusGuardRef:U,handlePreFocusGuardFocus:te,handleFocusTargetFocus:re}=Tn(x,E),J=F("button",e,{state:{disabled:l,open:N},ref:[I,o,T,E],props:[H.reference,D,Z,$,{[jo]:"",id:b,"aria-haspopup":"dialog","aria-expanded":N,"aria-controls":R},f,K],stateAttributesMapping:_});return k&&!W?(0,Et.jsxs)(bt.Fragment,{children:[(0,Et.jsx)(Ks,{ref:U,onFocus:te}),(0,Et.jsx)(bt.Fragment,{children:J},b),(0,Et.jsx)(Ks,{ref:x.context.triggerFocusTargetRef,onFocus:re})]}):(0,Et.jsx)(bt.Fragment,{children:J},b)},"PopoverTrigger"));Js.displayName="PopoverTrigger";var Zn=S(M(),1);var fs=S(M(),1);var ms=fs.createContext(void 0);ms.displayName="PopoverPortalContext";function Wn(){let t=fs.useContext(ms);if(t===void 0)throw new Error("Base UI: <Popover.Portal> is missing.");return t}a(Wn,"usePopoverPortalContext");var Xs=S(be(),1);var er=Zn.forwardRef(a(function(e,o){let{keepMounted:s=!1,...r}=e,{store:n}=oe();return n.useState("mounted")||s?(0,Xs.jsx)(ms.Provider,{value:s,children:(0,Xs.jsx)(zo,{ref:o,...r})}):null},"PopoverPortal"));er.displayName="PopoverPortal";var po=S(M(),1);var gs=S(M(),1);var hs=gs.createContext(void 0);hs.displayName="PopoverPositionerContext";function co(){let t=gs.useContext(hs);if(!t)throw new Error("Base UI: PopoverPositionerContext is missing. PopoverPositioner parts must be placed within <Popover.Positioner>.");return t}a(co,"usePopoverPositionerContext");var xo=S(be(),1);var tr=po.forwardRef(a(function(e,o){let{render:s,className:r,style:n,anchor:l,positionMethod:d="absolute",side:p="bottom",align:c="center",sideOffset:u=0,alignOffset:g=0,collisionBoundary:m="clipping-ancestors",collisionPadding:h=5,arrowPadding:f=5,sticky:v=!1,disableAnchorTracking:x=!1,collisionAvoidance:b=Uo,...C}=e,{store:P}=oe(),N=Wn(),R=mn(),E=P.useState("floatingRootContext"),T=P.useState("mounted"),k=P.useState("open"),w=P.useState("openChangeReason"),O=P.useState("activeTriggerElement"),V=P.useState("modal"),W=P.useState("openMethod"),D=P.useState("positionerElement"),H=P.useState("instantType"),$=P.useState("transitionStatus"),Z=P.useState("hasViewport"),K=po.useRef(null),I=an(D,!1,!1),_=ss({anchor:l,floatingRootContext:E,positionMethod:d,mounted:T,side:p,sideOffset:u,align:c,alignOffset:g,arrowPadding:f,collisionBoundary:m,collisionPadding:h,sticky:v,disableAnchorTracking:x,keepMounted:N,nodeId:R,collisionAvoidance:b,adaptiveOrigin:Z?os:void 0}),U=E.useState("domReferenceElement");mt(()=>{let J=U,ee=K.current;if(J&&(K.current=J),ee&&J&&J!==ee){P.set("instantType",void 0);let ie=new AbortController;return I(()=>{P.set("instantType","trigger-change")},ie.signal),()=>{ie.abort()}}},[U,I,P]),kn(k&&V===!0&&w!==A.triggerHover,W==="touch",D,O);let te=po.useCallback(J=>{P.set("positionerElement",J)},[P]),re={open:k,side:_.side,align:_.align,anchorHidden:_.anchorHidden,instant:H},ne=as(e,re,{styles:_.positionerStyles,transitionStatus:$,props:C,refs:[o,te],hidden:!T,inert:!k});return(0,xo.jsxs)(hs.Provider,{value:_,children:[T&&V===!0&&w!==A.triggerHover&&(0,xo.jsx)(rs,{ref:P.context.internalBackdropRef,inert:ts(!k),cutout:O}),(0,xo.jsx)(gn,{id:R,children:ne})]})},"PopoverPositioner"));tr.displayName="PopoverPositioner";var vs=S(M(),1);var yt=S(M(),1);var qn=S(be(),1);var or=yt.createContext(void 0);or.displayName="ClosePartContext";function Gn(){let[t,e]=yt.useState(0),o=en(()=>(e(r=>r+1),()=>{e(r=>Math.max(0,r-1))}));return{context:yt.useMemo(()=>({register:o}),[o]),hasClosePart:t>0}}a(Gn,"useClosePartCount");function Kn(t){let{value:e,children:o}=t;return(0,qn.jsx)(or.Provider,{value:e,children:o})}a(Kn,"ClosePartProvider");function Qn(){let t=yt.useContext(or);mt(()=>t?.register(),[t])}a(Qn,"useClosePartRegistration");var sr=S(be(),1);var Pi={...ue,...He},rr=vs.forwardRef(a(function(e,o){let{render:s,className:r,style:n,initialFocus:l,finalFocus:d,...p}=e,{store:c}=oe(),u=co(),g=On(!0)!=null,{context:m,hasClosePart:h}=Gn(),f=c.useState("open"),v=c.useState("openMethod"),x=c.useState("instantType"),b=c.useState("transitionStatus"),C=c.useState("popupProps"),P=c.useState("titleElementId"),N=c.useState("descriptionElementId"),R=c.useState("modal"),E=c.useState("mounted"),T=c.useState("openChangeReason"),k=c.useState("activeTriggerElement"),w=c.useState("floatingRootContext"),O=w.useState("floatingId"),V=c.useState("disabled"),W=c.useState("openOnHover"),D=c.useState("closeDelay"),H=p.id??O;qt({open:f,ref:c.context.popupRef,onComplete(){f&&c.context.onOpenChangeComplete?.(!0)}}),Yo(w,{enabled:W&&!V,closeDelay:D});let $=l===void 0?qo(c.context.popupRef):l,Z=R!==!1&&h;c.useSyncedValue("focusManagerModal",Z);let K=vs.useCallback(U=>{c.set("popupElement",U)},[c]),I={open:f,side:u.side,align:u.align,instant:x,transitionStatus:b},_=F("div",e,{state:I,ref:[o,c.context.popupRef,K],props:[C,{id:H,role:"dialog",...gt,"aria-labelledby":P,"aria-describedby":N,onKeyDown(U){g&&is.has(U.key)&&U.stopPropagation()}},ns(b),p],stateAttributesMapping:Pi});return(0,sr.jsx)(Wo,{context:w,openInteractionType:v,modal:Z,disabled:!E||T===A.triggerHover,initialFocus:$,returnFocus:d,restoreFocus:"popup",previousFocusableElement:tn(k)?k:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:(0,sr.jsx)(Kn,{value:m,children:_})})},"PopoverPopup"));rr.displayName="PopoverPopup";var Yn=S(M(),1);var nr=Yn.forwardRef(a(function(e,o){let{render:s,className:r,style:n,...l}=e,{store:d}=oe(),p=d.useState("open"),{arrowRef:c,side:u,align:g,arrowUncentered:m,arrowStyles:h}=co();return F("div",e,{state:{open:p,side:u,align:g,uncentered:m},ref:[o,c],props:[{style:h,"aria-hidden":!0},l],stateAttributesMapping:ue})},"PopoverArrow"));nr.displayName="PopoverArrow";var Jn=S(M(),1);var Ri={...ue,...He},ar=Jn.forwardRef(a(function(e,o){let{render:s,className:r,style:n,...l}=e,{store:d}=oe(),p=d.useState("open"),c=d.useState("mounted"),u=d.useState("transitionStatus"),g=d.useState("openChangeReason");return F("div",e,{state:{open:p,transitionStatus:u},ref:[d.context.backdropRef,o],props:[{role:"presentation",hidden:!c,style:{pointerEvents:g===A.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},l],stateAttributesMapping:Ri})},"PopoverBackdrop"));ar.displayName="PopoverBackdrop";var Xn=S(M(),1);var ir=Xn.forwardRef(a(function(e,o){let{render:s,className:r,style:n,...l}=e,{store:d}=oe(),p=ye(l.id);return d.useSyncedValueWithCleanup("titleElementId",p),F("h2",e,{ref:o,props:[{id:p},l]})},"PopoverTitle"));ir.displayName="PopoverTitle";var ea=S(M(),1);var lr=ea.forwardRef(a(function(e,o){let{render:s,className:r,style:n,...l}=e,{store:d}=oe(),p=ye(l.id);return d.useSyncedValueWithCleanup("descriptionElementId",p),F("p",e,{ref:o,props:[{id:p},l]})},"PopoverDescription"));lr.displayName="PopoverDescription";var ta=S(M(),1);var cr=ta.forwardRef(a(function(e,o){let{render:s,className:r,style:n,disabled:l=!1,nativeButton:d=!0,...p}=e,{buttonRef:c,getButtonProps:u}=ht({disabled:l,focusableWhenDisabled:!1,native:d}),{store:g}=oe();return Qn(),F("button",e,{ref:[o,c],props:[{onClick(h){g.setOpen(!1,Y(A.closePress,h.nativeEvent))}},p,u]})},"PopoverClose"));cr.displayName="PopoverClose";var sa=S(M(),1);var oa=(function(t){return t.popupWidth="--popup-width",t.popupHeight="--popup-height",t})({});var Si={activationDirection:a(t=>t?{"data-activation-direction":t}:null,"activationDirection")},dr=sa.forwardRef(a(function(e,o){let{render:s,className:r,style:n,children:l,...d}=e,{store:p}=oe(),{side:c}=co(),u=p.useState("instantType"),{children:g,state:m}=ls({store:p,side:c,cssVars:oa,children:l}),h={activationDirection:m.activationDirection,transitioning:m.transitioning,instant:u};return F("div",e,{state:h,ref:o,props:[d,{children:g}],stateAttributesMapping:Si})},"PopoverViewport"));dr.displayName="PopoverViewport";var bo=class{static{a(this,"PopoverHandle")}constructor(){this.store=new lo}open(e){let o=e?this.store.context.triggerElements.getById(e)??void 0:void 0;if(e&&!o)throw new Error(`Base UI: PopoverHandle.open: No trigger found with id "${e}".`);this.store.setOpen(!0,Y(A.imperativeAction,void 0,o))}close(){this.store.setOpen(!1,Y(A.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function ra(){return new bo}a(ra,"createPopoverHandle");var fe={};Ws(fe,{Backdrop:()=>pr,Close:()=>ur,Description:()=>fr,Handle:()=>So,Popup:()=>mr,Portal:()=>gr,Root:()=>xa,Title:()=>xr,Trigger:()=>br,Viewport:()=>vr,createHandle:()=>Ca});var na=S(M(),1);var yo=S(M(),1);var Co=yo.createContext(!1);Co.displayName="IsDrawerContext";var xs=yo.createContext(void 0);xs.displayName="DialogRootContext";function le(t){let e=yo.useContext(xs);if(t===!1&&e===void 0)throw new Error("Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.");return e}a(le,"useDialogRootContext");var Ni={...ue,...He},pr=na.forwardRef(a(function(e,o){let{render:s,className:r,style:n,forceRender:l=!1,...d}=e,{store:p}=le(),c=p.useState("open"),u=p.useState("nested"),g=p.useState("mounted"),m=p.useState("transitionStatus");return F("div",e,{state:{open:c,transitionStatus:m},ref:[p.context.backdropRef,o],stateAttributesMapping:Ni,props:[{role:"presentation",hidden:!g,style:{userSelect:"none",WebkitUserSelect:"none"}},d],enabled:l||!u})},"DialogBackdrop"));pr.displayName="DialogBackdrop";var aa=S(M(),1);var ur=aa.forwardRef(a(function(e,o){let{render:s,className:r,style:n,disabled:l=!1,nativeButton:d=!0,...p}=e,{store:c}=le(),u=c.useState("open"),{getButtonProps:g,buttonRef:m}=ht({disabled:l,native:d}),h={disabled:l};function f(v){u&&c.setOpen(!1,Y(A.closePress,v.nativeEvent))}return a(f,"handleClick"),F("button",e,{state:h,ref:[o,m],props:[{onClick:f},p,g]})},"DialogClose"));ur.displayName="DialogClose";var ia=S(M(),1);var fr=ia.forwardRef(a(function(e,o){let{render:s,className:r,style:n,id:l,...d}=e,{store:p}=le(),c=ye(l);return p.useSyncedValueWithCleanup("descriptionElementId",c),F("p",e,{ref:o,props:[{id:c},d]})},"DialogDescription"));fr.displayName="DialogDescription";var da=S(M(),1);var la=(function(t){return t.nestedDialogs="--nested-dialogs",t})({});var ca=(function(t){return t[t.open=st.open]="open",t[t.closed=st.closed]="closed",t[t.startingStyle=st.startingStyle]="startingStyle",t[t.endingStyle=st.endingStyle]="endingStyle",t.nested="data-nested",t.nestedDialogOpen="data-nested-dialog-open",t})({});var bs=S(M(),1);var ys=bs.createContext(void 0);ys.displayName="DialogPortalContext";function Cs(){let t=bs.useContext(ys);if(t===void 0)throw new Error("Base UI: <Dialog.Portal> is missing.");return t}a(Cs,"useDialogPortalContext");var pa=S(be(),1);var Ei={...ue,...He,nestedDialogOpen(t){return t?{[ca.nestedDialogOpen]:""}:null}},mr=da.forwardRef(a(function(e,o){let{render:s,className:r,style:n,finalFocus:l,initialFocus:d,...p}=e,{store:c}=le(),u=c.useState("descriptionElementId"),g=c.useState("disablePointerDismissal"),m=c.useState("floatingRootContext"),h=c.useState("popupProps"),f=c.useState("modal"),v=c.useState("mounted"),x=c.useState("nested"),b=c.useState("nestedOpenDialogCount"),C=c.useState("open"),P=c.useState("openMethod"),N=c.useState("titleElementId"),R=c.useState("transitionStatus"),E=c.useState("role"),T=m.useState("floatingId"),k=p.id??T;Cs(),qt({open:C,ref:c.context.popupRef,onComplete(){C&&c.context.onOpenChangeComplete?.(!0)}});let w=d===void 0?qo(c.context.popupRef):d,O=b>0,V=c.useStateSetter("popupElement"),D=F("div",e,{state:{open:C,nested:x,transitionStatus:R,nestedDialogOpen:O},props:[h,{id:k,"aria-labelledby":N??void 0,"aria-describedby":u??void 0,role:E,...gt,hidden:!v,onKeyDown(H){is.has(H.key)&&H.stopPropagation()},style:{[la.nestedDialogs]:b}},p],ref:[o,c.context.popupRef,V],stateAttributesMapping:Ei});return(0,pa.jsx)(Wo,{context:m,openInteractionType:P,disabled:!v,closeOnFocusOut:!g,initialFocus:w,returnFocus:l,modal:f!==!1,restoreFocus:"popup",children:D})},"DialogPopup"));mr.displayName="DialogPopup";var ua=S(M(),1);var Po=S(be(),1);var gr=ua.forwardRef(a(function(e,o){let{keepMounted:s=!1,...r}=e,{store:n}=le(),l=n.useState("mounted"),d=n.useState("modal"),p=n.useState("open");return l||s?(0,Po.jsx)(ys.Provider,{value:s,children:(0,Po.jsxs)(zo,{ref:o,...r,children:[l&&d===!0&&(0,Po.jsx)(rs,{ref:n.context.internalBackdropRef,inert:ts(!p)}),e.children]})}):null},"DialogPortal"));gr.displayName="DialogPortal";var va=S(M(),1);var ga=S(M(),1);var pt=S(M(),1);function fa(t){let{store:e,actionsRef:o}=t,s=e.useState("open");Qo(e,s),Jt(e);let{forceUnmount:r}=Xt(s,e),n=pt.useCallback(()=>{e.setOpen(!1,Y(A.imperativeAction))},[e]);pt.useImperativeHandle(o,()=>({unmount:r,close:n}),[r,n])}a(fa,"useDialogRoot");function ma({store:t,parentContext:e,isDrawer:o}){let s=t.useState("open"),r=t.useState("disablePointerDismissal"),n=t.useState("modal"),l=t.useState("popupElement"),d=t.useState("floatingRootContext"),[p,c]=pt.useState(0),[u,g]=pt.useState(0),m=p===0,h=Gt(d,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:n==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(b){if(!t.context.outsidePressEnabledRef.current||"button"in b&&b.button!==0||"touches"in b&&b.touches.length!==1)return!1;let C=on(b);return m&&!r?n&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===C||t.context.backdropRef.current===C||vo(C,l)&&!C?.hasAttribute("data-base-ui-portal"):!0:!1},escapeKey:m});wn(s&&n===!0,l),t.useContextCallback("onNestedDialogOpen",(b,C)=>{c(b),g(C)}),t.useContextCallback("onNestedDialogClose",()=>{c(0),g(0)}),pt.useEffect(()=>(e?.onNestedDialogOpen&&s&&e.onNestedDialogOpen(p+1,u+(o?1:0)),e?.onNestedDialogClose&&!s&&e.onNestedDialogClose(),()=>{e?.onNestedDialogClose&&s&&e.onNestedDialogClose()}),[o,s,p,u,e]);let f=h.reference??Rt,v=h.trigger??Rt,x=h.floating??Rt;return eo(t,{activeTriggerProps:f,inactiveTriggerProps:v,popupProps:x,nestedOpenDialogCount:p,nestedOpenDrawerCount:u}),null}a(ma,"DialogInteractions");var Ps=S(M(),1);var Ti={...ro,modal:j(t=>t.modal),nested:j(t=>t.nested),nestedOpenDialogCount:j(t=>t.nestedOpenDialogCount),nestedOpenDrawerCount:j(t=>t.nestedOpenDrawerCount),disablePointerDismissal:j(t=>t.disablePointerDismissal),openMethod:j(t=>t.openMethod),descriptionElementId:j(t=>t.descriptionElementId),titleElementId:j(t=>t.titleElementId),viewportElement:j(t=>t.viewportElement),role:j(t=>t.role)},uo=class t extends Kt{static{a(this,"DialogStore")}constructor(e,o,s=!1){let r=new to,n=wi(e);n.floatingRootContext=so(r,o,s),super(n,{popupRef:Ps.createRef(),backdropRef:Ps.createRef(),internalBackdropRef:Ps.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:r,onOpenChange:void 0,onOpenChangeComplete:void 0},Ti)}setOpen=a((e,o)=>{if(o.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!e&&o.trigger==null&&this.state.activeTriggerId!=null&&(o.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,o),o.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,o);let s={open:e};Go(s,e,o.trigger),this.update(s)},"setOpen");static useStore(e,o){return Qt(e,(r,n)=>new t(o,r,n),!0).store}};function wi(t={}){return{...oo(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...t}}a(wi,"createInitialState");var Ro=S(be(),1);function ha(t,e="dialog"){let{children:o,open:s,defaultOpen:r=!1,onOpenChange:n,onOpenChangeComplete:l,disablePointerDismissal:d=!1,modal:p=!0,actionsRef:c,handle:u,triggerId:g,defaultTriggerId:m=null}=t,h=e==="drawer",f=e==="alert-dialog",v=f?!0:p,x=f||d,b=f?"alertdialog":"dialog",C=le(!0),N={modal:v,disablePointerDismissal:x,nested:!!C,role:b},R=uo.useStore(u?.store,{open:r,openProp:s,activeTriggerId:m,triggerIdProp:g,...N});xn(()=>{let V=s===void 0&&R.state.open===!1&&r===!0?{open:!0,activeTriggerId:m}:null;f?R.update(V?{...N,...V}:N):V&&R.update(V)}),R.useControlledProp("openProp",s),R.useControlledProp("triggerIdProp",g),R.useSyncedValues(N),R.useContextCallback("onOpenChange",n),R.useContextCallback("onOpenChangeComplete",l);let E=R.useState("open"),T=R.useState("mounted"),k=R.useState("payload");fa({store:R,actionsRef:c});let w=E||T,O=ga.useMemo(()=>({store:R}),[R]);return(0,Ro.jsx)(Co.Provider,{value:!1,children:(0,Ro.jsxs)(xs.Provider,{value:O,children:[w&&(0,Ro.jsx)(ma,{store:R,parentContext:C?.store.context,isDrawer:h}),typeof o=="function"?o({payload:k}):o]})})}a(ha,"useRenderDialogRoot");function xa(t){let e=va.useContext(Co)?"drawer":"dialog";return ha(t,e)}a(xa,"DialogRoot");var ba=S(M(),1);var hr=(function(t){return t[t.open=st.open]="open",t[t.closed=st.closed]="closed",t[t.startingStyle=st.startingStyle]="startingStyle",t[t.endingStyle=st.endingStyle]="endingStyle",t.nested="data-nested",t.nestedDialogOpen="data-nested-dialog-open",t})({});var ki={...ue,...He,nested(t){return t?{[hr.nested]:""}:null},nestedDialogOpen(t){return t?{[hr.nestedDialogOpen]:""}:null}},vr=ba.forwardRef(a(function(e,o){let{render:s,className:r,style:n,children:l,...d}=e,p=Cs(),{store:c}=le(),u=c.useState("open"),g=c.useState("nested"),m=c.useState("transitionStatus"),h=c.useState("nestedOpenDialogCount"),f=c.useState("mounted"),v=c.useStateSetter("viewportElement"),x=h>0;return F("div",e,{enabled:p||f,state:{open:u,nested:g,transitionStatus:m,nestedDialogOpen:x},ref:[o,v],stateAttributesMapping:ki,props:[{role:"presentation",hidden:!f,style:{pointerEvents:u?void 0:"none"},children:l},d]})},"DialogViewport"));vr.displayName="DialogViewport";var ya=S(M(),1);var xr=ya.forwardRef(a(function(e,o){let{render:s,className:r,style:n,id:l,...d}=e,{store:p}=le(),c=ye(l);return p.useSyncedValueWithCleanup("titleElementId",c),F("h2",e,{ref:o,props:[{id:c},d]})},"DialogTitle"));xr.displayName="DialogTitle";var Rs=S(M(),1);var br=Rs.forwardRef(a(function(e,o){let{render:s,className:r,style:n,disabled:l=!1,nativeButton:d=!0,id:p,payload:c,handle:u,...g}=e,m=le(!0),h=u?.store??m?.store;if(!h)throw new Error("Base UI: <Dialog.Trigger> must be used within <Dialog.Root> or provided with a handle.");let f=ye(p),v=h.useState("floatingRootContext"),x=h.useState("isOpenedByTrigger",f),b=h.useState("triggerPopupId",f),C=Rs.useRef(null),{registerTrigger:P,isMountedByThisTrigger:N}=Yt(f,C,h,{payload:c}),{getButtonProps:R,buttonRef:E}=ht({disabled:l,native:d}),T=Zo(v,{enabled:v!=null}),k=es(()=>h.select("open"),V=>{h.set("openMethod",V)}),w={disabled:l,open:x},O=h.useState("triggerProps",N);return F("button",e,{state:w,ref:[E,o,P,C],props:[T.reference,O,k,{[jo]:"",id:f,"aria-haspopup":"dialog","aria-expanded":x,"aria-controls":b},g,R],stateAttributesMapping:no})},"DialogTrigger"));br.displayName="DialogTrigger";var So=class{static{a(this,"DialogHandle")}constructor(e){this.store=e??new uo}open(e){let o=e?this.store.context.triggerElements.getById(e):void 0;e&&!o&&console.warn(`Base UI: DialogHandle.open: No trigger found with id "${e}". The dialog will open, but the trigger will not be associated with the dialog.`),this.store.setOpen(!0,Y(A.imperativeAction,void 0,o))}openWithPayload(e){this.store.set("payload",e),this.store.setOpen(!0,Y(A.imperativeAction,void 0,void 0))}close(){this.store.setOpen(!1,Y(A.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function Ca(){return new So}a(Ca,"createDialogHandle");var nt={};Ws(nt,{Arrow:()=>Tr,Handle:()=>No,Popup:()=>Er,Portal:()=>Sr,Positioner:()=>Nr,Provider:()=>Or,Root:()=>yr,Trigger:()=>Cr,Viewport:()=>Mr,createHandle:()=>Va});var rt=S(M(),1);var Ss=S(M(),1);var Ns=Ss.createContext(void 0);Ns.displayName="TooltipRootContext";function je(t){let e=Ss.useContext(Ns);if(e===void 0&&!t)throw new Error("Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>.");return e}a(je,"useTooltipRootContext");var Pa=S(M(),1);var Oi={...ro,disabled:j(t=>t.disabled),instantType:j(t=>t.instantType),isInstantPhase:j(t=>t.isInstantPhase),trackCursorAxis:j(t=>t.trackCursorAxis),disableHoverablePopup:j(t=>t.disableHoverablePopup),lastOpenChangeReason:j(t=>t.openChangeReason),closeOnClick:j(t=>t.closeOnClick),closeDelay:j(t=>t.closeDelay),hasViewport:j(t=>t.hasViewport)},fo=class t extends Kt{static{a(this,"TooltipStore")}constructor(e,o,s=!1){let r=new to,n={...Mi(),...e};n.floatingRootContext=so(r,o,s),super(n,{popupRef:Pa.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:r},Oi)}setOpen=a((e,o)=>{Pn(this,e,o,{extraState:{openChangeReason:o.reason}})},"setOpen");cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,Y(A.triggerPress,e))}static useStore(e,o){return Qt(e,(r,n)=>new t(o,r,n)).store}};function Mi(){return{...oo(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}a(Mi,"createInitialState");var Es=S(be(),1);var yr=bn(a(function(e){let{disabled:o=!1,defaultOpen:s=!1,open:r,disableHoverablePopup:n=!1,trackCursorAxis:l="none",actionsRef:d,onOpenChange:p,onOpenChangeComplete:c,handle:u,triggerId:g,defaultTriggerId:m=null,children:h}=e,f=fo.useStore(u?.store,{open:s,openProp:r,activeTriggerId:m,triggerIdProp:g});Ko(f,r,s,m),f.useControlledProp("openProp",r),f.useControlledProp("triggerIdProp",g),f.useContextCallback("onOpenChange",p),f.useContextCallback("onOpenChangeComplete",c);let v=f.useState("open"),x=!o&&v,b=f.useState("activeTriggerId"),C=f.useState("mounted"),P=f.useState("payload");f.useSyncedValues({trackCursorAxis:l,disableHoverablePopup:n}),f.useSyncedValue("disabled",o),Jt(f,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:N,transitionStatus:R}=Xt(x,f),E=f.useState("isInstantPhase"),T=f.useState("instantType"),k=f.useState("lastOpenChangeReason"),w=rt.useRef(null);mt(()=>{v&&o&&f.setOpen(!1,Y(A.disabled))},[v,o,f]),mt(()=>{R==="ending"&&k===A.none||R!=="ending"&&E?(T!=="delay"&&(w.current=T),f.set("instantType","delay")):w.current!==null&&(f.set("instantType",w.current),w.current=null)},[R,E,k,T,f]),mt(()=>{x&&b==null&&f.set("payload",void 0)},[f,b,x]);let O=rt.useCallback(()=>{f.setOpen(!1,Y(A.imperativeAction))},[f]);rt.useImperativeHandle(d,()=>({unmount:N,close:O}),[N,O]);let V=x||C||!o&&l!=="none";return(0,Es.jsxs)(Ns.Provider,{value:f,children:[V&&(0,Es.jsx)(_i,{store:f,disabled:o,trackCursorAxis:l}),typeof h=="function"?h({payload:P}):h]})},"TooltipRoot"));yr.displayName="TooltipRoot";function _i({store:t,disabled:e,trackCursorAxis:o}){let s=t.useState("floatingRootContext"),r=Gt(s,{enabled:!e,referencePress:a(()=>t.select("closeOnClick"),"referencePress")}),n=vn(s,{enabled:!e&&o!=="none",axis:o==="none"?void 0:o}),l=rt.useMemo(()=>lt(n.reference,r.reference),[n.reference,r.reference]),d=rt.useMemo(()=>lt(n.trigger,r.trigger),[n.trigger,r.trigger]),p=rt.useMemo(()=>lt(gt,n.floating,r.floating),[n.floating,r.floating]);return eo(t,{activeTriggerProps:l,inactiveTriggerProps:d,popupProps:p}),null}a(_i,"TooltipInteractions");var ks=S(M(),1);var Ts=S(M(),1);var ws=Ts.createContext(void 0);ws.displayName="TooltipProviderContext";function Ra(){return Ts.useContext(ws)}a(Ra,"useTooltipProviderContext");var Sa=(function(t){return t[t.popupOpen=Nn.popupOpen]="popupOpen",t.triggerDisabled="data-trigger-disabled",t})({});var Ea="data-base-ui-tooltip-trigger";function Na(t){if("composedPath"in t){let o=t.composedPath();for(let s=0;s<o.length;s+=1){let r=o[s];if($o(r))return r}}let e=t.target;return $o(e)?e:null}a(Na,"getTargetElement");function Ii(t){let e=t;for(;e;){if(e.hasAttribute(Ea))return e;let o=e.parentElement;if(o){e=o;continue}let s=e.getRootNode();e="host"in s&&$o(s.host)?s.host:null}return null}a(Ii,"closestEnabledTooltipTrigger");var Cr=yn(a(function(e,o){let{render:s,className:r,style:n,handle:l,payload:d,disabled:p,delay:c,closeOnClick:u=!0,closeDelay:g,id:m,...h}=e,f=je(!0),v=l?.store??f;if(!v)throw new Error("Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle.");let x=ye(m),b=v.useState("isTriggerActive",x),C=v.useState("isOpenedByTrigger",x),P=v.useState("floatingRootContext"),N=ks.useRef(null),R=c??600,E=g??0,{registerTrigger:T,isMountedByThisTrigger:k}=Yt(x,N,v,{payload:d,closeOnClick:u,closeDelay:E}),w=Ra(),{delayRef:O,isInstantPhase:V,hasProvider:W}=dn(P,{open:C}),D=Sn(P);v.useSyncedValue("isInstantPhase",V);let H=v.useState("disabled"),$=p??H,Z=pn($),K=v.useState("trackCursorAxis"),I=v.useState("disableHoverablePopup"),_=ks.useRef(!1),U=nn(),te=ks.useRef(void 0);function re(){let L=w?.delay,Q=typeof O.current=="object"?O.current.open:void 0,X=R;return W&&(Q!==0?X=c??L??R:X=0),X}a(re,"getOpenDelay");function ne(L){let Q=N.current;if(!Q||!L)return!1;let X=Ii(L);return X!==null&&X!==Q&&vo(Q,X)}a(ne,"isEnabledNestedTriggerTarget");function J(L){let Q=ne(L);return _.current=Q,Q&&(D.openChangeTimeout.clear(),D.restTimeout.clear(),D.restTimeoutPending=!1,U.clear()),Q}a(J,"detectNestedTriggerHover");let ee=Jo(P,{enabled:!$,mouseOnly:!0,move:!1,handleClose:!I&&K!=="both"?Xo():null,restMs:re,delay(){let L=typeof O.current=="object"?O.current.close:void 0,Q=E;return g==null&&W&&(Q=L),{close:Q}},triggerElementRef:N,isActiveTrigger:b,isClosing:a(()=>v.select("transitionStatus")==="ending","isClosing"),shouldOpen(){return!_.current}}),ie=Rn(P,{enabled:!$}).reference,Be=a(L=>{let Q=_.current,X=Na(L),xe=J(X),se=N.current,Fe=se&&X&&vo(se,X);if(xe&&v.select("open")&&v.select("lastOpenChangeReason")===A.triggerHover){v.setOpen(!1,Y(A.triggerHover,L));return}if(Q&&!xe&&Fe&&!Z.current&&!v.select("open")&&se&&sn(te.current)){let de=a(()=>{!_.current&&!Z.current&&!v.select("open")&&v.setOpen(!0,Y(A.triggerHover,L,se))},"open"),pe=re();pe===0?(U.clear(),de()):U.start(pe,de)}},"handleNestedTriggerHover"),me=v.useState("triggerProps",k);return F("button",e,{state:{open:C},ref:[o,T,N],props:[ee,ie,k||K!=="none"?me:void 0,{onMouseOver(L){Be(L.nativeEvent)},onFocus(L){ne(Na(L.nativeEvent))&&L.preventBaseUIHandler()},onMouseLeave(){_.current=!1,U.clear(),te.current=void 0},onPointerEnter(L){te.current=L.pointerType},onPointerDown(L){te.current=L.pointerType,v.set("closeOnClick",u),u&&!v.select("open")&&v.cancelPendingOpen(L.nativeEvent)},onClick(L){u&&!v.select("open")&&v.cancelPendingOpen(L.nativeEvent)},id:x,[Sa.triggerDisabled]:$?"":void 0,[Ea]:$?void 0:""},h],stateAttributesMapping:no})},"TooltipTrigger"));Cr.displayName="TooltipTrigger";var Oa=S(M(),1);var Os=S(M(),1);var Ms=Os.createContext(void 0);Ms.displayName="TooltipPortalContext";function Ta(){let t=Os.useContext(Ms);if(t===void 0)throw new Error("Base UI: <Tooltip.Portal> is missing.");return t}a(Ta,"useTooltipPortalContext");var _s=S(M(),1),wa=S(Hr(),1);var ka=S(be(),1);var Pr=_s.forwardRef(a(function(e,o){let{children:s,container:r,className:n,render:l,style:d,...p}=e,{portalNode:c,portalSubtree:u}=un({container:r,ref:o,componentProps:e,elementProps:p});return!u&&!c?null:(0,ka.jsxs)(_s.Fragment,{children:[u,c&&wa.createPortal(s,c)]})},"FloatingPortalLite"));Pr.displayName="FloatingPortalLite";var Rr=S(be(),1);var Sr=Oa.forwardRef(a(function(e,o){let{keepMounted:s=!1,...r}=e;return je().useState("mounted")||s?(0,Rr.jsx)(Ms.Provider,{value:s,children:(0,Rr.jsx)(Pr,{ref:o,...r})}):null},"TooltipPortal"));Sr.displayName="TooltipPortal";var As=S(M(),1);var Is=S(M(),1);var Ds=Is.createContext(void 0);Ds.displayName="TooltipPositionerContext";function mo(){let t=Is.useContext(Ds);if(t===void 0)throw new Error("Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>.");return t}a(mo,"useTooltipPositionerContext");var Ma=S(be(),1);var Nr=As.forwardRef(a(function(e,o){let{render:s,className:r,anchor:n,positionMethod:l="absolute",side:d="top",align:p="center",sideOffset:c=0,alignOffset:u=0,collisionBoundary:g="clipping-ancestors",collisionPadding:m=5,arrowPadding:h=5,sticky:f=!1,disableAnchorTracking:v=!1,collisionAvoidance:x=Uo,style:b,...C}=e,P=je(),N=Ta(),R=P.useState("open"),E=P.useState("mounted"),T=P.useState("trackCursorAxis"),k=P.useState("disableHoverablePopup"),w=P.useState("floatingRootContext"),O=P.useState("instantType"),V=P.useState("transitionStatus"),W=P.useState("hasViewport"),D=ss({anchor:n,positionMethod:l,floatingRootContext:w,mounted:E,side:d,sideOffset:c,align:p,alignOffset:u,collisionBoundary:g,collisionPadding:m,sticky:f,arrowPadding:h,disableAnchorTracking:v,keepMounted:N,collisionAvoidance:x,adaptiveOrigin:W?os:void 0}),H=As.useMemo(()=>({open:R,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:T!=="none"?"tracking-cursor":O}),[R,D.side,D.align,D.anchorHidden,T,O]),$=as(e,H,{styles:D.positionerStyles,transitionStatus:V,props:C,refs:[o,P.useStateSetter("positionerElement")],hidden:!E,inert:!R||T==="both"||k});return(0,Ma.jsx)(Ds.Provider,{value:D,children:$})},"TooltipPositioner"));Nr.displayName="TooltipPositioner";var _a=S(M(),1);var Di={...ue,...He},Er=_a.forwardRef(a(function(e,o){let{render:s,className:r,style:n,...l}=e,d=je(),{side:p,align:c}=mo(),u=d.useState("open"),g=d.useState("instantType"),m=d.useState("transitionStatus"),h=d.useState("popupProps"),f=d.useState("floatingRootContext"),v=d.useState("disabled"),x=d.useState("closeDelay");qt({open:u,ref:d.context.popupRef,onComplete(){u&&d.context.onOpenChangeComplete?.(!0)}}),Yo(f,{enabled:!v,closeDelay:x});let b=d.useStateSetter("popupElement");return F("div",e,{state:{open:u,side:p,align:c,instant:g,transitionStatus:m},ref:[o,d.context.popupRef,b],props:[h,ns(m),l],stateAttributesMapping:Di})},"TooltipPopup"));Er.displayName="TooltipPopup";var Ia=S(M(),1);var Tr=Ia.forwardRef(a(function(e,o){let{render:s,className:r,style:n,...l}=e,d=je(),{arrowRef:p,side:c,align:u,arrowUncentered:g,arrowStyles:m}=mo(),h=d.useState("open"),f=d.useState("instantType");return F("div",e,{state:{open:h,side:c,align:u,uncentered:g,instant:f},ref:[o,p],props:[{style:m,"aria-hidden":!0},l],stateAttributesMapping:ue})},"TooltipArrow"));Tr.displayName="TooltipArrow";var wr=S(M(),1);var kr=S(be(),1);var Or=a(function(e){let{delay:o,closeDelay:s,timeout:r=400}=e,n=wr.useMemo(()=>({delay:o,closeDelay:s}),[o,s]),l=wr.useMemo(()=>({open:o,close:s}),[o,s]);return(0,kr.jsx)(ws.Provider,{value:n,children:(0,kr.jsx)(cn,{delay:l,timeoutMs:r,children:e.children})})},"TooltipProvider");Or.displayName="TooltipProvider";var Aa=S(M(),1);var Da=(function(t){return t.popupWidth="--popup-width",t.popupHeight="--popup-height",t})({});var Ai={activationDirection:a(t=>t?{"data-activation-direction":t}:null,"activationDirection")},Mr=Aa.forwardRef(a(function(e,o){let{render:s,className:r,style:n,children:l,...d}=e,p=je(),c=mo(),u=p.useState("instantType"),{children:g,state:m}=ls({store:p,side:c.side,cssVars:Da,children:l}),h={activationDirection:m.activationDirection,transitioning:m.transitioning,instant:u};return F("div",e,{state:h,ref:o,props:[d,{children:g}],stateAttributesMapping:Ai})},"TooltipViewport"));Mr.displayName="TooltipViewport";var No=class{static{a(this,"TooltipHandle")}constructor(){this.store=new fo}open(e){let o=e?this.store.context.triggerElements.getById(e):void 0;if(e&&!o)throw new Error(`Base UI: TooltipHandle.open: No trigger found with id "${e}".`);this.store.setOpen(!0,Y(A.imperativeAction,void 0,o))}close(){this.store.setOpen(!1,Y(A.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function Va(){return new No}a(Va,"createTooltipHandle");var Ce=S(Fo(),1);var Ue=S(M(),1);var y=S(go(),1);var Vi=Dn(St.studioFeatures),$a={analytics:!0,auth:!0,containers:!0,flags:!0,kv:!0,mail:!0,payments:!0,queues:!0,scheduler:!0,storage:!0,vectors:!0,workflows:!0},Bi=a(t=>{if(t===null||typeof t!="object")return $a;let e=t,o=a(s=>typeof e[s]=="boolean"?e[s]:!0,"flag");return{analytics:o("analytics"),auth:o("auth"),containers:o("containers"),flags:o("flags"),kv:o("kv"),mail:o("mail"),payments:o("payments"),queues:o("queues"),scheduler:o("scheduler"),storage:o("storage"),vectors:o("vectors"),workflows:o("workflows")}},"coerceFeatures"),Dr=a(()=>{let t=(0,Ce.c)(3),e=qs(),[o,s]=(0,Ue.useState)($a),r,n;return t[0]!==e?(r=a(()=>{$e((async()=>{try{s(Bi(await e.query(Vi,{},An(""))))}catch{}})())},"t0"),n=[e],t[0]=e,t[1]=r,t[2]=n):(r=t[1],n=t[2]),(0,Ue.useEffect)(r,n),o},"useStudioFeatures"),Li=a(()=>{let t=(0,Ce.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,y.jsxDEV)("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,y.jsxDEV)("path",{d:"m9 6 6 6-6 6",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1)},void 0,!1),t[0]=e):e=t[0],e},"ChevronRight$1"),Fi=a(t=>{let e=(0,Ce.c)(24),{group:o}=t,s=ae(),r=ft(),n;e[0]!==o.tab||e[1]!==r?(n=a(()=>{$e(r({to:`/${o.tab}`}))},"t1"),e[0]=o.tab,e[1]=r,e[2]=n):n=e[2];let l=n,d=o.bindings.length,p;e[3]!==o.label?(p=(0,y.jsxDEV)("span",{className:"text-sm font-medium text-foreground",children:o.label},void 0,!1),e[3]=o.label,e[4]=p):p=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=(0,y.jsxDEV)(Li,{},void 0,!1),e[5]=c):c=e[5];let u;e[6]!==p?(u=(0,y.jsxDEV)("div",{className:"flex items-center justify-between",children:[p,c]},void 0,!0),e[6]=p,e[7]=u):u=e[7];let g;e[8]!==d||e[9]!==s?(g=d===1?s("1 binding"):s("{count} bindings",{count:d}),e[8]=d,e[9]=s,e[10]=g):g=e[10];let m;e[11]!==g?(m=(0,y.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:g},void 0,!1),e[11]=g,e[12]=m):m=e[12];let h;e[13]!==d||e[14]!==o.bindings?(h=d>0&&(0,y.jsxDEV)("div",{className:"flex flex-wrap gap-1.5",children:o.bindings.map(ji)},void 0,!1),e[13]=d,e[14]=o.bindings,e[15]=h):h=e[15];let f;e[16]!==u||e[17]!==m||e[18]!==h?(f=(0,y.jsxDEV)(Ys,{className:"flex flex-col gap-2 py-4",children:[u,m,h]},void 0,!0),e[16]=u,e[17]=m,e[18]=h,e[19]=f):f=e[19];let v;return e[20]!==o.testId||e[21]!==l||e[22]!==f?(v=(0,y.jsxDEV)(ct,{className:"cursor-pointer gap-0 py-0 transition-colors hover:bg-muted/40","data-testid":o.testId,onClick:l,children:f},void 0,!1),e[20]=o.testId,e[21]=l,e[22]=f,e[23]=v):v=e[23],v},"BindingCard"),Ba=["kv","files","vectors"],Hi=a((t,e)=>[...t.filter(o=>o.tab!==e.tab),e].toSorted((o,s)=>Ba.indexOf(o.tab)-Ba.indexOf(s.tab)),"upsertCard"),$i=a(()=>{let t=(0,Ce.c)(19),e=qs(),o=Dr(),s=ae(),r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=[],t[0]=r):r=t[0];let[n,l]=(0,Ue.useState)(r),d,p;if(t[1]!==e||t[2]!==o.kv||t[3]!==o.storage||t[4]!==o.vectors||t[5]!==s?(d=a(()=>{let f={cancelled:!1},v=[{enabled:o.kv,label:s("KV Namespaces"),load:a(async()=>(await e.listKvNamespaces()).map(Ui),"load"),tab:"kv",testId:"home-binding-kv"},{enabled:o.storage,label:s("R2 Buckets"),load:a(()=>e.listStorageBuckets(),"load"),tab:"files",testId:"home-binding-r2"},{enabled:o.vectors,label:s("Vectorize Indexes"),load:a(async()=>(await e.listVectorIndexes()).map(zi),"load"),tab:"vectors",testId:"home-binding-vectors"}];for(let x of v)x.enabled&&$e((async()=>{try{let b=await x.load();if(!f.cancelled){let C={bindings:b,label:x.label,tab:x.tab,testId:x.testId};l(P=>Hi(P,C))}}catch{}})());return()=>{f.cancelled=!0}},"t1"),p=[e,o.kv,o.storage,o.vectors,s],t[1]=e,t[2]=o.kv,t[3]=o.storage,t[4]=o.vectors,t[5]=s,t[6]=d,t[7]=p):(d=t[6],p=t[7]),(0,Ue.useEffect)(d,p),n.length===0)return null;let c;t[8]!==s?(c=s("Bindings"),t[8]=s,t[9]=c):c=t[9];let u;t[10]!==c?(u=(0,y.jsxDEV)("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:c},void 0,!1),t[10]=c,t[11]=u):u=t[11];let g;t[12]!==n?(g=n.map(Wi),t[12]=n,t[13]=g):g=t[13];let m;t[14]!==g?(m=(0,y.jsxDEV)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:g},void 0,!1),t[14]=g,t[15]=m):m=t[15];let h;return t[16]!==u||t[17]!==m?(h=(0,y.jsxDEV)("section",{className:"flex flex-col gap-3","data-testid":"home-bindings",children:[u,m]},void 0,!0),t[16]=u,t[17]=m,t[18]=h):h=t[18],h},"BindingsOverview");function ji(t){return(0,y.jsxDEV)(ho,{variant:"secondary",children:t},t,!1)}a(ji,"_temp$1");function Ui(t){return t.binding}a(Ui,"_temp2$1");function zi(t){return t.name}a(zi,"_temp3$1");function Wi(t){return(0,y.jsxDEV)(Fi,{group:t},t.tab,!1)}a(Wi,"_temp4");var Zi=[{name:"lunora_list_functions",summary:"list every query, mutation, and action with its path"},{name:"lunora_list_tables",summary:"list the schema's tables"},{name:"lunora_get_function_schema",summary:"read a function's argument JSON Schema before calling it"},{name:"lunora_run_query",summary:"run a read-only query"},{name:"lunora_run_mutation",summary:"run a mutation \u2014 writes; only when LUNORA_MCP_ALLOW_WRITES is set"},{name:"lunora_run_action",summary:"run an action \u2014 writes/effects; only when LUNORA_MCP_ALLOW_WRITES is set"}],qi=a(t=>JSON.stringify({mcpServers:{lunora:{args:["-y","@lunora/mcp"],command:"npx",env:{LUNORA_ADMIN_TOKEN:"<your-admin-token>",LUNORA_URL:t}}}},null,2),"buildMcpConfig"),Gi=a(t=>{let e=Zi.map(o=>`- ${o.name} \u2014 ${o.summary}`).join(`
2
2
  `);return[`You have a Lunora MCP server connected to the deployment at ${t}.`,"It exposes this backend's functions and schema so you can inspect and operate it:",e,"",`Start by calling lunora_list_functions and lunora_list_tables to learn what exists, then lunora_get_function_schema before any run call. The full HTTP API is also documented at ${t}/_lunora/admin/openapi (that endpoint needs the same admin token the MCP server is configured with).`].join(`
3
- `)},"buildAgentPrompt"),Ki=1500,Qi=a(()=>{let t=(0,Ce.c)(35),e=ae(),o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=Vn(),t[0]=o):o=t[0];let s=o,[r,n]=(0,Ue.useState)(null),l,d;t[1]!==r?(l=a(()=>{if(r===null)return;let O=globalThis.setTimeout(()=>{n(null)},Ki);return()=>{globalThis.clearTimeout(O)}},"t1"),d=[r],t[1]=r,t[2]=l,t[3]=d):(l=t[2],d=t[3]),(0,Ue.useEffect)(l,d);let p;t[4]===Symbol.for("react.memo_cache_sentinel")?(p=a((O,V)=>{Bn(V)&&n(O)},"t3"),t[4]=p):p=t[4];let c=p,u;t[5]===Symbol.for("react.memo_cache_sentinel")?(u=a(()=>{c("config",qi(s))},"t4"),t[5]=u):u=t[5];let g=u,m;t[6]===Symbol.for("react.memo_cache_sentinel")?(m=a(()=>{c("prompt",Gi(s))},"t5"),t[6]=m):m=t[6];let h=m,f;t[7]!==e?(f=e("Connect an AI agent"),t[7]=e,t[8]=f):f=t[8];let v;t[9]!==f?(v=(0,y.jsxDEV)("span",{className:"text-sm font-medium text-foreground",children:f},void 0,!1),t[9]=f,t[10]=v):v=t[10];let x;t[11]!==e?(x=e("Drive this deployment from an AI agent over the Model Context Protocol \u2014 it can list functions and tables, read schemas, and run read-only queries. Writes stay off unless you opt in."),t[11]=e,t[12]=x):x=t[12];let b;t[13]!==x?(b=(0,y.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:x},void 0,!1),t[13]=x,t[14]=b):b=t[14];let C;t[15]!==v||t[16]!==b?(C=(0,y.jsxDEV)("div",{className:"flex flex-col gap-1.5 p-4",children:[v,b]},void 0,!0),t[15]=v,t[16]=b,t[17]=C):C=t[17];let P;t[18]===Symbol.for("react.memo_cache_sentinel")?(P=(0,y.jsxDEV)("code",{className:"font-mono text-xs text-muted-foreground","data-testid":"home-connect-agent-command",children:"npx -y @lunora/mcp"},void 0,!1),t[18]=P):P=t[18];let N;t[19]!==r||t[20]!==e?(N=e(r==="config"?"Copied":"Copy MCP config"),t[19]=r,t[20]=e,t[21]=N):N=t[21];let R;t[22]!==N?(R=(0,y.jsxDEV)(ao,{"data-testid":"home-connect-agent-copy-config",onClick:g,size:"xs",variant:"outline",children:N},void 0,!1),t[22]=N,t[23]=R):R=t[23];let E;t[24]!==r||t[25]!==e?(E=e(r==="prompt"?"Copied":"Copy agent prompt"),t[24]=r,t[25]=e,t[26]=E):E=t[26];let T;t[27]!==E?(T=(0,y.jsxDEV)(ao,{"data-testid":"home-connect-agent-copy-prompt",onClick:h,size:"xs",variant:"outline",children:E},void 0,!1),t[27]=E,t[28]=T):T=t[28];let k;t[29]!==R||t[30]!==T?(k=(0,y.jsxDEV)("div",{className:"flex flex-col gap-3 border-t border-border bg-muted/50 px-4 py-3",children:[P,(0,y.jsxDEV)("div",{className:"flex flex-wrap gap-2",children:[R,T]},void 0,!0)]},void 0,!0),t[29]=R,t[30]=T,t[31]=k):k=t[31];let w;return t[32]!==C||t[33]!==k?(w=(0,y.jsxDEV)(ct,{className:"gap-0 py-0","data-testid":"home-connect-agent",children:[C,k]},void 0,!0),t[32]=C,t[33]=k,t[34]=w):w=t[34],w},"ConnectAgentCard"),Yi=(0,Ue.lazy)(()=>import("./chunk-2ANAF4ZM.js").then(t=>({default:t.Sparkline}))),Ir=a(t=>{if(t<1e3)return`${String(Math.round(t))}ms`;let e=t>=1e4?0:1;return`${(t/1e3).toFixed(e)}s`},"formatMs"),Ji=a((t,e)=>{let o=Math.max(0,Math.round((e-t)/1e3));if(o<60)return`${String(o)}s ago`;let s=Math.round(o/60);if(s<60)return`${String(s)}m ago`;let r=Math.round(s/60);return r<24?`${String(r)}h ago`:`${String(Math.round(r/24))}d ago`},"relativeTime"),La=a((t,e)=>{if(t===void 0||t.length===0)return[];let o=new Map;for(let s of t)o.set(s.bucketMs,(o.get(s.bucketMs)??0)+s[e]);return[...o.entries()].toSorted(([s],[r])=>s-r).map(([,s])=>s)},"bucketSeries"),Fa=a((t,e=!0)=>{if(t.length<4)return null;let o=Math.floor(t.length/2),s=t.slice(0,o).reduce((l,d)=>l+d,0),r=t.slice(o).reduce((l,d)=>l+d,0);if(s===0)return null;let n=(r-s)/s*100;return{positive:e?n>=0:n<=0,text:`${n>=0?"+":""}${n.toFixed(1)}%`}},"seriesDelta"),Vs=a(t=>{let e=(0,Ce.c)(24),{delta:o,footer:s,label:r,trend:n,unit:l,value:d}=t,p=ae(),c;e[0]!==r?(c=(0,y.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:r},void 0,!1),e[0]=r,e[1]=c):c=e[1];let u;e[2]!==d?(u=(0,y.jsxDEV)("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:d},void 0,!1),e[2]=d,e[3]=u):u=e[3];let g;e[4]!==l?(g=l!==void 0&&(0,y.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:l},void 0,!1),e[4]=l,e[5]=g):g=e[5];let m;e[6]!==u||e[7]!==g?(m=(0,y.jsxDEV)("span",{className:"flex items-baseline gap-1.5",children:[u,g]},void 0,!0),e[6]=u,e[7]=g,e[8]=m):m=e[8];let h;e[9]!==n?(h=n!==void 0&&(0,y.jsxDEV)(Ue.Suspense,{fallback:(0,y.jsxDEV)("div",{"aria-hidden":"true",className:"h-8 w-28"},void 0,!1),children:(0,y.jsxDEV)(Yi,{data:n},void 0,!1)},void 0,!1),e[9]=n,e[10]=h):h=e[10];let f;e[11]!==m||e[12]!==h?(f=(0,y.jsxDEV)("div",{className:"flex items-center justify-between gap-3",children:[m,h]},void 0,!0),e[11]=m,e[12]=h,e[13]=f):f=e[13];let v;e[14]!==c||e[15]!==f?(v=(0,y.jsxDEV)("div",{className:"flex flex-col gap-2.5 p-4",children:[c,f]},void 0,!0),e[14]=c,e[15]=f,e[16]=v):v=e[16];let x;e[17]!==o||e[18]!==s||e[19]!==p?(x=o==null?s!=null&&(0,y.jsxDEV)("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5 text-[11px] text-muted-foreground",children:s},void 0,!1):(0,y.jsxDEV)("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5 text-[11px]",children:[(0,y.jsxDEV)("span",{className:z("font-semibold",o.positive?"text-success":"text-destructive"),children:o.text},void 0,!1)," ",(0,y.jsxDEV)("span",{className:"text-muted-foreground",children:p("vs. prev.")},void 0,!1)]},void 0,!0),e[17]=o,e[18]=s,e[19]=p,e[20]=x):x=e[20];let b;return e[21]!==v||e[22]!==x?(b=(0,y.jsxDEV)(ct,{className:"justify-between gap-0 py-0",children:[v,x]},void 0,!0),e[21]=v,e[22]=x,e[23]=b):b=e[23],b},"StatCard"),Xi=a(()=>{let t=(0,Ce.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,y.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:(0,y.jsxDEV)("path",{d:"m9 6 6 6-6 6"},void 0,!1)},void 0,!1),t[0]=e):e=t[0],e},"ChevronRight"),_r=a(t=>{let e=(0,Ce.c)(7),{command:o,label:s}=t,r;e[0]!==s?(r=(0,y.jsxDEV)("div",{className:"p-4",children:(0,y.jsxDEV)("span",{className:"text-sm font-medium text-foreground",children:s},void 0,!1)},void 0,!1),e[0]=s,e[1]=r):r=e[1];let n;e[2]!==o?(n=(0,y.jsxDEV)("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5",children:(0,y.jsxDEV)("code",{className:"font-mono text-xs text-muted-foreground",children:o},void 0,!1)},void 0,!1),e[2]=o,e[3]=n):n=e[3];let l;return e[4]!==r||e[5]!==n?(l=(0,y.jsxDEV)(ct,{className:"justify-between gap-0 py-0",children:[r,n]},void 0,!0),e[4]=r,e[5]=n,e[6]=l):l=e[6],l},"ConnectCard"),Ha=a(t=>{let e=(0,Ce.c)(18),{count:o,onView:s,testId:r,title:n}=t,l=ae(),d;e[0]!==n?(d=(0,y.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:n},void 0,!1),e[0]=n,e[1]=d):d=e[1];let p;e[2]!==o||e[3]!==l?(p=o===null?(0,y.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:l("No data yet")},void 0,!1):(0,y.jsxDEV)(ho,{variant:o>0?"destructive":"success",children:o>0?o:l("All clear")},void 0,!1),e[2]=o,e[3]=l,e[4]=p):p=e[4];let c;e[5]!==d||e[6]!==p?(c=(0,y.jsxDEV)("div",{className:"flex items-start justify-between gap-2 p-4",children:[d,p]},void 0,!0),e[5]=d,e[6]=p,e[7]=c):c=e[7];let u;e[8]!==l?(u=l("View"),e[8]=l,e[9]=u):u=e[9];let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=(0,y.jsxDEV)(Xi,{},void 0,!1),e[10]=g):g=e[10];let m;e[11]!==s||e[12]!==u?(m=(0,y.jsxDEV)("button",{className:"flex items-center gap-1 border-t border-border bg-muted/50 px-4 py-2.5 text-[12px] font-medium text-foreground outline-none transition-colors hover:bg-muted focus-visible:bg-muted",onClick:s,type:"button",children:[u,g]},void 0,!0),e[11]=s,e[12]=u,e[13]=m):m=e[13];let h;return e[14]!==c||e[15]!==m||e[16]!==r?(h=(0,y.jsxDEV)(ct,{className:"justify-between gap-0 py-0","data-testid":r,children:[c,m]},void 0,!0),e[14]=c,e[15]=m,e[16]=r,e[17]=h):h=e[17],h},"AdvisorCard"),el=a(t=>{let e=(0,Ce.c)(7),{functions:o}=t,s=ae(),r;if(e[0]!==o||e[1]!==s){let n=[...o].toSorted(rl).slice(0,5),l;e[3]!==s?(l=s("Top functions"),e[3]=s,e[4]=l):l=e[4];let d;e[5]!==l?(d=(0,y.jsxDEV)("div",{className:"border-b border-border px-4 py-3",children:(0,y.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:l},void 0,!1)},void 0,!1),e[5]=l,e[6]=d):d=e[6],r=(0,y.jsxDEV)(ct,{className:"gap-0 py-0","data-testid":"home-top-functions",children:[d,n.length===0?(0,y.jsxDEV)("p",{className:"px-4 py-8 text-center text-xs text-muted-foreground",children:s("No functions called yet.")},void 0,!1):(0,y.jsxDEV)("div",{className:"divide-y divide-border",children:[(0,y.jsxDEV)("div",{className:"grid grid-cols-[1fr_auto_auto_auto] gap-4 px-4 py-1.5 font-mono text-[10px] tracking-wide text-muted-foreground uppercase",children:[(0,y.jsxDEV)("span",{children:s("Function")},void 0,!1),(0,y.jsxDEV)("span",{className:"text-end",children:s("Calls")},void 0,!1),(0,y.jsxDEV)("span",{className:"w-12 text-end",children:s("Avg")},void 0,!1),(0,y.jsxDEV)("span",{className:"w-8 text-end",children:s("Err")},void 0,!1)]},void 0,!0),n.map(nl)]},void 0,!0)]},void 0,!0),e[0]=o,e[1]=s,e[2]=r}else r=e[2];return r},"TopFunctionsCard"),tl=a(t=>{let e=(0,Ce.c)(26),{subs:o}=t,s=ae(),r;e[0]!==s?(r=s("Live connections"),e[0]=s,e[1]=r):r=e[1];let n;e[2]!==r?(n=(0,y.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:r},void 0,!1),e[2]=r,e[3]=n):n=e[3];let l=o?.totalConnections??0,d;e[4]!==l?(d=l.toLocaleString(),e[4]=l,e[5]=d):d=e[5];let p;e[6]!==d?(p=(0,y.jsxDEV)("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:d},void 0,!1),e[6]=d,e[7]=p):p=e[7];let c;e[8]!==s?(c=s("sockets"),e[8]=s,e[9]=c):c=e[9];let u;e[10]!==c?(u=(0,y.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:c},void 0,!1),e[10]=c,e[11]=u):u=e[11];let g;e[12]!==p||e[13]!==u?(g=(0,y.jsxDEV)("span",{className:"flex items-baseline gap-1.5",children:[p,u]},void 0,!0),e[12]=p,e[13]=u,e[14]=g):g=e[14];let m=o?.totalSubscriptions??0,h;e[15]!==m?(h=m.toLocaleString(),e[15]=m,e[16]=h):h=e[16];let f;e[17]!==s?(f=s("active subscriptions"),e[17]=s,e[18]=f):f=e[18];let v;e[19]!==h||e[20]!==f?(v=(0,y.jsxDEV)("span",{className:"text-[11px] text-muted-foreground",children:[h," ",f]},void 0,!0),e[19]=h,e[20]=f,e[21]=v):v=e[21];let x;return e[22]!==v||e[23]!==n||e[24]!==g?(x=(0,y.jsxDEV)(ct,{"data-testid":"home-live-connections",children:(0,y.jsxDEV)(Ys,{className:"flex flex-col gap-2.5 py-4",children:[n,g,v]},void 0,!0)},void 0,!1),e[22]=v,e[23]=n,e[24]=g,e[25]=x):x=e[25],x},"LiveConnectionsCard"),ol=a(t=>{let e=(0,Ce.c)(7),{entries:o}=t,s=ae(),r;if(e[0]!==o||e[1]!==s){let n=Date.now(),l;e[3]!==s?(l=s("Recent activity"),e[3]=s,e[4]=l):l=e[4];let d;e[5]!==l?(d=(0,y.jsxDEV)("div",{className:"border-b border-border px-4 py-3",children:(0,y.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:l},void 0,!1)},void 0,!1),e[5]=l,e[6]=d):d=e[6],r=(0,y.jsxDEV)(ct,{className:"gap-0 py-0","data-testid":"home-recent-activity",children:[d,o.length===0?(0,y.jsxDEV)("p",{className:"px-4 py-8 text-center text-xs text-muted-foreground",children:s("No recent activity.")},void 0,!1):(0,y.jsxDEV)("ul",{className:"divide-y divide-border",children:o.slice(0,5).map(p=>(0,y.jsxDEV)("li",{className:"flex items-center justify-between gap-3 px-4 py-2 text-[13px]",children:[(0,y.jsxDEV)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,y.jsxDEV)("span",{"aria-hidden":"true",className:"size-1.5 shrink-0 rounded-full bg-muted-foreground/40"},void 0,!1),(0,y.jsxDEV)("span",{className:"truncate text-foreground",children:[p.op,p.table!==void 0&&(0,y.jsxDEV)("span",{className:"text-muted-foreground",children:[" \xB7 ",p.table,p.id===void 0?"":`#${p.id}`]},void 0,!0)]},void 0,!0)]},void 0,!0),(0,y.jsxDEV)("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:Ji(p.ts,n)},void 0,!1)]},p.seq,!0))},void 0,!1)]},void 0,!0),e[0]=o,e[1]=s,e[2]=r}else r=e[2];return r},"RecentActivityCard"),sl=a(t=>{let e=t.reduce((o,s)=>o+s.calls,0);return e===0?null:t.reduce((o,s)=>o+s.totalDurationMs,0)/e},"averageLatencyMs"),ja=a(t=>{let e=(0,Ce.c)(151),{initialShardKey:o}=t,s=ae(),r=ft(),n=o??"",l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={},e[0]=l):l=e[0];let d;e[1]!==n?(d={shardKey:n},e[1]=n,e[2]=d):d=e[2];let p=io(St.getMetrics,l,d),c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c={},e[3]=c):c=e[3];let u;e[4]!==n?(u={shardKey:n},e[4]=n,e[5]=u):u=e[5];let g=io(St.getFunctionStats,c,u),m,h;e[6]===Symbol.for("react.memo_cache_sentinel")?(m={},h={shardKey:""},e[6]=m,e[7]=h):(m=e[6],h=e[7]);let f=io(St.getSecurityAudit,m,h),v;e[8]===Symbol.for("react.memo_cache_sentinel")?(v={},e[8]=v):v=e[8];let x;e[9]!==n?(x={shardKey:n},e[9]=n,e[10]=x):x=e[10];let b=io(St.listSubscriptions,v,x),C;e[11]===Symbol.for("react.memo_cache_sentinel")?(C={},e[11]=C):C=e[11];let P;e[12]!==n?(P={shardKey:n},e[12]=n,e[13]=P):P=e[13];let N=io(St.getAuditLog,C,P),R=p.data??null,E,T,k,w,O,V,W,D,H,$,Z,K,I,_,U,te,re,ne;if(e[14]!==N.data||e[15]!==f.data||e[16]!==R||e[17]!==p.data||e[18]!==r||e[19]!==g.data||e[20]!==b.data||e[21]!==s){w=Array.isArray(g.data?.functions)?g.data.functions:[],W=b.data??null;let Ze;e[40]!==N.data?(Ze=Array.isArray(N.data?.entries)?N.data.entries:[],e[40]=N.data,e[41]=Ze):Ze=e[41],T=Ze,O=p.data===void 0||g.data===void 0?null:Fn(R,w).length,V=Array.isArray(f.data?.findings)?f.data.findings.length:null;let qe;e[42]!==r?(qe=a(()=>{$e(r({to:"/security"}))},"t212"),e[42]=r,e[43]=qe):qe=e[43],ne=qe;let Ge;e[44]!==r?(Ge=a(()=>{$e(r({to:"/insights"}))},"t222"),e[44]=r,e[45]=Ge):Ge=e[45],re=Ge;let Ke=La(R?.history,"calls"),Qe=La(R?.history,"errors"),at=sl(w),Ye=Math.max(0,...w.map(al)),ge=R?.cache,Je;e[46]!==ge?(Je=ge!=null&&ge.hits+ge.misses>0?Math.round(ge.hits/(ge.hits+ge.misses)*100):null,e[46]=ge,e[47]=Je):Je=e[47],k=Je,U="flex flex-col gap-6",te="lunora-home",Z="grid gap-3 sm:grid-cols-2 xl:grid-cols-4",K="home-health";let Xe=Fa(Ke),Ie;e[48]!==s?(Ie=s("Requests"),e[48]=s,e[49]=Ie):Ie=e[49];let et=R?.requests??0,De;e[50]!==et?(De=et.toLocaleString(),e[50]=et,e[51]=De):De=e[51],e[52]!==Ke||e[53]!==Xe||e[54]!==Ie||e[55]!==De?(I=(0,y.jsxDEV)(Vs,{delta:Xe,label:Ie,trend:Ke,value:De},void 0,!1),e[52]=Ke,e[53]=Xe,e[54]=Ie,e[55]=De,e[56]=I):I=e[56];let tt=Fa(Qe,!1),Ae;e[57]!==s?(Ae=s("Errors"),e[57]=s,e[58]=Ae):Ae=e[58];let ot=R?.errors??0,Ve;e[59]!==ot?(Ve=ot.toLocaleString(),e[59]=ot,e[60]=Ve):Ve=e[60],e[61]!==Qe||e[62]!==tt||e[63]!==Ae||e[64]!==Ve?(_=(0,y.jsxDEV)(Vs,{delta:tt,label:Ae,trend:Qe,value:Ve},void 0,!1),e[61]=Qe,e[62]=tt,e[63]=Ae,e[64]=Ve,e[65]=_):_=e[65],E=Vs,e[66]!==Ye||e[67]!==s?(D=Ye>0?`${s("max")} ${Ir(Ye)}`:void 0,e[66]=Ye,e[67]=s,e[68]=D):D=e[68],e[69]!==s?(H=s("Avg latency"),e[69]=s,e[70]=H):H=e[70],$=at===null?"\u2014":Ir(at),e[14]=N.data,e[15]=f.data,e[16]=R,e[17]=p.data,e[18]=r,e[19]=g.data,e[20]=b.data,e[21]=s,e[22]=E,e[23]=T,e[24]=k,e[25]=w,e[26]=O,e[27]=V,e[28]=W,e[29]=D,e[30]=H,e[31]=$,e[32]=Z,e[33]=K,e[34]=I,e[35]=_,e[36]=U,e[37]=te,e[38]=re,e[39]=ne}else E=e[22],T=e[23],k=e[24],w=e[25],O=e[26],V=e[27],W=e[28],D=e[29],H=e[30],$=e[31],Z=e[32],K=e[33],I=e[34],_=e[35],U=e[36],te=e[37],re=e[38],ne=e[39];let J;e[71]!==E||e[72]!==D||e[73]!==H||e[74]!==$?(J=(0,y.jsxDEV)(E,{footer:D,label:H,value:$},void 0,!1),e[71]=E,e[72]=D,e[73]=H,e[74]=$,e[75]=J):J=e[75];let ee;e[76]!==k||e[77]!==s?(ee=k===null?void 0:`${String(k)}% ${s("cache hit")}`,e[76]=k,e[77]=s,e[78]=ee):ee=e[78];let ie;e[79]!==s?(ie=s("Database size"),e[79]=s,e[80]=ie):ie=e[80];let Be=R?.databaseSize??null,me;e[81]!==Be?(me=Ln(Be),e[81]=Be,e[82]=me):me=e[82];let he;e[83]!==ee||e[84]!==ie||e[85]!==me?(he=(0,y.jsxDEV)(Vs,{footer:ee,label:ie,value:me},void 0,!1),e[83]=ee,e[84]=ie,e[85]=me,e[86]=he):he=e[86];let ve;e[87]!==Z||e[88]!==K||e[89]!==I||e[90]!==_||e[91]!==J||e[92]!==he?(ve=(0,y.jsxDEV)("div",{className:Z,"data-testid":K,children:[I,_,J,he]},void 0,!0),e[87]=Z,e[88]=K,e[89]=I,e[90]=_,e[91]=J,e[92]=he,e[93]=ve):ve=e[93];let Le;e[94]===Symbol.for("react.memo_cache_sentinel")?(Le=(0,y.jsxDEV)($i,{},void 0,!1),e[94]=Le):Le=e[94];let L;e[95]!==w?(L=(0,y.jsxDEV)("div",{className:"lg:col-span-2",children:(0,y.jsxDEV)(el,{functions:w},void 0,!1)},void 0,!1),e[95]=w,e[96]=L):L=e[96];let Q;e[97]!==W?(Q=(0,y.jsxDEV)(tl,{subs:W},void 0,!1),e[97]=W,e[98]=Q):Q=e[98];let X;e[99]!==T?(X=(0,y.jsxDEV)(ol,{entries:T},void 0,!1),e[99]=T,e[100]=X):X=e[100];let xe;e[101]!==Q||e[102]!==X?(xe=(0,y.jsxDEV)("div",{className:"flex flex-col gap-3",children:[Q,X]},void 0,!0),e[101]=Q,e[102]=X,e[103]=xe):xe=e[103];let se;e[104]!==L||e[105]!==xe?(se=(0,y.jsxDEV)("div",{className:"grid gap-3 lg:grid-cols-3",children:[L,xe]},void 0,!0),e[104]=L,e[105]=xe,e[106]=se):se=e[106];let Fe;e[107]!==s?(Fe=s("Advisors"),e[107]=s,e[108]=Fe):Fe=e[108];let de;e[109]!==Fe?(de=(0,y.jsxDEV)("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:Fe},void 0,!1),e[109]=Fe,e[110]=de):de=e[110];let pe;e[111]!==O||e[112]!==V||e[113]!==s||e[114]!==re||e[115]!==ne?(pe=V===0&&O===0?(0,y.jsxDEV)(In,{description:s("No security or performance issues detected."),icon:(0,y.jsxDEV)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[(0,y.jsxDEV)("path",{d:"M12 3 4 6v5c0 5 3.4 8.5 8 10 4.6-1.5 8-5 8-10V6l-8-3Z"},void 0,!1),(0,y.jsxDEV)("path",{d:"m9 12 2 2 4-4"},void 0,!1)]},void 0,!0),testId:"home-advisors-clear",title:s("No issues found")},void 0,!1):(0,y.jsxDEV)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,y.jsxDEV)(Ha,{count:V,onView:ne,testId:"home-security",title:s("Security findings")},void 0,!1),(0,y.jsxDEV)(Ha,{count:O,onView:re,testId:"home-performance",title:s("Performance issues")},void 0,!1)]},void 0,!0),e[111]=O,e[112]=V,e[113]=s,e[114]=re,e[115]=ne,e[116]=pe):pe=e[116];let Pe;e[117]!==de||e[118]!==pe?(Pe=(0,y.jsxDEV)("section",{className:"flex flex-col gap-3","data-testid":"home-advisors",children:[de,pe]},void 0,!0),e[117]=de,e[118]=pe,e[119]=Pe):Pe=e[119];let Re;e[120]!==s?(Re=s("Get connected"),e[120]=s,e[121]=Re):Re=e[121];let Se;e[122]!==Re?(Se=(0,y.jsxDEV)("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:Re},void 0,!1),e[122]=Re,e[123]=Se):Se=e[123];let Ne;e[124]!==s?(Ne=s("Client SDK"),e[124]=s,e[125]=Ne):Ne=e[125];let Ee;e[126]!==Ne?(Ee=(0,y.jsxDEV)(_r,{command:"npm i @lunora/client",label:Ne},void 0,!1),e[126]=Ne,e[127]=Ee):Ee=e[127];let Te;e[128]!==s?(Te=s("React"),e[128]=s,e[129]=Te):Te=e[129];let we;e[130]!==Te?(we=(0,y.jsxDEV)(_r,{command:"npm i @lunora/react",label:Te},void 0,!1),e[130]=Te,e[131]=we):we=e[131];let ke;e[132]!==s?(ke=s("CLI"),e[132]=s,e[133]=ke):ke=e[133];let Oe;e[134]!==ke?(Oe=(0,y.jsxDEV)(_r,{command:"lunora dev",label:ke},void 0,!1),e[134]=ke,e[135]=Oe):Oe=e[135];let Me;e[136]!==Ee||e[137]!==we||e[138]!==Oe?(Me=(0,y.jsxDEV)("div",{className:"grid gap-3 sm:grid-cols-3",children:[Ee,we,Oe]},void 0,!0),e[136]=Ee,e[137]=we,e[138]=Oe,e[139]=Me):Me=e[139];let ze;e[140]===Symbol.for("react.memo_cache_sentinel")?(ze=(0,y.jsxDEV)(Qi,{},void 0,!1),e[140]=ze):ze=e[140];let _e;e[141]!==Se||e[142]!==Me?(_e=(0,y.jsxDEV)("section",{className:"flex flex-col gap-3","data-testid":"home-get-connected",children:[Se,Me,ze]},void 0,!0),e[141]=Se,e[142]=Me,e[143]=_e):_e=e[143];let We;return e[144]!==U||e[145]!==te||e[146]!==ve||e[147]!==se||e[148]!==Pe||e[149]!==_e?(We=(0,y.jsxDEV)("div",{className:U,"data-testid":te,children:[ve,Le,se,Pe,_e]},void 0,!0),e[144]=U,e[145]=te,e[146]=ve,e[147]=se,e[148]=Pe,e[149]=_e,e[150]=We):We=e[150],We},"HomePanel");function rl(t,e){return e.calls-t.calls}a(rl,"_temp");function nl(t){return(0,y.jsxDEV)("div",{className:"grid grid-cols-[1fr_auto_auto_auto] items-center gap-4 px-4 py-2 text-[13px]",children:[(0,y.jsxDEV)("span",{className:"truncate font-mono text-xs text-foreground",children:t.path},void 0,!1),(0,y.jsxDEV)("span",{className:"text-end tabular-nums",children:t.calls.toLocaleString()},void 0,!1),(0,y.jsxDEV)("span",{className:"w-12 text-end tabular-nums text-muted-foreground",children:Ir(t.calls>0?t.totalDurationMs/t.calls:0)},void 0,!1),(0,y.jsxDEV)("span",{className:z("w-8 text-end tabular-nums",t.errors>0?"text-destructive":"text-muted-foreground"),children:t.errors},void 0,!1)]},t.path,!0)}a(nl,"_temp2");function al(t){return t.maxDurationMs}a(al,"_temp3");var Ua=S(Fo(),1);var za=S(go(),1);var il=a((t,e,o)=>t!==void 0?t:e===void 0&&o===void 0?Qr:Kr(e,o),"resolveInstance"),Wa=a(t=>{let e=(0,Ua.c)(7),{catalogs:o,children:s,i18n:r,locale:n}=t,l;e[0]!==o||e[1]!==r||e[2]!==n?(l=il(r,n,o),e[0]=o,e[1]=r,e[2]=n,e[3]=l):l=e[3];let d=l,p;return e[4]!==s||e[5]!==d?(p=(0,za.jsxDEV)(Yr,{value:d,children:s},void 0,!1),e[4]=s,e[5]=d,e[6]=p):p=e[6],p},"StudioI18nProvider");var Vr=S(Fo(),1);var Pt=S(M(),1);var ce=S(go(),1);var Ar="lunora:command-palette",Za=a(()=>{"window"in globalThis&&globalThis.dispatchEvent(new Event(Ar))},"openCommandPalette"),ll=a(t=>{let e=(0,Vr.c)(18),{active:o,index:s,item:r,onActivate:n,onSelect:l}=t,d;e[0]!==r||e[1]!==l?(d=a(()=>{l(r)},"t1"),e[0]=r,e[1]=l,e[2]=d):d=e[2];let p=d,c;e[3]!==s||e[4]!==n?(c=a(()=>{n(s)},"t2"),e[3]=s,e[4]=n,e[5]=c):c=e[5];let u=c,g=o?"bg-accent text-accent-foreground":"text-foreground",m;e[6]!==g?(m=z("flex w-full items-center justify-between gap-3 rounded-md px-3 py-2 text-start text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground",g),e[6]=g,e[7]=m):m=e[7];let h;e[8]!==r.label?(h=(0,ce.jsxDEV)("span",{children:r.label},void 0,!1),e[8]=r.label,e[9]=h):h=e[9];let f;e[10]!==r.group?(f=(0,ce.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:r.group},void 0,!1),e[10]=r.group,e[11]=f):f=e[11];let v;return e[12]!==p||e[13]!==u||e[14]!==m||e[15]!==h||e[16]!==f?(v=(0,ce.jsxDEV)("li",{children:(0,ce.jsxDEV)("button",{className:m,onClick:p,onMouseEnter:u,type:"button",children:[h,f]},void 0,!0)},void 0,!1),e[12]=p,e[13]=u,e[14]=m,e[15]=h,e[16]=f,e[17]=v):v=e[17],v},"CommandRow"),qa=a(t=>{let e=(0,Vr.c)(39),{items:o}=t,s=ae(),r=ft(),[n,l]=(0,Pt.useState)(!1),[d,p]=(0,Pt.useState)(""),[c,u]=(0,Pt.useState)(0),g=(0,Pt.useRef)(null),m,h;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=a(()=>{let I=a(U=>{(U.metaKey||U.ctrlKey)&&U.key.toLowerCase()==="k"&&(U.preventDefault(),l(!0))},"onKeyDown"),_=a(()=>{l(!0)},"onOpen");return globalThis.addEventListener("keydown",I),globalThis.addEventListener(Ar,_),()=>{globalThis.removeEventListener("keydown",I),globalThis.removeEventListener(Ar,_)}},"t1"),h=[],e[0]=m,e[1]=h):(m=e[0],h=e[1]),(0,Pt.useEffect)(m,h);let f;if(e[2]!==o||e[3]!==d){e:{let I=d.trim().toLowerCase();if(I===""){f=o;break e}f=o.filter(_=>_.label.toLowerCase().includes(I)||_.group.toLowerCase().includes(I))}e[2]=o,e[3]=d,e[4]=f}else f=e[4];let v=f,x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=a(I=>{l(I),I||(p(""),u(0))},"t4"),e[5]=x):x=e[5];let b=x,C;e[6]!==r?(C=a(I=>{b(!1),$e(r({to:I.to}))},"t5"),e[6]=r,e[7]=C):C=e[7];let P=C,N;e[8]===Symbol.for("react.memo_cache_sentinel")?(N=a(I=>{p(I.target.value),u(0)},"t6"),e[8]=N):N=e[8];let R=N,E;e[9]!==c||e[10]!==v||e[11]!==P?(E=a(I=>{e:switch(I.key){case"ArrowDown":{I.preventDefault(),u(_=>v.length===0?0:(_+1)%v.length);break e}case"ArrowUp":{I.preventDefault(),u(_=>v.length===0?0:(_-1+v.length)%v.length);break e}case"Enter":{I.preventDefault();let _=v[c];_!==void 0&&P(_);break e}}},"t7"),e[9]=c,e[10]=v,e[11]=P,e[12]=E):E=e[12];let T=E,k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k=(0,ce.jsxDEV)(fe.Backdrop,{className:"fixed inset-0 z-50 bg-black/40 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0"},void 0,!1),e[13]=k):k=e[13];let w;e[14]!==s?(w=s("Command palette"),e[14]=s,e[15]=w):w=e[15];let O;e[16]!==w?(O=(0,ce.jsxDEV)(fe.Title,{className:"sr-only",children:w},void 0,!1),e[16]=w,e[17]=O):O=e[17];let V;e[18]===Symbol.for("react.memo_cache_sentinel")?(V=(0,ce.jsxDEV)("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,ce.jsxDEV)("circle",{cx:"11",cy:"11",r:"7"},void 0,!1),(0,ce.jsxDEV)("path",{d:"m21 21-4.3-4.3",strokeLinecap:"round"},void 0,!1)]},void 0,!0),e[18]=V):V=e[18];let W;e[19]!==s?(W=s("Search\u2026"),e[19]=s,e[20]=W):W=e[20];let D;e[21]!==T||e[22]!==d||e[23]!==W?(D=(0,ce.jsxDEV)("div",{className:"flex items-center gap-2 border-b border-border px-3",children:[V,(0,ce.jsxDEV)("input",{className:"h-11 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground","data-testid":"dash-command-input",onChange:R,onKeyDown:T,placeholder:W,ref:g,type:"text",value:d},void 0,!1)]},void 0,!0),e[21]=T,e[22]=d,e[23]=W,e[24]=D):D=e[24];let H;e[25]!==c||e[26]!==v||e[27]!==P||e[28]!==s?(H=v.length===0?(0,ce.jsxDEV)("li",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:s("No results.")},void 0,!1):v.map((I,_)=>(0,ce.jsxDEV)(ll,{active:_===c,index:_,item:I,onActivate:u,onSelect:P},I.to,!1)),e[25]=c,e[26]=v,e[27]=P,e[28]=s,e[29]=H):H=e[29];let $;e[30]!==H?($=(0,ce.jsxDEV)("ul",{className:"max-h-80 overflow-y-auto p-1.5","data-testid":"dash-command-list",children:H},void 0,!1),e[30]=H,e[31]=$):$=e[31];let Z;e[32]!==O||e[33]!==D||e[34]!==$?(Z=(0,ce.jsxDEV)(fe.Portal,{children:[k,(0,ce.jsxDEV)(fe.Popup,{className:"fixed start-1/2 top-24 z-50 w-[36rem] max-w-[90vw] -translate-x-1/2 overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-lg outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95","data-testid":"dash-command-palette",initialFocus:g,children:[O,D,$]},void 0,!0)]},void 0,!0),e[32]=O,e[33]=D,e[34]=$,e[35]=Z):Z=e[35];let K;return e[36]!==n||e[37]!==Z?(K=(0,ce.jsxDEV)(fe.Root,{onOpenChange:b,open:n,children:Z},void 0,!1),e[36]=n,e[37]=Z,e[38]=K):K=e[38],K},"CommandPalette");var Xa="(prefers-color-scheme: dark)",ei=a(()=>{try{return globalThis.localStorage}catch{return}},"store"),cl=a(t=>t==="system"||t==="light"||t==="dark","isPreference"),ti=a(()=>globalThis.matchMedia,"matchMedia"),oi="lunora-studio-theme",Br=["system","light","dark"],dl=a((t="system")=>{try{let e=ei()?.getItem(oi);return cl(e)?e:t}catch{return t}},"loadThemePreference"),Ga=a(t=>{let e=ei();if(e!==void 0)try{e.setItem(oi,t)}catch{}},"saveThemePreference"),pl=a(()=>{try{return ti()?.(Xa).matches?"dark":"light"}catch{return"light"}},"getSystemTheme"),ul=a((t,e)=>t==="system"?e:t,"resolveTheme"),fl=a(t=>{let e;try{e=ti()?.(Xa)}catch{e=void 0}if(e===void 0)return()=>{};let o=a(s=>{t(s.matches?"dark":"light")},"handler");return e.addEventListener("change",o),()=>{e.removeEventListener("change",o)}},"subscribeSystemTheme"),si=(0,q.createContext)(null),S0=a(({children:t,defaultTheme:e="system"})=>{let[o,s]=(0,q.useState)(()=>dl(e)),[r,n]=(0,q.useState)(()=>pl());(0,q.useEffect)(()=>fl(n),[]);let l=a(c=>{Ga(c),s(c)},"setTheme"),p={cycleTheme:a(()=>{s(c=>{let u=Br[(Br.indexOf(c)+1)%Br.length]??c;return Ga(u),u})},"cycleTheme"),resolvedTheme:ul(o,r),setTheme:l,systemTheme:r,theme:o};return(0,i.jsxDEV)(si,{value:p,children:t},void 0,!1)},"ThemeProvider"),ml=a(()=>{let t=(0,q.use)(si);if(t===null)throw new Zs("INTERNAL","useTheme must be used within a <ThemeProvider>");return t},"useTheme");function N0({delay:t=0,...e}){return(0,i.jsxDEV)(nt.Provider,{"data-slot":"tooltip-provider",delay:t,...e},void 0,!1)}a(N0,"TooltipProvider");function gl(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(nt.Root,{"data-slot":"tooltip",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(gl,"Tooltip");function hl(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(nt.Trigger,{"data-slot":"tooltip-trigger",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(hl,"TooltipTrigger");function vl({className:t,side:e="top",sideOffset:o=4,align:s="center",alignOffset:r=0,children:n,...l}){return(0,i.jsxDEV)(nt.Portal,{children:(0,i.jsxDEV)(nt.Positioner,{align:s,alignOffset:r,side:e,sideOffset:o,className:"isolate z-50",children:(0,i.jsxDEV)(nt.Popup,{"data-slot":"tooltip-content",className:z("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pe-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-md data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...l,children:[n,(0,i.jsxDEV)(nt.Arrow,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-md bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-start-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-end-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"},void 0,!1)]},void 0,!0)},void 0,!1)},void 0,!1)}a(vl,"TooltipContent");var xl=a(t=>{let e=(0,B.c)(5),{className:o}=t,s;e[0]!==o?(s=z("h-full w-full text-foreground",o),e[0]=o,e[1]=s):s=e[1];let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=(0,i.jsxDEV)("path",{d:"M 259.500 10.552 C 220.080 15.859, 182.424 32.566, 152.500 58.025 C 110.179 94.031, 85.380 137.183, 77.518 188.500 C 75.410 202.255, 74.569 225.677, 75.796 236.466 C 76.757 244.917, 76.683 245.692, 74.518 249.966 C 63.118 272.466, 53.141 303.876, 51.382 322.799 L 50.718 329.943 71.960 320.471 C 83.643 315.262, 93.326 311, 93.478 311 C 93.630 311, 96.547 316.063, 99.959 322.250 C 103.371 328.438, 107.249 334.850, 108.577 336.500 L 110.990 339.500 110.981 336 C 110.977 334.075, 111.499 324.991, 112.143 315.813 L 113.312 299.127 121.406 293.336 C 132.495 285.403, 149.593 271.554, 161 261.268 C 171.556 251.748, 189.116 235, 188.540 235 C 188.337 235, 183.069 238.648, 176.835 243.106 C 142.318 267.789, 68.537 314, 63.646 314 C 61.843 314, 72.791 281.179, 80.905 262.259 C 92.233 235.845, 107.473 212.389, 132.106 183.453 L 138.451 176 148.268 176 C 176.192 176, 197.512 187.154, 212.868 209.797 C 216.470 215.108, 217.035 216.595, 216.477 219.297 C 211.386 243.968, 202.359 274.496, 193.797 296 C 183.898 320.861, 167.147 352.101, 152.395 373.215 L 147.004 380.930 152.891 385.830 C 161.400 392.911, 165.563 396, 166.594 395.998 C 167.092 395.998, 168.772 391.641, 170.327 386.317 C 176.279 365.934, 188.422 338.749, 200.942 317.778 C 223.060 280.731, 256.432 244.369, 294.500 215.836 C 309.956 204.252, 313.937 201.603, 314.719 202.385 C 315.116 202.783, 315.449 213.096, 315.460 225.304 C 315.474 241.855, 315.021 250.405, 313.680 258.924 C 307.009 301.272, 291.175 336.677, 263.112 372 C 255.259 381.883, 227.182 410.673, 218.516 417.727 L 213.532 421.783 223.439 424.880 C 281.705 443.093, 349.165 436.018, 398.616 406.508 C 446.728 377.797, 483.322 331.466, 497.366 281.481 C 503.381 260.075, 504.480 250.741, 504.491 221 C 504.501 191.997, 503.598 184.047, 497.987 163.732 C 484.768 115.871, 452.505 72.708, 407.718 42.964 C 381.051 25.254, 352.818 14.828, 319.695 10.460 C 305.932 8.645, 273.298 8.695, 259.500 10.552",fillRule:"evenodd"},void 0,!1),e[2]=r):r=e[2];let n;return e[3]!==s?(n=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:s,fill:"currentColor",viewBox:"0 0 543 446",children:r},void 0,!1),e[3]=s,e[4]=n):n=e[4],n},"BrandMark"),ri="lunora.studio.rulesBannerDismissed",bl=a(()=>{try{return globalThis.localStorage.getItem(ri)==="1"}catch{return!1}},"readBannerDismissed"),yl=a(()=>{try{globalThis.localStorage.setItem(ri,"1")}catch{}},"writeBannerDismissed"),Cl=a(()=>{let t=(0,B.c)(18),e=ae(),[o,s]=(0,q.useState)(Pl),r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=a(()=>{s(!0),yl()},"t0"),t[0]=r):r=t[0];let n=r;if(o)return null;let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=(0,i.jsxDEV)("span",{"aria-hidden":"true",className:"text-warning",children:"\u26A0"},void 0,!1),t[1]=l):l=t[1];let d;t[2]!==e?(d=e("Lunora AI rules aren't installed."),t[2]=e,t[3]=d):d=t[3];let p;t[4]===Symbol.for("react.memo_cache_sentinel")?(p=(0,i.jsxDEV)("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-[11px]",children:"lunora rules install"},void 0,!1),t[4]=p):p=t[4];let c;t[5]!==e?(c=e("lets your coding agent use Lunora correctly."),t[5]=e,t[6]=c):c=t[6];let u;t[7]!==d||t[8]!==c?(u=(0,i.jsxDEV)("span",{children:[d," ",p," ",c]},void 0,!0),t[7]=d,t[8]=c,t[9]=u):u=t[9];let g;t[10]!==e?(g=e("Dismiss"),t[10]=e,t[11]=g):g=t[11];let m;t[12]===Symbol.for("react.memo_cache_sentinel")?(m=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:(0,i.jsxDEV)("path",{d:"M18 6 6 18M6 6l12 12"},void 0,!1)},void 0,!1),t[12]=m):m=t[12];let h;t[13]!==g?(h=(0,i.jsxDEV)("button",{"aria-label":g,className:"ms-auto flex size-5 items-center justify-center rounded text-muted-foreground outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:bg-accent","data-testid":"dash-app-rules-banner-dismiss",onClick:n,type:"button",children:m},void 0,!1),t[13]=g,t[14]=h):h=t[14];let f;return t[15]!==u||t[16]!==h?(f=(0,i.jsxDEV)("div",{className:"flex shrink-0 items-center gap-2 border-b border-warning/30 bg-warning/10 px-6 py-2 text-[12px] text-foreground","data-testid":"dash-app-rules-banner",role:"note",children:[l,u,h]},void 0,!0),t[15]=u,t[16]=h,t[17]=f):f=t[17],f},"RulesBanner");function Pl(){return bl()}a(Pl,"_temp$1");var Rl=a(()=>{let t=(0,B.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,i.jsxDEV)("rect",{height:"14",rx:"2",width:"20",x:"2",y:"3"},void 0,!1),(0,i.jsxDEV)("path",{d:"M8 21h8M12 17v4"},void 0,!1)]},void 0,!0),t[0]=e):e=t[0],e},"MonitorIcon"),Sl=a(()=>{let t=(0,B.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,i.jsxDEV)("circle",{cx:"12",cy:"12",r:"4"},void 0,!1),(0,i.jsxDEV)("path",{d:"M12 2v2m0 16v2M4.9 4.9l1.4 1.4m11.4 11.4 1.4 1.4M2 12h2m16 0h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"},void 0,!1)]},void 0,!0),t[0]=e):e=t[0],e},"SunIcon"),Nl=a(()=>{let t=(0,B.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:(0,i.jsxDEV)("path",{d:"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8Z"},void 0,!1)},void 0,!1),t[0]=e):e=t[0],e},"MoonIcon"),El=[{Icon:Rl,value:"system"},{Icon:Sl,value:"light"},{Icon:Nl,value:"dark"}],Tl=a(()=>{let t=(0,B.c)(19),{theme:e,setTheme:o}=ml(),s=ae(),r;t[0]!==s?(r=s("Dark theme"),t[0]=s,t[1]=r):r=t[1];let n;t[2]!==s?(n=s("Light theme"),t[2]=s,t[3]=n):n=t[3];let l;t[4]!==s?(l=s("System theme"),t[4]=s,t[5]=l):l=t[5];let d;t[6]!==r||t[7]!==n||t[8]!==l?(d={dark:r,light:n,system:l},t[6]=r,t[7]=n,t[8]=l,t[9]=d):d=t[9];let p=d,c;t[10]!==s?(c=s("Theme"),t[10]=s,t[11]=c):c=t[11];let u;t[12]!==p||t[13]!==o||t[14]!==e?(u=El.map(m=>{let{Icon:h,value:f}=m,v=e===f;return(0,i.jsxDEV)("button",{"aria-checked":v,"aria-label":p[f],className:z("relative flex size-7 cursor-pointer items-center justify-center rounded-md outline-none transition-colors focus-visible:bg-accent",v?"text-foreground":"text-muted-foreground hover:text-foreground"),"data-testid":`dash-app-theme-${f}`,onClick:a(()=>{o(f)},"onClick"),role:"radio",title:p[f],type:"button",children:[v&&(0,i.jsxDEV)(Jr.span,{className:"absolute inset-0 rounded-md border border-muted-foreground/40 bg-background/40",layoutId:"studio-theme-active",transition:{bounce:.1,duration:.45,type:"spring"}},void 0,!1),(0,i.jsxDEV)("span",{className:"relative",children:(0,i.jsxDEV)(h,{},void 0,!1)},void 0,!1)]},f,!0)}),t[12]=p,t[13]=o,t[14]=e,t[15]=u):u=t[15];let g;return t[16]!==c||t[17]!==u?(g=(0,i.jsxDEV)("div",{"aria-label":c,className:"inline-flex items-center gap-0.5 overflow-hidden rounded-md border border-border bg-muted/60 p-0.5","data-testid":"dash-app-theme",role:"radiogroup",children:u},void 0,!1),t[16]=c,t[17]=u,t[18]=g):g=t[18],g},"ThemeToggle");function ni(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(Ct.Root,{"data-slot":"popover",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(ni,"Popover");function ai(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(Ct.Trigger,{"data-slot":"popover-trigger",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(ai,"PopoverTrigger");function ii({align:t="end",alignOffset:e=0,className:o,keepMounted:s=!1,side:r="bottom",sideOffset:n=6,...l}){return(0,i.jsxDEV)(Ct.Portal,{keepMounted:s,children:(0,i.jsxDEV)(Ct.Positioner,{align:t,alignOffset:e,className:"isolate z-50 outline-none",side:r,sideOffset:n,children:(0,i.jsxDEV)(Ct.Popup,{className:z("z-50 w-72 origin-(--transform-origin) rounded-lg border border-border bg-popover p-3 text-popover-foreground shadow-md outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",o),"data-slot":"popover-content",...l},void 0,!1)},void 0,!1)},void 0,!1)}a(ii,"PopoverContent");var Lr=768;function wl(){let t=(0,B.c)(2),[e,o]=(0,q.useState)(void 0),s,r;return t[0]===Symbol.for("react.memo_cache_sentinel")?(s=a(()=>{let n=globalThis.matchMedia(`(max-width: ${Lr-1}px)`),l=a(()=>{o(globalThis.innerWidth<Lr)},"onChange");return n.addEventListener("change",l),o(globalThis.innerWidth<Lr),()=>{n.removeEventListener("change",l)}},"t0"),r=[],t[0]=s,t[1]=r):(s=t[0],r=t[1]),(0,q.useEffect)(s,r),!!e}a(wl,"useIsMobile");function kl(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(fe.Root,{"data-slot":"sheet",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(kl,"Sheet");function Ol(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(fe.Portal,{"data-slot":"sheet-portal",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(Ol,"SheetPortal");function Ml(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("fixed inset-0 z-50 bg-black/10 text-xs/relaxed transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)(fe.Backdrop,{"data-slot":"sheet-overlay",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Ml,"SheetOverlay");function _l({className:t,children:e,side:o="right",showCloseButton:s=!0,...r}){return(0,i.jsxDEV)(Ol,{children:[(0,i.jsxDEV)(Ml,{},void 0,!1),(0,i.jsxDEV)(fe.Popup,{"data-slot":"sheet-content","data-side":o,className:z("fixed z-50 flex flex-col bg-popover bg-clip-padding text-xs/relaxed text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-e data-[side=left]:data-ending-style:translate-x-[-2.5rem] rtl:data-[side=left]:data-ending-style:-translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] rtl:data-[side=left]:data-starting-style:-translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-s data-[side=right]:data-ending-style:translate-x-[2.5rem] rtl:data-[side=right]:data-ending-style:-translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] rtl:data-[side=right]:data-starting-style:-translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",t),...r,children:[e,s&&(0,i.jsxDEV)(fe.Close,{"data-slot":"sheet-close",render:(0,i.jsxDEV)(ao,{variant:"ghost",className:"absolute top-3 end-3",size:"icon-sm"},void 0,!1),children:[(0,i.jsxDEV)(Qs,{icon:Mn,strokeWidth:2},void 0,!1),(0,i.jsxDEV)("span",{className:"sr-only",children:"Close"},void 0,!1)]},void 0,!0)]},void 0,!0)]},void 0,!0)}a(_l,"SheetContent");function Il(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("flex flex-col gap-0.5 p-4",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("div",{"data-slot":"sheet-header",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Il,"SheetHeader");function Dl(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("text-sm font-medium text-foreground",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)(fe.Title,{"data-slot":"sheet-title",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Dl,"SheetTitle");function Al(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("text-xs/relaxed text-muted-foreground",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)(fe.Description,{"data-slot":"sheet-description",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Al,"SheetDescription");var Vl="sidebar_state",Bl=3600*24*7,Ll="16rem",Fl="18rem",Hl="3rem",$l="b",li=ut.createContext(null);function Bs(){let t=ut.useContext(li);if(!t)throw new Zs("INTERNAL","useSidebar must be used within a SidebarProvider.");return t}a(Bs,"useSidebar");function jl({defaultOpen:t=!0,open:e,onOpenChange:o,className:s,style:r,children:n,...l}){let d=wl(),[p,c]=ut.useState(!1),[u,g]=ut.useState(t),m=e??u,h=a(b=>{let C=typeof b=="function"?b(m):b;o?o(C):g(C),document.cookie=`${Vl}=${C}; path=/; max-age=${Bl}`},"setOpen"),f=a(()=>d?c(b=>!b):h(b=>!b),"toggleSidebar");ut.useEffect(()=>{let b=a(C=>{C.key===$l&&(C.metaKey||C.ctrlKey)&&(C.preventDefault(),f())},"handleKeyDown");return globalThis.addEventListener("keydown",b),()=>globalThis.removeEventListener("keydown",b)},[f]);let x={state:m?"expanded":"collapsed",open:m,setOpen:h,isMobile:d,openMobile:p,setOpenMobile:c,toggleSidebar:f};return(0,i.jsxDEV)(li.Provider,{value:x,children:(0,i.jsxDEV)("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Ll,"--sidebar-width-icon":Hl,...r},className:z("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",s),...l,children:n},void 0,!1)},void 0,!1)}a(jl,"SidebarProvider");function Ul({side:t="left",variant:e="sidebar",collapsible:o="offcanvas",className:s,children:r,dir:n,...l}){let{isMobile:d,state:p,openMobile:c,setOpenMobile:u}=Bs();return o==="none"?(0,i.jsxDEV)("div",{"data-slot":"sidebar",className:z("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",s),...l,children:r},void 0,!1):d?(0,i.jsxDEV)(kl,{open:c,onOpenChange:u,...l,children:(0,i.jsxDEV)(_l,{dir:n,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Fl},side:t,children:[(0,i.jsxDEV)(Il,{className:"sr-only",children:[(0,i.jsxDEV)(Dl,{children:"Sidebar"},void 0,!1),(0,i.jsxDEV)(Al,{children:"Displays the mobile sidebar."},void 0,!1)]},void 0,!0),(0,i.jsxDEV)("div",{className:"flex h-full w-full flex-col",children:r},void 0,!1)]},void 0,!0)},void 0,!1):(0,i.jsxDEV)("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":p,"data-collapsible":p==="collapsed"?o:"","data-variant":e,"data-side":t,"data-slot":"sidebar",children:[(0,i.jsxDEV)("div",{"data-slot":"sidebar-gap",className:z("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")},void 0,!1),(0,i.jsxDEV)("div",{"data-slot":"sidebar-container","data-side":t,className:z("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",e==="floating"||e==="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-e group-data-[side=right]:border-s",s),...l,children:(0,i.jsxDEV)("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-none group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:r},void 0,!1)},void 0,!1)]},void 0,!0)}a(Ul,"Sidebar");function zl(t){let e=(0,B.c)(15),o,s,r;e[0]!==t?({className:o,onClick:s,...r}=t,e[0]=t,e[1]=o,e[2]=s,e[3]=r):(o=e[1],s=e[2],r=e[3]);let{toggleSidebar:n}=Bs(),l;e[4]!==o?(l=z(o),e[4]=o,e[5]=l):l=e[5];let d;e[6]!==s||e[7]!==n?(d=a(g=>{s?.(g),n()},"t2"),e[6]=s,e[7]=n,e[8]=d):d=e[8];let p,c;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=(0,i.jsxDEV)(Qs,{icon:_n,strokeWidth:2,className:"rtl:rotate-180"},void 0,!1),c=(0,i.jsxDEV)("span",{className:"sr-only",children:"Toggle Sidebar"},void 0,!1),e[9]=p,e[10]=c):(p=e[9],c=e[10]);let u;return e[11]!==r||e[12]!==l||e[13]!==d?(u=(0,i.jsxDEV)(ao,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:l,onClick:d,...r,children:[p,c]},void 0,!0),e[11]=r,e[12]=l,e[13]=d,e[14]=u):u=e[14],u}a(zl,"SidebarTrigger");function Wl(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ms-0 md:peer-data-[variant=inset]:rounded-none md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ms-2",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("main",{"data-slot":"sidebar-inset",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Wl,"SidebarInset");function Zl(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("flex flex-col gap-2 p-2",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Zl,"SidebarHeader");function ql(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("flex flex-col gap-2 p-2",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(ql,"SidebarFooter");function Gl(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("flex min-h-0 flex-1 flex-col gap-0 overflow-x-hidden overflow-y-auto [scrollbar-color:color-mix(in_oklch,var(--muted-foreground)_25%,transparent)_transparent] [scrollbar-width:thin] [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/25 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar]:w-1.5 hover:[scrollbar-color:color-mix(in_oklch,var(--muted-foreground)_50%,transparent)_transparent] hover:[&::-webkit-scrollbar-thumb]:bg-muted-foreground/50",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Gl,"SidebarContent");function Kl(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("relative flex w-full min-w-0 flex-col p-2",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Kl,"SidebarGroup");function Ql(t){let e=(0,B.c)(10),o,s,r,n;if(e[0]!==t){let{className:p,render:c,...u}=t;o=c,n=Gs,s="div",r=lt({className:z("flex h-8 shrink-0 items-center rounded-none px-2 text-xs text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",p)},u),e[0]=t,e[1]=o,e[2]=s,e[3]=r,e[4]=n}else o=e[1],s=e[2],r=e[3],n=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l={slot:"sidebar-group-label",sidebar:"group-label"},e[5]=l):l=e[5];let d;return e[6]!==o||e[7]!==s||e[8]!==r?(d={defaultTagName:s,props:r,render:o,state:l},e[6]=o,e[7]=s,e[8]=r,e[9]=d):d=e[9],n(d)}a(Ql,"SidebarGroupLabel");function Yl(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("w-full text-xs",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Yl,"SidebarGroupContent");function Ka(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("flex w-full min-w-0 flex-col gap-0",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Ka,"SidebarMenu");function Qa(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("group/menu-item relative",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Qa,"SidebarMenuItem");var Jl=Xr("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-none p-2 text-start text-xs ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pe-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! 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 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-xs",sm:"h-7 text-xs",lg:"h-12 text-xs group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function ci({render:t,isActive:e=!1,variant:o="default",size:s="default",tooltip:r,className:n,...l}){let{isMobile:d,state:p}=Bs(),c=Gs({defaultTagName:"button",props:lt({className:z(Jl({variant:o,size:s}),n)},l),render:r?(0,i.jsxDEV)(hl,{render:t},void 0,!1):t,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:s,active:e}});return r?(typeof r=="string"&&(r={children:r}),(0,i.jsxDEV)(gl,{children:[c,(0,i.jsxDEV)(vl,{side:"right",align:"center",hidden:p!=="collapsed"||d,...r},void 0,!1)]},void 0,!0)):c}a(ci,"SidebarMenuButton");var G=a((t,e)=>(0,q.lazy)(()=>t().then(o=>({default:o[e]}))),"lazyNamed"),Xl=G(()=>import("./chunk-WIHXMNUY.js"),"InsightsPanel"),ec=(0,q.lazy)(()=>import("./chunk-GTLEWM5Y.js")),tc=(0,q.lazy)(()=>import("./chunk-LBN7LPVK.js")),oc=G(()=>import("./chunk-KUH4P5F5.js"),"AnalyticsPanel"),sc=(0,q.lazy)(()=>import("./chunk-NGKITPQP.js")),rc=G(()=>import("./chunk-MLZYX5CQ.js"),"AuthConfigPanel"),nc=G(()=>import("./chunk-ISDZPW3V.js"),"AuthSessionsPanel"),ac=G(()=>import("./chunk-EQZQOTJY.js"),"OrganizationsPanel"),ic=G(()=>import("./chunk-J73VHFCL.js"),"UsersPanel"),lc=G(()=>import("./chunk-TIQISBGK.js"),"ContainersPanel"),cc=G(()=>import("./chunk-TDZ44E5I.js"),"TableEditor"),dc=G(()=>import("./chunk-6JIZ34MB.js"),"ExportImportPanel"),pc=G(()=>import("./chunk-W3JK4YWR.js"),"MigrationsPanel"),uc=G(()=>import("./chunk-WLDVXVI2.js"),"PitrPanel"),fc=G(()=>import("./chunk-KYJPPVGB.js"),"FlagsPanel"),mc=G(()=>import("./chunk-Q7DMUTUE.js"),"FunctionRunner"),gc=G(()=>import("./chunk-HYDJNCGW.js"),"FunctionStatsPanel"),hc=G(()=>import("./chunk-HZK5RQHG.js"),"AuditPanel"),vc=G(()=>import("./chunk-6VO23MMW.js"),"LogDrainsPanel"),xc=(0,q.lazy)(()=>import("./chunk-OZACQNKG.js").then(t=>({default:t.LogsPanel}))),bc=G(()=>import("./chunk-25AYY4H7.js"),"MailPanel"),yc=G(()=>import("./chunk-TMYVNQ66.js"),"SchedulePanel"),Cc=(0,q.lazy)(()=>import("./chunk-IOANPSJN.js")),Pc=G(()=>import("./chunk-5C4TSNE6.js"),"KvBrowser"),Rc=G(()=>import("./chunk-7MVSQS7B.js"),"PaymentsPanel"),Sc=G(()=>import("./chunk-JPRH6DPK.js"),"PermissionsPanel"),Nc=(0,q.lazy)(()=>import("./chunk-L2TJVSDQ.js")),Ec=(0,q.lazy)(()=>import("./chunk-447TAUFD.js")),Tc=(0,q.lazy)(()=>import("./chunk-IN2SYVJB.js")),wc=G(()=>import("./chunk-3OIHOXVV.js"),"HealthPanel"),kc=G(()=>import("./chunk-N2X2OO4V.js"),"MetricsPanel"),Oc=G(()=>import("./chunk-ZEJB6DXU.js"),"SchemaViewer"),Mc=G(()=>import("./chunk-BX5MKYOC.js"),"SettingsPanel"),_c=G(()=>import("./chunk-UJB2LEI4.js"),"SqlEditorPanel"),Ic=G(()=>import("./chunk-YJAPWSDC.js"),"FileBrowser"),Dc=G(()=>import("./chunk-GUI5GFFI.js"),"StorageRulesPanel"),Ac=G(()=>import("./chunk-ZFNBPAIZ.js"),"VectorBrowser"),Vc=(0,q.lazy)(()=>import("./chunk-KQV4NGH3.js")),di=(0,q.createContext)(null),Bc={analytics:(0,i.jsxDEV)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"},void 0,!1),api:(0,i.jsxDEV)("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4M13 5l-2 14"},void 0,!1),audit:(0,i.jsxDEV)("path",{d:"M7 4h7l4 4v11a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Zm6 0v5h5M9 13h6M9 16h6M9 10h2"},void 0,!1),authConfig:(0,i.jsxDEV)("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm7.4-3a7.4 7.4 0 0 0-.1-1.2l2-1.6-2-3.4-2.4 1a7.3 7.3 0 0 0-2-1.2l-.4-2.6h-3.6l-.4 2.6a7.3 7.3 0 0 0-2 1.2l-2.4-1-2 3.4 2 1.6a7.4 7.4 0 0 0 0 2.4l-2 1.6 2 3.4 2.4-1a7.3 7.3 0 0 0 2 1.2l.4 2.6h3.6l.4-2.6a7.3 7.3 0 0 0 2-1.2l2.4 1 2-3.4-2-1.6a7.4 7.4 0 0 0 .1-1.2Z"},void 0,!1),authSessions:(0,i.jsxDEV)("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"},void 0,!1),containers:(0,i.jsxDEV)("path",{d:"M3 7.5 12 3l9 4.5v9L12 21l-9-4.5v-9Zm0 0 9 4.5m0 0 9-4.5m-9 4.5V21"},void 0,!1),dashboards:(0,i.jsxDEV)("path",{d:"M4 5h7v6H4V5Zm9 0h7v4h-7V5ZM4 14h7v5H4v-5Zm9-1h7v6h-7v-6Z"},void 0,!1),drains:(0,i.jsxDEV)("path",{d:"M5 5h14M7 5v6a5 5 0 0 0 10 0V5M10 16h4v3h-4zM12 19v2"},void 0,!1),data:(0,i.jsxDEV)("path",{d:"M5 6c0-1.4 3.1-2.5 7-2.5s7 1.1 7 2.5-3.1 2.5-7 2.5S5 7.4 5 6Zm0 0v12c0 1.4 3.1 2.5 7 2.5s7-1.1 7-2.5V6M5 12c0 1.4 3.1 2.5 7 2.5s7-1.1 7-2.5"},void 0,!1),export:(0,i.jsxDEV)("path",{d:"M12 3v11m0 0 4-4m-4 4-4-4M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2"},void 0,!1),fanout:(0,i.jsxDEV)("path",{d:"M12 5a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm-7 16a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm14 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM12 7v3.5M12 10.5 6 17m6-6.5 6 6.5"},void 0,!1),files:(0,i.jsxDEV)("path",{d:"M4 7a2 2 0 0 1 2-2h3l2 2.5h7a2 2 0 0 1 2 2V18a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V7Z"},void 0,!1),flags:(0,i.jsxDEV)("path",{d:"M6 21V4m0 0h11l-2 3 2 3H6"},void 0,!1),functions:(0,i.jsxDEV)("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4"},void 0,!1),health:(0,i.jsxDEV)("path",{d:"M3 12h4l2 6 4-14 2 8h6"},void 0,!1),home:(0,i.jsxDEV)("path",{d:"M3 11.5 12 4l9 7.5M5 10v9a1 1 0 0 0 1 1h4v-6h4v6h4a1 1 0 0 0 1-1v-9"},void 0,!1),insights:(0,i.jsxDEV)("path",{d:"M12 3a6 6 0 0 0-3.6 10.8c.5.4.8.9.9 1.5l.2 1.2h5l.2-1.2c.1-.6.4-1.1.9-1.5A6 6 0 0 0 12 3ZM9.5 20.5h5M10 18h4"},void 0,!1),kv:(0,i.jsxDEV)("path",{d:"M5 5h14v4H5V5Zm0 5h14v4H5v-4Zm0 5h14v4H5v-4Z"},void 0,!1),logs:(0,i.jsxDEV)("path",{d:"M5 6h14M5 10h14M5 14h9M5 18h11"},void 0,!1),mail:(0,i.jsxDEV)("path",{d:"M4 5h16v14H4V5Zm0 1.5 8 6 8-6"},void 0,!1),payments:(0,i.jsxDEV)("path",{d:"M3 7h18v10H3V7Zm0 3h18M7 14h4"},void 0,!1),metrics:(0,i.jsxDEV)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"},void 0,!1),migrations:(0,i.jsxDEV)("path",{d:"M4 12a8 8 0 0 1 13.7-5.6L20 8M20 4v4h-4M20 12a8 8 0 0 1-13.7 5.6L4 16m0 4v-4h4"},void 0,!1),organizations:(0,i.jsxDEV)("path",{d:"M3 21V8l6-4 6 4v13M9 21v-5h2v5M15 11h6v10M18 14v.01M18 17v.01M6 9v.01M6 12v.01M6 15v.01"},void 0,!1),permissions:(0,i.jsxDEV)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-3 8 2.2 2.2L15 9.5M8.5 16h7"},void 0,!1),pitr:(0,i.jsxDEV)("path",{d:"M12 21a9 9 0 1 0-9-9M12 7.5V12l3 2M3 12l-2-2m2 2 2-2"},void 0,!1),queues:(0,i.jsxDEV)("path",{d:"M4 6h16M4 10h16M4 14h10M4 18h10m4-2 3 2-3 2v-4Z"},void 0,!1),realtime:(0,i.jsxDEV)("path",{d:"M5 12a7 7 0 0 1 14 0M8 12a4 4 0 0 1 8 0M12 12v8m0-8a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"},void 0,!1),rls:(0,i.jsxDEV)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3ZM8.5 10h7M8.5 13h7"},void 0,!1),schedule:(0,i.jsxDEV)("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"},void 0,!1),schema:(0,i.jsxDEV)("path",{d:"M4 5h16v14H4V5Zm0 5h16M10 10v9M4 14.5h16"},void 0,!1),sql:(0,i.jsxDEV)("path",{d:"M4 5h16v14H4V5Zm3 4 3 3-3 3m6 0h4"},void 0,!1),storageRules:(0,i.jsxDEV)("path",{d:"M7 10V7a5 5 0 0 1 10 0v3m-11 0h12a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1Zm6 4v2"},void 0,!1),security:(0,i.jsxDEV)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-2.5 8.5 2 2 4-4"},void 0,!1),settings:(0,i.jsxDEV)("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm7.4-3a7.4 7.4 0 0 0-.1-1.2l2-1.6-2-3.4-2.4 1a7.3 7.3 0 0 0-2-1.2l-.4-2.6H10.5l-.4 2.6a7.3 7.3 0 0 0-2 1.2l-2.4-1-2 3.4 2 1.6a7.4 7.4 0 0 0 0 2.4l-2 1.6 2 3.4 2.4-1a7.3 7.3 0 0 0 2 1.2l.4 2.6h3.6l.4-2.6a7.3 7.3 0 0 0 2-1.2l2.4 1 2-3.4-2-1.6a7.4 7.4 0 0 0 .1-1.2Z"},void 0,!1),users:(0,i.jsxDEV)("path",{d:"M16 20v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2M9.5 10a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Zm11.5 10v-2a4 4 0 0 0-3-3.85M16 3.13A4 4 0 0 1 16 11"},void 0,!1),vectors:(0,i.jsxDEV)("path",{d:"M4 7l8-4 8 4-8 4-8-4Zm0 5 8 4 8-4M4 17l8 4 8-4"},void 0,!1),workflows:(0,i.jsxDEV)("path",{d:"M5 5h5v5H5V5Zm9 9h5v5h-5v-5ZM7.5 10v2a2 2 0 0 0 2 2H14m2.5-4V8a2 2 0 0 0-2-2H10"},void 0,!1)},Ya=[{key:"overview",tabs:["home","dashboards"]},{key:"database",tabs:["data","sql","schema","migrations","vectors","pitr","export"]},{key:"functions",tabs:["functions","api","workflows","queues","containers"]},{key:"auth",tabs:["users","organizations","authSessions","authConfig"]},{key:"storage",tabs:["files","storageRules","kv"]},{key:"observability",tabs:["logs","audit","realtime","fanout","metrics","analytics","health"]},{key:"advisors",tabs:["security","rls","permissions","insights"]},{key:"operations",tabs:["schedule","mail","drains","payments","flags"]},{key:"settings",tabs:["settings"]}],Lc={analytics:"analytics",authConfig:"auth",authSessions:"auth",containers:"containers",files:"storage",flags:"flags",kv:"kv",mail:"mail",organizations:"auth",payments:"payments",queues:"queues",schedule:"scheduler",storageRules:"storage",users:"auth",vectors:"vectors",workflows:"workflows"},Ja=a((t,e)=>{let o=Lc[t];return o===void 0||e[o]},"isTabVisible"),Fr=a(t=>{let e=(0,B.c)(2),{tab:o}=t,s=Bc[o],r;return e[0]!==s?(r=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-4 shrink-0",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:s},void 0,!1),e[0]=s,e[1]=r):r=e[1],r},"TabIcon"),Fc=a(t=>t,"exhaustiveRouteTabs"),pi=Fc(["home","data","sql","functions","api","workflows","queues","containers","schema","migrations","vectors","export","pitr","users","organizations","authSessions","authConfig","files","storageRules","kv","dashboards","metrics","analytics","health","security","rls","permissions","insights","logs","realtime","fanout","mail","payments","audit","schedule","drains","flags","settings"]),Hc=new Set(["api","data","sql"]),$c=a(t=>{let e=t.split("/").findLast(Boolean)??"";return pi.includes(e)?e:"home"},"tabFromPathname"),jc=a(t=>{let e=(0,B.c)(19),{chrome:o,connected:s}=t,r=ae(),n;e[0]!==r?(n=r("admin token"),e[0]=r,e[1]=n):n=e[1];let l;e[2]!==n?(l=(0,i.jsxDEV)("label",{className:"text-xs font-medium text-foreground",htmlFor:"dash-app-token",children:n},void 0,!1),e[2]=n,e[3]=l):l=e[3];let d;e[4]!==o.onTokenChange||e[5]!==o.token?(d=(0,i.jsxDEV)(ln,{className:"h-8","data-testid":"dash-app-token",id:"dash-app-token",onChange:o.onTokenChange,placeholder:"LUNORA_ADMIN_TOKEN",type:"password",value:o.token},void 0,!1),e[4]=o.onTokenChange,e[5]=o.token,e[6]=d):d=e[6];let p;e[7]!==s||e[8]!==r?(p=s&&(0,i.jsxDEV)("p",{className:"flex items-start gap-1.5 text-[11px] text-muted-foreground","data-testid":"dash-app-token-warning",role:"note",children:[(0,i.jsxDEV)("span",{"aria-hidden":"true",className:"text-warning",children:"\u26A0"},void 0,!1),r("Token rides the WebSocket URL \u2014 it can surface in browser DevTools and server logs. Use a dev-only token.")]},void 0,!0),e[7]=s,e[8]=r,e[9]=p):p=e[9];let c;e[10]!==o.clearToken||e[11]!==s||e[12]!==r?(c=s&&(0,i.jsxDEV)("button",{className:"self-start rounded-md border border-border px-2.5 py-1 text-xs font-medium outline-none transition-colors hover:bg-accent focus-visible:bg-accent","data-testid":"dash-app-clear-token",onClick:o.clearToken,type:"button",children:r("Clear")},void 0,!1),e[10]=o.clearToken,e[11]=s,e[12]=r,e[13]=c):c=e[13];let u;return e[14]!==l||e[15]!==d||e[16]!==p||e[17]!==c?(u=(0,i.jsxDEV)("div",{className:"flex flex-col gap-2",children:[l,d,p,c]},void 0,!0),e[14]=l,e[15]=d,e[16]=p,e[17]=c,e[18]=u):u=e[18],u},"ConnectPopoverContent"),Uc=a(t=>{let e=(0,B.c)(25),{current:o,group:s,groupLabel:r,selectTab:n,tabDescription:l,tabLabel:d}=t,p=s.tabs.includes(o)?"page":void 0,c=r[s.key],u=s.tabs[0],g;e[0]!==u?(g=(0,i.jsxDEV)(Fr,{tab:u},void 0,!1),e[0]=u,e[1]=g):g=e[1];let m;e[2]!==p||e[3]!==c||e[4]!==g?(m=(0,i.jsxDEV)(ai,{"aria-current":p,"aria-label":c,className:"mx-auto flex size-8 items-center justify-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:bg-sidebar-accent data-[popup-open]:bg-sidebar-accent data-[popup-open]:text-sidebar-accent-foreground data-[popup-open]:shadow-xs aria-[current=page]:bg-sidebar-accent aria-[current=page]:text-sidebar-accent-foreground aria-[current=page]:shadow-xs",delay:120,openOnHover:!0,children:g},void 0,!1),e[2]=p,e[3]=c,e[4]=g,e[5]=m):m=e[5];let h=r[s.key],f;e[6]!==h?(f=(0,i.jsxDEV)("div",{className:"px-2 py-1.5 text-[11px] font-medium tracking-wider text-muted-foreground uppercase",children:h},void 0,!1),e[6]=h,e[7]=f):f=e[7];let v;if(e[8]!==o||e[9]!==s.tabs||e[10]!==n||e[11]!==l||e[12]!==d){let C;e[14]!==o||e[15]!==n||e[16]!==l||e[17]!==d?(C=a(P=>(0,i.jsxDEV)("button",{"aria-current":o===P?"page":void 0,className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-start text-[13px] text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent aria-[current=page]:bg-accent aria-[current=page]:font-medium [&_svg]:opacity-70 aria-[current=page]:[&_svg]:opacity-100","data-tab":P,"data-testid":`dash-tab-${P}`,onClick:n,title:l[P],type:"button",children:[(0,i.jsxDEV)(Fr,{tab:P},void 0,!1),(0,i.jsxDEV)("span",{children:d[P]},void 0,!1)]},P,!0),"t92"),e[14]=o,e[15]=n,e[16]=l,e[17]=d,e[18]=C):C=e[18],v=s.tabs.map(C),e[8]=o,e[9]=s.tabs,e[10]=n,e[11]=l,e[12]=d,e[13]=v}else v=e[13];let x;e[19]!==f||e[20]!==v?(x=(0,i.jsxDEV)(ii,{align:"start",className:"w-56 p-1",side:"right",sideOffset:8,children:[f,v]},void 0,!0),e[19]=f,e[20]=v,e[21]=x):x=e[21];let b;return e[22]!==m||e[23]!==x?(b=(0,i.jsxDEV)(ni,{children:[m,x]},void 0,!0),e[22]=m,e[23]=x,e[24]=b):b=e[24],b},"CollapsedGroupNav"),zc=a(t=>{let e=(0,B.c)(45),{chrome:o,collapsed:s,connected:r}=t,n=ae();if(o===null){let P;e[0]!==n?(P=n("Admin"),e[0]=n,e[1]=P):P=e[1];let N;e[2]===Symbol.for("react.memo_cache_sentinel")?(N=(0,i.jsxDEV)("span",{className:"flex size-8 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:"C"},void 0,!1),e[2]=N):N=e[2];let R;e[3]!==n?(R=n("Admin"),e[3]=n,e[4]=R):R=e[4];let E;e[5]!==R?(E=(0,i.jsxDEV)("span",{className:"truncate text-[13px] font-medium",children:R},void 0,!1),e[5]=R,e[6]=E):E=e[6];let T;e[7]!==n?(T=n("Studio"),e[7]=n,e[8]=T):T=e[8];let k;e[9]!==T?(k=(0,i.jsxDEV)("span",{className:"truncate text-[11px] text-muted-foreground",children:T},void 0,!1),e[9]=T,e[10]=k):k=e[10];let w;e[11]!==E||e[12]!==k?(w=(0,i.jsxDEV)("span",{className:"grid flex-1 text-start leading-tight",children:[E,k]},void 0,!0),e[11]=E,e[12]=k,e[13]=w):w=e[13];let O;return e[14]!==P||e[15]!==w?(O=(0,i.jsxDEV)(ci,{className:"data-active:bg-transparent",size:"lg",tooltip:P,children:[N,w]},void 0,!0),e[14]=P,e[15]=w,e[16]=O):O=e[16],O}let l=s?"mx-auto size-8 justify-center":"w-full p-2",d;e[17]!==l?(d=z("flex items-center gap-2 rounded-md text-start outline-none transition-colors hover:bg-sidebar-accent focus-visible:bg-sidebar-accent",l),e[17]=l,e[18]=d):d=e[18];let p;e[19]!==r||e[20]!==n?(p=n(r?"Connected":"Not connected"),e[19]=r,e[20]=n,e[21]=p):p=e[21];let c=r?"bg-success":"bg-muted-foreground/50",u;e[22]!==c?(u=z("absolute -end-0.5 -bottom-0.5 size-2.5 rounded-full border-2 border-sidebar",c),e[22]=c,e[23]=u):u=e[23];let g;e[24]!==u?(g=(0,i.jsxDEV)("span",{className:"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:["C",(0,i.jsxDEV)("span",{"aria-hidden":"true",className:u},void 0,!1)]},void 0,!0),e[24]=u,e[25]=g):g=e[25];let m;e[26]!==s||e[27]!==r||e[28]!==n?(m=!s&&(0,i.jsxDEV)(i.Fragment,{children:[(0,i.jsxDEV)("span",{className:"grid flex-1 text-start leading-tight",children:[(0,i.jsxDEV)("span",{className:"truncate text-[13px] font-medium",children:n("Admin")},void 0,!1),(0,i.jsxDEV)("span",{className:"truncate text-[11px] text-muted-foreground",children:n(r?"Connected":"Not connected")},void 0,!1)]},void 0,!0),(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.7,viewBox:"0 0 24 24",children:(0,i.jsxDEV)("path",{d:"m8 9 4-4 4 4M8 15l4 4 4-4",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1)},void 0,!1)]},void 0,!0),e[26]=s,e[27]=r,e[28]=n,e[29]=m):m=e[29];let h;e[30]!==d||e[31]!==p||e[32]!==g||e[33]!==m?(h=(0,i.jsxDEV)(ai,{className:d,"data-testid":"dash-app-connect",title:p,children:[g,m]},void 0,!0),e[30]=d,e[31]=p,e[32]=g,e[33]=m,e[34]=h):h=e[34];let f=s?"end":"start",v=s?"right":"top",x;e[35]!==o||e[36]!==r?(x=(0,i.jsxDEV)(jc,{chrome:o,connected:r},void 0,!1),e[35]=o,e[36]=r,e[37]=x):x=e[37];let b;e[38]!==v||e[39]!==x||e[40]!==f?(b=(0,i.jsxDEV)(ii,{align:f,keepMounted:!0,side:v,children:x},void 0,!1),e[38]=v,e[39]=x,e[40]=f,e[41]=b):b=e[41];let C;return e[42]!==b||e[43]!==h?(C=(0,i.jsxDEV)(ni,{children:[h,b]},void 0,!0),e[42]=b,e[43]=h,e[44]=C):C=e[44],C},"SidebarFooterProfile"),Wc=a(t=>{let e=(0,B.c)(28),{chrome:o,connected:s,current:r,groupLabel:n,groups:l,selectTab:d,tabDescription:p,tabLabel:c}=t,u=ae(),{state:g}=Bs(),m=g==="collapsed",h=m&&"justify-center px-0",f;e[0]!==h?(f=z("flex items-center gap-2.5 px-1.5 py-1",h),e[0]=h,e[1]=f):f=e[1];let v;e[2]===Symbol.for("react.memo_cache_sentinel")?(v=(0,i.jsxDEV)(xl,{className:"size-9 shrink-0 text-foreground"},void 0,!1),e[2]=v):v=e[2];let x;e[3]!==m||e[4]!==s||e[5]!==u?(x=!m&&(0,i.jsxDEV)(i.Fragment,{children:[(0,i.jsxDEV)("span",{className:"grid flex-1 leading-tight",children:[(0,i.jsxDEV)("span",{className:"truncate text-sm font-semibold text-foreground",children:"lunora"},void 0,!1),(0,i.jsxDEV)("span",{className:"truncate text-[11px] text-muted-foreground",children:u("Studio")},void 0,!1)]},void 0,!0),(0,i.jsxDEV)(ho,{className:"px-1.5 text-[10px] tracking-wider uppercase",variant:"secondary",children:u(s?"Live":"Local")},void 0,!1)]},void 0,!0),e[3]=m,e[4]=s,e[5]=u,e[6]=x):x=e[6];let b;e[7]!==f||e[8]!==x?(b=(0,i.jsxDEV)(Zl,{children:(0,i.jsxDEV)("div",{className:f,children:[v,x]},void 0,!0)},void 0,!1),e[7]=f,e[8]=x,e[9]=b):b=e[9];let C;e[10]!==m||e[11]!==r||e[12]!==n||e[13]!==l||e[14]!==d||e[15]!==p||e[16]!==c?(C=m?l.map(E=>(0,i.jsxDEV)(Uc,{current:r,group:E,groupLabel:n,selectTab:d,tabDescription:p,tabLabel:c},E.key,!1)):l.map(E=>(0,i.jsxDEV)(Kl,{children:[(0,i.jsxDEV)(Ql,{className:"text-[11px] font-medium tracking-wider uppercase",children:n[E.key]},void 0,!1),(0,i.jsxDEV)(Yl,{children:(0,i.jsxDEV)(Ka,{children:E.tabs.map(T=>(0,i.jsxDEV)(Qa,{children:(0,i.jsxDEV)(ci,{className:"data-active:text-foreground dark:data-active:text-royal-amethyst data-active:shadow-[inset_2px_0_0_0_var(--royal-amethyst)]","data-tab":T,"data-testid":`dash-tab-${T}`,isActive:r===T,onClick:d,title:p[T],tooltip:p[T],children:[(0,i.jsxDEV)(Fr,{tab:T},void 0,!1),(0,i.jsxDEV)("span",{children:c[T]},void 0,!1)]},void 0,!0)},T,!1))},void 0,!1)},void 0,!1)]},E.key,!0)),e[10]=m,e[11]=r,e[12]=n,e[13]=l,e[14]=d,e[15]=p,e[16]=c,e[17]=C):C=e[17];let P;e[18]!==C?(P=(0,i.jsxDEV)(Gl,{children:C},void 0,!1),e[18]=C,e[19]=P):P=e[19];let N;e[20]!==o||e[21]!==m||e[22]!==s?(N=(0,i.jsxDEV)(ql,{children:(0,i.jsxDEV)(Ka,{children:(0,i.jsxDEV)(Qa,{children:(0,i.jsxDEV)(zc,{chrome:o,collapsed:m,connected:s},void 0,!1)},void 0,!1)},void 0,!1)},void 0,!1),e[20]=o,e[21]=m,e[22]=s,e[23]=N):N=e[23];let R;return e[24]!==b||e[25]!==P||e[26]!==N?(R=(0,i.jsxDEV)(Ul,{collapsible:"icon",variant:"inset",children:[b,P,N]},void 0,!0),e[24]=b,e[25]=P,e[26]=N,e[27]=R):R=e[27],R},"StudioSidebar"),ui=a(()=>{let t=(0,B.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsxDEV)("div",{className:"flex flex-col gap-4","data-testid":"dash-pending",children:[(0,i.jsxDEV)("div",{className:"flex items-center gap-2",children:[(0,i.jsxDEV)(cs,{className:"h-8 w-40"},void 0,!1),(0,i.jsxDEV)(cs,{className:"h-8 w-24"},void 0,!1)]},void 0,!0),(0,i.jsxDEV)(cs,{className:"h-72 w-full"},void 0,!1)]},void 0,!0),t[0]=e):e=t[0],e},"RoutePending"),Zc=a(()=>{let t=(0,B.c)(294),e=ae(),o=ft(),s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={select:Yc},t[0]=s):s=t[0];let r=Gr(s),n,l;t[1]!==r?(n=$c(r),l=Hc.has(n),t[1]=r,t[2]=n,t[3]=l):(n=t[2],l=t[3]);let d=l,p=Dr(),c;t[4]!==p?(c=a(it=>({...it,tabs:it.tabs.filter(Lo=>Ja(Lo,p))}),"t2"),t[4]=p,t[5]=c):c=t[5];let u=Ya.map(c).filter(Jc),g,m;t[6]!==n||t[7]!==p||t[8]!==o?(g=a(()=>{Ja(n,p)||$e(o({replace:!0,to:"/home"}))},"t3"),m=[n,p,o],t[6]=n,t[7]=p,t[8]=o,t[9]=g,t[10]=m):(g=t[9],m=t[10]),(0,q.useEffect)(g,m);let h;t[11]!==e?(h=e("Analytics"),t[11]=e,t[12]=h):h=t[12];let f;t[13]!==e?(f=e("API"),t[13]=e,t[14]=f):f=t[14];let v;t[15]!==e?(v=e("Audit"),t[15]=e,t[16]=v):v=t[16];let x;t[17]!==e?(x=e("Configuration"),t[17]=e,t[18]=x):x=t[18];let b;t[19]!==e?(b=e("Sessions"),t[19]=e,t[20]=b):b=t[20];let C;t[21]!==e?(C=e("Containers"),t[21]=e,t[22]=C):C=t[22];let P;t[23]!==e?(P=e("Dashboards"),t[23]=e,t[24]=P):P=t[24];let N;t[25]!==e?(N=e("Data"),t[25]=e,t[26]=N):N=t[26];let R;t[27]!==e?(R=e("Log drains"),t[27]=e,t[28]=R):R=t[28];let E;t[29]!==e?(E=e("Export / Import"),t[29]=e,t[30]=E):E=t[30];let T;t[31]!==e?(T=e("Fan-out"),t[31]=e,t[32]=T):T=t[32];let k;t[33]!==e?(k=e("Files"),t[33]=e,t[34]=k):k=t[34];let w;t[35]!==e?(w=e("Flags"),t[35]=e,t[36]=w):w=t[36];let O;t[37]!==e?(O=e("Functions"),t[37]=e,t[38]=O):O=t[38];let V;t[39]!==e?(V=e("Health"),t[39]=e,t[40]=V):V=t[40];let W;t[41]!==e?(W=e("Home"),t[41]=e,t[42]=W):W=t[42];let D;t[43]!==e?(D=e("Performance"),t[43]=e,t[44]=D):D=t[44];let H;t[45]!==e?(H=e("KV"),t[45]=e,t[46]=H):H=t[46];let $;t[47]!==e?($=e("Logs"),t[47]=e,t[48]=$):$=t[48];let Z;t[49]!==e?(Z=e("Metrics"),t[49]=e,t[50]=Z):Z=t[50];let K;t[51]!==e?(K=e("Migrations"),t[51]=e,t[52]=K):K=t[52];let I;t[53]!==e?(I=e("Organizations"),t[53]=e,t[54]=I):I=t[54];let _;t[55]!==e?(_=e("Time Travel"),t[55]=e,t[56]=_):_=t[56];let U;t[57]!==e?(U=e("Mail"),t[57]=e,t[58]=U):U=t[58];let te;t[59]!==e?(te=e("Payments"),t[59]=e,t[60]=te):te=t[60];let re;t[61]!==e?(re=e("Permissions"),t[61]=e,t[62]=re):re=t[62];let ne;t[63]!==e?(ne=e("Queues"),t[63]=e,t[64]=ne):ne=t[64];let J;t[65]!==e?(J=e("Realtime"),t[65]=e,t[66]=J):J=t[66];let ee;t[67]!==e?(ee=e("RLS Policies"),t[67]=e,t[68]=ee):ee=t[68];let ie;t[69]!==e?(ie=e("Scheduled"),t[69]=e,t[70]=ie):ie=t[70];let Be;t[71]!==e?(Be=e("Schema"),t[71]=e,t[72]=Be):Be=t[72];let me;t[73]!==e?(me=e("Security"),t[73]=e,t[74]=me):me=t[74];let he;t[75]!==e?(he=e("Settings"),t[75]=e,t[76]=he):he=t[76];let ve;t[77]!==e?(ve=e("SQL editor"),t[77]=e,t[78]=ve):ve=t[78];let Le;t[79]!==e?(Le=e("Access Rules"),t[79]=e,t[80]=Le):Le=t[80];let L;t[81]!==e?(L=e("Users"),t[81]=e,t[82]=L):L=t[82];let Q;t[83]!==e?(Q=e("Vectors"),t[83]=e,t[84]=Q):Q=t[84];let X;t[85]!==e?(X=e("Workflows"),t[85]=e,t[86]=X):X=t[86];let xe;t[87]!==C||t[88]!==P||t[89]!==N||t[90]!==R||t[91]!==E||t[92]!==T||t[93]!==k||t[94]!==w||t[95]!==O||t[96]!==V||t[97]!==W||t[98]!==D||t[99]!==H||t[100]!==$||t[101]!==Z||t[102]!==K||t[103]!==I||t[104]!==_||t[105]!==U||t[106]!==te||t[107]!==re||t[108]!==ne||t[109]!==J||t[110]!==ee||t[111]!==ie||t[112]!==Be||t[113]!==me||t[114]!==he||t[115]!==ve||t[116]!==Le||t[117]!==L||t[118]!==Q||t[119]!==X||t[120]!==h||t[121]!==f||t[122]!==v||t[123]!==x||t[124]!==b?(xe={analytics:h,api:f,audit:v,authConfig:x,authSessions:b,containers:C,dashboards:P,data:N,drains:R,export:E,fanout:T,files:k,flags:w,functions:O,health:V,home:W,insights:D,kv:H,logs:$,metrics:Z,migrations:K,organizations:I,pitr:_,mail:U,payments:te,permissions:re,queues:ne,realtime:J,rls:ee,schedule:ie,schema:Be,security:me,settings:he,sql:ve,storageRules:Le,users:L,vectors:Q,workflows:X},t[87]=C,t[88]=P,t[89]=N,t[90]=R,t[91]=E,t[92]=T,t[93]=k,t[94]=w,t[95]=O,t[96]=V,t[97]=W,t[98]=D,t[99]=H,t[100]=$,t[101]=Z,t[102]=K,t[103]=I,t[104]=_,t[105]=U,t[106]=te,t[107]=re,t[108]=ne,t[109]=J,t[110]=ee,t[111]=ie,t[112]=Be,t[113]=me,t[114]=he,t[115]=ve,t[116]=Le,t[117]=L,t[118]=Q,t[119]=X,t[120]=h,t[121]=f,t[122]=v,t[123]=x,t[124]=b,t[125]=xe):xe=t[125];let se=xe,Fe={advisors:e("Advisors"),auth:e("Auth"),database:e("Database"),functions:e("Functions"),observability:e("Observability"),operations:e("Operations"),overview:e("Overview"),settings:e("Settings"),storage:e("Storage")},de;t[126]!==e?(de=e("Usage and latency from Analytics Engine \u2014 request volume, p50/p95, and hot shards."),t[126]=e,t[127]=de):de=t[127];let pe;t[128]!==e?(pe=e("Interactive OpenAPI reference and copy-paste snippets for your functions."),t[128]=e,t[129]=pe):pe=t[129];let Pe;t[130]!==e?(Pe=e("A durable log of admin state-changing operations."),t[130]=e,t[131]=Pe):Pe=t[131];let Re;t[132]!==e?(Re=e("Enabled plugins and session config (read-only)."),t[132]=e,t[133]=Re):Re=t[133];let Se;t[134]!==e?(Se=e("Browse and revoke active sessions across all users."),t[134]=e,t[135]=Se):Se=t[135];let Ne;t[136]!==e?(Ne=e("Live Cloudflare Containers \u2014 current lifecycle state per container from the log stream."),t[136]=e,t[137]=Ne):Ne=t[137];let Ee;t[138]!==e?(Ee=e("Chart widgets backed by saved read-only SQL queries."),t[138]=e,t[139]=Ee):Ee=t[139];let Te;t[140]!==e?(Te=e("Browse and edit rows across your shard and global tables."),t[140]=e,t[141]=Te):Te=t[141];let we;t[142]!==e?(we=e("Forward logs to Logpush, Tail Workers, or a webhook collector."),t[142]=e,t[143]=we):we=t[143];let ke;t[144]!==e?(ke=e("Export a shard to NDJSON, or import rows from it."),t[144]=e,t[145]=ke):ke=t[145];let Oe;t[146]!==e?(Oe=e("Realtime fan-out cost and per-topic subscriber counts for this shard."),t[146]=e,t[147]=Oe):Oe=t[147];let Me;t[148]!==e?(Me=e("Browse objects in your R2 storage buckets."),t[148]=e,t[149]=Me):Me=t[149];let ze;t[150]!==e?(ze=e("Inspect feature flags and their live evaluation under a targeting context."),t[150]=e,t[151]=ze):ze=t[151];let _e;t[152]!==e?(_e=e("Run registered queries, mutations, and actions."),t[152]=e,t[153]=_e):_e=t[153];let We;t[154]!==e?(We=e("At-a-glance connection, error, and shard signals."),t[154]=e,t[155]=We):We=t[155];let Ze;t[156]!==e?(Ze=e("Connection, health, and advisor summary for your deployment."),t[156]=e,t[157]=Ze):Ze=t[157];let qe;t[158]!==e?(qe=e("Surface slow functions, error spikes, and cache problems."),t[158]=e,t[159]=qe):qe=t[159];let Ge;t[160]!==e?(Ge=e("A live stream of recent function logs."),t[160]=e,t[161]=Ge):Ge=t[161];let Ke;t[162]!==e?(Ke=e("Per-shard health and aggregate metrics."),t[162]=e,t[163]=Ke):Ke=t[163];let Qe;t[164]!==e?(Qe=e("Review migration status and run them."),t[164]=e,t[165]=Qe):Qe=t[165];let at;t[166]!==e?(at=e("Browse and manage organizations, members, and invitations."),t[166]=e,t[167]=at):at=t[167];let Ye;t[168]!==e?(Ye=e("Restore a shard to a point in the last 30 days."),t[168]=e,t[169]=Ye):Ye=t[169];let ge;t[170]!==e?(ge=e("Email your app sent, captured in dev."),t[170]=e,t[171]=ge):ge=t[171];let Je;t[172]!==e?(Je=e("Synced customers, subscriptions, and webhook events."),t[172]=e,t[173]=Je):Je=t[173];let Xe;t[174]!==e?(Xe=e("Inspect access policies per table, and probe a function as any identity."),t[174]=e,t[175]=Xe):Xe=t[175];let Ie;t[176]!==e?(Ie=e("Inspect declared Cloudflare Queues \u2014 their producer bindings, consumer mode, and dead-letter queue."),t[176]=e,t[177]=Ie):Ie=t[177];let et;t[178]!==e?(et=e("Active WebSocket subscriptions on this shard."),t[178]=e,t[179]=et):et=t[179];let De;t[180]!==e?(De=e("Inspect row-level-security policies and roles, per table."),t[180]=e,t[181]=De):De=t[181];let tt;t[182]!==e?(tt=e("Inspect and cancel scheduled jobs."),t[182]=e,t[183]=tt):tt=t[183];let Ae;t[184]!==e?(Ae=e("Inspect each table and its columns."),t[184]=e,t[185]=Ae):Ae=t[185];let ot;t[186]!==e?(ot=e("Review admin gates, credentials, and log redaction."),t[186]=e,t[187]=ot):ot=t[187];let Ve;t[188]!==e?(Ve=e("Read-only deployment config \u2014 vars, secrets, and bindings."),t[188]=e,t[189]=Ve):Ve=t[189];let Tt;t[190]!==e?(Tt=e("Run read-only SQL against a shard."),t[190]=e,t[191]=Tt):Tt=t[191];let wt;t[192]!==e?(wt=e("Browse and edit key-value pairs in your Workers KV namespaces."),t[192]=e,t[193]=wt):wt=t[193];let kt;t[194]!==e?(kt=e("Inspect storage access rules \u2014 per bucket, operation, and key prefix."),t[194]=e,t[195]=kt):kt=t[195];let Ot;t[196]!==e?(Ot=e("Manage auth users \u2014 roles, bans, sessions, and identity."),t[196]=e,t[197]=Ot):Ot=t[197];let Mt;t[198]!==e?(Mt=e("Browse Vectorize indexes and run similarity searches."),t[198]=e,t[199]=Mt):Mt=t[199];let _t;t[200]!==e?(_t=e("Inspect declared Cloudflare Workflows and their bindings."),t[200]=e,t[201]=_t):_t=t[201];let Eo;t[202]!==de||t[203]!==pe||t[204]!==Pe||t[205]!==Re||t[206]!==Se||t[207]!==Ne||t[208]!==Ee||t[209]!==Te||t[210]!==we||t[211]!==ke||t[212]!==Oe||t[213]!==Me||t[214]!==ze||t[215]!==_e||t[216]!==We||t[217]!==Ze||t[218]!==qe||t[219]!==Ge||t[220]!==Ke||t[221]!==Qe||t[222]!==at||t[223]!==Ye||t[224]!==ge||t[225]!==Je||t[226]!==Xe||t[227]!==Ie||t[228]!==et||t[229]!==De||t[230]!==tt||t[231]!==Ae||t[232]!==ot||t[233]!==Ve||t[234]!==Tt||t[235]!==wt||t[236]!==kt||t[237]!==Ot||t[238]!==Mt||t[239]!==_t?(Eo={analytics:de,api:pe,audit:Pe,authConfig:Re,authSessions:Se,containers:Ne,dashboards:Ee,data:Te,drains:we,export:ke,fanout:Oe,files:Me,flags:ze,functions:_e,health:We,home:Ze,insights:qe,logs:Ge,metrics:Ke,migrations:Qe,organizations:at,pitr:Ye,mail:ge,payments:Je,permissions:Xe,queues:Ie,realtime:et,rls:De,schedule:tt,schema:Ae,security:ot,settings:Ve,sql:Tt,kv:wt,storageRules:kt,users:Ot,vectors:Mt,workflows:_t},t[202]=de,t[203]=pe,t[204]=Pe,t[205]=Re,t[206]=Se,t[207]=Ne,t[208]=Ee,t[209]=Te,t[210]=we,t[211]=ke,t[212]=Oe,t[213]=Me,t[214]=ze,t[215]=_e,t[216]=We,t[217]=Ze,t[218]=qe,t[219]=Ge,t[220]=Ke,t[221]=Qe,t[222]=at,t[223]=Ye,t[224]=ge,t[225]=Je,t[226]=Xe,t[227]=Ie,t[228]=et,t[229]=De,t[230]=tt,t[231]=Ae,t[232]=ot,t[233]=Ve,t[234]=Tt,t[235]=wt,t[236]=kt,t[237]=Ot,t[238]=Mt,t[239]=_t,t[240]=Eo):Eo=t[240];let fi=Eo,To;t[241]!==o?(To=a(it=>{$e(o({to:`/${it.currentTarget.dataset.tab??""}`}))},"t83"),t[241]=o,t[242]=To):To=t[242];let mi=To,wo,ko;t[243]!==n||t[244]!==se?(wo=a(()=>{typeof document<"u"&&(document.title=`${se[n]} \xB7 lunora`)},"t84"),ko=[n,se],t[243]=n,t[244]=se,t[245]=wo,t[246]=ko):(wo=t[245],ko=t[246]),(0,q.useEffect)(wo,ko);let gi=u.find(it=>it.tabs.includes(n))??Ya[0],Ls=u.flatMap(it=>it.tabs.map(Lo=>({group:Fe[it.key],label:se[Lo],to:`/${Lo}`}))),It=(0,q.use)(di),hi=It!==null&&It.token!=="",Oo;t[247]!==Ls?(Oo=(0,i.jsxDEV)(qa,{items:Ls},void 0,!1),t[247]=Ls,t[248]=Oo):Oo=t[248];let Mo;t[249]===Symbol.for("react.memo_cache_sentinel")?(Mo=(0,i.jsxDEV)(zl,{className:"-ms-1"},void 0,!1),t[249]=Mo):Mo=t[249];let Dt;t[250]!==e?(Dt=e("Breadcrumb"),t[250]=e,t[251]=Dt):Dt=t[251];let Fs=Fe[gi.key],At;t[252]!==Fs?(At=(0,i.jsxDEV)("span",{className:"text-muted-foreground",children:Fs},void 0,!1),t[252]=Fs,t[253]=At):At=t[253];let _o;t[254]===Symbol.for("react.memo_cache_sentinel")?(_o=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5 text-muted-foreground/60",fill:"none",stroke:"currentColor",strokeWidth:1.7,viewBox:"0 0 24 24",children:(0,i.jsxDEV)("path",{d:"m9 6 6 6-6 6",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1)},void 0,!1),t[254]=_o):_o=t[254];let Hs=se[n],Vt;t[255]!==Hs?(Vt=(0,i.jsxDEV)("span",{className:"font-medium text-foreground",children:Hs},void 0,!1),t[255]=Hs,t[256]=Vt):Vt=t[256];let Bt;t[257]!==Dt||t[258]!==At||t[259]!==Vt?(Bt=(0,i.jsxDEV)("nav",{"aria-label":Dt,className:"flex items-center gap-1.5 text-[13px]",children:[At,_o,Vt]},void 0,!0),t[257]=Dt,t[258]=At,t[259]=Vt,t[260]=Bt):Bt=t[260];let Io;t[261]===Symbol.for("react.memo_cache_sentinel")?(Io=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,i.jsxDEV)("circle",{cx:"11",cy:"11",r:"7"},void 0,!1),(0,i.jsxDEV)("path",{d:"m21 21-4.3-4.3",strokeLinecap:"round"},void 0,!1)]},void 0,!0),t[261]=Io):Io=t[261];let Lt;t[262]!==e?(Lt=e("Search\u2026"),t[262]=e,t[263]=Lt):Lt=t[263];let Do;t[264]===Symbol.for("react.memo_cache_sentinel")?(Do=(0,i.jsxDEV)("kbd",{className:"ms-auto rounded border border-border bg-background px-1 font-sans text-[10px] text-muted-foreground",children:"\u2318K"},void 0,!1),t[264]=Do):Do=t[264];let Ft;t[265]!==Lt?(Ft=(0,i.jsxDEV)("button",{className:"mx-auto hidden h-8 w-72 items-center gap-2 rounded-lg border border-border bg-muted/40 px-3 text-xs text-muted-foreground transition-colors hover:bg-muted md:flex","data-testid":"dash-app-search",onClick:Za,type:"button",children:[Io,Lt,Do]},void 0,!0),t[265]=Lt,t[266]=Ft):Ft=t[266];let Ao;t[267]===Symbol.for("react.memo_cache_sentinel")?(Ao=(0,i.jsxDEV)("div",{className:"ms-auto flex items-center gap-1.5 md:ms-0",children:(0,i.jsxDEV)(Tl,{},void 0,!1)},void 0,!1),t[267]=Ao):Ao=t[267];let Ht;t[268]!==Bt||t[269]!==Ft?(Ht=(0,i.jsxDEV)("header",{className:"flex h-11 shrink-0 items-center gap-2 border-b border-border px-4","data-testid":"dash-app-header",children:[Mo,Bt,Ft,Ao]},void 0,!0),t[268]=Bt,t[269]=Ft,t[270]=Ht):Ht=t[270];let $t;t[271]!==It?.rulesInstalled?($t=It?.rulesInstalled===!1&&(0,i.jsxDEV)(Cl,{},void 0,!1),t[271]=It?.rulesInstalled,t[272]=$t):$t=t[272];let $s=`dash-tab-${n}`,js=d?"flex min-w-0 flex-1 flex-col overflow-hidden":"min-w-0 flex-1 overflow-auto p-6",Us=se[n],jt;t[273]!==e||t[274]!==Us?(jt=e("{title} failed",{title:Us}),t[273]=e,t[274]=Us,t[275]=jt):jt=t[275];let zs=se[n],Ut;t[276]!==e?(Ut=e("Try again"),t[276]=e,t[277]=Ut):Ut=t[277];let Vo;t[278]===Symbol.for("react.memo_cache_sentinel")?(Vo=(0,i.jsxDEV)(q.Suspense,{fallback:(0,i.jsxDEV)(ui,{},void 0,!1),children:(0,i.jsxDEV)(Wr,{},void 0,!1)},void 0,!1),t[278]=Vo):Vo=t[278];let zt;t[279]!==n||t[280]!==jt||t[281]!==zs||t[282]!==Ut?(zt=(0,i.jsxDEV)(ds,{fallbackTitle:jt,label:zs,retryLabel:Ut,children:Vo},n,!1),t[279]=n,t[280]=jt,t[281]=zs,t[282]=Ut,t[283]=zt):zt=t[283];let Wt;t[284]!==js||t[285]!==zt?(Wt=(0,i.jsxDEV)("div",{className:js,children:zt},void 0,!1),t[284]=js,t[285]=zt,t[286]=Wt):Wt=t[286];let Zt;t[287]!==$s||t[288]!==Wt?(Zt=(0,i.jsxDEV)("div",{"aria-labelledby":$s,className:"flex min-w-0 flex-1 flex-col overflow-hidden","data-testid":"dash-panel",id:"dash-panel",role:"tabpanel",children:Wt},void 0,!1),t[287]=$s,t[288]=Wt,t[289]=Zt):Zt=t[289];let Bo;return t[290]!==Ht||t[291]!==$t||t[292]!==Zt?(Bo=(0,i.jsxDEV)(Wl,{className:"overflow-hidden md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",children:[Ht,$t,Zt]},void 0,!0),t[290]=Ht,t[291]=$t,t[292]=Zt,t[293]=Bo):Bo=t[293],(0,i.jsxDEV)(jl,{className:"min-h-0 flex-1","data-testid":"lunora-studio",children:[Oo,(0,i.jsxDEV)(Wc,{chrome:It,connected:hi,current:n,groupLabel:Fe,groups:u,selectTab:mi,tabDescription:fi,tabLabel:se},void 0,!1),Bo]},void 0,!0)},"StudioLayout"),qc=a(t=>{let e=(0,B.c)(5),{initialShardKey:o,schemaEditable:s}=t,r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];let n=Ur(r),{table:l}=n,d=typeof l=="string"?l:void 0,p;return e[1]!==o||e[2]!==d||e[3]!==s?(p=(0,i.jsxDEV)(Oc,{initialShardKey:o,initialTable:d,schemaEditable:s},void 0,!1),e[1]=o,e[2]=d,e[3]=s,e[4]=p):p=e[4],p},"SchemaRoutePanel"),Gc=a(()=>{let t=(0,B.c)(3),e=ft(),o,s;return t[0]!==e?(o=a(()=>{$e(e({replace:!0,to:"/home"}))},"t0"),s=[e],t[0]=e,t[1]=o,t[2]=s):(o=t[1],s=t[2]),(0,q.useEffect)(o,s),null},"NotFoundRedirect"),Kc=a(({basePath:t,dataEditable:e=!1,functions:o,initialShardKey:s,openApiSpec:r,openRpcSpec:n,runAsIdentity:l=!1,schemaEditable:d=!1,scheduledCancel:p,scheduledCron:c,scheduledLoad:u})=>{let g=zr({component:Zc}),m={analytics:(0,i.jsxDEV)(oc,{},void 0,!1),api:(0,i.jsxDEV)(sc,{functions:o,initialShardKey:s,openApiSpec:r,openRpcSpec:n},void 0,!1),audit:(0,i.jsxDEV)(hc,{initialShardKey:s},void 0,!1),authConfig:(0,i.jsxDEV)(rc,{},void 0,!1),authSessions:(0,i.jsxDEV)(nc,{},void 0,!1),containers:(0,i.jsxDEV)(lc,{},void 0,!1),dashboards:(0,i.jsxDEV)(Ec,{initialShardKey:s},void 0,!1),data:(0,i.jsxDEV)(cc,{editable:e,initialShardKey:s},void 0,!1),drains:(0,i.jsxDEV)(vc,{},void 0,!1),export:(0,i.jsxDEV)(dc,{initialShardKey:s},void 0,!1),fanout:(0,i.jsxDEV)(Tc,{initialShardKey:s},void 0,!1),files:(0,i.jsxDEV)(Ic,{},void 0,!1),kv:(0,i.jsxDEV)(Pc,{},void 0,!1),flags:(0,i.jsxDEV)(fc,{initialShardKey:s},void 0,!1),functions:(0,i.jsxDEV)("div",{className:"flex flex-col gap-8",children:[(0,i.jsxDEV)(gc,{functions:o,initialShardKey:s},void 0,!1),(0,i.jsxDEV)(mc,{functions:o,runAsIdentity:l},void 0,!1)]},void 0,!0),health:(0,i.jsxDEV)(wc,{initialShardKey:s},void 0,!1),home:(0,i.jsxDEV)(ja,{initialShardKey:s},void 0,!1),insights:(0,i.jsxDEV)(Xl,{initialShardKey:s},void 0,!1),logs:(0,i.jsxDEV)(xc,{initialShardKey:s},void 0,!1),metrics:(0,i.jsxDEV)(kc,{initialShardKey:s},void 0,!1),migrations:(0,i.jsxDEV)(pc,{initialShardKey:s},void 0,!1),organizations:(0,i.jsxDEV)(ac,{},void 0,!1),permissions:(0,i.jsxDEV)(Sc,{functions:o,runAsIdentity:l,schemaEditable:d},void 0,!1),pitr:(0,i.jsxDEV)(uc,{initialShardKey:s},void 0,!1),mail:(0,i.jsxDEV)(bc,{},void 0,!1),payments:(0,i.jsxDEV)(Rc,{},void 0,!1),queues:(0,i.jsxDEV)(Nc,{},void 0,!1),realtime:(0,i.jsxDEV)(Cc,{initialShardKey:s},void 0,!1),rls:(0,i.jsxDEV)(ec,{},void 0,!1),schedule:(0,i.jsxDEV)(yc,{loadCronJobs:c,scheduledCancel:p,scheduledLoad:u},void 0,!1),schema:(0,i.jsxDEV)(qc,{initialShardKey:s,schemaEditable:d},void 0,!1),security:(0,i.jsxDEV)(tc,{},void 0,!1),settings:(0,i.jsxDEV)(Mc,{initialShardKey:s},void 0,!1),sql:(0,i.jsxDEV)(_c,{initialShardKey:s},void 0,!1),storageRules:(0,i.jsxDEV)(Dc,{},void 0,!1),users:(0,i.jsxDEV)(ic,{},void 0,!1),vectors:(0,i.jsxDEV)(Ac,{},void 0,!1),workflows:(0,i.jsxDEV)(Vc,{},void 0,!1)},h=Ho({component:a(()=>m.home,"component"),getParentRoute:a(()=>g,"getParentRoute"),path:"/"}),f=pi.map(b=>b==="data"?Ho({component:a(()=>m[b],"component"),getParentRoute:a(()=>g,"getParentRoute"),path:`/${b}`,validateSearch:Hn}):Ho({component:a(()=>m[b],"component"),getParentRoute:a(()=>g,"getParentRoute"),path:`/${b}`})),v=g.addChildren([h,...f]),x="window"in globalThis?$r():jr({initialEntries:["/home"]});return Zr({...t===void 0||t==="/"?{}:{basepath:t},defaultNotFoundComponent:Gc,defaultPendingComponent:ui,defaultPendingMinMs:0,defaultPendingMs:0,history:x,routeTree:v})},"buildRouter"),Qc=a(t=>{let e=(0,B.c)(17),{basePath:o,chrome:s,dataEditable:r,functions:n,initialShardKey:l,openApiSpec:d,openRpcSpec:p,runAsIdentity:c,schemaEditable:u,scheduledCancel:g,scheduledCron:m,scheduledLoad:h}=t,f;e[0]!==o||e[1]!==r||e[2]!==n||e[3]!==l||e[4]!==d||e[5]!==p||e[6]!==c||e[7]!==g||e[8]!==m||e[9]!==h||e[10]!==u?(f=Kc({basePath:o,dataEditable:r,functions:n,initialShardKey:l,openApiSpec:d,openRpcSpec:p,runAsIdentity:c,schemaEditable:u,scheduledCancel:g,scheduledCron:m,scheduledLoad:h}),e[0]=o,e[1]=r,e[2]=n,e[3]=l,e[4]=d,e[5]=p,e[6]=c,e[7]=g,e[8]=m,e[9]=h,e[10]=u,e[11]=f):f=e[11];let v=f,x=s??null,b;e[12]!==v?(b=(0,i.jsxDEV)(qr,{router:v},void 0,!1),e[12]=v,e[13]=b):b=e[13];let C;return e[14]!==x||e[15]!==b?(C=(0,i.jsxDEV)(di,{value:x,children:b},void 0,!1),e[14]=x,e[15]=b,e[16]=C):C=e[16],C},"StudioShell"),E0=a(t=>{let e=(0,B.c)(17),{basePath:o,chrome:s,dataEditable:r,functions:n,i18n:l,initialShardKey:d,locale:p,openApiSpec:c,openRpcSpec:u,runAsIdentity:g,schemaEditable:m,scheduledCancel:h,scheduledCron:f,scheduledLoad:v}=t,x;e[0]!==o||e[1]!==s||e[2]!==r||e[3]!==n||e[4]!==d||e[5]!==c||e[6]!==u||e[7]!==g||e[8]!==h||e[9]!==f||e[10]!==v||e[11]!==m?(x=(0,i.jsxDEV)(Qc,{basePath:o,chrome:s,dataEditable:r,functions:n,initialShardKey:d,openApiSpec:c,openRpcSpec:u,runAsIdentity:g,scheduledCancel:h,scheduledCron:f,scheduledLoad:v,schemaEditable:m},void 0,!1),e[0]=o,e[1]=s,e[2]=r,e[3]=n,e[4]=d,e[5]=c,e[6]=u,e[7]=g,e[8]=h,e[9]=f,e[10]=v,e[11]=m,e[12]=x):x=e[12];let b=x;if(l===void 0&&p===void 0)return b;let C;return e[13]!==l||e[14]!==p||e[15]!==b?(C=(0,i.jsxDEV)(Wa,{i18n:l,locale:p,children:b},void 0,!1),e[13]=l,e[14]=p,e[15]=b,e[16]=C):C=e[16],C},"Studio");function Yc(t){return t.location.pathname}a(Yc,"_temp");function Jc(t){return t.tabs.length>0}a(Jc,"_temp2");export{ds as a,Wa as b,S0 as c,ml as d,N0 as e,xl as f,kl as g,_l as h,Il as i,Dl as j,E0 as k};
3
+ `)},"buildAgentPrompt"),Ki=1500,Qi=a(()=>{let t=(0,Ce.c)(35),e=ae(),o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=Vn(),t[0]=o):o=t[0];let s=o,[r,n]=(0,Ue.useState)(null),l,d;t[1]!==r?(l=a(()=>{if(r===null)return;let O=globalThis.setTimeout(()=>{n(null)},Ki);return()=>{globalThis.clearTimeout(O)}},"t1"),d=[r],t[1]=r,t[2]=l,t[3]=d):(l=t[2],d=t[3]),(0,Ue.useEffect)(l,d);let p;t[4]===Symbol.for("react.memo_cache_sentinel")?(p=a((O,V)=>{Bn(V)&&n(O)},"t3"),t[4]=p):p=t[4];let c=p,u;t[5]===Symbol.for("react.memo_cache_sentinel")?(u=a(()=>{c("config",qi(s))},"t4"),t[5]=u):u=t[5];let g=u,m;t[6]===Symbol.for("react.memo_cache_sentinel")?(m=a(()=>{c("prompt",Gi(s))},"t5"),t[6]=m):m=t[6];let h=m,f;t[7]!==e?(f=e("Connect an AI agent"),t[7]=e,t[8]=f):f=t[8];let v;t[9]!==f?(v=(0,y.jsxDEV)("span",{className:"text-sm font-medium text-foreground",children:f},void 0,!1),t[9]=f,t[10]=v):v=t[10];let x;t[11]!==e?(x=e("Drive this deployment from an AI agent over the Model Context Protocol \u2014 it can list functions and tables, read schemas, and run read-only queries. Writes stay off unless you opt in."),t[11]=e,t[12]=x):x=t[12];let b;t[13]!==x?(b=(0,y.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:x},void 0,!1),t[13]=x,t[14]=b):b=t[14];let C;t[15]!==v||t[16]!==b?(C=(0,y.jsxDEV)("div",{className:"flex flex-col gap-1.5 p-4",children:[v,b]},void 0,!0),t[15]=v,t[16]=b,t[17]=C):C=t[17];let P;t[18]===Symbol.for("react.memo_cache_sentinel")?(P=(0,y.jsxDEV)("code",{className:"font-mono text-xs text-muted-foreground","data-testid":"home-connect-agent-command",children:"npx -y @lunora/mcp"},void 0,!1),t[18]=P):P=t[18];let N;t[19]!==r||t[20]!==e?(N=e(r==="config"?"Copied":"Copy MCP config"),t[19]=r,t[20]=e,t[21]=N):N=t[21];let R;t[22]!==N?(R=(0,y.jsxDEV)(ao,{"data-testid":"home-connect-agent-copy-config",onClick:g,size:"xs",variant:"outline",children:N},void 0,!1),t[22]=N,t[23]=R):R=t[23];let E;t[24]!==r||t[25]!==e?(E=e(r==="prompt"?"Copied":"Copy agent prompt"),t[24]=r,t[25]=e,t[26]=E):E=t[26];let T;t[27]!==E?(T=(0,y.jsxDEV)(ao,{"data-testid":"home-connect-agent-copy-prompt",onClick:h,size:"xs",variant:"outline",children:E},void 0,!1),t[27]=E,t[28]=T):T=t[28];let k;t[29]!==R||t[30]!==T?(k=(0,y.jsxDEV)("div",{className:"flex flex-col gap-3 border-t border-border bg-muted/50 px-4 py-3",children:[P,(0,y.jsxDEV)("div",{className:"flex flex-wrap gap-2",children:[R,T]},void 0,!0)]},void 0,!0),t[29]=R,t[30]=T,t[31]=k):k=t[31];let w;return t[32]!==C||t[33]!==k?(w=(0,y.jsxDEV)(ct,{className:"gap-0 py-0","data-testid":"home-connect-agent",children:[C,k]},void 0,!0),t[32]=C,t[33]=k,t[34]=w):w=t[34],w},"ConnectAgentCard"),Yi=(0,Ue.lazy)(()=>import("./chunk-34B5ECBI.js").then(t=>({default:t.Sparkline}))),Ir=a(t=>{if(t<1e3)return`${String(Math.round(t))}ms`;let e=t>=1e4?0:1;return`${(t/1e3).toFixed(e)}s`},"formatMs"),Ji=a((t,e)=>{let o=Math.max(0,Math.round((e-t)/1e3));if(o<60)return`${String(o)}s ago`;let s=Math.round(o/60);if(s<60)return`${String(s)}m ago`;let r=Math.round(s/60);return r<24?`${String(r)}h ago`:`${String(Math.round(r/24))}d ago`},"relativeTime"),La=a((t,e)=>{if(t===void 0||t.length===0)return[];let o=new Map;for(let s of t)o.set(s.bucketMs,(o.get(s.bucketMs)??0)+s[e]);return[...o.entries()].toSorted(([s],[r])=>s-r).map(([,s])=>s)},"bucketSeries"),Fa=a((t,e=!0)=>{if(t.length<4)return null;let o=Math.floor(t.length/2),s=t.slice(0,o).reduce((l,d)=>l+d,0),r=t.slice(o).reduce((l,d)=>l+d,0);if(s===0)return null;let n=(r-s)/s*100;return{positive:e?n>=0:n<=0,text:`${n>=0?"+":""}${n.toFixed(1)}%`}},"seriesDelta"),Vs=a(t=>{let e=(0,Ce.c)(24),{delta:o,footer:s,label:r,trend:n,unit:l,value:d}=t,p=ae(),c;e[0]!==r?(c=(0,y.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:r},void 0,!1),e[0]=r,e[1]=c):c=e[1];let u;e[2]!==d?(u=(0,y.jsxDEV)("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:d},void 0,!1),e[2]=d,e[3]=u):u=e[3];let g;e[4]!==l?(g=l!==void 0&&(0,y.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:l},void 0,!1),e[4]=l,e[5]=g):g=e[5];let m;e[6]!==u||e[7]!==g?(m=(0,y.jsxDEV)("span",{className:"flex items-baseline gap-1.5",children:[u,g]},void 0,!0),e[6]=u,e[7]=g,e[8]=m):m=e[8];let h;e[9]!==n?(h=n!==void 0&&(0,y.jsxDEV)(Ue.Suspense,{fallback:(0,y.jsxDEV)("div",{"aria-hidden":"true",className:"h-8 w-28"},void 0,!1),children:(0,y.jsxDEV)(Yi,{data:n},void 0,!1)},void 0,!1),e[9]=n,e[10]=h):h=e[10];let f;e[11]!==m||e[12]!==h?(f=(0,y.jsxDEV)("div",{className:"flex items-center justify-between gap-3",children:[m,h]},void 0,!0),e[11]=m,e[12]=h,e[13]=f):f=e[13];let v;e[14]!==c||e[15]!==f?(v=(0,y.jsxDEV)("div",{className:"flex flex-col gap-2.5 p-4",children:[c,f]},void 0,!0),e[14]=c,e[15]=f,e[16]=v):v=e[16];let x;e[17]!==o||e[18]!==s||e[19]!==p?(x=o==null?s!=null&&(0,y.jsxDEV)("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5 text-[11px] text-muted-foreground",children:s},void 0,!1):(0,y.jsxDEV)("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5 text-[11px]",children:[(0,y.jsxDEV)("span",{className:z("font-semibold",o.positive?"text-success":"text-destructive"),children:o.text},void 0,!1)," ",(0,y.jsxDEV)("span",{className:"text-muted-foreground",children:p("vs. prev.")},void 0,!1)]},void 0,!0),e[17]=o,e[18]=s,e[19]=p,e[20]=x):x=e[20];let b;return e[21]!==v||e[22]!==x?(b=(0,y.jsxDEV)(ct,{className:"justify-between gap-0 py-0",children:[v,x]},void 0,!0),e[21]=v,e[22]=x,e[23]=b):b=e[23],b},"StatCard"),Xi=a(()=>{let t=(0,Ce.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,y.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:(0,y.jsxDEV)("path",{d:"m9 6 6 6-6 6"},void 0,!1)},void 0,!1),t[0]=e):e=t[0],e},"ChevronRight"),_r=a(t=>{let e=(0,Ce.c)(7),{command:o,label:s}=t,r;e[0]!==s?(r=(0,y.jsxDEV)("div",{className:"p-4",children:(0,y.jsxDEV)("span",{className:"text-sm font-medium text-foreground",children:s},void 0,!1)},void 0,!1),e[0]=s,e[1]=r):r=e[1];let n;e[2]!==o?(n=(0,y.jsxDEV)("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5",children:(0,y.jsxDEV)("code",{className:"font-mono text-xs text-muted-foreground",children:o},void 0,!1)},void 0,!1),e[2]=o,e[3]=n):n=e[3];let l;return e[4]!==r||e[5]!==n?(l=(0,y.jsxDEV)(ct,{className:"justify-between gap-0 py-0",children:[r,n]},void 0,!0),e[4]=r,e[5]=n,e[6]=l):l=e[6],l},"ConnectCard"),Ha=a(t=>{let e=(0,Ce.c)(18),{count:o,onView:s,testId:r,title:n}=t,l=ae(),d;e[0]!==n?(d=(0,y.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:n},void 0,!1),e[0]=n,e[1]=d):d=e[1];let p;e[2]!==o||e[3]!==l?(p=o===null?(0,y.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:l("No data yet")},void 0,!1):(0,y.jsxDEV)(ho,{variant:o>0?"destructive":"success",children:o>0?o:l("All clear")},void 0,!1),e[2]=o,e[3]=l,e[4]=p):p=e[4];let c;e[5]!==d||e[6]!==p?(c=(0,y.jsxDEV)("div",{className:"flex items-start justify-between gap-2 p-4",children:[d,p]},void 0,!0),e[5]=d,e[6]=p,e[7]=c):c=e[7];let u;e[8]!==l?(u=l("View"),e[8]=l,e[9]=u):u=e[9];let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=(0,y.jsxDEV)(Xi,{},void 0,!1),e[10]=g):g=e[10];let m;e[11]!==s||e[12]!==u?(m=(0,y.jsxDEV)("button",{className:"flex items-center gap-1 border-t border-border bg-muted/50 px-4 py-2.5 text-[12px] font-medium text-foreground outline-none transition-colors hover:bg-muted focus-visible:bg-muted",onClick:s,type:"button",children:[u,g]},void 0,!0),e[11]=s,e[12]=u,e[13]=m):m=e[13];let h;return e[14]!==c||e[15]!==m||e[16]!==r?(h=(0,y.jsxDEV)(ct,{className:"justify-between gap-0 py-0","data-testid":r,children:[c,m]},void 0,!0),e[14]=c,e[15]=m,e[16]=r,e[17]=h):h=e[17],h},"AdvisorCard"),el=a(t=>{let e=(0,Ce.c)(7),{functions:o}=t,s=ae(),r;if(e[0]!==o||e[1]!==s){let n=[...o].toSorted(rl).slice(0,5),l;e[3]!==s?(l=s("Top functions"),e[3]=s,e[4]=l):l=e[4];let d;e[5]!==l?(d=(0,y.jsxDEV)("div",{className:"border-b border-border px-4 py-3",children:(0,y.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:l},void 0,!1)},void 0,!1),e[5]=l,e[6]=d):d=e[6],r=(0,y.jsxDEV)(ct,{className:"gap-0 py-0","data-testid":"home-top-functions",children:[d,n.length===0?(0,y.jsxDEV)("p",{className:"px-4 py-8 text-center text-xs text-muted-foreground",children:s("No functions called yet.")},void 0,!1):(0,y.jsxDEV)("div",{className:"divide-y divide-border",children:[(0,y.jsxDEV)("div",{className:"grid grid-cols-[1fr_auto_auto_auto] gap-4 px-4 py-1.5 font-mono text-[10px] tracking-wide text-muted-foreground uppercase",children:[(0,y.jsxDEV)("span",{children:s("Function")},void 0,!1),(0,y.jsxDEV)("span",{className:"text-end",children:s("Calls")},void 0,!1),(0,y.jsxDEV)("span",{className:"w-12 text-end",children:s("Avg")},void 0,!1),(0,y.jsxDEV)("span",{className:"w-8 text-end",children:s("Err")},void 0,!1)]},void 0,!0),n.map(nl)]},void 0,!0)]},void 0,!0),e[0]=o,e[1]=s,e[2]=r}else r=e[2];return r},"TopFunctionsCard"),tl=a(t=>{let e=(0,Ce.c)(26),{subs:o}=t,s=ae(),r;e[0]!==s?(r=s("Live connections"),e[0]=s,e[1]=r):r=e[1];let n;e[2]!==r?(n=(0,y.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:r},void 0,!1),e[2]=r,e[3]=n):n=e[3];let l=o?.totalConnections??0,d;e[4]!==l?(d=l.toLocaleString(),e[4]=l,e[5]=d):d=e[5];let p;e[6]!==d?(p=(0,y.jsxDEV)("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:d},void 0,!1),e[6]=d,e[7]=p):p=e[7];let c;e[8]!==s?(c=s("sockets"),e[8]=s,e[9]=c):c=e[9];let u;e[10]!==c?(u=(0,y.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:c},void 0,!1),e[10]=c,e[11]=u):u=e[11];let g;e[12]!==p||e[13]!==u?(g=(0,y.jsxDEV)("span",{className:"flex items-baseline gap-1.5",children:[p,u]},void 0,!0),e[12]=p,e[13]=u,e[14]=g):g=e[14];let m=o?.totalSubscriptions??0,h;e[15]!==m?(h=m.toLocaleString(),e[15]=m,e[16]=h):h=e[16];let f;e[17]!==s?(f=s("active subscriptions"),e[17]=s,e[18]=f):f=e[18];let v;e[19]!==h||e[20]!==f?(v=(0,y.jsxDEV)("span",{className:"text-[11px] text-muted-foreground",children:[h," ",f]},void 0,!0),e[19]=h,e[20]=f,e[21]=v):v=e[21];let x;return e[22]!==v||e[23]!==n||e[24]!==g?(x=(0,y.jsxDEV)(ct,{"data-testid":"home-live-connections",children:(0,y.jsxDEV)(Ys,{className:"flex flex-col gap-2.5 py-4",children:[n,g,v]},void 0,!0)},void 0,!1),e[22]=v,e[23]=n,e[24]=g,e[25]=x):x=e[25],x},"LiveConnectionsCard"),ol=a(t=>{let e=(0,Ce.c)(7),{entries:o}=t,s=ae(),r;if(e[0]!==o||e[1]!==s){let n=Date.now(),l;e[3]!==s?(l=s("Recent activity"),e[3]=s,e[4]=l):l=e[4];let d;e[5]!==l?(d=(0,y.jsxDEV)("div",{className:"border-b border-border px-4 py-3",children:(0,y.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:l},void 0,!1)},void 0,!1),e[5]=l,e[6]=d):d=e[6],r=(0,y.jsxDEV)(ct,{className:"gap-0 py-0","data-testid":"home-recent-activity",children:[d,o.length===0?(0,y.jsxDEV)("p",{className:"px-4 py-8 text-center text-xs text-muted-foreground",children:s("No recent activity.")},void 0,!1):(0,y.jsxDEV)("ul",{className:"divide-y divide-border",children:o.slice(0,5).map(p=>(0,y.jsxDEV)("li",{className:"flex items-center justify-between gap-3 px-4 py-2 text-[13px]",children:[(0,y.jsxDEV)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,y.jsxDEV)("span",{"aria-hidden":"true",className:"size-1.5 shrink-0 rounded-full bg-muted-foreground/40"},void 0,!1),(0,y.jsxDEV)("span",{className:"truncate text-foreground",children:[p.op,p.table!==void 0&&(0,y.jsxDEV)("span",{className:"text-muted-foreground",children:[" \xB7 ",p.table,p.id===void 0?"":`#${p.id}`]},void 0,!0)]},void 0,!0)]},void 0,!0),(0,y.jsxDEV)("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:Ji(p.ts,n)},void 0,!1)]},p.seq,!0))},void 0,!1)]},void 0,!0),e[0]=o,e[1]=s,e[2]=r}else r=e[2];return r},"RecentActivityCard"),sl=a(t=>{let e=t.reduce((o,s)=>o+s.calls,0);return e===0?null:t.reduce((o,s)=>o+s.totalDurationMs,0)/e},"averageLatencyMs"),ja=a(t=>{let e=(0,Ce.c)(151),{initialShardKey:o}=t,s=ae(),r=ft(),n=o??"",l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={},e[0]=l):l=e[0];let d;e[1]!==n?(d={shardKey:n},e[1]=n,e[2]=d):d=e[2];let p=io(St.getMetrics,l,d),c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c={},e[3]=c):c=e[3];let u;e[4]!==n?(u={shardKey:n},e[4]=n,e[5]=u):u=e[5];let g=io(St.getFunctionStats,c,u),m,h;e[6]===Symbol.for("react.memo_cache_sentinel")?(m={},h={shardKey:""},e[6]=m,e[7]=h):(m=e[6],h=e[7]);let f=io(St.getSecurityAudit,m,h),v;e[8]===Symbol.for("react.memo_cache_sentinel")?(v={},e[8]=v):v=e[8];let x;e[9]!==n?(x={shardKey:n},e[9]=n,e[10]=x):x=e[10];let b=io(St.listSubscriptions,v,x),C;e[11]===Symbol.for("react.memo_cache_sentinel")?(C={},e[11]=C):C=e[11];let P;e[12]!==n?(P={shardKey:n},e[12]=n,e[13]=P):P=e[13];let N=io(St.getAuditLog,C,P),R=p.data??null,E,T,k,w,O,V,W,D,H,$,Z,K,I,_,U,te,re,ne;if(e[14]!==N.data||e[15]!==f.data||e[16]!==R||e[17]!==p.data||e[18]!==r||e[19]!==g.data||e[20]!==b.data||e[21]!==s){w=Array.isArray(g.data?.functions)?g.data.functions:[],W=b.data??null;let Ze;e[40]!==N.data?(Ze=Array.isArray(N.data?.entries)?N.data.entries:[],e[40]=N.data,e[41]=Ze):Ze=e[41],T=Ze,O=p.data===void 0||g.data===void 0?null:Fn(R,w).length,V=Array.isArray(f.data?.findings)?f.data.findings.length:null;let qe;e[42]!==r?(qe=a(()=>{$e(r({to:"/security"}))},"t212"),e[42]=r,e[43]=qe):qe=e[43],ne=qe;let Ge;e[44]!==r?(Ge=a(()=>{$e(r({to:"/insights"}))},"t222"),e[44]=r,e[45]=Ge):Ge=e[45],re=Ge;let Ke=La(R?.history,"calls"),Qe=La(R?.history,"errors"),at=sl(w),Ye=Math.max(0,...w.map(al)),ge=R?.cache,Je;e[46]!==ge?(Je=ge!=null&&ge.hits+ge.misses>0?Math.round(ge.hits/(ge.hits+ge.misses)*100):null,e[46]=ge,e[47]=Je):Je=e[47],k=Je,U="flex flex-col gap-6",te="lunora-home",Z="grid gap-3 sm:grid-cols-2 xl:grid-cols-4",K="home-health";let Xe=Fa(Ke),Ie;e[48]!==s?(Ie=s("Requests"),e[48]=s,e[49]=Ie):Ie=e[49];let et=R?.requests??0,De;e[50]!==et?(De=et.toLocaleString(),e[50]=et,e[51]=De):De=e[51],e[52]!==Ke||e[53]!==Xe||e[54]!==Ie||e[55]!==De?(I=(0,y.jsxDEV)(Vs,{delta:Xe,label:Ie,trend:Ke,value:De},void 0,!1),e[52]=Ke,e[53]=Xe,e[54]=Ie,e[55]=De,e[56]=I):I=e[56];let tt=Fa(Qe,!1),Ae;e[57]!==s?(Ae=s("Errors"),e[57]=s,e[58]=Ae):Ae=e[58];let ot=R?.errors??0,Ve;e[59]!==ot?(Ve=ot.toLocaleString(),e[59]=ot,e[60]=Ve):Ve=e[60],e[61]!==Qe||e[62]!==tt||e[63]!==Ae||e[64]!==Ve?(_=(0,y.jsxDEV)(Vs,{delta:tt,label:Ae,trend:Qe,value:Ve},void 0,!1),e[61]=Qe,e[62]=tt,e[63]=Ae,e[64]=Ve,e[65]=_):_=e[65],E=Vs,e[66]!==Ye||e[67]!==s?(D=Ye>0?`${s("max")} ${Ir(Ye)}`:void 0,e[66]=Ye,e[67]=s,e[68]=D):D=e[68],e[69]!==s?(H=s("Avg latency"),e[69]=s,e[70]=H):H=e[70],$=at===null?"\u2014":Ir(at),e[14]=N.data,e[15]=f.data,e[16]=R,e[17]=p.data,e[18]=r,e[19]=g.data,e[20]=b.data,e[21]=s,e[22]=E,e[23]=T,e[24]=k,e[25]=w,e[26]=O,e[27]=V,e[28]=W,e[29]=D,e[30]=H,e[31]=$,e[32]=Z,e[33]=K,e[34]=I,e[35]=_,e[36]=U,e[37]=te,e[38]=re,e[39]=ne}else E=e[22],T=e[23],k=e[24],w=e[25],O=e[26],V=e[27],W=e[28],D=e[29],H=e[30],$=e[31],Z=e[32],K=e[33],I=e[34],_=e[35],U=e[36],te=e[37],re=e[38],ne=e[39];let J;e[71]!==E||e[72]!==D||e[73]!==H||e[74]!==$?(J=(0,y.jsxDEV)(E,{footer:D,label:H,value:$},void 0,!1),e[71]=E,e[72]=D,e[73]=H,e[74]=$,e[75]=J):J=e[75];let ee;e[76]!==k||e[77]!==s?(ee=k===null?void 0:`${String(k)}% ${s("cache hit")}`,e[76]=k,e[77]=s,e[78]=ee):ee=e[78];let ie;e[79]!==s?(ie=s("Database size"),e[79]=s,e[80]=ie):ie=e[80];let Be=R?.databaseSize??null,me;e[81]!==Be?(me=Ln(Be),e[81]=Be,e[82]=me):me=e[82];let he;e[83]!==ee||e[84]!==ie||e[85]!==me?(he=(0,y.jsxDEV)(Vs,{footer:ee,label:ie,value:me},void 0,!1),e[83]=ee,e[84]=ie,e[85]=me,e[86]=he):he=e[86];let ve;e[87]!==Z||e[88]!==K||e[89]!==I||e[90]!==_||e[91]!==J||e[92]!==he?(ve=(0,y.jsxDEV)("div",{className:Z,"data-testid":K,children:[I,_,J,he]},void 0,!0),e[87]=Z,e[88]=K,e[89]=I,e[90]=_,e[91]=J,e[92]=he,e[93]=ve):ve=e[93];let Le;e[94]===Symbol.for("react.memo_cache_sentinel")?(Le=(0,y.jsxDEV)($i,{},void 0,!1),e[94]=Le):Le=e[94];let L;e[95]!==w?(L=(0,y.jsxDEV)("div",{className:"lg:col-span-2",children:(0,y.jsxDEV)(el,{functions:w},void 0,!1)},void 0,!1),e[95]=w,e[96]=L):L=e[96];let Q;e[97]!==W?(Q=(0,y.jsxDEV)(tl,{subs:W},void 0,!1),e[97]=W,e[98]=Q):Q=e[98];let X;e[99]!==T?(X=(0,y.jsxDEV)(ol,{entries:T},void 0,!1),e[99]=T,e[100]=X):X=e[100];let xe;e[101]!==Q||e[102]!==X?(xe=(0,y.jsxDEV)("div",{className:"flex flex-col gap-3",children:[Q,X]},void 0,!0),e[101]=Q,e[102]=X,e[103]=xe):xe=e[103];let se;e[104]!==L||e[105]!==xe?(se=(0,y.jsxDEV)("div",{className:"grid gap-3 lg:grid-cols-3",children:[L,xe]},void 0,!0),e[104]=L,e[105]=xe,e[106]=se):se=e[106];let Fe;e[107]!==s?(Fe=s("Advisors"),e[107]=s,e[108]=Fe):Fe=e[108];let de;e[109]!==Fe?(de=(0,y.jsxDEV)("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:Fe},void 0,!1),e[109]=Fe,e[110]=de):de=e[110];let pe;e[111]!==O||e[112]!==V||e[113]!==s||e[114]!==re||e[115]!==ne?(pe=V===0&&O===0?(0,y.jsxDEV)(In,{description:s("No security or performance issues detected."),icon:(0,y.jsxDEV)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[(0,y.jsxDEV)("path",{d:"M12 3 4 6v5c0 5 3.4 8.5 8 10 4.6-1.5 8-5 8-10V6l-8-3Z"},void 0,!1),(0,y.jsxDEV)("path",{d:"m9 12 2 2 4-4"},void 0,!1)]},void 0,!0),testId:"home-advisors-clear",title:s("No issues found")},void 0,!1):(0,y.jsxDEV)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,y.jsxDEV)(Ha,{count:V,onView:ne,testId:"home-security",title:s("Security findings")},void 0,!1),(0,y.jsxDEV)(Ha,{count:O,onView:re,testId:"home-performance",title:s("Performance issues")},void 0,!1)]},void 0,!0),e[111]=O,e[112]=V,e[113]=s,e[114]=re,e[115]=ne,e[116]=pe):pe=e[116];let Pe;e[117]!==de||e[118]!==pe?(Pe=(0,y.jsxDEV)("section",{className:"flex flex-col gap-3","data-testid":"home-advisors",children:[de,pe]},void 0,!0),e[117]=de,e[118]=pe,e[119]=Pe):Pe=e[119];let Re;e[120]!==s?(Re=s("Get connected"),e[120]=s,e[121]=Re):Re=e[121];let Se;e[122]!==Re?(Se=(0,y.jsxDEV)("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:Re},void 0,!1),e[122]=Re,e[123]=Se):Se=e[123];let Ne;e[124]!==s?(Ne=s("Client SDK"),e[124]=s,e[125]=Ne):Ne=e[125];let Ee;e[126]!==Ne?(Ee=(0,y.jsxDEV)(_r,{command:"npm i @lunora/client",label:Ne},void 0,!1),e[126]=Ne,e[127]=Ee):Ee=e[127];let Te;e[128]!==s?(Te=s("React"),e[128]=s,e[129]=Te):Te=e[129];let we;e[130]!==Te?(we=(0,y.jsxDEV)(_r,{command:"npm i @lunora/react",label:Te},void 0,!1),e[130]=Te,e[131]=we):we=e[131];let ke;e[132]!==s?(ke=s("CLI"),e[132]=s,e[133]=ke):ke=e[133];let Oe;e[134]!==ke?(Oe=(0,y.jsxDEV)(_r,{command:"lunora dev",label:ke},void 0,!1),e[134]=ke,e[135]=Oe):Oe=e[135];let Me;e[136]!==Ee||e[137]!==we||e[138]!==Oe?(Me=(0,y.jsxDEV)("div",{className:"grid gap-3 sm:grid-cols-3",children:[Ee,we,Oe]},void 0,!0),e[136]=Ee,e[137]=we,e[138]=Oe,e[139]=Me):Me=e[139];let ze;e[140]===Symbol.for("react.memo_cache_sentinel")?(ze=(0,y.jsxDEV)(Qi,{},void 0,!1),e[140]=ze):ze=e[140];let _e;e[141]!==Se||e[142]!==Me?(_e=(0,y.jsxDEV)("section",{className:"flex flex-col gap-3","data-testid":"home-get-connected",children:[Se,Me,ze]},void 0,!0),e[141]=Se,e[142]=Me,e[143]=_e):_e=e[143];let We;return e[144]!==U||e[145]!==te||e[146]!==ve||e[147]!==se||e[148]!==Pe||e[149]!==_e?(We=(0,y.jsxDEV)("div",{className:U,"data-testid":te,children:[ve,Le,se,Pe,_e]},void 0,!0),e[144]=U,e[145]=te,e[146]=ve,e[147]=se,e[148]=Pe,e[149]=_e,e[150]=We):We=e[150],We},"HomePanel");function rl(t,e){return e.calls-t.calls}a(rl,"_temp");function nl(t){return(0,y.jsxDEV)("div",{className:"grid grid-cols-[1fr_auto_auto_auto] items-center gap-4 px-4 py-2 text-[13px]",children:[(0,y.jsxDEV)("span",{className:"truncate font-mono text-xs text-foreground",children:t.path},void 0,!1),(0,y.jsxDEV)("span",{className:"text-end tabular-nums",children:t.calls.toLocaleString()},void 0,!1),(0,y.jsxDEV)("span",{className:"w-12 text-end tabular-nums text-muted-foreground",children:Ir(t.calls>0?t.totalDurationMs/t.calls:0)},void 0,!1),(0,y.jsxDEV)("span",{className:z("w-8 text-end tabular-nums",t.errors>0?"text-destructive":"text-muted-foreground"),children:t.errors},void 0,!1)]},t.path,!0)}a(nl,"_temp2");function al(t){return t.maxDurationMs}a(al,"_temp3");var Ua=S(Fo(),1);var za=S(go(),1);var il=a((t,e,o)=>t!==void 0?t:e===void 0&&o===void 0?Qr:Kr(e,o),"resolveInstance"),Wa=a(t=>{let e=(0,Ua.c)(7),{catalogs:o,children:s,i18n:r,locale:n}=t,l;e[0]!==o||e[1]!==r||e[2]!==n?(l=il(r,n,o),e[0]=o,e[1]=r,e[2]=n,e[3]=l):l=e[3];let d=l,p;return e[4]!==s||e[5]!==d?(p=(0,za.jsxDEV)(Yr,{value:d,children:s},void 0,!1),e[4]=s,e[5]=d,e[6]=p):p=e[6],p},"StudioI18nProvider");var Vr=S(Fo(),1);var Pt=S(M(),1);var ce=S(go(),1);var Ar="lunora:command-palette",Za=a(()=>{"window"in globalThis&&globalThis.dispatchEvent(new Event(Ar))},"openCommandPalette"),ll=a(t=>{let e=(0,Vr.c)(18),{active:o,index:s,item:r,onActivate:n,onSelect:l}=t,d;e[0]!==r||e[1]!==l?(d=a(()=>{l(r)},"t1"),e[0]=r,e[1]=l,e[2]=d):d=e[2];let p=d,c;e[3]!==s||e[4]!==n?(c=a(()=>{n(s)},"t2"),e[3]=s,e[4]=n,e[5]=c):c=e[5];let u=c,g=o?"bg-accent text-accent-foreground":"text-foreground",m;e[6]!==g?(m=z("flex w-full items-center justify-between gap-3 rounded-md px-3 py-2 text-start text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground",g),e[6]=g,e[7]=m):m=e[7];let h;e[8]!==r.label?(h=(0,ce.jsxDEV)("span",{children:r.label},void 0,!1),e[8]=r.label,e[9]=h):h=e[9];let f;e[10]!==r.group?(f=(0,ce.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:r.group},void 0,!1),e[10]=r.group,e[11]=f):f=e[11];let v;return e[12]!==p||e[13]!==u||e[14]!==m||e[15]!==h||e[16]!==f?(v=(0,ce.jsxDEV)("li",{children:(0,ce.jsxDEV)("button",{className:m,onClick:p,onMouseEnter:u,type:"button",children:[h,f]},void 0,!0)},void 0,!1),e[12]=p,e[13]=u,e[14]=m,e[15]=h,e[16]=f,e[17]=v):v=e[17],v},"CommandRow"),qa=a(t=>{let e=(0,Vr.c)(39),{items:o}=t,s=ae(),r=ft(),[n,l]=(0,Pt.useState)(!1),[d,p]=(0,Pt.useState)(""),[c,u]=(0,Pt.useState)(0),g=(0,Pt.useRef)(null),m,h;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=a(()=>{let I=a(U=>{(U.metaKey||U.ctrlKey)&&U.key.toLowerCase()==="k"&&(U.preventDefault(),l(!0))},"onKeyDown"),_=a(()=>{l(!0)},"onOpen");return globalThis.addEventListener("keydown",I),globalThis.addEventListener(Ar,_),()=>{globalThis.removeEventListener("keydown",I),globalThis.removeEventListener(Ar,_)}},"t1"),h=[],e[0]=m,e[1]=h):(m=e[0],h=e[1]),(0,Pt.useEffect)(m,h);let f;if(e[2]!==o||e[3]!==d){e:{let I=d.trim().toLowerCase();if(I===""){f=o;break e}f=o.filter(_=>_.label.toLowerCase().includes(I)||_.group.toLowerCase().includes(I))}e[2]=o,e[3]=d,e[4]=f}else f=e[4];let v=f,x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=a(I=>{l(I),I||(p(""),u(0))},"t4"),e[5]=x):x=e[5];let b=x,C;e[6]!==r?(C=a(I=>{b(!1),$e(r({to:I.to}))},"t5"),e[6]=r,e[7]=C):C=e[7];let P=C,N;e[8]===Symbol.for("react.memo_cache_sentinel")?(N=a(I=>{p(I.target.value),u(0)},"t6"),e[8]=N):N=e[8];let R=N,E;e[9]!==c||e[10]!==v||e[11]!==P?(E=a(I=>{e:switch(I.key){case"ArrowDown":{I.preventDefault(),u(_=>v.length===0?0:(_+1)%v.length);break e}case"ArrowUp":{I.preventDefault(),u(_=>v.length===0?0:(_-1+v.length)%v.length);break e}case"Enter":{I.preventDefault();let _=v[c];_!==void 0&&P(_);break e}}},"t7"),e[9]=c,e[10]=v,e[11]=P,e[12]=E):E=e[12];let T=E,k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k=(0,ce.jsxDEV)(fe.Backdrop,{className:"fixed inset-0 z-50 bg-black/40 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0"},void 0,!1),e[13]=k):k=e[13];let w;e[14]!==s?(w=s("Command palette"),e[14]=s,e[15]=w):w=e[15];let O;e[16]!==w?(O=(0,ce.jsxDEV)(fe.Title,{className:"sr-only",children:w},void 0,!1),e[16]=w,e[17]=O):O=e[17];let V;e[18]===Symbol.for("react.memo_cache_sentinel")?(V=(0,ce.jsxDEV)("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,ce.jsxDEV)("circle",{cx:"11",cy:"11",r:"7"},void 0,!1),(0,ce.jsxDEV)("path",{d:"m21 21-4.3-4.3",strokeLinecap:"round"},void 0,!1)]},void 0,!0),e[18]=V):V=e[18];let W;e[19]!==s?(W=s("Search\u2026"),e[19]=s,e[20]=W):W=e[20];let D;e[21]!==T||e[22]!==d||e[23]!==W?(D=(0,ce.jsxDEV)("div",{className:"flex items-center gap-2 border-b border-border px-3",children:[V,(0,ce.jsxDEV)("input",{className:"h-11 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground","data-testid":"dash-command-input",onChange:R,onKeyDown:T,placeholder:W,ref:g,type:"text",value:d},void 0,!1)]},void 0,!0),e[21]=T,e[22]=d,e[23]=W,e[24]=D):D=e[24];let H;e[25]!==c||e[26]!==v||e[27]!==P||e[28]!==s?(H=v.length===0?(0,ce.jsxDEV)("li",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:s("No results.")},void 0,!1):v.map((I,_)=>(0,ce.jsxDEV)(ll,{active:_===c,index:_,item:I,onActivate:u,onSelect:P},I.to,!1)),e[25]=c,e[26]=v,e[27]=P,e[28]=s,e[29]=H):H=e[29];let $;e[30]!==H?($=(0,ce.jsxDEV)("ul",{className:"max-h-80 overflow-y-auto p-1.5","data-testid":"dash-command-list",children:H},void 0,!1),e[30]=H,e[31]=$):$=e[31];let Z;e[32]!==O||e[33]!==D||e[34]!==$?(Z=(0,ce.jsxDEV)(fe.Portal,{children:[k,(0,ce.jsxDEV)(fe.Popup,{className:"fixed start-1/2 top-24 z-50 w-[36rem] max-w-[90vw] -translate-x-1/2 overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-lg outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95","data-testid":"dash-command-palette",initialFocus:g,children:[O,D,$]},void 0,!0)]},void 0,!0),e[32]=O,e[33]=D,e[34]=$,e[35]=Z):Z=e[35];let K;return e[36]!==n||e[37]!==Z?(K=(0,ce.jsxDEV)(fe.Root,{onOpenChange:b,open:n,children:Z},void 0,!1),e[36]=n,e[37]=Z,e[38]=K):K=e[38],K},"CommandPalette");var Xa="(prefers-color-scheme: dark)",ei=a(()=>{try{return globalThis.localStorage}catch{return}},"store"),cl=a(t=>t==="system"||t==="light"||t==="dark","isPreference"),ti=a(()=>globalThis.matchMedia,"matchMedia"),oi="lunora-studio-theme",Br=["system","light","dark"],dl=a((t="system")=>{try{let e=ei()?.getItem(oi);return cl(e)?e:t}catch{return t}},"loadThemePreference"),Ga=a(t=>{let e=ei();if(e!==void 0)try{e.setItem(oi,t)}catch{}},"saveThemePreference"),pl=a(()=>{try{return ti()?.(Xa).matches?"dark":"light"}catch{return"light"}},"getSystemTheme"),ul=a((t,e)=>t==="system"?e:t,"resolveTheme"),fl=a(t=>{let e;try{e=ti()?.(Xa)}catch{e=void 0}if(e===void 0)return()=>{};let o=a(s=>{t(s.matches?"dark":"light")},"handler");return e.addEventListener("change",o),()=>{e.removeEventListener("change",o)}},"subscribeSystemTheme"),si=(0,q.createContext)(null),S0=a(({children:t,defaultTheme:e="system"})=>{let[o,s]=(0,q.useState)(()=>dl(e)),[r,n]=(0,q.useState)(()=>pl());(0,q.useEffect)(()=>fl(n),[]);let l=a(c=>{Ga(c),s(c)},"setTheme"),p={cycleTheme:a(()=>{s(c=>{let u=Br[(Br.indexOf(c)+1)%Br.length]??c;return Ga(u),u})},"cycleTheme"),resolvedTheme:ul(o,r),setTheme:l,systemTheme:r,theme:o};return(0,i.jsxDEV)(si,{value:p,children:t},void 0,!1)},"ThemeProvider"),ml=a(()=>{let t=(0,q.use)(si);if(t===null)throw new Zs("INTERNAL","useTheme must be used within a <ThemeProvider>");return t},"useTheme");function N0({delay:t=0,...e}){return(0,i.jsxDEV)(nt.Provider,{"data-slot":"tooltip-provider",delay:t,...e},void 0,!1)}a(N0,"TooltipProvider");function gl(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(nt.Root,{"data-slot":"tooltip",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(gl,"Tooltip");function hl(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(nt.Trigger,{"data-slot":"tooltip-trigger",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(hl,"TooltipTrigger");function vl({className:t,side:e="top",sideOffset:o=4,align:s="center",alignOffset:r=0,children:n,...l}){return(0,i.jsxDEV)(nt.Portal,{children:(0,i.jsxDEV)(nt.Positioner,{align:s,alignOffset:r,side:e,sideOffset:o,className:"isolate z-50",children:(0,i.jsxDEV)(nt.Popup,{"data-slot":"tooltip-content",className:z("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pe-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-md data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...l,children:[n,(0,i.jsxDEV)(nt.Arrow,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-md bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-start-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-end-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"},void 0,!1)]},void 0,!0)},void 0,!1)},void 0,!1)}a(vl,"TooltipContent");var xl=a(t=>{let e=(0,B.c)(5),{className:o}=t,s;e[0]!==o?(s=z("h-full w-full text-foreground",o),e[0]=o,e[1]=s):s=e[1];let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=(0,i.jsxDEV)("path",{d:"M 259.500 10.552 C 220.080 15.859, 182.424 32.566, 152.500 58.025 C 110.179 94.031, 85.380 137.183, 77.518 188.500 C 75.410 202.255, 74.569 225.677, 75.796 236.466 C 76.757 244.917, 76.683 245.692, 74.518 249.966 C 63.118 272.466, 53.141 303.876, 51.382 322.799 L 50.718 329.943 71.960 320.471 C 83.643 315.262, 93.326 311, 93.478 311 C 93.630 311, 96.547 316.063, 99.959 322.250 C 103.371 328.438, 107.249 334.850, 108.577 336.500 L 110.990 339.500 110.981 336 C 110.977 334.075, 111.499 324.991, 112.143 315.813 L 113.312 299.127 121.406 293.336 C 132.495 285.403, 149.593 271.554, 161 261.268 C 171.556 251.748, 189.116 235, 188.540 235 C 188.337 235, 183.069 238.648, 176.835 243.106 C 142.318 267.789, 68.537 314, 63.646 314 C 61.843 314, 72.791 281.179, 80.905 262.259 C 92.233 235.845, 107.473 212.389, 132.106 183.453 L 138.451 176 148.268 176 C 176.192 176, 197.512 187.154, 212.868 209.797 C 216.470 215.108, 217.035 216.595, 216.477 219.297 C 211.386 243.968, 202.359 274.496, 193.797 296 C 183.898 320.861, 167.147 352.101, 152.395 373.215 L 147.004 380.930 152.891 385.830 C 161.400 392.911, 165.563 396, 166.594 395.998 C 167.092 395.998, 168.772 391.641, 170.327 386.317 C 176.279 365.934, 188.422 338.749, 200.942 317.778 C 223.060 280.731, 256.432 244.369, 294.500 215.836 C 309.956 204.252, 313.937 201.603, 314.719 202.385 C 315.116 202.783, 315.449 213.096, 315.460 225.304 C 315.474 241.855, 315.021 250.405, 313.680 258.924 C 307.009 301.272, 291.175 336.677, 263.112 372 C 255.259 381.883, 227.182 410.673, 218.516 417.727 L 213.532 421.783 223.439 424.880 C 281.705 443.093, 349.165 436.018, 398.616 406.508 C 446.728 377.797, 483.322 331.466, 497.366 281.481 C 503.381 260.075, 504.480 250.741, 504.491 221 C 504.501 191.997, 503.598 184.047, 497.987 163.732 C 484.768 115.871, 452.505 72.708, 407.718 42.964 C 381.051 25.254, 352.818 14.828, 319.695 10.460 C 305.932 8.645, 273.298 8.695, 259.500 10.552",fillRule:"evenodd"},void 0,!1),e[2]=r):r=e[2];let n;return e[3]!==s?(n=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:s,fill:"currentColor",viewBox:"0 0 543 446",children:r},void 0,!1),e[3]=s,e[4]=n):n=e[4],n},"BrandMark"),ri="lunora.studio.rulesBannerDismissed",bl=a(()=>{try{return globalThis.localStorage.getItem(ri)==="1"}catch{return!1}},"readBannerDismissed"),yl=a(()=>{try{globalThis.localStorage.setItem(ri,"1")}catch{}},"writeBannerDismissed"),Cl=a(()=>{let t=(0,B.c)(18),e=ae(),[o,s]=(0,q.useState)(Pl),r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=a(()=>{s(!0),yl()},"t0"),t[0]=r):r=t[0];let n=r;if(o)return null;let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=(0,i.jsxDEV)("span",{"aria-hidden":"true",className:"text-warning",children:"\u26A0"},void 0,!1),t[1]=l):l=t[1];let d;t[2]!==e?(d=e("Lunora AI rules aren't installed."),t[2]=e,t[3]=d):d=t[3];let p;t[4]===Symbol.for("react.memo_cache_sentinel")?(p=(0,i.jsxDEV)("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-[11px]",children:"lunora rules install"},void 0,!1),t[4]=p):p=t[4];let c;t[5]!==e?(c=e("lets your coding agent use Lunora correctly."),t[5]=e,t[6]=c):c=t[6];let u;t[7]!==d||t[8]!==c?(u=(0,i.jsxDEV)("span",{children:[d," ",p," ",c]},void 0,!0),t[7]=d,t[8]=c,t[9]=u):u=t[9];let g;t[10]!==e?(g=e("Dismiss"),t[10]=e,t[11]=g):g=t[11];let m;t[12]===Symbol.for("react.memo_cache_sentinel")?(m=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:(0,i.jsxDEV)("path",{d:"M18 6 6 18M6 6l12 12"},void 0,!1)},void 0,!1),t[12]=m):m=t[12];let h;t[13]!==g?(h=(0,i.jsxDEV)("button",{"aria-label":g,className:"ms-auto flex size-5 items-center justify-center rounded text-muted-foreground outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:bg-accent","data-testid":"dash-app-rules-banner-dismiss",onClick:n,type:"button",children:m},void 0,!1),t[13]=g,t[14]=h):h=t[14];let f;return t[15]!==u||t[16]!==h?(f=(0,i.jsxDEV)("div",{className:"flex shrink-0 items-center gap-2 border-b border-warning/30 bg-warning/10 px-6 py-2 text-[12px] text-foreground","data-testid":"dash-app-rules-banner",role:"note",children:[l,u,h]},void 0,!0),t[15]=u,t[16]=h,t[17]=f):f=t[17],f},"RulesBanner");function Pl(){return bl()}a(Pl,"_temp$1");var Rl=a(()=>{let t=(0,B.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,i.jsxDEV)("rect",{height:"14",rx:"2",width:"20",x:"2",y:"3"},void 0,!1),(0,i.jsxDEV)("path",{d:"M8 21h8M12 17v4"},void 0,!1)]},void 0,!0),t[0]=e):e=t[0],e},"MonitorIcon"),Sl=a(()=>{let t=(0,B.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,i.jsxDEV)("circle",{cx:"12",cy:"12",r:"4"},void 0,!1),(0,i.jsxDEV)("path",{d:"M12 2v2m0 16v2M4.9 4.9l1.4 1.4m11.4 11.4 1.4 1.4M2 12h2m16 0h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"},void 0,!1)]},void 0,!0),t[0]=e):e=t[0],e},"SunIcon"),Nl=a(()=>{let t=(0,B.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:(0,i.jsxDEV)("path",{d:"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8Z"},void 0,!1)},void 0,!1),t[0]=e):e=t[0],e},"MoonIcon"),El=[{Icon:Rl,value:"system"},{Icon:Sl,value:"light"},{Icon:Nl,value:"dark"}],Tl=a(()=>{let t=(0,B.c)(19),{theme:e,setTheme:o}=ml(),s=ae(),r;t[0]!==s?(r=s("Dark theme"),t[0]=s,t[1]=r):r=t[1];let n;t[2]!==s?(n=s("Light theme"),t[2]=s,t[3]=n):n=t[3];let l;t[4]!==s?(l=s("System theme"),t[4]=s,t[5]=l):l=t[5];let d;t[6]!==r||t[7]!==n||t[8]!==l?(d={dark:r,light:n,system:l},t[6]=r,t[7]=n,t[8]=l,t[9]=d):d=t[9];let p=d,c;t[10]!==s?(c=s("Theme"),t[10]=s,t[11]=c):c=t[11];let u;t[12]!==p||t[13]!==o||t[14]!==e?(u=El.map(m=>{let{Icon:h,value:f}=m,v=e===f;return(0,i.jsxDEV)("button",{"aria-checked":v,"aria-label":p[f],className:z("relative flex size-7 cursor-pointer items-center justify-center rounded-md outline-none transition-colors focus-visible:bg-accent",v?"text-foreground":"text-muted-foreground hover:text-foreground"),"data-testid":`dash-app-theme-${f}`,onClick:a(()=>{o(f)},"onClick"),role:"radio",title:p[f],type:"button",children:[v&&(0,i.jsxDEV)(Jr.span,{className:"absolute inset-0 rounded-md border border-muted-foreground/40 bg-background/40",layoutId:"studio-theme-active",transition:{bounce:.1,duration:.45,type:"spring"}},void 0,!1),(0,i.jsxDEV)("span",{className:"relative",children:(0,i.jsxDEV)(h,{},void 0,!1)},void 0,!1)]},f,!0)}),t[12]=p,t[13]=o,t[14]=e,t[15]=u):u=t[15];let g;return t[16]!==c||t[17]!==u?(g=(0,i.jsxDEV)("div",{"aria-label":c,className:"inline-flex items-center gap-0.5 overflow-hidden rounded-md border border-border bg-muted/60 p-0.5","data-testid":"dash-app-theme",role:"radiogroup",children:u},void 0,!1),t[16]=c,t[17]=u,t[18]=g):g=t[18],g},"ThemeToggle");function ni(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(Ct.Root,{"data-slot":"popover",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(ni,"Popover");function ai(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(Ct.Trigger,{"data-slot":"popover-trigger",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(ai,"PopoverTrigger");function ii({align:t="end",alignOffset:e=0,className:o,keepMounted:s=!1,side:r="bottom",sideOffset:n=6,...l}){return(0,i.jsxDEV)(Ct.Portal,{keepMounted:s,children:(0,i.jsxDEV)(Ct.Positioner,{align:t,alignOffset:e,className:"isolate z-50 outline-none",side:r,sideOffset:n,children:(0,i.jsxDEV)(Ct.Popup,{className:z("z-50 w-72 origin-(--transform-origin) rounded-lg border border-border bg-popover p-3 text-popover-foreground shadow-md outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",o),"data-slot":"popover-content",...l},void 0,!1)},void 0,!1)},void 0,!1)}a(ii,"PopoverContent");var Lr=768;function wl(){let t=(0,B.c)(2),[e,o]=(0,q.useState)(void 0),s,r;return t[0]===Symbol.for("react.memo_cache_sentinel")?(s=a(()=>{let n=globalThis.matchMedia(`(max-width: ${Lr-1}px)`),l=a(()=>{o(globalThis.innerWidth<Lr)},"onChange");return n.addEventListener("change",l),o(globalThis.innerWidth<Lr),()=>{n.removeEventListener("change",l)}},"t0"),r=[],t[0]=s,t[1]=r):(s=t[0],r=t[1]),(0,q.useEffect)(s,r),!!e}a(wl,"useIsMobile");function kl(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(fe.Root,{"data-slot":"sheet",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(kl,"Sheet");function Ol(t){let e=(0,B.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let s;return e[2]!==o?(s=(0,i.jsxDEV)(fe.Portal,{"data-slot":"sheet-portal",...o},void 0,!1),e[2]=o,e[3]=s):s=e[3],s}a(Ol,"SheetPortal");function Ml(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("fixed inset-0 z-50 bg-black/10 text-xs/relaxed transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)(fe.Backdrop,{"data-slot":"sheet-overlay",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Ml,"SheetOverlay");function _l({className:t,children:e,side:o="right",showCloseButton:s=!0,...r}){return(0,i.jsxDEV)(Ol,{children:[(0,i.jsxDEV)(Ml,{},void 0,!1),(0,i.jsxDEV)(fe.Popup,{"data-slot":"sheet-content","data-side":o,className:z("fixed z-50 flex flex-col bg-popover bg-clip-padding text-xs/relaxed text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-e data-[side=left]:data-ending-style:translate-x-[-2.5rem] rtl:data-[side=left]:data-ending-style:-translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] rtl:data-[side=left]:data-starting-style:-translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-s data-[side=right]:data-ending-style:translate-x-[2.5rem] rtl:data-[side=right]:data-ending-style:-translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] rtl:data-[side=right]:data-starting-style:-translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",t),...r,children:[e,s&&(0,i.jsxDEV)(fe.Close,{"data-slot":"sheet-close",render:(0,i.jsxDEV)(ao,{variant:"ghost",className:"absolute top-3 end-3",size:"icon-sm"},void 0,!1),children:[(0,i.jsxDEV)(Qs,{icon:Mn,strokeWidth:2},void 0,!1),(0,i.jsxDEV)("span",{className:"sr-only",children:"Close"},void 0,!1)]},void 0,!0)]},void 0,!0)]},void 0,!0)}a(_l,"SheetContent");function Il(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("flex flex-col gap-0.5 p-4",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("div",{"data-slot":"sheet-header",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Il,"SheetHeader");function Dl(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("text-sm font-medium text-foreground",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)(fe.Title,{"data-slot":"sheet-title",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Dl,"SheetTitle");function Al(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("text-xs/relaxed text-muted-foreground",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)(fe.Description,{"data-slot":"sheet-description",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Al,"SheetDescription");var Vl="sidebar_state",Bl=3600*24*7,Ll="16rem",Fl="18rem",Hl="3rem",$l="b",li=ut.createContext(null);function Bs(){let t=ut.useContext(li);if(!t)throw new Zs("INTERNAL","useSidebar must be used within a SidebarProvider.");return t}a(Bs,"useSidebar");function jl({defaultOpen:t=!0,open:e,onOpenChange:o,className:s,style:r,children:n,...l}){let d=wl(),[p,c]=ut.useState(!1),[u,g]=ut.useState(t),m=e??u,h=a(b=>{let C=typeof b=="function"?b(m):b;o?o(C):g(C),document.cookie=`${Vl}=${C}; path=/; max-age=${Bl}`},"setOpen"),f=a(()=>d?c(b=>!b):h(b=>!b),"toggleSidebar");ut.useEffect(()=>{let b=a(C=>{C.key===$l&&(C.metaKey||C.ctrlKey)&&(C.preventDefault(),f())},"handleKeyDown");return globalThis.addEventListener("keydown",b),()=>globalThis.removeEventListener("keydown",b)},[f]);let x={state:m?"expanded":"collapsed",open:m,setOpen:h,isMobile:d,openMobile:p,setOpenMobile:c,toggleSidebar:f};return(0,i.jsxDEV)(li.Provider,{value:x,children:(0,i.jsxDEV)("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Ll,"--sidebar-width-icon":Hl,...r},className:z("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",s),...l,children:n},void 0,!1)},void 0,!1)}a(jl,"SidebarProvider");function Ul({side:t="left",variant:e="sidebar",collapsible:o="offcanvas",className:s,children:r,dir:n,...l}){let{isMobile:d,state:p,openMobile:c,setOpenMobile:u}=Bs();return o==="none"?(0,i.jsxDEV)("div",{"data-slot":"sidebar",className:z("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",s),...l,children:r},void 0,!1):d?(0,i.jsxDEV)(kl,{open:c,onOpenChange:u,...l,children:(0,i.jsxDEV)(_l,{dir:n,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Fl},side:t,children:[(0,i.jsxDEV)(Il,{className:"sr-only",children:[(0,i.jsxDEV)(Dl,{children:"Sidebar"},void 0,!1),(0,i.jsxDEV)(Al,{children:"Displays the mobile sidebar."},void 0,!1)]},void 0,!0),(0,i.jsxDEV)("div",{className:"flex h-full w-full flex-col",children:r},void 0,!1)]},void 0,!0)},void 0,!1):(0,i.jsxDEV)("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":p,"data-collapsible":p==="collapsed"?o:"","data-variant":e,"data-side":t,"data-slot":"sidebar",children:[(0,i.jsxDEV)("div",{"data-slot":"sidebar-gap",className:z("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")},void 0,!1),(0,i.jsxDEV)("div",{"data-slot":"sidebar-container","data-side":t,className:z("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",e==="floating"||e==="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-e group-data-[side=right]:border-s",s),...l,children:(0,i.jsxDEV)("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-none group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:r},void 0,!1)},void 0,!1)]},void 0,!0)}a(Ul,"Sidebar");function zl(t){let e=(0,B.c)(15),o,s,r;e[0]!==t?({className:o,onClick:s,...r}=t,e[0]=t,e[1]=o,e[2]=s,e[3]=r):(o=e[1],s=e[2],r=e[3]);let{toggleSidebar:n}=Bs(),l;e[4]!==o?(l=z(o),e[4]=o,e[5]=l):l=e[5];let d;e[6]!==s||e[7]!==n?(d=a(g=>{s?.(g),n()},"t2"),e[6]=s,e[7]=n,e[8]=d):d=e[8];let p,c;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=(0,i.jsxDEV)(Qs,{icon:_n,strokeWidth:2,className:"rtl:rotate-180"},void 0,!1),c=(0,i.jsxDEV)("span",{className:"sr-only",children:"Toggle Sidebar"},void 0,!1),e[9]=p,e[10]=c):(p=e[9],c=e[10]);let u;return e[11]!==r||e[12]!==l||e[13]!==d?(u=(0,i.jsxDEV)(ao,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:l,onClick:d,...r,children:[p,c]},void 0,!0),e[11]=r,e[12]=l,e[13]=d,e[14]=u):u=e[14],u}a(zl,"SidebarTrigger");function Wl(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ms-0 md:peer-data-[variant=inset]:rounded-none md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ms-2",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("main",{"data-slot":"sidebar-inset",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Wl,"SidebarInset");function Zl(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("flex flex-col gap-2 p-2",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Zl,"SidebarHeader");function ql(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("flex flex-col gap-2 p-2",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(ql,"SidebarFooter");function Gl(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("flex min-h-0 flex-1 flex-col gap-0 overflow-x-hidden overflow-y-auto [scrollbar-color:color-mix(in_oklch,var(--muted-foreground)_25%,transparent)_transparent] [scrollbar-width:thin] [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/25 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar]:w-1.5 hover:[scrollbar-color:color-mix(in_oklch,var(--muted-foreground)_50%,transparent)_transparent] hover:[&::-webkit-scrollbar-thumb]:bg-muted-foreground/50",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Gl,"SidebarContent");function Kl(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("relative flex w-full min-w-0 flex-col p-2",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Kl,"SidebarGroup");function Ql(t){let e=(0,B.c)(10),o,s,r,n;if(e[0]!==t){let{className:p,render:c,...u}=t;o=c,n=Gs,s="div",r=lt({className:z("flex h-8 shrink-0 items-center rounded-none px-2 text-xs text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",p)},u),e[0]=t,e[1]=o,e[2]=s,e[3]=r,e[4]=n}else o=e[1],s=e[2],r=e[3],n=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l={slot:"sidebar-group-label",sidebar:"group-label"},e[5]=l):l=e[5];let d;return e[6]!==o||e[7]!==s||e[8]!==r?(d={defaultTagName:s,props:r,render:o,state:l},e[6]=o,e[7]=s,e[8]=r,e[9]=d):d=e[9],n(d)}a(Ql,"SidebarGroupLabel");function Yl(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("w-full text-xs",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Yl,"SidebarGroupContent");function Ka(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("flex w-full min-w-0 flex-col gap-0",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Ka,"SidebarMenu");function Qa(t){let e=(0,B.c)(8),o,s;e[0]!==t?({className:o,...s}=t,e[0]=t,e[1]=o,e[2]=s):(o=e[1],s=e[2]);let r;e[3]!==o?(r=z("group/menu-item relative",o),e[3]=o,e[4]=r):r=e[4];let n;return e[5]!==s||e[6]!==r?(n=(0,i.jsxDEV)("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:r,...s},void 0,!1),e[5]=s,e[6]=r,e[7]=n):n=e[7],n}a(Qa,"SidebarMenuItem");var Jl=Xr("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-none p-2 text-start text-xs ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pe-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! 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 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-xs",sm:"h-7 text-xs",lg:"h-12 text-xs group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function ci({render:t,isActive:e=!1,variant:o="default",size:s="default",tooltip:r,className:n,...l}){let{isMobile:d,state:p}=Bs(),c=Gs({defaultTagName:"button",props:lt({className:z(Jl({variant:o,size:s}),n)},l),render:r?(0,i.jsxDEV)(hl,{render:t},void 0,!1):t,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:s,active:e}});return r?(typeof r=="string"&&(r={children:r}),(0,i.jsxDEV)(gl,{children:[c,(0,i.jsxDEV)(vl,{side:"right",align:"center",hidden:p!=="collapsed"||d,...r},void 0,!1)]},void 0,!0)):c}a(ci,"SidebarMenuButton");var G=a((t,e)=>(0,q.lazy)(()=>t().then(o=>({default:o[e]}))),"lazyNamed"),Xl=G(()=>import("./chunk-GNMTLLGB.js"),"InsightsPanel"),ec=(0,q.lazy)(()=>import("./chunk-5KUKYIU6.js")),tc=(0,q.lazy)(()=>import("./chunk-WKUGR7ER.js")),oc=G(()=>import("./chunk-KFNNMXUZ.js"),"AnalyticsPanel"),sc=(0,q.lazy)(()=>import("./chunk-PXR5E7AX.js")),rc=G(()=>import("./chunk-QQH2YTBW.js"),"AuthConfigPanel"),nc=G(()=>import("./chunk-2BBENYBY.js"),"AuthSessionsPanel"),ac=G(()=>import("./chunk-6CRKDJNL.js"),"OrganizationsPanel"),ic=G(()=>import("./chunk-7KR346F4.js"),"UsersPanel"),lc=G(()=>import("./chunk-ZSNXQT4N.js"),"ContainersPanel"),cc=G(()=>import("./chunk-PKIPNNRD.js"),"TableEditor"),dc=G(()=>import("./chunk-XFPHUG7M.js"),"ExportImportPanel"),pc=G(()=>import("./chunk-BGHGKAOM.js"),"MigrationsPanel"),uc=G(()=>import("./chunk-P7AMKXU2.js"),"PitrPanel"),fc=G(()=>import("./chunk-I4RSHYDW.js"),"FlagsPanel"),mc=G(()=>import("./chunk-TU5ZNEZ4.js"),"FunctionRunner"),gc=G(()=>import("./chunk-BL45HXOJ.js"),"FunctionStatsPanel"),hc=G(()=>import("./chunk-AX7GYUQC.js"),"AuditPanel"),vc=G(()=>import("./chunk-7XTR7BWT.js"),"LogDrainsPanel"),xc=(0,q.lazy)(()=>import("./chunk-ERXJPMCU.js").then(t=>({default:t.LogsPanel}))),bc=G(()=>import("./chunk-ZTOATVB7.js"),"MailPanel"),yc=G(()=>import("./chunk-MP5MTWY5.js"),"SchedulePanel"),Cc=(0,q.lazy)(()=>import("./chunk-OLUEBOHS.js")),Pc=G(()=>import("./chunk-73BV73BI.js"),"KvBrowser"),Rc=G(()=>import("./chunk-3JO76DWI.js"),"PaymentsPanel"),Sc=G(()=>import("./chunk-AFCBRDRQ.js"),"PermissionsPanel"),Nc=(0,q.lazy)(()=>import("./chunk-T4XWXBKR.js")),Ec=(0,q.lazy)(()=>import("./chunk-QB3QUTSJ.js")),Tc=(0,q.lazy)(()=>import("./chunk-3SKIYIBN.js")),wc=G(()=>import("./chunk-WATFBATD.js"),"HealthPanel"),kc=G(()=>import("./chunk-OOETIPAO.js"),"MetricsPanel"),Oc=G(()=>import("./chunk-4WGGEF73.js"),"SchemaViewer"),Mc=G(()=>import("./chunk-6HW2RKAX.js"),"SettingsPanel"),_c=G(()=>import("./chunk-PBXQ5QS4.js"),"SqlEditorPanel"),Ic=G(()=>import("./chunk-WSMZLZWM.js"),"FileBrowser"),Dc=G(()=>import("./chunk-3IJLM4GF.js"),"StorageRulesPanel"),Ac=G(()=>import("./chunk-B4TTGYIX.js"),"VectorBrowser"),Vc=(0,q.lazy)(()=>import("./chunk-ICIQ2GWQ.js")),di=(0,q.createContext)(null),Bc={analytics:(0,i.jsxDEV)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"},void 0,!1),api:(0,i.jsxDEV)("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4M13 5l-2 14"},void 0,!1),audit:(0,i.jsxDEV)("path",{d:"M7 4h7l4 4v11a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Zm6 0v5h5M9 13h6M9 16h6M9 10h2"},void 0,!1),authConfig:(0,i.jsxDEV)("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm7.4-3a7.4 7.4 0 0 0-.1-1.2l2-1.6-2-3.4-2.4 1a7.3 7.3 0 0 0-2-1.2l-.4-2.6h-3.6l-.4 2.6a7.3 7.3 0 0 0-2 1.2l-2.4-1-2 3.4 2 1.6a7.4 7.4 0 0 0 0 2.4l-2 1.6 2 3.4 2.4-1a7.3 7.3 0 0 0 2 1.2l.4 2.6h3.6l.4-2.6a7.3 7.3 0 0 0 2-1.2l2.4 1 2-3.4-2-1.6a7.4 7.4 0 0 0 .1-1.2Z"},void 0,!1),authSessions:(0,i.jsxDEV)("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"},void 0,!1),containers:(0,i.jsxDEV)("path",{d:"M3 7.5 12 3l9 4.5v9L12 21l-9-4.5v-9Zm0 0 9 4.5m0 0 9-4.5m-9 4.5V21"},void 0,!1),dashboards:(0,i.jsxDEV)("path",{d:"M4 5h7v6H4V5Zm9 0h7v4h-7V5ZM4 14h7v5H4v-5Zm9-1h7v6h-7v-6Z"},void 0,!1),drains:(0,i.jsxDEV)("path",{d:"M5 5h14M7 5v6a5 5 0 0 0 10 0V5M10 16h4v3h-4zM12 19v2"},void 0,!1),data:(0,i.jsxDEV)("path",{d:"M5 6c0-1.4 3.1-2.5 7-2.5s7 1.1 7 2.5-3.1 2.5-7 2.5S5 7.4 5 6Zm0 0v12c0 1.4 3.1 2.5 7 2.5s7-1.1 7-2.5V6M5 12c0 1.4 3.1 2.5 7 2.5s7-1.1 7-2.5"},void 0,!1),export:(0,i.jsxDEV)("path",{d:"M12 3v11m0 0 4-4m-4 4-4-4M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2"},void 0,!1),fanout:(0,i.jsxDEV)("path",{d:"M12 5a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm-7 16a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm14 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM12 7v3.5M12 10.5 6 17m6-6.5 6 6.5"},void 0,!1),files:(0,i.jsxDEV)("path",{d:"M4 7a2 2 0 0 1 2-2h3l2 2.5h7a2 2 0 0 1 2 2V18a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V7Z"},void 0,!1),flags:(0,i.jsxDEV)("path",{d:"M6 21V4m0 0h11l-2 3 2 3H6"},void 0,!1),functions:(0,i.jsxDEV)("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4"},void 0,!1),health:(0,i.jsxDEV)("path",{d:"M3 12h4l2 6 4-14 2 8h6"},void 0,!1),home:(0,i.jsxDEV)("path",{d:"M3 11.5 12 4l9 7.5M5 10v9a1 1 0 0 0 1 1h4v-6h4v6h4a1 1 0 0 0 1-1v-9"},void 0,!1),insights:(0,i.jsxDEV)("path",{d:"M12 3a6 6 0 0 0-3.6 10.8c.5.4.8.9.9 1.5l.2 1.2h5l.2-1.2c.1-.6.4-1.1.9-1.5A6 6 0 0 0 12 3ZM9.5 20.5h5M10 18h4"},void 0,!1),kv:(0,i.jsxDEV)("path",{d:"M5 5h14v4H5V5Zm0 5h14v4H5v-4Zm0 5h14v4H5v-4Z"},void 0,!1),logs:(0,i.jsxDEV)("path",{d:"M5 6h14M5 10h14M5 14h9M5 18h11"},void 0,!1),mail:(0,i.jsxDEV)("path",{d:"M4 5h16v14H4V5Zm0 1.5 8 6 8-6"},void 0,!1),payments:(0,i.jsxDEV)("path",{d:"M3 7h18v10H3V7Zm0 3h18M7 14h4"},void 0,!1),metrics:(0,i.jsxDEV)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"},void 0,!1),migrations:(0,i.jsxDEV)("path",{d:"M4 12a8 8 0 0 1 13.7-5.6L20 8M20 4v4h-4M20 12a8 8 0 0 1-13.7 5.6L4 16m0 4v-4h4"},void 0,!1),organizations:(0,i.jsxDEV)("path",{d:"M3 21V8l6-4 6 4v13M9 21v-5h2v5M15 11h6v10M18 14v.01M18 17v.01M6 9v.01M6 12v.01M6 15v.01"},void 0,!1),permissions:(0,i.jsxDEV)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-3 8 2.2 2.2L15 9.5M8.5 16h7"},void 0,!1),pitr:(0,i.jsxDEV)("path",{d:"M12 21a9 9 0 1 0-9-9M12 7.5V12l3 2M3 12l-2-2m2 2 2-2"},void 0,!1),queues:(0,i.jsxDEV)("path",{d:"M4 6h16M4 10h16M4 14h10M4 18h10m4-2 3 2-3 2v-4Z"},void 0,!1),realtime:(0,i.jsxDEV)("path",{d:"M5 12a7 7 0 0 1 14 0M8 12a4 4 0 0 1 8 0M12 12v8m0-8a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"},void 0,!1),rls:(0,i.jsxDEV)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3ZM8.5 10h7M8.5 13h7"},void 0,!1),schedule:(0,i.jsxDEV)("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"},void 0,!1),schema:(0,i.jsxDEV)("path",{d:"M4 5h16v14H4V5Zm0 5h16M10 10v9M4 14.5h16"},void 0,!1),sql:(0,i.jsxDEV)("path",{d:"M4 5h16v14H4V5Zm3 4 3 3-3 3m6 0h4"},void 0,!1),storageRules:(0,i.jsxDEV)("path",{d:"M7 10V7a5 5 0 0 1 10 0v3m-11 0h12a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1Zm6 4v2"},void 0,!1),security:(0,i.jsxDEV)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-2.5 8.5 2 2 4-4"},void 0,!1),settings:(0,i.jsxDEV)("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm7.4-3a7.4 7.4 0 0 0-.1-1.2l2-1.6-2-3.4-2.4 1a7.3 7.3 0 0 0-2-1.2l-.4-2.6H10.5l-.4 2.6a7.3 7.3 0 0 0-2 1.2l-2.4-1-2 3.4 2 1.6a7.4 7.4 0 0 0 0 2.4l-2 1.6 2 3.4 2.4-1a7.3 7.3 0 0 0 2 1.2l.4 2.6h3.6l.4-2.6a7.3 7.3 0 0 0 2-1.2l2.4 1 2-3.4-2-1.6a7.4 7.4 0 0 0 .1-1.2Z"},void 0,!1),users:(0,i.jsxDEV)("path",{d:"M16 20v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2M9.5 10a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Zm11.5 10v-2a4 4 0 0 0-3-3.85M16 3.13A4 4 0 0 1 16 11"},void 0,!1),vectors:(0,i.jsxDEV)("path",{d:"M4 7l8-4 8 4-8 4-8-4Zm0 5 8 4 8-4M4 17l8 4 8-4"},void 0,!1),workflows:(0,i.jsxDEV)("path",{d:"M5 5h5v5H5V5Zm9 9h5v5h-5v-5ZM7.5 10v2a2 2 0 0 0 2 2H14m2.5-4V8a2 2 0 0 0-2-2H10"},void 0,!1)},Ya=[{key:"overview",tabs:["home","dashboards"]},{key:"database",tabs:["data","sql","schema","migrations","vectors","pitr","export"]},{key:"functions",tabs:["functions","api","workflows","queues","containers"]},{key:"auth",tabs:["users","organizations","authSessions","authConfig"]},{key:"storage",tabs:["files","storageRules","kv"]},{key:"observability",tabs:["logs","audit","realtime","fanout","metrics","analytics","health"]},{key:"advisors",tabs:["security","rls","permissions","insights"]},{key:"operations",tabs:["schedule","mail","drains","payments","flags"]},{key:"settings",tabs:["settings"]}],Lc={analytics:"analytics",authConfig:"auth",authSessions:"auth",containers:"containers",files:"storage",flags:"flags",kv:"kv",mail:"mail",organizations:"auth",payments:"payments",queues:"queues",schedule:"scheduler",storageRules:"storage",users:"auth",vectors:"vectors",workflows:"workflows"},Ja=a((t,e)=>{let o=Lc[t];return o===void 0||e[o]},"isTabVisible"),Fr=a(t=>{let e=(0,B.c)(2),{tab:o}=t,s=Bc[o],r;return e[0]!==s?(r=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-4 shrink-0",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:s},void 0,!1),e[0]=s,e[1]=r):r=e[1],r},"TabIcon"),Fc=a(t=>t,"exhaustiveRouteTabs"),pi=Fc(["home","data","sql","functions","api","workflows","queues","containers","schema","migrations","vectors","export","pitr","users","organizations","authSessions","authConfig","files","storageRules","kv","dashboards","metrics","analytics","health","security","rls","permissions","insights","logs","realtime","fanout","mail","payments","audit","schedule","drains","flags","settings"]),Hc=new Set(["api","data","sql"]),$c=a(t=>{let e=t.split("/").findLast(Boolean)??"";return pi.includes(e)?e:"home"},"tabFromPathname"),jc=a(t=>{let e=(0,B.c)(19),{chrome:o,connected:s}=t,r=ae(),n;e[0]!==r?(n=r("admin token"),e[0]=r,e[1]=n):n=e[1];let l;e[2]!==n?(l=(0,i.jsxDEV)("label",{className:"text-xs font-medium text-foreground",htmlFor:"dash-app-token",children:n},void 0,!1),e[2]=n,e[3]=l):l=e[3];let d;e[4]!==o.onTokenChange||e[5]!==o.token?(d=(0,i.jsxDEV)(ln,{className:"h-8","data-testid":"dash-app-token",id:"dash-app-token",onChange:o.onTokenChange,placeholder:"LUNORA_ADMIN_TOKEN",type:"password",value:o.token},void 0,!1),e[4]=o.onTokenChange,e[5]=o.token,e[6]=d):d=e[6];let p;e[7]!==s||e[8]!==r?(p=s&&(0,i.jsxDEV)("p",{className:"flex items-start gap-1.5 text-[11px] text-muted-foreground","data-testid":"dash-app-token-warning",role:"note",children:[(0,i.jsxDEV)("span",{"aria-hidden":"true",className:"text-warning",children:"\u26A0"},void 0,!1),r("Token rides the WebSocket URL \u2014 it can surface in browser DevTools and server logs. Use a dev-only token.")]},void 0,!0),e[7]=s,e[8]=r,e[9]=p):p=e[9];let c;e[10]!==o.clearToken||e[11]!==s||e[12]!==r?(c=s&&(0,i.jsxDEV)("button",{className:"self-start rounded-md border border-border px-2.5 py-1 text-xs font-medium outline-none transition-colors hover:bg-accent focus-visible:bg-accent","data-testid":"dash-app-clear-token",onClick:o.clearToken,type:"button",children:r("Clear")},void 0,!1),e[10]=o.clearToken,e[11]=s,e[12]=r,e[13]=c):c=e[13];let u;return e[14]!==l||e[15]!==d||e[16]!==p||e[17]!==c?(u=(0,i.jsxDEV)("div",{className:"flex flex-col gap-2",children:[l,d,p,c]},void 0,!0),e[14]=l,e[15]=d,e[16]=p,e[17]=c,e[18]=u):u=e[18],u},"ConnectPopoverContent"),Uc=a(t=>{let e=(0,B.c)(25),{current:o,group:s,groupLabel:r,selectTab:n,tabDescription:l,tabLabel:d}=t,p=s.tabs.includes(o)?"page":void 0,c=r[s.key],u=s.tabs[0],g;e[0]!==u?(g=(0,i.jsxDEV)(Fr,{tab:u},void 0,!1),e[0]=u,e[1]=g):g=e[1];let m;e[2]!==p||e[3]!==c||e[4]!==g?(m=(0,i.jsxDEV)(ai,{"aria-current":p,"aria-label":c,className:"mx-auto flex size-8 items-center justify-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:bg-sidebar-accent data-[popup-open]:bg-sidebar-accent data-[popup-open]:text-sidebar-accent-foreground data-[popup-open]:shadow-xs aria-[current=page]:bg-sidebar-accent aria-[current=page]:text-sidebar-accent-foreground aria-[current=page]:shadow-xs",delay:120,openOnHover:!0,children:g},void 0,!1),e[2]=p,e[3]=c,e[4]=g,e[5]=m):m=e[5];let h=r[s.key],f;e[6]!==h?(f=(0,i.jsxDEV)("div",{className:"px-2 py-1.5 text-[11px] font-medium tracking-wider text-muted-foreground uppercase",children:h},void 0,!1),e[6]=h,e[7]=f):f=e[7];let v;if(e[8]!==o||e[9]!==s.tabs||e[10]!==n||e[11]!==l||e[12]!==d){let C;e[14]!==o||e[15]!==n||e[16]!==l||e[17]!==d?(C=a(P=>(0,i.jsxDEV)("button",{"aria-current":o===P?"page":void 0,className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-start text-[13px] text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent aria-[current=page]:bg-accent aria-[current=page]:font-medium [&_svg]:opacity-70 aria-[current=page]:[&_svg]:opacity-100","data-tab":P,"data-testid":`dash-tab-${P}`,onClick:n,title:l[P],type:"button",children:[(0,i.jsxDEV)(Fr,{tab:P},void 0,!1),(0,i.jsxDEV)("span",{children:d[P]},void 0,!1)]},P,!0),"t92"),e[14]=o,e[15]=n,e[16]=l,e[17]=d,e[18]=C):C=e[18],v=s.tabs.map(C),e[8]=o,e[9]=s.tabs,e[10]=n,e[11]=l,e[12]=d,e[13]=v}else v=e[13];let x;e[19]!==f||e[20]!==v?(x=(0,i.jsxDEV)(ii,{align:"start",className:"w-56 p-1",side:"right",sideOffset:8,children:[f,v]},void 0,!0),e[19]=f,e[20]=v,e[21]=x):x=e[21];let b;return e[22]!==m||e[23]!==x?(b=(0,i.jsxDEV)(ni,{children:[m,x]},void 0,!0),e[22]=m,e[23]=x,e[24]=b):b=e[24],b},"CollapsedGroupNav"),zc=a(t=>{let e=(0,B.c)(45),{chrome:o,collapsed:s,connected:r}=t,n=ae();if(o===null){let P;e[0]!==n?(P=n("Admin"),e[0]=n,e[1]=P):P=e[1];let N;e[2]===Symbol.for("react.memo_cache_sentinel")?(N=(0,i.jsxDEV)("span",{className:"flex size-8 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:"C"},void 0,!1),e[2]=N):N=e[2];let R;e[3]!==n?(R=n("Admin"),e[3]=n,e[4]=R):R=e[4];let E;e[5]!==R?(E=(0,i.jsxDEV)("span",{className:"truncate text-[13px] font-medium",children:R},void 0,!1),e[5]=R,e[6]=E):E=e[6];let T;e[7]!==n?(T=n("Studio"),e[7]=n,e[8]=T):T=e[8];let k;e[9]!==T?(k=(0,i.jsxDEV)("span",{className:"truncate text-[11px] text-muted-foreground",children:T},void 0,!1),e[9]=T,e[10]=k):k=e[10];let w;e[11]!==E||e[12]!==k?(w=(0,i.jsxDEV)("span",{className:"grid flex-1 text-start leading-tight",children:[E,k]},void 0,!0),e[11]=E,e[12]=k,e[13]=w):w=e[13];let O;return e[14]!==P||e[15]!==w?(O=(0,i.jsxDEV)(ci,{className:"data-active:bg-transparent",size:"lg",tooltip:P,children:[N,w]},void 0,!0),e[14]=P,e[15]=w,e[16]=O):O=e[16],O}let l=s?"mx-auto size-8 justify-center":"w-full p-2",d;e[17]!==l?(d=z("flex items-center gap-2 rounded-md text-start outline-none transition-colors hover:bg-sidebar-accent focus-visible:bg-sidebar-accent",l),e[17]=l,e[18]=d):d=e[18];let p;e[19]!==r||e[20]!==n?(p=n(r?"Connected":"Not connected"),e[19]=r,e[20]=n,e[21]=p):p=e[21];let c=r?"bg-success":"bg-muted-foreground/50",u;e[22]!==c?(u=z("absolute -end-0.5 -bottom-0.5 size-2.5 rounded-full border-2 border-sidebar",c),e[22]=c,e[23]=u):u=e[23];let g;e[24]!==u?(g=(0,i.jsxDEV)("span",{className:"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:["C",(0,i.jsxDEV)("span",{"aria-hidden":"true",className:u},void 0,!1)]},void 0,!0),e[24]=u,e[25]=g):g=e[25];let m;e[26]!==s||e[27]!==r||e[28]!==n?(m=!s&&(0,i.jsxDEV)(i.Fragment,{children:[(0,i.jsxDEV)("span",{className:"grid flex-1 text-start leading-tight",children:[(0,i.jsxDEV)("span",{className:"truncate text-[13px] font-medium",children:n("Admin")},void 0,!1),(0,i.jsxDEV)("span",{className:"truncate text-[11px] text-muted-foreground",children:n(r?"Connected":"Not connected")},void 0,!1)]},void 0,!0),(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.7,viewBox:"0 0 24 24",children:(0,i.jsxDEV)("path",{d:"m8 9 4-4 4 4M8 15l4 4 4-4",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1)},void 0,!1)]},void 0,!0),e[26]=s,e[27]=r,e[28]=n,e[29]=m):m=e[29];let h;e[30]!==d||e[31]!==p||e[32]!==g||e[33]!==m?(h=(0,i.jsxDEV)(ai,{className:d,"data-testid":"dash-app-connect",title:p,children:[g,m]},void 0,!0),e[30]=d,e[31]=p,e[32]=g,e[33]=m,e[34]=h):h=e[34];let f=s?"end":"start",v=s?"right":"top",x;e[35]!==o||e[36]!==r?(x=(0,i.jsxDEV)(jc,{chrome:o,connected:r},void 0,!1),e[35]=o,e[36]=r,e[37]=x):x=e[37];let b;e[38]!==v||e[39]!==x||e[40]!==f?(b=(0,i.jsxDEV)(ii,{align:f,keepMounted:!0,side:v,children:x},void 0,!1),e[38]=v,e[39]=x,e[40]=f,e[41]=b):b=e[41];let C;return e[42]!==b||e[43]!==h?(C=(0,i.jsxDEV)(ni,{children:[h,b]},void 0,!0),e[42]=b,e[43]=h,e[44]=C):C=e[44],C},"SidebarFooterProfile"),Wc=a(t=>{let e=(0,B.c)(28),{chrome:o,connected:s,current:r,groupLabel:n,groups:l,selectTab:d,tabDescription:p,tabLabel:c}=t,u=ae(),{state:g}=Bs(),m=g==="collapsed",h=m&&"justify-center px-0",f;e[0]!==h?(f=z("flex items-center gap-2.5 px-1.5 py-1",h),e[0]=h,e[1]=f):f=e[1];let v;e[2]===Symbol.for("react.memo_cache_sentinel")?(v=(0,i.jsxDEV)(xl,{className:"size-9 shrink-0 text-foreground"},void 0,!1),e[2]=v):v=e[2];let x;e[3]!==m||e[4]!==s||e[5]!==u?(x=!m&&(0,i.jsxDEV)(i.Fragment,{children:[(0,i.jsxDEV)("span",{className:"grid flex-1 leading-tight",children:[(0,i.jsxDEV)("span",{className:"truncate text-sm font-semibold text-foreground",children:"lunora"},void 0,!1),(0,i.jsxDEV)("span",{className:"truncate text-[11px] text-muted-foreground",children:u("Studio")},void 0,!1)]},void 0,!0),(0,i.jsxDEV)(ho,{className:"px-1.5 text-[10px] tracking-wider uppercase",variant:"secondary",children:u(s?"Live":"Local")},void 0,!1)]},void 0,!0),e[3]=m,e[4]=s,e[5]=u,e[6]=x):x=e[6];let b;e[7]!==f||e[8]!==x?(b=(0,i.jsxDEV)(Zl,{children:(0,i.jsxDEV)("div",{className:f,children:[v,x]},void 0,!0)},void 0,!1),e[7]=f,e[8]=x,e[9]=b):b=e[9];let C;e[10]!==m||e[11]!==r||e[12]!==n||e[13]!==l||e[14]!==d||e[15]!==p||e[16]!==c?(C=m?l.map(E=>(0,i.jsxDEV)(Uc,{current:r,group:E,groupLabel:n,selectTab:d,tabDescription:p,tabLabel:c},E.key,!1)):l.map(E=>(0,i.jsxDEV)(Kl,{children:[(0,i.jsxDEV)(Ql,{className:"text-[11px] font-medium tracking-wider uppercase",children:n[E.key]},void 0,!1),(0,i.jsxDEV)(Yl,{children:(0,i.jsxDEV)(Ka,{children:E.tabs.map(T=>(0,i.jsxDEV)(Qa,{children:(0,i.jsxDEV)(ci,{className:"data-active:text-foreground dark:data-active:text-royal-amethyst data-active:shadow-[inset_2px_0_0_0_var(--royal-amethyst)]","data-tab":T,"data-testid":`dash-tab-${T}`,isActive:r===T,onClick:d,title:p[T],tooltip:p[T],children:[(0,i.jsxDEV)(Fr,{tab:T},void 0,!1),(0,i.jsxDEV)("span",{children:c[T]},void 0,!1)]},void 0,!0)},T,!1))},void 0,!1)},void 0,!1)]},E.key,!0)),e[10]=m,e[11]=r,e[12]=n,e[13]=l,e[14]=d,e[15]=p,e[16]=c,e[17]=C):C=e[17];let P;e[18]!==C?(P=(0,i.jsxDEV)(Gl,{children:C},void 0,!1),e[18]=C,e[19]=P):P=e[19];let N;e[20]!==o||e[21]!==m||e[22]!==s?(N=(0,i.jsxDEV)(ql,{children:(0,i.jsxDEV)(Ka,{children:(0,i.jsxDEV)(Qa,{children:(0,i.jsxDEV)(zc,{chrome:o,collapsed:m,connected:s},void 0,!1)},void 0,!1)},void 0,!1)},void 0,!1),e[20]=o,e[21]=m,e[22]=s,e[23]=N):N=e[23];let R;return e[24]!==b||e[25]!==P||e[26]!==N?(R=(0,i.jsxDEV)(Ul,{collapsible:"icon",variant:"inset",children:[b,P,N]},void 0,!0),e[24]=b,e[25]=P,e[26]=N,e[27]=R):R=e[27],R},"StudioSidebar"),ui=a(()=>{let t=(0,B.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsxDEV)("div",{className:"flex flex-col gap-4","data-testid":"dash-pending",children:[(0,i.jsxDEV)("div",{className:"flex items-center gap-2",children:[(0,i.jsxDEV)(cs,{className:"h-8 w-40"},void 0,!1),(0,i.jsxDEV)(cs,{className:"h-8 w-24"},void 0,!1)]},void 0,!0),(0,i.jsxDEV)(cs,{className:"h-72 w-full"},void 0,!1)]},void 0,!0),t[0]=e):e=t[0],e},"RoutePending"),Zc=a(()=>{let t=(0,B.c)(294),e=ae(),o=ft(),s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={select:Yc},t[0]=s):s=t[0];let r=Gr(s),n,l;t[1]!==r?(n=$c(r),l=Hc.has(n),t[1]=r,t[2]=n,t[3]=l):(n=t[2],l=t[3]);let d=l,p=Dr(),c;t[4]!==p?(c=a(it=>({...it,tabs:it.tabs.filter(Lo=>Ja(Lo,p))}),"t2"),t[4]=p,t[5]=c):c=t[5];let u=Ya.map(c).filter(Jc),g,m;t[6]!==n||t[7]!==p||t[8]!==o?(g=a(()=>{Ja(n,p)||$e(o({replace:!0,to:"/home"}))},"t3"),m=[n,p,o],t[6]=n,t[7]=p,t[8]=o,t[9]=g,t[10]=m):(g=t[9],m=t[10]),(0,q.useEffect)(g,m);let h;t[11]!==e?(h=e("Analytics"),t[11]=e,t[12]=h):h=t[12];let f;t[13]!==e?(f=e("API"),t[13]=e,t[14]=f):f=t[14];let v;t[15]!==e?(v=e("Audit"),t[15]=e,t[16]=v):v=t[16];let x;t[17]!==e?(x=e("Configuration"),t[17]=e,t[18]=x):x=t[18];let b;t[19]!==e?(b=e("Sessions"),t[19]=e,t[20]=b):b=t[20];let C;t[21]!==e?(C=e("Containers"),t[21]=e,t[22]=C):C=t[22];let P;t[23]!==e?(P=e("Dashboards"),t[23]=e,t[24]=P):P=t[24];let N;t[25]!==e?(N=e("Data"),t[25]=e,t[26]=N):N=t[26];let R;t[27]!==e?(R=e("Log drains"),t[27]=e,t[28]=R):R=t[28];let E;t[29]!==e?(E=e("Export / Import"),t[29]=e,t[30]=E):E=t[30];let T;t[31]!==e?(T=e("Fan-out"),t[31]=e,t[32]=T):T=t[32];let k;t[33]!==e?(k=e("Files"),t[33]=e,t[34]=k):k=t[34];let w;t[35]!==e?(w=e("Flags"),t[35]=e,t[36]=w):w=t[36];let O;t[37]!==e?(O=e("Functions"),t[37]=e,t[38]=O):O=t[38];let V;t[39]!==e?(V=e("Health"),t[39]=e,t[40]=V):V=t[40];let W;t[41]!==e?(W=e("Home"),t[41]=e,t[42]=W):W=t[42];let D;t[43]!==e?(D=e("Performance"),t[43]=e,t[44]=D):D=t[44];let H;t[45]!==e?(H=e("KV"),t[45]=e,t[46]=H):H=t[46];let $;t[47]!==e?($=e("Logs"),t[47]=e,t[48]=$):$=t[48];let Z;t[49]!==e?(Z=e("Metrics"),t[49]=e,t[50]=Z):Z=t[50];let K;t[51]!==e?(K=e("Migrations"),t[51]=e,t[52]=K):K=t[52];let I;t[53]!==e?(I=e("Organizations"),t[53]=e,t[54]=I):I=t[54];let _;t[55]!==e?(_=e("Time Travel"),t[55]=e,t[56]=_):_=t[56];let U;t[57]!==e?(U=e("Mail"),t[57]=e,t[58]=U):U=t[58];let te;t[59]!==e?(te=e("Payments"),t[59]=e,t[60]=te):te=t[60];let re;t[61]!==e?(re=e("Permissions"),t[61]=e,t[62]=re):re=t[62];let ne;t[63]!==e?(ne=e("Queues"),t[63]=e,t[64]=ne):ne=t[64];let J;t[65]!==e?(J=e("Realtime"),t[65]=e,t[66]=J):J=t[66];let ee;t[67]!==e?(ee=e("RLS Policies"),t[67]=e,t[68]=ee):ee=t[68];let ie;t[69]!==e?(ie=e("Scheduled"),t[69]=e,t[70]=ie):ie=t[70];let Be;t[71]!==e?(Be=e("Schema"),t[71]=e,t[72]=Be):Be=t[72];let me;t[73]!==e?(me=e("Security"),t[73]=e,t[74]=me):me=t[74];let he;t[75]!==e?(he=e("Settings"),t[75]=e,t[76]=he):he=t[76];let ve;t[77]!==e?(ve=e("SQL editor"),t[77]=e,t[78]=ve):ve=t[78];let Le;t[79]!==e?(Le=e("Access Rules"),t[79]=e,t[80]=Le):Le=t[80];let L;t[81]!==e?(L=e("Users"),t[81]=e,t[82]=L):L=t[82];let Q;t[83]!==e?(Q=e("Vectors"),t[83]=e,t[84]=Q):Q=t[84];let X;t[85]!==e?(X=e("Workflows"),t[85]=e,t[86]=X):X=t[86];let xe;t[87]!==C||t[88]!==P||t[89]!==N||t[90]!==R||t[91]!==E||t[92]!==T||t[93]!==k||t[94]!==w||t[95]!==O||t[96]!==V||t[97]!==W||t[98]!==D||t[99]!==H||t[100]!==$||t[101]!==Z||t[102]!==K||t[103]!==I||t[104]!==_||t[105]!==U||t[106]!==te||t[107]!==re||t[108]!==ne||t[109]!==J||t[110]!==ee||t[111]!==ie||t[112]!==Be||t[113]!==me||t[114]!==he||t[115]!==ve||t[116]!==Le||t[117]!==L||t[118]!==Q||t[119]!==X||t[120]!==h||t[121]!==f||t[122]!==v||t[123]!==x||t[124]!==b?(xe={analytics:h,api:f,audit:v,authConfig:x,authSessions:b,containers:C,dashboards:P,data:N,drains:R,export:E,fanout:T,files:k,flags:w,functions:O,health:V,home:W,insights:D,kv:H,logs:$,metrics:Z,migrations:K,organizations:I,pitr:_,mail:U,payments:te,permissions:re,queues:ne,realtime:J,rls:ee,schedule:ie,schema:Be,security:me,settings:he,sql:ve,storageRules:Le,users:L,vectors:Q,workflows:X},t[87]=C,t[88]=P,t[89]=N,t[90]=R,t[91]=E,t[92]=T,t[93]=k,t[94]=w,t[95]=O,t[96]=V,t[97]=W,t[98]=D,t[99]=H,t[100]=$,t[101]=Z,t[102]=K,t[103]=I,t[104]=_,t[105]=U,t[106]=te,t[107]=re,t[108]=ne,t[109]=J,t[110]=ee,t[111]=ie,t[112]=Be,t[113]=me,t[114]=he,t[115]=ve,t[116]=Le,t[117]=L,t[118]=Q,t[119]=X,t[120]=h,t[121]=f,t[122]=v,t[123]=x,t[124]=b,t[125]=xe):xe=t[125];let se=xe,Fe={advisors:e("Advisors"),auth:e("Auth"),database:e("Database"),functions:e("Functions"),observability:e("Observability"),operations:e("Operations"),overview:e("Overview"),settings:e("Settings"),storage:e("Storage")},de;t[126]!==e?(de=e("Usage and latency from Analytics Engine \u2014 request volume, p50/p95, and hot shards."),t[126]=e,t[127]=de):de=t[127];let pe;t[128]!==e?(pe=e("Interactive OpenAPI reference and copy-paste snippets for your functions."),t[128]=e,t[129]=pe):pe=t[129];let Pe;t[130]!==e?(Pe=e("A durable log of admin state-changing operations."),t[130]=e,t[131]=Pe):Pe=t[131];let Re;t[132]!==e?(Re=e("Enabled plugins and session config (read-only)."),t[132]=e,t[133]=Re):Re=t[133];let Se;t[134]!==e?(Se=e("Browse and revoke active sessions across all users."),t[134]=e,t[135]=Se):Se=t[135];let Ne;t[136]!==e?(Ne=e("Live Cloudflare Containers \u2014 current lifecycle state per container from the log stream."),t[136]=e,t[137]=Ne):Ne=t[137];let Ee;t[138]!==e?(Ee=e("Chart widgets backed by saved read-only SQL queries."),t[138]=e,t[139]=Ee):Ee=t[139];let Te;t[140]!==e?(Te=e("Browse and edit rows across your shard and global tables."),t[140]=e,t[141]=Te):Te=t[141];let we;t[142]!==e?(we=e("Forward logs to Logpush, Tail Workers, or a webhook collector."),t[142]=e,t[143]=we):we=t[143];let ke;t[144]!==e?(ke=e("Export a shard to NDJSON, or import rows from it."),t[144]=e,t[145]=ke):ke=t[145];let Oe;t[146]!==e?(Oe=e("Realtime fan-out cost and per-topic subscriber counts for this shard."),t[146]=e,t[147]=Oe):Oe=t[147];let Me;t[148]!==e?(Me=e("Browse objects in your R2 storage buckets."),t[148]=e,t[149]=Me):Me=t[149];let ze;t[150]!==e?(ze=e("Inspect feature flags and their live evaluation under a targeting context."),t[150]=e,t[151]=ze):ze=t[151];let _e;t[152]!==e?(_e=e("Run registered queries, mutations, and actions."),t[152]=e,t[153]=_e):_e=t[153];let We;t[154]!==e?(We=e("At-a-glance connection, error, and shard signals."),t[154]=e,t[155]=We):We=t[155];let Ze;t[156]!==e?(Ze=e("Connection, health, and advisor summary for your deployment."),t[156]=e,t[157]=Ze):Ze=t[157];let qe;t[158]!==e?(qe=e("Surface slow functions, error spikes, and cache problems."),t[158]=e,t[159]=qe):qe=t[159];let Ge;t[160]!==e?(Ge=e("A live stream of recent function logs."),t[160]=e,t[161]=Ge):Ge=t[161];let Ke;t[162]!==e?(Ke=e("Per-shard health and aggregate metrics."),t[162]=e,t[163]=Ke):Ke=t[163];let Qe;t[164]!==e?(Qe=e("Review migration status and run them."),t[164]=e,t[165]=Qe):Qe=t[165];let at;t[166]!==e?(at=e("Browse and manage organizations, members, and invitations."),t[166]=e,t[167]=at):at=t[167];let Ye;t[168]!==e?(Ye=e("Restore a shard to a point in the last 30 days."),t[168]=e,t[169]=Ye):Ye=t[169];let ge;t[170]!==e?(ge=e("Email your app sent, captured in dev."),t[170]=e,t[171]=ge):ge=t[171];let Je;t[172]!==e?(Je=e("Synced customers, subscriptions, and webhook events."),t[172]=e,t[173]=Je):Je=t[173];let Xe;t[174]!==e?(Xe=e("Inspect access policies per table, and probe a function as any identity."),t[174]=e,t[175]=Xe):Xe=t[175];let Ie;t[176]!==e?(Ie=e("Inspect declared Cloudflare Queues \u2014 their producer bindings, consumer mode, and dead-letter queue."),t[176]=e,t[177]=Ie):Ie=t[177];let et;t[178]!==e?(et=e("Active WebSocket subscriptions on this shard."),t[178]=e,t[179]=et):et=t[179];let De;t[180]!==e?(De=e("Inspect row-level-security policies and roles, per table."),t[180]=e,t[181]=De):De=t[181];let tt;t[182]!==e?(tt=e("Inspect and cancel scheduled jobs."),t[182]=e,t[183]=tt):tt=t[183];let Ae;t[184]!==e?(Ae=e("Inspect each table and its columns."),t[184]=e,t[185]=Ae):Ae=t[185];let ot;t[186]!==e?(ot=e("Review admin gates, credentials, and log redaction."),t[186]=e,t[187]=ot):ot=t[187];let Ve;t[188]!==e?(Ve=e("Read-only deployment config \u2014 vars, secrets, and bindings."),t[188]=e,t[189]=Ve):Ve=t[189];let Tt;t[190]!==e?(Tt=e("Run read-only SQL against a shard."),t[190]=e,t[191]=Tt):Tt=t[191];let wt;t[192]!==e?(wt=e("Browse and edit key-value pairs in your Workers KV namespaces."),t[192]=e,t[193]=wt):wt=t[193];let kt;t[194]!==e?(kt=e("Inspect storage access rules \u2014 per bucket, operation, and key prefix."),t[194]=e,t[195]=kt):kt=t[195];let Ot;t[196]!==e?(Ot=e("Manage auth users \u2014 roles, bans, sessions, and identity."),t[196]=e,t[197]=Ot):Ot=t[197];let Mt;t[198]!==e?(Mt=e("Browse Vectorize indexes and run similarity searches."),t[198]=e,t[199]=Mt):Mt=t[199];let _t;t[200]!==e?(_t=e("Inspect declared Cloudflare Workflows and their bindings."),t[200]=e,t[201]=_t):_t=t[201];let Eo;t[202]!==de||t[203]!==pe||t[204]!==Pe||t[205]!==Re||t[206]!==Se||t[207]!==Ne||t[208]!==Ee||t[209]!==Te||t[210]!==we||t[211]!==ke||t[212]!==Oe||t[213]!==Me||t[214]!==ze||t[215]!==_e||t[216]!==We||t[217]!==Ze||t[218]!==qe||t[219]!==Ge||t[220]!==Ke||t[221]!==Qe||t[222]!==at||t[223]!==Ye||t[224]!==ge||t[225]!==Je||t[226]!==Xe||t[227]!==Ie||t[228]!==et||t[229]!==De||t[230]!==tt||t[231]!==Ae||t[232]!==ot||t[233]!==Ve||t[234]!==Tt||t[235]!==wt||t[236]!==kt||t[237]!==Ot||t[238]!==Mt||t[239]!==_t?(Eo={analytics:de,api:pe,audit:Pe,authConfig:Re,authSessions:Se,containers:Ne,dashboards:Ee,data:Te,drains:we,export:ke,fanout:Oe,files:Me,flags:ze,functions:_e,health:We,home:Ze,insights:qe,logs:Ge,metrics:Ke,migrations:Qe,organizations:at,pitr:Ye,mail:ge,payments:Je,permissions:Xe,queues:Ie,realtime:et,rls:De,schedule:tt,schema:Ae,security:ot,settings:Ve,sql:Tt,kv:wt,storageRules:kt,users:Ot,vectors:Mt,workflows:_t},t[202]=de,t[203]=pe,t[204]=Pe,t[205]=Re,t[206]=Se,t[207]=Ne,t[208]=Ee,t[209]=Te,t[210]=we,t[211]=ke,t[212]=Oe,t[213]=Me,t[214]=ze,t[215]=_e,t[216]=We,t[217]=Ze,t[218]=qe,t[219]=Ge,t[220]=Ke,t[221]=Qe,t[222]=at,t[223]=Ye,t[224]=ge,t[225]=Je,t[226]=Xe,t[227]=Ie,t[228]=et,t[229]=De,t[230]=tt,t[231]=Ae,t[232]=ot,t[233]=Ve,t[234]=Tt,t[235]=wt,t[236]=kt,t[237]=Ot,t[238]=Mt,t[239]=_t,t[240]=Eo):Eo=t[240];let fi=Eo,To;t[241]!==o?(To=a(it=>{$e(o({to:`/${it.currentTarget.dataset.tab??""}`}))},"t83"),t[241]=o,t[242]=To):To=t[242];let mi=To,wo,ko;t[243]!==n||t[244]!==se?(wo=a(()=>{typeof document<"u"&&(document.title=`${se[n]} \xB7 lunora`)},"t84"),ko=[n,se],t[243]=n,t[244]=se,t[245]=wo,t[246]=ko):(wo=t[245],ko=t[246]),(0,q.useEffect)(wo,ko);let gi=u.find(it=>it.tabs.includes(n))??Ya[0],Ls=u.flatMap(it=>it.tabs.map(Lo=>({group:Fe[it.key],label:se[Lo],to:`/${Lo}`}))),It=(0,q.use)(di),hi=It!==null&&It.token!=="",Oo;t[247]!==Ls?(Oo=(0,i.jsxDEV)(qa,{items:Ls},void 0,!1),t[247]=Ls,t[248]=Oo):Oo=t[248];let Mo;t[249]===Symbol.for("react.memo_cache_sentinel")?(Mo=(0,i.jsxDEV)(zl,{className:"-ms-1"},void 0,!1),t[249]=Mo):Mo=t[249];let Dt;t[250]!==e?(Dt=e("Breadcrumb"),t[250]=e,t[251]=Dt):Dt=t[251];let Fs=Fe[gi.key],At;t[252]!==Fs?(At=(0,i.jsxDEV)("span",{className:"text-muted-foreground",children:Fs},void 0,!1),t[252]=Fs,t[253]=At):At=t[253];let _o;t[254]===Symbol.for("react.memo_cache_sentinel")?(_o=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5 text-muted-foreground/60",fill:"none",stroke:"currentColor",strokeWidth:1.7,viewBox:"0 0 24 24",children:(0,i.jsxDEV)("path",{d:"m9 6 6 6-6 6",strokeLinecap:"round",strokeLinejoin:"round"},void 0,!1)},void 0,!1),t[254]=_o):_o=t[254];let Hs=se[n],Vt;t[255]!==Hs?(Vt=(0,i.jsxDEV)("span",{className:"font-medium text-foreground",children:Hs},void 0,!1),t[255]=Hs,t[256]=Vt):Vt=t[256];let Bt;t[257]!==Dt||t[258]!==At||t[259]!==Vt?(Bt=(0,i.jsxDEV)("nav",{"aria-label":Dt,className:"flex items-center gap-1.5 text-[13px]",children:[At,_o,Vt]},void 0,!0),t[257]=Dt,t[258]=At,t[259]=Vt,t[260]=Bt):Bt=t[260];let Io;t[261]===Symbol.for("react.memo_cache_sentinel")?(Io=(0,i.jsxDEV)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,i.jsxDEV)("circle",{cx:"11",cy:"11",r:"7"},void 0,!1),(0,i.jsxDEV)("path",{d:"m21 21-4.3-4.3",strokeLinecap:"round"},void 0,!1)]},void 0,!0),t[261]=Io):Io=t[261];let Lt;t[262]!==e?(Lt=e("Search\u2026"),t[262]=e,t[263]=Lt):Lt=t[263];let Do;t[264]===Symbol.for("react.memo_cache_sentinel")?(Do=(0,i.jsxDEV)("kbd",{className:"ms-auto rounded border border-border bg-background px-1 font-sans text-[10px] text-muted-foreground",children:"\u2318K"},void 0,!1),t[264]=Do):Do=t[264];let Ft;t[265]!==Lt?(Ft=(0,i.jsxDEV)("button",{className:"mx-auto hidden h-8 w-72 items-center gap-2 rounded-lg border border-border bg-muted/40 px-3 text-xs text-muted-foreground transition-colors hover:bg-muted md:flex","data-testid":"dash-app-search",onClick:Za,type:"button",children:[Io,Lt,Do]},void 0,!0),t[265]=Lt,t[266]=Ft):Ft=t[266];let Ao;t[267]===Symbol.for("react.memo_cache_sentinel")?(Ao=(0,i.jsxDEV)("div",{className:"ms-auto flex items-center gap-1.5 md:ms-0",children:(0,i.jsxDEV)(Tl,{},void 0,!1)},void 0,!1),t[267]=Ao):Ao=t[267];let Ht;t[268]!==Bt||t[269]!==Ft?(Ht=(0,i.jsxDEV)("header",{className:"flex h-11 shrink-0 items-center gap-2 border-b border-border px-4","data-testid":"dash-app-header",children:[Mo,Bt,Ft,Ao]},void 0,!0),t[268]=Bt,t[269]=Ft,t[270]=Ht):Ht=t[270];let $t;t[271]!==It?.rulesInstalled?($t=It?.rulesInstalled===!1&&(0,i.jsxDEV)(Cl,{},void 0,!1),t[271]=It?.rulesInstalled,t[272]=$t):$t=t[272];let $s=`dash-tab-${n}`,js=d?"flex min-w-0 flex-1 flex-col overflow-hidden":"min-w-0 flex-1 overflow-auto p-6",Us=se[n],jt;t[273]!==e||t[274]!==Us?(jt=e("{title} failed",{title:Us}),t[273]=e,t[274]=Us,t[275]=jt):jt=t[275];let zs=se[n],Ut;t[276]!==e?(Ut=e("Try again"),t[276]=e,t[277]=Ut):Ut=t[277];let Vo;t[278]===Symbol.for("react.memo_cache_sentinel")?(Vo=(0,i.jsxDEV)(q.Suspense,{fallback:(0,i.jsxDEV)(ui,{},void 0,!1),children:(0,i.jsxDEV)(Wr,{},void 0,!1)},void 0,!1),t[278]=Vo):Vo=t[278];let zt;t[279]!==n||t[280]!==jt||t[281]!==zs||t[282]!==Ut?(zt=(0,i.jsxDEV)(ds,{fallbackTitle:jt,label:zs,retryLabel:Ut,children:Vo},n,!1),t[279]=n,t[280]=jt,t[281]=zs,t[282]=Ut,t[283]=zt):zt=t[283];let Wt;t[284]!==js||t[285]!==zt?(Wt=(0,i.jsxDEV)("div",{className:js,children:zt},void 0,!1),t[284]=js,t[285]=zt,t[286]=Wt):Wt=t[286];let Zt;t[287]!==$s||t[288]!==Wt?(Zt=(0,i.jsxDEV)("div",{"aria-labelledby":$s,className:"flex min-w-0 flex-1 flex-col overflow-hidden","data-testid":"dash-panel",id:"dash-panel",role:"tabpanel",children:Wt},void 0,!1),t[287]=$s,t[288]=Wt,t[289]=Zt):Zt=t[289];let Bo;return t[290]!==Ht||t[291]!==$t||t[292]!==Zt?(Bo=(0,i.jsxDEV)(Wl,{className:"overflow-hidden md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",children:[Ht,$t,Zt]},void 0,!0),t[290]=Ht,t[291]=$t,t[292]=Zt,t[293]=Bo):Bo=t[293],(0,i.jsxDEV)(jl,{className:"min-h-0 flex-1","data-testid":"lunora-studio",children:[Oo,(0,i.jsxDEV)(Wc,{chrome:It,connected:hi,current:n,groupLabel:Fe,groups:u,selectTab:mi,tabDescription:fi,tabLabel:se},void 0,!1),Bo]},void 0,!0)},"StudioLayout"),qc=a(t=>{let e=(0,B.c)(5),{initialShardKey:o,schemaEditable:s}=t,r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];let n=Ur(r),{table:l}=n,d=typeof l=="string"?l:void 0,p;return e[1]!==o||e[2]!==d||e[3]!==s?(p=(0,i.jsxDEV)(Oc,{initialShardKey:o,initialTable:d,schemaEditable:s},void 0,!1),e[1]=o,e[2]=d,e[3]=s,e[4]=p):p=e[4],p},"SchemaRoutePanel"),Gc=a(()=>{let t=(0,B.c)(3),e=ft(),o,s;return t[0]!==e?(o=a(()=>{$e(e({replace:!0,to:"/home"}))},"t0"),s=[e],t[0]=e,t[1]=o,t[2]=s):(o=t[1],s=t[2]),(0,q.useEffect)(o,s),null},"NotFoundRedirect"),Kc=a(({basePath:t,dataEditable:e=!1,functions:o,initialShardKey:s,openApiSpec:r,openRpcSpec:n,runAsIdentity:l=!1,schemaEditable:d=!1,scheduledCancel:p,scheduledCron:c,scheduledLoad:u})=>{let g=zr({component:Zc}),m={analytics:(0,i.jsxDEV)(oc,{},void 0,!1),api:(0,i.jsxDEV)(sc,{functions:o,initialShardKey:s,openApiSpec:r,openRpcSpec:n},void 0,!1),audit:(0,i.jsxDEV)(hc,{initialShardKey:s},void 0,!1),authConfig:(0,i.jsxDEV)(rc,{},void 0,!1),authSessions:(0,i.jsxDEV)(nc,{},void 0,!1),containers:(0,i.jsxDEV)(lc,{},void 0,!1),dashboards:(0,i.jsxDEV)(Ec,{initialShardKey:s},void 0,!1),data:(0,i.jsxDEV)(cc,{editable:e,initialShardKey:s},void 0,!1),drains:(0,i.jsxDEV)(vc,{},void 0,!1),export:(0,i.jsxDEV)(dc,{initialShardKey:s},void 0,!1),fanout:(0,i.jsxDEV)(Tc,{initialShardKey:s},void 0,!1),files:(0,i.jsxDEV)(Ic,{},void 0,!1),kv:(0,i.jsxDEV)(Pc,{},void 0,!1),flags:(0,i.jsxDEV)(fc,{initialShardKey:s},void 0,!1),functions:(0,i.jsxDEV)("div",{className:"flex flex-col gap-8",children:[(0,i.jsxDEV)(gc,{functions:o,initialShardKey:s},void 0,!1),(0,i.jsxDEV)(mc,{functions:o,runAsIdentity:l},void 0,!1)]},void 0,!0),health:(0,i.jsxDEV)(wc,{initialShardKey:s},void 0,!1),home:(0,i.jsxDEV)(ja,{initialShardKey:s},void 0,!1),insights:(0,i.jsxDEV)(Xl,{initialShardKey:s},void 0,!1),logs:(0,i.jsxDEV)(xc,{initialShardKey:s},void 0,!1),metrics:(0,i.jsxDEV)(kc,{initialShardKey:s},void 0,!1),migrations:(0,i.jsxDEV)(pc,{initialShardKey:s},void 0,!1),organizations:(0,i.jsxDEV)(ac,{},void 0,!1),permissions:(0,i.jsxDEV)(Sc,{functions:o,runAsIdentity:l,schemaEditable:d},void 0,!1),pitr:(0,i.jsxDEV)(uc,{initialShardKey:s},void 0,!1),mail:(0,i.jsxDEV)(bc,{},void 0,!1),payments:(0,i.jsxDEV)(Rc,{},void 0,!1),queues:(0,i.jsxDEV)(Nc,{},void 0,!1),realtime:(0,i.jsxDEV)(Cc,{initialShardKey:s},void 0,!1),rls:(0,i.jsxDEV)(ec,{},void 0,!1),schedule:(0,i.jsxDEV)(yc,{loadCronJobs:c,scheduledCancel:p,scheduledLoad:u},void 0,!1),schema:(0,i.jsxDEV)(qc,{initialShardKey:s,schemaEditable:d},void 0,!1),security:(0,i.jsxDEV)(tc,{},void 0,!1),settings:(0,i.jsxDEV)(Mc,{initialShardKey:s},void 0,!1),sql:(0,i.jsxDEV)(_c,{initialShardKey:s},void 0,!1),storageRules:(0,i.jsxDEV)(Dc,{},void 0,!1),users:(0,i.jsxDEV)(ic,{},void 0,!1),vectors:(0,i.jsxDEV)(Ac,{},void 0,!1),workflows:(0,i.jsxDEV)(Vc,{},void 0,!1)},h=Ho({component:a(()=>m.home,"component"),getParentRoute:a(()=>g,"getParentRoute"),path:"/"}),f=pi.map(b=>b==="data"?Ho({component:a(()=>m[b],"component"),getParentRoute:a(()=>g,"getParentRoute"),path:`/${b}`,validateSearch:Hn}):Ho({component:a(()=>m[b],"component"),getParentRoute:a(()=>g,"getParentRoute"),path:`/${b}`})),v=g.addChildren([h,...f]),x="window"in globalThis?$r():jr({initialEntries:["/home"]});return Zr({...t===void 0||t==="/"?{}:{basepath:t},defaultNotFoundComponent:Gc,defaultPendingComponent:ui,defaultPendingMinMs:0,defaultPendingMs:0,history:x,routeTree:v})},"buildRouter"),Qc=a(t=>{let e=(0,B.c)(17),{basePath:o,chrome:s,dataEditable:r,functions:n,initialShardKey:l,openApiSpec:d,openRpcSpec:p,runAsIdentity:c,schemaEditable:u,scheduledCancel:g,scheduledCron:m,scheduledLoad:h}=t,f;e[0]!==o||e[1]!==r||e[2]!==n||e[3]!==l||e[4]!==d||e[5]!==p||e[6]!==c||e[7]!==g||e[8]!==m||e[9]!==h||e[10]!==u?(f=Kc({basePath:o,dataEditable:r,functions:n,initialShardKey:l,openApiSpec:d,openRpcSpec:p,runAsIdentity:c,schemaEditable:u,scheduledCancel:g,scheduledCron:m,scheduledLoad:h}),e[0]=o,e[1]=r,e[2]=n,e[3]=l,e[4]=d,e[5]=p,e[6]=c,e[7]=g,e[8]=m,e[9]=h,e[10]=u,e[11]=f):f=e[11];let v=f,x=s??null,b;e[12]!==v?(b=(0,i.jsxDEV)(qr,{router:v},void 0,!1),e[12]=v,e[13]=b):b=e[13];let C;return e[14]!==x||e[15]!==b?(C=(0,i.jsxDEV)(di,{value:x,children:b},void 0,!1),e[14]=x,e[15]=b,e[16]=C):C=e[16],C},"StudioShell"),E0=a(t=>{let e=(0,B.c)(17),{basePath:o,chrome:s,dataEditable:r,functions:n,i18n:l,initialShardKey:d,locale:p,openApiSpec:c,openRpcSpec:u,runAsIdentity:g,schemaEditable:m,scheduledCancel:h,scheduledCron:f,scheduledLoad:v}=t,x;e[0]!==o||e[1]!==s||e[2]!==r||e[3]!==n||e[4]!==d||e[5]!==c||e[6]!==u||e[7]!==g||e[8]!==h||e[9]!==f||e[10]!==v||e[11]!==m?(x=(0,i.jsxDEV)(Qc,{basePath:o,chrome:s,dataEditable:r,functions:n,initialShardKey:d,openApiSpec:c,openRpcSpec:u,runAsIdentity:g,scheduledCancel:h,scheduledCron:f,scheduledLoad:v,schemaEditable:m},void 0,!1),e[0]=o,e[1]=s,e[2]=r,e[3]=n,e[4]=d,e[5]=c,e[6]=u,e[7]=g,e[8]=h,e[9]=f,e[10]=v,e[11]=m,e[12]=x):x=e[12];let b=x;if(l===void 0&&p===void 0)return b;let C;return e[13]!==l||e[14]!==p||e[15]!==b?(C=(0,i.jsxDEV)(Wa,{i18n:l,locale:p,children:b},void 0,!1),e[13]=l,e[14]=p,e[15]=b,e[16]=C):C=e[16],C},"Studio");function Yc(t){return t.location.pathname}a(Yc,"_temp");function Jc(t){return t.tabs.length>0}a(Jc,"_temp2");export{ds as a,Wa as b,S0 as c,ml as d,N0 as e,xl as f,kl as g,_l as h,Il as i,Dl as j,E0 as k};