v-float 0.7.2 → 0.9.0

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 (61) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +346 -327
  3. package/dist/composables/index.d.ts +1 -3
  4. package/dist/composables/index.d.ts.map +1 -1
  5. package/dist/composables/interactions/index.d.ts +2 -2
  6. package/dist/composables/interactions/index.d.ts.map +1 -1
  7. package/dist/composables/interactions/navigation-strategies.d.ts +36 -0
  8. package/dist/composables/interactions/navigation-strategies.d.ts.map +1 -0
  9. package/dist/composables/interactions/polygon.d.ts +2 -2
  10. package/dist/composables/interactions/polygon.d.ts.map +1 -1
  11. package/dist/composables/interactions/use-click.d.ts +2 -2
  12. package/dist/composables/interactions/use-click.d.ts.map +1 -1
  13. package/dist/composables/interactions/use-escape-key.d.ts +2 -2
  14. package/dist/composables/interactions/use-escape-key.d.ts.map +1 -1
  15. package/dist/composables/interactions/use-focus-trap.d.ts +41 -0
  16. package/dist/composables/interactions/use-focus-trap.d.ts.map +1 -0
  17. package/dist/composables/interactions/use-focus.d.ts +30 -25
  18. package/dist/composables/interactions/use-focus.d.ts.map +1 -1
  19. package/dist/composables/interactions/use-hover.d.ts +2 -2
  20. package/dist/composables/interactions/use-hover.d.ts.map +1 -1
  21. package/dist/composables/interactions/use-list-navigation.d.ts +109 -0
  22. package/dist/composables/interactions/use-list-navigation.d.ts.map +1 -0
  23. package/dist/composables/middlewares/arrow.d.ts +1 -2
  24. package/dist/composables/middlewares/arrow.d.ts.map +1 -1
  25. package/dist/composables/middlewares/index.d.ts +2 -1
  26. package/dist/composables/middlewares/index.d.ts.map +1 -1
  27. package/dist/composables/positioning/index.d.ts +5 -0
  28. package/dist/composables/positioning/index.d.ts.map +1 -0
  29. package/dist/composables/positioning/use-arrow.d.ts.map +1 -0
  30. package/dist/composables/{interactions → positioning}/use-client-point.d.ts +2 -2
  31. package/dist/composables/positioning/use-client-point.d.ts.map +1 -0
  32. package/dist/composables/{use-floating-tree.d.ts → positioning/use-floating-tree.d.ts} +134 -11
  33. package/dist/composables/positioning/use-floating-tree.d.ts.map +1 -0
  34. package/dist/composables/{use-floating.d.ts → positioning/use-floating.d.ts} +21 -6
  35. package/dist/composables/positioning/use-floating.d.ts.map +1 -0
  36. package/dist/composables/utils/is-using-keyboard.d.ts +2 -0
  37. package/dist/composables/utils/is-using-keyboard.d.ts.map +1 -0
  38. package/dist/composables/utils/use-active-descendant.d.ts +8 -0
  39. package/dist/composables/utils/use-active-descendant.d.ts.map +1 -0
  40. package/dist/types.d.ts +15 -0
  41. package/dist/types.d.ts.map +1 -1
  42. package/dist/utils.d.ts +84 -7
  43. package/dist/utils.d.ts.map +1 -1
  44. package/dist/v-float.es.js +2749 -1836
  45. package/dist/v-float.umd.js +4 -1
  46. package/package.json +74 -76
  47. package/dist/composables/interactions/use-client-point.d.ts.map +0 -1
  48. package/dist/composables/interactions/utils/browser-detection.d.ts +0 -23
  49. package/dist/composables/interactions/utils/browser-detection.d.ts.map +0 -1
  50. package/dist/composables/interactions/utils/element-detection.d.ts +0 -53
  51. package/dist/composables/interactions/utils/element-detection.d.ts.map +0 -1
  52. package/dist/composables/interactions/utils/event-utils.d.ts +0 -30
  53. package/dist/composables/interactions/utils/event-utils.d.ts.map +0 -1
  54. package/dist/composables/interactions/utils/index.d.ts +0 -11
  55. package/dist/composables/interactions/utils/index.d.ts.map +0 -1
  56. package/dist/composables/interactions/utils/tree-context.d.ts +0 -32
  57. package/dist/composables/interactions/utils/tree-context.d.ts.map +0 -1
  58. package/dist/composables/use-arrow.d.ts.map +0 -1
  59. package/dist/composables/use-floating-tree.d.ts.map +0 -1
  60. package/dist/composables/use-floating.d.ts.map +0 -1
  61. /package/dist/composables/{use-arrow.d.ts → positioning/use-arrow.d.ts} +0 -0
