@luciodale/react-searchable-dropdown
Version:
A reusable React searchable dropdown component.
33 lines (31 loc) • 124 kB
JavaScript
(function(vt,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],C):(vt=typeof globalThis<"u"?globalThis:vt||self,C(vt.LucioDaleReactSearchableDropdown={},vt.React,vt.ReactDOM))})(this,function(vt,C,Mr){"use strict";function Pr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const N=Pr(C),jr=Pr(Mr);var Fr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Un(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $n={exports:{}},qt={};/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Lr;function Qi(){if(Lr)return qt;Lr=1;var e=C,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function s(l,a,c){var u,f={},p=null,g=null;c!==void 0&&(p=""+c),a.key!==void 0&&(p=""+a.key),a.ref!==void 0&&(g=a.ref);for(u in a)r.call(a,u)&&!i.hasOwnProperty(u)&&(f[u]=a[u]);if(l&&l.defaultProps)for(u in a=l.defaultProps,a)f[u]===void 0&&(f[u]=a[u]);return{$$typeof:t,type:l,key:p,ref:g,props:f,_owner:o.current}}return qt.Fragment=n,qt.jsx=s,qt.jsxs=s,qt}var Xt={};/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Dr;function Zi(){return Dr||(Dr=1,process.env.NODE_ENV!=="production"&&function(){var e=C,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),x=Symbol.iterator,w="@@iterator";function v(d){if(d===null||typeof d!="object")return null;var A=x&&d[x]||d[w];return typeof A=="function"?A:null}var m=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function h(d){{for(var A=arguments.length,F=new Array(A>1?A-1:0),Y=1;Y<A;Y++)F[Y-1]=arguments[Y];y("error",d,F)}}function y(d,A,F){{var Y=m.ReactDebugCurrentFrame,ce=Y.getStackAddendum();ce!==""&&(A+="%s",F=F.concat([ce]));var he=F.map(function(oe){return String(oe)});he.unshift("Warning: "+A),Function.prototype.apply.call(console[d],console,he)}}var I=!1,S=!1,b=!1,T=!1,E=!1,j;j=Symbol.for("react.module.reference");function P(d){return!!(typeof d=="string"||typeof d=="function"||d===r||d===i||E||d===o||d===c||d===u||T||d===g||I||S||b||typeof d=="object"&&d!==null&&(d.$$typeof===p||d.$$typeof===f||d.$$typeof===s||d.$$typeof===l||d.$$typeof===a||d.$$typeof===j||d.getModuleId!==void 0))}function D(d,A,F){var Y=d.displayName;if(Y)return Y;var ce=A.displayName||A.name||"";return ce!==""?F+"("+ce+")":F}function W(d){return d.displayName||"Context"}function B(d){if(d==null)return null;if(typeof d.tag=="number"&&h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case r:return"Fragment";case n:return"Portal";case i:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof d=="object")switch(d.$$typeof){case l:var A=d;return W(A)+".Consumer";case s:var F=d;return W(F._context)+".Provider";case a:return D(d,d.render,"ForwardRef");case f:var Y=d.displayName||null;return Y!==null?Y:B(d.type)||"Memo";case p:{var ce=d,he=ce._payload,oe=ce._init;try{return B(oe(he))}catch{return null}}}return null}var H=Object.assign,V=0,X,ae,U,K,le,we,Ce;function ge(){}ge.__reactDisabledLog=!0;function ye(){{if(V===0){X=console.log,ae=console.info,U=console.warn,K=console.error,le=console.group,we=console.groupCollapsed,Ce=console.groupEnd;var d={configurable:!0,enumerable:!0,value:ge,writable:!0};Object.defineProperties(console,{info:d,log:d,warn:d,error:d,group:d,groupCollapsed:d,groupEnd:d})}V++}}function Pe(){{if(V--,V===0){var d={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:H({},d,{value:X}),info:H({},d,{value:ae}),warn:H({},d,{value:U}),error:H({},d,{value:K}),group:H({},d,{value:le}),groupCollapsed:H({},d,{value:we}),groupEnd:H({},d,{value:Ce})})}V<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var be=m.ReactCurrentDispatcher,Se;function O(d,A,F){{if(Se===void 0)try{throw Error()}catch(ce){var Y=ce.stack.trim().match(/\n( *(at )?)/);Se=Y&&Y[1]||""}return`
`+Se+d}}var z=!1,Z;{var fe=typeof WeakMap=="function"?WeakMap:Map;Z=new fe}function ee(d,A){if(!d||z)return"";{var F=Z.get(d);if(F!==void 0)return F}var Y;z=!0;var ce=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var he;he=be.current,be.current=null,ye();try{if(A){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(qe){Y=qe}Reflect.construct(d,[],oe)}else{try{oe.call()}catch(qe){Y=qe}d.call(oe.prototype)}}else{try{throw Error()}catch(qe){Y=qe}d()}}catch(qe){if(qe&&Y&&typeof qe.stack=="string"){for(var te=qe.stack.split(`
`),Ue=Y.stack.split(`
`),Te=te.length-1,Ie=Ue.length-1;Te>=1&&Ie>=0&&te[Te]!==Ue[Ie];)Ie--;for(;Te>=1&&Ie>=0;Te--,Ie--)if(te[Te]!==Ue[Ie]){if(Te!==1||Ie!==1)do if(Te--,Ie--,Ie<0||te[Te]!==Ue[Ie]){var nt=`
`+te[Te].replace(" at new "," at ");return d.displayName&&nt.includes("<anonymous>")&&(nt=nt.replace("<anonymous>",d.displayName)),typeof d=="function"&&Z.set(d,nt),nt}while(Te>=1&&Ie>=0);break}}}finally{z=!1,be.current=he,Pe(),Error.prepareStackTrace=ce}var Gt=d?d.displayName||d.name:"",Dt=Gt?O(Gt):"";return typeof d=="function"&&Z.set(d,Dt),Dt}function Ae(d,A,F){return ee(d,!1)}function Ye(d){var A=d.prototype;return!!(A&&A.isReactComponent)}function ve(d,A,F){if(d==null)return"";if(typeof d=="function")return ee(d,Ye(d));if(typeof d=="string")return O(d);switch(d){case c:return O("Suspense");case u:return O("SuspenseList")}if(typeof d=="object")switch(d.$$typeof){case a:return Ae(d.render);case f:return ve(d.type,A,F);case p:{var Y=d,ce=Y._payload,he=Y._init;try{return ve(he(ce),A,F)}catch{}}}return""}var We=Object.prototype.hasOwnProperty,ke={},ze=m.ReactDebugCurrentFrame;function je(d){if(d){var A=d._owner,F=ve(d.type,d._source,A?A.type:null);ze.setExtraStackFrame(F)}else ze.setExtraStackFrame(null)}function Fe(d,A,F,Y,ce){{var he=Function.call.bind(We);for(var oe in d)if(he(d,oe)){var te=void 0;try{if(typeof d[oe]!="function"){var Ue=Error((Y||"React class")+": "+F+" type `"+oe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof d[oe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ue.name="Invariant Violation",Ue}te=d[oe](A,oe,Y,F,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Te){te=Te}te&&!(te instanceof Error)&&(je(ce),h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Y||"React class",F,oe,typeof te),je(null)),te instanceof Error&&!(te.message in ke)&&(ke[te.message]=!0,je(ce),h("Failed %s type: %s",F,te.message),je(null))}}}var dt=Array.isArray;function ht(d){return dt(d)}function Le(d){{var A=typeof Symbol=="function"&&Symbol.toStringTag,F=A&&d[Symbol.toStringTag]||d.constructor.name||"Object";return F}}function Ke(d){try{return Ve(d),!1}catch{return!0}}function Ve(d){return""+d}function gt(d){if(Ke(d))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Le(d)),Ve(d)}var mt=m.ReactCurrentOwner,ie={key:!0,ref:!0,__self:!0,__source:!0},_e,Rt;function At(d){if(We.call(d,"ref")){var A=Object.getOwnPropertyDescriptor(d,"ref").get;if(A&&A.isReactWarning)return!1}return d.ref!==void 0}function Ot(d){if(We.call(d,"key")){var A=Object.getOwnPropertyDescriptor(d,"key").get;if(A&&A.isReactWarning)return!1}return d.key!==void 0}function Bn(d,A){typeof d.ref=="string"&&mt.current}function Wn(d,A){{var F=function(){_e||(_e=!0,h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",A))};F.isReactWarning=!0,Object.defineProperty(d,"key",{get:F,configurable:!0})}}function kr(d,A){{var F=function(){Rt||(Rt=!0,h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",A))};F.isReactWarning=!0,Object.defineProperty(d,"ref",{get:F,configurable:!0})}}var re=function(d,A,F,Y,ce,he,oe){var te={$$typeof:t,type:d,key:A,ref:F,props:oe,_owner:he};return te._store={},Object.defineProperty(te._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(te,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Y}),Object.defineProperty(te,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ce}),Object.freeze&&(Object.freeze(te.props),Object.freeze(te)),te};function Ge(d,A,F,Y,ce){{var he,oe={},te=null,Ue=null;F!==void 0&&(gt(F),te=""+F),Ot(A)&&(gt(A.key),te=""+A.key),At(A)&&(Ue=A.ref,Bn(A,ce));for(he in A)We.call(A,he)&&!ie.hasOwnProperty(he)&&(oe[he]=A[he]);if(d&&d.defaultProps){var Te=d.defaultProps;for(he in Te)oe[he]===void 0&&(oe[he]=Te[he])}if(te||Ue){var Ie=typeof d=="function"?d.displayName||d.name||"Unknown":d;te&&Wn(oe,Ie),Ue&&kr(oe,Ie)}return re(d,te,Ue,ce,Y,mt.current,oe)}}var kt=m.ReactCurrentOwner,Ht=m.ReactDebugCurrentFrame;function pt(d){if(d){var A=d._owner,F=ve(d.type,d._source,A?A.type:null);Ht.setExtraStackFrame(F)}else Ht.setExtraStackFrame(null)}var hn;hn=!1;function gn(d){return typeof d=="object"&&d!==null&&d.$$typeof===t}function Vn(){{if(kt.current){var d=B(kt.current.type);if(d)return`
Check the render method of \``+d+"`."}return""}}function wc(d){return""}var Yi={};function yc(d){{var A=Vn();if(!A){var F=typeof d=="string"?d:d.displayName||d.name;F&&(A=`
Check the top-level render call using <`+F+">.")}return A}}function Gi(d,A){{if(!d._store||d._store.validated||d.key!=null)return;d._store.validated=!0;var F=yc(A);if(Yi[F])return;Yi[F]=!0;var Y="";d&&d._owner&&d._owner!==kt.current&&(Y=" It was passed a child from "+B(d._owner.type)+"."),pt(d),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',F,Y),pt(null)}}function qi(d,A){{if(typeof d!="object")return;if(ht(d))for(var F=0;F<d.length;F++){var Y=d[F];gn(Y)&&Gi(Y,A)}else if(gn(d))d._store&&(d._store.validated=!0);else if(d){var ce=v(d);if(typeof ce=="function"&&ce!==d.entries)for(var he=ce.call(d),oe;!(oe=he.next()).done;)gn(oe.value)&&Gi(oe.value,A)}}}function Sc(d){{var A=d.type;if(A==null||typeof A=="string")return;var F;if(typeof A=="function")F=A.propTypes;else if(typeof A=="object"&&(A.$$typeof===a||A.$$typeof===f))F=A.propTypes;else return;if(F){var Y=B(A);Fe(F,d.props,"prop",Y,d)}else if(A.PropTypes!==void 0&&!hn){hn=!0;var ce=B(A);h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ce||"Unknown")}typeof A.getDefaultProps=="function"&&!A.getDefaultProps.isReactClassApproved&&h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Tc(d){{for(var A=Object.keys(d.props),F=0;F<A.length;F++){var Y=A[F];if(Y!=="children"&&Y!=="key"){pt(d),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Y),pt(null);break}}d.ref!==null&&(pt(d),h("Invalid attribute `ref` supplied to `React.Fragment`."),pt(null))}}var Xi={};function Ji(d,A,F,Y,ce,he){{var oe=P(d);if(!oe){var te="";(d===void 0||typeof d=="object"&&d!==null&&Object.keys(d).length===0)&&(te+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ue=wc();Ue?te+=Ue:te+=Vn();var Te;d===null?Te="null":ht(d)?Te="array":d!==void 0&&d.$$typeof===t?(Te="<"+(B(d.type)||"Unknown")+" />",te=" Did you accidentally export a JSX literal instead of a component?"):Te=typeof d,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Te,te)}var Ie=Ge(d,A,F,ce,he);if(Ie==null)return Ie;if(oe){var nt=A.children;if(nt!==void 0)if(Y)if(ht(nt)){for(var Gt=0;Gt<nt.length;Gt++)qi(nt[Gt],d);Object.freeze&&Object.freeze(nt)}else h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else qi(nt,d)}if(We.call(A,"key")){var Dt=B(d),qe=Object.keys(A).filter(function(Oc){return Oc!=="key"}),Hr=qe.length>0?"{key: someKey, "+qe.join(": ..., ")+": ...}":"{key: someKey}";if(!Xi[Dt+Hr]){var Ac=qe.length>0?"{"+qe.join(": ..., ")+": ...}":"{}";h(`A props object containing a "key" prop is being spread into JSX:
let props = %s;
<%s {...props} />
React keys must be passed directly to JSX without using spread:
let props = %s;
<%s key={someKey} {...props} />`,Hr,Dt,Ac,Dt),Xi[Dt+Hr]=!0}}return d===r?Tc(Ie):Sc(Ie),Ie}}function Cc(d,A,F){return Ji(d,A,F,!0)}function Ic(d,A,F){return Ji(d,A,F,!1)}var Ec=Ic,Rc=Cc;Xt.Fragment=r,Xt.jsx=Ec,Xt.jsxs=Rc}()),Xt}process.env.NODE_ENV==="production"?$n.exports=Qi():$n.exports=Zi();var M=$n.exports;function mn(){return typeof window<"u"}function zt(e){return zr(e)?(e.nodeName||"").toLowerCase():"#document"}function Xe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function it(e){var t;return(t=(zr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function zr(e){return mn()?e instanceof Node||e instanceof Xe(e).Node:!1}function He(e){return mn()?e instanceof Element||e instanceof Xe(e).Element:!1}function st(e){return mn()?e instanceof HTMLElement||e instanceof Xe(e).HTMLElement:!1}function Yn(e){return!mn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Xe(e).ShadowRoot}function Jt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=rt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Ki(e){return["table","td","th"].includes(zt(e))}function pn(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Gn(e){const t=qn(),n=He(e)?rt(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function es(e){let t=wt(e);for(;st(t)&&!_t(t);){if(Gn(t))return t;if(pn(t))return null;t=wt(t)}return null}function qn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function _t(e){return["html","body","#document"].includes(zt(e))}function rt(e){return Xe(e).getComputedStyle(e)}function vn(e){return He(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function wt(e){if(zt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Yn(e)&&e.host||it(e);return Yn(t)?t.host:t}function _r(e){const t=wt(e);return _t(t)?e.ownerDocument?e.ownerDocument.body:e.body:st(t)&&Jt(t)?t:_r(t)}function Qt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=_r(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Xe(o);if(i){const l=Xn(s);return t.concat(s,s.visualViewport||[],Jt(o)?o:[],l&&n?Qt(l):[])}return t.concat(o,Qt(o,[],n))}function Xn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Nt=Math.min,Je=Math.max,xn=Math.round,bn=Math.floor,lt=e=>({x:e,y:e}),ts={left:"right",right:"left",bottom:"top",top:"bottom"},ns={start:"end",end:"start"};function Nr(e,t,n){return Je(e,Nt(t,n))}function Zt(e,t){return typeof e=="function"?e(t):e}function yt(e){return e.split("-")[0]}function Kt(e){return e.split("-")[1]}function Br(e){return e==="x"?"y":"x"}function Wr(e){return e==="y"?"height":"width"}function xt(e){return["top","bottom"].includes(yt(e))?"y":"x"}function Vr(e){return Br(xt(e))}function rs(e,t,n){n===void 0&&(n=!1);const r=Kt(e),o=Vr(e),i=Wr(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=wn(s)),[s,wn(s)]}function os(e){const t=wn(e);return[Jn(e),t,Jn(t)]}function Jn(e){return e.replace(/start|end/g,t=>ns[t])}function is(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function ss(e,t,n,r){const o=Kt(e);let i=is(yt(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Jn)))),i}function wn(e){return e.replace(/left|right|bottom|top/g,t=>ts[t])}function ls(e){return{top:0,right:0,bottom:0,left:0,...e}}function as(e){return typeof e!="number"?ls(e):{top:e,right:e,bottom:e,left:e}}function yn(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}/*!
* tabbable 6.2.0
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
*/var cs=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Qn=cs.join(","),Ur=typeof Element>"u",en=Ur?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Sn=!Ur&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Tn=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",s=i||n&&t&&e(t.parentNode);return s},us=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},fs=function(t,n,r){if(Tn(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Qn));return n&&en.call(t,Qn)&&o.unshift(t),o=o.filter(r),o},ds=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!Tn(s,!1))if(s.tagName==="SLOT"){var l=s.assignedElements(),a=l.length?l:s.children,c=e(a,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=en.call(s,Qn);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var f=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),p=!Tn(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(f&&p){var g=e(f===!0?s.children:f.children,!0,r);r.flatten?o.push.apply(o,g):o.push({scopeParent:s,candidates:g})}else i.unshift.apply(i,s.children)}}return o},$r=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Yr=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||us(t))&&!$r(t)?0:t.tabIndex},hs=function(t,n){var r=Yr(t);return r<0&&n&&!$r(t)?0:r},gs=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Gr=function(t){return t.tagName==="INPUT"},ms=function(t){return Gr(t)&&t.type==="hidden"},ps=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},vs=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},xs=function(t){if(!t.name)return!0;var n=t.form||Sn(t),r=function(l){return n.querySelectorAll('input[type="radio"][name="'+l+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(s){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",s.message),!1}var i=vs(o,t.form);return!i||i===t},bs=function(t){return Gr(t)&&t.type==="radio"},ws=function(t){return bs(t)&&!xs(t)},ys=function(t){var n,r=t&&Sn(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,l,a;for(i=!!((s=o)!==null&&s!==void 0&&(l=s.ownerDocument)!==null&&l!==void 0&&l.contains(o)||t!=null&&(a=t.ownerDocument)!==null&&a!==void 0&&a.contains(t));!i&&o;){var c,u,f;r=Sn(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},qr=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},Ss=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=en.call(t,"details>summary:first-of-type"),s=i?t.parentElement:t;if(en.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var a=t.parentElement,c=Sn(t);if(a&&!a.shadowRoot&&o(a)===!0)return qr(t);t.assignedSlot?t=t.assignedSlot:!a&&c!==t.ownerDocument?t=c.host:t=a}t=l}if(ys(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return qr(t);return!1},Ts=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.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 en.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Cs=function(t,n){return!(n.disabled||Tn(n)||ms(n)||Ss(n,t)||ps(n)||Ts(n))},Xr=function(t,n){return!(ws(n)||Yr(n)<0||!Cs(t,n))},Is=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Es=function e(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,l=s?o.scopeParent:o,a=hs(l,s),c=s?e(o.candidates):l;a===0?s?n.push.apply(n,c):n.push(l):r.push({documentOrder:i,tabIndex:a,item:o,isScope:s,content:c})}),r.sort(gs).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Jr=function(t,n){n=n||{};var r;return n.getShadowRoot?r=ds([t],n.includeContainer,{filter:Xr.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Is}):r=fs(t,n.includeContainer,Xr.bind(null,n)),Es(r)};function Rs(){return/apple/i.test(navigator.vendor)}function As(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 Os(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Yn(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Zn(e){return(e==null?void 0:e.ownerDocument)||document}var ks=typeof document<"u",Hs=function(){},Mt=ks?C.useLayoutEffect:Hs;const Ms={...N}.useInsertionEffect||(e=>e());function Ps(e){const t=N.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Ms(()=>{t.current=e}),N.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 Qr=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Zr(e,t){const n=Jr(e,Qr()),r=n.length;if(r===0)return;const o=As(Zn(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function js(e){return Zr(Zn(e).body,1)||e}function Fs(e){return Zr(Zn(e).body,-1)||e}function Kn(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Os(n,r)}function Ls(e){Jr(e,Qr()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Kr(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function eo(e,t,n){let{reference:r,floating:o}=e;const i=xt(t),s=Vr(t),l=Wr(s),a=yt(t),c=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[l]/2-o[l]/2;let g;switch(a){case"top":g={x:u,y:r.y-o.height};break;case"bottom":g={x:u,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:f};break;case"left":g={x:r.x-o.width,y:f};break;default:g={x:r.x,y:r.y}}switch(Kt(t)){case"start":g[s]-=p*(n&&c?-1:1);break;case"end":g[s]+=p*(n&&c?-1:1);break}return g}const Ds=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,l=i.filter(Boolean),a=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=eo(c,r,a),p=r,g={},x=0;for(let w=0;w<l.length;w++){const{name:v,fn:m}=l[w],{x:h,y,data:I,reset:S}=await m({x:u,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:g,rects:c,platform:s,elements:{reference:e,floating:t}});u=h??u,f=y??f,g={...g,[v]:{...g[v],...I}},S&&x<=50&&(x++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(c=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:f}=eo(c,p,a)),w=-1)}return{x:u,y:f,placement:p,strategy:o,middlewareData:g}};async function er(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:l,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:g=0}=Zt(t,e),x=as(g),v=l[p?f==="floating"?"reference":"floating":f],m=yn(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:a})),h=f==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),I=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},S=yn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:h,offsetParent:y,strategy:a}):h);return{top:(m.top-S.top+x.top)/I.y,bottom:(S.bottom-m.bottom+x.bottom)/I.y,left:(m.left-S.left+x.left)/I.x,right:(S.right-m.right+x.right)/I.x}}const zs=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:l,platform:a,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:w=!0,...v}=Zt(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const m=yt(o),h=xt(l),y=yt(l)===l,I=await(a.isRTL==null?void 0:a.isRTL(c.floating)),S=p||(y||!w?[wn(l)]:os(l)),b=x!=="none";!p&&b&&S.push(...ss(l,w,x,I));const T=[l,...S],E=await er(t,v),j=[];let P=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&j.push(E[m]),f){const H=rs(o,s,I);j.push(E[H[0]],E[H[1]])}if(P=[...P,{placement:o,overflows:j}],!j.every(H=>H<=0)){var D,W;const H=(((D=i.flip)==null?void 0:D.index)||0)+1,V=T[H];if(V&&(!(f==="alignment"?h!==xt(V):!1)||P.every(U=>U.overflows[0]>0&&xt(U.placement)===h)))return{data:{index:H,overflows:P},reset:{placement:V}};let X=(W=P.filter(ae=>ae.overflows[0]<=0).sort((ae,U)=>ae.overflows[1]-U.overflows[1])[0])==null?void 0:W.placement;if(!X)switch(g){case"bestFit":{var B;const ae=(B=P.filter(U=>{if(b){const K=xt(U.placement);return K===h||K==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(K=>K>0).reduce((K,le)=>K+le,0)]).sort((U,K)=>U[1]-K[1])[0])==null?void 0:B[0];ae&&(X=ae);break}case"initialPlacement":X=l;break}if(o!==X)return{reset:{placement:X}}}return{}}}};async function _s(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=yt(n),l=Kt(n),a=xt(n)==="y",c=["left","top"].includes(s)?-1:1,u=i&&a?-1:1,f=Zt(t,e);let{mainAxis:p,crossAxis:g,alignmentAxis:x}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof x=="number"&&(g=l==="end"?x*-1:x),a?{x:g*u,y:p*c}:{x:p*c,y:g*u}}const Ns=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:l}=t,a=await _s(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:s}}}}},Bs=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:v=>{let{x:m,y:h}=v;return{x:m,y:h}}},...a}=Zt(e,t),c={x:n,y:r},u=await er(t,a),f=xt(yt(o)),p=Br(f);let g=c[p],x=c[f];if(i){const v=p==="y"?"top":"left",m=p==="y"?"bottom":"right",h=g+u[v],y=g-u[m];g=Nr(h,g,y)}if(s){const v=f==="y"?"top":"left",m=f==="y"?"bottom":"right",h=x+u[v],y=x-u[m];x=Nr(h,x,y)}const w=l.fn({...t,[p]:g,[f]:x});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[p]:i,[f]:s}}}}}},Ws=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:l}=t,{apply:a=()=>{},...c}=Zt(e,t),u=await er(t,c),f=yt(o),p=Kt(o),g=xt(o)==="y",{width:x,height:w}=i.floating;let v,m;f==="top"||f==="bottom"?(v=f,m=p===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(m=f,v=p==="end"?"top":"bottom");const h=w-u.top-u.bottom,y=x-u.left-u.right,I=Nt(w-u[v],h),S=Nt(x-u[m],y),b=!t.middlewareData.shift;let T=I,E=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=h),b&&!p){const P=Je(u.left,0),D=Je(u.right,0),W=Je(u.top,0),B=Je(u.bottom,0);g?E=x-2*(P!==0||D!==0?P+D:Je(u.left,u.right)):T=w-2*(W!==0||B!==0?W+B:Je(u.top,u.bottom))}await a({...t,availableWidth:E,availableHeight:T});const j=await s.getDimensions(l.floating);return x!==j.width||w!==j.height?{reset:{rects:!0}}:{}}}};function to(e){const t=rt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=st(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,l=xn(n)!==i||xn(r)!==s;return l&&(n=i,r=s),{width:n,height:r,$:l}}function tr(e){return He(e)?e:e.contextElement}function Bt(e){const t=tr(e);if(!st(t))return lt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=to(t);let s=(i?xn(n.width):n.width)/r,l=(i?xn(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const Vs=lt(0);function no(e){const t=Xe(e);return!qn()||!t.visualViewport?Vs:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Us(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Xe(e)?!1:t}function Pt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=tr(e);let s=lt(1);t&&(r?He(r)&&(s=Bt(r)):s=Bt(e));const l=Us(i,n,r)?no(i):lt(0);let a=(o.left+l.x)/s.x,c=(o.top+l.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(i){const p=Xe(i),g=r&&He(r)?Xe(r):r;let x=p,w=Xn(x);for(;w&&r&&g!==x;){const v=Bt(w),m=w.getBoundingClientRect(),h=rt(w),y=m.left+(w.clientLeft+parseFloat(h.paddingLeft))*v.x,I=m.top+(w.clientTop+parseFloat(h.paddingTop))*v.y;a*=v.x,c*=v.y,u*=v.x,f*=v.y,a+=y,c+=I,x=Xe(w),w=Xn(x)}}return yn({width:u,height:f,x:a,y:c})}function nr(e,t){const n=vn(e).scrollLeft;return t?t.left+n:Pt(it(e)).left+n}function ro(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:nr(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function $s(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=it(r),l=t?pn(t.floating):!1;if(r===s||l&&i)return n;let a={scrollLeft:0,scrollTop:0},c=lt(1);const u=lt(0),f=st(r);if((f||!f&&!i)&&((zt(r)!=="body"||Jt(s))&&(a=vn(r)),st(r))){const g=Pt(r);c=Bt(r),u.x=g.x+r.clientLeft,u.y=g.y+r.clientTop}const p=s&&!f&&!i?ro(s,a,!0):lt(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-a.scrollTop*c.y+u.y+p.y}}function Ys(e){return Array.from(e.getClientRects())}function Gs(e){const t=it(e),n=vn(e),r=e.ownerDocument.body,o=Je(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Je(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+nr(e);const l=-n.scrollTop;return rt(r).direction==="rtl"&&(s+=Je(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:l}}function qs(e,t){const n=Xe(e),r=it(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,l=0,a=0;if(o){i=o.width,s=o.height;const c=qn();(!c||c&&t==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:i,height:s,x:l,y:a}}function Xs(e,t){const n=Pt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=st(e)?Bt(e):lt(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,a=o*i.x,c=r*i.y;return{width:s,height:l,x:a,y:c}}function oo(e,t,n){let r;if(t==="viewport")r=qs(e,n);else if(t==="document")r=Gs(it(e));else if(He(t))r=Xs(t,n);else{const o=no(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return yn(r)}function io(e,t){const n=wt(e);return n===t||!He(n)||_t(n)?!1:rt(n).position==="fixed"||io(n,t)}function Js(e,t){const n=t.get(e);if(n)return n;let r=Qt(e,[],!1).filter(l=>He(l)&&zt(l)!=="body"),o=null;const i=rt(e).position==="fixed";let s=i?wt(e):e;for(;He(s)&&!_t(s);){const l=rt(s),a=Gn(s);!a&&l.position==="fixed"&&(o=null),(i?!a&&!o:!a&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Jt(s)&&!a&&io(e,s))?r=r.filter(u=>u!==s):o=l,s=wt(s)}return t.set(e,r),r}function Qs(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?pn(t)?[]:Js(t,this._c):[].concat(n),r],l=s[0],a=s.reduce((c,u)=>{const f=oo(t,u,o);return c.top=Je(f.top,c.top),c.right=Nt(f.right,c.right),c.bottom=Nt(f.bottom,c.bottom),c.left=Je(f.left,c.left),c},oo(t,l,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function Zs(e){const{width:t,height:n}=to(e);return{width:t,height:n}}function Ks(e,t,n){const r=st(t),o=it(t),i=n==="fixed",s=Pt(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const a=lt(0);function c(){a.x=nr(o)}if(r||!r&&!i)if((zt(t)!=="body"||Jt(o))&&(l=vn(t)),r){const g=Pt(t,!0,i,t);a.x=g.x+t.clientLeft,a.y=g.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?ro(o,l):lt(0),f=s.left+l.scrollLeft-a.x-u.x,p=s.top+l.scrollTop-a.y-u.y;return{x:f,y:p,width:s.width,height:s.height}}function rr(e){return rt(e).position==="static"}function so(e,t){if(!st(e)||rt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return it(e)===n&&(n=n.ownerDocument.body),n}function lo(e,t){const n=Xe(e);if(pn(e))return n;if(!st(e)){let o=wt(e);for(;o&&!_t(o);){if(He(o)&&!rr(o))return o;o=wt(o)}return n}let r=so(e,t);for(;r&&Ki(r)&&rr(r);)r=so(r,t);return r&&_t(r)&&rr(r)&&!Gn(r)?n:r||es(e)||n}const el=async function(e){const t=this.getOffsetParent||lo,n=this.getDimensions,r=await n(e.floating);return{reference:Ks(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function tl(e){return rt(e).direction==="rtl"}const nl={convertOffsetParentRelativeRectToViewportRelativeRect:$s,getDocumentElement:it,getClippingRect:Qs,getOffsetParent:lo,getElementRects:el,getClientRects:Ys,getDimensions:Zs,getScale:Bt,isElement:He,isRTL:tl};function ao(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function rl(e,t){let n=null,r;const o=it(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function s(l,a){l===void 0&&(l=!1),a===void 0&&(a=1),i();const c=e.getBoundingClientRect(),{left:u,top:f,width:p,height:g}=c;if(l||t(),!p||!g)return;const x=bn(f),w=bn(o.clientWidth-(u+p)),v=bn(o.clientHeight-(f+g)),m=bn(u),y={rootMargin:-x+"px "+-w+"px "+-v+"px "+-m+"px",threshold:Je(0,Nt(1,a))||1};let I=!0;function S(b){const T=b[0].intersectionRatio;if(T!==a){if(!I)return s();T?s(!1,T):r=setTimeout(()=>{s(!1,1e-7)},1e3)}T===1&&!ao(c,e.getBoundingClientRect())&&s(),I=!1}try{n=new IntersectionObserver(S,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,y)}n.observe(e)}return s(!0),i}function co(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,c=tr(e),u=o||i?[...c?Qt(c):[],...Qt(t)]:[];u.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),i&&m.addEventListener("resize",n)});const f=c&&l?rl(c,n):null;let p=-1,g=null;s&&(g=new ResizeObserver(m=>{let[h]=m;h&&h.target===c&&g&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var y;(y=g)==null||y.observe(t)})),n()}),c&&!a&&g.observe(c),g.observe(t));let x,w=a?Pt(e):null;a&&v();function v(){const m=Pt(e);w&&!ao(w,m)&&n(),w=m,x=requestAnimationFrame(v)}return n(),()=>{var m;u.forEach(h=>{o&&h.removeEventListener("scroll",n),i&&h.removeEventListener("resize",n)}),f==null||f(),(m=g)==null||m.disconnect(),g=null,a&&cancelAnimationFrame(x)}}const ol=Ns,il=Bs,sl=zs,ll=Ws,al=(e,t,n)=>{const r=new Map,o={platform:nl,...n},i={...o.platform,_c:r};return Ds(e,t,{...o,platform:i})};var cl=typeof document<"u",ul=function(){},Cn=cl?C.useLayoutEffect:ul;function In(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!In(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!In(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function uo(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function fo(e,t){const n=uo(e);return Math.round(t*n)/n}function or(e){const t=N.useRef(e);return Cn(()=>{t.current=e}),t}function fl(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:a,open:c}=e,[u,f]=N.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,g]=N.useState(r);In(p,r)||g(r);const[x,w]=N.useState(null),[v,m]=N.useState(null),h=N.useCallback(U=>{U!==b.current&&(b.current=U,w(U))},[]),y=N.useCallback(U=>{U!==T.current&&(T.current=U,m(U))},[]),I=i||x,S=s||v,b=N.useRef(null),T=N.useRef(null),E=N.useRef(u),j=a!=null,P=or(a),D=or(o),W=or(c),B=N.useCallback(()=>{if(!b.current||!T.current)return;const U={placement:t,strategy:n,middleware:p};D.current&&(U.platform=D.current),al(b.current,T.current,U).then(K=>{const le={...K,isPositioned:W.current!==!1};H.current&&!In(E.current,le)&&(E.current=le,jr.flushSync(()=>{f(le)}))})},[p,t,n,D,W]);Cn(()=>{c===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,f(U=>({...U,isPositioned:!1})))},[c]);const H=N.useRef(!1);Cn(()=>(H.current=!0,()=>{H.current=!1}),[]),Cn(()=>{if(I&&(b.current=I),S&&(T.current=S),I&&S){if(P.current)return P.current(I,S,B);B()}},[I,S,B,P,j]);const V=N.useMemo(()=>({reference:b,floating:T,setReference:h,setFloating:y}),[h,y]),X=N.useMemo(()=>({reference:I,floating:S}),[I,S]),ae=N.useMemo(()=>{const U={position:n,left:0,top:0};if(!X.floating)return U;const K=fo(X.floating,u.x),le=fo(X.floating,u.y);return l?{...U,transform:"translate("+K+"px, "+le+"px)",...uo(X.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:K,top:le}},[n,l,X.floating,u.x,u.y]);return N.useMemo(()=>({...u,update:B,refs:V,elements:X,floatingStyles:ae}),[u,B,V,X,ae])}const ho=(e,t)=>({...ol(e),options:[e,t]}),go=(e,t)=>({...il(e),options:[e,t]}),mo=(e,t)=>({...sl(e),options:[e,t]}),po=(e,t)=>({...ll(e),options:[e,t]}),dl={...N};let vo=!1,hl=0;const xo=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+hl++;function gl(){const[e,t]=N.useState(()=>vo?xo():void 0);return Mt(()=>{e==null&&t(xo())},[]),N.useEffect(()=>{vo=!0},[]),e}const bo=dl.useId||gl;let ir;process.env.NODE_ENV!=="production"&&(ir=new Set);function ml(){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=ir)!=null&&e.has(o))){var i;(i=ir)==null||i.add(o),console.error(o)}}function pl(){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 vl=N.createContext(null),xl=N.createContext(null),bl=()=>{var e;return((e=N.useContext(vl))==null?void 0:e.id)||null},wl=()=>N.useContext(xl);function wo(e){return"data-floating-ui-"+e}const yo={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},So=N.forwardRef(function(t,n){const[r,o]=N.useState();Mt(()=>{Rs()&&o("button")},[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[wo("focus-guard")]:"",style:yo};return M.jsx("span",{...t,...i})}),To=N.createContext(null),Co=wo("portal");function yl(e){e===void 0&&(e={});const{id:t,root:n}=e,r=bo(),o=Sl(),[i,s]=N.useState(null),l=N.useRef(null);return Mt(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{l.current=null})},[i]),Mt(()=>{if(!r||l.current)return;const a=t?document.getElementById(t):null;if(!a)return;const c=document.createElement("div");c.id=r,c.setAttribute(Co,""),a.appendChild(c),l.current=c,s(c)},[t,r]),Mt(()=>{if(n===null||!r||l.current)return;let a=n||(o==null?void 0:o.portalNode);a&&!He(a)&&(a=a.current),a=a||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,a.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(Co,""),a=c||a,a.appendChild(u),l.current=u,s(u)},[t,n,r,o]),i}function Io(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=yl({id:n,root:r}),[s,l]=N.useState(null),a=N.useRef(null),c=N.useRef(null),u=N.useRef(null),f=N.useRef(null),p=s==null?void 0:s.modal,g=s==null?void 0:s.open,x=!!s&&!s.modal&&s.open&&o&&!!(r||i);return N.useEffect(()=>{if(!i||!o||p)return;function w(v){i&&Kn(v)&&(v.type==="focusin"?Kr:Ls)(i)}return i.addEventListener("focusin",w,!0),i.addEventListener("focusout",w,!0),()=>{i.removeEventListener("focusin",w,!0),i.removeEventListener("focusout",w,!0)}},[i,o,p]),N.useEffect(()=>{i&&(g||Kr(i))},[g,i]),M.jsxs(To.Provider,{value:N.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:a,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:f,portalNode:i,setFocusManagerState:l}),[o,i]),children:[x&&i&&M.jsx(So,{"data-type":"outside",ref:a,onFocus:w=>{if(Kn(w,i)){var v;(v=u.current)==null||v.focus()}else{const m=s?s.domReference:null,h=Fs(m);h==null||h.focus()}}}),x&&i&&M.jsx("span",{"aria-owns":i.id,style:yo}),i&&jr.createPortal(t,i),x&&i&&M.jsx(So,{"data-type":"outside",ref:c,onFocus:w=>{if(Kn(w,i)){var v;(v=f.current)==null||v.focus()}else{const m=s?s.domReference:null,h=js(m);h==null||h.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,w.nativeEvent,"focus-out"))}}})]})}const Sl=()=>N.useContext(To);function Tl(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=bo(),i=N.useRef({}),[s]=N.useState(()=>pl()),l=bl()!=null;if(process.env.NODE_ENV!=="production"){const g=r.reference;g&&!He(g)&&ml("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[a,c]=N.useState(r.reference),u=Ps((g,x,w)=>{i.current.openEvent=g?x:void 0,s.emit("openchange",{open:g,event:x,reason:w,nested:l}),n==null||n(g,x,w)}),f=N.useMemo(()=>({setPositionReference:c}),[]),p=N.useMemo(()=>({reference:a||r.reference||null,floating:r.floating||null,domReference:r.reference}),[a,r.reference,r.floating]);return N.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:s,floatingId:o,refs:f}),[t,u,p,s,o,f])}function Eo(e){e===void 0&&(e={});const{nodeId:t}=e,n=Tl({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=N.useState(null),[l,a]=N.useState(null),u=(o==null?void 0:o.domReference)||i,f=N.useRef(null),p=wl();Mt(()=>{u&&(f.current=u)},[u]);const g=fl({...e,elements:{...o,...l&&{reference:l}}}),x=N.useCallback(y=>{const I=He(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),getClientRects:()=>y.getClientRects(),contextElement:y}:y;a(I),g.refs.setReference(I)},[g.refs]),w=N.useCallback(y=>{(He(y)||y===null)&&(f.current=y,s(y)),(He(g.refs.reference.current)||g.refs.reference.current===null||y!==null&&!He(y))&&g.refs.setReference(y)},[g.refs]),v=N.useMemo(()=>({...g.refs,setReference:w,setPositionReference:x,domReference:f}),[g.refs,w,x]),m=N.useMemo(()=>({...g.elements,domReference:u}),[g.elements,u]),h=N.useMemo(()=>({...g,...r,refs:v,elements:m,nodeId:t}),[g,v,m,t,r]);return Mt(()=>{r.dataRef.current.floatingContext=h;const y=p==null?void 0:p.nodesRef.current.find(I=>I.id===t);y&&(y.context=h)}),N.useMemo(()=>({...g,context:h,refs:v,elements:m}),[g,v,m,h])}const En=0,St=1,Wt=2,Ro=4;function Ao(e){return()=>e}function Cl(e){e()}function Oo(e,t){return n=>e(t(n))}function ko(e,t){return()=>e(t)}function Il(e,t){return n=>e(t,n)}function sr(e){return e!==void 0}function El(...e){return()=>{e.map(Cl)}}function Vt(){}function Rn(e,t){return t(e),e}function Rl(e,t){return t(e)}function me(...e){return e}function ue(e,t){return e(St,t)}function J(e,t){e(En,t)}function lr(e){e(Wt)}function Oe(e){return e(Ro)}function _(e,t){return ue(e,Il(t,En))}function at(e,t){const n=e(St,r=>{n(),t(r)});return n}function Ho(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function Mo(e,t){return e===t}function pe(e=Mo){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function $(e){return t=>n=>{e(n)&&t(n)}}function L(e){return t=>Oo(t,e)}function ct(e){return t=>()=>{t(e)}}function R(e,...t){const n=Al(...t);return(r,o)=>{switch(r){case Wt:lr(e);return;case St:return ue(e,n(o))}}}function ut(e,t){return n=>r=>{n(t=e(t,r))}}function Ut(e){return t=>n=>{e>0?e--:t(n)}}function Tt(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Q(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const l=Math.pow(2,s);ue(i,a=>{const c=n;n=n|l,t[s]=a,c!==o&&n===o&&r&&(r(),r=null)})}),i=>s=>{const l=()=>{i([s].concat(t))};n===o?l():r=l}}function Al(...e){return t=>e.reduceRight(Rl,t)}function Ol(e){let t,n;const r=()=>t==null?void 0:t();return function(o,i){switch(o){case St:return i?n===i?void 0:(r(),n=i,t=ue(e,i),t):(r(),Vt);case Wt:r(),n=null;return}}}function k(e){let t=e;const n=ne();return(r,o)=>{switch(r){case En:t=o;break;case St:{o(t);break}case Ro:return t}return n(r,o)}}function De(e,t){return Rn(k(t),n=>_(e,n))}function ne(){const e=[];return(t,n)=>{switch(t){case En:e.slice().forEach(r=>{r(n)});return;case Wt:e.splice(0,e.length);return;case St:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}}}function Qe(e){return Rn(ne(),t=>_(e,t))}function se(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:kl(),singleton:n}}const kl=()=>Symbol();function Hl(e){const t=new Map,n=({constructor:r,dependencies:o,id:i,singleton:s})=>{if(s&&t.has(i))return t.get(i);const l=r(o.map(a=>n(a)));return s&&t.set(i,l),l};return n(e)}function Ee(...e){const t=ne(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const l=Math.pow(2,s);ue(i,a=>{n[s]=a,r=r|l,r===o&&J(t,n)})}),function(i,s){switch(i){case Wt:{lr(t);return}case St:return r===o&&s(n),ue(t,s)}}}function G(e,t=Mo){return R(e,pe(t))}function Po(...e){return function(t,n){switch(t){case Wt:return;case St:return El(...e.map(r=>ue(r,n)))}}}var $e=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))($e||{});const Ml={0:"debug",3:"error",1:"log",2:"warn"},Pl=()=>typeof globalThis>"u"?window:globalThis,Ct=se(()=>{const e=k(3);return{log:k((t,n,r=1)=>{var o;const i=(o=Pl().VIRTUOSO_LOG_LEVEL)!=null?o:Oe(e);r>=i&&console[Ml[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function jt(e,t,n){return ar(e,t,n).callbackRef}function ar(e,t,n){const r=C.useRef(null);let o=s=>{};const i=C.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(s=>{const l=()=>{const a=s[0].target;a.offsetParent!==null&&e(a)};n?l():requestAnimationFrame(l)}):null,[e,n]);return o=s=>{s&&t?(i==null||i.observe(s),r.current=s):(r.current&&(i==null||i.unobserve(r.current)),r.current=null)},{callbackRef:o,ref:r}}function jl(e,t,n,r,o,i,s,l,a){const c=C.useCallback(u=>{const f=Fl(u.children,t,l?"offsetWidth":"offsetHeight",o)