@piwitests/server 0.18.0 → 0.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{BEB2Mv6B.js → 4TxgDGVa.js} +1 -1
  3. package/.output/public/_nuxt/{CBEM3L1q.js → 9-wVZMur.js} +1 -1
  4. package/.output/public/_nuxt/{l0QnzFNM.js → B-5GukRk.js} +1 -1
  5. package/.output/public/_nuxt/{lowCGL2S.js → B-IcwqZ2.js} +1 -1
  6. package/.output/public/_nuxt/{CmbjAoQu.js → B1G3GGhQ.js} +1 -1
  7. package/.output/public/_nuxt/{Dwp3GkV-.js → B1X__ilH.js} +1 -1
  8. package/.output/public/_nuxt/{CCsl9MOZ.js → B1zMFx24.js} +1 -1
  9. package/.output/public/_nuxt/{B6IHiVa1.js → B2oUeBbA.js} +1 -1
  10. package/.output/public/_nuxt/{BAaSmp8J.js → B4jvLMfS.js} +1 -1
  11. package/.output/public/_nuxt/{mlAADjK3.js → BBK2-Krn.js} +1 -1
  12. package/.output/public/_nuxt/{Vnfkr1pJ.js → BFP6M-20.js} +1 -1
  13. package/.output/public/_nuxt/{oFIS9u6t.js → BHpUiv6j.js} +1 -1
  14. package/.output/public/_nuxt/{Bi3i470l.js → BJtlcTrb.js} +1 -1
  15. package/.output/public/_nuxt/{BoC6qaRF.js → BLIRKrbM.js} +1 -1
  16. package/.output/public/_nuxt/{D1ttGJfs.js → BLOUs6AE.js} +1 -1
  17. package/.output/public/_nuxt/{n-QWmQgc.js → BOCwBVnz.js} +1 -1
  18. package/.output/public/_nuxt/{CTgM5Fke.js → BT6p4Pgt.js} +1 -1
  19. package/.output/public/_nuxt/{DB3ljns7.js → BUXSUkJ_.js} +1 -1
  20. package/.output/public/_nuxt/{36cXPVrY.js → BVf6Yx9V.js} +1 -1
  21. package/.output/public/_nuxt/{DOr_4nln.js → BXY_PWcx.js} +1 -1
  22. package/.output/public/_nuxt/{B6rt3IcG.js → BbS6Bwby.js} +1 -1
  23. package/.output/public/_nuxt/{Dbg8z684.js → Bd3HqPMF.js} +1 -1
  24. package/.output/public/_nuxt/{DnThe2U0.js → BeFDVhpA.js} +1 -1
  25. package/.output/public/_nuxt/{BUMZHDRC.js → BeKvLsja.js} +1 -1
  26. package/.output/public/_nuxt/{BCArQk0c.js → BeUm5UNV.js} +1 -1
  27. package/.output/public/_nuxt/{TBDx0s9p.js → BfV444H3.js} +1 -1
  28. package/.output/public/_nuxt/{D8YZvjas.js → BjCHB89N.js} +1 -1
  29. package/.output/public/_nuxt/{C9ahP7km.js → BjKamgHq.js} +1 -1
  30. package/.output/public/_nuxt/{DRE6Aqqp.js → BlA8mIS-.js} +1 -1
  31. package/.output/public/_nuxt/{BaDv5D7A.js → BlnwU1OO.js} +1 -1
  32. package/.output/public/_nuxt/{C11lmBd4.js → BoJdjCVl.js} +1 -1
  33. package/.output/public/_nuxt/{BiX7c2qU.js → BreO2PiA.js} +1 -1
  34. package/.output/public/_nuxt/{EltzgiyS.js → BvIDC_R-.js} +1 -1
  35. package/.output/public/_nuxt/{D3MWm6JP.js → By4YL7mx.js} +1 -1
  36. package/.output/public/_nuxt/{BdHdHyop.js → ByuJWADR.js} +1 -1
  37. package/.output/public/_nuxt/{KYucVFu7.js → C1dyLp_j.js} +1 -1
  38. package/.output/public/_nuxt/{CPZ5wygb.js → C8OCrfDP.js} +1 -1
  39. package/.output/public/_nuxt/{AjuKBlzz.js → C9YzQCiq.js} +1 -1
  40. package/.output/public/_nuxt/{q0DPzLKN.js → CAUgpKsF.js} +1 -1
  41. package/.output/public/_nuxt/{riEUDnED.js → CL9-VLTJ.js} +1 -1
  42. package/.output/public/_nuxt/{empGC_x-.js → CN1mJlvD.js} +1 -1
  43. package/.output/public/_nuxt/{quV6tp4n.js → CNMoZYMv.js} +1 -1
  44. package/.output/public/_nuxt/{va1mwSm9.js → CPLJeOCb.js} +1 -1
  45. package/.output/public/_nuxt/{CRpbGS75.js → CUvGJXY3.js} +1 -1
  46. package/.output/public/_nuxt/{CU3W9YrI.js → CazDIG_m.js} +1 -1
  47. package/.output/public/_nuxt/{rm7OkgDG.js → CcXaak_K.js} +1 -1
  48. package/.output/public/_nuxt/{87SGk1nu.js → CdMuck_X.js} +1 -1
  49. package/.output/public/_nuxt/{BTYiG93l.js → CfOLBbW9.js} +1 -1
  50. package/.output/public/_nuxt/{Bi9DO8jm.js → CfPSts5n.js} +1 -1
  51. package/.output/public/_nuxt/{CLdGRzLL.js → CfROFPse.js} +1 -1
  52. package/.output/public/_nuxt/Cnapl7lZ.js +1 -0
  53. package/.output/public/_nuxt/{D51_cB9D.js → Cng9gj7q.js} +1 -1
  54. package/.output/public/_nuxt/{wGpfdK6o.js → CsUoYK75.js} +1 -1
  55. package/.output/public/_nuxt/{CGq9qR-0.js → CscWZxCi.js} +1 -1
  56. package/.output/public/_nuxt/{DcfRfTaA.js → CuicKV-B.js} +1 -1
  57. package/.output/public/_nuxt/{DraETso1.js → Cyiu1VQD.js} +1 -1
  58. package/.output/public/_nuxt/{B_aSGB8S.js → D0cnIs93.js} +1 -1
  59. package/.output/public/_nuxt/{CP0vUzbd.js → D5oNv2cB.js} +1 -1
  60. package/.output/public/_nuxt/{CCw3Tx4S.js → D6PUPmRC.js} +1 -1
  61. package/.output/public/_nuxt/{ClIKZ4qY.js → DBtBvrYc.js} +1 -1
  62. package/.output/public/_nuxt/{BFjmLXYo.js → DCl2yo4g.js} +1 -1
  63. package/.output/public/_nuxt/{BVDBIVAQ.js → DD5HpaW9.js} +1 -1
  64. package/.output/public/_nuxt/{C8cz5feG.js → DHXWp5yD.js} +1 -1
  65. package/.output/public/_nuxt/{D3SYPlEB.js → DHltYerF.js} +3 -3
  66. package/.output/public/_nuxt/{C4AfzZER.js → DLXydYJb.js} +1 -1
  67. package/.output/public/_nuxt/{BJltXwHg.js → DRPSi76A.js} +1 -1
  68. package/.output/public/_nuxt/{HTQtMbWb.js → DS53kyHJ.js} +1 -1
  69. package/.output/public/_nuxt/{C7ZVzS0K.js → DWhBqv_7.js} +1 -1
  70. package/.output/public/_nuxt/{DoYgYLOd.js → DWowvnwc.js} +1 -1
  71. package/.output/public/_nuxt/{Doul3p1_.js → DXbPFI1d.js} +1 -1
  72. package/.output/public/_nuxt/{BKaU95es.js → DZ1zNBVM.js} +1 -1
  73. package/.output/public/_nuxt/{Db_-yjYg.js → DZ3Vfcpz.js} +1 -1
  74. package/.output/public/_nuxt/{BfoG8R5a.js → DZOS7Fh7.js} +1 -1
  75. package/.output/public/_nuxt/{CUDeMcEK.js → DZUgX70W.js} +1 -1
  76. package/.output/public/_nuxt/{oWY3I9uX.js → Dd0kK5WH.js} +1 -1
  77. package/.output/public/_nuxt/{wQZj69OY.js → Df7kUO0m.js} +1 -1
  78. package/.output/public/_nuxt/{ClVRQpP_.js → Dga3Av-m.js} +1 -1
  79. package/.output/public/_nuxt/{Dy4TloG3.js → DgwTpwfB.js} +1 -1
  80. package/.output/public/_nuxt/DkI145a5.js +1 -0
  81. package/.output/public/_nuxt/{C9EpbPNU.js → DoFBTaDR.js} +1 -1
  82. package/.output/public/_nuxt/{DC51KKt4.js → Dr_dI5hB.js} +1 -1
  83. package/.output/public/_nuxt/{DoFSKAvY.js → Dwws9U0D.js} +1 -1
  84. package/.output/public/_nuxt/{DaewB_zT.js → EPZOxdgq.js} +1 -1
  85. package/.output/public/_nuxt/{DVgMaBxD.js → QmMoMxLM.js} +1 -1
  86. package/.output/public/_nuxt/{Dm1_3W9g.js → R1nNqTru.js} +1 -1
  87. package/.output/public/_nuxt/{WAaPPk0g.js → S5DLdEpg.js} +1 -1
  88. package/.output/public/_nuxt/builds/latest.json +1 -1
  89. package/.output/public/_nuxt/builds/meta/7caf3cb3-d272-4dbd-bb3f-1eeb64fab5d1.json +1 -0
  90. package/.output/public/_nuxt/{BAkJhSAW.js → e7zD3uJ0.js} +1 -1
  91. package/.output/public/_nuxt/{CYIR2GbL.js → gCELhaU9.js} +1 -1
  92. package/.output/public/_nuxt/{Do6zIWQf.js → gnCL8GjZ.js} +1 -1
  93. package/.output/public/_nuxt/{BuuvTH9e.js → hH1UFE3Z.js} +1 -1
  94. package/.output/public/_nuxt/{BReNbog6.js → hgHc4teu.js} +1 -1
  95. package/.output/public/_nuxt/{uaqMzXqE.js → ipDzNHcs.js} +1 -1
  96. package/.output/public/_nuxt/{B1CB30tg.js → kS3boz40.js} +1 -1
  97. package/.output/public/_nuxt/{DIA_NAIv.js → kjYMoWWx.js} +1 -1
  98. package/.output/public/_nuxt/{BsDB_eCd.js → oFM1KLWA.js} +1 -1
  99. package/.output/public/_nuxt/qH_j2A3a.js +1 -0
  100. package/.output/public/_nuxt/{DM_YaJgJ.js → qpI-_f9Q.js} +1 -1
  101. package/.output/public/_nuxt/{CRcjGmf7.js → rTvJTef_.js} +1 -1
  102. package/.output/public/_nuxt/{Ccit_CX1.js → rsiRgrVM.js} +1 -1
  103. package/.output/public/_nuxt/{Tt5LX5Y-.js → swrbBdtB.js} +1 -1
  104. package/.output/public/_nuxt/{DCMFuzDI.js → wHnZ9OaL.js} +1 -1
  105. package/.output/public/_nuxt/{D4SFgXAf.js → xqiPI_FQ.js} +1 -1
  106. package/.output/public/sw.js +1 -1
  107. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  108. package/.output/server/chunks/nitro/nitro.mjs +745 -738
  109. package/.output/server/package.json +1 -1
  110. package/package.json +1 -1
  111. package/.output/public/_nuxt/CiPH-swI.js +0 -1
  112. package/.output/public/_nuxt/Cx65B3c3.js +0 -1
  113. package/.output/public/_nuxt/builds/meta/ed1db2e5-9865-4231-9605-4edd5272e164.json +0 -1
  114. package/.output/public/_nuxt/wgcgHmRR.js +0 -1
