@snagset/server 0.1.19 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.js +3 -0
- package/dist/app.js.map +1 -1
- package/dist/db/migrations/0011_guest_status.sql +24 -0
- package/dist/instance/region.js +78 -0
- package/dist/instance/region.js.map +1 -0
- package/dist/projectCache.js +1 -1
- package/dist/projectCache.js.map +1 -1
- package/dist/routes/owner.js +7 -2
- package/dist/routes/owner.js.map +1 -1
- package/dist/routes/sessions.js +22 -5
- package/dist/routes/sessions.js.map +1 -1
- package/dist/routes/sites.js +24 -3
- package/dist/routes/sites.js.map +1 -1
- package/dist/routes/threads.js +39 -14
- package/dist/routes/threads.js.map +1 -1
- package/package.json +1 -1
- package/static/dashboard/assets/{CompositeItem-wqcRki5s.js → CompositeItem-9k6gamy_.js} +1 -1
- package/static/dashboard/assets/{ConfirmDialog-BqK5eJxB.js → ConfirmDialog-CJ4rxhiM.js} +1 -1
- package/static/dashboard/assets/{CopyButton-Cc4nF6JB.js → CopyButton-DQaUk_fX.js} +1 -1
- package/static/dashboard/assets/{FieldItemContext-DVLVe_H8.js → FieldItemContext-DwjMGEtR.js} +1 -1
- package/static/dashboard/assets/{InstallTag-DCRj1B-Z.js → InstallTag-Bv5eJ-pY.js} +1 -1
- package/static/dashboard/assets/{SaveState-B5TIvzLh.js → SaveState-BAmXwwnU.js} +1 -1
- package/static/dashboard/assets/{_app-DdvP8iZf.js → _app-BhtEIIYY.js} +1 -1
- package/static/dashboard/assets/{_app-BOhhOcC-.js → _app-dUX6QHB2.js} +2 -2
- package/static/dashboard/assets/{activity-CaCW3Nql.js → activity-C0C-uw85.js} +1 -1
- package/static/dashboard/assets/{arrow-left-B5Z7SkRz.js → arrow-left-5yNow0eG.js} +1 -1
- package/static/dashboard/assets/{avatar-CFgdRtiV.js → avatar-BTlpQ4so.js} +1 -1
- package/static/dashboard/assets/{badge-BIVx2feC.js → badge-D1jeec03.js} +1 -1
- package/static/dashboard/assets/{card-HwCaU_bv.js → card-BVWe16yF.js} +1 -1
- package/static/dashboard/assets/{check-CMqBU0e3.js → check-9egtmHPl.js} +1 -1
- package/static/dashboard/assets/{chevron-right-CY_sUg3i.js → chevron-right-Bmstp0HK.js} +1 -1
- package/static/dashboard/assets/{copy-Cn6p0txj.js → copy-GnUBMqNX.js} +1 -1
- package/static/dashboard/assets/{dialog-_GPHTnXl.js → dialog-BGVcKKLs.js} +1 -1
- package/static/dashboard/assets/{dropdown-menu-BEcLmKR6.js → dropdown-menu-DwN7ik3X.js} +1 -1
- package/static/dashboard/assets/{image-off-CyXpcTZd.js → image-off-BV5DPLn4.js} +1 -1
- package/static/dashboard/assets/{index-BZAfm4kX.js → index-DFxWyhmm.js} +15 -15
- package/static/dashboard/assets/{invite-iirWwB3z.js → invite-D7bpUPrA.js} +1 -1
- package/static/dashboard/assets/{label-C9GdL6JP.js → label-CxnO6qKO.js} +1 -1
- package/static/dashboard/assets/{layout-grid-3hfjyzci.js → layout-grid-xfets3-n.js} +1 -1
- package/static/dashboard/assets/me-C8ixZq4k.js +1 -0
- package/static/dashboard/assets/{parts-BOtvDu_v.js → parts-fnhfMAxC.js} +1 -1
- package/static/dashboard/assets/{plus-CTKInfcq.js → plus-BxZTgJzO.js} +1 -1
- package/static/dashboard/assets/s._site-B5wWH_CZ.js +1 -0
- package/static/dashboard/assets/{s._site.comments-DZBq2FkM.js → s._site.comments-_0tYLKCp.js} +1 -1
- package/static/dashboard/assets/{s._site.reviewers-YfizOkhz.js → s._site.reviewers-bbW3QZhQ.js} +1 -1
- package/static/dashboard/assets/s._site.settings-oWHkv4r8.js +1 -0
- package/static/dashboard/assets/{setup-4E2PxysX.js → setup-CLmg80L_.js} +1 -1
- package/static/dashboard/assets/{sign-in-Nda93fWo.js → sign-in-C2kQL0Ys.js} +1 -1
- package/static/dashboard/assets/{sign-up-kWIqmM8W.js → sign-up-DhbXaP75.js} +1 -1
- package/static/dashboard/assets/{sites-DbhDznKA.js → sites-CD7tpHGZ.js} +1 -1
- package/static/dashboard/assets/studio-C8vSzSiD.js +1 -0
- package/static/dashboard/assets/{studio-ml7KCROJ.js → studio-DWr-gNJq.js} +1 -1
- package/static/dashboard/assets/{studio.index-CZXgB0jx.js → studio.index-BANtPBsV.js} +1 -1
- package/static/dashboard/assets/{studio.integrations-OprNYBrJ.js → studio.integrations-DA6TbGub.js} +1 -1
- package/static/dashboard/assets/{studio.members-DT93LEwF.js → studio.members-CTj98khj.js} +1 -1
- package/static/dashboard/assets/{sun--lA9pLT9.js → sun-Dd-jHZ7E.js} +1 -1
- package/static/dashboard/assets/{switch-BCNx3nDC.js → switch-MVges_VF.js} +1 -1
- package/static/dashboard/assets/{table-B1e35-OI.js → table-DY_ZkUQS.js} +1 -1
- package/static/dashboard/assets/{useAriaLabelledBy-BLgC8mE_.js → useAriaLabelledBy-D-E1Md1d.js} +1 -1
- package/static/dashboard/assets/{useBaseQuery-CZkDX1tZ.js → useBaseQuery-CmgDPl0Z.js} +1 -1
- package/static/dashboard/assets/useQuery-DKkrpniW.js +1 -0
- package/static/dashboard/assets/useRender-P0lZXDvs.js +1 -0
- package/static/dashboard/assets/{useValueChanged-CCRl5Bf5.js → useValueChanged-CFJAwkwT.js} +1 -1
- package/static/dashboard/assets/{users-DCeMsa2g.js → users-DbYHCs3H.js} +1 -1
- package/static/dashboard/assets/{welcome-Il9zYmvM.js → welcome-BRH6NIwS.js} +1 -1
- package/static/dashboard/assets/{widget-signin-BLNsOS5K.js → widget-signin-DO_gjUUQ.js} +1 -1
- package/static/dashboard/assets/{you-B2lWBXCD.js → you-rr6TKyGj.js} +1 -1
- package/static/dashboard/assets/{zod-DG4VLz0r.js → zod-Di32GmP2.js} +1 -1
- package/static/dashboard/index.html +1 -1
- package/static/widget/snag.dock.js +5 -5
- package/static/widget/snag.runtime.js +2 -2
- package/static/dashboard/assets/me-Bgw9jS9F.js +0 -1
- package/static/dashboard/assets/s._site-Bi7roN7x.js +0 -1
- package/static/dashboard/assets/s._site.settings-Dbua1pYa.js +0 -1
- package/static/dashboard/assets/studio-MNEmZ3n7.js +0 -1
- package/static/dashboard/assets/useQuery-C0BVsxqZ.js +0 -1
- package/static/dashboard/assets/useRender-P5Wj_Sbt.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{u as pt,a as gt,b as
|
|
1
|
+
import{u as pt,a as gt,b as ht,c as I,r as o,d as z,e as le,g as ft,j as e,B as J,f as w,h as se,m as be,E as xt,i as ve,k as ge,l as mt,n as bt,o as ne,S as vt,p as Z,q as jt,L as _,s as yt,t as _e,M as St,v as wt,w as Nt,x as Ct,y as kt,O as Tt}from"./index-DFxWyhmm.js";import{u as He}from"./useQuery-DKkrpniW.js";import{T as Pt,i as ze,a as Rt,D as Mt,b as Et,c as Ot,X as Dt,d as It,e as At,f as _t,g as Ht,R as zt,p as Lt,h as $t,j as Bt,k as Ft,P as Ut,l as qt,u as Gt,m as Vt,n as Kt,o as Yt,q as Wt,r as Xt,s as Qt,t as Jt,v as Zt,w as es,x as ts,y as ss,z as ns,A as as,F as rs,B as os,C as is,E as Le,G as $e,H as Be,I as ls,J as ds,K as cs}from"./dialog-BGVcKKLs.js";import{c as B,n as Fe,g as us,a as he,t as ps,d as gs,i as hs,u as fs,b as de,L as xs,I as ms}from"./label-CxnO6qKO.js";import{g as fe,u as bs,a as vs,b as js,s as ys,c as Ss,d as ws,e as Ns,f as Cs,h as ks,S as Ue,E as Q,D as ae,i as re,j as oe,k as je,l as ee,m as D,n as V,o as Ts,p as ce}from"./dropdown-menu-DwN7ik3X.js";import{u as qe}from"./useRender-P0lZXDvs.js";import{A as Ps,a as Rs}from"./avatar-BTlpQ4so.js";import{S as Ms,i as Es,a as Os}from"./labels--UUyt9uB.js";import{u as Ge}from"./me-C8ixZq4k.js";import{L as te}from"./layout-grid-xfets3-n.js";import{U as xe}from"./users-DbYHCs3H.js";import{c as Ds}from"./update-duXzIzFS.js";import{P as Ve}from"./plus-BxZTgJzO.js";import{M as Is,S as As,a as _s}from"./sun-Dd-jHZ7E.js";import"./useBaseQuery-CmgDPl0Z.js";import"./check-9egtmHPl.js";import"./CompositeItem-9k6gamy_.js";import"./useValueChanged-CFJAwkwT.js";function Hs(t){const s=pt({warn:t?.router===void 0}),n=t?.router||s;return gt(n.stores.__store,ht(t,n))}/**
|
|
2
2
|
* @license lucide-react v1.39.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -53,4 +53,4 @@ import{u as pt,a as gt,b as ft,c as I,r as o,d as z,e as le,g as ht,j as e,B as
|
|
|
53
53
|
*
|
|
54
54
|
* This source code is licensed under the ISC license.
|
|
55
55
|
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const Qs=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Qe=I("user",Qs),ue=768;function Js(){const[t,s]=o.useState(void 0);return o.useEffect(()=>{const n=window.matchMedia(`(max-width: ${ue-1}px)`),a=()=>{s(window.innerWidth<ue)};return n.addEventListener("change",a),s(window.innerWidth<ue),()=>n.removeEventListener("change",a)},[]),!!t}const Zs=o.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Pt,currentIdRef:{current:null},currentContextRef:{current:null}});function en(t,s){t.current=s.current}function tn(t,s={open:!1}){const{open:n}=s,a="rootStore"in t?t.rootStore:t,r=a.useState("floatingId"),f=o.useContext(Zs),{currentIdRef:d,delayRef:i,timeoutMs:h,initialDelayRef:c,currentContextRef:g,hasProvider:j,timeout:x}=f,[m,p]=o.useState(!1),S=o.useRef(n);return z(()=>{S.current=n},[n]),z(()=>{function u(){g.current?.setIsInstantPhase(!1),d.current=null,g.current=null,i.current=c.current,x.clear()}if(d.current&&!n&&d.current===r){if(p(!1),h){const b=r;return x.start(h,()=>{a.select("open")||d.current&&d.current!==b||u()}),()=>{(S.current||d.current!==b)&&x.clear()}}u()}},[n,r,d,i,h,c,g,x,a]),z(()=>{if(!n)return;const u=g.current,b=d.current;x.clear(),g.current={onOpenChange:a.setOpen,setIsInstantPhase:p},d.current=r,i.current={open:0,close:he(c.current,"close")},b!==null&&b!==r?(p(!0),u?.setIsInstantPhase(!0),u?.onOpenChange(!1,B(Fe))):(p(!1),u?.setIsInstantPhase(!1))},[n,r,a,d,i,c,g,x]),z(()=>()=>{if(d.current===r){if(g.current=null,!S.current)return;d.current=null,en(i,c),x.clear()}},[g,d,i,r,c,x]),o.useMemo(()=>({hasProvider:j,delayRef:i,isInstantPhase:m}),[j,i,m])}function sn(t,s){let n=null,a=null,r=!1;return{contextElement:t||void 0,getBoundingClientRect(){const f=t?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},d=s.axis==="x"||s.axis==="both",i=s.axis==="y"||s.axis==="both",h=["mouseenter","mousemove"].includes(s.dataRef.current.openEvent?.type||"")&&s.pointerType!=="touch";let c=f.width,g=f.height,j=f.x,x=f.y;return n==null&&s.x&&d&&(n=f.x-s.x),a==null&&s.y&&i&&(a=f.y-s.y),j-=n||0,x-=a||0,c=0,g=0,!r||h?(c=s.axis==="y"?f.width:0,g=s.axis==="x"?f.height:0,j=d&&s.x!=null?s.x:j,x=i&&s.y!=null?s.y:x):r&&!h&&(g=s.axis==="x"?f.height:g,c=s.axis==="y"?f.width:c),r=!0,{width:c,height:g,x:j,y:x,top:x,right:j+c,bottom:x+g,left:j}}}}function Ee(t){return t!=null&&t.clientX!=null}function nn(t,s={}){const{enabled:n=!0,axis:a="both"}=s,r="rootStore"in t?t.rootStore:t,f=r.useState("open"),d=r.useState("floatingElement"),i=r.useState("domReferenceElement"),h=r.context.dataRef,c=o.useRef(!1),g=o.useRef(null),[j,x]=o.useState(),[m,p]=o.useState([]),S=le(v=>{r.set("positionReference",v)}),u=le((v,y,P)=>{c.current||h.current.openEvent&&!Ee(h.current.openEvent)||r.set("positionReference",sn(P??i,{x:v,y,axis:a,dataRef:h,pointerType:j}))}),b=le(v=>{f?g.current||(u(v.clientX,v.clientY,v.currentTarget),p([])):u(v.clientX,v.clientY,v.currentTarget)}),N=ze(j)?d:f;o.useEffect(()=>{if(!n){S(i);return}if(!N)return;function v(){g.current?.(),g.current=null}const y=ht(d);function P(l){const k=us(l);fe(d,k)?v():u(l.clientX,l.clientY)}return!h.current.openEvent||Ee(h.current.openEvent)?g.current=Rt(y,"mousemove",P):S(i),v},[N,n,d,h,i,r,u,S,m]),o.useEffect(()=>()=>{r.set("positionReference",null)},[r]),o.useEffect(()=>{n&&!d&&(c.current=!1)},[n,d]),o.useEffect(()=>{!n&&f&&(c.current=!0)},[n,f]);const C=o.useMemo(()=>{function v(y){x(y.pointerType)}return{onPointerDown:v,onPointerEnter:v,onMouseMove:b,onMouseEnter:b}},[b]);return o.useMemo(()=>n?{reference:C,trigger:C}:{},[n,C])}function an({...t}){return e.jsx(Mt,{"data-slot":"sheet",...t})}function rn({...t}){return e.jsx(_t,{"data-slot":"sheet-portal",...t})}function on({className:t,...s}){return e.jsx(Ht,{"data-slot":"sheet-overlay",className:w("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",t),...s})}function ln({className:t,children:s,side:n="right",showCloseButton:a=!0,...r}){return e.jsxs(rn,{children:[e.jsx(on,{}),e.jsxs(Et,{"data-slot":"sheet-content","data-side":n,className:w("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm 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-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] 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-l data-[side=right]:data-ending-style:translate-x-[2.5rem] 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:[s,a&&e.jsxs(Ot,{"data-slot":"sheet-close",render:e.jsx(J,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[e.jsx(Dt,{}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function dn({className:t,...s}){return e.jsx("div",{"data-slot":"sheet-header",className:w("flex flex-col gap-0.5 p-4",t),...s})}function cn({className:t,...s}){return e.jsx(It,{"data-slot":"sheet-title",className:w("font-heading text-base font-medium text-foreground",t),...s})}function un({className:t,...s}){return e.jsx(At,{"data-slot":"sheet-description",className:w("text-sm text-muted-foreground",t),...s})}const Je=o.createContext(void 0);function K(t){const s=o.useContext(Je);if(s===void 0&&!t)throw new Error(se(72));return s}const pn={...Lt,disabled:t=>t.disabled,instantType:t=>t.instantType,isInstantPhase:t=>t.isInstantPhase,trackCursorAxis:t=>t.trackCursorAxis,disableHoverablePopup:t=>t.disableHoverablePopup,lastOpenChangeReason:t=>t.openChangeReason,closeOnClick:t=>t.closeOnClick,closeDelay:t=>t.closeDelay,adaptiveOrigin:t=>t.adaptiveOrigin};class gn extends zt{constructor(s,n,a){const r=new Ut;super(fn(s,r,n,a),hn(r),pn)}setOpen=(s,n)=>{$t(this,s,n,{extraState:{openChangeReason:n.reason}})};cancelPendingOpen(s){this.state.floatingRootContext.dispatchOpenChange(!1,B(ps,s))}}function fn(t,s,n,a=!1){const r={...Bt(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...t};return r.floatingRootContext=Ft(s,n,a),r}function hn(t){return{popupRef:o.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:t}}const xn=qt(function(s){const{disabled:n=!1,defaultOpen:a=!1,open:r,disableHoverablePopup:f=!1,trackCursorAxis:d="none",actionsRef:i,onOpenChange:h,onOpenChangeComplete:c,handle:g,triggerId:j,defaultTriggerId:x=null,children:m}=s,p=Gt(($,F)=>new gn({open:a,openProp:r,activeTriggerId:x,triggerIdProp:j},$,F));p.useControlledProp("openProp",r),p.useControlledProp("triggerIdProp",j),p.useContextCallback("onOpenChange",h),p.useContextCallback("onOpenChangeComplete",c);const S=p.useState("open"),u=!n&&S,b=p.useState("activeTriggerId"),N=p.useState("mounted"),C=p.useState("payload");p.useSyncedValues({trackCursorAxis:d,disableHoverablePopup:f,disabled:n}),Vt(p,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:v,transitionStatus:y}=Kt(u,p),P=p.useState("isInstantPhase"),l=p.useState("instantType"),k=p.useState("lastOpenChangeReason"),R=o.useRef(null);z(()=>{S&&n&&p.setOpen(!1,B(gs))},[S,n,p]),z(()=>{y==="ending"&&k===Fe||y!=="ending"&&P?(l!=="delay"&&(R.current=l),p.set("instantType","delay")):R.current!==null&&(p.set("instantType",R.current),R.current=null)},[y,P,k,l,p]),z(()=>{u&&b==null&&p.set("payload",void 0)},[p,b,u]),o.useImperativeHandle(i,()=>({unmount:v,close:()=>p.setOpen(!1,B(fs))}),[v,p]);const L=u||N||!n&&d!=="none";return e.jsxs(Je.Provider,{value:p,children:[g&&e.jsx(Yt,{handle:g,store:p}),L&&e.jsx(mn,{store:p,disabled:n,trackCursorAxis:d}),typeof m=="function"?m({payload:C}):m]})});function mn({store:t,disabled:s,trackCursorAxis:n}){const a=t.useState("floatingRootContext"),r=Wt(a,{enabled:!s,referencePress:()=>t.select("closeOnClick")}),f=nn(a,{enabled:!s&&n!=="none",axis:n==="none"?void 0:n}),d=o.useMemo(()=>be(f.reference,r.reference),[f.reference,r.reference]);return Xt(t,{activeTriggerProps:d,inactiveTriggerProps:d,popupProps:r.floating??xt}),null}const bn=o.createContext(void 0);function vn(){return o.useContext(bn)}const Oe=600,Ze="data-base-ui-tooltip-trigger";function De(t){if("composedPath"in t){const n=t.composedPath();for(let a=0;a<n.length;a+=1){const r=n[a];if(ge(r))return r}}const s=t.target;return ge(s)?s:null}function jn(t){let s=t;for(;s;){const n=s.closest(`[${Ze}]`);if(n)return n;const a=s.getRootNode();s="host"in a&&ge(a.host)?a.host:null}return null}const yn=Qt(function(s,n){const{render:a,className:r,style:f,handle:d,payload:i,disabled:h,delay:c,closeOnClick:g=!0,closeDelay:j,id:x,...m}=s,p=K(!0),u=bs(d)??p;if(!u)throw new Error(se(82));const b=hs(x),N=u.useState("isTriggerActive",b),C=u.useState("isOpenedByTrigger",b),v=u.useState("floatingRootContext"),y=o.useRef(null),P=c??Oe,l=j??0,{registerTrigger:k,isMountedByThisTrigger:R}=Jt(b,y,u,{payload:i,closeOnClick:g,closeDelay:l}),L=vn(),{delayRef:$,isInstantPhase:F,hasProvider:M}=tn(v,{open:C}),U=vs(v);u.useSyncedValue("isInstantPhase",F);const ie=u.useState("disabled"),q=h??ie,Ce=Zt(q),Ne=u.useState("trackCursorAxis"),rt=u.useState("disableHoverablePopup"),G=o.useRef(!1),Y=es(),W=o.useRef(void 0);function ke(){return M?he($.current,"open")===0?0:c??L??Oe:P}function Te(T){const A=y.current;if(!A||!T)return!1;const H=jn(T);return H!==null&&H!==A&&fe(A,H)}function ot(T){const A=Te(T);return G.current=A,A&&(U.openChangeTimeout.clear(),U.restTimeout.clear(),U.restTimeoutPending=!1,Y.clear()),A}const it=js(v,{enabled:!q,mouseOnly:!0,move:!1,handleClose:!rt&&Ne!=="both"?ys():null,restMs:ke,delay(){return j==null&&M?{close:he($.current,"close")}:{close:l}},triggerElementRef:y,isActiveTrigger:N,isClosing:()=>u.select("transitionStatus")==="ending",shouldOpen(){return!G.current}}),lt=Ss(v,{enabled:!q}).reference,dt=T=>{const A=G.current,H=De(T),Pe=ot(H),X=y.current,ut=X&&H&&fe(X,H);if(Pe&&u.select("open")&&u.select("lastOpenChangeReason")===de){u.setOpen(!1,B(de,T));return}if(A&&!Pe&&ut&&!Ce.current&&!u.select("open")&&X&&ze(W.current)){const Re=()=>{!G.current&&!Ce.current&&!u.select("open")&&u.setOpen(!0,B(de,T,X))},Me=ke();Me===0?(Y.clear(),Re()):Y.start(Me,Re)}},ct=u.useState("triggerProps",R);return ve("button",s,{state:{open:C},ref:[n,k,y],props:[it,lt,R||Ne!=="none"?ct:void 0,{onMouseOver(T){dt(T.nativeEvent)},onFocus(T){Te(De(T.nativeEvent))&&T.preventBaseUIHandler()},onMouseLeave(){G.current=!1,Y.clear(),W.current=void 0},onPointerEnter(T){W.current=T.pointerType},onPointerDown(T){W.current=T.pointerType,u.set("closeOnClick",g),g&&!u.select("open")&&u.cancelPendingOpen(T.nativeEvent)},onClick(T){g&&!u.select("open")&&u.cancelPendingOpen(T.nativeEvent)},id:b,"data-trigger-disabled":q?"":void 0,[Ze]:q?void 0:""},m],stateAttributesMapping:ts})}),et=o.createContext(void 0);function Sn(){const t=o.useContext(et);if(t===void 0)throw new Error(se(70));return t}const wn=o.forwardRef(function(s,n){const{children:a,container:r,className:f,render:d,style:i,...h}=s,{node:c,subtree:g}=ss({container:r,ref:n,componentProps:s,elementProps:h});return!g&&!c?null:e.jsxs(o.Fragment,{children:[g,c&&mt.createPortal(a,c)]})}),Cn=o.forwardRef(function(s,n){const{keepMounted:a=!1,...r}=s;return K().useState("mounted")||a?e.jsx(et.Provider,{value:a,children:e.jsx(wn,{ref:n,...r})}):null}),tt=o.createContext(void 0);function st(){const t=o.useContext(tt);if(t===void 0)throw new Error(se(71));return t}const Nn=o.forwardRef(function(s,n){const{render:a,className:r,anchor:f,positionMethod:d="absolute",side:i="top",align:h="center",sideOffset:c=0,alignOffset:g=0,collisionBoundary:j="clipping-ancestors",collisionPadding:x=5,arrowPadding:m=5,sticky:p=!1,disableAnchorTracking:S=!1,collisionAvoidance:u=ns,style:b,...N}=s,C=K(),v=Sn(),y=C.useState("open"),P=C.useState("mounted"),l=C.useState("trackCursorAxis"),k=C.useState("disableHoverablePopup"),R=C.useState("floatingRootContext"),L=C.useState("instantType"),$=C.useState("transitionStatus"),F=C.useState("adaptiveOrigin"),M=ws({anchor:f,positionMethod:d,floatingRootContext:R,mounted:P,side:i,sideOffset:c,align:h,alignOffset:g,collisionBoundary:j,collisionPadding:x,sticky:p,arrowPadding:m,disableAnchorTracking:S,keepMounted:v,collisionAvoidance:u,adaptiveOrigin:F}),U=o.useMemo(()=>({open:y,side:M.side,align:M.align,anchorHidden:M.anchorHidden,instant:l!=="none"?"tracking-cursor":L}),[y,M.side,M.align,M.anchorHidden,l,L]),ie=Cs(s,U,{styles:M.positionerStyles,transitionStatus:$,props:N,refs:[n,C.useStateSetter("positionerElement")],hidden:!P,inert:!y||l==="both"||k});return e.jsx(tt.Provider,{value:M,children:ie})}),kn=o.forwardRef(function(s,n){const{render:a,className:r,style:f,...d}=s,i=K(),{side:h,align:c}=st(),g=i.useState("open"),j=i.useState("instantType"),x=i.useState("transitionStatus"),m=i.useState("popupProps"),p=i.useState("floatingRootContext"),S=i.useState("disabled"),u=i.useState("closeDelay");as({open:g,ref:i.context.popupRef,onComplete(){g&&i.context.onOpenChangeComplete?.(!0)}}),Ns(p,{enabled:!S,closeDelay:u});const b=i.useStateSetter("popupElement");return ve("div",s,{state:{open:g,side:h,align:c,instant:j,transitionStatus:x},ref:[n,i.context.popupRef,b],props:[rs,m,ks(x),d],stateAttributesMapping:os})}),Tn=o.forwardRef(function(s,n){const{render:a,className:r,style:f,...d}=s,i=K(),{arrowRef:h,side:c,align:g,arrowUncentered:j,arrowStyles:x}=st(),m=i.useState("open"),p=i.useState("instantType");return ve("div",s,{state:{open:m,side:c,align:g,uncentered:j,instant:p},ref:[n,h],props:[{style:x,"aria-hidden":!0},d],stateAttributesMapping:is})});function Pn({...t}){return e.jsx(xn,{"data-slot":"tooltip",...t})}function Rn({...t}){return e.jsx(yn,{"data-slot":"tooltip-trigger",...t})}function Mn({className:t,side:s="top",sideOffset:n=4,align:a="center",alignOffset:r=0,children:f,...d}){return e.jsx(Cn,{children:e.jsx(Nn,{align:a,alignOffset:r,side:s,sideOffset:n,className:"isolate z-50",children:e.jsxs(kn,{"data-slot":"tooltip-content",className:w("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]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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-sm 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),...d,children:[f,e.jsx(Tn,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-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"})]})})})}const En="sidebar_state",On=3600*24*7,Dn="16rem",In="18rem",An="3rem",_n="b",nt=o.createContext(null);function we(){const t=o.useContext(nt);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function Hn({defaultOpen:t=!0,open:s,onOpenChange:n,className:a,style:r,children:f,...d}){const i=Js(),[h,c]=o.useState(!1),[g,j]=o.useState(t),x=s??g,m=o.useCallback(b=>{const N=typeof b=="function"?b(x):b;n?n(N):j(N),document.cookie=`${En}=${N}; path=/; max-age=${On}`},[n,x]),p=o.useCallback(()=>i?c(b=>!b):m(b=>!b),[i,m,c]);o.useEffect(()=>{const b=N=>{N.key===_n&&(N.metaKey||N.ctrlKey)&&(N.preventDefault(),p())};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[p]);const S=x?"expanded":"collapsed",u=o.useMemo(()=>({state:S,open:x,setOpen:m,isMobile:i,openMobile:h,setOpenMobile:c,toggleSidebar:p}),[S,x,m,i,h,c,p]);return e.jsx(nt.Provider,{value:u,children:e.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Dn,"--sidebar-width-icon":An,...r},className:w("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",a),...d,children:f})})}function zn({side:t="left",variant:s="sidebar",collapsible:n="offcanvas",className:a,children:r,dir:f,...d}){const{isMobile:i,state:h,openMobile:c,setOpenMobile:g}=we();return n==="none"?e.jsx("div",{"data-slot":"sidebar",className:w("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",a),...d,children:r}):i?e.jsx(an,{open:c,onOpenChange:g,...d,children:e.jsxs(ln,{dir:f,"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":In},side:t,children:[e.jsxs(dn,{className:"sr-only",children:[e.jsx(cn,{children:"Sidebar"}),e.jsx(un,{children:"Displays the mobile sidebar."})]}),e.jsx("div",{className:"flex h-full w-full flex-col",children:r})]})}):e.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":h,"data-collapsible":h==="collapsed"?n:"","data-variant":s,"data-side":t,"data-slot":"sidebar",children:[e.jsx("div",{"data-slot":"sidebar-gap",className:w("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",s==="floating"||s==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),e.jsx("div",{"data-slot":"sidebar-container","data-side":t,className:w("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",s==="floating"||s==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",a),...d,children:e.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:r})})]})}function Ln({className:t,onClick:s,...n}){const{toggleSidebar:a}=we();return e.jsxs(J,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:w(t),onClick:r=>{s?.(r),a()},...n,children:[e.jsx(Ws,{}),e.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function $n({className:t,...s}){return e.jsx("main",{"data-slot":"sidebar-inset",className:w("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),...s})}function Bn({className:t,...s}){return e.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:w("flex flex-col gap-2 p-2",t),...s})}function Fn({className:t,...s}){return e.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:w("flex flex-col gap-2 p-2",t),...s})}function Un({className:t,...s}){return e.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:w("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),...s})}function Ie({className:t,...s}){return e.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:w("relative flex w-full min-w-0 flex-col p-2",t),...s})}function qn({className:t,render:s,...n}){return qe({defaultTagName:"div",props:be({className:w("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium 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",t)},n),render:s,state:{slot:"sidebar-group-label",sidebar:"group-label"}})}function Ae({className:t,...s}){return e.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:w("w-full text-sm",t),...s})}function pe({className:t,...s}){return e.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:w("flex w-full min-w-0 flex-col gap-0",t),...s})}function E({className:t,...s}){return e.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:w("group/menu-item relative",t),...s})}const Gn=bt("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-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-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function O({render:t,isActive:s=!1,variant:n="default",size:a="default",tooltip:r,className:f,...d}){const{isMobile:i,state:h}=we(),c=qe({defaultTagName:"button",props:be({className:w(Gn({variant:n,size:a}),f)},d),render:r?e.jsx(Rn,{render:t}):t,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:a,active:s}});return r?(typeof r=="string"&&(r={children:r}),e.jsxs(Pn,{children:[c,e.jsx(Mn,{side:"right",align:"center",hidden:h!=="collapsed"||i,...r})]})):c}function Vn({className:t,...s}){return e.jsx("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:w("pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground",t),...s})}function Kn({open:t,onOpenChange:s}){const n=Ge(),a=ne(),[r,f]=o.useState(""),[d,i]=o.useState(0),h=o.useRef(null),c=r.trim(),[g,j]=o.useState("");o.useEffect(()=>{const l=setTimeout(()=>j(c),180);return()=>clearTimeout(l)},[c]);const x=He({queryKey:["activity","search",g],queryFn:()=>Z.activity({q:g,status:"all",limit:8}),enabled:t&&g.length>=2,staleTime:3e4});o.useEffect(()=>{t||(f(""),i(0))},[t]);const m=o.useMemo(()=>[{id:"s:sites",label:"Sites",icon:e.jsx(te,{className:"size-4"}),go:()=>void a({to:"/sites"})},{id:"s:activity",label:"Activity",hint:"every site, newest first",icon:e.jsx(Ke,{className:"size-4"}),go:()=>void a({to:"/activity"})},{id:"s:members",label:"Members",icon:e.jsx(xe,{className:"size-4"}),go:()=>void a({to:"/studio/members"})},{id:"s:integrations",label:"Integrations",icon:e.jsx(Ye,{className:"size-4"}),go:()=>void a({to:"/studio/integrations"})},{id:"s:studio",label:"Studio settings",icon:e.jsx(ye,{className:"size-4"}),go:()=>void a({to:"/studio"})},{id:"s:you",label:"You",icon:e.jsx(Qe,{className:"size-4"}),go:()=>void a({to:"/you"})}],[a]),p=o.useMemo(()=>n.projects.map(l=>({id:`p:${l.uid}`,label:l.name,hint:l.unresolved>0?`${l.unresolved} open`:"nothing open",icon:e.jsx(me,{className:"size-4"}),go:()=>void a({to:"/s/$site/comments",params:{site:l.uid}})})),[n.projects,a]),S=l=>!c||l.toLowerCase().includes(c.toLowerCase()),u=[],b=p.filter(l=>S(l.label)),N=m.filter(l=>S(l.label));b.length&&u.push({title:"Sites",items:b}),N.length&&u.push({title:"Go to",items:N});const C=(x.data?.data??[]).map(l=>({id:`t:${l.id}`,label:l.latest?.body?.trim()||l.route,hint:`${l.site.name} · ${Es(l.status)?Ms[l.status]:l.status} · ${l.key}`,icon:e.jsx(me,{className:"size-4"}),go:()=>void a({to:"/s/$site/comments",params:{site:l.site.uid},search:{thread:l.key}})}));C.length&&u.push({title:"Comments",items:C});const v=u.flatMap(l=>l.items),y=Math.min(d,Math.max(0,v.length-1)),P=l=>{l&&(s(!1),l.go())};return o.useEffect(()=>{h.current?.querySelector(`[data-at="${y}"]`)?.scrollIntoView({block:"nearest"})},[y]),e.jsx(Le,{open:t,onOpenChange:s,children:e.jsxs($e,{showCloseButton:!1,className:"top-[15%] max-h-[70dvh] translate-y-0 gap-0 overflow-hidden p-0 sm:max-w-lg",children:[e.jsx(Be,{className:"sr-only",children:"Search and go"}),e.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-3",children:[e.jsx(Ue,{className:"size-4 shrink-0 text-muted-foreground"}),e.jsx("input",{autoFocus:!0,value:r,onChange:l=>{f(l.target.value),i(0)},onKeyDown:l=>{l.key==="ArrowDown"?(l.preventDefault(),i(k=>Math.min(k+1,v.length-1))):l.key==="ArrowUp"?(l.preventDefault(),i(k=>Math.max(k-1,0))):l.key==="Enter"&&(l.preventDefault(),P(v[y]))},placeholder:"Go to a site or a screen, or search every comment…","aria-label":"Search and go",className:"h-11 w-full bg-transparent text-[14px] outline-none placeholder:text-muted-foreground"})]}),e.jsxs("div",{ref:h,className:"min-h-0 flex-1 overflow-auto py-1.5",children:[v.length===0&&e.jsx("p",{className:"m-0 px-3 py-6 text-center text-[13px] text-muted-foreground",children:x.isFetching?"Looking…":c?`Nothing matches “${c}”.`:"Nothing here."}),u.map(l=>e.jsxs("div",{children:[e.jsx("div",{className:"px-3 py-1 text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:l.title}),l.items.map(k=>{const R=v.indexOf(k);return e.jsxs("button",{type:"button","data-at":R,onMouseMove:()=>i(R),onClick:()=>P(k),className:w("flex w-full items-center gap-2.5 border-0 bg-transparent px-3 py-2 text-left text-[13px] text-foreground",R===y&&"bg-muted"),children:[e.jsx("span",{className:"shrink-0 text-muted-foreground",children:k.icon}),e.jsx("span",{className:"min-w-0 flex-1 truncate",children:k.label}),k.hint&&e.jsx("span",{className:"shrink-0 text-[12px] text-muted-foreground",children:k.hint})]},k.id)})]},l.title)),x.isFetching&&v.length>0&&e.jsxs("p",{className:"m-0 flex items-center gap-1.5 px-3 py-1.5 text-[12px] text-muted-foreground",children:[e.jsx(vt,{className:"size-3"}),"Searching every site…"]})]})]})})}function Yn(){const[t,s]=o.useState(!1);return o.useEffect(()=>{const n=a=>{a.key.toLowerCase()!=="k"||!(a.metaKey||a.ctrlKey)||(a.preventDefault(),s(r=>!r))};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[]),[t,s]}const at="https://snagset.com/docs/",Wn="https://www.npmjs.com/package/@snagset/server?activeTab=versions",Xn="https://snagset.com/docs/self-hosting/#upgrade";function Qn({children:t}){const s=Ge(),n=jt(s),[a,r]=Yn();return e.jsxs(Hn,{children:[e.jsx(Zn,{me:s,site:n}),e.jsxs($n,{className:"min-w-0",children:[e.jsx(aa,{onSearch:()=>r(!0)}),e.jsx(Jn,{names:s.pendingMigrations??[],owner:s.user.role==="owner"}),e.jsx("div",{className:"min-h-0 flex-1",children:t})]}),e.jsx(Kn,{open:a,onOpenChange:r})]})}function Jn({names:t,owner:s}){return t.length?e.jsxs("div",{role:"alert",className:"mx-7 mt-4 rounded-md border border-destructive/40 bg-warn-soft px-3 py-2 text-[13px] text-destructive",children:[e.jsxs("p",{className:"m-0 font-medium",children:["The database needs an update for this version (",t.length," ",t.length===1?"migration":"migrations",")."]}),e.jsx("p",{className:"m-0 mt-0.5",children:s?e.jsxs(e.Fragment,{children:["Run ",e.jsx("code",{className:"font-mono",children:"snagset migrate"})," with this instance's ",e.jsx("code",{className:"font-mono",children:"DATABASE_URL"})," — from the project, ",e.jsx("code",{className:"font-mono",children:"pnpm migrate"}),". Until then, parts of this version may fail."]}):"Ask the studio's owner to run snagset migrate. Until then, parts of this version may fail."})]}):null}function Zn({me:t,site:s}){const n=Hs({select:r=>r.location.pathname}),a=r=>n===r||n.startsWith(r+"/");return e.jsxs(zn,{children:[e.jsx(Bn,{className:"px-3 pb-1 pt-3",children:e.jsx(ea,{me:t})}),e.jsxs(Un,{children:[e.jsxs(Ie,{children:[e.jsx(ta,{me:t,site:s}),s&&e.jsx(Ae,{children:e.jsxs(pe,{children:[e.jsxs(E,{children:[e.jsxs(O,{isActive:a(`/s/${s.uid}/comments`),render:e.jsx(_,{to:"/s/$site/comments",params:{site:s.uid}}),children:[e.jsx(me,{}),e.jsx("span",{children:"Comments"})]}),s.unresolved>0&&e.jsx(Vn,{children:s.unresolved})]}),e.jsx(E,{children:e.jsxs(O,{isActive:a(`/s/${s.uid}/reviewers`),render:e.jsx(_,{to:"/s/$site/reviewers",params:{site:s.uid}}),children:[e.jsx(xe,{}),e.jsx("span",{children:"Reviewers"})]})}),e.jsx(E,{children:e.jsxs(O,{isActive:a(`/s/${s.uid}/settings`),render:e.jsx(_,{to:"/s/$site/settings",params:{site:s.uid}}),children:[e.jsx(Xe,{}),e.jsx("span",{children:"Settings"})]})})]})})]}),e.jsxs(Ie,{children:[e.jsx(qn,{children:"Studio"}),e.jsx(Ae,{children:e.jsxs(pe,{children:[e.jsx(E,{children:e.jsxs(O,{isActive:a("/sites"),render:e.jsx(_,{to:"/sites"}),children:[e.jsx(te,{}),e.jsx("span",{children:"Sites"})]})}),e.jsx(E,{children:e.jsxs(O,{isActive:a("/activity"),render:e.jsx(_,{to:"/activity"}),children:[e.jsx(Ke,{}),e.jsx("span",{children:"Activity"})]})}),e.jsx(E,{children:e.jsxs(O,{isActive:a("/studio/members"),render:e.jsx(_,{to:"/studio/members"}),children:[e.jsx(xe,{}),e.jsx("span",{children:"Members"})]})}),e.jsx(E,{children:e.jsxs(O,{isActive:a("/studio/integrations"),render:e.jsx(_,{to:"/studio/integrations"}),children:[e.jsx(Ye,{}),e.jsx("span",{children:"Integrations"})]})}),e.jsx(E,{children:e.jsxs(O,{isActive:n==="/studio",render:e.jsx(_,{to:"/studio"}),children:[e.jsx(ye,{}),e.jsx("span",{children:"General"})]})})]})})]})]}),e.jsx(Fn,{children:e.jsxs(pe,{children:[e.jsx(E,{children:e.jsxs(O,{render:e.jsx("a",{href:at,target:"_blank",rel:"noreferrer"}),children:[e.jsx(We,{}),e.jsx("span",{children:"Docs"}),e.jsx(Q,{className:"ml-auto size-3.5 text-muted-foreground"})]})}),e.jsx(E,{children:e.jsx(sa,{})}),e.jsx(E,{children:e.jsx(na,{me:t})})]})})]})}function ea({me:t}){const s=ne(),n=_e(),[a,r]=o.useState(!1),[f,d]=o.useState(""),[i,h]=o.useState(""),[c,g]=o.useState(!1),j=e.jsxs(e.Fragment,{children:[e.jsx(St,{size:20}),e.jsxs("span",{className:"min-w-0 flex-1 text-left",children:[e.jsx("span",{className:"block truncate text-[14px] font-semibold leading-tight tracking-tight",children:t.org.name}),e.jsx("span",{className:"block truncate text-[11.5px] text-muted-foreground",children:location.host})]})]});if(t.orgs.length<=1&&!t.signupOpen)return e.jsx(_,{to:"/studio",className:"flex items-center gap-2.5 rounded-md px-1 py-0.5 text-foreground hover:bg-sidebar-accent","aria-label":`${t.org.name} — studio settings`,children:j});const x=async m=>{g(!0),h("");try{await m(),n.clear(),r(!1),d(""),s({to:"/sites",replace:!0})}catch(p){h(p instanceof Error?p.message:"Something went wrong. Try again.")}finally{g(!1)}};return e.jsxs(e.Fragment,{children:[e.jsxs(ae,{children:[e.jsxs(re,{render:e.jsx("button",{type:"button",className:"flex w-full items-center gap-2.5 rounded-md px-1 py-0.5 text-foreground hover:bg-sidebar-accent","aria-label":"Switch studio"}),children:[j,e.jsx(Se,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),e.jsxs(oe,{align:"start",className:"w-[240px]",children:[e.jsxs(je,{children:[e.jsx(ee,{children:"Studios"}),t.orgs.map(m=>e.jsxs(D,{disabled:m.current,onClick:()=>void x(()=>Z.switchOrg(m.slug)),children:[e.jsx(ye,{}),e.jsx("span",{className:"truncate",children:m.name}),m.current&&e.jsx("span",{className:"ml-auto text-[11px] text-muted-foreground",children:"current"})]},m.slug))]}),e.jsx(V,{}),e.jsxs(D,{onClick:()=>void s({to:"/studio"}),children:[e.jsx(Xe,{}),"Studio settings"]}),t.signupOpen&&e.jsxs(D,{onClick:()=>r(!0),children:[e.jsx(Ve,{}),"New studio…"]})]})]}),e.jsx(Le,{open:a,onOpenChange:m=>!c&&r(m),children:e.jsx($e,{className:"sm:max-w-[420px]",children:e.jsxs("form",{className:"flex flex-col gap-4",onSubmit:m=>{m.preventDefault(),x(()=>Z.createOrg(f.trim()||"My studio"))},children:[e.jsxs(ls,{children:[e.jsx(Be,{children:"New studio"}),e.jsx(ds,{children:"Its own sites, members and settings. You are its owner, and you move to it now — this one stays in the menu."})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(xs,{htmlFor:"new-studio-name",children:"Studio name"}),e.jsx(ms,{id:"new-studio-name",value:f,onChange:m=>d(m.target.value),placeholder:"My studio",autoFocus:!0})]}),i&&e.jsx("p",{className:"m-0 text-[12px] text-destructive",children:i}),e.jsxs(cs,{children:[e.jsx(J,{type:"button",variant:"outline",onClick:()=>r(!1),disabled:c,children:"Cancel"}),e.jsx(J,{type:"submit",loading:c,children:c?"Creating…":"Create studio"})]})]})})})]})}function ta({me:t,site:s}){const n=ne();return e.jsxs(ae,{children:[e.jsxs(re,{render:e.jsx("button",{type:"button",className:"mb-1 flex h-[34px] w-full items-center justify-between rounded-md border border-border bg-card px-2.5 text-[13px] font-semibold text-foreground","aria-label":"Switch site"}),children:[e.jsx("span",{className:"truncate",children:s?.name??"No sites yet"}),e.jsx(Se,{className:"size-3.5 text-muted-foreground"})]}),e.jsxs(oe,{align:"start",className:"w-[240px]",children:[e.jsxs(je,{children:[e.jsx(ee,{children:"Sites"}),t.projects.map(a=>e.jsxs(D,{onClick:()=>void n({to:"/s/$site/comments",params:{site:a.uid}}),children:[e.jsx(te,{}),e.jsx("span",{className:"truncate",children:a.name}),a.uid===s?.uid&&e.jsx("span",{className:"ml-auto text-[11px] text-muted-foreground",children:"current"})]},a.uid))]}),e.jsx(V,{}),e.jsxs(D,{onClick:()=>void n({to:"/sites",search:{add:!0}}),children:[e.jsx(Ve,{}),"Add a site"]}),e.jsxs(D,{onClick:()=>void n({to:"/sites"}),children:[e.jsx(te,{}),"All sites"]})]})]})}function sa(){const t=He(kt.meta()),s=t.data?.version??"",[n,a]=o.useState({state:"idle"}),r=async()=>{a({state:"checking"});try{a({state:"done",result:await Ds(s)})}catch{a({state:"failed"})}};return e.jsxs(ae,{children:[e.jsxs(re,{render:e.jsx(O,{}),children:[e.jsx(qs,{}),e.jsx("span",{children:"Help"})]}),e.jsxs(oe,{align:"start",side:"top",className:"w-[240px]",children:[e.jsxs(D,{render:e.jsx("a",{href:at,target:"_blank",rel:"noreferrer"}),children:[e.jsx(We,{}),"Docs",e.jsx(Q,{className:"ml-auto size-3 text-muted-foreground"})]}),e.jsxs(D,{render:e.jsx("a",{href:Wn,target:"_blank",rel:"noreferrer"}),children:["Changelog",e.jsx(Q,{className:"ml-auto size-3 text-muted-foreground"})]}),t.data?.sourceUrl&&e.jsxs(D,{render:e.jsx("a",{href:t.data.sourceUrl,target:"_blank",rel:"noreferrer"}),children:["Source · AGPL",e.jsx(Q,{className:"ml-auto size-3 text-muted-foreground"})]}),e.jsx(V,{}),e.jsxs("div",{className:"px-2 py-1.5 text-[12px] text-muted-foreground",children:["Snagset ",s||"—",n.state==="idle"&&e.jsxs(e.Fragment,{children:[" · ",e.jsx("button",{type:"button",className:"text-brand hover:underline",onClick:()=>void r(),children:"Check for updates"})]}),n.state==="checking"&&" · checking…",n.state==="failed"&&" · could not reach npm",n.state==="done"&&n.result&&e.jsxs(e.Fragment,{children:[" · ",n.result.newer?e.jsxs("a",{href:Xn,target:"_blank",rel:"noreferrer",className:"text-brand hover:underline",children:[n.result.latest," is out — how to upgrade"]}):"up to date"]})]})]})]})}function na({me:t}){const s=ne(),n=_e(),[a,r]=o.useState(wt),f=t.user.name||t.user.email,d=t.user.name?t.user.email:t.user.role,i=async()=>{await Z.logout().catch(()=>{}),Nt("out"),n.clear(),s({to:"/sign-in",replace:!0})};return e.jsxs(ae,{children:[e.jsxs(re,{render:e.jsx(O,{size:"lg"}),children:[e.jsx(Ps,{className:"size-8 rounded-full",children:e.jsx(Rs,{className:"bg-primary text-[12px] font-semibold text-primary-foreground",children:Os(t.user.name,t.user.email)})}),e.jsxs("div",{className:"min-w-0 flex-1 text-left leading-tight",children:[e.jsx("div",{className:"truncate text-[13px] font-semibold",children:f}),e.jsx("div",{className:"truncate text-[11.5px] text-muted-foreground",children:d})]}),e.jsx(Se,{className:"size-3.5 text-muted-foreground"})]}),e.jsxs(oe,{align:"start",side:"top",className:"w-[250px]",children:[e.jsx(je,{children:e.jsxs(ee,{className:"flex flex-col",children:[e.jsx("span",{className:"text-[13px] font-semibold",children:f}),e.jsx("span",{className:"text-[11.5px] font-normal text-muted-foreground",children:t.user.name?`${t.user.email} · ${t.user.role}`:t.user.role})]})}),e.jsx(V,{}),e.jsxs(Ts,{value:a,onValueChange:h=>{const c=h;Ct(c),r(c)},children:[e.jsx(ee,{children:"Theme"}),e.jsxs(ce,{value:"system",children:[e.jsx(Is,{}),"System"]}),e.jsxs(ce,{value:"light",children:[e.jsx(As,{}),"Light"]}),e.jsxs(ce,{value:"dark",children:[e.jsx(_s,{}),"Dark"]})]}),e.jsx(V,{}),e.jsxs(D,{onClick:()=>void s({to:"/you"}),children:[e.jsx(Qe,{}),"You"]}),e.jsxs(D,{onClick:()=>void i(),children:[e.jsx(Vs,{}),"Sign out"]})]})]})}function aa({onSearch:t}){const n=yt().map(a=>a.loaderData?.crumb).filter(a=>typeof a=="string"&&a.length>0);return e.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2.5 border-b border-border/60 px-4",children:[e.jsx(Ln,{className:"-ml-1"}),e.jsx("nav",{"aria-label":"Breadcrumb",className:"flex items-center gap-2 text-[13.5px] font-medium text-muted-foreground",children:n.map((a,r)=>e.jsxs("span",{className:"flex items-center gap-2",children:[r>0&&e.jsx("span",{className:"text-line-strong",children:"/"}),e.jsx("span",{className:r===n.length-1?"text-foreground":void 0,children:a})]},r))}),e.jsx("div",{className:"flex-1"}),e.jsxs("button",{type:"button",onClick:t,"aria-label":"Search and go",className:"flex h-7 items-center gap-2 rounded-md border border-border bg-card px-2 text-[12.5px] text-muted-foreground",children:[e.jsx(Ue,{className:"size-3.5"}),e.jsx("span",{className:"hidden sm:inline",children:"Search"}),e.jsx("kbd",{className:"hidden rounded border border-border px-1 font-mono text-[11px] sm:inline",children:"⌘K"})]})]})}const ka=()=>e.jsx(Qn,{children:e.jsx(Tt,{})});export{ka as component};
|
|
56
|
+
*/const Qs=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Qe=I("user",Qs),ue=768;function Js(){const[t,s]=o.useState(void 0);return o.useEffect(()=>{const n=window.matchMedia(`(max-width: ${ue-1}px)`),a=()=>{s(window.innerWidth<ue)};return n.addEventListener("change",a),s(window.innerWidth<ue),()=>n.removeEventListener("change",a)},[]),!!t}const Zs=o.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Pt,currentIdRef:{current:null},currentContextRef:{current:null}});function en(t,s){t.current=s.current}function tn(t,s={open:!1}){const{open:n}=s,a="rootStore"in t?t.rootStore:t,r=a.useState("floatingId"),h=o.useContext(Zs),{currentIdRef:d,delayRef:i,timeoutMs:f,initialDelayRef:c,currentContextRef:g,hasProvider:j,timeout:x}=h,[m,p]=o.useState(!1),S=o.useRef(n);return z(()=>{S.current=n},[n]),z(()=>{function u(){g.current?.setIsInstantPhase(!1),d.current=null,g.current=null,i.current=c.current,x.clear()}if(d.current&&!n&&d.current===r){if(p(!1),f){const b=r;return x.start(f,()=>{a.select("open")||d.current&&d.current!==b||u()}),()=>{(S.current||d.current!==b)&&x.clear()}}u()}},[n,r,d,i,f,c,g,x,a]),z(()=>{if(!n)return;const u=g.current,b=d.current;x.clear(),g.current={onOpenChange:a.setOpen,setIsInstantPhase:p},d.current=r,i.current={open:0,close:fe(c.current,"close")},b!==null&&b!==r?(p(!0),u?.setIsInstantPhase(!0),u?.onOpenChange(!1,B(Fe))):(p(!1),u?.setIsInstantPhase(!1))},[n,r,a,d,i,c,g,x]),z(()=>()=>{if(d.current===r){if(g.current=null,!S.current)return;d.current=null,en(i,c),x.clear()}},[g,d,i,r,c,x]),o.useMemo(()=>({hasProvider:j,delayRef:i,isInstantPhase:m}),[j,i,m])}function sn(t,s){let n=null,a=null,r=!1;return{contextElement:t||void 0,getBoundingClientRect(){const h=t?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},d=s.axis==="x"||s.axis==="both",i=s.axis==="y"||s.axis==="both",f=["mouseenter","mousemove"].includes(s.dataRef.current.openEvent?.type||"")&&s.pointerType!=="touch";let c=h.width,g=h.height,j=h.x,x=h.y;return n==null&&s.x&&d&&(n=h.x-s.x),a==null&&s.y&&i&&(a=h.y-s.y),j-=n||0,x-=a||0,c=0,g=0,!r||f?(c=s.axis==="y"?h.width:0,g=s.axis==="x"?h.height:0,j=d&&s.x!=null?s.x:j,x=i&&s.y!=null?s.y:x):r&&!f&&(g=s.axis==="x"?h.height:g,c=s.axis==="y"?h.width:c),r=!0,{width:c,height:g,x:j,y:x,top:x,right:j+c,bottom:x+g,left:j}}}}function Ee(t){return t!=null&&t.clientX!=null}function nn(t,s={}){const{enabled:n=!0,axis:a="both"}=s,r="rootStore"in t?t.rootStore:t,h=r.useState("open"),d=r.useState("floatingElement"),i=r.useState("domReferenceElement"),f=r.context.dataRef,c=o.useRef(!1),g=o.useRef(null),[j,x]=o.useState(),[m,p]=o.useState([]),S=le(v=>{r.set("positionReference",v)}),u=le((v,y,P)=>{c.current||f.current.openEvent&&!Ee(f.current.openEvent)||r.set("positionReference",sn(P??i,{x:v,y,axis:a,dataRef:f,pointerType:j}))}),b=le(v=>{h?g.current||(u(v.clientX,v.clientY,v.currentTarget),p([])):u(v.clientX,v.clientY,v.currentTarget)}),C=ze(j)?d:h;o.useEffect(()=>{if(!n){S(i);return}if(!C)return;function v(){g.current?.(),g.current=null}const y=ft(d);function P(l){const k=us(l);he(d,k)?v():u(l.clientX,l.clientY)}return!f.current.openEvent||Ee(f.current.openEvent)?g.current=Rt(y,"mousemove",P):S(i),v},[C,n,d,f,i,r,u,S,m]),o.useEffect(()=>()=>{r.set("positionReference",null)},[r]),o.useEffect(()=>{n&&!d&&(c.current=!1)},[n,d]),o.useEffect(()=>{!n&&h&&(c.current=!0)},[n,h]);const N=o.useMemo(()=>{function v(y){x(y.pointerType)}return{onPointerDown:v,onPointerEnter:v,onMouseMove:b,onMouseEnter:b}},[b]);return o.useMemo(()=>n?{reference:N,trigger:N}:{},[n,N])}function an({...t}){return e.jsx(Mt,{"data-slot":"sheet",...t})}function rn({...t}){return e.jsx(_t,{"data-slot":"sheet-portal",...t})}function on({className:t,...s}){return e.jsx(Ht,{"data-slot":"sheet-overlay",className:w("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",t),...s})}function ln({className:t,children:s,side:n="right",showCloseButton:a=!0,...r}){return e.jsxs(rn,{children:[e.jsx(on,{}),e.jsxs(Et,{"data-slot":"sheet-content","data-side":n,className:w("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm 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-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] 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-l data-[side=right]:data-ending-style:translate-x-[2.5rem] 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:[s,a&&e.jsxs(Ot,{"data-slot":"sheet-close",render:e.jsx(J,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[e.jsx(Dt,{}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function dn({className:t,...s}){return e.jsx("div",{"data-slot":"sheet-header",className:w("flex flex-col gap-0.5 p-4",t),...s})}function cn({className:t,...s}){return e.jsx(It,{"data-slot":"sheet-title",className:w("font-heading text-base font-medium text-foreground",t),...s})}function un({className:t,...s}){return e.jsx(At,{"data-slot":"sheet-description",className:w("text-sm text-muted-foreground",t),...s})}const Je=o.createContext(void 0);function K(t){const s=o.useContext(Je);if(s===void 0&&!t)throw new Error(se(72));return s}const pn={...Lt,disabled:t=>t.disabled,instantType:t=>t.instantType,isInstantPhase:t=>t.isInstantPhase,trackCursorAxis:t=>t.trackCursorAxis,disableHoverablePopup:t=>t.disableHoverablePopup,lastOpenChangeReason:t=>t.openChangeReason,closeOnClick:t=>t.closeOnClick,closeDelay:t=>t.closeDelay,adaptiveOrigin:t=>t.adaptiveOrigin};class gn extends zt{constructor(s,n,a){const r=new Ut;super(hn(s,r,n,a),fn(r),pn)}setOpen=(s,n)=>{$t(this,s,n,{extraState:{openChangeReason:n.reason}})};cancelPendingOpen(s){this.state.floatingRootContext.dispatchOpenChange(!1,B(ps,s))}}function hn(t,s,n,a=!1){const r={...Bt(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...t};return r.floatingRootContext=Ft(s,n,a),r}function fn(t){return{popupRef:o.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:t}}const xn=qt(function(s){const{disabled:n=!1,defaultOpen:a=!1,open:r,disableHoverablePopup:h=!1,trackCursorAxis:d="none",actionsRef:i,onOpenChange:f,onOpenChangeComplete:c,handle:g,triggerId:j,defaultTriggerId:x=null,children:m}=s,p=Gt(($,F)=>new gn({open:a,openProp:r,activeTriggerId:x,triggerIdProp:j},$,F));p.useControlledProp("openProp",r),p.useControlledProp("triggerIdProp",j),p.useContextCallback("onOpenChange",f),p.useContextCallback("onOpenChangeComplete",c);const S=p.useState("open"),u=!n&&S,b=p.useState("activeTriggerId"),C=p.useState("mounted"),N=p.useState("payload");p.useSyncedValues({trackCursorAxis:d,disableHoverablePopup:h,disabled:n}),Vt(p,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:v,transitionStatus:y}=Kt(u,p),P=p.useState("isInstantPhase"),l=p.useState("instantType"),k=p.useState("lastOpenChangeReason"),R=o.useRef(null);z(()=>{S&&n&&p.setOpen(!1,B(gs))},[S,n,p]),z(()=>{y==="ending"&&k===Fe||y!=="ending"&&P?(l!=="delay"&&(R.current=l),p.set("instantType","delay")):R.current!==null&&(p.set("instantType",R.current),R.current=null)},[y,P,k,l,p]),z(()=>{u&&b==null&&p.set("payload",void 0)},[p,b,u]),o.useImperativeHandle(i,()=>({unmount:v,close:()=>p.setOpen(!1,B(hs))}),[v,p]);const L=u||C||!n&&d!=="none";return e.jsxs(Je.Provider,{value:p,children:[g&&e.jsx(Yt,{handle:g,store:p}),L&&e.jsx(mn,{store:p,disabled:n,trackCursorAxis:d}),typeof m=="function"?m({payload:N}):m]})});function mn({store:t,disabled:s,trackCursorAxis:n}){const a=t.useState("floatingRootContext"),r=Wt(a,{enabled:!s,referencePress:()=>t.select("closeOnClick")}),h=nn(a,{enabled:!s&&n!=="none",axis:n==="none"?void 0:n}),d=o.useMemo(()=>be(h.reference,r.reference),[h.reference,r.reference]);return Xt(t,{activeTriggerProps:d,inactiveTriggerProps:d,popupProps:r.floating??xt}),null}const bn=o.createContext(void 0);function vn(){return o.useContext(bn)}const Oe=600,Ze="data-base-ui-tooltip-trigger";function De(t){if("composedPath"in t){const n=t.composedPath();for(let a=0;a<n.length;a+=1){const r=n[a];if(ge(r))return r}}const s=t.target;return ge(s)?s:null}function jn(t){let s=t;for(;s;){const n=s.closest(`[${Ze}]`);if(n)return n;const a=s.getRootNode();s="host"in a&&ge(a.host)?a.host:null}return null}const yn=Qt(function(s,n){const{render:a,className:r,style:h,handle:d,payload:i,disabled:f,delay:c,closeOnClick:g=!0,closeDelay:j,id:x,...m}=s,p=K(!0),u=bs(d)??p;if(!u)throw new Error(se(82));const b=fs(x),C=u.useState("isTriggerActive",b),N=u.useState("isOpenedByTrigger",b),v=u.useState("floatingRootContext"),y=o.useRef(null),P=c??Oe,l=j??0,{registerTrigger:k,isMountedByThisTrigger:R}=Jt(b,y,u,{payload:i,closeOnClick:g,closeDelay:l}),L=vn(),{delayRef:$,isInstantPhase:F,hasProvider:M}=tn(v,{open:N}),U=vs(v);u.useSyncedValue("isInstantPhase",F);const ie=u.useState("disabled"),q=f??ie,Ne=Zt(q),Ce=u.useState("trackCursorAxis"),rt=u.useState("disableHoverablePopup"),G=o.useRef(!1),Y=es(),W=o.useRef(void 0);function ke(){return M?fe($.current,"open")===0?0:c??L??Oe:P}function Te(T){const A=y.current;if(!A||!T)return!1;const H=jn(T);return H!==null&&H!==A&&he(A,H)}function ot(T){const A=Te(T);return G.current=A,A&&(U.openChangeTimeout.clear(),U.restTimeout.clear(),U.restTimeoutPending=!1,Y.clear()),A}const it=js(v,{enabled:!q,mouseOnly:!0,move:!1,handleClose:!rt&&Ce!=="both"?ys():null,restMs:ke,delay(){return j==null&&M?{close:fe($.current,"close")}:{close:l}},triggerElementRef:y,isActiveTrigger:C,isClosing:()=>u.select("transitionStatus")==="ending",shouldOpen(){return!G.current}}),lt=Ss(v,{enabled:!q}).reference,dt=T=>{const A=G.current,H=De(T),Pe=ot(H),X=y.current,ut=X&&H&&he(X,H);if(Pe&&u.select("open")&&u.select("lastOpenChangeReason")===de){u.setOpen(!1,B(de,T));return}if(A&&!Pe&&ut&&!Ne.current&&!u.select("open")&&X&&ze(W.current)){const Re=()=>{!G.current&&!Ne.current&&!u.select("open")&&u.setOpen(!0,B(de,T,X))},Me=ke();Me===0?(Y.clear(),Re()):Y.start(Me,Re)}},ct=u.useState("triggerProps",R);return ve("button",s,{state:{open:N},ref:[n,k,y],props:[it,lt,R||Ce!=="none"?ct:void 0,{onMouseOver(T){dt(T.nativeEvent)},onFocus(T){Te(De(T.nativeEvent))&&T.preventBaseUIHandler()},onMouseLeave(){G.current=!1,Y.clear(),W.current=void 0},onPointerEnter(T){W.current=T.pointerType},onPointerDown(T){W.current=T.pointerType,u.set("closeOnClick",g),g&&!u.select("open")&&u.cancelPendingOpen(T.nativeEvent)},onClick(T){g&&!u.select("open")&&u.cancelPendingOpen(T.nativeEvent)},id:b,"data-trigger-disabled":q?"":void 0,[Ze]:q?void 0:""},m],stateAttributesMapping:ts})}),et=o.createContext(void 0);function Sn(){const t=o.useContext(et);if(t===void 0)throw new Error(se(70));return t}const wn=o.forwardRef(function(s,n){const{children:a,container:r,className:h,render:d,style:i,...f}=s,{node:c,subtree:g}=ss({container:r,ref:n,componentProps:s,elementProps:f});return!g&&!c?null:e.jsxs(o.Fragment,{children:[g,c&&mt.createPortal(a,c)]})}),Nn=o.forwardRef(function(s,n){const{keepMounted:a=!1,...r}=s;return K().useState("mounted")||a?e.jsx(et.Provider,{value:a,children:e.jsx(wn,{ref:n,...r})}):null}),tt=o.createContext(void 0);function st(){const t=o.useContext(tt);if(t===void 0)throw new Error(se(71));return t}const Cn=o.forwardRef(function(s,n){const{render:a,className:r,anchor:h,positionMethod:d="absolute",side:i="top",align:f="center",sideOffset:c=0,alignOffset:g=0,collisionBoundary:j="clipping-ancestors",collisionPadding:x=5,arrowPadding:m=5,sticky:p=!1,disableAnchorTracking:S=!1,collisionAvoidance:u=ns,style:b,...C}=s,N=K(),v=Sn(),y=N.useState("open"),P=N.useState("mounted"),l=N.useState("trackCursorAxis"),k=N.useState("disableHoverablePopup"),R=N.useState("floatingRootContext"),L=N.useState("instantType"),$=N.useState("transitionStatus"),F=N.useState("adaptiveOrigin"),M=ws({anchor:h,positionMethod:d,floatingRootContext:R,mounted:P,side:i,sideOffset:c,align:f,alignOffset:g,collisionBoundary:j,collisionPadding:x,sticky:p,arrowPadding:m,disableAnchorTracking:S,keepMounted:v,collisionAvoidance:u,adaptiveOrigin:F}),U=o.useMemo(()=>({open:y,side:M.side,align:M.align,anchorHidden:M.anchorHidden,instant:l!=="none"?"tracking-cursor":L}),[y,M.side,M.align,M.anchorHidden,l,L]),ie=Ns(s,U,{styles:M.positionerStyles,transitionStatus:$,props:C,refs:[n,N.useStateSetter("positionerElement")],hidden:!P,inert:!y||l==="both"||k});return e.jsx(tt.Provider,{value:M,children:ie})}),kn=o.forwardRef(function(s,n){const{render:a,className:r,style:h,...d}=s,i=K(),{side:f,align:c}=st(),g=i.useState("open"),j=i.useState("instantType"),x=i.useState("transitionStatus"),m=i.useState("popupProps"),p=i.useState("floatingRootContext"),S=i.useState("disabled"),u=i.useState("closeDelay");as({open:g,ref:i.context.popupRef,onComplete(){g&&i.context.onOpenChangeComplete?.(!0)}}),Cs(p,{enabled:!S,closeDelay:u});const b=i.useStateSetter("popupElement");return ve("div",s,{state:{open:g,side:f,align:c,instant:j,transitionStatus:x},ref:[n,i.context.popupRef,b],props:[rs,m,ks(x),d],stateAttributesMapping:os})}),Tn=o.forwardRef(function(s,n){const{render:a,className:r,style:h,...d}=s,i=K(),{arrowRef:f,side:c,align:g,arrowUncentered:j,arrowStyles:x}=st(),m=i.useState("open"),p=i.useState("instantType");return ve("div",s,{state:{open:m,side:c,align:g,uncentered:j,instant:p},ref:[n,f],props:[{style:x,"aria-hidden":!0},d],stateAttributesMapping:is})});function Pn({...t}){return e.jsx(xn,{"data-slot":"tooltip",...t})}function Rn({...t}){return e.jsx(yn,{"data-slot":"tooltip-trigger",...t})}function Mn({className:t,side:s="top",sideOffset:n=4,align:a="center",alignOffset:r=0,children:h,...d}){return e.jsx(Nn,{children:e.jsx(Cn,{align:a,alignOffset:r,side:s,sideOffset:n,className:"isolate z-50",children:e.jsxs(kn,{"data-slot":"tooltip-content",className:w("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]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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-sm 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),...d,children:[h,e.jsx(Tn,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-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"})]})})})}const En="sidebar_state",On=3600*24*7,Dn="16rem",In="18rem",An="3rem",_n="b",nt=o.createContext(null);function we(){const t=o.useContext(nt);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function Hn({defaultOpen:t=!0,open:s,onOpenChange:n,className:a,style:r,children:h,...d}){const i=Js(),[f,c]=o.useState(!1),[g,j]=o.useState(t),x=s??g,m=o.useCallback(b=>{const C=typeof b=="function"?b(x):b;n?n(C):j(C),document.cookie=`${En}=${C}; path=/; max-age=${On}`},[n,x]),p=o.useCallback(()=>i?c(b=>!b):m(b=>!b),[i,m,c]);o.useEffect(()=>{const b=C=>{C.key===_n&&(C.metaKey||C.ctrlKey)&&(C.preventDefault(),p())};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[p]);const S=x?"expanded":"collapsed",u=o.useMemo(()=>({state:S,open:x,setOpen:m,isMobile:i,openMobile:f,setOpenMobile:c,toggleSidebar:p}),[S,x,m,i,f,c,p]);return e.jsx(nt.Provider,{value:u,children:e.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Dn,"--sidebar-width-icon":An,...r},className:w("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",a),...d,children:h})})}function zn({side:t="left",variant:s="sidebar",collapsible:n="offcanvas",className:a,children:r,dir:h,...d}){const{isMobile:i,state:f,openMobile:c,setOpenMobile:g}=we();return n==="none"?e.jsx("div",{"data-slot":"sidebar",className:w("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",a),...d,children:r}):i?e.jsx(an,{open:c,onOpenChange:g,...d,children:e.jsxs(ln,{dir:h,"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":In},side:t,children:[e.jsxs(dn,{className:"sr-only",children:[e.jsx(cn,{children:"Sidebar"}),e.jsx(un,{children:"Displays the mobile sidebar."})]}),e.jsx("div",{className:"flex h-full w-full flex-col",children:r})]})}):e.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":f,"data-collapsible":f==="collapsed"?n:"","data-variant":s,"data-side":t,"data-slot":"sidebar",children:[e.jsx("div",{"data-slot":"sidebar-gap",className:w("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",s==="floating"||s==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),e.jsx("div",{"data-slot":"sidebar-container","data-side":t,className:w("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",s==="floating"||s==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",a),...d,children:e.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:r})})]})}function Ln({className:t,onClick:s,...n}){const{toggleSidebar:a}=we();return e.jsxs(J,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:w(t),onClick:r=>{s?.(r),a()},...n,children:[e.jsx(Ws,{}),e.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function $n({className:t,...s}){return e.jsx("main",{"data-slot":"sidebar-inset",className:w("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),...s})}function Bn({className:t,...s}){return e.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:w("flex flex-col gap-2 p-2",t),...s})}function Fn({className:t,...s}){return e.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:w("flex flex-col gap-2 p-2",t),...s})}function Un({className:t,...s}){return e.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:w("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),...s})}function Ie({className:t,...s}){return e.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:w("relative flex w-full min-w-0 flex-col p-2",t),...s})}function qn({className:t,render:s,...n}){return qe({defaultTagName:"div",props:be({className:w("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium 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",t)},n),render:s,state:{slot:"sidebar-group-label",sidebar:"group-label"}})}function Ae({className:t,...s}){return e.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:w("w-full text-sm",t),...s})}function pe({className:t,...s}){return e.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:w("flex w-full min-w-0 flex-col gap-0",t),...s})}function E({className:t,...s}){return e.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:w("group/menu-item relative",t),...s})}const Gn=bt("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-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-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function O({render:t,isActive:s=!1,variant:n="default",size:a="default",tooltip:r,className:h,...d}){const{isMobile:i,state:f}=we(),c=qe({defaultTagName:"button",props:be({className:w(Gn({variant:n,size:a}),h)},d),render:r?e.jsx(Rn,{render:t}):t,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:a,active:s}});return r?(typeof r=="string"&&(r={children:r}),e.jsxs(Pn,{children:[c,e.jsx(Mn,{side:"right",align:"center",hidden:f!=="collapsed"||i,...r})]})):c}function Vn({className:t,...s}){return e.jsx("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:w("pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground",t),...s})}function Kn({open:t,onOpenChange:s}){const n=Ge(),a=ne(),[r,h]=o.useState(""),[d,i]=o.useState(0),f=o.useRef(null),c=r.trim(),[g,j]=o.useState("");o.useEffect(()=>{const l=setTimeout(()=>j(c),180);return()=>clearTimeout(l)},[c]);const x=He({queryKey:["activity","search",g],queryFn:()=>Z.activity({q:g,status:"all",limit:8}),enabled:t&&g.length>=2,staleTime:3e4});o.useEffect(()=>{t||(h(""),i(0))},[t]);const m=o.useMemo(()=>[{id:"s:sites",label:"Sites",icon:e.jsx(te,{className:"size-4"}),go:()=>void a({to:"/sites"})},{id:"s:activity",label:"Activity",hint:"every site, newest first",icon:e.jsx(Ke,{className:"size-4"}),go:()=>void a({to:"/activity"})},{id:"s:members",label:"Members",icon:e.jsx(xe,{className:"size-4"}),go:()=>void a({to:"/studio/members"})},{id:"s:integrations",label:"Integrations",icon:e.jsx(Ye,{className:"size-4"}),go:()=>void a({to:"/studio/integrations"})},{id:"s:studio",label:"Studio settings",icon:e.jsx(ye,{className:"size-4"}),go:()=>void a({to:"/studio"})},{id:"s:you",label:"You",icon:e.jsx(Qe,{className:"size-4"}),go:()=>void a({to:"/you"})}],[a]),p=o.useMemo(()=>n.projects.map(l=>({id:`p:${l.uid}`,label:l.name,hint:l.unresolved>0?`${l.unresolved} open`:"nothing open",icon:e.jsx(me,{className:"size-4"}),go:()=>void a({to:"/s/$site/comments",params:{site:l.uid}})})),[n.projects,a]),S=l=>!c||l.toLowerCase().includes(c.toLowerCase()),u=[],b=p.filter(l=>S(l.label)),C=m.filter(l=>S(l.label));b.length&&u.push({title:"Sites",items:b}),C.length&&u.push({title:"Go to",items:C});const N=(x.data?.data??[]).map(l=>({id:`t:${l.id}`,label:l.latest?.body?.trim()||l.route,hint:`${l.site.name} · ${Es(l.status)?Ms[l.status]:l.status} · ${l.key}`,icon:e.jsx(me,{className:"size-4"}),go:()=>void a({to:"/s/$site/comments",params:{site:l.site.uid},search:{thread:l.key}})}));N.length&&u.push({title:"Comments",items:N});const v=u.flatMap(l=>l.items),y=Math.min(d,Math.max(0,v.length-1)),P=l=>{l&&(s(!1),l.go())};return o.useEffect(()=>{f.current?.querySelector(`[data-at="${y}"]`)?.scrollIntoView({block:"nearest"})},[y]),e.jsx(Le,{open:t,onOpenChange:s,children:e.jsxs($e,{showCloseButton:!1,className:"top-[15%] max-h-[70dvh] translate-y-0 gap-0 overflow-hidden p-0 sm:max-w-lg",children:[e.jsx(Be,{className:"sr-only",children:"Search and go"}),e.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-3",children:[e.jsx(Ue,{className:"size-4 shrink-0 text-muted-foreground"}),e.jsx("input",{autoFocus:!0,value:r,onChange:l=>{h(l.target.value),i(0)},onKeyDown:l=>{l.key==="ArrowDown"?(l.preventDefault(),i(k=>Math.min(k+1,v.length-1))):l.key==="ArrowUp"?(l.preventDefault(),i(k=>Math.max(k-1,0))):l.key==="Enter"&&(l.preventDefault(),P(v[y]))},placeholder:"Go to a site or a screen, or search every comment…","aria-label":"Search and go",className:"h-11 w-full bg-transparent text-[14px] outline-none placeholder:text-muted-foreground"})]}),e.jsxs("div",{ref:f,className:"min-h-0 flex-1 overflow-auto py-1.5",children:[v.length===0&&e.jsx("p",{className:"m-0 px-3 py-6 text-center text-[13px] text-muted-foreground",children:x.isFetching?"Looking…":c?`Nothing matches “${c}”.`:"Nothing here."}),u.map(l=>e.jsxs("div",{children:[e.jsx("div",{className:"px-3 py-1 text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:l.title}),l.items.map(k=>{const R=v.indexOf(k);return e.jsxs("button",{type:"button","data-at":R,onMouseMove:()=>i(R),onClick:()=>P(k),className:w("flex w-full items-center gap-2.5 border-0 bg-transparent px-3 py-2 text-left text-[13px] text-foreground",R===y&&"bg-muted"),children:[e.jsx("span",{className:"shrink-0 text-muted-foreground",children:k.icon}),e.jsx("span",{className:"min-w-0 flex-1 truncate",children:k.label}),k.hint&&e.jsx("span",{className:"shrink-0 text-[12px] text-muted-foreground",children:k.hint})]},k.id)})]},l.title)),x.isFetching&&v.length>0&&e.jsxs("p",{className:"m-0 flex items-center gap-1.5 px-3 py-1.5 text-[12px] text-muted-foreground",children:[e.jsx(vt,{className:"size-3"}),"Searching every site…"]})]})]})})}function Yn(){const[t,s]=o.useState(!1);return o.useEffect(()=>{const n=a=>{a.key.toLowerCase()!=="k"||!(a.metaKey||a.ctrlKey)||(a.preventDefault(),s(r=>!r))};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[]),[t,s]}const at="https://snagset.com/docs/",Wn="https://www.npmjs.com/package/@snagset/server?activeTab=versions",Xn="https://snagset.com/docs/self-hosting/#upgrade";function Qn({children:t}){const s=Ge(),n=jt(s),[a,r]=Yn();return e.jsxs(Hn,{children:[e.jsx(ea,{me:s,site:n}),e.jsxs($n,{className:"min-w-0",children:[e.jsx(ra,{onSearch:()=>r(!0)}),e.jsx(Jn,{names:s.pendingMigrations??[],owner:s.user.role==="owner"}),s.regionMismatch&&(s.user.role==="owner"||s.user.role==="admin")&&e.jsx(Zn,{...s.regionMismatch}),e.jsx("div",{className:"min-h-0 flex-1",children:t})]}),e.jsx(Kn,{open:a,onOpenChange:r})]})}function Jn({names:t,owner:s}){return t.length?e.jsxs("div",{role:"alert",className:"mx-7 mt-4 rounded-md border border-destructive/40 bg-warn-soft px-3 py-2 text-[13px] text-destructive",children:[e.jsxs("p",{className:"m-0 font-medium",children:["The database needs an update for this version (",t.length," ",t.length===1?"migration":"migrations",")."]}),e.jsx("p",{className:"m-0 mt-0.5",children:s?e.jsxs(e.Fragment,{children:["Run ",e.jsx("code",{className:"font-mono",children:"snagset migrate"})," with this instance's ",e.jsx("code",{className:"font-mono",children:"DATABASE_URL"})," — from the project, ",e.jsx("code",{className:"font-mono",children:"pnpm migrate"}),". Until then, parts of this version may fail."]}):"Ask the studio's owner to run snagset migrate. Until then, parts of this version may fail."})]}):null}function Zn({functions:t,database:s,suggest:n}){return e.jsxs("div",{role:"status",className:"mx-7 mt-4 rounded-md border border-border bg-warn-soft px-3 py-2 text-[13px]",children:[e.jsxs("p",{className:"m-0 font-medium",children:["This server runs in ",t,", but its database is in ",s," — every page waits on that distance."]}),e.jsx("p",{className:"m-0 mt-0.5 text-muted-foreground",children:n?e.jsxs(e.Fragment,{children:["Add ",e.jsxs("code",{className:"font-mono",children:['"regions": ["',n,'"]']})," to ",e.jsx("code",{className:"font-mono",children:"vercel.json"})," and redeploy."]}):"Run the server in the same region as the database."})]})}function ea({me:t,site:s}){const n=Hs({select:r=>r.location.pathname}),a=r=>n===r||n.startsWith(r+"/");return e.jsxs(zn,{children:[e.jsx(Bn,{className:"px-3 pb-1 pt-3",children:e.jsx(ta,{me:t})}),e.jsxs(Un,{children:[e.jsxs(Ie,{children:[e.jsx(sa,{me:t,site:s}),s&&e.jsx(Ae,{children:e.jsxs(pe,{children:[e.jsxs(E,{children:[e.jsxs(O,{isActive:a(`/s/${s.uid}/comments`),render:e.jsx(_,{to:"/s/$site/comments",params:{site:s.uid}}),children:[e.jsx(me,{}),e.jsx("span",{children:"Comments"})]}),s.unresolved>0&&e.jsx(Vn,{children:s.unresolved})]}),e.jsx(E,{children:e.jsxs(O,{isActive:a(`/s/${s.uid}/reviewers`),render:e.jsx(_,{to:"/s/$site/reviewers",params:{site:s.uid}}),children:[e.jsx(xe,{}),e.jsx("span",{children:"Reviewers"})]})}),e.jsx(E,{children:e.jsxs(O,{isActive:a(`/s/${s.uid}/settings`),render:e.jsx(_,{to:"/s/$site/settings",params:{site:s.uid}}),children:[e.jsx(Xe,{}),e.jsx("span",{children:"Settings"})]})})]})})]}),e.jsxs(Ie,{children:[e.jsx(qn,{children:"Studio"}),e.jsx(Ae,{children:e.jsxs(pe,{children:[e.jsx(E,{children:e.jsxs(O,{isActive:a("/sites"),render:e.jsx(_,{to:"/sites"}),children:[e.jsx(te,{}),e.jsx("span",{children:"Sites"})]})}),e.jsx(E,{children:e.jsxs(O,{isActive:a("/activity"),render:e.jsx(_,{to:"/activity"}),children:[e.jsx(Ke,{}),e.jsx("span",{children:"Activity"})]})}),e.jsx(E,{children:e.jsxs(O,{isActive:a("/studio/members"),render:e.jsx(_,{to:"/studio/members"}),children:[e.jsx(xe,{}),e.jsx("span",{children:"Members"})]})}),e.jsx(E,{children:e.jsxs(O,{isActive:a("/studio/integrations"),render:e.jsx(_,{to:"/studio/integrations"}),children:[e.jsx(Ye,{}),e.jsx("span",{children:"Integrations"})]})}),e.jsx(E,{children:e.jsxs(O,{isActive:n==="/studio",render:e.jsx(_,{to:"/studio"}),children:[e.jsx(ye,{}),e.jsx("span",{children:"General"})]})})]})})]})]}),e.jsx(Fn,{children:e.jsxs(pe,{children:[e.jsx(E,{children:e.jsxs(O,{render:e.jsx("a",{href:at,target:"_blank",rel:"noreferrer"}),children:[e.jsx(We,{}),e.jsx("span",{children:"Docs"}),e.jsx(Q,{className:"ml-auto size-3.5 text-muted-foreground"})]})}),e.jsx(E,{children:e.jsx(na,{})}),e.jsx(E,{children:e.jsx(aa,{me:t})})]})})]})}function ta({me:t}){const s=ne(),n=_e(),[a,r]=o.useState(!1),[h,d]=o.useState(""),[i,f]=o.useState(""),[c,g]=o.useState(!1),j=e.jsxs(e.Fragment,{children:[e.jsx(St,{size:20}),e.jsxs("span",{className:"min-w-0 flex-1 text-left",children:[e.jsx("span",{className:"block truncate text-[14px] font-semibold leading-tight tracking-tight",children:t.org.name}),e.jsx("span",{className:"block truncate text-[11.5px] text-muted-foreground",children:location.host})]})]});if(t.orgs.length<=1&&!t.signupOpen)return e.jsx(_,{to:"/studio",className:"flex items-center gap-2.5 rounded-md px-1 py-0.5 text-foreground hover:bg-sidebar-accent","aria-label":`${t.org.name} — studio settings`,children:j});const x=async m=>{g(!0),f("");try{await m(),n.clear(),r(!1),d(""),s({to:"/sites",replace:!0})}catch(p){f(p instanceof Error?p.message:"Something went wrong. Try again.")}finally{g(!1)}};return e.jsxs(e.Fragment,{children:[e.jsxs(ae,{children:[e.jsxs(re,{render:e.jsx("button",{type:"button",className:"flex w-full items-center gap-2.5 rounded-md px-1 py-0.5 text-foreground hover:bg-sidebar-accent","aria-label":"Switch studio"}),children:[j,e.jsx(Se,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),e.jsxs(oe,{align:"start",className:"w-[240px]",children:[e.jsxs(je,{children:[e.jsx(ee,{children:"Studios"}),t.orgs.map(m=>e.jsxs(D,{disabled:m.current,onClick:()=>void x(()=>Z.switchOrg(m.slug)),children:[e.jsx(ye,{}),e.jsx("span",{className:"truncate",children:m.name}),m.current&&e.jsx("span",{className:"ml-auto text-[11px] text-muted-foreground",children:"current"})]},m.slug))]}),e.jsx(V,{}),e.jsxs(D,{onClick:()=>void s({to:"/studio"}),children:[e.jsx(Xe,{}),"Studio settings"]}),t.signupOpen&&e.jsxs(D,{onClick:()=>r(!0),children:[e.jsx(Ve,{}),"New studio…"]})]})]}),e.jsx(Le,{open:a,onOpenChange:m=>!c&&r(m),children:e.jsx($e,{className:"sm:max-w-[420px]",children:e.jsxs("form",{className:"flex flex-col gap-4",onSubmit:m=>{m.preventDefault(),x(()=>Z.createOrg(h.trim()||"My studio"))},children:[e.jsxs(ls,{children:[e.jsx(Be,{children:"New studio"}),e.jsx(ds,{children:"Its own sites, members and settings. You are its owner, and you move to it now — this one stays in the menu."})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(xs,{htmlFor:"new-studio-name",children:"Studio name"}),e.jsx(ms,{id:"new-studio-name",value:h,onChange:m=>d(m.target.value),placeholder:"My studio",autoFocus:!0})]}),i&&e.jsx("p",{className:"m-0 text-[12px] text-destructive",children:i}),e.jsxs(cs,{children:[e.jsx(J,{type:"button",variant:"outline",onClick:()=>r(!1),disabled:c,children:"Cancel"}),e.jsx(J,{type:"submit",loading:c,children:c?"Creating…":"Create studio"})]})]})})})]})}function sa({me:t,site:s}){const n=ne();return e.jsxs(ae,{children:[e.jsxs(re,{render:e.jsx("button",{type:"button",className:"mb-1 flex h-[34px] w-full items-center justify-between rounded-md border border-border bg-card px-2.5 text-[13px] font-semibold text-foreground","aria-label":"Switch site"}),children:[e.jsx("span",{className:"truncate",children:s?.name??"No sites yet"}),e.jsx(Se,{className:"size-3.5 text-muted-foreground"})]}),e.jsxs(oe,{align:"start",className:"w-[240px]",children:[e.jsxs(je,{children:[e.jsx(ee,{children:"Sites"}),t.projects.map(a=>e.jsxs(D,{onClick:()=>void n({to:"/s/$site/comments",params:{site:a.uid}}),children:[e.jsx(te,{}),e.jsx("span",{className:"truncate",children:a.name}),a.uid===s?.uid&&e.jsx("span",{className:"ml-auto text-[11px] text-muted-foreground",children:"current"})]},a.uid))]}),e.jsx(V,{}),e.jsxs(D,{onClick:()=>void n({to:"/sites",search:{add:!0}}),children:[e.jsx(Ve,{}),"Add a site"]}),e.jsxs(D,{onClick:()=>void n({to:"/sites"}),children:[e.jsx(te,{}),"All sites"]})]})]})}function na(){const t=He(kt.meta()),s=t.data?.version??"",[n,a]=o.useState({state:"idle"}),r=async()=>{a({state:"checking"});try{a({state:"done",result:await Ds(s)})}catch{a({state:"failed"})}};return e.jsxs(ae,{children:[e.jsxs(re,{render:e.jsx(O,{}),children:[e.jsx(qs,{}),e.jsx("span",{children:"Help"})]}),e.jsxs(oe,{align:"start",side:"top",className:"w-[240px]",children:[e.jsxs(D,{render:e.jsx("a",{href:at,target:"_blank",rel:"noreferrer"}),children:[e.jsx(We,{}),"Docs",e.jsx(Q,{className:"ml-auto size-3 text-muted-foreground"})]}),e.jsxs(D,{render:e.jsx("a",{href:Wn,target:"_blank",rel:"noreferrer"}),children:["Changelog",e.jsx(Q,{className:"ml-auto size-3 text-muted-foreground"})]}),t.data?.sourceUrl&&e.jsxs(D,{render:e.jsx("a",{href:t.data.sourceUrl,target:"_blank",rel:"noreferrer"}),children:["Source · AGPL",e.jsx(Q,{className:"ml-auto size-3 text-muted-foreground"})]}),e.jsx(V,{}),e.jsxs("div",{className:"px-2 py-1.5 text-[12px] text-muted-foreground",children:["Snagset ",s||"—",n.state==="idle"&&e.jsxs(e.Fragment,{children:[" · ",e.jsx("button",{type:"button",className:"text-brand hover:underline",onClick:()=>void r(),children:"Check for updates"})]}),n.state==="checking"&&" · checking…",n.state==="failed"&&" · could not reach npm",n.state==="done"&&n.result&&e.jsxs(e.Fragment,{children:[" · ",n.result.newer?e.jsxs("a",{href:Xn,target:"_blank",rel:"noreferrer",className:"text-brand hover:underline",children:[n.result.latest," is out — how to upgrade"]}):"up to date"]})]})]})]})}function aa({me:t}){const s=ne(),n=_e(),[a,r]=o.useState(wt),h=t.user.name||t.user.email,d=t.user.name?t.user.email:t.user.role,i=async()=>{await Z.logout().catch(()=>{}),Ct("out"),n.clear(),s({to:"/sign-in",replace:!0})};return e.jsxs(ae,{children:[e.jsxs(re,{render:e.jsx(O,{size:"lg"}),children:[e.jsx(Ps,{className:"size-8 rounded-full",children:e.jsx(Rs,{className:"bg-primary text-[12px] font-semibold text-primary-foreground",children:Os(t.user.name,t.user.email)})}),e.jsxs("div",{className:"min-w-0 flex-1 text-left leading-tight",children:[e.jsx("div",{className:"truncate text-[13px] font-semibold",children:h}),e.jsx("div",{className:"truncate text-[11.5px] text-muted-foreground",children:d})]}),e.jsx(Se,{className:"size-3.5 text-muted-foreground"})]}),e.jsxs(oe,{align:"start",side:"top",className:"w-[250px]",children:[e.jsx(je,{children:e.jsxs(ee,{className:"flex flex-col",children:[e.jsx("span",{className:"text-[13px] font-semibold",children:h}),e.jsx("span",{className:"text-[11.5px] font-normal text-muted-foreground",children:t.user.name?`${t.user.email} · ${t.user.role}`:t.user.role})]})}),e.jsx(V,{}),e.jsxs(Ts,{value:a,onValueChange:f=>{const c=f;Nt(c),r(c)},children:[e.jsx(ee,{children:"Theme"}),e.jsxs(ce,{value:"system",children:[e.jsx(Is,{}),"System"]}),e.jsxs(ce,{value:"light",children:[e.jsx(As,{}),"Light"]}),e.jsxs(ce,{value:"dark",children:[e.jsx(_s,{}),"Dark"]})]}),e.jsx(V,{}),e.jsxs(D,{onClick:()=>void s({to:"/you"}),children:[e.jsx(Qe,{}),"You"]}),e.jsxs(D,{onClick:()=>void i(),children:[e.jsx(Vs,{}),"Sign out"]})]})]})}function ra({onSearch:t}){const n=yt().map(a=>a.loaderData?.crumb).filter(a=>typeof a=="string"&&a.length>0);return e.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2.5 border-b border-border/60 px-4",children:[e.jsx(Ln,{className:"-ml-1"}),e.jsx("nav",{"aria-label":"Breadcrumb",className:"flex items-center gap-2 text-[13.5px] font-medium text-muted-foreground",children:n.map((a,r)=>e.jsxs("span",{className:"flex items-center gap-2",children:[r>0&&e.jsx("span",{className:"text-line-strong",children:"/"}),e.jsx("span",{className:r===n.length-1?"text-foreground":void 0,children:a})]},r))}),e.jsx("div",{className:"flex-1"}),e.jsxs("button",{type:"button",onClick:t,"aria-label":"Search and go",className:"flex h-7 items-center gap-2 rounded-md border border-border bg-card px-2 text-[12.5px] text-muted-foreground",children:[e.jsx(Ue,{className:"size-3.5"}),e.jsx("span",{className:"hidden sm:inline",children:"Search"}),e.jsx("kbd",{className:"hidden rounded border border-border px-1 font-mono text-[11px] sm:inline",children:"⌘K"})]})]})}const Ta=()=>e.jsx(Qn,{children:e.jsx(Tt,{})});export{Ta as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Q as g,T as f,U as p,o as v,j as e,B as m,V as N,L as P,p as j}from"./index-
|
|
1
|
+
import{Q as g,T as f,U as p,o as v,j as e,B as m,V as N,L as P,p as j}from"./index-DFxWyhmm.js";import{Q as y,u as b}from"./useBaseQuery-CmgDPl0Z.js";import{P as w,S}from"./parts-fnhfMAxC.js";import{b as R,c as E,S as F}from"./labels--UUyt9uB.js";import{u as k}from"./me-C8ixZq4k.js";import"./card-BVWe16yF.js";var M=class extends y{constructor(s,n){super(s,n)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(s){s._type="infinite",super.setOptions(s)}getOptimisticResult(s){return s._type="infinite",super.getOptimisticResult(s)}fetchNextPage(s){return this.fetch({...s,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(s){return this.fetch({...s,meta:{fetchMore:{direction:"backward"}}})}createResult(s,n){const{state:i}=s,l=super.createResult(s,n),{isFetching:o,isRefetching:r,isError:u,isRefetchError:d}=l,t=i.fetchMeta?.fetchMore?.direction,c=u&&t==="forward",a=o&&t==="forward",h=u&&t==="backward",x=o&&t==="backward";return{...l,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:f(n,i.data),hasPreviousPage:g(n,i.data),isFetchNextPageError:c,isFetchingNextPage:a,isFetchPreviousPageError:h,isFetchingPreviousPage:x,isRefetchError:d&&!c&&!h,isRefetching:r&&!a&&!x}}};function A(s,n){return b(s,M)}const C=[{value:"unresolved",label:"Needs attention"},...E.map(s=>({value:s,label:F[s]})),{value:"all",label:"Everything"}];function O(s,n=new Date){const i=new Date(s),l=r=>new Date(r.getFullYear(),r.getMonth(),r.getDate()).getTime(),o=Math.round((l(n)-l(i))/864e5);return o<=0?"Today":o===1?"Yesterday":o<7?i.toLocaleDateString(void 0,{weekday:"long"}):i.toLocaleDateString(void 0,{day:"numeric",month:"long"})}function U(){const s=k(),{status:n="unresolved",site:i}=p.useSearch(),l=v({from:"/activity"}),o=t=>void l({search:c=>({...c,...t}),replace:!0}),r=A({queryKey:["activity",n,i??null],queryFn:({pageParam:t})=>j.activity({status:n,...i?{site:i}:{},...t?{cursor:t}:{}}),initialPageParam:"",getNextPageParam:t=>t.nextCursor??void 0,refetchOnWindowFocus:!0}),u=r.data?.pages.flatMap(t=>t.data)??[],d=[];for(const t of u){const c=O(t.updatedAt),a=d[d.length-1];a?.day===c?a.rows.push(t):d.push({day:c,rows:[t]})}return e.jsxs("div",{className:"flex flex-col gap-5 p-7",children:[e.jsx(w,{title:"Activity",sub:`Every site, newest first${i?"":" — all of them"}`}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[C.map(t=>e.jsx(m,{size:"sm",variant:n===t.value?"default":"outline",onClick:()=>o({status:t.value}),children:t.label},t.value)),e.jsx("div",{className:"flex-1"}),e.jsxs("label",{className:"flex items-center gap-2 text-[13px] text-muted-foreground",children:["Site",e.jsxs("select",{"aria-label":"Site",value:i??"",onChange:t=>o({site:t.target.value||void 0}),className:"h-8 rounded-md border border-input bg-background px-2.5 text-[13px] text-foreground",children:[e.jsx("option",{value:"",children:"All sites"}),s.projects.map(t=>e.jsx("option",{value:t.uid,children:t.name},t.uid))]})]})]}),r.isPending&&e.jsx(N,{rows:4}),r.isError&&e.jsx("p",{className:"m-0 text-[13px] text-destructive",children:"Could not read the feed. Reload to try again."}),r.isSuccess&&u.length===0&&e.jsx("p",{className:"m-0 text-[13px] text-muted-foreground",children:n==="resolved"?"Nothing has been resolved yet — this is where finished comments go.":n==="unresolved"?"Nothing needs attention. Every comment on every site is resolved.":"No comments yet on any site."}),d.map(({day:t,rows:c})=>e.jsxs("section",{className:"flex flex-col gap-2",children:[e.jsx("h2",{className:"m-0 text-[12px] font-medium uppercase tracking-wide text-muted-foreground",children:t}),e.jsx("ul",{className:"m-0 flex list-none flex-col gap-1.5 p-0",children:c.map(a=>e.jsx("li",{children:e.jsxs(P,{to:"/s/$site/comments",params:{site:a.site.uid},search:{thread:a.key},className:"flex flex-col gap-1 rounded-md border border-border px-3 py-2.5 no-underline transition-colors hover:bg-muted/60",children:[e.jsxs("span",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1 text-[13px]",children:[e.jsx(S,{status:a.status}),e.jsx("span",{className:"font-medium text-foreground",children:a.site.name}),e.jsx("code",{className:"font-mono text-[12px] text-muted-foreground",children:a.route}),e.jsx("span",{className:"flex-1"}),e.jsx("span",{className:"text-[12px] text-muted-foreground",children:R(a.updatedAt)})]}),a.latest?.body&&e.jsxs("span",{className:"line-clamp-2 text-[13px] text-foreground",children:[e.jsxs("span",{className:"text-muted-foreground",children:[a.latest.author??a.createdBy.name,": "]}),a.latest.body]}),e.jsxs("span",{className:"flex flex-wrap items-center gap-x-2 text-[12px] text-muted-foreground",children:[e.jsx("span",{className:"font-mono",children:a.key}),e.jsx("span",{children:"·"}),e.jsxs("span",{children:[a.commentCount," ",a.commentCount===1?"comment":"comments"]}),a.assignee&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsx("span",{children:a.assignee})]})]})]})},a.id))})]},t)),r.hasNextPage&&e.jsx("div",{children:e.jsx(m,{variant:"outline",size:"sm",disabled:r.isFetchingNextPage,onClick:()=>void r.fetchNextPage(),children:r.isFetchingNextPage?"Reading…":"Show older"})})]})}export{U as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,h as b,i as f,j as d,f as m}from"./index-
|
|
1
|
+
import{r as a,h as b,i as f,j as d,f as m}from"./index-DFxWyhmm.js";import{w as A}from"./dialog-BGVcKKLs.js";const x=a.createContext(void 0);function z(){const e=a.useContext(x);if(e===void 0)throw new Error(b(13));return e}const g={imageLoadingStatus:()=>null},R=a.forwardRef(function(t,r){const{className:v,render:p,style:s,...c}=t,[n,o]=a.useState("idle"),i={imageLoadingStatus:n},u=a.useMemo(()=>({imageLoadingStatus:n,setImageLoadingStatus:o}),[n,o]),l=f("span",t,{state:i,ref:r,props:c,stateAttributesMapping:g});return d.jsx(x.Provider,{value:u,children:l})}),k=a.forwardRef(function(t,r){const{className:v,render:p,delay:s=0,style:c,...n}=t,{imageLoadingStatus:o}=z(),[i,u]=a.useState(s===0),l=A();return a.useEffect(()=>(s>0?l.start(s,()=>u(!0)):u(!0),l.clear),[l,s]),f("span",t,{state:{imageLoadingStatus:o},ref:r,props:n,stateAttributesMapping:g,enabled:o!=="loaded"&&(s===0||i)})});function h({className:e,size:t="default",...r}){return d.jsx(R,{"data-slot":"avatar","data-size":t,className:m("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",e),...r})}function w({className:e,...t}){return d.jsx(k,{"data-slot":"avatar-fallback",className:m("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",e),...t})}export{h as A,w as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as a,f as n,n as o}from"./index-
|
|
1
|
+
import{m as a,f as n,n as o}from"./index-DFxWyhmm.js";import{u as d}from"./useRender-P0lZXDvs.js";const s=o("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function v({className:r,variant:e="default",render:t,...i}){return d({defaultTagName:"span",props:a({className:n(s({variant:e}),r)},i),render:t,state:{slot:"badge",variant:e}})}export{v as B};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s,f as t}from"./index-
|
|
1
|
+
import{j as s,f as t}from"./index-DFxWyhmm.js";function c({className:a,size:d="default",...r}){return s.jsx("div",{"data-slot":"card","data-size":d,className:t("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",a),...r})}export{c as C};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as zn,as as Z,k as Pe,at as mt,aA as oe,aT as bt,r as l,aF as Jn,a3 as ke,e as q,l as Ze,d as N,h as zt,i as Ae,a4 as Qn,j as I,a5 as Jt,E as ve,aU as Zn,a6 as Pt,g as et,aw as ot,av as er,aV as tr,aW as Qt,aX as nr,aB as rr,B as Zt,f as Fe}from"./index-
|
|
1
|
+
import{c as zn,as as Z,k as Pe,at as mt,aA as oe,aT as bt,r as l,aF as Jn,a3 as ke,e as q,l as Ze,d as N,h as zt,i as Ae,a4 as Qn,j as I,a5 as Jt,E as ve,aU as Zn,a6 as Pt,g as et,aw as ot,av as er,aV as tr,aW as Qt,aX as nr,aB as rr,B as Zt,f as Fe}from"./index-DFxWyhmm.js";import{a as A,o as U,m as ge,c as Se,B as or,u as en,s as tn,y as yt,b as nn,w as rn,g as Ee,t as on,q as sn,n as sr,p as ir,i as ar}from"./label-CxnO6qKO.js";/**
|
|
2
2
|
* @license lucide-react v1.39.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as zn,r as u,i as Fe,E as tt,aq as qt,k as se,ar as $e,g as Pe,as as ke,at as We,au as on,av as lt,aw as Et,ax as Vo,ay as Un,az as Wo,aA as rn,aB as Kn,aC as Dt,aD as Gn,aE as En,l as Ct,a5 as Yn,d as de,a3 as Xn,e as pe,aF as qn,h as ze,a7 as jo,a4 as Qn,m as it,a6 as $o,j as Q,aG as zo,f as ut}from"./index-
|
|
1
|
+
import{c as zn,r as u,i as Fe,E as tt,aq as qt,k as se,ar as $e,g as Pe,as as ke,at as We,au as on,av as lt,aw as Et,ax as Vo,ay as Un,az as Wo,aA as rn,aB as Kn,aC as Dt,aD as Gn,aE as En,l as Ct,a5 as Yn,d as de,a3 as Xn,e as pe,aF as qn,h as ze,a7 as jo,a4 as Qn,m as it,a6 as $o,j as Q,aG as zo,f as ut}from"./index-DFxWyhmm.js";import{C as Uo}from"./check-9egtmHPl.js";import{i as Je,Q as Qt,w as _e,S as Jn,U as Zn,V as Ko,W as ft,Y as Tt,Z as eo,_ as to,a as Te,$ as Go,a0 as Mt,a1 as Yo,a2 as Xo,T as Jt,a3 as Lt,a4 as qo,a5 as Zt,v as Re,a6 as Qo,a7 as Jo,a8 as Zo,a9 as Cn,aa as Ut,ab as Tn,ac as Ne,ad as mt,ae as er,af as Nt,ag as Ht,ah as no,ai as sn,aj as tr,ak as nr,al as or,am as rr,C as sr,O as ir,A as oo,an as cr,B as ar,ao as lr,ap as ur,aq as fr,ar as dr,as as pr,z as gr,at as mr,au as hr,av as xr,N as yr,R as vr,p as Rr,aw as ro,j as br,P as wr,l as Er,ax as so,m as Cr,n as Tr,ay as Mr,az as Or,aA as Sr,q as Pr,aB as Ir,F as Ar,r as kr,o as Fr,aC as Dr,aD as Lr,aE as Nr,aF as Hr,aG as Br,aH as _r,s as Vr,t as Wr,aI as Mn,aJ as On,aK as jr}from"./dialog-BGVcKKLs.js";import{t as cn,g as nt,c as ie,m as ct,o as Se,a as le,p as at,q as io,b as be,r as en,s as Ot,v as an,u as Bt,w as $r,x as st,k as zr,y as Sn,i as Ur,z as Kr}from"./label-CxnO6qKO.js";import{u as co,a as ao,C as Gr,b as Yr}from"./CompositeItem-9k6gamy_.js";import{u as Xr}from"./useValueChanged-CFJAwkwT.js";/**
|
|
2
2
|
* @license lucide-react v1.39.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|