/*! For license information please see editor-canvas.js.LICENSE.txt */ !function(){"use strict";var e,t,n={"./node_modules/tabbable/dist/index.esm.js":function(e,t,n){n.r(t),n.d(t,{focusable:function(){return x},getTabIndex:function(){return d},isFocusable:function(){return T},isTabbable:function(){return E},tabbable:function(){return w}});var r=["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])"],o=r.join(","),i="undefined"==typeof Element,u=i?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,l=!i&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},c=function e(t,n){var r;void 0===n&&(n=!0);var o=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},s=function(e,t,n){if(c(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(o));return t&&u.call(e,o)&&r.unshift(e),r.filter(n)},a=function e(t,n,r){for(var i=[],l=Array.from(t);l.length;){var s=l.shift();if(!c(s,!1))if("SLOT"===s.tagName){var a=s.assignedElements(),f=e(a.length?a:s.children,!0,r);r.flatten?i.push.apply(i,f):i.push({scopeParent:s,candidates:f})}else{u.call(s,o)&&r.filter(s)&&(n||!t.includes(s))&&i.push(s);var d=s.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(s),m=!c(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(d&&m){var p=e(!0===d?s.children:d.children,!0,r);r.flatten?i.push.apply(i,p):i.push({scopeParent:s,candidates:p})}else l.unshift.apply(l,s.children)}}return i},f=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},d=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!f(e)?0:e.tabIndex},m=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},p=function(e){return"INPUT"===e.tagName},g=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},v=function(e,t){return!(t.disabled||c(t)||function(e){return p(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=u.call(e,"details>summary:first-of-type")?e.parentElement:e;if(u.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return g(e)}else{if("function"==typeof r){for(var i=e;e;){var c=e.parentElement,s=l(e);if(c&&!c.shadowRoot&&!0===r(c))return g(e);e=e.assignedSlot?e.assignedSlot:c||s===e.ownerDocument?c:s.host}e=i}if(function(e){var t,n,r,o,i=e&&l(e),u=null===(t=i)||void 0===t?void 0:t.host,c=!1;if(i&&i!==e)for(c=!!(null!==(n=u)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(u)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!c&&u;){var s,a,f;c=!(null===(a=u=null===(s=i=l(u))||void 0===s?void 0:s.host)||void 0===a||null===(f=a.ownerDocument)||void 0===f||!f.contains(u))}return c}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n=0)},b=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scopeParent,u=i?t.scopeParent:t,l=function(e,t){var n=d(e);return n<0&&t&&!f(e)?0:n}(u,i),c=i?e(t.candidates):u;0===l?i?n.push.apply(n,c):n.push(u):r.push({documentOrder:o,tabIndex:l,item:t,isScope:i,content:c})})),r.sort(m).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},w=function(e,t){var n;return n=(t=t||{}).getShadowRoot?a([e],t.includeContainer,{filter:h.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:y}):s(e,t.includeContainer,h.bind(null,t)),b(n)},x=function(e,t){return(t=t||{}).getShadowRoot?a([e],t.includeContainer,{filter:v.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):s(e,t.includeContainer,v.bind(null,t))},E=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==u.call(e,o)&&h(t,e)},R=r.concat("iframe").join(","),T=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==u.call(e,R)&&v(t,e)}},react:function(e){e.exports=window.React},"react-dom":function(e){e.exports=window.ReactDOM},"@elementor/editor":function(e){e.exports=window.elementorV2.editor},"@elementor/editor-elements":function(e){e.exports=window.elementorV2.editorElements},"@elementor/editor-props":function(e){e.exports=window.elementorV2.editorProps},"@elementor/editor-responsive":function(e){e.exports=window.elementorV2.editorResponsive},"@elementor/editor-styles-repository":function(e){e.exports=window.elementorV2.editorStylesRepository},"@elementor/editor-v1-adapters":function(e){e.exports=window.elementorV2.editorV1Adapters},"@elementor/ui":function(e){e.exports=window.elementorV2.ui},"@elementor/utils":function(e){e.exports=window.elementorV2.utils},"./node_modules/@floating-ui/core/dist/floating-ui.core.mjs":function(e,t,n){n.r(t),n.d(t,{arrow:function(){return l},autoPlacement:function(){return c},computePosition:function(){return i},detectOverflow:function(){return u},flip:function(){return s},hide:function(){return d},inline:function(){return p},limitShift:function(){return h},offset:function(){return g},rectToClientRect:function(){return r.rectToClientRect},shift:function(){return v},size:function(){return y}});var r=n("./node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs");function o(e,t,n){let{reference:o,floating:i}=e;const u=(0,r.getSideAxis)(t),l=(0,r.getAlignmentAxis)(t),c=(0,r.getAxisLength)(l),s=(0,r.getSide)(t),a="y"===u,f=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2;let p;switch(s){case"top":p={x:f,y:o.y-i.height};break;case"bottom":p={x:f,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-i.width,y:d};break;default:p={x:o.x,y:o.y}}switch((0,r.getAlignment)(t)){case"start":p[l]-=m*(n&&a?-1:1);break;case"end":p[l]+=m*(n&&a?-1:1)}return p}const i=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:u=[],platform:l}=n,c=u.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));let a=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:d}=o(a,r,s),m=r,p={},g=0;for(let n=0;n({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:u,platform:l,elements:c,middlewareData:s}=t,{element:a,padding:f=0}=(0,r.evaluate)(e,t)||{};if(null==a)return{};const d=(0,r.getPaddingObject)(f),m={x:n,y:o},p=(0,r.getAlignmentAxis)(i),g=(0,r.getAxisLength)(p),v=await l.getDimensions(a),h="y"===p,y=h?"top":"left",b=h?"bottom":"right",w=h?"clientHeight":"clientWidth",x=u.reference[g]+u.reference[p]-m[p]-u.floating[g],E=m[p]-u.reference[p],R=await(null==l.getOffsetParent?void 0:l.getOffsetParent(a));let T=R?R[w]:0;T&&await(null==l.isElement?void 0:l.isElement(R))||(T=c.floating[w]||u.floating[g]);const S=x/2-E/2,C=T/2-v[g]/2-1,O=(0,r.min)(d[y],C),k=(0,r.min)(d[b],C),A=O,P=T-v[g]-k,L=T/2-v[g]/2+S,M=(0,r.clamp)(A,L,P),I=!s.arrow&&null!=(0,r.getAlignment)(i)&&L!==M&&u.reference[g]/2-(L(0,r.getAlignment)(t)===e)),...n.filter((t=>(0,r.getAlignment)(t)!==e))]:n.filter((e=>(0,r.getSide)(e)===e))).filter((n=>!e||(0,r.getAlignment)(n)===e||!!t&&(0,r.getOppositeAlignmentPlacement)(n)!==n))}(m||null,g,p):p,y=await u(t,v),b=(null==(n=c.autoPlacement)?void 0:n.index)||0,w=h[b];if(null==w)return{};const x=(0,r.getAlignmentSides)(w,l,await(null==a.isRTL?void 0:a.isRTL(f.floating)));if(s!==w)return{reset:{placement:h[0]}};const E=[y[(0,r.getSide)(w)],y[x[0]],y[x[1]]],R=[...(null==(o=c.autoPlacement)?void 0:o.overflows)||[],{placement:w,overflows:E}],T=h[b+1];if(T)return{data:{index:b+1,overflows:R},reset:{placement:T}};const S=R.map((e=>{const t=(0,r.getAlignment)(e.placement);return[e.placement,t&&d?e.overflows.slice(0,2).reduce(((e,t)=>e+t),0):e.overflows[0],e.overflows]})).sort(((e,t)=>e[1]-t[1])),C=(null==(i=S.filter((e=>e[2].slice(0,(0,r.getAlignment)(e[0])?2:3).every((e=>e<=0))))[0])?void 0:i[0])||S[0][0];return C!==s?{data:{index:b+1,overflows:R},reset:{placement:C}}:{}}}},s=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:l,rects:c,initialPlacement:s,platform:a,elements:f}=t,{mainAxis:d=!0,crossAxis:m=!0,fallbackPlacements:p,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:h=!0,...y}=(0,r.evaluate)(e,t);if(null!=(n=l.arrow)&&n.alignmentOffset)return{};const b=(0,r.getSide)(i),w=(0,r.getSideAxis)(s),x=(0,r.getSide)(s)===s,E=await(null==a.isRTL?void 0:a.isRTL(f.floating)),R=p||(x||!h?[(0,r.getOppositePlacement)(s)]:(0,r.getExpandedPlacements)(s)),T="none"!==v;!p&&T&&R.push(...(0,r.getOppositeAxisPlacements)(s,h,v,E));const S=[s,...R],C=await u(t,y),O=[];let k=(null==(o=l.flip)?void 0:o.overflows)||[];if(d&&O.push(C[b]),m){const e=(0,r.getAlignmentSides)(i,c,E);O.push(C[e[0]],C[e[1]])}if(k=[...k,{placement:i,overflows:O}],!O.every((e=>e<=0))){var A,P;const e=((null==(A=l.flip)?void 0:A.index)||0)+1,t=S[e];if(t)return{data:{index:e,overflows:k},reset:{placement:t}};let n=null==(P=k.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:P.placement;if(!n)switch(g){case"bestFit":{var L;const e=null==(L=k.filter((e=>{if(T){const t=(0,r.getSideAxis)(e.placement);return t===w||"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=s}if(i!==n)return{reset:{placement:n}}}return{}}}};function a(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function f(e){return r.sides.some((t=>e[t]>=0))}const d=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=(0,r.evaluate)(e,t);switch(o){case"referenceHidden":{const e=a(await u(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:f(e)}}}case"escaped":{const e=a(await u(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:f(e)}}}default:return{}}}}};function m(e){const t=(0,r.min)(...e.map((e=>e.left))),n=(0,r.min)(...e.map((e=>e.top)));return{x:t,y:n,width:(0,r.max)(...e.map((e=>e.right)))-t,height:(0,r.max)(...e.map((e=>e.bottom)))-n}}const p=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:o,rects:i,platform:u,strategy:l}=t,{padding:c=2,x:s,y:a}=(0,r.evaluate)(e,t),f=Array.from(await(null==u.getClientRects?void 0:u.getClientRects(o.reference))||[]),d=function(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),n=[];let o=null;for(let e=0;eo.height/2?n.push([r]):n[n.length-1].push(r),o=r}return n.map((e=>(0,r.rectToClientRect)(m(e))))}(f),p=(0,r.rectToClientRect)(m(f)),g=(0,r.getPaddingObject)(c),v=await u.getElementRects({reference:{getBoundingClientRect:function(){if(2===d.length&&d[0].left>d[1].right&&null!=s&&null!=a)return d.find((e=>s>e.left-g.left&&se.top-g.top&&a=2){if("y"===(0,r.getSideAxis)(n)){const e=d[0],t=d[d.length-1],o="top"===(0,r.getSide)(n),i=e.top,u=t.bottom,l=o?e.left:t.left,c=o?e.right:t.right;return{top:i,bottom:u,left:l,right:c,width:c-l,height:u-i,x:l,y:i}}const e="left"===(0,r.getSide)(n),t=(0,r.max)(...d.map((e=>e.right))),o=(0,r.min)(...d.map((e=>e.left))),i=d.filter((n=>e?n.left===o:n.right===t)),u=i[0].top,l=i[i.length-1].bottom;return{top:u,bottom:l,left:o,right:t,width:t-o,height:l-u,x:o,y:u}}return p}},floating:o.floating,strategy:l});return i.reference.x!==v.reference.x||i.reference.y!==v.reference.y||i.reference.width!==v.reference.width||i.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}},g=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:u,placement:l,middlewareData:c}=t,s=await async function(e,t){const{placement:n,platform:o,elements:i}=e,u=await(null==o.isRTL?void 0:o.isRTL(i.floating)),l=(0,r.getSide)(n),c=(0,r.getAlignment)(n),s="y"===(0,r.getSideAxis)(n),a=["left","top"].includes(l)?-1:1,f=u&&s?-1:1,d=(0,r.evaluate)(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:g}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return c&&"number"==typeof g&&(p="end"===c?-1*g:g),s?{x:p*f,y:m*a}:{x:m*a,y:p*f}}(t,e);return l===(null==(n=c.offset)?void 0:n.placement)&&null!=(o=c.arrow)&&o.alignmentOffset?{}:{x:i+s.x,y:u+s.y,data:{...s,placement:l}}}}},v=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...a}=(0,r.evaluate)(e,t),f={x:n,y:o},d=await u(t,a),m=(0,r.getSideAxis)((0,r.getSide)(i)),p=(0,r.getOppositeAxis)(m);let g=f[p],v=f[m];if(l){const e="y"===p?"bottom":"right",t=g+d["y"===p?"top":"left"],n=g-d[e];g=(0,r.clamp)(t,g,n)}if(c){const e="y"===m?"bottom":"right",t=v+d["y"===m?"top":"left"],n=v-d[e];v=(0,r.clamp)(t,v,n)}const h=s.fn({...t,[p]:g,[m]:v});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[p]:l,[m]:c}}}}}},h=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:u,middlewareData:l}=t,{offset:c=0,mainAxis:s=!0,crossAxis:a=!0}=(0,r.evaluate)(e,t),f={x:n,y:o},d=(0,r.getSideAxis)(i),m=(0,r.getOppositeAxis)(d);let p=f[m],g=f[d];const v=(0,r.evaluate)(c,t),h="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(s){const e="y"===m?"height":"width",t=u.reference[m]-u.floating[e]+h.mainAxis,n=u.reference[m]+u.reference[e]-h.mainAxis;pn&&(p=n)}if(a){var y,b;const e="y"===m?"width":"height",t=["top","left"].includes((0,r.getSide)(i)),n=u.reference[d]-u.floating[e]+(t&&(null==(y=l.offset)?void 0:y[d])||0)+(t?0:h.crossAxis),o=u.reference[d]+u.reference[e]+(t?0:(null==(b=l.offset)?void 0:b[d])||0)-(t?h.crossAxis:0);go&&(g=o)}return{[m]:p,[d]:g}}}},y=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:l,platform:c,elements:s}=t,{apply:a=()=>{},...f}=(0,r.evaluate)(e,t),d=await u(t,f),m=(0,r.getSide)(i),p=(0,r.getAlignment)(i),g="y"===(0,r.getSideAxis)(i),{width:v,height:h}=l.floating;let y,b;"top"===m||"bottom"===m?(y=m,b=p===(await(null==c.isRTL?void 0:c.isRTL(s.floating))?"start":"end")?"left":"right"):(b=m,y="end"===p?"top":"bottom");const w=h-d.top-d.bottom,x=v-d.left-d.right,E=(0,r.min)(h-d[y],w),R=(0,r.min)(v-d[b],x),T=!t.middlewareData.shift;let S=E,C=R;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(C=x),null!=(o=t.middlewareData.shift)&&o.enabled.y&&(S=w),T&&!p){const e=(0,r.max)(d.left,0),t=(0,r.max)(d.right,0),n=(0,r.max)(d.top,0),o=(0,r.max)(d.bottom,0);g?C=v-2*(0!==e||0!==t?e+t:(0,r.max)(d.left,d.right)):S=h-2*(0!==n||0!==o?n+o:(0,r.max)(d.top,d.bottom))}await a({...t,availableWidth:C,availableHeight:S});const O=await c.getDimensions(s.floating);return v!==O.width||h!==O.height?{reset:{rects:!0}}:{}}}}},"./node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs":function(e,t,n){n.r(t),n.d(t,{arrow:function(){return A},autoPlacement:function(){return T},autoUpdate:function(){return x},computePosition:function(){return M},detectOverflow:function(){return E},flip:function(){return C},getOverflowAncestors:function(){return i.getOverflowAncestors},hide:function(){return k},inline:function(){return P},limitShift:function(){return L},offset:function(){return R},platform:function(){return w},shift:function(){return S},size:function(){return O}});var r=n("./node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs"),o=n("./node_modules/@floating-ui/core/dist/floating-ui.core.mjs"),i=n("./node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs");function u(e){const t=(0,i.getComputedStyle)(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const u=(0,i.isHTMLElement)(e),l=u?e.offsetWidth:n,c=u?e.offsetHeight:o,s=(0,r.round)(n)!==l||(0,r.round)(o)!==c;return s&&(n=l,o=c),{width:n,height:o,$:s}}function l(e){return(0,i.isElement)(e)?e:e.contextElement}function c(e){const t=l(e);if(!(0,i.isHTMLElement)(t))return(0,r.createCoords)(1);const n=t.getBoundingClientRect(),{width:o,height:c,$:s}=u(t);let a=(s?(0,r.round)(n.width):n.width)/o,f=(s?(0,r.round)(n.height):n.height)/c;return a&&Number.isFinite(a)||(a=1),f&&Number.isFinite(f)||(f=1),{x:a,y:f}}const s=(0,r.createCoords)(0);function a(e){const t=(0,i.getWindow)(e);return(0,i.isWebKit)()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:s}function f(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const u=e.getBoundingClientRect(),s=l(e);let f=(0,r.createCoords)(1);t&&(o?(0,i.isElement)(o)&&(f=c(o)):f=c(e));const d=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==(0,i.getWindow)(e))&&t}(s,n,o)?a(s):(0,r.createCoords)(0);let m=(u.left+d.x)/f.x,p=(u.top+d.y)/f.y,g=u.width/f.x,v=u.height/f.y;if(s){const e=(0,i.getWindow)(s),t=o&&(0,i.isElement)(o)?(0,i.getWindow)(o):o;let n=e,r=(0,i.getFrameElement)(n);for(;r&&o&&t!==n;){const e=c(r),t=r.getBoundingClientRect(),o=(0,i.getComputedStyle)(r),u=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,l=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;m*=e.x,p*=e.y,g*=e.x,v*=e.y,m+=u,p+=l,n=(0,i.getWindow)(r),r=(0,i.getFrameElement)(n)}}return(0,r.rectToClientRect)({width:g,height:v,x:m,y:p})}function d(e,t){const n=(0,i.getNodeScroll)(e).scrollLeft;return t?t.left+n:f((0,i.getDocumentElement)(e)).left+n}function m(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:d(e,r)),y:r.top+t.scrollTop}}function p(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=(0,i.getWindow)(e),r=(0,i.getDocumentElement)(e),o=n.visualViewport;let u=r.clientWidth,l=r.clientHeight,c=0,s=0;if(o){u=o.width,l=o.height;const e=(0,i.isWebKit)();(!e||e&&"fixed"===t)&&(c=o.offsetLeft,s=o.offsetTop)}return{width:u,height:l,x:c,y:s}}(e,n);else if("document"===t)o=function(e){const t=(0,i.getDocumentElement)(e),n=(0,i.getNodeScroll)(e),o=e.ownerDocument.body,u=(0,r.max)(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),l=(0,r.max)(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let c=-n.scrollLeft+d(e);const s=-n.scrollTop;return"rtl"===(0,i.getComputedStyle)(o).direction&&(c+=(0,r.max)(t.clientWidth,o.clientWidth)-u),{width:u,height:l,x:c,y:s}}((0,i.getDocumentElement)(e));else if((0,i.isElement)(t))o=function(e,t){const n=f(e,!0,"fixed"===t),o=n.top+e.clientTop,u=n.left+e.clientLeft,l=(0,i.isHTMLElement)(e)?c(e):(0,r.createCoords)(1);return{width:e.clientWidth*l.x,height:e.clientHeight*l.y,x:u*l.x,y:o*l.y}}(t,n);else{const n=a(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return(0,r.rectToClientRect)(o)}function g(e,t){const n=(0,i.getParentNode)(e);return!(n===t||!(0,i.isElement)(n)||(0,i.isLastTraversableNode)(n))&&("fixed"===(0,i.getComputedStyle)(n).position||g(n,t))}function v(e,t,n){const o=(0,i.isHTMLElement)(t),u=(0,i.getDocumentElement)(t),l="fixed"===n,c=f(e,!0,l,t);let s={scrollLeft:0,scrollTop:0};const a=(0,r.createCoords)(0);if(o||!o&&!l)if(("body"!==(0,i.getNodeName)(t)||(0,i.isOverflowElement)(u))&&(s=(0,i.getNodeScroll)(t)),o){const e=f(t,!0,l,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else u&&(a.x=d(u));const p=!u||o||l?(0,r.createCoords)(0):m(u,s);return{x:c.left+s.scrollLeft-a.x-p.x,y:c.top+s.scrollTop-a.y-p.y,width:c.width,height:c.height}}function h(e){return"static"===(0,i.getComputedStyle)(e).position}function y(e,t){if(!(0,i.isHTMLElement)(e)||"fixed"===(0,i.getComputedStyle)(e).position)return null;if(t)return t(e);let n=e.offsetParent;return(0,i.getDocumentElement)(e)===n&&(n=n.ownerDocument.body),n}function b(e,t){const n=(0,i.getWindow)(e);if((0,i.isTopLayer)(e))return n;if(!(0,i.isHTMLElement)(e)){let t=(0,i.getParentNode)(e);for(;t&&!(0,i.isLastTraversableNode)(t);){if((0,i.isElement)(t)&&!h(t))return t;t=(0,i.getParentNode)(t)}return n}let r=y(e,t);for(;r&&(0,i.isTableElement)(r)&&h(r);)r=y(r,t);return r&&(0,i.isLastTraversableNode)(r)&&h(r)&&!(0,i.isContainingBlock)(r)?n:r||(0,i.getContainingBlock)(e)||n}const w={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:u}=e;const l="fixed"===u,s=(0,i.getDocumentElement)(o),a=!!t&&(0,i.isTopLayer)(t.floating);if(o===s||a&&l)return n;let d={scrollLeft:0,scrollTop:0},p=(0,r.createCoords)(1);const g=(0,r.createCoords)(0),v=(0,i.isHTMLElement)(o);if((v||!v&&!l)&&(("body"!==(0,i.getNodeName)(o)||(0,i.isOverflowElement)(s))&&(d=(0,i.getNodeScroll)(o)),(0,i.isHTMLElement)(o))){const e=f(o);p=c(o),g.x=e.x+o.clientLeft,g.y=e.y+o.clientTop}const h=!s||v||l?(0,r.createCoords)(0):m(s,d,!0);return{width:n.width*p.x,height:n.height*p.y,x:n.x*p.x-d.scrollLeft*p.x+g.x+h.x,y:n.y*p.y-d.scrollTop*p.y+g.y+h.y}},getDocumentElement:i.getDocumentElement,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:u}=e;const l=[..."clippingAncestors"===n?(0,i.isTopLayer)(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=(0,i.getOverflowAncestors)(e,[],!1).filter((e=>(0,i.isElement)(e)&&"body"!==(0,i.getNodeName)(e))),o=null;const u="fixed"===(0,i.getComputedStyle)(e).position;let l=u?(0,i.getParentNode)(e):e;for(;(0,i.isElement)(l)&&!(0,i.isLastTraversableNode)(l);){const t=(0,i.getComputedStyle)(l),n=(0,i.isContainingBlock)(l);n||"fixed"!==t.position||(o=null),(u?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||(0,i.isOverflowElement)(l)&&!n&&g(e,l))?r=r.filter((e=>e!==l)):o=t,l=(0,i.getParentNode)(l)}return t.set(e,r),r}(t,this._c):[].concat(n),o],c=l[0],s=l.reduce(((e,n)=>{const o=p(t,n,u);return e.top=(0,r.max)(o.top,e.top),e.right=(0,r.min)(o.right,e.right),e.bottom=(0,r.min)(o.bottom,e.bottom),e.left=(0,r.max)(o.left,e.left),e}),p(t,c,u));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:b,getElementRects:async function(e){const t=this.getOffsetParent||b,n=this.getDimensions,r=await n(e.floating);return{reference:v(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=u(e);return{width:t,height:n}},getScale:c,isElement:i.isElement,isRTL:function(e){return"rtl"===(0,i.getComputedStyle)(e).direction}};function x(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:u=!0,ancestorResize:c=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:d=!1}=o,m=l(e),p=u||c?[...m?(0,i.getOverflowAncestors)(m):[],...(0,i.getOverflowAncestors)(t)]:[];p.forEach((e=>{u&&e.addEventListener("scroll",n,{passive:!0}),c&&e.addEventListener("resize",n)}));const g=m&&a?function(e,t){let n,o=null;const u=(0,i.getDocumentElement)(e);function l(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function i(c,s){void 0===c&&(c=!1),void 0===s&&(s=1),l();const{left:a,top:f,width:d,height:m}=e.getBoundingClientRect();if(c||t(),!d||!m)return;const p={rootMargin:-(0,r.floor)(f)+"px "+-(0,r.floor)(u.clientWidth-(a+d))+"px "+-(0,r.floor)(u.clientHeight-(f+m))+"px "+-(0,r.floor)(a)+"px",threshold:(0,r.max)(0,(0,r.min)(1,s))||1};let g=!0;function v(e){const t=e[0].intersectionRatio;if(t!==s){if(!g)return i();t?i(!1,t):n=setTimeout((()=>{i(!1,1e-7)}),1e3)}g=!1}try{o=new IntersectionObserver(v,{...p,root:u.ownerDocument})}catch(e){o=new IntersectionObserver(v,p)}o.observe(e)}(!0),l}(m,n):null;let v,h=-1,y=null;s&&(y=new ResizeObserver((e=>{let[r]=e;r&&r.target===m&&y&&(y.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=y)||e.observe(t)}))),n()})),m&&!d&&y.observe(m),y.observe(t));let b=d?f(e):null;return d&&function t(){const r=f(e);!b||r.x===b.x&&r.y===b.y&&r.width===b.width&&r.height===b.height||n(),b=r,v=requestAnimationFrame(t)}(),n(),()=>{var e;p.forEach((e=>{u&&e.removeEventListener("scroll",n),c&&e.removeEventListener("resize",n)})),null==g||g(),null==(e=y)||e.disconnect(),y=null,d&&cancelAnimationFrame(v)}}const E=o.detectOverflow,R=o.offset,T=o.autoPlacement,S=o.shift,C=o.flip,O=o.size,k=o.hide,A=o.arrow,P=o.inline,L=o.limitShift,M=(e,t,n)=>{const r=new Map,i={platform:w,...n},u={...i.platform,_c:r};return(0,o.computePosition)(e,t,{...i,platform:u})}},"./node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs":function(e,t,n){n.r(t),n.d(t,{arrow:function(){return E},autoPlacement:function(){return b},autoUpdate:function(){return r.autoUpdate},computePosition:function(){return r.computePosition},detectOverflow:function(){return r.detectOverflow},flip:function(){return h},getOverflowAncestors:function(){return o.getOverflowAncestors},hide:function(){return w},inline:function(){return x},limitShift:function(){return v},offset:function(){return p},platform:function(){return r.platform},shift:function(){return g},size:function(){return y},useFloating:function(){return d}});var r=n("./node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs"),o=n("./node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs"),i=n("react"),u=n("react-dom"),l="undefined"!=typeof document?i.useLayoutEffect:i.useEffect;function c(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!c(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||c(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function s(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function a(e,t){const n=s(e);return Math.round(t*n)/n}function f(e){const t=i.useRef(e);return l((()=>{t.current=e})),t}function d(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:d,elements:{reference:m,floating:p}={},transform:g=!0,whileElementsMounted:v,open:h}=e,[y,b]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[w,x]=i.useState(o);c(w,o)||x(o);const[E,R]=i.useState(null),[T,S]=i.useState(null),C=i.useCallback((e=>{e!==P.current&&(P.current=e,R(e))}),[]),O=i.useCallback((e=>{e!==L.current&&(L.current=e,S(e))}),[]),k=m||E,A=p||T,P=i.useRef(null),L=i.useRef(null),M=i.useRef(y),I=null!=v,D=f(v),N=f(d),F=f(h),j=i.useCallback((()=>{if(!P.current||!L.current)return;const e={placement:t,strategy:n,middleware:w};N.current&&(e.platform=N.current),(0,r.computePosition)(P.current,L.current,e).then((e=>{const t={...e,isPositioned:!1!==F.current};_.current&&!c(M.current,t)&&(M.current=t,u.flushSync((()=>{b(t)})))}))}),[w,t,n,N,F]);l((()=>{!1===h&&M.current.isPositioned&&(M.current.isPositioned=!1,b((e=>({...e,isPositioned:!1}))))}),[h]);const _=i.useRef(!1);l((()=>(_.current=!0,()=>{_.current=!1})),[]),l((()=>{if(k&&(P.current=k),A&&(L.current=A),k&&A){if(D.current)return D.current(k,A,j);j()}}),[k,A,j,D,I]);const H=i.useMemo((()=>({reference:P,floating:L,setReference:C,setFloating:O})),[C,O]),W=i.useMemo((()=>({reference:k,floating:A})),[k,A]),$=i.useMemo((()=>{const e={position:n,left:0,top:0};if(!W.floating)return e;const t=a(W.floating,y.x),r=a(W.floating,y.y);return g?{...e,transform:"translate("+t+"px, "+r+"px)",...s(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,g,W.floating,y.x,y.y]);return i.useMemo((()=>({...y,update:j,refs:H,elements:W,floatingStyles:$})),[y,j,H,W,$])}const m=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:o}="function"==typeof e?e(t):e;return n&&(i=n,{}.hasOwnProperty.call(i,"current"))?null!=n.current?(0,r.arrow)({element:n.current,padding:o}).fn(t):{}:n?(0,r.arrow)({element:n,padding:o}).fn(t):{};var i}}),p=(e,t)=>({...(0,r.offset)(e),options:[e,t]}),g=(e,t)=>({...(0,r.shift)(e),options:[e,t]}),v=(e,t)=>({...(0,r.limitShift)(e),options:[e,t]}),h=(e,t)=>({...(0,r.flip)(e),options:[e,t]}),y=(e,t)=>({...(0,r.size)(e),options:[e,t]}),b=(e,t)=>({...(0,r.autoPlacement)(e),options:[e,t]}),w=(e,t)=>({...(0,r.hide)(e),options:[e,t]}),x=(e,t)=>({...(0,r.inline)(e),options:[e,t]}),E=(e,t)=>({...m(e),options:[e,t]})},"./node_modules/@floating-ui/react/dist/floating-ui.react.mjs":function(e,t,n){var r;n.r(t),n.d(t,{Composite:function(){return W},CompositeItem:function(){return $},FloatingArrow:function(){return X},FloatingDelayGroup:function(){return de},FloatingFocusManager:function(){return qe},FloatingList:function(){return I},FloatingNode:function(){return ne},FloatingOverlay:function(){return Ge},FloatingPortal:function(){return _e},FloatingTree:function(){return re},arrow:function(){return a.arrow},autoPlacement:function(){return a.autoPlacement},autoUpdate:function(){return f.autoUpdate},computePosition:function(){return f.computePosition},detectOverflow:function(){return f.detectOverflow},flip:function(){return a.flip},getOverflowAncestors:function(){return l.getOverflowAncestors},hide:function(){return a.hide},inline:function(){return a.inline},inner:function(){return Ot},limitShift:function(){return a.limitShift},offset:function(){return a.offset},platform:function(){return f.platform},safePolygon:function(){return Pt},shift:function(){return a.shift},size:function(){return a.size},useClick:function(){return Qe},useClientPoint:function(){return tt},useDelayGroup:function(){return me},useDelayGroupContext:function(){return fe},useDismiss:function(){return it},useFloating:function(){return lt},useFloatingNodeId:function(){return te},useFloatingParentNodeId:function(){return Q},useFloatingPortalNode:function(){return je},useFloatingRootContext:function(){return ut},useFloatingTree:function(){return ee},useFocus:function(){return ct},useHover:function(){return ce},useId:function(){return U},useInnerOffset:function(){return kt},useInteractions:function(){return dt},useListItem:function(){return D},useListNavigation:function(){return yt},useMergeRefs:function(){return d},useRole:function(){return wt},useTransitionStatus:function(){return Rt},useTransitionStyles:function(){return Tt},useTypeahead:function(){return St}});var o=n("react"),i=n("./node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs"),u=n("./node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs"),l=n("./node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs"),c=n("./node_modules/tabbable/dist/index.esm.js"),s=n("react-dom"),a=n("./node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs"),f=n("./node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs");function d(e){return o.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}),e)}const m={...r||(r=n.t(o,2))},p=m.useInsertionEffect||(e=>e());function g(e){const t=o.useRef((()=>{throw new Error("Cannot call an event handler while rendering.")}));return p((()=>{t.current=e})),o.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r=e.current.length}function E(e,t){return T(e,{disabledIndices:t})}function R(e,t){return T(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function T(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=void 0===t?{}:t;const u=e.current;let l=n;do{l+=r?-i:i}while(l>=0&&l<=u.length-1&&A(u,l,o));return l}function S(e,t){let{event:n,orientation:r,loop:o,rtl:l,cols:c,disabledIndices:s,minIndex:a,maxIndex:f,prevIndex:d,stopEvent:m=!1}=t,p=d;if(n.key===v){if(m&&(0,i.stopEvent)(n),-1===d)p=f;else if(p=T(e,{startingIndex:p,amount:c,decrement:!0,disabledIndices:s}),o&&(d-ce?n:n-c}x(e,p)&&(p=d)}if(n.key===h&&(m&&(0,i.stopEvent)(n),-1===d?p=a:(p=T(e,{startingIndex:d,amount:c,disabledIndices:s}),o&&d+c>f&&(p=T(e,{startingIndex:d%c-c,amount:c,disabledIndices:s}))),x(e,p)&&(p=d)),"both"===r){const t=(0,u.floor)(d/c);n.key===(l?y:b)&&(m&&(0,i.stopEvent)(n),d%c!=c-1?(p=T(e,{startingIndex:d,disabledIndices:s}),o&&w(p,c,t)&&(p=T(e,{startingIndex:d-d%c-1,disabledIndices:s}))):o&&(p=T(e,{startingIndex:d-d%c-1,disabledIndices:s})),w(p,c,t)&&(p=d)),n.key===(l?b:y)&&(m&&(0,i.stopEvent)(n),d%c!=0?(p=T(e,{startingIndex:d,decrement:!0,disabledIndices:s}),o&&w(p,c,t)&&(p=T(e,{startingIndex:d+(c-d%c),decrement:!0,disabledIndices:s}))):o&&(p=T(e,{startingIndex:d+(c-d%c),decrement:!0,disabledIndices:s})),w(p,c,t)&&(p=d));const r=(0,u.floor)(f/c)===t;x(e,p)&&(p=o&&r?n.key===(l?b:y)?f:T(e,{startingIndex:d-d%c-1,disabledIndices:s}):d)}return p}function C(e,t,n){const r=[];let o=0;return e.forEach(((e,i)=>{let{width:u,height:l}=e;if(u>t)throw new Error("[Floating UI]: Invalid grid - item width at index "+i+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const e=[];for(let n=0;nnull==r[e]))?(e.forEach((e=>{r[e]=i})),c=!0):o++}})),[...r]}function O(e,t,n,r,o){if(-1===e)return-1;const i=n.indexOf(e),u=t[e];switch(o){case"tl":return i;case"tr":return u?i+u.width-1:i;case"bl":return u?i+(u.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function k(e,t){return t.flatMap(((t,n)=>e.includes(t)?[n]:[]))}function A(e,t,n){if(n)return n.includes(t);const r=e[t];return null==r||r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")}var P="undefined"!=typeof document?o.useLayoutEffect:o.useEffect;function L(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const M=o.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function I(e){const{children:t,elementsRef:n,labelsRef:r}=e,[i,u]=o.useState((()=>new Map)),l=o.useCallback((e=>{u((t=>new Map(t).set(e,null)))}),[]),c=o.useCallback((e=>{u((t=>{const n=new Map(t);return n.delete(e),n}))}),[]);return P((()=>{const e=new Map(i);Array.from(e.keys()).sort(L).forEach(((t,n)=>{e.set(t,n)})),function(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e.entries())if(r!==t.get(n))return!1;return!0}(i,e)||u(e)}),[i]),o.createElement(M.Provider,{value:o.useMemo((()=>({register:l,unregister:c,map:i,elementsRef:n,labelsRef:r})),[l,c,i,n,r])},t)}function D(e){void 0===e&&(e={});const{label:t}=e,{register:n,unregister:r,map:i,elementsRef:u,labelsRef:l}=o.useContext(M),[c,s]=o.useState(null),a=o.useRef(null),f=o.useCallback((e=>{if(a.current=e,null!==c&&(u.current[c]=e,l)){var n;const r=void 0!==t;l.current[c]=r?t:null!=(n=null==e?void 0:e.textContent)?n:null}}),[c,u,l,t]);return P((()=>{const e=a.current;if(e)return n(e),()=>{r(e)}}),[n,r]),P((()=>{const e=a.current?i.get(a.current):null;null!=e&&s(e)}),[i]),o.useMemo((()=>({ref:f,index:null==c?-1:c})),[c,f])}function N(e,t){return"function"==typeof e?e(t):e?o.cloneElement(e,t):o.createElement("div",t)}const F=o.createContext({activeIndex:0,onNavigate:()=>{}}),j=[y,b],_=[v,h],H=[...j,..._],W=o.forwardRef((function(e,t){const{render:n,orientation:r="both",loop:i=!0,rtl:u=!1,cols:l=1,disabledIndices:c,activeIndex:s,onNavigate:a,itemSizes:f,dense:d=!1,...m}=e,[p,w]=o.useState(0),P=null!=s?s:p,L=g(null!=a?a:w),M=o.useRef([]),D=n&&"function"!=typeof n?n.props:{},W=o.useMemo((()=>({activeIndex:P,onNavigate:L})),[P,L]),$=l>1,B={...m,...D,ref:t,"aria-orientation":"both"===r?void 0:r,onKeyDown(e){null==m.onKeyDown||m.onKeyDown(e),null==D.onKeyDown||D.onKeyDown(e),function(e){if(!H.includes(e.key))return;let t=P;const n=E(M,c),o=R(M,c),s=u?y:b,a=u?b:y;if($){const a=f||Array.from({length:M.current.length},(()=>({width:1,height:1}))),m=C(a,l,d),p=m.findIndex((e=>null!=e&&!A(M.current,e,c))),g=m.reduce(((e,t,n)=>null==t||A(M.current,t,c)?e:n),-1),v=m[S({current:m.map((e=>e?M.current[e]:null))},{event:e,orientation:r,loop:i,rtl:u,cols:l,disabledIndices:k([...c||M.current.map(((e,t)=>A(M.current,t)?t:void 0)),void 0],m),minIndex:p,maxIndex:g,prevIndex:O(P>o?n:P,a,m,l,e.key===h?"bl":e.key===s?"tr":"tl")})];null!=v&&(t=v)}const m={horizontal:[s],vertical:[h],both:[s,h]}[r],p={horizontal:[a],vertical:[v],both:[a,v]}[r],g=$?H:{horizontal:j,vertical:_,both:H}[r];var w;t===P&&[...m,...p].includes(e.key)&&(t=i&&t===o&&m.includes(e.key)?n:i&&t===n&&p.includes(e.key)?o:T(M,{startingIndex:t,decrement:p.includes(e.key),disabledIndices:c})),t===P||x(M,t)||(e.stopPropagation(),g.includes(e.key)&&e.preventDefault(),L(t),null==(w=M.current[t])||w.focus())}(e)}};return o.createElement(F.Provider,{value:W},o.createElement(I,{elementsRef:M},N(n,B)))})),$=o.forwardRef((function(e,t){const{render:n,...r}=e,i=n&&"function"!=typeof n?n.props:{},{activeIndex:u,onNavigate:l}=o.useContext(F),{ref:c,index:s}=D(),a=d([c,t,i.ref]),f=u===s;return N(n,{...r,...i,ref:a,tabIndex:f?0:-1,"data-active":f?"":void 0,onFocus(e){null==r.onFocus||r.onFocus(e),null==i.onFocus||i.onFocus(e),l(s)}})}));function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t"floating-ui-"+Math.random().toString(36).slice(2,6)+K++,U=m.useId||function(){const[e,t]=o.useState((()=>V?z():void 0));return P((()=>{null==e&&t(z())}),[]),o.useEffect((()=>{V=!0}),[]),e};let q;function Y(){for(var e,t=arguments.length,n=new Array(t),r=0;r{r&&"rtl"===(0,l.getComputedStyle)(r).direction&&w(!0)}),[r]),!r)return null;const[x,E]=n.split("-"),R="top"===x||"bottom"===x;let T=d;(R&&null!=u&&u.x||!R&&null!=u&&u.y)&&(T=null);const S=2*f,C=S/2,O=c/2*(a/-8+1),k=s/2*a/4,A=!!p,L=T&&"end"===E?"bottom":"top";let M=T&&"end"===E?"right":"left";T&&b&&(M="end"===E?"left":"right");const I=null!=(null==i?void 0:i.x)?T||i.x:"",D=null!=(null==i?void 0:i.y)?T||i.y:"",N=p||"M0,0 H"+c+" L"+(c-O)+","+(s-k)+" Q"+c/2+","+s+" "+O+","+(s-k)+" Z",F={top:A?"rotate(180deg)":"",left:A?"rotate(90deg)":"rotate(-90deg)",bottom:A?"":"rotate(180deg)",right:A?"rotate(-90deg)":"rotate(90deg)"}[x];return o.createElement("svg",B({},h,{"aria-hidden":!0,ref:t,width:A?c:c+S,height:c,viewBox:"0 0 "+c+" "+(s>c?s:c),style:{position:"absolute",pointerEvents:"none",[M]:I,[L]:D,[x]:R||A?"100%":"calc(100% - "+S/2+"px)",transform:[F,g].filter((e=>!!e)).join(" "),...v}}),S>0&&o.createElement("path",{clipPath:"url(#"+y+")",fill:"none",stroke:m,strokeWidth:S+(p?0:1),d:N}),o.createElement("path",{stroke:S&&!p?h.fill:"none",d:N}),o.createElement("clipPath",{id:y},o.createElement("rect",{x:-C,y:C*(A?-1:1),width:c+S,height:c})))}));function G(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}const Z=o.createContext(null),J=o.createContext(null),Q=()=>{var e;return(null==(e=o.useContext(Z))?void 0:e.id)||null},ee=()=>o.useContext(J);function te(e){const t=U(),n=ee(),r=Q(),o=e||r;return P((()=>{const e={id:t,parentId:o};return null==n||n.addNode(e),()=>{null==n||n.removeNode(e)}}),[n,t,o]),t}function ne(e){const{children:t,id:n}=e,r=Q();return o.createElement(Z.Provider,{value:o.useMemo((()=>({id:n,parentId:r})),[n,r])},t)}function re(e){const{children:t}=e,n=o.useRef([]),r=o.useCallback((e=>{n.current=[...n.current,e]}),[]),i=o.useCallback((e=>{n.current=n.current.filter((t=>t!==e))}),[]),u=o.useState((()=>G()))[0];return o.createElement(J.Provider,{value:o.useMemo((()=>({nodesRef:n,addNode:r,removeNode:i,events:u})),[r,i,u])},t)}function oe(e){return"data-floating-ui-"+e}function ie(e){const t=(0,o.useRef)(e);return P((()=>{t.current=e})),t}const ue=oe("safe-polygon");function le(e,t,n){return n&&!(0,i.isMouseLikePointerType)(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}function ce(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:u,events:c,elements:s}=e,{enabled:a=!0,delay:f=0,handleClose:d=null,mouseOnly:m=!1,restMs:p=0,move:v=!0}=t,h=ee(),y=Q(),b=ie(d),w=ie(f),x=ie(n),E=o.useRef(),R=o.useRef(-1),T=o.useRef(),S=o.useRef(-1),C=o.useRef(!0),O=o.useRef(!1),k=o.useRef((()=>{})),A=o.useRef(!1),L=o.useCallback((()=>{var e;const t=null==(e=u.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t}),[u]);o.useEffect((()=>{if(a)return c.on("openchange",e),()=>{c.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(R.current),clearTimeout(S.current),C.current=!0,A.current=!1)}}),[a,c]),o.useEffect((()=>{if(!a)return;if(!b.current)return;if(!n)return;function e(e){L()&&r(!1,e,"hover")}const t=(0,i.getDocument)(s.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}}),[s.floating,n,r,a,b,L]);const M=o.useCallback((function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const o=le(w.current,"close",E.current);o&&!T.current?(clearTimeout(R.current),R.current=window.setTimeout((()=>r(!1,e,n)),o)):t&&(clearTimeout(R.current),r(!1,e,n))}),[w,r]),I=g((()=>{k.current(),T.current=void 0})),D=g((()=>{if(O.current){const e=(0,i.getDocument)(s.floating).body;e.style.pointerEvents="",e.removeAttribute(ue),O.current=!1}})),N=g((()=>!!u.current.openEvent&&["click","mousedown"].includes(u.current.openEvent.type)));o.useEffect((()=>{if(a&&(0,l.isElement)(s.domReference)){var e;const r=s.domReference;return n&&r.addEventListener("mouseleave",c),null==(e=s.floating)||e.addEventListener("mouseleave",c),v&&r.addEventListener("mousemove",t,{once:!0}),r.addEventListener("mouseenter",t),r.addEventListener("mouseleave",o),()=>{var e;n&&r.removeEventListener("mouseleave",c),null==(e=s.floating)||e.removeEventListener("mouseleave",c),v&&r.removeEventListener("mousemove",t),r.removeEventListener("mouseenter",t),r.removeEventListener("mouseleave",o)}}function t(e){if(clearTimeout(R.current),C.current=!1,m&&!(0,i.isMouseLikePointerType)(E.current)||p>0&&!le(w.current,"open"))return;const t=le(w.current,"open",E.current);t?R.current=window.setTimeout((()=>{x.current||r(!0,e,"hover")}),t):n||r(!0,e,"hover")}function o(e){if(N())return;k.current();const t=(0,i.getDocument)(s.floating);if(clearTimeout(S.current),A.current=!1,b.current&&u.current.floatingContext){n||clearTimeout(R.current),T.current=b.current({...u.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){D(),I(),N()||M(e,!0,"safe-polygon")}});const r=T.current;return t.addEventListener("mousemove",r),void(k.current=()=>{t.removeEventListener("mousemove",r)})}("touch"!==E.current||!(0,i.contains)(s.floating,e.relatedTarget))&&M(e)}function c(e){N()||u.current.floatingContext&&(null==b.current||b.current({...u.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){D(),I(),N()||M(e)}})(e))}}),[s,a,e,m,p,v,M,I,D,r,n,x,h,w,b,u,N]),P((()=>{var e;if(a&&n&&null!=(e=b.current)&&e.__options.blockPointerEvents&&L()){O.current=!0;const e=s.floating;if((0,l.isElement)(s.domReference)&&e){var t;const n=(0,i.getDocument)(s.floating).body;n.setAttribute(ue,"");const r=s.domReference,o=null==h||null==(t=h.nodesRef.current.find((e=>e.id===y)))||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,y,s,h,b,L]),P((()=>{n||(E.current=void 0,A.current=!1,I(),D())}),[n,I,D]),o.useEffect((()=>()=>{I(),clearTimeout(R.current),clearTimeout(S.current),D()}),[a,s.domReference,I,D]);const F=o.useMemo((()=>{function e(e){E.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function o(){C.current||x.current||r(!0,t,"hover")}m&&!(0,i.isMouseLikePointerType)(E.current)||n||0===p||A.current&&e.movementX**2+e.movementY**2<2||(clearTimeout(S.current),"touch"===E.current?o():(A.current=!0,S.current=window.setTimeout(o,p)))}}}),[m,r,n,x,p]),j=o.useMemo((()=>({onMouseEnter(){clearTimeout(R.current)},onMouseLeave(e){N()||M(e.nativeEvent,!1)}})),[M,N]);return o.useMemo((()=>a?{reference:F,floating:j}:{}),[a,F,j])}const se=()=>{},ae=o.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:se,setState:se,isInstantPhase:!1}),fe=()=>o.useContext(ae);function de(e){const{children:t,delay:n,timeoutMs:r=0}=e,[i,u]=o.useReducer(((e,t)=>({...e,...t})),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),l=o.useRef(null),c=o.useCallback((e=>{u({currentId:e})}),[]);return P((()=>{i.currentId?null===l.current?l.current=i.currentId:i.isInstantPhase||u({isInstantPhase:!0}):(i.isInstantPhase&&u({isInstantPhase:!1}),l.current=null)}),[i.currentId,i.isInstantPhase]),o.createElement(ae.Provider,{value:o.useMemo((()=>({...i,setState:u,setCurrentId:c})),[i,c])},t)}function me(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,floatingId:o}=e,{id:i,enabled:u=!0}=t,l=null!=i?i:o,c=fe(),{currentId:s,setCurrentId:a,initialDelay:f,setState:d,timeoutMs:m}=c;return P((()=>{u&&s&&(d({delay:{open:1,close:le(f,"close")}}),s!==l&&r(!1))}),[u,l,r,d,s,f]),P((()=>{function e(){r(!1),d({delay:f,currentId:null})}if(u&&s&&!n&&s===l){if(m){const t=window.setTimeout(e,m);return()=>{clearTimeout(t)}}e()}}),[u,n,d,s,l,r,f,m]),P((()=>{u&&a!==se&&n&&a(l)}),[u,n,a,l]),c}let pe=0;function ge(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(pe);const i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():pe=requestAnimationFrame(i)}function ve(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 he=new WeakMap,ye=new WeakSet,be={},we=0;const xe=()=>"undefined"!=typeof HTMLElement&&"inert"in HTMLElement.prototype,Ee=e=>e&&(e.host||Ee(e.parentNode)),Re=(e,t)=>t.map((t=>{if(e.contains(t))return t;const n=Ee(t);return e.contains(n)?n:null})).filter((e=>null!=e));function Te(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=(0,i.getDocument)(e[0]).body;return function(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,u=Re(t,e),c=new Set,s=new Set(u),a=[];be[o]||(be[o]=new WeakMap);const f=be[o];return u.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"!==(0,l.getNodeName)(t))if(c.has(t))e(t);else{const e=i?t.getAttribute(i):null,n=null!==e&&"false"!==e,r=(he.get(t)||0)+1,u=(f.get(t)||0)+1;he.set(t,r),f.set(t,u),a.push(t),1===r&&n&&ye.add(t),1===u&&t.setAttribute(o,""),!n&&i&&t.setAttribute(i,"true")}}))}(t),c.clear(),we++,()=>{a.forEach((e=>{const t=(he.get(e)||0)-1,n=(f.get(e)||0)-1;he.set(e,t),f.set(e,n),t||(!ye.has(e)&&i&&e.removeAttribute(i),ye.delete(e)),n||e.removeAttribute(o)})),we--,we||(he=new WeakMap,he=new WeakMap,ye=new WeakSet,be={})}}(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Se=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Ce(e,t){const n=(0,c.tabbable)(e,Se());"prev"===t&&n.reverse();const r=n.indexOf((0,i.activeElement)((0,i.getDocument)(e)));return n.slice(r+1)[0]}function Oe(){return Ce(document.body,"next")}function ke(){return Ce(document.body,"prev")}function Ae(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!(0,i.contains)(n,r)}function Pe(e){(0,c.tabbable)(e,Se()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function Le(e){e.querySelectorAll("[data-tabindex]").forEach((e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}))}const Me={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 Ie(e){"Tab"===e.key&&(e.target,clearTimeout(void 0))}const De=o.forwardRef((function(e,t){const[n,r]=o.useState();P((()=>((0,i.isSafari)()&&r("button"),document.addEventListener("keydown",Ie),()=>{document.removeEventListener("keydown",Ie)})),[]);const u={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[oe("focus-guard")]:"",style:Me};return o.createElement("span",B({},e,u))})),Ne=o.createContext(null),Fe=oe("portal");function je(e){void 0===e&&(e={});const{id:t,root:n}=e,r=U(),i=He(),[u,c]=o.useState(null),s=o.useRef(null);return P((()=>()=>{null==u||u.remove(),queueMicrotask((()=>{s.current=null}))}),[u]),P((()=>{if(!r)return;if(s.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=r,n.setAttribute(Fe,""),e.appendChild(n),s.current=n,c(n)}),[t,r]),P((()=>{if(null===n)return;if(!r)return;if(s.current)return;let e=n||(null==i?void 0:i.portalNode);e&&!(0,l.isElement)(e)&&(e=e.current),e=e||document.body;let o=null;t&&(o=document.createElement("div"),o.id=t,e.appendChild(o));const u=document.createElement("div");u.id=r,u.setAttribute(Fe,""),e=o||e,e.appendChild(u),s.current=u,c(u)}),[t,n,r,i]),u}function _e(e){const{children:t,id:n,root:r,preserveTabOrder:i=!0}=e,u=je({id:n,root:r}),[l,c]=o.useState(null),a=o.useRef(null),f=o.useRef(null),d=o.useRef(null),m=o.useRef(null),p=null==l?void 0:l.modal,g=null==l?void 0:l.open,v=!!l&&!l.modal&&l.open&&i&&!(!r&&!u);return o.useEffect((()=>{if(u&&i&&!p)return u.addEventListener("focusin",e,!0),u.addEventListener("focusout",e,!0),()=>{u.removeEventListener("focusin",e,!0),u.removeEventListener("focusout",e,!0)};function e(e){u&&Ae(e)&&("focusin"===e.type?Le:Pe)(u)}}),[u,i,p]),o.useEffect((()=>{u&&(g||Le(u))}),[g,u]),o.createElement(Ne.Provider,{value:o.useMemo((()=>({preserveTabOrder:i,beforeOutsideRef:a,afterOutsideRef:f,beforeInsideRef:d,afterInsideRef:m,portalNode:u,setFocusManagerState:c})),[i,u])},v&&u&&o.createElement(De,{"data-type":"outside",ref:a,onFocus:e=>{if(Ae(e,u)){var t;null==(t=d.current)||t.focus()}else{const e=ke()||(null==l?void 0:l.refs.domReference.current);null==e||e.focus()}}}),v&&u&&o.createElement("span",{"aria-owns":u.id,style:Me}),u&&s.createPortal(t,u),v&&u&&o.createElement(De,{"data-type":"outside",ref:f,onFocus:e=>{if(Ae(e,u)){var t;null==(t=m.current)||t.focus()}else{const t=Oe()||(null==l?void 0:l.refs.domReference.current);null==t||t.focus(),(null==l?void 0:l.closeOnFocusOut)&&(null==l||l.onOpenChange(!1,e.nativeEvent,"focus-out"))}}}))}const He=()=>o.useContext(Ne),We="data-floating-ui-focusable";function $e(e){return e?e.hasAttribute(We)?e:e.querySelector("["+We+"]")||e:null}const Be=20;let Ve=[];function Ke(e){Ve=Ve.filter((e=>e.isConnected));let t=e;if(t&&"body"!==(0,l.getNodeName)(t)){if(!(0,c.isTabbable)(t,Se())){const e=(0,c.tabbable)(t,Se())[0];e&&(t=e)}Ve.push(t),Ve.length>Be&&(Ve=Ve.slice(-Be))}}function ze(){return Ve.slice().reverse().find((e=>e.isConnected))}const Ue=o.forwardRef((function(e,t){return o.createElement("button",B({},e,{type:"button",ref:t,tabIndex:-1,style:Me}))}));function qe(e){const{context:t,children:n,disabled:r=!1,order:u=["content"],guards:s=!0,initialFocus:a=0,returnFocus:f=!0,restoreFocus:d=!1,modal:m=!0,visuallyHiddenDismiss:p=!1,closeOnFocusOut:v=!0}=e,{open:h,refs:y,nodeId:b,onOpenChange:w,events:x,dataRef:E,floatingId:R,elements:{domReference:T,floating:S}}=t,C="number"==typeof a&&a<0,O=(0,i.isTypeableCombobox)(T)&&C,k=!xe()||s,A=ie(u),L=ie(a),M=ie(f),I=ee(),D=He(),N=o.useRef(null),F=o.useRef(null),j=o.useRef(!1),_=o.useRef(!1),H=o.useRef(-1),W=null!=D,$=$e(S),B=g((function(e){return void 0===e&&(e=$),e?(0,c.tabbable)(e,Se()):[]})),V=g((e=>{const t=B(e);return A.current.map((e=>T&&"reference"===e?T:$&&"floating"===e?$:t)).filter(Boolean).flat()}));function K(e){return!r&&p&&m?o.createElement(Ue,{ref:"start"===e?N:F,onClick:e=>w(!1,e.nativeEvent)},"string"==typeof p?p:"Dismiss"):null}o.useEffect((()=>{if(r)return;if(!m)return;function e(e){if("Tab"===e.key){(0,i.contains)($,(0,i.activeElement)((0,i.getDocument)($)))&&0===B().length&&!O&&(0,i.stopEvent)(e);const t=V(),n=(0,i.getTarget)(e);"reference"===A.current[0]&&n===T&&((0,i.stopEvent)(e),e.shiftKey?ge(t[t.length-1]):ge(t[1])),"floating"===A.current[1]&&n===$&&e.shiftKey&&((0,i.stopEvent)(e),ge(t[0]))}}const t=(0,i.getDocument)($);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}),[r,T,$,m,A,O,B,V]),o.useEffect((()=>{if(!r&&S)return S.addEventListener("focusin",e),()=>{S.removeEventListener("focusin",e)};function e(e){const t=(0,i.getTarget)(e),n=B().indexOf(t);-1!==n&&(H.current=n)}}),[r,S,B]),o.useEffect((()=>{if(!r&&v)return S&&(0,l.isHTMLElement)(T)?(T.addEventListener("focusout",t),T.addEventListener("pointerdown",e),S.addEventListener("focusout",t),()=>{T.removeEventListener("focusout",t),T.removeEventListener("pointerdown",e),S.removeEventListener("focusout",t)}):void 0;function e(){_.current=!0,setTimeout((()=>{_.current=!1}))}function t(e){const t=e.relatedTarget;queueMicrotask((()=>{const n=!((0,i.contains)(T,t)||(0,i.contains)(S,t)||(0,i.contains)(t,S)||(0,i.contains)(null==D?void 0:D.portalNode,t)||null!=t&&t.hasAttribute(oe("focus-guard"))||I&&(ve(I.nodesRef.current,b).find((e=>{var n,r;return(0,i.contains)(null==(n=e.context)?void 0:n.elements.floating,t)||(0,i.contains)(null==(r=e.context)?void 0:r.elements.domReference,t)}))||function(e,t){var n;let r=[],o=null==(n=e.find((e=>e.id===t)))?void 0:n.parentId;for(;o;){const t=e.find((e=>e.id===o));o=null==t?void 0:t.parentId,t&&(r=r.concat(t))}return r}(I.nodesRef.current,b).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&&(0,i.activeElement)((0,i.getDocument)($))===(0,i.getDocument)($).body){(0,l.isHTMLElement)($)&&$.focus();const e=H.current,t=B(),n=t[e]||t[t.length-1]||$;(0,l.isHTMLElement)(n)&&n.focus()}!O&&m||!t||!n||_.current||t===ze()||(j.current=!0,w(!1,e,"focus-out"))}))}}),[r,T,S,$,m,b,I,D,w,v,d,B,O]),o.useEffect((()=>{var e;if(r)return;const t=Array.from((null==D||null==(e=D.portalNode)?void 0:e.querySelectorAll("["+oe("portal")+"]"))||[]);if(S){const e=[S,...t,N.current,F.current,A.current.includes("reference")||O?T:null].filter((e=>null!=e)),n=m||O?Te(e,k,!k):Te(e);return()=>{n()}}}),[r,T,S,m,A,D,O,k]),P((()=>{if(r||!(0,l.isHTMLElement)($))return;const e=(0,i.getDocument)($),t=(0,i.activeElement)(e);queueMicrotask((()=>{const e=V($),n=L.current,r=("number"==typeof n?e[n]:n.current)||$,o=(0,i.contains)($,t);C||o||!h||ge(r,{preventScroll:r===$})}))}),[r,h,$,C,V,L]),P((()=>{if(r||!$)return;let e=!1;const t=(0,i.getDocument)($),n=(0,i.activeElement)(t);let o=E.current.openEvent;function u(t){let{open:n,reason:r,event:u,nested:l}=t;n&&(o=u),"escape-key"===r&&y.domReference.current&&Ke(y.domReference.current),"hover"===r&&"mouseleave"===u.type&&(j.current=!0),"outside-press"===r&&(l?(j.current=!1,e=!0):j.current=!((0,i.isVirtualClick)(u)||(0,i.isVirtualPointerEvent)(u)))}Ke(n),x.on("openchange",u);const c=t.createElement("span");return c.setAttribute("tabindex","-1"),c.setAttribute("aria-hidden","true"),Object.assign(c.style,Me),W&&T&&T.insertAdjacentElement("afterend",c),()=>{x.off("openchange",u);const n=(0,i.activeElement)(t),r=(0,i.contains)(S,n)||I&&ve(I.nodesRef.current,b).some((e=>{var t;return(0,i.contains)(null==(t=e.context)?void 0:t.elements.floating,n)}));(r||o&&["click","mousedown"].includes(o.type))&&y.domReference.current&&Ke(y.domReference.current);const s="boolean"==typeof M.current?ze()||c:M.current.current||c;queueMicrotask((()=>{M.current&&!j.current&&(0,l.isHTMLElement)(s)&&(s===n||n===t.body||r)&&s.focus({preventScroll:e}),c.remove()}))}}),[r,S,$,M,E,y,x,I,b,W,T]),o.useEffect((()=>{queueMicrotask((()=>{j.current=!1}))}),[r]),P((()=>{if(!r&&D)return D.setFocusManagerState({modal:m,closeOnFocusOut:v,open:h,onOpenChange:w,refs:y}),()=>{D.setFocusManagerState(null)}}),[r,D,m,h,w,y,v]),P((()=>{if(r)return;if(!$)return;if("function"!=typeof MutationObserver)return;if(C)return;const e=()=>{const e=$.getAttribute("tabindex"),t=B(),n=(0,i.activeElement)((0,i.getDocument)(S)),r=t.indexOf(n);-1!==r&&(H.current=r),A.current.includes("floating")||n!==y.domReference.current&&0===t.length?"0"!==e&&$.setAttribute("tabindex","0"):"-1"!==e&&$.setAttribute("tabindex","-1")};e();const t=new MutationObserver(e);return t.observe($,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}}),[r,S,$,y,A,B,C]);const z=!r&&k&&(!m||!O)&&(W||m);return o.createElement(o.Fragment,null,z&&o.createElement(De,{"data-type":"inside",ref:null==D?void 0:D.beforeInsideRef,onFocus:e=>{if(m){const e=V();ge("reference"===u[0]?e[0]:e[e.length-1])}else if(null!=D&&D.preserveTabOrder&&D.portalNode)if(j.current=!1,Ae(e,D.portalNode)){const e=Oe()||T;null==e||e.focus()}else{var t;null==(t=D.beforeOutsideRef.current)||t.focus()}}}),!O&&K("start"),n,K("end"),z&&o.createElement(De,{"data-type":"inside",ref:null==D?void 0:D.afterInsideRef,onFocus:e=>{if(m)ge(V()[0]);else if(null!=D&&D.preserveTabOrder&&D.portalNode)if(v&&(j.current=!0),Ae(e,D.portalNode)){const e=ke()||T;null==e||e.focus()}else{var t;null==(t=D.afterOutsideRef.current)||t.focus()}}}))}let Ye=0,Xe=()=>{};const Ge=o.forwardRef((function(e,t){const{lockScroll:n=!1,...r}=e;return P((()=>{if(n)return Ye++,1===Ye&&(Xe=function(){const e=/iP(hone|ad|od)|iOS/.test((0,i.getPlatform)()),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,u=t.top?parseFloat(t.top):window.scrollY;if(t.overflow="hidden",r&&(t[n]=r+"px"),e){var l,c;const e=(null==(l=window.visualViewport)?void 0:l.offsetLeft)||0,n=(null==(c=window.visualViewport)?void 0:c.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(u-Math.floor(n))+"px",left:-(o-Math.floor(e))+"px",right:"0"})}return()=>{Object.assign(t,{overflow:"",[n]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(o,u))}}()),()=>{Ye--,0===Ye&&Xe()}}),[n]),o.createElement("div",B({ref:t},r,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...r.style}}))}));function Ze(e){return(0,l.isHTMLElement)(e.target)&&"BUTTON"===e.target.tagName}function Je(e){return(0,i.isTypeableElement)(e)}function Qe(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:u,elements:{domReference:l}}=e,{enabled:c=!0,event:s="click",toggle:a=!0,ignoreMouse:f=!1,keyboardHandlers:d=!0,stickIfOpen:m=!0}=t,p=o.useRef(),g=o.useRef(!1),v=o.useMemo((()=>({onPointerDown(e){p.current=e.pointerType},onMouseDown(e){const t=p.current;0===e.button&&"click"!==s&&((0,i.isMouseLikePointerType)(t,!0)&&f||(!n||!a||u.current.openEvent&&m&&"mousedown"!==u.current.openEvent.type?(e.preventDefault(),r(!0,e.nativeEvent,"click")):r(!1,e.nativeEvent,"click")))},onClick(e){const t=p.current;"mousedown"===s&&p.current?p.current=void 0:(0,i.isMouseLikePointerType)(t,!0)&&f||(!n||!a||u.current.openEvent&&m&&"click"!==u.current.openEvent.type?r(!0,e.nativeEvent,"click"):r(!1,e.nativeEvent,"click"))},onKeyDown(e){p.current=void 0,e.defaultPrevented||!d||Ze(e)||(" "!==e.key||Je(l)||(e.preventDefault(),g.current=!0),"Enter"===e.key&&r(!n||!a,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!d||Ze(e)||Je(l)||" "===e.key&&g.current&&(g.current=!1,r(!n||!a,e.nativeEvent,"click"))}})),[u,l,s,f,d,r,n,m,a]);return o.useMemo((()=>c?{reference:v}:{}),[c,v])}function et(e){return null!=e&&null!=e.clientX}function tt(e,t){void 0===t&&(t={});const{open:n,dataRef:r,elements:{floating:u,domReference:c},refs:s}=e,{enabled:a=!0,axis:f="both",x:d=null,y:m=null}=t,p=o.useRef(!1),v=o.useRef(null),[h,y]=o.useState(),[b,w]=o.useState([]),x=g(((e,t)=>{p.current||r.current.openEvent&&!et(r.current.openEvent)||s.setPositionReference(function(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const u=(null==e?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},l="x"===t.axis||"both"===t.axis,c="y"===t.axis||"both"===t.axis,s=["mouseenter","mousemove"].includes((null==(i=t.dataRef.current.openEvent)?void 0:i.type)||"")&&"touch"!==t.pointerType;let a=u.width,f=u.height,d=u.x,m=u.y;return null==n&&t.x&&l&&(n=u.x-t.x),null==r&&t.y&&c&&(r=u.y-t.y),d-=n||0,m-=r||0,a=0,f=0,!o||s?(a="y"===t.axis?u.width:0,f="x"===t.axis?u.height:0,d=l&&null!=t.x?t.x:d,m=c&&null!=t.y?t.y:m):o&&!s&&(f="x"===t.axis?u.height:f,a="y"===t.axis?u.width:a),o=!0,{width:a,height:f,x:d,y:m,top:m,right:d+a,bottom:m+f,left:d}}}}(c,{x:e,y:t,axis:f,dataRef:r,pointerType:h}))})),E=g((e=>{null==d&&null==m&&(n?v.current||w([]):x(e.clientX,e.clientY))})),R=(0,i.isMouseLikePointerType)(h)?u:n,T=o.useCallback((()=>{if(!R||!a||null!=d||null!=m)return;const e=(0,l.getWindow)(u);function t(n){const r=(0,i.getTarget)(n);(0,i.contains)(u,r)?(e.removeEventListener("mousemove",t),v.current=null):x(n.clientX,n.clientY)}if(!r.current.openEvent||et(r.current.openEvent)){e.addEventListener("mousemove",t);const n=()=>{e.removeEventListener("mousemove",t),v.current=null};return v.current=n,n}s.setPositionReference(c)}),[R,a,d,m,u,r,s,c,x]);o.useEffect((()=>T()),[T,b]),o.useEffect((()=>{a&&!u&&(p.current=!1)}),[a,u]),o.useEffect((()=>{!a&&n&&(p.current=!0)}),[a,n]),P((()=>{!a||null==d&&null==m||(p.current=!1,x(d,m))}),[a,d,m,x]);const S=o.useMemo((()=>{function e(e){let{pointerType:t}=e;y(t)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:E,onMouseEnter:E}}),[E]);return o.useMemo((()=>a?{reference:S}:{}),[a,S])}const nt={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},rt={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},ot=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 it(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:u,dataRef:c}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:f=!0,outsidePressEvent:d="pointerdown",referencePress:m=!1,referencePressEvent:p="pointerdown",ancestorScroll:v=!1,bubbles:h,capture:y}=t,b=ee(),w=g("function"==typeof f?f:()=>!1),x="function"==typeof f?w:f,E=o.useRef(!1),R=o.useRef(!1),{escapeKey:T,outsidePress:S}=ot(h),{escapeKey:C,outsidePress:O}=ot(y),k=o.useRef(!1),A=g((e=>{var t;if(!n||!s||!a||"Escape"!==e.key)return;if(k.current)return;const o=null==(t=c.current.floatingContext)?void 0:t.nodeId,u=b?ve(b.nodesRef.current,o):[];if(!T&&(e.stopPropagation(),u.length>0)){let e=!0;if(u.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}r(!1,(0,i.isReactEvent)(e)?e.nativeEvent:e,"escape-key")})),P=g((e=>{var t;const n=()=>{var t;A(e),null==(t=(0,i.getTarget)(e))||t.removeEventListener("keydown",n)};null==(t=(0,i.getTarget)(e))||t.addEventListener("keydown",n)})),L=g((e=>{var t;const n=E.current;E.current=!1;const o=R.current;if(R.current=!1,"click"===d&&o)return;if(n)return;if("function"==typeof x&&!x(e))return;const s=(0,i.getTarget)(e),a="["+oe("inert")+"]",f=(0,i.getDocument)(u.floating).querySelectorAll(a);let m=(0,l.isElement)(s)?s:null;for(;m&&!(0,l.isLastTraversableNode)(m);){const e=(0,l.getParentNode)(m);if((0,l.isLastTraversableNode)(e)||!(0,l.isElement)(e))break;m=e}if(f.length&&(0,l.isElement)(s)&&!(0,i.isRootElement)(s)&&!(0,i.contains)(s,u.floating)&&Array.from(f).every((e=>!(0,i.contains)(m,e))))return;if((0,l.isHTMLElement)(s)&&D){const t=s.clientWidth>0&&s.scrollWidth>s.clientWidth,n=s.clientHeight>0&&s.scrollHeight>s.clientHeight;let r=n&&e.offsetX>s.clientWidth;if(n&&"rtl"===(0,l.getComputedStyle)(s).direction&&(r=e.offsetX<=s.offsetWidth-s.clientWidth),r||t&&e.offsetY>s.clientHeight)return}const p=null==(t=c.current.floatingContext)?void 0:t.nodeId,g=b&&ve(b.nodesRef.current,p).some((t=>{var n;return(0,i.isEventTargetWithin)(e,null==(n=t.context)?void 0:n.elements.floating)}));if((0,i.isEventTargetWithin)(e,u.floating)||(0,i.isEventTargetWithin)(e,u.domReference)||g)return;const v=b?ve(b.nodesRef.current,p):[];if(v.length>0){let e=!0;if(v.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}r(!1,e,"outside-press")})),M=g((e=>{var t;const n=()=>{var t;L(e),null==(t=(0,i.getTarget)(e))||t.removeEventListener(d,n)};null==(t=(0,i.getTarget)(e))||t.addEventListener(d,n)}));o.useEffect((()=>{if(!n||!s)return;c.current.__escapeKeyBubbles=T,c.current.__outsidePressBubbles=S;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function o(){window.clearTimeout(e),k.current=!0}function f(){e=window.setTimeout((()=>{k.current=!1}),(0,l.isWebKit)()?5:0)}const m=(0,i.getDocument)(u.floating);a&&(m.addEventListener("keydown",C?P:A,C),m.addEventListener("compositionstart",o),m.addEventListener("compositionend",f)),x&&m.addEventListener(d,O?M:L,O);let p=[];return v&&((0,l.isElement)(u.domReference)&&(p=(0,l.getOverflowAncestors)(u.domReference)),(0,l.isElement)(u.floating)&&(p=p.concat((0,l.getOverflowAncestors)(u.floating))),!(0,l.isElement)(u.reference)&&u.reference&&u.reference.contextElement&&(p=p.concat((0,l.getOverflowAncestors)(u.reference.contextElement)))),p=p.filter((e=>{var t;return e!==(null==(t=m.defaultView)?void 0:t.visualViewport)})),p.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{a&&(m.removeEventListener("keydown",C?P:A,C),m.removeEventListener("compositionstart",o),m.removeEventListener("compositionend",f)),x&&m.removeEventListener(d,O?M:L,O),p.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[c,u,a,x,d,n,r,v,s,T,S,A,C,P,L,O,M]),o.useEffect((()=>{E.current=!1}),[x,d]);const I=o.useMemo((()=>({onKeyDown:A,[nt[p]]:e=>{m&&r(!1,e.nativeEvent,"reference-press")}})),[A,r,m,p]),D=o.useMemo((()=>({onKeyDown:A,onMouseDown(){R.current=!0},onMouseUp(){R.current=!0},[rt[d]]:()=>{E.current=!0}})),[A,d]);return o.useMemo((()=>s?{reference:I,floating:D}:{}),[s,I,D])}function ut(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=U(),u=o.useRef({}),[c]=o.useState((()=>G())),s=null!=Q();{const e=r.reference;e&&!(0,l.isElement)(e)&&function(){for(var e,t=arguments.length,n=new Array(t),r=0;r{u.current.openEvent=e?t:void 0,c.emit("openchange",{open:e,event:t,reason:r,nested:s}),null==n||n(e,t,r)})),m=o.useMemo((()=>({setPositionReference:f})),[]),p=o.useMemo((()=>({reference:a||r.reference||null,floating:r.floating||null,domReference:r.reference})),[a,r.reference,r.floating]);return o.useMemo((()=>({dataRef:u,open:t,onOpenChange:d,elements:p,events:c,floatingId:i,refs:m})),[t,d,p,c,i,m])}function lt(e){void 0===e&&(e={});const{nodeId:t}=e,n=ut({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[u,c]=o.useState(null),[s,f]=o.useState(null),d=(null==i?void 0:i.domReference)||u,m=o.useRef(null),p=ee();P((()=>{d&&(m.current=d)}),[d]);const g=(0,a.useFloating)({...e,elements:{...i,...s&&{reference:s}}}),v=o.useCallback((e=>{const t=(0,l.isElement)(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;f(t),g.refs.setReference(t)}),[g.refs]),h=o.useCallback((e=>{((0,l.isElement)(e)||null===e)&&(m.current=e,c(e)),((0,l.isElement)(g.refs.reference.current)||null===g.refs.reference.current||null!==e&&!(0,l.isElement)(e))&&g.refs.setReference(e)}),[g.refs]),y=o.useMemo((()=>({...g.refs,setReference:h,setPositionReference:v,domReference:m})),[g.refs,h,v]),b=o.useMemo((()=>({...g.elements,domReference:d})),[g.elements,d]),w=o.useMemo((()=>({...g,...r,refs:y,elements:b,nodeId:t})),[g,y,b,t,r]);return P((()=>{r.dataRef.current.floatingContext=w;const e=null==p?void 0:p.nodesRef.current.find((e=>e.id===t));e&&(e.context=w)})),o.useMemo((()=>({...g,context:w,refs:y,elements:b})),[g,y,b,w])}function ct(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,events:u,dataRef:c,elements:s}=e,{enabled:a=!0,visibleOnly:f=!0}=t,d=o.useRef(!1),m=o.useRef(),p=o.useRef(!0);o.useEffect((()=>{if(!a)return;const e=(0,l.getWindow)(s.domReference);function t(){!n&&(0,l.isHTMLElement)(s.domReference)&&s.domReference===(0,i.activeElement)((0,i.getDocument)(s.domReference))&&(d.current=!0)}function r(){p.current=!0}return e.addEventListener("blur",t),e.addEventListener("keydown",r,!0),()=>{e.removeEventListener("blur",t),e.removeEventListener("keydown",r,!0)}}),[s.domReference,n,a]),o.useEffect((()=>{if(a)return u.on("openchange",e),()=>{u.off("openchange",e)};function e(e){let{reason:t}=e;"reference-press"!==t&&"escape-key"!==t||(d.current=!0)}}),[u,a]),o.useEffect((()=>()=>{clearTimeout(m.current)}),[]);const g=o.useMemo((()=>({onPointerDown(e){(0,i.isVirtualPointerEvent)(e.nativeEvent)||(p.current=!1)},onMouseLeave(){d.current=!1},onFocus(e){if(d.current)return;const t=(0,i.getTarget)(e.nativeEvent);if(f&&(0,l.isElement)(t))try{if((0,i.isSafari)()&&(0,i.isMac)())throw Error();if(!t.matches(":focus-visible"))return}catch(e){if(!p.current&&!(0,i.isTypeableElement)(t))return}r(!0,e.nativeEvent,"focus")},onBlur(e){d.current=!1;const t=e.relatedTarget,n=e.nativeEvent,o=(0,l.isElement)(t)&&t.hasAttribute(oe("focus-guard"))&&"outside"===t.getAttribute("data-type");m.current=window.setTimeout((()=>{var e;const u=(0,i.activeElement)(s.domReference?s.domReference.ownerDocument:document);(t||u!==s.domReference)&&((0,i.contains)(null==(e=c.current.floatingContext)?void 0:e.refs.floating.current,u)||(0,i.contains)(s.domReference,u)||o||r(!1,n,"focus"))}))}})),[c,s.domReference,r,f]);return o.useMemo((()=>a?{reference:g}:{}),[a,g])}const st="active",at="selected";function ft(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[st]:t,[at]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[We]:""},...i,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,i]=t;var u;o&&[st,at].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(u=r.get(n))||u.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;ie(...o))).find((e=>void 0!==e))})):e[n]=i)})),e):e),{})}}function dt(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),i=o.useCallback((t=>ft(t,e,"reference")),t),u=o.useCallback((t=>ft(t,e,"floating")),n),l=o.useCallback((t=>ft(t,e,"item")),r);return o.useMemo((()=>({getReferenceProps:i,getFloatingProps:u,getItemProps:l})),[i,u,l])}let mt=!1;function pt(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function gt(e,t){return pt(t,e===v||e===h,e===y||e===b)}function vt(e,t,n){return pt(t,e===h,n?e===y:e===b)||"Enter"===e||" "===e||""===e}function ht(e,t,n){return pt(t,n?e===b:e===y,e===v)}function yt(e,t){const{open:n,onOpenChange:r,elements:u}=e,{listRef:c,activeIndex:s,onNavigate:a=()=>{},enabled:f=!0,selectedIndex:d=null,allowEscape:m=!1,loop:p=!1,nested:v=!1,rtl:w=!1,virtual:L=!1,focusItemOnOpen:M="auto",focusItemOnHover:I=!0,openOnArrowKeyDown:D=!0,disabledIndices:N,orientation:F="vertical",cols:j=1,scrollItemIntoView:_=!0,virtualItemRef:H,itemSizes:W,dense:$=!1}=t;m&&(p||Y("`useListNavigation` looping must be enabled to allow escaping."),L||Y("`useListNavigation` must be virtual to allow escaping.")),"vertical"===F&&j>1&&Y("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".');const B=ie($e(u.floating)),V=Q(),K=ee(),z=g(a),U=(0,i.isTypeableCombobox)(u.domReference),q=o.useRef(M),X=o.useRef(null!=d?d:-1),G=o.useRef(null),Z=o.useRef(!0),J=o.useRef(z),te=o.useRef(!!u.floating),ne=o.useRef(n),re=o.useRef(!1),oe=o.useRef(!1),ue=ie(N),le=ie(n),ce=ie(_),se=ie(d),[ae,fe]=o.useState(),[de,me]=o.useState(),pe=g((function(e,t,n){function r(e){L?(fe(e.id),null==K||K.events.emit("virtualfocus",e),H&&(H.current=e)):ge(e,{preventScroll:!0,sync:!(!(0,i.isMac)()||!(0,i.isSafari)())&&(mt||re.current)})}void 0===n&&(n=!1);const o=e.current[t.current];o&&r(o),requestAnimationFrame((()=>{const i=e.current[t.current]||o;if(!i)return;o||r(i);const u=ce.current;u&&ye&&(n||!Z.current)&&(null==i.scrollIntoView||i.scrollIntoView("boolean"==typeof u?{block:"nearest",inline:"nearest"}:u))}))}));P((()=>{document.createElement("div").focus({get preventScroll(){return mt=!0,!1}})}),[]),P((()=>{f&&(n&&u.floating?q.current&&null!=d&&(oe.current=!0,X.current=d,z(d)):te.current&&(X.current=-1,J.current(null)))}),[f,n,u.floating,d,z]),P((()=>{if(f&&n&&u.floating)if(null==s){if(re.current=!1,null!=se.current)return;if(te.current&&(X.current=-1,pe(c,X)),(!ne.current||!te.current)&&q.current&&(null!=G.current||!0===q.current&&null==G.current)){let e=0;const t=()=>{null==c.current[0]?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e++):(X.current=null==G.current||vt(G.current,F,w)||v?E(c,ue.current):R(c,ue.current),G.current=null,z(X.current))};t()}}else x(c,s)||(X.current=s,pe(c,X,oe.current),oe.current=!1)}),[f,n,u.floating,s,se,v,c,F,w,z,pe,ue]),P((()=>{var e;if(!f||u.floating||!K||L||!te.current)return;const t=K.nodesRef.current,n=null==(e=t.find((e=>e.id===V)))||null==(e=e.context)?void 0:e.elements.floating,r=(0,i.activeElement)((0,i.getDocument)(u.floating)),o=t.some((e=>e.context&&(0,i.contains)(e.context.elements.floating,r)));n&&!o&&Z.current&&n.focus({preventScroll:!0})}),[f,u.floating,K,V,L]),P((()=>{if(f&&K&&L&&!V)return K.events.on("virtualfocus",e),()=>{K.events.off("virtualfocus",e)};function e(e){me(e.id),H&&(H.current=e)}}),[f,K,L,V,H]),P((()=>{J.current=z,te.current=!!u.floating})),P((()=>{n||(G.current=null)}),[n]),P((()=>{ne.current=n}),[n]);const he=null!=s,ye=o.useMemo((()=>{function e(e){if(!n)return;const t=c.current.indexOf(e);-1!==t&&z(t)}return{onFocus(t){let{currentTarget:n}=t;e(n)},onClick:e=>{let{currentTarget:t}=e;return t.focus({preventScroll:!0})},...I&&{onMouseMove(t){let{currentTarget:n}=t;e(n)},onPointerLeave(e){let{pointerType:t}=e;Z.current&&"touch"!==t&&(X.current=-1,pe(c,X),z(null),L||ge(B.current,{preventScroll:!0}))}}}}),[n,B,pe,I,c,z,L]),be=g((e=>{if(Z.current=!1,re.current=!0,229===e.which)return;if(!le.current&&e.currentTarget===B.current)return;if(v&&ht(e.key,F,w))return(0,i.stopEvent)(e),r(!1,e.nativeEvent,"list-navigation"),void((0,l.isHTMLElement)(u.domReference)&&(L?null==K||K.events.emit("virtualfocus",u.domReference):u.domReference.focus()));const t=X.current,o=E(c,N),s=R(c,N);if(U||("Home"===e.key&&((0,i.stopEvent)(e),X.current=o,z(X.current)),"End"===e.key&&((0,i.stopEvent)(e),X.current=s,z(X.current))),j>1){const t=W||Array.from({length:c.current.length},(()=>({width:1,height:1}))),n=C(t,j,$),r=n.findIndex((e=>null!=e&&!A(c.current,e,N))),i=n.reduce(((e,t,n)=>null==t||A(c.current,t,N)?e:n),-1),u=n[S({current:n.map((e=>null!=e?c.current[e]:null))},{event:e,orientation:F,loop:p,rtl:w,cols:j,disabledIndices:k([...N||c.current.map(((e,t)=>A(c.current,t)?t:void 0)),void 0],n),minIndex:r,maxIndex:i,prevIndex:O(X.current>s?o:X.current,t,n,j,e.key===h?"bl":e.key===(w?y:b)?"tr":"tl"),stopEvent:!0})];if(null!=u&&(X.current=u,z(X.current)),"both"===F)return}if(gt(e.key,F)){if((0,i.stopEvent)(e),n&&!L&&(0,i.activeElement)(e.currentTarget.ownerDocument)===e.currentTarget)return X.current=vt(e.key,F,w)?o:s,void z(X.current);vt(e.key,F,w)?X.current=p?t>=s?m&&t!==c.current.length?-1:o:T(c,{startingIndex:t,disabledIndices:N}):Math.min(s,T(c,{startingIndex:t,disabledIndices:N})):X.current=p?t<=o?m&&-1!==t?c.current.length:s:T(c,{startingIndex:t,decrement:!0,disabledIndices:N}):Math.max(o,T(c,{startingIndex:t,decrement:!0,disabledIndices:N})),x(c,X.current)?z(null):z(X.current)}})),we=o.useMemo((()=>L&&n&&he&&{"aria-activedescendant":de||ae}),[L,n,he,de,ae]),xe=o.useMemo((()=>({"aria-orientation":"both"===F?void 0:F,...!(0,i.isTypeableCombobox)(u.domReference)&&we,onKeyDown:be,onPointerMove(){Z.current=!0}})),[we,be,u.domReference,F]),Ee=o.useMemo((()=>{function e(e){"auto"===M&&(0,i.isVirtualClick)(e.nativeEvent)&&(q.current=!0)}return{...we,onKeyDown(e){Z.current=!1;const t=e.key.startsWith("Arrow"),o=["Home","End"].includes(e.key),u=t||o,l=function(e,t,n){return pt(t,n?e===y:e===b,e===h)}(e.key,F,w),s=ht(e.key,F,w),a=gt(e.key,F),f=(v?l:a)||"Enter"===e.key||""===e.key.trim();if(L&&n){const t=null==K?void 0:K.nodesRef.current.find((e=>null==e.parentId)),n=K&&t?function(e,t){let n,r=-1;return function t(o,i){i>r&&(n=o,r=i),ve(e,o).forEach((e=>{t(e.id,i+1)}))}(t,0),e.find((e=>e.id===n))}(K.nodesRef.current,t.id):null;if(u&&n&&H){const t=new KeyboardEvent("keydown",{key:e.key,bubbles:!0});if(l||s){var m,p;const r=(null==(m=n.context)?void 0:m.elements.domReference)===e.currentTarget,o=s&&!r?null==(p=n.context)?void 0:p.elements.domReference:l?c.current.find((e=>(null==e?void 0:e.id)===ae)):null;o&&((0,i.stopEvent)(e),o.dispatchEvent(t),me(void 0))}var g;if((a||o)&&n.context&&n.context.open&&n.parentId&&e.currentTarget!==n.context.elements.domReference)return(0,i.stopEvent)(e),void(null==(g=n.context.elements.domReference)||g.dispatchEvent(t))}return be(e)}(n||D||!t)&&(f&&(G.current=v&&a?null:e.key),v?l&&((0,i.stopEvent)(e),n?(X.current=E(c,ue.current),z(X.current)):r(!0,e.nativeEvent,"list-navigation")):a&&(null!=d&&(X.current=d),(0,i.stopEvent)(e),!n&&D?r(!0,e.nativeEvent,"list-navigation"):be(e),n&&z(X.current)))},onFocus(){n&&!L&&z(null)},onPointerDown:function(e){q.current=M,"auto"===M&&(0,i.isVirtualPointerEvent)(e.nativeEvent)&&(q.current=!0)},onMouseDown:e,onClick:e}}),[ae,we,be,ue,M,c,v,z,r,n,D,F,w,d,K,L,H]);return o.useMemo((()=>f?{reference:Ee,floating:xe,item:ye}:{}),[f,Ee,xe,ye])}const bt=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function wt(e,t){var n;void 0===t&&(t={});const{open:r,floatingId:i}=e,{enabled:u=!0,role:l="dialog"}=t,c=null!=(n=bt.get(l))?n:l,s=U(),a=null!=Q(),f=o.useMemo((()=>"tooltip"===c||"label"===l?{["aria-"+("label"===l?"labelledby":"describedby")]:r?i:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":"alertdialog"===c?"dialog":c,"aria-controls":r?i:void 0,..."listbox"===c&&{role:"combobox"},..."menu"===c&&{id:s},..."menu"===c&&a&&{role:"menuitem"},..."select"===l&&{"aria-autocomplete":"none"},..."combobox"===l&&{"aria-autocomplete":"list"}}),[c,i,a,r,s,l]),d=o.useMemo((()=>{const e={id:i,...c&&{role:c}};return"tooltip"===c||"label"===l?e:{...e,..."menu"===c&&{"aria-labelledby":s}}}),[c,i,s,l]),m=o.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:i+"-option"}};switch(l){case"select":return{...r,"aria-selected":t&&n};case"combobox":return{...r,...t&&{"aria-selected":!0}}}return{}}),[i,l]);return o.useMemo((()=>u?{reference:f,floating:d,item:m}:{}),[u,f,d,m])}const xt=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((e,t)=>(t?"-":"")+e.toLowerCase()));function Et(e,t){return"function"==typeof e?e(t):e}function Rt(e,t){void 0===t&&(t={});const{open:n,elements:{floating:r}}=e,{duration:i=250}=t,u=("number"==typeof i?i:i.close)||0,[l,c]=o.useState("unmounted"),s=function(e,t){const[n,r]=o.useState(e);return e&&!n&&r(!0),o.useEffect((()=>{if(!e&&n){const e=setTimeout((()=>r(!1)),t);return()=>clearTimeout(e)}}),[e,n,t]),n}(n,u);return s||"close"!==l||c("unmounted"),P((()=>{if(r){if(n){c("initial");const e=requestAnimationFrame((()=>{c("open")}));return()=>{cancelAnimationFrame(e)}}c("close")}}),[n,r]),{isMounted:s,status:l}}function Tt(e,t){void 0===t&&(t={});const{initial:n={opacity:0},open:r,close:i,common:u,duration:l=250}=t,c=e.placement,s=c.split("-")[0],a=o.useMemo((()=>({side:s,placement:c})),[s,c]),f="number"==typeof l,d=(f?l:l.open)||0,m=(f?l:l.close)||0,[p,g]=o.useState((()=>({...Et(u,a),...Et(n,a)}))),{isMounted:v,status:h}=Rt(e,{duration:l}),y=ie(n),b=ie(r),w=ie(i),x=ie(u);return P((()=>{const e=Et(y.current,a),t=Et(w.current,a),n=Et(x.current,a),r=Et(b.current,a)||Object.keys(e).reduce(((e,t)=>(e[t]="",e)),{});if("initial"===h&&g((t=>({transitionProperty:t.transitionProperty,...n,...e}))),"open"===h&&g({transitionProperty:Object.keys(r).map(xt).join(","),transitionDuration:d+"ms",...n,...r}),"close"===h){const r=t||e;g({transitionProperty:Object.keys(r).map(xt).join(","),transitionDuration:m+"ms",...n,...r})}}),[m,w,y,b,x,d,h,a]),{isMounted:v,styles:p}}function St(e,t){var n;const{open:r,dataRef:u}=e,{listRef:l,activeIndex:c,onMatch:s,onTypingChange:a,enabled:f=!0,findMatch:d=null,resetMs:m=750,ignoreKeys:p=[],selectedIndex:v=null}=t,h=o.useRef(),y=o.useRef(""),b=o.useRef(null!=(n=null!=v?v:c)?n:-1),w=o.useRef(null),x=g(s),E=g(a),R=ie(d),T=ie(p);P((()=>{r&&(clearTimeout(h.current),w.current=null,y.current="")}),[r]),P((()=>{var e;r&&""===y.current&&(b.current=null!=(e=null!=v?v:c)?e:-1)}),[r,v,c]);const S=g((e=>{e?u.current.typing||(u.current.typing=e,E(e)):u.current.typing&&(u.current.typing=e,E(e))})),C=g((e=>{function t(e,t,n){const r=R.current?R.current(t,n):t.find((e=>0===(null==e?void 0:e.toLocaleLowerCase().indexOf(n.toLocaleLowerCase()))));return r?e.indexOf(r):-1}const n=l.current;if(y.current.length>0&&" "!==y.current[0]&&(-1===t(n,n,y.current)?S(!1):" "===e.key&&(0,i.stopEvent)(e)),null==n||T.current.includes(e.key)||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;r&&" "!==e.key&&((0,i.stopEvent)(e),S(!0)),n.every((e=>{var t,n;return!e||(null==(t=e[0])?void 0:t.toLocaleLowerCase())!==(null==(n=e[1])?void 0:n.toLocaleLowerCase())}))&&y.current===e.key&&(y.current="",b.current=w.current),y.current+=e.key,clearTimeout(h.current),h.current=setTimeout((()=>{y.current="",b.current=w.current,S(!1)}),m);const o=b.current,u=t(n,[...n.slice((o||0)+1),...n.slice(0,(o||0)+1)],y.current);-1!==u?(x(u),w.current=u):" "!==e.key&&(y.current="",S(!1))})),O=o.useMemo((()=>({onKeyDown:C})),[C]),k=o.useMemo((()=>({onKeyDown:C,onKeyUp(e){" "===e.key&&S(!1)}})),[C,S]);return o.useMemo((()=>f?{reference:O,floating:k}:{}),[f,O,k])}function Ct(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const Ot=e=>({name:"inner",options:e,async fn(t){const{listRef:n,overflowRef:r,onFallbackChange:o,offset:i=0,index:l=0,minItemsVisible:c=4,referenceOverflowThreshold:d=0,scrollRef:m,...p}=(0,u.evaluate)(e,t),{rects:g,elements:{floating:v}}=t,h=n.current[l],y=(null==m?void 0:m.current)||v,b=v.clientTop||y.clientTop,w=0!==v.clientTop,x=0!==y.clientTop,E=v===y;if(t.placement.startsWith("bottom")||Y('`placement` side must be "bottom" when using the `inner`',"middleware."),!h)return{};const R={...t,...await(0,a.offset)(-h.offsetTop-v.clientTop-g.reference.height/2-h.offsetHeight/2-i).fn(t)},T=await(0,f.detectOverflow)(Ct(R,y.scrollHeight+b+v.clientTop),p),S=await(0,f.detectOverflow)(R,{...p,elementContext:"reference"}),C=(0,u.max)(0,T.top),O=R.y+C,k=(y.scrollHeight>y.clientHeight?e=>e:u.round)((0,u.max)(0,y.scrollHeight+(w&&E||x?2*b:0)-C-(0,u.max)(0,T.bottom)));if(y.style.maxHeight=k+"px",y.scrollTop=C,o){const e=y.offsetHeight=-d||S.bottom>=-d;s.flushSync((()=>o(e)))}return r&&(r.current=await(0,f.detectOverflow)(Ct({...R,y:O},y.offsetHeight+b+v.clientTop),p)),{y:O}}});function kt(e,t){const{open:n,elements:r}=e,{enabled:u=!0,overflowRef:l,scrollRef:c,onChange:a}=t,f=g(a),d=o.useRef(!1),m=o.useRef(null),p=o.useRef(null);o.useEffect((()=>{if(!u)return;function e(e){if(e.ctrlKey||!t||null==l.current)return;const n=e.deltaY,r=l.current.top>=-.5,o=l.current.bottom>=-.5,u=t.scrollHeight-t.clientHeight,c=n<0?-1:1,a=n<0?"max":"min";t.scrollHeight<=t.clientHeight||(!r&&n>0||!o&&n<0?(e.preventDefault(),s.flushSync((()=>{f((e=>e+Math[a](n,u*c)))}))):/firefox/i.test((0,i.getUserAgent)())&&(t.scrollTop+=n))}const t=(null==c?void 0:c.current)||r.floating;return n&&t?(t.addEventListener("wheel",e),requestAnimationFrame((()=>{m.current=t.scrollTop,null!=l.current&&(p.current={...l.current})})),()=>{m.current=null,p.current=null,t.removeEventListener("wheel",e)}):void 0}),[u,n,r.floating,l,c,f]);const v=o.useMemo((()=>({onKeyDown(){d.current=!0},onWheel(){d.current=!1},onPointerMove(){d.current=!1},onScroll(){const e=(null==c?void 0:c.current)||r.floating;if(l.current&&e&&d.current){if(null!==m.current){const t=e.scrollTop-m.current;(l.current.bottom<-.5&&t<-1||l.current.top<-.5&&t>1)&&s.flushSync((()=>f((e=>e+t))))}requestAnimationFrame((()=>{m.current=e.scrollTop}))}}})),[r.floating,f,l,c]);return o.useMemo((()=>u?{floating:v}:{}),[u,v])}function At(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let e=0,u=i-1;e=r!=s>=r&&n<=(c-i)*(r-l)/(s-l)+i&&(o=!o)}return o}function Pt(e){void 0===e&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,u=!1,c=null,s=null,a=performance.now();const f=e=>{let{x:n,y:f,placement:d,elements:m,onClose:p,nodeId:g,tree:v}=e;return function(e){function h(){clearTimeout(o),p()}if(clearTimeout(o),!m.domReference||!m.floating||null==d||null==n||null==f)return;const{clientX:y,clientY:b}=e,w=[y,b],x=(0,i.getTarget)(e),E="mouseleave"===e.type,R=(0,i.contains)(m.floating,x),T=(0,i.contains)(m.domReference,x),S=m.domReference.getBoundingClientRect(),C=m.floating.getBoundingClientRect(),O=d.split("-")[0],k=n>C.right-C.width/2,A=f>C.bottom-C.height/2,P=function(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}(w,S),L=C.width>S.width,M=C.height>S.height,I=(L?S:C).left,D=(L?S:C).right,N=(M?S:C).top,F=(M?S:C).bottom;if(R&&(u=!0,!E))return;if(T&&(u=!1),T&&!E)return void(u=!0);if(E&&(0,l.isElement)(e.relatedTarget)&&(0,i.contains)(m.floating,e.relatedTarget))return;if(v&&ve(v.nodesRef.current,g).some((e=>{let{context:t}=e;return null==t?void 0:t.open})))return;if("top"===O&&f>=S.bottom-1||"bottom"===O&&f<=S.top+1||"left"===O&&n>=S.right-1||"right"===O&&n<=S.left+1)return h();let j=[];switch(O){case"top":j=[[I,S.top+1],[I,C.bottom-1],[D,C.bottom-1],[D,S.top+1]];break;case"bottom":j=[[I,C.top+1],[I,S.bottom-1],[D,S.bottom-1],[D,C.top+1]];break;case"left":j=[[C.right-1,F],[C.right-1,N],[S.left+1,N],[S.left+1,F]];break;case"right":j=[[S.right-1,F],[S.right-1,N],[C.left+1,N],[C.left+1,F]]}if(!At([y,b],j)){if(u&&!P)return h();if(!E&&r){const t=function(e,t){const n=performance.now(),r=n-a;if(null===c||null===s||0===r)return c=e,s=t,a=n,null;const o=e-c,i=t-s,u=Math.sqrt(o*o+i*i);return c=e,s=t,a=n,u/r}(e.clientX,e.clientY);if(null!==t&&t<.1)return h()}At([y,b],function(e){let[n,r]=e;switch(O){case"top":return[[L?n+t/2:k?n+4*t:n-4*t,r+t+1],[L?n-t/2:k?n+4*t:n-4*t,r+t+1],[C.left,k||L?C.bottom-t:C.top],[C.right,k?L?C.bottom-t:C.top:C.bottom-t]];case"bottom":return[[L?n+t/2:k?n+4*t:n-4*t,r-t],[L?n-t/2:k?n+4*t:n-4*t,r-t],[C.left,k||L?C.top+t:C.bottom],[C.right,k?L?C.top+t:C.bottom:C.top+t]];case"left":{const e=[n+t+1,M?r+t/2:A?r+4*t:r-4*t],o=[n+t+1,M?r-t/2:A?r+4*t:r-4*t];return[[A||M?C.right-t:C.left,C.top],[A?M?C.right-t:C.left:C.right-t,C.bottom],e,o]}case"right":return[[n-t,M?r+t/2:A?r+4*t:r-4*t],[n-t,M?r-t/2:A?r+4*t:r-4*t],[A||M?C.left+t:C.right,C.top],[A?M?C.left+t:C.right:C.left+t,C.bottom]]}}([n,f]))?!u&&r&&(o=window.setTimeout(h,40)):h()}}};return f.__options={blockPointerEvents:n},f}},"./node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs":function(e,t,n){n.r(t),n.d(t,{TYPEABLE_SELECTOR:function(){return w},activeElement:function(){return o},contains:function(){return i},getDocument:function(){return h},getPlatform:function(){return u},getTarget:function(){return b},getUserAgent:function(){return l},isAndroid:function(){return f},isEventTargetWithin:function(){return y},isJSDOM:function(){return m},isMac:function(){return d},isMouseLikePointerType:function(){return p},isReactEvent:function(){return g},isRootElement:function(){return v},isSafari:function(){return a},isTypeableCombobox:function(){return R},isTypeableElement:function(){return x},isVirtualClick:function(){return c},isVirtualPointerEvent:function(){return s},stopEvent:function(){return E}});var r=n("./node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs");function o(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}function i(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&(0,r.isShadowRoot)(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function u(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function l(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:n}=e;return t+"/"+n})).join(" "):navigator.userAgent}function c(e){return!(0!==e.mozInputSource||!e.isTrusted)||(f()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function s(e){return!m()&&(!f()&&0===e.width&&0===e.height||f()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function a(){return/apple/i.test(navigator.vendor)}function f(){const e=/android/i;return e.test(u())||e.test(l())}function d(){return u().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function m(){return l().includes("jsdom/")}function p(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function g(e){return"nativeEvent"in e}function v(e){return e.matches("html,body")}function h(e){return(null==e?void 0:e.ownerDocument)||document}function y(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function b(e){return"composedPath"in e?e.composedPath()[0]:e.target}const w="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function x(e){return(0,r.isHTMLElement)(e)&&e.matches(w)}function E(e){e.preventDefault(),e.stopPropagation()}function R(e){return!!e&&"combobox"===e.getAttribute("role")&&x(e)}},"./node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs":function(e,t,n){function r(){return"undefined"!=typeof window}function o(e){return l(e)?(e.nodeName||"").toLowerCase():"#document"}function i(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function u(e){var t;return null==(t=(l(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function l(e){return!!r()&&(e instanceof Node||e instanceof i(e).Node)}function c(e){return!!r()&&(e instanceof Element||e instanceof i(e).Element)}function s(e){return!!r()&&(e instanceof HTMLElement||e instanceof i(e).HTMLElement)}function a(e){return!(!r()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof i(e).ShadowRoot)}function f(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=y(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function d(e){return["table","td","th"].includes(o(e))}function m(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function p(e){const t=v(),n=c(e)?y(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function g(e){let t=w(e);for(;s(t)&&!h(t);){if(p(t))return t;if(m(t))return null;t=w(t)}return null}function v(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function h(e){return["html","body","#document"].includes(o(e))}function y(e){return i(e).getComputedStyle(e)}function b(e){return c(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function w(e){if("html"===o(e))return e;const t=e.assignedSlot||e.parentNode||a(e)&&e.host||u(e);return a(t)?t.host:t}function x(e){const t=w(e);return h(t)?e.ownerDocument?e.ownerDocument.body:e.body:s(t)&&f(t)?t:x(t)}function E(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=x(e),u=o===(null==(r=e.ownerDocument)?void 0:r.body),l=i(o);if(u){const e=R(l);return t.concat(l,l.visualViewport||[],f(o)?o:[],e&&n?E(e):[])}return t.concat(o,E(o,[],n))}function R(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}n.r(t),n.d(t,{getComputedStyle:function(){return y},getContainingBlock:function(){return g},getDocumentElement:function(){return u},getFrameElement:function(){return R},getNearestOverflowAncestor:function(){return x},getNodeName:function(){return o},getNodeScroll:function(){return b},getOverflowAncestors:function(){return E},getParentNode:function(){return w},getWindow:function(){return i},isContainingBlock:function(){return p},isElement:function(){return c},isHTMLElement:function(){return s},isLastTraversableNode:function(){return h},isNode:function(){return l},isOverflowElement:function(){return f},isShadowRoot:function(){return a},isTableElement:function(){return d},isTopLayer:function(){return m},isWebKit:function(){return v}})},"./node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs":function(e,t,n){n.r(t),n.d(t,{alignments:function(){return o},clamp:function(){return m},createCoords:function(){return a},evaluate:function(){return p},expandPaddingObject:function(){return C},floor:function(){return s},getAlignment:function(){return v},getAlignmentAxis:function(){return w},getAlignmentSides:function(){return x},getAxisLength:function(){return y},getExpandedPlacements:function(){return E},getOppositeAlignmentPlacement:function(){return R},getOppositeAxis:function(){return h},getOppositeAxisPlacements:function(){return T},getOppositePlacement:function(){return S},getPaddingObject:function(){return O},getSide:function(){return g},getSideAxis:function(){return b},max:function(){return l},min:function(){return u},placements:function(){return i},rectToClientRect:function(){return k},round:function(){return c},sides:function(){return r}});const r=["top","right","bottom","left"],o=["start","end"],i=r.reduce(((e,t)=>e.concat(t,t+"-"+o[0],t+"-"+o[1])),[]),u=Math.min,l=Math.max,c=Math.round,s=Math.floor,a=e=>({x:e,y:e}),f={left:"right",right:"left",bottom:"top",top:"bottom"},d={start:"end",end:"start"};function m(e,t,n){return l(e,u(t,n))}function p(e,t){return"function"==typeof e?e(t):e}function g(e){return e.split("-")[0]}function v(e){return e.split("-")[1]}function h(e){return"x"===e?"y":"x"}function y(e){return"y"===e?"height":"width"}function b(e){return["top","bottom"].includes(g(e))?"y":"x"}function w(e){return h(b(e))}function x(e,t,n){void 0===n&&(n=!1);const r=v(e),o=w(e),i=y(o);let u="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(u=S(u)),[u,S(u)]}function E(e){const t=S(e);return[R(e),t,R(t)]}function R(e){return e.replace(/start|end/g,(e=>d[e]))}function T(e,t,n,r){const o=v(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],u=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:u;default:return[]}}(g(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(R)))),i}function S(e){return e.replace(/left|right|bottom|top/g,(e=>f[e]))}function C(e){return{top:0,right:0,bottom:0,left:0,...e}}function O(e){return"number"!=typeof e?C(e):{top:e,right:e,bottom:e,left:e}}function k(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return n[e](i,i.exports,o),i.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);o.r(i);var u={};e=e||[null,t({}),t([]),t(t)];for(var l=2&r&&n;"object"==typeof l&&!~e.indexOf(l);l=t(l))Object.getOwnPropertyNames(l).forEach((function(e){u[e]=function(){return n[e]}}));return u.default=function(){return n},o.d(i,u),i},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};!function(){o.r(i);var e=o("@elementor/editor"),t=o("react"),n=o("@elementor/editor-elements"),r=o("@elementor/editor-v1-adapters"),u=o("@elementor/ui"),l=o("./node_modules/@floating-ui/react/dist/floating-ui.react.mjs"),c=o("./node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs"),s=o("./node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs"),a=o("@elementor/editor-responsive"),f=o("@elementor/editor-styles-repository"),d=o("@elementor/utils"),m=o("@elementor/editor-props");var p=(0,u.styled)(u.Box,{shouldForwardProp:e=>"isSelected"!==e})((({theme:e,isSelected:t})=>({outline:`${t?"2px":"1px"} solid ${e.palette.primary.light}`,outlineOffset:t?"-2px":"-1px",pointerEvents:"none"})));function g({element:e,isSelected:n}){const{context:r,floating:o,isVisible:i}=function({element:e,isSelected:n}){const[r,o]=(0,t.useState)(!1),{refs:i,floatingStyles:u,context:a}=(0,l.useFloating)({open:r||n,onOpenChange:o,whileElementsMounted:(...e)=>(0,c.autoUpdate)(...e,{animationFrame:!0}),elements:{reference:e.firstElementChild},middleware:[(0,s.size)({apply({elements:e,rects:t}){Object.assign(e.floating.style,{width:`${t.reference.width}px`,height:`${t.reference.height}px`})}}),(0,s.offset)((({rects:e})=>-e.reference.height/2-e.floating.height/2))]});return{isVisible:r||n,context:a,floating:{setRef:i.setFloating,ref:i.floating,styles:u}}}({element:e,isSelected:n}),{getFloatingProps:u,getReferenceProps:a}=(0,l.useInteractions)([(0,l.useHover)(r)]);return function(e,n){(0,t.useEffect)((()=>{const t=e,{events:r,attrs:o}=function(e){const t=/^on(?=[A-Z])/;return Object.entries(e).reduce(((e,[n,r])=>{if(!t.test(n))return e.attrs.push([n,r]),e;const o=n.replace(t,"").toLowerCase(),i=r;return e.events.push([o,i]),e}),{events:[],attrs:[]})}(n());return r.forEach((([e,n])=>t.addEventListener(e,n))),o.forEach((([e,n])=>t.setAttribute(e,n))),()=>{r.forEach((([e,n])=>t.removeEventListener(e,n))),o.forEach((([e])=>t.removeAttribute(e)))}}),[n,e])}(e,a),i&&t.createElement(l.FloatingPortal,{id:"elementor-preview-responsive-wrapper"},t.createElement(p,{ref:o.setRef,isSelected:n,style:o.styles,"data-element-overlay":e.dataset.id,role:"presentation",...u()}))}var v,h=e=>t=>t.filter(Boolean).join(e),y=e=>({"$$multi-props":!0,value:e}),b=["top-left","top-right","bottom-left","bottom-right"],w=["top","right","bottom","left"],x=["row","column"],E=["top","right","bottom","left"],R=e=>e,T={size:e=>`${e.size}${e.unit}`,shadow:e=>[e.hOffset,e.vOffset,e.blur,e.spread,e.color,e.position].filter(Boolean).join(" "),stroke:e=>`${e.width} ${e.color}`,gap:(e,t)=>{const n=Object.entries(e).reduce(((e,[n,r])=>(r&&x.includes(n)&&(e[`${n}-${t}`]=r),e)),{});return y(n)},color:R,number:R,string:R,"linked-dimensions":(e,t)=>{const n=Object.entries(e).reduce(((e,[n,r])=>(r&&E.includes(n)&&(e[`${t}-${n}`]=r),e)),{});return y(n)},"background-overlay":e=>`linear-gradient(${e.color},${e.color})`,"box-shadow":h(","),"background-image":h(","),"border-width":(v=e=>`border-${e}-width`,e=>{const t=Object.entries(e).reduce(((e,[t,n])=>(w.includes(t)&&(e[v(t)]=n),e)),{});return y(t)}),"border-radius":(e=>t=>{const n=Object.entries(t).reduce(((t,[n,r])=>(b.includes(n)&&(t[e(n)]=r),t)),{});return y(n)})((e=>`border-${e}-radius`))};function S({props:e,schema:t,transformers:n}){const r={};return Object.entries(t).forEach((([t,o])=>{const i=C(e[t]??o.default,t,o,n);var u;null!==i&&((u=i)&&"object"==typeof u&&"$$multi-props"in u&&!0===u["$$multi-props"]?Object.assign(r,i.value):r[t]=i)})),r}function C(e,t,n,r,o=0){if(!e&&0!==e)return null;if(!(0,m.isTransformable)(e))return e;if(o>3)return null;if(!0===e.disabled)return null;if("union"===n.kind&&!(n=n.prop_types[e.$$type]))return null;let i=e.value;"object"===n.kind&&(i=S({transformers:r,props:i,schema:n.shape})),"array"===n.kind&&(i=i.map((e=>C(e,t,n.item_prop_type,r,o))));const u=r[e.$$type];if(!u)return null;try{return C(u(i,t),t,n,r,o+1)}catch{return null}}var O="data-styles-container";f.stylesRepository.subscribe((()=>{const e=function(){const e=function(){const e=window;return e.elementor?.$preview?.[0]?.contentDocument?.body}(),t=e?.querySelector(`[${O}]`);if(t)return t;const n=function(){const e=document.createElement("div");return e.style.display="none",e.setAttribute(O,""),e}();return e?.prepend(n),n}(),t=f.stylesRepository.all(),n=(0,a.getBreakpointsMap)();e.innerHTML=function({transformers:e,styles:t,breakpoints:n}){const r=[];try{t.forEach((t=>{const o=function(e,t,n){const r=function(e){return`${{class:"."}[e.type]}${e.id}`}(e);if(!r)return"";const o=[];return Object.values(e.variants).forEach((e=>{const i=function(e,t,n,r){const o=function(e,t){const n=S({props:e,schema:(()=>{const e=window;return e.elementor?.config?.atomic?.styles_schema??{}})(),transformers:t});return Object.entries(n).reduce(((e,[t,n])=>(e.push(t+":"+n+";"),e)),[]).join("")}(t.props,n);if(!o)return"";let i=`${e}${t.meta.state?`:${t.meta.state}`:""}{${o}}`;return t.meta.breakpoint&&(i=function(e,t,n){const r=function(e){return e.type?`${e.type}:${e.width}px`:null}(e[t]);return r?`@media(${r}){${n}}`:n}(r,t.meta.breakpoint,i)),i}(r,e,t,n);i&&o.push(i)})),o.join("")}(t,e,n);r.push(``)}))}catch(e){console.error(`Cannot render style': ${(0,d.ensureError)(e).message}`)}return r.join("")}({transformers:T,styles:t,breakpoints:n}),function(e){try{e.forEach((e=>{Object.values(e.variants).forEach((e=>{const t=e.props["font-family"]??null;t&&"string"==typeof t&&((e,t="preview")=>{const n=window;n.elementor?.helpers?.enqueueFont?.(e,t)})(t)}))}))}catch(e){console.error(`Cannot enqueue font': ${(0,d.ensureError)(e).message}`)}}(t)})),(0,e.injectIntoTop)({id:"elements-overlays",component:function(){const e=(0,n.useSelectedElement)(),o=(0,n.useElementsDomRef)(),i=(0,r.__privateUseIsPreviewMode)(),u=(0,r.__privateUseIsRouteActive)("panel/global");return!i&&!u&&o.map((n=>t.createElement(g,{element:n,key:n.dataset.id,isSelected:e.element?.id===n.dataset.id})))}})}(),(window.elementorV2=window.elementorV2||{}).editorCanvas=i}();