@@ -1 +1 @@
1
- import{bW as Qe,r as A,h as K,aM as et,d as D,W as Ae,X as $e,b6 as ve,ay as tt,o as d,f as w,g as m,T,k as e,a$ as Ve,c as H,q as j,F as le,y as Se,U as $,ba as at,Y as me,B as Le,i as Be,bH as lt,bi as He,bm as it,bg as nt,bf as rt,bh as ot,bX as We,at as st,j as N,bk as ut,H as fe,bl as dt,ae as je,bV as ct,bY as De,S as ne,C as J,G as ce,aD as pt,V as Y,O as ft,Z as xe,bn as gt,bo as vt,ab as Ge,$ as Ee,aB as mt,af as yt,az as Oe,aK as ht,bj as bt,br as _t,be as St,m as ie,t as pe,a0 as xt,a1 as qt,a3 as wt,a4 as Ct,a5 as It,bs as Tt,aN as kt,bt as Pt,aY as Bt,aP as Re,b4 as ae,p as M,v as _e,aH as Fe,bv as zt,aG as de,bu as At,bw as Me,bx as Pe,aZ as Lt,a6 as Et,bz as Ot}from"./D3SYPlEB.js";import{u as $t}from"./Cx65B3c3.js";function Ne(i,s=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY){return Math.min(a,Math.max(s,i))}function Vt(i){const s=Qe({nonce:A()});return K(()=>i?.value||s.nonce?.value)}const Dt=[" ","Enter","ArrowUp","ArrowDown"],Rt=[" ","Enter"],U=10;function ge(i,s,a){return i===void 0?!1:Array.isArray(i)?i.some(f=>ze(f,s,a)):ze(i,s,a)}function ze(i,s,a){return i===void 0||s===void 0?!1:typeof i=="string"?i===s:typeof a=="function"?a(i,s):typeof a=="string"?i?.[a]===s?.[a]:et(i,s)}function Ft(i){return i==null||i===""||Array.isArray(i)&&i.length===0}const Mt=["value"],[Q,Ue]=me("SelectRoot");var Nt=D({inheritAttrs:!1,__name:"SelectRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},nullableValue:{type:String,required:!1,default:""},by:{type:[String,Function],required:!1},dir:{type:String,required:!1},multiple:{type:Boolean,required:!1},autocomplete:{type:String,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","update:open"],setup(i,{emit:s}){const a=i,f=s,{required:r,disabled:u,multiple:t,dir:c}=Ae(a),g=$e(a,"modelValue",f,{defaultValue:a.defaultValue??(t.value?[]:void 0),passive:a.modelValue===void 0,deep:!0}),v=$e(a,"open",f,{defaultValue:a.defaultOpen,passive:a.open===void 0}),b=A(),y=A(),I=A({x:0,y:0}),C=K(()=>t.value&&Array.isArray(g.value)?g.value?.length===0:Ve(g.value));ve({isProvider:!0});const O=tt(c),F=$t(b),L=A(new Set),h=K(()=>Array.from(L.value).map(l=>l.value).join(";"));function B(l){if(t.value){const _=Array.isArray(g.value)?[...g.value]:[],p=_.findIndex(q=>ze(q,l,a.by));p===-1?_.push(l):_.splice(p,1),g.value=[..._]}else g.value=l}function S(l){return Array.from(L.value).find(_=>ge(l,_.value,a.by))}return Ue({triggerElement:b,onTriggerChange:l=>{b.value=l},valueElement:y,onValueElementChange:l=>{y.value=l},contentId:"",modelValue:g,onValueChange:B,by:a.by,open:v,multiple:t,required:r,onOpenChange:l=>{v.value=l},dir:O,triggerPointerDownPosRef:I,disabled:u,isEmptyModelValue:C,optionsSet:L,onOptionAdd:l=>{const _=S(l.value);_&&L.value.delete(_),L.value.add(l)},onOptionRemove:l=>{const _=S(l.value);_&&L.value.delete(_)}}),(l,_)=>(d(),w(e(at),null,{default:m(()=>[T(l.$slots,"default",{modelValue:e(g),open:e(v)}),e(F)&&l.name?(d(),w(Wt,{key:h.value,"aria-hidden":"true",tabindex:"-1",multiple:e(t),required:e(r),name:l.name,autocomplete:l.autocomplete,disabled:e(u),value:e(g)},{default:m(()=>[e(Ve)(e(g))?(d(),H("option",{key:0,value:l.nullableValue},null,8,Mt)):j("v-if",!0),(d(!0),H(le,null,Se(Array.from(L.value),p=>(d(),H("option",$({key:p.value??""},{ref_for:!0},p),null,16))),128))]),_:1},8,["multiple","required","name","autocomplete","disabled","value"])):j("v-if",!0)]),_:3}))}}),Kt=Nt,Ht=D({__name:"BubbleSelect",props:{autocomplete:{type:String,required:!1},autofocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},form:{type:String,required:!1},multiple:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},size:{type:Number,required:!1},value:{type:null,required:!1}},setup(i){const s=i,a=A(),f=Q();Le(()=>s.value,(u,t)=>{const c=window.HTMLSelectElement.prototype,v=Object.getOwnPropertyDescriptor(c,"value").set;if(u!==t&&v&&a.value){const b=new Event("change",{bubbles:!0});v.call(a.value,u),a.value.dispatchEvent(b)}});function r(u){f.onValueChange(u.target.value)}return(u,t)=>(d(),w(e(lt),{"as-child":""},{default:m(()=>[Be("select",$({ref_key:"selectElement",ref:a},s,{onInput:r}),[T(u.$slots,"default")],16)]),_:3}))}}),Wt=Ht,jt=D({__name:"SelectPopperPosition",props:{memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1,default:U},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const a=He(i);return(f,r)=>(d(),w(e(it),$(e(a),{style:{boxSizing:"border-box","--reka-select-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-select-content-available-width":"var(--reka-popper-available-width)","--reka-select-content-available-height":"var(--reka-popper-available-height)","--reka-select-trigger-width":"var(--reka-popper-anchor-width)","--reka-select-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:m(()=>[T(f.$slots,"default")]),_:3},16))}}),Gt=jt;const Ye={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[ye,Xe]=me("SelectContent");var Ut=D({__name:"SelectContentImpl",props:{position:{type:String,required:!1,default:"item-aligned"},bodyLock:{type:Boolean,required:!1,default:!0},memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:!0}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(i,{emit:s}){const a=i,f=s,r=Q();nt(),rt(a.bodyLock);const{CollectionSlot:u,getItems:t}=ve(),c=A();ot(c);const{search:g,handleTypeaheadSearch:v}=We(),b=A(),y=A(),I=A(),C=A(!1),O=A(!1),F=A(!1);function L(){y.value&&c.value&&De([y.value,c.value])}Le(C,()=>{L()});const{onOpenChange:h,triggerPointerDownPosRef:B}=r;st(p=>{if(!c.value)return;let q={x:0,y:0};const k=P=>{q={x:Math.abs(Math.round(P.pageX)-(B.value?.x??0)),y:Math.abs(Math.round(P.pageY)-(B.value?.y??0))}},z=P=>{P.pointerType!=="touch"&&(q.x<=10&&q.y<=10?P.preventDefault():c.value?.contains(P.target)||h(!1),document.removeEventListener("pointermove",k),B.value=null)};B.value!==null&&(document.addEventListener("pointermove",k),document.addEventListener("pointerup",z,{capture:!0,once:!0})),p(()=>{document.removeEventListener("pointermove",k),document.removeEventListener("pointerup",z,{capture:!0})})});function S(p){const q=p.ctrlKey||p.altKey||p.metaKey;if(p.key==="Tab"&&p.preventDefault(),!q&&p.key.length===1&&v(p.key,t()),["ArrowUp","ArrowDown","Home","End"].includes(p.key)){let z=[...t().map(P=>P.ref)];if(["ArrowUp","End"].includes(p.key)&&(z=z.slice().reverse()),["ArrowUp","ArrowDown"].includes(p.key)){const P=p.target,Z=z.indexOf(P);z=z.slice(Z+1)}setTimeout(()=>De(z)),p.preventDefault()}}const l=K(()=>a.position==="popper"?a:{}),_=He(l.value);return Xe({content:c,viewport:b,onViewportChange:p=>{b.value=p},itemRefCallback:(p,q,k)=>{const z=!O.value&&!k,P=ge(r.modelValue.value,q,r.by);if(r.multiple.value){if(F.value)return;(P||z)&&(y.value=p,P&&(F.value=!0))}else(P||z)&&(y.value=p);z&&(O.value=!0)},selectedItem:y,selectedItemText:I,onItemLeave:()=>{c.value?.focus()},itemTextRefCallback:(p,q,k)=>{const z=!O.value&&!k;(ge(r.modelValue.value,q,r.by)||z)&&(I.value=p)},focusSelectedItem:L,position:a.position,isPositioned:C,searchRef:g}),(p,q)=>(d(),w(e(u),null,{default:m(()=>[N(e(ut),{"as-child":"",onMountAutoFocus:q[6]||(q[6]=fe(()=>{},["prevent"])),onUnmountAutoFocus:q[7]||(q[7]=k=>{f("closeAutoFocus",k),!k.defaultPrevented&&(e(r).triggerElement.value?.focus({preventScroll:!0}),k.preventDefault())})},{default:m(()=>[N(e(dt),{"as-child":"","disable-outside-pointer-events":p.disableOutsidePointerEvents,onFocusOutside:q[2]||(q[2]=fe(()=>{},["prevent"])),onDismiss:q[3]||(q[3]=k=>e(r).onOpenChange(!1)),onEscapeKeyDown:q[4]||(q[4]=k=>f("escapeKeyDown",k)),onPointerDownOutside:q[5]||(q[5]=k=>f("pointerDownOutside",k))},{default:m(()=>[(d(),w(je(p.position==="popper"?Gt:Qt),$({...p.$attrs,...e(_)},{id:e(r).contentId,ref:k=>{if(!k)return;const z=e(ct)(k);z?.hasAttribute("data-reka-popper-content-wrapper")?c.value=z.firstElementChild:c.value=z},role:"listbox","data-state":e(r).open.value?"open":"closed",dir:e(r).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:q[0]||(q[0]=fe(()=>{},["prevent"])),onPlaced:q[1]||(q[1]=k=>C.value=!0),onKeydown:S}),{default:m(()=>[T(p.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3},8,["disable-outside-pointer-events"])]),_:3})]),_:3}))}}),Yt=Ut;const[Xt,Zt]=me("SelectItemAlignedPosition");var Jt=D({inheritAttrs:!1,__name:"SelectItemAlignedPosition",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["placed"],setup(i,{emit:s}){const a=i,f=s,{getItems:r}=ve(),u=Q(),t=ye(),c=A(!1),g=A(!0),v=A(),{forwardRef:b,currentElement:y}=ne(),{viewport:I,selectedItem:C,selectedItemText:O,focusSelectedItem:F}=t;function L(){if(u.triggerElement.value&&u.valueElement.value&&v.value&&y.value&&I?.value&&C?.value&&O?.value){const S=u.triggerElement.value.getBoundingClientRect(),l=y.value.getBoundingClientRect(),_=u.valueElement.value.getBoundingClientRect(),p=O.value.getBoundingClientRect();if(u.dir.value!=="rtl"){const o=p.left-l.left,V=_.left-o,R=S.left-V,W=S.width+R,G=Math.max(W,l.width),ee=window.innerWidth-U,n=Ne(V,U,Math.max(U,ee-G));v.value.style.minWidth=`${W}px`,v.value.style.left=`${n}px`}else{const o=l.right-p.right,V=window.innerWidth-_.right-o,R=window.innerWidth-S.right-V,W=S.width+R,G=Math.max(W,l.width),ee=window.innerWidth-U,n=Ne(V,U,Math.max(U,ee-G));v.value.style.minWidth=`${W}px`,v.value.style.right=`${n}px`}const q=r().map(o=>o.ref),k=window.innerHeight-U*2,z=I.value.scrollHeight,P=window.getComputedStyle(y.value),Z=Number.parseInt(P.borderTopWidth,10),re=Number.parseInt(P.paddingTop,10),oe=Number.parseInt(P.borderBottomWidth,10),qe=Number.parseInt(P.paddingBottom,10),he=Z+re+z+qe+oe,x=Math.min(C.value.offsetHeight*5,he),se=window.getComputedStyle(I.value),be=Number.parseInt(se.paddingTop,10),we=Number.parseInt(se.paddingBottom,10),X=S.top+S.height/2-U,Ce=k-X,ue=C.value.offsetHeight/2,Ie=C.value.offsetTop+ue,E=Z+re+Ie,Te=he-E;if(E<=X){const o=C.value===q.at(-1);v.value.style.bottom="0px";const V=y.value.clientHeight-I.value.offsetTop-I.value.offsetHeight,R=Math.max(Ce,ue+(o?we:0)+V+oe),W=E+R;v.value.style.height=`${W}px`}else{const o=C.value===q[0];v.value.style.top="0px";const R=Math.max(X,Z+I.value.offsetTop+(o?be:0)+ue)+Te;v.value.style.height=`${R}px`,I.value.scrollTop=E-X+I.value.offsetTop}v.value.style.margin=`${U}px 0`,v.value.style.minHeight=`${x}px`,v.value.style.maxHeight=`${k}px`,f("placed"),requestAnimationFrame(()=>c.value=!0)}}const h=A("");J(async()=>{await ce(),L(),y.value&&(h.value=window.getComputedStyle(y.value).zIndex)});function B(S){S&&g.value===!0&&(L(),F?.(),g.value=!1)}return pt(u.triggerElement,()=>{L()}),Zt({contentWrapper:v,shouldExpandOnScrollRef:c,onScrollButtonChange:B}),(S,l)=>(d(),H("div",{ref_key:"contentWrapperElement",ref:v,style:ft({display:"flex",flexDirection:"column",position:"fixed",zIndex:h.value})},[N(e(Y),$({ref:e(b),style:{boxSizing:"border-box",maxHeight:"100%"}},{...S.$attrs,...a}),{default:m(()=>[T(S.$slots,"default")]),_:3},16)],4))}}),Qt=Jt,ea=D({__name:"SelectArrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(i){const s=i,a=ye(Ye);return(f,r)=>e(a).position==="popper"?(d(),w(e(gt),xe($({key:0},s)),{default:m(()=>[T(f.$slots,"default")]),_:3},16)):j("v-if",!0)}}),ta=ea,aa=D({inheritAttrs:!1,__name:"SelectProvider",props:{context:{type:Object,required:!0}},setup(i){return Ue(i.context),Xe(Ye),(a,f)=>T(a.$slots,"default")}}),la=aa;const ia={key:1};var na=D({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(i,{emit:s}){const a=i,r=vt(a,s),u=Q(),t=A();J(()=>{t.value=new DocumentFragment});const c=A(),g=K(()=>a.forceMount||u.open.value),v=A(g.value);let b;function y(){b&&(clearTimeout(b),b=void 0)}return Le(g,(I,C,O)=>{y(),b=setTimeout(()=>{v.value=g.value,b=void 0}),O(y)}),Ge(y),(I,C)=>g.value||v.value||c.value?.present?(d(),w(e(mt),{key:0,ref_key:"presenceRef",ref:c,present:g.value},{default:m(()=>[N(Yt,xe(Ee({...e(r),...I.$attrs})),{default:m(()=>[T(I.$slots,"default")]),_:3},16)]),_:3},8,["present"])):t.value?(d(),H("div",ia,[(d(),w(yt,{to:t.value},[N(la,{context:e(u)},{default:m(()=>[T(I.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):j("v-if",!0)}}),ra=na;const[oa,sa]=me("SelectGroup");var ua=D({__name:"SelectGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const s=i,a=Oe(void 0,"reka-select-group");return sa({id:a}),(f,r)=>(d(),w(e(Y),$({role:"group"},s,{"aria-labelledby":e(a)}),{default:m(()=>[T(f.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),da=ua;const[Ze,ca]=me("SelectItem");var pa=D({__name:"SelectItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(i,{emit:s}){const a=i,f=s,{disabled:r}=Ae(a),u=Q(),t=ye(),{forwardRef:c,currentElement:g}=ne(),{CollectionItem:v}=ve(),b=K(()=>ge(u.modelValue?.value,a.value,u.by)),y=A(!1),I=A(a.textValue??""),C=Oe(void 0,"reka-select-item-text"),O="select.select";async function F(l){if(l.defaultPrevented)return;const _={originalEvent:l,value:a.value};ht(O,L,_)}async function L(l){await ce(),f("select",l),!l.defaultPrevented&&(r.value||(u.onValueChange(a.value),u.multiple.value||u.onOpenChange(!1)))}async function h(l){await ce(),!l.defaultPrevented&&(r.value?t.onItemLeave?.():l.currentTarget?.focus({preventScroll:!0}))}async function B(l){await ce(),!l.defaultPrevented&&l.currentTarget===bt()&&t.onItemLeave?.()}async function S(l){await ce(),!(l.defaultPrevented||t.searchRef?.value!==""&&l.key===" ")&&(Rt.includes(l.key)&&F(l),l.key===" "&&l.preventDefault())}if(a.value==="")throw new Error("A <SelectItem /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return J(()=>{g.value&&t.itemRefCallback(g.value,a.value,a.disabled)}),ca({value:a.value,disabled:r,textId:C,isSelected:b,onItemTextChange:l=>{I.value=((I.value||l?.textContent)??"").trim()}}),(l,_)=>(d(),w(e(v),{value:{textValue:I.value}},{default:m(()=>[N(e(Y),{ref:e(c),role:"option","aria-labelledby":e(C),"data-highlighted":y.value?"":void 0,"aria-selected":b.value,"data-state":b.value?"checked":"unchecked","aria-disabled":e(r)||void 0,"data-disabled":e(r)?"":void 0,tabindex:e(r)?void 0:-1,as:l.as,"as-child":l.asChild,onFocus:_[0]||(_[0]=p=>y.value=!0),onBlur:_[1]||(_[1]=p=>y.value=!1),onPointerup:F,onPointerdown:_[2]||(_[2]=p=>{p.currentTarget.focus({preventScroll:!0})}),onTouchend:_[3]||(_[3]=fe(()=>{},["prevent","stop"])),onPointermove:h,onPointerleave:B,onKeydown:S},{default:m(()=>[T(l.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"])]),_:3},8,["value"]))}}),fa=pa,ga=D({__name:"SelectItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(i){const s=i,a=Ze();return(f,r)=>e(a).isSelected.value?(d(),w(e(Y),$({key:0,"aria-hidden":"true"},s),{default:m(()=>[T(f.$slots,"default")]),_:3},16)):j("v-if",!0)}}),va=ga,ma=D({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(i){const s=i,a=Q(),f=ye(),r=Ze(),{forwardRef:u,currentElement:t}=ne(),c=K(()=>({value:r.value,disabled:r.disabled.value,textContent:t.value?.textContent??r.value?.toString()??""}));return J(()=>{t.value&&(r.onItemTextChange(t.value),f.itemTextRefCallback(t.value,r.value,r.disabled.value),a.onOptionAdd(c.value))}),Ge(()=>{a.onOptionRemove(c.value)}),(g,v)=>(d(),w(e(Y),$({id:e(r).textId,ref:e(u)},{...s,...g.$attrs}),{default:m(()=>[T(g.$slots,"default")]),_:3},16,["id"]))}}),ya=ma,ha=D({__name:"SelectLabel",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(i){const s=i,a=oa({id:""});return(f,r)=>(d(),w(e(Y),$(s,{id:e(a).id}),{default:m(()=>[T(f.$slots,"default")]),_:3},16,["id"]))}}),ba=ha,_a=D({__name:"SelectPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(i){const s=i;return(a,f)=>(d(),w(e(_t),xe(Ee(s)),{default:m(()=>[T(a.$slots,"default")]),_:3},16))}}),Sa=_a,xa=D({__name:"SelectSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const s=i;return(a,f)=>(d(),w(e(Y),$({"aria-hidden":"true"},s),{default:m(()=>[T(a.$slots,"default")]),_:3},16))}}),qa=xa,wa=D({__name:"SelectTrigger",props:{disabled:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(i){const s=i,a=Q(),{forwardRef:f,currentElement:r}=ne(),u=K(()=>a.disabled?.value||s.disabled);a.contentId||=Oe(void 0,"reka-select-content"),J(()=>{a.onTriggerChange(r.value)});const{getItems:t}=ve(),{search:c,handleTypeaheadSearch:g,resetTypeahead:v}=We();function b(){u.value||(a.onOpenChange(!0),v())}function y(h){b(),a.triggerPointerDownPosRef.value={x:Math.round(h.pageX),y:Math.round(h.pageY)}}function I(h){return h.button===0&&h.ctrlKey===!1}let C=!1;function O(h){if(h.pointerType==="touch")return h.preventDefault();const B=h.target;B.hasPointerCapture(h.pointerId)&&B.releasePointerCapture(h.pointerId),I(h)&&(y(h),C=!0)}function F(h){I(h)&&h.preventDefault()}function L(h){C||h.currentTarget?.focus(),C=!1}return(h,B)=>(d(),w(e(St),{"as-child":"",reference:h.reference},{default:m(()=>[N(e(Y),{ref:e(f),role:"combobox",type:h.as==="button"?"button":void 0,"aria-controls":e(a).contentId,"aria-expanded":e(a).open.value||!1,"aria-required":e(a).required?.value,"aria-autocomplete":"none",disabled:u.value,dir:e(a)?.dir.value,"data-state":e(a)?.open.value?"open":"closed","data-disabled":u.value?"":void 0,"data-placeholder":e(Ft)(e(a).modelValue?.value)?"":void 0,"as-child":h.asChild,as:h.as,onClick:L,onPointerdown:O,onMousedown:F,onPointerup:B[0]||(B[0]=fe(S=>{S.pointerType==="touch"&&y(S)},["prevent"])),onKeydown:B[1]||(B[1]=S=>{const l=e(c)!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&l&&S.key===" "||(e(g)(S.key,e(t)()),e(Dt).includes(S.key)&&(b(),S.preventDefault()))})},{default:m(()=>[T(h.$slots,"default")]),_:3},8,["type","aria-controls","aria-expanded","aria-required","disabled","dir","data-state","data-disabled","data-placeholder","as-child","as"])]),_:3},8,["reference"]))}}),Ca=wa,Ia=D({__name:"SelectValue",props:{placeholder:{type:String,required:!1,default:""},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(i){const s=i,{forwardRef:a,currentElement:f}=ne(),r=Q();J(()=>{r.valueElement=f});const u=K(()=>{let c=[];const g=Array.from(r.optionsSet.value),v=b=>g.find(y=>ge(b,y.value,r.by));return Array.isArray(r.modelValue.value)?c=r.modelValue.value.map(b=>v(b)?.textContent??""):c=[v(r.modelValue.value)?.textContent??""],c.filter(Boolean)}),t=K(()=>u.value.length?u.value.join(", "):s.placeholder);return(c,g)=>(d(),w(e(Y),{ref:e(a),as:c.as,"as-child":c.asChild,style:{pointerEvents:"none"},"data-placeholder":u.value.length?void 0:s.placeholder},{default:m(()=>[T(c.$slots,"default",{selectedLabel:u.value,modelValue:e(r).modelValue.value},()=>[ie(pe(t.value),1)])]),_:3},8,["as","as-child","data-placeholder"]))}}),Ta=Ia,ka=D({__name:"SelectViewport",props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const s=i,{nonce:a}=Ae(s),f=Vt(a),r=ye(),u=r.position==="item-aligned"?Xt():void 0,{forwardRef:t,currentElement:c}=ne();J(()=>{r?.onViewportChange(c.value)});const g=A(0);function v(b){const y=b.currentTarget,{shouldExpandOnScrollRef:I,contentWrapper:C}=u??{};if(I?.value&&C?.value){const O=Math.abs(g.value-y.scrollTop);if(O>0){const F=window.innerHeight-U*2,L=Number.parseFloat(C.value.style.minHeight),h=Number.parseFloat(C.value.style.height),B=Math.max(L,h);if(B<F){const S=B+O,l=Math.min(F,S),_=S-l;C.value.style.height=`${l}px`,C.value.style.bottom==="0px"&&(y.scrollTop=_>0?_:0,C.value.style.justifyContent="flex-end")}}}g.value=y.scrollTop}return(b,y)=>(d(),H(le,null,[N(e(Y),$({ref:e(t),"data-reka-select-viewport":"",role:"presentation"},{...b.$attrs,...s},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:v}),{default:m(()=>[T(b.$slots,"default")]),_:3},16),N(e(Y),{as:"style",nonce:e(f)},{default:m(()=>y[0]||(y[0]=[ie(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-select-viewport]::-webkit-scrollbar { display: none; } ")])),_:1,__:[0]},8,["nonce"])],64))}}),Pa=ka;const Ke={slots:{base:["relative group rounded-md inline-flex items-center disabled:cursor-not-allowed disabled:opacity-75","transition-colors"],leading:"absolute inset-y-0 start-0 flex items-center",leadingIcon:"shrink-0 text-dimmed",leadingAvatar:"shrink-0",leadingAvatarSize:"",trailing:"absolute inset-y-0 end-0 flex items-center",trailingIcon:"shrink-0 text-dimmed",value:"truncate pointer-events-none",placeholder:"truncate text-dimmed",arrow:"fill-bg stroke-default",content:"max-h-[min(15rem,var(--reka-select-content-available-height,15rem))] w-(--reka-select-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden origin-(--reka-select-content-transform-origin) pointer-events-auto flex flex-col",viewport:"relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1",group:"p-1 isolate",empty:"text-center text-muted",label:"font-semibold text-highlighted",separator:"-mx-1 my-1 h-px bg-border",item:["group relative w-full flex items-start select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-default data-highlighted:not-data-disabled:text-highlighted data-highlighted:not-data-disabled:before:bg-elevated/50","transition-colors before:transition-colors"],itemLeadingIcon:["shrink-0 text-dimmed group-data-highlighted:not-group-data-disabled:text-default","transition-colors"],itemLeadingAvatar:"shrink-0",itemLeadingAvatarSize:"",itemLeadingChip:"shrink-0",itemLeadingChipSize:"",itemTrailing:"ms-auto inline-flex gap-1.5 items-center",itemTrailingIcon:"shrink-0",itemWrapper:"flex-1 flex flex-col min-w-0",itemLabel:"truncate",itemDescription:"truncate text-muted"},variants:{fieldGroup:{horizontal:"not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none focus-visible:z-[1]",vertical:"not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none focus-visible:z-[1]"},size:{xs:{base:"px-2 py-1 text-xs gap-1",leading:"ps-2",trailing:"pe-2",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4",label:"p-1 text-[10px]/3 gap-1",item:"p-1 text-xs gap-1",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemLeadingChip:"size-4",itemLeadingChipSize:"sm",itemTrailingIcon:"size-4",empty:"p-2 text-xs"},sm:{base:"px-2.5 py-1.5 text-xs gap-1.5",leading:"ps-2.5",trailing:"pe-2.5",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4",label:"p-1.5 text-[10px]/3 gap-1.5",item:"p-1.5 text-xs gap-1.5",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemLeadingChip:"size-4",itemLeadingChipSize:"sm",itemTrailingIcon:"size-4",empty:"p-2.5 text-xs"},md:{base:"px-2.5 py-1.5 text-sm gap-1.5",leading:"ps-2.5",trailing:"pe-2.5",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5",label:"p-1.5 text-xs gap-1.5",item:"p-1.5 text-sm gap-1.5",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemLeadingChip:"size-5",itemLeadingChipSize:"md",itemTrailingIcon:"size-5",empty:"p-2.5 text-sm"},lg:{base:"px-3 py-2 text-sm gap-2",leading:"ps-3",trailing:"pe-3",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5",label:"p-2 text-xs gap-2",item:"p-2 text-sm gap-2",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemLeadingChip:"size-5",itemLeadingChipSize:"md",itemTrailingIcon:"size-5",empty:"p-3 text-sm"},xl:{base:"px-3 py-2 text-base gap-2",leading:"ps-3",trailing:"pe-3",leadingIcon:"size-6",leadingAvatarSize:"xs",trailingIcon:"size-6",label:"p-2 text-sm gap-2",item:"p-2 text-base gap-2",itemLeadingIcon:"size-6",itemLeadingAvatarSize:"xs",itemLeadingChip:"size-6",itemLeadingChipSize:"lg",itemTrailingIcon:"size-6",empty:"p-3 text-base"}},variant:{outline:"text-highlighted bg-default ring ring-inset ring-accented hover:bg-elevated disabled:bg-default",soft:"text-highlighted bg-elevated/50 hover:bg-elevated focus:bg-elevated disabled:bg-elevated/50",subtle:"text-highlighted bg-elevated ring ring-inset ring-accented hover:bg-accented/75 disabled:bg-elevated",ghost:"text-highlighted bg-transparent hover:bg-elevated focus:bg-elevated disabled:bg-transparent dark:disabled:bg-transparent",none:"text-highlighted bg-transparent focus:outline-none"},color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},leading:{true:""},trailing:{true:""},loading:{true:""},highlight:{true:""},fixed:{false:""},type:{file:"file:me-1.5 file:font-medium file:text-muted file:outline-none"},position:{popper:{content:"data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]"},"item-aligned":{content:""}},multiple:{true:""}},compoundVariants:[{color:"primary",variant:["outline","subtle"],class:"outline-primary/25 focus-visible:outline-3 focus-visible:ring-primary"},{color:"secondary",variant:["outline","subtle"],class:"outline-secondary/25 focus-visible:outline-3 focus-visible:ring-secondary"},{color:"success",variant:["outline","subtle"],class:"outline-success/25 focus-visible:outline-3 focus-visible:ring-success"},{color:"info",variant:["outline","subtle"],class:"outline-info/25 focus-visible:outline-3 focus-visible:ring-info"},{color:"warning",variant:["outline","subtle"],class:"outline-warning/25 focus-visible:outline-3 focus-visible:ring-warning"},{color:"error",variant:["outline","subtle"],class:"outline-error/25 focus-visible:outline-3 focus-visible:ring-error"},{color:"primary",variant:["soft","ghost"],class:"outline-primary/25 focus-visible:outline-3"},{color:"secondary",variant:["soft","ghost"],class:"outline-secondary/25 focus-visible:outline-3"},{color:"success",variant:["soft","ghost"],class:"outline-success/25 focus-visible:outline-3"},{color:"info",variant:["soft","ghost"],class:"outline-info/25 focus-visible:outline-3"},{color:"warning",variant:["soft","ghost"],class:"outline-warning/25 focus-visible:outline-3"},{color:"error",variant:["soft","ghost"],class:"outline-error/25 focus-visible:outline-3"},{color:"primary",highlight:!0,class:"ring ring-inset ring-primary"},{color:"secondary",highlight:!0,class:"ring ring-inset ring-secondary"},{color:"success",highlight:!0,class:"ring ring-inset ring-success"},{color:"info",highlight:!0,class:"ring ring-inset ring-info"},{color:"warning",highlight:!0,class:"ring ring-inset ring-warning"},{color:"error",highlight:!0,class:"ring ring-inset ring-error"},{color:"neutral",variant:["outline","subtle"],class:"outline-inverted/25 focus-visible:outline-3 focus-visible:ring-inverted"},{color:"neutral",variant:["soft","ghost"],class:"outline-inverted/25 focus-visible:outline-3"},{color:"neutral",highlight:!0,class:"ring ring-inset ring-inverted"},{leading:!0,size:"xs",class:"ps-7"},{leading:!0,size:"sm",class:"ps-8"},{leading:!0,size:"md",class:"ps-9"},{leading:!0,size:"lg",class:"ps-10"},{leading:!0,size:"xl",class:"ps-11"},{trailing:!0,size:"xs",class:"pe-7"},{trailing:!0,size:"sm",class:"pe-8"},{trailing:!0,size:"md",class:"pe-9"},{trailing:!0,size:"lg",class:"pe-10"},{trailing:!0,size:"xl",class:"pe-11"},{loading:!0,leading:!0,class:{leadingIcon:"animate-spin"}},{loading:!0,leading:!1,trailing:!0,class:{trailingIcon:"animate-spin"}},{fixed:!1,size:"xs",class:"md:text-xs"},{fixed:!1,size:"sm",class:"md:text-xs"},{fixed:!1,size:"md",class:"md:text-sm"},{fixed:!1,size:"lg",class:"md:text-sm"}],defaultVariants:{size:"md",color:"primary",variant:"outline",position:"popper"}},Aa=Object.assign({inheritAttrs:!1},{__name:"USelect",props:{id:{type:String,required:!1},placeholder:{type:String,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},trailingIcon:{type:null,required:!1},selectedIcon:{type:null,required:!1},content:{type:Object,required:!1},arrow:{type:[Boolean,Object],required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},valueKey:{type:null,required:!1,default:"value"},labelKey:{type:null,required:!1,default:"label"},descriptionKey:{type:null,required:!1,default:"description"},items:{type:null,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1},modelModifiers:{type:null,required:!1},multiple:{type:Boolean,required:!1},highlight:{type:Boolean,required:!1},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1,default:0},class:{type:null,required:!1},ui:{type:Object,required:!1},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},nullableValue:{type:String,required:!1},autocomplete:{type:String,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1}},emits:["change","blur","focus","update:modelValue","update:open"],setup(i,{expose:s,emit:a}){const f=i,r=a,u=xt(),t=qt("select",f),c=wt(),g=Ct(It(t,"open","defaultOpen","disabled","autocomplete","required","multiple","nullableValue"),r),v=Tt(ae(()=>t.portal)),b=K(()=>t.content?.position??c.ui?.select?.defaultVariants?.position??Ke.defaultVariants?.position),y=ae(()=>Pe(t.content,{side:"bottom",sideOffset:8,collisionPadding:8,position:b.value})),I=ae(()=>Pe(t.arrow,{rounded:!0})),{emitFormChange:C,emitFormInput:O,emitFormBlur:F,emitFormFocus:L,size:h,color:B,id:S,name:l,highlight:_,disabled:p,ariaAttrs:q}=kt(f),{orientation:k,size:z}=Pt(f),{isLeading:P,isTrailing:Z,leadingIconName:re,trailingIconName:oe}=Bt(ae(()=>Pe(t,{trailingIcon:c.ui.icons.chevronDown}))),qe=K(()=>z.value||h.value),he=K(()=>b.value==="item-aligned"),x=K(()=>Et({extend:Ke,...c.ui?.select||{}})({color:B.value??t.color,variant:t.variant,size:qe.value??t.size,loading:t.loading,highlight:_.value??t.highlight,leading:P.value||!!t.avatar||!!u.leading,trailing:Z.value||!!u.trailing,fieldGroup:k.value,position:b.value,multiple:t.multiple})),se=K(()=>t.items?.length?Ot(t.items)?t.items:[t.items]:[]),be=K(()=>se.value.flatMap(o=>o));function we(o){if(t.multiple&&Array.isArray(o)){const V=o.map(R=>Me(be.value,R,{labelKey:t.labelKey,valueKey:t.valueKey})).filter(R=>R!=null&&R!=="");return V.length>0?V.join(", "):void 0}return Me(be.value,o,{labelKey:t.labelKey,valueKey:t.valueKey})}const X=Re("triggerRef");function Ce(){t.autofocus&&X.value?.$el?.focus({focusVisible:!0})}J(()=>{setTimeout(()=>{Ce()},t.autofocusDelay)});function ue(o){t.modelModifiers?.trim&&(typeof o=="string"||o===null||o===void 0)&&(o=o?.trim()??null),t.modelModifiers?.number&&(o=Lt(o)),t.modelModifiers?.nullable&&(o??=null),t.modelModifiers?.optional&&!t.modelModifiers?.nullable&&o!==null&&(o??=void 0);const V=new Event("change",{target:{value:o}});r("change",V),C(),O()}function Ie(o){if(o){const V=new FocusEvent("focus");r("focus",V),L()}else{const V=new FocusEvent("blur");r("blur",V),F()}}function E(o){return typeof o=="object"&&o!==null}function Te(o){o||X.value?.$el?.dispatchEvent(new PointerEvent("pointerdown",{bubbles:!0,button:0}))}const ke=Re("viewportRef");return s({triggerRef:ae(()=>X.value?.$el),viewportRef:ae(()=>{const o=ke.value;return o&&typeof o=="object"&&"$el"in o?o.$el:o})}),(o,V)=>(d(),w(e(Kt),$({name:e(l)},e(g),{autocomplete:e(t).autocomplete,disabled:e(p),"default-value":e(t).defaultValue,"model-value":i.modelValue,"onUpdate:modelValue":ue,"onUpdate:open":Ie}),{default:m(({modelValue:R,open:W})=>[N(e(Ca),$({id:e(S),ref_key:"triggerRef",ref:X,"data-slot":"base",class:x.value.base({class:[e(t).ui?.base,e(t).class]})},{...o.$attrs,...e(q)},{onClick:G=>Te(W)}),{default:m(()=>[e(P)||e(t).avatar||u.leading?(d(),H("span",{key:0,"data-slot":"leading",class:M(x.value.leading({class:e(t).ui?.leading}))},[T(o.$slots,"leading",{modelValue:R,open:W,ui:x.value},()=>[e(P)&&e(re)?(d(),w(_e,{key:0,name:e(re),"data-slot":"leadingIcon",class:M(x.value.leadingIcon({class:e(t).ui?.leadingIcon}))},null,8,["name","class"])):e(t).avatar?(d(),w(Fe,$({key:1,size:e(t).ui?.itemLeadingAvatarSize||x.value.itemLeadingAvatarSize()},e(t).avatar,{"data-slot":"itemLeadingAvatar",class:x.value.itemLeadingAvatar({class:e(t).ui?.itemLeadingAvatar})}),null,16,["size","class"])):j("",!0)])],2)):j("",!0),(d(!0),H(le,null,Se([we(R)],G=>(d(),w(e(Ta),{key:G,"data-slot":G!=null?"value":"placeholder",class:M(G!=null?x.value.value({class:e(t).ui?.value}):x.value.placeholder({class:e(t).ui?.placeholder}))},{default:m(()=>[T(o.$slots,"default",{modelValue:R,open:W,ui:x.value},()=>[ie(pe(G??e(t).placeholder??" "),1)])]),_:2},1032,["data-slot","class"]))),128)),e(Z)||u.trailing?(d(),H("span",{key:1,"data-slot":"trailing",class:M(x.value.trailing({class:e(t).ui?.trailing}))},[T(o.$slots,"trailing",{modelValue:R,open:W,ui:x.value},()=>[e(oe)?(d(),w(_e,{key:0,name:e(oe),"data-slot":"trailingIcon",class:M(x.value.trailingIcon({class:e(t).ui?.trailingIcon}))},null,8,["name","class"])):j("",!0)])],2)):j("",!0)]),_:2},1040,["id","class","onClick"]),N(e(Sa),xe(Ee(e(v))),{default:m(()=>[N(e(zt),null,{default:m(()=>[N(e(ra),$({"data-slot":"content",class:x.value.content({class:e(t).ui?.content})},y.value),{default:m(()=>[T(o.$slots,"content-top"),(d(),w(je(he.value?e(Pa):"div"),{ref_key:"viewportRef",ref:ke,role:"presentation","data-slot":"viewport",class:M(x.value.viewport({class:e(t).ui?.viewport}))},{default:m(()=>[(d(!0),H(le,null,Se(se.value,(G,ee)=>(d(),w(e(da),{key:`group-${ee}`,"data-slot":"group",class:M(x.value.group({class:e(t).ui?.group}))},{default:m(()=>[(d(!0),H(le,null,Se(G,(n,te)=>(d(),H(le,{key:`group-${ee}-${te}`},[E(n)&&n.type==="label"?(d(),w(e(ba),{key:0,"data-slot":"label",class:M(x.value.label({class:[e(t).ui?.label,n.ui?.label,n.class]}))},{default:m(()=>[ie(pe(e(de)(n,e(t).labelKey)),1)]),_:2},1032,["class"])):E(n)&&n.type==="separator"?(d(),w(e(qa),{key:1,"data-slot":"separator",class:M(x.value.separator({class:[e(t).ui?.separator,n.ui?.separator,n.class]}))},null,8,["class"])):(d(),w(e(fa),{key:2,"data-slot":"item",class:M(x.value.item({class:[e(t).ui?.item,E(n)&&n.ui?.item,E(n)&&n.class]})),disabled:E(n)&&n.disabled,value:E(n)?e(de)(n,e(t).valueKey):n,onSelect:Je=>E(n)&&n.onSelect?.(Je)},{default:m(()=>[T(o.$slots,"item",{item:n,index:te,ui:x.value},()=>[T(o.$slots,"item-leading",{item:n,index:te,ui:x.value},()=>[E(n)&&n.icon?(d(),w(_e,{key:0,name:n.icon,"data-slot":"itemLeadingIcon",class:M(x.value.itemLeadingIcon({class:[e(t).ui?.itemLeadingIcon,n.ui?.itemLeadingIcon]}))},null,8,["name","class"])):E(n)&&n.avatar?(d(),w(Fe,$({key:1,size:n.ui?.itemLeadingAvatarSize||e(t).ui?.itemLeadingAvatarSize||x.value.itemLeadingAvatarSize()},{ref_for:!0},n.avatar,{"data-slot":"itemLeadingAvatar",class:x.value.itemLeadingAvatar({class:[e(t).ui?.itemLeadingAvatar,n.ui?.itemLeadingAvatar]})}),null,16,["size","class"])):E(n)&&n.chip?(d(),w(At,$({key:2,size:n.ui?.itemLeadingChipSize||e(t).ui?.itemLeadingChipSize||x.value.itemLeadingChipSize(),inset:"",standalone:""},{ref_for:!0},n.chip,{"data-slot":"itemLeadingChip",class:x.value.itemLeadingChip({class:[e(t).ui?.itemLeadingChip,n.ui?.itemLeadingChip]})}),null,16,["size","class"])):j("",!0)]),Be("span",{"data-slot":"itemWrapper",class:M(x.value.itemWrapper({class:[e(t).ui?.itemWrapper,E(n)&&n.ui?.itemWrapper]}))},[N(e(ya),{"data-slot":"itemLabel",class:M(x.value.itemLabel({class:[e(t).ui?.itemLabel,E(n)&&n.ui?.itemLabel]}))},{default:m(()=>[T(o.$slots,"item-label",{item:n,index:te},()=>[ie(pe(E(n)?e(de)(n,e(t).labelKey):n),1)])]),_:2},1032,["class"]),E(n)&&(e(de)(n,e(t).descriptionKey)||u["item-description"])?(d(),H("span",{key:0,"data-slot":"itemDescription",class:M(x.value.itemDescription({class:[e(t).ui?.itemDescription,E(n)&&n.ui?.itemDescription]}))},[T(o.$slots,"item-description",{item:n,index:te},()=>[ie(pe(e(de)(n,e(t).descriptionKey)),1)])],2)):j("",!0)],2),Be("span",{"data-slot":"itemTrailing",class:M(x.value.itemTrailing({class:[e(t).ui?.itemTrailing,E(n)&&n.ui?.itemTrailing]}))},[T(o.$slots,"item-trailing",{item:n,index:te,ui:x.value}),N(e(va),{"as-child":""},{default:m(()=>[N(_e,{name:e(t).selectedIcon||e(c).ui.icons.check,"data-slot":"itemTrailingIcon",class:M(x.value.itemTrailingIcon({class:[e(t).ui?.itemTrailingIcon,E(n)&&n.ui?.itemTrailingIcon]}))},null,8,["name","class"])]),_:2},1024)],2)])]),_:2},1032,["class","disabled","value","onSelect"]))],64))),128))]),_:2},1032,["class"]))),128))]),_:3},8,["class"])),T(o.$slots,"content-bottom"),e(t).arrow?(d(),w(e(ta),$({key:0},I.value,{"data-slot":"arrow",class:x.value.arrow({class:e(t).ui?.arrow})}),null,16,["class"])):j("",!0)]),_:3},16,["class"])]),_:3})]),_:3},16)]),_:3},16,["name","autocomplete","disabled","default-value","model-value"]))}});export{Aa as _};
1
+ import{bW as Qe,r as A,h as K,aM as et,d as D,W as Ae,X as $e,b6 as ve,ay as tt,o as d,f as w,g as m,T,k as e,a$ as Ve,c as H,q as j,F as le,y as Se,U as $,ba as at,Y as me,B as Le,i as Be,bH as lt,bi as He,bm as it,bg as nt,bf as rt,bh as ot,bX as We,at as st,j as N,bk as ut,H as fe,bl as dt,ae as je,bV as ct,bY as De,S as ne,C as J,G as ce,aD as pt,V as Y,O as ft,Z as xe,bn as gt,bo as vt,ab as Ge,$ as Ee,aB as mt,af as yt,az as Oe,aK as ht,bj as bt,br as _t,be as St,m as ie,t as pe,a0 as xt,a1 as qt,a3 as wt,a4 as Ct,a5 as It,bs as Tt,aN as kt,bt as Pt,aY as Bt,aP as Re,b4 as ae,p as M,v as _e,aH as Fe,bv as zt,aG as de,bu as At,bw as Me,bx as Pe,aZ as Lt,a6 as Et,bz as Ot}from"./DHltYerF.js";import{u as $t}from"./qH_j2A3a.js";function Ne(i,s=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY){return Math.min(a,Math.max(s,i))}function Vt(i){const s=Qe({nonce:A()});return K(()=>i?.value||s.nonce?.value)}const Dt=[" ","Enter","ArrowUp","ArrowDown"],Rt=[" ","Enter"],U=10;function ge(i,s,a){return i===void 0?!1:Array.isArray(i)?i.some(f=>ze(f,s,a)):ze(i,s,a)}function ze(i,s,a){return i===void 0||s===void 0?!1:typeof i=="string"?i===s:typeof a=="function"?a(i,s):typeof a=="string"?i?.[a]===s?.[a]:et(i,s)}function Ft(i){return i==null||i===""||Array.isArray(i)&&i.length===0}const Mt=["value"],[Q,Ue]=me("SelectRoot");var Nt=D({inheritAttrs:!1,__name:"SelectRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},nullableValue:{type:String,required:!1,default:""},by:{type:[String,Function],required:!1},dir:{type:String,required:!1},multiple:{type:Boolean,required:!1},autocomplete:{type:String,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","update:open"],setup(i,{emit:s}){const a=i,f=s,{required:r,disabled:u,multiple:t,dir:c}=Ae(a),g=$e(a,"modelValue",f,{defaultValue:a.defaultValue??(t.value?[]:void 0),passive:a.modelValue===void 0,deep:!0}),v=$e(a,"open",f,{defaultValue:a.defaultOpen,passive:a.open===void 0}),b=A(),y=A(),I=A({x:0,y:0}),C=K(()=>t.value&&Array.isArray(g.value)?g.value?.length===0:Ve(g.value));ve({isProvider:!0});const O=tt(c),F=$t(b),L=A(new Set),h=K(()=>Array.from(L.value).map(l=>l.value).join(";"));function B(l){if(t.value){const _=Array.isArray(g.value)?[...g.value]:[],p=_.findIndex(q=>ze(q,l,a.by));p===-1?_.push(l):_.splice(p,1),g.value=[..._]}else g.value=l}function S(l){return Array.from(L.value).find(_=>ge(l,_.value,a.by))}return Ue({triggerElement:b,onTriggerChange:l=>{b.value=l},valueElement:y,onValueElementChange:l=>{y.value=l},contentId:"",modelValue:g,onValueChange:B,by:a.by,open:v,multiple:t,required:r,onOpenChange:l=>{v.value=l},dir:O,triggerPointerDownPosRef:I,disabled:u,isEmptyModelValue:C,optionsSet:L,onOptionAdd:l=>{const _=S(l.value);_&&L.value.delete(_),L.value.add(l)},onOptionRemove:l=>{const _=S(l.value);_&&L.value.delete(_)}}),(l,_)=>(d(),w(e(at),null,{default:m(()=>[T(l.$slots,"default",{modelValue:e(g),open:e(v)}),e(F)&&l.name?(d(),w(Wt,{key:h.value,"aria-hidden":"true",tabindex:"-1",multiple:e(t),required:e(r),name:l.name,autocomplete:l.autocomplete,disabled:e(u),value:e(g)},{default:m(()=>[e(Ve)(e(g))?(d(),H("option",{key:0,value:l.nullableValue},null,8,Mt)):j("v-if",!0),(d(!0),H(le,null,Se(Array.from(L.value),p=>(d(),H("option",$({key:p.value??""},{ref_for:!0},p),null,16))),128))]),_:1},8,["multiple","required","name","autocomplete","disabled","value"])):j("v-if",!0)]),_:3}))}}),Kt=Nt,Ht=D({__name:"BubbleSelect",props:{autocomplete:{type:String,required:!1},autofocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},form:{type:String,required:!1},multiple:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},size:{type:Number,required:!1},value:{type:null,required:!1}},setup(i){const s=i,a=A(),f=Q();Le(()=>s.value,(u,t)=>{const c=window.HTMLSelectElement.prototype,v=Object.getOwnPropertyDescriptor(c,"value").set;if(u!==t&&v&&a.value){const b=new Event("change",{bubbles:!0});v.call(a.value,u),a.value.dispatchEvent(b)}});function r(u){f.onValueChange(u.target.value)}return(u,t)=>(d(),w(e(lt),{"as-child":""},{default:m(()=>[Be("select",$({ref_key:"selectElement",ref:a},s,{onInput:r}),[T(u.$slots,"default")],16)]),_:3}))}}),Wt=Ht,jt=D({__name:"SelectPopperPosition",props:{memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1,default:U},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const a=He(i);return(f,r)=>(d(),w(e(it),$(e(a),{style:{boxSizing:"border-box","--reka-select-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-select-content-available-width":"var(--reka-popper-available-width)","--reka-select-content-available-height":"var(--reka-popper-available-height)","--reka-select-trigger-width":"var(--reka-popper-anchor-width)","--reka-select-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:m(()=>[T(f.$slots,"default")]),_:3},16))}}),Gt=jt;const Ye={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[ye,Xe]=me("SelectContent");var Ut=D({__name:"SelectContentImpl",props:{position:{type:String,required:!1,default:"item-aligned"},bodyLock:{type:Boolean,required:!1,default:!0},memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:!0}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(i,{emit:s}){const a=i,f=s,r=Q();nt(),rt(a.bodyLock);const{CollectionSlot:u,getItems:t}=ve(),c=A();ot(c);const{search:g,handleTypeaheadSearch:v}=We(),b=A(),y=A(),I=A(),C=A(!1),O=A(!1),F=A(!1);function L(){y.value&&c.value&&De([y.value,c.value])}Le(C,()=>{L()});const{onOpenChange:h,triggerPointerDownPosRef:B}=r;st(p=>{if(!c.value)return;let q={x:0,y:0};const k=P=>{q={x:Math.abs(Math.round(P.pageX)-(B.value?.x??0)),y:Math.abs(Math.round(P.pageY)-(B.value?.y??0))}},z=P=>{P.pointerType!=="touch"&&(q.x<=10&&q.y<=10?P.preventDefault():c.value?.contains(P.target)||h(!1),document.removeEventListener("pointermove",k),B.value=null)};B.value!==null&&(document.addEventListener("pointermove",k),document.addEventListener("pointerup",z,{capture:!0,once:!0})),p(()=>{document.removeEventListener("pointermove",k),document.removeEventListener("pointerup",z,{capture:!0})})});function S(p){const q=p.ctrlKey||p.altKey||p.metaKey;if(p.key==="Tab"&&p.preventDefault(),!q&&p.key.length===1&&v(p.key,t()),["ArrowUp","ArrowDown","Home","End"].includes(p.key)){let z=[...t().map(P=>P.ref)];if(["ArrowUp","End"].includes(p.key)&&(z=z.slice().reverse()),["ArrowUp","ArrowDown"].includes(p.key)){const P=p.target,Z=z.indexOf(P);z=z.slice(Z+1)}setTimeout(()=>De(z)),p.preventDefault()}}const l=K(()=>a.position==="popper"?a:{}),_=He(l.value);return Xe({content:c,viewport:b,onViewportChange:p=>{b.value=p},itemRefCallback:(p,q,k)=>{const z=!O.value&&!k,P=ge(r.modelValue.value,q,r.by);if(r.multiple.value){if(F.value)return;(P||z)&&(y.value=p,P&&(F.value=!0))}else(P||z)&&(y.value=p);z&&(O.value=!0)},selectedItem:y,selectedItemText:I,onItemLeave:()=>{c.value?.focus()},itemTextRefCallback:(p,q,k)=>{const z=!O.value&&!k;(ge(r.modelValue.value,q,r.by)||z)&&(I.value=p)},focusSelectedItem:L,position:a.position,isPositioned:C,searchRef:g}),(p,q)=>(d(),w(e(u),null,{default:m(()=>[N(e(ut),{"as-child":"",onMountAutoFocus:q[6]||(q[6]=fe(()=>{},["prevent"])),onUnmountAutoFocus:q[7]||(q[7]=k=>{f("closeAutoFocus",k),!k.defaultPrevented&&(e(r).triggerElement.value?.focus({preventScroll:!0}),k.preventDefault())})},{default:m(()=>[N(e(dt),{"as-child":"","disable-outside-pointer-events":p.disableOutsidePointerEvents,onFocusOutside:q[2]||(q[2]=fe(()=>{},["prevent"])),onDismiss:q[3]||(q[3]=k=>e(r).onOpenChange(!1)),onEscapeKeyDown:q[4]||(q[4]=k=>f("escapeKeyDown",k)),onPointerDownOutside:q[5]||(q[5]=k=>f("pointerDownOutside",k))},{default:m(()=>[(d(),w(je(p.position==="popper"?Gt:Qt),$({...p.$attrs,...e(_)},{id:e(r).contentId,ref:k=>{if(!k)return;const z=e(ct)(k);z?.hasAttribute("data-reka-popper-content-wrapper")?c.value=z.firstElementChild:c.value=z},role:"listbox","data-state":e(r).open.value?"open":"closed",dir:e(r).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:q[0]||(q[0]=fe(()=>{},["prevent"])),onPlaced:q[1]||(q[1]=k=>C.value=!0),onKeydown:S}),{default:m(()=>[T(p.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3},8,["disable-outside-pointer-events"])]),_:3})]),_:3}))}}),Yt=Ut;const[Xt,Zt]=me("SelectItemAlignedPosition");var Jt=D({inheritAttrs:!1,__name:"SelectItemAlignedPosition",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["placed"],setup(i,{emit:s}){const a=i,f=s,{getItems:r}=ve(),u=Q(),t=ye(),c=A(!1),g=A(!0),v=A(),{forwardRef:b,currentElement:y}=ne(),{viewport:I,selectedItem:C,selectedItemText:O,focusSelectedItem:F}=t;function L(){if(u.triggerElement.value&&u.valueElement.value&&v.value&&y.value&&I?.value&&C?.value&&O?.value){const S=u.triggerElement.value.getBoundingClientRect(),l=y.value.getBoundingClientRect(),_=u.valueElement.value.getBoundingClientRect(),p=O.value.getBoundingClientRect();if(u.dir.value!=="rtl"){const o=p.left-l.left,V=_.left-o,R=S.left-V,W=S.width+R,G=Math.max(W,l.width),ee=window.innerWidth-U,n=Ne(V,U,Math.max(U,ee-G));v.value.style.minWidth=`${W}px`,v.value.style.left=`${n}px`}else{const o=l.right-p.right,V=window.innerWidth-_.right-o,R=window.innerWidth-S.right-V,W=S.width+R,G=Math.max(W,l.width),ee=window.innerWidth-U,n=Ne(V,U,Math.max(U,ee-G));v.value.style.minWidth=`${W}px`,v.value.style.right=`${n}px`}const q=r().map(o=>o.ref),k=window.innerHeight-U*2,z=I.value.scrollHeight,P=window.getComputedStyle(y.value),Z=Number.parseInt(P.borderTopWidth,10),re=Number.parseInt(P.paddingTop,10),oe=Number.parseInt(P.borderBottomWidth,10),qe=Number.parseInt(P.paddingBottom,10),he=Z+re+z+qe+oe,x=Math.min(C.value.offsetHeight*5,he),se=window.getComputedStyle(I.value),be=Number.parseInt(se.paddingTop,10),we=Number.parseInt(se.paddingBottom,10),X=S.top+S.height/2-U,Ce=k-X,ue=C.value.offsetHeight/2,Ie=C.value.offsetTop+ue,E=Z+re+Ie,Te=he-E;if(E<=X){const o=C.value===q.at(-1);v.value.style.bottom="0px";const V=y.value.clientHeight-I.value.offsetTop-I.value.offsetHeight,R=Math.max(Ce,ue+(o?we:0)+V+oe),W=E+R;v.value.style.height=`${W}px`}else{const o=C.value===q[0];v.value.style.top="0px";const R=Math.max(X,Z+I.value.offsetTop+(o?be:0)+ue)+Te;v.value.style.height=`${R}px`,I.value.scrollTop=E-X+I.value.offsetTop}v.value.style.margin=`${U}px 0`,v.value.style.minHeight=`${x}px`,v.value.style.maxHeight=`${k}px`,f("placed"),requestAnimationFrame(()=>c.value=!0)}}const h=A("");J(async()=>{await ce(),L(),y.value&&(h.value=window.getComputedStyle(y.value).zIndex)});function B(S){S&&g.value===!0&&(L(),F?.(),g.value=!1)}return pt(u.triggerElement,()=>{L()}),Zt({contentWrapper:v,shouldExpandOnScrollRef:c,onScrollButtonChange:B}),(S,l)=>(d(),H("div",{ref_key:"contentWrapperElement",ref:v,style:ft({display:"flex",flexDirection:"column",position:"fixed",zIndex:h.value})},[N(e(Y),$({ref:e(b),style:{boxSizing:"border-box",maxHeight:"100%"}},{...S.$attrs,...a}),{default:m(()=>[T(S.$slots,"default")]),_:3},16)],4))}}),Qt=Jt,ea=D({__name:"SelectArrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(i){const s=i,a=ye(Ye);return(f,r)=>e(a).position==="popper"?(d(),w(e(gt),xe($({key:0},s)),{default:m(()=>[T(f.$slots,"default")]),_:3},16)):j("v-if",!0)}}),ta=ea,aa=D({inheritAttrs:!1,__name:"SelectProvider",props:{context:{type:Object,required:!0}},setup(i){return Ue(i.context),Xe(Ye),(a,f)=>T(a.$slots,"default")}}),la=aa;const ia={key:1};var na=D({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(i,{emit:s}){const a=i,r=vt(a,s),u=Q(),t=A();J(()=>{t.value=new DocumentFragment});const c=A(),g=K(()=>a.forceMount||u.open.value),v=A(g.value);let b;function y(){b&&(clearTimeout(b),b=void 0)}return Le(g,(I,C,O)=>{y(),b=setTimeout(()=>{v.value=g.value,b=void 0}),O(y)}),Ge(y),(I,C)=>g.value||v.value||c.value?.present?(d(),w(e(mt),{key:0,ref_key:"presenceRef",ref:c,present:g.value},{default:m(()=>[N(Yt,xe(Ee({...e(r),...I.$attrs})),{default:m(()=>[T(I.$slots,"default")]),_:3},16)]),_:3},8,["present"])):t.value?(d(),H("div",ia,[(d(),w(yt,{to:t.value},[N(la,{context:e(u)},{default:m(()=>[T(I.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):j("v-if",!0)}}),ra=na;const[oa,sa]=me("SelectGroup");var ua=D({__name:"SelectGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const s=i,a=Oe(void 0,"reka-select-group");return sa({id:a}),(f,r)=>(d(),w(e(Y),$({role:"group"},s,{"aria-labelledby":e(a)}),{default:m(()=>[T(f.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),da=ua;const[Ze,ca]=me("SelectItem");var pa=D({__name:"SelectItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(i,{emit:s}){const a=i,f=s,{disabled:r}=Ae(a),u=Q(),t=ye(),{forwardRef:c,currentElement:g}=ne(),{CollectionItem:v}=ve(),b=K(()=>ge(u.modelValue?.value,a.value,u.by)),y=A(!1),I=A(a.textValue??""),C=Oe(void 0,"reka-select-item-text"),O="select.select";async function F(l){if(l.defaultPrevented)return;const _={originalEvent:l,value:a.value};ht(O,L,_)}async function L(l){await ce(),f("select",l),!l.defaultPrevented&&(r.value||(u.onValueChange(a.value),u.multiple.value||u.onOpenChange(!1)))}async function h(l){await ce(),!l.defaultPrevented&&(r.value?t.onItemLeave?.():l.currentTarget?.focus({preventScroll:!0}))}async function B(l){await ce(),!l.defaultPrevented&&l.currentTarget===bt()&&t.onItemLeave?.()}async function S(l){await ce(),!(l.defaultPrevented||t.searchRef?.value!==""&&l.key===" ")&&(Rt.includes(l.key)&&F(l),l.key===" "&&l.preventDefault())}if(a.value==="")throw new Error("A <SelectItem /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return J(()=>{g.value&&t.itemRefCallback(g.value,a.value,a.disabled)}),ca({value:a.value,disabled:r,textId:C,isSelected:b,onItemTextChange:l=>{I.value=((I.value||l?.textContent)??"").trim()}}),(l,_)=>(d(),w(e(v),{value:{textValue:I.value}},{default:m(()=>[N(e(Y),{ref:e(c),role:"option","aria-labelledby":e(C),"data-highlighted":y.value?"":void 0,"aria-selected":b.value,"data-state":b.value?"checked":"unchecked","aria-disabled":e(r)||void 0,"data-disabled":e(r)?"":void 0,tabindex:e(r)?void 0:-1,as:l.as,"as-child":l.asChild,onFocus:_[0]||(_[0]=p=>y.value=!0),onBlur:_[1]||(_[1]=p=>y.value=!1),onPointerup:F,onPointerdown:_[2]||(_[2]=p=>{p.currentTarget.focus({preventScroll:!0})}),onTouchend:_[3]||(_[3]=fe(()=>{},["prevent","stop"])),onPointermove:h,onPointerleave:B,onKeydown:S},{default:m(()=>[T(l.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"])]),_:3},8,["value"]))}}),fa=pa,ga=D({__name:"SelectItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(i){const s=i,a=Ze();return(f,r)=>e(a).isSelected.value?(d(),w(e(Y),$({key:0,"aria-hidden":"true"},s),{default:m(()=>[T(f.$slots,"default")]),_:3},16)):j("v-if",!0)}}),va=ga,ma=D({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(i){const s=i,a=Q(),f=ye(),r=Ze(),{forwardRef:u,currentElement:t}=ne(),c=K(()=>({value:r.value,disabled:r.disabled.value,textContent:t.value?.textContent??r.value?.toString()??""}));return J(()=>{t.value&&(r.onItemTextChange(t.value),f.itemTextRefCallback(t.value,r.value,r.disabled.value),a.onOptionAdd(c.value))}),Ge(()=>{a.onOptionRemove(c.value)}),(g,v)=>(d(),w(e(Y),$({id:e(r).textId,ref:e(u)},{...s,...g.$attrs}),{default:m(()=>[T(g.$slots,"default")]),_:3},16,["id"]))}}),ya=ma,ha=D({__name:"SelectLabel",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(i){const s=i,a=oa({id:""});return(f,r)=>(d(),w(e(Y),$(s,{id:e(a).id}),{default:m(()=>[T(f.$slots,"default")]),_:3},16,["id"]))}}),ba=ha,_a=D({__name:"SelectPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(i){const s=i;return(a,f)=>(d(),w(e(_t),xe(Ee(s)),{default:m(()=>[T(a.$slots,"default")]),_:3},16))}}),Sa=_a,xa=D({__name:"SelectSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const s=i;return(a,f)=>(d(),w(e(Y),$({"aria-hidden":"true"},s),{default:m(()=>[T(a.$slots,"default")]),_:3},16))}}),qa=xa,wa=D({__name:"SelectTrigger",props:{disabled:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(i){const s=i,a=Q(),{forwardRef:f,currentElement:r}=ne(),u=K(()=>a.disabled?.value||s.disabled);a.contentId||=Oe(void 0,"reka-select-content"),J(()=>{a.onTriggerChange(r.value)});const{getItems:t}=ve(),{search:c,handleTypeaheadSearch:g,resetTypeahead:v}=We();function b(){u.value||(a.onOpenChange(!0),v())}function y(h){b(),a.triggerPointerDownPosRef.value={x:Math.round(h.pageX),y:Math.round(h.pageY)}}function I(h){return h.button===0&&h.ctrlKey===!1}let C=!1;function O(h){if(h.pointerType==="touch")return h.preventDefault();const B=h.target;B.hasPointerCapture(h.pointerId)&&B.releasePointerCapture(h.pointerId),I(h)&&(y(h),C=!0)}function F(h){I(h)&&h.preventDefault()}function L(h){C||h.currentTarget?.focus(),C=!1}return(h,B)=>(d(),w(e(St),{"as-child":"",reference:h.reference},{default:m(()=>[N(e(Y),{ref:e(f),role:"combobox",type:h.as==="button"?"button":void 0,"aria-controls":e(a).contentId,"aria-expanded":e(a).open.value||!1,"aria-required":e(a).required?.value,"aria-autocomplete":"none",disabled:u.value,dir:e(a)?.dir.value,"data-state":e(a)?.open.value?"open":"closed","data-disabled":u.value?"":void 0,"data-placeholder":e(Ft)(e(a).modelValue?.value)?"":void 0,"as-child":h.asChild,as:h.as,onClick:L,onPointerdown:O,onMousedown:F,onPointerup:B[0]||(B[0]=fe(S=>{S.pointerType==="touch"&&y(S)},["prevent"])),onKeydown:B[1]||(B[1]=S=>{const l=e(c)!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&l&&S.key===" "||(e(g)(S.key,e(t)()),e(Dt).includes(S.key)&&(b(),S.preventDefault()))})},{default:m(()=>[T(h.$slots,"default")]),_:3},8,["type","aria-controls","aria-expanded","aria-required","disabled","dir","data-state","data-disabled","data-placeholder","as-child","as"])]),_:3},8,["reference"]))}}),Ca=wa,Ia=D({__name:"SelectValue",props:{placeholder:{type:String,required:!1,default:""},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(i){const s=i,{forwardRef:a,currentElement:f}=ne(),r=Q();J(()=>{r.valueElement=f});const u=K(()=>{let c=[];const g=Array.from(r.optionsSet.value),v=b=>g.find(y=>ge(b,y.value,r.by));return Array.isArray(r.modelValue.value)?c=r.modelValue.value.map(b=>v(b)?.textContent??""):c=[v(r.modelValue.value)?.textContent??""],c.filter(Boolean)}),t=K(()=>u.value.length?u.value.join(", "):s.placeholder);return(c,g)=>(d(),w(e(Y),{ref:e(a),as:c.as,"as-child":c.asChild,style:{pointerEvents:"none"},"data-placeholder":u.value.length?void 0:s.placeholder},{default:m(()=>[T(c.$slots,"default",{selectedLabel:u.value,modelValue:e(r).modelValue.value},()=>[ie(pe(t.value),1)])]),_:3},8,["as","as-child","data-placeholder"]))}}),Ta=Ia,ka=D({__name:"SelectViewport",props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(i){const s=i,{nonce:a}=Ae(s),f=Vt(a),r=ye(),u=r.position==="item-aligned"?Xt():void 0,{forwardRef:t,currentElement:c}=ne();J(()=>{r?.onViewportChange(c.value)});const g=A(0);function v(b){const y=b.currentTarget,{shouldExpandOnScrollRef:I,contentWrapper:C}=u??{};if(I?.value&&C?.value){const O=Math.abs(g.value-y.scrollTop);if(O>0){const F=window.innerHeight-U*2,L=Number.parseFloat(C.value.style.minHeight),h=Number.parseFloat(C.value.style.height),B=Math.max(L,h);if(B<F){const S=B+O,l=Math.min(F,S),_=S-l;C.value.style.height=`${l}px`,C.value.style.bottom==="0px"&&(y.scrollTop=_>0?_:0,C.value.style.justifyContent="flex-end")}}}g.value=y.scrollTop}return(b,y)=>(d(),H(le,null,[N(e(Y),$({ref:e(t),"data-reka-select-viewport":"",role:"presentation"},{...b.$attrs,...s},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:v}),{default:m(()=>[T(b.$slots,"default")]),_:3},16),N(e(Y),{as:"style",nonce:e(f)},{default:m(()=>y[0]||(y[0]=[ie(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-select-viewport]::-webkit-scrollbar { display: none; } ")])),_:1,__:[0]},8,["nonce"])],64))}}),Pa=ka;const Ke={slots:{base:["relative group rounded-md inline-flex items-center disabled:cursor-not-allowed disabled:opacity-75","transition-colors"],leading:"absolute inset-y-0 start-0 flex items-center",leadingIcon:"shrink-0 text-dimmed",leadingAvatar:"shrink-0",leadingAvatarSize:"",trailing:"absolute inset-y-0 end-0 flex items-center",trailingIcon:"shrink-0 text-dimmed",value:"truncate pointer-events-none",placeholder:"truncate text-dimmed",arrow:"fill-bg stroke-default",content:"max-h-[min(15rem,var(--reka-select-content-available-height,15rem))] w-(--reka-select-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden origin-(--reka-select-content-transform-origin) pointer-events-auto flex flex-col",viewport:"relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1",group:"p-1 isolate",empty:"text-center text-muted",label:"font-semibold text-highlighted",separator:"-mx-1 my-1 h-px bg-border",item:["group relative w-full flex items-start select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-default data-highlighted:not-data-disabled:text-highlighted data-highlighted:not-data-disabled:before:bg-elevated/50","transition-colors before:transition-colors"],itemLeadingIcon:["shrink-0 text-dimmed group-data-highlighted:not-group-data-disabled:text-default","transition-colors"],itemLeadingAvatar:"shrink-0",itemLeadingAvatarSize:"",itemLeadingChip:"shrink-0",itemLeadingChipSize:"",itemTrailing:"ms-auto inline-flex gap-1.5 items-center",itemTrailingIcon:"shrink-0",itemWrapper:"flex-1 flex flex-col min-w-0",itemLabel:"truncate",itemDescription:"truncate text-muted"},variants:{fieldGroup:{horizontal:"not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none focus-visible:z-[1]",vertical:"not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none focus-visible:z-[1]"},size:{xs:{base:"px-2 py-1 text-xs gap-1",leading:"ps-2",trailing:"pe-2",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4",label:"p-1 text-[10px]/3 gap-1",item:"p-1 text-xs gap-1",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemLeadingChip:"size-4",itemLeadingChipSize:"sm",itemTrailingIcon:"size-4",empty:"p-2 text-xs"},sm:{base:"px-2.5 py-1.5 text-xs gap-1.5",leading:"ps-2.5",trailing:"pe-2.5",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4",label:"p-1.5 text-[10px]/3 gap-1.5",item:"p-1.5 text-xs gap-1.5",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemLeadingChip:"size-4",itemLeadingChipSize:"sm",itemTrailingIcon:"size-4",empty:"p-2.5 text-xs"},md:{base:"px-2.5 py-1.5 text-sm gap-1.5",leading:"ps-2.5",trailing:"pe-2.5",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5",label:"p-1.5 text-xs gap-1.5",item:"p-1.5 text-sm gap-1.5",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemLeadingChip:"size-5",itemLeadingChipSize:"md",itemTrailingIcon:"size-5",empty:"p-2.5 text-sm"},lg:{base:"px-3 py-2 text-sm gap-2",leading:"ps-3",trailing:"pe-3",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5",label:"p-2 text-xs gap-2",item:"p-2 text-sm gap-2",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemLeadingChip:"size-5",itemLeadingChipSize:"md",itemTrailingIcon:"size-5",empty:"p-3 text-sm"},xl:{base:"px-3 py-2 text-base gap-2",leading:"ps-3",trailing:"pe-3",leadingIcon:"size-6",leadingAvatarSize:"xs",trailingIcon:"size-6",label:"p-2 text-sm gap-2",item:"p-2 text-base gap-2",itemLeadingIcon:"size-6",itemLeadingAvatarSize:"xs",itemLeadingChip:"size-6",itemLeadingChipSize:"lg",itemTrailingIcon:"size-6",empty:"p-3 text-base"}},variant:{outline:"text-highlighted bg-default ring ring-inset ring-accented hover:bg-elevated disabled:bg-default",soft:"text-highlighted bg-elevated/50 hover:bg-elevated focus:bg-elevated disabled:bg-elevated/50",subtle:"text-highlighted bg-elevated ring ring-inset ring-accented hover:bg-accented/75 disabled:bg-elevated",ghost:"text-highlighted bg-transparent hover:bg-elevated focus:bg-elevated disabled:bg-transparent dark:disabled:bg-transparent",none:"text-highlighted bg-transparent focus:outline-none"},color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},leading:{true:""},trailing:{true:""},loading:{true:""},highlight:{true:""},fixed:{false:""},type:{file:"file:me-1.5 file:font-medium file:text-muted file:outline-none"},position:{popper:{content:"data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]"},"item-aligned":{content:""}},multiple:{true:""}},compoundVariants:[{color:"primary",variant:["outline","subtle"],class:"outline-primary/25 focus-visible:outline-3 focus-visible:ring-primary"},{color:"secondary",variant:["outline","subtle"],class:"outline-secondary/25 focus-visible:outline-3 focus-visible:ring-secondary"},{color:"success",variant:["outline","subtle"],class:"outline-success/25 focus-visible:outline-3 focus-visible:ring-success"},{color:"info",variant:["outline","subtle"],class:"outline-info/25 focus-visible:outline-3 focus-visible:ring-info"},{color:"warning",variant:["outline","subtle"],class:"outline-warning/25 focus-visible:outline-3 focus-visible:ring-warning"},{color:"error",variant:["outline","subtle"],class:"outline-error/25 focus-visible:outline-3 focus-visible:ring-error"},{color:"primary",variant:["soft","ghost"],class:"outline-primary/25 focus-visible:outline-3"},{color:"secondary",variant:["soft","ghost"],class:"outline-secondary/25 focus-visible:outline-3"},{color:"success",variant:["soft","ghost"],class:"outline-success/25 focus-visible:outline-3"},{color:"info",variant:["soft","ghost"],class:"outline-info/25 focus-visible:outline-3"},{color:"warning",variant:["soft","ghost"],class:"outline-warning/25 focus-visible:outline-3"},{color:"error",variant:["soft","ghost"],class:"outline-error/25 focus-visible:outline-3"},{color:"primary",highlight:!0,class:"ring ring-inset ring-primary"},{color:"secondary",highlight:!0,class:"ring ring-inset ring-secondary"},{color:"success",highlight:!0,class:"ring ring-inset ring-success"},{color:"info",highlight:!0,class:"ring ring-inset ring-info"},{color:"warning",highlight:!0,class:"ring ring-inset ring-warning"},{color:"error",highlight:!0,class:"ring ring-inset ring-error"},{color:"neutral",variant:["outline","subtle"],class:"outline-inverted/25 focus-visible:outline-3 focus-visible:ring-inverted"},{color:"neutral",variant:["soft","ghost"],class:"outline-inverted/25 focus-visible:outline-3"},{color:"neutral",highlight:!0,class:"ring ring-inset ring-inverted"},{leading:!0,size:"xs",class:"ps-7"},{leading:!0,size:"sm",class:"ps-8"},{leading:!0,size:"md",class:"ps-9"},{leading:!0,size:"lg",class:"ps-10"},{leading:!0,size:"xl",class:"ps-11"},{trailing:!0,size:"xs",class:"pe-7"},{trailing:!0,size:"sm",class:"pe-8"},{trailing:!0,size:"md",class:"pe-9"},{trailing:!0,size:"lg",class:"pe-10"},{trailing:!0,size:"xl",class:"pe-11"},{loading:!0,leading:!0,class:{leadingIcon:"animate-spin"}},{loading:!0,leading:!1,trailing:!0,class:{trailingIcon:"animate-spin"}},{fixed:!1,size:"xs",class:"md:text-xs"},{fixed:!1,size:"sm",class:"md:text-xs"},{fixed:!1,size:"md",class:"md:text-sm"},{fixed:!1,size:"lg",class:"md:text-sm"}],defaultVariants:{size:"md",color:"primary",variant:"outline",position:"popper"}},Aa=Object.assign({inheritAttrs:!1},{__name:"USelect",props:{id:{type:String,required:!1},placeholder:{type:String,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},trailingIcon:{type:null,required:!1},selectedIcon:{type:null,required:!1},content:{type:Object,required:!1},arrow:{type:[Boolean,Object],required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},valueKey:{type:null,required:!1,default:"value"},labelKey:{type:null,required:!1,default:"label"},descriptionKey:{type:null,required:!1,default:"description"},items:{type:null,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1},modelModifiers:{type:null,required:!1},multiple:{type:Boolean,required:!1},highlight:{type:Boolean,required:!1},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1,default:0},class:{type:null,required:!1},ui:{type:Object,required:!1},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},nullableValue:{type:String,required:!1},autocomplete:{type:String,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1}},emits:["change","blur","focus","update:modelValue","update:open"],setup(i,{expose:s,emit:a}){const f=i,r=a,u=xt(),t=qt("select",f),c=wt(),g=Ct(It(t,"open","defaultOpen","disabled","autocomplete","required","multiple","nullableValue"),r),v=Tt(ae(()=>t.portal)),b=K(()=>t.content?.position??c.ui?.select?.defaultVariants?.position??Ke.defaultVariants?.position),y=ae(()=>Pe(t.content,{side:"bottom",sideOffset:8,collisionPadding:8,position:b.value})),I=ae(()=>Pe(t.arrow,{rounded:!0})),{emitFormChange:C,emitFormInput:O,emitFormBlur:F,emitFormFocus:L,size:h,color:B,id:S,name:l,highlight:_,disabled:p,ariaAttrs:q}=kt(f),{orientation:k,size:z}=Pt(f),{isLeading:P,isTrailing:Z,leadingIconName:re,trailingIconName:oe}=Bt(ae(()=>Pe(t,{trailingIcon:c.ui.icons.chevronDown}))),qe=K(()=>z.value||h.value),he=K(()=>b.value==="item-aligned"),x=K(()=>Et({extend:Ke,...c.ui?.select||{}})({color:B.value??t.color,variant:t.variant,size:qe.value??t.size,loading:t.loading,highlight:_.value??t.highlight,leading:P.value||!!t.avatar||!!u.leading,trailing:Z.value||!!u.trailing,fieldGroup:k.value,position:b.value,multiple:t.multiple})),se=K(()=>t.items?.length?Ot(t.items)?t.items:[t.items]:[]),be=K(()=>se.value.flatMap(o=>o));function we(o){if(t.multiple&&Array.isArray(o)){const V=o.map(R=>Me(be.value,R,{labelKey:t.labelKey,valueKey:t.valueKey})).filter(R=>R!=null&&R!=="");return V.length>0?V.join(", "):void 0}return Me(be.value,o,{labelKey:t.labelKey,valueKey:t.valueKey})}const X=Re("triggerRef");function Ce(){t.autofocus&&X.value?.$el?.focus({focusVisible:!0})}J(()=>{setTimeout(()=>{Ce()},t.autofocusDelay)});function ue(o){t.modelModifiers?.trim&&(typeof o=="string"||o===null||o===void 0)&&(o=o?.trim()??null),t.modelModifiers?.number&&(o=Lt(o)),t.modelModifiers?.nullable&&(o??=null),t.modelModifiers?.optional&&!t.modelModifiers?.nullable&&o!==null&&(o??=void 0);const V=new Event("change",{target:{value:o}});r("change",V),C(),O()}function Ie(o){if(o){const V=new FocusEvent("focus");r("focus",V),L()}else{const V=new FocusEvent("blur");r("blur",V),F()}}function E(o){return typeof o=="object"&&o!==null}function Te(o){o||X.value?.$el?.dispatchEvent(new PointerEvent("pointerdown",{bubbles:!0,button:0}))}const ke=Re("viewportRef");return s({triggerRef:ae(()=>X.value?.$el),viewportRef:ae(()=>{const o=ke.value;return o&&typeof o=="object"&&"$el"in o?o.$el:o})}),(o,V)=>(d(),w(e(Kt),$({name:e(l)},e(g),{autocomplete:e(t).autocomplete,disabled:e(p),"default-value":e(t).defaultValue,"model-value":i.modelValue,"onUpdate:modelValue":ue,"onUpdate:open":Ie}),{default:m(({modelValue:R,open:W})=>[N(e(Ca),$({id:e(S),ref_key:"triggerRef",ref:X,"data-slot":"base",class:x.value.base({class:[e(t).ui?.base,e(t).class]})},{...o.$attrs,...e(q)},{onClick:G=>Te(W)}),{default:m(()=>[e(P)||e(t).avatar||u.leading?(d(),H("span",{key:0,"data-slot":"leading",class:M(x.value.leading({class:e(t).ui?.leading}))},[T(o.$slots,"leading",{modelValue:R,open:W,ui:x.value},()=>[e(P)&&e(re)?(d(),w(_e,{key:0,name:e(re),"data-slot":"leadingIcon",class:M(x.value.leadingIcon({class:e(t).ui?.leadingIcon}))},null,8,["name","class"])):e(t).avatar?(d(),w(Fe,$({key:1,size:e(t).ui?.itemLeadingAvatarSize||x.value.itemLeadingAvatarSize()},e(t).avatar,{"data-slot":"itemLeadingAvatar",class:x.value.itemLeadingAvatar({class:e(t).ui?.itemLeadingAvatar})}),null,16,["size","class"])):j("",!0)])],2)):j("",!0),(d(!0),H(le,null,Se([we(R)],G=>(d(),w(e(Ta),{key:G,"data-slot":G!=null?"value":"placeholder",class:M(G!=null?x.value.value({class:e(t).ui?.value}):x.value.placeholder({class:e(t).ui?.placeholder}))},{default:m(()=>[T(o.$slots,"default",{modelValue:R,open:W,ui:x.value},()=>[ie(pe(G??e(t).placeholder??" "),1)])]),_:2},1032,["data-slot","class"]))),128)),e(Z)||u.trailing?(d(),H("span",{key:1,"data-slot":"trailing",class:M(x.value.trailing({class:e(t).ui?.trailing}))},[T(o.$slots,"trailing",{modelValue:R,open:W,ui:x.value},()=>[e(oe)?(d(),w(_e,{key:0,name:e(oe),"data-slot":"trailingIcon",class:M(x.value.trailingIcon({class:e(t).ui?.trailingIcon}))},null,8,["name","class"])):j("",!0)])],2)):j("",!0)]),_:2},1040,["id","class","onClick"]),N(e(Sa),xe(Ee(e(v))),{default:m(()=>[N(e(zt),null,{default:m(()=>[N(e(ra),$({"data-slot":"content",class:x.value.content({class:e(t).ui?.content})},y.value),{default:m(()=>[T(o.$slots,"content-top"),(d(),w(je(he.value?e(Pa):"div"),{ref_key:"viewportRef",ref:ke,role:"presentation","data-slot":"viewport",class:M(x.value.viewport({class:e(t).ui?.viewport}))},{default:m(()=>[(d(!0),H(le,null,Se(se.value,(G,ee)=>(d(),w(e(da),{key:`group-${ee}`,"data-slot":"group",class:M(x.value.group({class:e(t).ui?.group}))},{default:m(()=>[(d(!0),H(le,null,Se(G,(n,te)=>(d(),H(le,{key:`group-${ee}-${te}`},[E(n)&&n.type==="label"?(d(),w(e(ba),{key:0,"data-slot":"label",class:M(x.value.label({class:[e(t).ui?.label,n.ui?.label,n.class]}))},{default:m(()=>[ie(pe(e(de)(n,e(t).labelKey)),1)]),_:2},1032,["class"])):E(n)&&n.type==="separator"?(d(),w(e(qa),{key:1,"data-slot":"separator",class:M(x.value.separator({class:[e(t).ui?.separator,n.ui?.separator,n.class]}))},null,8,["class"])):(d(),w(e(fa),{key:2,"data-slot":"item",class:M(x.value.item({class:[e(t).ui?.item,E(n)&&n.ui?.item,E(n)&&n.class]})),disabled:E(n)&&n.disabled,value:E(n)?e(de)(n,e(t).valueKey):n,onSelect:Je=>E(n)&&n.onSelect?.(Je)},{default:m(()=>[T(o.$slots,"item",{item:n,index:te,ui:x.value},()=>[T(o.$slots,"item-leading",{item:n,index:te,ui:x.value},()=>[E(n)&&n.icon?(d(),w(_e,{key:0,name:n.icon,"data-slot":"itemLeadingIcon",class:M(x.value.itemLeadingIcon({class:[e(t).ui?.itemLeadingIcon,n.ui?.itemLeadingIcon]}))},null,8,["name","class"])):E(n)&&n.avatar?(d(),w(Fe,$({key:1,size:n.ui?.itemLeadingAvatarSize||e(t).ui?.itemLeadingAvatarSize||x.value.itemLeadingAvatarSize()},{ref_for:!0},n.avatar,{"data-slot":"itemLeadingAvatar",class:x.value.itemLeadingAvatar({class:[e(t).ui?.itemLeadingAvatar,n.ui?.itemLeadingAvatar]})}),null,16,["size","class"])):E(n)&&n.chip?(d(),w(At,$({key:2,size:n.ui?.itemLeadingChipSize||e(t).ui?.itemLeadingChipSize||x.value.itemLeadingChipSize(),inset:"",standalone:""},{ref_for:!0},n.chip,{"data-slot":"itemLeadingChip",class:x.value.itemLeadingChip({class:[e(t).ui?.itemLeadingChip,n.ui?.itemLeadingChip]})}),null,16,["size","class"])):j("",!0)]),Be("span",{"data-slot":"itemWrapper",class:M(x.value.itemWrapper({class:[e(t).ui?.itemWrapper,E(n)&&n.ui?.itemWrapper]}))},[N(e(ya),{"data-slot":"itemLabel",class:M(x.value.itemLabel({class:[e(t).ui?.itemLabel,E(n)&&n.ui?.itemLabel]}))},{default:m(()=>[T(o.$slots,"item-label",{item:n,index:te},()=>[ie(pe(E(n)?e(de)(n,e(t).labelKey):n),1)])]),_:2},1032,["class"]),E(n)&&(e(de)(n,e(t).descriptionKey)||u["item-description"])?(d(),H("span",{key:0,"data-slot":"itemDescription",class:M(x.value.itemDescription({class:[e(t).ui?.itemDescription,E(n)&&n.ui?.itemDescription]}))},[T(o.$slots,"item-description",{item:n,index:te},()=>[ie(pe(e(de)(n,e(t).descriptionKey)),1)])],2)):j("",!0)],2),Be("span",{"data-slot":"itemTrailing",class:M(x.value.itemTrailing({class:[e(t).ui?.itemTrailing,E(n)&&n.ui?.itemTrailing]}))},[T(o.$slots,"item-trailing",{item:n,index:te,ui:x.value}),N(e(va),{"as-child":""},{default:m(()=>[N(_e,{name:e(t).selectedIcon||e(c).ui.icons.check,"data-slot":"itemTrailingIcon",class:M(x.value.itemTrailingIcon({class:[e(t).ui?.itemTrailingIcon,E(n)&&n.ui?.itemTrailingIcon]}))},null,8,["name","class"])]),_:2},1024)],2)])]),_:2},1032,["class","disabled","value","onSelect"]))],64))),128))]),_:2},1032,["class"]))),128))]),_:3},8,["class"])),T(o.$slots,"content-bottom"),e(t).arrow?(d(),w(e(ta),$({key:0},I.value,{"data-slot":"arrow",class:x.value.arrow({class:e(t).ui?.arrow})}),null,16,["class"])):j("",!0)]),_:3},16,["class"])]),_:3})]),_:3},16)]),_:3},16,["name","autocomplete","disabled","default-value","model-value"]))}});export{Aa as _};
@@ -1 +1 @@
1
- import{a0 as $,a1 as S,a2 as C,a3 as V,o as a,f as l,g as B,T as c,k as r,aH as j,U as d,v as A,p as s,q as o,i as N,c as u,m,t as x,F as b,y as h,_ as p,V as O,h as P,a6 as F}from"./D3SYPlEB.js";const I={slots:{root:"relative overflow-hidden w-full rounded-lg p-4 flex gap-2.5",wrapper:"min-w-0 flex-1 flex flex-col",title:"text-sm font-medium",description:"text-sm opacity-90",icon:"shrink-0 size-5",avatar:"shrink-0",avatarSize:"2xl",actions:"flex flex-wrap gap-1.5 shrink-0",close:"p-0"},variants:{color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},variant:{solid:"",outline:"",soft:"",subtle:""},orientation:{horizontal:{root:"items-center",actions:"items-center"},vertical:{root:"items-start",actions:"items-start mt-2.5"}},title:{true:{description:"mt-1"}}},compoundVariants:[{color:"primary",variant:"solid",class:{root:"bg-primary text-inverted"}},{color:"secondary",variant:"solid",class:{root:"bg-secondary text-inverted"}},{color:"success",variant:"solid",class:{root:"bg-success text-inverted"}},{color:"info",variant:"solid",class:{root:"bg-info text-inverted"}},{color:"warning",variant:"solid",class:{root:"bg-warning text-inverted"}},{color:"error",variant:"solid",class:{root:"bg-error text-inverted"}},{color:"primary",variant:"outline",class:{root:"text-primary ring ring-inset ring-primary/25"}},{color:"secondary",variant:"outline",class:{root:"text-secondary ring ring-inset ring-secondary/25"}},{color:"success",variant:"outline",class:{root:"text-success ring ring-inset ring-success/25"}},{color:"info",variant:"outline",class:{root:"text-info ring ring-inset ring-info/25"}},{color:"warning",variant:"outline",class:{root:"text-warning ring ring-inset ring-warning/25"}},{color:"error",variant:"outline",class:{root:"text-error ring ring-inset ring-error/25"}},{color:"primary",variant:"soft",class:{root:"bg-primary/10 text-primary"}},{color:"secondary",variant:"soft",class:{root:"bg-secondary/10 text-secondary"}},{color:"success",variant:"soft",class:{root:"bg-success/10 text-success"}},{color:"info",variant:"soft",class:{root:"bg-info/10 text-info"}},{color:"warning",variant:"soft",class:{root:"bg-warning/10 text-warning"}},{color:"error",variant:"soft",class:{root:"bg-error/10 text-error"}},{color:"primary",variant:"subtle",class:{root:"bg-primary/10 text-primary ring ring-inset ring-primary/25"}},{color:"secondary",variant:"subtle",class:{root:"bg-secondary/10 text-secondary ring ring-inset ring-secondary/25"}},{color:"success",variant:"subtle",class:{root:"bg-success/10 text-success ring ring-inset ring-success/25"}},{color:"info",variant:"subtle",class:{root:"bg-info/10 text-info ring ring-inset ring-info/25"}},{color:"warning",variant:"subtle",class:{root:"bg-warning/10 text-warning ring ring-inset ring-warning/25"}},{color:"error",variant:"subtle",class:{root:"bg-error/10 text-error ring ring-inset ring-error/25"}},{color:"neutral",variant:"solid",class:{root:"text-inverted bg-inverted"}},{color:"neutral",variant:"outline",class:{root:"text-highlighted bg-default ring ring-inset ring-default"}},{color:"neutral",variant:"soft",class:{root:"text-highlighted bg-elevated/50"}},{color:"neutral",variant:"subtle",class:{root:"text-highlighted bg-elevated/50 ring ring-inset ring-accented"}}],defaultVariants:{color:"primary",variant:"solid"}},T={__name:"UAlert",props:{as:{type:null,required:!1},title:{type:String,required:!1},description:{type:String,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},orientation:{type:null,required:!1,default:"vertical"},actions:{type:Array,required:!1},close:{type:[Boolean,Object],required:!1},closeIcon:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},emits:["update:open"],setup(w,{emit:k}){const q=w,z=k,i=$(),t=S("alert",q),{t:_}=C(),f=V(),e=P(()=>F({extend:I,...f.ui?.alert||{}})({color:t.color,variant:t.variant,orientation:t.orientation,title:!!t.title||!!i.title}));return(n,y)=>(a(),l(r(O),{as:r(t).as,"data-orientation":r(t).orientation,"data-slot":"root",class:s(e.value.root({class:[r(t).ui?.root,r(t).class]}))},{default:B(()=>[c(n.$slots,"leading",{ui:e.value},()=>[r(t).avatar?(a(),l(j,d({key:0,size:r(t).ui?.avatarSize||e.value.avatarSize()},r(t).avatar,{"data-slot":"avatar",class:e.value.avatar({class:r(t).ui?.avatar})}),null,16,["size","class"])):r(t).icon?(a(),l(A,{key:1,name:r(t).icon,"data-slot":"icon",class:s(e.value.icon({class:r(t).ui?.icon}))},null,8,["name","class"])):o("",!0)]),N("div",{"data-slot":"wrapper",class:s(e.value.wrapper({class:r(t).ui?.wrapper}))},[r(t).title||i.title?(a(),u("div",{key:0,"data-slot":"title",class:s(e.value.title({class:r(t).ui?.title}))},[c(n.$slots,"title",{},()=>[m(x(r(t).title),1)])],2)):o("",!0),r(t).description||i.description?(a(),u("div",{key:1,"data-slot":"description",class:s(e.value.description({class:r(t).ui?.description}))},[c(n.$slots,"description",{},()=>[m(x(r(t).description),1)])],2)):o("",!0),r(t).orientation==="vertical"&&(r(t).actions?.length||i.actions)?(a(),u("div",{key:2,"data-slot":"actions",class:s(e.value.actions({class:r(t).ui?.actions}))},[c(n.$slots,"actions",{},()=>[(a(!0),u(b,null,h(r(t).actions,(g,v)=>(a(),l(p,d({key:v,size:"xs"},{ref_for:!0},g),null,16))),128))])],2)):o("",!0)],2),r(t).orientation==="horizontal"&&(r(t).actions?.length||i.actions)||r(t).close?(a(),u("div",{key:0,"data-slot":"actions",class:s(e.value.actions({class:r(t).ui?.actions,orientation:"horizontal"}))},[r(t).orientation==="horizontal"&&(r(t).actions?.length||i.actions)?c(n.$slots,"actions",{key:0},()=>[(a(!0),u(b,null,h(r(t).actions,(g,v)=>(a(),l(p,d({key:v,size:"xs"},{ref_for:!0},g),null,16))),128))]):o("",!0),c(n.$slots,"close",{ui:e.value},()=>[r(t).close?(a(),l(p,d({key:0,icon:r(t).closeIcon||r(f).ui.icons.close,color:"neutral",variant:"link","aria-label":r(_)("alert.close")},typeof r(t).close=="object"?r(t).close:{},{"data-slot":"close",class:e.value.close({class:r(t).ui?.close}),onClick:y[0]||(y[0]=g=>z("update:open",!1))}),null,16,["icon","aria-label","class"])):o("",!0)])],2)):o("",!0)]),_:3},8,["as","data-orientation","class"]))}};export{T as _};
1
+ import{a0 as $,a1 as S,a2 as C,a3 as V,o as a,f as l,g as B,T as c,k as r,aH as j,U as d,v as A,p as s,q as o,i as N,c as u,m,t as x,F as b,y as h,_ as p,V as O,h as P,a6 as F}from"./DHltYerF.js";const I={slots:{root:"relative overflow-hidden w-full rounded-lg p-4 flex gap-2.5",wrapper:"min-w-0 flex-1 flex flex-col",title:"text-sm font-medium",description:"text-sm opacity-90",icon:"shrink-0 size-5",avatar:"shrink-0",avatarSize:"2xl",actions:"flex flex-wrap gap-1.5 shrink-0",close:"p-0"},variants:{color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},variant:{solid:"",outline:"",soft:"",subtle:""},orientation:{horizontal:{root:"items-center",actions:"items-center"},vertical:{root:"items-start",actions:"items-start mt-2.5"}},title:{true:{description:"mt-1"}}},compoundVariants:[{color:"primary",variant:"solid",class:{root:"bg-primary text-inverted"}},{color:"secondary",variant:"solid",class:{root:"bg-secondary text-inverted"}},{color:"success",variant:"solid",class:{root:"bg-success text-inverted"}},{color:"info",variant:"solid",class:{root:"bg-info text-inverted"}},{color:"warning",variant:"solid",class:{root:"bg-warning text-inverted"}},{color:"error",variant:"solid",class:{root:"bg-error text-inverted"}},{color:"primary",variant:"outline",class:{root:"text-primary ring ring-inset ring-primary/25"}},{color:"secondary",variant:"outline",class:{root:"text-secondary ring ring-inset ring-secondary/25"}},{color:"success",variant:"outline",class:{root:"text-success ring ring-inset ring-success/25"}},{color:"info",variant:"outline",class:{root:"text-info ring ring-inset ring-info/25"}},{color:"warning",variant:"outline",class:{root:"text-warning ring ring-inset ring-warning/25"}},{color:"error",variant:"outline",class:{root:"text-error ring ring-inset ring-error/25"}},{color:"primary",variant:"soft",class:{root:"bg-primary/10 text-primary"}},{color:"secondary",variant:"soft",class:{root:"bg-secondary/10 text-secondary"}},{color:"success",variant:"soft",class:{root:"bg-success/10 text-success"}},{color:"info",variant:"soft",class:{root:"bg-info/10 text-info"}},{color:"warning",variant:"soft",class:{root:"bg-warning/10 text-warning"}},{color:"error",variant:"soft",class:{root:"bg-error/10 text-error"}},{color:"primary",variant:"subtle",class:{root:"bg-primary/10 text-primary ring ring-inset ring-primary/25"}},{color:"secondary",variant:"subtle",class:{root:"bg-secondary/10 text-secondary ring ring-inset ring-secondary/25"}},{color:"success",variant:"subtle",class:{root:"bg-success/10 text-success ring ring-inset ring-success/25"}},{color:"info",variant:"subtle",class:{root:"bg-info/10 text-info ring ring-inset ring-info/25"}},{color:"warning",variant:"subtle",class:{root:"bg-warning/10 text-warning ring ring-inset ring-warning/25"}},{color:"error",variant:"subtle",class:{root:"bg-error/10 text-error ring ring-inset ring-error/25"}},{color:"neutral",variant:"solid",class:{root:"text-inverted bg-inverted"}},{color:"neutral",variant:"outline",class:{root:"text-highlighted bg-default ring ring-inset ring-default"}},{color:"neutral",variant:"soft",class:{root:"text-highlighted bg-elevated/50"}},{color:"neutral",variant:"subtle",class:{root:"text-highlighted bg-elevated/50 ring ring-inset ring-accented"}}],defaultVariants:{color:"primary",variant:"solid"}},T={__name:"UAlert",props:{as:{type:null,required:!1},title:{type:String,required:!1},description:{type:String,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},orientation:{type:null,required:!1,default:"vertical"},actions:{type:Array,required:!1},close:{type:[Boolean,Object],required:!1},closeIcon:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},emits:["update:open"],setup(w,{emit:k}){const q=w,z=k,i=$(),t=S("alert",q),{t:_}=C(),f=V(),e=P(()=>F({extend:I,...f.ui?.alert||{}})({color:t.color,variant:t.variant,orientation:t.orientation,title:!!t.title||!!i.title}));return(n,y)=>(a(),l(r(O),{as:r(t).as,"data-orientation":r(t).orientation,"data-slot":"root",class:s(e.value.root({class:[r(t).ui?.root,r(t).class]}))},{default:B(()=>[c(n.$slots,"leading",{ui:e.value},()=>[r(t).avatar?(a(),l(j,d({key:0,size:r(t).ui?.avatarSize||e.value.avatarSize()},r(t).avatar,{"data-slot":"avatar",class:e.value.avatar({class:r(t).ui?.avatar})}),null,16,["size","class"])):r(t).icon?(a(),l(A,{key:1,name:r(t).icon,"data-slot":"icon",class:s(e.value.icon({class:r(t).ui?.icon}))},null,8,["name","class"])):o("",!0)]),N("div",{"data-slot":"wrapper",class:s(e.value.wrapper({class:r(t).ui?.wrapper}))},[r(t).title||i.title?(a(),u("div",{key:0,"data-slot":"title",class:s(e.value.title({class:r(t).ui?.title}))},[c(n.$slots,"title",{},()=>[m(x(r(t).title),1)])],2)):o("",!0),r(t).description||i.description?(a(),u("div",{key:1,"data-slot":"description",class:s(e.value.description({class:r(t).ui?.description}))},[c(n.$slots,"description",{},()=>[m(x(r(t).description),1)])],2)):o("",!0),r(t).orientation==="vertical"&&(r(t).actions?.length||i.actions)?(a(),u("div",{key:2,"data-slot":"actions",class:s(e.value.actions({class:r(t).ui?.actions}))},[c(n.$slots,"actions",{},()=>[(a(!0),u(b,null,h(r(t).actions,(g,v)=>(a(),l(p,d({key:v,size:"xs"},{ref_for:!0},g),null,16))),128))])],2)):o("",!0)],2),r(t).orientation==="horizontal"&&(r(t).actions?.length||i.actions)||r(t).close?(a(),u("div",{key:0,"data-slot":"actions",class:s(e.value.actions({class:r(t).ui?.actions,orientation:"horizontal"}))},[r(t).orientation==="horizontal"&&(r(t).actions?.length||i.actions)?c(n.$slots,"actions",{key:0},()=>[(a(!0),u(b,null,h(r(t).actions,(g,v)=>(a(),l(p,d({key:v,size:"xs"},{ref_for:!0},g),null,16))),128))]):o("",!0),c(n.$slots,"close",{ui:e.value},()=>[r(t).close?(a(),l(p,d({key:0,icon:r(t).closeIcon||r(f).ui.icons.close,color:"neutral",variant:"link","aria-label":r(_)("alert.close")},typeof r(t).close=="object"?r(t).close:{},{"data-slot":"close",class:e.value.close({class:r(t).ui?.close}),onClick:y[0]||(y[0]=g=>z("update:open",!1))}),null,16,["icon","aria-label","class"])):o("",!0)])],2)):o("",!0)]),_:3},8,["as","data-orientation","class"]))}};export{T as _};
@@ -1 +1 @@
1
- import{a1 as S,a4 as V,b0 as P,a2 as A,a3 as B,r as O,o as r,f as v,U as b,k as a,_ as j,h as q,a6 as w,a0 as F,g as k,i as L,p as u,c as f,F as C,y as N,j as y,aJ as D,b1 as K,b2 as T,T as d,v as $,aH as U,q as m,aG as I,m as E,t as G,V as H}from"./D3SYPlEB.js";import{a as J}from"./B6rt3IcG.js";const R={base:"hidden lg:flex",variants:{side:{left:"",right:""}}},X={__name:"UDashboardSidebarCollapse",props:{color:{type:null,required:!1,default:"neutral"},variant:{type:null,required:!1,default:"ghost"},side:{type:String,required:!1,default:"left"},ui:{type:Object,required:!1},label:{type:String,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},class:{type:null,required:!1},icon:{type:null,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(g){const i=S("dashboardSidebarCollapse",g),l=V(P(i,"icon","side","class")),{t:p}=A(),o=B(),{sidebarCollapsed:c,collapseSidebar:s}=J({sidebarCollapsed:O(!1),collapseSidebar:()=>{}}),n=q(()=>w({extend:R,...o.ui?.dashboardSidebarCollapse||{}}));return(_,e)=>(r(),v(j,b({...a(l),icon:a(i).icon||(a(c)?a(o).ui.icons.panelOpen:a(o).ui.icons.panelClose),"aria-label":a(c)?a(p)("dashboardSidebarCollapse.expand"):a(p)("dashboardSidebarCollapse.collapse"),..._.$attrs},{class:n.value({class:[a(i).ui?.base,a(i).class],side:a(i).side}),onClick:e[0]||(e[0]=t=>a(s)?.(!a(c)))}),null,16,["class"]))}},M={slots:{root:"relative min-w-0",list:"flex items-center gap-1.5",item:"flex min-w-0",link:"group relative flex items-center gap-1.5 text-sm min-w-0 rounded-md",linkLeadingIcon:"shrink-0 size-5",linkLeadingAvatar:"shrink-0",linkLeadingAvatarSize:"2xs",linkLabel:"truncate",separator:"flex",separatorIcon:"shrink-0 size-5 text-muted"},variants:{active:{true:{link:"font-semibold"},false:{link:"text-muted font-medium"}},disabled:{true:{link:"cursor-not-allowed opacity-75"}},to:{true:""},color:{primary:{link:"outline-primary/25 focus-visible:outline-3"},secondary:{link:"outline-secondary/25 focus-visible:outline-3"},success:{link:"outline-success/25 focus-visible:outline-3"},info:{link:"outline-info/25 focus-visible:outline-3"},warning:{link:"outline-warning/25 focus-visible:outline-3"},error:{link:"outline-error/25 focus-visible:outline-3"},neutral:{link:"outline-inverted/25 focus-visible:outline-3"}}},compoundVariants:[{disabled:!1,active:!1,to:!0,class:{link:["hover:text-default","transition-colors"]}},{color:"primary",active:!0,class:{link:"text-primary"}},{color:"secondary",active:!0,class:{link:"text-secondary"}},{color:"success",active:!0,class:{link:"text-success"}},{color:"info",active:!0,class:{link:"text-info"}},{color:"warning",active:!0,class:{link:"text-warning"}},{color:"error",active:!0,class:{link:"text-error"}},{color:"neutral",active:!0,class:{link:"text-highlighted"}}],defaultVariants:{color:"primary"}},Y={__name:"UBreadcrumb",props:{as:{type:null,required:!1,default:"nav"},items:{type:Array,required:!1},separatorIcon:{type:null,required:!1},color:{type:null,required:!1},labelKey:{type:null,required:!1,default:"label"},class:{type:null,required:!1},ui:{type:Object,required:!1}},setup(g){const h=g,i=F(),l=S("breadcrumb",h),{dir:p}=A(),o=B(),c=q(()=>l.separatorIcon||(p.value==="rtl"?o.ui.icons.chevronLeft:o.ui.icons.chevronRight)),s=q(()=>w({extend:M,...o.ui?.breadcrumb||{}})({color:l.color}));return(n,_)=>(r(),v(a(H),{as:a(l).as,"aria-label":"breadcrumb","data-slot":"root",class:u(s.value.root({class:[a(l).ui?.root,a(l).class]}))},{default:k(()=>[L("ol",{"data-slot":"list",class:u(s.value.list({class:a(l).ui?.list}))},[(r(!0),f(C,null,N(a(l).items,(e,t)=>(r(),f(C,{key:t},[L("li",{"data-slot":"item",class:u(s.value.item({class:[a(l).ui?.item,e.ui?.item]}))},[y(D,b({ref_for:!0},a(K)(e),{custom:""}),{default:k(({active:x,...z})=>[y(T,b({ref_for:!0},z,{as:"span","aria-current":(e.active??x)&&t===a(l).items.length-1?"page":void 0,"data-slot":"link",class:s.value.link({class:[a(l).ui?.link,e.ui?.link,e.class],active:e.active??t===a(l).items.length-1,disabled:!!e.disabled,to:!!e.to})}),{default:k(()=>[d(n.$slots,e.slot||"item",{item:e,active:e.active??t===a(l).items.length-1,index:t,ui:s.value},()=>[d(n.$slots,e.slot?`${e.slot}-leading`:"item-leading",{item:e,active:e.active??t===a(l).items.length-1,index:t,ui:s.value},()=>[e.icon?(r(),v($,{key:0,name:e.icon,"data-slot":"linkLeadingIcon",class:u(s.value.linkLeadingIcon({class:[a(l).ui?.linkLeadingIcon,e.ui?.linkLeadingIcon],active:e.active??t===a(l).items.length-1}))},null,8,["name","class"])):e.avatar?(r(),v(U,b({key:1,size:a(l).ui?.linkLeadingAvatarSize||s.value.linkLeadingAvatarSize()},{ref_for:!0},e.avatar,{"data-slot":"linkLeadingAvatar",class:s.value.linkLeadingAvatar({class:[a(l).ui?.linkLeadingAvatar,e.ui?.linkLeadingAvatar],active:e.active??t===a(l).items.length-1})}),null,16,["size","class"])):m("",!0)]),a(I)(e,a(l).labelKey)||i[e.slot?`${e.slot}-label`:"item-label"]?(r(),f("span",{key:0,"data-slot":"linkLabel",class:u(s.value.linkLabel({class:[a(l).ui?.linkLabel,e.ui?.linkLabel]}))},[d(n.$slots,e.slot?`${e.slot}-label`:"item-label",{item:e,active:e.active??t===a(l).items.length-1,index:t},()=>[E(G(a(I)(e,a(l).labelKey)),1)])],2)):m("",!0),d(n.$slots,e.slot?`${e.slot}-trailing`:"item-trailing",{item:e,active:e.active??t===a(l).items.length-1,index:t})])]),_:2},1040,["aria-current","class"])]),_:2},1040)],2),t<a(l).items.length-1?(r(),f("li",{key:0,role:"presentation","aria-hidden":"true","data-slot":"separator",class:u(s.value.separator({class:[a(l).ui?.separator,e.ui?.separator]}))},[d(n.$slots,"separator",{ui:s.value},()=>[y($,{name:c.value,"data-slot":"separatorIcon",class:u(s.value.separatorIcon({class:[a(l).ui?.separatorIcon,e.ui?.separatorIcon]}))},null,8,["name","class"])])],2)):m("",!0)],64))),128))],2)]),_:3},8,["as","class"]))}};export{X as _,Y as a};
1
+ import{a1 as S,a4 as V,b0 as P,a2 as A,a3 as B,r as O,o as r,f as v,U as b,k as a,_ as j,h as q,a6 as w,a0 as F,g as k,i as L,p as u,c as f,F as C,y as N,j as y,aJ as D,b1 as K,b2 as T,T as d,v as $,aH as U,q as m,aG as I,m as E,t as G,V as H}from"./DHltYerF.js";import{a as J}from"./BbS6Bwby.js";const R={base:"hidden lg:flex",variants:{side:{left:"",right:""}}},X={__name:"UDashboardSidebarCollapse",props:{color:{type:null,required:!1,default:"neutral"},variant:{type:null,required:!1,default:"ghost"},side:{type:String,required:!1,default:"left"},ui:{type:Object,required:!1},label:{type:String,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},class:{type:null,required:!1},icon:{type:null,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(g){const i=S("dashboardSidebarCollapse",g),l=V(P(i,"icon","side","class")),{t:p}=A(),o=B(),{sidebarCollapsed:c,collapseSidebar:s}=J({sidebarCollapsed:O(!1),collapseSidebar:()=>{}}),n=q(()=>w({extend:R,...o.ui?.dashboardSidebarCollapse||{}}));return(_,e)=>(r(),v(j,b({...a(l),icon:a(i).icon||(a(c)?a(o).ui.icons.panelOpen:a(o).ui.icons.panelClose),"aria-label":a(c)?a(p)("dashboardSidebarCollapse.expand"):a(p)("dashboardSidebarCollapse.collapse"),..._.$attrs},{class:n.value({class:[a(i).ui?.base,a(i).class],side:a(i).side}),onClick:e[0]||(e[0]=t=>a(s)?.(!a(c)))}),null,16,["class"]))}},M={slots:{root:"relative min-w-0",list:"flex items-center gap-1.5",item:"flex min-w-0",link:"group relative flex items-center gap-1.5 text-sm min-w-0 rounded-md",linkLeadingIcon:"shrink-0 size-5",linkLeadingAvatar:"shrink-0",linkLeadingAvatarSize:"2xs",linkLabel:"truncate",separator:"flex",separatorIcon:"shrink-0 size-5 text-muted"},variants:{active:{true:{link:"font-semibold"},false:{link:"text-muted font-medium"}},disabled:{true:{link:"cursor-not-allowed opacity-75"}},to:{true:""},color:{primary:{link:"outline-primary/25 focus-visible:outline-3"},secondary:{link:"outline-secondary/25 focus-visible:outline-3"},success:{link:"outline-success/25 focus-visible:outline-3"},info:{link:"outline-info/25 focus-visible:outline-3"},warning:{link:"outline-warning/25 focus-visible:outline-3"},error:{link:"outline-error/25 focus-visible:outline-3"},neutral:{link:"outline-inverted/25 focus-visible:outline-3"}}},compoundVariants:[{disabled:!1,active:!1,to:!0,class:{link:["hover:text-default","transition-colors"]}},{color:"primary",active:!0,class:{link:"text-primary"}},{color:"secondary",active:!0,class:{link:"text-secondary"}},{color:"success",active:!0,class:{link:"text-success"}},{color:"info",active:!0,class:{link:"text-info"}},{color:"warning",active:!0,class:{link:"text-warning"}},{color:"error",active:!0,class:{link:"text-error"}},{color:"neutral",active:!0,class:{link:"text-highlighted"}}],defaultVariants:{color:"primary"}},Y={__name:"UBreadcrumb",props:{as:{type:null,required:!1,default:"nav"},items:{type:Array,required:!1},separatorIcon:{type:null,required:!1},color:{type:null,required:!1},labelKey:{type:null,required:!1,default:"label"},class:{type:null,required:!1},ui:{type:Object,required:!1}},setup(g){const h=g,i=F(),l=S("breadcrumb",h),{dir:p}=A(),o=B(),c=q(()=>l.separatorIcon||(p.value==="rtl"?o.ui.icons.chevronLeft:o.ui.icons.chevronRight)),s=q(()=>w({extend:M,...o.ui?.breadcrumb||{}})({color:l.color}));return(n,_)=>(r(),v(a(H),{as:a(l).as,"aria-label":"breadcrumb","data-slot":"root",class:u(s.value.root({class:[a(l).ui?.root,a(l).class]}))},{default:k(()=>[L("ol",{"data-slot":"list",class:u(s.value.list({class:a(l).ui?.list}))},[(r(!0),f(C,null,N(a(l).items,(e,t)=>(r(),f(C,{key:t},[L("li",{"data-slot":"item",class:u(s.value.item({class:[a(l).ui?.item,e.ui?.item]}))},[y(D,b({ref_for:!0},a(K)(e),{custom:""}),{default:k(({active:x,...z})=>[y(T,b({ref_for:!0},z,{as:"span","aria-current":(e.active??x)&&t===a(l).items.length-1?"page":void 0,"data-slot":"link",class:s.value.link({class:[a(l).ui?.link,e.ui?.link,e.class],active:e.active??t===a(l).items.length-1,disabled:!!e.disabled,to:!!e.to})}),{default:k(()=>[d(n.$slots,e.slot||"item",{item:e,active:e.active??t===a(l).items.length-1,index:t,ui:s.value},()=>[d(n.$slots,e.slot?`${e.slot}-leading`:"item-leading",{item:e,active:e.active??t===a(l).items.length-1,index:t,ui:s.value},()=>[e.icon?(r(),v($,{key:0,name:e.icon,"data-slot":"linkLeadingIcon",class:u(s.value.linkLeadingIcon({class:[a(l).ui?.linkLeadingIcon,e.ui?.linkLeadingIcon],active:e.active??t===a(l).items.length-1}))},null,8,["name","class"])):e.avatar?(r(),v(U,b({key:1,size:a(l).ui?.linkLeadingAvatarSize||s.value.linkLeadingAvatarSize()},{ref_for:!0},e.avatar,{"data-slot":"linkLeadingAvatar",class:s.value.linkLeadingAvatar({class:[a(l).ui?.linkLeadingAvatar,e.ui?.linkLeadingAvatar],active:e.active??t===a(l).items.length-1})}),null,16,["size","class"])):m("",!0)]),a(I)(e,a(l).labelKey)||i[e.slot?`${e.slot}-label`:"item-label"]?(r(),f("span",{key:0,"data-slot":"linkLabel",class:u(s.value.linkLabel({class:[a(l).ui?.linkLabel,e.ui?.linkLabel]}))},[d(n.$slots,e.slot?`${e.slot}-label`:"item-label",{item:e,active:e.active??t===a(l).items.length-1,index:t},()=>[E(G(a(I)(e,a(l).labelKey)),1)])],2)):m("",!0),d(n.$slots,e.slot?`${e.slot}-trailing`:"item-trailing",{item:e,active:e.active??t===a(l).items.length-1,index:t})])]),_:2},1040,["aria-current","class"])]),_:2},1040)],2),t<a(l).items.length-1?(r(),f("li",{key:0,role:"presentation","aria-hidden":"true","data-slot":"separator",class:u(s.value.separator({class:[a(l).ui?.separator,e.ui?.separator]}))},[d(n.$slots,"separator",{ui:s.value},()=>[y($,{name:c.value,"data-slot":"separatorIcon",class:u(s.value.separatorIcon({class:[a(l).ui?.separatorIcon,e.ui?.separatorIcon]}))},null,8,["name","class"])])],2)):m("",!0)],64))),128))],2)]),_:3},8,["as","class"]))}};export{X as _,Y as a};
@@ -1,4 +1,4 @@
1
- import{_ as ie}from"./AjuKBlzz.js";import{d as re,b as de,w as N,c as r,j as a,aa as ce,k as s,g as d,F as y,f as v,h as R,r as k,o as n,i,D as ue,l as me,_ as pe,m as c,v as fe,t as p,q as _,y as W,s as _e,p as ge,I as ye,K as ve}from"./D3SYPlEB.js";import{_ as he}from"./oFIS9u6t.js";import{_ as ke}from"./C8cz5feG.js";import{_ as xe}from"./empGC_x-.js";import{_ as be}from"./Db_-yjYg.js";import{_ as Se}from"./CCsl9MOZ.js";import{_ as we}from"./CCw3Tx4S.js";import{_ as Te}from"./B6IHiVa1.js";import{u as A}from"./Doul3p1_.js";import"./BUMZHDRC.js";import"./D3MWm6JP.js";import"./r3SBLxtE.js";import"./DoFSKAvY.js";import"./BAkJhSAW.js";import"./Cx65B3c3.js";const Pe={class:"space-y-6"},Ue={class:"space-y-3"},Ce={key:0,class:"flex items-center gap-2 text-sm text-success-600 dark:text-success-400"},Ie={key:1,class:"flex items-center gap-2 text-sm text-warning-600 dark:text-warning-400"},Me={key:2,class:"grid grid-cols-2 gap-2 text-sm"},$e={class:"font-mono"},Ve={class:"font-mono"},Ee={key:3,class:"text-sm text-muted space-y-1"},De={class:"flex items-center gap-2 w-full"},ze={key:0,class:"mb-4 p-4 rounded-lg border border-primary/30 bg-primary/5 space-y-3"},Ne={class:"grid grid-cols-2 gap-3"},Re={class:"flex justify-end gap-2"},We={key:1,class:"text-sm text-muted py-4 text-center"},Ae={class:"space-y-2"},Oe={class:"flex-1 min-w-0"},Fe={class:"font-medium text-sm flex items-center gap-1.5"},Be={class:"text-xs text-muted"},Le={key:3,class:"ml-1 text-primary text-xs"},je={class:"flex items-center gap-1"},He={key:0,class:"text-sm text-muted py-4 text-center"},qe={class:"space-y-2"},Je={class:"flex-1 min-w-0 space-y-0.5"},Ke={class:"font-medium text-sm"},Qe={class:"text-xs text-muted flex flex-wrap gap-x-3"},Xe={key:0},Ye={key:1},Ge={key:2,class:"text-warning-500"},Ze={class:"flex flex-wrap gap-1 mt-1"},et={class:"flex items-center gap-1"},vt=re({__name:"notifications",async setup(tt){let f,x;const u=de(),j=ve(),I=R(()=>j.public.authEnabled),H=["PIWI_SMTP_HOST","PIWI_SMTP_PORT","PIWI_SMTP_USER","PIWI_SMTP_PASS","PIWI_SMTP_FROM","PIWI_SMTP_FROM_NAME","PIWI_SMTP_SECURE"],{data:m}=([f,x]=N(()=>A("/api/settings/smtp","$gVOXSKoU4Q")),f=await f,x(),f),h=k(""),M=k(!1);async function q(){if(h.value){M.value=!0;try{const o=await $fetch("/api/settings/smtp/test",{method:"POST",body:{to:h.value}});o.success?u.add({title:"Test email sent",description:`Check ${h.value}`,color:"success"}):u.add({title:"Send failed",description:o.error||"Unknown error",color:"error"})}catch(o){u.add({title:"Send failed",description:String(o?.message??o),color:"error"})}finally{M.value=!1}}}const{data:J,refresh:O}=I.value?([f,x]=N(()=>A("/api/channels","$fv1jJkJo5B")),f=await f,x(),f):{data:k(null),refresh:()=>{}},$=R(()=>J.value?.channels??[]),b=k(!1),l=ye({name:"",type:"email",address:"",webhookUrl:"",url:"",secret:"",global:!1}),V=k(!1),E=k(null),K=[{label:"Email",value:"email"},{label:"Slack webhook",value:"slack"},{label:"Webhook",value:"webhook"}];async function Q(){V.value=!0;try{const o={};l.type==="email"?o.address=l.address:l.type==="slack"?o.webhookUrl=l.webhookUrl:l.type==="webhook"&&(o.url=l.url,l.secret&&(o.secret=l.secret)),await $fetch("/api/channels",{method:"POST",body:{name:l.name,type:l.type,config:o,global:l.global}}),b.value=!1,Object.assign(l,{name:"",type:"email",address:"",webhookUrl:"",url:"",secret:"",global:!1}),await O(),u.add({title:"Channel created",color:"success"})}catch(o){u.add({title:"Failed to create channel",description:String(o?.message??o),color:"error"})}finally{V.value=!1}}async function X(o){try{await $fetch(`/api/channels/${o}`,{method:"DELETE"}),await O(),u.add({title:"Channel deleted",color:"success"})}catch(e){u.add({title:"Failed to delete channel",description:String(e?.message??e),color:"error"})}}async function Y(o){E.value=o;try{const e=await $fetch(`/api/channels/${o}/test`,{method:"POST"});e.success?u.add({title:"Test notification sent",color:"success"}):u.add({title:"Test failed",description:e.error,color:"error"})}catch(e){u.add({title:"Test failed",description:String(e?.message??e),color:"error"})}finally{E.value=null}}const{data:G,refresh:F}=I.value?([f,x]=N(()=>A("/api/subscriptions","$WhEQp2PfoM")),f=await f,x(),f):{data:k(null),refresh:()=>{}},D=R(()=>G.value?.subscriptions??[]);async function Z(o){try{await $fetch(`/api/subscriptions/${o}`,{method:"DELETE"}),await F(),u.add({title:"Subscription removed",color:"success"})}catch(e){u.add({title:"Failed to remove subscription",description:String(e?.message??e),color:"error"})}}async function ee(o){const e=o.mutedUntil&&new Date(o.mutedUntil)>new Date;try{await $fetch(`/api/subscriptions/${o.id}`,{method:"PATCH",body:{mutedUntil:e?null:new Date(Date.now()+10080*60*1e3).toISOString()}}),await F(),u.add({title:e?"Unmuted":"Muted for 7 days",color:"success"})}catch(U){u.add({title:"Failed to update subscription",description:String(U?.message??U),color:"error"})}}function P(o){return o.mutedUntil&&new Date(o.mutedUntil)>new Date}function B(o){return o==="personal_email"?"i-lucide-user-round":o==="email"?"i-lucide-mail":o==="slack"?"i-lucide-slack":"i-lucide-webhook"}function te(o){return o.replace(/\./g," › ")}return(o,e)=>{const U=ie,C=fe,se=he,oe=ke,S=ue,g=pe,z=xe,w=be,ne=Se,L=_e,le=we,ae=Te;return n(),r("div",Pe,[a(z,{icon:"i-lucide-mail",title:"SMTP email delivery",help:"settings.smtp"},ce({subtitle:d(()=>[e[9]||(e[9]=c(" Configure SMTP via environment variables. The connection cannot be changed here. ",-1))]),actions:d(()=>[s(m)?.configured?(n(),v(U,{key:0,"env-vars":H,size:"md"})):_("",!0)]),default:d(()=>[i("div",Ue,[s(m)?.configured?(n(),r("div",Ce,[a(C,{name:"i-lucide-circle-check-big",class:"size-4"}),e[10]||(e[10]=c(" Configured ",-1))])):(n(),r("div",Ie,[a(C,{name:"i-lucide-circle-alert",class:"size-4"}),e[11]||(e[11]=c(" Not configured ",-1))])),s(m)?.configured?(n(),r("div",Me,[e[12]||(e[12]=i("div",{class:"text-muted"},"Host",-1)),i("div",$e,p(s(m)?.host)+":"+p(s(m)?.port),1),e[13]||(e[13]=i("div",{class:"text-muted"},"From",-1)),i("div",null,p(s(m)?.fromName?`${s(m).fromName} <${s(m).from}>`:s(m)?.from),1),e[14]||(e[14]=i("div",{class:"text-muted"},"User",-1)),i("div",Ve,p(s(m)?.user),1),e[15]||(e[15]=i("div",{class:"text-muted"},"TLS",-1)),i("div",null,p(s(m)?.secure?"Yes (port 465)":"STARTTLS / plain"),1)])):_("",!0),s(m)?.configured?_("",!0):(n(),r("div",Ee,[e[16]||(e[16]=i("p",null,"Set these environment variables to enable email notifications:",-1)),a(se,{code:`PIWI_SMTP_HOST=smtp.example.com
1
+ import{_ as ie}from"./C9YzQCiq.js";import{d as re,b as de,w as N,c as r,j as a,aa as ce,k as s,g as d,F as y,f as v,h as R,r as k,o as n,i,D as ue,l as me,_ as pe,m as c,v as fe,t as p,q as _,y as W,s as _e,p as ge,I as ye,K as ve}from"./DHltYerF.js";import{_ as he}from"./BHpUiv6j.js";import{_ as ke}from"./DHXWp5yD.js";import{_ as xe}from"./CN1mJlvD.js";import{_ as be}from"./DZ3Vfcpz.js";import{_ as Se}from"./B1zMFx24.js";import{_ as we}from"./D6PUPmRC.js";import{_ as Te}from"./B2oUeBbA.js";import{u as A}from"./DXbPFI1d.js";import"./BeKvLsja.js";import"./By4YL7mx.js";import"./r3SBLxtE.js";import"./Dwws9U0D.js";import"./e7zD3uJ0.js";import"./qH_j2A3a.js";const Pe={class:"space-y-6"},Ue={class:"space-y-3"},Ce={key:0,class:"flex items-center gap-2 text-sm text-success-600 dark:text-success-400"},Ie={key:1,class:"flex items-center gap-2 text-sm text-warning-600 dark:text-warning-400"},Me={key:2,class:"grid grid-cols-2 gap-2 text-sm"},$e={class:"font-mono"},Ve={class:"font-mono"},Ee={key:3,class:"text-sm text-muted space-y-1"},De={class:"flex items-center gap-2 w-full"},ze={key:0,class:"mb-4 p-4 rounded-lg border border-primary/30 bg-primary/5 space-y-3"},Ne={class:"grid grid-cols-2 gap-3"},Re={class:"flex justify-end gap-2"},We={key:1,class:"text-sm text-muted py-4 text-center"},Ae={class:"space-y-2"},Oe={class:"flex-1 min-w-0"},Fe={class:"font-medium text-sm flex items-center gap-1.5"},Be={class:"text-xs text-muted"},Le={key:3,class:"ml-1 text-primary text-xs"},je={class:"flex items-center gap-1"},He={key:0,class:"text-sm text-muted py-4 text-center"},qe={class:"space-y-2"},Je={class:"flex-1 min-w-0 space-y-0.5"},Ke={class:"font-medium text-sm"},Qe={class:"text-xs text-muted flex flex-wrap gap-x-3"},Xe={key:0},Ye={key:1},Ge={key:2,class:"text-warning-500"},Ze={class:"flex flex-wrap gap-1 mt-1"},et={class:"flex items-center gap-1"},vt=re({__name:"notifications",async setup(tt){let f,x;const u=de(),j=ve(),I=R(()=>j.public.authEnabled),H=["PIWI_SMTP_HOST","PIWI_SMTP_PORT","PIWI_SMTP_USER","PIWI_SMTP_PASS","PIWI_SMTP_FROM","PIWI_SMTP_FROM_NAME","PIWI_SMTP_SECURE"],{data:m}=([f,x]=N(()=>A("/api/settings/smtp","$gVOXSKoU4Q")),f=await f,x(),f),h=k(""),M=k(!1);async function q(){if(h.value){M.value=!0;try{const o=await $fetch("/api/settings/smtp/test",{method:"POST",body:{to:h.value}});o.success?u.add({title:"Test email sent",description:`Check ${h.value}`,color:"success"}):u.add({title:"Send failed",description:o.error||"Unknown error",color:"error"})}catch(o){u.add({title:"Send failed",description:String(o?.message??o),color:"error"})}finally{M.value=!1}}}const{data:J,refresh:O}=I.value?([f,x]=N(()=>A("/api/channels","$fv1jJkJo5B")),f=await f,x(),f):{data:k(null),refresh:()=>{}},$=R(()=>J.value?.channels??[]),b=k(!1),l=ye({name:"",type:"email",address:"",webhookUrl:"",url:"",secret:"",global:!1}),V=k(!1),E=k(null),K=[{label:"Email",value:"email"},{label:"Slack webhook",value:"slack"},{label:"Webhook",value:"webhook"}];async function Q(){V.value=!0;try{const o={};l.type==="email"?o.address=l.address:l.type==="slack"?o.webhookUrl=l.webhookUrl:l.type==="webhook"&&(o.url=l.url,l.secret&&(o.secret=l.secret)),await $fetch("/api/channels",{method:"POST",body:{name:l.name,type:l.type,config:o,global:l.global}}),b.value=!1,Object.assign(l,{name:"",type:"email",address:"",webhookUrl:"",url:"",secret:"",global:!1}),await O(),u.add({title:"Channel created",color:"success"})}catch(o){u.add({title:"Failed to create channel",description:String(o?.message??o),color:"error"})}finally{V.value=!1}}async function X(o){try{await $fetch(`/api/channels/${o}`,{method:"DELETE"}),await O(),u.add({title:"Channel deleted",color:"success"})}catch(e){u.add({title:"Failed to delete channel",description:String(e?.message??e),color:"error"})}}async function Y(o){E.value=o;try{const e=await $fetch(`/api/channels/${o}/test`,{method:"POST"});e.success?u.add({title:"Test notification sent",color:"success"}):u.add({title:"Test failed",description:e.error,color:"error"})}catch(e){u.add({title:"Test failed",description:String(e?.message??e),color:"error"})}finally{E.value=null}}const{data:G,refresh:F}=I.value?([f,x]=N(()=>A("/api/subscriptions","$WhEQp2PfoM")),f=await f,x(),f):{data:k(null),refresh:()=>{}},D=R(()=>G.value?.subscriptions??[]);async function Z(o){try{await $fetch(`/api/subscriptions/${o}`,{method:"DELETE"}),await F(),u.add({title:"Subscription removed",color:"success"})}catch(e){u.add({title:"Failed to remove subscription",description:String(e?.message??e),color:"error"})}}async function ee(o){const e=o.mutedUntil&&new Date(o.mutedUntil)>new Date;try{await $fetch(`/api/subscriptions/${o.id}`,{method:"PATCH",body:{mutedUntil:e?null:new Date(Date.now()+10080*60*1e3).toISOString()}}),await F(),u.add({title:e?"Unmuted":"Muted for 7 days",color:"success"})}catch(U){u.add({title:"Failed to update subscription",description:String(U?.message??U),color:"error"})}}function P(o){return o.mutedUntil&&new Date(o.mutedUntil)>new Date}function B(o){return o==="personal_email"?"i-lucide-user-round":o==="email"?"i-lucide-mail":o==="slack"?"i-lucide-slack":"i-lucide-webhook"}function te(o){return o.replace(/\./g," › ")}return(o,e)=>{const U=ie,C=fe,se=he,oe=ke,S=ue,g=pe,z=xe,w=be,ne=Se,L=_e,le=we,ae=Te;return n(),r("div",Pe,[a(z,{icon:"i-lucide-mail",title:"SMTP email delivery",help:"settings.smtp"},ce({subtitle:d(()=>[e[9]||(e[9]=c(" Configure SMTP via environment variables. The connection cannot be changed here. ",-1))]),actions:d(()=>[s(m)?.configured?(n(),v(U,{key:0,"env-vars":H,size:"md"})):_("",!0)]),default:d(()=>[i("div",Ue,[s(m)?.configured?(n(),r("div",Ce,[a(C,{name:"i-lucide-circle-check-big",class:"size-4"}),e[10]||(e[10]=c(" Configured ",-1))])):(n(),r("div",Ie,[a(C,{name:"i-lucide-circle-alert",class:"size-4"}),e[11]||(e[11]=c(" Not configured ",-1))])),s(m)?.configured?(n(),r("div",Me,[e[12]||(e[12]=i("div",{class:"text-muted"},"Host",-1)),i("div",$e,p(s(m)?.host)+":"+p(s(m)?.port),1),e[13]||(e[13]=i("div",{class:"text-muted"},"From",-1)),i("div",null,p(s(m)?.fromName?`${s(m).fromName} <${s(m).from}>`:s(m)?.from),1),e[14]||(e[14]=i("div",{class:"text-muted"},"User",-1)),i("div",Ve,p(s(m)?.user),1),e[15]||(e[15]=i("div",{class:"text-muted"},"TLS",-1)),i("div",null,p(s(m)?.secure?"Yes (port 465)":"STARTTLS / plain"),1)])):_("",!0),s(m)?.configured?_("",!0):(n(),r("div",Ee,[e[16]||(e[16]=i("p",null,"Set these environment variables to enable email notifications:",-1)),a(se,{code:`PIWI_SMTP_HOST=smtp.example.com
2
2
  PIWI_SMTP_PORT=465
3
3
  PIWI_SMTP_USER=user@example.com
4
4
  PIWI_SMTP_PASS=secret
@@ -1 +1 @@
1
- import{k as C,B as W,al as N,aA as P,cc as j,h as B}from"./D3SYPlEB.js";function H(l,h,t){const e=new Array(l);return new Proxy(e,{get(s,i,o){if(typeof i=="string"){const n=i.charCodeAt(0);if(n>=48&&n<=57){const r=+i;if(Number.isInteger(r)&&r>=0&&r<l){let a=s[r];if(!a){const d=h[r*2];a=s[r]={index:r,key:t(r),start:d,size:h[r*2+1],end:d+h[r*2+1],lane:0}}return a}}if(i==="length")return l}return Reflect.get(s,i,o)}})}function w(l,h,t){let e=t.initialDeps??[],s,i=!0;function o(){const n=l();return(n.length!==e.length||n.some((a,d)=>e[d]!==a))&&(e=n,s=h(...n),t?.onChange&&!(i&&t.skipInitialOnChange)&&t.onChange(s),i=!1),s}return o.updateDeps=n=>{e=n},o}function L(l,h){if(l===void 0)throw new Error("Unexpected undefined");return l}const J=(l,h)=>Math.abs(l-h)<1.01,U=(l,h,t)=>{let e;return function(...s){l.clearTimeout(e),e=l.setTimeout(()=>h.apply(this,s),t)}};let M;const R=()=>{if(M!==void 0)return M;if(typeof navigator>"u")return M=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return M=!0;const l=navigator.maxTouchPoints;return M=navigator.platform==="MacIntel"&&l!==void 0&&l>0},V=l=>{const{offsetWidth:h,offsetHeight:t}=l;return{width:h,height:t}},q=l=>l,X=l=>{const h=Math.max(l.startIndex-l.overscan,0),e=Math.min(l.endIndex+l.overscan,l.count-1)-h+1,s=new Array(e);for(let i=0;i<e;i++)s[i]=h+i;return s},$=(l,h)=>{const t=l.scrollElement;if(!t)return;const e=l.targetWindow;if(!e)return;const s=o=>{const{width:n,height:r}=o;h({width:Math.round(n),height:Math.round(r)})};if(s(V(t)),!e.ResizeObserver)return()=>{};const i=new e.ResizeObserver(o=>{const n=()=>{const r=o[0];if(r?.borderBoxSize){const a=r.borderBoxSize[0];if(a){s({width:a.inlineSize,height:a.blockSize});return}}s(V(t))};l.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(n):n()});return i.observe(t,{box:"border-box"}),()=>{i.unobserve(t)}},A={passive:!0},G=typeof window>"u"?!0:"onscrollend"in window,Q=(l,h,t)=>{const e=l.scrollElement;if(!e)return;const s=l.targetWindow;if(!s)return;const i=l.options.useScrollendEvent&&G;let o=0;const n=i?null:U(s,()=>h(o,!1),l.options.isScrollingResetDelay),r=m=>()=>{o=t(e),n?.(),h(o,m)},a=r(!0),d=r(!1);return e.addEventListener("scroll",a,A),i&&e.addEventListener("scrollend",d,A),()=>{e.removeEventListener("scroll",a),i&&e.removeEventListener("scrollend",d)}},Y=(l,h)=>Q(l,h,t=>{const{horizontal:e,isRtl:s}=l.options;return e?t.scrollLeft*(s&&-1||1):t.scrollTop}),Z=(l,h,t)=>{if(t.options.useCachedMeasurements){const e=t.indexFromElement(l),s=t.options.getItemKey(e);return t.itemSizeCache.get(s)??t.options.estimateSize(e)}if(h?.borderBoxSize){const e=h.borderBoxSize[0];if(e)return Math.round(e[t.options.horizontal?"inlineSize":"blockSize"])}if(!h){const e=t.indexFromElement(l),s=t.options.getItemKey(e),i=t.itemSizeCache.get(s);if(i!==void 0)return i}return l[t.options.horizontal?"offsetWidth":"offsetHeight"]},tt=(l,{adjustments:h=0,behavior:t},e)=>{var s,i;(i=(s=e.scrollElement)==null?void 0:s.scrollTo)==null||i.call(s,{[e.options.horizontal?"left":"top"]:l+h,behavior:t})},et=tt;class st{constructor(h){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var t,e,s;return((s=(e=(t=this.targetWindow)==null?void 0:t.performance)==null?void 0:e.now)==null?void 0:s.call(e))??Date.now()},this.observer=(()=>{let t=null;const e=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(s=>{s.forEach(i=>{const o=()=>{const n=i.target,r=this.indexFromElement(n);if(!n.isConnected){this.observer.unobserve(n);for(const[a,d]of this.elementsCache)if(d===n){this.elementsCache.delete(a);break}return}this.shouldMeasureDuringScroll(r)&&this.resizeItem(r,this.options.measureElement(n,i,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()})}));return{disconnect:()=>{var s;(s=e())==null||s.disconnect(),t=null},observe:s=>{var i;return(i=e())==null?void 0:i.observe(s,{box:"border-box"})},unobserve:s=>{var i;return(i=e())==null?void 0:i.unobserve(s)}}})(),this.range=null,this.setOptions=t=>{var e,s;const i={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:q,rangeExtractor:X,onChange:()=>{},measureElement:Z,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const u in t){const g=t[u];g!==void 0&&(i[u]=g)}const o=this.options;let n=null,r=null,a=!1;if(o!==void 0&&o.enabled&&i.enabled&&i.anchorTo==="end"&&this.scrollElement!==null){const u=o.count,g=i.count,S=this.getMeasurements(),E=u>0?((e=S[0])==null?void 0:e.key)??o.getItemKey(0):null,O=u>0?((s=S[u-1])==null?void 0:s.key)??o.getItemKey(u-1):null;if(g!==u||u>0&&g>0&&(i.getItemKey(0)!==E||i.getItemKey(g-1)!==O)){a=!0;const b=u>0?this.getVirtualItemForOffset(this.getScrollOffset())??S[0]:null;b&&(n=[b.key,this.getScrollOffset()-b.start]);const v=i.followOnAppend===!0?"auto":i.followOnAppend||null;v&&g>u&&this.isAtEnd(o.scrollEndThreshold)&&(u===0||i.getItemKey(g-1)!==O)&&(r=v)}}this.options=i,a&&(this.pendingMin=0,this.itemSizeCacheVersion++);let d=!1,m=0;if(n&&this.scrollOffset!==null){const[u,g]=n,S=this.getMeasurements(),{count:E,getItemKey:O}=this.options;let c=0;for(;c<E&&O(c)!==u;)c++;if(c<E){const f=S[c];if(f){const b=f.start+g;b!==this.scrollOffset&&(m=b-this.scrollOffset,this.scrollOffset=b,d=!0)}}}(d||r)&&(this.pendingScrollAnchor=[d?n[0]:null,d?n[1]:0,r,m])},this.notify=t=>{var e,s;(s=(e=this.options).onChange)==null||s.call(e,this,t)},this.maybeNotify=w(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}if(this.scrollElement=e,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,o)=>{if(o&&this._intendedScrollOffset===null&&i===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(i-this._intendedScrollOffset)<1.5&&(i=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;const n=this.getScrollOffset();this.scrollDirection=o?n===i?this.scrollDirection:n<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=o,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const i=this.scrollElement,o=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},n=()=>{this._iosTouching=!1,!(!R()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};i.addEventListener("touchstart",o,A),i.addEventListener("touchend",n,A),this.unsubs.push(()=>{i.removeEventListener("touchstart",o),i.removeEventListener("touchend",n),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const s=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,s&&this.scrollElement&&this.options.enabled){const[i,o,n,r]=s;i!==null&&!n&&(R()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?r!==0&&(this._iosDeferredAdjustment+=r):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),n&&this.scrollToEnd({behavior:n})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const t=this.getScrollOffset(),e=this.getMaxScrollOffset();if(t<0||t>e)return;const s=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(t,{adjustments:this.scrollAdjustments+=s,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=w(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(t,e,s,i,o,n,r,a)=>(this.prevLanes!==void 0&&this.prevLanes!==n&&(this.lanesChangedFlag=!0),this.prevLanes=n,this.pendingMin=null,{count:t,paddingStart:e,scrollMargin:s,getItemKey:i,enabled:o,lanes:n,laneAssignmentMode:r,gap:a}),{key:!1}),this.getMeasurements=w(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:t,paddingStart:e,scrollMargin:s,getItemKey:i,enabled:o,lanes:n,laneAssignmentMode:r,gap:a},d)=>{const m=this.itemSizeCache;if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const c of this.laneAssignments.keys())c>=t&&this.laneAssignments.delete(c);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const u=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===t&&(this.lanesSettling=!1),n===1){const c=t*2;let f=this._flatMeasurements;if(!f||f.length<c){const p=new Float64Array(c);f&&u>0&&p.set(f.subarray(0,u*2)),f=p,this._flatMeasurements=f}let b;if(u===0)b=e+s;else{const p=u-1;b=f[p*2]+f[p*2+1]+a}for(let p=u;p<t;p++){const T=i(p),x=m.get(T),z=typeof x=="number"?x:this.options.estimateSize(p);f[p*2]=b,f[p*2+1]=z,b+=z+a}const v=H(t,f,i);return this.measurementsCache=v,v}const g=this.measurementsCache.slice(0,u),S=new Array(n).fill(void 0),E=new Float64Array(n);let O=0;for(let c=0;c<u;c++){const f=g[c];f&&(S[f.lane]===void 0&&O++,S[f.lane]=c,E[f.lane]=f.end)}for(let c=u;c<t;c++){const f=i(c),b=this.laneAssignments.get(c);let v,p;const T=r==="estimate"||m.has(f);if(b!==void 0&&this.options.lanes>1){v=b;const y=S[v],I=y!==void 0?g[y]:void 0;p=I?I.end+a:e+s}else if(O===n){let y=0,I=E[0],D=S[0];for(let _=1;_<n;_++){const F=E[_];(F<I||F===I&&S[_]<D)&&(y=_,I=F,D=S[_])}v=y,p=I+a,T&&this.laneAssignments.set(c,v)}else v=c%this.options.lanes,p=e+s,T&&this.laneAssignments.set(c,v);const x=m.get(f),z=typeof x=="number"?x:this.options.estimateSize(c),k=p+z;g[c]={index:c,start:p,size:z,end:k,key:f,lane:v},S[v]===void 0&&O++,S[v]=c,E[v]=k}return this.measurementsCache=g,g},{key:!1,debug:()=>this.options.debug}),this.calculateRange=w(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,e,s,i)=>t.length===0||e===0?(this.range=null,null):(this.range=nt(t,e,s,i,i===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=w(()=>{let t=null,e=null;const s=this.calculateRange();return s&&(t=s.startIndex,e=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,t,e]),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,e]},(t,e,s,i,o)=>i===null||o===null?[]:t({startIndex:i,endIndex:o,overscan:e,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const e=this.options.indexAttribute,s=t.getAttribute(e);return s?parseInt(s,10):(console.warn(`Missing attribute name '${e}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=t=>{var e;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const s=this.scrollState.index??((e=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:e.index);if(s!==void 0&&this.range){const i=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),o=Math.max(0,s-i),n=Math.min(this.options.count-1,s+i);return t>=o&&t<=n}return!0},this.measureElement=t=>{if(!t){this.elementsCache.forEach((o,n)=>{o.isConnected||(this.observer.unobserve(o),this.elementsCache.delete(n))});return}const e=this.indexFromElement(t),s=this.options.getItemKey(e),i=this.elementsCache.get(s);i!==t&&(i&&this.observer.unobserve(i),this.observer.observe(t),this.elementsCache.set(s,t)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(e)&&this.resizeItem(e,this.options.measureElement(t,void 0,this))},this.resizeItem=(t,e)=>{var s,i;if(t<0||t>=this.options.count)return;let o,n,r;const a=this._flatMeasurements;if(this.options.lanes===1&&a!==null)r=this.options.getItemKey(t),n=a[t*2],o=a[t*2+1];else{const u=this.measurementsCache[t];if(!u)return;r=u.key,n=u.start,o=u.size}const d=this.itemSizeCache.get(r)??o,m=e-d;if(m!==0){const u=this.options.anchorTo==="end"&&((s=this.scrollState)==null?void 0:s.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,g=u?this.getTotalSize():0,S=((i=this.scrollState)==null?void 0:i.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[t]??{index:t,key:r,start:n,size:o,end:n+o,lane:0},m,this):n<this.getScrollOffset()+this.scrollAdjustments&&(!this.itemSizeCache.has(r)||this.scrollDirection!=="backward"));(this.pendingMin===null||t<this.pendingMin)&&(this.pendingMin=t),this.itemSizeCache.set(r,e),this.itemSizeCacheVersion++,u?this.applyScrollAdjustment(this.getTotalSize()-g):S&&this.applyScrollAdjustment(m),this.notify(!1)}},this.getVirtualItems=w(()=>[this.getVirtualIndexes(),this.getMeasurements()],(t,e)=>{const s=[];for(let i=0,o=t.length;i<o;i++){const n=t[i],r=e[n];s.push(r)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const e=this.getMeasurements();if(e.length===0)return;const s=this._flatMeasurements,i=this.options.lanes===1&&s!=null,o=K(0,e.length-1,i?n=>s[n*2]:n=>L(e[n]).start,t);return L(e[o])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const t=this.scrollElement.document.documentElement;return this.options.horizontal?t.scrollWidth-this.scrollElement.innerWidth:t.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(t=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=t,this.getOffsetForAlignment=(t,e,s=0)=>{if(!this.scrollElement)return 0;const i=this.getSize(),o=this.getScrollOffset();e==="auto"&&(e=t>=o+i?"end":"start"),e==="center"?t+=(s-i)/2:e==="end"&&(t-=i);const n=this.getMaxScrollOffset();return Math.max(Math.min(n,t),0)},this.getOffsetForIndex=(t,e="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const s=this.getSize(),i=this.getScrollOffset(),o=this.measurementsCache[t];if(!o)return;if(e==="auto")if(o.end>=i+s-this.options.scrollPaddingEnd)e="end";else if(o.start<=i+this.options.scrollPaddingStart)e="start";else return[i,e];if(e==="end"&&t===this.options.count-1)return[this.getMaxScrollOffset(),e];const n=e==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(n,e,o.size),e]},this.scrollToOffset=(t,{align:e="start",behavior:s="auto"}={})=>{const i=this.getOffsetForAlignment(t,e),o=this.now();this.scrollState={index:null,align:e,behavior:s,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToIndex=(t,{align:e="auto",behavior:s="auto"}={})=>{t=Math.max(0,Math.min(t,this.options.count-1));const i=this.getOffsetForIndex(t,e);if(!i)return;const[o,n]=i,r=this.now();this.scrollState={index:t,align:n,behavior:s,startedAt:r,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollBy=(t,{behavior:e="auto"}={})=>{const s=this.getScrollOffset()+t,i=this.now();this.scrollState={index:null,align:"start",behavior:e,startedAt:i,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:e}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:t="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:t});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:t})},this.getTotalSize=()=>{var t;const e=this.getMeasurements();let s;if(e.length===0)s=this.options.paddingStart;else if(this.options.lanes===1){const i=e.length-1,o=this._flatMeasurements;o!=null?s=o[i*2]+o[i*2+1]:s=((t=e[i])==null?void 0:t.end)??0}else{const i=Array(this.options.lanes).fill(null);let o=e.length-1;for(;o>=0&&i.some(n=>n===null);){const n=e[o];i[n.lane]===null&&(i[n.lane]=n.end),o--}s=Math.max(...i.filter(n=>n!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const t=[];if(this.itemSizeCache.size===0)return t;const e=this.getMeasurements();for(const s of e)s&&this.itemSizeCache.has(s.key)&&t.push({index:s.index,key:s.key,start:s.start,size:s.size,end:s.end,lane:s.lane});return t},this._scrollToOffset=(t,{adjustments:e,behavior:s})=>{this._intendedScrollOffset=t+(e??0),this.options.scrollToFn(t,{behavior:s,adjustments:e},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(h)}applyScrollAdjustment(h,t){h!==0&&(R()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?this._iosDeferredAdjustment+=h:(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=h,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollAdjustments=0)))}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const e=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,s=e?e[0]:this.scrollState.lastTargetOffset,i=1,o=s!==this.scrollState.lastTargetOffset;if(!o&&J(s,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=i){this.getScrollOffset()!==s&&this._scrollToOffset(s,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,o){const n=this.getSize()||600,r=Math.abs(s-this.getScrollOffset()),a=this.scrollState.behavior==="smooth"&&r>n;this.scrollState.lastTargetOffset=s,a||(this.scrollState.behavior="auto"),this._scrollToOffset(s,{adjustments:void 0,behavior:a?"smooth":"auto"})}this.scheduleScrollReconcile()}}const K=(l,h,t,e)=>{for(;l<=h;){const s=(l+h)/2|0,i=t(s);if(i<e)l=s+1;else if(i>e)h=s-1;else return s}return l>0?l-1:0};function it(l,h,t){let e=0;for(;e<=h;){const s=(e+h)/2|0,i=l[s*2];if(i<t)e=s+1;else if(i>t)h=s-1;else return s}return e>0?e-1:0}function nt(l,h,t,e,s){const i=l.length-1;if(l.length<=e)return{startIndex:0,endIndex:i};if(e===1&&s!==null){const a=it(s,i,t);let d=a;const m=t+h;for(;d<i&&s[d*2]+s[d*2+1]<m;)d++;return{startIndex:a,endIndex:d}}let n=K(0,i,a=>l[a].start,t),r=n;if(e===1)for(;r<i&&l[r].end<t+h;)r++;else if(e>1){const a=Array(e).fill(0);for(;r<i&&a.some(m=>m<t+h);){const m=l[r];a[m.lane]=m.end,r++}const d=Array(e).fill(t+h);for(;n>=0&&d.some(m=>m>=t);){const m=l[n];d[m.lane]=m.start,n--}n=Math.max(0,n-n%e),r=Math.min(i,r+(e-1-r%e))}return{startIndex:n,endIndex:r}}function ot(l){const h=new st(C(l)),t=P(h),e=h._didMount();return W(()=>C(l).getScrollElement(),s=>{s&&h._willUpdate()},{immediate:!0}),W(()=>C(l),s=>{h.setOptions({...s,onChange:(i,o)=>{var n;j(t),(n=s.onChange)==null||n.call(s,i,o)}}),h._willUpdate(),j(t)},{immediate:!0}),N(e),t}function rt(l){return ot(B(()=>({observeElementRect:$,observeElementOffset:Y,scrollToFn:et,...C(l)})))}export{rt as u};
1
+ import{k as C,B as W,al as N,aA as P,cc as j,h as B}from"./DHltYerF.js";function H(l,h,t){const e=new Array(l);return new Proxy(e,{get(s,i,o){if(typeof i=="string"){const n=i.charCodeAt(0);if(n>=48&&n<=57){const r=+i;if(Number.isInteger(r)&&r>=0&&r<l){let a=s[r];if(!a){const d=h[r*2];a=s[r]={index:r,key:t(r),start:d,size:h[r*2+1],end:d+h[r*2+1],lane:0}}return a}}if(i==="length")return l}return Reflect.get(s,i,o)}})}function w(l,h,t){let e=t.initialDeps??[],s,i=!0;function o(){const n=l();return(n.length!==e.length||n.some((a,d)=>e[d]!==a))&&(e=n,s=h(...n),t?.onChange&&!(i&&t.skipInitialOnChange)&&t.onChange(s),i=!1),s}return o.updateDeps=n=>{e=n},o}function L(l,h){if(l===void 0)throw new Error("Unexpected undefined");return l}const J=(l,h)=>Math.abs(l-h)<1.01,U=(l,h,t)=>{let e;return function(...s){l.clearTimeout(e),e=l.setTimeout(()=>h.apply(this,s),t)}};let M;const R=()=>{if(M!==void 0)return M;if(typeof navigator>"u")return M=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return M=!0;const l=navigator.maxTouchPoints;return M=navigator.platform==="MacIntel"&&l!==void 0&&l>0},V=l=>{const{offsetWidth:h,offsetHeight:t}=l;return{width:h,height:t}},q=l=>l,X=l=>{const h=Math.max(l.startIndex-l.overscan,0),e=Math.min(l.endIndex+l.overscan,l.count-1)-h+1,s=new Array(e);for(let i=0;i<e;i++)s[i]=h+i;return s},$=(l,h)=>{const t=l.scrollElement;if(!t)return;const e=l.targetWindow;if(!e)return;const s=o=>{const{width:n,height:r}=o;h({width:Math.round(n),height:Math.round(r)})};if(s(V(t)),!e.ResizeObserver)return()=>{};const i=new e.ResizeObserver(o=>{const n=()=>{const r=o[0];if(r?.borderBoxSize){const a=r.borderBoxSize[0];if(a){s({width:a.inlineSize,height:a.blockSize});return}}s(V(t))};l.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(n):n()});return i.observe(t,{box:"border-box"}),()=>{i.unobserve(t)}},A={passive:!0},G=typeof window>"u"?!0:"onscrollend"in window,Q=(l,h,t)=>{const e=l.scrollElement;if(!e)return;const s=l.targetWindow;if(!s)return;const i=l.options.useScrollendEvent&&G;let o=0;const n=i?null:U(s,()=>h(o,!1),l.options.isScrollingResetDelay),r=m=>()=>{o=t(e),n?.(),h(o,m)},a=r(!0),d=r(!1);return e.addEventListener("scroll",a,A),i&&e.addEventListener("scrollend",d,A),()=>{e.removeEventListener("scroll",a),i&&e.removeEventListener("scrollend",d)}},Y=(l,h)=>Q(l,h,t=>{const{horizontal:e,isRtl:s}=l.options;return e?t.scrollLeft*(s&&-1||1):t.scrollTop}),Z=(l,h,t)=>{if(t.options.useCachedMeasurements){const e=t.indexFromElement(l),s=t.options.getItemKey(e);return t.itemSizeCache.get(s)??t.options.estimateSize(e)}if(h?.borderBoxSize){const e=h.borderBoxSize[0];if(e)return Math.round(e[t.options.horizontal?"inlineSize":"blockSize"])}if(!h){const e=t.indexFromElement(l),s=t.options.getItemKey(e),i=t.itemSizeCache.get(s);if(i!==void 0)return i}return l[t.options.horizontal?"offsetWidth":"offsetHeight"]},tt=(l,{adjustments:h=0,behavior:t},e)=>{var s,i;(i=(s=e.scrollElement)==null?void 0:s.scrollTo)==null||i.call(s,{[e.options.horizontal?"left":"top"]:l+h,behavior:t})},et=tt;class st{constructor(h){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var t,e,s;return((s=(e=(t=this.targetWindow)==null?void 0:t.performance)==null?void 0:e.now)==null?void 0:s.call(e))??Date.now()},this.observer=(()=>{let t=null;const e=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(s=>{s.forEach(i=>{const o=()=>{const n=i.target,r=this.indexFromElement(n);if(!n.isConnected){this.observer.unobserve(n);for(const[a,d]of this.elementsCache)if(d===n){this.elementsCache.delete(a);break}return}this.shouldMeasureDuringScroll(r)&&this.resizeItem(r,this.options.measureElement(n,i,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()})}));return{disconnect:()=>{var s;(s=e())==null||s.disconnect(),t=null},observe:s=>{var i;return(i=e())==null?void 0:i.observe(s,{box:"border-box"})},unobserve:s=>{var i;return(i=e())==null?void 0:i.unobserve(s)}}})(),this.range=null,this.setOptions=t=>{var e,s;const i={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:q,rangeExtractor:X,onChange:()=>{},measureElement:Z,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const u in t){const g=t[u];g!==void 0&&(i[u]=g)}const o=this.options;let n=null,r=null,a=!1;if(o!==void 0&&o.enabled&&i.enabled&&i.anchorTo==="end"&&this.scrollElement!==null){const u=o.count,g=i.count,S=this.getMeasurements(),E=u>0?((e=S[0])==null?void 0:e.key)??o.getItemKey(0):null,O=u>0?((s=S[u-1])==null?void 0:s.key)??o.getItemKey(u-1):null;if(g!==u||u>0&&g>0&&(i.getItemKey(0)!==E||i.getItemKey(g-1)!==O)){a=!0;const b=u>0?this.getVirtualItemForOffset(this.getScrollOffset())??S[0]:null;b&&(n=[b.key,this.getScrollOffset()-b.start]);const v=i.followOnAppend===!0?"auto":i.followOnAppend||null;v&&g>u&&this.isAtEnd(o.scrollEndThreshold)&&(u===0||i.getItemKey(g-1)!==O)&&(r=v)}}this.options=i,a&&(this.pendingMin=0,this.itemSizeCacheVersion++);let d=!1,m=0;if(n&&this.scrollOffset!==null){const[u,g]=n,S=this.getMeasurements(),{count:E,getItemKey:O}=this.options;let c=0;for(;c<E&&O(c)!==u;)c++;if(c<E){const f=S[c];if(f){const b=f.start+g;b!==this.scrollOffset&&(m=b-this.scrollOffset,this.scrollOffset=b,d=!0)}}}(d||r)&&(this.pendingScrollAnchor=[d?n[0]:null,d?n[1]:0,r,m])},this.notify=t=>{var e,s;(s=(e=this.options).onChange)==null||s.call(e,this,t)},this.maybeNotify=w(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}if(this.scrollElement=e,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,o)=>{if(o&&this._intendedScrollOffset===null&&i===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(i-this._intendedScrollOffset)<1.5&&(i=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;const n=this.getScrollOffset();this.scrollDirection=o?n===i?this.scrollDirection:n<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=o,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const i=this.scrollElement,o=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},n=()=>{this._iosTouching=!1,!(!R()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};i.addEventListener("touchstart",o,A),i.addEventListener("touchend",n,A),this.unsubs.push(()=>{i.removeEventListener("touchstart",o),i.removeEventListener("touchend",n),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const s=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,s&&this.scrollElement&&this.options.enabled){const[i,o,n,r]=s;i!==null&&!n&&(R()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?r!==0&&(this._iosDeferredAdjustment+=r):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),n&&this.scrollToEnd({behavior:n})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const t=this.getScrollOffset(),e=this.getMaxScrollOffset();if(t<0||t>e)return;const s=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(t,{adjustments:this.scrollAdjustments+=s,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=w(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(t,e,s,i,o,n,r,a)=>(this.prevLanes!==void 0&&this.prevLanes!==n&&(this.lanesChangedFlag=!0),this.prevLanes=n,this.pendingMin=null,{count:t,paddingStart:e,scrollMargin:s,getItemKey:i,enabled:o,lanes:n,laneAssignmentMode:r,gap:a}),{key:!1}),this.getMeasurements=w(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:t,paddingStart:e,scrollMargin:s,getItemKey:i,enabled:o,lanes:n,laneAssignmentMode:r,gap:a},d)=>{const m=this.itemSizeCache;if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const c of this.laneAssignments.keys())c>=t&&this.laneAssignments.delete(c);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const u=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===t&&(this.lanesSettling=!1),n===1){const c=t*2;let f=this._flatMeasurements;if(!f||f.length<c){const p=new Float64Array(c);f&&u>0&&p.set(f.subarray(0,u*2)),f=p,this._flatMeasurements=f}let b;if(u===0)b=e+s;else{const p=u-1;b=f[p*2]+f[p*2+1]+a}for(let p=u;p<t;p++){const T=i(p),x=m.get(T),z=typeof x=="number"?x:this.options.estimateSize(p);f[p*2]=b,f[p*2+1]=z,b+=z+a}const v=H(t,f,i);return this.measurementsCache=v,v}const g=this.measurementsCache.slice(0,u),S=new Array(n).fill(void 0),E=new Float64Array(n);let O=0;for(let c=0;c<u;c++){const f=g[c];f&&(S[f.lane]===void 0&&O++,S[f.lane]=c,E[f.lane]=f.end)}for(let c=u;c<t;c++){const f=i(c),b=this.laneAssignments.get(c);let v,p;const T=r==="estimate"||m.has(f);if(b!==void 0&&this.options.lanes>1){v=b;const y=S[v],I=y!==void 0?g[y]:void 0;p=I?I.end+a:e+s}else if(O===n){let y=0,I=E[0],D=S[0];for(let _=1;_<n;_++){const F=E[_];(F<I||F===I&&S[_]<D)&&(y=_,I=F,D=S[_])}v=y,p=I+a,T&&this.laneAssignments.set(c,v)}else v=c%this.options.lanes,p=e+s,T&&this.laneAssignments.set(c,v);const x=m.get(f),z=typeof x=="number"?x:this.options.estimateSize(c),k=p+z;g[c]={index:c,start:p,size:z,end:k,key:f,lane:v},S[v]===void 0&&O++,S[v]=c,E[v]=k}return this.measurementsCache=g,g},{key:!1,debug:()=>this.options.debug}),this.calculateRange=w(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,e,s,i)=>t.length===0||e===0?(this.range=null,null):(this.range=nt(t,e,s,i,i===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=w(()=>{let t=null,e=null;const s=this.calculateRange();return s&&(t=s.startIndex,e=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,t,e]),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,e]},(t,e,s,i,o)=>i===null||o===null?[]:t({startIndex:i,endIndex:o,overscan:e,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const e=this.options.indexAttribute,s=t.getAttribute(e);return s?parseInt(s,10):(console.warn(`Missing attribute name '${e}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=t=>{var e;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const s=this.scrollState.index??((e=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:e.index);if(s!==void 0&&this.range){const i=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),o=Math.max(0,s-i),n=Math.min(this.options.count-1,s+i);return t>=o&&t<=n}return!0},this.measureElement=t=>{if(!t){this.elementsCache.forEach((o,n)=>{o.isConnected||(this.observer.unobserve(o),this.elementsCache.delete(n))});return}const e=this.indexFromElement(t),s=this.options.getItemKey(e),i=this.elementsCache.get(s);i!==t&&(i&&this.observer.unobserve(i),this.observer.observe(t),this.elementsCache.set(s,t)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(e)&&this.resizeItem(e,this.options.measureElement(t,void 0,this))},this.resizeItem=(t,e)=>{var s,i;if(t<0||t>=this.options.count)return;let o,n,r;const a=this._flatMeasurements;if(this.options.lanes===1&&a!==null)r=this.options.getItemKey(t),n=a[t*2],o=a[t*2+1];else{const u=this.measurementsCache[t];if(!u)return;r=u.key,n=u.start,o=u.size}const d=this.itemSizeCache.get(r)??o,m=e-d;if(m!==0){const u=this.options.anchorTo==="end"&&((s=this.scrollState)==null?void 0:s.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,g=u?this.getTotalSize():0,S=((i=this.scrollState)==null?void 0:i.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[t]??{index:t,key:r,start:n,size:o,end:n+o,lane:0},m,this):n<this.getScrollOffset()+this.scrollAdjustments&&(!this.itemSizeCache.has(r)||this.scrollDirection!=="backward"));(this.pendingMin===null||t<this.pendingMin)&&(this.pendingMin=t),this.itemSizeCache.set(r,e),this.itemSizeCacheVersion++,u?this.applyScrollAdjustment(this.getTotalSize()-g):S&&this.applyScrollAdjustment(m),this.notify(!1)}},this.getVirtualItems=w(()=>[this.getVirtualIndexes(),this.getMeasurements()],(t,e)=>{const s=[];for(let i=0,o=t.length;i<o;i++){const n=t[i],r=e[n];s.push(r)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const e=this.getMeasurements();if(e.length===0)return;const s=this._flatMeasurements,i=this.options.lanes===1&&s!=null,o=K(0,e.length-1,i?n=>s[n*2]:n=>L(e[n]).start,t);return L(e[o])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const t=this.scrollElement.document.documentElement;return this.options.horizontal?t.scrollWidth-this.scrollElement.innerWidth:t.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(t=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=t,this.getOffsetForAlignment=(t,e,s=0)=>{if(!this.scrollElement)return 0;const i=this.getSize(),o=this.getScrollOffset();e==="auto"&&(e=t>=o+i?"end":"start"),e==="center"?t+=(s-i)/2:e==="end"&&(t-=i);const n=this.getMaxScrollOffset();return Math.max(Math.min(n,t),0)},this.getOffsetForIndex=(t,e="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const s=this.getSize(),i=this.getScrollOffset(),o=this.measurementsCache[t];if(!o)return;if(e==="auto")if(o.end>=i+s-this.options.scrollPaddingEnd)e="end";else if(o.start<=i+this.options.scrollPaddingStart)e="start";else return[i,e];if(e==="end"&&t===this.options.count-1)return[this.getMaxScrollOffset(),e];const n=e==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(n,e,o.size),e]},this.scrollToOffset=(t,{align:e="start",behavior:s="auto"}={})=>{const i=this.getOffsetForAlignment(t,e),o=this.now();this.scrollState={index:null,align:e,behavior:s,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToIndex=(t,{align:e="auto",behavior:s="auto"}={})=>{t=Math.max(0,Math.min(t,this.options.count-1));const i=this.getOffsetForIndex(t,e);if(!i)return;const[o,n]=i,r=this.now();this.scrollState={index:t,align:n,behavior:s,startedAt:r,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollBy=(t,{behavior:e="auto"}={})=>{const s=this.getScrollOffset()+t,i=this.now();this.scrollState={index:null,align:"start",behavior:e,startedAt:i,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:e}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:t="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:t});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:t})},this.getTotalSize=()=>{var t;const e=this.getMeasurements();let s;if(e.length===0)s=this.options.paddingStart;else if(this.options.lanes===1){const i=e.length-1,o=this._flatMeasurements;o!=null?s=o[i*2]+o[i*2+1]:s=((t=e[i])==null?void 0:t.end)??0}else{const i=Array(this.options.lanes).fill(null);let o=e.length-1;for(;o>=0&&i.some(n=>n===null);){const n=e[o];i[n.lane]===null&&(i[n.lane]=n.end),o--}s=Math.max(...i.filter(n=>n!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const t=[];if(this.itemSizeCache.size===0)return t;const e=this.getMeasurements();for(const s of e)s&&this.itemSizeCache.has(s.key)&&t.push({index:s.index,key:s.key,start:s.start,size:s.size,end:s.end,lane:s.lane});return t},this._scrollToOffset=(t,{adjustments:e,behavior:s})=>{this._intendedScrollOffset=t+(e??0),this.options.scrollToFn(t,{behavior:s,adjustments:e},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(h)}applyScrollAdjustment(h,t){h!==0&&(R()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?this._iosDeferredAdjustment+=h:(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=h,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollAdjustments=0)))}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const e=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,s=e?e[0]:this.scrollState.lastTargetOffset,i=1,o=s!==this.scrollState.lastTargetOffset;if(!o&&J(s,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=i){this.getScrollOffset()!==s&&this._scrollToOffset(s,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,o){const n=this.getSize()||600,r=Math.abs(s-this.getScrollOffset()),a=this.scrollState.behavior==="smooth"&&r>n;this.scrollState.lastTargetOffset=s,a||(this.scrollState.behavior="auto"),this._scrollToOffset(s,{adjustments:void 0,behavior:a?"smooth":"auto"})}this.scheduleScrollReconcile()}}const K=(l,h,t,e)=>{for(;l<=h;){const s=(l+h)/2|0,i=t(s);if(i<e)l=s+1;else if(i>e)h=s-1;else return s}return l>0?l-1:0};function it(l,h,t){let e=0;for(;e<=h;){const s=(e+h)/2|0,i=l[s*2];if(i<t)e=s+1;else if(i>t)h=s-1;else return s}return e>0?e-1:0}function nt(l,h,t,e,s){const i=l.length-1;if(l.length<=e)return{startIndex:0,endIndex:i};if(e===1&&s!==null){const a=it(s,i,t);let d=a;const m=t+h;for(;d<i&&s[d*2]+s[d*2+1]<m;)d++;return{startIndex:a,endIndex:d}}let n=K(0,i,a=>l[a].start,t),r=n;if(e===1)for(;r<i&&l[r].end<t+h;)r++;else if(e>1){const a=Array(e).fill(0);for(;r<i&&a.some(m=>m<t+h);){const m=l[r];a[m.lane]=m.end,r++}const d=Array(e).fill(t+h);for(;n>=0&&d.some(m=>m>=t);){const m=l[n];d[m.lane]=m.start,n--}n=Math.max(0,n-n%e),r=Math.min(i,r+(e-1-r%e))}return{startIndex:n,endIndex:r}}function ot(l){const h=new st(C(l)),t=P(h),e=h._didMount();return W(()=>C(l).getScrollElement(),s=>{s&&h._willUpdate()},{immediate:!0}),W(()=>C(l),s=>{h.setOptions({...s,onChange:(i,o)=>{var n;j(t),(n=s.onChange)==null||n.call(s,i,o)}}),h._willUpdate(),j(t)},{immediate:!0}),N(e),t}function rt(l){return ot(B(()=>({observeElementRect:$,observeElementOffset:Y,scrollToFn:et,...C(l)})))}export{rt as u};