attractor-react 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +954 -0
- package/dist/attractor-react.cjs +76 -0
- package/dist/attractor-react.js +11360 -0
- package/dist/types/cjs/index.d.ts +4 -0
- package/dist/types/cjs/lib/App.d.ts +5 -0
- package/dist/types/cjs/lib/components/AttractorCanvas.d.ts +27 -0
- package/dist/types/cjs/lib/components/AttractorPanel.d.ts +30 -0
- package/dist/types/cjs/lib/components/CodeBlock.d.ts +4 -0
- package/dist/types/cjs/lib/components/StyledSlider.d.ts +13 -0
- package/dist/types/cjs/lib/components/WallpaperDownload.d.ts +11 -0
- package/dist/types/cjs/lib/components/ZoomControls.d.ts +1 -0
- package/dist/types/cjs/lib/components/ui/animated-theme-toggler.d.ts +16 -0
- package/dist/types/cjs/lib/components/ui/badge.d.ts +7 -0
- package/dist/types/cjs/lib/components/ui/button.d.ts +8 -0
- package/dist/types/cjs/lib/components/ui/label.d.ts +3 -0
- package/dist/types/cjs/lib/components/ui/scroll-area.d.ts +5 -0
- package/dist/types/cjs/lib/components/ui/select.d.ts +15 -0
- package/dist/types/cjs/lib/components/ui/separator.d.ts +3 -0
- package/dist/types/cjs/lib/components/ui/slider.d.ts +3 -0
- package/dist/types/cjs/lib/components/ui/switch.d.ts +5 -0
- package/dist/types/cjs/lib/components/ui/tooltip.d.ts +6 -0
- package/dist/types/cjs/lib/integrate.d.ts +16 -0
- package/dist/types/cjs/lib/providers/ThemeToggle.d.ts +11 -0
- package/dist/types/cjs/lib/systems.d.ts +26 -0
- package/dist/types/cjs/lib/utils.d.ts +2 -0
- package/dist/types/cjs/main.d.ts +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/lib/App.d.ts +5 -0
- package/dist/types/lib/components/AttractorCanvas.d.ts +27 -0
- package/dist/types/lib/components/AttractorPanel.d.ts +30 -0
- package/dist/types/lib/components/CodeBlock.d.ts +4 -0
- package/dist/types/lib/components/StyledSlider.d.ts +13 -0
- package/dist/types/lib/components/WallpaperDownload.d.ts +11 -0
- package/dist/types/lib/components/ZoomControls.d.ts +1 -0
- package/dist/types/lib/components/ui/animated-theme-toggler.d.ts +16 -0
- package/dist/types/lib/components/ui/badge.d.ts +7 -0
- package/dist/types/lib/components/ui/button.d.ts +8 -0
- package/dist/types/lib/components/ui/label.d.ts +3 -0
- package/dist/types/lib/components/ui/scroll-area.d.ts +5 -0
- package/dist/types/lib/components/ui/select.d.ts +15 -0
- package/dist/types/lib/components/ui/separator.d.ts +3 -0
- package/dist/types/lib/components/ui/slider.d.ts +3 -0
- package/dist/types/lib/components/ui/switch.d.ts +5 -0
- package/dist/types/lib/components/ui/tooltip.d.ts +6 -0
- package/dist/types/lib/integrate.d.ts +16 -0
- package/dist/types/lib/providers/ThemeToggle.d.ts +11 -0
- package/dist/types/lib/systems.d.ts +26 -0
- package/dist/types/lib/utils.d.ts +2 -0
- package/dist/types/main.d.ts +1 -0
- package/package.json +81 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";var Oa=Object.defineProperty;var Pa=(e,t,n)=>t in e?Oa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ce=(e,t,n)=>Pa(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ve=require("react"),Na=require("three"),_a=require("three-stdlib"),Aa=require("lucide-react"),Ia=require("react-dom");function zr(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 g=zr(ve),st=zr(Na),Xt=zr(Ia);var yn={exports:{}},sn={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Oo;function Ma(){if(Oo)return sn;Oo=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,s){var i=null;if(s!==void 0&&(i=""+s),o.key!==void 0&&(i=""+o.key),"key"in o){s={};for(var a in o)a!=="key"&&(s[a]=o[a])}else s=o;return o=s.ref,{$$typeof:e,type:r,key:i,ref:o!==void 0?o:null,props:s}}return sn.Fragment=t,sn.jsx=n,sn.jsxs=n,sn}var an={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Po;function ja(){return Po||(Po=1,process.env.NODE_ENV!=="production"&&(function(){function e(S){if(S==null)return null;if(typeof S=="function")return S.$$typeof===X?null:S.displayName||S.name||null;if(typeof S=="string")return S;switch(S){case x:return"Fragment";case v:return"Profiler";case w:return"StrictMode";case T:return"Suspense";case C:return"SuspenseList";case A:return"Activity"}if(typeof S=="object")switch(typeof S.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),S.$$typeof){case h:return"Portal";case y:return S.displayName||"Context";case k:return(S._context.displayName||"Context")+".Consumer";case N:var P=S.render;return S=S.displayName,S||(S=P.displayName||P.name||"",S=S!==""?"ForwardRef("+S+")":"ForwardRef"),S;case E:return P=S.displayName||null,P!==null?P:e(S.type)||"Memo";case O:P=S._payload,S=S._init;try{return e(S(P))}catch{}}return null}function t(S){return""+S}function n(S){try{t(S);var P=!1}catch{P=!0}if(P){P=console;var j=P.error,F=typeof Symbol=="function"&&Symbol.toStringTag&&S[Symbol.toStringTag]||S.constructor.name||"Object";return j.call(P,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",F),t(S)}}function r(S){if(S===x)return"<>";if(typeof S=="object"&&S!==null&&S.$$typeof===O)return"<...>";try{var P=e(S);return P?"<"+P+">":"<...>"}catch{return"<...>"}}function o(){var S=L.A;return S===null?null:S.getOwner()}function s(){return Error("react-stack-top-frame")}function i(S){if($.call(S,"key")){var P=Object.getOwnPropertyDescriptor(S,"key").get;if(P&&P.isReactWarning)return!1}return S.key!==void 0}function a(S,P){function j(){D||(D=!0,console.error("%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://react.dev/link/special-props)",P))}j.isReactWarning=!0,Object.defineProperty(S,"key",{get:j,configurable:!0})}function u(){var S=e(this.type);return _[S]||(_[S]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),S=this.props.ref,S!==void 0?S:null}function c(S,P,j,F,z,M){var H=j.ref;return S={$$typeof:d,type:S,key:P,props:j,_owner:F},(H!==void 0?H:null)!==null?Object.defineProperty(S,"ref",{enumerable:!1,get:u}):Object.defineProperty(S,"ref",{enumerable:!1,value:null}),S._store={},Object.defineProperty(S._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(S,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(S,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:z}),Object.defineProperty(S,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:M}),Object.freeze&&(Object.freeze(S.props),Object.freeze(S)),S}function l(S,P,j,F,z,M){var H=P.children;if(H!==void 0)if(F)if(W(H)){for(F=0;F<H.length;F++)m(H[F]);Object.freeze&&Object.freeze(H)}else console.error("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 m(H);if($.call(P,"key")){H=e(S);var Z=Object.keys(P).filter(function(le){return le!=="key"});F=0<Z.length?"{key: someKey, "+Z.join(": ..., ")+": ...}":"{key: someKey}",R[H+F]||(Z=0<Z.length?"{"+Z.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
|
+
let props = %s;
|
|
19
|
+
<%s {...props} />
|
|
20
|
+
React keys must be passed directly to JSX without using spread:
|
|
21
|
+
let props = %s;
|
|
22
|
+
<%s key={someKey} {...props} />`,F,H,Z,H),R[H+F]=!0)}if(H=null,j!==void 0&&(n(j),H=""+j),i(P)&&(n(P.key),H=""+P.key),"key"in P){j={};for(var q in P)q!=="key"&&(j[q]=P[q])}else j=P;return H&&a(j,typeof S=="function"?S.displayName||S.name||"Unknown":S),c(S,H,j,o(),z,M)}function m(S){p(S)?S._store&&(S._store.validated=1):typeof S=="object"&&S!==null&&S.$$typeof===O&&(S._payload.status==="fulfilled"?p(S._payload.value)&&S._payload.value._store&&(S._payload.value._store.validated=1):S._store&&(S._store.validated=1))}function p(S){return typeof S=="object"&&S!==null&&S.$$typeof===d}var f=ve,d=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),y=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),A=Symbol.for("react.activity"),X=Symbol.for("react.client.reference"),L=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=Object.prototype.hasOwnProperty,W=Array.isArray,I=console.createTask?console.createTask:function(){return null};f={react_stack_bottom_frame:function(S){return S()}};var D,_={},V=f.react_stack_bottom_frame.bind(f,s)(),B=I(r(s)),R={};an.Fragment=x,an.jsx=function(S,P,j){var F=1e4>L.recentlyCreatedOwnerStacks++;return l(S,P,j,!1,F?Error("react-stack-top-frame"):V,F?I(r(S)):B)},an.jsxs=function(S,P,j){var F=1e4>L.recentlyCreatedOwnerStacks++;return l(S,P,j,!0,F?Error("react-stack-top-frame"):V,F?I(r(S)):B)}})()),an}var No;function Da(){return No||(No=1,process.env.NODE_ENV==="production"?yn.exports=Ma():yn.exports=ja()),yn.exports}var b=Da();function Ds(e,t,n,r){const o=e(t,n),s=[o[0]*r,o[1]*r,o[2]*r],i=[t[0]+s[0]/2,t[1]+s[1]/2,t[2]+s[2]/2],a=e(i,n),u=[a[0]*r,a[1]*r,a[2]*r],c=[t[0]+u[0]/2,t[1]+u[1]/2,t[2]+u[2]/2],l=e(c,n),m=[l[0]*r,l[1]*r,l[2]*r],p=[t[0]+m[0],t[1]+m[1],t[2]+m[2]],f=e(p,n),d=[f[0]*r,f[1]*r,f[2]*r];return[t[0]+(s[0]+2*u[0]+2*m[0]+d[0])/6,t[1]+(s[1]+2*u[1]+2*m[1]+d[1])/6,t[2]+(s[2]+2*u[2]+2*m[2]+d[2])/6]}function La(e,t,n,r){const o=new Float32Array(t*3);let s=[...e.initCoord];const i=e.equation,a=r??e.params.defaults;for(let u=0;u<t;u++){s=Ds(i,s,a,n);const c=u*3;o[c]=s[0],o[c+1]=s[1],o[c+2]=s[2]}return o}function Va(e,t,n,r,o){const s=new Float32Array(n*3);let i=[...t];const a=e.equation,u=o??e.params.defaults;for(let c=0;c<n;c++){i=Ds(a,i,u,r);const l=c*3;s[l]=i[0],s[l+1]=i[1],s[l+2]=i[2]}return{data:s,lastState:i}}const xe={autoRotate:!0,colorSpeed:1,params:null,pointSize:1.5,speed:.5,stepsPerFrame:50,system:null},Fa=`
|
|
23
|
+
uniform float uScale;
|
|
24
|
+
attribute vec3 aColor;
|
|
25
|
+
attribute float aSize;
|
|
26
|
+
varying vec3 vColor;
|
|
27
|
+
void main() {
|
|
28
|
+
vColor = aColor;
|
|
29
|
+
vec4 mvPos = modelViewMatrix * vec4(position, 1.0);
|
|
30
|
+
gl_PointSize = aSize * (uScale * 1.5 / -mvPos.z);
|
|
31
|
+
gl_Position = projectionMatrix * mvPos;
|
|
32
|
+
}
|
|
33
|
+
`,za=`
|
|
34
|
+
varying vec3 vColor;
|
|
35
|
+
void main() {
|
|
36
|
+
float d = length(gl_PointCoord - vec2(0.5));
|
|
37
|
+
if (d > 0.5) discard;
|
|
38
|
+
float alpha = 1.0 - smoothstep(0.3, 0.5, d);
|
|
39
|
+
gl_FragColor = vec4(vColor, alpha * 0.85);
|
|
40
|
+
}
|
|
41
|
+
`;function Ls(e,t,n){let r,o,s;if(t===0)r=o=s=n;else{const i=(c,l,m)=>{const p=(m%1+1)%1;return p<.16666666666666666?c+(l-c)*6*p:p<.5?l:p<.6666666666666666?c+(l-c)*(.6666666666666666-p)*6:c},a=n+t-n*t,u=2*n-a;r=i(u,a,e+1/3),o=i(u,a,e),s=i(u,a,e-1/3)}return[r,o,s]}let We=null,un=null,Ct=null,dt=null,_o=null,Te=null,Ao=null,Fe=null,et=null,Wt=null,Tt=0,Cr=[0,0,0],Io=null,Vs=!1,Tr=null;const Jt=2e6;function Fs(e){const t=e.replace("#","");return parseInt(t.length===3?t[0]+t[0]+t[1]+t[1]+t[2]+t[2]:t,16)}function Ba(e,t,n){const r=e.clientWidth,o=e.clientHeight;We=new st.WebGLRenderer({alpha:!0,antialias:!0}),We.setPixelRatio(Math.min(window.devicePixelRatio,2)),We.setSize(r,o),We.setClearColor(t==="inherit"?0:Fs(t),1),e.appendChild(We.domElement),un=new st.Scene,Ct=new st.PerspectiveCamera(50,r/o,.1,2e3),dt=new _a.OrbitControls(Ct,We.domElement),dt.enableDamping=!0,dt.dampingFactor=.08,un.add(new st.AmbientLight(16777215,1)),Fe=new Float32Array(Jt*3),et=new Float32Array(Jt*3),Wt=new Float32Array(Jt),Te=new st.BufferGeometry,Te.setAttribute("position",new st.BufferAttribute(Fe,3)),Te.setAttribute("aColor",new st.BufferAttribute(et,3)),Te.setAttribute("aSize",new st.BufferAttribute(Wt,1)),Te.setDrawRange(0,0);const s={value:1};Tr=s,Ao=new st.ShaderMaterial({blending:st.AdditiveBlending,depthWrite:!1,fragmentShader:za,transparent:!0,uniforms:{uScale:s},vertexShader:Fa}),_o=new st.Points(Te,Ao),un.add(_o),Io=new ResizeObserver(()=>{const i=e.clientWidth,a=e.clientHeight;Ct.aspect=i/a,Ct.updateProjectionMatrix(),We.setSize(i,a)}),Io.observe(e),n==null||n({camera:Ct,renderer:We,scene:un})}function fr(){if(!Te||!Fe||!et||!Wt)return;const e=xe.system;if(!e)return;Fe.fill(0),et.fill(0),Wt.fill(xe.pointSize),Tt=0,Te.setDrawRange(0,0);const t=La(e,5e4,.005,xe.params),n=Math.min(t.length/3,Jt);for(let r=0;r<n;r++){Fe[r*3]=t[r*3],Fe[r*3+1]=t[r*3+1],Fe[r*3+2]=t[r*3+2];const o=r/n%1,[s,i,a]=Ls(o*xe.colorSpeed%1,.8,.55);et[r*3]=s,et[r*3+1]=i,et[r*3+2]=a}Te.setDrawRange(0,n),Te.attributes.position.needsUpdate=!0,Te.attributes.aColor.needsUpdate=!0,Tt=n,Cr=[Fe[(n-1)*3],Fe[(n-1)*3+1],Fe[(n-1)*3+2]]}function Mo(){var u,c,l,m,p,f,d,h,x,w,v,k;if(!Ct||!dt)return;const e=xe.system;if(!e||!e.limits)return;const t=((((u=e.limits.xlim)==null?void 0:u[0])??-10)+(((c=e.limits.xlim)==null?void 0:c[1])??10))/2,n=((((l=e.limits.ylim)==null?void 0:l[0])??-10)+(((m=e.limits.ylim)==null?void 0:m[1])??10))/2,r=((((p=e.limits.zlim)==null?void 0:p[0])??-10)+(((f=e.limits.zlim)==null?void 0:f[1])??10))/2,o=(((d=e.limits.xlim)==null?void 0:d[1])??20)-(((h=e.limits.xlim)==null?void 0:h[0])??-20),s=(((x=e.limits.ylim)==null?void 0:x[1])??20)-(((w=e.limits.ylim)==null?void 0:w[0])??-20),i=(((v=e.limits.zlim)==null?void 0:v[1])??20)-(((k=e.limits.zlim)==null?void 0:k[0])??-20),a=Math.max(o,s,i,1);Tr&&(Tr.value=a),Ct.position.set(t+a,n+a*.6,r+a),dt.target.set(t,n,r)}function zs(){if(!Vs)return;requestAnimationFrame(zs),dt==null||dt.update();const e=Math.min(Math.round(xe.stepsPerFrame*xe.speed),Jt-Tt);if(e>0&&xe.system&&xe.params){const{data:t,lastState:n}=Va(xe.system,Cr,e,.005,xe.params);Cr=n;for(let r=0;r<e;r++){const o=r*3,s=(Tt+r)*3;Fe[s]=t[o],Fe[s+1]=t[o+1],Fe[s+2]=t[o+2];const i=(Tt+r)/Jt%1,[a,u,c]=Ls(i*xe.colorSpeed%1,.85,.55);et[s]=a,et[s+1]=u,et[s+2]=c}Te.attributes.position.needsUpdate=!0,Te.attributes.aColor.needsUpdate=!0,Te.setDrawRange(0,Tt+e),Tt+=e}We==null||We.render(un,Ct)}function $a(){Vs=!0,zs()}function Ha({autoRotate:e,backgroundColor:t,colorSpeed:n,onSceneReady:r,params:o,pointSize:s,resetKey:i,speed:a,stepsPerFrame:u,system:c}){const l=ve.useRef(null);return ve.useEffect(()=>{const m=l.current;if(m)return We||Ba(m,t??"#000000",r),xe.params=o,xe.stepsPerFrame=u,xe.colorSpeed=n,xe.pointSize=s,xe.autoRotate=e,Tt===0&&(fr(),Mo()),$a(),()=>{}},[]),ve.useEffect(()=>{xe.system=c,xe.params=o,xe.stepsPerFrame=u,xe.colorSpeed=n,xe.pointSize=s,xe.speed=a,xe.autoRotate=e,dt&&(dt.autoRotate=e),Wt==null||Wt.fill(s),Te!=null&&Te.attributes.aSize&&(Te.attributes.aSize.needsUpdate=!0)},[c,o,u,n,s,a,e]),ve.useEffect(()=>{if(!We)return;const m=t??"#000000";We.setClearColor(m==="inherit"?0:Fs(m),1)},[t]),ve.useEffect(()=>{!Te||!Fe||!et||(fr(),Mo())},[c.id]),ve.useEffect(()=>{!Te||!Fe||!et||fr()},[i]),b.jsx("div",{ref:l,style:{height:"100%",width:"100%"}})}function Jn(){return typeof window<"u"}function Ye(e){return Br(e)?(e.nodeName||"").toLowerCase():"#document"}function Pe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Et(e){var t;return(t=(Br(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Br(e){return Jn()?e instanceof Node||e instanceof Pe(e).Node:!1}function te(e){return Jn()?e instanceof Element||e instanceof Pe(e).Element:!1}function Le(e){return Jn()?e instanceof HTMLElement||e instanceof Pe(e).HTMLElement:!1}function mn(e){return!Jn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pe(e).ShadowRoot}function Zn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ke(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Wa(e){return/^(table|td|th)$/.test(Ye(e))}function Qn(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Ya=/transform|translate|scale|rotate|perspective|filter/,Ua=/paint|layout|strict|content/,Bt=e=>!!e&&e!=="none";let mr;function $r(e){const t=te(e)?Ke(e):e;return Bt(t.transform)||Bt(t.translate)||Bt(t.scale)||Bt(t.rotate)||Bt(t.perspective)||!Hr()&&(Bt(t.backdropFilter)||Bt(t.filter))||Ya.test(t.willChange||"")||Ua.test(t.contain||"")}function Xa(e){let t=_t(e);for(;Le(t)&&!Pt(t);){if($r(t))return t;if(Qn(t))return null;t=_t(t)}return null}function Hr(){return mr==null&&(mr=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),mr}function Pt(e){return/^(html|body|#document)$/.test(Ye(e))}function Ke(e){return Pe(e).getComputedStyle(e)}function er(e){return te(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _t(e){if(Ye(e)==="html")return e;const t=e.assignedSlot||e.parentNode||mn(e)&&e.host||Et(e);return mn(t)?t.host:t}function Bs(e){const t=_t(e);return Pt(t)?(e.ownerDocument||e).body:Le(t)&&Zn(t)?t:Bs(t)}function pn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Bs(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Pe(o);if(s){const a=Or(i);return t.concat(i,i.visualViewport||[],Zn(o)?o:[],a&&n?pn(a):[])}else return t.concat(o,pn(o,[],n))}function Or(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const gt={...g},jo={};function mt(e,t){const n=g.useRef(jo);return n.current===jo&&(n.current=e(t)),n}const pr=gt.useInsertionEffect,Ga=pr&&pr!==gt.useLayoutEffect?pr:e=>e();function se(e){const t=mt(qa).current;return t.next=e,Ga(t.effect),t.trampoline}function qa(){const e={next:void 0,callback:Ka,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function Ka(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}let Pr;process.env.NODE_ENV!=="production"&&(Pr=new Set);function Vn(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");Pr.has(t)||(Pr.add(t),console.error(`Base UI: ${t}`))}}const Ja=()=>{},ee=typeof document<"u"?g.useLayoutEffect:Ja;function Nr(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const Wr={};function Yt(e,t,n,r,o){if(!n&&!r&&!e)return Fn(t);let s=Fn(e);return t&&(s=Mn(s,t)),n&&(s=Mn(s,n)),r&&(s=Mn(s,r)),s}function Za(e){if(e.length===0)return Wr;if(e.length===1)return Fn(e[0]);let t=Fn(e[0]);for(let n=1;n<e.length;n+=1)t=Mn(t,e[n]);return t}function Fn(e){return Yr(e)?{...Hs(e,Wr)}:Qa(e)}function Mn(e,t){return Yr(t)?Hs(t,e):ec(e,t)}function Qa(e){const t={...e};for(const n in t){const r=t[n];$s(n,r)&&(t[n]=Ws(r))}return t}function ec(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Nr(e.style,r);break}case"className":{e[n]=Ys(e.className,r);break}default:$s(n,r)?e[n]=tc(e[n],r):e[n]=r}}return e}function $s(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function Yr(e){return typeof e=="function"}function Hs(e,t){return Yr(e)?e(t):e??Wr}function tc(e,t){return t?e?(...n)=>{const r=n[0];if(Us(r)){const s=r;zn(s);const i=t(...n);return s.baseUIHandlerPrevented||e==null||e(...n),i}const o=t(...n);return e==null||e(...n),o}:Ws(t):e}function Ws(e){return e&&((...t)=>{const n=t[0];return Us(n)&&zn(n),e(...t)})}function zn(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Ys(e,t){return t?e?t+" "+e:t:e}function Us(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function nc(e,t){return function(r,...o){const s=new URL(e);return s.searchParams.set("code",r.toString()),o.forEach(i=>s.searchParams.append("args[]",i)),`${t} error #${r}; visit ${s} for the full message.`}}const at=nc("https://base-ui.com/production-error","Base UI"),Xs=g.createContext(void 0);process.env.NODE_ENV!=="production"&&(Xs.displayName="CompositeRootContext");function rc(e=!1){const t=g.useContext(Xs);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":at(16));return t}function oc(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:s}=e,i=r&&t!==!1,a=r&&t===!1;return{props:g.useMemo(()=>{const c={onKeyDown(l){n&&t&&l.key!=="Tab"&&l.preventDefault()}};return r||(c.tabIndex=o,!s&&n&&(c.tabIndex=t?o:-1)),(s&&(t||i)||!s&&n)&&(c["aria-disabled"]=n),s&&(!t||a)&&(c.disabled=n),c},[r,n,t,i,a,s,o])}}function Gs(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0,composite:s}=e,i=g.useRef(null),a=rc(!0),u=s??a!==void 0,{props:c}=oc({focusableWhenDisabled:n,disabled:t,composite:u,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&g.useEffect(()=>{var d,h;if(!i.current)return;const f=wn(i.current);if(o){if(!f){const x=((d=gt.captureOwnerStack)==null?void 0:d.call(gt))||"";Vn(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${x}`)}}else if(f){const x=((h=gt.captureOwnerStack)==null?void 0:h.call(gt))||"";Vn(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${x}`)}},[o]);const l=g.useCallback(()=>{const f=i.current;wn(f)&&u&&t&&c.disabled===void 0&&f.disabled&&(f.disabled=!1)},[t,c.disabled,u]);ee(l,[l]);const m=g.useCallback((f={})=>{const{onClick:d,onMouseDown:h,onKeyUp:x,onKeyDown:w,onPointerDown:v,...k}=f;return Yt({onClick(y){if(t){y.preventDefault();return}d==null||d(y)},onMouseDown(y){t||h==null||h(y)},onKeyDown(y){if(t||(zn(y),w==null||w(y),y.baseUIHandlerPrevented))return;const N=y.target===y.currentTarget,T=y.currentTarget,C=wn(T),E=!o&&sc(T),O=N&&(o?C:!E),A=y.key==="Enter",X=y.key===" ",L=T.getAttribute("role"),$=(L==null?void 0:L.startsWith("menuitem"))||L==="option"||L==="gridcell";if(N&&u&&X){if(y.defaultPrevented&&$)return;y.preventDefault(),E||o&&C?(T.click(),y.preventBaseUIHandler()):O&&(d==null||d(y),y.preventBaseUIHandler());return}O&&(!o&&(X||A)&&y.preventDefault(),!o&&A&&(d==null||d(y)))},onKeyUp(y){if(!t){if(zn(y),x==null||x(y),y.target===y.currentTarget&&o&&u&&wn(y.currentTarget)&&y.key===" "){y.preventDefault();return}y.baseUIHandlerPrevented||y.target===y.currentTarget&&!o&&!u&&y.key===" "&&(d==null||d(y))}},onPointerDown(y){if(t){y.preventDefault();return}v==null||v(y)}},o?{type:"button"}:{role:"button"},c,k)},[t,c,u,o]),p=se(f=>{i.current=f,l()});return{getButtonProps:m,buttonRef:p}}function wn(e){return Le(e)&&e.tagName==="BUTTON"}function sc(e){return!!((e==null?void 0:e.tagName)==="A"&&(e!=null&&e.href))}function _r(e,t,n,r){const o=mt(qs).current;return ac(o,e,t,n,r)&&Ks(o,[e,t,n,r]),o.callback}function ic(e){const t=mt(qs).current;return cc(t,e)&&Ks(t,e),t.callback}function qs(){return{callback:null,cleanup:null,refs:[]}}function ac(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function cc(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function Ks(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const i=s(n);typeof i=="function"&&(r[o]=i);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const i=r[o];typeof i=="function"?i():s(null);break}case"object":{s.current=null;break}}}}}}}const lc=parseInt(g.version,10);function Js(e){return lc>=e}function Do(e){if(!g.isValidElement(e))return null;const t=e,n=t.props;return(Js(19)?n==null?void 0:n.ref:t.ref)??null}let Ar;process.env.NODE_ENV!=="production"&&(Ar=new Set);function uc(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");Ar.has(t)||(Ar.add(t),console.warn(`Base UI: ${t}`))}}function je(){}const De=Object.freeze({});function dc(e,t){const n={};for(const r in e){const o=e[r];if(t!=null&&t.hasOwnProperty(r)){const s=t[r](o);s!=null&&Object.assign(n,s);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function fc(e,t){return typeof e=="function"?e(t):e}function mc(e,t){return typeof e=="function"?e(t):e}function Ue(e,t,n={}){const r=t.render,o=pc(t,n);if(n.enabled===!1)return null;const s=n.state??De;return vc(e,r,o,s)}function pc(e,t={}){const{className:n,style:r,render:o}=e,{state:s=De,ref:i,props:a,stateAttributesMapping:u,enabled:c=!0}=t,l=c?fc(n,s):void 0,m=c?mc(r,s):void 0,p=c?dc(s,u):De,f=c&&a?gc(a):void 0,d=c?Nr(p,f)??{}:De;return typeof document<"u"&&(c?Array.isArray(i)?d.ref=ic([d.ref,Do(o),...i]):d.ref=_r(d.ref,Do(o),i):_r(null,null)),c?(l!==void 0&&(d.className=Ys(d.className,l)),m!==void 0&&(d.style=Nr(d.style,m)),d):De}function gc(e){return Array.isArray(e)?Za(e):Yt(void 0,e)}const hc=Symbol.for("react.lazy"),bc=/^[A-Z][A-Za-z0-9$]*$/,xc=/[a-z]/;function vc(e,t,n,r){if(t){if(typeof t=="function")return process.env.NODE_ENV!=="production"&&yc(t),t(n,r);const o=Yt(n,t.props);o.ref=n.ref;let s=t;if((s==null?void 0:s.$$typeof)===hc&&(s=g.Children.toArray(t)[0]),process.env.NODE_ENV!=="production"&&!g.isValidElement(s))throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.","A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.","https://base-ui.com/r/invalid-render-prop"].join(`
|
|
42
|
+
`));return g.cloneElement(s,o)}if(e&&typeof e=="string")return wc(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":at(8))}function yc(e){const t=e.name;t.length!==0&&bc.test(t)&&xc.test(t)&&uc(`The \`render\` prop received a function named \`${t}\` that starts with an uppercase letter.`,"This usually means a React component was passed directly as `render={Component}`.","Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.","If this is an intentional render callback, rename it to start with a lowercase letter.","Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.","https://base-ui.com/r/invalid-render-prop")}function wc(e,t){return e==="button"?ve.createElement("button",{type:"button",...t,key:t.key}):e==="img"?ve.createElement("img",{alt:"",...t,key:t.key}):g.createElement(e,t)}const Zs=g.forwardRef(function(t,n){const{render:r,className:o,disabled:s=!1,focusableWhenDisabled:i=!1,nativeButton:a=!0,style:u,...c}=t,{getButtonProps:l,buttonRef:m}=Gs({disabled:s,focusableWhenDisabled:i,native:a});return Ue("button",t,{state:{disabled:s},ref:[n,m],props:[c,l]})});process.env.NODE_ENV!=="production"&&(Zs.displayName="Button");function Qs(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Qs(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ei(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Qs(e))&&(r&&(r+=" "),r+=t);return r}const Lo=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Vo=ei,Ec=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Vo(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(c=>{const l=n==null?void 0:n[c],m=s==null?void 0:s[c];if(l===null)return null;const p=Lo(l)||Lo(m);return o[c][p]}),a=n&&Object.entries(n).reduce((c,l)=>{let[m,p]=l;return p===void 0||(c[m]=p),c},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,l)=>{let{class:m,className:p,...f}=l;return Object.entries(f).every(d=>{let[h,x]=d;return Array.isArray(x)?x.includes({...s,...a}[h]):{...s,...a}[h]===x})?[...c,m,p]:c},[]);return Vo(e,i,u,n==null?void 0:n.class,n==null?void 0:n.className)},Sc=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Rc=(e,t)=>({classGroupId:e,validator:t}),ti=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Bn="-",Fo=[],kc="arbitrary..",Cc=e=>{const t=Oc(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Tc(i);const a=i.split(Bn),u=a[0]===""&&a.length>1?1:0;return ni(a,u,t)},getConflictingClassGroupIds:(i,a)=>{if(a){const u=r[i],c=n[i];return u?c?Sc(c,u):u:c||Fo}return n[i]||Fo}}},ni=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const c=ni(e,t+1,s);if(c)return c}const i=n.validators;if(i===null)return;const a=t===0?e.join(Bn):e.slice(t).join(Bn),u=i.length;for(let c=0;c<u;c++){const l=i[c];if(l.validator(a))return l.classGroupId}},Tc=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?kc+r:void 0})(),Oc=e=>{const{theme:t,classGroups:n}=e;return Pc(n,t)},Pc=(e,t)=>{const n=ti();for(const r in e){const o=e[r];Ur(o,n,r,t)}return n},Ur=(e,t,n,r)=>{const o=e.length;for(let s=0;s<o;s++){const i=e[s];Nc(i,t,n,r)}},Nc=(e,t,n,r)=>{if(typeof e=="string"){_c(e,t,n);return}if(typeof e=="function"){Ac(e,t,n,r);return}Ic(e,t,n,r)},_c=(e,t,n)=>{const r=e===""?t:ri(t,e);r.classGroupId=n},Ac=(e,t,n,r)=>{if(Mc(e)){Ur(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Rc(n,e))},Ic=(e,t,n,r)=>{const o=Object.entries(e),s=o.length;for(let i=0;i<s;i++){const[a,u]=o[i];Ur(u,ri(t,a),n,r)}},ri=(e,t)=>{let n=e;const r=t.split(Bn),o=r.length;for(let s=0;s<o;s++){const i=r[s];let a=n.nextPart.get(i);a||(a=ti(),n.nextPart.set(i,a)),n=a}return n},Mc=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,jc=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(s,i)=>{n[s]=i,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let i=n[s];if(i!==void 0)return i;if((i=r[s])!==void 0)return o(s,i),i},set(s,i){s in n?n[s]=i:o(s,i)}}},Ir="!",zo=":",Dc=[],Bo=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Lc=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,a=0,u=0,c;const l=o.length;for(let h=0;h<l;h++){const x=o[h];if(i===0&&a===0){if(x===zo){s.push(o.slice(u,h)),u=h+1;continue}if(x==="/"){c=h;continue}}x==="["?i++:x==="]"?i--:x==="("?a++:x===")"&&a--}const m=s.length===0?o:o.slice(u);let p=m,f=!1;m.endsWith(Ir)?(p=m.slice(0,-1),f=!0):m.startsWith(Ir)&&(p=m.slice(1),f=!0);const d=c&&c>u?c-u:void 0;return Bo(s,f,p,d)};if(t){const o=t+zo,s=r;r=i=>i.startsWith(o)?s(i.slice(o.length)):Bo(Dc,!1,i,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},Vc=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let s=0;s<n.length;s++){const i=n[s],a=i[0]==="[",u=t.has(i);a||u?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(i)):o.push(i)}return o.length>0&&(o.sort(),r.push(...o)),r}},Fc=e=>({cache:jc(e.cacheSize),parseClassName:Lc(e),sortModifiers:Vc(e),postfixLookupClassGroupIds:zc(e),...Cc(e)}),zc=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},Bc=/\s+/,$c=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s,postfixLookupClassGroupIds:i}=t,a=[],u=e.trim().split(Bc);let c="";for(let l=u.length-1;l>=0;l-=1){const m=u[l],{isExternal:p,modifiers:f,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:x}=n(m);if(p){c=m+(c.length>0?" "+c:c);continue}let w=!!x,v;if(w){const C=h.substring(0,x);v=r(C);const E=v&&i[v]?r(h):void 0;E&&E!==v&&(v=E,w=!1)}else v=r(h);if(!v){if(!w){c=m+(c.length>0?" "+c:c);continue}if(v=r(h),!v){c=m+(c.length>0?" "+c:c);continue}w=!1}const k=f.length===0?"":f.length===1?f[0]:s(f).join(":"),y=d?k+Ir:k,N=y+v;if(a.indexOf(N)>-1)continue;a.push(N);const T=o(v,w);for(let C=0;C<T.length;++C){const E=T[C];a.push(y+E)}c=m+(c.length>0?" "+c:c)}return c},Hc=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=oi(n))&&(o&&(o+=" "),o+=r);return o},oi=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=oi(e[r]))&&(n&&(n+=" "),n+=t);return n},Wc=(e,...t)=>{let n,r,o,s;const i=u=>{const c=t.reduce((l,m)=>m(l),e());return n=Fc(c),r=n.cache.get,o=n.cache.set,s=a,a(u)},a=u=>{const c=r(u);if(c)return c;const l=$c(u,n);return o(u,l),l};return s=i,(...u)=>s(Hc(...u))},Yc=[],Oe=e=>{const t=n=>n[e]||Yc;return t.isThemeGetter=!0,t},si=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ii=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Uc=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Xc=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Gc=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,qc=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Kc=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Jc=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Rt=e=>Uc.test(e),ne=e=>!!e&&!Number.isNaN(Number(e)),lt=e=>!!e&&Number.isInteger(Number(e)),gr=e=>e.endsWith("%")&&ne(e.slice(0,-1)),pt=e=>Xc.test(e),ai=()=>!0,Zc=e=>Gc.test(e)&&!qc.test(e),Xr=()=>!1,Qc=e=>Kc.test(e),el=e=>Jc.test(e),tl=e=>!U(e)&&!G(e),nl=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),rl=e=>At(e,ui,Xr),U=e=>si.test(e),$t=e=>At(e,di,Zc),$o=e=>At(e,dl,ne),ol=e=>At(e,mi,ai),sl=e=>At(e,fi,Xr),Ho=e=>At(e,ci,Xr),il=e=>At(e,li,el),En=e=>At(e,pi,Qc),G=e=>ii.test(e),cn=e=>Gt(e,di),al=e=>Gt(e,fi),Wo=e=>Gt(e,ci),cl=e=>Gt(e,ui),ll=e=>Gt(e,li),Sn=e=>Gt(e,pi,!0),ul=e=>Gt(e,mi,!0),At=(e,t,n)=>{const r=si.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Gt=(e,t,n=!1)=>{const r=ii.exec(e);return r?r[1]?t(r[1]):n:!1},ci=e=>e==="position"||e==="percentage",li=e=>e==="image"||e==="url",ui=e=>e==="length"||e==="size"||e==="bg-size",di=e=>e==="length",dl=e=>e==="number",fi=e=>e==="family-name",mi=e=>e==="number"||e==="weight",pi=e=>e==="shadow",fl=()=>{const e=Oe("color"),t=Oe("font"),n=Oe("text"),r=Oe("font-weight"),o=Oe("tracking"),s=Oe("leading"),i=Oe("breakpoint"),a=Oe("container"),u=Oe("spacing"),c=Oe("radius"),l=Oe("shadow"),m=Oe("inset-shadow"),p=Oe("text-shadow"),f=Oe("drop-shadow"),d=Oe("blur"),h=Oe("perspective"),x=Oe("aspect"),w=Oe("ease"),v=Oe("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...y(),G,U],T=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto","contain","none"],E=()=>[G,U,u],O=()=>[Rt,"full","auto",...E()],A=()=>[lt,"none","subgrid",G,U],X=()=>["auto",{span:["full",lt,G,U]},lt,G,U],L=()=>[lt,"auto",G,U],$=()=>["auto","min","max","fr",G,U],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],I=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...E()],_=()=>[Rt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],V=()=>[Rt,"screen","full","dvw","lvw","svw","min","max","fit",...E()],B=()=>[Rt,"screen","full","lh","dvh","lvh","svh","min","max","fit",...E()],R=()=>[e,G,U],S=()=>[...y(),Wo,Ho,{position:[G,U]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],j=()=>["auto","cover","contain",cl,rl,{size:[G,U]}],F=()=>[gr,cn,$t],z=()=>["","none","full",c,G,U],M=()=>["",ne,cn,$t],H=()=>["solid","dashed","dotted","double"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>[ne,gr,Wo,Ho],le=()=>["","none",d,G,U],re=()=>["none",ne,G,U],Q=()=>["none",ne,G,U],ie=()=>[ne,G,U],K=()=>[Rt,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[pt],breakpoint:[pt],color:[ai],container:[pt],"drop-shadow":[pt],ease:["in","out","in-out"],font:[tl],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[pt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[pt],shadow:[pt],spacing:["px",ne],text:[pt],"text-shadow":[pt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Rt,U,G,x]}],container:["container"],"container-type":[{"@container":["","normal","size",G,U]}],"container-named":[nl],columns:[{columns:[ne,U,G,a]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:N()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:O()}],"inset-x":[{"inset-x":O()}],"inset-y":[{"inset-y":O()}],start:[{"inset-s":O(),start:O()}],end:[{"inset-e":O(),end:O()}],"inset-bs":[{"inset-bs":O()}],"inset-be":[{"inset-be":O()}],top:[{top:O()}],right:[{right:O()}],bottom:[{bottom:O()}],left:[{left:O()}],visibility:["visible","invisible","collapse"],z:[{z:[lt,"auto",G,U]}],basis:[{basis:[Rt,"full","auto",a,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ne,Rt,"auto","initial","none",U]}],grow:[{grow:["",ne,G,U]}],shrink:[{shrink:["",ne,G,U]}],order:[{order:[lt,"first","last","none",G,U]}],"grid-cols":[{"grid-cols":A()}],"col-start-end":[{col:X()}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":A()}],"row-start-end":[{row:X()}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$()}],"auto-rows":[{"auto-rows":$()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...I(),"normal"]}],"justify-self":[{"justify-self":["auto",...I()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...I(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...I(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...I(),"baseline"]}],"place-self":[{"place-self":["auto",...I()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pbs:[{pbs:E()}],pbe:[{pbe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mbs:[{mbs:D()}],mbe:[{mbe:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:_()}],"inline-size":[{inline:["auto",...V()]}],"min-inline-size":[{"min-inline":["auto",...V()]}],"max-inline-size":[{"max-inline":["none",...V()]}],"block-size":[{block:["auto",...B()]}],"min-block-size":[{"min-block":["auto",...B()]}],"max-block-size":[{"max-block":["none",...B()]}],w:[{w:[a,"screen",..._()]}],"min-w":[{"min-w":[a,"screen","none",..._()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},..._()]}],h:[{h:["screen","lh",..._()]}],"min-h":[{"min-h":["screen","lh","none",..._()]}],"max-h":[{"max-h":["screen","lh",..._()]}],"font-size":[{text:["base",n,cn,$t]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ul,ol]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",gr,U]}],"font-family":[{font:[al,sl,t]}],"font-features":[{"font-features":[U]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,G,U]}],"line-clamp":[{"line-clamp":[ne,"none",G,$o]}],leading:[{leading:[s,...E()]}],"list-image":[{"list-image":["none",G,U]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",G,U]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:[ne,"from-font","auto",G,$t]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[ne,"auto",G,U]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"tab-size":[{tab:[lt,G,U]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",G,U]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",G,U]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:S()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:j()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},lt,G,U],radial:["",G,U],conic:[lt,G,U]},ll,il]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:z()}],"rounded-s":[{"rounded-s":z()}],"rounded-e":[{"rounded-e":z()}],"rounded-t":[{"rounded-t":z()}],"rounded-r":[{"rounded-r":z()}],"rounded-b":[{"rounded-b":z()}],"rounded-l":[{"rounded-l":z()}],"rounded-ss":[{"rounded-ss":z()}],"rounded-se":[{"rounded-se":z()}],"rounded-ee":[{"rounded-ee":z()}],"rounded-es":[{"rounded-es":z()}],"rounded-tl":[{"rounded-tl":z()}],"rounded-tr":[{"rounded-tr":z()}],"rounded-br":[{"rounded-br":z()}],"rounded-bl":[{"rounded-bl":z()}],"border-w":[{border:M()}],"border-w-x":[{"border-x":M()}],"border-w-y":[{"border-y":M()}],"border-w-s":[{"border-s":M()}],"border-w-e":[{"border-e":M()}],"border-w-bs":[{"border-bs":M()}],"border-w-be":[{"border-be":M()}],"border-w-t":[{"border-t":M()}],"border-w-r":[{"border-r":M()}],"border-w-b":[{"border-b":M()}],"border-w-l":[{"border-l":M()}],"divide-x":[{"divide-x":M()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":M()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...H(),"hidden","none"]}],"divide-style":[{divide:[...H(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-bs":[{"border-bs":R()}],"border-color-be":[{"border-be":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...H(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ne,G,U]}],"outline-w":[{outline:["",ne,cn,$t]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",l,Sn,En]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",m,Sn,En]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:M()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[ne,$t]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":M()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",p,Sn,En]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[ne,G,U]}],"mix-blend":[{"mix-blend":[...Z(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Z()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[G,U]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":y()}],"mask-image-conic-pos":[{"mask-conic":[ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:S()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:j()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",G,U]}],filter:[{filter:["","none",G,U]}],blur:[{blur:le()}],brightness:[{brightness:[ne,G,U]}],contrast:[{contrast:[ne,G,U]}],"drop-shadow":[{"drop-shadow":["","none",f,Sn,En]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",ne,G,U]}],"hue-rotate":[{"hue-rotate":[ne,G,U]}],invert:[{invert:["",ne,G,U]}],saturate:[{saturate:[ne,G,U]}],sepia:[{sepia:["",ne,G,U]}],"backdrop-filter":[{"backdrop-filter":["","none",G,U]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[ne,G,U]}],"backdrop-contrast":[{"backdrop-contrast":[ne,G,U]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ne,G,U]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ne,G,U]}],"backdrop-invert":[{"backdrop-invert":["",ne,G,U]}],"backdrop-opacity":[{"backdrop-opacity":[ne,G,U]}],"backdrop-saturate":[{"backdrop-saturate":[ne,G,U]}],"backdrop-sepia":[{"backdrop-sepia":["",ne,G,U]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",G,U]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ne,"initial",G,U]}],ease:[{ease:["linear","initial",w,G,U]}],delay:[{delay:[ne,G,U]}],animate:[{animate:["none",v,G,U]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,G,U]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:re()}],"rotate-x":[{"rotate-x":re()}],"rotate-y":[{"rotate-y":re()}],"rotate-z":[{"rotate-z":re()}],scale:[{scale:Q()}],"scale-x":[{"scale-x":Q()}],"scale-y":[{"scale-y":Q()}],"scale-z":[{"scale-z":Q()}],"scale-3d":["scale-3d"],skew:[{skew:ie()}],"skew-x":[{"skew-x":ie()}],"skew-y":[{"skew-y":ie()}],transform:[{transform:[G,U,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:K()}],"translate-x":[{"translate-x":K()}],"translate-y":[{"translate-y":K()}],"translate-z":[{"translate-z":K()}],"translate-none":["translate-none"],zoom:[{zoom:[lt,G,U]}],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",G,U]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":R()}],"scrollbar-track-color":[{"scrollbar-track":R()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mbs":[{"scroll-mbs":E()}],"scroll-mbe":[{"scroll-mbe":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pbs":[{"scroll-pbs":E()}],"scroll-pbe":[{"scroll-pbe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",G,U]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[ne,cn,$t,$o]}],stroke:[{stroke:["none",...R()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},ml=Wc(fl);function nn(...e){return ml(ei(e))}const pl=Ec("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{defaultVariants:{size:"default",variant:"default"},variants:{size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-lg":"size-9","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3"},variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground"}}});function Ht({className:e,size:t="default",variant:n="default",...r}){return b.jsx(Zs,{className:nn(pl({className:e,size:t,variant:n})),"data-slot":"button",...r})}const gl=[];function Gr(e){g.useEffect(e,gl)}const ln=0;class yt{constructor(){Ce(this,"currentId",ln);Ce(this,"clear",()=>{this.currentId!==ln&&(clearTimeout(this.currentId),this.currentId=ln)});Ce(this,"disposeEffect",()=>this.clear)}static create(){return new yt}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=ln,n()},t)}isStarted(){return this.currentId!==ln}}function ft(){const e=mt(yt.create).current;return Gr(e.disposeEffect),e}const qr=g.createContext(void 0);process.env.NODE_ENV!=="production"&&(qr.displayName="ScrollAreaRootContext");function tr(){const e=g.useContext(qr);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ScrollAreaRootContext is missing. ScrollArea parts must be placed within <ScrollArea.Root>.":at(53));return e}let $n=(function(e){return e.scrollAreaCornerHeight="--scroll-area-corner-height",e.scrollAreaCornerWidth="--scroll-area-corner-width",e})({});const Rn=500,Yo=16;function tt(e,t,n){if(!e)return 0;const r=getComputedStyle(e),o=n==="x"?"Inline":"Block";return n==="x"&&t==="margin"?parseFloat(r[`${t}InlineStart`])*2:parseFloat(r[`${t}${o}Start`])+parseFloat(r[`${t}${o}End`])}let hl=(function(e){return e.orientation="data-orientation",e.hovering="data-hovering",e.scrolling="data-scrolling",e.hasOverflowX="data-has-overflow-x",e.hasOverflowY="data-has-overflow-y",e.overflowXStart="data-overflow-x-start",e.overflowXEnd="data-overflow-x-end",e.overflowYStart="data-overflow-y-start",e.overflowYEnd="data-overflow-y-end",e})({});const kn="base-ui-disable-scrollbar",Kr={className:kn,getElement(e){return b.jsx("style",{nonce:e,href:kn,precedence:"base-ui:low",children:`.${kn}{scrollbar-width:none}.${kn}::-webkit-scrollbar{display:none}`})}};process.env.NODE_ENV!=="production"&&(Kr.getElement.displayName="styleDisableScrollbar.getElement");let Uo=0;function bl(e,t="mui"){const[n,r]=g.useState(e),o=e||n;return g.useEffect(()=>{n==null&&(Uo+=1,r(`${t}-${Uo}`))},[n,t]),o}const Xo=gt.useId;function nr(e,t){if(Xo!==void 0){const n=Xo();return e??(t?`${t}-${n}`:n)}return bl(e,t)}function xn(e){return nr(e,"base-ui")}let qt=(function(e){return e.scrolling="data-scrolling",e.hasOverflowX="data-has-overflow-x",e.hasOverflowY="data-has-overflow-y",e.overflowXStart="data-overflow-x-start",e.overflowXEnd="data-overflow-x-end",e.overflowYStart="data-overflow-y-start",e.overflowYEnd="data-overflow-y-end",e})({});const Jr={hasOverflowX:e=>e?{[qt.hasOverflowX]:""}:null,hasOverflowY:e=>e?{[qt.hasOverflowY]:""}:null,overflowXStart:e=>e?{[qt.overflowXStart]:""}:null,overflowXEnd:e=>e?{[qt.overflowXEnd]:""}:null,overflowYStart:e=>e?{[qt.overflowYStart]:""}:null,overflowYEnd:e=>e?{[qt.overflowYEnd]:""}:null,cornerHidden:()=>null};function xl(){if(typeof navigator>"u")return{userAgent:"",platform:"",maxTouchPoints:0};if(process.env.NODE_ENV!=="production"){const e=navigator.userAgentData;if(e&&Array.isArray(e.brands))return{userAgent:e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "),platform:e.platform??navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}return{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:vl,platform:yl,maxTouchPoints:wl}=xl(),rr=vl.toLowerCase(),gn=yl.toLowerCase(),gi=/^i(os$|p)/.test(gn)||gn==="macintel"&&wl>1,Go="android";gn===Go||rr.includes(Go);const hi=!gi&&gn.startsWith("mac");gn.startsWith("win");const El=hi||gi;var js;const rn=typeof CSS<"u"&&!!((js=CSS.supports)!=null&&js.call(CSS,"-webkit-backdrop-filter:none"));!rn&&rr.includes("firefox");!rn&&rr.includes("chrom");const Sl=El,Rl=/jsdom|happydom/.test(rr),kl="data-base-ui-focusable",bi="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Mr(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function he(e,t){var r;if(!e||!t)return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e.contains(t))return!0;if(n&&mn(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function bt(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Hn(e,t){if(!te(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of t.entries())if(he(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function hr(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Cl(e){return e.matches("html,body")}function Tl(e){return Le(e)&&e.matches(bi)}function Ol(e){return(e==null?void 0:e.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${bi}`))!=null}function Pl(e){if(!e||Rl)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Qt(e,t,n=!0){return e.filter(o=>o.parentId===t).flatMap(o=>{var s;return[...!n||(s=o.context)!=null&&s.open?[o]:[],...Qt(e,o.id,n)]})}function Nl(e){return"nativeEvent"in e}function hn(e,t){const n=["mouse","pen"];return n.push("",void 0),n.includes(e)}function _l(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const Al=["top","right","bottom","left"],en=Math.min,xt=Math.max,Wn=Math.round,Cn=Math.floor,vt=e=>({x:e,y:e}),Il={left:"right",right:"left",bottom:"top",top:"bottom"};function xi(e,t,n){return xt(e,en(t,n))}function wt(e,t){return typeof e=="function"?e(t):e}function qe(e){return e.split("-")[0]}function It(e){return e.split("-")[1]}function Zr(e){return e==="x"?"y":"x"}function Qr(e){return e==="y"?"height":"width"}function nt(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function eo(e){return Zr(nt(e))}function Ml(e,t,n){n===void 0&&(n=!1);const r=It(e),o=eo(e),s=Qr(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Yn(i)),[i,Yn(i)]}function jl(e){const t=Yn(e);return[jr(e),t,jr(t)]}function jr(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const qo=["left","right"],Ko=["right","left"],Dl=["top","bottom"],Ll=["bottom","top"];function Vl(e,t,n){switch(e){case"top":case"bottom":return n?t?Ko:qo:t?qo:Ko;case"left":case"right":return t?Dl:Ll;default:return[]}}function Fl(e,t,n,r){const o=It(e);let s=Vl(qe(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(jr)))),s}function Yn(e){const t=qe(e);return Il[t]+e.slice(t.length)}function zl(e){var t,n,r,o;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(o=e.left)!=null?o:0}}function vi(e){return typeof e!="number"?zl(e):{top:e,right:e,bottom:e,left:e}}function Un(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}}function Bl(e){return e.visibility==="hidden"||e.visibility==="collapse"}function $l(e,t=e?Ke(e):null){return!e||!e.isConnected||!t||Bl(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}function Je(e){return(e==null?void 0:e.ownerDocument)||document}const Hl='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function Wl(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const n=e.getRootNode();return mn(n)?n.host:null}function Dr(e){for(const t of Array.from(e.children))if(Ye(t)==="summary")return t;return null}function Yl(e,t){const n=Dr(t);return!!n&&(e===n||he(n,e))}function yi(e){const t=e?Ye(e):"";return e!=null&&e.matches(Hl)&&(t!=="summary"||e.parentElement!=null&&Ye(e.parentElement)==="details"&&Dr(e.parentElement)===e)&&(t!=="details"||Dr(e)==null)&&(t!=="input"||e.type!=="hidden")}function Ul(e){if(!yi(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=Wl(t)){const n=t!==e,r=Ye(t)==="slot";if(t.hasAttribute("inert")||n&&Ye(t)==="details"&&!t.open&&!Yl(e,t)||t.hasAttribute("hidden")||!r&&!Xl(t,n))return!1}return!0}function Xl(e,t){const n=Ke(e);return t?n.display!=="none":$l(e,n)}function Gl(e){const t=e.tabIndex;if(t<0){const n=Ye(e);if(n==="details"||n==="audio"||n==="video"||Le(e)&&e.isContentEditable)return 0}return t}function br(e){if(Ye(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function ql(e,t){const n=br(e);if(!n)return!0;const r=t.find(o=>{const s=br(o);return(s==null?void 0:s.name)===n.name&&s.form===n.form&&s.checked});return r?r===n:t.find(o=>{const s=br(o);return(s==null?void 0:s.name)===n.name&&s.form===n.form})===n}function wi(e){if(Le(e)&&Ye(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Le(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Ei(e,t){wi(e).forEach(n=>{yi(n)&&t.push(n),Ei(n,t)})}function Si(e,t,n){wi(e).forEach(r=>{Le(r)&&r.matches(t)&&n.push(r),Si(r,t,n)})}function Kl(e){const t=[];return Ei(e,t),t.filter(Ul)}function Ri(e){const t=Kl(e);return t.filter(n=>Gl(n)>=0&&ql(n,t))}function ki(e,t){const n=Ri(e),r=n.length;if(r===0)return;const o=Mr(Je(e)),s=n.indexOf(o),i=s===-1?t===1?0:r-1:s+t;return n[i]}function Jl(e){return ki(Je(e).body,1)||e}function Zl(e){return ki(Je(e).body,-1)||e}function xr(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!he(n,r)}function Ql(e){Ri(e).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Jo(e){const t=[];Si(e,"[data-tabindex]",t),t.forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const Ci=g.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ci.displayName="CSPContext");const eu={disableStyleElements:!1};function tu(){return g.useContext(Ci)??eu}const nu={x:0,y:0},Zo={width:0,height:0},ru={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},ou={x:!0,y:!0,corner:!0},Ti=g.forwardRef(function(t,n){const{render:r,className:o,overflowEdgeThreshold:s,style:i,...a}=t,{xStart:u,xEnd:c,yStart:l,yEnd:m}=su(s),p=xn(),f=ft(),d=ft(),{nonce:h,disableStyleElements:x}=tu(),[w,v]=g.useState(!1),[k,y]=g.useState(!1),[N,T]=g.useState(!1),[C,E]=g.useState(!1),[O,A]=g.useState(!1),[X,L]=g.useState(Zo),[$,W]=g.useState(Zo),[I,D]=g.useState(ru),[_,V]=g.useState(ou),B=g.useRef(null),R=g.useRef(null),S=g.useRef(null),P=g.useRef(null),j=g.useRef(null),F=g.useRef(null),z=g.useRef(null),M=g.useRef(!1),H=g.useRef(0),Z=g.useRef(0),q=g.useRef(0),le=g.useRef(0),re=g.useRef("vertical"),Q=g.useRef(nu),ie=se(oe=>{const Y=oe.x-Q.current.x,J=oe.y-Q.current.y;Q.current=oe,J!==0&&(T(!0),f.start(Rn,()=>{T(!1)})),Y!==0&&(y(!0),d.start(Rn,()=>{y(!1)}))}),K=se(oe=>{oe.button===0&&(M.current=!0,H.current=oe.clientY,Z.current=oe.clientX,re.current=oe.currentTarget.getAttribute(hl.orientation),R.current&&(q.current=R.current.scrollTop,le.current=R.current.scrollLeft),j.current&&re.current==="vertical"&&j.current.setPointerCapture(oe.pointerId),F.current&&re.current==="horizontal"&&F.current.setPointerCapture(oe.pointerId))}),we=se(oe=>{if(!M.current)return;const Y=oe.clientY-H.current,J=oe.clientX-Z.current;if(R.current){const pe=R.current.scrollHeight,Re=R.current.clientHeight,ze=R.current.scrollWidth,Ze=R.current.clientWidth;if(j.current&&S.current&&re.current==="vertical"){const _e=tt(S.current,"padding","y"),ke=tt(j.current,"margin","y"),Ve=j.current.offsetHeight,Be=S.current.offsetHeight-Ve-_e-ke,ct=Y/Be;R.current.scrollTop=q.current+ct*(pe-Re),oe.preventDefault(),T(!0),f.start(Rn,()=>{T(!1)})}if(F.current&&P.current&&re.current==="horizontal"){const _e=tt(P.current,"padding","x"),ke=tt(F.current,"margin","x"),Ve=F.current.offsetWidth,Be=P.current.offsetWidth-Ve-_e-ke,ct=J/Be;R.current.scrollLeft=le.current+ct*(ze-Ze),oe.preventDefault(),y(!0),d.start(Rn,()=>{y(!1)})}}}),be=se(oe=>{M.current=!1,j.current&&re.current==="vertical"&&j.current.hasPointerCapture(oe.pointerId)&&j.current.releasePointerCapture(oe.pointerId),F.current&&re.current==="horizontal"&&F.current.hasPointerCapture(oe.pointerId)&&F.current.releasePointerCapture(oe.pointerId)});function Ee(oe){E(oe.pointerType==="touch")}function Se(oe){if(Ee(oe),oe.pointerType!=="touch"){const Y=he(B.current,oe.target);v(Y)}}const Ie=g.useMemo(()=>({scrolling:k||N,hasOverflowX:!_.x,hasOverflowY:!_.y,overflowXStart:I.xStart,overflowXEnd:I.xEnd,overflowYStart:I.yStart,overflowYEnd:I.yEnd,cornerHidden:_.corner}),[k,N,_.x,_.y,_.corner,I]),St={role:"presentation",onPointerEnter:Se,onPointerMove:Se,onPointerDown:Ee,onPointerLeave(){v(!1)},style:{position:"relative",[$n.scrollAreaCornerHeight]:`${X.height}px`,[$n.scrollAreaCornerWidth]:`${X.width}px`}},rt=Ue("div",t,{state:Ie,ref:[n,B],props:[St,a],stateAttributesMapping:Jr}),ge=g.useMemo(()=>({handlePointerDown:K,handlePointerMove:we,handlePointerUp:be,handleScroll:ie,cornerSize:X,setCornerSize:L,thumbSize:$,setThumbSize:W,hasMeasuredScrollbar:O,setHasMeasuredScrollbar:A,touchModality:C,cornerRef:z,scrollingX:k,setScrollingX:y,scrollingY:N,setScrollingY:T,hovering:w,setHovering:v,viewportRef:R,rootRef:B,scrollbarYRef:S,scrollbarXRef:P,thumbYRef:j,thumbXRef:F,rootId:p,hiddenState:_,setHiddenState:V,overflowEdges:I,setOverflowEdges:D,viewportState:Ie,overflowEdgeThreshold:{xStart:u,xEnd:c,yStart:l,yEnd:m}}),[K,we,be,ie,X,$,O,C,k,y,N,T,w,v,p,_,I,Ie,u,c,l,m]);return b.jsxs(qr.Provider,{value:ge,children:[!x&&Kr.getElement(h),rt]})});process.env.NODE_ENV!=="production"&&(Ti.displayName="ScrollAreaRoot");function su(e){if(typeof e=="number"){const t=Math.max(0,e);return{xStart:t,xEnd:t,yStart:t,yEnd:t}}return{xStart:Math.max(0,(e==null?void 0:e.xStart)||0),xEnd:Math.max(0,(e==null?void 0:e.xEnd)||0),yStart:Math.max(0,(e==null?void 0:e.yStart)||0),yEnd:Math.max(0,(e==null?void 0:e.yEnd)||0)}}const Oi=g.createContext(void 0);process.env.NODE_ENV!=="production"&&(Oi.displayName="ScrollAreaViewportContext");const Pi=g.createContext(void 0);process.env.NODE_ENV!=="production"&&(Pi.displayName="DirectionContext");function to(){const e=g.useContext(Pi);return(e==null?void 0:e.direction)??"ltr"}function Kt(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}let Ot=(function(e){return e.scrollAreaOverflowXStart="--scroll-area-overflow-x-start",e.scrollAreaOverflowXEnd="--scroll-area-overflow-x-end",e.scrollAreaOverflowYStart="--scroll-area-overflow-y-start",e.scrollAreaOverflowYEnd="--scroll-area-overflow-y-end",e})({});const Qo=1;function es(e,t){if(t<=0)return 0;const n=Kt(e,0,t),r=n,o=t-n,s=r<=Qo,i=o<=Qo;return s&&i?r<=o?0:t:s?0:i?t:n}let ts=!1;function iu(){ts||rn||(typeof CSS<"u"&&"registerProperty"in CSS&&[Ot.scrollAreaOverflowXStart,Ot.scrollAreaOverflowXEnd,Ot.scrollAreaOverflowYStart,Ot.scrollAreaOverflowYEnd].forEach(e=>{try{CSS.registerProperty({name:e,syntax:"<length>",inherits:!1,initialValue:"0px"})}catch{}}),ts=!0)}const Ni=g.forwardRef(function(t,n){const{render:r,className:o,style:s,...i}=t,{viewportRef:a,scrollbarYRef:u,scrollbarXRef:c,thumbYRef:l,thumbXRef:m,cornerRef:p,cornerSize:f,setCornerSize:d,setThumbSize:h,rootId:x,setHiddenState:w,hiddenState:v,setHasMeasuredScrollbar:k,handleScroll:y,setHovering:N,setOverflowEdges:T,overflowEdges:C,overflowEdgeThreshold:E,scrollingX:O,scrollingY:A}=tr(),X=to(),L=g.useRef(!0),$=g.useRef([NaN,NaN,NaN,NaN]),W=ft(),I=ft(),D=se(()=>{const P=a.current,j=u.current,F=c.current,z=l.current,M=m.current,H=p.current;if(!P)return;const Z=P.scrollHeight,q=P.scrollWidth,le=P.clientHeight,re=P.clientWidth,Q=P.scrollTop,ie=P.scrollLeft,K=$.current,we=Number.isNaN(K[0]);if(K[0]=le,K[1]=Z,K[2]=re,K[3]=q,we&&k(!0),Z===0||q===0)return;const be=au(P),Ee=be.y,Se=be.x,Ie=re/q,St=le/Z,rt=Math.max(0,q-re),ge=Math.max(0,Z-le);let oe=0,Y=0;if(!Se){let ae=0;X==="rtl"?ae=Kt(-ie,0,rt):ae=Kt(ie,0,rt),oe=es(ae,rt),Y=rt-oe}const J=Ee?0:Kt(Q,0,ge),pe=Ee?0:es(J,ge),Re=Ee?0:ge-pe,ze=Se?0:re,Ze=Ee?0:le;let _e=0,ke=0;!Se&&!Ee&&(_e=(j==null?void 0:j.offsetWidth)||0,ke=(F==null?void 0:F.offsetHeight)||0);const Ve=f.width===0&&f.height===0,Be=Ve?_e:0,ct=Ve?ke:0,Mt=tt(F,"padding","x"),jt=tt(j,"padding","y"),Dt=tt(M,"margin","x"),Lt=tt(z,"margin","y"),Vt=ze-Mt-Dt,Ft=Ze-jt-Lt,ue=F?Math.min(F.offsetWidth-Be,Vt):Vt,Ne=j?Math.min(j.offsetHeight-ct,Ft):Ft,$e=Math.max(Yo,ue*Ie),Me=Math.max(Yo,Ne*St);if(h(ae=>ae.height===Me&&ae.width===$e?ae:{width:$e,height:Me}),j&&z){const ae=j.offsetHeight-Me-jt-Lt,He=Z-le,Xe=He===0?0:Q/He,zt=Math.min(ae,Math.max(0,Xe*ae));z.style.transform=`translate3d(0,${zt}px,0)`}if(F&&M){const ae=F.offsetWidth-$e-Mt-Dt,He=q-re,Xe=He===0?0:ie/He,zt=X==="rtl"?Kt(Xe*ae,-ae,0):Kt(Xe*ae,0,ae);M.style.transform=`translate3d(${zt}px,0,0)`}const ot=[[Ot.scrollAreaOverflowXStart,oe],[Ot.scrollAreaOverflowXEnd,Y],[Ot.scrollAreaOverflowYStart,pe],[Ot.scrollAreaOverflowYEnd,Re]];for(const[ae,He]of ot)P.style.setProperty(ae,`${He}px`);H&&(Se||Ee?d({width:0,height:0}):!Se&&!Ee&&d({width:_e,height:ke})),w(ae=>cu(ae,be));const Ae={xStart:!Se&&oe>E.xStart,xEnd:!Se&&Y>E.xEnd,yStart:!Ee&&pe>E.yStart,yEnd:!Ee&&Re>E.yEnd};T(ae=>ae.xStart===Ae.xStart&&ae.xEnd===Ae.xEnd&&ae.yStart===Ae.yStart&&ae.yEnd===Ae.yEnd?ae:Ae)});ee(()=>{a.current&&iu()},[a]),ee(()=>{queueMicrotask(D)},[D,v,X,E.xStart,E.xEnd,E.yStart,E.yEnd]),ee(()=>{var P;(P=a.current)!=null&&P.matches(":hover")&&N(!0)},[a,N]),ee(()=>{const P=a.current;if(typeof ResizeObserver>"u"||!P)return;let j=!1;const F=new ResizeObserver(()=>{if(!j){j=!0;const z=$.current;if(z[0]===P.clientHeight&&z[1]===P.scrollHeight&&z[2]===P.clientWidth&&z[3]===P.scrollWidth)return}D()});return F.observe(P),I.start(0,()=>{const z=P.getAnimations({subtree:!0});z.length!==0&&Promise.allSettled(z.map(M=>M.finished)).then(D).catch(()=>{})}),()=>{F.disconnect(),I.clear()}},[D,a,I]);function _(){L.current=!1}const V={role:"presentation",...x&&{"data-id":`${x}-viewport`},tabIndex:v.x&&v.y?-1:0,className:Kr.className,style:{overflow:"scroll"},onScroll(){a.current&&(D(),L.current||y({x:a.current.scrollLeft,y:a.current.scrollTop}),W.start(100,()=>{L.current=!0}))},onWheel:_,onTouchMove:_,onPointerMove:_,onPointerEnter:_,onKeyDown:_},B=g.useMemo(()=>({scrolling:O||A,hasOverflowX:!v.x,hasOverflowY:!v.y,overflowXStart:C.xStart,overflowXEnd:C.xEnd,overflowYStart:C.yStart,overflowYEnd:C.yEnd,cornerHidden:v.corner}),[O,A,v.x,v.y,v.corner,C]),R=Ue("div",t,{ref:[n,a],state:B,props:[V,i],stateAttributesMapping:Jr}),S=g.useMemo(()=>({computeThumbPosition:D}),[D]);return b.jsx(Oi.Provider,{value:S,children:R})});process.env.NODE_ENV!=="production"&&(Ni.displayName="ScrollAreaViewport");function au(e){const t=e.clientHeight>=e.scrollHeight,n=e.clientWidth>=e.scrollWidth;return{y:t,x:n,corner:t||n}}function cu(e,t){return e.y===t.y&&e.x===t.x&&e.corner===t.corner?e:t}function me(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}const no=g.createContext(void 0);process.env.NODE_ENV!=="production"&&(no.displayName="ScrollAreaScrollbarContext");function lu(){const e=g.useContext(no);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ScrollAreaScrollbarContext is missing. ScrollAreaScrollbar parts must be placed within <ScrollArea.Scrollbar>.":at(54));return e}let Xn=(function(e){return e.scrollAreaThumbHeight="--scroll-area-thumb-height",e.scrollAreaThumbWidth="--scroll-area-thumb-width",e})({});const _i=g.forwardRef(function(t,n){const{render:r,className:o,orientation:s="vertical",keepMounted:i=!1,style:a,...u}=t,{hovering:c,scrollingX:l,scrollingY:m,hiddenState:p,overflowEdges:f,scrollbarYRef:d,scrollbarXRef:h,viewportRef:x,thumbYRef:w,thumbXRef:v,handlePointerDown:k,handlePointerUp:y,handleScroll:N,rootId:T,thumbSize:C,hasMeasuredScrollbar:E}=tr(),O={hovering:c,scrolling:{horizontal:l,vertical:m}[s],orientation:s,hasOverflowX:!p.x,hasOverflowY:!p.y,overflowXStart:f.xStart,overflowXEnd:f.xEnd,overflowYStart:f.yStart,overflowYEnd:f.yEnd,cornerHidden:p.corner},A=to(),X=!E&&!i,L=s==="vertical"?p.y:p.x,$=i||!L;g.useEffect(()=>{if(!$)return;const _=x.current,V=s==="vertical"?d.current:h.current;if(!V)return;function B(R){if(!_||!V||R.ctrlKey)return;const S=s==="horizontal",P=S?"scrollLeft":"scrollTop",j=S?R.deltaX:R.deltaY;if(j===0)return;const F=S?_.scrollWidth-_.clientWidth:_.scrollHeight-_.clientHeight,z=S&&A==="rtl"?-F:0,M=S&&A==="rtl"?0:F,H=_[P];H<=z&&j<0||H>=M&&j>0||(R.preventDefault(),_[P]=Math.min(M,Math.max(z,H+j)),N({x:_.scrollLeft,y:_.scrollTop}))}return me(V,"wheel",B,{passive:!1})},[A,N,s,h,d,$,x]);const W={...T&&{"data-id":`${T}-scrollbar`},onPointerDown(_){if(_.button!==0)return;const V=bt(_.nativeEvent),B=s==="vertical"?w.current:v.current;if(!(B&&he(B,V))&&x.current){if(w.current&&d.current&&s==="vertical"){const R=tt(w.current,"margin","y"),S=tt(d.current,"padding","y"),P=w.current.offsetHeight,j=d.current.getBoundingClientRect(),F=_.clientY-j.top-P/2-S+R/2,z=x.current.scrollHeight,M=x.current.clientHeight,H=d.current.offsetHeight-P-S-R,q=F/H*(z-M);x.current.scrollTop=q}if(v.current&&h.current&&s==="horizontal"){const R=tt(v.current,"margin","x"),S=tt(h.current,"padding","x"),P=v.current.offsetWidth,j=h.current.getBoundingClientRect(),F=_.clientX-j.left-P/2-S+R/2,z=x.current.scrollWidth,M=x.current.clientWidth,H=h.current.offsetWidth-P-S-R,Z=F/H;let q;A==="rtl"?(q=(1-Z)*(z-M),x.current.scrollLeft<=0&&(q=-q)):q=Z*(z-M),x.current.scrollLeft=q}N({x:x.current.scrollLeft,y:x.current.scrollTop}),k(_)}},onPointerUp:y,onPointerCancel:y,style:{position:"absolute",touchAction:"none",WebkitUserSelect:"none",userSelect:"none",visibility:X?"hidden":void 0,...s==="vertical"&&{top:0,bottom:`var(${$n.scrollAreaCornerHeight})`,insetInlineEnd:0,[Xn.scrollAreaThumbHeight]:`${C.height}px`},...s==="horizontal"&&{insetInlineStart:0,insetInlineEnd:`var(${$n.scrollAreaCornerWidth})`,bottom:0,[Xn.scrollAreaThumbWidth]:`${C.width}px`}}},I=Ue("div",t,{ref:[n,s==="vertical"?d:h],state:O,props:[W,u],stateAttributesMapping:Jr}),D=g.useMemo(()=>({orientation:s}),[s]);return $?b.jsx(no.Provider,{value:D,children:I}):null});process.env.NODE_ENV!=="production"&&(_i.displayName="ScrollAreaScrollbar");const Ai=g.forwardRef(function(t,n){const{render:r,className:o,style:s,...i}=t,{thumbYRef:a,thumbXRef:u,handlePointerDown:c,handlePointerMove:l,handlePointerUp:m,setScrollingX:p,setScrollingY:f,scrollingX:d,scrollingY:h,hasMeasuredScrollbar:x}=tr(),{orientation:w}=lu(),v={scrolling:w==="horizontal"?d:h,orientation:w};function k(N){w==="vertical"&&f(!1),w==="horizontal"&&p(!1),m(N)}return Ue("div",t,{ref:[n,w==="vertical"?a:u],state:v,props:[{onPointerDown:c,onPointerMove:l,onPointerUp:k,onPointerCancel:k,style:{visibility:x?void 0:"hidden",...w==="vertical"&&{height:`var(${Xn.scrollAreaThumbHeight})`},...w==="horizontal"&&{width:`var(${Xn.scrollAreaThumbWidth})`}}},i]})});process.env.NODE_ENV!=="production"&&(Ai.displayName="ScrollAreaThumb");const Ii=g.forwardRef(function(t,n){const{render:r,className:o,style:s,...i}=t,{cornerRef:a,cornerSize:u,hiddenState:c}=tr(),l=Ue("div",t,{ref:[n,a],props:[{style:{position:"absolute",bottom:0,insetInlineEnd:0,width:u.width,height:u.height}},i]});return c.corner?null:l});process.env.NODE_ENV!=="production"&&(Ii.displayName="ScrollAreaCorner");function ns({children:e,className:t,...n}){return b.jsxs(Ti,{className:nn("relative",t),"data-slot":"scroll-area",...n,children:[b.jsx(Ni,{className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1","data-slot":"scroll-area-viewport",children:e}),b.jsx(uu,{}),b.jsx(Ii,{})]})}function uu({className:e,orientation:t="vertical",...n}){return b.jsx(_i,{className:nn("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",e),"data-orientation":t,"data-slot":"scroll-area-scrollbar",orientation:t,...n,children:b.jsx(Ai,{className:"relative flex-1 rounded-full bg-border","data-slot":"scroll-area-thumb"})})}const Mi=g.forwardRef(function(t,n){const{className:r,render:o,orientation:s="horizontal",style:i,...a}=t;return Ue("div",t,{state:{orientation:s},ref:n,props:[{role:"separator","aria-orientation":s},a]})});process.env.NODE_ENV!=="production"&&(Mi.displayName="Separator");function rs({className:e,orientation:t="horizontal",...n}){return b.jsx(Mi,{className:nn("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",e),"data-slot":"separator",orientation:t,...n})}function du({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=g.useRef(e!==void 0),[s,i]=g.useState(t),a=o?e:s;if(process.env.NODE_ENV!=="production"){g.useEffect(()=>{o!==(e!==void 0)&&Vn([`A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
43
|
+
`))},[r,n,e]);const{current:c}=g.useRef(t);g.useEffect(()=>{!o&&os(c)!==os(t)&&Vn([`A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
|
|
44
|
+
`))},[t])}const u=g.useCallback(c=>{o||i(c)},[]);return[a,u]}function os(e){let t=0;const n=new WeakMap;try{return JSON.stringify(e,function(s,i){if(!(s==="_owner"&&this!=null&&typeof this=="object"&&"$$typeof"in this)){if(typeof i=="bigint")return`__bigint__:${i}`;if(i!==null&&typeof i=="object"){const a=n.get(i);if(a!==void 0)return`__object__:${a}`;n.set(i,t),t+=1}return i}})??`__top__:${typeof e}`}catch{return"__unserializable__"}}const ji={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Di={...ji,position:"fixed",top:0,left:0},fu={...ji,position:"absolute"},ro=g.createContext(void 0);process.env.NODE_ENV!=="production"&&(ro.displayName="SwitchRootContext");function mu(){const e=g.useContext(ro);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: SwitchRootContext is missing. Switch parts must be placed within <Switch.Root>.":at(63));return e}let ss=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const pu={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},dn={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},gu={disabled:!1,...dn},hu={valid(e){return e===null?null:e?{[ss.valid]:""}:{[ss.invalid]:""}}};let is=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const Li={...hu,checked(e){return e?{[is.checked]:""}:{[is.unchecked]:""}}},bu={invalid:void 0,name:void 0,validityData:{state:pu,errors:[],error:"",value:"",initialValue:null},setValidityData:je,disabled:void 0,touched:dn.touched,setTouched:je,dirty:dn.dirty,setDirty:je,filled:dn.filled,setFilled:je,focused:dn.focused,setFocused:je,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:gu,markedDirtyRef:{current:!1},registerFieldControl:je,validation:{getValidationProps:(e,t=De)=>t,inputRef:{current:null},registerInput:je,commit:async()=>{},change:je}},Vi=g.createContext(bu);process.env.NODE_ENV!=="production"&&(Vi.displayName="FieldRootContext");function Fi(e=!0){const t=g.useContext(Vi);if(t.setValidityData===je&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":at(28));return t}function xu(e,t,n,r,o=!0,s){const{registerFieldControl:i}=Fi(),a=g.useRef(null);a.current||(a.current=Symbol()),ee(()=>{const u=a.current;return!u||!o?void 0:(i(u,{controlRef:e,getValue:r,id:t,name:s,value:n}),()=>{i(u,void 0)})},[e,o,r,t,s,i,n])}const zi=g.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:je,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(zi.displayName="FormContext");function vu(){return g.useContext(zi)}const Bi=g.createContext({controlId:void 0,registerControlId:je,labelId:void 0,setLabelId:je,messageIds:[],setMessageIds:je,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(Bi.displayName="LabelableContext");function $i(){return g.useContext(Bi)}function yu(e,t,n,r=!0,o){const[s,i]=g.useState(),a=xn(o?`${o}-label`:void 0),u=e??t??s;return ee(()=>{const c=e||t||!r?void 0:wu(n.current,a);s!==c&&i(c)}),u}function wu(e,t){const n=Eu(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function Eu(e){if(!e)return;const t=e.parentElement;if(t&&t.tagName==="LABEL")return t;const n=e.id;if(n){const o=e.nextElementSibling;if(o&&o.htmlFor===n)return o}const r=e.labels;return r&&r[0]}function Su(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,registerControlId:s}=$i(),i=xn(t),a=n?o:void 0,u=mt(()=>Symbol("labelable-control")),c=g.useRef(!1),l=g.useRef(t!=null),m=se(()=>{!c.current||s===je||(c.current=!1,s(u.current,void 0))});return ee(()=>{if(s===je)return;let p;if(n){const f=r==null?void 0:r.current;te(f)&&f.closest("label")!=null?p=t??null:p=a??i}else if(t!=null)l.current=!0,p=t;else if(l.current)p=i;else{m();return}if(p===void 0){m();return}c.current=!0,s(u.current,p)},[t,r,a,s,n,i,u,m]),g.useEffect(()=>m,[m]),o??i}const or="none",sr="trigger-press",Ge="trigger-hover",jn="trigger-focus",Ru="outside-press",ku="focus-out",oo="escape-key",Cu="disabled",Tu="imperative-action";function ye(e,t,n,r){let o=!1,s=!1;const i=De;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){s=!0},get isCanceled(){return o},get isPropagationAllowed(){return s},trigger:n,...i}}function Ou(e,t){const n=g.useRef(e),r=se(t);ee(()=>{n.current!==e&&r(n.current)},[e,r]),ee(()=>{n.current=e},[e])}const Hi=g.forwardRef(function(t,n){const{checked:r,className:o,defaultChecked:s,"aria-labelledby":i,form:a,id:u,inputRef:c,name:l,nativeButton:m=!1,onCheckedChange:p,readOnly:f=!1,required:d=!1,disabled:h=!1,render:x,uncheckedValue:w,value:v,style:k,...y}=t,{clearErrors:N}=vu(),{state:T,setTouched:C,setDirty:E,validityData:O,setFilled:A,setFocused:X,validationMode:L,disabled:$,name:W,validation:I}=Fi(),{labelId:D}=$i(),_=$||h,V=W??l,B=g.useRef(null),R=_r(B,c,I.inputRef),S=g.useRef(null),P=xn(),j=Su({id:u,implicit:!1,controlRef:S}),F=m?void 0:j,[z,M]=du({controlled:r,default:!!s,name:"Switch",state:"checked"});xu(S,P,z,void 0,!_,l),ee(()=>{B.current&&A(B.current.checked)},[B,A]),Ou(z,()=>{N(V),E(z!==O.initialValue),A(z),I.change(z)});const{getButtonProps:H,buttonRef:Z}=Gs({disabled:_,native:m}),q=yu(i,D,B,!m,F),le={id:m?j:P,role:"switch","aria-checked":z,"aria-readonly":f||void 0,"aria-required":d||void 0,"aria-labelledby":q,onFocus(){_||X(!0)},onBlur(){const K=B.current;!K||_||(C(!0),X(!1),L==="onBlur"&&I.commit(K.checked))},onClick(K){if(f||_)return;K.preventDefault();const we=B.current;we&&we.dispatchEvent(new(Pe(we)).PointerEvent("click",{bubbles:!0,shiftKey:K.shiftKey,ctrlKey:K.ctrlKey,altKey:K.altKey,metaKey:K.metaKey}))}},re=Yt({checked:z,disabled:_,form:a,id:F,name:V,required:d,style:V?fu:Di,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:R,onChange(K){if(K.nativeEvent.defaultPrevented)return;if(f){K.preventDefault();return}const we=K.currentTarget.checked,be=ye(or,K.nativeEvent);p==null||p(we,be),!be.isCanceled&&M(we)},onFocus(){var K;(K=S.current)==null||K.focus()}},K=>I.getValidationProps(_,K),v!==void 0?{value:v}:De),Q=g.useMemo(()=>({...T,checked:z,disabled:_,readOnly:f,required:d}),[T,z,_,f,d]),ie=Ue("span",t,{state:Q,ref:[n,S,Z],props:[le,y,H,K=>I.getValidationProps(_,K)],stateAttributesMapping:Li});return b.jsxs(ro.Provider,{value:Q,children:[ie,!z&&V&&w!==void 0&&b.jsx("input",{type:"hidden",form:a,name:V,value:w,disabled:_}),b.jsx("input",{...re,suppressHydrationWarning:!0})]})});process.env.NODE_ENV!=="production"&&(Hi.displayName="SwitchRoot");const Wi=g.forwardRef(function(t,n){const{render:r,className:o,style:s,...i}=t,a=mu();return Ue("span",t,{state:a,ref:n,stateAttributesMapping:Li,props:i})});process.env.NODE_ENV!=="production"&&(Wi.displayName="SwitchThumb");function as({className:e,size:t="default",...n}){return b.jsx(Hi,{className:nn("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",e),"data-size":t,"data-slot":"switch",...n,children:b.jsx(Wi,{className:"pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground","data-slot":"switch-thumb"})})}const Lr=[];let Vr;function Pu(){return Vr}function Nu(e){Lr.push(e)}function Yi(e){const t=(n,r)=>{const o=mt(Au).current;let s;try{Vr=o;for(const i of Lr)i.before(o);s=e(n,r);for(const i of Lr)i.after(o);o.didInitialize=!0}finally{Vr=void 0}return s};return t.displayName=e.displayName||e.name,t}function _u(e){return g.forwardRef(Yi(e))}function Au(){return{didInitialize:!1}}const so=g.createContext(void 0);process.env.NODE_ENV!=="production"&&(so.displayName="TooltipRootContext");function vn(e){const t=g.useContext(so);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>.":at(72));return t}function Iu(e,t){return t!=null&&!hn(t)?0:typeof e=="function"?e():e}function tn(e,t,n){const r=Iu(e,n);return typeof r=="number"?r:r==null?void 0:r[t]}function cs(e){return typeof e=="function"?e():e}function Ui(e,t){return t||e==="click"||e==="mousedown"}function Mu(e){return(e==null?void 0:e.includes("mouse"))&&e!=="mousedown"}const io=g.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new yt,currentIdRef:{current:null},currentContextRef:{current:null}});process.env.NODE_ENV!=="production"&&(io.displayName="FloatingDelayGroupContext");function ju(e,t){e.current=t.current}function Du(e){const{children:t,delay:n,timeoutMs:r=0}=e,o=g.useRef(n),s=g.useRef(n),i=g.useRef(null),a=g.useRef(null),u=ft();return ee(()=>{if(s.current=n,!i.current){o.current=n;return}o.current={open:tn(o.current,"open"),close:tn(n,"close")}},[n,i,o,s]),b.jsx(io.Provider,{value:g.useMemo(()=>({hasProvider:!0,delayRef:o,initialDelayRef:s,currentIdRef:i,timeoutMs:r,currentContextRef:a,timeout:u}),[r,u]),children:t})}function Lu(e,t={open:!1}){const{open:n}=t,r="rootStore"in e?e.rootStore:e,o=r.useState("floatingId"),s=g.useContext(io),{currentIdRef:i,delayRef:a,timeoutMs:u,initialDelayRef:c,currentContextRef:l,hasProvider:m,timeout:p}=s,[f,d]=g.useState(!1),h=g.useRef(n),x=g.useRef(!1);return ee(()=>{h.current=n},[n]),ee(()=>()=>{x.current=!0},[]),ee(()=>{function w(){var v;x.current||d(!1),(v=l.current)==null||v.setIsInstantPhase(!1),i.current=null,l.current=null,a.current=c.current,p.clear()}if(i.current&&!n&&i.current===o){if(d(!1),u){const v=o;return p.start(u,()=>{r.select("open")||i.current&&i.current!==v||w()}),()=>{(h.current||i.current!==v)&&p.clear()}}w()}},[n,o,i,a,u,c,l,p,r]),ee(()=>{if(!n)return;const w=l.current,v=i.current;p.clear(),l.current={onOpenChange:r.setOpen,setIsInstantPhase:d},i.current=o,a.current={open:0,close:tn(c.current,"close")},v!==null&&v!==o?(d(!0),w==null||w.setIsInstantPhase(!0),w==null||w.onOpenChange(!1,ye(or))):(d(!1),w==null||w.setIsInstantPhase(!1))},[n,o,r,i,a,c,l,p]),ee(()=>()=>{if(i.current===o){if(l.current=null,!h.current)return;i.current=null,ju(a,c),p.clear()}},[l,i,a,o,c,p]),g.useMemo(()=>({hasProvider:m,delayRef:a,isInstantPhase:f}),[m,a,f])}function Nt(...e){return()=>{for(let t=0;t<e.length;t+=1){const n=e[t];n&&n()}}}function it(e){const t=mt(Vu,e).current;return t.next=e,ee(t.effect),t}function Vu(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const Tn=null;let ls=globalThis.requestAnimationFrame;class Fu{constructor(){Ce(this,"callbacks",[]);Ce(this,"callbacksCount",0);Ce(this,"nextId",1);Ce(this,"startId",1);Ce(this,"isScheduled",!1);Ce(this,"tick",t=>{var o;this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let s=0;s<n.length;s+=1)(o=n[s])==null||o.call(n,t)})}request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV!=="production"&&ls!==requestAnimationFrame&&(ls=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const On=new Fu;class ht{constructor(){Ce(this,"currentId",Tn);Ce(this,"cancel",()=>{this.currentId!==Tn&&(On.cancel(this.currentId),this.currentId=Tn)});Ce(this,"disposeEffect",()=>this.cancel)}static create(){return new ht}static request(t){return On.request(t)}static cancel(t){return On.cancel(t)}request(t){this.cancel(),this.currentId=On.request(()=>{this.currentId=Tn,t()})}}function zu(){const e=mt(ht.create).current;return Gr(e.disposeEffect),e}const Fr=g.forwardRef(function(t,n){const[r,o]=g.useState();ee(()=>{Sl&&rn&&o("button")},[]);const s={tabIndex:0,role:r};return b.jsx("span",{...t,ref:n,style:Di,"aria-hidden":r?void 0:!0,...s,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(Fr.displayName="FocusGuard");function ao(e){return`data-base-ui-${e}`}const Bu={style:{transition:"none"}},$u={fallbackAxisSide:"end"},Hu={clipPath:"inset(50%)",position:"fixed",top:0,left:0},co=g.createContext(null);process.env.NODE_ENV!=="production"&&(co.displayName="PortalContext");const Wu=()=>g.useContext(co),Yu=ao("portal");function Xi(e={}){const{ref:t,container:n,componentProps:r=De,elementProps:o}=e,s=nr(),i=Wu(),a=i==null?void 0:i.portalNode,[u,c]=g.useState(null),[l,m]=g.useState(null),p=se(x=>{x!==null&&m(x)}),f=g.useRef(null);ee(()=>{if(n===null){f.current&&(f.current=null,m(null),c(null));return}if(s==null)return;const x=(n&&(Br(n)?n:n.current))??a??document.body;if(x==null){f.current&&(f.current=null,m(null),c(null));return}f.current!==x&&(f.current=x,m(null),c(x))},[n,a,s]);const d=Ue("div",r,{ref:[t,p],props:[{id:s,[Yu]:""},o]});return{portalNode:l,portalSubtree:u&&d?Xt.createPortal(d,u):null}}const Uu=g.forwardRef(function(t,n){const{render:r,className:o,style:s,children:i,container:a,renderGuards:u,...c}=t,{portalNode:l,portalSubtree:m}=Xi({container:a,ref:n,componentProps:t,elementProps:c}),p=g.useRef(null),f=g.useRef(null),d=g.useRef(null),h=g.useRef(null),[x,w]=g.useState(null),v=g.useRef(!1),k=x==null?void 0:x.modal,y=x==null?void 0:x.open,N=typeof u=="boolean"?u:!!x&&!x.modal&&x.open&&!!l;g.useEffect(()=>{if(!l||k)return;function C(E){l&&E.relatedTarget&&xr(E)&&(E.type==="focusin"?v.current&&(Jo(l),v.current=!1):(Ql(l),v.current=!0))}return Nt(me(l,"focusin",C,!0),me(l,"focusout",C,!0))},[l,k]),ee(()=>{!l||y!==!0||!v.current||(Jo(l),v.current=!1)},[y,l]);const T=g.useMemo(()=>({beforeOutsideRef:p,afterOutsideRef:f,beforeInsideRef:d,afterInsideRef:h,portalNode:l,setFocusManagerState:w}),[l]);return b.jsxs(g.Fragment,{children:[m,b.jsxs(co.Provider,{value:T,children:[N&&l&&b.jsx(Fr,{"data-type":"outside",ref:p,onFocus:C=>{var E;if(xr(C,l))(E=d.current)==null||E.focus();else{const O=x?x.domReference:null,A=Zl(O);A==null||A.focus()}}}),N&&l&&b.jsx("span",{"aria-owns":l.id,style:Hu}),l&&Xt.createPortal(i,l),N&&l&&b.jsx(Fr,{"data-type":"outside",ref:f,onFocus:C=>{var E;if(xr(C,l))(E=h.current)==null||E.focus();else{const O=x?x.domReference:null,A=Jl(O);A==null||A.focus(),x!=null&&x.closeOnFocusOut&&(x==null||x.onOpenChange(!1,ye(ku,C.nativeEvent)))}}})]})]})});process.env.NODE_ENV!=="production"&&(Uu.displayName="FloatingPortal");function Xu(){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 Gi=g.createContext(null);process.env.NODE_ENV!=="production"&&(Gi.displayName="FloatingNodeContext");const qi=g.createContext(null);process.env.NODE_ENV!=="production"&&(qi.displayName="FloatingTreeContext");const lo=()=>{var e;return((e=g.useContext(Gi))==null?void 0:e.id)||null},ir=e=>{const t=g.useContext(qi);return e??t};function Gu(e){return e==null?e:"current"in e?e.current:e}function qu(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var f;const s=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},i=t.axis==="x"||t.axis==="both",a=t.axis==="y"||t.axis==="both",u=["mouseenter","mousemove"].includes(((f=t.dataRef.current.openEvent)==null?void 0:f.type)||"")&&t.pointerType!=="touch";let c=s.width,l=s.height,m=s.x,p=s.y;return n==null&&t.x&&i&&(n=s.x-t.x),r==null&&t.y&&a&&(r=s.y-t.y),m-=n||0,p-=r||0,c=0,l=0,!o||u?(c=t.axis==="y"?s.width:0,l=t.axis==="x"?s.height:0,m=i&&t.x!=null?t.x:m,p=a&&t.y!=null?t.y:p):o&&!u&&(l=t.axis==="x"?s.height:l,c=t.axis==="y"?s.width:c),o=!0,{width:c,height:l,x:m,y:p,top:p,right:m+c,bottom:p+l,left:m}}}}function us(e){return e!=null&&e.clientX!=null}function Ku(e,t={}){const{enabled:n=!0,axis:r="both"}=t,o="rootStore"in e?e.rootStore:e,s=o.useState("open"),i=o.useState("floatingElement"),a=o.useState("domReferenceElement"),u=o.context.dataRef,c=g.useRef(!1),l=g.useRef(null),[m,p]=g.useState(),[f,d]=g.useState([]),h=se(y=>{o.set("positionReference",y)}),x=se((y,N,T)=>{c.current||u.current.openEvent&&!us(u.current.openEvent)||o.set("positionReference",qu(T??a,{x:y,y:N,axis:r,dataRef:u,pointerType:m}))}),w=se(y=>{s?l.current||(x(y.clientX,y.clientY,y.currentTarget),d([])):x(y.clientX,y.clientY,y.currentTarget)}),v=hn(m)?i:s;g.useEffect(()=>{if(!n){h(a);return}if(!v)return;function y(){var C;(C=l.current)==null||C.call(l),l.current=null}const N=Pe(i);function T(C){const E=bt(C);he(i,E)?y():x(C.clientX,C.clientY)}return!u.current.openEvent||us(u.current.openEvent)?l.current=me(N,"mousemove",T):h(a),y},[v,n,i,u,a,o,x,h,f]),g.useEffect(()=>()=>{o.set("positionReference",null)},[o]),g.useEffect(()=>{n&&!i&&(c.current=!1)},[n,i]),g.useEffect(()=>{!n&&s&&(c.current=!0)},[n,s]);const k=g.useMemo(()=>{function y(N){p(N.pointerType)}return{onPointerDown:y,onPointerEnter:y,onMouseMove:w,onMouseEnter:w}},[w]);return g.useMemo(()=>n?{reference:k,trigger:k}:{},[n,k])}function Ju(){return!1}function Zu(e){return{escapeKey:typeof e=="boolean"?e:(e==null?void 0:e.escapeKey)??!1,outsidePress:typeof e=="boolean"?e:(e==null?void 0:e.outsidePress)??!0}}function Qu(e,t={}){const{enabled:n=!0,escapeKey:r=!0,outsidePress:o=!0,outsidePressEvent:s="sloppy",referencePress:i=Ju,bubbles:a,externalTree:u}=t,c="rootStore"in e?e.rootStore:e,l=c.useState("open"),m=c.useState("floatingElement"),{dataRef:p}=c.context,f=ir(u),d=se(typeof o=="function"?o:()=>!1),h=typeof o=="function"?d:o,x=h!==!1,w=se(()=>s),{escapeKey:v,outsidePress:k}=Zu(a),y=g.useRef(!1),N=g.useRef(!1),T=g.useRef(!1),C=g.useRef(!1),E=g.useRef(""),O=g.useRef(null),A=ft(),X=ft(),L=se(()=>{X.clear(),p.current.insideReactTree=!1}),$=se(P=>{var z;const j=(z=p.current.floatingContext)==null?void 0:z.nodeId;return(f?Qt(f.nodesRef.current,j):[]).some(M=>{var H;return((H=M.context)==null?void 0:H.open)&&!M.context.dataRef.current[P]})}),W=se(P=>hr(P,c.select("floatingElement"))||hr(P,c.select("domReferenceElement"))),I=se(P=>{i()&&c.setOpen(!1,ye(sr,P.nativeEvent))}),D=se(P=>{if(!l||!n||!r||P.key!=="Escape"||C.current||!v&&$("__escapeKeyBubbles"))return;const j=Nl(P)?P.nativeEvent:P,F=ye(oo,j);c.setOpen(!1,F),F.isCanceled||P.preventDefault(),!v&&!F.isPropagationAllowed&&P.stopPropagation()}),_=se(()=>{p.current.insideReactTree=!0,X.start(0,L)}),V=se(P=>{if(!l||!n||P.button!==0)return;const j=bt(P.nativeEvent);he(c.select("floatingElement"),j)&&(y.current||(y.current=!0,N.current=!1))}),B=se(P=>{!l||!n||(P.defaultPrevented||P.nativeEvent.defaultPrevented)&&y.current&&(N.current=!0)});g.useEffect(()=>{if(!l||!n)return;p.current.__escapeKeyBubbles=v,p.current.__outsidePressBubbles=k;const P=new yt,j=new yt;function F(){P.clear(),C.current=!0}function z(){P.start(rn?5:0,()=>{C.current=!1})}function M(){T.current=!0,j.start(0,()=>{T.current=!1})}function H(){y.current=!1,N.current=!1}function Z(){const Y=E.current,J=Y==="pen"||!Y?"mouse":Y,pe=w(),Re=typeof pe=="function"?pe():pe;return typeof Re=="string"?Re:Re[J]}function q(Y){const J=Z();return J==="intentional"&&Y.type!=="click"||J==="sloppy"&&Y.type==="click"}function le(Y){var Re;const J=(Re=p.current.floatingContext)==null?void 0:Re.nodeId,pe=f&&Qt(f.nodesRef.current,J).some(ze=>{var Ze;return hr(Y,(Ze=ze.context)==null?void 0:Ze.elements.floating)});return W(Y)||pe}function re(Y){if(q(Y)){Y.type!=="click"&&!W(Y)&&(j.clear(),T.current=!1),L();return}if(p.current.insideReactTree){L();return}const J=bt(Y),pe=`[${ao("inert")}]`,Re=te(J)?J.getRootNode():null,ze=Array.from((mn(Re)?Re:Je(c.select("floatingElement"))).querySelectorAll(pe)),Ze=c.context.triggerElements;if(J&&(Ze.hasElement(J)||Ze.hasMatchingElement(ke=>he(ke,J))))return;let _e=te(J)?J:null;for(;_e&&!Pt(_e);){const ke=_t(_e);if(Pt(ke)||!te(ke))break;_e=ke}if(!(ze.length&&te(J)&&!Cl(J)&&!he(J,c.select("floatingElement"))&&ze.every(ke=>!he(_e,ke)))){if(Le(J)&&!("touches"in Y)){const ke=Pt(J),Ve=Ke(J),Be=/auto|scroll/,ct=ke||Be.test(Ve.overflowX),Mt=ke||Be.test(Ve.overflowY),jt=ct&&J.clientWidth>0&&J.scrollWidth>J.clientWidth,Dt=Mt&&J.clientHeight>0&&J.scrollHeight>J.clientHeight,Lt=Ve.direction==="rtl",Vt=Dt&&(Lt?Y.offsetX<=J.offsetWidth-J.clientWidth:Y.offsetX>J.clientWidth),Ft=jt&&Y.offsetY>J.clientHeight;if(Vt||Ft)return}if(!le(Y)){if(Z()==="intentional"&&T.current){j.clear(),T.current=!1;return}typeof h=="function"&&!h(Y)||$("__outsidePressBubbles")||(c.setOpen(!1,ye(Ru,Y)),L())}}}function Q(Y){Z()!=="sloppy"||Y.pointerType==="touch"||!c.select("open")||!n||W(Y)||re(Y)}function ie(Y){if(Z()!=="sloppy"||!c.select("open")||!n||W(Y))return;const J=Y.touches[0];J&&(O.current={startTime:Date.now(),startX:J.clientX,startY:J.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},A.start(1e3,()=>{O.current&&(O.current.dismissOnTouchEnd=!1,O.current.dismissOnMouseDown=!1)}))}function K(Y,J){const pe=bt(Y);if(!pe)return;const Re=me(pe,Y.type,()=>{J(Y),Re()})}function we(Y){E.current="touch",K(Y,ie)}function be(Y){A.clear(),Y.type==="pointerdown"&&(E.current=Y.pointerType),!(Y.type==="mousedown"&&O.current&&!O.current.dismissOnMouseDown)&&K(Y,J=>{J.type==="pointerdown"?Q(J):re(J)})}function Ee(Y){if(!y.current)return;const J=N.current;if(H(),Z()==="intentional"){if(Y.type==="pointercancel"){J&&M();return}if(!le(Y)){if(J){M();return}typeof h=="function"&&!h(Y)||(j.clear(),T.current=!0,L())}}}function Se(Y){if(Z()!=="sloppy"||!O.current||W(Y))return;const J=Y.touches[0];if(!J)return;const pe=Math.abs(J.clientX-O.current.startX),Re=Math.abs(J.clientY-O.current.startY),ze=Math.sqrt(pe*pe+Re*Re);ze>5&&(O.current.dismissOnTouchEnd=!0),ze>10&&(re(Y),A.clear(),O.current=null)}function Ie(Y){K(Y,Se)}function St(Y){Z()!=="sloppy"||!O.current||W(Y)||(O.current.dismissOnTouchEnd&&re(Y),A.clear(),O.current=null)}function rt(Y){K(Y,St)}const ge=Je(m),oe=Nt(r&&Nt(me(ge,"keydown",D),me(ge,"compositionstart",F),me(ge,"compositionend",z)),x&&Nt(me(ge,"click",be,!0),me(ge,"pointerdown",be,!0),me(ge,"pointerup",Ee,!0),me(ge,"pointercancel",Ee,!0),me(ge,"mousedown",be,!0),me(ge,"mouseup",Ee,!0),me(ge,"touchstart",we,!0),me(ge,"touchmove",Ie,!0),me(ge,"touchend",rt,!0)));return()=>{oe(),P.clear(),j.clear(),H(),T.current=!1}},[p,m,r,x,h,l,n,v,k,D,L,w,$,W,f,c,A]),g.useEffect(L,[h,L]);const R=g.useMemo(()=>({onKeyDown:D,onPointerDown:I,onClick:I}),[D,I]),S=g.useMemo(()=>({onKeyDown:D,onPointerDown:B,onMouseDown:B,onClickCapture:_,onMouseDownCapture(P){_(),V(P)},onPointerDownCapture(P){_(),V(P)},onMouseUpCapture:_,onTouchEndCapture:_,onTouchMoveCapture:_}),[D,_,V,B]);return g.useMemo(()=>n?{reference:R,floating:S,trigger:R}:{},[n,R,S])}function ds(e,t,n){let{reference:r,floating:o}=e;const s=nt(t),i=eo(t),a=Qr(i),u=qe(t),c=s==="y",l=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,p=r[a]/2-o[a]/2;let f;switch(u){case"top":f={x:l,y:r.y-o.height};break;case"bottom":f={x:l,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:m};break;case"left":f={x:r.x-o.width,y:m};break;default:f={x:r.x,y:r.y}}const d=It(t);return d&&(f[i]+=p*(d==="end"?1:-1)*(n&&c?-1:1)),f}async function ed(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:l="viewport",elementContext:m="floating",altBoundary:p=!1,padding:f=0}=wt(t,e),d=vi(f),x=a[p?m==="floating"?"reference":"floating":m],w=Un(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:l,strategy:u})),v=m==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),y=await(s.isElement==null?void 0:s.isElement(k))&&await(s.getScale==null?void 0:s.getScale(k))||{x:1,y:1},N=Un(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:k,strategy:u}):v);return{top:(w.top-N.top+d.top)/y.y,bottom:(N.bottom-w.bottom+d.bottom)/y.y,left:(w.left-N.left+d.left)/y.x,right:(N.right-w.right+d.right)/y.x}}const td=50,nd=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=i.detectOverflow?i:{...i,detectOverflow:ed},u=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:m}=ds(c,r,u),p=r,f=0;const d={};for(let h=0;h<s.length;h++){const x=s[h];if(!x)continue;const{name:w,fn:v}=x,{x:k,y,data:N,reset:T}=await v({x:l,y:m,initialPlacement:r,placement:p,strategy:o,middlewareData:d,rects:c,platform:a,elements:{reference:e,floating:t}});l=k??l,m=y??m,d[w]={...d[w],...N},T&&f<td&&(f++,typeof T=="object"&&(T.placement&&(p=T.placement),T.rects&&(c=T.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:l,y:m}=ds(c,p,u)),h=-1)}return{x:l,y:m,placement:p,strategy:o,middlewareData:d}},rd=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:u,elements:c}=t,{mainAxis:l=!0,crossAxis:m=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:h=!0,...x}=wt(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const w=qe(o),v=nt(a),k=qe(a)===a,y=await(u.isRTL==null?void 0:u.isRTL(c.floating)),N=p||(k||!h?[Yn(a)]:jl(a)),T=d!=="none";!p&&T&&N.push(...Fl(a,h,d,y));const C=[a,...N],E=await u.detectOverflow(t,x),O=[];let A=((r=s.flip)==null?void 0:r.overflows)||[];if(l&&O.push(E[w]),m){const W=Ml(o,i,y);O.push(E[W[0]],E[W[1]])}if(A=[...A,{placement:o,overflows:O}],!O.every(W=>W<=0)){var X,L;const W=(((X=s.flip)==null?void 0:X.index)||0)+1,I=C[W];if(I&&(!(m==="alignment"?v!==nt(I):!1)||A.every(V=>nt(V.placement)===v?V.overflows[0]>0:!0)))return{data:{index:W,overflows:A},reset:{placement:I}};let D=(L=A.filter(_=>_.overflows[0]<=0).sort((_,V)=>_.overflows[1]-V.overflows[1])[0])==null?void 0:L.placement;if(!D)switch(f){case"bestFit":{var $;const _=($=A.filter(V=>{if(T){const B=nt(V.placement);return B===v||B==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(B=>B>0).reduce((B,R)=>B+R,0)]).sort((V,B)=>V[1]-B[1])[0])==null?void 0:$[0];_&&(D=_);break}case"initialPlacement":D=a;break}if(o!==D)return{reset:{placement:D}}}return{}}}};function fs(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ms(e){return Al.some(t=>e[t]>=0)}const od=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=wt(e,t);switch(o){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=fs(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:ms(a)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),a=fs(i,n.floating);return{data:{escapedOffsets:a,escaped:ms(a)}}}default:return{}}}}},Ki=new Set(["left","top"]);async function sd(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=qe(n),a=It(n),u=nt(n)==="y",c=Ki.has(i)?-1:1,l=s&&u?-1:1,m=wt(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:d}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return a&&typeof d=="number"&&(f=a==="end"?d*-1:d),u?{x:f*l,y:p*c}:{x:p*c,y:f*l}}const id=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,u=await sd(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:s+u.y,data:{...u,placement:i}}}}},ad=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:u={fn:v=>{let{x:k,y}=v;return{x:k,y}}},...c}=wt(e,t),l={x:n,y:r},m=await s.detectOverflow(t,c),p=nt(o),f=Zr(p);let d=l[f],h=l[p];const x=(v,k)=>xi(k+m[v==="y"?"top":"left"],k,k-m[v==="y"?"bottom":"right"]);i&&(d=x(f,d)),a&&(h=x(p,h));const w=u.fn({...t,[f]:d,[p]:h});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[f]:i,[p]:a}}}}}},cd=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:o,y:s,placement:i,rects:a,middlewareData:u}=t,{offset:c=0,mainAxis:l=!0,crossAxis:m=!0}=wt(e,t),p={x:o,y:s},f=nt(i),d=Zr(f);let h=p[d],x=p[f];const w=wt(c,t),v=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:(n=w.mainAxis)!=null?n:0,crossAxis:(r=w.crossAxis)!=null?r:0};if(l){const N=d==="y"?"height":"width",T=a.reference[d]-a.floating[N]+v.mainAxis,C=a.reference[d]+a.reference[N]-v.mainAxis;h<T?h=T:h>C&&(h=C)}if(m){var k,y;const N=d==="y"?"width":"height",T=Ki.has(qe(i)),C=a.reference[f]-a.floating[N]+(T&&((k=u.offset)==null?void 0:k[f])||0)+(T?0:v.crossAxis),E=a.reference[f]+a.reference[N]+(T?0:((y=u.offset)==null?void 0:y[f])||0)-(T?v.crossAxis:0);x<C?x=C:x>E&&(x=E)}return{[d]:h,[f]:x}}}},ld=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:s}=t,{apply:i=()=>{},...a}=wt(e,t),u=await o.detectOverflow(t,a),c=qe(n),l=It(n),m=nt(n)==="y",{width:p,height:f}=r.floating;let d,h;c==="top"||c==="bottom"?(d=c,h=l===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(h=c,d=l==="end"?"top":"bottom");const x=f-u.top-u.bottom,w=p-u.left-u.right,v=en(f-u[d],x),k=en(p-u[h],w),y=t.middlewareData.shift,N=!y;let T=v,C=k;y!=null&&y.enabled.x&&(C=w),y!=null&&y.enabled.y&&(T=x),N&&!l&&(m?C=p-2*xt(u.left,u.right):T=f-2*xt(u.top,u.bottom)),await i({...t,availableWidth:C,availableHeight:T});const E=await o.getDimensions(s.floating);return p!==E.width||f!==E.height?{reset:{rects:!0}}:{}}}};function Ji(e){const t=Ke(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Le(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Wn(n)!==s||Wn(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function uo(e){return te(e)?e:e.contextElement}function Zt(e){const t=uo(e);if(!Le(t))return vt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Ji(t);let i=(s?Wn(n.width):n.width)/r,a=(s?Wn(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const ud=vt(0);function Zi(e){const t=Pe(e);return!Hr()||!t.visualViewport?ud:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dd(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Pe(e)}function Ut(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=uo(e);let i=vt(1);t&&(r?te(r)&&(i=Zt(r)):i=Zt(e));const a=dd(s,n,r)?Zi(s):vt(0);let u=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,l=o.width/i.x,m=o.height/i.y;if(s&&r){const p=Pe(s),f=te(r)?Pe(r):r;let d=p,h=Or(d);for(;h&&f!==d;){const x=Zt(h),w=h.getBoundingClientRect(),v=Ke(h),k=w.left+(h.clientLeft+parseFloat(v.paddingLeft))*x.x,y=w.top+(h.clientTop+parseFloat(v.paddingTop))*x.y;u*=x.x,c*=x.y,l*=x.x,m*=x.y,u+=k,c+=y,d=Pe(h),h=Or(d)}}return Un({width:l,height:m,x:u,y:c})}function ar(e,t){const n=er(e).scrollLeft;return t?t.left+n:Ut(Et(e)).left+n}function Qi(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ar(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function fd(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Et(r),a=t?Qn(t.floating):!1;if(r===i||a&&s)return n;let u={scrollLeft:0,scrollTop:0},c=vt(1);const l=vt(0),m=Le(r);if((m||!s)&&((Ye(r)!=="body"||Zn(i))&&(u=er(r)),m)){const f=Ut(r);c=Zt(r),l.x=f.x+r.clientLeft,l.y=f.y+r.clientTop}const p=i&&!m&&!s?Qi(i,u):vt(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+l.x+p.x,y:n.y*c.y-u.scrollTop*c.y+l.y+p.y}}function md(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function pd(e){const t=er(e),n=e.ownerDocument.body,r=xt(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=xt(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-t.scrollLeft+ar(e);const i=-t.scrollTop;return Ke(n).direction==="rtl"&&(s+=xt(e.clientWidth,n.clientWidth)-r),{width:r,height:o,x:s,y:i}}const gd=25;function hd(e,t,n){n===void 0&&(n="viewport");const r=n==="layoutViewport",o=Pe(e),s=Et(e),i=o.visualViewport;let a=s.clientWidth,u=s.clientHeight,c=0,l=0;if(i){const p=!Hr()||t==="fixed";r?p||(c=-i.offsetLeft,l=-i.offsetTop):(a=i.width,u=i.height,p&&(c=i.offsetLeft,l=i.offsetTop))}if(ar(s)<=0){const p=s.ownerDocument,f=p.body,d=getComputedStyle(f),h=p.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,x=Math.abs(s.clientWidth-f.clientWidth-h),w=getComputedStyle(s).scrollbarGutter==="stable both-edges"?x/2:x;w<=gd&&(a-=w)}return{width:a,height:u,x:c,y:l}}function bd(e,t){const n=Ut(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Zt(e),i=e.clientWidth*s.x,a=e.clientHeight*s.y,u=o*s.x,c=r*s.y;return{width:i,height:a,x:u,y:c}}function ps(e,t,n){let r;if(t==="viewport"||t==="layoutViewport")r=hd(e,n,t);else if(t==="document")r=pd(Et(e));else if(te(t))r=bd(t,n);else{const o=Zi(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Un(r)}function xd(e,t){const n=t.get(e);if(n)return n;let r=pn(e,[],!1).filter(a=>te(a)&&Ye(a)!=="body"),o=null;const s=Ke(e).position==="fixed";let i=s?_t(e):e;for(;te(i)&&!Pt(i);){const a=Ke(i),u=$r(i),c=o?o.position:s?"fixed":"";!u&&(c==="fixed"||c==="absolute"&&a.position==="static")?r=r.filter(m=>m!==i):o=a,i=_t(i)}return t.set(e,r),r}function vd(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Qn(t)?[]:xd(t,this._c):[].concat(n),r],a=ps(t,i[0],o);let u=a.top,c=a.right,l=a.bottom,m=a.left;for(let p=1;p<i.length;p++){const f=ps(t,i[p],o);u=xt(f.top,u),c=en(f.right,c),l=en(f.bottom,l),m=xt(f.left,m)}return{width:c-m,height:l-u,x:m,y:u}}function yd(e){const{width:t,height:n}=Ji(e);return{width:t,height:n}}function wd(e,t,n){const r=Le(t),o=Et(t),s=n==="fixed",i=Ut(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const u=vt(0);if((r||!s)&&((Ye(t)!=="body"||Zn(o))&&(a=er(t)),r)){const p=Ut(t,!0,s,t);u.x=p.x+t.clientLeft,u.y=p.y+t.clientTop}!r&&o&&(u.x=ar(o));const c=o&&!r&&!s?Qi(o,a):vt(0),l=i.left+a.scrollLeft-u.x-c.x,m=i.top+a.scrollTop-u.y-c.y;return{x:l,y:m,width:i.width,height:i.height}}function vr(e){return Ke(e).position==="static"}function gs(e,t){if(!Le(e)||Ke(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Et(e)===n&&(n=n.ownerDocument.body),n}function ea(e,t){const n=Pe(e);if(Qn(e))return n;if(!Le(e)){let o=_t(e);for(;o&&!Pt(o);){if(te(o)&&!vr(o))return o;o=_t(o)}return n}let r=gs(e,t);for(;r&&Wa(r)&&vr(r);)r=gs(r,t);return r&&Pt(r)&&vr(r)&&!$r(r)?n:r||Xa(e)||n}const Ed=async function(e){const t=this.getOffsetParent||ea,n=this.getDimensions,r=await n(e.floating);return{reference:wd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Sd(e){return Ke(e).direction==="rtl"}const Rd={convertOffsetParentRelativeRectToViewportRelativeRect:fd,getDocumentElement:Et,getClippingRect:vd,getOffsetParent:ea,getElementRects:Ed,getClientRects:md,getDimensions:yd,getScale:Zt,isElement:te,isRTL:Sd};function ta(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function kd(e,t,n){let r=null,o;const s=Et(e);function i(){var l;clearTimeout(o),(l=r)==null||l.disconnect(),r=null}function a(l,m){l===void 0&&(l=!1),m===void 0&&(m=1),i();const p=e.getBoundingClientRect(),{left:f,top:d,width:h,height:x}=p;if(l||t(),!h||!x)return;const w=Cn(d),v=Cn(s.clientWidth-(f+h)),k=Cn(s.clientHeight-(d+x)),y=Cn(f),T={rootMargin:-w+"px "+-v+"px "+-k+"px "+-y+"px",threshold:xt(0,en(1,m))||1};let C=!0;function E(O){const A=O[0].intersectionRatio;if(!ta(p,e.getBoundingClientRect()))return a();if(A!==m){if(!C)return a();A?a(!1,A):o=setTimeout(()=>{a(!1,1e-7)},1e3)}C=!1}try{r=new IntersectionObserver(E,{...T,root:s.ownerDocument})}catch{r=new IntersectionObserver(E,T)}r.observe(e)}const u=Pe(e),c=()=>a(n);return u.addEventListener("resize",c),a(!0),()=>{u.removeEventListener("resize",c),i()}}function hs(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=uo(e),l=o||s?[...c?pn(c):[],...t?pn(t):[]]:[];l.forEach(w=>{o&&w.addEventListener("scroll",n),s&&w.addEventListener("resize",n)});const m=c&&a?kd(c,n,s):null;let p=-1,f=null;i&&(f=new ResizeObserver(w=>{let[v]=w;v&&v.target===c&&f&&t&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var k;(k=f)==null||k.observe(t)})),n()}),c&&!u&&f.observe(c),t&&f.observe(t));let d,h=u?Ut(e):null;u&&x();function x(){const w=Ut(e);h&&!ta(h,w)&&n(),h=w,d=requestAnimationFrame(x)}return n(),()=>{var w;l.forEach(v=>{o&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),m==null||m(),(w=f)==null||w.disconnect(),f=null,u&&cancelAnimationFrame(d)}}const Cd=id,Td=ad,Od=rd,Pd=ld,Nd=od,_d=cd,Ad=(e,t,n)=>{const r=new Map,o=n??{},s={...Rd,...o.platform,_c:r};return nd(e,t,{...o,platform:s})};var Id=typeof document<"u",Md=function(){},Dn=Id?ve.useLayoutEffect:Md;function Gn(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(!Gn(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 s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Gn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function na(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function bs(e,t){const n=na(e);return Math.round(t*n)/n}function yr(e){const t=g.useRef(e);return Dn(()=>{t.current=e}),t}function jd(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:u,open:c}=e,[l,m]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=g.useState(r);Gn(p,r)||f(r);const[d,h]=g.useState(null),[x,w]=g.useState(null),v=g.useCallback(V=>{V!==T.current&&(T.current=V,h(V))},[]),k=g.useCallback(V=>{V!==C.current&&(C.current=V,w(V))},[]),y=s||d,N=i||x,T=g.useRef(null),C=g.useRef(null),E=g.useRef(l),O=u!=null,A=yr(u),X=yr(o),L=yr(c),$=g.useCallback(()=>{if(!T.current||!C.current)return;const V={placement:t,strategy:n,middleware:p};X.current&&(V.platform=X.current),Ad(T.current,C.current,V).then(B=>{const R={...B,isPositioned:L.current!==!1};W.current&&!Gn(E.current,R)&&(E.current=R,Xt.flushSync(()=>{m(R)}))})},[p,t,n,X,L]);Dn(()=>{c===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,m(V=>({...V,isPositioned:!1})))},[c]);const W=g.useRef(!1);Dn(()=>(W.current=!0,()=>{W.current=!1}),[]),Dn(()=>{if(y&&(T.current=y),N&&(C.current=N),y&&N){if(A.current)return A.current(y,N,$);$()}},[y,N,$,A,O]);const I=g.useMemo(()=>({reference:T,floating:C,setReference:v,setFloating:k}),[v,k]),D=g.useMemo(()=>({reference:y,floating:N}),[y,N]),_=g.useMemo(()=>{const V={position:n,left:0,top:0};if(!D.floating)return V;const B=bs(D.floating,l.x),R=bs(D.floating,l.y);return a?{...V,transform:"translate("+B+"px, "+R+"px)",...na(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:R}},[n,a,D.floating,l.x,l.y]);return g.useMemo(()=>({...l,update:$,refs:I,elements:D,floatingStyles:_}),[l,$,I,D,_])}const Dd=(e,t)=>{const n=Cd(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ld=(e,t)=>{const n=Td(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vd=(e,t)=>({fn:_d(e).fn,options:[e,t]}),Fd=(e,t)=>{const n=Od(e);return{name:n.name,fn:n.fn,options:[e,t]}},zd=(e,t)=>{const n=Pd(e);return{name:n.name,fn:n.fn,options:[e,t]}},Bd=(e,t)=>{const n=Nd(e);return{name:n.name,fn:n.fn,options:[e,t]}};function $d(e){const t=g.useRef(!0);t.current&&(t.current=!1,e())}const ce=(e,t,n,r,o,s,...i)=>{if(i.length>0)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of selectors":at(1));let a;if(e)a=e;else throw new Error("Missing arguments");return a};var Pn={exports:{}},wr={};/**
|
|
45
|
+
* @license React
|
|
46
|
+
* use-sync-external-store-shim.production.js
|
|
47
|
+
*
|
|
48
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
49
|
+
*
|
|
50
|
+
* This source code is licensed under the MIT license found in the
|
|
51
|
+
* LICENSE file in the root directory of this source tree.
|
|
52
|
+
*/var xs;function Hd(){if(xs)return wr;xs=1;var e=ve;function t(m,p){return m===p&&(m!==0||1/m===1/p)||m!==m&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function a(m,p){var f=p(),d=r({inst:{value:f,getSnapshot:p}}),h=d[0].inst,x=d[1];return s(function(){h.value=f,h.getSnapshot=p,u(h)&&x({inst:h})},[m,f,p]),o(function(){return u(h)&&x({inst:h}),m(function(){u(h)&&x({inst:h})})},[m]),i(f),f}function u(m){var p=m.getSnapshot;m=m.value;try{var f=p();return!n(m,f)}catch{return!0}}function c(m,p){return p()}var l=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return wr.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:l,wr}var Er={};/**
|
|
53
|
+
* @license React
|
|
54
|
+
* use-sync-external-store-shim.development.js
|
|
55
|
+
*
|
|
56
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
57
|
+
*
|
|
58
|
+
* This source code is licensed under the MIT license found in the
|
|
59
|
+
* LICENSE file in the root directory of this source tree.
|
|
60
|
+
*/var vs;function Wd(){return vs||(vs=1,process.env.NODE_ENV!=="production"&&(function(){function e(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}function t(f,d){l||o.startTransition===void 0||(l=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var h=d();if(!m){var x=d();s(h,x)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),m=!0)}x=i({inst:{value:h,getSnapshot:d}});var w=x[0].inst,v=x[1];return u(function(){w.value=h,w.getSnapshot=d,n(w)&&v({inst:w})},[f,h,d]),a(function(){return n(w)&&v({inst:w}),f(function(){n(w)&&v({inst:w})})},[f]),c(h),h}function n(f){var d=f.getSnapshot;f=f.value;try{var h=d();return!s(f,h)}catch{return!0}}function r(f,d){return d()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=ve,s=typeof Object.is=="function"?Object.is:e,i=o.useState,a=o.useEffect,u=o.useLayoutEffect,c=o.useDebugValue,l=!1,m=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Er.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Er}var ys;function fo(){return ys||(ys=1,process.env.NODE_ENV==="production"?Pn.exports=Hd():Pn.exports=Wd()),Pn.exports}var ra=fo(),Nn={exports:{}},Sr={};/**
|
|
61
|
+
* @license React
|
|
62
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
63
|
+
*
|
|
64
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
65
|
+
*
|
|
66
|
+
* This source code is licensed under the MIT license found in the
|
|
67
|
+
* LICENSE file in the root directory of this source tree.
|
|
68
|
+
*/var ws;function Yd(){if(ws)return Sr;ws=1;var e=ve,t=fo();function n(c,l){return c===l&&(c!==0||1/c===1/l)||c!==c&&l!==l}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,u=e.useDebugValue;return Sr.useSyncExternalStoreWithSelector=function(c,l,m,p,f){var d=s(null);if(d.current===null){var h={hasValue:!1,value:null};d.current=h}else h=d.current;d=a(function(){function w(T){if(!v){if(v=!0,k=T,T=p(T),f!==void 0&&h.hasValue){var C=h.value;if(f(C,T))return y=C}return y=T}if(C=y,r(k,T))return C;var E=p(T);return f!==void 0&&f(C,E)?(k=T,C):(k=T,y=E)}var v=!1,k,y,N=m===void 0?null:m;return[function(){return w(l())},N===null?void 0:function(){return w(N())}]},[l,m,p,f]);var x=o(c,d[0],d[1]);return i(function(){h.hasValue=!0,h.value=x},[x]),u(x),x},Sr}var Rr={};/**
|
|
69
|
+
* @license React
|
|
70
|
+
* use-sync-external-store-shim/with-selector.development.js
|
|
71
|
+
*
|
|
72
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the MIT license found in the
|
|
75
|
+
* LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/var Es;function Ud(){return Es||(Es=1,process.env.NODE_ENV!=="production"&&(function(){function e(c,l){return c===l&&(c!==0||1/c===1/l)||c!==c&&l!==l}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=ve,n=fo(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,s=t.useRef,i=t.useEffect,a=t.useMemo,u=t.useDebugValue;Rr.useSyncExternalStoreWithSelector=function(c,l,m,p,f){var d=s(null);if(d.current===null){var h={hasValue:!1,value:null};d.current=h}else h=d.current;d=a(function(){function w(T){if(!v){if(v=!0,k=T,T=p(T),f!==void 0&&h.hasValue){var C=h.value;if(f(C,T))return y=C}return y=T}if(C=y,r(k,T))return C;var E=p(T);return f!==void 0&&f(C,E)?(k=T,C):(k=T,y=E)}var v=!1,k,y,N=m===void 0?null:m;return[function(){return w(l())},N===null?void 0:function(){return w(N())}]},[l,m,p,f]);var x=o(c,d[0],d[1]);return i(function(){h.hasValue=!0,h.value=x},[x]),u(x),x},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Rr}var Ss;function Xd(){return Ss||(Ss=1,process.env.NODE_ENV==="production"?Nn.exports=Yd():Nn.exports=Ud()),Nn.exports}var Gd=Xd();const qd=Js(19),Kd=qd?Zd:Qd;function oa(e,t,n,r,o){return Kd(e,t,n,r,o)}function Jd(e,t,n,r,o){const s=g.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return ra.useSyncExternalStore(e.subscribe,s,s)}Nu({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],o=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,o)||(t=!0,r.value=o)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const o of e.syncHooks)n.add(o.store);const r=[];for(const o of n)r.push(o.subscribe(t));return()=>{for(const o of r)o()}}),ra.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Zd(e,t,n,r,o){const s=Pu();if(!s)return Jd(e,t,n,r,o);const i=s.syncIndex;s.syncIndex+=1;let a;return s.didInitialize?(a=s.syncHooks[i],(a.store!==e||a.selector!==t||!Object.is(a.a1,n)||!Object.is(a.a2,r)||!Object.is(a.a3,o))&&(a.store!==e&&(s.didChangeStore=!0),a.store=e,a.selector=t,a.a1=n,a.a2=r,a.a3=o,a.value=t(e.getSnapshot(),n,r,o))):(a={store:e,selector:t,a1:n,a2:r,a3:o,value:t(e.getSnapshot(),n,r,o)},s.syncHooks.push(a)),a.value}function Qd(e,t,n,r,o){return Gd.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,s=>t(s,n,r,o))}class ef{constructor(t){Ce(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));Ce(this,"getSnapshot",()=>this.state);this.state=t,this.listeners=new Set,this.updateTick=0}setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,o){return oa(this,t,n,r,o)}}class sa extends ef{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){g.useDebugValue(t);const r=this;ee(()=>{r.state[t]!==n&&r.set(t,n)},[r,t,n])}useSyncedValueWithCleanup(t,n){const r=this;ee(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this;if(process.env.NODE_ENV!=="production"){g.useDebugValue(t,i=>Object.keys(i));const o=g.useRef(Object.keys(t)).current,s=Object.keys(t);(o.length!==s.length||o.some((i,a)=>i!==s[a]))&&console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}const r=Object.values(t);ee(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){g.useDebugValue(t);const r=this,o=n!==void 0;if(ee(()=>{o&&!Object.is(r.state[t],n)&&r.setState({...r.state,[t]:n})},[r,t,n,o]),process.env.NODE_ENV!=="production"){const s=this.controlledValues??(this.controlledValues=new Map);s.has(t)||s.set(t,o);const i=s.get(t);i!==void 0&&i!==o&&console.error(`A component is changing the ${o?"":"un"}controlled state of ${t.toString()} to be ${o?"un":""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}}select(t,n,r,o){const s=this.selectors[t];return s(this.state,n,r,o)}useState(t,n,r,o){return g.useDebugValue(t),oa(this,this.selectors[t],n,r,o)}useContextCallback(t,n){g.useDebugValue(t);const r=se(n??je);this.context[t]=r}useStateSetter(t){const n=g.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let o=r(this.state);return n(o,o,this),this.subscribe(s=>{const i=r(s);if(!Object.is(o,i)){const a=o;o=i,n(i,a,this)}})}}const tf={open:ce(e=>e.open),transitionStatus:ce(e=>e.transitionStatus),domReferenceElement:ce(e=>e.domReferenceElement),referenceElement:ce(e=>e.positionReference??e.referenceElement),floatingElement:ce(e=>e.floatingElement),floatingId:ce(e=>e.floatingId)};class cr extends sa{constructor(n){const{syncOnly:r,nested:o,onOpenChange:s,triggerElements:i,...a}=n;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:Xu(),nested:o,triggerElements:i},tf);Ce(this,"syncOpenEvent",(n,r)=>{(!n||!this.state.open||r!=null&&_l(r))&&(this.context.dataRef.current.openEvent=n?r:void 0)});Ce(this,"dispatchOpenChange",(n,r)=>{this.syncOpenEvent(n,r.event);const o={open:n,reason:r.reason,nativeEvent:r.event,nested:this.context.nested,triggerElement:r.trigger};this.context.events.emit("openchange",o)});Ce(this,"setOpen",(n,r)=>{var o,s,i,a;if(this.syncOnly){(s=(o=this.context).onOpenChange)==null||s.call(o,n,r);return}this.dispatchOpenChange(n,r),(a=(i=this.context).onOpenChange)==null||a.call(i,n,r)});this.syncOnly=r}}function nf(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:o,nested:s,onOpenChange:i}=e,a=t.useState("open"),u=t.useState("activeTriggerElement"),c=t.useState(n?"popupElement":"positionerElement"),l=t.context.triggerElements,m=i,p=g.useRef(null);r===void 0&&p.current===null&&(p.current=new cr({open:a,transitionStatus:void 0,referenceElement:u,floatingElement:c,triggerElements:l,onOpenChange:m,floatingId:o,syncOnly:!0,nested:s}));const f=r??p.current;return t.useSyncedValue("floatingId",o),ee(()=>{const d={open:a,floatingId:o,referenceElement:u,floatingElement:c};te(u)&&(d.domReferenceElement=u),f.state.positionReference===f.state.referenceElement&&(d.positionReference=u),f.update(d)},[a,o,u,c,f]),f.context.onOpenChange=m,f.context.nested=s,f}function rf(e,t=!1,n=!1){const[r,o]=g.useState(e&&t?"idle":void 0),[s,i]=g.useState(e);return e&&!s&&(i(!0),o("starting")),!e&&s&&r!=="ending"&&!n&&o("ending"),!e&&!s&&r==="ending"&&o(void 0),ee(()=>{if(!e&&s&&r!=="ending"&&n){const a=ht.request(()=>{o("ending")});return()=>{ht.cancel(a)}}},[e,s,r,n]),ee(()=>{if(!e||t)return;const a=ht.request(()=>{o(void 0)});return()=>{ht.cancel(a)}},[t,e]),ee(()=>{if(!e||!t)return;e&&s&&r!=="idle"&&o("starting");const a=ht.request(()=>{o("idle")});return()=>{ht.cancel(a)}},[t,e,s,r]),{mounted:s,setMounted:i,transitionStatus:r}}let bn=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const of={[bn.startingStyle]:""},sf={[bn.endingStyle]:""},af={transitionStatus(e){return e==="starting"?of:e==="ending"?sf:null}};function cf(e,t=!1,n=!0){const r=zu();return se((o,s=null)=>{r.cancel();const i=Gu(e);if(i==null)return;const a=i,u=()=>{Xt.flushSync(o)};if(typeof a.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){o();return}function c(){Promise.all(a.getAnimations().map(l=>l.finished)).then(()=>{s!=null&&s.aborted||u()}).catch(()=>{if(n){s!=null&&s.aborted||u();return}const l=a.getAnimations();!(s!=null&&s.aborted)&&l.length>0&&l.some(m=>m.pending||m.playState!=="finished")&&c()})}if(t){const l=bn.startingStyle;if(!a.hasAttribute(l)){r.request(c);return}const m=new MutationObserver(()=>{a.hasAttribute(l)||(m.disconnect(),c())});m.observe(a,{attributes:!0,attributeFilter:[l]}),s==null||s.addEventListener("abort",()=>m.disconnect(),{once:!0});return}r.request(c)})}function ia(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,s=se(o),i=cf(r,n,!1);g.useEffect(()=>{if(!t)return;const a=new AbortController;return i(s,a.signal),()=>{a.abort()}},[t,n,s,i])}const lf={tabIndex:-1,[kl]:""};function uf(e,t,n=!1){const r=nr(),o=lo()!=null,s=g.useRef(null);e===void 0&&s.current===null&&(s.current=t(r,o));const i=e??s.current;return nf({popupStore:i,treatPopupAsFloatingElement:n,floatingRootContext:i.state.floatingRootContext,floatingId:r,nested:o,onOpenChange:i.setOpen}),{store:i,internalStore:s.current}}function df(e,t){const n=g.useRef(null),r=g.useRef(null);return g.useCallback(o=>{if(e===void 0)return;let s=!1;if(n.current!==null){const i=n.current,a=r.current,u=t.context.triggerElements.getById(i);a&&u===a&&(t.context.triggerElements.delete(i),s=!0),n.current=null,r.current=null}if(o!==null&&(n.current=e,r.current=o,t.context.triggerElements.add(e,o),s=!0),s){const i=t.context.triggerElements.size;t.select("open")&&t.state.triggerCount!==i&&t.set("triggerCount",i)}},[t,e])}function ff(e,t,n,r=!1){t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);const o=(n==null?void 0:n.id)??null;(o||t)&&(e.activeTriggerId=o,e.activeTriggerElement=n??null)}function mf(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function pf(e,t,n,r={}){var l,m,p;const o=n.reason,s=o===Ge,i=t&&o===jn,a=!t&&(o===sr||o===oo),u=mf(n);if((m=(l=e.context).onOpenChange)==null||m.call(l,t,n),n.isCanceled)return;(p=r.onBeforeDispatch)==null||p.call(r),e.state.floatingRootContext.dispatchOpenChange(t,n);const c=()=>{const f={...r.extraState,open:t};i?f.instantType="focus":a?f.instantType="dismiss":s&&(f.instantType=void 0),ff(f,t,n.trigger,u()),e.update(f)};s?Xt.flushSync(c):c()}function gf(e,t,n,r){$d(()=>{t===void 0&&e.state.open===!1&&n&&(e.state={...e.state,open:!0,activeTriggerId:r,preventUnmountingOnClose:!1})})}function hf(e,t,n,r){const o=n.useState("isMountedByTrigger",e),s=df(e,n),i=se(a=>{if(s(a),!a)return;const u=n.select("open"),c=n.select("activeTriggerId");if(c===e){n.update({activeTriggerElement:a,...u?r:null});return}c==null&&u&&n.update({activeTriggerId:e,activeTriggerElement:a,...r})});return ee(()=>{o&&n.update({activeTriggerElement:t.current,...r})},[o,n,t,...Object.values(r)]),{registerTrigger:i,isMountedByThisTrigger:o}}function bf(e,t={}){const{closeOnActiveTriggerUnmount:n=!1}=t,r=e.useState("open"),o=e.useState("triggerCount");ee(()=>{if(!r){e.state.triggerCount!==0&&e.set("triggerCount",0);return}const s=e.context.triggerElements.size,i={};e.state.triggerCount!==s&&(i.triggerCount=s);const a=e.select("activeTriggerId");let u=null;if(a){const c=e.context.triggerElements.getById(a);c?c!==e.state.activeTriggerElement&&(i.activeTriggerElement=c):u=a}if(!u&&!a&&s===1){const c=e.context.triggerElements.entries().next();if(!c.done){const[l,m]=c.value;i.activeTriggerId=l,i.activeTriggerElement=m}}(i.triggerCount!==void 0||i.activeTriggerId!==void 0||i.activeTriggerElement!==void 0)&&e.update(i),u&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===u&&!e.context.triggerElements.getById(u)){const c=ye(or);e.setOpen(!1,c),c.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[r,e,o,n])}function xf(e,t,n){const{mounted:r,setMounted:o,transitionStatus:s}=rf(e),i=t.useState("preventUnmountingOnClose"),a=e?!1:i;t.useSyncedValues({mounted:r,transitionStatus:s,preventUnmountingOnClose:a});const u=se(()=>{var c,l;o(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),(l=(c=t.context).onOpenChangeComplete)==null||l.call(c,!1)});return ia({enabled:r&&!e&&!a,open:e,ref:t.context.popupRef,onComplete(){e||u()}}),{forceUnmount:u,transitionStatus:s}}function vf(e,t){e.useSyncedValues(t),ee(()=>()=>{e.update({activeTriggerProps:De,inactiveTriggerProps:De,popupProps:De})},[e])}class mo{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);if(r!==n&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(n),this.idMap.set(t,n),process.env.NODE_ENV!=="production"&&this.elementsSet.size!==this.idMap.size))throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.")}delete(t){const n=this.idMap.get(t);n&&(this.elementsSet.delete(n),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(const n of this.elementsSet)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function yf(){return new cr({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new mo,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function wf(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:yf(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:De,inactiveTriggerProps:De,popupProps:De}}function Ef(e,t,n=!1){return new cr({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}const fn=ce(e=>e.triggerIdProp??e.activeTriggerId),po=ce(e=>e.openProp??e.open),Rs=ce(e=>{var n;return(((n=e.popupElement)==null?void 0:n.id)??e.floatingId)||void 0});function aa(e,t){return t!==void 0&&po(e)&&fn(e)===t}function Sf(e,t){return aa(e,t)?!0:t!==void 0&&po(e)&&fn(e)==null&&e.triggerCount===1}const Rf={open:po,mounted:ce(e=>e.mounted),transitionStatus:ce(e=>e.transitionStatus),floatingRootContext:ce(e=>e.floatingRootContext),triggerCount:ce(e=>e.triggerCount),preventUnmountingOnClose:ce(e=>e.preventUnmountingOnClose),payload:ce(e=>e.payload),activeTriggerId:fn,activeTriggerElement:ce(e=>e.mounted?e.activeTriggerElement:null),popupId:Rs,isTriggerActive:ce((e,t)=>t!==void 0&&fn(e)===t),isOpenedByTrigger:ce((e,t)=>aa(e,t)),isMountedByTrigger:ce((e,t)=>t!==void 0&&fn(e)===t&&e.mounted),triggerProps:ce((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:ce((e,t)=>Sf(e,t)?Rs(e):void 0),popupProps:ce(e=>e.popupProps),popupElement:ce(e=>e.popupElement),positionerElement:ce(e=>e.positionerElement)};function kf(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,o=nr(),s=lo()!=null;if(process.env.NODE_ENV!=="production"){const a=r.reference;a&&!te(a)&&console.error("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `context.setPositionReference()`","instead.")}const i=mt(()=>new cr({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new mo,floatingId:o,syncOnly:!1,nested:s})).current;return ee(()=>{const a={open:t,floatingId:o};r.reference!==void 0&&(a.referenceElement=r.reference,a.domReferenceElement=te(r.reference)?r.reference:null),r.floating!==void 0&&(a.floatingElement=r.floating),i.update(a)},[t,o,r.reference,r.floating,i]),i.context.onOpenChange=n,i.context.nested=s,i}function Cf(e={}){const{nodeId:t,externalTree:n}=e,r=kf(e),o=e.rootContext||r,s=o.useState("referenceElement"),i=o.useState("floatingElement"),a=o.useState("domReferenceElement"),u=o.useState("open"),c=o.useState("floatingId"),[l,m]=g.useState(null),[p,f]=g.useState(void 0),[d,h]=g.useState(void 0),x=g.useRef(null),w=ir(n),v=g.useMemo(()=>({reference:s,floating:i,domReference:a}),[s,i,a]),k=jd({...e,elements:{...v,...l&&{reference:l}}}),y=te(p)?p:null,N=d===void 0?o.state.floatingElement:d;o.useSyncedValue("referenceElement",p??null),o.useSyncedValue("domReferenceElement",p===void 0?a:y),o.useSyncedValue("floatingElement",N);const T=g.useCallback(L=>{const $=te(L)?{getBoundingClientRect:()=>L.getBoundingClientRect(),getClientRects:()=>L.getClientRects(),contextElement:L}:L;m($),k.refs.setReference($)},[k.refs]),C=g.useCallback(L=>{(te(L)||L===null)&&(x.current=L,f(L)),(te(k.refs.reference.current)||k.refs.reference.current===null||L!==null&&!te(L))&&k.refs.setReference(L)},[k.refs,f]),E=g.useCallback(L=>{h(L),k.refs.setFloating(L)},[k.refs]),O=g.useMemo(()=>({...k.refs,setReference:C,setFloating:E,setPositionReference:T,domReference:x}),[k.refs,C,E,T]),A=g.useMemo(()=>({...k.elements,domReference:a}),[k.elements,a]),X=g.useMemo(()=>({...k,dataRef:o.context.dataRef,open:u,onOpenChange:o.setOpen,events:o.context.events,floatingId:c,refs:O,elements:A,nodeId:t,rootStore:o}),[k,O,A,t,o,u,c]);return ee(()=>{a&&(x.current=a)},[a]),ee(()=>{o.context.dataRef.current.floatingContext=X;const L=w==null?void 0:w.nodesRef.current.find($=>$.id===t);L&&(L.context=X)}),g.useMemo(()=>({...k,context:X,refs:O,elements:A,rootStore:o}),[k,O,A,X,o])}const kr=hi&&rn;function Tf(e,t={}){const{enabled:n=!0,delay:r}=t,o="rootStore"in e?e.rootStore:e,{events:s,dataRef:i}=o.context,a=g.useRef(!1),u=g.useRef(null),c=g.useRef(!0),l=ft();g.useEffect(()=>{const p=o.select("domReferenceElement");if(!n)return;const f=Pe(p);function d(){const w=o.select("domReferenceElement");!o.select("open")&&Le(w)&&w===Mr(Je(w))&&(a.current=!0)}function h(){c.current=!0}function x(){c.current=!1}return Nt(me(f,"blur",d),kr&&me(f,"keydown",h,!0),kr&&me(f,"pointerdown",x,!0))},[o,n]),g.useEffect(()=>{if(!n)return;function p(f){if(f.reason===sr||f.reason===oo){const d=o.select("domReferenceElement");te(d)&&(u.current=d,a.current=!0)}}return s.on("openchange",p),()=>{s.off("openchange",p)}},[s,n,o]);const m=g.useMemo(()=>{function p(){a.current=!1,u.current=null}return{onMouseLeave(){p()},onFocus(f){const d=f.currentTarget;if(a.current){if(u.current===d)return;p()}const h=bt(f.nativeEvent);if(te(h)){if(kr&&!f.relatedTarget){if(!c.current&&!Tl(h))return}else if(!Pl(h))return}const x=Hn(f.relatedTarget,o.context.triggerElements),{nativeEvent:w,currentTarget:v}=f,k=typeof r=="function"?r():r;if(o.select("open")&&x||k===0||k===void 0){o.setOpen(!0,ye(jn,w,v));return}l.start(k,()=>{a.current||o.setOpen(!0,ye(jn,w,v))})},onBlur(f){p();const d=f.relatedTarget,h=f.nativeEvent,x=te(d)&&d.hasAttribute(ao("focus-guard"))&&d.getAttribute("data-type")==="outside";l.start(0,()=>{var y;const w=o.select("domReferenceElement"),v=Mr(Je(w));!d&&v===w||he((y=i.current.floatingContext)==null?void 0:y.refs.floating.current,v)||he(w,v)||x||Hn(d??v,o.context.triggerElements)||o.setOpen(!1,ye(jn,h))})}}},[i,r,o,l]);return g.useMemo(()=>n?{reference:m,trigger:m}:{},[n,m])}class go{constructor(){Ce(this,"dispose",()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()});Ce(this,"disposeEffect",()=>this.dispose);this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new yt,this.restTimeout=new yt,this.handleCloseOptions=void 0}static create(){return new go}}const qn=new WeakMap;function Kn(e){var n,r,o;if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&qn.get(t)===e&&((n=e.pointerEventsScopeElement)==null||n.style.removeProperty("pointer-events"),(r=e.pointerEventsReferenceElement)==null||r.style.removeProperty("pointer-events"),(o=e.pointerEventsFloatingElement)==null||o.style.removeProperty("pointer-events"),qn.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function ca(e,t){const{scopeElement:n,referenceElement:r,floatingElement:o}=t,s=qn.get(n);s&&s!==e&&Kn(s),Kn(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=o,qn.set(n,e),n.style.pointerEvents="none",r.style.pointerEvents="auto",o.style.pointerEvents="auto"}function ho(e){const t=e.context.dataRef.current,n=mt(()=>t.hoverInteractionState??go.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=n),Gr(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Of(e,t={}){const{enabled:n=!0,closeDelay:r=0,nodeId:o}=t,s="rootStore"in e?e.rootStore:e,i=s.useState("open"),a=s.useState("floatingElement"),u=s.useState("domReferenceElement"),{dataRef:c}=s.context,l=ir(),m=lo(),p=ho(s),f=ft(),d=se(()=>{var w;return Ui((w=c.current.openEvent)==null?void 0:w.type,p.interactedInside)}),h=se(()=>{var w;return Mu((w=c.current.openEvent)==null?void 0:w.type)}),x=se(()=>{Kn(p)});ee(()=>{i||(p.pointerType=void 0,p.restTimeoutPending=!1,p.interactedInside=!1,x())},[i,p,x]),g.useEffect(()=>x,[x]),ee(()=>{var w,v,k,y,N;if(n&&i&&(w=p.handleCloseOptions)!=null&&w.blockPointerEvents&&h()&&te(u)&&a){const T=u,C=a,E=Je(a),O=(k=(v=l==null?void 0:l.nodesRef.current.find($=>$.id===m))==null?void 0:v.context)==null?void 0:k.elements.floating;O&&(O.style.pointerEvents="");const A=p.pointerEventsScopeElement!==C?p.pointerEventsScopeElement:null,X=O!==C?O:null,L=((N=(y=p.handleCloseOptions)==null?void 0:y.getScope)==null?void 0:N.call(y))??A??X??T.closest("[data-rootownerid]")??E.body;return ca(p,{scopeElement:L,referenceElement:T,floatingElement:C}),()=>{x()}}},[n,i,u,a,p,h,l,m,x]),g.useEffect(()=>{if(!n)return;function w(){return!!(l&&m&&Qt(l.nodesRef.current,m).length>0)}function v(E){const O=tn(r,"close",p.pointerType),A=()=>{s.setOpen(!1,ye(Ge,E)),l==null||l.events.emit("floating.closed",E)};O?p.openChangeTimeout.start(O,A):(p.openChangeTimeout.clear(),A())}function k(E){const O=bt(E);if(!Ol(O)){p.interactedInside=!1;return}p.interactedInside=(O==null?void 0:O.closest("[aria-haspopup]"))!=null}function y(){p.openChangeTimeout.clear(),f.clear(),l==null||l.events.off("floating.closed",T),x()}function N(E){var L;if(w()&&l){l.events.on("floating.closed",T);return}if(Hn(E.relatedTarget,s.context.triggerElements))return;const O=((L=c.current.floatingContext)==null?void 0:L.nodeId)??o,A=E.relatedTarget;if(!(l&&O&&te(A)&&Qt(l.nodesRef.current,O,!1).some($=>{var W;return he((W=$.context)==null?void 0:W.elements.floating,A)}))){if(p.handler){p.handler(E);return}x(),h()&&!d()&&v(E)}}function T(E){!l||!m||w()||f.start(0,()=>{l.events.off("floating.closed",T),s.setOpen(!1,ye(Ge,E)),l.events.emit("floating.closed",E)})}const C=a;return Nt(C&&me(C,"mouseenter",y),C&&me(C,"mouseleave",N),C&&me(C,"pointerdown",k,!0),()=>{l==null||l.events.off("floating.closed",T)})},[n,a,s,c,r,o,h,d,x,p,l,m,f])}const Pf={current:null};function Nf(e,t={}){var I;const{enabled:n=!0,delay:r=0,handleClose:o=null,mouseOnly:s=!1,restMs:i=0,move:a=!0,triggerElementRef:u=Pf,externalTree:c,isActiveTrigger:l=!0,getHandleCloseContext:m,isClosing:p,shouldOpen:f}=t,d="rootStore"in e?e.rootStore:e,{dataRef:h,events:x}=d.context,w=ir(c),v=ho(d),k=g.useRef(!1),y=it(o),N=it(r),T=it(i),C=it(n),E=it(f),O=it(p),A=se(()=>{var D;return Ui((D=h.current.openEvent)==null?void 0:D.type,v.interactedInside)}),X=se(()=>{var D;return((D=E.current)==null?void 0:D.call(E))!==!1}),L=se((D,_,V)=>{const B=d.context.triggerElements;if(B.hasElement(_))return!D||!he(D,_);if(!te(V))return!1;const R=V;return B.hasMatchingElement(S=>he(S,R))&&(!D||!he(D,R))}),$=se(()=>{if(!v.handler)return;Je(d.select("domReferenceElement")).removeEventListener("mousemove",v.handler),v.handler=void 0}),W=se(()=>{Kn(v)});return l&&(v.handleCloseOptions=(I=y.current)==null?void 0:I.__options),g.useEffect(()=>$,[$]),g.useEffect(()=>{if(!n)return;function D(_){_.open?k.current=!1:(k.current=_.reason===Ge,$(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return x.on("openchange",D),()=>{x.off("openchange",D)}},[n,x,v,$]),g.useEffect(()=>{if(!n)return;function D(R,S=!0){const P=tn(N.current,"close",v.pointerType);P?v.openChangeTimeout.start(P,()=>{d.setOpen(!1,ye(Ge,R)),w==null||w.events.emit("floating.closed",R)}):S&&(v.openChangeTimeout.clear(),d.setOpen(!1,ye(Ge,R)),w==null||w.events.emit("floating.closed",R))}const _=u.current??(l?d.select("domReferenceElement"):null);if(!te(_))return;function V(R){var we;if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,s&&!hn(v.pointerType))return;const S=cs(T.current),P=tn(N.current,"open",v.pointerType),j=bt(R),F=R.currentTarget??null,z=d.select("domReferenceElement");let M=F;if(te(j)&&!d.context.triggerElements.hasElement(j)){for(const be of d.context.triggerElements.elements())if(he(be,j)){M=be;break}}te(F)&&te(z)&&!d.context.triggerElements.hasElement(F)&&he(F,z)&&(M=z);const H=M==null?!1:L(z,M,j),Z=d.select("open"),q=((we=O.current)==null?void 0:we.call(O))??d.select("transitionStatus")==="ending",le=!Z&&q&&k.current,re=!H&&te(M)&&te(z)&&he(z,M)&&le,Q=S>0&&!P,ie=H&&(Z||le)||re,K=!Z||H;if(ie){X()&&d.setOpen(!0,ye(Ge,R,M));return}Q||(P?v.openChangeTimeout.start(P,()=>{K&&X()&&d.setOpen(!0,ye(Ge,R,M))}):K&&X()&&d.setOpen(!0,ye(Ge,R,M)))}function B(R){if(A()){W();return}$();const S=d.select("domReferenceElement"),P=Je(S);v.restTimeout.clear(),v.restTimeoutPending=!1;const j=h.current.floatingContext??(m==null?void 0:m());if(Hn(R.relatedTarget,d.context.triggerElements))return;if(y.current&&j){d.select("open")||v.openChangeTimeout.clear();const z=u.current;v.handler=y.current({...j,tree:w,x:R.clientX,y:R.clientY,onClose(){W(),$(),C.current&&!A()&&z===d.select("domReferenceElement")&&D(R,!0)}}),P.addEventListener("mousemove",v.handler),v.handler(R);return}(v.pointerType==="touch"?!he(d.select("floatingElement"),R.relatedTarget):!0)&&D(R)}return a?Nt(me(_,"mousemove",V,{once:!0}),me(_,"mouseenter",V),me(_,"mouseleave",B)):Nt(me(_,"mouseenter",V),me(_,"mouseleave",B))},[$,W,h,N,d,n,y,v,l,L,A,s,a,T,u,w,C,m,O,X]),g.useMemo(()=>{if(!n)return;function D(_){v.pointerType=_.pointerType}return{onPointerDown:D,onPointerEnter:D,onMouseMove(_){var z,M,H;const{nativeEvent:V}=_,B=_.currentTarget,R=d.select("domReferenceElement"),S=d.select("open"),P=L(R,B,_.target);if(s&&!hn(v.pointerType))return;if(S&&P&&((z=v.handleCloseOptions)!=null&&z.blockPointerEvents)){const Z=d.select("floatingElement");if(Z){const q=((H=(M=v.handleCloseOptions)==null?void 0:M.getScope)==null?void 0:H.call(M))??B.ownerDocument.body;ca(v,{scopeElement:q,referenceElement:B,floatingElement:Z})}}const j=cs(T.current);if(S&&!P||j===0||!P&&v.restTimeoutPending&&_.movementX**2+_.movementY**2<2)return;v.restTimeout.clear();function F(){if(v.restTimeoutPending=!1,A())return;const Z=d.select("open");!v.blockMouseMove&&(!Z||P)&&X()&&d.setOpen(!0,ye(Ge,V,B))}v.pointerType==="touch"?Xt.flushSync(()=>{F()}):P&&S?F():(v.restTimeoutPending=!0,v.restTimeout.start(j,F))}}},[n,v,A,L,s,d,T,X])}const ks=.1,_f=ks*ks,de=.5;function _n(e,t,n,r,o,s){return r>=t!=s>=t&&e<=(o-n)*(t-r)/(s-r)+n}function An(e,t,n,r,o,s,i,a,u,c){let l=!1;return _n(e,t,n,r,o,s)&&(l=!l),_n(e,t,o,s,i,a)&&(l=!l),_n(e,t,i,a,u,c)&&(l=!l),_n(e,t,u,c,n,r)&&(l=!l),l}function Af(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function In(e,t,n,r,o,s){const i=Math.min(n,o),a=Math.max(n,o),u=Math.min(r,s),c=Math.max(r,s);return e>=i&&e<=a&&t>=u&&t<=c}function If(e={}){const{blockPointerEvents:t=!1}=e,n=new yt,r=({x:o,y:s,placement:i,elements:a,onClose:u,nodeId:c,tree:l})=>{const m=i==null?void 0:i.split("-")[0];let p=!1,f=null,d=null,h=typeof performance<"u"?performance.now():0;function x(v,k){const y=performance.now(),N=y-h;if(f===null||d===null||N===0)return f=v,d=k,h=y,!1;const T=v-f,C=k-d,E=T*T+C*C,O=N*N*_f;return f=v,d=k,h=y,E<O}function w(){n.clear(),u()}return function(k){n.clear();const y=a.domReference,N=a.floating;if(!y||!N||m==null||o==null||s==null)return;const{clientX:T,clientY:C}=k,E=bt(k),O=k.type==="mouseleave",A=he(N,E),X=he(y,E);if(A&&(p=!0,!O))return;if(X&&(p=!1,!O)){p=!0;return}if(O&&te(k.relatedTarget)&&he(N,k.relatedTarget))return;function L(){return!!(l&&Qt(l.nodesRef.current,c).length>0)}function $(){L()||w()}if(L())return;const W=y.getBoundingClientRect(),I=N.getBoundingClientRect(),D=o>I.right-I.width/2,_=s>I.bottom-I.height/2,V=I.width>W.width,B=I.height>W.height,R=(V?W:I).left,S=(V?W:I).right,P=(B?W:I).top,j=(B?W:I).bottom;if(m==="top"&&s>=W.bottom-1||m==="bottom"&&s<=W.top+1||m==="left"&&o>=W.right-1||m==="right"&&o<=W.left+1){$();return}let F=!1;switch(m){case"top":F=In(T,C,R,W.top+1,S,I.bottom-1);break;case"bottom":F=In(T,C,R,I.top+1,S,W.bottom-1);break;case"left":F=In(T,C,I.right-1,j,W.left+1,P);break;case"right":F=In(T,C,W.right-1,j,I.left+1,P);break}if(F)return;if(p&&!Af(T,C,W)){$();return}if(!O&&x(T,C)){$();return}let z=!1;switch(m){case"top":{const M=V?de/2:de*4,H=V||D?o+M:o-M,Z=V?o-M:D?o+M:o-M,q=s+de+1,le=D||V?I.bottom-de:I.top,re=D?V?I.bottom-de:I.top:I.bottom-de;z=An(T,C,H,q,Z,q,I.left,le,I.right,re);break}case"bottom":{const M=V?de/2:de*4,H=V||D?o+M:o-M,Z=V?o-M:D?o+M:o-M,q=s-de,le=D||V?I.top+de:I.bottom,re=D?V?I.top+de:I.bottom:I.top+de;z=An(T,C,H,q,Z,q,I.left,le,I.right,re);break}case"left":{const M=B?de/2:de*4,H=B||_?s+M:s-M,Z=B?s-M:_?s+M:s-M,q=o+de+1,le=_||B?I.right-de:I.left,re=_?B?I.right-de:I.left:I.right-de;z=An(T,C,le,I.top,re,I.bottom,q,H,q,Z);break}case"right":{const M=B?de/2:de*4,H=B||_?s+M:s-M,Z=B?s-M:_?s+M:s-M,q=o-de,le=_||B?I.left+de:I.right,re=_?B?I.left+de:I.right:I.left+de;z=An(T,C,q,H,q,Z,le,I.top,re,I.bottom);break}}z?p||n.start(40,$):$()}};return r.__options={...e,blockPointerEvents:t},r}const Mf={...Rf,disabled:ce(e=>e.disabled),instantType:ce(e=>e.instantType),isInstantPhase:ce(e=>e.isInstantPhase),trackCursorAxis:ce(e=>e.trackCursorAxis),disableHoverablePopup:ce(e=>e.disableHoverablePopup),lastOpenChangeReason:ce(e=>e.openChangeReason),closeOnClick:ce(e=>e.closeOnClick),closeDelay:ce(e=>e.closeDelay),hasViewport:ce(e=>e.hasViewport)};class bo extends sa{constructor(n,r,o=!1){const s=new mo,i={...jf(),...n};i.floatingRootContext=Ef(s,r,o);super(i,{popupRef:g.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:s},Mf);Ce(this,"setOpen",(n,r)=>{pf(this,n,r,{extraState:{openChangeReason:r.reason}})})}cancelPendingOpen(n){this.state.floatingRootContext.dispatchOpenChange(!1,ye(sr,n))}static useStore(n,r){return uf(n,(s,i)=>new bo(r,s,i)).store}}function jf(){return{...wf(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}const la=Yi(function(t){const{disabled:n=!1,defaultOpen:r=!1,open:o,disableHoverablePopup:s=!1,trackCursorAxis:i="none",actionsRef:a,onOpenChange:u,onOpenChangeComplete:c,handle:l,triggerId:m,defaultTriggerId:p=null,children:f}=t,d=bo.useStore(l==null?void 0:l.store,{open:r,openProp:o,activeTriggerId:p,triggerIdProp:m});gf(d,o,r,p),d.useControlledProp("openProp",o),d.useControlledProp("triggerIdProp",m),d.useContextCallback("onOpenChange",u),d.useContextCallback("onOpenChangeComplete",c);const h=d.useState("open"),x=!n&&h,w=d.useState("activeTriggerId"),v=d.useState("mounted"),k=d.useState("payload");d.useSyncedValues({trackCursorAxis:i,disableHoverablePopup:s}),d.useSyncedValue("disabled",n),bf(d,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:y,transitionStatus:N}=xf(x,d),T=d.useState("isInstantPhase"),C=d.useState("instantType"),E=d.useState("lastOpenChangeReason"),O=g.useRef(null);ee(()=>{h&&n&&d.setOpen(!1,ye(Cu))},[h,n,d]),ee(()=>{N==="ending"&&E===or||N!=="ending"&&T?(C!=="delay"&&(O.current=C),d.set("instantType","delay")):O.current!==null&&(d.set("instantType",O.current),O.current=null)},[N,T,E,C,d]),ee(()=>{x&&w==null&&d.set("payload",void 0)},[d,w,x]);const A=g.useCallback(()=>{d.setOpen(!1,ye(Tu))},[d]);g.useImperativeHandle(a,()=>({unmount:y,close:A}),[y,A]);const X=x||v||!n&&i!=="none";return b.jsxs(so.Provider,{value:d,children:[X&&b.jsx(Df,{store:d,disabled:n,trackCursorAxis:i}),typeof f=="function"?f({payload:k}):f]})});process.env.NODE_ENV!=="production"&&(la.displayName="TooltipRoot");function Df({store:e,disabled:t,trackCursorAxis:n}){const r=e.useState("floatingRootContext"),o=Qu(r,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),s=Ku(r,{enabled:!t&&n!=="none",axis:n==="none"?void 0:n}),i=g.useMemo(()=>Yt(s.reference,o.reference),[s.reference,o.reference]),a=g.useMemo(()=>Yt(s.trigger,o.trigger),[s.trigger,o.trigger]),u=g.useMemo(()=>Yt(lf,s.floating,o.floating),[s.floating,o.floating]);return vf(e,{activeTriggerProps:i,inactiveTriggerProps:a,popupProps:u}),null}let xo=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=bn.startingStyle]="startingStyle",e[e.endingStyle=bn.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),ua=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const Lf={[ua.popupOpen]:""},Vf={[xo.open]:""},Ff={[xo.closed]:""},zf={[xo.anchorHidden]:""},Bf={open(e){return e?Lf:null}},vo={open(e){return e?Vf:Ff},anchorHidden(e){return e?zf:null}},yo=g.createContext(void 0);process.env.NODE_ENV!=="production"&&(yo.displayName="TooltipProviderContext");function $f(){return g.useContext(yo)}let Hf=(function(e){return e[e.popupOpen=ua.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});const Wf=600,da="data-base-ui-tooltip-trigger";function Cs(e){if("composedPath"in e){const n=e.composedPath();for(let r=0;r<n.length;r+=1){const o=n[r];if(te(o))return o}}const t=e.target;return te(t)?t:null}function Yf(e){let t=e;for(;t;){if(t.hasAttribute(da))return t;const n=t.parentElement;if(n){t=n;continue}const r=t.getRootNode();t="host"in r&&te(r.host)?r.host:null}return null}const fa=_u(function(t,n){const{render:r,className:o,style:s,handle:i,payload:a,disabled:u,delay:c,closeOnClick:l=!0,closeDelay:m,id:p,...f}=t,d=vn(!0),h=(i==null?void 0:i.store)??d;if(!h)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle.":at(82));const x=xn(p),w=h.useState("isTriggerActive",x),v=h.useState("isOpenedByTrigger",x),k=h.useState("floatingRootContext"),y=g.useRef(null),N=c??Wf,T=m??0,{registerTrigger:C,isMountedByThisTrigger:E}=hf(x,y,h,{payload:a,closeOnClick:l,closeDelay:T}),O=$f(),{delayRef:A,isInstantPhase:X,hasProvider:L}=Lu(k,{open:v}),$=ho(k);h.useSyncedValue("isInstantPhase",X);const W=h.useState("disabled"),I=u??W,D=it(I),_=h.useState("trackCursorAxis"),V=h.useState("disableHoverablePopup"),B=g.useRef(!1),R=ft(),S=g.useRef(void 0);function P(){const Q=O==null?void 0:O.delay,ie=typeof A.current=="object"?A.current.open:void 0;let K=N;return L&&(ie!==0?K=c??Q??N:K=0),K}function j(Q){const ie=y.current;if(!ie||!Q)return!1;const K=Yf(Q);return K!==null&&K!==ie&&he(ie,K)}function F(Q){const ie=j(Q);return B.current=ie,ie&&($.openChangeTimeout.clear(),$.restTimeout.clear(),$.restTimeoutPending=!1,R.clear()),ie}const z=Nf(k,{enabled:!I,mouseOnly:!0,move:!1,handleClose:!V&&_!=="both"?If():null,restMs:P,delay(){const Q=typeof A.current=="object"?A.current.close:void 0;let ie=T;return m==null&&L&&(ie=Q),{close:ie}},triggerElementRef:y,isActiveTrigger:w,isClosing:()=>h.select("transitionStatus")==="ending",shouldOpen(){return!B.current}}),M=Tf(k,{enabled:!I}).reference,H=Q=>{const ie=B.current,K=Cs(Q),we=F(K),be=y.current,Ee=be&&K&&he(be,K);if(we&&h.select("open")&&h.select("lastOpenChangeReason")===Ge){h.setOpen(!1,ye(Ge,Q));return}if(ie&&!we&&Ee&&!D.current&&!h.select("open")&&be&&hn(S.current)){const Se=()=>{!B.current&&!D.current&&!h.select("open")&&h.setOpen(!0,ye(Ge,Q,be))},Ie=P();Ie===0?(R.clear(),Se()):R.start(Ie,Se)}},Z=h.useState("triggerProps",E);return Ue("button",t,{state:{open:v},ref:[n,C,y],props:[z,M,E||_!=="none"?Z:void 0,{onMouseOver(Q){H(Q.nativeEvent)},onFocus(Q){j(Cs(Q.nativeEvent))&&Q.preventBaseUIHandler()},onMouseLeave(){B.current=!1,R.clear(),S.current=void 0},onPointerEnter(Q){S.current=Q.pointerType},onPointerDown(Q){S.current=Q.pointerType,h.set("closeOnClick",l),l&&!h.select("open")&&h.cancelPendingOpen(Q.nativeEvent)},onClick(Q){l&&!h.select("open")&&h.cancelPendingOpen(Q.nativeEvent)},id:x,[Hf.triggerDisabled]:I?"":void 0,[da]:I?void 0:""},f],stateAttributesMapping:Bf})});process.env.NODE_ENV!=="production"&&(fa.displayName="TooltipTrigger");const wo=g.createContext(void 0);process.env.NODE_ENV!=="production"&&(wo.displayName="TooltipPortalContext");function Uf(){const e=g.useContext(wo);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Tooltip.Portal> is missing.":at(70));return e}const ma=g.forwardRef(function(t,n){const{children:r,container:o,className:s,render:i,style:a,...u}=t,{portalNode:c,portalSubtree:l}=Xi({container:o,ref:n,componentProps:t,elementProps:u});return!l&&!c?null:b.jsxs(g.Fragment,{children:[l,c&&Xt.createPortal(r,c)]})});process.env.NODE_ENV!=="production"&&(ma.displayName="FloatingPortalLite");const pa=g.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t;return vn().useState("mounted")||r?b.jsx(wo.Provider,{value:r,children:b.jsx(ma,{ref:n,...o})}):null});process.env.NODE_ENV!=="production"&&(pa.displayName="TooltipPortal");const Eo=g.createContext(void 0);process.env.NODE_ENV!=="production"&&(Eo.displayName="TooltipPositionerContext");function ga(){const e=g.useContext(Eo);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>.":at(71));return e}const Xf=e=>({name:"arrow",options:e,async fn(t){var B,R;const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:u}=t,{element:c,padding:l=0,offsetParent:m="real"}=wt(e,t)||{};if(c==null)return{};const p=vi(l),f={x:n,y:r},d=eo(o),h=Qr(d),x=await i.getDimensions(c),w=d==="y",v=w?"top":"left",k=w?"bottom":"right",y=w?"clientHeight":"clientWidth",N=s.reference[h]+s.reference[d]-f[d]-s.floating[h],T=f[d]-s.reference[d],C=m==="real"?await((B=i.getOffsetParent)==null?void 0:B.call(i,c)):a.floating;let E=a.floating[y]||s.floating[h];(!E||!await((R=i.isElement)==null?void 0:R.call(i,C)))&&(E=a.floating[y]||s.floating[h]);const O=N/2-T/2,A=E/2-x[h]/2-1,X=Math.min(p[v],A),L=Math.min(p[k],A),$=X,W=E-x[h]-L,I=E/2-x[h]/2+O,D=xi($,I,W),_=!u.arrow&&It(o)!=null&&I!==D&&s.reference[h]/2-(I<$?X:L)-x[h]/2<0,V=_?I<$?I-$:I-W:0;return{[d]:f[d]+V,data:{[d]:D,centerOffset:I-D-V,..._&&{alignmentOffset:V}},reset:_}}}),Gf=(e,t)=>({...Xf(e),options:[e,t]}),qf=Bd().fn,Kf={name:"hide",async fn(e){var a;const{width:t,height:n,x:r,y:o}=e.rects.reference,s=t===0&&n===0&&r===0&&o===0;return{data:{referenceHidden:((a=(await qf(e)).data)==null?void 0:a.referenceHidden)||s}}}},Ln={sideX:"left",sideY:"top"},Jf={name:"adaptiveOrigin",async fn(e){var v,k;const{x:t,y:n,rects:{floating:r},elements:{floating:o},platform:s,strategy:i,placement:a}=e,u=Pe(o),c=u.getComputedStyle(o);if(!(c.transitionDuration!=="0s"&&c.transitionDuration!==""))return{x:t,y:n,data:Ln};const m=await((v=s.getOffsetParent)==null?void 0:v.call(s,o));let p={width:0,height:0};if(i==="fixed"&&(u!=null&&u.visualViewport))p={width:u.visualViewport.width,height:u.visualViewport.height};else if(m===u){const y=Je(o);p={width:y.documentElement.clientWidth,height:y.documentElement.clientHeight}}else await((k=s.isElement)==null?void 0:k.call(s,m))&&(p=await s.getDimensions(m));const f=qe(a);let d=t,h=n;f==="left"&&(d=p.width-(t+r.width)),f==="top"&&(h=p.height-(n+r.height));const x=f==="left"?"right":Ln.sideX,w=f==="top"?"bottom":Ln.sideY;return{x:d,y:h,data:{sideX:x,sideY:w}}}};function ha(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function Ts(e,t,n){const{rects:r,placement:o}=e;return{side:ha(t,qe(o),n),align:It(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Zf(e){var Vt,Ft;const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,collisionBoundary:a,collisionPadding:u=5,sticky:c=!1,arrowPadding:l=5,disableAnchorTracking:m=!1,inline:p,keepMounted:f=!1,floatingRootContext:d,mounted:h,collisionAvoidance:x,shiftCrossAxis:w=!1,nodeId:v,adaptiveOrigin:k,lazyFlip:y=!1,externalTree:N}=e,[T,C]=g.useState(null);!h&&T!==null&&C(null);const E=x.side||"flip",O=x.align||"flip",A=x.fallbackAxisSide||"end",X=typeof t=="function"?t:void 0,L=se(X),$=X?L:t,W=it(t),I=it(h),_=to()==="rtl",V=T||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":_?"left":"right","inline-start":_?"right":"left"}[r],B=s==="center"?V:`${V}-${s}`;let R=u;const S=1,P=r==="bottom"?S:0,j=r==="top"?S:0,F=r==="right"?S:0,z=r==="left"?S:0;typeof R=="number"?R={top:R+P,right:R+z,bottom:R+j,left:R+F}:R&&(R={top:(R.top||0)+P,right:(R.right||0)+z,bottom:(R.bottom||0)+j,left:(R.left||0)+F});const M={boundary:a==="clipping-ancestors"?"clippingAncestors":a,padding:R},H=g.useRef(null),Z=it(o),q=it(i),le=typeof o!="function"?o:0,re=typeof i!="function"?i:0,Q=[];p&&Q.push(p),Q.push(Dd(ue=>{const Ne=Ts(ue,r,_),$e=typeof Z.current=="function"?Z.current(Ne):Z.current,Me=typeof q.current=="function"?q.current(Ne):q.current;return{mainAxis:$e,crossAxis:Me,alignmentAxis:Me}},[le,re,_,r]));const ie=O==="none"&&E!=="shift",K=!ie&&(c||w||E==="shift"),we=E==="none"?null:Fd({...M,padding:{top:R.top+S,right:R.right+S,bottom:R.bottom+S,left:R.left+S},mainAxis:!w&&E==="flip",crossAxis:O==="flip"?"alignment":!1,fallbackAxisSideDirection:A}),be=ie?null:Ld(ue=>{const Ne=Je(ue.elements.floating).documentElement;return{...M,rootBoundary:w?{x:0,y:0,width:Ne.clientWidth,height:Ne.clientHeight}:void 0,mainAxis:O!=="none",crossAxis:K,limiter:c||w?void 0:Vd($e=>{if(!H.current)return{};const{width:Me,height:ot}=H.current.getBoundingClientRect(),Ae=nt(qe($e.placement)),ae=Ae==="y"?Me:ot,He=Ae==="y"?R.left+R.right:R.top+R.bottom;return{offset:ae/2+He/2}})}},[M,c,w,R,O]);E==="shift"||O==="shift"||s==="center"?Q.push(be,we):Q.push(we,be),Q.push(zd({...M,apply({elements:{floating:ue},availableWidth:Ne,availableHeight:$e,rects:Me}){if(!I.current)return;const ot=ue.style;ot.setProperty("--available-width",`${Ne}px`),ot.setProperty("--available-height",`${$e}px`);const Ae=Pe(ue).devicePixelRatio||1,{x:ae,y:He,width:Xe,height:zt}=Me.reference,lr=(Math.round((ae+Xe)*Ae)-Math.round(ae*Ae))/Ae,ur=(Math.round((He+zt)*Ae)-Math.round(He*Ae))/Ae;ot.setProperty("--anchor-width",`${lr}px`),ot.setProperty("--anchor-height",`${ur}px`)}}),Gf(ue=>({element:H.current||Je(ue.elements.floating).createElement("div"),padding:l,offsetParent:"floating"}),[l]),{name:"transformOrigin",fn(ue){var ko,Co,To;const{elements:Ne,middlewareData:$e,placement:Me,rects:ot,y:Ae}=ue,ae=qe(Me),He=nt(ae),Xe=H.current,zt=((ko=$e.arrow)==null?void 0:ko.x)||0,lr=((Co=$e.arrow)==null?void 0:Co.y)||0,ur=(Xe==null?void 0:Xe.clientWidth)||0,Ea=(Xe==null?void 0:Xe.clientHeight)||0,dr=zt+ur/2,Ro=lr+Ea/2,Sa=Math.abs(((To=$e.shift)==null?void 0:To.y)||0),Ra=ot.reference.height/2,on=typeof o=="function"?o(Ts(ue,r,_)):o,ka=Sa>on,Ca={top:`${dr}px calc(100% + ${on}px)`,bottom:`${dr}px ${-on}px`,left:`calc(100% + ${on}px) ${Ro}px`,right:`${-on}px ${Ro}px`}[ae],Ta=`${dr}px ${ot.reference.y+Ra-Ae}px`;return Ne.floating.style.setProperty("--transform-origin",K&&He==="y"&&ka?Ta:Ca),{}}},Kf,k),ee(()=>{!h&&d&&d.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[h,d]);const Ee=g.useMemo(()=>({elementResize:!m&&typeof ResizeObserver<"u",layoutShift:!m&&typeof IntersectionObserver<"u"}),[m]),{refs:Se,elements:Ie,x:St,y:rt,middlewareData:ge,update:oe,placement:Y,context:J,isPositioned:pe,floatingStyles:Re}=Cf({rootContext:d,open:f?h:void 0,placement:B,middleware:Q,strategy:n,whileElementsMounted:f?void 0:(...ue)=>hs(...ue,Ee),nodeId:v,externalTree:N}),{sideX:ze,sideY:Ze}=ge.adaptiveOrigin||Ln,_e=pe?n:"fixed",ke=g.useMemo(()=>{const ue=k?{position:_e,[ze]:St,[Ze]:rt}:{position:_e,...Re};return pe||(ue.opacity=0),ue},[k,_e,ze,St,Ze,rt,Re,pe]),Ve=g.useRef(null);ee(()=>{if(!h)return;const ue=W.current,Ne=typeof ue=="function"?ue():ue,Me=(Os(Ne)?Ne.current:Ne)||null||null;Me!==Ve.current&&(Se.setPositionReference(Me),Ve.current=Me)},[h,Se,$,W]),g.useEffect(()=>{if(!h)return;const ue=W.current;typeof ue!="function"&&Os(ue)&&ue.current!==Ve.current&&(Se.setPositionReference(ue.current),Ve.current=ue.current)},[h,Se,$,W]),g.useEffect(()=>{if(f&&h&&Ie.reference&&Ie.floating)return hs(Ie.reference,Ie.floating,oe,Ee)},[f,h,Ie,oe,Ee]);const Be=qe(Y),ct=ha(r,Be,_),Mt=It(Y)||"center",jt=!!((Vt=ge.hide)!=null&&Vt.referenceHidden);ee(()=>{y&&h&&pe&&C(Be)},[y,h,pe,Be]);const Dt=g.useMemo(()=>{var ue,Ne;return{position:"absolute",top:(ue=ge.arrow)==null?void 0:ue.y,left:(Ne=ge.arrow)==null?void 0:Ne.x}},[ge.arrow]),Lt=((Ft=ge.arrow)==null?void 0:Ft.centerOffset)!==0;return g.useMemo(()=>({positionerStyles:ke,arrowStyles:Dt,arrowRef:H,arrowUncentered:Lt,side:ct,align:Mt,physicalSide:Be,anchorHidden:jt,refs:Se,context:J,isPositioned:pe,update:oe}),[ke,Dt,H,Lt,ct,Mt,Be,jt,Se,J,pe,oe])}function Os(e){return e!=null&&"current"in e}function ba(e){return e==="starting"?Bu:De}function Qf(e,t,{styles:n,transitionStatus:r,props:o,refs:s,hidden:i,inert:a=!1}){const u={...n};return a&&(u.pointerEvents="none"),Ue("div",e,{state:t,ref:s,props:[{role:"presentation",hidden:i,style:u},ba(r),o],stateAttributesMapping:vo})}const xa=g.forwardRef(function(t,n){const{render:r,className:o,anchor:s,positionMethod:i="absolute",side:a="top",align:u="center",sideOffset:c=0,alignOffset:l=0,collisionBoundary:m="clipping-ancestors",collisionPadding:p=5,arrowPadding:f=5,sticky:d=!1,disableAnchorTracking:h=!1,collisionAvoidance:x=$u,style:w,...v}=t,k=vn(),y=Uf(),N=k.useState("open"),T=k.useState("mounted"),C=k.useState("trackCursorAxis"),E=k.useState("disableHoverablePopup"),O=k.useState("floatingRootContext"),A=k.useState("instantType"),X=k.useState("transitionStatus"),L=k.useState("hasViewport"),$=Zf({anchor:s,positionMethod:i,floatingRootContext:O,mounted:T,side:a,sideOffset:c,align:u,alignOffset:l,collisionBoundary:m,collisionPadding:p,sticky:d,arrowPadding:f,disableAnchorTracking:h,keepMounted:y,collisionAvoidance:x,adaptiveOrigin:L?Jf:void 0}),W=g.useMemo(()=>({open:N,side:$.side,align:$.align,anchorHidden:$.anchorHidden,instant:C!=="none"?"tracking-cursor":A}),[N,$.side,$.align,$.anchorHidden,C,A]),I=Qf(t,W,{styles:$.positionerStyles,transitionStatus:X,props:v,refs:[n,k.useStateSetter("positionerElement")],hidden:!T,inert:!N||C==="both"||E});return b.jsx(Eo.Provider,{value:$,children:I})});process.env.NODE_ENV!=="production"&&(xa.displayName="TooltipPositioner");const em={...vo,...af},va=g.forwardRef(function(t,n){const{render:r,className:o,style:s,...i}=t,a=vn(),{side:u,align:c}=ga(),l=a.useState("open"),m=a.useState("instantType"),p=a.useState("transitionStatus"),f=a.useState("popupProps"),d=a.useState("floatingRootContext"),h=a.useState("disabled"),x=a.useState("closeDelay");ia({open:l,ref:a.context.popupRef,onComplete(){var y,N;l&&((N=(y=a.context).onOpenChangeComplete)==null||N.call(y,!0))}}),Of(d,{enabled:!h,closeDelay:x});const w=a.useStateSetter("popupElement");return Ue("div",t,{state:{open:l,side:u,align:c,instant:m,transitionStatus:p},ref:[n,a.context.popupRef,w],props:[f,ba(p),i],stateAttributesMapping:em})});process.env.NODE_ENV!=="production"&&(va.displayName="TooltipPopup");const ya=g.forwardRef(function(t,n){const{render:r,className:o,style:s,...i}=t,a=vn(),{arrowRef:u,side:c,align:l,arrowUncentered:m,arrowStyles:p}=ga(),f=a.useState("open"),d=a.useState("instantType");return Ue("div",t,{state:{open:f,side:c,align:l,uncentered:m,instant:d},ref:[n,u],props:[{style:p,"aria-hidden":!0},i],stateAttributesMapping:vo})});process.env.NODE_ENV!=="production"&&(ya.displayName="TooltipArrow");const wa=function(t){const{delay:n,closeDelay:r,timeout:o=400}=t,s=g.useMemo(()=>({delay:n,closeDelay:r}),[n,r]),i=g.useMemo(()=>({open:n,close:r}),[n,r]);return b.jsx(yo.Provider,{value:s,children:b.jsx(Du,{delay:i,timeoutMs:o,children:t.children})})};process.env.NODE_ENV!=="production"&&(wa.displayName="TooltipProvider");function tm({delay:e=0,...t}){return b.jsx(wa,{"data-slot":"tooltip-provider",delay:e,...t})}function nm({...e}){return b.jsx(la,{"data-slot":"tooltip",...e})}function rm({...e}){return b.jsx(fa,{"data-slot":"tooltip-trigger",...e})}function om({align:e="center",alignOffset:t=0,children:n,className:r,side:o="top",sideOffset:s=4,...i}){return b.jsx(pa,{children:b.jsx(xa,{align:e,alignOffset:t,className:"isolate z-50",side:o,sideOffset:s,children:b.jsxs(va,{className:nn("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",r),"data-slot":"tooltip-content",...i,children:[n,b.jsx(ya,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})}const sm="#818cf8";function im({color:e=sm,format:t,label:n,max:r,min:o,onChange:s,step:i,value:a,valueSuffix:u=""}){const c=(a-o)/(r-o)*100,l=t?t(a):Number.isInteger(i)?Math.round(a).toString():a.toFixed(2),[m,p]=ve.useState(!1),f=n!=null&&n!=="";return b.jsxs("div",{className:"w-full select-none",children:[f&&b.jsxs("div",{className:"flex items-center justify-between mb-1",children:[b.jsx("span",{className:"text-[13px] font-medium text-white/70",children:n}),b.jsxs("span",{className:"rounded bg-white/6 px-1.5 py-0.5 text-[10px] font-mono tabular-nums text-white/50",style:{color:`${e}cc`},children:[l,u]})]}),b.jsxs("div",{className:"relative h-8 flex items-center",children:[b.jsx("div",{className:"absolute inset-x-0 h-1.5 rounded-full bg-white/6 shadow-inner"}),b.jsx("div",{className:"absolute h-1.5 rounded-full",style:{background:`linear-gradient(90deg, ${e}99, ${e})`,left:0,right:`${100-c}%`}}),b.jsx("div",{className:"absolute h-6 w-6 rounded-full pointer-events-none transition-all",style:{backgroundColor:`${e}15`,filter:"blur(8px)",left:`calc(${c}% - 12px)`,opacity:m?1:0,transform:m?"scale(1.6)":"scale(1)",transition:"all 0.3s ease-out"}}),b.jsx("div",{className:"absolute h-4 w-4 rounded-full border-2 bg-zinc-100 pointer-events-none cursor-grab active:cursor-grabbing transition-transform",style:{borderColor:e,boxShadow:`0 0 0 2px ${e}20, 0 2px 6px ${e}40, 0 1px 3px rgba(0,0,0,0.4)`,left:`calc(${c}% - 8px)`,transform:m?"scale(1.3)":"scale(1)"},children:b.jsx("div",{className:"w-1.5 h-1.5 rounded-full absolute",style:{backgroundColor:e,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}})}),b.jsx("input",{className:"absolute inset-x-0 h-full opacity-0 cursor-pointer z-10",max:r,min:o,onChange:d=>s(parseFloat(d.target.value)),onMouseDown:()=>p(!0),onMouseUp:()=>p(!1),onTouchEnd:()=>p(!1),onTouchStart:()=>p(!0),step:i,type:"range",value:a})]})]})}const am=["#000000","#0a0a0a","#111111","#1a1a1a","#1e1e2e","#18181b","#222222","#2a2a2a","#333333","#4a4a4a","#6b6b6b","#a0a0a0","#d4d4d4","#f5f5f5","#ffffff","#0c1322","#0f172a","#0a2e1a","#1a2e2e","#0a1a2e","#2e0a2e","#2e0a1a","#2e1a0a","#1a2e0a","#2e2a0a","#2e201a","#1a2e1a","#201a2e"];function Ps({onChange:e,value:t}){const[n,r]=ve.useState(!1),o=ve.useRef(null);return ve.useEffect(()=>{if(!n)return;const s=a=>{o.current&&!o.current.contains(a.target)&&r(!1)},i=setTimeout(()=>document.addEventListener("mousedown",s),0);return()=>clearTimeout(i)},[n]),b.jsxs("div",{className:"relative",ref:o,children:[b.jsx("button",{className:"size-5 rounded-full ring-1 ring-border/30 transition hover:ring-2 hover:ring-indigo-500/50",onClick:()=>r(s=>!s),style:{backgroundColor:t},title:t}),n&&b.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[b.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:()=>r(!1)}),b.jsxs("div",{className:"relative z-10 w-72 rounded-2xl border border-border/50 bg-background/95 p-5 shadow-2xl backdrop-blur-md",children:[b.jsx("p",{className:"mb-3 text-[11px] font-medium uppercase tracking-wider text-muted-foreground/60",children:"Background"}),b.jsx("div",{className:"grid grid-cols-4 gap-3",children:am.map(s=>b.jsx("button",{className:`size-10 rounded-xl transition hover:scale-110 ${t===s?"ring-indigo-500 ring-2":"ring-border/20"}`,onClick:()=>{e(s),r(!1)},style:{backgroundColor:s},title:s},s))}),b.jsx("div",{className:"mt-4",children:b.jsx("input",{className:"w-full rounded-lg border border-border/30 bg-transparent px-3 py-2 text-sm font-mono text-foreground outline-none focus:border-indigo-500/50 focus:ring-2 focus:ring-indigo-500/20",defaultValue:t,onBlur:s=>{const i=s.target.value.trim();/^#[0-9a-fA-F]{6}$/.test(i)?e(i):s.target.value=t},onKeyDown:s=>{if(s.key==="Enter"){const i=s.target,a=i.value.trim();/^#[0-9a-fA-F]{6}$/.test(a)?(e(a),r(!1)):i.value=t}else s.key==="Escape"&&r(!1)},placeholder:"#000000",type:"text"})})]})]})]})}function Ns({onChange:e,selectedId:t,systems:n}){const[r,o]=ve.useState(!1),s=ve.useRef(null),i=ve.useRef(null),a=n.find(c=>c.id===t),u=(a==null?void 0:a.color)??"#6366f1";return ve.useEffect(()=>{if(!r)return;const c=m=>{s.current&&!s.current.contains(m.target)&&o(!1)},l=setTimeout(()=>document.addEventListener("mousedown",c),0);return()=>clearTimeout(l)},[r]),ve.useEffect(()=>{if(r&&i.current){const c=i.current.querySelector(`[data-id="${t}"]`);c&&c.scrollIntoView({block:"nearest"})}},[r]),b.jsxs("div",{className:"relative",ref:s,children:[b.jsxs("button",{className:"rounded-xl border border-border/20 bg-muted/30 px-3 py-1.5 text-sm font-medium text-foreground/80 transition hover:border-border/40 hover:bg-muted/50 dark:border-white/10 dark:bg-white/5 dark:text-white/70",onClick:()=>o(c=>!c),children:[b.jsx("span",{className:"mr-1.5 inline-block size-2 rounded-full",style:{backgroundColor:u}}),(a==null?void 0:a.name)??"Select"]}),r&&b.jsx("div",{className:"absolute right-0 z-50 mt-2 min-w-40 max-w-60 animate-in fade-in-0 slide-in-from-top-2",children:b.jsx("div",{className:"max-h-64 overflow-y-auto rounded-xl border border-border/30 bg-background/95 p-1.5 shadow-xl backdrop-blur-md",ref:i,children:n.map(c=>{const l=c.id===t;return b.jsxs("button",{className:`w-full rounded-lg px-3 py-2 text-left text-sm transition ${l?"bg-indigo-500/10 font-semibold text-indigo-600 dark:text-indigo-400":"text-foreground/70 hover:bg-muted/50"}`,"data-id":c.id,onClick:()=>{e(c.id),o(!1)},children:[b.jsx("span",{className:"mr-2 inline-block size-2 rounded-full",style:{backgroundColor:c.color}}),c.name]},c.id)})})})]})}function _s(e){const t=e.match(/^([^ ]+)(\s+\(.+\))?$/);return t?t[1].trim():e}function As(e){const t=Math.abs(e);if(t===0)return"0";if(t>=100)return Math.round(e).toString();const n=t>=10?1:t>=1?2:t>=.01?4:t>=1e-4?6:8;return parseFloat(e.toFixed(n)).toString()}function Is({className:e,...t}){return b.jsx("div",{className:`overflow-hidden rounded-2xl border border-border/20 bg-background/80 shadow-xl backdrop-blur-2xl dark:border-white/10 dark:bg-zinc-900/80 dark:shadow-[0_32px_80px_rgba(0,0,0,0.4)] ${e??""}`,...t})}function kt({children:e,label:t}){return b.jsxs("div",{className:"flex flex-col gap-y-3",children:[b.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-[0.15em] text-muted-foreground/60 dark:text-white/30",children:t}),e]})}function ut({accent:e,description:t,max:n,min:r,name:o,onChange:s,onReset:i,step:a,value:u}){return b.jsxs("div",{className:"group/cell flex flex-col gap-2",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{className:"flex items-center gap-1.5",children:[b.jsx("span",{className:"size-1.5 rounded-full ring-2 ring-border/5 transition-transform group-hover/cell:scale-125 dark:ring-white/5",style:{backgroundColor:e,boxShadow:`0 0 6px ${e}60`}}),b.jsx("span",{className:"text-[13px] font-medium text-foreground/80 dark:text-white/80",children:o})]}),b.jsxs("div",{className:"flex items-center gap-0.5 justify-end",children:[i&&b.jsx("button",{className:"flex size-4 items-center justify-center rounded text-[9px] text-muted-foreground/40 transition hover:text-foreground hover:bg-muted/50 dark:text-white/15 dark:hover:text-white/70",onClick:c=>{c.stopPropagation(),i()},children:"↺"}),b.jsx("span",{className:"rounded bg-muted dark:bg-white/4 px-1.5 py-0.5 text-[10px] font-mono tabular-nums text-muted-foreground dark:text-white/50 transition-colors group-hover/cell:text-foreground dark:group-hover/cell:text-white/70",children:As(u)}),t&&b.jsx(tm,{children:b.jsxs(nm,{children:[b.jsx(rm,{className:"cursor-help text-muted-foreground/40 hover:text-muted-foreground transition-colors dark:text-white/20 dark:hover:text-white/50",children:b.jsx(Aa.Info,{className:"size-3"})}),b.jsx(om,{className:"max-w-xs",side:"top",sideOffset:8,children:b.jsx("p",{children:t})})]})})]})]}),b.jsx(im,{color:e,format:As,label:"",max:n,min:r,onChange:s,step:a??(n-r)/200,value:u})]})}const Ms={a:"Parameter a — system coefficient",b:"Parameter b — system coefficient",B:"Parameter B — system coefficient",c:"Parameter c — system coefficient",d:"Parameter d — system coefficient",e:"Parameter e — system coefficient",f:"Parameter f — system coefficient",g:"Parameter g — system coefficient",h:"Parameter h — system coefficient",k:"Parameter k — system coefficient",p:"Parameter p — system coefficient",q:"Parameter q — system coefficient",r:"Parameter r — system coefficient",s:"Parameter s — system coefficient",t:"Parameter t — system coefficient",v:"Parameter v — system coefficient","α (alpha)":"Parameter alpha — system coefficient","β (beta)":"Relates to the vertical dimension compression",ε:"Parameter epsilon — system coefficient",λ:"Parameter lambda — system coefficient",μ:"Parameter mu — system coefficient","ρ (rho)":"Represents the rate of convection","σ (sigma)":"Controls the horizontal spreading of the attractor",ω:"Parameter omega — system coefficient"},Qe={amber:"#fbbf24",blue:"#818cf8",cyan:"#22d3ee",emerald:"#34d399",rose:"#fb7185",violet:"#a78bfa"};function cm({autoRotate:e,backgroundColor:t,colorSpeed:n,mobileOpen:r,onAutoRotateChange:o,onBackgroundColorChange:s,onCloseMobile:i,onColorSpeedChange:a,onParamChange:u,onPointSizeChange:c,onReset:l,onResetAfterChange:m,onShare:p,onSpeedChange:f,onStepsChange:d,onSystemChange:h,onWallpaperDownload:x,params:w,pointSize:v,resetAfter:k,selectedId:y,speed:N,stepsPerFrame:T,system:C,systems:E}){return b.jsxs(b.Fragment,{children:[r&&b.jsx("div",{className:"fixed inset-0 z-20 bg-black/50 backdrop-blur-sm md:hidden animate-backdrop-fade",onClick:i}),b.jsx("div",{className:`fixed z-30 md:hidden transition-transform duration-300 ease-out pointer-events-auto bottom-0 left-0 right-0 ${r?"translate-y-0":"translate-y-full"}`,children:b.jsxs(Is,{className:"flex flex-col rounded-b-none rounded-t-2xl max-h-[90vh]",children:[b.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 dark:border-white/6 px-5 py-3",children:[b.jsx("div",{className:"flex items-center gap-3",children:b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("span",{className:"text-base",children:"✦"}),b.jsx("span",{className:"text-[13px] font-semibold tracking-wide text-foreground/90 dark:text-white/90",children:"Strange Attractorz"})]})}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(Ns,{onChange:h,selectedId:y,systems:E}),b.jsx(Ht,{className:"rounded-xl p-2 text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-smooth active:scale-95",onClick:O=>{O.stopPropagation(),i==null||i()},size:"icon",variant:"ghost",children:b.jsx("svg",{className:"size-5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",children:b.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]})]}),b.jsx(ns,{className:"min-h-0 flex-1",children:b.jsxs("div",{className:"p-5 gap-y-5",children:[b.jsx(kt,{label:"Parameters",children:b.jsx("div",{className:"grid grid-cols-1 gap-y-5 md:grid-cols-2 lg:grid-cols-3 gap-x-4",children:C.params.defaults.map((O,A)=>{var X;return b.jsx(ut,{accent:Object.values(Qe)[A%Object.keys(Qe).length],description:Ms[C.params.names[A]],max:C.params.max[A]??O*5,min:C.params.min[A]??O*.1,name:_s(C.params.names[A]),onChange:L=>u(A,L),onReset:()=>u(A,O),step:(X=C.params.steps)==null?void 0:X[A],value:w[A]??O},C.params.names[A])})})}),b.jsx(rs,{className:"bg-border/20 dark:bg-white/5"}),b.jsx(kt,{label:"Display",children:b.jsxs("div",{className:"grid grid-cols-1 gap-y-5 md:grid-cols-2 gap-x-4",children:[b.jsx(ut,{accent:Qe.rose,description:"Rate of color cycling across the trail",max:10,min:.1,name:"Color speed",onChange:a,onReset:()=>a(1),value:n},"colorSpeed"),b.jsx(ut,{accent:Qe.cyan,description:"Size of each rendered point",max:8,min:.5,name:"Point size",onChange:c,onReset:()=>c(1.5),value:v},"pointSize")]})}),b.jsx(kt,{label:"Speed & Density",children:b.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-5",children:[b.jsx(ut,{accent:Qe.amber,description:"Multiplier for the number of points drawn each frame",max:5,min:.1,name:"Speed",onChange:f,onReset:()=>f(.5),step:.1,value:N}),b.jsx(ut,{accent:Qe.violet,description:"Integration steps drawn per frame",max:1e3,min:1,name:"Steps / frame",onChange:d,onReset:()=>d(50),value:T})]})}),b.jsx(kt,{label:"Options",children:b.jsxs("div",{className:"grid grid-cols-3 gap-x-4",children:[b.jsxs("div",{className:"flex cursor-pointer flex-col items-center gap-1.5 rounded-xl bg-muted/50 dark:bg-white/5 p-3 text-center",onClick:()=>o(!e),children:[b.jsx("span",{className:"text-[13px] font-medium text-foreground/80 dark:text-white/80",children:"Auto-rotate"}),b.jsx("span",{className:"text-[11px] text-muted-foreground dark:text-white/30",children:"Slowly orbit"}),b.jsx(as,{checked:e,id:"auto-rotate",onCheckedChange:O=>{o(O)},onClick:O=>O.stopPropagation()})]}),s&&b.jsxs("div",{className:"flex flex-col items-center gap-1.5 rounded-xl bg-muted/50 p-3 dark:bg-white/3 text-center",children:[b.jsx("span",{className:"text-[13px] font-medium text-foreground/80 dark:text-white/80",children:"Background"}),b.jsx(Ps,{onChange:s,value:t||"#000000"}),b.jsx("span",{className:"text-[11px] font-mono text-muted-foreground dark:text-white/40 truncate",children:t||"#000000"})]}),b.jsxs("div",{className:"flex flex-col items-center gap-1.5 rounded-xl bg-muted/50 p-3 dark:bg-white/3 text-center",children:[b.jsx("span",{className:"text-[13px] font-medium text-foreground/80 dark:text-white/80",children:"Auto-loop"}),b.jsx("span",{className:"text-[11px] text-muted-foreground dark:text-white/30",children:"Restart"}),b.jsxs("div",{className:"flex items-center gap-0.5 mt-1",children:[b.jsx("button",{className:"flex size-7 items-center justify-center rounded-lg border border-border/20 bg-muted/40 text-sm font-medium text-foreground/70 transition hover:bg-muted dark:border-white/8 dark:bg-white/4 dark:text-white/60",onClick:()=>{const O=Math.max(1,Math.round(k/6e4)-1);m==null||m(O*6e4)},children:"−"}),b.jsx("span",{className:"w-10 text-center text-sm font-mono tabular-nums text-foreground/80 dark:text-white/80",children:Math.round(k/6e4)}),b.jsx("button",{className:"flex size-7 items-center justify-center rounded-lg border border-border/20 bg-muted/40 text-sm font-medium text-foreground/70 transition hover:bg-muted dark:border-white/8 dark:bg-white/4 dark:text-white/60",onClick:()=>{const O=Math.min(120,Math.round(k/6e4)+1);m==null||m(O*6e4)},children:"+"})]})]})]})}),b.jsxs("div",{className:"sm:flex-row flex flex-col gap-2 pt-1",children:[b.jsxs(Ht,{className:"flex-1 rounded-xl border-border/20 bg-muted/50 text-sm text-muted-foreground hover:bg-muted hover:text-foreground dark:border-white/8 dark:bg-white/6 dark:text-white/70 dark:hover:bg-white/10 dark:hover:text-white/90",onClick:p,variant:"ghost",children:[b.jsxs("svg",{className:"-ml-0.5 mr-1.5 size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",children:[b.jsx("path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"}),b.jsx("polyline",{points:"16 6 12 2 8 6"}),b.jsx("line",{x1:"12",x2:"12",y1:"2",y2:"15"})]}),"Share"]}),b.jsxs(Ht,{className:"flex-1 rounded-xl border-border/20 bg-muted/50 text-sm text-muted-foreground hover:bg-muted hover:text-foreground dark:border-white/8 dark:bg-white/6 dark:text-white/70 dark:hover:bg-white/10 dark:hover:text-white/90",onClick:x,variant:"ghost",children:[b.jsxs("svg",{className:"-ml-0.5 mr-1.5 size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",children:[b.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),b.jsx("polyline",{points:"7 10 12 15 17 10"}),b.jsx("line",{x1:"12",x2:"12",y1:"15",y2:"3"})]}),"Wallpaper"]}),b.jsxs(Ht,{className:"flex-1 rounded-xl border-border/20 bg-muted/50 text-sm text-muted-foreground hover:bg-muted hover:text-foreground dark:border-white/8 dark:bg-white/6 dark:text-white/70 dark:hover:bg-white/10 dark:hover:text-white/90",onClick:l,variant:"ghost",children:[b.jsxs("svg",{className:"-ml-0.5 mr-1.5 size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",children:[b.jsx("path",{d:"M3 12a9 9 0 0 1 9-9 9.75 0 0 1 6.74 2.74L21 8"}),b.jsx("path",{d:"M21 3v5h-5"}),b.jsx("path",{d:"M21 12a9 9 0 0 1-9 9 9.75 0 0 1-6.74-2.74L3 16"}),b.jsx("path",{d:"M3 21v-5h5"})]}),"Reset"]})]})]})})]})}),b.jsx("div",{className:"hidden md:block fixed top-5 left-5 z-10 w-md lg:w-[28.6rem] pointer-events-auto animate-panel-entrance",children:b.jsxs(Is,{className:"flex h-auto max-h-[calc(100vh-40px)] flex-col",children:[b.jsxs("div",{className:"flex items-center justify-between border-b border-border/20 dark:border-white/6 px-6 py-3.5",children:[b.jsx("div",{className:"flex items-center gap-3",children:b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("span",{className:"text-base",children:"✦"}),b.jsx("span",{className:"text-[13px] font-semibold tracking-wide text-foreground/90 dark:text-white/90",children:"Strange Attractorz"})]})}),b.jsx(Ns,{onChange:h,selectedId:y,systems:E})]}),b.jsx(ns,{className:"min-h-0 flex-1",children:b.jsxs("div",{className:"p-6 gap-y-5",children:[b.jsx(kt,{label:"Parameters",children:b.jsx("div",{className:"grid grid-cols-3 gap-x-4 gap-y-5",children:C.params.defaults.map((O,A)=>{var X;return b.jsx(ut,{accent:Object.values(Qe)[A%Object.keys(Qe).length],description:Ms[C.params.names[A]],max:C.params.max[A]??O*5,min:C.params.min[A]??O*.1,name:_s(C.params.names[A]),onChange:L=>u(A,L),onReset:()=>u(A,O),step:(X=C.params.steps)==null?void 0:X[A],value:w[A]??O},C.params.names[A])})})}),b.jsx(rs,{className:"bg-border/20 dark:bg-white/5"}),b.jsx(kt,{label:"Display",children:b.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-5",children:[b.jsx(ut,{accent:Qe.rose,description:"Rate of color cycling across the trail",max:10,min:.1,name:"Color speed",onChange:a,onReset:()=>a(1),value:n},"colorSpeed"),b.jsx(ut,{accent:Qe.cyan,description:"Size of each rendered point",max:8,min:.5,name:"Point size",onChange:c,onReset:()=>c(1.5),value:v},"pointSize")]})}),b.jsx(kt,{label:"Speed & Density",children:b.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-5",children:[b.jsx(ut,{accent:Qe.amber,description:"Multiplier for the number of points drawn each frame",max:5,min:.1,name:"Speed",onChange:f,onReset:()=>f(.5),step:.1,value:N}),b.jsx(ut,{accent:Qe.violet,description:"Integration steps drawn per frame",max:1e3,min:1,name:"Steps / frame",onChange:d,onReset:()=>d(50),value:T})]})}),b.jsx(kt,{label:"Options",children:b.jsxs("div",{className:"grid grid-cols-3 gap-x-4",children:[b.jsxs("div",{className:"flex cursor-pointer flex-col items-center gap-1.5 rounded-xl bg-muted/50 dark:bg-white/5 p-3 text-center",onClick:()=>o(!e),children:[b.jsx("span",{className:"text-[13px] font-medium text-foreground/80 dark:text-white/80",children:"Auto-rotate"}),b.jsx("span",{className:"text-[11px] text-muted-foreground dark:text-white/30",children:"Slowly orbit"}),b.jsx(as,{checked:e,id:"auto-rotate",onCheckedChange:O=>{o(O)},onClick:O=>O.stopPropagation()})]}),s&&b.jsxs("div",{className:"flex flex-col items-center gap-1.5 rounded-xl bg-muted/50 p-3 dark:bg-white/3 text-center",children:[b.jsx("span",{className:"text-[13px] font-medium text-foreground/80 dark:text-white/80",children:"Background"}),b.jsx(Ps,{onChange:s,value:t||"#000000"}),b.jsx("span",{className:"text-[11px] font-mono text-muted-foreground dark:text-white/40 truncate",children:t||"#000000"})]}),b.jsxs("div",{className:"flex flex-col items-center gap-1.5 rounded-xl bg-muted/50 p-3 dark:bg-white/3 text-center",children:[b.jsx("span",{className:"text-[13px] font-medium text-foreground/80 dark:text-white/80",children:"Auto-loop"}),b.jsx("span",{className:"text-[11px] text-muted-foreground dark:text-white/30",children:"Restart"}),b.jsxs("div",{className:"flex items-center gap-0.5 mt-1",children:[b.jsx("button",{className:"flex size-7 items-center justify-center rounded-lg border border-border/20 bg-muted/40 text-sm font-medium text-foreground/70 transition hover:bg-muted dark:border-white/8 dark:bg-white/4 dark:text-white/60",onClick:()=>{const O=Math.max(1,Math.round(k/6e4)-1);m==null||m(O*6e4)},children:"−"}),b.jsx("span",{className:"w-10 text-center text-sm font-mono tabular-nums text-foreground/80 dark:text-white/80",children:Math.round(k/6e4)}),b.jsx("button",{className:"flex size-7 items-center justify-center rounded-lg border border-border/20 bg-muted/40 text-sm font-medium text-foreground/70 transition hover:bg-muted dark:border-white/8 dark:bg-white/4 dark:text-white/60",onClick:()=>{const O=Math.min(120,Math.round(k/6e4)+1);m==null||m(O*6e4)},children:"+"})]})]})]})}),b.jsxs("div",{className:"flex gap-2 pt-1",children:[b.jsxs(Ht,{className:"flex-1 rounded-xl border-border/20 bg-muted/50 text-sm text-muted-foreground hover:bg-muted hover:text-foreground dark:border-white/8 dark:bg-white/6 dark:text-white/70 dark:hover:bg-white/10 dark:hover:text-white/90",onClick:p,variant:"ghost",children:[b.jsxs("svg",{className:"-ml-0.5 mr-1.5 size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",children:[b.jsx("path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"}),b.jsx("polyline",{points:"16 6 12 2 8 6"}),b.jsx("line",{x1:"12",x2:"12",y1:"2",y2:"15"})]}),"Share"]}),b.jsxs(Ht,{className:"flex-1 rounded-xl border-border/20 bg-muted/50 text-sm text-muted-foreground hover:bg-muted hover:text-foreground dark:border-white/8 dark:bg-white/6 dark:text-white/70 dark:hover:bg-white/10 dark:hover:text-white/90",onClick:x,variant:"ghost",children:[b.jsxs("svg",{className:"-ml-0.5 mr-1.5 size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",children:[b.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),b.jsx("polyline",{points:"7 10 12 15 17 10"}),b.jsx("line",{x1:"12",x2:"12",y1:"15",y2:"3"})]}),"Wallpaper"]}),b.jsxs(Ht,{className:"flex-1 rounded-xl border-border/20 bg-muted/50 text-sm text-muted-foreground hover:bg-muted hover:text-foreground dark:border-white/8 dark:bg-white/6 dark:text-white/70 dark:hover:bg-white/10 dark:hover:text-white/90",onClick:l,variant:"ghost",children:[b.jsxs("svg",{className:"-ml-0.5 mr-1.5 size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",children:[b.jsx("path",{d:"M3 12a9 9 0 0 1 9-9 9.75 0 0 1 6.74 2.74L21 8"}),b.jsx("path",{d:"M21 3v5h-5"}),b.jsx("path",{d:"M21 12a9 9 0 0 1-9 9 9.75 0 0 1-6.74-2.74L3 16"}),b.jsx("path",{d:"M3 21v-5h5"})]}),"Reset"]})]})]})})]})})]})}function fe(e){return(t,n)=>{const[r,o,s]=t;return e(r,o,s,n)}}const lm=(e,t,n,r)=>[r[0]*(t-e),e*(r[1]-n)-t,e*t-r[2]*n],um=(e,t,n,r)=>[-(t+n),e+r[0]*t,r[1]+n*(e-r[2])],dm=(e,t,n,r)=>[r[0]*(t-e),(r[1]-r[0])*e-e*n+r[1]*t,e*t-r[2]*n],fm=(e,t,n,r)=>[Math.sin(t)-r[0]*e,Math.sin(n)-r[0]*t,Math.sin(e)-r[0]*n],mm=(e,t,n,r)=>[-r[0]*e-4*t-4*n-t*t,-r[0]*t-4*n-4*e-n*n,-r[0]*n-4*e-4*t-e*e],pm=(e,t,n,r)=>[r[0]*t,-e+t*n,1-t*t],gm=(e,t,n,r)=>[-e+t+t*n,-e-t+r[0]*e*n,n-r[1]*e*t],hm=(e,t,n,r)=>[-r[0]*(e+t),-t-r[0]*e*n,r[0]*e*t+r[1]],bm=(e,t,n,r)=>[-r[0]*e+r[1]*t-t*n,e,-n+t*t],xm=(e,t,n,r)=>[t,n,-n-(r[0]-r[1]*(1-e*e))*t-r[0]*e],vm=(e,t,n,r)=>[r[0]*(t-e)+r[2]*e*n,r[4]*e+r[5]*t-e*n,r[1]*n+e*t-r[3]*e*e],ym=(e,t,n,r)=>[(n-r[1])*e-r[3]*t,r[3]*e+(n-r[1])*t,r[2]+r[4]*n-n*n*n/3-(e*e+t*t)*(1+r[5]*n)+r[6]*n*e*e*e],wm=(e,t,n,r)=>[t-r[0]*e+r[1]*t*n,r[2]*t-e*n+n,r[3]*e*t-r[4]*n],Em=(e,t,n,r)=>[-t*t-n*n-r[0]*(e-r[2]),e*t-r[1]*e*n-t+r[3],r[1]*e*t+n*(e-1)],Sm=(e,t,n,r)=>[r[0]*e-t*n,r[1]*t+e*n,r[2]*n+e*t/3],Rm=(e,t,n,r)=>[t,e-r[0]*t-e*n,-r[1]*n+e*e],km=(e,t,n,r)=>[r[0]*(t-e),-e*n+r[1]*t,e*t-r[2]*n],Cm=(e,t,n,r)=>[r[0]*(t-e),r[1]*e-r[2]*e*n,Math.exp(e*t)-r[3]*n],Tm=(e,t,n,r)=>[r[0]*e+r[2]*t*n,r[1]*e+r[3]*t-e*n,r[4]*n+r[5]*e*t],Om=(e,t,n,r)=>[(1/r[1]-r[0])*e+e*t+n,-r[1]*t-e*e,-e-r[2]*n],Pm=(e,t,n,r)=>[e-e*t+r[2]*e*e-r[0]*n*e*e,-t+e*t,-r[1]*n+r[0]*n*e*e],Nm=(e,t,n,r)=>[r[0]*t+r[2]*e*(r[1]-t*t),-e+r[3]*n,r[4]*e-r[5]*t],_m=(e,t,n,r)=>[e*(r[0]-t)+r[4]*n,-t*(r[1]-e*e),-e*(r[2]-r[3]*n)-r[5]*n],Am=(e,t,n,r)=>[r[2]*e*(1-t)-r[3]*n,-r[0]*t*(1-e*e),r[1]*e],Im=(e,t,n,r)=>[-r[0]*e+t+r[1]*t*(e*e-1),-r[0]*t+e+r[1]*e*(t*t-1),-n/r[0]],Mm=(e,t,n,r)=>[-r[0]*e-n,e+r[0]*t,t*(n-r[1])],jm=(e,t,n,r)=>[t*(n-1+e*e)+r[0]*e,e*(3*n+1-e*e)+r[0]*t,-2*n*(r[1]+e*t)],Dm=(e,t,n,r)=>[n,n,-r[0]*e-r[1]*t+r[2]*n-r[3]*n*n*n+r[4]*e*e],So=[{color:"#ef4444",equation:fe(lm),id:"lorenz",initCoord:[0,1,0],limits:{xlim:[-20,20],ylim:[-30,30],zlim:[5,45]},name:"Lorenz (1963)",params:{defaults:[10,28,8/3],max:[50,100,50],min:[-10,0,0],names:["σ (sigma)","ρ (rho)","β (beta)"]}},{color:"#f59e0b",equation:fe(um),id:"roessler",initCoord:[.1,0,-.1],limits:{xlim:[-15,15],ylim:[-15,15],zlim:[-1,20]},name:"Rössler (1976)",params:{defaults:[.2,.2,5.7],max:[5,5,20],min:[-5,-5,-10],names:["a","b","c"]}},{color:"#eab308",equation:fe(dm),id:"chen",initCoord:[-10,0,37],limits:{xlim:[-30,30],ylim:[-30,30],zlim:[5,45]},name:"Chen (1999)",params:{defaults:[35,3,28],max:[100,50,100],min:[-10,-10,-10],names:["a","b","c"]}},{color:"#84cc16",equation:fe(fm),id:"thomas",initCoord:[.01,0,0],limits:{xlim:[-2,5],ylim:[-2,4],zlim:[-2,4]},name:"Thomas (1999)",params:{defaults:[.208],max:[1,1],min:[-1,-1],names:["b"]}},{color:"#22c55e",equation:fe(mm),id:"halvorsen",initCoord:[-1.48,1.51,2.04],limits:{xlim:[-20,15],ylim:[-12,8],zlim:[-12,8]},name:"Halvorsen",params:{defaults:[1.89],max:[10,10],min:[-10,-10],names:["a"]}},{color:"#14b8a6",equation:fe(pm),id:"nose_hoover",initCoord:[.1,0,-.1],limits:{xlim:[-3,1],ylim:[-3,3],zlim:[-3,3]},name:"Nose-Hoover",params:{defaults:[1],max:[10,10],min:[-5,-5],names:["a"]}},{color:"#06b6d4",equation:fe(gm),id:"sakarya",initCoord:[1,-1,1],limits:{xlim:[-35,30],ylim:[-17,15],zlim:[-13,17]},name:"Sakarya",params:{defaults:[.4,.3],max:[5,5],min:[-5,-5],names:["a","b"]}},{color:"#3b82f6",equation:fe(hm),id:"burke_shaw",initCoord:[1,0,0],limits:{xlim:[-2.5,2.5],ylim:[-2.5,2.5],zlim:[-2,2]},name:"Burke-Shaw",params:{defaults:[10,4.272],max:[30,30],min:[-10,-10],names:["s","v"]}},{color:"#6366f1",equation:fe(bm),id:"rucklidge",initCoord:[1,0,4.5],limits:{xlim:[-10.5,4.5],ylim:[-8.5,6.7],zlim:[.9,16]},name:"Rucklidge (1992)",params:{defaults:[2,6.7],max:[10,20],min:[-10,-10],names:["k","α (alpha)"]}},{color:"#8b5cf6",equation:fe(xm),id:"moore_spiegel",initCoord:[0,.8,0],limits:{xlim:[-10,10],ylim:[-20,20],zlim:[-250,250]},name:"Moore-Spiegel (1966)",params:{defaults:[20,100],max:[100,500],min:[-20,-100],names:["t","r"]}},{color:"#a855f7",equation:fe(vm),id:"dequan_li",initCoord:[.01,0,0],limits:{xlim:[-200,200],ylim:[-200,250],zlim:[-50,250]},name:"Dequan Li (2008)",params:{defaults:[40,1.833,.16,.65,55,20],max:[200,20,1,10,200,200],min:[-100,-10,-1,-10,-50,-50],names:["a","c","d","e","k","f"]}},{color:"#d946ef",equation:fe(ym),id:"langford",initCoord:[.1,0,0],limits:{xlim:[-2,2],ylim:[-2,2],zlim:[-.5,2]},name:"Langford",params:{defaults:[.95,.7,.6,3.5,.25,.1,.1],max:[10,10,5,10,2,5,2],min:[-10,-10,-5,-10,-2,-5,-2],names:["α","β","λ","ω","ρ","ε","ε₁"]}},{color:"#ec4899",equation:fe(wm),id:"dadras",initCoord:[5,0,-4],limits:{xlim:[-15,15],ylim:[-10,8],zlim:[-12,12]},name:"Dadras (2009)",params:{defaults:[3,2.7,1.7,2,9],max:[30,30,30,30,30],min:[-10,-10,-10,-10,-50],names:["a","b","c","d","h"]}},{color:"#f43f5e",equation:fe(Em),id:"hadley",initCoord:[0,0,1],limits:{xlim:[-1,3],ylim:[-2,2],zlim:[-2,2]},name:"Hadley",params:{defaults:[.2,4,8,1],max:[5,10,30,5],min:[-5,-10,-10,-5],names:["a","b","f","g"]}},{color:"#fb923c",equation:fe(Sm),id:"chen_lee",initCoord:[1,1,1],limits:{xlim:[-30,30],ylim:[-30,30],zlim:[-1,35]},name:"Chen-Lee (2004)",params:{defaults:[5,-10,-.38],max:[30,30,30],min:[-30,-30,-10],names:["a","b","c"]}},{color:"#eab308",equation:fe(Rm),id:"shimizu_morioka",initCoord:[-1,2,1],limits:{xlim:[-10,10],ylim:[-10,10],zlim:[-10,10]},name:"Shimizu-Morioka (1980)",params:{defaults:[.45,.75],max:[5,5],min:[-2,-2],names:["a","B"]}},{color:"#f472b6",equation:fe(km),id:"chen_lu",initCoord:[1,1,30],limits:{xlim:[-30,30],ylim:[-30,30],zlim:[0,30]},name:"Chen-Lu (2002)",params:{defaults:[36,3,17],max:[100,30,100],min:[-30,-10,-50],names:["a","b","c"]}},{color:"#818cf8",equation:fe(Cm),id:"yu_wang",initCoord:[.1,0,15],limits:{xlim:[-3,3],ylim:[-5,5],zlim:[0,45]},name:"Yu-Wang (2012)",params:{defaults:[10,40,2,2.5],max:[50,200,30,30],min:[-20,-50,-10,-10],names:["a","b","c","d"]}},{color:"#34d399",equation:fe(Tm),id:"wang_sun",initCoord:[.5,.1,.1],limits:{xlim:[-4,4],ylim:[-4,4],zlim:[-3,2]},name:"Wang-Sun (2009)",params:{defaults:[.2,-.01,1,-.4,-1,-1],max:[3,3,3,3,5,5],min:[-3,-3,-3,-3,-5,-5],names:["a","b","c","d","e","f"]}},{color:"#2dd4bf",equation:fe(Om),id:"finance",initCoord:[0,-10,.1],limits:{xlim:[-6,6],ylim:[-18,-2],zlim:[-4,4]},name:"Finance",params:{defaults:[1e-5,.1,1],max:[1,10,10],min:[-1,-10,-10],names:["a","b","c"]}},{color:"#60a5fa",equation:fe(Pm),id:"lotka_volterra",initCoord:[1,1,1],limits:{xlim:[.7,1.3],ylim:[.7,1.3],zlim:[.5,1.1]},name:"Lotka-Volterra",params:{defaults:[2.9851,3,2],max:[10,10,10],min:[-5,-5,-10],names:["a","b","c"]}},{color:"#a78bfa",equation:fe(Nm),id:"bouali_1",initCoord:[.012,3.69,-.09],limits:{xlim:[-.05,.05],ylim:[-5,5],zlim:[-.2,.2]},name:"Bouali Type 1 (2012)",params:{defaults:[.02,.2,.4,10,.1,50],max:[5,5,5,50,5,200],min:[-1,-5,-5,-20,-1,-100],names:["k","b","μ","p","q","s"]}},{color:"#fb7185",equation:fe(_m),id:"bouali_2",initCoord:[.1,3,.2],limits:{xlim:[-8,8],ylim:[-3,13],zlim:[-20,1.5]},name:"Bouali Type 2 (2012)",params:{defaults:[4,1,1.4,2.8,1,1],max:[10,10,10,10,10,10],min:[-10,-10,-10,-10,-10,-10],names:["a","b","c","s","α","β"]}},{color:"#22d3ee",equation:fe(Am),id:"bouali_3",initCoord:[1,1,0],limits:{xlim:[-3,3],ylim:[0,3],zlim:[-.15,.15]},name:"Bouali Type 3 (2013)",params:{defaults:[1,.001,3,2.2],max:[10,10,10,10],min:[-10,-10,-10,-10],names:["γ","μ","α","β"]}},{color:"#facc15",equation:fe(Im),id:"newton_leipnik",initCoord:[.349,0,-.16],limits:{xlim:[-2,2],ylim:[-2,2],zlim:[-.5,.5]},name:"Newton-Leipnik (1988)",params:{defaults:[.4,.175],max:[5,5],min:[-5,-5],names:["α","β"]}},{color:"#4ade80",equation:fe(Mm),id:"rikitake",initCoord:[1,1,1],limits:{xlim:[-5,5],ylim:[-5,5],zlim:[-5,5]},name:"Rikitake (1958)",params:{defaults:[.3,1.5],max:[5,5],min:[-5,-5],names:["a","b"]}},{color:"#e879f9",equation:fe(jm),id:"rabinovich_fabrikant",initCoord:[0,0,1],limits:{xlim:[-2,2],ylim:[-2,2],zlim:[-2,2]},name:"Rabinovich-Fabrikant",params:{defaults:[.43,1.26],max:[3,5],min:[-3,-5],names:["α","β"]}},{color:"#38bdf8",equation:fe(Dm),id:"three_cell_cnn",initCoord:[0,0,1],limits:{xlim:[-3,3],ylim:[-3,3],zlim:[-3,3]},name:"Three-Cell CNN",params:{defaults:[0,1,0,1,.2],max:[3,3,3,3,3],min:[-3,-3,-3,-3,-3],names:["a","b","c","d","e"]}}];function Lm(e){return So.find(t=>t.id===e)}So.map(e=>e.id);exports.AttractorCanvas=Ha;exports.AttractorPanel=cm;exports.getSystem=Lm;exports.systems=So;
|