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