cognova 0.2.7 → 0.2.8
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/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{BjFs8Ujb.js → -2AbaFNH.js} +1 -1
- package/.output/public/_nuxt/{B5OWqWCh.js → 0dqQoCHY.js} +1 -1
- package/.output/public/_nuxt/{DZ_azKLI.js → 2QHXgMyi.js} +1 -1
- package/.output/public/_nuxt/{DaiWSWdm.js → 36ZHqDPo.js} +1 -1
- package/.output/public/_nuxt/4XnyUc7C.js +1 -0
- package/.output/public/_nuxt/{DgKeJf5C.js → 6QDVg5TO.js} +1 -1
- package/.output/public/_nuxt/{RRoc4m9d.js → B-AlyT2D.js} +1 -1
- package/.output/public/_nuxt/{1Hz98MKF.js → B0xuHXvN.js} +1 -1
- package/.output/public/_nuxt/{BW-E-Sar.js → B2Xfh7am.js} +1 -1
- package/.output/public/_nuxt/{Bb1B0ntt.js → B5SnZL2l.js} +1 -1
- package/.output/public/_nuxt/{CEfkp9Rl.js → B6-U3KqJ.js} +2 -2
- package/.output/public/_nuxt/{Cebw7Q7c.js → B6G3NLfW.js} +1 -1
- package/.output/public/_nuxt/B8TQvzYX.js +1 -0
- package/.output/public/_nuxt/{D3V98LVR.js → B9zgEO8N.js} +1 -1
- package/.output/public/_nuxt/{CNwGp6eP.js → BBDxhFYY.js} +1 -1
- package/.output/public/_nuxt/{Dkzqkzki.js → BCCYopTB.js} +1 -1
- package/.output/public/_nuxt/{CfWDee_q.js → BE1CVWts.js} +1 -1
- package/.output/public/_nuxt/{BTk5mgdf.js → BF3tVKtX.js} +1 -1
- package/.output/public/_nuxt/{HCCuOAgZ.js → BHn8tRjg.js} +1 -1
- package/.output/public/_nuxt/BIo-9u_O.js +1 -0
- package/.output/public/_nuxt/{CG0fS-BQ.js → BJUff9Ku.js} +1 -1
- package/.output/public/_nuxt/{CrjKigv8.js → BLm0UviR.js} +1 -1
- package/.output/public/_nuxt/BLwctszt.js +1 -0
- package/.output/public/_nuxt/BMs0mHEp.js +1 -0
- package/.output/public/_nuxt/{DV0JMebZ.js → BSA-U0so.js} +1 -1
- package/.output/public/_nuxt/{D-wVwRIx.js → BUC36BHp.js} +1 -1
- package/.output/public/_nuxt/{CzqLfT8k.js → BVEFmI4I.js} +1 -1
- package/.output/public/_nuxt/{B43p0So7.js → BXtZVbmx.js} +1 -1
- package/.output/public/_nuxt/{BJ_GgKV0.js → BYtVdUIW.js} +1 -1
- package/.output/public/_nuxt/{CJ85o8FK.js → BZBNJD7U.js} +1 -1
- package/.output/public/_nuxt/{Dpp5cOwJ.js → BahXyh-A.js} +1 -1
- package/.output/public/_nuxt/{BmTCDcNm.js → BdxP21ep.js} +1 -1
- package/.output/public/_nuxt/{Bc0NIKN7.js → BefOhWHD.js} +1 -1
- package/.output/public/_nuxt/{DuOsLoVR.js → BhYoxmLV.js} +1 -1
- package/.output/public/_nuxt/{BMLwzSDu.js → Bhhg7oSf.js} +1 -1
- package/.output/public/_nuxt/{deSeNTOh.js → BjnQ1pI1.js} +1 -1
- package/.output/public/_nuxt/{qW7F87d8.js → BkO884Ds.js} +3 -3
- package/.output/public/_nuxt/{BNlugvM3.js → Bkc1Hpcf.js} +1 -1
- package/.output/public/_nuxt/{DgPiIWA2.js → BlsIfvSf.js} +1 -1
- package/.output/public/_nuxt/{Dysa6np_.js → BmaHzvZM.js} +1 -1
- package/.output/public/_nuxt/{CBrXB4hk.js → BmdlymIW.js} +1 -1
- package/.output/public/_nuxt/{CK5Ef4YR.js → BnJ-6YDw.js} +1 -1
- package/.output/public/_nuxt/{C5nfaH9w.js → BqTdsCnW.js} +1 -1
- package/.output/public/_nuxt/{CjRmY2OQ.js → BrOKokPO.js} +1 -1
- package/.output/public/_nuxt/{B7-0ADn3.js → Buf1PAiO.js} +1 -1
- package/.output/public/_nuxt/{CqiOV9n1.js → BvstjGHC.js} +1 -1
- package/.output/public/_nuxt/{DsKy-gee.js → BwC62XRN.js} +1 -1
- package/.output/public/_nuxt/{WWNeb45u.js → Bwn-CRYH.js} +1 -1
- package/.output/public/_nuxt/{BsXPllgv.js → BwyXWqBY.js} +1 -1
- package/.output/public/_nuxt/{C6Kc4XvS.js → BxShcW0K.js} +1 -1
- package/.output/public/_nuxt/{NBE83ZQn.js → C-HCArYP.js} +1 -1
- package/.output/public/_nuxt/{sdvIKLwS.js → C-Ygk9x5.js} +1 -1
- package/.output/public/_nuxt/{Dx2Tgm6S.js → C075hYlX.js} +1 -1
- package/.output/public/_nuxt/{C14DGwaT.js → C13FKhqK.js} +1 -1
- package/.output/public/_nuxt/{BLszW9T3.js → C1tCdK-M.js} +1 -1
- package/.output/public/_nuxt/{BdCB2PoJ.js → C21BjagS.js} +1 -1
- package/.output/public/_nuxt/{B_28CKij.js → C24so3m7.js} +2 -2
- package/.output/public/_nuxt/{Drr-RSSP.js → C3tximD1.js} +1 -1
- package/.output/public/_nuxt/{XzRnkkwG.js → C6FFW_cO.js} +1 -1
- package/.output/public/_nuxt/{Cedv1M65.js → C6sX7TYf.js} +1 -1
- package/.output/public/_nuxt/{CnW8zyuA.js → C7qhmmZh.js} +1 -1
- package/.output/public/_nuxt/{CSQ-nblB.js → CAfyXyeo.js} +1 -1
- package/.output/public/_nuxt/{DxR8g9So.js → CClsKJ9A.js} +1 -1
- package/.output/public/_nuxt/{Ci-MVdCd.js → CDkyQ1eQ.js} +1 -1
- package/.output/public/_nuxt/CE9_ECxx.js +1 -0
- package/.output/public/_nuxt/{JJIcQEna.js → CEDw8osP.js} +1 -1
- package/.output/public/_nuxt/{CwJR22-0.js → CEz288t8.js} +1 -1
- package/.output/public/_nuxt/{BvuV9uCn.js → CF33v_m5.js} +1 -1
- package/.output/public/_nuxt/{DytaiikM.js → CH_jROT9.js} +1 -1
- package/.output/public/_nuxt/{NlScC3GW.js → CO3hceDE.js} +1 -1
- package/.output/public/_nuxt/{ByfSJZV6.js → CQ3tAemj.js} +1 -1
- package/.output/public/_nuxt/{DMsHLHmB.js → CSHcfejh.js} +1 -1
- package/.output/public/_nuxt/{DAs574wU.js → CSjOaBKu.js} +1 -1
- package/.output/public/_nuxt/{DNpsjOxN.js → CVYcsqmL.js} +1 -1
- package/.output/public/_nuxt/{DfpSaqgV.js → CXTrUfQ5.js} +1 -1
- package/.output/public/_nuxt/{0LyRrTRM.js → CY7f553E.js} +1 -1
- package/.output/public/_nuxt/{A5lrd5_j.js → CYQP4zpi.js} +1 -1
- package/.output/public/_nuxt/CbvNJVrk.js +1 -0
- package/.output/public/_nuxt/CewcVxDS.js +1 -0
- package/.output/public/_nuxt/{1IuG3yiQ.js → CfY_bsV0.js} +1 -1
- package/.output/public/_nuxt/{4bC1z31I.js → ClGn48iq.js} +1 -1
- package/.output/public/_nuxt/{CwaMSU1O.js → CqFcWBkW.js} +1 -1
- package/.output/public/_nuxt/Cr0NfhPB.js +1 -0
- package/.output/public/_nuxt/{CXuKrnTA.js → CrmE-JGu.js} +1 -1
- package/.output/public/_nuxt/{CW8xtqwN.js → Cve4psva.js} +1 -1
- package/.output/public/_nuxt/{BsPj3ifk.js → CzAZpALW.js} +1 -1
- package/.output/public/_nuxt/{S4a_N6rD.js → D-5A6cMB.js} +1 -1
- package/.output/public/_nuxt/{HC3657Xq.js → D-Ge96eV.js} +1 -1
- package/.output/public/_nuxt/{fTEmwfo4.js → D04CyXmf.js} +1 -1
- package/.output/public/_nuxt/{B9Kd_0HK.js → D2kQkOaG.js} +1 -1
- package/.output/public/_nuxt/{jeu3Xx8e.js → D4Cizi4y.js} +1 -1
- package/.output/public/_nuxt/{B-5roYpk.js → D4X6ONPF.js} +1 -1
- package/.output/public/_nuxt/{_16_b82K.js → D4_89MZm.js} +1 -1
- package/.output/public/_nuxt/{Db5XIfWS.js → D79lbuWG.js} +1 -1
- package/.output/public/_nuxt/{DAFasgHH.js → D7pKT3IW.js} +1 -1
- package/.output/public/_nuxt/{DZdh7_lh.js → D887s9k9.js} +1 -1
- package/.output/public/_nuxt/{DImdNj-F.js → D9aYkNhQ.js} +1 -1
- package/.output/public/_nuxt/{BoPAYize.js → DJt7Rogf.js} +1 -1
- package/.output/public/_nuxt/{BZFXnEwe.js → DKKY8zWm.js} +1 -1
- package/.output/public/_nuxt/{BJi2ZHtT.js → DLUvsixu.js} +1 -1
- package/.output/public/_nuxt/{zBoPDS4z.js → DMb_1D81.js} +1 -1
- package/.output/public/_nuxt/{CzTTKfet.js → DX_9SfFb.js} +1 -1
- package/.output/public/_nuxt/{CpC3C9gj.js → DZEuR9ms.js} +1 -1
- package/.output/public/_nuxt/{DCco_rlV.js → D_O7SlHm.js} +1 -1
- package/.output/public/_nuxt/{DvgLoqaC.js → D_obX2Hj.js} +1 -1
- package/.output/public/_nuxt/{CeDxLTxX.js → DaBSQDif.js} +1 -1
- package/.output/public/_nuxt/{DB3y_21M.js → Dbfwn2zk.js} +1 -1
- package/.output/public/_nuxt/{-2wkydbj.js → DcbbfwCe.js} +1 -1
- package/.output/public/_nuxt/{MdebRWqA.js → DmDPSvxi.js} +1 -1
- package/.output/public/_nuxt/{CVr40yKH.js → DmOS3vFH.js} +1 -1
- package/.output/public/_nuxt/DmcMCO8x.js +1 -0
- package/.output/public/_nuxt/DmlZSBjF.js +1 -0
- package/.output/public/_nuxt/{CB8_A8N4.js → DqzomZoo.js} +1 -1
- package/.output/public/_nuxt/{0J8pJb0Z.js → Drxf7nJz.js} +1 -1
- package/.output/public/_nuxt/{CjYUi9c8.js → Dt5mOzXj.js} +1 -1
- package/.output/public/_nuxt/{Brqrl-cH.js → DtJnWtpL.js} +1 -1
- package/.output/public/_nuxt/{CwCEQ4Dw.js → DtyyytRx.js} +1 -1
- package/.output/public/_nuxt/{CphXSvBo.js → DwIYtFfA.js} +1 -1
- package/.output/public/_nuxt/{CLZS246x.js → GGcn5KPW.js} +1 -1
- package/.output/public/_nuxt/{pkbwpgSD.js → GYf-vnR6.js} +1 -1
- package/.output/public/_nuxt/{Bn8loaeQ.js → ImPsUDiH.js} +1 -1
- package/.output/public/_nuxt/{hqpqUuXS.js → JReYPlwF.js} +1 -1
- package/.output/public/_nuxt/{CgQKyBSS.js → KEeoKtq_.js} +1 -1
- package/.output/public/_nuxt/{Bf34lExB.js → LQNRVThr.js} +1 -1
- package/.output/public/_nuxt/{BhOIdu3Z.js → MWUW1sIF.js} +1 -1
- package/.output/public/_nuxt/{w3t8WD8v.js → Pn7VD6uQ.js} +1 -1
- package/.output/public/_nuxt/{BaJEGr8G.js → SfaNtyKS.js} +1 -1
- package/.output/public/_nuxt/{vM-wdhkZ.js → U3f6dy8i.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/410e449d-9fe8-43a0-ae07-80797693b9b8.json +1 -0
- package/.output/public/_nuxt/{BrICHPil.js → cPPThz84.js} +1 -1
- package/.output/public/_nuxt/{CxJr4mB0.js → dB7G4iIC.js} +1 -1
- package/.output/public/_nuxt/{EgYyfo1g.js → eE8TtXgC.js} +3 -3
- package/.output/public/_nuxt/iBaivqi8.js +1 -0
- package/.output/public/_nuxt/{BLL1JLwq.js → ijmD2cEW.js} +1 -1
- package/.output/public/_nuxt/{DpYns7cT.js → it8syoZI.js} +1 -1
- package/.output/public/_nuxt/mT7Mt2d7.js +1 -0
- package/.output/public/_nuxt/{Bb9LNSu_.js → mfAEx0Kz.js} +1 -1
- package/.output/public/_nuxt/{MzEmU9ER.js → nHSiDk8N.js} +1 -1
- package/.output/public/_nuxt/{CvMqUdkl.js → njnzCNrH.js} +3 -3
- package/.output/public/_nuxt/{atVSHCxP.js → pHCJ6lhw.js} +1 -1
- package/.output/public/_nuxt/{Cow1TrPj.js → vES4kgx7.js} +1 -1
- package/.output/public/_nuxt/{Zjvb5YJR.js → yJ9vRvHj.js} +1 -1
- package/.output/public/_nuxt/{B8Kve-DH.js → zO9MgHj2.js} +1 -1
- package/.output/public/_nuxt/{BaVaTug8.js → zXvvpsZj.js} +1 -1
- package/.output/server/chunks/build/client.precomputed.mjs +1 -1
- package/.output/server/chunks/build/server.mjs +1 -1
- package/.output/server/chunks/build/{settings-DuT6LGJZ.mjs → settings-ByUXa46k.mjs} +1507 -218
- package/.output/server/chunks/build/settings-ByUXa46k.mjs.map +1 -0
- package/.output/server/chunks/build/styles.mjs +2 -2
- package/.output/server/chunks/nitro/nitro.mjs +872 -872
- package/.output/server/package.json +1 -1
- package/app/pages/settings.vue +441 -5
- package/package.json +1 -1
- package/server/api/skills/import.post.ts +1 -1
- package/server/bridge/adapters/telegram.ts +1 -1
- package/.output/public/_nuxt/B-YQztaH.js +0 -1
- package/.output/public/_nuxt/B1gFtqXK.js +0 -1
- package/.output/public/_nuxt/BTfZ7nek.js +0 -1
- package/.output/public/_nuxt/BbPnqQJ0.js +0 -1
- package/.output/public/_nuxt/BhSWIRpp.js +0 -1
- package/.output/public/_nuxt/By6kmkhJ.js +0 -1
- package/.output/public/_nuxt/C4XVJnNJ.js +0 -1
- package/.output/public/_nuxt/CkvyAKbu.js +0 -1
- package/.output/public/_nuxt/D2f7BlK2.js +0 -1
- package/.output/public/_nuxt/D2lmhTjQ.js +0 -1
- package/.output/public/_nuxt/D64-rCSQ.js +0 -1
- package/.output/public/_nuxt/DGP2JJt8.js +0 -1
- package/.output/public/_nuxt/builds/meta/9863fe43-d78c-4b29-a1e8-e6de61119507.json +0 -1
- package/.output/public/_nuxt/f7zDjk6q.js +0 -1
- package/.output/server/chunks/build/settings-DuT6LGJZ.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ze,Q as z,R as k,S as T,a4 as Y,V as G,C as v,a3 as ht,aR as Vn,aQ as da,e as J,a_ as gt,a1 as wi,aP as fa,$ as jn,c as te,y as wr,c1 as _a,T as O,a0 as Xt,bm as Yn,bG as pa,aJ as gi,c2 as ga,bf as Cr,a7 as $r,bU as Gn,bB as ji,a9 as $,q as Ci,G as j,ai as ke,aM as va,a5 as ma,f as Ce,k as kt,I as Xn,aB as Sa,ao as ei,O as Yi,P as ba,aC as ot,aT as Mt,L as ns,N as $t,al as Ne,W as Jt,aU as Jn,b8 as os,ab as ie,U as H,aj as Ge,b9 as Gi,aN as Et,aO as Lt,aI as zt,aK as ya,aL as wa,b7 as Ca,ax as kr,_ as De,Y as Oe,aa as at,ae as Me,au as Di,an as ka,ap as Ni,ba as zi,bb as Yt,aq as Xi,ar as vi,bg as Zn,X as xa,b as dt,c3 as Ea,aG as Qn,bV as La,aW as Ba,M as Da,c4 as Ma,am as Ra,ag as Ta,ak as mi,a2 as eo,bE as fs,c5 as _s,c6 as Aa,ac as Pa,n as Ia}from"./CvMqUdkl.js";import{c as Zt,g as Oa,h as Na}from"./HCCuOAgZ.js";import{u as to,a as za,b as Fa,_ as Ha,p as $a}from"./sdvIKLwS.js";import{_ as xr,u as Wa}from"./deSeNTOh.js";import{_ as io}from"./CW8xtqwN.js";import{_ as qa,c as Ka}from"./Bb1B0ntt.js";import{b as Wr,A as Ua,c as Va,d as qr}from"./BdCB2PoJ.js";import{u as ja}from"./Bn8loaeQ.js";import{u as so}from"./D2lmhTjQ.js";import{u as ro}from"./C6Y-ieo6.js";import{_ as Ya}from"./Zjvb5YJR.js";import{H as Ga,P as Xa}from"./DfpSaqgV.js";import{_ as Ja}from"./zBoPDS4z.js";import{_ as Za}from"./CB8_A8N4.js";import{_ as Qa}from"./NlScC3GW.js";import{_ as Er}from"./pkbwpgSD.js";import{_ as el}from"./DgPiIWA2.js";import{i as tl,L as il,a as sl,b as rl,c as nl,d as ol,e as al,f as ll,_ as hl}from"./DB3y_21M.js";import{g as cl}from"./BhOIdu3Z.js";import{_ as ul}from"./BaJEGr8G.js";import{_ as dl}from"./CnW8zyuA.js";import{u as fl,_ as _l,a as pl,b as gl}from"./hqpqUuXS.js";import{u as Lr}from"./DZ_azKLI.js";import{s as vl}from"./D2f7BlK2.js";import{u as ml}from"./BNlugvM3.js";import{u as Sl}from"./DpYns7cT.js";import"./Cow1TrPj.js";import"./DImdNj-F.js";import"./-2wkydbj.js";import"./C5nfaH9w.js";import"./D3V98LVR.js";import"./BJi2ZHtT.js";import"./CXuKrnTA.js";import"./Dkzqkzki.js";import"./WWNeb45u.js";import"./CJ85o8FK.js";import"./BJ_GgKV0.js";import"./CqiOV9n1.js";import"./B1gFtqXK.js";import"./CxJr4mB0.js";import"./B9Kd_0HK.js";import"./DAFasgHH.js";import"./DxR8g9So.js";import"./B_28CKij.js";import"./88opOQSr.js";import"./iik6CYzq.js";import"./B7-0ADn3.js";var bl=ze({__name:"ListboxGroupLabel",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(e){const t=e,i=tl({id:""});return(s,r)=>(k(),z(v(ht),G(t,{id:v(i).id}),{default:T(()=>[Y(s.$slots,"default")]),_:3},16,["id"]))}}),yl=bl;const[Wt,wl]=Vn(["NavigationMenuRoot","NavigationMenuSub"],"NavigationMenuContext");var Cl=ze({__name:"NavigationMenuRoot",props:{modelValue:{type:String,required:!1,default:void 0},defaultValue:{type:String,required:!1},dir:{type:String,required:!1},orientation:{type:String,required:!1,default:"horizontal"},delayDuration:{type:Number,required:!1,default:200},skipDelayDuration:{type:Number,required:!1,default:300},disableClickTrigger:{type:Boolean,required:!1,default:!1},disableHoverTrigger:{type:Boolean,required:!1,default:!1},disablePointerLeaveClose:{type:Boolean,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"nav"}},emits:["update:modelValue"],setup(e,{emit:t}){const i=e,r=da(i,"modelValue",t,{defaultValue:i.defaultValue??"",passive:i.modelValue===void 0}),n=J(""),{forwardRef:o,currentElement:a}=gt(),h=J(),l=J(),f=J(),{getItems:u,CollectionSlot:d}=wi({key:"NavigationMenu",isProvider:!0}),{delayDuration:c,skipDelayDuration:p,dir:_,disableClickTrigger:S,disableHoverTrigger:w,unmountOnHide:y}=fa(i),x=ja(_),g=jn(!1,p),L=te(()=>r.value!==""||g.value?150:c.value),B=_a(E=>{typeof E=="string"&&(n.value=r.value,r.value=E)},L);return wr(()=>{if(!r.value)return;const E=u().map(W=>W.ref);f.value=E.find(W=>W.id.includes(r.value))}),wl({isRootMenu:!0,modelValue:r,previousValue:n,baseId:so(void 0,"reka-navigation-menu"),disableClickTrigger:S,disableHoverTrigger:w,dir:x,unmountOnHide:y,orientation:i.orientation,rootNavigationMenu:a,indicatorTrack:h,activeTrigger:f,onIndicatorTrackChange:E=>{h.value=E},viewport:l,onViewportChange:E=>{l.value=E},onTriggerEnter:E=>{B(E)},onTriggerLeave:()=>{g.value=!0,B("")},onContentEnter:()=>{B()},onContentLeave:()=>{i.disablePointerLeaveClose||B("")},onItemSelect:E=>{n.value=r.value,r.value=E},onItemDismiss:()=>{n.value=r.value,r.value=""}}),(E,W)=>(k(),z(v(d),null,{default:T(()=>[O(v(ht),{ref:v(o),"aria-label":"Main",as:E.as,"as-child":E.asChild,"data-orientation":E.orientation,dir:v(x),"data-reka-navigation-menu":""},{default:T(()=>[Y(E.$slots,"default",{modelValue:v(r)})]),_:3},8,["as","as-child","data-orientation","dir"])]),_:3}))}}),kl=Cl;function as(e){return e?"open":"closed"}function no(e,t){return`${e}-trigger-${t}`}function Br(e,t){return`${e}-content-${t}`}const xl="navigationMenu.linkSelect",Fi="navigationMenu.rootContentDismiss";function Rs(e){const t=[],i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const r=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||r?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;i.nextNode();)t.push(i.currentNode);return t}function oo(e){const t=Xt();return e.some(i=>i===t?!0:(i.focus(),Xt()!==t))}function El(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const i=t.dataset.tabindex;t.setAttribute("tabindex",i)})}}function ao(e){return t=>t.pointerType==="mouse"?e(t):void 0}const[Dr,Ll]=Vn("NavigationMenuItem");var Bl=ze({__name:"NavigationMenuItem",props:{value:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"li"}},setup(e){const t=e;gt();const{getItems:i}=wi({key:"NavigationMenu"}),s=Wt(),r=so(t.value),n=J(),o=J(),a=Br(s.baseId,r);let h=()=>({});const l=J(!1);async function f(p="start"){const _=document.getElementById(a);if(_){h();const S=Rs(_);S.length&&oo(p==="start"?S:S.reverse())}}function u(){const p=document.getElementById(a);if(p){const _=Rs(p);_.length&&(h=El(_))}}Ll({value:r,contentId:a,triggerRef:n,focusProxyRef:o,wasEscapeCloseRef:l,onEntryKeyDown:f,onFocusProxyEnter:f,onContentFocusOutside:u,onRootContentClose:u});function d(){s.onItemDismiss(),n.value?.focus()}function c(p){const _=Xt();if(p.keyCode===32||p.key==="Enter")if(s.modelValue.value===r){d(),p.preventDefault();return}else{p.target.click(),p.preventDefault();return}const S=i().filter(y=>y.ref.parentElement?.hasAttribute("data-menu-item")).map(y=>y.ref);if(!S.includes(_))return;const w=ro(p,_,void 0,{itemsArray:S,loop:!1});w&&w?.focus(),p.preventDefault(),p.stopPropagation()}return(p,_)=>(k(),z(v(ht),{"as-child":p.asChild,as:p.as,"data-menu-item":"",onKeydown:Yn(c,["up","down","left","right","home","end","space"])},{default:T(()=>[Y(p.$slots,"default")]),_:3},8,["as-child","as"]))}}),Dl=Bl,Ml=ze({__name:"NavigationMenuContentImpl",props:{disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside"],setup(e,{emit:t}){const i=e,s=t,{getItems:r}=wi({key:"NavigationMenu"}),{forwardRef:n,currentElement:o}=gt(),a=Wt(),h=Dr(),l=no(a.baseId,h.value),f=Br(a.baseId,h.value),u=J(null),d=te(()=>{const y=r().map(W=>W.ref.id.split("trigger-")[1]);a.dir.value==="rtl"&&y.reverse();const x=y.indexOf(a.modelValue.value),g=y.indexOf(a.previousValue.value),L=h.value===a.modelValue.value,B=g===y.indexOf(h.value);if(!L&&!B)return u.value;const E=(()=>{if(x!==g){if(L&&g!==-1)return x>g?"from-end":"from-start";if(B&&x!==-1)return x>g?"to-start":"to-end"}return null})();return u.value=E,E});function c(y){if(s("focusOutside",y),s("interactOutside",y),y.detail.originalEvent.target.hasAttribute("data-navigation-menu-trigger")&&y.preventDefault(),!y.defaultPrevented){h.onContentFocusOutside();const g=y.target;a.rootNavigationMenu?.value?.contains(g)&&y.preventDefault()}}function p(y){if(s("pointerDownOutside",y),!y.defaultPrevented){const x=y.target,g=r().some(B=>B.ref.contains(x)),L=a.isRootMenu&&a.viewport.value?.contains(x);(g||L||!a.isRootMenu)&&y.preventDefault()}}wr(y=>{const x=o.value;if(a.isRootMenu&&x){const g=()=>{a.onItemDismiss(),h.onRootContentClose(),x.contains(Xt())&&h.triggerRef.value?.focus()};x.addEventListener(Fi,g),y(()=>x.removeEventListener(Fi,g))}});function _(y){s("escapeKeyDown",y),y.defaultPrevented||(a.onItemDismiss(),h.triggerRef?.value?.focus(),h.wasEscapeCloseRef.value=!0)}function S(y){if(y.target.closest("[data-reka-navigation-menu]")!==a.rootNavigationMenu.value)return;const x=y.altKey||y.ctrlKey||y.metaKey,g=y.key==="Tab"&&!x,L=Rs(y.currentTarget);if(g){const E=Xt(),W=L.findIndex(V=>V===E),Z=y.shiftKey?L.slice(0,W).reverse():L.slice(W+1,L.length);if(oo(Z))y.preventDefault();else{h.focusProxyRef.value?.focus();return}}ro(y,Xt(),void 0,{itemsArray:L,loop:!1,enableIgnoredElement:!0})?.focus()}function w(){const y=new Event(Fi,{bubbles:!0,cancelable:!0});o.value?.dispatchEvent(y)}return(y,x)=>(k(),z(v(pa),G({id:v(f),ref:v(n),"aria-labelledby":v(l),"data-motion":d.value,"data-state":v(as)(v(a).modelValue.value===v(h).value),"data-orientation":v(a).orientation},i,{onKeydown:S,onEscapeKeyDown:_,onPointerDownOutside:p,onFocusOutside:c,onDismiss:w}),{default:T(()=>[Y(y.$slots,"default")]),_:3},16,["id","aria-labelledby","data-motion","data-state","data-orientation"]))}}),Rl=Ml,Tl=ze({inheritAttrs:!1,__name:"NavigationMenuContent",props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside"],setup(e,{emit:t}){const i=e,s=t,r=gi(ga(i,"forceMount"),s),{forwardRef:n}=gt(),o=Wt(),a=Dr(),h=te(()=>a.value===o.modelValue.value),l=te(()=>o.viewport.value&&!o.modelValue.value&&o.previousValue.value?o.previousValue.value===a.value:!1);return(f,u)=>(k(),z(Gn,{to:v($r)&&v(o).viewport.value?v(o).viewport.value:"body",disabled:v($r)&&v(o).viewport.value?!v(o).viewport.value:!0},[O(v(Cr),{present:f.forceMount||h.value||l.value,"force-mount":!v(o).unmountOnHide.value},{default:T(({present:d})=>[O(Rl,G({ref:v(n),"data-state":v(as)(h.value),style:{pointerEvents:!h.value&&v(o).isRootMenu?"none":void 0}},{...f.$attrs,...v(r)},{hidden:!d,onPointerenter:u[0]||(u[0]=c=>v(o).onContentEnter(v(a).value)),onPointerleave:u[1]||(u[1]=c=>v(ao)(()=>v(o).onContentLeave())(c)),onPointerDownOutside:u[2]||(u[2]=c=>s("pointerDownOutside",c)),onFocusOutside:u[3]||(u[3]=c=>s("focusOutside",c)),onInteractOutside:u[4]||(u[4]=c=>s("interactOutside",c))}),{default:T(()=>[Y(f.$slots,"default")]),_:2},1040,["data-state","style","hidden"])]),_:3},8,["present","force-mount"])],8,["to","disabled"]))}}),Al=Tl,Pl=ze({inheritAttrs:!1,__name:"NavigationMenuIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:i}=gt(),s=Wt(),r=J(),n=te(()=>s.orientation==="horizontal"),o=te(()=>!!s.modelValue.value),{activeTrigger:a}=s;function h(){a.value&&(r.value={size:n.value?a.value.offsetWidth:a.value.offsetHeight,position:n.value?a.value.offsetLeft:a.value.offsetTop})}return wr(()=>{s.modelValue.value&&h()}),ji(a,h),ji(s.indicatorTrack,h),(l,f)=>v(s).indicatorTrack.value?(k(),z(Gn,{key:0,to:v(s).indicatorTrack.value},[O(v(Cr),{present:l.forceMount||o.value},{default:T(()=>[O(v(ht),G({ref:v(i),"aria-hidden":"true","data-state":o.value?"visible":"hidden","data-orientation":v(s).orientation,"as-child":t.asChild,as:l.as,style:{...r.value?{"--reka-navigation-menu-indicator-size":`${r.value.size}px`,"--reka-navigation-menu-indicator-position":`${r.value.position}px`}:{}}},l.$attrs),{default:T(()=>[Y(l.$slots,"default")]),_:3},16,["data-state","data-orientation","as-child","as","style"])]),_:3},8,["present"])],8,["to"])):$("v-if",!0)}}),Il=Pl,Ol=ze({__name:"NavigationMenuLink",props:{active:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"a"}},emits:["select"],setup(e,{emit:t}){const i=e,s=t,{CollectionItem:r}=wi({key:"NavigationMenu"});gt();async function n(o){const a=new CustomEvent(xl,{bubbles:!0,cancelable:!0,detail:{originalEvent:o}});if(s("select",a),!a.defaultPrevented&&!o.metaKey){const h=new CustomEvent(Fi,{bubbles:!0,cancelable:!0});o.target?.dispatchEvent(h)}}return(o,a)=>(k(),z(v(r),null,{default:T(()=>[O(v(ht),{as:o.as,"data-active":o.active?"":void 0,"aria-current":o.active?"page":void 0,"as-child":i.asChild,onClick:n},{default:T(()=>[Y(o.$slots,"default")]),_:3},8,["as","data-active","aria-current","as-child"])]),_:3}))}}),ps=Ol,Nl=ze({inheritAttrs:!1,__name:"NavigationMenuList",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"ul"}},setup(e){const t=e,i=Wt(),{forwardRef:s,currentElement:r}=gt();return Ci(()=>{i.onIndicatorTrackChange(r.value)}),(n,o)=>(k(),z(v(ht),{ref:v(s),style:{position:"relative"}},{default:T(()=>[O(v(ht),G(n.$attrs,{"as-child":t.asChild,as:n.as,"data-orientation":v(i).orientation}),{default:T(()=>[Y(n.$slots,"default")]),_:3},16,["as-child","as","data-orientation"])]),_:3},512))}}),zl=Nl;const Fl=["aria-owns"];var Hl=ze({inheritAttrs:!1,__name:"NavigationMenuTrigger",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,i=Wt(),s=Dr(),{CollectionItem:r}=wi({key:"NavigationMenu"}),{forwardRef:n,currentElement:o}=gt(),a=J(""),h=J(""),l=jn(!1,300),f=J(!1),u=te(()=>s.value===i.modelValue.value);Ci(()=>{s.triggerRef=o,a.value=no(i.baseId,s.value),h.value=Br(i.baseId,s.value)});function d(){i.disableHoverTrigger.value||(f.value=!1,s.wasEscapeCloseRef.value=!1)}function c(x){if(!i.disableHoverTrigger.value&&x.pointerType==="mouse"){if(t.disabled||f.value||s.wasEscapeCloseRef.value||l.value)return;i.onTriggerEnter(s.value),l.value=!0}}function p(x){if(!i.disableHoverTrigger.value&&x.pointerType==="mouse"){if(t.disabled)return;i.onTriggerLeave(),l.value=!1}}function _(x){(!("pointerType"in x)||x.pointerType==="mouse")&&i.disableClickTrigger.value||l.value||(u.value?i.onItemSelect(""):i.onItemSelect(s.value),f.value=u.value)}function S(x){const L={horizontal:"ArrowDown",vertical:i.dir.value==="rtl"?"ArrowLeft":"ArrowRight"}[i.orientation];u.value&&x.key===L&&(s.onEntryKeyDown(),x.preventDefault(),x.stopPropagation())}function w(x){s.focusProxyRef.value=ma(x)}function y(x){const g=document.getElementById(s.contentId),L=x.relatedTarget,B=L===o.value,E=g?.contains(L);(B||!E)&&s.onFocusProxyEnter(B?"start":"end")}return(x,g)=>(k(),j(ke,null,[O(v(r),null,{default:T(()=>[O(v(ht),G({id:a.value,ref:v(n),disabled:x.disabled,"data-disabled":x.disabled?"":void 0,"data-state":v(as)(u.value),"data-navigation-menu-trigger":"","aria-expanded":u.value,"aria-controls":h.value,"as-child":t.asChild,as:x.as},x.$attrs,{onPointerenter:d,onPointermove:c,onPointerleave:p,onClick:_,onKeydown:S}),{default:T(()=>[Y(x.$slots,"default")]),_:3},16,["id","disabled","data-disabled","data-state","aria-expanded","aria-controls","as-child","as"])]),_:3}),u.value?(k(),j(ke,{key:0},[O(v(va),{ref:w,"aria-hidden":"true",tabindex:0,onFocus:y}),v(i).viewport?(k(),j("span",{key:0,"aria-owns":h.value},null,8,Fl)):$("v-if",!0)],64)):$("v-if",!0)],64))}}),$l=Hl,Wl=ze({inheritAttrs:!1,__name:"NavigationMenuViewport",props:{forceMount:{type:Boolean,required:!1},align:{type:String,required:!1,default:"center"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:i,currentElement:s}=gt(),r=Wt(),{activeTrigger:n,rootNavigationMenu:o,modelValue:a}=r,h=J(),l=J(),f=te(()=>!!r.modelValue.value);Ce(s,()=>{r.onViewportChange(s.value)});const u=J();Ce([a,f],()=>{kt(()=>{s.value&&requestAnimationFrame(()=>{const c=s.value?.querySelector("[data-state=open]");u.value=c})})},{immediate:!0});function d(){if(u.value&&n.value&&o.value){const c=document.documentElement.offsetWidth,p=document.documentElement.offsetHeight,_=o.value.getBoundingClientRect(),S=n.value.getBoundingClientRect(),{offsetWidth:w,offsetHeight:y}=u.value,x=S.left-_.left,g=S.top-_.top;let L=null,B=null;switch(t.align){case"start":L=x,B=g;break;case"end":L=x-w+S.width,B=g-y+S.height;break;default:L=x-w/2+S.width/2,B=g-y/2+S.height/2}const E=10;L+_.left<E&&(L=E-_.left);const W=L+_.left+w;W>c-E&&(L-=W-c+E,L<E-_.left&&(L=E-_.left)),B+_.top<E&&(B=E-_.top);const U=B+_.top+y;U>p-E&&(B-=U-p+E,B<E-_.top&&(B=E-_.top)),L=Math.round(L),B=Math.round(B),l.value={left:L,top:B}}}return ji(u,()=>{u.value&&(h.value={width:u.value.offsetWidth,height:u.value.offsetHeight},d())}),ji([globalThis.document?.body,o],()=>{d()}),(c,p)=>(k(),z(v(Cr),{present:c.forceMount||f.value,"force-mount":!v(r).unmountOnHide.value,onAfterLeave:p[2]||(p[2]=()=>{h.value=void 0,l.value=void 0})},{default:T(({present:_})=>[O(v(ht),G(c.$attrs,{ref:v(i),as:c.as,"as-child":c.asChild,"data-state":v(as)(f.value),"data-orientation":v(r).orientation,style:{pointerEvents:!f.value&&v(r).isRootMenu?"none":void 0,"--reka-navigation-menu-viewport-width":h.value?`${h.value?.width}px`:void 0,"--reka-navigation-menu-viewport-height":h.value?`${h.value?.height}px`:void 0,"--reka-navigation-menu-viewport-left":l.value?`${l.value?.left}px`:void 0,"--reka-navigation-menu-viewport-top":l.value?`${l.value?.top}px`:void 0},hidden:!_,onPointerenter:p[0]||(p[0]=S=>v(r).onContentEnter(v(r).modelValue.value)),onPointerleave:p[1]||(p[1]=S=>v(ao)(()=>v(r).onContentLeave())(S))}),{default:T(()=>[Y(c.$slots,"default")]),_:2},1040,["as","as-child","data-state","data-orientation","style","hidden"])]),_:3},8,["present","force-mount"]))}}),ql=Wl;function Ts(e,t){const s=Xn().hook(e,t);Sa(s)}const Kl={slots:{base:"",label:"",trailing:"hidden lg:flex items-center gap-0.5 ms-auto"},variants:{collapsed:{true:{label:"hidden",trailing:"lg:hidden"}}}},Ul=Object.assign({inheritAttrs:!1},{__name:"UDashboardSearchButton",props:{icon:{type:null,required:!1},label:{type:String,required:!1},color:{type:null,required:!1,default:"neutral"},variant:{type:null,required:!1},collapsed:{type:Boolean,required:!1,default:!1},tooltip:{type:[Boolean,Object],required:!1,default:!1},kbds:{type:Array,required:!1,default:()=>["meta","k"]},ui:{type:void 0,required:!1},class:{type:null,required:!1},activeColor:{type:null,required:!1},activeVariant:{type:null,required:!1},size:{type:null,required:!1},square:{type:Boolean,required:!1},block:{type:Boolean,required:!1},loadingAuto:{type:Boolean,required:!1},onClick:{type:[Function,Array],required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1},as:{type:null,required:!1},type:{type:null,required:!1},disabled:{type:Boolean,required:!1},exactActiveClass:{type:String,required:!1},viewTransition:{type:Boolean,required:!1}},setup(e){const t=e,i=ei(),[s,r]=Zt(),n=()=>Gi(i,["trailing"]),o=Yi(ba(t,"icon","label","variant","collapsed","tooltip","kbds","class","ui")),a=ot(()=>Mt(typeof t.tooltip=="boolean"?{}:t.tooltip,{delayDuration:0,content:{side:"right"}})),{t:h}=ns(),l=$t(),{toggleSearch:f}=to({toggleSearch:()=>{}}),u=te(()=>Ne({extend:Ne(Kl),...l.ui?.dashboardSearchButton||{}})({collapsed:t.collapsed}));return(d,c)=>(k(),j(ke,null,[O(v(s),null,{default:T(()=>[O(Jt,G({icon:e.icon||v(l).ui.icons.search,label:e.label||v(h)("dashboardSearchButton.label"),variant:e.variant||(e.collapsed?"ghost":"outline")},{...v(o),...e.collapsed?{square:!0,"aria-label":e.label||v(h)("dashboardSearchButton.label")}:{},...d.$attrs},{class:u.value.base({class:[t.ui?.base,t.class]}),ui:v(Jn)(u.value,t.ui),onClick:v(f)}),os({trailing:T(({ui:p})=>[ie("div",{"data-slot":"trailing",class:H(u.value.trailing({class:t.ui?.trailing}))},[Y(d.$slots,"trailing",{ui:p},()=>[e.kbds?.length?(k(!0),j(ke,{key:0},Ge(e.kbds,(_,S)=>(k(),z(xr,G({key:S,variant:"subtle"},{ref_for:!0},typeof _=="string"?{value:_}:_),null,16))),128)):$("",!0)])],2)]),_:2},[Ge(n(),(p,_)=>({name:_,fn:T(S=>[Y(d.$slots,_,Et(Lt(S)))])}))]),1040,["icon","label","variant","class","ui","onClick"])]),_:3}),e.collapsed&&e.tooltip?(k(),z(io,G({key:0,text:e.label||v(h)("dashboardSearchButton.label")},a.value),{default:T(()=>[O(v(r))]),_:1},16,["text"])):(k(),z(v(r),{key:1}))],64))}}),Vl={slots:{content:"bg-default shadow-lg rounded-md ring ring-default data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-popover-content-transform-origin) focus:outline-none pointer-events-auto",arrow:"fill-default"}},jl={__name:"UPopover",props:{mode:{type:null,required:!1,default:"click"},content:{type:Object,required:!1},arrow:{type:[Boolean,Object],required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},reference:{type:null,required:!1},dismissible:{type:Boolean,required:!1,default:!0},class:{type:null,required:!1},ui:{type:null,required:!1},defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1},modal:{type:Boolean,required:!1},openDelay:{type:Number,required:!1,default:0},closeDelay:{type:Number,required:!1,default:0}},emits:["close:prevent","update:open"],setup(e,{emit:t}){const i=e,s=t,r=ei(),n=$t(),o=i.mode==="hover"?zt(i,"defaultOpen","open","openDelay","closeDelay"):zt(i,"defaultOpen","open","modal"),a=gi(o,s),h=ya(ot(()=>i.portal)),l=ot(()=>Mt(i.content,{side:"bottom",sideOffset:8,collisionPadding:8})),f=te(()=>i.dismissible?{}:["pointerDownOutside","interactOutside","escapeKeyDown"].reduce((_,S)=>(_[S]=w=>{w.preventDefault(),s("close:prevent")},_),{})),u=ot(()=>i.arrow),d=te(()=>Ne({extend:Ne(Vl),...n.ui?.popover||{}})({side:l.value.side})),c=te(()=>i.mode==="hover"?Ga:Xa);return(p,_)=>(k(),z(v(c).Root,Et(Lt(v(a))),{default:T(({open:S,close:w})=>[r.default||e.reference?(k(),z(v(c).Trigger,{key:0,"as-child":"",reference:e.reference,class:H(i.class)},{default:T(()=>[Y(p.$slots,"default",{open:S})]),_:2},1032,["reference","class"])):$("",!0),"Anchor"in c.value&&r.anchor?(k(),z(v(c).Anchor,{key:1,"as-child":""},{default:T(()=>[Y(p.$slots,"anchor",Et(Lt(w?{close:w}:{})))]),_:2},1024)):$("",!0),O(v(c).Portal,Et(Lt(v(h))),{default:T(()=>[O(v(c).Content,G(l.value,{"data-slot":"content",class:d.value.content({class:[!r.default&&i.class,i.ui?.content]})},wa(f.value)),{default:T(()=>[Y(p.$slots,"content",Et(Lt(w?{close:w}:{}))),e.arrow?(k(),z(v(c).Arrow,G({key:0},u.value,{"data-slot":"arrow",class:d.value.arrow({class:i.ui?.arrow})}),null,16,["class"])):$("",!0)]),_:2},1040,["class"])]),_:2},1040)]),_:3},16))}},Yl={slots:{root:"relative flex gap-1.5 [&>div]:min-w-0",list:"isolate min-w-0",label:"w-full flex items-center gap-1.5 font-semibold text-xs/5 text-highlighted px-2.5 py-1.5",item:"min-w-0",link:"group relative w-full flex items-center gap-1.5 font-medium text-sm before:absolute before:z-[-1] before:rounded-md focus:outline-none focus-visible:outline-none dark:focus-visible:outline-none focus-visible:before:ring-inset focus-visible:before:ring-2",linkLeadingIcon:"shrink-0 size-5",linkLeadingAvatar:"shrink-0",linkLeadingAvatarSize:"2xs",linkTrailing:"group ms-auto inline-flex gap-1.5 items-center",linkTrailingBadge:"shrink-0",linkTrailingBadgeSize:"sm",linkTrailingIcon:"size-5 transform shrink-0 group-data-[state=open]:rotate-180 transition-transform duration-200",linkLabel:"truncate",linkLabelExternalIcon:"inline-block size-3 align-top text-dimmed",childList:"isolate",childLabel:"text-xs text-highlighted",childItem:"",childLink:"group relative size-full flex items-start text-start text-sm before:absolute before:z-[-1] before:rounded-md focus:outline-none focus-visible:outline-none dark:focus-visible:outline-none focus-visible:before:ring-inset focus-visible:before:ring-2",childLinkWrapper:"min-w-0",childLinkIcon:"size-5 shrink-0",childLinkLabel:"truncate",childLinkLabelExternalIcon:"inline-block size-3 align-top text-dimmed",childLinkDescription:"text-muted",separator:"px-2 h-px bg-border",viewportWrapper:"absolute top-full left-0 flex w-full",viewport:"relative overflow-hidden bg-default shadow-lg rounded-md ring ring-default h-(--reka-navigation-menu-viewport-height) w-full transition-[width,height,left] duration-200 origin-[top_center] data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] z-[1]",content:"",indicator:"absolute data-[state=visible]:animate-[fade-in_100ms_ease-out] data-[state=hidden]:animate-[fade-out_100ms_ease-in] data-[state=hidden]:opacity-0 bottom-0 z-[2] w-(--reka-navigation-menu-indicator-size) translate-x-(--reka-navigation-menu-indicator-position) flex h-2.5 items-end justify-center overflow-hidden transition-[translate,width] duration-200",arrow:"relative top-[50%] size-2.5 rotate-45 border border-default bg-default z-[1] rounded-xs"},variants:{color:{primary:{link:"focus-visible:before:ring-primary",childLink:"focus-visible:before:ring-primary"},secondary:{link:"focus-visible:before:ring-secondary",childLink:"focus-visible:before:ring-secondary"},success:{link:"focus-visible:before:ring-success",childLink:"focus-visible:before:ring-success"},info:{link:"focus-visible:before:ring-info",childLink:"focus-visible:before:ring-info"},warning:{link:"focus-visible:before:ring-warning",childLink:"focus-visible:before:ring-warning"},error:{link:"focus-visible:before:ring-error",childLink:"focus-visible:before:ring-error"},neutral:{link:"focus-visible:before:ring-inverted",childLink:"focus-visible:before:ring-inverted"}},highlightColor:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},variant:{pill:"",link:""},orientation:{horizontal:{root:"items-center justify-between",list:"flex items-center",item:"py-2",link:"px-2.5 py-1.5 before:inset-x-px before:inset-y-0",childList:"grid p-2",childLink:"px-3 py-2 gap-2 before:inset-x-px before:inset-y-0",childLinkLabel:"font-medium",content:"absolute top-0 left-0 w-full max-h-[70vh] overflow-y-auto"},vertical:{root:"flex-col",link:"flex-row px-2.5 py-1.5 before:inset-y-px before:inset-x-0",childLabel:"px-1.5 py-0.5",childLink:"p-1.5 gap-1.5 before:inset-y-px before:inset-x-0"}},contentOrientation:{horizontal:{viewportWrapper:"justify-center",content:"data-[motion=from-start]:animate-[enter-from-left_200ms_ease] data-[motion=from-end]:animate-[enter-from-right_200ms_ease] data-[motion=to-start]:animate-[exit-to-left_200ms_ease] data-[motion=to-end]:animate-[exit-to-right_200ms_ease]"},vertical:{viewport:"sm:w-(--reka-navigation-menu-viewport-width) left-(--reka-navigation-menu-viewport-left)"}},active:{true:{childLink:"before:bg-elevated text-highlighted",childLinkIcon:"text-default"},false:{link:"text-muted",linkLeadingIcon:"text-dimmed",childLink:["hover:before:bg-elevated/50 text-default hover:text-highlighted","transition-colors before:transition-colors"],childLinkIcon:["text-dimmed group-hover:text-default","transition-colors"]}},disabled:{true:{link:"cursor-not-allowed opacity-75"}},highlight:{true:""},level:{true:""},collapsed:{true:""}},compoundVariants:[{orientation:"horizontal",contentOrientation:"horizontal",class:{childList:"grid-cols-2 gap-2"}},{orientation:"horizontal",contentOrientation:"vertical",class:{childList:"gap-1",content:"w-60"}},{orientation:"vertical",collapsed:!1,class:{childList:"ms-5 border-s border-default",childItem:"ps-1.5 -ms-px",content:"data-[state=open]:animate-[collapsible-down_200ms_ease-out] data-[state=closed]:animate-[collapsible-up_200ms_ease-out] overflow-hidden"}},{orientation:"vertical",collapsed:!0,class:{link:"px-1.5",linkLabel:"hidden",linkTrailing:"hidden",content:"shadow-sm rounded-sm min-h-6 p-1"}},{orientation:"horizontal",highlight:!0,class:{link:["after:absolute after:-bottom-2 after:inset-x-2.5 after:block after:h-px after:rounded-full","after:transition-colors"]}},{orientation:"vertical",highlight:!0,level:!0,class:{link:["after:absolute after:-start-1.5 after:inset-y-0.5 after:block after:w-px after:rounded-full","after:transition-colors"]}},{disabled:!1,active:!1,variant:"pill",class:{link:["hover:text-highlighted hover:before:bg-elevated/50","transition-colors before:transition-colors"],linkLeadingIcon:["group-hover:text-default","transition-colors"]}},{disabled:!1,active:!1,variant:"pill",orientation:"horizontal",class:{link:"data-[state=open]:text-highlighted",linkLeadingIcon:"group-data-[state=open]:text-default"}},{disabled:!1,variant:"pill",highlight:!0,orientation:"horizontal",class:{link:"data-[state=open]:before:bg-elevated/50"}},{disabled:!1,variant:"pill",highlight:!1,active:!1,orientation:"horizontal",class:{link:"data-[state=open]:before:bg-elevated/50"}},{color:"primary",variant:"pill",active:!0,class:{link:"text-primary",linkLeadingIcon:"text-primary group-data-[state=open]:text-primary"}},{color:"secondary",variant:"pill",active:!0,class:{link:"text-secondary",linkLeadingIcon:"text-secondary group-data-[state=open]:text-secondary"}},{color:"success",variant:"pill",active:!0,class:{link:"text-success",linkLeadingIcon:"text-success group-data-[state=open]:text-success"}},{color:"info",variant:"pill",active:!0,class:{link:"text-info",linkLeadingIcon:"text-info group-data-[state=open]:text-info"}},{color:"warning",variant:"pill",active:!0,class:{link:"text-warning",linkLeadingIcon:"text-warning group-data-[state=open]:text-warning"}},{color:"error",variant:"pill",active:!0,class:{link:"text-error",linkLeadingIcon:"text-error group-data-[state=open]:text-error"}},{color:"neutral",variant:"pill",active:!0,class:{link:"text-highlighted",linkLeadingIcon:"text-highlighted group-data-[state=open]:text-highlighted"}},{variant:"pill",active:!0,highlight:!1,class:{link:"before:bg-elevated"}},{variant:"pill",active:!0,highlight:!0,disabled:!1,class:{link:["hover:before:bg-elevated/50","before:transition-colors"]}},{disabled:!1,active:!1,variant:"link",class:{link:["hover:text-highlighted","transition-colors"],linkLeadingIcon:["group-hover:text-default","transition-colors"]}},{disabled:!1,active:!1,variant:"link",orientation:"horizontal",class:{link:"data-[state=open]:text-highlighted",linkLeadingIcon:"group-data-[state=open]:text-default"}},{color:"primary",variant:"link",active:!0,class:{link:"text-primary",linkLeadingIcon:"text-primary group-data-[state=open]:text-primary"}},{color:"secondary",variant:"link",active:!0,class:{link:"text-secondary",linkLeadingIcon:"text-secondary group-data-[state=open]:text-secondary"}},{color:"success",variant:"link",active:!0,class:{link:"text-success",linkLeadingIcon:"text-success group-data-[state=open]:text-success"}},{color:"info",variant:"link",active:!0,class:{link:"text-info",linkLeadingIcon:"text-info group-data-[state=open]:text-info"}},{color:"warning",variant:"link",active:!0,class:{link:"text-warning",linkLeadingIcon:"text-warning group-data-[state=open]:text-warning"}},{color:"error",variant:"link",active:!0,class:{link:"text-error",linkLeadingIcon:"text-error group-data-[state=open]:text-error"}},{color:"neutral",variant:"link",active:!0,class:{link:"text-highlighted",linkLeadingIcon:"text-highlighted group-data-[state=open]:text-highlighted"}},{highlightColor:"primary",highlight:!0,level:!0,active:!0,class:{link:"after:bg-primary"}},{highlightColor:"secondary",highlight:!0,level:!0,active:!0,class:{link:"after:bg-secondary"}},{highlightColor:"success",highlight:!0,level:!0,active:!0,class:{link:"after:bg-success"}},{highlightColor:"info",highlight:!0,level:!0,active:!0,class:{link:"after:bg-info"}},{highlightColor:"warning",highlight:!0,level:!0,active:!0,class:{link:"after:bg-warning"}},{highlightColor:"error",highlight:!0,level:!0,active:!0,class:{link:"after:bg-error"}},{highlightColor:"neutral",highlight:!0,level:!0,active:!0,class:{link:"after:bg-inverted"}}],defaultVariants:{color:"primary",highlightColor:"primary",variant:"pill"}},Gl=Object.assign({inheritAttrs:!1},{__name:"UNavigationMenu",props:{as:{type:null,required:!1},type:{type:null,required:!1,default:"multiple"},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},trailingIcon:{type:null,required:!1},externalIcon:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},items:{type:null,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},orientation:{type:null,required:!1,default:"horizontal"},collapsed:{type:Boolean,required:!1},tooltip:{type:[Boolean,Object],required:!1},popover:{type:[Boolean,Object],required:!1},highlight:{type:Boolean,required:!1},highlightColor:{type:null,required:!1},content:{type:Object,required:!1},contentOrientation:{type:null,required:!1,default:"horizontal"},arrow:{type:Boolean,required:!1},labelKey:{type:null,required:!1,default:"label"},class:{type:null,required:!1},ui:{type:null,required:!1},delayDuration:{type:Number,required:!1,default:0},disableClickTrigger:{type:Boolean,required:!1},disableHoverTrigger:{type:Boolean,required:!1},skipDelayDuration:{type:Number,required:!1},disablePointerLeaveClose:{type:Boolean,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},disabled:{type:Boolean,required:!1},collapsible:{type:Boolean,required:!1,default:!0}},emits:["update:modelValue"],setup(e,{emit:t}){const i=e,s=t,r=ei(),n=$t(),o=gi(te(()=>({as:i.as,delayDuration:i.delayDuration,skipDelayDuration:i.skipDelayDuration,orientation:i.orientation,disableClickTrigger:i.disableClickTrigger,disableHoverTrigger:i.disableHoverTrigger,disablePointerLeaveClose:i.disablePointerLeaveClose,unmountOnHide:i.unmountOnHide})),s),a=gi(zt(i,"collapsible","disabled","type","unmountOnHide"),s),h=ot(()=>i.content),l=ot(()=>Mt(typeof i.tooltip=="boolean"?{}:i.tooltip,{delayDuration:0,content:{side:"right"}})),f=ot(()=>Mt(typeof i.popover=="boolean"?{}:i.popover,{mode:"hover",content:{side:"right",align:"start",alignOffset:2}})),[u,d]=Zt(),[c,p]=Zt({props:{item:Object,index:Number,level:Number}}),_=te(()=>Ne({extend:Ne(Yl),...n.ui?.navigationMenu||{}})({orientation:i.orientation,contentOrientation:i.orientation==="vertical"?void 0:i.contentOrientation,collapsed:i.collapsed,color:i.color,variant:i.variant,highlight:i.highlight,highlightColor:i.highlightColor||i.color})),S=te(()=>i.items?.length?Ca(i.items)?i.items:[i.items]:[]);function w(y,x=0){const g=y.reduce((L,B,E)=>((B.defaultOpen||B.open)&&L.push(B.value||(x>0?`item-${x}-${E}`:`item-${E}`)),L),[]);return i.type==="single"?g[0]:g}return(y,x)=>(k(),j(ke,null,[O(v(u),null,{default:T(({item:g,active:L,index:B})=>[Y(y.$slots,g.slot||"item",{item:g,index:B,active:L,ui:_.value},()=>[Y(y.$slots,g.slot?`${g.slot}-leading`:"item-leading",{item:g,active:L,index:B,ui:_.value},()=>[g.avatar?(k(),z(kr,G({key:0,size:g.ui?.linkLeadingAvatarSize||i.ui?.linkLeadingAvatarSize||_.value.linkLeadingAvatarSize()},g.avatar,{"data-slot":"linkLeadingAvatar",class:_.value.linkLeadingAvatar({class:[i.ui?.linkLeadingAvatar,g.ui?.linkLeadingAvatar],active:L,disabled:!!g.disabled})}),null,16,["size","class"])):g.icon?(k(),z(De,{key:1,name:g.icon,"data-slot":"linkLeadingIcon",class:H(_.value.linkLeadingIcon({class:[i.ui?.linkLeadingIcon,g.ui?.linkLeadingIcon],active:L,disabled:!!g.disabled}))},null,8,["name","class"])):$("",!0)]),v(Oe)(g,i.labelKey)||r[g.slot?`${g.slot}-label`:"item-label"]?(k(),j("span",{key:0,"data-slot":"linkLabel",class:H(_.value.linkLabel({class:[i.ui?.linkLabel,g.ui?.linkLabel]}))},[Y(y.$slots,g.slot?`${g.slot}-label`:"item-label",{item:g,active:L,index:B},()=>[at(Me(v(Oe)(g,i.labelKey)),1)]),g.target==="_blank"&&e.externalIcon!==!1?(k(),z(De,{key:0,name:typeof e.externalIcon=="string"?e.externalIcon:v(n).ui.icons.external,"data-slot":"linkLabelExternalIcon",class:H(_.value.linkLabelExternalIcon({class:[i.ui?.linkLabelExternalIcon,g.ui?.linkLabelExternalIcon],active:L}))},null,8,["name","class"])):$("",!0)],2)):$("",!0),g.badge||g.badge===0||e.orientation==="horizontal"&&(g.children?.length||r[g.slot?`${g.slot}-content`:"item-content"])||e.orientation==="vertical"&&g.children?.length||g.trailingIcon||r[g.slot?`${g.slot}-trailing`:"item-trailing"]?(k(),z(Di(e.orientation==="vertical"&&g.children?.length&&!e.collapsed?v(Wr):"span"),{key:1,as:"span","data-slot":"linkTrailing",class:H(_.value.linkTrailing({class:[i.ui?.linkTrailing,g.ui?.linkTrailing]})),onClick:x[0]||(x[0]=ka(()=>{},["stop","prevent"]))},{default:T(()=>[Y(y.$slots,g.slot?`${g.slot}-trailing`:"item-trailing",{item:g,active:L,index:B,ui:_.value},()=>[g.badge||g.badge===0?(k(),z(Ya,G({key:0,color:"neutral",variant:"outline",size:g.ui?.linkTrailingBadgeSize||i.ui?.linkTrailingBadgeSize||_.value.linkTrailingBadgeSize()},typeof g.badge=="string"||typeof g.badge=="number"?{label:g.badge}:g.badge,{"data-slot":"linkTrailingBadge",class:_.value.linkTrailingBadge({class:[i.ui?.linkTrailingBadge,g.ui?.linkTrailingBadge]})}),null,16,["size","class"])):$("",!0),e.orientation==="horizontal"&&(g.children?.length||r[g.slot?`${g.slot}-content`:"item-content"])||e.orientation==="vertical"&&g.children?.length?(k(),z(De,{key:1,name:g.trailingIcon||e.trailingIcon||v(n).ui.icons.chevronDown,"data-slot":"linkTrailingIcon",class:H(_.value.linkTrailingIcon({class:[i.ui?.linkTrailingIcon,g.ui?.linkTrailingIcon],active:L}))},null,8,["name","class"])):g.trailingIcon?(k(),z(De,{key:2,name:g.trailingIcon,"data-slot":"linkTrailingIcon",class:H(_.value.linkTrailingIcon({class:[i.ui?.linkTrailingIcon,g.ui?.linkTrailingIcon],active:L}))},null,8,["name","class"])):$("",!0)])]),_:2},1032,["class"])):$("",!0)])]),_:3}),O(v(c),null,{default:T(({item:g,index:L,level:B=0})=>[(k(),z(Di(e.orientation==="vertical"&&!e.collapsed?v(Ua):v(Dl)),{as:"li",value:g.value||(B>0?`item-${B}-${L}`:`item-${L}`)},{default:T(()=>[e.orientation==="vertical"&&g.type==="label"&&!e.collapsed?(k(),j("div",{key:0,"data-slot":"label",class:H(_.value.label({class:[i.ui?.label,g.ui?.label,g.class]}))},[O(v(d),{item:g,index:L},null,8,["item","index"])],2)):g.type!=="label"?(k(),z(Ni,G({key:1},e.orientation==="vertical"&&g.children?.length&&!e.collapsed&&g.type==="trigger"?{}:v(zi)(g),{custom:""}),{default:T(({active:E,...W})=>[(k(),z(Di(e.orientation==="horizontal"&&(g.children?.length||r[g.slot?`${g.slot}-content`:"item-content"])?v($l):e.orientation==="vertical"&&g.children?.length&&!e.collapsed&&!W.href?v(Wr):v(ps)),{"as-child":"",active:E||g.active,disabled:g.disabled,onSelect:g.onSelect},{default:T(()=>[e.orientation==="vertical"&&e.collapsed&&g.children?.length&&(i.popover||g.popover)?(k(),z(jl,G({key:0},{...f.value,...typeof g.popover=="boolean"?{}:g.popover||{}},{ui:{content:_.value.content({class:[i.ui?.content,g.ui?.content]})}}),{content:T(({close:U})=>[Y(y.$slots,g.slot?`${g.slot}-content`:"item-content",{item:g,active:E||g.active,index:L,ui:_.value,close:U},()=>[ie("ul",{"data-slot":"childList",class:H(_.value.childList({class:[i.ui?.childList,g.ui?.childList]}))},[ie("li",{"data-slot":"childLabel",class:H(_.value.childLabel({class:[i.ui?.childLabel,g.ui?.childLabel]}))},Me(v(Oe)(g,i.labelKey)),3),(k(!0),j(ke,null,Ge(g.children,(Z,V)=>(k(),j("li",{key:V,"data-slot":"childItem",class:H(_.value.childItem({class:[i.ui?.childItem,g.ui?.childItem]}))},[O(Ni,G({ref_for:!0},v(zi)(Z),{custom:""}),{default:T(({active:A,...b})=>[O(v(ps),{"as-child":"",active:A,onSelect:Z.onSelect},{default:T(()=>[O(Yt,G({ref_for:!0},b,{"data-slot":"childLink",class:_.value.childLink({class:[i.ui?.childLink,g.ui?.childLink,Z.class],active:A})}),{default:T(()=>[Z.icon?(k(),z(De,{key:0,name:Z.icon,"data-slot":"childLinkIcon",class:H(_.value.childLinkIcon({class:[i.ui?.childLinkIcon,g.ui?.childLinkIcon],active:A}))},null,8,["name","class"])):$("",!0),ie("span",{"data-slot":"childLinkLabel",class:H(_.value.childLinkLabel({class:[i.ui?.childLinkLabel,g.ui?.childLinkLabel],active:A}))},[at(Me(v(Oe)(Z,i.labelKey))+" ",1),Z.target==="_blank"&&e.externalIcon!==!1?(k(),z(De,{key:0,name:typeof e.externalIcon=="string"?e.externalIcon:v(n).ui.icons.external,"data-slot":"childLinkLabelExternalIcon",class:H(_.value.childLinkLabelExternalIcon({class:[i.ui?.childLinkLabelExternalIcon,g.ui?.childLinkLabelExternalIcon],active:A}))},null,8,["name","class"])):$("",!0)],2)]),_:2},1040,["class"])]),_:2},1032,["active","onSelect"])]),_:2},1040)],2))),128))],2)])]),default:T(()=>[O(Yt,G(W,{"data-slot":"link",class:_.value.link({class:[i.ui?.link,g.ui?.link,g.class],active:E||g.active,disabled:!!g.disabled,level:B>0})}),{default:T(()=>[O(v(d),{item:g,active:E||g.active,index:L},null,8,["item","active","index"])]),_:2},1040,["class"])]),_:2},1040,["ui"])):e.orientation==="vertical"&&e.collapsed&&(i.tooltip||g.tooltip)?(k(),z(io,G({key:1,text:v(Oe)(g,i.labelKey)},{...l.value,...typeof g.tooltip=="boolean"?{}:g.tooltip||{}}),{default:T(()=>[O(Yt,G(W,{"data-slot":"link",class:_.value.link({class:[i.ui?.link,g.ui?.link,g.class],active:E||g.active,disabled:!!g.disabled,level:B>0})}),{default:T(()=>[O(v(d),{item:g,active:E||g.active,index:L},null,8,["item","active","index"])]),_:2},1040,["class"])]),_:2},1040,["text"])):(k(),z(Yt,G({key:2},W,{"data-slot":"link",class:_.value.link({class:[i.ui?.link,g.ui?.link,g.class],active:E||g.active,disabled:!!g.disabled,level:e.orientation==="horizontal"||B>0})}),{default:T(()=>[O(v(d),{item:g,active:E||g.active,index:L},null,8,["item","active","index"])]),_:2},1040,["class"]))]),_:2},1064,["active","disabled","onSelect"])),e.orientation==="horizontal"&&(g.children?.length||r[g.slot?`${g.slot}-content`:"item-content"])?(k(),z(v(Al),G({key:0},h.value,{"data-slot":"content",class:_.value.content({class:[i.ui?.content,g.ui?.content]})}),{default:T(()=>[Y(y.$slots,g.slot?`${g.slot}-content`:"item-content",{item:g,active:E||g.active,index:L,ui:_.value},()=>[ie("ul",{"data-slot":"childList",class:H(_.value.childList({class:[i.ui?.childList,g.ui?.childList]}))},[(k(!0),j(ke,null,Ge(g.children,(U,Z)=>(k(),j("li",{key:Z,"data-slot":"childItem",class:H(_.value.childItem({class:[i.ui?.childItem,g.ui?.childItem]}))},[O(Ni,G({ref_for:!0},v(zi)(U),{custom:""}),{default:T(({active:V,...A})=>[O(v(ps),{"as-child":"",active:V,onSelect:U.onSelect},{default:T(()=>[O(Yt,G({ref_for:!0},A,{"data-slot":"childLink",class:_.value.childLink({class:[i.ui?.childLink,g.ui?.childLink,U.class],active:V})}),{default:T(()=>[U.icon?(k(),z(De,{key:0,name:U.icon,"data-slot":"childLinkIcon",class:H(_.value.childLinkIcon({class:[i.ui?.childLinkIcon,g.ui?.childLinkIcon],active:V}))},null,8,["name","class"])):$("",!0),ie("div",{"data-slot":"childLinkWrapper",class:H(_.value.childLinkWrapper({class:[i.ui?.childLinkWrapper,g.ui?.childLinkWrapper]}))},[ie("p",{"data-slot":"childLinkLabel",class:H(_.value.childLinkLabel({class:[i.ui?.childLinkLabel,g.ui?.childLinkLabel],active:V}))},[at(Me(v(Oe)(U,i.labelKey))+" ",1),U.target==="_blank"&&e.externalIcon!==!1?(k(),z(De,{key:0,name:typeof e.externalIcon=="string"?e.externalIcon:v(n).ui.icons.external,"data-slot":"childLinkLabelExternalIcon",class:H(_.value.childLinkLabelExternalIcon({class:[i.ui?.childLinkLabelExternalIcon,g.ui?.childLinkLabelExternalIcon],active:V}))},null,8,["name","class"])):$("",!0)],2),U.description?(k(),j("p",{key:0,"data-slot":"childLinkDescription",class:H(_.value.childLinkDescription({class:[i.ui?.childLinkDescription,g.ui?.childLinkDescription],active:V}))},Me(U.description),3)):$("",!0)],2)]),_:2},1040,["class"])]),_:2},1032,["active","onSelect"])]),_:2},1040)],2))),128))],2)])]),_:2},1040,["class"])):$("",!0)]),_:2},1040)):$("",!0),e.orientation==="vertical"&&g.children?.length&&!e.collapsed?(k(),z(v(Va),{key:2,"data-slot":"content",class:H(_.value.content({class:[i.ui?.content,g.ui?.content]}))},{default:T(()=>[O(v(qr),G({...v(a),defaultValue:w(g.children,B+1)},{as:"ul","data-slot":"childList",class:_.value.childList({class:i.ui?.childList})}),{default:T(()=>[(k(!0),j(ke,null,Ge(g.children,(E,W)=>(k(),z(v(p),{key:W,item:E,index:W,level:B+1,"data-slot":"childItem",class:H(_.value.childItem({class:[i.ui?.childItem,E.ui?.childItem]}))},null,8,["item","index","level","class"]))),128))]),_:2},1040,["class"])]),_:2},1032,["class"])):$("",!0)]),_:2},1032,["value"]))]),_:3}),O(v(kl),G({...v(o),...e.orientation==="horizontal"?{modelValue:e.modelValue,defaultValue:e.defaultValue}:{},...y.$attrs},{"data-collapsed":e.collapsed,"data-slot":"root",class:_.value.root({class:[i.ui?.root,i.class]})}),{default:T(()=>[Y(y.$slots,"list-leading"),(k(!0),j(ke,null,Ge(S.value,(g,L)=>(k(),j(ke,{key:`list-${L}`},[(k(),z(Di(e.orientation==="vertical"?v(qr):v(zl)),G({ref_for:!0},e.orientation==="vertical"&&!e.collapsed?{...v(a),modelValue:e.modelValue,defaultValue:e.defaultValue??w(g)}:{},{as:"ul","data-slot":"list",class:_.value.list({class:i.ui?.list})}),{default:T(()=>[(k(!0),j(ke,null,Ge(g,(B,E)=>(k(),z(v(p),{key:`list-${L}-${E}`,item:B,index:E,"data-slot":"item",class:H(_.value.item({class:[i.ui?.item,B.ui?.item]}))},null,8,["item","index","class"]))),128))]),_:2},1040,["class"])),e.orientation==="vertical"&&L<S.value.length-1?(k(),j("div",{key:0,"data-slot":"separator",class:H(_.value.separator({class:i.ui?.separator}))},null,2)):$("",!0)],64))),128)),Y(y.$slots,"list-trailing"),e.orientation==="horizontal"?(k(),j("div",{key:0,"data-slot":"viewportWrapper",class:H(_.value.viewportWrapper({class:i.ui?.viewportWrapper}))},[e.arrow?(k(),z(v(Il),{key:0,"data-slot":"indicator",class:H(_.value.indicator({class:i.ui?.indicator}))},{default:T(()=>[ie("div",{"data-slot":"arrow",class:H(_.value.arrow({class:i.ui?.arrow}))},null,2)]),_:1},8,["class"])):$("",!0),O(v(ql),{"data-slot":"viewport",class:H(_.value.viewport({class:i.ui?.viewport}))},null,8,["class"])],2)):$("",!0)]),_:3},16,["data-collapsed","class"])],64))}}),Xl={slots:{root:"relative hidden lg:flex flex-col min-h-svh min-w-16 w-(--width) shrink-0",header:"h-(--ui-header-height) shrink-0 flex items-center gap-1.5 px-4",body:"flex flex-col gap-4 flex-1 overflow-y-auto px-4 py-2",footer:"shrink-0 flex items-center gap-1.5 px-4 py-2",toggle:"",handle:"",content:"lg:hidden",overlay:"lg:hidden"},variants:{menu:{true:{header:"sm:px-6",body:"sm:px-6",footer:"sm:px-6"}},side:{left:{root:"border-e border-default"},right:{root:""}},toggleSide:{left:{toggle:""},right:{toggle:"ms-auto"}}}},Jl=["data-collapsed","data-dragging"],Zl=Object.assign({inheritAttrs:!1},{__name:"UDashboardSidebar",props:Xi({mode:{type:null,required:!1,default:"slideover"},menu:{type:null,required:!1},toggle:{type:[Boolean,Object],required:!1,default:!0},toggleSide:{type:String,required:!1,default:"left"},class:{type:null,required:!1},ui:{type:null,required:!1},id:{type:String,required:!1},side:{type:String,required:!1,default:"left"},minSize:{type:Number,required:!1,default:10},maxSize:{type:Number,required:!1,default:20},defaultSize:{type:Number,required:!1,default:15},resizable:{type:Boolean,required:!1,default:!1},collapsible:{type:Boolean,required:!1,default:!1},collapsedSize:{type:Number,required:!1,default:0}},{open:{type:Boolean,default:!1},openModifiers:{},collapsed:{type:Boolean,default:!1},collapsedModifiers:{}}),emits:["update:open","update:collapsed"],setup(e){const t=e,i=ei(),s=vi(e,"open",{type:Boolean,default:!1}),r=vi(e,"collapsed",{type:Boolean,default:!1}),n=Zn(),{t:o}=ns(),a=$t(),h=to({storageKey:"dashboard",unit:"%",sidebarOpen:J(!1),sidebarCollapsed:J(!1)}),l=`${h.storageKey}-sidebar-${t.id||xa()}`,{el:f,size:u,collapse:d,isCollapsed:c,isDragging:p,onMouseDown:_,onTouchStart:S,onDoubleClick:w}=za(l,ot(()=>({...h,...t})),{collapsed:r}),[y,x]=Zt(),[g,L]=Zt();Ts("dashboard:sidebar:toggle",()=>{s.value=!s.value}),Ts("dashboard:sidebar:collapse",Z=>{c.value=Z}),Ce(s,()=>h.sidebarOpen.value=s.value,{immediate:!0}),Ce(c,()=>h.sidebarCollapsed.value=c.value,{immediate:!0}),Ce(()=>n.fullPath,()=>{s.value=!1});const B=te(()=>Ne({extend:Ne(Xl),...a.ui?.dashboardSidebar||{}})({side:t.side})),E=te(()=>({slideover:Qa,modal:Er,drawer:el})[t.mode]),W=ot(()=>Mt(t.menu,{content:{onOpenAutoFocus:Z=>Z.preventDefault()}},t.mode==="modal"?{fullscreen:!0,transition:!1}:t.mode==="slideover"?{side:"left"}:{}));function U(){s.value=!s.value}return(Z,V)=>(k(),j(ke,null,[O(v(y),null,{default:T(()=>[Y(Z.$slots,"toggle",{open:s.value,toggle:U,ui:B.value},()=>[e.toggle?(k(),z(Fa,G({key:0},typeof e.toggle=="object"?e.toggle:{},{side:e.toggleSide,"data-slot":"toggle",class:B.value.toggle({class:t.ui?.toggle,toggleSide:e.toggleSide})}),null,16,["side","class"])):$("",!0)])]),_:3}),O(v(g),null,{default:T(()=>[Y(Z.$slots,"resize-handle",{onMouseDown:v(_),onTouchStart:v(S),onDoubleClick:v(w),ui:B.value},()=>[e.resizable?(k(),z(Ha,{key:0,"aria-controls":l,"data-slot":"handle",class:H(B.value.handle({class:t.ui?.handle})),onMousedown:v(_),onTouchstart:v(S),onDblclick:v(w)},null,8,["class","onMousedown","onTouchstart","onDblclick"])):$("",!0)])]),_:3}),e.side==="right"?(k(),z(v(L),{key:0})):$("",!0),ie("div",G({id:l,ref_key:"el",ref:f},Z.$attrs,{"data-collapsed":v(c),"data-dragging":v(p),"data-slot":"root",class:B.value.root({class:[t.ui?.root,t.class]}),style:{"--width":`${v(u)||0}${v(h).unit}`}}),[i.header?(k(),j("div",{key:0,"data-slot":"header",class:H(B.value.header({class:t.ui?.header}))},[Y(Z.$slots,"header",{collapsed:v(c),collapse:v(d)})],2)):$("",!0),ie("div",{"data-slot":"body",class:H(B.value.body({class:t.ui?.body}))},[Y(Z.$slots,"default",{collapsed:v(c),collapse:v(d)})],2),i.footer?(k(),j("div",{key:1,"data-slot":"footer",class:H(B.value.footer({class:t.ui?.footer}))},[Y(Z.$slots,"footer",{collapsed:v(c),collapse:v(d)})],2)):$("",!0)],16,Jl),e.side==="left"?(k(),z(v(L),{key:1})):$("",!0),O(v(E),G({open:s.value,"onUpdate:open":V[0]||(V[0]=A=>s.value=A),title:v(o)("dashboardSidebar.title"),description:v(o)("dashboardSidebar.description")},W.value,{ui:{overlay:B.value.overlay({class:t.ui?.overlay}),content:B.value.content({class:t.ui?.content})}}),{content:T(A=>[Y(Z.$slots,"content",Et(Lt(A)),()=>[i.header||e.mode!=="drawer"?(k(),j("div",{key:0,"data-slot":"header",class:H(B.value.header({class:t.ui?.header,menu:!0}))},[e.mode!=="drawer"&&e.toggleSide==="left"?(k(),z(v(x),{key:0})):$("",!0),Y(Z.$slots,"header"),e.mode!=="drawer"&&e.toggleSide==="right"?(k(),z(v(x),{key:1})):$("",!0)],2)):$("",!0),ie("div",{"data-slot":"body",class:H(B.value.body({class:t.ui?.body,menu:!0}))},[Y(Z.$slots,"default")],2),i.footer?(k(),j("div",{key:1,"data-slot":"footer",class:H(B.value.footer({class:t.ui?.footer,menu:!0}))},[Y(Z.$slots,"footer")],2)):$("",!0)])]),_:3},16,["open","title","description","ui"])],64))}});function pt(e){return Array.isArray?Array.isArray(e):co(e)==="[object Array]"}function Ql(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function eh(e){return e==null?"":Ql(e)}function rt(e){return typeof e=="string"}function lo(e){return typeof e=="number"}function th(e){return e===!0||e===!1||ih(e)&&co(e)=="[object Boolean]"}function ho(e){return typeof e=="object"}function ih(e){return ho(e)&&e!==null}function qe(e){return e!=null}function gs(e){return!e.trim().length}function co(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const sh="Incorrect 'index' type",rh=e=>`Invalid value for key ${e}`,nh=e=>`Pattern length exceeds max of ${e}.`,oh=e=>`Missing ${e} property in key`,ah=e=>`Property 'weight' in key '${e}' must be a positive integer`,Kr=Object.prototype.hasOwnProperty;class lh{constructor(t){this._keys=[],this._keyMap={};let i=0;t.forEach(s=>{let r=uo(s);this._keys.push(r),this._keyMap[r.id]=r,i+=r.weight}),this._keys.forEach(s=>{s.weight/=i})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function uo(e){let t=null,i=null,s=null,r=1,n=null;if(rt(e)||pt(e))s=e,t=Ur(e),i=As(e);else{if(!Kr.call(e,"name"))throw new Error(oh("name"));const o=e.name;if(s=o,Kr.call(e,"weight")&&(r=e.weight,r<=0))throw new Error(ah(o));t=Ur(o),i=As(o),n=e.getFn}return{path:t,id:i,weight:r,src:s,getFn:n}}function Ur(e){return pt(e)?e:e.split(".")}function As(e){return pt(e)?e.join("."):e}function hh(e,t){let i=[],s=!1;const r=(n,o,a)=>{if(qe(n))if(!o[a])i.push(n);else{let h=o[a];const l=n[h];if(!qe(l))return;if(a===o.length-1&&(rt(l)||lo(l)||th(l)))i.push(eh(l));else if(pt(l)){s=!0;for(let f=0,u=l.length;f<u;f+=1)r(l[f],o,a+1)}else o.length&&r(l,o,a+1)}};return r(e,rt(t)?t.split("."):t,0),s?i:i[0]}const ch={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},uh={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},dh={location:0,threshold:.6,distance:100},fh={useExtendedSearch:!1,getFn:hh,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var q={...uh,...ch,...dh,...fh};const _h=/[^ ]+/g;function ph(e=1,t=3){const i=new Map,s=Math.pow(10,t);return{get(r){const n=r.match(_h).length;if(i.has(n))return i.get(n);const o=1/Math.pow(n,.5*e),a=parseFloat(Math.round(o*s)/s);return i.set(n,a),a},clear(){i.clear()}}}class Mr{constructor({getFn:t=q.getFn,fieldNormWeight:i=q.fieldNormWeight}={}){this.norm=ph(i,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((i,s)=>{this._keysMap[i.id]=s})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,rt(this.docs[0])?this.docs.forEach((t,i)=>{this._addString(t,i)}):this.docs.forEach((t,i)=>{this._addObject(t,i)}),this.norm.clear())}add(t){const i=this.size();rt(t)?this._addString(t,i):this._addObject(t,i)}removeAt(t){this.records.splice(t,1);for(let i=t,s=this.size();i<s;i+=1)this.records[i].i-=1}getValueForItemAtKeyId(t,i){return t[this._keysMap[i]]}size(){return this.records.length}_addString(t,i){if(!qe(t)||gs(t))return;let s={v:t,i,n:this.norm.get(t)};this.records.push(s)}_addObject(t,i){let s={i,$:{}};this.keys.forEach((r,n)=>{let o=r.getFn?r.getFn(t):this.getFn(t,r.path);if(qe(o)){if(pt(o)){let a=[];const h=[{nestedArrIndex:-1,value:o}];for(;h.length;){const{nestedArrIndex:l,value:f}=h.pop();if(qe(f))if(rt(f)&&!gs(f)){let u={v:f,i:l,n:this.norm.get(f)};a.push(u)}else pt(f)&&f.forEach((u,d)=>{h.push({nestedArrIndex:d,value:u})})}s.$[n]=a}else if(rt(o)&&!gs(o)){let a={v:o,n:this.norm.get(o)};s.$[n]=a}}}),this.records.push(s)}toJSON(){return{keys:this.keys,records:this.records}}}function fo(e,t,{getFn:i=q.getFn,fieldNormWeight:s=q.fieldNormWeight}={}){const r=new Mr({getFn:i,fieldNormWeight:s});return r.setKeys(e.map(uo)),r.setSources(t),r.create(),r}function gh(e,{getFn:t=q.getFn,fieldNormWeight:i=q.fieldNormWeight}={}){const{keys:s,records:r}=e,n=new Mr({getFn:t,fieldNormWeight:i});return n.setKeys(s),n.setIndexRecords(r),n}function Mi(e,{errors:t=0,currentLocation:i=0,expectedLocation:s=0,distance:r=q.distance,ignoreLocation:n=q.ignoreLocation}={}){const o=t/e.length;if(n)return o;const a=Math.abs(s-i);return r?o+a/r:a?1:o}function vh(e=[],t=q.minMatchCharLength){let i=[],s=-1,r=-1,n=0;for(let o=e.length;n<o;n+=1){let a=e[n];a&&s===-1?s=n:!a&&s!==-1&&(r=n-1,r-s+1>=t&&i.push([s,r]),s=-1)}return e[n-1]&&n-s>=t&&i.push([s,n-1]),i}const It=32;function mh(e,t,i,{location:s=q.location,distance:r=q.distance,threshold:n=q.threshold,findAllMatches:o=q.findAllMatches,minMatchCharLength:a=q.minMatchCharLength,includeMatches:h=q.includeMatches,ignoreLocation:l=q.ignoreLocation}={}){if(t.length>It)throw new Error(nh(It));const f=t.length,u=e.length,d=Math.max(0,Math.min(s,u));let c=n,p=d;const _=a>1||h,S=_?Array(u):[];let w;for(;(w=e.indexOf(t,p))>-1;){let E=Mi(t,{currentLocation:w,expectedLocation:d,distance:r,ignoreLocation:l});if(c=Math.min(E,c),p=w+f,_){let W=0;for(;W<f;)S[w+W]=1,W+=1}}p=-1;let y=[],x=1,g=f+u;const L=1<<f-1;for(let E=0;E<f;E+=1){let W=0,U=g;for(;W<U;)Mi(t,{errors:E,currentLocation:d+U,expectedLocation:d,distance:r,ignoreLocation:l})<=c?W=U:g=U,U=Math.floor((g-W)/2+W);g=U;let Z=Math.max(1,d-U+1),V=o?u:Math.min(d+U,u)+f,A=Array(V+2);A[V+1]=(1<<E)-1;for(let M=V;M>=Z;M-=1){let m=M-1,I=i[e.charAt(m)];if(_&&(S[m]=+!!I),A[M]=(A[M+1]<<1|1)&I,E&&(A[M]|=(y[M+1]|y[M])<<1|1|y[M+1]),A[M]&L&&(x=Mi(t,{errors:E,currentLocation:m,expectedLocation:d,distance:r,ignoreLocation:l}),x<=c)){if(c=x,p=m,p<=d)break;Z=Math.max(1,2*d-p)}}if(Mi(t,{errors:E+1,currentLocation:d,expectedLocation:d,distance:r,ignoreLocation:l})>c)break;y=A}const B={isMatch:p>=0,score:Math.max(.001,x)};if(_){const E=vh(S,a);E.length?h&&(B.indices=E):B.isMatch=!1}return B}function Sh(e){let t={};for(let i=0,s=e.length;i<s;i+=1){const r=e.charAt(i);t[r]=(t[r]||0)|1<<s-i-1}return t}const Ji=String.prototype.normalize?(e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")):(e=>e);class _o{constructor(t,{location:i=q.location,threshold:s=q.threshold,distance:r=q.distance,includeMatches:n=q.includeMatches,findAllMatches:o=q.findAllMatches,minMatchCharLength:a=q.minMatchCharLength,isCaseSensitive:h=q.isCaseSensitive,ignoreDiacritics:l=q.ignoreDiacritics,ignoreLocation:f=q.ignoreLocation}={}){if(this.options={location:i,threshold:s,distance:r,includeMatches:n,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:h,ignoreDiacritics:l,ignoreLocation:f},t=h?t:t.toLowerCase(),t=l?Ji(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const u=(c,p)=>{this.chunks.push({pattern:c,alphabet:Sh(c),startIndex:p})},d=this.pattern.length;if(d>It){let c=0;const p=d%It,_=d-p;for(;c<_;)u(this.pattern.substr(c,It),c),c+=It;if(p){const S=d-It;u(this.pattern.substr(S),S)}}else u(this.pattern,0)}searchIn(t){const{isCaseSensitive:i,ignoreDiacritics:s,includeMatches:r}=this.options;if(t=i?t:t.toLowerCase(),t=s?Ji(t):t,this.pattern===t){let _={isMatch:!0,score:0};return r&&(_.indices=[[0,t.length-1]]),_}const{location:n,distance:o,threshold:a,findAllMatches:h,minMatchCharLength:l,ignoreLocation:f}=this.options;let u=[],d=0,c=!1;this.chunks.forEach(({pattern:_,alphabet:S,startIndex:w})=>{const{isMatch:y,score:x,indices:g}=mh(t,_,S,{location:n+w,distance:o,threshold:a,findAllMatches:h,minMatchCharLength:l,includeMatches:r,ignoreLocation:f});y&&(c=!0),d+=x,y&&g&&(u=[...u,...g])});let p={isMatch:c,score:c?d/this.chunks.length:1};return c&&r&&(p.indices=u),p}}class Rt{constructor(t){this.pattern=t}static isMultiMatch(t){return Vr(t,this.multiRegex)}static isSingleMatch(t){return Vr(t,this.singleRegex)}search(){}}function Vr(e,t){const i=e.match(t);return i?i[1]:null}class bh extends Rt{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const i=t===this.pattern;return{isMatch:i,score:i?0:1,indices:[0,this.pattern.length-1]}}}class yh extends Rt{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const s=t.indexOf(this.pattern)===-1;return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}}class wh extends Rt{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const i=t.startsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,this.pattern.length-1]}}}class Ch extends Rt{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const i=!t.startsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,t.length-1]}}}class kh extends Rt{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const i=t.endsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class xh extends Rt{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const i=!t.endsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,t.length-1]}}}class po extends Rt{constructor(t,{location:i=q.location,threshold:s=q.threshold,distance:r=q.distance,includeMatches:n=q.includeMatches,findAllMatches:o=q.findAllMatches,minMatchCharLength:a=q.minMatchCharLength,isCaseSensitive:h=q.isCaseSensitive,ignoreDiacritics:l=q.ignoreDiacritics,ignoreLocation:f=q.ignoreLocation}={}){super(t),this._bitapSearch=new _o(t,{location:i,threshold:s,distance:r,includeMatches:n,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:h,ignoreDiacritics:l,ignoreLocation:f})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class go extends Rt{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let i=0,s;const r=[],n=this.pattern.length;for(;(s=t.indexOf(this.pattern,i))>-1;)i=s+n,r.push([s,i-1]);const o=!!r.length;return{isMatch:o,score:o?0:1,indices:r}}}const Ps=[bh,go,wh,Ch,xh,kh,yh,po],jr=Ps.length,Eh=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Lh="|";function Bh(e,t={}){return e.split(Lh).map(i=>{let s=i.trim().split(Eh).filter(n=>n&&!!n.trim()),r=[];for(let n=0,o=s.length;n<o;n+=1){const a=s[n];let h=!1,l=-1;for(;!h&&++l<jr;){const f=Ps[l];let u=f.isMultiMatch(a);u&&(r.push(new f(u,t)),h=!0)}if(!h)for(l=-1;++l<jr;){const f=Ps[l];let u=f.isSingleMatch(a);if(u){r.push(new f(u,t));break}}}return r})}const Dh=new Set([po.type,go.type]);class Mh{constructor(t,{isCaseSensitive:i=q.isCaseSensitive,ignoreDiacritics:s=q.ignoreDiacritics,includeMatches:r=q.includeMatches,minMatchCharLength:n=q.minMatchCharLength,ignoreLocation:o=q.ignoreLocation,findAllMatches:a=q.findAllMatches,location:h=q.location,threshold:l=q.threshold,distance:f=q.distance}={}){this.query=null,this.options={isCaseSensitive:i,ignoreDiacritics:s,includeMatches:r,minMatchCharLength:n,findAllMatches:a,ignoreLocation:o,location:h,threshold:l,distance:f},t=i?t:t.toLowerCase(),t=s?Ji(t):t,this.pattern=t,this.query=Bh(this.pattern,this.options)}static condition(t,i){return i.useExtendedSearch}searchIn(t){const i=this.query;if(!i)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:r,ignoreDiacritics:n}=this.options;t=r?t:t.toLowerCase(),t=n?Ji(t):t;let o=0,a=[],h=0;for(let l=0,f=i.length;l<f;l+=1){const u=i[l];a.length=0,o=0;for(let d=0,c=u.length;d<c;d+=1){const p=u[d],{isMatch:_,indices:S,score:w}=p.search(t);if(_){if(o+=1,h+=w,s){const y=p.constructor.type;Dh.has(y)?a=[...a,...S]:a.push(S)}}else{h=0,o=0,a.length=0;break}}if(o){let d={isMatch:!0,score:h/o};return s&&(d.indices=a),d}}return{isMatch:!1,score:1}}}const Is=[];function Rh(...e){Is.push(...e)}function Os(e,t){for(let i=0,s=Is.length;i<s;i+=1){let r=Is[i];if(r.condition(e,t))return new r(e,t)}return new _o(e,t)}const Zi={AND:"$and",OR:"$or"},Ns={PATH:"$path",PATTERN:"$val"},zs=e=>!!(e[Zi.AND]||e[Zi.OR]),Th=e=>!!e[Ns.PATH],Ah=e=>!pt(e)&&ho(e)&&!zs(e),Yr=e=>({[Zi.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function vo(e,t,{auto:i=!0}={}){const s=r=>{let n=Object.keys(r);const o=Th(r);if(!o&&n.length>1&&!zs(r))return s(Yr(r));if(Ah(r)){const h=o?r[Ns.PATH]:n[0],l=o?r[Ns.PATTERN]:r[h];if(!rt(l))throw new Error(rh(h));const f={keyId:As(h),pattern:l};return i&&(f.searcher=Os(l,t)),f}let a={children:[],operator:n[0]};return n.forEach(h=>{const l=r[h];pt(l)&&l.forEach(f=>{a.children.push(s(f))})}),a};return zs(e)||(e=Yr(e)),s(e)}function Ph(e,{ignoreFieldNorm:t=q.ignoreFieldNorm}){e.forEach(i=>{let s=1;i.matches.forEach(({key:r,norm:n,score:o})=>{const a=r?r.weight:null;s*=Math.pow(o===0&&a?Number.EPSILON:o,(a||1)*(t?1:n))}),i.score=s})}function Ih(e,t){const i=e.matches;t.matches=[],qe(i)&&i.forEach(s=>{if(!qe(s.indices)||!s.indices.length)return;const{indices:r,value:n}=s;let o={indices:r,value:n};s.key&&(o.key=s.key.src),s.idx>-1&&(o.refIndex=s.idx),t.matches.push(o)})}function Oh(e,t){t.score=e.score}function Nh(e,t,{includeMatches:i=q.includeMatches,includeScore:s=q.includeScore}={}){const r=[];return i&&r.push(Ih),s&&r.push(Oh),e.map(n=>{const{idx:o}=n,a={item:t[o],refIndex:o};return r.length&&r.forEach(h=>{h(n,a)}),a})}class ti{constructor(t,i={},s){this.options={...q,...i},this.options.useExtendedSearch,this._keyStore=new lh(this.options.keys),this.setCollection(t,s)}setCollection(t,i){if(this._docs=t,i&&!(i instanceof Mr))throw new Error(sh);this._myIndex=i||fo(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){qe(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const i=[];for(let s=0,r=this._docs.length;s<r;s+=1){const n=this._docs[s];t(n,s)&&(this.removeAt(s),s-=1,r-=1,i.push(n))}return i}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:i=-1}={}){const{includeMatches:s,includeScore:r,shouldSort:n,sortFn:o,ignoreFieldNorm:a}=this.options;let h=rt(t)?rt(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return Ph(h,{ignoreFieldNorm:a}),n&&h.sort(o),lo(i)&&i>-1&&(h=h.slice(0,i)),Nh(h,this._docs,{includeMatches:s,includeScore:r})}_searchStringList(t){const i=Os(t,this.options),{records:s}=this._myIndex,r=[];return s.forEach(({v:n,i:o,n:a})=>{if(!qe(n))return;const{isMatch:h,score:l,indices:f}=i.searchIn(n);h&&r.push({item:n,idx:o,matches:[{score:l,value:n,norm:a,indices:f}]})}),r}_searchLogical(t){const i=vo(t,this.options),s=(a,h,l)=>{if(!a.children){const{keyId:u,searcher:d}=a,c=this._findMatches({key:this._keyStore.get(u),value:this._myIndex.getValueForItemAtKeyId(h,u),searcher:d});return c&&c.length?[{idx:l,item:h,matches:c}]:[]}const f=[];for(let u=0,d=a.children.length;u<d;u+=1){const c=a.children[u],p=s(c,h,l);if(p.length)f.push(...p);else if(a.operator===Zi.AND)return[]}return f},r=this._myIndex.records,n={},o=[];return r.forEach(({$:a,i:h})=>{if(qe(a)){let l=s(i,a,h);l.length&&(n[h]||(n[h]={idx:h,item:a,matches:[]},o.push(n[h])),l.forEach(({matches:f})=>{n[h].matches.push(...f)}))}}),o}_searchObjectList(t){const i=Os(t,this.options),{keys:s,records:r}=this._myIndex,n=[];return r.forEach(({$:o,i:a})=>{if(!qe(o))return;let h=[];s.forEach((l,f)=>{h.push(...this._findMatches({key:l,value:o[f],searcher:i}))}),h.length&&n.push({idx:a,item:o,matches:h})}),n}_findMatches({key:t,value:i,searcher:s}){if(!qe(i))return[];let r=[];if(pt(i))i.forEach(({v:n,i:o,n:a})=>{if(!qe(n))return;const{isMatch:h,score:l,indices:f}=s.searchIn(n);h&&r.push({score:l,key:t,value:n,idx:o,norm:a,indices:f})});else{const{v:n,n:o}=i,{isMatch:a,score:h,indices:l}=s.searchIn(n);a&&r.push({score:h,key:t,value:n,norm:o,indices:l})}return r}}ti.version="7.1.0";ti.createIndex=fo;ti.parseIndex=gh;ti.config=q;ti.parseQuery=vo;Rh(Mh);function zh(e,t,i){const s=()=>{var n,o;return new ti((n=dt(t))!==null&&n!==void 0?n:[],(o=dt(i))===null||o===void 0?void 0:o.fuseOptions)},r=J(s());return Ce(()=>{var n;return(n=dt(i))===null||n===void 0?void 0:n.fuseOptions},()=>{r.value=s()},{deep:!0}),Ce(()=>dt(t),n=>{r.value.setCollection(n)},{deep:!0}),{fuse:r,results:te(()=>{const n=dt(i);if(n?.matchAllWhenSearchEmpty&&!dt(e))return dt(t).map((a,h)=>({item:a,refIndex:h}));const o=n?.resultLimit;return r.value.search(dt(e),o?{limit:o}:void 0)})}}function Fh(e,t){let i="",s=0,r=!1;for(let n=e.length-1;n>=0;n--){if(e[n]===">")r=!0;else if(e[n]==="<"){r=!1,i=e[n]+i;continue}if(r||s++,s<=t)i=e[n]+i;else{i="..."+i;break}}return i}function Gr(e,t,i,s){function r(n,o=[]){n=n||"";let a="",h=0;o.forEach(f=>{if(f.length===2&&f[0]===f[1])return;const u=f[1]+1,d=u-f[0]>=t.length;a+=[n.substring(h,f[0]),d&&"<mark>",n.substring(f[0],u),d&&"</mark>"].filter(Boolean).join(""),h=u}),a+=n.substring(h);const l=a.indexOf("<mark>");return l!==-1&&(a=Fh(a,a.length-l)),a}if(e.matches?.length){for(const n of e.matches)if(!(i&&n.key!==i)&&!s?.includes(n.key))return r(n.value,n.indices)}}const Hh={slots:{root:"flex flex-col min-h-0 min-w-0 divide-y divide-default",input:"[&>input]:h-12",close:"",back:"p-0",content:"relative overflow-hidden flex flex-col",footer:"p-1",viewport:"relative scroll-py-1 overflow-y-auto flex-1 focus:outline-none",group:"p-1 isolate",empty:"py-6 text-center text-sm text-muted",label:"p-1.5 text-xs font-semibold text-highlighted",item:"group relative w-full flex items-start gap-1.5 p-1.5 text-sm select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75",itemLeadingIcon:"shrink-0 size-5",itemLeadingAvatar:"shrink-0",itemLeadingAvatarSize:"2xs",itemLeadingChip:"shrink-0 size-5",itemLeadingChipSize:"md",itemTrailing:"ms-auto inline-flex gap-1.5 items-center",itemTrailingIcon:"shrink-0 size-5",itemTrailingHighlightedIcon:"shrink-0 size-5 text-dimmed hidden group-data-highlighted:inline-flex",itemTrailingKbds:"hidden lg:inline-flex items-center shrink-0 gap-0.5",itemTrailingKbdsSize:"md",itemWrapper:"flex-1 flex flex-col text-start min-w-0",itemLabel:"truncate space-x-1 text-dimmed",itemDescription:"truncate text-muted",itemLabelBase:"text-highlighted [&>mark]:text-inverted [&>mark]:bg-primary",itemLabelPrefix:"text-default",itemLabelSuffix:"text-dimmed [&>mark]:text-inverted [&>mark]:bg-primary"},variants:{virtualize:{true:{viewport:"p-1 isolate"},false:{viewport:"divide-y divide-default"}},active:{true:{item:"text-highlighted before:bg-elevated",itemLeadingIcon:"text-default"},false:{item:["text-default data-highlighted:not-data-disabled:text-highlighted data-highlighted:not-data-disabled:before:bg-elevated/50","transition-colors before:transition-colors"],itemLeadingIcon:["text-dimmed group-data-highlighted:not-group-data-disabled:text-default","transition-colors"]}},loading:{true:{itemLeadingIcon:"animate-spin"}}}},$h=["innerHTML"],Wh=["innerHTML"],qh=Object.assign({inheritAttrs:!1},{__name:"UCommandPalette",props:Xi({as:{type:null,required:!1},icon:{type:null,required:!1},trailingIcon:{type:null,required:!1},selectedIcon:{type:null,required:!1},childrenIcon:{type:null,required:!1},placeholder:{type:String,required:!1},autofocus:{type:Boolean,required:!1,default:!0},close:{type:[Boolean,Object],required:!1},closeIcon:{type:null,required:!1},back:{type:[Boolean,Object],required:!1,default:!0},backIcon:{type:null,required:!1},groups:{type:Array,required:!1},fuse:{type:Object,required:!1},virtualize:{type:[Boolean,Object],required:!1,default:!1},labelKey:{type:null,required:!1,default:"label"},descriptionKey:{type:null,required:!1,default:"description"},preserveGroupOrder:{type:Boolean,required:!1,default:!1},class:{type:null,required:!1},ui:{type:null,required:!1},multiple:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},modelValue:{type:null,required:!1,default:""},defaultValue:{type:null,required:!1},highlightOnHover:{type:Boolean,required:!1,default:!0},selectionBehavior:{type:String,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1}},{searchTerm:{type:String,default:""},searchTermModifiers:{}}),emits:Xi(["update:modelValue","highlight","entryFocus","leave","update:open"],["update:searchTerm"]),setup(e,{emit:t}){const i=e,s=t,r=ei(),n=vi(e,"searchTerm",{type:String,default:""}),{t:o}=ns(),a=$t(),h=gi(zt(i,"as","disabled","multiple","modelValue","defaultValue","highlightOnHover"),s),l=Yi(zt(i,"loading")),f=ot(()=>i.virtualize?Mt(typeof i.virtualize=="boolean"?{}:i.virtualize,{estimateSize:cl(E.value,"md",i.descriptionKey)}):!1),[u,d]=Zt({props:{item:{type:Object,required:!0},group:{type:Object,required:!1},index:{type:Number,required:!1}}}),c=te(()=>Ne({extend:Ne(Hh),...a.ui?.commandPalette||{}})({virtualize:!!i.virtualize})),p=te(()=>Mt({},i.fuse,{fuseOptions:{ignoreLocation:!0,threshold:.1,keys:[i.labelKey,"suffix"]},resultLimit:12,matchAllWhenSearchEmpty:!0})),_=J([]),S=te(()=>_.value[_.value.length-1]?.placeholder||i.placeholder||o("commandPalette.placeholder")),w=te(()=>_.value?.length?[_.value[_.value.length-1]]:i.groups),y=te(()=>w.value?.filter(b=>b.id?!b.ignoreFilter:(console.warn("[@nuxt/ui] CommandPalette group is missing an `id` property"),!1))?.flatMap(b=>b.items?.map(M=>({...M,group:b.id}))||[])||[]),{results:x}=zh(n,y,p),g=Ea(x,16,!0);function L(b,M){let m=M;return b?.postFilter&&typeof b.postFilter=="function"&&(m=b.postFilter(n.value,m)),{...b,items:m.slice(0,p.value.resultLimit).map(I=>({...I,labelHtml:Gr(I,n.value,i.labelKey),suffixHtml:Gr(I,n.value,void 0,[i.labelKey])}))}}const B=te(()=>{const b=w.value,M=g.value.reduce((R,D)=>{const{item:X,matches:se}=D;return X.group&&(R[X.group]||=[],R[X.group]?.push({...X,matches:se})),R},{});if(i.preserveGroupOrder){const R=[];for(const D of b||[]){if(!D.items?.length)continue;const X=D.ignoreFilter?D.items:M[D.id];if(!X?.length)continue;const se=L(D,X);se.items?.length&&R.push(se)}return R}const m=Object.entries(M).map(([R,D])=>{const X=b?.find(Ee=>Ee.id===R);if(!X)return;const se=L(X,D);return se.items?.length?se:void 0}).filter(R=>!!R);return(b?.map((R,D)=>({...R,index:D}))?.filter(R=>R.ignoreFilter&&R.items?.length)?.map(R=>({...L(R,R.items||[]),index:R.index}))?.filter(R=>R.items?.length)||[]).reduce((R,D)=>(R.splice(D.index,0,D),R),[...m])}),E=te(()=>B.value.flatMap(b=>b.items||[])),W=Qn("rootRef");function U(b){b.children?.length&&(_.value.push({id:`history-${_.value.length}`,label:b.label,slot:b.slot,placeholder:b.placeholder,items:b.children}),n.value="",W.value?.highlightFirstItem())}function Z(){_.value.length&&(_.value.pop(),n.value="",W.value?.highlightFirstItem())}function V(){n.value||Z()}function A(b,M){M.children?.length?(b.preventDefault(),U(M)):M.onSelect?.(b)}return(b,M)=>(k(),j(ke,null,[O(v(u),null,{default:T(({item:m,index:I,group:R})=>[O(v(il),{value:v(Gi)(m,["matches","group","onSelect","labelHtml","suffixHtml","children"]),disabled:m.disabled,"as-child":"",onSelect:D=>A(D,m)},{default:T(()=>[O(Ni,G(v(zi)(m),{custom:""}),{default:T(({active:D,...X})=>[O(Yt,G(X,{"data-slot":"item",class:c.value.item({class:[i.ui?.item,m.ui?.item,m.class],active:D||m.active})}),{default:T(()=>[Y(b.$slots,m.slot||R?.slot||"item",{item:m,index:I,ui:c.value},()=>[Y(b.$slots,m.slot?`${m.slot}-leading`:R?.slot?`${R.slot}-leading`:"item-leading",{item:m,index:I,ui:c.value},()=>[m.loading?(k(),z(De,{key:0,name:e.loadingIcon||v(a).ui.icons.loading,"data-slot":"itemLeadingIcon",class:H(c.value.itemLeadingIcon({class:[i.ui?.itemLeadingIcon,m.ui?.itemLeadingIcon],loading:!0}))},null,8,["name","class"])):m.icon?(k(),z(De,{key:1,name:m.icon,"data-slot":"itemLeadingIcon",class:H(c.value.itemLeadingIcon({class:[i.ui?.itemLeadingIcon,m.ui?.itemLeadingIcon],active:D||m.active}))},null,8,["name","class"])):m.avatar?(k(),z(kr,G({key:2,size:m.ui?.itemLeadingAvatarSize||i.ui?.itemLeadingAvatarSize||c.value.itemLeadingAvatarSize()},m.avatar,{"data-slot":"itemLeadingAvatar",class:c.value.itemLeadingAvatar({class:[i.ui?.itemLeadingAvatar,m.ui?.itemLeadingAvatar],active:D||m.active})}),null,16,["size","class"])):m.chip?(k(),z(La,G({key:3,size:m.ui?.itemLeadingChipSize||i.ui?.itemLeadingChipSize||c.value.itemLeadingChipSize(),inset:"",standalone:""},m.chip,{"data-slot":"itemLeadingChip",class:c.value.itemLeadingChip({class:[i.ui?.itemLeadingChip,m.ui?.itemLeadingChip],active:D||m.active})}),null,16,["size","class"])):$("",!0)]),m.prefix||m.labelHtml||v(Oe)(m,i.labelKey)||m.suffixHtml||m.suffix||r[m.slot?`${m.slot}-label`:R?.slot?`${R.slot}-label`:"item-label"]||v(Oe)(m,i.descriptionKey)||r[m.slot?`${m.slot}-description`:R?.slot?`${R.slot}-description`:"item-description"]?(k(),j("span",{key:0,"data-slot":"itemWrapper",class:H(c.value.itemWrapper({class:[i.ui?.itemWrapper,m.ui?.itemWrapper]}))},[ie("span",{"data-slot":"itemLabel",class:H(c.value.itemLabel({class:[i.ui?.itemLabel,m.ui?.itemLabel],active:D||m.active}))},[Y(b.$slots,m.slot?`${m.slot}-label`:R?.slot?`${R.slot}-label`:"item-label",{item:m,index:I,ui:c.value},()=>[m.prefix?(k(),j("span",{key:0,"data-slot":"itemLabelPrefix",class:H(c.value.itemLabelPrefix({class:[i.ui?.itemLabelPrefix,m.ui?.itemLabelPrefix]}))},Me(m.prefix),3)):$("",!0),m.labelHtml?(k(),j("span",{key:1,"data-slot":"itemLabelBase",class:H(c.value.itemLabelBase({class:[i.ui?.itemLabelBase,m.ui?.itemLabelBase],active:D||m.active})),innerHTML:m.labelHtml},null,10,$h)):(k(),j("span",{key:2,"data-slot":"itemLabelBase",class:H(c.value.itemLabelBase({class:[i.ui?.itemLabelBase,m.ui?.itemLabelBase],active:D||m.active}))},Me(v(Oe)(m,i.labelKey)),3)),m.suffixHtml?(k(),j("span",{key:3,"data-slot":"itemLabelSuffix",class:H(c.value.itemLabelSuffix({class:[i.ui?.itemLabelSuffix,m.ui?.itemLabelSuffix],active:D||m.active})),innerHTML:m.suffixHtml},null,10,Wh)):m.suffix?(k(),j("span",{key:4,"data-slot":"itemLabelSuffix",class:H(c.value.itemLabelSuffix({class:[i.ui?.itemLabelSuffix,m.ui?.itemLabelSuffix],active:D||m.active}))},Me(m.suffix),3)):$("",!0)])],2),v(Oe)(m,i.descriptionKey)?(k(),j("span",{key:0,"data-slot":"itemDescription",class:H(c.value.itemDescription({class:[i.ui?.itemDescription,m.ui?.itemDescription]}))},[Y(b.$slots,m.slot?`${m.slot}-description`:R?.slot?`${R.slot}-description`:"item-description",{item:m,index:I,ui:c.value},()=>[at(Me(v(Oe)(m,i.descriptionKey)),1)])],2)):$("",!0)],2)):$("",!0),ie("span",{"data-slot":"itemTrailing",class:H(c.value.itemTrailing({class:[i.ui?.itemTrailing,m.ui?.itemTrailing]}))},[Y(b.$slots,m.slot?`${m.slot}-trailing`:R?.slot?`${R.slot}-trailing`:"item-trailing",{item:m,index:I,ui:c.value},()=>[m.children&&m.children.length>0?(k(),z(De,{key:0,name:e.childrenIcon||v(a).ui.icons.chevronRight,"data-slot":"itemTrailingIcon",class:H(c.value.itemTrailingIcon({class:[i.ui?.itemTrailingIcon,m.ui?.itemTrailingIcon]}))},null,8,["name","class"])):m.kbds?.length?(k(),j("span",{key:1,"data-slot":"itemTrailingKbds",class:H(c.value.itemTrailingKbds({class:[i.ui?.itemTrailingKbds,m.ui?.itemTrailingKbds]}))},[(k(!0),j(ke,null,Ge(m.kbds,(se,Ee)=>(k(),z(xr,G({key:Ee,size:m.ui?.itemTrailingKbdsSize||i.ui?.itemTrailingKbdsSize||c.value.itemTrailingKbdsSize()},{ref_for:!0},typeof se=="string"?{value:se}:se),null,16,["size"]))),128))],2)):R?.highlightedIcon?(k(),z(De,{key:2,name:R.highlightedIcon,"data-slot":"itemTrailingHighlightedIcon",class:H(c.value.itemTrailingHighlightedIcon({class:[i.ui?.itemTrailingHighlightedIcon,m.ui?.itemTrailingHighlightedIcon]}))},null,8,["name","class"])):$("",!0)]),m.children?.length?$("",!0):(k(),z(v(sl),{key:0,"as-child":""},{default:T(()=>[O(De,{name:e.selectedIcon||v(a).ui.icons.check,"data-slot":"itemTrailingIcon",class:H(c.value.itemTrailingIcon({class:[i.ui?.itemTrailingIcon,m.ui?.itemTrailingIcon]}))},null,8,["name","class"])]),_:2},1024))],2)])]),_:2},1040,["class"])]),_:2},1040)]),_:2},1032,["value","disabled","onSelect"])]),_:3}),O(v(ll),G({...v(h),...b.$attrs},{ref_key:"rootRef",ref:W,"selection-behavior":e.selectionBehavior,"data-slot":"root",class:c.value.root({class:[i.ui?.root,i.class]})}),{default:T(()=>[O(v(rl),{modelValue:n.value,"onUpdate:modelValue":M[1]||(M[1]=m=>n.value=m),"as-child":""},{default:T(()=>[O(ul,G({placeholder:S.value,variant:"none",autofocus:e.autofocus},v(l),{"loading-icon":e.loadingIcon,"trailing-icon":e.trailingIcon,icon:e.icon||v(a).ui.icons.search,"data-slot":"input",class:c.value.input({class:i.ui?.input}),onKeydown:Yn(V,["backspace"])}),os({_:2},[_.value?.length&&(e.back||r.back)?{name:"leading",fn:T(()=>[Y(b.$slots,"back",{ui:c.value},()=>[O(Jt,G({icon:e.backIcon||v(a).ui.icons.arrowLeft,color:"neutral",variant:"link","aria-label":v(o)("commandPalette.back")},typeof e.back=="object"?e.back:{},{"data-slot":"back",class:c.value.back({class:i.ui?.back}),onClick:Z}),null,16,["icon","aria-label","class"])])]),key:"0"}:void 0,e.close||r.close?{name:"trailing",fn:T(()=>[Y(b.$slots,"close",{ui:c.value},()=>[e.close?(k(),z(Jt,G({key:0,icon:e.closeIcon||v(a).ui.icons.close,color:"neutral",variant:"ghost","aria-label":v(o)("commandPalette.close")},typeof e.close=="object"?e.close:{},{"data-slot":"close",class:c.value.close({class:i.ui?.close}),onClick:M[0]||(M[0]=m=>s("update:open",!1))}),null,16,["icon","aria-label","class"])):$("",!0)])]),key:"1"}:void 0]),1040,["placeholder","autofocus","loading-icon","trailing-icon","icon","class"])]),_:3},8,["modelValue"]),O(v(nl),{"data-slot":"content",class:H(c.value.content({class:i.ui?.content}))},{default:T(()=>[B.value?.length?(k(),j("div",{key:0,role:"presentation","data-slot":"viewport",class:H(c.value.viewport({class:i.ui?.viewport}))},[e.virtualize?(k(),z(v(ol),G({key:0,options:E.value,"text-content":m=>v(Oe)(m,i.labelKey)},f.value),{default:T(({option:m,virtualItem:I})=>[O(v(d),{item:m,index:I.index},null,8,["item","index"])]),_:1},16,["options","text-content"])):(k(!0),j(ke,{key:1},Ge(B.value,m=>(k(),z(v(al),{key:`group-${m.id}`,"data-slot":"group",class:H(c.value.group({class:i.ui?.group}))},{default:T(()=>[v(Oe)(m,i.labelKey)?(k(),z(v(yl),{key:0,"data-slot":"label",class:H(c.value.label({class:i.ui?.label}))},{default:T(()=>[at(Me(v(Oe)(m,i.labelKey)),1)]),_:2},1032,["class"])):$("",!0),(k(!0),j(ke,null,Ge(m.items,(I,R)=>(k(),z(v(d),{key:`group-${m.id}-${R}`,item:I,index:R,group:m},null,8,["item","index","group"]))),128))]),_:2},1032,["class"]))),128))],2)):(k(),j("div",{key:1,"data-slot":"empty",class:H(c.value.empty({class:i.ui?.empty}))},[Y(b.$slots,"empty",{searchTerm:n.value},()=>[at(Me(n.value?v(o)("commandPalette.noMatch",{searchTerm:n.value}):v(o)("commandPalette.noData")),1)])],2))]),_:3},8,["class"]),r.footer?(k(),j("div",{key:0,"data-slot":"footer",class:H(c.value.footer({class:i.ui?.footer}))},[Y(b.$slots,"footer",{ui:c.value})],2)):$("",!0)]),_:3},16,["selection-behavior","class"])],64))}}),Kh={slots:{modal:"",input:"[&>input]:text-base/5"},variants:{fullscreen:{false:{modal:"sm:max-w-3xl h-full sm:h-[28rem]"}}}},Uh=/^[^-]+.*-.*[^-]+$/,Vh=/^[^_]+.*_.*[^_]+$/,Xr=["arrowleft","arrowright","arrowup","arrowright","tab","escape","enter","backspace"];function vs(e){return/^[a-z]$/i.test(e)?`Key${e.toUpperCase()}`:/^\d$/.test(e)?`Digit${e}`:/^f\d+$/i.test(e)?e.toUpperCase():{space:"Space",enter:"Enter",escape:"Escape",tab:"Tab",backspace:"Backspace",delete:"Delete",arrowup:"ArrowUp",arrowdown:"ArrowDown",arrowleft:"ArrowLeft",arrowright:"ArrowRight"}[e.toLowerCase()]||e}function jh(e,t={}){const i=J([]),s=()=>{i.value.splice(0,i.value.length)},r=Ba(s,t.chainDelay??800),{macOS:n}=Wa(),o=Oa(),a=t.layoutIndependent??!1,h=Xr.map(d=>vs(d)),l=d=>{if(!d.key)return;const c=a?/^Key[A-Z]$/i.test(d.code):/^[a-z]{1}$/i.test(d.key),p=a?h.includes(d.code):Xr.includes(d.key.toLowerCase());let _;if(i.value.push(a?d.code:d.key),i.value.length>=2){_=i.value.slice(-2).join("-");for(const S of u.value.filter(w=>w.chained))if(S.key===_){S.enabled&&(d.preventDefault(),S.handler(d)),s();return}}for(const S of u.value.filter(w=>!w.chained)){if(a){if(d.code!==S.key)continue}else if(d.key.toLowerCase()!==S.key)continue;if(d.metaKey===S.metaKey&&d.ctrlKey===S.ctrlKey&&!((c||p)&&d.shiftKey!==S.shiftKey)){S.enabled&&(d.preventDefault(),S.handler(d)),s();return}}r()},f=te(()=>{const d=o.value?.tagName,c=o.value?.contentEditable;return d==="INPUT"||d==="TEXTAREA"||c==="true"||c==="plaintext-only"?o.value?.name||!0:!1}),u=te(()=>Object.entries(dt(e)).map(([d,c])=>{if(!c)return null;let p;d.includes("-")&&d!=="-"&&!d.includes("_")&&!d.match(Uh)?.length&&console.trace(`[Shortcut] Invalid key: "${d}"`),d.includes("_")&&d!=="_"&&!d.match(Vh)?.length&&console.trace(`[Shortcut] Invalid key: "${d}"`);const _=d.includes("-")&&d!=="-"&&!d.includes("_");if(_)a?p={key:d.split("-").map(y=>vs(y)).join("-"),metaKey:!1,ctrlKey:!1,shiftKey:!1,altKey:!1}:p={key:d.toLowerCase(),metaKey:!1,ctrlKey:!1,shiftKey:!1,altKey:!1};else{const w=d.toLowerCase().split("_").map(x=>x);let y=w.filter(x=>!["meta","command","ctrl","shift","alt","option"].includes(x)).join("_");a&&(y=vs(y)),p={key:y,metaKey:w.includes("meta")||w.includes("command"),ctrlKey:w.includes("ctrl"),shiftKey:w.includes("shift"),altKey:w.includes("alt")||w.includes("option")}}if(p.chained=_,!n.value&&p.metaKey&&!p.ctrlKey&&(p.metaKey=!1,p.ctrlKey=!0),typeof c=="function"?p.handler=c:typeof c=="object"&&(p={...p,handler:c.handler}),!p.handler)return console.trace("[Shortcut] Invalid value"),null;let S=!0;return c.usingInput?typeof c.usingInput=="string"&&(S=f.value===c.usingInput):S=!f.value,p.enabled=S,p}).filter(Boolean));return Na("keydown",l)}const Yh={__name:"UDashboardSearch",props:Xi({icon:{type:null,required:!1},placeholder:{type:String,required:!1},autofocus:{type:Boolean,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1},close:{type:[Boolean,Object],required:!1,default:!0},closeIcon:{type:null,required:!1},shortcut:{type:String,required:!1,default:"meta_k"},groups:{type:Array,required:!1},fuse:{type:Object,required:!1},colorMode:{type:Boolean,required:!1,default:!0},class:{type:null,required:!1},ui:{type:void 0,required:!1},title:{type:String,required:!1},description:{type:String,required:!1},overlay:{type:Boolean,required:!1},transition:{type:Boolean,required:!1},content:{type:Object,required:!1},dismissible:{type:Boolean,required:!1},fullscreen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0}},{open:{type:Boolean,default:!1},openModifiers:{},searchTerm:{type:String,default:""},searchTermModifiers:{}}),emits:["update:open","update:searchTerm"],setup(e,{expose:t}){const i=e,s=ei(),r=vi(e,"open",{type:Boolean,default:!1}),n=vi(e,"searchTerm",{type:String,default:""});Ts("dashboard:search:toggle",()=>{r.value=!r.value});const{t:o}=ns(),a=Da(),h=$t(),l=Yi(zt(i,"icon","placeholder","autofocus","loading","loadingIcon","close","closeIcon")),f=Yi(zt(i,"overlay","transition","content","dismissible","fullscreen","modal","portal")),u=()=>Gi(s,["content"]),d=te(()=>Mt({},i.fuse,{fuseOptions:{}})),c=te(()=>Ne({extend:Ne(Kh),...h.ui?.dashboardSearch||{}})({fullscreen:i.fullscreen})),p=te(()=>{const w=[];return w.push(...i.groups||[]),i.colorMode&&!a?.forced&&w.push({id:"theme",label:o("dashboardSearch.theme"),items:[{label:o("colorMode.system"),icon:h.ui.icons.system,active:a.preference==="system",onSelect:()=>{a.preference="system"}},{label:o("colorMode.light"),icon:h.ui.icons.light,active:a.preference==="light",onSelect:()=>{a.preference="light"}},{label:o("colorMode.dark"),icon:h.ui.icons.dark,active:a.preference==="dark",onSelect:()=>{a.preference="dark"}}]}),w}),_=Qn("commandPaletteRef");function S(w){w.disabled||(r.value=!1,n.value="")}return jh({[i.shortcut]:{usingInput:!0,handler:()=>r.value=!r.value}}),t({commandPaletteRef:_}),(w,y)=>(k(),z(Er,G({open:r.value,"onUpdate:open":y[2]||(y[2]=x=>r.value=x),title:e.title||v(o)("dashboardSearch.title"),description:e.description||v(o)("dashboardSearch.description")},v(f),{"data-slot":"modal",class:c.value.modal({class:[i.ui?.modal,i.class]})}),{content:T(x=>[Y(w.$slots,"content",Et(Lt(x)),()=>[O(qh,G({ref_key:"commandPaletteRef",ref:_,"search-term":n.value,"onUpdate:searchTerm":y[0]||(y[0]=g=>n.value=g)},v(l),{groups:p.value,fuse:d.value,ui:v(Jn)(v(Gi)(c.value,["modal"]),i.ui),"onUpdate:modelValue":S,"onUpdate:open":y[1]||(y[1]=g=>r.value=g)}),os({_:2},[Ge(u(),(g,L)=>({name:L,fn:T(B=>[Y(w.$slots,L,Et(Lt(B)))])}))]),1040,["search-term","groups","fuse","ui"])])]),_:3},16,["open","title","description","class"]))}};function Gh(){const e=J(""),t=Ma(e,300),i=J(!1),s=J({tasks:[],documents:[]});Ce(t,async n=>{if(!n||n.length<2){s.value={tasks:[],documents:[]};return}i.value=!0;try{const[o,a]=await Promise.all([$fetch("/api/tasks",{query:{search:n}}),$fetch("/api/documents",{query:{search:n}})]);s.value={tasks:o.data.slice(0,5),documents:a.data.slice(0,5)}}catch{s.value={tasks:[],documents:[]}}finally{i.value=!1}});function r(){e.value="",s.value={tasks:[],documents:[]}}return{searchTerm:e,loading:i,results:s,reset:r}}const Xh=ze({__name:"DashboardSearch",setup(e){const t=Ra(),i=Ta(),{searchTerm:s,loading:r,results:n,reset:o}=Gh(),a={todo:"i-lucide-circle",in_progress:"i-lucide-clock",done:"i-lucide-check-circle",blocked:"i-lucide-alert-circle"},h={1:"Low",2:"Medium",3:"High"},l=[{label:"Dashboard",icon:"i-lucide-layout-dashboard",to:"/dashboard",kbds:["G","D"]},{label:"Tasks",icon:"i-lucide-check-square",to:"/tasks",kbds:["G","T"]},{label:"Docs",icon:"i-lucide-file-text",to:"/docs",kbds:["G","O"]},{label:"Settings",icon:"i-lucide-settings",to:"/settings",kbds:["G","S"]}],f=[{label:"Create new document",icon:"i-lucide-file-plus",onSelect:()=>{t.push("/docs"),i.add({title:"Create a document",description:"Right-click in the file tree to create a new file",icon:"i-lucide-info"}),o()}},{label:"Add new task",icon:"i-lucide-plus-square",onSelect:()=>{t.push("/tasks?action=new"),o()}}],u=te(()=>{const d=[];return n.value.tasks.length&&d.push({id:"tasks",label:"Tasks",ignoreFilter:!0,items:n.value.tasks.map(c=>({label:c.title,icon:a[c.status]||"i-lucide-circle",suffix:c.project?.name||h[c.priority]||"",onSelect:()=>{t.push(`/tasks?selected=${c.id}`),o()}}))}),n.value.documents.length&&d.push({id:"documents",label:"Documents",ignoreFilter:!0,items:n.value.documents.map(c=>({label:c.title,icon:"i-lucide-file-text",suffix:c.path,onSelect:()=>{t.push(`/docs?path=${encodeURIComponent(c.path)}`),o()}}))}),d.push({id:"navigation",label:"Navigation",items:l}),d.push({id:"actions",label:"Actions",items:f,postFilter:(c,p)=>{if(!c)return p;const _=c.toLowerCase();return["new","create","add"].some(S=>_.includes(S))?p:[]}}),d});return(d,c)=>{const p=Yh;return k(),z(p,{"search-term":v(s),"onUpdate:searchTerm":c[0]||(c[0]=_=>mi(s)?s.value=_:null),groups:v(u),loading:v(r),placeholder:"Search tasks, docs, or type a command...",fuse:{resultLimit:10}},null,8,["search-term","groups","loading"])}}}),Jh=Object.assign(Xh,{__name:"SearchDashboardSearch"});var mo=Object.defineProperty,Zh=Object.getOwnPropertyDescriptor,Qh=(e,t)=>{for(var i in t)mo(e,i,{get:t[i],enumerable:!0})},ce=(e,t,i,s)=>{for(var r=s>1?void 0:s?Zh(t,i):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(r=(s?o(t,i,r):o(r))||r);return s&&r&&mo(t,i,r),r},N=(e,t)=>(i,s)=>t(i,s,e),Jr="Terminal input",Fs={get:()=>Jr,set:e=>Jr=e},Zr="Too much output to announce, navigate to rows manually to read",Hs={get:()=>Zr,set:e=>Zr=e};function ec(e){return e.replace(/\r?\n/g,"\r")}function tc(e,t){return t?"\x1B[200~"+e+"\x1B[201~":e}function ic(e,t){e.clipboardData&&e.clipboardData.setData("text/plain",t.selectionText),e.preventDefault()}function sc(e,t,i,s){if(e.stopPropagation(),e.clipboardData){let r=e.clipboardData.getData("text/plain");So(r,t,i,s)}}function So(e,t,i,s){e=ec(e),e=tc(e,i.decPrivateModes.bracketedPasteMode&&s.rawOptions.ignoreBracketedPasteMode!==!0),i.triggerDataEvent(e,!0),t.value=""}function bo(e,t,i){let s=i.getBoundingClientRect(),r=e.clientX-s.left-10,n=e.clientY-s.top-10;t.style.width="20px",t.style.height="20px",t.style.left=`${r}px`,t.style.top=`${n}px`,t.style.zIndex="1000",t.focus()}function Qr(e,t,i,s,r){bo(e,t,i),r&&s.rightClickSelect(e),t.value=s.selectionText,t.select()}function xt(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function ls(e,t=0,i=e.length){let s="";for(let r=t;r<i;++r){let n=e[r];n>65535?(n-=65536,s+=String.fromCharCode((n>>10)+55296)+String.fromCharCode(n%1024+56320)):s+=String.fromCharCode(n)}return s}var rc=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let i=e.length;if(!i)return 0;let s=0,r=0;if(this._interim){let n=e.charCodeAt(r++);56320<=n&&n<=57343?t[s++]=(this._interim-55296)*1024+n-56320+65536:(t[s++]=this._interim,t[s++]=n),this._interim=0}for(let n=r;n<i;++n){let o=e.charCodeAt(n);if(55296<=o&&o<=56319){if(++n>=i)return this._interim=o,s;let a=e.charCodeAt(n);56320<=a&&a<=57343?t[s++]=(o-55296)*1024+a-56320+65536:(t[s++]=o,t[s++]=a);continue}o!==65279&&(t[s++]=o)}return s}},nc=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let i=e.length;if(!i)return 0;let s=0,r,n,o,a,h=0,l=0;if(this.interim[0]){let d=!1,c=this.interim[0];c&=(c&224)===192?31:(c&240)===224?15:7;let p=0,_;for(;(_=this.interim[++p]&63)&&p<4;)c<<=6,c|=_;let S=(this.interim[0]&224)===192?2:(this.interim[0]&240)===224?3:4,w=S-p;for(;l<w;){if(l>=i)return 0;if(_=e[l++],(_&192)!==128){l--,d=!0;break}else this.interim[p++]=_,c<<=6,c|=_&63}d||(S===2?c<128?l--:t[s++]=c:S===3?c<2048||c>=55296&&c<=57343||c===65279||(t[s++]=c):c<65536||c>1114111||(t[s++]=c)),this.interim.fill(0)}let f=i-4,u=l;for(;u<i;){for(;u<f&&!((r=e[u])&128)&&!((n=e[u+1])&128)&&!((o=e[u+2])&128)&&!((a=e[u+3])&128);)t[s++]=r,t[s++]=n,t[s++]=o,t[s++]=a,u+=4;if(r=e[u++],r<128)t[s++]=r;else if((r&224)===192){if(u>=i)return this.interim[0]=r,s;if(n=e[u++],(n&192)!==128){u--;continue}if(h=(r&31)<<6|n&63,h<128){u--;continue}t[s++]=h}else if((r&240)===224){if(u>=i)return this.interim[0]=r,s;if(n=e[u++],(n&192)!==128){u--;continue}if(u>=i)return this.interim[0]=r,this.interim[1]=n,s;if(o=e[u++],(o&192)!==128){u--;continue}if(h=(r&15)<<12|(n&63)<<6|o&63,h<2048||h>=55296&&h<=57343||h===65279)continue;t[s++]=h}else if((r&248)===240){if(u>=i)return this.interim[0]=r,s;if(n=e[u++],(n&192)!==128){u--;continue}if(u>=i)return this.interim[0]=r,this.interim[1]=n,s;if(o=e[u++],(o&192)!==128){u--;continue}if(u>=i)return this.interim[0]=r,this.interim[1]=n,this.interim[2]=o,s;if(a=e[u++],(a&192)!==128){u--;continue}if(h=(r&7)<<18|(n&63)<<12|(o&63)<<6|a&63,h<65536||h>1114111)continue;t[s++]=h}}return s}},yo="",Bt=" ",ki=class wo{constructor(){this.fg=0,this.bg=0,this.extended=new Qi}static toColorRGB(t){return[t>>>16&255,t>>>8&255,t&255]}static fromColorRGB(t){return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255}clone(){let t=new wo;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},Qi=class Co{constructor(t=0,i=0){this._ext=0,this._urlId=0,this._ext=t,this._urlId=i}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(t){this._ext=t}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(t){this._ext&=-469762049,this._ext|=t<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(t){this._ext&=-67108864,this._ext|=t&67108863}get urlId(){return this._urlId}set urlId(t){this._urlId=t}get underlineVariantOffset(){let t=(this._ext&3758096384)>>29;return t<0?t^4294967288:t}set underlineVariantOffset(t){this._ext&=536870911,this._ext|=t<<29&3758096384}clone(){return new Co(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},Xe=class ko extends ki{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new Qi,this.combinedData=""}static fromCharData(t){let i=new ko;return i.setFromCharData(t),i}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?xt(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(t){this.fg=t[0],this.bg=0;let i=!1;if(t[1].length>2)i=!0;else if(t[1].length===2){let s=t[1].charCodeAt(0);if(55296<=s&&s<=56319){let r=t[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(s-55296)*1024+r-56320+65536|t[2]<<22:i=!0}else i=!0}else this.content=t[1].charCodeAt(0)|t[2]<<22;i&&(this.combinedData=t[1],this.content=2097152|t[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},en="di$target",$s="di$dependencies",ms=new Map;function oc(e){return e[$s]||[]}function we(e){if(ms.has(e))return ms.get(e);let t=function(i,s,r){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");ac(t,i,r)};return t._id=e,ms.set(e,t),t}function ac(e,t,i){t[en]===t?t[$s].push({id:e,index:i}):(t[$s]=[{id:e,index:i}],t[en]=t)}var Te=we("BufferService"),xo=we("CoreMouseService"),qt=we("CoreService"),lc=we("CharsetService"),Rr=we("InstantiationService"),Eo=we("LogService"),Ae=we("OptionsService"),Lo=we("OscLinkService"),hc=we("UnicodeService"),xi=we("DecorationService"),Ws=class{constructor(e,t,i){this._bufferService=e,this._optionsService=t,this._oscLinkService=i}provideLinks(e,t){let i=this._bufferService.buffer.lines.get(e-1);if(!i){t(void 0);return}let s=[],r=this._optionsService.rawOptions.linkHandler,n=new Xe,o=i.getTrimmedLength(),a=-1,h=-1,l=!1;for(let f=0;f<o;f++)if(!(h===-1&&!i.hasContent(f))){if(i.loadCell(f,n),n.hasExtendedAttrs()&&n.extended.urlId)if(h===-1){h=f,a=n.extended.urlId;continue}else l=n.extended.urlId!==a;else h!==-1&&(l=!0);if(l||h!==-1&&f===o-1){let u=this._oscLinkService.getLinkData(a)?.uri;if(u){let d={start:{x:h+1,y:e},end:{x:f+(!l&&f===o-1?1:0),y:e}},c=!1;if(!r?.allowNonHttpProtocols)try{let p=new URL(u);["http:","https:"].includes(p.protocol)||(c=!0)}catch{c=!0}c||s.push({text:u,range:d,activate:(p,_)=>r?r.activate(p,_,d):cc(p,_),hover:(p,_)=>r?.hover?.(p,_,d),leave:(p,_)=>r?.leave?.(p,_,d)})}l=!1,n.hasExtendedAttrs()&&n.extended.urlId?(h=f,a=n.extended.urlId):(h=-1,a=-1)}}t(s)}};Ws=ce([N(0,Te),N(1,Ae),N(2,Lo)],Ws);function cc(e,t){if(confirm(`Do you want to navigate to ${t}?
|
|
1
|
+
import{a as ze,Q as z,R as k,S as T,a4 as Y,V as G,C as v,a3 as ht,aR as Vn,aQ as da,e as J,a_ as gt,a1 as wi,aP as fa,$ as jn,c as te,y as wr,c1 as _a,T as O,a0 as Xt,bm as Yn,bG as pa,aJ as gi,c2 as ga,bf as Cr,a7 as $r,bU as Gn,bB as ji,a9 as $,q as Ci,G as j,ai as ke,aM as va,a5 as ma,f as Ce,k as kt,I as Xn,aB as Sa,ao as ei,O as Yi,P as ba,aC as ot,aT as Mt,L as ns,N as $t,am as Ne,W as Jt,aU as Jn,b8 as os,ab as ie,U as H,aj as Ge,b9 as Gi,aN as Et,aO as Lt,aI as zt,aK as ya,aL as wa,b7 as Ca,ax as kr,_ as De,Y as Oe,aa as at,ae as Me,au as Di,ak as ka,ap as Ni,ba as zi,bb as Yt,aq as Xi,ar as vi,bg as Zn,X as xa,b as dt,c3 as Ea,aG as Qn,bV as La,aW as Ba,M as Da,c4 as Ma,an as Ra,ag as Ta,al as mi,a2 as eo,bE as fs,c5 as _s,c6 as Aa,ac as Pa,n as Ia}from"./njnzCNrH.js";import{c as Zt,g as Oa,h as Na}from"./BHn8tRjg.js";import{u as to,a as za,b as Fa,_ as Ha,p as $a}from"./C-Ygk9x5.js";import{_ as xr,u as Wa}from"./BjnQ1pI1.js";import{_ as io}from"./Cve4psva.js";import{_ as qa,c as Ka}from"./B5SnZL2l.js";import{b as Wr,A as Ua,c as Va,d as qr}from"./C21BjagS.js";import{u as ja}from"./ImPsUDiH.js";import{u as so}from"./BIo-9u_O.js";import{u as ro}from"./C6Y-ieo6.js";import{_ as Ya}from"./yJ9vRvHj.js";import{H as Ga,P as Xa}from"./CXTrUfQ5.js";import{_ as Ja}from"./DMb_1D81.js";import{_ as Za}from"./DqzomZoo.js";import{_ as Qa}from"./CO3hceDE.js";import{_ as Er}from"./GYf-vnR6.js";import{_ as el}from"./BlsIfvSf.js";import{i as tl,L as il,a as sl,b as rl,c as nl,d as ol,e as al,f as ll,_ as hl}from"./Dbfwn2zk.js";import{g as cl}from"./MWUW1sIF.js";import{_ as ul}from"./SfaNtyKS.js";import{_ as dl}from"./C7qhmmZh.js";import{u as fl,_ as _l,a as pl,b as gl}from"./JReYPlwF.js";import{u as Lr}from"./2QHXgMyi.js";import{s as vl}from"./DmcMCO8x.js";import{u as ml}from"./Bkc1Hpcf.js";import{u as Sl}from"./it8syoZI.js";import"./vES4kgx7.js";import"./D9aYkNhQ.js";import"./DcbbfwCe.js";import"./BqTdsCnW.js";import"./B9zgEO8N.js";import"./DLUvsixu.js";import"./CrmE-JGu.js";import"./BCCYopTB.js";import"./Bwn-CRYH.js";import"./BZBNJD7U.js";import"./BYtVdUIW.js";import"./BvstjGHC.js";import"./iBaivqi8.js";import"./dB7G4iIC.js";import"./D2kQkOaG.js";import"./D7pKT3IW.js";import"./CClsKJ9A.js";import"./C24so3m7.js";import"./88opOQSr.js";import"./iik6CYzq.js";import"./Buf1PAiO.js";var bl=ze({__name:"ListboxGroupLabel",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(e){const t=e,i=tl({id:""});return(s,r)=>(k(),z(v(ht),G(t,{id:v(i).id}),{default:T(()=>[Y(s.$slots,"default")]),_:3},16,["id"]))}}),yl=bl;const[Wt,wl]=Vn(["NavigationMenuRoot","NavigationMenuSub"],"NavigationMenuContext");var Cl=ze({__name:"NavigationMenuRoot",props:{modelValue:{type:String,required:!1,default:void 0},defaultValue:{type:String,required:!1},dir:{type:String,required:!1},orientation:{type:String,required:!1,default:"horizontal"},delayDuration:{type:Number,required:!1,default:200},skipDelayDuration:{type:Number,required:!1,default:300},disableClickTrigger:{type:Boolean,required:!1,default:!1},disableHoverTrigger:{type:Boolean,required:!1,default:!1},disablePointerLeaveClose:{type:Boolean,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"nav"}},emits:["update:modelValue"],setup(e,{emit:t}){const i=e,r=da(i,"modelValue",t,{defaultValue:i.defaultValue??"",passive:i.modelValue===void 0}),n=J(""),{forwardRef:o,currentElement:a}=gt(),h=J(),l=J(),f=J(),{getItems:u,CollectionSlot:d}=wi({key:"NavigationMenu",isProvider:!0}),{delayDuration:c,skipDelayDuration:p,dir:_,disableClickTrigger:S,disableHoverTrigger:w,unmountOnHide:y}=fa(i),x=ja(_),g=jn(!1,p),L=te(()=>r.value!==""||g.value?150:c.value),B=_a(E=>{typeof E=="string"&&(n.value=r.value,r.value=E)},L);return wr(()=>{if(!r.value)return;const E=u().map(W=>W.ref);f.value=E.find(W=>W.id.includes(r.value))}),wl({isRootMenu:!0,modelValue:r,previousValue:n,baseId:so(void 0,"reka-navigation-menu"),disableClickTrigger:S,disableHoverTrigger:w,dir:x,unmountOnHide:y,orientation:i.orientation,rootNavigationMenu:a,indicatorTrack:h,activeTrigger:f,onIndicatorTrackChange:E=>{h.value=E},viewport:l,onViewportChange:E=>{l.value=E},onTriggerEnter:E=>{B(E)},onTriggerLeave:()=>{g.value=!0,B("")},onContentEnter:()=>{B()},onContentLeave:()=>{i.disablePointerLeaveClose||B("")},onItemSelect:E=>{n.value=r.value,r.value=E},onItemDismiss:()=>{n.value=r.value,r.value=""}}),(E,W)=>(k(),z(v(d),null,{default:T(()=>[O(v(ht),{ref:v(o),"aria-label":"Main",as:E.as,"as-child":E.asChild,"data-orientation":E.orientation,dir:v(x),"data-reka-navigation-menu":""},{default:T(()=>[Y(E.$slots,"default",{modelValue:v(r)})]),_:3},8,["as","as-child","data-orientation","dir"])]),_:3}))}}),kl=Cl;function as(e){return e?"open":"closed"}function no(e,t){return`${e}-trigger-${t}`}function Br(e,t){return`${e}-content-${t}`}const xl="navigationMenu.linkSelect",Fi="navigationMenu.rootContentDismiss";function Rs(e){const t=[],i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const r=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||r?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;i.nextNode();)t.push(i.currentNode);return t}function oo(e){const t=Xt();return e.some(i=>i===t?!0:(i.focus(),Xt()!==t))}function El(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const i=t.dataset.tabindex;t.setAttribute("tabindex",i)})}}function ao(e){return t=>t.pointerType==="mouse"?e(t):void 0}const[Dr,Ll]=Vn("NavigationMenuItem");var Bl=ze({__name:"NavigationMenuItem",props:{value:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"li"}},setup(e){const t=e;gt();const{getItems:i}=wi({key:"NavigationMenu"}),s=Wt(),r=so(t.value),n=J(),o=J(),a=Br(s.baseId,r);let h=()=>({});const l=J(!1);async function f(p="start"){const _=document.getElementById(a);if(_){h();const S=Rs(_);S.length&&oo(p==="start"?S:S.reverse())}}function u(){const p=document.getElementById(a);if(p){const _=Rs(p);_.length&&(h=El(_))}}Ll({value:r,contentId:a,triggerRef:n,focusProxyRef:o,wasEscapeCloseRef:l,onEntryKeyDown:f,onFocusProxyEnter:f,onContentFocusOutside:u,onRootContentClose:u});function d(){s.onItemDismiss(),n.value?.focus()}function c(p){const _=Xt();if(p.keyCode===32||p.key==="Enter")if(s.modelValue.value===r){d(),p.preventDefault();return}else{p.target.click(),p.preventDefault();return}const S=i().filter(y=>y.ref.parentElement?.hasAttribute("data-menu-item")).map(y=>y.ref);if(!S.includes(_))return;const w=ro(p,_,void 0,{itemsArray:S,loop:!1});w&&w?.focus(),p.preventDefault(),p.stopPropagation()}return(p,_)=>(k(),z(v(ht),{"as-child":p.asChild,as:p.as,"data-menu-item":"",onKeydown:Yn(c,["up","down","left","right","home","end","space"])},{default:T(()=>[Y(p.$slots,"default")]),_:3},8,["as-child","as"]))}}),Dl=Bl,Ml=ze({__name:"NavigationMenuContentImpl",props:{disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside"],setup(e,{emit:t}){const i=e,s=t,{getItems:r}=wi({key:"NavigationMenu"}),{forwardRef:n,currentElement:o}=gt(),a=Wt(),h=Dr(),l=no(a.baseId,h.value),f=Br(a.baseId,h.value),u=J(null),d=te(()=>{const y=r().map(W=>W.ref.id.split("trigger-")[1]);a.dir.value==="rtl"&&y.reverse();const x=y.indexOf(a.modelValue.value),g=y.indexOf(a.previousValue.value),L=h.value===a.modelValue.value,B=g===y.indexOf(h.value);if(!L&&!B)return u.value;const E=(()=>{if(x!==g){if(L&&g!==-1)return x>g?"from-end":"from-start";if(B&&x!==-1)return x>g?"to-start":"to-end"}return null})();return u.value=E,E});function c(y){if(s("focusOutside",y),s("interactOutside",y),y.detail.originalEvent.target.hasAttribute("data-navigation-menu-trigger")&&y.preventDefault(),!y.defaultPrevented){h.onContentFocusOutside();const g=y.target;a.rootNavigationMenu?.value?.contains(g)&&y.preventDefault()}}function p(y){if(s("pointerDownOutside",y),!y.defaultPrevented){const x=y.target,g=r().some(B=>B.ref.contains(x)),L=a.isRootMenu&&a.viewport.value?.contains(x);(g||L||!a.isRootMenu)&&y.preventDefault()}}wr(y=>{const x=o.value;if(a.isRootMenu&&x){const g=()=>{a.onItemDismiss(),h.onRootContentClose(),x.contains(Xt())&&h.triggerRef.value?.focus()};x.addEventListener(Fi,g),y(()=>x.removeEventListener(Fi,g))}});function _(y){s("escapeKeyDown",y),y.defaultPrevented||(a.onItemDismiss(),h.triggerRef?.value?.focus(),h.wasEscapeCloseRef.value=!0)}function S(y){if(y.target.closest("[data-reka-navigation-menu]")!==a.rootNavigationMenu.value)return;const x=y.altKey||y.ctrlKey||y.metaKey,g=y.key==="Tab"&&!x,L=Rs(y.currentTarget);if(g){const E=Xt(),W=L.findIndex(V=>V===E),Z=y.shiftKey?L.slice(0,W).reverse():L.slice(W+1,L.length);if(oo(Z))y.preventDefault();else{h.focusProxyRef.value?.focus();return}}ro(y,Xt(),void 0,{itemsArray:L,loop:!1,enableIgnoredElement:!0})?.focus()}function w(){const y=new Event(Fi,{bubbles:!0,cancelable:!0});o.value?.dispatchEvent(y)}return(y,x)=>(k(),z(v(pa),G({id:v(f),ref:v(n),"aria-labelledby":v(l),"data-motion":d.value,"data-state":v(as)(v(a).modelValue.value===v(h).value),"data-orientation":v(a).orientation},i,{onKeydown:S,onEscapeKeyDown:_,onPointerDownOutside:p,onFocusOutside:c,onDismiss:w}),{default:T(()=>[Y(y.$slots,"default")]),_:3},16,["id","aria-labelledby","data-motion","data-state","data-orientation"]))}}),Rl=Ml,Tl=ze({inheritAttrs:!1,__name:"NavigationMenuContent",props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside"],setup(e,{emit:t}){const i=e,s=t,r=gi(ga(i,"forceMount"),s),{forwardRef:n}=gt(),o=Wt(),a=Dr(),h=te(()=>a.value===o.modelValue.value),l=te(()=>o.viewport.value&&!o.modelValue.value&&o.previousValue.value?o.previousValue.value===a.value:!1);return(f,u)=>(k(),z(Gn,{to:v($r)&&v(o).viewport.value?v(o).viewport.value:"body",disabled:v($r)&&v(o).viewport.value?!v(o).viewport.value:!0},[O(v(Cr),{present:f.forceMount||h.value||l.value,"force-mount":!v(o).unmountOnHide.value},{default:T(({present:d})=>[O(Rl,G({ref:v(n),"data-state":v(as)(h.value),style:{pointerEvents:!h.value&&v(o).isRootMenu?"none":void 0}},{...f.$attrs,...v(r)},{hidden:!d,onPointerenter:u[0]||(u[0]=c=>v(o).onContentEnter(v(a).value)),onPointerleave:u[1]||(u[1]=c=>v(ao)(()=>v(o).onContentLeave())(c)),onPointerDownOutside:u[2]||(u[2]=c=>s("pointerDownOutside",c)),onFocusOutside:u[3]||(u[3]=c=>s("focusOutside",c)),onInteractOutside:u[4]||(u[4]=c=>s("interactOutside",c))}),{default:T(()=>[Y(f.$slots,"default")]),_:2},1040,["data-state","style","hidden"])]),_:3},8,["present","force-mount"])],8,["to","disabled"]))}}),Al=Tl,Pl=ze({inheritAttrs:!1,__name:"NavigationMenuIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:i}=gt(),s=Wt(),r=J(),n=te(()=>s.orientation==="horizontal"),o=te(()=>!!s.modelValue.value),{activeTrigger:a}=s;function h(){a.value&&(r.value={size:n.value?a.value.offsetWidth:a.value.offsetHeight,position:n.value?a.value.offsetLeft:a.value.offsetTop})}return wr(()=>{s.modelValue.value&&h()}),ji(a,h),ji(s.indicatorTrack,h),(l,f)=>v(s).indicatorTrack.value?(k(),z(Gn,{key:0,to:v(s).indicatorTrack.value},[O(v(Cr),{present:l.forceMount||o.value},{default:T(()=>[O(v(ht),G({ref:v(i),"aria-hidden":"true","data-state":o.value?"visible":"hidden","data-orientation":v(s).orientation,"as-child":t.asChild,as:l.as,style:{...r.value?{"--reka-navigation-menu-indicator-size":`${r.value.size}px`,"--reka-navigation-menu-indicator-position":`${r.value.position}px`}:{}}},l.$attrs),{default:T(()=>[Y(l.$slots,"default")]),_:3},16,["data-state","data-orientation","as-child","as","style"])]),_:3},8,["present"])],8,["to"])):$("v-if",!0)}}),Il=Pl,Ol=ze({__name:"NavigationMenuLink",props:{active:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"a"}},emits:["select"],setup(e,{emit:t}){const i=e,s=t,{CollectionItem:r}=wi({key:"NavigationMenu"});gt();async function n(o){const a=new CustomEvent(xl,{bubbles:!0,cancelable:!0,detail:{originalEvent:o}});if(s("select",a),!a.defaultPrevented&&!o.metaKey){const h=new CustomEvent(Fi,{bubbles:!0,cancelable:!0});o.target?.dispatchEvent(h)}}return(o,a)=>(k(),z(v(r),null,{default:T(()=>[O(v(ht),{as:o.as,"data-active":o.active?"":void 0,"aria-current":o.active?"page":void 0,"as-child":i.asChild,onClick:n},{default:T(()=>[Y(o.$slots,"default")]),_:3},8,["as","data-active","aria-current","as-child"])]),_:3}))}}),ps=Ol,Nl=ze({inheritAttrs:!1,__name:"NavigationMenuList",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"ul"}},setup(e){const t=e,i=Wt(),{forwardRef:s,currentElement:r}=gt();return Ci(()=>{i.onIndicatorTrackChange(r.value)}),(n,o)=>(k(),z(v(ht),{ref:v(s),style:{position:"relative"}},{default:T(()=>[O(v(ht),G(n.$attrs,{"as-child":t.asChild,as:n.as,"data-orientation":v(i).orientation}),{default:T(()=>[Y(n.$slots,"default")]),_:3},16,["as-child","as","data-orientation"])]),_:3},512))}}),zl=Nl;const Fl=["aria-owns"];var Hl=ze({inheritAttrs:!1,__name:"NavigationMenuTrigger",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,i=Wt(),s=Dr(),{CollectionItem:r}=wi({key:"NavigationMenu"}),{forwardRef:n,currentElement:o}=gt(),a=J(""),h=J(""),l=jn(!1,300),f=J(!1),u=te(()=>s.value===i.modelValue.value);Ci(()=>{s.triggerRef=o,a.value=no(i.baseId,s.value),h.value=Br(i.baseId,s.value)});function d(){i.disableHoverTrigger.value||(f.value=!1,s.wasEscapeCloseRef.value=!1)}function c(x){if(!i.disableHoverTrigger.value&&x.pointerType==="mouse"){if(t.disabled||f.value||s.wasEscapeCloseRef.value||l.value)return;i.onTriggerEnter(s.value),l.value=!0}}function p(x){if(!i.disableHoverTrigger.value&&x.pointerType==="mouse"){if(t.disabled)return;i.onTriggerLeave(),l.value=!1}}function _(x){(!("pointerType"in x)||x.pointerType==="mouse")&&i.disableClickTrigger.value||l.value||(u.value?i.onItemSelect(""):i.onItemSelect(s.value),f.value=u.value)}function S(x){const L={horizontal:"ArrowDown",vertical:i.dir.value==="rtl"?"ArrowLeft":"ArrowRight"}[i.orientation];u.value&&x.key===L&&(s.onEntryKeyDown(),x.preventDefault(),x.stopPropagation())}function w(x){s.focusProxyRef.value=ma(x)}function y(x){const g=document.getElementById(s.contentId),L=x.relatedTarget,B=L===o.value,E=g?.contains(L);(B||!E)&&s.onFocusProxyEnter(B?"start":"end")}return(x,g)=>(k(),j(ke,null,[O(v(r),null,{default:T(()=>[O(v(ht),G({id:a.value,ref:v(n),disabled:x.disabled,"data-disabled":x.disabled?"":void 0,"data-state":v(as)(u.value),"data-navigation-menu-trigger":"","aria-expanded":u.value,"aria-controls":h.value,"as-child":t.asChild,as:x.as},x.$attrs,{onPointerenter:d,onPointermove:c,onPointerleave:p,onClick:_,onKeydown:S}),{default:T(()=>[Y(x.$slots,"default")]),_:3},16,["id","disabled","data-disabled","data-state","aria-expanded","aria-controls","as-child","as"])]),_:3}),u.value?(k(),j(ke,{key:0},[O(v(va),{ref:w,"aria-hidden":"true",tabindex:0,onFocus:y}),v(i).viewport?(k(),j("span",{key:0,"aria-owns":h.value},null,8,Fl)):$("v-if",!0)],64)):$("v-if",!0)],64))}}),$l=Hl,Wl=ze({inheritAttrs:!1,__name:"NavigationMenuViewport",props:{forceMount:{type:Boolean,required:!1},align:{type:String,required:!1,default:"center"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:i,currentElement:s}=gt(),r=Wt(),{activeTrigger:n,rootNavigationMenu:o,modelValue:a}=r,h=J(),l=J(),f=te(()=>!!r.modelValue.value);Ce(s,()=>{r.onViewportChange(s.value)});const u=J();Ce([a,f],()=>{kt(()=>{s.value&&requestAnimationFrame(()=>{const c=s.value?.querySelector("[data-state=open]");u.value=c})})},{immediate:!0});function d(){if(u.value&&n.value&&o.value){const c=document.documentElement.offsetWidth,p=document.documentElement.offsetHeight,_=o.value.getBoundingClientRect(),S=n.value.getBoundingClientRect(),{offsetWidth:w,offsetHeight:y}=u.value,x=S.left-_.left,g=S.top-_.top;let L=null,B=null;switch(t.align){case"start":L=x,B=g;break;case"end":L=x-w+S.width,B=g-y+S.height;break;default:L=x-w/2+S.width/2,B=g-y/2+S.height/2}const E=10;L+_.left<E&&(L=E-_.left);const W=L+_.left+w;W>c-E&&(L-=W-c+E,L<E-_.left&&(L=E-_.left)),B+_.top<E&&(B=E-_.top);const U=B+_.top+y;U>p-E&&(B-=U-p+E,B<E-_.top&&(B=E-_.top)),L=Math.round(L),B=Math.round(B),l.value={left:L,top:B}}}return ji(u,()=>{u.value&&(h.value={width:u.value.offsetWidth,height:u.value.offsetHeight},d())}),ji([globalThis.document?.body,o],()=>{d()}),(c,p)=>(k(),z(v(Cr),{present:c.forceMount||f.value,"force-mount":!v(r).unmountOnHide.value,onAfterLeave:p[2]||(p[2]=()=>{h.value=void 0,l.value=void 0})},{default:T(({present:_})=>[O(v(ht),G(c.$attrs,{ref:v(i),as:c.as,"as-child":c.asChild,"data-state":v(as)(f.value),"data-orientation":v(r).orientation,style:{pointerEvents:!f.value&&v(r).isRootMenu?"none":void 0,"--reka-navigation-menu-viewport-width":h.value?`${h.value?.width}px`:void 0,"--reka-navigation-menu-viewport-height":h.value?`${h.value?.height}px`:void 0,"--reka-navigation-menu-viewport-left":l.value?`${l.value?.left}px`:void 0,"--reka-navigation-menu-viewport-top":l.value?`${l.value?.top}px`:void 0},hidden:!_,onPointerenter:p[0]||(p[0]=S=>v(r).onContentEnter(v(r).modelValue.value)),onPointerleave:p[1]||(p[1]=S=>v(ao)(()=>v(r).onContentLeave())(S))}),{default:T(()=>[Y(c.$slots,"default")]),_:2},1040,["as","as-child","data-state","data-orientation","style","hidden"])]),_:3},8,["present","force-mount"]))}}),ql=Wl;function Ts(e,t){const s=Xn().hook(e,t);Sa(s)}const Kl={slots:{base:"",label:"",trailing:"hidden lg:flex items-center gap-0.5 ms-auto"},variants:{collapsed:{true:{label:"hidden",trailing:"lg:hidden"}}}},Ul=Object.assign({inheritAttrs:!1},{__name:"UDashboardSearchButton",props:{icon:{type:null,required:!1},label:{type:String,required:!1},color:{type:null,required:!1,default:"neutral"},variant:{type:null,required:!1},collapsed:{type:Boolean,required:!1,default:!1},tooltip:{type:[Boolean,Object],required:!1,default:!1},kbds:{type:Array,required:!1,default:()=>["meta","k"]},ui:{type:void 0,required:!1},class:{type:null,required:!1},activeColor:{type:null,required:!1},activeVariant:{type:null,required:!1},size:{type:null,required:!1},square:{type:Boolean,required:!1},block:{type:Boolean,required:!1},loadingAuto:{type:Boolean,required:!1},onClick:{type:[Function,Array],required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1},as:{type:null,required:!1},type:{type:null,required:!1},disabled:{type:Boolean,required:!1},exactActiveClass:{type:String,required:!1},viewTransition:{type:Boolean,required:!1}},setup(e){const t=e,i=ei(),[s,r]=Zt(),n=()=>Gi(i,["trailing"]),o=Yi(ba(t,"icon","label","variant","collapsed","tooltip","kbds","class","ui")),a=ot(()=>Mt(typeof t.tooltip=="boolean"?{}:t.tooltip,{delayDuration:0,content:{side:"right"}})),{t:h}=ns(),l=$t(),{toggleSearch:f}=to({toggleSearch:()=>{}}),u=te(()=>Ne({extend:Ne(Kl),...l.ui?.dashboardSearchButton||{}})({collapsed:t.collapsed}));return(d,c)=>(k(),j(ke,null,[O(v(s),null,{default:T(()=>[O(Jt,G({icon:e.icon||v(l).ui.icons.search,label:e.label||v(h)("dashboardSearchButton.label"),variant:e.variant||(e.collapsed?"ghost":"outline")},{...v(o),...e.collapsed?{square:!0,"aria-label":e.label||v(h)("dashboardSearchButton.label")}:{},...d.$attrs},{class:u.value.base({class:[t.ui?.base,t.class]}),ui:v(Jn)(u.value,t.ui),onClick:v(f)}),os({trailing:T(({ui:p})=>[ie("div",{"data-slot":"trailing",class:H(u.value.trailing({class:t.ui?.trailing}))},[Y(d.$slots,"trailing",{ui:p},()=>[e.kbds?.length?(k(!0),j(ke,{key:0},Ge(e.kbds,(_,S)=>(k(),z(xr,G({key:S,variant:"subtle"},{ref_for:!0},typeof _=="string"?{value:_}:_),null,16))),128)):$("",!0)])],2)]),_:2},[Ge(n(),(p,_)=>({name:_,fn:T(S=>[Y(d.$slots,_,Et(Lt(S)))])}))]),1040,["icon","label","variant","class","ui","onClick"])]),_:3}),e.collapsed&&e.tooltip?(k(),z(io,G({key:0,text:e.label||v(h)("dashboardSearchButton.label")},a.value),{default:T(()=>[O(v(r))]),_:1},16,["text"])):(k(),z(v(r),{key:1}))],64))}}),Vl={slots:{content:"bg-default shadow-lg rounded-md ring ring-default data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-popover-content-transform-origin) focus:outline-none pointer-events-auto",arrow:"fill-default"}},jl={__name:"UPopover",props:{mode:{type:null,required:!1,default:"click"},content:{type:Object,required:!1},arrow:{type:[Boolean,Object],required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},reference:{type:null,required:!1},dismissible:{type:Boolean,required:!1,default:!0},class:{type:null,required:!1},ui:{type:null,required:!1},defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1},modal:{type:Boolean,required:!1},openDelay:{type:Number,required:!1,default:0},closeDelay:{type:Number,required:!1,default:0}},emits:["close:prevent","update:open"],setup(e,{emit:t}){const i=e,s=t,r=ei(),n=$t(),o=i.mode==="hover"?zt(i,"defaultOpen","open","openDelay","closeDelay"):zt(i,"defaultOpen","open","modal"),a=gi(o,s),h=ya(ot(()=>i.portal)),l=ot(()=>Mt(i.content,{side:"bottom",sideOffset:8,collisionPadding:8})),f=te(()=>i.dismissible?{}:["pointerDownOutside","interactOutside","escapeKeyDown"].reduce((_,S)=>(_[S]=w=>{w.preventDefault(),s("close:prevent")},_),{})),u=ot(()=>i.arrow),d=te(()=>Ne({extend:Ne(Vl),...n.ui?.popover||{}})({side:l.value.side})),c=te(()=>i.mode==="hover"?Ga:Xa);return(p,_)=>(k(),z(v(c).Root,Et(Lt(v(a))),{default:T(({open:S,close:w})=>[r.default||e.reference?(k(),z(v(c).Trigger,{key:0,"as-child":"",reference:e.reference,class:H(i.class)},{default:T(()=>[Y(p.$slots,"default",{open:S})]),_:2},1032,["reference","class"])):$("",!0),"Anchor"in c.value&&r.anchor?(k(),z(v(c).Anchor,{key:1,"as-child":""},{default:T(()=>[Y(p.$slots,"anchor",Et(Lt(w?{close:w}:{})))]),_:2},1024)):$("",!0),O(v(c).Portal,Et(Lt(v(h))),{default:T(()=>[O(v(c).Content,G(l.value,{"data-slot":"content",class:d.value.content({class:[!r.default&&i.class,i.ui?.content]})},wa(f.value)),{default:T(()=>[Y(p.$slots,"content",Et(Lt(w?{close:w}:{}))),e.arrow?(k(),z(v(c).Arrow,G({key:0},u.value,{"data-slot":"arrow",class:d.value.arrow({class:i.ui?.arrow})}),null,16,["class"])):$("",!0)]),_:2},1040,["class"])]),_:2},1040)]),_:3},16))}},Yl={slots:{root:"relative flex gap-1.5 [&>div]:min-w-0",list:"isolate min-w-0",label:"w-full flex items-center gap-1.5 font-semibold text-xs/5 text-highlighted px-2.5 py-1.5",item:"min-w-0",link:"group relative w-full flex items-center gap-1.5 font-medium text-sm before:absolute before:z-[-1] before:rounded-md focus:outline-none focus-visible:outline-none dark:focus-visible:outline-none focus-visible:before:ring-inset focus-visible:before:ring-2",linkLeadingIcon:"shrink-0 size-5",linkLeadingAvatar:"shrink-0",linkLeadingAvatarSize:"2xs",linkTrailing:"group ms-auto inline-flex gap-1.5 items-center",linkTrailingBadge:"shrink-0",linkTrailingBadgeSize:"sm",linkTrailingIcon:"size-5 transform shrink-0 group-data-[state=open]:rotate-180 transition-transform duration-200",linkLabel:"truncate",linkLabelExternalIcon:"inline-block size-3 align-top text-dimmed",childList:"isolate",childLabel:"text-xs text-highlighted",childItem:"",childLink:"group relative size-full flex items-start text-start text-sm before:absolute before:z-[-1] before:rounded-md focus:outline-none focus-visible:outline-none dark:focus-visible:outline-none focus-visible:before:ring-inset focus-visible:before:ring-2",childLinkWrapper:"min-w-0",childLinkIcon:"size-5 shrink-0",childLinkLabel:"truncate",childLinkLabelExternalIcon:"inline-block size-3 align-top text-dimmed",childLinkDescription:"text-muted",separator:"px-2 h-px bg-border",viewportWrapper:"absolute top-full left-0 flex w-full",viewport:"relative overflow-hidden bg-default shadow-lg rounded-md ring ring-default h-(--reka-navigation-menu-viewport-height) w-full transition-[width,height,left] duration-200 origin-[top_center] data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] z-[1]",content:"",indicator:"absolute data-[state=visible]:animate-[fade-in_100ms_ease-out] data-[state=hidden]:animate-[fade-out_100ms_ease-in] data-[state=hidden]:opacity-0 bottom-0 z-[2] w-(--reka-navigation-menu-indicator-size) translate-x-(--reka-navigation-menu-indicator-position) flex h-2.5 items-end justify-center overflow-hidden transition-[translate,width] duration-200",arrow:"relative top-[50%] size-2.5 rotate-45 border border-default bg-default z-[1] rounded-xs"},variants:{color:{primary:{link:"focus-visible:before:ring-primary",childLink:"focus-visible:before:ring-primary"},secondary:{link:"focus-visible:before:ring-secondary",childLink:"focus-visible:before:ring-secondary"},success:{link:"focus-visible:before:ring-success",childLink:"focus-visible:before:ring-success"},info:{link:"focus-visible:before:ring-info",childLink:"focus-visible:before:ring-info"},warning:{link:"focus-visible:before:ring-warning",childLink:"focus-visible:before:ring-warning"},error:{link:"focus-visible:before:ring-error",childLink:"focus-visible:before:ring-error"},neutral:{link:"focus-visible:before:ring-inverted",childLink:"focus-visible:before:ring-inverted"}},highlightColor:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},variant:{pill:"",link:""},orientation:{horizontal:{root:"items-center justify-between",list:"flex items-center",item:"py-2",link:"px-2.5 py-1.5 before:inset-x-px before:inset-y-0",childList:"grid p-2",childLink:"px-3 py-2 gap-2 before:inset-x-px before:inset-y-0",childLinkLabel:"font-medium",content:"absolute top-0 left-0 w-full max-h-[70vh] overflow-y-auto"},vertical:{root:"flex-col",link:"flex-row px-2.5 py-1.5 before:inset-y-px before:inset-x-0",childLabel:"px-1.5 py-0.5",childLink:"p-1.5 gap-1.5 before:inset-y-px before:inset-x-0"}},contentOrientation:{horizontal:{viewportWrapper:"justify-center",content:"data-[motion=from-start]:animate-[enter-from-left_200ms_ease] data-[motion=from-end]:animate-[enter-from-right_200ms_ease] data-[motion=to-start]:animate-[exit-to-left_200ms_ease] data-[motion=to-end]:animate-[exit-to-right_200ms_ease]"},vertical:{viewport:"sm:w-(--reka-navigation-menu-viewport-width) left-(--reka-navigation-menu-viewport-left)"}},active:{true:{childLink:"before:bg-elevated text-highlighted",childLinkIcon:"text-default"},false:{link:"text-muted",linkLeadingIcon:"text-dimmed",childLink:["hover:before:bg-elevated/50 text-default hover:text-highlighted","transition-colors before:transition-colors"],childLinkIcon:["text-dimmed group-hover:text-default","transition-colors"]}},disabled:{true:{link:"cursor-not-allowed opacity-75"}},highlight:{true:""},level:{true:""},collapsed:{true:""}},compoundVariants:[{orientation:"horizontal",contentOrientation:"horizontal",class:{childList:"grid-cols-2 gap-2"}},{orientation:"horizontal",contentOrientation:"vertical",class:{childList:"gap-1",content:"w-60"}},{orientation:"vertical",collapsed:!1,class:{childList:"ms-5 border-s border-default",childItem:"ps-1.5 -ms-px",content:"data-[state=open]:animate-[collapsible-down_200ms_ease-out] data-[state=closed]:animate-[collapsible-up_200ms_ease-out] overflow-hidden"}},{orientation:"vertical",collapsed:!0,class:{link:"px-1.5",linkLabel:"hidden",linkTrailing:"hidden",content:"shadow-sm rounded-sm min-h-6 p-1"}},{orientation:"horizontal",highlight:!0,class:{link:["after:absolute after:-bottom-2 after:inset-x-2.5 after:block after:h-px after:rounded-full","after:transition-colors"]}},{orientation:"vertical",highlight:!0,level:!0,class:{link:["after:absolute after:-start-1.5 after:inset-y-0.5 after:block after:w-px after:rounded-full","after:transition-colors"]}},{disabled:!1,active:!1,variant:"pill",class:{link:["hover:text-highlighted hover:before:bg-elevated/50","transition-colors before:transition-colors"],linkLeadingIcon:["group-hover:text-default","transition-colors"]}},{disabled:!1,active:!1,variant:"pill",orientation:"horizontal",class:{link:"data-[state=open]:text-highlighted",linkLeadingIcon:"group-data-[state=open]:text-default"}},{disabled:!1,variant:"pill",highlight:!0,orientation:"horizontal",class:{link:"data-[state=open]:before:bg-elevated/50"}},{disabled:!1,variant:"pill",highlight:!1,active:!1,orientation:"horizontal",class:{link:"data-[state=open]:before:bg-elevated/50"}},{color:"primary",variant:"pill",active:!0,class:{link:"text-primary",linkLeadingIcon:"text-primary group-data-[state=open]:text-primary"}},{color:"secondary",variant:"pill",active:!0,class:{link:"text-secondary",linkLeadingIcon:"text-secondary group-data-[state=open]:text-secondary"}},{color:"success",variant:"pill",active:!0,class:{link:"text-success",linkLeadingIcon:"text-success group-data-[state=open]:text-success"}},{color:"info",variant:"pill",active:!0,class:{link:"text-info",linkLeadingIcon:"text-info group-data-[state=open]:text-info"}},{color:"warning",variant:"pill",active:!0,class:{link:"text-warning",linkLeadingIcon:"text-warning group-data-[state=open]:text-warning"}},{color:"error",variant:"pill",active:!0,class:{link:"text-error",linkLeadingIcon:"text-error group-data-[state=open]:text-error"}},{color:"neutral",variant:"pill",active:!0,class:{link:"text-highlighted",linkLeadingIcon:"text-highlighted group-data-[state=open]:text-highlighted"}},{variant:"pill",active:!0,highlight:!1,class:{link:"before:bg-elevated"}},{variant:"pill",active:!0,highlight:!0,disabled:!1,class:{link:["hover:before:bg-elevated/50","before:transition-colors"]}},{disabled:!1,active:!1,variant:"link",class:{link:["hover:text-highlighted","transition-colors"],linkLeadingIcon:["group-hover:text-default","transition-colors"]}},{disabled:!1,active:!1,variant:"link",orientation:"horizontal",class:{link:"data-[state=open]:text-highlighted",linkLeadingIcon:"group-data-[state=open]:text-default"}},{color:"primary",variant:"link",active:!0,class:{link:"text-primary",linkLeadingIcon:"text-primary group-data-[state=open]:text-primary"}},{color:"secondary",variant:"link",active:!0,class:{link:"text-secondary",linkLeadingIcon:"text-secondary group-data-[state=open]:text-secondary"}},{color:"success",variant:"link",active:!0,class:{link:"text-success",linkLeadingIcon:"text-success group-data-[state=open]:text-success"}},{color:"info",variant:"link",active:!0,class:{link:"text-info",linkLeadingIcon:"text-info group-data-[state=open]:text-info"}},{color:"warning",variant:"link",active:!0,class:{link:"text-warning",linkLeadingIcon:"text-warning group-data-[state=open]:text-warning"}},{color:"error",variant:"link",active:!0,class:{link:"text-error",linkLeadingIcon:"text-error group-data-[state=open]:text-error"}},{color:"neutral",variant:"link",active:!0,class:{link:"text-highlighted",linkLeadingIcon:"text-highlighted group-data-[state=open]:text-highlighted"}},{highlightColor:"primary",highlight:!0,level:!0,active:!0,class:{link:"after:bg-primary"}},{highlightColor:"secondary",highlight:!0,level:!0,active:!0,class:{link:"after:bg-secondary"}},{highlightColor:"success",highlight:!0,level:!0,active:!0,class:{link:"after:bg-success"}},{highlightColor:"info",highlight:!0,level:!0,active:!0,class:{link:"after:bg-info"}},{highlightColor:"warning",highlight:!0,level:!0,active:!0,class:{link:"after:bg-warning"}},{highlightColor:"error",highlight:!0,level:!0,active:!0,class:{link:"after:bg-error"}},{highlightColor:"neutral",highlight:!0,level:!0,active:!0,class:{link:"after:bg-inverted"}}],defaultVariants:{color:"primary",highlightColor:"primary",variant:"pill"}},Gl=Object.assign({inheritAttrs:!1},{__name:"UNavigationMenu",props:{as:{type:null,required:!1},type:{type:null,required:!1,default:"multiple"},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},trailingIcon:{type:null,required:!1},externalIcon:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},items:{type:null,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},orientation:{type:null,required:!1,default:"horizontal"},collapsed:{type:Boolean,required:!1},tooltip:{type:[Boolean,Object],required:!1},popover:{type:[Boolean,Object],required:!1},highlight:{type:Boolean,required:!1},highlightColor:{type:null,required:!1},content:{type:Object,required:!1},contentOrientation:{type:null,required:!1,default:"horizontal"},arrow:{type:Boolean,required:!1},labelKey:{type:null,required:!1,default:"label"},class:{type:null,required:!1},ui:{type:null,required:!1},delayDuration:{type:Number,required:!1,default:0},disableClickTrigger:{type:Boolean,required:!1},disableHoverTrigger:{type:Boolean,required:!1},skipDelayDuration:{type:Number,required:!1},disablePointerLeaveClose:{type:Boolean,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},disabled:{type:Boolean,required:!1},collapsible:{type:Boolean,required:!1,default:!0}},emits:["update:modelValue"],setup(e,{emit:t}){const i=e,s=t,r=ei(),n=$t(),o=gi(te(()=>({as:i.as,delayDuration:i.delayDuration,skipDelayDuration:i.skipDelayDuration,orientation:i.orientation,disableClickTrigger:i.disableClickTrigger,disableHoverTrigger:i.disableHoverTrigger,disablePointerLeaveClose:i.disablePointerLeaveClose,unmountOnHide:i.unmountOnHide})),s),a=gi(zt(i,"collapsible","disabled","type","unmountOnHide"),s),h=ot(()=>i.content),l=ot(()=>Mt(typeof i.tooltip=="boolean"?{}:i.tooltip,{delayDuration:0,content:{side:"right"}})),f=ot(()=>Mt(typeof i.popover=="boolean"?{}:i.popover,{mode:"hover",content:{side:"right",align:"start",alignOffset:2}})),[u,d]=Zt(),[c,p]=Zt({props:{item:Object,index:Number,level:Number}}),_=te(()=>Ne({extend:Ne(Yl),...n.ui?.navigationMenu||{}})({orientation:i.orientation,contentOrientation:i.orientation==="vertical"?void 0:i.contentOrientation,collapsed:i.collapsed,color:i.color,variant:i.variant,highlight:i.highlight,highlightColor:i.highlightColor||i.color})),S=te(()=>i.items?.length?Ca(i.items)?i.items:[i.items]:[]);function w(y,x=0){const g=y.reduce((L,B,E)=>((B.defaultOpen||B.open)&&L.push(B.value||(x>0?`item-${x}-${E}`:`item-${E}`)),L),[]);return i.type==="single"?g[0]:g}return(y,x)=>(k(),j(ke,null,[O(v(u),null,{default:T(({item:g,active:L,index:B})=>[Y(y.$slots,g.slot||"item",{item:g,index:B,active:L,ui:_.value},()=>[Y(y.$slots,g.slot?`${g.slot}-leading`:"item-leading",{item:g,active:L,index:B,ui:_.value},()=>[g.avatar?(k(),z(kr,G({key:0,size:g.ui?.linkLeadingAvatarSize||i.ui?.linkLeadingAvatarSize||_.value.linkLeadingAvatarSize()},g.avatar,{"data-slot":"linkLeadingAvatar",class:_.value.linkLeadingAvatar({class:[i.ui?.linkLeadingAvatar,g.ui?.linkLeadingAvatar],active:L,disabled:!!g.disabled})}),null,16,["size","class"])):g.icon?(k(),z(De,{key:1,name:g.icon,"data-slot":"linkLeadingIcon",class:H(_.value.linkLeadingIcon({class:[i.ui?.linkLeadingIcon,g.ui?.linkLeadingIcon],active:L,disabled:!!g.disabled}))},null,8,["name","class"])):$("",!0)]),v(Oe)(g,i.labelKey)||r[g.slot?`${g.slot}-label`:"item-label"]?(k(),j("span",{key:0,"data-slot":"linkLabel",class:H(_.value.linkLabel({class:[i.ui?.linkLabel,g.ui?.linkLabel]}))},[Y(y.$slots,g.slot?`${g.slot}-label`:"item-label",{item:g,active:L,index:B},()=>[at(Me(v(Oe)(g,i.labelKey)),1)]),g.target==="_blank"&&e.externalIcon!==!1?(k(),z(De,{key:0,name:typeof e.externalIcon=="string"?e.externalIcon:v(n).ui.icons.external,"data-slot":"linkLabelExternalIcon",class:H(_.value.linkLabelExternalIcon({class:[i.ui?.linkLabelExternalIcon,g.ui?.linkLabelExternalIcon],active:L}))},null,8,["name","class"])):$("",!0)],2)):$("",!0),g.badge||g.badge===0||e.orientation==="horizontal"&&(g.children?.length||r[g.slot?`${g.slot}-content`:"item-content"])||e.orientation==="vertical"&&g.children?.length||g.trailingIcon||r[g.slot?`${g.slot}-trailing`:"item-trailing"]?(k(),z(Di(e.orientation==="vertical"&&g.children?.length&&!e.collapsed?v(Wr):"span"),{key:1,as:"span","data-slot":"linkTrailing",class:H(_.value.linkTrailing({class:[i.ui?.linkTrailing,g.ui?.linkTrailing]})),onClick:x[0]||(x[0]=ka(()=>{},["stop","prevent"]))},{default:T(()=>[Y(y.$slots,g.slot?`${g.slot}-trailing`:"item-trailing",{item:g,active:L,index:B,ui:_.value},()=>[g.badge||g.badge===0?(k(),z(Ya,G({key:0,color:"neutral",variant:"outline",size:g.ui?.linkTrailingBadgeSize||i.ui?.linkTrailingBadgeSize||_.value.linkTrailingBadgeSize()},typeof g.badge=="string"||typeof g.badge=="number"?{label:g.badge}:g.badge,{"data-slot":"linkTrailingBadge",class:_.value.linkTrailingBadge({class:[i.ui?.linkTrailingBadge,g.ui?.linkTrailingBadge]})}),null,16,["size","class"])):$("",!0),e.orientation==="horizontal"&&(g.children?.length||r[g.slot?`${g.slot}-content`:"item-content"])||e.orientation==="vertical"&&g.children?.length?(k(),z(De,{key:1,name:g.trailingIcon||e.trailingIcon||v(n).ui.icons.chevronDown,"data-slot":"linkTrailingIcon",class:H(_.value.linkTrailingIcon({class:[i.ui?.linkTrailingIcon,g.ui?.linkTrailingIcon],active:L}))},null,8,["name","class"])):g.trailingIcon?(k(),z(De,{key:2,name:g.trailingIcon,"data-slot":"linkTrailingIcon",class:H(_.value.linkTrailingIcon({class:[i.ui?.linkTrailingIcon,g.ui?.linkTrailingIcon],active:L}))},null,8,["name","class"])):$("",!0)])]),_:2},1032,["class"])):$("",!0)])]),_:3}),O(v(c),null,{default:T(({item:g,index:L,level:B=0})=>[(k(),z(Di(e.orientation==="vertical"&&!e.collapsed?v(Ua):v(Dl)),{as:"li",value:g.value||(B>0?`item-${B}-${L}`:`item-${L}`)},{default:T(()=>[e.orientation==="vertical"&&g.type==="label"&&!e.collapsed?(k(),j("div",{key:0,"data-slot":"label",class:H(_.value.label({class:[i.ui?.label,g.ui?.label,g.class]}))},[O(v(d),{item:g,index:L},null,8,["item","index"])],2)):g.type!=="label"?(k(),z(Ni,G({key:1},e.orientation==="vertical"&&g.children?.length&&!e.collapsed&&g.type==="trigger"?{}:v(zi)(g),{custom:""}),{default:T(({active:E,...W})=>[(k(),z(Di(e.orientation==="horizontal"&&(g.children?.length||r[g.slot?`${g.slot}-content`:"item-content"])?v($l):e.orientation==="vertical"&&g.children?.length&&!e.collapsed&&!W.href?v(Wr):v(ps)),{"as-child":"",active:E||g.active,disabled:g.disabled,onSelect:g.onSelect},{default:T(()=>[e.orientation==="vertical"&&e.collapsed&&g.children?.length&&(i.popover||g.popover)?(k(),z(jl,G({key:0},{...f.value,...typeof g.popover=="boolean"?{}:g.popover||{}},{ui:{content:_.value.content({class:[i.ui?.content,g.ui?.content]})}}),{content:T(({close:U})=>[Y(y.$slots,g.slot?`${g.slot}-content`:"item-content",{item:g,active:E||g.active,index:L,ui:_.value,close:U},()=>[ie("ul",{"data-slot":"childList",class:H(_.value.childList({class:[i.ui?.childList,g.ui?.childList]}))},[ie("li",{"data-slot":"childLabel",class:H(_.value.childLabel({class:[i.ui?.childLabel,g.ui?.childLabel]}))},Me(v(Oe)(g,i.labelKey)),3),(k(!0),j(ke,null,Ge(g.children,(Z,V)=>(k(),j("li",{key:V,"data-slot":"childItem",class:H(_.value.childItem({class:[i.ui?.childItem,g.ui?.childItem]}))},[O(Ni,G({ref_for:!0},v(zi)(Z),{custom:""}),{default:T(({active:A,...b})=>[O(v(ps),{"as-child":"",active:A,onSelect:Z.onSelect},{default:T(()=>[O(Yt,G({ref_for:!0},b,{"data-slot":"childLink",class:_.value.childLink({class:[i.ui?.childLink,g.ui?.childLink,Z.class],active:A})}),{default:T(()=>[Z.icon?(k(),z(De,{key:0,name:Z.icon,"data-slot":"childLinkIcon",class:H(_.value.childLinkIcon({class:[i.ui?.childLinkIcon,g.ui?.childLinkIcon],active:A}))},null,8,["name","class"])):$("",!0),ie("span",{"data-slot":"childLinkLabel",class:H(_.value.childLinkLabel({class:[i.ui?.childLinkLabel,g.ui?.childLinkLabel],active:A}))},[at(Me(v(Oe)(Z,i.labelKey))+" ",1),Z.target==="_blank"&&e.externalIcon!==!1?(k(),z(De,{key:0,name:typeof e.externalIcon=="string"?e.externalIcon:v(n).ui.icons.external,"data-slot":"childLinkLabelExternalIcon",class:H(_.value.childLinkLabelExternalIcon({class:[i.ui?.childLinkLabelExternalIcon,g.ui?.childLinkLabelExternalIcon],active:A}))},null,8,["name","class"])):$("",!0)],2)]),_:2},1040,["class"])]),_:2},1032,["active","onSelect"])]),_:2},1040)],2))),128))],2)])]),default:T(()=>[O(Yt,G(W,{"data-slot":"link",class:_.value.link({class:[i.ui?.link,g.ui?.link,g.class],active:E||g.active,disabled:!!g.disabled,level:B>0})}),{default:T(()=>[O(v(d),{item:g,active:E||g.active,index:L},null,8,["item","active","index"])]),_:2},1040,["class"])]),_:2},1040,["ui"])):e.orientation==="vertical"&&e.collapsed&&(i.tooltip||g.tooltip)?(k(),z(io,G({key:1,text:v(Oe)(g,i.labelKey)},{...l.value,...typeof g.tooltip=="boolean"?{}:g.tooltip||{}}),{default:T(()=>[O(Yt,G(W,{"data-slot":"link",class:_.value.link({class:[i.ui?.link,g.ui?.link,g.class],active:E||g.active,disabled:!!g.disabled,level:B>0})}),{default:T(()=>[O(v(d),{item:g,active:E||g.active,index:L},null,8,["item","active","index"])]),_:2},1040,["class"])]),_:2},1040,["text"])):(k(),z(Yt,G({key:2},W,{"data-slot":"link",class:_.value.link({class:[i.ui?.link,g.ui?.link,g.class],active:E||g.active,disabled:!!g.disabled,level:e.orientation==="horizontal"||B>0})}),{default:T(()=>[O(v(d),{item:g,active:E||g.active,index:L},null,8,["item","active","index"])]),_:2},1040,["class"]))]),_:2},1064,["active","disabled","onSelect"])),e.orientation==="horizontal"&&(g.children?.length||r[g.slot?`${g.slot}-content`:"item-content"])?(k(),z(v(Al),G({key:0},h.value,{"data-slot":"content",class:_.value.content({class:[i.ui?.content,g.ui?.content]})}),{default:T(()=>[Y(y.$slots,g.slot?`${g.slot}-content`:"item-content",{item:g,active:E||g.active,index:L,ui:_.value},()=>[ie("ul",{"data-slot":"childList",class:H(_.value.childList({class:[i.ui?.childList,g.ui?.childList]}))},[(k(!0),j(ke,null,Ge(g.children,(U,Z)=>(k(),j("li",{key:Z,"data-slot":"childItem",class:H(_.value.childItem({class:[i.ui?.childItem,g.ui?.childItem]}))},[O(Ni,G({ref_for:!0},v(zi)(U),{custom:""}),{default:T(({active:V,...A})=>[O(v(ps),{"as-child":"",active:V,onSelect:U.onSelect},{default:T(()=>[O(Yt,G({ref_for:!0},A,{"data-slot":"childLink",class:_.value.childLink({class:[i.ui?.childLink,g.ui?.childLink,U.class],active:V})}),{default:T(()=>[U.icon?(k(),z(De,{key:0,name:U.icon,"data-slot":"childLinkIcon",class:H(_.value.childLinkIcon({class:[i.ui?.childLinkIcon,g.ui?.childLinkIcon],active:V}))},null,8,["name","class"])):$("",!0),ie("div",{"data-slot":"childLinkWrapper",class:H(_.value.childLinkWrapper({class:[i.ui?.childLinkWrapper,g.ui?.childLinkWrapper]}))},[ie("p",{"data-slot":"childLinkLabel",class:H(_.value.childLinkLabel({class:[i.ui?.childLinkLabel,g.ui?.childLinkLabel],active:V}))},[at(Me(v(Oe)(U,i.labelKey))+" ",1),U.target==="_blank"&&e.externalIcon!==!1?(k(),z(De,{key:0,name:typeof e.externalIcon=="string"?e.externalIcon:v(n).ui.icons.external,"data-slot":"childLinkLabelExternalIcon",class:H(_.value.childLinkLabelExternalIcon({class:[i.ui?.childLinkLabelExternalIcon,g.ui?.childLinkLabelExternalIcon],active:V}))},null,8,["name","class"])):$("",!0)],2),U.description?(k(),j("p",{key:0,"data-slot":"childLinkDescription",class:H(_.value.childLinkDescription({class:[i.ui?.childLinkDescription,g.ui?.childLinkDescription],active:V}))},Me(U.description),3)):$("",!0)],2)]),_:2},1040,["class"])]),_:2},1032,["active","onSelect"])]),_:2},1040)],2))),128))],2)])]),_:2},1040,["class"])):$("",!0)]),_:2},1040)):$("",!0),e.orientation==="vertical"&&g.children?.length&&!e.collapsed?(k(),z(v(Va),{key:2,"data-slot":"content",class:H(_.value.content({class:[i.ui?.content,g.ui?.content]}))},{default:T(()=>[O(v(qr),G({...v(a),defaultValue:w(g.children,B+1)},{as:"ul","data-slot":"childList",class:_.value.childList({class:i.ui?.childList})}),{default:T(()=>[(k(!0),j(ke,null,Ge(g.children,(E,W)=>(k(),z(v(p),{key:W,item:E,index:W,level:B+1,"data-slot":"childItem",class:H(_.value.childItem({class:[i.ui?.childItem,E.ui?.childItem]}))},null,8,["item","index","level","class"]))),128))]),_:2},1040,["class"])]),_:2},1032,["class"])):$("",!0)]),_:2},1032,["value"]))]),_:3}),O(v(kl),G({...v(o),...e.orientation==="horizontal"?{modelValue:e.modelValue,defaultValue:e.defaultValue}:{},...y.$attrs},{"data-collapsed":e.collapsed,"data-slot":"root",class:_.value.root({class:[i.ui?.root,i.class]})}),{default:T(()=>[Y(y.$slots,"list-leading"),(k(!0),j(ke,null,Ge(S.value,(g,L)=>(k(),j(ke,{key:`list-${L}`},[(k(),z(Di(e.orientation==="vertical"?v(qr):v(zl)),G({ref_for:!0},e.orientation==="vertical"&&!e.collapsed?{...v(a),modelValue:e.modelValue,defaultValue:e.defaultValue??w(g)}:{},{as:"ul","data-slot":"list",class:_.value.list({class:i.ui?.list})}),{default:T(()=>[(k(!0),j(ke,null,Ge(g,(B,E)=>(k(),z(v(p),{key:`list-${L}-${E}`,item:B,index:E,"data-slot":"item",class:H(_.value.item({class:[i.ui?.item,B.ui?.item]}))},null,8,["item","index","class"]))),128))]),_:2},1040,["class"])),e.orientation==="vertical"&&L<S.value.length-1?(k(),j("div",{key:0,"data-slot":"separator",class:H(_.value.separator({class:i.ui?.separator}))},null,2)):$("",!0)],64))),128)),Y(y.$slots,"list-trailing"),e.orientation==="horizontal"?(k(),j("div",{key:0,"data-slot":"viewportWrapper",class:H(_.value.viewportWrapper({class:i.ui?.viewportWrapper}))},[e.arrow?(k(),z(v(Il),{key:0,"data-slot":"indicator",class:H(_.value.indicator({class:i.ui?.indicator}))},{default:T(()=>[ie("div",{"data-slot":"arrow",class:H(_.value.arrow({class:i.ui?.arrow}))},null,2)]),_:1},8,["class"])):$("",!0),O(v(ql),{"data-slot":"viewport",class:H(_.value.viewport({class:i.ui?.viewport}))},null,8,["class"])],2)):$("",!0)]),_:3},16,["data-collapsed","class"])],64))}}),Xl={slots:{root:"relative hidden lg:flex flex-col min-h-svh min-w-16 w-(--width) shrink-0",header:"h-(--ui-header-height) shrink-0 flex items-center gap-1.5 px-4",body:"flex flex-col gap-4 flex-1 overflow-y-auto px-4 py-2",footer:"shrink-0 flex items-center gap-1.5 px-4 py-2",toggle:"",handle:"",content:"lg:hidden",overlay:"lg:hidden"},variants:{menu:{true:{header:"sm:px-6",body:"sm:px-6",footer:"sm:px-6"}},side:{left:{root:"border-e border-default"},right:{root:""}},toggleSide:{left:{toggle:""},right:{toggle:"ms-auto"}}}},Jl=["data-collapsed","data-dragging"],Zl=Object.assign({inheritAttrs:!1},{__name:"UDashboardSidebar",props:Xi({mode:{type:null,required:!1,default:"slideover"},menu:{type:null,required:!1},toggle:{type:[Boolean,Object],required:!1,default:!0},toggleSide:{type:String,required:!1,default:"left"},class:{type:null,required:!1},ui:{type:null,required:!1},id:{type:String,required:!1},side:{type:String,required:!1,default:"left"},minSize:{type:Number,required:!1,default:10},maxSize:{type:Number,required:!1,default:20},defaultSize:{type:Number,required:!1,default:15},resizable:{type:Boolean,required:!1,default:!1},collapsible:{type:Boolean,required:!1,default:!1},collapsedSize:{type:Number,required:!1,default:0}},{open:{type:Boolean,default:!1},openModifiers:{},collapsed:{type:Boolean,default:!1},collapsedModifiers:{}}),emits:["update:open","update:collapsed"],setup(e){const t=e,i=ei(),s=vi(e,"open",{type:Boolean,default:!1}),r=vi(e,"collapsed",{type:Boolean,default:!1}),n=Zn(),{t:o}=ns(),a=$t(),h=to({storageKey:"dashboard",unit:"%",sidebarOpen:J(!1),sidebarCollapsed:J(!1)}),l=`${h.storageKey}-sidebar-${t.id||xa()}`,{el:f,size:u,collapse:d,isCollapsed:c,isDragging:p,onMouseDown:_,onTouchStart:S,onDoubleClick:w}=za(l,ot(()=>({...h,...t})),{collapsed:r}),[y,x]=Zt(),[g,L]=Zt();Ts("dashboard:sidebar:toggle",()=>{s.value=!s.value}),Ts("dashboard:sidebar:collapse",Z=>{c.value=Z}),Ce(s,()=>h.sidebarOpen.value=s.value,{immediate:!0}),Ce(c,()=>h.sidebarCollapsed.value=c.value,{immediate:!0}),Ce(()=>n.fullPath,()=>{s.value=!1});const B=te(()=>Ne({extend:Ne(Xl),...a.ui?.dashboardSidebar||{}})({side:t.side})),E=te(()=>({slideover:Qa,modal:Er,drawer:el})[t.mode]),W=ot(()=>Mt(t.menu,{content:{onOpenAutoFocus:Z=>Z.preventDefault()}},t.mode==="modal"?{fullscreen:!0,transition:!1}:t.mode==="slideover"?{side:"left"}:{}));function U(){s.value=!s.value}return(Z,V)=>(k(),j(ke,null,[O(v(y),null,{default:T(()=>[Y(Z.$slots,"toggle",{open:s.value,toggle:U,ui:B.value},()=>[e.toggle?(k(),z(Fa,G({key:0},typeof e.toggle=="object"?e.toggle:{},{side:e.toggleSide,"data-slot":"toggle",class:B.value.toggle({class:t.ui?.toggle,toggleSide:e.toggleSide})}),null,16,["side","class"])):$("",!0)])]),_:3}),O(v(g),null,{default:T(()=>[Y(Z.$slots,"resize-handle",{onMouseDown:v(_),onTouchStart:v(S),onDoubleClick:v(w),ui:B.value},()=>[e.resizable?(k(),z(Ha,{key:0,"aria-controls":l,"data-slot":"handle",class:H(B.value.handle({class:t.ui?.handle})),onMousedown:v(_),onTouchstart:v(S),onDblclick:v(w)},null,8,["class","onMousedown","onTouchstart","onDblclick"])):$("",!0)])]),_:3}),e.side==="right"?(k(),z(v(L),{key:0})):$("",!0),ie("div",G({id:l,ref_key:"el",ref:f},Z.$attrs,{"data-collapsed":v(c),"data-dragging":v(p),"data-slot":"root",class:B.value.root({class:[t.ui?.root,t.class]}),style:{"--width":`${v(u)||0}${v(h).unit}`}}),[i.header?(k(),j("div",{key:0,"data-slot":"header",class:H(B.value.header({class:t.ui?.header}))},[Y(Z.$slots,"header",{collapsed:v(c),collapse:v(d)})],2)):$("",!0),ie("div",{"data-slot":"body",class:H(B.value.body({class:t.ui?.body}))},[Y(Z.$slots,"default",{collapsed:v(c),collapse:v(d)})],2),i.footer?(k(),j("div",{key:1,"data-slot":"footer",class:H(B.value.footer({class:t.ui?.footer}))},[Y(Z.$slots,"footer",{collapsed:v(c),collapse:v(d)})],2)):$("",!0)],16,Jl),e.side==="left"?(k(),z(v(L),{key:1})):$("",!0),O(v(E),G({open:s.value,"onUpdate:open":V[0]||(V[0]=A=>s.value=A),title:v(o)("dashboardSidebar.title"),description:v(o)("dashboardSidebar.description")},W.value,{ui:{overlay:B.value.overlay({class:t.ui?.overlay}),content:B.value.content({class:t.ui?.content})}}),{content:T(A=>[Y(Z.$slots,"content",Et(Lt(A)),()=>[i.header||e.mode!=="drawer"?(k(),j("div",{key:0,"data-slot":"header",class:H(B.value.header({class:t.ui?.header,menu:!0}))},[e.mode!=="drawer"&&e.toggleSide==="left"?(k(),z(v(x),{key:0})):$("",!0),Y(Z.$slots,"header"),e.mode!=="drawer"&&e.toggleSide==="right"?(k(),z(v(x),{key:1})):$("",!0)],2)):$("",!0),ie("div",{"data-slot":"body",class:H(B.value.body({class:t.ui?.body,menu:!0}))},[Y(Z.$slots,"default")],2),i.footer?(k(),j("div",{key:1,"data-slot":"footer",class:H(B.value.footer({class:t.ui?.footer,menu:!0}))},[Y(Z.$slots,"footer")],2)):$("",!0)])]),_:3},16,["open","title","description","ui"])],64))}});function pt(e){return Array.isArray?Array.isArray(e):co(e)==="[object Array]"}function Ql(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function eh(e){return e==null?"":Ql(e)}function rt(e){return typeof e=="string"}function lo(e){return typeof e=="number"}function th(e){return e===!0||e===!1||ih(e)&&co(e)=="[object Boolean]"}function ho(e){return typeof e=="object"}function ih(e){return ho(e)&&e!==null}function qe(e){return e!=null}function gs(e){return!e.trim().length}function co(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const sh="Incorrect 'index' type",rh=e=>`Invalid value for key ${e}`,nh=e=>`Pattern length exceeds max of ${e}.`,oh=e=>`Missing ${e} property in key`,ah=e=>`Property 'weight' in key '${e}' must be a positive integer`,Kr=Object.prototype.hasOwnProperty;class lh{constructor(t){this._keys=[],this._keyMap={};let i=0;t.forEach(s=>{let r=uo(s);this._keys.push(r),this._keyMap[r.id]=r,i+=r.weight}),this._keys.forEach(s=>{s.weight/=i})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function uo(e){let t=null,i=null,s=null,r=1,n=null;if(rt(e)||pt(e))s=e,t=Ur(e),i=As(e);else{if(!Kr.call(e,"name"))throw new Error(oh("name"));const o=e.name;if(s=o,Kr.call(e,"weight")&&(r=e.weight,r<=0))throw new Error(ah(o));t=Ur(o),i=As(o),n=e.getFn}return{path:t,id:i,weight:r,src:s,getFn:n}}function Ur(e){return pt(e)?e:e.split(".")}function As(e){return pt(e)?e.join("."):e}function hh(e,t){let i=[],s=!1;const r=(n,o,a)=>{if(qe(n))if(!o[a])i.push(n);else{let h=o[a];const l=n[h];if(!qe(l))return;if(a===o.length-1&&(rt(l)||lo(l)||th(l)))i.push(eh(l));else if(pt(l)){s=!0;for(let f=0,u=l.length;f<u;f+=1)r(l[f],o,a+1)}else o.length&&r(l,o,a+1)}};return r(e,rt(t)?t.split("."):t,0),s?i:i[0]}const ch={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},uh={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},dh={location:0,threshold:.6,distance:100},fh={useExtendedSearch:!1,getFn:hh,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var q={...uh,...ch,...dh,...fh};const _h=/[^ ]+/g;function ph(e=1,t=3){const i=new Map,s=Math.pow(10,t);return{get(r){const n=r.match(_h).length;if(i.has(n))return i.get(n);const o=1/Math.pow(n,.5*e),a=parseFloat(Math.round(o*s)/s);return i.set(n,a),a},clear(){i.clear()}}}class Mr{constructor({getFn:t=q.getFn,fieldNormWeight:i=q.fieldNormWeight}={}){this.norm=ph(i,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((i,s)=>{this._keysMap[i.id]=s})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,rt(this.docs[0])?this.docs.forEach((t,i)=>{this._addString(t,i)}):this.docs.forEach((t,i)=>{this._addObject(t,i)}),this.norm.clear())}add(t){const i=this.size();rt(t)?this._addString(t,i):this._addObject(t,i)}removeAt(t){this.records.splice(t,1);for(let i=t,s=this.size();i<s;i+=1)this.records[i].i-=1}getValueForItemAtKeyId(t,i){return t[this._keysMap[i]]}size(){return this.records.length}_addString(t,i){if(!qe(t)||gs(t))return;let s={v:t,i,n:this.norm.get(t)};this.records.push(s)}_addObject(t,i){let s={i,$:{}};this.keys.forEach((r,n)=>{let o=r.getFn?r.getFn(t):this.getFn(t,r.path);if(qe(o)){if(pt(o)){let a=[];const h=[{nestedArrIndex:-1,value:o}];for(;h.length;){const{nestedArrIndex:l,value:f}=h.pop();if(qe(f))if(rt(f)&&!gs(f)){let u={v:f,i:l,n:this.norm.get(f)};a.push(u)}else pt(f)&&f.forEach((u,d)=>{h.push({nestedArrIndex:d,value:u})})}s.$[n]=a}else if(rt(o)&&!gs(o)){let a={v:o,n:this.norm.get(o)};s.$[n]=a}}}),this.records.push(s)}toJSON(){return{keys:this.keys,records:this.records}}}function fo(e,t,{getFn:i=q.getFn,fieldNormWeight:s=q.fieldNormWeight}={}){const r=new Mr({getFn:i,fieldNormWeight:s});return r.setKeys(e.map(uo)),r.setSources(t),r.create(),r}function gh(e,{getFn:t=q.getFn,fieldNormWeight:i=q.fieldNormWeight}={}){const{keys:s,records:r}=e,n=new Mr({getFn:t,fieldNormWeight:i});return n.setKeys(s),n.setIndexRecords(r),n}function Mi(e,{errors:t=0,currentLocation:i=0,expectedLocation:s=0,distance:r=q.distance,ignoreLocation:n=q.ignoreLocation}={}){const o=t/e.length;if(n)return o;const a=Math.abs(s-i);return r?o+a/r:a?1:o}function vh(e=[],t=q.minMatchCharLength){let i=[],s=-1,r=-1,n=0;for(let o=e.length;n<o;n+=1){let a=e[n];a&&s===-1?s=n:!a&&s!==-1&&(r=n-1,r-s+1>=t&&i.push([s,r]),s=-1)}return e[n-1]&&n-s>=t&&i.push([s,n-1]),i}const It=32;function mh(e,t,i,{location:s=q.location,distance:r=q.distance,threshold:n=q.threshold,findAllMatches:o=q.findAllMatches,minMatchCharLength:a=q.minMatchCharLength,includeMatches:h=q.includeMatches,ignoreLocation:l=q.ignoreLocation}={}){if(t.length>It)throw new Error(nh(It));const f=t.length,u=e.length,d=Math.max(0,Math.min(s,u));let c=n,p=d;const _=a>1||h,S=_?Array(u):[];let w;for(;(w=e.indexOf(t,p))>-1;){let E=Mi(t,{currentLocation:w,expectedLocation:d,distance:r,ignoreLocation:l});if(c=Math.min(E,c),p=w+f,_){let W=0;for(;W<f;)S[w+W]=1,W+=1}}p=-1;let y=[],x=1,g=f+u;const L=1<<f-1;for(let E=0;E<f;E+=1){let W=0,U=g;for(;W<U;)Mi(t,{errors:E,currentLocation:d+U,expectedLocation:d,distance:r,ignoreLocation:l})<=c?W=U:g=U,U=Math.floor((g-W)/2+W);g=U;let Z=Math.max(1,d-U+1),V=o?u:Math.min(d+U,u)+f,A=Array(V+2);A[V+1]=(1<<E)-1;for(let M=V;M>=Z;M-=1){let m=M-1,I=i[e.charAt(m)];if(_&&(S[m]=+!!I),A[M]=(A[M+1]<<1|1)&I,E&&(A[M]|=(y[M+1]|y[M])<<1|1|y[M+1]),A[M]&L&&(x=Mi(t,{errors:E,currentLocation:m,expectedLocation:d,distance:r,ignoreLocation:l}),x<=c)){if(c=x,p=m,p<=d)break;Z=Math.max(1,2*d-p)}}if(Mi(t,{errors:E+1,currentLocation:d,expectedLocation:d,distance:r,ignoreLocation:l})>c)break;y=A}const B={isMatch:p>=0,score:Math.max(.001,x)};if(_){const E=vh(S,a);E.length?h&&(B.indices=E):B.isMatch=!1}return B}function Sh(e){let t={};for(let i=0,s=e.length;i<s;i+=1){const r=e.charAt(i);t[r]=(t[r]||0)|1<<s-i-1}return t}const Ji=String.prototype.normalize?(e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")):(e=>e);class _o{constructor(t,{location:i=q.location,threshold:s=q.threshold,distance:r=q.distance,includeMatches:n=q.includeMatches,findAllMatches:o=q.findAllMatches,minMatchCharLength:a=q.minMatchCharLength,isCaseSensitive:h=q.isCaseSensitive,ignoreDiacritics:l=q.ignoreDiacritics,ignoreLocation:f=q.ignoreLocation}={}){if(this.options={location:i,threshold:s,distance:r,includeMatches:n,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:h,ignoreDiacritics:l,ignoreLocation:f},t=h?t:t.toLowerCase(),t=l?Ji(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const u=(c,p)=>{this.chunks.push({pattern:c,alphabet:Sh(c),startIndex:p})},d=this.pattern.length;if(d>It){let c=0;const p=d%It,_=d-p;for(;c<_;)u(this.pattern.substr(c,It),c),c+=It;if(p){const S=d-It;u(this.pattern.substr(S),S)}}else u(this.pattern,0)}searchIn(t){const{isCaseSensitive:i,ignoreDiacritics:s,includeMatches:r}=this.options;if(t=i?t:t.toLowerCase(),t=s?Ji(t):t,this.pattern===t){let _={isMatch:!0,score:0};return r&&(_.indices=[[0,t.length-1]]),_}const{location:n,distance:o,threshold:a,findAllMatches:h,minMatchCharLength:l,ignoreLocation:f}=this.options;let u=[],d=0,c=!1;this.chunks.forEach(({pattern:_,alphabet:S,startIndex:w})=>{const{isMatch:y,score:x,indices:g}=mh(t,_,S,{location:n+w,distance:o,threshold:a,findAllMatches:h,minMatchCharLength:l,includeMatches:r,ignoreLocation:f});y&&(c=!0),d+=x,y&&g&&(u=[...u,...g])});let p={isMatch:c,score:c?d/this.chunks.length:1};return c&&r&&(p.indices=u),p}}class Rt{constructor(t){this.pattern=t}static isMultiMatch(t){return Vr(t,this.multiRegex)}static isSingleMatch(t){return Vr(t,this.singleRegex)}search(){}}function Vr(e,t){const i=e.match(t);return i?i[1]:null}class bh extends Rt{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const i=t===this.pattern;return{isMatch:i,score:i?0:1,indices:[0,this.pattern.length-1]}}}class yh extends Rt{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const s=t.indexOf(this.pattern)===-1;return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}}class wh extends Rt{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const i=t.startsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,this.pattern.length-1]}}}class Ch extends Rt{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const i=!t.startsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,t.length-1]}}}class kh extends Rt{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const i=t.endsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class xh extends Rt{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const i=!t.endsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,t.length-1]}}}class po extends Rt{constructor(t,{location:i=q.location,threshold:s=q.threshold,distance:r=q.distance,includeMatches:n=q.includeMatches,findAllMatches:o=q.findAllMatches,minMatchCharLength:a=q.minMatchCharLength,isCaseSensitive:h=q.isCaseSensitive,ignoreDiacritics:l=q.ignoreDiacritics,ignoreLocation:f=q.ignoreLocation}={}){super(t),this._bitapSearch=new _o(t,{location:i,threshold:s,distance:r,includeMatches:n,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:h,ignoreDiacritics:l,ignoreLocation:f})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class go extends Rt{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let i=0,s;const r=[],n=this.pattern.length;for(;(s=t.indexOf(this.pattern,i))>-1;)i=s+n,r.push([s,i-1]);const o=!!r.length;return{isMatch:o,score:o?0:1,indices:r}}}const Ps=[bh,go,wh,Ch,xh,kh,yh,po],jr=Ps.length,Eh=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Lh="|";function Bh(e,t={}){return e.split(Lh).map(i=>{let s=i.trim().split(Eh).filter(n=>n&&!!n.trim()),r=[];for(let n=0,o=s.length;n<o;n+=1){const a=s[n];let h=!1,l=-1;for(;!h&&++l<jr;){const f=Ps[l];let u=f.isMultiMatch(a);u&&(r.push(new f(u,t)),h=!0)}if(!h)for(l=-1;++l<jr;){const f=Ps[l];let u=f.isSingleMatch(a);if(u){r.push(new f(u,t));break}}}return r})}const Dh=new Set([po.type,go.type]);class Mh{constructor(t,{isCaseSensitive:i=q.isCaseSensitive,ignoreDiacritics:s=q.ignoreDiacritics,includeMatches:r=q.includeMatches,minMatchCharLength:n=q.minMatchCharLength,ignoreLocation:o=q.ignoreLocation,findAllMatches:a=q.findAllMatches,location:h=q.location,threshold:l=q.threshold,distance:f=q.distance}={}){this.query=null,this.options={isCaseSensitive:i,ignoreDiacritics:s,includeMatches:r,minMatchCharLength:n,findAllMatches:a,ignoreLocation:o,location:h,threshold:l,distance:f},t=i?t:t.toLowerCase(),t=s?Ji(t):t,this.pattern=t,this.query=Bh(this.pattern,this.options)}static condition(t,i){return i.useExtendedSearch}searchIn(t){const i=this.query;if(!i)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:r,ignoreDiacritics:n}=this.options;t=r?t:t.toLowerCase(),t=n?Ji(t):t;let o=0,a=[],h=0;for(let l=0,f=i.length;l<f;l+=1){const u=i[l];a.length=0,o=0;for(let d=0,c=u.length;d<c;d+=1){const p=u[d],{isMatch:_,indices:S,score:w}=p.search(t);if(_){if(o+=1,h+=w,s){const y=p.constructor.type;Dh.has(y)?a=[...a,...S]:a.push(S)}}else{h=0,o=0,a.length=0;break}}if(o){let d={isMatch:!0,score:h/o};return s&&(d.indices=a),d}}return{isMatch:!1,score:1}}}const Is=[];function Rh(...e){Is.push(...e)}function Os(e,t){for(let i=0,s=Is.length;i<s;i+=1){let r=Is[i];if(r.condition(e,t))return new r(e,t)}return new _o(e,t)}const Zi={AND:"$and",OR:"$or"},Ns={PATH:"$path",PATTERN:"$val"},zs=e=>!!(e[Zi.AND]||e[Zi.OR]),Th=e=>!!e[Ns.PATH],Ah=e=>!pt(e)&&ho(e)&&!zs(e),Yr=e=>({[Zi.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function vo(e,t,{auto:i=!0}={}){const s=r=>{let n=Object.keys(r);const o=Th(r);if(!o&&n.length>1&&!zs(r))return s(Yr(r));if(Ah(r)){const h=o?r[Ns.PATH]:n[0],l=o?r[Ns.PATTERN]:r[h];if(!rt(l))throw new Error(rh(h));const f={keyId:As(h),pattern:l};return i&&(f.searcher=Os(l,t)),f}let a={children:[],operator:n[0]};return n.forEach(h=>{const l=r[h];pt(l)&&l.forEach(f=>{a.children.push(s(f))})}),a};return zs(e)||(e=Yr(e)),s(e)}function Ph(e,{ignoreFieldNorm:t=q.ignoreFieldNorm}){e.forEach(i=>{let s=1;i.matches.forEach(({key:r,norm:n,score:o})=>{const a=r?r.weight:null;s*=Math.pow(o===0&&a?Number.EPSILON:o,(a||1)*(t?1:n))}),i.score=s})}function Ih(e,t){const i=e.matches;t.matches=[],qe(i)&&i.forEach(s=>{if(!qe(s.indices)||!s.indices.length)return;const{indices:r,value:n}=s;let o={indices:r,value:n};s.key&&(o.key=s.key.src),s.idx>-1&&(o.refIndex=s.idx),t.matches.push(o)})}function Oh(e,t){t.score=e.score}function Nh(e,t,{includeMatches:i=q.includeMatches,includeScore:s=q.includeScore}={}){const r=[];return i&&r.push(Ih),s&&r.push(Oh),e.map(n=>{const{idx:o}=n,a={item:t[o],refIndex:o};return r.length&&r.forEach(h=>{h(n,a)}),a})}class ti{constructor(t,i={},s){this.options={...q,...i},this.options.useExtendedSearch,this._keyStore=new lh(this.options.keys),this.setCollection(t,s)}setCollection(t,i){if(this._docs=t,i&&!(i instanceof Mr))throw new Error(sh);this._myIndex=i||fo(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){qe(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const i=[];for(let s=0,r=this._docs.length;s<r;s+=1){const n=this._docs[s];t(n,s)&&(this.removeAt(s),s-=1,r-=1,i.push(n))}return i}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:i=-1}={}){const{includeMatches:s,includeScore:r,shouldSort:n,sortFn:o,ignoreFieldNorm:a}=this.options;let h=rt(t)?rt(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return Ph(h,{ignoreFieldNorm:a}),n&&h.sort(o),lo(i)&&i>-1&&(h=h.slice(0,i)),Nh(h,this._docs,{includeMatches:s,includeScore:r})}_searchStringList(t){const i=Os(t,this.options),{records:s}=this._myIndex,r=[];return s.forEach(({v:n,i:o,n:a})=>{if(!qe(n))return;const{isMatch:h,score:l,indices:f}=i.searchIn(n);h&&r.push({item:n,idx:o,matches:[{score:l,value:n,norm:a,indices:f}]})}),r}_searchLogical(t){const i=vo(t,this.options),s=(a,h,l)=>{if(!a.children){const{keyId:u,searcher:d}=a,c=this._findMatches({key:this._keyStore.get(u),value:this._myIndex.getValueForItemAtKeyId(h,u),searcher:d});return c&&c.length?[{idx:l,item:h,matches:c}]:[]}const f=[];for(let u=0,d=a.children.length;u<d;u+=1){const c=a.children[u],p=s(c,h,l);if(p.length)f.push(...p);else if(a.operator===Zi.AND)return[]}return f},r=this._myIndex.records,n={},o=[];return r.forEach(({$:a,i:h})=>{if(qe(a)){let l=s(i,a,h);l.length&&(n[h]||(n[h]={idx:h,item:a,matches:[]},o.push(n[h])),l.forEach(({matches:f})=>{n[h].matches.push(...f)}))}}),o}_searchObjectList(t){const i=Os(t,this.options),{keys:s,records:r}=this._myIndex,n=[];return r.forEach(({$:o,i:a})=>{if(!qe(o))return;let h=[];s.forEach((l,f)=>{h.push(...this._findMatches({key:l,value:o[f],searcher:i}))}),h.length&&n.push({idx:a,item:o,matches:h})}),n}_findMatches({key:t,value:i,searcher:s}){if(!qe(i))return[];let r=[];if(pt(i))i.forEach(({v:n,i:o,n:a})=>{if(!qe(n))return;const{isMatch:h,score:l,indices:f}=s.searchIn(n);h&&r.push({score:l,key:t,value:n,idx:o,norm:a,indices:f})});else{const{v:n,n:o}=i,{isMatch:a,score:h,indices:l}=s.searchIn(n);a&&r.push({score:h,key:t,value:n,norm:o,indices:l})}return r}}ti.version="7.1.0";ti.createIndex=fo;ti.parseIndex=gh;ti.config=q;ti.parseQuery=vo;Rh(Mh);function zh(e,t,i){const s=()=>{var n,o;return new ti((n=dt(t))!==null&&n!==void 0?n:[],(o=dt(i))===null||o===void 0?void 0:o.fuseOptions)},r=J(s());return Ce(()=>{var n;return(n=dt(i))===null||n===void 0?void 0:n.fuseOptions},()=>{r.value=s()},{deep:!0}),Ce(()=>dt(t),n=>{r.value.setCollection(n)},{deep:!0}),{fuse:r,results:te(()=>{const n=dt(i);if(n?.matchAllWhenSearchEmpty&&!dt(e))return dt(t).map((a,h)=>({item:a,refIndex:h}));const o=n?.resultLimit;return r.value.search(dt(e),o?{limit:o}:void 0)})}}function Fh(e,t){let i="",s=0,r=!1;for(let n=e.length-1;n>=0;n--){if(e[n]===">")r=!0;else if(e[n]==="<"){r=!1,i=e[n]+i;continue}if(r||s++,s<=t)i=e[n]+i;else{i="..."+i;break}}return i}function Gr(e,t,i,s){function r(n,o=[]){n=n||"";let a="",h=0;o.forEach(f=>{if(f.length===2&&f[0]===f[1])return;const u=f[1]+1,d=u-f[0]>=t.length;a+=[n.substring(h,f[0]),d&&"<mark>",n.substring(f[0],u),d&&"</mark>"].filter(Boolean).join(""),h=u}),a+=n.substring(h);const l=a.indexOf("<mark>");return l!==-1&&(a=Fh(a,a.length-l)),a}if(e.matches?.length){for(const n of e.matches)if(!(i&&n.key!==i)&&!s?.includes(n.key))return r(n.value,n.indices)}}const Hh={slots:{root:"flex flex-col min-h-0 min-w-0 divide-y divide-default",input:"[&>input]:h-12",close:"",back:"p-0",content:"relative overflow-hidden flex flex-col",footer:"p-1",viewport:"relative scroll-py-1 overflow-y-auto flex-1 focus:outline-none",group:"p-1 isolate",empty:"py-6 text-center text-sm text-muted",label:"p-1.5 text-xs font-semibold text-highlighted",item:"group relative w-full flex items-start gap-1.5 p-1.5 text-sm select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75",itemLeadingIcon:"shrink-0 size-5",itemLeadingAvatar:"shrink-0",itemLeadingAvatarSize:"2xs",itemLeadingChip:"shrink-0 size-5",itemLeadingChipSize:"md",itemTrailing:"ms-auto inline-flex gap-1.5 items-center",itemTrailingIcon:"shrink-0 size-5",itemTrailingHighlightedIcon:"shrink-0 size-5 text-dimmed hidden group-data-highlighted:inline-flex",itemTrailingKbds:"hidden lg:inline-flex items-center shrink-0 gap-0.5",itemTrailingKbdsSize:"md",itemWrapper:"flex-1 flex flex-col text-start min-w-0",itemLabel:"truncate space-x-1 text-dimmed",itemDescription:"truncate text-muted",itemLabelBase:"text-highlighted [&>mark]:text-inverted [&>mark]:bg-primary",itemLabelPrefix:"text-default",itemLabelSuffix:"text-dimmed [&>mark]:text-inverted [&>mark]:bg-primary"},variants:{virtualize:{true:{viewport:"p-1 isolate"},false:{viewport:"divide-y divide-default"}},active:{true:{item:"text-highlighted before:bg-elevated",itemLeadingIcon:"text-default"},false:{item:["text-default data-highlighted:not-data-disabled:text-highlighted data-highlighted:not-data-disabled:before:bg-elevated/50","transition-colors before:transition-colors"],itemLeadingIcon:["text-dimmed group-data-highlighted:not-group-data-disabled:text-default","transition-colors"]}},loading:{true:{itemLeadingIcon:"animate-spin"}}}},$h=["innerHTML"],Wh=["innerHTML"],qh=Object.assign({inheritAttrs:!1},{__name:"UCommandPalette",props:Xi({as:{type:null,required:!1},icon:{type:null,required:!1},trailingIcon:{type:null,required:!1},selectedIcon:{type:null,required:!1},childrenIcon:{type:null,required:!1},placeholder:{type:String,required:!1},autofocus:{type:Boolean,required:!1,default:!0},close:{type:[Boolean,Object],required:!1},closeIcon:{type:null,required:!1},back:{type:[Boolean,Object],required:!1,default:!0},backIcon:{type:null,required:!1},groups:{type:Array,required:!1},fuse:{type:Object,required:!1},virtualize:{type:[Boolean,Object],required:!1,default:!1},labelKey:{type:null,required:!1,default:"label"},descriptionKey:{type:null,required:!1,default:"description"},preserveGroupOrder:{type:Boolean,required:!1,default:!1},class:{type:null,required:!1},ui:{type:null,required:!1},multiple:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},modelValue:{type:null,required:!1,default:""},defaultValue:{type:null,required:!1},highlightOnHover:{type:Boolean,required:!1,default:!0},selectionBehavior:{type:String,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1}},{searchTerm:{type:String,default:""},searchTermModifiers:{}}),emits:Xi(["update:modelValue","highlight","entryFocus","leave","update:open"],["update:searchTerm"]),setup(e,{emit:t}){const i=e,s=t,r=ei(),n=vi(e,"searchTerm",{type:String,default:""}),{t:o}=ns(),a=$t(),h=gi(zt(i,"as","disabled","multiple","modelValue","defaultValue","highlightOnHover"),s),l=Yi(zt(i,"loading")),f=ot(()=>i.virtualize?Mt(typeof i.virtualize=="boolean"?{}:i.virtualize,{estimateSize:cl(E.value,"md",i.descriptionKey)}):!1),[u,d]=Zt({props:{item:{type:Object,required:!0},group:{type:Object,required:!1},index:{type:Number,required:!1}}}),c=te(()=>Ne({extend:Ne(Hh),...a.ui?.commandPalette||{}})({virtualize:!!i.virtualize})),p=te(()=>Mt({},i.fuse,{fuseOptions:{ignoreLocation:!0,threshold:.1,keys:[i.labelKey,"suffix"]},resultLimit:12,matchAllWhenSearchEmpty:!0})),_=J([]),S=te(()=>_.value[_.value.length-1]?.placeholder||i.placeholder||o("commandPalette.placeholder")),w=te(()=>_.value?.length?[_.value[_.value.length-1]]:i.groups),y=te(()=>w.value?.filter(b=>b.id?!b.ignoreFilter:(console.warn("[@nuxt/ui] CommandPalette group is missing an `id` property"),!1))?.flatMap(b=>b.items?.map(M=>({...M,group:b.id}))||[])||[]),{results:x}=zh(n,y,p),g=Ea(x,16,!0);function L(b,M){let m=M;return b?.postFilter&&typeof b.postFilter=="function"&&(m=b.postFilter(n.value,m)),{...b,items:m.slice(0,p.value.resultLimit).map(I=>({...I,labelHtml:Gr(I,n.value,i.labelKey),suffixHtml:Gr(I,n.value,void 0,[i.labelKey])}))}}const B=te(()=>{const b=w.value,M=g.value.reduce((R,D)=>{const{item:X,matches:se}=D;return X.group&&(R[X.group]||=[],R[X.group]?.push({...X,matches:se})),R},{});if(i.preserveGroupOrder){const R=[];for(const D of b||[]){if(!D.items?.length)continue;const X=D.ignoreFilter?D.items:M[D.id];if(!X?.length)continue;const se=L(D,X);se.items?.length&&R.push(se)}return R}const m=Object.entries(M).map(([R,D])=>{const X=b?.find(Ee=>Ee.id===R);if(!X)return;const se=L(X,D);return se.items?.length?se:void 0}).filter(R=>!!R);return(b?.map((R,D)=>({...R,index:D}))?.filter(R=>R.ignoreFilter&&R.items?.length)?.map(R=>({...L(R,R.items||[]),index:R.index}))?.filter(R=>R.items?.length)||[]).reduce((R,D)=>(R.splice(D.index,0,D),R),[...m])}),E=te(()=>B.value.flatMap(b=>b.items||[])),W=Qn("rootRef");function U(b){b.children?.length&&(_.value.push({id:`history-${_.value.length}`,label:b.label,slot:b.slot,placeholder:b.placeholder,items:b.children}),n.value="",W.value?.highlightFirstItem())}function Z(){_.value.length&&(_.value.pop(),n.value="",W.value?.highlightFirstItem())}function V(){n.value||Z()}function A(b,M){M.children?.length?(b.preventDefault(),U(M)):M.onSelect?.(b)}return(b,M)=>(k(),j(ke,null,[O(v(u),null,{default:T(({item:m,index:I,group:R})=>[O(v(il),{value:v(Gi)(m,["matches","group","onSelect","labelHtml","suffixHtml","children"]),disabled:m.disabled,"as-child":"",onSelect:D=>A(D,m)},{default:T(()=>[O(Ni,G(v(zi)(m),{custom:""}),{default:T(({active:D,...X})=>[O(Yt,G(X,{"data-slot":"item",class:c.value.item({class:[i.ui?.item,m.ui?.item,m.class],active:D||m.active})}),{default:T(()=>[Y(b.$slots,m.slot||R?.slot||"item",{item:m,index:I,ui:c.value},()=>[Y(b.$slots,m.slot?`${m.slot}-leading`:R?.slot?`${R.slot}-leading`:"item-leading",{item:m,index:I,ui:c.value},()=>[m.loading?(k(),z(De,{key:0,name:e.loadingIcon||v(a).ui.icons.loading,"data-slot":"itemLeadingIcon",class:H(c.value.itemLeadingIcon({class:[i.ui?.itemLeadingIcon,m.ui?.itemLeadingIcon],loading:!0}))},null,8,["name","class"])):m.icon?(k(),z(De,{key:1,name:m.icon,"data-slot":"itemLeadingIcon",class:H(c.value.itemLeadingIcon({class:[i.ui?.itemLeadingIcon,m.ui?.itemLeadingIcon],active:D||m.active}))},null,8,["name","class"])):m.avatar?(k(),z(kr,G({key:2,size:m.ui?.itemLeadingAvatarSize||i.ui?.itemLeadingAvatarSize||c.value.itemLeadingAvatarSize()},m.avatar,{"data-slot":"itemLeadingAvatar",class:c.value.itemLeadingAvatar({class:[i.ui?.itemLeadingAvatar,m.ui?.itemLeadingAvatar],active:D||m.active})}),null,16,["size","class"])):m.chip?(k(),z(La,G({key:3,size:m.ui?.itemLeadingChipSize||i.ui?.itemLeadingChipSize||c.value.itemLeadingChipSize(),inset:"",standalone:""},m.chip,{"data-slot":"itemLeadingChip",class:c.value.itemLeadingChip({class:[i.ui?.itemLeadingChip,m.ui?.itemLeadingChip],active:D||m.active})}),null,16,["size","class"])):$("",!0)]),m.prefix||m.labelHtml||v(Oe)(m,i.labelKey)||m.suffixHtml||m.suffix||r[m.slot?`${m.slot}-label`:R?.slot?`${R.slot}-label`:"item-label"]||v(Oe)(m,i.descriptionKey)||r[m.slot?`${m.slot}-description`:R?.slot?`${R.slot}-description`:"item-description"]?(k(),j("span",{key:0,"data-slot":"itemWrapper",class:H(c.value.itemWrapper({class:[i.ui?.itemWrapper,m.ui?.itemWrapper]}))},[ie("span",{"data-slot":"itemLabel",class:H(c.value.itemLabel({class:[i.ui?.itemLabel,m.ui?.itemLabel],active:D||m.active}))},[Y(b.$slots,m.slot?`${m.slot}-label`:R?.slot?`${R.slot}-label`:"item-label",{item:m,index:I,ui:c.value},()=>[m.prefix?(k(),j("span",{key:0,"data-slot":"itemLabelPrefix",class:H(c.value.itemLabelPrefix({class:[i.ui?.itemLabelPrefix,m.ui?.itemLabelPrefix]}))},Me(m.prefix),3)):$("",!0),m.labelHtml?(k(),j("span",{key:1,"data-slot":"itemLabelBase",class:H(c.value.itemLabelBase({class:[i.ui?.itemLabelBase,m.ui?.itemLabelBase],active:D||m.active})),innerHTML:m.labelHtml},null,10,$h)):(k(),j("span",{key:2,"data-slot":"itemLabelBase",class:H(c.value.itemLabelBase({class:[i.ui?.itemLabelBase,m.ui?.itemLabelBase],active:D||m.active}))},Me(v(Oe)(m,i.labelKey)),3)),m.suffixHtml?(k(),j("span",{key:3,"data-slot":"itemLabelSuffix",class:H(c.value.itemLabelSuffix({class:[i.ui?.itemLabelSuffix,m.ui?.itemLabelSuffix],active:D||m.active})),innerHTML:m.suffixHtml},null,10,Wh)):m.suffix?(k(),j("span",{key:4,"data-slot":"itemLabelSuffix",class:H(c.value.itemLabelSuffix({class:[i.ui?.itemLabelSuffix,m.ui?.itemLabelSuffix],active:D||m.active}))},Me(m.suffix),3)):$("",!0)])],2),v(Oe)(m,i.descriptionKey)?(k(),j("span",{key:0,"data-slot":"itemDescription",class:H(c.value.itemDescription({class:[i.ui?.itemDescription,m.ui?.itemDescription]}))},[Y(b.$slots,m.slot?`${m.slot}-description`:R?.slot?`${R.slot}-description`:"item-description",{item:m,index:I,ui:c.value},()=>[at(Me(v(Oe)(m,i.descriptionKey)),1)])],2)):$("",!0)],2)):$("",!0),ie("span",{"data-slot":"itemTrailing",class:H(c.value.itemTrailing({class:[i.ui?.itemTrailing,m.ui?.itemTrailing]}))},[Y(b.$slots,m.slot?`${m.slot}-trailing`:R?.slot?`${R.slot}-trailing`:"item-trailing",{item:m,index:I,ui:c.value},()=>[m.children&&m.children.length>0?(k(),z(De,{key:0,name:e.childrenIcon||v(a).ui.icons.chevronRight,"data-slot":"itemTrailingIcon",class:H(c.value.itemTrailingIcon({class:[i.ui?.itemTrailingIcon,m.ui?.itemTrailingIcon]}))},null,8,["name","class"])):m.kbds?.length?(k(),j("span",{key:1,"data-slot":"itemTrailingKbds",class:H(c.value.itemTrailingKbds({class:[i.ui?.itemTrailingKbds,m.ui?.itemTrailingKbds]}))},[(k(!0),j(ke,null,Ge(m.kbds,(se,Ee)=>(k(),z(xr,G({key:Ee,size:m.ui?.itemTrailingKbdsSize||i.ui?.itemTrailingKbdsSize||c.value.itemTrailingKbdsSize()},{ref_for:!0},typeof se=="string"?{value:se}:se),null,16,["size"]))),128))],2)):R?.highlightedIcon?(k(),z(De,{key:2,name:R.highlightedIcon,"data-slot":"itemTrailingHighlightedIcon",class:H(c.value.itemTrailingHighlightedIcon({class:[i.ui?.itemTrailingHighlightedIcon,m.ui?.itemTrailingHighlightedIcon]}))},null,8,["name","class"])):$("",!0)]),m.children?.length?$("",!0):(k(),z(v(sl),{key:0,"as-child":""},{default:T(()=>[O(De,{name:e.selectedIcon||v(a).ui.icons.check,"data-slot":"itemTrailingIcon",class:H(c.value.itemTrailingIcon({class:[i.ui?.itemTrailingIcon,m.ui?.itemTrailingIcon]}))},null,8,["name","class"])]),_:2},1024))],2)])]),_:2},1040,["class"])]),_:2},1040)]),_:2},1032,["value","disabled","onSelect"])]),_:3}),O(v(ll),G({...v(h),...b.$attrs},{ref_key:"rootRef",ref:W,"selection-behavior":e.selectionBehavior,"data-slot":"root",class:c.value.root({class:[i.ui?.root,i.class]})}),{default:T(()=>[O(v(rl),{modelValue:n.value,"onUpdate:modelValue":M[1]||(M[1]=m=>n.value=m),"as-child":""},{default:T(()=>[O(ul,G({placeholder:S.value,variant:"none",autofocus:e.autofocus},v(l),{"loading-icon":e.loadingIcon,"trailing-icon":e.trailingIcon,icon:e.icon||v(a).ui.icons.search,"data-slot":"input",class:c.value.input({class:i.ui?.input}),onKeydown:Yn(V,["backspace"])}),os({_:2},[_.value?.length&&(e.back||r.back)?{name:"leading",fn:T(()=>[Y(b.$slots,"back",{ui:c.value},()=>[O(Jt,G({icon:e.backIcon||v(a).ui.icons.arrowLeft,color:"neutral",variant:"link","aria-label":v(o)("commandPalette.back")},typeof e.back=="object"?e.back:{},{"data-slot":"back",class:c.value.back({class:i.ui?.back}),onClick:Z}),null,16,["icon","aria-label","class"])])]),key:"0"}:void 0,e.close||r.close?{name:"trailing",fn:T(()=>[Y(b.$slots,"close",{ui:c.value},()=>[e.close?(k(),z(Jt,G({key:0,icon:e.closeIcon||v(a).ui.icons.close,color:"neutral",variant:"ghost","aria-label":v(o)("commandPalette.close")},typeof e.close=="object"?e.close:{},{"data-slot":"close",class:c.value.close({class:i.ui?.close}),onClick:M[0]||(M[0]=m=>s("update:open",!1))}),null,16,["icon","aria-label","class"])):$("",!0)])]),key:"1"}:void 0]),1040,["placeholder","autofocus","loading-icon","trailing-icon","icon","class"])]),_:3},8,["modelValue"]),O(v(nl),{"data-slot":"content",class:H(c.value.content({class:i.ui?.content}))},{default:T(()=>[B.value?.length?(k(),j("div",{key:0,role:"presentation","data-slot":"viewport",class:H(c.value.viewport({class:i.ui?.viewport}))},[e.virtualize?(k(),z(v(ol),G({key:0,options:E.value,"text-content":m=>v(Oe)(m,i.labelKey)},f.value),{default:T(({option:m,virtualItem:I})=>[O(v(d),{item:m,index:I.index},null,8,["item","index"])]),_:1},16,["options","text-content"])):(k(!0),j(ke,{key:1},Ge(B.value,m=>(k(),z(v(al),{key:`group-${m.id}`,"data-slot":"group",class:H(c.value.group({class:i.ui?.group}))},{default:T(()=>[v(Oe)(m,i.labelKey)?(k(),z(v(yl),{key:0,"data-slot":"label",class:H(c.value.label({class:i.ui?.label}))},{default:T(()=>[at(Me(v(Oe)(m,i.labelKey)),1)]),_:2},1032,["class"])):$("",!0),(k(!0),j(ke,null,Ge(m.items,(I,R)=>(k(),z(v(d),{key:`group-${m.id}-${R}`,item:I,index:R,group:m},null,8,["item","index","group"]))),128))]),_:2},1032,["class"]))),128))],2)):(k(),j("div",{key:1,"data-slot":"empty",class:H(c.value.empty({class:i.ui?.empty}))},[Y(b.$slots,"empty",{searchTerm:n.value},()=>[at(Me(n.value?v(o)("commandPalette.noMatch",{searchTerm:n.value}):v(o)("commandPalette.noData")),1)])],2))]),_:3},8,["class"]),r.footer?(k(),j("div",{key:0,"data-slot":"footer",class:H(c.value.footer({class:i.ui?.footer}))},[Y(b.$slots,"footer",{ui:c.value})],2)):$("",!0)]),_:3},16,["selection-behavior","class"])],64))}}),Kh={slots:{modal:"",input:"[&>input]:text-base/5"},variants:{fullscreen:{false:{modal:"sm:max-w-3xl h-full sm:h-[28rem]"}}}},Uh=/^[^-]+.*-.*[^-]+$/,Vh=/^[^_]+.*_.*[^_]+$/,Xr=["arrowleft","arrowright","arrowup","arrowright","tab","escape","enter","backspace"];function vs(e){return/^[a-z]$/i.test(e)?`Key${e.toUpperCase()}`:/^\d$/.test(e)?`Digit${e}`:/^f\d+$/i.test(e)?e.toUpperCase():{space:"Space",enter:"Enter",escape:"Escape",tab:"Tab",backspace:"Backspace",delete:"Delete",arrowup:"ArrowUp",arrowdown:"ArrowDown",arrowleft:"ArrowLeft",arrowright:"ArrowRight"}[e.toLowerCase()]||e}function jh(e,t={}){const i=J([]),s=()=>{i.value.splice(0,i.value.length)},r=Ba(s,t.chainDelay??800),{macOS:n}=Wa(),o=Oa(),a=t.layoutIndependent??!1,h=Xr.map(d=>vs(d)),l=d=>{if(!d.key)return;const c=a?/^Key[A-Z]$/i.test(d.code):/^[a-z]{1}$/i.test(d.key),p=a?h.includes(d.code):Xr.includes(d.key.toLowerCase());let _;if(i.value.push(a?d.code:d.key),i.value.length>=2){_=i.value.slice(-2).join("-");for(const S of u.value.filter(w=>w.chained))if(S.key===_){S.enabled&&(d.preventDefault(),S.handler(d)),s();return}}for(const S of u.value.filter(w=>!w.chained)){if(a){if(d.code!==S.key)continue}else if(d.key.toLowerCase()!==S.key)continue;if(d.metaKey===S.metaKey&&d.ctrlKey===S.ctrlKey&&!((c||p)&&d.shiftKey!==S.shiftKey)){S.enabled&&(d.preventDefault(),S.handler(d)),s();return}}r()},f=te(()=>{const d=o.value?.tagName,c=o.value?.contentEditable;return d==="INPUT"||d==="TEXTAREA"||c==="true"||c==="plaintext-only"?o.value?.name||!0:!1}),u=te(()=>Object.entries(dt(e)).map(([d,c])=>{if(!c)return null;let p;d.includes("-")&&d!=="-"&&!d.includes("_")&&!d.match(Uh)?.length&&console.trace(`[Shortcut] Invalid key: "${d}"`),d.includes("_")&&d!=="_"&&!d.match(Vh)?.length&&console.trace(`[Shortcut] Invalid key: "${d}"`);const _=d.includes("-")&&d!=="-"&&!d.includes("_");if(_)a?p={key:d.split("-").map(y=>vs(y)).join("-"),metaKey:!1,ctrlKey:!1,shiftKey:!1,altKey:!1}:p={key:d.toLowerCase(),metaKey:!1,ctrlKey:!1,shiftKey:!1,altKey:!1};else{const w=d.toLowerCase().split("_").map(x=>x);let y=w.filter(x=>!["meta","command","ctrl","shift","alt","option"].includes(x)).join("_");a&&(y=vs(y)),p={key:y,metaKey:w.includes("meta")||w.includes("command"),ctrlKey:w.includes("ctrl"),shiftKey:w.includes("shift"),altKey:w.includes("alt")||w.includes("option")}}if(p.chained=_,!n.value&&p.metaKey&&!p.ctrlKey&&(p.metaKey=!1,p.ctrlKey=!0),typeof c=="function"?p.handler=c:typeof c=="object"&&(p={...p,handler:c.handler}),!p.handler)return console.trace("[Shortcut] Invalid value"),null;let S=!0;return c.usingInput?typeof c.usingInput=="string"&&(S=f.value===c.usingInput):S=!f.value,p.enabled=S,p}).filter(Boolean));return Na("keydown",l)}const Yh={__name:"UDashboardSearch",props:Xi({icon:{type:null,required:!1},placeholder:{type:String,required:!1},autofocus:{type:Boolean,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1},close:{type:[Boolean,Object],required:!1,default:!0},closeIcon:{type:null,required:!1},shortcut:{type:String,required:!1,default:"meta_k"},groups:{type:Array,required:!1},fuse:{type:Object,required:!1},colorMode:{type:Boolean,required:!1,default:!0},class:{type:null,required:!1},ui:{type:void 0,required:!1},title:{type:String,required:!1},description:{type:String,required:!1},overlay:{type:Boolean,required:!1},transition:{type:Boolean,required:!1},content:{type:Object,required:!1},dismissible:{type:Boolean,required:!1},fullscreen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0}},{open:{type:Boolean,default:!1},openModifiers:{},searchTerm:{type:String,default:""},searchTermModifiers:{}}),emits:["update:open","update:searchTerm"],setup(e,{expose:t}){const i=e,s=ei(),r=vi(e,"open",{type:Boolean,default:!1}),n=vi(e,"searchTerm",{type:String,default:""});Ts("dashboard:search:toggle",()=>{r.value=!r.value});const{t:o}=ns(),a=Da(),h=$t(),l=Yi(zt(i,"icon","placeholder","autofocus","loading","loadingIcon","close","closeIcon")),f=Yi(zt(i,"overlay","transition","content","dismissible","fullscreen","modal","portal")),u=()=>Gi(s,["content"]),d=te(()=>Mt({},i.fuse,{fuseOptions:{}})),c=te(()=>Ne({extend:Ne(Kh),...h.ui?.dashboardSearch||{}})({fullscreen:i.fullscreen})),p=te(()=>{const w=[];return w.push(...i.groups||[]),i.colorMode&&!a?.forced&&w.push({id:"theme",label:o("dashboardSearch.theme"),items:[{label:o("colorMode.system"),icon:h.ui.icons.system,active:a.preference==="system",onSelect:()=>{a.preference="system"}},{label:o("colorMode.light"),icon:h.ui.icons.light,active:a.preference==="light",onSelect:()=>{a.preference="light"}},{label:o("colorMode.dark"),icon:h.ui.icons.dark,active:a.preference==="dark",onSelect:()=>{a.preference="dark"}}]}),w}),_=Qn("commandPaletteRef");function S(w){w.disabled||(r.value=!1,n.value="")}return jh({[i.shortcut]:{usingInput:!0,handler:()=>r.value=!r.value}}),t({commandPaletteRef:_}),(w,y)=>(k(),z(Er,G({open:r.value,"onUpdate:open":y[2]||(y[2]=x=>r.value=x),title:e.title||v(o)("dashboardSearch.title"),description:e.description||v(o)("dashboardSearch.description")},v(f),{"data-slot":"modal",class:c.value.modal({class:[i.ui?.modal,i.class]})}),{content:T(x=>[Y(w.$slots,"content",Et(Lt(x)),()=>[O(qh,G({ref_key:"commandPaletteRef",ref:_,"search-term":n.value,"onUpdate:searchTerm":y[0]||(y[0]=g=>n.value=g)},v(l),{groups:p.value,fuse:d.value,ui:v(Jn)(v(Gi)(c.value,["modal"]),i.ui),"onUpdate:modelValue":S,"onUpdate:open":y[1]||(y[1]=g=>r.value=g)}),os({_:2},[Ge(u(),(g,L)=>({name:L,fn:T(B=>[Y(w.$slots,L,Et(Lt(B)))])}))]),1040,["search-term","groups","fuse","ui"])])]),_:3},16,["open","title","description","class"]))}};function Gh(){const e=J(""),t=Ma(e,300),i=J(!1),s=J({tasks:[],documents:[]});Ce(t,async n=>{if(!n||n.length<2){s.value={tasks:[],documents:[]};return}i.value=!0;try{const[o,a]=await Promise.all([$fetch("/api/tasks",{query:{search:n}}),$fetch("/api/documents",{query:{search:n}})]);s.value={tasks:o.data.slice(0,5),documents:a.data.slice(0,5)}}catch{s.value={tasks:[],documents:[]}}finally{i.value=!1}});function r(){e.value="",s.value={tasks:[],documents:[]}}return{searchTerm:e,loading:i,results:s,reset:r}}const Xh=ze({__name:"DashboardSearch",setup(e){const t=Ra(),i=Ta(),{searchTerm:s,loading:r,results:n,reset:o}=Gh(),a={todo:"i-lucide-circle",in_progress:"i-lucide-clock",done:"i-lucide-check-circle",blocked:"i-lucide-alert-circle"},h={1:"Low",2:"Medium",3:"High"},l=[{label:"Dashboard",icon:"i-lucide-layout-dashboard",to:"/dashboard",kbds:["G","D"]},{label:"Tasks",icon:"i-lucide-check-square",to:"/tasks",kbds:["G","T"]},{label:"Docs",icon:"i-lucide-file-text",to:"/docs",kbds:["G","O"]},{label:"Settings",icon:"i-lucide-settings",to:"/settings",kbds:["G","S"]}],f=[{label:"Create new document",icon:"i-lucide-file-plus",onSelect:()=>{t.push("/docs"),i.add({title:"Create a document",description:"Right-click in the file tree to create a new file",icon:"i-lucide-info"}),o()}},{label:"Add new task",icon:"i-lucide-plus-square",onSelect:()=>{t.push("/tasks?action=new"),o()}}],u=te(()=>{const d=[];return n.value.tasks.length&&d.push({id:"tasks",label:"Tasks",ignoreFilter:!0,items:n.value.tasks.map(c=>({label:c.title,icon:a[c.status]||"i-lucide-circle",suffix:c.project?.name||h[c.priority]||"",onSelect:()=>{t.push(`/tasks?selected=${c.id}`),o()}}))}),n.value.documents.length&&d.push({id:"documents",label:"Documents",ignoreFilter:!0,items:n.value.documents.map(c=>({label:c.title,icon:"i-lucide-file-text",suffix:c.path,onSelect:()=>{t.push(`/docs?path=${encodeURIComponent(c.path)}`),o()}}))}),d.push({id:"navigation",label:"Navigation",items:l}),d.push({id:"actions",label:"Actions",items:f,postFilter:(c,p)=>{if(!c)return p;const _=c.toLowerCase();return["new","create","add"].some(S=>_.includes(S))?p:[]}}),d});return(d,c)=>{const p=Yh;return k(),z(p,{"search-term":v(s),"onUpdate:searchTerm":c[0]||(c[0]=_=>mi(s)?s.value=_:null),groups:v(u),loading:v(r),placeholder:"Search tasks, docs, or type a command...",fuse:{resultLimit:10}},null,8,["search-term","groups","loading"])}}}),Jh=Object.assign(Xh,{__name:"SearchDashboardSearch"});var mo=Object.defineProperty,Zh=Object.getOwnPropertyDescriptor,Qh=(e,t)=>{for(var i in t)mo(e,i,{get:t[i],enumerable:!0})},ce=(e,t,i,s)=>{for(var r=s>1?void 0:s?Zh(t,i):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(r=(s?o(t,i,r):o(r))||r);return s&&r&&mo(t,i,r),r},N=(e,t)=>(i,s)=>t(i,s,e),Jr="Terminal input",Fs={get:()=>Jr,set:e=>Jr=e},Zr="Too much output to announce, navigate to rows manually to read",Hs={get:()=>Zr,set:e=>Zr=e};function ec(e){return e.replace(/\r?\n/g,"\r")}function tc(e,t){return t?"\x1B[200~"+e+"\x1B[201~":e}function ic(e,t){e.clipboardData&&e.clipboardData.setData("text/plain",t.selectionText),e.preventDefault()}function sc(e,t,i,s){if(e.stopPropagation(),e.clipboardData){let r=e.clipboardData.getData("text/plain");So(r,t,i,s)}}function So(e,t,i,s){e=ec(e),e=tc(e,i.decPrivateModes.bracketedPasteMode&&s.rawOptions.ignoreBracketedPasteMode!==!0),i.triggerDataEvent(e,!0),t.value=""}function bo(e,t,i){let s=i.getBoundingClientRect(),r=e.clientX-s.left-10,n=e.clientY-s.top-10;t.style.width="20px",t.style.height="20px",t.style.left=`${r}px`,t.style.top=`${n}px`,t.style.zIndex="1000",t.focus()}function Qr(e,t,i,s,r){bo(e,t,i),r&&s.rightClickSelect(e),t.value=s.selectionText,t.select()}function xt(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function ls(e,t=0,i=e.length){let s="";for(let r=t;r<i;++r){let n=e[r];n>65535?(n-=65536,s+=String.fromCharCode((n>>10)+55296)+String.fromCharCode(n%1024+56320)):s+=String.fromCharCode(n)}return s}var rc=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let i=e.length;if(!i)return 0;let s=0,r=0;if(this._interim){let n=e.charCodeAt(r++);56320<=n&&n<=57343?t[s++]=(this._interim-55296)*1024+n-56320+65536:(t[s++]=this._interim,t[s++]=n),this._interim=0}for(let n=r;n<i;++n){let o=e.charCodeAt(n);if(55296<=o&&o<=56319){if(++n>=i)return this._interim=o,s;let a=e.charCodeAt(n);56320<=a&&a<=57343?t[s++]=(o-55296)*1024+a-56320+65536:(t[s++]=o,t[s++]=a);continue}o!==65279&&(t[s++]=o)}return s}},nc=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let i=e.length;if(!i)return 0;let s=0,r,n,o,a,h=0,l=0;if(this.interim[0]){let d=!1,c=this.interim[0];c&=(c&224)===192?31:(c&240)===224?15:7;let p=0,_;for(;(_=this.interim[++p]&63)&&p<4;)c<<=6,c|=_;let S=(this.interim[0]&224)===192?2:(this.interim[0]&240)===224?3:4,w=S-p;for(;l<w;){if(l>=i)return 0;if(_=e[l++],(_&192)!==128){l--,d=!0;break}else this.interim[p++]=_,c<<=6,c|=_&63}d||(S===2?c<128?l--:t[s++]=c:S===3?c<2048||c>=55296&&c<=57343||c===65279||(t[s++]=c):c<65536||c>1114111||(t[s++]=c)),this.interim.fill(0)}let f=i-4,u=l;for(;u<i;){for(;u<f&&!((r=e[u])&128)&&!((n=e[u+1])&128)&&!((o=e[u+2])&128)&&!((a=e[u+3])&128);)t[s++]=r,t[s++]=n,t[s++]=o,t[s++]=a,u+=4;if(r=e[u++],r<128)t[s++]=r;else if((r&224)===192){if(u>=i)return this.interim[0]=r,s;if(n=e[u++],(n&192)!==128){u--;continue}if(h=(r&31)<<6|n&63,h<128){u--;continue}t[s++]=h}else if((r&240)===224){if(u>=i)return this.interim[0]=r,s;if(n=e[u++],(n&192)!==128){u--;continue}if(u>=i)return this.interim[0]=r,this.interim[1]=n,s;if(o=e[u++],(o&192)!==128){u--;continue}if(h=(r&15)<<12|(n&63)<<6|o&63,h<2048||h>=55296&&h<=57343||h===65279)continue;t[s++]=h}else if((r&248)===240){if(u>=i)return this.interim[0]=r,s;if(n=e[u++],(n&192)!==128){u--;continue}if(u>=i)return this.interim[0]=r,this.interim[1]=n,s;if(o=e[u++],(o&192)!==128){u--;continue}if(u>=i)return this.interim[0]=r,this.interim[1]=n,this.interim[2]=o,s;if(a=e[u++],(a&192)!==128){u--;continue}if(h=(r&7)<<18|(n&63)<<12|(o&63)<<6|a&63,h<65536||h>1114111)continue;t[s++]=h}}return s}},yo="",Bt=" ",ki=class wo{constructor(){this.fg=0,this.bg=0,this.extended=new Qi}static toColorRGB(t){return[t>>>16&255,t>>>8&255,t&255]}static fromColorRGB(t){return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255}clone(){let t=new wo;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},Qi=class Co{constructor(t=0,i=0){this._ext=0,this._urlId=0,this._ext=t,this._urlId=i}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(t){this._ext=t}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(t){this._ext&=-469762049,this._ext|=t<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(t){this._ext&=-67108864,this._ext|=t&67108863}get urlId(){return this._urlId}set urlId(t){this._urlId=t}get underlineVariantOffset(){let t=(this._ext&3758096384)>>29;return t<0?t^4294967288:t}set underlineVariantOffset(t){this._ext&=536870911,this._ext|=t<<29&3758096384}clone(){return new Co(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},Xe=class ko extends ki{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new Qi,this.combinedData=""}static fromCharData(t){let i=new ko;return i.setFromCharData(t),i}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?xt(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(t){this.fg=t[0],this.bg=0;let i=!1;if(t[1].length>2)i=!0;else if(t[1].length===2){let s=t[1].charCodeAt(0);if(55296<=s&&s<=56319){let r=t[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(s-55296)*1024+r-56320+65536|t[2]<<22:i=!0}else i=!0}else this.content=t[1].charCodeAt(0)|t[2]<<22;i&&(this.combinedData=t[1],this.content=2097152|t[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},en="di$target",$s="di$dependencies",ms=new Map;function oc(e){return e[$s]||[]}function we(e){if(ms.has(e))return ms.get(e);let t=function(i,s,r){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");ac(t,i,r)};return t._id=e,ms.set(e,t),t}function ac(e,t,i){t[en]===t?t[$s].push({id:e,index:i}):(t[$s]=[{id:e,index:i}],t[en]=t)}var Te=we("BufferService"),xo=we("CoreMouseService"),qt=we("CoreService"),lc=we("CharsetService"),Rr=we("InstantiationService"),Eo=we("LogService"),Ae=we("OptionsService"),Lo=we("OscLinkService"),hc=we("UnicodeService"),xi=we("DecorationService"),Ws=class{constructor(e,t,i){this._bufferService=e,this._optionsService=t,this._oscLinkService=i}provideLinks(e,t){let i=this._bufferService.buffer.lines.get(e-1);if(!i){t(void 0);return}let s=[],r=this._optionsService.rawOptions.linkHandler,n=new Xe,o=i.getTrimmedLength(),a=-1,h=-1,l=!1;for(let f=0;f<o;f++)if(!(h===-1&&!i.hasContent(f))){if(i.loadCell(f,n),n.hasExtendedAttrs()&&n.extended.urlId)if(h===-1){h=f,a=n.extended.urlId;continue}else l=n.extended.urlId!==a;else h!==-1&&(l=!0);if(l||h!==-1&&f===o-1){let u=this._oscLinkService.getLinkData(a)?.uri;if(u){let d={start:{x:h+1,y:e},end:{x:f+(!l&&f===o-1?1:0),y:e}},c=!1;if(!r?.allowNonHttpProtocols)try{let p=new URL(u);["http:","https:"].includes(p.protocol)||(c=!0)}catch{c=!0}c||s.push({text:u,range:d,activate:(p,_)=>r?r.activate(p,_,d):cc(p,_),hover:(p,_)=>r?.hover?.(p,_,d),leave:(p,_)=>r?.leave?.(p,_,d)})}l=!1,n.hasExtendedAttrs()&&n.extended.urlId?(h=f,a=n.extended.urlId):(h=-1,a=-1)}}t(s)}};Ws=ce([N(0,Te),N(1,Ae),N(2,Lo)],Ws);function cc(e,t){if(confirm(`Do you want to navigate to ${t}?
|
|
2
2
|
|
|
3
3
|
WARNING: This link could potentially be dangerous`)){let i=window.open();if(i){try{i.opener=null}catch{}i.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}}var hs=we("CharSizeService"),vt=we("CoreBrowserService"),Tr=we("MouseService"),mt=we("RenderService"),uc=we("SelectionService"),Bo=we("CharacterJoinerService"),ii=we("ThemeService"),Do=we("LinkProviderService"),dc=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?tn.isErrorNoTelemetry(e)?new tn(e.message+`
|
|
4
4
|
|