@edgex-web/components 0.1.0-beta.54 → 0.1.0-beta.55

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.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { o as e, C as i, D as t, n, p as r, L as p, o as d, S as L, T as h, W as D, y as g, r as u, A as w, h as W, w as C, G as m, q as E, z as A, v as O, F as T, t as M, E as S, u as l, j as f, x as P, m as _, k as c, I as v } from "./index-zCHKjGjF.mjs";
1
+ import { o as e, C as i, D as t, n, p as r, L as p, o as d, S as L, T as h, W as D, y as g, r as u, A as w, h as W, w as C, G as m, q as E, z as A, v as O, F as T, t as M, E as S, u as l, j as f, x as P, m as _, k as c, I as v } from "./index-CjETZQUJ.mjs";
2
2
  import "react";
3
3
  export {
4
4
  e as ChromeLoader,
package/dist/index.umd.js CHANGED
@@ -140,7 +140,7 @@ ${Nb(p)}`),super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessa
140
140
  * @license qrcode.react
141
141
  * Copyright (c) Paul O'Shannessy
142
142
  * SPDX-License-Identifier: ISC
143
- */var h5={L:Ar.QrCode.Ecc.LOW,M:Ar.QrCode.Ecc.MEDIUM,Q:Ar.QrCode.Ecc.QUARTILE,H:Ar.QrCode.Ecc.HIGH},r0=128,o0="L",s0="#FFFFFF",i0="#000000",a0=!1,c0=1,m5=4,g5=0,b5=.1;function u0(e,t=0){const n=[];return e.forEach(function(r,o){let s=null;r.forEach(function(i,c){if(!i&&s!==null){n.push(`M${s+t} ${o+t}h${c-s}v1H${s+t}z`),s=null;return}if(c===r.length-1){if(!i)return;s===null?n.push(`M${c+t},${o+t} h1v1H${c+t}z`):n.push(`M${s+t},${o+t} h${c+1-s}v1H${s+t}z`);return}i&&s===null&&(s=c)})}),n.join("")}function l0(e,t){return e.slice().map((n,r)=>r<t.y||r>=t.y+t.h?n:n.map((o,s)=>s<t.x||s>=t.x+t.w?o:!1))}function y5(e,t,n,r){if(r==null)return null;const o=e.length+n*2,s=Math.floor(t*b5),i=o/t,c=(r.width||s)*i,a=(r.height||s)*i,u=r.x==null?e.length/2-c/2:r.x*i,l=r.y==null?e.length/2-a/2:r.y*i,d=r.opacity==null?1:r.opacity;let f=null;if(r.excavate){let h=Math.floor(u),m=Math.floor(l),w=Math.ceil(c+u-h),T=Math.ceil(a+l-m);f={x:h,y:m,w,h:T}}const p=r.crossOrigin;return{x:u,y:l,h:a,w:c,excavation:f,opacity:d,crossOrigin:p}}function w5(e,t){return t!=null?Math.max(Math.floor(t),0):e?m5:g5}function f0({value:e,level:t,minVersion:n,includeMargin:r,marginSize:o,imageSettings:s,size:i,boostLevel:c}){let a=v.useMemo(()=>{const h=(Array.isArray(e)?e:[e]).reduce((m,w)=>(m.push(...Ar.QrSegment.makeSegments(w)),m),[]);return Ar.QrCode.encodeSegments(h,h5[t],n,void 0,void 0,c)},[e,t,n,c]);const{cells:u,margin:l,numCells:d,calculatedImageSettings:f}=v.useMemo(()=>{let p=a.getModules();const h=w5(r,o),m=p.length+h*2,w=y5(p,i,h,s);return{cells:p,margin:h,numCells:m,calculatedImageSettings:w}},[a,i,s,r,o]);return{qrcode:a,margin:l,cells:u,numCells:d,calculatedImageSettings:f}}var v5=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),x5=v.forwardRef(function(t,n){const r=t,{value:o,size:s=r0,level:i=o0,bgColor:c=s0,fgColor:a=i0,includeMargin:u=a0,minVersion:l=c0,boostLevel:d,marginSize:f,imageSettings:p}=r,m=Gc(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:w}=m,T=Gc(m,["style"]),y=p==null?void 0:p.src,$=v.useRef(null),M=v.useRef(null),L=v.useCallback(S=>{$.current=S,typeof n=="function"?n(S):n&&(n.current=S)},[n]),[F,j]=v.useState(!1),{margin:g,cells:x,numCells:A,calculatedImageSettings:I}=f0({value:o,level:i,minVersion:l,boostLevel:d,includeMargin:u,marginSize:f,imageSettings:p,size:s});v.useEffect(()=>{if($.current!=null){const S=$.current,E=S.getContext("2d");if(!E)return;let C=x;const O=M.current,b=I!=null&&O!==null&&O.complete&&O.naturalHeight!==0&&O.naturalWidth!==0;b&&I.excavation!=null&&(C=l0(x,I.excavation));const B=window.devicePixelRatio||1;S.height=S.width=s*B;const D=s/A*B;E.scale(D,D),E.fillStyle=c,E.fillRect(0,0,A,A),E.fillStyle=a,v5?E.fill(new Path2D(u0(C,g))):x.forEach(function(U,_){U.forEach(function(H,K){H&&E.fillRect(K+g,_+g,1,1)})}),I&&(E.globalAlpha=I.opacity),b&&E.drawImage(O,I.x+g,I.y+g,I.w,I.h)}}),v.useEffect(()=>{j(!1)},[y]);const N=Vc({height:s,width:s},w);let P=null;return y!=null&&(P=v.createElement("img",{src:y,key:y,style:{display:"none"},onLoad:()=>{j(!0)},ref:M,crossOrigin:I==null?void 0:I.crossOrigin})),v.createElement(v.Fragment,null,v.createElement("canvas",Vc({style:N,height:s,width:s,ref:L,role:"img"},T)),P)});x5.displayName="QRCodeCanvas";var d0=v.forwardRef(function(t,n){const r=t,{value:o,size:s=r0,level:i=o0,bgColor:c=s0,fgColor:a=i0,includeMargin:u=a0,minVersion:l=c0,boostLevel:d,title:f,marginSize:p,imageSettings:h}=r,m=Gc(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:w,cells:T,numCells:y,calculatedImageSettings:$}=f0({value:o,level:i,minVersion:l,boostLevel:d,includeMargin:u,marginSize:p,imageSettings:h,size:s});let M=T,L=null;h!=null&&$!=null&&($.excavation!=null&&(M=l0(T,$.excavation)),L=v.createElement("image",{href:h.src,height:$.h,width:$.w,x:$.x+w,y:$.y+w,preserveAspectRatio:"none",opacity:$.opacity,crossOrigin:$.crossOrigin}));const F=u0(M,w);return v.createElement("svg",Vc({height:s,width:s,viewBox:`0 0 ${y} ${y}`,ref:n,role:"img"},m),!!f&&v.createElement("title",null,f),v.createElement("path",{fill:c,d:`M0,0 h${y}v${y}H0z`,shapeRendering:"crispEdges"}),v.createElement("path",{fill:a,d:F,shapeRendering:"crispEdges"}),L)});d0.displayName="QRCodeSVG";function E5(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function S5(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function p0(){return/apple/i.test(navigator.vendor)}function P5(){return E5().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function A5(){return S5().includes("jsdom/")}const h0="data-floating-ui-focusable",$5="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function qc(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function $r(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&yc(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Tr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Zc(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function T5(e){return e.matches("html,body")}function jt(e){return(e==null?void 0:e.ownerDocument)||document}function m0(e){return Fe(e)&&e.matches($5)}function C5(e){if(!e||A5())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function O5(e){return e?e.hasAttribute(h0)?e:e.querySelector("["+h0+"]")||e:null}function Xs(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var s;return o.parentId===t&&(!n||((s=o.context)==null?void 0:s.open))}).flatMap(o=>[o,...Xs(e,o.id,n)])}function N5(e){return"nativeEvent"in e}function Io(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var I5=typeof document<"u",B5=function(){},_t=I5?v.useLayoutEffect:B5;const k5={...z};function Qs(e){const t=z.useRef(e);return _t(()=>{t.current=e}),t}const M5=k5.useInsertionEffect||(e=>e());function Ut(e){const t=z.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return M5(()=>{t.current=e}),z.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const g0=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function b0(e,t){const n=eh(e,g0()),r=n.length;if(r===0)return;const o=qc(jt(e)),s=n.indexOf(o),i=s===-1?t===1?0:r-1:s+t;return n[i]}function L5(e){return b0(jt(e).body,1)||e}function R5(e){return b0(jt(e).body,-1)||e}function Kc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!$r(n,r)}function D5(e){eh(e,g0()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function y0(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const F5="data-floating-ui-focusable",w0="active",v0="selected",j5={...z};let x0=!1,_5=0;const E0=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+_5++;function U5(){const[e,t]=z.useState(()=>x0?E0():void 0);return _t(()=>{e==null&&t(E0())},[]),z.useEffect(()=>{x0=!0},[]),e}const Yc=j5.useId||U5;let Xc;process.env.NODE_ENV!=="production"&&(Xc=new Set);function z5(){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(" ");if(!((e=Xc)!=null&&e.has(o))){var s;(s=Xc)==null||s.add(o),console.error(o)}}function H5(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const W5=z.createContext(null),V5=z.createContext(null),Qc=()=>{var e;return((e=z.useContext(W5))==null?void 0:e.id)||null},Jc=()=>z.useContext(V5);function Bo(e){return"data-floating-ui-"+e}function dt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const S0=Bo("safe-polygon");function eu(e,t,n){if(n&&!Io(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r==null?void 0:r[t]}return e==null?void 0:e[t]}function tu(e){return typeof e=="function"?e():e}function G5(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:s,elements:i}=e,{enabled:c=!0,delay:a=0,handleClose:u=null,mouseOnly:l=!1,restMs:d=0,move:f=!0}=t,p=Jc(),h=Qc(),m=Qs(u),w=Qs(a),T=Qs(n),y=Qs(d),$=z.useRef(),M=z.useRef(-1),L=z.useRef(),F=z.useRef(-1),j=z.useRef(!0),g=z.useRef(!1),x=z.useRef(()=>{}),A=z.useRef(!1),I=Ut(()=>{var O;const b=(O=o.current.openEvent)==null?void 0:O.type;return(b==null?void 0:b.includes("mouse"))&&b!=="mousedown"});z.useEffect(()=>{if(!c)return;function O(b){let{open:B}=b;B||(dt(M),dt(F),j.current=!0,A.current=!1)}return s.on("openchange",O),()=>{s.off("openchange",O)}},[c,s]),z.useEffect(()=>{if(!c||!m.current||!n)return;function O(B){I()&&r(!1,B,"hover")}const b=jt(i.floating).documentElement;return b.addEventListener("mouseleave",O),()=>{b.removeEventListener("mouseleave",O)}},[i.floating,n,r,c,m,I]);const N=z.useCallback(function(O,b,B){b===void 0&&(b=!0),B===void 0&&(B="hover");const D=eu(w.current,"close",$.current);D&&!L.current?(dt(M),M.current=window.setTimeout(()=>r(!1,O,B),D)):b&&(dt(M),r(!1,O,B))},[w,r]),P=Ut(()=>{x.current(),L.current=void 0}),S=Ut(()=>{if(g.current){const O=jt(i.floating).body;O.style.pointerEvents="",O.removeAttribute(S0),g.current=!1}}),E=Ut(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);z.useEffect(()=>{if(!c)return;function O(_){if(dt(M),j.current=!1,l&&!Io($.current)||tu(y.current)>0&&!eu(w.current,"open"))return;const H=eu(w.current,"open",$.current);H?M.current=window.setTimeout(()=>{T.current||r(!0,_,"hover")},H):n||r(!0,_,"hover")}function b(_){if(E()){S();return}x.current();const H=jt(i.floating);if(dt(F),A.current=!1,m.current&&o.current.floatingContext){n||dt(M),L.current=m.current({...o.current.floatingContext,tree:p,x:_.clientX,y:_.clientY,onClose(){S(),P(),E()||N(_,!0,"safe-polygon")}});const W=L.current;H.addEventListener("mousemove",W),x.current=()=>{H.removeEventListener("mousemove",W)};return}($.current==="touch"?!$r(i.floating,_.relatedTarget):!0)&&N(_)}function B(_){E()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:p,x:_.clientX,y:_.clientY,onClose(){S(),P(),E()||N(_)}})(_))}function D(){dt(M)}function U(_){E()||N(_,!1)}if(pe(i.domReference)){const _=i.domReference,H=i.floating;return n&&_.addEventListener("mouseleave",B),f&&_.addEventListener("mousemove",O,{once:!0}),_.addEventListener("mouseenter",O),_.addEventListener("mouseleave",b),H&&(H.addEventListener("mouseleave",B),H.addEventListener("mouseenter",D),H.addEventListener("mouseleave",U)),()=>{n&&_.removeEventListener("mouseleave",B),f&&_.removeEventListener("mousemove",O),_.removeEventListener("mouseenter",O),_.removeEventListener("mouseleave",b),H&&(H.removeEventListener("mouseleave",B),H.removeEventListener("mouseenter",D),H.removeEventListener("mouseleave",U))}}},[i,c,e,l,f,N,P,S,r,n,T,p,w,m,o,E,y]),_t(()=>{var O;if(c&&n&&(O=m.current)!=null&&(O=O.__options)!=null&&O.blockPointerEvents&&I()){g.current=!0;const B=i.floating;if(pe(i.domReference)&&B){var b;const D=jt(i.floating).body;D.setAttribute(S0,"");const U=i.domReference,_=p==null||(b=p.nodesRef.current.find(H=>H.id===h))==null||(b=b.context)==null?void 0:b.elements.floating;return _&&(_.style.pointerEvents=""),D.style.pointerEvents="none",U.style.pointerEvents="auto",B.style.pointerEvents="auto",()=>{D.style.pointerEvents="",U.style.pointerEvents="",B.style.pointerEvents=""}}}},[c,n,h,i,p,m,I]),_t(()=>{n||($.current=void 0,A.current=!1,P(),S())},[n,P,S]),z.useEffect(()=>()=>{P(),dt(M),dt(F),S()},[c,i.domReference,P,S]);const C=z.useMemo(()=>{function O(b){$.current=b.pointerType}return{onPointerDown:O,onPointerEnter:O,onMouseMove(b){const{nativeEvent:B}=b;function D(){!j.current&&!T.current&&r(!0,B,"hover")}l&&!Io($.current)||n||tu(y.current)===0||A.current&&b.movementX**2+b.movementY**2<2||(dt(F),$.current==="touch"?D():(A.current=!0,F.current=window.setTimeout(D,tu(y.current))))}}},[l,r,n,T,y]);return z.useMemo(()=>c?{reference:C}:{},[c,C])}const P0={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},A0=z.forwardRef(function(t,n){const[r,o]=z.useState();_t(()=>{p0()&&o("button")},[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Bo("focus-guard")]:"",style:P0};return k.jsx("span",{...t,...s})}),$0=z.createContext(null),T0=Bo("portal");function q5(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Yc(),o=K5(),[s,i]=z.useState(null),c=z.useRef(null);return _t(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{c.current=null})},[s]),_t(()=>{if(!r||c.current)return;const a=t?document.getElementById(t):null;if(!a)return;const u=document.createElement("div");u.id=r,u.setAttribute(T0,""),a.appendChild(u),c.current=u,i(u)},[t,r]),_t(()=>{if(n===null||!r||c.current)return;let a=n||(o==null?void 0:o.portalNode);a&&!bc(a)&&(a=a.current),a=a||document.body;let u=null;t&&(u=document.createElement("div"),u.id=t,a.appendChild(u));const l=document.createElement("div");l.id=r,l.setAttribute(T0,""),a=u||a,a.appendChild(l),c.current=l,i(l)},[t,n,r,o]),s}function Z5(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,s=q5({id:n,root:r}),[i,c]=z.useState(null),a=z.useRef(null),u=z.useRef(null),l=z.useRef(null),d=z.useRef(null),f=i==null?void 0:i.modal,p=i==null?void 0:i.open,h=!!i&&!i.modal&&i.open&&o&&!!(r||s);return z.useEffect(()=>{if(!s||!o||f)return;function m(w){s&&Kc(w)&&(w.type==="focusin"?y0:D5)(s)}return s.addEventListener("focusin",m,!0),s.addEventListener("focusout",m,!0),()=>{s.removeEventListener("focusin",m,!0),s.removeEventListener("focusout",m,!0)}},[s,o,f]),z.useEffect(()=>{s&&(p||y0(s))},[p,s]),k.jsxs($0.Provider,{value:z.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:a,afterOutsideRef:u,beforeInsideRef:l,afterInsideRef:d,portalNode:s,setFocusManagerState:c}),[o,s]),children:[h&&s&&k.jsx(A0,{"data-type":"outside",ref:a,onFocus:m=>{if(Kc(m,s)){var w;(w=l.current)==null||w.focus()}else{const T=i?i.domReference:null,y=R5(T);y==null||y.focus()}}}),h&&s&&k.jsx("span",{"aria-owns":s.id,style:P0}),s&&Nr.createPortal(t,s),h&&s&&k.jsx(A0,{"data-type":"outside",ref:u,onFocus:m=>{if(Kc(m,s)){var w;(w=d.current)==null||w.focus()}else{const T=i?i.domReference:null,y=L5(T);y==null||y.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,m.nativeEvent,"focus-out"))}}})]})}const K5=()=>z.useContext($0);function C0(e){return Fe(e.target)&&e.target.tagName==="BUTTON"}function Y5(e){return Fe(e.target)&&e.target.tagName==="A"}function O0(e){return m0(e)}function X5(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:s}}=e,{enabled:i=!0,event:c="click",toggle:a=!0,ignoreMouse:u=!1,keyboardHandlers:l=!0,stickIfOpen:d=!0}=t,f=z.useRef(),p=z.useRef(!1),h=z.useMemo(()=>({onPointerDown(m){f.current=m.pointerType},onMouseDown(m){const w=f.current;m.button===0&&c!=="click"&&(Io(w,!0)&&u||(n&&a&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?r(!1,m.nativeEvent,"click"):(m.preventDefault(),r(!0,m.nativeEvent,"click"))))},onClick(m){const w=f.current;if(c==="mousedown"&&f.current){f.current=void 0;return}Io(w,!0)&&u||(n&&a&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?r(!1,m.nativeEvent,"click"):r(!0,m.nativeEvent,"click"))},onKeyDown(m){f.current=void 0,!(m.defaultPrevented||!l||C0(m))&&(m.key===" "&&!O0(s)&&(m.preventDefault(),p.current=!0),!Y5(m)&&m.key==="Enter"&&r(!(n&&a),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!l||C0(m)||O0(s)||m.key===" "&&p.current&&(p.current=!1,r(!(n&&a),m.nativeEvent,"click"))}}),[o,s,c,u,l,r,n,d,a]);return z.useMemo(()=>i?{reference:h}:{},[i,h])}const Q5={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},J5={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},N0=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function eP(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=e,{enabled:i=!0,escapeKey:c=!0,outsidePress:a=!0,outsidePressEvent:u="pointerdown",referencePress:l=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:p,capture:h}=t,m=Jc(),w=Ut(typeof a=="function"?a:()=>!1),T=typeof a=="function"?w:a,y=z.useRef(!1),{escapeKey:$,outsidePress:M}=N0(p),{escapeKey:L,outsidePress:F}=N0(h),j=z.useRef(!1),g=Ut(S=>{var E;if(!n||!i||!c||S.key!=="Escape"||j.current)return;const C=(E=s.current.floatingContext)==null?void 0:E.nodeId,O=m?Xs(m.nodesRef.current,C):[];if(!$&&(S.stopPropagation(),O.length>0)){let b=!0;if(O.forEach(B=>{var D;if((D=B.context)!=null&&D.open&&!B.context.dataRef.current.__escapeKeyBubbles){b=!1;return}}),!b)return}r(!1,N5(S)?S.nativeEvent:S,"escape-key")}),x=Ut(S=>{var E;const C=()=>{var O;g(S),(O=Tr(S))==null||O.removeEventListener("keydown",C)};(E=Tr(S))==null||E.addEventListener("keydown",C)}),A=Ut(S=>{var E;const C=s.current.insideReactTree;s.current.insideReactTree=!1;const O=y.current;if(y.current=!1,u==="click"&&O||C||typeof T=="function"&&!T(S))return;const b=Tr(S),B="["+Bo("inert")+"]",D=jt(o.floating).querySelectorAll(B);let U=pe(b)?b:null;for(;U&&!sn(U);){const W=an(U);if(sn(W)||!pe(W))break;U=W}if(D.length&&pe(b)&&!T5(b)&&!$r(b,o.floating)&&Array.from(D).every(W=>!$r(U,W)))return;if(Fe(b)&&P){const W=sn(b),Z=ft(b),G=/auto|scroll/,J=W||G.test(Z.overflowX),ne=W||G.test(Z.overflowY),le=J&&b.clientWidth>0&&b.scrollWidth>b.clientWidth,Se=ne&&b.clientHeight>0&&b.scrollHeight>b.clientHeight,Me=Z.direction==="rtl",Y=Se&&(Me?S.offsetX<=b.offsetWidth-b.clientWidth:S.offsetX>b.clientWidth),ee=le&&S.offsetY>b.clientHeight;if(Y||ee)return}const _=(E=s.current.floatingContext)==null?void 0:E.nodeId,H=m&&Xs(m.nodesRef.current,_).some(W=>{var Z;return Zc(S,(Z=W.context)==null?void 0:Z.elements.floating)});if(Zc(S,o.floating)||Zc(S,o.domReference)||H)return;const K=m?Xs(m.nodesRef.current,_):[];if(K.length>0){let W=!0;if(K.forEach(Z=>{var G;if((G=Z.context)!=null&&G.open&&!Z.context.dataRef.current.__outsidePressBubbles){W=!1;return}}),!W)return}r(!1,S,"outside-press")}),I=Ut(S=>{var E;const C=()=>{var O;A(S),(O=Tr(S))==null||O.removeEventListener(u,C)};(E=Tr(S))==null||E.addEventListener(u,C)});z.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=$,s.current.__outsidePressBubbles=M;let S=-1;function E(D){r(!1,D,"ancestor-scroll")}function C(){window.clearTimeout(S),j.current=!0}function O(){S=window.setTimeout(()=>{j.current=!1},Os()?5:0)}const b=jt(o.floating);c&&(b.addEventListener("keydown",L?x:g,L),b.addEventListener("compositionstart",C),b.addEventListener("compositionend",O)),T&&b.addEventListener(u,F?I:A,F);let B=[];return f&&(pe(o.domReference)&&(B=vn(o.domReference)),pe(o.floating)&&(B=B.concat(vn(o.floating))),!pe(o.reference)&&o.reference&&o.reference.contextElement&&(B=B.concat(vn(o.reference.contextElement)))),B=B.filter(D=>{var U;return D!==((U=b.defaultView)==null?void 0:U.visualViewport)}),B.forEach(D=>{D.addEventListener("scroll",E,{passive:!0})}),()=>{c&&(b.removeEventListener("keydown",L?x:g,L),b.removeEventListener("compositionstart",C),b.removeEventListener("compositionend",O)),T&&b.removeEventListener(u,F?I:A,F),B.forEach(D=>{D.removeEventListener("scroll",E)}),window.clearTimeout(S)}},[s,o,c,T,u,n,r,f,i,$,M,g,L,x,A,F,I]),z.useEffect(()=>{s.current.insideReactTree=!1},[s,T,u]);const N=z.useMemo(()=>({onKeyDown:g,...l&&{[Q5[d]]:S=>{r(!1,S.nativeEvent,"reference-press")},...d!=="click"&&{onClick(S){r(!1,S.nativeEvent,"reference-press")}}}}),[g,r,l,d]),P=z.useMemo(()=>({onKeyDown:g,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[J5[u]]:()=>{s.current.insideReactTree=!0}}),[g,u,s]);return z.useMemo(()=>i?{reference:N,floating:P}:{},[i,N,P])}function tP(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Yc(),s=z.useRef({}),[i]=z.useState(()=>H5()),c=Qc()!=null;if(process.env.NODE_ENV!=="production"){const p=r.reference;p&&!pe(p)&&z5("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[a,u]=z.useState(r.reference),l=Ut((p,h,m)=>{s.current.openEvent=p?h:void 0,i.emit("openchange",{open:p,event:h,reason:m,nested:c}),n==null||n(p,h,m)}),d=z.useMemo(()=>({setPositionReference:u}),[]),f=z.useMemo(()=>({reference:a||r.reference||null,floating:r.floating||null,domReference:r.reference}),[a,r.reference,r.floating]);return z.useMemo(()=>({dataRef:s,open:t,onOpenChange:l,elements:f,events:i,floatingId:o,refs:d}),[t,l,f,i,o,d])}function nP(e){e===void 0&&(e={});const{nodeId:t}=e,n=tP({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,i]=z.useState(null),[c,a]=z.useState(null),l=(o==null?void 0:o.domReference)||s,d=z.useRef(null),f=Jc();_t(()=>{l&&(d.current=l)},[l]);const p=mh({...e,elements:{...o,...c&&{reference:c}}}),h=z.useCallback($=>{const M=pe($)?{getBoundingClientRect:()=>$.getBoundingClientRect(),getClientRects:()=>$.getClientRects(),contextElement:$}:$;a(M),p.refs.setReference(M)},[p.refs]),m=z.useCallback($=>{(pe($)||$===null)&&(d.current=$,i($)),(pe(p.refs.reference.current)||p.refs.reference.current===null||$!==null&&!pe($))&&p.refs.setReference($)},[p.refs]),w=z.useMemo(()=>({...p.refs,setReference:m,setPositionReference:h,domReference:d}),[p.refs,m,h]),T=z.useMemo(()=>({...p.elements,domReference:l}),[p.elements,l]),y=z.useMemo(()=>({...p,...r,refs:w,elements:T,nodeId:t}),[p,w,T,t,r]);return _t(()=>{r.dataRef.current.floatingContext=y;const $=f==null?void 0:f.nodesRef.current.find(M=>M.id===t);$&&($.context=y)}),z.useMemo(()=>({...p,context:y,refs:w,elements:T}),[p,w,T,y])}function nu(){return P5()&&p0()}function rP(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:s,elements:i}=e,{enabled:c=!0,visibleOnly:a=!0}=t,u=z.useRef(!1),l=z.useRef(-1),d=z.useRef(!0);z.useEffect(()=>{if(!c)return;const p=Ve(i.domReference);function h(){!n&&Fe(i.domReference)&&i.domReference===qc(jt(i.domReference))&&(u.current=!0)}function m(){d.current=!0}function w(){d.current=!1}return p.addEventListener("blur",h),nu()&&(p.addEventListener("keydown",m,!0),p.addEventListener("pointerdown",w,!0)),()=>{p.removeEventListener("blur",h),nu()&&(p.removeEventListener("keydown",m,!0),p.removeEventListener("pointerdown",w,!0))}},[i.domReference,n,c]),z.useEffect(()=>{if(!c)return;function p(h){let{reason:m}=h;(m==="reference-press"||m==="escape-key")&&(u.current=!0)}return o.on("openchange",p),()=>{o.off("openchange",p)}},[o,c]),z.useEffect(()=>()=>{dt(l)},[]);const f=z.useMemo(()=>({onMouseLeave(){u.current=!1},onFocus(p){if(u.current)return;const h=Tr(p.nativeEvent);if(a&&pe(h)){if(nu()&&!p.relatedTarget){if(!d.current&&!m0(h))return}else if(!C5(h))return}r(!0,p.nativeEvent,"focus")},onBlur(p){u.current=!1;const h=p.relatedTarget,m=p.nativeEvent,w=pe(h)&&h.hasAttribute(Bo("focus-guard"))&&h.getAttribute("data-type")==="outside";l.current=window.setTimeout(()=>{var T;const y=qc(i.domReference?i.domReference.ownerDocument:document);!h&&y===i.domReference||$r((T=s.current.floatingContext)==null?void 0:T.refs.floating.current,y)||$r(i.domReference,y)||w||r(!1,m,"focus")})}}),[s,i.domReference,r,a]);return z.useMemo(()=>c?{reference:f}:{},[c,f])}function ru(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[w0]:i,[v0]:c,...a}=e;s=a}return{...n==="floating"&&{tabIndex:-1,[F5]:""},...s,...t.map(i=>{const c=i?i[n]:null;return typeof c=="function"?e?c(e):null:c}).concat(e).reduce((i,c)=>(c&&Object.entries(c).forEach(a=>{let[u,l]=a;if(!(o&&[w0,v0].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof l=="function"){var d;(d=r.get(u))==null||d.push(l),i[u]=function(){for(var f,p=arguments.length,h=new Array(p),m=0;m<p;m++)h[m]=arguments[m];return(f=r.get(u))==null?void 0:f.map(w=>w(...h)).find(w=>w!==void 0)}}}else i[u]=l}),i),{})}}function oP(e){e===void 0&&(e=[]);const t=e.map(c=>c==null?void 0:c.reference),n=e.map(c=>c==null?void 0:c.floating),r=e.map(c=>c==null?void 0:c.item),o=z.useCallback(c=>ru(c,e,"reference"),t),s=z.useCallback(c=>ru(c,e,"floating"),n),i=z.useCallback(c=>ru(c,e,"item"),r);return z.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}const sP=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function iP(e,t){var n,r;t===void 0&&(t={});const{open:o,elements:s,floatingId:i}=e,{enabled:c=!0,role:a="dialog"}=t,u=Yc(),l=((n=s.domReference)==null?void 0:n.id)||u,d=z.useMemo(()=>{var y;return((y=O5(s.floating))==null?void 0:y.id)||i},[s.floating,i]),f=(r=sP.get(a))!=null?r:a,h=Qc()!=null,m=z.useMemo(()=>f==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:o?d:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":f==="alertdialog"?"dialog":f,"aria-controls":o?d:void 0,...f==="listbox"&&{role:"combobox"},...f==="menu"&&{id:l},...f==="menu"&&h&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[f,d,h,o,l,a]),w=z.useMemo(()=>{const y={id:d,...f&&{role:f}};return f==="tooltip"||a==="label"?y:{...y,...f==="menu"&&{"aria-labelledby":l}}},[f,d,l,a]),T=z.useCallback(y=>{let{active:$,selected:M}=y;const L={role:"option",...$&&{id:d+"-fui-option"}};switch(a){case"select":case"combobox":return{...L,"aria-selected":M}}return{}},[d,a]);return z.useMemo(()=>c?{reference:m,floating:w,item:T}:{},[c,m,w,T])}const I0=v.forwardRef(({placement:e,className:t=""},n)=>{const o=(s=>{switch(s.split("-")[0]){case"top":return{bottom:"-4px",left:"50%",transform:"translateX(-50%)",borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"4px solid #242424"};case"bottom":return{top:"-4px",left:"50%",transform:"translateX(-50%)",borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderBottom:"4px solid #242424"};case"left":return{right:"-4px",top:"50%",transform:"translateY(-50%)",borderTop:"4px solid transparent",borderBottom:"4px solid transparent",borderLeft:"4px solid #242424"};case"right":return{left:"-4px",top:"50%",transform:"translateY(-50%)",borderTop:"4px solid transparent",borderBottom:"4px solid transparent",borderRight:"4px solid #242424"};default:return{}}})(e);return k.jsx("div",{ref:n,className:`absolute w-0 h-0 ${t}`,style:o})});I0.displayName="TooltipArrow";const Gn=({children:e,content:t,placement:n="top",delay:r=200,showArrow:o=!0,className:s="",disabled:i=!1,maxWidth:c="max-w-xs",trigger:a=["hover","focus"]})=>{const[u,l]=v.useState(!1),d=v.useRef(null),{refs:f,floatingStyles:p,context:h}=nP({open:u&&!i,onOpenChange:l,placement:n,whileElementsMounted:fh,middleware:[Nc(o?12:8),bh({fallbackAxisSideDirection:"start",padding:8}),gh({padding:8}),...o?[P6({element:d})]:[]]}),m=G5(h,{enabled:a.includes("hover"),delay:{open:r,close:150}}),w=rP(h,{enabled:a.includes("focus")}),T=X5(h,{enabled:a.includes("click")}),y=eP(h),$=iP(h,{role:"tooltip"}),{getReferenceProps:M,getFloatingProps:L}=oP([m,w,T,y,$]);return i?k.jsx(k.Fragment,{children:e}):k.jsxs(k.Fragment,{children:[k.jsx("div",{ref:f.setReference,...M(),className:"cursor-help",children:e}),u&&k.jsx(Z5,{children:k.jsxs("div",{ref:f.setFloating,...L(),style:p,className:`
143
+ */var h5={L:Ar.QrCode.Ecc.LOW,M:Ar.QrCode.Ecc.MEDIUM,Q:Ar.QrCode.Ecc.QUARTILE,H:Ar.QrCode.Ecc.HIGH},r0=128,o0="L",s0="#FFFFFF",i0="#000000",a0=!1,c0=1,m5=4,g5=0,b5=.1;function u0(e,t=0){const n=[];return e.forEach(function(r,o){let s=null;r.forEach(function(i,c){if(!i&&s!==null){n.push(`M${s+t} ${o+t}h${c-s}v1H${s+t}z`),s=null;return}if(c===r.length-1){if(!i)return;s===null?n.push(`M${c+t},${o+t} h1v1H${c+t}z`):n.push(`M${s+t},${o+t} h${c+1-s}v1H${s+t}z`);return}i&&s===null&&(s=c)})}),n.join("")}function l0(e,t){return e.slice().map((n,r)=>r<t.y||r>=t.y+t.h?n:n.map((o,s)=>s<t.x||s>=t.x+t.w?o:!1))}function y5(e,t,n,r){if(r==null)return null;const o=e.length+n*2,s=Math.floor(t*b5),i=o/t,c=(r.width||s)*i,a=(r.height||s)*i,u=r.x==null?e.length/2-c/2:r.x*i,l=r.y==null?e.length/2-a/2:r.y*i,d=r.opacity==null?1:r.opacity;let f=null;if(r.excavate){let h=Math.floor(u),m=Math.floor(l),w=Math.ceil(c+u-h),T=Math.ceil(a+l-m);f={x:h,y:m,w,h:T}}const p=r.crossOrigin;return{x:u,y:l,h:a,w:c,excavation:f,opacity:d,crossOrigin:p}}function w5(e,t){return t!=null?Math.max(Math.floor(t),0):e?m5:g5}function f0({value:e,level:t,minVersion:n,includeMargin:r,marginSize:o,imageSettings:s,size:i,boostLevel:c}){let a=v.useMemo(()=>{const h=(Array.isArray(e)?e:[e]).reduce((m,w)=>(m.push(...Ar.QrSegment.makeSegments(w)),m),[]);return Ar.QrCode.encodeSegments(h,h5[t],n,void 0,void 0,c)},[e,t,n,c]);const{cells:u,margin:l,numCells:d,calculatedImageSettings:f}=v.useMemo(()=>{let p=a.getModules();const h=w5(r,o),m=p.length+h*2,w=y5(p,i,h,s);return{cells:p,margin:h,numCells:m,calculatedImageSettings:w}},[a,i,s,r,o]);return{qrcode:a,margin:l,cells:u,numCells:d,calculatedImageSettings:f}}var v5=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),x5=v.forwardRef(function(t,n){const r=t,{value:o,size:s=r0,level:i=o0,bgColor:c=s0,fgColor:a=i0,includeMargin:u=a0,minVersion:l=c0,boostLevel:d,marginSize:f,imageSettings:p}=r,m=Gc(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:w}=m,T=Gc(m,["style"]),y=p==null?void 0:p.src,$=v.useRef(null),M=v.useRef(null),L=v.useCallback(S=>{$.current=S,typeof n=="function"?n(S):n&&(n.current=S)},[n]),[F,j]=v.useState(!1),{margin:g,cells:x,numCells:A,calculatedImageSettings:I}=f0({value:o,level:i,minVersion:l,boostLevel:d,includeMargin:u,marginSize:f,imageSettings:p,size:s});v.useEffect(()=>{if($.current!=null){const S=$.current,E=S.getContext("2d");if(!E)return;let C=x;const O=M.current,b=I!=null&&O!==null&&O.complete&&O.naturalHeight!==0&&O.naturalWidth!==0;b&&I.excavation!=null&&(C=l0(x,I.excavation));const B=window.devicePixelRatio||1;S.height=S.width=s*B;const D=s/A*B;E.scale(D,D),E.fillStyle=c,E.fillRect(0,0,A,A),E.fillStyle=a,v5?E.fill(new Path2D(u0(C,g))):x.forEach(function(U,_){U.forEach(function(H,K){H&&E.fillRect(K+g,_+g,1,1)})}),I&&(E.globalAlpha=I.opacity),b&&E.drawImage(O,I.x+g,I.y+g,I.w,I.h)}}),v.useEffect(()=>{j(!1)},[y]);const N=Vc({height:s,width:s},w);let P=null;return y!=null&&(P=v.createElement("img",{src:y,key:y,style:{display:"none"},onLoad:()=>{j(!0)},ref:M,crossOrigin:I==null?void 0:I.crossOrigin})),v.createElement(v.Fragment,null,v.createElement("canvas",Vc({style:N,height:s,width:s,ref:L,role:"img"},T)),P)});x5.displayName="QRCodeCanvas";var d0=v.forwardRef(function(t,n){const r=t,{value:o,size:s=r0,level:i=o0,bgColor:c=s0,fgColor:a=i0,includeMargin:u=a0,minVersion:l=c0,boostLevel:d,title:f,marginSize:p,imageSettings:h}=r,m=Gc(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:w,cells:T,numCells:y,calculatedImageSettings:$}=f0({value:o,level:i,minVersion:l,boostLevel:d,includeMargin:u,marginSize:p,imageSettings:h,size:s});let M=T,L=null;h!=null&&$!=null&&($.excavation!=null&&(M=l0(T,$.excavation)),L=v.createElement("image",{href:h.src,height:$.h,width:$.w,x:$.x+w,y:$.y+w,preserveAspectRatio:"none",opacity:$.opacity,crossOrigin:$.crossOrigin}));const F=u0(M,w);return v.createElement("svg",Vc({height:s,width:s,viewBox:`0 0 ${y} ${y}`,ref:n,role:"img"},m),!!f&&v.createElement("title",null,f),v.createElement("path",{fill:c,d:`M0,0 h${y}v${y}H0z`,shapeRendering:"crispEdges"}),v.createElement("path",{fill:a,d:F,shapeRendering:"crispEdges"}),L)});d0.displayName="QRCodeSVG";function E5(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function S5(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function p0(){return/apple/i.test(navigator.vendor)}function P5(){return E5().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function A5(){return S5().includes("jsdom/")}const h0="data-floating-ui-focusable",$5="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function qc(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function $r(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&yc(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Tr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Zc(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function T5(e){return e.matches("html,body")}function jt(e){return(e==null?void 0:e.ownerDocument)||document}function m0(e){return Fe(e)&&e.matches($5)}function C5(e){if(!e||A5())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function O5(e){return e?e.hasAttribute(h0)?e:e.querySelector("["+h0+"]")||e:null}function Xs(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var s;return o.parentId===t&&(!n||((s=o.context)==null?void 0:s.open))}).flatMap(o=>[o,...Xs(e,o.id,n)])}function N5(e){return"nativeEvent"in e}function Io(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var I5=typeof document<"u",B5=function(){},_t=I5?v.useLayoutEffect:B5;const k5={...z};function Qs(e){const t=z.useRef(e);return _t(()=>{t.current=e}),t}const M5=k5.useInsertionEffect||(e=>e());function Ut(e){const t=z.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return M5(()=>{t.current=e}),z.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const g0=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function b0(e,t){const n=eh(e,g0()),r=n.length;if(r===0)return;const o=qc(jt(e)),s=n.indexOf(o),i=s===-1?t===1?0:r-1:s+t;return n[i]}function L5(e){return b0(jt(e).body,1)||e}function R5(e){return b0(jt(e).body,-1)||e}function Kc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!$r(n,r)}function D5(e){eh(e,g0()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function y0(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const F5="data-floating-ui-focusable",w0="active",v0="selected",j5={...z};let x0=!1,_5=0;const E0=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+_5++;function U5(){const[e,t]=z.useState(()=>x0?E0():void 0);return _t(()=>{e==null&&t(E0())},[]),z.useEffect(()=>{x0=!0},[]),e}const Yc=j5.useId||U5;let Xc;process.env.NODE_ENV!=="production"&&(Xc=new Set);function z5(){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(" ");if(!((e=Xc)!=null&&e.has(o))){var s;(s=Xc)==null||s.add(o),console.error(o)}}function H5(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const W5=z.createContext(null),V5=z.createContext(null),Qc=()=>{var e;return((e=z.useContext(W5))==null?void 0:e.id)||null},Jc=()=>z.useContext(V5);function Bo(e){return"data-floating-ui-"+e}function dt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const S0=Bo("safe-polygon");function eu(e,t,n){if(n&&!Io(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r==null?void 0:r[t]}return e==null?void 0:e[t]}function tu(e){return typeof e=="function"?e():e}function G5(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:s,elements:i}=e,{enabled:c=!0,delay:a=0,handleClose:u=null,mouseOnly:l=!1,restMs:d=0,move:f=!0}=t,p=Jc(),h=Qc(),m=Qs(u),w=Qs(a),T=Qs(n),y=Qs(d),$=z.useRef(),M=z.useRef(-1),L=z.useRef(),F=z.useRef(-1),j=z.useRef(!0),g=z.useRef(!1),x=z.useRef(()=>{}),A=z.useRef(!1),I=Ut(()=>{var O;const b=(O=o.current.openEvent)==null?void 0:O.type;return(b==null?void 0:b.includes("mouse"))&&b!=="mousedown"});z.useEffect(()=>{if(!c)return;function O(b){let{open:B}=b;B||(dt(M),dt(F),j.current=!0,A.current=!1)}return s.on("openchange",O),()=>{s.off("openchange",O)}},[c,s]),z.useEffect(()=>{if(!c||!m.current||!n)return;function O(B){I()&&r(!1,B,"hover")}const b=jt(i.floating).documentElement;return b.addEventListener("mouseleave",O),()=>{b.removeEventListener("mouseleave",O)}},[i.floating,n,r,c,m,I]);const N=z.useCallback(function(O,b,B){b===void 0&&(b=!0),B===void 0&&(B="hover");const D=eu(w.current,"close",$.current);D&&!L.current?(dt(M),M.current=window.setTimeout(()=>r(!1,O,B),D)):b&&(dt(M),r(!1,O,B))},[w,r]),P=Ut(()=>{x.current(),L.current=void 0}),S=Ut(()=>{if(g.current){const O=jt(i.floating).body;O.style.pointerEvents="",O.removeAttribute(S0),g.current=!1}}),E=Ut(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);z.useEffect(()=>{if(!c)return;function O(_){if(dt(M),j.current=!1,l&&!Io($.current)||tu(y.current)>0&&!eu(w.current,"open"))return;const H=eu(w.current,"open",$.current);H?M.current=window.setTimeout(()=>{T.current||r(!0,_,"hover")},H):n||r(!0,_,"hover")}function b(_){if(E()){S();return}x.current();const H=jt(i.floating);if(dt(F),A.current=!1,m.current&&o.current.floatingContext){n||dt(M),L.current=m.current({...o.current.floatingContext,tree:p,x:_.clientX,y:_.clientY,onClose(){S(),P(),E()||N(_,!0,"safe-polygon")}});const W=L.current;H.addEventListener("mousemove",W),x.current=()=>{H.removeEventListener("mousemove",W)};return}($.current==="touch"?!$r(i.floating,_.relatedTarget):!0)&&N(_)}function B(_){E()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:p,x:_.clientX,y:_.clientY,onClose(){S(),P(),E()||N(_)}})(_))}function D(){dt(M)}function U(_){E()||N(_,!1)}if(pe(i.domReference)){const _=i.domReference,H=i.floating;return n&&_.addEventListener("mouseleave",B),f&&_.addEventListener("mousemove",O,{once:!0}),_.addEventListener("mouseenter",O),_.addEventListener("mouseleave",b),H&&(H.addEventListener("mouseleave",B),H.addEventListener("mouseenter",D),H.addEventListener("mouseleave",U)),()=>{n&&_.removeEventListener("mouseleave",B),f&&_.removeEventListener("mousemove",O),_.removeEventListener("mouseenter",O),_.removeEventListener("mouseleave",b),H&&(H.removeEventListener("mouseleave",B),H.removeEventListener("mouseenter",D),H.removeEventListener("mouseleave",U))}}},[i,c,e,l,f,N,P,S,r,n,T,p,w,m,o,E,y]),_t(()=>{var O;if(c&&n&&(O=m.current)!=null&&(O=O.__options)!=null&&O.blockPointerEvents&&I()){g.current=!0;const B=i.floating;if(pe(i.domReference)&&B){var b;const D=jt(i.floating).body;D.setAttribute(S0,"");const U=i.domReference,_=p==null||(b=p.nodesRef.current.find(H=>H.id===h))==null||(b=b.context)==null?void 0:b.elements.floating;return _&&(_.style.pointerEvents=""),D.style.pointerEvents="none",U.style.pointerEvents="auto",B.style.pointerEvents="auto",()=>{D.style.pointerEvents="",U.style.pointerEvents="",B.style.pointerEvents=""}}}},[c,n,h,i,p,m,I]),_t(()=>{n||($.current=void 0,A.current=!1,P(),S())},[n,P,S]),z.useEffect(()=>()=>{P(),dt(M),dt(F),S()},[c,i.domReference,P,S]);const C=z.useMemo(()=>{function O(b){$.current=b.pointerType}return{onPointerDown:O,onPointerEnter:O,onMouseMove(b){const{nativeEvent:B}=b;function D(){!j.current&&!T.current&&r(!0,B,"hover")}l&&!Io($.current)||n||tu(y.current)===0||A.current&&b.movementX**2+b.movementY**2<2||(dt(F),$.current==="touch"?D():(A.current=!0,F.current=window.setTimeout(D,tu(y.current))))}}},[l,r,n,T,y]);return z.useMemo(()=>c?{reference:C}:{},[c,C])}const P0={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},A0=z.forwardRef(function(t,n){const[r,o]=z.useState();_t(()=>{p0()&&o("button")},[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Bo("focus-guard")]:"",style:P0};return k.jsx("span",{...t,...s})}),$0=z.createContext(null),T0=Bo("portal");function q5(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Yc(),o=K5(),[s,i]=z.useState(null),c=z.useRef(null);return _t(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{c.current=null})},[s]),_t(()=>{if(!r||c.current)return;const a=t?document.getElementById(t):null;if(!a)return;const u=document.createElement("div");u.id=r,u.setAttribute(T0,""),a.appendChild(u),c.current=u,i(u)},[t,r]),_t(()=>{if(n===null||!r||c.current)return;let a=n||(o==null?void 0:o.portalNode);a&&!bc(a)&&(a=a.current),a=a||document.body;let u=null;t&&(u=document.createElement("div"),u.id=t,a.appendChild(u));const l=document.createElement("div");l.id=r,l.setAttribute(T0,""),a=u||a,a.appendChild(l),c.current=l,i(l)},[t,n,r,o]),s}function Z5(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,s=q5({id:n,root:r}),[i,c]=z.useState(null),a=z.useRef(null),u=z.useRef(null),l=z.useRef(null),d=z.useRef(null),f=i==null?void 0:i.modal,p=i==null?void 0:i.open,h=!!i&&!i.modal&&i.open&&o&&!!(r||s);return z.useEffect(()=>{if(!s||!o||f)return;function m(w){s&&Kc(w)&&(w.type==="focusin"?y0:D5)(s)}return s.addEventListener("focusin",m,!0),s.addEventListener("focusout",m,!0),()=>{s.removeEventListener("focusin",m,!0),s.removeEventListener("focusout",m,!0)}},[s,o,f]),z.useEffect(()=>{s&&(p||y0(s))},[p,s]),k.jsxs($0.Provider,{value:z.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:a,afterOutsideRef:u,beforeInsideRef:l,afterInsideRef:d,portalNode:s,setFocusManagerState:c}),[o,s]),children:[h&&s&&k.jsx(A0,{"data-type":"outside",ref:a,onFocus:m=>{if(Kc(m,s)){var w;(w=l.current)==null||w.focus()}else{const T=i?i.domReference:null,y=R5(T);y==null||y.focus()}}}),h&&s&&k.jsx("span",{"aria-owns":s.id,style:P0}),s&&Nr.createPortal(t,s),h&&s&&k.jsx(A0,{"data-type":"outside",ref:u,onFocus:m=>{if(Kc(m,s)){var w;(w=d.current)==null||w.focus()}else{const T=i?i.domReference:null,y=L5(T);y==null||y.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,m.nativeEvent,"focus-out"))}}})]})}const K5=()=>z.useContext($0);function C0(e){return Fe(e.target)&&e.target.tagName==="BUTTON"}function Y5(e){return Fe(e.target)&&e.target.tagName==="A"}function O0(e){return m0(e)}function X5(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:s}}=e,{enabled:i=!0,event:c="click",toggle:a=!0,ignoreMouse:u=!1,keyboardHandlers:l=!0,stickIfOpen:d=!0}=t,f=z.useRef(),p=z.useRef(!1),h=z.useMemo(()=>({onPointerDown(m){f.current=m.pointerType},onMouseDown(m){const w=f.current;m.button===0&&c!=="click"&&(Io(w,!0)&&u||(n&&a&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?r(!1,m.nativeEvent,"click"):(m.preventDefault(),r(!0,m.nativeEvent,"click"))))},onClick(m){const w=f.current;if(c==="mousedown"&&f.current){f.current=void 0;return}Io(w,!0)&&u||(n&&a&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?r(!1,m.nativeEvent,"click"):r(!0,m.nativeEvent,"click"))},onKeyDown(m){f.current=void 0,!(m.defaultPrevented||!l||C0(m))&&(m.key===" "&&!O0(s)&&(m.preventDefault(),p.current=!0),!Y5(m)&&m.key==="Enter"&&r(!(n&&a),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!l||C0(m)||O0(s)||m.key===" "&&p.current&&(p.current=!1,r(!(n&&a),m.nativeEvent,"click"))}}),[o,s,c,u,l,r,n,d,a]);return z.useMemo(()=>i?{reference:h}:{},[i,h])}const Q5={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},J5={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},N0=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function eP(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=e,{enabled:i=!0,escapeKey:c=!0,outsidePress:a=!0,outsidePressEvent:u="pointerdown",referencePress:l=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:p,capture:h}=t,m=Jc(),w=Ut(typeof a=="function"?a:()=>!1),T=typeof a=="function"?w:a,y=z.useRef(!1),{escapeKey:$,outsidePress:M}=N0(p),{escapeKey:L,outsidePress:F}=N0(h),j=z.useRef(!1),g=Ut(S=>{var E;if(!n||!i||!c||S.key!=="Escape"||j.current)return;const C=(E=s.current.floatingContext)==null?void 0:E.nodeId,O=m?Xs(m.nodesRef.current,C):[];if(!$&&(S.stopPropagation(),O.length>0)){let b=!0;if(O.forEach(B=>{var D;if((D=B.context)!=null&&D.open&&!B.context.dataRef.current.__escapeKeyBubbles){b=!1;return}}),!b)return}r(!1,N5(S)?S.nativeEvent:S,"escape-key")}),x=Ut(S=>{var E;const C=()=>{var O;g(S),(O=Tr(S))==null||O.removeEventListener("keydown",C)};(E=Tr(S))==null||E.addEventListener("keydown",C)}),A=Ut(S=>{var E;const C=s.current.insideReactTree;s.current.insideReactTree=!1;const O=y.current;if(y.current=!1,u==="click"&&O||C||typeof T=="function"&&!T(S))return;const b=Tr(S),B="["+Bo("inert")+"]",D=jt(o.floating).querySelectorAll(B);let U=pe(b)?b:null;for(;U&&!sn(U);){const W=an(U);if(sn(W)||!pe(W))break;U=W}if(D.length&&pe(b)&&!T5(b)&&!$r(b,o.floating)&&Array.from(D).every(W=>!$r(U,W)))return;if(Fe(b)&&P){const W=sn(b),Z=ft(b),G=/auto|scroll/,J=W||G.test(Z.overflowX),ne=W||G.test(Z.overflowY),le=J&&b.clientWidth>0&&b.scrollWidth>b.clientWidth,Se=ne&&b.clientHeight>0&&b.scrollHeight>b.clientHeight,Me=Z.direction==="rtl",Y=Se&&(Me?S.offsetX<=b.offsetWidth-b.clientWidth:S.offsetX>b.clientWidth),ee=le&&S.offsetY>b.clientHeight;if(Y||ee)return}const _=(E=s.current.floatingContext)==null?void 0:E.nodeId,H=m&&Xs(m.nodesRef.current,_).some(W=>{var Z;return Zc(S,(Z=W.context)==null?void 0:Z.elements.floating)});if(Zc(S,o.floating)||Zc(S,o.domReference)||H)return;const K=m?Xs(m.nodesRef.current,_):[];if(K.length>0){let W=!0;if(K.forEach(Z=>{var G;if((G=Z.context)!=null&&G.open&&!Z.context.dataRef.current.__outsidePressBubbles){W=!1;return}}),!W)return}r(!1,S,"outside-press")}),I=Ut(S=>{var E;const C=()=>{var O;A(S),(O=Tr(S))==null||O.removeEventListener(u,C)};(E=Tr(S))==null||E.addEventListener(u,C)});z.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=$,s.current.__outsidePressBubbles=M;let S=-1;function E(D){r(!1,D,"ancestor-scroll")}function C(){window.clearTimeout(S),j.current=!0}function O(){S=window.setTimeout(()=>{j.current=!1},Os()?5:0)}const b=jt(o.floating);c&&(b.addEventListener("keydown",L?x:g,L),b.addEventListener("compositionstart",C),b.addEventListener("compositionend",O)),T&&b.addEventListener(u,F?I:A,F);let B=[];return f&&(pe(o.domReference)&&(B=vn(o.domReference)),pe(o.floating)&&(B=B.concat(vn(o.floating))),!pe(o.reference)&&o.reference&&o.reference.contextElement&&(B=B.concat(vn(o.reference.contextElement)))),B=B.filter(D=>{var U;return D!==((U=b.defaultView)==null?void 0:U.visualViewport)}),B.forEach(D=>{D.addEventListener("scroll",E,{passive:!0})}),()=>{c&&(b.removeEventListener("keydown",L?x:g,L),b.removeEventListener("compositionstart",C),b.removeEventListener("compositionend",O)),T&&b.removeEventListener(u,F?I:A,F),B.forEach(D=>{D.removeEventListener("scroll",E)}),window.clearTimeout(S)}},[s,o,c,T,u,n,r,f,i,$,M,g,L,x,A,F,I]),z.useEffect(()=>{s.current.insideReactTree=!1},[s,T,u]);const N=z.useMemo(()=>({onKeyDown:g,...l&&{[Q5[d]]:S=>{r(!1,S.nativeEvent,"reference-press")},...d!=="click"&&{onClick(S){r(!1,S.nativeEvent,"reference-press")}}}}),[g,r,l,d]),P=z.useMemo(()=>({onKeyDown:g,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[J5[u]]:()=>{s.current.insideReactTree=!0}}),[g,u,s]);return z.useMemo(()=>i?{reference:N,floating:P}:{},[i,N,P])}function tP(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Yc(),s=z.useRef({}),[i]=z.useState(()=>H5()),c=Qc()!=null;if(process.env.NODE_ENV!=="production"){const p=r.reference;p&&!pe(p)&&z5("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[a,u]=z.useState(r.reference),l=Ut((p,h,m)=>{s.current.openEvent=p?h:void 0,i.emit("openchange",{open:p,event:h,reason:m,nested:c}),n==null||n(p,h,m)}),d=z.useMemo(()=>({setPositionReference:u}),[]),f=z.useMemo(()=>({reference:a||r.reference||null,floating:r.floating||null,domReference:r.reference}),[a,r.reference,r.floating]);return z.useMemo(()=>({dataRef:s,open:t,onOpenChange:l,elements:f,events:i,floatingId:o,refs:d}),[t,l,f,i,o,d])}function nP(e){e===void 0&&(e={});const{nodeId:t}=e,n=tP({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,i]=z.useState(null),[c,a]=z.useState(null),l=(o==null?void 0:o.domReference)||s,d=z.useRef(null),f=Jc();_t(()=>{l&&(d.current=l)},[l]);const p=mh({...e,elements:{...o,...c&&{reference:c}}}),h=z.useCallback($=>{const M=pe($)?{getBoundingClientRect:()=>$.getBoundingClientRect(),getClientRects:()=>$.getClientRects(),contextElement:$}:$;a(M),p.refs.setReference(M)},[p.refs]),m=z.useCallback($=>{(pe($)||$===null)&&(d.current=$,i($)),(pe(p.refs.reference.current)||p.refs.reference.current===null||$!==null&&!pe($))&&p.refs.setReference($)},[p.refs]),w=z.useMemo(()=>({...p.refs,setReference:m,setPositionReference:h,domReference:d}),[p.refs,m,h]),T=z.useMemo(()=>({...p.elements,domReference:l}),[p.elements,l]),y=z.useMemo(()=>({...p,...r,refs:w,elements:T,nodeId:t}),[p,w,T,t,r]);return _t(()=>{r.dataRef.current.floatingContext=y;const $=f==null?void 0:f.nodesRef.current.find(M=>M.id===t);$&&($.context=y)}),z.useMemo(()=>({...p,context:y,refs:w,elements:T}),[p,w,T,y])}function nu(){return P5()&&p0()}function rP(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:s,elements:i}=e,{enabled:c=!0,visibleOnly:a=!0}=t,u=z.useRef(!1),l=z.useRef(-1),d=z.useRef(!0);z.useEffect(()=>{if(!c)return;const p=Ve(i.domReference);function h(){!n&&Fe(i.domReference)&&i.domReference===qc(jt(i.domReference))&&(u.current=!0)}function m(){d.current=!0}function w(){d.current=!1}return p.addEventListener("blur",h),nu()&&(p.addEventListener("keydown",m,!0),p.addEventListener("pointerdown",w,!0)),()=>{p.removeEventListener("blur",h),nu()&&(p.removeEventListener("keydown",m,!0),p.removeEventListener("pointerdown",w,!0))}},[i.domReference,n,c]),z.useEffect(()=>{if(!c)return;function p(h){let{reason:m}=h;(m==="reference-press"||m==="escape-key")&&(u.current=!0)}return o.on("openchange",p),()=>{o.off("openchange",p)}},[o,c]),z.useEffect(()=>()=>{dt(l)},[]);const f=z.useMemo(()=>({onMouseLeave(){u.current=!1},onFocus(p){if(u.current)return;const h=Tr(p.nativeEvent);if(a&&pe(h)){if(nu()&&!p.relatedTarget){if(!d.current&&!m0(h))return}else if(!C5(h))return}r(!0,p.nativeEvent,"focus")},onBlur(p){u.current=!1;const h=p.relatedTarget,m=p.nativeEvent,w=pe(h)&&h.hasAttribute(Bo("focus-guard"))&&h.getAttribute("data-type")==="outside";l.current=window.setTimeout(()=>{var T;const y=qc(i.domReference?i.domReference.ownerDocument:document);!h&&y===i.domReference||$r((T=s.current.floatingContext)==null?void 0:T.refs.floating.current,y)||$r(i.domReference,y)||w||r(!1,m,"focus")})}}),[s,i.domReference,r,a]);return z.useMemo(()=>c?{reference:f}:{},[c,f])}function ru(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[w0]:i,[v0]:c,...a}=e;s=a}return{...n==="floating"&&{tabIndex:-1,[F5]:""},...s,...t.map(i=>{const c=i?i[n]:null;return typeof c=="function"?e?c(e):null:c}).concat(e).reduce((i,c)=>(c&&Object.entries(c).forEach(a=>{let[u,l]=a;if(!(o&&[w0,v0].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof l=="function"){var d;(d=r.get(u))==null||d.push(l),i[u]=function(){for(var f,p=arguments.length,h=new Array(p),m=0;m<p;m++)h[m]=arguments[m];return(f=r.get(u))==null?void 0:f.map(w=>w(...h)).find(w=>w!==void 0)}}}else i[u]=l}),i),{})}}function oP(e){e===void 0&&(e=[]);const t=e.map(c=>c==null?void 0:c.reference),n=e.map(c=>c==null?void 0:c.floating),r=e.map(c=>c==null?void 0:c.item),o=z.useCallback(c=>ru(c,e,"reference"),t),s=z.useCallback(c=>ru(c,e,"floating"),n),i=z.useCallback(c=>ru(c,e,"item"),r);return z.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}const sP=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function iP(e,t){var n,r;t===void 0&&(t={});const{open:o,elements:s,floatingId:i}=e,{enabled:c=!0,role:a="dialog"}=t,u=Yc(),l=((n=s.domReference)==null?void 0:n.id)||u,d=z.useMemo(()=>{var y;return((y=O5(s.floating))==null?void 0:y.id)||i},[s.floating,i]),f=(r=sP.get(a))!=null?r:a,h=Qc()!=null,m=z.useMemo(()=>f==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:o?d:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":f==="alertdialog"?"dialog":f,"aria-controls":o?d:void 0,...f==="listbox"&&{role:"combobox"},...f==="menu"&&{id:l},...f==="menu"&&h&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[f,d,h,o,l,a]),w=z.useMemo(()=>{const y={id:d,...f&&{role:f}};return f==="tooltip"||a==="label"?y:{...y,...f==="menu"&&{"aria-labelledby":l}}},[f,d,l,a]),T=z.useCallback(y=>{let{active:$,selected:M}=y;const L={role:"option",...$&&{id:d+"-fui-option"}};switch(a){case"select":case"combobox":return{...L,"aria-selected":M}}return{}},[d,a]);return z.useMemo(()=>c?{reference:m,floating:w,item:T}:{},[c,m,w,T])}const I0=v.forwardRef(({placement:e,className:t=""},n)=>{const o=(s=>{switch(s.split("-")[0]){case"top":return{bottom:"-4px",left:"50%",transform:"translateX(-50%)",borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"4px solid #242424"};case"bottom":return{top:"-4px",left:"50%",transform:"translateX(-50%)",borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderBottom:"4px solid #242424"};case"left":return{right:"-4px",top:"50%",transform:"translateY(-50%)",borderTop:"4px solid transparent",borderBottom:"4px solid transparent",borderLeft:"4px solid #242424"};case"right":return{left:"-4px",top:"50%",transform:"translateY(-50%)",borderTop:"4px solid transparent",borderBottom:"4px solid transparent",borderRight:"4px solid #242424"};default:return{}}})(e);return k.jsx("div",{ref:n,className:`absolute w-0 h-0 ${t}`,style:o})});I0.displayName="TooltipArrow";const Gn=({children:e,content:t,placement:n="top",delay:r=200,showArrow:o=!0,className:s="",disabled:i=!1,maxWidth:c="max-w-xs",trigger:a=["hover","focus"]})=>{const[u,l]=v.useState(!1),d=v.useRef(null),{refs:f,floatingStyles:p,context:h}=nP({open:u&&!i,onOpenChange:l,placement:n,whileElementsMounted:fh,middleware:[Nc(o?12:8),bh({fallbackAxisSideDirection:"start",padding:8}),gh({padding:8}),...o?[P6({element:d})]:[]]}),m=G5(h,{enabled:a.includes("hover"),delay:{open:r,close:150}}),w=rP(h,{enabled:a.includes("focus")}),T=X5(h,{enabled:a.includes("click")}),y=eP(h),$=iP(h,{role:"tooltip"}),{getReferenceProps:M,getFloatingProps:L}=oP([m,w,T,y,$]);return i?k.jsx(k.Fragment,{children:e}):k.jsxs(k.Fragment,{children:[k.jsx("div",{ref:f.setReference,...M(),className:"cursor-help",children:e}),u&&k.jsx(Z5,{children:k.jsxs("div",{ref:f.setFloating,...L(),style:{...p,zIndex:101},className:`
144
144
  z-[101] px-3 py-2 cursor-help
145
145
  bg-fill-page-secondary
146
146
  text-text-primary text-sm font-medium