PageSourceSearch

https://wearereal.com/assets/floating-ui.react-BLtupS0o.js

js wearereal.com collected 2026-10-10 02:24:33 UTC 30,121 bytes, 4 lines download raw bytes

vendor: 5,872 bytes, lines 1-4
1import{v as u,d as Be}from"./chunk-4N6VE7H7-CzWJKRMY.js";import{l as st,h as ee,o as ut,f as at,c as ct,s as lt,i as B,e as ft,b as ce,m as dt,j as le,d as vt,g as mt,k as gt}from"./floating-ui.dom-Dtqf5NsS.js";import{j as J}from"./jsx-runtime-BjG_zV1W.js";import{r as Ke}from"./index-B3b4XIWZ.js";/*!
2* tabbable 6.5.0
3* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
4*/var pt=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],he=pt.join(","),We=typeof Element>"u",z=We?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ie=!We&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},se=function(e,n){var r;n===void 0&&(n=!0);var o=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),s=o===""||o==="true",i=s||n&&e&&(typeof e.closest=="function"?e.closest("[inert]"):se(e.parentNode));return i},bt=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},ht=function(e,n,r){if(se(e))return[];var o=Array.prototype.slice.apply(e.querySelectorAll(he));return n&&z.call(e,he)&&o.unshift(e),o=o.filter(r),o},Re=function(e,n,r){for(var o=[],s=Array.from(e);s.length;){var i=s.shift();if(!se(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),f=a.length?a:i.children,d=Re(f,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:i,candidates:d})}else{var m=z.call(i,he);m&&r.filter(i)&&(n||!e.includes(i))&&o.push(i);var g=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),p=!se(g,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(g&&p){var v=Re(g===!0?i.children:g.children,!0,r);r.flatten?o.push.apply(o,v):o.push({scopeParent:i,candidates:v})}else s.unshift.apply(s,i.children)}}return o},je=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Ue=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||bt(e))&&!je(e)?0:e.tabIndex},Rt=function(e,n){var r=Ue(e);return r<0&&n&&!je(e)?0:r},Et=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},Ve=function(e){return e.tagName==="INPUT"},yt=function(e){return Ve(e)&&e.type==="hidden"},wt=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},xt=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},Ct=function(e){if(!e.name)return!0;var n=e.form||ie(e),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(e.name));else try{o=r(e.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=xt(o,e.form);return!s||s===e},St=function(e){return Ve(e)&&e.type==="radio"},Tt=function(e){return St(e)&&!Ct(e)},It=function(e){var n,r=e&&ie(e),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==e){var i,a,f;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||e!=null&&(f=e.ownerDocument)!==null&&f!==void 0&&f.contains(e));!s&&o;){var d,m,g;r=ie(o),o=(d=r)===null||d===void 0?void 0:d.host,s=!!((m=o)!==null&&m!==void 0&&(g=m.ownerDocument)!==null&&g!==void 0&&g.contains(o))}}return s},Ce=function(e){var n=e.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},Mt=function(e,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in e){var s=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}var i=getComputedStyle(e),a=i.visibility;if(a==="hidden"||a==="collapse")return!0;var f=z.call(e,"details>summary:first-of-type"),d=f?e.parentElement:e;if(z.call(d,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var m=e;e;){var g=e.parentElement,p=ie(e);if(g&&!g.shadowRoot&&o(g)===!0)return Ce(e);e.assignedSlot?e=e.assignedSlot:!g&&p!==e.ownerDocument?e=p.host:e=g}e=m}if(It(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Ce(e);return!1},Pt=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return z.call(n,"fieldset[disabled] *")?!0:!o.contains(e)}return!0}n=n.parentElement}return!1},kt=function(e,n){return!(n.disabled||yt(n)||Mt(n,e)||wt(n)||Pt(n))},Se=function(e,n){return!(Tt(n)||Ue(n)<0||!kt(e,n))},Lt=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Ye=function(e){var n=[],r=[];return e.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,f=Rt(a,i),d=i?Ye(o.candidates):a;f===0?i?n.push.apply(n,d):n.push(a):r.push({documentOrder:s,tabIndex:f,item:o,isScope:i,content:d})}),r.sort(Et).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)}
4,He=function(e,n){n=n||{};var r;return n.getShadowRoot?r=Re([e],n.includeContainer,{filter:Se.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Lt}):r=ht(e,n.includeContainer,Se.bind(null,n)),Ye(r)};function Dt(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function At(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:n,version:r}=e;return n+"/"+r}).join(" "):navigator.userAgent}function qe(){return/apple/i.test(navigator.vendor)}function Ot(){return Dt().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Ft(){return At().includes("jsdom/")}const Te="data-floating-ui-focusable",Nt="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Ee(t){let e=t.activeElement;for(;((n=e)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;e=e.shadowRoot.activeElement}return e}function G(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&st(n)){let r=e;for(;r;){if(t===r)return!0;r=r.parentNode||r.host}}return!1}function X(t){return"composedPath"in t?t.composedPath()[0]:t.target}function fe(t,e){if(e==null)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return n.target!=null&&e.contains(n.target)}function _t(t){return t.matches("html,body")}function V(t){return(t==null?void 0:t.ownerDocument)||document}function Xe(t){return ee(t)&&t.matches(Nt)}function $t(t){if(!t||Ft())return!0;try{return t.matches(":focus-visible")}catch{return!0}}function Bt(t){return t?t.hasAttribute(Te)?t:t.querySelector("["+Te+"]")||t:null}function re(t,e,n){return n===void 0&&(n=!0),t.filter(o=>{var s;return o.parentId===e&&(!n||((s=o.context)==null?void 0:s.open))}).flatMap(o=>[o,...re(t,o.id,n)])}function Kt(t){return"nativeEvent"in t}function Q(t,e){const n=["mouse","pen"];return e||n.push("",void 0),n.includes(t)}var Wt=typeof document<"u",jt=function(){},Y=Wt?u.useLayoutEffect:jt;const Ut={...Be};function ne(t){const e=u.useRef(t);return Y(()=>{e.current=t}),e}const Vt=Ut.useInsertionEffect,Yt=Vt||(t=>t());function U(t){const e=u.useRef(()=>{});return Yt(()=>{e.current=t}),u.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}const Ge=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Ze(t,e){const n=He(t,Ge()),r=n.length;if(r===0)return;const o=Ee(V(t)),s=n.indexOf(o),i=s===-1?e===1?0:r-1:s+e;return n[i]}function Ht(t){return Ze(V(t).body,1)||t}function qt(t){return Ze(V(t).body,-1)||t}function de(t,e){const n=e||t.currentTarget,r=t.relatedTarget;return!r||!G(n,r)}function Xt(t){He(t,Ge()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Ie(t){t.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}var Gt=typeof document<"u",Zt=function(){},oe=Gt?u.useLayoutEffect:Zt;function ue(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,o;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!ue(t[r],e[r]))return!1;return!0}if(o=Object.keys(t),n=o.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&t.$$typeof)&&!ue(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function Je(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Me(t,e){const n=Je(t);return Math.round(e*n)/n}function ve(t){const e=u.useRef(t);return oe(()=>{e.current=t}),e}function Jt(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:f,open:d}=t,[m,g]=u.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[p,v]=u.useState(r);ue(p,r)||v(r);const[R,c]=u.useState(null),[E,T]=u.useState(null),w=u.useCallback(l=>{l!==L.current&&(L.current=l,c(l))},[]),x=u.useCallback(l=>{l!==N.current&&(N.current=l,T(l))},[]),I=s||R,k=i||E,L=u.useRef(null),N=u.useRef(null),A=u.useRef(m),H=f!=null,_=ve(f),K=ve(o),j=ve(d),O=u.useCallback(()=>
4{if(!L.current||!N.current)return;const l={placement:e,strategy:n,middleware:p};K.current&&(l.platform=K.current),ct(L.current,N.current,l).then(y=>{const C={...y,isPositioned:j.current!==!1};b.current&&!ue(A.current,C)&&(A.current=C,Ke.flushSync(()=>{g(C)}))})},[p,e,n,K,j]);oe(()=>{d===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,g(l=>({...l,isPositioned:!1})))},[d]);const b=u.useRef(!1);oe(()=>(b.current=!0,()=>{b.current=!1}),[]),oe(()=>{if(I&&(L.current=I),k&&(N.current=k),I&&k){if(_.current)return _.current(I,k,O);O()}},[I,k,O,_,H]);const M=u.useMemo(()=>({reference:L,floating:N,setReference:w,setFloating:x}),[w,x]),P=u.useMemo(()=>({reference:I,floating:k}),[I,k]),h=u.useMemo(()=>{const l={position:n,left:0,top:0};if(!P.floating)return l;const y=Me(P.floating,m.x),C=Me(P.floating,m.y);return a?{...l,transform:"translate("+y+"px, "+C+"px)",...Je(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:y,top:C}},[n,a,P.floating,m.x,m.y]);return u.useMemo(()=>({...m,update:O,refs:M,elements:P,floatingStyles:h}),[m,O,M,P,h])}const En=(t,e)=>{const n=ut(t);return{name:n.name,fn:n.fn,options:[t,e]}},yn=(t,e)=>{const n=lt(t);return{name:n.name,fn:n.fn,options:[t,e]}},wn=(t,e)=>{const n=at(t);return{name:n.name,fn:n.fn,options:[t,e]}},zt="data-floating-ui-focusable",Pe="active",ke="selected",Qt={...Be};let Le=!1,en=0;const De=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+en++;function tn(){const[t,e]=u.useState(()=>Le?De():void 0);return Y(()=>{t==null&&e(De())},[]),u.useEffect(()=>{Le=!0},[]),t}const nn=Qt.useId,ye=nn||tn;function rn(){const t=new Map;return{emit(e,n){var r;(r=t.get(e))==null||r.forEach(o=>o(n))},on(e,n){t.has(e)||t.set(e,new Set),t.get(e).add(n)},off(e,n){var r;(r=t.get(e))==null||r.delete(n)}}}const on=u.createContext(null),sn=u.createContext(null),we=()=>{var t;return((t=u.useContext(on))==null?void 0:t.id)||null},xe=()=>u.useContext(sn);function te(t){return"data-floating-ui-"+t}function W(t){t.current!==-1&&(clearTimeout(t.current),t.current=-1)}const Ae=te("safe-polygon");function me(t,e,n){if(n&&!Q(n))return 0;if(typeof t=="number")return t;if(typeof t=="function"){const r=t();return typeof r=="number"?r:r==null?void 0:r[e]}return t==null?void 0:t[e]}function ge(t){return typeof t=="function"?t():t}function xn(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:o,events:s,elements:i}=t,{enabled:a=!0,delay:f=0,handleClose:d=null,mouseOnly:m=!1,restMs:g=0,move:p=!0}=e,v=xe(),R=we(),c=ne(d),E=ne(f),T=ne(n),w=ne(g),x=u.useRef(),I=u.useRef(-1),k=u.useRef(),L=u.useRef(-1),N=u.useRef(!0),A=u.useRef(!1),H=u.useRef(()=>{}),_=u.useRef(!1),K=U(()=>{var h;const l=(h=o.current.openEvent)==null?void 0:h.type;return(l==null?void 0:l.includes("mouse"))&&l!=="mousedown"});u.useEffect(()=>{if(!a)return;function h(l){let{open:y}=l;y||(W(I),W(L),N.current=!0,_.current=!1)}return s.on("openchange",h),()=>{s.off("openchange",h)}},[a,s]),u.useEffect(()=>{if(!a||!c.current||!n)return;function h(y){K()&&r(!1,y,"hover")}const l=V(i.floating).documentElement;return l.addEventListener("mouseleave",h),()=>{l.removeEventListener("mouseleave",h)}},[i.floating,n,r,a,c,K]);const j=u.useCallback(function(h,l,y){l===void 0&&(l=!0),y===void 0&&(y="hover");const C=me(E.current,"close",x.current);C&&!k.current?(W(I),I.current=window.setTimeout(()=>r(!1,h,y),C)):l&&(W(I),r(!1,h,y))},[E,r]),O=U(()=>{H.current(),k.current=void 0}),b=U(()=>{if(A.current){const h=V(i.floating).body;h.style.pointerEvents="",h.removeAttribute(Ae),A.current=!1}}),M=U(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);u.useEffect(()=>{if(!a)return;function h(S){if(W(I),N.current=!1,m&&!Q(x.current)||ge(w.current)>0&&!me(E.current,"open"))return;const D=me(E.current,"open",x.current);D?I.current=window.setTimeout(()=>{T.current||r(!0,S,"hover")},D):n||r(!0,S,"hover")}function l(S){if(M()){b();return}H.current();const D=V(i.floating);if(W(L),_.current=!1,c.current&&o.current.floatingContext){n||W(I),k.current=c.current({...o.current.floatingContext,tree:v,x:S.clientX,y:S.clientY,onClose(){b(),O(),M()||j(S,!0,"safe-polygon")}});const F=k.current;D.addEventListener("mousemove",F),H.current=()=>{D.removeEventListener("mousemove",F)};return}(x.current==="touch"?!G(i.floating,S.relatedTarget):!0)&&j(S)}function y(S){M()||o.current.floatingContext&&(c.current==null||c.current({...o.current.floatingContext,tree:v,x:S.clientX,y:S.clientY,onClose(){b(),O(),M()||j(S)}})(S))}function C(){W(I)}function $(S){M()||j(S,!1)}if(B(i.domReference)){const S=i.domReference,D=i.floating;return n&&S.addEventListener("mouseleave",y),p&&S.addEventListener("mousemove",h,{once:!0}),S.addEventListener("mouseenter",h),S.addEventListener("mouseleave",l),D&&(D.addEventListener("mouseleave",y),D.addEventListener("mouseenter",C),D.addEventListener("mouseleave",$)),()=>{n&&S.removeEventListener("mouseleave",y),p&&S.removeEventListener("mousemove",h),S.removeEventListener("mouseenter",h),S.removeEventListener("mouseleave",l),D&&(D.removeEventListener("mouseleave",y),D.removeEventListener("mouseenter",C),D.removeEventListener("mouseleave",$))}}}
4,[i,a,t,m,p,j,O,b,r,n,T,v,E,c,o,M,w]),Y(()=>{var h;if(a&&n&&(h=c.current)!=null&&(h=h.__options)!=null&&h.blockPointerEvents&&K()){A.current=!0;const y=i.floating;if(B(i.domReference)&&y){var l;const C=V(i.floating).body;C.setAttribute(Ae,"");const $=i.domReference,S=v==null||(l=v.nodesRef.current.find(D=>D.id===R))==null||(l=l.context)==null?void 0:l.elements.floating;return S&&(S.style.pointerEvents=""),C.style.pointerEvents="none",$.style.pointerEvents="auto",y.style.pointerEvents="auto",()=>{C.style.pointerEvents="",$.style.pointerEvents="",y.style.pointerEvents=""}}}},[a,n,R,i,v,c,K]),Y(()=>{n||(x.current=void 0,_.current=!1,O(),b())},[n,O,b]),u.useEffect(()=>()=>{O(),W(I),W(L),b()},[a,i.domReference,O,b]);const P=u.useMemo(()=>{function h(l){x.current=l.pointerType}return{onPointerDown:h,onPointerEnter:h,onMouseMove(l){const{nativeEvent:y}=l;function C(){!N.current&&!T.current&&r(!0,y,"hover")}m&&!Q(x.current)||n||ge(w.current)===0||_.current&&l.movementX**2+l.movementY**2<2||(W(L),x.current==="touch"?C():(_.current=!0,L.current=window.setTimeout(C,ge(w.current))))}}},[m,r,n,T,w]);return u.useMemo(()=>a?{reference:P}:{},[a,P])}const un={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},Oe=u.forwardRef(function(e,n){const[r,o]=u.useState();Y(()=>{qe()&&o("button")},[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[te("focus-guard")]:"",style:un};return J.jsx("span",{...e,...s})}),an={clipPath:"inset(50%)",position:"fixed",top:0,left:0},ze=u.createContext(null),Fe=te("portal");function cn(t){t===void 0&&(t={});const{id:e,root:n}=t,r=ye(),o=ln(),[s,i]=u.useState(null),a=u.useRef(null);return Y(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),Y(()=>{if(!r||a.current)return;const f=e?document.getElementById(e):null;if(!f)return;const d=document.createElement("div");d.id=r,d.setAttribute(Fe,""),f.appendChild(d),a.current=d,i(d)},[e,r]),Y(()=>{if(n===null||!r||a.current)return;let f=n||(o==null?void 0:o.portalNode);f&&!gt(f)&&(f=f.current),f=f||document.body;let d=null;e&&(d=document.createElement("div"),d.id=e,f.appendChild(d));const m=document.createElement("div");m.id=r,m.setAttribute(Fe,""),f=d||f,f.appendChild(m),a.current=m,i(m)},[e,n,r,o]),s}function Cn(t){const{children:e,id:n,root:r,preserveTabOrder:o=!0}=t,s=cn({id:n,root:r}),[i,a]=u.useState(null),f=u.useRef(null),d=u.useRef(null),m=u.useRef(null),g=u.useRef(null),p=i==null?void 0:i.modal,v=i==null?void 0:i.open,R=!!i&&!i.modal&&i.open&&o&&!!(r||s);return u.useEffect(()=>{if(!s||!o||p)return;function c(E){s&&de(E)&&(E.type==="focusin"?Ie:Xt)(s)}return s.addEventListener("focusin",c,!0),s.addEventListener("focusout",c,!0),()=>{s.removeEventListener("focusin",c,!0),s.removeEventListener("focusout",c,!0)}},[s,o,p]),u.useEffect(()=>{s&&(v||Ie(s))},[v,s]),J.jsxs(ze.Provider,{value:u.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:f,afterOutsideRef:d,beforeInsideRef:m,afterInsideRef:g,portalNode:s,setFocusManagerState:a}),[o,s]),children:[R&&s&&J.jsx(Oe,{"data-type":"outside",ref:f,onFocus:c=>{if(de(c,s)){var E;(E=m.current)==null||E.focus()}else{const T=i?i.domReference:null,w=qt(T);w==null||w.focus()}}}),R&&s&&J.jsx("span",{"aria-owns":s.id,style:an}),s&&Ke.createPortal(e,s),R&&s&&J.jsx(Oe,{"data-type":"outside",ref:d,onFocus:c=>{if(de(c,s)){var E;(E=g.current)==null||E.focus()}else{const T=i?i.domReference:null,w=Ht(T);w==null||w.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,c.nativeEvent,"focus-out"))}}})]})}const ln=()=>u.useContext(ze);function Ne(t){return ee(t.target)&&t.target.tagName==="BUTTON"}function fn(t){return ee(t.target)&&t.target.tagName==="A"}function _e(t){return Xe(t)}function Sn(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:s}}=t,{enabled:i=!0,event:a="click",toggle:f=!0,ignoreMouse:d=!1,keyboardHandlers:m=!0,stickIfOpen:g=!0}=e,p=u.useRef(),v=u.useRef(!1),R=u.useMemo(()=>({onPointerDown(c){p.current=c.pointerType},onMouseDown(c){const E=p.current;c.button===0&&a!=="click"&&(Q(E,!0)&&d||(n&&f&&(!(o.current.openEvent&&g)||o.current.openEvent.type==="mousedown")?r(!1,c.nativeEvent,"click"):(c.preventDefault(),r(!0,c.nativeEvent,"click"))))},onClick(c){const E=p.current;if(a==="mousedown"&&p.current){p.current=void 0;return}Q(E,!0)&&d||(n&&f&&(!(o.current.openEvent&&g)||o.current.openEvent.type==="click")?r(!1,c.nativeEvent,"click"):r(!0,c.nativeEvent,"click"))},onKeyDown(c){p.current=void 0,!(c.defaultPrevented||!m||Ne(c))&&(c.key===" "&&!_e(s)&&(c.preventDefault(),v.current=!0),!fn(c)&&c.key==="Enter"&&r(!(n&&f),c.nativeEvent,"click"))},onKeyUp(c){c.defaultPrevented||!m||Ne(c)||_e(s)||c.key===" "&&v.current&&(v.current=!1,r(!(n&&f),c.nativeEvent,"click"))}}),[o,s,a,d,m,r,n,g,f]);return u.useMemo(()=>i?{reference:R}:{},[i,R])}const dn={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},vn={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},$e=t=>{var e,n;return{escapeKey:typeof t=="boolean"?t:(e=t==null?void 0:t.escapeKey)!=null?e:!1,outsidePress:typeof t=="boolean"?t:(n=t==null?void 0:t.outsidePress)!=null?n:!0}};function Tn(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=t,{enabled:i=!0,escapeKey:a=!0,outsidePress:f=!0,outsidePressEvent:d="pointerdown",referencePress:m=!1,referencePressEvent:g="pointerdown",ancestorScroll:p=!1,bubbles:v,capture:R}=e,c=xe(),E=U(typeof f=="function"?f:()=>!1),T=typeof f=="function"?E:f,w=u.useRef(!1),{escapeKey:x,outsidePress:I}=$e(v),{escapeKey:k,outsidePress:L}=$e(R),N=u.useRef(!1),A=U(b=>{var M;if(!n||!i||!a||b.key!=="Escape"||N.current)return;const P=(M=s.current.floatingContext)==null?void 0:M.nodeId,h=c?re(c.nodesRef.current,P):[];if(!x&&(b.stopPropagation(),h.length>0)){let l=!0;
4if(h.forEach(y=>{var C;if((C=y.context)!=null&&C.open&&!y.context.dataRef.current.__escapeKeyBubbles){l=!1;return}}),!l)return}r(!1,Kt(b)?b.nativeEvent:b,"escape-key")}),H=U(b=>{var M;const P=()=>{var h;A(b),(h=X(b))==null||h.removeEventListener("keydown",P)};(M=X(b))==null||M.addEventListener("keydown",P)}),_=U(b=>{var M;const P=s.current.insideReactTree;s.current.insideReactTree=!1;const h=w.current;if(w.current=!1,d==="click"&&h||P||typeof T=="function"&&!T(b))return;const l=X(b),y="["+te("inert")+"]",C=V(o.floating).querySelectorAll(y);let $=B(l)?l:null;for(;$&&!le($);){const F=vt($);if(le(F)||!B(F))break;$=F}if(C.length&&B(l)&&!_t(l)&&!G(l,o.floating)&&Array.from(C).every(F=>!G($,F)))return;if(ee(l)&&O){const F=le(l),q=mt(l),Z=/auto|scroll/,Qe=F||Z.test(q.overflowX),et=F||Z.test(q.overflowY),tt=Qe&&l.clientWidth>0&&l.scrollWidth>l.clientWidth,nt=et&&l.clientHeight>0&&l.scrollHeight>l.clientHeight,rt=q.direction==="rtl",ot=nt&&(rt?b.offsetX<=l.offsetWidth-l.clientWidth:b.offsetX>l.clientWidth),it=tt&&b.offsetY>l.clientHeight;if(ot||it)return}const S=(M=s.current.floatingContext)==null?void 0:M.nodeId,D=c&&re(c.nodesRef.current,S).some(F=>{var q;return fe(b,(q=F.context)==null?void 0:q.elements.floating)});if(fe(b,o.floating)||fe(b,o.domReference)||D)return;const ae=c?re(c.nodesRef.current,S):[];if(ae.length>0){let F=!0;if(ae.forEach(q=>{var Z;if((Z=q.context)!=null&&Z.open&&!q.context.dataRef.current.__outsidePressBubbles){F=!1;return}}),!F)return}r(!1,b,"outside-press")}),K=U(b=>{var M;const P=()=>{var h;_(b),(h=X(b))==null||h.removeEventListener(d,P)};(M=X(b))==null||M.addEventListener(d,P)});u.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=x,s.current.__outsidePressBubbles=I;let b=-1;function M(C){r(!1,C,"ancestor-scroll")}function P(){window.clearTimeout(b),N.current=!0}function h(){b=window.setTimeout(()=>{N.current=!1},dt()?5:0)}const l=V(o.floating);a&&(l.addEventListener("keydown",k?H:A,k),l.addEventListener("compositionstart",P),l.addEventListener("compositionend",h)),T&&l.addEventListener(d,L?K:_,L);let y=[];return p&&(B(o.domReference)&&(y=ce(o.domReference)),B(o.floating)&&(y=y.concat(ce(o.floating))),!B(o.reference)&&o.reference&&o.reference.contextElement&&(y=y.concat(ce(o.reference.contextElement)))),y=y.filter(C=>{var $;return C!==(($=l.defaultView)==null?void 0:$.visualViewport)}),y.forEach(C=>{C.addEventListener("scroll",M,{passive:!0})}),()=>{a&&(l.removeEventListener("keydown",k?H:A,k),l.removeEventListener("compositionstart",P),l.removeEventListener("compositionend",h)),T&&l.removeEventListener(d,L?K:_,L),y.forEach(C=>{C.removeEventListener("scroll",M)}),window.clearTimeout(b)}},[s,o,a,T,d,n,r,p,i,x,I,A,k,H,_,L,K]),u.useEffect(()=>{s.current.insideReactTree=!1},[s,T,d]);const j=u.useMemo(()=>({onKeyDown:A,...m&&{[dn[g]]:b=>{r(!1,b.nativeEvent,"reference-press")},...g!=="click"&&{onClick(b){r(!1,b.nativeEvent,"reference-press")}}}}
4),[A,r,m,g]),O=u.useMemo(()=>{function b(M){M.button===0&&(w.current=!0)}return{onKeyDown:A,onMouseDown:b,onMouseUp:b,[vn[d]]:()=>{s.current.insideReactTree=!0}}},[A,d,s]);return u.useMemo(()=>i?{reference:j,floating:O}:{},[i,j,O])}function mn(t){const{open:e=!1,onOpenChange:n,elements:r}=t,o=ye(),s=u.useRef({}),[i]=u.useState(()=>rn()),a=we()!=null,[f,d]=u.useState(r.reference),m=U((v,R,c)=>{s.current.openEvent=v?R:void 0,i.emit("openchange",{open:v,event:R,reason:c,nested:a}),n==null||n(v,R,c)}),g=u.useMemo(()=>({setPositionReference:d}),[]),p=u.useMemo(()=>({reference:f||r.reference||null,floating:r.floating||null,domReference:r.reference}),[f,r.reference,r.floating]);return u.useMemo(()=>({dataRef:s,open:e,onOpenChange:m,elements:p,events:i,floatingId:o,refs:g}),[e,m,p,i,o,g])}function In(t){t===void 0&&(t={});const{nodeId:e}=t,n=mn({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,o=r.elements,[s,i]=u.useState(null),[a,f]=u.useState(null),m=(o==null?void 0:o.domReference)||s,g=u.useRef(null),p=xe();Y(()=>{m&&(g.current=m)},[m]);const v=Jt({...t,elements:{...o,...a&&{reference:a}}}),R=u.useCallback(x=>{const I=B(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;f(I),v.refs.setReference(I)},[v.refs]),c=u.useCallback(x=>{(B(x)||x===null)&&(g.current=x,i(x)),(B(v.refs.reference.current)||v.refs.reference.current===null||x!==null&&!B(x))&&v.refs.setReference(x)},[v.refs]),E=u.useMemo(()=>({...v.refs,setReference:c,setPositionReference:R,domReference:g}),[v.refs,c,R]),T=u.useMemo(()=>({...v.elements,domReference:m}),[v.elements,m]),w=u.useMemo(()=>({...v,...r,refs:E,elements:T,nodeId:e}),[v,E,T,e,r]);return Y(()=>{r.dataRef.current.floatingContext=w;const x=p==null?void 0:p.nodesRef.current.find(I=>I.id===e);x&&(x.context=w)}),u.useMemo(()=>({...v,context:w,refs:E,elements:T}),[v,E,T,w])}function pe(){return Ot()&&qe()}function Mn(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,events:o,dataRef:s,elements:i}=t,{enabled:a=!0,visibleOnly:f=!0}=e,d=u.useRef(!1),m=u.useRef(-1),g=u.useRef(!0);u.useEffect(()=>{if(!a)return;const v=ft(i.domReference);function R(){!n&&ee(i.domReference)&&i.domReference===Ee(V(i.domReference))&&(d.current=!0)}function c(){g.current=!0}function E(){g.current=!1}return v.addEventListener("blur",R),pe()&&(v.addEventListener("keydown",c,!0),v.addEventListener("pointerdown",E,!0)),()=>{v.removeEventListener("blur",R),pe()&&(v.removeEventListener("keydown",c,!0),v.removeEventListener("pointerdown",E,!0))}},[i.domReference,n,a]),u.useEffect(()=>{if(!a)return;function v(R){let{reason:c}=R;(c==="reference-press"||c==="escape-key")&&(d.current=!0)}return o.on("openchange",v),()=>{o.off("openchange",v)}},[o,a]),u.useEffect(()=>()=>{W(m)},[]);const p=u.useMemo(()=>({onMouseLeave(){d.current=!1},onFocus(v){if(d.current)return;const R=X(v.nativeEvent);if(f&&B(R)){if(pe()&&!v.relatedTarget){if(!g.current&&!Xe(R))return}else if(!$t(R))return}r(!0,v.nativeEvent,"focus")},onBlur(v){d.current=!1;const R=v.relatedTarget,c=v.nativeEvent,E=B(R)&&R.hasAttribute(te("focus-guard"))&&R.getAttribute("data-type")==="outside";m.current=window.setTimeout(()=>{var T;const w=Ee(i.domReference?i.domReference.ownerDocument:document);!R&&w===i.domReference||G((T=s.current.floatingContext)==null?void 0:T.refs.floating.current,w)||G(i.domReference,w)||E||r(!1,c,"focus")})}}),[s,i.domReference,r,f]);return u.useMemo(()=>a?{reference:p}:{},[a,p])}function be(t,e,n){const r=new Map,o=n==="item";let s=t;if(o&&t){const{[Pe]:i,[ke]:a,...f}=t;s=f}return{...n==="floating"&&{tabIndex:-1,[zt]:""},...s,...e.map(i=>{const a=i?i[n]:null;return typeof a=="function"?t?a(t):null:a}).concat(t).reduce((i,a)=>(a&&Object.entries(a).forEach(f=>{let[d,m]=f;if(!(o&&[Pe,ke].includes(d)))if(d.indexOf("on")===0){if(r.has(d)||r.set(d,[]),typeof m=="function"){var g;(g=r.get(d))==null||g.push(m),i[d]=function(){for(var p,v=arguments.length,R=new Array(v),c=0;c<v;c++)R[c]=arguments[c];return(p=r.get(d))==null?void 0:p.map(E=>E(...R)).find(E=>E!==void 0)}}}else i[d]=m}),i),{})}}function Pn(t){t===void 0&&(t=[]);const e=t.map(a=>a==null?void 0:a.reference),n=t.map(a=>a==null?void 0:a.floating),r=t.map(a=>a==null?void 0:a.item),o=u.useCallback(a=>be(a,t,"reference"),e),s=u.useCallback(a=>be(a,t,"floating"),n),i=u.useCallback(a=>be(a,t,"item"),r);return u.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}const gn=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function kn(t,e){var n,r;e===void 0&&(e={});const{open:o,elements:s,floatingId:i}=t,{enabled:a=!0,role:f="dialog"}=e,d=ye(),m=((n=s.domReference)==null?void 0:n.id)||d,g=u.useMemo(()=>{var w;return((w=Bt(s.floating))==null?void 0:w.id)||i},[s.floating,i]),p=(r=gn.get(f))!=null?r:f,R=we()!=null,c=u.useMemo(()=>p==="tooltip"||f==="label"?{["aria-"+(f==="label"?"labelledby":"describedby")]:o?g:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":p==="alertdialog"?"dialog":p,"aria-controls":o?g:void 0,...p==="listbox"&&{role:"combobox"},...p==="menu"&&{id:m},...p==="menu"&&R&&{role:"menuitem"},...f==="select"&&{"aria-autocomplete":"none"},...f==="combobox"&&{"aria-autocomplete":"list"}},[p,g,R,o,m,f]),E=u.useMemo(()=>{const w={id:g,...p&&{role:p}};return p==="tooltip"||f==="label"?w:{...w,...p==="menu"&&{"aria-labelledby":m}}},[p,g,m,f]),T=u.useCallback(w=>{let{active:x,selected:I}=w;const k={role:"option",...x&&{id:g+"-fui-option"}};switch(f){case"select":case"combobox":return{...k,"aria-selected":I}}return{}},[g,f]);return u.useMemo(()=>a?{reference:c,floating:E,item:T}:{},[a,c,E,T])}export{Cn as F,Tn as a,In as b,Mn as c,xn as d,Pn as e,wn as f,kn as g,En as o,yn as s,Sn 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.