@radui/ui 0.0.26 → 0.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- 'use client';import*as e from"react";import t,{createContext as n,useLayoutEffect as r,useEffect as o,useRef as i,useState as l,useContext as c}from"react";import*as u from"react-dom";var s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}"function"==typeof SuppressedError&&SuppressedError;var f=n({});function d(){return"undefined"!=typeof window}function p(e){return g(e)?(e.nodeName||"").toLowerCase():"#document"}function m(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function v(e){var t;return null==(t=(g(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function g(e){return!!d()&&(e instanceof Node||e instanceof m(e).Node)}function h(e){return!!d()&&(e instanceof Element||e instanceof m(e).Element)}function y(e){return!!d()&&(e instanceof HTMLElement||e instanceof m(e).HTMLElement)}function w(e){return!(!d()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof m(e).ShadowRoot)}function b(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=O(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function x(e){return["table","td","th"].includes(p(e))}function E(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function R(e){const t=C(),n=h(e)?O(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function C(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function S(e){return["html","body","#document"].includes(p(e))}function O(e){return m(e).getComputedStyle(e)}function L(e){return h(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function T(e){if("html"===p(e))return e;const t=e.assignedSlot||e.parentNode||w(e)&&e.host||v(e);return w(t)?t.host:t}function A(e){const t=T(e);return S(t)?e.ownerDocument?e.ownerDocument.body:e.body:y(t)&&b(t)?t:A(t)}function P(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=A(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=m(o);if(i){const e=k(l);return t.concat(l,l.visualViewport||[],b(o)?o:[],e&&n?P(e):[])}return t.concat(o,P(o,[],n))}function k(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function D(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 M(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&w(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function N(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function F(){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 I(e){return!F().includes("jsdom/")&&(!W()&&0===e.width&&0===e.height||W()&&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 W(){const e=/android/i;return e.test(N())||e.test(F())}function j(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function H(e){return(null==e?void 0:e.ownerDocument)||document}function B(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 V(e){return"composedPath"in e?e.composedPath()[0]:e.target}function _(e){e.preventDefault(),e.stopPropagation()}function q(e){return!!e&&("combobox"===e.getAttribute("role")&&function(e){return y(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}(e))}const K=["top","right","bottom","left"],U=Math.min,X=Math.max,Y=Math.round,$=e=>({x:e,y:e}),z={left:"right",right:"left",bottom:"top",top:"bottom"},Z={start:"end",end:"start"};function G(e,t,n){return X(e,U(t,n))}function Q(e,t){return"function"==typeof e?e(t):e}function J(e){return e.split("-")[0]}function ee(e){return e.split("-")[1]}function te(e){return"x"===e?"y":"x"}function ne(e){return"y"===e?"height":"width"}function re(e){return["top","bottom"].includes(J(e))?"y":"x"}function oe(e){return te(re(e))}function ie(e){return e.replace(/start|end/g,(e=>Z[e]))}function le(e){return e.replace(/left|right|bottom|top/g,(e=>z[e]))}function ce(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function ue(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}
1
+ 'use client';import*as e from"react";import t,{createContext as n,useLayoutEffect as r,useEffect as o,useRef as i,useState as l,useContext as u}from"react";import*as c from"react-dom";var s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}"function"==typeof SuppressedError&&SuppressedError;var f=n({});function d(){return"undefined"!=typeof window}function p(e){return g(e)?(e.nodeName||"").toLowerCase():"#document"}function m(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function v(e){var t;return null==(t=(g(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function g(e){return!!d()&&(e instanceof Node||e instanceof m(e).Node)}function h(e){return!!d()&&(e instanceof Element||e instanceof m(e).Element)}function y(e){return!!d()&&(e instanceof HTMLElement||e instanceof m(e).HTMLElement)}function w(e){return!(!d()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof m(e).ShadowRoot)}function b(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=S(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function x(e){return["table","td","th"].includes(p(e))}function E(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function R(e){const t=C(),n=h(e)?S(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function C(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function O(e){return["html","body","#document"].includes(p(e))}function S(e){return m(e).getComputedStyle(e)}function L(e){return h(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function T(e){if("html"===p(e))return e;const t=e.assignedSlot||e.parentNode||w(e)&&e.host||v(e);return w(t)?t.host:t}function A(e){const t=T(e);return O(t)?e.ownerDocument?e.ownerDocument.body:e.body:y(t)&&b(t)?t:A(t)}function P(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=A(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=m(o);if(i){const e=k(l);return t.concat(l,l.visualViewport||[],b(o)?o:[],e&&n?P(e):[])}return t.concat(o,P(o,[],n))}function k(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function D(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 M(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&w(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function N(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function F(){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 I(e){return!F().includes("jsdom/")&&(!W()&&0===e.width&&0===e.height||W()&&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 W(){const e=/android/i;return e.test(N())||e.test(F())}function j(e,t){const n=["mouse","pen"];return n.push("",void 0),n.includes(e)}function H(e){return(null==e?void 0:e.ownerDocument)||document}function B(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 V(e){return"composedPath"in e?e.composedPath()[0]:e.target}function _(e){e.preventDefault(),e.stopPropagation()}function q(e){return!!e&&("combobox"===e.getAttribute("role")&&function(e){return y(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}(e))}const K=["top","right","bottom","left"],X=Math.min,U=Math.max,Y=Math.round,$=e=>({x:e,y:e}),z={left:"right",right:"left",bottom:"top",top:"bottom"},Z={start:"end",end:"start"};function G(e,t,n){return U(e,X(t,n))}function Q(e,t){return"function"==typeof e?e(t):e}function J(e){return e.split("-")[0]}function ee(e){return e.split("-")[1]}function te(e){return"x"===e?"y":"x"}function ne(e){return"y"===e?"height":"width"}function re(e){return["top","bottom"].includes(J(e))?"y":"x"}function oe(e){return te(re(e))}function ie(e){return e.replace(/start|end/g,(e=>Z[e]))}function le(e){return e.replace(/left|right|bottom|top/g,(e=>z[e]))}function ue(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function ce(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}
2
2
  /*!
3
3
  * tabbable 6.2.0
4
4
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
5
- */var se=["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(","),ae="undefined"==typeof Element,fe=ae?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,de=!ae&&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},pe=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)},me=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var l=i.shift();if(!pe(l,!1))if("SLOT"===l.tagName){var c=l.assignedElements(),u=e(c.length?c:l.children,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:l,candidates:u})}else{fe.call(l,se)&&r.filter(l)&&(n||!t.includes(l))&&o.push(l);var s=l.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(l),a=!pe(s,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(s&&a){var f=e(!0===s?l.children:s.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:l,candidates:f})}else i.unshift.apply(i,l.children)}}return o},ve=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},ge=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))&&!ve(e)?0:e.tabIndex},he=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},ye=function(e){return"INPUT"===e.tagName},we=function(e){return function(e){return ye(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||de(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)},be=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},xe=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=fe.call(e,"details>summary:first-of-type")?e.parentElement:e;if(fe.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return be(e)}else{if("function"==typeof r){for(var i=e;e;){var l=e.parentElement,c=de(e);if(l&&!l.shadowRoot&&!0===r(l))return be(e);e=e.assignedSlot?e.assignedSlot:l||c===e.ownerDocument?l:c.host}e=i}if(function(e){var t,n,r,o,i=e&&de(e),l=null===(t=i)||void 0===t?void 0:t.host,c=!1;if(i&&i!==e)for(c=!!(null!==(n=l)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(l)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!c&&l;){var u,s,a;c=!(null===(s=l=null===(u=i=de(l))||void 0===u?void 0:u.host)||void 0===s||null===(a=s.ownerDocument)||void 0===a||!a.contains(l))}return c}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},Ee=function(e,t){return!(t.disabled||pe(t)||function(e){return ye(e)&&"hidden"===e.type}(t)||xe(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!!fe.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},Re=function(e,t){return!(we(t)||ge(t)<0||!Ee(e,t))},Ce=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Se=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scopeParent,l=i?t.scopeParent:t,c=function(e,t){var n=ge(e);return n<0&&t&&!ve(e)?0:n}(l,i),u=i?e(t.candidates):l;0===c?i?n.push.apply(n,u):n.push(l):r.push({documentOrder:o,tabIndex:c,item:t,isScope:i,content:u})})),r.sort(he).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},Oe=function(e,t){var n;return n=(t=t||{}).getShadowRoot?me([e],t.includeContainer,{filter:Re.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Ce}):function(e,t,n){if(pe(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(se));return t&&fe.call(e,se)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,Re.bind(null,t)),Se(n)};function Le(e,t,n){let{reference:r,floating:o}=e;const i=re(t),l=oe(t),c=ne(l),u=J(t),s="y"===i,a=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[c]/2-o[c]/2;let p;switch(u){case"top":p={x:a,y:r.y-o.height};break;case"bottom":p={x:a,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(ee(t)){case"start":p[l]-=d*(n&&s?-1:1);break;case"end":p[l]+=d*(n&&s?-1:1)}return p}async function Te(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:c,strategy:u}=e,{boundary:s="clippingAncestors",rootBoundary:a="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=Q(t,e),m=ce(p),v=c[d?"floating"===f?"reference":"floating":f],g=ue(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(v)))||n?v:v.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(c.floating)),boundary:s,rootBoundary:a,strategy:u})),h="floating"===f?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c.floating)),w=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},b=ue(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:h,offsetParent:y,strategy:u}):h);return{top:(g.top-b.top+m.top)/w.y,bottom:(b.bottom-g.bottom+m.bottom)/w.y,left:(g.left-b.left+m.left)/w.x,right:(b.right-g.right+m.right)/w.x}}function Ae(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Pe(e){return K.some((t=>e[t]>=0))}function ke(e){const t=O(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=y(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,c=Y(n)!==i||Y(r)!==l;return c&&(n=i,r=l),{width:n,height:r,$:c}}function De(e){return h(e)?e:e.contextElement}function Me(e){const t=De(e);if(!y(t))return $(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=ke(t);let l=(i?Y(n.width):n.width)/r,c=(i?Y(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),c&&Number.isFinite(c)||(c=1),{x:l,y:c}}const Ne=$(0);function Fe(e){const t=m(e);return C()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ne}function Ie(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=De(e);let l=$(1);t&&(r?h(r)&&(l=Me(r)):l=Me(e));const c=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==m(e))&&t}(i,n,r)?Fe(i):$(0);let u=(o.left+c.x)/l.x,s=(o.top+c.y)/l.y,a=o.width/l.x,f=o.height/l.y;if(i){const e=m(i),t=r&&h(r)?m(r):r;let n=e,o=k(n);for(;o&&r&&t!==n;){const e=Me(o),t=o.getBoundingClientRect(),r=O(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,s*=e.y,a*=e.x,f*=e.y,u+=i,s+=l,n=m(o),o=k(n)}}return ue({width:a,height:f,x:u,y:s})}function We(e,t){const n=L(e).scrollLeft;return t?t.left+n:Ie(v(e)).left+n}function je(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:We(e,r)),y:r.top+t.scrollTop}}function He(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=m(e),r=v(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,c=0,u=0;if(o){i=o.width,l=o.height;const e=C();(!e||e&&"fixed"===t)&&(c=o.offsetLeft,u=o.offsetTop)}return{width:i,height:l,x:c,y:u}}(e,n);else if("document"===t)r=function(e){const t=v(e),n=L(e),r=e.ownerDocument.body,o=X(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=X(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+We(e);const c=-n.scrollTop;return"rtl"===O(r).direction&&(l+=X(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:c}}(v(e));else if(h(t))r=function(e,t){const n=Ie(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=y(e)?Me(e):$(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Fe(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ue(r)}function Be(e,t){const n=T(e);return!(n===t||!h(n)||S(n))&&("fixed"===O(n).position||Be(n,t))}function Ve(e,t,n){const r=y(t),o=v(t),i="fixed"===n,l=Ie(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const u=$(0);if(r||!r&&!i)if(("body"!==p(t)||b(o))&&(c=L(t)),r){const e=Ie(t,!0,i,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}else o&&(u.x=We(o));const s=!o||r||i?$(0):je(o,c);return{x:l.left+c.scrollLeft-u.x-s.x,y:l.top+c.scrollTop-u.y-s.y,width:l.width,height:l.height}}function _e(e){return"static"===O(e).position}function qe(e,t){if(!y(e)||"fixed"===O(e).position)return null;if(t)return t(e);let n=e.offsetParent;return v(e)===n&&(n=n.ownerDocument.body),n}function Ke(e,t){const n=m(e);if(E(e))return n;if(!y(e)){let t=T(e);for(;t&&!S(t);){if(h(t)&&!_e(t))return t;t=T(t)}return n}let r=qe(e,t);for(;r&&x(r)&&_e(r);)r=qe(r,t);return r&&S(r)&&_e(r)&&!R(r)?n:r||function(e){let t=T(e);for(;y(t)&&!S(t);){if(R(t))return t;if(E(t))return null;t=T(t)}return null}(e)||n}const Ue={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,l=v(r),c=!!t&&E(t.floating);if(r===l||c&&i)return n;let u={scrollLeft:0,scrollTop:0},s=$(1);const a=$(0),f=y(r);if((f||!f&&!i)&&(("body"!==p(r)||b(l))&&(u=L(r)),y(r))){const e=Ie(r);s=Me(r),a.x=e.x+r.clientLeft,a.y=e.y+r.clientTop}const d=!l||f||i?$(0):je(l,u,!0);return{width:n.width*s.x,height:n.height*s.y,x:n.x*s.x-u.scrollLeft*s.x+a.x+d.x,y:n.y*s.y-u.scrollTop*s.y+a.y+d.y}},getDocumentElement:v,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?E(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=P(e,[],!1).filter((e=>h(e)&&"body"!==p(e))),o=null;const i="fixed"===O(e).position;let l=i?T(e):e;for(;h(l)&&!S(l);){const t=O(l),n=R(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||b(l)&&!n&&Be(e,l))?r=r.filter((e=>e!==l)):o=t,l=T(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=i[0],c=i.reduce(((e,n)=>{const r=He(t,n,o);return e.top=X(r.top,e.top),e.right=U(r.right,e.right),e.bottom=U(r.bottom,e.bottom),e.left=X(r.left,e.left),e}),He(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:Ke,getElementRects:async function(e){const t=this.getOffsetParent||Ke,n=this.getDimensions,r=await n(e.floating);return{reference:Ve(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=ke(e);return{width:t,height:n}},getScale:Me,isElement:h,isRTL:function(e){return"rtl"===O(e).direction}},Xe=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:l,middlewareData:c}=t,u=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),l=J(n),c=ee(n),u="y"===re(n),s=["left","top"].includes(l)?-1:1,a=i&&u?-1:1,f=Q(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:m}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&"number"==typeof m&&(p="end"===c?-1*m:m),u?{x:p*a,y:d*s}:{x:d*s,y:p*a}}(t,e);return l===(null==(n=c.offset)?void 0:n.placement)&&null!=(r=c.arrow)&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:l}}}}},Ye=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=Q(e,t),s={x:n,y:r},a=await Te(t,u),f=re(J(o)),d=te(f);let p=s[d],m=s[f];if(i){const e="y"===d?"bottom":"right";p=G(p+a["y"===d?"top":"left"],p,p-a[e])}if(l){const e="y"===f?"bottom":"right";m=G(m+a["y"===f?"top":"left"],m,m-a[e])}const v=c.fn({...t,[d]:p,[f]:m});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[d]:i,[f]:l}}}}}},$e=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:c,platform:u,elements:s}=t,{mainAxis:a=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:v=!0,...g}=Q(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const h=J(o),y=re(c),w=J(c)===c,b=await(null==u.isRTL?void 0:u.isRTL(s.floating)),x=d||(w||!v?[le(c)]:function(e){const t=le(e);return[ie(e),t,ie(t)]}(c)),E="none"!==m;!d&&E&&x.push(...function(e,t,n,r){const o=ee(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}(J(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(ie)))),i}(c,v,m,b));const R=[c,...x],C=await Te(t,g),S=[];let O=(null==(r=i.flip)?void 0:r.overflows)||[];if(a&&S.push(C[h]),f){const e=function(e,t,n){void 0===n&&(n=!1);const r=ee(e),o=oe(e),i=ne(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=le(l)),[l,le(l)]}(o,l,b);S.push(C[e[0]],C[e[1]])}if(O=[...O,{placement:o,overflows:S}],!S.every((e=>e<=0))){var L,T;const e=((null==(L=i.flip)?void 0:L.index)||0)+1,t=R[e];if(t)return{data:{index:e,overflows:O},reset:{placement:t}};let n=null==(T=O.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:T.placement;if(!n)switch(p){case"bestFit":{var A;const e=null==(A=O.filter((e=>{if(E){const t=re(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:A[0];e&&(n=e);break}case"initialPlacement":n=c}if(o!==n)return{reset:{placement:n}}}return{}}}},ze=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Q(e,t);switch(r){case"referenceHidden":{const e=Ae(await Te(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Pe(e)}}}case"escaped":{const e=Ae(await Te(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Pe(e)}}}default:return{}}}}},Ze=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:l,elements:c,middlewareData:u}=t,{element:s,padding:a=0}=Q(e,t)||{};if(null==s)return{};const f=ce(a),d={x:n,y:r},p=oe(o),m=ne(p),v=await l.getDimensions(s),g="y"===p,h=g?"top":"left",y=g?"bottom":"right",w=g?"clientHeight":"clientWidth",b=i.reference[m]+i.reference[p]-d[p]-i.floating[m],x=d[p]-i.reference[p],E=await(null==l.getOffsetParent?void 0:l.getOffsetParent(s));let R=E?E[w]:0;R&&await(null==l.isElement?void 0:l.isElement(E))||(R=c.floating[w]||i.floating[m]);const C=b/2-x/2,S=R/2-v[m]/2-1,O=U(f[h],S),L=U(f[y],S),T=O,A=R-v[m]-L,P=R/2-v[m]/2+C,k=G(T,P,A),D=!u.arrow&&null!=ee(o)&&P!==k&&i.reference[m]/2-(P<T?O:L)-v[m]/2<0,M=D?P<T?P-T:P-A:0;return{[p]:d[p]+M,data:{[p]:k,centerOffset:P-k-M,...D&&{alignmentOffset:M}},reset:D}}}),Ge=(e,t,n)=>{const r=new Map,o={platform:Ue,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,c=i.filter(Boolean),u=await(null==l.isRTL?void 0:l.isRTL(t));let s=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:a,y:f}=Le(s,r,u),d=r,p={},m=0;for(let n=0;n<c.length;n++){const{name:i,fn:v}=c[n],{x:g,y:h,data:y,reset:w}=await v({x:a,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:s,platform:l,elements:{reference:e,floating:t}});a=null!=g?g:a,f=null!=h?h:f,p={...p,[i]:{...p[i],...y}},w&&m<=50&&(m++,"object"==typeof w&&(w.placement&&(d=w.placement),w.rects&&(s=!0===w.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:a,y:f}=Le(s,d,u))),n=-1)}return{x:a,y:f,placement:d,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Qe="undefined"!=typeof document?r:o;function Je(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Je(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!Je(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function et(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tt(e,t){const n=et(e);return Math.round(t*n)/n}function nt(t){const n=e.useRef(t);return Qe((()=>{n.current=t})),n}const rt=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?Ze({element:n.current,padding:r}).fn(t):{}:n?Ze({element:n,padding:r}).fn(t):{};var o}}),ot={...e},it=ot.useInsertionEffect||(e=>e());function lt(t){const n=e.useRef((()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")}));return it((()=>{n.current=t})),e.useCallback((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return null==n.current?void 0:n.current(...t)}),[])}var ct="undefined"!=typeof document?r:o;function ut(){return ut=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},ut.apply(this,arguments)}let st=!1,at=0;const ft=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+at++;const dt=ot.useId||function(){const[t,n]=e.useState((()=>st?ft():void 0));return ct((()=>{null==t&&n(ft())}),[]),e.useEffect((()=>{st=!0}),[]),t};let pt;"production"!==process.env.NODE_ENV&&(pt=new Set);const mt=e.forwardRef((function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:l}},width:c=14,height:u=7,tipRadius:s=0,strokeWidth:a=0,staticOffset:f,stroke:d,d:p,style:{transform:m,...v}={},...g}=t;"production"!==process.env.NODE_ENV&&(n||function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var i;null!=(e=pt)&&e.has(o)||(null==(i=pt)||i.add(o),console.warn(o))}("The `ref` prop is required for `FloatingArrow`."));const h=dt(),[y,w]=e.useState(!1);if(ct((()=>{if(!o)return;"rtl"===O(o).direction&&w(!0)}),[o]),!o)return null;const[b,x]=r.split("-"),E="top"===b||"bottom"===b;let R=f;(E&&null!=l&&l.x||!E&&null!=l&&l.y)&&(R=null);const C=2*a,S=C/2,L=c/2*(s/-8+1),T=u/2*s/4,A=!!p,P=R&&"end"===x?"bottom":"top";let k=R&&"end"===x?"right":"left";R&&y&&(k="end"===x?"left":"right");const D=null!=(null==i?void 0:i.x)?R||i.x:"",M=null!=(null==i?void 0:i.y)?R||i.y:"",N=p||"M0,0 H"+c+" L"+(c-L)+","+(u-T)+" Q"+c/2+","+u+" "+L+","+(u-T)+" Z",F={top:A?"rotate(180deg)":"",left:A?"rotate(90deg)":"rotate(-90deg)",bottom:A?"":"rotate(180deg)",right:A?"rotate(-90deg)":"rotate(90deg)"}[b];return e.createElement("svg",ut({},g,{"aria-hidden":!0,ref:n,width:A?c:c+C,height:c,viewBox:"0 0 "+c+" "+(u>c?u:c),style:{position:"absolute",pointerEvents:"none",[k]:D,[P]:M,[b]:E||A?"100%":"calc(100% - "+C/2+"px)",transform:[F,m].filter((e=>!!e)).join(" "),...v}}),C>0&&e.createElement("path",{clipPath:"url(#"+h+")",fill:"none",stroke:d,strokeWidth:C+(p?0:1),d:N}),e.createElement("path",{stroke:C&&!p?g.fill:"none",d:N}),e.createElement("clipPath",{id:h},e.createElement("rect",{x:-S,y:S*(A?-1:1),width:c+C,height:c})))}));const vt=e.createContext(null),gt=e.createContext(null),ht=()=>{var t;return(null==(t=e.useContext(vt))?void 0:t.id)||null},yt=()=>e.useContext(gt);function wt(e){return"data-floating-ui-"+e}function bt(e){const t=i(e);return ct((()=>{t.current=e})),t}const xt=wt("safe-polygon");function Et(e,t,n){return n&&!j(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}let Rt=0;function Ct(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Rt);const i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():Rt=requestAnimationFrame(i)}function St(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 Ot=new WeakMap,Lt=new WeakSet,Tt={},At=0;const Pt=e=>e&&(e.host||Pt(e.parentNode));function kt(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,l=(c=t,e.map((e=>{if(c.contains(e))return e;const t=Pt(e);return c.contains(t)?t:null})).filter((e=>null!=e)));var c;const u=new Set,s=new Set(l),a=[];Tt[o]||(Tt[o]=new WeakMap);const f=Tt[o];return l.forEach((function e(t){if(!t||u.has(t))return;u.add(t),t.parentNode&&e(t.parentNode)})),function e(t){if(!t||s.has(t))return;[].forEach.call(t.children,(t=>{if("script"!==p(t))if(u.has(t))e(t);else{const e=i?t.getAttribute(i):null,n=null!==e&&"false"!==e,r=(Ot.get(t)||0)+1,l=(f.get(t)||0)+1;Ot.set(t,r),f.set(t,l),a.push(t),1===r&&n&&Lt.add(t),1===l&&t.setAttribute(o,""),!n&&i&&t.setAttribute(i,"true")}}))}(t),u.clear(),At++,()=>{a.forEach((e=>{const t=(Ot.get(e)||0)-1,n=(f.get(e)||0)-1;Ot.set(e,t),f.set(e,n),t||(!Lt.has(e)&&i&&e.removeAttribute(i),Lt.delete(e)),n||e.removeAttribute(o)})),At--,At||(Ot=new WeakMap,Ot=new WeakMap,Lt=new WeakSet,Tt={})}}function Dt(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=H(e[0]).body;return kt(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Mt=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Nt(e,t){const n=Oe(e,Mt());"prev"===t&&n.reverse();const r=n.indexOf(D(H(e)));return n.slice(r+1)[0]}function Ft(){return Nt(document.body,"next")}function It(){return Nt(document.body,"prev")}function Wt(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!M(n,r)}function jt(e){Oe(e,Mt()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function Ht(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 Bt={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 Vt(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const _t=e.forwardRef((function(t,n){const[r,o]=e.useState();ct((()=>(/apple/i.test(navigator.vendor)&&o("button"),document.addEventListener("keydown",Vt),()=>{document.removeEventListener("keydown",Vt)})),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":!r||void 0,[wt("focus-guard")]:"",style:Bt};return e.createElement("span",ut({},t,i))})),qt=e.createContext(null),Kt=wt("portal");const Ut=()=>e.useContext(qt),Xt="data-floating-ui-focusable";let Yt=[];function $t(e){Yt=Yt.filter((e=>e.isConnected));let t=e;if(t&&"body"!==p(t)){if(!function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==fe.call(e,se)&&Re(t,e)}(t,Mt())){const e=Oe(t,Mt())[0];e&&(t=e)}Yt.push(t),Yt.length>20&&(Yt=Yt.slice(-20))}}function zt(){return Yt.slice().reverse().find((e=>e.isConnected))}const Zt=e.forwardRef((function(t,n){return e.createElement("button",ut({},t,{type:"button",ref:n,tabIndex:-1,style:Bt}))}));let Gt=0;let Qt=()=>{};const Jt=e.forwardRef((function(t,n){const{lockScroll:r=!1,...o}=t;return ct((()=>{if(r)return Gt++,1===Gt&&(Qt=function(){const e=/iP(hone|ad|od)|iOS/.test(N()),t=document.body.style,n=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,o=t.left?parseFloat(t.left):window.scrollX,i=t.top?parseFloat(t.top):window.scrollY;if(t.overflow="hidden",r&&(t[n]=r+"px"),e){var l,c;const e=(null==(l=window.visualViewport)?void 0:l.offsetLeft)||0,n=(null==(c=window.visualViewport)?void 0:c.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(i-Math.floor(n))+"px",left:-(o-Math.floor(e))+"px",right:"0"})}return()=>{Object.assign(t,{overflow:"",[n]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(o,i))}}()),()=>{Gt--,0===Gt&&Qt()}}),[r]),e.createElement("div",ut({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))})),en={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},tn={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},nn=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}};function rn(t){const{open:n=!1,onOpenChange:r,elements:o}=t,i=dt(),l=e.useRef({}),[c]=e.useState((()=>function(){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)))||[])}}}())),u=null!=ht();if("production"!==process.env.NODE_ENV){const e=o.reference;e&&!h(e)&&function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var i;null!=(e=pt)&&e.has(o)||(null==(i=pt)||i.add(o),console.error(o))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[s,a]=e.useState(o.reference),f=lt(((e,t,n)=>{l.current.openEvent=e?t:void 0,c.emit("openchange",{open:e,event:t,reason:n,nested:u}),null==r||r(e,t,n)})),d=e.useMemo((()=>({setPositionReference:a})),[]),p=e.useMemo((()=>({reference:s||o.reference||null,floating:o.floating||null,domReference:o.reference})),[s,o.reference,o.floating]);return e.useMemo((()=>({dataRef:l,open:n,onOpenChange:f,elements:p,events:c,floatingId:i,refs:d})),[n,f,p,c,i,d])}const on="active",ln="selected";function cn(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[on]:t,[ln]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[Xt]:""},...i,...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,i]=t;var l;o&&[on,ln].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(l=r.get(n))||l.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})):e[n]=i)})),e):e),{})}}const un=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);var sn={Portal:function(t){const{children:n,id:r,root:o,preserveTabOrder:i=!0}=t,l=function(t){void 0===t&&(t={});const{id:n,root:r}=t,o=dt(),i=Ut(),[l,c]=e.useState(null),u=e.useRef(null);return ct((()=>()=>{null==l||l.remove(),queueMicrotask((()=>{u.current=null}))}),[l]),ct((()=>{if(!o)return;if(u.current)return;const e=n?document.getElementById(n):null;if(!e)return;const t=document.createElement("div");t.id=o,t.setAttribute(Kt,""),e.appendChild(t),u.current=t,c(t)}),[n,o]),ct((()=>{if(null===r)return;if(!o)return;if(u.current)return;let e=r||(null==i?void 0:i.portalNode);e&&!h(e)&&(e=e.current),e=e||document.body;let t=null;n&&(t=document.createElement("div"),t.id=n,e.appendChild(t));const l=document.createElement("div");l.id=o,l.setAttribute(Kt,""),e=t||e,e.appendChild(l),u.current=l,c(l)}),[n,r,o,i]),l}({id:r,root:o}),[c,s]=e.useState(null),a=e.useRef(null),f=e.useRef(null),d=e.useRef(null),p=e.useRef(null),m=null==c?void 0:c.modal,v=null==c?void 0:c.open,g=!!c&&!c.modal&&c.open&&i&&!(!o&&!l);return e.useEffect((()=>{if(l&&i&&!m)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&&Wt(e)){("focusin"===e.type?Ht:jt)(l)}}}),[l,i,m]),e.useEffect((()=>{l&&(v||Ht(l))}),[v,l]),e.createElement(qt.Provider,{value:e.useMemo((()=>({preserveTabOrder:i,beforeOutsideRef:a,afterOutsideRef:f,beforeInsideRef:d,afterInsideRef:p,portalNode:l,setFocusManagerState:s})),[i,l])},g&&l&&e.createElement(_t,{"data-type":"outside",ref:a,onFocus:e=>{if(Wt(e,l)){var t;null==(t=d.current)||t.focus()}else{const e=It()||(null==c?void 0:c.refs.domReference.current);null==e||e.focus()}}}),g&&l&&e.createElement("span",{"aria-owns":l.id,style:Bt}),l&&u.createPortal(n,l),g&&l&&e.createElement(_t,{"data-type":"outside",ref:f,onFocus:e=>{if(Wt(e,l)){var t;null==(t=p.current)||t.focus()}else{const t=Ft()||(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,"focus-out"))}}}))},Overlay:Jt,FocusManager:function(t){const{context:n,children:r,disabled:o=!1,order:i=["content"],guards:l=!0,initialFocus:c=0,returnFocus:u=!0,restoreFocus:s=!1,modal:a=!0,visuallyHiddenDismiss:f=!1,closeOnFocusOut:d=!0}=t,{open:p,refs:m,nodeId:v,onOpenChange:g,events:h,dataRef:w,floatingId:b,elements:{domReference:x,floating:E}}=n,R="number"==typeof c&&c<0,C=q(x)&&R,S="undefined"==typeof HTMLElement||!("inert"in HTMLElement.prototype)||l,O=bt(i),L=bt(c),T=bt(u),A=yt(),P=Ut(),k=e.useRef(null),N=e.useRef(null),F=e.useRef(!1),j=e.useRef(!1),B=e.useRef(-1),K=null!=P,U=(X=E)?X.hasAttribute(Xt)?X:X.querySelector("["+Xt+"]")||X:null;var X;const Y=lt((function(e){return void 0===e&&(e=U),e?Oe(e,Mt()):[]})),$=lt((e=>{const t=Y(e);return O.current.map((e=>x&&"reference"===e?x:U&&"floating"===e?U:t)).filter(Boolean).flat()}));function z(t){return!o&&f&&a?e.createElement(Zt,{ref:"start"===t?k:N,onClick:e=>g(!1,e.nativeEvent)},"string"==typeof f?f:"Dismiss"):null}e.useEffect((()=>{if(o)return;if(!a)return;function e(e){if("Tab"===e.key){M(U,D(H(U)))&&0===Y().length&&!C&&_(e);const t=$(),n=V(e);"reference"===O.current[0]&&n===x&&(_(e),e.shiftKey?Ct(t[t.length-1]):Ct(t[1])),"floating"===O.current[1]&&n===U&&e.shiftKey&&(_(e),Ct(t[0]))}}const t=H(U);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}),[o,x,U,a,O,C,Y,$]),e.useEffect((()=>{if(!o&&E)return E.addEventListener("focusin",e),()=>{E.removeEventListener("focusin",e)};function e(e){const t=V(e),n=Y().indexOf(t);-1!==n&&(B.current=n)}}),[o,E,Y]),e.useEffect((()=>{if(!o&&d)return E&&y(x)?(x.addEventListener("focusout",t),x.addEventListener("pointerdown",e),E.addEventListener("focusout",t),()=>{x.removeEventListener("focusout",t),x.removeEventListener("pointerdown",e),E.removeEventListener("focusout",t)}):void 0;function e(){j.current=!0,setTimeout((()=>{j.current=!1}))}function t(e){const t=e.relatedTarget;queueMicrotask((()=>{const n=!(M(x,t)||M(E,t)||M(t,E)||M(null==P?void 0:P.portalNode,t)||null!=t&&t.hasAttribute(wt("focus-guard"))||A&&(St(A.nodesRef.current,v).find((e=>{var n,r;return M(null==(n=e.context)?void 0:n.elements.floating,t)||M(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}(A.nodesRef.current,v).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}))));if(s&&n&&D(H(U))===H(U).body){y(U)&&U.focus();const e=B.current,t=Y(),n=t[e]||t[t.length-1]||U;y(n)&&n.focus()}!C&&a||!t||!n||j.current||t===zt()||(F.current=!0,g(!1,e,"focus-out"))}))}}),[o,x,E,U,a,v,A,P,g,d,s,Y,C]),e.useEffect((()=>{var e;if(o)return;const t=Array.from((null==P||null==(e=P.portalNode)?void 0:e.querySelectorAll("["+wt("portal")+"]"))||[]);if(E){const e=[E,...t,k.current,N.current,O.current.includes("reference")||C?x:null].filter((e=>null!=e)),n=a||C?Dt(e,S,!S):Dt(e);return()=>{n()}}}),[o,x,E,a,O,P,C,S]),ct((()=>{if(o||!y(U))return;const e=D(H(U));queueMicrotask((()=>{const t=$(U),n=L.current,r=("number"==typeof n?t[n]:n.current)||U,o=M(U,e);R||o||!p||Ct(r,{preventScroll:r===U})}))}),[o,p,U,R,$,L]),ct((()=>{if(o||!U)return;let e=!1;const t=H(U),n=D(t);let r=w.current.openEvent;function i(t){let{open:n,reason:o,event:i,nested:l}=t;n&&(r=i),"escape-key"===o&&m.domReference.current&&$t(m.domReference.current),"hover"===o&&"mouseleave"===i.type&&(F.current=!0),"outside-press"===o&&(l?(F.current=!1,e=!0):F.current=!(function(e){return!(0!==e.mozInputSource||!e.isTrusted)||(W()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}(i)||I(i)))}$t(n),h.on("openchange",i);const l=t.createElement("span");return l.setAttribute("tabindex","-1"),l.setAttribute("aria-hidden","true"),Object.assign(l.style,Bt),K&&x&&x.insertAdjacentElement("afterend",l),()=>{h.off("openchange",i);const n=D(t),o=M(E,n)||A&&St(A.nodesRef.current,v).some((e=>{var t;return M(null==(t=e.context)?void 0:t.elements.floating,n)}));(o||r&&["click","mousedown"].includes(r.type))&&m.domReference.current&&$t(m.domReference.current);const c="boolean"==typeof T.current?zt()||l:T.current.current||l;queueMicrotask((()=>{T.current&&!F.current&&y(c)&&(c===n||n===t.body||o)&&c.focus({preventScroll:e}),l.remove()}))}}),[o,E,U,T,w,m,h,A,v,K,x]),e.useEffect((()=>{queueMicrotask((()=>{F.current=!1}))}),[o]),ct((()=>{if(!o&&P)return P.setFocusManagerState({modal:a,closeOnFocusOut:d,open:p,onOpenChange:g,refs:m}),()=>{P.setFocusManagerState(null)}}),[o,P,a,p,g,m,d]),ct((()=>{if(o)return;if(!U)return;if("function"!=typeof MutationObserver)return;if(R)return;const e=()=>{const e=U.getAttribute("tabindex"),t=Y(),n=D(H(E)),r=t.indexOf(n);-1!==r&&(B.current=r),O.current.includes("floating")||n!==m.domReference.current&&0===t.length?"0"!==e&&U.setAttribute("tabindex","0"):"-1"!==e&&U.setAttribute("tabindex","-1")};e();const t=new MutationObserver(e);return t.observe(U,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}}),[o,E,U,m,O,Y,R]);const Z=!o&&S&&(!a||!C)&&(K||a);return e.createElement(e.Fragment,null,Z&&e.createElement(_t,{"data-type":"inside",ref:null==P?void 0:P.beforeInsideRef,onFocus:e=>{if(a){const e=$();Ct("reference"===i[0]?e[0]:e[e.length-1])}else if(null!=P&&P.preserveTabOrder&&P.portalNode)if(F.current=!1,Wt(e,P.portalNode)){const e=Ft()||x;null==e||e.focus()}else{var t;null==(t=P.beforeOutsideRef.current)||t.focus()}}}),!C&&z("start"),r,z("end"),Z&&e.createElement(_t,{"data-type":"inside",ref:null==P?void 0:P.afterInsideRef,onFocus:e=>{if(a)Ct($()[0]);else if(null!=P&&P.preserveTabOrder&&P.portalNode)if(d&&(F.current=!0),Wt(e,P.portalNode)){const e=It()||x;null==e||e.focus()}else{var t;null==(t=P.afterOutsideRef.current)||t.focus()}}}))},useFloating:function(t){void 0===t&&(t={});const{nodeId:n}=t,r=rn({...t,elements:{reference:null,floating:null,...t.elements}}),o=t.rootContext||r,i=o.elements,[l,c]=e.useState(null),[s,a]=e.useState(null),f=(null==i?void 0:i.domReference)||l,d=e.useRef(null),p=yt();ct((()=>{f&&(d.current=f)}),[f]);const m=function(t){void 0===t&&(t={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:l,floating:c}={},transform:s=!0,whileElementsMounted:a,open:f}=t,[d,p]=e.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[m,v]=e.useState(o);Je(m,o)||v(o);const[g,h]=e.useState(null),[y,w]=e.useState(null),b=e.useCallback((e=>{e!==C.current&&(C.current=e,h(e))}),[]),x=e.useCallback((e=>{e!==S.current&&(S.current=e,w(e))}),[]),E=l||g,R=c||y,C=e.useRef(null),S=e.useRef(null),O=e.useRef(d),L=null!=a,T=nt(a),A=nt(i),P=nt(f),k=e.useCallback((()=>{if(!C.current||!S.current)return;const e={placement:n,strategy:r,middleware:m};A.current&&(e.platform=A.current),Ge(C.current,S.current,e).then((e=>{const t={...e,isPositioned:!1!==P.current};D.current&&!Je(O.current,t)&&(O.current=t,u.flushSync((()=>{p(t)})))}))}),[m,n,r,A,P]);Qe((()=>{!1===f&&O.current.isPositioned&&(O.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[f]);const D=e.useRef(!1);Qe((()=>(D.current=!0,()=>{D.current=!1})),[]),Qe((()=>{if(E&&(C.current=E),R&&(S.current=R),E&&R){if(T.current)return T.current(E,R,k);k()}}),[E,R,k,T,L]);const M=e.useMemo((()=>({reference:C,floating:S,setReference:b,setFloating:x})),[b,x]),N=e.useMemo((()=>({reference:E,floating:R})),[E,R]),F=e.useMemo((()=>{const e={position:r,left:0,top:0};if(!N.floating)return e;const t=tt(N.floating,d.x),n=tt(N.floating,d.y);return s?{...e,transform:"translate("+t+"px, "+n+"px)",...et(N.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,s,N.floating,d.x,d.y]);return e.useMemo((()=>({...d,update:k,refs:M,elements:N,floatingStyles:F})),[d,k,M,N,F])}({...t,elements:{...i,...s&&{reference:s}}}),v=e.useCallback((e=>{const t=h(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;a(t),m.refs.setReference(t)}),[m.refs]),g=e.useCallback((e=>{(h(e)||null===e)&&(d.current=e,c(e)),(h(m.refs.reference.current)||null===m.refs.reference.current||null!==e&&!h(e))&&m.refs.setReference(e)}),[m.refs]),y=e.useMemo((()=>({...m.refs,setReference:g,setPositionReference:v,domReference:d})),[m.refs,g,v]),w=e.useMemo((()=>({...m.elements,domReference:f})),[m.elements,f]),b=e.useMemo((()=>({...m,...o,refs:y,elements:w,nodeId:n})),[m,y,w,n,o]);return ct((()=>{o.dataRef.current.floatingContext=b;const e=null==p?void 0:p.nodesRef.current.find((e=>e.id===n));e&&(e.context=b)})),e.useMemo((()=>({...m,context:b,refs:y,elements:w})),[m,y,w,b])},Arrow:mt,arrow:(e,t)=>({...rt(e),options:[e,t]}),useRole:function(t,n){var r;void 0===n&&(n={});const{open:o,floatingId:i}=t,{enabled:l=!0,role:c="dialog"}=n,u=null!=(r=un.get(c))?r:c,s=dt(),a=null!=ht(),f=e.useMemo((()=>"tooltip"===u||"label"===c?{["aria-"+("label"===c?"labelledby":"describedby")]:o?i:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":"alertdialog"===u?"dialog":u,"aria-controls":o?i:void 0,..."listbox"===u&&{role:"combobox"},..."menu"===u&&{id:s},..."menu"===u&&a&&{role:"menuitem"},..."select"===c&&{"aria-autocomplete":"none"},..."combobox"===c&&{"aria-autocomplete":"list"}}),[u,i,a,o,s,c]),d=e.useMemo((()=>{const e={id:i,...u&&{role:u}};return"tooltip"===u||"label"===c?e:{...e,..."menu"===u&&{"aria-labelledby":s}}}),[u,i,s,c]),p=e.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:i+"-option"}};switch(c){case"select":return{...r,"aria-selected":t&&n};case"combobox":return{...r,...t&&{"aria-selected":!0}}}return{}}),[i,c]);return e.useMemo((()=>l?{reference:f,floating:d,item:p}:{}),[l,f,d,p])},useInteractions:function(t){void 0===t&&(t=[]);const n=t.map((e=>null==e?void 0:e.reference)),r=t.map((e=>null==e?void 0:e.floating)),o=t.map((e=>null==e?void 0:e.item)),i=e.useCallback((e=>cn(e,t,"reference")),n),l=e.useCallback((e=>cn(e,t,"floating")),r),c=e.useCallback((e=>cn(e,t,"item")),o);return e.useMemo((()=>({getReferenceProps:i,getFloatingProps:l,getItemProps:c})),[i,l,c])},useDismiss:function(t,n){void 0===n&&(n={});const{open:r,onOpenChange:o,elements:i,dataRef:l}=t,{enabled:c=!0,escapeKey:u=!0,outsidePress:s=!0,outsidePressEvent:a="pointerdown",referencePress:f=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:m,capture:v}=n,g=yt(),w=lt("function"==typeof s?s:()=>!1),b="function"==typeof s?w:s,x=e.useRef(!1),E=e.useRef(!1),{escapeKey:R,outsidePress:L}=nn(m),{escapeKey:A,outsidePress:k}=nn(v),D=e.useRef(!1),N=lt((e=>{var t;if(!r||!c||!u||"Escape"!==e.key)return;if(D.current)return;const n=null==(t=l.current.floatingContext)?void 0:t.nodeId,i=g?St(g.nodesRef.current,n):[];if(!R&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.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")})),F=lt((e=>{var t;const n=()=>{var t;N(e),null==(t=V(e))||t.removeEventListener("keydown",n)};null==(t=V(e))||t.addEventListener("keydown",n)})),I=lt((e=>{var t;const n=x.current;x.current=!1;const r=E.current;if(E.current=!1,"click"===a&&r)return;if(n)return;if("function"==typeof b&&!b(e))return;const c=V(e),u="["+wt("inert")+"]",s=H(i.floating).querySelectorAll(u);let f=h(c)?c:null;for(;f&&!S(f);){const e=T(f);if(S(e)||!h(e))break;f=e}if(s.length&&h(c)&&!c.matches("html,body")&&!M(c,i.floating)&&Array.from(s).every((e=>!M(f,e))))return;if(y(c)&&_){const t=c.clientWidth>0&&c.scrollWidth>c.clientWidth,n=c.clientHeight>0&&c.scrollHeight>c.clientHeight;let r=n&&e.offsetX>c.clientWidth;if(n){"rtl"===O(c).direction&&(r=e.offsetX<=c.offsetWidth-c.clientWidth)}if(r||t&&e.offsetY>c.clientHeight)return}const d=null==(t=l.current.floatingContext)?void 0:t.nodeId,p=g&&St(g.nodesRef.current,d).some((t=>{var n;return B(e,null==(n=t.context)?void 0:n.elements.floating)}));if(B(e,i.floating)||B(e,i.domReference)||p)return;const m=g?St(g.nodesRef.current,d):[];if(m.length>0){let e=!0;if(m.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}o(!1,e,"outside-press")})),W=lt((e=>{var t;const n=()=>{var t;I(e),null==(t=V(e))||t.removeEventListener(a,n)};null==(t=V(e))||t.addEventListener(a,n)}));e.useEffect((()=>{if(!r||!c)return;l.current.__escapeKeyBubbles=R,l.current.__outsidePressBubbles=L;let e=-1;function t(e){o(!1,e,"ancestor-scroll")}function n(){window.clearTimeout(e),D.current=!0}function s(){e=window.setTimeout((()=>{D.current=!1}),C()?5:0)}const f=H(i.floating);u&&(f.addEventListener("keydown",A?F:N,A),f.addEventListener("compositionstart",n),f.addEventListener("compositionend",s)),b&&f.addEventListener(a,k?W:I,k);let d=[];return p&&(h(i.domReference)&&(d=P(i.domReference)),h(i.floating)&&(d=d.concat(P(i.floating))),!h(i.reference)&&i.reference&&i.reference.contextElement&&(d=d.concat(P(i.reference.contextElement)))),d=d.filter((e=>{var t;return e!==(null==(t=f.defaultView)?void 0:t.visualViewport)})),d.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{u&&(f.removeEventListener("keydown",A?F:N,A),f.removeEventListener("compositionstart",n),f.removeEventListener("compositionend",s)),b&&f.removeEventListener(a,k?W:I,k),d.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[l,i,u,b,a,r,o,p,c,R,L,N,A,F,I,k,W]),e.useEffect((()=>{x.current=!1}),[b,a]);const j=e.useMemo((()=>({onKeyDown:N,[en[d]]:e=>{f&&o(!1,e.nativeEvent,"reference-press")}})),[N,o,f,d]),_=e.useMemo((()=>({onKeyDown:N,onMouseDown(){E.current=!0},onMouseUp(){E.current=!0},[tn[a]]:()=>{x.current=!0}})),[N,a]);return e.useMemo((()=>c?{reference:j,floating:_}:{}),[c,j,_])},useHover:function(t,n){void 0===n&&(n={});const{open:r,onOpenChange:o,dataRef:i,events:l,elements:c}=t,{enabled:u=!0,delay:s=0,handleClose:a=null,mouseOnly:f=!1,restMs:d=0,move:p=!0}=n,m=yt(),v=ht(),g=bt(a),y=bt(s),w=bt(r),b=e.useRef(),x=e.useRef(-1),E=e.useRef(),R=e.useRef(-1),C=e.useRef(!0),S=e.useRef(!1),O=e.useRef((()=>{})),L=e.useRef(!1),T=e.useCallback((()=>{var e;const t=null==(e=i.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t}),[i]);e.useEffect((()=>{if(u)return l.on("openchange",e),()=>{l.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(x.current),clearTimeout(R.current),C.current=!0,L.current=!1)}}),[u,l]),e.useEffect((()=>{if(!u)return;if(!g.current)return;if(!r)return;function e(e){T()&&o(!1,e,"hover")}const t=H(c.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}}),[c.floating,r,o,u,g,T]);const A=e.useCallback((function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const r=Et(y.current,"close",b.current);r&&!E.current?(clearTimeout(x.current),x.current=window.setTimeout((()=>o(!1,e,n)),r)):t&&(clearTimeout(x.current),o(!1,e,n))}),[y,o]),P=lt((()=>{O.current(),E.current=void 0})),k=lt((()=>{if(S.current){const e=H(c.floating).body;e.style.pointerEvents="",e.removeAttribute(xt),S.current=!1}})),D=lt((()=>!!i.current.openEvent&&["click","mousedown"].includes(i.current.openEvent.type)));e.useEffect((()=>{if(u&&h(c.domReference)){var e;const o=c.domReference;return r&&o.addEventListener("mouseleave",l),null==(e=c.floating)||e.addEventListener("mouseleave",l),p&&o.addEventListener("mousemove",t,{once:!0}),o.addEventListener("mouseenter",t),o.addEventListener("mouseleave",n),()=>{var e;r&&o.removeEventListener("mouseleave",l),null==(e=c.floating)||e.removeEventListener("mouseleave",l),p&&o.removeEventListener("mousemove",t),o.removeEventListener("mouseenter",t),o.removeEventListener("mouseleave",n)}}function t(e){if(clearTimeout(x.current),C.current=!1,f&&!j(b.current)||d>0&&!Et(y.current,"open"))return;const t=Et(y.current,"open",b.current);t?x.current=window.setTimeout((()=>{w.current||o(!0,e,"hover")}),t):r||o(!0,e,"hover")}function n(e){if(D())return;O.current();const t=H(c.floating);if(clearTimeout(R.current),L.current=!1,g.current&&i.current.floatingContext){r||clearTimeout(x.current),E.current=g.current({...i.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){k(),P(),D()||A(e,!0,"safe-polygon")}});const n=E.current;return t.addEventListener("mousemove",n),void(O.current=()=>{t.removeEventListener("mousemove",n)})}("touch"!==b.current||!M(c.floating,e.relatedTarget))&&A(e)}function l(e){D()||i.current.floatingContext&&(null==g.current||g.current({...i.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){k(),P(),D()||A(e)}})(e))}}),[c,u,t,f,d,p,A,P,k,o,r,w,m,y,g,i,D]),ct((()=>{var e;if(u&&r&&null!=(e=g.current)&&e.__options.blockPointerEvents&&T()){S.current=!0;const e=c.floating;if(h(c.domReference)&&e){var t;const n=H(c.floating).body;n.setAttribute(xt,"");const r=c.domReference,o=null==m||null==(t=m.nodesRef.current.find((e=>e.id===v)))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}}),[u,r,v,c,m,g,T]),ct((()=>{r||(b.current=void 0,L.current=!1,P(),k())}),[r,P,k]),e.useEffect((()=>()=>{P(),clearTimeout(x.current),clearTimeout(R.current),k()}),[u,c.domReference,P,k]);const N=e.useMemo((()=>{function e(e){b.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function n(){C.current||w.current||o(!0,t,"hover")}f&&!j(b.current)||r||0===d||L.current&&e.movementX**2+e.movementY**2<2||(clearTimeout(R.current),"touch"===b.current?n():(L.current=!0,R.current=window.setTimeout(n,d)))}}}),[f,o,r,w,d]),F=e.useMemo((()=>({onMouseEnter(){clearTimeout(x.current)},onMouseLeave(e){D()||A(e.nativeEvent,!1)}})),[A,D]);return e.useMemo((()=>u?{reference:N,floating:F}:{}),[u,N,F])},flip:(e,t)=>({...$e(e),options:[e,t]}),shift:(e,t)=>({...Ye(e),options:[e,t]}),hide:(e,t)=>({...ze(e),options:[e,t]}),offset:(e,t)=>({...Xe(e),options:[e,t]})},an=function(e,t){if(void 0===e&&(e=""),void 0===t&&(t=""),e)return e;if(!t)return"";var n=t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(n)};function fn(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=fn(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function dn(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=fn(e))&&(r&&(r+=" "),r+=t);return r}var pn="HoverCard",mn=function(e){var n=e.children,r=e.open,o=void 0===r?void 0:r,c=e.onOpenChange,u=e.customRootClass,d=void 0===u?"":u,p=e.openDelay,m=void 0===p?100:p,v=e.closeDelay,g=void 0===v?200:v,h=a(e,["children","open","onOpenChange","customRootClass","openDelay","closeDelay"]),y=an(d,pn),w=an(d,"".concat(pn,"-trigger")),b=i(null),x=sn.useFloating({placement:"bottom",strategy:"fixed",middleware:[sn.arrow({element:b}),sn.offset(10),sn.flip({mainAxis:!0})]}),E=x.refs,R=x.floatingStyles,C=x.context,S=l(!1),O=S[0],L=S[1],T=l(!1);T[0];var A=T[1],P=void 0!==o,k=P?o:O,D=function(e){P||L(e),null==c||c(e)},M=sn.useRole(C),N=sn.useDismiss(C),F=sn.useHover(C,{delay:100}),I=sn.useInteractions([F,M,N]),W=I.getReferenceProps,j=I.getFloatingProps,H={isOpen:k,handleOpenChange:D,floatingRefs:E,floatingStyles:R,floatingContext:C,arrowRef:b,getReferenceProps:W,getFloatingProps:j,rootClass:y,rootTriggerClass:w,closeWithDelay:function(){A(!0),setTimeout((function(){A((function(e){return e&&D(!1),e}))}),g)},closeWithoutDelay:function(){D(!1)},openWithDelay:function(){A(!1),setTimeout((function(){D(!0)}),m)}};return t.createElement(f.Provider,{value:H},t.createElement("div",s({className:dn(y)},h),n))},vn=["div","span","button"].reduce((function(e,n){return e[n]=function(e){var n=t.forwardRef((function(n,r){var o=n.asChild,i=void 0!==o&&o,l=n.children,c=a(n,["asChild","children"]);return i&&t.isValidElement(l)?t.cloneElement(l,s(s({},c),{ref:r})):t.createElement(e,s(s({},c),{ref:r}),l)}));return n.displayName="Primitive.".concat(e),n}(n),e}),{}),gn=function(e){var n=e.children,r=e.className,o=void 0===r?"":r,i=a(e,["children","className"]),l=c(f),u=l.floatingRefs,d=l.closeWithDelay,p=l.openWithDelay,m=l.rootTriggerClass;return t.createElement(t.Fragment,null,t.createElement(vn.span,s({className:dn(m,o),onClick:function(){},onMouseEnter:p,onMouseLeave:d,ref:u.setReference},i),n))},hn=function(e){var n=e.children,r=e.rootElement,o=void 0===r?void 0:r,i=a(e,["children","rootElement"]),l=c(f).rootTriggerClass,u=o||document.getElementsByClassName(l)[0];return t.createElement(sn.Portal,s({root:u},i),n)},yn=function(e){var n=e.children,r=a(e,["children"]),i=c(f),l=i.isOpen,u=i.floatingRefs,d=i.floatingStyles,p=i.getFloatingProps,m=i.rootClass,v=i.closeWithDelay,g=i.closeWithoutDelay,h=i.openWithDelay;return o((function(){var e=function(){return g()};return window.addEventListener("scroll",e),function(){window.removeEventListener("scroll",e)}}),[g]),l?t.createElement("div",s({onPointerEnter:h,onPointerLeave:v,className:dn(m)},r,{ref:u.setFloating,style:d},p()),n):null},wn=function(e){var n=a(e,[]),r=c(f),o=r.floatingContext,i=r.arrowRef,l=r.rootClass;return t.createElement(sn.Arrow,s({className:dn("".concat(l,"-arrow"))},n,{context:o,ref:i}))},bn=function(e){var n=e.children,r=e.onOpenChange,o=void 0===r?function(){}:r,i=e.content,l=void 0===i?void 0:i,c=e.customRootClass,u=void 0===c?"":c,f=e.openDelay,d=void 0===f?100:f,p=e.closeDelay,m=void 0===p?200:p,v=a(e,["children","onOpenChange","content","customRootClass","openDelay","closeDelay"]);return t.createElement(mn,s({open:void 0,onOpenChange:o,openDelay:d,closeDelay:m,customRootClass:u},v),t.createElement(gn,null,n),t.createElement(hn,null,t.createElement(yn,null,l,t.createElement(wn,null))))};export{bn as default};
5
+ */var se=["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(","),ae="undefined"==typeof Element,fe=ae?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,de=!ae&&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},pe=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)},me=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var l=i.shift();if(!pe(l,!1))if("SLOT"===l.tagName){var u=l.assignedElements(),c=e(u.length?u:l.children,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:l,candidates:c})}else{fe.call(l,se)&&r.filter(l)&&(n||!t.includes(l))&&o.push(l);var s=l.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(l),a=!pe(s,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(s&&a){var f=e(!0===s?l.children:s.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:l,candidates:f})}else i.unshift.apply(i,l.children)}}return o},ve=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},ge=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))&&!ve(e)?0:e.tabIndex},he=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},ye=function(e){return"INPUT"===e.tagName},we=function(e){return function(e){return ye(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||de(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)},be=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},xe=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=fe.call(e,"details>summary:first-of-type")?e.parentElement:e;if(fe.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return be(e)}else{if("function"==typeof r){for(var i=e;e;){var l=e.parentElement,u=de(e);if(l&&!l.shadowRoot&&!0===r(l))return be(e);e=e.assignedSlot?e.assignedSlot:l||u===e.ownerDocument?l:u.host}e=i}if(function(e){var t,n,r,o,i=e&&de(e),l=null===(t=i)||void 0===t?void 0:t.host,u=!1;if(i&&i!==e)for(u=!!(null!==(n=l)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(l)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!u&&l;){var c,s,a;u=!(null===(s=l=null===(c=i=de(l))||void 0===c?void 0:c.host)||void 0===s||null===(a=s.ownerDocument)||void 0===a||!a.contains(l))}return u}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},Ee=function(e,t){return!(t.disabled||pe(t)||function(e){return ye(e)&&"hidden"===e.type}(t)||xe(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!!fe.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},Re=function(e,t){return!(we(t)||ge(t)<0||!Ee(e,t))},Ce=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Oe=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scopeParent,l=i?t.scopeParent:t,u=function(e,t){var n=ge(e);return n<0&&t&&!ve(e)?0:n}(l,i),c=i?e(t.candidates):l;0===u?i?n.push.apply(n,c):n.push(l):r.push({documentOrder:o,tabIndex:u,item:t,isScope:i,content:c})})),r.sort(he).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},Se=function(e,t){var n;return n=(t=t||{}).getShadowRoot?me([e],t.includeContainer,{filter:Re.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Ce}):function(e,t,n){if(pe(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(se));return t&&fe.call(e,se)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,Re.bind(null,t)),Oe(n)};function Le(e,t,n){let{reference:r,floating:o}=e;const i=re(t),l=oe(t),u=ne(l),c=J(t),s="y"===i,a=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[u]/2-o[u]/2;let p;switch(c){case"top":p={x:a,y:r.y-o.height};break;case"bottom":p={x:a,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(ee(t)){case"start":p[l]-=d*(n&&s?-1:1);break;case"end":p[l]+=d*(n&&s?-1:1)}return p}async function Te(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:u,strategy:c}=e,{boundary:s="clippingAncestors",rootBoundary:a="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=Q(t,e),m=ue(p),v=u[d?"floating"===f?"reference":"floating":f],g=ce(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(v)))||n?v:v.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(u.floating)),boundary:s,rootBoundary:a,strategy:c})),h="floating"===f?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(u.floating)),w=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},b=ce(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:h,offsetParent:y,strategy:c}):h);return{top:(g.top-b.top+m.top)/w.y,bottom:(b.bottom-g.bottom+m.bottom)/w.y,left:(g.left-b.left+m.left)/w.x,right:(b.right-g.right+m.right)/w.x}}function Ae(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Pe(e){return K.some((t=>e[t]>=0))}function ke(e){const t=S(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=y(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,u=Y(n)!==i||Y(r)!==l;return u&&(n=i,r=l),{width:n,height:r,$:u}}function De(e){return h(e)?e:e.contextElement}function Me(e){const t=De(e);if(!y(t))return $(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=ke(t);let l=(i?Y(n.width):n.width)/r,u=(i?Y(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),u&&Number.isFinite(u)||(u=1),{x:l,y:u}}const Ne=$(0);function Fe(e){const t=m(e);return C()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ne}function Ie(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=De(e);let l=$(1);t&&(r?h(r)&&(l=Me(r)):l=Me(e));const u=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==m(e))&&t}(i,n,r)?Fe(i):$(0);let c=(o.left+u.x)/l.x,s=(o.top+u.y)/l.y,a=o.width/l.x,f=o.height/l.y;if(i){const e=m(i),t=r&&h(r)?m(r):r;let n=e,o=k(n);for(;o&&r&&t!==n;){const e=Me(o),t=o.getBoundingClientRect(),r=S(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,s*=e.y,a*=e.x,f*=e.y,c+=i,s+=l,n=m(o),o=k(n)}}return ce({width:a,height:f,x:c,y:s})}function We(e,t){const n=L(e).scrollLeft;return t?t.left+n:Ie(v(e)).left+n}function je(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:We(e,r)),y:r.top+t.scrollTop}}function He(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=m(e),r=v(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,u=0,c=0;if(o){i=o.width,l=o.height;const e=C();(!e||e&&"fixed"===t)&&(u=o.offsetLeft,c=o.offsetTop)}return{width:i,height:l,x:u,y:c}}(e,n);else if("document"===t)r=function(e){const t=v(e),n=L(e),r=e.ownerDocument.body,o=U(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=U(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+We(e);const u=-n.scrollTop;return"rtl"===S(r).direction&&(l+=U(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:u}}(v(e));else if(h(t))r=function(e,t){const n=Ie(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=y(e)?Me(e):$(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Fe(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ce(r)}function Be(e,t){const n=T(e);return!(n===t||!h(n)||O(n))&&("fixed"===S(n).position||Be(n,t))}function Ve(e,t,n){const r=y(t),o=v(t),i="fixed"===n,l=Ie(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const c=$(0);if(r||!r&&!i)if(("body"!==p(t)||b(o))&&(u=L(t)),r){const e=Ie(t,!0,i,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else o&&(c.x=We(o));const s=!o||r||i?$(0):je(o,u);return{x:l.left+u.scrollLeft-c.x-s.x,y:l.top+u.scrollTop-c.y-s.y,width:l.width,height:l.height}}function _e(e){return"static"===S(e).position}function qe(e,t){if(!y(e)||"fixed"===S(e).position)return null;if(t)return t(e);let n=e.offsetParent;return v(e)===n&&(n=n.ownerDocument.body),n}function Ke(e,t){const n=m(e);if(E(e))return n;if(!y(e)){let t=T(e);for(;t&&!O(t);){if(h(t)&&!_e(t))return t;t=T(t)}return n}let r=qe(e,t);for(;r&&x(r)&&_e(r);)r=qe(r,t);return r&&O(r)&&_e(r)&&!R(r)?n:r||function(e){let t=T(e);for(;y(t)&&!O(t);){if(R(t))return t;if(E(t))return null;t=T(t)}return null}(e)||n}const Xe={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,l=v(r),u=!!t&&E(t.floating);if(r===l||u&&i)return n;let c={scrollLeft:0,scrollTop:0},s=$(1);const a=$(0),f=y(r);if((f||!f&&!i)&&(("body"!==p(r)||b(l))&&(c=L(r)),y(r))){const e=Ie(r);s=Me(r),a.x=e.x+r.clientLeft,a.y=e.y+r.clientTop}const d=!l||f||i?$(0):je(l,c,!0);return{width:n.width*s.x,height:n.height*s.y,x:n.x*s.x-c.scrollLeft*s.x+a.x+d.x,y:n.y*s.y-c.scrollTop*s.y+a.y+d.y}},getDocumentElement:v,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?E(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=P(e,[],!1).filter((e=>h(e)&&"body"!==p(e))),o=null;const i="fixed"===S(e).position;let l=i?T(e):e;for(;h(l)&&!O(l);){const t=S(l),n=R(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||b(l)&&!n&&Be(e,l))?r=r.filter((e=>e!==l)):o=t,l=T(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=i[0],u=i.reduce(((e,n)=>{const r=He(t,n,o);return e.top=U(r.top,e.top),e.right=X(r.right,e.right),e.bottom=X(r.bottom,e.bottom),e.left=U(r.left,e.left),e}),He(t,l,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},getOffsetParent:Ke,getElementRects:async function(e){const t=this.getOffsetParent||Ke,n=this.getDimensions,r=await n(e.floating);return{reference:Ve(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=ke(e);return{width:t,height:n}},getScale:Me,isElement:h,isRTL:function(e){return"rtl"===S(e).direction}},Ue=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:l,middlewareData:u}=t,c=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),l=J(n),u=ee(n),c="y"===re(n),s=["left","top"].includes(l)?-1:1,a=i&&c?-1:1,f=Q(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:m}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return u&&"number"==typeof m&&(p="end"===u?-1*m:m),c?{x:p*a,y:d*s}:{x:d*s,y:p*a}}(t,e);return l===(null==(n=u.offset)?void 0:n.placement)&&null!=(r=u.arrow)&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:l}}}}},Ye=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:u={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=Q(e,t),s={x:n,y:r},a=await Te(t,c),f=re(J(o)),d=te(f);let p=s[d],m=s[f];if(i){const e="y"===d?"bottom":"right";p=G(p+a["y"===d?"top":"left"],p,p-a[e])}if(l){const e="y"===f?"bottom":"right";m=G(m+a["y"===f?"top":"left"],m,m-a[e])}const v=u.fn({...t,[d]:p,[f]:m});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[d]:i,[f]:l}}}}}},$e=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:u,platform:c,elements:s}=t,{mainAxis:a=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:v=!0,...g}=Q(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const h=J(o),y=re(u),w=J(u)===u,b=await(null==c.isRTL?void 0:c.isRTL(s.floating)),x=d||(w||!v?[le(u)]:function(e){const t=le(e);return[ie(e),t,ie(t)]}(u)),E="none"!==m;!d&&E&&x.push(...function(e,t,n,r){const o=ee(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}(J(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(ie)))),i}(u,v,m,b));const R=[u,...x],C=await Te(t,g),O=[];let S=(null==(r=i.flip)?void 0:r.overflows)||[];if(a&&O.push(C[h]),f){const e=function(e,t,n){void 0===n&&(n=!1);const r=ee(e),o=oe(e),i=ne(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=le(l)),[l,le(l)]}(o,l,b);O.push(C[e[0]],C[e[1]])}if(S=[...S,{placement:o,overflows:O}],!O.every((e=>e<=0))){var L,T;const e=((null==(L=i.flip)?void 0:L.index)||0)+1,t=R[e];if(t)return{data:{index:e,overflows:S},reset:{placement:t}};let n=null==(T=S.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:T.placement;if(!n)switch(p){case"bestFit":{var A;const e=null==(A=S.filter((e=>{if(E){const t=re(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:A[0];e&&(n=e);break}case"initialPlacement":n=u}if(o!==n)return{reset:{placement:n}}}return{}}}},ze=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Q(e,t);switch(r){case"referenceHidden":{const e=Ae(await Te(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Pe(e)}}}case"escaped":{const e=Ae(await Te(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Pe(e)}}}default:return{}}}}},Ze=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:l,elements:u,middlewareData:c}=t,{element:s,padding:a=0}=Q(e,t)||{};if(null==s)return{};const f=ue(a),d={x:n,y:r},p=oe(o),m=ne(p),v=await l.getDimensions(s),g="y"===p,h=g?"top":"left",y=g?"bottom":"right",w=g?"clientHeight":"clientWidth",b=i.reference[m]+i.reference[p]-d[p]-i.floating[m],x=d[p]-i.reference[p],E=await(null==l.getOffsetParent?void 0:l.getOffsetParent(s));let R=E?E[w]:0;R&&await(null==l.isElement?void 0:l.isElement(E))||(R=u.floating[w]||i.floating[m]);const C=b/2-x/2,O=R/2-v[m]/2-1,S=X(f[h],O),L=X(f[y],O),T=S,A=R-v[m]-L,P=R/2-v[m]/2+C,k=G(T,P,A),D=!c.arrow&&null!=ee(o)&&P!==k&&i.reference[m]/2-(P<T?S:L)-v[m]/2<0,M=D?P<T?P-T:P-A:0;return{[p]:d[p]+M,data:{[p]:k,centerOffset:P-k-M,...D&&{alignmentOffset:M}},reset:D}}}),Ge=(e,t,n)=>{const r=new Map,o={platform:Xe,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,u=i.filter(Boolean),c=await(null==l.isRTL?void 0:l.isRTL(t));let s=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:a,y:f}=Le(s,r,c),d=r,p={},m=0;for(let n=0;n<u.length;n++){const{name:i,fn:v}=u[n],{x:g,y:h,data:y,reset:w}=await v({x:a,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:s,platform:l,elements:{reference:e,floating:t}});a=null!=g?g:a,f=null!=h?h:f,p={...p,[i]:{...p[i],...y}},w&&m<=50&&(m++,"object"==typeof w&&(w.placement&&(d=w.placement),w.rects&&(s=!0===w.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:a,y:f}=Le(s,d,c))),n=-1)}return{x:a,y:f,placement:d,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Qe="undefined"!=typeof document?r:o;function Je(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Je(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!Je(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function et(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tt(e,t){const n=et(e);return Math.round(t*n)/n}function nt(t){const n=e.useRef(t);return Qe((()=>{n.current=t})),n}const rt=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?Ze({element:n.current,padding:r}).fn(t):{}:n?Ze({element:n,padding:r}).fn(t):{};var o}});function ot(t){return e.useMemo((()=>t.every((e=>null==e))?null:e=>{t.forEach((t=>{"function"==typeof t?t(e):null!=t&&(t.current=e)}))}),t)}const it={...e},lt=it.useInsertionEffect||(e=>e());function ut(t){const n=e.useRef((()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")}));return lt((()=>{n.current=t})),e.useCallback((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return null==n.current?void 0:n.current(...t)}),[])}var ct="undefined"!=typeof document?r:o;function st(){return st=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},st.apply(this,arguments)}let at=!1,ft=0;const dt=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ft++;const pt=it.useId||function(){const[t,n]=e.useState((()=>at?dt():void 0));return ct((()=>{null==t&&n(dt())}),[]),e.useEffect((()=>{at=!0}),[]),t};let mt;"production"!==process.env.NODE_ENV&&(mt=new Set);const vt=e.forwardRef((function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:l}},width:u=14,height:c=7,tipRadius:s=0,strokeWidth:a=0,staticOffset:f,stroke:d,d:p,style:{transform:m,...v}={},...g}=t;"production"!==process.env.NODE_ENV&&(n||function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var i;null!=(e=mt)&&e.has(o)||(null==(i=mt)||i.add(o),console.warn(o))}("The `ref` prop is required for `FloatingArrow`."));const h=pt(),[y,w]=e.useState(!1);if(ct((()=>{if(!o)return;"rtl"===S(o).direction&&w(!0)}),[o]),!o)return null;const[b,x]=r.split("-"),E="top"===b||"bottom"===b;let R=f;(E&&null!=l&&l.x||!E&&null!=l&&l.y)&&(R=null);const C=2*a,O=C/2,L=u/2*(s/-8+1),T=c/2*s/4,A=!!p,P=R&&"end"===x?"bottom":"top";let k=R&&"end"===x?"right":"left";R&&y&&(k="end"===x?"left":"right");const D=null!=(null==i?void 0:i.x)?R||i.x:"",M=null!=(null==i?void 0:i.y)?R||i.y:"",N=p||"M0,0 H"+u+" L"+(u-L)+","+(c-T)+" Q"+u/2+","+c+" "+L+","+(c-T)+" Z",F={top:A?"rotate(180deg)":"",left:A?"rotate(90deg)":"rotate(-90deg)",bottom:A?"":"rotate(180deg)",right:A?"rotate(-90deg)":"rotate(90deg)"}[b];return e.createElement("svg",st({},g,{"aria-hidden":!0,ref:n,width:A?u:u+C,height:u,viewBox:"0 0 "+u+" "+(c>u?c:u),style:{position:"absolute",pointerEvents:"none",[k]:D,[P]:M,[b]:E||A?"100%":"calc(100% - "+C/2+"px)",transform:[F,m].filter((e=>!!e)).join(" "),...v}}),C>0&&e.createElement("path",{clipPath:"url(#"+h+")",fill:"none",stroke:d,strokeWidth:C+(p?0:1),d:N}),e.createElement("path",{stroke:C&&!p?g.fill:"none",d:N}),e.createElement("clipPath",{id:h},e.createElement("rect",{x:-O,y:O*(A?-1:1),width:u+C,height:u})))}));const gt=e.createContext(null),ht=e.createContext(null),yt=()=>{var t;return(null==(t=e.useContext(gt))?void 0:t.id)||null},wt=()=>e.useContext(ht);function bt(e){return"data-floating-ui-"+e}function xt(e){const t=i(e);return ct((()=>{t.current=e})),t}const Et=bt("safe-polygon");function Rt(e,t,n){return n&&!j(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}let Ct=0;function Ot(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Ct);const i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():Ct=requestAnimationFrame(i)}function St(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 Lt=new WeakMap,Tt=new WeakSet,At={},Pt=0;const kt=e=>e&&(e.host||kt(e.parentNode));function Dt(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,l=(u=t,e.map((e=>{if(u.contains(e))return e;const t=kt(e);return u.contains(t)?t:null})).filter((e=>null!=e)));var u;const c=new Set,s=new Set(l),a=[];At[o]||(At[o]=new WeakMap);const f=At[o];return l.forEach((function e(t){if(!t||c.has(t))return;c.add(t),t.parentNode&&e(t.parentNode)})),function e(t){if(!t||s.has(t))return;[].forEach.call(t.children,(t=>{if("script"!==p(t))if(c.has(t))e(t);else{const e=i?t.getAttribute(i):null,n=null!==e&&"false"!==e,r=(Lt.get(t)||0)+1,l=(f.get(t)||0)+1;Lt.set(t,r),f.set(t,l),a.push(t),1===r&&n&&Tt.add(t),1===l&&t.setAttribute(o,""),!n&&i&&t.setAttribute(i,"true")}}))}(t),c.clear(),Pt++,()=>{a.forEach((e=>{const t=(Lt.get(e)||0)-1,n=(f.get(e)||0)-1;Lt.set(e,t),f.set(e,n),t||(!Tt.has(e)&&i&&e.removeAttribute(i),Tt.delete(e)),n||e.removeAttribute(o)})),Pt--,Pt||(Lt=new WeakMap,Lt=new WeakMap,Tt=new WeakSet,At={})}}function Mt(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=H(e[0]).body;return Dt(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Nt=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Ft(e,t){const n=Se(e,Nt());"prev"===t&&n.reverse();const r=n.indexOf(D(H(e)));return n.slice(r+1)[0]}function It(){return Ft(document.body,"next")}function Wt(){return Ft(document.body,"prev")}function jt(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!M(n,r)}function Ht(e){Se(e,Nt()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function Bt(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 Vt={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 _t(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const qt=e.forwardRef((function(t,n){const[r,o]=e.useState();ct((()=>(/apple/i.test(navigator.vendor)&&o("button"),document.addEventListener("keydown",_t),()=>{document.removeEventListener("keydown",_t)})),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":!r||void 0,[bt("focus-guard")]:"",style:Vt};return e.createElement("span",st({},t,i))})),Kt=e.createContext(null),Xt=bt("portal");const Ut=()=>e.useContext(Kt),Yt="data-floating-ui-focusable";let $t=[];function zt(e){$t=$t.filter((e=>e.isConnected)),e&&"body"!==p(e)&&($t.push(e),$t.length>20&&($t=$t.slice(-20)))}function Zt(){return $t.slice().reverse().find((e=>e.isConnected))}function Gt(e){const t=Nt();return function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==fe.call(e,se)&&Re(t,e)}(e,t)?e:Se(e,t)[0]}const Qt=e.forwardRef((function(t,n){return e.createElement("button",st({},t,{type:"button",ref:n,tabIndex:-1,style:Vt}))}));let Jt=0;let en=()=>{};const tn=e.forwardRef((function(t,n){const{lockScroll:r=!1,...o}=t;return ct((()=>{if(r)return Jt++,1===Jt&&(en=function(){const e=/iP(hone|ad|od)|iOS/.test(N()),t=document.body.style,n=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,o=t.left?parseFloat(t.left):window.scrollX,i=t.top?parseFloat(t.top):window.scrollY;if(t.overflow="hidden",r&&(t[n]=r+"px"),e){var l,u;const e=(null==(l=window.visualViewport)?void 0:l.offsetLeft)||0,n=(null==(u=window.visualViewport)?void 0:u.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(i-Math.floor(n))+"px",left:-(o-Math.floor(e))+"px",right:"0"})}return()=>{Object.assign(t,{overflow:"",[n]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(o,i))}}()),()=>{Jt--,0===Jt&&en()}}),[r]),e.createElement("div",st({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))})),nn={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},rn={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},on=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}};function ln(t){const{open:n=!1,onOpenChange:r,elements:o}=t,i=pt(),l=e.useRef({}),[u]=e.useState((()=>function(){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)))||[])}}}())),c=null!=yt();if("production"!==process.env.NODE_ENV){const e=o.reference;e&&!h(e)&&function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var i;null!=(e=mt)&&e.has(o)||(null==(i=mt)||i.add(o),console.error(o))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[s,a]=e.useState(o.reference),f=ut(((e,t,n)=>{l.current.openEvent=e?t:void 0,u.emit("openchange",{open:e,event:t,reason:n,nested:c}),null==r||r(e,t,n)})),d=e.useMemo((()=>({setPositionReference:a})),[]),p=e.useMemo((()=>({reference:s||o.reference||null,floating:o.floating||null,domReference:o.reference})),[s,o.reference,o.floating]);return e.useMemo((()=>({dataRef:l,open:n,onOpenChange:f,elements:p,events:u,floatingId:i,refs:d})),[n,f,p,u,i,d])}const un="active",cn="selected";function sn(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[un]:t,[cn]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[Yt]:""},...i,...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,i]=t;var l;o&&[un,cn].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(l=r.get(n))||l.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})):e[n]=i)})),e):e),{})}}const an=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);var fn={Portal:function(t){const{children:n,id:r,root:o,preserveTabOrder:i=!0}=t,l=function(t){void 0===t&&(t={});const{id:n,root:r}=t,o=pt(),i=Ut(),[l,u]=e.useState(null),c=e.useRef(null);return ct((()=>()=>{null==l||l.remove(),queueMicrotask((()=>{c.current=null}))}),[l]),ct((()=>{if(!o)return;if(c.current)return;const e=n?document.getElementById(n):null;if(!e)return;const t=document.createElement("div");t.id=o,t.setAttribute(Xt,""),e.appendChild(t),c.current=t,u(t)}),[n,o]),ct((()=>{if(null===r)return;if(!o)return;if(c.current)return;let e=r||(null==i?void 0:i.portalNode);e&&!h(e)&&(e=e.current),e=e||document.body;let t=null;n&&(t=document.createElement("div"),t.id=n,e.appendChild(t));const l=document.createElement("div");l.id=o,l.setAttribute(Xt,""),e=t||e,e.appendChild(l),c.current=l,u(l)}),[n,r,o,i]),l}({id:r,root:o}),[u,s]=e.useState(null),a=e.useRef(null),f=e.useRef(null),d=e.useRef(null),p=e.useRef(null),m=null==u?void 0:u.modal,v=null==u?void 0:u.open,g=!!u&&!u.modal&&u.open&&i&&!(!o&&!l);return e.useEffect((()=>{if(l&&i&&!m)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&&jt(e)){("focusin"===e.type?Bt:Ht)(l)}}}),[l,i,m]),e.useEffect((()=>{l&&(v||Bt(l))}),[v,l]),e.createElement(Kt.Provider,{value:e.useMemo((()=>({preserveTabOrder:i,beforeOutsideRef:a,afterOutsideRef:f,beforeInsideRef:d,afterInsideRef:p,portalNode:l,setFocusManagerState:s})),[i,l])},g&&l&&e.createElement(qt,{"data-type":"outside",ref:a,onFocus:e=>{if(jt(e,l)){var t;null==(t=d.current)||t.focus()}else{const e=Wt()||(null==u?void 0:u.refs.domReference.current);null==e||e.focus()}}}),g&&l&&e.createElement("span",{"aria-owns":l.id,style:Vt}),l&&c.createPortal(n,l),g&&l&&e.createElement(qt,{"data-type":"outside",ref:f,onFocus:e=>{if(jt(e,l)){var t;null==(t=p.current)||t.focus()}else{const t=It()||(null==u?void 0:u.refs.domReference.current);null==t||t.focus(),(null==u?void 0:u.closeOnFocusOut)&&(null==u||u.onOpenChange(!1,e.nativeEvent,"focus-out"))}}}))},Overlay:tn,FocusManager:function(t){const{context:n,children:r,disabled:o=!1,order:i=["content"],guards:l=!0,initialFocus:u=0,returnFocus:c=!0,restoreFocus:s=!1,modal:a=!0,visuallyHiddenDismiss:f=!1,closeOnFocusOut:d=!0,outsideElementsInert:p=!1}=t,{open:m,refs:v,nodeId:g,onOpenChange:h,events:w,dataRef:b,elements:{domReference:x,floating:E}}=n,R="number"==typeof u&&u<0,C=q(x)&&R,O="undefined"!=typeof HTMLElement&&"inert"in HTMLElement.prototype,S=!O||l,L=!S||O&&p,T=xt(i),A=xt(u),P=xt(c),k=wt(),N=Ut(),F=e.useRef(null),j=e.useRef(null),B=e.useRef(!1),K=e.useRef(!1),X=e.useRef(-1),U=null!=N,Y=($=E)?$.hasAttribute(Yt)?$:$.querySelector("["+Yt+"]")||$:null;var $;const z=ut((function(e){return void 0===e&&(e=Y),e?Se(e,Nt()):[]})),Z=ut((e=>{const t=z(e);return T.current.map((e=>x&&"reference"===e?x:Y&&"floating"===e?Y:t)).filter(Boolean).flat()}));e.useEffect((()=>{if(o)return;if(!a)return;function e(e){if("Tab"===e.key){M(Y,D(H(Y)))&&0===z().length&&!C&&_(e);const t=Z(),n=V(e);"reference"===T.current[0]&&n===x&&(_(e),e.shiftKey?Ot(t[t.length-1]):Ot(t[1])),"floating"===T.current[1]&&n===Y&&e.shiftKey&&(_(e),Ot(t[0]))}}const t=H(Y);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}),[o,x,Y,a,T,C,z,Z]),e.useEffect((()=>{if(!o&&E)return E.addEventListener("focusin",e),()=>{E.removeEventListener("focusin",e)};function e(e){const t=V(e),n=z().indexOf(t);-1!==n&&(X.current=n)}}),[o,E,z]),e.useEffect((()=>{if(!o&&d)return E&&y(x)?(x.addEventListener("focusout",t),x.addEventListener("pointerdown",e),E.addEventListener("focusout",t),()=>{x.removeEventListener("focusout",t),x.removeEventListener("pointerdown",e),E.removeEventListener("focusout",t)}):void 0;function e(){K.current=!0,setTimeout((()=>{K.current=!1}))}function t(e){const t=e.relatedTarget;queueMicrotask((()=>{const n=!(M(x,t)||M(E,t)||M(t,E)||M(null==N?void 0:N.portalNode,t)||null!=t&&t.hasAttribute(bt("focus-guard"))||k&&(St(k.nodesRef.current,g).find((e=>{var n,r;return M(null==(n=e.context)?void 0:n.elements.floating,t)||M(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}(k.nodesRef.current,g).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}))));if(s&&n&&D(H(Y))===H(Y).body){y(Y)&&Y.focus();const e=X.current,t=z(),n=t[e]||t[t.length-1]||Y;y(n)&&n.focus()}!C&&a||!t||!n||K.current||t===Zt()||(B.current=!0,h(!1,e,"focus-out"))}))}}),[o,x,E,Y,a,g,k,N,h,d,s,z,C]);const G=e.useRef(null),Q=e.useRef(null),J=ot([G,null==N?void 0:N.beforeInsideRef]),ee=ot([Q,null==N?void 0:N.afterInsideRef]);function te(t){return!o&&f&&a?e.createElement(Qt,{ref:"start"===t?F:j,onClick:e=>h(!1,e.nativeEvent)},"string"==typeof f?f:"Dismiss"):null}e.useEffect((()=>{var e;if(o)return;const t=Array.from((null==N||null==(e=N.portalNode)?void 0:e.querySelectorAll("["+bt("portal")+"]"))||[]);if(E){const e=[E,...t,F.current,j.current,G.current,Q.current,null==N?void 0:N.beforeOutsideRef.current,null==N?void 0:N.afterOutsideRef.current,T.current.includes("reference")||C?x:null].filter((e=>null!=e)),n=a||C?Mt(e,!L,L):Mt(e);return()=>{n()}}}),[o,x,E,a,T,N,C,S,L]),ct((()=>{if(o||!y(Y))return;const e=D(H(Y));queueMicrotask((()=>{const t=Z(Y),n=A.current,r=("number"==typeof n?t[n]:n.current)||Y,o=M(Y,e);R||o||!m||Ot(r,{preventScroll:r===Y})}))}),[o,m,Y,R,Z,A]),ct((()=>{if(o||!Y)return;let e=!1;const t=H(Y),n=D(t);let r=b.current.openEvent;function i(t){let{open:n,reason:o,event:i,nested:l}=t;n&&(r=i),"escape-key"===o&&v.domReference.current&&zt(v.domReference.current),["hover","safe-polygon"].includes(o)&&"mouseleave"===i.type&&(B.current=!0),"outside-press"===o&&(l?(B.current=!1,e=!0):B.current=!(function(e){return!(0!==e.mozInputSource||!e.isTrusted)||(W()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}(i)||I(i)))}zt(n),w.on("openchange",i);const l=t.createElement("span");return l.setAttribute("tabindex","-1"),l.setAttribute("aria-hidden","true"),Object.assign(l.style,Vt),U&&x&&x.insertAdjacentElement("afterend",l),()=>{w.off("openchange",i);const n=D(t),o=M(E,n)||k&&St(k.nodesRef.current,g).some((e=>{var t;return M(null==(t=e.context)?void 0:t.elements.floating,n)}));(o||r&&["click","mousedown"].includes(r.type))&&v.domReference.current&&zt(v.domReference.current);const u="boolean"==typeof P.current?Zt()||l:P.current.current||l;queueMicrotask((()=>{const r=Gt(u);P.current&&!B.current&&y(r)&&(r===n||n===t.body||o)&&r.focus({preventScroll:e}),l.remove()}))}}),[o,E,Y,P,b,v,w,k,g,U,x]),e.useEffect((()=>{queueMicrotask((()=>{B.current=!1}))}),[o]),ct((()=>{if(!o&&N)return N.setFocusManagerState({modal:a,closeOnFocusOut:d,open:m,onOpenChange:h,refs:v}),()=>{N.setFocusManagerState(null)}}),[o,N,a,m,h,v,d]),ct((()=>{if(o)return;if(!Y)return;if("function"!=typeof MutationObserver)return;if(R)return;const e=()=>{const e=Y.getAttribute("tabindex"),t=z(),n=D(H(E)),r=t.indexOf(n);-1!==r&&(X.current=r),T.current.includes("floating")||n!==v.domReference.current&&0===t.length?"0"!==e&&Y.setAttribute("tabindex","0"):"-1"!==e&&Y.setAttribute("tabindex","-1")};e();const t=new MutationObserver(e);return t.observe(Y,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}}),[o,E,Y,v,T,z,R]);const ne=!o&&S&&(!a||!C)&&(U||a);return e.createElement(e.Fragment,null,ne&&e.createElement(qt,{"data-type":"inside",ref:J,onFocus:e=>{if(a){const e=Z();Ot("reference"===i[0]?e[0]:e[e.length-1])}else if(null!=N&&N.preserveTabOrder&&N.portalNode)if(B.current=!1,jt(e,N.portalNode)){const e=It()||x;null==e||e.focus()}else{var t;null==(t=N.beforeOutsideRef.current)||t.focus()}}}),!C&&te("start"),r,te("end"),ne&&e.createElement(qt,{"data-type":"inside",ref:ee,onFocus:e=>{if(a)Ot(Z()[0]);else if(null!=N&&N.preserveTabOrder&&N.portalNode)if(d&&(B.current=!0),jt(e,N.portalNode)){const e=Wt()||x;null==e||e.focus()}else{var t;null==(t=N.afterOutsideRef.current)||t.focus()}}}))},useFloating:function(t){void 0===t&&(t={});const{nodeId:n}=t,r=ln({...t,elements:{reference:null,floating:null,...t.elements}}),o=t.rootContext||r,i=o.elements,[l,u]=e.useState(null),[s,a]=e.useState(null),f=(null==i?void 0:i.domReference)||l,d=e.useRef(null),p=wt();ct((()=>{f&&(d.current=f)}),[f]);const m=function(t){void 0===t&&(t={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:l,floating:u}={},transform:s=!0,whileElementsMounted:a,open:f}=t,[d,p]=e.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[m,v]=e.useState(o);Je(m,o)||v(o);const[g,h]=e.useState(null),[y,w]=e.useState(null),b=e.useCallback((e=>{e!==C.current&&(C.current=e,h(e))}),[]),x=e.useCallback((e=>{e!==O.current&&(O.current=e,w(e))}),[]),E=l||g,R=u||y,C=e.useRef(null),O=e.useRef(null),S=e.useRef(d),L=null!=a,T=nt(a),A=nt(i),P=nt(f),k=e.useCallback((()=>{if(!C.current||!O.current)return;const e={placement:n,strategy:r,middleware:m};A.current&&(e.platform=A.current),Ge(C.current,O.current,e).then((e=>{const t={...e,isPositioned:!1!==P.current};D.current&&!Je(S.current,t)&&(S.current=t,c.flushSync((()=>{p(t)})))}))}),[m,n,r,A,P]);Qe((()=>{!1===f&&S.current.isPositioned&&(S.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[f]);const D=e.useRef(!1);Qe((()=>(D.current=!0,()=>{D.current=!1})),[]),Qe((()=>{if(E&&(C.current=E),R&&(O.current=R),E&&R){if(T.current)return T.current(E,R,k);k()}}),[E,R,k,T,L]);const M=e.useMemo((()=>({reference:C,floating:O,setReference:b,setFloating:x})),[b,x]),N=e.useMemo((()=>({reference:E,floating:R})),[E,R]),F=e.useMemo((()=>{const e={position:r,left:0,top:0};if(!N.floating)return e;const t=tt(N.floating,d.x),n=tt(N.floating,d.y);return s?{...e,transform:"translate("+t+"px, "+n+"px)",...et(N.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,s,N.floating,d.x,d.y]);return e.useMemo((()=>({...d,update:k,refs:M,elements:N,floatingStyles:F})),[d,k,M,N,F])}({...t,elements:{...i,...s&&{reference:s}}}),v=e.useCallback((e=>{const t=h(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;a(t),m.refs.setReference(t)}),[m.refs]),g=e.useCallback((e=>{(h(e)||null===e)&&(d.current=e,u(e)),(h(m.refs.reference.current)||null===m.refs.reference.current||null!==e&&!h(e))&&m.refs.setReference(e)}),[m.refs]),y=e.useMemo((()=>({...m.refs,setReference:g,setPositionReference:v,domReference:d})),[m.refs,g,v]),w=e.useMemo((()=>({...m.elements,domReference:f})),[m.elements,f]),b=e.useMemo((()=>({...m,...o,refs:y,elements:w,nodeId:n})),[m,y,w,n,o]);return ct((()=>{o.dataRef.current.floatingContext=b;const e=null==p?void 0:p.nodesRef.current.find((e=>e.id===n));e&&(e.context=b)})),e.useMemo((()=>({...m,context:b,refs:y,elements:w})),[m,y,w,b])},Arrow:vt,arrow:(e,t)=>({...rt(e),options:[e,t]}),useRole:function(t,n){var r;void 0===n&&(n={});const{open:o,floatingId:i}=t,{enabled:l=!0,role:u="dialog"}=n,c=null!=(r=an.get(u))?r:u,s=pt(),a=null!=yt(),f=e.useMemo((()=>"tooltip"===c||"label"===u?{["aria-"+("label"===u?"labelledby":"describedby")]:o?i:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":"alertdialog"===c?"dialog":c,"aria-controls":o?i:void 0,..."listbox"===c&&{role:"combobox"},..."menu"===c&&{id:s},..."menu"===c&&a&&{role:"menuitem"},..."select"===u&&{"aria-autocomplete":"none"},..."combobox"===u&&{"aria-autocomplete":"list"}}),[c,i,a,o,s,u]),d=e.useMemo((()=>{const e={id:i,...c&&{role:c}};return"tooltip"===c||"label"===u?e:{...e,..."menu"===c&&{"aria-labelledby":s}}}),[c,i,s,u]),p=e.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:i+"-option"}};switch(u){case"select":return{...r,"aria-selected":t&&n};case"combobox":return{...r,...t&&{"aria-selected":!0}}}return{}}),[i,u]);return e.useMemo((()=>l?{reference:f,floating:d,item:p}:{}),[l,f,d,p])},useInteractions:function(t){void 0===t&&(t=[]);const n=t.map((e=>null==e?void 0:e.reference)),r=t.map((e=>null==e?void 0:e.floating)),o=t.map((e=>null==e?void 0:e.item)),i=e.useCallback((e=>sn(e,t,"reference")),n),l=e.useCallback((e=>sn(e,t,"floating")),r),u=e.useCallback((e=>sn(e,t,"item")),o);return e.useMemo((()=>({getReferenceProps:i,getFloatingProps:l,getItemProps:u})),[i,l,u])},useDismiss:function(t,n){void 0===n&&(n={});const{open:r,onOpenChange:o,elements:i,dataRef:l}=t,{enabled:u=!0,escapeKey:c=!0,outsidePress:s=!0,outsidePressEvent:a="pointerdown",referencePress:f=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:m,capture:v}=n,g=wt(),w=ut("function"==typeof s?s:()=>!1),b="function"==typeof s?w:s,x=e.useRef(!1),E=e.useRef(!1),{escapeKey:R,outsidePress:L}=on(m),{escapeKey:A,outsidePress:k}=on(v),D=e.useRef(!1),N=ut((e=>{var t;if(!r||!u||!c||"Escape"!==e.key)return;if(D.current)return;const n=null==(t=l.current.floatingContext)?void 0:t.nodeId,i=g?St(g.nodesRef.current,n):[];if(!R&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.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")})),F=ut((e=>{var t;const n=()=>{var t;N(e),null==(t=V(e))||t.removeEventListener("keydown",n)};null==(t=V(e))||t.addEventListener("keydown",n)})),I=ut((e=>{var t;const n=x.current;x.current=!1;const r=E.current;if(E.current=!1,"click"===a&&r)return;if(n)return;if("function"==typeof b&&!b(e))return;const u=V(e),c="["+bt("inert")+"]",s=H(i.floating).querySelectorAll(c);let f=h(u)?u:null;for(;f&&!O(f);){const e=T(f);if(O(e)||!h(e))break;f=e}if(s.length&&h(u)&&!u.matches("html,body")&&!M(u,i.floating)&&Array.from(s).every((e=>!M(f,e))))return;if(y(u)&&_){const t=O(u),n=S(u),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),l=o&&u.clientWidth>0&&u.scrollWidth>u.clientWidth,c=i&&u.clientHeight>0&&u.scrollHeight>u.clientHeight,s="rtl"===n.direction,a=c&&(s?e.offsetX<=u.offsetWidth-u.clientWidth:e.offsetX>u.clientWidth),f=l&&e.offsetY>u.clientHeight;if(a||f)return}const d=null==(t=l.current.floatingContext)?void 0:t.nodeId,p=g&&St(g.nodesRef.current,d).some((t=>{var n;return B(e,null==(n=t.context)?void 0:n.elements.floating)}));if(B(e,i.floating)||B(e,i.domReference)||p)return;const m=g?St(g.nodesRef.current,d):[];if(m.length>0){let e=!0;if(m.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}o(!1,e,"outside-press")})),W=ut((e=>{var t;const n=()=>{var t;I(e),null==(t=V(e))||t.removeEventListener(a,n)};null==(t=V(e))||t.addEventListener(a,n)}));e.useEffect((()=>{if(!r||!u)return;l.current.__escapeKeyBubbles=R,l.current.__outsidePressBubbles=L;let e=-1;function t(e){o(!1,e,"ancestor-scroll")}function n(){window.clearTimeout(e),D.current=!0}function s(){e=window.setTimeout((()=>{D.current=!1}),C()?5:0)}const f=H(i.floating);c&&(f.addEventListener("keydown",A?F:N,A),f.addEventListener("compositionstart",n),f.addEventListener("compositionend",s)),b&&f.addEventListener(a,k?W:I,k);let d=[];return p&&(h(i.domReference)&&(d=P(i.domReference)),h(i.floating)&&(d=d.concat(P(i.floating))),!h(i.reference)&&i.reference&&i.reference.contextElement&&(d=d.concat(P(i.reference.contextElement)))),d=d.filter((e=>{var t;return e!==(null==(t=f.defaultView)?void 0:t.visualViewport)})),d.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{c&&(f.removeEventListener("keydown",A?F:N,A),f.removeEventListener("compositionstart",n),f.removeEventListener("compositionend",s)),b&&f.removeEventListener(a,k?W:I,k),d.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[l,i,c,b,a,r,o,p,u,R,L,N,A,F,I,k,W]),e.useEffect((()=>{x.current=!1}),[b,a]);const j=e.useMemo((()=>({onKeyDown:N,...f&&{[nn[d]]:e=>{o(!1,e.nativeEvent,"reference-press")},..."click"!==d&&{onClick(e){o(!1,e.nativeEvent,"reference-press")}}}})),[N,o,f,d]),_=e.useMemo((()=>({onKeyDown:N,onMouseDown(){E.current=!0},onMouseUp(){E.current=!0},[rn[a]]:()=>{x.current=!0}})),[N,a]);return e.useMemo((()=>u?{reference:j,floating:_}:{}),[u,j,_])},useHover:function(t,n){void 0===n&&(n={});const{open:r,onOpenChange:o,dataRef:i,events:l,elements:u}=t,{enabled:c=!0,delay:s=0,handleClose:a=null,mouseOnly:f=!1,restMs:d=0,move:p=!0}=n,m=wt(),v=yt(),g=xt(a),y=xt(s),w=xt(r),b=e.useRef(),x=e.useRef(-1),E=e.useRef(),R=e.useRef(-1),C=e.useRef(!0),O=e.useRef(!1),S=e.useRef((()=>{})),L=e.useRef(!1),T=e.useCallback((()=>{var e;const t=null==(e=i.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t}),[i]);e.useEffect((()=>{if(c)return l.on("openchange",e),()=>{l.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(x.current),clearTimeout(R.current),C.current=!0,L.current=!1)}}),[c,l]),e.useEffect((()=>{if(!c)return;if(!g.current)return;if(!r)return;function e(e){T()&&o(!1,e,"hover")}const t=H(u.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}}),[u.floating,r,o,c,g,T]);const A=e.useCallback((function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const r=Rt(y.current,"close",b.current);r&&!E.current?(clearTimeout(x.current),x.current=window.setTimeout((()=>o(!1,e,n)),r)):t&&(clearTimeout(x.current),o(!1,e,n))}),[y,o]),P=ut((()=>{S.current(),E.current=void 0})),k=ut((()=>{if(O.current){const e=H(u.floating).body;e.style.pointerEvents="",e.removeAttribute(Et),O.current=!1}})),D=ut((()=>!!i.current.openEvent&&["click","mousedown"].includes(i.current.openEvent.type)));e.useEffect((()=>{if(c&&h(u.domReference)){var e;const o=u.domReference;return r&&o.addEventListener("mouseleave",l),null==(e=u.floating)||e.addEventListener("mouseleave",l),p&&o.addEventListener("mousemove",t,{once:!0}),o.addEventListener("mouseenter",t),o.addEventListener("mouseleave",n),()=>{var e;r&&o.removeEventListener("mouseleave",l),null==(e=u.floating)||e.removeEventListener("mouseleave",l),p&&o.removeEventListener("mousemove",t),o.removeEventListener("mouseenter",t),o.removeEventListener("mouseleave",n)}}function t(e){if(clearTimeout(x.current),C.current=!1,f&&!j(b.current)||d>0&&!Rt(y.current,"open"))return;const t=Rt(y.current,"open",b.current);t?x.current=window.setTimeout((()=>{w.current||o(!0,e,"hover")}),t):r||o(!0,e,"hover")}function n(e){if(D())return;S.current();const t=H(u.floating);if(clearTimeout(R.current),L.current=!1,g.current&&i.current.floatingContext){r||clearTimeout(x.current),E.current=g.current({...i.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){k(),P(),D()||A(e,!0,"safe-polygon")}});const n=E.current;return t.addEventListener("mousemove",n),void(S.current=()=>{t.removeEventListener("mousemove",n)})}("touch"!==b.current||!M(u.floating,e.relatedTarget))&&A(e)}function l(e){D()||i.current.floatingContext&&(null==g.current||g.current({...i.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){k(),P(),D()||A(e)}})(e))}}),[u,c,t,f,d,p,A,P,k,o,r,w,m,y,g,i,D]),ct((()=>{var e;if(c&&r&&null!=(e=g.current)&&e.__options.blockPointerEvents&&T()){O.current=!0;const e=u.floating;if(h(u.domReference)&&e){var t;const n=H(u.floating).body;n.setAttribute(Et,"");const r=u.domReference,o=null==m||null==(t=m.nodesRef.current.find((e=>e.id===v)))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}}),[c,r,v,u,m,g,T]),ct((()=>{r||(b.current=void 0,L.current=!1,P(),k())}),[r,P,k]),e.useEffect((()=>()=>{P(),clearTimeout(x.current),clearTimeout(R.current),k()}),[c,u.domReference,P,k]);const N=e.useMemo((()=>{function e(e){b.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function n(){C.current||w.current||o(!0,t,"hover")}f&&!j(b.current)||r||0===d||L.current&&e.movementX**2+e.movementY**2<2||(clearTimeout(R.current),"touch"===b.current?n():(L.current=!0,R.current=window.setTimeout(n,d)))}}}),[f,o,r,w,d]),F=e.useMemo((()=>({onMouseEnter(){clearTimeout(x.current)},onMouseLeave(e){D()||A(e.nativeEvent,!1)}})),[A,D]);return e.useMemo((()=>c?{reference:N,floating:F}:{}),[c,N,F])},flip:(e,t)=>({...$e(e),options:[e,t]}),shift:(e,t)=>({...Ye(e),options:[e,t]}),hide:(e,t)=>({...ze(e),options:[e,t]}),offset:(e,t)=>({...Ue(e),options:[e,t]})},dn=function(e,t){if(void 0===e&&(e=""),void 0===t&&(t=""),e)return e;if(!t)return"";var n=t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(n)};function pn(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=pn(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function mn(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=pn(e))&&(r&&(r+=" "),r+=t);return r}var vn="HoverCard",gn=function(e){var n=e.children,r=e.open,o=void 0===r?void 0:r,u=e.onOpenChange,c=e.customRootClass,d=void 0===c?"":c,p=e.openDelay,m=void 0===p?100:p,v=e.closeDelay,g=void 0===v?200:v,h=a(e,["children","open","onOpenChange","customRootClass","openDelay","closeDelay"]),y=dn(d,vn),w=dn(d,"".concat(vn,"-trigger")),b=i(null),x=fn.useFloating({placement:"bottom",strategy:"fixed",middleware:[fn.arrow({element:b}),fn.offset(10),fn.flip({mainAxis:!0})]}),E=x.refs,R=x.floatingStyles,C=x.context,O=l(!1),S=O[0],L=O[1],T=l(!1);T[0];var A=T[1],P=void 0!==o,k=P?o:S,D=function(e){P||L(e),null==u||u(e)},M=fn.useRole(C),N=fn.useDismiss(C),F=fn.useHover(C,{delay:100}),I=fn.useInteractions([F,M,N]),W=I.getReferenceProps,j=I.getFloatingProps,H={isOpen:k,handleOpenChange:D,floatingRefs:E,floatingStyles:R,floatingContext:C,arrowRef:b,getReferenceProps:W,getFloatingProps:j,rootClass:y,rootTriggerClass:w,closeWithDelay:function(){A(!0),setTimeout((function(){A((function(e){return e&&D(!1),e}))}),g)},closeWithoutDelay:function(){D(!1)},openWithDelay:function(){A(!1),setTimeout((function(){D(!0)}),m)}};return t.createElement(f.Provider,{value:H},t.createElement("div",s({className:mn(y)},h),n))},hn=["div","span","button"].reduce((function(e,n){return e[n]=function(e){var n=t.forwardRef((function(n,r){var o=n.asChild,i=void 0!==o&&o,l=n.children,u=a(n,["asChild","children"]);return i&&t.isValidElement(l)?t.cloneElement(l,s(s({},u),{ref:r})):t.createElement(e,s(s({},u),{ref:r}),l)}));return n.displayName="Primitive.".concat(e),n}(n),e}),{}),yn=function(e){var n=e.children,r=e.className,o=void 0===r?"":r,i=a(e,["children","className"]),l=u(f),c=l.floatingRefs,d=l.closeWithDelay,p=l.openWithDelay,m=l.rootTriggerClass;return t.createElement(t.Fragment,null,t.createElement(hn.span,s({className:mn(m,o),onClick:function(){},onMouseEnter:p,onMouseLeave:d,ref:c.setReference},i),n))},wn=function(e){var n=e.children,r=e.rootElement,o=void 0===r?void 0:r,i=a(e,["children","rootElement"]),l=u(f).rootTriggerClass,c=o||document.getElementsByClassName(l)[0];return t.createElement(fn.Portal,s({root:c},i),n)},bn=function(e){var n=e.children,r=a(e,["children"]),i=u(f),l=i.isOpen,c=i.floatingRefs,d=i.floatingStyles,p=i.getFloatingProps,m=i.rootClass,v=i.closeWithDelay,g=i.closeWithoutDelay,h=i.openWithDelay;return o((function(){var e=function(){return g()};return window.addEventListener("scroll",e),function(){window.removeEventListener("scroll",e)}}),[g]),l?t.createElement("div",s({onPointerEnter:h,onPointerLeave:v,className:mn(m)},r,{ref:c.setFloating,style:d},p()),n):null},xn=function(e){var n=a(e,[]),r=u(f),o=r.floatingContext,i=r.arrowRef,l=r.rootClass;return t.createElement(fn.Arrow,s({className:mn("".concat(l,"-arrow"))},n,{context:o,ref:i}))},En=function(e){var n=e.children,r=e.onOpenChange,o=void 0===r?function(){}:r,i=e.content,l=void 0===i?void 0:i,u=e.customRootClass,c=void 0===u?"":u,f=e.openDelay,d=void 0===f?100:f,p=e.closeDelay,m=void 0===p?200:p,v=a(e,["children","onOpenChange","content","customRootClass","openDelay","closeDelay"]);return t.createElement(gn,s({open:void 0,onOpenChange:o,openDelay:d,closeDelay:m,customRootClass:c},v),t.createElement(yn,null,n),t.createElement(wn,null,t.createElement(bn,null,l,t.createElement(xn,null))))};export{En as default};
@@ -1 +1 @@
1
- 'use client';import r from"react";var e=function(){return e=Object.assign||function(r){for(var e,t=1,o=arguments.length;t<o;t++)for(var n in e=arguments[t])Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},e.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;function t(r){var e,o,n="";if("string"==typeof r||"number"==typeof r)n+=r;else if("object"==typeof r)if(Array.isArray(r)){var a=r.length;for(e=0;e<a;e++)r[e]&&(o=t(r[e]))&&(n&&(n+=" "),n+=o)}else for(o in r)r[o]&&(n&&(n+=" "),n+=o);return n}function o(){for(var r,e,o=0,n="",a=arguments.length;o<a;o++)(r=arguments[o])&&(e=t(r))&&(n&&(n+=" "),n+=e);return n}var n=function(t){var n=t.children,a=t.customRootClass,c=t.className,f=function(r,e){var t={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(t[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(r);n<o.length;n++)e.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(r,o[n])&&(t[o[n]]=r[o[n]])}return t}(t,["children","customRootClass","className"]),i=function(r,e){if(void 0===r&&(r=""),void 0===e&&(e=""),r)return r;if(!e)return"";var t=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(a,"Kbd");return r.createElement("kbd",e({className:o(i,c)},f),n)};export{n as default};
1
+ 'use client';import r from"react";var e=function(){return e=Object.assign||function(r){for(var e,t=1,o=arguments.length;t<o;t++)for(var n in e=arguments[t])Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},e.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;function t(r){var e,o,n="";if("string"==typeof r||"number"==typeof r)n+=r;else if("object"==typeof r)if(Array.isArray(r)){var a=r.length;for(e=0;e<a;e++)r[e]&&(o=t(r[e]))&&(n&&(n+=" "),n+=o)}else for(o in r)r[o]&&(n&&(n+=" "),n+=o);return n}function o(){for(var r,e,o=0,n="",a=arguments.length;o<a;o++)(r=arguments[o])&&(e=t(r))&&(n&&(n+=" "),n+=e);return n}var n=function(t){var n=t.children,a=t.customRootClass,c=t.className,f=function(r,e){var t={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(t[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(r);n<o.length;n++)e.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(r,o[n])&&(t[o[n]]=r[o[n]])}return t}(t,["children","customRootClass","className"]),s=function(r,e){if(void 0===r&&(r=""),r)return r;var t=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(a,"Kbd");return r.createElement("kbd",e({className:o(s,c)},f),n)};export{n as default};
@@ -1 +1 @@
1
- 'use client';import r from"react";var e=function(){return e=Object.assign||function(r){for(var e,t=1,o=arguments.length;t<o;t++)for(var n in e=arguments[t])Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},e.apply(this,arguments)};function t(r){var e,o,n="";if("string"==typeof r||"number"==typeof r)n+=r;else if("object"==typeof r)if(Array.isArray(r)){var a=r.length;for(e=0;e<a;e++)r[e]&&(o=t(r[e]))&&(n&&(n+=" "),n+=o)}else for(o in r)r[o]&&(n&&(n+=" "),n+=o);return n}function o(){for(var r,e,o=0,n="",a=arguments.length;o<a;o++)(r=arguments[o])&&(e=t(r))&&(n&&(n+=" "),n+=e);return n}"function"==typeof SuppressedError&&SuppressedError;var n="Link",a=function(t){var a=t.children,f=t.href,c=void 0===f?"#":f;t.alt;var i=t.customRootClass,l=t.className,s=function(r,e){var t={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(t[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(r);n<o.length;n++)e.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(r,o[n])&&(t[o[n]]=r[o[n]])}return t}(t,["children","href","alt","customRootClass","className"]),p=function(r,e){if(void 0===r&&(r=""),void 0===e&&(e=""),r)return r;if(!e)return"";var t=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(i,n);return r.createElement("a",e({href:c,className:o(p,l)},s),a)};a.displayName=n;export{a as default};
1
+ 'use client';import r from"react";var e=function(){return e=Object.assign||function(r){for(var e,t=1,o=arguments.length;t<o;t++)for(var n in e=arguments[t])Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},e.apply(this,arguments)};function t(r){var e,o,n="";if("string"==typeof r||"number"==typeof r)n+=r;else if("object"==typeof r)if(Array.isArray(r)){var a=r.length;for(e=0;e<a;e++)r[e]&&(o=t(r[e]))&&(n&&(n+=" "),n+=o)}else for(o in r)r[o]&&(n&&(n+=" "),n+=o);return n}function o(){for(var r,e,o=0,n="",a=arguments.length;o<a;o++)(r=arguments[o])&&(e=t(r))&&(n&&(n+=" "),n+=e);return n}"function"==typeof SuppressedError&&SuppressedError;var n="Link",a=function(t){var a=t.children,c=t.href,f=void 0===c?"#":c,i=t.customRootClass,s=t.className,l=function(r,e){var t={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(t[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(r);n<o.length;n++)e.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(r,o[n])&&(t[o[n]]=r[o[n]])}return t}(t,["children","href","customRootClass","className"]),p=function(r,e){if(void 0===r&&(r=""),r)return r;var t=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(i,n);return r.createElement("a",e({href:f,className:o(p,s)},l),a)};a.displayName=n;export{a as default};
@@ -1,5 +1,5 @@
1
- 'use client';import*as e from"react";import t,{useLayoutEffect as n,useEffect as r,useRef as o}from"react";import*as i from"react-dom";function l(){return"undefined"!=typeof window}function u(e){return a(e)?(e.nodeName||"").toLowerCase():"#document"}function c(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function s(e){var t;return null==(t=(a(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function a(e){return!!l()&&(e instanceof Node||e instanceof c(e).Node)}function f(e){return!!l()&&(e instanceof Element||e instanceof c(e).Element)}function d(e){return!!l()&&(e instanceof HTMLElement||e instanceof c(e).HTMLElement)}function p(e){return!(!l()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof c(e).ShadowRoot)}function m(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=b(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function h(e){return["table","td","th"].includes(u(e))}function v(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function g(e){const t=y(),n=f(e)?b(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function y(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function w(e){return["html","body","#document"].includes(u(e))}function b(e){return c(e).getComputedStyle(e)}function x(e){return f(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function E(e){if("html"===u(e))return e;const t=e.assignedSlot||e.parentNode||p(e)&&e.host||s(e);return p(t)?t.host:t}function R(e){const t=E(e);return w(t)?e.ownerDocument?e.ownerDocument.body:e.body:d(t)&&m(t)?t:R(t)}function S(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=R(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=c(o);if(i){const e=C(l);return t.concat(l,l.visualViewport||[],m(o)?o:[],e&&n?S(e):[])}return t.concat(o,S(o,[],n))}function C(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function T(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 O(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&p(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function A(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function L(){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 N(e){return!L().includes("jsdom/")&&(!k()&&0===e.width&&0===e.height||k()&&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 k(){const e=/android/i;return e.test(A())||e.test(L())}function M(e){return(null==e?void 0:e.ownerDocument)||document}function I(e){return"composedPath"in e?e.composedPath()[0]:e.target}function D(e){e.preventDefault(),e.stopPropagation()}function F(e){return!!e&&("combobox"===e.getAttribute("role")&&function(e){return d(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}(e))}const P=Math.min,j=Math.max,W=Math.round,V=e=>({x:e,y:e});function B(e){return e.split("-")[0]}function q(e){return["top","bottom"].includes(B(e))?"y":"x"}function H(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}
1
+ 'use client';import*as e from"react";import t,{useLayoutEffect as n,useEffect as r,useRef as o}from"react";import*as i from"react-dom";function u(){return"undefined"!=typeof window}function l(e){return a(e)?(e.nodeName||"").toLowerCase():"#document"}function c(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function s(e){var t;return null==(t=(a(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function a(e){return!!u()&&(e instanceof Node||e instanceof c(e).Node)}function f(e){return!!u()&&(e instanceof Element||e instanceof c(e).Element)}function d(e){return!!u()&&(e instanceof HTMLElement||e instanceof c(e).HTMLElement)}function p(e){return!(!u()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof c(e).ShadowRoot)}function m(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=b(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function h(e){return["table","td","th"].includes(l(e))}function v(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function g(e){const t=y(),n=f(e)?b(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function y(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function w(e){return["html","body","#document"].includes(l(e))}function b(e){return c(e).getComputedStyle(e)}function x(e){return f(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function E(e){if("html"===l(e))return e;const t=e.assignedSlot||e.parentNode||p(e)&&e.host||s(e);return p(t)?t.host:t}function R(e){const t=E(e);return w(t)?e.ownerDocument?e.ownerDocument.body:e.body:d(t)&&m(t)?t:R(t)}function S(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=R(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),u=c(o);if(i){const e=C(u);return t.concat(u,u.visualViewport||[],m(o)?o:[],e&&n?S(e):[])}return t.concat(o,S(o,[],n))}function C(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function O(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 T(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&p(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function A(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function L(){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 N(e){return!L().includes("jsdom/")&&(!k()&&0===e.width&&0===e.height||k()&&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 k(){const e=/android/i;return e.test(A())||e.test(L())}function M(e){return(null==e?void 0:e.ownerDocument)||document}function I(e){return"composedPath"in e?e.composedPath()[0]:e.target}function D(e){e.preventDefault(),e.stopPropagation()}function F(e){return!!e&&("combobox"===e.getAttribute("role")&&function(e){return d(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}(e))}const P=Math.min,j=Math.max,W=Math.round,V=e=>({x:e,y:e});function B(e){return e.split("-")[0]}function q(e){return["top","bottom"].includes(B(e))?"y":"x"}function H(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}
2
2
  /*!
3
3
  * tabbable 6.2.0
4
4
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
5
- */var _=["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(","),U="undefined"==typeof Element,$=U?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,z=!U&&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},X=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)},Y=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var l=i.shift();if(!X(l,!1))if("SLOT"===l.tagName){var u=l.assignedElements(),c=e(u.length?u:l.children,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:l,candidates:c})}else{$.call(l,_)&&r.filter(l)&&(n||!t.includes(l))&&o.push(l);var s=l.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(l),a=!X(s,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(s&&a){var f=e(!0===s?l.children:s.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:l,candidates:f})}else i.unshift.apply(i,l.children)}}return o},K=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},G=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))&&!K(e)?0:e.tabIndex},J=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Q=function(e){return"INPUT"===e.tagName},Z=function(e){return function(e){return Q(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||z(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)},ee=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},te=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=$.call(e,"details>summary:first-of-type")?e.parentElement:e;if($.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return ee(e)}else{if("function"==typeof r){for(var i=e;e;){var l=e.parentElement,u=z(e);if(l&&!l.shadowRoot&&!0===r(l))return ee(e);e=e.assignedSlot?e.assignedSlot:l||u===e.ownerDocument?l:u.host}e=i}if(function(e){var t,n,r,o,i=e&&z(e),l=null===(t=i)||void 0===t?void 0:t.host,u=!1;if(i&&i!==e)for(u=!!(null!==(n=l)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(l)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!u&&l;){var c,s,a;u=!(null===(s=l=null===(c=i=z(l))||void 0===c?void 0:c.host)||void 0===s||null===(a=s.ownerDocument)||void 0===a||!a.contains(l))}return u}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},ne=function(e,t){return!(t.disabled||X(t)||function(e){return Q(e)&&"hidden"===e.type}(t)||te(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!!$.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},re=function(e,t){return!(Z(t)||G(t)<0||!ne(e,t))},oe=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},ie=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scopeParent,l=i?t.scopeParent:t,u=function(e,t){var n=G(e);return n<0&&t&&!K(e)?0:n}(l,i),c=i?e(t.candidates):l;0===u?i?n.push.apply(n,c):n.push(l):r.push({documentOrder:o,tabIndex:u,item:t,isScope:i,content:c})})),r.sort(J).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},le=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Y([e],t.includeContainer,{filter:re.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:oe}):function(e,t,n){if(X(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(_));return t&&$.call(e,_)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,re.bind(null,t)),ie(n)};function ue(e,t,n){let{reference:r,floating:o}=e;const i=q(t),l=function(e){return"x"===q(e)?"y":"x"}(t),u="y"===l?"height":"width";const c=B(t),s="y"===i,a=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[u]/2-o[u]/2;let p;switch(c){case"top":p={x:a,y:r.y-o.height};break;case"bottom":p={x:a,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(function(e){return e.split("-")[1]}(t)){case"start":p[l]-=d*(n&&s?-1:1);break;case"end":p[l]+=d*(n&&s?-1:1)}return p}function ce(e){const t=b(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=d(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,u=W(n)!==i||W(r)!==l;return u&&(n=i,r=l),{width:n,height:r,$:u}}function se(e){return f(e)?e:e.contextElement}function ae(e){const t=se(e);if(!d(t))return V(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=ce(t);let l=(i?W(n.width):n.width)/r,u=(i?W(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),u&&Number.isFinite(u)||(u=1),{x:l,y:u}}const fe=V(0);function de(e){const t=c(e);return y()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:fe}function pe(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=se(e);let l=V(1);t&&(r?f(r)&&(l=ae(r)):l=ae(e));const u=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==c(e))&&t}(i,n,r)?de(i):V(0);let s=(o.left+u.x)/l.x,a=(o.top+u.y)/l.y,d=o.width/l.x,p=o.height/l.y;if(i){const e=c(i),t=r&&f(r)?c(r):r;let n=e,o=C(n);for(;o&&r&&t!==n;){const e=ae(o),t=o.getBoundingClientRect(),r=b(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,a*=e.y,d*=e.x,p*=e.y,s+=i,a+=l,n=c(o),o=C(n)}}return H({width:d,height:p,x:s,y:a})}function me(e,t){const n=x(e).scrollLeft;return t?t.left+n:pe(s(e)).left+n}function he(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:me(e,r)),y:r.top+t.scrollTop}}function ve(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=c(e),r=s(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,u=0,a=0;if(o){i=o.width,l=o.height;const e=y();(!e||e&&"fixed"===t)&&(u=o.offsetLeft,a=o.offsetTop)}return{width:i,height:l,x:u,y:a}}(e,n);else if("document"===t)r=function(e){const t=s(e),n=x(e),r=e.ownerDocument.body,o=j(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=j(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+me(e);const u=-n.scrollTop;return"rtl"===b(r).direction&&(l+=j(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:u}}(s(e));else if(f(t))r=function(e,t){const n=pe(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=d(e)?ae(e):V(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=de(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return H(r)}function ge(e,t){const n=E(e);return!(n===t||!f(n)||w(n))&&("fixed"===b(n).position||ge(n,t))}function ye(e,t,n){const r=d(t),o=s(t),i="fixed"===n,l=pe(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const a=V(0);if(r||!r&&!i)if(("body"!==u(t)||m(o))&&(c=x(t)),r){const e=pe(t,!0,i,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=me(o));const f=!o||r||i?V(0):he(o,c);return{x:l.left+c.scrollLeft-a.x-f.x,y:l.top+c.scrollTop-a.y-f.y,width:l.width,height:l.height}}function we(e){return"static"===b(e).position}function be(e,t){if(!d(e)||"fixed"===b(e).position)return null;if(t)return t(e);let n=e.offsetParent;return s(e)===n&&(n=n.ownerDocument.body),n}function xe(e,t){const n=c(e);if(v(e))return n;if(!d(e)){let t=E(e);for(;t&&!w(t);){if(f(t)&&!we(t))return t;t=E(t)}return n}let r=be(e,t);for(;r&&h(r)&&we(r);)r=be(r,t);return r&&w(r)&&we(r)&&!g(r)?n:r||function(e){let t=E(e);for(;d(t)&&!w(t);){if(g(t))return t;if(v(t))return null;t=E(t)}return null}(e)||n}const Ee={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,l=s(r),c=!!t&&v(t.floating);if(r===l||c&&i)return n;let a={scrollLeft:0,scrollTop:0},f=V(1);const p=V(0),h=d(r);if((h||!h&&!i)&&(("body"!==u(r)||m(l))&&(a=x(r)),d(r))){const e=pe(r);f=ae(r),p.x=e.x+r.clientLeft,p.y=e.y+r.clientTop}const g=!l||h||i?V(0):he(l,a,!0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-a.scrollLeft*f.x+p.x+g.x,y:n.y*f.y-a.scrollTop*f.y+p.y+g.y}},getDocumentElement:s,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?v(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=S(e,[],!1).filter((e=>f(e)&&"body"!==u(e))),o=null;const i="fixed"===b(e).position;let l=i?E(e):e;for(;f(l)&&!w(l);){const t=b(l),n=g(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||m(l)&&!n&&ge(e,l))?r=r.filter((e=>e!==l)):o=t,l=E(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=i[0],c=i.reduce(((e,n)=>{const r=ve(t,n,o);return e.top=j(r.top,e.top),e.right=P(r.right,e.right),e.bottom=P(r.bottom,e.bottom),e.left=j(r.left,e.left),e}),ve(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:xe,getElementRects:async function(e){const t=this.getOffsetParent||xe,n=this.getDimensions,r=await n(e.floating);return{reference:ye(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=ce(e);return{width:t,height:n}},getScale:ae,isElement:f,isRTL:function(e){return"rtl"===b(e).direction}},Re=(e,t,n)=>{const r=new Map,o={platform:Ee,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,u=i.filter(Boolean),c=await(null==l.isRTL?void 0:l.isRTL(t));let s=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:a,y:f}=ue(s,r,c),d=r,p={},m=0;for(let n=0;n<u.length;n++){const{name:i,fn:h}=u[n],{x:v,y:g,data:y,reset:w}=await h({x:a,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:s,platform:l,elements:{reference:e,floating:t}});a=null!=v?v:a,f=null!=g?g:f,p={...p,[i]:{...p[i],...y}},w&&m<=50&&(m++,"object"==typeof w&&(w.placement&&(d=w.placement),w.rects&&(s=!0===w.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:a,y:f}=ue(s,d,c))),n=-1)}return{x:a,y:f,placement:d,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Se="undefined"!=typeof document?n:r;function Ce(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Ce(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!Ce(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Te(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Oe(e,t){const n=Te(e);return Math.round(t*n)/n}function Ae(t){const n=e.useRef(t);return Se((()=>{n.current=t})),n}const Le={...e},Ne=Le.useInsertionEffect||(e=>e());function ke(t){const n=e.useRef((()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")}));return Ne((()=>{n.current=t})),e.useCallback((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return null==n.current?void 0:n.current(...t)}),[])}var Me="undefined"!=typeof document?n:r;function Ie(){return Ie=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},Ie.apply(this,arguments)}let De=!1,Fe=0;const Pe=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Fe++;const je=Le.useId||function(){const[t,n]=e.useState((()=>De?Pe():void 0));return Me((()=>{null==t&&n(Pe())}),[]),e.useEffect((()=>{De=!0}),[]),t};let We;"production"!==process.env.NODE_ENV&&(We=new Set);const Ve=e.createContext(null),Be=e.createContext(null),qe=()=>e.useContext(Be);function He(e){return"data-floating-ui-"+e}function _e(e){const t=o(e);return Me((()=>{t.current=e})),t}let Ue=0;function $e(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Ue);const i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():Ue=requestAnimationFrame(i)}function ze(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 Xe=new WeakMap,Ye=new WeakSet,Ke={},Ge=0;const Je=e=>e&&(e.host||Je(e.parentNode));function Qe(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,l=(c=t,e.map((e=>{if(c.contains(e))return e;const t=Je(e);return c.contains(t)?t:null})).filter((e=>null!=e)));var c;const s=new Set,a=new Set(l),f=[];Ke[o]||(Ke[o]=new WeakMap);const d=Ke[o];return l.forEach((function e(t){if(!t||s.has(t))return;s.add(t),t.parentNode&&e(t.parentNode)})),function e(t){if(!t||a.has(t))return;[].forEach.call(t.children,(t=>{if("script"!==u(t))if(s.has(t))e(t);else{const e=i?t.getAttribute(i):null,n=null!==e&&"false"!==e,r=(Xe.get(t)||0)+1,l=(d.get(t)||0)+1;Xe.set(t,r),d.set(t,l),f.push(t),1===r&&n&&Ye.add(t),1===l&&t.setAttribute(o,""),!n&&i&&t.setAttribute(i,"true")}}))}(t),s.clear(),Ge++,()=>{f.forEach((e=>{const t=(Xe.get(e)||0)-1,n=(d.get(e)||0)-1;Xe.set(e,t),d.set(e,n),t||(!Ye.has(e)&&i&&e.removeAttribute(i),Ye.delete(e)),n||e.removeAttribute(o)})),Ge--,Ge||(Xe=new WeakMap,Xe=new WeakMap,Ye=new WeakSet,Ke={})}}function Ze(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=M(e[0]).body;return Qe(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const et=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function tt(e,t){const n=le(e,et());"prev"===t&&n.reverse();const r=n.indexOf(T(M(e)));return n.slice(r+1)[0]}function nt(){return tt(document.body,"next")}function rt(){return tt(document.body,"prev")}function ot(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!O(n,r)}function it(e){le(e,et()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function lt(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 ut={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 ct(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const st=e.forwardRef((function(t,n){const[r,o]=e.useState();Me((()=>(/apple/i.test(navigator.vendor)&&o("button"),document.addEventListener("keydown",ct),()=>{document.removeEventListener("keydown",ct)})),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":!r||void 0,[He("focus-guard")]:"",style:ut};return e.createElement("span",Ie({},t,i))})),at=e.createContext(null),ft=He("portal");function dt(t){const{children:n,id:r,root:o,preserveTabOrder:l=!0}=t,u=function(t){void 0===t&&(t={});const{id:n,root:r}=t,o=je(),i=pt(),[l,u]=e.useState(null),c=e.useRef(null);return Me((()=>()=>{null==l||l.remove(),queueMicrotask((()=>{c.current=null}))}),[l]),Me((()=>{if(!o)return;if(c.current)return;const e=n?document.getElementById(n):null;if(!e)return;const t=document.createElement("div");t.id=o,t.setAttribute(ft,""),e.appendChild(t),c.current=t,u(t)}),[n,o]),Me((()=>{if(null===r)return;if(!o)return;if(c.current)return;let e=r||(null==i?void 0:i.portalNode);e&&!f(e)&&(e=e.current),e=e||document.body;let t=null;n&&(t=document.createElement("div"),t.id=n,e.appendChild(t));const l=document.createElement("div");l.id=o,l.setAttribute(ft,""),e=t||e,e.appendChild(l),c.current=l,u(l)}),[n,r,o,i]),l}({id:r,root:o}),[c,s]=e.useState(null),a=e.useRef(null),d=e.useRef(null),p=e.useRef(null),m=e.useRef(null),h=null==c?void 0:c.modal,v=null==c?void 0:c.open,g=!!c&&!c.modal&&c.open&&l&&!(!o&&!u);return e.useEffect((()=>{if(u&&l&&!h)return u.addEventListener("focusin",e,!0),u.addEventListener("focusout",e,!0),()=>{u.removeEventListener("focusin",e,!0),u.removeEventListener("focusout",e,!0)};function e(e){if(u&&ot(e)){("focusin"===e.type?lt:it)(u)}}}),[u,l,h]),e.useEffect((()=>{u&&(v||lt(u))}),[v,u]),e.createElement(at.Provider,{value:e.useMemo((()=>({preserveTabOrder:l,beforeOutsideRef:a,afterOutsideRef:d,beforeInsideRef:p,afterInsideRef:m,portalNode:u,setFocusManagerState:s})),[l,u])},g&&u&&e.createElement(st,{"data-type":"outside",ref:a,onFocus:e=>{if(ot(e,u)){var t;null==(t=p.current)||t.focus()}else{const e=rt()||(null==c?void 0:c.refs.domReference.current);null==e||e.focus()}}}),g&&u&&e.createElement("span",{"aria-owns":u.id,style:ut}),u&&i.createPortal(n,u),g&&u&&e.createElement(st,{"data-type":"outside",ref:d,onFocus:e=>{if(ot(e,u)){var t;null==(t=m.current)||t.focus()}else{const t=nt()||(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,"focus-out"))}}}))}const pt=()=>e.useContext(at),mt="data-floating-ui-focusable";let ht=[];function vt(e){ht=ht.filter((e=>e.isConnected));let t=e;if(t&&"body"!==u(t)){if(!function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==$.call(e,_)&&re(t,e)}(t,et())){const e=le(t,et())[0];e&&(t=e)}ht.push(t),ht.length>20&&(ht=ht.slice(-20))}}function gt(){return ht.slice().reverse().find((e=>e.isConnected))}const yt=e.forwardRef((function(t,n){return e.createElement("button",Ie({},t,{type:"button",ref:n,tabIndex:-1,style:ut}))}));function wt(t){const{context:n,children:r,disabled:o=!1,order:i=["content"],guards:l=!0,initialFocus:u=0,returnFocus:c=!0,restoreFocus:s=!1,modal:a=!0,visuallyHiddenDismiss:f=!1,closeOnFocusOut:p=!0}=t,{open:m,refs:h,nodeId:v,onOpenChange:g,events:y,dataRef:w,floatingId:b,elements:{domReference:x,floating:E}}=n,R="number"==typeof u&&u<0,S=F(x)&&R,C="undefined"==typeof HTMLElement||!("inert"in HTMLElement.prototype)||l,A=_e(i),L=_e(u),P=_e(c),j=qe(),W=pt(),V=e.useRef(null),B=e.useRef(null),q=e.useRef(!1),H=e.useRef(!1),_=e.useRef(-1),U=null!=W,$=(z=E)?z.hasAttribute(mt)?z:z.querySelector("["+mt+"]")||z:null;var z;const X=ke((function(e){return void 0===e&&(e=$),e?le(e,et()):[]})),Y=ke((e=>{const t=X(e);return A.current.map((e=>x&&"reference"===e?x:$&&"floating"===e?$:t)).filter(Boolean).flat()}));function K(t){return!o&&f&&a?e.createElement(yt,{ref:"start"===t?V:B,onClick:e=>g(!1,e.nativeEvent)},"string"==typeof f?f:"Dismiss"):null}e.useEffect((()=>{if(o)return;if(!a)return;function e(e){if("Tab"===e.key){O($,T(M($)))&&0===X().length&&!S&&D(e);const t=Y(),n=I(e);"reference"===A.current[0]&&n===x&&(D(e),e.shiftKey?$e(t[t.length-1]):$e(t[1])),"floating"===A.current[1]&&n===$&&e.shiftKey&&(D(e),$e(t[0]))}}const t=M($);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}),[o,x,$,a,A,S,X,Y]),e.useEffect((()=>{if(!o&&E)return E.addEventListener("focusin",e),()=>{E.removeEventListener("focusin",e)};function e(e){const t=I(e),n=X().indexOf(t);-1!==n&&(_.current=n)}}),[o,E,X]),e.useEffect((()=>{if(!o&&p)return E&&d(x)?(x.addEventListener("focusout",t),x.addEventListener("pointerdown",e),E.addEventListener("focusout",t),()=>{x.removeEventListener("focusout",t),x.removeEventListener("pointerdown",e),E.removeEventListener("focusout",t)}):void 0;function e(){H.current=!0,setTimeout((()=>{H.current=!1}))}function t(e){const t=e.relatedTarget;queueMicrotask((()=>{const n=!(O(x,t)||O(E,t)||O(t,E)||O(null==W?void 0:W.portalNode,t)||null!=t&&t.hasAttribute(He("focus-guard"))||j&&(ze(j.nodesRef.current,v).find((e=>{var n,r;return O(null==(n=e.context)?void 0:n.elements.floating,t)||O(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}(j.nodesRef.current,v).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}))));if(s&&n&&T(M($))===M($).body){d($)&&$.focus();const e=_.current,t=X(),n=t[e]||t[t.length-1]||$;d(n)&&n.focus()}!S&&a||!t||!n||H.current||t===gt()||(q.current=!0,g(!1,e,"focus-out"))}))}}),[o,x,E,$,a,v,j,W,g,p,s,X,S]),e.useEffect((()=>{var e;if(o)return;const t=Array.from((null==W||null==(e=W.portalNode)?void 0:e.querySelectorAll("["+He("portal")+"]"))||[]);if(E){const e=[E,...t,V.current,B.current,A.current.includes("reference")||S?x:null].filter((e=>null!=e)),n=a||S?Ze(e,C,!C):Ze(e);return()=>{n()}}}),[o,x,E,a,A,W,S,C]),Me((()=>{if(o||!d($))return;const e=T(M($));queueMicrotask((()=>{const t=Y($),n=L.current,r=("number"==typeof n?t[n]:n.current)||$,o=O($,e);R||o||!m||$e(r,{preventScroll:r===$})}))}),[o,m,$,R,Y,L]),Me((()=>{if(o||!$)return;let e=!1;const t=M($),n=T(t);let r=w.current.openEvent;function i(t){let{open:n,reason:o,event:i,nested:l}=t;n&&(r=i),"escape-key"===o&&h.domReference.current&&vt(h.domReference.current),"hover"===o&&"mouseleave"===i.type&&(q.current=!0),"outside-press"===o&&(l?(q.current=!1,e=!0):q.current=!(function(e){return!(0!==e.mozInputSource||!e.isTrusted)||(k()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}(i)||N(i)))}vt(n),y.on("openchange",i);const l=t.createElement("span");return l.setAttribute("tabindex","-1"),l.setAttribute("aria-hidden","true"),Object.assign(l.style,ut),U&&x&&x.insertAdjacentElement("afterend",l),()=>{y.off("openchange",i);const n=T(t),o=O(E,n)||j&&ze(j.nodesRef.current,v).some((e=>{var t;return O(null==(t=e.context)?void 0:t.elements.floating,n)}));(o||r&&["click","mousedown"].includes(r.type))&&h.domReference.current&&vt(h.domReference.current);const u="boolean"==typeof P.current?gt()||l:P.current.current||l;queueMicrotask((()=>{P.current&&!q.current&&d(u)&&(u===n||n===t.body||o)&&u.focus({preventScroll:e}),l.remove()}))}}),[o,E,$,P,w,h,y,j,v,U,x]),e.useEffect((()=>{queueMicrotask((()=>{q.current=!1}))}),[o]),Me((()=>{if(!o&&W)return W.setFocusManagerState({modal:a,closeOnFocusOut:p,open:m,onOpenChange:g,refs:h}),()=>{W.setFocusManagerState(null)}}),[o,W,a,m,g,h,p]),Me((()=>{if(o)return;if(!$)return;if("function"!=typeof MutationObserver)return;if(R)return;const e=()=>{const e=$.getAttribute("tabindex"),t=X(),n=T(M(E)),r=t.indexOf(n);-1!==r&&(_.current=r),A.current.includes("floating")||n!==h.domReference.current&&0===t.length?"0"!==e&&$.setAttribute("tabindex","0"):"-1"!==e&&$.setAttribute("tabindex","-1")};e();const t=new MutationObserver(e);return t.observe($,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}}),[o,E,$,h,A,X,R]);const G=!o&&C&&(!a||!S)&&(U||a);return e.createElement(e.Fragment,null,G&&e.createElement(st,{"data-type":"inside",ref:null==W?void 0:W.beforeInsideRef,onFocus:e=>{if(a){const e=Y();$e("reference"===i[0]?e[0]:e[e.length-1])}else if(null!=W&&W.preserveTabOrder&&W.portalNode)if(q.current=!1,ot(e,W.portalNode)){const e=nt()||x;null==e||e.focus()}else{var t;null==(t=W.beforeOutsideRef.current)||t.focus()}}}),!S&&K("start"),r,K("end"),G&&e.createElement(st,{"data-type":"inside",ref:null==W?void 0:W.afterInsideRef,onFocus:e=>{if(a)$e(Y()[0]);else if(null!=W&&W.preserveTabOrder&&W.portalNode)if(p&&(q.current=!0),ot(e,W.portalNode)){const e=rt()||x;null==e||e.focus()}else{var t;null==(t=W.afterOutsideRef.current)||t.focus()}}}))}let bt=0;let xt=()=>{};const Et=e.forwardRef((function(t,n){const{lockScroll:r=!1,...o}=t;return Me((()=>{if(r)return bt++,1===bt&&(xt=function(){const e=/iP(hone|ad|od)|iOS/.test(A()),t=document.body.style,n=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,o=t.left?parseFloat(t.left):window.scrollX,i=t.top?parseFloat(t.top):window.scrollY;if(t.overflow="hidden",r&&(t[n]=r+"px"),e){var l,u;const e=(null==(l=window.visualViewport)?void 0:l.offsetLeft)||0,n=(null==(u=window.visualViewport)?void 0:u.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(i-Math.floor(n))+"px",left:-(o-Math.floor(e))+"px",right:"0"})}return()=>{Object.assign(t,{overflow:"",[n]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(o,i))}}()),()=>{bt--,0===bt&&xt()}}),[r]),e.createElement("div",Ie({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))}));function Rt(t){const{open:n=!1,onOpenChange:r,elements:o}=t,i=je(),l=e.useRef({}),[u]=e.useState((()=>function(){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)))||[])}}}())),c=null!=((null==(s=e.useContext(Ve))?void 0:s.id)||null);var s;if("production"!==process.env.NODE_ENV){const e=o.reference;e&&!f(e)&&function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var i;null!=(e=We)&&e.has(o)||(null==(i=We)||i.add(o),console.error(o))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[a,d]=e.useState(o.reference),p=ke(((e,t,n)=>{l.current.openEvent=e?t:void 0,u.emit("openchange",{open:e,event:t,reason:n,nested:c}),null==r||r(e,t,n)})),m=e.useMemo((()=>({setPositionReference:d})),[]),h=e.useMemo((()=>({reference:a||o.reference||null,floating:o.floating||null,domReference:o.reference})),[a,o.reference,o.floating]);return e.useMemo((()=>({dataRef:l,open:n,onOpenChange:p,elements:h,events:u,floatingId:i,refs:m})),[n,p,h,u,i,m])}function St(t){void 0===t&&(t={});const{nodeId:n}=t,r=Rt({...t,elements:{reference:null,floating:null,...t.elements}}),o=t.rootContext||r,l=o.elements,[u,c]=e.useState(null),[s,a]=e.useState(null),d=(null==l?void 0:l.domReference)||u,p=e.useRef(null),m=qe();Me((()=>{d&&(p.current=d)}),[d]);const h=function(t){void 0===t&&(t={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:l,elements:{reference:u,floating:c}={},transform:s=!0,whileElementsMounted:a,open:f}=t,[d,p]=e.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[m,h]=e.useState(o);Ce(m,o)||h(o);const[v,g]=e.useState(null),[y,w]=e.useState(null),b=e.useCallback((e=>{e!==S.current&&(S.current=e,g(e))}),[]),x=e.useCallback((e=>{e!==C.current&&(C.current=e,w(e))}),[]),E=u||v,R=c||y,S=e.useRef(null),C=e.useRef(null),T=e.useRef(d),O=null!=a,A=Ae(a),L=Ae(l),N=Ae(f),k=e.useCallback((()=>{if(!S.current||!C.current)return;const e={placement:n,strategy:r,middleware:m};L.current&&(e.platform=L.current),Re(S.current,C.current,e).then((e=>{const t={...e,isPositioned:!1!==N.current};M.current&&!Ce(T.current,t)&&(T.current=t,i.flushSync((()=>{p(t)})))}))}),[m,n,r,L,N]);Se((()=>{!1===f&&T.current.isPositioned&&(T.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[f]);const M=e.useRef(!1);Se((()=>(M.current=!0,()=>{M.current=!1})),[]),Se((()=>{if(E&&(S.current=E),R&&(C.current=R),E&&R){if(A.current)return A.current(E,R,k);k()}}),[E,R,k,A,O]);const I=e.useMemo((()=>({reference:S,floating:C,setReference:b,setFloating:x})),[b,x]),D=e.useMemo((()=>({reference:E,floating:R})),[E,R]),F=e.useMemo((()=>{const e={position:r,left:0,top:0};if(!D.floating)return e;const t=Oe(D.floating,d.x),n=Oe(D.floating,d.y);return s?{...e,transform:"translate("+t+"px, "+n+"px)",...Te(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,s,D.floating,d.x,d.y]);return e.useMemo((()=>({...d,update:k,refs:I,elements:D,floatingStyles:F})),[d,k,I,D,F])}({...t,elements:{...l,...s&&{reference:s}}}),v=e.useCallback((e=>{const t=f(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;a(t),h.refs.setReference(t)}),[h.refs]),g=e.useCallback((e=>{(f(e)||null===e)&&(p.current=e,c(e)),(f(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!f(e))&&h.refs.setReference(e)}),[h.refs]),y=e.useMemo((()=>({...h.refs,setReference:g,setPositionReference:v,domReference:p})),[h.refs,g,v]),w=e.useMemo((()=>({...h.elements,domReference:d})),[h.elements,d]),b=e.useMemo((()=>({...h,...o,refs:y,elements:w,nodeId:n})),[h,y,w,n,o]);return Me((()=>{o.dataRef.current.floatingContext=b;const e=null==m?void 0:m.nodesRef.current.find((e=>e.id===n));e&&(e.context=b)})),e.useMemo((()=>({...h,context:b,refs:y,elements:w})),[h,y,w,b])}var Ct=function(e){var n=e.open,r=void 0===n||n,o=e.onClose,i=e.children,l=St().context;return t.createElement("div",{className:"modal"},t.createElement("div",{className:"modal__content"},t.createElement("div",null,i),t.createElement("div",null,r&&t.createElement(dt,null,t.createElement(Et,{className:"overlay",lockScroll:!0},t.createElement(wt,{context:l},t.createElement("div",{className:"fixed bg-black/80 overflow-auto w-screen h-screen grid place-items-center"},t.createElement("div",{className:"bg-white p-4 inline-block rounded-md shadow-lg"},t.createElement("button",{onClick:function(){o(!1)}},"Close"),t.createElement("div",null,"Modal Content",t.createElement("div",null,t.createElement("input",{type:"text",autoFocus:!0})))))))))))};export{Ct as Modal,Ct as default};
5
+ */var _=["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(","),U="undefined"==typeof Element,$=U?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,z=!U&&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},X=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)},Y=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var u=i.shift();if(!X(u,!1))if("SLOT"===u.tagName){var l=u.assignedElements(),c=e(l.length?l:u.children,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:u,candidates:c})}else{$.call(u,_)&&r.filter(u)&&(n||!t.includes(u))&&o.push(u);var s=u.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(u),a=!X(s,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(u));if(s&&a){var f=e(!0===s?u.children:s.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:u,candidates:f})}else i.unshift.apply(i,u.children)}}return o},K=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},G=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))&&!K(e)?0:e.tabIndex},J=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Q=function(e){return"INPUT"===e.tagName},Z=function(e){return function(e){return Q(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||z(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)},ee=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},te=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=$.call(e,"details>summary:first-of-type")?e.parentElement:e;if($.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return ee(e)}else{if("function"==typeof r){for(var i=e;e;){var u=e.parentElement,l=z(e);if(u&&!u.shadowRoot&&!0===r(u))return ee(e);e=e.assignedSlot?e.assignedSlot:u||l===e.ownerDocument?u:l.host}e=i}if(function(e){var t,n,r,o,i=e&&z(e),u=null===(t=i)||void 0===t?void 0:t.host,l=!1;if(i&&i!==e)for(l=!!(null!==(n=u)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(u)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!l&&u;){var c,s,a;l=!(null===(s=u=null===(c=i=z(u))||void 0===c?void 0:c.host)||void 0===s||null===(a=s.ownerDocument)||void 0===a||!a.contains(u))}return l}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},ne=function(e,t){return!(t.disabled||X(t)||function(e){return Q(e)&&"hidden"===e.type}(t)||te(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!!$.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},re=function(e,t){return!(Z(t)||G(t)<0||!ne(e,t))},oe=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},ie=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scopeParent,u=i?t.scopeParent:t,l=function(e,t){var n=G(e);return n<0&&t&&!K(e)?0:n}(u,i),c=i?e(t.candidates):u;0===l?i?n.push.apply(n,c):n.push(u):r.push({documentOrder:o,tabIndex:l,item:t,isScope:i,content:c})})),r.sort(J).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},ue=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Y([e],t.includeContainer,{filter:re.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:oe}):function(e,t,n){if(X(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(_));return t&&$.call(e,_)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,re.bind(null,t)),ie(n)};function le(e,t,n){let{reference:r,floating:o}=e;const i=q(t),u=function(e){return"x"===q(e)?"y":"x"}(t),l="y"===u?"height":"width";const c=B(t),s="y"===i,a=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[l]/2-o[l]/2;let p;switch(c){case"top":p={x:a,y:r.y-o.height};break;case"bottom":p={x:a,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(function(e){return e.split("-")[1]}(t)){case"start":p[u]-=d*(n&&s?-1:1);break;case"end":p[u]+=d*(n&&s?-1:1)}return p}function ce(e){const t=b(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=d(e),i=o?e.offsetWidth:n,u=o?e.offsetHeight:r,l=W(n)!==i||W(r)!==u;return l&&(n=i,r=u),{width:n,height:r,$:l}}function se(e){return f(e)?e:e.contextElement}function ae(e){const t=se(e);if(!d(t))return V(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=ce(t);let u=(i?W(n.width):n.width)/r,l=(i?W(n.height):n.height)/o;return u&&Number.isFinite(u)||(u=1),l&&Number.isFinite(l)||(l=1),{x:u,y:l}}const fe=V(0);function de(e){const t=c(e);return y()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:fe}function pe(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=se(e);let u=V(1);t&&(r?f(r)&&(u=ae(r)):u=ae(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==c(e))&&t}(i,n,r)?de(i):V(0);let s=(o.left+l.x)/u.x,a=(o.top+l.y)/u.y,d=o.width/u.x,p=o.height/u.y;if(i){const e=c(i),t=r&&f(r)?c(r):r;let n=e,o=C(n);for(;o&&r&&t!==n;){const e=ae(o),t=o.getBoundingClientRect(),r=b(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,u=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,a*=e.y,d*=e.x,p*=e.y,s+=i,a+=u,n=c(o),o=C(n)}}return H({width:d,height:p,x:s,y:a})}function me(e,t){const n=x(e).scrollLeft;return t?t.left+n:pe(s(e)).left+n}function he(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:me(e,r)),y:r.top+t.scrollTop}}function ve(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=c(e),r=s(e),o=n.visualViewport;let i=r.clientWidth,u=r.clientHeight,l=0,a=0;if(o){i=o.width,u=o.height;const e=y();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,a=o.offsetTop)}return{width:i,height:u,x:l,y:a}}(e,n);else if("document"===t)r=function(e){const t=s(e),n=x(e),r=e.ownerDocument.body,o=j(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=j(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+me(e);const l=-n.scrollTop;return"rtl"===b(r).direction&&(u+=j(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:u,y:l}}(s(e));else if(f(t))r=function(e,t){const n=pe(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=d(e)?ae(e):V(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=de(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return H(r)}function ge(e,t){const n=E(e);return!(n===t||!f(n)||w(n))&&("fixed"===b(n).position||ge(n,t))}function ye(e,t,n){const r=d(t),o=s(t),i="fixed"===n,u=pe(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const a=V(0);if(r||!r&&!i)if(("body"!==l(t)||m(o))&&(c=x(t)),r){const e=pe(t,!0,i,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=me(o));const f=!o||r||i?V(0):he(o,c);return{x:u.left+c.scrollLeft-a.x-f.x,y:u.top+c.scrollTop-a.y-f.y,width:u.width,height:u.height}}function we(e){return"static"===b(e).position}function be(e,t){if(!d(e)||"fixed"===b(e).position)return null;if(t)return t(e);let n=e.offsetParent;return s(e)===n&&(n=n.ownerDocument.body),n}function xe(e,t){const n=c(e);if(v(e))return n;if(!d(e)){let t=E(e);for(;t&&!w(t);){if(f(t)&&!we(t))return t;t=E(t)}return n}let r=be(e,t);for(;r&&h(r)&&we(r);)r=be(r,t);return r&&w(r)&&we(r)&&!g(r)?n:r||function(e){let t=E(e);for(;d(t)&&!w(t);){if(g(t))return t;if(v(t))return null;t=E(t)}return null}(e)||n}const Ee={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,u=s(r),c=!!t&&v(t.floating);if(r===u||c&&i)return n;let a={scrollLeft:0,scrollTop:0},f=V(1);const p=V(0),h=d(r);if((h||!h&&!i)&&(("body"!==l(r)||m(u))&&(a=x(r)),d(r))){const e=pe(r);f=ae(r),p.x=e.x+r.clientLeft,p.y=e.y+r.clientTop}const g=!u||h||i?V(0):he(u,a,!0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-a.scrollLeft*f.x+p.x+g.x,y:n.y*f.y-a.scrollTop*f.y+p.y+g.y}},getDocumentElement:s,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?v(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=S(e,[],!1).filter((e=>f(e)&&"body"!==l(e))),o=null;const i="fixed"===b(e).position;let u=i?E(e):e;for(;f(u)&&!w(u);){const t=b(u),n=g(u);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||m(u)&&!n&&ge(e,u))?r=r.filter((e=>e!==u)):o=t,u=E(u)}return t.set(e,r),r}(t,this._c):[].concat(n),r],u=i[0],c=i.reduce(((e,n)=>{const r=ve(t,n,o);return e.top=j(r.top,e.top),e.right=P(r.right,e.right),e.bottom=P(r.bottom,e.bottom),e.left=j(r.left,e.left),e}),ve(t,u,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:xe,getElementRects:async function(e){const t=this.getOffsetParent||xe,n=this.getDimensions,r=await n(e.floating);return{reference:ye(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=ce(e);return{width:t,height:n}},getScale:ae,isElement:f,isRTL:function(e){return"rtl"===b(e).direction}},Re=(e,t,n)=>{const r=new Map,o={platform:Ee,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:u}=n,l=i.filter(Boolean),c=await(null==u.isRTL?void 0:u.isRTL(t));let s=await u.getElementRects({reference:e,floating:t,strategy:o}),{x:a,y:f}=le(s,r,c),d=r,p={},m=0;for(let n=0;n<l.length;n++){const{name:i,fn:h}=l[n],{x:v,y:g,data:y,reset:w}=await h({x:a,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:s,platform:u,elements:{reference:e,floating:t}});a=null!=v?v:a,f=null!=g?g:f,p={...p,[i]:{...p[i],...y}},w&&m<=50&&(m++,"object"==typeof w&&(w.placement&&(d=w.placement),w.rects&&(s=!0===w.rects?await u.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:a,y:f}=le(s,d,c))),n=-1)}return{x:a,y:f,placement:d,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Se="undefined"!=typeof document?n:r;function Ce(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Ce(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!Ce(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Oe(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Te(e,t){const n=Oe(e);return Math.round(t*n)/n}function Ae(t){const n=e.useRef(t);return Se((()=>{n.current=t})),n}function Le(t){return e.useMemo((()=>t.every((e=>null==e))?null:e=>{t.forEach((t=>{"function"==typeof t?t(e):null!=t&&(t.current=e)}))}),t)}const Ne={...e},ke=Ne.useInsertionEffect||(e=>e());function Me(t){const n=e.useRef((()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")}));return ke((()=>{n.current=t})),e.useCallback((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return null==n.current?void 0:n.current(...t)}),[])}var Ie="undefined"!=typeof document?n:r;function De(){return De=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},De.apply(this,arguments)}let Fe=!1,Pe=0;const je=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Pe++;const We=Ne.useId||function(){const[t,n]=e.useState((()=>Fe?je():void 0));return Ie((()=>{null==t&&n(je())}),[]),e.useEffect((()=>{Fe=!0}),[]),t};let Ve;"production"!==process.env.NODE_ENV&&(Ve=new Set);const Be=e.createContext(null),qe=e.createContext(null),He=()=>e.useContext(qe);function _e(e){return"data-floating-ui-"+e}function Ue(e){const t=o(e);return Ie((()=>{t.current=e})),t}let $e=0;function ze(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame($e);const i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():$e=requestAnimationFrame(i)}function Xe(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 Ye=new WeakMap,Ke=new WeakSet,Ge={},Je=0;const Qe=e=>e&&(e.host||Qe(e.parentNode));function Ze(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,u=(c=t,e.map((e=>{if(c.contains(e))return e;const t=Qe(e);return c.contains(t)?t:null})).filter((e=>null!=e)));var c;const s=new Set,a=new Set(u),f=[];Ge[o]||(Ge[o]=new WeakMap);const d=Ge[o];return u.forEach((function e(t){if(!t||s.has(t))return;s.add(t),t.parentNode&&e(t.parentNode)})),function e(t){if(!t||a.has(t))return;[].forEach.call(t.children,(t=>{if("script"!==l(t))if(s.has(t))e(t);else{const e=i?t.getAttribute(i):null,n=null!==e&&"false"!==e,r=(Ye.get(t)||0)+1,u=(d.get(t)||0)+1;Ye.set(t,r),d.set(t,u),f.push(t),1===r&&n&&Ke.add(t),1===u&&t.setAttribute(o,""),!n&&i&&t.setAttribute(i,"true")}}))}(t),s.clear(),Je++,()=>{f.forEach((e=>{const t=(Ye.get(e)||0)-1,n=(d.get(e)||0)-1;Ye.set(e,t),d.set(e,n),t||(!Ke.has(e)&&i&&e.removeAttribute(i),Ke.delete(e)),n||e.removeAttribute(o)})),Je--,Je||(Ye=new WeakMap,Ye=new WeakMap,Ke=new WeakSet,Ge={})}}function et(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=M(e[0]).body;return Ze(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const tt=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function nt(e,t){const n=ue(e,tt());"prev"===t&&n.reverse();const r=n.indexOf(O(M(e)));return n.slice(r+1)[0]}function rt(){return nt(document.body,"next")}function ot(){return nt(document.body,"prev")}function it(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!T(n,r)}function ut(e){ue(e,tt()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function lt(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 ct={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 st(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const at=e.forwardRef((function(t,n){const[r,o]=e.useState();Ie((()=>(/apple/i.test(navigator.vendor)&&o("button"),document.addEventListener("keydown",st),()=>{document.removeEventListener("keydown",st)})),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":!r||void 0,[_e("focus-guard")]:"",style:ct};return e.createElement("span",De({},t,i))})),ft=e.createContext(null),dt=_e("portal");function pt(t){const{children:n,id:r,root:o,preserveTabOrder:u=!0}=t,l=function(t){void 0===t&&(t={});const{id:n,root:r}=t,o=We(),i=mt(),[u,l]=e.useState(null),c=e.useRef(null);return Ie((()=>()=>{null==u||u.remove(),queueMicrotask((()=>{c.current=null}))}),[u]),Ie((()=>{if(!o)return;if(c.current)return;const e=n?document.getElementById(n):null;if(!e)return;const t=document.createElement("div");t.id=o,t.setAttribute(dt,""),e.appendChild(t),c.current=t,l(t)}),[n,o]),Ie((()=>{if(null===r)return;if(!o)return;if(c.current)return;let e=r||(null==i?void 0:i.portalNode);e&&!f(e)&&(e=e.current),e=e||document.body;let t=null;n&&(t=document.createElement("div"),t.id=n,e.appendChild(t));const u=document.createElement("div");u.id=o,u.setAttribute(dt,""),e=t||e,e.appendChild(u),c.current=u,l(u)}),[n,r,o,i]),u}({id:r,root:o}),[c,s]=e.useState(null),a=e.useRef(null),d=e.useRef(null),p=e.useRef(null),m=e.useRef(null),h=null==c?void 0:c.modal,v=null==c?void 0:c.open,g=!!c&&!c.modal&&c.open&&u&&!(!o&&!l);return e.useEffect((()=>{if(l&&u&&!h)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&&it(e)){("focusin"===e.type?lt:ut)(l)}}}),[l,u,h]),e.useEffect((()=>{l&&(v||lt(l))}),[v,l]),e.createElement(ft.Provider,{value:e.useMemo((()=>({preserveTabOrder:u,beforeOutsideRef:a,afterOutsideRef:d,beforeInsideRef:p,afterInsideRef:m,portalNode:l,setFocusManagerState:s})),[u,l])},g&&l&&e.createElement(at,{"data-type":"outside",ref:a,onFocus:e=>{if(it(e,l)){var t;null==(t=p.current)||t.focus()}else{const e=ot()||(null==c?void 0:c.refs.domReference.current);null==e||e.focus()}}}),g&&l&&e.createElement("span",{"aria-owns":l.id,style:ct}),l&&i.createPortal(n,l),g&&l&&e.createElement(at,{"data-type":"outside",ref:d,onFocus:e=>{if(it(e,l)){var t;null==(t=m.current)||t.focus()}else{const t=rt()||(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,"focus-out"))}}}))}const mt=()=>e.useContext(ft),ht="data-floating-ui-focusable";let vt=[];function gt(e){vt=vt.filter((e=>e.isConnected)),e&&"body"!==l(e)&&(vt.push(e),vt.length>20&&(vt=vt.slice(-20)))}function yt(){return vt.slice().reverse().find((e=>e.isConnected))}function wt(e){const t=tt();return function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==$.call(e,_)&&re(t,e)}(e,t)?e:ue(e,t)[0]}const bt=e.forwardRef((function(t,n){return e.createElement("button",De({},t,{type:"button",ref:n,tabIndex:-1,style:ct}))}));function xt(t){const{context:n,children:r,disabled:o=!1,order:i=["content"],guards:u=!0,initialFocus:l=0,returnFocus:c=!0,restoreFocus:s=!1,modal:a=!0,visuallyHiddenDismiss:f=!1,closeOnFocusOut:p=!0,outsideElementsInert:m=!1}=t,{open:h,refs:v,nodeId:g,onOpenChange:y,events:w,dataRef:b,elements:{domReference:x,floating:E}}=n,R="number"==typeof l&&l<0,S=F(x)&&R,C="undefined"!=typeof HTMLElement&&"inert"in HTMLElement.prototype,A=!C||u,L=!A||C&&m,P=Ue(i),j=Ue(l),W=Ue(c),V=He(),B=mt(),q=e.useRef(null),H=e.useRef(null),_=e.useRef(!1),U=e.useRef(!1),$=e.useRef(-1),z=null!=B,X=(Y=E)?Y.hasAttribute(ht)?Y:Y.querySelector("["+ht+"]")||Y:null;var Y;const K=Me((function(e){return void 0===e&&(e=X),e?ue(e,tt()):[]})),G=Me((e=>{const t=K(e);return P.current.map((e=>x&&"reference"===e?x:X&&"floating"===e?X:t)).filter(Boolean).flat()}));e.useEffect((()=>{if(o)return;if(!a)return;function e(e){if("Tab"===e.key){T(X,O(M(X)))&&0===K().length&&!S&&D(e);const t=G(),n=I(e);"reference"===P.current[0]&&n===x&&(D(e),e.shiftKey?ze(t[t.length-1]):ze(t[1])),"floating"===P.current[1]&&n===X&&e.shiftKey&&(D(e),ze(t[0]))}}const t=M(X);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}),[o,x,X,a,P,S,K,G]),e.useEffect((()=>{if(!o&&E)return E.addEventListener("focusin",e),()=>{E.removeEventListener("focusin",e)};function e(e){const t=I(e),n=K().indexOf(t);-1!==n&&($.current=n)}}),[o,E,K]),e.useEffect((()=>{if(!o&&p)return E&&d(x)?(x.addEventListener("focusout",t),x.addEventListener("pointerdown",e),E.addEventListener("focusout",t),()=>{x.removeEventListener("focusout",t),x.removeEventListener("pointerdown",e),E.removeEventListener("focusout",t)}):void 0;function e(){U.current=!0,setTimeout((()=>{U.current=!1}))}function t(e){const t=e.relatedTarget;queueMicrotask((()=>{const n=!(T(x,t)||T(E,t)||T(t,E)||T(null==B?void 0:B.portalNode,t)||null!=t&&t.hasAttribute(_e("focus-guard"))||V&&(Xe(V.nodesRef.current,g).find((e=>{var n,r;return T(null==(n=e.context)?void 0:n.elements.floating,t)||T(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}(V.nodesRef.current,g).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}))));if(s&&n&&O(M(X))===M(X).body){d(X)&&X.focus();const e=$.current,t=K(),n=t[e]||t[t.length-1]||X;d(n)&&n.focus()}!S&&a||!t||!n||U.current||t===yt()||(_.current=!0,y(!1,e,"focus-out"))}))}}),[o,x,E,X,a,g,V,B,y,p,s,K,S]);const J=e.useRef(null),Q=e.useRef(null),Z=Le([J,null==B?void 0:B.beforeInsideRef]),ee=Le([Q,null==B?void 0:B.afterInsideRef]);function te(t){return!o&&f&&a?e.createElement(bt,{ref:"start"===t?q:H,onClick:e=>y(!1,e.nativeEvent)},"string"==typeof f?f:"Dismiss"):null}e.useEffect((()=>{var e;if(o)return;const t=Array.from((null==B||null==(e=B.portalNode)?void 0:e.querySelectorAll("["+_e("portal")+"]"))||[]);if(E){const e=[E,...t,q.current,H.current,J.current,Q.current,null==B?void 0:B.beforeOutsideRef.current,null==B?void 0:B.afterOutsideRef.current,P.current.includes("reference")||S?x:null].filter((e=>null!=e)),n=a||S?et(e,!L,L):et(e);return()=>{n()}}}),[o,x,E,a,P,B,S,A,L]),Ie((()=>{if(o||!d(X))return;const e=O(M(X));queueMicrotask((()=>{const t=G(X),n=j.current,r=("number"==typeof n?t[n]:n.current)||X,o=T(X,e);R||o||!h||ze(r,{preventScroll:r===X})}))}),[o,h,X,R,G,j]),Ie((()=>{if(o||!X)return;let e=!1;const t=M(X),n=O(t);let r=b.current.openEvent;function i(t){let{open:n,reason:o,event:i,nested:u}=t;n&&(r=i),"escape-key"===o&&v.domReference.current&&gt(v.domReference.current),["hover","safe-polygon"].includes(o)&&"mouseleave"===i.type&&(_.current=!0),"outside-press"===o&&(u?(_.current=!1,e=!0):_.current=!(function(e){return!(0!==e.mozInputSource||!e.isTrusted)||(k()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}(i)||N(i)))}gt(n),w.on("openchange",i);const u=t.createElement("span");return u.setAttribute("tabindex","-1"),u.setAttribute("aria-hidden","true"),Object.assign(u.style,ct),z&&x&&x.insertAdjacentElement("afterend",u),()=>{w.off("openchange",i);const n=O(t),o=T(E,n)||V&&Xe(V.nodesRef.current,g).some((e=>{var t;return T(null==(t=e.context)?void 0:t.elements.floating,n)}));(o||r&&["click","mousedown"].includes(r.type))&&v.domReference.current&&gt(v.domReference.current);const l="boolean"==typeof W.current?yt()||u:W.current.current||u;queueMicrotask((()=>{const r=wt(l);W.current&&!_.current&&d(r)&&(r===n||n===t.body||o)&&r.focus({preventScroll:e}),u.remove()}))}}),[o,E,X,W,b,v,w,V,g,z,x]),e.useEffect((()=>{queueMicrotask((()=>{_.current=!1}))}),[o]),Ie((()=>{if(!o&&B)return B.setFocusManagerState({modal:a,closeOnFocusOut:p,open:h,onOpenChange:y,refs:v}),()=>{B.setFocusManagerState(null)}}),[o,B,a,h,y,v,p]),Ie((()=>{if(o)return;if(!X)return;if("function"!=typeof MutationObserver)return;if(R)return;const e=()=>{const e=X.getAttribute("tabindex"),t=K(),n=O(M(E)),r=t.indexOf(n);-1!==r&&($.current=r),P.current.includes("floating")||n!==v.domReference.current&&0===t.length?"0"!==e&&X.setAttribute("tabindex","0"):"-1"!==e&&X.setAttribute("tabindex","-1")};e();const t=new MutationObserver(e);return t.observe(X,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}}),[o,E,X,v,P,K,R]);const ne=!o&&A&&(!a||!S)&&(z||a);return e.createElement(e.Fragment,null,ne&&e.createElement(at,{"data-type":"inside",ref:Z,onFocus:e=>{if(a){const e=G();ze("reference"===i[0]?e[0]:e[e.length-1])}else if(null!=B&&B.preserveTabOrder&&B.portalNode)if(_.current=!1,it(e,B.portalNode)){const e=rt()||x;null==e||e.focus()}else{var t;null==(t=B.beforeOutsideRef.current)||t.focus()}}}),!S&&te("start"),r,te("end"),ne&&e.createElement(at,{"data-type":"inside",ref:ee,onFocus:e=>{if(a)ze(G()[0]);else if(null!=B&&B.preserveTabOrder&&B.portalNode)if(p&&(_.current=!0),it(e,B.portalNode)){const e=ot()||x;null==e||e.focus()}else{var t;null==(t=B.afterOutsideRef.current)||t.focus()}}}))}let Et=0;let Rt=()=>{};const St=e.forwardRef((function(t,n){const{lockScroll:r=!1,...o}=t;return Ie((()=>{if(r)return Et++,1===Et&&(Rt=function(){const e=/iP(hone|ad|od)|iOS/.test(A()),t=document.body.style,n=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,o=t.left?parseFloat(t.left):window.scrollX,i=t.top?parseFloat(t.top):window.scrollY;if(t.overflow="hidden",r&&(t[n]=r+"px"),e){var u,l;const e=(null==(u=window.visualViewport)?void 0:u.offsetLeft)||0,n=(null==(l=window.visualViewport)?void 0:l.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(i-Math.floor(n))+"px",left:-(o-Math.floor(e))+"px",right:"0"})}return()=>{Object.assign(t,{overflow:"",[n]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(o,i))}}()),()=>{Et--,0===Et&&Rt()}}),[r]),e.createElement("div",De({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))}));function Ct(t){const{open:n=!1,onOpenChange:r,elements:o}=t,i=We(),u=e.useRef({}),[l]=e.useState((()=>function(){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)))||[])}}}())),c=null!=((null==(s=e.useContext(Be))?void 0:s.id)||null);var s;if("production"!==process.env.NODE_ENV){const e=o.reference;e&&!f(e)&&function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var i;null!=(e=Ve)&&e.has(o)||(null==(i=Ve)||i.add(o),console.error(o))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[a,d]=e.useState(o.reference),p=Me(((e,t,n)=>{u.current.openEvent=e?t:void 0,l.emit("openchange",{open:e,event:t,reason:n,nested:c}),null==r||r(e,t,n)})),m=e.useMemo((()=>({setPositionReference:d})),[]),h=e.useMemo((()=>({reference:a||o.reference||null,floating:o.floating||null,domReference:o.reference})),[a,o.reference,o.floating]);return e.useMemo((()=>({dataRef:u,open:n,onOpenChange:p,elements:h,events:l,floatingId:i,refs:m})),[n,p,h,l,i,m])}function Ot(t){void 0===t&&(t={});const{nodeId:n}=t,r=Ct({...t,elements:{reference:null,floating:null,...t.elements}}),o=t.rootContext||r,u=o.elements,[l,c]=e.useState(null),[s,a]=e.useState(null),d=(null==u?void 0:u.domReference)||l,p=e.useRef(null),m=He();Ie((()=>{d&&(p.current=d)}),[d]);const h=function(t){void 0===t&&(t={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:u,elements:{reference:l,floating:c}={},transform:s=!0,whileElementsMounted:a,open:f}=t,[d,p]=e.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[m,h]=e.useState(o);Ce(m,o)||h(o);const[v,g]=e.useState(null),[y,w]=e.useState(null),b=e.useCallback((e=>{e!==S.current&&(S.current=e,g(e))}),[]),x=e.useCallback((e=>{e!==C.current&&(C.current=e,w(e))}),[]),E=l||v,R=c||y,S=e.useRef(null),C=e.useRef(null),O=e.useRef(d),T=null!=a,A=Ae(a),L=Ae(u),N=Ae(f),k=e.useCallback((()=>{if(!S.current||!C.current)return;const e={placement:n,strategy:r,middleware:m};L.current&&(e.platform=L.current),Re(S.current,C.current,e).then((e=>{const t={...e,isPositioned:!1!==N.current};M.current&&!Ce(O.current,t)&&(O.current=t,i.flushSync((()=>{p(t)})))}))}),[m,n,r,L,N]);Se((()=>{!1===f&&O.current.isPositioned&&(O.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[f]);const M=e.useRef(!1);Se((()=>(M.current=!0,()=>{M.current=!1})),[]),Se((()=>{if(E&&(S.current=E),R&&(C.current=R),E&&R){if(A.current)return A.current(E,R,k);k()}}),[E,R,k,A,T]);const I=e.useMemo((()=>({reference:S,floating:C,setReference:b,setFloating:x})),[b,x]),D=e.useMemo((()=>({reference:E,floating:R})),[E,R]),F=e.useMemo((()=>{const e={position:r,left:0,top:0};if(!D.floating)return e;const t=Te(D.floating,d.x),n=Te(D.floating,d.y);return s?{...e,transform:"translate("+t+"px, "+n+"px)",...Oe(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,s,D.floating,d.x,d.y]);return e.useMemo((()=>({...d,update:k,refs:I,elements:D,floatingStyles:F})),[d,k,I,D,F])}({...t,elements:{...u,...s&&{reference:s}}}),v=e.useCallback((e=>{const t=f(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;a(t),h.refs.setReference(t)}),[h.refs]),g=e.useCallback((e=>{(f(e)||null===e)&&(p.current=e,c(e)),(f(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!f(e))&&h.refs.setReference(e)}),[h.refs]),y=e.useMemo((()=>({...h.refs,setReference:g,setPositionReference:v,domReference:p})),[h.refs,g,v]),w=e.useMemo((()=>({...h.elements,domReference:d})),[h.elements,d]),b=e.useMemo((()=>({...h,...o,refs:y,elements:w,nodeId:n})),[h,y,w,n,o]);return Ie((()=>{o.dataRef.current.floatingContext=b;const e=null==m?void 0:m.nodesRef.current.find((e=>e.id===n));e&&(e.context=b)})),e.useMemo((()=>({...h,context:b,refs:y,elements:w})),[h,y,w,b])}var Tt=function(e){var n=e.open,r=void 0===n||n,o=e.onClose,i=e.children,u=Ot().context;return t.createElement("div",{className:"modal"},t.createElement("div",{className:"modal__content"},t.createElement("div",null,i),t.createElement("div",null,r&&t.createElement(pt,null,t.createElement(St,{className:"overlay",lockScroll:!0},t.createElement(xt,{context:u},t.createElement("div",{className:"fixed bg-black/80 overflow-auto w-screen h-screen grid place-items-center"},t.createElement("div",{className:"bg-white p-4 inline-block rounded-md shadow-lg"},t.createElement("button",{onClick:function(){o(!1)}},"Close"),t.createElement("div",null,"Modal Content",t.createElement("div",null,t.createElement("input",{type:"text",autoFocus:!0})))))))))))};export{Tt as Modal,Tt as default};
@@ -1 +1 @@
1
- 'use client';import e,{createContext as r,useContext as a}from"react";var t=function(){return t=Object.assign||function(e){for(var r,a=1,t=arguments.length;a<t;a++)for(var o in r=arguments[a])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},t.apply(this,arguments)};function o(e){var r,a,t="";if("string"==typeof e||"number"==typeof e)t+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(r=0;r<n;r++)e[r]&&(a=o(e[r]))&&(t&&(t+=" "),t+=a)}else for(a in e)e[a]&&(t&&(t+=" "),t+=a);return t}function n(){for(var e,r,a=0,t="",n=arguments.length;a<n;a++)(e=arguments[a])&&(r=o(e))&&(t&&(t+=" "),t+=r);return t}"function"==typeof SuppressedError&&SuppressedError;var l=function(e,r){if(void 0===e&&(e=""),void 0===r&&(r=""),e)return e;if(!r)return"";var a=r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(a)},u=r({value:0,minValue:0,maxValue:100}),i=function(r){var a=r.value,t=void 0===a?0:a,o=r.minValue,i=void 0===o?0:o,s=r.maxValue,m=void 0===s?100:s,v=r.children,f=r.customRootClass,p=l(f,c),d={value:t,minValue:i,maxValue:m};return e.createElement(u.Provider,{value:d},e.createElement("div",{className:n(p)},v))};function s(r){var t=r.customRootClass,o=r.renderLabel,i=l(t,c),s=a(u),m=s.value,v=s.minValue,f=s.maxValue,p=Math.min(Math.max(m,v),f);return e.createElement("div",{role:"progressbar",className:n("".concat(i,"-indicator")),style:{transform:"translateX(-".concat(f-p,"%)")},"aria-valuenow":p,"aria-valuemax":f,"aria-valuemin":v},null==o?void 0:o(m))}var c="Progress";function m(r){var a=r.value,o=void 0===a?0:a,n=r.maxValue,l=void 0===n?100:n,u=r.minValue,c=void 0===u?0:u,m=r.customRootClass,v=function(e,r){var a={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(a[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(e);o<t.length;o++)r.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(a[t[o]]=e[t[o]])}return a}(r,["value","maxValue","minValue","customRootClass"]);return e.createElement(i,{value:o,maxValue:l,minValue:c,customRootClass:m},e.createElement(s,t({customRootClass:m},v)))}m.Root=i,m.Indicator=s,m.displayName=c;export{c as COMPONENT_NAME,m as default};
1
+ 'use client';import e,{createContext as a,useContext as r}from"react";var t=function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var o in a=arguments[r])Object.prototype.hasOwnProperty.call(a,o)&&(e[o]=a[o]);return e},t.apply(this,arguments)};function o(e){var a,r,t="";if("string"==typeof e||"number"==typeof e)t+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(a=0;a<n;a++)e[a]&&(r=o(e[a]))&&(t&&(t+=" "),t+=r)}else for(r in e)e[r]&&(t&&(t+=" "),t+=r);return t}function n(){for(var e,a,r=0,t="",n=arguments.length;r<n;r++)(e=arguments[r])&&(a=o(e))&&(t&&(t+=" "),t+=a);return t}"function"==typeof SuppressedError&&SuppressedError;var l=function(e,a){if(void 0===e&&(e=""),e)return e;var r=a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(r)},u=a({value:0,minValue:0,maxValue:100}),i=function(a){var r=a.value,t=void 0===r?0:r,o=a.minValue,i=void 0===o?0:o,s=a.maxValue,m=void 0===s?100:s,v=a.children,f=a.customRootClass,p=l(f,c),d={value:t,minValue:i,maxValue:m};return e.createElement(u.Provider,{value:d},e.createElement("div",{className:n(p)},v))};function s(a){var t=a.customRootClass,o=a.renderLabel,i=l(t,c),s=r(u),m=s.value,v=s.minValue,f=s.maxValue,p=Math.min(Math.max(m,v),f);return e.createElement("div",{role:"progressbar",className:n("".concat(i,"-indicator")),style:{transform:"translateX(-".concat(f-p,"%)")},"aria-valuenow":p,"aria-valuemax":f,"aria-valuemin":v},null==o?void 0:o(m))}var c="Progress";function m(a){var r=a.value,o=void 0===r?0:r,n=a.maxValue,l=void 0===n?100:n,u=a.minValue,c=void 0===u?0:u,m=a.customRootClass,v=function(e,a){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(e);o<t.length;o++)a.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(r[t[o]]=e[t[o]])}return r}(a,["value","maxValue","minValue","customRootClass"]);return e.createElement(i,{value:o,maxValue:l,minValue:c,customRootClass:m},e.createElement(s,t({customRootClass:m},v)))}m.Root=i,m.Indicator=s,m.displayName=c;export{c as COMPONENT_NAME,m as default};
@@ -1 +1 @@
1
- 'use client';import r from"react";var e=function(){return e=Object.assign||function(r){for(var e,t=1,o=arguments.length;t<o;t++)for(var n in e=arguments[t])Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},e.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;function t(r){var e,o,n="";if("string"==typeof r||"number"==typeof r)n+=r;else if("object"==typeof r)if(Array.isArray(r)){var a=r.length;for(e=0;e<a;e++)r[e]&&(o=t(r[e]))&&(n&&(n+=" "),n+=o)}else for(o in r)r[o]&&(n&&(n+=" "),n+=o);return n}function o(){for(var r,e,o=0,n="",a=arguments.length;o<a;o++)(r=arguments[o])&&(e=t(r))&&(n&&(n+=" "),n+=e);return n}var n="Quote",a=function(t){var a=t.children,c=t.customRootClass,f=t.className,i=function(r,e){var t={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(t[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(r);n<o.length;n++)e.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(r,o[n])&&(t[o[n]]=r[o[n]])}return t}(t,["children","customRootClass","className"]),s=function(r,e){if(void 0===r&&(r=""),void 0===e&&(e=""),r)return r;if(!e)return"";var t=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(c,n);return r.createElement("q",e({className:o(s,f)},i),a)};a.displayName=n;export{a as default};
1
+ 'use client';import r from"react";var e=function(){return e=Object.assign||function(r){for(var e,t=1,o=arguments.length;t<o;t++)for(var n in e=arguments[t])Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},e.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;function t(r){var e,o,n="";if("string"==typeof r||"number"==typeof r)n+=r;else if("object"==typeof r)if(Array.isArray(r)){var a=r.length;for(e=0;e<a;e++)r[e]&&(o=t(r[e]))&&(n&&(n+=" "),n+=o)}else for(o in r)r[o]&&(n&&(n+=" "),n+=o);return n}function o(){for(var r,e,o=0,n="",a=arguments.length;o<a;o++)(r=arguments[o])&&(e=t(r))&&(n&&(n+=" "),n+=e);return n}var n="Quote",a=function(t){var a=t.children,c=t.customRootClass,s=t.className,f=function(r,e){var t={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(t[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(r);n<o.length;n++)e.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(r,o[n])&&(t[o[n]]=r[o[n]])}return t}(t,["children","customRootClass","className"]),i=function(r,e){if(void 0===r&&(r=""),r)return r;var t=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(c,n);return r.createElement("q",e({className:o(i,s)},f),a)};a.displayName=n;export{a as default};
@@ -1 +1 @@
1
- 'use client';import e from"react";var r=function(){return r=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var a in r=arguments[t])Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);return e},r.apply(this,arguments)};function t(e,r){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(e);a<o.length;a++)r.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(t[o[a]]=e[o[a]])}return t}"function"==typeof SuppressedError&&SuppressedError;var o=function(o){o.role;var a=o.label,n=void 0===a?"":a,l=o.id,c=o.value,i=o.defaultChecked,u=o.onChange,d=o.checked,f=o.children,p=t(o,["role","label","id","value","defaultChecked","onChange","checked","children"]),s={"aria-label":n||void 0,"aria-checked":d?"true":"false","data-checked":d?"true":"false"};return e.createElement("div",null,e.createElement("input",r({type:"radio",id:l},s,p,{value:c,checked:i,onChange:u})),e.createElement("label",{htmlFor:l}," ",f))};function a(e){var r,t,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(r=0;r<n;r++)e[r]&&(t=a(e[r]))&&(o&&(o+=" "),o+=t)}else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function n(){for(var e,r,t=0,o="",n=arguments.length;t<n;t++)(e=arguments[t])&&(r=a(e))&&(o&&(o+=" "),o+=r);return o}var l=function(a){var l=a.children,c=a.type,i=void 0===c?"radio":c,u=a.className,d=void 0===u?"":u,f=a.customRootClass,p=void 0===f?"":f,s=t(a,["children","type","className","customRootClass"]),v=function(e,r){if(void 0===e&&(e=""),void 0===r&&(r=""),e)return e;if(!r)return"";var t=r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(p,"RadioGroup");return e.createElement("div",{className:n(v,d),role:"radiogroup"},e.createElement(o,r({type:i},s),l))};export{l as default};
1
+ 'use client';import e from"react";var r=function(){return r=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},r.apply(this,arguments)};function t(e,r){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)r.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(t[a[o]]=e[a[o]])}return t}"function"==typeof SuppressedError&&SuppressedError;var a=function(a){a.role;var o=a.label,n=void 0===o?"":o,l=a.id,c=a.value,i=a.defaultChecked,u=a.onChange,d=a.checked,f=a.children,p=t(a,["role","label","id","value","defaultChecked","onChange","checked","children"]),s={"aria-label":n||void 0,"aria-checked":d?"true":"false","data-checked":d?"true":"false"};return e.createElement("div",null,e.createElement("input",r({type:"radio",id:l},s,p,{value:c,checked:i,onChange:u})),e.createElement("label",{htmlFor:l}," ",f))};function o(e){var r,t,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(r=0;r<n;r++)e[r]&&(t=o(e[r]))&&(a&&(a+=" "),a+=t)}else for(t in e)e[t]&&(a&&(a+=" "),a+=t);return a}function n(){for(var e,r,t=0,a="",n=arguments.length;t<n;t++)(e=arguments[t])&&(r=o(e))&&(a&&(a+=" "),a+=r);return a}var l=function(o){var l=o.children,c=o.type,i=void 0===c?"radio":c,u=o.className,d=void 0===u?"":u,f=o.customRootClass,p=void 0===f?"":f,s=t(o,["children","type","className","customRootClass"]),v=function(e,r){if(void 0===e&&(e=""),e)return e;var t=r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(p,"RadioGroup");return e.createElement("div",{className:n(v,d),role:"radiogroup"},e.createElement(a,r({type:i},s),l))};export{l as default};