(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,996972,e=>{"use strict";var t='input:not([inert]):not([inert] *),select:not([inert]):not([inert] *),textarea:not([inert]):not([inert] *),a[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] *)',n="u"typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=i(window.CSS.escape(e.name));else try{t=i(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=g(t,e.form);return!o||o===e},p=function(e){return m(e)&&"radio"===e.type&&!h(e)},y=function(e){var t,n,i,o,l,a,f,u=e&&r(e),s=null==(t=u)?void 0:t.host,c=!1;if(u&&u!==e)for(c=!!(null!=(n=s)&&null!=(i=n.ownerDocument)&&i.contains(s)||null!=e&&null!=(o=e.ownerDocument)&&o.contains(e));!c&&s;)c=!!(null!=(a=s=null==(l=u=r(s))?void 0:l.host)&&null!=(f=a.ownerDocument)&&f.contains(s));return c},w=function(e){var t=e.getBoundingClientRect(),n=t.width,i=t.height;return 0===n&&0===i},v=function(e,t){var n=t.displayCheck,o=t.getShadowRoot;if("full-native"===n&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(e).visibility)return!0;var l=i.call(e,"details>summary:first-of-type")?e.parentElement:e;if(i.call(l,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return w(e)}else{if("function"==typeof o){for(var a=e;e;){var f=e.parentElement,u=r(e);if(f&&!f.shadowRoot&&!0===o(f))return w(e);e=e.assignedSlot?e.assignedSlot:f||u===e.ownerDocument?f:u.host}e=a}if(y(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},x=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;ns(t))&&!!b(e,t)},R=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!isNaN(t)||!!(t>=0)},S=function(e){var t=[],n=[];return e.forEach(function(e,i){var r=!!e.scopeParent,o=r?e.scopeParent:e,l=c(o,r),a=r?S(e.candidates):o;0===l?r?t.push.apply(t,a):t.push(o):n.push({documentOrder:i,tabIndex:l,item:e,isScope:r,content:a})}),n.sort(d).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},A=function(e,t){return S((t=t||{}).getShadowRoot?f([e],t.includeContainer,{filter:E.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:R}):a(e,t.includeContainer,E.bind(null,t)))},T=function(e,t){return(t=t||{}).getShadowRoot?f([e],t.includeContainer,{filter:b.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):a(e,t.includeContainer,b.bind(null,t))},L=function(e,n){if(n=n||{},!e)throw Error("No node provided");return!1!==i.call(e,t)&&E(n,e)};e.s(["focusable",()=>T,"isTabbable",()=>L,"tabbable",()=>A])},556938,641645,278928,e=>{"use strict";let t=["top","right","bottom","left"],n=t.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]),i=Math.min,r=Math.max,o=Math.round,l=Math.floor,a=e=>({x:e,y:e}),f={left:"right",right:"left",bottom:"top",top:"bottom"};function u(e,t,n){return r(e,i(t,n))}function s(e,t){return"function"==typeof e?e(t):e}function c(e){return e.split("-")[0]}function d(e){return e.split("-")[1]}function m(e){return"x"===e?"y":"x"}function g(e){return"y"===e?"height":"width"}function h(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function p(e){return m(h(e))}function y(e,t,n){void 0===n&&(n=!1);let i=d(e),r=p(e),o=g(r),l="x"===r?i===(n?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=A(l)),[l,A(l)]}function w(e){let t=A(e);return[v(e),t,v(t)]}function v(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let x=["left","right"],b=["right","left"],E=["top","bottom"],R=["bottom","top"];function S(e,t,n,i){let r=d(e),o=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?b:x;return t?x:b;case"left":case"right":return t?E:R;default:return[]}}(c(e),"start"===n,i);return r&&(o=o.map(e=>e+"-"+r),t&&(o=o.concat(o.map(v)))),o}function A(e){let t=c(e);return f[t]+e.slice(t.length)}function T(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function L(e){let{x:t,y:n,width:i,height:r}=e;return{width:i,height:r,top:n,left:t,right:t+i,bottom:n+r,x:t,y:n}}function C(e,t,n){let i,{reference:r,floating:o}=e,l=h(t),a=p(t),f=g(a),u=c(t),s="y"===l,m=r.x+r.width/2-o.width/2,y=r.y+r.height/2-o.height/2,w=r[f]/2-o[f]/2;switch(u){case"top":i={x:m,y:r.y-o.height};break;case"bottom":i={x:m,y:r.y+r.height};break;case"right":i={x:r.x+r.width,y:y};break;case"left":i={x:r.x-o.width,y:y};break;default:i={x:r.x,y:r.y}}switch(d(t)){case"start":i[a]-=w*(n&&s?-1:1);break;case"end":i[a]+=w*(n&&s?-1:1)}return i}async function O(e,t){var n;void 0===t&&(t={});let{x:i,y:r,platform:o,rects:l,elements:a,strategy:f}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:m=!1,padding:g=0}=s(t,e),h=T(g),p=a[m?"floating"===d?"reference":"floating":d],y=L(await o.getClippingRect({element:null==(n=await (null==o.isElement?void 0:o.isElement(p)))||n?p:p.contextElement||await (null==o.getDocumentElement?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:f})),w="floating"===d?{x:i,y:r,width:l.floating.width,height:l.floating.height}:l.reference,v=await (null==o.getOffsetParent?void 0:o.getOffsetParent(a.floating)),x=await (null==o.isElement?void 0:o.isElement(v))&&await (null==o.getScale?void 0:o.getScale(v))||{x:1,y:1},b=L(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:v,strategy:f}):w);return{top:(y.top-b.top+h.top)/x.y,bottom:(b.bottom-y.bottom+h.bottom)/x.y,left:(y.left-b.left+h.left)/x.x,right:(b.right-y.right+h.right)/x.x}}e.s(["clamp",()=>u,"createCoords",()=>a,"evaluate",()=>s,"floor",()=>l,"getAlignment",()=>d,"getAlignmentAxis",()=>p,"getAlignmentSides",()=>y,"getAxisLength",()=>g,"getExpandedPlacements",()=>w,"getOppositeAlignmentPlacement",()=>v,"getOppositeAxis",()=>m,"getOppositeAxisPlacements",()=>S,"getOppositePlacement",()=>A,"getPaddingObject",()=>T,"getSide",()=>c,"getSideAxis",()=>h,"max",()=>r,"min",()=>i,"placements",()=>n,"rectToClientRect",()=>L,"round",()=>o,"sides",()=>t],641645);let P=async(e,t,n)=>{let{placement:i="bottom",strategy:r="absolute",middleware:o=[],platform:l}=n,a=l.detectOverflow?l:{...l,detectOverflow:O},f=await (null==l.isRTL?void 0:l.isRTL(t)),u=await l.getElementRects({reference:e,floating:t,strategy:r}),{x:s,y:c}=C(u,i,f),d=i,m=0,g={};for(let n=0;ne[t]>=0)}function k(e){let t=i(...e.map(e=>e.left)),n=i(...e.map(e=>e.top));return{x:t,y:n,width:r(...e.map(e=>e.right))-t,height:r(...e.map(e=>e.bottom))-n}}let M=new Set(["left","top"]);async function W(e,t){let{placement:n,platform:i,elements:r}=e,o=await (null==i.isRTL?void 0:i.isRTL(r.floating)),l=c(n),a=d(n),f="y"===h(n),u=M.has(l)?-1:1,m=o&&f?-1:1,g=s(t,e),{mainAxis:p,crossAxis:y,alignmentAxis:w}="number"==typeof g?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return a&&"number"==typeof w&&(y="end"===a?-1*w:w),f?{x:y*m,y:p*u}:{x:p*u,y:y*m}}var F=e.i(92615);function H(e){let t=(0,F.getComputedStyle)(e),n=parseFloat(t.width)||0,i=parseFloat(t.height)||0,r=(0,F.isHTMLElement)(e),l=r?e.offsetWidth:n,a=r?e.offsetHeight:i,f=o(n)!==l||o(i)!==a;return f&&(n=l,i=a),{width:n,height:i,$:f}}function I(e){return(0,F.isElement)(e)?e:e.contextElement}function B(e){let t=I(e);if(!(0,F.isHTMLElement)(t))return a(1);let n=t.getBoundingClientRect(),{width:i,height:r,$:l}=H(t),f=(l?o(n.width):n.width)/i,u=(l?o(n.height):n.height)/r;return f&&Number.isFinite(f)||(f=1),u&&Number.isFinite(u)||(u=1),{x:f,y:u}}let V=a(0);function z(e){let t=(0,F.getWindow)(e);return(0,F.isWebKit)()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:V}function U(e,t,n,i){var r;void 0===t&&(t=!1),void 0===n&&(n=!1);let o=e.getBoundingClientRect(),l=I(e),f=a(1);t&&(i?(0,F.isElement)(i)&&(f=B(i)):f=B(e));let u=(void 0===(r=n)&&(r=!1),i&&(!r||i===(0,F.getWindow)(l))&&r)?z(l):a(0),s=(o.left+u.x)/f.x,c=(o.top+u.y)/f.y,d=o.width/f.x,m=o.height/f.y;if(l){let e=(0,F.getWindow)(l),t=i&&(0,F.isElement)(i)?(0,F.getWindow)(i):i,n=e,r=(0,F.getFrameElement)(n);for(;r&&i&&t!==n;){let e=B(r),t=r.getBoundingClientRect(),i=(0,F.getComputedStyle)(r),o=t.left+(r.clientLeft+parseFloat(i.paddingLeft))*e.x,l=t.top+(r.clientTop+parseFloat(i.paddingTop))*e.y;s*=e.x,c*=e.y,d*=e.x,m*=e.y,s+=o,c+=l,n=(0,F.getWindow)(r),r=(0,F.getFrameElement)(n)}}return L({width:d,height:m,x:s,y:c})}function j(e,t){let n=(0,F.getNodeScroll)(e).scrollLeft;return t?t.left+n:U((0,F.getDocumentElement)(e)).left+n}function $(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-j(e,n),y:n.top+t.scrollTop}}function q(e,t,n){var i;let o;if("viewport"===t)o=function(e,t){let n=(0,F.getWindow)(e),i=(0,F.getDocumentElement)(e),r=n.visualViewport,o=i.clientWidth,l=i.clientHeight,a=0,f=0;if(r){o=r.width,l=r.height;let e=(0,F.isWebKit)();(!e||e&&"fixed"===t)&&(a=r.offsetLeft,f=r.offsetTop)}let u=j(i);if(u<=0){let e=i.ownerDocument,t=e.body,n=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,l=Math.abs(i.clientWidth-t.clientWidth-r);l<=25&&(o-=l)}else u<=25&&(o+=u);return{width:o,height:l,x:a,y:f}}(e,n);else if("document"===t){let t,n,l,a,f,u,s;i=(0,F.getDocumentElement)(e),t=(0,F.getDocumentElement)(i),n=(0,F.getNodeScroll)(i),l=i.ownerDocument.body,a=r(t.scrollWidth,t.clientWidth,l.scrollWidth,l.clientWidth),f=r(t.scrollHeight,t.clientHeight,l.scrollHeight,l.clientHeight),u=-n.scrollLeft+j(i),s=-n.scrollTop,"rtl"===(0,F.getComputedStyle)(l).direction&&(u+=r(t.clientWidth,l.clientWidth)-a),o={width:a,height:f,x:u,y:s}}else if((0,F.isElement)(t)){let e,i,r,l,f,u;i=(e=U(t,!0,"fixed"===n)).top+t.clientTop,r=e.left+t.clientLeft,l=(0,F.isHTMLElement)(t)?B(t):a(1),f=t.clientWidth*l.x,u=t.clientHeight*l.y,o={width:f,height:u,x:r*l.x,y:i*l.y}}else{let n=z(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return L(o)}function K(e){return"static"===(0,F.getComputedStyle)(e).position}function _(e,t){if(!(0,F.isHTMLElement)(e)||"fixed"===(0,F.getComputedStyle)(e).position)return null;if(t)return t(e);let n=e.offsetParent;return(0,F.getDocumentElement)(e)===n&&(n=n.ownerDocument.body),n}function G(e,t){let n=(0,F.getWindow)(e);if((0,F.isTopLayer)(e))return n;if(!(0,F.isHTMLElement)(e)){let t=(0,F.getParentNode)(e);for(;t&&!(0,F.isLastTraversableNode)(t);){if((0,F.isElement)(t)&&!K(t))return t;t=(0,F.getParentNode)(t)}return n}let i=_(e,t);for(;i&&(0,F.isTableElement)(i)&&K(i);)i=_(i,t);return i&&(0,F.isLastTraversableNode)(i)&&K(i)&&!(0,F.isContainingBlock)(i)?n:i||(0,F.getContainingBlock)(e)||n}let X=async function(e){let t=this.getOffsetParent||G,n=this.getDimensions,i=await n(e.floating);return{reference:function(e,t,n){let i=(0,F.isHTMLElement)(t),r=(0,F.getDocumentElement)(t),o="fixed"===n,l=U(e,!0,o,t),f={scrollLeft:0,scrollTop:0},u=a(0);if(i||!i&&!o)if(("body"!==(0,F.getNodeName)(t)||(0,F.isOverflowElement)(r))&&(f=(0,F.getNodeScroll)(t)),i){let e=U(t,!0,o,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}else r&&(u.x=j(r));o&&!i&&r&&(u.x=j(r));let s=!r||i||o?a(0):$(r,f);return{x:l.left+f.scrollLeft-u.x-s.x,y:l.top+f.scrollTop-u.y-s.y,width:l.width,height:l.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},Y={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:i,strategy:r}=e,o="fixed"===r,l=(0,F.getDocumentElement)(i),f=!!t&&(0,F.isTopLayer)(t.floating);if(i===l||f&&o)return n;let u={scrollLeft:0,scrollTop:0},s=a(1),c=a(0),d=(0,F.isHTMLElement)(i);if((d||!d&&!o)&&(("body"!==(0,F.getNodeName)(i)||(0,F.isOverflowElement)(l))&&(u=(0,F.getNodeScroll)(i)),d)){let e=U(i);s=B(i),c.x=e.x+i.clientLeft,c.y=e.y+i.clientTop}let m=!l||d||o?a(0):$(l,u);return{width:n.width*s.x,height:n.height*s.y,x:n.x*s.x-u.scrollLeft*s.x+c.x+m.x,y:n.y*s.y-u.scrollTop*s.y+c.y+m.y}},getDocumentElement:F.getDocumentElement,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:l}=e,a=[..."clippingAncestors"===n?(0,F.isTopLayer)(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let i=(0,F.getOverflowAncestors)(e,[],!1).filter(e=>(0,F.isElement)(e)&&"body"!==(0,F.getNodeName)(e)),r=null,o="fixed"===(0,F.getComputedStyle)(e).position,l=o?(0,F.getParentNode)(e):e;for(;(0,F.isElement)(l)&&!(0,F.isLastTraversableNode)(l);){let t=(0,F.getComputedStyle)(l),n=(0,F.isContainingBlock)(l);n||"fixed"!==t.position||(r=null),(o?n||r:!(!n&&"static"===t.position&&r&&("absolute"===r.position||"fixed"===r.position)||(0,F.isOverflowElement)(l)&&!n&&function e(t,n){let i=(0,F.getParentNode)(t);return!(i===n||!(0,F.isElement)(i)||(0,F.isLastTraversableNode)(i))&&("fixed"===(0,F.getComputedStyle)(i).position||e(i,n))}(e,l)))?r=t:i=i.filter(e=>e!==l),l=(0,F.getParentNode)(l)}return t.set(e,i),i}(t,this._c):[].concat(n),o],f=q(t,a[0],l),u=f.top,s=f.right,c=f.bottom,d=f.left;for(let e=1;e{f&&e.addEventListener("scroll",n,{passive:!0}),u&&e.addEventListener("resize",n)});let h=m&&c?function(e,t){let n,o=null,a=(0,F.getDocumentElement)(e);function f(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return!function u(s,c){void 0===s&&(s=!1),void 0===c&&(c=1),f();let d=e.getBoundingClientRect(),{left:m,top:g,width:h,height:p}=d;if(s||t(),!h||!p)return;let y={rootMargin:-l(g)+"px "+-l(a.clientWidth-(m+h))+"px "+-l(a.clientHeight-(g+p))+"px "+-l(m)+"px",threshold:r(0,i(1,c))||1},w=!0;function v(t){let i=t[0].intersectionRatio;if(i!==c){if(!w)return u();i?u(!1,i):n=setTimeout(()=>{u(!1,1e-7)},1e3)}1!==i||J(d,e.getBoundingClientRect())||u(),w=!1}try{o=new IntersectionObserver(v,{...y,root:a.ownerDocument})}catch(e){o=new IntersectionObserver(v,y)}o.observe(e)}(!0),f}(m,n):null,p=-1,y=null;s&&(y=new ResizeObserver(e=>{let[i]=e;i&&i.target===m&&y&&t&&(y.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=y)||e.observe(t)})),n()}),m&&!d&&y.observe(m),t&&y.observe(t));let w=d?U(e):null;return d&&function t(){let i=U(e);w&&!J(w,i)&&n(),w=i,a=requestAnimationFrame(t)}(),n(),()=>{var e;g.forEach(e=>{f&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)}),null==h||h(),null==(e=y)||e.disconnect(),y=null,d&&cancelAnimationFrame(a)}}let Z=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,i;let{x:r,y:o,placement:l,middlewareData:a}=t,f=await W(t,e);return l===(null==(n=a.offset)?void 0:n.placement)&&null!=(i=a.arrow)&&i.alignmentOffset?{}:{x:r+f.x,y:o+f.y,data:{...f,placement:l}}}}},ee=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var i,r,o,l;let{rects:a,middlewareData:f,placement:u,platform:m,elements:g}=t,{crossAxis:h=!1,alignment:p,allowedPlacements:w=n,autoAlignment:x=!0,...b}=s(e,t),E=void 0!==p||w===n?((l=p||null)?[...w.filter(e=>d(e)===l),...w.filter(e=>d(e)!==l)]:w.filter(e=>c(e)===e)).filter(e=>!l||d(e)===l||!!x&&v(e)!==e):w,R=await m.detectOverflow(t,b),S=(null==(i=f.autoPlacement)?void 0:i.index)||0,A=E[S];if(null==A)return{};let T=y(A,a,await (null==m.isRTL?void 0:m.isRTL(g.floating)));if(u!==A)return{reset:{placement:E[0]}};let L=[R[c(A)],R[T[0]],R[T[1]]],C=[...(null==(r=f.autoPlacement)?void 0:r.overflows)||[],{placement:A,overflows:L}],O=E[S+1];if(O)return{data:{index:S+1,overflows:C},reset:{placement:O}};let P=C.map(e=>{let t=d(e.placement);return[e.placement,t&&h?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),N=(null==(o=P.filter(e=>e[2].slice(0,d(e[0])?2:3).every(e=>e<=0))[0])?void 0:o[0])||P[0][0];return N!==u?{data:{index:S+1,overflows:C},reset:{placement:N}}:{}}}},et=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:i,placement:r,platform:o}=t,{mainAxis:l=!0,crossAxis:a=!1,limiter:f={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...d}=s(e,t),g={x:n,y:i},p=await o.detectOverflow(t,d),y=h(c(r)),w=m(y),v=g[w],x=g[y];if(l){let e="y"===w?"top":"left",t="y"===w?"bottom":"right",n=v+p[e],i=v-p[t];v=u(n,v,i)}if(a){let e="y"===y?"top":"left",t="y"===y?"bottom":"right",n=x+p[e],i=x-p[t];x=u(n,x,i)}let b=f.fn({...t,[w]:v,[y]:x});return{...b,data:{x:b.x-n,y:b.y-i,enabled:{[w]:l,[y]:a}}}}}},en=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,i,r,o,l;let{placement:a,middlewareData:f,rects:u,initialPlacement:d,platform:m,elements:g}=t,{mainAxis:p=!0,crossAxis:v=!0,fallbackPlacements:x,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:R=!0,...T}=s(e,t);if(null!=(n=f.arrow)&&n.alignmentOffset)return{};let L=c(a),C=h(d),O=c(d)===d,P=await (null==m.isRTL?void 0:m.isRTL(g.floating)),N=x||(O||!R?[A(d)]:w(d)),D="none"!==E;!x&&D&&N.push(...S(d,R,E,P));let k=[d,...N],M=await m.detectOverflow(t,T),W=[],F=(null==(i=f.flip)?void 0:i.overflows)||[];if(p&&W.push(M[L]),v){let e=y(a,u,P);W.push(M[e[0]],M[e[1]])}if(F=[...F,{placement:a,overflows:W}],!W.every(e=>e<=0)){let e=((null==(r=f.flip)?void 0:r.index)||0)+1,t=k[e];if(t&&("alignment"!==v||C===h(t)||F.every(e=>h(e.placement)!==C||e.overflows[0]>0)))return{data:{index:e,overflows:F},reset:{placement:t}};let n=null==(o=F.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!n)switch(b){case"bestFit":{let e=null==(l=F.filter(e=>{if(D){let t=h(e.placement);return t===C||"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=d}if(a!==n)return{reset:{placement:n}}}return{}}}},ei=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,o;let l,a,{placement:f,rects:u,platform:m,elements:g}=t,{apply:p=()=>{},...y}=s(e,t),w=await m.detectOverflow(t,y),v=c(f),x=d(f),b="y"===h(f),{width:E,height:R}=u.floating;"top"===v||"bottom"===v?(l=v,a=x===(await (null==m.isRTL?void 0:m.isRTL(g.floating))?"start":"end")?"left":"right"):(a=v,l="end"===x?"top":"bottom");let S=R-w.top-w.bottom,A=E-w.left-w.right,T=i(R-w[l],S),L=i(E-w[a],A),C=!t.middlewareData.shift,O=T,P=L;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(P=A),null!=(o=t.middlewareData.shift)&&o.enabled.y&&(O=S),C&&!x){let e=r(w.left,0),t=r(w.right,0),n=r(w.top,0),i=r(w.bottom,0);b?P=E-2*(0!==e||0!==t?e+t:r(w.left,w.right)):O=R-2*(0!==n||0!==i?n+i:r(w.top,w.bottom))}await p({...t,availableWidth:P,availableHeight:O});let N=await m.getDimensions(g.floating);return E!==N.width||R!==N.height?{reset:{rects:!0}}:{}}}},er=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n,platform:i}=t,{strategy:r="referenceHidden",...o}=s(e,t);switch(r){case"referenceHidden":{let e=N(await i.detectOverflow(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:D(e)}}}case"escaped":{let e=N(await i.detectOverflow(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:D(e)}}}default:return{}}}}},eo=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:l,platform:a,elements:f,middlewareData:c}=t,{element:m,padding:h=0}=s(e,t)||{};if(null==m)return{};let y=T(h),w={x:n,y:r},v=p(o),x=g(v),b=await a.getDimensions(m),E="y"===v,R=E?"clientHeight":"clientWidth",S=l.reference[x]+l.reference[v]-w[v]-l.floating[x],A=w[v]-l.reference[v],L=await (null==a.getOffsetParent?void 0:a.getOffsetParent(m)),C=L?L[R]:0;C&&await (null==a.isElement?void 0:a.isElement(L))||(C=f.floating[R]||l.floating[x]);let O=C/2-b[x]/2-1,P=i(y[E?"top":"left"],O),N=i(y[E?"bottom":"right"],O),D=C-b[x]-N,k=C/2-b[x]/2+(S/2-A/2),M=u(P,k,D),W=!c.arrow&&null!=d(o)&&k!==M&&l.reference[x]/2-(ke.y-t.y),n=[],i=null;for(let e=0;ei.height/2?n.push([r]):n[n.length-1].push(r),i=r}return n.map(e=>L(k(e)))}(g),y=L(k(g)),w=T(u),v=await a.getElementRects({reference:{getBoundingClientRect:function(){if(2===p.length&&p[0].left>p[1].right&&null!=d&&null!=m)return p.find(e=>d>e.left-w.left&&de.top-w.top&&m=2){if("y"===h(n)){let e=p[0],t=p[p.length-1],i="top"===c(n),r=e.top,o=t.bottom,l=i?e.left:t.left,a=i?e.right:t.right;return{top:r,bottom:o,left:l,right:a,width:a-l,height:o-r,x:l,y:r}}let e="left"===c(n),t=r(...p.map(e=>e.right)),o=i(...p.map(e=>e.left)),l=p.filter(n=>e?n.left===o:n.right===t),a=l[0].top,f=l[l.length-1].bottom;return{top:a,bottom:f,left:o,right:t,width:t-o,height:f-a,x:o,y:a}}return y}},floating:o.floating,strategy:f});return l.reference.x!==v.reference.x||l.reference.y!==v.reference.y||l.reference.width!==v.reference.width||l.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}},ea=function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:n,y:i,placement:r,rects:o,middlewareData:l}=t,{offset:a=0,mainAxis:f=!0,crossAxis:u=!0}=s(e,t),d={x:n,y:i},g=h(r),p=m(g),y=d[p],w=d[g],v=s(a,t),x="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(f){let e="y"===p?"height":"width",t=o.reference[p]-o.floating[e]+x.mainAxis,n=o.reference[p]+o.reference[e]-x.mainAxis;yn&&(y=n)}if(u){var b,E;let e="y"===p?"width":"height",t=M.has(c(r)),n=o.reference[g]-o.floating[e]+(t&&(null==(b=l.offset)?void 0:b[g])||0)+(t?0:x.crossAxis),i=o.reference[g]+o.reference[e]+(t?0:(null==(E=l.offset)?void 0:E[g])||0)-(t?x.crossAxis:0);wi&&(w=i)}return{[p]:y,[g]:w}}}},ef=(e,t,n)=>{let i=new Map,r={platform:Y,...n},o={...r.platform,_c:i};return P(e,t,{...r,platform:o})};e.s(["arrow",()=>eo,"autoPlacement",()=>ee,"autoUpdate",()=>Q,"computePosition",()=>ef,"detectOverflow",()=>O,"flip",()=>en,"hide",()=>er,"inline",()=>el,"limitShift",()=>ea,"offset",()=>Z,"platform",()=>Y,"shift",()=>et,"size",()=>ei],278928);var eu=e.i(942347),es=e.i(939050),ec="u">typeof document?eu.useLayoutEffect:function(){};function ed(e,t){let n,i,r;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(i=n;0!=i--;)if(!ed(e[i],t[i]))return!1;return!0}if((n=(r=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(i=n;0!=i--;)if(!({}).hasOwnProperty.call(t,r[i]))return!1;for(i=n;0!=i--;){let n=r[i];if(("_owner"!==n||!e.$$typeof)&&!ed(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function em(e){return"u"{t.current=e}),t}function ep(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:r,elements:{reference:o,floating:l}={},transform:a=!0,whileElementsMounted:f,open:u}=e,[s,c]=eu.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,m]=eu.useState(i);ed(d,i)||m(i);let[g,h]=eu.useState(null),[p,y]=eu.useState(null),w=eu.useCallback(e=>{e!==E.current&&(E.current=e,h(e))},[]),v=eu.useCallback(e=>{e!==R.current&&(R.current=e,y(e))},[]),x=o||g,b=l||p,E=eu.useRef(null),R=eu.useRef(null),S=eu.useRef(s),A=null!=f,T=eh(f),L=eh(r),C=eh(u),O=eu.useCallback(()=>{if(!E.current||!R.current)return;let e={placement:t,strategy:n,middleware:d};L.current&&(e.platform=L.current),ef(E.current,R.current,e).then(e=>{let t={...e,isPositioned:!1!==C.current};P.current&&!ed(S.current,t)&&(S.current=t,es.flushSync(()=>{c(t)}))})},[d,t,n,L,C]);ec(()=>{!1===u&&S.current.isPositioned&&(S.current.isPositioned=!1,c(e=>({...e,isPositioned:!1})))},[u]);let P=eu.useRef(!1);ec(()=>(P.current=!0,()=>{P.current=!1}),[]),ec(()=>{if(x&&(E.current=x),b&&(R.current=b),x&&b){if(T.current)return T.current(x,b,O);O()}},[x,b,O,T,A]);let N=eu.useMemo(()=>({reference:E,floating:R,setReference:w,setFloating:v}),[w,v]),D=eu.useMemo(()=>({reference:x,floating:b}),[x,b]),k=eu.useMemo(()=>{let e={position:n,left:0,top:0};if(!D.floating)return e;let t=eg(D.floating,s.x),i=eg(D.floating,s.y);return a?{...e,transform:"translate("+t+"px, "+i+"px)",...em(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:i}},[n,a,D.floating,s.x,s.y]);return eu.useMemo(()=>({...s,update:O,refs:N,elements:D,floatingStyles:k}),[s,O,N,D,k])}let ey=(e,t)=>{let n=Z(e);return{name:n.name,fn:n.fn,options:[e,t]}},ew=(e,t)=>{let n=et(e);return{name:n.name,fn:n.fn,options:[e,t]}},ev=(e,t)=>({fn:ea(e).fn,options:[e,t]}),ex=(e,t)=>{let n=en(e);return{name:n.name,fn:n.fn,options:[e,t]}},eb=(e,t)=>{let n=ei(e);return{name:n.name,fn:n.fn,options:[e,t]}},eE=(e,t)=>{let n=er(e);return{name:n.name,fn:n.fn,options:[e,t]}},eR=(e,t)=>{let n=el(e);return{name:n.name,fn:n.fn,options:[e,t]}};e.s(["flip",()=>ex,"hide",()=>eE,"inline",()=>eR,"limitShift",()=>ev,"offset",()=>ey,"shift",()=>ew,"size",()=>eb,"useFloating",()=>ep],556938)}]);