@@ -1 +1,4 @@
1
- (function(A,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],f):(A=typeof globalThis<"u"?globalThis:A||self,f(A.VFloat={},A.Vue))})(this,(function(A,f){"use strict";var To=Object.defineProperty;var Oo=(A,f,he)=>f in A?To(A,f,{enumerable:!0,configurable:!0,writable:!0,value:he}):A[f]=he;var xe=(A,f,he)=>Oo(A,typeof f!="symbol"?f+"":f,he);function he(e){return f.getCurrentScope()?(f.onScopeDispose(e),!0):!1}const Gt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Jt=Object.prototype.toString,Qt=e=>Jt.call(e)==="[object Object]";function Ie(e){return Array.isArray(e)?e:[e]}function Zt(e,t,n){return f.watch(e,t,{...n,immediate:!0})}const en=Gt?window:void 0;function tn(e){var t;const n=f.toValue(e);return(t=n==null?void 0:n.$el)!=null?t:n}function J(...e){const t=[],n=()=>{t.forEach(a=>a()),t.length=0},o=(a,d,c,u)=>(a.addEventListener(d,c,u),()=>a.removeEventListener(d,c,u)),i=f.computed(()=>{const a=Ie(f.toValue(e[0])).filter(d=>d!=null);return a.every(d=>typeof d!="string")?a:void 0}),l=Zt(()=>{var a,d;return[(d=(a=i.value)==null?void 0:a.map(c=>tn(c)))!=null?d:[en].filter(c=>c!=null),Ie(f.toValue(i.value?e[1]:e[0])),Ie(f.unref(i.value?e[2]:e[1])),f.toValue(i.value?e[3]:e[2])]},([a,d,c,u])=>{if(n(),!(a!=null&&a.length)||!(d!=null&&d.length)||!(c!=null&&c.length))return;const g=Qt(u)?{...u}:u;t.push(...a.flatMap(h=>d.flatMap(m=>c.map(p=>o(h,m,p,g)))))},{flush:"post"}),r=()=>{l(),n()};return he(n),r}function Be(){return typeof navigator>"u"?!1:navigator.platform.toUpperCase().indexOf("MAC")>=0}function $e(){return typeof navigator>"u"?!1:/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function st(e){return typeof(e==null?void 0:e.matches)!="function"?!1:e.matches(":focus-visible")}function je(e,t){if(e===void 0)return!1;const n=e==="mouse";return t?n:n||e==="pen"}function Xe(e){return!e||!(e instanceof HTMLElement)?!1:e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e.isContentEditable&&e.contentEditable!=="false"}function Ye(e){const t=e.target;return t instanceof HTMLElement?t.tagName==="BUTTON"||t.tagName==="INPUT"&&t.getAttribute("type")==="button"||t.getAttribute("role")==="button":!1}function _e(e){return Xe(e)}function lt(e){return e instanceof Element&&e instanceof HTMLElement}function nn(e){return typeof e=="object"&&e!==null&&"contextElement"in e}function ze(e,t){return t?"composedPath"in e&&typeof e.composedPath=="function"?e.composedPath().includes(t):t.contains(e.target):!1}function at(e,t){const n=t.getBoundingClientRect(),o=t.offsetWidth-t.clientWidth,i=t.offsetHeight-t.clientHeight,l=e.clientX-n.left,r=e.clientY-n.top;if(o>0){const a=t.clientWidth;if(l>=a&&l<=t.offsetWidth)return!0}if(i>0){const a=t.clientHeight;if(r>=a&&r<=t.offsetHeight)return!0}return!1}function Oe(e,t){return e.contains(t)}function ct(e){return e.target}function Ue(){return typeof performance<"u"?performance.now():Date.now()}function Ke(e){e!==-1&&clearTimeout(e)}function ut(e){return e!==null&&typeof e=="object"&&"data"in e&&"id"in e&&"children"in e&&"parent"in e}function Ee(e){return ut(e)?{floatingContext:e.data,treeContext:e}:{floatingContext:e,treeContext:null}}function z(e,t){if(!t)return!1;if(typeof t=="object"&&t!==null&&"contextElement"in t){const n=t.contextElement;return n instanceof Element?n.contains(e):!1}return t instanceof Element?t.contains(e):!1}function Pe(e,t){for(const n of e.children.value)if(n.data.open.value){if(z(t,n.data.refs.anchorEl.value)||z(t,n.data.refs.floatingEl.value))return n;const o=Pe(n,t);if(o)return o}return null}function on(e,t={}){const{floatingContext:n,treeContext:o}=Ee(e),{open:i,setOpen:l,refs:r}=n,{enabled:a=!0,event:d="click",toggle:c=!0,ignoreMouse:u=!1,ignoreKeyboard:g=!1,ignoreTouch:h=!1,outsideClick:m=!1,outsideEvent:p="pointerdown",outsideCapture:w=!0,onOutsideClick:v,preventScrollbarClick:x=!0,handleDragEvents:C=!0}=t;let T,S=!1,y=!1,E=!1;const P=f.computed(()=>f.toValue(a)),N=f.computed(()=>f.toValue(m)),R=f.computed(()=>{const L=r.anchorEl.value;return L instanceof HTMLElement?L:null}),M=f.computed(()=>r.floatingEl.value);function k(){E=!0;try{i.value?f.toValue(c)&&l(!1):l(!0)}finally{Promise.resolve().then(()=>{E=!1})}}function I(){T=void 0,S=!1,y=!1}function B(L){T=L.pointerType}function V(L){L.button===0&&f.toValue(d)!=="click"&&($(T)||k())}function O(){if(f.toValue(d)==="mousedown"&&T){I();return}if($(T)){I();return}k(),I()}function s(L){if(T=void 0,L.defaultPrevented||f.toValue(g)||Ye(L))return;const j=R.value;j&&(L.key===" "&&!_e(j)&&(L.preventDefault(),S=!0),L.key==="Enter"&&k())}function F(L){const j=R.value;j&&(L.defaultPrevented||f.toValue(g)||Ye(L)||_e(j)||L.key===" "&&S&&(S=!1,k()))}function b(L){if(!P.value||!N.value||!i.value)return;if(f.toValue(p)==="click"&&f.toValue(C)&&y){y=!1;return}if(E)return;const j=L.target;if(j&&!(f.toValue(x)&&lt(j)&&M.value&&at(L,j))){if(o){if(!rn(o,j))return}else if(ze(L,R.value)||ze(L,M.value))return;v?v(L,n):l(!1)}}function H(){y=!0}function oe(){setTimeout(()=>{y=!1},0)}function $(L){return!!(je(L,!0)&&f.toValue(u)||L==="touch"&&f.toValue(h))}f.watchPostEffect(()=>{const L=R.value;!P.value||!L||(L.addEventListener("pointerdown",B),L.addEventListener("mousedown",V),L.addEventListener("click",O),L.addEventListener("keydown",s),L.addEventListener("keyup",F),f.onWatcherCleanup(()=>{L.removeEventListener("pointerdown",B),L.removeEventListener("mousedown",V),L.removeEventListener("click",O),L.removeEventListener("keydown",s),L.removeEventListener("keyup",F),I()}))}),J(()=>P.value&&N.value?document:null,()=>f.toValue(p),b,{capture:f.toValue(w)}),J(()=>P.value&&N.value&&f.toValue(C)?M.value:null,"mousedown",H,{capture:!0}),J(()=>P.value&&N.value&&f.toValue(C)?M.value:null,"mouseup",oe,{capture:!0})}function rn(e,t){return!(z(t,e.data.refs.anchorEl.value)||z(t,e.data.refs.floatingEl.value)||Pe(e,t))}const Se=e=>typeof e=="number"&&Number.isFinite(e)?e:null,ce=class ce{create(t){const n=this.buildConfiguration(t);return{contextElement:n.referenceElement||void 0,getBoundingClientRect:()=>this.buildBoundingRect(n)}}buildConfiguration(t){return{coordinates:t.coordinates,referenceElement:t.referenceElement??null,baselineCoordinates:t.baselineCoordinates??null,axis:t.axis??"both"}}buildBoundingRect(t){const n=this.getReferenceRect(t.referenceElement),o=this.resolvePosition(t,n),i=this.calculateSize(t.axis,n);return this.buildDOMRect({x:o.x,y:o.y,width:i.width,height:i.height})}getReferenceRect(t){if(t)try{return t.getBoundingClientRect()}catch(n){console.warn("VirtualElementFactory: Failed to get element bounds",{element:t,error:n})}return this.buildDOMRect({x:0,y:0,width:ce.DEFAULT_DIMENSIONS.width,height:ce.DEFAULT_DIMENSIONS.height})}resolvePosition(t,n){var o,i;return{x:this.resolveAxisCoordinate({current:t.coordinates.x,baseline:((o=t.baselineCoordinates)==null?void 0:o.x)??null,fallback:n.x,isAxisEnabled:t.axis==="x"||t.axis==="both"}),y:this.resolveAxisCoordinate({current:t.coordinates.y,baseline:((i=t.baselineCoordinates)==null?void 0:i.y)??null,fallback:n.y,isAxisEnabled:t.axis==="y"||t.axis==="both"})}}resolveAxisCoordinate(t){const{current:n,baseline:o,fallback:i,isAxisEnabled:l}=t;return l&&n!==null?n:o!==null?o:i}calculateSize(t,n){const o=(i,l)=>Math.max(0,i||l);switch(t){case"both":return{width:0,height:0};case"x":return{width:o(n.width,ce.DEFAULT_DIMENSIONS.width),height:0};case"y":return{width:0,height:o(n.height,ce.DEFAULT_DIMENSIONS.height)}}}buildDOMRect(t){const{x:n,y:o,width:i,height:l}=t,r=Math.max(0,i),a=Math.max(0,l);return{x:n,y:o,width:r,height:a,top:o,right:n+r,bottom:o+a,left:n,toJSON:()=>({x:n,y:o,width:r,height:a})}}};xe(ce,"DEFAULT_DIMENSIONS",{width:100,height:30});let qe=ce;class ft{constructor(){xe(this,"lastKnownCoordinates",null)}getCoordinatesForOpening(){return this.lastKnownCoordinates}onClose(){this.lastKnownCoordinates=null}reset(){this.lastKnownCoordinates=null}}class sn extends ft{constructor(){super(...arguments);xe(this,"name","follow")}getRequiredEvents(){return["pointerdown","pointermove","pointerenter"]}process(n,o){const i=n.coordinates;switch(this.lastKnownCoordinates=i,n.type){case"pointerdown":return i;case"pointermove":return o.isOpen&&je(n.originalEvent.pointerType,!0)?i:null;case"pointerenter":return i;default:return null}}}class ln extends ft{constructor(){super(...arguments);xe(this,"name","static");xe(this,"triggerCoordinates",null)}getRequiredEvents(){return["pointerdown"]}process(n,o){const i=n.coordinates;return this.triggerCoordinates=i,this.lastKnownCoordinates=i,o.isOpen?i:null}getCoordinatesForOpening(){return this.triggerCoordinates?this.triggerCoordinates:this.lastKnownCoordinates}reset(){super.reset(),this.triggerCoordinates=null}onClose(){this.triggerCoordinates=null}}function an(e,t,n={}){const{open:o,refs:i}=t,l=new qe,r=f.ref({x:null,y:null}),a=f.ref(null),d=f.computed(()=>f.toValue(n.axis??"both")),c=f.computed(()=>f.toValue(n.enabled??!0)),u=f.computed(()=>Se(f.toValue(n.x??null))),g=f.computed(()=>Se(f.toValue(n.y??null))),h=f.computed(()=>u.value!==null&&g.value!==null),m=f.computed(()=>h.value?{x:u.value,y:g.value}:r.value),p=f.computed(()=>{const E=m.value;switch(d.value){case"x":return{x:E.x,y:null};case"y":return{x:null,y:E.y};case"both":return E}}),w=(n.trackingMode??"follow")==="follow"?new sn:new ln,v=(E,P)=>{h.value||(r.value={x:Se(E),y:Se(P)})},x=()=>{h.value||(r.value={x:null,y:null})},C=(E,P)=>{const N={type:P,coordinates:{x:E.clientX,y:E.clientY},originalEvent:E},R=w.process(N,{isOpen:o.value});R&&v(R.x,R.y)};f.watch([p,a,d,e],()=>{i.anchorEl.value=l.create({coordinates:p.value,referenceElement:e.value,baselineCoordinates:a.value,axis:d.value})},{immediate:!0}),f.watch(o,E=>{if(!(!c.value||h.value))if(E){const P=w.getCoordinatesForOpening();P?(v(P.x,P.y),a.value={...P}):a.value={...r.value}}else w.onClose(),x(),a.value=null});const T=E=>{C(E,"pointerdown")},S=E=>{C(E,"pointerenter")},y=E=>{C(E,"pointermove")};return f.watchEffect(()=>{if(h.value||!c.value)return;const E=e.value;if(!E)return;const P=w.getRequiredEvents(),N={pointerenter:S,pointerdown:T,pointermove:y};P.forEach(R=>{const M=N[R];M&&E.addEventListener(R,M)}),f.onWatcherCleanup(()=>{P.forEach(R=>{const M=N[R];M&&E.removeEventListener(R,M)})})}),{coordinates:f.readonly(p),updatePosition:(E,P)=>v(E,P)}}function cn(e,t={}){const{floatingContext:n,treeContext:o}=Ee(e),{enabled:i=!0,capture:l=!1,onEscape:r}=t,{isComposing:a}=fn();J(document,"keydown",c=>{if(!(c.key!=="Escape"||!f.toValue(i)||a())){if(r){r(c);return}if(o){const u=un(o);u&&u.data.setOpen(!1)}else n.setOpen(!1)}},l)}function un(e){let t=e;for(;t.parent.value&&!t.isRoot;)t=t.parent.value;let n=null,o=-1;const i=l=>{if(l.data.open.value){const r=l.getPath().length;r>o&&(o=r,n=l)}for(const r of l.children.value)i(r)};return i(t),n}function fn(){const e=f.ref(!1);return J(document,"compositionstart",()=>{e.value=!0}),J(document,"compositionend",()=>{e.value=!1}),{isComposing:()=>e.value}}function dn(e,t={}){const{floatingContext:n,treeContext:o}=Ee(e),{open:i,setOpen:l,refs:{floatingEl:r,anchorEl:a}}=n,{enabled:d=!0,requireFocusVisible:c=!0}=t,u=f.computed(()=>a.value?a.value instanceof HTMLElement?a.value:a.value.contextElement:null);let g=!1,h=!0,m;J(window,"blur",()=>{!i.value&&u.value&&u.value===document.activeElement&&(g=!0)}),J(window,"focus",()=>{g=!1}),f.onMounted(()=>{Be()&&$e()&&(J(window,"keydown",()=>{h=!0},{capture:!0}),J(window,"pointerdown",()=>{h=!1},{capture:!0}))});function p(v){if(g){g=!1;return}const x=v.target;if(f.toValue(c)&&x){if(Be()&&$e()&&!v.relatedTarget){if(!h&&!Xe(x))return}else if(!st(x))return}l(!0)}function w(v){clearTimeout(m),m=window.setTimeout(()=>{var T;const C=(((T=u.value)==null?void 0:T.ownerDocument)??document).activeElement;if(!(!v.relatedTarget&&C===u.value)){if(o){if(C&&mn(o,C))return}else if(r.value&&C&&r.value.contains(C))return;l(!1)}},0)}f.watchPostEffect(()=>{if(!f.toValue(d))return;const v=u.value;!v||!(v instanceof HTMLElement)||(v.addEventListener("focus",p),v.addEventListener("blur",w),f.onWatcherCleanup(()=>{v.removeEventListener("focus",p),v.removeEventListener("blur",w)}))}),f.onScopeDispose(()=>{clearTimeout(m)})}function mn(e,t){return z(t,e.data.refs.anchorEl.value)||z(t,e.data.refs.floatingEl.value)?!0:dt(e,t)!==null}function dt(e,t){for(const n of e.children.value)if(n.data.open.value){if(z(t,n.data.refs.anchorEl.value)||z(t,n.data.refs.floatingEl.value))return n;const o=dt(n,t);if(o)return o}return null}let hn=0;function pn(){return`vfloat-id-${hn++}`}function mt(e){return typeof e=="object"&&e instanceof HTMLElement}function ht(e){return e.children.value.some(t=>t.data.open.value||ht(t))}function gn(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function pt(e,t){const[n,o]=e;let i=!1;const l=t.length;for(let r=0,a=l-1;r<l;a=r++){const[d,c]=t[r]||[0,0],[u,g]=t[a]||[0,0];c>=o!=g>=o&&n<=(u-d)*(o-c)/(g-c)+d&&(i=!i)}return i}function vn(e={}){const{blockPointerEvents:t=!1,requireIntent:n=!0}=e;let o=-1,i=!1;function l(a,d,c,u,g){const h=Ue(),m=h-g;if(c===null||u===null||m===0)return{speed:null,lastX:a,lastY:d,lastCursorTime:h};const p=a-c,w=d-u;return{speed:Math.sqrt(p*p+w*w)/m,lastX:a,lastY:d,lastCursorTime:h}}const r=function(d){const{x:c,y:u,placement:g,elements:h,buffer:m,onClose:p,nodeId:w,tree:v}=d,x=f.computed(()=>{const y=h.domReference;return mt(y)?y:(y==null?void 0:y.contextElement)??null});let C=null,T=null,S=Ue();return function(E){var We,Yt,_t,zt,Ut,Kt,qt;function P(){Ke(o),o=-1,p()}if(Ke(o),o=-1,!h.domReference||!h.floating||g==null||c==null||u==null)return;const{clientX:N,clientY:R}=E,M=[N,R],k=ct(E),I=E.type==="mouseleave",B=h.floating&&Oe(h.floating,k),V=x.value&&Oe(x.value,k),O=(We=x.value)==null?void 0:We.getBoundingClientRect(),s=(Yt=h.floating)==null?void 0:Yt.getBoundingClientRect(),F=g.split("-")[0],b=c>((s==null?void 0:s.right)??0)-((s==null?void 0:s.width)??0)/2,H=u>((s==null?void 0:s.bottom)??0)-((s==null?void 0:s.height)??0)/2,oe=O?gn(M,O):!1,$=((s==null?void 0:s.width)??0)>((O==null?void 0:O.width)??0),L=((s==null?void 0:s.height)??0)>((O==null?void 0:O.height)??0),j=((_t=$?O:s)==null?void 0:_t.left)??0,ue=((zt=$?O:s)==null?void 0:zt.right)??0,G=((Ut=L?O:s)==null?void 0:Ut.top)??0,fe=((Kt=L?O:s)==null?void 0:Kt.bottom)??0;if(B&&(i=!0,!I))return;if(V&&(i=!1),V&&!I){i=!0;return}if(I&&mt(E.relatedTarget)&&h.floating&&Oe(h.floating,E.relatedTarget))return;if(v&&w){const W=v.nodes.get(w);if(W&&ht(W))return}if(F==="top"&&u>=((O==null?void 0:O.bottom)??0)-1||F==="bottom"&&u<=((O==null?void 0:O.top)??0)+1||F==="left"&&c>=((O==null?void 0:O.right)??0)-1||F==="right"&&c<=((O==null?void 0:O.left)??0)+1)return P();let le=[];switch(F){case"top":le=[[j,((O==null?void 0:O.top)??0)+1],[j,((s==null?void 0:s.bottom)??0)-1],[ue,((s==null?void 0:s.bottom)??0)-1],[ue,((O==null?void 0:O.top)??0)+1]];break;case"bottom":le=[[j,((s==null?void 0:s.top)??0)+1],[j,((O==null?void 0:O.bottom)??0)-1],[ue,((O==null?void 0:O.bottom)??0)-1],[ue,((s==null?void 0:s.top)??0)+1]];break;case"left":le=[[((s==null?void 0:s.right)??0)-1,fe],[((s==null?void 0:s.right)??0)-1,G],[((O==null?void 0:O.left)??0)+1,G],[((O==null?void 0:O.left)??0)+1,fe]];break;case"right":le=[[((O==null?void 0:O.right)??0)-1,fe],[((O==null?void 0:O.right)??0)-1,G],[((s==null?void 0:s.left)??0)+1,G],[((s==null?void 0:s.left)??0)+1,fe]];break}function He([W,X]){const D=m;switch(F){case"top":{const de=[$?W+D/2:b?W+D*4:W-D*4,X+D+1],me=[$?W-D/2:b?W+D*4:W-D*4,X+D+1],be=[[(s==null?void 0:s.left)??0,b||$?((s==null?void 0:s.bottom)??0)-D:(s==null?void 0:s.top)??0],[(s==null?void 0:s.right)??0,b?$?((s==null?void 0:s.bottom)??0)-D:(s==null?void 0:s.top)??0:((s==null?void 0:s.bottom)??0)-D]];return[de,me,...be]}case"bottom":{const de=[$?W+D/2:b?W+D*4:W-D*4,X-D],me=[$?W-D/2:b?W+D*4:W-D*4,X-D],be=[[(s==null?void 0:s.left)??0,b||$?((s==null?void 0:s.top)??0)+D:(s==null?void 0:s.bottom)??0],[(s==null?void 0:s.right)??0,b?$?((s==null?void 0:s.top)??0)+D:(s==null?void 0:s.bottom)??0:((s==null?void 0:s.top)??0)+D]];return[de,me,...be]}case"left":{const de=[W+D+1,L?X+D/2:H?X+D*4:X-D*4],me=[W+D+1,L?X-D/2:H?X+D*4:X-D*4];return[...[[H||L?((s==null?void 0:s.right)??0)-D:(s==null?void 0:s.left)??0,(s==null?void 0:s.top)??0],[H?L?((s==null?void 0:s.right)??0)-D:(s==null?void 0:s.left)??0:((s==null?void 0:s.right)??0)-D,(s==null?void 0:s.bottom)??0]],de,me]}case"right":{const de=[W-D,L?X+D/2:H?X+D*4:X-D*4],me=[W-D,L?X-D/2:H?X+D*4:X-D*4],be=[[H||L?((s==null?void 0:s.left)??0)+D:(s==null?void 0:s.right)??0,(s==null?void 0:s.top)??0],[H?L?((s==null?void 0:s.left)??0)+D:(s==null?void 0:s.right)??0:((s==null?void 0:s.left)??0)+D,(s==null?void 0:s.bottom)??0]];return[de,me,...be]}}}const ye=He([c,u]);if((qt=e.onPolygonChange)==null||qt.call(e,ye),!pt(M,le)){if(pt(M,ye)){if(!i&&n){const W=l(E.clientX,E.clientY,C,T,S);C=W.lastX,T=W.lastY,S=W.lastCursorTime,W.speed!==null&&W.speed<.1&&(o=window.setTimeout(P,40))}return}if(i&&!oe)return P();P()}}};return r.__options={blockPointerEvents:t},r}const gt=10;function wn(e,t,n){const{delay:o}=n,i=f.computed(()=>{const c=f.toValue(o);return(typeof c=="number"?c:c.open)??0}),l=f.computed(()=>{const c=f.toValue(o);return(typeof c=="number"?c:c.close)??0});let r,a;const d=()=>{clearTimeout(r),clearTimeout(a)};return f.onScopeDispose(d),{show:c=>{d();const u=c??i.value;u===0?e():r=setTimeout(e,u)},hide:c=>{d();const u=c??l.value;u===0?t():a=setTimeout(t,u)},showDelay:i,hideDelay:l,clearTimeouts:d}}function yn(e,t={}){const{floatingContext:n,treeContext:o}=Ee(e),{open:i,setOpen:l,refs:{anchorEl:r,floatingEl:a}}=n,{enabled:d=!0,delay:c=0,restMs:u=0,mouseOnly:g=!1,safePolygon:h=!1}=t,m=f.computed(()=>f.toValue(d)),p=f.computed(()=>f.toValue(u)),w=f.computed(()=>{const b=r.value;return!b||b instanceof HTMLElement?b:b.contextElement??null}),{hide:v,show:x,showDelay:C,clearTimeouts:T}=wn(()=>{i.value||l(!0)},()=>{i.value&&l(!1)},{delay:c});let S=null,y;const E=f.computed(()=>C.value===0&&p.value>0);function P(b){if(!m.value||!M(b)||!E.value||!S)return;const H={x:b.clientX,y:b.clientY},oe=Math.abs(H.x-S.x),$=Math.abs(H.y-S.y);(oe>gt||$>gt)&&(S=H,clearTimeout(y),y=setTimeout(()=>{x(0)},p.value))}function N(b){!m.value||!M(b)||!E.value||(S={x:b.clientX,y:b.clientY},y=setTimeout(()=>{x(0)},p.value))}function R(){clearTimeout(y),S=null}f.watchPostEffect(()=>{const b=w.value;!b||!m.value||!E.value||(b.addEventListener("pointerenter",N),b.addEventListener("pointermove",P),b.addEventListener("pointerleave",R),f.onWatcherCleanup(()=>{b.removeEventListener("pointerenter",N),b.removeEventListener("pointermove",P),b.removeEventListener("pointerleave",R)}))}),f.onScopeDispose(()=>{clearTimeout(y)});function M(b){return f.toValue(g)?b.pointerType==="mouse":!0}function k(b){!m.value||!M(b)||E.value||(V(),x())}function I(b){!m.value||!M(b)||(T(),V())}let B=null;function V(){B&&(document.removeEventListener("pointermove",B),B=null);const b=s.value;b!=null&&b.onPolygonChange&&b.onPolygonChange([])}const O=f.computed(()=>!!f.toValue(h)),s=f.computed(()=>{const b=f.toValue(h);if(typeof b=="object"&&b)return b;if(b===!0)return{}});function F(b){var L;if(!m.value||!M(b))return;const{clientX:H,clientY:oe}=b,$=b.relatedTarget;if(O.value)setTimeout(()=>{var le;V();const j=w.value,ue=a.value;if(!j||!ue){v();return}let G,fe;if(o){G=new Map;const He=ye=>{G==null||G.set(ye.id,ye);for(const We of ye.children.value)He(We)};He(o),fe=o.id}B=vn(s.value)({x:H,y:oe,placement:n.placement.value,elements:{domReference:j,floating:ue},buffer:((le=s.value)==null?void 0:le.buffer)??1,onClose:()=>{V(),v()},nodeId:fe,tree:G?{nodes:G}:void 0}),B&&document.addEventListener("pointermove",B)},0);else{if(o){if(!bn(o,$))return}else if((L=a.value)!=null&&L.contains($))return;v()}}f.watchPostEffect(()=>{const b=w.value;!b||!m.value||(b.addEventListener("pointerenter",k),b.addEventListener("pointerleave",F),f.onWatcherCleanup(()=>{b.removeEventListener("pointerenter",k),b.removeEventListener("pointerleave",F)}))}),f.watchPostEffect(()=>{const b=a.value;!b||!m.value||(b.addEventListener("pointerenter",I),b.addEventListener("pointerleave",F),f.onWatcherCleanup(()=>{b.removeEventListener("pointerenter",I),b.removeEventListener("pointerleave",F)}))}),f.onScopeDispose(()=>{V()})}function bn(e,t){return t?!(z(t,e.data.refs.anchorEl.value)||z(t,e.data.refs.floatingEl.value)||Pe(e,t)):!0}const vt=["top","right","bottom","left"],wt=["start","end"],yt=vt.reduce((e,t)=>e.concat(t,t+"-"+wt[0],t+"-"+wt[1]),[]),ie=Math.min,Y=Math.max,Le=Math.round,Ae=Math.floor,Q=e=>({x:e,y:e}),xn={left:"right",right:"left",bottom:"top",top:"bottom"},En={start:"end",end:"start"};function Ge(e,t,n){return Y(e,ie(t,n))}function re(e,t){return typeof e=="function"?e(t):e}function Z(e){return e.split("-")[0]}function U(e){return e.split("-")[1]}function bt(e){return e==="x"?"y":"x"}function Je(e){return e==="y"?"height":"width"}const Cn=new Set(["top","bottom"]);function ne(e){return Cn.has(Z(e))?"y":"x"}function Qe(e){return bt(ne(e))}function xt(e,t,n){n===void 0&&(n=!1);const o=U(e),i=Qe(e),l=Je(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(r=Me(r)),[r,Me(r)]}function Tn(e){const t=Me(e);return[De(e),t,De(t)]}function De(e){return e.replace(/start|end/g,t=>En[t])}const Et=["left","right"],Ct=["right","left"],On=["top","bottom"],Pn=["bottom","top"];function Sn(e,t,n){switch(e){case"top":case"bottom":return n?t?Ct:Et:t?Et:Ct;case"left":case"right":return t?On:Pn;default:return[]}}function Ln(e,t,n,o){const i=U(e);let l=Sn(Z(e),n==="start",o);return i&&(l=l.map(r=>r+"-"+i),t&&(l=l.concat(l.map(De)))),l}function Me(e){return e.replace(/left|right|bottom|top/g,t=>xn[t])}function An(e){return{top:0,right:0,bottom:0,left:0,...e}}function Tt(e){return typeof e!="number"?An(e):{top:e,right:e,bottom:e,left:e}}function Re(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function Ot(e,t,n){let{reference:o,floating:i}=e;const l=ne(t),r=Qe(t),a=Je(r),d=Z(t),c=l==="y",u=o.x+o.width/2-i.width/2,g=o.y+o.height/2-i.height/2,h=o[a]/2-i[a]/2;let m;switch(d){case"top":m={x:u,y:o.y-i.height};break;case"bottom":m={x:u,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:g};break;case"left":m={x:o.x-i.width,y:g};break;default:m={x:o.x,y:o.y}}switch(U(t)){case"start":m[r]-=h*(n&&c?-1:1);break;case"end":m[r]+=h*(n&&c?-1:1);break}return m}const Dn=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:l=[],platform:r}=n,a=l.filter(Boolean),d=await(r.isRTL==null?void 0:r.isRTL(t));let c=await r.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:g}=Ot(c,o,d),h=o,m={},p=0;for(let w=0;w<a.length;w++){const{name:v,fn:x}=a[w],{x:C,y:T,data:S,reset:y}=await x({x:u,y:g,initialPlacement:o,placement:h,strategy:i,middlewareData:m,rects:c,platform:r,elements:{reference:e,floating:t}});u=C??u,g=T??g,m={...m,[v]:{...m[v],...S}},y&&p<=50&&(p++,typeof y=="object"&&(y.placement&&(h=y.placement),y.rects&&(c=y.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:i}):y.rects),{x:u,y:g}=Ot(c,h,d)),w=-1)}return{x:u,y:g,placement:h,strategy:i,middlewareData:m}};async function pe(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:l,rects:r,elements:a,strategy:d}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:g="floating",altBoundary:h=!1,padding:m=0}=re(t,e),p=Tt(m),v=a[h?g==="floating"?"reference":"floating":g],x=Re(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(v)))==null||n?v:v.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:d})),C=g==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(a.floating)),S=await(l.isElement==null?void 0:l.isElement(T))?await(l.getScale==null?void 0:l.getScale(T))||{x:1,y:1}:{x:1,y:1},y=Re(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:C,offsetParent:T,strategy:d}):C);return{top:(x.top-y.top+p.top)/S.y,bottom:(y.bottom-x.bottom+p.bottom)/S.y,left:(x.left-y.left+p.left)/S.x,right:(y.right-x.right+p.right)/S.x}}const Mn=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:l,platform:r,elements:a,middlewareData:d}=t,{element:c,padding:u=0}=re(e,t)||{};if(c==null)return{};const g=Tt(u),h={x:n,y:o},m=Qe(i),p=Je(m),w=await r.getDimensions(c),v=m==="y",x=v?"top":"left",C=v?"bottom":"right",T=v?"clientHeight":"clientWidth",S=l.reference[p]+l.reference[m]-h[m]-l.floating[p],y=h[m]-l.reference[m],E=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c));let P=E?E[T]:0;(!P||!await(r.isElement==null?void 0:r.isElement(E)))&&(P=a.floating[T]||l.floating[p]);const N=S/2-y/2,R=P/2-w[p]/2-1,M=ie(g[x],R),k=ie(g[C],R),I=M,B=P-w[p]-k,V=P/2-w[p]/2+N,O=Ge(I,V,B),s=!d.arrow&&U(i)!=null&&V!==O&&l.reference[p]/2-(V<I?M:k)-w[p]/2<0,F=s?V<I?V-I:V-B:0;return{[m]:h[m]+F,data:{[m]:O,centerOffset:V-O-F,...s&&{alignmentOffset:F}},reset:s}}});function Rn(e,t,n){return(e?[...n.filter(i=>U(i)===e),...n.filter(i=>U(i)!==e)]:n.filter(i=>Z(i)===i)).filter(i=>e?U(i)===e||(t?De(i)!==i:!1):!0)}const Nn=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,i;const{rects:l,middlewareData:r,placement:a,platform:d,elements:c}=t,{crossAxis:u=!1,alignment:g,allowedPlacements:h=yt,autoAlignment:m=!0,...p}=re(e,t),w=g!==void 0||h===yt?Rn(g||null,m,h):h,v=await pe(t,p),x=((n=r.autoPlacement)==null?void 0:n.index)||0,C=w[x];if(C==null)return{};const T=xt(C,l,await(d.isRTL==null?void 0:d.isRTL(c.floating)));if(a!==C)return{reset:{placement:w[0]}};const S=[v[Z(C)],v[T[0]],v[T[1]]],y=[...((o=r.autoPlacement)==null?void 0:o.overflows)||[],{placement:C,overflows:S}],E=w[x+1];if(E)return{data:{index:x+1,overflows:y},reset:{placement:E}};const P=y.map(M=>{const k=U(M.placement);return[M.placement,k&&u?M.overflows.slice(0,2).reduce((I,B)=>I+B,0):M.overflows[0],M.overflows]}).sort((M,k)=>M[1]-k[1]),R=((i=P.filter(M=>M[2].slice(0,U(M[0])?2:3).every(k=>k<=0))[0])==null?void 0:i[0])||P[0][0];return R!==a?{data:{index:x+1,overflows:y},reset:{placement:R}}:{}}}},kn=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:l,rects:r,initialPlacement:a,platform:d,elements:c}=t,{mainAxis:u=!0,crossAxis:g=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:w=!0,...v}=re(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const x=Z(i),C=ne(a),T=Z(a)===a,S=await(d.isRTL==null?void 0:d.isRTL(c.floating)),y=h||(T||!w?[Me(a)]:Tn(a)),E=p!=="none";!h&&E&&y.push(...Ln(a,w,p,S));const P=[a,...y],N=await pe(t,v),R=[];let M=((o=l.flip)==null?void 0:o.overflows)||[];if(u&&R.push(N[x]),g){const V=xt(i,r,S);R.push(N[V[0]],N[V[1]])}if(M=[...M,{placement:i,overflows:R}],!R.every(V=>V<=0)){var k,I;const V=(((k=l.flip)==null?void 0:k.index)||0)+1,O=P[V];if(O&&(!(g==="alignment"?C!==ne(O):!1)||M.every(b=>ne(b.placement)===C?b.overflows[0]>0:!0)))return{data:{index:V,overflows:M},reset:{placement:O}};let s=(I=M.filter(F=>F.overflows[0]<=0).sort((F,b)=>F.overflows[1]-b.overflows[1])[0])==null?void 0:I.placement;if(!s)switch(m){case"bestFit":{var B;const F=(B=M.filter(b=>{if(E){const H=ne(b.placement);return H===C||H==="y"}return!0}).map(b=>[b.placement,b.overflows.filter(H=>H>0).reduce((H,oe)=>H+oe,0)]).sort((b,H)=>b[1]-H[1])[0])==null?void 0:B[0];F&&(s=F);break}case"initialPlacement":s=a;break}if(i!==s)return{reset:{placement:s}}}return{}}}};function Pt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function St(e){return vt.some(t=>e[t]>=0)}const Vn=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=re(e,t);switch(o){case"referenceHidden":{const l=await pe(t,{...i,elementContext:"reference"}),r=Pt(l,n.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:St(r)}}}case"escaped":{const l=await pe(t,{...i,altBoundary:!0}),r=Pt(l,n.floating);return{data:{escapedOffsets:r,escaped:St(r)}}}default:return{}}}}},Fn=new Set(["left","top"]);async function Hn(e,t){const{placement:n,platform:o,elements:i}=e,l=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=Z(n),a=U(n),d=ne(n)==="y",c=Fn.has(r)?-1:1,u=l&&d?-1:1,g=re(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:p}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return a&&typeof p=="number"&&(m=a==="end"?p*-1:p),d?{x:m*u,y:h*c}:{x:h*c,y:m*u}}const Wn=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:l,placement:r,middlewareData:a}=t,d=await Hn(t,e);return r===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:i+d.x,y:l+d.y,data:{...d,placement:r}}}}},In=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:l=!0,crossAxis:r=!1,limiter:a={fn:v=>{let{x,y:C}=v;return{x,y:C}}},...d}=re(e,t),c={x:n,y:o},u=await pe(t,d),g=ne(Z(i)),h=bt(g);let m=c[h],p=c[g];if(l){const v=h==="y"?"top":"left",x=h==="y"?"bottom":"right",C=m+u[v],T=m-u[x];m=Ge(C,m,T)}if(r){const v=g==="y"?"top":"left",x=g==="y"?"bottom":"right",C=p+u[v],T=p-u[x];p=Ge(C,p,T)}const w=a.fn({...t,[h]:m,[g]:p});return{...w,data:{x:w.x-n,y:w.y-o,enabled:{[h]:l,[g]:r}}}}}},Bn=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:l,platform:r,elements:a}=t,{apply:d=()=>{},...c}=re(e,t),u=await pe(t,c),g=Z(i),h=U(i),m=ne(i)==="y",{width:p,height:w}=l.floating;let v,x;g==="top"||g==="bottom"?(v=g,x=h===(await(r.isRTL==null?void 0:r.isRTL(a.floating))?"start":"end")?"left":"right"):(x=g,v=h==="end"?"top":"bottom");const C=w-u.top-u.bottom,T=p-u.left-u.right,S=ie(w-u[v],C),y=ie(p-u[x],T),E=!t.middlewareData.shift;let P=S,N=y;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=T),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(P=C),E&&!h){const M=Y(u.left,0),k=Y(u.right,0),I=Y(u.top,0),B=Y(u.bottom,0);m?N=p-2*(M!==0||k!==0?M+k:Y(u.left,u.right)):P=w-2*(I!==0||B!==0?I+B:Y(u.top,u.bottom))}await d({...t,availableWidth:N,availableHeight:P});const R=await r.getDimensions(a.floating);return p!==R.width||w!==R.height?{reset:{rects:!0}}:{}}}};function Ne(){return typeof window<"u"}function ge(e){return Lt(e)?(e.nodeName||"").toLowerCase():"#document"}function _(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ee(e){var t;return(t=(Lt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lt(e){return Ne()?e instanceof Node||e instanceof _(e).Node:!1}function K(e){return Ne()?e instanceof Element||e instanceof _(e).Element:!1}function te(e){return Ne()?e instanceof HTMLElement||e instanceof _(e).HTMLElement:!1}function At(e){return!Ne()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof _(e).ShadowRoot}const $n=new Set(["inline","contents"]);function Ce(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=q(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!$n.has(i)}const jn=new Set(["table","td","th"]);function Xn(e){return jn.has(ge(e))}const Yn=[":popover-open",":modal"];function ke(e){return Yn.some(t=>{try{return e.matches(t)}catch{return!1}})}const _n=["transform","translate","scale","rotate","perspective"],zn=["transform","translate","scale","rotate","perspective","filter"],Un=["paint","layout","strict","content"];function Ze(e){const t=et(),n=K(e)?q(e):e;return _n.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||zn.some(o=>(n.willChange||"").includes(o))||Un.some(o=>(n.contain||"").includes(o))}function Kn(e){let t=se(e);for(;te(t)&&!ve(t);){if(Ze(t))return t;if(ke(t))return null;t=se(t)}return null}function et(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const qn=new Set(["html","body","#document"]);function ve(e){return qn.has(ge(e))}function q(e){return _(e).getComputedStyle(e)}function Ve(e){return K(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function se(e){if(ge(e)==="html")return e;const t=e.assignedSlot||e.parentNode||At(e)&&e.host||ee(e);return At(t)?t.host:t}function Dt(e){const t=se(e);return ve(t)?e.ownerDocument?e.ownerDocument.body:e.body:te(t)&&Ce(t)?t:Dt(t)}function Te(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Dt(e),l=i===((o=e.ownerDocument)==null?void 0:o.body),r=_(i);if(l){const a=tt(r);return t.concat(r,r.visualViewport||[],Ce(i)?i:[],a&&n?Te(a):[])}return t.concat(i,Te(i,[],n))}function tt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Mt(e){const t=q(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=te(e),l=i?e.offsetWidth:n,r=i?e.offsetHeight:o,a=Le(n)!==l||Le(o)!==r;return a&&(n=l,o=r),{width:n,height:o,$:a}}function nt(e){return K(e)?e:e.contextElement}function we(e){const t=nt(e);if(!te(t))return Q(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:l}=Mt(t);let r=(l?Le(n.width):n.width)/o,a=(l?Le(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const Gn=Q(0);function Rt(e){const t=_(e);return!et()||!t.visualViewport?Gn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Jn(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==_(e)?!1:t}function ae(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),l=nt(e);let r=Q(1);t&&(o?K(o)&&(r=we(o)):r=we(e));const a=Jn(l,n,o)?Rt(l):Q(0);let d=(i.left+a.x)/r.x,c=(i.top+a.y)/r.y,u=i.width/r.x,g=i.height/r.y;if(l){const h=_(l),m=o&&K(o)?_(o):o;let p=h,w=tt(p);for(;w&&o&&m!==p;){const v=we(w),x=w.getBoundingClientRect(),C=q(w),T=x.left+(w.clientLeft+parseFloat(C.paddingLeft))*v.x,S=x.top+(w.clientTop+parseFloat(C.paddingTop))*v.y;d*=v.x,c*=v.y,u*=v.x,g*=v.y,d+=T,c+=S,p=_(w),w=tt(p)}}return Re({width:u,height:g,x:d,y:c})}function Fe(e,t){const n=Ve(e).scrollLeft;return t?t.left+n:ae(ee(e)).left+n}function Nt(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Fe(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function Qn(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const l=i==="fixed",r=ee(o),a=t?ke(t.floating):!1;if(o===r||a&&l)return n;let d={scrollLeft:0,scrollTop:0},c=Q(1);const u=Q(0),g=te(o);if((g||!g&&!l)&&((ge(o)!=="body"||Ce(r))&&(d=Ve(o)),te(o))){const m=ae(o);c=we(o),u.x=m.x+o.clientLeft,u.y=m.y+o.clientTop}const h=r&&!g&&!l?Nt(r,d):Q(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-d.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-d.scrollTop*c.y+u.y+h.y}}function Zn(e){return Array.from(e.getClientRects())}function eo(e){const t=ee(e),n=Ve(e),o=e.ownerDocument.body,i=Y(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),l=Y(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+Fe(e);const a=-n.scrollTop;return q(o).direction==="rtl"&&(r+=Y(t.clientWidth,o.clientWidth)-i),{width:i,height:l,x:r,y:a}}const kt=25;function to(e,t){const n=_(e),o=ee(e),i=n.visualViewport;let l=o.clientWidth,r=o.clientHeight,a=0,d=0;if(i){l=i.width,r=i.height;const u=et();(!u||u&&t==="fixed")&&(a=i.offsetLeft,d=i.offsetTop)}const c=Fe(o);if(c<=0){const u=o.ownerDocument,g=u.body,h=getComputedStyle(g),m=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,p=Math.abs(o.clientWidth-g.clientWidth-m);p<=kt&&(l-=p)}else c<=kt&&(l+=c);return{width:l,height:r,x:a,y:d}}const no=new Set(["absolute","fixed"]);function oo(e,t){const n=ae(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,l=te(e)?we(e):Q(1),r=e.clientWidth*l.x,a=e.clientHeight*l.y,d=i*l.x,c=o*l.y;return{width:r,height:a,x:d,y:c}}function Vt(e,t,n){let o;if(t==="viewport")o=to(e,n);else if(t==="document")o=eo(ee(e));else if(K(t))o=oo(t,n);else{const i=Rt(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Re(o)}function Ft(e,t){const n=se(e);return n===t||!K(n)||ve(n)?!1:q(n).position==="fixed"||Ft(n,t)}function io(e,t){const n=t.get(e);if(n)return n;let o=Te(e,[],!1).filter(a=>K(a)&&ge(a)!=="body"),i=null;const l=q(e).position==="fixed";let r=l?se(e):e;for(;K(r)&&!ve(r);){const a=q(r),d=Ze(r);!d&&a.position==="fixed"&&(i=null),(l?!d&&!i:!d&&a.position==="static"&&!!i&&no.has(i.position)||Ce(r)&&!d&&Ft(e,r))?o=o.filter(u=>u!==r):i=a,r=se(r)}return t.set(e,o),o}function ro(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const r=[...n==="clippingAncestors"?ke(t)?[]:io(t,this._c):[].concat(n),o],a=r[0],d=r.reduce((c,u)=>{const g=Vt(t,u,i);return c.top=Y(g.top,c.top),c.right=ie(g.right,c.right),c.bottom=ie(g.bottom,c.bottom),c.left=Y(g.left,c.left),c},Vt(t,a,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function so(e){const{width:t,height:n}=Mt(e);return{width:t,height:n}}function lo(e,t,n){const o=te(t),i=ee(t),l=n==="fixed",r=ae(e,!0,l,t);let a={scrollLeft:0,scrollTop:0};const d=Q(0);function c(){d.x=Fe(i)}if(o||!o&&!l)if((ge(t)!=="body"||Ce(i))&&(a=Ve(t)),o){const m=ae(t,!0,l,t);d.x=m.x+t.clientLeft,d.y=m.y+t.clientTop}else i&&c();l&&!o&&i&&c();const u=i&&!o&&!l?Nt(i,a):Q(0),g=r.left+a.scrollLeft-d.x-u.x,h=r.top+a.scrollTop-d.y-u.y;return{x:g,y:h,width:r.width,height:r.height}}function ot(e){return q(e).position==="static"}function Ht(e,t){if(!te(e)||q(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ee(e)===n&&(n=n.ownerDocument.body),n}function Wt(e,t){const n=_(e);if(ke(e))return n;if(!te(e)){let i=se(e);for(;i&&!ve(i);){if(K(i)&&!ot(i))return i;i=se(i)}return n}let o=Ht(e,t);for(;o&&Xn(o)&&ot(o);)o=Ht(o,t);return o&&ve(o)&&ot(o)&&!Ze(o)?n:o||Kn(e)||n}const ao=async function(e){const t=this.getOffsetParent||Wt,n=this.getDimensions,o=await n(e.floating);return{reference:lo(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function co(e){return q(e).direction==="rtl"}const uo={convertOffsetParentRelativeRectToViewportRelativeRect:Qn,getDocumentElement:ee,getClippingRect:ro,getOffsetParent:Wt,getElementRects:ao,getClientRects:Zn,getDimensions:so,getScale:we,isElement:K,isRTL:co};function It(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function fo(e,t){let n=null,o;const i=ee(e);function l(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function r(a,d){a===void 0&&(a=!1),d===void 0&&(d=1),l();const c=e.getBoundingClientRect(),{left:u,top:g,width:h,height:m}=c;if(a||t(),!h||!m)return;const p=Ae(g),w=Ae(i.clientWidth-(u+h)),v=Ae(i.clientHeight-(g+m)),x=Ae(u),T={rootMargin:-p+"px "+-w+"px "+-v+"px "+-x+"px",threshold:Y(0,ie(1,d))||1};let S=!0;function y(E){const P=E[0].intersectionRatio;if(P!==d){if(!S)return r();P?r(!1,P):o=setTimeout(()=>{r(!1,1e-7)},1e3)}P===1&&!It(c,e.getBoundingClientRect())&&r(),S=!1}try{n=new IntersectionObserver(y,{...T,root:i.ownerDocument})}catch{n=new IntersectionObserver(y,T)}n.observe(e)}return r(!0),l}function mo(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:l=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,c=nt(e),u=i||l?[...c?Te(c):[],...Te(t)]:[];u.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),l&&x.addEventListener("resize",n)});const g=c&&a?fo(c,n):null;let h=-1,m=null;r&&(m=new ResizeObserver(x=>{let[C]=x;C&&C.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var T;(T=m)==null||T.observe(t)})),n()}),c&&!d&&m.observe(c),m.observe(t));let p,w=d?ae(e):null;d&&v();function v(){const x=ae(e);w&&!It(w,x)&&n(),w=x,p=requestAnimationFrame(v)}return n(),()=>{var x;u.forEach(C=>{i&&C.removeEventListener("scroll",n),l&&C.removeEventListener("resize",n)}),g==null||g(),(x=m)==null||x.disconnect(),m=null,d&&cancelAnimationFrame(p)}}const ho=Wn,po=Nn,go=In,vo=kn,wo=Bn,yo=Vn,Bt=Mn,bo=(e,t,n)=>{const o=new Map,i={platform:uo,...n},l={...i.platform,_c:o};return Dn(e,t,{...i,platform:l})};function xo(e,t,n={}){const{offset:o="-4px"}=n,{middlewareData:i,placement:l,refs:r}=t;f.watch(e,u=>{r.arrowEl.value=u});const a=f.computed(()=>{var u;return((u=i.value.arrow)==null?void 0:u.x)??0}),d=f.computed(()=>{var u;return((u=i.value.arrow)==null?void 0:u.y)??0}),c=f.computed(()=>{if(!(e.value||r.arrowEl.value)||!i.value.arrow)return{};const g=f.toValue(l).split("-")[0],h=a.value,m=d.value;return g==="bottom"?{"inset-inline-start":`${h}px`,"inset-block-start":o}:g==="top"?{"inset-inline-start":`${h}px`,"inset-block-end":o}:g==="right"?{"inset-block-start":`${m}px`,"inset-inline-start":o}:g==="left"?{"inset-block-start":`${m}px`,"inset-inline-end":o}:{}});return{arrowX:a,arrowY:d,arrowStyles:c}}function Eo(e){return{name:"arrow",options:e,fn(t){const n=f.toValue(e.element);return n==null?{}:Bt({element:n,padding:e.padding}).fn(t)}}}function it(e,t,n={}){const{transform:o=!0,middlewares:i,autoUpdate:l=!0,open:r=f.ref(!1)}=n,a=y=>{r.value=y},d=f.computed(()=>f.toValue(n.placement)??"bottom"),c=f.computed(()=>f.toValue(n.strategy)??"absolute"),u=f.ref(0),g=f.ref(0),h=f.ref(d.value),m=f.ref(c.value),p=f.shallowRef({}),w=f.ref(!1),v=f.ref(null),x=f.computed(()=>{const y=f.toValue(i)||[];return v.value&&!y.some(P=>P.name==="arrow")?[...y,Eo({element:v})]:y}),C=async()=>{if(!e.value||!t.value)return;const y=await bo(e.value,t.value,{placement:d.value,strategy:c.value,middleware:x.value});u.value=y.x,g.value=y.y,h.value=y.placement,m.value=y.strategy,p.value=y.middlewareData,w.value=r.value};f.watch([d,c,x],()=>{r.value&&C()});let T;f.watch([e,t,r],([y,E,P])=>{!P||!y||!E||(l&&(T=mo(y,E,C,typeof l=="object"?l:void 0)),f.onWatcherCleanup(()=>{T==null||T(),T=void 0}))},{immediate:!0}),f.onScopeDispose(()=>T==null?void 0:T()),f.watch(r,y=>{y||(w.value=!1)});const S=f.ref({position:c.value,left:"0",top:"0"});return f.watch([u,g,()=>f.toValue(o)],([y,E,P])=>{const N=t.value;if(!N)return;const R={position:m.value,left:"0",top:"0"},M=$t(N,y),k=$t(N,E);P?S.value={...R,transform:`translate(${M}px, ${k}px)`,...jt(N)>=1.5&&{"will-change":"transform"}}:S.value={...R,left:`${M}px`,top:`${k}px`}},{immediate:!0}),{x:u,y:g,strategy:m,placement:h,middlewareData:p,isPositioned:w,floatingStyles:S,update:C,refs:{anchorEl:e,floatingEl:t,arrowEl:v},open:r,setOpen:a}}function $t(e,t){const n=jt(e);return Math.round(t*n)/n}function jt(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Co(e,t,n={},o={}){const{...i}=n,l=it(e,t,i),r=Xt(l,o);return{...r,addNode:(g,h,m={})=>{const{parentId:p,...w}=m,v=it(g,h,w);return r.addNode(v,p)},getAllOpenNodes:()=>{const g=[];for(const h of r.nodeMap.values())h.data.open.value&&g.push(h);return g},getTopmostOpenNode:()=>{let g=null,h=-1;for(const m of r.nodeMap.values())if(m.data.open.value){const p=m.getPath().length;p>h&&(h=p,g=m)}return g},applyToNodes:(g,h,m={})=>{const{relationship:p="self-and-children",applyToMatching:w=!0}=m,v=r.findNodeById(g);if(!v)return;const x=[],C=new Set,T=y=>{y&&!C.has(y.id)&&(x.push(y),C.add(y.id))},S=y=>{for(const E of y)T(E)};if(p==="ancestors-only")for(const y of v.getPath())y.id!==v.id&&T(y);else if(p==="siblings-only"){if(v.parent.value)for(const y of v.parent.value.children.value)y.id!==v.id&&T(y)}else if(p==="descendants-only")for(const y of r.traverse("dfs",v))y.id!==v.id&&T(y);else if(p==="children-only")S(v.children.value);else if(p==="self-and-ancestors")S(v.getPath());else if(p==="self-and-children")T(v),S(v.children.value);else if(p==="self-and-descendants")S(r.traverse("dfs",v));else if(p==="self-and-siblings")T(v),v.parent.value&&S(v.parent.value.children.value);else if(p==="self-ancestors-and-children")S(v.getPath()),S(v.children.value);else if(p==="full-branch")S(v.getPath()),S(r.traverse("dfs",v));else if(p==="all-except-branch"){const y=new Set;for(const E of v.getPath())y.add(E.id);for(const E of r.traverse("dfs",v))y.add(E.id);for(const E of r.nodeMap.values())!y.has(E.id)===w&&h(E);return}else{console.warn(`applyToNodes: Unknown relationship "${p}".`);return}if(w)for(const y of x)h(y);else for(const y of r.nodeMap.values())C.has(y.id)||h(y)}}}function rt(e,t=null,n={},o=!1){const i=n.id??pn(),l=f.shallowRef(t),r=f.shallowRef([]),a=f.computed(()=>r.value.length===0),d={id:i,data:e,parent:l,children:r,isRoot:o,isLeaf:a,addChild:c=>{r.value=[...r.value,c]},_removeChildInstance:c=>r.value.includes(c)?(r.value=r.value.filter(u=>u.id!==c.id),c.parent.value=null,!0):!1,findChild:c=>r.value.find(c)??null,findDescendant:c=>{const u=[d];for(;u.length>0;){const g=u.pop();if(c(g))return g;for(let h=g.children.value.length-1;h>=0;h--)u.push(g.children.value[h])}return null},isDescendantOf:c=>{let u=l.value;for(;u;){if(u.id===c.id)return!0;u=u.parent.value}return!1},getPath:()=>{const c=[];let u=d;for(;u;)c.push(u),u=u.parent.value;return c.reverse()}};return Object.freeze(d)}function Xt(e,t){const n=(t==null?void 0:t.deleteStrategy)??"recursive",o=f.shallowReactive(new Map),i=rt(e,null,{},!0);o.set(i.id,i);const l=h=>o.get(h)??null,r=(h,m=null,p={})=>{const w=m?l(m):i;if(!w)return console.error(`Tree addNode: Parent node with ID ${m} not found.`),null;p.id&&o.has(p.id)&&(p.id=void 0);const v=rt(h,w,p);return o.set(v.id,v),w.addChild(v),v},a=(h,m)=>{const p=m??n,w=l(h);if(!w)return!1;if(w.isRoot)return console.error("Tree removeNode: Cannot remove the root node."),!1;const v=w.parent.value;if(p==="recursive")g(w);else{for(const x of w.children.value)x.parent.value=null;w.children.value=[],o.delete(w.id)}return v._removeChildInstance(w)},d=(h,m)=>{const p=l(h);if(!p)return console.error(`Tree moveNode: Node with ID ${h} not found.`),!1;if(p.isRoot)return console.error("Tree moveNode: Cannot move the root node."),!1;if(h===m)return console.error("Tree moveNode: Cannot move a node to be a child of itself."),!1;const w=m?l(m):i;if(!w)return console.error(`Tree moveNode: New parent node with ID ${m} not found.`),!1;if(w.isDescendantOf(p))return console.error("Tree moveNode: Cannot move a node to become its own descendant."),!1;const v=p.parent.value;if(v){if(!v._removeChildInstance(p))return console.error("Tree moveNode: Failed to remove node from its original parent."),!1}else if(p.isRoot){if(p.isRoot)return console.error("Tree moveNode: Attempting to move the root node, which is not allowed."),!1}return w.addChild(p),p.parent.value=w,!0},c=(h="dfs",m=i)=>{const p=[];if(!m)return console.warn("Tree traverse: Start node is null, returning empty array."),p;if(h==="dfs"){const w=[m];for(;w.length>0;){const v=w.pop();p.push(v);for(let x=v.children.value.length-1;x>=0;x--)w.push(v.children.value[x])}}else{const w=[m];for(;w.length>0;){const v=w.shift();p.push(v);for(const x of v.children.value)w.push(x)}}return p},u=()=>{o.clear()},g=h=>{const m=[...h.children.value];for(const p of m)g(p);o.delete(h.id),h.children.value=[]};return Object.freeze({get root(){return i},get nodeMap(){return o},findNodeById:l,addNode:r,removeNode:a,moveNode:d,traverse:c,dispose:u})}A.arrow=Bt,A.autoPlacement=po,A.clearTimeoutIfSet=Ke,A.contains=Oe,A.createTree=Xt,A.createTreeNode=rt,A.findDescendantContainingTarget=Pe,A.flip=vo,A.getContextFromParameter=Ee,A.getCurrentTime=Ue,A.getTarget=ct,A.hide=yo,A.isButtonTarget=Ye,A.isClickOnScrollbar=at,A.isEventTargetWithin=ze,A.isHTMLElement=lt,A.isMac=Be,A.isMouseLikePointerType=je,A.isSafari=$e,A.isSpaceIgnored=_e,A.isTargetWithinElement=z,A.isTreeNode=ut,A.isTypeableElement=Xe,A.isVirtualElement=nn,A.matchesFocusVisible=st,A.offset=ho,A.shift=go,A.size=wo,A.useArrow=xo,A.useClick=on,A.useClientPoint=an,A.useEscapeKey=cn,A.useFloating=it,A.useFloatingTree=Co,A.useFocus=dn,A.useHover=yn,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(X,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],s):(X=typeof globalThis<"u"?globalThis:X||self,s(X.VFloat={},X.Vue))})(this,(function(X,s){"use strict";var gr=Object.defineProperty;var vr=(X,s,Re)=>s in X?gr(X,s,{enumerable:!0,configurable:!0,writable:!0,value:Re}):X[s]=Re;var He=(X,s,Re)=>vr(X,typeof s!="symbol"?s+"":s,Re);function Re(t,e,n={}){const{offset:o="-4px"}=n,{middlewareData:r,placement:a,refs:i}=e;s.watch(t,d=>{i.arrowEl.value=d});const c=s.computed(()=>{var d;return((d=r.value.arrow)==null?void 0:d.x)??0}),h=s.computed(()=>{var d;return((d=r.value.arrow)==null?void 0:d.y)??0}),l=s.computed(()=>{if(!(t.value||i.arrowEl.value)||!r.value.arrow)return{};const u=s.toValue(a).split("-")[0],p=c.value,m=h.value;return u==="bottom"?{"inset-inline-start":`${p}px`,"inset-block-start":o}:u==="top"?{"inset-inline-start":`${p}px`,"inset-block-end":o}:u==="right"?{"inset-block-start":`${m}px`,"inset-inline-start":o}:u==="left"?{"inset-block-start":`${m}px`,"inset-inline-end":o}:{}});return{arrowX:c,arrowY:h,arrowStyles:l}}let vn=0;function Et(){return s.useId()||`id-${++vn}`}function We(t){return t instanceof Element&&t instanceof HTMLElement}function wn(){return typeof navigator>"u"?!1:navigator.platform.toUpperCase().indexOf("MAC")>=0}function bn(){return typeof navigator>"u"?!1:/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function yn(t){return typeof(t==null?void 0:t.matches)!="function"?!1:t.matches(":focus-visible")}function xt(t,e){if(t===void 0)return!1;const n=t==="mouse";return e?n:n||t==="pen"}function lt(t){return!t||!(t instanceof HTMLElement)?!1:t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t.isContentEditable&&t.contentEditable!=="false"}function Ct(t){const e=t.target;return e instanceof HTMLElement?e.tagName==="BUTTON"||e.tagName==="INPUT"&&e.getAttribute("type")==="button"||e.getAttribute("role")==="button":!1}function Tt(t){return lt(t)}function St(t,e){return e?"composedPath"in t&&typeof t.composedPath=="function"?t.composedPath().includes(e):e.contains(t.target):!1}function En(t,e){const n=e.getBoundingClientRect(),o=e.offsetWidth-e.clientWidth,r=e.offsetHeight-e.clientHeight,a=t.clientX-n.left,i=t.clientY-n.top;if(o>0){const c=e.clientWidth;if(a>=c&&a<=e.offsetWidth)return!0}if(r>0){const c=e.clientHeight;if(i>=c&&i<=e.offsetHeight)return!0}return!1}function st(t,e){return t.contains(e)}function xn(t){return t.target}function At(){return typeof performance<"u"?performance.now():Date.now()}function Ot(t){t!==-1&&clearTimeout(t)}function Cn(t){return t!==null&&typeof t=="object"&&"data"in t&&"id"in t&&"children"in t&&"parent"in t}function Be(t){return Cn(t)?{floatingContext:t.data,treeContext:t}:{floatingContext:t,treeContext:null}}function le(t,e){if(!e)return!1;if(typeof e=="object"&&e!==null&&"contextElement"in e){const n=e.contextElement;return n instanceof Element?n.contains(t):!1}return e instanceof Element?e.contains(t):!1}function Ue(t,e){for(const n of t.children.value)if(n.data.open.value){if(le(e,n.data.refs.anchorEl.value)||le(e,n.data.refs.floatingEl.value))return n;const o=Ue(n,e);if(o)return o}return null}const _e=t=>typeof t=="number"&&Number.isFinite(t)?t:null,De=class De{create(e){const n=this.buildConfiguration(e);return{contextElement:n.referenceElement||void 0,getBoundingClientRect:()=>this.buildBoundingRect(n)}}buildConfiguration(e){return{coordinates:e.coordinates,referenceElement:e.referenceElement??null,baselineCoordinates:e.baselineCoordinates??null,axis:e.axis??"both"}}buildBoundingRect(e){const n=this.getReferenceRect(e.referenceElement),o=this.resolvePosition(e,n),r=this.calculateSize(e.axis,n);return this.buildDOMRect({x:o.x,y:o.y,width:r.width,height:r.height})}getReferenceRect(e){if(e)try{return e.getBoundingClientRect()}catch(n){console.warn("VirtualElementFactory: Failed to get element bounds",{element:e,error:n})}return this.buildDOMRect({x:0,y:0,width:De.DEFAULT_DIMENSIONS.width,height:De.DEFAULT_DIMENSIONS.height})}resolvePosition(e,n){var o,r;return{x:this.resolveAxisCoordinate({current:e.coordinates.x,baseline:((o=e.baselineCoordinates)==null?void 0:o.x)??null,fallback:n.x,isAxisEnabled:e.axis==="x"||e.axis==="both"}),y:this.resolveAxisCoordinate({current:e.coordinates.y,baseline:((r=e.baselineCoordinates)==null?void 0:r.y)??null,fallback:n.y,isAxisEnabled:e.axis==="y"||e.axis==="both"})}}resolveAxisCoordinate(e){const{current:n,baseline:o,fallback:r,isAxisEnabled:a}=e;return a&&n!==null?n:o!==null?o:r}calculateSize(e,n){const o=(r,a)=>Math.max(0,r||a);switch(e){case"both":return{width:0,height:0};case"x":return{width:o(n.width,De.DEFAULT_DIMENSIONS.width),height:0};case"y":return{width:0,height:o(n.height,De.DEFAULT_DIMENSIONS.height)}}}buildDOMRect(e){const{x:n,y:o,width:r,height:a}=e,i=Math.max(0,r),c=Math.max(0,a);return{x:n,y:o,width:i,height:c,top:o,right:n+i,bottom:o+c,left:n,toJSON:()=>({x:n,y:o,width:i,height:c})}}};He(De,"DEFAULT_DIMENSIONS",{width:100,height:30});let je=De;class at{constructor(){He(this,"lastKnownCoordinates",null)}getCoordinatesForOpening(){return this.lastKnownCoordinates}onClose(){this.lastKnownCoordinates=null}reset(){this.lastKnownCoordinates=null}}class Lt extends at{constructor(){super(...arguments);He(this,"name","follow")}getRequiredEvents(){return["pointerdown","pointermove","pointerenter"]}process(n,o){const r=n.coordinates;switch(this.lastKnownCoordinates=r,n.type){case"pointerdown":return r;case"pointermove":return o.isOpen&&xt(n.originalEvent.pointerType,!0)?r:null;case"pointerenter":return r;default:return null}}}class Dt extends at{constructor(){super(...arguments);He(this,"name","static");He(this,"triggerCoordinates",null)}getRequiredEvents(){return["pointerdown"]}process(n,o){const r=n.coordinates;return this.triggerCoordinates=r,this.lastKnownCoordinates=r,o.isOpen?r:null}getCoordinatesForOpening(){return this.triggerCoordinates?this.triggerCoordinates:this.lastKnownCoordinates}reset(){super.reset(),this.triggerCoordinates=null}onClose(){this.triggerCoordinates=null}}function Tn(t,e,n={}){const{open:o,refs:r}=e,a=new je,i=s.ref({x:null,y:null}),c=s.ref(null),h=s.computed(()=>s.toValue(n.axis??"both")),l=s.computed(()=>s.toValue(n.enabled??!0)),d=s.computed(()=>_e(s.toValue(n.x??null))),u=s.computed(()=>_e(s.toValue(n.y??null))),p=s.computed(()=>d.value!==null&&u.value!==null),m=s.computed(()=>p.value?{x:d.value,y:u.value}:i.value),w=s.computed(()=>{const C=m.value;switch(h.value){case"x":return{x:C.x,y:null};case"y":return{x:null,y:C.y};case"both":return C}}),b=(n.trackingMode??"follow")==="follow"?new Lt:new Dt,v=(C,P)=>{p.value||(i.value={x:_e(C),y:_e(P)})},g=()=>{p.value||(i.value={x:null,y:null})},E=(C,P)=>{const K={type:P,coordinates:{x:C.clientX,y:C.clientY},originalEvent:C},N=b.process(K,{isOpen:o.value});N&&v(N.x,N.y)};s.watch([w,c,h,t],()=>{r.anchorEl.value=a.create({coordinates:w.value,referenceElement:t.value,baselineCoordinates:c.value,axis:h.value})},{immediate:!0}),s.watch(o,C=>{if(!(!l.value||p.value))if(C){const P=b.getCoordinatesForOpening();P?(v(P.x,P.y),c.value={...P}):c.value={...i.value}}else b.onClose(),g(),c.value=null});const L=C=>{E(C,"pointerdown")},R=C=>{E(C,"pointerenter")},D=C=>{E(C,"pointermove")};return s.watchEffect(()=>{if(p.value||!l.value)return;const C=t.value;if(!C)return;const P=b.getRequiredEvents(),K={pointerenter:R,pointerdown:L,pointermove:D};P.forEach(N=>{const V=K[N];V&&C.addEventListener(N,V)}),s.onWatcherCleanup(()=>{P.forEach(N=>{const V=K[N];V&&C.removeEventListener(N,V)})})}),{coordinates:s.readonly(w),updatePosition:(C,P)=>v(C,P)}}const Pt=["top","right","bottom","left"],Rt=["start","end"],Mt=Pt.reduce((t,e)=>t.concat(e,e+"-"+Rt[0],e+"-"+Rt[1]),[]),xe=Math.min,se=Math.max,qe=Math.round,Ge=Math.floor,ge=t=>({x:t,y:t}),Sn={left:"right",right:"left",bottom:"top",top:"bottom"},An={start:"end",end:"start"};function ct(t,e,n){return se(t,xe(e,n))}function Ce(t,e){return typeof t=="function"?t(e):t}function ve(t){return t.split("-")[0]}function fe(t){return t.split("-")[1]}function Vt(t){return t==="x"?"y":"x"}function ut(t){return t==="y"?"height":"width"}const On=new Set(["top","bottom"]);function Ee(t){return On.has(ve(t))?"y":"x"}function ft(t){return Vt(Ee(t))}function Ft(t,e,n){n===void 0&&(n=!1);const o=fe(t),r=ft(t),a=ut(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(i=Je(i)),[i,Je(i)]}function Ln(t){const e=Je(t);return[Ze(t),e,Ze(e)]}function Ze(t){return t.replace(/start|end/g,e=>An[e])}const Nt=["left","right"],It=["right","left"],Dn=["top","bottom"],Pn=["bottom","top"];function Rn(t,e,n){switch(t){case"top":case"bottom":return n?e?It:Nt:e?Nt:It;case"left":case"right":return e?Dn:Pn;default:return[]}}function Mn(t,e,n,o){const r=fe(t);let a=Rn(ve(t),n==="start",o);return r&&(a=a.map(i=>i+"-"+r),e&&(a=a.concat(a.map(Ze)))),a}function Je(t){return t.replace(/left|right|bottom|top/g,e=>Sn[e])}function Vn(t){return{top:0,right:0,bottom:0,left:0,...t}}function kt(t){return typeof t!="number"?Vn(t):{top:t,right:t,bottom:t,left:t}}function Qe(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function Ht(t,e,n){let{reference:o,floating:r}=t;const a=Ee(e),i=ft(e),c=ut(i),h=ve(e),l=a==="y",d=o.x+o.width/2-r.width/2,u=o.y+o.height/2-r.height/2,p=o[c]/2-r[c]/2;let m;switch(h){case"top":m={x:d,y:o.y-r.height};break;case"bottom":m={x:d,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:u};break;case"left":m={x:o.x-r.width,y:u};break;default:m={x:o.x,y:o.y}}switch(fe(e)){case"start":m[i]-=p*(n&&l?-1:1);break;case"end":m[i]+=p*(n&&l?-1:1);break}return m}const Fn=async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:a=[],platform:i}=n,c=a.filter(Boolean),h=await(i.isRTL==null?void 0:i.isRTL(e));let l=await i.getElementRects({reference:t,floating:e,strategy:r}),{x:d,y:u}=Ht(l,o,h),p=o,m={},w=0;for(let b=0;b<c.length;b++){const{name:v,fn:g}=c[b],{x:E,y:L,data:R,reset:D}=await g({x:d,y:u,initialPlacement:o,placement:p,strategy:r,middlewareData:m,rects:l,platform:i,elements:{reference:t,floating:e}});d=E??d,u=L??u,m={...m,[v]:{...m[v],...R}},D&&w<=50&&(w++,typeof D=="object"&&(D.placement&&(p=D.placement),D.rects&&(l=D.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:r}):D.rects),{x:d,y:u}=Ht(l,p,h)),b=-1)}return{x:d,y:u,placement:p,strategy:r,middlewareData:m}};async function Me(t,e){var n;e===void 0&&(e={});const{x:o,y:r,platform:a,rects:i,elements:c,strategy:h}=t,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:m=0}=Ce(e,t),w=kt(m),v=c[p?u==="floating"?"reference":"floating":u],g=Qe(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(v)))==null||n?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:l,rootBoundary:d,strategy:h})),E=u==="floating"?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,L=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),R=await(a.isElement==null?void 0:a.isElement(L))?await(a.getScale==null?void 0:a.getScale(L))||{x:1,y:1}:{x:1,y:1},D=Qe(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:E,offsetParent:L,strategy:h}):E);return{top:(g.top-D.top+w.top)/R.y,bottom:(D.bottom-g.bottom+w.bottom)/R.y,left:(g.left-D.left+w.left)/R.x,right:(D.right-g.right+w.right)/R.x}}const Nn=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:r,rects:a,platform:i,elements:c,middlewareData:h}=e,{element:l,padding:d=0}=Ce(t,e)||{};if(l==null)return{};const u=kt(d),p={x:n,y:o},m=ft(r),w=ut(m),b=await i.getDimensions(l),v=m==="y",g=v?"top":"left",E=v?"bottom":"right",L=v?"clientHeight":"clientWidth",R=a.reference[w]+a.reference[m]-p[m]-a.floating[w],D=p[m]-a.reference[m],C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let P=C?C[L]:0;(!P||!await(i.isElement==null?void 0:i.isElement(C)))&&(P=c.floating[L]||a.floating[w]);const K=R/2-D/2,N=P/2-b[w]/2-1,V=xe(u[g],N),H=xe(u[E],N),Y=V,z=P-b[w]-H,B=P/2-b[w]/2+K,T=ct(Y,B,z),f=!h.arrow&&fe(r)!=null&&B!==T&&a.reference[w]/2-(B<Y?V:H)-b[w]/2<0,W=f?B<Y?B-Y:B-z:0;return{[m]:p[m]+W,data:{[m]:T,centerOffset:B-T-W,...f&&{alignmentOffset:W}},reset:f}}});function In(t,e,n){return(t?[...n.filter(r=>fe(r)===t),...n.filter(r=>fe(r)!==t)]:n.filter(r=>ve(r)===r)).filter(r=>t?fe(r)===t||(e?Ze(r)!==r:!1):!0)}const kn=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,r;const{rects:a,middlewareData:i,placement:c,platform:h,elements:l}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:p=Mt,autoAlignment:m=!0,...w}=Ce(t,e),b=u!==void 0||p===Mt?In(u||null,m,p):p,v=await Me(e,w),g=((n=i.autoPlacement)==null?void 0:n.index)||0,E=b[g];if(E==null)return{};const L=Ft(E,a,await(h.isRTL==null?void 0:h.isRTL(l.floating)));if(c!==E)return{reset:{placement:b[0]}};const R=[v[ve(E)],v[L[0]],v[L[1]]],D=[...((o=i.autoPlacement)==null?void 0:o.overflows)||[],{placement:E,overflows:R}],C=b[g+1];if(C)return{data:{index:g+1,overflows:D},reset:{placement:C}};const P=D.map(V=>{const H=fe(V.placement);return[V.placement,H&&d?V.overflows.slice(0,2).reduce((Y,z)=>Y+z,0):V.overflows[0],V.overflows]}).sort((V,H)=>V[1]-H[1]),N=((r=P.filter(V=>V[2].slice(0,fe(V[0])?2:3).every(H=>H<=0))[0])==null?void 0:r[0])||P[0][0];return N!==c?{data:{index:g+1,overflows:D},reset:{placement:N}}:{}}}},Hn=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:a,rects:i,initialPlacement:c,platform:h,elements:l}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:b=!0,...v}=Ce(t,e);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const g=ve(r),E=Ee(c),L=ve(c)===c,R=await(h.isRTL==null?void 0:h.isRTL(l.floating)),D=p||(L||!b?[Je(c)]:Ln(c)),C=w!=="none";!p&&C&&D.push(...Mn(c,b,w,R));const P=[c,...D],K=await Me(e,v),N=[];let V=((o=a.flip)==null?void 0:o.overflows)||[];if(d&&N.push(K[g]),u){const B=Ft(r,i,R);N.push(K[B[0]],K[B[1]])}if(V=[...V,{placement:r,overflows:N}],!N.every(B=>B<=0)){var H,Y;const B=(((H=a.flip)==null?void 0:H.index)||0)+1,T=P[B];if(T&&(!(u==="alignment"?E!==Ee(T):!1)||V.every(y=>Ee(y.placement)===E?y.overflows[0]>0:!0)))return{data:{index:B,overflows:V},reset:{placement:T}};let f=(Y=V.filter(W=>W.overflows[0]<=0).sort((W,y)=>W.overflows[1]-y.overflows[1])[0])==null?void 0:Y.placement;if(!f)switch(m){case"bestFit":{var z;const W=(z=V.filter(y=>{if(C){const U=Ee(y.placement);return U===E||U==="y"}return!0}).map(y=>[y.placement,y.overflows.filter(U=>U>0).reduce((U,ne)=>U+ne,0)]).sort((y,U)=>y[1]-U[1])[0])==null?void 0:z[0];W&&(f=W);break}case"initialPlacement":f=c;break}if(r!==f)return{reset:{placement:f}}}return{}}}};function Wt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Bt(t){return Pt.some(e=>t[e]>=0)}const Wn=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:o="referenceHidden",...r}=Ce(t,e);switch(o){case"referenceHidden":{const a=await Me(e,{...r,elementContext:"reference"}),i=Wt(a,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Bt(i)}}}case"escaped":{const a=await Me(e,{...r,altBoundary:!0}),i=Wt(a,n.floating);return{data:{escapedOffsets:i,escaped:Bt(i)}}}default:return{}}}}},Bn=new Set(["left","top"]);async function $n(t,e){const{placement:n,platform:o,elements:r}=t,a=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=ve(n),c=fe(n),h=Ee(n)==="y",l=Bn.has(i)?-1:1,d=a&&h?-1:1,u=Ce(e,t);let{mainAxis:p,crossAxis:m,alignmentAxis:w}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof w=="number"&&(m=c==="end"?w*-1:w),h?{x:m*d,y:p*l}:{x:p*l,y:m*d}}const Kn=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:a,placement:i,middlewareData:c}=e,h=await $n(e,t);return i===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+h.x,y:a+h.y,data:{...h,placement:i}}}}},zn=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r}=e,{mainAxis:a=!0,crossAxis:i=!1,limiter:c={fn:v=>{let{x:g,y:E}=v;return{x:g,y:E}}},...h}=Ce(t,e),l={x:n,y:o},d=await Me(e,h),u=Ee(ve(r)),p=Vt(u);let m=l[p],w=l[u];if(a){const v=p==="y"?"top":"left",g=p==="y"?"bottom":"right",E=m+d[v],L=m-d[g];m=ct(E,m,L)}if(i){const v=u==="y"?"top":"left",g=u==="y"?"bottom":"right",E=w+d[v],L=w-d[g];w=ct(E,w,L)}const b=c.fn({...e,[p]:m,[u]:w});return{...b,data:{x:b.x-n,y:b.y-o,enabled:{[p]:a,[u]:i}}}}}},Xn=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:r,rects:a,platform:i,elements:c}=e,{apply:h=()=>{},...l}=Ce(t,e),d=await Me(e,l),u=ve(r),p=fe(r),m=Ee(r)==="y",{width:w,height:b}=a.floating;let v,g;u==="top"||u==="bottom"?(v=u,g=p===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(g=u,v=p==="end"?"top":"bottom");const E=b-d.top-d.bottom,L=w-d.left-d.right,R=xe(b-d[v],E),D=xe(w-d[g],L),C=!e.middlewareData.shift;let P=R,K=D;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(K=L),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(P=E),C&&!p){const V=se(d.left,0),H=se(d.right,0),Y=se(d.top,0),z=se(d.bottom,0);m?K=w-2*(V!==0||H!==0?V+H:se(d.left,d.right)):P=b-2*(Y!==0||z!==0?Y+z:se(d.top,d.bottom))}await h({...e,availableWidth:K,availableHeight:P});const N=await i.getDimensions(c.floating);return w!==N.width||b!==N.height?{reset:{rects:!0}}:{}}}};function et(){return typeof window<"u"}function Ve(t){return $t(t)?(t.nodeName||"").toLowerCase():"#document"}function ae(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function we(t){var e;return(e=($t(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function $t(t){return et()?t instanceof Node||t instanceof ae(t).Node:!1}function de(t){return et()?t instanceof Element||t instanceof ae(t).Element:!1}function be(t){return et()?t instanceof HTMLElement||t instanceof ae(t).HTMLElement:!1}function Kt(t){return!et()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ae(t).ShadowRoot}const Yn=new Set(["inline","contents"]);function $e(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=he(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!Yn.has(r)}const Un=new Set(["table","td","th"]);function _n(t){return Un.has(Ve(t))}const jn=[":popover-open",":modal"];function tt(t){return jn.some(e=>{try{return t.matches(e)}catch{return!1}})}const qn=["transform","translate","scale","rotate","perspective"],Gn=["transform","translate","scale","rotate","perspective","filter"],Zn=["paint","layout","strict","content"];function dt(t){const e=ht(),n=de(t)?he(t):t;return qn.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||Gn.some(o=>(n.willChange||"").includes(o))||Zn.some(o=>(n.contain||"").includes(o))}function Jn(t){let e=Te(t);for(;be(e)&&!Fe(e);){if(dt(e))return e;if(tt(e))return null;e=Te(e)}return null}function ht(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Qn=new Set(["html","body","#document"]);function Fe(t){return Qn.has(Ve(t))}function he(t){return ae(t).getComputedStyle(t)}function nt(t){return de(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Te(t){if(Ve(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Kt(t)&&t.host||we(t);return Kt(e)?e.host:e}function zt(t){const e=Te(t);return Fe(e)?t.ownerDocument?t.ownerDocument.body:t.body:be(e)&&$e(e)?e:zt(e)}function Ke(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=zt(t),a=r===((o=t.ownerDocument)==null?void 0:o.body),i=ae(r);if(a){const c=pt(i);return e.concat(i,i.visualViewport||[],$e(r)?r:[],c&&n?Ke(c):[])}return e.concat(r,Ke(r,[],n))}function pt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Xt(t){const e=he(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=be(t),a=r?t.offsetWidth:n,i=r?t.offsetHeight:o,c=qe(n)!==a||qe(o)!==i;return c&&(n=a,o=i),{width:n,height:o,$:c}}function mt(t){return de(t)?t:t.contextElement}function Ne(t){const e=mt(t);if(!be(e))return ge(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:a}=Xt(e);let i=(a?qe(n.width):n.width)/o,c=(a?qe(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const eo=ge(0);function Yt(t){const e=ae(t);return!ht()||!e.visualViewport?eo:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function to(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==ae(t)?!1:e}function Oe(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),a=mt(t);let i=ge(1);e&&(o?de(o)&&(i=Ne(o)):i=Ne(t));const c=to(a,n,o)?Yt(a):ge(0);let h=(r.left+c.x)/i.x,l=(r.top+c.y)/i.y,d=r.width/i.x,u=r.height/i.y;if(a){const p=ae(a),m=o&&de(o)?ae(o):o;let w=p,b=pt(w);for(;b&&o&&m!==w;){const v=Ne(b),g=b.getBoundingClientRect(),E=he(b),L=g.left+(b.clientLeft+parseFloat(E.paddingLeft))*v.x,R=g.top+(b.clientTop+parseFloat(E.paddingTop))*v.y;h*=v.x,l*=v.y,d*=v.x,u*=v.y,h+=L,l+=R,w=ae(b),b=pt(w)}}return Qe({width:d,height:u,x:h,y:l})}function ot(t,e){const n=nt(t).scrollLeft;return e?e.left+n:Oe(we(t)).left+n}function Ut(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-ot(t,n),r=n.top+e.scrollTop;return{x:o,y:r}}function no(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const a=r==="fixed",i=we(o),c=e?tt(e.floating):!1;if(o===i||c&&a)return n;let h={scrollLeft:0,scrollTop:0},l=ge(1);const d=ge(0),u=be(o);if((u||!u&&!a)&&((Ve(o)!=="body"||$e(i))&&(h=nt(o)),be(o))){const m=Oe(o);l=Ne(o),d.x=m.x+o.clientLeft,d.y=m.y+o.clientTop}const p=i&&!u&&!a?Ut(i,h):ge(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-h.scrollLeft*l.x+d.x+p.x,y:n.y*l.y-h.scrollTop*l.y+d.y+p.y}}function oo(t){return Array.from(t.getClientRects())}function ro(t){const e=we(t),n=nt(t),o=t.ownerDocument.body,r=se(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),a=se(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+ot(t);const c=-n.scrollTop;return he(o).direction==="rtl"&&(i+=se(e.clientWidth,o.clientWidth)-r),{width:r,height:a,x:i,y:c}}const _t=25;function io(t,e){const n=ae(t),o=we(t),r=n.visualViewport;let a=o.clientWidth,i=o.clientHeight,c=0,h=0;if(r){a=r.width,i=r.height;const d=ht();(!d||d&&e==="fixed")&&(c=r.offsetLeft,h=r.offsetTop)}const l=ot(o);if(l<=0){const d=o.ownerDocument,u=d.body,p=getComputedStyle(u),m=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,w=Math.abs(o.clientWidth-u.clientWidth-m);w<=_t&&(a-=w)}else l<=_t&&(a+=l);return{width:a,height:i,x:c,y:h}}const lo=new Set(["absolute","fixed"]);function so(t,e){const n=Oe(t,!0,e==="fixed"),o=n.top+t.clientTop,r=n.left+t.clientLeft,a=be(t)?Ne(t):ge(1),i=t.clientWidth*a.x,c=t.clientHeight*a.y,h=r*a.x,l=o*a.y;return{width:i,height:c,x:h,y:l}}function jt(t,e,n){let o;if(e==="viewport")o=io(t,n);else if(e==="document")o=ro(we(t));else if(de(e))o=so(e,n);else{const r=Yt(t);o={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return Qe(o)}function qt(t,e){const n=Te(t);return n===e||!de(n)||Fe(n)?!1:he(n).position==="fixed"||qt(n,e)}function ao(t,e){const n=e.get(t);if(n)return n;let o=Ke(t,[],!1).filter(c=>de(c)&&Ve(c)!=="body"),r=null;const a=he(t).position==="fixed";let i=a?Te(t):t;for(;de(i)&&!Fe(i);){const c=he(i),h=dt(i);!h&&c.position==="fixed"&&(r=null),(a?!h&&!r:!h&&c.position==="static"&&!!r&&lo.has(r.position)||$e(i)&&!h&&qt(t,i))?o=o.filter(d=>d!==i):r=c,i=Te(i)}return e.set(t,o),o}function co(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const i=[...n==="clippingAncestors"?tt(e)?[]:ao(e,this._c):[].concat(n),o],c=i[0],h=i.reduce((l,d)=>{const u=jt(e,d,r);return l.top=se(u.top,l.top),l.right=xe(u.right,l.right),l.bottom=xe(u.bottom,l.bottom),l.left=se(u.left,l.left),l},jt(e,c,r));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function uo(t){const{width:e,height:n}=Xt(t);return{width:e,height:n}}function fo(t,e,n){const o=be(e),r=we(e),a=n==="fixed",i=Oe(t,!0,a,e);let c={scrollLeft:0,scrollTop:0};const h=ge(0);function l(){h.x=ot(r)}if(o||!o&&!a)if((Ve(e)!=="body"||$e(r))&&(c=nt(e)),o){const m=Oe(e,!0,a,e);h.x=m.x+e.clientLeft,h.y=m.y+e.clientTop}else r&&l();a&&!o&&r&&l();const d=r&&!o&&!a?Ut(r,c):ge(0),u=i.left+c.scrollLeft-h.x-d.x,p=i.top+c.scrollTop-h.y-d.y;return{x:u,y:p,width:i.width,height:i.height}}function gt(t){return he(t).position==="static"}function Gt(t,e){if(!be(t)||he(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return we(t)===n&&(n=n.ownerDocument.body),n}function Zt(t,e){const n=ae(t);if(tt(t))return n;if(!be(t)){let r=Te(t);for(;r&&!Fe(r);){if(de(r)&&!gt(r))return r;r=Te(r)}return n}let o=Gt(t,e);for(;o&&_n(o)&&gt(o);)o=Gt(o,e);return o&&Fe(o)&&gt(o)&&!dt(o)?n:o||Jn(t)||n}const ho=async function(t){const e=this.getOffsetParent||Zt,n=this.getDimensions,o=await n(t.floating);return{reference:fo(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function po(t){return he(t).direction==="rtl"}const mo={convertOffsetParentRelativeRectToViewportRelativeRect:no,getDocumentElement:we,getClippingRect:co,getOffsetParent:Zt,getElementRects:ho,getClientRects:oo,getDimensions:uo,getScale:Ne,isElement:de,isRTL:po};function Jt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function go(t,e){let n=null,o;const r=we(t);function a(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function i(c,h){c===void 0&&(c=!1),h===void 0&&(h=1),a();const l=t.getBoundingClientRect(),{left:d,top:u,width:p,height:m}=l;if(c||e(),!p||!m)return;const w=Ge(u),b=Ge(r.clientWidth-(d+p)),v=Ge(r.clientHeight-(u+m)),g=Ge(d),L={rootMargin:-w+"px "+-b+"px "+-v+"px "+-g+"px",threshold:se(0,xe(1,h))||1};let R=!0;function D(C){const P=C[0].intersectionRatio;if(P!==h){if(!R)return i();P?i(!1,P):o=setTimeout(()=>{i(!1,1e-7)},1e3)}P===1&&!Jt(l,t.getBoundingClientRect())&&i(),R=!1}try{n=new IntersectionObserver(D,{...L,root:r.ownerDocument})}catch{n=new IntersectionObserver(D,L)}n.observe(t)}return i(!0),a}function vo(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:h=!1}=o,l=mt(t),d=r||a?[...l?Ke(l):[],...Ke(e)]:[];d.forEach(g=>{r&&g.addEventListener("scroll",n,{passive:!0}),a&&g.addEventListener("resize",n)});const u=l&&c?go(l,n):null;let p=-1,m=null;i&&(m=new ResizeObserver(g=>{let[E]=g;E&&E.target===l&&m&&(m.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var L;(L=m)==null||L.observe(e)})),n()}),l&&!h&&m.observe(l),m.observe(e));let w,b=h?Oe(t):null;h&&v();function v(){const g=Oe(t);b&&!Jt(b,g)&&n(),b=g,w=requestAnimationFrame(v)}return n(),()=>{var g;d.forEach(E=>{r&&E.removeEventListener("scroll",n),a&&E.removeEventListener("resize",n)}),u==null||u(),(g=m)==null||g.disconnect(),m=null,h&&cancelAnimationFrame(w)}}const wo=Kn,bo=kn,yo=zn,Eo=Hn,xo=Xn,Co=Wn,To=Nn,So=(t,e,n)=>{const o=new Map,r={platform:mo,...n},a={...r.platform,_c:o};return Fn(t,e,{...r,platform:a})};function Qt(t){return{name:"arrow",options:t,fn(e){const n=s.toValue(t.element);return n==null?{}:To({element:n,padding:t.padding}).fn(e)}}}function en(t,e,n={}){const{transform:o=!0,middlewares:r,autoUpdate:a=!0,open:i=s.ref(!1),onOpenChange:c}=n,h=(C,P,K)=>{if(i.value===C)return;i.value=C;const N=P??"programmatic";c==null||c(C,N,K)},l=s.computed(()=>s.toValue(n.placement)??"bottom"),d=s.computed(()=>s.toValue(n.strategy)??"absolute"),u=s.ref(0),p=s.ref(0),m=s.ref(l.value),w=s.ref(d.value),b=s.shallowRef({}),v=s.ref(!1),g=s.ref(null),E=s.computed(()=>{const C=s.toValue(r)||[];return g.value&&!C.some(K=>K.name==="arrow")?[...C,Qt({element:g})]:C}),L=async()=>{if(!(!t.value||!e.value))try{const C=await So(t.value,e.value,{placement:l.value,strategy:d.value,middleware:E.value});u.value=C.x,p.value=C.y,m.value=C.placement,w.value=C.strategy,b.value=C.middlewareData,v.value=i.value}catch{}};s.watch([l,d,E],()=>{i.value&&L()});let R;s.watch([t,e,i],([C,P,K])=>{!K||!C||!P||(a&&(R=vo(C,P,L,typeof a=="object"?a:void 0)),s.onWatcherCleanup(()=>{R==null||R(),R=void 0}))},{immediate:!0}),s.onScopeDispose(()=>R==null?void 0:R()),s.watch(i,C=>{C||(v.value=!1)});const D=s.ref({position:d.value,left:"0",top:"0"});return s.watch([u,p,()=>s.toValue(o)],([C,P,K])=>{const N=e.value;if(!N)return;const V={position:w.value,left:"0",top:"0"},H=tn(N,C),Y=tn(N,P);K?D.value={...V,transform:`translate(${H}px, ${Y}px)`,...nn(N)>=1.5&&{"will-change":"transform"}}:D.value={...V,left:`${H}px`,top:`${Y}px`}},{immediate:!0}),{id:n.id,x:u,y:p,strategy:w,placement:m,middlewareData:b,isPositioned:v,floatingStyles:D,update:L,refs:{anchorEl:t,floatingEl:e,arrowEl:g},open:i,setOpen:h}}function tn(t,e){const n=nn(t);return Math.round(e*n)/n}function nn(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Ao(t={}){let e;return e=on(t),{...e,get root(){return e.root},addNode:(i,c,h={})=>{const{parentId:l,...d}=h,u=Et(),p=d.onOpenChange,m=en(i,c,{...d,id:u,onOpenChange:(b,v,g)=>{if(p==null||p(b,v,g),!b){const E=e.findNodeById(u);if(E){const L=E.children.value;for(const R of L)R.data.open.value&&R.data.setOpen(!1,"tree-ancestor-close",g)}}}});return e.addNode(m,l,{id:u})},getAllOpenNodes:()=>{const i=[];for(const c of e.nodeMap.values())c.data.open.value&&i.push(c);return i},getDeepestOpenNode:()=>{let i=null,c=-1;for(const h of e.nodeMap.values())if(h.data.open.value){const l=h.getPath().length;l>c&&(c=l,i=h)}return i},applyToNodes:(i,c,h={})=>{const{relationship:l="self-and-children",applyToMatching:d=!0}=h,u=e.findNodeById(i);if(!u)return;const p=[],m=new Set,w=v=>{v&&!m.has(v.id)&&(p.push(v),m.add(v.id))},b=v=>{for(const g of v)w(g)};if(l==="ancestors-only")for(const v of u.getPath())v.id!==u.id&&w(v);else if(l==="siblings-only"){if(u.parent.value)for(const v of u.parent.value.children.value)v.id!==u.id&&w(v)}else if(l==="descendants-only")for(const v of e.traverse("dfs",u))v.id!==u.id&&w(v);else if(l==="children-only")b(u.children.value);else if(l==="self-and-ancestors")b(u.getPath());else if(l==="self-and-children")w(u),b(u.children.value);else if(l==="self-and-descendants")b(e.traverse("dfs",u));else if(l==="self-and-siblings")w(u),u.parent.value&&b(u.parent.value.children.value);else if(l==="self-ancestors-and-children")b(u.getPath()),b(u.children.value);else if(l==="full-branch")b(u.getPath()),b(e.traverse("dfs",u));else if(l==="all-except-branch"){const v=new Set;for(const g of u.getPath())v.add(g.id);for(const g of e.traverse("dfs",u))v.add(g.id);for(const g of e.nodeMap.values())!v.has(g.id)===d&&c(g);return}else{console.warn(`applyToNodes: Unknown relationship "${l}".`);return}if(d)for(const v of p)c(v);else for(const v of e.nodeMap.values())m.has(v.id)||c(v)}}}function vt(t,e=null,n={},o=!1){const r=n.id??Et(),a=s.shallowRef(e),i=s.shallowRef([]),c=s.computed(()=>i.value.length===0),h={id:r,data:t,parent:a,children:i,isRoot:o,isLeaf:c,addChild:l=>{i.value=[...i.value,l]},_removeChildInstance:l=>i.value.includes(l)?(i.value=i.value.filter(d=>d.id!==l.id),l.parent.value=null,!0):!1,findChild:l=>i.value.find(l)??null,findDescendant:l=>{const d=[h];for(;d.length>0;){const u=d.pop();if(l(u))return u;for(let p=u.children.value.length-1;p>=0;p--)d.push(u.children.value[p])}return null},isDescendantOf:l=>{let d=a.value;for(;d;){if(d.id===l.id)return!0;d=d.parent.value}return!1},getPath:()=>{const l=[];let d=h;for(;d;)l.push(d),d=d.parent.value;return l.reverse()}};return Object.freeze(h)}function on(t){const e=(t==null?void 0:t.deleteStrategy)??"recursive",n=s.shallowReactive(new Map);let o=null;const r=u=>n.get(u)??null,a=(u,p=null,m={})=>{if(!o){if(p!=null)return console.error(`Tree addNode: Cannot add a non-root node before a root exists. Received parentId=${p}.`),null;const v=vt(u,null,m,!0);return n.set(v.id,v),o=v,v}const w=p?r(p):o;if(!w)return console.error(`Tree addNode: Parent node with ID ${p} not found.`),null;m.id&&n.has(m.id)&&(m.id=void 0);const b=vt(u,w,m);return n.set(b.id,b),w.addChild(b),b},i=(u,p)=>{const m=p??e,w=r(u);if(!w)return!1;if(w.isRoot)return console.error("Tree removeNode: Cannot remove the root node."),!1;const b=w.parent.value;if(m==="recursive")d(w);else{for(const v of w.children.value)v.parent.value=null;w.children.value=[],n.delete(w.id)}return b._removeChildInstance(w)},c=(u,p)=>{const m=r(u);if(!m)return console.error(`Tree moveNode: Node with ID ${u} not found.`),!1;if(m.isRoot)return console.error("Tree moveNode: Cannot move the root node."),!1;if(u===p)return console.error("Tree moveNode: Cannot move a node to be a child of itself."),!1;const w=p?r(p):o;if(!w)return console.error(`Tree moveNode: New parent node with ID ${p} not found.`),!1;if(w.isDescendantOf(m))return console.error("Tree moveNode: Cannot move a node to become its own descendant."),!1;const b=m.parent.value;if(b){if(!b._removeChildInstance(m))return console.error("Tree moveNode: Failed to remove node from its original parent."),!1}else if(m.isRoot){if(m.isRoot)return console.error("Tree moveNode: Attempting to move the root node, which is not allowed."),!1}return w.addChild(m),m.parent.value=w,!0},h=(u="dfs",p=o)=>{const m=[];if(!p)return console.warn("Tree traverse: Start node is null, returning empty array."),m;if(u==="dfs"){const w=[p];for(;w.length>0;){const b=w.pop();m.push(b);for(let v=b.children.value.length-1;v>=0;v--)w.push(b.children.value[v])}}else{const w=[p];for(;w.length>0;){const b=w.shift();m.push(b);for(const v of b.children.value)w.push(v)}}return m},l=()=>{n.clear()},d=u=>{const p=[...u.children.value];for(const m of p)d(m);n.delete(u.id),u.children.value=[]};return Object.freeze({get root(){return o},get nodeMap(){return n},findNodeById:r,addNode:a,removeNode:i,moveNode:c,traverse:h,dispose:l})}function Oo(t){return s.getCurrentScope()?(s.onScopeDispose(t),!0):!1}const Lo=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Do=Object.prototype.toString,Po=t=>Do.call(t)==="[object Object]";function wt(t){return Array.isArray(t)?t:[t]}function Ro(t,e,n){return s.watch(t,e,{...n,immediate:!0})}const Mo=Lo?window:void 0;function Vo(t){var e;const n=s.toValue(t);return(e=n==null?void 0:n.$el)!=null?e:n}function te(...t){const e=[],n=()=>{e.forEach(c=>c()),e.length=0},o=(c,h,l,d)=>(c.addEventListener(h,l,d),()=>c.removeEventListener(h,l,d)),r=s.computed(()=>{const c=wt(s.toValue(t[0])).filter(h=>h!=null);return c.every(h=>typeof h!="string")?c:void 0}),a=Ro(()=>{var c,h;return[(h=(c=r.value)==null?void 0:c.map(l=>Vo(l)))!=null?h:[Mo].filter(l=>l!=null),wt(s.toValue(r.value?t[1]:t[0])),wt(s.unref(r.value?t[2]:t[1])),s.toValue(r.value?t[3]:t[2])]},([c,h,l,d])=>{if(n(),!(c!=null&&c.length)||!(h!=null&&h.length)||!(l!=null&&l.length))return;const u=Po(d)?{...d}:d;e.push(...c.flatMap(p=>h.flatMap(m=>l.map(w=>o(p,m,w,u)))))},{flush:"post"}),i=()=>{a(),n()};return Oo(n),i}function Fo(t,e={}){const{floatingContext:n,treeContext:o}=Be(t),{open:r,setOpen:a,refs:i}=n,{enabled:c=!0,event:h="click",toggle:l=!0,ignoreMouse:d=!1,ignoreKeyboard:u=!1,ignoreTouch:p=!1,outsideClick:m=!1,outsideEvent:w="pointerdown",outsideCapture:b=!0,onOutsideClick:v,preventScrollbarClick:g=!0,handleDragEvents:E=!0}=e;let L,R=!1,D=!1,C=!1;const P=s.computed(()=>s.toValue(c)),K=s.computed(()=>s.toValue(m)),N=s.computed(()=>{const A=i.anchorEl.value;return A instanceof HTMLElement?A:null}),V=s.computed(()=>i.floatingEl.value);function H(A,j){C=!0;try{r.value?s.toValue(l)&&a(!1,A,j):a(!0,A,j)}finally{Promise.resolve().then(()=>{C=!1})}}function Y(){L=void 0,R=!1,D=!1}function z(A){L=A.pointerType}function B(A){A.button===0&&s.toValue(h)!=="click"&&(J(L)||H("anchor-click",A))}function T(A){if(s.toValue(u)&&A.detail===0){Y();return}if(s.toValue(h)==="mousedown"&&L){Y();return}if(J(L)){Y();return}H("anchor-click",A),Y()}function f(A){if(L=void 0,A.defaultPrevented||s.toValue(u)||Ct(A))return;const j=N.value;j&&(A.key===" "&&!Tt(j)&&(A.preventDefault(),R=!0),A.key==="Enter"&&H("keyboard-activate",A))}function W(A){const j=N.value;j&&(A.defaultPrevented||s.toValue(u)||Ct(A)||Tt(j)||A.key===" "&&R&&(R=!1,H("keyboard-activate",A)))}function y(A){if(!P.value||!K.value||!r.value)return;if(s.toValue(w)==="click"&&s.toValue(E)&&D){D=!1;return}if(C)return;const j=A.target;if(j&&!(s.toValue(g)&&We(j)&&V.value&&En(A,j))){if(o){if(!No(o,j))return}else if(St(A,N.value)||St(A,V.value))return;v?v(A,n):a(!1,"outside-pointer",A)}}function U(){D=!0}function ne(){setTimeout(()=>{D=!1},0)}function J(A){return!!(xt(A,!0)&&s.toValue(d)||A==="touch"&&s.toValue(p))}s.watchPostEffect(()=>{const A=N.value;!P.value||!A||(A.addEventListener("pointerdown",z),A.addEventListener("mousedown",B),A.addEventListener("click",T),A.addEventListener("keydown",f),A.addEventListener("keyup",W),s.onWatcherCleanup(()=>{A.removeEventListener("pointerdown",z),A.removeEventListener("mousedown",B),A.removeEventListener("click",T),A.removeEventListener("keydown",f),A.removeEventListener("keyup",W),Y()}))}),te(()=>P.value&&K.value?document:null,()=>s.toValue(w),y,{capture:s.toValue(b)}),te(()=>P.value&&K.value&&s.toValue(E)?V.value:null,"mousedown",U,{capture:!0}),te(()=>P.value&&K.value&&s.toValue(E)?V.value:null,"mouseup",ne,{capture:!0})}function No(t,e){return!(le(e,t.data.refs.anchorEl.value)||le(e,t.data.refs.floatingEl.value)||Ue(t,e))}function Io(t,e={}){const{floatingContext:n,treeContext:o}=Be(t),{enabled:r=!0,capture:a=!1,onEscape:i}=e,{isComposing:c}=Ho();te(document,"keydown",l=>{if(!(l.key!=="Escape"||!s.toValue(r)||c())){if(i){i(l);return}if(o){const d=ko(o);d&&d.data.setOpen(!1,"escape-key",l)}else n.setOpen(!1,"escape-key",l)}},a)}function ko(t){var a;let e=t;for(;(a=e.parent)!=null&&a.value&&!e.isRoot;)e=e.parent.value;let n=null,o=-1;const r=i=>{var h;if(i.data.open.value){const l=i.getPath().length;l>o&&(o=l,n=i)}const c=((h=i.children)==null?void 0:h.value)??[];for(const l of c)r(l)};return r(e),n}function Ho(){const t=s.ref(!1);return te(document,"compositionstart",()=>{t.value=!0}),te(document,"compositionend",()=>{t.value=!1}),{isComposing:()=>t.value}}const rt=s.ref(!1);typeof window<"u"&&(te(window,"keydown",()=>{rt.value=!0},{capture:!0}),te(window,"pointerdown",()=>{rt.value=!1},{capture:!0}),te(window,"pointermove",()=>{rt.value=!1},{capture:!0}));const rn=s.readonly(rt),Wo=0;function Bo(t,e={}){const{open:n,setOpen:o,refs:{floatingEl:r,anchorEl:a}}=t,{enabled:i=!0,requireFocusVisible:c=!0,tree:h}=e,l=s.computed(()=>a.value?a.value instanceof HTMLElement?a.value:a.value.contextElement:null);let d=!1;const u=wn()&&bn();let p,m=new $o(r);if(h){let g=null;if(t.id&&(g=h.findNodeById(t.id)),!g){for(const E of h.nodeMap.values())if(E.data===t){g=E;break}}g&&(m=new Ko(g))}te(window,"blur",()=>{!n.value&&l.value&&l.value===document.activeElement&&(d=!0)}),te(window,"focus",()=>{d=!1});function w(g){if(d){d=!1;return}const E=g.target instanceof Element?g.target:null;if(s.toValue(c)&&E){if(u&&!g.relatedTarget){if(!rn.value&&!lt(E))return}else if(!yn(E))return}try{o(!0,"focus",g)}catch(L){console.error("[useFocus] Error in onFocus handler:",L)}}function b(g){clearTimeout(p),p=window.setTimeout(()=>{var R;const L=(((R=l.value)==null?void 0:R.ownerDocument)??document).activeElement;if(!(!g.relatedTarget&&L===l.value)&&!m.shouldRemainOpen(L))try{if(L instanceof Element){const D=m.getAncestorsToClose(L);for(const C of D)try{C.data.setOpen(!1,"tree-ancestor-close",g)}catch(P){console.error("[useFocus] Error closing ancestor on blur:",P)}}o(!1,"blur",g)}catch(D){console.error("[useFocus] Error in onBlur handler:",D)}},Wo)}te(document,"focusin",g=>{if(!s.toValue(i))return;const E=g.target;if(!(E instanceof Element))return;const L=l.value;if(!(L&&le(E,L))&&!m.shouldRemainOpen(E))try{const R=m.getAncestorsToClose(E);for(const D of R)try{D.data.setOpen(!1,"tree-ancestor-close",g)}catch(C){console.error("[useFocus] Error closing ancestor on focusin:",C)}o(!1,"blur",g)}catch(R){console.error("[useFocus] Error in document focusin handler:",R)}},{capture:!0});const v=s.watchPostEffect(()=>{if(!s.toValue(i))return;const g=l.value;!g||!(g instanceof HTMLElement)||(g.addEventListener("focus",w),g.addEventListener("blur",b),s.onWatcherCleanup(()=>{g.removeEventListener("focus",w),g.removeEventListener("blur",b)}))});return s.onScopeDispose(()=>{clearTimeout(p)}),{cleanup:()=>{clearTimeout(p),v()}}}class $o{constructor(e){this.floatingEl=e}shouldRemainOpen(e){return!e||!this.floatingEl.value?!1:this.floatingEl.value.contains(e)}getAncestorsToClose(e){return[]}}class Ko{constructor(e){this.treeContext=e}shouldRemainOpen(e){return e?this.isFocusWithinNodeHierarchy(this.treeContext,e):!1}getAncestorsToClose(e){const n=[];let o=this.treeContext.parent.value;for(;o;){if(!this.isFocusWithinNodeHierarchy(o,e)){n.push(o),o=o.parent.value;continue}break}return n}isFocusWithinNodeHierarchy(e,n){return le(n,e.data.refs.anchorEl.value)||le(n,e.data.refs.floatingEl.value)?!0:this.findDescendantContainingFocus(e,n)!==null}findDescendantContainingFocus(e,n){for(const o of e.children.value)if(o.data.open.value){if(le(n,o.data.refs.anchorEl.value)||le(n,o.data.refs.floatingEl.value))return o;const r=this.findDescendantContainingFocus(o,n);if(r)return r}return null}}function ln(t){return t.children.value.some(e=>e.data.open.value||ln(e))}function zo(t,e){return t[0]>=e.x&&t[0]<=e.x+e.width&&t[1]>=e.y&&t[1]<=e.y+e.height}function sn(t,e){const[n,o]=t;let r=!1;const a=e.length;for(let i=0,c=a-1;i<a;c=i++){const[h,l]=e[i]||[0,0],[d,u]=e[c]||[0,0];l>=o!=u>=o&&n<=(d-h)*(o-l)/(u-l)+h&&(r=!r)}return r}function Xo(t={}){const{blockPointerEvents:e=!1,requireIntent:n=!0}=t;let o=-1,r=!1;function a(c,h,l,d,u){const p=At(),m=p-u;if(l===null||d===null||m===0)return{speed:null,lastX:c,lastY:h,lastCursorTime:p};const w=c-l,b=h-d;return{speed:Math.sqrt(w*w+b*b)/m,lastX:c,lastY:h,lastCursorTime:p}}const i=function(h){const{x:l,y:d,placement:u,elements:p,buffer:m,onClose:w,nodeId:b,tree:v}=h,g=s.computed(()=>{const D=p.domReference;return We(D)?D:(D==null?void 0:D.contextElement)??null});let E=null,L=null,R=At();return function(C){var ye,Ie,Se,Ae,ke,O,M;function P(){Ot(o),o=-1,w()}if(Ot(o),o=-1,!p.domReference||!p.floating||u==null||l==null||d==null)return;const{clientX:K,clientY:N}=C,V=[K,N],H=xn(C),Y=C.type==="mouseleave",z=p.floating&&st(p.floating,H),B=g.value&&st(g.value,H),T=(ye=g.value)==null?void 0:ye.getBoundingClientRect(),f=(Ie=p.floating)==null?void 0:Ie.getBoundingClientRect(),W=u.split("-")[0],y=l>((f==null?void 0:f.right)??0)-((f==null?void 0:f.width)??0)/2,U=d>((f==null?void 0:f.bottom)??0)-((f==null?void 0:f.height)??0)/2,ne=T?zo(V,T):!1,J=((f==null?void 0:f.width)??0)>((T==null?void 0:T.width)??0),A=((f==null?void 0:f.height)??0)>((T==null?void 0:T.height)??0),j=((Se=J?T:f)==null?void 0:Se.left)??0,pe=((Ae=J?T:f)==null?void 0:Ae.right)??0,oe=((ke=A?T:f)==null?void 0:ke.top)??0,me=((O=A?T:f)==null?void 0:O.bottom)??0;if(z&&(r=!0,!Y))return;if(B&&(r=!1),B&&!Y){r=!0;return}if(Y&&We(C.relatedTarget)&&p.floating&&st(p.floating,C.relatedTarget))return;if(v&&b){const F=v.nodes.get(b);if(F&&ln(F))return}if(W==="top"&&d>=((T==null?void 0:T.bottom)??0)-1||W==="bottom"&&d<=((T==null?void 0:T.top)??0)+1||W==="left"&&l>=((T==null?void 0:T.right)??0)-1||W==="right"&&l<=((T==null?void 0:T.left)??0)+1)return P();let ie=[];switch(W){case"top":ie=[[j,((T==null?void 0:T.top)??0)+1],[j,((f==null?void 0:f.bottom)??0)-1],[pe,((f==null?void 0:f.bottom)??0)-1],[pe,((T==null?void 0:T.top)??0)+1]];break;case"bottom":ie=[[j,((f==null?void 0:f.top)??0)+1],[j,((T==null?void 0:T.bottom)??0)-1],[pe,((T==null?void 0:T.bottom)??0)-1],[pe,((f==null?void 0:f.top)??0)+1]];break;case"left":ie=[[((f==null?void 0:f.right)??0)-1,me],[((f==null?void 0:f.right)??0)-1,oe],[((T==null?void 0:T.left)??0)+1,oe],[((T==null?void 0:T.left)??0)+1,me]];break;case"right":ie=[[((T==null?void 0:T.right)??0)-1,me],[((T==null?void 0:T.right)??0)-1,oe],[((f==null?void 0:f.left)??0)+1,oe],[((f==null?void 0:f.left)??0)+1,me]];break}function re([F,$]){const S=m;switch(W){case"top":{const q=[J?F+S/2:y?F+S*4:F-S*4,$+S+1],ee=[J?F-S/2:y?F+S*4:F-S*4,$+S+1],Q=[[(f==null?void 0:f.left)??0,y||J?((f==null?void 0:f.bottom)??0)-S:(f==null?void 0:f.top)??0],[(f==null?void 0:f.right)??0,y?J?((f==null?void 0:f.bottom)??0)-S:(f==null?void 0:f.top)??0:((f==null?void 0:f.bottom)??0)-S]];return[q,ee,...Q]}case"bottom":{const q=[J?F+S/2:y?F+S*4:F-S*4,$-S],ee=[J?F-S/2:y?F+S*4:F-S*4,$-S],Q=[[(f==null?void 0:f.left)??0,y||J?((f==null?void 0:f.top)??0)+S:(f==null?void 0:f.bottom)??0],[(f==null?void 0:f.right)??0,y?J?((f==null?void 0:f.top)??0)+S:(f==null?void 0:f.bottom)??0:((f==null?void 0:f.top)??0)+S]];return[q,ee,...Q]}case"left":{const q=[F+S+1,A?$+S/2:U?$+S*4:$-S*4],ee=[F+S+1,A?$-S/2:U?$+S*4:$-S*4];return[...[[U||A?((f==null?void 0:f.right)??0)-S:(f==null?void 0:f.left)??0,(f==null?void 0:f.top)??0],[U?A?((f==null?void 0:f.right)??0)-S:(f==null?void 0:f.left)??0:((f==null?void 0:f.right)??0)-S,(f==null?void 0:f.bottom)??0]],q,ee]}case"right":{const q=[F-S,A?$+S/2:U?$+S*4:$-S*4],ee=[F-S,A?$-S/2:U?$+S*4:$-S*4],Q=[[U||A?((f==null?void 0:f.left)??0)+S:(f==null?void 0:f.right)??0,(f==null?void 0:f.top)??0],[U?A?((f==null?void 0:f.left)??0)+S:(f==null?void 0:f.right)??0:((f==null?void 0:f.left)??0)+S,(f==null?void 0:f.bottom)??0]];return[q,ee,...Q]}}}const ue=re([l,d]);if((M=t.onPolygonChange)==null||M.call(t,ue),!sn(V,ie)){if(sn(V,ue)){if(!r&&n){const F=a(C.clientX,C.clientY,E,L,R);E=F.lastX,L=F.lastY,R=F.lastCursorTime,F.speed!==null&&F.speed<.1&&(o=window.setTimeout(P,40))}return}if(r&&!ne)return P();P()}}};return i.__options={blockPointerEvents:e},i}const an=10;function Yo(t,e,n){const{delay:o}=n,r=s.computed(()=>{const l=s.toValue(o);return(typeof l=="number"?l:l.open)??0}),a=s.computed(()=>{const l=s.toValue(o);return(typeof l=="number"?l:l.close)??0});let i,c;const h=()=>{clearTimeout(i),clearTimeout(c)};return s.onScopeDispose(h),{show:(l,d)=>{h();const u=l??r.value;u===0?t(d):i=setTimeout(()=>t(d),u)},hide:(l,d)=>{h();const u=l??a.value;u===0?e(d):c=setTimeout(()=>e(d),u)},showDelay:r,hideDelay:a,clearTimeouts:h}}function Uo(t,e={}){const{floatingContext:n,treeContext:o}=Be(t),{open:r,setOpen:a,refs:{anchorEl:i,floatingEl:c}}=n,{enabled:h=!0,delay:l=0,restMs:d=0,mouseOnly:u=!1,safePolygon:p=!1}=e,m=s.computed(()=>s.toValue(h)),w=s.computed(()=>s.toValue(d)),b=s.computed(()=>{const y=i.value;return!y||y instanceof HTMLElement?y:y.contextElement??null}),{hide:v,show:g,showDelay:E,clearTimeouts:L}=Yo(y=>{r.value||a(!0,"hover",y)},y=>{r.value&&a(!1,"hover",y)},{delay:l});let R=null,D;const C=s.computed(()=>E.value===0&&w.value>0);function P(y){if(!m.value||!V(y)||!C.value||!R)return;const U={x:y.clientX,y:y.clientY},ne=Math.abs(U.x-R.x),J=Math.abs(U.y-R.y);(ne>an||J>an)&&(R=U,clearTimeout(D),D=setTimeout(()=>{g(0,y)},w.value))}function K(y){!m.value||!V(y)||!C.value||(R={x:y.clientX,y:y.clientY},D=setTimeout(()=>{g(0,y)},w.value))}function N(){clearTimeout(D),R=null}s.watchPostEffect(()=>{const y=b.value;!y||!m.value||!C.value||(y.addEventListener("pointerenter",K),y.addEventListener("pointermove",P),y.addEventListener("pointerleave",N),s.onWatcherCleanup(()=>{y.removeEventListener("pointerenter",K),y.removeEventListener("pointermove",P),y.removeEventListener("pointerleave",N)}))}),s.onScopeDispose(()=>{clearTimeout(D)});function V(y){return s.toValue(u)?y.pointerType==="mouse":!0}function H(y){!m.value||!V(y)||C.value||(B(),g(void 0,y))}function Y(y){!m.value||!V(y)||(L(),B())}let z=null;function B(){z&&(document.removeEventListener("pointermove",z),z=null);const y=f.value;y!=null&&y.onPolygonChange&&y.onPolygonChange([])}const T=s.computed(()=>!!s.toValue(p)),f=s.computed(()=>{const y=s.toValue(p);if(typeof y=="object"&&y)return y;if(y===!0)return{}});function W(y){var A;if(!m.value||!V(y))return;const{clientX:U,clientY:ne}=y,J=y.relatedTarget;if(T.value)setTimeout(()=>{var ie;B();const j=b.value,pe=c.value;if(!j||!pe){v(void 0,y);return}let oe,me;if(o){oe=new Map;const re=ue=>{oe==null||oe.set(ue.id,ue);for(const ye of ue.children.value)re(ye)};re(o),me=o.id}z=Xo(f.value)({x:U,y:ne,placement:n.placement.value,elements:{domReference:j,floating:pe},buffer:((ie=f.value)==null?void 0:ie.buffer)??1,onClose:()=>{B(),v(void 0)},nodeId:me,tree:oe?{nodes:oe}:void 0}),z&&document.addEventListener("pointermove",z)},0);else{if(o){if(!_o(o,J))return}else if((A=c.value)!=null&&A.contains(J))return;v(void 0,y)}}s.watchPostEffect(()=>{const y=b.value;!y||!m.value||(y.addEventListener("pointerenter",H),y.addEventListener("pointerleave",W),s.onWatcherCleanup(()=>{y.removeEventListener("pointerenter",H),y.removeEventListener("pointerleave",W)}))}),s.watchPostEffect(()=>{const y=c.value;!y||!m.value||(y.addEventListener("pointerenter",Y),y.addEventListener("pointerleave",W),s.onWatcherCleanup(()=>{y.removeEventListener("pointerenter",Y),y.removeEventListener("pointerleave",W)}))}),s.onScopeDispose(()=>{B()})}function _o(t,e){return e?!(le(e,t.data.refs.anchorEl.value)||le(e,t.data.refs.floatingEl.value)||Ue(t,e)):!0}function jo(t,e,n,o){const r=s.computed(()=>!!s.toValue(o.virtual));s.watch([r,o.open,s.computed(()=>s.toValue(n))],([a,i,c])=>{const h=t.value;if(!h)return;if(!a||!i||c==null){h.removeAttribute("aria-activedescendant");return}const l=e.value[c];l&&(l.id||(l.id=`vfloat-option-${Math.random().toString(16).slice(2,10)}`),h.setAttribute("aria-activedescendant",l.id),o.virtualItemRef&&(o.virtualItemRef.value=l))})}function Le(t,e,n){const{items:o,loop:r,allowEscape:a,isVirtual:i,findNextEnabled:c,getFirstEnabledIndex:h,getLastEnabledIndex:l}=n,d=o.length,u=t==null?e===1?0:d-1:t+e;let p=c(u,e,r);if(p==null&&r){if(a&&i)return{type:"navigate",index:null};p=e===1?h():l()}return p!=null?{type:"navigate",index:p}:null}class qo{handleKey(e,n){const{isRtl:o,nested:r}=n;return e==="ArrowDown"?Le(n.current,1,n):e==="ArrowUp"?Le(n.current,-1,n):r&&e===(o?"ArrowRight":"ArrowLeft")?{type:"close"}:null}}class Go{handleKey(e,n){const{isRtl:o,nested:r}=n;return e==="ArrowRight"?Le(n.current,o?-1:1,n):e==="ArrowLeft"?Le(n.current,o?1:-1,n):r&&e==="ArrowUp"?{type:"close"}:null}}class cn{constructor(e=!1,n="row"){this.fallbackToLinear=e,this.loopDirection=n}handleKey(e,n){const{current:o,items:r,isDisabled:a,loop:i,allowEscape:c,isVirtual:h,getFirstEnabledIndex:l,getLastEnabledIndex:d,cols:u}=n;if(e==="ArrowRight"||e==="ArrowLeft"){const p=e==="ArrowRight"?1:-1;if(o===null)return Le(o,p,n);const m=o+p,w=Math.floor(o/u),b=Math.floor(m/u);if(m>=0&&m<r.length&&w===b&&!a(m))return{type:"navigate",index:m};if(i){if(c&&h){const g=o===0,E=o===r.length-1;if(p===-1&&g||p===1&&E)return{type:"navigate",index:null}}let v;if(this.loopDirection==="next"?p===1?(v=o+1,v>=r.length&&(v=0)):(v=o-1,v<0&&(v=r.length-1)):p===1?v=w*u:v=Math.min((w+1)*u-1,r.length-1),this.loopDirection==="next"){let g=v;for(let E=0;E<r.length;E++){if(!a(g))return{type:"navigate",index:g};if(g+=p,g>=r.length&&(g=0),g<0&&(g=r.length-1),g===v)break}}else{const g=p,E=w*u,L=Math.min((w+1)*u-1,r.length-1);for(;v>=E&&v<=L;){if(!a(v))return{type:"navigate",index:v};if(v+=g,v<E||v>L)break}}}return Le(o,p,n)}if(e==="ArrowDown"||e==="ArrowUp"){if(u<=1)return null;const p=e==="ArrowDown"?u:-u,m=p>0?u:-u;let b=(o??(p>0?-u:r.length))+p;for(;b>=0&&b<r.length&&a(b);)b+=m;if(b>=0&&b<r.length)return{type:"navigate",index:b};if(i){if(c&&h)return{type:"navigate",index:null};if(o===null){const E=p>0?l():d();return E!=null?{type:"navigate",index:E}:null}const v=o%u;let g;for(p>0?g=v:(g=(Math.ceil(r.length/u)-1)*u+v,g>=r.length&&(g-=u));g>=0&&g<r.length&&a(g);)g+=m;if(g>=0&&g<r.length)return{type:"navigate",index:g}}if(this.fallbackToLinear)return Le(o,e==="ArrowDown"?1:-1,n)}return null}}function Zo(t,e){const{floatingContext:n,treeContext:o}=Be(t),{refs:r,open:a,setOpen:i}=n,{listRef:c,activeIndex:h,onNavigate:l,enabled:d=!0,loop:u=!1,orientation:p="vertical",disabledIndices:m,focusItemOnHover:w=!0,openOnArrowKeyDown:b=!0,scrollItemIntoView:v=!0,selectedIndex:g=null,focusItemOnOpen:E="auto",nested:L=!1,rtl:R=!1,virtual:D=!1,virtualItemRef:C,cols:P=1,allowEscape:K=!1}=e,N={isEnabled:s.computed(()=>s.toValue(d)),anchorEl:s.computed(()=>{const O=r.anchorEl.value;return O instanceof HTMLElement?O:O&&"contextElement"in O&&O.contextElement instanceof HTMLElement?O.contextElement:null}),floatingEl:s.computed(()=>r.floatingEl.value),isVirtual:s.computed(()=>!!s.toValue(D)),isRtl:s.computed(()=>!!s.toValue(R)),gridCols:s.computed(()=>Math.max(1,Number(s.toValue(P)??1)))},{isEnabled:V,anchorEl:H,floatingEl:Y,isVirtual:z,isRtl:B,gridCols:T}=N,f=()=>h!==void 0?s.toValue(h):null,W=O=>m?Array.isArray(m)?m.includes(O):!!m(O):!1,y=()=>{const O=c.value;for(let M=0;M<O.length;M++)if(O[M]&&!W(M))return M;return null},U=[],ne=O=>(U.push(O),O),J=()=>{var O;for(;U.length;)(O=U.pop())==null||O()},A=()=>{const O=c.value;for(let M=O.length-1;M>=0;M--)if(O[M]&&!W(M))return M;return null};function j(O,M,F){switch(O){case"vertical":return M;case"horizontal":return F;default:return M||F}}function pe(O,M){return j(M,O==="ArrowUp"||O==="ArrowDown",O==="ArrowLeft"||O==="ArrowRight")}function oe(O,M,F){return j(M,O==="ArrowDown",F?O==="ArrowLeft":O==="ArrowRight")||O==="Enter"||O===" "||O===""}const me=(O,M,F)=>{const $=c.value,S=$.length;let q=O;for(let ee=0;ee<S;ee++){if(q<0||q>=S){if(!F)return null;q=(q+S)%S}if($[q]&&!W(q))return q;q+=M}return null},ie=(O,M=!1)=>{var $;if(O==null)return;const F=c.value[O];if(F&&!z.value){F.focus({preventScroll:!0});const S=v;!!S&&(M||rn.value)&&(($=F.scrollIntoView)==null||$.call(F,typeof S=="boolean"?{block:"nearest",inline:"nearest"}:S))}};let re=null;const ue=O=>{if(O.defaultPrevented)return;const M=O.target;if(M&&lt(M)&&M!==H.value)return;const F=O.key,$=s.toValue(p);if(re=F,a.value&&z.value){ye(O);return}if(!pe(F,$)||a.value||!s.toValue(b))return;O.preventDefault(),i(!0,"keyboard-activate",O);const q=(g!==void 0?s.toValue(g):null)??(oe(F,$,B.value)?y():A());q!=null&&(l==null||l(q))},ye=O=>{if(O.defaultPrevented)return;const M=O.key,F=s.toValue(p),$=c.value;if(!$.length)return;if(!z.value){if(M==="Home"){O.preventDefault();const Q=y();Q!=null&&(l==null||l(Q));return}if(M==="End"){O.preventDefault();const Q=A();Q!=null&&(l==null||l(Q));return}}let S;F==="vertical"?S=new qo:F==="horizontal"?S=T.value>1?new cn(!1,s.toValue(e.gridLoopDirection)??"row"):new Go:S=new cn(!0,s.toValue(e.gridLoopDirection)??"row");const q={current:f(),items:$,isRtl:B.value,loop:!!s.toValue(u),allowEscape:!!s.toValue(K),isVirtual:z.value,cols:T.value,nested:!!s.toValue(L),isDisabled:W,findNextEnabled:me,getFirstEnabledIndex:y,getLastEnabledIndex:A},ee=S.handleKey(M,q);if(ee){if(ee.type==="navigate")O.preventDefault(),l==null||l(ee.index);else if(ee.type==="close"){O.preventDefault(),i(!1,"programmatic",O);const Q=o==null?void 0:o.parent.value,ce=Q==null?void 0:Q.data.refs.anchorEl.value;ce instanceof HTMLElement?ce.focus({preventScroll:!0}):ce&&"contextElement"in ce&&ce.contextElement instanceof HTMLElement&&ce.contextElement.focus({preventScroll:!0})}}},Ie=s.watch([a,s.computed(()=>f())],([O,M])=>{V.value&&O&&M!=null&&ie(M)},{flush:"post"});ne(Ie),ne(te(()=>V.value?H.value:null,"keydown",ue)),ne(te(()=>V.value?Y.value:null,"keydown",ye));const Se=s.watchPostEffect(()=>{if(!V.value||!s.toValue(w))return;const O=Y.value;if(!O)return;let M=null,F=null;const $=S=>{if(M===S.clientX&&F===S.clientY)return;M=S.clientX,F=S.clientY;const q=S.target;if(!q)return;const ee=c.value;let Q=-1;for(let ce=0;ce<ee.length;ce++){const x=ee[ce];if(x&&(x===q||x.contains(q))){Q=ce;break}}Q>=0&&(l==null||l(Q))};O.addEventListener("mousemove",$),s.onWatcherCleanup(()=>{O.removeEventListener("mousemove",$)})});ne(Se);const Ae=s.ref(!1),ke=s.watch(()=>a.value,O=>{if(V.value){if(O&&!Ae.value){const M=s.toValue(E);if(M===!0||M==="auto"&&re!=null){const $=(g!==void 0?s.toValue(g):null)??(re&&oe(re,s.toValue(p),B.value)?y():A());$!=null&&(l==null||l($),ie($,!0))}}Ae.value=O}},{flush:"post",immediate:!0});return ne(ke),jo(H,c,s.computed(()=>f()),{virtual:D,open:a,virtualItemRef:C}),{cleanup:J}}/*!
2
+ * tabbable 6.3.0
3
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
4
+ */var Jo=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],bt=Jo.join(","),un=typeof Element>"u",ze=un?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,it=!un&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},Xe=function(e,n){var o;n===void 0&&(n=!0);var r=e==null||(o=e.getAttribute)===null||o===void 0?void 0:o.call(e,"inert"),a=r===""||r==="true",i=a||n&&e&&Xe(e.parentNode);return i},Qo=function(e){var n,o=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return o===""||o==="true"},er=function(e,n,o){if(Xe(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(bt));return n&&ze.call(e,bt)&&r.unshift(e),r=r.filter(o),r},yt=function(e,n,o){for(var r=[],a=Array.from(e);a.length;){var i=a.shift();if(!Xe(i,!1))if(i.tagName==="SLOT"){var c=i.assignedElements(),h=c.length?c:i.children,l=yt(h,!0,o);o.flatten?r.push.apply(r,l):r.push({scopeParent:i,candidates:l})}else{var d=ze.call(i,bt);d&&o.filter(i)&&(n||!e.includes(i))&&r.push(i);var u=i.shadowRoot||typeof o.getShadowRoot=="function"&&o.getShadowRoot(i),p=!Xe(u,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(i));if(u&&p){var m=yt(u===!0?i.children:u.children,!0,o);o.flatten?r.push.apply(r,m):r.push({scopeParent:i,candidates:m})}else a.unshift.apply(a,i.children)}}return r},fn=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},dn=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Qo(e))&&!fn(e)?0:e.tabIndex},tr=function(e,n){var o=dn(e);return o<0&&n&&!fn(e)?0:o},nr=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},hn=function(e){return e.tagName==="INPUT"},or=function(e){return hn(e)&&e.type==="hidden"},rr=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(o){return o.tagName==="SUMMARY"});return n},ir=function(e,n){for(var o=0;o<e.length;o++)if(e[o].checked&&e[o].form===n)return e[o]},lr=function(e){if(!e.name)return!0;var n=e.form||it(e),o=function(c){return n.querySelectorAll('input[type="radio"][name="'+c+'"]')},r;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")r=o(window.CSS.escape(e.name));else try{r=o(e.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var a=ir(r,e.form);return!a||a===e},sr=function(e){return hn(e)&&e.type==="radio"},ar=function(e){return sr(e)&&!lr(e)},cr=function(e){var n,o=e&&it(e),r=(n=o)===null||n===void 0?void 0:n.host,a=!1;if(o&&o!==e){var i,c,h;for(a=!!((i=r)!==null&&i!==void 0&&(c=i.ownerDocument)!==null&&c!==void 0&&c.contains(r)||e!=null&&(h=e.ownerDocument)!==null&&h!==void 0&&h.contains(e));!a&&r;){var l,d,u;o=it(r),r=(l=o)===null||l===void 0?void 0:l.host,a=!!((d=r)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(r))}}return a},pn=function(e){var n=e.getBoundingClientRect(),o=n.width,r=n.height;return o===0&&r===0},ur=function(e,n){var o=n.displayCheck,r=n.getShadowRoot;if(o==="full-native"&&"checkVisibility"in e){var a=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!a}if(getComputedStyle(e).visibility==="hidden")return!0;var i=ze.call(e,"details>summary:first-of-type"),c=i?e.parentElement:e;if(ze.call(c,"details:not([open]) *"))return!0;if(!o||o==="full"||o==="full-native"||o==="legacy-full"){if(typeof r=="function"){for(var h=e;e;){var l=e.parentElement,d=it(e);if(l&&!l.shadowRoot&&r(l)===!0)return pn(e);e.assignedSlot?e=e.assignedSlot:!l&&d!==e.ownerDocument?e=d.host:e=l}e=h}if(cr(e))return!e.getClientRects().length;if(o!=="legacy-full")return!0}else if(o==="non-zero-area")return pn(e);return!1},fr=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var o=0;o<n.children.length;o++){var r=n.children.item(o);if(r.tagName==="LEGEND")return ze.call(n,"fieldset[disabled] *")?!0:!r.contains(e)}return!0}n=n.parentElement}return!1},dr=function(e,n){return!(n.disabled||Xe(n)||or(n)||ur(n,e)||rr(n)||fr(n))},mn=function(e,n){return!(ar(n)||dn(n)<0||!dr(e,n))},hr=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},gn=function(e){var n=[],o=[];return e.forEach(function(r,a){var i=!!r.scopeParent,c=i?r.scopeParent:r,h=tr(c,i),l=i?gn(r.candidates):c;h===0?i?n.push.apply(n,l):n.push(c):o.push({documentOrder:a,tabIndex:h,item:r,isScope:i,content:l})}),o.sort(nr).reduce(function(r,a){return a.isScope?r.push.apply(r,a.content):r.push(a.content),r},[]).concat(n)},pr=function(e,n){n=n||{};var o;return n.getShadowRoot?o=yt([e],n.includeContainer,{filter:mn.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:hr}):o=er(e,n.includeContainer,mn.bind(null,n)),gn(o)};function mr(t,e={}){const{floatingContext:n,treeContext:o}=Be(t),{refs:{floatingEl:r,anchorEl:a},open:i,setOpen:c}=n,{enabled:h=!0,modal:l=!1,guards:d=!0,order:u=["content"],initialFocus:p="first",returnFocus:m=!0,restoreFocus:w=!1,closeOnFocusOut:b=!1,preventScroll:v=!0,outsideElementsInert:g=!1}=e,E=s.computed(()=>!!s.toValue(h)),L=s.computed(()=>!!s.toValue(l)),R=s.computed(()=>!!s.toValue(d)),D=s.computed(()=>Array.isArray(s.toValue(u))?s.toValue(u):["content"]),C=s.computed(()=>!!s.toValue(m)),P=s.computed(()=>!!s.toValue(w)),K=s.computed(()=>!!s.toValue(b)),N=s.computed(()=>!!s.toValue(v)),V=s.computed(()=>!!s.toValue(g)),H=s.computed(()=>r.value),Y=s.ref(null);let z=null,B=null,T=null,f=null,W=null,y=null,U=null;const ne=s.ref(-1);let J=!1;const A=typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,j=[];function pe(x){!x||!x.isConnected||x!==x.ownerDocument.body&&(j.push(x),j.length>20&&j.shift())}function oe(){for(;j.length;){const x=j.pop();if(x.isConnected)return x}return null}function me(){if(!o)return!0;const x=I=>{for(const k of I.children.value)if(k.data.open.value||x(k))return!0;return!1};return!x(o)}function ie(x){const I=x.hasAttribute("tabindex"),k=x.getAttribute("tabindex");return I||x.setAttribute("tabindex","-1"),()=>{I?k!=null&&x.setAttribute("tabindex",k):x.removeAttribute("tabindex")}}function re(x){try{return pr(x,{displayCheck:"full",includeContainer:!1})}catch{return[]}}function ue(x){const I=re(x),k=a.value;return D.value.map(_=>_==="floating"?x:_==="reference"?We(k)?k:(k==null?void 0:k.contextElement)instanceof HTMLElement?k.contextElement:null:I).flat().filter(_=>!!_)}function ye(){const x=document.createElement("div");return x.setAttribute("tabindex","0"),x.setAttribute("aria-hidden","true"),x.style.cssText="position:absolute;width:1px;height:1px;opacity:0;",x}function Ie(x){R.value&&(f||W||(f=ye(),W=ye(),x.insertBefore(f,x.firstChild),x.appendChild(W),y=Ae(f,"before",x),U=Ae(W,"after",x)))}function Se(){y==null||y(),U==null||U(),y=null,U=null,f&&f.parentNode&&f.parentNode.removeChild(f),W&&W.parentNode&&W.parentNode.removeChild(W),f=null,W=null}function Ae(x,I,k){const _=G=>{G.preventDefault();const Z=ue(k);if(!Z.length){M(k);return}M(I==="before"?Z[Z.length-1]:Z[0])};return x.addEventListener("focus",_),()=>x.removeEventListener("focus",_)}function ke(x){if(!L.value)return()=>{};const I=[],k=x.ownerDocument.body,_=Array.from(k.children);for(const G of _)if(!G.contains(x)){const Z=G.getAttribute("aria-hidden");I.push(G),G.setAttribute("aria-hidden","true"),G.__prevAriaHidden=Z}return()=>{for(const G of I){const Z=G.__prevAriaHidden;Z==null?G.removeAttribute("aria-hidden"):G.setAttribute("aria-hidden",Z),delete G.__prevAriaHidden}}}function O(x){if(!L.value||!V.value)return()=>{};const k=x.ownerDocument.body,G=Array.from(k.children).filter(Z=>!Z.contains(x)).map(Z=>({el:Z,ariaHidden:Z.getAttribute("aria-hidden"),inert:Z.inert??null}));for(const{el:Z}of G)A?Z.inert=!0:Z.setAttribute("aria-hidden","true");return()=>{var Z;for(const Pe of G){if(A){const Ye=Pe.el;Pe.inert==null?(Ye.inert=!1,(Z=Ye.removeAttribute)==null||Z.call(Ye,"inert")):Ye.inert=Pe.inert}Pe.ariaHidden==null?Pe.el.removeAttribute("aria-hidden"):Pe.el.setAttribute("aria-hidden",Pe.ariaHidden)}}}function M(x,I){if(x)try{x.focus(I??{preventScroll:N.value})}catch{}}function F(x){const I=s.toValue(p),k=re(x);if(typeof I=="number"){const _=k[I]??null;M(_);return}if(typeof I=="function"){M(I(),{preventScroll:N.value});return}if(We(I)){M(I,{preventScroll:N.value});return}if(I==="last"){M(k[k.length-1]??null);return}k.length>0?M(k[0]):(z=ie(x),M(x))}function $(x,I){if(x.key!=="Tab")return;const k=ue(I);if(!k.length){z??(z=ie(I)),x.preventDefault(),M(I);return}const _=document.activeElement,G=k[0],Z=k[k.length-1];x.shiftKey?(!_||_===G)&&(x.preventDefault(),M(Z)):(!_||_===Z)&&(x.preventDefault(),M(G))}function S(x){return o?le(x,o.data.refs.anchorEl.value)||le(x,o.data.refs.floatingEl.value)?!0:!!Ue(o,x):!!H.value&&H.value.contains(x)}const q=te(()=>E.value&&i.value?H.value:null,"keydown",x=>{const I=H.value;I&&$(x,I)},{capture:!0}),ee=te(()=>E.value&&i.value?document:null,"focusin",x=>{const I=H.value,k=x.target;if(!(!I||!k)&&me()&&!I.contains(k)&&!S(k)){if(L.value){const G=ue(I)[0]??I;M(G)}else if(K.value){J=!0;try{c(!1,"blur",x)}catch(_){console.error("[useFocusTrap] Error closing on focus out:",_)}}}},{capture:!0});te(()=>E.value&&i.value?H.value:null,"focusin",x=>{const I=H.value;if(!I)return;const k=re(I),_=x.target;if(!(_ instanceof HTMLElement)){ne.value=-1;return}ne.value=k.indexOf(_)}),te(()=>E.value&&i.value?H.value:null,"focusout",x=>{if(!P.value)return;const I=H.value;I&&queueMicrotask(()=>{const k=I.ownerDocument,_=k.activeElement;if(_&&I.contains(_)||_&&_!==k.body)return;const G=re(I),Z=G[ne.value]??G[G.length-1]??I;M(Z)})}),te(()=>E.value&&i.value?document:null,"pointerdown",()=>{queueMicrotask(()=>{})},{capture:!0});const Q=s.watchPostEffect(()=>{if(!E.value||!i.value)return;const x=H.value;if(!x)return;const k=x.ownerDocument.activeElement;Y.value=k,pe(k),Ie(x),B=ke(x),T=O(x),queueMicrotask(()=>F(x)),s.onWatcherCleanup(()=>{Se(),z&&(z(),z=null),B&&(B(),B=null),T&&(T(),T=null)})});s.watch(()=>i.value,(x,I)=>{if(!x&&I){const k=Y.value;if(Y.value=null,C.value&&!J){const _=oe()??k??ce();if(_){const G=re(_);M(G[0]??_,{preventScroll:!0})}}J=!1}},{flush:"post"});function ce(){const x=a.value;return x instanceof HTMLElement?x:(x==null?void 0:x.contextElement)instanceof HTMLElement?x.contextElement:null}return s.onScopeDispose(()=>{q(),ee(),Se(),z&&z(),B&&B(),T&&T()}),{cleanup:()=>{q(),ee(),Q(),Se(),z&&z(),B&&B(),T&&T()}}}X.FollowTracker=Lt,X.StaticTracker=Dt,X.TrackingStrategy=at,X.VirtualElementFactory=je,X.arrow=Qt,X.autoPlacement=bo,X.createTree=on,X.createTreeNode=vt,X.flip=Eo,X.hide=Co,X.offset=wo,X.shift=yo,X.size=xo,X.useArrow=Re,X.useClick=Fo,X.useClientPoint=Tn,X.useEscapeKey=Io,X.useFloating=en,X.useFloatingTree=Ao,X.useFocus=Bo,X.useFocusTrap=mr,X.useHover=Uo,X.useListNavigation=Zo,Object.defineProperty(X,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,76 +1,74 @@
1
- {
2
- "name": "v-float",
3
- "version": "0.7.2",
4
- "description": "Vue 3 port of Floating UI - a library for positioning floating elements",
5
- "private": false,
6
- "type": "module",
7
- "files": [
8
- "dist"
9
- ],
10
- "types": "./dist/src/index.d.ts",
11
- "main": "./dist/v-float.umd.js",
12
- "module": "./dist/v-float.es.js",
13
- "exports": {
14
- ".": {
15
- "types": "./dist/index.d.ts",
16
- "import": "./dist/v-float.es.js",
17
- "require": "./dist/v-float.umd.js"
18
- }
19
- },
20
- "dependencies": {
21
- "@floating-ui/dom": "^1.7.4",
22
- "@vueuse/core": "^13.7.0",
23
- "vue": "^3.5.22"
24
- },
25
- "devDependencies": {
26
- "@21st-extension/toolbar-vue": "^0.5.14",
27
- "@21st-extension/vue": "^0.5.14",
28
- "@biomejs/biome": "2.2.2",
29
- "@release-it/conventional-changelog": "^10.0.1",
30
- "@testing-library/vue": "^8.1.0",
31
- "@tsconfig/node22": "^22.0.2",
32
- "@types/jsdom": "^21.1.7",
33
- "@types/node": "^22.18.0",
34
- "@unocss/reset": "66.1.0-beta.7",
35
- "@vitejs/plugin-vue": "^5.2.4",
36
- "@vitest/browser": "^3.2.4",
37
- "@vitest/coverage-v8": "^3.2.4",
38
- "@vitest/ui": "3.0.8",
39
- "@vue/test-utils": "^2.4.6",
40
- "@vue/tsconfig": "^0.7.0",
41
- "jsdom": "^26.1.0",
42
- "lucide-vue-next": "^0.513.0",
43
- "npm-run-all2": "^7.0.2",
44
- "playwright": "^1.55.0",
45
- "prettier": "^3.6.2",
46
- "release-it": "^19.0.4",
47
- "release-it-pnpm": "^4.6.6",
48
- "typescript": "~5.7.3",
49
- "unocss": "66.1.0-beta.7",
50
- "vite": "^6.3.5",
51
- "vite-plugin-dts": "^4.5.4",
52
- "vite-plugin-vue-devtools": "^7.7.7",
53
- "vitepress": "^1.6.4",
54
- "vitepress-plugin-demo": "^0.8.1",
55
- "vitest": "^3.2.4",
56
- "vitest-browser-vue": "^0.2.0",
57
- "vue-tsc": "^2.2.12"
58
- },
59
- "scripts": {
60
- "dev": "vite",
61
- "build": "run-p type-check \"build-only {@}\" --",
62
- "preview": "vite preview",
63
- "build-only": "vite build",
64
- "type-check": "vue-tsc --build tsconfig.build.json",
65
- "lint": "biome check --write",
66
- "test": "vitest",
67
- "docs:dev": "vitepress dev docs",
68
- "docs:build": "vitepress build docs",
69
- "docs:preview": "vitepress preview docs",
70
- "release": "release-it",
71
- "release:patch": "release-it patch",
72
- "release:minor": "release-it minor",
73
- "release:major": "release-it major",
74
- "release:dry": "release-it --dry-run"
75
- }
76
- }
1
+ {
2
+ "name": "v-float",
3
+ "version": "0.9.0",
4
+ "description": "Vue 3 port of Floating UI - a library for positioning floating elements",
5
+ "private": false,
6
+ "type": "module",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "types": "./dist/src/index.d.ts",
11
+ "main": "./dist/v-float.umd.js",
12
+ "module": "./dist/v-float.es.js",
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/index.d.ts",
16
+ "import": "./dist/v-float.es.js",
17
+ "require": "./dist/v-float.umd.js"
18
+ }
19
+ },
20
+ "scripts": {
21
+ "dev": "vite",
22
+ "build": "run-p type-check \"build-only {@}\" --",
23
+ "preview": "vite preview",
24
+ "build-only": "vite build",
25
+ "type-check": "vue-tsc --build tsconfig.build.json",
26
+ "lint": "biome check --write",
27
+ "test": "vitest run",
28
+ "docs:dev": "vitepress dev docs",
29
+ "docs:build": "vitepress build docs",
30
+ "docs:preview": "vitepress preview docs",
31
+ "release": "release-it",
32
+ "release:patch": "release-it patch",
33
+ "release:minor": "release-it minor",
34
+ "release:major": "release-it major",
35
+ "release:dry": "release-it --dry-run",
36
+ "changelog": "changelogen",
37
+ "changelog:preview": "changelogen --no-output"
38
+ },
39
+ "dependencies": {
40
+ "@floating-ui/dom": "^1.7.4",
41
+ "@vueuse/core": "^13.7.0",
42
+ "tabbable": "^6.3.0",
43
+ "vue": "^3.5.22"
44
+ },
45
+ "devDependencies": {
46
+ "@biomejs/biome": "2.2.2",
47
+ "@tsconfig/node22": "^22.0.2",
48
+ "@types/jsdom": "^21.1.7",
49
+ "@types/node": "^22.18.0",
50
+ "@unocss/reset": "66.1.0-beta.7",
51
+ "@vitejs/plugin-vue": "^5.2.4",
52
+ "@vitest/browser": "^3.2.4",
53
+ "@vitest/coverage-v8": "^3.2.4",
54
+ "@vue/tsconfig": "^0.7.0",
55
+ "changelogen": "^0.6.2",
56
+ "jsdom": "^26.1.0",
57
+ "lucide-vue-next": "^0.513.0",
58
+ "npm-run-all2": "^7.0.2",
59
+ "playwright": "^1.55.0",
60
+ "prettier": "^3.6.2",
61
+ "release-it": "^19.0.4",
62
+ "typescript": "~5.7.3",
63
+ "unocss": "66.1.0-beta.7",
64
+ "vite": "^6.3.5",
65
+ "vite-plugin-dts": "^4.5.4",
66
+ "vite-plugin-vue-devtools": "^7.7.7",
67
+ "vitepress": "^1.6.4",
68
+ "vitepress-plugin-demo": "^0.8.1",
69
+ "vitest": "^3.2.4",
70
+ "vitest-browser-vue": "^0.2.0",
71
+ "vue-tsc": "^2.2.12"
72
+ },
73
+ "packageManager": "npm@10.9.2"
74
+ }
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-client-point.d.ts","sourceRoot":"","sources":["../../../src/composables/interactions/use-client-point.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAEL,KAAK,gBAAgB,EAErB,KAAK,GAAG,EAMT,MAAM,KAAK,CAAA;AACZ,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAOpD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAChB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACjB;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,GAAG,GAAG,GAAG,GAAG,MAAM,CAAA;AAE/C;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAE9C;;GAEG;AACH,UAAU,gBAAgB;IACxB,IAAI,EAAE,aAAa,GAAG,aAAa,GAAG,cAAc,CAAA;IACpD,WAAW,EAAE,WAAW,CAAA;IACxB,aAAa,EAAE,YAAY,CAAA;CAC5B;AAED;;GAEG;AACH,UAAU,eAAe;IACvB,MAAM,EAAE,OAAO,CAAA;CAChB;AAMD,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,OAAO,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAEnC;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAA;IAEvC;;;OAGG;IACH,CAAC,CAAC,EAAE,gBAAgB,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IAEnC;;;OAGG;IACH,CAAC,CAAC,EAAE,gBAAgB,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IAEnC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,YAAY,CAAA;CAC5B;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,WAAW,EAAE,QAAQ,CAAC,GAAG,CAAC;QAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC,CAAA;IAClE;;OAEG;IACH,cAAc,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;CAC/C;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAA;IAC5B,IAAI,EAAE;QACJ,QAAQ,EAAE,GAAG,CAAC,aAAa,CAAC,CAAA;KAC7B,CAAA;CACF;AAMD;;;GAGG;AACH,qBAAa,qBAAqB;IAChC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAA6B;IAEvE;;OAEG;IACH,MAAM,CAAC,OAAO,EAAE;QACd,WAAW,EAAE,WAAW,CAAA;QACxB,gBAAgB,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;QACrC,mBAAmB,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;QACxC,IAAI,CAAC,EAAE,cAAc,CAAA;KACtB,GAAG,cAAc;IASlB;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAmB1B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAkBzB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAiBxB;;OAEG;IACH,OAAO,CAAC,eAAe;IAwBvB;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAsB7B;;OAEG;IACH,OAAO,CAAC,aAAa;IA+BrB;;OAEG;IACH,OAAO,CAAC,YAAY;CAiBrB;AAMD;;GAEG;AACH,8BAAsB,gBAAgB;IACpC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;IAGpC,SAAS,CAAC,oBAAoB,EAAE,WAAW,GAAG,IAAI,CAAO;IAEzD;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,eAAe,GAAG,WAAW,GAAG,IAAI;IAEvF;;;OAGG;IACH,QAAQ,CAAC,iBAAiB,IAAI,gBAAgB,CAAC,MAAM,CAAC,EAAE;IAExD;;;OAGG;IACH,wBAAwB,IAAI,WAAW,GAAG,IAAI;IAM9C;;;OAGG;IACH,OAAO,IAAI,IAAI;IAKf;;OAEG;IACH,KAAK,IAAI,IAAI;CAGd;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,gBAAgB;IACjD,QAAQ,CAAC,IAAI,EAAG,QAAQ,CAAS;IAEjC;;OAEG;IACH,iBAAiB,IAAI,gBAAgB,CAAC,MAAM,CAAC,EAAE;IAI/C;;;OAGG;IACH,OAAO,CAAC,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,eAAe,GAAG,WAAW,GAAG,IAAI;CA4B/E;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,gBAAgB;IACjD,QAAQ,CAAC,IAAI,EAAG,QAAQ,CAAS;IAIjC,OAAO,CAAC,kBAAkB,CAA2B;IAErD;;;OAGG;IACH,iBAAiB,IAAI,gBAAgB,CAAC,MAAM,CAAC,EAAE;IAI/C;;;OAGG;IACH,OAAO,CAAC,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,eAAe,GAAG,WAAW,GAAG,IAAI;IAW9E;;OAEG;IACH,wBAAwB,IAAI,WAAW,GAAG,IAAI;IAS9C;;OAEG;IACH,KAAK,IAAI,IAAI;IAKb,OAAO,IAAI,IAAI;CAKhB;AAMD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,cAAc,CAC5B,aAAa,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,EACtC,OAAO,EAAE,qBAAqB,EAC9B,OAAO,GAAE,qBAA0B,GAClC,oBAAoB,CAmLtB"}
@@ -1,23 +0,0 @@
1
- /**
2
- * @fileoverview Browser environment detection utilities
3
- *
4
- * Provides utilities for detecting browser types, platforms, and
5
- * environment-specific polyfills for focus-visible behavior.
6
- */
7
- /**
8
- * Checks if the user agent is on a Mac.
9
- * @returns True if running on macOS
10
- */
11
- export declare function isMac(): boolean;
12
- /**
13
- * Checks if the browser is Safari.
14
- * @returns True if the browser is Safari
15
- */
16
- export declare function isSafari(): boolean;
17
- /**
18
- * A simple utility to check if an element matches `:focus-visible`.
19
- * @param element - The element to check
20
- * @returns True if the element matches :focus-visible
21
- */
22
- export declare function matchesFocusVisible(element: Element): boolean;
23
- //# sourceMappingURL=browser-detection.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"browser-detection.d.ts","sourceRoot":"","sources":["../../../../src/composables/interactions/utils/browser-detection.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,wBAAgB,KAAK,IAAI,OAAO,CAG/B;AAED;;;GAGG;AACH,wBAAgB,QAAQ,IAAI,OAAO,CAGlC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAG7D"}
@@ -1,53 +0,0 @@
1
- import { VirtualElement } from '@floating-ui/dom';
2
- /**
3
- * Checks if the pointer type is mouse-like (mouse or pen).
4
- * @param pointerType - The pointer type string.
5
- * @param strict - If true, only considers "mouse".
6
- * @returns True if the pointer type is mouse-like.
7
- */
8
- export declare function isMouseLikePointerType(pointerType: string | undefined, strict?: boolean): boolean;
9
- /**
10
- * Checks if the element is an input, textarea, or contenteditable element.
11
- * @param element - The element to check.
12
- * @returns True if the element is typeable.
13
- */
14
- export declare function isTypeableElement(element: Element | null): boolean;
15
- /**
16
- * Checks if the event target is a button-like element.
17
- * @param event - The KeyboardEvent.
18
- * @returns True if the target is a button.
19
- */
20
- export declare function isButtonTarget(event: KeyboardEvent): boolean;
21
- /**
22
- * Checks if the Space key press should be ignored for the given element.
23
- * @param element - The element to check.
24
- * @returns True if Space should be ignored.
25
- */
26
- export declare function isSpaceIgnored(element: Element | null): boolean;
27
- /**
28
- * Checks if the value is an HTML element.
29
- * @param node - The value to check.
30
- * @returns True if the value is an HTML element.
31
- */
32
- export declare function isHTMLElement(node: unknown | null): node is HTMLElement;
33
- /**
34
- * Checks if the value is a VirtualElement.
35
- * @param el - The value to check.
36
- * @returns True if the value is a VirtualElement.
37
- */
38
- export declare function isVirtualElement(el: unknown): el is VirtualElement;
39
- /**
40
- * Checks if the event target is within the given element.
41
- * @param event - The event to check.
42
- * @param element - The element to check containment against.
43
- * @returns True if the event target is within the element.
44
- */
45
- export declare function isEventTargetWithin(event: Event, element: Element | null | undefined): boolean;
46
- /**
47
- * Checks if a click event occurred on a scrollbar.
48
- * @param event - The mouse event.
49
- * @param target - The target HTML element.
50
- * @returns True if the click was on a scrollbar.
51
- */
52
- export declare function isClickOnScrollbar(event: MouseEvent, target: HTMLElement): boolean;
53
- //# sourceMappingURL=element-detection.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"element-detection.d.ts","sourceRoot":"","sources":["../../../../src/composables/interactions/utils/element-detection.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEtD;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,CAIjG;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,OAAO,CAQlE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAS5D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,OAAO,CAE/D;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,GAAG,IAAI,IAAI,WAAW,CAEvE;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,OAAO,GAAG,EAAE,IAAI,cAAc,CAElE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAQ9F;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CA0BlF"}
@@ -1,30 +0,0 @@
1
- /**
2
- * @fileoverview Event handling and timing utilities
3
- *
4
- * Provides utilities for event handling, timing operations,
5
- * and DOM element containment checks.
6
- */
7
- /**
8
- * Simple element containment wrapper.
9
- * @param el - The container element
10
- * @param target - The target element to check
11
- * @returns True if the container contains the target
12
- */
13
- export declare function contains(el: HTMLElement, target: Element | null): boolean;
14
- /**
15
- * Event target extraction utility.
16
- * @param event - The mouse or touch event
17
- * @returns The event target as an Element or null
18
- */
19
- export declare function getTarget(event: MouseEvent | TouchEvent): Element | null;
20
- /**
21
- * Safe performance timing that handles environments without performance API.
22
- * @returns Current timestamp in milliseconds
23
- */
24
- export declare function getCurrentTime(): number;
25
- /**
26
- * Centralized timeout management to prevent memory leaks.
27
- * @param timeoutId - The timeout ID to clear
28
- */
29
- export declare function clearTimeoutIfSet(timeoutId: number): void;
30
- //# sourceMappingURL=event-utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"event-utils.d.ts","sourceRoot":"","sources":["../../../../src/composables/interactions/utils/event-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,GAAG,OAAO,CAEzE;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,GAAG,OAAO,GAAG,IAAI,CAExE;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAIzD"}
@@ -1,11 +0,0 @@
1
- /**
2
- * @fileoverview Centralized utility functions for interaction composables
3
- *
4
- * This module exports shared helper functions to eliminate code duplication
5
- * across use-click, use-focus, use-hover, use-client-point, and polygon composables.
6
- */
7
- export { isMac, isSafari, matchesFocusVisible, } from './browser-detection';
8
- export { isButtonTarget, isClickOnScrollbar, isEventTargetWithin, isHTMLElement, isMouseLikePointerType, isSpaceIgnored, isTypeableElement, isVirtualElement, } from './element-detection';
9
- export { clearTimeoutIfSet, contains, getCurrentTime, getTarget, } from './event-utils';
10
- export { findDescendantContainingTarget, getContextFromParameter, isTargetWithinElement, isTreeNode, } from './tree-context';
11
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/composables/interactions/utils/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,KAAK,EACL,QAAQ,EACR,mBAAmB,GACpB,MAAM,qBAAqB,CAAA;AAG5B,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACb,sBAAsB,EACtB,cAAc,EACd,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EACL,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,SAAS,GACV,MAAM,eAAe,CAAA;AAEtB,OAAO,EACL,8BAA8B,EAC9B,uBAAuB,EACvB,qBAAqB,EACrB,UAAU,GACX,MAAM,gBAAgB,CAAA"}