Socket
Socket
Sign inDemoInstall

@floating-ui/react

Package Overview
Dependencies
10
Maintainers
2
Versions
50
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.26.5 to 0.26.6

4

dist/floating-ui.react.umd.min.js

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("@floating-ui/react-dom"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","@floating-ui/react-dom","react-dom"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).FloatingUIReact={},e.React,e.FloatingUIReactDOM,e.ReactDOM)}(this,(function(e,t,n,r){"use strict";function o(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var u=o(t);function i(e){return u.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}),e)}const c=u["useInsertionEffect".toString()]||(e=>e());function l(e){const t=u.useRef((()=>{}));return c((()=>{t.current=e})),u.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function s(e){return f(e)?(e.nodeName||"").toLowerCase():"#document"}function a(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function f(e){return e instanceof Node||e instanceof a(e).Node}function d(e){return e instanceof Element||e instanceof a(e).Element}function v(e){return e instanceof HTMLElement||e instanceof a(e).HTMLElement}function m(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof a(e).ShadowRoot)}function p(e){return["html","body","#document"].includes(s(e))}function g(e){if("html"===s(e))return e;const t=e.assignedSlot||e.parentNode||m(e)&&e.host||function(e){var t;return null==(t=(f(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}(e);return m(t)?t.host:t}function h(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}function y(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&m(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function b(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function E(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:n}=e;return t+"/"+n})).join(" "):navigator.userAgent}function w(e){return!(0!==e.mozInputSource||!e.isTrusted)||(I()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function x(e){return!I()&&0===e.width&&0===e.height||I()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType}function R(){return/apple/i.test(navigator.vendor)}function I(){const e=/android/i;return e.test(b())||e.test(E())}function k(){return b().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function O(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function C(e){return(null==e?void 0:e.ownerDocument)||document}function M(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function T(e){return"composedPath"in e?e.composedPath()[0]:e.target}const S="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function P(e){return v(e)&&e.matches(S)}function L(e){e.preventDefault(),e.stopPropagation()}function A(e){return!!e&&("combobox"===e.getAttribute("role")&&P(e))}const D=Math.floor,N="ArrowUp",F="ArrowDown",j="ArrowLeft",K="ArrowRight";function H(e,t,n){return Math.floor(e/t)!==n}function q(e,t){return t<0||t>=e.current.length}function _(e,t){return W(e,{disabledIndices:t})}function B(e,t){return W(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function W(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:u=1}=void 0===t?{}:t;const i=e.current,c=o?e=>o.includes(e):e=>{const t=i[e];return null==t||t.hasAttribute("disabled")||"true"===t.getAttribute("aria-disabled")};let l=n;do{l+=r?-u:u}while(l>=0&&l<=i.length-1&&c(l));return l}function U(e,t){let{event:n,orientation:r,loop:o,cols:u,disabledIndices:i,minIndex:c,maxIndex:l,prevIndex:s,stopEvent:a=!1}=t,f=s;if(n.key===N){if(a&&L(n),-1===s)f=l;else if(f=W(e,{startingIndex:f,amount:u,decrement:!0,disabledIndices:i}),o&&(s-u<c||f<0)){const e=s%u,t=l%u,n=l-(t-e);f=t===e?l:t>e?n:n-u}q(e,f)&&(f=s)}if(n.key===F&&(a&&L(n),-1===s?f=c:(f=W(e,{startingIndex:s,amount:u,disabledIndices:i}),o&&s+u>l&&(f=W(e,{startingIndex:s%u-u,amount:u,disabledIndices:i}))),q(e,f)&&(f=s)),"both"===r){const t=D(s/u);n.key===K&&(a&&L(n),s%u!=u-1?(f=W(e,{startingIndex:s,disabledIndices:i}),o&&H(f,u,t)&&(f=W(e,{startingIndex:s-s%u-1,disabledIndices:i}))):o&&(f=W(e,{startingIndex:s-s%u-1,disabledIndices:i})),H(f,u,t)&&(f=s)),n.key===j&&(a&&L(n),s%u!=0?(f=W(e,{startingIndex:s,disabledIndices:i,decrement:!0}),o&&H(f,u,t)&&(f=W(e,{startingIndex:s+(u-s%u),decrement:!0,disabledIndices:i}))):o&&(f=W(e,{startingIndex:s+(u-s%u),decrement:!0,disabledIndices:i})),H(f,u,t)&&(f=s));const r=D(l/u)===t;q(e,f)&&(f=o&&r?n.key===j?l:W(e,{startingIndex:s-s%u-1,disabledIndices:i}):s)}return f}function z(e,t,n){const r=[];let o=0;return e.forEach(((e,u)=>{let{width:i,height:c}=e,l=!1;for(n&&(o=0);!l;){const e=[];for(let n=0;n<i;n++)for(let r=0;r<c;r++)e.push(o+n+r*t);o%t+i<=t&&e.every((e=>void 0===r[e]))?(e.forEach((e=>r[e]=u)),l=!0):o++}})),[...r]}function X(e,t,n,r,o){if(-1===e)return-1;const u=n.indexOf(e);switch(o){case"tl":return u;case"tr":return u+t[e].width-1;case"bl":return u+(t[e].height-1)*r;case"br":return n.lastIndexOf(e)}}function Y(e,t){return t.flatMap(((t,n)=>e.includes(t)?[n]:[]))}let V=0;function G(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(V);const u=()=>null==e?void 0:e.focus({preventScroll:n});o?u():V=requestAnimationFrame(u)}var Z="undefined"!=typeof document?t.useLayoutEffect:t.useEffect;function $(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Q=u.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function J(e){let{children:t,elementsRef:n,labelsRef:r}=e;const[o,i]=u.useState((()=>new Map)),c=u.useCallback((e=>{i((t=>new Map(t).set(e,null)))}),[]),l=u.useCallback((e=>{i((t=>{const n=new Map(t);return n.delete(e),n}))}),[]);return Z((()=>{const e=new Map(o);Array.from(e.keys()).sort($).forEach(((t,n)=>{e.set(t,n)})),function(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e.entries())if(r!==t.get(n))return!1;return!0}(o,e)||i(e)}),[o]),u.createElement(Q.Provider,{value:u.useMemo((()=>({register:c,unregister:l,map:o,elementsRef:n,labelsRef:r})),[c,l,o,n,r])},t)}function ee(e){let{label:t}=void 0===e?{}:e;const[n,r]=u.useState(null),o=u.useRef(null),{register:i,unregister:c,map:l,elementsRef:s,labelsRef:a}=u.useContext(Q),f=u.useCallback((e=>{if(o.current=e,null!==n&&(s.current[n]=e,a)){var r;const o=void 0!==t;a.current[n]=o?t:null!=(r=null==e?void 0:e.textContent)?r:null}}),[n,s,a,t]);return Z((()=>{const e=o.current;if(e)return i(e),()=>{c(e)}}),[i,c]),Z((()=>{const e=o.current?l.get(o.current):null;null!=e&&r(e)}),[l]),u.useMemo((()=>({ref:f,index:null==n?-1:n})),[n,f])}function te(e,t){return"function"==typeof e?e(t):e?u.cloneElement(e,t):u.createElement("div",t)}const ne=u.createContext({activeIndex:0,onNavigate:()=>{}}),re=[j,K],oe=[N,F],ue=[...re,...oe],ie=u.forwardRef((function(e,t){let{render:n,orientation:r="both",loop:o=!0,cols:i=1,disabledIndices:c=[],activeIndex:s,onNavigate:a,itemSizes:f,dense:d=!1,...v}=e;const[m,p]=u.useState(0),g=null!=s?s:m,h=l(null!=a?a:p),y=u.useRef([]),b=n&&"function"!=typeof n?n.props:{},E=u.useMemo((()=>({activeIndex:g,onNavigate:h})),[g,h]),w=i>1;const x={...v,...b,ref:t,"aria-orientation":"both"===r?void 0:r,onKeyDown(e){null==v.onKeyDown||v.onKeyDown(e),null==b.onKeyDown||b.onKeyDown(e),function(e){if(!ue.includes(e.key))return;let t=g;if(w){const n=null!=f?f:Array.from(Array(y.current.length),(()=>({width:1,height:1}))),u=z(n,i,d),l=u.findIndex((e=>null!=e&&!c.includes(e))),s=u.reduce(((e,t,n)=>null==t||null!=c&&c.includes(t)?e:n),-1);t=u[U({current:u.map((e=>e?y.current[e]:null))},{event:e,orientation:r,loop:o,cols:i,disabledIndices:Y([...c,void 0],u),minIndex:l,maxIndex:s,prevIndex:X(g,n,u,i,e.key===F?"bl":e.key===K?"tr":"tl")})]}const n=_(y,c),u=B(y,c),l={horizontal:[K],vertical:[F],both:[K,F]}[r],s={horizontal:[j],vertical:[N],both:[j,N]}[r],a=w?ue:{horizontal:re,vertical:oe,both:ue}[r];t===g&&[...l,...s].includes(e.key)&&(t=o&&t===u&&l.includes(e.key)?n:o&&t===n&&s.includes(e.key)?u:W(y,{startingIndex:t,decrement:s.includes(e.key),disabledIndices:c})),t===g||q(y,t)||(e.stopPropagation(),a.includes(e.key)&&e.preventDefault(),h(t),queueMicrotask((()=>{G(y.current[t])})))}(e)}};return u.createElement(ne.Provider,{value:E},u.createElement(J,{elementsRef:y},te(n,x)))})),ce=u.forwardRef((function(e,t){let{render:n,...r}=e;const o=n&&"function"!=typeof n?n.props:{},{activeIndex:c,onNavigate:l}=u.useContext(ne),{ref:s,index:a}=ee(),f=i([s,t,o.ref]),d=c===a;return te(n,{...r,...o,ref:f,tabIndex:d?0:-1,"data-active":d?"":void 0,onFocus(e){null==r.onFocus||r.onFocus(e),null==o.onFocus||o.onFocus(e),l(a)}})}));function le(){return le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},le.apply(this,arguments)}let se=!1,ae=0;const fe=()=>"floating-ui-"+ae++;const de=u["useId".toString()]||function(){const[e,t]=u.useState((()=>se?fe():void 0));return Z((()=>{null==e&&t(fe())}),[]),u.useEffect((()=>{se||(se=!0)}),[]),e},ve=u.forwardRef((function(e,t){let{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:c=14,height:l=7,tipRadius:s=0,strokeWidth:a=0,staticOffset:f,stroke:d,d:v,style:{transform:m,...p}={},...g}=e;const h=de();if(!o)return null;a*=2;const y=a/2,b=c/2*(s/-8+1),E=l/2*s/4,[w,x]=r.split("-"),R=n.platform.isRTL(o),I=!!v,k="top"===w||"bottom"===w,O=f&&"end"===x?"bottom":"top";let C=f&&"end"===x?"right":"left";f&&R&&(C="end"===x?"left":"right");const M=null!=(null==i?void 0:i.x)?f||i.x:"",T=null!=(null==i?void 0:i.y)?f||i.y:"",S=v||"M0,0 H"+c+" L"+(c-b)+","+(l-E)+" Q"+c/2+","+l+" "+b+","+(l-E)+" Z",P={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[w];return u.createElement("svg",le({},g,{"aria-hidden":!0,ref:t,width:I?c:c+a,height:c,viewBox:"0 0 "+c+" "+(l>c?l:c),style:{position:"absolute",pointerEvents:"none",[C]:M,[O]:T,[w]:k||I?"100%":"calc(100% - "+a/2+"px)",transform:""+P+(null!=m?m:""),...p}}),a>0&&u.createElement("path",{clipPath:"url(#"+h+")",fill:"none",stroke:d,strokeWidth:a+(v?0:1),d:S}),u.createElement("path",{stroke:a&&!v?g.fill:"none",d:S}),u.createElement("clipPath",{id:h},u.createElement("rect",{x:-y,y:y*(I?-1:1),width:c+a,height:c})))}));function me(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}const pe=u.createContext(null),ge=u.createContext(null),he=()=>{var e;return(null==(e=u.useContext(pe))?void 0:e.id)||null},ye=()=>u.useContext(ge);function be(e){return"data-floating-ui-"+e}function Ee(e){const n=t.useRef(e);return Z((()=>{n.current=e})),n}const we=be("safe-polygon");function xe(e,t,n){return n&&!O(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}const Re=u.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:()=>{},setState:()=>{},isInstantPhase:!1}),Ie=()=>u.useContext(Re);
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("@floating-ui/react-dom"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","@floating-ui/react-dom","react-dom"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).FloatingUIReact={},e.React,e.FloatingUIReactDOM,e.ReactDOM)}(this,(function(e,t,n,r){"use strict";function o(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var u=o(t);function i(e){return u.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}),e)}const l=u["useInsertionEffect".toString()]||(e=>e());function c(e){const t=u.useRef((()=>{}));return l((()=>{t.current=e})),u.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function s(e){return f(e)?(e.nodeName||"").toLowerCase():"#document"}function a(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function f(e){return e instanceof Node||e instanceof a(e).Node}function d(e){return e instanceof Element||e instanceof a(e).Element}function v(e){return e instanceof HTMLElement||e instanceof a(e).HTMLElement}function m(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof a(e).ShadowRoot)}function p(e){return["html","body","#document"].includes(s(e))}function g(e){if("html"===s(e))return e;const t=e.assignedSlot||e.parentNode||m(e)&&e.host||function(e){var t;return null==(t=(f(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}(e);return m(t)?t.host:t}function h(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}function y(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&m(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function b(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function E(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:n}=e;return t+"/"+n})).join(" "):navigator.userAgent}function w(e){return!(0!==e.mozInputSource||!e.isTrusted)||(I()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function x(e){return!E().includes("jsdom/")&&(!I()&&0===e.width&&0===e.height||I()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function R(){return/apple/i.test(navigator.vendor)}function I(){const e=/android/i;return e.test(b())||e.test(E())}function k(){return b().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function O(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function C(e){return(null==e?void 0:e.ownerDocument)||document}function M(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function T(e){return"composedPath"in e?e.composedPath()[0]:e.target}const S="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function P(e){return v(e)&&e.matches(S)}function L(e){e.preventDefault(),e.stopPropagation()}function A(e){return!!e&&("combobox"===e.getAttribute("role")&&P(e))}const D=Math.floor,N="ArrowUp",F="ArrowDown",j="ArrowLeft",K="ArrowRight";function H(e,t,n){return Math.floor(e/t)!==n}function q(e,t){return t<0||t>=e.current.length}function _(e,t){return W(e,{disabledIndices:t})}function B(e,t){return W(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function W(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:u=1}=void 0===t?{}:t;const i=e.current,l=o?e=>o.includes(e):e=>{const t=i[e];return null==t||t.hasAttribute("disabled")||"true"===t.getAttribute("aria-disabled")};let c=n;do{c+=r?-u:u}while(c>=0&&c<=i.length-1&&l(c));return c}function U(e,t){let{event:n,orientation:r,loop:o,cols:u,disabledIndices:i,minIndex:l,maxIndex:c,prevIndex:s,stopEvent:a=!1}=t,f=s;if(n.key===N){if(a&&L(n),-1===s)f=c;else if(f=W(e,{startingIndex:f,amount:u,decrement:!0,disabledIndices:i}),o&&(s-u<l||f<0)){const e=s%u,t=c%u,n=c-(t-e);f=t===e?c:t>e?n:n-u}q(e,f)&&(f=s)}if(n.key===F&&(a&&L(n),-1===s?f=l:(f=W(e,{startingIndex:s,amount:u,disabledIndices:i}),o&&s+u>c&&(f=W(e,{startingIndex:s%u-u,amount:u,disabledIndices:i}))),q(e,f)&&(f=s)),"both"===r){const t=D(s/u);n.key===K&&(a&&L(n),s%u!=u-1?(f=W(e,{startingIndex:s,disabledIndices:i}),o&&H(f,u,t)&&(f=W(e,{startingIndex:s-s%u-1,disabledIndices:i}))):o&&(f=W(e,{startingIndex:s-s%u-1,disabledIndices:i})),H(f,u,t)&&(f=s)),n.key===j&&(a&&L(n),s%u!=0?(f=W(e,{startingIndex:s,disabledIndices:i,decrement:!0}),o&&H(f,u,t)&&(f=W(e,{startingIndex:s+(u-s%u),decrement:!0,disabledIndices:i}))):o&&(f=W(e,{startingIndex:s+(u-s%u),decrement:!0,disabledIndices:i})),H(f,u,t)&&(f=s));const r=D(c/u)===t;q(e,f)&&(f=o&&r?n.key===j?c:W(e,{startingIndex:s-s%u-1,disabledIndices:i}):s)}return f}function z(e,t,n){const r=[];let o=0;return e.forEach(((e,u)=>{let{width:i,height:l}=e,c=!1;for(n&&(o=0);!c;){const e=[];for(let n=0;n<i;n++)for(let r=0;r<l;r++)e.push(o+n+r*t);o%t+i<=t&&e.every((e=>null==r[e]))?(e.forEach((e=>{r[e]=u})),c=!0):o++}})),[...r]}function X(e,t,n,r,o){if(-1===e)return-1;const u=n.indexOf(e);switch(o){case"tl":return u;case"tr":return u+t[e].width-1;case"bl":return u+(t[e].height-1)*r;case"br":return n.lastIndexOf(e)}}function Y(e,t){return t.flatMap(((t,n)=>e.includes(t)?[n]:[]))}let V=0;function G(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(V);const u=()=>null==e?void 0:e.focus({preventScroll:n});o?u():V=requestAnimationFrame(u)}var Z="undefined"!=typeof document?t.useLayoutEffect:t.useEffect;function $(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Q=u.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function J(e){let{children:t,elementsRef:n,labelsRef:r}=e;const[o,i]=u.useState((()=>new Map)),l=u.useCallback((e=>{i((t=>new Map(t).set(e,null)))}),[]),c=u.useCallback((e=>{i((t=>{const n=new Map(t);return n.delete(e),n}))}),[]);return Z((()=>{const e=new Map(o);Array.from(e.keys()).sort($).forEach(((t,n)=>{e.set(t,n)})),function(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e.entries())if(r!==t.get(n))return!1;return!0}(o,e)||i(e)}),[o]),u.createElement(Q.Provider,{value:u.useMemo((()=>({register:l,unregister:c,map:o,elementsRef:n,labelsRef:r})),[l,c,o,n,r])},t)}function ee(e){let{label:t}=void 0===e?{}:e;const[n,r]=u.useState(null),o=u.useRef(null),{register:i,unregister:l,map:c,elementsRef:s,labelsRef:a}=u.useContext(Q),f=u.useCallback((e=>{if(o.current=e,null!==n&&(s.current[n]=e,a)){var r;const o=void 0!==t;a.current[n]=o?t:null!=(r=null==e?void 0:e.textContent)?r:null}}),[n,s,a,t]);return Z((()=>{const e=o.current;if(e)return i(e),()=>{l(e)}}),[i,l]),Z((()=>{const e=o.current?c.get(o.current):null;null!=e&&r(e)}),[c]),u.useMemo((()=>({ref:f,index:null==n?-1:n})),[n,f])}function te(e,t){return"function"==typeof e?e(t):e?u.cloneElement(e,t):u.createElement("div",t)}const ne=u.createContext({activeIndex:0,onNavigate:()=>{}}),re=[j,K],oe=[N,F],ue=[...re,...oe],ie=u.forwardRef((function(e,t){let{render:n,orientation:r="both",loop:o=!0,cols:i=1,disabledIndices:l=[],activeIndex:s,onNavigate:a,itemSizes:f,dense:d=!1,...v}=e;const[m,p]=u.useState(0),g=null!=s?s:m,h=c(null!=a?a:p),y=u.useRef([]),b=n&&"function"!=typeof n?n.props:{},E=u.useMemo((()=>({activeIndex:g,onNavigate:h})),[g,h]),w=i>1;const x={...v,...b,ref:t,"aria-orientation":"both"===r?void 0:r,onKeyDown(e){null==v.onKeyDown||v.onKeyDown(e),null==b.onKeyDown||b.onKeyDown(e),function(e){if(!ue.includes(e.key))return;let t=g;if(w){const n=null!=f?f:Array.from(Array(y.current.length),(()=>({width:1,height:1}))),u=z(n,i,d),c=u.findIndex((e=>null!=e&&!l.includes(e))),s=u.reduce(((e,t,n)=>null==t||null!=l&&l.includes(t)?e:n),-1);t=u[U({current:u.map((e=>e?y.current[e]:null))},{event:e,orientation:r,loop:o,cols:i,disabledIndices:Y([...l,void 0],u),minIndex:c,maxIndex:s,prevIndex:X(g,n,u,i,e.key===F?"bl":e.key===K?"tr":"tl")})]}const n=_(y,l),u=B(y,l),c={horizontal:[K],vertical:[F],both:[K,F]}[r],s={horizontal:[j],vertical:[N],both:[j,N]}[r],a=w?ue:{horizontal:re,vertical:oe,both:ue}[r];t===g&&[...c,...s].includes(e.key)&&(t=o&&t===u&&c.includes(e.key)?n:o&&t===n&&s.includes(e.key)?u:W(y,{startingIndex:t,decrement:s.includes(e.key),disabledIndices:l})),t===g||q(y,t)||(e.stopPropagation(),a.includes(e.key)&&e.preventDefault(),h(t),queueMicrotask((()=>{G(y.current[t])})))}(e)}};return u.createElement(ne.Provider,{value:E},u.createElement(J,{elementsRef:y},te(n,x)))})),le=u.forwardRef((function(e,t){let{render:n,...r}=e;const o=n&&"function"!=typeof n?n.props:{},{activeIndex:l,onNavigate:c}=u.useContext(ne),{ref:s,index:a}=ee(),f=i([s,t,o.ref]),d=l===a;return te(n,{...r,...o,ref:f,tabIndex:d?0:-1,"data-active":d?"":void 0,onFocus(e){null==r.onFocus||r.onFocus(e),null==o.onFocus||o.onFocus(e),c(a)}})}));function ce(){return ce=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ce.apply(this,arguments)}let se=!1,ae=0;const fe=()=>"floating-ui-"+ae++;const de=u["useId".toString()]||function(){const[e,t]=u.useState((()=>se?fe():void 0));return Z((()=>{null==e&&t(fe())}),[]),u.useEffect((()=>{se||(se=!0)}),[]),e},ve=u.forwardRef((function(e,t){let{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:l=14,height:c=7,tipRadius:s=0,strokeWidth:a=0,staticOffset:f,stroke:d,d:v,style:{transform:m,...p}={},...g}=e;const h=de();if(!o)return null;a*=2;const y=a/2,b=l/2*(s/-8+1),E=c/2*s/4,[w,x]=r.split("-"),R=n.platform.isRTL(o),I=!!v,k="top"===w||"bottom"===w,O=f&&"end"===x?"bottom":"top";let C=f&&"end"===x?"right":"left";f&&R&&(C="end"===x?"left":"right");const M=null!=(null==i?void 0:i.x)?f||i.x:"",T=null!=(null==i?void 0:i.y)?f||i.y:"",S=v||"M0,0 H"+l+" L"+(l-b)+","+(c-E)+" Q"+l/2+","+c+" "+b+","+(c-E)+" Z",P={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[w];return u.createElement("svg",ce({},g,{"aria-hidden":!0,ref:t,width:I?l:l+a,height:l,viewBox:"0 0 "+l+" "+(c>l?c:l),style:{position:"absolute",pointerEvents:"none",[C]:M,[O]:T,[w]:k||I?"100%":"calc(100% - "+a/2+"px)",transform:""+P+(null!=m?m:""),...p}}),a>0&&u.createElement("path",{clipPath:"url(#"+h+")",fill:"none",stroke:d,strokeWidth:a+(v?0:1),d:S}),u.createElement("path",{stroke:a&&!v?g.fill:"none",d:S}),u.createElement("clipPath",{id:h},u.createElement("rect",{x:-y,y:y*(I?-1:1),width:l+a,height:l})))}));function me(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}const pe=u.createContext(null),ge=u.createContext(null),he=()=>{var e;return(null==(e=u.useContext(pe))?void 0:e.id)||null},ye=()=>u.useContext(ge);function be(e){return"data-floating-ui-"+e}function Ee(e){const n=t.useRef(e);return Z((()=>{n.current=e})),n}const we=be("safe-polygon");function xe(e,t,n){return n&&!O(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}const Re=u.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:()=>{},setState:()=>{},isInstantPhase:!1}),Ie=()=>u.useContext(Re);
/*!

@@ -6,2 +6,2 @@ * tabbable 6.2.0

*/
var ke=["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])"].join(","),Oe="undefined"==typeof Element,Ce=Oe?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Me=!Oe&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},Te=function e(t,n){var r;void 0===n&&(n=!0);var o=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},Se=function e(t,n,r){for(var o=[],u=Array.from(t);u.length;){var i=u.shift();if(!Te(i,!1))if("SLOT"===i.tagName){var c=i.assignedElements(),l=e(c.length?c:i.children,!0,r);r.flatten?o.push.apply(o,l):o.push({scopeParent:i,candidates:l})}else{Ce.call(i,ke)&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var s=i.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(i),a=!Te(s,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(s&&a){var f=e(!0===s?i.children:s.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:i,candidates:f})}else u.unshift.apply(u,i.children)}}return o},Pe=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Le=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!Pe(e)?0:e.tabIndex},Ae=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},De=function(e){return"INPUT"===e.tagName},Ne=function(e){return function(e){return De(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||Me(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){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",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)},Fe=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},je=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=Ce.call(e,"details>summary:first-of-type")?e.parentElement:e;if(Ce.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return Fe(e)}else{if("function"==typeof r){for(var u=e;e;){var i=e.parentElement,c=Me(e);if(i&&!i.shadowRoot&&!0===r(i))return Fe(e);e=e.assignedSlot?e.assignedSlot:i||c===e.ownerDocument?i:c.host}e=u}if(function(e){var t,n,r,o,u=e&&Me(e),i=null===(t=u)||void 0===t?void 0:t.host,c=!1;if(u&&u!==e)for(c=!!(null!==(n=i)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(i)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!c&&i;){var l,s,a;c=!(null===(s=i=null===(l=u=Me(i))||void 0===l?void 0:l.host)||void 0===s||null===(a=s.ownerDocument)||void 0===a||!a.contains(i))}return c}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},Ke=function(e,t){return!(t.disabled||Te(t)||function(e){return De(e)&&"hidden"===e.type}(t)||je(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!Ce.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},He=function(e,t){return!(Ne(t)||Le(t)<0||!Ke(e,t))},qe=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},_e=function e(t){var n=[],r=[];return t.forEach((function(t,o){var u=!!t.scopeParent,i=u?t.scopeParent:t,c=function(e,t){var n=Le(e);return n<0&&t&&!Pe(e)?0:n}(i,u),l=u?e(t.candidates):i;0===c?u?n.push.apply(n,l):n.push(i):r.push({documentOrder:o,tabIndex:c,item:t,isScope:u,content:l})})),r.sort(Ae).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},Be=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Se([e],t.includeContainer,{filter:He.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:qe}):function(e,t,n){if(Te(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(ke));return t&&Ce.call(e,ke)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,He.bind(null,t)),_e(n)};function We(e,t){let n=e.filter((e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)})),r=n;for(;r.length;)r=e.filter((e=>{var t;return null==(t=r)?void 0:t.some((t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)}))})),n=n.concat(r);return n}let Ue=new WeakMap,ze=new WeakSet,Xe={},Ye=0;const Ve=e=>e&&(e.host||Ve(e.parentNode)),Ge=(e,t)=>t.map((t=>{if(e.contains(t))return t;const n=Ve(t);return e.contains(n)?n:null})).filter((e=>null!=e));function Ze(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=C(e[0]).body;return function(e,t,n,r){const o="data-floating-ui-inert",u=r?"inert":n?"aria-hidden":null,i=Ge(t,e),c=new Set,l=new Set(i),s=[];Xe[o]||(Xe[o]=new WeakMap);const a=Xe[o];return i.forEach((function e(t){t&&!c.has(t)&&(c.add(t),t.parentNode&&e(t.parentNode))})),function e(t){t&&!l.has(t)&&Array.prototype.forEach.call(t.children,(t=>{if(c.has(t))e(t);else{const e=u?t.getAttribute(u):null,n=null!==e&&"false"!==e,r=(Ue.get(t)||0)+1,i=(a.get(t)||0)+1;Ue.set(t,r),a.set(t,i),s.push(t),1===r&&n&&ze.add(t),1===i&&t.setAttribute(o,""),!n&&u&&t.setAttribute(u,"true")}}))}(t),c.clear(),Ye++,()=>{s.forEach((e=>{const t=(Ue.get(e)||0)-1,n=(a.get(e)||0)-1;Ue.set(e,t),a.set(e,n),t||(!ze.has(e)&&u&&e.removeAttribute(u),ze.delete(e)),n||e.removeAttribute(o)})),Ye--,Ye||(Ue=new WeakMap,Ue=new WeakMap,ze=new WeakSet,Xe={})}}(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const $e=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Qe(e,t){const n=Be(e,$e());"prev"===t&&n.reverse();const r=n.indexOf(h(C(e)));return n.slice(r+1)[0]}function Je(){return Qe(document.body,"next")}function et(){return Qe(document.body,"prev")}function tt(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!y(n,r)}function nt(e){Be(e,$e()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function rt(e){e.querySelectorAll("[data-tabindex]").forEach((e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}))}const ot={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function ut(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const it=u.forwardRef((function(e,t){const[n,r]=u.useState();Z((()=>(R()&&r("button"),document.addEventListener("keydown",ut),()=>{document.removeEventListener("keydown",ut)})),[]);const o={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[be("focus-guard")]:"",style:ot};return u.createElement("span",le({},e,o))})),ct=u.createContext(null);function lt(e){let{id:t,root:n}=void 0===e?{}:e;const[r,o]=u.useState(null),i=de(),c=st(),l=u.useMemo((()=>({id:t,root:n,portalContext:c,uniqueId:i})),[t,n,c,i]),s=u.useRef();return Z((()=>()=>{null==r||r.remove()}),[r,l]),Z((()=>{if(s.current===l)return;s.current=l;const{id:e,root:t,portalContext:n,uniqueId:r}=l,u=e?document.getElementById(e):null,i=be("portal");if(u){const e=document.createElement("div");e.id=r,e.setAttribute(i,""),u.appendChild(e),o(e)}else{let u=t||(null==n?void 0:n.portalNode);u&&!d(u)&&(u=u.current),u=u||document.body;let c=null;e&&(c=document.createElement("div"),c.id=e,u.appendChild(c));const l=document.createElement("div");l.id=r,l.setAttribute(i,""),u=c||u,u.appendChild(l),o(l)}}),[l]),r}const st=()=>u.useContext(ct),at=20;let ft=[];function dt(e){ft=ft.filter((e=>e.isConnected)),e&&"body"!==s(e)&&(ft.push(e),ft.length>at&&(ft=ft.slice(-at)))}function vt(){return ft.slice().reverse().find((e=>e.isConnected))}const mt=u.forwardRef((function(e,t){return u.createElement("button",le({},e,{type:"button",ref:t,tabIndex:-1,style:ot}))}));const pt=new Set,gt=u.forwardRef((function(e,t){let{lockScroll:n=!1,...r}=e;const o=de();return Z((()=>{if(!n)return;pt.add(o);const e=/iP(hone|ad|od)|iOS/.test(b()),t=document.body.style,r=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,i=t.left?parseFloat(t.left):window.pageXOffset,c=t.top?parseFloat(t.top):window.pageYOffset;if(t.overflow="hidden",u&&(t[r]=u+"px"),e){var l,s;const e=(null==(l=window.visualViewport)?void 0:l.offsetLeft)||0,n=(null==(s=window.visualViewport)?void 0:s.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(c-Math.floor(n))+"px",left:-(i-Math.floor(e))+"px",right:"0"})}return()=>{pt.delete(o),0===pt.size&&(Object.assign(t,{overflow:"",[r]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(i,c)))}}),[o,n]),u.createElement("div",le({ref:t},r,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...r.style}}))}));function ht(e){return v(e.target)&&"BUTTON"===e.target.tagName}function yt(e){return P(e)}function bt(e){return null!=e&&null!=e.clientX}const Et={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},wt={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},xt=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};const Rt="active",It="selected";function kt(e,t,n){const r=new Map,o="item"===n;let u=e;if(o&&e){const{[Rt]:t,[It]:n,...r}=e;u=r}return{..."floating"===n&&{tabIndex:-1},...u,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,u]=t;var i;o&&[Rt,It].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof u&&(null==(i=r.get(n))||i.push(u),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),u=0;u<t;u++)o[u]=arguments[u];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})):e[n]=u)})),e):e),{})}}let Ot=!1;function Ct(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Mt(e,t){return Ct(t,e===N||e===F,e===j||e===K)}function Tt(e,t,n){return Ct(t,e===F,n?e===j:e===K)||"Enter"===e||" "==e||""===e}function St(e,t,n){return Ct(t,n?e===K:e===j,e===N)}const Pt=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);const Lt=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((e,t)=>(t?"-":"")+e.toLowerCase()));function At(e,t){return"function"==typeof e?e(t):e}function Dt(e,t){void 0===t&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,i=("number"==typeof o?o:o.close)||0,[c,l]=u.useState(!1),[s,a]=u.useState("unmounted"),f=function(e,t){const[n,r]=u.useState(e);return e&&!n&&r(!0),u.useEffect((()=>{if(!e){const e=setTimeout((()=>r(!1)),t);return()=>clearTimeout(e)}}),[e,t]),n}(n,i);return Z((()=>{c&&!f&&a("unmounted")}),[c,f]),Z((()=>{if(r){if(n){a("initial");const e=requestAnimationFrame((()=>{a("open")}));return()=>{cancelAnimationFrame(e)}}l(!0),a("close")}}),[n,r]),{isMounted:f,status:s}}function Nt(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}function Ft(e,t){const[n,r]=e;let o=!1;const u=t.length;for(let e=0,i=u-1;e<u;i=e++){const[u,c]=t[e]||[0,0],[l,s]=t[i]||[0,0];c>=r!=s>=r&&n<=(l-u)*(r-c)/(s-c)+u&&(o=!o)}return o}Object.defineProperty(e,"arrow",{enumerable:!0,get:function(){return n.arrow}}),Object.defineProperty(e,"autoPlacement",{enumerable:!0,get:function(){return n.autoPlacement}}),Object.defineProperty(e,"autoUpdate",{enumerable:!0,get:function(){return n.autoUpdate}}),Object.defineProperty(e,"computePosition",{enumerable:!0,get:function(){return n.computePosition}}),Object.defineProperty(e,"detectOverflow",{enumerable:!0,get:function(){return n.detectOverflow}}),Object.defineProperty(e,"flip",{enumerable:!0,get:function(){return n.flip}}),Object.defineProperty(e,"getOverflowAncestors",{enumerable:!0,get:function(){return n.getOverflowAncestors}}),Object.defineProperty(e,"hide",{enumerable:!0,get:function(){return n.hide}}),Object.defineProperty(e,"inline",{enumerable:!0,get:function(){return n.inline}}),Object.defineProperty(e,"limitShift",{enumerable:!0,get:function(){return n.limitShift}}),Object.defineProperty(e,"offset",{enumerable:!0,get:function(){return n.offset}}),Object.defineProperty(e,"platform",{enumerable:!0,get:function(){return n.platform}}),Object.defineProperty(e,"shift",{enumerable:!0,get:function(){return n.shift}}),Object.defineProperty(e,"size",{enumerable:!0,get:function(){return n.size}}),e.Composite=ie,e.CompositeItem=ce,e.FloatingArrow=ve,e.FloatingDelayGroup=e=>{let{children:t,delay:n,timeoutMs:r=0}=e;const[o,i]=u.useReducer(((e,t)=>({...e,...t})),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),c=u.useRef(null),l=u.useCallback((e=>{i({currentId:e})}),[]);return Z((()=>{o.currentId?null===c.current?c.current=o.currentId:i({isInstantPhase:!0}):(i({isInstantPhase:!1}),c.current=null)}),[o.currentId]),u.createElement(Re.Provider,{value:u.useMemo((()=>({...o,setState:i,setCurrentId:l})),[o,i,l])},t)},e.FloatingFocusManager=function(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:c=0,returnFocus:l=!0,modal:s=!0,visuallyHiddenDismiss:a=!1,closeOnFocusOut:f=!0}=e,{open:d,refs:m,nodeId:p,onOpenChange:g,events:b,dataRef:E,elements:{domReference:R,floating:I}}=t,k="number"==typeof c&&c<0,O=A(R)&&k,M="undefined"==typeof HTMLElement||!("inert"in HTMLElement.prototype)||i,S=Ee(o),P=Ee(c),D=Ee(l),N=ye(),F=st(),j=u.useRef(null),K=u.useRef(null),H=u.useRef(!1),q=u.useRef(!1),_=null!=F,B=u.useCallback((function(e){return void 0===e&&(e=I),e?Be(e,$e()):[]}),[I]),W=u.useCallback((e=>{const t=B(e);return S.current.map((e=>R&&"reference"===e?R:I&&"floating"===e?I:t)).filter(Boolean).flat()}),[R,I,S,B]);function U(e){return!r&&a&&s?u.createElement(mt,{ref:"start"===e?j:K,onClick:e=>g(!1,e.nativeEvent)},"string"==typeof a?a:"Dismiss"):null}u.useEffect((()=>{if(r||!s)return;function e(e){if("Tab"===e.key){y(I,h(C(I)))&&0===B().length&&!O&&L(e);const t=W(),n=T(e);"reference"===S.current[0]&&n===R&&(L(e),e.shiftKey?G(t[t.length-1]):G(t[1])),"floating"===S.current[1]&&n===I&&e.shiftKey&&(L(e),G(t[0]))}}const t=C(I);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}),[r,R,I,s,S,m,O,B,W]),u.useEffect((()=>{if(!r&&f)return I&&v(R)?(R.addEventListener("focusout",t),R.addEventListener("pointerdown",e),!s&&I.addEventListener("focusout",t),()=>{R.removeEventListener("focusout",t),R.removeEventListener("pointerdown",e),!s&&I.removeEventListener("focusout",t)}):void 0;function e(){q.current=!0,setTimeout((()=>{q.current=!1}))}function t(e){const t=e.relatedTarget;queueMicrotask((()=>{const n=!(y(R,t)||y(I,t)||y(t,I)||y(null==F?void 0:F.portalNode,t)||null!=t&&t.hasAttribute(be("focus-guard"))||N&&(We(N.nodesRef.current,p).find((e=>{var n,r;return y(null==(n=e.context)?void 0:n.elements.floating,t)||y(null==(r=e.context)?void 0:r.elements.domReference,t)}))||function(e,t){var n;let r=[],o=null==(n=e.find((e=>e.id===t)))?void 0:n.parentId;for(;o;){const t=e.find((e=>e.id===o));o=null==t?void 0:t.parentId,t&&(r=r.concat(t))}return r}(N.nodesRef.current,p).find((e=>{var n,r;return(null==(n=e.context)?void 0:n.elements.floating)===t||(null==(r=e.context)?void 0:r.elements.domReference)===t}))));t&&n&&!q.current&&t!==vt()&&(H.current=!0,g(!1,e))}))}}),[r,R,I,s,p,N,F,g,f]),u.useEffect((()=>{var e;if(r)return;const t=Array.from((null==F||null==(e=F.portalNode)?void 0:e.querySelectorAll("["+be("portal")+"]"))||[]);if(I){const e=[I,...t,j.current,K.current,S.current.includes("reference")||O?R:null].filter((e=>null!=e)),n=s||O?Ze(e,M,!M):Ze(e);return()=>{n()}}}),[r,R,I,s,S,F,O,M]),Z((()=>{if(r||!I)return;const e=h(C(I));queueMicrotask((()=>{const t=W(I),n=P.current,r=("number"==typeof n?t[n]:n.current)||I,o=y(I,e);k||o||!d||G(r,{preventScroll:r===I})}))}),[r,d,I,k,W,P]),Z((()=>{if(r||!I)return;let e=!1;const t=C(I),n=h(t),o=E.current;function u(t){let{reason:n,event:r,nested:o}=t;"escape-key"===n&&m.domReference.current&&dt(m.domReference.current),"hover"===n&&"mouseleave"===r.type&&(H.current=!0),"outside-press"===n&&(o?(H.current=!1,e=!0):H.current=!(w(r)||x(r)))}return dt(n),b.on("openchange",u),()=>{b.off("openchange",u);const n=h(t),r=y(I,n)||N&&We(N.nodesRef.current,p).some((e=>{var t;return y(null==(t=e.context)?void 0:t.elements.floating,n)}));(r||o.openEvent&&["click","mousedown"].includes(o.openEvent.type))&&m.domReference.current&&dt(m.domReference.current);const i=vt();D.current&&!H.current&&v(i)&&(i===n||n===t.body||r)&&G(i,{cancelPrevious:!1,preventScroll:e})}}),[r,I,D,E,m,b,N,p]),Z((()=>{if(!r&&F)return F.setFocusManagerState({modal:s,closeOnFocusOut:f,open:d,onOpenChange:g,refs:m}),()=>{F.setFocusManagerState(null)}}),[r,F,s,d,g,m,f]),Z((()=>{if(r||!I||"function"!=typeof MutationObserver||k)return;const e=()=>{const e=I.getAttribute("tabindex");S.current.includes("floating")||h(C(I))!==m.domReference.current&&0===B().length?"0"!==e&&I.setAttribute("tabindex","0"):"-1"!==e&&I.setAttribute("tabindex","-1")};e();const t=new MutationObserver(e);return t.observe(I,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}}),[r,I,m,S,B,k]);const z=!r&&M&&(_||s);return u.createElement(u.Fragment,null,z&&u.createElement(it,{"data-type":"inside",ref:null==F?void 0:F.beforeInsideRef,onFocus:e=>{if(s){const e=W();G("reference"===o[0]?e[0]:e[e.length-1])}else if(null!=F&&F.preserveTabOrder&&F.portalNode)if(H.current=!1,tt(e,F.portalNode)){const e=Je()||R;null==e||e.focus()}else{var t;null==(t=F.beforeOutsideRef.current)||t.focus()}}}),!O&&U("start"),n,U("end"),z&&u.createElement(it,{"data-type":"inside",ref:null==F?void 0:F.afterInsideRef,onFocus:e=>{if(s)G(W()[0]);else if(null!=F&&F.preserveTabOrder&&F.portalNode)if(f&&(H.current=!0),tt(e,F.portalNode)){const e=et()||R;null==e||e.focus()}else{var t;null==(t=F.afterOutsideRef.current)||t.focus()}}}))},e.FloatingList=J,e.FloatingNode=function(e){let{children:t,id:n}=e;const r=he();return u.createElement(pe.Provider,{value:u.useMemo((()=>({id:n,parentId:r})),[n,r])},t)},e.FloatingOverlay=gt,e.FloatingPortal=function(e){let{children:t,id:n,root:o=null,preserveTabOrder:i=!0}=e;const c=lt({id:n,root:o}),[l,s]=u.useState(null),a=u.useRef(null),f=u.useRef(null),d=u.useRef(null),v=u.useRef(null),m=!!l&&!l.modal&&l.open&&i&&!(!o&&!c);return u.useEffect((()=>{if(c&&i&&(null==l||!l.modal))return c.addEventListener("focusin",e,!0),c.addEventListener("focusout",e,!0),()=>{c.removeEventListener("focusin",e,!0),c.removeEventListener("focusout",e,!0)};function e(e){if(c&&tt(e)){("focusin"===e.type?rt:nt)(c)}}}),[c,i,null==l?void 0:l.modal]),u.createElement(ct.Provider,{value:u.useMemo((()=>({preserveTabOrder:i,beforeOutsideRef:a,afterOutsideRef:f,beforeInsideRef:d,afterInsideRef:v,portalNode:c,setFocusManagerState:s})),[i,c])},m&&c&&u.createElement(it,{"data-type":"outside",ref:a,onFocus:e=>{if(tt(e,c)){var t;null==(t=d.current)||t.focus()}else{const e=et()||(null==l?void 0:l.refs.domReference.current);null==e||e.focus()}}}),m&&c&&u.createElement("span",{"aria-owns":c.id,style:ot}),c&&r.createPortal(t,c),m&&c&&u.createElement(it,{"data-type":"outside",ref:f,onFocus:e=>{if(tt(e,c)){var t;null==(t=v.current)||t.focus()}else{const t=Je()||(null==l?void 0:l.refs.domReference.current);null==t||t.focus(),(null==l?void 0:l.closeOnFocusOut)&&(null==l||l.onOpenChange(!1,e.nativeEvent))}}}))},e.FloatingTree=function(e){let{children:t}=e;const n=u.useRef([]),r=u.useCallback((e=>{n.current=[...n.current,e]}),[]),o=u.useCallback((e=>{n.current=n.current.filter((t=>t!==e))}),[]),i=u.useState((()=>me()))[0];return u.createElement(ge.Provider,{value:u.useMemo((()=>({nodesRef:n,addNode:r,removeNode:o,events:i})),[n,r,o,i])},t)},e.inner=e=>({name:"inner",options:e,async fn(t){const{listRef:o,overflowRef:u,onFallbackChange:i,offset:c=0,index:l=0,minItemsVisible:s=4,referenceOverflowThreshold:a=0,scrollRef:f,...d}=e,{rects:v,elements:{floating:m}}=t,p=o.current[l];if(!p)return{};const g={...t,...await n.offset(-p.offsetTop-m.clientTop-v.reference.height/2-p.offsetHeight/2-c).fn(t)},h=(null==f?void 0:f.current)||m,y=await n.detectOverflow(Nt(g,h.scrollHeight),d),b=await n.detectOverflow(g,{...d,elementContext:"reference"}),E=Math.max(0,y.top),w=g.y+E,x=Math.max(0,h.scrollHeight-E-Math.max(0,y.bottom));return h.style.maxHeight=x+"px",h.scrollTop=E,i&&(h.offsetHeight<p.offsetHeight*Math.min(s,o.current.length-1)-1||b.top>=-a||b.bottom>=-a?r.flushSync((()=>i(!0))):r.flushSync((()=>i(!1)))),u&&(u.current=await n.detectOverflow(Nt({...g,y:w},h.offsetHeight),d)),{y:w}}}),e.safePolygon=function(e){void 0===e&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,u=!1,i=null,c=null,l=performance.now();const s=e=>{let{x:n,y:s,placement:a,elements:f,onClose:v,nodeId:m,tree:p}=e;return function(e){function g(){clearTimeout(o),v()}if(clearTimeout(o),!f.domReference||!f.floating||null==a||null==n||null==s)return;const{clientX:h,clientY:b}=e,E=[h,b],w=T(e),x="mouseleave"===e.type,R=y(f.floating,w),I=y(f.domReference,w),k=f.domReference.getBoundingClientRect(),O=f.floating.getBoundingClientRect(),C=a.split("-")[0],M=n>O.right-O.width/2,S=s>O.bottom-O.height/2,P=function(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}(E,k),L=O.width>k.width,A=O.height>k.height,D=(L?k:O).left,N=(L?k:O).right,F=(A?k:O).top,j=(A?k:O).bottom;if(R&&(u=!0,!x))return;if(I&&(u=!1),I&&!x)return void(u=!0);if(x&&d(e.relatedTarget)&&y(f.floating,e.relatedTarget))return;if(p&&We(p.nodesRef.current,m).some((e=>{let{context:t}=e;return null==t?void 0:t.open})))return;if("top"===C&&s>=k.bottom-1||"bottom"===C&&s<=k.top+1||"left"===C&&n>=k.right-1||"right"===C&&n<=k.left+1)return g();let K=[];switch(C){case"top":K=[[D,k.top+1],[D,O.bottom-1],[N,O.bottom-1],[N,k.top+1]];break;case"bottom":K=[[D,O.top+1],[D,k.bottom-1],[N,k.bottom-1],[N,O.top+1]];break;case"left":K=[[O.right-1,j],[O.right-1,F],[k.left+1,F],[k.left+1,j]];break;case"right":K=[[k.right-1,j],[k.right-1,F],[O.left+1,F],[O.left+1,j]]}if(!Ft([h,b],K)){if(u&&!P)return g();if(!x&&r){const t=function(e,t){const n=performance.now(),r=n-l;if(null===i||null===c||0===r)return i=e,c=t,l=n,null;const o=e-i,u=t-c,s=Math.sqrt(o*o+u*u);return i=e,c=t,l=n,s/r}(e.clientX,e.clientY);if(null!==t&&t<.1)return g()}Ft([h,b],function(e){let[n,r]=e;switch(C){case"top":return[[L?n+t/2:M?n+4*t:n-4*t,r+t+1],[L?n-t/2:M?n+4*t:n-4*t,r+t+1],...[[O.left,M||L?O.bottom-t:O.top],[O.right,M?L?O.bottom-t:O.top:O.bottom-t]]];case"bottom":return[[L?n+t/2:M?n+4*t:n-4*t,r-t],[L?n-t/2:M?n+4*t:n-4*t,r-t],...[[O.left,M||L?O.top+t:O.bottom],[O.right,M?L?O.top+t:O.bottom:O.top+t]]];case"left":{const e=[n+t+1,A?r+t/2:S?r+4*t:r-4*t],o=[n+t+1,A?r-t/2:S?r+4*t:r-4*t];return[...[[S||A?O.right-t:O.left,O.top],[S?A?O.right-t:O.left:O.right-t,O.bottom]],e,o]}case"right":return[[n-t,A?r+t/2:S?r+4*t:r-4*t],[n-t,A?r-t/2:S?r+4*t:r-4*t],...[[S||A?O.left+t:O.right,O.top],[S?A?O.left+t:O.right:O.left+t,O.bottom]]]}}([n,s]))?!u&&r&&(o=window.setTimeout(g,40)):g()}}};return s.__options={blockPointerEvents:n},s},e.useClick=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:c=!0,event:l="click",toggle:s=!0,ignoreMouse:a=!1,keyboardHandlers:f=!0}=t,d=u.useRef(),v=u.useRef(!1);return u.useMemo((()=>c?{reference:{onPointerDown(e){d.current=e.pointerType},onMouseDown(e){0===e.button&&(O(d.current,!0)&&a||"click"!==l&&(!n||!s||o.current.openEvent&&"mousedown"!==o.current.openEvent.type?(e.preventDefault(),r(!0,e.nativeEvent,"click")):r(!1,e.nativeEvent,"click")))},onClick(e){"mousedown"===l&&d.current?d.current=void 0:O(d.current,!0)&&a||(!n||!s||o.current.openEvent&&"click"!==o.current.openEvent.type?r(!0,e.nativeEvent,"click"):r(!1,e.nativeEvent,"click"))},onKeyDown(e){d.current=void 0,e.defaultPrevented||!f||ht(e)||(" "!==e.key||yt(i)||(e.preventDefault(),v.current=!0),"Enter"===e.key&&r(!n||!s,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!f||ht(e)||yt(i)||" "===e.key&&v.current&&(v.current=!1,r(!n||!s,e.nativeEvent,"click"))}}}:{}),[c,o,l,a,f,i,s,n,r])},e.useClientPoint=function(e,t){void 0===t&&(t={});const{open:n,refs:r,dataRef:o,elements:{floating:i}}=e,{enabled:c=!0,axis:s="both",x:f=null,y:d=null}=t,v=u.useRef(!1),m=u.useRef(null),[p,g]=u.useState(),[h,b]=u.useState([]),E=l(((e,t)=>{v.current||o.current.openEvent&&!bt(o.current.openEvent)||r.setPositionReference(function(e,t){let n=null,r=null,o=!1;return{contextElement:e.current||void 0,getBoundingClientRect(){var u,i;const c=(null==(u=e.current)?void 0:u.getBoundingClientRect())||{width:0,height:0,x:0,y:0},l="x"===t.axis||"both"===t.axis,s="y"===t.axis||"both"===t.axis,a=["mouseenter","mousemove"].includes((null==(i=t.dataRef.current.openEvent)?void 0:i.type)||"")&&"touch"!==t.pointerType;let f=c.width,d=c.height,v=c.x,m=c.y;return null==n&&t.x&&l&&(n=c.x-t.x),null==r&&t.y&&s&&(r=c.y-t.y),v-=n||0,m-=r||0,f=0,d=0,!o||a?(f="y"===t.axis?c.width:0,d="x"===t.axis?c.height:0,v=l&&null!=t.x?t.x:v,m=s&&null!=t.y?t.y:m):o&&!a&&(d="x"===t.axis?c.height:d,f="y"===t.axis?c.width:f),o=!0,{width:f,height:d,x:v,y:m,top:m,right:v+f,bottom:m+d,left:v}}}}(r.domReference,{x:e,y:t,axis:s,dataRef:o,pointerType:p}))})),w=l((e=>{null==f&&null==d&&(n?m.current||b([]):E(e.clientX,e.clientY))})),x=O(p)?i:n,R=u.useCallback((()=>{if(!x||!c||null!=f||null!=d)return;const e=a(r.floating.current);function t(n){const o=T(n);y(r.floating.current,o)?(e.removeEventListener("mousemove",t),m.current=null):E(n.clientX,n.clientY)}if(!o.current.openEvent||bt(o.current.openEvent)){e.addEventListener("mousemove",t);const n=()=>{e.removeEventListener("mousemove",t),m.current=null};return m.current=n,n}r.setPositionReference(r.domReference.current)}),[o,c,x,r,E,f,d]);return u.useEffect((()=>R()),[R,h]),u.useEffect((()=>{c&&!i&&(v.current=!1)}),[c,i]),u.useEffect((()=>{!c&&n&&(v.current=!0)}),[c,n]),Z((()=>{!c||null==f&&null==d||(v.current=!1,E(f,d))}),[c,f,d,E]),u.useMemo((()=>{if(!c)return{};function e(e){let{pointerType:t}=e;g(t)}return{reference:{onPointerDown:e,onPointerEnter:e,onMouseMove:w,onMouseEnter:w}}}),[c,w])},e.useDelayGroup=(e,t)=>{let{open:n,onOpenChange:r}=e,{id:o}=t;const{currentId:u,setCurrentId:i,initialDelay:c,setState:l,timeoutMs:s}=Ie();Z((()=>{u&&(l({delay:{open:1,close:xe(c,"close")}}),u!==o&&r(!1))}),[o,r,l,u,c]),Z((()=>{function e(){r(!1),l({delay:c,currentId:null})}if(!n&&u===o){if(s){const t=window.setTimeout(e,s);return()=>{clearTimeout(t)}}e()}}),[n,l,u,o,r,c,s]),Z((()=>{n&&i(o)}),[n,i,o])},e.useDelayGroupContext=Ie,e.useDismiss=function(e,t){void 0===t&&(t={});const{open:r,onOpenChange:o,nodeId:i,elements:{reference:c,domReference:s,floating:f},dataRef:m}=e,{enabled:h=!0,escapeKey:b=!0,outsidePress:E=!0,outsidePressEvent:w="pointerdown",referencePress:x=!1,referencePressEvent:R="pointerdown",ancestorScroll:I=!1,bubbles:k,capture:O}=t,S=ye(),P=l("function"==typeof E?E:()=>!1),L="function"==typeof E?P:E,A=u.useRef(!1),D=u.useRef(!1),{escapeKey:N,outsidePress:F}=xt(k),{escapeKey:j,outsidePress:K}=xt(O),H=l((e=>{if(!r||!h||!b||"Escape"!==e.key)return;const t=S?We(S.nodesRef.current,i):[];if(!N&&(e.stopPropagation(),t.length>0)){let e=!0;if(t.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}o(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),q=l((e=>{var t;const n=()=>{var t;H(e),null==(t=T(e))||t.removeEventListener("keydown",n)};null==(t=T(e))||t.addEventListener("keydown",n)})),_=l((e=>{const t=A.current;A.current=!1;const n=D.current;if(D.current=!1,"click"===w&&n)return;if(t)return;if("function"==typeof L&&!L(e))return;const r=T(e),u="["+be("inert")+"]",c=C(f).querySelectorAll(u);let l=d(r)?r:null;for(;l&&!p(l);){const e=g(l);if(p(e)||!d(e))break;l=e}if(c.length&&d(r)&&!r.matches("html,body")&&!y(r,f)&&Array.from(c).every((e=>!y(l,e))))return;if(v(r)&&f){const t=r.clientWidth>0&&r.scrollWidth>r.clientWidth,n=r.clientHeight>0&&r.scrollHeight>r.clientHeight;let o=n&&e.offsetX>r.clientWidth;if(n){const t="rtl"===function(e){return a(e).getComputedStyle(e)}(r).direction;t&&(o=e.offsetX<=r.offsetWidth-r.clientWidth)}if(o||t&&e.offsetY>r.clientHeight)return}const m=S&&We(S.nodesRef.current,i).some((t=>{var n;return M(e,null==(n=t.context)?void 0:n.elements.floating)}));if(M(e,f)||M(e,s)||m)return;const h=S?We(S.nodesRef.current,i):[];if(h.length>0){let e=!0;if(h.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}o(!1,e,"outside-press")})),B=l((e=>{var t;const n=()=>{var t;_(e),null==(t=T(e))||t.removeEventListener(w,n)};null==(t=T(e))||t.addEventListener(w,n)}));return u.useEffect((()=>{if(!r||!h)return;function e(e){o(!1,e,"ancestor-scroll")}m.current.__escapeKeyBubbles=N,m.current.__outsidePressBubbles=F;const t=C(f);b&&t.addEventListener("keydown",j?q:H,j),L&&t.addEventListener(w,K?B:_,K);let u=[];return I&&(d(s)&&(u=n.getOverflowAncestors(s)),d(f)&&(u=u.concat(n.getOverflowAncestors(f))),!d(c)&&c&&c.contextElement&&(u=u.concat(n.getOverflowAncestors(c.contextElement)))),u=u.filter((e=>{var n;return e!==(null==(n=t.defaultView)?void 0:n.visualViewport)})),u.forEach((t=>{t.addEventListener("scroll",e,{passive:!0})})),()=>{b&&t.removeEventListener("keydown",j?q:H,j),L&&t.removeEventListener(w,K?B:_,K),u.forEach((t=>{t.removeEventListener("scroll",e)}))}}),[m,f,s,c,b,L,w,r,o,I,h,N,F,H,j,q,_,K,B]),u.useEffect((()=>{A.current=!1}),[L,w]),u.useMemo((()=>h?{reference:{onKeyDown:H,[Et[R]]:e=>{x&&o(!1,e.nativeEvent,"reference-press")}},floating:{onKeyDown:H,onMouseDown(){D.current=!0},onMouseUp(){D.current=!0},[wt[w]]:()=>{A.current=!0}}}:{}),[h,x,w,R,o,H])},e.useFloating=function(e){var t;void 0===e&&(e={});const{open:r=!1,onOpenChange:o,nodeId:i}=e,[c,s]=u.useState(null),a=(null==(t=e.elements)?void 0:t.reference)||c,f=n.useFloating(e),v=ye(),m=null!=he(),p=l(((e,t,n)=>{e&&(h.current.openEvent=t),y.emit("openchange",{open:e,event:t,reason:n,nested:m}),null==o||o(e,t,n)})),g=u.useRef(null),h=u.useRef({}),y=u.useState((()=>me()))[0],b=de(),E=u.useCallback((e=>{const t=d(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;f.refs.setReference(t)}),[f.refs]),w=u.useCallback((e=>{(d(e)||null===e)&&(g.current=e,s(e)),(d(f.refs.reference.current)||null===f.refs.reference.current||null!==e&&!d(e))&&f.refs.setReference(e)}),[f.refs]),x=u.useMemo((()=>({...f.refs,setReference:w,setPositionReference:E,domReference:g})),[f.refs,w,E]),R=u.useMemo((()=>({...f.elements,domReference:a})),[f.elements,a]),I=u.useMemo((()=>({...f,refs:x,elements:R,dataRef:h,nodeId:i,floatingId:b,events:y,open:r,onOpenChange:p})),[f,i,b,y,r,p,x,R]);return Z((()=>{const e=null==v?void 0:v.nodesRef.current.find((e=>e.id===i));e&&(e.context=I)})),u.useMemo((()=>({...f,context:I,refs:x,elements:R})),[f,x,R,I])},e.useFloatingNodeId=function(e){const t=de(),n=ye(),r=he(),o=e||r;return Z((()=>{const e={id:t,parentId:o};return null==n||n.addNode(e),()=>{null==n||n.removeNode(e)}}),[n,t,o]),t},e.useFloatingParentNodeId=he,e.useFloatingPortalNode=lt,e.useFloatingTree=ye,e.useFocus=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,events:o,refs:i,elements:{floating:c,domReference:l}}=e,{enabled:s=!0,visibleOnly:f=!0}=t,m=u.useRef(!1),p=u.useRef(),g=u.useRef(!0);return u.useEffect((()=>{if(!s)return;const e=a(l);function t(){!n&&v(l)&&l===h(C(l))&&(m.current=!0)}function r(){g.current=!0}return e.addEventListener("blur",t),e.addEventListener("keydown",r,!0),()=>{e.removeEventListener("blur",t),e.removeEventListener("keydown",r,!0)}}),[c,l,n,s]),u.useEffect((()=>{if(s)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){let{reason:t}=e;"reference-press"!==t&&"escape-key"!==t||(m.current=!0)}}),[o,s]),u.useEffect((()=>()=>{clearTimeout(p.current)}),[]),u.useMemo((()=>s?{reference:{onPointerDown(e){x(e.nativeEvent)||(g.current=!1)},onMouseLeave(){m.current=!1},onFocus(e){if(m.current)return;const t=T(e.nativeEvent);if(f&&d(t))try{if(R()&&k())throw Error();if(!t.matches(":focus-visible"))return}catch(e){if(!g.current&&!P(t))return}r(!0,e.nativeEvent,"focus")},onBlur(e){m.current=!1;const t=e.relatedTarget,n=d(t)&&t.hasAttribute(be("focus-guard"))&&"outside"===t.getAttribute("data-type");p.current=window.setTimeout((()=>{const o=h(l?l.ownerDocument:document);(t||o!==l)&&(y(i.floating.current,t)||y(l,t)||n||r(!1,e.nativeEvent,"focus"))}))}}}:{}),[s,f,l,i,r])},e.useHover=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:{domReference:c,floating:l},refs:s}=e,{enabled:a=!0,delay:f=0,handleClose:v=null,mouseOnly:m=!1,restMs:p=0,move:g=!0}=t,h=ye(),b=he(),E=Ee(v),w=Ee(f),x=u.useRef(),R=u.useRef(),I=u.useRef(),k=u.useRef(),M=u.useRef(!0),T=u.useRef(!1),S=u.useRef((()=>{})),P=u.useCallback((()=>{var e;const t=null==(e=o.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t}),[o]);u.useEffect((()=>{if(a)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(R.current),clearTimeout(k.current),M.current=!0)}}),[a,i]),u.useEffect((()=>{if(!a||!E.current||!n)return;function e(e){P()&&r(!1,e,"hover")}const t=C(l).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}}),[l,n,r,a,E,o,P]);const L=u.useCallback((function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const o=xe(w.current,"close",x.current);o&&!I.current?(clearTimeout(R.current),R.current=setTimeout((()=>r(!1,e,n)),o)):t&&(clearTimeout(R.current),r(!1,e,n))}),[w,r]),A=u.useCallback((()=>{S.current(),I.current=void 0}),[]),D=u.useCallback((()=>{if(T.current){const e=C(s.floating.current).body;e.style.pointerEvents="",e.removeAttribute(we),T.current=!1}}),[s]);return u.useEffect((()=>{if(a&&d(c)){const e=c;return n&&e.addEventListener("mouseleave",s),null==l||l.addEventListener("mouseleave",s),g&&e.addEventListener("mousemove",u,{once:!0}),e.addEventListener("mouseenter",u),e.addEventListener("mouseleave",i),()=>{n&&e.removeEventListener("mouseleave",s),null==l||l.removeEventListener("mouseleave",s),g&&e.removeEventListener("mousemove",u),e.removeEventListener("mouseenter",u),e.removeEventListener("mouseleave",i)}}function t(){return!!o.current.openEvent&&["click","mousedown"].includes(o.current.openEvent.type)}function u(e){if(clearTimeout(R.current),M.current=!1,m&&!O(x.current)||p>0&&0===xe(w.current,"open"))return;const t=xe(w.current,"open",x.current);t?R.current=setTimeout((()=>{r(!0,e,"hover")}),t):r(!0,e,"hover")}function i(r){if(t())return;S.current();const o=C(l);if(clearTimeout(k.current),E.current){n||clearTimeout(R.current),I.current=E.current({...e,tree:h,x:r.clientX,y:r.clientY,onClose(){D(),A(),L(r,!0,"safe-polygon")}});const t=I.current;return o.addEventListener("mousemove",t),void(S.current=()=>{o.removeEventListener("mousemove",t)})}("touch"!==x.current||!y(l,r.relatedTarget))&&L(r)}function s(n){t()||null==E.current||E.current({...e,tree:h,x:n.clientX,y:n.clientY,onClose(){D(),A(),L(n)}})(n)}}),[c,l,a,e,m,p,g,L,A,D,r,n,h,w,E,o]),Z((()=>{var e;if(a&&n&&null!=(e=E.current)&&e.__options.blockPointerEvents&&P()){const e=C(l).body;if(e.setAttribute(we,""),e.style.pointerEvents="none",T.current=!0,d(c)&&l){var t;const e=c,n=null==h||null==(t=h.nodesRef.current.find((e=>e.id===b)))||null==(t=t.context)?void 0:t.elements.floating;return n&&(n.style.pointerEvents=""),e.style.pointerEvents="auto",l.style.pointerEvents="auto",()=>{e.style.pointerEvents="",l.style.pointerEvents=""}}}}),[a,n,b,l,c,h,E,o,P]),Z((()=>{n||(x.current=void 0,A(),D())}),[n,A,D]),u.useEffect((()=>()=>{A(),clearTimeout(R.current),clearTimeout(k.current),D()}),[a,c,A,D]),u.useMemo((()=>{if(!a)return{};function e(e){x.current=e.pointerType}return{reference:{onPointerDown:e,onPointerEnter:e,onMouseMove(e){n||0===p||(clearTimeout(k.current),k.current=setTimeout((()=>{M.current||r(!0,e.nativeEvent,"hover")}),p))}},floating:{onMouseEnter(){clearTimeout(R.current)},onMouseLeave(e){L(e.nativeEvent,!1)}}}}),[a,p,n,r,L])},e.useId=de,e.useInnerOffset=function(e,t){const{open:n,elements:o}=e,{enabled:i=!0,overflowRef:c,scrollRef:s,onChange:a}=t,f=l(a),d=u.useRef(!1),v=u.useRef(null),m=u.useRef(null);return u.useEffect((()=>{if(!i)return;function e(e){if(e.ctrlKey||!t||null==c.current)return;const n=e.deltaY,o=c.current.top>=-.5,u=c.current.bottom>=-.5,i=t.scrollHeight-t.clientHeight,l=n<0?-1:1,s=n<0?"max":"min";t.scrollHeight<=t.clientHeight||(!o&&n>0||!u&&n<0?(e.preventDefault(),r.flushSync((()=>{f((e=>e+Math[s](n,i*l)))}))):/firefox/i.test(E())&&(t.scrollTop+=n))}const t=(null==s?void 0:s.current)||o.floating;return n&&t?(t.addEventListener("wheel",e),requestAnimationFrame((()=>{v.current=t.scrollTop,null!=c.current&&(m.current={...c.current})})),()=>{v.current=null,m.current=null,t.removeEventListener("wheel",e)}):void 0}),[i,n,o.floating,c,s,f]),u.useMemo((()=>i?{floating:{onKeyDown(){d.current=!0},onWheel(){d.current=!1},onPointerMove(){d.current=!1},onScroll(){const e=(null==s?void 0:s.current)||o.floating;if(c.current&&e&&d.current){if(null!==v.current){const t=e.scrollTop-v.current;(c.current.bottom<-.5&&t<-1||c.current.top<-.5&&t>1)&&r.flushSync((()=>f((e=>e+t))))}requestAnimationFrame((()=>{v.current=e.scrollTop}))}}}}:{}),[i,c,o.floating,s,f])},e.useInteractions=function(e){void 0===e&&(e=[]);const t=e,n=u.useCallback((t=>kt(t,e,"reference")),t),r=u.useCallback((t=>kt(t,e,"floating")),t),o=u.useCallback((t=>kt(t,e,"item")),e.map((e=>null==e?void 0:e.item)));return u.useMemo((()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:o})),[n,r,o])},e.useListItem=ee,e.useListNavigation=function(e,t){const{open:n,onOpenChange:r,refs:o,elements:{domReference:i,floating:c}}=e,{listRef:s,activeIndex:a,onNavigate:f=(()=>{}),enabled:d=!0,selectedIndex:m=null,allowEscape:p=!1,loop:g=!1,nested:b=!1,rtl:E=!1,virtual:I=!1,focusItemOnOpen:O="auto",focusItemOnHover:M=!0,openOnArrowKeyDown:T=!0,disabledIndices:S,orientation:P="vertical",cols:D=1,scrollItemIntoView:N=!0,virtualItemRef:H,itemSizes:V,dense:$=!1}=t,Q=he(),J=ye(),ee=l(f),te=u.useRef(O),ne=u.useRef(null!=m?m:-1),re=u.useRef(null),oe=u.useRef(!0),ue=u.useRef(ee),ie=u.useRef(!!c),ce=u.useRef(!1),le=u.useRef(!1),se=Ee(S),ae=Ee(n),fe=Ee(N),[de,ve]=u.useState(),[me,pe]=u.useState(),ge=l((function(e,t,n){void 0===n&&(n=!1);const r=e.current[t.current];r&&(I?(ve(r.id),null==J||J.events.emit("virtualfocus",r),H&&(H.current=r)):G(r,{preventScroll:!0,sync:!(!k()||!R())&&(Ot||ce.current)}),requestAnimationFrame((()=>{const e=fe.current;e&&r&&(n||!oe.current)&&(null==r.scrollIntoView||r.scrollIntoView("boolean"==typeof e?{block:"nearest",inline:"nearest"}:e))})))}));Z((()=>{document.createElement("div").focus({get preventScroll(){return Ot=!0,!1}})}),[]),Z((()=>{d&&(n&&c?te.current&&null!=m&&(le.current=!0,ee(m)):ie.current&&(ne.current=-1,ue.current(null)))}),[d,n,c,m,ee]),Z((()=>{if(d&&n&&c)if(null==a){if(ce.current=!1,null!=m)return;if(ie.current&&(ne.current=-1,ge(s,ne)),!ie.current&&te.current&&(null!=re.current||!0===te.current&&null==re.current)){let e=0;const t=()=>{if(null==s.current[0]){if(e<2){(e?requestAnimationFrame:queueMicrotask)(t)}e++}else ne.current=null==re.current||Tt(re.current,P,E)||b?_(s,se.current):B(s,se.current),re.current=null,ee(ne.current)};t()}}else q(s,a)||(ne.current=a,ge(s,ne,le.current),le.current=!1)}),[d,n,c,a,m,b,s,P,E,ee,ge,se]),Z((()=>{var e;if(!d||c||!J||I||!ie.current)return;const t=J.nodesRef.current,n=null==(e=t.find((e=>e.id===Q)))||null==(e=e.context)?void 0:e.elements.floating,r=h(C(c)),o=t.some((e=>e.context&&y(e.context.elements.floating,r)));n&&!o&&oe.current&&n.focus({preventScroll:!0})}),[d,c,J,Q,I]),Z((()=>{if(d&&J&&I&&!Q)return J.events.on("virtualfocus",e),()=>{J.events.off("virtualfocus",e)};function e(e){pe(e.id),H&&(H.current=e)}}),[d,J,I,Q,H]),Z((()=>{ue.current=ee,ie.current=!!c})),Z((()=>{n||(re.current=null)}),[n]);const be=null!=a,we=u.useMemo((()=>{function e(e){if(!n)return;const t=s.current.indexOf(e);-1!==t&&ee(t)}return{onFocus(t){let{currentTarget:n}=t;e(n)},onClick:e=>{let{currentTarget:t}=e;return t.focus({preventScroll:!0})},...M&&{onMouseMove(t){let{currentTarget:n}=t;e(n)},onPointerLeave(e){let{pointerType:t}=e;oe.current&&"touch"!==t&&(ne.current=-1,ge(s,ne),ee(null),I||G(o.floating.current,{preventScroll:!0}))}}}}),[n,o,ge,M,s,ee,I]);return u.useMemo((()=>{if(!d)return{};const e=se.current;function t(t){if(oe.current=!1,ce.current=!0,!ae.current&&t.currentTarget===o.floating.current)return;if(b&&St(t.key,P,E))return L(t),r(!1,t.nativeEvent,"list-navigation"),void(v(i)&&!I&&i.focus());const u=ne.current,c=_(s,e),l=B(s,e);if("Home"===t.key&&(L(t),ne.current=c,ee(ne.current)),"End"===t.key&&(L(t),ne.current=l,ee(ne.current)),D>1){const n=V||Array.from({length:s.current.length},(()=>({width:1,height:1}))),r=z(n,D,$),o=r.findIndex((t=>null!=t&&!(null!=e&&e.includes(t)))),u=r.reduce(((t,n,r)=>null==n||null!=e&&e.includes(n)?t:r),-1);if(ne.current=r[U({current:r.map((e=>null!=e?s.current[e]:null))},{event:t,orientation:P,loop:g,cols:D,disabledIndices:Y([...e||[],void 0],r),minIndex:o,maxIndex:u,prevIndex:X(ne.current,n,r,D,t.key===F?"bl":t.key===K?"tr":"tl"),stopEvent:!0})],ee(ne.current),"both"===P)return}if(Mt(t.key,P)){if(L(t),n&&!I&&h(t.currentTarget.ownerDocument)===t.currentTarget)return ne.current=Tt(t.key,P,E)?c:l,void ee(ne.current);Tt(t.key,P,E)?ne.current=g?u>=l?p&&u!==s.current.length?-1:c:W(s,{startingIndex:u,disabledIndices:e}):Math.min(l,W(s,{startingIndex:u,disabledIndices:e})):ne.current=g?u<=c?p&&-1!==u?s.current.length:l:W(s,{startingIndex:u,decrement:!0,disabledIndices:e}):Math.max(c,W(s,{startingIndex:u,decrement:!0,disabledIndices:e})),q(s,ne.current)?ee(null):ee(ne.current)}}function u(e){"auto"===O&&w(e.nativeEvent)&&(te.current=!0)}const c=I&&n&&be&&{"aria-activedescendant":me||de},l=s.current.find((e=>(null==e?void 0:e.id)===de));return{reference:{...c,onKeyDown(o){oe.current=!1;const u=0===o.key.indexOf("Arrow"),i=function(e,t,n){return Ct(t,n?e===j:e===K,e===F)}(o.key,P,E),c=St(o.key,P,E),a=Mt(o.key,P),f=(b?i:a)||"Enter"===o.key||""===o.key.trim();if(I&&n){const e=null==J?void 0:J.nodesRef.current.find((e=>null==e.parentId)),n=J&&e?function(e,t){let n,r=-1;return function t(o,u){u>r&&(n=o,r=u),We(e,o).forEach((e=>{t(e.id,u+1)}))}(t,0),e.find((e=>e.id===n))}(J.nodesRef.current,e.id):null;if(u&&n&&H){const e=new KeyboardEvent("keydown",{key:o.key,bubbles:!0});if(i||c){var d,v;const t=(null==(d=n.context)?void 0:d.elements.domReference)===o.currentTarget,r=c&&!t?null==(v=n.context)?void 0:v.elements.domReference:i?l:null;r&&(L(o),r.dispatchEvent(e),pe(void 0))}var p;if(a&&n.context)if(n.context.open&&n.parentId&&o.currentTarget!==n.context.elements.domReference)return L(o),void(null==(p=n.context.elements.domReference)||p.dispatchEvent(e))}return t(o)}(n||T||!u)&&(f&&(re.current=b&&a?null:o.key),b?i&&(L(o),n?(ne.current=_(s,e),ee(ne.current)):r(!0,o.nativeEvent,"list-navigation")):a&&(null!=m&&(ne.current=m),L(o),!n&&T?r(!0,o.nativeEvent,"list-navigation"):t(o),n&&ee(ne.current)))},onFocus(){n&&ee(null)},onPointerDown:function(e){te.current=O,"auto"===O&&x(e.nativeEvent)&&(te.current=!0)},onMouseDown:u,onClick:u},floating:{"aria-orientation":"both"===P?void 0:P,...!A(i)&&c,onKeyDown:t,onPointerMove(){oe.current=!0}},item:we}}),[i,o,de,me,se,ae,s,d,P,E,I,n,be,b,m,T,p,D,g,O,ee,r,we,J,H,V,$])},e.useMergeRefs=i,e.useRole=function(e,t){var n;void 0===t&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:c="dialog"}=t,l=null!=(n=Pt.get(c))?n:c,s=de(),a=null!=he();return u.useMemo((()=>{if(!i)return{};const e={id:o,...l&&{role:l}};return"tooltip"===l||"label"===c?{reference:{["aria-"+("label"===c?"labelledby":"describedby")]:r?o:void 0},floating:e}:{reference:{"aria-expanded":r?"true":"false","aria-haspopup":"alertdialog"===l?"dialog":l,"aria-controls":r?o:void 0,..."listbox"===l&&{role:"combobox"},..."menu"===l&&{id:s},..."menu"===l&&a&&{role:"menuitem"},..."select"===c&&{"aria-autocomplete":"none"},..."combobox"===c&&{"aria-autocomplete":"list"}},floating:{...e,..."menu"===l&&{"aria-labelledby":s}},item(e){let{active:t,selected:n}=e;const r={role:"option",...t&&{id:o+"-option"}};switch(c){case"select":return{...r,"aria-selected":t&&n};case"combobox":return{...r,...t&&{"aria-selected":!0}}}return{}}}}),[i,c,l,r,o,s,a])},e.useTransitionStatus=Dt,e.useTransitionStyles=function(e,t){void 0===t&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:c=250}=t,l=e.placement,s=l.split("-")[0],a=u.useMemo((()=>({side:s,placement:l})),[s,l]),f="number"==typeof c,d=(f?c:c.open)||0,v=(f?c:c.close)||0,[m,p]=u.useState((()=>({...At(i,a),...At(n,a)}))),{isMounted:g,status:h}=Dt(e,{duration:c}),y=Ee(n),b=Ee(r),E=Ee(o),w=Ee(i);return Z((()=>{const e=At(y.current,a),t=At(E.current,a),n=At(w.current,a),r=At(b.current,a)||Object.keys(e).reduce(((e,t)=>(e[t]="",e)),{});if("initial"===h&&p((t=>({transitionProperty:t.transitionProperty,...n,...e}))),"open"===h&&p({transitionProperty:Object.keys(r).map(Lt).join(","),transitionDuration:d+"ms",...n,...r}),"close"===h){const r=t||e;p({transitionProperty:Object.keys(r).map(Lt).join(","),transitionDuration:v+"ms",...n,...r})}}),[v,E,y,b,w,d,h,a]),{isMounted:g,styles:m}},e.useTypeahead=function(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:c,onMatch:s,onTypingChange:a,enabled:f=!0,findMatch:d=null,resetMs:v=750,ignoreKeys:m=[],selectedIndex:p=null}=t,g=u.useRef(),h=u.useRef(""),y=u.useRef(null!=(n=null!=p?p:c)?n:-1),b=u.useRef(null),E=l(s),w=l(a),x=Ee(d),R=Ee(m);return Z((()=>{r&&(clearTimeout(g.current),b.current=null,h.current="")}),[r]),Z((()=>{var e;r&&""===h.current&&(y.current=null!=(e=null!=p?p:c)?e:-1)}),[r,p,c]),u.useMemo((()=>{if(!f)return{};function e(e){e?o.current.typing||(o.current.typing=e,w(e)):o.current.typing&&(o.current.typing=e,w(e))}function t(e,t,n){const r=x.current?x.current(t,n):t.find((e=>0===(null==e?void 0:e.toLocaleLowerCase().indexOf(n.toLocaleLowerCase()))));return r?e.indexOf(r):-1}function n(n){const o=i.current;if(h.current.length>0&&" "!==h.current[0]&&(-1===t(o,o,h.current)?e(!1):" "===n.key&&L(n)),null==o||R.current.includes(n.key)||1!==n.key.length||n.ctrlKey||n.metaKey||n.altKey)return;r&&" "!==n.key&&(L(n),e(!0));o.every((e=>{var t,n;return!e||(null==(t=e[0])?void 0:t.toLocaleLowerCase())!==(null==(n=e[1])?void 0:n.toLocaleLowerCase())}))&&h.current===n.key&&(h.current="",y.current=b.current),h.current+=n.key,clearTimeout(g.current),g.current=setTimeout((()=>{h.current="",y.current=b.current,e(!1)}),v);const u=y.current,c=t(o,[...o.slice((u||0)+1),...o.slice(0,(u||0)+1)],h.current);-1!==c?(E(c),b.current=c):" "!==n.key&&(h.current="",e(!1))}return{reference:{onKeyDown:n},floating:{onKeyDown:n,onKeyUp(t){" "===t.key&&e(!1)}}}}),[f,r,o,i,v,R,x,E,w])}}));
var ke=["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])"].join(","),Oe="undefined"==typeof Element,Ce=Oe?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Me=!Oe&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},Te=function e(t,n){var r;void 0===n&&(n=!0);var o=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},Se=function e(t,n,r){for(var o=[],u=Array.from(t);u.length;){var i=u.shift();if(!Te(i,!1))if("SLOT"===i.tagName){var l=i.assignedElements(),c=e(l.length?l:i.children,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{Ce.call(i,ke)&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var s=i.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(i),a=!Te(s,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(s&&a){var f=e(!0===s?i.children:s.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:i,candidates:f})}else u.unshift.apply(u,i.children)}}return o},Pe=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Le=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!Pe(e)?0:e.tabIndex},Ae=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},De=function(e){return"INPUT"===e.tagName},Ne=function(e){return function(e){return De(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||Me(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){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",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)},Fe=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},je=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=Ce.call(e,"details>summary:first-of-type")?e.parentElement:e;if(Ce.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return Fe(e)}else{if("function"==typeof r){for(var u=e;e;){var i=e.parentElement,l=Me(e);if(i&&!i.shadowRoot&&!0===r(i))return Fe(e);e=e.assignedSlot?e.assignedSlot:i||l===e.ownerDocument?i:l.host}e=u}if(function(e){var t,n,r,o,u=e&&Me(e),i=null===(t=u)||void 0===t?void 0:t.host,l=!1;if(u&&u!==e)for(l=!!(null!==(n=i)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(i)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!l&&i;){var c,s,a;l=!(null===(s=i=null===(c=u=Me(i))||void 0===c?void 0:c.host)||void 0===s||null===(a=s.ownerDocument)||void 0===a||!a.contains(i))}return l}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},Ke=function(e,t){return!(t.disabled||Te(t)||function(e){return De(e)&&"hidden"===e.type}(t)||je(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!Ce.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},He=function(e,t){return!(Ne(t)||Le(t)<0||!Ke(e,t))},qe=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},_e=function e(t){var n=[],r=[];return t.forEach((function(t,o){var u=!!t.scopeParent,i=u?t.scopeParent:t,l=function(e,t){var n=Le(e);return n<0&&t&&!Pe(e)?0:n}(i,u),c=u?e(t.candidates):i;0===l?u?n.push.apply(n,c):n.push(i):r.push({documentOrder:o,tabIndex:l,item:t,isScope:u,content:c})})),r.sort(Ae).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},Be=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Se([e],t.includeContainer,{filter:He.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:qe}):function(e,t,n){if(Te(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(ke));return t&&Ce.call(e,ke)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,He.bind(null,t)),_e(n)};function We(e,t){let n=e.filter((e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)})),r=n;for(;r.length;)r=e.filter((e=>{var t;return null==(t=r)?void 0:t.some((t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)}))})),n=n.concat(r);return n}let Ue=new WeakMap,ze=new WeakSet,Xe={},Ye=0;const Ve=e=>e&&(e.host||Ve(e.parentNode)),Ge=(e,t)=>t.map((t=>{if(e.contains(t))return t;const n=Ve(t);return e.contains(n)?n:null})).filter((e=>null!=e));function Ze(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=C(e[0]).body;return function(e,t,n,r){const o="data-floating-ui-inert",u=r?"inert":n?"aria-hidden":null,i=Ge(t,e),l=new Set,c=new Set(i),s=[];Xe[o]||(Xe[o]=new WeakMap);const a=Xe[o];return i.forEach((function e(t){t&&!l.has(t)&&(l.add(t),t.parentNode&&e(t.parentNode))})),function e(t){t&&!c.has(t)&&Array.prototype.forEach.call(t.children,(t=>{if(l.has(t))e(t);else{const e=u?t.getAttribute(u):null,n=null!==e&&"false"!==e,r=(Ue.get(t)||0)+1,i=(a.get(t)||0)+1;Ue.set(t,r),a.set(t,i),s.push(t),1===r&&n&&ze.add(t),1===i&&t.setAttribute(o,""),!n&&u&&t.setAttribute(u,"true")}}))}(t),l.clear(),Ye++,()=>{s.forEach((e=>{const t=(Ue.get(e)||0)-1,n=(a.get(e)||0)-1;Ue.set(e,t),a.set(e,n),t||(!ze.has(e)&&u&&e.removeAttribute(u),ze.delete(e)),n||e.removeAttribute(o)})),Ye--,Ye||(Ue=new WeakMap,Ue=new WeakMap,ze=new WeakSet,Xe={})}}(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const $e=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Qe(e,t){const n=Be(e,$e());"prev"===t&&n.reverse();const r=n.indexOf(h(C(e)));return n.slice(r+1)[0]}function Je(){return Qe(document.body,"next")}function et(){return Qe(document.body,"prev")}function tt(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!y(n,r)}function nt(e){Be(e,$e()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function rt(e){e.querySelectorAll("[data-tabindex]").forEach((e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}))}const ot={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function ut(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const it=u.forwardRef((function(e,t){const[n,r]=u.useState();Z((()=>(R()&&r("button"),document.addEventListener("keydown",ut),()=>{document.removeEventListener("keydown",ut)})),[]);const o={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[be("focus-guard")]:"",style:ot};return u.createElement("span",ce({},e,o))})),lt=u.createContext(null);function ct(e){let{id:t,root:n}=void 0===e?{}:e;const[r,o]=u.useState(null),i=de(),l=st(),c=u.useMemo((()=>({id:t,root:n,portalContext:l,uniqueId:i})),[t,n,l,i]),s=u.useRef();return Z((()=>()=>{null==r||r.remove()}),[r,c]),Z((()=>{if(s.current===c)return;s.current=c;const{id:e,root:t,portalContext:n,uniqueId:r}=c,u=e?document.getElementById(e):null,i=be("portal");if(u){const e=document.createElement("div");e.id=r,e.setAttribute(i,""),u.appendChild(e),o(e)}else{let u=t||(null==n?void 0:n.portalNode);u&&!d(u)&&(u=u.current),u=u||document.body;let l=null;e&&(l=document.createElement("div"),l.id=e,u.appendChild(l));const c=document.createElement("div");c.id=r,c.setAttribute(i,""),u=l||u,u.appendChild(c),o(c)}}),[c]),r}const st=()=>u.useContext(lt),at=20;let ft=[];function dt(e){ft=ft.filter((e=>e.isConnected)),e&&"body"!==s(e)&&(ft.push(e),ft.length>at&&(ft=ft.slice(-at)))}function vt(){return ft.slice().reverse().find((e=>e.isConnected))}const mt=u.forwardRef((function(e,t){return u.createElement("button",ce({},e,{type:"button",ref:t,tabIndex:-1,style:ot}))}));const pt=new Set,gt=u.forwardRef((function(e,t){let{lockScroll:n=!1,...r}=e;const o=de();return Z((()=>{if(!n)return;pt.add(o);const e=/iP(hone|ad|od)|iOS/.test(b()),t=document.body.style,r=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,i=t.left?parseFloat(t.left):window.pageXOffset,l=t.top?parseFloat(t.top):window.pageYOffset;if(t.overflow="hidden",u&&(t[r]=u+"px"),e){var c,s;const e=(null==(c=window.visualViewport)?void 0:c.offsetLeft)||0,n=(null==(s=window.visualViewport)?void 0:s.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(l-Math.floor(n))+"px",left:-(i-Math.floor(e))+"px",right:"0"})}return()=>{pt.delete(o),0===pt.size&&(Object.assign(t,{overflow:"",[r]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(i,l)))}}),[o,n]),u.createElement("div",ce({ref:t},r,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...r.style}}))}));function ht(e){return v(e.target)&&"BUTTON"===e.target.tagName}function yt(e){return P(e)}function bt(e){return null!=e&&null!=e.clientX}const Et={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},wt={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},xt=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};const Rt="active",It="selected";function kt(e,t,n){const r=new Map,o="item"===n;let u=e;if(o&&e){const{[Rt]:t,[It]:n,...r}=e;u=r}return{..."floating"===n&&{tabIndex:-1},...u,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,u]=t;var i;o&&[Rt,It].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof u&&(null==(i=r.get(n))||i.push(u),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),u=0;u<t;u++)o[u]=arguments[u];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})):e[n]=u)})),e):e),{})}}let Ot=!1;function Ct(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Mt(e,t){return Ct(t,e===N||e===F,e===j||e===K)}function Tt(e,t,n){return Ct(t,e===F,n?e===j:e===K)||"Enter"===e||" "===e||""===e}function St(e,t,n){return Ct(t,n?e===K:e===j,e===N)}const Pt=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);const Lt=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((e,t)=>(t?"-":"")+e.toLowerCase()));function At(e,t){return"function"==typeof e?e(t):e}function Dt(e,t){void 0===t&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,i=("number"==typeof o?o:o.close)||0,[l,c]=u.useState(!1),[s,a]=u.useState("unmounted"),f=function(e,t){const[n,r]=u.useState(e);return e&&!n&&r(!0),u.useEffect((()=>{if(!e){const e=setTimeout((()=>r(!1)),t);return()=>clearTimeout(e)}}),[e,t]),n}(n,i);return Z((()=>{l&&!f&&a("unmounted")}),[l,f]),Z((()=>{if(r){if(n){a("initial");const e=requestAnimationFrame((()=>{a("open")}));return()=>{cancelAnimationFrame(e)}}c(!0),a("close")}}),[n,r]),{isMounted:f,status:s}}function Nt(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}function Ft(e,t){const[n,r]=e;let o=!1;const u=t.length;for(let e=0,i=u-1;e<u;i=e++){const[u,l]=t[e]||[0,0],[c,s]=t[i]||[0,0];l>=r!=s>=r&&n<=(c-u)*(r-l)/(s-l)+u&&(o=!o)}return o}Object.defineProperty(e,"arrow",{enumerable:!0,get:function(){return n.arrow}}),Object.defineProperty(e,"autoPlacement",{enumerable:!0,get:function(){return n.autoPlacement}}),Object.defineProperty(e,"autoUpdate",{enumerable:!0,get:function(){return n.autoUpdate}}),Object.defineProperty(e,"computePosition",{enumerable:!0,get:function(){return n.computePosition}}),Object.defineProperty(e,"detectOverflow",{enumerable:!0,get:function(){return n.detectOverflow}}),Object.defineProperty(e,"flip",{enumerable:!0,get:function(){return n.flip}}),Object.defineProperty(e,"getOverflowAncestors",{enumerable:!0,get:function(){return n.getOverflowAncestors}}),Object.defineProperty(e,"hide",{enumerable:!0,get:function(){return n.hide}}),Object.defineProperty(e,"inline",{enumerable:!0,get:function(){return n.inline}}),Object.defineProperty(e,"limitShift",{enumerable:!0,get:function(){return n.limitShift}}),Object.defineProperty(e,"offset",{enumerable:!0,get:function(){return n.offset}}),Object.defineProperty(e,"platform",{enumerable:!0,get:function(){return n.platform}}),Object.defineProperty(e,"shift",{enumerable:!0,get:function(){return n.shift}}),Object.defineProperty(e,"size",{enumerable:!0,get:function(){return n.size}}),e.Composite=ie,e.CompositeItem=le,e.FloatingArrow=ve,e.FloatingDelayGroup=e=>{let{children:t,delay:n,timeoutMs:r=0}=e;const[o,i]=u.useReducer(((e,t)=>({...e,...t})),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),l=u.useRef(null),c=u.useCallback((e=>{i({currentId:e})}),[]);return Z((()=>{o.currentId?null===l.current?l.current=o.currentId:i({isInstantPhase:!0}):(i({isInstantPhase:!1}),l.current=null)}),[o.currentId]),u.createElement(Re.Provider,{value:u.useMemo((()=>({...o,setState:i,setCurrentId:c})),[o,c])},t)},e.FloatingFocusManager=function(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:l=0,returnFocus:c=!0,modal:s=!0,visuallyHiddenDismiss:a=!1,closeOnFocusOut:f=!0}=e,{open:d,refs:m,nodeId:p,onOpenChange:g,events:b,dataRef:E,elements:{domReference:R,floating:I}}=t,k="number"==typeof l&&l<0,O=A(R)&&k,M="undefined"==typeof HTMLElement||!("inert"in HTMLElement.prototype)||i,S=Ee(o),P=Ee(l),D=Ee(c),N=ye(),F=st(),j=u.useRef(null),K=u.useRef(null),H=u.useRef(!1),q=u.useRef(!1),_=null!=F,B=u.useCallback((function(e){return void 0===e&&(e=I),e?Be(e,$e()):[]}),[I]),W=u.useCallback((e=>{const t=B(e);return S.current.map((e=>R&&"reference"===e?R:I&&"floating"===e?I:t)).filter(Boolean).flat()}),[R,I,S,B]);function U(e){return!r&&a&&s?u.createElement(mt,{ref:"start"===e?j:K,onClick:e=>g(!1,e.nativeEvent)},"string"==typeof a?a:"Dismiss"):null}u.useEffect((()=>{if(r||!s)return;function e(e){if("Tab"===e.key){y(I,h(C(I)))&&0===B().length&&!O&&L(e);const t=W(),n=T(e);"reference"===S.current[0]&&n===R&&(L(e),e.shiftKey?G(t[t.length-1]):G(t[1])),"floating"===S.current[1]&&n===I&&e.shiftKey&&(L(e),G(t[0]))}}const t=C(I);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}),[r,R,I,s,S,O,B,W]),u.useEffect((()=>{if(!r&&f)return I&&v(R)?(R.addEventListener("focusout",t),R.addEventListener("pointerdown",e),!s&&I.addEventListener("focusout",t),()=>{R.removeEventListener("focusout",t),R.removeEventListener("pointerdown",e),!s&&I.removeEventListener("focusout",t)}):void 0;function e(){q.current=!0,setTimeout((()=>{q.current=!1}))}function t(e){const t=e.relatedTarget;queueMicrotask((()=>{const n=!(y(R,t)||y(I,t)||y(t,I)||y(null==F?void 0:F.portalNode,t)||null!=t&&t.hasAttribute(be("focus-guard"))||N&&(We(N.nodesRef.current,p).find((e=>{var n,r;return y(null==(n=e.context)?void 0:n.elements.floating,t)||y(null==(r=e.context)?void 0:r.elements.domReference,t)}))||function(e,t){var n;let r=[],o=null==(n=e.find((e=>e.id===t)))?void 0:n.parentId;for(;o;){const t=e.find((e=>e.id===o));o=null==t?void 0:t.parentId,t&&(r=r.concat(t))}return r}(N.nodesRef.current,p).find((e=>{var n,r;return(null==(n=e.context)?void 0:n.elements.floating)===t||(null==(r=e.context)?void 0:r.elements.domReference)===t}))));t&&n&&!q.current&&t!==vt()&&(H.current=!0,g(!1,e))}))}}),[r,R,I,s,p,N,F,g,f]),u.useEffect((()=>{var e;if(r)return;const t=Array.from((null==F||null==(e=F.portalNode)?void 0:e.querySelectorAll("["+be("portal")+"]"))||[]);if(I){const e=[I,...t,j.current,K.current,S.current.includes("reference")||O?R:null].filter((e=>null!=e)),n=s||O?Ze(e,M,!M):Ze(e);return()=>{n()}}}),[r,R,I,s,S,F,O,M]),Z((()=>{if(r||!I)return;const e=h(C(I));queueMicrotask((()=>{const t=W(I),n=P.current,r=("number"==typeof n?t[n]:n.current)||I,o=y(I,e);k||o||!d||G(r,{preventScroll:r===I})}))}),[r,d,I,k,W,P]),Z((()=>{if(r||!I)return;let e=!1;const t=C(I),n=h(t),o=E.current;function u(t){let{reason:n,event:r,nested:o}=t;"escape-key"===n&&m.domReference.current&&dt(m.domReference.current),"hover"===n&&"mouseleave"===r.type&&(H.current=!0),"outside-press"===n&&(o?(H.current=!1,e=!0):H.current=!(w(r)||x(r)))}return dt(n),b.on("openchange",u),()=>{b.off("openchange",u);const n=h(t),r=y(I,n)||N&&We(N.nodesRef.current,p).some((e=>{var t;return y(null==(t=e.context)?void 0:t.elements.floating,n)}));(r||o.openEvent&&["click","mousedown"].includes(o.openEvent.type))&&m.domReference.current&&dt(m.domReference.current);const i=vt();D.current&&!H.current&&v(i)&&(i===n||n===t.body||r)&&G(i,{cancelPrevious:!1,preventScroll:e})}}),[r,I,D,E,m,b,N,p]),Z((()=>{if(!r&&F)return F.setFocusManagerState({modal:s,closeOnFocusOut:f,open:d,onOpenChange:g,refs:m}),()=>{F.setFocusManagerState(null)}}),[r,F,s,d,g,m,f]),Z((()=>{if(r||!I||"function"!=typeof MutationObserver||k)return;const e=()=>{const e=I.getAttribute("tabindex");S.current.includes("floating")||h(C(I))!==m.domReference.current&&0===B().length?"0"!==e&&I.setAttribute("tabindex","0"):"-1"!==e&&I.setAttribute("tabindex","-1")};e();const t=new MutationObserver(e);return t.observe(I,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}}),[r,I,m,S,B,k]);const z=!r&&M&&(_||s);return u.createElement(u.Fragment,null,z&&u.createElement(it,{"data-type":"inside",ref:null==F?void 0:F.beforeInsideRef,onFocus:e=>{if(s){const e=W();G("reference"===o[0]?e[0]:e[e.length-1])}else if(null!=F&&F.preserveTabOrder&&F.portalNode)if(H.current=!1,tt(e,F.portalNode)){const e=Je()||R;null==e||e.focus()}else{var t;null==(t=F.beforeOutsideRef.current)||t.focus()}}}),!O&&U("start"),n,U("end"),z&&u.createElement(it,{"data-type":"inside",ref:null==F?void 0:F.afterInsideRef,onFocus:e=>{if(s)G(W()[0]);else if(null!=F&&F.preserveTabOrder&&F.portalNode)if(f&&(H.current=!0),tt(e,F.portalNode)){const e=et()||R;null==e||e.focus()}else{var t;null==(t=F.afterOutsideRef.current)||t.focus()}}}))},e.FloatingList=J,e.FloatingNode=function(e){let{children:t,id:n}=e;const r=he();return u.createElement(pe.Provider,{value:u.useMemo((()=>({id:n,parentId:r})),[n,r])},t)},e.FloatingOverlay=gt,e.FloatingPortal=function(e){let{children:t,id:n,root:o=null,preserveTabOrder:i=!0}=e;const l=ct({id:n,root:o}),[c,s]=u.useState(null),a=u.useRef(null),f=u.useRef(null),d=u.useRef(null),v=u.useRef(null),m=!!c&&!c.modal&&c.open&&i&&!(!o&&!l);return u.useEffect((()=>{if(l&&i&&(null==c||!c.modal))return l.addEventListener("focusin",e,!0),l.addEventListener("focusout",e,!0),()=>{l.removeEventListener("focusin",e,!0),l.removeEventListener("focusout",e,!0)};function e(e){if(l&&tt(e)){("focusin"===e.type?rt:nt)(l)}}}),[l,i,null==c?void 0:c.modal]),u.createElement(lt.Provider,{value:u.useMemo((()=>({preserveTabOrder:i,beforeOutsideRef:a,afterOutsideRef:f,beforeInsideRef:d,afterInsideRef:v,portalNode:l,setFocusManagerState:s})),[i,l])},m&&l&&u.createElement(it,{"data-type":"outside",ref:a,onFocus:e=>{if(tt(e,l)){var t;null==(t=d.current)||t.focus()}else{const e=et()||(null==c?void 0:c.refs.domReference.current);null==e||e.focus()}}}),m&&l&&u.createElement("span",{"aria-owns":l.id,style:ot}),l&&r.createPortal(t,l),m&&l&&u.createElement(it,{"data-type":"outside",ref:f,onFocus:e=>{if(tt(e,l)){var t;null==(t=v.current)||t.focus()}else{const t=Je()||(null==c?void 0:c.refs.domReference.current);null==t||t.focus(),(null==c?void 0:c.closeOnFocusOut)&&(null==c||c.onOpenChange(!1,e.nativeEvent))}}}))},e.FloatingTree=function(e){let{children:t}=e;const n=u.useRef([]),r=u.useCallback((e=>{n.current=[...n.current,e]}),[]),o=u.useCallback((e=>{n.current=n.current.filter((t=>t!==e))}),[]),i=u.useState((()=>me()))[0];return u.createElement(ge.Provider,{value:u.useMemo((()=>({nodesRef:n,addNode:r,removeNode:o,events:i})),[r,o,i])},t)},e.inner=e=>({name:"inner",options:e,async fn(t){const{listRef:o,overflowRef:u,onFallbackChange:i,offset:l=0,index:c=0,minItemsVisible:s=4,referenceOverflowThreshold:a=0,scrollRef:f,...d}=e,{rects:v,elements:{floating:m}}=t,p=o.current[c];if(!p)return{};const g={...t,...await n.offset(-p.offsetTop-m.clientTop-v.reference.height/2-p.offsetHeight/2-l).fn(t)},h=(null==f?void 0:f.current)||m,y=await n.detectOverflow(Nt(g,h.scrollHeight),d),b=await n.detectOverflow(g,{...d,elementContext:"reference"}),E=Math.max(0,y.top),w=g.y+E,x=Math.max(0,h.scrollHeight-E-Math.max(0,y.bottom));return h.style.maxHeight=x+"px",h.scrollTop=E,i&&(h.offsetHeight<p.offsetHeight*Math.min(s,o.current.length-1)-1||b.top>=-a||b.bottom>=-a?r.flushSync((()=>i(!0))):r.flushSync((()=>i(!1)))),u&&(u.current=await n.detectOverflow(Nt({...g,y:w},h.offsetHeight),d)),{y:w}}}),e.safePolygon=function(e){void 0===e&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,u=!1,i=null,l=null,c=performance.now();const s=e=>{let{x:n,y:s,placement:a,elements:f,onClose:v,nodeId:m,tree:p}=e;return function(e){function g(){clearTimeout(o),v()}if(clearTimeout(o),!f.domReference||!f.floating||null==a||null==n||null==s)return;const{clientX:h,clientY:b}=e,E=[h,b],w=T(e),x="mouseleave"===e.type,R=y(f.floating,w),I=y(f.domReference,w),k=f.domReference.getBoundingClientRect(),O=f.floating.getBoundingClientRect(),C=a.split("-")[0],M=n>O.right-O.width/2,S=s>O.bottom-O.height/2,P=function(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}(E,k),L=O.width>k.width,A=O.height>k.height,D=(L?k:O).left,N=(L?k:O).right,F=(A?k:O).top,j=(A?k:O).bottom;if(R&&(u=!0,!x))return;if(I&&(u=!1),I&&!x)return void(u=!0);if(x&&d(e.relatedTarget)&&y(f.floating,e.relatedTarget))return;if(p&&We(p.nodesRef.current,m).some((e=>{let{context:t}=e;return null==t?void 0:t.open})))return;if("top"===C&&s>=k.bottom-1||"bottom"===C&&s<=k.top+1||"left"===C&&n>=k.right-1||"right"===C&&n<=k.left+1)return g();let K=[];switch(C){case"top":K=[[D,k.top+1],[D,O.bottom-1],[N,O.bottom-1],[N,k.top+1]];break;case"bottom":K=[[D,O.top+1],[D,k.bottom-1],[N,k.bottom-1],[N,O.top+1]];break;case"left":K=[[O.right-1,j],[O.right-1,F],[k.left+1,F],[k.left+1,j]];break;case"right":K=[[k.right-1,j],[k.right-1,F],[O.left+1,F],[O.left+1,j]]}if(!Ft([h,b],K)){if(u&&!P)return g();if(!x&&r){const t=function(e,t){const n=performance.now(),r=n-c;if(null===i||null===l||0===r)return i=e,l=t,c=n,null;const o=e-i,u=t-l,s=Math.sqrt(o*o+u*u);return i=e,l=t,c=n,s/r}(e.clientX,e.clientY);if(null!==t&&t<.1)return g()}Ft([h,b],function(e){let[n,r]=e;switch(C){case"top":return[[L?n+t/2:M?n+4*t:n-4*t,r+t+1],[L?n-t/2:M?n+4*t:n-4*t,r+t+1],...[[O.left,M||L?O.bottom-t:O.top],[O.right,M?L?O.bottom-t:O.top:O.bottom-t]]];case"bottom":return[[L?n+t/2:M?n+4*t:n-4*t,r-t],[L?n-t/2:M?n+4*t:n-4*t,r-t],...[[O.left,M||L?O.top+t:O.bottom],[O.right,M?L?O.top+t:O.bottom:O.top+t]]];case"left":{const e=[n+t+1,A?r+t/2:S?r+4*t:r-4*t],o=[n+t+1,A?r-t/2:S?r+4*t:r-4*t];return[...[[S||A?O.right-t:O.left,O.top],[S?A?O.right-t:O.left:O.right-t,O.bottom]],e,o]}case"right":return[[n-t,A?r+t/2:S?r+4*t:r-4*t],[n-t,A?r-t/2:S?r+4*t:r-4*t],...[[S||A?O.left+t:O.right,O.top],[S?A?O.left+t:O.right:O.left+t,O.bottom]]]}}([n,s]))?!u&&r&&(o=window.setTimeout(g,40)):g()}}};return s.__options={blockPointerEvents:n},s},e.useClick=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:l=!0,event:c="click",toggle:s=!0,ignoreMouse:a=!1,keyboardHandlers:f=!0}=t,d=u.useRef(),v=u.useRef(!1);return u.useMemo((()=>l?{reference:{onPointerDown(e){d.current=e.pointerType},onMouseDown(e){0===e.button&&(O(d.current,!0)&&a||"click"!==c&&(!n||!s||o.current.openEvent&&"mousedown"!==o.current.openEvent.type?(e.preventDefault(),r(!0,e.nativeEvent,"click")):r(!1,e.nativeEvent,"click")))},onClick(e){"mousedown"===c&&d.current?d.current=void 0:O(d.current,!0)&&a||(!n||!s||o.current.openEvent&&"click"!==o.current.openEvent.type?r(!0,e.nativeEvent,"click"):r(!1,e.nativeEvent,"click"))},onKeyDown(e){d.current=void 0,e.defaultPrevented||!f||ht(e)||(" "!==e.key||yt(i)||(e.preventDefault(),v.current=!0),"Enter"===e.key&&r(!n||!s,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!f||ht(e)||yt(i)||" "===e.key&&v.current&&(v.current=!1,r(!n||!s,e.nativeEvent,"click"))}}}:{}),[l,o,c,a,f,i,s,n,r])},e.useClientPoint=function(e,t){void 0===t&&(t={});const{open:n,refs:r,dataRef:o,elements:{floating:i}}=e,{enabled:l=!0,axis:s="both",x:f=null,y:d=null}=t,v=u.useRef(!1),m=u.useRef(null),[p,g]=u.useState(),[h,b]=u.useState([]),E=c(((e,t)=>{v.current||o.current.openEvent&&!bt(o.current.openEvent)||r.setPositionReference(function(e,t){let n=null,r=null,o=!1;return{contextElement:e.current||void 0,getBoundingClientRect(){var u,i;const l=(null==(u=e.current)?void 0:u.getBoundingClientRect())||{width:0,height:0,x:0,y:0},c="x"===t.axis||"both"===t.axis,s="y"===t.axis||"both"===t.axis,a=["mouseenter","mousemove"].includes((null==(i=t.dataRef.current.openEvent)?void 0:i.type)||"")&&"touch"!==t.pointerType;let f=l.width,d=l.height,v=l.x,m=l.y;return null==n&&t.x&&c&&(n=l.x-t.x),null==r&&t.y&&s&&(r=l.y-t.y),v-=n||0,m-=r||0,f=0,d=0,!o||a?(f="y"===t.axis?l.width:0,d="x"===t.axis?l.height:0,v=c&&null!=t.x?t.x:v,m=s&&null!=t.y?t.y:m):o&&!a&&(d="x"===t.axis?l.height:d,f="y"===t.axis?l.width:f),o=!0,{width:f,height:d,x:v,y:m,top:m,right:v+f,bottom:m+d,left:v}}}}(r.domReference,{x:e,y:t,axis:s,dataRef:o,pointerType:p}))})),w=c((e=>{null==f&&null==d&&(n?m.current||b([]):E(e.clientX,e.clientY))})),x=O(p)?i:n,R=u.useCallback((()=>{if(!x||!l||null!=f||null!=d)return;const e=a(r.floating.current);function t(n){const o=T(n);y(r.floating.current,o)?(e.removeEventListener("mousemove",t),m.current=null):E(n.clientX,n.clientY)}if(!o.current.openEvent||bt(o.current.openEvent)){e.addEventListener("mousemove",t);const n=()=>{e.removeEventListener("mousemove",t),m.current=null};return m.current=n,n}r.setPositionReference(r.domReference.current)}),[o,l,x,r,E,f,d]);return u.useEffect((()=>R()),[R,h]),u.useEffect((()=>{l&&!i&&(v.current=!1)}),[l,i]),u.useEffect((()=>{!l&&n&&(v.current=!0)}),[l,n]),Z((()=>{!l||null==f&&null==d||(v.current=!1,E(f,d))}),[l,f,d,E]),u.useMemo((()=>{if(!l)return{};function e(e){let{pointerType:t}=e;g(t)}return{reference:{onPointerDown:e,onPointerEnter:e,onMouseMove:w,onMouseEnter:w}}}),[l,w])},e.useDelayGroup=(e,t)=>{let{open:n,onOpenChange:r}=e,{id:o}=t;const{currentId:u,setCurrentId:i,initialDelay:l,setState:c,timeoutMs:s}=Ie();Z((()=>{u&&(c({delay:{open:1,close:xe(l,"close")}}),u!==o&&r(!1))}),[o,r,c,u,l]),Z((()=>{function e(){r(!1),c({delay:l,currentId:null})}if(!n&&u===o){if(s){const t=window.setTimeout(e,s);return()=>{clearTimeout(t)}}e()}}),[n,c,u,o,r,l,s]),Z((()=>{n&&i(o)}),[n,i,o])},e.useDelayGroupContext=Ie,e.useDismiss=function(e,t){void 0===t&&(t={});const{open:r,onOpenChange:o,nodeId:i,elements:{reference:l,domReference:s,floating:f},dataRef:m}=e,{enabled:h=!0,escapeKey:b=!0,outsidePress:E=!0,outsidePressEvent:w="pointerdown",referencePress:x=!1,referencePressEvent:R="pointerdown",ancestorScroll:I=!1,bubbles:k,capture:O}=t,S=ye(),P=c("function"==typeof E?E:()=>!1),L="function"==typeof E?P:E,A=u.useRef(!1),D=u.useRef(!1),{escapeKey:N,outsidePress:F}=xt(k),{escapeKey:j,outsidePress:K}=xt(O),H=c((e=>{if(!r||!h||!b||"Escape"!==e.key)return;const t=S?We(S.nodesRef.current,i):[];if(!N&&(e.stopPropagation(),t.length>0)){let e=!0;if(t.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}o(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),q=c((e=>{var t;const n=()=>{var t;H(e),null==(t=T(e))||t.removeEventListener("keydown",n)};null==(t=T(e))||t.addEventListener("keydown",n)})),_=c((e=>{const t=A.current;A.current=!1;const n=D.current;if(D.current=!1,"click"===w&&n)return;if(t)return;if("function"==typeof L&&!L(e))return;const r=T(e),u="["+be("inert")+"]",l=C(f).querySelectorAll(u);let c=d(r)?r:null;for(;c&&!p(c);){const e=g(c);if(p(e)||!d(e))break;c=e}if(l.length&&d(r)&&!r.matches("html,body")&&!y(r,f)&&Array.from(l).every((e=>!y(c,e))))return;if(v(r)&&f){const t=r.clientWidth>0&&r.scrollWidth>r.clientWidth,n=r.clientHeight>0&&r.scrollHeight>r.clientHeight;let o=n&&e.offsetX>r.clientWidth;if(n){const t="rtl"===function(e){return a(e).getComputedStyle(e)}(r).direction;t&&(o=e.offsetX<=r.offsetWidth-r.clientWidth)}if(o||t&&e.offsetY>r.clientHeight)return}const m=S&&We(S.nodesRef.current,i).some((t=>{var n;return M(e,null==(n=t.context)?void 0:n.elements.floating)}));if(M(e,f)||M(e,s)||m)return;const h=S?We(S.nodesRef.current,i):[];if(h.length>0){let e=!0;if(h.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}o(!1,e,"outside-press")})),B=c((e=>{var t;const n=()=>{var t;_(e),null==(t=T(e))||t.removeEventListener(w,n)};null==(t=T(e))||t.addEventListener(w,n)}));return u.useEffect((()=>{if(!r||!h)return;function e(e){o(!1,e,"ancestor-scroll")}m.current.__escapeKeyBubbles=N,m.current.__outsidePressBubbles=F;const t=C(f);b&&t.addEventListener("keydown",j?q:H,j),L&&t.addEventListener(w,K?B:_,K);let u=[];return I&&(d(s)&&(u=n.getOverflowAncestors(s)),d(f)&&(u=u.concat(n.getOverflowAncestors(f))),!d(l)&&l&&l.contextElement&&(u=u.concat(n.getOverflowAncestors(l.contextElement)))),u=u.filter((e=>{var n;return e!==(null==(n=t.defaultView)?void 0:n.visualViewport)})),u.forEach((t=>{t.addEventListener("scroll",e,{passive:!0})})),()=>{b&&t.removeEventListener("keydown",j?q:H,j),L&&t.removeEventListener(w,K?B:_,K),u.forEach((t=>{t.removeEventListener("scroll",e)}))}}),[m,f,s,l,b,L,w,r,o,I,h,N,F,H,j,q,_,K,B]),u.useEffect((()=>{A.current=!1}),[L,w]),u.useMemo((()=>h?{reference:{onKeyDown:H,[Et[R]]:e=>{x&&o(!1,e.nativeEvent,"reference-press")}},floating:{onKeyDown:H,onMouseDown(){D.current=!0},onMouseUp(){D.current=!0},[wt[w]]:()=>{A.current=!0}}}:{}),[h,x,w,R,o,H])},e.useFloating=function(e){var t;void 0===e&&(e={});const{open:r=!1,onOpenChange:o,nodeId:i}=e,[l,s]=u.useState(null),a=(null==(t=e.elements)?void 0:t.reference)||l,f=n.useFloating(e),v=ye(),m=null!=he(),p=c(((e,t,n)=>{e&&(h.current.openEvent=t),y.emit("openchange",{open:e,event:t,reason:n,nested:m}),null==o||o(e,t,n)})),g=u.useRef(null),h=u.useRef({}),y=u.useState((()=>me()))[0],b=de(),E=u.useCallback((e=>{const t=d(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;f.refs.setReference(t)}),[f.refs]),w=u.useCallback((e=>{(d(e)||null===e)&&(g.current=e,s(e)),(d(f.refs.reference.current)||null===f.refs.reference.current||null!==e&&!d(e))&&f.refs.setReference(e)}),[f.refs]),x=u.useMemo((()=>({...f.refs,setReference:w,setPositionReference:E,domReference:g})),[f.refs,w,E]),R=u.useMemo((()=>({...f.elements,domReference:a})),[f.elements,a]),I=u.useMemo((()=>({...f,refs:x,elements:R,dataRef:h,nodeId:i,floatingId:b,events:y,open:r,onOpenChange:p})),[f,i,b,y,r,p,x,R]);return Z((()=>{const e=null==v?void 0:v.nodesRef.current.find((e=>e.id===i));e&&(e.context=I)})),u.useMemo((()=>({...f,context:I,refs:x,elements:R})),[f,x,R,I])},e.useFloatingNodeId=function(e){const t=de(),n=ye(),r=he(),o=e||r;return Z((()=>{const e={id:t,parentId:o};return null==n||n.addNode(e),()=>{null==n||n.removeNode(e)}}),[n,t,o]),t},e.useFloatingParentNodeId=he,e.useFloatingPortalNode=ct,e.useFloatingTree=ye,e.useFocus=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,events:o,refs:i,elements:{floating:l,domReference:c}}=e,{enabled:s=!0,visibleOnly:f=!0}=t,m=u.useRef(!1),p=u.useRef(),g=u.useRef(!0);return u.useEffect((()=>{if(!s)return;const e=a(c);function t(){!n&&v(c)&&c===h(C(c))&&(m.current=!0)}function r(){g.current=!0}return e.addEventListener("blur",t),e.addEventListener("keydown",r,!0),()=>{e.removeEventListener("blur",t),e.removeEventListener("keydown",r,!0)}}),[c,n,s]),u.useEffect((()=>{if(s)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){let{reason:t}=e;"reference-press"!==t&&"escape-key"!==t||(m.current=!0)}}),[o,s]),u.useEffect((()=>()=>{clearTimeout(p.current)}),[]),u.useMemo((()=>s?{reference:{onPointerDown(e){x(e.nativeEvent)||(g.current=!1)},onMouseLeave(){m.current=!1},onFocus(e){if(m.current)return;const t=T(e.nativeEvent);if(f&&d(t))try{if(R()&&k())throw Error();if(!t.matches(":focus-visible"))return}catch(e){if(!g.current&&!P(t))return}r(!0,e.nativeEvent,"focus")},onBlur(e){m.current=!1;const t=e.relatedTarget,n=d(t)&&t.hasAttribute(be("focus-guard"))&&"outside"===t.getAttribute("data-type");p.current=window.setTimeout((()=>{const o=h(c?c.ownerDocument:document);(t||o!==c)&&(y(i.floating.current,t)||y(c,t)||n||r(!1,e.nativeEvent,"focus"))}))}}}:{}),[s,f,c,i,r])},e.useHover=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:{domReference:l,floating:c},refs:s}=e,{enabled:a=!0,delay:f=0,handleClose:v=null,mouseOnly:m=!1,restMs:p=0,move:g=!0}=t,h=ye(),b=he(),E=Ee(v),w=Ee(f),x=u.useRef(),R=u.useRef(),I=u.useRef(),k=u.useRef(),M=u.useRef(!0),T=u.useRef(!1),S=u.useRef((()=>{})),P=u.useCallback((()=>{var e;const t=null==(e=o.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t}),[o]);u.useEffect((()=>{if(a)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(R.current),clearTimeout(k.current),M.current=!0)}}),[a,i]),u.useEffect((()=>{if(!a||!E.current||!n)return;function e(e){P()&&r(!1,e,"hover")}const t=C(c).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}}),[c,n,r,a,E,P]);const L=u.useCallback((function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const o=xe(w.current,"close",x.current);o&&!I.current?(clearTimeout(R.current),R.current=setTimeout((()=>r(!1,e,n)),o)):t&&(clearTimeout(R.current),r(!1,e,n))}),[w,r]),A=u.useCallback((()=>{S.current(),I.current=void 0}),[]),D=u.useCallback((()=>{if(T.current){const e=C(s.floating.current).body;e.style.pointerEvents="",e.removeAttribute(we),T.current=!1}}),[s]);return u.useEffect((()=>{if(a&&d(l)){const e=l;return n&&e.addEventListener("mouseleave",s),null==c||c.addEventListener("mouseleave",s),g&&e.addEventListener("mousemove",u,{once:!0}),e.addEventListener("mouseenter",u),e.addEventListener("mouseleave",i),()=>{n&&e.removeEventListener("mouseleave",s),null==c||c.removeEventListener("mouseleave",s),g&&e.removeEventListener("mousemove",u),e.removeEventListener("mouseenter",u),e.removeEventListener("mouseleave",i)}}function t(){return!!o.current.openEvent&&["click","mousedown"].includes(o.current.openEvent.type)}function u(e){if(clearTimeout(R.current),M.current=!1,m&&!O(x.current)||p>0&&0===xe(w.current,"open"))return;const t=xe(w.current,"open",x.current);t?R.current=setTimeout((()=>{r(!0,e,"hover")}),t):r(!0,e,"hover")}function i(r){if(t())return;S.current();const o=C(c);if(clearTimeout(k.current),E.current){n||clearTimeout(R.current),I.current=E.current({...e,tree:h,x:r.clientX,y:r.clientY,onClose(){D(),A(),L(r,!0,"safe-polygon")}});const t=I.current;return o.addEventListener("mousemove",t),void(S.current=()=>{o.removeEventListener("mousemove",t)})}("touch"!==x.current||!y(c,r.relatedTarget))&&L(r)}function s(n){t()||null==E.current||E.current({...e,tree:h,x:n.clientX,y:n.clientY,onClose(){D(),A(),L(n)}})(n)}}),[l,c,a,e,m,p,g,L,A,D,r,n,h,w,E,o]),Z((()=>{var e;if(a&&n&&null!=(e=E.current)&&e.__options.blockPointerEvents&&P()){const e=C(c).body;if(e.setAttribute(we,""),e.style.pointerEvents="none",T.current=!0,d(l)&&c){var t;const e=l,n=null==h||null==(t=h.nodesRef.current.find((e=>e.id===b)))||null==(t=t.context)?void 0:t.elements.floating;return n&&(n.style.pointerEvents=""),e.style.pointerEvents="auto",c.style.pointerEvents="auto",()=>{e.style.pointerEvents="",c.style.pointerEvents=""}}}}),[a,n,b,c,l,h,E,P]),Z((()=>{n||(x.current=void 0,A(),D())}),[n,A,D]),u.useEffect((()=>()=>{A(),clearTimeout(R.current),clearTimeout(k.current),D()}),[a,l,A,D]),u.useMemo((()=>{if(!a)return{};function e(e){x.current=e.pointerType}return{reference:{onPointerDown:e,onPointerEnter:e,onMouseMove(e){n||0===p||(clearTimeout(k.current),k.current=setTimeout((()=>{M.current||r(!0,e.nativeEvent,"hover")}),p))}},floating:{onMouseEnter(){clearTimeout(R.current)},onMouseLeave(e){L(e.nativeEvent,!1)}}}}),[a,p,n,r,L])},e.useId=de,e.useInnerOffset=function(e,t){const{open:n,elements:o}=e,{enabled:i=!0,overflowRef:l,scrollRef:s,onChange:a}=t,f=c(a),d=u.useRef(!1),v=u.useRef(null),m=u.useRef(null);return u.useEffect((()=>{if(!i)return;function e(e){if(e.ctrlKey||!t||null==l.current)return;const n=e.deltaY,o=l.current.top>=-.5,u=l.current.bottom>=-.5,i=t.scrollHeight-t.clientHeight,c=n<0?-1:1,s=n<0?"max":"min";t.scrollHeight<=t.clientHeight||(!o&&n>0||!u&&n<0?(e.preventDefault(),r.flushSync((()=>{f((e=>e+Math[s](n,i*c)))}))):/firefox/i.test(E())&&(t.scrollTop+=n))}const t=(null==s?void 0:s.current)||o.floating;return n&&t?(t.addEventListener("wheel",e),requestAnimationFrame((()=>{v.current=t.scrollTop,null!=l.current&&(m.current={...l.current})})),()=>{v.current=null,m.current=null,t.removeEventListener("wheel",e)}):void 0}),[i,n,o.floating,l,s,f]),u.useMemo((()=>i?{floating:{onKeyDown(){d.current=!0},onWheel(){d.current=!1},onPointerMove(){d.current=!1},onScroll(){const e=(null==s?void 0:s.current)||o.floating;if(l.current&&e&&d.current){if(null!==v.current){const t=e.scrollTop-v.current;(l.current.bottom<-.5&&t<-1||l.current.top<-.5&&t>1)&&r.flushSync((()=>f((e=>e+t))))}requestAnimationFrame((()=>{v.current=e.scrollTop}))}}}}:{}),[i,l,o.floating,s,f])},e.useInteractions=function(e){void 0===e&&(e=[]);const t=e,n=u.useCallback((t=>kt(t,e,"reference")),t),r=u.useCallback((t=>kt(t,e,"floating")),t),o=u.useCallback((t=>kt(t,e,"item")),e.map((e=>null==e?void 0:e.item)));return u.useMemo((()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:o})),[n,r,o])},e.useListItem=ee,e.useListNavigation=function(e,t){const{open:n,onOpenChange:r,refs:o,elements:{domReference:i,floating:l}}=e,{listRef:s,activeIndex:a,onNavigate:f=(()=>{}),enabled:d=!0,selectedIndex:m=null,allowEscape:p=!1,loop:g=!1,nested:b=!1,rtl:E=!1,virtual:I=!1,focusItemOnOpen:O="auto",focusItemOnHover:M=!0,openOnArrowKeyDown:T=!0,disabledIndices:S,orientation:P="vertical",cols:D=1,scrollItemIntoView:N=!0,virtualItemRef:H,itemSizes:V,dense:$=!1}=t,Q=he(),J=ye(),ee=c(f),te=u.useRef(O),ne=u.useRef(null!=m?m:-1),re=u.useRef(null),oe=u.useRef(!0),ue=u.useRef(ee),ie=u.useRef(!!l),le=u.useRef(!1),ce=u.useRef(!1),se=Ee(S),ae=Ee(n),fe=Ee(N),[de,ve]=u.useState(),[me,pe]=u.useState(),ge=c((function(e,t,n){void 0===n&&(n=!1);const r=e.current[t.current];r&&(I?(ve(r.id),null==J||J.events.emit("virtualfocus",r),H&&(H.current=r)):G(r,{preventScroll:!0,sync:!(!k()||!R())&&(Ot||le.current)}),requestAnimationFrame((()=>{const e=fe.current;e&&r&&(n||!oe.current)&&(null==r.scrollIntoView||r.scrollIntoView("boolean"==typeof e?{block:"nearest",inline:"nearest"}:e))})))}));Z((()=>{document.createElement("div").focus({get preventScroll(){return Ot=!0,!1}})}),[]),Z((()=>{d&&(n&&l?te.current&&null!=m&&(ce.current=!0,ne.current=m,ee(m)):ie.current&&(ne.current=-1,ue.current(null)))}),[d,n,l,m,ee]),Z((()=>{if(d&&n&&l)if(null==a){if(le.current=!1,null!=m)return;if(ie.current&&(ne.current=-1,ge(s,ne)),!ie.current&&te.current&&(null!=re.current||!0===te.current&&null==re.current)){let e=0;const t=()=>{if(null==s.current[0]){if(e<2){(e?requestAnimationFrame:queueMicrotask)(t)}e++}else ne.current=null==re.current||Tt(re.current,P,E)||b?_(s,se.current):B(s,se.current),re.current=null,ee(ne.current)};t()}}else q(s,a)||(ne.current=a,ge(s,ne,ce.current),ce.current=!1)}),[d,n,l,a,m,b,s,P,E,ee,ge,se]),Z((()=>{var e;if(!d||l||!J||I||!ie.current)return;const t=J.nodesRef.current,n=null==(e=t.find((e=>e.id===Q)))||null==(e=e.context)?void 0:e.elements.floating,r=h(C(l)),o=t.some((e=>e.context&&y(e.context.elements.floating,r)));n&&!o&&oe.current&&n.focus({preventScroll:!0})}),[d,l,J,Q,I]),Z((()=>{if(d&&J&&I&&!Q)return J.events.on("virtualfocus",e),()=>{J.events.off("virtualfocus",e)};function e(e){pe(e.id),H&&(H.current=e)}}),[d,J,I,Q,H]),Z((()=>{ue.current=ee,ie.current=!!l})),Z((()=>{n||(re.current=null)}),[n]);const be=null!=a,we=u.useMemo((()=>{function e(e){if(!n)return;const t=s.current.indexOf(e);-1!==t&&ee(t)}return{onFocus(t){let{currentTarget:n}=t;e(n)},onClick:e=>{let{currentTarget:t}=e;return t.focus({preventScroll:!0})},...M&&{onMouseMove(t){let{currentTarget:n}=t;e(n)},onPointerLeave(e){let{pointerType:t}=e;oe.current&&"touch"!==t&&(ne.current=-1,ge(s,ne),ee(null),I||G(o.floating.current,{preventScroll:!0}))}}}}),[n,o,ge,M,s,ee,I]);return u.useMemo((()=>{if(!d)return{};const e=se.current;function t(t){if(oe.current=!1,le.current=!0,!ae.current&&t.currentTarget===o.floating.current)return;if(b&&St(t.key,P,E))return L(t),r(!1,t.nativeEvent,"list-navigation"),void(v(i)&&!I&&i.focus());const u=ne.current,l=_(s,e),c=B(s,e);if("Home"===t.key&&(L(t),ne.current=l,ee(ne.current)),"End"===t.key&&(L(t),ne.current=c,ee(ne.current)),D>1){const n=V||Array.from({length:s.current.length},(()=>({width:1,height:1}))),r=z(n,D,$),o=r.findIndex((t=>null!=t&&!(null!=e&&e.includes(t)))),u=r.reduce(((t,n,r)=>null==n||null!=e&&e.includes(n)?t:r),-1);if(ne.current=r[U({current:r.map((e=>null!=e?s.current[e]:null))},{event:t,orientation:P,loop:g,cols:D,disabledIndices:Y([...e||[],void 0],r),minIndex:o,maxIndex:u,prevIndex:X(ne.current,n,r,D,t.key===F?"bl":t.key===K?"tr":"tl"),stopEvent:!0})],ee(ne.current),"both"===P)return}if(Mt(t.key,P)){if(L(t),n&&!I&&h(t.currentTarget.ownerDocument)===t.currentTarget)return ne.current=Tt(t.key,P,E)?l:c,void ee(ne.current);Tt(t.key,P,E)?ne.current=g?u>=c?p&&u!==s.current.length?-1:l:W(s,{startingIndex:u,disabledIndices:e}):Math.min(c,W(s,{startingIndex:u,disabledIndices:e})):ne.current=g?u<=l?p&&-1!==u?s.current.length:c:W(s,{startingIndex:u,decrement:!0,disabledIndices:e}):Math.max(l,W(s,{startingIndex:u,decrement:!0,disabledIndices:e})),q(s,ne.current)?ee(null):ee(ne.current)}}function u(e){"auto"===O&&w(e.nativeEvent)&&(te.current=!0)}const l=I&&n&&be&&{"aria-activedescendant":me||de},c=s.current.find((e=>(null==e?void 0:e.id)===de));return{reference:{...l,onKeyDown(o){oe.current=!1;const u=0===o.key.indexOf("Arrow"),i=function(e,t,n){return Ct(t,n?e===j:e===K,e===F)}(o.key,P,E),l=St(o.key,P,E),a=Mt(o.key,P),f=(b?i:a)||"Enter"===o.key||""===o.key.trim();if(I&&n){const e=null==J?void 0:J.nodesRef.current.find((e=>null==e.parentId)),n=J&&e?function(e,t){let n,r=-1;return function t(o,u){u>r&&(n=o,r=u),We(e,o).forEach((e=>{t(e.id,u+1)}))}(t,0),e.find((e=>e.id===n))}(J.nodesRef.current,e.id):null;if(u&&n&&H){const e=new KeyboardEvent("keydown",{key:o.key,bubbles:!0});if(i||l){var d,v;const t=(null==(d=n.context)?void 0:d.elements.domReference)===o.currentTarget,r=l&&!t?null==(v=n.context)?void 0:v.elements.domReference:i?c:null;r&&(L(o),r.dispatchEvent(e),pe(void 0))}var p;if(a&&n.context)if(n.context.open&&n.parentId&&o.currentTarget!==n.context.elements.domReference)return L(o),void(null==(p=n.context.elements.domReference)||p.dispatchEvent(e))}return t(o)}(n||T||!u)&&(f&&(re.current=b&&a?null:o.key),b?i&&(L(o),n?(ne.current=_(s,e),ee(ne.current)):r(!0,o.nativeEvent,"list-navigation")):a&&(null!=m&&(ne.current=m),L(o),!n&&T?r(!0,o.nativeEvent,"list-navigation"):t(o),n&&ee(ne.current)))},onFocus(){n&&ee(null)},onPointerDown:function(e){te.current=O,"auto"===O&&x(e.nativeEvent)&&(te.current=!0)},onMouseDown:u,onClick:u},floating:{"aria-orientation":"both"===P?void 0:P,...!A(i)&&l,onKeyDown:t,onPointerMove(){oe.current=!0}},item:we}}),[i,o,de,me,se,ae,s,d,P,E,I,n,be,b,m,T,p,D,g,O,ee,r,we,J,H,V,$])},e.useMergeRefs=i,e.useRole=function(e,t){var n;void 0===t&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:l="dialog"}=t,c=null!=(n=Pt.get(l))?n:l,s=de(),a=null!=he();return u.useMemo((()=>{if(!i)return{};const e={id:o,...c&&{role:c}};return"tooltip"===c||"label"===l?{reference:{["aria-"+("label"===l?"labelledby":"describedby")]:r?o:void 0},floating:e}:{reference:{"aria-expanded":r?"true":"false","aria-haspopup":"alertdialog"===c?"dialog":c,"aria-controls":r?o:void 0,..."listbox"===c&&{role:"combobox"},..."menu"===c&&{id:s},..."menu"===c&&a&&{role:"menuitem"},..."select"===l&&{"aria-autocomplete":"none"},..."combobox"===l&&{"aria-autocomplete":"list"}},floating:{...e,..."menu"===c&&{"aria-labelledby":s}},item(e){let{active:t,selected:n}=e;const r={role:"option",...t&&{id:o+"-option"}};switch(l){case"select":return{...r,"aria-selected":t&&n};case"combobox":return{...r,...t&&{"aria-selected":!0}}}return{}}}}),[i,l,c,r,o,s,a])},e.useTransitionStatus=Dt,e.useTransitionStyles=function(e,t){void 0===t&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:l=250}=t,c=e.placement,s=c.split("-")[0],a=u.useMemo((()=>({side:s,placement:c})),[s,c]),f="number"==typeof l,d=(f?l:l.open)||0,v=(f?l:l.close)||0,[m,p]=u.useState((()=>({...At(i,a),...At(n,a)}))),{isMounted:g,status:h}=Dt(e,{duration:l}),y=Ee(n),b=Ee(r),E=Ee(o),w=Ee(i);return Z((()=>{const e=At(y.current,a),t=At(E.current,a),n=At(w.current,a),r=At(b.current,a)||Object.keys(e).reduce(((e,t)=>(e[t]="",e)),{});if("initial"===h&&p((t=>({transitionProperty:t.transitionProperty,...n,...e}))),"open"===h&&p({transitionProperty:Object.keys(r).map(Lt).join(","),transitionDuration:d+"ms",...n,...r}),"close"===h){const r=t||e;p({transitionProperty:Object.keys(r).map(Lt).join(","),transitionDuration:v+"ms",...n,...r})}}),[v,E,y,b,w,d,h,a]),{isMounted:g,styles:m}},e.useTypeahead=function(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:l,onMatch:s,onTypingChange:a,enabled:f=!0,findMatch:d=null,resetMs:v=750,ignoreKeys:m=[],selectedIndex:p=null}=t,g=u.useRef(),h=u.useRef(""),y=u.useRef(null!=(n=null!=p?p:l)?n:-1),b=u.useRef(null),E=c(s),w=c(a),x=Ee(d),R=Ee(m);return Z((()=>{r&&(clearTimeout(g.current),b.current=null,h.current="")}),[r]),Z((()=>{var e;r&&""===h.current&&(y.current=null!=(e=null!=p?p:l)?e:-1)}),[r,p,l]),u.useMemo((()=>{if(!f)return{};function e(e){e?o.current.typing||(o.current.typing=e,w(e)):o.current.typing&&(o.current.typing=e,w(e))}function t(e,t,n){const r=x.current?x.current(t,n):t.find((e=>0===(null==e?void 0:e.toLocaleLowerCase().indexOf(n.toLocaleLowerCase()))));return r?e.indexOf(r):-1}function n(n){const o=i.current;if(h.current.length>0&&" "!==h.current[0]&&(-1===t(o,o,h.current)?e(!1):" "===n.key&&L(n)),null==o||R.current.includes(n.key)||1!==n.key.length||n.ctrlKey||n.metaKey||n.altKey)return;r&&" "!==n.key&&(L(n),e(!0));o.every((e=>{var t,n;return!e||(null==(t=e[0])?void 0:t.toLocaleLowerCase())!==(null==(n=e[1])?void 0:n.toLocaleLowerCase())}))&&h.current===n.key&&(h.current="",y.current=b.current),h.current+=n.key,clearTimeout(g.current),g.current=setTimeout((()=>{h.current="",y.current=b.current,e(!1)}),v);const u=y.current,l=t(o,[...o.slice((u||0)+1),...o.slice(0,(u||0)+1)],h.current);-1!==l?(E(l),b.current=l):" "!==n.key&&(h.current="",e(!1))}return{reference:{onKeyDown:n},floating:{onKeyDown:n,onKeyUp(t){" "===t.key&&e(!1)}}}}),[f,r,o,i,v,R,x,E,w])}}));

@@ -19,2 +19,4 @@ import type * as React_2 from 'react';

export declare function isJSDOM(): boolean;
export declare function isMac(): boolean;

@@ -21,0 +23,0 @@

@@ -15,3 +15,3 @@ import { isShadowRoot, isHTMLElement } from '@floating-ui/utils/dom';

}
const rootNode = child.getRootNode && child.getRootNode();
const rootNode = child.getRootNode == null ? void 0 : child.getRootNode();

@@ -73,2 +73,3 @@ // First, attempt with faster native method

function isVirtualPointerEvent(event) {
if (isJSDOM()) return false;
return !isAndroid() && event.width === 0 && event.height === 0 || isAndroid() && event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'mouse' ||

@@ -89,2 +90,5 @@ // iOS VoiceOver returns 0.333• for width/height.

}
function isJSDOM() {
return getUserAgent().includes('jsdom/');
}
function isMouseLikePointerType(pointerType, strict) {

@@ -142,2 +146,2 @@ // On some Linux machines with Chromium, mouse inputs return a `pointerType`

export { TYPEABLE_SELECTOR, activeElement, contains, getDocument, getPlatform, getTarget, getUserAgent, isAndroid, isEventTargetWithin, isMac, isMouseLikePointerType, isReactEvent, isRootElement, isSafari, isTypeableCombobox, isTypeableElement, isVirtualClick, isVirtualPointerEvent, stopEvent };
export { TYPEABLE_SELECTOR, activeElement, contains, getDocument, getPlatform, getTarget, getUserAgent, isAndroid, isEventTargetWithin, isJSDOM, isMac, isMouseLikePointerType, isReactEvent, isRootElement, isSafari, isTypeableCombobox, isTypeableElement, isVirtualClick, isVirtualPointerEvent, stopEvent };

@@ -34,3 +34,3 @@ (function (global, factory) {

}
const rootNode = child.getRootNode && child.getRootNode();
const rootNode = child.getRootNode == null ? void 0 : child.getRootNode();

@@ -92,2 +92,3 @@ // First, attempt with faster native method

function isVirtualPointerEvent(event) {
if (isJSDOM()) return false;
return !isAndroid() && event.width === 0 && event.height === 0 || isAndroid() && event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'mouse' ||

@@ -108,2 +109,5 @@ // iOS VoiceOver returns 0.333• for width/height.

}
function isJSDOM() {
return getUserAgent().includes('jsdom/');
}
function isMouseLikePointerType(pointerType, strict) {

@@ -170,2 +174,3 @@ // On some Linux machines with Chromium, mouse inputs return a `pointerType`

exports.isEventTargetWithin = isEventTargetWithin;
exports.isJSDOM = isJSDOM;
exports.isMac = isMac;

@@ -172,0 +177,0 @@ exports.isMouseLikePointerType = isMouseLikePointerType;

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).FloatingUIReactUtils={})}(this,(function(t){"use strict";function e(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function n(){const t=navigator.userAgentData;return null!=t&&t.platform?t.platform:navigator.platform}function o(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map((t=>{let{brand:e,version:n}=t;return e+"/"+n})).join(" "):navigator.userAgent}function i(){const t=/android/i;return t.test(n())||t.test(o())}const r="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function a(t){return((n=t)instanceof HTMLElement||n instanceof e(n).HTMLElement)&&t.matches(r);var n}t.TYPEABLE_SELECTOR=r,t.activeElement=function(t){let e=t.activeElement;for(;null!=(null==(n=e)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;e=e.shadowRoot.activeElement}return e},t.contains=function(t,n){if(!t||!n)return!1;const o=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(o&&(i=o,"undefined"!=typeof ShadowRoot&&(i instanceof ShadowRoot||i instanceof e(i).ShadowRoot))){let e=n;for(;e;){if(t===e)return!0;e=e.parentNode||e.host}}var i;return!1},t.getDocument=function(t){return(null==t?void 0:t.ownerDocument)||document},t.getPlatform=n,t.getTarget=function(t){return"composedPath"in t?t.composedPath()[0]:t.target},t.getUserAgent=o,t.isAndroid=i,t.isEventTargetWithin=function(t,e){if(null==e)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return null!=n.target&&e.contains(n.target)},t.isMac=function(){return n().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints},t.isMouseLikePointerType=function(t,e){const n=["mouse","pen"];return e||n.push("",void 0),n.includes(t)},t.isReactEvent=function(t){return"nativeEvent"in t},t.isRootElement=function(t){return t.matches("html,body")},t.isSafari=function(){return/apple/i.test(navigator.vendor)},t.isTypeableCombobox=function(t){return!!t&&("combobox"===t.getAttribute("role")&&a(t))},t.isTypeableElement=a,t.isVirtualClick=function(t){return!(0!==t.mozInputSource||!t.isTrusted)||(i()&&t.pointerType?"click"===t.type&&1===t.buttons:0===t.detail&&!t.pointerType)},t.isVirtualPointerEvent=function(t){return!i()&&0===t.width&&0===t.height||i()&&1===t.width&&1===t.height&&0===t.pressure&&0===t.detail&&"mouse"===t.pointerType||t.width<1&&t.height<1&&0===t.pressure&&0===t.detail&&"touch"===t.pointerType},t.stopEvent=function(t){t.preventDefault(),t.stopPropagation()}}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).FloatingUIReactUtils={})}(this,(function(t){"use strict";function e(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function n(){const t=navigator.userAgentData;return null!=t&&t.platform?t.platform:navigator.platform}function o(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map((t=>{let{brand:e,version:n}=t;return e+"/"+n})).join(" "):navigator.userAgent}function i(){const t=/android/i;return t.test(n())||t.test(o())}function r(){return o().includes("jsdom/")}const a="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function u(t){return((n=t)instanceof HTMLElement||n instanceof e(n).HTMLElement)&&t.matches(a);var n}t.TYPEABLE_SELECTOR=a,t.activeElement=function(t){let e=t.activeElement;for(;null!=(null==(n=e)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;e=e.shadowRoot.activeElement}return e},t.contains=function(t,n){if(!t||!n)return!1;const o=null==n.getRootNode?void 0:n.getRootNode();if(t.contains(n))return!0;if(o&&(i=o,"undefined"!=typeof ShadowRoot&&(i instanceof ShadowRoot||i instanceof e(i).ShadowRoot))){let e=n;for(;e;){if(t===e)return!0;e=e.parentNode||e.host}}var i;return!1},t.getDocument=function(t){return(null==t?void 0:t.ownerDocument)||document},t.getPlatform=n,t.getTarget=function(t){return"composedPath"in t?t.composedPath()[0]:t.target},t.getUserAgent=o,t.isAndroid=i,t.isEventTargetWithin=function(t,e){if(null==e)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return null!=n.target&&e.contains(n.target)},t.isJSDOM=r,t.isMac=function(){return n().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints},t.isMouseLikePointerType=function(t,e){const n=["mouse","pen"];return e||n.push("",void 0),n.includes(t)},t.isReactEvent=function(t){return"nativeEvent"in t},t.isRootElement=function(t){return t.matches("html,body")},t.isSafari=function(){return/apple/i.test(navigator.vendor)},t.isTypeableCombobox=function(t){return!!t&&("combobox"===t.getAttribute("role")&&u(t))},t.isTypeableElement=u,t.isVirtualClick=function(t){return!(0!==t.mozInputSource||!t.isTrusted)||(i()&&t.pointerType?"click"===t.type&&1===t.buttons:0===t.detail&&!t.pointerType)},t.isVirtualPointerEvent=function(t){return!r()&&(!i()&&0===t.width&&0===t.height||i()&&1===t.width&&1===t.height&&0===t.pressure&&0===t.detail&&"mouse"===t.pointerType||t.width<1&&t.height<1&&0===t.pressure&&0===t.detail&&"touch"===t.pointerType)},t.stopEvent=function(t){t.preventDefault(),t.stopPropagation()}}));
{
"name": "@floating-ui/react",
"version": "0.26.5",
"version": "0.26.6",
"description": "Floating UI for React",

@@ -63,4 +63,4 @@ "publishConfig": {

"tabbable": "^6.0.1",
"@floating-ui/react-dom": "^2.0.5",
"@floating-ui/utils": "^0.2.0"
"@floating-ui/react-dom": "^2.0.6",
"@floating-ui/utils": "^0.2.1"
},

@@ -87,3 +87,3 @@ "devDependencies": {

"scripts": {
"lint": "eslint .",
"lint": "biome lint .",
"clean": "rimraf dist out-tsc utils",

@@ -90,0 +90,0 @@ "test": "vitest run",

@@ -19,2 +19,4 @@ import type * as React_2 from 'react';

export declare function isJSDOM(): boolean;
export declare function isMac(): boolean;

@@ -21,0 +23,0 @@

@@ -15,3 +15,3 @@ import { isShadowRoot, isHTMLElement } from '@floating-ui/utils/dom';

}
const rootNode = child.getRootNode && child.getRootNode();
const rootNode = child.getRootNode == null ? void 0 : child.getRootNode();

@@ -73,2 +73,3 @@ // First, attempt with faster native method

function isVirtualPointerEvent(event) {
if (isJSDOM()) return false;
return !isAndroid() && event.width === 0 && event.height === 0 || isAndroid() && event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'mouse' ||

@@ -89,2 +90,5 @@ // iOS VoiceOver returns 0.333• for width/height.

}
function isJSDOM() {
return getUserAgent().includes('jsdom/');
}
function isMouseLikePointerType(pointerType, strict) {

@@ -142,2 +146,2 @@ // On some Linux machines with Chromium, mouse inputs return a `pointerType`

export { TYPEABLE_SELECTOR, activeElement, contains, getDocument, getPlatform, getTarget, getUserAgent, isAndroid, isEventTargetWithin, isMac, isMouseLikePointerType, isReactEvent, isRootElement, isSafari, isTypeableCombobox, isTypeableElement, isVirtualClick, isVirtualPointerEvent, stopEvent };
export { TYPEABLE_SELECTOR, activeElement, contains, getDocument, getPlatform, getTarget, getUserAgent, isAndroid, isEventTargetWithin, isJSDOM, isMac, isMouseLikePointerType, isReactEvent, isRootElement, isSafari, isTypeableCombobox, isTypeableElement, isVirtualClick, isVirtualPointerEvent, stopEvent };

@@ -34,3 +34,3 @@ (function (global, factory) {

}
const rootNode = child.getRootNode && child.getRootNode();
const rootNode = child.getRootNode == null ? void 0 : child.getRootNode();

@@ -92,2 +92,3 @@ // First, attempt with faster native method

function isVirtualPointerEvent(event) {
if (isJSDOM()) return false;
return !isAndroid() && event.width === 0 && event.height === 0 || isAndroid() && event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'mouse' ||

@@ -108,2 +109,5 @@ // iOS VoiceOver returns 0.333• for width/height.

}
function isJSDOM() {
return getUserAgent().includes('jsdom/');
}
function isMouseLikePointerType(pointerType, strict) {

@@ -170,2 +174,3 @@ // On some Linux machines with Chromium, mouse inputs return a `pointerType`

exports.isEventTargetWithin = isEventTargetWithin;
exports.isJSDOM = isJSDOM;
exports.isMac = isMac;

@@ -172,0 +177,0 @@ exports.isMouseLikePointerType = isMouseLikePointerType;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc