@worldresources/wri-design-systems 2.148.7 → 2.148.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +4 -5
- package/dist/index.esm.js +4 -5
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1776,15 +1776,14 @@
|
|
|
1776
1776
|
height: 14px;
|
|
1777
1777
|
width: 14px;
|
|
1778
1778
|
}
|
|
1779
|
-
`},jn=n.forwardRef((({ariaLabel:e,icon:n,backgroundColor:o,onClick:i,showFocusState:a,count:s,mode:l,variant:c="icon"},u)=>{const d=s?(h=s)>=1e8?"99M+":h>=1e6?`${(h/1e6).toFixed(0)}M`:h>=1e5?`${(h/1e3).toFixed(0)}K`:h.toString():void 0;var h;return t.jsx("div",{css:a?
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
border: 2px solid ${p("primary",700)};
|
|
1779
|
+
`},jn=n.forwardRef((({ariaLabel:e,icon:n,backgroundColor:o,onClick:i,showFocusState:a,count:s,mode:l,variant:c="icon"},u)=>{const d=s?(h=s)>=1e8?"99M+":h>=1e6?`${(h/1e6).toFixed(0)}M`:h>=1e5?`${(h/1e3).toFixed(0)}K`:h.toString():void 0;var h;return t.jsx("div",{css:a?r.css`
|
|
1780
|
+
outline: 2px solid ${p("primary",700)};
|
|
1781
|
+
outline-offset: 2px;
|
|
1783
1782
|
border-radius: 50%;
|
|
1784
1783
|
box-shadow:
|
|
1785
1784
|
0 0 0 2px ${p("neutral",100)},
|
|
1786
1785
|
rgba(0, 0, 0, 0.05) 0px 2px 2px 4px;
|
|
1787
|
-
`):"",children:t.jsxs("button",{type:"button",css:Cn(o,!!i,!!n,l,s,c),"aria-label":e||(s?`Cluster of ${s} locations`:"simple-pin"===c?"Map pin location":"Map point"),ref:u,onClick:i,children:["cluster"===c&&d,"icon"===c&&n]})});var f})),kn={Paper:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>o.jsx(jn,{ariaLabel:e||"paper icon",icon:o.jsx(W,{color:"#79022C"}),backgroundColor:"#FFBCD4",onClick:t,ref:n,showFocusState:r}),Drop:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>o.jsx(jn,{ariaLabel:e||"drop icon",icon:o.jsx(q,{color:"#7D2A03"}),backgroundColor:"#F3A078",onClick:t,ref:n,showFocusState:r}),Plant:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>o.jsx(jn,{ariaLabel:e||"plant icon",icon:o.jsx(G,{color:"#3B6402"}),backgroundColor:"#B7E578",onClick:t,ref:n,showFocusState:r}),Point:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>o.jsx(jn,{ariaLabel:e||"point icon",backgroundColor:p("primary",500),onClick:t,ref:n,showFocusState:r})};function $n(){return"undefined"!=typeof window}function Sn(e){return On(e)?(e.nodeName||"").toLowerCase():"#document"}function En(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Rn(e){var t;return null==(t=(On(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function On(e){return!!$n()&&(e instanceof Node||e instanceof En(e).Node)}function Ln(e){return!!$n()&&(e instanceof Element||e instanceof En(e).Element)}function Tn(e){return!!$n()&&(e instanceof HTMLElement||e instanceof En(e).HTMLElement)}function Pn(e){return!(!$n()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof En(e).ShadowRoot)}const Mn=new Set(["inline","contents"]);function _n(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=qn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Mn.has(o)}const Dn=new Set(["table","td","th"]);function In(e){return Dn.has(Sn(e))}const Nn=[":popover-open",":modal"];function Vn(e){return Nn.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}const An=["transform","translate","scale","rotate","perspective"],zn=["transform","translate","scale","rotate","perspective","filter"],Bn=["paint","layout","strict","content"];function Hn(e){const t=Fn(),n=Ln(e)?qn(e):e;return An.some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||zn.some((e=>(n.willChange||"").includes(e)))||Bn.some((e=>(n.contain||"").includes(e)))}function Fn(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Zn=new Set(["html","body","#document"]);function Wn(e){return Zn.has(Sn(e))}function qn(e){return En(e).getComputedStyle(e)}function Gn(e){return Ln(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Un(e){if("html"===Sn(e))return e;const t=e.assignedSlot||e.parentNode||Pn(e)&&e.host||Rn(e);return Pn(t)?t.host:t}function Xn(e){const t=Un(e);return Wn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Tn(t)&&_n(t)?t:Xn(t)}function Yn(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Xn(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=En(o);if(i){const e=Kn(a);return t.concat(a,a.visualViewport||[],_n(o)?o:[],e&&n?Yn(e):[])}return t.concat(o,Yn(o,[],n))}function Kn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Jn=Math.min,Qn=Math.max,er=Math.round,tr=Math.floor,nr=e=>({x:e,y:e}),rr={left:"right",right:"left",bottom:"top",top:"bottom"},or={start:"end",end:"start"};function ir(e,t,n){return Qn(e,Jn(t,n))}function ar(e,t){return"function"==typeof e?e(t):e}function sr(e){return e.split("-")[0]}function lr(e){return e.split("-")[1]}function cr(e){return"x"===e?"y":"x"}function ur(e){return"y"===e?"height":"width"}const dr=new Set(["top","bottom"]);function pr(e){return dr.has(sr(e))?"y":"x"}function hr(e){return cr(pr(e))}function fr(e){return e.replace(/start|end/g,(e=>or[e]))}const xr=["left","right"],gr=["right","left"],vr=["top","bottom"],mr=["bottom","top"];function br(e,t,n,r){const o=lr(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?gr:xr:t?xr:gr;case"left":case"right":return t?vr:mr;default:return[]}}(sr(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(fr)))),i}function yr(e){return e.replace(/left|right|bottom|top/g,(e=>rr[e]))}function wr(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Cr(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}}const jr="data-floating-ui-focusable";function kr(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Pn(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function $r(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Sr(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 Er(e){return(null==e?void 0:e.ownerDocument)||document}function Rr(e,t,n){void 0===n&&(n=!0);return e.filter((e=>{var r;return e.parentId===t&&(!n||(null==(r=e.context)?void 0:r.open))})).flatMap((t=>[t,...Rr(e,t.id,n)]))}var Or="undefined"!=typeof document?n.useLayoutEffect:function(){};const Lr={...l}.useInsertionEffect||(e=>e());function Tr(e){const t=l.useRef((()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")}));return Lr((()=>{t.current=e})),l.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function Pr(e,t,n){let{reference:r,floating:o}=e;const i=pr(t),a=hr(t),s=ur(a),l=sr(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(lr(t)){case"start":h[a]-=p*(n&&c?-1:1);break;case"end":h[a]+=p*(n&&c?-1:1)}return h}async function Mr(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=ar(t,e),f=wr(h),x=s[p?"floating"===d?"reference":"floating":d],g=Cr(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(x)))||n?x:x.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,m=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(m))&&await(null==i.getScale?void 0:i.getScale(m))||{x:1,y:1},y=Cr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:m,strategy:l}):v);return{top:(g.top-y.top+f.top)/b.y,bottom:(y.bottom-g.bottom+f.bottom)/b.y,left:(g.left-y.left+f.left)/b.x,right:(y.right-g.right+f.right)/b.x}}const _r=new Set(["left","top"]);function Dr(e){const t=qn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Tn(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=er(n)!==i||er(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Ir(e){return Ln(e)?e:e.contextElement}function Nr(e){const t=Ir(e);if(!Tn(t))return nr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Dr(t);let a=(i?er(n.width):n.width)/r,s=(i?er(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Vr=nr(0);function Ar(e){const t=En(e);return Fn()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Vr}function zr(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Ir(e);let a=nr(1);t&&(r?Ln(r)&&(a=Nr(r)):a=Nr(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==En(e))&&t}(i,n,r)?Ar(i):nr(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=En(i),t=r&&Ln(r)?En(r):r;let n=e,o=Kn(n);for(;o&&r&&t!==n;){const e=Nr(o),t=o.getBoundingClientRect(),r=qn(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=En(o),o=Kn(n)}}return Cr({width:u,height:d,x:l,y:c})}function Br(e,t){const n=Gn(e).scrollLeft;return t?t.left+n:zr(Rn(e)).left+n}function Hr(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Br(e,n),y:n.top+t.scrollTop}}const Fr=new Set(["absolute","fixed"]);function Zr(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=En(e),r=Rn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=Fn();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}const c=Br(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else c<=25&&(i+=c);return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=Rn(e),n=Gn(e),r=e.ownerDocument.body,o=Qn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Qn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Br(e);const s=-n.scrollTop;return"rtl"===qn(r).direction&&(a+=Qn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(Rn(e));else if(Ln(t))r=function(e,t){const n=zr(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Tn(e)?Nr(e):nr(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Ar(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Cr(r)}function Wr(e,t){const n=Un(e);return!(n===t||!Ln(n)||Wn(n))&&("fixed"===qn(n).position||Wr(n,t))}function qr(e,t,n){const r=Tn(t),o=Rn(t),i="fixed"===n,a=zr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=nr(0);function c(){l.x=Br(o)}if(r||!r&&!i)if(("body"!==Sn(t)||_n(o))&&(s=Gn(t)),r){const e=zr(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=!o||r||i?nr(0):Hr(o,s);return{x:a.left+s.scrollLeft-l.x-u.x,y:a.top+s.scrollTop-l.y-u.y,width:a.width,height:a.height}}function Gr(e){return"static"===qn(e).position}function Ur(e,t){if(!Tn(e)||"fixed"===qn(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Rn(e)===n&&(n=n.ownerDocument.body),n}function Xr(e,t){const n=En(e);if(Vn(e))return n;if(!Tn(e)){let t=Un(e);for(;t&&!Wn(t);){if(Ln(t)&&!Gr(t))return t;t=Un(t)}return n}let r=Ur(e,t);for(;r&&In(r)&&Gr(r);)r=Ur(r,t);return r&&Wn(r)&&Gr(r)&&!Hn(r)?n:r||function(e){let t=Un(e);for(;Tn(t)&&!Wn(t);){if(Hn(t))return t;if(Vn(t))return null;t=Un(t)}return null}(e)||n}const Yr={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=Rn(r),s=!!t&&Vn(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=nr(1);const u=nr(0),d=Tn(r);if((d||!d&&!i)&&(("body"!==Sn(r)||_n(a))&&(l=Gn(r)),Tn(r))){const e=zr(r);c=Nr(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const p=!a||d||i?nr(0):Hr(a,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}},getDocumentElement:Rn,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?Vn(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Yn(e,[],!1).filter((e=>Ln(e)&&"body"!==Sn(e))),o=null;const i="fixed"===qn(e).position;let a=i?Un(e):e;for(;Ln(a)&&!Wn(a);){const t=qn(a),n=Hn(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&Fr.has(o.position)||_n(a)&&!n&&Wr(e,a))?r=r.filter((e=>e!==a)):o=t,a=Un(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...i,r],s=a[0],l=a.reduce(((e,n)=>{const r=Zr(t,n,o);return e.top=Qn(r.top,e.top),e.right=Jn(r.right,e.right),e.bottom=Jn(r.bottom,e.bottom),e.left=Qn(r.left,e.left),e}),Zr(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Xr,getElementRects:async function(e){const t=this.getOffsetParent||Xr,n=this.getDimensions,r=await n(e.floating);return{reference:qr(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}=Dr(e);return{width:t,height:n}},getScale:Nr,isElement:Ln,isRTL:function(e){return"rtl"===qn(e).direction}};function Kr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Jr(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Ir(e),u=o||i?[...c?Yn(c):[],...Yn(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const o=Rn(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:h}=c;if(s||t(),!p||!h)return;const f={rootMargin:-tr(d)+"px "+-tr(o.clientWidth-(u+p))+"px "+-tr(o.clientHeight-(d+h))+"px "+-tr(u)+"px",threshold:Qn(0,Jn(1,l))||1};let x=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!x)return a();r?a(!1,r):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==r||Kr(c,e.getBoundingClientRect())||a(),x=!1}try{r=new IntersectionObserver(g,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,f)}r.observe(e)}(!0),i}(c,n):null;let p,h=-1,f=null;a&&(f=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()})),c&&!l&&f.observe(c),f.observe(t));let x=l?zr(e):null;return l&&function t(){const r=zr(e);x&&!Kr(x,r)&&n();x=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const Qr=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=sr(n),s=lr(n),l="y"===pr(n),c=_r.has(a)?-1:1,u=i&&l?-1:1,d=ar(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof f&&(h="end"===s?-1*f:f),l?{x:h*u,y:p*c}:{x:p*c,y:h*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},eo=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=ar(e,t),c={x:n,y:r},u=await Mr(t,l),d=pr(sr(o)),p=cr(d);let h=c[p],f=c[d];if(i){const e="y"===p?"bottom":"right";h=ir(h+u["y"===p?"top":"left"],h,h-u[e])}if(a){const e="y"===d?"bottom":"right";f=ir(f+u["y"===d?"top":"left"],f,f-u[e])}const x=s.fn({...t,[p]:h,[d]:f});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[p]:i,[d]:a}}}}}},to=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:x=!0,...g}=ar(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=sr(o),m=pr(s),b=sr(s)===s,y=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=p||(b||!x?[yr(s)]:function(e){const t=yr(e);return[fr(e),t,fr(t)]}(s)),C="none"!==f;!p&&C&&w.push(...br(s,x,f,y));const j=[s,...w],k=await Mr(t,g),$=[];let S=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&$.push(k[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=lr(e),o=hr(e),i=ur(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=yr(a)),[a,yr(a)]}(o,a,y);$.push(k[e[0]],k[e[1]])}if(S=[...S,{placement:o,overflows:$}],!$.every((e=>e<=0))){var E,R;const e=((null==(E=i.flip)?void 0:E.index)||0)+1,t=j[e];if(t){if(!("alignment"===d&&m!==pr(t))||S.every((e=>pr(e.placement)!==m||e.overflows[0]>0)))return{data:{index:e,overflows:S},reset:{placement:t}}}let n=null==(R=S.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:R.placement;if(!n)switch(h){case"bestFit":{var O;const e=null==(O=S.filter((e=>{if(C){const t=pr(e.placement);return t===m||"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:O[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},no=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=ar(e,t)||{};if(null==c)return{};const d=wr(u),p={x:n,y:r},h=hr(o),f=ur(h),x=await a.getDimensions(c),g="y"===h,v=g?"top":"left",m=g?"bottom":"right",b=g?"clientHeight":"clientWidth",y=i.reference[f]+i.reference[h]-p[h]-i.floating[f],w=p[h]-i.reference[h],C=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let j=C?C[b]:0;j&&await(null==a.isElement?void 0:a.isElement(C))||(j=s.floating[b]||i.floating[f]);const k=y/2-w/2,$=j/2-x[f]/2-1,S=Jn(d[v],$),E=Jn(d[m],$),R=S,O=j-x[f]-E,L=j/2-x[f]/2+k,T=ir(R,L,O),P=!l.arrow&&null!=lr(o)&&L!==T&&i.reference[f]/2-(L<R?S:E)-x[f]/2<0,M=P?L<R?L-R:L-O:0;return{[h]:p[h]+M,data:{[h]:T,centerOffset:L-T-M,...P&&{alignmentOffset:M}},reset:P}}}),ro=(e,t,n)=>{const r=new Map,o={platform:Yr,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Pr(c,r,l),p=r,h={},f=0;for(let n=0;n<s.length;n++){const{name:i,fn:x}=s[n],{x:g,y:v,data:m,reset:b}=await x({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=v?v:d,h={...h,[i]:{...h[i],...m}},b&&f<=50&&(f++,"object"==typeof b&&(b.placement&&(p=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=Pr(c,p,l))),n=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:h}})(e,t,{...o,platform:i})};var oo="undefined"!=typeof document?n.useLayoutEffect:function(){};function io(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(!io(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)&&!io(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function ao(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function so(e,t){const n=ao(e);return Math.round(t*n)/n}function lo(e){const t=l.useRef(e);return oo((()=>{t.current=e})),t}const co=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?no({element:n.current,padding:r}).fn(t):{}:n?no({element:n,padding:r}).fn(t):{};var o}}),uo=(e,t)=>({...Qr(e),options:[e,t]}),po=(e,t)=>({...eo(e),options:[e,t]}),ho=(e,t)=>({...co(e),options:[e,t]}),fo="data-floating-ui-focusable",xo="active",go="selected",vo={...l};let mo=!1,bo=0;const yo=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+bo++;const wo=vo.useId||function(){const[e,t]=l.useState((()=>mo?yo():void 0));return Or((()=>{null==e&&t(yo())}),[]),l.useEffect((()=>{mo=!0}),[]),e};let Co;"production"!==process.env.NODE_ENV&&(Co=new Set);const jo=l.createContext(null),ko=l.createContext(null),$o=()=>{var e;return(null==(e=l.useContext(jo))?void 0:e.id)||null},So=()=>l.useContext(ko);const Eo={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Ro={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Oo=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 Lo(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=wo(),i=l.useRef({}),[a]=l.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}())),s=null!=$o();if("production"!==process.env.NODE_ENV){const e=r.reference;e&&!Ln(e)&&function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var i;null!=(e=Co)&&e.has(o)||(null==(i=Co)||i.add(o),console.error(o))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,u]=l.useState(r.reference),d=Tr(((e,t,r)=>{i.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:r,nested:s}),null==n||n(e,t,r)})),p=l.useMemo((()=>({setPositionReference:u})),[]),h=l.useMemo((()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference})),[c,r.reference,r.floating]);return l.useMemo((()=>({dataRef:i,open:t,onOpenChange:d,elements:h,events:a,floatingId:o,refs:p})),[t,d,h,a,o,p])}function To(e){void 0===e&&(e={});const{nodeId:t}=e,n=Lo({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=l.useState(null),[s,u]=l.useState(null),d=(null==o?void 0:o.domReference)||i,p=l.useRef(null),h=So();Or((()=>{d&&(p.current=d)}),[d]);const f=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:u,open:d}=e,[p,h]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,x]=l.useState(r);io(f,r)||x(r);const[g,v]=l.useState(null),[m,b]=l.useState(null),y=l.useCallback((e=>{e!==k.current&&(k.current=e,v(e))}),[]),w=l.useCallback((e=>{e!==$.current&&($.current=e,b(e))}),[]),C=i||g,j=a||m,k=l.useRef(null),$=l.useRef(null),S=l.useRef(p),E=null!=u,R=lo(u),O=lo(o),L=lo(d),T=l.useCallback((()=>{if(!k.current||!$.current)return;const e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),ro(k.current,$.current,e).then((e=>{const t={...e,isPositioned:!1!==L.current};P.current&&!io(S.current,t)&&(S.current=t,c.flushSync((()=>{h(t)})))}))}),[f,t,n,O,L]);oo((()=>{!1===d&&S.current.isPositioned&&(S.current.isPositioned=!1,h((e=>({...e,isPositioned:!1}))))}),[d]);const P=l.useRef(!1);oo((()=>(P.current=!0,()=>{P.current=!1})),[]),oo((()=>{if(C&&(k.current=C),j&&($.current=j),C&&j){if(R.current)return R.current(C,j,T);T()}}),[C,j,T,R,E]);const M=l.useMemo((()=>({reference:k,floating:$,setReference:y,setFloating:w})),[y,w]),_=l.useMemo((()=>({reference:C,floating:j})),[C,j]),D=l.useMemo((()=>{const e={position:n,left:0,top:0};if(!_.floating)return e;const t=so(_.floating,p.x),r=so(_.floating,p.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...ao(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,_.floating,p.x,p.y]);return l.useMemo((()=>({...p,update:T,refs:M,elements:_,floatingStyles:D})),[p,T,M,_,D])}({...e,elements:{...o,...s&&{reference:s}}}),x=l.useCallback((e=>{const t=Ln(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),f.refs.setReference(t)}),[f.refs]),g=l.useCallback((e=>{(Ln(e)||null===e)&&(p.current=e,a(e)),(Ln(f.refs.reference.current)||null===f.refs.reference.current||null!==e&&!Ln(e))&&f.refs.setReference(e)}),[f.refs]),v=l.useMemo((()=>({...f.refs,setReference:g,setPositionReference:x,domReference:p})),[f.refs,g,x]),m=l.useMemo((()=>({...f.elements,domReference:d})),[f.elements,d]),b=l.useMemo((()=>({...f,...r,refs:v,elements:m,nodeId:t})),[f,v,m,t,r]);return Or((()=>{r.dataRef.current.floatingContext=b;const e=null==h?void 0:h.nodesRef.current.find((e=>e.id===t));e&&(e.context=b)})),l.useMemo((()=>({...f,context:b,refs:v,elements:m})),[f,v,m,b])}function Po(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[xo]:t,[go]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[fo]:""},...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 a;o&&[xo,go].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(a=r.get(n))||a.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})):e[n]=i)})),e):e),{})}}const Mo=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function _o(e,t){var n,r;void 0===t&&(t={});const{open:o,elements:i,floatingId:a}=e,{enabled:s=!0,role:c="dialog"}=t,u=wo(),d=(null==(n=i.domReference)?void 0:n.id)||u,p=l.useMemo((()=>{var e,t;return(null==(e=(t=i.floating)?t.hasAttribute(jr)?t:t.querySelector("["+jr+"]")||t:null)?void 0:e.id)||a}),[i.floating,a]),h=null!=(r=Mo.get(c))?r:c,f=null!=$o(),x=l.useMemo((()=>"tooltip"===h||"label"===c?{["aria-"+("label"===c?"labelledby":"describedby")]:o?p:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":"alertdialog"===h?"dialog":h,"aria-controls":o?p:void 0,..."listbox"===h&&{role:"combobox"},..."menu"===h&&{id:d},..."menu"===h&&f&&{role:"menuitem"},..."select"===c&&{"aria-autocomplete":"none"},..."combobox"===c&&{"aria-autocomplete":"list"}}),[h,p,f,o,d,c]),g=l.useMemo((()=>{const e={id:p,...h&&{role:h}};return"tooltip"===h||"label"===c?e:{...e,..."menu"===h&&{"aria-labelledby":d}}}),[h,p,d,c]),v=l.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:p+"-fui-option"}};switch(c){case"select":case"combobox":return{...r,"aria-selected":n}}return{}}),[p,c]);return l.useMemo((()=>s?{reference:x,floating:g,item:v}:{}),[s,x,g,v])}const Do=r.css`
|
|
1786
|
+
`:"",children:t.jsxs("button",{type:"button",css:Cn(o,!!i,!!n,l,s,c),"aria-label":e||(s?`Cluster of ${s} locations`:"simple-pin"===c?"Map pin location":"Map point"),ref:u,onClick:i,children:["cluster"===c&&d,"icon"===c&&n]})})})),kn={Paper:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>o.jsx(jn,{ariaLabel:e||"paper icon",icon:o.jsx(W,{color:"#79022C"}),backgroundColor:"#FFBCD4",onClick:t,ref:n,showFocusState:r}),Drop:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>o.jsx(jn,{ariaLabel:e||"drop icon",icon:o.jsx(q,{color:"#7D2A03"}),backgroundColor:"#F3A078",onClick:t,ref:n,showFocusState:r}),Plant:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>o.jsx(jn,{ariaLabel:e||"plant icon",icon:o.jsx(G,{color:"#3B6402"}),backgroundColor:"#B7E578",onClick:t,ref:n,showFocusState:r}),Point:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>o.jsx(jn,{ariaLabel:e||"point icon",backgroundColor:p("primary",500),onClick:t,ref:n,showFocusState:r})};function $n(){return"undefined"!=typeof window}function Sn(e){return On(e)?(e.nodeName||"").toLowerCase():"#document"}function En(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Rn(e){var t;return null==(t=(On(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function On(e){return!!$n()&&(e instanceof Node||e instanceof En(e).Node)}function Ln(e){return!!$n()&&(e instanceof Element||e instanceof En(e).Element)}function Tn(e){return!!$n()&&(e instanceof HTMLElement||e instanceof En(e).HTMLElement)}function Pn(e){return!(!$n()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof En(e).ShadowRoot)}const Mn=new Set(["inline","contents"]);function _n(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=qn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Mn.has(o)}const Dn=new Set(["table","td","th"]);function In(e){return Dn.has(Sn(e))}const Nn=[":popover-open",":modal"];function Vn(e){return Nn.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}const An=["transform","translate","scale","rotate","perspective"],zn=["transform","translate","scale","rotate","perspective","filter"],Bn=["paint","layout","strict","content"];function Hn(e){const t=Fn(),n=Ln(e)?qn(e):e;return An.some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||zn.some((e=>(n.willChange||"").includes(e)))||Bn.some((e=>(n.contain||"").includes(e)))}function Fn(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Zn=new Set(["html","body","#document"]);function Wn(e){return Zn.has(Sn(e))}function qn(e){return En(e).getComputedStyle(e)}function Gn(e){return Ln(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Un(e){if("html"===Sn(e))return e;const t=e.assignedSlot||e.parentNode||Pn(e)&&e.host||Rn(e);return Pn(t)?t.host:t}function Xn(e){const t=Un(e);return Wn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Tn(t)&&_n(t)?t:Xn(t)}function Yn(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Xn(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=En(o);if(i){const e=Kn(a);return t.concat(a,a.visualViewport||[],_n(o)?o:[],e&&n?Yn(e):[])}return t.concat(o,Yn(o,[],n))}function Kn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Jn=Math.min,Qn=Math.max,er=Math.round,tr=Math.floor,nr=e=>({x:e,y:e}),rr={left:"right",right:"left",bottom:"top",top:"bottom"},or={start:"end",end:"start"};function ir(e,t,n){return Qn(e,Jn(t,n))}function ar(e,t){return"function"==typeof e?e(t):e}function sr(e){return e.split("-")[0]}function lr(e){return e.split("-")[1]}function cr(e){return"x"===e?"y":"x"}function ur(e){return"y"===e?"height":"width"}const dr=new Set(["top","bottom"]);function pr(e){return dr.has(sr(e))?"y":"x"}function hr(e){return cr(pr(e))}function fr(e){return e.replace(/start|end/g,(e=>or[e]))}const xr=["left","right"],gr=["right","left"],vr=["top","bottom"],mr=["bottom","top"];function br(e,t,n,r){const o=lr(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?gr:xr:t?xr:gr;case"left":case"right":return t?vr:mr;default:return[]}}(sr(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(fr)))),i}function yr(e){return e.replace(/left|right|bottom|top/g,(e=>rr[e]))}function wr(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Cr(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}}const jr="data-floating-ui-focusable";function kr(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Pn(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function $r(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Sr(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 Er(e){return(null==e?void 0:e.ownerDocument)||document}function Rr(e,t,n){void 0===n&&(n=!0);return e.filter((e=>{var r;return e.parentId===t&&(!n||(null==(r=e.context)?void 0:r.open))})).flatMap((t=>[t,...Rr(e,t.id,n)]))}var Or="undefined"!=typeof document?n.useLayoutEffect:function(){};const Lr={...l}.useInsertionEffect||(e=>e());function Tr(e){const t=l.useRef((()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")}));return Lr((()=>{t.current=e})),l.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function Pr(e,t,n){let{reference:r,floating:o}=e;const i=pr(t),a=hr(t),s=ur(a),l=sr(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(lr(t)){case"start":h[a]-=p*(n&&c?-1:1);break;case"end":h[a]+=p*(n&&c?-1:1)}return h}async function Mr(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=ar(t,e),f=wr(h),x=s[p?"floating"===d?"reference":"floating":d],g=Cr(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(x)))||n?x:x.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,m=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(m))&&await(null==i.getScale?void 0:i.getScale(m))||{x:1,y:1},y=Cr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:m,strategy:l}):v);return{top:(g.top-y.top+f.top)/b.y,bottom:(y.bottom-g.bottom+f.bottom)/b.y,left:(g.left-y.left+f.left)/b.x,right:(y.right-g.right+f.right)/b.x}}const _r=new Set(["left","top"]);function Dr(e){const t=qn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Tn(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=er(n)!==i||er(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Ir(e){return Ln(e)?e:e.contextElement}function Nr(e){const t=Ir(e);if(!Tn(t))return nr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Dr(t);let a=(i?er(n.width):n.width)/r,s=(i?er(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Vr=nr(0);function Ar(e){const t=En(e);return Fn()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Vr}function zr(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Ir(e);let a=nr(1);t&&(r?Ln(r)&&(a=Nr(r)):a=Nr(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==En(e))&&t}(i,n,r)?Ar(i):nr(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=En(i),t=r&&Ln(r)?En(r):r;let n=e,o=Kn(n);for(;o&&r&&t!==n;){const e=Nr(o),t=o.getBoundingClientRect(),r=qn(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=En(o),o=Kn(n)}}return Cr({width:u,height:d,x:l,y:c})}function Br(e,t){const n=Gn(e).scrollLeft;return t?t.left+n:zr(Rn(e)).left+n}function Hr(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Br(e,n),y:n.top+t.scrollTop}}const Fr=new Set(["absolute","fixed"]);function Zr(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=En(e),r=Rn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=Fn();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}const c=Br(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else c<=25&&(i+=c);return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=Rn(e),n=Gn(e),r=e.ownerDocument.body,o=Qn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Qn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Br(e);const s=-n.scrollTop;return"rtl"===qn(r).direction&&(a+=Qn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(Rn(e));else if(Ln(t))r=function(e,t){const n=zr(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Tn(e)?Nr(e):nr(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Ar(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Cr(r)}function Wr(e,t){const n=Un(e);return!(n===t||!Ln(n)||Wn(n))&&("fixed"===qn(n).position||Wr(n,t))}function qr(e,t,n){const r=Tn(t),o=Rn(t),i="fixed"===n,a=zr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=nr(0);function c(){l.x=Br(o)}if(r||!r&&!i)if(("body"!==Sn(t)||_n(o))&&(s=Gn(t)),r){const e=zr(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=!o||r||i?nr(0):Hr(o,s);return{x:a.left+s.scrollLeft-l.x-u.x,y:a.top+s.scrollTop-l.y-u.y,width:a.width,height:a.height}}function Gr(e){return"static"===qn(e).position}function Ur(e,t){if(!Tn(e)||"fixed"===qn(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Rn(e)===n&&(n=n.ownerDocument.body),n}function Xr(e,t){const n=En(e);if(Vn(e))return n;if(!Tn(e)){let t=Un(e);for(;t&&!Wn(t);){if(Ln(t)&&!Gr(t))return t;t=Un(t)}return n}let r=Ur(e,t);for(;r&&In(r)&&Gr(r);)r=Ur(r,t);return r&&Wn(r)&&Gr(r)&&!Hn(r)?n:r||function(e){let t=Un(e);for(;Tn(t)&&!Wn(t);){if(Hn(t))return t;if(Vn(t))return null;t=Un(t)}return null}(e)||n}const Yr={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=Rn(r),s=!!t&&Vn(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=nr(1);const u=nr(0),d=Tn(r);if((d||!d&&!i)&&(("body"!==Sn(r)||_n(a))&&(l=Gn(r)),Tn(r))){const e=zr(r);c=Nr(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const p=!a||d||i?nr(0):Hr(a,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}},getDocumentElement:Rn,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?Vn(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Yn(e,[],!1).filter((e=>Ln(e)&&"body"!==Sn(e))),o=null;const i="fixed"===qn(e).position;let a=i?Un(e):e;for(;Ln(a)&&!Wn(a);){const t=qn(a),n=Hn(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&Fr.has(o.position)||_n(a)&&!n&&Wr(e,a))?r=r.filter((e=>e!==a)):o=t,a=Un(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...i,r],s=a[0],l=a.reduce(((e,n)=>{const r=Zr(t,n,o);return e.top=Qn(r.top,e.top),e.right=Jn(r.right,e.right),e.bottom=Jn(r.bottom,e.bottom),e.left=Qn(r.left,e.left),e}),Zr(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Xr,getElementRects:async function(e){const t=this.getOffsetParent||Xr,n=this.getDimensions,r=await n(e.floating);return{reference:qr(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}=Dr(e);return{width:t,height:n}},getScale:Nr,isElement:Ln,isRTL:function(e){return"rtl"===qn(e).direction}};function Kr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Jr(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Ir(e),u=o||i?[...c?Yn(c):[],...Yn(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const o=Rn(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:h}=c;if(s||t(),!p||!h)return;const f={rootMargin:-tr(d)+"px "+-tr(o.clientWidth-(u+p))+"px "+-tr(o.clientHeight-(d+h))+"px "+-tr(u)+"px",threshold:Qn(0,Jn(1,l))||1};let x=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!x)return a();r?a(!1,r):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==r||Kr(c,e.getBoundingClientRect())||a(),x=!1}try{r=new IntersectionObserver(g,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,f)}r.observe(e)}(!0),i}(c,n):null;let p,h=-1,f=null;a&&(f=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()})),c&&!l&&f.observe(c),f.observe(t));let x=l?zr(e):null;return l&&function t(){const r=zr(e);x&&!Kr(x,r)&&n();x=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const Qr=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=sr(n),s=lr(n),l="y"===pr(n),c=_r.has(a)?-1:1,u=i&&l?-1:1,d=ar(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof f&&(h="end"===s?-1*f:f),l?{x:h*u,y:p*c}:{x:p*c,y:h*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},eo=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=ar(e,t),c={x:n,y:r},u=await Mr(t,l),d=pr(sr(o)),p=cr(d);let h=c[p],f=c[d];if(i){const e="y"===p?"bottom":"right";h=ir(h+u["y"===p?"top":"left"],h,h-u[e])}if(a){const e="y"===d?"bottom":"right";f=ir(f+u["y"===d?"top":"left"],f,f-u[e])}const x=s.fn({...t,[p]:h,[d]:f});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[p]:i,[d]:a}}}}}},to=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:x=!0,...g}=ar(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=sr(o),m=pr(s),b=sr(s)===s,y=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=p||(b||!x?[yr(s)]:function(e){const t=yr(e);return[fr(e),t,fr(t)]}(s)),C="none"!==f;!p&&C&&w.push(...br(s,x,f,y));const j=[s,...w],k=await Mr(t,g),$=[];let S=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&$.push(k[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=lr(e),o=hr(e),i=ur(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=yr(a)),[a,yr(a)]}(o,a,y);$.push(k[e[0]],k[e[1]])}if(S=[...S,{placement:o,overflows:$}],!$.every((e=>e<=0))){var E,R;const e=((null==(E=i.flip)?void 0:E.index)||0)+1,t=j[e];if(t){if(!("alignment"===d&&m!==pr(t))||S.every((e=>pr(e.placement)!==m||e.overflows[0]>0)))return{data:{index:e,overflows:S},reset:{placement:t}}}let n=null==(R=S.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:R.placement;if(!n)switch(h){case"bestFit":{var O;const e=null==(O=S.filter((e=>{if(C){const t=pr(e.placement);return t===m||"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:O[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},no=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=ar(e,t)||{};if(null==c)return{};const d=wr(u),p={x:n,y:r},h=hr(o),f=ur(h),x=await a.getDimensions(c),g="y"===h,v=g?"top":"left",m=g?"bottom":"right",b=g?"clientHeight":"clientWidth",y=i.reference[f]+i.reference[h]-p[h]-i.floating[f],w=p[h]-i.reference[h],C=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let j=C?C[b]:0;j&&await(null==a.isElement?void 0:a.isElement(C))||(j=s.floating[b]||i.floating[f]);const k=y/2-w/2,$=j/2-x[f]/2-1,S=Jn(d[v],$),E=Jn(d[m],$),R=S,O=j-x[f]-E,L=j/2-x[f]/2+k,T=ir(R,L,O),P=!l.arrow&&null!=lr(o)&&L!==T&&i.reference[f]/2-(L<R?S:E)-x[f]/2<0,M=P?L<R?L-R:L-O:0;return{[h]:p[h]+M,data:{[h]:T,centerOffset:L-T-M,...P&&{alignmentOffset:M}},reset:P}}}),ro=(e,t,n)=>{const r=new Map,o={platform:Yr,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Pr(c,r,l),p=r,h={},f=0;for(let n=0;n<s.length;n++){const{name:i,fn:x}=s[n],{x:g,y:v,data:m,reset:b}=await x({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=v?v:d,h={...h,[i]:{...h[i],...m}},b&&f<=50&&(f++,"object"==typeof b&&(b.placement&&(p=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=Pr(c,p,l))),n=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:h}})(e,t,{...o,platform:i})};var oo="undefined"!=typeof document?n.useLayoutEffect:function(){};function io(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(!io(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)&&!io(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function ao(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function so(e,t){const n=ao(e);return Math.round(t*n)/n}function lo(e){const t=l.useRef(e);return oo((()=>{t.current=e})),t}const co=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?no({element:n.current,padding:r}).fn(t):{}:n?no({element:n,padding:r}).fn(t):{};var o}}),uo=(e,t)=>({...Qr(e),options:[e,t]}),po=(e,t)=>({...eo(e),options:[e,t]}),ho=(e,t)=>({...co(e),options:[e,t]}),fo="data-floating-ui-focusable",xo="active",go="selected",vo={...l};let mo=!1,bo=0;const yo=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+bo++;const wo=vo.useId||function(){const[e,t]=l.useState((()=>mo?yo():void 0));return Or((()=>{null==e&&t(yo())}),[]),l.useEffect((()=>{mo=!0}),[]),e};let Co;"production"!==process.env.NODE_ENV&&(Co=new Set);const jo=l.createContext(null),ko=l.createContext(null),$o=()=>{var e;return(null==(e=l.useContext(jo))?void 0:e.id)||null},So=()=>l.useContext(ko);const Eo={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Ro={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Oo=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 Lo(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=wo(),i=l.useRef({}),[a]=l.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}())),s=null!=$o();if("production"!==process.env.NODE_ENV){const e=r.reference;e&&!Ln(e)&&function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var i;null!=(e=Co)&&e.has(o)||(null==(i=Co)||i.add(o),console.error(o))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,u]=l.useState(r.reference),d=Tr(((e,t,r)=>{i.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:r,nested:s}),null==n||n(e,t,r)})),p=l.useMemo((()=>({setPositionReference:u})),[]),h=l.useMemo((()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference})),[c,r.reference,r.floating]);return l.useMemo((()=>({dataRef:i,open:t,onOpenChange:d,elements:h,events:a,floatingId:o,refs:p})),[t,d,h,a,o,p])}function To(e){void 0===e&&(e={});const{nodeId:t}=e,n=Lo({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=l.useState(null),[s,u]=l.useState(null),d=(null==o?void 0:o.domReference)||i,p=l.useRef(null),h=So();Or((()=>{d&&(p.current=d)}),[d]);const f=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:u,open:d}=e,[p,h]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,x]=l.useState(r);io(f,r)||x(r);const[g,v]=l.useState(null),[m,b]=l.useState(null),y=l.useCallback((e=>{e!==k.current&&(k.current=e,v(e))}),[]),w=l.useCallback((e=>{e!==$.current&&($.current=e,b(e))}),[]),C=i||g,j=a||m,k=l.useRef(null),$=l.useRef(null),S=l.useRef(p),E=null!=u,R=lo(u),O=lo(o),L=lo(d),T=l.useCallback((()=>{if(!k.current||!$.current)return;const e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),ro(k.current,$.current,e).then((e=>{const t={...e,isPositioned:!1!==L.current};P.current&&!io(S.current,t)&&(S.current=t,c.flushSync((()=>{h(t)})))}))}),[f,t,n,O,L]);oo((()=>{!1===d&&S.current.isPositioned&&(S.current.isPositioned=!1,h((e=>({...e,isPositioned:!1}))))}),[d]);const P=l.useRef(!1);oo((()=>(P.current=!0,()=>{P.current=!1})),[]),oo((()=>{if(C&&(k.current=C),j&&($.current=j),C&&j){if(R.current)return R.current(C,j,T);T()}}),[C,j,T,R,E]);const M=l.useMemo((()=>({reference:k,floating:$,setReference:y,setFloating:w})),[y,w]),_=l.useMemo((()=>({reference:C,floating:j})),[C,j]),D=l.useMemo((()=>{const e={position:n,left:0,top:0};if(!_.floating)return e;const t=so(_.floating,p.x),r=so(_.floating,p.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...ao(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,_.floating,p.x,p.y]);return l.useMemo((()=>({...p,update:T,refs:M,elements:_,floatingStyles:D})),[p,T,M,_,D])}({...e,elements:{...o,...s&&{reference:s}}}),x=l.useCallback((e=>{const t=Ln(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),f.refs.setReference(t)}),[f.refs]),g=l.useCallback((e=>{(Ln(e)||null===e)&&(p.current=e,a(e)),(Ln(f.refs.reference.current)||null===f.refs.reference.current||null!==e&&!Ln(e))&&f.refs.setReference(e)}),[f.refs]),v=l.useMemo((()=>({...f.refs,setReference:g,setPositionReference:x,domReference:p})),[f.refs,g,x]),m=l.useMemo((()=>({...f.elements,domReference:d})),[f.elements,d]),b=l.useMemo((()=>({...f,...r,refs:v,elements:m,nodeId:t})),[f,v,m,t,r]);return Or((()=>{r.dataRef.current.floatingContext=b;const e=null==h?void 0:h.nodesRef.current.find((e=>e.id===t));e&&(e.context=b)})),l.useMemo((()=>({...f,context:b,refs:v,elements:m})),[f,v,m,b])}function Po(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[xo]:t,[go]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[fo]:""},...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 a;o&&[xo,go].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(a=r.get(n))||a.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})):e[n]=i)})),e):e),{})}}const Mo=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function _o(e,t){var n,r;void 0===t&&(t={});const{open:o,elements:i,floatingId:a}=e,{enabled:s=!0,role:c="dialog"}=t,u=wo(),d=(null==(n=i.domReference)?void 0:n.id)||u,p=l.useMemo((()=>{var e,t;return(null==(e=(t=i.floating)?t.hasAttribute(jr)?t:t.querySelector("["+jr+"]")||t:null)?void 0:e.id)||a}),[i.floating,a]),h=null!=(r=Mo.get(c))?r:c,f=null!=$o(),x=l.useMemo((()=>"tooltip"===h||"label"===c?{["aria-"+("label"===c?"labelledby":"describedby")]:o?p:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":"alertdialog"===h?"dialog":h,"aria-controls":o?p:void 0,..."listbox"===h&&{role:"combobox"},..."menu"===h&&{id:d},..."menu"===h&&f&&{role:"menuitem"},..."select"===c&&{"aria-autocomplete":"none"},..."combobox"===c&&{"aria-autocomplete":"list"}}),[h,p,f,o,d,c]),g=l.useMemo((()=>{const e={id:p,...h&&{role:h}};return"tooltip"===h||"label"===c?e:{...e,..."menu"===h&&{"aria-labelledby":d}}}),[h,p,d,c]),v=l.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:p+"-fui-option"}};switch(c){case"select":case"combobox":return{...r,"aria-selected":n}}return{}}),[p,c]);return l.useMemo((()=>s?{reference:x,floating:g,item:v}:{}),[s,x,g,v])}const Do=r.css`
|
|
1788
1787
|
height: auto;
|
|
1789
1788
|
max-height: 512px;
|
|
1790
1789
|
width: 100%;
|
package/dist/index.esm.js
CHANGED
|
@@ -1825,15 +1825,14 @@ import{createSystem as e,defaultConfig as t,Button as n,Box as r,Spinner as i,Ic
|
|
|
1825
1825
|
height: 14px;
|
|
1826
1826
|
width: 14px;
|
|
1827
1827
|
}
|
|
1828
|
-
`},zr=U((({ariaLabel:e,icon:t,backgroundColor:n,onClick:r,showFocusState:i,count:o,mode:a,variant:l="icon"},s)=>{const c=o?(d=o)>=1e8?"99M+":d>=1e6?`${(d/1e6).toFixed(0)}M`:d>=1e5?`${(d/1e3).toFixed(0)}K`:d.toString():void 0;var d;return Z("div",{css:i?
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
border: 2px solid ${me("primary",700)};
|
|
1828
|
+
`},zr=U((({ariaLabel:e,icon:t,backgroundColor:n,onClick:r,showFocusState:i,count:o,mode:a,variant:l="icon"},s)=>{const c=o?(d=o)>=1e8?"99M+":d>=1e6?`${(d/1e6).toFixed(0)}M`:d>=1e5?`${(d/1e3).toFixed(0)}K`:d.toString():void 0;var d;return Z("div",{css:i?le`
|
|
1829
|
+
outline: 2px solid ${me("primary",700)};
|
|
1830
|
+
outline-offset: 2px;
|
|
1832
1831
|
border-radius: 50%;
|
|
1833
1832
|
box-shadow:
|
|
1834
1833
|
0 0 0 2px ${me("neutral",100)},
|
|
1835
1834
|
rgba(0, 0, 0, 0.05) 0px 2px 2px 4px;
|
|
1836
|
-
`):"",children:F("button",{type:"button",css:Ar(n,!!r,!!t,a,o,l),"aria-label":e||(o?`Cluster of ${o} locations`:"simple-pin"===l?"Map pin location":"Map point"),ref:s,onClick:r,children:["cluster"===l&&c,"icon"===l&&t]})});var u})),Hr=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:i,variant:o="cluster"})=>se(zr,{count:r,mode:i,onClick:e,ref:t,showFocusState:n,variant:o}),Br=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:i,variant:o="simple-pin"})=>se(zr,{count:r,mode:i,onClick:e,ref:t,showFocusState:n,variant:o}),Fr={Paper:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>se(zr,{ariaLabel:e||"paper icon",icon:se(Ye,{color:"#79022C"}),backgroundColor:"#FFBCD4",onClick:t,ref:n,showFocusState:r}),Drop:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>se(zr,{ariaLabel:e||"drop icon",icon:se(Ke,{color:"#7D2A03"}),backgroundColor:"#F3A078",onClick:t,ref:n,showFocusState:r}),Plant:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>se(zr,{ariaLabel:e||"plant icon",icon:se(Je,{color:"#3B6402"}),backgroundColor:"#B7E578",onClick:t,ref:n,showFocusState:r}),Point:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>se(zr,{ariaLabel:e||"point icon",backgroundColor:me("primary",500),onClick:t,ref:n,showFocusState:r})};function Zr(){return"undefined"!=typeof window}function Wr(e){return Ur(e)?(e.nodeName||"").toLowerCase():"#document"}function qr(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Gr(e){var t;return null==(t=(Ur(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Ur(e){return!!Zr()&&(e instanceof Node||e instanceof qr(e).Node)}function Xr(e){return!!Zr()&&(e instanceof Element||e instanceof qr(e).Element)}function Yr(e){return!!Zr()&&(e instanceof HTMLElement||e instanceof qr(e).HTMLElement)}function Kr(e){return!(!Zr()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof qr(e).ShadowRoot)}const Jr=new Set(["inline","contents"]);function Qr(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ui(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Jr.has(i)}const ei=new Set(["table","td","th"]);function ti(e){return ei.has(Wr(e))}const ni=[":popover-open",":modal"];function ri(e){return ni.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}const ii=["transform","translate","scale","rotate","perspective"],oi=["transform","translate","scale","rotate","perspective","filter"],ai=["paint","layout","strict","content"];function li(e){const t=si(),n=Xr(e)?ui(e):e;return ii.some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||oi.some((e=>(n.willChange||"").includes(e)))||ai.some((e=>(n.contain||"").includes(e)))}function si(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const ci=new Set(["html","body","#document"]);function di(e){return ci.has(Wr(e))}function ui(e){return qr(e).getComputedStyle(e)}function pi(e){return Xr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hi(e){if("html"===Wr(e))return e;const t=e.assignedSlot||e.parentNode||Kr(e)&&e.host||Gr(e);return Kr(t)?t.host:t}function fi(e){const t=hi(e);return di(t)?e.ownerDocument?e.ownerDocument.body:e.body:Yr(t)&&Qr(t)?t:fi(t)}function gi(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const i=fi(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),a=qr(i);if(o){const e=vi(a);return t.concat(a,a.visualViewport||[],Qr(i)?i:[],e&&n?gi(e):[])}return t.concat(i,gi(i,[],n))}function vi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const mi=Math.min,xi=Math.max,bi=Math.round,yi=Math.floor,wi=e=>({x:e,y:e}),Ci={left:"right",right:"left",bottom:"top",top:"bottom"},$i={start:"end",end:"start"};function ki(e,t,n){return xi(e,mi(t,n))}function Si(e,t){return"function"==typeof e?e(t):e}function Ei(e){return e.split("-")[0]}function Oi(e){return e.split("-")[1]}function Ri(e){return"x"===e?"y":"x"}function Li(e){return"y"===e?"height":"width"}const Ti=new Set(["top","bottom"]);function Pi(e){return Ti.has(Ei(e))?"y":"x"}function _i(e){return Ri(Pi(e))}function Mi(e){return e.replace(/start|end/g,(e=>$i[e]))}const Di=["left","right"],Ni=["right","left"],Vi=["top","bottom"],ji=["bottom","top"];function Ii(e,t,n,r){const i=Oi(e);let o=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Ni:Di:t?Di:Ni;case"left":case"right":return t?Vi:ji;default:return[]}}(Ei(e),"start"===n,r);return i&&(o=o.map((e=>e+"-"+i)),t&&(o=o.concat(o.map(Mi)))),o}function Ai(e){return e.replace(/left|right|bottom|top/g,(e=>Ci[e]))}function zi(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Hi(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}const Bi="data-floating-ui-focusable";function Fi(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Kr(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Zi(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Wi(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 qi(e){return(null==e?void 0:e.ownerDocument)||document}function Gi(e,t,n){void 0===n&&(n=!0);return e.filter((e=>{var r;return e.parentId===t&&(!n||(null==(r=e.context)?void 0:r.open))})).flatMap((t=>[t,...Gi(e,t.id,n)]))}var Ui="undefined"!=typeof document?Q:function(){};const Xi={...q}.useInsertionEffect||(e=>e());function Yi(e){const t=q.useRef((()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")}));return Xi((()=>{t.current=e})),q.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function Ki(e,t,n){let{reference:r,floating:i}=e;const o=Pi(t),a=_i(t),l=Li(a),s=Ei(t),c="y"===o,d=r.x+r.width/2-i.width/2,u=r.y+r.height/2-i.height/2,p=r[l]/2-i[l]/2;let h;switch(s){case"top":h={x:d,y:r.y-i.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:u};break;case"left":h={x:r.x-i.width,y:u};break;default:h={x:r.x,y:r.y}}switch(Oi(t)){case"start":h[a]-=p*(n&&c?-1:1);break;case"end":h[a]+=p*(n&&c?-1:1)}return h}async function Ji(e,t){var n;void 0===t&&(t={});const{x:r,y:i,platform:o,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:h=0}=Si(t,e),f=zi(h),g=l[p?"floating"===u?"reference":"floating":u],v=Hi(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(g)))||n?g:g.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:s})),m="floating"===u?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,x=await(null==o.getOffsetParent?void 0:o.getOffsetParent(l.floating)),b=await(null==o.isElement?void 0:o.isElement(x))&&await(null==o.getScale?void 0:o.getScale(x))||{x:1,y:1},y=Hi(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:m,offsetParent:x,strategy:s}):m);return{top:(v.top-y.top+f.top)/b.y,bottom:(y.bottom-v.bottom+f.bottom)/b.y,left:(v.left-y.left+f.left)/b.x,right:(y.right-v.right+f.right)/b.x}}const Qi=new Set(["left","top"]);function eo(e){const t=ui(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Yr(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,l=bi(n)!==o||bi(r)!==a;return l&&(n=o,r=a),{width:n,height:r,$:l}}function to(e){return Xr(e)?e:e.contextElement}function no(e){const t=to(e);if(!Yr(t))return wi(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=eo(t);let a=(o?bi(n.width):n.width)/r,l=(o?bi(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const ro=wi(0);function io(e){const t=qr(e);return si()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ro}function oo(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const i=e.getBoundingClientRect(),o=to(e);let a=wi(1);t&&(r?Xr(r)&&(a=no(r)):a=no(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==qr(e))&&t}(o,n,r)?io(o):wi(0);let s=(i.left+l.x)/a.x,c=(i.top+l.y)/a.y,d=i.width/a.x,u=i.height/a.y;if(o){const e=qr(o),t=r&&Xr(r)?qr(r):r;let n=e,i=vi(n);for(;i&&r&&t!==n;){const e=no(i),t=i.getBoundingClientRect(),r=ui(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,d*=e.x,u*=e.y,s+=o,c+=a,n=qr(i),i=vi(n)}}return Hi({width:d,height:u,x:s,y:c})}function ao(e,t){const n=pi(e).scrollLeft;return t?t.left+n:oo(Gr(e)).left+n}function lo(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ao(e,n),y:n.top+t.scrollTop}}const so=new Set(["absolute","fixed"]);function co(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=qr(e),r=Gr(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,l=0,s=0;if(i){o=i.width,a=i.height;const e=si();(!e||e&&"fixed"===t)&&(l=i.offsetLeft,s=i.offsetTop)}const c=ao(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-i);a<=25&&(o-=a)}else c<=25&&(o+=c);return{width:o,height:a,x:l,y:s}}(e,n);else if("document"===t)r=function(e){const t=Gr(e),n=pi(e),r=e.ownerDocument.body,i=xi(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=xi(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ao(e);const l=-n.scrollTop;return"rtl"===ui(r).direction&&(a+=xi(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:l}}(Gr(e));else if(Xr(t))r=function(e,t){const n=oo(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Yr(e)?no(e):wi(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{const n=io(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Hi(r)}function uo(e,t){const n=hi(e);return!(n===t||!Xr(n)||di(n))&&("fixed"===ui(n).position||uo(n,t))}function po(e,t,n){const r=Yr(t),i=Gr(t),o="fixed"===n,a=oo(e,!0,o,t);let l={scrollLeft:0,scrollTop:0};const s=wi(0);function c(){s.x=ao(i)}if(r||!r&&!o)if(("body"!==Wr(t)||Qr(i))&&(l=pi(t)),r){const e=oo(t,!0,o,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&c();o&&!r&&i&&c();const d=!i||r||o?wi(0):lo(i,l);return{x:a.left+l.scrollLeft-s.x-d.x,y:a.top+l.scrollTop-s.y-d.y,width:a.width,height:a.height}}function ho(e){return"static"===ui(e).position}function fo(e,t){if(!Yr(e)||"fixed"===ui(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Gr(e)===n&&(n=n.ownerDocument.body),n}function go(e,t){const n=qr(e);if(ri(e))return n;if(!Yr(e)){let t=hi(e);for(;t&&!di(t);){if(Xr(t)&&!ho(t))return t;t=hi(t)}return n}let r=fo(e,t);for(;r&&ti(r)&&ho(r);)r=fo(r,t);return r&&di(r)&&ho(r)&&!li(r)?n:r||function(e){let t=hi(e);for(;Yr(t)&&!di(t);){if(li(t))return t;if(ri(t))return null;t=hi(t)}return null}(e)||n}const vo={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o="fixed"===i,a=Gr(r),l=!!t&&ri(t.floating);if(r===a||l&&o)return n;let s={scrollLeft:0,scrollTop:0},c=wi(1);const d=wi(0),u=Yr(r);if((u||!u&&!o)&&(("body"!==Wr(r)||Qr(a))&&(s=pi(r)),Yr(r))){const e=oo(r);c=no(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}const p=!a||u||o?wi(0):lo(a,s);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+d.x+p.x,y:n.y*c.y-s.scrollTop*c.y+d.y+p.y}},getDocumentElement:Gr,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o="clippingAncestors"===n?ri(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=gi(e,[],!1).filter((e=>Xr(e)&&"body"!==Wr(e))),i=null;const o="fixed"===ui(e).position;let a=o?hi(e):e;for(;Xr(a)&&!di(a);){const t=ui(a),n=li(a);n||"fixed"!==t.position||(i=null),(o?!n&&!i:!n&&"static"===t.position&&i&&so.has(i.position)||Qr(a)&&!n&&uo(e,a))?r=r.filter((e=>e!==a)):i=t,a=hi(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...o,r],l=a[0],s=a.reduce(((e,n)=>{const r=co(t,n,i);return e.top=xi(r.top,e.top),e.right=mi(r.right,e.right),e.bottom=mi(r.bottom,e.bottom),e.left=xi(r.left,e.left),e}),co(t,l,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:go,getElementRects:async function(e){const t=this.getOffsetParent||go,n=this.getDimensions,r=await n(e.floating);return{reference:po(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}=eo(e);return{width:t,height:n}},getScale:no,isElement:Xr,isRTL:function(e){return"rtl"===ui(e).direction}};function mo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xo(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=to(e),d=i||o?[...c?gi(c):[],...gi(t)]:[];d.forEach((e=>{i&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));const u=c&&l?function(e,t){let n,r=null;const i=Gr(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),o();const c=e.getBoundingClientRect(),{left:d,top:u,width:p,height:h}=c;if(l||t(),!p||!h)return;const f={rootMargin:-yi(u)+"px "+-yi(i.clientWidth-(d+p))+"px "+-yi(i.clientHeight-(u+h))+"px "+-yi(d)+"px",threshold:xi(0,mi(1,s))||1};let g=!0;function v(t){const r=t[0].intersectionRatio;if(r!==s){if(!g)return a();r?a(!1,r):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==r||mo(c,e.getBoundingClientRect())||a(),g=!1}try{r=new IntersectionObserver(v,{...f,root:i.ownerDocument})}catch(e){r=new IntersectionObserver(v,f)}r.observe(e)}(!0),o}(c,n):null;let p,h=-1,f=null;a&&(f=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()})),c&&!s&&f.observe(c),f.observe(t));let g=s?oo(e):null;return s&&function t(){const r=oo(e);g&&!mo(g,r)&&n();g=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach((e=>{i&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==u||u(),null==(e=f)||e.disconnect(),f=null,s&&cancelAnimationFrame(p)}}const bo=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:l}=t,s=await async function(e,t){const{placement:n,platform:r,elements:i}=e,o=await(null==r.isRTL?void 0:r.isRTL(i.floating)),a=Ei(n),l=Oi(n),s="y"===Pi(n),c=Qi.has(a)?-1:1,d=o&&s?-1:1,u=Si(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:f}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&"number"==typeof f&&(h="end"===l?-1*f:f),s?{x:h*d,y:p*c}:{x:p*c,y:h*d}}(t,e);return a===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:i+s.x,y:o+s.y,data:{...s,placement:a}}}}},yo=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=Si(e,t),c={x:n,y:r},d=await Ji(t,s),u=Pi(Ei(i)),p=Ri(u);let h=c[p],f=c[u];if(o){const e="y"===p?"bottom":"right";h=ki(h+d["y"===p?"top":"left"],h,h-d[e])}if(a){const e="y"===u?"bottom":"right";f=ki(f+d["y"===u?"top":"left"],f,f-d[e])}const g=l.fn({...t,[p]:h,[u]:f});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[u]:a}}}}}},wo=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:a,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:g=!0,...v}=Si(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const m=Ei(i),x=Pi(l),b=Ei(l)===l,y=await(null==s.isRTL?void 0:s.isRTL(c.floating)),w=p||(b||!g?[Ai(l)]:function(e){const t=Ai(e);return[Mi(e),t,Mi(t)]}(l)),C="none"!==f;!p&&C&&w.push(...Ii(l,g,f,y));const $=[l,...w],k=await Ji(t,v),S=[];let E=(null==(r=o.flip)?void 0:r.overflows)||[];if(d&&S.push(k[m]),u){const e=function(e,t,n){void 0===n&&(n=!1);const r=Oi(e),i=_i(e),o=Li(i);let a="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Ai(a)),[a,Ai(a)]}(i,a,y);S.push(k[e[0]],k[e[1]])}if(E=[...E,{placement:i,overflows:S}],!S.every((e=>e<=0))){var O,R;const e=((null==(O=o.flip)?void 0:O.index)||0)+1,t=$[e];if(t){if(!("alignment"===u&&x!==Pi(t))||E.every((e=>Pi(e.placement)!==x||e.overflows[0]>0)))return{data:{index:e,overflows:E},reset:{placement:t}}}let n=null==(R=E.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:R.placement;if(!n)switch(h){case"bestFit":{var L;const e=null==(L=E.filter((e=>{if(C){const t=Pi(e.placement);return t===x||"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=l}if(i!==n)return{reset:{placement:n}}}return{}}}},Co=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:l,middlewareData:s}=t,{element:c,padding:d=0}=Si(e,t)||{};if(null==c)return{};const u=zi(d),p={x:n,y:r},h=_i(i),f=Li(h),g=await a.getDimensions(c),v="y"===h,m=v?"top":"left",x=v?"bottom":"right",b=v?"clientHeight":"clientWidth",y=o.reference[f]+o.reference[h]-p[h]-o.floating[f],w=p[h]-o.reference[h],C=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let $=C?C[b]:0;$&&await(null==a.isElement?void 0:a.isElement(C))||($=l.floating[b]||o.floating[f]);const k=y/2-w/2,S=$/2-g[f]/2-1,E=mi(u[m],S),O=mi(u[x],S),R=E,L=$-g[f]-O,T=$/2-g[f]/2+k,P=ki(R,T,L),_=!s.arrow&&null!=Oi(i)&&T!==P&&o.reference[f]/2-(T<R?E:O)-g[f]/2<0,M=_?T<R?T-R:T-L:0;return{[h]:p[h]+M,data:{[h]:P,centerOffset:T-P-M,..._&&{alignmentOffset:M}},reset:_}}}),$o=(e,t,n)=>{const r=new Map,i={platform:vo,...n},o={...i.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,l=o.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:u}=Ki(c,r,s),p=r,h={},f=0;for(let n=0;n<l.length;n++){const{name:o,fn:g}=l[n],{x:v,y:m,data:x,reset:b}=await g({x:d,y:u,initialPlacement:r,placement:p,strategy:i,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});d=null!=v?v:d,u=null!=m?m:u,h={...h,[o]:{...h[o],...x}},b&&f<=50&&(f++,"object"==typeof b&&(b.placement&&(p=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:i}):b.rects),({x:d,y:u}=Ki(c,p,s))),n=-1)}return{x:d,y:u,placement:p,strategy:i,middlewareData:h}})(e,t,{...i,platform:o})};var ko="undefined"!=typeof document?Q:function(){};function So(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,i;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(!So(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){const n=i[r];if(("_owner"!==n||!e.$$typeof)&&!So(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Eo(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Oo(e,t){const n=Eo(e);return Math.round(t*n)/n}function Ro(e){const t=q.useRef(e);return ko((()=>{t.current=e})),t}const Lo=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(i=n,{}.hasOwnProperty.call(i,"current"))?null!=n.current?Co({element:n.current,padding:r}).fn(t):{}:n?Co({element:n,padding:r}).fn(t):{};var i}}),To=(e,t)=>({...bo(e),options:[e,t]}),Po=(e,t)=>({...yo(e),options:[e,t]}),_o=(e,t)=>({...Lo(e),options:[e,t]}),Mo="data-floating-ui-focusable",Do="active",No="selected",Vo={...q};let jo=!1,Io=0;const Ao=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Io++;const zo=Vo.useId||function(){const[e,t]=q.useState((()=>jo?Ao():void 0));return Ui((()=>{null==e&&t(Ao())}),[]),q.useEffect((()=>{jo=!0}),[]),e};let Ho;"production"!==process.env.NODE_ENV&&(Ho=new Set);const Bo=q.createContext(null),Fo=q.createContext(null),Zo=()=>{var e;return(null==(e=q.useContext(Bo))?void 0:e.id)||null},Wo=()=>q.useContext(Fo);const qo={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Go={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Uo=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 Xo(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=zo(),o=q.useRef({}),[a]=q.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}())),l=null!=Zo();if("production"!==process.env.NODE_ENV){const e=r.reference;e&&!Xr(e)&&function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i="Floating UI: "+n.join(" ");var o;null!=(e=Ho)&&e.has(i)||(null==(o=Ho)||o.add(i),console.error(i))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[s,c]=q.useState(r.reference),d=Yi(((e,t,r)=>{o.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:r,nested:l}),null==n||n(e,t,r)})),u=q.useMemo((()=>({setPositionReference:c})),[]),p=q.useMemo((()=>({reference:s||r.reference||null,floating:r.floating||null,domReference:r.reference})),[s,r.reference,r.floating]);return q.useMemo((()=>({dataRef:o,open:t,onOpenChange:d,elements:p,events:a,floatingId:i,refs:u})),[t,d,p,a,i,u])}function Yo(e){void 0===e&&(e={});const{nodeId:t}=e,n=Xo({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[o,a]=q.useState(null),[l,s]=q.useState(null),c=(null==i?void 0:i.domReference)||o,d=q.useRef(null),u=Wo();Ui((()=>{c&&(d.current=c)}),[c]);const p=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:l=!0,whileElementsMounted:s,open:c}=e,[d,u]=q.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=q.useState(r);So(p,r)||h(r);const[f,g]=q.useState(null),[v,m]=q.useState(null),x=q.useCallback((e=>{e!==C.current&&(C.current=e,g(e))}),[]),b=q.useCallback((e=>{e!==$.current&&($.current=e,m(e))}),[]),y=o||f,w=a||v,C=q.useRef(null),$=q.useRef(null),k=q.useRef(d),S=null!=s,E=Ro(s),O=Ro(i),R=Ro(c),L=q.useCallback((()=>{if(!C.current||!$.current)return;const e={placement:t,strategy:n,middleware:p};O.current&&(e.platform=O.current),$o(C.current,$.current,e).then((e=>{const t={...e,isPositioned:!1!==R.current};T.current&&!So(k.current,t)&&(k.current=t,ue.flushSync((()=>{u(t)})))}))}),[p,t,n,O,R]);ko((()=>{!1===c&&k.current.isPositioned&&(k.current.isPositioned=!1,u((e=>({...e,isPositioned:!1}))))}),[c]);const T=q.useRef(!1);ko((()=>(T.current=!0,()=>{T.current=!1})),[]),ko((()=>{if(y&&(C.current=y),w&&($.current=w),y&&w){if(E.current)return E.current(y,w,L);L()}}),[y,w,L,E,S]);const P=q.useMemo((()=>({reference:C,floating:$,setReference:x,setFloating:b})),[x,b]),_=q.useMemo((()=>({reference:y,floating:w})),[y,w]),M=q.useMemo((()=>{const e={position:n,left:0,top:0};if(!_.floating)return e;const t=Oo(_.floating,d.x),r=Oo(_.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...Eo(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,_.floating,d.x,d.y]);return q.useMemo((()=>({...d,update:L,refs:P,elements:_,floatingStyles:M})),[d,L,P,_,M])}({...e,elements:{...i,...l&&{reference:l}}}),h=q.useCallback((e=>{const t=Xr(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;s(t),p.refs.setReference(t)}),[p.refs]),f=q.useCallback((e=>{(Xr(e)||null===e)&&(d.current=e,a(e)),(Xr(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!Xr(e))&&p.refs.setReference(e)}),[p.refs]),g=q.useMemo((()=>({...p.refs,setReference:f,setPositionReference:h,domReference:d})),[p.refs,f,h]),v=q.useMemo((()=>({...p.elements,domReference:c})),[p.elements,c]),m=q.useMemo((()=>({...p,...r,refs:g,elements:v,nodeId:t})),[p,g,v,t,r]);return Ui((()=>{r.dataRef.current.floatingContext=m;const e=null==u?void 0:u.nodesRef.current.find((e=>e.id===t));e&&(e.context=m)})),q.useMemo((()=>({...p,context:m,refs:g,elements:v})),[p,g,v,m])}function Ko(e,t,n){const r=new Map,i="item"===n;let o=e;if(i&&e){const{[Do]:t,[No]:n,...r}=e;o=r}return{..."floating"===n&&{tabIndex:-1,[Mo]:""},...o,...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,o]=t;var a;i&&[Do,No].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof o&&(null==(a=r.get(n))||a.push(o),e[n]=function(){for(var e,t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return null==(e=r.get(n))?void 0:e.map((e=>e(...i))).find((e=>void 0!==e))})):e[n]=o)})),e):e),{})}}const Jo=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Qo(e,t){var n,r;void 0===t&&(t={});const{open:i,elements:o,floatingId:a}=e,{enabled:l=!0,role:s="dialog"}=t,c=zo(),d=(null==(n=o.domReference)?void 0:n.id)||c,u=q.useMemo((()=>{var e,t;return(null==(e=(t=o.floating)?t.hasAttribute(Bi)?t:t.querySelector("["+Bi+"]")||t:null)?void 0:e.id)||a}),[o.floating,a]),p=null!=(r=Jo.get(s))?r:s,h=null!=Zo(),f=q.useMemo((()=>"tooltip"===p||"label"===s?{["aria-"+("label"===s?"labelledby":"describedby")]:i?u:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":"alertdialog"===p?"dialog":p,"aria-controls":i?u:void 0,..."listbox"===p&&{role:"combobox"},..."menu"===p&&{id:d},..."menu"===p&&h&&{role:"menuitem"},..."select"===s&&{"aria-autocomplete":"none"},..."combobox"===s&&{"aria-autocomplete":"list"}}),[p,u,h,i,d,s]),g=q.useMemo((()=>{const e={id:u,...p&&{role:p}};return"tooltip"===p||"label"===s?e:{...e,..."menu"===p&&{"aria-labelledby":d}}}),[p,u,d,s]),v=q.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:u+"-fui-option"}};switch(s){case"select":case"combobox":return{...r,"aria-selected":n}}return{}}),[u,s]);return q.useMemo((()=>l?{reference:f,floating:g,item:v}:{}),[l,f,g,v])}const ea=le`
|
|
1835
|
+
`:"",children:F("button",{type:"button",css:Ar(n,!!r,!!t,a,o,l),"aria-label":e||(o?`Cluster of ${o} locations`:"simple-pin"===l?"Map pin location":"Map point"),ref:s,onClick:r,children:["cluster"===l&&c,"icon"===l&&t]})})})),Hr=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:i,variant:o="cluster"})=>se(zr,{count:r,mode:i,onClick:e,ref:t,showFocusState:n,variant:o}),Br=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:i,variant:o="simple-pin"})=>se(zr,{count:r,mode:i,onClick:e,ref:t,showFocusState:n,variant:o}),Fr={Paper:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>se(zr,{ariaLabel:e||"paper icon",icon:se(Ye,{color:"#79022C"}),backgroundColor:"#FFBCD4",onClick:t,ref:n,showFocusState:r}),Drop:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>se(zr,{ariaLabel:e||"drop icon",icon:se(Ke,{color:"#7D2A03"}),backgroundColor:"#F3A078",onClick:t,ref:n,showFocusState:r}),Plant:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>se(zr,{ariaLabel:e||"plant icon",icon:se(Je,{color:"#3B6402"}),backgroundColor:"#B7E578",onClick:t,ref:n,showFocusState:r}),Point:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>se(zr,{ariaLabel:e||"point icon",backgroundColor:me("primary",500),onClick:t,ref:n,showFocusState:r})};function Zr(){return"undefined"!=typeof window}function Wr(e){return Ur(e)?(e.nodeName||"").toLowerCase():"#document"}function qr(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Gr(e){var t;return null==(t=(Ur(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Ur(e){return!!Zr()&&(e instanceof Node||e instanceof qr(e).Node)}function Xr(e){return!!Zr()&&(e instanceof Element||e instanceof qr(e).Element)}function Yr(e){return!!Zr()&&(e instanceof HTMLElement||e instanceof qr(e).HTMLElement)}function Kr(e){return!(!Zr()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof qr(e).ShadowRoot)}const Jr=new Set(["inline","contents"]);function Qr(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ui(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Jr.has(i)}const ei=new Set(["table","td","th"]);function ti(e){return ei.has(Wr(e))}const ni=[":popover-open",":modal"];function ri(e){return ni.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}const ii=["transform","translate","scale","rotate","perspective"],oi=["transform","translate","scale","rotate","perspective","filter"],ai=["paint","layout","strict","content"];function li(e){const t=si(),n=Xr(e)?ui(e):e;return ii.some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||oi.some((e=>(n.willChange||"").includes(e)))||ai.some((e=>(n.contain||"").includes(e)))}function si(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const ci=new Set(["html","body","#document"]);function di(e){return ci.has(Wr(e))}function ui(e){return qr(e).getComputedStyle(e)}function pi(e){return Xr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hi(e){if("html"===Wr(e))return e;const t=e.assignedSlot||e.parentNode||Kr(e)&&e.host||Gr(e);return Kr(t)?t.host:t}function fi(e){const t=hi(e);return di(t)?e.ownerDocument?e.ownerDocument.body:e.body:Yr(t)&&Qr(t)?t:fi(t)}function gi(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const i=fi(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),a=qr(i);if(o){const e=vi(a);return t.concat(a,a.visualViewport||[],Qr(i)?i:[],e&&n?gi(e):[])}return t.concat(i,gi(i,[],n))}function vi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const mi=Math.min,xi=Math.max,bi=Math.round,yi=Math.floor,wi=e=>({x:e,y:e}),Ci={left:"right",right:"left",bottom:"top",top:"bottom"},$i={start:"end",end:"start"};function ki(e,t,n){return xi(e,mi(t,n))}function Si(e,t){return"function"==typeof e?e(t):e}function Ei(e){return e.split("-")[0]}function Oi(e){return e.split("-")[1]}function Ri(e){return"x"===e?"y":"x"}function Li(e){return"y"===e?"height":"width"}const Ti=new Set(["top","bottom"]);function Pi(e){return Ti.has(Ei(e))?"y":"x"}function _i(e){return Ri(Pi(e))}function Mi(e){return e.replace(/start|end/g,(e=>$i[e]))}const Di=["left","right"],Ni=["right","left"],Vi=["top","bottom"],ji=["bottom","top"];function Ii(e,t,n,r){const i=Oi(e);let o=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Ni:Di:t?Di:Ni;case"left":case"right":return t?Vi:ji;default:return[]}}(Ei(e),"start"===n,r);return i&&(o=o.map((e=>e+"-"+i)),t&&(o=o.concat(o.map(Mi)))),o}function Ai(e){return e.replace(/left|right|bottom|top/g,(e=>Ci[e]))}function zi(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Hi(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}const Bi="data-floating-ui-focusable";function Fi(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Kr(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Zi(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Wi(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 qi(e){return(null==e?void 0:e.ownerDocument)||document}function Gi(e,t,n){void 0===n&&(n=!0);return e.filter((e=>{var r;return e.parentId===t&&(!n||(null==(r=e.context)?void 0:r.open))})).flatMap((t=>[t,...Gi(e,t.id,n)]))}var Ui="undefined"!=typeof document?Q:function(){};const Xi={...q}.useInsertionEffect||(e=>e());function Yi(e){const t=q.useRef((()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")}));return Xi((()=>{t.current=e})),q.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function Ki(e,t,n){let{reference:r,floating:i}=e;const o=Pi(t),a=_i(t),l=Li(a),s=Ei(t),c="y"===o,d=r.x+r.width/2-i.width/2,u=r.y+r.height/2-i.height/2,p=r[l]/2-i[l]/2;let h;switch(s){case"top":h={x:d,y:r.y-i.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:u};break;case"left":h={x:r.x-i.width,y:u};break;default:h={x:r.x,y:r.y}}switch(Oi(t)){case"start":h[a]-=p*(n&&c?-1:1);break;case"end":h[a]+=p*(n&&c?-1:1)}return h}async function Ji(e,t){var n;void 0===t&&(t={});const{x:r,y:i,platform:o,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:h=0}=Si(t,e),f=zi(h),g=l[p?"floating"===u?"reference":"floating":u],v=Hi(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(g)))||n?g:g.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:s})),m="floating"===u?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,x=await(null==o.getOffsetParent?void 0:o.getOffsetParent(l.floating)),b=await(null==o.isElement?void 0:o.isElement(x))&&await(null==o.getScale?void 0:o.getScale(x))||{x:1,y:1},y=Hi(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:m,offsetParent:x,strategy:s}):m);return{top:(v.top-y.top+f.top)/b.y,bottom:(y.bottom-v.bottom+f.bottom)/b.y,left:(v.left-y.left+f.left)/b.x,right:(y.right-v.right+f.right)/b.x}}const Qi=new Set(["left","top"]);function eo(e){const t=ui(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Yr(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,l=bi(n)!==o||bi(r)!==a;return l&&(n=o,r=a),{width:n,height:r,$:l}}function to(e){return Xr(e)?e:e.contextElement}function no(e){const t=to(e);if(!Yr(t))return wi(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=eo(t);let a=(o?bi(n.width):n.width)/r,l=(o?bi(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const ro=wi(0);function io(e){const t=qr(e);return si()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ro}function oo(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const i=e.getBoundingClientRect(),o=to(e);let a=wi(1);t&&(r?Xr(r)&&(a=no(r)):a=no(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==qr(e))&&t}(o,n,r)?io(o):wi(0);let s=(i.left+l.x)/a.x,c=(i.top+l.y)/a.y,d=i.width/a.x,u=i.height/a.y;if(o){const e=qr(o),t=r&&Xr(r)?qr(r):r;let n=e,i=vi(n);for(;i&&r&&t!==n;){const e=no(i),t=i.getBoundingClientRect(),r=ui(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,d*=e.x,u*=e.y,s+=o,c+=a,n=qr(i),i=vi(n)}}return Hi({width:d,height:u,x:s,y:c})}function ao(e,t){const n=pi(e).scrollLeft;return t?t.left+n:oo(Gr(e)).left+n}function lo(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ao(e,n),y:n.top+t.scrollTop}}const so=new Set(["absolute","fixed"]);function co(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=qr(e),r=Gr(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,l=0,s=0;if(i){o=i.width,a=i.height;const e=si();(!e||e&&"fixed"===t)&&(l=i.offsetLeft,s=i.offsetTop)}const c=ao(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-i);a<=25&&(o-=a)}else c<=25&&(o+=c);return{width:o,height:a,x:l,y:s}}(e,n);else if("document"===t)r=function(e){const t=Gr(e),n=pi(e),r=e.ownerDocument.body,i=xi(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=xi(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ao(e);const l=-n.scrollTop;return"rtl"===ui(r).direction&&(a+=xi(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:l}}(Gr(e));else if(Xr(t))r=function(e,t){const n=oo(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Yr(e)?no(e):wi(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{const n=io(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Hi(r)}function uo(e,t){const n=hi(e);return!(n===t||!Xr(n)||di(n))&&("fixed"===ui(n).position||uo(n,t))}function po(e,t,n){const r=Yr(t),i=Gr(t),o="fixed"===n,a=oo(e,!0,o,t);let l={scrollLeft:0,scrollTop:0};const s=wi(0);function c(){s.x=ao(i)}if(r||!r&&!o)if(("body"!==Wr(t)||Qr(i))&&(l=pi(t)),r){const e=oo(t,!0,o,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&c();o&&!r&&i&&c();const d=!i||r||o?wi(0):lo(i,l);return{x:a.left+l.scrollLeft-s.x-d.x,y:a.top+l.scrollTop-s.y-d.y,width:a.width,height:a.height}}function ho(e){return"static"===ui(e).position}function fo(e,t){if(!Yr(e)||"fixed"===ui(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Gr(e)===n&&(n=n.ownerDocument.body),n}function go(e,t){const n=qr(e);if(ri(e))return n;if(!Yr(e)){let t=hi(e);for(;t&&!di(t);){if(Xr(t)&&!ho(t))return t;t=hi(t)}return n}let r=fo(e,t);for(;r&&ti(r)&&ho(r);)r=fo(r,t);return r&&di(r)&&ho(r)&&!li(r)?n:r||function(e){let t=hi(e);for(;Yr(t)&&!di(t);){if(li(t))return t;if(ri(t))return null;t=hi(t)}return null}(e)||n}const vo={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o="fixed"===i,a=Gr(r),l=!!t&&ri(t.floating);if(r===a||l&&o)return n;let s={scrollLeft:0,scrollTop:0},c=wi(1);const d=wi(0),u=Yr(r);if((u||!u&&!o)&&(("body"!==Wr(r)||Qr(a))&&(s=pi(r)),Yr(r))){const e=oo(r);c=no(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}const p=!a||u||o?wi(0):lo(a,s);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+d.x+p.x,y:n.y*c.y-s.scrollTop*c.y+d.y+p.y}},getDocumentElement:Gr,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o="clippingAncestors"===n?ri(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=gi(e,[],!1).filter((e=>Xr(e)&&"body"!==Wr(e))),i=null;const o="fixed"===ui(e).position;let a=o?hi(e):e;for(;Xr(a)&&!di(a);){const t=ui(a),n=li(a);n||"fixed"!==t.position||(i=null),(o?!n&&!i:!n&&"static"===t.position&&i&&so.has(i.position)||Qr(a)&&!n&&uo(e,a))?r=r.filter((e=>e!==a)):i=t,a=hi(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...o,r],l=a[0],s=a.reduce(((e,n)=>{const r=co(t,n,i);return e.top=xi(r.top,e.top),e.right=mi(r.right,e.right),e.bottom=mi(r.bottom,e.bottom),e.left=xi(r.left,e.left),e}),co(t,l,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:go,getElementRects:async function(e){const t=this.getOffsetParent||go,n=this.getDimensions,r=await n(e.floating);return{reference:po(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}=eo(e);return{width:t,height:n}},getScale:no,isElement:Xr,isRTL:function(e){return"rtl"===ui(e).direction}};function mo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xo(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=to(e),d=i||o?[...c?gi(c):[],...gi(t)]:[];d.forEach((e=>{i&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));const u=c&&l?function(e,t){let n,r=null;const i=Gr(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),o();const c=e.getBoundingClientRect(),{left:d,top:u,width:p,height:h}=c;if(l||t(),!p||!h)return;const f={rootMargin:-yi(u)+"px "+-yi(i.clientWidth-(d+p))+"px "+-yi(i.clientHeight-(u+h))+"px "+-yi(d)+"px",threshold:xi(0,mi(1,s))||1};let g=!0;function v(t){const r=t[0].intersectionRatio;if(r!==s){if(!g)return a();r?a(!1,r):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==r||mo(c,e.getBoundingClientRect())||a(),g=!1}try{r=new IntersectionObserver(v,{...f,root:i.ownerDocument})}catch(e){r=new IntersectionObserver(v,f)}r.observe(e)}(!0),o}(c,n):null;let p,h=-1,f=null;a&&(f=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()})),c&&!s&&f.observe(c),f.observe(t));let g=s?oo(e):null;return s&&function t(){const r=oo(e);g&&!mo(g,r)&&n();g=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach((e=>{i&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==u||u(),null==(e=f)||e.disconnect(),f=null,s&&cancelAnimationFrame(p)}}const bo=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:l}=t,s=await async function(e,t){const{placement:n,platform:r,elements:i}=e,o=await(null==r.isRTL?void 0:r.isRTL(i.floating)),a=Ei(n),l=Oi(n),s="y"===Pi(n),c=Qi.has(a)?-1:1,d=o&&s?-1:1,u=Si(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:f}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&"number"==typeof f&&(h="end"===l?-1*f:f),s?{x:h*d,y:p*c}:{x:p*c,y:h*d}}(t,e);return a===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:i+s.x,y:o+s.y,data:{...s,placement:a}}}}},yo=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=Si(e,t),c={x:n,y:r},d=await Ji(t,s),u=Pi(Ei(i)),p=Ri(u);let h=c[p],f=c[u];if(o){const e="y"===p?"bottom":"right";h=ki(h+d["y"===p?"top":"left"],h,h-d[e])}if(a){const e="y"===u?"bottom":"right";f=ki(f+d["y"===u?"top":"left"],f,f-d[e])}const g=l.fn({...t,[p]:h,[u]:f});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[u]:a}}}}}},wo=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:a,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:g=!0,...v}=Si(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const m=Ei(i),x=Pi(l),b=Ei(l)===l,y=await(null==s.isRTL?void 0:s.isRTL(c.floating)),w=p||(b||!g?[Ai(l)]:function(e){const t=Ai(e);return[Mi(e),t,Mi(t)]}(l)),C="none"!==f;!p&&C&&w.push(...Ii(l,g,f,y));const $=[l,...w],k=await Ji(t,v),S=[];let E=(null==(r=o.flip)?void 0:r.overflows)||[];if(d&&S.push(k[m]),u){const e=function(e,t,n){void 0===n&&(n=!1);const r=Oi(e),i=_i(e),o=Li(i);let a="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Ai(a)),[a,Ai(a)]}(i,a,y);S.push(k[e[0]],k[e[1]])}if(E=[...E,{placement:i,overflows:S}],!S.every((e=>e<=0))){var O,R;const e=((null==(O=o.flip)?void 0:O.index)||0)+1,t=$[e];if(t){if(!("alignment"===u&&x!==Pi(t))||E.every((e=>Pi(e.placement)!==x||e.overflows[0]>0)))return{data:{index:e,overflows:E},reset:{placement:t}}}let n=null==(R=E.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:R.placement;if(!n)switch(h){case"bestFit":{var L;const e=null==(L=E.filter((e=>{if(C){const t=Pi(e.placement);return t===x||"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=l}if(i!==n)return{reset:{placement:n}}}return{}}}},Co=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:l,middlewareData:s}=t,{element:c,padding:d=0}=Si(e,t)||{};if(null==c)return{};const u=zi(d),p={x:n,y:r},h=_i(i),f=Li(h),g=await a.getDimensions(c),v="y"===h,m=v?"top":"left",x=v?"bottom":"right",b=v?"clientHeight":"clientWidth",y=o.reference[f]+o.reference[h]-p[h]-o.floating[f],w=p[h]-o.reference[h],C=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let $=C?C[b]:0;$&&await(null==a.isElement?void 0:a.isElement(C))||($=l.floating[b]||o.floating[f]);const k=y/2-w/2,S=$/2-g[f]/2-1,E=mi(u[m],S),O=mi(u[x],S),R=E,L=$-g[f]-O,T=$/2-g[f]/2+k,P=ki(R,T,L),_=!s.arrow&&null!=Oi(i)&&T!==P&&o.reference[f]/2-(T<R?E:O)-g[f]/2<0,M=_?T<R?T-R:T-L:0;return{[h]:p[h]+M,data:{[h]:P,centerOffset:T-P-M,..._&&{alignmentOffset:M}},reset:_}}}),$o=(e,t,n)=>{const r=new Map,i={platform:vo,...n},o={...i.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,l=o.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:u}=Ki(c,r,s),p=r,h={},f=0;for(let n=0;n<l.length;n++){const{name:o,fn:g}=l[n],{x:v,y:m,data:x,reset:b}=await g({x:d,y:u,initialPlacement:r,placement:p,strategy:i,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});d=null!=v?v:d,u=null!=m?m:u,h={...h,[o]:{...h[o],...x}},b&&f<=50&&(f++,"object"==typeof b&&(b.placement&&(p=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:i}):b.rects),({x:d,y:u}=Ki(c,p,s))),n=-1)}return{x:d,y:u,placement:p,strategy:i,middlewareData:h}})(e,t,{...i,platform:o})};var ko="undefined"!=typeof document?Q:function(){};function So(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,i;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(!So(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){const n=i[r];if(("_owner"!==n||!e.$$typeof)&&!So(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Eo(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Oo(e,t){const n=Eo(e);return Math.round(t*n)/n}function Ro(e){const t=q.useRef(e);return ko((()=>{t.current=e})),t}const Lo=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(i=n,{}.hasOwnProperty.call(i,"current"))?null!=n.current?Co({element:n.current,padding:r}).fn(t):{}:n?Co({element:n,padding:r}).fn(t):{};var i}}),To=(e,t)=>({...bo(e),options:[e,t]}),Po=(e,t)=>({...yo(e),options:[e,t]}),_o=(e,t)=>({...Lo(e),options:[e,t]}),Mo="data-floating-ui-focusable",Do="active",No="selected",Vo={...q};let jo=!1,Io=0;const Ao=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Io++;const zo=Vo.useId||function(){const[e,t]=q.useState((()=>jo?Ao():void 0));return Ui((()=>{null==e&&t(Ao())}),[]),q.useEffect((()=>{jo=!0}),[]),e};let Ho;"production"!==process.env.NODE_ENV&&(Ho=new Set);const Bo=q.createContext(null),Fo=q.createContext(null),Zo=()=>{var e;return(null==(e=q.useContext(Bo))?void 0:e.id)||null},Wo=()=>q.useContext(Fo);const qo={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Go={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Uo=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 Xo(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=zo(),o=q.useRef({}),[a]=q.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}())),l=null!=Zo();if("production"!==process.env.NODE_ENV){const e=r.reference;e&&!Xr(e)&&function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i="Floating UI: "+n.join(" ");var o;null!=(e=Ho)&&e.has(i)||(null==(o=Ho)||o.add(i),console.error(i))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[s,c]=q.useState(r.reference),d=Yi(((e,t,r)=>{o.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:r,nested:l}),null==n||n(e,t,r)})),u=q.useMemo((()=>({setPositionReference:c})),[]),p=q.useMemo((()=>({reference:s||r.reference||null,floating:r.floating||null,domReference:r.reference})),[s,r.reference,r.floating]);return q.useMemo((()=>({dataRef:o,open:t,onOpenChange:d,elements:p,events:a,floatingId:i,refs:u})),[t,d,p,a,i,u])}function Yo(e){void 0===e&&(e={});const{nodeId:t}=e,n=Xo({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[o,a]=q.useState(null),[l,s]=q.useState(null),c=(null==i?void 0:i.domReference)||o,d=q.useRef(null),u=Wo();Ui((()=>{c&&(d.current=c)}),[c]);const p=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:l=!0,whileElementsMounted:s,open:c}=e,[d,u]=q.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=q.useState(r);So(p,r)||h(r);const[f,g]=q.useState(null),[v,m]=q.useState(null),x=q.useCallback((e=>{e!==C.current&&(C.current=e,g(e))}),[]),b=q.useCallback((e=>{e!==$.current&&($.current=e,m(e))}),[]),y=o||f,w=a||v,C=q.useRef(null),$=q.useRef(null),k=q.useRef(d),S=null!=s,E=Ro(s),O=Ro(i),R=Ro(c),L=q.useCallback((()=>{if(!C.current||!$.current)return;const e={placement:t,strategy:n,middleware:p};O.current&&(e.platform=O.current),$o(C.current,$.current,e).then((e=>{const t={...e,isPositioned:!1!==R.current};T.current&&!So(k.current,t)&&(k.current=t,ue.flushSync((()=>{u(t)})))}))}),[p,t,n,O,R]);ko((()=>{!1===c&&k.current.isPositioned&&(k.current.isPositioned=!1,u((e=>({...e,isPositioned:!1}))))}),[c]);const T=q.useRef(!1);ko((()=>(T.current=!0,()=>{T.current=!1})),[]),ko((()=>{if(y&&(C.current=y),w&&($.current=w),y&&w){if(E.current)return E.current(y,w,L);L()}}),[y,w,L,E,S]);const P=q.useMemo((()=>({reference:C,floating:$,setReference:x,setFloating:b})),[x,b]),_=q.useMemo((()=>({reference:y,floating:w})),[y,w]),M=q.useMemo((()=>{const e={position:n,left:0,top:0};if(!_.floating)return e;const t=Oo(_.floating,d.x),r=Oo(_.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...Eo(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,_.floating,d.x,d.y]);return q.useMemo((()=>({...d,update:L,refs:P,elements:_,floatingStyles:M})),[d,L,P,_,M])}({...e,elements:{...i,...l&&{reference:l}}}),h=q.useCallback((e=>{const t=Xr(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;s(t),p.refs.setReference(t)}),[p.refs]),f=q.useCallback((e=>{(Xr(e)||null===e)&&(d.current=e,a(e)),(Xr(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!Xr(e))&&p.refs.setReference(e)}),[p.refs]),g=q.useMemo((()=>({...p.refs,setReference:f,setPositionReference:h,domReference:d})),[p.refs,f,h]),v=q.useMemo((()=>({...p.elements,domReference:c})),[p.elements,c]),m=q.useMemo((()=>({...p,...r,refs:g,elements:v,nodeId:t})),[p,g,v,t,r]);return Ui((()=>{r.dataRef.current.floatingContext=m;const e=null==u?void 0:u.nodesRef.current.find((e=>e.id===t));e&&(e.context=m)})),q.useMemo((()=>({...p,context:m,refs:g,elements:v})),[p,g,v,m])}function Ko(e,t,n){const r=new Map,i="item"===n;let o=e;if(i&&e){const{[Do]:t,[No]:n,...r}=e;o=r}return{..."floating"===n&&{tabIndex:-1,[Mo]:""},...o,...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,o]=t;var a;i&&[Do,No].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof o&&(null==(a=r.get(n))||a.push(o),e[n]=function(){for(var e,t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return null==(e=r.get(n))?void 0:e.map((e=>e(...i))).find((e=>void 0!==e))})):e[n]=o)})),e):e),{})}}const Jo=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Qo(e,t){var n,r;void 0===t&&(t={});const{open:i,elements:o,floatingId:a}=e,{enabled:l=!0,role:s="dialog"}=t,c=zo(),d=(null==(n=o.domReference)?void 0:n.id)||c,u=q.useMemo((()=>{var e,t;return(null==(e=(t=o.floating)?t.hasAttribute(Bi)?t:t.querySelector("["+Bi+"]")||t:null)?void 0:e.id)||a}),[o.floating,a]),p=null!=(r=Jo.get(s))?r:s,h=null!=Zo(),f=q.useMemo((()=>"tooltip"===p||"label"===s?{["aria-"+("label"===s?"labelledby":"describedby")]:i?u:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":"alertdialog"===p?"dialog":p,"aria-controls":i?u:void 0,..."listbox"===p&&{role:"combobox"},..."menu"===p&&{id:d},..."menu"===p&&h&&{role:"menuitem"},..."select"===s&&{"aria-autocomplete":"none"},..."combobox"===s&&{"aria-autocomplete":"list"}}),[p,u,h,i,d,s]),g=q.useMemo((()=>{const e={id:u,...p&&{role:p}};return"tooltip"===p||"label"===s?e:{...e,..."menu"===p&&{"aria-labelledby":d}}}),[p,u,d,s]),v=q.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:u+"-fui-option"}};switch(s){case"select":case"combobox":return{...r,"aria-selected":n}}return{}}),[u,s]);return q.useMemo((()=>l?{reference:f,floating:g,item:v}:{}),[l,f,g,v])}const ea=le`
|
|
1837
1836
|
height: auto;
|
|
1838
1837
|
max-height: 512px;
|
|
1839
1838
|
width: 100%;
|