(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,43489,29315,53760,58950,e=>{"use strict";let t;var n=e.i(71645);function r(){return"u">typeof window}function o(e){return u(e)?(e.nodeName||"").toLowerCase():"#document"}function i(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function l(e){var t;return null==(t=(u(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function u(e){return!!r()&&(e instanceof Node||e instanceof i(e).Node)}function a(e){return!!r()&&(e instanceof Element||e instanceof i(e).Element)}function c(e){return!!r()&&(e instanceof HTMLElement||e instanceof i(e).HTMLElement)}function f(e){return!(!r()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof i(e).ShadowRoot)}function s(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=x(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function d(e){return/^(table|td|th)$/.test(o(e))}function p(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}let m=/transform|translate|scale|rotate|perspective|filter/,v=/paint|layout|strict|content/,h=e=>!!e&&"none"!==e;function g(e){let t=a(e)?x(e):e;return h(t.transform)||h(t.translate)||h(t.scale)||h(t.rotate)||h(t.perspective)||!w()&&(h(t.backdropFilter)||h(t.filter))||m.test(t.willChange||"")||v.test(t.contain||"")}function y(e){let t=R(e);for(;c(t)&&!b(t);){if(g(t))return t;if(p(t))break;t=R(t)}return null}function w(){return null==t&&(t="u">typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),t}function b(e){return/^(html|body|#document)$/.test(o(e))}function x(e){return i(e).getComputedStyle(e)}function E(e){return a(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function R(e){if("html"===o(e))return e;let t=e.assignedSlot||e.parentNode||f(e)&&e.host||l(e);return f(t)?t.host:t}function L(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let o=function e(t){let n=R(t);return b(n)?(t.ownerDocument||t).body:c(n)&&s(n)?n:e(n)}(e),l=o===(null==(r=e.ownerDocument)?void 0:r.body),u=i(o);if(!l)return t.concat(o,L(o,[],n));{let e=A(u);return t.concat(u,u.visualViewport||[],s(o)?o:[],e&&n?L(e):[])}}function A(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}e.s(["X",0,x,"f",0,y,"I",0,l,"w",0,A,"A",0,o,"Q",0,E,"G",0,L,"J",0,R,"K",0,i,"e",0,g,"m",0,a,"E",0,c,"Z",0,b,"t",0,u,"B",0,s,"R",0,f,"S",0,d,"D",0,p,"i",0,w],29315);let C=["top","right","bottom","left"],S=C.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]),T=Math.min,M=Math.max,k=Math.round,P=Math.floor,O=e=>({x:e,y:e}),D={left:"right",right:"left",bottom:"top",top:"bottom"};function N(e,t){return"function"==typeof e?e(t):e}function I(e){return e.split("-")[0]}function j(e){return e.split("-")[1]}function F(e){return"x"===e?"y":"x"}function W(e){return"y"===e?"height":"width"}function B(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function H(e,t,n){void 0===n&&(n=!1);let r=j(e),o=F(B(e)),i=W(o),l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=X(l)),[l,X(l)]}function q(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let V=["left","right"],_=["right","left"],z=["top","bottom"],K=["bottom","top"];function X(e){let t=I(e);return D[t]+e.slice(t.length)}function U(e){var t,n,r,o;return"number"!=typeof e?{top:null!=(t=e.top)?t:0,right:null!=(n=e.right)?n:0,bottom:null!=(r=e.bottom)?r:0,left:null!=(o=e.left)?o:0}:{top:e,right:e,bottom:e,left:e}}function Y(e){let{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}}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])',Z="u"<typeof Element,G=Z?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Q=!Z&&Element.prototype.getRootNode?function(e){var t;return null==e||null==(t=e.getRootNode)?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},J=function e(t,n){void 0===n&&(n=!0);var r,o=null==t||null==(r=t.getAttribute)?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},ee=function(e){var t,n=null==e||null==(t=e.getAttribute)?void 0:t.call(e,"contenteditable");return""===n||"true"===n},et=function(e,t,n){if(J(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll($));return t&&G.call(e,$)&&r.unshift(e),r=r.filter(n)},en=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var l=i.shift();if(!J(l,!1))if("SLOT"===l.tagName){var u=l.assignedElements(),a=e(u.length?u:l.children,!0,r);r.flatten?o.push.apply(o,a):o.push({scopeParent:l,candidates:a})}else{G.call(l,$)&&r.filter(l)&&(n||!t.includes(l))&&o.push(l);var c=l.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(l),f=!J(c,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(c&&f){var s=e(!0===c?l.children:c.children,!0,r);r.flatten?o.push.apply(o,s):o.push({scopeParent:l,candidates:s})}else i.unshift.apply(i,l.children)}}return o},er=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},eo=function(e){if(!e)throw Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||ee(e))&&!er(e)?0:e.tabIndex},ei=function(e,t){var n=eo(e);return n<0&&t&&!er(e)?0:n},el=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},eu=function(e){return"INPUT"===e.tagName},ea=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},ec=function(e){if(!e.name)return!0;var t,n=e.form||Q(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("u">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=ea(t,e.form);return!o||o===e},ef=function(e){return eu(e)&&"radio"===e.type&&!ec(e)},es=function(e){var t,n,r,o,i,l,u,a=e&&Q(e),c=null==(t=a)?void 0:t.host,f=!1;if(a&&a!==e)for(f=!!(null!=(n=c)&&null!=(r=n.ownerDocument)&&r.contains(c)||null!=e&&null!=(o=e.ownerDocument)&&o.contains(e));!f&&c;)f=!!(null!=(l=c=null==(i=a=Q(c))?void 0:i.host)&&null!=(u=l.ownerDocument)&&u.contains(c));return f},ed=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},ep=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=G.call(e,"details>summary:first-of-type")?e.parentElement:e;if(G.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return ed(e)}else{if("function"==typeof r){for(var i=e;e;){var l=e.parentElement,u=Q(e);if(l&&!l.shadowRoot&&!0===r(l))return ed(e);e=e.assignedSlot?e.assignedSlot:l||u===e.ownerDocument?l:u.host}e=i}if(es(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},em=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!!G.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1},ev=function(e,t){return!(t.disabled||J(t)||eu(t)&&"hidden"===t.type||ep(t,e)||"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some(function(e){return"SUMMARY"===e.tagName})||em(t))},eh=function(e,t){return!(ef(t)||0>eo(t))&&!!ev(e,t)},eg=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!isNaN(t)||!!(t>=0)},ey=function e(t){var n=[],r=[];return t.forEach(function(t,o){var i=!!t.scopeParent,l=i?t.scopeParent:t,u=ei(l,i),a=i?e(t.candidates):l;0===u?i?n.push.apply(n,a):n.push(l):r.push({documentOrder:o,tabIndex:u,item:t,isScope:i,content:a})}),r.sort(el).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(n)},ew=function(e,t){return ey((t=t||{}).getShadowRoot?en([e],t.includeContainer,{filter:eh.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:eg}):et(e,t.includeContainer,eh.bind(null,t)))},eb=function(e,t){return(t=t||{}).getShadowRoot?en([e],t.includeContainer,{filter:ev.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):et(e,t.includeContainer,ev.bind(null,t))},ex=function(e,t){if(t=t||{},!e)throw Error("No node provided");return!1!==G.call(e,$)&&eh(t,e)};function eE(){let e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function eR(){let 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 eL(){let e=/android/i;return e.test(eE())||e.test(eR())}let eA="data-floating-ui-focusable";function eC(e){let t=e.activeElement;for(;(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function eS(e,t){if(!e||!t)return!1;let n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&f(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function eT(e){return"composedPath"in e?e.composedPath()[0]:e.target}function eM(e,t){return null!=t&&("composedPath"in e?e.composedPath().includes(t):null!=e.target&&t.contains(e.target))}function ek(e){return(null==e?void 0:e.ownerDocument)||document}function eP(e){var t;return!!e&&"combobox"===e.getAttribute("role")&&c(t=e)&&t.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function eO(e){return e?e.hasAttribute(eA)?e:e.querySelector("["+eA+"]")||e:null}function eD(e,t,n){return void 0===n&&(n=!0),e.filter(e=>{var r;return e.parentId===t&&(!n||(null==(r=e.context)?void 0:r.open))}).flatMap(t=>[t,...eD(e,t.id,n)])}function eN(e,t){var n;let r=[],o=null==(n=e.find(e=>e.id===t))?void 0:n.parentId;for(;o;){let t=e.find(e=>e.id===o);o=null==t?void 0:t.parentId,t&&(r=r.concat(t))}return r}function eI(e){e.preventDefault(),e.stopPropagation()}function ej(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var eF="u">typeof document?n.useLayoutEffect:function(){};function eW(e){let t=n.useRef(e);return eF(()=>{t.current=e}),t}let eB={...n}.useInsertionEffect||(e=>e());function eH(e){let t=n.useRef(()=>{});return eB(()=>{t.current=e}),n.useCallback(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}let eq=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function eV(e,t){let n=ew(e,eq()),r=n.length;if(0===r)return;let o=eC(ek(e)),i=n.indexOf(o);return n[-1===i?1===t?0:r-1:i+t]}function e_(e){return eV(ek(e).body,1)||e}function ez(e){return eV(ek(e).body,-1)||e}function eK(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!eS(n,r)}function eX(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}var eU=e.i(43476),eY=e.i(74080);function e$(e,t,n){let r,{reference:o,floating:i}=e,l=B(t),u=F(B(t)),a=W(u),c=I(t),f=o.x+o.width/2-i.width/2,s=o.y+o.height/2-i.height/2,d=o[a]/2-i[a]/2;switch(c){case"top":r={x:f,y:o.y-i.height};break;case"bottom":r={x:f,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:s};break;case"left":r={x:o.x-i.width,y:s};break;default:r={x:o.x,y:o.y}}let p=j(t);return p&&(r[u]+=d*("end"===p?1:-1)*(n&&"y"===l?-1:1)),r}async function eZ(e,t){var n;void 0===t&&(t={});let{x:r,y:o,platform:i,rects:l,elements:u,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:s="floating",altBoundary:d=!1,padding:p=0}=N(t,e),m=U(p),v=u[d?"floating"===s?"reference":"floating":s],h=Y(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:c,rootBoundary:f,strategy:a})),g="floating"===s?{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=Y(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:g,offsetParent:y,strategy:a}):g);return{top:(h.top-b.top+m.top)/w.y,bottom:(b.bottom-h.bottom+m.bottom)/w.y,left:(h.left-b.left+m.left)/w.x,right:(b.right-h.right+m.right)/w.x}}let eG=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,u=l.detectOverflow?l:{...l,detectOverflow:eZ},a=await (null==l.isRTL?void 0:l.isRTL(t)),c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:s}=e$(c,r,a),d=r,p=0,m={};for(let n=0;n<i.length;n++){let v=i[n];if(!v)continue;let{name:h,fn:g}=v,{x:y,y:w,data:b,reset:x}=await g({x:f,y:s,initialPlacement:r,placement:d,strategy:o,middlewareData:m,rects:c,platform:u,elements:{reference:e,floating:t}});f=null!=y?y:f,s=null!=w?w:s,m[h]={...m[h],...b},x&&p<50&&(p++,"object"==typeof x&&(x.placement&&(d=x.placement),x.rects&&(c=!0===x.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:f,y:s}=e$(c,d,a)),n=-1)}return{x:f,y:s,placement:d,strategy:o,middlewareData:m}};function eQ(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function eJ(e){return C.some(t=>e[t]>=0)}function e0(e){let t=T(...e.map(e=>e.left)),n=T(...e.map(e=>e.top));return{x:t,y:n,width:M(...e.map(e=>e.right))-t,height:M(...e.map(e=>e.bottom))-n}}let e1=new Set(["left","top"]);async function e2(e,t){let{placement:n,platform:r,elements:o}=e,i=await (null==r.isRTL?void 0:r.isRTL(o.floating)),l=I(n),u=j(n),a="y"===B(n),c=e1.has(l)?-1:1,f=i&&a?-1:1,s=N(t,e),{mainAxis:d,crossAxis:p,alignmentAxis:m}="number"==typeof s?{mainAxis:s,crossAxis:0,alignmentAxis:null}:{mainAxis:s.mainAxis||0,crossAxis:s.crossAxis||0,alignmentAxis:s.alignmentAxis};return u&&"number"==typeof m&&(p="end"===u?-1*m:m),a?{x:p*f,y:d*c}:{x:d*c,y:p*f}}function e5(e){let t=x(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=c(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,u=k(n)!==i||k(r)!==l;return u&&(n=i,r=l),{width:n,height:r,$:u}}function e3(e){return a(e)?e:e.contextElement}function e4(e){let t=e3(e);if(!c(t))return O(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=e5(t),l=(i?k(n.width):n.width)/r,u=(i?k(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),u&&Number.isFinite(u)||(u=1),{x:l,y:u}}let e9=O(0);function e8(e){let t=i(e);return w()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:e9}function e7(e,t,n,r){var o;void 0===t&&(t=!1),void 0===n&&(n=!1);let l=e.getBoundingClientRect(),u=e3(e),c=O(1);t&&(r?a(r)&&(c=e4(r)):c=e4(e));let f=(void 0===(o=n)&&(o=!1),r&&o&&r===i(u))?e8(u):O(0),s=(l.left+f.x)/c.x,d=(l.top+f.y)/c.y,p=l.width/c.x,m=l.height/c.y;if(u&&r){let e=i(u),t=a(r)?i(r):r,n=e,o=A(n);for(;o&&t!==n;){let e=e4(o),t=o.getBoundingClientRect(),r=x(o),l=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,u=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,d*=e.y,p*=e.x,m*=e.y,s+=l,d+=u,o=A(n=i(o))}}return Y({width:p,height:m,x:s,y:d})}function e6(e,t){let n=E(e).scrollLeft;return t?t.left+n:e7(l(e)).left+n}function te(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-e6(e,n),y:n.top+t.scrollTop}}function tt(e,t,n){var r;let o;if("viewport"===t||"layoutViewport"===t)o=function(e,t,n){void 0===n&&(n="viewport");let r="layoutViewport"===n,o=i(e),u=l(e),a=o.visualViewport,c=u.clientWidth,f=u.clientHeight,s=0,d=0;if(a){let e=!w()||"fixed"===t;r?e||(s=-a.offsetLeft,d=-a.offsetTop):(c=a.width,f=a.height,e&&(s=a.offsetLeft,d=a.offsetTop))}if(0>=e6(u)){let e=u.ownerDocument,t=e.body,n=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(u.clientWidth-t.clientWidth-r),i="stable both-edges"===getComputedStyle(u).scrollbarGutter?o/2:o;i<=25&&(c-=i)}return{width:c,height:f,x:s,y:d}}(e,n,t);else if("document"===t){let t,n,i,u,a,c;t=E(r=l(e)),n=r.ownerDocument.body,i=M(r.scrollWidth,r.clientWidth,n.scrollWidth,n.clientWidth),u=M(r.scrollHeight,r.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+e6(r),c=-t.scrollTop,"rtl"===x(n).direction&&(a+=M(r.clientWidth,n.clientWidth)-i),o={width:i,height:u,x:a,y:c}}else if(a(t)){let e,r,i,l,u,a;r=(e=e7(t,!0,"fixed"===n)).top+t.clientTop,i=e.left+t.clientLeft,l=e4(t),u=t.clientWidth*l.x,a=t.clientHeight*l.y,o={width:u,height:a,x:i*l.x,y:r*l.y}}else{let n=e8(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Y(o)}function tn(e){return"static"===x(e).position}function tr(e,t){if(!c(e)||"fixed"===x(e).position)return null;if(t)return t(e);let n=e.offsetParent;return l(e)===n&&(n=n.ownerDocument.body),n}function to(e,t){let n=i(e);if(p(e))return n;if(!c(e)){let t=R(e);for(;t&&!b(t);){if(a(t)&&!tn(t))return t;t=R(t)}return n}let r=tr(e,t);for(;r&&d(r)&&tn(r);)r=tr(r,t);return r&&b(r)&&tn(r)&&!g(r)?n:r||y(e)||n}let ti=async function(e){let t=this.getOffsetParent||to,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=c(t),i=l(t),u="fixed"===n,a=e7(e,!0,u,t),f={scrollLeft:0,scrollTop:0},d=O(0);if((r||!u)&&(("body"!==o(t)||s(i))&&(f=E(t)),r)){let e=e7(t,!0,u,t);d.x=e.x+t.clientLeft,d.y=e.y+t.clientTop}!r&&i&&(d.x=e6(i));let p=!i||r||u?O(0):te(i,f);return{x:a.left+f.scrollLeft-d.x-p.x,y:a.top+f.scrollTop-d.y-p.y,width:a.width,height:a.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},tl={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,u="fixed"===i,a=l(r),f=!!t&&p(t.floating);if(r===a||f&&u)return n;let d={scrollLeft:0,scrollTop:0},m=O(1),v=O(0),h=c(r);if((h||!u)&&(("body"!==o(r)||s(a))&&(d=E(r)),h)){let e=e7(r);m=e4(r),v.x=e.x+r.clientLeft,v.y=e.y+r.clientTop}let g=!a||h||u?O(0):te(a,d);return{width:n.width*m.x,height:n.height*m.y,x:n.x*m.x-d.scrollLeft*m.x+v.x+g.x,y:n.y*m.y-d.scrollTop*m.y+v.y+g.y}},getDocumentElement:l,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,l=[..."clippingAncestors"===n?p(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=L(e,[],!1).filter(e=>a(e)&&"body"!==o(e)),i=null,l="fixed"===x(e).position,u=l?R(e):e;for(;a(u)&&!b(u);){let e=x(u),t=g(u),n=i?i.position:l?"fixed":"";t||"fixed"!==n&&("absolute"!==n||"static"!==e.position)?i=e:r=r.filter(e=>e!==u),u=R(u)}return t.set(e,r),r}(t,this._c):[].concat(n),r],u=tt(t,l[0],i),c=u.top,f=u.right,s=u.bottom,d=u.left;for(let e=1;e<l.length;e++){let n=tt(t,l[e],i);c=M(n.top,c),f=T(n.right,f),s=T(n.bottom,s),d=M(n.left,d)}return{width:f-d,height:s-c,x:d,y:c}},getOffsetParent:to,getElementRects:ti,getClientRects:function(e){return e.getClientRects?Array.from(e.getClientRects()):[]},getDimensions:function(e){let{width:t,height:n}=e5(e);return{width:t,height:n}},getScale:e4,isElement:a,isRTL:function(e){return"rtl"===x(e).direction}};function tu(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let ta=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:o,y:i,placement:l,middlewareData:u}=t,a=await e2(t,e);return l===(null==(n=u.offset)?void 0:n.placement)&&null!=(r=u.arrow)&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:l}}}}},tc=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:o,platform:i}=t,{mainAxis:l=!0,crossAxis:u=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=N(e,t),f={x:n,y:r},s=await i.detectOverflow(t,c),d=B(o),p=F(d),m=f[p],v=f[d],h=(e,t)=>M(t+s["y"===e?"top":"left"],T(t,t-s["y"===e?"bottom":"right"]));l&&(m=h(p,m)),u&&(v=h(d,v));let g=a.fn({...t,[p]:m,[d]:v});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:l,[d]:u}}}}}},tf=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,o,i,l;let u,a,c,{placement:f,middlewareData:s,rects:d,initialPlacement:p,platform:m,elements:v}=t,{mainAxis:h=!0,crossAxis:g=!0,fallbackPlacements:y,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:x=!0,...E}=N(e,t);if(null!=(n=s.arrow)&&n.alignmentOffset)return{};let R=I(f),L=B(p),A=I(p)===p,C=await (null==m.isRTL?void 0:m.isRTL(v.floating)),S=y||(A||!x?[X(p)]:(u=X(p),[q(p),u,q(u)])),T="none"!==b;!y&&T&&S.push(...(a=j(p),c=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?_:V;return t?V:_;case"left":case"right":return t?z:K;default:return[]}}(I(p),"start"===b,C),a&&(c=c.map(e=>e+"-"+a),x&&(c=c.concat(c.map(q)))),c));let M=[p,...S],k=await m.detectOverflow(t,E),P=[],O=(null==(r=s.flip)?void 0:r.overflows)||[];if(h&&P.push(k[R]),g){let e=H(f,d,C);P.push(k[e[0]],k[e[1]])}if(O=[...O,{placement:f,overflows:P}],!P.every(e=>e<=0)){let e=((null==(o=s.flip)?void 0:o.index)||0)+1,t=M[e];if(t&&("alignment"!==g||L===B(t)||O.every(e=>B(e.placement)!==L||e.overflows[0]>0)))return{data:{index:e,overflows:O},reset:{placement:t}};let n=null==(i=O.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(w){case"bestFit":{let e=null==(l=O.filter(e=>{if(T){let t=B(e.placement);return t===L||"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:l[0];e&&(n=e);break}case"initialPlacement":n=p}if(f!==n)return{reset:{placement:n}}}return{}}}},ts=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=N(e,t);switch(o){case"referenceHidden":{let e=eQ(await r.detectOverflow(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:eJ(e)}}}case"escaped":{let e=eQ(await r.detectOverflow(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:eJ(e)}}}default:return{}}}}},td=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:i,platform:l,elements:u,middlewareData:a}=t,{element:c,padding:f=0}=N(e,t)||{};if(null==c)return{};let s=U(f),d={x:n,y:r},p=F(B(o)),m=W(p),v=await l.getDimensions(c),h="y"===p,g=h?"clientHeight":"clientWidth",y=i.reference[m]+i.reference[p]-d[p]-i.floating[m],w=d[p]-i.reference[p],b=await (null==l.getOffsetParent?void 0:l.getOffsetParent(c)),x=b?b[g]:0;x&&await (null==l.isElement?void 0:l.isElement(b))||(x=u.floating[g]||i.floating[m]);let E=x/2-v[m]/2-1,R=T(s[h?"top":"left"],E),L=T(s[h?"bottom":"right"],E),A=x-v[m]-L,C=x/2-v[m]/2+(y/2-w/2),S=M(R,T(C,A)),k=!a.arrow&&null!=j(o)&&C!==S&&i.reference[m]/2-(C<R?R:L)-v[m]/2<0,P=k?C<R?C-R:C-A:0;return{[p]:d[p]+P,data:{[p]:S,centerOffset:C-S-P,...k&&{alignmentOffset:P}},reset:k}}}),tp=(e,t,n)=>{let r=new Map,o=null!=n?n:{},i={...tl,...o.platform,_c:r};return eG(e,t,{...o,platform:i})};e.s(["P",0,td,"p",0,function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o,i;let{rects:l,middlewareData:u,placement:a,platform:c,elements:f}=t,{crossAxis:s=!1,alignment:d,allowedPlacements:p=S,autoAlignment:m=!0,...v}=N(e,t),h=void 0!==d||p===S?((i=d||null)?[...p.filter(e=>j(e)===i),...p.filter(e=>j(e)!==i)]:p.filter(e=>I(e)===e)).filter(e=>!i||j(e)===i||!!m&&q(e)!==e):p,g=(null==(n=u.autoPlacement)?void 0:n.index)||0,y=h[g];if(null==y)return{};if(a!==y)return{reset:{placement:h[0]}};let w=await c.detectOverflow(t,v),b=H(y,l,await (null==c.isRTL?void 0:c.isRTL(f.floating))),x=[w[I(y)],w[b[0]],w[b[1]]],E=[...(null==(r=u.autoPlacement)?void 0:r.overflows)||[],{placement:y,overflows:x}],R=h[g+1];if(R)return{data:{index:g+1,overflows:E},reset:{placement:R}};let L=E.map(e=>{let t=j(e.placement);return[e.placement,t&&s?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),A=(null==(o=L.filter(e=>e[2].slice(0,j(e[0])?2:3).every(e=>e<=0))[0])?void 0:o[0])||L[0][0];return A!==a?{data:{index:g+1,overflows:E},reset:{placement:A}}:{}}}},"n",0,function(e,t,n,r){let o;void 0===r&&(r={});let{ancestorScroll:u=!0,ancestorResize:a=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:f="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,d=e3(e),p=u||a?[...d?L(d):[],...t?L(t):[]]:[];p.forEach(e=>{u&&e.addEventListener("scroll",n),a&&e.addEventListener("resize",n)});let m=d&&f?function(e,t,n){let r,o=null,u=l(e);function a(){var e;clearTimeout(r),null==(e=o)||e.disconnect(),o=null}function c(n,i){void 0===n&&(n=!1),void 0===i&&(i=1),a();let l=e.getBoundingClientRect(),{left:f,top:s,width:d,height:p}=l;if(n||t(),!d||!p)return;let m={rootMargin:-P(s)+"px "+-P(u.clientWidth-(f+d))+"px "+-P(u.clientHeight-(s+p))+"px "+-P(f)+"px",threshold:M(0,T(1,i))||1},v=!0;function h(t){let n=t[0].intersectionRatio;if(!tu(l,e.getBoundingClientRect()))return c();if(n!==i){if(!v)return c();n?c(!1,n):r=setTimeout(()=>{c(!1,1e-7)},1e3)}v=!1}try{o=new IntersectionObserver(h,{...m,root:u.ownerDocument})}catch(e){o=new IntersectionObserver(h,m)}o.observe(e)}let f=i(e),s=()=>c(n);return f.addEventListener("resize",s),c(!0),()=>{f.removeEventListener("resize",s),a()}}(d,n,a):null,v=-1,h=null;c&&(h=new ResizeObserver(e=>{let[r]=e;r&&r.target===d&&h&&t&&(h.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),n()}),d&&!s&&h.observe(d),t&&h.observe(t));let g=s?e7(e):null;return s&&function t(){let r=e7(e);g&&!tu(g,r)&&n(),g=r,o=requestAnimationFrame(t)}(),n(),()=>{var e;p.forEach(e=>{u&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)}),null==m||m(),null==(e=h)||e.disconnect(),h=null,s&&cancelAnimationFrame(o)}},"A",0,tp,"x",0,tf,"c",0,ts,"g",0,function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){let{placement:n,elements:r,rects:o,platform:i,strategy:l}=t,{padding:u=2,x:a,y:c}=N(e,t),f=Array.from(await (null==i.getClientRects?void 0:i.getClientRects(r.reference))||[]);if(!f.length)return{};let s=function(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let o=t[e];!r||o.y-r.y>r.height/2?n.push([o]):n[n.length-1].push(o),r=o}return n.map(e=>Y(e0(e)))}(f),d=Y(e0(f)),p=U(u),m=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===s.length&&(s[0].left>s[1].right||s[1].left>s[0].right)&&null!=a&&null!=c)return s.find(e=>a>e.left-p.left&&a<e.right+p.right&&c>e.top-p.top&&c<e.bottom+p.bottom)||d;if(s.length>=2){if("y"===B(n)){let e=s[0],t=s[s.length-1],r="top"===I(n),o=e.top,i=t.bottom,l=r?e.left:t.left;return Y({x:l,y:o,width:(r?e.right:t.right)-l,height:i-o})}let e="left"===I(n),t=M(...s.map(e=>e.right)),r=T(...s.map(e=>e.left)),o=s.filter(n=>e?n.left===r:n.right===t),i=o[0].top;return Y({x:r,y:i,width:t-r,height:o[o.length-1].bottom-i})}return d}},floating:r.floating,strategy:l});return o.reference.x!==m.reference.x||o.reference.y!==m.reference.y||o.reference.width!==m.reference.width||o.reference.height!==m.reference.height?{reset:{rects:m}}:{}}}},"o",0,function(e){return void 0===e&&(e={}),{options:e,fn(t){var n,r,o,i;let{x:l,y:u,placement:a,rects:c,middlewareData:f}=t,{offset:s=0,mainAxis:d=!0,crossAxis:p=!0}=N(e,t),m={x:l,y:u},v=B(a),h=F(v),g=m[h],y=m[v],w=N(s,t),b="number"==typeof w?{mainAxis:w,crossAxis:0}:{mainAxis:null!=(n=w.mainAxis)?n:0,crossAxis:null!=(r=w.crossAxis)?r:0};if(d){let e="y"===h?"height":"width",t=c.reference[h]-c.floating[e]+b.mainAxis,n=c.reference[h]+c.reference[e]-b.mainAxis;g<t?g=t:g>n&&(g=n)}if(p){let e="y"===h?"width":"height",t=e1.has(I(a)),n=c.reference[v]-c.floating[e]+(t&&(null==(o=f.offset)?void 0:o[v])||0)+(t?0:b.crossAxis),r=c.reference[v]+c.reference[e]+(t?0:(null==(i=f.offset)?void 0:i[v])||0)-(t?b.crossAxis:0);y<n?y=n:y>r&&(y=r)}return{[h]:g,[v]:y}}}},"T",0,ta,"e",0,tc,"q",0,function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){let n,r,{placement:o,rects:i,platform:l,elements:u}=t,{apply:a=()=>{},...c}=N(e,t),f=await l.detectOverflow(t,c),s=I(o),d=j(o),p="y"===B(o),{width:m,height:v}=i.floating;"top"===s||"bottom"===s?(n=s,r=d===(await (null==l.isRTL?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(r=s,n="end"===d?"top":"bottom");let h=v-f.top-f.bottom,g=m-f.left-f.right,y=T(v-f[n],h),w=T(m-f[r],g),b=t.middlewareData.shift,x=!b,E=y,R=w;null!=b&&b.enabled.x&&(R=g),null!=b&&b.enabled.y&&(E=h),x&&!d&&(p?R=m-2*M(f.left,f.right):E=v-2*M(f.top,f.bottom)),await a({...t,availableWidth:R,availableHeight:E});let L=await l.getDimensions(u.floating);return m!==L.width||v!==L.height?{reset:{rects:!0}}:{}}}}],53760);var tm="u">typeof document?n.useLayoutEffect:function(){};function tv(e,t){let n,r,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!tv(e[r],t[r]))return!1;return!0}if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){let n=o[r];if(("_owner"!==n||!e.$$typeof)&&!tv(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function th(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tg(e,t){let n=th(e);return Math.round(t*n)/n}function ty(e){let t=n.useRef(e);return tm(()=>{t.current=e}),t}function tw(e){void 0===e&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:l,floating:u}={},transform:a=!0,whileElementsMounted:c,open:f}=e,[s,d]=n.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=n.useState(o);tv(p,o)||m(o);let[v,h]=n.useState(null),[g,y]=n.useState(null),w=n.useCallback(e=>{e!==R.current&&(R.current=e,h(e))},[]),b=n.useCallback(e=>{e!==L.current&&(L.current=e,y(e))},[]),x=l||v,E=u||g,R=n.useRef(null),L=n.useRef(null),A=n.useRef(s),C=null!=c,S=ty(c),T=ty(i),M=ty(f),k=n.useCallback(()=>{if(!R.current||!L.current)return;let e={placement:t,strategy:r,middleware:p};T.current&&(e.platform=T.current),tp(R.current,L.current,e).then(e=>{let t={...e,isPositioned:!1!==M.current};P.current&&!tv(A.current,t)&&(A.current=t,eY.flushSync(()=>{d(t)}))})},[p,t,r,T,M]);tm(()=>{!1===f&&A.current.isPositioned&&(A.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[f]);let P=n.useRef(!1);tm(()=>(P.current=!0,()=>{P.current=!1}),[]),tm(()=>{if(x&&(R.current=x),E&&(L.current=E),x&&E){if(S.current)return S.current(x,E,k);k()}},[x,E,k,S,C]);let O=n.useMemo(()=>({reference:R,floating:L,setReference:w,setFloating:b}),[w,b]),D=n.useMemo(()=>({reference:x,floating:E}),[x,E]),N=n.useMemo(()=>{let e={position:r,left:0,top:0};if(!D.floating)return e;let t=tg(D.floating,s.x),n=tg(D.floating,s.y);return a?{...e,transform:"translate("+t+"px, "+n+"px)",...th(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,a,D.floating,s.x,s.y]);return n.useMemo(()=>({...s,update:k,refs:O,elements:D,floatingStyles:N}),[s,k,O,D,N])}e.s(["P",0,(e,t)=>{let n={name:"arrow",options:e,fn(t){let{element:n,padding:r}="function"==typeof e?e(t):e;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?td({element:n.current,padding:r}).fn(t):{}:n?td({element:n,padding:r}).fn(t):{}}};return{name:n.name,fn:n.fn,options:[e,t]}},"x",0,(e,t)=>{let n=tf(e);return{name:n.name,fn:n.fn,options:[e,t]}},"c",0,(e,t)=>{let n=ts(e);return{name:n.name,fn:n.fn,options:[e,t]}},"T",0,(e,t)=>{let n=ta(e);return{name:n.name,fn:n.fn,options:[e,t]}},"e",0,(e,t)=>{let n=tc(e);return{name:n.name,fn:n.fn,options:[e,t]}},"E",0,tw],58950);let tb="active",tx="selected",tE={...n},tR=!1,tL=0,tA=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+tL++,tC=tE.useId||function(){let[e,t]=n.useState(()=>tR?tA():void 0);return eF(()=>{null==e&&t(tA())},[]),n.useEffect(()=>{tR=!0},[]),e},tS=n.forwardRef(function(e,t){let{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:l}},width:u=14,height:a=7,tipRadius:c=0,strokeWidth:f=0,staticOffset:s,stroke:d,d:p,style:{transform:m,...v}={},...h}=e,g=tC(),[y,w]=n.useState(!1);if(eF(()=>{o&&"rtl"===x(o).direction&&w(!0)},[o]),!o)return null;let[b,E]=r.split("-"),R="top"===b||"bottom"===b,L=s;(R&&null!=l&&l.x||!R&&null!=l&&l.y)&&(L=null);let A=2*f,C=A/2,S=u/2*(-(c/8)+1),T=a/2*c/4,M=!!p,k=L&&"end"===E?"bottom":"top",P=L&&"end"===E?"right":"left";L&&y&&(P="end"===E?"left":"right");let O=(null==i?void 0:i.x)!=null?L||i.x:"",D=(null==i?void 0:i.y)!=null?L||i.y:"",N=p||"M0,0 H"+u+(" L"+(u-S))+","+(a-T)+(" Q"+u/2+","+a+" "+S)+","+(a-T)+" Z",I={top:M?"rotate(180deg)":"",left:M?"rotate(90deg)":"rotate(-90deg)",bottom:M?"":"rotate(180deg)",right:M?"rotate(-90deg)":"rotate(90deg)"}[b];return(0,eU.jsxs)("svg",{...h,"aria-hidden":!0,ref:t,width:M?u:u+A,height:u,viewBox:"0 0 "+u+" "+(a>u?a:u),style:{position:"absolute",pointerEvents:"none",[P]:O,[k]:D,[b]:R||M?"100%":"calc(100% - "+A/2+"px)",transform:[I,m].filter(e=>!!e).join(" "),...v},children:[A>0&&(0,eU.jsx)("path",{clipPath:"url(#"+g+")",fill:"none",stroke:d,strokeWidth:A+ +!p,d:N}),(0,eU.jsx)("path",{stroke:A&&!p?h.fill:"none",d:N}),(0,eU.jsx)("clipPath",{id:g,children:(0,eU.jsx)("rect",{x:-C,y:C*(M?-1:1),width:u+A,height:u})})]})}),tT=n.createContext(null),tM=n.createContext(null),tk=()=>{var e;return(null==(e=n.useContext(tT))?void 0:e.id)||null};function tP(e){return"data-floating-ui-"+e}function tO(e){-1!==e.current&&(clearTimeout(e.current),e.current=-1)}let tD=tP("safe-polygon");function tN(e,t,n){if(n&&!ej(n))return 0;if("number"==typeof e)return e;if("function"==typeof e){let n=e();return"number"==typeof n?n:null==n?void 0:n[t]}return null==e?void 0:e[t]}function tI(e){return"function"==typeof e?e():e}let tj=0;function tF(e,t){void 0===t&&(t={});let{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(tj);let i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():tj=requestAnimationFrame(i)}let tW={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function tB(e){return"inert"===e?tW.inert:"aria-hidden"===e?tW["aria-hidden"]:tW.none}let tH=new WeakSet,tq={},tV=0;function t_(e,t,n){var r,i,l;let u,a,c,s,d,p,m;void 0===t&&(t=!1),void 0===n&&(n=!1);let v=((null==(r=e[0])?void 0:r.ownerDocument)||document).body;return i=e.concat(Array.from(v.querySelectorAll('[aria-live],[role="status"],output'))),l=t,u="data-floating-ui-inert",a=n?"inert":l?"aria-hidden":null,c=i.map(e=>{if(v.contains(e))return e;let t=function e(t){return t?f(t)?t.host:e(t.parentNode):null}(e);return v.contains(t)?t:null}).filter(e=>null!=e),s=new Set,d=new Set(c),p=[],tq[u]||(tq[u]=new WeakMap),m=tq[u],c.forEach(function e(t){!(!t||s.has(t))&&(s.add(t),t.parentNode&&e(t.parentNode))}),function e(t){!t||d.has(t)||[].forEach.call(t.children,t=>{if("script"!==o(t))if(s.has(t))e(t);else{let e=a?t.getAttribute(a):null,n=null!==e&&"false"!==e,r=tB(a),o=(r.get(t)||0)+1,i=(m.get(t)||0)+1;r.set(t,o),m.set(t,i),p.push(t),1===o&&n&&tH.add(t),1===i&&t.setAttribute(u,""),!n&&a&&t.setAttribute(a,"inert"===a?"":"true")}})}(v),s.clear(),tV++,()=>{p.forEach(e=>{let t=tB(a),n=(t.get(e)||0)-1,r=(m.get(e)||0)-1;t.set(e,n),m.set(e,r),n||(!tH.has(e)&&a&&e.removeAttribute(a),tH.delete(e)),r||e.removeAttribute(u)}),--tV||(tW.inert=new WeakMap,tW["aria-hidden"]=new WeakMap,tW.none=new WeakMap,tH=new WeakSet,tq={})}}let tz={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},tK=n.forwardRef(function(e,t){let[r,o]=n.useState();eF(()=>{/apple/i.test(navigator.vendor)&&o("button")},[]);let i={ref:t,tabIndex:0,role:r,"aria-hidden":!r||void 0,[tP("focus-guard")]:"",style:tz};return(0,eU.jsx)("span",{...e,...i})}),tX={clipPath:"inset(50%)",position:"fixed",top:0,left:0},tU=n.createContext(null),tY=tP("portal");function t$(e){return n.useMemo(()=>t=>{e.forEach(e=>{e&&(e.current=t)})},e)}let tZ=[];function tG(){tZ=tZ.filter(e=>{var t;return null==(t=e.deref())?void 0:t.isConnected})}function tQ(){tG();let e=tZ[tZ.length-1];return null==e?void 0:e.deref()}function tJ(e,t){var n;if(!t.current.includes("floating")&&!(null!=(n=e.getAttribute("role"))&&n.includes("dialog")))return;let r=eq(),o=eb(e,r).filter(e=>{let t=e.getAttribute("data-tabindex")||"";return ex(e,r)||e.hasAttribute("data-tabindex")&&!t.startsWith("-")}),i=e.getAttribute("tabindex");t.current.includes("floating")||0===o.length?"0"!==i&&e.setAttribute("tabindex","0"):("-1"!==i||e.hasAttribute("data-tabindex")&&"-1"!==e.getAttribute("data-tabindex"))&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}let t0=n.forwardRef(function(e,t){return(0,eU.jsx)("button",{...e,type:"button",ref:t,tabIndex:-1,style:tz})}),t1=0,t2="--floating-ui-scrollbar-width",t5=()=>{},t3=n.forwardRef(function(e,t){let{lockScroll:n=!1,...r}=e;return eF(()=>{if(n)return 1==++t1&&(t5=function(){let e=eE(),t=/iP(hone|ad|od)|iOS/.test(e)||"MacIntel"===e&&navigator.maxTouchPoints>1,n=document.body.style,r=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",o=window.innerWidth-document.documentElement.clientWidth,i=n.left?parseFloat(n.left):window.scrollX,l=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(t2,o+"px"),o&&(n[r]=o+"px"),t){var u,a;let e=(null==(u=window.visualViewport)?void 0:u.offsetLeft)||0;Object.assign(n,{position:"fixed",top:-(l-Math.floor((null==(a=window.visualViewport)?void 0:a.offsetTop)||0))+"px",left:-(i-Math.floor(e))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[r]:""}),n.removeProperty(t2),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(i,l))}}()),()=>{0==--t1&&t5()}},[n]),(0,eU.jsx)("div",{ref:t,...r,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...r.style}})}),t4={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},t9={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},t8=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 t7(e,t,n){let r=new Map,o="item"===n,i=e;if(o&&e){let{[tb]:t,[tx]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,"data-floating-ui-focusable":""},...i,...t.map(t=>{let 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;if(!(o&&[tb,tx].includes(n)))if(0===n.indexOf("on")){if(r.has(n)||r.set(n,[]),"function"==typeof i){var l;null==(l=r.get(n))||l.push(i),e[n]=function(){for(var e,t=arguments.length,o=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)}}}else e[n]=i}),e),{})}}let t6=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]),ne=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?"-":"")+e.toLowerCase());function nt(e,t){return"function"==typeof e?e(t):e}e.s(["$",0,tS,"i",0,function(e){let{context:t,children:r,disabled:i=!1,order:l=["content"],guards:u=!0,initialFocus:a=0,returnFocus:f=!0,restoreFocus:s=!1,modal:d=!0,visuallyHiddenDismiss:p=!1,closeOnFocusOut:m=!0,outsideElementsInert:v=!1,getInsideElements:h=()=>[]}=e,{open:g,onOpenChange:y,events:w,dataRef:b,elements:{domReference:x,floating:E}}=t,R=eH(()=>{var e;return null==(e=b.current.floatingContext)?void 0:e.nodeId}),L=eH(h),A="number"==typeof a&&a<0,C=eP(x)&&A,S="u">typeof HTMLElement&&"inert"in HTMLElement.prototype,T=!S||u,M=!T||S&&v,k=eW(l),P=eW(a),O=eW(f),D=n.useContext(tM),N=n.useContext(tU),I=n.useRef(null),j=n.useRef(null),F=n.useRef(!1),W=n.useRef(!1),B=n.useRef(-1),H=n.useRef(-1),q=null!=N,V=eO(E),_=eH(function(e){return void 0===e&&(e=V),e?ew(e,eq()):[]}),z=eH(e=>{let t=_(e);return k.current.map(e=>x&&"reference"===e?x:V&&"floating"===e?V:t).filter(Boolean).flat()});n.useEffect(()=>{if(i||!d)return;function e(e){if("Tab"===e.key){eS(V,eC(ek(V)))&&0===_().length&&!C&&eI(e);let t=z(),n=eT(e);"reference"===k.current[0]&&n===x&&(eI(e),e.shiftKey?tF(t[t.length-1]):tF(t[1])),"floating"===k.current[1]&&n===V&&e.shiftKey&&(eI(e),tF(t[0]))}}let t=ek(V);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[i,x,V,d,k,C,_,z]),n.useEffect(()=>{if(!i&&E)return E.addEventListener("focusin",e),()=>{E.removeEventListener("focusin",e)};function e(e){let t=eT(e),n=_().indexOf(t);-1!==n&&(B.current=n)}},[i,E,_]),n.useEffect(()=>{if(i||!m)return;function e(){W.current=!0,setTimeout(()=>{W.current=!1})}function t(e){let t=e.relatedTarget,n=e.currentTarget,r=eT(e);queueMicrotask(()=>{let o=R(),i=!(eS(x,t)||eS(E,t)||eS(t,E)||eS(null==N?void 0:N.portalNode,t)||null!=t&&t.hasAttribute(tP("focus-guard"))||D&&(eD(D.nodesRef.current,o).find(e=>{var n,r;return eS(null==(n=e.context)?void 0:n.elements.floating,t)||eS(null==(r=e.context)?void 0:r.elements.domReference,t)})||eN(D.nodesRef.current,o).find(e=>{var n,r,o;return[null==(n=e.context)?void 0:n.elements.floating,eO(null==(r=e.context)?void 0:r.elements.floating)].includes(t)||(null==(o=e.context)?void 0:o.elements.domReference)===t})));if(n===x&&V&&tJ(V,k),s&&n!==x&&!(null!=r&&r.isConnected)&&eC(ek(V))===ek(V).body){c(V)&&V.focus();let e=B.current,t=_(),n=t[e]||t[t.length-1]||V;c(n)&&n.focus()}if(b.current.insideReactTree){b.current.insideReactTree=!1;return}(C||!d)&&t&&i&&!W.current&&t!==tQ()&&(F.current=!0,y(!1,e,"focus-out"))})}let n=!!(!D&&N);function r(){tO(H),b.current.insideReactTree=!0,H.current=window.setTimeout(()=>{b.current.insideReactTree=!1})}if(E&&c(x))return x.addEventListener("focusout",t),x.addEventListener("pointerdown",e),E.addEventListener("focusout",t),n&&E.addEventListener("focusout",r,!0),()=>{x.removeEventListener("focusout",t),x.removeEventListener("pointerdown",e),E.removeEventListener("focusout",t),n&&E.removeEventListener("focusout",r,!0)}},[i,x,E,V,d,D,N,y,m,s,_,C,R,k,b]);let K=n.useRef(null),X=n.useRef(null),U=t$([K,null==N?void 0:N.beforeInsideRef]),Y=t$([X,null==N?void 0:N.afterInsideRef]);function $(e){return!i&&p&&d?(0,eU.jsx)(t0,{ref:"start"===e?I:j,onClick:e=>y(!1,e.nativeEvent),children:"string"==typeof p?p:"Dismiss"}):null}n.useEffect(()=>{var e,t;if(i||!E)return;let n=Array.from((null==N||null==(e=N.portalNode)?void 0:e.querySelectorAll("["+tP("portal")+"]"))||[]),r=[E,null==(t=(D?eN(D.nodesRef.current,R()):[]).find(e=>{var t;return eP((null==(t=e.context)?void 0:t.elements.domReference)||null)}))||null==(t=t.context)?void 0:t.elements.domReference,...n,...L(),I.current,j.current,K.current,X.current,null==N?void 0:N.beforeOutsideRef.current,null==N?void 0:N.afterOutsideRef.current,k.current.includes("reference")||C?x:null].filter(e=>null!=e),o=d||C?t_(r,!M,M):t_(r);return()=>{o()}},[i,x,E,d,k,N,C,T,M,D,R,L]),eF(()=>{if(i||!c(V))return;let e=eC(ek(V));queueMicrotask(()=>{let t=z(V),n=P.current,r=("number"==typeof n?t[n]:n.current)||V,o=eS(V,e);A||o||!g||tF(r,{preventScroll:r===V})})},[i,g,V,A,z,P]),eF(()=>{var e;if(i||!V)return;let t=ek(V);function n(e){let{reason:t,event:n,nested:r}=e;if(["hover","safe-polygon"].includes(t)&&"mouseleave"===n.type&&(F.current=!0),"outside-press"===t)if(r)F.current=!1;else if(0===n.mozInputSource&&n.isTrusted||(eL()&&n.pointerType?"click"===n.type&&1===n.buttons:0===n.detail&&!n.pointerType)||!eR().includes("jsdom/")&&(!eL()&&0===n.width&&0===n.height||eL()&&1===n.width&&1===n.height&&0===n.pressure&&0===n.detail&&"mouse"===n.pointerType||n.width<1&&n.height<1&&0===n.pressure&&0===n.detail&&"touch"===n.pointerType))F.current=!1;else{let e=!1;document.createElement("div").focus({get preventScroll(){return e=!0,!1}}),e?F.current=!1:F.current=!0}}e=eC(t),tG(),e&&"body"!==o(e)&&(tZ.push(new WeakRef(e)),tZ.length>20&&(tZ=tZ.slice(-20))),w.on("openchange",n);let r=t.createElement("span");return r.setAttribute("tabindex","-1"),r.setAttribute("aria-hidden","true"),Object.assign(r.style,tz),q&&x&&x.insertAdjacentElement("afterend",r),()=>{w.off("openchange",n);let e=eC(t),o=eS(E,e)||D&&eD(D.nodesRef.current,R(),!1).some(t=>{var n;return eS(null==(n=t.context)?void 0:n.elements.floating,e)}),i=function(){if("boolean"==typeof O.current){let e=x||tQ();return e&&e.isConnected?e:r}return O.current.current||r}();queueMicrotask(()=>{let n,l=ex(i,n=eq())?i:ew(i,n)[0]||i;O.current&&!F.current&&c(l)&&(l===e||e===t.body||o)&&l.focus({preventScroll:!0}),r.remove()})}},[i,E,V,O,b,w,D,q,x,R]),n.useEffect(()=>(queueMicrotask(()=>{F.current=!1}),()=>{queueMicrotask(tG)}),[i]),eF(()=>{if(!i&&N)return N.setFocusManagerState({modal:d,closeOnFocusOut:m,open:g,onOpenChange:y,domReference:x}),()=>{N.setFocusManagerState(null)}},[i,N,d,g,y,m,x]),eF(()=>{i||V&&tJ(V,k)},[i,V,k]);let Z=!i&&T&&(!d||!C)&&(q||d);return(0,eU.jsxs)(eU.Fragment,{children:[Z&&(0,eU.jsx)(tK,{"data-type":"inside",ref:U,onFocus:e=>{if(d){let e=z();tF("reference"===l[0]?e[0]:e[e.length-1])}else if(null!=N&&N.preserveTabOrder&&N.portalNode)if(F.current=!1,eK(e,N.portalNode)){let e=e_(x);null==e||e.focus()}else{var t;null==(t=N.beforeOutsideRef.current)||t.focus()}}}),!C&&$("start"),r,$("end"),Z&&(0,eU.jsx)(tK,{"data-type":"inside",ref:Y,onFocus:e=>{if(d)tF(z()[0]);else if(null!=N&&N.preserveTabOrder&&N.portalNode)if(m&&(F.current=!0),eK(e,N.portalNode)){let e=ez(x);null==e||e.focus()}else{var t;null==(t=N.afterOutsideRef.current)||t.focus()}}})]})},"j",0,t3,"r",0,function(e){let{children:t,id:r,root:o,preserveTabOrder:i=!0}=e,l=function(e){void 0===e&&(e={});let{id:t,root:r}=e,o=tC(),i=n.useContext(tU),[l,a]=n.useState(null),c=n.useRef(null);return eF(()=>()=>{null==l||l.remove(),queueMicrotask(()=>{c.current=null})},[l]),eF(()=>{if(!o||c.current)return;let e=t?document.getElementById(t):null;if(!e)return;let n=document.createElement("div");n.id=o,n.setAttribute(tY,""),e.appendChild(n),c.current=n,a(n)},[t,o]),eF(()=>{if(null===r||!o||c.current)return;let e=r||(null==i?void 0:i.portalNode);e&&!u(e)&&(e=e.current),e=e||document.body;let n=null;t&&((n=document.createElement("div")).id=t,e.appendChild(n));let l=document.createElement("div");l.id=o,l.setAttribute(tY,""),(e=n||e).appendChild(l),c.current=l,a(l)},[t,r,o,i]),l}({id:r,root:o}),[a,c]=n.useState(null),f=n.useRef(null),s=n.useRef(null),d=n.useRef(null),p=n.useRef(null),m=null==a?void 0:a.modal,v=null==a?void 0:a.open,h=!!a&&!a.modal&&a.open&&i&&!!(o||l);return n.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){l&&eK(e)&&("focusin"===e.type?eX:function(e){ew(e,eq()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})})(l)}},[l,i,m]),n.useEffect(()=>{!l||v||eX(l)},[v,l]),(0,eU.jsxs)(tU.Provider,{value:n.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:f,afterOutsideRef:s,beforeInsideRef:d,afterInsideRef:p,portalNode:l,setFocusManagerState:c}),[i,l]),children:[h&&l&&(0,eU.jsx)(tK,{"data-type":"outside",ref:f,onFocus:e=>{if(eK(e,l)){var t;null==(t=d.current)||t.focus()}else{let e=ez(a?a.domReference:null);null==e||e.focus()}}}),h&&l&&(0,eU.jsx)("span",{"aria-owns":l.id,style:tX}),l&&eY.createPortal(t,l),h&&l&&(0,eU.jsx)(tK,{"data-type":"outside",ref:s,onFocus:e=>{if(eK(e,l)){var t;null==(t=p.current)||t.focus()}else{let t=e_(a?a.domReference:null);null==t||t.focus(),(null==a?void 0:a.closeOnFocusOut)&&(null==a||a.onOpenChange(!1,e.nativeEvent,"focus-out"))}}})]})},"H",0,function(e,t){void 0===t&&(t={});let{open:r,onOpenChange:o,elements:i,dataRef:l}=e,{enabled:u=!0,escapeKey:f=!0,outsidePress:s=!0,outsidePressEvent:d="pointerdown",referencePress:p=!1,referencePressEvent:m="pointerdown",ancestorScroll:v=!1,bubbles:h,capture:g}=t,y=n.useContext(tM),E=eH("function"==typeof s?s:()=>!1),A="function"==typeof s?E:s,C=n.useRef(!1),{escapeKey:S,outsidePress:T}=t8(h),{escapeKey:M,outsidePress:k}=t8(g),P=n.useRef(!1),O=eH(e=>{var t;if(!r||!u||!f||"Escape"!==e.key||P.current)return;let n=null==(t=l.current.floatingContext)?void 0:t.nodeId,i=y?eD(y.nodesRef.current,n):[];if(!S&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;if(null!=(n=t.context)&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}o(!1,"nativeEvent"in e?e.nativeEvent:e,"escape-key")}),D=eH(e=>{var t;let n=()=>{var t;O(e),null==(t=eT(e))||t.removeEventListener("keydown",n)};null==(t=eT(e))||t.addEventListener("keydown",n)}),N=eH(e=>{var t;let n=l.current.insideReactTree;l.current.insideReactTree=!1;let r=C.current;if(C.current=!1,"click"===d&&r||n||"function"==typeof A&&!A(e))return;let u=eT(e),f="["+tP("inert")+"]",s=ek(i.floating).querySelectorAll(f),p=a(u)?u:null;for(;p&&!b(p);){let e=R(p);if(b(e)||!a(e))break;p=e}if(s.length&&a(u)&&!u.matches("html,body")&&!eS(u,i.floating)&&Array.from(s).every(e=>!eS(p,e)))return;if(c(u)&&F){let t=b(u),n=x(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,a=i&&u.clientHeight>0&&u.scrollHeight>u.clientHeight,c="rtl"===n.direction,f=a&&(c?e.offsetX<=u.offsetWidth-u.clientWidth:e.offsetX>u.clientWidth),s=l&&e.offsetY>u.clientHeight;if(f||s)return}let m=null==(t=l.current.floatingContext)?void 0:t.nodeId,v=y&&eD(y.nodesRef.current,m).some(t=>{var n;return eM(e,null==(n=t.context)?void 0:n.elements.floating)});if(eM(e,i.floating)||eM(e,i.domReference)||v)return;let h=y?eD(y.nodesRef.current,m):[];if(h.length>0){let e=!0;if(h.forEach(t=>{var n;if(null!=(n=t.context)&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}o(!1,e,"outside-press")}),I=eH(e=>{var t;let n=()=>{var t;N(e),null==(t=eT(e))||t.removeEventListener(d,n)};null==(t=eT(e))||t.addEventListener(d,n)});n.useEffect(()=>{if(!r||!u)return;l.current.__escapeKeyBubbles=S,l.current.__outsidePressBubbles=T;let e=-1;function t(e){o(!1,e,"ancestor-scroll")}function n(){window.clearTimeout(e),P.current=!0}function c(){e=window.setTimeout(()=>{P.current=!1},5*!!w())}let s=ek(i.floating);f&&(s.addEventListener("keydown",M?D:O,M),s.addEventListener("compositionstart",n),s.addEventListener("compositionend",c)),A&&s.addEventListener(d,k?I:N,k);let p=[];return v&&(a(i.domReference)&&(p=L(i.domReference)),a(i.floating)&&(p=p.concat(L(i.floating))),!a(i.reference)&&i.reference&&i.reference.contextElement&&(p=p.concat(L(i.reference.contextElement)))),(p=p.filter(e=>{var t;return e!==(null==(t=s.defaultView)?void 0:t.visualViewport)})).forEach(e=>{e.addEventListener("scroll",t)}),()=>{f&&(s.removeEventListener("keydown",M?D:O,M),s.removeEventListener("compositionstart",n),s.removeEventListener("compositionend",c)),A&&s.removeEventListener(d,k?I:N,k),p.forEach(e=>{e.removeEventListener("scroll",t)}),window.clearTimeout(e)}},[l,i,f,A,d,r,o,v,u,S,T,O,M,D,N,k,I]),n.useEffect(()=>{l.current.insideReactTree=!1},[l,A,d]);let j=n.useMemo(()=>({onKeyDown:O,...p&&{[t4[m]]:e=>{o(!1,e.nativeEvent,"reference-press")},..."click"!==m&&{onClick(e){o(!1,e.nativeEvent,"reference-press")}}}}),[O,o,p,m]),F=n.useMemo(()=>{function e(e){0===e.button&&(C.current=!0)}return{onKeyDown:O,onMouseDown:e,onMouseUp:e,[t9[d]]:()=>{l.current.insideReactTree=!0}}},[O,d,l]);return n.useMemo(()=>u?{reference:j,floating:F}:{},[u,j,F])},"E",0,function(e){var t,r;let{elements:o,...i}=void 0===e?{}:e,{nodeId:l}=i,u=function(e){let{open:t=!1,onOpenChange:r,elements:o}=e,i=tC(),l=n.useRef({}),[u]=n.useState(()=>{let e;return e=new Map,{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}),a=null!=tk(),[c,f]=n.useState(o.reference),s=eH((e,t,n)=>{l.current.openEvent=e?t:void 0,u.emit("openchange",{open:e,event:t,reason:n,nested:a}),null==r||r(e,t,n)}),d=n.useMemo(()=>({setPositionReference:f}),[]),p=n.useMemo(()=>({reference:c||o.reference||null,floating:o.floating||null,domReference:o.reference}),[c,o.reference,o.floating]);return n.useMemo(()=>({dataRef:l,open:t,onOpenChange:s,elements:p,events:u,floatingId:i,refs:d}),[t,s,p,u,i,d])}({...i,elements:{reference:null!=(t=null==o?void 0:o.reference)?t:null,floating:null!=(r=null==o?void 0:o.floating)?r:null}}),c=i.rootContext||u,f=c.elements,[s,d]=n.useState(null),[p,m]=n.useState(null),v=(null==f?void 0:f.domReference)||s,h=n.useRef(null),g=n.useContext(tM);eF(()=>{v&&(h.current=v)},[v]);let y=tw({...i,elements:{...f,...p&&{reference:p}}}),w=n.useCallback(e=>{let t=a(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;m(t),y.refs.setReference(t)},[y.refs]),b=n.useCallback(e=>{(a(e)||null===e)&&(h.current=e,d(e)),(a(y.refs.reference.current)||null===y.refs.reference.current||null!==e&&!a(e))&&y.refs.setReference(e)},[y.refs]),x=n.useMemo(()=>({...y.refs,setReference:b,setPositionReference:w,domReference:h}),[y.refs,b,w]),E=n.useMemo(()=>({...y.elements,domReference:v}),[y.elements,v]),R=n.useMemo(()=>({...y,...c,refs:x,elements:E,nodeId:l}),[y,x,E,l,c]);return eF(()=>{c.dataRef.current.floatingContext=R;let e=null==g?void 0:g.nodesRef.current.find(e=>e.id===l);e&&(e.context=R)}),n.useMemo(()=>({...y,context:R,refs:x,elements:E}),[y,x,E,R])},"V",0,function(e,t){void 0===t&&(t={});let{open:r,onOpenChange:o,dataRef:i,events:l,elements:u}=e,{enabled:c=!0,delay:f=0,handleClose:s=null,mouseOnly:d=!1,restMs:p=0,move:m=!0}=t,v=n.useContext(tM),h=tk(),g=eW(s),y=eW(f),w=eW(r),b=eW(p),x=n.useRef(),E=n.useRef(-1),R=n.useRef(),L=n.useRef(-1),A=n.useRef(!0),C=n.useRef(!1),S=n.useRef(()=>{}),T=n.useRef(!1),M=eH(()=>{var e;let t=null==(e=i.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t});n.useEffect(()=>{if(c)return l.on("openchange",e),()=>{l.off("openchange",e)};function e(e){let{open:t}=e;t||(tO(E),tO(L),A.current=!0,T.current=!1)}},[c,l]),n.useEffect(()=>{if(!c||!g.current||!r)return;function e(e){M()&&o(!1,e,"hover")}let t=ek(u.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[u.floating,r,o,c,g,M]);let k=n.useCallback(function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");let r=tN(y.current,"close",x.current);r&&!R.current?(tO(E),E.current=window.setTimeout(()=>o(!1,e,n),r)):t&&(tO(E),o(!1,e,n))},[y,o]),P=eH(()=>{S.current(),R.current=void 0}),O=eH(()=>{if(C.current){let e=ek(u.floating).body;e.style.pointerEvents="",e.removeAttribute(tD),C.current=!1}}),D=eH(()=>!!i.current.openEvent&&["click","mousedown"].includes(i.current.openEvent.type));n.useEffect(()=>{if(c&&a(u.domReference)){let o=u.domReference,i=u.floating;return r&&o.addEventListener("mouseleave",n),m&&o.addEventListener("mousemove",e,{once:!0}),o.addEventListener("mouseenter",e),o.addEventListener("mouseleave",t),i&&(i.addEventListener("mouseleave",n),i.addEventListener("mouseenter",l),i.addEventListener("mouseleave",f)),()=>{r&&o.removeEventListener("mouseleave",n),m&&o.removeEventListener("mousemove",e),o.removeEventListener("mouseenter",e),o.removeEventListener("mouseleave",t),i&&(i.removeEventListener("mouseleave",n),i.removeEventListener("mouseenter",l),i.removeEventListener("mouseleave",f))}}function e(e){if(tO(E),A.current=!1,d&&!ej(x.current)||tI(b.current)>0&&!tN(y.current,"open"))return;let t=tN(y.current,"open",x.current);t?E.current=window.setTimeout(()=>{w.current||o(!0,e,"hover")},t):r||o(!0,e,"hover")}function t(e){if(D())return void O();S.current();let t=ek(u.floating);if(tO(L),T.current=!1,g.current&&i.current.floatingContext){r||tO(E),R.current=g.current({...i.current.floatingContext,tree:v,x:e.clientX,y:e.clientY,onClose(){O(),P(),D()||k(e,!0,"safe-polygon")}});let n=R.current;t.addEventListener("mousemove",n),S.current=()=>{t.removeEventListener("mousemove",n)};return}"touch"===x.current&&eS(u.floating,e.relatedTarget)||k(e)}function n(e){D()||i.current.floatingContext&&(null==g.current||g.current({...i.current.floatingContext,tree:v,x:e.clientX,y:e.clientY,onClose(){O(),P(),D()||k(e)}})(e))}function l(){tO(E)}function f(e){D()||k(e,!1)}},[u,c,e,d,m,k,P,O,o,r,w,v,y,g,i,D,b]),eF(()=>{var e,t;if(c&&r&&null!=(e=g.current)&&null!=(e=e.__options)&&e.blockPointerEvents&&M()){C.current=!0;let e=u.floating;if(a(u.domReference)&&e){let n=ek(u.floating).body;n.setAttribute(tD,"");let r=u.domReference,o=null==v||null==(t=v.nodesRef.current.find(e=>e.id===h))||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,h,u,v,g,M]),eF(()=>{r||(x.current=void 0,T.current=!1,P(),O())},[r,P,O]),n.useEffect(()=>()=>{P(),tO(E),tO(L),O()},[c,u.domReference,P,O]);let N=n.useMemo(()=>{function e(e){x.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function n(){A.current||w.current||o(!0,t,"hover")}d&&!ej(x.current)||r||0===tI(b.current)||T.current&&e.movementX**2+e.movementY**2<2||(tO(L),"touch"===x.current?n():(T.current=!0,L.current=window.setTimeout(n,tI(b.current))))}}},[d,o,r,w,b]);return n.useMemo(()=>c?{reference:N}:{},[c,N])},"t",0,function(e){void 0===e&&(e=[]);let t=e.map(e=>null==e?void 0:e.reference),r=e.map(e=>null==e?void 0:e.floating),o=e.map(e=>null==e?void 0:e.item),i=n.useCallback(t=>t7(t,e,"reference"),t),l=n.useCallback(t=>t7(t,e,"floating"),r),u=n.useCallback(t=>t7(t,e,"item"),o);return n.useMemo(()=>({getReferenceProps:i,getFloatingProps:l,getItemProps:u}),[i,l,u])},"_",0,function(e){let t=n.useRef(void 0),r=n.useCallback(t=>{let n=e.map(e=>{if(null!=e){if("function"==typeof e){let n=e(t);return"function"==typeof n?n:()=>{e(null)}}return e.current=t,()=>{e.current=null}}});return()=>{n.forEach(e=>null==e?void 0:e())}},e);return n.useMemo(()=>e.every(e=>null==e)?null:e=>{t.current&&(t.current(),t.current=void 0),null!=e&&(t.current=r(e))},e)},"M",0,function(e,t){var r,o;void 0===t&&(t={});let{open:i,elements:l,floatingId:u}=e,{enabled:a=!0,role:c="dialog"}=t,f=tC(),s=(null==(r=l.domReference)?void 0:r.id)||f,d=n.useMemo(()=>{var e;return(null==(e=eO(l.floating))?void 0:e.id)||u},[l.floating,u]),p=null!=(o=t6.get(c))?o:c,m=null!=tk(),v=n.useMemo(()=>"tooltip"===p||"label"===c?{["aria-"+("label"===c?"labelledby":"describedby")]:i?d:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":"alertdialog"===p?"dialog":p,"aria-controls":i?d:void 0,..."listbox"===p&&{role:"combobox"},..."menu"===p&&{id:s},..."menu"===p&&m&&{role:"menuitem"},..."select"===c&&{"aria-autocomplete":"none"},..."combobox"===c&&{"aria-autocomplete":"list"}},[p,d,m,i,s,c]),h=n.useMemo(()=>{let e={id:d,...p&&{role:p}};return"tooltip"===p||"label"===c?e:{...e,..."menu"===p&&{"aria-labelledby":s}}},[p,d,s,c]),g=n.useCallback(e=>{let{active:t,selected:n}=e,r={role:"option",...t&&{id:d+"-fui-option"}};switch(c){case"select":case"combobox":return{...r,"aria-selected":n}}return{}},[d,c]);return n.useMemo(()=>a?{reference:v,floating:h,item:g}:{},[a,v,h,g])},"z",0,function(e,t){void 0===t&&(t={});let{initial:r={opacity:0},open:o,close:i,common:l,duration:u=250}=t,a=e.placement,c=a.split("-")[0],f=n.useMemo(()=>({side:c,placement:a}),[c,a]),s="number"==typeof u,d=(s?u:u.open)||0,p=(s?u:u.close)||0,[m,v]=n.useState(()=>({...nt(l,f),...nt(r,f)})),{isMounted:h,status:g}=function(e,t){void 0===t&&(t={});let{open:r,elements:{floating:o}}=e,{duration:i=250}=t,l=("number"==typeof i?i:i.close)||0,[u,a]=n.useState("unmounted"),c=function(e,t){let[r,o]=n.useState(e);return e&&!r&&o(!0),n.useEffect(()=>{if(!e&&r){let e=setTimeout(()=>o(!1),t);return()=>clearTimeout(e)}},[e,r,t]),r}(r,l);return c||"close"!==u||a("unmounted"),eF(()=>{if(o){if(r){a("initial");let e=requestAnimationFrame(()=>{eY.flushSync(()=>{a("open")})});return()=>{cancelAnimationFrame(e)}}a("close")}},[r,o]),{isMounted:c,status:u}}(e,{duration:u}),y=eW(r),w=eW(o),b=eW(i),x=eW(l);return eF(()=>{let e=nt(y.current,f),t=nt(b.current,f),n=nt(x.current,f),r=nt(w.current,f)||Object.keys(e).reduce((e,t)=>(e[t]="",e),{});if("initial"===g&&v(t=>({transitionProperty:t.transitionProperty,...n,...e})),"open"===g&&v({transitionProperty:Object.keys(r).map(ne).join(","),transitionDuration:d+"ms",...n,...r}),"close"===g){let r=t||e;v({transitionProperty:Object.keys(r).map(ne).join(","),transitionDuration:p+"ms",...n,...r})}},[p,b,y,w,x,d,g,f]),{isMounted:h,styles:m}}],43489)}]);