PageSourceSearch

https://beatchat.ai/assets/chunk-BKLdyNQD.js

js beatchat.ai collected 2026-10-05 15:28:53 UTC 38,402 bytes, 1 lines download raw bytes

1import{r as l,R as Tt,u as Wt,j as z,d as Ct}from"./chunk-m4g8bDjN.js";import{i as qe,a as fe,b as ne,c as $t,g as Pt,d as Mt,e as De,f as Bt,h as Ne,j as Kt,k as Ht}from"./chunk-DASxP49Z.js";import{t as Fe,i as kt,f as Yt}from"./chunk-DPVWgg33.js";function Ue(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function St(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:o,version:n}=t;return o+"/"+n}).join(" "):navigator.userAgent}function It(){return/apple/i.test(navigator.vendor)}function Ve(){const e=/android/i;return e.test(Ue())||e.test(St())}function Vt(){return Ue().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Lt(){return St().includes("jsdom/")}const et="data-floating-ui-focusable",Xt="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function ve(e){let t=e.activeElement;for(;((o=t)==null||(o=o.shadowRoot)==null?void 0:o.activeElement)!=null;){var o;t=t.shadowRoot.activeElement}return t}function Q(e,t){if(!e||!t)return!1;const o=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(o&&qe(o)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function pe(e){return"composedPath"in e?e.composedPath()[0]:e.target}function _e(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const o=e;return o.target!=null&&t.contains(o.target)}function qt(e){return e.matches("html,body")}function ee(e){return e?.ownerDocument||document}function Ge(e){return fe(e)&&e.matches(Xt)}function tt(e){return e?e.getAttribute("role")==="combobox"&&Ge(e):!1}function Ut(e){if(!e||Lt())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Xe(e){return e?e.hasAttribute(et)?e:e.querySelector("["+et+"]")||e:null}function we(e,t,o){return o===void 0&&(o=!0),e.filter(s=>{var r;return s.parentId===t&&(!o||((r=s.context)==null?void 0:r.open))}).flatMap(s=>[s,...we(e,s.id,o)])}function nt(e,t){var o;let n=[],s=(o=e.find(r=>r.id===t))==null?void 0:o.parentId;for(;s;){const r=e.find(i=>i.id===s);s=r?.parentId,r&&(n=n.concat(r))}return n}function je(e){e.preventDefault(),e.stopPropagation()}function Gt(e){return"nativeEvent"in e}function Zt(e){return e.mozInputSource===0&&e.isTrusted?!0:Ve()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function zt(e){return Lt()?!1:!Ve()&&e.width===0&&e.height===0||Ve()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Pe(e,t){const o=["mouse","pen"];return t||o.push("",void 0),o.includes(e)}var Jt=typeof document<"u",Qt=function(){},G=Jt?l.useLayoutEffect:Qt;const en={...Tt};function ae(e){const t=l.useRef(e);return G(()=>{t.current=e}),t}const tn=en.useInsertionEffect,nn=tn||(e=>e());function re(e){const t=l.useRef(()=>{});return nn(()=>{t.current=e}),l.useCallback(function(){for(var o=arguments.length,n=new Array(o),s=0;s<o;s++)n[s]=arguments[s];return t.current==null?void 0:t.current(...n)},[])}const Me=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Ft(e,t){const o=Fe(e,Me()),n=o.length;if(n===0)return;const s=ve(ee(e)),r=o.indexOf(s),i=r===-1?t===1?0:n-1:r+t;return o[i]}function At(e){return Ft(ee(e).body,1)||e}function Ot(e){return Ft(ee(e).body,-1)||e}function Ce(e,t){const o=t||e.currentTarget,n=e.relatedTarget;return!n||!Q(o,n)}function on(e){Fe(e,Me()).forEach(o=>{o.dataset.tabindex=o.getAttribute("tabindex")||"",o.setAttribute("tabindex","-1")})}function ot(e){e.querySelectorAll("[data-tabindex]").forEach(o=>{const n=o.dataset.tabindex;delete o.dataset.tabindex,n?o.setAttribute("tabindex",n):o.removeAttribute("tabindex")})}function Dn(e){const t=l.useRef(void 0),o=l.useCallback(n=>{const s=e.map(r=>{if(r!=null){if(typeof r=="function"){const i=r,u=i(n);return typeof u=="function"?u:()=>{i(null)}}return r.current=n,()=>{r.current=null}}});return()=>
1{s.forEach(r=>r?.())}},e);return l.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=o(n))},e)}const rn="data-floating-ui-focusable",rt="active",st="selected",sn={...Tt};let it=!1,un=0;const ut=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+un++;function cn(){const[e,t]=l.useState(()=>it?ut():void 0);return G(()=>{e==null&&t(ut())},[]),l.useEffect(()=>{it=!0},[]),e}const ln=sn.useId,Ae=ln||cn,Nn=l.forwardRef(function(t,o){const{context:{placement:n,elements:{floating:s},middlewareData:{arrow:r,shift:i}},width:u=14,height:m=7,tipRadius:d=0,strokeWidth:v=0,staticOffset:y,stroke:R,d:f,style:{transform:g,...a}={},...E}=t,P=Ae(),[b,x]=l.useState(!1);if(G(()=>{if(!s)return;Mt(s).direction==="rtl"&&x(!0)},[s]),!s)return null;const[k,D]=n.split("-"),$=k==="top"||k==="bottom";let A=y;($&&i!=null&&i.x||!$&&i!=null&&i.y)&&(A=null);const j=v*2,B=j/2,K=u/2*(d/-8+1),H=m/2*d/4,Y=!!f,L=A&&D==="end"?"bottom":"top";let c=A&&D==="end"?"right":"left";A&&b&&(c=D==="end"?"left":"right");const h=r?.x!=null?A||r.x:"",N=r?.y!=null?A||r.y:"",w=f||"M0,0"+(" H"+u)+(" L"+(u-K)+","+(m-H))+(" Q"+u/2+","+m+" "+K+","+(m-H))+" Z",p={top:Y?"rotate(180deg)":"",left:Y?"rotate(90deg)":"rotate(-90deg)",bottom:Y?"":"rotate(180deg)",right:Y?"rotate(-90deg)":"rotate(90deg)"}[k];return z.jsxs("svg",{...E,"aria-hidden":!0,ref:o,width:Y?u:u+j,height:u,viewBox:"0 0 "+u+" "+(m>u?m:u),style:{position:"absolute",pointerEvents:"none",[c]:h,[L]:N,[k]:$||Y?"100%":"calc(100% - "+j/2+"px)",transform:[p,g].filter(C=>!!C).join(" "),...a},children:[j>0&&z.jsx("path",{clipPath:"url(#"+P+")",fill:"none",stroke:R,strokeWidth:j+(f?0:1),d:w}),z.jsx("path",{stroke:j&&!f?E.fill:"none",d:w}),z.jsx("clipPath",{id:P,children:z.jsx("rect",{x:-B,y:B*(Y?-1:1),width:u+j,height:u})})]})});function an(){const e=new Map;return{emit(t,o){var n;(n=e.get(t))==null||n.forEach(s=>s(o))},on(t,o){e.has(t)||e.set(t,new Set),e.get(t).add(o)},off(t,o){var n;(n=e.get(t))==null||n.delete(o)}}}const fn=l.createContext(null),dn=l.createContext(null),Ze=()=>{var e;return((e=l.useContext(fn))==null?void 0:e.id)||null},Oe=()=>l.useContext(dn);function Ee(e){return"data-floating-ui-"+e}function te(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const ct=Ee("safe-polygon");function We(e,t,o){if(o&&!Pe(o))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const n=e();return typeof n=="number"?n:n?.[t]}return e?.[t]}function $e(e){return typeof e=="function"?e():e}function _n(e,t){t===void 0&&(t={});const{open:o,onOpenChange:n,dataRef:s,events:r,elements:i}=e,{enabled:u=!0,delay:m=0,handleClose:d=null,mouseOnly:v=!1,restMs:y=0,move:R=!0}=t,f=Oe(),g=Ze(),a=ae(d),E=ae(m),P=ae(o),b=ae(y),x=l.useRef(),k=l.useRef(-1),D=l.useRef(),$=l.useRef(-1),A=l.useRef(!0),j=l.useRef(!1),B=l.useRef(()=>{}),K=l.useRef(!1),H=re(()=>{var w;const p=(w=s.current.openEvent)==null?void 0:w.type;return p?.includes("mouse")&&p!=="mousedown"});l.useEffect(()=>{if(!u)return;function w(p){let{open:C}=p;C||(te(k),te($),A.current=!0,K.current=!1)}return r.on("openchange",w),()=>{r.off("openchange",w)}},[u,r]),l.useEffect(()=>{if(!u||!a.current||!o)return;function w(C){H()&&n(!1,C,"hover")}const p=ee(i.floating).documentElement;return p.addEventListener("mouseleave",w),()=>{p.removeEventListener("mouseleave",w)}},[i.floating,o,n,u,a,H]);const Y=l.useCallback(function(w,p,C){p===void 0&&(p=!0),C===void 0&&(C="hover");const S=We(E.current,"close",x.current);S&&!D.current?(te(k),k.current=window.setTimeout(()=>n(!1,w,C),S)):p&&(te(k),n(!1,w,C))},[E,n]),L=re(()=>{B.current(),D.current=void 0}),c=re(()=>{if(j.current){const w=ee(i.floating).body;w.style.pointerEvents="",w.removeAttribute(ct),j.current=!1}}),h=re(()=>s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1);l.useEffect(()=>{if(!u)return;function w(I){if(te(k),A.current=!1,v&&!Pe(x.current)||$e(b.current)>0&&!We(E.current,"open"))return;const T=We(E.current,"open",x.current);T?k.current=window.setTimeout(()=>{P.current||n(!0,I,"hover")},T):o||n(!0,I,"hover")}function p(I){if(h()){c();return}B.current();const T=ee(i.floating);if(te($),K.current=!1,a.current&&s.current.floatingContext){o||te(k),D.current=a.current({...s.current.floatingContext,tree:f,x:I.clientX,y:I.clientY,onClose(){c(),L(),h()||Y(I,!0,"safe-polygon")}});const _=D.current;T.addEventListener("mousemove",_),B.current=()=>{T.removeEventListener("mousemove",_)}
1;return}(x.current==="touch"?!Q(i.floating,I.relatedTarget):!0)&&Y(I)}function C(I){h()||s.current.floatingContext&&(a.current==null||a.current({...s.current.floatingContext,tree:f,x:I.clientX,y:I.clientY,onClose(){c(),L(),h()||Y(I)}})(I))}function S(){te(k)}function V(I){h()||Y(I,!1)}if(ne(i.domReference)){const I=i.domReference,T=i.floating;return o&&I.addEventListener("mouseleave",C),R&&I.addEventListener("mousemove",w,{once:!0}),I.addEventListener("mouseenter",w),I.addEventListener("mouseleave",p),T&&(T.addEventListener("mouseleave",C),T.addEventListener("mouseenter",S),T.addEventListener("mouseleave",V)),()=>{o&&I.removeEventListener("mouseleave",C),R&&I.removeEventListener("mousemove",w),I.removeEventListener("mouseenter",w),I.removeEventListener("mouseleave",p),T&&(T.removeEventListener("mouseleave",C),T.removeEventListener("mouseenter",S),T.removeEventListener("mouseleave",V))}}},[i,u,e,v,R,Y,L,c,n,o,P,f,E,a,s,h,b]),G(()=>{var w;if(u&&o&&(w=a.current)!=null&&(w=w.__options)!=null&&w.blockPointerEvents&&H()){j.current=!0;const C=i.floating;if(ne(i.domReference)&&C){var p;const S=ee(i.floating).body;S.setAttribute(ct,"");const V=i.domReference,I=f==null||(p=f.nodesRef.current.find(T=>T.id===g))==null||(p=p.context)==null?void 0:p.elements.floating;return I&&(I.style.pointerEvents=""),S.style.pointerEvents="none",V.style.pointerEvents="auto",C.style.pointerEvents="auto",()=>{S.style.pointerEvents="",V.style.pointerEvents="",C.style.pointerEvents=""}}}},[u,o,g,i,f,a,H]),G(()=>{o||(x.current=void 0,K.current=!1,L(),c())},[o,L,c]),l.useEffect(()=>()=>{L(),te(k),te($),c()},[u,i.domReference,L,c]);const N=l.useMemo(()=>{function w(p){x.current=p.pointerType}return{onPointerDown:w,onPointerEnter:w,onMouseMove(p){const{nativeEvent:C}=p;function S(){!A.current&&!P.current&&n(!0,C,"hover")}v&&!Pe(x.current)||o||$e(b.current)===0||K.current&&p.movementX**2+p.movementY**2<2||(te($),x.current==="touch"?S():(K.current=!0,$.current=window.setTimeout(S,$e(b.current))))}}},[v,n,o,P,b]);return l.useMemo(()=>u?{reference:N}:{},[u,N])}let lt=0;function ye(e,t){t===void 0&&(t={});const{preventScroll:o=!1,cancelPrevious:n=!0,sync:s=!1}=t;n&&cancelAnimationFrame(lt);const r=()=>e?.focus({preventScroll:o});s?r():lt=requestAnimationFrame(r)}function Be(e,t){if(!e||!t)return!1;const o=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(o&&qe(o)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function mn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function pn(e){return e?.ownerDocument||document}const Te={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function at(e){return e==="inert"?Te.inert:e==="aria-hidden"?Te["aria-hidden"]:Te.none}let ke=new WeakSet,Se={},Ke=0;const gn=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype;function Dt(e){return e?qe(e)?e.host:Dt(e.parentNode):null}const bn=(e,t)=>t.map(o=>{if(e.contains(o))return o;const n=Dt(o);return e.contains(n)?n:null}).filter(o=>o!=null);function vn(e,t,o,n){const s="data-floating-ui-inert",r=n?"inert":o?"aria-hidden":null,i=bn(t,e),u=new Set,m=new Set(i),d=[];Se[s]||(Se[s]=new WeakMap);const v=Se[s];i.forEach(y),R(t),u.clear();function y(f){!f||u.has(f)||(u.add(f),f.parentNode&&y(f.parentNode))}function R(f){!f||m.has(f)||[].forEach.call(f.children,g=>{if(Pt(g)!=="script")if(u.has(g))R(g);else{const a=r?g.getAttribute(r):null,E=a!==null&&a!=="false",P=at(r),b=(P.get(g)||0)+1,x=(v.get(g)||0)+1;P.set(g,b),v.set(g,x),d.push(g),b===1&&E&&ke.add(g),x===1&&g.setAttribute(s,""),!E&&r&&g.setAttribute(r,r==="inert"?"":"true")}})}return Ke++,()=>{d.forEach(f=>{const g=at(r),E=(g.get(f)||0)-1,P=(v.get(f)||0)-1;g.set(f,E),v.set(f,P),E||(!ke.has(f)&&r&&f.removeAttribute(r),ke.delete(f)),P||f.removeAttribute(s)}),Ke--,Ke||(Te.inert=new WeakMap,Te["aria-hidden"]=new WeakMap,Te.none=new WeakMap,ke=new WeakSet,Se={})}}function ft(e,t,o){t===void 0&&(t=!1),o===void 0&&(o=!1);const n=pn(e[0]).body;return vn(e.concat(Array.from(n.querySelectorAll('[aria-live],[role="status"],output'))),n,t,o)}const ze={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},Le=l.forwardRef(function(t,o){const[n,s]=l.useState();G(()=>{It()&&s("button")},[]);const r={ref:o,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[Ee("focus-guard")]:"",style:ze};return z.jsx("span",{...t,...r})}),hn={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Nt=l.createContext(null),dt=Ee("portal");function Rn(e){e===void 0&&(e={});const{id:t,root:o}=e,n=Ae(),s=_t(),[r,i]=l.useState(null),u=l.useRef(null);return G(()=>()=>{r?.remove(),queueMicrotask(()=>{u.current=null})},[r]),G(()=>{if(!n||u.current)return;const m=t?document.getElementById(t):null;if(!m)return;const d=document.createElement("div");d.id=n,d.setAttribute(dt,""),m.appendChild(d),u.current=d,i(d)},[t,n]),G(()=>{if(o===null||!n||u.current)return;let m=o||s?.portalNode;m&&!$t(m)&&(m=m.current),m=m||document.body;let d=null;t&&(d=document.createElement("div"),d.id=t,m.appendChild(d));const v=document.createElement("div");v.id=n,v.setAttribute(dt,""),m=d||m,m.appendChild(v),u.current=v,i(v)},[t,o,n,s]),r}function jn(e){const{children:t,id:o,root:n,preserveTabOrder:s=!0}=e,r=Rn({id:o,root:n}),[i,u]=l.useState(null),m=l.useRef(null),d=l.useRef(null),v=l.useRef(null),y=l.useRef(null),R=i?.modal,f=i?.open,g=!!i&&!i.modal&&i.open&&s&&!!(n||r);return l.useEffect(()=>{if(!r||!s||R)return;function a(E){r&&Ce(E)&&(E.type==="focusin"?ot:on)(r)}return r.addEventListener("focusin",a,!0),r.addEventListener("focusout",a,!0),()=>{r.removeEventListener("focusin",a,!0),r.removeEventListener("focusout",a,!0)}},[r,s,R]),l.useEffect(()=>{r&&(f||ot(r))},[f,r]),z.jsxs(Nt.Provider,{value:l.useMemo(()=>({preserveTabOrder:s,beforeOutsideRef:m,afterOutsideRef:d,beforeInsideRef:v,afterInsideRef:y,portalNode:r,setFocusManagerState:u}),[s,r]),children:[g&&r&&z.jsx(Le,{"data-type":"outside",ref:m,onFocus:a=>
1{if(Ce(a,r)){var E;(E=v.current)==null||E.focus()}else{const P=i?i.domReference:null,b=Ot(P);b?.focus()}}}),g&&r&&z.jsx("span",{"aria-owns":r.id,style:hn}),r&&Ct.createPortal(t,r),g&&r&&z.jsx(Le,{"data-type":"outside",ref:d,onFocus:a=>{if(Ce(a,r)){var E;(E=y.current)==null||E.focus()}else{const P=i?i.domReference:null,b=At(P);b?.focus(),i?.closeOnFocusOut&&i?.onOpenChange(!1,a.nativeEvent,"focus-out")}}})]})}const _t=()=>l.useContext(Nt);function mt(e){return l.useMemo(()=>t=>{e.forEach(o=>{o&&(o.current=t)})},e)}const pt=20;let he=[];function Je(){he=he.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function En(e){Je(),e&&Pt(e)!=="body"&&(he.push(new WeakRef(e)),he.length>pt&&(he=he.slice(-pt)))}function gt(){Je();const e=he[he.length-1];return e?.deref()}function yn(e){const t=Me();return kt(e,t)?e:Fe(e,t)[0]||e}function bt(e,t){var o;if(!t.current.includes("floating")&&!((o=e.getAttribute("role"))!=null&&o.includes("dialog")))return;const n=Me(),r=Yt(e,n).filter(u=>{const m=u.getAttribute("data-tabindex")||"";return kt(u,n)||u.hasAttribute("data-tabindex")&&!m.startsWith("-")}),i=e.getAttribute("tabindex");t.current.includes("floating")||r.length===0?i!=="0"&&e.setAttribute("tabindex","0"):(i!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const xn=l.forwardRef(function(t,o){return z.jsx("button",{...t,type:"button",ref:o,tabIndex:-1,style:ze})});function Wn(e){const{context:t,children:o,disabled:n=!1,order:s=["content"],guards:r=!0,initialFocus:i=0,returnFocus:u=!0,restoreFocus:m=!1,modal:d=!0,visuallyHiddenDismiss:v=!1,closeOnFocusOut:y=!0,outsideElementsInert:R=!1,getInsideElements:f=()=>[]}=e,{open:g,onOpenChange:a,events:E,dataRef:P,elements:{domReference:b,floating:x}}=t,k=re(()=>{var M;return(M=P.current.floatingContext)==null?void 0:M.nodeId}),D=re(f),$=typeof i=="number"&&i<0,A=tt(b)&&$,j=gn(),B=j?r:!0,K=!B||j&&R,H=ae(s),Y=ae(i),L=ae(u),c=Oe(),h=_t(),N=l.useRef(null),w=l.useRef(null),p=l.useRef(!1),C=l.useRef(!1),S=l.useRef(-1),V=l.useRef(-1),I=h!=null,T=Xe(x),J=re(function(M){return M===void 0&&(M=T),M?Fe(M,Me()):[]}),_=re(M=>{const O=J(M);return H.current.map(F=>b&&F==="reference"?b:T&&F==="floating"?T:O).filter(Boolean).flat()});l.useEffect(()=>{if(n||!d)return;function M(F){if(F.key==="Tab"){Q(T,ve(ee(T)))&&J().length===0&&!A&&je(F);const q=_(),Z=pe(F);H.current[0]==="reference"&&Z===b&&(je(F),F.shiftKey?ye(q[q.length-1]):ye(q[1])),H.current[1]==="floating"&&Z===T&&F.shiftKey&&(je(F),ye(q[0]))}}const O=ee(T);return O.addEventListener("keydown",M),()=>{O.removeEventListener("keydown",M)}},[n,b,T,d,H,A,J,_]),l.useEffect(()=>{if(n||!x)return;function M(O){const F=pe(O),Z=J().indexOf(F);Z!==-1&&(S.current=Z)}return x.addEventListener("focusin",M),()=>{x.removeEventListener("focusin",M)}},[n,x,J]),l.useEffect(()=>{if(n||!y)return;function M(){C.current=!0,setTimeout(()=>{C.current=!1})}function O(Z){const W=Z.relatedTarget,de=Z.currentTarget,le=pe(Z);queueMicrotask(()=>{const ie=k(),Re=!(Q(b,W)||Q(x,W)||Q(W,x)||Q(h?.portalNode,W)||W!=null&&W.hasAttribute(Ee("focus-guard"))||c&&(we(c.nodesRef.current,ie).find(ge=>{var me,be;return Q((me=ge.context)==null?void 0:me.elements.floating,W)||Q((be=ge.context)==null?void 0:be.elements.domReference,W)})||nt(c.nodesRef.current,ie).find(ge=>{var me,be,Qe;return[(me=ge.context)==null?void 0:me.elements.floating,Xe((be=ge.context)==null?void 0:be.elements.floating)].includes(W)||((Qe=ge.context)==null?void 0:Qe.elements.domReference)===W})));if(de===b&&T&&bt(T,H),m&&de!==b&&!(le!=null&&le.isConnected)&&ve(ee(T))===ee(T).body){fe(T)&&T.focus();const ge=S.current,me=J(),be=me[ge]||me[me.length-1]||T;fe(be)&&be.focus()}if(P.current.insideReactTree){P.current.insideReactTree=!1;return}(A||!d)&&W&&Re&&!C.current&&W!==gt()&&(p.current=!0,a(!1,Z,"focus-out"))})}const F=!!(!c&&h);function q(){te(V),P.current.insideReactTree=!0,V.current=window.setTimeout(()=>{P.current.insideReactTree=!1})}if(x&&fe(b))return b.addEventListener("focusout",O),b.addEventListener("pointerdown",M),x.addEventListener("focusout",O),F&&x.addEventListener("focusout",q,!0),()=>{b.removeEventListener("focusout",O),b.removeEventListener("pointerdown",M),x.removeEventListener("focusout",O),F&&x.removeEventListener("focusout",q,!0)}},[n,b,x,T,d,c,h,a,y,m,J,A,k,H,P]);const oe=l.useRef(null),se=l.useRef(null),X=mt([oe,h?.beforeInsideRef]),U=mt([se,h?.afterInsideRef]);l.useEffect(()=>{var M,O;if(n||!x)return;const F=Array.from((h==null||(M=h.portalNode)==null?void 0:M.querySelectorAll("["+Ee("portal")+"]"))||[]),Z=(O=(c?nt(c.nodesRef.current,k()):[]).find(le=>{var ie;return tt(((ie=le.context)==null?void 0:ie.elements.domReference)||null)}))==null||(O=O.context)==null?void 0:O.elements.domReference,W=[x,Z,...F,...D(),N.current,w.current,oe.current,se.current,h?.beforeOutsideRef.current,h?.afterOutsideRef.current,H.current.includes("reference")||A?b:null].filter(le=>
1le!=null),de=d||A?ft(W,!K,K):ft(W);return()=>{de()}},[n,b,x,d,H,h,A,B,K,c,k,D]),G(()=>{if(n||!fe(T))return;const M=ee(T),O=ve(M);queueMicrotask(()=>{const F=_(T),q=Y.current,Z=(typeof q=="number"?F[q]:q.current)||T,W=Q(T,O);!$&&!W&&g&&ye(Z,{preventScroll:Z===T})})},[n,g,T,$,_,Y]),G(()=>{if(n||!T)return;const M=ee(T),O=ve(M);En(O);function F(W){let{reason:de,event:le,nested:ie}=W;if(["hover","safe-polygon"].includes(de)&&le.type==="mouseleave"&&(p.current=!0),de==="outside-press")if(ie)p.current=!1;else if(Zt(le)||zt(le))p.current=!1;else{let Re=!1;document.createElement("div").focus({get preventScroll(){return Re=!0,!1}}),Re?p.current=!1:p.current=!0}}E.on("openchange",F);const q=M.createElement("span");q.setAttribute("tabindex","-1"),q.setAttribute("aria-hidden","true"),Object.assign(q.style,ze),I&&b&&b.insertAdjacentElement("afterend",q);function Z(){if(typeof L.current=="boolean"){const W=b||gt();return W&&W.isConnected?W:q}return L.current.current||q}return()=>{E.off("openchange",F);const W=ve(M),de=Q(x,W)||c&&we(c.nodesRef.current,k(),!1).some(ie=>{var Re;return Q((Re=ie.context)==null?void 0:Re.elements.floating,W)}),le=Z();queueMicrotask(()=>{const ie=yn(le);L.current&&!p.current&&fe(ie)&&(!(ie!==W&&W!==M.body)||de)&&ie.focus({preventScroll:!0}),q.remove()})}},[n,x,T,L,P,E,c,I,b,k]),l.useEffect(()=>(queueMicrotask(()=>{p.current=!1}),()=>{queueMicrotask(Je)}),[n]),G(()=>{if(!n&&h)return h.setFocusManagerState({modal:d,closeOnFocusOut:y,open:g,onOpenChange:a,domReference:b}),()=>{h.setFocusManagerState(null)}},[n,h,d,g,a,y,b]),G(()=>{n||T&&bt(T,H)},[n,T,H]);function ue(M){return n||!v||!d?null:z.jsx(xn,{ref:M==="start"?N:w,onClick:O=>a(!1,O.nativeEvent),children:typeof v=="string"?v:"Dismiss"})}const ce=!n&&B&&(d?!A:!0)&&(I||d);return z.jsxs(z.Fragment,{children:[ce&&z.jsx(Le,{"data-type":"inside",ref:X,onFocus:M=>{if(d){const F=_();ye(s[0]==="reference"?F[0]:F[F.length-1])}else if(h!=null&&h.preserveTabOrder&&h.portalNode)if(p.current=!1,Ce(M,h.portalNode)){const F=At(b);F?.focus()}else{var O;(O=h.beforeOutsideRef.current)==null||O.focus()}}}),!A&&ue("start"),o,ue("end"),ce&&z.jsx(Le,{"data-type":"inside",ref:U,onFocus:M=>{if(d)ye(_()[0]);else if(h!=null&&h.preserveTabOrder&&h.portalNode)if(y&&(p.current=!0),Ce(M,h.portalNode)){const F=Ot(b);F?.focus()}else{var O;(O=h.afterOutsideRef.current)==null||O.focus()}}})]})}let Ie=0;const vt="--floating-ui-scrollbar-width";function wn(){const e=Ue(),t=/iP(hone|ad|od)|iOS/.test(e)||e==="MacIntel"&&navigator.maxTouchPoints>1,o=document.body.style,s=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,i=o.left?parseFloat(o.left):window.scrollX,u=o.top?parseFloat(o.top):window.scrollY;if(o.overflow="hidden",o.setProperty(vt,r+"px"),r&&(o[s]=r+"px"),t){var m,d;const v=((m=window.visualViewport)==null?void 0:m.offsetLeft)||0,y=((d=window.visualViewport)==null?void 0:d.offsetTop)||0;Object.assign(o,{position:"fixed",top:-(u-Math.floor(y))+"px",left:-(i-Math.floor(v))+"px",right:"0"})}return()=>{Object.assign(o,{overflow:"",[s]:""}),o.removeProperty(vt),t&&(Object.assign(o,{position:"",top:"",left:"",right:""}),window.scrollTo(i,u))}}let ht=()=>{};const $n=l.forwardRef(function(t,o){const{lockScroll:n=!1,...s}=t;return G(()=>{if(n)return Ie++,Ie===1&&(ht=wn()),()=>{Ie--,Ie===0&&ht()}},[n]),z.jsx("div",{ref:o,...s,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...s.style}})});function Rt(e){return fe(e.target)&&e.target.tagName==="BUTTON"}function Tn(e){return fe(e.target)&&e.target.tagName==="A"}function Et(e){return Ge(e)}function Bn(e,t){t===void 0&&(t={});const{open:o,onOpenChange:n,dataRef:s,elements:{domReference:r}}=e,{enabled:i=!0,event:u="click",toggle:m=!0,ignoreMouse:d=!1,keyboardHandlers:v=!0,stickIfOpen:y=!0}=t,R=l.useRef(),f=l.useRef(!1),g=l.useMemo(()=>({onPointerDown(a){R.current=a.pointerType},onMouseDown(a){const E=R.current;a.button===0&&u!=="click"&&(Pe(E,!0)&&d||(o&&m&&(!(s.current.openEvent&&y)||s.current.openEvent.type==="mousedown")?n(!1,a.nativeEvent,"click"):(a.preventDefault(),n(!0,a.nativeEvent,"click"))))},onClick(a){const E=R.current;if(u==="mousedown"&&R.current){R.current=void 0;return}Pe(E,!0)&&d||(o&&m&&(!(s.current.openEvent&&y)||s.current.openEvent.type==="click")?n(!1,a.nativeEvent,"click"):n(!0,a.nativeEvent,"click"))},onKeyDown(a){R.current=void 0,!(a.defaultPrevented||!v||Rt(a))&&(a.key===" "&&!Et(r)&&(a.preventDefault(),f.current=!0),!Tn(a)&&a.key==="Enter"&&n(!(o&&m),a.nativeEvent,"click"))},onKeyUp(a){a.defaultPrevented||!v||Rt(a)||Et(r)||a.key===" "&&f.current&&(f.current=!1,n(!(o&&m),a.nativeEvent,"click"))}}),[s,r,u,d,v,n,o,y,m]);return l.useMemo(()=>i?{reference:g}:{},[i,g])}const Cn={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Pn={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},yt=e=>{var t,o;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(o=e?.outsidePress)!=null?o:!0}};function Kn(e,t){t===void 0&&(t={});const{open:o,onOpenChange:n,elements:s,dataRef:r}=e,{enabled:i=!0,escapeKey:u=!0,outsidePress:m=!0,outsidePressEvent:d="pointerdown",referencePress:v=!1,referencePressEvent:y="pointerdown",ancestorScroll:R=!1,bubbles:f,capture:g}=t,a=Oe(),E=re(typeof m=="function"?m:()=>!1),P=typeof m=="function"?E:m,b=l.useRef(!1),{escapeKey:x,outsidePress:k}=yt(f),{escapeKey:D,outsidePress:$}=yt(g),A=l.useRef(!1),j=re(c=>{var h;if(!o||!i||!u||c.key!=="Escape"||A.current)return;const N=(h=r.current.floatingContext)==null?void 0:h.nodeId,w=a?we(a.nodesRef.current,N):[];if(!x&&(c.stopPropagation(),w.length>0)){let p=!0;if(w.forEach(C=>{var S;if((S=C.context)!=null&&S.open&&!C.context.dataRef.current.__escapeKeyBubbles){p=!1;return}}),!p)return}n(!1,Gt(c)?c.nativeEvent:c,"escape-key")}),B=re(c=>{var h;const N=()=>{var w;j(c),(w=pe(c))==null||w.removeEventListener("keydown",N)};(h=pe(c))==null||h.addEventListener("keydown",N)}),K=re(c=>{var h;const N=r.current.insideReactTree;r.current.insideReactTree=!1;const w=b.current;if(b.current=!1,d==="click"&&w||N||typeof P=="function"&&!P(c))return;const p=pe(c),C="["+Ee("inert")+"]",S=ee(s.floating).querySelectorAll(C);let V=ne(p)?p:null;for(;V&&!De(V);){const _=Bt(V);if(De(_)||!ne(_))break;V=_}if(S.length&&ne(p)&&!qt(p)&&!Q(p,s.floating)&&Array.from(S).every(_=>!Q(V,_)))return;if(fe(p)&&L){const _=De(p),oe=Mt(p),se=/auto|scroll/,X=_||se.test(oe.overflowX),U=_||se.test(oe.overflowY),ue=X&&p.clientWidth>0&&p.scrollWidth>p.clientWidth,ce=U&&p.clientHeight>0&&p.scrollHeight>p.clientHeight,M=oe.direction==="rtl",O=ce&&(M?c.offsetX<=p.offsetWidth-p.clientWidth:c.offsetX>p.clientWidth),F=ue&&c.offsetY>p.clientHeight;if(O||F)return}const I=(h=r.current.floatingContext)==null?void 0:h.nodeId,T=a&&we(a.nodesRef.current,I).some(_=>{var oe;return _e(c,(oe=_.context)==null?void 0:oe.elements.floating)});if(_e(c,s.floating)||_e(c,s.domReference)||T)return;const J=a?we(a.nodesRef.current,I):[];if(J.length>0){let _=!0;if(J.forEach(oe=>{var se;if((se=oe.context)!=null&&se.open&&!oe.context.dataRef.current.__outsidePressBubbles){_=!1;return}}),!_)return}n(!1,c,"outside-press")}),H=re(c=>{var h;const N=()=>{var w;K(c),(w=pe(c))==null||w.removeEventListener(d,N)};(h=pe(c))==null||h.addEventListener(d,N)});l.useEffect(()=>{if(!o||!i)return;r.current.__escapeKeyBubbles=x,r.current.__outsidePressBubbles=k;let c=-1;function h(S){n(!1,S,"ancestor-scroll")}function N(){window.clearTimeout(c),A.current=!0}function w(){c=window.setTimeout(()=>{A.current=!1},Kt()?5:0)}const p=ee(s.floating);u&&(p.addEventListener("keydown",D?B:j,D),p.addEventListener("compositionstart",N),p.addEventListener("compositionend",w)),P&&p.addEventListener(d,$?H:K,$);let C=[];return R&&(ne(s.domReference)&&(C=Ne(s.domReference)),ne(s.floating)&&(C=C.concat(Ne(s.floating))),!ne(s.reference)&&s.reference&&s.reference.contextElement&&(C=C.concat(Ne(s.reference.contextElement)))),C=C.filter(S=>{var V;
1return S!==((V=p.defaultView)==null?void 0:V.visualViewport)}),C.forEach(S=>{S.addEventListener("scroll",h,{passive:!0})}),()=>{u&&(p.removeEventListener("keydown",D?B:j,D),p.removeEventListener("compositionstart",N),p.removeEventListener("compositionend",w)),P&&p.removeEventListener(d,$?H:K,$),C.forEach(S=>{S.removeEventListener("scroll",h)}),window.clearTimeout(c)}},[r,s,u,P,d,o,n,R,i,x,k,j,D,B,K,$,H]),l.useEffect(()=>{r.current.insideReactTree=!1},[r,P,d]);const Y=l.useMemo(()=>({onKeyDown:j,...v&&{[Cn[y]]:c=>{n(!1,c.nativeEvent,"reference-press")},...y!=="click"&&{onClick(c){n(!1,c.nativeEvent,"reference-press")}}}}),[j,n,v,y]),L=l.useMemo(()=>{function c(h){h.button===0&&(b.current=!0)}return{onKeyDown:j,onMouseDown:c,onMouseUp:c,[Pn[d]]:()=>{r.current.insideReactTree=!0}}},[j,d,r]);return l.useMemo(()=>i?{reference:Y,floating:L}:{},[i,Y,L])}function Mn(e){const{open:t=!1,onOpenChange:o,elements:n}=e,s=Ae(),r=l.useRef({}),[i]=l.useState(()=>an()),u=Ze()!=null,[m,d]=l.useState(n.reference),v=re((f,g,a)=>{r.current.openEvent=f?g:void 0,i.emit("openchange",{open:f,event:g,reason:a,nested:u}),o?.(f,g,a)}),y=l.useMemo(()=>({setPositionReference:d}),[]),R=l.useMemo(()=>({reference:m||n.reference||null,floating:n.floating||null,domReference:n.reference}),[m,n.reference,n.floating]);return l.useMemo(()=>({dataRef:r,open:t,onOpenChange:v,elements:R,events:i,floatingId:s,refs:y}),[t,v,R,i,s,y])}function Hn(e){e===void 0&&(e={});const{nodeId:t}=e,o=Mn({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||o,s=n.elements,[r,i]=l.useState(null),[u,m]=l.useState(null),v=s?.domReference||r,y=l.useRef(null),R=Oe();G(()=>{v&&(y.current=v)},[v]);const f=Wt({...e,elements:{...s,...u&&{reference:u}}}),g=l.useCallback(x=>{const k=ne(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;m(k),f.refs.setReference(k)},[f.refs]),a=l.useCallback(x=>{(ne(x)||x===null)&&(y.current=x,i(x)),(ne(f.refs.reference.current)||f.refs.reference.current===null||x!==null&&!ne(x))&&f.refs.setReference(x)},[f.refs]),E=l.useMemo(()=>({...f.refs,setReference:a,setPositionReference:g,domReference:y}),[f.refs,a,g]),P=l.useMemo(()=>({...f.elements,domReference:v}),[f.elements,v]),b=l.useMemo(()=>({...f,...n,refs:E,elements:P,nodeId:t}),[f,E,P,t,n]);return G(()=>{n.dataRef.current.floatingContext=b;const x=R?.nodesRef.current.find(k=>k.id===t);x&&(x.context=b)}),l.useMemo(()=>({...f,context:b,refs:E,elements:P}),[f,E,P,b])}function He(){return Vt()&&It()}function Yn(e,t){t===void 0&&(t={});const{open:o,onOpenChange:n,events:s,dataRef:r,elements:i}=e,{enabled:u=!0,visibleOnly:m=!0}=t,d=l.useRef(!1),v=l.useRef(-1),y=l.useRef(!0);l.useEffect(()=>{if(!u)return;const f=Ht(i.domReference);function g(){!o&&fe(i.domReference)&&i.domReference===ve(ee(i.domReference))&&(d.current=!0)}function a(){y.current=!0}function E(){y.current=!1}return f.addEventListener("blur",g),He()&&(f.addEventListener("keydown",a,!0),f.addEventListener("pointerdown",E,!0)),()=>{f.removeEventListener("blur",g),He()&&(f.removeEventListener("keydown",a,!0),f.removeEventListener("pointerdown",E,!0))}},[i.domReference,o,u]),l.useEffect(()=>{if(!u)return;function f(g){let{reason:a}=g;(a==="reference-press"||a==="escape-key")&&(d.current=!0)}return s.on("openchange",f),()=>{s.off("openchange",f)}},[s,u]),l.useEffect(()=>()=>{te(v)},[]);const R=l.useMemo(()=>({onMouseLeave(){d.current=!1},onFocus(f){if(d.current)return;const g=pe(f.nativeEvent);if(m&&ne(g)){if(He()&&!f.relatedTarget){if(!y.current&&!Ge(g))return}else if(!Ut(g))return}n(!0,f.nativeEvent,"focus")},onBlur(f){d.current=!1;const g=f.relatedTarget,a=f.nativeEvent,E=ne(g)&&g.hasAttribute(Ee("focus-guard"))&&g.getAttribute("data-type")==="outside";v.current=window.setTimeout(()=>{var P;const b=ve(i.domReference?i.domReference.ownerDocument:document);!g&&b===i.domReference||Q((P=r.current.floatingContext)==null?void 0:P.refs.floating.current,b)||Q(i.domReference,b)||E||n(!1,a,"focus")})}}),[r,i.domReference,n,m]);return l.useMemo(()=>u?{reference:R}:{},[u,R])}function Ye(e,t,o){const n=new Map,s=o==="item";let r=e;if(s&&e){const{[rt]:i,[st]:u,...m}=e;r=m}return{...o==="floating"&&{tabIndex:-1,[rn]:""},...r,...t.map(i=>{const u=i?i[o]:null;return typeof u=="function"?e?u(e):null:u}).concat(e).reduce((i,u)=>(u&&Object.entries(u).forEach(m=>{let[d,v]=m;if(!(s&&[rt,st].includes(d)))if(d.indexOf("on")===0){if(n.has(d)||n.set(d,[]),typeof v=="function"){var y;(y=n.get(d))==null||y.push(v),i[d]=function(){for(var R,f=arguments.length,g=new Array(f),a=0;a<f;a++)g[a]=arguments[a];return(R=n.get(d))==null?void 0:R.map(E=>E(...g)).find(E=>E!==void 0)}}}else i[d]=v}),i),{})}}function Vn(e){e===void 0&&(e=[]);const t=e.map(u=>u?.reference),o=e.map(u=>u?.floating),n=e.map(u=>u?.item),s=l.useCallback(u=>Ye(u,e,"reference"),t),r=l.useCallback(u=>Ye(u,e,"floating"),o),i=l.useCallback(u=>Ye(u,e,"item"),n);return l.useMemo(()=>({getReferenceProps:s,getFloatingProps:r,getItemProps:i}),[s,r,i])}const kn=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Xn(e,t){var o,n;t===void 0&&(t={});const{open:s,elements:r,floatingId:i}=e,{enabled:u=!0,role:m="dialog"}=t,d=Ae(),v=((o=r.domReference)==null?void 0:o.id)||d,y=l.useMemo(()=>{var b;return((b=Xe(r.floating))==null?void 0:b.id)||i},[r.floating,i]),R=(n=kn.get(m))!=null?n:m,g=Ze()!=null,a=l.useMemo(()=>R==="tooltip"||m==="label"?{["aria-"+(m==="label"?"labelledby":"describedby")]:s?y:void 0}:{"aria-expanded":s?"true":"false","aria-haspopup":R==="alertdialog"?"dialog":R,"aria-controls":s?y:void 0,...R==="listbox"&&{role:"combobox"},...R==="menu"&&{id:v},...R==="menu"&&g&&{role:"menuitem"},...m==="select"&&{"aria-autocomplete":"none"},...m==="combobox"&&{"aria-autocomplete":"list"}},[R,y,g,s,v,m]),E=l.useMemo(()=>{const b={id:y,...R&&{role:R}};return R==="tooltip"||m==="label"?b:{...b,...R==="menu"&&{"aria-labelledby":v}}},[R,y,v,m]),P=l.useCallback(b=>{let{active:x,selected:k}=b;const D={role:"option",...x&&{id:y+"-fui-option"}};switch(m){case"select":case"combobox":return{...D,"aria-selected":k}}return{}},[y,m]);return l.useMemo(()=>u?{reference:a,floating:E,item:P}:{},[u,a,E,P])}const xt=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,o)=>(o?"-":"")+t.toLowerCase());function xe(e,t){return typeof e=="function"?e(t):e}function Sn(e,t){const[o,n]=l.useState(e);return e&&!o&&n(!0),l.useEffect(()=>{if(!e&&o){const s=setTimeout(()=>n(!1),t);return()=>clearTimeout(s)}},[e,o,t]),o}function In(e,t){t===void 0&&(t={});const{open:o,elements:{floating:n}}=e,{duration:s=250}=t,i=(typeof s=="number"?s:s.close)||0,[u,m]=l.useState("unmounted"),d=Sn(o,i);return!d&&u==="close"&&m("unmounted"),G(()=>{if(n){if(o){m("initial");const v=requestAnimationFrame(()=>{Ct.flushSync(()=>{m("open")})});return()=>{cancelAnimationFrame(v)}}m("close")}},[o,n]),{isMounted:d,status:u}}
1function qn(e,t){t===void 0&&(t={});const{initial:o={opacity:0},open:n,close:s,common:r,duration:i=250}=t,u=e.placement,m=u.split("-")[0],d=l.useMemo(()=>({side:m,placement:u}),[m,u]),v=typeof i=="number",y=(v?i:i.open)||0,R=(v?i:i.close)||0,[f,g]=l.useState(()=>({...xe(r,d),...xe(o,d)})),{isMounted:a,status:E}=In(e,{duration:i}),P=ae(o),b=ae(n),x=ae(s),k=ae(r);return G(()=>{const D=xe(P.current,d),$=xe(x.current,d),A=xe(k.current,d),j=xe(b.current,d)||Object.keys(D).reduce((B,K)=>(B[K]="",B),{});if(E==="initial"&&g(B=>({transitionProperty:B.transitionProperty,...A,...D})),E==="open"&&g({transitionProperty:Object.keys(j).map(xt).join(","),transitionDuration:y+"ms",...A,...j}),E==="close"){const B=$||D;g({transitionProperty:Object.keys(B).map(xt).join(","),transitionDuration:R+"ms",...A,...B})}},[R,x,P,b,k,y,E,d]),{isMounted:a,styles:f}}function jt(e,t,o){return o===void 0&&(o=!0),e.filter(s=>{var r;return s.parentId===t&&(!o||((r=s.context)==null?void 0:r.open))}).flatMap(s=>[s,...jt(e,s.id,o)])}function wt(e,t){const[o,n]=e;let s=!1;const r=t.length;for(let i=0,u=r-1;i<r;u=i++){const[m,d]=t[i]||[0,0],[v,y]=t[u]||[0,0];d>=n!=y>=n&&o<=(v-m)*(n-d)/(y-d)+m&&(s=!s)}return s}function Ln(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Un(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:o=!1,requireIntent:n=!0}=e,s={current:-1};let r=!1,i=null,u=null,m=typeof performance<"u"?performance.now():0;function d(y,R){const f=performance.now(),g=f-m;if(i===null||u===null||g===0)return i=y,u=R,m=f,null;const a=y-i,E=R-u,b=Math.sqrt(a*a+E*E)/g;return i=y,u=R,m=f,b}const v=y=>{let{x:R,y:f,placement:g,elements:a,onClose:E,nodeId:P,tree:b}=y;return function(k){function D(){te(s),E()}if(te(s),!a.domReference||!a.floating||g==null||R==null||f==null)return;const{clientX:$,clientY:A}=k,j=[$,A],B=mn(k),K=k.type==="mouseleave",H=Be(a.floating,B),Y=Be(a.domReference,B),L=a.domReference.getBoundingClientRect(),c=a.floating.getBoundingClientRect(),h=g.split("-")[0],N=R>c.right-c.width/2,w=f>c.bottom-c.height/2,p=Ln(j,L),C=c.width>L.width,S=c.height>L.height,V=(C?L:c).left,I=(C?L:c).right,T=(S?L:c).top,J=(S?L:c).bottom;if(H&&(r=!0,!K))return;if(Y&&(r=!1),Y&&!K){r=!0;return}if(K&&ne(k.relatedTarget)&&Be(a.floating,k.relatedTarget)||b&&jt(b.nodesRef.current,P).length)return;if(h==="top"&&f>=L.bottom-1||h==="bottom"&&f<=L.top+1||h==="left"&&R>=L.right-1||h==="right"&&R<=L.left+1)return D();let _=[];switch(h){case"top":_=[[V,L.top+1],[V,c.bottom-1],[I,c.bottom-1],[I,L.top+1]];break;case"bottom":_=[[V,c.top+1],[V,L.bottom-1],[I,L.bottom-1],[I,c.top+1]];break;case"left":_=[[c.right-1,J],[c.right-1,T],[L.left+1,T],[L.left+1,J]];break;case"right":_=[[L.right-1,J],[L.right-1,T],[c.left+1,T],[c.left+1,J]];break}function oe(se){let[X,U]=se;switch(h){case"top":{const ue=[C?X+t/2:N?X+t*4:X-t*4,U+t+1],ce=[C?X-t/2:N?X+t*4:X-t*4,U+t+1],M=[[c.left,N||C?c.bottom-t:c.top],[c.right,N?C?c.bottom-t:c.top:c.bottom-t]];return[ue,ce,...M]}case"bottom":{const ue=[C?X+t/2:N?X+t*4:X-t*4,U-t],ce=[C?X-t/2:N?X+t*4:X-t*4,U-t],M=[[c.left,N||C?c.top+t:c.bottom],[c.right,N?C?c.top+t:c.bottom:c.top+t]];return[ue,ce,...M]}case"left":{const ue=[X+t+1,S?U+t/2:w?U+t*4:U-t*4],ce=[X+t+1,S?U-t/2:w?U+t*4:U-t*4];return[...[[w||S?c.right-t:c.left,c.top],[w?S?c.right-t:c.left:c.right-t,c.bottom]],ue,ce]}case"right":{const ue=[X-t,S?U+t/2:w?U+t*4:U-t*4],ce=[X-t,S?U-t/2:w?U+t*4:U-t*4],M=[[w||S?c.left+t:c.right,c.top],[w?S?c.left+t:c.right:c.left+t,c.bottom]];return[ue,ce,...M]}}}if(!wt([$,A],_)){if(r&&!p)return D();if(!K&&n){const se=d(k.clientX,k.clientY);if(se!==null&&se<.1)return D()}wt([$,A],oe([R,f]))?!r&&n&&(s.current=window.setTimeout(D,40)):D()}}};return v.__options={blockPointerEvents:o},v}export{Nn as F,jn as a,qn as b,_n as c,Yn as d,Kn as e,Xn as f,Vn as g,Dn as h,$n as i,Wn as j,Ae as k,Bn as l,Un as s,Hn as u};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.