dawn-ui-react 1.0.0-alpha.10 → 1.0.0-alpha.12

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.
Files changed (28) hide show
  1. package/dist/components/chart/chart-container.d.ts +3 -0
  2. package/dist/components/chart/chart-legend-content.d.ts +8 -0
  3. package/dist/components/chart/chart-legend-icon.d.ts +2 -0
  4. package/dist/components/chart/chart-legend-indicator.d.ts +2 -0
  5. package/dist/components/chart/chart-legend-label.d.ts +2 -0
  6. package/dist/components/chart/chart-legend.d.ts +2 -0
  7. package/dist/components/chart/chart-linear-gradient.d.ts +2 -0
  8. package/dist/components/chart/chart-tooltip-content.d.ts +3 -0
  9. package/dist/components/chart/chart-tooltip-icon.d.ts +2 -0
  10. package/dist/components/chart/chart-tooltip-indicator.d.ts +2 -0
  11. package/dist/components/chart/chart-tooltip-label.d.ts +2 -0
  12. package/dist/components/chart/chart-tooltip-name.d.ts +2 -0
  13. package/dist/components/chart/chart-tooltip-payload.d.ts +4 -0
  14. package/dist/components/chart/chart-tooltip-value.d.ts +3 -0
  15. package/dist/components/chart/chart-tooltip.d.ts +2 -0
  16. package/dist/components/chart/chart.types.d.ts +49 -0
  17. package/dist/components/chart/chart.utils.d.ts +11 -0
  18. package/dist/components/chart/index.d.ts +16 -0
  19. package/dist/components/code-block/code-block-window.d.ts +1 -2
  20. package/dist/components/code-block/code-block.types.d.ts +1 -1
  21. package/dist/components/code-block/index.d.ts +9 -1
  22. package/dist/components/index.d.ts +1 -0
  23. package/dist/components/slider/slider.d.ts +1 -1
  24. package/dist/components/slider/slider.types.d.ts +7 -1
  25. package/dist/dawn-ui-react.js +17439 -6788
  26. package/dist/dawn-ui-react.umd.cjs +68 -29
  27. package/package.json +2 -1
  28. package/dist/components/code-block/code-block-header-group.d.ts +0 -2
@@ -1,61 +1,100 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`react`),require(`react/jsx-runtime`),require(`react-dom`),require(`use-sync-external-store/shim`),require(`use-sync-external-store/shim/with-selector`),require(`react-resizable-panels`)):typeof define==`function`&&define.amd?define([`exports`,`react`,`react/jsx-runtime`,`react-dom`,`use-sync-external-store/shim`,`use-sync-external-store/shim/with-selector`,`react-resizable-panels`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.dawnUIReact={},e.react,e.react_jsx_runtime,e.react_dom,e.use_sync_external_store_shim,e.use_sync_external_store_shim_with_selector,e.react_resizable_panels))})(this,function(e,t,n,r,i,a,o){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var s=Object.create,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,u=Object.getOwnPropertyNames,d=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty,p=(e,t)=>()=>(e&&(t=e(e=0)),t),m=(e,t)=>{let n={};for(var r in e)c(n,r,{get:e[r],enumerable:!0});return t||c(n,Symbol.toStringTag,{value:`Module`}),n},h=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=u(t),a=0,o=i.length,s;a<o;a++)s=i[a],!f.call(e,s)&&s!==n&&c(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=l(t,s))||r.enumerable});return e},g=(e,t,n)=>(n=e==null?{}:s(d(e)),h(t||!e||!e.__esModule?c(n,`default`,{value:e,enumerable:!0}):n,e));let _=g(t,1);t=g(t);let v=g(r,1);r=g(r),o=g(o,1);function y(...e){if(process.env.NODE_ENV!==`production`){let t=e.join(` `);b.has(t)||(b.add(t),console.error(`Base UI: ${t}`))}}var b,x=p((()=>{process.env.NODE_ENV!==`production`&&(b=new Set)}));function S({controlled:e,default:n,name:r,state:i=`value`}){let{current:a}=t.useRef(e!==void 0),[o,s]=t.useState(n),c=a?e:o;if(process.env.NODE_ENV!==`production`){t.useEffect(()=>{a!==(e!==void 0)&&y([`A component is changing the ${a?``:`un`}controlled ${i} state of ${r} to be ${a?`un`:``}controlled.`,`Elements should not switch from uncontrolled to controlled (or vice versa).`,`Decide between using a controlled or uncontrolled ${r} 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(`
2
- `))},[i,r,e]);let{current:o}=t.useRef(n);t.useEffect(()=>{!a&&C(o)!==C(n)&&y([`A component is changing the default ${i} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join(`
3
- `))},[n])}return[c,t.useCallback(e=>{a||s(e)},[])]}function C(e){let t=0,n=new WeakMap;try{return JSON.stringify(e,function(e,r){if(!(e===`_owner`&&this!=null&&typeof this==`object`&&`$$typeof`in this)){if(typeof r==`bigint`)return`__bigint__:${r}`;if(typeof r==`object`&&r){let e=n.get(r);if(e!==void 0)return`__object__:${e}`;n.set(r,t),t+=1}return r}})??`__top__:${typeof e}`}catch{return`__unserializable__`}}var w=p((()=>{x()}));function T(e,n){let r=t.useRef(E);return r.current===E&&(r.current=e(n)),r}var E,D=p((()=>{E={}}));function O(e){let t=T(k).current;return t.next=e,M(t.effect),t.trampoline}function k(){let e={next:void 0,callback:A,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function A(){if(process.env.NODE_ENV!==`production`)throw Error(`Base UI: Cannot call an event handler while rendering.`)}var j,M,N=p((()=>{D(),j=t[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],M=j&&j!==t.useLayoutEffect?j:e=>e()})),P,F,I=p((()=>{P=()=>{},F=typeof document<`u`?t.useLayoutEffect:P}));function L(...e){if(process.env.NODE_ENV!==`production`){let t=e.join(` `);R.has(t)||(R.add(t),console.warn(`Base UI: ${t}`))}}var R,ee=p((()=>{process.env.NODE_ENV!==`production`&&(R=new Set)}));function z(){return t.useContext(B)}var B,V=p((()=>{B=t.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}}),process.env.NODE_ENV!==`production`&&(B.displayName=`CompositeListContext`)}));function te(e){let{children:r,elementsRef:i,labelsRef:a,onMapChange:o}=e,s=O(o),c=t.useRef(0),l=T(H).current,u=T(ne).current,[d,f]=t.useState(0),p=t.useRef(d),m=O((e,t)=>{u.set(e,t??null),p.current+=1,f(p.current)}),h=O(e=>{u.delete(e),p.current+=1,f(p.current)}),g=t.useMemo(()=>{let e=new Map;return Array.from(u.keys()).filter(e=>e.isConnected).sort(re).forEach((t,n)=>{let r=u.get(t)??{};e.set(t,{...r,index:n})}),e},[u,d]);F(()=>{if(typeof MutationObserver!=`function`||g.size===0)return;let e=new MutationObserver(e=>{let t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),t.size===0&&(p.current+=1,f(p.current))});return g.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[g]),F(()=>{p.current===d&&(i.current.length!==g.size&&(i.current.length=g.size),a&&a.current.length!==g.size&&(a.current.length=g.size),c.current=g.size),s(g)},[s,g,i,a,d]),F(()=>()=>{i.current=[]},[i]),F(()=>()=>{a&&(a.current=[])},[a]);let _=O(e=>(l.add(e),()=>{l.delete(e)}));F(()=>{l.forEach(e=>e(g))},[l,g]);let v=t.useMemo(()=>({register:m,unregister:h,subscribeMapChange:_,elementsRef:i,labelsRef:a,nextIndexRef:c}),[m,h,_,i,a,c]);return(0,n.jsx)(B.Provider,{value:v,children:r})}function ne(){return new Map}function H(){return new Set}function re(e,t){let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}var U=p((()=>{D(),N(),I(),V()}));function W(){return t.useContext(ie)?.direction??`ltr`}var ie,ae=p((()=>{ie=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(ie.displayName=`DirectionContext`)}));function oe(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var G,K=p((()=>{G=oe(`https://base-ui.com/production-error`,`Base UI`)}));function se(){let e=t.useContext(ce);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(10):`Base UI: AccordionRootContext is missing. Accordion parts must be placed within <Accordion.Root>.`);return e}var ce,le=p((()=>{K(),ce=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(ce.displayName=`AccordionRootContext`)}));function ue(e,t,n,r){let i=T(fe).current;return pe(i,e,t,n,r)&&he(i,[e,t,n,r]),i.callback}function de(e){let t=T(fe).current;return me(t,e)&&he(t,e),t.callback}function fe(){return{callback:null,cleanup:null,refs:[]}}function pe(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function me(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function he(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n;break;default:}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null;break;default:}}}}}}var ge=p((()=>{D()}));function _e(e){return ve>=e}var ve,ye=p((()=>{ve=parseInt(t.version,10)}));function be(e){if(!t.isValidElement(e))return null;let n=e,r=n.props;return(_e(19)?r?.ref:n.ref)??null}var xe=p((()=>{ye()}));function Se(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}var Ce=p((()=>{}));function we(){}var Te,Ee,De=p((()=>{Te=Object.freeze([]),Ee=Object.freeze({})}));function Oe(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}var ke=p((()=>{}));function Ae(e,t){return typeof e==`function`?e(t):e}var je=p((()=>{}));function Me(e,t){return typeof e==`function`?e(t):e}var Ne=p((()=>{}));function Pe(e,t,n,r,i){if(!n&&!r&&!i&&!e)return Ie(t);let a=Ie(e);return t&&(a=Le(a,t)),n&&(a=Le(a,n)),r&&(a=Le(a,r)),i&&(a=Le(a,i)),a}function Fe(e){if(e.length===0)return Je;if(e.length===1)return Ie(e[0]);let t=Ie(e[0]);for(let n=1;n<e.length;n+=1)t=Le(t,e[n]);return t}function Ie(e){return Ve(e)?{...He(e,Je)}:Re(e)}function Le(e,t){return Ve(t)?He(t,e):ze(e,t)}function Re(e){let t={...e};for(let e in t){let n=t[e];Be(e,n)&&(t[e]=We(n))}return t}function ze(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=Se(e.style,r);break;case`className`:e[n]=Ke(e.className,r);break;default:Be(n,r)?e[n]=Ue(e[n],r):e[n]=r}}return e}function Be(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function Ve(e){return typeof e==`function`}function He(e,t){return Ve(e)?e(t):e??Je}function Ue(e,t){return t?e?(...n)=>{let r=n[0];if(qe(r)){let i=r;Ge(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:We(t):e}function We(e){return e&&((...t)=>{let n=t[0];return qe(n)&&Ge(n),e(...t)})}function Ge(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Ke(e,t){return t?e?t+` `+e:t:e}function qe(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}var Je,Ye=p((()=>{Ce(),Je={}})),Xe=p((()=>{Ye()}));function q(e,t,n={}){let r=t.render,i=Ze(t,n);return n.enabled===!1?null:$e(e,r,i,n.state??Ee)}function Ze(e,t={}){let{className:n,style:r,render:i}=e,{state:a=Ee,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?Ae(n,a):void 0,d=l?Me(r,a):void 0,f=l?Oe(a,c):Ee,p=l&&s?Qe(s):void 0,m=l?Se(f,p)??{}:Ee;return typeof document<`u`&&(l?Array.isArray(o)?m.ref=de([m.ref,be(i),...o]):m.ref=ue(m.ref,be(i),o):ue(null,null)),l?(u!==void 0&&(m.className=Ke(m.className,u)),d!==void 0&&(m.style=Se(m.style,d)),m):Ee}function Qe(e){return Array.isArray(e)?Fe(e):Pe(void 0,e)}function $e(e,n,r,i){if(n){if(typeof n==`function`)return process.env.NODE_ENV!==`production`&&et(n),n(r,i);let e=Pe(r,n.props);e.ref=r.ref;let a=n;if(a?.$$typeof===nt&&(a=t.Children.toArray(n)[0]),process.env.NODE_ENV!==`production`&&!t.isValidElement(a))throw 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(`
4
- `));return t.cloneElement(a,e)}if(e&&typeof e==`string`)return tt(e,r);throw Error(process.env.NODE_ENV===`production`?G(8):`Base UI: Render element or function are not defined.`)}function et(e){let t=e.name;t.length!==0&&rt.test(t)&&it.test(t)&&L(`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 tt(e,n){return e===`button`?(0,t.createElement)(`button`,{type:`button`,...n,key:n.key}):e===`img`?(0,t.createElement)(`img`,{alt:``,...n,key:n.key}):t.createElement(e,n)}var nt,rt,it,J=p((()=>{K(),ge(),xe(),Ce(),ee(),De(),ke(),je(),Ne(),Xe(),nt=Symbol.for(`react.lazy`),rt=/^[A-Z][A-Za-z0-9$]*$/,it=/[a-z]/})),at,ot,st,ct,lt,ut,dt,ft,pt,mt,ht,gt,_t,vt,yt,bt,xt,St,Ct,wt,Tt,Et,Dt,Ot,kt,At,jt,Mt,Nt,Pt,Ft=p((()=>{at=`none`,ot=`trigger-press`,st=`trigger-hover`,ct=`trigger-focus`,lt=`outside-press`,ut=`item-press`,dt=`close-press`,ft=`clear-press`,pt=`chip-remove-press`,mt=`track-press`,ht=`increment-press`,gt=`decrement-press`,_t=`input-change`,vt=`input-clear`,yt=`input-blur`,bt=`input-paste`,xt=`input-press`,St=`focus-out`,Ct=`escape-key`,wt=`close-watcher`,Tt=`list-navigation`,Et=`keyboard`,Dt=`drag`,Ot=`scrub`,kt=`cancel-open`,At=`sibling-open`,jt=`disabled`,Mt=`imperative-action`,Nt=`swipe`,Pt=`window-resize`})),It=p((()=>{Ft()}));function Y(e,t,n,r){let i=!1,a=!1,o=r??Ee;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function Lt(e,t,n){let r=n??Ee;return{reason:e,event:t??new Event(`base-ui`),...r}}var Rt=p((()=>{De()})),zt,Bt,Vt=p((()=>{w(),N(),I(),ee(),U(),ae(),le(),J(),Rt(),It(),zt={value:()=>null},Bt=t.forwardRef(function(e,r){let{render:i,className:a,disabled:o=!1,hiddenUntilFound:s,keepMounted:c,loopFocus:l=!0,onValueChange:u,multiple:d=!1,orientation:f=`vertical`,value:p,defaultValue:m,style:h,...g}=e,_=W();process.env.NODE_ENV!==`production`&&F(()=>{s&&c===!1&&L("The `keepMounted={false}` prop on a Accordion.Root will be ignored when using `hiddenUntilFound` since it requires Panels to remain mounted when closed.")},[s,c]);let v=t.useMemo(()=>{if(p===void 0)return m??[]},[p,m]),y=O(u),b=t.useRef([]),[x,C]=S({controlled:p,default:v,name:`Accordion`,state:`value`}),w=O((e,t)=>{let n=Y(at);if(!d){let t=x[0]===e?[]:[e];if(y(t,n),n.isCanceled)return;C(t)}else if(t){let t=x.slice();if(t.push(e),y(t,n),n.isCanceled)return;C(t)}else{let t=x.filter(t=>t!==e);if(y(t,n),n.isCanceled)return;C(t)}}),T=t.useMemo(()=>({value:x,disabled:o,orientation:f}),[x,o,f]),E=t.useMemo(()=>({accordionItemRefs:b,direction:_,disabled:o,handleValueChange:w,hiddenUntilFound:s??!1,keepMounted:c??!1,loopFocus:l,orientation:f,state:T,value:x}),[_,o,w,s,c,l,f,T,x]),D=q(`div`,e,{state:T,ref:r,props:[{dir:_,role:`region`},g],stateAttributesMapping:zt});return(0,n.jsx)(ce.Provider,{value:E,children:(0,n.jsx)(te,{elementsRef:b,children:D})})}),process.env.NODE_ENV!==`production`&&(Bt.displayName=`AccordionRoot`)})),Ht,Ut=p((()=>{Ht={...t}}));function Wt(e,n=`mui`){let[r,i]=t.useState(e),a=e||r;return t.useEffect(()=>{r??(Kt+=1,i(`${n}-${Kt}`))},[r,n]),a}function Gt(e,t){if(qt!==void 0){let n=qt();return e??(t?`${t}-${n}`:n)}return Wt(e,t)}var Kt,qt,Jt=p((()=>{Ut(),Kt=0,qt=Ht.useId}));function Yt(e){return Gt(e,`base-ui`)}var Xt=p((()=>{Jt()}));function Zt(e){t.useEffect(e,Qt)}var Qt,$t=p((()=>{Qt=[]}));function en(){let e=T(on.create).current;return Zt(e.disposeEffect),e}var tn,nn,rn,an,on,sn=p((()=>{D(),$t(),tn=null,nn=globalThis.requestAnimationFrame,rn=class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1;let n=process.env.NODE_ENV!==`production`&&nn!==requestAnimationFrame&&(nn=requestAnimationFrame,!0);return(!this.isScheduled||n)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,--this.callbacksCount)}},an=new rn,on=class e{static create(){return new e}static request(e){return an.request(e)}static cancel(e){return an.cancel(e)}currentId=tn;request(e){this.cancel(),this.currentId=an.request(()=>{this.currentId=tn,e()})}cancel=()=>{this.currentId!==tn&&(an.cancel(this.currentId),this.currentId=tn)};disposeEffect=()=>this.cancel}}));function cn(e){return e==null?e:`current`in e?e.current:e}var ln=p((()=>{})),un,dn,fn,pn,mn=p((()=>{un=function(e){return e.startingStyle=`data-starting-style`,e.endingStyle=`data-ending-style`,e}({}),dn={[un.startingStyle]:``},fn={[un.endingStyle]:``},pn={transitionStatus(e){return e===`starting`?dn:e===`ending`?fn:null}}}));function hn(e,t=!1,n=!0){let i=en();return O((a,o=null)=>{i.cancel();let s=cn(e);if(s==null)return;let c=s,l=()=>{r.flushSync(a)};if(typeof c.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){a();return}function u(){Promise.all(c.getAnimations().map(e=>e.finished)).then(()=>{o?.aborted||l()}).catch(()=>{if(n){o?.aborted||l();return}let e=c.getAnimations();!o?.aborted&&e.length>0&&e.some(e=>e.pending||e.playState!==`finished`)&&u()})}if(t){let e=un.startingStyle;if(!c.hasAttribute(e)){i.request(u);return}let t=new MutationObserver(()=>{c.hasAttribute(e)||(t.disconnect(),u())});t.observe(c,{attributes:!0,attributeFilter:[e]}),o?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}i.request(u)})}var gn=p((()=>{sn(),N(),ln(),mn()}));function _n(e,n=!1,r=!1){let[i,a]=t.useState(e&&n?`idle`:void 0),[o,s]=t.useState(e);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!r&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),F(()=>{if(!e&&o&&i!==`ending`&&r){let e=on.request(()=>{a(`ending`)});return()=>{on.cancel(e)}}},[e,o,i,r]),F(()=>{if(!e||n)return;let t=on.request(()=>{a(void 0)});return()=>{on.cancel(t)}},[n,e]),F(()=>{if(!e||!n)return;e&&o&&i!==`idle`&&a(`starting`);let t=on.request(()=>{a(`idle`)});return()=>{on.cancel(t)}},[n,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}var vn=p((()=>{I(),sn()}));function yn(e){let{open:n,defaultOpen:r,onOpenChange:i,disabled:a}=e,o=n!==void 0,[s,c]=S({controlled:n,default:r,name:`Collapsible`,state:`open`}),{mounted:l,setMounted:u,transitionStatus:d}=_n(s,!0,!0),[f,p]=t.useState(s),[{height:m,width:h},g]=t.useState({height:void 0,width:void 0}),_=Yt(),[v,y]=t.useState(),b=v??_,[x,C]=t.useState(!1),[w,T]=t.useState(!1),E=t.useRef(null),D=t.useRef(null),k=t.useRef(null),A=t.useRef(null),j=hn(A,!1),M=O(e=>{let t=!s,n=Y(ot,e.nativeEvent);if(i(t,n),n.isCanceled)return;let r=A.current;D.current===`css-animation`&&r!=null&&r.style.removeProperty(`animation-name`),!x&&!w&&(D.current!=null&&D.current!==`css-animation`&&!l&&t&&u(!0),D.current===`css-animation`&&(!f&&t&&p(!0),!l&&t&&u(!0))),c(t),D.current===`none`&&l&&!t&&u(!1)});return F(()=>{o&&D.current===`none`&&!s&&u(!1)},[o,s,n,u]),t.useMemo(()=>({abortControllerRef:E,animationTypeRef:D,disabled:a,handleTrigger:M,height:m,mounted:l,open:s,panelId:b,panelRef:A,runOnceAnimationsFinish:j,setDimensions:g,setHiddenUntilFound:C,setKeepMounted:T,setMounted:u,setOpen:c,setPanelIdState:y,setVisible:p,transitionDimensionRef:k,transitionStatus:d,visible:f,width:h}),[E,D,a,M,m,l,s,b,A,j,g,C,T,u,c,p,k,d,f,h])}var bn=p((()=>{w(),I(),N(),Xt(),Rt(),It(),gn(),vn()}));function xn(){let e=t.useContext(Sn);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(15):`Base UI: CollapsibleRootContext is missing. Collapsible parts must be placed within <Collapsible.Root>.`);return e}var Sn,Cn=p((()=>{K(),Sn=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Sn.displayName=`CollapsibleRootContext`)}));function wn(e={}){let{label:n,metadata:r,textRef:i,indexGuessBehavior:a,index:o}=e,{register:s,unregister:c,subscribeMapChange:l,elementsRef:u,labelsRef:d,nextIndexRef:f}=z(),p=t.useRef(-1),[m,h]=t.useState(o??(a===Tn.GuessFromOrder?()=>{if(p.current===-1){let e=f.current;f.current+=1,p.current=e}return p.current}:-1)),g=t.useRef(null),_=t.useCallback(e=>{if(g.current=e,m!==-1&&e!==null&&(u.current[m]=e,d)){let t=n!==void 0;d.current[m]=t?n:i?.current?.textContent??e.textContent}},[m,u,d,n,i]);return F(()=>{if(o!=null)return;let e=g.current;if(e)return s(e,r),()=>{c(e)}},[o,s,c,r]),F(()=>{if(o==null)return l(e=>{let t=g.current?e.get(g.current)?.index:null;t!=null&&h(t)})},[o,l,h]),t.useMemo(()=>({ref:_,index:m}),[m,_])}var Tn,En=p((()=>{I(),V(),Tn=function(e){return e[e.None=0]=`None`,e[e.GuessFromOrder=1]=`GuessFromOrder`,e}({})}));function Dn(){let e=t.useContext(On);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(9):`Base UI: AccordionItemContext is missing. Accordion parts must be placed within <Accordion.Item>.`);return e}var On,kn=p((()=>{K(),On=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(On.displayName=`AccordionItemContext`)})),An,jn=p((()=>{mn(),An=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=un.startingStyle]=`startingStyle`,e[e.endingStyle=un.endingStyle]=`endingStyle`,e}({})})),Mn,Nn=p((()=>{Mn=function(e){return e.panelOpen=`data-panel-open`,e}({})})),Pn,Fn,In,Ln,Rn=p((()=>{jn(),Nn(),Pn={[An.open]:``},Fn={[An.closed]:``},In={open(e){return e?{[Mn.panelOpen]:``}:null}},Ln={open(e){return e?Pn:Fn}}})),zn,Bn=p((()=>{zn=function(e){return e.index=`data-index`,e.disabled=`data-disabled`,e.open=`data-open`,e}({})})),Vn,Hn=p((()=>{Rn(),mn(),Bn(),Vn={...Ln,index:e=>Number.isInteger(e)?{[zn.index]:String(e)}:null,...pn,value:()=>null}})),Un,Wn=p((()=>{N(),ge(),Xt(),bn(),Cn(),En(),le(),kn(),Hn(),J(),Un=t.forwardRef(function(e,r){let{className:i,disabled:a=!1,onOpenChange:o,render:s,value:c,style:l,...u}=e,{ref:d,index:f}=wn(),p=ue(r,d),{disabled:m,handleValueChange:h,state:g,value:_}=se(),v=Yt(),y=c??v,b=a||m,x=t.useMemo(()=>{if(!_)return!1;for(let e=0;e<_.length;e+=1)if(_[e]===y)return!0;return!1},[_,y]),S=O((e,t)=>{o?.(e,t),!t.isCanceled&&h(y,e)}),C=yn({open:x,onOpenChange:S,disabled:b}),w=t.useMemo(()=>({open:C.open,disabled:C.disabled,hidden:!C.mounted,transitionStatus:C.transitionStatus}),[C.open,C.disabled,C.mounted,C.transitionStatus]),T=t.useMemo(()=>({...C,onOpenChange:S,state:w}),[C,w,S]),E=t.useMemo(()=>({...g,index:f,disabled:b,open:x}),[b,f,x,g]),[D,k]=t.useState(Yt()),A=t.useMemo(()=>({open:x,state:E,setTriggerId:k,triggerId:D}),[x,E,k,D]),j=q(`div`,e,{state:E,ref:p,props:u,stateAttributesMapping:Vn});return(0,n.jsx)(Sn.Provider,{value:T,children:(0,n.jsx)(On.Provider,{value:A,children:j})})}),process.env.NODE_ENV!==`production`&&(Un.displayName=`AccordionItem`)})),Gn,Kn=p((()=>{J(),kn(),Hn(),Gn=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=Dn();return q(`h3`,e,{state:o,ref:t,props:a,stateAttributesMapping:Vn})}),process.env.NODE_ENV!==`production`&&(Gn.displayName=`AccordionHeader`)}));function qn(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var Jn=p((()=>{}));function Yn(){return typeof window<`u`}function Xn(e){return $n(e)?(e.nodeName||``).toLowerCase():`#document`}function Zn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qn(e){return(($n(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function $n(e){return Yn()?e instanceof Node||e instanceof Zn(e).Node:!1}function er(e){return Yn()?e instanceof Element||e instanceof Zn(e).Element:!1}function tr(e){return Yn()?e instanceof HTMLElement||e instanceof Zn(e).HTMLElement:!1}function nr(e){return!Yn()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Zn(e).ShadowRoot}function rr(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=ur(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ir(e){return/^(table|td|th)$/.test(Xn(e))}function ar(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}function or(e){let t=er(e)?ur(e):e;return vr(t.transform)||vr(t.translate)||vr(t.scale)||vr(t.rotate)||vr(t.perspective)||!cr()&&(vr(t.backdropFilter)||vr(t.filter))||gr.test(t.willChange||``)||_r.test(t.contain||``)}function sr(e){let t=fr(e);for(;tr(t)&&!lr(t);){if(or(t))return t;if(ar(t))return null;t=fr(t)}return null}function cr(){return yr??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),yr}function lr(e){return/^(html|body|#document)$/.test(Xn(e))}function ur(e){return Zn(e).getComputedStyle(e)}function dr(e){return er(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function fr(e){if(Xn(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||nr(e)&&e.host||Qn(e);return nr(t)?t.host:t}function pr(e){let t=fr(e);return lr(t)?e.ownerDocument?e.ownerDocument.body:e.body:tr(t)&&rr(t)?t:pr(t)}function mr(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=pr(e),i=r===e.ownerDocument?.body,a=Zn(r);if(i){let e=hr(a);return t.concat(a,a.visualViewport||[],rr(r)?r:[],e&&n?mr(e):[])}else return t.concat(r,mr(r,[],n))}function hr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var gr,_r,vr,yr,br=p((()=>{gr=/transform|translate|scale|rotate|perspective|filter/,_r=/paint|layout|strict|content/,vr=e=>!!e&&e!==`none`}));function xr(e=!1){let n=t.useContext(Sr);if(n===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?G(16):`Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.`);return n}var Sr,Cr=p((()=>{K(),Sr=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Sr.displayName=`CompositeRootContext`)}));function wr(e){let{focusableWhenDisabled:n,disabled:r,composite:i=!1,tabIndex:a=0,isNativeButton:o}=e,s=i&&n!==!1,c=i&&n===!1;return{props:t.useMemo(()=>{let e={onKeyDown(e){r&&n&&e.key!==`Tab`&&e.preventDefault()}};return i||(e.tabIndex=a,!o&&r&&(e.tabIndex=n?a:-1)),(o&&(n||s)||!o&&r)&&(e[`aria-disabled`]=r),o&&(!n||c)&&(e.disabled=r),e},[i,r,n,s,c,o,a])}}var Tr=p((()=>{}));function Er(e={}){let{disabled:n=!1,focusableWhenDisabled:r,tabIndex:i=0,native:a=!0,composite:o}=e,s=t.useRef(null),c=xr(!0),l=o??c!==void 0,{props:u}=wr({focusableWhenDisabled:r,disabled:n,composite:l,tabIndex:i,isNativeButton:a});process.env.NODE_ENV!==`production`&&t.useEffect(()=>{if(!s.current)return;let e=Dr(s.current);a?e||y(`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\`.${Ht.captureOwnerStack?.()||``}`):e&&y(`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\`.${Ht.captureOwnerStack?.()||``}`)},[a]);let d=t.useCallback(()=>{let e=s.current;Dr(e)&&l&&n&&u.disabled===void 0&&e.disabled&&(e.disabled=!1)},[n,u.disabled,l]);return F(d,[d]),{getButtonProps:t.useCallback((e={})=>{let{onClick:t,onMouseDown:r,onKeyUp:i,onKeyDown:o,onPointerDown:s,...c}=e;return Pe({type:a?`button`:void 0,onClick(e){if(n){e.preventDefault();return}t?.(e)},onMouseDown(e){n||r?.(e)},onKeyDown(e){if(n||(Ge(e),o?.(e),e.baseUIHandlerPrevented))return;let r=e.target===e.currentTarget,i=e.currentTarget,s=Dr(i),c=!a&&Or(i),u=r&&(a?s:!c),d=e.key===`Enter`,f=e.key===` `,p=i.getAttribute(`role`),m=p?.startsWith(`menuitem`)||p===`option`||p===`gridcell`;if(r&&l&&f){if(e.defaultPrevented&&m)return;e.preventDefault(),c||a&&s?(i.click(),e.preventBaseUIHandler()):u&&(t?.(e),e.preventBaseUIHandler());return}u&&(!a&&(f||d)&&e.preventDefault(),!a&&d&&t?.(e))},onKeyUp(e){if(!n){if(Ge(e),i?.(e),e.target===e.currentTarget&&a&&l&&Dr(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!a&&!l&&e.key===` `&&t?.(e)}},onPointerDown(e){if(n){e.preventDefault();return}s?.(e)}},a?void 0:{role:`button`},u,c)},[n,u,l,a]),buttonRef:O(e=>{s.current=e,d()})}}function Dr(e){return tr(e)&&e.tagName===`BUTTON`}function Or(e){return!!(e?.tagName===`A`&&e?.href)}var kr=p((()=>{br(),N(),x(),Ut(),I(),Xe(),Cr(),Tr()})),Ar=p((()=>{kr()}));function jr(){if(!Pr)return{platform:``,maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??-1}}function Mr(){if(!Pr)return``;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}function Nr(){if(!Pr)return``;let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??``}var Pr,Fr,Ir,Lr,Rr,zr,Br,Vr,Hr,Ur,Wr,Gr=p((()=>{Pr=typeof navigator<`u`,Fr=jr(),Ir=Nr(),Lr=Mr(),Rr=typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter:none`),zr=Fr.platform===`MacIntel`&&Fr.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Fr.platform),Br=Pr&&/firefox/i.test(Lr),Vr=Pr&&/apple/i.test(navigator.vendor),Pr&&/Edg/i.test(Lr),Hr=Pr&&/android/i.test(Ir)||/android/i.test(Lr),Ur=Pr&&Ir.toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints,Wr=Lr.includes(`jsdom/`)})),Kr,qr,Jr,Yr,Xr,Zr,Qr=p((()=>{Kr=`data-base-ui-focusable`,qr=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,Jr=`ArrowLeft`,Yr=`ArrowRight`,Xr=`ArrowUp`,Zr=`ArrowDown`}));function $r(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function ei(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&nr(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function ti(e){return`composedPath`in e?e.composedPath()[0]:e.target}var ni=p((()=>{br()}));function ri(e,t){if(!er(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(`data-trigger-disabled`);for(let[,e]of t.entries())if(ei(e,n))return!e.hasAttribute(`data-trigger-disabled`);return!1}function ii(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function ai(e){return e.matches(`html,body`)}function oi(e){return tr(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function si(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${qr}`)!=null}function ci(e){return e?e.getAttribute(`role`)===`combobox`&&oi(e):!1}function li(e){if(!e||Wr)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function ui(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}var di=p((()=>{br(),Gr(),Qr(),ni()}));function fi(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...fi(e,t.id,n)])}function pi(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}var mi=p((()=>{}));function hi(e){e.preventDefault(),e.stopPropagation()}function gi(e){return`nativeEvent`in e}function _i(e){return e.pointerType===``&&e.isTrusted?!0:Hr&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function vi(e){return Wr?!1:!Hr&&e.width===0&&e.height===0||Hr&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function yi(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function bi(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var xi=p((()=>{Gr()}));function Si(e,t,n){return Vi(e,Bi(t,n))}function Ci(e,t){return typeof e==`function`?e(t):e}function wi(e){return e.split(`-`)[0]}function Ti(e){return e.split(`-`)[1]}function Ei(e){return e===`x`?`y`:`x`}function Di(e){return e===`y`?`height`:`width`}function Oi(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function ki(e){return Ei(Oi(e))}function Ai(e,t,n){n===void 0&&(n=!1);let r=Ti(e),i=ki(e),a=Di(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Fi(o)),[o,Fi(o)]}function ji(e){let t=Fi(e);return[Mi(e),t,Mi(t)]}function Mi(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}function Ni(e,t,n){switch(e){case`top`:case`bottom`:return n?t?qi:Ki:t?Ki:qi;case`left`:case`right`:return t?Ji:Yi;default:return[]}}function Pi(e,t,n,r){let i=Ti(e),a=Ni(wi(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Mi)))),a}function Fi(e){let t=wi(e);return Gi[t]+e.slice(t.length)}function Ii(e){return{top:0,right:0,bottom:0,left:0,...e}}function Li(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Ii(e)}function Ri(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}var zi,Bi,Vi,Hi,Ui,Wi,Gi,Ki,qi,Ji,Yi,Xi=p((()=>{zi=[`top`,`right`,`bottom`,`left`],Bi=Math.min,Vi=Math.max,Hi=Math.round,Ui=Math.floor,Wi=e=>({x:e,y:e}),Gi={left:`right`,right:`left`,bottom:`top`,top:`bottom`},Ki=[`left`,`right`],qi=[`right`,`left`],Ji=[`top`,`bottom`],Yi=[`bottom`,`top`]}));function Zi(e,t,n){return Math.floor(e/t)!==n}function Qi(e,t){return t<0||t>=e.length}function $i(e,t){return ta(e.current,{disabledIndices:t})}function ea(e,t){return ta(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function ta(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&oa(e,a,r));return a}function na(e,{event:t,orientation:n,loopFocus:r,onLoop:i,rtl:a,cols:o,disabledIndices:s,minIndex:c,maxIndex:l,prevIndex:u,stopEvent:d=!1}){let f=u,p;if(t.key===`ArrowUp`?p=`up`:t.key===`ArrowDown`&&(p=`down`),p){let n=[],a=[],m=!1,h=0;{let t=null,r=-1;e.forEach((e,i)=>{if(e==null)return;h+=1;let o=e.closest(`[role="row"]`);o&&(m=!0),(o!==t||r===-1)&&(t=o,r+=1,n[r]=[]),n[r].push(i),a[i]=r})}let g=!1,_=0;if(m)for(let e of n){let t=e.length;t>_&&(_=t),t!==o&&(g=!0)}let v=g&&h<e.length,y=_||o,b=o=>{if(!g||u===-1)return;let c=a[u];if(c==null)return;let l=n[c].indexOf(u),d=o===`up`?-1:1;for(let o=c+d,f=0;f<n.length;f+=1,o+=d){if(o<0||o>=n.length){if(!r||v)return;if(o=o<0?n.length-1:0,i){let e=Math.min(l,n[o].length-1);o=a[i(t,u,n[o][e]??n[o][0])]??o}}let c=n[o];for(let t=Math.min(l,c.length-1);t>=0;--t){let n=c[t];if(!oa(e,n,s))return n}}},x=t=>{if(!v||u===-1)return;let n=u%y,i=t===`up`?-y:y,a=l-l%y,o=Ui(l/y)+1;for(let t=u-n+i,c=0;c<o;c+=1,t+=i){if(t<0||t>l){if(!r)return;t=t<0?a:0}let i=Math.min(t+y-1,l);for(let r=Math.min(t+n,i);r>=t;--r)if(!oa(e,r,s))return r}};d&&hi(t);let S=b(p)??x(p);if(S!==void 0)f=S;else if(u===-1)f=p===`up`?l:c;else if(f=ta(e,{startingIndex:u,amount:y,decrement:p===`up`,disabledIndices:s}),r){if(p===`up`&&(u-y<c||f<0)){let e=u%y,n=l%y,r=l-(n-e);f=n===e?l:n>e?r:r-y,i&&(f=i(t,u,f))}p===`down`&&u+y>l&&(f=ta(e,{startingIndex:u%y-y,amount:y,disabledIndices:s}),i&&(f=i(t,u,f)))}Qi(e,f)&&(f=u)}if(n===`both`){let n=Ui(u/o);t.key===(a?`ArrowLeft`:`ArrowRight`)&&(d&&hi(t),u%o===o-1?r&&(f=ta(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):(f=ta(e,{startingIndex:u,disabledIndices:s}),r&&Zi(f,o,n)&&(f=ta(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f)))),Zi(f,o,n)&&(f=u)),t.key===(a?`ArrowRight`:`ArrowLeft`)&&(d&&hi(t),u%o===0?r&&(f=ta(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f))):(f=ta(e,{startingIndex:u,decrement:!0,disabledIndices:s}),r&&Zi(f,o,n)&&(f=ta(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f)))),Zi(f,o,n)&&(f=u));let c=Ui(l/o)===n;Qi(e,f)&&(r&&c?(f=t.key===(a?`ArrowRight`:`ArrowLeft`)?l:ta(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):f=u)}return f}function ra(e,t,n){let r=[],i=0;return e.forEach(({width:e,height:a},o)=>{if(e>t&&process.env.NODE_ENV!==`production`)throw Error(`[Floating UI]: Invalid grid - item width at index ${o} is greater than grid columns`);let s=!1;for(n&&(i=0);!s;){let n=[];for(let r=0;r<e;r+=1)for(let e=0;e<a;e+=1)n.push(i+r+e*t);i%t+e<=t&&n.every(e=>r[e]==null)?(n.forEach(e=>{r[e]=o}),s=!0):i+=1}}),[...r]}function ia(e,t,n,r,i){if(e===-1)return-1;let a=n.indexOf(e),o=t[e];switch(i){case`tl`:return a;case`tr`:return o?a+o.width-1:a;case`bl`:return o?a+(o.height-1)*r:a;case`br`:return n.lastIndexOf(e);default:return-1}}function aa(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function oa(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?ca(r)?!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!0:!1}function sa(e){return e.visibility===`hidden`||e.visibility===`collapse`}function ca(e,t=e?ur(e):null){return!e||!e.isConnected||!t||sa(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var la=p((()=>{Xi(),br(),xi(),Qr()}));function ua(e){return e?.ownerDocument||document}var da=p((()=>{br()}));function fa(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return nr(n)?n.host:null}function pa(e){for(let t of Array.from(e.children))if(Xn(t)===`summary`)return t;return null}function ma(e,t){let n=pa(t);return!!n&&(e===n||ei(n,e))}function ha(e){let t=e?Xn(e):``;return e!=null&&e.matches(Ia)&&(t!==`summary`||e.parentElement!=null&&Xn(e.parentElement)===`details`&&pa(e.parentElement)===e)&&(t!==`details`||pa(e)==null)&&(t!==`input`||e.type!==`hidden`)}function ga(e){if(!ha(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=fa(t)){let n=t!==e,r=Xn(t)===`slot`;if(t.hasAttribute(`inert`)||n&&Xn(t)===`details`&&!t.open&&!ma(e,t)||t.hasAttribute(`hidden`)||!r&&!_a(t,n))return!1}return!0}function _a(e,t){let n=ur(e);return t?n.display!==`none`:ca(e,n)}function va(e){let t=e.tabIndex;if(t<0){let t=Xn(e);if(t===`details`||t===`audio`||t===`video`||tr(e)&&e.isContentEditable)return 0}return t}function ya(e){if(Xn(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function ba(e,t){let n=ya(e);if(!n)return!0;let r=t.find(e=>{let t=ya(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=ya(e);return t?.name===n.name&&t.form===n.form})===n}function xa(e){if(tr(e)&&Xn(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return tr(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Sa(e,t){xa(e).forEach(e=>{ha(e)&&t.push(e),Sa(e,t)})}function Ca(e,t,n){xa(e).forEach(e=>{tr(e)&&e.matches(t)&&n.push(e),Ca(e,t,n)})}function wa(e){return ga(e)&&va(e)>=0}function Ta(e){let t=[];return Sa(e,t),t.filter(ga)}function Ea(e){let t=Ta(e);return t.filter(e=>va(e)>=0&&ba(e,t))}function Da(e,t){let n=Ea(e),r=n.length;if(r===0)return;let i=$r(ua(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Oa(e){return Da(ua(e).body,1)||e}function ka(e){return Da(ua(e).body,-1)||e}function Aa(e,t){if(!e)return null;let n=Ea(ua(e).body),r=n.length;if(r===0)return null;let i=n.indexOf(e);return i===-1?null:n[(i+t+r)%r]}function ja(e){return Aa(e,1)}function Ma(e){return Aa(e,-1)}function Na(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!ei(n,r)}function Pa(e){Ea(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Fa(e){let t=[];Ca(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var Ia,La=p((()=>{br(),da(),di(),la(),Ia=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`})),Ra=p((()=>{di(),mi(),xi(),la(),La()}));function za(e){return tr(e)&&e.tagName===`INPUT`}function Ba(e){return!!(za(e)&&e.selectionStart!=null||tr(e)&&e.tagName===`TEXTAREA`)}function Va(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!==`vertical`){let r=Ha(e,t,`left`),a=Ua(e),o=Ua(t);n===`ltr`&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft&&(i=r-o.scrollMarginLeft-a.scrollPaddingLeft)),n===`rtl`&&(r-o.scrollMarginRight<e.scrollLeft+a.scrollPaddingLeft?i=r-o.scrollMarginLeft-a.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=Ha(e,t,`top`),r=Ua(e),i=Ua(t);n-i.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?a=n-i.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+i.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function Ha(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function Ua(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}var Wa,Ga,Ka,qa,Ja,Ya,Xa,Za,Qa,$a,eo,to,no,ro,io,ao,oo,so,co=p((()=>{br(),Ra(),Wa=`ArrowUp`,Ga=`ArrowDown`,Ka=`ArrowLeft`,qa=`ArrowRight`,Ja=`Home`,Ya=`PageUp`,Xa=`PageDown`,Za=new Set([Ka,qa]),Qa=new Set([Ka,qa,Ja,`End`]),$a=new Set([Wa,Ga]),eo=new Set([Wa,Ga,Ja,`End`]),to=new Set([...Za,...$a]),no=new Set([...to,Ja,`End`]),ro=new Set([Wa,Ga,Ka,qa,Ja,`End`]),io=`Shift`,ao=`Control`,oo=`Meta`,so=new Set([io,ao,`Alt`,oo])}));function lo(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}var uo=p((()=>{})),fo,po=p((()=>{fo=function(e){return e.disabled=`data-disabled`,e.orientation=`data-orientation`,e}({})}));function mo(e){let{abortControllerRef:n,animationTypeRef:r,externalRef:i,height:a,hiddenUntilFound:o,keepMounted:s,id:c,mounted:l,onOpenChange:u,open:d,panelRef:f,runOnceAnimationsFinish:p,setDimensions:m,setMounted:h,setOpen:g,setVisible:_,transitionDimensionRef:v,visible:y,width:b}=e,x=t.useRef(!1),S=t.useRef(null),C=t.useRef(d),w=t.useRef(d),T=en(),E=t.useMemo(()=>r.current===`css-animation`?!y:!d&&!l,[d,l,y,r]),D=ue(i,f,O(e=>{if(!e)return;if(r.current==null||v.current==null){let t=getComputedStyle(e),n=t.animationName!==`none`&&t.animationName!==``,i=t.transitionDuration!==`0s`&&t.transitionDuration!==``;n&&i?process.env.NODE_ENV!==`production`&&L(`CSS transitions and CSS animations both detected on Collapsible or Accordion panel.`,`Only one of either animation type should be used.`):t.animationName===`none`&&t.transitionDuration!==`0s`?r.current=`css-transition`:t.animationName!==`none`&&t.transitionDuration===`0s`?r.current=`css-animation`:r.current=`none`,e.getAttribute(fo.orientation)===`horizontal`||t.transitionProperty.indexOf(`width`)>-1?v.current=`width`:v.current=`height`}if(r.current!==`css-transition`)return;(a===void 0||b===void 0)&&(m({height:e.scrollHeight,width:e.scrollWidth}),w.current&&e.style.setProperty(`transition-duration`,`0s`));let t=-1,n=-1;return t=on.request(()=>{w.current=!1,n=on.request(()=>{setTimeout(()=>{e.style.removeProperty(`transition-duration`)})})}),()=>{on.cancel(t),on.cancel(n)}}));return F(()=>{if(r.current!==`css-transition`)return;let e=f.current;if(!e)return;let t=-1;if(n.current!=null&&(n.current.abort(),n.current=null),d){let n={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(n).forEach(t=>{e.style.setProperty(t,`initial`,`important`)}),!w.current&&!s&&e.setAttribute(An.startingStyle,``),m({height:e.scrollHeight,width:e.scrollWidth}),t=on.request(()=>{Object.entries(n).forEach(([t,n])=>{n===``?e.style.removeProperty(t):e.style.setProperty(t,n)})})}else{if(e.scrollHeight===0&&e.scrollWidth===0)return;m({height:e.scrollHeight,width:e.scrollWidth});let t=new AbortController;n.current=t;let r=t.signal,i=null,a=An.endingStyle;return i=new MutationObserver(o=>{o.some(e=>e.type===`attributes`&&e.attributeName===a)&&(i?.disconnect(),i=null,p(()=>{m({height:0,width:0}),e.style.removeProperty(`content-visibility`),h(!1),n.current===t&&(n.current=null)},r))}),i.observe(e,{attributes:!0,attributeFilter:[a]}),()=>{i?.disconnect(),T.cancel(),n.current===t&&(t.abort(),n.current=null)}}return()=>{on.cancel(t)}},[n,r,T,o,s,l,d,f,p,m,h]),F(()=>{if(r.current!==`css-animation`)return;let e=f.current;e&&(S.current=e.style.animationName||S.current,e.style.setProperty(`animation-name`,`none`),m({height:e.scrollHeight,width:e.scrollWidth}),!C.current&&!x.current&&e.style.removeProperty(`animation-name`),d?(n.current!=null&&(n.current.abort(),n.current=null),h(!0),_(!0)):(n.current=new AbortController,p(()=>{h(!1),_(!1),n.current=null},n.current.signal)))},[n,r,d,f,p,m,h,_,y]),Zt(()=>{let e=on.request(()=>{C.current=!1});return()=>on.cancel(e)}),F(()=>{if(!o)return;let e=f.current;if(!e)return;let t=-1,n=-1;return d&&x.current&&(e.style.transitionDuration=`0s`,m({height:e.scrollHeight,width:e.scrollWidth}),t=on.request(()=>{x.current=!1,n=on.request(()=>{setTimeout(()=>{e.style.removeProperty(`transition-duration`)})})})),()=>{on.cancel(t),on.cancel(n)}},[o,d,f,m]),F(()=>{let e=f.current;e&&o&&E&&(e.setAttribute(`hidden`,`until-found`),r.current===`css-transition`&&e.setAttribute(An.startingStyle,``))},[o,E,r,f]),t.useEffect(function(){let e=f.current;if(!e)return;function t(e){x.current=!0,g(!0),u(!0,Y(at,e))}return lo(e,`beforematch`,t)},[u,f,g]),t.useMemo(()=>({props:{hidden:E,id:c,ref:D}}),[E,c,D])}var ho=p((()=>{uo(),I(),N(),ge(),$t(),sn(),ee(),Rt(),It(),jn(),po()})),go,_o=p((()=>{go=function(e){return e.accordionPanelHeight=`--accordion-panel-height`,e.accordionPanelWidth=`--accordion-panel-width`,e}({})}));function vo(e){let{enabled:n=!0,open:r,ref:i,onComplete:a}=e,o=O(a),s=hn(i,r,!1);t.useEffect(()=>{if(!n)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[n,r,o,s])}var yo=p((()=>{N(),gn()})),bo,xo=p((()=>{I(),ee(),Cn(),ho(),le(),kn(),Hn(),_o(),yo(),J(),bo=t.forwardRef(function(e,n){let{className:r,hiddenUntilFound:i,keepMounted:a,id:o,render:s,style:c,...l}=e,{hiddenUntilFound:u,keepMounted:d}=se(),{abortControllerRef:f,animationTypeRef:p,height:m,mounted:h,onOpenChange:g,open:_,panelId:v,panelRef:y,runOnceAnimationsFinish:b,setDimensions:x,setHiddenUntilFound:S,setKeepMounted:C,setMounted:w,setOpen:T,setVisible:E,transitionDimensionRef:D,visible:O,width:k,setPanelIdState:A,transitionStatus:j}=xn(),M=i??u,N=a??d;process.env.NODE_ENV!==`production`&&F(()=>{a===!1&&M&&L("The `keepMounted={false}` prop on a Accordion.Panel will be ignored when using `contextHiddenUntilFound` on the Panel or the Root since it requires the panel to remain mounted when closed.")},[M,a]),F(()=>{if(o)return A(o),()=>{A(void 0)}},[o,A]),F(()=>{S(M)},[S,M]),F(()=>{C(N)},[C,N]),vo({open:_&&j===`idle`,ref:y,onComplete(){_&&x({width:void 0,height:void 0})}});let{props:P}=mo({abortControllerRef:f,animationTypeRef:p,externalRef:n,height:m,hiddenUntilFound:M,id:o??v,keepMounted:N,mounted:h,onOpenChange:g,open:_,panelRef:y,runOnceAnimationsFinish:b,setDimensions:x,setMounted:w,setOpen:T,setVisible:E,transitionDimensionRef:D,visible:O,width:k}),{state:I,triggerId:R}=Dn(),ee=q(`div`,e,{state:t.useMemo(()=>({...I,transitionStatus:j}),[I,j]),ref:[n,y],props:[P,{"aria-labelledby":R,role:`region`,style:{[go.accordionPanelHeight]:m===void 0?`auto`:`${m}px`,[go.accordionPanelWidth]:k===void 0?`auto`:`${k}px`}},l],stateAttributesMapping:Vn});return N||M||h?ee:null}),process.env.NODE_ENV!==`production`&&(bo.displayName=`AccordionPanel`)})),So=p((()=>{Vt(),Wn(),Kn(),Jn(),I(),Rn(),Ar(),Cn(),co(),le(),kn(),J(),xo()})),Co=p((()=>{So()}));function wo(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=wo(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function To(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=wo(e))&&(r&&(r+=` `),r+=t);return r}var Eo=p((()=>{})),Do,Oo,ko,Ao=p((()=>{Eo(),Do=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Oo=To,ko=(e,t)=>n=>{if(t?.variants==null)return Oo(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Do(t)||Do(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Oo(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)}}));Ao();var jo=ko(`flex flex-col justify-center`,{variants:{variant:{ghost:`bg-transparent`,surface:`overflow-hidden rounded-xl bg-surface shadow-2xs`}},defaultVariants:{variant:`surface`}}),Mo=ko(`group transition-all data-disabled:pointer-events-none data-disabled:opacity-50 [&_[data-trigger]]:[&>svg]:transition-colors`,{variants:{tone:{brand:`[&_[data-subtitle]]:text-brand-muted [&_[data-title]]:text-brand-default [&:not([data-open])]:hover:bg-brand-container [&:not([data-open])]:hover:[&_[data-subtitle]]:text-brand-on-container-muted [&:not([data-open])]:hover:[&_[data-title]]:text-brand-on-container [&_[data-trigger]]:[&>svg]:text-brand-default [&:not([data-open])]:hover:[&_[data-trigger]]:[&>svg]:text-brand-on-container`,accent:`[&_[data-subtitle]]:text-accent-muted [&_[data-title]]:text-accent-default [&:not([data-open])]:hover:bg-accent-container [&:not([data-open])]:hover:[&_[data-subtitle]]:text-accent-on-container-muted [&:not([data-open])]:hover:[&_[data-title]]:text-accent-on-container [&_[data-trigger]]:[&>svg]:text-accent-default [&:not([data-open])]:hover:[&_[data-trigger]]:[&>svg]:text-accent-on-container`,neutral:`[&_[data-subtitle]]:text-neutral-muted [&_[data-title]]:text-neutral-default [&:not([data-open])]:hover:bg-neutral-container [&:not([data-open])]:hover:[&_[data-subtitle]]:text-neutral-on-container-muted [&:not([data-open])]:hover:[&_[data-title]]:text-neutral-on-container [&_[data-trigger]]:[&>svg]:text-neutral-default [&:not([data-open])]:hover:[&_[data-trigger]]:[&>svg]:text-neutral-on-container`,error:`[&_[data-subtitle]]:text-error-muted [&_[data-title]]:text-error-default [&:not([data-open])]:hover:bg-error-container [&:not([data-open])]:hover:[&_[data-subtitle]]:text-error-on-container-muted [&:not([data-open])]:hover:[&_[data-title]]:text-error-on-container [&_[data-trigger]]:[&>svg]:text-error-default [&:not([data-open])]:hover:[&_[data-trigger]]:[&>svg]:text-error-on-container`,info:`[&_[data-subtitle]]:text-info-muted [&_[data-title]]:text-info-default [&:not([data-open])]:hover:bg-info-container [&:not([data-open])]:hover:[&_[data-subtitle]]:text-info-on-container-muted [&:not([data-open])]:hover:[&_[data-title]]:text-info-on-container [&_[data-trigger]]:[&>svg]:text-info-default [&:not([data-open])]:hover:[&_[data-trigger]]:[&>svg]:text-info-on-container`,success:`[&_[data-subtitle]]:text-success-muted [&_[data-title]]:text-success-default [&:not([data-open])]:hover:bg-success-container [&:not([data-open])]:hover:[&_[data-subtitle]]:text-success-on-container-muted [&:not([data-open])]:hover:[&_[data-title]]:text-success-on-container [&_[data-trigger]]:[&>svg]:text-success-default [&:not([data-open])]:hover:[&_[data-trigger]]:[&>svg]:text-success-on-container`,warning:`[&_[data-subtitle]]:text-warning-muted [&_[data-title]]:text-warning-default [&:not([data-open])]:hover:bg-warning-container [&:not([data-open])]:hover:[&_[data-subtitle]]:text-warning-on-container-muted [&:not([data-open])]:hover:[&_[data-title]]:text-warning-on-container [&_[data-trigger]]:[&>svg]:text-warning-default [&:not([data-open])]:hover:[&_[data-trigger]]:[&>svg]:text-warning-on-container`}},defaultVariants:{tone:`brand`}}),No,Po,Fo,Io,Lo,Ro,zo,Bo,Vo,Ho,Uo,Wo,Go,Ko,qo,Jo,Yo,Xo,Zo,Qo,$o,es,ts,ns,rs,is,as,os,ss,cs,ls,us,ds,fs,ps,ms,hs,gs,_s,vs,ys,bs,xs,Ss,Cs,ws,Ts,Es,Ds,Os,ks,As,js,Ms,Ns,Ps,Fs,Is,Ls,Rs,zs,Bs,Vs,Hs,Us,Ws,Gs,Ks,qs,Js,Ys,Xs,Zs,Qs,$s,ec,tc,nc,rc,ic,ac,oc,sc,cc=p((()=>{No=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Po=(e,t)=>({classGroupId:e,validator:t}),Fo=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Io=`-`,Lo=[],Ro=`arbitrary..`,zo=e=>{let t=Ho(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Vo(e);let n=e.split(Io);return Bo(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?No(i,t):t:i||Lo}return n[e]||Lo}}},Bo=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Bo(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Io):e.slice(t).join(Io),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Vo=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Ro+r:void 0})(),Ho=e=>{let{theme:t,classGroups:n}=e;return Uo(n,t)},Uo=(e,t)=>{let n=Fo();for(let r in e){let i=e[r];Wo(i,n,r,t)}return n},Wo=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Go(i,t,n,r)}},Go=(e,t,n,r)=>{if(typeof e==`string`){Ko(e,t,n);return}if(typeof e==`function`){qo(e,t,n,r);return}Jo(e,t,n,r)},Ko=(e,t,n)=>{let r=e===``?t:Yo(t,e);r.classGroupId=n},qo=(e,t,n,r)=>{if(Xo(e)){Wo(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Po(n,e))},Jo=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Wo(o,Yo(t,a),n,r)}},Yo=(e,t)=>{let n=e,r=t.split(Io),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Fo(),n.nextPart.set(t,i)),n=i}return n},Xo=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Zo=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Qo=`!`,$o=`:`,es=[],ts=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),ns=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===$o){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Qo)?(c=s.slice(0,-1),l=!0):s.startsWith(Qo)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return ts(t,l,c,u)};if(t){let e=t+$o,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):ts(es,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},rs=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},is=e=>({cache:Zo(e.cacheSize),parseClassName:ns(e),sortModifiers:rs(e),postfixLookupClassGroupIds:as(e),...zo(e)}),as=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},os=/\s+/,ss=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(os),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+Qo:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},cs=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=ls(n))&&(i&&(i+=` `),i+=r);return i},ls=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=ls(e[r]))&&(n&&(n+=` `),n+=t);return n},us=(e,...t)=>{let n,r,i,a,o=o=>(n=is(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=ss(e,n);return i(e,a),a};return a=o,(...e)=>a(cs(...e))},ds=[],fs=e=>{let t=t=>t[e]||ds;return t.isThemeGetter=!0,t},ps=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ms=/^\((?:(\w[\w-]*):)?(.+)\)$/i,hs=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,gs=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_s=/\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$/,vs=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ys=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bs=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xs=e=>hs.test(e),Ss=e=>!!e&&!Number.isNaN(Number(e)),Cs=e=>!!e&&Number.isInteger(Number(e)),ws=e=>e.endsWith(`%`)&&Ss(e.slice(0,-1)),Ts=e=>gs.test(e),Es=()=>!0,Ds=e=>_s.test(e)&&!vs.test(e),Os=()=>!1,ks=e=>ys.test(e),As=e=>bs.test(e),js=e=>!Ps(e)&&!Hs(e),Ms=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)),Ns=e=>Xs(e,ec,Os),Ps=e=>ps.test(e),Fs=e=>Xs(e,tc,Ds),Is=e=>Xs(e,nc,Ss),Ls=e=>Xs(e,ic,Es),Rs=e=>Xs(e,rc,Os),zs=e=>Xs(e,Qs,Os),Bs=e=>Xs(e,$s,As),Vs=e=>Xs(e,ac,ks),Hs=e=>ms.test(e),Us=e=>Zs(e,tc),Ws=e=>Zs(e,rc),Gs=e=>Zs(e,Qs),Ks=e=>Zs(e,ec),qs=e=>Zs(e,$s),Js=e=>Zs(e,ac,!0),Ys=e=>Zs(e,ic,!0),Xs=(e,t,n)=>{let r=ps.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Zs=(e,t,n=!1)=>{let r=ms.exec(e);return r?r[1]?t(r[1]):n:!1},Qs=e=>e===`position`||e===`percentage`,$s=e=>e===`image`||e===`url`,ec=e=>e===`length`||e===`size`||e===`bg-size`,tc=e=>e===`length`,nc=e=>e===`number`,rc=e=>e===`family-name`,ic=e=>e===`number`||e===`weight`,ac=e=>e===`shadow`,oc=()=>{let e=fs(`color`),t=fs(`font`),n=fs(`text`),r=fs(`font-weight`),i=fs(`tracking`),a=fs(`leading`),o=fs(`breakpoint`),s=fs(`container`),c=fs(`spacing`),l=fs(`radius`),u=fs(`shadow`),d=fs(`inset-shadow`),f=fs(`text-shadow`),p=fs(`drop-shadow`),m=fs(`blur`),h=fs(`perspective`),g=fs(`aspect`),_=fs(`ease`),v=fs(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Hs,Ps],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Hs,Ps,c],T=()=>[xs,`full`,`auto`,...w()],E=()=>[Cs,`none`,`subgrid`,Hs,Ps],D=()=>[`auto`,{span:[`full`,Cs,Hs,Ps]},Cs,Hs,Ps],O=()=>[Cs,`auto`,Hs,Ps],k=()=>[`auto`,`min`,`max`,`fr`,Hs,Ps],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[xs,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[xs,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[xs,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,Hs,Ps],L=()=>[...b(),Gs,zs,{position:[Hs,Ps]}],R=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ee=()=>[`auto`,`cover`,`contain`,Ks,Ns,{size:[Hs,Ps]}],z=()=>[ws,Us,Fs],B=()=>[``,`none`,`full`,l,Hs,Ps],V=()=>[``,Ss,Us,Fs],te=()=>[`solid`,`dashed`,`dotted`,`double`],ne=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],H=()=>[Ss,ws,Gs,zs],re=()=>[``,`none`,m,Hs,Ps],U=()=>[`none`,Ss,Hs,Ps],W=()=>[`none`,Ss,Hs,Ps],ie=()=>[Ss,Hs,Ps],ae=()=>[xs,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Ts],breakpoint:[Ts],color:[Es],container:[Ts],"drop-shadow":[Ts],ease:[`in`,`out`,`in-out`],font:[js],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Ts],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Ts],shadow:[Ts],spacing:[`px`,Ss],text:[Ts],"text-shadow":[Ts],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,xs,Ps,Hs,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Hs,Ps]}],"container-named":[Ms],columns:[{columns:[Ss,Ps,Hs,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Cs,`auto`,Hs,Ps]}],basis:[{basis:[xs,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Ss,xs,`auto`,`initial`,`none`,Ps]}],grow:[{grow:[``,Ss,Hs,Ps]}],shrink:[{shrink:[``,Ss,Hs,Ps]}],order:[{order:[Cs,`first`,`last`,`none`,Hs,Ps]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,Us,Fs]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Ys,Ls]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,ws,Ps]}],"font-family":[{font:[Ws,Rs,t]}],"font-features":[{"font-features":[Ps]}],"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:[i,Hs,Ps]}],"line-clamp":[{"line-clamp":[Ss,`none`,Hs,Is]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Hs,Ps]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Hs,Ps]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...te(),`wavy`]}],"text-decoration-thickness":[{decoration:[Ss,`from-font`,`auto`,Hs,Fs]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[Ss,`auto`,Hs,Ps]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[Cs,Hs,Ps]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Hs,Ps]}],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`,Hs,Ps]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:ee()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Cs,Hs,Ps],radial:[``,Hs,Ps],conic:[Cs,Hs,Ps]},qs,Bs]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:z()}],"gradient-via-pos":[{via:z()}],"gradient-to-pos":[{to:z()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:V()}],"border-w-x":[{"border-x":V()}],"border-w-y":[{"border-y":V()}],"border-w-s":[{"border-s":V()}],"border-w-e":[{"border-e":V()}],"border-w-bs":[{"border-bs":V()}],"border-w-be":[{"border-be":V()}],"border-w-t":[{"border-t":V()}],"border-w-r":[{"border-r":V()}],"border-w-b":[{"border-b":V()}],"border-w-l":[{"border-l":V()}],"divide-x":[{"divide-x":V()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":V()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...te(),`hidden`,`none`]}],"divide-style":[{divide:[...te(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...te(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Ss,Hs,Ps]}],"outline-w":[{outline:[``,Ss,Us,Fs]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`none`,u,Js,Vs]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,Js,Vs]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:V()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[Ss,Fs]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":V()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,Js,Vs]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[Ss,Hs,Ps]}],"mix-blend":[{"mix-blend":[...ne(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ne()}],"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":[Ss]}],"mask-image-linear-from-pos":[{"mask-linear-from":H()}],"mask-image-linear-to-pos":[{"mask-linear-to":H()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":H()}],"mask-image-t-to-pos":[{"mask-t-to":H()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":H()}],"mask-image-r-to-pos":[{"mask-r-to":H()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":H()}],"mask-image-b-to-pos":[{"mask-b-to":H()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":H()}],"mask-image-l-to-pos":[{"mask-l-to":H()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":H()}],"mask-image-x-to-pos":[{"mask-x-to":H()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":H()}],"mask-image-y-to-pos":[{"mask-y-to":H()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[Hs,Ps]}],"mask-image-radial-from-pos":[{"mask-radial-from":H()}],"mask-image-radial-to-pos":[{"mask-radial-to":H()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"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":b()}],"mask-image-conic-pos":[{"mask-conic":[Ss]}],"mask-image-conic-from-pos":[{"mask-conic-from":H()}],"mask-image-conic-to-pos":[{"mask-conic-to":H()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:ee()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Hs,Ps]}],filter:[{filter:[``,`none`,Hs,Ps]}],blur:[{blur:re()}],brightness:[{brightness:[Ss,Hs,Ps]}],contrast:[{contrast:[Ss,Hs,Ps]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Js,Vs]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,Ss,Hs,Ps]}],"hue-rotate":[{"hue-rotate":[Ss,Hs,Ps]}],invert:[{invert:[``,Ss,Hs,Ps]}],saturate:[{saturate:[Ss,Hs,Ps]}],sepia:[{sepia:[``,Ss,Hs,Ps]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Hs,Ps]}],"backdrop-blur":[{"backdrop-blur":re()}],"backdrop-brightness":[{"backdrop-brightness":[Ss,Hs,Ps]}],"backdrop-contrast":[{"backdrop-contrast":[Ss,Hs,Ps]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Ss,Hs,Ps]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ss,Hs,Ps]}],"backdrop-invert":[{"backdrop-invert":[``,Ss,Hs,Ps]}],"backdrop-opacity":[{"backdrop-opacity":[Ss,Hs,Ps]}],"backdrop-saturate":[{"backdrop-saturate":[Ss,Hs,Ps]}],"backdrop-sepia":[{"backdrop-sepia":[``,Ss,Hs,Ps]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Hs,Ps]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Ss,`initial`,Hs,Ps]}],ease:[{ease:[`linear`,`initial`,_,Hs,Ps]}],delay:[{delay:[Ss,Hs,Ps]}],animate:[{animate:[`none`,v,Hs,Ps]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Hs,Ps]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:U()}],"rotate-x":[{"rotate-x":U()}],"rotate-y":[{"rotate-y":U()}],"rotate-z":[{"rotate-z":U()}],scale:[{scale:W()}],"scale-x":[{"scale-x":W()}],"scale-y":[{"scale-y":W()}],"scale-z":[{"scale-z":W()}],"scale-3d":[`scale-3d`],skew:[{skew:ie()}],"skew-x":[{"skew-x":ie()}],"skew-y":[{"skew-y":ie()}],transform:[{transform:[Hs,Ps,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ae()}],"translate-x":[{"translate-x":ae()}],"translate-y":[{"translate-y":ae()}],"translate-z":[{"translate-z":ae()}],"translate-none":[`translate-none`],zoom:[{zoom:[Cs,Hs,Ps]}],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"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`,Hs,Ps]}],"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":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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`,Hs,Ps]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[Ss,Us,Fs,Is]}],stroke:[{stroke:[`none`,...I()]}],"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`]}},sc=us(oc)}));function X(...e){return sc(To(e))}var Z=p((()=>{Eo(),cc()}));Co(),Z();var lc=({withSeparator:e=!0,variant:t,className:r,children:i,ref:a,...o})=>(0,n.jsx)(Bt,{className:X(jo({variant:t,className:r}),e&&`divide-y divide-border`),ref:a,...o,children:i});Co(),Z();var uc=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Gn,{"data-header":!0,className:X(`w-full items-center justify-start gap-sm rounded-lg text-start style-text-strong-1 transition-all`,e),ref:r,...i,children:t});Co(),Z();var dc=({tone:e,className:t,children:r,ref:i,...a})=>(0,n.jsx)(Un,{className:X(Mo({className:t,tone:e})),ref:i,...a,children:r});Co(),Z();var fc=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(bo,{className:X(`h-(--accordion-panel-height) overflow-hidden transition-all duration-300 ease-out data-ending-style:h-[0px] data-starting-style:h-[0px]`,e),"data-panel":!0,ref:r,...i,children:(0,n.jsx)(`p`,{className:`px-md pb-sm`,children:t})});Z();var pc=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{"data-subtitle":!0,className:X(`style-text-prose--1 transition-colors`,e),ref:r,...i,children:t});Z();var mc=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{"data-title":!0,className:X(`style-text-strong-0 transition-colors`,e),ref:r,...i,children:t}),hc,gc=p((()=>{Ao(),hc=ko(`group flex items-center justify-start gap-sm rounded-xl border px-md py-sm transition-all [&>svg]:size-lg`,{variants:{tone:{brand:`border-brand-border bg-brand-container [&_[data-description]]:text-brand-on-container-muted [&_[data-title]]:text-brand-on-container [&_svg]:text-brand-on-container`,accent:`border-accent-border bg-accent-container [&_[data-description]]:text-accent-on-container-muted [&_[data-title]]:text-accent-on-container [&_svg]:text-accent-on-container`,neutral:`border-neutral-border bg-neutral-container [&_[data-description]]:text-neutral-on-container-muted [&_[data-title]]:text-neutral-on-container [&_svg]:text-neutral-on-container`,error:`border-error-border bg-error-container [&_[data-description]]:text-error-on-container-muted [&_[data-title]]:text-error-on-container [&_svg]:text-error-on-container`,info:`border-info-border bg-info-container [&_[data-description]]:text-info-on-container-muted [&_[data-title]]:text-info-on-container [&_svg]:text-info-on-container`,success:`border-success-border bg-success-container [&_[data-description]]:text-success-on-container-muted [&_[data-title]]:text-success-on-container [&_svg]:text-success-on-container`,warning:`border-warning-border bg-warning-container [&_[data-description]]:text-warning-on-container-muted [&_[data-title]]:text-warning-on-container [&_svg]:text-warning-on-container`}},defaultVariants:{tone:`brand`}})})),_c,vc=p((()=>{gc(),Z(),_c=({tone:e,className:t,children:r,ref:i,...a})=>(0,n.jsx)(`div`,{className:X(hc({tone:e,className:t})),ref:i,...a,children:r})})),yc,bc=p((()=>{Z(),yc=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`style-text-prose-0`,e),"data-description":!0,ref:r,...i,children:t})})),xc,Sc=p((()=>{Z(),xc=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`flex items-center gap-2xs style-text-strong-0 [&_svg]:size-sm`,e),"data-title":!0,ref:r,...i,children:t})})),Cc,wc=p((()=>{Z(),Cc=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(``,e),ref:r,...i,children:t})})),Tc,Ec=p((()=>{Z(),Tc=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`ml-auto flex items-center justify-start gap-3xs`,e),ref:r,...i,children:t})})),Dc=p((()=>{vc(),bc(),Sc(),wc(),Ec()}));function Oc(e){let n=t.useRef(!0);n.current&&(n.current=!1,e())}var kc=p((()=>{}));function Ac(){let e=T(Mc.create).current;return Zt(e.disposeEffect),e}var jc,Mc,Nc=p((()=>{D(),$t(),jc=0,Mc=class e{static create(){return new e}currentId=jc;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=jc,t()},e)}isStarted(){return this.currentId!==jc}clear=()=>{this.currentId!==jc&&(clearTimeout(this.currentId),this.currentId=jc)};disposeEffect=()=>this.clear}}));function Pc(e){if(typeof document>`u`)return!1;let t=ua(e);return Zn(t).innerWidth-t.documentElement.clientWidth>0}function Fc(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=ua(e),n=t.documentElement,r=t.body,i=rr(n)?n:r,a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function Ic(e){let t=ua(e),n=t.documentElement,r=t.body,i=rr(n)?n:r,a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function Lc(e){let t=ua(e),n=t.documentElement,r=t.body,i=Zn(n),a=0,o=0,s=!1,c=on.create();if(Rr&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,zc={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Vc=n.style.scrollBehavior,Bc={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=rr(n)?n:r;if(s=Fc(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflow:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,zc),Object.assign(r.style,Bc),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=Vc)}function d(){u(),c.request(l)}l();let f=lo(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}function Rc(e=!0,t=null){F(()=>{if(e)return Uc.acquire(t)},[e,t])}var zc,Bc,Vc,Hc,Uc,Wc=p((()=>{br(),uo(),Gr(),da(),I(),Nc(),sn(),De(),zc={},Bc={},Vc=``,Hc=class{lockCount=0;restore=null;timeoutLock=Mc.create();timeoutUnlock=Mc.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=ua(e).documentElement,n=Zn(t).getComputedStyle(t).overflowY;if(n===`hidden`||n===`clip`){this.restore=we;return}let r=zr||!Pc(e);this.restore=r?Ic(e):Lc(e)}},Uc=new Hc}));function Gc(e,t){return t!=null&&!yi(t)?0:typeof e==`function`?e():e}function Kc(e,t,n){let r=Gc(e,n);return typeof r==`number`?r:r?.[t]}function qc(e){return typeof e==`function`?e():e}function Jc(e,t){return t||e===`click`||e===`mousedown`}var Yc=p((()=>{xi()}));function Xc(e){let{children:r,delay:i,timeoutMs:a=0}=e,o=t.useRef(i),s=t.useRef(i),c=t.useRef(null),l=t.useRef(null),u=Ac();return(0,n.jsx)(Qc.Provider,{value:t.useMemo(()=>({hasProvider:!0,delayRef:o,initialDelayRef:s,currentIdRef:c,timeoutMs:a,currentContextRef:l,timeout:u}),[a,u]),children:r})}function Zc(e,n={open:!1}){let r=`rootStore`in e?e.rootStore:e,i=r.useState(`floatingId`),{open:a}=n,{currentIdRef:o,delayRef:s,timeoutMs:c,initialDelayRef:l,currentContextRef:u,hasProvider:d,timeout:f}=t.useContext(Qc),[p,m]=t.useState(!1);return F(()=>{function e(){m(!1),u.current?.setIsInstantPhase(!1),o.current=null,u.current=null,s.current=l.current}if(o.current&&!a&&o.current===i){if(m(!1),c){let t=i;return f.start(c,()=>{r.select(`open`)||o.current&&o.current!==t||e()}),()=>{f.clear()}}e()}},[a,i,o,s,c,l,u,f,r]),F(()=>{if(!a)return;let e=u.current,t=o.current;f.clear(),u.current={onOpenChange:r.setOpen,setIsInstantPhase:m},o.current=i,s.current={open:0,close:Kc(l.current,`close`)},t!==null&&t!==i?(m(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,Y(at))):(m(!1),e?.setIsInstantPhase(!1))},[a,i,r,o,s,c,l,u,f]),F(()=>()=>{u.current=null},[u]),t.useMemo(()=>({hasProvider:d,delayRef:s,isInstantPhase:p}),[d,s,p])}var Qc,$c=p((()=>{Nc(),I(),Yc(),Rt(),It(),Qc=t.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Mc,currentIdRef:{current:null},currentContextRef:{current:null}}),process.env.NODE_ENV!==`production`&&(Qc.displayName=`FloatingDelayGroupContext`)}));function el(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}var tl=p((()=>{}));function nl(e){let t=T(rl,e).current;return t.next=e,F(t.effect),t}function rl(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var il=p((()=>{I(),D()})),al,ol,sl,cl=p((()=>{al={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},ol={...al,position:`fixed`,top:0,left:0},sl={...al,position:`absolute`}})),ll,ul=p((()=>{I(),Gr(),cl(),ll=t.forwardRef(function(e,r){let[i,a]=t.useState();F(()=>{Vr&&a(`button`)},[]);let o={tabIndex:0,role:i};return(0,n.jsx)(`span`,{...e,ref:r,style:ol,"aria-hidden":i?void 0:!0,...o,"data-base-ui-focus-guard":``})}),process.env.NODE_ENV!==`production`&&(ll.displayName=`FocusGuard`)}));function dl(e){return`data-base-ui-${e}`}var fl=p((()=>{}));function pl(e,t={}){let{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(ml);let a=()=>e?.focus({preventScroll:n});if(i)return a(),we;let o=requestAnimationFrame(a);return ml=o,()=>{ml===o&&(cancelAnimationFrame(o),ml=0)}}var ml,hl=p((()=>{De(),ml=0}));function gl(e){return Sl[e]}function _l(e){return e?nr(e)?e.host:_l(e.parentNode):null}function vl(e,t,n,r,{mark:i=!0,markerIgnoreElements:a=[]}){let o=r?`inert`:n?`aria-hidden`:null,s=null,c=null,l=Tl(t,e),u=i?Tl(t,a):[],d=new Set(u),f=i?Dl(t,El(l),new Set(l)).filter(e=>!d.has(e)):[],p=[],m=[];if(o){let e=bl[o],n=gl(o);c=n,s=e;let r=Tl(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=l.concat(r);Dl(t,El(i),new Set(i)).forEach(t=>{let r=t.getAttribute(o),i=r!==null&&r!==`false`,a=(e.get(t)||0)+1;e.set(t,a),p.push(t),a===1&&i&&n.add(t),i||t.setAttribute(o,o===`inert`?``:`true`)})}return i&&f.forEach(e=>{let t=(Cl.get(e)||0)+1;Cl.set(e,t),m.push(e),t===1&&e.setAttribute(xl,``)}),wl+=1,()=>{s&&p.forEach(e=>{let t=(s.get(e)||0)-1;s.set(e,t),t||(!c?.has(e)&&o&&e.removeAttribute(o),c?.delete(e))}),i&&m.forEach(e=>{let t=(Cl.get(e)||0)-1;Cl.set(e,t),t||e.removeAttribute(xl)}),--wl,wl||(bl.inert=new WeakMap,bl[`aria-hidden`]=new WeakMap,Sl.inert=new WeakSet,Sl[`aria-hidden`]=new WeakSet,Cl=new WeakMap)}}function yl(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0,markerIgnoreElements:a=[]}=t,o=ua(e[0]).body;return vl(e,o,n,r,{mark:i,markerIgnoreElements:a})}var bl,xl,Sl,Cl,wl,Tl,El,Dl,Ol=p((()=>{br(),da(),bl={inert:new WeakMap,"aria-hidden":new WeakMap},xl=`data-base-ui-inert`,Sl={inert:new WeakSet,"aria-hidden":new WeakSet},Cl=new WeakMap,wl=0,Tl=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=_l(t);return e.contains(n)?n:null}).filter(e=>e!=null),El=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},Dl=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{Xn(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r}})),kl,Al,jl,Ml,Nl,Pl,Fl,Il,Ll,Rl=p((()=>{kl={style:{transition:`none`}},Al=`data-base-ui-click-trigger`,jl=`data-base-ui-swipe-ignore`,Ml=`data-swipe-ignore`,Nl=`[${jl}]`,Pl=`[${Ml}]`,Fl={fallbackAxisSide:`none`},Il={fallbackAxisSide:`end`},Ll={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0}}));function zl(e={}){let{ref:n,container:i,componentProps:a=Ee,elementProps:o}=e,s=Gt(),c=Vl()?.portalNode,[l,u]=t.useState(null),[d,f]=t.useState(null),p=O(e=>{e!==null&&f(e)}),m=t.useRef(null);F(()=>{if(i===null){m.current&&(m.current=null,f(null),u(null));return}if(s==null)return;let e=(i&&($n(i)?i:i.current))??c??document.body;if(e==null){m.current&&(m.current=null,f(null),u(null));return}m.current!==e&&(m.current=e,f(null),u(e))},[i,c,s]);let h=q(`div`,a,{ref:[n,p],props:[{id:s,[Hl]:``},o]});return{portalNode:d,portalSubtree:l&&h?r.createPortal(h,l):null}}var Bl,Vl,Hl,Ul,Wl=p((()=>{br(),uo(),tl(),Jt(),I(),N(),De(),ul(),La(),Rt(),It(),fl(),J(),Rl(),Bl=t.createContext(null),process.env.NODE_ENV!==`production`&&(Bl.displayName=`PortalContext`),Vl=()=>t.useContext(Bl),Hl=dl(`portal`),Ul=t.forwardRef(function(e,i){let{children:a,container:o,className:s,render:c,renderGuards:l,style:u,...d}=e,{portalNode:f,portalSubtree:p}=zl({container:o,ref:i,componentProps:e,elementProps:d}),m=t.useRef(null),h=t.useRef(null),g=t.useRef(null),_=t.useRef(null),[v,y]=t.useState(null),b=t.useRef(!1),x=v?.modal,S=v?.open,C=typeof l==`boolean`?l:!!v&&!v.modal&&v.open&&!!f;t.useEffect(()=>{if(!f||x)return;function e(e){f&&e.relatedTarget&&Na(e)&&(e.type===`focusin`?b.current&&=(Fa(f),!1):(Pa(f),b.current=!0))}return el(lo(f,`focusin`,e,!0),lo(f,`focusout`,e,!0))},[f,x]),t.useEffect(()=>{!f||S!==!1||(Fa(f),b.current=!1)},[S,f]);let w=t.useMemo(()=>({beforeOutsideRef:m,afterOutsideRef:h,beforeInsideRef:g,afterInsideRef:_,portalNode:f,setFocusManagerState:y}),[f]);return(0,n.jsxs)(t.Fragment,{children:[p,(0,n.jsxs)(Bl.Provider,{value:w,children:[C&&f&&(0,n.jsx)(ll,{"data-type":`outside`,ref:m,onFocus:e=>{Na(e,f)?g.current?.focus():ka(v?v.domReference:null)?.focus()}}),C&&f&&(0,n.jsx)(`span`,{"aria-owns":f.id,style:Ll}),f&&r.createPortal(a,f),C&&f&&(0,n.jsx)(ll,{"data-type":`outside`,ref:h,onFocus:e=>{Na(e,f)?_.current?.focus():(Oa(v?v.domReference:null)?.focus(),v?.closeOnFocusOut&&v?.onOpenChange(!1,Y(`focus-out`,e.nativeEvent)))}})]})]})}),process.env.NODE_ENV!==`production`&&(Ul.displayName=`FloatingPortal`)}));function Gl(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var Kl=p((()=>{})),ql,Jl=p((()=>{Kl(),ql=class{nodesRef={current:[]};events=Gl();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}}}));function Yl(e){let t=Gt(),n=tu(e),r=eu();return F(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function Xl(e){let{children:r,id:i}=e,a=eu();return(0,n.jsx)(Ql.Provider,{value:t.useMemo(()=>({id:i,parentId:a}),[i,a]),children:r})}function Zl(e){let{children:t,externalTree:r}=e,i=T(()=>r??new ql).current;return(0,n.jsx)($l.Provider,{value:i,children:t})}var Ql,$l,eu,tu,nu=p((()=>{Jt(),I(),D(),Jl(),Ql=t.createContext(null),process.env.NODE_ENV!==`production`&&(Ql.displayName=`FloatingNodeContext`),$l=t.createContext(null),process.env.NODE_ENV!==`production`&&($l.displayName=`FloatingTreeContext`),eu=()=>t.useContext(Ql)?.id||null,tu=e=>{let n=t.useContext($l);return e??n}}));function ru(e,t){let n=Zn(ti(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}function iu(){du=du.filter(e=>e.deref()?.isConnected)}function au(e){iu(),e&&Xn(e)!==`body`&&(du.push(new WeakRef(e)),du.length>uu&&(du=du.slice(-uu)))}function ou(){return iu(),du[du.length-1]?.deref()}function su(e){return e?wa(e)?e:Ea(e)[0]||e:null}function cu(e,t){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!t.current.includes(`floating`)&&!e.getAttribute(`role`)?.includes(`dialog`))return;let n=Ta(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return wa(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),r=e.getAttribute(`tabindex`);t.current.includes(`floating`)||n.length===0?r!==`0`&&e.setAttribute(`tabindex`,`0`):(r!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function lu(e){let{context:r,children:i,disabled:a=!1,initialFocus:o=!0,returnFocus:s=!0,restoreFocus:c=!1,modal:l=!0,closeOnFocusOut:u=!0,openInteractionType:d=``,nextFocusableElement:f,previousFocusableElement:p,beforeContentFocusGuardRef:m,externalTree:h,getInsideElements:g}=e,_=`rootStore`in r?r.rootStore:r,v=_.useState(`open`),y=_.useState(`domReferenceElement`),b=_.useState(`floatingElement`),{events:x,dataRef:S}=_.context,C=O(()=>S.current.floatingContext?.nodeId),w=o===!1,T=ci(y)&&w,E=t.useRef([`content`]),D=nl(o),k=nl(s),A=nl(d),j=tu(h),M=Vl(),N=t.useRef(!1),P=t.useRef(!1),I=t.useRef(!1),L=t.useRef(null),R=t.useRef(``),ee=t.useRef(``),z=t.useRef(null),B=t.useRef(null),V=ue(z,m,M?.beforeInsideRef),te=ue(B,M?.afterInsideRef),ne=Ac(),H=Ac(),re=en(),U=M!=null,W=ui(b),ie=O((e=W)=>e?Ea(e):[]),ae=O(()=>g?.().filter(e=>e!=null)??[]);t.useEffect(()=>{if(a||!l)return;function e(e){e.key===`Tab`&&ei(W,$r(ua(W)))&&ie().length===0&&!T&&hi(e)}return lo(ua(W),`keydown`,e)},[a,y,W,l,E,T,ie]),t.useEffect(()=>{if(a||!v)return;let e=ua(W);function t(){I.current=!1}function n(e){let t=ti(e),n=ae();I.current=!(ei(b,t)||ei(y,t)||ei(M?.portalNode,t)||n.some(e=>e===t||ei(e,t))),ee.current=e.pointerType||`keyboard`,t?.closest(`[data-base-ui-click-trigger]`)&&(P.current=!0)}function r(){ee.current=`keyboard`}return el(lo(e,`pointerdown`,n,!0),lo(e,`pointerup`,t,!0),lo(e,`pointercancel`,t,!0),lo(e,`keydown`,r,!0))},[a,b,y,W,v,M,ae]),t.useEffect(()=>{if(a||!u)return;let e=ua(W);function t(){P.current=!0,H.start(0,()=>{P.current=!1})}function n(e){let t=ti(e);wa(t)&&(L.current=t)}function r(t){let n=t.relatedTarget,r=t.currentTarget,i=ti(t);queueMicrotask(()=>{let a=C(),o=_.context.triggerElements,s=ae(),u=n?.hasAttribute(dl(`focus-guard`))&&[z.current,B.current,M?.beforeInsideRef.current,M?.afterInsideRef.current,M?.beforeOutsideRef.current,M?.afterOutsideRef.current,cn(p),cn(f)].includes(n),d=!(ei(y,n)||ei(b,n)||ei(n,b)||ei(M?.portalNode,n)||s.some(e=>e===n||ei(e,n))||n!=null&&o.hasElement(n)||o.hasMatchingElement(e=>ei(e,n))||u||j&&(fi(j.nodesRef.current,a).find(e=>ei(e.context?.elements.floating,n)||ei(e.context?.elements.domReference,n))||pi(j.nodesRef.current,a).find(e=>[e.context?.elements.floating,ui(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===y&&W&&cu(W,E),c&&r!==y&&!ca(i)&&$r(e)===e.body){if(tr(W)&&(W.focus(),c===`popup`)){re.request(()=>{W.focus()});return}let e=ie(),t=L.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||W;tr(n)&&n.focus()}if(S.current.insideReactTree){S.current.insideReactTree=!1;return}(T||!l)&&n&&d&&!P.current&&(T||n!==ou())&&(N.current=!0,_.setOpen(!1,Y(St,t)))})}function i(){I.current||(S.current.insideReactTree=!0,ne.start(0,()=>{S.current.insideReactTree=!1}))}let o=tr(y)?y:null;if(!(!b&&!o))return el(o&&lo(o,`focusout`,r),o&&lo(o,`pointerdown`,t),b&&lo(b,`focusin`,n),b&&lo(b,`focusout`,r),b&&M&&lo(b,`focusout`,i,!0))},[a,y,b,W,l,j,M,_,u,c,ie,T,C,E,S,ne,H,re,f,p,ae]),t.useEffect(()=>{if(a||!b||!v)return;let e=Array.from(M?.portalNode?.querySelectorAll(`[${dl(`portal`)}]`)||[]),t=(j?pi(j.nodesRef.current,C()):[]).find(e=>ci(e.context?.elements.domReference||null))?.context?.elements.domReference,n=yl([b,...e,z.current,B.current,M?.beforeOutsideRef.current,M?.afterOutsideRef.current,...ae(),t,cn(p),cn(f),T?y:null].filter(e=>e!=null),{ariaHidden:l||T,mark:!1}),r=yl([b,...e].filter(e=>e!=null));return()=>{r(),n()}},[v,a,y,b,l,E,M,T,j,C,f,p,ae]),F(()=>{if(!v||a||!tr(W))return;let e=$r(ua(W));queueMicrotask(()=>{let t=D.current,n=typeof t==`function`?t(A.current||``):t;if(n===void 0||n===!1||ei(W,e))return;let r=null,i=()=>(r??=ie(W),r[0]||W),a;a=n===!0||n===null?i():cn(n),a||=i(),pl(a,{preventScroll:a===W})})},[a,v,W,w,ie,D,A]),F(()=>{if(a||!W)return;let e=ua(W);au($r(e));function t(e){if(e.open||(R.current=ru(e.nativeEvent,ee.current)),e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`&&(N.current=!0),e.reason===`outside-press`)if(e.nested)N.current=!1;else if(_i(e.nativeEvent)||vi(e.nativeEvent))N.current=!1;else{let e=!1;ua(W).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?N.current=!1:N.current=!0}}x.on(`openchange`,t);function n(){let e=k.current,t=typeof e==`function`?e(R.current):e;if(t===void 0||t===!1)return null;if(t===null&&(t=!0),typeof t==`boolean`){let e=y||ou();return e&&e.isConnected?e:null}let n=y||ou();return cn(t)||n||null}return()=>{x.off(`openchange`,t);let r=$r(e),i=ae(),a=ei(b,r)||i.some(e=>e===r||ei(e,r))||j&&fi(j.nodesRef.current,C(),!1).some(e=>ei(e.context?.elements.floating,r)),o=k.current,s=n();queueMicrotask(()=>{let t=su(s),n=typeof o!=`boolean`;o&&!N.current&&tr(t)&&(!(!n&&t!==r&&r!==e.body)||a)&&t.focus({preventScroll:!0}),N.current=!1})}},[a,b,W,k,S,x,j,y,C,ae]),F(()=>{if(!Rr||v||!b)return;let e=$r(ua(b));!tr(e)||!oi(e)||ei(b,e)&&e.blur()},[v,b]),F(()=>{if(!(a||!M))return M.setFocusManagerState({modal:l,closeOnFocusOut:u,open:v,onOpenChange:_.setOpen,domReference:y}),()=>{M.setFocusManagerState(null)}},[a,M,l,v,_,u,y]),F(()=>{if(!(a||!W))return cu(W,E),()=>{queueMicrotask(iu)}},[a,W,E]);let oe=!a&&(l?!T:!0)&&(U||l);return(0,n.jsxs)(t.Fragment,{children:[oe&&(0,n.jsx)(ll,{"data-type":`inside`,ref:V,onFocus:e=>{if(l){let e=ie();pl(e[e.length-1])}else M?.portalNode&&(N.current=!1,Na(e,M.portalNode)?Oa(y)?.focus():cn(p??M.beforeOutsideRef)?.focus())}}),i,oe&&(0,n.jsx)(ll,{"data-type":`inside`,ref:te,onFocus:e=>{l?pl(ie()[0]):M?.portalNode&&(u&&(N.current=!0),Na(e,M.portalNode)?ka(y)?.focus():cn(f??M.afterOutsideRef)?.focus())}})]})}var uu,du,fu=p((()=>{br(),uo(),tl(),ge(),il(),N(),I(),Nc(),Gr(),sn(),da(),ul(),di(),xi(),La(),mi(),la(),Rt(),It(),fl(),hl(),Ol(),Wl(),nu(),Rl(),ln(),uu=20,du=[]}));function pu(e,n={}){let r=`rootStore`in e?e.rootStore:e,i=r.context.dataRef,{enabled:a=!0,event:o=`click`,toggle:s=!0,ignoreMouse:c=!1,stickIfOpen:l=!0,touchOpenDelay:u=0,reason:d=ot}=n,f=t.useRef(void 0),p=en(),m=Ac(),h=t.useMemo(()=>({onPointerDown(e){f.current=e.pointerType},onMouseDown(e){let t=f.current,n=e.nativeEvent,a=r.select(`open`);if(e.button!==0||o===`click`||yi(t,!0)&&c)return;let h=i.current.openEvent,g=h?.type,_=r.select(`domReferenceElement`)!==e.currentTarget,v=a&&_||!(a&&s&&(!(h&&l)||g===`click`||g===`mousedown`)),y=ti(n);if(oi(y)){let e=Y(d,n,y);v&&t===`touch`&&u>0?m.start(u,()=>{r.setOpen(!0,e)}):r.setOpen(v,e);return}let b=e.currentTarget;p.request(()=>{let e=Y(d,n,b);v&&t===`touch`&&u>0?m.start(u,()=>{r.setOpen(!0,e)}):r.setOpen(v,e)})},onClick(e){if(o===`mousedown-only`)return;let t=f.current;if(o===`mousedown`&&t){f.current=void 0;return}if(yi(t,!0)&&c)return;let n=r.select(`open`),a=i.current.openEvent,p=r.select(`domReferenceElement`)!==e.currentTarget,h=n&&p||!(n&&s&&(!(a&&l)||bi(a))),g=Y(d,e.nativeEvent,e.currentTarget);h&&t===`touch`&&u>0?m.start(u,()=>{r.setOpen(!0,g)}):r.setOpen(h,g)},onKeyDown(){f.current=void 0}}),[i,o,c,r,l,s,p,m,u,d]);return t.useMemo(()=>a?{reference:h}:Ee,[a,h])}var mu=p((()=>{sn(),Nc(),De(),di(),xi(),Rt(),It()}));function hu(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=a.width,u=a.height,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,l=0,u=0,!i||c?(l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f):i&&!c&&(u=t.axis===`x`?a.height:u,l=t.axis===`y`?a.width:l),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function gu(e){return e!=null&&e.clientX!=null}function _u(e,n={}){let r=`rootStore`in e?e.rootStore:e,i=r.useState(`open`),a=r.useState(`floatingElement`),o=r.useState(`domReferenceElement`),s=r.context.dataRef,{enabled:c=!0,axis:l=`both`}=n,u=t.useRef(!1),d=t.useRef(null),[f,p]=t.useState(),[m,h]=t.useState([]),g=O((e,t,n)=>{u.current||s.current.openEvent&&!gu(s.current.openEvent)||r.set(`positionReference`,hu(n??o,{x:e,y:t,axis:l,dataRef:s,pointerType:f}))}),_=O(e=>{i?d.current||h([]):g(e.clientX,e.clientY,e.currentTarget)}),v=yi(f)?a:i,y=t.useCallback(()=>{if(!v||!c)return;let e=Zn(a);function t(e){ei(a,ti(e))?(d.current?.(),d.current=null):g(e.clientX,e.clientY)}if(!s.current.openEvent||gu(s.current.openEvent))return d.current=lo(e,`mousemove`,t),()=>{d.current?.(),d.current=null};r.set(`positionReference`,o)},[v,c,a,s,o,r,g]);t.useEffect(()=>y(),[y,m]),t.useEffect(()=>{c&&!a&&(u.current=!1)},[c,a]),t.useEffect(()=>{!c&&i&&(u.current=!0)},[c,i]);let b=t.useMemo(()=>{function e(e){p(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:_,onMouseEnter:_}},[_]);return t.useMemo(()=>c?{reference:b,trigger:b}:{},[c,b])}var vu=p((()=>{br(),uo(),N(),di(),xi()}));function yu(){return!1}function bu(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function xu(e,n={}){let r=`rootStore`in e?e.rootStore:e,i=r.useState(`open`),a=r.useState(`floatingElement`),{dataRef:o}=r.context,{enabled:s=!0,escapeKey:c=!0,outsidePress:l=!0,outsidePressEvent:u=`sloppy`,referencePress:d=yu,referencePressEvent:f=`sloppy`,bubbles:p,externalTree:m}=n,h=tu(m),g=O(typeof l==`function`?l:()=>!1),_=typeof l==`function`?g:l,v=_!==!1,y=O(()=>u),b=t.useRef(!1),x=t.useRef(!1),S=t.useRef(!1),{escapeKey:C,outsidePress:w}=bu(p),T=t.useRef(null),E=Ac(),D=Ac(),k=O(()=>{D.clear(),o.current.insideReactTree=!1}),A=t.useRef(!1),j=t.useRef(``),M=O(d),N=O(e=>{if(!i||!s||!c||e.key!==`Escape`||A.current)return;let t=o.current.floatingContext?.nodeId,n=h?fi(h.nodesRef.current,t):[];if(!C&&n.length>0){let e=!0;if(n.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__escapeKeyBubbles&&(e=!1)}),!e)return}let a=gi(e)?e.nativeEvent:e,l=Y(Ct,a);r.setOpen(!1,l),!C&&!l.isPropagationAllowed&&e.stopPropagation()}),P=O(()=>{o.current.insideReactTree=!0,D.start(0,k)});t.useEffect(()=>{if(!i||!s)return;o.current.__escapeKeyBubbles=C,o.current.__outsidePressBubbles=w;let e=new Mc,t=new Mc;function n(){e.clear(),A.current=!0}function l(){e.start(cr()?5:0,()=>{A.current=!1})}function u(){S.current=!0,t.start(0,()=>{S.current=!1})}function d(){b.current=!1,x.current=!1}function f(){let e=j.current,t=e===`pen`||!e?`mouse`:e,n=y(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function p(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function m(e){let t=o.current.floatingContext?.nodeId,n=h&&fi(h.nodesRef.current,t).some(t=>ii(e,t.context?.elements.floating));return ii(e,r.select(`floatingElement`))||ii(e,r.select(`domReferenceElement`))||n}function g(e){if(p(e)){k();return}if(o.current.insideReactTree){k();return}let n=ti(e),i=`[${dl(`inert`)}]`,a=er(n)?n.getRootNode():null,s=Array.from((nr(a)?a:ua(r.select(`floatingElement`))).querySelectorAll(i)),c=r.context.triggerElements;if(n&&(c.hasElement(n)||c.hasMatchingElement(e=>ei(e,n))))return;let l=er(n)?n:null;for(;l&&!lr(l);){let e=fr(l);if(lr(e)||!er(e))break;l=e}if(s.length&&er(n)&&!ai(n)&&!ei(n,r.select(`floatingElement`))&&s.every(e=>!ei(l,e)))return;if(tr(n)&&!(`touches`in e)){let t=lr(n),r=ur(n),i=/auto|scroll/,a=t||i.test(r.overflowX),o=t||i.test(r.overflowY),s=a&&n.clientWidth>0&&n.scrollWidth>n.clientWidth,c=o&&n.clientHeight>0&&n.scrollHeight>n.clientHeight,l=r.direction===`rtl`,u=c&&(l?e.offsetX<=n.offsetWidth-n.clientWidth:e.offsetX>n.clientWidth),d=s&&e.offsetY>n.clientHeight;if(u||d)return}if(m(e))return;if(f()===`intentional`&&S.current){t.clear(),S.current=!1;return}if(typeof _==`function`&&!_(e))return;let u=o.current.floatingContext?.nodeId,d=h?fi(h.nodesRef.current,u):[];if(d.length>0){let e=!0;if(d.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__outsidePressBubbles&&(e=!1)}),!e)return}r.setOpen(!1,Y(lt,e)),k()}function D(e){f()!==`sloppy`||e.pointerType===`touch`||!r.select(`open`)||!s||ii(e,r.select(`floatingElement`))||ii(e,r.select(`domReferenceElement`))||g(e)}function O(e){if(f()!==`sloppy`||!r.select(`open`)||!s||ii(e,r.select(`floatingElement`))||ii(e,r.select(`domReferenceElement`)))return;let t=e.touches[0];t&&(T.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},E.start(1e3,()=>{T.current&&(T.current.dismissOnTouchEnd=!1,T.current.dismissOnMouseDown=!1)}))}function M(e,t){let n=ti(e);if(!n)return;let r=lo(n,e.type,()=>{t(e),r()})}function P(e){j.current=`touch`,M(e,O)}function F(e){E.clear(),e.type===`pointerdown`&&(j.current=e.pointerType),!(e.type===`mousedown`&&T.current&&!T.current.dismissOnMouseDown)&&M(e,e=>{e.type===`pointerdown`?D(e):g(e)})}function I(e){if(!b.current)return;let n=x.current;if(d(),f()===`intentional`){if(e.type===`pointercancel`){n&&u();return}if(!m(e)){if(n){u();return}typeof _==`function`&&!_(e)||(t.clear(),S.current=!0,k())}}}function L(e){if(f()!==`sloppy`||!T.current||ii(e,r.select(`floatingElement`))||ii(e,r.select(`domReferenceElement`)))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-T.current.startX),i=Math.abs(t.clientY-T.current.startY),a=Math.sqrt(n*n+i*i);a>5&&(T.current.dismissOnTouchEnd=!0),a>10&&(g(e),E.clear(),T.current=null)}function R(e){M(e,L)}function ee(e){f()!==`sloppy`||!T.current||ii(e,r.select(`floatingElement`))||ii(e,r.select(`domReferenceElement`))||(T.current.dismissOnTouchEnd&&g(e),E.clear(),T.current=null)}function z(e){M(e,ee)}let B=ua(a),V=el(c&&el(lo(B,`keydown`,N),lo(B,`compositionstart`,n),lo(B,`compositionend`,l)),v&&el(lo(B,`click`,F,!0),lo(B,`pointerdown`,F,!0),lo(B,`pointerup`,I,!0),lo(B,`pointercancel`,I,!0),lo(B,`mousedown`,F,!0),lo(B,`mouseup`,I,!0),lo(B,`touchstart`,P,!0),lo(B,`touchmove`,R,!0),lo(B,`touchend`,z,!0)));return()=>{V(),e.clear(),t.clear(),d(),S.current=!1}},[o,a,c,v,_,i,s,C,w,N,k,y,h,r,E]),t.useEffect(k,[_,k]);let F=t.useMemo(()=>({onKeyDown:N,[Su[f]]:e=>{M()&&r.setOpen(!1,Y(ot,e.nativeEvent))},...f!==`intentional`&&{onClick(e){M()&&r.setOpen(!1,Y(`trigger-press`,e.nativeEvent))}}}),[N,r,f,M]),I=O(e=>{if(!i||!s||e.button!==0)return;let t=ti(e.nativeEvent);ei(r.select(`floatingElement`),t)&&(b.current||(b.current=!0,x.current=!1))}),L=O(e=>{!i||!s||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&b.current&&(x.current=!0)}),R=t.useMemo(()=>({onKeyDown:N,onPointerDown:L,onMouseDown:L,onClickCapture:P,onMouseDownCapture(e){P(),I(e)},onPointerDownCapture(e){P(),I(e)},onMouseUpCapture:P,onTouchEndCapture:P,onTouchMoveCapture:P}),[N,P,I,L]);return t.useMemo(()=>s?{reference:F,floating:R,trigger:F}:{},[s,F,R])}var Su,Cu=p((()=>{br(),uo(),tl(),Nc(),N(),da(),di(),xi(),mi(),nu(),Rt(),It(),fl(),Su={intentional:`onClick`,sloppy:`onPointerDown`}}));function wu(e,t,n){let{reference:r,floating:i}=e,a=Oi(t),o=ki(t),s=Di(o),c=wi(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Ti(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function Tu(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Ci(t,e),p=Li(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Ri(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Ri(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}function Eu(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Du(e){return zi.some(t=>e[t]>=0)}async function Ou(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=wi(n),s=Ti(n),c=Oi(n)===`y`,l=Nu.has(o)?-1:1,u=a&&c?-1:1,d=Ci(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var ku,Au,ju,Mu,Nu,Pu,Fu,Iu,Lu,Ru=p((()=>{Xi(),ku=50,Au=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Tu},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=wu(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<ku&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=wu(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},ju=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Ci(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=wi(r),_=Oi(o),v=wi(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Fi(o)]:ji(o)),x=p!==`none`;!d&&x&&b.push(...Pi(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Ai(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==Oi(t))||T.every(e=>Oi(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Oi(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}},Mu=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Ci(e,t);switch(i){case`referenceHidden`:{let e=Eu(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Du(e)}}}case`escaped`:{let e=Eu(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Du(e)}}}default:return{}}}}},Nu=new Set([`left`,`top`]),Pu=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Ou(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Fu=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Ci(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Oi(wi(i)),p=Ei(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=Si(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=Si(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Iu=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Ci(e,t),u={x:n,y:r},d=Oi(i),f=Ei(d),p=u[f],m=u[d],h=Ci(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Nu.has(wi(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Lu=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Ci(e,t),u=await o.detectOverflow(t,l),d=wi(i),f=Ti(i),p=Oi(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Bi(h-u[g],v),x=Bi(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Vi(u.left,0),t=Vi(u.right,0),n=Vi(u.top,0),r=Vi(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Vi(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Vi(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}}}));function zu(e){let t=ur(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=tr(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Hi(n)!==a||Hi(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Bu(e){return er(e)?e:e.contextElement}function Vu(e){let t=Bu(e);if(!tr(t))return Wi(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=zu(t),o=(a?Hi(n.width):n.width)/r,s=(a?Hi(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}function Hu(e){let t=Zn(e);return!cr()||!t.visualViewport?dd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Uu(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Zn(e)?!1:t}function Wu(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Bu(e),o=Wi(1);t&&(r?er(r)&&(o=Vu(r)):o=Vu(e));let s=Uu(a,n,r)?Hu(a):Wi(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Zn(a),t=r&&er(r)?Zn(r):r,n=e,i=hr(n);for(;i&&r&&t!==n;){let e=Vu(i),t=i.getBoundingClientRect(),r=ur(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Zn(i),i=hr(n)}}return Ri({width:u,height:d,x:c,y:l})}function Gu(e,t){let n=dr(e).scrollLeft;return t?t.left+n:Wu(Qn(e)).left+n}function Ku(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Gu(e,n),y:n.top+t.scrollTop}}function qu(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Qn(r),s=t?ar(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Wi(1),u=Wi(0),d=tr(r);if((d||!d&&!a)&&((Xn(r)!==`body`||rr(o))&&(c=dr(r)),d)){let e=Wu(r);l=Vu(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Ku(o,c):Wi(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Ju(e){return Array.from(e.getClientRects())}function Yu(e){let t=Qn(e),n=dr(e),r=e.ownerDocument.body,i=Vi(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Vi(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Gu(e),s=-n.scrollTop;return ur(r).direction===`rtl`&&(o+=Vi(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function Xu(e,t){let n=Zn(e),r=Qn(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=cr();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Gu(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=fd&&(a-=o)}else l<=fd&&(a+=l);return{width:a,height:o,x:s,y:c}}function Zu(e,t){let n=Wu(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=tr(e)?Vu(e):Wi(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Qu(e,t,n){let r;if(t===`viewport`)r=Xu(e,n);else if(t===`document`)r=Yu(Qn(e));else if(er(t))r=Zu(t,n);else{let n=Hu(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ri(r)}function $u(e,t){let n=fr(e);return n===t||!er(n)||lr(n)?!1:ur(n).position===`fixed`||$u(n,t)}function ed(e,t){let n=t.get(e);if(n)return n;let r=mr(e,[],!1).filter(e=>er(e)&&Xn(e)!==`body`),i=null,a=ur(e).position===`fixed`,o=a?fr(e):e;for(;er(o)&&!lr(o);){let t=ur(o),n=or(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||rr(o)&&!n&&$u(e,o))?r=r.filter(e=>e!==o):i=t,o=fr(o)}return t.set(e,r),r}function td(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ar(t)?[]:ed(t,this._c):[].concat(n),r],o=Qu(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Qu(t,a[e],i);s=Vi(n.top,s),c=Bi(n.right,c),l=Bi(n.bottom,l),u=Vi(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function nd(e){let{width:t,height:n}=zu(e);return{width:t,height:n}}function rd(e,t,n){let r=tr(t),i=Qn(t),a=n===`fixed`,o=Wu(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Wi(0);function l(){c.x=Gu(i)}if(r||!r&&!a)if((Xn(t)!==`body`||rr(i))&&(s=dr(t)),r){let e=Wu(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Ku(i,s):Wi(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function id(e){return ur(e).position===`static`}function ad(e,t){if(!tr(e)||ur(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Qn(e)===n&&(n=n.ownerDocument.body),n}function od(e,t){let n=Zn(e);if(ar(e))return n;if(!tr(e)){let t=fr(e);for(;t&&!lr(t);){if(er(t)&&!id(t))return t;t=fr(t)}return n}let r=ad(e,t);for(;r&&ir(r)&&id(r);)r=ad(r,t);return r&&lr(r)&&id(r)&&!or(r)?n:r||sr(e)||n}function sd(e){return ur(e).direction===`rtl`}function cd(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ld(e,t){let n=null,r,i=Qn(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Ui(d),h=Ui(i.clientWidth-(u+f)),g=Ui(i.clientHeight-(d+p)),_=Ui(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Vi(0,Bi(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!cd(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function ud(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Bu(e),u=i||a?[...l?mr(l):[],...t?mr(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?ld(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Wu(e):null;c&&g();function g(){let t=Wu(e);h&&!cd(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var dd,fd,pd,md,hd,gd,_d,vd,yd,bd,xd,Sd=p((()=>{Ru(),Xi(),br(),dd=Wi(0),fd=25,pd=async function(e){let t=this.getOffsetParent||od,n=this.getDimensions,r=await n(e.floating);return{reference:rd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},md={convertOffsetParentRelativeRectToViewportRelativeRect:qu,getDocumentElement:Qn,getClippingRect:td,getOffsetParent:od,getElementRects:pd,getClientRects:Ju,getDimensions:nd,getScale:Vu,isElement:er,isRTL:sd},hd=Pu,gd=Fu,_d=ju,vd=Lu,yd=Mu,bd=Iu,xd=(e,t,n)=>{let r=new Map,i={platform:md,...n},a={...i.platform,_c:r};return Au(e,t,{...i,platform:a})}}));function Cd(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,i;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(!Cd(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Cd(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function wd(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Td(e,t){let n=wd(e);return Math.round(t*n)/n}function Ed(e){let t=_.useRef(e);return Od(()=>{t.current=e}),t}function Dd(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=_.useState(r);Cd(f,r)||p(r);let[m,h]=_.useState(null),[g,y]=_.useState(null),b=_.useCallback(e=>{e!==w.current&&(w.current=e,h(e))},[]),x=_.useCallback(e=>{e!==T.current&&(T.current=e,y(e))},[]),S=a||m,C=o||g,w=_.useRef(null),T=_.useRef(null),E=_.useRef(u),D=c!=null,O=Ed(c),k=Ed(i),A=Ed(l),j=_.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:t,strategy:n,middleware:f};k.current&&(e.platform=k.current),xd(w.current,T.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!Cd(E.current,t)&&(E.current=t,v.flushSync(()=>{d(t)}))})},[f,t,n,k,A]);Od(()=>{l===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let M=_.useRef(!1);Od(()=>(M.current=!0,()=>{M.current=!1}),[]),Od(()=>{if(S&&(w.current=S),C&&(T.current=C),S&&C){if(O.current)return O.current(S,C,j);j()}},[S,C,j,O,D]);let N=_.useMemo(()=>({reference:w,floating:T,setReference:b,setFloating:x}),[b,x]),P=_.useMemo(()=>({reference:S,floating:C}),[S,C]),F=_.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=Td(P.floating,u.x),r=Td(P.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...wd(P.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,P.floating,u.x,u.y]);return _.useMemo(()=>({...u,update:j,refs:N,elements:P,floatingStyles:F}),[u,j,N,P,F])}var Od,kd,Ad,jd,Md,Nd,Pd,Fd=p((()=>{Sd(),Od=typeof document<`u`?_.useLayoutEffect:function(){},kd=(e,t)=>{let n=hd(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ad=(e,t)=>{let n=gd(e);return{name:n.name,fn:n.fn,options:[e,t]}},jd=(e,t)=>({fn:bd(e).fn,options:[e,t]}),Md=(e,t)=>{let n=_d(e);return{name:n.name,fn:n.fn,options:[e,t]}},Nd=(e,t)=>{let n=vd(e);return{name:n.name,fn:n.fn,options:[e,t]}},Pd=(e,t)=>{let n=yd(e);return{name:n.name,fn:n.fn,options:[e,t]}}})),Q,Id=p((()=>{K(),Q=(e,t,n,r,i,a,...o)=>{if(o.length>0)throw Error(process.env.NODE_ENV===`production`?G(1):`Unsupported number of selectors`);let s;if(e&&t&&n&&r&&i&&a)s=(o,s,c,l)=>a(e(o,s,c,l),t(o,s,c,l),n(o,s,c,l),r(o,s,c,l),i(o,s,c,l),s,c,l);else if(e&&t&&n&&r&&i)s=(a,o,s,c)=>i(e(a,o,s,c),t(a,o,s,c),n(a,o,s,c),r(a,o,s,c),o,s,c);else if(e&&t&&n&&r)s=(i,a,o,s)=>r(e(i,a,o,s),t(i,a,o,s),n(i,a,o,s),a,o,s);else if(e&&t&&n)s=(r,i,a,o)=>n(e(r,i,a,o),t(r,i,a,o),i,a,o);else if(e&&t)s=(n,r,i,a)=>t(e(n,r,i,a),r,i,a);else if(e)s=e;else throw Error(`Missing arguments`);return s}}));function Ld(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function Rd(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}function zd(e){let t=Array.isArray(e[0])?e[0]:e;return Rd(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function Bd(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function Vd(e){let t;return{get(n){return t&&e(t.key,n)?t.value:Qd},put(e,n){t={key:e,value:n}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function Hd(e,t){let n=[];function r(e){let r=n.findIndex(n=>t(e,n.key));if(r>-1){let e=n[r];return r>0&&(n.splice(r,1),n.unshift(e)),e.value}return Qd}function i(t,i){r(t)===Qd&&(n.unshift({key:t,value:i}),n.length>e&&n.pop())}function a(){return n}function o(){n=[]}return{get:r,put:i,getEntries:a,clear:o}}function Ud(e){return function(t,n){if(t===null||n===null||t.length!==n.length)return!1;let{length:r}=t;for(let i=0;i<r;i++)if(!e(t[i],n[i]))return!1;return!0}}function Wd(e,t){let{equalityCheck:n=tf,maxSize:r=1,resultEqualityCheck:i}=typeof t==`object`?t:{equalityCheck:t},a=Ud(n),o=0,s=r<=1?Vd(a):Hd(r,a);function c(){let t=s.get(arguments);if(t===Qd){if(t=e.apply(null,arguments),o++,i){let e=s.getEntries().find(e=>i(e.value,t));e&&(t=e.value,o!==0&&o--)}s.put(arguments,t)}return t}return c.clearCache=()=>{s.clear(),c.resetResultsCount()},c.resultsCount=()=>o,c.resetResultsCount=()=>{o=0},c}function Gd(){return{s:of,v:void 0,o:null,p:null}}function Kd(e){return e instanceof af?e.deref():e}function qd(e,t={}){let n=Gd(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e<n;e++){let n=arguments[e];if(typeof n==`function`||typeof n==`object`&&n){let e=t.o;e===null&&(t.o=e=new WeakMap);let r=e.get(n);r===void 0?(t=Gd(),e.set(n,t)):t=r}else{let e=t.p;e===null&&(t.p=e=new Map);let r=e.get(n);r===void 0?(t=Gd(),e.set(n,t)):t=r}}let s=t,c;if(t.s===sf)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=Kd(i);e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new af(c):c}return s.s=sf,s.v=c,c}return o.clearCache=()=>{n=Gd(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function Jd(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),Ld(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let s={...n,...a},{memoize:c,memoizeOptions:l=[],argsMemoize:u=qd,argsMemoizeOptions:d=[]}=s,f=$d(l),p=$d(d),m=zd(e),h=c(function(){return t++,o.apply(null,arguments)},...f),g=!0,_=u(function(){r++;let e=Bd(m,arguments);if(i=h.apply(null,e),process.env.NODE_ENV!==`production`){let{devModeChecks:t={}}=s,{identityFunctionCheck:n,inputStabilityCheck:r}=ef(g,t);if(n.shouldRun&&n.run(o,e,i),r.shouldRun){let t=Bd(m,arguments);r.run({inputSelectorResults:e,inputSelectorResultsCopy:t},{memoize:c,memoizeOptions:f},arguments)}g&&=!1}return i},...p);return Object.assign(_,{resultFunc:o,memoizedResultFunc:h,dependencies:m,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:c,argsMemoize:u})};return Object.assign(r,{withTypes:()=>r}),r}var Yd,Xd,Zd,Qd,$d,ef,tf,nf,rf,af,of,sf,cf=p((()=>{Yd=(e,t,n)=>{if(t.length===1&&t[0]===n){let t=!1;try{let n={};e(n)===n&&(t=!0)}catch{}if(t){let e;try{throw Error()}catch(t){({stack:e}=t)}console.warn(`The result function returned its own inputs without modification. e.g
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`react`),require(`react/jsx-runtime`),require(`react-dom`),require(`use-sync-external-store/shim`),require(`use-sync-external-store/shim/with-selector`),require(`react-redux`),require(`react-resizable-panels`)):typeof define==`function`&&define.amd?define([`exports`,`react`,`react/jsx-runtime`,`react-dom`,`use-sync-external-store/shim`,`use-sync-external-store/shim/with-selector`,`react-redux`,`react-resizable-panels`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.dawnUIReact={},e.react,e.react_jsx_runtime,e.react_dom,e.use_sync_external_store_shim,e.use_sync_external_store_shim_with_selector,e.react_redux,e.react_resizable_panels))})(this,function(e,t,n,r,i,a,o,s){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var c=Object.create,l=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,f=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty,m=(e,t)=>()=>(e&&(t=e(e=0)),t),h=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),g=(e,t)=>{let n={};for(var r in e)l(n,r,{get:e[r],enumerable:!0});return t||l(n,Symbol.toStringTag,{value:`Module`}),n},_=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=d(t),a=0,o=i.length,s;a<o;a++)s=i[a],!p.call(e,s)&&s!==n&&l(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=u(t,s))||r.enumerable});return e},v=(e,t,n)=>(n=e==null?{}:c(f(e)),_(t||!e||!e.__esModule?l(n,`default`,{value:e,enumerable:!0}):n,e));let y=v(t,1);t=v(t);let b=v(r,1);r=v(r),s=v(s,1);function x(...e){if(process.env.NODE_ENV!==`production`){let t=e.join(` `);S.has(t)||(S.add(t),console.error(`Base UI: ${t}`))}}var S,C=m((()=>{process.env.NODE_ENV!==`production`&&(S=new Set)}));function w({controlled:e,default:n,name:r,state:i=`value`}){let{current:a}=t.useRef(e!==void 0),[o,s]=t.useState(n),c=a?e:o;if(process.env.NODE_ENV!==`production`){t.useEffect(()=>{a!==(e!==void 0)&&x([`A component is changing the ${a?``:`un`}controlled ${i} state of ${r} to be ${a?`un`:``}controlled.`,`Elements should not switch from uncontrolled to controlled (or vice versa).`,`Decide between using a controlled or uncontrolled ${r} 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(`
2
+ `))},[i,r,e]);let{current:o}=t.useRef(n);t.useEffect(()=>{!a&&T(o)!==T(n)&&x([`A component is changing the default ${i} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join(`
3
+ `))},[n])}return[c,t.useCallback(e=>{a||s(e)},[])]}function T(e){let t=0,n=new WeakMap;try{return JSON.stringify(e,function(e,r){if(!(e===`_owner`&&this!=null&&typeof this==`object`&&`$$typeof`in this)){if(typeof r==`bigint`)return`__bigint__:${r}`;if(typeof r==`object`&&r){let e=n.get(r);if(e!==void 0)return`__object__:${e}`;n.set(r,t),t+=1}return r}})??`__top__:${typeof e}`}catch{return`__unserializable__`}}var E=m((()=>{C()}));function D(e,n){let r=t.useRef(O);return r.current===O&&(r.current=e(n)),r}var O,k=m((()=>{O={}}));function A(e){let t=D(j).current;return t.next=e,P(t.effect),t.trampoline}function j(){let e={next:void 0,callback:M,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function M(){if(process.env.NODE_ENV!==`production`)throw Error(`Base UI: Cannot call an event handler while rendering.`)}var N,P,F=m((()=>{k(),N=t[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],P=N&&N!==t.useLayoutEffect?N:e=>e()})),I,L,R=m((()=>{I=()=>{},L=typeof document<`u`?t.useLayoutEffect:I}));function ee(...e){if(process.env.NODE_ENV!==`production`){let t=e.join(` `);z.has(t)||(z.add(t),console.warn(`Base UI: ${t}`))}}var z,B=m((()=>{process.env.NODE_ENV!==`production`&&(z=new Set)}));function V(){return t.useContext(te)}var te,ne=m((()=>{te=t.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}}),process.env.NODE_ENV!==`production`&&(te.displayName=`CompositeListContext`)}));function H(e){let{children:r,elementsRef:i,labelsRef:a,onMapChange:o}=e,s=A(o),c=t.useRef(0),l=D(ie).current,u=D(re).current,[d,f]=t.useState(0),p=t.useRef(d),m=A((e,t)=>{u.set(e,t??null),p.current+=1,f(p.current)}),h=A(e=>{u.delete(e),p.current+=1,f(p.current)}),g=t.useMemo(()=>{let e=new Map;return Array.from(u.keys()).filter(e=>e.isConnected).sort(U).forEach((t,n)=>{let r=u.get(t)??{};e.set(t,{...r,index:n})}),e},[u,d]);L(()=>{if(typeof MutationObserver!=`function`||g.size===0)return;let e=new MutationObserver(e=>{let t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),t.size===0&&(p.current+=1,f(p.current))});return g.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[g]),L(()=>{p.current===d&&(i.current.length!==g.size&&(i.current.length=g.size),a&&a.current.length!==g.size&&(a.current.length=g.size),c.current=g.size),s(g)},[s,g,i,a,d]),L(()=>()=>{i.current=[]},[i]),L(()=>()=>{a&&(a.current=[])},[a]);let _=A(e=>(l.add(e),()=>{l.delete(e)}));L(()=>{l.forEach(e=>e(g))},[l,g]);let v=t.useMemo(()=>({register:m,unregister:h,subscribeMapChange:_,elementsRef:i,labelsRef:a,nextIndexRef:c}),[m,h,_,i,a,c]);return(0,n.jsx)(te.Provider,{value:v,children:r})}function re(){return new Map}function ie(){return new Set}function U(e,t){let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}var ae=m((()=>{k(),F(),R(),ne()}));function oe(){return t.useContext(se)?.direction??`ltr`}var se,ce=m((()=>{se=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(se.displayName=`DirectionContext`)}));function le(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var W,G=m((()=>{W=le(`https://base-ui.com/production-error`,`Base UI`)}));function ue(){let e=t.useContext(de);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(10):`Base UI: AccordionRootContext is missing. Accordion parts must be placed within <Accordion.Root>.`);return e}var de,fe=m((()=>{G(),de=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(de.displayName=`AccordionRootContext`)}));function pe(e,t,n,r){let i=D(he).current;return ge(i,e,t,n,r)&&ve(i,[e,t,n,r]),i.callback}function me(e){let t=D(he).current;return _e(t,e)&&ve(t,e),t.callback}function he(){return{callback:null,cleanup:null,refs:[]}}function ge(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function _e(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function ve(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n;break;default:}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null;break;default:}}}}}}var ye=m((()=>{k()}));function be(e){return xe>=e}var xe,Se=m((()=>{xe=parseInt(t.version,10)}));function Ce(e){if(!t.isValidElement(e))return null;let n=e,r=n.props;return(be(19)?r?.ref:n.ref)??null}var we=m((()=>{Se()}));function Te(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}var Ee=m((()=>{}));function De(){}var Oe,ke,Ae=m((()=>{Oe=Object.freeze([]),ke=Object.freeze({})}));function je(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}var Me=m((()=>{}));function Ne(e,t){return typeof e==`function`?e(t):e}var Pe=m((()=>{}));function Fe(e,t){return typeof e==`function`?e(t):e}var Ie=m((()=>{}));function Le(e,t,n,r,i){if(!n&&!r&&!i&&!e)return ze(t);let a=ze(e);return t&&(a=Be(a,t)),n&&(a=Be(a,n)),r&&(a=Be(a,r)),i&&(a=Be(a,i)),a}function Re(e){if(e.length===0)return Ze;if(e.length===1)return ze(e[0]);let t=ze(e[0]);for(let n=1;n<e.length;n+=1)t=Be(t,e[n]);return t}function ze(e){return We(e)?{...Ge(e,Ze)}:Ve(e)}function Be(e,t){return We(t)?Ge(t,e):He(e,t)}function Ve(e){let t={...e};for(let e in t){let n=t[e];Ue(e,n)&&(t[e]=qe(n))}return t}function He(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=Te(e.style,r);break;case`className`:e[n]=Ye(e.className,r);break;default:Ue(n,r)?e[n]=Ke(e[n],r):e[n]=r}}return e}function Ue(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function We(e){return typeof e==`function`}function Ge(e,t){return We(e)?e(t):e??Ze}function Ke(e,t){return t?e?(...n)=>{let r=n[0];if(Xe(r)){let i=r;Je(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:qe(t):e}function qe(e){return e&&((...t)=>{let n=t[0];return Xe(n)&&Je(n),e(...t)})}function Je(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Ye(e,t){return t?e?t+` `+e:t:e}function Xe(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}var Ze,Qe=m((()=>{Ee(),Ze={}})),$e=m((()=>{Qe()}));function K(e,t,n={}){let r=t.render,i=et(t,n);return n.enabled===!1?null:nt(e,r,i,n.state??ke)}function et(e,t={}){let{className:n,style:r,render:i}=e,{state:a=ke,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?Ne(n,a):void 0,d=l?Fe(r,a):void 0,f=l?je(a,c):ke,p=l&&s?tt(s):void 0,m=l?Te(f,p)??{}:ke;return typeof document<`u`&&(l?Array.isArray(o)?m.ref=me([m.ref,Ce(i),...o]):m.ref=pe(m.ref,Ce(i),o):pe(null,null)),l?(u!==void 0&&(m.className=Ye(m.className,u)),d!==void 0&&(m.style=Te(m.style,d)),m):ke}function tt(e){return Array.isArray(e)?Re(e):Le(void 0,e)}function nt(e,n,r,i){if(n){if(typeof n==`function`)return process.env.NODE_ENV!==`production`&&rt(n),n(r,i);let e=Le(r,n.props);e.ref=r.ref;let a=n;if(a?.$$typeof===at&&(a=t.Children.toArray(n)[0]),process.env.NODE_ENV!==`production`&&!t.isValidElement(a))throw 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(`
4
+ `));return t.cloneElement(a,e)}if(e&&typeof e==`string`)return it(e,r);throw Error(process.env.NODE_ENV===`production`?W(8):`Base UI: Render element or function are not defined.`)}function rt(e){let t=e.name;t.length!==0&&ot.test(t)&&st.test(t)&&ee(`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 it(e,n){return e===`button`?(0,t.createElement)(`button`,{type:`button`,...n,key:n.key}):e===`img`?(0,t.createElement)(`img`,{alt:``,...n,key:n.key}):t.createElement(e,n)}var at,ot,st,q=m((()=>{G(),ye(),we(),Ee(),B(),Ae(),Me(),Pe(),Ie(),$e(),at=Symbol.for(`react.lazy`),ot=/^[A-Z][A-Za-z0-9$]*$/,st=/[a-z]/})),ct,lt,ut,dt,ft,pt,mt,ht,gt,_t,vt,yt,bt,xt,St,Ct,wt,Tt,Et,Dt,Ot,kt,At,jt,Mt,Nt,Pt,Ft,It,Lt,Rt=m((()=>{ct=`none`,lt=`trigger-press`,ut=`trigger-hover`,dt=`trigger-focus`,ft=`outside-press`,pt=`item-press`,mt=`close-press`,ht=`clear-press`,gt=`chip-remove-press`,_t=`track-press`,vt=`increment-press`,yt=`decrement-press`,bt=`input-change`,xt=`input-clear`,St=`input-blur`,Ct=`input-paste`,wt=`input-press`,Tt=`focus-out`,Et=`escape-key`,Dt=`close-watcher`,Ot=`list-navigation`,kt=`keyboard`,At=`drag`,jt=`scrub`,Mt=`cancel-open`,Nt=`sibling-open`,Pt=`disabled`,Ft=`imperative-action`,It=`swipe`,Lt=`window-resize`})),zt=m((()=>{Rt()}));function J(e,t,n,r){let i=!1,a=!1,o=r??ke;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function Bt(e,t,n){let r=n??ke;return{reason:e,event:t??new Event(`base-ui`),...r}}var Vt=m((()=>{Ae()})),Ht,Ut,Wt=m((()=>{E(),F(),R(),B(),ae(),ce(),fe(),q(),Vt(),zt(),Ht={value:()=>null},Ut=t.forwardRef(function(e,r){let{render:i,className:a,disabled:o=!1,hiddenUntilFound:s,keepMounted:c,loopFocus:l=!0,onValueChange:u,multiple:d=!1,orientation:f=`vertical`,value:p,defaultValue:m,style:h,...g}=e,_=oe();process.env.NODE_ENV!==`production`&&L(()=>{s&&c===!1&&ee("The `keepMounted={false}` prop on a Accordion.Root will be ignored when using `hiddenUntilFound` since it requires Panels to remain mounted when closed.")},[s,c]);let v=t.useMemo(()=>{if(p===void 0)return m??[]},[p,m]),y=A(u),b=t.useRef([]),[x,S]=w({controlled:p,default:v,name:`Accordion`,state:`value`}),C=A((e,t)=>{let n=J(ct);if(!d){let t=x[0]===e?[]:[e];if(y(t,n),n.isCanceled)return;S(t)}else if(t){let t=x.slice();if(t.push(e),y(t,n),n.isCanceled)return;S(t)}else{let t=x.filter(t=>t!==e);if(y(t,n),n.isCanceled)return;S(t)}}),T=t.useMemo(()=>({value:x,disabled:o,orientation:f}),[x,o,f]),E=t.useMemo(()=>({accordionItemRefs:b,direction:_,disabled:o,handleValueChange:C,hiddenUntilFound:s??!1,keepMounted:c??!1,loopFocus:l,orientation:f,state:T,value:x}),[_,o,C,s,c,l,f,T,x]),D=K(`div`,e,{state:T,ref:r,props:[{dir:_,role:`region`},g],stateAttributesMapping:Ht});return(0,n.jsx)(de.Provider,{value:E,children:(0,n.jsx)(H,{elementsRef:b,children:D})})}),process.env.NODE_ENV!==`production`&&(Ut.displayName=`AccordionRoot`)})),Gt,Kt=m((()=>{Gt={...t}}));function qt(e,n=`mui`){let[r,i]=t.useState(e),a=e||r;return t.useEffect(()=>{r??(Yt+=1,i(`${n}-${Yt}`))},[r,n]),a}function Jt(e,t){if(Xt!==void 0){let n=Xt();return e??(t?`${t}-${n}`:n)}return qt(e,t)}var Yt,Xt,Zt=m((()=>{Kt(),Yt=0,Xt=Gt.useId}));function Qt(e){return Jt(e,`base-ui`)}var $t=m((()=>{Zt()}));function en(e){t.useEffect(e,tn)}var tn,nn=m((()=>{tn=[]}));function rn(){let e=D(ln.create).current;return en(e.disposeEffect),e}var an,on,sn,cn,ln,un=m((()=>{k(),nn(),an=null,on=globalThis.requestAnimationFrame,sn=class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1;let n=process.env.NODE_ENV!==`production`&&on!==requestAnimationFrame&&(on=requestAnimationFrame,!0);return(!this.isScheduled||n)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,--this.callbacksCount)}},cn=new sn,ln=class e{static create(){return new e}static request(e){return cn.request(e)}static cancel(e){return cn.cancel(e)}currentId=an;request(e){this.cancel(),this.currentId=cn.request(()=>{this.currentId=an,e()})}cancel=()=>{this.currentId!==an&&(cn.cancel(this.currentId),this.currentId=an)};disposeEffect=()=>this.cancel}}));function dn(e){return e==null?e:`current`in e?e.current:e}var fn=m((()=>{})),pn,mn,hn,gn,_n=m((()=>{pn=function(e){return e.startingStyle=`data-starting-style`,e.endingStyle=`data-ending-style`,e}({}),mn={[pn.startingStyle]:``},hn={[pn.endingStyle]:``},gn={transitionStatus(e){return e===`starting`?mn:e===`ending`?hn:null}}}));function vn(e,t=!1,n=!0){let i=rn();return A((a,o=null)=>{i.cancel();let s=dn(e);if(s==null)return;let c=s,l=()=>{r.flushSync(a)};if(typeof c.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){a();return}function u(){Promise.all(c.getAnimations().map(e=>e.finished)).then(()=>{o?.aborted||l()}).catch(()=>{if(n){o?.aborted||l();return}let e=c.getAnimations();!o?.aborted&&e.length>0&&e.some(e=>e.pending||e.playState!==`finished`)&&u()})}if(t){let e=pn.startingStyle;if(!c.hasAttribute(e)){i.request(u);return}let t=new MutationObserver(()=>{c.hasAttribute(e)||(t.disconnect(),u())});t.observe(c,{attributes:!0,attributeFilter:[e]}),o?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}i.request(u)})}var yn=m((()=>{un(),F(),fn(),_n()}));function bn(e,n=!1,r=!1){let[i,a]=t.useState(e&&n?`idle`:void 0),[o,s]=t.useState(e);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!r&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),L(()=>{if(!e&&o&&i!==`ending`&&r){let e=ln.request(()=>{a(`ending`)});return()=>{ln.cancel(e)}}},[e,o,i,r]),L(()=>{if(!e||n)return;let t=ln.request(()=>{a(void 0)});return()=>{ln.cancel(t)}},[n,e]),L(()=>{if(!e||!n)return;e&&o&&i!==`idle`&&a(`starting`);let t=ln.request(()=>{a(`idle`)});return()=>{ln.cancel(t)}},[n,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}var xn=m((()=>{R(),un()}));function Sn(e){let{open:n,defaultOpen:r,onOpenChange:i,disabled:a}=e,o=n!==void 0,[s,c]=w({controlled:n,default:r,name:`Collapsible`,state:`open`}),{mounted:l,setMounted:u,transitionStatus:d}=bn(s,!0,!0),[f,p]=t.useState(s),[{height:m,width:h},g]=t.useState({height:void 0,width:void 0}),_=Qt(),[v,y]=t.useState(),b=v??_,[x,S]=t.useState(!1),[C,T]=t.useState(!1),E=t.useRef(null),D=t.useRef(null),O=t.useRef(null),k=t.useRef(null),j=vn(k,!1),M=A(e=>{let t=!s,n=J(lt,e.nativeEvent);if(i(t,n),n.isCanceled)return;let r=k.current;D.current===`css-animation`&&r!=null&&r.style.removeProperty(`animation-name`),!x&&!C&&(D.current!=null&&D.current!==`css-animation`&&!l&&t&&u(!0),D.current===`css-animation`&&(!f&&t&&p(!0),!l&&t&&u(!0))),c(t),D.current===`none`&&l&&!t&&u(!1)});return L(()=>{o&&D.current===`none`&&!s&&u(!1)},[o,s,n,u]),t.useMemo(()=>({abortControllerRef:E,animationTypeRef:D,disabled:a,handleTrigger:M,height:m,mounted:l,open:s,panelId:b,panelRef:k,runOnceAnimationsFinish:j,setDimensions:g,setHiddenUntilFound:S,setKeepMounted:T,setMounted:u,setOpen:c,setPanelIdState:y,setVisible:p,transitionDimensionRef:O,transitionStatus:d,visible:f,width:h}),[E,D,a,M,m,l,s,b,k,j,g,S,T,u,c,p,O,d,f,h])}var Cn=m((()=>{E(),R(),F(),$t(),Vt(),zt(),yn(),xn()}));function wn(){let e=t.useContext(Tn);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(15):`Base UI: CollapsibleRootContext is missing. Collapsible parts must be placed within <Collapsible.Root>.`);return e}var Tn,En=m((()=>{G(),Tn=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Tn.displayName=`CollapsibleRootContext`)}));function Dn(e={}){let{label:n,metadata:r,textRef:i,indexGuessBehavior:a,index:o}=e,{register:s,unregister:c,subscribeMapChange:l,elementsRef:u,labelsRef:d,nextIndexRef:f}=V(),p=t.useRef(-1),[m,h]=t.useState(o??(a===On.GuessFromOrder?()=>{if(p.current===-1){let e=f.current;f.current+=1,p.current=e}return p.current}:-1)),g=t.useRef(null),_=t.useCallback(e=>{if(g.current=e,m!==-1&&e!==null&&(u.current[m]=e,d)){let t=n!==void 0;d.current[m]=t?n:i?.current?.textContent??e.textContent}},[m,u,d,n,i]);return L(()=>{if(o!=null)return;let e=g.current;if(e)return s(e,r),()=>{c(e)}},[o,s,c,r]),L(()=>{if(o==null)return l(e=>{let t=g.current?e.get(g.current)?.index:null;t!=null&&h(t)})},[o,l,h]),t.useMemo(()=>({ref:_,index:m}),[m,_])}var On,kn=m((()=>{R(),ne(),On=function(e){return e[e.None=0]=`None`,e[e.GuessFromOrder=1]=`GuessFromOrder`,e}({})}));function An(){let e=t.useContext(jn);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(9):`Base UI: AccordionItemContext is missing. Accordion parts must be placed within <Accordion.Item>.`);return e}var jn,Mn=m((()=>{G(),jn=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(jn.displayName=`AccordionItemContext`)})),Nn,Pn=m((()=>{_n(),Nn=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=pn.startingStyle]=`startingStyle`,e[e.endingStyle=pn.endingStyle]=`endingStyle`,e}({})})),Fn,eee=m((()=>{Fn=function(e){return e.panelOpen=`data-panel-open`,e}({})})),In,Ln,Rn,zn,Bn=m((()=>{Pn(),eee(),In={[Nn.open]:``},Ln={[Nn.closed]:``},Rn={open(e){return e?{[Fn.panelOpen]:``}:null}},zn={open(e){return e?In:Ln}}})),Vn,tee=m((()=>{Vn=function(e){return e.index=`data-index`,e.disabled=`data-disabled`,e.open=`data-open`,e}({})})),Hn,Un=m((()=>{Bn(),_n(),tee(),Hn={...zn,index:e=>Number.isInteger(e)?{[Vn.index]:String(e)}:null,...gn,value:()=>null}})),Wn,nee=m((()=>{F(),ye(),$t(),Cn(),En(),kn(),fe(),Mn(),Un(),q(),Wn=t.forwardRef(function(e,r){let{className:i,disabled:a=!1,onOpenChange:o,render:s,value:c,style:l,...u}=e,{ref:d,index:f}=Dn(),p=pe(r,d),{disabled:m,handleValueChange:h,state:g,value:_}=ue(),v=Qt(),y=c??v,b=a||m,x=t.useMemo(()=>{if(!_)return!1;for(let e=0;e<_.length;e+=1)if(_[e]===y)return!0;return!1},[_,y]),S=A((e,t)=>{o?.(e,t),!t.isCanceled&&h(y,e)}),C=Sn({open:x,onOpenChange:S,disabled:b}),w=t.useMemo(()=>({open:C.open,disabled:C.disabled,hidden:!C.mounted,transitionStatus:C.transitionStatus}),[C.open,C.disabled,C.mounted,C.transitionStatus]),T=t.useMemo(()=>({...C,onOpenChange:S,state:w}),[C,w,S]),E=t.useMemo(()=>({...g,index:f,disabled:b,open:x}),[b,f,x,g]),[D,O]=t.useState(Qt()),k=t.useMemo(()=>({open:x,state:E,setTriggerId:O,triggerId:D}),[x,E,O,D]),j=K(`div`,e,{state:E,ref:p,props:u,stateAttributesMapping:Hn});return(0,n.jsx)(Tn.Provider,{value:T,children:(0,n.jsx)(jn.Provider,{value:k,children:j})})}),process.env.NODE_ENV!==`production`&&(Wn.displayName=`AccordionItem`)})),Gn,ree=m((()=>{q(),Mn(),Un(),Gn=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=An();return K(`h3`,e,{state:o,ref:t,props:a,stateAttributesMapping:Hn})}),process.env.NODE_ENV!==`production`&&(Gn.displayName=`AccordionHeader`)}));function Kn(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var qn=m((()=>{}));function Jn(){return typeof window<`u`}function Yn(e){return Qn(e)?(e.nodeName||``).toLowerCase():`#document`}function Xn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zn(e){return((Qn(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Qn(e){return Jn()?e instanceof Node||e instanceof Xn(e).Node:!1}function $n(e){return Jn()?e instanceof Element||e instanceof Xn(e).Element:!1}function er(e){return Jn()?e instanceof HTMLElement||e instanceof Xn(e).HTMLElement:!1}function tr(e){return!Jn()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Xn(e).ShadowRoot}function nr(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=lr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function rr(e){return/^(table|td|th)$/.test(Yn(e))}function ir(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}function ar(e){let t=$n(e)?lr(e):e;return _r(t.transform)||_r(t.translate)||_r(t.scale)||_r(t.rotate)||_r(t.perspective)||!sr()&&(_r(t.backdropFilter)||_r(t.filter))||hr.test(t.willChange||``)||gr.test(t.contain||``)}function or(e){let t=dr(e);for(;er(t)&&!cr(t);){if(ar(t))return t;if(ir(t))return null;t=dr(t)}return null}function sr(){return vr??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),vr}function cr(e){return/^(html|body|#document)$/.test(Yn(e))}function lr(e){return Xn(e).getComputedStyle(e)}function ur(e){return $n(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function dr(e){if(Yn(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||tr(e)&&e.host||Zn(e);return tr(t)?t.host:t}function fr(e){let t=dr(e);return cr(t)?e.ownerDocument?e.ownerDocument.body:e.body:er(t)&&nr(t)?t:fr(t)}function pr(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=fr(e),i=r===e.ownerDocument?.body,a=Xn(r);if(i){let e=mr(a);return t.concat(a,a.visualViewport||[],nr(r)?r:[],e&&n?pr(e):[])}else return t.concat(r,pr(r,[],n))}function mr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var hr,gr,_r,vr,yr=m((()=>{hr=/transform|translate|scale|rotate|perspective|filter/,gr=/paint|layout|strict|content/,_r=e=>!!e&&e!==`none`}));function br(e=!1){let n=t.useContext(xr);if(n===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?W(16):`Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.`);return n}var xr,Sr=m((()=>{G(),xr=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(xr.displayName=`CompositeRootContext`)}));function iee(e){let{focusableWhenDisabled:n,disabled:r,composite:i=!1,tabIndex:a=0,isNativeButton:o}=e,s=i&&n!==!1,c=i&&n===!1;return{props:t.useMemo(()=>{let e={onKeyDown(e){r&&n&&e.key!==`Tab`&&e.preventDefault()}};return i||(e.tabIndex=a,!o&&r&&(e.tabIndex=n?a:-1)),(o&&(n||s)||!o&&r)&&(e[`aria-disabled`]=r),o&&(!n||c)&&(e.disabled=r),e},[i,r,n,s,c,o,a])}}var Cr=m((()=>{}));function wr(e={}){let{disabled:n=!1,focusableWhenDisabled:r,tabIndex:i=0,native:a=!0,composite:o}=e,s=t.useRef(null),c=br(!0),l=o??c!==void 0,{props:u}=iee({focusableWhenDisabled:r,disabled:n,composite:l,tabIndex:i,isNativeButton:a});process.env.NODE_ENV!==`production`&&t.useEffect(()=>{if(!s.current)return;let e=Tr(s.current);a?e||x(`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\`.${Gt.captureOwnerStack?.()||``}`):e&&x(`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\`.${Gt.captureOwnerStack?.()||``}`)},[a]);let d=t.useCallback(()=>{let e=s.current;Tr(e)&&l&&n&&u.disabled===void 0&&e.disabled&&(e.disabled=!1)},[n,u.disabled,l]);return L(d,[d]),{getButtonProps:t.useCallback((e={})=>{let{onClick:t,onMouseDown:r,onKeyUp:i,onKeyDown:o,onPointerDown:s,...c}=e;return Le({type:a?`button`:void 0,onClick(e){if(n){e.preventDefault();return}t?.(e)},onMouseDown(e){n||r?.(e)},onKeyDown(e){if(n||(Je(e),o?.(e),e.baseUIHandlerPrevented))return;let r=e.target===e.currentTarget,i=e.currentTarget,s=Tr(i),c=!a&&aee(i),u=r&&(a?s:!c),d=e.key===`Enter`,f=e.key===` `,p=i.getAttribute(`role`),m=p?.startsWith(`menuitem`)||p===`option`||p===`gridcell`;if(r&&l&&f){if(e.defaultPrevented&&m)return;e.preventDefault(),c||a&&s?(i.click(),e.preventBaseUIHandler()):u&&(t?.(e),e.preventBaseUIHandler());return}u&&(!a&&(f||d)&&e.preventDefault(),!a&&d&&t?.(e))},onKeyUp(e){if(!n){if(Je(e),i?.(e),e.target===e.currentTarget&&a&&l&&Tr(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!a&&!l&&e.key===` `&&t?.(e)}},onPointerDown(e){if(n){e.preventDefault();return}s?.(e)}},a?void 0:{role:`button`},u,c)},[n,u,l,a]),buttonRef:A(e=>{s.current=e,d()})}}function Tr(e){return er(e)&&e.tagName===`BUTTON`}function aee(e){return!!(e?.tagName===`A`&&e?.href)}var Er=m((()=>{yr(),F(),C(),Kt(),R(),$e(),Sr(),Cr()})),Dr=m((()=>{Er()}));function oee(){if(!Or)return{platform:``,maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??-1}}function see(){if(!Or)return``;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}function cee(){if(!Or)return``;let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??``}var Or,kr,Ar,jr,Mr,Nr,Pr,Fr,Ir,Lr,Rr,zr=m((()=>{Or=typeof navigator<`u`,kr=oee(),Ar=cee(),jr=see(),Mr=typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter:none`),Nr=kr.platform===`MacIntel`&&kr.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(kr.platform),Pr=Or&&/firefox/i.test(jr),Fr=Or&&/apple/i.test(navigator.vendor),Or&&/Edg/i.test(jr),Ir=Or&&/android/i.test(Ar)||/android/i.test(jr),Lr=Or&&Ar.toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints,Rr=jr.includes(`jsdom/`)})),Br,Vr,Hr,Ur,Wr,Gr,Kr=m((()=>{Br=`data-base-ui-focusable`,Vr=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,Hr=`ArrowLeft`,Ur=`ArrowRight`,Wr=`ArrowUp`,Gr=`ArrowDown`}));function qr(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Jr(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&tr(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Yr(e){return`composedPath`in e?e.composedPath()[0]:e.target}var Xr=m((()=>{yr()}));function Zr(e,t){if(!$n(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(`data-trigger-disabled`);for(let[,e]of t.entries())if(Jr(e,n))return!e.hasAttribute(`data-trigger-disabled`);return!1}function Qr(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function lee(e){return e.matches(`html,body`)}function $r(e){return er(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function ei(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Vr}`)!=null}function ti(e){return e?e.getAttribute(`role`)===`combobox`&&$r(e):!1}function ni(e){if(!e||Rr)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function ri(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}var ii=m((()=>{yr(),zr(),Kr(),Xr()}));function ai(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...ai(e,t.id,n)])}function oi(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}var si=m((()=>{}));function ci(e){e.preventDefault(),e.stopPropagation()}function uee(e){return`nativeEvent`in e}function li(e){return e.pointerType===``&&e.isTrusted?!0:Ir&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function ui(e){return Rr?!1:!Ir&&e.width===0&&e.height===0||Ir&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function di(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function fi(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var pi=m((()=>{zr()}));function mi(e,t,n){return Mi(e,ji(t,n))}function hi(e,t){return typeof e==`function`?e(t):e}function gi(e){return e.split(`-`)[0]}function _i(e){return e.split(`-`)[1]}function vi(e){return e===`x`?`y`:`x`}function yi(e){return e===`y`?`height`:`width`}function bi(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function xi(e){return vi(bi(e))}function Si(e,t,n){n===void 0&&(n=!1);let r=_i(e),i=xi(e),a=yi(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Di(o)),[o,Di(o)]}function Ci(e){let t=Di(e);return[wi(e),t,wi(t)]}function wi(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}function Ti(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Ri:Li:t?Li:Ri;case`left`:case`right`:return t?zi:Bi;default:return[]}}function Ei(e,t,n,r){let i=_i(e),a=Ti(gi(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(wi)))),a}function Di(e){let t=gi(e);return Ii[t]+e.slice(t.length)}function dee(e){return{top:0,right:0,bottom:0,left:0,...e}}function Oi(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:dee(e)}function ki(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}var Ai,ji,Mi,Ni,Pi,Fi,Ii,Li,Ri,zi,Bi,Vi=m((()=>{Ai=[`top`,`right`,`bottom`,`left`],ji=Math.min,Mi=Math.max,Ni=Math.round,Pi=Math.floor,Fi=e=>({x:e,y:e}),Ii={left:`right`,right:`left`,bottom:`top`,top:`bottom`},Li=[`left`,`right`],Ri=[`right`,`left`],zi=[`top`,`bottom`],Bi=[`bottom`,`top`]}));function Hi(e,t,n){return Math.floor(e/t)!==n}function Ui(e,t){return t<0||t>=e.length}function Wi(e,t){return Ki(e.current,{disabledIndices:t})}function Gi(e,t){return Ki(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ki(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&Zi(e,a,r));return a}function qi(e,{event:t,orientation:n,loopFocus:r,onLoop:i,rtl:a,cols:o,disabledIndices:s,minIndex:c,maxIndex:l,prevIndex:u,stopEvent:d=!1}){let f=u,p;if(t.key===`ArrowUp`?p=`up`:t.key===`ArrowDown`&&(p=`down`),p){let n=[],a=[],m=!1,h=0;{let t=null,r=-1;e.forEach((e,i)=>{if(e==null)return;h+=1;let o=e.closest(`[role="row"]`);o&&(m=!0),(o!==t||r===-1)&&(t=o,r+=1,n[r]=[]),n[r].push(i),a[i]=r})}let g=!1,_=0;if(m)for(let e of n){let t=e.length;t>_&&(_=t),t!==o&&(g=!0)}let v=g&&h<e.length,y=_||o,b=o=>{if(!g||u===-1)return;let c=a[u];if(c==null)return;let l=n[c].indexOf(u),d=o===`up`?-1:1;for(let o=c+d,f=0;f<n.length;f+=1,o+=d){if(o<0||o>=n.length){if(!r||v)return;if(o=o<0?n.length-1:0,i){let e=Math.min(l,n[o].length-1);o=a[i(t,u,n[o][e]??n[o][0])]??o}}let c=n[o];for(let t=Math.min(l,c.length-1);t>=0;--t){let n=c[t];if(!Zi(e,n,s))return n}}},x=t=>{if(!v||u===-1)return;let n=u%y,i=t===`up`?-y:y,a=l-l%y,o=Pi(l/y)+1;for(let t=u-n+i,c=0;c<o;c+=1,t+=i){if(t<0||t>l){if(!r)return;t=t<0?a:0}let i=Math.min(t+y-1,l);for(let r=Math.min(t+n,i);r>=t;--r)if(!Zi(e,r,s))return r}};d&&ci(t);let S=b(p)??x(p);if(S!==void 0)f=S;else if(u===-1)f=p===`up`?l:c;else if(f=Ki(e,{startingIndex:u,amount:y,decrement:p===`up`,disabledIndices:s}),r){if(p===`up`&&(u-y<c||f<0)){let e=u%y,n=l%y,r=l-(n-e);f=n===e?l:n>e?r:r-y,i&&(f=i(t,u,f))}p===`down`&&u+y>l&&(f=Ki(e,{startingIndex:u%y-y,amount:y,disabledIndices:s}),i&&(f=i(t,u,f)))}Ui(e,f)&&(f=u)}if(n===`both`){let n=Pi(u/o);t.key===(a?`ArrowLeft`:`ArrowRight`)&&(d&&ci(t),u%o===o-1?r&&(f=Ki(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):(f=Ki(e,{startingIndex:u,disabledIndices:s}),r&&Hi(f,o,n)&&(f=Ki(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f)))),Hi(f,o,n)&&(f=u)),t.key===(a?`ArrowRight`:`ArrowLeft`)&&(d&&ci(t),u%o===0?r&&(f=Ki(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f))):(f=Ki(e,{startingIndex:u,decrement:!0,disabledIndices:s}),r&&Hi(f,o,n)&&(f=Ki(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f)))),Hi(f,o,n)&&(f=u));let c=Pi(l/o)===n;Ui(e,f)&&(r&&c?(f=t.key===(a?`ArrowRight`:`ArrowLeft`)?l:Ki(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):f=u)}return f}function Ji(e,t,n){let r=[],i=0;return e.forEach(({width:e,height:a},o)=>{if(e>t&&process.env.NODE_ENV!==`production`)throw Error(`[Floating UI]: Invalid grid - item width at index ${o} is greater than grid columns`);let s=!1;for(n&&(i=0);!s;){let n=[];for(let r=0;r<e;r+=1)for(let e=0;e<a;e+=1)n.push(i+r+e*t);i%t+e<=t&&n.every(e=>r[e]==null)?(n.forEach(e=>{r[e]=o}),s=!0):i+=1}}),[...r]}function Yi(e,t,n,r,i){if(e===-1)return-1;let a=n.indexOf(e),o=t[e];switch(i){case`tl`:return a;case`tr`:return o?a+o.width-1:a;case`bl`:return o?a+(o.height-1)*r:a;case`br`:return n.lastIndexOf(e);default:return-1}}function Xi(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function Zi(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?$i(r)?!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!0:!1}function Qi(e){return e.visibility===`hidden`||e.visibility===`collapse`}function $i(e,t=e?lr(e):null){return!e||!e.isConnected||!t||Qi(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var ea=m((()=>{Vi(),yr(),pi(),Kr()}));function ta(e){return e?.ownerDocument||document}var na=m((()=>{yr()}));function fee(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return tr(n)?n.host:null}function ra(e){for(let t of Array.from(e.children))if(Yn(t)===`summary`)return t;return null}function pee(e,t){let n=ra(t);return!!n&&(e===n||Jr(n,e))}function ia(e){let t=e?Yn(e):``;return e!=null&&e.matches(ba)&&(t!==`summary`||e.parentElement!=null&&Yn(e.parentElement)===`details`&&ra(e.parentElement)===e)&&(t!==`details`||ra(e)==null)&&(t!==`input`||e.type!==`hidden`)}function aa(e){if(!ia(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=fee(t)){let n=t!==e,r=Yn(t)===`slot`;if(t.hasAttribute(`inert`)||n&&Yn(t)===`details`&&!t.open&&!pee(e,t)||t.hasAttribute(`hidden`)||!r&&!mee(t,n))return!1}return!0}function mee(e,t){let n=lr(e);return t?n.display!==`none`:$i(e,n)}function oa(e){let t=e.tabIndex;if(t<0){let t=Yn(e);if(t===`details`||t===`audio`||t===`video`||er(e)&&e.isContentEditable)return 0}return t}function sa(e){if(Yn(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function hee(e,t){let n=sa(e);if(!n)return!0;let r=t.find(e=>{let t=sa(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=sa(e);return t?.name===n.name&&t.form===n.form})===n}function ca(e){if(er(e)&&Yn(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return er(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function la(e,t){ca(e).forEach(e=>{ia(e)&&t.push(e),la(e,t)})}function ua(e,t,n){ca(e).forEach(e=>{er(e)&&e.matches(t)&&n.push(e),ua(e,t,n)})}function da(e){return aa(e)&&oa(e)>=0}function fa(e){let t=[];return la(e,t),t.filter(aa)}function pa(e){let t=fa(e);return t.filter(e=>oa(e)>=0&&hee(e,t))}function ma(e,t){let n=pa(e),r=n.length;if(r===0)return;let i=qr(ta(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function ha(e){return ma(ta(e).body,1)||e}function ga(e){return ma(ta(e).body,-1)||e}function _a(e,t){if(!e)return null;let n=pa(ta(e).body),r=n.length;if(r===0)return null;let i=n.indexOf(e);return i===-1?null:n[(i+t+r)%r]}function gee(e){return _a(e,1)}function _ee(e){return _a(e,-1)}function va(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!Jr(n,r)}function vee(e){pa(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function ya(e){let t=[];ua(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var ba,xa=m((()=>{yr(),na(),ii(),ea(),ba=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`})),Sa=m((()=>{ii(),si(),pi(),ea(),xa()}));function yee(e){return er(e)&&e.tagName===`INPUT`}function Ca(e){return!!(yee(e)&&e.selectionStart!=null||er(e)&&e.tagName===`TEXTAREA`)}function wa(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!==`vertical`){let r=Ta(e,t,`left`),a=Ea(e),o=Ea(t);n===`ltr`&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft&&(i=r-o.scrollMarginLeft-a.scrollPaddingLeft)),n===`rtl`&&(r-o.scrollMarginRight<e.scrollLeft+a.scrollPaddingLeft?i=r-o.scrollMarginLeft-a.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=Ta(e,t,`top`),r=Ea(e),i=Ea(t);n-i.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?a=n-i.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+i.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function Ta(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function Ea(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}var Da,Oa,ka,Aa,ja,Ma,Na,Pa,Fa,Ia,La,Ra,za,Ba,Va,Ha,Ua,Wa,Ga=m((()=>{yr(),Sa(),Da=`ArrowUp`,Oa=`ArrowDown`,ka=`ArrowLeft`,Aa=`ArrowRight`,ja=`Home`,Ma=`PageUp`,Na=`PageDown`,Pa=new Set([ka,Aa]),Fa=new Set([ka,Aa,ja,`End`]),Ia=new Set([Da,Oa]),La=new Set([Da,Oa,ja,`End`]),Ra=new Set([...Pa,...Ia]),za=new Set([...Ra,ja,`End`]),Ba=new Set([Da,Oa,ka,Aa,ja,`End`]),Va=`Shift`,Ha=`Control`,Ua=`Meta`,Wa=new Set([Va,Ha,`Alt`,Ua])}));function Ka(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}var qa=m((()=>{})),Ja,bee=m((()=>{Ja=function(e){return e.disabled=`data-disabled`,e.orientation=`data-orientation`,e}({})}));function Ya(e){let{abortControllerRef:n,animationTypeRef:r,externalRef:i,height:a,hiddenUntilFound:o,keepMounted:s,id:c,mounted:l,onOpenChange:u,open:d,panelRef:f,runOnceAnimationsFinish:p,setDimensions:m,setMounted:h,setOpen:g,setVisible:_,transitionDimensionRef:v,visible:y,width:b}=e,x=t.useRef(!1),S=t.useRef(null),C=t.useRef(d),w=t.useRef(d),T=rn(),E=t.useMemo(()=>r.current===`css-animation`?!y:!d&&!l,[d,l,y,r]),D=pe(i,f,A(e=>{if(!e)return;if(r.current==null||v.current==null){let t=getComputedStyle(e),n=t.animationName!==`none`&&t.animationName!==``,i=t.transitionDuration!==`0s`&&t.transitionDuration!==``;n&&i?process.env.NODE_ENV!==`production`&&ee(`CSS transitions and CSS animations both detected on Collapsible or Accordion panel.`,`Only one of either animation type should be used.`):t.animationName===`none`&&t.transitionDuration!==`0s`?r.current=`css-transition`:t.animationName!==`none`&&t.transitionDuration===`0s`?r.current=`css-animation`:r.current=`none`,e.getAttribute(Ja.orientation)===`horizontal`||t.transitionProperty.indexOf(`width`)>-1?v.current=`width`:v.current=`height`}if(r.current!==`css-transition`)return;(a===void 0||b===void 0)&&(m({height:e.scrollHeight,width:e.scrollWidth}),w.current&&e.style.setProperty(`transition-duration`,`0s`));let t=-1,n=-1;return t=ln.request(()=>{w.current=!1,n=ln.request(()=>{setTimeout(()=>{e.style.removeProperty(`transition-duration`)})})}),()=>{ln.cancel(t),ln.cancel(n)}}));return L(()=>{if(r.current!==`css-transition`)return;let e=f.current;if(!e)return;let t=-1;if(n.current!=null&&(n.current.abort(),n.current=null),d){let n={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(n).forEach(t=>{e.style.setProperty(t,`initial`,`important`)}),!w.current&&!s&&e.setAttribute(Nn.startingStyle,``),m({height:e.scrollHeight,width:e.scrollWidth}),t=ln.request(()=>{Object.entries(n).forEach(([t,n])=>{n===``?e.style.removeProperty(t):e.style.setProperty(t,n)})})}else{if(e.scrollHeight===0&&e.scrollWidth===0)return;m({height:e.scrollHeight,width:e.scrollWidth});let t=new AbortController;n.current=t;let r=t.signal,i=null,a=Nn.endingStyle;return i=new MutationObserver(o=>{o.some(e=>e.type===`attributes`&&e.attributeName===a)&&(i?.disconnect(),i=null,p(()=>{m({height:0,width:0}),e.style.removeProperty(`content-visibility`),h(!1),n.current===t&&(n.current=null)},r))}),i.observe(e,{attributes:!0,attributeFilter:[a]}),()=>{i?.disconnect(),T.cancel(),n.current===t&&(t.abort(),n.current=null)}}return()=>{ln.cancel(t)}},[n,r,T,o,s,l,d,f,p,m,h]),L(()=>{if(r.current!==`css-animation`)return;let e=f.current;e&&(S.current=e.style.animationName||S.current,e.style.setProperty(`animation-name`,`none`),m({height:e.scrollHeight,width:e.scrollWidth}),!C.current&&!x.current&&e.style.removeProperty(`animation-name`),d?(n.current!=null&&(n.current.abort(),n.current=null),h(!0),_(!0)):(n.current=new AbortController,p(()=>{h(!1),_(!1),n.current=null},n.current.signal)))},[n,r,d,f,p,m,h,_,y]),en(()=>{let e=ln.request(()=>{C.current=!1});return()=>ln.cancel(e)}),L(()=>{if(!o)return;let e=f.current;if(!e)return;let t=-1,n=-1;return d&&x.current&&(e.style.transitionDuration=`0s`,m({height:e.scrollHeight,width:e.scrollWidth}),t=ln.request(()=>{x.current=!1,n=ln.request(()=>{setTimeout(()=>{e.style.removeProperty(`transition-duration`)})})})),()=>{ln.cancel(t),ln.cancel(n)}},[o,d,f,m]),L(()=>{let e=f.current;e&&o&&E&&(e.setAttribute(`hidden`,`until-found`),r.current===`css-transition`&&e.setAttribute(Nn.startingStyle,``))},[o,E,r,f]),t.useEffect(function(){let e=f.current;if(!e)return;function t(e){x.current=!0,g(!0),u(!0,J(ct,e))}return Ka(e,`beforematch`,t)},[u,f,g]),t.useMemo(()=>({props:{hidden:E,id:c,ref:D}}),[E,c,D])}var Xa=m((()=>{qa(),R(),F(),ye(),nn(),un(),B(),Vt(),zt(),Pn(),bee()})),Za,xee=m((()=>{Za=function(e){return e.accordionPanelHeight=`--accordion-panel-height`,e.accordionPanelWidth=`--accordion-panel-width`,e}({})}));function Qa(e){let{enabled:n=!0,open:r,ref:i,onComplete:a}=e,o=A(a),s=vn(i,r,!1);t.useEffect(()=>{if(!n)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[n,r,o,s])}var $a=m((()=>{F(),yn()})),eo,to=m((()=>{R(),B(),En(),Xa(),fe(),Mn(),Un(),xee(),$a(),q(),eo=t.forwardRef(function(e,n){let{className:r,hiddenUntilFound:i,keepMounted:a,id:o,render:s,style:c,...l}=e,{hiddenUntilFound:u,keepMounted:d}=ue(),{abortControllerRef:f,animationTypeRef:p,height:m,mounted:h,onOpenChange:g,open:_,panelId:v,panelRef:y,runOnceAnimationsFinish:b,setDimensions:x,setHiddenUntilFound:S,setKeepMounted:C,setMounted:w,setOpen:T,setVisible:E,transitionDimensionRef:D,visible:O,width:k,setPanelIdState:A,transitionStatus:j}=wn(),M=i??u,N=a??d;process.env.NODE_ENV!==`production`&&L(()=>{a===!1&&M&&ee("The `keepMounted={false}` prop on a Accordion.Panel will be ignored when using `contextHiddenUntilFound` on the Panel or the Root since it requires the panel to remain mounted when closed.")},[M,a]),L(()=>{if(o)return A(o),()=>{A(void 0)}},[o,A]),L(()=>{S(M)},[S,M]),L(()=>{C(N)},[C,N]),Qa({open:_&&j===`idle`,ref:y,onComplete(){_&&x({width:void 0,height:void 0})}});let{props:P}=Ya({abortControllerRef:f,animationTypeRef:p,externalRef:n,height:m,hiddenUntilFound:M,id:o??v,keepMounted:N,mounted:h,onOpenChange:g,open:_,panelRef:y,runOnceAnimationsFinish:b,setDimensions:x,setMounted:w,setOpen:T,setVisible:E,transitionDimensionRef:D,visible:O,width:k}),{state:F,triggerId:I}=An(),R=K(`div`,e,{state:t.useMemo(()=>({...F,transitionStatus:j}),[F,j]),ref:[n,y],props:[P,{"aria-labelledby":I,role:`region`,style:{[Za.accordionPanelHeight]:m===void 0?`auto`:`${m}px`,[Za.accordionPanelWidth]:k===void 0?`auto`:`${k}px`}},l],stateAttributesMapping:Hn});return N||M||h?R:null}),process.env.NODE_ENV!==`production`&&(eo.displayName=`AccordionPanel`)})),no=m((()=>{Wt(),nee(),ree(),qn(),R(),Bn(),Dr(),En(),Ga(),fe(),Mn(),q(),to()})),ro=m((()=>{no()}));function io(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=io(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function ao(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=io(e))&&(r&&(r+=` `),r+=t);return r}var oo=m((()=>{})),so,co,lo,uo=m((()=>{oo(),so=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,co=ao,lo=(e,t)=>n=>{if(t?.variants==null)return co(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=so(t)||so(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return co(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)}}));uo();var See=lo(`flex flex-col justify-center`,{variants:{variant:{ghost:`bg-transparent`,surface:`overflow-hidden rounded-xl bg-surface shadow-2xs`}},defaultVariants:{variant:`surface`}}),Cee=lo(`group transition-all data-disabled:pointer-events-none data-disabled:opacity-50 [&_[data-trigger]]:[&>svg]:transition-colors`,{variants:{tone:{brand:`[&_[data-subtitle]]:text-brand-muted [&_[data-title]]:text-brand-default [&:not([data-open])]:hover:bg-brand-container [&:not([data-open])]:hover:[&_[data-subtitle]]:text-brand-on-container-muted [&:not([data-open])]:hover:[&_[data-title]]:text-brand-on-container [&_[data-trigger]]:[&>svg]:text-brand-default [&:not([data-open])]:hover:[&_[data-trigger]]:[&>svg]:text-brand-on-container`,accent:`[&_[data-subtitle]]:text-accent-muted [&_[data-title]]:text-accent-default [&:not([data-open])]:hover:bg-accent-container [&:not([data-open])]:hover:[&_[data-subtitle]]:text-accent-on-container-muted [&:not([data-open])]:hover:[&_[data-title]]:text-accent-on-container [&_[data-trigger]]:[&>svg]:text-accent-default [&:not([data-open])]:hover:[&_[data-trigger]]:[&>svg]:text-accent-on-container`,neutral:`[&_[data-subtitle]]:text-neutral-muted [&_[data-title]]:text-neutral-default [&:not([data-open])]:hover:bg-neutral-container [&:not([data-open])]:hover:[&_[data-subtitle]]:text-neutral-on-container-muted [&:not([data-open])]:hover:[&_[data-title]]:text-neutral-on-container [&_[data-trigger]]:[&>svg]:text-neutral-default [&:not([data-open])]:hover:[&_[data-trigger]]:[&>svg]:text-neutral-on-container`,error:`[&_[data-subtitle]]:text-error-muted [&_[data-title]]:text-error-default [&:not([data-open])]:hover:bg-error-container [&:not([data-open])]:hover:[&_[data-subtitle]]:text-error-on-container-muted [&:not([data-open])]:hover:[&_[data-title]]:text-error-on-container [&_[data-trigger]]:[&>svg]:text-error-default [&:not([data-open])]:hover:[&_[data-trigger]]:[&>svg]:text-error-on-container`,info:`[&_[data-subtitle]]:text-info-muted [&_[data-title]]:text-info-default [&:not([data-open])]:hover:bg-info-container [&:not([data-open])]:hover:[&_[data-subtitle]]:text-info-on-container-muted [&:not([data-open])]:hover:[&_[data-title]]:text-info-on-container [&_[data-trigger]]:[&>svg]:text-info-default [&:not([data-open])]:hover:[&_[data-trigger]]:[&>svg]:text-info-on-container`,success:`[&_[data-subtitle]]:text-success-muted [&_[data-title]]:text-success-default [&:not([data-open])]:hover:bg-success-container [&:not([data-open])]:hover:[&_[data-subtitle]]:text-success-on-container-muted [&:not([data-open])]:hover:[&_[data-title]]:text-success-on-container [&_[data-trigger]]:[&>svg]:text-success-default [&:not([data-open])]:hover:[&_[data-trigger]]:[&>svg]:text-success-on-container`,warning:`[&_[data-subtitle]]:text-warning-muted [&_[data-title]]:text-warning-default [&:not([data-open])]:hover:bg-warning-container [&:not([data-open])]:hover:[&_[data-subtitle]]:text-warning-on-container-muted [&:not([data-open])]:hover:[&_[data-title]]:text-warning-on-container [&_[data-trigger]]:[&>svg]:text-warning-default [&:not([data-open])]:hover:[&_[data-trigger]]:[&>svg]:text-warning-on-container`}},defaultVariants:{tone:`brand`}}),fo,po,mo,ho,go,_o,vo,yo,bo,xo,So,Co,wo,To,Eo,Do,Oo,ko,Ao,jo,Mo,No,Po,Fo,Io,Lo,Ro,zo,Bo,Vo,Ho,Uo,Wo,Go,Ko,qo,Jo,Yo,Xo,Zo,Qo,$o,es,ts,ns,rs,is,as,os,ss,cs,ls,us,ds,fs,ps,ms,hs,gs,_s,vs,ys,bs,xs,Ss,Cs,ws,Ts,Es,Ds,Os,ks,As,js,Ms,Ns,Ps,Fs,Is,Ls,Rs,zs,Bs,wee=m((()=>{fo=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},po=(e,t)=>({classGroupId:e,validator:t}),mo=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ho=`-`,go=[],_o=`arbitrary..`,vo=e=>{let t=xo(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return bo(e);let n=e.split(ho);return yo(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?fo(i,t):t:i||go}return n[e]||go}}},yo=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=yo(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(ho):e.slice(t).join(ho),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},bo=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?_o+r:void 0})(),xo=e=>{let{theme:t,classGroups:n}=e;return So(n,t)},So=(e,t)=>{let n=mo();for(let r in e){let i=e[r];Co(i,n,r,t)}return n},Co=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];wo(i,t,n,r)}},wo=(e,t,n,r)=>{if(typeof e==`string`){To(e,t,n);return}if(typeof e==`function`){Eo(e,t,n,r);return}Do(e,t,n,r)},To=(e,t,n)=>{let r=e===``?t:Oo(t,e);r.classGroupId=n},Eo=(e,t,n,r)=>{if(ko(e)){Co(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(po(n,e))},Do=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Co(o,Oo(t,a),n,r)}},Oo=(e,t)=>{let n=e,r=t.split(ho),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=mo(),n.nextPart.set(t,i)),n=i}return n},ko=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Ao=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},jo=`!`,Mo=`:`,No=[],Po=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Fo=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Mo){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(jo)?(c=s.slice(0,-1),l=!0):s.startsWith(jo)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Po(t,l,c,u)};if(t){let e=t+Mo,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Po(No,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Io=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Lo=e=>({cache:Ao(e.cacheSize),parseClassName:Fo(e),sortModifiers:Io(e),postfixLookupClassGroupIds:Ro(e),...vo(e)}),Ro=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},zo=/\s+/,Bo=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(zo),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+jo:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Vo=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Ho(n))&&(i&&(i+=` `),i+=r);return i},Ho=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Ho(e[r]))&&(n&&(n+=` `),n+=t);return n},Uo=(e,...t)=>{let n,r,i,a,o=o=>(n=Lo(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Bo(e,n);return i(e,a),a};return a=o,(...e)=>a(Vo(...e))},Wo=[],Go=e=>{let t=t=>t[e]||Wo;return t.isThemeGetter=!0,t},Ko=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,qo=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Jo=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Yo=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xo=/\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$/,Zo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Qo=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$o=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,es=e=>Jo.test(e),ts=e=>!!e&&!Number.isNaN(Number(e)),ns=e=>!!e&&Number.isInteger(Number(e)),rs=e=>e.endsWith(`%`)&&ts(e.slice(0,-1)),is=e=>Yo.test(e),as=()=>!0,os=e=>Xo.test(e)&&!Zo.test(e),ss=()=>!1,cs=e=>Qo.test(e),ls=e=>$o.test(e),us=e=>!ps(e)&&!xs(e),ds=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)),fs=e=>ks(e,Ns,ss),ps=e=>Ko.test(e),ms=e=>ks(e,Ps,os),hs=e=>ks(e,Fs,ts),gs=e=>ks(e,Ls,as),_s=e=>ks(e,Is,ss),vs=e=>ks(e,js,ss),ys=e=>ks(e,Ms,ls),bs=e=>ks(e,Rs,cs),xs=e=>qo.test(e),Ss=e=>As(e,Ps),Cs=e=>As(e,Is),ws=e=>As(e,js),Ts=e=>As(e,Ns),Es=e=>As(e,Ms),Ds=e=>As(e,Rs,!0),Os=e=>As(e,Ls,!0),ks=(e,t,n)=>{let r=Ko.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},As=(e,t,n=!1)=>{let r=qo.exec(e);return r?r[1]?t(r[1]):n:!1},js=e=>e===`position`||e===`percentage`,Ms=e=>e===`image`||e===`url`,Ns=e=>e===`length`||e===`size`||e===`bg-size`,Ps=e=>e===`length`,Fs=e=>e===`number`,Is=e=>e===`family-name`,Ls=e=>e===`number`||e===`weight`,Rs=e=>e===`shadow`,zs=()=>{let e=Go(`color`),t=Go(`font`),n=Go(`text`),r=Go(`font-weight`),i=Go(`tracking`),a=Go(`leading`),o=Go(`breakpoint`),s=Go(`container`),c=Go(`spacing`),l=Go(`radius`),u=Go(`shadow`),d=Go(`inset-shadow`),f=Go(`text-shadow`),p=Go(`drop-shadow`),m=Go(`blur`),h=Go(`perspective`),g=Go(`aspect`),_=Go(`ease`),v=Go(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),xs,ps],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[xs,ps,c],T=()=>[es,`full`,`auto`,...w()],E=()=>[ns,`none`,`subgrid`,xs,ps],D=()=>[`auto`,{span:[`full`,ns,xs,ps]},ns,xs,ps],O=()=>[ns,`auto`,xs,ps],k=()=>[`auto`,`min`,`max`,`fr`,xs,ps],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[es,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[es,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[es,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,xs,ps],L=()=>[...b(),ws,vs,{position:[xs,ps]}],R=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ee=()=>[`auto`,`cover`,`contain`,Ts,fs,{size:[xs,ps]}],z=()=>[rs,Ss,ms],B=()=>[``,`none`,`full`,l,xs,ps],V=()=>[``,ts,Ss,ms],te=()=>[`solid`,`dashed`,`dotted`,`double`],ne=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],H=()=>[ts,rs,ws,vs],re=()=>[``,`none`,m,xs,ps],ie=()=>[`none`,ts,xs,ps],U=()=>[`none`,ts,xs,ps],ae=()=>[ts,xs,ps],oe=()=>[es,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[is],breakpoint:[is],color:[as],container:[is],"drop-shadow":[is],ease:[`in`,`out`,`in-out`],font:[us],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[is],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[is],shadow:[is],spacing:[`px`,ts],text:[is],"text-shadow":[is],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,es,ps,xs,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,xs,ps]}],"container-named":[ds],columns:[{columns:[ts,ps,xs,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[ns,`auto`,xs,ps]}],basis:[{basis:[es,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[ts,es,`auto`,`initial`,`none`,ps]}],grow:[{grow:[``,ts,xs,ps]}],shrink:[{shrink:[``,ts,xs,ps]}],order:[{order:[ns,`first`,`last`,`none`,xs,ps]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,Ss,ms]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Os,gs]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,rs,ps]}],"font-family":[{font:[Cs,_s,t]}],"font-features":[{"font-features":[ps]}],"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:[i,xs,ps]}],"line-clamp":[{"line-clamp":[ts,`none`,xs,hs]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,xs,ps]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,xs,ps]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...te(),`wavy`]}],"text-decoration-thickness":[{decoration:[ts,`from-font`,`auto`,xs,ms]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[ts,`auto`,xs,ps]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[ns,xs,ps]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,xs,ps]}],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`,xs,ps]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:ee()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},ns,xs,ps],radial:[``,xs,ps],conic:[ns,xs,ps]},Es,ys]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:z()}],"gradient-via-pos":[{via:z()}],"gradient-to-pos":[{to:z()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:V()}],"border-w-x":[{"border-x":V()}],"border-w-y":[{"border-y":V()}],"border-w-s":[{"border-s":V()}],"border-w-e":[{"border-e":V()}],"border-w-bs":[{"border-bs":V()}],"border-w-be":[{"border-be":V()}],"border-w-t":[{"border-t":V()}],"border-w-r":[{"border-r":V()}],"border-w-b":[{"border-b":V()}],"border-w-l":[{"border-l":V()}],"divide-x":[{"divide-x":V()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":V()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...te(),`hidden`,`none`]}],"divide-style":[{divide:[...te(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...te(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[ts,xs,ps]}],"outline-w":[{outline:[``,ts,Ss,ms]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`none`,u,Ds,bs]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,Ds,bs]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:V()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[ts,ms]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":V()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,Ds,bs]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[ts,xs,ps]}],"mix-blend":[{"mix-blend":[...ne(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ne()}],"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":[ts]}],"mask-image-linear-from-pos":[{"mask-linear-from":H()}],"mask-image-linear-to-pos":[{"mask-linear-to":H()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":H()}],"mask-image-t-to-pos":[{"mask-t-to":H()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":H()}],"mask-image-r-to-pos":[{"mask-r-to":H()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":H()}],"mask-image-b-to-pos":[{"mask-b-to":H()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":H()}],"mask-image-l-to-pos":[{"mask-l-to":H()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":H()}],"mask-image-x-to-pos":[{"mask-x-to":H()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":H()}],"mask-image-y-to-pos":[{"mask-y-to":H()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[xs,ps]}],"mask-image-radial-from-pos":[{"mask-radial-from":H()}],"mask-image-radial-to-pos":[{"mask-radial-to":H()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"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":b()}],"mask-image-conic-pos":[{"mask-conic":[ts]}],"mask-image-conic-from-pos":[{"mask-conic-from":H()}],"mask-image-conic-to-pos":[{"mask-conic-to":H()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:ee()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,xs,ps]}],filter:[{filter:[``,`none`,xs,ps]}],blur:[{blur:re()}],brightness:[{brightness:[ts,xs,ps]}],contrast:[{contrast:[ts,xs,ps]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Ds,bs]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,ts,xs,ps]}],"hue-rotate":[{"hue-rotate":[ts,xs,ps]}],invert:[{invert:[``,ts,xs,ps]}],saturate:[{saturate:[ts,xs,ps]}],sepia:[{sepia:[``,ts,xs,ps]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,xs,ps]}],"backdrop-blur":[{"backdrop-blur":re()}],"backdrop-brightness":[{"backdrop-brightness":[ts,xs,ps]}],"backdrop-contrast":[{"backdrop-contrast":[ts,xs,ps]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,ts,xs,ps]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ts,xs,ps]}],"backdrop-invert":[{"backdrop-invert":[``,ts,xs,ps]}],"backdrop-opacity":[{"backdrop-opacity":[ts,xs,ps]}],"backdrop-saturate":[{"backdrop-saturate":[ts,xs,ps]}],"backdrop-sepia":[{"backdrop-sepia":[``,ts,xs,ps]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,xs,ps]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[ts,`initial`,xs,ps]}],ease:[{ease:[`linear`,`initial`,_,xs,ps]}],delay:[{delay:[ts,xs,ps]}],animate:[{animate:[`none`,v,xs,ps]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,xs,ps]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ie()}],"rotate-x":[{"rotate-x":ie()}],"rotate-y":[{"rotate-y":ie()}],"rotate-z":[{"rotate-z":ie()}],scale:[{scale:U()}],"scale-x":[{"scale-x":U()}],"scale-y":[{"scale-y":U()}],"scale-z":[{"scale-z":U()}],"scale-3d":[`scale-3d`],skew:[{skew:ae()}],"skew-x":[{"skew-x":ae()}],"skew-y":[{"skew-y":ae()}],transform:[{transform:[xs,ps,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:oe()}],"translate-x":[{"translate-x":oe()}],"translate-y":[{"translate-y":oe()}],"translate-z":[{"translate-z":oe()}],"translate-none":[`translate-none`],zoom:[{zoom:[ns,xs,ps]}],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"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`,xs,ps]}],"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":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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`,xs,ps]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[ts,Ss,ms,hs]}],stroke:[{stroke:[`none`,...I()]}],"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`]}},Bs=Uo(zs)}));function Y(...e){return Bs(ao(e))}var X=m((()=>{oo(),wee()}));ro(),X();var Tee=({withSeparator:e=!0,variant:t,className:r,children:i,ref:a,...o})=>(0,n.jsx)(Ut,{className:Y(See({variant:t,className:r}),e&&`divide-y divide-border`),ref:a,...o,children:i});ro(),X();var Eee=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Gn,{"data-header":!0,className:Y(`w-full items-center justify-start gap-sm rounded-lg text-start style-text-strong-1 transition-all`,e),ref:r,...i,children:t});ro(),X();var Dee=({tone:e,className:t,children:r,ref:i,...a})=>(0,n.jsx)(Wn,{className:Y(Cee({className:t,tone:e})),ref:i,...a,children:r});ro(),X();var Oee=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(eo,{className:Y(`h-(--accordion-panel-height) overflow-hidden transition-all duration-300 ease-out data-ending-style:h-[0px] data-starting-style:h-[0px]`,e),"data-panel":!0,ref:r,...i,children:(0,n.jsx)(`p`,{className:`px-md pb-sm`,children:t})});X();var kee=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{"data-subtitle":!0,className:Y(`style-text-prose--1 transition-colors`,e),ref:r,...i,children:t});X();var Aee=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{"data-title":!0,className:Y(`style-text-strong-0 transition-colors`,e),ref:r,...i,children:t}),Vs,jee=m((()=>{uo(),Vs=lo(`group flex items-center justify-start gap-sm rounded-xl border px-md py-sm transition-all [&>svg]:size-lg`,{variants:{tone:{brand:`border-brand-border bg-brand-container [&_[data-description]]:text-brand-on-container-muted [&_[data-title]]:text-brand-on-container [&_svg]:text-brand-on-container`,accent:`border-accent-border bg-accent-container [&_[data-description]]:text-accent-on-container-muted [&_[data-title]]:text-accent-on-container [&_svg]:text-accent-on-container`,neutral:`border-neutral-border bg-neutral-container [&_[data-description]]:text-neutral-on-container-muted [&_[data-title]]:text-neutral-on-container [&_svg]:text-neutral-on-container`,error:`border-error-border bg-error-container [&_[data-description]]:text-error-on-container-muted [&_[data-title]]:text-error-on-container [&_svg]:text-error-on-container`,info:`border-info-border bg-info-container [&_[data-description]]:text-info-on-container-muted [&_[data-title]]:text-info-on-container [&_svg]:text-info-on-container`,success:`border-success-border bg-success-container [&_[data-description]]:text-success-on-container-muted [&_[data-title]]:text-success-on-container [&_svg]:text-success-on-container`,warning:`border-warning-border bg-warning-container [&_[data-description]]:text-warning-on-container-muted [&_[data-title]]:text-warning-on-container [&_svg]:text-warning-on-container`}},defaultVariants:{tone:`brand`}})})),Hs,Mee=m((()=>{jee(),X(),Hs=({tone:e,className:t,children:r,ref:i,...a})=>(0,n.jsx)(`div`,{className:Y(Vs({tone:e,className:t})),ref:i,...a,children:r})})),Us,Nee=m((()=>{X(),Us=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`style-text-prose-0`,e),"data-description":!0,ref:r,...i,children:t})})),Ws,Pee=m((()=>{X(),Ws=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex items-center gap-2xs style-text-strong-0 [&_svg]:size-sm`,e),"data-title":!0,ref:r,...i,children:t})})),Gs,Ks=m((()=>{X(),Gs=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(``,e),ref:r,...i,children:t})})),qs,Fee=m((()=>{X(),qs=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`ml-auto flex items-center justify-start gap-3xs`,e),ref:r,...i,children:t})})),Iee=m((()=>{Mee(),Nee(),Pee(),Ks(),Fee()}));function Js(e){let n=t.useRef(!0);n.current&&(n.current=!1,e())}var Ys=m((()=>{}));function Xs(){let e=D(Qs.create).current;return en(e.disposeEffect),e}var Zs,Qs,$s=m((()=>{k(),nn(),Zs=0,Qs=class e{static create(){return new e}currentId=Zs;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Zs,t()},e)}isStarted(){return this.currentId!==Zs}clear=()=>{this.currentId!==Zs&&(clearTimeout(this.currentId),this.currentId=Zs)};disposeEffect=()=>this.clear}}));function Lee(e){if(typeof document>`u`)return!1;let t=ta(e);return Xn(t).innerWidth-t.documentElement.clientWidth>0}function Ree(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=ta(e),n=t.documentElement,r=t.body,i=nr(n)?n:r,a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function zee(e){let t=ta(e),n=t.documentElement,r=t.body,i=nr(n)?n:r,a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function Bee(e){let t=ta(e),n=t.documentElement,r=t.body,i=Xn(n),a=0,o=0,s=!1,c=ln.create();if(Mr&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,tc={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},rc=n.style.scrollBehavior,nc={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=nr(n)?n:r;if(s=Ree(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflow:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,tc),Object.assign(r.style,nc),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=rc)}function d(){u(),c.request(l)}l();let f=Ka(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}function ec(e=!0,t=null){L(()=>{if(e)return ac.acquire(t)},[e,t])}var tc,nc,rc,ic,ac,oc=m((()=>{yr(),qa(),zr(),na(),R(),$s(),un(),Ae(),tc={},nc={},rc=``,ic=class{lockCount=0;restore=null;timeoutLock=Qs.create();timeoutUnlock=Qs.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=ta(e).documentElement,n=Xn(t).getComputedStyle(t).overflowY;if(n===`hidden`||n===`clip`){this.restore=De;return}let r=Nr||!Lee(e);this.restore=r?zee(e):Bee(e)}},ac=new ic}));function Vee(e,t){return t!=null&&!di(t)?0:typeof e==`function`?e():e}function sc(e,t,n){let r=Vee(e,n);return typeof r==`number`?r:r?.[t]}function cc(e){return typeof e==`function`?e():e}function lc(e,t){return t||e===`click`||e===`mousedown`}var uc=m((()=>{pi()}));function Hee(e){let{children:r,delay:i,timeoutMs:a=0}=e,o=t.useRef(i),s=t.useRef(i),c=t.useRef(null),l=t.useRef(null),u=Xs();return(0,n.jsx)(dc.Provider,{value:t.useMemo(()=>({hasProvider:!0,delayRef:o,initialDelayRef:s,currentIdRef:c,timeoutMs:a,currentContextRef:l,timeout:u}),[a,u]),children:r})}function Uee(e,n={open:!1}){let r=`rootStore`in e?e.rootStore:e,i=r.useState(`floatingId`),{open:a}=n,{currentIdRef:o,delayRef:s,timeoutMs:c,initialDelayRef:l,currentContextRef:u,hasProvider:d,timeout:f}=t.useContext(dc),[p,m]=t.useState(!1);return L(()=>{function e(){m(!1),u.current?.setIsInstantPhase(!1),o.current=null,u.current=null,s.current=l.current}if(o.current&&!a&&o.current===i){if(m(!1),c){let t=i;return f.start(c,()=>{r.select(`open`)||o.current&&o.current!==t||e()}),()=>{f.clear()}}e()}},[a,i,o,s,c,l,u,f,r]),L(()=>{if(!a)return;let e=u.current,t=o.current;f.clear(),u.current={onOpenChange:r.setOpen,setIsInstantPhase:m},o.current=i,s.current={open:0,close:sc(l.current,`close`)},t!==null&&t!==i?(m(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,J(ct))):(m(!1),e?.setIsInstantPhase(!1))},[a,i,r,o,s,c,l,u,f]),L(()=>()=>{u.current=null},[u]),t.useMemo(()=>({hasProvider:d,delayRef:s,isInstantPhase:p}),[d,s,p])}var dc,Wee=m((()=>{$s(),R(),uc(),Vt(),zt(),dc=t.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Qs,currentIdRef:{current:null},currentContextRef:{current:null}}),process.env.NODE_ENV!==`production`&&(dc.displayName=`FloatingDelayGroupContext`)}));function fc(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}var pc=m((()=>{}));function mc(e){let t=D(Gee,e).current;return t.next=e,L(t.effect),t}function Gee(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var hc=m((()=>{R(),k()})),gc,_c,vc,yc=m((()=>{gc={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},_c={...gc,position:`fixed`,top:0,left:0},vc={...gc,position:`absolute`}})),bc,xc=m((()=>{R(),zr(),yc(),bc=t.forwardRef(function(e,r){let[i,a]=t.useState();L(()=>{Fr&&a(`button`)},[]);let o={tabIndex:0,role:i};return(0,n.jsx)(`span`,{...e,ref:r,style:_c,"aria-hidden":i?void 0:!0,...o,"data-base-ui-focus-guard":``})}),process.env.NODE_ENV!==`production`&&(bc.displayName=`FocusGuard`)}));function Sc(e){return`data-base-ui-${e}`}var Cc=m((()=>{}));function wc(e,t={}){let{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(Tc);let a=()=>e?.focus({preventScroll:n});if(i)return a(),De;let o=requestAnimationFrame(a);return Tc=o,()=>{Tc===o&&(cancelAnimationFrame(o),Tc=0)}}var Tc,Ec=m((()=>{Ae(),Tc=0}));function Dc(e){return Nc[e]}function Oc(e){return e?tr(e)?e.host:Oc(e.parentNode):null}function kc(e,t,n,r,{mark:i=!0,markerIgnoreElements:a=[]}){let o=r?`inert`:n?`aria-hidden`:null,s=null,c=null,l=Ic(t,e),u=i?Ic(t,a):[],d=new Set(u),f=i?Rc(t,Lc(l),new Set(l)).filter(e=>!d.has(e)):[],p=[],m=[];if(o){let e=jc[o],n=Dc(o);c=n,s=e;let r=Ic(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=l.concat(r);Rc(t,Lc(i),new Set(i)).forEach(t=>{let r=t.getAttribute(o),i=r!==null&&r!==`false`,a=(e.get(t)||0)+1;e.set(t,a),p.push(t),a===1&&i&&n.add(t),i||t.setAttribute(o,o===`inert`?``:`true`)})}return i&&f.forEach(e=>{let t=(Pc.get(e)||0)+1;Pc.set(e,t),m.push(e),t===1&&e.setAttribute(Mc,``)}),Fc+=1,()=>{s&&p.forEach(e=>{let t=(s.get(e)||0)-1;s.set(e,t),t||(!c?.has(e)&&o&&e.removeAttribute(o),c?.delete(e))}),i&&m.forEach(e=>{let t=(Pc.get(e)||0)-1;Pc.set(e,t),t||e.removeAttribute(Mc)}),--Fc,Fc||(jc.inert=new WeakMap,jc[`aria-hidden`]=new WeakMap,Nc.inert=new WeakSet,Nc[`aria-hidden`]=new WeakSet,Pc=new WeakMap)}}function Ac(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0,markerIgnoreElements:a=[]}=t,o=ta(e[0]).body;return kc(e,o,n,r,{mark:i,markerIgnoreElements:a})}var jc,Mc,Nc,Pc,Fc,Ic,Lc,Rc,zc=m((()=>{yr(),na(),jc={inert:new WeakMap,"aria-hidden":new WeakMap},Mc=`data-base-ui-inert`,Nc={inert:new WeakSet,"aria-hidden":new WeakSet},Pc=new WeakMap,Fc=0,Ic=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Oc(t);return e.contains(n)?n:null}).filter(e=>e!=null),Lc=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},Rc=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{Yn(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r}})),Bc,Vc,Hc,Uc,Wc,Gc,Kc,qc,Jc,Yc=m((()=>{Bc={style:{transition:`none`}},Vc=`data-base-ui-click-trigger`,Hc=`data-base-ui-swipe-ignore`,Uc=`data-swipe-ignore`,Wc=`[${Hc}]`,Gc=`[${Uc}]`,Kc={fallbackAxisSide:`none`},qc={fallbackAxisSide:`end`},Jc={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0}}));function Xc(e={}){let{ref:n,container:i,componentProps:a=ke,elementProps:o}=e,s=Jt(),c=Qc()?.portalNode,[l,u]=t.useState(null),[d,f]=t.useState(null),p=A(e=>{e!==null&&f(e)}),m=t.useRef(null);L(()=>{if(i===null){m.current&&(m.current=null,f(null),u(null));return}if(s==null)return;let e=(i&&(Qn(i)?i:i.current))??c??document.body;if(e==null){m.current&&(m.current=null,f(null),u(null));return}m.current!==e&&(m.current=e,f(null),u(e))},[i,c,s]);let h=K(`div`,a,{ref:[n,p],props:[{id:s,[$c]:``},o]});return{portalNode:d,portalSubtree:l&&h?r.createPortal(h,l):null}}var Zc,Qc,$c,el,tl=m((()=>{yr(),qa(),pc(),Zt(),R(),F(),Ae(),xc(),xa(),Vt(),zt(),Cc(),q(),Yc(),Zc=t.createContext(null),process.env.NODE_ENV!==`production`&&(Zc.displayName=`PortalContext`),Qc=()=>t.useContext(Zc),$c=Sc(`portal`),el=t.forwardRef(function(e,i){let{children:a,container:o,className:s,render:c,renderGuards:l,style:u,...d}=e,{portalNode:f,portalSubtree:p}=Xc({container:o,ref:i,componentProps:e,elementProps:d}),m=t.useRef(null),h=t.useRef(null),g=t.useRef(null),_=t.useRef(null),[v,y]=t.useState(null),b=t.useRef(!1),x=v?.modal,S=v?.open,C=typeof l==`boolean`?l:!!v&&!v.modal&&v.open&&!!f;t.useEffect(()=>{if(!f||x)return;function e(e){f&&e.relatedTarget&&va(e)&&(e.type===`focusin`?b.current&&=(ya(f),!1):(vee(f),b.current=!0))}return fc(Ka(f,`focusin`,e,!0),Ka(f,`focusout`,e,!0))},[f,x]),t.useEffect(()=>{!f||S!==!1||(ya(f),b.current=!1)},[S,f]);let w=t.useMemo(()=>({beforeOutsideRef:m,afterOutsideRef:h,beforeInsideRef:g,afterInsideRef:_,portalNode:f,setFocusManagerState:y}),[f]);return(0,n.jsxs)(t.Fragment,{children:[p,(0,n.jsxs)(Zc.Provider,{value:w,children:[C&&f&&(0,n.jsx)(bc,{"data-type":`outside`,ref:m,onFocus:e=>{va(e,f)?g.current?.focus():ga(v?v.domReference:null)?.focus()}}),C&&f&&(0,n.jsx)(`span`,{"aria-owns":f.id,style:Jc}),f&&r.createPortal(a,f),C&&f&&(0,n.jsx)(bc,{"data-type":`outside`,ref:h,onFocus:e=>{va(e,f)?_.current?.focus():(ha(v?v.domReference:null)?.focus(),v?.closeOnFocusOut&&v?.onOpenChange(!1,J(`focus-out`,e.nativeEvent)))}})]})]})}),process.env.NODE_ENV!==`production`&&(el.displayName=`FloatingPortal`)}));function nl(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var rl=m((()=>{})),il,al=m((()=>{rl(),il=class{nodesRef={current:[]};events=nl();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}}}));function ol(e){let t=Jt(),n=fl(e),r=dl();return L(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function sl(e){let{children:r,id:i}=e,a=dl();return(0,n.jsx)(ll.Provider,{value:t.useMemo(()=>({id:i,parentId:a}),[i,a]),children:r})}function cl(e){let{children:t,externalTree:r}=e,i=D(()=>r??new il).current;return(0,n.jsx)(ul.Provider,{value:i,children:t})}var ll,ul,dl,fl,pl=m((()=>{Zt(),R(),k(),al(),ll=t.createContext(null),process.env.NODE_ENV!==`production`&&(ll.displayName=`FloatingNodeContext`),ul=t.createContext(null),process.env.NODE_ENV!==`production`&&(ul.displayName=`FloatingTreeContext`),dl=()=>t.useContext(ll)?.id||null,fl=e=>{let n=t.useContext(ul);return e??n}}));function Kee(e,t){let n=Xn(Yr(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}function ml(){yl=yl.filter(e=>e.deref()?.isConnected)}function qee(e){ml(),e&&Yn(e)!==`body`&&(yl.push(new WeakRef(e)),yl.length>vl&&(yl=yl.slice(-vl)))}function hl(){return ml(),yl[yl.length-1]?.deref()}function Jee(e){return e?da(e)?e:pa(e)[0]||e:null}function gl(e,t){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!t.current.includes(`floating`)&&!e.getAttribute(`role`)?.includes(`dialog`))return;let n=fa(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return da(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),r=e.getAttribute(`tabindex`);t.current.includes(`floating`)||n.length===0?r!==`0`&&e.setAttribute(`tabindex`,`0`):(r!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function _l(e){let{context:r,children:i,disabled:a=!1,initialFocus:o=!0,returnFocus:s=!0,restoreFocus:c=!1,modal:l=!0,closeOnFocusOut:u=!0,openInteractionType:d=``,nextFocusableElement:f,previousFocusableElement:p,beforeContentFocusGuardRef:m,externalTree:h,getInsideElements:g}=e,_=`rootStore`in r?r.rootStore:r,v=_.useState(`open`),y=_.useState(`domReferenceElement`),b=_.useState(`floatingElement`),{events:x,dataRef:S}=_.context,C=A(()=>S.current.floatingContext?.nodeId),w=o===!1,T=ti(y)&&w,E=t.useRef([`content`]),D=mc(o),O=mc(s),k=mc(d),j=fl(h),M=Qc(),N=t.useRef(!1),P=t.useRef(!1),F=t.useRef(!1),I=t.useRef(null),R=t.useRef(``),ee=t.useRef(``),z=t.useRef(null),B=t.useRef(null),V=pe(z,m,M?.beforeInsideRef),te=pe(B,M?.afterInsideRef),ne=Xs(),H=Xs(),re=rn(),ie=M!=null,U=ri(b),ae=A((e=U)=>e?pa(e):[]),oe=A(()=>g?.().filter(e=>e!=null)??[]);t.useEffect(()=>{if(a||!l)return;function e(e){e.key===`Tab`&&Jr(U,qr(ta(U)))&&ae().length===0&&!T&&ci(e)}return Ka(ta(U),`keydown`,e)},[a,y,U,l,E,T,ae]),t.useEffect(()=>{if(a||!v)return;let e=ta(U);function t(){F.current=!1}function n(e){let t=Yr(e),n=oe();F.current=!(Jr(b,t)||Jr(y,t)||Jr(M?.portalNode,t)||n.some(e=>e===t||Jr(e,t))),ee.current=e.pointerType||`keyboard`,t?.closest(`[data-base-ui-click-trigger]`)&&(P.current=!0)}function r(){ee.current=`keyboard`}return fc(Ka(e,`pointerdown`,n,!0),Ka(e,`pointerup`,t,!0),Ka(e,`pointercancel`,t,!0),Ka(e,`keydown`,r,!0))},[a,b,y,U,v,M,oe]),t.useEffect(()=>{if(a||!u)return;let e=ta(U);function t(){P.current=!0,H.start(0,()=>{P.current=!1})}function n(e){let t=Yr(e);da(t)&&(I.current=t)}function r(t){let n=t.relatedTarget,r=t.currentTarget,i=Yr(t);queueMicrotask(()=>{let a=C(),o=_.context.triggerElements,s=oe(),u=n?.hasAttribute(Sc(`focus-guard`))&&[z.current,B.current,M?.beforeInsideRef.current,M?.afterInsideRef.current,M?.beforeOutsideRef.current,M?.afterOutsideRef.current,dn(p),dn(f)].includes(n),d=!(Jr(y,n)||Jr(b,n)||Jr(n,b)||Jr(M?.portalNode,n)||s.some(e=>e===n||Jr(e,n))||n!=null&&o.hasElement(n)||o.hasMatchingElement(e=>Jr(e,n))||u||j&&(ai(j.nodesRef.current,a).find(e=>Jr(e.context?.elements.floating,n)||Jr(e.context?.elements.domReference,n))||oi(j.nodesRef.current,a).find(e=>[e.context?.elements.floating,ri(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===y&&U&&gl(U,E),c&&r!==y&&!$i(i)&&qr(e)===e.body){if(er(U)&&(U.focus(),c===`popup`)){re.request(()=>{U.focus()});return}let e=ae(),t=I.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||U;er(n)&&n.focus()}if(S.current.insideReactTree){S.current.insideReactTree=!1;return}(T||!l)&&n&&d&&!P.current&&(T||n!==hl())&&(N.current=!0,_.setOpen(!1,J(Tt,t)))})}function i(){F.current||(S.current.insideReactTree=!0,ne.start(0,()=>{S.current.insideReactTree=!1}))}let o=er(y)?y:null;if(!(!b&&!o))return fc(o&&Ka(o,`focusout`,r),o&&Ka(o,`pointerdown`,t),b&&Ka(b,`focusin`,n),b&&Ka(b,`focusout`,r),b&&M&&Ka(b,`focusout`,i,!0))},[a,y,b,U,l,j,M,_,u,c,ae,T,C,E,S,ne,H,re,f,p,oe]),t.useEffect(()=>{if(a||!b||!v)return;let e=Array.from(M?.portalNode?.querySelectorAll(`[${Sc(`portal`)}]`)||[]),t=(j?oi(j.nodesRef.current,C()):[]).find(e=>ti(e.context?.elements.domReference||null))?.context?.elements.domReference,n=Ac([b,...e,z.current,B.current,M?.beforeOutsideRef.current,M?.afterOutsideRef.current,...oe(),t,dn(p),dn(f),T?y:null].filter(e=>e!=null),{ariaHidden:l||T,mark:!1}),r=Ac([b,...e].filter(e=>e!=null));return()=>{r(),n()}},[v,a,y,b,l,E,M,T,j,C,f,p,oe]),L(()=>{if(!v||a||!er(U))return;let e=qr(ta(U));queueMicrotask(()=>{let t=D.current,n=typeof t==`function`?t(k.current||``):t;if(n===void 0||n===!1||Jr(U,e))return;let r=null,i=()=>(r??=ae(U),r[0]||U),a;a=n===!0||n===null?i():dn(n),a||=i(),wc(a,{preventScroll:a===U})})},[a,v,U,w,ae,D,k]),L(()=>{if(a||!U)return;let e=ta(U);qee(qr(e));function t(e){if(e.open||(R.current=Kee(e.nativeEvent,ee.current)),e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`&&(N.current=!0),e.reason===`outside-press`)if(e.nested)N.current=!1;else if(li(e.nativeEvent)||ui(e.nativeEvent))N.current=!1;else{let e=!1;ta(U).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?N.current=!1:N.current=!0}}x.on(`openchange`,t);function n(){let e=O.current,t=typeof e==`function`?e(R.current):e;if(t===void 0||t===!1)return null;if(t===null&&(t=!0),typeof t==`boolean`){let e=y||hl();return e&&e.isConnected?e:null}let n=y||hl();return dn(t)||n||null}return()=>{x.off(`openchange`,t);let r=qr(e),i=oe(),a=Jr(b,r)||i.some(e=>e===r||Jr(e,r))||j&&ai(j.nodesRef.current,C(),!1).some(e=>Jr(e.context?.elements.floating,r)),o=O.current,s=n();queueMicrotask(()=>{let t=Jee(s),n=typeof o!=`boolean`;o&&!N.current&&er(t)&&(!(!n&&t!==r&&r!==e.body)||a)&&t.focus({preventScroll:!0}),N.current=!1})}},[a,b,U,O,S,x,j,y,C,oe]),L(()=>{if(!Mr||v||!b)return;let e=qr(ta(b));!er(e)||!$r(e)||Jr(b,e)&&e.blur()},[v,b]),L(()=>{if(!(a||!M))return M.setFocusManagerState({modal:l,closeOnFocusOut:u,open:v,onOpenChange:_.setOpen,domReference:y}),()=>{M.setFocusManagerState(null)}},[a,M,l,v,_,u,y]),L(()=>{if(!(a||!U))return gl(U,E),()=>{queueMicrotask(ml)}},[a,U,E]);let se=!a&&(l?!T:!0)&&(ie||l);return(0,n.jsxs)(t.Fragment,{children:[se&&(0,n.jsx)(bc,{"data-type":`inside`,ref:V,onFocus:e=>{if(l){let e=ae();wc(e[e.length-1])}else M?.portalNode&&(N.current=!1,va(e,M.portalNode)?ha(y)?.focus():dn(p??M.beforeOutsideRef)?.focus())}}),i,se&&(0,n.jsx)(bc,{"data-type":`inside`,ref:te,onFocus:e=>{l?wc(ae()[0]):M?.portalNode&&(u&&(N.current=!0),va(e,M.portalNode)?ga(y)?.focus():dn(f??M.afterOutsideRef)?.focus())}})]})}var vl,yl,Yee=m((()=>{yr(),qa(),pc(),ye(),hc(),F(),R(),$s(),zr(),un(),na(),xc(),ii(),pi(),xa(),si(),ea(),Vt(),zt(),Cc(),Ec(),zc(),tl(),pl(),Yc(),fn(),vl=20,yl=[]}));function bl(e,n={}){let r=`rootStore`in e?e.rootStore:e,i=r.context.dataRef,{enabled:a=!0,event:o=`click`,toggle:s=!0,ignoreMouse:c=!1,stickIfOpen:l=!0,touchOpenDelay:u=0,reason:d=lt}=n,f=t.useRef(void 0),p=rn(),m=Xs(),h=t.useMemo(()=>({onPointerDown(e){f.current=e.pointerType},onMouseDown(e){let t=f.current,n=e.nativeEvent,a=r.select(`open`);if(e.button!==0||o===`click`||di(t,!0)&&c)return;let h=i.current.openEvent,g=h?.type,_=r.select(`domReferenceElement`)!==e.currentTarget,v=a&&_||!(a&&s&&(!(h&&l)||g===`click`||g===`mousedown`)),y=Yr(n);if($r(y)){let e=J(d,n,y);v&&t===`touch`&&u>0?m.start(u,()=>{r.setOpen(!0,e)}):r.setOpen(v,e);return}let b=e.currentTarget;p.request(()=>{let e=J(d,n,b);v&&t===`touch`&&u>0?m.start(u,()=>{r.setOpen(!0,e)}):r.setOpen(v,e)})},onClick(e){if(o===`mousedown-only`)return;let t=f.current;if(o===`mousedown`&&t){f.current=void 0;return}if(di(t,!0)&&c)return;let n=r.select(`open`),a=i.current.openEvent,p=r.select(`domReferenceElement`)!==e.currentTarget,h=n&&p||!(n&&s&&(!(a&&l)||fi(a))),g=J(d,e.nativeEvent,e.currentTarget);h&&t===`touch`&&u>0?m.start(u,()=>{r.setOpen(!0,g)}):r.setOpen(h,g)},onKeyDown(){f.current=void 0}}),[i,o,c,r,l,s,p,m,u,d]);return t.useMemo(()=>a?{reference:h}:ke,[a,h])}var Xee=m((()=>{un(),$s(),Ae(),ii(),pi(),Vt(),zt()}));function Zee(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=a.width,u=a.height,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,l=0,u=0,!i||c?(l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f):i&&!c&&(u=t.axis===`x`?a.height:u,l=t.axis===`y`?a.width:l),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function xl(e){return e!=null&&e.clientX!=null}function Qee(e,n={}){let r=`rootStore`in e?e.rootStore:e,i=r.useState(`open`),a=r.useState(`floatingElement`),o=r.useState(`domReferenceElement`),s=r.context.dataRef,{enabled:c=!0,axis:l=`both`}=n,u=t.useRef(!1),d=t.useRef(null),[f,p]=t.useState(),[m,h]=t.useState([]),g=A((e,t,n)=>{u.current||s.current.openEvent&&!xl(s.current.openEvent)||r.set(`positionReference`,Zee(n??o,{x:e,y:t,axis:l,dataRef:s,pointerType:f}))}),_=A(e=>{i?d.current||h([]):g(e.clientX,e.clientY,e.currentTarget)}),v=di(f)?a:i,y=t.useCallback(()=>{if(!v||!c)return;let e=Xn(a);function t(e){Jr(a,Yr(e))?(d.current?.(),d.current=null):g(e.clientX,e.clientY)}if(!s.current.openEvent||xl(s.current.openEvent))return d.current=Ka(e,`mousemove`,t),()=>{d.current?.(),d.current=null};r.set(`positionReference`,o)},[v,c,a,s,o,r,g]);t.useEffect(()=>y(),[y,m]),t.useEffect(()=>{c&&!a&&(u.current=!1)},[c,a]),t.useEffect(()=>{!c&&i&&(u.current=!0)},[c,i]);let b=t.useMemo(()=>{function e(e){p(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:_,onMouseEnter:_}},[_]);return t.useMemo(()=>c?{reference:b,trigger:b}:{},[c,b])}var $ee=m((()=>{yr(),qa(),F(),ii(),pi()}));function ete(){return!1}function tte(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function Sl(e,n={}){let r=`rootStore`in e?e.rootStore:e,i=r.useState(`open`),a=r.useState(`floatingElement`),{dataRef:o}=r.context,{enabled:s=!0,escapeKey:c=!0,outsidePress:l=!0,outsidePressEvent:u=`sloppy`,referencePress:d=ete,referencePressEvent:f=`sloppy`,bubbles:p,externalTree:m}=n,h=fl(m),g=A(typeof l==`function`?l:()=>!1),_=typeof l==`function`?g:l,v=_!==!1,y=A(()=>u),b=t.useRef(!1),x=t.useRef(!1),S=t.useRef(!1),{escapeKey:C,outsidePress:w}=tte(p),T=t.useRef(null),E=Xs(),D=Xs(),O=A(()=>{D.clear(),o.current.insideReactTree=!1}),k=t.useRef(!1),j=t.useRef(``),M=A(d),N=A(e=>{if(!i||!s||!c||e.key!==`Escape`||k.current)return;let t=o.current.floatingContext?.nodeId,n=h?ai(h.nodesRef.current,t):[];if(!C&&n.length>0){let e=!0;if(n.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__escapeKeyBubbles&&(e=!1)}),!e)return}let a=uee(e)?e.nativeEvent:e,l=J(Et,a);r.setOpen(!1,l),!C&&!l.isPropagationAllowed&&e.stopPropagation()}),P=A(()=>{o.current.insideReactTree=!0,D.start(0,O)});t.useEffect(()=>{if(!i||!s)return;o.current.__escapeKeyBubbles=C,o.current.__outsidePressBubbles=w;let e=new Qs,t=new Qs;function n(){e.clear(),k.current=!0}function l(){e.start(sr()?5:0,()=>{k.current=!1})}function u(){S.current=!0,t.start(0,()=>{S.current=!1})}function d(){b.current=!1,x.current=!1}function f(){let e=j.current,t=e===`pen`||!e?`mouse`:e,n=y(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function p(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function m(e){let t=o.current.floatingContext?.nodeId,n=h&&ai(h.nodesRef.current,t).some(t=>Qr(e,t.context?.elements.floating));return Qr(e,r.select(`floatingElement`))||Qr(e,r.select(`domReferenceElement`))||n}function g(e){if(p(e)){O();return}if(o.current.insideReactTree){O();return}let n=Yr(e),i=`[${Sc(`inert`)}]`,a=$n(n)?n.getRootNode():null,s=Array.from((tr(a)?a:ta(r.select(`floatingElement`))).querySelectorAll(i)),c=r.context.triggerElements;if(n&&(c.hasElement(n)||c.hasMatchingElement(e=>Jr(e,n))))return;let l=$n(n)?n:null;for(;l&&!cr(l);){let e=dr(l);if(cr(e)||!$n(e))break;l=e}if(s.length&&$n(n)&&!lee(n)&&!Jr(n,r.select(`floatingElement`))&&s.every(e=>!Jr(l,e)))return;if(er(n)&&!(`touches`in e)){let t=cr(n),r=lr(n),i=/auto|scroll/,a=t||i.test(r.overflowX),o=t||i.test(r.overflowY),s=a&&n.clientWidth>0&&n.scrollWidth>n.clientWidth,c=o&&n.clientHeight>0&&n.scrollHeight>n.clientHeight,l=r.direction===`rtl`,u=c&&(l?e.offsetX<=n.offsetWidth-n.clientWidth:e.offsetX>n.clientWidth),d=s&&e.offsetY>n.clientHeight;if(u||d)return}if(m(e))return;if(f()===`intentional`&&S.current){t.clear(),S.current=!1;return}if(typeof _==`function`&&!_(e))return;let u=o.current.floatingContext?.nodeId,d=h?ai(h.nodesRef.current,u):[];if(d.length>0){let e=!0;if(d.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__outsidePressBubbles&&(e=!1)}),!e)return}r.setOpen(!1,J(ft,e)),O()}function D(e){f()!==`sloppy`||e.pointerType===`touch`||!r.select(`open`)||!s||Qr(e,r.select(`floatingElement`))||Qr(e,r.select(`domReferenceElement`))||g(e)}function A(e){if(f()!==`sloppy`||!r.select(`open`)||!s||Qr(e,r.select(`floatingElement`))||Qr(e,r.select(`domReferenceElement`)))return;let t=e.touches[0];t&&(T.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},E.start(1e3,()=>{T.current&&(T.current.dismissOnTouchEnd=!1,T.current.dismissOnMouseDown=!1)}))}function M(e,t){let n=Yr(e);if(!n)return;let r=Ka(n,e.type,()=>{t(e),r()})}function P(e){j.current=`touch`,M(e,A)}function F(e){E.clear(),e.type===`pointerdown`&&(j.current=e.pointerType),!(e.type===`mousedown`&&T.current&&!T.current.dismissOnMouseDown)&&M(e,e=>{e.type===`pointerdown`?D(e):g(e)})}function I(e){if(!b.current)return;let n=x.current;if(d(),f()===`intentional`){if(e.type===`pointercancel`){n&&u();return}if(!m(e)){if(n){u();return}typeof _==`function`&&!_(e)||(t.clear(),S.current=!0,O())}}}function L(e){if(f()!==`sloppy`||!T.current||Qr(e,r.select(`floatingElement`))||Qr(e,r.select(`domReferenceElement`)))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-T.current.startX),i=Math.abs(t.clientY-T.current.startY),a=Math.sqrt(n*n+i*i);a>5&&(T.current.dismissOnTouchEnd=!0),a>10&&(g(e),E.clear(),T.current=null)}function R(e){M(e,L)}function ee(e){f()!==`sloppy`||!T.current||Qr(e,r.select(`floatingElement`))||Qr(e,r.select(`domReferenceElement`))||(T.current.dismissOnTouchEnd&&g(e),E.clear(),T.current=null)}function z(e){M(e,ee)}let B=ta(a),V=fc(c&&fc(Ka(B,`keydown`,N),Ka(B,`compositionstart`,n),Ka(B,`compositionend`,l)),v&&fc(Ka(B,`click`,F,!0),Ka(B,`pointerdown`,F,!0),Ka(B,`pointerup`,I,!0),Ka(B,`pointercancel`,I,!0),Ka(B,`mousedown`,F,!0),Ka(B,`mouseup`,I,!0),Ka(B,`touchstart`,P,!0),Ka(B,`touchmove`,R,!0),Ka(B,`touchend`,z,!0)));return()=>{V(),e.clear(),t.clear(),d(),S.current=!1}},[o,a,c,v,_,i,s,C,w,N,O,y,h,r,E]),t.useEffect(O,[_,O]);let F=t.useMemo(()=>({onKeyDown:N,[Cl[f]]:e=>{M()&&r.setOpen(!1,J(lt,e.nativeEvent))},...f!==`intentional`&&{onClick(e){M()&&r.setOpen(!1,J(`trigger-press`,e.nativeEvent))}}}),[N,r,f,M]),I=A(e=>{if(!i||!s||e.button!==0)return;let t=Yr(e.nativeEvent);Jr(r.select(`floatingElement`),t)&&(b.current||(b.current=!0,x.current=!1))}),L=A(e=>{!i||!s||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&b.current&&(x.current=!0)}),R=t.useMemo(()=>({onKeyDown:N,onPointerDown:L,onMouseDown:L,onClickCapture:P,onMouseDownCapture(e){P(),I(e)},onPointerDownCapture(e){P(),I(e)},onMouseUpCapture:P,onTouchEndCapture:P,onTouchMoveCapture:P}),[N,P,I,L]);return t.useMemo(()=>s?{reference:F,floating:R,trigger:F}:{},[s,F,R])}var Cl,wl=m((()=>{yr(),qa(),pc(),$s(),F(),na(),ii(),pi(),si(),pl(),Vt(),zt(),Cc(),Cl={intentional:`onClick`,sloppy:`onPointerDown`}}));function Tl(e,t,n){let{reference:r,floating:i}=e,a=bi(t),o=xi(t),s=yi(o),c=gi(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(_i(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function El(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=hi(t,e),p=Oi(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=ki(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=ki(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}function Dl(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ol(e){return Ai.some(t=>e[t]>=0)}async function kl(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=gi(n),s=_i(n),c=bi(n)===`y`,l=Pl.has(o)?-1:1,u=a&&c?-1:1,d=hi(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Al,jl,Ml,Nl,Pl,Fl,Il,Ll,Rl,zl=m((()=>{Vi(),Al=50,jl=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:El},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Tl(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Al&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Tl(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Ml=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=hi(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=gi(r),_=bi(o),v=gi(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Di(o)]:Ci(o)),x=p!==`none`;!d&&x&&b.push(...Ei(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Si(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==bi(t))||T.every(e=>bi(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=bi(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}},Nl=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=hi(e,t);switch(i){case`referenceHidden`:{let e=Dl(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ol(e)}}}case`escaped`:{let e=Dl(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ol(e)}}}default:return{}}}}},Pl=new Set([`left`,`top`]),Fl=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await kl(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Il=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=hi(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=bi(gi(i)),p=vi(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=mi(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=mi(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Ll=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=hi(e,t),u={x:n,y:r},d=bi(i),f=vi(d),p=u[f],m=u[d],h=hi(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Pl.has(gi(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Rl=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=hi(e,t),u=await o.detectOverflow(t,l),d=gi(i),f=_i(i),p=bi(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=ji(h-u[g],v),x=ji(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Mi(u.left,0),t=Mi(u.right,0),n=Mi(u.top,0),r=Mi(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Mi(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Mi(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}}}));function Bl(e){let t=lr(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=er(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Ni(n)!==a||Ni(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Vl(e){return $n(e)?e:e.contextElement}function Hl(e){let t=Vl(e);if(!er(t))return Fi(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Bl(t),o=(a?Ni(n.width):n.width)/r,s=(a?Ni(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}function Ul(e){let t=Xn(e);return!sr()||!t.visualViewport?fu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Wl(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Xn(e)?!1:t}function Gl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Vl(e),o=Fi(1);t&&(r?$n(r)&&(o=Hl(r)):o=Hl(e));let s=Wl(a,n,r)?Ul(a):Fi(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Xn(a),t=r&&$n(r)?Xn(r):r,n=e,i=mr(n);for(;i&&r&&t!==n;){let e=Hl(i),t=i.getBoundingClientRect(),r=lr(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Xn(i),i=mr(n)}}return ki({width:u,height:d,x:c,y:l})}function Kl(e,t){let n=ur(e).scrollLeft;return t?t.left+n:Gl(Zn(e)).left+n}function ql(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Kl(e,n),y:n.top+t.scrollTop}}function Jl(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Zn(r),s=t?ir(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Fi(1),u=Fi(0),d=er(r);if((d||!d&&!a)&&((Yn(r)!==`body`||nr(o))&&(c=ur(r)),d)){let e=Gl(r);l=Hl(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?ql(o,c):Fi(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Yl(e){return Array.from(e.getClientRects())}function Xl(e){let t=Zn(e),n=ur(e),r=e.ownerDocument.body,i=Mi(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Mi(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Kl(e),s=-n.scrollTop;return lr(r).direction===`rtl`&&(o+=Mi(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function Zl(e,t){let n=Xn(e),r=Zn(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=sr();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Kl(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=pu&&(a-=o)}else l<=pu&&(a+=l);return{width:a,height:o,x:s,y:c}}function Ql(e,t){let n=Gl(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=er(e)?Hl(e):Fi(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function $l(e,t,n){let r;if(t===`viewport`)r=Zl(e,n);else if(t===`document`)r=Xl(Zn(e));else if($n(t))r=Ql(t,n);else{let n=Ul(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ki(r)}function eu(e,t){let n=dr(e);return n===t||!$n(n)||cr(n)?!1:lr(n).position===`fixed`||eu(n,t)}function tu(e,t){let n=t.get(e);if(n)return n;let r=pr(e,[],!1).filter(e=>$n(e)&&Yn(e)!==`body`),i=null,a=lr(e).position===`fixed`,o=a?dr(e):e;for(;$n(o)&&!cr(o);){let t=lr(o),n=ar(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||nr(o)&&!n&&eu(e,o))?r=r.filter(e=>e!==o):i=t,o=dr(o)}return t.set(e,r),r}function nu(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ir(t)?[]:tu(t,this._c):[].concat(n),r],o=$l(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=$l(t,a[e],i);s=Mi(n.top,s),c=ji(n.right,c),l=ji(n.bottom,l),u=Mi(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function ru(e){let{width:t,height:n}=Bl(e);return{width:t,height:n}}function iu(e,t,n){let r=er(t),i=Zn(t),a=n===`fixed`,o=Gl(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Fi(0);function l(){c.x=Kl(i)}if(r||!r&&!a)if((Yn(t)!==`body`||nr(i))&&(s=ur(t)),r){let e=Gl(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?ql(i,s):Fi(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function au(e){return lr(e).position===`static`}function ou(e,t){if(!er(e)||lr(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Zn(e)===n&&(n=n.ownerDocument.body),n}function su(e,t){let n=Xn(e);if(ir(e))return n;if(!er(e)){let t=dr(e);for(;t&&!cr(t);){if($n(t)&&!au(t))return t;t=dr(t)}return n}let r=ou(e,t);for(;r&&rr(r)&&au(r);)r=ou(r,t);return r&&cr(r)&&au(r)&&!ar(r)?n:r||or(e)||n}function cu(e){return lr(e).direction===`rtl`}function lu(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function uu(e,t){let n=null,r,i=Zn(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Pi(d),h=Pi(i.clientWidth-(u+f)),g=Pi(i.clientHeight-(d+p)),_=Pi(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Mi(0,ji(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!lu(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function du(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Vl(e),u=i||a?[...l?pr(l):[],...t?pr(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?uu(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Gl(e):null;c&&g();function g(){let t=Gl(e);h&&!lu(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var fu,pu,mu,hu,gu,_u,vu,yu,bu,xu,Su,nte=m((()=>{zl(),Vi(),yr(),fu=Fi(0),pu=25,mu=async function(e){let t=this.getOffsetParent||su,n=this.getDimensions,r=await n(e.floating);return{reference:iu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},hu={convertOffsetParentRelativeRectToViewportRelativeRect:Jl,getDocumentElement:Zn,getClippingRect:nu,getOffsetParent:su,getElementRects:mu,getClientRects:Yl,getDimensions:ru,getScale:Hl,isElement:$n,isRTL:cu},gu=Fl,_u=Il,vu=Ml,yu=Rl,bu=Nl,xu=Ll,Su=(e,t,n)=>{let r=new Map,i={platform:hu,...n},a={...i.platform,_c:r};return jl(e,t,{...i,platform:a})}}));function Cu(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,i;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(!Cu(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Cu(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function wu(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Tu(e,t){let n=wu(e);return Math.round(t*n)/n}function Eu(e){let t=y.useRef(e);return Du(()=>{t.current=e}),t}function rte(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=y.useState(r);Cu(f,r)||p(r);let[m,h]=y.useState(null),[g,_]=y.useState(null),v=y.useCallback(e=>{e!==w.current&&(w.current=e,h(e))},[]),x=y.useCallback(e=>{e!==T.current&&(T.current=e,_(e))},[]),S=a||m,C=o||g,w=y.useRef(null),T=y.useRef(null),E=y.useRef(u),D=c!=null,O=Eu(c),k=Eu(i),A=Eu(l),j=y.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:t,strategy:n,middleware:f};k.current&&(e.platform=k.current),Su(w.current,T.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!Cu(E.current,t)&&(E.current=t,b.flushSync(()=>{d(t)}))})},[f,t,n,k,A]);Du(()=>{l===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let M=y.useRef(!1);Du(()=>(M.current=!0,()=>{M.current=!1}),[]),Du(()=>{if(S&&(w.current=S),C&&(T.current=C),S&&C){if(O.current)return O.current(S,C,j);j()}},[S,C,j,O,D]);let N=y.useMemo(()=>({reference:w,floating:T,setReference:v,setFloating:x}),[v,x]),P=y.useMemo(()=>({reference:S,floating:C}),[S,C]),F=y.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=Tu(P.floating,u.x),r=Tu(P.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...wu(P.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,P.floating,u.x,u.y]);return y.useMemo(()=>({...u,update:j,refs:N,elements:P,floatingStyles:F}),[u,j,N,P,F])}var Du,Ou,ku,Au,ju,Mu,Nu,Pu=m((()=>{nte(),Du=typeof document<`u`?y.useLayoutEffect:function(){},Ou=(e,t)=>{let n=gu(e);return{name:n.name,fn:n.fn,options:[e,t]}},ku=(e,t)=>{let n=_u(e);return{name:n.name,fn:n.fn,options:[e,t]}},Au=(e,t)=>({fn:xu(e).fn,options:[e,t]}),ju=(e,t)=>{let n=vu(e);return{name:n.name,fn:n.fn,options:[e,t]}},Mu=(e,t)=>{let n=yu(e);return{name:n.name,fn:n.fn,options:[e,t]}},Nu=(e,t)=>{let n=bu(e);return{name:n.name,fn:n.fn,options:[e,t]}}})),Z,ite=m((()=>{G(),Z=(e,t,n,r,i,a,...o)=>{if(o.length>0)throw Error(process.env.NODE_ENV===`production`?W(1):`Unsupported number of selectors`);let s;if(e&&t&&n&&r&&i&&a)s=(o,s,c,l)=>a(e(o,s,c,l),t(o,s,c,l),n(o,s,c,l),r(o,s,c,l),i(o,s,c,l),s,c,l);else if(e&&t&&n&&r&&i)s=(a,o,s,c)=>i(e(a,o,s,c),t(a,o,s,c),n(a,o,s,c),r(a,o,s,c),o,s,c);else if(e&&t&&n&&r)s=(i,a,o,s)=>r(e(i,a,o,s),t(i,a,o,s),n(i,a,o,s),a,o,s);else if(e&&t&&n)s=(r,i,a,o)=>n(e(r,i,a,o),t(r,i,a,o),i,a,o);else if(e&&t)s=(n,r,i,a)=>t(e(n,r,i,a),r,i,a);else if(e)s=e;else throw Error(`Missing arguments`);return s}}));function ate(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function ote(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}function ste(e){let t=Array.isArray(e[0])?e[0]:e;return ote(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function Fu(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function cte(e){let t;return{get(n){return t&&e(t.key,n)?t.value:Vu},put(e,n){t={key:e,value:n}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function lte(e,t){let n=[];function r(e){let r=n.findIndex(n=>t(e,n.key));if(r>-1){let e=n[r];return r>0&&(n.splice(r,1),n.unshift(e)),e.value}return Vu}function i(t,i){r(t)===Vu&&(n.unshift({key:t,value:i}),n.length>e&&n.pop())}function a(){return n}function o(){n=[]}return{get:r,put:i,getEntries:a,clear:o}}function ute(e){return function(t,n){if(t===null||n===null||t.length!==n.length)return!1;let{length:r}=t;for(let i=0;i<r;i++)if(!e(t[i],n[i]))return!1;return!0}}function dte(e,t){let{equalityCheck:n=Wu,maxSize:r=1,resultEqualityCheck:i}=typeof t==`object`?t:{equalityCheck:t},a=ute(n),o=0,s=r<=1?cte(a):lte(r,a);function c(){let t=s.get(arguments);if(t===Vu){if(t=e.apply(null,arguments),o++,i){let e=s.getEntries().find(e=>i(e.value,t));e&&(t=e.value,o!==0&&o--)}s.put(arguments,t)}return t}return c.clearCache=()=>{s.clear(),c.resetResultsCount()},c.resultsCount=()=>o,c.resetResultsCount=()=>{o=0},c}function Iu(){return{s:Ju,v:void 0,o:null,p:null}}function fte(e){return e instanceof qu?e.deref():e}function pte(e,t={}){let n=Iu(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e<n;e++){let n=arguments[e];if(typeof n==`function`||typeof n==`object`&&n){let e=t.o;e===null&&(t.o=e=new WeakMap);let r=e.get(n);r===void 0?(t=Iu(),e.set(n,t)):t=r}else{let e=t.p;e===null&&(t.p=e=new Map);let r=e.get(n);r===void 0?(t=Iu(),e.set(n,t)):t=r}}let s=t,c;if(t.s===Yu)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=fte(i);e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new qu(c):c}return s.s=Yu,s.v=c,c}return o.clearCache=()=>{n=Iu(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function Lu(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),ate(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let s={...n,...a},{memoize:c,memoizeOptions:l=[],argsMemoize:u=pte,argsMemoizeOptions:d=[]}=s,f=Hu(l),p=Hu(d),m=ste(e),h=c(function(){return t++,o.apply(null,arguments)},...f),g=!0,_=u(function(){r++;let e=Fu(m,arguments);if(i=h.apply(null,e),process.env.NODE_ENV!==`production`){let{devModeChecks:t={}}=s,{identityFunctionCheck:n,inputStabilityCheck:r}=Uu(g,t);if(n.shouldRun&&n.run(o,e,i),r.shouldRun){let t=Fu(m,arguments);r.run({inputSelectorResults:e,inputSelectorResultsCopy:t},{memoize:c,memoizeOptions:f},arguments)}g&&=!1}return i},...p);return Object.assign(_,{resultFunc:o,memoizedResultFunc:h,dependencies:m,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:c,argsMemoize:u})};return Object.assign(r,{withTypes:()=>r}),r}var Ru,zu,Bu,Vu,Hu,Uu,Wu,Gu,Ku,qu,Ju,Yu,Xu=m((()=>{Ru=(e,t,n)=>{if(t.length===1&&t[0]===n){let t=!1;try{let n={};e(n)===n&&(t=!0)}catch{}if(t){let e;try{throw Error()}catch(t){({stack:e}=t)}console.warn(`The result function returned its own inputs without modification. e.g
5
5
  \`createSelector([state => state.todos], todos => todos)\`
6
6
  This could lead to inefficient memoization and unnecessary re-renders.
7
- Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:e})}}},Xd=(e,t,n)=>{let{memoize:r,memoizeOptions:i}=t,{inputSelectorResults:a,inputSelectorResultsCopy:o}=e,s=r(()=>({}),...i);if(s.apply(null,a)!==s.apply(null,o)){let e;try{throw Error()}catch(t){({stack:e}=t)}console.warn(`An input selector returned a different result when passed same arguments.
7
+ Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:e})}}},zu=(e,t,n)=>{let{memoize:r,memoizeOptions:i}=t,{inputSelectorResults:a,inputSelectorResultsCopy:o}=e,s=r(()=>({}),...i);if(s.apply(null,a)!==s.apply(null,o)){let e;try{throw Error()}catch(t){({stack:e}=t)}console.warn(`An input selector returned a different result when passed same arguments.
8
8
  This means your output selector will likely run more frequently than intended.
9
9
  Avoid returning a new reference inside your input selector, e.g.
10
- \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:a,secondInputs:o,stack:e})}},Zd={inputStabilityCheck:`once`,identityFunctionCheck:`once`},Qd=Symbol(`NOT_FOUND`),$d=e=>Array.isArray(e)?e:[e],ef=(e,t)=>{let{identityFunctionCheck:n,inputStabilityCheck:r}={...Zd,...t};return{identityFunctionCheck:{shouldRun:n===`always`||n===`once`&&e,run:Yd},inputStabilityCheck:{shouldRun:r===`always`||r===`once`&&e,run:Xd}}},tf=(e,t)=>e===t,nf=class{constructor(e){this.value=e}deref(){return this.value}},rf=()=>typeof WeakRef>`u`?nf:WeakRef,af=rf(),of=0,sf=1})),lf,uf,df=p((()=>{K(),cf(),lf=Jd({memoize:Wd,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),uf=(...e)=>{let t=new WeakMap,n=1,r=e[e.length-1],i=e.length-1||1,a=r.length-i;if(a>3)throw Error(process.env.NODE_ENV===`production`?G(2):`Unsupported number of arguments`);return(i,o,s,c)=>{let l=i.__cacheKey__;l||(l={id:n},i.__cacheKey__=l,n+=1);let u=t.get(l);if(!u){let n=e,i=[void 0,void 0,void 0];switch(a){case 0:break;case 1:n=[...e.slice(0,-1),()=>i[0],r];break;case 2:n=[...e.slice(0,-1),()=>i[0],()=>i[1],r];break;case 3:n=[...e.slice(0,-1),()=>i[0],()=>i[1],()=>i[2],r];break;default:throw Error(process.env.NODE_ENV===`production`?G(2):`Unsupported number of arguments`)}u=lf(...n),u.selectorArgs=i,t.set(l,u)}switch(u.selectorArgs[0]=o,u.selectorArgs[1]=s,u.selectorArgs[2]=c,a){case 0:return u(i);case 1:return u(i,o);case 2:return u(i,o,s);case 3:return u(i,o,s,c);default:throw Error(`unreachable`)}}}}));function ff(){return vf}function pf(e){_f.push(e)}function mf(e){let t=(t,n)=>{let r=T(gf).current,i;try{vf=r;for(let e of _f)e.before(r);i=e(t,n);for(let e of _f)e.after(r);r.didInitialize=!0}finally{vf=void 0}return i};return t.displayName=e.displayName||e.name,t}function hf(e){return t.forwardRef(mf(e))}function gf(){return{didInitialize:!1}}var _f,vf,yf=p((()=>{D(),_f=[],vf=void 0}));function $(e,t,n,r,i){return Cf(e,t,n,r,i)}function bf(e,n,r,a,o){let s=t.useCallback(()=>n(e.getSnapshot(),r,a,o),[e,n,r,a,o]);return(0,i.useSyncExternalStore)(e.subscribe,s,s)}function xf(e,t,n,r,i){let a=ff();if(!a)return bf(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.didChange=!0)):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},a.syncHooks.push(s)),s.value}function Sf(e,t,n,r,i){return(0,a.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var Cf,wf=p((()=>{ye(),yf(),Cf=_e(19)?xf:Sf,pf({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){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,i))&&(t=!0,r.value=i,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,i.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}})})),Tf,Ef=p((()=>{wf(),Tf=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return $(this,e,t,n,r)}}})),Df,Of=p((()=>{Ef(),wf(),N(),I(),De(),Df=class extends Tf{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,n){t.useDebugValue(e),F(()=>{this.state[e]!==n&&this.set(e,n)},[e,n])}useSyncedValueWithCleanup(e,t){let n=this;F(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let n=this;if(process.env.NODE_ENV!==`production`){t.useDebugValue(e,e=>Object.keys(e));let n=t.useRef(Object.keys(e)).current,r=Object.keys(e);(n.length!==r.length||n.some((e,t)=>e!==r[t]))&&console.error(`ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.`)}F(()=>{n.update(e)},[n,...Object.values(e)])}useControlledProp(e,n){t.useDebugValue(e);let r=n!==void 0;if(F(()=>{r&&!Object.is(this.state[e],n)&&super.setState({...this.state,[e]:n})},[e,n,r]),process.env.NODE_ENV!==`production`){let t=this.controlledValues??=new Map;t.has(e)||t.set(e,r);let n=t.get(e);n!==void 0&&n!==r&&console.error(`A component is changing the ${r?``:`un`}controlled state of ${e.toString()} to be ${r?`un`:``}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,n,r,i){return t.useDebugValue(e),$(this,this.selectors[e],n,r,i)}useContextCallback(e,n){t.useDebugValue(e);let r=O(n??we);this.context[e]=r}useStateSetter(e){let n=t.useRef(void 0);return n.current===void 0&&(n.current=t=>{this.set(e,t)}),n.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}}}));function kf(){let[,e]=t.useState({});return t.useCallback(()=>{e({})},[])}var Af=p((()=>{})),jf=p((()=>{})),Mf=p((()=>{Id(),df(),wf(),Ef(),Of(),jf()})),Nf,Pf,Ff=p((()=>{Mf(),Kl(),Ra(),Nf={open:Q(e=>e.open),transitionStatus:Q(e=>e.transitionStatus),domReferenceElement:Q(e=>e.domReferenceElement),referenceElement:Q(e=>e.positionReference??e.referenceElement),floatingElement:Q(e=>e.floatingElement),floatingId:Q(e=>e.floatingId)},Pf=class extends Df{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:Gl(),nested:n,triggerElements:i},Nf),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&bi(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}}}));function If(e,n){let r=t.useRef(null),i=t.useRef(null);return t.useCallback(t=>{if(e!==void 0){if(r.current!==null){let e=r.current,t=i.current,a=n.context.triggerElements.getById(e);t&&a===t&&n.context.triggerElements.delete(e),r.current=null,i.current=null}t!==null&&(r.current=e,i.current=t,n.context.triggerElements.add(e,t))}},[n,e])}function Lf(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=If(e,n),o=O(t=>{if(a(t),!t||!n.select(`open`))return;let i=n.select(`activeTriggerId`);if(i===e){n.update({activeTriggerElement:t,...r});return}i??n.update({activeTriggerId:e,activeTriggerElement:t,...r})});return F(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:o,isMountedByThisTrigger:i}}function Rf(e){let t=e.useState(`open`);F(()=>{if(t&&!e.select(`activeTriggerId`)&&e.context.triggerElements.size===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[n,r]=t.value;e.update({activeTriggerId:n,activeTriggerElement:r})}}},[t,e])}function zf(e,t,n){let{mounted:r,setMounted:i,transitionStatus:a}=_n(e);t.useSyncedValues({mounted:r,transitionStatus:a});let o=O(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return vo({enabled:!t.useState(`preventUnmountingOnClose`),open:e,ref:t.context.popupRef,onComplete(){e||o()}}),{forceUnmount:o,transitionStatus:a}}var Bf=p((()=>{N(),I(),vn(),yo()})),Vf,Hf=p((()=>{Vf=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);if(n!==t&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t),process.env.NODE_ENV!==`production`&&this.elementsSet.size!==this.idMap.size))throw Error(`Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.`)}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}}));function Uf(){return new Pf({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new Vf,floatingId:``,syncOnly:!1,nested:!1,onOpenChange:void 0})}var Wf=p((()=>{Yf(),Ff()}));function Gf(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:Uf(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Ee,inactiveTriggerProps:Ee,popupProps:Ee}}var Kf,qf,Jf=p((()=>{Mf(),De(),Wf(),Kf=Q(e=>e.triggerIdProp??e.activeTriggerId),qf={open:Q(e=>e.openProp??e.open),mounted:Q(e=>e.mounted),transitionStatus:Q(e=>e.transitionStatus),floatingRootContext:Q(e=>e.floatingRootContext),preventUnmountingOnClose:Q(e=>e.preventUnmountingOnClose),payload:Q(e=>e.payload),activeTriggerId:Kf,activeTriggerElement:Q(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:Q((e,t)=>t!==void 0&&Kf(e)===t),isOpenedByTrigger:Q((e,t)=>t!==void 0&&Kf(e)===t&&e.open),isMountedByTrigger:Q((e,t)=>t!==void 0&&Kf(e)===t&&e.mounted),triggerProps:Q((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:Q(e=>e.popupProps),popupElement:Q(e=>e.popupElement),positionerElement:Q(e=>e.positionerElement)}})),Yf=p((()=>{Bf(),Hf(),Jf()}));function Xf(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Gt(),a=eu()!=null;if(process.env.NODE_ENV!==`production`){let e=r.reference;e&&!er(e)&&console.error("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `context.setPositionReference()`",`instead.`)}let o=T(()=>new Pf({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Vf,floatingId:i,syncOnly:!1,nested:a})).current;return F(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=er(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}var Zf=p((()=>{br(),Jt(),D(),I(),nu(),Ff(),Yf()}));function Qf(e={}){let{nodeId:n,externalTree:r}=e,i=Xf(e),a=e.rootContext||i,o={reference:a.useState(`referenceElement`),floating:a.useState(`floatingElement`),domReference:a.useState(`domReferenceElement`)},[s,c]=t.useState(null),l=t.useRef(null),u=tu(r);F(()=>{o.domReference&&(l.current=o.domReference)},[o.domReference]);let d=Dd({...e,elements:{...o,...s&&{reference:s}}}),f=t.useCallback(e=>{let t=er(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;c(t),d.refs.setReference(t)},[d.refs]),[p,m]=t.useState(void 0),[h,g]=t.useState(null);a.useSyncedValue(`referenceElement`,p??null);let _=er(p)?p:null;a.useSyncedValue(`domReferenceElement`,p===void 0?o.domReference:_),a.useSyncedValue(`floatingElement`,h);let v=t.useCallback(e=>{(er(e)||e===null)&&(l.current=e,m(e)),(er(d.refs.reference.current)||d.refs.reference.current===null||e!==null&&!er(e))&&d.refs.setReference(e)},[d.refs,m]),y=t.useCallback(e=>{g(e),d.refs.setFloating(e)},[d.refs]),b=t.useMemo(()=>({...d.refs,setReference:v,setFloating:y,setPositionReference:f,domReference:l}),[d.refs,v,y,f]),x=t.useMemo(()=>({...d.elements,domReference:o.domReference}),[d.elements,o.domReference]),S=a.useState(`open`),C=a.useState(`floatingId`),w=t.useMemo(()=>({...d,dataRef:a.context.dataRef,open:S,onOpenChange:a.setOpen,events:a.context.events,floatingId:C,refs:b,elements:x,nodeId:n,rootStore:a}),[d,b,x,n,a,S,C]);return F(()=>{a.context.dataRef.current.floatingContext=w;let e=u?.nodesRef.current.find(e=>e.id===n);e&&(e.context=w)}),t.useMemo(()=>({...d,context:w,refs:b,elements:x,rootStore:a}),[d,b,x,w,a])}var $f=p((()=>{Fd(),br(),I(),nu(),Zf()}));function ep(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,onOpenChange:r}=e,i=Gt(),a=eu()!=null,o=t.useState(`open`),s=t.useState(`activeTriggerElement`),c=t.useState(n?`popupElement`:`positionerElement`),l=t.context.triggerElements,u=T(()=>new Pf({open:o,transitionStatus:void 0,referenceElement:s,floatingElement:c,triggerElements:l,onOpenChange:r,floatingId:i,syncOnly:!0,nested:a})).current;return F(()=>{let e={open:o,floatingId:i,referenceElement:s,floatingElement:c};er(s)&&(e.domReferenceElement=s),u.state.positionReference===u.state.referenceElement&&(e.positionReference=s),u.update(e)},[o,i,s,c,u]),u.context.onOpenChange=r,u.context.nested=a,u}var tp=p((()=>{Jt(),D(),I(),br(),nu(),Ff()}));function np(e,n={}){let r=`rootStore`in e?e.rootStore:e,{events:i,dataRef:a}=r.context,{enabled:o=!0,delay:s}=n,c=t.useRef(!1),l=t.useRef(null),u=Ac(),d=t.useRef(!0);t.useEffect(()=>{let e=r.select(`domReferenceElement`);if(!o)return;let t=Zn(e);function n(){let e=r.select(`domReferenceElement`);!r.select(`open`)&&tr(e)&&e===$r(ua(e))&&(c.current=!0)}function i(){d.current=!0}function a(){d.current=!1}return el(lo(t,`blur`,n),rp&&lo(t,`keydown`,i,!0),rp&&lo(t,`pointerdown`,a,!0))},[r,o]),t.useEffect(()=>{if(!o)return;function e(e){if(e.reason===`trigger-press`||e.reason===`escape-key`){let e=r.select(`domReferenceElement`);er(e)&&(l.current=e,c.current=!0)}}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[i,o,r]);let f=t.useMemo(()=>({onMouseLeave(){c.current=!1,l.current=null},onFocus(e){let t=e.currentTarget;if(c.current){if(l.current===t)return;c.current=!1,l.current=null}let n=ti(e.nativeEvent);if(er(n)){if(rp&&!e.relatedTarget){if(!d.current&&!oi(n))return}else if(!li(n))return}let i=ri(e.relatedTarget,r.context.triggerElements),{nativeEvent:a,currentTarget:o}=e,f=typeof s==`function`?s():s;if(r.select(`open`)&&i||f===0||f===void 0){r.setOpen(!0,Y(ct,a,o));return}u.start(f,()=>{c.current||r.setOpen(!0,Y(ct,a,o))})},onBlur(e){c.current=!1,l.current=null;let t=e.relatedTarget,n=e.nativeEvent,i=er(t)&&t.hasAttribute(dl(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;u.start(0,()=>{let e=r.select(`domReferenceElement`),o=$r(ua(e));!t&&o===e||ei(a.current.floatingContext?.refs.floating.current,o)||ei(e,o)||i||ri(t??o,r.context.triggerElements)||r.setOpen(!1,Y(ct,n))})}}),[a,r,u,s]);return t.useMemo(()=>o?{reference:f,trigger:f}:{},[o,f])}var rp,ip=p((()=>{br(),uo(),tl(),Gr(),Nc(),da(),di(),Rt(),It(),fl(),rp=Ur&&Vr}));function ap(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&lp.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),lp.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function op(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=lp.get(n);a&&a!==e&&ap(a),ap(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,lp.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function sp(e){let t=T(cp.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||=t,Zt(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}var cp,lp,up=p((()=>{$t(),D(),Nc(),Ra(),cp=class e{constructor(){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 Mc,this.restTimeout=new Mc,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},lp=new WeakMap}));function dp(e,n={}){let r=`rootStore`in e?e.rootStore:e,i=r.useState(`open`),a=r.useState(`floatingElement`),o=r.useState(`domReferenceElement`),{dataRef:s}=r.context,{enabled:c=!0,closeDelay:l=0,nodeId:u}=n,d=sp(r),f=tu(),p=eu(),m=O(()=>Jc(s.current.openEvent?.type,d.interactedInside)),h=O(()=>{let e=s.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`}),g=O(e=>ri(e,r.context.triggerElements)),_=t.useCallback(e=>{let t=Kc(l,`close`,d.pointerType),n=()=>{r.setOpen(!1,Y(st,e)),f?.events.emit(`floating.closed`,e)};t?d.openChangeTimeout.start(t,n):(d.openChangeTimeout.clear(),n())},[l,r,d,f]),v=O(()=>{ap(d)}),y=O(e=>{let t=ti(e);if(!si(t)){d.interactedInside=!1;return}d.interactedInside=t?.closest(`[aria-haspopup]`)!=null});F(()=>{i||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,v())},[i,d,v]),t.useEffect(()=>v,[v]),F(()=>{if(c&&i&&d.handleCloseOptions?.blockPointerEvents&&h()&&er(o)&&a){let e=o,t=a,n=ua(a),r=f?.nodesRef.current.find(e=>e.id===p)?.context?.elements.floating;return r&&(r.style.pointerEvents=``),op(d,{scopeElement:d.handleCloseOptions?.getScope?.()??d.pointerEventsScopeElement??r??e.closest(`[data-rootownerid]`)??n.body,referenceElement:e,floatingElement:t}),()=>{v()}}},[c,i,o,a,d,h,f,p,v]);let b=Ac();t.useEffect(()=>{if(!c)return;function e(){d.openChangeTimeout.clear(),b.clear(),f?.events.off(`floating.closed`,n),v()}function t(e){if(f&&p&&fi(f.nodesRef.current,p).length>0){f.events.on(`floating.closed`,n);return}if(g(e.relatedTarget))return;let t=s.current.floatingContext?.nodeId??u,r=e.relatedTarget;if(!(f&&t&&er(r)&&fi(f.nodesRef.current,t,!1).some(e=>ei(e.context?.elements.floating,r)))){if(d.handler){d.handler(e);return}v(),m()||_(e)}}function n(e){!f||!p||fi(f.nodesRef.current,p).length>0||b.start(0,()=>{f.events.off(`floating.closed`,n),r.setOpen(!1,Y(st,e)),f.events.emit(`floating.closed`,e)})}let i=a;return el(i&&lo(i,`mouseenter`,e),i&&lo(i,`mouseleave`,t),i&&lo(i,`pointerdown`,y,!0),()=>{f?.events.off(`floating.closed`,n)})},[c,a,r,s,u,m,g,_,v,y,d,f,p,b])}var fp=p((()=>{br(),uo(),tl(),N(),I(),Nc(),da(),di(),mi(),Rt(),It(),nu(),up(),Yc()}));function pp(e,n={}){let i=`rootStore`in e?e.rootStore:e,{dataRef:a,events:o}=i.context,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:f=!0,triggerElementRef:p=mp,externalTree:m,isActiveTrigger:h=!0,getHandleCloseContext:g,isClosing:_}=n,v=tu(m),y=sp(i),b=t.useRef(!1),x=nl(l),S=nl(c),C=nl(d),w=nl(s),T=nl(_);h&&(y.handleCloseOptions=x.current?.__options);let E=O(()=>Jc(a.current.openEvent?.type,y.interactedInside)),D=O(e=>ri(e,i.context.triggerElements)),k=O((e,t,n)=>{let r=i.context.triggerElements;if(r.hasElement(t))return!e||!ei(e,t);if(!er(n))return!1;let a=n;return r.hasMatchingElement(e=>ei(e,a))&&(!e||!ei(e,a))}),A=O((e,t=!0)=>{let n=Kc(S.current,`close`,y.pointerType);n?y.openChangeTimeout.start(n,()=>{i.setOpen(!1,Y(st,e)),v?.events.emit(`floating.closed`,e)}):t&&(y.openChangeTimeout.clear(),i.setOpen(!1,Y(st,e)),v?.events.emit(`floating.closed`,e))}),j=O(()=>{y.handler&&=(ua(i.select(`domReferenceElement`)).removeEventListener(`mousemove`,y.handler),void 0)}),M=O(()=>{ap(y)});return t.useEffect(()=>j,[j]),t.useEffect(()=>{if(!s)return;function e(e){e.open?b.current=!1:(b.current=e.reason===st,j(),y.openChangeTimeout.clear(),y.restTimeout.clear(),y.blockMouseMove=!0,y.restTimeoutPending=!1)}return o.on(`openchange`,e),()=>{o.off(`openchange`,e)}},[s,o,y,j]),t.useEffect(()=>{if(!s)return;let e=p.current??(h?i.select(`domReferenceElement`):null);if(!er(e))return;function t(e){if(y.openChangeTimeout.clear(),y.blockMouseMove=!1,u&&!yi(y.pointerType))return;let t=qc(C.current),n=Kc(S.current,`open`,y.pointerType),r=ti(e),a=e.currentTarget??null,o=i.select(`domReferenceElement`),s=a;if(er(r)&&!i.context.triggerElements.hasElement(r)){for(let e of i.context.triggerElements.elements())if(ei(e,r)){s=e;break}}er(a)&&er(o)&&!i.context.triggerElements.hasElement(a)&&ei(a,o)&&(s=o);let c=s==null?!1:k(o,s,r),l=i.select(`open`),d=T.current?.()??i.select(`transitionStatus`)===`ending`,f=!l&&d&&b.current,p=!c&&er(s)&&er(o)&&ei(o,s)&&f,m=t>0&&!n,h=c&&(l||f)||p,g=!l||c;if(h){i.setOpen(!0,Y(st,e,s));return}m||(n?y.openChangeTimeout.start(n,()=>{g&&i.setOpen(!0,Y(st,e,s))}):g&&i.setOpen(!0,Y(st,e,s)))}function n(e){if(E()){M();return}j();let t=ua(i.select(`domReferenceElement`));y.restTimeout.clear(),y.restTimeoutPending=!1;let n=a.current.floatingContext??g?.();if(!D(e.relatedTarget)){if(x.current&&n){i.select(`open`)||y.openChangeTimeout.clear();let r=p.current;y.handler=x.current({...n,tree:v,x:e.clientX,y:e.clientY,onClose(){M(),j(),w.current&&!E()&&r===i.select(`domReferenceElement`)&&A(e,!0)}}),t.addEventListener(`mousemove`,y.handler),y.handler(e);return}(y.pointerType!==`touch`||!ei(i.select(`floatingElement`),e.relatedTarget))&&A(e)}}return f?el(lo(e,`mousemove`,t,{once:!0}),lo(e,`mouseenter`,t),lo(e,`mouseleave`,n)):el(lo(e,`mouseenter`,t),lo(e,`mouseleave`,n))},[j,M,a,S,A,i,s,x,y,h,k,E,D,u,f,C,p,v,w,g,T]),t.useMemo(()=>{if(!s)return;function e(e){y.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,n=e.currentTarget,a=i.select(`domReferenceElement`),o=i.select(`open`),s=k(a,n,e.target);if(u&&!yi(y.pointerType))return;if(o&&s&&y.handleCloseOptions?.blockPointerEvents){let e=i.select(`floatingElement`);e&&op(y,{scopeElement:y.handleCloseOptions?.getScope?.()??n.ownerDocument.body,referenceElement:n,floatingElement:e})}let c=qc(C.current);if(o&&!s||c===0||!s&&y.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;y.restTimeout.clear();function l(){if(y.restTimeoutPending=!1,E())return;let e=i.select(`open`);!y.blockMouseMove&&(!e||s)&&i.setOpen(!0,Y(st,t,n))}y.pointerType===`touch`?r.flushSync(()=>{l()}):s&&o?l():(y.restTimeoutPending=!0,y.restTimeout.start(c,l))}}},[s,y,E,k,u,i,C])}var mp,hp=p((()=>{br(),uo(),tl(),il(),N(),da(),di(),xi(),Rt(),It(),nu(),up(),Yc(),mp={current:null}}));function gp(e=[]){let n=e.map(e=>e?.reference),r=e.map(e=>e?.floating),i=e.map(e=>e?.item),a=e.map(e=>e?.trigger),o=t.useCallback(t=>_p(t,e,`reference`),n),s=t.useCallback(t=>_p(t,e,`floating`),r),c=t.useCallback(t=>_p(t,e,`item`),i),l=t.useCallback(t=>_p(t,e,`trigger`),a);return t.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:c,getTriggerProps:l}),[o,s,c,l])}function _p(e,t,n){let r=new Map,i=n===`item`,a={};n===`floating`&&(a.tabIndex=-1,a[Kr]=``);for(let t in e)i&&e&&(t===`active`||t===`selected`)||(a[t]=e[t]);for(let o=0;o<t.length;o+=1){let s,c=t[o]?.[n];s=typeof c==`function`?e?c(e):null:c,s&&vp(a,s,i,r)}return vp(a,e,i,r),a}function vp(e,t,n,r){for(let i in t){let a=t[i];n&&(i===`active`||i===`selected`)||(i.startsWith(`on`)?(r.has(i)||r.set(i,[]),typeof a==`function`&&(r.get(i)?.push(a),e[i]=(...e)=>r.get(i)?.map(t=>t(...e)).find(e=>e!==void 0))):e[i]=a)}}var yp=p((()=>{Qr()}));function bp(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function xp(e,t){return bp(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function Sp(e,t,n){return bp(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function Cp(e,t,n){return bp(t,n?e===Jr:e===Yr,e===Zr)}function wp(e,t,n,r){return t===`both`||t===`horizontal`&&r&&r>1?e===Ep:bp(t,n?e===Yr:e===Jr,e===Xr)}function Tp(e,n){let r=`rootStore`in e?e.rootStore:e,i=r.useState(`open`),a=r.useState(`floatingElement`),o=r.useState(`domReferenceElement`),s=r.context.dataRef,{listRef:c,activeIndex:l,onNavigate:u=()=>{},enabled:d=!0,selectedIndex:f=null,allowEscape:p=!1,loopFocus:m=!1,nested:h=!1,rtl:g=!1,virtual:_=!1,focusItemOnOpen:v=`auto`,focusItemOnHover:y=!0,openOnArrowKeyDown:b=!0,disabledIndices:x=void 0,orientation:S=`vertical`,parentOrientation:C,cols:w=1,id:T,resetOnPointerLeave:E=!0,externalTree:D}=n;process.env.NODE_ENV!==`production`&&(p&&(m||console.warn("`useListNavigation` looping must be enabled to allow escaping."),_||console.warn("`useListNavigation` must be virtual to allow escaping.")),S===`vertical`&&w>1&&console.warn("In grid list navigation mode (`cols` > 1), the `orientation` should",`be either "horizontal" or "both".`));let k=nl(ui(a)),A=eu(),j=tu(D);F(()=>{s.current.orientation=S},[s,S]);let M=ci(o),N=t.useRef(v),P=t.useRef(f??-1),I=t.useRef(null),L=t.useRef(!0),R=O(e=>{u(P.current===-1?null:P.current,e)}),ee=t.useRef(R),z=t.useRef(!!a),B=t.useRef(i),V=t.useRef(!1),te=t.useRef(!1),ne=t.useRef(null),H=nl(x),re=nl(i),U=nl(f),W=nl(E),ie=O(()=>{function e(e){_?j?.events.emit(`virtualfocus`,e):ne.current=pl(e,{sync:V.current,preventScroll:!0})}let t=c.current[P.current],n=te.current;t&&e(t),(V.current?e=>e():requestAnimationFrame)(()=>{let r=c.current[P.current]||t;r&&(t||e(r),G&&(n||!L.current)&&r.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});F(()=>{d&&(i&&a?(P.current=f??-1,N.current&&f!=null&&(te.current=!0,R())):z.current&&(P.current=-1,ee.current()))},[d,i,a,f,R]),F(()=>{if(d){if(!i){V.current=!1;return}if(a)if(l==null){if(V.current=!1,U.current!=null)return;if(z.current&&(P.current=-1,ie()),(!B.current||!z.current)&&N.current&&(I.current!=null||N.current===!0&&I.current==null)){let e=0,t=()=>{c.current[0]==null?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e+=1):(P.current=I.current==null||Sp(I.current,S,g)||h?$i(c):ea(c),I.current=null,R())};t()}}else Qi(c.current,l)||(P.current=l,ie(),te.current=!1)}},[d,i,a,l,U,h,c,S,g,R,ie,H]),F(()=>{if(!d||a||!j||_||!z.current)return;let e=j.nodesRef.current,t=e.find(e=>e.id===A)?.context?.elements.floating,n=$r(ua(a)),r=e.some(e=>e.context&&ei(e.context.elements.floating,n));t&&!r&&L.current&&t.focus({preventScroll:!0})},[d,a,j,A,_]),F(()=>{ee.current=R,B.current=i,z.current=!!a}),F(()=>{i||(I.current=null,N.current=v)},[i,v]);let ae=l!=null,oe=O(e=>{if(!re.current)return;let t=c.current.indexOf(e.currentTarget);t!==-1&&(P.current!==t||l!==t)&&(P.current=t,R(e))}),G=t.useMemo(()=>({onFocus(e){V.current=!0,oe(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){V.current=!0,te.current=!1,y&&oe(e)},onPointerLeave(e){if(!re.current||!L.current||e.pointerType===`touch`)return;V.current=!0;let t=e.relatedTarget;if(!(!y||c.current.includes(t))&&W.current&&(ne.current?.(),ne.current=null,P.current=-1,R(e),!_)){let e=k.current,t=$r(ua(e));e&&ei(e,t)&&e.focus({preventScroll:!0})}}}),[oe,re,k,y,c,R,W,_]),K=t.useCallback(()=>C??j?.nodesRef.current.find(e=>e.id===A)?.context?.dataRef?.current.orientation,[A,j,C]),se=O(e=>{if(L.current=!1,V.current=!0,e.which===229||!re.current&&e.currentTarget===k.current)return;if(h&&wp(e.key,S,g,w)){xp(e.key,K())||hi(e),r.setOpen(!1,Y(Tt,e.nativeEvent)),tr(o)&&(_?j?.events.emit(`virtualfocus`,o):o.focus());return}let t=P.current,n=$i(c,x),a=ea(c,x);if(M||(e.key===`Home`&&(hi(e),P.current=n,R(e)),e.key===`End`&&(hi(e),P.current=a,R(e))),w>1){let t=Array.from({length:c.current.length},()=>({width:1,height:1})),r=ra(t,w,!1),i=r.findIndex(e=>e!=null&&!oa(c.current,e,x)),o=r.reduce((e,t,n)=>t!=null&&!oa(c.current,t,x)?n:e,-1),s=r[na(r.map(e=>e==null?null:c.current[e]),{event:e,orientation:S,loopFocus:m,rtl:g,cols:w,disabledIndices:aa([...(typeof x==`function`?null:x)||c.current.map((e,t)=>oa(c.current,t,x)?t:void 0),void 0],r),minIndex:i,maxIndex:o,prevIndex:ia(P.current>a?n:P.current,t,r,w,e.key===`ArrowDown`?`bl`:e.key===(g?`ArrowLeft`:`ArrowRight`)?`tr`:`tl`),stopEvent:!0})];if(s!=null&&(P.current=s,R(e)),S===`both`)return}if(xp(e.key,S)){if(hi(e),i&&!_&&$r(e.currentTarget.ownerDocument)===e.currentTarget){P.current=Sp(e.key,S,g)?n:a,R(e);return}Sp(e.key,S,g)?m?t>=a?p&&t!==c.current.length?P.current=-1:(V.current=!1,P.current=n):P.current=ta(c.current,{startingIndex:t,disabledIndices:x}):P.current=Math.min(a,ta(c.current,{startingIndex:t,disabledIndices:x})):m?t<=n?p&&t!==-1?P.current=c.current.length:(V.current=!1,P.current=a):P.current=ta(c.current,{startingIndex:t,decrement:!0,disabledIndices:x}):P.current=Math.max(n,ta(c.current,{startingIndex:t,decrement:!0,disabledIndices:x})),Qi(c.current,P.current)&&(P.current=-1),R(e)}}),ce=t.useMemo(()=>_&&i&&ae&&{"aria-activedescendant":`${T}-${l}`},[_,i,ae,T,l]),le=t.useMemo(()=>({"aria-orientation":S===`both`?void 0:S,...M?{}:ce,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&i&&!_){let t=ti(e.nativeEvent);if(t&&!ei(k.current,t))return;hi(e),r.setOpen(!1,Y(St,e.nativeEvent)),tr(o)&&o.focus();return}se(e)},onPointerMove(){L.current=!0}}),[ce,se,k,S,M,r,i,_,o]),ue=t.useMemo(()=>{function e(e){v===`auto`&&_i(e.nativeEvent)&&(N.current=!_)}function t(e){N.current=v,v===`auto`&&vi(e.nativeEvent)&&(N.current=!0)}return{onKeyDown(e){let t=r.select(`open`);L.current=!1;let n=e.key.startsWith(`Arrow`),i=Cp(e.key,K(),g),a=xp(e.key,S),o=(h?i:a)||e.key===`Enter`||e.key.trim()===``;if(_&&t)return se(e);if(!(!t&&!b&&n)){if(o){let t=xp(e.key,K());I.current=h&&t?null:e.key}if(h){i&&(hi(e),t?(P.current=$i(c,H.current),R(e)):r.setOpen(!0,Y(Tt,e.nativeEvent,e.currentTarget)));return}a&&(U.current!=null&&(P.current=U.current),hi(e),!t&&b?r.setOpen(!0,Y(Tt,e.nativeEvent,e.currentTarget)):se(e),t&&R(e))}},onFocus(e){r.select(`open`)&&!_&&(P.current=-1,R(e))},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[se,H,v,c,h,R,r,b,S,K,g,U,_]),de=t.useMemo(()=>({...ce,...ue}),[ce,ue]);return t.useMemo(()=>d?{reference:de,floating:le,item:G,trigger:ue}:{},[d,de,le,ue,G])}var Ep,Dp=p((()=>{br(),il(),N(),I(),da(),di(),xi(),la(),nu(),Rt(),It(),hl(),Qr(),Ep=`Escape`}));function Op(e,n={}){let r=`rootStore`in e?e.rootStore:e,i=r.useState(`open`),a=r.useState(`floatingId`),o=r.useState(`domReferenceElement`),s=r.useState(`floatingElement`),{role:c=`dialog`}=n,l=Gt(),u=o?.id||l,d=t.useMemo(()=>ui(s)?.id||a,[s,a]),f=kp.get(c)??c,p=eu()!=null,m=t.useMemo(()=>f===`tooltip`||c===`label`?Ee:{"aria-haspopup":f===`alertdialog`?`dialog`:f,"aria-expanded":`false`,...f===`listbox`&&{role:`combobox`},...f===`menu`&&p&&{role:`menuitem`},...c===`select`&&{"aria-autocomplete":`none`},...c===`combobox`&&{"aria-autocomplete":`list`}},[f,p,c]),h=t.useMemo(()=>f===`tooltip`||c===`label`?{[`aria-${c===`label`?`labelledby`:`describedby`}`]:i?d:void 0}:{...m,"aria-expanded":i?`true`:`false`,"aria-controls":i?d:void 0,...f===`menu`&&{id:u}},[f,d,i,u,c,m]),g=t.useMemo(()=>{let e={id:d,...f&&{role:f}};return f===`tooltip`||c===`label`?e:{...e,...f===`menu`&&{"aria-labelledby":u}}},[f,d,u,c]),_=t.useCallback(({active:e,selected:t})=>{let n={role:`option`,...e&&{id:`${d}-fui-option`}};switch(c){case`select`:case`combobox`:return{...n,"aria-selected":t};default:}return{}},[d,c]);return t.useMemo(()=>({reference:h,floating:g,item:_,trigger:m}),[h,g,m,_])}var kp,Ap=p((()=>{Jt(),De(),di(),nu(),kp=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]])}));function jp(e,n){let r=`rootStore`in e?e.rootStore:e,i=r.context.dataRef,a=r.useState(`open`),{listRef:o,elementsRef:s,activeIndex:c,onMatch:l,onTypingChange:u,enabled:d=!0,resetMs:f=750,selectedIndex:p=null}=n,m=Ac(),h=t.useRef(``),g=t.useRef(p??c??-1),_=t.useRef(null);F(()=>{!a&&p!==null||(m.clear(),_.current=null,h.current!==``&&(h.current=``))},[a,p,m]),F(()=>{a&&h.current===``&&(g.current=p??c??-1)},[a,p,c]);let v=O(e=>{e?i.current.typing||(i.current.typing=e,u?.(e)):i.current.typing&&(i.current.typing=e,u?.(e))}),y=O(e=>{function t(e){let t=s?.current[e];return!t||ca(t)}function n(e,n,r=0){if(e.length===0)return-1;let i=(r%e.length+e.length)%e.length,a=n.toLocaleLowerCase();for(let n=0;n<e.length;n+=1){let r=(i+n)%e.length;if(!(!e[r]?.toLocaleLowerCase().startsWith(a)||!t(r)))return r}return-1}let r=o.current;if(h.current.length>0&&e.key===` `&&(hi(e),v(!0)),h.current.length>0&&h.current[0]!==` `&&n(r,h.current)===-1&&e.key!==` `&&v(!1),r==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;a&&e.key!==` `&&(hi(e),v(!0));let i=h.current===``;i&&(g.current=p??c??-1),r.every(e=>e?e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase():!0)&&h.current===e.key&&(h.current=``,g.current=_.current),h.current+=e.key,m.start(f,()=>{h.current=``,g.current=_.current,v(!1)});let u=((i?p??c??-1:g.current)??0)+1,d=n(r,h.current,u);d===-1?e.key!==` `&&(h.current=``,v(!1)):(l?.(d),_.current=d)}),b=O(e=>{let t=e.relatedTarget,n=r.select(`domReferenceElement`),i=r.select(`floatingElement`),a=ei(n,t),o=ei(i,t);a||o||(m.clear(),h.current=``,g.current=_.current,v(!1))}),x=t.useMemo(()=>({onKeyDown:y,onBlur:b}),[y,b]),S=t.useMemo(()=>({onKeyDown:y,onBlur:b}),[y,b]);return t.useMemo(()=>d?{reference:x,floating:S}:{},[d,x,S])}var Mp=p((()=>{N(),I(),Nc(),di(),xi(),la()}));function Np(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function Pp(e,t,n,r,i,a,o,s,c,l){let u=!1;return Np(e,t,n,r,i,a)&&(u=!u),Np(e,t,i,a,o,s)&&(u=!u),Np(e,t,o,s,c,l)&&(u=!u),Np(e,t,c,l,n,r)&&(u=!u),u}function Fp(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Ip(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function Lp(e={}){let{blockPointerEvents:t=!1}=e,n=new Mc,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*zp;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=ti(r),g=r.type===`mouseleave`,_=ei(u,h),v=ei(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&er(r.relatedTarget)&&ei(u,r.relatedTarget))return;function y(){return!!(s&&fi(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=Ip(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=Ip(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=Ip(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=Ip(d,f,x.right-1,A,S.left+1,k);break;default:}if(j)return;if(l&&!Fp(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?Bp/2:Bp*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+Bp+1,o=C||T?S.bottom-Bp:S.top,s=C?T?S.bottom-Bp:S.top:S.bottom-Bp;M=Pp(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?Bp/2:Bp*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-Bp,o=C||T?S.top+Bp:S.bottom,s=C?T?S.top+Bp:S.bottom:S.top+Bp;M=Pp(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?Bp/2:Bp*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+Bp+1,o=w||E?S.right-Bp:S.left,s=w?E?S.right-Bp:S.left:S.right-Bp;M=Pp(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?Bp/2:Bp*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-Bp,o=w||E?S.left+Bp:S.right,s=w?E?S.left+Bp:S.right:S.left+Bp;M=Pp(d,f,a,r,a,i,o,S.top,s,S.bottom);break}default:}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}var Rp,zp,Bp,Vp=p((()=>{br(),Nc(),di(),mi(),Rp=.1,zp=Rp*Rp,Bp=.5})),Hp=p((()=>{$c(),fu(),Wl(),nu(),Jl(),mu(),vu(),Cu(),$f(),Zf(),tp(),ip(),fp(),hp(),br(),uo(),tl(),Nc(),il(),N(),I(),da(),Ra(),Rt(),It(),Yc(),yp(),Dp(),Ap(),Mp(),Vp(),Fd()}));function Up(e){let n=t.useRef(``),r=t.useCallback(t=>{t.defaultPrevented||(n.current=t.pointerType,e(t,t.pointerType))},[e]);return{onClick:t.useCallback(t=>{if(t.detail===0){e(t,`keyboard`);return}`pointerType`in t?e(t,t.pointerType):e(t,n.current),n.current=``},[e]),onPointerDown:r}}var Wp=p((()=>{}));function Gp(e,n){let r=t.useRef(e),i=O(n);F(()=>{r.current!==e&&i(r.current)},[e,i]),F(()=>{r.current=e},[e])}var Kp=p((()=>{I(),N()}));function qp(e){let[n,r]=t.useState(null),i=O((t,n)=>{e||r(n||(zr?`touch`:``))});Gp(e,t=>{t&&!e&&r(null)});let{onClick:a,onPointerDown:o}=Up(i);return t.useMemo(()=>({openMethod:n,triggerProps:{onClick:a,onPointerDown:o}}),[n,a,o])}var Jp=p((()=>{N(),Wp(),Gr(),Kp()}));function Yp(e){let{store:n,parentContext:r,actionsRef:i,isDrawer:a}=e,o=n.useState(`open`),s=n.useState(`disablePointerDismissal`),c=n.useState(`modal`),l=n.useState(`popupElement`),{openMethod:u,triggerProps:d}=qp(o);Rf(n);let{forceUnmount:f}=zf(o,n),p=t.useCallback(()=>{n.setOpen(!1,Y(Mt))},[n]);t.useImperativeHandle(i,()=>({unmount:f,close:p}),[f,p]);let m=ep({popupStore:n,onOpenChange:n.setOpen,treatPopupAsFloatingElement:!0}),[h,g]=t.useState(0),[_,v]=t.useState(0),y=h===0,b=Op(m),x=xu(m,{outsidePressEvent(){return n.context.internalBackdropRef.current||n.context.backdropRef.current?`intentional`:{mouse:c===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(e){if(!n.context.outsidePressEnabledRef.current||`button`in e&&e.button!==0||`touches`in e&&e.touches.length!==1)return!1;let t=ti(e);if(y&&!s){let e=t;return c&&(n.context.internalBackdropRef.current||n.context.backdropRef.current)?n.context.internalBackdropRef.current===e||n.context.backdropRef.current===e||ei(e,l)&&!e?.hasAttribute(`data-base-ui-portal`):!0}return!1},escapeKey:y});Rc(o&&c===!0,l);let{getReferenceProps:S,getFloatingProps:C,getTriggerProps:w}=gp([b,x]);n.useContextCallback(`onNestedDialogOpen`,(e,t)=>{g(e),v(t)}),n.useContextCallback(`onNestedDialogClose`,()=>{g(0),v(0)}),t.useEffect(()=>(r?.onNestedDialogOpen&&o&&r.onNestedDialogOpen(h+1,_+ +!!a),r?.onNestedDialogClose&&!o&&r.onNestedDialogClose(),()=>{r?.onNestedDialogClose&&o&&r.onNestedDialogClose()}),[a,o,h,_,r]);let T=t.useMemo(()=>S(d),[S,d]),E=t.useMemo(()=>w(d),[w,d]),D=t.useMemo(()=>C(),[C]);n.useSyncedValues({openMethod:u,activeTriggerProps:T,inactiveTriggerProps:E,popupProps:D,floatingRootContext:m,nestedOpenDialogCount:h,nestedOpenDrawerCount:_})}var Xp=p((()=>{Wc(),Hp(),Ra(),Jp(),Rt(),It(),Yf()}));function Zp(e){let n=t.useContext(Qp);if(e===!1&&n===void 0)throw Error(process.env.NODE_ENV===`production`?G(27):`Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.`);return n}var Qp,$p=p((()=>{K(),Qp=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Qp.displayName=`DialogRootContext`)}));function em(e={}){return{...Gf(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}var tm,nm,rm=p((()=>{Mf(),D(),Yf(),tm={...qf,modal:Q(e=>e.modal),nested:Q(e=>e.nested),nestedOpenDialogCount:Q(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:Q(e=>e.nestedOpenDrawerCount),disablePointerDismissal:Q(e=>e.disablePointerDismissal),openMethod:Q(e=>e.openMethod),descriptionElementId:Q(e=>e.descriptionElementId),titleElementId:Q(e=>e.titleElementId),viewportElement:Q(e=>e.viewportElement),role:Q(e=>e.role)},nm=class e extends Df{constructor(e){super(em(e),{popupRef:t.createRef(),backdropRef:t.createRef(),internalBackdropRef:t.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new Vf,onOpenChange:void 0,onOpenChangeComplete:void 0},tm)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let n={open:e},r=t.trigger?.id??null;(r||e)&&(n.activeTriggerId=r,n.activeTriggerElement=t.trigger??null),this.update(n)};static useStore(t,n){let r=T(()=>new e(n)).current;return t??r}}}));function im(e){let{children:r,open:i,defaultOpen:a=!1,onOpenChange:o,onOpenChangeComplete:s,disablePointerDismissal:c=!1,modal:l=!0,actionsRef:u,handle:d,triggerId:f,defaultTriggerId:p=null}=e,m=Zp(!0),h=t.useContext(am),g=!!m,_=nm.useStore(d?.store,{open:a,openProp:i,activeTriggerId:p,triggerIdProp:f,modal:l,disablePointerDismissal:c,nested:g});Oc(()=>{i===void 0&&_.state.open===!1&&a===!0&&_.update({open:!0,activeTriggerId:p})}),_.useControlledProp(`openProp`,i),_.useControlledProp(`triggerIdProp`,f),_.useSyncedValues({disablePointerDismissal:c,nested:g,modal:l}),_.useContextCallback(`onOpenChange`,o),_.useContextCallback(`onOpenChangeComplete`,s);let v=_.useState(`payload`);Yp({store:_,actionsRef:u,parentContext:m?.store.context,isDrawer:h,onOpenChange:o,triggerIdProp:f});let y=t.useMemo(()=>({store:_}),[_]);return(0,n.jsx)(am.Provider,{value:!1,children:(0,n.jsx)(Qp.Provider,{value:y,children:typeof r==`function`?r({payload:v}):r})})}var am,om=p((()=>{kc(),Xp(),$p(),rm(),am=t.createContext(!1),process.env.NODE_ENV!==`production`&&(am.displayName=`IsDrawerContext`)}));function sm(e){let{children:r,open:i,defaultOpen:a=!1,onOpenChange:o,onOpenChangeComplete:s,actionsRef:c,handle:l,triggerId:u,defaultTriggerId:d=null}=e,f=Zp(!0),p=!!f,m=nm.useStore(l?.store,{open:a,openProp:i,activeTriggerId:d,triggerIdProp:u,modal:!0,disablePointerDismissal:!0,nested:p,role:`alertdialog`});m.useControlledProp(`openProp`,i),m.useControlledProp(`triggerIdProp`,u),m.useSyncedValue(`nested`,p),m.useContextCallback(`onOpenChange`,o),m.useContextCallback(`onOpenChangeComplete`,s);let h=m.useState(`payload`);Yp({store:m,actionsRef:c,parentContext:f?.store.context,isDrawer:!1,onOpenChange:o,triggerIdProp:u});let g=t.useMemo(()=>({store:m}),[m]);return(0,n.jsx)(am.Provider,{value:!1,children:(0,n.jsx)(Qp.Provider,{value:g,children:typeof r==`function`?r({payload:h}):r})})}var cm=p((()=>{om(),Xp(),$p(),rm()})),lm,um,dm,fm,pm,mm,hm,gm,_m,vm,ym=p((()=>{mn(),lm=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=un.startingStyle]=`startingStyle`,e[e.endingStyle=un.endingStyle]=`endingStyle`,e.anchorHidden=`data-anchor-hidden`,e.side=`data-side`,e.align=`data-align`,e}({}),um=function(e){return e.popupOpen=`data-popup-open`,e.pressed=`data-pressed`,e}({}),dm={[um.popupOpen]:``},fm={[um.popupOpen]:``,[um.pressed]:``},pm={[lm.open]:``},mm={[lm.closed]:``},hm={[lm.anchorHidden]:``},gm={open(e){return e?dm:null}},_m={open(e){return e?fm:null}},vm={open(e){return e?pm:mm},anchorHidden(e){return e?hm:null}}})),bm,xm,Sm=p((()=>{$p(),J(),ym(),mn(),bm={...vm,...pn},xm=t.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,{store:s}=Zp(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return q(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:bm,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),process.env.NODE_ENV!==`production`&&(xm.displayName=`DialogBackdrop`)})),Cm,wm=p((()=>{$p(),J(),Ar(),Rt(),It(),Cm=t.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,style:o,...s}=e,{store:c}=Zp(),l=c.useState(`open`);function u(e){l&&c.setOpen(!1,Y(dt,e.nativeEvent))}let{getButtonProps:d,buttonRef:f}=Er({disabled:i,native:a});return q(`button`,e,{state:{disabled:i},ref:[t,f],props:[{onClick:u},s,d]})}),process.env.NODE_ENV!==`production`&&(Cm.displayName=`DialogClose`)})),Tm,Em=p((()=>{$p(),J(),Xt(),Tm=t.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{store:s}=Zp(),c=Yt(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),q(`p`,e,{ref:t,props:[{id:c},o]})}),process.env.NODE_ENV!==`production`&&(Tm.displayName=`DialogDescription`)})),Dm,Om=p((()=>{Dm=function(e){return e.nestedDialogs=`--nested-dialogs`,e}({})})),km,Am=p((()=>{ym(),km=function(e){return e[e.open=lm.open]=`open`,e[e.closed=lm.closed]=`closed`,e[e.startingStyle=lm.startingStyle]=`startingStyle`,e[e.endingStyle=lm.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e}({})}));function jm(){let e=t.useContext(Mm);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(26):`Base UI: <Dialog.Portal> is missing.`);return e}var Mm,Nm=p((()=>{K(),Mm=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Mm.displayName=`DialogPortalContext`)})),Pm,Fm,Im=p((()=>{Hp(),$p(),J(),ym(),mn(),Om(),Am(),Nm(),yo(),co(),Pm={...vm,...pn,nestedDialogOpen(e){return e?{[km.nestedDialogOpen]:``}:null}},Fm=t.forwardRef(function(e,t){let{className:r,finalFocus:i,initialFocus:a,render:o,style:s,...c}=e,{store:l}=Zp(),u=l.useState(`descriptionElementId`),d=l.useState(`disablePointerDismissal`),f=l.useState(`floatingRootContext`),p=l.useState(`popupProps`),m=l.useState(`modal`),h=l.useState(`mounted`),g=l.useState(`nested`),_=l.useState(`nestedOpenDialogCount`),v=l.useState(`open`),y=l.useState(`openMethod`),b=l.useState(`titleElementId`),x=l.useState(`transitionStatus`),S=l.useState(`role`);jm(),vo({open:v,ref:l.context.popupRef,onComplete(){v&&l.context.onOpenChangeComplete?.(!0)}});function C(e){return e===`touch`?l.context.popupRef.current:!0}let w=a===void 0?C:a,T=q(`div`,e,{state:{open:v,nested:g,transitionStatus:x,nestedDialogOpen:_>0},props:[p,{"aria-labelledby":b??void 0,"aria-describedby":u??void 0,role:S,tabIndex:-1,hidden:!h,onKeyDown(e){ro.has(e.key)&&e.stopPropagation()},style:{[Dm.nestedDialogs]:_}},c],ref:[t,l.context.popupRef,l.useStateSetter(`popupElement`)],stateAttributesMapping:Pm});return(0,n.jsx)(lu,{context:f,openInteractionType:y,disabled:!h,closeOnFocusOut:!d,initialFocus:w,returnFocus:i,modal:m!==!1,restoreFocus:`popup`,children:T})}),process.env.NODE_ENV!==`production`&&(Fm.displayName=`DialogPopup`)}));function Lm(e){return _e(19)?e:e?`true`:void 0}var Rm=p((()=>{ye()})),zm,Bm=p((()=>{zm=t.forwardRef(function(e,t){let{cutout:r,...i}=e,a;if(r){let e=r.getBoundingClientRect();a=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,n.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...i,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:a}})}),process.env.NODE_ENV!==`production`&&(zm.displayName=`InternalBackdrop`)})),Vm,Hm=p((()=>{Rm(),Hp(),$p(),Nm(),Bm(),Vm=t.forwardRef(function(e,t){let{keepMounted:r=!1,...i}=e,{store:a}=Zp(),o=a.useState(`mounted`),s=a.useState(`modal`),c=a.useState(`open`);return o||r?(0,n.jsx)(Mm.Provider,{value:r,children:(0,n.jsxs)(Ul,{ref:t,...i,children:[o&&s===!0&&(0,n.jsx)(zm,{ref:a.context.internalBackdropRef,inert:Lm(!c)}),e.children]})}):null}),process.env.NODE_ENV!==`production`&&(Vm.displayName=`DialogPortal`)})),Um,Wm=p((()=>{$p(),J(),Xt(),Um=t.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{store:s}=Zp(),c=Yt(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),q(`h2`,e,{ref:t,props:[{id:c},o]})}),process.env.NODE_ENV!==`production`&&(Um.displayName=`DialogTitle`)})),Gm,Km=p((()=>{K(),$p(),kr(),J(),ym(),Rl(),Yf(),Xt(),Hp(),Gm=t.forwardRef(function(e,n){let{render:r,className:i,disabled:a=!1,nativeButton:o=!0,id:s,payload:c,handle:l,style:u,...d}=e,f=Zp(!0),p=l?.store??f?.store;if(!p)throw Error(process.env.NODE_ENV===`production`?G(79):`Base UI: <Dialog.Trigger> must be used within <Dialog.Root> or provided with a handle.`);let m=Yt(s),h=p.useState(`floatingRootContext`),g=p.useState(`isOpenedByTrigger`,m),_=t.useRef(null),{registerTrigger:v,isMountedByThisTrigger:y}=Lf(m,_,p,{payload:c}),{getButtonProps:b,buttonRef:x}=Er({disabled:a,native:o}),S=gp([pu(h,{enabled:h!=null})]),C={disabled:a,open:g},w=p.useState(`triggerProps`,y);return q(`button`,e,{state:C,ref:[x,n,v,_],props:[S.getReferenceProps(),w,{[Al]:``,id:m},d,b],stateAttributesMapping:gm})}),process.env.NODE_ENV!==`production`&&(Gm.displayName=`DialogTrigger`)})),qm,Jm=p((()=>{ym(),qm=function(e){return e[e.open=lm.open]=`open`,e[e.closed=lm.closed]=`closed`,e[e.startingStyle=lm.startingStyle]=`startingStyle`,e[e.endingStyle=lm.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e}({})})),Ym,Xm,Zm=p((()=>{J(),ym(),mn(),$p(),Nm(),Jm(),Ym={...vm,...pn,nested(e){return e?{[qm.nested]:``}:null},nestedDialogOpen(e){return e?{[qm.nestedDialogOpen]:``}:null}},Xm=t.forwardRef(function(e,t){let{className:n,render:r,children:i,style:a,...o}=e,s=jm(),{store:c}=Zp(),l=c.useState(`open`),u=c.useState(`nested`),d=c.useState(`transitionStatus`),f=c.useState(`nestedOpenDialogCount`),p=c.useState(`mounted`);return q(`div`,e,{enabled:s||p,state:{open:l,nested:u,transitionStatus:d,nestedDialogOpen:f>0},ref:[t,c.useStateSetter(`viewportElement`)],stateAttributesMapping:Ym,props:[{role:`presentation`,hidden:!p,style:{pointerEvents:l?void 0:`none`},children:i},o]})}),process.env.NODE_ENV!==`production`&&(Xm.displayName=`DialogViewport`)})),Qm=p((()=>{cm(),Sm(),wm(),Em(),Im(),Hm(),Wm(),Km(),Zm(),rm(),Rt(),It()})),$m=p((()=>{Qm()}));function eh(){let e=t.useContext(ih);if(!e)throw Error(process.env.NODE_ENV===`production`?G(22):`Base UI: ComboboxRootContext is missing. Combobox parts must be placed within <Combobox.Root>.`);return e}function th(){let e=t.useContext(ah);if(!e)throw Error(process.env.NODE_ENV===`production`?G(23):`Base UI: ComboboxFloatingContext is missing. Combobox parts must be placed within <Combobox.Root>.`);return e}function nh(){let e=t.useContext(oh);if(!e)throw Error(process.env.NODE_ENV===`production`?G(24):`Base UI: ComboboxItemsContext is missing. Combobox parts must be placed within <Combobox.Root>.`);return e}function rh(){return t.useContext(sh)}var ih,ah,oh,sh,ch=p((()=>{K(),ih=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(ih.displayName=`ComboboxRootContext`),ah=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(ah.displayName=`ComboboxFloatingContext`),oh=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(oh.displayName=`ComboboxDerivedItemsContext`),sh=t.createContext(``),process.env.NODE_ENV!==`production`&&(sh.displayName=`ComboboxInputValueContext`)}));function lh(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function uh(e,t,n){return!e||e.length===0?!1:e.some(e=>e===void 0?!1:lh(t,e,n))}function dh(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e===void 0?!1:lh(e,t,n))}function fh(e,t,n){return e.filter(e=>!lh(t,e,n))}var ph,mh=p((()=>{ph=(e,t)=>Object.is(e,t)}));function hh(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}var gh=p((()=>{}));function _h(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function vh(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(_h(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function yh(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return hh(e)}function bh(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?hh(e.value):hh(e)}function xh(e,t,n){function r(){return yh(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){let n=t,i=_h(n)?n.flatMap(e=>e.items):n;if(typeof e!=`object`||!e){let t=i.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=i.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function Sh(e,r,i){return e.reduce((e,a,o)=>(o>0&&e.push(`, `),e.push((0,n.jsx)(t.Fragment,{children:xh(a,r,i)},o)),e),[])}var Ch=p((()=>{gh()})),wh,Th=p((()=>{Mf(),mh(),Ch(),wh={id:Q(e=>e.id),labelId:Q(e=>e.labelId),items:Q(e=>e.items),selectedValue:Q(e=>e.selectedValue),hasSelectionChips:Q(e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0}),hasSelectedValue:Q(e=>{let{selectedValue:t,selectionMode:n}=e;return t==null?!1:n===`multiple`&&Array.isArray(t)?t.length>0:!0}),hasNullItemLabel:Q((e,t)=>t?vh(e.items):!1),open:Q(e=>e.open),mounted:Q(e=>e.mounted),forceMounted:Q(e=>e.forceMounted),inline:Q(e=>e.inline),activeIndex:Q(e=>e.activeIndex),selectedIndex:Q(e=>e.selectedIndex),isActive:Q((e,t)=>e.activeIndex===t),isSelected:Q((e,t)=>{let n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(e=>lh(t,e,n)):lh(t,r,n)}),transitionStatus:Q(e=>e.transitionStatus),popupProps:Q(e=>e.popupProps),inputProps:Q(e=>e.inputProps),triggerProps:Q(e=>e.triggerProps),getItemProps:Q(e=>e.getItemProps),positionerElement:Q(e=>e.positionerElement),listElement:Q(e=>e.listElement),triggerElement:Q(e=>e.triggerElement),inputElement:Q(e=>e.inputElement),inputGroupElement:Q(e=>e.inputGroupElement),popupSide:Q(e=>e.popupSide),openMethod:Q(e=>e.openMethod),inputInsidePopup:Q(e=>e.inputInsidePopup),selectionMode:Q(e=>e.selectionMode),name:Q(e=>e.name),form:Q(e=>e.form),disabled:Q(e=>e.disabled),readOnly:Q(e=>e.readOnly),required:Q(e=>e.required),grid:Q(e=>e.grid),virtualized:Q(e=>e.virtualized),itemToStringLabel:Q(e=>e.itemToStringLabel),isItemEqualToValue:Q(e=>e.isItemEqualToValue),modal:Q(e=>e.modal),autoHighlight:Q(e=>e.autoHighlight),submitOnItemClick:Q(e=>e.submitOnItemClick)}})),Eh=p((()=>{De()})),Dh,Oh=p((()=>{Dh=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}({})})),kh,Ah,jh,Mh,Nh=p((()=>{Oh(),kh={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Ah={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},jh={disabled:!1,...Ah},Mh={valid(e){return e===null?null:e?{[Dh.valid]:``}:{[Dh.invalid]:``}}}}));function Ph(e=!0){let n=t.useContext(Fh);if(n.setValidityData===we&&!e)throw Error(process.env.NODE_ENV===`production`?G(28):`Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.`);return n}var Fh,Ih=p((()=>{K(),De(),Eh(),Nh(),Fh=t.createContext({invalid:void 0,name:void 0,validityData:{state:kh,errors:[],error:``,value:``,initialValue:null},setValidityData:we,disabled:void 0,touched:Ah.touched,setTouched:we,dirty:Ah.dirty,setDirty:we,filled:Ah.filled,setFilled:we,focused:Ah.focused,setFocused:we,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:jh,markedDirtyRef:{current:!1},registerFieldControl:we,validation:{getValidationProps:(e=Ee)=>e,getInputValidationProps:(e=Ee)=>e,inputRef:{current:null},commit:async()=>{}}}),process.env.NODE_ENV!==`production`&&(Fh.displayName=`FieldRootContext`)}));function Lh(e,n){let{enabled:r=!0,getValue:i,id:a,value:o}=n,{registerFieldControl:s}=Ph(),c=t.useRef(null);c.current||=Symbol(),F(()=>{let t=c.current;if(!(!t||!r))return s(t,{controlRef:e,getValue:i,id:a,value:o}),()=>{s(t,void 0)}},[e,r,i,a,s,o])}var Rh=p((()=>{I(),Ih()}));function zh(){return t.useContext(Bh)}var Bh,Vh=p((()=>{Eh(),Bh=t.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:we,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}}),process.env.NODE_ENV!==`production`&&(Bh.displayName=`FormContext`)}));function Hh(){return t.useContext(Uh)}var Uh,Wh=p((()=>{Eh(),Uh=t.createContext({controlId:void 0,registerControlId:we,labelId:void 0,setLabelId:we,messageIds:[],setMessageIds:we,getDescriptionProps:e=>e}),process.env.NODE_ENV!==`production`&&(Uh.displayName=`LabelableContext`)}));function Gh(e={}){let{id:n,implicit:r=!1,controlRef:i}=e,{controlId:a,registerControlId:o}=Hh(),s=Yt(n),c=r?a:void 0,l=T(()=>Symbol(`labelable-control`)),u=t.useRef(!1),d=t.useRef(n!=null),f=O(()=>{!u.current||o===we||(u.current=!1,o(l.current,void 0))});return F(()=>{if(o===we)return;let e;if(r){let t=i?.current;e=er(t)&&t.closest(`label`)!=null?n??null:c??s}else if(n!=null)d.current=!0,e=n;else if(d.current)e=s;else{f();return}if(e===void 0){f();return}u.current=!0,o(l.current,e)},[n,i,c,o,r,s,l,f]),t.useEffect(()=>f,[f]),a??s}var Kh=p((()=>{I(),N(),D(),br(),Eh(),Xt(),Wh()}));function qh(e,t){return(n,r)=>{if(n==null)return!1;let i=yh(n,t);return e.contains(i,r)}}function Jh(e,t,n){return(r,i)=>{if(r==null)return!1;if(!i)return!0;let a=yh(r,t),o=n==null?``:yh(n,t);return o&&e.contains(o,i)&&o.length===i.length?!0:e.contains(a,i)}}var Yh=p((()=>{Ch()}));function Xh(e={}){let t={usage:`search`,sensitivity:`base`,ignorePunctuation:!0,...e},n=`${Zh(e.locale)}|${JSON.stringify(t)}`,r=Qh.get(n);if(r)return r;let i=new Intl.Collator(e.locale,t),a={contains(e,t,n){if(!t)return!0;let r=yh(e,n);for(let e=0;e<=r.length-t.length;e+=1)if(i.compare(r.slice(e,e+t.length),t)===0)return!0;return!1},startsWith(e,t,n){if(!t)return!0;let r=yh(e,n);return i.compare(r.slice(0,t.length),t)===0},endsWith(e,t,n){if(!t)return!0;let r=yh(e,n),a=t.length;return r.length>=a&&i.compare(r.slice(r.length-a),t)===0}};return Qh.set(n,a),a}function Zh(e){return Array.isArray(e)?e.map(e=>Zh(e)).join(`,`):e==null?``:String(e)}var Qh,$h=p((()=>{Ch(),Qh=new Map})),eg,tg=p((()=>{$h(),eg=Xh})),ng,rg,ig=p((()=>{ng=Symbol(`none`),rg={value:ng,index:-1}}));function ag(e){let{id:r,onOpenChangeComplete:i,defaultSelectedValue:a=null,selectedValue:o,onSelectedValueChange:s,defaultInputValue:c,inputValue:l,open:u,defaultOpen:d=!1,selectionMode:f=`none`,onItemHighlighted:p,name:m,form:h,disabled:g=!1,readOnly:_=!1,required:v=!1,inputRef:y,grid:b=!1,items:x,filteredItems:C,filter:w,openOnInputClick:E=!0,autoHighlight:D=!1,keepHighlight:k=!1,highlightItemOnHover:A=!0,loopFocus:j=!0,itemToStringLabel:M,itemToStringValue:N,isItemEqualToValue:P=ph,virtualized:I=!1,inline:L=!1,fillInputOnItemPress:R=!0,modal:ee=!1,limit:z=-1,autoComplete:B=`list`,formAutoComplete:V,locale:te,submitOnItemClick:ne=!1}=e,{clearErrors:H}=zh(),{setDirty:re,validityData:U,shouldValidateOnChange:W,setFilled:ie,name:ae,disabled:oe,setTouched:G,setFocused:K,validationMode:se,validation:ce}=Ph(),le=Gh({id:r}),de=eg({locale:te}),[fe,pe]=t.useState(!1),[me,he]=t.useState(null),ge=t.useRef([]),_e=t.useRef([]),ve=t.useRef(null),ye=t.useRef(null),be=t.useRef(null),xe=t.useRef(null),Se=t.useRef(null),Ce=t.useRef(!0),De=t.useRef(!1),Oe=t.useRef(null),ke=t.useRef(null),Ae=t.useRef(null),je=t.useRef(rg),Me=t.useRef(null),Ne=t.useRef([]),Pe=t.useRef([]),Fe=oe||g,Ie=ae??m,Le=f===`multiple`,Re=f===`single`,ze=l!==void 0||c!==void 0,Be=x!==void 0,Ve=C!==void 0,He;He=D===`always`?`always`:D?`input-change`:!1;let[Ue,We]=S({controlled:o,default:Le?a??Te:a,name:`Combobox`,state:`selectedValue`}),Ge=t.useMemo(()=>w===null?()=>!0:w===void 0?Re&&!fe?Jh(de,M,Ue):qh(de,M):w,[w,Re,Ue,fe,de,M]),Ke=T(()=>ze?c??``:Re?yh(Ue,M):``).current,[qe,Je]=S({controlled:l,default:Ke,name:`Combobox`,state:`inputValue`}),[Ye,Xe]=S({controlled:u,default:d,name:`Combobox`,state:`open`}),q=_h(x),Ze=me??(qe===``?``:String(qe).trim()),Qe=Re?yh(Ue,M):``,$e=Re&&!fe&&Ze!==``&&Qe!==``&&Qe.length===Ze.length&&de.contains(Qe,Ze),et=$e?``:Ze,tt=Be&&Ve&&$e,nt=t.useMemo(()=>x?q?x.flatMap(e=>e.items):x:Te,[x,q]),rt=t.useMemo(()=>{if(C&&!tt)return C;if(!x)return Te;if(q){let e=x,t=[],n=0;for(let r of e){if(z>-1&&n>=z)break;let e=et===``?r.items:r.items.filter(e=>Ge(e,et,M));if(e.length===0)continue;let i=z>-1?z-n:1/0,a=e.slice(0,i);if(a.length>0){let e={...r,items:a};t.push(e),n+=a.length}}return t}if(et===``)return z>-1?nt.slice(0,z):nt;let e=[];for(let t of nt){if(z>-1&&e.length>=z)break;Ge(t,et,M)&&e.push(t)}return e},[C,tt,x,q,et,z,Ge,M,nt]),it=t.useMemo(()=>q?rt.flatMap(e=>e.items):rt,[rt,q]),J=T(()=>new Tf({id:le,labelId:void 0,selectedValue:Ue,open:Ye,filter:Ge,query:Ze,items:x,selectionMode:f,listRef:ge,labelsRef:_e,popupRef:ve,emptyRef:Se,inputRef:ye,startDismissRef:be,endDismissRef:xe,keyboardActiveRef:Ce,chipsContainerRef:Oe,clearRef:ke,valuesRef:Ne,allValuesRef:Pe,selectionEventRef:Ae,name:Ie,form:h,disabled:Fe,readOnly:_,required:v,grid:b,isGrouped:q,virtualized:I,openOnInputClick:E,itemToStringLabel:M,isItemEqualToValue:P,modal:ee,autoHighlight:He,submitOnItemClick:ne,hasInputValue:ze,mounted:!1,forceMounted:!1,transitionStatus:`idle`,inline:L,activeIndex:null,selectedIndex:null,popupProps:{},inputProps:{},triggerProps:{},positionerElement:null,listElement:null,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,onOpenChangeComplete:i||we,setOpen:we,setInputValue:we,setSelectedValue:we,setIndices:we,onItemHighlighted:we,handleSelection:we,getItemProps:()=>Ee,forceMount:we,requestSubmit:we})).current,ot=f===`none`?qe:Ue,st=t.useMemo(()=>f===`none`?ot:Array.isArray(Ue)?Ue.map(e=>bh(e,N)):bh(Ue,N),[ot,N,f,Ue]),ct=O(p),lt=O(i),dt=$(J,wh.activeIndex),ft=$(J,wh.selectedIndex),pt=$(J,wh.positionerElement),mt=$(J,wh.listElement),ht=$(J,wh.triggerElement),gt=$(J,wh.inputElement),_t=$(J,wh.inputGroupElement),yt=$(J,wh.inline),bt=$(J,wh.inputInsidePopup),St=nl(ht),{mounted:Ct,setMounted:wt,transitionStatus:Tt}=_n(Ye),{openMethod:Et,triggerProps:Dt}=qp(Ye),Ot=O(()=>st);Lh(bt?St:ye,{id:le,value:ot,getValue:Ot});let kt=O(()=>{x?_e.current=it.map(e=>yh(e,M)):J.set(`forceMounted`,!0)}),At=t.useRef(Ue);F(()=>{Ue!==At.current&&kt()},[kt,Ue]);let jt=O(e=>{J.update(e);let t=e.type||`none`;if(e.activeIndex!==void 0)if(e.activeIndex===null)je.current!==rg&&(je.current=rg,ct(void 0,Lt(t,void 0,{index:-1})));else{let n=Ne.current[e.activeIndex];je.current={value:n,index:e.activeIndex},ct(n,Lt(t,void 0,{index:e.activeIndex}))}}),Mt=O((t,n)=>{if(De.current=n.reason===vt,e.onInputValueChange?.(t,n),!n.isCanceled){if(n.reason===`input-change`){let e=n.event,r=e.inputType;if(e.type===`compositionend`||r!=null&&r!==``&&r!==`insertReplacementText`){let e=t.trim()!==``;e&&pe(!0),Me.current={hasQuery:e},e&&He&&J.state.activeIndex==null&&J.set(`activeIndex`,0)}}Je(t)}}),Nt=O((t,n)=>{if(Ye!==t&&(n.reason===`escape-key`&&Be&&it.length===0&&!J.state.emptyRef.current&&n.allowPropagation(),e.onOpenChange?.(t,n),!n.isCanceled&&(!t&&fe&&(Re?(yt||he(Ze),Ze===``&&pe(!1)):Le&&(yt||bt?jt({activeIndex:null}):he(Ze),Mt(``,Y(vt,n.event)))),Xe(t),!t&&bt&&(n.reason===`focus-out`||n.reason===`outside-press`)&&(G(!0),K(!1),se===`onBlur`)))){let e=f===`none`?qe:Ue;ce.commit(e)}}),Pt=O((e,t)=>{s?.(e,t),!t.isCanceled&&(We(e),(f===`none`&&ve.current&&R||Re&&!J.state.inputInsidePopup)&&Mt(yh(e,M),Y(t.reason,t.event)),Re&&e!=null&&t.reason!==`input-change`&&fe&&!yt&&he(Ze))}),Ft=O((e,t)=>{let n=t;if(n===void 0){if(dt===null)return;n=Ne.current[dt]}let r=ti(e),i=Ae.current??e;Ae.current=null;let a=Y(ut,i),o=r?.closest(`a`)?.getAttribute(`href`);if(o){o.startsWith(`#`)&&Nt(!1,a);return}if(Le){let e=Array.isArray(Ue)?Ue:[];if(Pt(uh(e,n,J.state.isItemEqualToValue)?fh(e,n,J.state.isItemEqualToValue):[...e,n],a),!(ye.current&&ye.current.value.trim()!==``))return;J.state.inputInsidePopup?Mt(``,Y(vt,a.event)):Nt(!1,a)}else Pt(n,a),Nt(!1,a)}),It=O(()=>{if(!J.state.submitOnItemClick)return;let e=ce.inputRef.current?.form??J.state.inputElement?.form;e&&typeof e.requestSubmit==`function`&&e.requestSubmit()}),Rt=O(()=>{if(wt(!1),lt?.(!1),pe(!1),he(null),jt(f===`none`?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),Le&&ye.current&&ye.current.value!==``&&!De.current&&Mt(``,Y(vt)),Re)if(J.state.inputInsidePopup)ye.current&&ye.current.value!==``&&Mt(``,Y(vt));else{let e=yh(Ue,M);ye.current&&ye.current.value!==e&&Mt(e,Y(e===``?vt:at))}}),zt=t.useMemo(()=>yt&&pt?{current:pt.closest(`[role="dialog"]`)}:ve,[yt,pt]);vo({enabled:!e.actionsRef,open:Ye,ref:zt,onComplete(){Ye||Rt()}}),t.useImperativeHandle(e.actionsRef,()=>({unmount:Rt}),[Rt]),F(function(){if(Ye||f===`none`)return;let e=x?nt:Pe.current;if(Le){let t=Array.isArray(Ue)?Ue:[],n=t[t.length-1],r=dh(e,n,P);jt({selectedIndex:r===-1?null:r})}else{let t=dh(e,Ue,P);jt({selectedIndex:t===-1?null:t})}},[Ye,Ue,x,f,nt,Le,P,jt]),F(()=>{x&&(Ne.current=it,ge.current.length=it.length)},[x,it]),F(()=>{let e=Me.current;if(e&&(e.hasQuery?He&&J.set(`activeIndex`,0):He===`always`&&J.set(`activeIndex`,0),Me.current=null),!Ye&&!yt)return;let t=Be||Ve?it:Ne.current,n=J.state.activeIndex;if(n==null){if(He===`always`&&t.length>0){J.set(`activeIndex`,0);return}je.current!==rg&&(je.current=rg,J.state.onItemHighlighted(void 0,Lt(at,void 0,{index:-1})));return}if(n>=t.length){je.current!==rg&&(je.current=rg,J.state.onItemHighlighted(void 0,Lt(at,void 0,{index:-1}))),J.set(`activeIndex`,null);return}let r=t[n],i=je.current.value,a=i!==ng&&lh(r,i,J.state.isItemEqualToValue);(je.current.index!==n||!a)&&(je.current={value:r,index:n},J.state.onItemHighlighted(r,Lt(at,void 0,{index:n})))},[dt,He,Ve,Be,it,yt,Ye,J]),F(()=>{if(f===`none`){ie(String(qe)!==``);return}ie(Le?Array.isArray(Ue)&&Ue.length>0:Ue!=null)},[ie,f,qe,Ue,Le]),t.useEffect(()=>{Be&&He&&it.length===0&&jt({activeIndex:null})},[Be,He,it.length,jt]),Gp(Ze,()=>{!Ye||Ze===``||Ze===String(Ke)||pe(!0)}),Gp(Ue,()=>{if(f!==`none`&&(H(Ie),re(Ue!==U.initialValue),W()?ce.commit(Ue):ce.commit(Ue,!0),Re&&!ze&&!bt)){let e=yh(Ue,M);qe!==e&&Mt(e,Y(at))}}),Gp(qe,()=>{f===`none`&&(H(Ie),re(qe!==U.initialValue),W()?ce.commit(qe):ce.commit(qe,!0))}),Gp(x,()=>{if(!Re||ze||bt||fe)return;let e=yh(Ue,M);qe!==e&&Mt(e,Y(at))});let Bt=Xf({open:yt?!0:Ye,onOpenChange:Nt,elements:{reference:bt?ht:gt,floating:pt}}),Vt,Ht;yt||(Vt=b?`grid`:`listbox`,Ht=Ye?`true`:`false`);let{getReferenceProps:Ut,getFloatingProps:Wt,getItemProps:Gt}=gp([t.useMemo(()=>{let e=gt?.tagName===`INPUT`,t=gt==null||e,n=t||Ye,r=t?{autoComplete:`off`,spellCheck:`false`,autoCorrect:`off`,autoCapitalize:`none`}:{};return n&&(r.role=`combobox`,r[`aria-expanded`]=Ht,r[`aria-haspopup`]=Vt,r[`aria-controls`]=Ye?mt?.id:void 0,r[`aria-autocomplete`]=B),{reference:r,floating:{role:`presentation`}}},[gt,Ye,Ht,Vt,mt?.id,B]),pu(Bt,{enabled:!_&&!Fe&&E,event:`mousedown-only`,toggle:!1,touchOpenDelay:bt?0:100,reason:xt}),xu(Bt,{enabled:!_&&!Fe&&!yt,outsidePressEvent:{mouse:`sloppy`,touch:`intentional`},bubbles:yt?!0:void 0,outsidePress(e){let t=ti(e);return!ei(ht,t)&&!ei(ke.current,t)&&!ei(Oe.current,t)&&!ei(_t,t)}}),Tp(Bt,{enabled:!_&&!Fe,id:le,listRef:ge,activeIndex:dt,selectedIndex:ft,virtual:!0,loopFocus:j,allowEscape:j&&!He,focusItemOnOpen:fe||f===`none`&&!He?!1:`auto`,focusItemOnHover:A,resetOnPointerLeave:!k,cols:b?2:1,orientation:b?`horizontal`:void 0,disabledIndices:Te,onNavigate(e,t){!t&&!Ye||Tt===`ending`||jt(t?{activeIndex:e,type:Ce.current?`keyboard`:`pointer`}:{activeIndex:e})}})]);Oc(()=>{J.update({inline:L,popupProps:Wt(),inputProps:Ut(),triggerProps:Dt,getItemProps:Gt,setOpen:Nt,setInputValue:Mt,setSelectedValue:Pt,setIndices:jt,onItemHighlighted:ct,handleSelection:Ft,forceMount:kt,requestSubmit:It})}),F(()=>{J.update({id:le,selectedValue:Ue,open:Ye,mounted:Ct,transitionStatus:Tt,items:x,inline:L,popupProps:Wt(),inputProps:Ut(),triggerProps:Dt,openMethod:Et,getItemProps:Gt,selectionMode:f,name:Ie,form:h,disabled:Fe,readOnly:_,required:v,grid:b,isGrouped:q,virtualized:I,onOpenChangeComplete:lt,openOnInputClick:E,itemToStringLabel:M,modal:ee,autoHighlight:He,isItemEqualToValue:P,submitOnItemClick:ne,hasInputValue:ze,requestSubmit:It})},[J,le,Ue,Ye,Ct,Tt,x,Wt,Ut,Gt,Et,Dt,f,Ie,Fe,_,v,ce,b,q,I,lt,E,M,ee,P,ne,ze,L,It,He,h]);let Kt=ue(y,ce.inputRef),qt=t.useMemo(()=>({query:Ze,hasItems:Be,filteredItems:rt,flatFilteredItems:it}),[Ze,Be,rt,it]),Jt=t.useMemo(()=>Array.isArray(ot)?``:bh(ot,N),[ot,N]),Yt=Le&&Array.isArray(Ue)&&Ue.length>0,Xt=Le||f===`none`?void 0:Ie,Zt=t.useMemo(()=>!Le||!Array.isArray(Ue)||!Ie?null:Ue.map(e=>{let t=bh(e,N);return(0,n.jsx)(`input`,{type:`hidden`,form:h,name:Ie,value:t},t)}),[Le,Ue,h,Ie,N]),Qt=(0,n.jsxs)(t.Fragment,{children:[e.children,(0,n.jsx)(`input`,{...ce.getInputValidationProps({onFocus(){if(bt){ht?.focus();return}(ye.current||ht)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.currentTarget.value,n=Y(at,e.nativeEvent);function r(){if(Le)return;if(f===`none`){re(t!==U.initialValue),Mt(t,n),W()&&ce.commit(t);return}let e=Ne.current.find(e=>bh(e,N).toLowerCase()===t.toLowerCase()||yh(e,M).toLowerCase()===t.toLowerCase());e!=null&&(re(e!==U.initialValue),Pt?.(e,n),W()&&ce.commit(e))}x?r():(kt(),queueMicrotask(r))}}),id:le&&Xt==null?`${le}-hidden-input`:void 0,form:h,name:Xt,autoComplete:V,disabled:Fe,required:v&&!Yt,readOnly:_,value:Jt,ref:Kt,style:Xt?sl:ol,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Zt]});return(0,n.jsx)(ih.Provider,{value:J,children:(0,n.jsx)(ah.Provider,{value:Bt,children:(0,n.jsx)(oh.Provider,{value:qt,children:(0,n.jsx)(sh.Provider,{value:qe,children:Qt})})})})}var og=p((()=>{w(),I(),kc(),N(),ge(),il(),cl(),D(),Mf(),De(),Hp(),Ra(),Rt(),It(),ch(),Th(),yo(),Ih(),Rh(),Vh(),Kh(),Yh(),tg(),vn(),Jp(),Kp(),Eh(),Ch(),mh(),ig()}));function sg(e){let{openOnInputClick:r=!1,value:i,defaultValue:a,onValueChange:o,mode:s=`list`,itemToStringValue:c,...l}=e,u=s===`inline`||s===`both`,d=s===`inline`||s===`none`,f=i!==void 0,[p,m]=t.useState(a??``),[h,g]=t.useState(``);t.useEffect(()=>{f&&g(``)},[i,f]);let _;_=u&&h!==``?h:f?i??``:p;let v=O((e,t)=>{g(``),f||m(e),o?.(e,t)}),y=eg(),b=t.useMemo(()=>l.filter===void 0?y.contains:l.filter,[l.filter,y]),x=String(f?i:p).trim(),S=t.useMemo(()=>s===`both`?b===null?null:(e,t,n)=>b(e,x,n):d?null:b,[b,s,x,d]),C=O((t,n)=>{e.onItemHighlighted?.(t,n),n.reason!==`pointer`&&g(u?t==null?``:yh(t,c):``)});return(0,n.jsx)(ag,{...l,itemToStringLabel:c,openOnInputClick:r,selectionMode:`none`,fillInputOnItemPress:!0,filter:S,autoComplete:s,inputValue:_,defaultInputValue:a,onInputValueChange:v,onItemHighlighted:C})}var cg=p((()=>{N(),og(),tg(),Ch(),It()})),lg,ug=p((()=>{ym(),Nh(),lg={..._m,...Mh,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":``}:null}}));function dg(e){let t=e.getBoundingClientRect();if(process.env.NODE_ENV!==`production`)return t;let n=Zn(e),r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(!(r.content!==`none`||i.content!==`none`))return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}var fg=p((()=>{da()}));function pg(e){return e==null?void 0:`${e}-label`}function mg(e,t){return e??t}var hg=p((()=>{})),gg,_g,vg=p((()=>{Mf(),N(),Nc(),da(),J(),Ar(),ch(),ug(),Th(),Ih(),Wh(),Ra(),fg(),Rt(),It(),Hp(),Kh(),hg(),gg=2,_g=t.forwardRef(function(e,n){let{render:r,className:i,nativeButton:a=!0,disabled:o=!1,id:s,style:c,...l}=e,{state:u,disabled:d,setTouched:f,setFocused:p,validationMode:m,validation:h}=Ph(),{labelId:g}=Hh(),_=eh(),{filteredItems:v}=nh(),y=$(_,wh.selectionMode),b=$(_,wh.disabled),x=$(_,wh.readOnly),S=$(_,wh.required),C=$(_,wh.mounted),w=$(_,wh.popupSide),T=$(_,wh.positionerElement),E=$(_,wh.listElement),D=$(_,wh.triggerProps),k=$(_,wh.triggerElement),A=$(_,wh.inputInsidePopup),j=$(_,wh.id),M=$(_,wh.labelId),N=$(_,wh.open),P=$(_,wh.selectedValue),F=$(_,wh.activeIndex),I=$(_,wh.selectedIndex),L=$(_,wh.hasSelectedValue),R=th(),ee=rh(),z=Ac(),B=d||b||o,V=v.length===0,te=C&&T?w:null;Gh({id:A?s:void 0});let ne=A?s??j:s,H=mg(g,M),re=t.useRef(``);function U(e){re.current=e.pointerType}let W=R.useState(`domReferenceElement`);t.useEffect(()=>{A&&k&&k!==W&&R.set(`domReferenceElement`,k)},[k,W,R,A]);let{reference:ie}=jp(R,{enabled:!N&&!x&&!b&&y===`single`,listRef:_.state.labelsRef,activeIndex:F,selectedIndex:I,onMatch(e){let t=_.state.valuesRef.current[e];t!==void 0&&_.state.setSelectedValue(t,Y(`none`))}}),{reference:ae}=pu(R,{enabled:!x&&!b,event:`mousedown`}),{buttonRef:oe,getButtonProps:G}=Er({native:a,disabled:B}),K={...u,open:N,disabled:B,popupSide:te,listEmpty:V,placeholder:y===`none`?!1:!L};return q(`button`,e,{ref:[n,oe,O(e=>{_.set(`triggerElement`,e)})],state:K,props:[D,ae,ie,{id:ne,tabIndex:A?0:-1,role:A?`combobox`:void 0,"aria-expanded":N?`true`:`false`,"aria-haspopup":A?`dialog`:`listbox`,"aria-controls":N?E?.id:void 0,"aria-required":A&&S||void 0,"aria-labelledby":H,onPointerDown:U,onPointerEnter:U,onFocus(){p(!0),!(B||x)&&z.start(0,_.state.forceMount)},onBlur(e){if(!ei(T,e.relatedTarget)&&(f(!0),p(!1),m===`onBlur`)){let e=y===`none`?ee:P;h.commit(e)}},onMouseDown(e){if(B||x||(A||R.set(`domReferenceElement`,e.currentTarget),_.state.forceMount(),re.current!==`touch`&&(_.state.inputRef.current?.focus(),A||e.preventDefault()),N))return;let t=ua(e.currentTarget);function n(e){if(!k)return;let t=ti(e),n=_.state.positionerElement,r=_.state.listElement;if(ei(k,t)||ei(n,t)||ei(r,t)||t===k)return;let i=dg(k),a=e.clientX>=i.left-gg&&e.clientX<=i.right+gg,o=e.clientY>=i.top-gg&&e.clientY<=i.bottom+gg;a&&o||_.state.setOpen(!1,Y(`cancel-open`,e))}A&&t.addEventListener(`mouseup`,n,{once:!0})},onKeyDown(e){B||x||(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(hi(e),_.state.setOpen(!0,Y(Tt,e.nativeEvent)),_.state.inputRef.current?.focus())}},h?h.getValidationProps(l):l,G],stateAttributesMapping:lg})}),process.env.NODE_ENV!==`production`&&(_g.displayName=`ComboboxTrigger`)})),yg,bg=p((()=>{vg(),yg=_g}));function xg(){return t.useContext(Sg)}var Sg,Cg=p((()=>{Sg=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Sg.displayName=`ComboboxChipsContext`)}));function wg(e){let n=t.useContext(Tg);if(n===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?G(21):`Base UI: <Combobox.Popup> and <Combobox.Arrow> must be used within the <Combobox.Positioner> component`);return n}var Tg,Eg=p((()=>{K(),Tg=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Tg.displayName=`ComboboxPositionerContext`)})),Dg,Og=p((()=>{ge(),N(),cl(),Ar(),Rt(),It(),ch(),Dg=t.forwardRef(function(e,t){let r=eh(),{buttonRef:i,getButtonProps:a}=Er({native:!1});return(0,n.jsx)(`span`,{ref:ue(t,i),...a({onClick:O(e=>{r.state.setOpen(!1,Y(dt,e.nativeEvent,e.currentTarget))})}),"aria-label":`Dismiss`,tabIndex:void 0,style:sl})}),process.env.NODE_ENV!==`production`&&(Dg.displayName=`ComboboxInternalDismissButton`)})),kg,Ag=p((()=>{Mf(),N(),Gr(),Xt(),J(),ch(),ug(),Th(),Ih(),Nh(),Wh(),Cg(),Ra(),Eg(),Rt(),It(),ae(),hg(),Og(),kg=t.forwardRef(function(e,r){let{render:i,className:a,disabled:o=!1,id:s,style:c,...l}=e,{state:u,disabled:d,setTouched:f,setFocused:p,validationMode:m,validation:h}=Ph(),{labelId:g}=Hh(),_=xg(),v=!!wg(!0),y=eh(),{filteredItems:b}=nh(),x=rh(),S=W(),C=$(y,wh.required),w=$(y,wh.disabled),T=$(y,wh.readOnly),E=$(y,wh.name),D=$(y,wh.form),k=$(y,wh.selectionMode),A=$(y,wh.autoHighlight),j=$(y,wh.inputProps),M=$(y,wh.triggerProps),N=$(y,wh.open),P=$(y,wh.mounted),F=$(y,wh.selectedValue),I=$(y,wh.popupSide),L=$(y,wh.positionerElement),R=$(y,wh.id),ee=$(y,wh.inline),z=$(y,wh.modal),B=!!A,V=P&&L?I:null,te=d||w||o,ne=b.length===0,H=v||ee,re=!H||z,U=Yt(s??(H?void 0:R)),ie=mg(g,void 0),ae=v?Ah:u,[oe,G]=t.useState(null),K=t.useRef(!1),se=t.useRef(null),ce=t.useRef(!1),le=O(e=>{let t=v||y.state.inline;t&&!y.state.hasInputValue&&y.state.setInputValue(``,Y(at)),y.update({inputElement:e,inputInsidePopup:t})}),ue=v||!h?l:h.getValidationProps(l),de={...ae,open:N,disabled:te,readOnly:T,popupSide:V,listEmpty:ne};function fe(e){if(!_)return;let t,{highlightedChipIndex:n}=_,r=_.chipsRef.current.length;if(n!==void 0){if(e.key===`ArrowLeft`)e.preventDefault(),t=n>0?n-1:void 0;else if(e.key===`ArrowRight`)e.preventDefault(),t=n<r-1?n+1:void 0;else if(e.key===`Backspace`||e.key===`Delete`){e.preventDefault();let r=n>=F.length-1?F.length-2:n;t=r>=0?r:void 0,y.state.setIndices({activeIndex:null,selectedIndex:null,type:`keyboard`})}return t}return e.key===`ArrowLeft`&&(e.currentTarget.selectionStart??0)===0&&F.length>0?(e.preventDefault(),t=r>0?r-1:void 0):e.key===`Backspace`&&e.currentTarget.value===``&&F.length>0&&(y.state.setIndices({activeIndex:null,selectedIndex:null,type:`keyboard`}),e.preventDefault()),t}let pe=q(`input`,e,{state:de,ref:[r,y.state.inputRef,le],props:[j,M,{type:`text`,value:e.value??oe??x,"aria-readonly":T||void 0,"aria-required":C||void 0,"aria-labelledby":ie,disabled:te,readOnly:T,required:k===`none`?C:void 0,form:D,...k===`none`&&E&&{name:E},id:U,onFocus(){if(p(!0),!ee||!ce.current)return;ce.current=!1;let e=se.current;e==null||!Object.hasOwn(y.state.valuesRef.current,e)||y.state.setIndices({activeIndex:e})},onBlur(){f(!0),p(!1);let e=y.state.activeIndex;if(ee&&e!==null&&A!==`always`&&(se.current=e,ce.current=!0,y.state.setIndices({activeIndex:null})),m===`onBlur`){let e=k===`none`?x:F;h.commit(e)}},onCompositionStart(e){Hr||(K.current=!0,G(e.currentTarget.value))},onCompositionEnd(e){K.current=!1;let t=e.currentTarget.value;G(null),y.state.setInputValue(t,Y(_t,e.nativeEvent))},onChange(e){let t=e.nativeEvent.inputType,n=!t||t===`insertReplacementText`,r=K.current||!n;if(K.current){let t=e.currentTarget.value;G(t),t===``&&!y.state.openOnInputClick&&!y.state.inputInsidePopup&&y.state.setOpen(!1,Y(vt,e.nativeEvent));let n=t.trim(),i=B&&n!==``;!T&&!te&&n&&r&&(y.state.setOpen(!0,Y(_t,e.nativeEvent)),B||y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?`keyboard`:`pointer`})),N&&y.state.activeIndex!==null&&!i&&y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?`keyboard`:`pointer`});return}y.state.setInputValue(e.currentTarget.value,Y(_t,e.nativeEvent));let i=e.currentTarget.value===``,a=Y(vt,e.nativeEvent);i&&!y.state.inputInsidePopup&&(k===`single`&&y.state.setSelectedValue(null,a),y.state.openOnInputClick||y.state.setOpen(!1,a));let o=e.currentTarget.value.trim();!T&&!te&&o&&r&&(y.state.setOpen(!0,Y(_t,e.nativeEvent)),B||y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?`keyboard`:`pointer`})),N&&y.state.activeIndex!==null&&!B&&y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?`keyboard`:`pointer`})},onKeyDown(e){if(te||T||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;y.state.keyboardActiveRef.current=!0;let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r=S===`rtl`;if(e.key===`Home`){hi(e);let n=Br&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if(e.key===`End`){hi(e);let i=Br&&r?0:t.value.length;t.setSelectionRange(i,i),t.scrollLeft=r?-n:n;return}if(!P&&e.key===`Escape`){let t=k===`multiple`&&Array.isArray(F)?F.length===0:F===null,n=Y(Ct,e.nativeEvent),r=k===`multiple`?[]:null;y.state.setInputValue(``,n),y.state.setSelectedValue(r,n),!t&&!y.state.inline&&!n.isPropagationAllowed&&e.stopPropagation();return}if(_&&e.key===`Backspace`&&t.value===``&&_.highlightedChipIndex===void 0&&Array.isArray(F)&&F.length>0){let t=_.chipsRef.current.length,n=t>0?t-1:F.length-1,r=F.filter((e,t)=>t!==n);y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?`keyboard`:`pointer`}),y.state.setSelectedValue(r,Y(at,e.nativeEvent));return}let i=_?.highlightedChipIndex!==void 0,a=fe(e);if(_?.setHighlightedChipIndex(a),a===void 0?i&&y.state.inputRef.current?.focus():_?.chipsRef.current[a]?.focus(),e.which!==229&&e.key===`Enter`&&N){let t=y.state.activeIndex,n=e.nativeEvent;if(t===null){if(ee)return;y.state.setOpen(!1,Y(at,n));return}hi(e);let r=y.state.listRef.current[t];r&&(y.state.selectionEventRef.current=n,r.click(),y.state.selectionEventRef.current=null)}},onPointerMove(){y.state.keyboardActiveRef.current=!1},onPointerDown(){y.state.keyboardActiveRef.current=!1}},ue],stateAttributesMapping:lg});return(0,n.jsxs)(t.Fragment,{children:[N&&re&&(0,n.jsx)(Dg,{ref:y.state.startDismissRef}),pe]})}),process.env.NODE_ENV!==`production`&&(kg.displayName=`ComboboxInput`)}));function jg(e,t,n,r,i){if(e.baseUIHandlerPrevented||r)return;let a=ti(e.nativeEvent),o=er(a)?a:null;o!==e.currentTarget&&(i?.(o)||si(o))||(e.preventDefault(),!n&&(t.state.inputRef.current?.focus(),t.state.openOnInputClick&&t.state.setOpen(!0,Y(xt,e.nativeEvent))))}var Mg=p((()=>{br(),Rt(),It(),di()})),Ng,Pg=p((()=>{N(),Mf(),J(),Ih(),ch(),Th(),ug(),Mg(),di(),Ng=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=Ph(),s=eh(),{filteredItems:c}=nh(),l=$(s,wh.open),u=$(s,wh.mounted),d=$(s,wh.popupSide),f=$(s,wh.positionerElement),p=$(s,wh.disabled),m=$(s,wh.readOnly),h=$(s,wh.hasSelectedValue),g=$(s,wh.selectionMode),_=u&&f?d:null,v=p,y=c.length===0,b=g===`none`?!1:!h,x={...o,open:l,disabled:v,readOnly:m,popupSide:_,listEmpty:y,placeholder:b};return q(`div`,e,{ref:[t,O(e=>{s.set(`inputGroupElement`,e)})],props:[{role:`group`,onMouseDown(e){jg(e,s,v,m,e=>ei(s.state.chipsContainerRef.current,e))}},a],state:x,stateAttributesMapping:lg})}),process.env.NODE_ENV!==`production`&&(Ng.displayName=`ComboboxInputGroup`)})),Fg,Ig=p((()=>{J(),Fg=t.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e;return q(`span`,e,{ref:t,props:[{"aria-hidden":!0,children:`▼`},a]})}),process.env.NODE_ENV!==`production`&&(Fg.displayName=`ComboboxIcon`)})),Lg,Rg,zg=p((()=>{Mf(),ch(),J(),Th(),Ar(),Ih(),vn(),mn(),yo(),Rt(),It(),ym(),Lg={...pn,...gm},Rg=t.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,keepMounted:o=!1,style:s,...c}=e,{disabled:l}=Ph(),u=eh(),d=$(u,wh.selectionMode),f=$(u,wh.disabled),p=$(u,wh.readOnly),m=$(u,wh.open),h=$(u,wh.selectedValue),g=$(u,wh.hasSelectionChips),_=rh(),v=!1;v=d===`none`?_!==``:d===`single`?h!=null:g;let y=l||f||i,{buttonRef:b,getButtonProps:x}=Er({native:a,disabled:y}),{mounted:S,transitionStatus:C,setMounted:w}=_n(v),T={disabled:y,open:m,transitionStatus:C};vo({open:v,ref:u.state.clearRef,onComplete(){v||w(!1)}});let E=q(`button`,e,{state:T,ref:[t,b,u.state.clearRef],props:[{tabIndex:-1,children:`x`,onMouseDown(e){e.preventDefault()},onClick(e){if(y||p)return;let t=u.state.keyboardActiveRef;u.state.setInputValue(``,Y(ft,e.nativeEvent)),d===`none`?u.state.setIndices({activeIndex:null,type:t.current?`keyboard`:`pointer`}):(u.state.setSelectedValue(Array.isArray(h)?[]:null,Y(ft,e.nativeEvent)),u.state.setIndices({activeIndex:null,selectedIndex:null,type:t.current?`keyboard`:`pointer`})),u.state.inputRef.current?.focus()}},c,x],stateAttributesMapping:Lg});return o||S?E:null}),process.env.NODE_ENV!==`production`&&(Rg.displayName=`ComboboxClear`)}));function Bg(){return t.useContext(Hg)}function Vg(e){let{children:r,items:i}=e,a=t.useMemo(()=>({items:i}),[i]);return(0,n.jsx)(Hg.Provider,{value:a,children:r})}var Hg,Ug=p((()=>{Hg=t.createContext(null),process.env.NODE_ENV!==`production`&&(Hg.displayName=`GroupCollectionContext`)}));function Wg(e){let{children:r}=e,{filteredItems:i}=nh(),a=Bg(),o=a?a.items:i;return o?(0,n.jsx)(t.Fragment,{children:o.map(r)}):null}var Gg=p((()=>{ch(),Ug()})),Kg,qg=p((()=>{Mf(),N(),J(),ch(),Eg(),Th(),Gg(),U(),Ra(),Kg=t.forwardRef(function(e,r){var i;let{render:a,className:o,style:s,children:c,...l}=e,u=eh(),d=th(),f=!!wg(!0),{filteredItems:p,hasItems:m}=nh(),h=$(u,wh.selectionMode),g=$(u,wh.grid),_=$(u,wh.popupProps),v=$(u,wh.virtualized),y=h===`multiple`,b=p.length===0,x=O(e=>{u.set(`positionerElement`,e)}),S=O(e=>{u.set(`listElement`,e)}),C=t.useMemo(()=>typeof c==`function`?i||=(0,n.jsx)(Wg,{children:c}):c,[c]),w={empty:b},T=d.useState(`floatingId`),E=q(`div`,e,{state:w,ref:[r,S,f?null:x],props:[_,{children:C,tabIndex:-1,id:T,role:g?`grid`:`listbox`,"aria-multiselectable":y?`true`:void 0,onKeyDown(e){if(!(u.state.disabled||u.state.readOnly)&&e.key===`Enter`){let t=u.state.activeIndex;if(t==null)return;hi(e);let n=e.nativeEvent,r=u.state.listRef.current[t];r&&(u.state.selectionEventRef.current=n,r.click(),u.state.selectionEventRef.current=null)}},onKeyDownCapture(){u.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){u.state.keyboardActiveRef.current=!1}},l]});return v?E:(0,n.jsx)(te,{elementsRef:u.state.listRef,labelsRef:m?void 0:u.state.labelsRef,children:E})}),process.env.NODE_ENV!==`production`&&(Kg.displayName=`ComboboxList`)}));function Jg(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=null;for(;t.nextNode();){let e=t.currentNode;e.nodeValue!==``&&(n=e)}return n}function Yg(){let e=Ac(),n=t.useRef(null);return t.useEffect(()=>{if(zr)return;let t=n.current;if(t==null)return;let r=Jg(t);if(r==null)return;let i=r.nodeValue??``,a=`${i}${Xg}`;return r.nodeValue=a,e.start(200,()=>{r.nodeValue===a&&(r.nodeValue=i)}),()=>{e.clear(),r.nodeValue===a&&(r.nodeValue=i)}},[n,e]),n}var Xg,Zg=p((()=>{Gr(),Nc(),Xg=`⁠`})),Qg,$g=p((()=>{J(),Zg(),Qg=t.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e;return q(`div`,e,{ref:[t,Yg()],props:[{children:a,role:`status`,"aria-live":`polite`,"aria-atomic":!0},o]})}),process.env.NODE_ENV!==`production`&&(Qg.displayName=`ComboboxStatus`)}));function e_(){let e=t.useContext(t_);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(20):`Base UI: <Combobox.Portal> is missing.`);return e}var t_,n_=p((()=>{K(),t_=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(t_.displayName=`ComboboxPortalContext`)})),r_,i_=p((()=>{Mf(),Hp(),ch(),n_(),Th(),r_=t.forwardRef(function(e,t){let{keepMounted:r=!1,...i}=e,a=eh(),o=$(a,wh.mounted),s=$(a,wh.forceMounted);return o||r||s?(0,n.jsx)(t_.Provider,{value:r,children:(0,n.jsx)(Ul,{ref:t,...i})}):null}),process.env.NODE_ENV!==`production`&&(r_.displayName=`ComboboxPortal`)})),a_,o_,s_=p((()=>{Xi(),a_=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0,offsetParent:d=`real`}=Ci(e,t)||{};if(l==null)return{};let f=Li(u),p={x:n,y:r},m=ki(i),h=Di(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],C=d===`real`?await o.getOffsetParent?.(l):s.floating,w=s.floating[b]||a.floating[h];(!w||!await o.isElement?.(C))&&(w=s.floating[b]||a.floating[h]);let T=x/2-S/2,E=w/2-g[h]/2-1,D=Math.min(f[v],E),O=Math.min(f[y],E),k=D,A=w-g[h]-O,j=w/2-g[h]/2+T,M=Si(k,j,A),N=!c.arrow&&Ti(i)!=null&&j!==M&&a.reference[h]/2-(j<k?D:O)-g[h]/2<0,P=N?j<k?j-k:j-A:0;return{[m]:p[m]+P,data:{[m]:M,centerOffset:j-M-P,...N&&{alignmentOffset:P}},reset:N}}}),o_=(e,t)=>({...a_(e),options:[e,t]})})),c_,l_=p((()=>{Fd(),c_={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await Pd().fn(e)).data?.referenceHidden||a}}}}})),u_,d_,f_=p((()=>{da(),Xi(),u_={sideX:`left`,sideY:`top`},d_={name:`adaptiveOrigin`,async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:a,strategy:o,placement:s}=e,c=Zn(i),l=c.getComputedStyle(i);if(!(l.transitionDuration!==`0s`&&l.transitionDuration!==``))return{x:t,y:n,data:u_};let u=await a.getOffsetParent?.(i),d={width:0,height:0};if(o===`fixed`&&c?.visualViewport)d={width:c.visualViewport.width,height:c.visualViewport.height};else if(u===c){let e=ua(i);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await a.isElement?.(u)&&(d=await a.getDimensions(u));let f=wi(s),p=t,m=n;f===`left`&&(p=d.width-(t+r.width)),f===`top`&&(m=d.height-(n+r.height));let h=f===`left`?`right`:u_.sideX,g=f===`top`?`bottom`:u_.sideY;return{x:p,y:m,data:{sideX:h,sideY:g}}}}}));function p_(e,t,n){let 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 m_(e,t,n){let{rects:r,placement:i}=e;return{side:p_(t,wi(i),n),align:Ti(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function h_(e){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,keepMounted:p=!1,floatingRootContext:m,mounted:h,collisionAvoidance:g,shiftCrossAxis:_=!1,nodeId:v,adaptiveOrigin:y,lazyFlip:b=!1,externalTree:x}=e,[S,C]=t.useState(null);!h&&S!==null&&C(null);let w=g.side||`flip`,T=g.align||`flip`,E=g.fallbackAxisSide||`end`,D=typeof n==`function`?n:void 0,k=O(D),A=D?k:n,j=nl(n),M=nl(h),N=W()===`rtl`,P=S||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":N?`left`:`right`,"inline-start":N?`right`:`left`}[i],I=o===`center`?P:`${P}-${o}`,L=l,R=+(i===`bottom`),ee=+(i===`top`),z=+(i===`right`),B=+(i===`left`);typeof L==`number`?L={top:L+R,right:L+B,bottom:L+ee,left:L+z}:L&&={top:(L.top||0)+R,right:(L.right||0)+B,bottom:(L.bottom||0)+ee,left:(L.left||0)+z};let V={boundary:c===`clipping-ancestors`?`clippingAncestors`:c,padding:L},te=t.useRef(null),ne=nl(a),H=nl(s),re=[kd(e=>{let t=m_(e,i,N),n=typeof ne.current==`function`?ne.current(t):ne.current,r=typeof H.current==`function`?H.current(t):H.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[typeof a==`function`?0:a,typeof s==`function`?0:s,N,i])],U=T===`none`&&w!==`shift`,ie=!U&&(u||_||w===`shift`),ae=w===`none`?null:Md({...V,padding:{top:L.top+1,right:L.right+1,bottom:L.bottom+1,left:L.left+1},mainAxis:!_&&w===`flip`,crossAxis:T===`flip`?`alignment`:!1,fallbackAxisSideDirection:E}),oe=U?null:Ad(e=>{let t=ua(e.elements.floating).documentElement;return{...V,rootBoundary:_?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:T!==`none`,crossAxis:ie,limiter:u||_?void 0:jd(e=>{if(!te.current)return{};let{width:t,height:n}=te.current.getBoundingClientRect(),r=Oi(wi(e.placement)),i=r===`y`?t:n,a=r===`y`?L.left+L.right:L.top+L.bottom;return{offset:i/2+a/2}})}},[V,u,_,L,T]);w===`shift`||T===`shift`||o===`center`?re.push(oe,ae):re.push(ae,oe),re.push(Nd({...V,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!M.current)return;let i=e.style;i.setProperty(`--available-width`,`${t}px`),i.setProperty(`--available-height`,`${n}px`);let a=Zn(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(`--anchor-width`,`${u}px`),i.setProperty(`--anchor-height`,`${d}px`)}}),o_(()=>({element:te.current||ua(te.current).createElement(`div`),padding:d,offsetParent:`floating`}),[d]),{name:`transformOrigin`,fn(e){let{elements:t,middlewareData:n,placement:r,rects:o,y:s}=e,c=wi(r),l=Oi(c),u=te.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=u?.clientWidth||0,m=u?.clientHeight||0,h=d+p/2,g=f+m/2,_=Math.abs(n.shift?.y||0),v=o.reference.height/2,y=typeof a==`function`?a(m_(e,i,N)):a,b=_>y,x={top:`${h}px calc(100% + ${y}px)`,bottom:`${h}px ${-y}px`,left:`calc(100% + ${y}px) ${g}px`,right:`${-y}px ${g}px`}[c],S=`${h}px ${o.reference.y+v-s}px`;return t.floating.style.setProperty(`--transform-origin`,ie&&l===`y`&&b?S:x),{}}},c_,y),F(()=>{!h&&m&&m.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[h,m]);let G=t.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<`u`,layoutShift:!f&&typeof IntersectionObserver<`u`}),[f]),{refs:K,elements:se,x:ce,y:le,middlewareData:ue,update:de,placement:fe,context:pe,isPositioned:me,floatingStyles:he}=Qf({rootContext:m,open:p?h:void 0,placement:I,middleware:re,strategy:r,whileElementsMounted:p?void 0:(...e)=>ud(...e,G),nodeId:v,externalTree:x}),{sideX:ge,sideY:_e}=ue.adaptiveOrigin||u_,ve=me?r:`fixed`,ye=t.useMemo(()=>{let e=y?{position:ve,[ge]:ce,[_e]:le}:{position:ve,...he};return me||(e.opacity=0),e},[y,ve,ge,ce,_e,le,he,me]),be=t.useRef(null);F(()=>{if(!h)return;let e=j.current,t=typeof e==`function`?e():e,n=(g_(t)?t.current:t)||null;n!==be.current&&(K.setPositionReference(n),be.current=n)},[h,K,A,j]),t.useEffect(()=>{if(!h)return;let e=j.current;typeof e!=`function`&&g_(e)&&e.current!==be.current&&(K.setPositionReference(e.current),be.current=e.current)},[h,K,A,j]),t.useEffect(()=>{if(p&&h&&se.domReference&&se.floating)return ud(se.domReference,se.floating,de,G)},[p,h,se,de,G]);let xe=wi(fe),Se=p_(i,xe,N),Ce=Ti(fe)||`center`,we=!!ue.hide?.referenceHidden;F(()=>{b&&h&&me&&C(xe)},[b,h,me,xe]);let Te=t.useMemo(()=>({position:`absolute`,top:ue.arrow?.y,left:ue.arrow?.x}),[ue.arrow]),Ee=ue.arrow?.centerOffset!==0;return t.useMemo(()=>({positionerStyles:ye,arrowStyles:Te,arrowRef:te,arrowUncentered:Ee,side:Se,align:Ce,physicalSide:xe,anchorHidden:we,refs:K,context:pe,isPositioned:me,update:de}),[ye,Te,te,Ee,Se,Ce,xe,we,K,pe,me,de])}function g_(e){return e!=null&&`current`in e}var __=p((()=>{Xi(),da(),I(),il(),N(),Hp(),ae(),s_(),l_(),f_()}));function v_(e){return e===`starting`?kl:Ee}var y_=p((()=>{De(),Rl()}));function b_(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),q(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},v_(r),i],stateAttributesMapping:vm})}var x_=p((()=>{ym(),J(),y_()}));function S_(e,n,r,i){let[a,o]=t.useState(!1);F(()=>{if(!e||!n||r==null){o(!1);return}let t=ua(r).documentElement.clientWidth,i=r.offsetWidth;o(t>0&&i>0&&i>=t-C_)},[e,n,r]),Rc(e&&(!n||a),i)}var C_,w_=p((()=>{da(),Wc(),I(),C_=20})),T_,E_=p((()=>{Mf(),I(),N(),Rm(),ch(),Eg(),__(),n_(),Rl(),Th(),Bm(),x_(),w_(),T_=t.forwardRef(function(e,t){let{render:r,className:i,anchor:a,positionMethod:o=`absolute`,side:s=`bottom`,align:c=`center`,sideOffset:l=0,alignOffset:u=0,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f=5,arrowPadding:p=5,sticky:m=!1,disableAnchorTracking:h=!1,collisionAvoidance:g=Fl,style:_,...v}=e,y=eh(),{filteredItems:b}=nh(),x=th(),S=e_(),C=$(y,wh.modal),w=$(y,wh.open),T=$(y,wh.mounted),E=$(y,wh.openMethod),D=$(y,wh.positionerElement),k=$(y,wh.triggerElement),A=$(y,wh.inputElement),j=$(y,wh.inputGroupElement),M=$(y,wh.inputInsidePopup),N=$(y,wh.transitionStatus),P=b.length===0,I=h_({anchor:a??(M?k:j??A),floatingRootContext:x,positionMethod:o,mounted:T,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:h,keepMounted:S,collisionAvoidance:g,lazyFlip:!0});S_(w&&C,E===`touch`,D,k);let L={open:w,side:I.side,align:I.align,anchorHidden:I.anchorHidden,empty:P};F(()=>{y.set(`popupSide`,I.side)},[y,I.side]);let R=O(e=>{y.set(`positionerElement`,e)}),ee=b_(e,L,{styles:I.positionerStyles,transitionStatus:N,props:v,refs:[t,R],hidden:!T,inert:!w});return(0,n.jsxs)(Tg.Provider,{value:I,children:[T&&C&&(0,n.jsx)(zm,{inert:Lm(!w),cutout:j??A??k}),ee]})}),process.env.NODE_ENV!==`production`&&(T_.displayName=`ComboboxPositioner`)})),D_,O_,k_=p((()=>{Mf(),Hp(),J(),ch(),Th(),ym(),Eg(),yo(),mn(),Ra(),y_(),Og(),D_={...vm,...pn},O_=t.forwardRef(function(e,r){let{render:i,className:a,style:o,initialFocus:s,finalFocus:c,...l}=e,u=eh(),d=wg(),f=th(),{filteredItems:p}=nh(),m=$(u,wh.mounted),h=$(u,wh.open),g=$(u,wh.openMethod),_=$(u,wh.transitionStatus),v=$(u,wh.inputInsidePopup),y=$(u,wh.inputElement),b=$(u,wh.modal),x=p.length===0;vo({open:h,ref:u.state.popupRef,onComplete(){h&&u.state.onOpenChangeComplete(!0)}});let S=q(`div`,e,{state:{open:h,side:d.side,align:d.align,anchorHidden:d.anchorHidden,transitionStatus:_,empty:x},ref:[r,u.state.popupRef],props:[{role:v?`dialog`:`presentation`,tabIndex:-1,onFocus(e){let t=ti(e.nativeEvent);g!==`touch`&&(ei(u.state.listElement,t)||t===e.currentTarget)&&u.state.inputRef.current?.focus()}},v_(_),l],stateAttributesMapping:D_}),C=s===void 0?v?e=>e===`touch`?u.state.popupRef.current:y:!1:s,w;w=c??(v?void 0:!1);let T=!v||b;return(0,n.jsx)(lu,{context:f,disabled:!m,modal:T,openInteractionType:g,initialFocus:C,returnFocus:w,getInsideElements:()=>[u.state.startDismissRef.current,u.state.endDismissRef.current],children:(0,n.jsxs)(t.Fragment,{children:[S,T&&(0,n.jsx)(Dg,{ref:u.state.endDismissRef})]})})}),process.env.NODE_ENV!==`production`&&(O_.displayName=`ComboboxPopup`)}));function A_(){let e=t.useContext(j_);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(18):`Base UI: ComboboxGroupContext is missing. ComboboxGroup parts must be placed within <Combobox.Group>.`);return e}var j_,M_=p((()=>{K(),j_=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(j_.displayName=`ComboboxGroupContext`)})),N_,P_=p((()=>{J(),M_(),Ug(),N_=t.forwardRef(function(e,r){let{render:i,className:a,style:o,items:s,...c}=e,[l,u]=t.useState(),d=t.useMemo(()=>({labelId:l,setLabelId:u,items:s}),[l,u,s]),f=q(`div`,e,{ref:r,props:[{role:`group`,"aria-labelledby":l},c]}),p=(0,n.jsx)(j_.Provider,{value:d,children:f});return s?(0,n.jsx)(Vg,{items:s,children:p}):p}),process.env.NODE_ENV!==`production`&&(N_.displayName=`ComboboxGroup`)})),F_,I_=p((()=>{I(),Xt(),M_(),J(),F_=t.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{setLabelId:s}=A_(),c=Yt(a);return F(()=>(s(c),()=>{s(void 0)}),[c,s]),q(`div`,e,{ref:t,props:[{id:c},o]})}),process.env.NODE_ENV!==`production`&&(F_.displayName=`ComboboxGroupLabel`)}));function L_(){let e=t.useContext(R_);if(!e)throw Error(process.env.NODE_ENV===`production`?G(19):`Base UI: ComboboxItemContext is missing. ComboboxItem parts must be placed within <Combobox.Item>.`);return e}var R_,z_=p((()=>{K(),R_=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(R_.displayName=`ComboboxItemContext`)}));function B_(){return t.useContext(V_)}var V_,H_=p((()=>{V_=t.createContext(!1),process.env.NODE_ENV!==`production`&&(V_.displayName=`ComboboxRowContext`)})),U_,W_=p((()=>{Mf(),I(),ch(),En(),J(),z_(),Th(),Ar(),H_(),mh(),U_=t.memo(t.forwardRef(function(e,i){let{render:a,className:o,value:s=null,index:c,disabled:l=!1,nativeButton:u=!1,style:d,...f}=e,p=t.useRef(!1),m=t.useRef(null),h=wn({index:c,textRef:m,indexGuessBehavior:Tn.GuessFromOrder}),g=eh(),_=B_(),{flatFilteredItems:v,hasItems:y}=nh(),b=$(g,wh.open),x=$(g,wh.selectionMode),S=$(g,wh.readOnly),C=$(g,wh.virtualized),w=$(g,wh.isItemEqualToValue),T=x!==`none`,E=c??(C?dh(v,s,w):h.index),D=h.index!==-1,O=$(g,wh.id),k=$(g,wh.isActive,E),A=$(g,wh.isSelected,s),j=$(g,wh.getItemProps),M=t.useRef(null),N=O!=null&&D?`${O}-${E}`:void 0,P=A&&T;F(()=>{if(!(D&&(C||c!=null)))return;let e=g.state.listRef.current;return e[E]=M.current,()=>{delete e[E]}},[D,C,E,c,g]),F(()=>{if(!D||y)return;let e=g.state.valuesRef.current;return e[E]=s,x!==`none`&&g.state.allValuesRef.current.push(s),()=>{delete e[E]}},[D,y,E,s,g,x]),F(()=>{if(!b){p.current=!1;return}if(!D||y)return;let e=g.state.selectedValue;lh(s,Array.isArray(e)?e[e.length-1]:e,w)&&g.set(`selectedIndex`,E)},[D,y,b,g,E,s,w]);let I={disabled:l,selected:P,highlighted:k},L=j({active:k,selected:P});L.id=void 0,L.onFocus=void 0;let{getButtonProps:R,buttonRef:ee}=Er({disabled:l,focusableWhenDisabled:!0,native:u,composite:!0});function z(e){function t(){g.state.handleSelection(e,s)}g.state.submitOnItemClick?(r.flushSync(t),g.state.requestSubmit()):t()}let B={id:N,role:_?`gridcell`:`option`,"aria-selected":T?P:void 0,tabIndex:void 0,onPointerDownCapture(e){p.current=!0,e.preventDefault()},onMouseDown(e){e.preventDefault()},onClick(e){l||S||z(e.nativeEvent)},onMouseUp(e){let t=p.current;p.current=!1,!(l||S||e.button!==0||t||!k)&&z(e.nativeEvent)}},V=q(`div`,e,{ref:[ee,i,h.ref,M],state:I,props:[L,B,f,R]}),te=t.useMemo(()=>({selected:P,textRef:m}),[P,m]);return(0,n.jsx)(R_.Provider,{value:te,children:V})})),process.env.NODE_ENV!==`production`&&(U_.displayName=`ComboboxItem`)})),G_,K_=p((()=>{W_(),G_=U_})),q_,J_=p((()=>{J(),H_(),q_=t.forwardRef(function(e,t){let{render:r,className:i,style:a,...o}=e,s=q(`div`,e,{ref:t,props:[{role:`row`},o]});return(0,n.jsx)(V_.Provider,{value:!0,children:s})}),process.env.NODE_ENV!==`production`&&(q_.displayName=`ComboboxRow`)})),Y_,X_=p((()=>{J(),ch(),Zg(),Y_=t.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,{filteredItems:s}=nh(),c=eh(),l=Yg(),u=s.length===0?a:null;return q(`div`,e,{ref:[t,c.state.emptyRef,l],props:[{children:u,role:`status`,"aria-live":`polite`,"aria-atomic":!0},o]})}),process.env.NODE_ENV!==`production`&&(Y_.displayName=`ComboboxEmpty`)})),Z_,Q_=p((()=>{J(),Z_=t.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return q(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})}),process.env.NODE_ENV!==`production`&&(Z_.displayName=`Separator`)})),$_=p((()=>{cg(),ch(),bg(),Ag(),Pg(),Ig(),zg(),qg(),$g(),i_(),Mf(),ym(),mn(),J(),Th(),E_(),k_(),Eg(),P_(),I_(),K_(),J_(),Gg(),X_(),Q_(),tg()})),ev=p((()=>{$_()}));function tv(){let e=t.useContext(nv);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(13):`Base UI: AvatarRootContext is missing. Avatar parts must be placed within <Avatar.Root>.`);return e}var nv,rv=p((()=>{K(),nv=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(nv.displayName=`AvatarRootContext`)})),iv,av=p((()=>{iv={imageLoadingStatus:()=>null}})),ov,sv=p((()=>{J(),rv(),av(),ov=t.forwardRef(function(e,r){let{className:i,render:a,style:o,...s}=e,[c,l]=t.useState(`idle`),u={imageLoadingStatus:c},d=t.useMemo(()=>({imageLoadingStatus:c,setImageLoadingStatus:l}),[c,l]),f=q(`span`,e,{state:u,ref:r,props:s,stateAttributesMapping:iv});return(0,n.jsx)(nv.Provider,{value:d,children:f})}),process.env.NODE_ENV!==`production`&&(ov.displayName=`AvatarRoot`)}));function cv(e,{referrerPolicy:n,crossOrigin:r}){let[i,a]=t.useState(`idle`);return F(()=>{if(!e)return a(`error`),we;let t=!0,i=new window.Image,o=e=>()=>{t&&a(e)};return a(`loading`),i.onload=o(`loaded`),i.onerror=o(`error`),n&&(i.referrerPolicy=n),i.crossOrigin=r??null,i.src=e,i.complete&&a(i.naturalWidth>0?`loaded`:`error`),()=>{t=!1}},[e,r,n]),i}var lv=p((()=>{I(),Eh()})),uv,dv,fv=p((()=>{N(),I(),J(),rv(),av(),yo(),mn(),vn(),lv(),uv={...iv,...pn},dv=t.forwardRef(function(e,n){let{className:r,render:i,onLoadingStatusChange:a,referrerPolicy:o,crossOrigin:s,style:c,...l}=e,u=tv(),d=cv(e.src,{referrerPolicy:o,crossOrigin:s}),f=d===`loaded`,{mounted:p,transitionStatus:m,setMounted:h}=_n(f),g=t.useRef(null),_=O(e=>{a?.(e),u.setImageLoadingStatus(e)});F(()=>{d!==`idle`&&_(d)},[d,_]);let v={imageLoadingStatus:d,transitionStatus:m};vo({open:f,ref:g,onComplete(){f||h(!1)}});let y=q(`img`,e,{state:v,ref:[n,g],props:l,stateAttributesMapping:uv,enabled:p});return p?y:null}),process.env.NODE_ENV!==`production`&&(dv.displayName=`AvatarImage`)})),pv,mv=p((()=>{Nc(),J(),rv(),av(),pv=t.forwardRef(function(e,n){let{className:r,render:i,delay:a,style:o,...s}=e,{imageLoadingStatus:c}=tv(),[l,u]=t.useState(a===void 0),d=Ac();return t.useEffect(()=>(a!==void 0&&d.start(a,()=>u(!0)),d.clear),[d,a]),q(`span`,e,{state:{imageLoadingStatus:c},ref:n,props:s,stateAttributesMapping:iv,enabled:c!==`loaded`&&l})}),process.env.NODE_ENV!==`production`&&(pv.displayName=`AvatarFallback`)})),hv=p((()=>{sv(),fv(),mv()})),gv=p((()=>{hv()})),_v,vv=p((()=>{kr(),J(),_v=t.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:u}=Er({disabled:i,focusableWhenDisabled:a,native:o});return q(`button`,e,{state:{disabled:i},ref:[t,u],props:[c,l]})}),process.env.NODE_ENV!==`production`&&(_v.displayName=`Button`)})),yv=p((()=>{vv()})),bv,xv=p((()=>{bv=function(e){return e.checked=`data-checked`,e.unchecked=`data-unchecked`,e.indeterminate=`data-indeterminate`,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}({})}));function Sv(e){return t.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[bv.checked]:``}:{[bv.unchecked]:``}},...Mh}),[e.indeterminate])}var Cv=p((()=>{xv(),Nh()}));function wv(){return t.useContext(Tv)}var Tv,Ev=p((()=>{Tv=t.createContext({disabled:!1}),process.env.NODE_ENV!==`production`&&(Tv.displayName=`FieldItemContext`)}));function Dv(e,n,r,i=!0,a){let[o,s]=t.useState(),c=Yt(a?`${a}-label`:void 0),l=e??n??o;return F(()=>{let t=e||n||!i?void 0:Ov(r.current,c);o!==t&&s(t)}),l}function Ov(e,t){let n=kv(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function kv(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}var Av=p((()=>{I(),Xt()}));function jv(e=!0){let n=t.useContext(Mv);if(n===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?G(3):`Base UI: CheckboxGroupContext is missing. CheckboxGroup parts must be placed within <CheckboxGroup>.`);return n}var Mv,Nv=p((()=>{K(),Mv=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Mv.displayName=`CheckboxGroupContext`)}));function Pv(){let e=t.useContext(Fv);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(14):`Base UI: CheckboxRootContext is missing. Checkbox parts must be placed within <Checkbox.Root>.`);return e}var Fv,Iv=p((()=>{K(),Fv=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Fv.displayName=`CheckboxRootContext`)})),Lv,Rv,zv=p((()=>{De(),w(),N(),I(),ge(),D(),cl(),Eh(),Cv(),J(),Xt(),Xe(),kr(),Ih(),Rh(),Ev(),Vh(),Wh(),Av(),Nv(),Iv(),Rt(),It(),Kp(),Lv=`data-parent`,Rv=t.forwardRef(function(e,r){let{checked:i,className:a,defaultChecked:o=!1,"aria-labelledby":s,disabled:c=!1,form:l,id:u,indeterminate:d=!1,inputRef:f,name:p,onCheckedChange:m,parent:h=!1,readOnly:g=!1,render:_,required:v=!1,uncheckedValue:y,value:b,nativeButton:x=!1,style:C,...w}=e,{clearErrors:E}=zh(),{disabled:D,name:k,setDirty:A,setFilled:j,setFocused:M,setTouched:N,state:P,validationMode:I,validityData:L,shouldValidateOnChange:R,validation:ee}=Ph(),z=wv(),{labelId:B,controlId:V,registerControlId:te,getDescriptionProps:ne}=Hh(),H=jv(),re=H?.parent,U=re&&H.allValues,W=D||z.disabled||H?.disabled||c,ie=k??p,ae=b??ie,oe=Yt(),G=Yt(),K=V;U?K=h?G:`${re.id}-${ae}`:u&&(K=u);let se={};U&&(h?se=H.parent.getParentProps():ae&&(se=H.parent.getChildProps(ae)));let ce=O(m),{checked:le=i,indeterminate:de=d,onCheckedChange:fe,...pe}=se,me=H?.value,he=H?.setValue,ge=H?.defaultValue,_e=t.useRef(null),ve=T(()=>Symbol(`checkbox-control`)),ye=t.useRef(!1),{getButtonProps:be,buttonRef:xe}=Er({disabled:W,native:x}),Se=H?.validation??ee,[Ce,Te]=S({controlled:ae&&me&&!h?me.includes(ae):le,default:ae&&ge&&!h?ge.includes(ae):o,name:`Checkbox`,state:`checked`});F(()=>{te!==we&&(ye.current=!0,te(ve.current,K))},[K,H,te,h,ve]),t.useEffect(()=>{let e=ve.current;return()=>{!ye.current||te===we||(ye.current=!1,te(e,void 0))}},[te,ve]),Lh(_e,{enabled:!H,id:oe,value:Ce});let De=t.useRef(null),Oe=ue(f,De,Se.inputRef),ke=Dv(s,B,De,!x,K??void 0);F(()=>{De.current&&(De.current.indeterminate=de,Ce&&j(!0))},[Ce,de,j]),Gp(Ce,()=>{H&&!h||(E(ie),j(Ce),A(Ce!==L.initialValue),R()?Se.commit(Ce):Se.commit(Ce,!0))});let Ae=Pe({checked:Ce,disabled:W,form:l,name:h?void 0:ie,id:x?void 0:K??void 0,required:v,ref:Oe,style:ie?sl:ol,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(g){e.preventDefault();return}let t=e.currentTarget.checked,n=Y(at,e.nativeEvent);fe?.(t,n),ce(t,n),!n.isCanceled&&(Te(t),ae&&me&&he&&!h&&!U&&he(t?[...me,ae]:me.filter(e=>e!==ae),n))},onFocus(){_e.current?.focus()}},b===void 0?Ee:{value:(H?Ce&&b:b)||``},ne,H?Se.getValidationProps:Se.getInputValidationProps),je=U?!!le:Ce,Me=U&&de||d;t.useEffect(()=>{if(!re||!ae)return;let e=re.disabledStatesRef.current;return e.set(ae,W),()=>{e.delete(ae)}},[re,W,ae]);let Ne=t.useMemo(()=>({...P,checked:je,disabled:W,readOnly:g,required:v,indeterminate:Me}),[P,je,W,g,v,Me]),Fe=Sv(Ne),Ie=q(`span`,e,{state:Ne,ref:[xe,_e,r,H?.registerControlRef],props:[{id:x?K??void 0:oe,role:`checkbox`,"aria-checked":de?`mixed`:Ce,"aria-readonly":g||void 0,"aria-required":v||void 0,"aria-labelledby":ke,[Lv]:h?``:void 0,onFocus(){M(!0)},onBlur(){let e=De.current;e&&(N(!0),M(!1),I===`onBlur`&&Se.commit(H?me:e.checked))},onClick(e){g||W||(e.preventDefault(),De.current?.dispatchEvent(new PointerEvent(`click`,{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey})))}},ne,Se.getValidationProps,w,pe,be],stateAttributesMapping:Fe});return(0,n.jsxs)(Fv.Provider,{value:Ne,children:[Ie,!Ce&&!H&&ie&&!h&&y!==void 0&&(0,n.jsx)(`input`,{type:`hidden`,form:l,name:ie,value:y}),(0,n.jsx)(`input`,{...Ae,suppressHydrationWarning:!0})]})}),process.env.NODE_ENV!==`production`&&(Rv.displayName=`CheckboxRoot`)})),Bv,Vv=p((()=>{Iv(),J(),Cv(),yo(),vn(),mn(),Nh(),Bv=t.forwardRef(function(e,n){let{render:r,className:i,style:a,keepMounted:o=!1,...s}=e,c=Pv(),l=c.checked||c.indeterminate,{mounted:u,transitionStatus:d,setMounted:f}=_n(l),p=t.useRef(null),m={...c,transitionStatus:d};vo({open:l,ref:p,onComplete(){l||f(!1)}});let h=Sv(c),g=t.useMemo(()=>({...h,...pn,...Mh}),[h]),_=o||u,v=q(`span`,e,{ref:[n,p],state:m,stateAttributesMapping:g,props:s});return _?v:null}),process.env.NODE_ENV!==`production`&&(Bv.displayName=`CheckboxIndicator`)})),Hv=p((()=>{zv(),Vv()})),Uv=p((()=>{Hv()}));function Wv(e){let{allValues:n=Gv,value:r=Gv,onValueChange:i}=e,a=t.useRef(r),o=t.useRef(new Map),[s,c]=t.useState(`mixed`),l=Yt(),u=r.length===n.length,d=r.length!==n.length&&r.length>0,f=O(i),p=t.useCallback(()=>({id:l,indeterminate:d,checked:u,"aria-controls":n.map(e=>`${l}-${e}`).join(` `),onCheckedChange(e,t){let i=a.current,l=n.filter(e=>o.current.get(e)&&i.includes(e)),u=n.filter(e=>!o.current.get(e)||o.current.get(e)&&i.includes(e));if(i.length===u.length||i.length===0){r.length===u.length?f(l,t):f(u,t);return}s===`mixed`?(f(u,t),c(`on`)):s===`on`?(f(l,t),c(`off`)):s===`off`&&(f(i,t),c(`mixed`))}}),[n,u,l,d,f,s,r.length]),m=t.useCallback(e=>({checked:r.includes(e),onCheckedChange(t,n){let i=r.slice();t?i.push(e):i.splice(i.indexOf(e),1),a.current=i,f(i,n),c(`mixed`)}}),[f,r]);return t.useMemo(()=>({id:l,indeterminate:d,getParentProps:p,getChildProps:m,disabledStatesRef:o}),[l,d,p,m])}var Gv,Kv=p((()=>{N(),Xt(),Gv=[]}));function qv(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}var Jv=p((()=>{})),Yv,Xv=p((()=>{w(),N(),De(),Xt(),J(),Nv(),Ih(),Rh(),Wh(),Nh(),zv(),Kv(),Vh(),Kp(),Jv(),Yv=t.forwardRef(function(e,r){let{allValues:i,className:a,defaultValue:o,disabled:s=!1,id:c,onValueChange:l,render:u,value:d,style:f,...p}=e,{disabled:m,name:h,state:g,validation:_,setFilled:v,setDirty:y,shouldValidateOnChange:b,validityData:x}=Ph(),{labelId:C,getDescriptionProps:w}=Hh(),{clearErrors:T}=zh(),E=m||s,D=t.useMemo(()=>{if(d===void 0)return o??[]},[d,o]),[k,A]=S({controlled:d,default:D,name:`CheckboxGroup`,state:`value`}),j=O((e,t)=>{l?.(e,t),!t.isCanceled&&A(e)}),M=Wv({allValues:i,value:k,onValueChange:j}),N=Yt(c),P=t.useRef(null),F=t.useCallback(e=>{P.current==null&&e!=null&&!e.hasAttribute(`data-parent`)&&(P.current=e)},[]);Lh(P,{enabled:!!h,id:N,value:k});let I=k??Te;Gp(I,()=>{h&&T(h);let e=Array.isArray(x.initialValue)?x.initialValue:Te;v(I.length>0),y(!qv(I,e)),b()?_.commit(I):_.commit(I,!0)});let L={...g,disabled:E},R=t.useMemo(()=>({allValues:i,value:k,defaultValue:D,setValue:j,parent:M,disabled:E,validation:_,registerControlRef:F}),[i,k,D,j,M,E,_,F]),ee=q(`div`,e,{state:L,ref:r,props:[{role:`group`,"aria-labelledby":C},w,p],stateAttributesMapping:Mh});return(0,n.jsx)(Mv.Provider,{value:R,children:ee})}),process.env.NODE_ENV!==`production`&&(Yv.displayName=`CheckboxGroup`)})),Zv=p((()=>{Xv()})),Qv,$v=p((()=>{Rn(),mn(),Qv={...Ln,...pn}})),ey,ty=p((()=>{N(),J(),bn(),Cn(),$v(),ey=t.forwardRef(function(e,r){let{render:i,className:a,defaultOpen:o=!1,disabled:s=!1,onOpenChange:c,open:l,style:u,...d}=e,f=O(c),p=yn({open:l,defaultOpen:o,onOpenChange:f,disabled:s}),m=t.useMemo(()=>({open:p.open,disabled:p.disabled,transitionStatus:p.transitionStatus}),[p.open,p.disabled,p.transitionStatus]),h=t.useMemo(()=>({...p,onOpenChange:f,state:m}),[p,f,m]),g=q(`div`,e,{state:m,ref:r,props:d,stateAttributesMapping:Qv});return(0,n.jsx)(Sn.Provider,{value:h,children:g})}),process.env.NODE_ENV!==`production`&&(ey.displayName=`CollapsibleRoot`)})),ny,ry,iy=p((()=>{Rn(),mn(),J(),Ar(),Cn(),ny={...In,...pn},ry=t.forwardRef(function(e,n){let{panelId:r,open:i,handleTrigger:a,state:o,disabled:s}=xn(),{className:c,disabled:l=s,id:u,render:d,nativeButton:f=!0,style:p,...m}=e,{getButtonProps:h,buttonRef:g}=Er({disabled:l,focusableWhenDisabled:!0,native:f}),_=t.useMemo(()=>({"aria-controls":i?r:void 0,"aria-expanded":i,onClick:a}),[r,i,a]);return q(`button`,e,{state:o,ref:[n,g],props:[_,m,h],stateAttributesMapping:ny})}),process.env.NODE_ENV!==`production`&&(ry.displayName=`CollapsibleTrigger`)})),ay,oy=p((()=>{ay=function(e){return e.collapsiblePanelHeight=`--collapsible-panel-height`,e.collapsiblePanelWidth=`--collapsible-panel-width`,e}({})})),sy,cy=p((()=>{I(),ee(),J(),Cn(),$v(),ho(),oy(),yo(),sy=t.forwardRef(function(e,n){let{className:r,hiddenUntilFound:i,keepMounted:a,render:o,id:s,style:c,...l}=e;process.env.NODE_ENV!==`production`&&F(()=>{i&&a===!1&&L("The `keepMounted={false}` prop on a Collapsible will be ignored when using `hiddenUntilFound` since it requires the Panel to remain mounted even when closed.")},[i,a]);let{abortControllerRef:u,animationTypeRef:d,height:f,mounted:p,onOpenChange:m,open:h,panelId:g,panelRef:_,runOnceAnimationsFinish:v,setDimensions:y,setHiddenUntilFound:b,setKeepMounted:x,setMounted:S,setPanelIdState:C,setOpen:w,setVisible:T,state:E,transitionDimensionRef:D,visible:O,width:k,transitionStatus:A}=xn(),j=i??!1,M=a??!1;F(()=>{if(s)return C(s),()=>{C(void 0)}},[s,C]),F(()=>{b(j)},[b,j]),F(()=>{x(M)},[x,M]);let{props:N}=mo({abortControllerRef:u,animationTypeRef:d,externalRef:n,height:f,hiddenUntilFound:j,id:g,keepMounted:M,mounted:p,onOpenChange:m,open:h,panelRef:_,runOnceAnimationsFinish:v,setDimensions:y,setMounted:S,setOpen:w,setVisible:T,transitionDimensionRef:D,visible:O,width:k});vo({open:h&&A===`idle`,ref:_,onComplete(){h&&y({height:void 0,width:void 0})}});let P=q(`div`,e,{state:t.useMemo(()=>({...E,transitionStatus:A}),[E,A]),ref:[n,_],props:[N,{style:{[ay.collapsiblePanelHeight]:f===void 0?`auto`:`${f}px`,[ay.collapsiblePanelWidth]:k===void 0?`auto`:`${k}px`}},l],stateAttributesMapping:Qv});return M||j||p?P:null}),process.env.NODE_ENV!==`production`&&(sy.displayName=`CollapsiblePanel`)})),ly=p((()=>{ty(),iy(),cy()})),uy=p((()=>{ly()}));function dy(e){let{multiple:t=!1,defaultValue:r,value:i,onValueChange:a,autoComplete:o,...s}=e;return(0,n.jsx)(ag,{...s,selectionMode:t?`multiple`:`single`,selectedValue:i,defaultSelectedValue:r,onSelectedValueChange:a,formAutoComplete:o})}var fy=p((()=>{og()}));function py(e,t){let n=Yt(e);return F(()=>(t(n),()=>{t(void 0)}),[n,t]),n}var my=p((()=>{I(),Xt()}));function hy(e){let{children:r,placeholder:i}=e,a=eh(),o=$(a,wh.itemToStringLabel),s=$(a,wh.selectedValue),c=$(a,wh.items),l=$(a,wh.selectionMode)===`multiple`,u=$(a,wh.hasSelectedValue),d=!u&&i!=null&&r==null,f=$(a,wh.hasNullItemLabel,d),p=null;return p=typeof r==`function`?r(s):r??(!u&&i!=null&&!f?i:l&&Array.isArray(s)?Sh(s,c,o):xh(s,c,o)),(0,n.jsx)(t.Fragment,{children:p})}var gy=p((()=>{Mf(),ch(),Ch(),Th()})),_y,vy,yy=p((()=>{z_(),vn(),yo(),J(),mn(),_y=t.forwardRef(function(e,t){let r=e.keepMounted??!1,{selected:i}=L_();return r||i?(0,n.jsx)(vy,{...e,ref:t}):null}),process.env.NODE_ENV!==`production`&&(_y.displayName=`ComboboxItemIndicator`),vy=t.memo(t.forwardRef((e,n)=>{let{render:r,className:i,style:a,keepMounted:o,...s}=e,{selected:c}=L_(),l=t.useRef(null),{transitionStatus:u,setMounted:d}=_n(c),f=q(`span`,e,{ref:[n,l],state:{selected:c,transitionStatus:u},props:[{"aria-hidden":!0,children:`✔️`},s],stateAttributesMapping:pn});return vo({open:c,ref:l,onComplete(){c||d(!1)}}),f})),process.env.NODE_ENV!==`production`&&(vy.displayName=`Inner`)})),by,xy=p((()=>{Mf(),De(),J(),Cg(),U(),ch(),Th(),Mg(),by=t.forwardRef(function(e,r){let{render:i,className:a,style:o,...s}=e,c=eh(),l=$(c,wh.open),u=$(c,wh.hasSelectionChips),[d,f]=t.useState(void 0);l&&d!==void 0&&f(void 0);let p=t.useRef([]),m=q(`div`,e,{ref:[r,c.state.chipsContainerRef],props:[u?{role:`toolbar`}:Ee,{onMouseDown(e){jg(e,c,c.state.disabled,c.state.readOnly)}},s]}),h=t.useMemo(()=>({highlightedChipIndex:d,setHighlightedChipIndex:f,chipsRef:p}),[d,f,p]);return(0,n.jsx)(Sg.Provider,{value:h,children:(0,n.jsx)(te,{elementsRef:p,children:m})})}),process.env.NODE_ENV!==`production`&&(by.displayName=`ComboboxChips`)}));function Sy(){let e=t.useContext(Cy);if(!e)throw Error(process.env.NODE_ENV===`production`?G(17):`useComboboxChipContext must be used within a ComboboxChip`);return e}var Cy,wy=p((()=>{K(),Cy=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Cy.displayName=`ComboboxChipContext`)})),Ty,Ey=p((()=>{Mf(),J(),Cg(),ch(),En(),wy(),Ra(),Th(),Rt(),It(),Ty=t.forwardRef(function(e,i){let{render:a,className:o,style:s,...c}=e,l=eh(),{setHighlightedChipIndex:u,chipsRef:d}=xg(),f=$(l,wh.disabled),p=$(l,wh.readOnly),m=$(l,wh.selectedValue),{ref:h,index:g}=wn();function _(e){let t=g;if(e.key===`ArrowLeft`)e.preventDefault(),t=g>0?g-1:void 0;else if(e.key===`ArrowRight`)e.preventDefault(),t=g<d.current.length-1?g+1:void 0;else if(e.key===`Backspace`||e.key===`Delete`){let n=g>=m.length-1?m.length-2:g;t=n>=0?n:void 0,hi(e),l.state.setIndices({activeIndex:null,selectedIndex:null,type:`keyboard`}),l.state.setSelectedValue(m.filter((e,t)=>t!==g),Y(at,e.nativeEvent))}else e.key===`Enter`||e.key===` `?(hi(e),t=void 0):e.key===`ArrowDown`||e.key===`ArrowUp`?(hi(e),l.state.setOpen(!0,Y(Tt,e.nativeEvent)),t=void 0):e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&(t=void 0);return t}let v=q(`div`,e,{ref:[i,h],state:{disabled:f},props:[{tabIndex:-1,"aria-disabled":f||void 0,"aria-readonly":p||void 0,onKeyDown(e){if(f||p)return;let t=_(e);r.flushSync(()=>{u(t)}),t===void 0?l.state.inputRef.current?.focus():d.current[t]?.focus()}},c]}),y=t.useMemo(()=>({index:g}),[g]);return(0,n.jsx)(Cy.Provider,{value:y,children:v})}),process.env.NODE_ENV!==`production`&&(Ty.displayName=`ComboboxChip`)})),Dy,Oy=p((()=>{Mf(),J(),ch(),wy(),Ar(),Ra(),Th(),Rt(),It(),mh(),Dy=t.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,style:o,...s}=e,c=eh(),{index:l}=Sy(),u=$(c,wh.disabled),d=$(c,wh.readOnly),f=$(c,wh.selectedValue),p=$(c,wh.isItemEqualToValue),m=u||i,{buttonRef:h,getButtonProps:g}=Er({native:a,disabled:m||d,focusableWhenDisabled:!0}),_={disabled:m};function v(e){let t=c.state.activeIndex;if(t==null)return;let n=dh(c.state.valuesRef.current,e,p);n!==-1&&t===n&&c.state.setIndices({activeIndex:null,type:c.state.keyboardActiveRef.current?`keyboard`:`pointer`})}function y(e){let t=Y(pt,e.nativeEvent),n=f[l];return v(n),c.state.setSelectedValue(f.filter((e,t)=>t!==l),t),c.state.inputRef.current?.focus(),t}return q(`button`,e,{ref:[t,h],state:_,props:[{tabIndex:-1,onMouseDown(e){e.preventDefault()},onClick(e){m||d||y(e).isPropagationAllowed||e.stopPropagation()},onKeyDown(e){m||d||(e.key===`Enter`||e.key===` `)&&(y(e).isPropagationAllowed||hi(e))}},s,g]})}),process.env.NODE_ENV!==`production`&&(Dy.displayName=`ComboboxChipRemove`)})),ky=p((()=>{Q_()})),Ay=p((()=>{fy(),x(),Ut(),Mf(),J(),Ih(),Nh(),br(),da(),N(),Ra(),my(),Wh(),hg(),ch(),Th(),gy(),Ag(),Pg(),vg(),qg(),$g(),i_(),ym(),mn(),E_(),k_(),Eg(),Ig(),P_(),I_(),W_(),yy(),xy(),Ey(),Oy(),J_(),Gg(),X_(),zg(),ky(),tg()})),jy=p((()=>{Ay()}));function My(e=!0){let n=t.useContext(Ny);if(n===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?G(25):`Base UI: ContextMenuRootContext is missing. ContextMenu parts must be placed within <ContextMenu.Root>.`);return n}var Ny,Py=p((()=>{K(),Ny=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Ny.displayName=`ContextMenuRootContext`)}));function Fy(e){let n=t.useContext(Iy);if(n===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?G(33):`Base UI: MenuPositionerContext is missing. MenuPositioner parts must be placed within <Menu.Positioner>.`);return n}var Iy,Ly=p((()=>{K(),Iy=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Iy.displayName=`MenuPositionerContext`)}));function Ry(e){let n=t.useContext(zy);if(n===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?G(36):`Base UI: MenuRootContext is missing. Menu parts must be placed within <Menu.Root>.`);return n}var zy,By=p((()=>{K(),zy=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(zy.displayName=`MenuRootContext`)}));function Vy(){let e=t.useContext(Hy);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(30):`Base UI: MenuCheckboxItemContext is missing. MenuCheckboxItem parts must be placed within <Menu.CheckboxItem>.`);return e}var Hy,Uy=p((()=>{K(),Hy=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Hy.displayName=`MenuCheckboxItemContext`)}));function Wy(e){let{closeOnClick:n,highlighted:r,id:i,nodeId:a,store:o,typingRef:s,itemRef:c,itemMetadata:l}=e,{events:u}=o.useState(`floatingTreeRoot`),d=My(!0),f=d!==void 0;return t.useMemo(()=>({id:i,role:`menuitem`,tabIndex:r?0:-1,onKeyDown(e){e.key===` `&&s?.current&&e.preventDefault()},onMouseMove(e){a&&u.emit(`itemhover`,{nodeId:a,target:e.currentTarget})},onClick(e){n&&u.emit(`close`,{domEvent:e,reason:ut})},onMouseUp(e){if(d){let t=d.initialCursorPointRef.current;if(d.initialCursorPointRef.current=null,f&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1||f&&!Ur&&e.button===2)return}c.current&&o.context.allowMouseUpTriggerRef.current&&(!f||e.button===2)&&(!l||l.type===`regular-item`)&&c.current.click()}}),[n,r,i,u,a,o,s,c,d,f,l])}var Gy=p((()=>{Gr(),It(),Py()}));function Ky(e){let{closeOnClick:n,disabled:r=!1,highlighted:i,id:a,store:o,typingRef:s=o.context.typingRef,nativeButton:c,itemMetadata:l,nodeId:u}=e,d=t.useRef(null),{getButtonProps:f,buttonRef:p}=Er({disabled:r,focusableWhenDisabled:!0,native:c,composite:!0}),m=Wy({closeOnClick:n,highlighted:i,id:a,nodeId:u,store:o,typingRef:s,itemRef:d,itemMetadata:l}),h=t.useCallback(e=>Pe(m,{onMouseEnter(){l.type===`submenu-trigger`&&l.setActive()}},e,f),[m,f,l]),g=ue(d,p);return t.useMemo(()=>({getItemProps:h,itemRef:g}),[h,g])}var qy,Jy=p((()=>{ge(),Ar(),Xe(),Gy(),qy={type:`regular-item`}})),Yy,Xy=p((()=>{Yy=function(e){return e.checked=`data-checked`,e.unchecked=`data-unchecked`,e.disabled=`data-disabled`,e.highlighted=`data-highlighted`,e}({})})),Zy,Qy=p((()=>{mn(),Xy(),Zy={checked(e){return e?{[Yy.checked]:``}:{[Yy.unchecked]:``}},...pn}})),$y,eb=p((()=>{N(),w(),Uy(),Jy(),En(),By(),J(),Xt(),Qy(),Ly(),Rt(),It(),$y=t.forwardRef(function(e,r){let{render:i,className:a,id:o,label:s,nativeButton:c=!1,disabled:l=!1,closeOnClick:u=!1,checked:d,defaultChecked:f,onCheckedChange:p,style:m,...h}=e,g=wn({label:s}),_=Fy(!0),v=Yt(o),{store:y}=Ry(),b=y.useState(`isActive`,g.index),x=y.useState(`itemProps`),[C,w]=S({controlled:d,default:f??!1,name:`MenuCheckboxItem`,state:`checked`}),{getItemProps:T,itemRef:E}=Ky({closeOnClick:u,disabled:l,highlighted:b,id:v,store:y,nativeButton:c,nodeId:_?.context.nodeId,itemMetadata:qy}),D=t.useMemo(()=>({disabled:l,highlighted:b,checked:C}),[l,b,C]),k=q(`div`,e,{state:D,stateAttributesMapping:Zy,props:[x,{role:`menuitemcheckbox`,"aria-checked":C,onClick:O(e=>{let t={...Y(ut,e.nativeEvent),preventUnmountOnClose:()=>{}};p?.(!C,t),!t.isCanceled&&w(e=>!e)})},h,T],ref:[E,r,g.ref]});return(0,n.jsx)(Hy.Provider,{value:D,children:k})}),process.env.NODE_ENV!==`production`&&($y.displayName=`MenuCheckboxItem`)})),tb,nb=p((()=>{Uy(),J(),Qy(),vn(),yo(),tb=t.forwardRef(function(e,n){let{render:r,className:i,style:a,keepMounted:o=!1,...s}=e,c=Vy(),l=t.useRef(null),{transitionStatus:u,setMounted:d}=_n(c.checked);return vo({open:c.checked,ref:l,onComplete(){c.checked||d(!1)}}),q(`span`,e,{state:{checked:c.checked,disabled:c.disabled,highlighted:c.highlighted,transitionStatus:u},ref:[n,l],stateAttributesMapping:Zy,props:{"aria-hidden":!0,...s},enabled:o||c.checked})}),process.env.NODE_ENV!==`production`&&(tb.displayName=`MenuCheckboxItemIndicator`)}));function rb(){let e=t.useContext(ib);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(31):`Base UI: MenuGroupRootContext is missing. Menu group parts must be used within <Menu.Group>.`);return e}var ib,ab=p((()=>{K(),ib=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(ib.displayName=`MenuGroupContext`)})),ob,sb=p((()=>{J(),ab(),ob=t.forwardRef(function(e,r){let{render:i,className:a,style:o,...s}=e,[c,l]=t.useState(void 0),u=t.useMemo(()=>({setLabelId:l}),[l]),d=q(`div`,e,{ref:r,props:{role:`group`,"aria-labelledby":c,...s}});return(0,n.jsx)(ib.Provider,{value:u,children:d})}),process.env.NODE_ENV!==`production`&&(ob.displayName=`MenuGroup`)})),cb,lb=p((()=>{I(),J(),Xt(),ab(),cb=t.forwardRef(function(e,t){let{className:n,render:r,id:i,style:a,...o}=e,s=Yt(i),{setLabelId:c}=rb();return F(()=>(c(s),()=>{c(void 0)}),[c,s]),q(`div`,e,{ref:t,props:{id:s,role:`presentation`,...o}})}),process.env.NODE_ENV!==`production`&&(cb.displayName=`MenuGroupLabel`)})),ub,db=p((()=>{Jy(),By(),J(),Xt(),En(),Ly(),ub=t.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!0,style:l,...u}=e,d=wn({label:a}),f=Fy(!0),p=Yt(i),{store:m}=Ry(),h=m.useState(`isActive`,d.index),g=m.useState(`itemProps`),{getItemProps:_,itemRef:v}=Ky({closeOnClick:c,disabled:s,highlighted:h,id:p,store:m,nativeButton:o,nodeId:f?.context.nodeId,itemMetadata:qy});return q(`div`,e,{state:{disabled:s,highlighted:h},props:[g,u,_],ref:[v,t,d.ref]})}),process.env.NODE_ENV!==`production`&&(ub.displayName=`MenuItem`)}));function fb(e){let n=t.useContext(pb);if(n===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?G(69):`Base UI: ToolbarRootContext is missing. Toolbar parts must be placed within <Toolbar.Root>.`);return n}var pb,mb=p((()=>{K(),pb=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(pb.displayName=`ToolbarRootContext`)})),hb,gb,_b=p((()=>{Hp(),By(),Ly(),J(),ym(),mn(),yo(),Rt(),It(),mb(),co(),y_(),hb={...vm,...pn},gb=t.forwardRef(function(e,r){let{render:i,className:a,style:o,finalFocus:s,...c}=e,{store:l}=Ry(),{side:u,align:d}=Fy(),f=fb(!0)!=null,p=l.useState(`open`),m=l.useState(`transitionStatus`),h=l.useState(`popupProps`),g=l.useState(`mounted`),_=l.useState(`instantType`),v=l.useState(`activeTriggerElement`),y=l.useState(`parent`),b=l.useState(`lastOpenChangeReason`),x=l.useState(`rootId`),S=l.useState(`floatingRootContext`),C=l.useState(`floatingTreeRoot`),w=l.useState(`closeDelay`),T=l.useState(`activeTriggerElement`),E=y.type===`context-menu`;vo({open:p,ref:l.context.popupRef,onComplete(){p&&l.context.onOpenChangeComplete?.(!0)}}),t.useEffect(()=>{function e(e){l.setOpen(!1,Y(e.reason,e.domEvent))}return C.events.on(`close`,e),()=>{C.events.off(`close`,e)}},[C.events,l]);let D=l.useState(`hoverEnabled`),O=l.useState(`disabled`);dp(S,{enabled:D&&!O&&!E&&y.type!==`menubar`,closeDelay:w});let k={transitionStatus:m,side:u,align:d,open:p,nested:y.type===`menu`,instant:_},A=t.useCallback(e=>{l.set(`popupElement`,e)},[l]),j=q(`div`,e,{state:k,ref:[r,l.context.popupRef,A],stateAttributesMapping:hb,props:[h,{onKeyDown(e){f&&ro.has(e.key)&&e.stopPropagation()}},v_(m),c,{"data-rootownerid":x}]}),M=y.type===void 0||E;return(v||y.type===`menubar`&&b!==`outside-press`)&&(M=!0),(0,n.jsx)(lu,{context:S,modal:E,disabled:!g,returnFocus:s===void 0?M:s,initialFocus:y.type!==`menu`,restoreFocus:!0,externalTree:y.type===`menubar`?void 0:C,previousFocusableElement:T,nextFocusableElement:y.type===void 0?l.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:y.type===void 0?l.context.beforeContentFocusGuardRef:void 0,children:j})}),process.env.NODE_ENV!==`production`&&(gb.displayName=`MenuPopup`)}));function vb(){let e=t.useContext(yb);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(32):`Base UI: <Menu.Portal> is missing.`);return e}var yb,bb=p((()=>{K(),yb=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(yb.displayName=`MenuPortalContext`)})),xb,Sb=p((()=>{Hp(),By(),bb(),xb=t.forwardRef(function(e,t){let{keepMounted:r=!1,...i}=e,{store:a}=Ry();return a.useState(`mounted`)||r?(0,n.jsx)(yb.Provider,{value:r,children:(0,n.jsx)(Ul,{ref:t,...i})}):null}),process.env.NODE_ENV!==`production`&&(xb.displayName=`MenuPortal`)})),Cb,wb=p((()=>{Rm(),I(),Nc(),Hp(),Ly(),By(),__(),U(),Bm(),bb(),Rl(),Py(),Rt(),It(),f_(),gn(),x_(),w_(),Cb=t.forwardRef(function(e,r){let{anchor:i,positionMethod:a=`absolute`,className:o,render:s,side:c,align:l,sideOffset:u=0,alignOffset:d=0,collisionBoundary:f=`clipping-ancestors`,collisionPadding:p=5,arrowPadding:m=5,sticky:h=!1,disableAnchorTracking:g=!1,collisionAvoidance:_=Fl,style:v,...y}=e,{store:b}=Ry(),x=vb(),S=My(!0),C=b.useState(`parent`),w=b.useState(`floatingRootContext`),T=b.useState(`floatingTreeRoot`),E=b.useState(`mounted`),D=b.useState(`open`),O=b.useState(`modal`),k=b.useState(`openMethod`),A=b.useState(`activeTriggerElement`),j=b.useState(`transitionStatus`),M=b.useState(`positionerElement`),N=b.useState(`instantType`),P=b.useState(`hasViewport`),I=b.useState(`lastOpenChangeReason`),L=b.useState(`floatingNodeId`),R=b.useState(`floatingParentNodeId`),ee=w.useState(`domReferenceElement`),z=t.useRef(null),B=hn(M,!1,!1),V=i,ne=u,H=d,re=l,U=_;C.type===`context-menu`&&(V=i??C.context?.anchor,re??=`start`,!c&&re!==`center`&&(H=e.alignOffset??2,ne=e.sideOffset??-5));let W=c,ie=re;C.type===`menu`?(W??=`inline-end`,ie??=`start`,U=e.collisionAvoidance??Il):C.type===`menubar`&&(W??=`bottom`,ie??=`start`);let ae=C.type===`context-menu`,oe=h_({anchor:V,floatingRootContext:w,positionMethod:S?`fixed`:a,mounted:E,side:W,sideOffset:ne,align:ie,alignOffset:H,arrowPadding:ae?0:m,collisionBoundary:f,collisionPadding:p,sticky:h,nodeId:L,keepMounted:x,disableAnchorTracking:g,collisionAvoidance:U,shiftCrossAxis:ae&&!(`side`in U&&U.side===`flip`),externalTree:T,adaptiveOrigin:P?d_:void 0});t.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===L&&b.set(`hoverEnabled`,!1),e.nodeId!==L&&e.parentNodeId===b.select(`floatingParentNodeId`)&&b.setOpen(!1,Y(At)))}return T.events.on(`menuopenchange`,e),()=>{T.events.off(`menuopenchange`,e)}},[b,T.events,L]),t.useEffect(()=>{if(b.select(`floatingParentNodeId`)==null)return;function e(e){if(e.open||e.nodeId!==b.select(`floatingParentNodeId`))return;let t=e.reason??`sibling-open`;b.setOpen(!1,Y(t))}return T.events.on(`menuopenchange`,e),()=>{T.events.off(`menuopenchange`,e)}},[T.events,b]);let G=Ac();t.useEffect(()=>{D||G.clear()},[D,G]),t.useEffect(()=>{function e(e){if(!(!D||e.nodeId!==b.select(`floatingParentNodeId`)))if(e.target&&A&&A!==e.target){let e=b.select(`closeDelay`);e>0?G.isStarted()||G.start(e,()=>{b.setOpen(!1,Y(At))}):b.setOpen(!1,Y(At))}else G.clear()}return T.events.on(`itemhover`,e),()=>{T.events.off(`itemhover`,e)}},[T.events,D,A,b,G]),t.useEffect(()=>{let e={open:D,nodeId:L,parentNodeId:R,reason:b.select(`lastOpenChangeReason`)};T.events.emit(`menuopenchange`,e)},[T.events,D,b,L,R]),F(()=>{let e=ee,t=z.current;if(e&&(z.current=e),t&&e&&e!==t){b.set(`instantType`,void 0);let e=new AbortController;return B(()=>{b.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[ee,B,b]);let K={open:D,side:oe.side,align:oe.align,anchorHidden:oe.anchorHidden,nested:C.type===`menu`,instant:N},se=C.type===`menubar`&&C.context.modal;S_(D&&(se||O&&I!==`trigger-hover`),k===`touch`,M,A);let ce=b_(e,K,{styles:oe.positionerStyles,transitionStatus:j,props:y,refs:[r,b.useStateSetter(`positionerElement`)],hidden:!E,inert:!D}),le=E&&C.type!==`menu`&&(C.type!==`menubar`&&O&&I!==`trigger-hover`||C.type===`menubar`&&C.context.modal),ue=null;return C.type===`menubar`?ue=C.context.contentElement:C.type===void 0&&(ue=A),(0,n.jsxs)(Iy.Provider,{value:oe,children:[le&&(0,n.jsx)(zm,{ref:C.type===`context-menu`||C.type===`nested-context-menu`?C.context.internalBackdropRef:null,inert:Lm(!D),cutout:ue}),(0,n.jsx)(Xl,{id:L,children:(0,n.jsx)(te,{elementsRef:b.context.itemDomElements,labelsRef:b.context.itemLabels,children:ce})})]})}),process.env.NODE_ENV!==`production`&&(Cb.displayName=`MenuPositioner`)}));function Tb(){let e=t.useContext(Eb);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(34):`Base UI: MenuRadioGroupContext is missing. MenuRadioGroup parts must be placed within <Menu.RadioGroup>.`);return e}var Eb,Db=p((()=>{K(),Eb=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Eb.displayName=`MenuRadioGroupContext`)})),Ob,kb=p((()=>{w(),N(),Db(),J(),Ob=t.memo(t.forwardRef(function(e,r){let{render:i,className:a,value:o,defaultValue:s,onValueChange:c,disabled:l=!1,style:u,...d}=e,[f,p]=S({controlled:o,default:s,name:`MenuRadioGroup`}),m=O(c),h=O((e,t)=>{m?.(e,t),!t.isCanceled&&p(e)}),g=q(`div`,e,{state:{disabled:l},ref:r,props:{role:`group`,"aria-disabled":l||void 0,...d}}),_=t.useMemo(()=>({value:f,setValue:h,disabled:l}),[f,h,l]);return(0,n.jsx)(Eb.Provider,{value:_,children:g})})),process.env.NODE_ENV!==`production`&&(Ob.displayName=`MenuRadioGroup`)}));function Ab(){let e=t.useContext(jb);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(35):`Base UI: MenuRadioItemContext is missing. MenuRadioItem parts must be placed within <Menu.RadioItem>.`);return e}var jb,Mb=p((()=>{K(),jb=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(jb.displayName=`MenuRadioItemContext`)})),Nb,Pb=p((()=>{N(),By(),J(),Xt(),Db(),Mb(),Qy(),En(),Jy(),Ly(),Rt(),It(),Nb=t.forwardRef(function(e,r){let{render:i,className:a,id:o,label:s,nativeButton:c=!1,disabled:l=!1,closeOnClick:u=!1,value:d,style:f,...p}=e,m=wn({label:s}),h=Fy(!0),g=Yt(o),{store:_}=Ry(),v=_.useState(`isActive`,m.index),y=_.useState(`itemProps`),{value:b,setValue:x,disabled:S}=Tb(),C=S||l,w=b===d,{getItemProps:T,itemRef:E}=Ky({closeOnClick:u,disabled:C,highlighted:v,id:g,store:_,nativeButton:c,nodeId:h?.context.nodeId,itemMetadata:qy}),D=t.useMemo(()=>({disabled:C,highlighted:v,checked:w}),[C,v,w]),k=q(`div`,e,{state:D,stateAttributesMapping:Zy,props:[y,{role:`menuitemradio`,"aria-checked":w,onClick:O(e=>{x(d,{...Y(ut,e.nativeEvent),preventUnmountOnClose:()=>{}})})},p,T],ref:[E,r,m.ref]});return(0,n.jsx)(jb.Provider,{value:D,children:k})}),process.env.NODE_ENV!==`production`&&(Nb.displayName=`MenuRadioItem`)})),Fb,Ib=p((()=>{Mb(),J(),Qy(),vn(),yo(),Fb=t.forwardRef(function(e,n){let{render:r,className:i,style:a,keepMounted:o=!1,...s}=e,c=Ab(),l=t.useRef(null),{transitionStatus:u,setMounted:d}=_n(c.checked);return vo({open:c.checked,ref:l,onComplete(){c.checked||d(!1)}}),q(`span`,e,{state:{checked:c.checked,disabled:c.disabled,highlighted:c.highlighted,transitionStatus:u},stateAttributesMapping:Zy,ref:[n,l],props:{"aria-hidden":!0,...s},enabled:o||c.checked})}),process.env.NODE_ENV!==`production`&&(Fb.displayName=`MenuRadioItemIndicator`)}));function Lb(e){let n=t.useContext(Rb);if(n===null&&!e)throw Error(process.env.NODE_ENV===`production`?G(5):`Base UI: MenubarContext is missing. Menubar parts must be placed within <Menubar>.`);return n}var Rb,zb=p((()=>{K(),Rb=t.createContext(null),process.env.NODE_ENV!==`production`&&(Rb.displayName=`MenubarContext`)}));function Bb(){return{...Gf(),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new ql,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Ee,keyboardEventRelay:void 0,closeDelay:0,hasViewport:!1}}var Vb,Hb,Ub=p((()=>{Mf(),De(),D(),Jl(),Yf(),Vb={...qf,disabled:Q(e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled),modal:Q(e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0)),openMethod:Q(e=>e.openMethod),allowMouseEnter:Q(e=>e.allowMouseEnter),stickIfOpen:Q(e=>e.stickIfOpen),parent:Q(e=>e.parent),rootId:Q(e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId),activeIndex:Q(e=>e.activeIndex),isActive:Q((e,t)=>e.activeIndex===t),hoverEnabled:Q(e=>e.hoverEnabled),instantType:Q(e=>e.instantType),lastOpenChangeReason:Q(e=>e.openChangeReason),floatingTreeRoot:Q(e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot),floatingNodeId:Q(e=>e.floatingNodeId),floatingParentNodeId:Q(e=>e.floatingParentNodeId),itemProps:Q(e=>e.itemProps),closeDelay:Q(e=>e.closeDelay),hasViewport:Q(e=>e.hasViewport),keyboardEventRelay:Q(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)})},Hb=class e extends Df{constructor(e){super({...Bb(),...e},{positionerRef:t.createRef(),popupRef:t.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:t.createRef(),beforeContentFocusGuardRef:t.createRef(),onOpenChangeComplete:void 0,triggerElements:new Vf},Vb),this.unsubscribeParentListener=this.observe(`parent`,e=>{if(this.unsubscribeParentListener?.(),e.type===`menu`){let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);this.unsubscribeParentListener=e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);t===i&&n===a&&r===o||(t=i,n=a,r=o,this.notifyAll())}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}static useStore(t,n){let r=T(()=>new e(n)).current;return t??r}unsubscribeParentListener=null}}));function Wb(){return t.useContext(Gb)}var Gb,Kb=p((()=>{Gb=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Gb.displayName=`MenuSubmenuRootContext`)})),qb,Jb=p((()=>{Nc(),N(),Jt(),I(),kc(),De(),yf(),Hp(),By(),zb(),Rl(),ae(),Jp(),Rt(),It(),Py(),Xe(),Ub(),Yf(),Kb(),qb=mf(function(e){let{children:r,open:i,onOpenChange:a,onOpenChangeComplete:o,defaultOpen:s=!1,disabled:c=!1,modal:l,loopFocus:u=!0,orientation:d=`vertical`,actionsRef:f,closeParentOnEsc:p=!1,handle:m,triggerId:h,defaultTriggerId:g=null,highlightItemOnHover:_=!0}=e,v=My(!0),y=Ry(!0),b=Lb(!0),x=Wb(),S=t.useMemo(()=>x&&y?{type:`menu`,store:y.store}:b?{type:`menubar`,context:b}:v&&!y?{type:`context-menu`,context:v}:{type:void 0},[v,y,b,x]),C=Hb.useStore(m?.store,{open:s,openProp:i,activeTriggerId:g,triggerIdProp:h,parent:S});Oc(()=>{i===void 0&&C.state.open===!1&&s===!0&&C.update({open:!0,activeTriggerId:g})}),C.useControlledProp(`openProp`,i),C.useControlledProp(`triggerIdProp`,h),C.useContextCallback(`onOpenChangeComplete`,o);let w=C.useState(`floatingTreeRoot`),T=Yl(w),E=eu();F(()=>{v&&!y?C.update({parent:{type:`context-menu`,context:v},floatingNodeId:T,floatingParentNodeId:E}):y&&C.update({floatingNodeId:T,floatingParentNodeId:E})},[v,y,T,E,C]);let D=C.useState(`open`),k=C.useState(`activeTriggerElement`),A=C.useState(`positionerElement`),j=C.useState(`hoverEnabled`),M=C.useState(`disabled`),N=C.useState(`lastOpenChangeReason`),P=C.useState(`parent`),I=C.useState(`activeIndex`),L=C.useState(`payload`),R=C.useState(`floatingParentNodeId`),ee=t.useRef(null),z=R!=null;process.env.NODE_ENV!==`production`&&P.type!==void 0&&l!==void 0&&console.warn("Base UI: The `modal` prop is not supported on nested menus. It will be ignored.");let{openMethod:B,triggerProps:V}=qp(D);C.useSyncedValues({disabled:c,modal:P.type===void 0?l:void 0,openMethod:B,rootId:Gt()}),Rf(C);let{forceUnmount:te}=zf(D,C,()=>{C.update({allowMouseEnter:!1,stickIfOpen:!0})}),ne=t.useRef(P.type!==`context-menu`),H=Ac();t.useEffect(()=>{if(D||(ee.current=null),P.type===`context-menu`){if(!D){H.clear(),ne.current=!1;return}H.start(500,()=>{ne.current=!0})}},[H,D,P.type]),F(()=>{!D&&!j&&C.set(`hoverEnabled`,!0)},[D,j,C]);let re=t.useRef(!0),U=Ac(),ie=O((e,t)=>{let n=t.reason;if(D===e&&t.trigger===k&&N===n||(t.preventUnmountOnClose=()=>{C.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&(t.trigger=k??void 0),a?.(e,t),t.isCanceled))return;C.state.floatingRootContext.dispatchOpenChange(e,t);let r=t.event;if(e===!1&&r?.type===`click`&&r.pointerType===`touch`&&!re.current)return;if(!e&&I!==null){let e=C.context.itemDomElements.current[I];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}e&&n===`trigger-focus`?(re.current=!1,U.start(300,()=>{re.current=!0})):(re.current=!0,U.clear());let i=(n===`trigger-press`||n===`item-press`)&&r.detail===0&&r?.isTrusted,o=!e&&(n===`escape-key`||n==null),s={open:e,openChangeReason:n};ee.current=t.event??null;let c=t.trigger?.id??null;(c||e)&&(s.activeTriggerId=c,s.activeTriggerElement=t.trigger??null),C.update(s),P.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?C.set(`instantType`,`group`):i||o?C.set(`instantType`,i?`click`:`dismiss`):C.set(`instantType`,void 0)}),ae=t.useCallback(()=>{C.setOpen(!1,Y(Mt))},[C]);t.useImperativeHandle(f,()=>({unmount:te,close:ae}),[te,ae]);let oe;P.type===`context-menu`&&(oe=P.context),t.useImperativeHandle(oe?.positionerRef,()=>A,[A]),t.useImperativeHandle(oe?.actionsRef,()=>({setOpen:ie}),[ie]);let G=ep({popupStore:C,onOpenChange:ie}),K=G.context.events;t.useEffect(()=>{let e=({open:e,eventDetails:t})=>ie(e,t);return K.on(`setOpen`,e),()=>{K?.off(`setOpen`,e)}},[K,ie]);let se=xu(G,{enabled:!M,bubbles:{escapeKey:p&&P.type===`menu`},outsidePress(){return P.type!==`context-menu`||ee.current?.type===`contextmenu`?!0:ne.current},externalTree:z?w:void 0}),ce=Op(G,{role:`menu`}),le=W(),ue=t.useCallback(e=>{C.select(`activeIndex`)!==e&&C.set(`activeIndex`,e)},[C]),de=Tp(G,{enabled:!M,listRef:C.context.itemDomElements,activeIndex:I,nested:P.type!==void 0,loopFocus:u,orientation:d,parentOrientation:P.type===`menubar`?P.context.orientation:void 0,rtl:le===`rtl`,disabledIndices:Te,onNavigate:ue,openOnArrowKeyDown:P.type!==`context-menu`,externalTree:z?w:void 0,focusItemOnHover:_}),fe=t.useCallback(e=>{C.context.typingRef.current=e},[C]),{getReferenceProps:pe,getFloatingProps:me,getItemProps:he,getTriggerProps:ge}=gp([se,ce,de,jp(G,{listRef:C.context.itemLabels,elementsRef:C.context.itemDomElements,activeIndex:I,resetMs:500,onMatch:e=>{D&&e!==I&&C.set(`activeIndex`,e)},onTypingChange:fe})]),_e=t.useMemo(()=>{let e=Pe(pe(),{onMouseMove(){C.set(`allowMouseEnter`,!0)}},V);return delete e.role,e},[pe,C,V]),ve=t.useMemo(()=>{let e=ge();if(!e)return e;let t=Pe(e,V);return delete t.role,delete t[`aria-controls`],t},[ge,V]),ye=t.useMemo(()=>me({onMouseMove(){C.set(`allowMouseEnter`,!0),P.type===`menu`&&C.set(`hoverEnabled`,!1)},onClick(){C.select(`hoverEnabled`)&&C.set(`hoverEnabled`,!1)},onKeyDown(e){let t=C.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}}),[me,P.type,C]),be=t.useMemo(()=>he(),[he]);C.useSyncedValues({floatingRootContext:G,activeTriggerProps:_e,inactiveTriggerProps:ve,popupProps:ye,itemProps:be});let xe=t.useMemo(()=>({store:C,parent:S}),[C,S]),Se=(0,n.jsx)(zy.Provider,{value:xe,children:typeof r==`function`?r({payload:L}):r});return P.type===void 0||P.type===`context-menu`?(0,n.jsx)(Zl,{externalTree:w,children:Se}):Se}),process.env.NODE_ENV!==`production`&&(qb.displayName=`MenuRoot`)}));function Yb(e){let r=Ry().store,i=t.useMemo(()=>({parentMenu:r}),[r]);return(0,n.jsx)(Gb.Provider,{value:i,children:(0,n.jsx)(qb,{...e})})}var Xb=p((()=>{Jb(),By(),Kb()}));function Zb(e={}){let{highlightItemOnHover:n,highlightedIndex:r,onHighlightedIndexChange:i}=xr(),{ref:a,index:o}=wn(e),s=r===o,c=t.useRef(null),l=ue(a,c);return{compositeProps:t.useMemo(()=>({tabIndex:s?0:-1,onFocus(){i(o)},onMouseMove(){let e=c.current;if(!n||!e)return;let t=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!s&&!t&&e.focus()}}),[s,i,o,n]),compositeRef:l,index:o}}var Qb=p((()=>{ge(),Cr(),En()}));function $b(e){let{render:t,className:n,style:r,state:i=Ee,props:a=Te,refs:o=Te,metadata:s,stateAttributesMapping:c,tag:l=`div`,...u}=e,{compositeProps:d,compositeRef:f}=Zb({metadata:s});return q(l,e,{state:i,ref:[...o,f],props:[d,...a,u],stateAttributesMapping:c})}var ex=p((()=>{De(),J(),Qb()}));function tx(e){if(tr(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`)??void 0;if(!lr(e))return tx(fr(e))}var nx=p((()=>{br()}));function rx(e,n){let i=t.useRef(null);return{preFocusGuardRef:i,handlePreFocusGuardFocus:O(t=>{r.flushSync(()=>{e.setOpen(!1,Y(St,t.nativeEvent,t.currentTarget))}),Ma(i.current)?.focus()}),handleFocusTargetFocus:O(t=>{let i=e.select(`positionerElement`);if(i&&Na(t,i))e.context.beforeContentFocusGuardRef.current?.focus();else{r.flushSync(()=>{e.setOpen(!1,Y(St,t.nativeEvent,t.currentTarget))});let a=ja(e.context.triggerFocusTargetRef.current||n.current);for(;a!==null&&ei(i,a);){let e=a;if(a=Oa(a),a===e)break}a?.focus()}})}}var ix=p((()=>{N(),Ra(),Rt(),It()}));function ax(e){let{enabled:n=!0,mouseDownAction:r,open:i}=e,a=t.useRef(!1);return t.useMemo(()=>n?{onMouseDown:e=>{(r===`open`&&!i||r===`close`&&i)&&(a.current=!0,ua(e.currentTarget).addEventListener(`click`,()=>{a.current=!1},{once:!0}))},onClick:e=>{a.current&&(a.current=!1,e.preventBaseUIHandler())}}:Ee,[n,r,i])}var ox=p((()=>{da(),De()}));function sx(e,n){let r=Ac(),[i,a]=t.useState(!1);return F(()=>{e&&n===`trigger-hover`?(a(!0),r.start(500,()=>{a(!1)})):e||(r.clear(),a(!1))},[e,n,r]),i}function cx(){let e=My(!0),n=Ry(!0),r=Lb(!0);return t.useMemo(()=>r?{type:`menubar`,context:r}:e&&!n?{type:`context-menu`,context:e}:{type:void 0},[e,n,r])}var lx,ux,dx=p((()=>{K(),Nc(),da(),yf(),N(),I(),De(),Hp(),Jl(),Ra(),By(),ym(),J(),kr(),fg(),ex(),Cr(),nx(),Yf(),ix(),Xt(),It(),ox(),Py(),zb(),Rl(),ul(),lx=2,ux=hf(function(e,r){let{render:i,className:a,disabled:o=!1,nativeButton:s=!0,id:c,openOnHover:l,delay:u=100,closeDelay:d=0,handle:f,payload:p,style:m,...h}=e,g=Ry(!0),_=f?.store??g?.store;if(!_)throw Error(process.env.NODE_ENV===`production`?G(85):`Base UI: <Menu.Trigger> must be either used within a <Menu.Root> component or provided with a handle.`);let v=Yt(c),y=_.useState(`isTriggerActive`,v),b=_.useState(`floatingRootContext`),x=_.useState(`isOpenedByTrigger`,v),S=t.useRef(null),C=cx(),w=xr(!0),T=tu(),E=t.useMemo(()=>T??new ql,[T]),{registerTrigger:D,isMountedByThisTrigger:k}=Lf(v,S,_,{payload:p,closeDelay:d,parent:C,floatingTreeRoot:E,floatingNodeId:Yl(E),floatingParentNodeId:eu(),keyboardEventRelay:w?.relayKeyboardEvent}),A=C.type===`menubar`,j=_.useState(`disabled`),M=o||j||A&&C.context.disabled,{getButtonProps:N,buttonRef:P}=Er({disabled:M,native:s});t.useEffect(()=>{!x&&C.type===void 0&&(_.context.allowMouseUpTriggerRef.current=!1)},[_,x,C.type]);let F=t.useRef(null),I=Ac(),L=O(e=>{if(!F.current)return;I.clear(),_.context.allowMouseUpTriggerRef.current=!1;let t=e.target;if(ei(F.current,t)||ei(_.select(`positionerElement`),t)||t===F.current||t!=null&&tx(t)===_.select(`rootId`))return;let n=dg(F.current);e.clientX>=n.left-lx&&e.clientX<=n.right+lx&&e.clientY>=n.top-lx&&e.clientY<=n.bottom+lx||E.events.emit(`close`,{domEvent:e,reason:kt})});t.useEffect(()=>{x&&_.select(`lastOpenChangeReason`)===`trigger-hover`&&ua(F.current).addEventListener(`mouseup`,L,{once:!0})},[x,L,_]);let R=A&&C.context.hasSubmenuOpen,ee=pp(b,{enabled:(l??R)&&!M&&C.type!==`context-menu`&&(!A||R&&!k),handleClose:Lp({blockPointerEvents:!A}),mouseOnly:!0,move:!1,restMs:C.type===void 0?u:void 0,delay:{close:d},triggerElementRef:S,externalTree:E,isActiveTrigger:y,isClosing:()=>_.select(`transitionStatus`)===`ending`}),z=sx(x,_.select(`lastOpenChangeReason`)),B=pu(b,{enabled:!M&&C.type!==`context-menu`,event:x&&A?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:C.type===void 0?z:!1}),V=np(b,{enabled:!M&&R}),te=ax({open:x,enabled:A,mouseDownAction:`open`}),ne=gp([B,V]),H={disabled:M,open:x},re=_.useState(`triggerProps`,k),U=[F,r,P,D,S],W=[ne.getReferenceProps(),ee??Ee,re,{"aria-haspopup":`menu`,id:v,onMouseDown:e=>{_.select(`open`)||(I.start(200,()=>{_.context.allowMouseUpTriggerRef.current=!0}),ua(e.currentTarget).addEventListener(`mouseup`,L,{once:!0}))}},A?{role:`menuitem`}:{},te,h,N],{preFocusGuardRef:ie,handlePreFocusGuardFocus:ae,handleFocusTargetFocus:oe}=rx(_,S),K=q(`button`,e,{enabled:!A,stateAttributesMapping:_m,state:H,ref:U,props:W});return A?(0,n.jsx)($b,{tag:`button`,render:i,className:a,style:m,state:H,refs:U,props:W,stateAttributesMapping:_m}):x?(0,n.jsxs)(t.Fragment,{children:[(0,n.jsx)(ll,{ref:ie,onFocus:ae},`${v}-pre-focus-guard`),(0,n.jsx)(t.Fragment,{children:K},v),(0,n.jsx)(ll,{ref:_.context.triggerFocusTargetRef,onFocus:oe},`${v}-post-focus-guard`)]}):(0,n.jsx)(t.Fragment,{children:K},v)}),process.env.NODE_ENV!==`production`&&(ux.displayName=`MenuTrigger`)}));function fx(e){let[n,r]=t.useState({current:e,previous:null});return e!==n.current&&r({current:e,previous:n.current}),n.previous}var px=p((()=>{}));function mx(e){let t=ur(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=tr(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r;return(Hi(n)!==a||Hi(r)!==o)&&(n=a,r=o),{width:n,height:r}}var hx=p((()=>{Xi(),br()}));function gx(e){let{popupElement:n,positionerElement:r,content:i,mounted:a,enabled:o=xx,onMeasureLayout:s,onMeasureLayoutComplete:c,side:l,direction:u}=e,d=hn(n,!0,!1),f=en(),p=t.useRef(null),m=t.useRef(null),h=t.useRef(!0),g=t.useRef(we),_=O(s),v=O(c),y=t.useMemo(()=>{let e=l===`top`,t=l===`left`;return u===`rtl`?(e||=l===`inline-end`,t||=l===`inline-end`):(e||=l===`inline-start`,t||=l===`inline-start`),e?{position:`absolute`,[l===`top`?`bottom`:`top`]:`0`,[t?`right`:`left`]:`0`}:Ee},[l,u]);F(()=>{if(!a||!o()||typeof ResizeObserver!=`function`){g.current=we,h.current=!0,p.current=null,m.current=null;return}if(!n||!r)return;g.current=vx(n,y);let e=new ResizeObserver(e=>{let t=e[0];t&&(m.current={width:Math.ceil(t.borderBoxSize[0].inlineSize),height:Math.ceil(t.borderBoxSize[0].blockSize)})});e.observe(n),yx(n,`auto`);let t=_x(n,`position`,`static`),i=_x(n,`transform`,`none`),s=_x(n,`scale`,`1`),c=vx(r,{"--available-width":`max-content`,"--available-height":`max-content`});function l(){t(),i(),c()}function u(){l(),s()}if(_?.(),h.current||p.current===null){bx(r,`max-content`);let t=mx(n);return p.current=t,bx(r,t),u(),v?.(null,t),h.current=!1,()=>{e.disconnect(),g.current(),g.current=we}}yx(n,`auto`),bx(r,`max-content`);let b=p.current??m.current,x=mx(n);if(p.current=x,!b)return bx(r,x),u(),v?.(null,x),()=>{e.disconnect(),f.cancel(),g.current(),g.current=we};yx(n,b),u(),v?.(b,x),bx(r,x);let S=new AbortController;return f.request(()=>{yx(n,x),d(()=>{n.style.setProperty(`--popup-width`,`auto`),n.style.setProperty(`--popup-height`,`auto`)},S.signal)}),()=>{e.disconnect(),S.abort(),f.cancel(),g.current(),g.current=we}},[i,n,r,d,f,o,a,_,v,y])}function _x(e,t,n){let r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r)}}function vx(e,t){let n=[];for(let[r,i]of Object.entries(t))n.push(_x(e,r,i));return n.length?()=>{n.forEach(e=>e())}:we}function yx(e,t){let n=t===`auto`?`auto`:`${t.width}px`,r=t===`auto`?`auto`:`${t.height}px`;e.style.setProperty(`--popup-width`,n),e.style.setProperty(`--popup-height`,r)}function bx(e,t){let n=t===`max-content`?`max-content`:`${t.width}px`,r=t===`max-content`?`max-content`:`${t.height}px`;e.style.setProperty(`--positioner-width`,n),e.style.setProperty(`--positioner-height`,r)}var xx,Sx=p((()=>{sn(),I(),N(),De(),gn(),hx(),xx=()=>!0})),Cx=p((()=>{ae()})),wx=p((()=>{Cx()}));function Tx(e){let{store:i,side:a,cssVars:o,children:s}=e,c=W(),l=i.useState(`activeTriggerElement`),u=i.useState(`activeTriggerId`),d=i.useState(`open`),f=i.useState(`payload`),p=i.useState(`mounted`),m=i.useState(`popupElement`),h=i.useState(`positionerElement`),g=fx(d?l:null),_=kx(u,f),v=t.useRef(null),[y,b]=t.useState(null),[x,S]=t.useState(null),C=t.useRef(null),w=t.useRef(null),T=hn(C,!0,!1),E=en(),[D,k]=t.useState(null),[A,j]=t.useState(!1);F(()=>(i.set(`hasViewport`,!0),()=>{i.set(`hasViewport`,!1)}),[i]);let M=O(()=>{C.current?.style.setProperty(`animation`,`none`),C.current?.style.setProperty(`transition`,`none`),w.current?.style.setProperty(`display`,`none`)}),N=O(e=>{C.current?.style.removeProperty(`animation`),C.current?.style.removeProperty(`transition`),w.current?.style.removeProperty(`display`),e&&k(e)}),P=t.useRef(null);F(()=>{l&&g&&l!==g&&P.current!==l&&v.current&&(b(v.current),j(!0),S(Ox(g,l)),E.request(()=>{r.flushSync(()=>{j(!1)}),T(()=>{b(null),k(null),v.current=null})}),P.current=l)},[l,g,y,T,E]),F(()=>{let e=C.current;if(!e)return;let t=ua(e).createElement(`div`);for(let n of Array.from(e.childNodes))t.appendChild(n.cloneNode(!0));v.current=t});let I=y!=null,L;L=I?(0,n.jsxs)(t.Fragment,{children:[(0,n.jsx)(`div`,{"data-previous":!0,inert:Lm(!0),ref:w,style:{...D?{[o.popupWidth]:`${D.width}px`,[o.popupHeight]:`${D.height}px`}:null,position:`absolute`},"data-ending-style":A?void 0:``},`previous`),(0,n.jsx)(`div`,{"data-current":!0,ref:C,"data-starting-style":A?``:void 0,children:s},_)]}):(0,n.jsx)(`div`,{"data-current":!0,ref:C,children:s},_),F(()=>{let e=w.current;!e||!y||e.replaceChildren(...Array.from(y.childNodes))},[y]),gx({popupElement:m,positionerElement:h,mounted:p,content:f,onMeasureLayout:M,onMeasureLayoutComplete:N,side:a,direction:c});let R={activationDirection:Ex(x),transitioning:I};return{children:L,state:R}}function Ex(e){if(e)return`${Dx(e.horizontal,5,`right`,`left`)} ${Dx(e.vertical,5,`down`,`up`)}`}function Dx(e,t,n,r){return e>t?n:e<-t?r:``}function Ox(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i={x:n.left+n.width/2,y:n.top+n.height/2},a={x:r.left+r.width/2,y:r.top+r.height/2};return{horizontal:a.x-i.x,vertical:a.y-i.y}}function kx(e,n){let[r,i]=t.useState(0),a=t.useRef(e),o=t.useRef(n),s=t.useRef(!1);return F(()=>{let t=a.current,r=o.current,c=e!==t,l=n!==r;c?(i(e=>e+1),s.current=!l):s.current&&l&&(i(e=>e+1),s.current=!1),a.current=e,o.current=n},[e,n]),`${e??`current`}-${r}`}var Ax=p((()=>{Rm(),sn(),px(),I(),N(),da(),gn(),Sx(),wx()})),jx,Mx=p((()=>{K(),Jn(),I(),ee(),Ut(),Hp(),By(),Xt(),ym(),En(),Jy(),J(),Ly(),Yf(),Kb(),jx=t.forwardRef(function(e,n){let{render:r,className:i,label:a,id:o,nativeButton:s=!1,openOnHover:c=!0,delay:l=100,closeDelay:u=0,disabled:d=!1,style:f,...p}=e,m=wn(),h=Fy(),{store:g}=Ry(),_=Yt(o),v=g.useState(`open`),y=g.useState(`floatingRootContext`),b=g.useState(`floatingTreeRoot`),x=If(_,g),S=t.useCallback(e=>{let t=x(e);return e!==null&&g.select(`open`)&&g.select(`activeTriggerId`)==null&&g.update({activeTriggerId:_,activeTriggerElement:e,closeDelay:u}),t},[x,u,g,_]),C=t.useRef(null),w=t.useCallback(e=>{C.current=e,g.set(`activeTriggerElement`,e)},[g]);process.env.NODE_ENV!==`production`&&F(()=>{let e=C.current;e&&qn(e)&&!d&&L(`A disabled element was detected on <Menu.SubmenuTrigger>. To properly disable the trigger, use the \`disabled\` prop on the component instead of setting it on the rendered element.${Ht.captureOwnerStack?.()||``}`)});let T=Wb();if(!T?.parentMenu)throw Error(process.env.NODE_ENV===`production`?G(37):`Base UI: <Menu.SubmenuTrigger> must be placed in <Menu.SubmenuRoot>.`);g.useSyncedValue(`closeDelay`,u);let E=T.parentMenu,D=E.useState(`itemProps`),O=E.useState(`isActive`,m.index),k=t.useMemo(()=>({type:`submenu-trigger`,setActive(){E.set(`activeIndex`,m.index)}}),[E,m.index]),A=g.useState(`disabled`),j=d||A,{getItemProps:M,itemRef:N}=Ky({closeOnClick:!1,disabled:j,highlighted:O,id:_,store:g,typingRef:E.context.typingRef,nativeButton:s,itemMetadata:k,nodeId:h?.context.nodeId}),P=g.useState(`hoverEnabled`),I=E.useState(`allowMouseEnter`),R=pp(y,{enabled:P&&c&&!j,handleClose:Lp({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:l,delay:I?{open:l,close:u}:0,triggerElementRef:C,externalTree:b,isClosing:()=>g.select(`transitionStatus`)===`ending`}),ee=gp([pu(y,{enabled:!j,event:`mousedown`,toggle:!c,ignoreMouse:c,stickIfOpen:!1})]),z=g.useState(`triggerProps`,!0);return delete z.id,q(`div`,e,{state:{disabled:j,highlighted:O,open:v},stateAttributesMapping:gm,props:[ee.getReferenceProps(),R,z,D,{tabIndex:v||O?0:-1,onBlur(){O&&E.set(`activeIndex`,null)}},p,M],ref:[n,m.ref,N,S,w]})}),process.env.NODE_ENV!==`production`&&(jx.displayName=`MenuSubmenuTrigger`)})),Nx=p((()=>{Ly(),By(),J(),ym(),mn(),Py(),It(),eb(),nb(),sb(),lb(),db(),Xt(),En(),Gy(),Ar(),Xe(),_b(),Sb(),wb(),kb(),Pb(),Ib(),Jb(),Xb(),dx(),Ax(),Q_(),Mx(),K(),Rt(),Ub()})),Px=p((()=>{Nx()})),Fx=p((()=>{Jt(),Py(),Px(),By(),uo(),da(),Nc(),Ra(),J(),Rt(),ym(),It(),nx(),mn(),Sb(),wb(),_b(),Ly(),sb(),lb(),db(),eb(),nb(),Xt(),En(),Gy(),Ar(),Xe(),kb(),Pb(),Ib(),Xb(),Mx(),Q_()}));function Ix(){return t.useContext(Lx)??Rx}var Lx,Rx,zx=p((()=>{Lx=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Lx.displayName=`CSPContext`),Rx={disableStyleElements:!1}})),Bx=p((()=>{zx()})),Vx=p((()=>{Sm(),wm(),Em(),Im(),Hm(),om(),Zm(),Wm(),Km(),rm(),Rt(),It()})),Hx=p((()=>{Vx()})),Ux,Wx=p((()=>{Ux=function(e){return e.nestedDrawers=`--nested-drawers`,e.height=`--drawer-height`,e.frontmostHeight=`--drawer-frontmost-height`,e.swipeMovementX=`--drawer-swipe-movement-x`,e.swipeMovementY=`--drawer-swipe-movement-y`,e.snapPointOffset=`--drawer-snap-point-offset`,e.swipeStrength=`--drawer-swipe-strength`,e}({})})),Gx,Kx=p((()=>{Gx=function(e){return e.swipeProgress=`--drawer-swipe-progress`,e}({})})),qx,Jx,Yx=p((()=>{$p(),J(),ym(),mn(),Wx(),Kx(),qx={...vm,...pn},Jx=t.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,{store:s}=Zp(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return q(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:qx,props:[{role:`presentation`,hidden:!u,style:{pointerEvents:c?void 0:`none`,userSelect:`none`,WebkitUserSelect:`none`,[Gx.swipeProgress]:`0`,[Ux.swipeStrength]:`1`}},o],enabled:a||!l})}),process.env.NODE_ENV!==`production`&&(Jx.displayName=`DrawerBackdrop`)})),Xx,Zx=p((()=>{wm(),Xx=Cm})),Qx,$x=p((()=>{Qx=`data-drawer-content`})),eS,tS=p((()=>{$p(),J(),$x(),eS=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return Zp(),q(`div`,e,{ref:t,props:[{[Qx]:``},a]})}),process.env.NODE_ENV!==`production`&&(eS.displayName=`DrawerContent`)})),nS,rS=p((()=>{Em(),nS=Tm}));function iS(e){let n=t.useContext(aS);if(e===!1&&n===void 0)throw Error(process.env.NODE_ENV===`production`?G(91):`Base UI: DrawerProviderContext is missing. Use <Drawer.Provider>.`);return n}var aS,oS=p((()=>{K(),aS=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(aS.displayName=`DrawerProviderContext`)})),sS,cS,lS=p((()=>{I(),J(),oS(),Kx(),Wx(),sS={active(e){return e?{"data-active":``}:{"data-inactive":``}}},cS=t.forwardRef(function(e,n){let{render:r,className:i,style:a,...o}=e,s=iS(!0),c=s?.active??!1,l=s?.visualStateStore,u=t.useRef(null);return F(()=>{let e=u.current;if(!e||!l)return;let t=()=>{let{swipeProgress:t,frontmostHeight:n}=l.getSnapshot();t<=0?e.style.setProperty(Gx.swipeProgress,`0`):e.style.setProperty(Gx.swipeProgress,`${t}`),n<=0?e.style.removeProperty(Ux.height):e.style.setProperty(Ux.height,`${n}px`)};t();let n=l.subscribe(t);return()=>{n(),e.style.setProperty(Gx.swipeProgress,`0`),e.style.removeProperty(Ux.height)}},[l]),q(`div`,e,{ref:[n,u],state:{active:c},props:[{style:{[Gx.swipeProgress]:`0`}},o],stateAttributesMapping:sS})}),process.env.NODE_ENV!==`production`&&(cS.displayName=`DrawerIndent`)})),uS,dS,fS=p((()=>{J(),oS(),uS={active(e){return e?{"data-active":``}:{"data-inactive":``}}},dS=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return q(`div`,e,{ref:t,state:{active:iS(!0)?.active??!1},props:a,stateAttributesMapping:uS})}),process.env.NODE_ENV!==`production`&&(dS.displayName=`DrawerIndentBackground`)})),pS,mS=p((()=>{ym(),pS=function(e){return e[e.open=lm.open]=`open`,e[e.closed=lm.closed]=`closed`,e[e.startingStyle=lm.startingStyle]=`startingStyle`,e[e.endingStyle=lm.endingStyle]=`endingStyle`,e.expanded=`data-expanded`,e.nestedDrawerOpen=`data-nested-drawer-open`,e.nestedDrawerSwiping=`data-nested-drawer-swiping`,e.swipeDismiss=`data-swipe-dismiss`,e.swipeDirection=`data-swipe-direction`,e.swiping=`data-swiping`,e}({})}));function hS(e){let n=t.useContext(gS);if(e===!1&&n===void 0)throw Error(process.env.NODE_ENV===`production`?G(90):`Base UI: DrawerRootContext is missing. Drawer parts must be placed within <Drawer.Root>.`);return n}var gS,_S=p((()=>{K(),gS=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(gS.displayName=`DrawerRootContext`)}));function vS(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}var yS=p((()=>{}));function bS(e,t,n){if(!Number.isFinite(t)||t<=0)return null;if(typeof e==`number`)return Number.isFinite(e)?e<=1?vS(e,0,1)*t:e:null;let r=e.trim();if(r.endsWith(`px`)){let e=Number.parseFloat(r);return Number.isFinite(e)?e:null}if(r.endsWith(`rem`)){let e=Number.parseFloat(r);return Number.isFinite(e)?e*n:null}return null}function xS(e,t){let n=null,r=1/0;for(let i of t){let t=Math.abs(i.height-e);t<r&&(r=t,n=i)}return n}function SS(){let{store:e}=Zp(),{snapPoints:n,activeSnapPoint:r,setActiveSnapPoint:i,popupHeight:a}=hS(),o=e.useState(`viewportElement`),[s,c]=t.useState(0),[l,u]=t.useState(16),d=O(()=>{let e=ua(o).documentElement;o&&c(o.offsetHeight),o||c(e.clientHeight);let t=parseFloat(getComputedStyle(e).fontSize);Number.isFinite(t)&&u(t)});F(()=>{if(d(),!o||typeof ResizeObserver!=`function`)return;let e=new ResizeObserver(d);return e.observe(o),()=>{e.disconnect()}},[d,o]);let f=t.useMemo(()=>{if(!n||n.length===0||s<=0||a<=0)return[];let e=Math.min(a,s);if(!Number.isFinite(e)||e<=0)return[];let t=n.map(t=>{let n=bS(t,s,l);if(n===null||!Number.isFinite(n))return null;let r=vS(n,0,e);return{value:t,height:r,offset:Math.max(0,a-r)}}).filter(e=>!!e);if(t.length<=1)return t;let r=[],i=[];for(let e=t.length-1;e>=0;--e){let n=t[e];i.some(e=>Math.abs(e-n.height)<=1)||(i.push(n.height),r.push(n))}return r.reverse(),r},[a,l,n,s]);return{snapPoints:n,activeSnapPoint:r,setActiveSnapPoint:i,popupHeight:a,viewportHeight:s,resolvedSnapPoints:f,activeSnapPointOffset:t.useMemo(()=>{if(r===void 0)return f[0];if(r===null)return;let e=f.find(e=>Object.is(e.value,r));if(e)return e;let t=Math.min(a,s),n=bS(r,s,l);if(!(n===null||!Number.isFinite(n)))return xS(vS(n,0,t),f)??void 0},[r,a,f,l,s])?.offset??null}}var CS=p((()=>{I(),N(),da(),yS(),$p(),_S()}));function wS(e){let n=t.useContext(TS);if(e===!1&&n===null)throw Error(process.env.NODE_ENV===`production`?G(92):`Base UI: DrawerViewportContext is missing. Drawer parts must be placed within <Drawer.Viewport>.`);return n}var TS,ES=p((()=>{K(),TS=t.createContext(null),process.env.NODE_ENV!==`production`&&(TS.displayName=`DrawerViewportContext`)}));function DS(){OS||=(typeof CSS<`u`&&`registerProperty`in CSS&&([Ux.swipeMovementX,Ux.swipeMovementY,Ux.snapPointOffset].forEach(e=>{try{CSS.registerProperty({name:e,syntax:`<length>`,inherits:!1,initialValue:`0px`})}catch{}}),[{name:Gx.swipeProgress,initialValue:`0`},{name:Ux.swipeStrength,initialValue:`1`}].forEach(({name:e,initialValue:t})=>{try{CSS.registerProperty({name:e,syntax:`<number>`,inherits:!1,initialValue:t})}catch{}})),!0)}var OS,kS,AS,jS=p((()=>{x(),Ut(),I(),N(),De(),Hp(),$p(),J(),ym(),mn(),Kx(),Wx(),mS(),Nm(),yo(),co(),_S(),CS(),ES(),OS=!1,kS={...vm,...pn,expanded(e){return e?{[pS.expanded]:``}:null},nestedDrawerOpen(e){return e?{[pS.nestedDrawerOpen]:``}:null},nestedDrawerSwiping(e){return e?{[pS.nestedDrawerSwiping]:``}:null},swipeDirection(e){return e?{[pS.swipeDirection]:e}:null},swiping(e){return e?{[pS.swiping]:``}:null}},AS=t.forwardRef(function(e,r){let{className:i,finalFocus:a,initialFocus:o,render:s,style:c,...l}=e,{store:u}=Zp(),{swipeDirection:d,frontmostHeight:f,hasNestedDrawer:p,nestedSwiping:m,nestedSwipeProgressStore:h,onPopupHeightChange:g,notifyParentFrontmostHeight:_,notifyParentHasNestedDrawer:v}=hS(),b=u.useState(`descriptionElementId`),x=u.useState(`disablePointerDismissal`),S=u.useState(`floatingRootContext`),C=u.useState(`popupProps`),w=u.useState(`modal`),T=u.useState(`mounted`),E=u.useState(`nested`),D=u.useState(`nestedOpenDrawerCount`),k=u.useState(`transitionStatus`),A=u.useState(`open`),j=u.useState(`openMethod`),M=u.useState(`titleElementId`),N=u.useState(`role`),P=D>0,I=wS(!0),L=I?.swiping??!1,R=I?.swipeStrength??null,{snapPoints:ee,activeSnapPoint:z,activeSnapPointOffset:B}=SS();jm();let[V,te]=t.useState(0),ne=t.useRef(0);process.env.NODE_ENV!==`production`&&t.useEffect(()=>{I||y(`<Drawer.Popup> expected to be rendered within <Drawer.Viewport>. Omitting the viewport disables drawer swipe handling and touch scroll locking. Wrap <Drawer.Popup> in <Drawer.Viewport>.${Ht.captureOwnerStack?.()||``}`)},[I]);let H=O(()=>{let e=u.context.popupRef.current;if(!e)return;let t=e.offsetHeight;if(ne.current>0&&f>ne.current&&t>ne.current)return;if(ne.current>0&&p){let e=ne.current;te(e),g(e);return}let n=t;n!==ne.current&&(ne.current=n,te(n),g(n))});F(()=>{if(!T){ne.current=0,te(0),g(0);return}let e=u.context.popupRef.current;if(!e||(DS(),H(),typeof ResizeObserver!=`function`))return;let t=new ResizeObserver(H);return t.observe(e),()=>{t.disconnect()}},[H,T,P,g,u.context.popupRef]),F(()=>{let e=u.context.popupRef,t=()=>{let t=e.current;if(!t)return;let n=h.getSnapshot();n>0?t.style.setProperty(Gx.swipeProgress,`${n}`):t.style.setProperty(Gx.swipeProgress,`0`)};t();let n=h.subscribe(t);return()=>{n();let t=e.current;t&&t.style.setProperty(Gx.swipeProgress,`0`)}},[h,u.context.popupRef]),t.useEffect(()=>{if(A)return _?.(f),()=>{_?.(0)}},[f,A,_]),t.useEffect(()=>{if(v)return v(A||k===`ending`),()=>{v(!1)}},[v,A,k]),vo({open:A,ref:u.context.popupRef,onComplete(){A&&u.context.onOpenChangeComplete?.(!0)}});let re=o===void 0?u.context.popupRef:o,U={open:A,nested:E,transitionStatus:k,expanded:z===1,nestedDrawerOpen:P,nestedDrawerSwiping:m,swipeDirection:d,swiping:L},W;V&&!(!p&&k!==`ending`)&&(W=`${V}px`);let ie=ee&&ee.length>0&&(d===`down`||d===`up`),ae=null;ie&&B!==null&&(ae=d===`up`?-B:B);let oe=I?I.getDragStyles():Ee;if(ie&&d===`down`){let e=B??0,t=Number.parseFloat(String(oe[Ux.swipeMovementY]??0)),n=Number.isFinite(t)?e+t:e;if(L&&n<0&&Number.isFinite(t)){let t=-Math.sqrt(Math.abs(n))-e;oe={...oe,transform:void 0,[Ux.swipeMovementY]:`${t}px`}}else oe={...oe,transform:void 0}}let G=q(`div`,e,{state:U,props:[C,{"aria-labelledby":M,"aria-describedby":b,role:N,tabIndex:-1,hidden:!T,onKeyDown(e){ro.has(e.key)&&e.stopPropagation()},style:{...oe,[Gx.swipeProgress]:`0`,[Ux.nestedDrawers]:D,[Ux.height]:W,[Ux.snapPointOffset]:typeof ae==`number`?`${ae}px`:`0px`,[Ux.frontmostHeight]:f?`${f}px`:void 0,[Ux.swipeStrength]:typeof R==`number`&&Number.isFinite(R)&&R>0?`${R}`:`1`}},l],ref:[r,u.context.popupRef,u.useStateSetter(`popupElement`)],stateAttributesMapping:kS});return(0,n.jsx)(lu,{context:S,openInteractionType:j,disabled:!T,closeOnFocusOut:!x,initialFocus:re,returnFocus:a,modal:w!==!1,restoreFocus:`popup`,children:G})}),process.env.NODE_ENV!==`production`&&(AS.displayName=`DrawerPopup`)})),MS,NS=p((()=>{Hm(),MS=Vm}));function PS(e){let{children:r}=e,[i,a]=t.useState(()=>new Map),[o]=t.useState(FS),s=O((e,t)=>{a(n=>{if(n.get(e)===t)return n;let r=new Map(n);return r.set(e,t),r})}),c=O(e=>{a(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})}),l=t.useMemo(()=>{for(let e of i.values())if(e)return!0;return!1},[i]),u=t.useMemo(()=>({setDrawerOpen:s,removeDrawer:c,active:l,visualStateStore:o}),[l,c,s,o]);return(0,n.jsx)(aS.Provider,{value:u,children:r})}function FS(){let e={swipeProgress:0,frontmostHeight:0},t=new Set;return{getSnapshot:()=>e,set(n){let r=e.swipeProgress;n.swipeProgress!==void 0&&(r=Number.isFinite(n.swipeProgress)?n.swipeProgress:0);let i=e.frontmostHeight;n.frontmostHeight!==void 0&&(i=Number.isFinite(n.frontmostHeight)?n.frontmostHeight:0),!(r===e.swipeProgress&&i===e.frontmostHeight)&&(e={swipeProgress:r,frontmostHeight:i},t.forEach(e=>{e()}))},subscribe(e){return t.add(e),()=>{t.delete(e)}}}}var IS=p((()=>{N(),oS()}));function LS(e){let{children:r,open:i,defaultOpen:a=!1,onOpenChange:o,onOpenChangeComplete:s,disablePointerDismissal:c=!1,modal:l=!0,actionsRef:u,handle:d,triggerId:f,defaultTriggerId:p=null,swipeDirection:m=`down`,snapToSequentialPoints:h=!1,snapPoints:g,snapPoint:_,defaultSnapPoint:v,onSnapPointChange:y}=e,b=O(y),x=hS(!0),C=x?.onNestedSwipeProgressChange,w=x?.onNestedFrontmostHeightChange,T=x?.onNestedSwipingChange,E=x?.onNestedDrawerPresenceChange,[D,k]=t.useState(0),[A,j]=t.useState(0),[M,N]=t.useState(!1),[P,F]=t.useState(!1),[I]=t.useState(RS),L=v===void 0?g?.[0]??null:v,R=_!==void 0,[ee,z]=S({controlled:_,default:L,name:`Drawer`,state:`snapPoint`}),B=t.useRef(!1),V=O((e,t)=>{let n=t??Y(`none`);b?.(e,n),!n.isCanceled&&z(e)}),te=t.useMemo(()=>R||!g||g.length===0?ee:ee===null||!g.some(e=>Object.is(e,ee))?L:ee,[ee,R,L,g]),ne=O(e=>{k(e),!B.current&&e>0&&j(e)}),H=O(e=>{if(e>0){B.current=!0,j(e);return}B.current=!1,D>0&&j(D)}),re=O(e=>{N(e)}),U=O(e=>{I.set(e),C?.(e)}),W=O(e=>{F(e),T?.(e)}),ie=O((e,t)=>{o?.(e,t),!t.isCanceled&&!e&&g&&g.length>0&&V(L,Y(t.reason,t.event,t.trigger))}),ae=t.useMemo(()=>({swipeDirection:m,snapToSequentialPoints:h,snapPoints:g,activeSnapPoint:te,setActiveSnapPoint:V,frontmostHeight:A,popupHeight:D,hasNestedDrawer:M,nestedSwiping:P,nestedSwipeProgressStore:I,onNestedDrawerPresenceChange:re,onPopupHeightChange:ne,onNestedFrontmostHeightChange:H,onNestedSwipingChange:W,onNestedSwipeProgressChange:U,notifyParentFrontmostHeight:w,notifyParentSwipingChange:T,notifyParentSwipeProgressChange:C,notifyParentHasNestedDrawer:E}),[te,A,M,P,I,E,C,T,w,re,H,U,W,ne,D,V,g,h,m]),oe=typeof r==`function`?e=>(0,n.jsxs)(t.Fragment,{children:[BS||=(0,n.jsx)(zS,{}),r(e)]}):(0,n.jsxs)(t.Fragment,{children:[VS||=(0,n.jsx)(zS,{}),r]});return(0,n.jsx)(gS.Provider,{value:ae,children:(0,n.jsx)(am.Provider,{value:!0,children:(0,n.jsx)(im,{open:i,defaultOpen:a,onOpenChange:ie,onOpenChangeComplete:s,disablePointerDismissal:c,modal:l,actionsRef:u,handle:d,triggerId:f,defaultTriggerId:p,children:oe})})})}function RS(){let e=0,t=new Set;return{getSnapshot:()=>e,set(n){let r=Number.isFinite(n)?n:0;r!==e&&(e=r,t.forEach(e=>{e()}))},subscribe(e){return t.add(e),()=>{t.delete(e)}}}}function zS(){let e=Gt(),n=iS(!0),r=Zp(!1),i=r.store.useState(`open`),a=r.store.useState(`nestedOpenDialogCount`),o=r.store.useState(`popupElement`),s=a===0;return t.useEffect(()=>{if(!(!n||e==null))return()=>{n.removeDrawer(e)}},[e,n]),t.useEffect(()=>{e!=null&&n?.setDrawerOpen(e,i)},[e,i,n]),t.useEffect(()=>{if(!i||!s||!Hr)return;let e=Zn(o).CloseWatcher;if(!e)return;function t(e){r.store.select(`open`)&&r.store.setOpen(!1,Y(wt,e))}let n=new e,a=lo(n,`close`,t);return()=>{a(),n.destroy()}},[r.store,s,i,o]),null}var BS,VS,HS=p((()=>{uo(),w(),N(),da(),Gr(),Jt(),_S(),Hx(),om(),Rt(),It(),$p(),oS()}));function US(e,t){let n=ur(e);if(t===`vertical`){let t=n.overflowY;return(t===`auto`||t===`scroll`)&&e.scrollHeight>e.clientHeight}let r=n.overflowX;return(r===`auto`||r===`scroll`)&&e.scrollWidth>e.clientWidth}function WS(e,t,n){let r=e;for(;r&&r!==t;){for(let e of n)if(US(r,e))return!0;r=r.parentElement}return!1}function GS(e,t,n=`vertical`){let r=tr(e)?e:null;for(;r&&r!==t;){if(US(r,n))return r;r=r.parentElement}return US(t,n)?t:null}var KS=p((()=>{br()}));function qS(e,t,n){return typeof e?.elementFromPoint==`function`?e.elementFromPoint(t,n):null}var JS=p((()=>{}));function YS(e,t,n){switch(e){case`up`:return-n;case`down`:return n;case`left`:return-t;case`right`:return t;default:return 0}}function XS(e){let t=Zn(e).getComputedStyle(e).transform,n=0,r=0,i=1;if(t&&t!==`none`){let e=t.match(/matrix(?:3d)?\(([^)]+)\)/);if(e){let t=e[1].split(`, `).map(parseFloat);t.length===6?(n=t[4],r=t[5],i=Math.sqrt(t[0]*t[0]+t[1]*t[1])):t.length===16&&(n=t[12],r=t[13],i=t[0])}}return{x:n,y:r,scale:i}}function ZS(e){return Number.isFinite(e)&&e>0?e:null}function QS(e){return e%2==1}function $S(e,t,n){let r=e[n];if(typeof r==`function`)try{r.call(e,t)}catch(e){if(e&&typeof e==`object`&&`name`in e&&e.name===`NotFoundError`)return;throw e}}function eC(e){let{enabled:n,directions:r,elementRef:i,movementCssVars:a,canStart:o,ignoreSelectorWhenTouch:s=!0,ignoreScrollableAncestors:c=!1,swipeThreshold:l,onDismiss:u,onProgress:d,onCancel:f,onSwipeStart:p,onRelease:m,onSwipingChange:h,trackDrag:g=!0}=e,_=sC,v=r.length===1?r[0]:void 0,y=Math.max(0,typeof l==`number`?l:tC),b=r.includes(`left`),x=r.includes(`right`),S=r.includes(`up`),C=r.includes(`down`),w=b||x,T=S||C,E=t.useMemo(()=>{let e=[];return T&&e.push(`vertical`),w&&e.push(`horizontal`),e},[w,T]),[D,k]=t.useState(void 0),[A,j]=t.useState(!1),[M,N]=t.useState(!1),[P,F]=t.useState(!1),[I,L]=t.useState({x:0,y:0}),[R,ee]=t.useState({x:0,y:0,scale:1}),[z,B]=t.useState(null),V=t.useRef({x:0,y:0}),te=t.useRef({x:0,y:0}),ne=t.useRef(null),H=t.useRef({x:0,y:0,scale:1}),re=t.useRef(void 0),U=t.useRef(0),W=t.useRef(!1),ie=t.useRef({x:0,y:0}),ae=t.useRef(!1),oe=t.useRef(!1),G=t.useRef(null),K=t.useRef(!1),se=t.useRef(!1),ce=t.useRef({width:0,height:0}),le=t.useRef(0),ue=t.useRef(y),de=t.useRef(null),fe=t.useRef(null),pe=t.useRef({x:0,y:0}),me=t.useRef(null),he=t.useRef(!1),ge=O(e=>{he.current!==e&&(he.current=e,j(e),h?.(e))});function _e(e){if(!e)return;if(typeof l!=`function`){ue.current=y;return}let t=i.current;if(!t)return;let n=l({element:t,direction:e});ue.current=Math.max(0,n)}let ve=O((e,t)=>{let n=Number.isFinite(e)?vS(e,0,1):0,r=n!==le.current,i=!1;if(t){let e=me.current;i=!e||e.deltaX!==t.deltaX||e.deltaY!==t.deltaY||e.direction!==t.direction}!r&&!i||(le.current=n,t?me.current=t:r&&(me.current=null),d?.(n,t))});function ye(e,t){if(t===null)return;let n=fe.current;if(n&&t>n.time){let r=Math.max(t-n.time,aC);pe.current={x:(e.x-n.x)/r,y:(e.y-n.y)/r}}fe.current={x:e.x,y:e.y,time:t}}let be=t.useCallback(()=>{k(void 0),ge(!1),N(!1),F(!1),L({x:0,y:0}),ee({x:0,y:0,scale:1}),B(null),ve(0),ue.current=y,V.current={x:0,y:0},te.current={x:0,y:0},H.current={x:0,y:0,scale:1},re.current=void 0,U.current=0,W.current=!1,ie.current={x:0,y:0},ae.current=!1,ne.current=null,oe.current=!1,G.current=null,K.current=!1,se.current=!1,ce.current={width:0,height:0},de.current=null,fe.current=null,pe.current={x:0,y:0},me.current=null},[ge,y,ve]);t.useEffect(()=>{typeof l!=`function`&&(ue.current=y)},[y,l]);function xe(e){if(`touches`in e){let t=e.touches[0];return t?{x:t.clientX,y:t.clientY}:null}return{x:e.clientX,y:e.clientY}}function Se(e){return`touches`in e?!0:e.pointerType===`touch`}function Ce(e,t){return qS(ua(i.current),e.x,e.y)??ti(t)}function we(e,t){return w&&!T?GS(e,t,`horizontal`):T&&!w?GS(e,t,`vertical`):GS(e,t,`vertical`)??GS(e,t,`horizontal`)}function Te(e,t,n){K.current=!1;let r=Se(e),a=Ce(t,e.nativeEvent),o=ua(i.current).body,l=r&&o?we(a,o):null,u=n?.ignoreScrollableTarget??!1;if(l&&!u||(K.current=!!(l&&u),a&&a.closest(_)&&(!r||s)))return!1;let d=i.current;if(c&&d&&a&&E.length>0&&!(n?.ignoreScrollableAncestors??!1)&&WS(a,d,E))return!1;if(W.current=!1,re.current=void 0,U.current=0,V.current=t,de.current=ZS(e.timeStamp),ie.current=t,ne.current=t,d){ce.current={width:d.offsetWidth,height:d.offsetHeight},_e(v);let t=XS(d);H.current=t,te.current={x:t.x,y:t.y},ee(t),L({x:t.x,y:t.y}),ye({x:t.x,y:t.y},de.current),`touches`in e||$S(d,e.pointerId,`setPointerCapture`)}return p?.(e.nativeEvent),ge(!0),N(!1),B(null),ae.current=!0,ve(0),!0}function Ee(){De(),K.current=!1,ne.current=null}function De(){oe.current=!1,G.current=null}function Oe(e){if(Ee(),!he.current)return;ge(!1),N(!1),B(null);let t=g?R:H.current;te.current={x:t.x,y:t.y},L({x:t.x,y:t.y}),k(void 0),se.current=!1;let n=i.current;n&&$S(n,e.pointerId,`releasePointerCapture`),ve(0,{deltaX:0,deltaY:0,direction:void 0}),f?.(e.nativeEvent)}function ke(e,t){let n=e=>e>=0?e**.5:-(Math.abs(e)**.5),r=(e,t,r)=>!t&&e<0||!r&&e>0?n(e):e;return{x:w?r(e,b,x):n(e),y:T?r(t,S,C):n(t)}}function Ae(e,t,n){let r=Math.abs(t),i=Math.abs(n);if(T&&n!==0&&(!w||i>=r)){let t=Math.max(0,e.scrollHeight-e.clientHeight),r=e.scrollTop<=0,i=e.scrollTop>=t;return n>0&&r&&C||n<0&&i&&S}if(w&&t!==0&&(!T||r>i)){let n=Math.max(0,e.scrollWidth-e.clientWidth),r=e.scrollLeft<=0,i=e.scrollLeft>=n;return t>0&&r&&x||t<0&&i&&b}return null}let je=O(e=>{if(!n||e.defaultPrevented||e.nativeEvent.defaultPrevented||!(`touches`in e)&&e.button!==0)return;let t=xe(e);t&&(oe.current=!0,G.current=t,K.current=!1,se.current=!1,(!o||o(t,{nativeEvent:e.nativeEvent,direction:v}))&&Te(e,t)&&De())});function Me(e,t,r){if(!n||!he.current)return;let i=ti(e.nativeEvent);if(Se(e)&&!K.current){let t=e.currentTarget;if(we(i,t))return}if(`touches`in e||e.preventDefault(),ae.current){V.current=t;let n=ZS(e.timeStamp);n!==null&&(de.current=n),ae.current=!1}let a=t.x,o=t.y,s=r.x,c=r.y;(c<0&&o>ie.current.y||c>0&&o<ie.current.y)&&(ie.current={x:ie.current.x,y:o}),(s<0&&a>ie.current.x||s>0&&a<ie.current.x)&&(ie.current={x:a,y:ie.current.y});let l=a-V.current.x,u=o-V.current.y,d=o-ie.current.y,f=a-ie.current.x;M||Math.sqrt(l*l+u*u)>=rC&&(N(!0),z===null&&w&&T&&B(Math.abs(l)>Math.abs(u)?`horizontal`:`vertical`));let p;if(!re.current)z===`vertical`?u>0?p=`down`:u<0&&(p=`up`):z===`horizontal`?l>0?p=`right`:l<0&&(p=`left`):p=Math.abs(l)>=Math.abs(u)?l>0?`right`:`left`:u>0?`down`:`up`,p&&(p===`left`&&b||p===`right`&&x||p===`up`&&S||p===`down`&&C)&&(re.current=p,U.current=YS(p,l,u),k(p),_e(p));else{let e=re.current,t=YS(e,f,d);t>ue.current?(W.current=!1,k(e)):!(b&&x)&&!(S&&C)&&U.current-t>=nC&&(W.current=!0)}let m=ke(l,u),h=H.current.x,_=H.current.y;z===`horizontal`?w&&(h+=m.x):(z===`vertical`||w&&(h+=m.x),T&&(_+=m.y)),te.current={x:h,y:_},g&&L({x:h,y:_}),ye({x:h,y:_},ZS(e.timeStamp));let y=h-H.current.x,E=_-H.current.y,D=re.current,O=v??re.current;if(!O){ve(0,{deltaX:y,deltaY:E,direction:D});return}let A=O===`left`||O===`right`?ce.current.width:ce.current.height,j=H.current.scale||1;if(A<=0||j<=0){ve(0,{deltaX:y,deltaY:E,direction:D});return}let P=YS(O,h-H.current.x,_-H.current.y);if(P<=0){ve(0,{deltaX:y,deltaY:E,direction:D});return}ve(P/(A*j),{deltaX:y,deltaY:E,direction:D})}let Ne=O(e=>{let t=xe(e);if(!t)return;if(!(`touches`in e)){let t=QS(e.buttons);t&&(se.current=!0);let n=e.buttons===0&&se.current;if(e.buttons!==0&&!t||n){Oe(e);return}}if(!A&&oe.current){if(!Se(e)&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)){Ee();return}if(!o||o(t,{nativeEvent:e.nativeEvent,direction:v})){let n=G.current,r=!1;if(Se(e)){let a=i.current;if(n&&a){let i=Ce(t,e.nativeEvent),o=ua(a).body,s=o?we(i,o):null;if(s&&(ei(a,s)||ei(s,a))){let e=Ae(s,t.x-n.x,t.y-n.y);if(e===!1)return;e===!0&&(r=!0)}}}Te(e,t,{ignoreScrollableTarget:r,ignoreScrollableAncestors:r})&&(n&&r?(De(),V.current=n,ie.current=n,ne.current=n,ae.current=!1):(De(),K.current=!1))}}let n=ne.current,r=n===null?{x:0,y:0}:{x:t.x-n.x,y:t.y-n.y};ne.current=t,Me(e,t,r)}),Pe=O(e=>{if(!n)return;let t=te.current,a=H.current,o=t.x-a.x,s=t.y-a.y,c={deltaX:o,deltaY:s,direction:D??re.current};if(!he.current){Ee(),ve(0,c);return}ge(!1),N(!1),B(null),Ee(),se.current=!1;let l=i.current;l&&(`touches`in e||$S(l,e.pointerId,`releasePointerCapture`));let d=o,f=s,p=de.current,h=ZS(e.timeStamp),g=p!==null&&h!==null&&h>p?h-p:0,_=g>0?Math.max(g,iC):0,y=_>0?d/_:0,b=_>0?f/_:0,x=pe.current.x,S=pe.current.y,C=fe.current;if(C&&h!==null&&h>=C.time){let e=h-C.time;if(e<=oC){let n=Math.max(e,aC),r=t.x-C.x,i=t.y-C.y,a=r/n,o=i/n;a!==0&&(x=a),o!==0&&(S=o)}else x=0,S=0}let w=m?.({event:e.nativeEvent,direction:D??re.current,deltaX:d,deltaY:f,velocityX:y,velocityY:b,releaseVelocityX:x,releaseVelocityY:S}),T=typeof w==`boolean`;if(W.current&&!T){te.current={x:a.x,y:a.y},L({x:a.x,y:a.y}),k(void 0),ve(0,c);return}let E=!1,O;if(T)E=w,O=D??re.current??v;else for(let e of r){switch(e){case`right`:d>ue.current&&(E=!0,O=`right`);break;case`left`:d<-ue.current&&(E=!0,O=`left`);break;case`down`:f>ue.current&&(E=!0,O=`down`);break;case`up`:f<-ue.current&&(E=!0,O=`up`);break;default:break}if(E)break}E&&O?(k(O),F(!0),u?.(e.nativeEvent,{direction:O})):(te.current={x:a.x,y:a.y},L({x:a.x,y:a.y}),k(void 0),ve(0,c))}),Fe=t.useCallback(()=>{let e=g?I:te.current,t=g?R:H.current;if(!A&&e.x===t.x&&e.y===t.y&&!P)return{[a.x]:`0px`,[a.y]:`0px`};let n=e.x-t.x,r=e.y-t.y;return{transition:A?`none`:void 0,transform:A?`translateX(${e.x}px) translateY(${e.y}px) scale(${t.scale})`:void 0,[a.x]:`${n}px`,[a.y]:`${r}px`}},[P,I,R,A,a,g]);return{swiping:A,swipeDirection:D,dragDismissed:P,getPointerProps:t.useCallback(()=>n?{onPointerDown:je,onPointerMove:Ne,onPointerUp:Pe,onPointerCancel:Pe}:{},[n,Pe,Ne,je]),getTouchProps:t.useCallback(()=>n?{onTouchStart:je,onTouchMove:Ne,onTouchEnd:Pe,onTouchCancel:Pe}:{},[n,Pe,Ne,je]),getDragStyles:Fe,reset:be}}var tC,nC,rC,iC,aC,oC,sC,cC=p((()=>{N(),da(),Ra(),KS(),yS(),JS(),tC=40,nC=10,rC=1,iC=50,aC=16,oC=80,sC=`button,a,input,select,textarea,label,[role="button"]`})),lC,uC=p((()=>{Wm(),lC=Um})),dC,fC=p((()=>{Km(),dC=Gm}));function pC(e,t,n){if(n){e?.setAttribute(pS.swipeDismiss,``),t?.setAttribute(pS.swipeDismiss,``);return}e?.removeAttribute(pS.swipeDismiss),t?.removeAttribute(pS.swipeDismiss)}function mC(e,t){if(e){if(t){e.setAttribute(pS.swiping,``);return}e.removeAttribute(pS.swiping)}}function hC(e){return!!e?.closest(Nl)}function gC(e){return!!e?.closest(HC)}function _C(e,t){let n=t===`left`||t===`right`?e.offsetWidth:e.offsetHeight;return Math.max(n*.5,jC)}function vC(e,t){return e instanceof t.HTMLInputElement&&e.type===`range`}function yC(e){return er(e)?e.tagName===`INPUT`||e.tagName===`TEXTAREA`:!1}function bC(e,t){let n=er(e.anchorNode)?e.anchorNode:e.anchorNode?.parentElement,r=er(e.focusNode)?e.focusNode:e.focusNode?.parentElement;return e.containsNode(t,!0)||ei(t,n)||ei(t,r)}function xC(e,t){let n=$r(e);if(n&&ei(t,n)&&yC(n)){let{selectionStart:e,selectionEnd:t}=n;if(e!=null&&t!=null&&e<t)return!0}let r=e.getSelection?.();return!r||r.isCollapsed?!1:bC(r,t)}function SC(e,t){let n=e.composedPath();return n?n.some(e=>vC(e,t)):vC(ti(e),t)}function CC(e){return SC(e.nativeEvent,Zn(e.currentTarget))}function wC(e,t){e.lastX=t.clientX,e.lastY=t.clientY}function TC(e,t,n){if(e.preserveNativeCrossAxisScroll)return!0;if(e.allowSwipe===!0||!e.hasCrossAxisScrollableContent)return!1;let r=n?t.clientY-e.startY:t.clientX-e.startX,i=n?t.clientX-e.startX:t.clientY-e.startY,a=Math.abs(r),o=Math.abs(i);return o<6||o<=a+2?!1:(e.preserveNativeCrossAxisScroll=!0,!0)}function EC(e,t){return t===`vertical`?e.scrollHeight>e.clientHeight:e.scrollWidth>e.clientWidth}function DC(e,t){if(t===`vertical`){let t=Math.max(0,e.scrollHeight-e.clientHeight);return{offset:e.scrollTop,max:t}}let n=Math.max(0,e.scrollWidth-e.clientWidth);return{offset:e.scrollLeft,max:n}}function OC(e,t,n){let{offset:r,max:i}=DC(e,t),a=AC(n,t);return a===null?!1:a?r<=0:r>=i}function kC(e,t,n,r){let{offset:i,max:a}=DC(e,t),o=AC(n,t);return o===null||!(o?r>0:r<0)?!1:o?i<=0:i>=a}function AC(e,t){return t===`vertical`?e===`down`?!0:e===`up`?!1:null:e===`right`?!0:e===`left`?!1:null}var jC,MC,NC,PC,FC,IC,LC,RC,zC,BC,VC,HC,UC,WC=p((()=>{br(),uo(),da(),sn(),N(),$p(),Zm(),Xe(),_S(),CS(),oS(),yS(),cC(),Wx(),mS(),Kx(),$x(),It(),Rt(),Ra(),ES(),mn(),KS(),Rl(),JS(),jC=10,MC=.5,NC=.5,PC=300,FC=4,IC=.2,LC=4,RC=80,zC=360,BC=.1,VC=1,HC=`[${Qx}]`,UC=t.forwardRef(function(e,i){let{className:a,render:o,style:s,children:c,...l}=e,{store:u}=Zp(),{swipeDirection:d,notifyParentSwipingChange:f,notifyParentSwipeProgressChange:p,frontmostHeight:m,snapToSequentialPoints:h}=hS(),g=iS(!0)?.visualStateStore,_=u.useState(`open`),v=u.useState(`mounted`),y=u.useState(`nested`),b=u.useState(`nestedOpenDrawerCount`),x=u.useState(`viewportElement`),S=u.useState(`popupElement`),C=b>0,w=d===`left`||d===`right`?`horizontal`:`vertical`,T=w===`vertical`,E=T?`horizontal`:`vertical`,{snapPoints:D,resolvedSnapPoints:k,activeSnapPoint:A,activeSnapPointOffset:j,setActiveSnapPoint:M,popupHeight:N}=SS(),[P,F]=t.useState(null),I=t.useRef(void 0),L=t.useRef(null),R=en(),ee=t.useRef(!1),z=t.useRef(``),B=t.useRef(!1),V=t.useRef(!1),te=t.useRef(null),ne=t.useMemo(()=>{if(!D||D.length<2||d!==`down`&&d!==`up`||k.length<2)return null;let e=k.map(e=>e.offset).filter(e=>Number.isFinite(e)).sort((e,t)=>e-t);if(e.length<2)return null;let t=e[0],n=e[1],r=e[e.length-1],i=n-t;if(!Number.isFinite(i)||i<=0){let e=r-t;if(!Number.isFinite(e)||e<=0)return null;i=e}return{minOffset:t,range:i}},[k,D,d]),H=t.useMemo(()=>!ne||j===null?null:vS((j-ne.minOffset)/ne.range,0,1),[j,ne]),re=t.useMemo(()=>D&&D.length>0&&(d===`down`||d===`up`)?d===`down`?[`down`,`up`]:[`up`,`down`]:[d],[D,d]),U=O(e=>{pC(u.context.popupRef.current,u.context.backdropRef.current,e)}),W=O(()=>{U(!1),u.context.popupRef.current?.removeAttribute(un.endingStyle),F(null)}),ie=O(()=>{ee.current&&(ee.current=!1,f?.(!1))}),ae=O(({resolvedProgress:e,shouldTrackProgress:t,notifyParent:n})=>{let r=_&&!y&&t,i=r?e:0,a=_&&t?e:0;n&&p&&(p(a),a<=0&&ie()),g?.set({swipeProgress:i,frontmostHeight:i>0?m:0});let o=u.context.backdropRef.current;if(o){if(!r||i<=0){o.style.setProperty(Gx.swipeProgress,`0`),o.style.removeProperty(Ux.height);return}o.style.setProperty(Gx.swipeProgress,`${i}`),m>0?o.style.setProperty(Ux.height,`${m}px`):o.style.removeProperty(Ux.height)}});function oe({direction:e,deltaX:t,deltaY:n,velocityX:r,velocityY:i,releaseVelocityX:a,releaseVelocityY:o}){if(!e)return null;let s=u.context.popupRef.current;if(!s)return null;let c=e===`left`||e===`right`?s.offsetWidth:s.offsetHeight;if(!Number.isFinite(c)||c<=0)return null;let l=e===`left`||e===`right`?t:n,d=D&&D.length>0?j??0:0,f=0;e===`down`?f=d:e===`up`&&(f=-d);let p=f+l,m=e===`left`||e===`up`?-p:p,h=Math.max(0,c-m);if(!Number.isFinite(h)||h<=0)return null;let g=e===`left`||e===`right`?a:o,_=e===`left`||e===`right`?r:i,v=Math.abs(g)>0&&Number.isFinite(g)?g:_,y=e===`left`||e===`up`?-v:v;if(!Number.isFinite(y)||y<=IC)return null;let b=vS(h/vS(y,IC,LC),RC,zC);if(!Number.isFinite(b))return null;let x=vS(BC+(b-RC)/(zC-RC)*(VC-BC),BC,VC);return!Number.isFinite(x)||x<=0?null:x}function G(e){if(ee.current||!e)return;let t=e.direction??d,n=t===`left`||t===`right`?e.deltaX:e.deltaY;!Number.isFinite(n)||Math.abs(n)<jC||(ee.current=!0,f?.(!0))}let K=eC({enabled:v&&!C,directions:re,elementRef:u.context.popupRef,ignoreSelectorWhenTouch:!1,ignoreScrollableAncestors:!0,movementCssVars:{x:Ux.swipeMovementX,y:Ux.swipeMovementY},onSwipeStart(e){if(`touches`in e||`pointerType`in e&&e.pointerType===`touch`)return;let t=u.context.popupRef.current;if(!t)return;let n=ua(t).getSelection?.();if(!n||n.isCollapsed)return;let r=er(n.anchorNode)?n.anchorNode:n.anchorNode?.parentElement,i=er(n.focusNode)?n.focusNode:n.focusNode?.parentElement;!ei(t,r)&&!ei(t,i)||n.removeAllRanges()},onSwipingChange(e){mC(u.context.backdropRef.current,e),!e&&!p&&ie()},swipeThreshold({element:e,direction:t}){return _C(e,t)},canStart(e,t){let n=u.context.popupRef.current;if(!n)return!1;let r=n.ownerDocument,i=qS(r,e.x,e.y);if(!i||!ei(n,i))return!1;let a=t.nativeEvent;return!((`touches`in a||`pointerType`in a&&a.pointerType===`touch`)&&xC(r,n)||a.type===`touchstart`&&hC(i))},onProgress(e,t){G(t);let n=t?.direction??K.swipeDirection,r=n===void 0||n===d,i=!!(D&&D.length>0),a=i&&(d===`down`||d===`up`)||!i||d===`left`||d===`right`||r,o=e;if(ne&&N>0){if(t&&Number.isFinite(t.deltaY))o=vS((vS((j??ne.minOffset)+t.deltaY,0,N)-ne.minOffset)/ne.range,0,1);else if(H!==null)o=H;else if(n===`down`||n===`up`){let t=e*N,r=j??ne.minOffset;o=vS(((n===`down`?r+t:r-t)-ne.minOffset)/ne.range,0,1)}}ae({resolvedProgress:o,shouldTrackProgress:a,notifyParent:!0})},onRelease({event:e,deltaX:t,deltaY:n,direction:i,velocityX:a,velocityY:o,releaseVelocityX:s,releaseVelocityY:c}){let l={deltaX:t,deltaY:n,velocityX:a,velocityY:o,releaseVelocityX:s,releaseVelocityY:c};function f(e){let t=u.context.popupRef.current;t&&(ie(),U(!0),t.style.removeProperty(`transition`),t.setAttribute(un.endingStyle,``),r.flushSync(()=>{F(oe({direction:e,...l}))}))}if(!D||D.length===0){if(!i){W();return}let e=u.context.popupRef.current;if(!e){W();return}let r=_C(e,i),s=i===`left`||i===`right`?t:n;if(!Number.isFinite(s)){W();return}let c=i===`left`||i===`up`?-s:s;if(c<=0)return W(),!1;let l=i===`left`||i===`right`?a:o;if((i===`left`||i===`up`?-l:l)>=MC&&c>0)return f(i),!0;let d=c>r;return d?f(i):W(),d}if(d!==`down`&&d!==`up`){W();return}if(!N||k.length===0){W();return}let p=d===`down`?n:-n;if(!Number.isFinite(p)){W();return}let m=Math.sign(p),g=d===`down`?c:-c,_=d===`down`?o:-o,v=Number.isFinite(g)?g:_;if(m!==0&&Math.abs(p)>=jC&&Number.isFinite(v)){let e=Math.sign(v);e!==0&&e!==m&&(v=_)}let y=j??0,b=vS(y+p,0,N),x=Number.isFinite(v)&&Math.abs(v)>=NC?vS(v,-FC,FC)*PC:0,S=h?b:vS(b+x,0,N),C=Y(Nt,e),w=()=>(I.current=A,M?.(null,C),f(d),!0);if(h){let e=[...k].sort((e,t)=>e.offset-t.offset);if(e.length===0)return W(),!1;let t=0,n=Math.abs(y-e[0].offset);for(let r=1;r<e.length;r+=1){let i=Math.abs(y-e[r].offset);i<n&&(n=i,t=r)}let r=e[0];n=Math.abs(S-r.offset);for(let t of e){let e=Math.abs(S-t.offset);e<n&&(n=e,r=t)}let i=Math.sign(v),a=m!==0&&i!==0&&i===m&&Math.abs(v)>=NC,o=S;if(a){let n=vS(t+m,0,e.length-1);if(n!==t){let t=e[n];(m>0?S<t.offset:S>t.offset)&&(r=t,o=t.offset)}else if(m>0)return w()}return Math.abs(o-N)<Math.abs(o-r.offset)?w():(M?.(r.value,C),W(),!1)}if(v>=MC&&p>0)return w();let T=k[0],E=Math.abs(S-T.offset);for(let e of k){let t=Math.abs(S-e.offset);t<E&&(E=t,T=e)}return Math.abs(S-N)<E?w():(M?.(T.value,C),W(),!1)},onDismiss(e){g?.set({swipeProgress:0,frontmostHeight:0});let t=u.context.backdropRef.current;t&&(t.style.setProperty(Gx.swipeProgress,`0`),t.style.removeProperty(Ux.height));let n=Y(Nt,e);if(u.setOpen(!1,n),n.isCanceled){let t=I.current;t!==void 0&&M?.(t,Y(Nt,e)),I.current=void 0,L.current?.(),W();return}if(u.select(`open`)){let t=e;R.request(()=>{if(u.select(`open`)){let e=I.current;e!==void 0&&M?.(e,Y(Nt,t)),I.current=void 0,W(),L.current?.()}else I.current=void 0});return}I.current=void 0,U(!0)}}),se=K.getPointerProps(),ce=K.getTouchProps(),le=K.reset;L.current=le,t.useEffect(()=>{let e=x??S;if(!e)return;let t=e,n=ua(t),r=Zn(n);function i(e){if(V.current)return;let i=te.current,a=e.touches[0];if(!a||!i)return;let o=T?a.clientY-i.lastY:a.clientX-i.lastX;if(SC(e,r)){i.allowSwipe=!1,wC(i,a);return}if(e.touches.length===2){wC(i,a);return}if(xC(n,t)||!_||!v||C){wC(i,a);return}if(TC(i,a,T)){wC(i,a);return}let s=i.scrollTarget;if(!s||s===n.documentElement||s===n.body){e.cancelable&&e.preventDefault(),wC(i,a);return}if(!EC(s,w)){e.cancelable&&e.preventDefault(),wC(i,a);return}let c=o;if(c!==0){let t=kC(s,w,d,c);i.allowSwipe?e.cancelable&&e.preventDefault():e.cancelable&&t?(i.allowSwipe=!0,e.preventDefault()):i.allowSwipe=!1}wC(i,a)}return lo(n,`touchmove`,i,{passive:!1,capture:!0})},[v,C,_,S,T,w,d,x]),t.useEffect(()=>{!ne||K.swiping||ae({resolvedProgress:!_||y?0:H??0,shouldTrackProgress:!0,notifyParent:!1})},[ae,m,y,p,_,H,ne,K.swiping,u,g]),t.useEffect(()=>{if(p)return _||p(0),()=>{p(0)}},[p,_]),t.useEffect(()=>{_&&(le(),W())},[W,_,le]),t.useEffect(()=>()=>{g?.set({swipeProgress:0,frontmostHeight:0}),mC(u.context.backdropRef.current,!1),ie()},[ie,u,g]);let ue=t.useMemo(()=>({swiping:K.swiping,getDragStyles:K.getDragStyles,swipeStrength:P??null,setSwipeDismissed(e){pC(u.context.popupRef.current,u.context.backdropRef.current,e)}}),[u,K.getDragStyles,K.swiping,P]);function de(){V.current=!1,te.current=null,z.current=``,B.current=!1}return(0,n.jsx)(Xm,{ref:i,className:a,render:o,...Pe(l,{onPointerDown(e){if(z.current=e.pointerType,B.current=e.pointerType===`pen`,!_||!v||C)return;let t=qS(ua(e.currentTarget),e.clientX,e.clientY);hC(t)||gC(t)||e.pointerType!==`touch`&&se.onPointerDown?.(e)},onPointerMove(e){e.pointerType!==`touch`&&se.onPointerMove?.(e)},onPointerUp(e){z.current===e.pointerType&&(z.current=``),e.pointerType!==`touch`&&se.onPointerUp?.(e)},onPointerCancel(e){z.current===e.pointerType&&(z.current=``),e.pointerType!==`touch`&&se.onPointerCancel?.(e)},onTouchStart(e){if(z.current===`pen`&&B.current){B.current=!1,V.current=!1,te.current=null;return}if(!_||!v||C){V.current=!1,te.current=null;return}let t=e.touches[0];if(!t)return;if(CC(e)){V.current=!1,te.current=null;return}if(V.current=hC(qS(ua(e.currentTarget),t.clientX,t.clientY)),V.current){te.current=null;return}let n=x??S,r=ti(e.nativeEvent),i=er(r)?r:null;if(n&&i&&!ei(n,i)){V.current=!0,te.current=null;return}let a=null,o=!1;n&&i&&(a=GS(i,n,w),o=GS(i,n,E)!=null);let s=null;a&&(s=OC(a,w,d)?null:!1),te.current={startX:t.clientX,startY:t.clientY,lastX:t.clientX,lastY:t.clientY,scrollTarget:a,hasCrossAxisScrollableContent:o,allowSwipe:s,preserveNativeCrossAxisScroll:!1},ce.onTouchStart?.(e)},onTouchMove(e){if(V.current||CC(e))return;let t=te.current;t?.preserveNativeCrossAxisScroll||t?.allowSwipe===!1||t?.scrollTarget!=null&&!t.allowSwipe||ce.onTouchMove?.(e)},onTouchEnd(e){de(),ce.onTouchEnd?.(e)},onTouchCancel(e){de(),ce.onTouchCancel?.(e)},"data-nested-dialog-open":void 0}),children:(0,n.jsx)(TS.Provider,{value:ue,children:c})})}),process.env.NODE_ENV!==`production`&&(UC.displayName=`DrawerViewport`)})),GC=p((()=>{Yx(),Zx(),tS(),rS(),lS(),fS(),jS(),NS(),IS(),HS(),N(),Nc(),$p(),J(),Rt(),It(),cC(),Wx(),mS(),Kx(),_S(),Xt(),Yf(),oS(),ym(),uC(),fC(),WC(),rm()})),KC=p((()=>{GC()}));function qC(e=!1){let n=t.useContext(JC);if(!n&&!e)throw Error(process.env.NODE_ENV===`production`?G(86):`Base UI: FieldsetRootContext is missing. Fieldset parts must be placed within <Fieldset.Root>.`);return n}var JC,YC=p((()=>{K(),JC=t.createContext({legendId:void 0,setLegendId:()=>{},disabled:void 0}),process.env.NODE_ENV!==`production`&&(JC.displayName=`FieldsetRootContext`)})),XC,ZC=p((()=>{w(),I(),da(),N(),Ih(),Rh(),Wh(),Kh(),Nh(),J(),Rt(),It(),Ra(),XC=t.forwardRef(function(e,n){let{render:r,className:i,id:a,name:o,value:s,disabled:c=!1,onValueChange:l,defaultValue:u,autoFocus:d=!1,style:f,...p}=e,{state:m,name:h,disabled:g,setTouched:_,setDirty:v,validityData:y,setFocused:b,setFilled:x,validationMode:C,validation:w}=Ph(),T=g||c,E=h??o,D={...m,disabled:T},{labelId:k}=Hh(),A=Gh({id:a});F(()=>{let e=s!=null;w.inputRef.current?.value||e&&s!==``?x(!0):e&&s===``&&x(!1)},[w.inputRef,x,s]);let j=t.useRef(null);F(()=>{d&&j.current===$r(ua(j.current))&&b(!0)},[d,b]);let[M]=S({controlled:s,default:u,name:`FieldControl`,state:`value`}),N=s!==void 0,P=N?M:void 0,I=O(()=>w.inputRef.current?.value);return Lh(w.inputRef,{id:A,value:P,getValue:I}),q(`input`,e,{ref:[n,j],state:D,props:[{id:A,disabled:T,name:E,ref:w.inputRef,"aria-labelledby":k,autoFocus:d,...N?{value:P}:{defaultValue:u},onChange(e){let t=e.currentTarget.value;l?.(t,Y(at,e.nativeEvent)),v(t!==y.initialValue),x(t!==``)},onFocus(){b(!0)},onBlur(e){_(!0),b(!1),C===`onBlur`&&w.commit(e.currentTarget.value)},onKeyDown(e){e.currentTarget.tagName===`INPUT`&&e.key===`Enter`&&(_(!0),w.commit(e.currentTarget.value))}},w.getInputValidationProps(),p],stateAttributesMapping:Mh})}),process.env.NODE_ENV!==`production`&&(XC.displayName=`FieldControl`)})),QC=p((()=>{N(),Ih(),Nh(),YC(),Vh(),D(),Xe(),Xt(),Wh(),Av(),Kh(),br(),da(),Ra(),my(),J(),De(),Nc(),I(),x(),Ut(),yo(),mn(),vn(),ZC(),Ev(),Nv()})),$C=p((()=>{QC()})),ew=p((()=>{YC(),J(),I(),Xt()})),tw=p((()=>{N(),De(),Rt(),It(),Vh(),J(),Kp()})),nw,rw=p((()=>{$C(),nw=t.forwardRef(function(e,t){return(0,n.jsx)(XC,{ref:t,...e})}),process.env.NODE_ENV!==`production`&&(nw.displayName=`Input`)})),iw=p((()=>{rw()})),aw,ow=p((()=>{aw=`data-composite-item-active`}));function sw(e){let{itemSizes:n,cols:r=1,loopFocus:i=!0,onLoop:a,dense:o=!1,orientation:s=`both`,direction:c,highlightedIndex:l,onHighlightedIndexChange:u,rootRef:d,enableHomeAndEndKeys:f=!1,stopEventPropagation:p=!1,disabledIndices:m,modifierKeys:h=lw}=e,[g,_]=t.useState(0),v=r>1,y=t.useRef(null),b=ue(y,d),x=t.useRef([]),S=t.useRef(!1),C=l??g,w=O((e,t=!1)=>{if((u??_)(e),t){let t=x.current[e];Va(y.current,t,c,s)}}),T=O(e=>{if(e.size===0||S.current)return;S.current=!0;let t=Array.from(e.keys()),n=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,r=n?t.indexOf(n):-1;r!==-1&&w(r),Va(y.current,n,c,s)}),E=O((e,t,n)=>a?a?.(e,t,n,x):n),D=t.useMemo(()=>({"aria-orientation":s===`both`?void 0:s,ref:b,onFocus(e){let t=y.current,n=ti(e.nativeEvent);!t||n==null||!Ba(n)||n.setSelectionRange(0,n.value.length??0)},onKeyDown(e){let t=f?no:to;if(!t.has(e.key)||cw(e,h)||!y.current)return;let l=c===`rtl`,u=l?Ka:qa,d={horizontal:u,vertical:Ga,both:u}[s],g=l?qa:Ka,_={horizontal:g,vertical:Wa,both:g}[s],b=ti(e.nativeEvent);if(b!=null&&Ba(b)&&!qn(b)){let t=b.selectionStart,n=b.selectionEnd,r=b.value??``;if(t==null||e.shiftKey||t!==n||e.key!==_&&t<r.length||e.key!==d&&t>0)return}let S=C,T=$i(x,m),D=ea(x,m);if(v){let t=n||Array.from({length:x.current.length},()=>({width:1,height:1})),a=ra(t,r,o),c=a.findIndex(e=>e!=null&&!oa(x.current,e,m)),u=a.reduce((e,t,n)=>t!=null&&!oa(x.current,t,m)?n:e,-1);S=a[na(a.map(e=>e==null?null:x.current[e]),{event:e,orientation:s,loopFocus:i,onLoop:E,cols:r,disabledIndices:aa([...m||x.current.map((e,t)=>oa(x.current,t)?t:void 0),void 0],a),minIndex:c,maxIndex:u,prevIndex:ia(C>D?T:C,t,a,r,e.key===`ArrowDown`?`bl`:e.key===`ArrowRight`?`tr`:`tl`),rtl:l})]}let O={horizontal:[u],vertical:[Ga],both:[u,Ga]}[s],k={horizontal:[g],vertical:[Wa],both:[g,Wa]}[s],A=v?t:{horizontal:f?Qa:Za,vertical:f?eo:$a,both:t}[s];f&&(e.key===`Home`?S=T:e.key===`End`&&(S=D)),S===C&&(O.includes(e.key)||k.includes(e.key))&&(i&&S===D&&O.includes(e.key)?(S=T,a&&(S=a(e,C,S,x))):i&&S===T&&k.includes(e.key)?(S=D,a&&(S=a(e,C,S,x))):S=ta(x.current,{startingIndex:S,decrement:k.includes(e.key),disabledIndices:m})),S!==C&&!Qi(x.current,S)&&(p&&e.stopPropagation(),A.has(e.key)&&e.preventDefault(),w(S,!0),queueMicrotask(()=>{x.current[S]?.focus()}))}}),[r,o,c,m,x,f,C,v,n,i,a,E,b,h,w,s,p]);return t.useMemo(()=>({props:D,highlightedIndex:C,onHighlightedIndexChange:w,elementsRef:x,disabledIndices:m,onMapChange:T,relayKeyboardEvent:D.onKeyDown}),[D,C,w,x,m,T])}function cw(e,t){for(let n of so.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}var lw,uw=p((()=>{Jn(),N(),ge(),co(),ow(),Ra(),lw=[]}));function dw(e){let{render:r,className:i,style:a,refs:o=Te,props:s=Te,state:c=Ee,stateAttributesMapping:l,highlightedIndex:u,onHighlightedIndexChange:d,orientation:f,dense:p,itemSizes:m,loopFocus:h,onLoop:g,cols:_,enableHomeAndEndKeys:v,onMapChange:y,stopEventPropagation:b=!0,rootRef:x,disabledIndices:S,modifierKeys:C,highlightItemOnHover:w=!1,tag:T=`div`,...E}=e,{props:D,highlightedIndex:O,onHighlightedIndexChange:k,elementsRef:A,onMapChange:j,relayKeyboardEvent:M}=sw({itemSizes:m,cols:_,loopFocus:h,onLoop:g,dense:p,orientation:f,highlightedIndex:u,onHighlightedIndexChange:d,rootRef:x,stopEventPropagation:b,enableHomeAndEndKeys:v,direction:W(),disabledIndices:S,modifierKeys:C}),N=q(T,e,{state:c,ref:o,props:[D,...s,E],stateAttributesMapping:l}),P=t.useMemo(()=>({highlightedIndex:O,onHighlightedIndexChange:k,highlightItemOnHover:w,relayKeyboardEvent:M}),[O,k,w,M]);return(0,n.jsx)(Sr.Provider,{value:P,children:(0,n.jsx)(te,{elementsRef:A,onMapChange:e=>{y?.(e),j(e)},children:N})})}var fw=p((()=>{De(),U(),uw(),Cr(),J(),ae()})),pw=p((()=>{Hp(),zb(),fw(),Xt()}));function mw(){let e=t.useContext(hw);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(38):`Base UI: MeterRootContext is missing. Meter parts must be placed within <Meter.Root>.`);return e}var hw,gw=p((()=>{K(),hw=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(hw.displayName=`MeterRootContext`)}));function _w(e,t){let n=JSON.stringify({locale:e,options:t}),r=xw.get(n);if(r)return r;let i=new Intl.NumberFormat(e,t);return xw.set(n,i),i}function vw(e,t,n){return e==null?``:_w(t,n).format(e)}function yw(e,t,n){return vw(e,t,{...n,maximumFractionDigits:20})}function bw(e,t,n){return e==null?``:n?vw(e,t,n):vw(e/100,t,{style:`percent`})}var xw,Sw=p((()=>{xw=new Map})),Cw,ww=p((()=>{cl(),gw(),Sw(),J(),Cw=t.forwardRef(function(e,r){let{format:i,getAriaValueText:a,locale:o,max:s=100,min:c=0,value:l,render:u,className:d,children:f,style:p,...m}=e,[h,g]=t.useState(),_=bw(l,o,i),v=`${l}%`;a?v=a(_,l):i&&(v=_);let y={"aria-labelledby":h,"aria-valuemax":s,"aria-valuemin":c,"aria-valuenow":l,"aria-valuetext":v,role:`meter`,children:(0,n.jsxs)(t.Fragment,{children:[f,(0,n.jsx)(`span`,{role:`presentation`,style:ol,children:`x`})]})},b=t.useMemo(()=>({formattedValue:_,max:s,min:c,setLabelId:g,value:l}),[_,s,c,g,l]),x=q(`div`,e,{ref:r,props:[y,m]});return(0,n.jsx)(hw.Provider,{value:b,children:x})}),process.env.NODE_ENV!==`production`&&(Cw.displayName=`MeterRoot`)})),Tw,Ew=p((()=>{J(),Tw=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return q(`div`,e,{ref:t,props:a})}),process.env.NODE_ENV!==`production`&&(Tw.displayName=`MeterTrack`)}));function Dw(e,t,n){return(e-t)*100/(n-t)}var Ow=p((()=>{})),kw,Aw=p((()=>{Ow(),gw(),J(),kw=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=mw();return q(`div`,e,{ref:t,props:[{style:{insetInlineStart:0,height:`inherit`,width:`${Dw(o.value,o.min,o.max)}%`}},a]})}),process.env.NODE_ENV!==`production`&&(kw.displayName=`MeterIndicator`)})),jw,Mw=p((()=>{gw(),J(),jw=t.forwardRef(function(e,t){let{className:n,render:r,children:i,style:a,...o}=e,{value:s,formattedValue:c}=mw();return q(`span`,e,{ref:t,props:[{"aria-hidden":!0,children:typeof i==`function`?i(c,s):(c||s)??``},o]})}),process.env.NODE_ENV!==`production`&&(jw.displayName=`MeterValue`)})),Nw,Pw=p((()=>{gw(),J(),my(),Nw=t.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{setLabelId:s}=mw();return q(`span`,e,{ref:t,props:[{id:py(a,s),role:`presentation`},o]})}),process.env.NODE_ENV!==`production`&&(Nw.displayName=`MeterLabel`)})),Fw=p((()=>{ww(),Ew(),Aw(),Mw(),Pw()})),Iw=p((()=>{Fw()})),Lw=p((()=>{br(),w(),N(),da(),Hp(),Ra(),J(),K(),yo(),vn(),hx(),It(),De(),fw(),Wf(),Xt(),I(),Rm(),mn(),ym(),uo(),Nc(),sn(),il(),up(),Rt(),Rl(),ul(),ex(),Ar(),gn(),tl(),__(),f_(),x_(),Jt(),ae()}));function Rw(){let e=t.useContext(zw);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(43):`Base UI: NumberFieldRootContext is missing. NumberField parts must be placed within <NumberField.Root>.`);return e}var zw,Bw=p((()=>{K(),zw=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(zw.displayName=`NumberFieldRootContext`)})),Vw,Hw=p((()=>{Nh(),Vw={inputValue:()=>null,value:()=>null,...Mh}}));function Uw(e,t){let n=_w(e,t).formatToParts(11111.1),r={};return n.forEach(e=>{r[e.type]=e.value}),_w(e).formatToParts(.1).forEach(e=>{e.type===`decimal`&&(r[e.type]=e.value)}),r}function Ww(e,t,n){if(e==null)return null;let r=String(e).replace(/\p{Cf}/gu,``).trim();r=r.replace(yT,`-`).replace(bT,`+`);let i=!1,a=r.match(/([+-])\s*$/);a&&(a[1]===`-`&&(i=!0),r=r.replace(/([+-])\s*$/,``));let o=r.match(/^\s*([+-])/);o&&(o[1]===`-`&&(i=!0),r=r.replace(/^\s*[+-]/,``));let s=t;s===void 0&&(oT.test(r)||sT.test(r)?s=`ar`:cT.test(r)&&(s=`zh`));let{group:c,decimal:l,currency:u}=Uw(s,n),d=_w(s,n).formatToParts(1).filter(e=>e.type===`unit`).map(e=>mT(e.value)),f=d.length?new RegExp(d.join(`|`),`g`):null,p=null;c&&(p=/\p{Zs}/u.test(c)?/\p{Zs}/gu:c===`'`||c===`’`?/['’]/g:new RegExp(mT(c),`g`));let m=[{regex:c?p:null,replacement:``},{regex:l?new RegExp(mT(l),`g`):null,replacement:`.`},{regex:/./g,replacement:`.`},{regex:/,/g,replacement:``},{regex:/٫/g,replacement:`.`},{regex:/٬/g,replacement:``},{regex:u?new RegExp(mT(u),`g`):null,replacement:``},{regex:f,replacement:``},{regex:eT,replacement:e=>String(qw.indexOf(e))},{regex:tT,replacement:e=>String(Jw.indexOf(e))},{regex:nT,replacement:e=>String(Yw.indexOf(e))},{regex:rT,replacement:e=>Kw[e]}].reduce((e,{regex:t,replacement:n})=>t?e.replace(t,n):e,r),h=m.lastIndexOf(`.`);if(h!==-1&&(m=`${m.slice(0,h).replace(/\./g,``)}.${m.slice(h+1).replace(/\./g,``)}`),/^[-+]?Infinity$/i.test(r)||/[∞]/.test(r))return null;let g=(i?`-`:``)+m,_=parseFloat(g),v=n?.style,y=v===`unit`&&n?.unit===`percent`,b=iT.test(e)||v===`percent`;return aT.test(e)?_/=1e3:!y&&b&&(_/=100),Number.isNaN(_)?null:_}var Gw,Kw,qw,Jw,Yw,Xw,Zw,Qw,$w,eT,tT,nT,rT,iT,aT,oT,sT,cT,lT,uT,dT,fT,pT,mT,hT,gT,_T,vT,yT,bT,xT,ST,CT=p((()=>{Sw(),Gw=[`零`,`〇`,`一`,`二`,`三`,`四`,`五`,`六`,`七`,`八`,`九`],Kw={零:`0`,〇:`0`,一:`1`,二:`2`,三:`3`,四:`4`,五:`5`,六:`6`,七:`7`,八:`8`,九:`9`},qw=[`٠`,`١`,`٢`,`٣`,`٤`,`٥`,`٦`,`٧`,`٨`,`٩`],Jw=[`۰`,`۱`,`۲`,`۳`,`۴`,`۵`,`۶`,`۷`,`۸`,`۹`],Yw=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],Xw=[`%`,`٪`,`%`,`﹪`],Zw=[`‰`,`؉`],Qw=[`−`,`-`,`‒`,`–`,`—`,`﹣`],$w=[`+`,`﹢`],eT=RegExp(`[${qw.join(``)}]`,`g`),tT=RegExp(`[${Jw.join(``)}]`,`g`),nT=RegExp(`[${Yw.join(``)}]`,`g`),rT=RegExp(`[${Gw.join(``)}]`,`g`),iT=RegExp(`[${Xw.join(``)}]`),aT=RegExp(`[${Zw.join(``)}]`),oT=/[٠١٢٣٤٥٦٧٨٩]/,sT=/[۰۱۲۳۴۵۶۷۸۹]/,cT=/[零〇一二三四五六七八九]/,lT=RegExp(`[${Yw.join(``)}]`),uT=[`.`,`,`,`.`,`,`,`٫`,`٬`],dT=/\p{Zs}/u,fT=[`+`,...$w],pT=[`-`,...Qw],mT=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),hT=e=>e.replace(/[-\\\]^]/g,e=>`\\${e}`),gT=e=>`[${e.map(hT).join(``)}]`,_T=gT([`-`].concat(Qw)),vT=gT([`+`].concat($w)),yT=new RegExp(_T,`gu`),bT=new RegExp(vT,`gu`),xT=new RegExp(_T),ST=new RegExp(vT)})),wT=p((()=>{}));function TT(e){let t=_w(`en-US`).resolvedOptions(),n=e?.minimumFractionDigits??t.minimumFractionDigits??0;return{maximumFractionDigits:Math.max(e?.maximumFractionDigits??t.maximumFractionDigits??20,n),minimumFractionDigits:n}}function ET(e,t){if(!Number.isFinite(e))return e;let n=Math.min(Math.max(t,0),20);return Number(e.toFixed(n))}function DT(e,t){let{maximumFractionDigits:n}=TT(t);return ET(e,n)}function OT(e,t,n,r=`directional`){if(n===0)return e;let i=Math.abs(n),a=Math.sign(n),o=i*AT*a,s=r===`nearest`?n:i,c=(e-t+o)/s,l;return l=r===`nearest`?Math.round(c):a>0?Math.floor(c):Math.ceil(c),t+l*(r===`nearest`?n:i)}function kT(e,{step:t,minWithDefault:n,maxWithDefault:r,minWithZeroDefault:i,format:a,snapOnStep:o,small:s,clamp:c}){if(e===null)return e;let l=c?vS(e,n,r):e;if(t!=null&&o){if(t===0)return DT(l,a);let e=i;return!s&&n!==-(2**53-1)&&(e=n),DT(OT(l,e,t,s?`nearest`:`directional`),a)}return DT(l,a)}var AT,jT=p((()=>{yS(),Sw(),AT=1e-10}));function MT(e,t,n){return n?.maximumFractionDigits!=null||n?.minimumFractionDigits!=null?vw(e,t,n):yw(e,t,n)}var NT,PT=p((()=>{uo(),w(),N(),I(),il(),Af(),ge(),cl(),da(),Gr(),Ra(),Bw(),Ih(),Kh(),Hw(),J(),CT(),Sw(),wT(),jT(),Rt(),It(),NT=t.forwardRef(function(e,r){let{id:i,min:a,max:o,smallStep:s=.1,step:c=1,largeStep:l=10,required:u=!1,disabled:d=!1,readOnly:f=!1,form:p,name:m,defaultValue:h,value:g,onValueChange:_,onValueCommitted:v,allowWheelScrub:y=!1,snapOnStep:b=!1,allowOutOfRange:x=!1,format:C,locale:w,render:T,className:E,inputRef:D,style:k,...A}=e,{setDirty:j,validityData:M,disabled:N,setFilled:P,invalid:I,name:L,state:R,validation:ee,shouldValidateOnChange:z}=Ph(),B=N||d,V=L??m,te=c===`any`?1:c,[ne,H]=t.useState(!1),re=a??-(2**53-1),U=o??2**53-1,W=a??0,ie=C?.style,ae=t.useRef(null),oe=ue(D,ee.inputRef),G=Gh({id:i}),[K,se]=S({controlled:g,default:h,name:`NumberField`,state:`value`}),ce=K??null,le=nl(ce);F(()=>{P(ce!==null)},[P,ce]);let de=kf(),fe=nl(C),pe=t.useRef(!1),me=O((e,t)=>{pe.current=!1,v?.(e,t)}),he=t.useRef(!0),ge=t.useRef(null),[_e,ve]=t.useState(()=>g===void 0?vw(ce,w,C):MT(ce,w,C)),[ye,be]=t.useState(`numeric`),xe=O(()=>{let{decimal:e,group:t,currency:n,literal:r}=Uw(w,C),i=new Set;uT.forEach(e=>i.add(e)),e&&i.add(e),t&&(i.add(t),dT.test(t)&&i.add(` `));let a=ie===`percent`||ie===`unit`&&C?.unit===`percent`,o=ie===`percent`||ie===`unit`&&C?.unit===`permille`;return a&&Xw.forEach(e=>i.add(e)),o&&Zw.forEach(e=>i.add(e)),ie===`currency`&&n&&i.add(n),r&&(Array.from(r).forEach(e=>i.add(e)),dT.test(r)&&i.add(` `)),fT.forEach(e=>i.add(e)),re<0&&pT.forEach(e=>i.add(e)),i}),Se=O(e=>e?.altKey?s:e?.shiftKey?l:te),Ce=O((e,t)=>{let n=t.event,r=t.direction,i=t.reason,a=!x||!(i===`input-change`||i===`input-blur`||i===`input-paste`||i===`input-clear`||i===`none`),o=kT(e,{step:r?Se(n)*r:void 0,format:fe.current,minWithDefault:re,maxWithDefault:U,minWithZeroDefault:W,snapOnStep:b,small:n?.altKey??!1,clamp:a}),s=t.reason===`input-change`||t.reason===`input-clear`||t.reason===`input-blur`||t.reason===`input-paste`||t.reason===`none`,c=o!==ce||s&&(e!==ce||he.current===!1);if(c){if(ge.current=o,_?.(o,t),t.isCanceled)return c;se(o),j(o!==M.initialValue),pe.current=!0}return he.current&&ve(vw(o,w,C)),de(),c}),we=O((e,{direction:t,currentValue:n,event:r,reason:i})=>{let o=n??le.current;return Ce(typeof o==`number`?o+e*t:Math.max(0,a??0),Y(i,r,void 0,{direction:t}))});F(function(){if(!he.current)return;let e=g===void 0?vw(ce,w,C):MT(ce,w,C);e!==_e&&ve(e)}),F(function(){if(!zr)return;let e=`text`;re>=0&&(e=`decimal`),be(e)},[re,ie]),t.useEffect(function(){let e=ae.current;if(B||f||!y||!e)return;function t(e){e.ctrlKey||$r(ua(ae.current))!==ae.current||(e.preventDefault(),we(Se(e)??1,{direction:e.deltaY>0?-1:1,event:e,reason:`wheel`}))}return lo(e,`wheel`,t)},[y,we,B,f,l,te,Se]);let Te=t.useMemo(()=>({...R,disabled:B,readOnly:f,required:u,value:ce,inputValue:_e,scrubbing:ne}),[R,B,f,u,ce,_e,ne]),Ee=t.useMemo(()=>({inputRef:ae,inputValue:_e,value:ce,minWithDefault:re,maxWithDefault:U,disabled:B,readOnly:f,id:G,setValue:Ce,incrementValue:we,getStepAmount:Se,allowInputSyncRef:he,formatOptionsRef:fe,valueRef:le,lastChangedValueRef:ge,hasPendingCommitRef:pe,name:V,required:u,invalid:I,inputMode:ye,getAllowedNonNumericKeys:xe,min:a,max:o,setInputValue:ve,locale:w,isScrubbing:ne,setIsScrubbing:H,state:Te,onValueCommitted:me}),[ae,_e,ce,re,U,B,f,G,Ce,we,Se,fe,le,V,u,I,ye,xe,a,o,ve,w,ne,Te,me]),De=q(`div`,e,{ref:r,state:Te,props:A,stateAttributesMapping:Vw});return(0,n.jsxs)(zw.Provider,{value:Ee,children:[De,(0,n.jsx)(`input`,{...ee.getInputValidationProps({onFocus(){ae.current?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.currentTarget.valueAsNumber,n=Number.isNaN(t)?null:t,r=Y(at,e.nativeEvent);j(n!==M.initialValue),Ce(n,r),z()&&ee.commit(n)}}),ref:oe,type:`number`,form:p,name:V,value:ce??``,min:a,max:o,step:c,disabled:B,required:u,"aria-hidden":!0,tabIndex:-1,style:V?sl:ol,suppressHydrationWarning:!0})]})}),process.env.NODE_ENV!==`production`&&(NT.displayName=`NumberFieldRoot`)})),FT,IT=p((()=>{Bw(),Hw(),J(),FT=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=Rw();return q(`div`,e,{ref:t,state:o,props:[{role:`group`},a],stateAttributesMapping:Vw})}),process.env.NODE_ENV!==`production`&&(FT.displayName=`NumberFieldGroup`)}));function LT(){let e=T(zT.create).current;return Zt(e.disposeEffect),e}var RT,zT,BT=p((()=>{D(),$t(),Nc(),RT=0,zT=class e extends Mc{static create(){return new e}start(e,t){this.clear(),this.currentId=setInterval(()=>{t()},e)}clear=()=>{this.currentId!==RT&&(clearInterval(this.currentId),this.currentId=RT)}}}));function VT(e){return e===`touch`||e===`pen`}function HT(e){let{disabled:n,readOnly:r=!1,tick:i,onStop:a,tickDelay:o=UT,startDelay:s=WT,scrollDistance:c=GT,elementRef:l}=e,u=Ac(),d=LT(),f=Ac(),p=t.useRef(!1),m=t.useRef(0),h=t.useRef({x:0,y:0}),g=t.useRef(!1),_=t.useRef(!1),v=t.useRef(``),y=t.useRef(()=>{}),b=O(()=>{f.clear(),u.clear(),d.clear(),y.current(),m.current=0}),x=O(e=>{b();let t=l.current;if(!t)return;let n=Zn(t);function r(e){e.preventDefault()}if(y.current=lo(n,`contextmenu`,r),lo(n,`pointerup`,e=>{p.current=!1,b(),a?.(e)},{once:!0}),!i(e)){b();return}u.start(s,()=>{d.start(o,()=>{i(e)||b()})})});return t.useEffect(()=>()=>b(),[b]),{pointerHandlers:{onTouchStart(){g.current=!0},onTouchEnd(){g.current=!1},onPointerDown(e){let t=!e.button||e.button===0;e.defaultPrevented||!t||n||r||(v.current=e.pointerType,_.current=!1,p.current=!0,h.current={x:e.clientX,y:e.clientY},VT(e.pointerType)?f.start(KT,()=>{let t=m.current;m.current=0,p.current&&t<qT?(x(e.nativeEvent),_.current=!0):(_.current=!1,b())}):(e.preventDefault(),x(e.nativeEvent)))},onPointerUp(e){VT(e.pointerType)&&(p.current=!1)},onPointerMove(e){if(n||r||!VT(e.pointerType)||!p.current)return;m.current!=null&&(m.current+=1);let{x:t,y:i}=h.current,a=t-e.clientX,o=i-e.clientY;a**2+o**2>c**2&&b()},onMouseEnter(e){e.defaultPrevented||n||r||!p.current||g.current||VT(v.current)||x(e.nativeEvent)},onMouseLeave(){g.current||b()},onMouseUp(){g.current||b()}},shouldSkipClick:O(e=>e.defaultPrevented?!0:VT(v.current)?_.current:e.detail!==0)}}var UT,WT,GT,KT,qT,JT=p((()=>{uo(),Nc(),BT(),N(),da(),UT=60,WT=400,GT=8,KT=50,qT=3}));function YT(e){return e===`touch`||e===`pen`}function XT(e){let{allowInputSyncRef:t,disabled:n,formatOptionsRef:r,getStepAmount:i,id:a,incrementValue:o,inputRef:s,inputValue:c,isIncrement:l,locale:u,readOnly:d,setValue:f,valueRef:p,lastChangedValueRef:m,onValueCommitted:h}=e,g=l?ht:gt;function _(e){t.current=!0;let n=Ww(c,u,r.current);n!==null&&(p.current=n,f(n,Y(g,e,void 0,{direction:l?1:-1})))}let{pointerHandlers:v,shouldSkipClick:y}=HT({disabled:n||d,elementRef:s,tickDelay:60,startDelay:400,scrollDistance:8,tick(e){return o(i(e)??1,{direction:l?1:-1,event:e,reason:g})},onStop(e){h(m.current??p.current,Lt(g,e))}});return{disabled:n,"aria-readonly":d||void 0,"aria-label":l?`Increase`:`Decrease`,"aria-controls":a,tabIndex:-1,style:{WebkitUserSelect:`none`,userSelect:`none`},...v,onClick(e){let t=n||d;if(e.defaultPrevented||t||y(e))return;_(e.nativeEvent);let r=i(e)??1,a=p.current;o(r,{direction:l?1:-1,event:e.nativeEvent,reason:g});let s=m.current??p.current;s!==a&&h(s,Lt(g,e.nativeEvent))},onPointerDown(e){let t=!e.button||e.button===0;e.defaultPrevented||d||!t||n||(_(e.nativeEvent),YT(e.pointerType)||s.current?.focus(),v.onPointerDown(e))}}}var ZT=p((()=>{JT(),wT(),CT(),Rt(),It()})),QT,$T=p((()=>{J(),Ar(),Bw(),ZT(),Hw(),QT=t.forwardRef(function(e,n){let{render:r,className:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{allowInputSyncRef:l,disabled:u,formatOptionsRef:d,getStepAmount:f,id:p,incrementValue:m,inputRef:h,inputValue:g,locale:_,maxWithDefault:v,readOnly:y,setValue:b,state:x,value:S,valueRef:C,lastChangedValueRef:w,onValueCommitted:T}=Rw(),E=a||u||S!=null&&S>=v,D=XT({isIncrement:!0,inputRef:h,inputValue:g,disabled:E,readOnly:y,id:p,setValue:b,getStepAmount:f,incrementValue:m,allowInputSyncRef:l,formatOptionsRef:d,valueRef:C,locale:_,lastChangedValueRef:w,onValueCommitted:T}),{getButtonProps:O,buttonRef:k}=Er({disabled:E,native:o,focusableWhenDisabled:!0}),A=t.useMemo(()=>({...x,disabled:E}),[x,E]);return q(`button`,e,{ref:[n,k],state:A,props:[D,c,O],stateAttributesMapping:Vw})}),process.env.NODE_ENV!==`production`&&(QT.displayName=`NumberFieldIncrement`)})),eE,tE=p((()=>{J(),Ar(),Bw(),ZT(),Hw(),eE=t.forwardRef(function(e,n){let{render:r,className:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{allowInputSyncRef:l,disabled:u,formatOptionsRef:d,getStepAmount:f,id:p,incrementValue:m,inputRef:h,inputValue:g,minWithDefault:_,readOnly:v,setValue:y,state:b,value:x,valueRef:S,locale:C,lastChangedValueRef:w,onValueCommitted:T}=Rw(),E=a||u||x!=null&&x<=_,D=XT({isIncrement:!1,inputRef:h,inputValue:g,disabled:E,readOnly:v,id:p,setValue:y,getStepAmount:f,incrementValue:m,allowInputSyncRef:l,formatOptionsRef:d,valueRef:S,locale:C,lastChangedValueRef:w,onValueCommitted:T}),{getButtonProps:O,buttonRef:k}=Er({disabled:E,native:o,focusableWhenDisabled:!0}),A=t.useMemo(()=>({...b,disabled:E}),[b,E]);return q(`button`,e,{ref:[n,k],state:A,props:[D,c,O],stateAttributesMapping:Vw})}),process.env.NODE_ENV!==`production`&&(eE.displayName=`NumberFieldDecrement`)})),nE,rE,iE,aE=p((()=>{Ra(),Bw(),Ih(),Rh(),Nh(),Vh(),Wh(),wT(),CT(),Hw(),J(),Rt(),Sw(),Kp(),It(),nE={...Mh,...Vw},rE=new Set([`Backspace`,`Delete`,`ArrowLeft`,`ArrowRight`,`Tab`,`Enter`,`Escape`]),iE=t.forwardRef(function(e,n){let{render:r,className:i,style:a,...o}=e,{allowInputSyncRef:s,disabled:c,formatOptionsRef:l,getAllowedNonNumericKeys:u,getStepAmount:d,id:f,incrementValue:p,inputMode:m,inputValue:h,max:g,min:_,name:v,readOnly:y,required:b,setValue:x,state:S,setInputValue:C,locale:w,inputRef:T,value:E,onValueCommitted:D,lastChangedValueRef:O,hasPendingCommitRef:k,valueRef:A}=Rw(),{clearErrors:j}=zh(),{validationMode:M,setTouched:N,setFocused:P,invalid:F,shouldValidateOnChange:I,validation:L}=Ph(),{labelId:R}=Hh(),ee=t.useRef(!1),z=t.useRef(!1);return Lh(T,{id:f,value:E}),Gp(E,e=>{let t=I();if(j(v),t&&L.commit(E),!(e===E||t)){if(z.current){z.current=!1;return}L.commit(E,!0)}}),q(`input`,e,{ref:[n,T],state:S,props:[{id:f,required:b,disabled:c,readOnly:y,inputMode:m,value:h,type:`text`,autoComplete:`off`,autoCorrect:`off`,spellCheck:`false`,"aria-roledescription":`Number field`,"aria-invalid":F||void 0,"aria-labelledby":R,suppressHydrationWarning:!0,onFocus(e){if(e.defaultPrevented||y||c||(P(!0),ee.current))return;ee.current=!0;let t=e.currentTarget,n=t.value.length;t.setSelectionRange(n,n)},onBlur(e){if(e.defaultPrevented||y||c)return;N(!0),P(!1);let t=!s.current,n=k.current;if(s.current=!0,h.trim()===``){x(null,Y(vt,e.nativeEvent)),M===`onBlur`&&L.commit(null),D(null,Lt(vt,e.nativeEvent));return}let r=l.current,i=Ww(h,w,r);if(i===null)return;let a=r?.maximumFractionDigits!=null||r?.minimumFractionDigits!=null,o=r?.maximumFractionDigits,u=a&&typeof o==`number`?Number(i.toFixed(o)):i,d=Lt(yt,e.nativeEvent),f=E!==u,p=t||f||n;M===`onBlur`&&L.commit(u),f&&(z.current=!0,x(u,Y(yt,e.nativeEvent))),p&&D(u,d);let m=vw(u,w,r);!(!a&&i===E&&h===yw(i,w,r))&&h!==m&&C(m)},onChange(e){if(e.nativeEvent.defaultPrevented)return;s.current=!1;let t=e.currentTarget.value;if(t.trim()===``){C(t),x(null,Y(vt,e.nativeEvent));return}let n=u();if(!Array.from(t).every(e=>{let t=e>=`0`&&e<=`9`,r=oT.test(e),i=cT.test(e),a=sT.test(e),o=lT.test(e),s=xT.test(e);return t||r||i||a||o||s||n.has(e)}))return;let r=Ww(t,w,l.current);C(t),r!==null&&x(r,Y(_t,e.nativeEvent))},onKeyDown(e){if(e.defaultPrevented||y||c)return;let t=e.nativeEvent;s.current=!0;let n=u(),r=n.has(e.key),{decimal:i,currency:a,percentSign:o}=Uw(w,l.current),f=e.currentTarget.selectionStart,m=e.currentTarget.selectionEnd,v=f===0&&m===h.length,b=e=>f!=null&&m!=null&&e>=f&&e<m;if(xT.test(e.key)&&Array.from(n).some(e=>xT.test(e||``))){let e=h.search(yT),t=e!=null&&e!==-1&&b(e);r=!(xT.test(h)||ST.test(h))||v||t}if(ST.test(e.key)&&Array.from(n).some(e=>ST.test(e||``))){let e=h.search(bT),t=e!=null&&e!==-1&&b(e);r=!(xT.test(h)||ST.test(h))||v||t}[i,a,o].forEach(t=>{if(e.key===t){let e=b(h.indexOf(t));r=!h.includes(t)||v||e}});let S=e.key>=`0`&&e.key<=`9`,C=oT.test(e.key),T=cT.test(e.key),E=lT.test(e.key),k=rE.has(e.key);if(e.which===229||e.altKey||e.ctrlKey||e.metaKey||r||S||C||E||T||k)return;let j=Ww(h,w,l.current),M=d(e)??1;hi(e);let N=Lt(Et,t);e.key===`ArrowUp`?(p(M,{direction:1,currentValue:j,event:t,reason:Et}),D(O.current??A.current,N)):e.key===`ArrowDown`?(p(M,{direction:-1,currentValue:j,event:t,reason:Et}),D(O.current??A.current,N)):e.key===`Home`&&_!=null?(x(_,Y(Et,t)),D(O.current??A.current,N)):e.key===`End`&&g!=null&&(x(g,Y(Et,t)),D(O.current??A.current,N))},onPaste(e){if(e.defaultPrevented||y||c)return;e.preventDefault();let t=(e.clipboardData||window.Clipboard).getData(`text/plain`),n=Ww(t,w,l.current);n!==null&&(s.current=!1,x(n,Y(bt,e.nativeEvent)),C(t))}},L.getValidationProps(),o],stateAttributesMapping:nE})}),process.env.NODE_ENV!==`production`&&(iE.displayName=`NumberFieldInput`)}));function oE(){let e=t.useContext(sE);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(44):`Base UI: NumberFieldScrubAreaContext is missing. NumberFieldScrubArea parts must be placed within <NumberField.ScrubArea>.`);return e}var sE,cE=p((()=>{K(),sE=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(sE.displayName=`NumberFieldScrubAreaContext`)}));function lE(e,t){let n=Zn(t),r=t.getBoundingClientRect();if(r&&e!=null)return{x:r.left-e/2,y:r.top-e/2,width:r.right+e/2,height:r.bottom+e/2};let i=n.visualViewport;return i?{x:i.offsetLeft,y:i.offsetTop,width:i.offsetLeft+i.width,height:i.offsetTop+i.height}:{x:0,y:0,width:n.document.documentElement.clientWidth,height:n.document.documentElement.clientHeight}}var uE=p((()=>{da()}));function dE(e,t){let n=Zn(e).visualViewport;if(!n)return()=>{};function r(){n&&(t.current=n.scale)}return r(),lo(n,`resize`,r)}var fE=p((()=>{uo(),da()})),pE,mE=p((()=>{uo(),tl(),da(),Gr(),N(),Nc(),Bw(),Hw(),cE(),J(),uE(),fE(),wT(),Rt(),It(),Ra(),pE=t.forwardRef(function(e,i){let{render:a,className:o,direction:s=`horizontal`,pixelSensitivity:c=2,teleportDistance:l,style:u,...d}=e,{state:f,setIsScrubbing:p,disabled:m,readOnly:h,inputRef:g,incrementValue:_,getStepAmount:v,onValueCommitted:y,lastChangedValueRef:b,valueRef:x}=Rw(),S=t.useRef(null),C=t.useRef(!1),w=t.useRef(!1),T=t.useRef(null),E=t.useRef(null),D=t.useRef({x:0,y:0}),k=t.useRef(1),A=Ac(),[j,M]=t.useState(!1),[N,P]=t.useState(!1),[F,I]=t.useState(!1);t.useEffect(()=>{if(!(!F||!E.current))return dE(E.current,k)},[F]);function L(e,t){E.current&&(E.current.style.transform=`translate3d(${e}px,${t}px,0) scale(${1/k.current})`)}let R=O(({movementX:e,movementY:t})=>{let n=E.current,r=S.current;if(!n||!r)return;let i=lE(l,r),a=D.current,o={x:Math.round(a.x+e),y:Math.round(a.y+t)},s=n.offsetWidth,c=n.offsetHeight;o.x+s/2<i.x?o.x=i.width-s/2:o.x+s/2>i.width&&(o.x=i.x-s/2),o.y+c/2<i.y?o.y=i.height-c/2:o.y+c/2>i.height&&(o.y=i.y-c/2),D.current=o,L(o.x,o.y)}),ee=O((e,{clientX:t,clientY:n})=>{r.flushSync(()=>{I(e),p(e)});let i=E.current;if(!i||!e)return;let a={x:t-i.offsetWidth/2,y:n-i.offsetHeight/2};D.current=a,L(a.x,a.y)});t.useEffect(function(){if(!g.current||m||h||!F)return;let e=0;function t(e){function t(){try{ua(S.current).exitPointerLock()}catch{}finally{C.current=!1,ee(!1,e),y(b.current??x.current,Lt(Ot,e)),!w.current&&T.current!=null&&T.current.dispatchEvent(new MouseEvent(`click`,{bubbles:!0,cancelable:!0})),w.current=!1,T.current=null}}Br?A.start(20,t):t()}function n(t){if(!C.current)return;t.preventDefault(),R(t);let{movementX:n,movementY:r}=t;if(e+=s===`vertical`?r:n,Math.abs(e)>=c){e=0,w.current=!0;let i=(s===`vertical`?-r:n)*(v(t)??1);i!==0&&_(Math.abs(i),{direction:i>=0?1:-1,event:t,reason:Ot})}}let r=Zn(g.current),i=el(lo(r,`pointerup`,t,!0),lo(r,`pointermove`,n,!0));return()=>{A.clear(),i()}},[m,h,_,F,v,g,ee,R,s,c,b,y,x,A]),t.useEffect(function(){let e=S.current;if(!e||m||h)return;function t(e){e.touches.length===1&&e.preventDefault()}return lo(e,`touchstart`,t)},[m,h]);let z=q(`span`,e,{ref:[i,S],state:f,props:[{role:`presentation`,style:{touchAction:`none`,WebkitUserSelect:`none`,userSelect:`none`},async onPointerDown(e){let t=!e.button||e.button===0;if(e.defaultPrevented||h||!t||m)return;let n=e.pointerType===`touch`;if(M(n),e.pointerType===`mouse`&&(e.preventDefault(),g.current?.focus()),C.current=!0,w.current=!1,T.current=ti(e.nativeEvent),ee(!0,e.nativeEvent),!n&&!Rr)try{await ua(S.current).body.requestPointerLock(),P(!1)}catch{P(!0)}finally{C.current&&r.flushSync(()=>{ee(!0,e.nativeEvent)})}}},d],stateAttributesMapping:Vw}),B=t.useMemo(()=>({isScrubbing:F,isTouchInput:j,isPointerLockDenied:N,scrubAreaCursorRef:E,scrubAreaRef:S,direction:s,pixelSensitivity:c,teleportDistance:l}),[F,j,N,s,c,l]);return(0,n.jsx)(sE.Provider,{value:B,children:z})}),process.env.NODE_ENV!==`production`&&(pE.displayName=`NumberFieldScrubArea`)})),hE,gE=p((()=>{Gr(),da(),Bw(),Hw(),cE(),J(),hE=t.forwardRef(function(e,n){let{render:i,className:a,style:o,...s}=e,{state:c}=Rw(),{isScrubbing:l,isTouchInput:u,isPointerLockDenied:d,scrubAreaCursorRef:f}=oE(),[p,m]=t.useState(null),h=q(`span`,e,{enabled:l&&!Rr&&!u&&!d,ref:[n,f,m],state:c,props:[{role:`presentation`,style:{position:`fixed`,top:0,left:0,pointerEvents:`none`}},s],stateAttributesMapping:Vw});return h&&r.createPortal(h,ua(p).body)}),process.env.NODE_ENV!==`production`&&(hE.displayName=`NumberFieldScrubAreaCursor`)})),_E=p((()=>{PT(),IT(),$T(),tE(),aE(),mE(),gE()})),vE=p((()=>{_E()}));function yE(){let e=t.useContext(xE);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(98):`Base UI: OTPFieldRootContext is missing. OTPField parts must be placed within <OTPField.Root>.`);return e}function bE(e,t,n){return{...e,value:t,index:n,filled:t!==``}}var xE,SE=p((()=>{K(),xE=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(xE.displayName=`OTPFieldRootContext`)})),CE,wE,TE=p((()=>{Nh(),CE={value:()=>null,length:()=>null,...Mh},wE={value:()=>null,index:()=>null,...Mh}}));function EE(e){return e===`none`?null:jE[e]}function DE(e){return(e??``).replace(/\s/g,``)}function OE(e,t,n,r){let i=DE(e),a=EE(n);return a?i=i.replace(a.regexp,``):r&&(i=r(i)),Array.from(i).slice(0,Math.max(t,0)).join(``)}function kE(e,t,n,r,i,a){let o=OE(n,r,i,a);return OE(`${e.slice(0,t)}${o}${e.slice(t+o.length)}`,r,i,a)}function AE(e,t){return t<0||t>=e.length?e:`${e.slice(0,t)}${e.slice(t+1)}`}var jE,ME=p((()=>{jE={numeric:{slotPattern:`\\d{1}`,getRootPattern:e=>`\\d{${e}}`,regexp:/[^\d]/g,inputMode:`numeric`},alpha:{slotPattern:`[a-zA-Z]{1}`,getRootPattern:e=>`[a-zA-Z]{${e}}`,regexp:/[^a-zA-Z]/g,inputMode:`text`},alphanumeric:{slotPattern:`[a-zA-Z0-9]{1}`,getRootPattern:e=>`[a-zA-Z0-9]{${e}}`,regexp:/[^a-zA-Z0-9]/g,inputMode:`text`}}}));function NE(...e){let t=e.flatMap(e=>e?.split(/\s+/).filter(Boolean)??[]);return t.length>0?Array.from(new Set(t)).join(` `):void 0}function PE(e){let{inputCount:n,length:r,sanitizeValue:i,validationType:a}=e;t.useEffect(()=>{if(!Number.isInteger(r)||r<=0||n===0||n===r)return;let e=Ht.captureOwnerStack?.()||``;L(`<OTPField.Root> \`length\` must match the number of rendered <OTPField.Input /> parts. Received \`length={${r}}\` but rendered ${n} input${n===1?``:`s`}.`,e)},[n,r]),t.useEffect(()=>{if(Number.isInteger(r)&&r>0)return;let e=Ht.captureOwnerStack?.()||``;L(`<OTPField.Root> \`length\` must be a positive integer. Received \`length={${String(r)}}\`.`,e)},[r]),t.useEffect(()=>{i==null||a===`none`||L('<OTPField.Root> `sanitizeValue` is only used when `validationType="none"`.',Ht.captureOwnerStack?.()||``)},[i,a])}var FE,IE=p((()=>{Ut(),w(),I(),N(),il(),cl(),ee(),da(),Ra(),U(),Ih(),Rh(),Vh(),Wh(),Av(),Kh(),J(),Kp(),Rt(),It(),SE(),TE(),ME(),FE=t.forwardRef(function(e,r){let{"aria-describedby":i,"aria-labelledby":a,id:o,autoComplete:s=`one-time-code`,defaultValue:c,value:l,onValueChange:u,onValueComplete:d,form:f,length:p,autoSubmit:m=!1,mask:h=!1,inputMode:g,validationType:_=`numeric`,sanitizeValue:v,disabled:y=!1,readOnly:b=!1,required:x=!1,name:C,onValueInvalid:w,render:T,className:E,style:D,...k}=e,{setDirty:A,validityData:j,disabled:M,setFilled:N,invalid:P,name:I,state:L,validation:R,validationMode:ee,shouldValidateOnChange:z,setFocused:B,setTouched:V}=Ph(),{clearErrors:ne}=zh(),{getDescriptionProps:H,labelId:re}=Hh(),U=M||y,W=I??C,[ie,ae]=S({controlled:l,default:c,name:`OTPField`,state:`value`}),oe=t.useRef(null),G=t.useRef([]),K=t.useRef(null),se=t.useRef(null),ce=t.useMemo(()=>({get current(){return G.current[0]??null}}),[]),le=Gh({id:o}),ue=Dv(a,re,ce,!0,le),de=a==null?ue:void 0,fe=NE(H({})[`aria-describedby`],i),pe=EE(_),me=pe?.slotPattern,he=pe?.getRootPattern(p),ge=g??pe?.inputMode,_e=Number.isInteger(p)&&p>0,ve=OE(ie,p,_,v),ye=nl(ve),be=ve!==``,[xe,Se]=t.useState(0),[Ce,we]=t.useState(()=>Math.min(ve.length,p-1)),[Te,Ee]=t.useState(!1),De=Te?Math.min(Ce,Math.max(p-1,0)):Math.min(ve.length,p-1);F(()=>{N(be)},[be,N]),process.env.NODE_ENV!==`production`&&PE({inputCount:xe,length:p,sanitizeValue:v,validationType:_}),Lh(ce,{id:le,getValue:()=>ye.current,value:ve});let Oe=O(e=>{let t=Math.min(Math.max(e,0),Math.max(G.current.length-1,0)),n=G.current[t];n?.focus(),n?.select()}),ke=O((e,t)=>{K.current={index:e,value:t}});function Ae(){let e=R.inputRef.current?.form??G.current[0]?.form??null;if(f){let t=ua(oe.current).getElementById(f);t?.tagName===`FORM`&&(e=t)}e&&typeof e.requestSubmit==`function`&&e.requestSubmit()}Gp(ve,()=>{ne(W),A(ve!==j.initialValue),z()?R.commit(ve):R.commit(ve,!0);let e=se.current;e!=null&&(se.current=null,e.value===ve&&(d?.(ve,e.eventDetails),m&&Ae()));let t=K.current;t!=null&&(K.current=null,t.value===ve&&Oe(t.index))});let je=O((e,t)=>{let n=OE(e,p,_,v);return n===ye.current||(u?.(n,t),t.isCanceled)?null:(ae(n),n.length===p&&ye.current.length!==p?se.current={value:n,eventDetails:Lt(t.reason,t.event)}:n.length!==p&&(se.current=null),n)}),Me=O((e,t)=>{w?.(e,t)}),Ne=O((e,t)=>{if(e>ye.current.length){Oe(Math.min(ye.current.length,p-1));return}we(e),Ee(!0),B(!0),t.currentTarget.select()}),Pe=O(e=>{ei(oe.current,e.relatedTarget)||(V(!0),Ee(!1),B(!1),ee===`onBlur`&&R.commit(ye.current))}),Fe=t.useCallback(e=>{if(le!=null)return e===0?le:`${le}-${e+1}`},[le]),Ie=t.useMemo(()=>({...L,complete:ve.length===p,disabled:U,filled:be,focused:Te,length:p,readOnly:b,required:x,value:ve}),[U,L,be,Te,p,b,x,ve]),Le=t.useMemo(()=>({autoComplete:s,activeIndex:De,disabled:U,form:f,focusInput:Oe,queueFocusInput:ke,getInputId:Fe,handleInputBlur:Pe,handleInputFocus:Ne,inputMode:ge,inputAriaLabelledBy:de,invalid:P,length:p,mask:h,pattern:me,reportValueInvalid:Me,readOnly:b,required:x,sanitizeValue:v,setValue:je,state:Ie,validationType:_,value:ve}),[De,s,U,Oe,f,Fe,Pe,Ne,ge,de,P,p,h,me,ke,b,Me,x,v,je,Ie,_,ve]),Re=q(`div`,e,{ref:[r,oe],state:Ie,props:[{role:`group`,"aria-describedby":fe,"aria-labelledby":ue},k],stateAttributesMapping:CE});return(0,n.jsx)(te,{elementsRef:G,onMapChange:e=>{Se(e.size)},children:(0,n.jsxs)(xE.Provider,{value:Le,children:[Re,_e&&(0,n.jsx)(`input`,{...R.getInputValidationProps({onFocus(){Oe(0)},onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.currentTarget.value,n=OE(t,p,_,v);DE(t).length>n.length&&Me(t,Lt(`input-change`,e.nativeEvent));let r=je(n,Y(`input-change`,e.nativeEvent));r!=null&&r!==``&&ke(r.length-1,r)}}),ref:R.inputRef,type:`text`,id:le&&W==null?`${le}-hidden-input`:void 0,form:f,name:W,value:ve,autoComplete:s,inputMode:ge,minLength:p,maxLength:p,pattern:he,disabled:U,readOnly:b,required:x,"aria-hidden":!0,tabIndex:-1,style:W?sl:ol})]})})}),process.env.NODE_ENV!==`production`&&(FE.displayName=`OTPFieldRoot`)})),LE,RE=p((()=>{Ut(),ee(),Ra(),En(),J(),Rt(),It(),SE(),TE(),ME(),LE=t.forwardRef(function(e,n){let{"aria-label":r,"aria-labelledby":i,render:a,className:o,style:s,...c}=e,{activeIndex:l,autoComplete:u,disabled:d,form:f,focusInput:p,queueFocusInput:m,getInputId:h,handleInputBlur:g,handleInputFocus:_,inputMode:v,inputAriaLabelledBy:y,invalid:b,length:x,mask:S,pattern:C,reportValueInvalid:w,readOnly:T,required:E,sanitizeValue:D,setValue:O,state:k,validationType:A,value:j}=yE(),{ref:M,index:N}=wn({indexGuessBehavior:Tn.GuessFromOrder}),P=t.useRef(null),F=j[N]??``,I=bE(k,F,N),R=r,ee=i??y,z=N===0?void 0:R;process.env.NODE_ENV!==`production`&&t.useEffect(()=>{N!==0||R==null||P.current?.labels?.length||L("<OTPField.Input> ignores `aria-label` on the first input. Use a `<label>` or `<Field.Label>` to label the OTP field.",Ht.captureOwnerStack?.()||``)},[N,R]);let B={id:h(N),value:F,type:S?`password`:`text`,inputMode:v,autoComplete:N===0?u:`off`,autoCorrect:`off`,spellCheck:`false`,enterKeyHint:N===x-1?`done`:`next`,maxLength:N===0?x:1,tabIndex:l===N?0:-1,disabled:d,form:f,pattern:C,readOnly:T,required:E,"aria-labelledby":z==null?ee:void 0,"aria-invalid":b||void 0,"aria-label":z,onMouseDown(e){e.defaultPrevented||d||(e.preventDefault(),p(N))},onFocus(e){e.defaultPrevented||d||_(N,e)},onBlur(e){e.defaultPrevented||g(e)},onChange(e){if(e.defaultPrevented||d||T)return;let t=e.currentTarget.value,n=OE(e.currentTarget.value,x,A,D);if(DE(t).length>n.length&&w(t,Lt(_t,e.nativeEvent)),n===``){t===``?O(AE(j,N),Y(vt,e.nativeEvent)):F!==``&&(e.currentTarget.value=F,e.currentTarget.select());return}let r=O(kE(j,N,n,x,A,D),Y(_t,e.nativeEvent));r!=null&&m(Math.min(N+n.length,x-1),r)},onKeyDown(e){if(e.defaultPrevented||d)return;if(e.key===`ArrowLeft`){hi(e),p(Math.max(0,N-1));return}if(e.key===`ArrowRight`){hi(e),p(Math.min(x-1,N+1));return}if(e.key===`Home`){hi(e),p(0);return}if(e.key===`End`){hi(e),p(Math.max(j.length-1,0));return}if(T)return;if(e.key===`Delete`){hi(e);let t=O(AE(j,N),Y(Et,e.nativeEvent));t!=null&&m(N,t);return}let t=e.currentTarget.value,n=e.currentTarget.selectionStart===0&&e.currentTarget.selectionEnd===t.length;if(e.key.length===1&&n&&F===e.key){hi(e),p(Math.min(x-1,N+1));return}if(e.key===`Backspace`){hi(e);let t=F===``?Math.max(0,N-1):N,n=Math.max(0,N-1),r=O(AE(j,t),Y(Et,e.nativeEvent));r!=null&&m(n,r)}},onPaste(e){if(e.defaultPrevented||d||T)return;let t=``;try{t=e.clipboardData?.getData(`text/plain`)??``}catch{process.env.NODE_ENV!==`production`&&L(`<OTPField.Input> could not read clipboard text during paste handling.`,Ht.captureOwnerStack?.()||``);return}e.preventDefault();let n=OE(t,x,A,D);if(DE(t).length>n.length&&w(t,Lt(bt,e.nativeEvent)),n===``)return;let r=O(kE(j,N,n,x,A,D),Y(bt,e.nativeEvent));r!=null&&m(Math.min(N+n.length,x-1),r)}};return q(`input`,e,{ref:[n,M,P],state:I,props:[B,c],stateAttributesMapping:wE})}),process.env.NODE_ENV!==`production`&&(LE.displayName=`OTPFieldInput`)})),zE=p((()=>{IE(),RE(),Q_()})),BE=p((()=>{zE()}));function VE(e){let n=t.useContext(HE);if(n===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?G(47):`Base UI: PopoverRootContext is missing. Popover parts must be placed within <Popover.Root>.`);return n}var HE,UE=p((()=>{K(),HE=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(HE.displayName=`PopoverRootContext`)}));function WE(){return{...Gf(),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}var GE,KE,qE=p((()=>{Mf(),Nc(),D(),$t(),It(),Yf(),Rl(),GE={...qf,disabled:Q(e=>e.disabled),instantType:Q(e=>e.instantType),openMethod:Q(e=>e.openMethod),openChangeReason:Q(e=>e.openChangeReason),modal:Q(e=>e.modal),focusManagerModal:Q(e=>e.focusManagerModal),stickIfOpen:Q(e=>e.stickIfOpen),titleElementId:Q(e=>e.titleElementId),descriptionElementId:Q(e=>e.descriptionElementId),openOnHover:Q(e=>e.openOnHover),closeDelay:Q(e=>e.closeDelay),hasViewport:Q(e=>e.hasViewport)},KE=class e extends Df{constructor(e){let n={...WE(),...e};n.open&&e?.mounted===void 0&&(n.mounted=!0),super(n,{popupRef:t.createRef(),backdropRef:t.createRef(),internalBackdropRef:t.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:t.createRef(),beforeContentFocusGuardRef:t.createRef(),stickIfOpenTimeout:new Mc,triggerElements:new Vf},GE)}setOpen=(e,t)=>{let n=t.reason===st,i=t.reason===`trigger-press`&&t.event.detail===0,a=!e&&(t.reason===`escape-key`||t.reason==null);if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let o=()=>{let n={open:e,openChangeReason:t.reason},r=t.trigger?.id??null;(r||e)&&(n.activeTriggerId=r,n.activeTriggerElement=t.trigger??null),this.update(n)};n?(this.set(`stickIfOpen`,!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set(`stickIfOpen`,!1)}),r.flushSync(o)):o(),i||a?this.set(`instantType`,i?`click`:`dismiss`):t.reason===`focus-out`?this.set(`instantType`,`focus`):this.set(`instantType`,void 0)};static useStore(t,n){let r=T(()=>new e(n)).current,i=t??r;return Zt(r.disposeEffect),i}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}}));function JE({props:e}){let{children:r,open:i,defaultOpen:a=!1,onOpenChange:o,onOpenChangeComplete:s,modal:c=!1,handle:l,triggerId:u,defaultTriggerId:d=null}=e,f=KE.useStore(l?.store,{modal:c,open:a,openProp:i,activeTriggerId:d,triggerIdProp:u});Oc(()=>{i===void 0&&f.state.open===!1&&a===!0&&f.update({open:!0,activeTriggerId:d})}),f.useControlledProp(`openProp`,i),f.useControlledProp(`triggerIdProp`,u);let p=f.useState(`open`),m=f.useState(`payload`);f.useContextCallback(`onOpenChange`,o),f.useContextCallback(`onOpenChangeComplete`,s);let{openMethod:h,triggerProps:g}=qp(p);Rf(f);let{forceUnmount:_}=zf(p,f,()=>{f.update({stickIfOpen:!0,openChangeReason:null})});t.useEffect(()=>{p||f.context.stickIfOpenTimeout.clear()},[f,p]);let v=t.useCallback(()=>{f.setOpen(!1,Y(Mt))},[f]);t.useImperativeHandle(e.actionsRef,()=>({unmount:_,close:v}),[_,v]);let y=ep({popupStore:f,onOpenChange:f.setOpen}),{getReferenceProps:b,getFloatingProps:x,getTriggerProps:S}=gp([xu(y,{outsidePressEvent:{mouse:c===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),Op(y)]),C=t.useMemo(()=>b(g),[b,g]),w=t.useMemo(()=>S(g),[S,g]),T=t.useMemo(()=>x(),[x]);f.useSyncedValues({modal:c,openMethod:h,activeTriggerProps:C,inactiveTriggerProps:w,popupProps:T,floatingRootContext:y,nested:eu()!=null});let E=t.useMemo(()=>({store:f}),[f]);return(0,n.jsx)(HE.Provider,{value:E,children:typeof r==`function`?r({payload:m}):r})}function YE(e){return VE(!0)?(0,n.jsx)(JE,{props:e}):(0,n.jsx)(Zl,{children:(0,n.jsx)(JE,{props:e})})}var XE=p((()=>{kc(),Hp(),UE(),qE(),Rt(),It(),Yf(),Jp()})),ZE=p((()=>{})),QE,$E=p((()=>{K(),UE(),kr(),ym(),J(),Rl(),Hp(),ZE(),Xt(),ul(),It(),Yf(),ix(),QE=t.forwardRef(function(e,r){let{render:i,className:a,disabled:o=!1,nativeButton:s=!0,handle:c,payload:l,openOnHover:u=!1,delay:d=300,closeDelay:f=0,id:p,style:m,...h}=e,g=VE(!0),_=c?.store??g?.store;if(!_)throw Error(process.env.NODE_ENV===`production`?G(74):`Base UI: <Popover.Trigger> must be either used within a <Popover.Root> component or provided with a handle.`);let v=Yt(p),y=_.useState(`isTriggerActive`,v),b=_.useState(`floatingRootContext`),x=_.useState(`isOpenedByTrigger`,v),S=t.useRef(null),{registerTrigger:C,isMountedByThisTrigger:w}=Lf(v,S,_,{payload:l,disabled:o,openOnHover:u,closeDelay:f}),T=_.useState(`openChangeReason`),E=_.useState(`stickIfOpen`),D=_.useState(`openMethod`),O=_.useState(`focusManagerModal`),k=pp(b,{enabled:b!=null&&u&&(D!==`touch`||T!==`trigger-press`),mouseOnly:!0,move:!1,handleClose:Lp(),restMs:d,delay:{close:f},triggerElementRef:S,isActiveTrigger:y,isClosing:()=>_.select(`transitionStatus`)===`ending`}),A=gp([pu(b,{enabled:b!=null,stickIfOpen:E})]),j=_.useState(`triggerProps`,w),M={disabled:o,open:x},{getButtonProps:N,buttonRef:P}=Er({disabled:o,native:s}),F=t.useMemo(()=>({open(e){return e&&T===`trigger-press`?_m.open(e):gm.open(e)}}),[T]),I=q(`button`,e,{state:M,ref:[P,r,C,S],props:[A.getReferenceProps(),k,j,{[Al]:``,id:v},h,N],stateAttributesMapping:F}),{preFocusGuardRef:L,handlePreFocusGuardFocus:R,handleFocusTargetFocus:ee}=rx(_,S);return y&&!O?(0,n.jsxs)(t.Fragment,{children:[(0,n.jsx)(ll,{ref:L,onFocus:R}),(0,n.jsx)(t.Fragment,{children:I},v),(0,n.jsx)(ll,{ref:_.context.triggerFocusTargetRef,onFocus:ee})]}):(0,n.jsx)(t.Fragment,{children:I},v)}),process.env.NODE_ENV!==`production`&&(QE.displayName=`PopoverTrigger`)}));function eD(){let e=t.useContext(tD);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(45):`Base UI: <Popover.Portal> is missing.`);return e}var tD,nD=p((()=>{K(),tD=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(tD.displayName=`PopoverPortalContext`)})),rD,iD=p((()=>{Hp(),UE(),nD(),rD=t.forwardRef(function(e,t){let{keepMounted:r=!1,...i}=e,{store:a}=VE();return a.useState(`mounted`)||r?(0,n.jsx)(tD.Provider,{value:r,children:(0,n.jsx)(Ul,{ref:t,...i})}):null}),process.env.NODE_ENV!==`production`&&(rD.displayName=`PopoverPortal`)}));function aD(){let e=t.useContext(oD);if(!e)throw Error(process.env.NODE_ENV===`production`?G(46):`Base UI: PopoverPositionerContext is missing. PopoverPositioner parts must be placed within <Popover.Positioner>.`);return e}var oD,sD=p((()=>{K(),oD=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(oD.displayName=`PopoverPositionerContext`)})),cD,lD=p((()=>{Rm(),I(),Hp(),UE(),sD(),__(),nD(),Bm(),It(),Rl(),gn(),f_(),x_(),w_(),cD=t.forwardRef(function(e,r){let{render:i,className:a,anchor:o,positionMethod:s=`absolute`,side:c=`bottom`,align:l=`center`,sideOffset:u=0,alignOffset:d=0,collisionBoundary:f=`clipping-ancestors`,collisionPadding:p=5,arrowPadding:m=5,sticky:h=!1,disableAnchorTracking:g=!1,collisionAvoidance:_=Il,style:v,...y}=e,{store:b}=VE(),x=eD(),S=Yl(),C=b.useState(`floatingRootContext`),w=b.useState(`mounted`),T=b.useState(`open`),E=b.useState(`openChangeReason`),D=b.useState(`activeTriggerElement`),O=b.useState(`modal`),k=b.useState(`openMethod`),A=b.useState(`positionerElement`),j=b.useState(`instantType`),M=b.useState(`transitionStatus`),N=b.useState(`hasViewport`),P=t.useRef(null),I=hn(A,!1,!1),L=h_({anchor:o,floatingRootContext:C,positionMethod:s,mounted:w,side:c,sideOffset:u,align:l,alignOffset:d,arrowPadding:m,collisionBoundary:f,collisionPadding:p,sticky:h,disableAnchorTracking:g,keepMounted:x,nodeId:S,collisionAvoidance:_,adaptiveOrigin:N?d_:void 0}),R=C.useState(`domReferenceElement`);F(()=>{let e=R,t=P.current;if(e&&(P.current=e),t&&e&&e!==t){b.set(`instantType`,void 0);let e=new AbortController;return I(()=>{b.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[R,I,b]);let ee={open:T,side:L.side,align:L.align,anchorHidden:L.anchorHidden,instant:j};S_(T&&O===!0&&E!==`trigger-hover`,k===`touch`,A,D);let z=t.useCallback(e=>{b.set(`positionerElement`,e)},[b]),B=b_(e,ee,{styles:L.positionerStyles,transitionStatus:M,props:y,refs:[r,z],hidden:!w,inert:!T});return(0,n.jsxs)(oD.Provider,{value:L,children:[w&&O===!0&&E!==`trigger-hover`&&(0,n.jsx)(zm,{ref:b.context.internalBackdropRef,inert:Lm(!T),cutout:D}),(0,n.jsx)(Xl,{id:S,children:B})]})}),process.env.NODE_ENV!==`production`&&(cD.displayName=`PopoverPositioner`)}));function uD(){let[e,n]=t.useState(0),r=O(()=>(n(e=>e+1),()=>{n(e=>Math.max(0,e-1))}));return{context:t.useMemo(()=>({register:r}),[r]),hasClosePart:e>0}}function dD(e){let{value:t,children:r}=e;return(0,n.jsx)(fD.Provider,{value:t,children:r})}var fD,pD=p((()=>{N(),fD=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(fD.displayName=`ClosePartContext`)})),mD,hD,gD=p((()=>{br(),Hp(),UE(),sD(),ym(),mn(),yo(),J(),It(),co(),mb(),y_(),pD(),mD={...vm,...pn},hD=t.forwardRef(function(e,r){let{className:i,render:a,initialFocus:o,finalFocus:s,style:c,...l}=e,{store:u}=VE(),d=aD(),f=fb(!0)!=null,{context:p,hasClosePart:m}=uD(),h=u.useState(`open`),g=u.useState(`openMethod`),_=u.useState(`instantType`),v=u.useState(`transitionStatus`),y=u.useState(`popupProps`),b=u.useState(`titleElementId`),x=u.useState(`descriptionElementId`),S=u.useState(`modal`),C=u.useState(`mounted`),w=u.useState(`openChangeReason`),T=u.useState(`activeTriggerElement`),E=u.useState(`floatingRootContext`);vo({open:h,ref:u.context.popupRef,onComplete(){h&&u.context.onOpenChangeComplete?.(!0)}});let D=u.useState(`disabled`),O=u.useState(`openOnHover`),k=u.useState(`closeDelay`);dp(E,{enabled:O&&!D,closeDelay:k});function A(e){return e===`touch`?u.context.popupRef.current:!0}let j=o===void 0?A:o,M={open:h,side:d.side,align:d.align,instant:_,transitionStatus:v},N=S!==!1&&m;u.useSyncedValue(`focusManagerModal`,N);let P=t.useCallback(e=>{u.set(`popupElement`,e)},[u]),F=q(`div`,e,{state:M,ref:[r,u.context.popupRef,P],props:[y,{"aria-labelledby":b,"aria-describedby":x,onKeyDown(e){f&&ro.has(e.key)&&e.stopPropagation()}},v_(v),l],stateAttributesMapping:mD});return(0,n.jsx)(lu,{context:E,openInteractionType:g,modal:N,disabled:!C||w===`trigger-hover`,initialFocus:j,returnFocus:s,restoreFocus:`popup`,previousFocusableElement:tr(T)?T:void 0,nextFocusableElement:u.context.triggerFocusTargetRef,beforeContentFocusGuardRef:u.context.beforeContentFocusGuardRef,children:(0,n.jsx)(dD,{value:p,children:F})})}),process.env.NODE_ENV!==`production`&&(hD.displayName=`PopoverPopup`)})),_D,vD=p((()=>{sD(),UE(),ym(),J(),_D=t.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,{store:o}=VE(),s=o.useState(`open`),{arrowRef:c,side:l,align:u,arrowUncentered:d,arrowStyles:f}=aD();return q(`div`,e,{state:{open:s,side:l,align:u,uncentered:d},ref:[t,c],props:[{style:f,"aria-hidden":!0},a],stateAttributesMapping:vm})}),process.env.NODE_ENV!==`production`&&(_D.displayName=`PopoverArrow`)})),yD,bD=p((()=>{I(),UE(),J(),Xt(),yD=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o}=VE(),s=Yt(a.id);return F(()=>(o.set(`titleElementId`,s),()=>{o.set(`titleElementId`,void 0)}),[o,s]),q(`h2`,e,{ref:t,props:[{id:s},a]})}),process.env.NODE_ENV!==`production`&&(yD.displayName=`PopoverTitle`)})),xD,SD=p((()=>{I(),UE(),Xt(),J(),xD=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o}=VE(),s=Yt(a.id);return F(()=>(o.set(`descriptionElementId`,s),()=>{o.set(`descriptionElementId`,void 0)}),[o,s]),q(`p`,e,{ref:t,props:[{id:s},a]})}),process.env.NODE_ENV!==`production`&&(xD.displayName=`PopoverDescription`)})),CD,wD=p((()=>{CD=function(e){return e.popupWidth=`--popup-width`,e.popupHeight=`--popup-height`,e}({})})),TD,ED,DD=p((()=>{UE(),sD(),J(),wD(),Ax(),TD={activationDirection:e=>e?{"data-activation-direction":e}:null},ED=t.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,{store:s}=VE(),{side:c}=aD(),l=s.useState(`instantType`),{children:u,state:d}=Tx({store:s,side:c,cssVars:CD,children:a});return q(`div`,e,{state:{activationDirection:d.activationDirection,transitioning:d.transitioning,instant:l},ref:t,props:[o,{children:u}],stateAttributesMapping:TD})}),process.env.NODE_ENV!==`production`&&(ED.displayName=`PopoverViewport`)}));function OD(){return new kD}var kD,AD=p((()=>{K(),Rt(),It(),qE(),kD=class{constructor(){this.store=new KE}open(e){let t=e?this.store.context.triggerElements.getById(e)??void 0:void 0;if(e&&!t)throw Error(process.env.NODE_ENV===`production`?G(80,e):`Base UI: PopoverHandle.open: No trigger found with id "${e}".`);this.store.setOpen(!0,Y(Mt,void 0,t))}close(){this.store.setOpen(!1,Y(Mt,void 0,void 0))}get isOpen(){return this.store.state.open}}})),jD=p((()=>{XE(),$E(),iD(),lD(),gD(),vD(),UE(),ym(),mn(),J(),It(),bD(),SD(),Ar(),Rt(),pD(),DD(),AD()})),MD=p((()=>{jD()})),ND,PD=p((()=>{Hp(),ND=t.forwardRef(function(e,i){let{children:a,container:o,className:s,render:c,style:l,...u}=e,{portalNode:d,portalSubtree:f}=zl({container:o,ref:i,componentProps:e,elementProps:u});return!f&&!d?null:(0,n.jsxs)(t.Fragment,{children:[f,d&&r.createPortal(a,d)]})}),process.env.NODE_ENV!==`production`&&(ND.displayName=`FloatingPortalLite`)})),FD=p((()=>{I(),kc(),Hp(),K(),Rt(),It(),Mf(),D(),Yf(),PD(),ym(),J(),Xt(),__(),Rl(),f_(),x_(),N(),mn(),yo(),y_(),Ax()})),ID=p((()=>{il(),cl(),Sw(),J(),K(),Ow(),my()})),LD,RD=p((()=>{LD=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}({})})),zD,BD=p((()=>{mn(),Nh(),RD(),zD={checked(e){return e?{[LD.checked]:``}:{[LD.unchecked]:``}},...pn,...Mh}}));function VD(){return t.useContext(HD)}var HD,UD=p((()=>{HD=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(HD.displayName=`RadioGroupContext`)}));function WD(){let e=t.useContext(GD);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(52):`Base UI: RadioRootContext is missing. Radio parts must be placed within <Radio.Root>.`);return e}var GD,KD=p((()=>{K(),GD=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(GD.displayName=`RadioRootContext`)})),qD,JD=p((()=>{ge(),I(),N(),cl(),De(),Rt(),It(),Eh(),BD(),Xt(),J(),Ar(),ow(),ex(),Ih(),Ev(),Wh(),Av(),Kh(),UD(),gh(),KD(),qD=t.forwardRef(function(e,r){let{render:i,className:a,disabled:o=!1,readOnly:s=!1,required:c=!1,"aria-labelledby":l,value:u,inputRef:d,nativeButton:f=!1,id:p,style:m,...h}=e,g=VD(),{disabled:_,readOnly:v,required:y,form:b,checkedValue:x,touched:S=!1,validation:C,name:w}=g??{},T=g?.setCheckedValue??we,E=g?.setTouched??we,D=g?.registerControlRef??we,k=g?.registerInputRef??we,{setDirty:A,validityData:j,setTouched:M,setFilled:N,state:P,disabled:I}=Ph(),L=wv(),{labelId:R,getDescriptionProps:ee}=Hh(),z=I||L.disabled||_||o,B=v||s,V=y||c,te=b,ne=g?x===u:u===``,H=t.useMemo(()=>hh(u),[u]),re=t.useRef(null),U=t.useRef(null),W=O(e=>{e&&D(e,z)}),ie=ue(d,U,k);F(()=>{U.current?.checked&&N(!0)},[N]),F(()=>{if(U.current){if(z&&ne){k(null);return}re.current&&D(re.current,z),k(U.current)}},[ne,z,D,k]);let ae=Yt(),oe=Gh({id:p,implicit:!1,controlRef:re}),G=f?void 0:oe,K=Dv(l,R,U,!f,G),se={role:`radio`,"aria-checked":ne,"aria-required":V||void 0,"aria-readonly":B||void 0,"aria-labelledby":K,[aw]:ne?``:void 0,id:f?oe:ae,onKeyDown(e){e.key===`Enter`&&e.preventDefault()},onClick(e){e.defaultPrevented||z||B||(e.preventDefault(),U.current?.dispatchEvent(new PointerEvent(`click`,{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey})))},onFocus(e){e.defaultPrevented||z||B||!S||(U.current?.click(),E(!1))}},{getButtonProps:ce,buttonRef:le}=Er({disabled:z,native:f}),de={type:`radio`,ref:ie,form:te,id:G,name:w,tabIndex:-1,style:w?sl:ol,"aria-hidden":!0,...u===void 0?Ee:{value:H},disabled:z,checked:ne,required:V,readOnly:B,onChange(e){if(e.nativeEvent.defaultPrevented||z||B||u===void 0)return;let t=Y(at,e.nativeEvent);t.isCanceled||(M(!0),A(u!==j.initialValue),N(!0),T(u,t))},onFocus(){re.current?.focus()}},fe=t.useMemo(()=>({...P,required:V,disabled:z,readOnly:B,checked:ne}),[P,z,B,ne,V]),pe=fe,me=g!==void 0,he=[r,re,le,W],ge=[se,ee,C?.getValidationProps??Ee,h,ce],_e=q(`span`,e,{enabled:!me,state:fe,ref:he,props:ge,stateAttributesMapping:zD});return(0,n.jsxs)(GD.Provider,{value:pe,children:[me?(0,n.jsx)($b,{tag:`span`,render:i,className:a,style:m,state:fe,refs:he,props:ge,stateAttributesMapping:zD}):_e,(0,n.jsx)(`input`,{...de,suppressHydrationWarning:!0})]})}),process.env.NODE_ENV!==`production`&&(qD.displayName=`RadioRoot`)})),YD,XD=p((()=>{J(),KD(),BD(),yo(),vn(),YD=t.forwardRef(function(e,n){let{render:r,className:i,style:a,keepMounted:o=!1,...s}=e,c=WD(),l=c.checked,{mounted:u,transitionStatus:d,setMounted:f}=_n(l),p={...c,transitionStatus:d},m=t.useRef(null),h=o||u,g=q(`span`,e,{ref:[n,m],state:p,props:s,stateAttributesMapping:zD});return vo({open:l,ref:m,onComplete(){l||f(!1)}}),h?g:null}),process.env.NODE_ENV!==`production`&&(YD.displayName=`RadioIndicator`)})),ZD=p((()=>{JD(),XD()})),QD=p((()=>{ZD()})),$D,eO,tO=p((()=>{w(),N(),Xt(),Ra(),co(),fw(),Ih(),Rh(),Nh(),YC(),Vh(),Wh(),Kp(),UD(),$D=[io],eO=t.forwardRef(function(e,r){let{render:i,className:a,disabled:o,readOnly:s,required:c,onValueChange:l,value:u,defaultValue:d,form:f,name:p,inputRef:m,id:h,style:g,..._}=e,{setTouched:v,setFocused:y,shouldValidateOnChange:b,validationMode:x,name:C,disabled:w,state:T,validation:E,setDirty:D,setFilled:k,validityData:A}=Ph(),{labelId:j}=Hh(),{clearErrors:M}=zh(),N=qC(!0),P=w||o,F=C??p,I=Yt(h),[L,R]=S({controlled:u,default:d,name:`RadioGroup`,state:`value`}),ee=O(l),z=O((e,t)=>{ee(e,t),!t.isCanceled&&R(e)}),B=t.useRef(null),V=t.useRef(null),te=t.useRef(null);function ne(e){let t;return m&&(typeof m==`function`?t=m(e):m.current=e),V.current=e,E.inputRef.current=e,t}let H=O((e,t=!1)=>{if(e){if(t){B.current===e&&(B.current=null);return}B.current??=e}}),re=O(e=>{if(!e||e.disabled)return;te.current||=e;let t=V.current;if(e.checked||t==null||t.disabled)return ne(e)});Lh(B,{id:I,value:L,getValue:O(()=>L??null)}),Gp(L,()=>{M(F),D(L!==A.initialValue),k(L!=null),b()?E.commit(L):E.commit(L,!0);let e=te.current;L==null&&e&&!e.disabled&&ne(e)});let[U,W]=t.useState(!1),ie=_[`aria-labelledby`]??j??N?.legendId,ae={...T,disabled:P??!1,required:c??!1,readOnly:s??!1},oe=t.useMemo(()=>({...T,checkedValue:L,disabled:P,form:f,validation:E,name:F,onValueChange:ee,readOnly:s,registerControlRef:H,registerInputRef:re,required:c,setCheckedValue:z,setTouched:W,touched:U}),[L,P,f,E,T,F,ee,s,H,re,c,z,W,U]),G={role:`radiogroup`,"aria-required":c||void 0,"aria-disabled":P||void 0,"aria-readonly":s||void 0,"aria-labelledby":ie,onFocus(){y(!0)},onBlur(e){ei(e.currentTarget,e.relatedTarget)||(v(!0),y(!1),x===`onBlur`&&E.commit(L))},onKeyDownCapture(e){e.key.startsWith(`Arrow`)&&(v(!0),W(!0),y(!0))}};return(0,n.jsx)(HD.Provider,{value:oe,children:(0,n.jsx)(dw,{render:i,className:a,style:g,state:ae,props:[G,E.getValidationProps,_],refs:[r],stateAttributesMapping:Mh,enableHomeAndEndKeys:!1,modifierKeys:$D})})}),process.env.NODE_ENV!==`production`&&(eO.displayName=`RadioGroup`)})),nO=p((()=>{tO()}));function rO(){let e=t.useContext(iO);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(53):`Base UI: ScrollAreaRootContext is missing. ScrollArea parts must be placed within <ScrollArea.Root>.`);return e}var iO,aO=p((()=>{K(),iO=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(iO.displayName=`ScrollAreaRootContext`)})),oO,sO=p((()=>{oO=function(e){return e.scrollAreaCornerHeight=`--scroll-area-corner-height`,e.scrollAreaCornerWidth=`--scroll-area-corner-width`,e}({})})),cO=p((()=>{}));function lO(e,t,n){if(!e)return 0;let r=getComputedStyle(e),i=n===`x`?`Inline`:`Block`;return n===`x`&&t===`margin`?parseFloat(r[`${t}InlineStart`])*2:parseFloat(r[`${t}${i}Start`])+parseFloat(r[`${t}${i}End`])}var uO=p((()=>{})),dO,fO=p((()=>{dO=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}({})})),pO,mO,hO=p((()=>{pO=`base-ui-disable-scrollbar`,mO={className:pO,getElement(e){return(0,n.jsx)(`style`,{nonce:e,href:pO,precedence:`base-ui:low`,children:`.${pO}{scrollbar-width:none}.${pO}::-webkit-scrollbar{display:none}`})}},process.env.NODE_ENV!==`production`&&(mO.getElement.displayName=`styleDisableScrollbar.getElement`)})),gO,_O=p((()=>{gO=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}({})})),vO,yO=p((()=>{_O(),vO={hasOverflowX:e=>e?{[gO.hasOverflowX]:``}:null,hasOverflowY:e=>e?{[gO.hasOverflowY]:``}:null,overflowXStart:e=>e?{[gO.overflowXStart]:``}:null,overflowXEnd:e=>e?{[gO.overflowXEnd]:``}:null,overflowYStart:e=>e?{[gO.overflowYStart]:``}:null,overflowYEnd:e=>e?{[gO.overflowYEnd]:``}:null,cornerHidden:()=>null}}));function bO(e){if(typeof e==`number`){let t=Math.max(0,e);return{xStart:t,xEnd:t,yStart:t,yEnd:t}}return{xStart:Math.max(0,e?.xStart||0),xEnd:Math.max(0,e?.xEnd||0),yStart:Math.max(0,e?.yStart||0),yEnd:Math.max(0,e?.yEnd||0)}}var xO,SO,CO,wO,TO,EO=p((()=>{N(),Nc(),aO(),J(),sO(),cO(),uO(),fO(),hO(),Xt(),yO(),Ra(),zx(),xO={x:0,y:0},SO={width:0,height:0},CO={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},wO={x:!0,y:!0,corner:!0},TO=t.forwardRef(function(e,r){let{render:i,className:a,overflowEdgeThreshold:o,style:s,...c}=e,l=bO(o),u=Yt(),d=Ac(),f=Ac(),{nonce:p,disableStyleElements:m}=Ix(),[h,g]=t.useState(!1),[_,v]=t.useState(!1),[y,b]=t.useState(!1),[x,S]=t.useState(!1),[C,w]=t.useState(!1),[T,E]=t.useState(SO),[D,k]=t.useState(SO),[A,j]=t.useState(CO),[M,N]=t.useState(wO),P=t.useRef(null),F=t.useRef(null),I=t.useRef(null),L=t.useRef(null),R=t.useRef(null),ee=t.useRef(null),z=t.useRef(null),B=t.useRef(!1),V=t.useRef(0),te=t.useRef(0),ne=t.useRef(0),H=t.useRef(0),re=t.useRef(`vertical`),U=t.useRef(xO),W=O(e=>{let t=e.x-U.current.x,n=e.y-U.current.y;U.current=e,n!==0&&(b(!0),d.start(500,()=>{b(!1)})),t!==0&&(v(!0),f.start(500,()=>{v(!1)}))}),ie=O(e=>{e.button===0&&(B.current=!0,V.current=e.clientY,te.current=e.clientX,re.current=e.currentTarget.getAttribute(dO.orientation),F.current&&(ne.current=F.current.scrollTop,H.current=F.current.scrollLeft),R.current&&re.current===`vertical`&&R.current.setPointerCapture(e.pointerId),ee.current&&re.current===`horizontal`&&ee.current.setPointerCapture(e.pointerId))}),ae=O(e=>{if(!B.current)return;let t=e.clientY-V.current,n=e.clientX-te.current;if(F.current){let r=F.current.scrollHeight,i=F.current.clientHeight,a=F.current.scrollWidth,o=F.current.clientWidth;if(R.current&&I.current&&re.current===`vertical`){let n=lO(I.current,`padding`,`y`),a=lO(R.current,`margin`,`y`),o=R.current.offsetHeight,s=t/(I.current.offsetHeight-o-n-a);F.current.scrollTop=ne.current+s*(r-i),e.preventDefault(),b(!0),d.start(500,()=>{b(!1)})}if(ee.current&&L.current&&re.current===`horizontal`){let t=lO(L.current,`padding`,`x`),r=lO(ee.current,`margin`,`x`),i=ee.current.offsetWidth,s=n/(L.current.offsetWidth-i-t-r);F.current.scrollLeft=H.current+s*(a-o),e.preventDefault(),v(!0),f.start(500,()=>{v(!1)})}}}),oe=O(e=>{B.current=!1,R.current&&re.current===`vertical`&&R.current.releasePointerCapture(e.pointerId),ee.current&&re.current===`horizontal`&&ee.current.releasePointerCapture(e.pointerId)});function G(e){S(e.pointerType===`touch`)}function K(e){G(e),e.pointerType!==`touch`&&g(ei(P.current,e.target))}let se=t.useMemo(()=>({scrolling:_||y,hasOverflowX:!M.x,hasOverflowY:!M.y,overflowXStart:A.xStart,overflowXEnd:A.xEnd,overflowYStart:A.yStart,overflowYEnd:A.yEnd,cornerHidden:M.corner}),[_,y,M.x,M.y,M.corner,A]),ce={role:`presentation`,onPointerEnter:K,onPointerMove:K,onPointerDown:G,onPointerLeave(){g(!1)},style:{position:`relative`,[oO.scrollAreaCornerHeight]:`${T.height}px`,[oO.scrollAreaCornerWidth]:`${T.width}px`}},le=q(`div`,e,{state:se,ref:[r,P],props:[ce,c],stateAttributesMapping:vO}),ue=t.useMemo(()=>({handlePointerDown:ie,handlePointerMove:ae,handlePointerUp:oe,handleScroll:W,cornerSize:T,setCornerSize:E,thumbSize:D,setThumbSize:k,hasMeasuredScrollbar:C,setHasMeasuredScrollbar:w,touchModality:x,cornerRef:z,scrollingX:_,setScrollingX:v,scrollingY:y,setScrollingY:b,hovering:h,setHovering:g,viewportRef:F,rootRef:P,scrollbarYRef:I,scrollbarXRef:L,thumbYRef:R,thumbXRef:ee,rootId:u,hiddenState:M,setHiddenState:N,overflowEdges:A,setOverflowEdges:j,viewportState:se,overflowEdgeThreshold:l}),[ie,ae,oe,W,T,D,C,x,_,v,y,b,h,g,u,M,A,se,l]);return(0,n.jsxs)(iO.Provider,{value:ue,children:[!m&&mO.getElement(p),le]})}),process.env.NODE_ENV!==`production`&&(TO.displayName=`ScrollAreaRoot`)})),DO,OO=p((()=>{DO=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(DO.displayName=`ScrollAreaViewportContext`)})),kO,AO=p((()=>{kO=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}({})}));function jO(e,t){return Math.max(0,e-t)}function MO(e,t){if(t<=0)return 0;let n=vS(e,0,t),r=n,i=t-n,a=r<=1,o=i<=1;return a&&o?r<=i?0:t:a?0:o?t:n}var NO=p((()=>{yS()}));function PO(){LO||Rr||(typeof CSS<`u`&&`registerProperty`in CSS&&[kO.scrollAreaOverflowXStart,kO.scrollAreaOverflowXEnd,kO.scrollAreaOverflowYStart,kO.scrollAreaOverflowYEnd].forEach(e=>{try{CSS.registerProperty({name:e,syntax:`<length>`,inherits:!1,initialValue:`0px`})}catch{}}),LO=!0)}function FO(e){let t=e.clientHeight>=e.scrollHeight,n=e.clientWidth>=e.scrollWidth;return{y:t,x:n,corner:t||n}}function IO(e,t){return e.y===t.y&&e.x===t.x&&e.corner===t.corner?e:t}var LO,RO,zO=p((()=>{N(),I(),Gr(),Nc(),aO(),OO(),J(),ae(),uO(),cO(),yS(),hO(),yO(),AO(),NO(),LO=!1,RO=t.forwardRef(function(e,r){let{render:i,className:a,style:o,...s}=e,{viewportRef:c,scrollbarYRef:l,scrollbarXRef:u,thumbYRef:d,thumbXRef:f,cornerRef:p,cornerSize:m,setCornerSize:h,setThumbSize:g,rootId:_,setHiddenState:v,hiddenState:y,setHasMeasuredScrollbar:b,handleScroll:x,setHovering:S,setOverflowEdges:C,overflowEdges:w,overflowEdgeThreshold:T,scrollingX:E,scrollingY:D}=rO(),k=W(),A=t.useRef(!0),j=t.useRef([NaN,NaN,NaN,NaN]),M=Ac(),N=Ac(),P=O(()=>{let e=c.current,t=l.current,n=u.current,r=d.current,i=f.current,a=p.current;if(!e)return;let o=e.scrollHeight,s=e.scrollWidth,_=e.clientHeight,y=e.clientWidth,x=e.scrollTop,S=e.scrollLeft,w=j.current,E=Number.isNaN(w[0]);if(w[0]=_,w[1]=o,w[2]=y,w[3]=s,E&&b(!0),o===0||s===0)return;let D=FO(e),O=D.y,A=D.x,M=y/s,N=_/o,P=Math.max(0,s-y),F=Math.max(0,o-_),I=0,L=0;if(!A){let e=0;e=vS(k===`rtl`?-S:S,0,P),I=MO(e,P),L=P-I}let R=O?0:vS(x,0,F),ee=O?0:MO(R,F),z=O?0:F-ee,B=A?0:y,V=O?0:_,te=0,ne=0;!A&&!O&&(te=t?.offsetWidth||0,ne=n?.offsetHeight||0);let H=m.width===0&&m.height===0,re=H?te:0,U=H?ne:0,W=lO(n,`padding`,`x`),ie=lO(t,`padding`,`y`),ae=lO(i,`margin`,`x`),oe=lO(r,`margin`,`y`),G=B-W-ae,K=V-ie-oe,se=n?Math.min(n.offsetWidth-re,G):G,ce=t?Math.min(t.offsetHeight-U,K):K,le=Math.max(16,se*M),ue=Math.max(16,ce*N);if(g(e=>e.height===ue&&e.width===le?e:{width:le,height:ue}),t&&r){let e=t.offsetHeight-ue-ie-oe,n=o-_,i=n===0?0:x/n,a=Math.min(e,Math.max(0,i*e));r.style.transform=`translate3d(0,${a}px,0)`}if(n&&i){let e=n.offsetWidth-le-W-ae,t=s-y,r=t===0?0:S/t,a=k===`rtl`?vS(r*e,-e,0):vS(r*e,0,e);i.style.transform=`translate3d(${a}px,0,0)`}let de=[[kO.scrollAreaOverflowXStart,I],[kO.scrollAreaOverflowXEnd,L],[kO.scrollAreaOverflowYStart,ee],[kO.scrollAreaOverflowYEnd,z]];for(let[t,n]of de)e.style.setProperty(t,`${n}px`);a&&(A||O?h({width:0,height:0}):!A&&!O&&h({width:te,height:ne})),v(e=>IO(e,D));let fe={xStart:!A&&I>T.xStart,xEnd:!A&&L>T.xEnd,yStart:!O&&ee>T.yStart,yEnd:!O&&z>T.yEnd};C(e=>e.xStart===fe.xStart&&e.xEnd===fe.xEnd&&e.yStart===fe.yStart&&e.yEnd===fe.yEnd?e:fe)});F(()=>{c.current&&PO()},[c]),F(()=>{queueMicrotask(P)},[P,y,k]),F(()=>{c.current?.matches(`:hover`)&&S(!0)},[c,S]),t.useEffect(()=>{let e=c.current;if(typeof ResizeObserver>`u`||!e)return;let t=!1,n=new ResizeObserver(()=>{if(!t){t=!0;let n=j.current;if(n[0]===e.clientHeight&&n[1]===e.scrollHeight&&n[2]===e.clientWidth&&n[3]===e.scrollWidth)return}P()});return n.observe(e),N.start(0,()=>{let t=e.getAnimations({subtree:!0});t.length!==0&&Promise.allSettled(t.map(e=>e.finished)).then(P).catch(()=>{})}),()=>{n.disconnect(),N.clear()}},[P,c,N]);function I(){A.current=!1}let L={role:`presentation`,..._&&{"data-id":`${_}-viewport`},tabIndex:y.x&&y.y?-1:0,className:mO.className,style:{overflow:`scroll`},onScroll(){c.current&&(P(),A.current||x({x:c.current.scrollLeft,y:c.current.scrollTop}),M.start(100,()=>{A.current=!0}))},onWheel:I,onTouchMove:I,onPointerMove:I,onPointerEnter:I,onKeyDown:I},R=t.useMemo(()=>({scrolling:E||D,hasOverflowX:!y.x,hasOverflowY:!y.y,overflowXStart:w.xStart,overflowXEnd:w.xEnd,overflowYStart:w.yStart,overflowYEnd:w.yEnd,cornerHidden:y.corner}),[E,D,y.x,y.y,y.corner,w]),ee=q(`div`,e,{ref:[r,c],state:R,props:[L,s],stateAttributesMapping:vO}),z=t.useMemo(()=>({computeThumbPosition:P}),[P]);return(0,n.jsx)(DO.Provider,{value:z,children:ee})}),process.env.NODE_ENV!==`production`&&(RO.displayName=`ScrollAreaViewport`)}));function BO(){let e=t.useContext(VO);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(54):`Base UI: ScrollAreaScrollbarContext is missing. ScrollAreaScrollbar parts must be placed within <ScrollArea.Scrollbar>.`);return e}var VO,HO=p((()=>{K(),VO=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(VO.displayName=`ScrollAreaScrollbarContext`)})),UO,WO=p((()=>{UO=function(e){return e.scrollAreaThumbHeight=`--scroll-area-thumb-height`,e.scrollAreaThumbWidth=`--scroll-area-thumb-width`,e}({})})),GO,KO=p((()=>{uo(),Ra(),aO(),HO(),J(),uO(),sO(),WO(),ae(),yO(),GO=t.forwardRef(function(e,r){let{render:i,className:a,orientation:o=`vertical`,keepMounted:s=!1,style:c,...l}=e,{hovering:u,scrollingX:d,scrollingY:f,hiddenState:p,overflowEdges:m,scrollbarYRef:h,scrollbarXRef:g,viewportRef:_,thumbYRef:v,thumbXRef:y,handlePointerDown:b,handlePointerUp:x,rootId:S,thumbSize:C,hasMeasuredScrollbar:w}=rO(),T={hovering:u,scrolling:{horizontal:d,vertical:f}[o],orientation:o,hasOverflowX:!p.x,hasOverflowY:!p.y,overflowXStart:m.xStart,overflowXEnd:m.xEnd,overflowYStart:m.yStart,overflowYEnd:m.yEnd,cornerHidden:p.corner},E=W(),D=!w&&!s;t.useEffect(()=>{let e=_.current,t=o===`vertical`?h.current:g.current;if(!t)return;function n(n){if(!(!e||!t||n.ctrlKey)){if(n.preventDefault(),o===`vertical`){if(e.scrollTop===0&&n.deltaY<0)return}else if(e.scrollLeft===0&&n.deltaX<0)return;if(o===`vertical`){if(e.scrollTop===e.scrollHeight-e.clientHeight&&n.deltaY>0)return}else if(e.scrollLeft===e.scrollWidth-e.clientWidth&&n.deltaX>0)return;o===`vertical`?e.scrollTop+=n.deltaY:e.scrollLeft+=n.deltaX}}return lo(t,`wheel`,n,{passive:!1})},[o,g,h,_]);let O={...S&&{"data-id":`${S}-scrollbar`},onPointerDown(e){if(e.button!==0)return;let t=ti(e.nativeEvent),n=o===`vertical`?v.current:y.current;if(!(n&&ei(n,t))&&_.current){if(v.current&&h.current&&o===`vertical`){let t=lO(v.current,`margin`,`y`),n=lO(h.current,`padding`,`y`),r=v.current.offsetHeight,i=h.current.getBoundingClientRect(),a=e.clientY-i.top-r/2-n+t/2,o=_.current.scrollHeight,s=_.current.clientHeight,c=a/(h.current.offsetHeight-r-n-t)*(o-s);_.current.scrollTop=c}if(y.current&&g.current&&o===`horizontal`){let t=lO(y.current,`margin`,`x`),n=lO(g.current,`padding`,`x`),r=y.current.offsetWidth,i=g.current.getBoundingClientRect(),a=e.clientX-i.left-r/2-n+t/2,o=_.current.scrollWidth,s=_.current.clientWidth,c=a/(g.current.offsetWidth-r-n-t),l;E===`rtl`?(l=(1-c)*(o-s),_.current.scrollLeft<=0&&(l=-l)):l=c*(o-s),_.current.scrollLeft=l}b(e)}},onPointerUp:x,style:{position:`absolute`,touchAction:`none`,WebkitUserSelect:`none`,userSelect:`none`,visibility:D?`hidden`:void 0,...o===`vertical`&&{top:0,bottom:`var(${oO.scrollAreaCornerHeight})`,insetInlineEnd:0,[UO.scrollAreaThumbHeight]:`${C.height}px`},...o===`horizontal`&&{insetInlineStart:0,insetInlineEnd:`var(${oO.scrollAreaCornerWidth})`,bottom:0,[UO.scrollAreaThumbWidth]:`${C.width}px`}}},k=q(`div`,e,{ref:[r,o===`vertical`?h:g],state:T,props:[O,l],stateAttributesMapping:vO}),A=t.useMemo(()=>({orientation:o}),[o]),j=o===`vertical`?p.y:p.x;return s||!j?(0,n.jsx)(VO.Provider,{value:A,children:k}):null}),process.env.NODE_ENV!==`production`&&(GO.displayName=`ScrollAreaScrollbar`)})),qO,JO=p((()=>{aO(),HO(),WO(),J(),qO=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{thumbYRef:o,thumbXRef:s,handlePointerDown:c,handlePointerMove:l,handlePointerUp:u,setScrollingX:d,setScrollingY:f,hasMeasuredScrollbar:p}=rO(),{orientation:m}=BO();return q(`div`,e,{ref:[t,m===`vertical`?o:s],state:{orientation:m},props:[{onPointerDown:c,onPointerMove:l,onPointerUp(e){m===`vertical`&&f(!1),m===`horizontal`&&d(!1),u(e)},style:{visibility:p?void 0:`hidden`,...m===`vertical`&&{height:`var(${UO.scrollAreaThumbHeight})`},...m===`horizontal`&&{width:`var(${UO.scrollAreaThumbWidth})`}}},a]})}),process.env.NODE_ENV!==`production`&&(qO.displayName=`ScrollAreaThumb`)})),YO,XO=p((()=>{aO(),J(),YO=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{cornerRef:o,cornerSize:s,hiddenState:c}=rO(),l=q(`div`,e,{ref:[t,o],props:[{style:{position:`absolute`,bottom:0,insetInlineEnd:0,width:s.width,height:s.height}},a]});return c.corner?null:l}),process.env.NODE_ENV!==`production`&&(YO.displayName=`ScrollAreaCorner`)})),ZO=p((()=>{EO(),zO(),KO(),I(),OO(),J(),aO(),yO(),JO(),XO()})),QO=p((()=>{ZO()}));function $O(){let e=t.useContext(tk);if(e===null)throw Error(process.env.NODE_ENV===`production`?G(60):`Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.`);return e}function ek(){let e=t.useContext(nk);if(e===null)throw Error(process.env.NODE_ENV===`production`?G(61):`Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>.`);return e}var tk,nk,rk=p((()=>{K(),tk=t.createContext(null),process.env.NODE_ENV!==`production`&&(tk.displayName=`SelectRootContext`),nk=t.createContext(null),process.env.NODE_ENV!==`production`&&(nk.displayName=`SelectFloatingContext`)})),ik,ak=p((()=>{Mf(),mh(),Ch(),ik={id:Q(e=>e.id),labelId:Q(e=>e.labelId),modal:Q(e=>e.modal),multiple:Q(e=>e.multiple),items:Q(e=>e.items),itemToStringLabel:Q(e=>e.itemToStringLabel),itemToStringValue:Q(e=>e.itemToStringValue),isItemEqualToValue:Q(e=>e.isItemEqualToValue),value:Q(e=>e.value),hasSelectedValue:Q(e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:bh(t,r)!==``}),hasNullItemLabel:Q((e,t)=>t?vh(e.items):!1),open:Q(e=>e.open),mounted:Q(e=>e.mounted),forceMount:Q(e=>e.forceMount),transitionStatus:Q(e=>e.transitionStatus),openMethod:Q(e=>e.openMethod),activeIndex:Q(e=>e.activeIndex),selectedIndex:Q(e=>e.selectedIndex),isActive:Q((e,t)=>e.activeIndex===t),isSelected:Q((e,t,n)=>{let r=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(e=>lh(n,e,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:lh(n,i,r)}),isSelectedByFocus:Q((e,t)=>e.selectedIndex===t),popupProps:Q(e=>e.popupProps),triggerProps:Q(e=>e.triggerProps),triggerElement:Q(e=>e.triggerElement),positionerElement:Q(e=>e.positionerElement),listElement:Q(e=>e.listElement),scrollUpArrowVisible:Q(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:Q(e=>e.scrollDownArrowVisible),hasScrollArrows:Q(e=>e.hasScrollArrows)}}));function ok(e){let{id:r,value:i,defaultValue:a=null,onValueChange:o,open:s,defaultOpen:c=!1,onOpenChange:l,name:u,form:d,autoComplete:f,disabled:p=!1,readOnly:m=!1,required:h=!1,modal:g=!0,actionsRef:_,inputRef:v,onOpenChangeComplete:y,items:b,multiple:x=!1,itemToStringLabel:C,itemToStringValue:w,isItemEqualToValue:E=ph,highlightItemOnHover:D=!0,children:k}=e,{clearErrors:A}=zh(),{setDirty:j,setTouched:M,setFocused:N,shouldValidateOnChange:P,validityData:I,setFilled:L,name:R,disabled:ee,validation:z,validationMode:B}=Ph(),V=Gh({id:r}),te=ee||p,ne=R??u,[H,re]=S({controlled:i,default:x?a??Te:a,name:`Select`,state:`value`}),[U,W]=S({controlled:s,default:c,name:`Select`,state:`open`}),ie=t.useRef([]),ae=t.useRef([]),oe=t.useRef(null),G=t.useRef(null),K=t.useRef(0),se=t.useRef(null),ce=t.useRef([]),le=t.useRef(!1),de=t.useRef(!1),fe=t.useRef(null),pe=t.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),me=t.useRef(!1),{mounted:he,setMounted:ge,transitionStatus:_e}=_n(U),{openMethod:ve,triggerProps:ye}=qp(U),be=T(()=>new Tf({id:V,labelId:void 0,modal:g,multiple:x,itemToStringLabel:C,itemToStringValue:w,isItemEqualToValue:E,value:H,open:U,mounted:he,transitionStatus:_e,items:b,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,xe=$(be,ik.activeIndex),Se=$(be,ik.selectedIndex),Ce=$(be,ik.triggerElement),we=$(be,ik.positionerElement),De=fx(ve),Oe=ve??De,ke=t.useMemo(()=>x&&Array.isArray(H)&&H.length===0?``:bh(H,w),[x,H,w]),Ae=t.useMemo(()=>x&&Array.isArray(H)?H.map(e=>bh(e,w)):bh(H,w),[x,H,w]);Lh(nl(be.state.triggerElement),{id:V,value:H,getValue:O(()=>Ae)});let je=t.useRef(H);F(()=>{H!==je.current&&be.set(`forceMount`,!0)},[be,H]),F(()=>{L(x?Array.isArray(H)&&H.length>0:H!=null)},[x,H,L]),F(function(){if(U)return;let e=ce.current;if(x){let t=Array.isArray(H)?H:[];if(t.length===0){be.set(`selectedIndex`,null);return}let n=t[t.length-1],r=dh(e,n,E);be.set(`selectedIndex`,r===-1?null:r);return}let t=dh(e,H,E);be.set(`selectedIndex`,t===-1?null:t)},[x,U,H,ce,E,be]),Gp(H,()=>{A(ne),j(H!==I.initialValue),P()?z.commit(H):z.commit(H,!0)});let Me=O((e,t)=>{if(l?.(e,t),!t.isCanceled&&(W(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(M(!0),N(!1),B===`onBlur`&&z.commit(H)),!e&&be.state.activeIndex!==null)){let e=ie.current[be.state.activeIndex];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}}),Ne=O(()=>{ge(!1),be.update({activeIndex:null,openMethod:null}),y?.(!1)});vo({enabled:!_,open:U,ref:oe,onComplete(){U||Ne()}}),t.useImperativeHandle(_,()=>({unmount:Ne}),[Ne]);let Fe=O((e,t)=>{o?.(e,t),!t.isCanceled&&re(e)}),Ie=O(()=>{let e=be.state.listElement||oe.current;if(!e)return;let t=jO(e.scrollHeight,e.clientHeight),n=MO(e.scrollTop,t),r=n>0,i=n<t;be.state.scrollUpArrowVisible!==r&&be.set(`scrollUpArrowVisible`,r),be.state.scrollDownArrowVisible!==i&&be.set(`scrollDownArrowVisible`,i)}),Le=Xf({open:U,onOpenChange:Me,elements:{reference:Ce,floating:we}}),{getReferenceProps:Re,getFloatingProps:ze,getItemProps:Be}=gp([pu(Le,{enabled:!m&&!te,event:`mousedown`}),xu(Le,{bubbles:!1}),Tp(Le,{enabled:!m&&!te,listRef:ie,activeIndex:xe,selectedIndex:Se,disabledIndices:Te,onNavigate(e){e===null&&!U||be.set(`activeIndex`,e)},focusItemOnHover:D}),jp(Le,{enabled:!m&&!te&&(U||!x),listRef:ae,activeIndex:xe,selectedIndex:Se,onMatch(e){U?be.set(`activeIndex`,e):Fe(ce.current[e],Y(`none`))},onTypingChange(e){le.current=e}})]),Ve=t.useMemo(()=>Pe(Re(),ye,V?{id:V}:Ee),[Re,ye,V]);Oc(()=>{be.update({popupProps:ze(),triggerProps:Ve})}),F(()=>{be.update({id:V,modal:g,multiple:x,value:H,open:U,mounted:he,transitionStatus:_e,popupProps:ze(),triggerProps:Ve,items:b,itemToStringLabel:C,itemToStringValue:w,isItemEqualToValue:E,openMethod:Oe})},[be,V,g,x,H,U,he,_e,ze,Ve,b,C,w,E,Oe]);let He=t.useMemo(()=>({store:be,name:ne,required:h,disabled:te,readOnly:m,multiple:x,highlightItemOnHover:D,setValue:Fe,setOpen:Me,listRef:ie,popupRef:oe,scrollHandlerRef:G,handleScrollArrowVisibility:Ie,scrollArrowsMountedCountRef:K,getItemProps:Be,events:Le.context.events,valueRef:se,valuesRef:ce,labelsRef:ae,typingRef:le,selectionRef:pe,selectedItemTextRef:fe,validation:z,onOpenChangeComplete:y,keyboardActiveRef:de,alignItemWithTriggerActiveRef:me,initialValueRef:je}),[be,ne,h,te,m,x,D,Fe,Me,Be,Le.context.events,z,y,Ie]),Ue=ue(v,z.inputRef),We=x&&Array.isArray(H)&&H.length>0,Ge=x?void 0:ne,Ke=t.useMemo(()=>!x||!Array.isArray(H)||!ne?null:H.map(e=>{let t=bh(e,w);return(0,n.jsx)(`input`,{type:`hidden`,form:d,name:ne,value:t},t)}),[x,H,d,ne,w]);return(0,n.jsx)(tk.Provider,{value:He,children:(0,n.jsxs)(nk.Provider,{value:Le,children:[k,(0,n.jsx)(`input`,{...z.getInputValidationProps({onFocus(){be.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.currentTarget.value,n=Y(at,e.nativeEvent);function r(){if(x)return;let e=ce.current.find(e=>bh(e,w).toLowerCase()===t.toLowerCase()||yh(e,C).toLowerCase()===t.toLowerCase());e!=null&&(j(e!==I.initialValue),Fe(e,n),P()&&z.commit(e))}be.set(`forceMount`,!0),queueMicrotask(r)}}),id:V&&Ge==null?`${V}-hidden-input`:void 0,form:d,name:Ge,autoComplete:f,value:ke,disabled:te,required:h&&!We,readOnly:m,ref:Ue,style:ne?sl:ol,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Ke]})})}var sk=p((()=>{cl(),ge(),D(),kc(),px(),w(),I(),N(),il(),Mf(),De(),Hp(),rk(),Ih(),Rh(),Kh(),vn(),ak(),Rt(),It(),yo(),Vh(),Ch(),mh(),Kp(),Jp(),NO(),Xe()})),ck,lk,uk,dk,fk,pk=p((()=>{da(),Nc(),N(),ge(),il(),Mf(),rk(),Ih(),Wh(),ym(),Nh(),J(),ak(),fg(),Ra(),Xe(),Ar(),Rt(),It(),Kh(),hg(),ck=2,lk=400,uk=200,dk={..._m,...Mh,value:()=>null},fk=t.forwardRef(function(e,n){let{render:r,className:i,id:a,disabled:o=!1,nativeButton:s=!0,style:c,...l}=e,{setTouched:u,setFocused:d,validationMode:f,state:p,disabled:m}=Ph(),{labelId:h}=Hh(),{store:g,setOpen:_,selectionRef:v,validation:y,readOnly:b,required:x,alignItemWithTriggerActiveRef:S,disabled:C,keyboardActiveRef:w}=$O(),T=m||C||o,E=$(g,ik.open),D=$(g,ik.value),k=$(g,ik.triggerProps),A=$(g,ik.positionerElement),j=$(g,ik.listElement),M=$(g,ik.id),N=$(g,ik.labelId),P=$(g,ik.hasSelectedValue),F=!P&&E,I=$(g,ik.hasNullItemLabel,F),L=a??M,R=mg(h,N);Gh({id:L});let ee=nl(A),z=t.useRef(null),{getButtonProps:B,buttonRef:V}=Er({disabled:T,native:s}),te=ue(n,z,V,O(e=>{g.set(`triggerElement`,e)})),ne=Ac(),H=Ac(),re=Ac(),U=Ac();t.useEffect(()=>{if(E)return P||I?U.start(uk,()=>{v.current.allowUnselectedMouseUp=!0,re.start(uk,()=>{v.current.allowSelectedMouseUp=!0})}):re.start(lk,()=>{v.current.allowUnselectedMouseUp=!0,v.current.allowSelectedMouseUp=!0}),()=>{re.clear(),U.clear()};v.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},H.clear()},[E,P,I,v,H,re,U]);let W=t.useMemo(()=>j?.id??ui(A)?.id,[j,A]),ie=Pe(k,{id:L,role:`combobox`,"aria-expanded":E?`true`:`false`,"aria-haspopup":`listbox`,"aria-controls":E?W:void 0,"aria-labelledby":R,"aria-readonly":b||void 0,"aria-required":x||void 0,tabIndex:T?-1:0,ref:te,onFocus(e){d(!0),E&&S.current&&_(!1,Y(at,e.nativeEvent)),ne.start(0,()=>{g.set(`forceMount`,!0)})},onBlur(e){ei(A,e.relatedTarget)||(u(!0),d(!1),f===`onBlur`&&y.commit(D))},onPointerMove(){w.current=!1},onKeyDown(){w.current=!0},onMouseDown(e){if(E)return;let t=ua(e.currentTarget);function n(e){if(!z.current)return;let t=e.target;if(ei(z.current,t)||ei(ee.current,t)||t===z.current)return;let n=dg(z.current);e.clientX>=n.left-ck&&e.clientX<=n.right+ck&&e.clientY>=n.top-ck&&e.clientY<=n.bottom+ck||_(!1,Y(kt,e))}H.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},y.getValidationProps,l,B);ie.role=`combobox`;let ae={...p,open:E,disabled:T,value:D,readOnly:b,placeholder:!P};return q(`button`,e,{ref:[n,z],state:ae,stateAttributesMapping:dk,props:ie})}),process.env.NODE_ENV!==`production`&&(fk.displayName=`SelectTrigger`)})),mk,hk,gk=p((()=>{Mf(),J(),rk(),Ch(),ak(),mk={value:()=>null},hk=t.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,{store:c,valueRef:l}=$O(),u=$(c,ik.value),d=$(c,ik.items),f=$(c,ik.itemToStringLabel),p=$(c,ik.hasSelectedValue),m=!p&&a!=null&&i==null,h=$(c,ik.hasNullItemLabel,m),g={value:u,placeholder:!p},_=null;return _=typeof i==`function`?i(u):i??(!p&&a!=null&&!h?a:Array.isArray(u)?Sh(u,d,f):xh(u,d,f)),q(`span`,e,{state:g,ref:[t,l],props:[{children:_},s],stateAttributesMapping:mk})}),process.env.NODE_ENV!==`production`&&(hk.displayName=`SelectValue`)})),_k,vk=p((()=>{Mf(),J(),rk(),ym(),ak(),_k=t.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,{store:o}=$O();return q(`span`,e,{state:{open:$(o,ik.open)},ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:gm})}),process.env.NODE_ENV!==`production`&&(_k.displayName=`SelectIcon`)})),yk,bk=p((()=>{yk=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(yk.displayName=`SelectPortalContext`)})),xk,Sk=p((()=>{Mf(),Hp(),bk(),rk(),ak(),xk=t.forwardRef(function(e,t){let{store:r}=$O(),i=$(r,ik.mounted),a=$(r,ik.forceMount);return i||a?(0,n.jsx)(yk.Provider,{value:!0,children:(0,n.jsx)(Ul,{ref:t,...e})}):null}),process.env.NODE_ENV!==`production`&&(xk.displayName=`SelectPortal`)}));function Ck(){let e=t.useContext(wk);if(!e)throw Error(process.env.NODE_ENV===`production`?G(59):`Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>.`);return e}var wk,Tk=p((()=>{K(),wk=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(wk.displayName=`SelectPositionerContext`)}));function Ek(e,t){e&&Object.assign(e.style,t)}var Dk,Ok=p((()=>{Dk={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`}})),kk,Ak,jk=p((()=>{Rm(),I(),N(),Mf(),rk(),U(),__(),Tk(),Bm(),Rl(),Ok(),ak(),Rt(),It(),mh(),x_(),w_(),kk={position:`fixed`},Ak=t.forwardRef(function(e,r){let{anchor:i,positionMethod:a=`absolute`,className:o,render:s,side:c=`bottom`,align:l=`center`,sideOffset:u=0,alignOffset:d=0,collisionBoundary:f=`clipping-ancestors`,collisionPadding:p,arrowPadding:m=5,sticky:h=!1,disableAnchorTracking:g,alignItemWithTrigger:_=!0,collisionAvoidance:v=Fl,style:y,...b}=e,{store:x,listRef:S,labelsRef:C,alignItemWithTriggerActiveRef:w,selectedItemTextRef:T,valuesRef:E,initialValueRef:D,popupRef:k,setValue:A}=$O(),j=ek(),M=$(x,ik.open),N=$(x,ik.mounted),P=$(x,ik.modal),I=$(x,ik.value),L=$(x,ik.openMethod),R=$(x,ik.positionerElement),ee=$(x,ik.triggerElement),z=$(x,ik.isItemEqualToValue),B=$(x,ik.transitionStatus),V=t.useRef(null),ne=t.useRef(null),[H,re]=t.useState(_),U=N&&H&&L!==`touch`;!N&&H!==_&&re(_),F(()=>{N||(ik.scrollUpArrowVisible(x.state)&&x.set(`scrollUpArrowVisible`,!1),ik.scrollDownArrowVisible(x.state)&&x.set(`scrollDownArrowVisible`,!1))},[x,N]),t.useImperativeHandle(w,()=>U),S_((U||P)&&M,L===`touch`,R,ee);let W=h_({anchor:i,floatingRootContext:j,positionMethod:a,mounted:N,side:c,sideOffset:u,align:l,alignOffset:d,arrowPadding:m,collisionBoundary:f,collisionPadding:p,sticky:h,disableAnchorTracking:g??U,collisionAvoidance:v,keepMounted:!0}),ie=U?`none`:W.side,ae=U?kk:W.positionerStyles,oe=b_(e,{open:M,side:ie,align:W.align,anchorHidden:W.anchorHidden},{styles:ae,transitionStatus:B,props:b,refs:[r,O(e=>{x.set(`positionerElement`,e)})],hidden:!N,inert:!M}),G=t.useRef(0),K=O(e=>{if(e.size===0&&G.current===0||E.current.length===0)return;let t=G.current;if(G.current=e.size,e.size===t)return;let n=Y(at);if(t!==0&&!x.state.multiple&&I!==null&&dh(E.current,I,z)===-1){let e=D.current,t=e!=null&&dh(E.current,e,z)!==-1?e:null;A(t,n),t===null&&(x.set(`selectedIndex`,null),T.current=null)}if(t!==0&&x.state.multiple&&Array.isArray(I)){let e=e=>dh(E.current,e,z)!==-1,t=I.filter(t=>e(t));(t.length!==I.length||t.some(e=>!uh(I,e,z)))&&(A(t,n),t.length===0&&(x.set(`selectedIndex`,null),T.current=null))}if(M&&U){x.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};Ek(R,e),Ek(k.current,e)}}),se=t.useMemo(()=>({...W,side:ie,alignItemWithTriggerActive:U,setControlledAlignItemWithTrigger:re,scrollUpArrowRef:V,scrollDownArrowRef:ne}),[W,ie,U,re]);return(0,n.jsx)(te,{elementsRef:S,labelsRef:C,onMapChange:K,children:(0,n.jsxs)(wk.Provider,{value:se,children:[N&&P&&(0,n.jsx)(zm,{inert:Lm(!M),cutout:ee}),oe]})})}),process.env.NODE_ENV!==`production`&&(Ak.displayName=`SelectPositioner`)}));function Mk(e){let t=e.maxHeight||``;return t.endsWith(`px`)&&parseFloat(t)||1/0}function Nk(e){return jO(e.scrollHeight,e.clientHeight)}function Pk(e){return md.getScale(e)}function Fk(e,t,n){return e/n[t]}function Ik(e,t){return Ri({x:Fk(e.x,`x`,t),y:Fk(e.y,`y`,t),width:Fk(e.width,`x`,t),height:Fk(e.height,`y`,t)})}function Lk(e){let{style:t}=e,n={};for(let[e,r]of Bk)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of Bk){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var Rk,zk,Bk,Vk=p((()=>{Xi(),uo(),Gr(),N(),da(),I(),Mf(),sn(),Hp(),rk(),ym(),Tk(),hO(),mn(),yo(),J(),ak(),Ok(),Rt(),It(),mb(),co(),y_(),yS(),NO(),zx(),ae(),Rk={...vm,...pn},zk=t.forwardRef(function(e,r){let{render:i,className:a,style:o,finalFocus:s,...c}=e,{store:l,popupRef:u,onOpenChangeComplete:d,setOpen:f,valueRef:p,selectedItemTextRef:m,keyboardActiveRef:h,multiple:g,handleScrollArrowVisibility:_,scrollHandlerRef:v,listRef:y,highlightItemOnHover:b}=$O(),{side:x,align:S,alignItemWithTriggerActive:C,isPositioned:w,setControlledAlignItemWithTrigger:T,scrollDownArrowRef:E,scrollUpArrowRef:D}=Ck(),k=fb(!0)!=null,A=ek(),j=W(),{nonce:M,disableStyleElements:N}=Ix(),P=$(l,ik.id),I=$(l,ik.open),L=$(l,ik.mounted),R=$(l,ik.popupProps),ee=$(l,ik.transitionStatus),z=$(l,ik.triggerElement),B=$(l,ik.positionerElement),V=$(l,ik.listElement),te=t.useRef(!1),ne=t.useRef(!1),H=t.useRef({}),re=en(),U=O(e=>{if(!B||!u.current||!ne.current)return;if(te.current||!C){_();return}let t=B.style.top===`0px`,n=B.style.bottom===`0px`;if(!t&&!n){_();return}let r=Pk(B),i=Fk(B.getBoundingClientRect().height,`y`,r),a=ua(B),o=getComputedStyle(B),s=parseFloat(o.marginTop),c=parseFloat(o.marginBottom),l=Mk(getComputedStyle(u.current)),d=Math.min(a.documentElement.clientHeight-s-c,l),f=e.scrollTop,p=Nk(e),m=0,h=null,g=!1,v=!1,y=e=>{B.style.height=`${e}px`},b=(t,n)=>{let r=vS(t,0,d-i);r>0&&y(i+r),e.scrollTop=n,d-(i+r)<=1&&(te.current=!0),_()},x=t?p-f:f,S=Math.min(i+x,d);if(m=S,x<=1){b(x,t?p:0);return}if(d-S>1?t?v=!0:h=0:(g=!0,n&&f<p&&(h=f-(x-(i+x-d)))),m=Math.ceil(m),m!==0&&y(m),v||h!=null){let t=Nk(e),n=v?t:vS(h,0,t);Math.abs(e.scrollTop-n)>1&&(e.scrollTop=n)}(g||m>=d-1)&&(te.current=!0),_()});t.useImperativeHandle(v,()=>U,[U]),vo({open:I,ref:u,onComplete(){I&&d?.(!0)}});let ie={open:I,transitionStatus:ee,side:x,align:S};F(()=>{!B||!u.current||Object.keys(H.current).length||(H.current={top:B.style.top||`0`,left:B.style.left||`0`,right:B.style.right,height:B.style.height,bottom:B.style.bottom,minHeight:B.style.minHeight,maxHeight:B.style.maxHeight,marginTop:B.style.marginTop,marginBottom:B.style.marginBottom})},[u,B]),F(()=>{I||C||(ne.current=!1,te.current=!1,Ek(B,H.current))},[I,C,B,u]),F(()=>{let e=u.current;if(!I||!z||!B||!e||C&&!w||l.state.transitionStatus===`ending`)return;if(!C){ne.current=!0,re.request(_),e.style.removeProperty(`--transform-origin`);return}let t=Lk(e);e.style.removeProperty(`--transform-origin`);try{let t=m.current,n=p.current,r=getComputedStyle(B),i=getComputedStyle(e),a=ua(z),o=Zn(B),s=Pk(z),c=Ik(z.getBoundingClientRect(),s),u=Ik(B.getBoundingClientRect(),s),d=c.height,f=V||e,h=f.scrollHeight,g=parseFloat(i.borderBottomWidth),v=parseFloat(r.marginTop)||10,x=parseFloat(r.marginBottom)||10,S=parseFloat(r.minHeight)||100,C=Mk(i),w=a.documentElement.clientHeight-v-x,E=a.documentElement.clientWidth,D=w-c.bottom+d,O,k=j===`rtl`?c.right-u.width:c.left,A=0;if(t&&n){let e=Ik(n.getBoundingClientRect(),s);O=Ik(t.getBoundingClientRect(),s),k=u.left+(j===`rtl`?e.right-O.right:e.left-O.left);let r=e.top-c.top+e.height/2;A=O.top-u.top+O.height/2-r}let M=D+A+x+g,N=Math.min(w,M),P=w-v-x,F=M-N,I=E-5;B.style.left=`${vS(k,5,I-u.width)}px`,B.style.height=`${N}px`,B.style.maxHeight=`auto`,B.style.marginTop=`${v}px`,B.style.marginBottom=`${x}px`,e.style.height=`100%`;let L=Nk(f),R=F>=L-1;R&&(N=Math.min(w,u.height)-(F-L));let ee=c.top<20||c.bottom>w-20||Math.ceil(N)+1<Math.min(h,S),re=(o.visualViewport?.scale??1)!==1&&Rr;if(ee||re){ne.current=!0,Ek(B,H.current),T(!1);return}let U=Math.max(S,N);if(R){let e=Math.max(0,w-M);B.style.top=u.height>=P?`0`:`${e}px`,B.style.height=`${N}px`,f.scrollTop=Nk(f)}else B.style.bottom=`0`,f.scrollTop=F;if(O){let t=u.top,n=u.height,r=O.top+O.height/2,i=vS(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(U===w||N>=C)&&(te.current=!0),_(),b&&l.state.selectedIndex===null&&l.state.activeIndex===null&&y.current[0]!=null&&l.set(`activeIndex`,0),ne.current=!0}finally{t()}},[l,I,B,z,p,m,u,_,C,T,re,E,D,V,y,b,j,w]),t.useEffect(()=>{if(!C||!B||!I)return;let e=Zn(B);function t(e){f(!1,Y(Pt,e))}return lo(e,`resize`,t)},[f,C,B,I]);let ae={...V?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":g||void 0,id:`${P}-list`},onKeyDown(e){h.current=!0,k&&ro.has(e.key)&&e.stopPropagation()},onMouseMove(){h.current=!1},onScroll(e){V||U(e.currentTarget)},...C&&{style:V?{height:`100%`}:Dk}},oe=q(`div`,e,{ref:[r,u],state:ie,stateAttributesMapping:Rk,props:[R,ae,v_(ee),{className:!V&&C?mO.className:void 0},c]});return(0,n.jsxs)(t.Fragment,{children:[!N&&mO.getElement(M),(0,n.jsx)(lu,{context:A,modal:!1,disabled:!L,returnFocus:s,restoreFocus:!0,children:oe})]})}),process.env.NODE_ENV!==`production`&&(zk.displayName=`SelectPopup`),Bk=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]]})),Hk,Uk=p((()=>{N(),Mf(),rk(),Tk(),J(),hO(),Ok(),ak(),Hk=t.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,{store:o,scrollHandlerRef:s}=$O(),{alignItemWithTriggerActive:c}=Ck(),l=$(o,ik.hasScrollArrows),u=$(o,ik.openMethod),d=$(o,ik.multiple),f={id:`${$(o,ik.id)}-list`,role:`listbox`,"aria-multiselectable":d||void 0,onScroll(e){s.current?.(e.currentTarget)},...c&&{style:Dk},className:l&&u!==`touch`?mO.className:void 0};return q(`div`,e,{ref:[t,O(e=>{o.set(`listElement`,e)})],props:[f,a]})}),process.env.NODE_ENV!==`production`&&(Hk.displayName=`SelectList`)}));function Wk(){let e=t.useContext(Gk);if(!e)throw Error(process.env.NODE_ENV===`production`?G(57):`Base UI: SelectItemContext is missing. SelectItem parts must be placed within <Select.Item>.`);return e}var Gk,Kk=p((()=>{K(),Gk=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Gk.displayName=`SelectItemContext`)})),qk,Jk=p((()=>{I(),il(),Mf(),rk(),En(),J(),Kk(),ak(),Ar(),Rt(),It(),mh(),qk=t.memo(t.forwardRef(function(e,r){let{render:i,className:a,value:o=null,label:s,disabled:c=!1,nativeButton:l=!1,style:u,...d}=e,f=t.useRef(null),p=wn({label:s,textRef:f,indexGuessBehavior:Tn.GuessFromOrder}),{store:m,getItemProps:h,setOpen:g,setValue:_,selectionRef:v,typingRef:y,valuesRef:b,multiple:x,selectedItemTextRef:S}=$O(),C=$(m,ik.isActive,p.index),w=$(m,ik.isSelected,p.index,o),T=$(m,ik.isSelectedByFocus,p.index),E=$(m,ik.isItemEqualToValue),D=p.index,O=D!==-1,k=t.useRef(null),A=nl(D);F(()=>{if(!O)return;let e=b.current;return e[D]=o,()=>{delete e[D]}},[O,D,o,b]),F(()=>{if(!O)return;let e=m.state.value,t=e;x&&Array.isArray(e)&&e.length>0&&(t=e[e.length-1]),t!==void 0&&lh(o,t,E)&&(m.set(`selectedIndex`,D),f.current&&(S.current=f.current))},[O,D,x,E,m,o,S]);let j={disabled:c,selected:w,highlighted:C},M=h({active:C,selected:w});M.id=void 0;let N=t.useRef(null),P=t.useRef(`mouse`),I=t.useRef(!1),{getButtonProps:L,buttonRef:R}=Er({disabled:c,focusableWhenDisabled:!0,native:l,composite:!0});function ee(e){let t=m.state.value;if(x){let n=Array.isArray(t)?t:[];_(w?fh(n,o,E):[...n,o],Y(ut,e))}else _(o,Y(ut,e)),g(!1,Y(ut,e))}let z={role:`option`,"aria-selected":w,tabIndex:C?0:-1,onTouchStart(){v.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(e){N.current=e.key,m.set(`activeIndex`,D),e.key===` `&&y.current&&e.preventDefault()},onClick(e){I.current=!1,!(e.type===`keydown`&&N.current===null)&&(c||e.type===`keydown`&&N.current===` `&&y.current||P.current!==`touch`&&!C||(N.current=null,ee(e.nativeEvent)))},onPointerEnter(e){P.current=e.pointerType},onPointerDown(e){P.current=e.pointerType,I.current=!0},onMouseUp(){if(c)return;if(I.current){I.current=!1;return}let e=!v.current.allowSelectedMouseUp&&w,t=!v.current.allowUnselectedMouseUp&&!w;e||t||P.current!==`touch`&&!C||k.current?.click()}},B=q(`div`,e,{ref:[R,r,p.ref,k],state:j,props:[M,z,d,L]}),V=t.useMemo(()=>({selected:w,indexRef:A,textRef:f,selectedByFocus:T,hasRegistered:O}),[w,A,f,T,O]);return(0,n.jsx)(Gk.Provider,{value:V,children:B})})),process.env.NODE_ENV!==`production`&&(qk.displayName=`SelectItem`)})),Yk,Xk,Zk=p((()=>{Kk(),vn(),yo(),J(),mn(),Yk=t.forwardRef(function(e,t){let r=e.keepMounted??!1,{selected:i}=Wk();return r||i?(0,n.jsx)(Xk,{...e,ref:t}):null}),process.env.NODE_ENV!==`production`&&(Yk.displayName=`SelectItemIndicator`),Xk=t.memo(t.forwardRef((e,n)=>{let{render:r,className:i,style:a,keepMounted:o,...s}=e,{selected:c}=Wk(),l=t.useRef(null),{transitionStatus:u,setMounted:d}=_n(c),f=q(`span`,e,{ref:[n,l],state:{selected:c,transitionStatus:u},props:[{"aria-hidden":!0,children:`✔️`},s],stateAttributesMapping:pn});return vo({open:c,ref:l,onComplete(){c||d(!1)}}),f})),process.env.NODE_ENV!==`production`&&(Xk.displayName=`Inner`)})),Qk,$k=p((()=>{rk(),Kk(),J(),Qk=t.memo(t.forwardRef(function(e,n){let{indexRef:r,textRef:i,selectedByFocus:a,hasRegistered:o}=Wk(),{selectedItemTextRef:s}=$O(),{className:c,render:l,style:u,...d}=e;return q(`div`,e,{ref:[t.useCallback(e=>{if(!e||!o)return;let t=s.current===null||!s.current.isConnected;(a||t&&r.current===0)&&(s.current=e)},[s,r,a,o]),n,i],props:d})})),process.env.NODE_ENV!==`production`&&(Qk.displayName=`SelectItemText`)}));function eA(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n<e.length;n+=1){let i=e[n];if(i&&i.offsetTop>=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return o<t&&s?MO(s.offsetTop-i,a):0}let o=e.length-1,s=n+r-i+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?MO(l.offsetTop+l.offsetHeight-r+i,a):a}var tA,nA=p((()=>{Nc(),Mf(),I(),rk(),Tk(),vn(),yo(),J(),NO(),ak(),tA=t.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:a,keepMounted:o=!1,...s}=e,c=a===`up`,{store:l,popupRef:u,listRef:d,handleScrollArrowVisibility:f,scrollArrowsMountedCountRef:p}=$O(),{side:m,scrollDownArrowRef:h,scrollUpArrowRef:g}=Ck(),_=$(l,c?ik.scrollUpArrowVisible:ik.scrollDownArrowVisible),v=$(l,ik.openMethod),y=_&&v!==`touch`,b=Ac(),x=c?g:h,{transitionStatus:S,setMounted:C}=_n(y);F(()=>(p.current+=1,l.state.hasScrollArrows||l.set(`hasScrollArrows`,!0),()=>{p.current=Math.max(0,p.current-1),p.current===0&&l.state.hasScrollArrows&&l.set(`hasScrollArrows`,!1)}),[l,p]),vo({open:y,ref:x,onComplete(){y||C(!1)}});let w=q(`div`,e,{ref:[t,x],state:{direction:a,visible:y,side:m,transitionStatus:S},props:[{"aria-hidden":!0,children:c?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||b.isStarted())return;l.set(`activeIndex`,null);function t(){let e=l.state.listElement??u.current;if(!e)return;l.set(`activeIndex`,null),f();let n=jO(e.scrollHeight,e.clientHeight),r=MO(e.scrollTop,n),i=r===(c?0:n),a=d.current;if(r!==e.scrollTop&&(e.scrollTop=r),a.length===0&&l.set(c?`scrollUpArrowVisible`:`scrollDownArrowVisible`,!i),i){b.clear();return}if(a.length>0){let t=x.current?.offsetHeight||0;e.scrollTop=eA(a,c,r,e.clientHeight,t,n)}b.start(40,t)}b.start(40,t)},onMouseLeave(){b.clear()}},s]});return y||o?w:null}),process.env.NODE_ENV!==`production`&&(tA.displayName=`SelectScrollArrow`)})),rA,iA=p((()=>{nA(),rA=t.forwardRef(function(e,t){return(0,n.jsx)(tA,{...e,ref:t,direction:`down`})}),process.env.NODE_ENV!==`production`&&(rA.displayName=`SelectScrollDownArrow`)})),aA,oA=p((()=>{nA(),aA=t.forwardRef(function(e,t){return(0,n.jsx)(tA,{...e,ref:t,direction:`up`})}),process.env.NODE_ENV!==`production`&&(aA.displayName=`SelectScrollUpArrow`)}));function sA(){let e=t.useContext(cA);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(56):`Base UI: SelectGroupContext is missing. SelectGroup parts must be placed within <Select.Group>.`);return e}var cA,lA=p((()=>{K(),cA=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(cA.displayName=`SelectGroupContext`)})),uA,dA=p((()=>{lA(),J(),uA=t.forwardRef(function(e,r){let{className:i,render:a,style:o,...s}=e,[c,l]=t.useState(),u=t.useMemo(()=>({labelId:c,setLabelId:l}),[c,l]),d=q(`div`,e,{ref:r,props:[{role:`group`,"aria-labelledby":c},s]});return(0,n.jsx)(cA.Provider,{value:u,children:d})}),process.env.NODE_ENV!==`production`&&(uA.displayName=`SelectGroup`)})),fA,pA=p((()=>{I(),Xt(),lA(),J(),fA=t.forwardRef(function(e,t){let{className:n,render:r,id:i,style:a,...o}=e,{setLabelId:s}=sA(),c=Yt(i);return F(()=>{s(c)},[c,s]),q(`div`,e,{ref:t,props:[{id:c},o]})}),process.env.NODE_ENV!==`production`&&(fA.displayName=`SelectGroupLabel`)})),mA=p((()=>{sk(),Mf(),J(),Ih(),Nh(),br(),da(),N(),Ra(),my(),Wh(),hg(),rk(),ak(),pk(),gk(),vk(),Sk(),ym(),mn(),jk(),Vk(),Uk(),Jk(),Zk(),$k(),Tk(),iA(),oA(),dA(),pA(),Q_()})),hA=p((()=>{mA()}));function gA(e,t){return e-t}var _A=p((()=>{}));function vA(e,t,n){let r=e.slice();return r[t]=n,r.sort(gA)}var yA=p((()=>{_A()}));function bA(e,t,n,r,i,a){let o=e;return o=vS(o,n,r),i&&(o=vA(a,t,vS(o,a[t-1]||-1/0,a[t+1]||1/0))),o}var xA=p((()=>{yS(),yA()}));function SA(e,t,n){if(!Array.isArray(e))return!0;let r=e.reduce((e,t,n,r)=>(n===r.length-1||e.push(Math.abs(t-r[n+1])),e),[]);return Math.min(...r)>=t*n}var CA=p((()=>{})),wA,TA=p((()=>{Nh(),wA={activeThumbIndex:()=>null,max:()=>null,min:()=>null,minStepsBetweenValues:()=>null,step:()=>null,values:()=>null,...Mh}}));function EA(){let e=t.useContext(DA);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(62):`Base UI: SliderRootContext is missing. Slider parts must be placed within <Slider.Root>.`);return e}var DA,OA=p((()=>{K(),DA=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(DA.displayName=`SliderRootContext`)}));function kA(e){return`key`in e?Et:_t}function AA(e,t){return typeof e==`number`&&typeof t==`number`?e===t:Array.isArray(e)&&Array.isArray(t)?qv(e,t):!1}var jA,MA=p((()=>{da(),w(),N(),il(),I(),ee(),Rt(),Kp(),Xt(),J(),yS(),Jv(),Ra(),U(),Ih(),Rh(),Vh(),Wh(),hg(),_A(),xA(),CA(),TA(),OA(),It(),jA=t.forwardRef(function(e,r){let{"aria-labelledby":i,className:a,defaultValue:o,disabled:s=!1,id:c,format:l,largeStep:u=10,locale:d,render:f,max:p=100,min:m=0,minStepsBetweenValues:h=0,form:g,name:_,onValueChange:v,onValueCommitted:y,orientation:b=`horizontal`,step:x=1,thumbCollisionBehavior:C=`push`,thumbAlignment:w=`center`,value:T,style:E,...D}=e,k=Yt(c),A=pg(k),j=O(v),M=O(y),{clearErrors:N}=zh(),{state:P,disabled:I,name:R,setTouched:ee,setDirty:z,validityData:B,shouldValidateOnChange:V,validation:ne}=Ph(),{labelId:H}=Hh(),[re,U]=t.useState(),W=i??mg(H,re),ie=I||s,ae=R??_,[oe,G]=S({controlled:T,default:o??m,name:`Slider`}),K=t.useRef(null),se=t.useRef(null),ce=t.useRef([]),le=t.useRef(null),ue=t.useRef(null),de=t.useRef(-1),fe=t.useRef(null),pe=t.useRef(null),me=t.useRef(`none`),he=nl(l),[ge,_e]=t.useState(-1),[ve,ye]=t.useState(-1),[be,xe]=t.useState(!1),[Se,Ce]=t.useState(()=>new Map),[we,Te]=t.useState([void 0,void 0]),Ee=O(e=>{_e(e),e!==-1&&ye(e)});Lh(se,{id:k,value:oe}),Gp(oe,()=>{N(ae),V()?ne.commit(oe):ne.commit(oe,!0);let e=B.initialValue,t;t=Array.isArray(oe)&&Array.isArray(e)?!qv(oe,e):oe!==e,z(t)});let De=O(e=>{e&&(se.current=e)}),Oe=Array.isArray(oe),ke=t.useMemo(()=>Oe?oe.slice().sort(gA):[vS(oe,m,p)],[p,m,Oe,oe]),Ae=O((e,t)=>{if(Number.isNaN(e)||AA(e,oe))return;let n=t??Y(`none`,void 0,void 0,{activeThumbIndex:-1});me.current=n.reason;let r=n.event,i=new(r.constructor??Event)(r.type,r);Object.defineProperty(i,`target`,{writable:!0,value:{value:e,name:ae}}),n.event=i,pe.current=e,j(e,n),!n.isCanceled&&G(e)}),je=O((e,t,n)=>{let r=bA(e,t,m,p,Oe,ke);if(SA(r,x,h)){let e=kA(n);Ae(r,Y(e,n.nativeEvent,void 0,{activeThumbIndex:t})),ee(!0),M(pe.current??r,Lt(e,n.nativeEvent))}});process.env.NODE_ENV!==`production`&&m>=p&&L("Slider `max` must be greater than `min`."),F(()=>{let e=$r(ua(K.current));ie&&ei(K.current,e)&&e.blur()},[ie]),ie&&ge!==-1&&Ee(-1);let Me=t.useMemo(()=>({...P,activeThumbIndex:ge,disabled:ie,dragging:be,orientation:b,max:p,min:m,minStepsBetweenValues:h,step:x,values:ke}),[P,ge,ie,be,p,m,h,b,x,ke]),Ne=t.useMemo(()=>({active:ge,controlRef:se,disabled:ie,dragging:be,validation:ne,formatOptionsRef:he,handleInputChange:je,indicatorPosition:we,inset:w!==`center`,labelId:W,rootLabelId:A,largeStep:u,lastUsedThumbIndex:ve,lastChangedValueRef:pe,lastChangeReasonRef:me,form:g,locale:d,max:p,min:m,minStepsBetweenValues:h,name:ae,onValueCommitted:M,orientation:b,pressedInputRef:le,pressedThumbCenterOffsetRef:ue,pressedThumbIndexRef:de,pressedValuesRef:fe,registerFieldControlRef:De,renderBeforeHydration:w===`edge`,setActive:Ee,setDragging:xe,setIndicatorPosition:Te,setLabelId:U,setValue:Ae,state:Me,step:x,thumbCollisionBehavior:C,thumbMap:Se,thumbRefs:ce,values:ke}),[ge,se,W,A,ie,be,ne,he,je,we,u,ve,pe,me,g,d,p,m,h,ae,M,b,le,ue,de,fe,De,Ee,xe,Te,U,Ae,Me,x,C,w,Se,ce,ke]),Pe=q(`div`,e,{state:Me,ref:[r,K],props:[{"aria-labelledby":W,id:k,role:`group`},ne.getValidationProps,D],stateAttributesMapping:wA});return(0,n.jsx)(DA.Provider,{value:Ne,children:(0,n.jsx)(te,{elementsRef:ce,onMapChange:Ce,children:Pe})})}),process.env.NODE_ENV!==`production`&&(jA.displayName=`SliderRoot`)})),NA,PA=p((()=>{Sw(),J(),OA(),TA(),NA=t.forwardRef(function(e,n){let{"aria-live":r=`off`,render:i,className:a,children:o,style:s,...c}=e,{thumbMap:l,state:u,values:d,formatOptionsRef:f,locale:p}=EA(),m=t.useMemo(()=>{let e=``;for(let t of l.values())t?.inputId&&(e+=`${t.inputId} `);return e.trim()===``?void 0:e.trim()},[l]),h=t.useMemo(()=>{let e=[];for(let t=0;t<d.length;t+=1)e.push(vw(d[t],p,f.current??void 0));return e},[f,p,d]),g=t.useMemo(()=>{let e=[];for(let t=0;t<d.length;t+=1)e.push(h[t]||d[t]);return e.join(` – `)},[d,h]);return q(`output`,e,{state:u,ref:n,props:[{"aria-live":r,children:typeof o==`function`?o(h,d):g,htmlFor:m},c],stateAttributesMapping:wA})}),process.env.NODE_ENV!==`production`&&(NA.displayName=`SliderValue`)}));function FA(e){let t=e.getBoundingClientRect();return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}var IA=p((()=>{}));function LA(e){if(e===0)return 0;if(Math.abs(e)<1){let t=e.toExponential().split(`e-`),n=t[0].split(`.`)[1];return(n?n.length:0)+parseInt(t[1],10)}let t=e.toString().split(`.`)[1];return t?t.length:0}function RA(e,t,n){let r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(Math.max(LA(t),LA(n))))}var zA=p((()=>{}));function BA({values:e,index:t,nextValue:n,min:r,max:i,step:a,minStepsBetweenValues:o,initialValues:s}){if(e.length===0)return[];let c=e.slice(),l=a*o,u=c.length-1,d=s??e;c[t]=vS(n,r+t*l,i-(u-t)*l);for(let e=t+1;e<=u;e+=1){let t=c[e-1]+l,n=i-(u-e)*l,r=d[e]??c[e],a=Math.max(c[e],t);r<a&&(a=Math.max(r,t)),c[e]=vS(a,t,n)}for(let e=t-1;e>=0;--e){let t=c[e+1]-l,n=r+e*l,i=d[e]??c[e],a=Math.min(c[e],t);i>a&&(a=Math.min(i,t)),c[e]=vS(a,n,t)}for(let e=0;e<=u;e+=1)c[e]=Number(c[e].toFixed(12));return c}var VA=p((()=>{yS()}));function HA({behavior:e,values:t,currentValues:n,initialValues:r,pressedIndex:i,nextValue:a,min:o,max:s,step:c,minStepsBetweenValues:l}){let u=n??t,d=r??t;if(!(u.length>1))return{value:a,thumbIndex:0,didSwap:!1};let f=c*l;switch(e){case`swap`:{let e=u[i],t=1e-7,n=u.slice(),r=n[i-1],p=n[i+1],m=vS(a,r==null?o:r+f,p==null?s:p-f),h=Number(m.toFixed(12));n[i]=h;let g=a>e,_=a<e,v=g&&p!=null&&a>=p-t,y=_&&r!=null&&a<=r+t;if(!v&&!y)return{value:n,thumbIndex:i,didSwap:!1};let b=v?i+1:i-1,x=n.map((e,t)=>t===i?h:d[t]??u[t]),S=a;S=v?Math.max(a,n[b]):Math.min(a,n[b]);let C=BA({values:n,index:b,nextValue:S,min:o,max:s,step:c,minStepsBetweenValues:l,initialValues:x}),w=v?b-1:b+1;if(w>=0&&w<C.length){let e=C[w-1],t=C[w+1],n=e==null?o:e+f;n=Math.max(n,o+w*f);let r=t==null?s:t-f;r=Math.min(r,s-(C.length-1-w)*f);let i=vS(h,n,r);C[w]=Number(i.toFixed(12))}return{value:C,thumbIndex:b,didSwap:!0}}case`push`:return{value:BA({values:u,index:i,nextValue:a,min:o,max:s,step:c,minStepsBetweenValues:l}),thumbIndex:i,didSwap:!1};default:{let e=u.slice(),t=e[i-1],n=e[i+1],r=vS(a,t==null?o:t+f,n==null?s:n-f);return e[i]=Number(r.toFixed(12)),{value:e,thumbIndex:i,didSwap:!1}}}}var UA=p((()=>{yS(),VA()}));function WA(e,t){if(!e)return{start:0,end:0};function n(e){let t=e==null?0:parseFloat(e);return Number.isNaN(t)?0:t}let r=t?`Top`:`InlineStart`,i=t?`Bottom`:`InlineEnd`;return{start:n(e[`border${r}Width`])+n(e[`padding${r}`]),end:n(e[`border${i}Width`])+n(e[`padding${i}`])}}function GA(e,t){if(t.current!=null&&e.changedTouches){let n=e;for(let e=0;e<n.changedTouches.length;e+=1){let r=n.changedTouches[e];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return null}return{x:e.clientX,y:e.clientY}}var KA,qA,JA=p((()=>{br(),uo(),da(),sn(),N(),il(),Ra(),yS(),Rt(),It(),J(),ae(),OA(),TA(),IA(),zA(),CA(),UA(),KA=2,qA=t.forwardRef(function(e,n){let{render:r,className:i,style:a,...o}=e,{disabled:s,dragging:c,inset:l,lastChangedValueRef:u,lastChangeReasonRef:d,max:f,min:p,minStepsBetweenValues:m,onValueCommitted:h,orientation:g,pressedInputRef:_,pressedThumbCenterOffsetRef:v,pressedThumbIndexRef:y,pressedValuesRef:b,registerFieldControlRef:x,renderBeforeHydration:S,setActive:C,setDragging:w,setValue:T,state:E,step:D,thumbCollisionBehavior:k,thumbRefs:A,values:j}=EA(),M=W(),N=j.length>1,P=g===`vertical`,F=t.useRef(null),I=t.useRef(null),L=O(e=>{e&&I.current==null&&(I.current??=getComputedStyle(e))}),R=t.useRef(null),ee=t.useRef(0),z=t.useRef(0),B=nl(j),V=O(e=>{y.current!==e&&(y.current=e);let t=A.current[e];if(!t){v.current=null,_.current=null;return}_.current=t.querySelector(`input[type="range"]`)}),te=O(e=>{let t=F.current;if(!t)return null;let{width:n,height:r,bottom:i,left:a,right:o}=t.getBoundingClientRect(),s=WA(I.current,P),c=z.current,l=(P?r:n)-s.start-s.end-c*2,u=v.current??0,d=e.x-u,h=e.y-u,g=vS(((P?i-h-s.end:(M===`rtl`?o-d:d-a)-s.start)-c)/l,0,1),_=(f-p)*g+p;if(_=RA(_,D,p),_=vS(_,p,f),!N)return{value:_,thumbIndex:0,didSwap:!1};let x=y.current;if(x<0)return null;let S=HA({behavior:k,values:j,currentValues:B.current??j,initialValues:b.current,pressedIndex:x,nextValue:_,min:p,max:f,step:D,minStepsBetweenValues:m});return k===`swap`&&S.didSwap?V(S.thumbIndex):y.current=S.thumbIndex,S}),ne=O(e=>{b.current=N?j.slice():null,B.current=j;let t=y.current,n=t;if(t>-1&&t<j.length){if(j[t]===f){let e=t;for(;e>0&&j[e-1]===f;)--e;n=e}}else{let t=P?`y`:`x`,r;n=-1;for(let i=0;i<A.current.length;i+=1){let a=A.current[i];if(er(a)){let o=FA(a),s=Math.abs(e[t]-o[t]);(r===void 0||s<=r)&&(n=i,r=s)}}}if(n>-1&&n!==t&&V(n),l){let e=A.current[n];er(e)&&(z.current=e.getBoundingClientRect()[P?`height`:`width`]/2)}}),H=O(e=>{let t=A.current?.[e]?.querySelector(`input[type="range"]`);t&&t.focus({preventScroll:!0,focusVisible:!1})}),re=O(e=>{let t=GA(e,R);if(t==null)return;if(ee.current+=1,e.type===`pointermove`&&e.buttons===0){U(e);return}let n=te(t);n!=null&&SA(n.value,D,m)&&(!c&&ee.current>KA&&w(!0),T(n.value,Y(Dt,e,void 0,{activeThumbIndex:n.thumbIndex})),B.current=Array.isArray(n.value)?n.value:[n.value],n.didSwap&&H(n.thumbIndex))});function U(e){C(-1),w(!1),_.current=null,v.current=null;let t=GA(e,R),n=t==null?null:te(t);if(n!=null){let t=d.current;h(u.current??n.value,Lt(t,e))}`pointerType`in e&&F.current?.hasPointerCapture(e.pointerId)&&F.current?.releasePointerCapture(e.pointerId),y.current=-1,R.current=null,b.current=null,ae()}let ie=O(e=>{if(s)return;let t=e.changedTouches[0];t!=null&&(R.current=t.identifier);let n=GA(e,R);if(n!=null){ne(n);let t=te(n);if(t==null)return;H(t.thumbIndex),T(t.value,Y(mt,e,void 0,{activeThumbIndex:t.thumbIndex})),B.current=Array.isArray(t.value)?t.value:[t.value],t.didSwap&&H(t.thumbIndex)}ee.current=0;let r=ua(F.current);r.addEventListener(`touchmove`,re,{passive:!0}),r.addEventListener(`touchend`,U,{passive:!0})}),ae=O(()=>{let e=ua(F.current);e.removeEventListener(`pointermove`,re),e.removeEventListener(`pointerup`,U),e.removeEventListener(`touchmove`,re),e.removeEventListener(`touchend`,U),b.current=null}),oe=en();return t.useEffect(()=>{let e=F.current;if(!e)return()=>ae();let t=lo(e,`touchstart`,ie,{passive:!0});return()=>{t(),oe.cancel(),ae()}},[ae,ie,F,oe]),t.useEffect(()=>{s&&ae()},[s,ae]),q(`div`,e,{state:E,ref:[n,x,F,L],props:[{"data-base-ui-slider-control":S?``:void 0,onPointerDown(e){let t=F.current,n=ti(e.nativeEvent);if(!t||s||e.defaultPrevented||!er(n)||e.button!==0)return;let r=GA(e,R);if(r!=null){ne(r);let n=te(r);if(n==null)return;ei(A.current[n.thumbIndex],$r(ua(t)))?e.preventDefault():oe.request(()=>{H(n.thumbIndex)}),w(!0),v.current??(T(n.value,Y(mt,e.nativeEvent,void 0,{activeThumbIndex:n.thumbIndex})),B.current=Array.isArray(n.value)?n.value:[n.value],n.didSwap&&H(n.thumbIndex))}e.nativeEvent.pointerId&&t.setPointerCapture(e.nativeEvent.pointerId),ee.current=0;let i=ua(F.current);i.addEventListener(`pointermove`,re,{passive:!0}),i.addEventListener(`pointerup`,U,{once:!0})}},o],stateAttributesMapping:wA})}),process.env.NODE_ENV!==`production`&&(qA.displayName=`SliderControl`)})),YA,XA=p((()=>{J(),OA(),TA(),YA=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=EA();return q(`div`,e,{state:o,ref:t,props:[{style:{position:`relative`}},a],stateAttributesMapping:wA})}),process.env.NODE_ENV!==`production`&&(YA.displayName=`SliderTrack`)}));function ZA(){return we}function QA(){return!1}function $A(){return!0}function ej(){return(0,i.useSyncExternalStore)(ZA,QA,$A)}var tj=p((()=>{Eh()})),nj,rj=p((()=>{nj=function(e){return e.index=`data-index`,e.dragging=`data-dragging`,e.orientation=`data-orientation`,e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.focused=`data-focused`,e}({})})),ij=p((()=>{}));function aj(e,t,n,r){if(!(t<0))return e.length===2?t===0?`${vw(e[t],r,n)} start range`:`${vw(e[t],r,n)} end range`:n?vw(e[t],r,n):void 0}function oj(e,t,n,r,i){let a=n===1?e+t:e-t;return vS(Number(a.toFixed(Math.max(LA(e),LA(t),LA(r)))),r,i)}var sj,cj,lj=p((()=>{N(),I(),ge(),cl(),yS(),Sw(),Xe(),Xt(),tj(),J(),Ow(),co(),En(),ae(),zx(),Ih(),di(),Kh(),IA(),xA(),zA(),OA(),TA(),rj(),ij(),sj=new Set([Wa,Ga,Ka,qa,Ja,`End`,Ya,Xa]),cj=t.forwardRef(function(e,r){let{render:i,children:a,className:o,"aria-describedby":s,"aria-label":c,"aria-labelledby":l,disabled:u=!1,getAriaLabel:d,getAriaValueText:f,id:p,index:m,inputRef:h,onBlur:g,onFocus:_,onKeyDown:v,tabIndex:y,style:b,...x}=e,{nonce:S}=Ix(),C=Yt(p),{active:w,lastUsedThumbIndex:T,controlRef:E,disabled:D,validation:k,formatOptionsRef:A,handleInputChange:j,inset:M,labelId:N,largeStep:P,locale:I,max:L,min:R,minStepsBetweenValues:ee,form:z,name:B,orientation:V,pressedInputRef:te,pressedThumbCenterOffsetRef:ne,pressedThumbIndexRef:H,renderBeforeHydration:re,setActive:U,setIndicatorPosition:ie,state:ae,step:oe,values:G}=EA(),K=W(),se=u||D,ce=G.length>1,le=V===`vertical`,de=K===`rtl`,{setTouched:fe,setFocused:pe,validationMode:me}=Ph(),he=t.useRef(null),ge=t.useRef(null),_e=t.useRef(!1),ve=Yt(),ye=Gh(),be=ce?ve:ye,{ref:xe,index:Se}=wn({metadata:t.useMemo(()=>({inputId:be}),[be])}),Ce=ce?m??Se:0,we=Ce===G.length-1,Te=G[Ce],Ee=Dw(Te,R,L),[De,Oe]=t.useState(),ke=ej(),Ae=T>=0&&T<G.length?T:-1,je=O(()=>{let e=E.current,t=he.current;if(!e||!t)return;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=le?`height`:`width`,a=r[i]-n[i],o=(n[i]/2+a*Ee/100)/r[i]*100,s=Number.isFinite(o)?o:void 0;Oe(s),Ce===0?ie(e=>[s,e[1]]):we&&ie(e=>[e[0],s])});F(()=>{M&&queueMicrotask(je)},[je,M]),F(()=>{M&&je()},[je,M,Ee]),F(()=>{if(!M||typeof ResizeObserver!=`function`)return;let e=E.current,t=he.current;if(!e||!t)return;let n=new ResizeObserver(je);return n.observe(e),n.observe(t),()=>{n.disconnect()}},[E,je,M]);let Me=t.useCallback(()=>{let e=le?`bottom`:`insetInlineStart`,t=le?`left`:`top`,n;return ce?w===Ce?n=2:Ae===Ce&&(n=1):w===Ce&&(n=1),M?{"--position":`${De??0}%`,visibility:re&&ke||De===void 0?`hidden`:void 0,position:`absolute`,[e]:`var(--position)`,[t]:`50%`,translate:`${(le||!de?-1:1)*50}% ${(le?1:-1)*50}%`,zIndex:n}:Number.isFinite(Ee)?{position:`absolute`,[e]:`${Ee}%`,[t]:`50%`,translate:`${(le||!de?-1:1)*50}% ${(le?1:-1)*50}%`,zIndex:n}:ol},[w,Ce,M,ke,De,ce,re,de,Ae,Ee,le]),Ne;V===`vertical`&&(Ne=de?`vertical-rl`:`vertical-lr`);let Fe=typeof d==`function`?d(Ce):c,Ie=Pe({"aria-label":Fe,"aria-labelledby":l??(Fe==null?N:void 0),"aria-describedby":s,"aria-orientation":V,"aria-valuenow":Te,"aria-valuetext":typeof f==`function`?f(vw(Te,I,A.current??void 0),Te,Ce):aj(G,Ce,A.current??void 0,I),disabled:se,form:z,id:be,max:L,min:R,name:B,onChange(e){j(e.currentTarget.valueAsNumber,Ce,e)},onFocus(e){let t=_e.current;_e.current=!1,U(Ce),pe(!0),t&&e.stopPropagation()},onBlur(e){if(_e.current){e.stopPropagation();return}he.current&&(U(-1),fe(!0),pe(!1),me===`onBlur`&&k.commit(bA(Te,Ce,R,L,ce,G)))},onKeyDown(e){if(!sj.has(e.key))return;ro.has(e.key)&&e.stopPropagation();let t=null,n=RA(Te,oe,R);switch(e.key){case Wa:t=oj(n,e.shiftKey?P:oe,1,R,L);break;case qa:t=oj(n,e.shiftKey?P:oe,de?-1:1,R,L);break;case Ga:t=oj(n,e.shiftKey?P:oe,-1,R,L);break;case Ka:t=oj(n,e.shiftKey?P:oe,de?1:-1,R,L);break;case Ya:t=oj(n,P,1,R,L);break;case Xa:t=oj(n,P,-1,R,L);break;case`End`:t=L,ce&&(t=Number.isFinite(G[Ce+1])?G[Ce+1]-oe*ee:L);break;case Ja:t=R,ce&&(t=Number.isFinite(G[Ce-1])?G[Ce-1]+oe*ee:R);break;default:break}if(t!==null){let n=e.currentTarget;li(n)||(_e.current=!0,n.blur(),n.focus({preventScroll:!0,focusVisible:!0})),j(t,Ce,e),e.preventDefault()}},step:oe,style:{...ol,width:`100%`,height:`100%`,writingMode:Ne},tabIndex:y??void 0,type:`range`,value:Te??``},k.getInputValidationProps),Le=ue(ge,k.inputRef,h);return q(`div`,e,{state:ae,ref:[r,xe,he],props:[{[nj.index]:Ce,children:(0,n.jsxs)(t.Fragment,{children:[a,(0,n.jsx)(`input`,{ref:Le,...Ie,suppressHydrationWarning:!0}),M&&ke&&re&&we&&(0,n.jsx)(`script`,{nonce:S,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript?.parentElement;if(!t)return;const e=t.closest("[data-base-ui-slider-control]");if(!e)return;const r=e.querySelector("[data-base-ui-slider-indicator]"),i=e.getBoundingClientRect(),n="vertical"===e.getAttribute("data-orientation")?"height":"width",o=e.querySelectorAll(\'input[type="range"]\'),l=o.length>1,s=o.length-1;let a=null,u=null;for(let t=0;t<o.length;t+=1){const e=o[t],y=parseFloat(e.getAttribute("value")??"");if(Number.isNaN(y))return;const c=e.parentElement;if(!c)return;const p=parseFloat(e.getAttribute("max")??"100"),g=parseFloat(e.getAttribute("min")??"0"),b=c?.getBoundingClientRect(),d=i[n]-b[n],m=100*(y-g)/(p-g),v=(b[n]/2+d*m/100)/i[n]*100;c.style.setProperty("--position",`${v}%`),Number.isFinite(v)&&(c.style.removeProperty("visibility"),r&&(0===t?(a=v,r.style.setProperty("--start-position",`${v}%`),l||r.style.removeProperty("visibility")):t===s&&(u=v-(a??0),r.style.setProperty("--end-position",`${v}%`),r.style.setProperty("--relative-size",`${u}%`),r.style.removeProperty("visibility"))))}}();'},suppressHydrationWarning:!0})]}),id:C,onBlur:g,onFocus:_,onPointerDown(e){if(H.current=Ce,he.current!=null){let t=V===`horizontal`?`x`:`y`,n=FA(he.current);ne.current=(V===`horizontal`?e.clientX:e.clientY)-n[t]}ge.current!=null&&te.current!==ge.current&&(te.current=ge.current)},style:Me(),suppressHydrationWarning:re||void 0},x],stateAttributesMapping:wA})}),process.env.NODE_ENV!==`production`&&(cj.displayName=`SliderThumb`)}));function uj(e,t,n,r,i,a){let o=n===void 0||t&&r===void 0?`hidden`:void 0,s=e?`bottom`:`insetInlineStart`,c=e?`height`:`width`,l={visibility:i&&a?`hidden`:o,position:e?`absolute`:`relative`,[e?`width`:`height`]:`inherit`};return l[`--start-position`]=`${n??0}%`,t?(l[`--relative-size`]=`${(r??0)-(n??0)}%`,l[s]=`var(--start-position)`,l[c]=`var(--relative-size)`,l):(l[s]=0,l[c]=`var(--start-position)`,l)}function dj(e,t,n,r){let i=e?`bottom`:`insetInlineStart`,a=e?`height`:`width`,o={position:e?`absolute`:`relative`,[e?`width`:`height`]:`inherit`};if(!t)return o[i]=0,o[a]=`${n}%`,o;let s=r-n;return o[i]=`${n}%`,o[a]=`${s}%`,o}var fj,pj=p((()=>{Ow(),tj(),J(),OA(),TA(),fj=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{indicatorPosition:o,inset:s,max:c,min:l,orientation:u,renderBeforeHydration:d,state:f,values:p}=EA(),m=ej(),h=u===`vertical`,g=p.length>1,_=s?uj(h,g,o[0],o[1],d,m):dj(h,g,Dw(p[0],l,c),Dw(p[p.length-1],l,c));return q(`div`,e,{state:f,ref:t,props:[{"data-base-ui-slider-indicator":d?``:void 0,style:_,suppressHydrationWarning:d||void 0},a],stateAttributesMapping:wA})}),process.env.NODE_ENV!==`production`&&(fj.displayName=`SliderIndicator`)})),mj=p((()=>{MA(),br(),da(),N(),Ra(),my(),Wh(),J(),OA(),TA(),PA(),JA(),XA(),lj(),pj()})),hj=p((()=>{mj()}));function gj(){let e=t.useContext(_j);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(63):`Base UI: SwitchRootContext is missing. Switch parts must be placed within <Switch.Root>.`);return e}var _j,vj=p((()=>{K(),_j=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(_j.displayName=`SwitchRootContext`)})),yj,bj=p((()=>{yj=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}({})})),xj,Sj=p((()=>{Nh(),bj(),xj={...Mh,checked(e){return e?{[yj.checked]:``}:{[yj.unchecked]:``}}}})),Cj,wj=p((()=>{w(),N(),ge(),I(),cl(),De(),J(),Xe(),Xt(),Ar(),vj(),Sj(),Ih(),Rh(),Vh(),Wh(),Av(),Kh(),Rt(),It(),Kp(),Cj=t.forwardRef(function(e,r){let{checked:i,className:a,defaultChecked:o,"aria-labelledby":s,form:c,id:l,inputRef:u,name:d,nativeButton:f=!1,onCheckedChange:p,readOnly:m=!1,required:h=!1,disabled:g=!1,render:_,uncheckedValue:v,value:y,style:b,...x}=e,{clearErrors:C}=zh(),{state:w,setTouched:T,setDirty:E,validityData:D,setFilled:k,setFocused:A,shouldValidateOnChange:j,validationMode:M,disabled:N,name:P,validation:I}=Ph(),{labelId:L}=Hh(),R=N||g,ee=P??d,z=O(p),B=t.useRef(null),V=ue(B,u,I.inputRef),te=t.useRef(null),ne=Yt(),H=Gh({id:l,implicit:!1,controlRef:te}),re=f?void 0:H,[U,W]=S({controlled:i,default:!!o,name:`Switch`,state:`checked`});Lh(te,{id:ne,value:U}),F(()=>{B.current&&k(B.current.checked)},[B,k]),Gp(U,()=>{C(ee),E(U!==D.initialValue),k(U),j()?I.commit(U):I.commit(U,!0)});let{getButtonProps:ie,buttonRef:ae}=Er({disabled:R,native:f}),oe=Dv(s,L,B,!f,re),G={id:f?H:ne,role:`switch`,"aria-checked":U,"aria-readonly":m||void 0,"aria-required":h||void 0,"aria-labelledby":oe,onFocus(){R||A(!0)},onBlur(){let e=B.current;!e||R||(T(!0),A(!1),M===`onBlur`&&I.commit(e.checked))},onClick(e){m||R||(e.preventDefault(),B.current?.dispatchEvent(new PointerEvent(`click`,{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey})))}},K=t.useMemo(()=>Pe({checked:U,disabled:R,form:c,id:re,name:ee,required:h,style:ee?sl:ol,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,ref:V,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(m){e.preventDefault();return}let t=e.currentTarget.checked,n=Y(at,e.nativeEvent);z?.(t,n),!n.isCanceled&&W(t)},onFocus(){te.current?.focus()}},I.getInputValidationProps,y===void 0?Ee:{value:y}),[U,R,c,V,re,ee,z,m,h,W,I,y]),se=t.useMemo(()=>({...w,checked:U,disabled:R,readOnly:m,required:h}),[w,U,R,m,h]),ce=q(`span`,e,{state:se,ref:[r,te,ae],props:[G,I.getValidationProps,x,ie],stateAttributesMapping:xj});return(0,n.jsxs)(_j.Provider,{value:se,children:[ce,!U&&ee&&v!==void 0&&(0,n.jsx)(`input`,{type:`hidden`,form:c,name:ee,value:v}),(0,n.jsx)(`input`,{...K,suppressHydrationWarning:!0})]})}),process.env.NODE_ENV!==`production`&&(Cj.displayName=`SwitchRoot`)})),Tj,Ej=p((()=>{vj(),J(),Ih(),Sj(),Tj=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=Ph(),s=gj();return q(`span`,e,{state:{...o,...s},ref:t,stateAttributesMapping:xj,props:a})}),process.env.NODE_ENV!==`production`&&(Tj.displayName=`SwitchThumb`)})),Dj=p((()=>{wj(),Ej()})),Oj=p((()=>{Dj()}));function kj(){let e=t.useContext(Aj);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(64):`Base UI: TabsRootContext is missing. Tabs parts must be placed within <Tabs.Root>.`);return e}var Aj,jj=p((()=>{K(),Aj=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Aj.displayName=`TabsRootContext`)})),Mj,Nj=p((()=>{Mj=function(e){return e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e}({})})),Pj,Fj=p((()=>{Nj(),Pj={tabActivationDirection:e=>({[Mj.activationDirection]:e})}}));function Ij(e,t,n,r){if(e==null||t==null)return`none`;let i=null,a=null;for(let[n,o]of r.entries()){if(o==null)continue;let r=o.value??o.index;if(e===r&&(i=n),t===r&&(a=n),i!=null&&a!=null)break}if(i==null||a==null)return i!==a&&(typeof e==`number`||typeof e==`string`)&&typeof e==typeof t?n===`horizontal`?t>e?`right`:`left`:t>e?`down`:`up`:`none`;let o=i.getBoundingClientRect(),s=a.getBoundingClientRect();if(n===`horizontal`){if(s.left<o.left)return`left`;if(s.left>o.left)return`right`}else{if(s.top<o.top)return`up`;if(s.top>o.top)return`down`}return`none`}var Lj,Rj=p((()=>{w(),I(),N(),J(),U(),jj(),Fj(),Lj=t.forwardRef(function(e,r){let{className:i,defaultValue:a=0,onValueChange:o,orientation:s=`horizontal`,render:c,value:l,style:u,...d}=e,f=Object.hasOwn(e,`defaultValue`),p=t.useRef([]),[m,h]=t.useState(()=>new Map),[g,_]=S({controlled:l,default:a,name:`Tabs`,state:`value`}),v=l!==void 0,[y,b]=t.useState(()=>new Map),x=t.useCallback(e=>{if(e===void 0)return null;for(let[t,n]of y.entries())if(n!=null&&e===(n.value??n.index))return t;return null},[y]),[C,w]=t.useState(()=>({previousValue:g,tabActivationDirection:`none`})),{previousValue:T,tabActivationDirection:E}=C,D=E,k=!1;T!==g&&(D=Ij(T,g,s,y),k=T!=null&&g!=null&&x(g)==null);let A=k?T:g,j=T!==A||E!==D;F(()=>{j&&w({previousValue:A,tabActivationDirection:D})},[A,j,D]);let M=O((e,t)=>{t.activationDirection=Ij(g,e,s,y),o?.(e,t),!t.isCanceled&&_(e)}),N=O((e,t)=>{h(n=>{if(n.get(e)===t)return n;let r=new Map(n);return r.set(e,t),r})}),P=O((e,t)=>{h(n=>{if(!n.has(e)||n.get(e)!==t)return n;let r=new Map(n);return r.delete(e),r})}),I=t.useCallback(e=>m.get(e),[m]),L=t.useCallback(e=>{for(let t of y.values())if(e===t?.value)return t?.id},[y]),R=t.useMemo(()=>({getTabElementBySelectedValue:x,getTabIdByPanelValue:L,getTabPanelIdByValue:I,onValueChange:M,orientation:s,registerMountedTabPanel:N,setTabMap:b,unregisterMountedTabPanel:P,tabActivationDirection:D,value:g}),[x,L,I,M,s,N,b,P,D,g]),ee=t.useMemo(()=>{for(let e of y.values())if(e!=null&&e.value===g)return e},[y,g]),z=t.useMemo(()=>{for(let e of y.values())if(e!=null&&!e.disabled)return e.value},[y]);F(()=>{if(v||y.size===0)return;let e=ee?.disabled;if(f&&e&&g===a||!e&&!(ee==null&&g!==null))return;let t=z??null;g!==t&&(_(t),w(e=>e.tabActivationDirection===`none`?e:{...e,tabActivationDirection:`none`}))},[a,z,f,v,ee,_,y,g]);let B=q(`div`,e,{state:{orientation:s,tabActivationDirection:D},ref:r,props:d,stateAttributesMapping:Pj});return(0,n.jsx)(Aj.Provider,{value:R,children:(0,n.jsx)(te,{elementsRef:p,children:B})})}),process.env.NODE_ENV!==`production`&&(Lj.displayName=`TabsRoot`)}));function zj(){let e=t.useContext(Bj);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(65):`Base UI: TabsListContext is missing. TabsList parts must be placed within <Tabs.List>.`);return e}var Bj,Vj=p((()=>{K(),Bj=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Bj.displayName=`TabsListContext`)})),Hj,Uj=p((()=>{da(),I(),Xt(),J(),Ar(),ow(),Qb(),jj(),Vj(),Rt(),It(),Ra(),Hj=t.forwardRef(function(e,n){let{className:r,disabled:i=!1,render:a,value:o,id:s,nativeButton:c=!0,style:l,...u}=e,{value:d,getTabPanelIdByValue:f,orientation:p}=kj(),{activateOnFocus:m,highlightedTabIndex:h,onTabActivation:g,registerTabResizeObserverElement:_,setHighlightedTabIndex:v,tabsListElement:y}=zj(),b=Yt(s),{compositeProps:x,compositeRef:S,index:C}=Zb({metadata:t.useMemo(()=>({disabled:i,id:b,value:o}),[i,b,o])}),w=o===d,T=t.useRef(!1),E=t.useRef(null);t.useEffect(()=>{let e=E.current;if(e)return _(e)},[_]),F(()=>{if(T.current){T.current=!1;return}if(!(w&&C>-1&&h!==C))return;let e=y;if(e!=null){let t=$r(ua(e));if(t&&ei(e,t))return}i||v(C)},[w,C,h,v,i,y]);let{getButtonProps:D,buttonRef:O}=Er({disabled:i,native:c,focusableWhenDisabled:!0}),k=f(o),A=t.useRef(!1),j=t.useRef(!1);function M(e){w||i||g(o,Y(at,e.nativeEvent,void 0,{activationDirection:`none`}))}function N(e){w||(C>-1&&!i&&v(C),!i&&m&&(!A.current||A.current&&j.current)&&g(o,Y(at,e.nativeEvent,void 0,{activationDirection:`none`})))}function P(e){if(w||i)return;A.current=!0;function t(){A.current=!1,j.current=!1}(!e.button||e.button===0)&&(j.current=!0,ua(e.currentTarget).addEventListener(`pointerup`,t,{once:!0}))}return q(`button`,e,{state:{disabled:i,active:w,orientation:p},ref:[n,O,S,E],props:[x,{role:`tab`,"aria-controls":k,"aria-selected":w,id:b,onClick:M,onFocus:N,onPointerDown:P,[aw]:w?``:void 0,onKeyDownCapture(){T.current=!0}},u,D]})}),process.env.NODE_ENV!==`production`&&(Hj.displayName=`TabsTab`)})),Wj=p((()=>{})),Gj,Kj=p((()=>{Gj=function(e){return e.activeTabLeft=`--active-tab-left`,e.activeTabRight=`--active-tab-right`,e.activeTabTop=`--active-tab-top`,e.activeTabBottom=`--active-tab-bottom`,e.activeTabWidth=`--active-tab-width`,e.activeTabHeight=`--active-tab-height`,e}({})})),qj,Jj,Yj=p((()=>{Af(),J(),hx(),tj(),jj(),Fj(),Vj(),Wj(),Kj(),zx(),qj={...Pj,activeTabPosition:()=>null,activeTabSize:()=>null},Jj=t.forwardRef(function(e,r){let{className:i,render:a,renderBeforeHydration:o=!1,style:s,...c}=e,{nonce:l}=Ix(),{getTabElementBySelectedValue:u,orientation:d,tabActivationDirection:f,value:p}=kj(),{tabsListElement:m,registerIndicatorUpdateListener:h}=zj(),g=ej(),_=kf();t.useEffect(()=>h(_),[h,_]);let v=0,y=0,b=0,x=0,S=0,C=0,w=!1;if(p!=null&&m!=null){let e=u(p);if(w=!0,e!=null){let{width:t,height:n}=mx(e),{width:r,height:i}=mx(m),a=e.getBoundingClientRect(),o=m.getBoundingClientRect(),s=r>0?o.width/r:1,c=i>0?o.height/i:1;if(Math.abs(s)>2**-52&&Math.abs(c)>2**-52){let e=a.left-o.left,t=a.top-o.top;v=e/s+m.scrollLeft-m.clientLeft,b=t/c+m.scrollTop-m.clientTop}else v=e.offsetLeft,b=e.offsetTop;S=t,C=n,y=m.scrollWidth-v-S,x=m.scrollHeight-b-C}}let T=t.useMemo(()=>w?{left:v,right:y,top:b,bottom:x}:null,[v,y,b,x,w]),E=t.useMemo(()=>w?{width:S,height:C}:null,[S,C,w]),D=t.useMemo(()=>{if(w)return{[Gj.activeTabLeft]:`${v}px`,[Gj.activeTabRight]:`${y}px`,[Gj.activeTabTop]:`${b}px`,[Gj.activeTabBottom]:`${x}px`,[Gj.activeTabWidth]:`${S}px`,[Gj.activeTabHeight]:`${C}px`}},[v,y,b,x,S,C,w]),O=q(`span`,e,{state:{orientation:d,activeTabPosition:T,activeTabSize:E,tabActivationDirection:f},ref:r,props:[{role:`presentation`,style:D,hidden:!(w&&S>0&&C>0)},c,{suppressHydrationWarning:!0}],stateAttributesMapping:qj});return p==null?null:(0,n.jsxs)(t.Fragment,{children:[O,g&&o&&(0,n.jsx)(`script`,{nonce:l,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();'},suppressHydrationWarning:!0})]})}),process.env.NODE_ENV!==`production`&&(Jj.displayName=`TabsIndicator`)})),Xj,Zj=p((()=>{mn(),Xj=function(e){return e.index=`data-index`,e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e.hidden=`data-hidden`,e[e.startingStyle=un.startingStyle]=`startingStyle`,e[e.endingStyle=un.endingStyle]=`endingStyle`,e}({})})),Qj,$j,eM=p((()=>{Rm(),I(),Xt(),mn(),yo(),vn(),J(),En(),Fj(),jj(),Zj(),Qj={...Pj,...pn},$j=t.forwardRef(function(e,n){let{className:r,value:i,render:a,keepMounted:o=!1,style:s,...c}=e,{value:l,getTabIdByPanelValue:u,orientation:d,tabActivationDirection:f,registerMountedTabPanel:p,unregisterMountedTabPanel:m}=kj(),h=Yt(),{ref:g,index:_}=wn({metadata:t.useMemo(()=>({id:h,value:i}),[h,i])}),v=i===l,{mounted:y,transitionStatus:b,setMounted:x}=_n(v),S=!y,C=u(i),w={hidden:S,orientation:d,tabActivationDirection:f,transitionStatus:b},T=t.useRef(null),E=q(`div`,e,{state:w,ref:[n,g,T],props:[{"aria-labelledby":C,hidden:S,id:h,role:`tabpanel`,tabIndex:v?0:-1,inert:Lm(!v),[Xj.index]:_},c],stateAttributesMapping:Qj});return vo({open:v,ref:T,onComplete(){v||x(!1)}}),F(()=>{if(!(S&&!o)&&h!=null)return p(i,h),()=>{m(i,h)}},[S,o,i,h,p,m]),o||y?E:null}),process.env.NODE_ENV!==`production`&&($j.displayName=`TabsPanel`)})),tM,nM=p((()=>{N(),De(),fw(),Fj(),jj(),Vj(),tM=t.forwardRef(function(e,r){let{activateOnFocus:i=!1,className:a,loopFocus:o=!0,render:s,style:c,...l}=e,{onValueChange:u,orientation:d,value:f,setTabMap:p,tabActivationDirection:m}=kj(),[h,g]=t.useState(0),[_,v]=t.useState(null),y=t.useRef(new Set),b=t.useRef(new Set),x=t.useRef(null),S=O(()=>{y.current.forEach(e=>{e()})});t.useEffect(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{y.current.size&&S()});return x.current=e,_&&e.observe(_),b.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),x.current=null}},[_,S]);let C=O(e=>(y.current.add(e),()=>{y.current.delete(e)})),w=O(e=>(b.current.add(e),x.current?.observe(e),()=>{b.current.delete(e),x.current?.unobserve(e)})),T=O((e,t)=>{e!==f&&u(e,t)}),E={orientation:d,tabActivationDirection:m},D={"aria-orientation":d===`vertical`?`vertical`:void 0,role:`tablist`},k=t.useMemo(()=>({activateOnFocus:i,highlightedTabIndex:h,registerIndicatorUpdateListener:C,registerTabResizeObserverElement:w,onTabActivation:T,setHighlightedTabIndex:g,tabsListElement:_}),[i,h,C,w,T,g,_]);return(0,n.jsx)(Bj.Provider,{value:k,children:(0,n.jsx)(dw,{render:s,className:a,style:c,state:E,refs:[r,v],props:[D,l],stateAttributesMapping:Pj,highlightedIndex:h,enableHomeAndEndKeys:!0,loopFocus:o,orientation:d,onHighlightedIndexChange:g,onMapChange:p,disabledIndices:Te})})}),process.env.NODE_ENV!==`production`&&(tM.displayName=`TabsList`)})),rM=p((()=>{Rj(),Uj(),Yj(),eM(),nM()})),iM=p((()=>{rM()}));function aM(){let e=t.useContext(oM);if(!e)throw Error(process.env.NODE_ENV===`production`?G(73):`Base UI: useToastManager must be used within <Toast.Provider>.`);return e}var oM,sM=p((()=>{K(),oM=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(oM.displayName=`ToastContext`)}));function cM(e){return lM+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${lM}`}var lM,uM=p((()=>{lM=0}));function dM(e,t){if(typeof e==`string`)return{description:e};if(typeof e==`function`){let n=e(t);return typeof n==`string`?{description:n}:n}return e}var fM=p((()=>{})),pM=p((()=>{Ra()})),mM,hM,gM,_M=p((()=>{Mf(),uM(),da(),Nc(),fM(),Ra(),pM(),mM=uf(e=>e.toasts,e=>{let t=new Map,n=0,r=0;return e.forEach((e,i)=>{let a=e.transitionStatus===`ending`;t.set(e.id,{value:e,domIndex:i,visibleIndex:a?-1:n,offsetY:r}),r+=e.height||0,a||(n+=1)}),t}),hM={toasts:Q(e=>e.toasts),isEmpty:Q(e=>e.toasts.length===0),toast:Q(mM,(e,t)=>e.get(t)?.value),toastIndex:Q(mM,(e,t)=>e.get(t)?.domIndex??-1),toastOffsetY:Q(mM,(e,t)=>e.get(t)?.offsetY??0),toastVisibleIndex:Q(mM,(e,t)=>e.get(t)?.visibleIndex??-1),hovering:Q(e=>e.hovering),focused:Q(e=>e.focused),expanded:Q(e=>e.hovering||e.focused),expandedOrOutOfFocus:Q(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:Q(e=>e.prevFocusElement)},gM=class extends Df{timers=new Map;areTimersPaused=!1;constructor(e){super(e,{},hM)}setFocused(e){this.set(`focused`,e)}setHovering(e){this.set(`hovering`,e)}setIsWindowFocused(e){this.set(`isWindowFocused`,e)}setPrevFocusElement(e){this.set(`prevFocusElement`,e)}setViewport=e=>{this.set(`viewport`,e)};disposeEffect=()=>()=>{this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear()};removeToast(e,t={}){let n=hM.toastIndex(this.state,e);if(n===-1)return;let r=this.state.toasts[n];t.skipOnRemove||r?.onRemove?.();let i=[...this.state.toasts];i.splice(n,1),this.setToasts(i)}addToast=e=>{let{timeout:t,limit:n}=this.state,r=e.id||cM(`toast`);if(e.id){let t=hM.toast(this.state,e.id);if(t)if(t.transitionStatus===`ending`)this.removeToast(e.id,{skipOnRemove:!0});else{let{id:t,transitionStatus:n,...r}=e;return this.updateToastInternal(e.id,r,{resetTimer:!0,markUpdated:!0}),e.id}}let i={...e,id:r,updateKey:0,transitionStatus:`starting`},a=[i,...this.state.toasts],o=a.filter(e=>e.transitionStatus!==`ending`);if(o.length>n){let e=o.length-n,t=o.slice(-e),r=new Set(t.map(e=>e.id));this.setToasts(a.map(e=>{let t=r.has(e.id);return e.limited===t?e:{...e,limited:t}}))}else this.setToasts(a.map(e=>e.limited?{...e,limited:!1}:e));let s=i.timeout??t;return i.type!==`loading`&&s>0&&this.scheduleTimer(r,s,()=>this.closeToast(r)),hM.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),r};updateToast=(e,t)=>{this.updateToastInternal(e,t,{markUpdated:!0})};updateToastInternal=(e,t,n={})=>{let{timeout:r,toasts:i}=this.state,a=hM.toast(this.state,e)??null;if(!a||a.transitionStatus===`ending`)return;let o={...a,...t,...n.markUpdated&&{updateKey:(a.updateKey??0)+1}};this.setToasts(i.map(t=>t.id===e?o:t));let s=o.timeout??r,c=a?.timeout??r,l=Object.hasOwn(t,`timeout`),u=o.transitionStatus!==`ending`&&o.type!==`loading`&&s>0,d=this.timers.has(e),f=c!==s,p=a?.type===`loading`;if(!u&&d){this.timers.get(e)?.timeout?.clear(),this.timers.delete(e);return}if(u&&(!d||f||l||p||n.resetTimer)){let t=this.timers.get(e);t&&(t.timeout?.clear(),this.timers.delete(e)),this.scheduleTimer(e,s,()=>this.closeToast(e)),hM.expandedOrOutOfFocus(this.state)&&this.pauseTimers()}};closeToast=e=>{let t=e===void 0,{limit:n,toasts:r}=this.state,i;if(t)i=r,this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear();else{let t=hM.toast(this.state,e);if(!t)return;i=[t];let n=this.timers.get(e);n?.timeout&&(n.timeout.clear(),this.timers.delete(e))}let a=0,o={toasts:r.map(r=>{if(t||r.id===e)return{...r,transitionStatus:`ending`,height:0};if(r.transitionStatus===`ending`)return r;let i=a>=n;return a+=1,r.limited===i?r:{...r,limited:i}})};(t||r.length===1)&&(o.hovering=!1,o.focused=!1),this.update(o),i.forEach(e=>{e.transitionStatus!==`ending`&&e.onClose?.()}),this.handleFocusManagement(e)};promiseToast=(e,t)=>{let n=dM(t.loading),r=this.addToast({...n,type:`loading`}),i=e.then(e=>{let n=dM(t.success,e);return this.updateToast(r,{...n,type:`success`,timeout:n.timeout}),e}).catch(e=>{let n=dM(t.error,e);return this.updateToast(r,{...n,type:`error`,timeout:n.timeout}),Promise.reject(e)});return{}.hasOwnProperty.call(t,`setPromise`)&&t.setPromise(i),i};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(e=>{if(e.timeout){e.timeout.clear();let t=Date.now()-e.start,n=e.delay-t;e.remaining=n>0?n:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((e,t)=>{e.remaining=e.remaining>0?e.remaining:e.delay,e.timeout??=Mc.create(),e.timeout.start(e.remaining,()=>{this.timers.delete(t),e.callback()}),e.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=e=>{if(e.pointerType!==`touch`)return;let t=ti(e);ei(this.state.viewport,t)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(e,t,n){let r=Date.now(),i=!hM.expandedOrOutOfFocus(this.state),a=i?Mc.create():void 0;a?.start(t,()=>{this.timers.delete(e),n()}),this.timers.set(e,{timeout:a,start:i?r:0,delay:t,remaining:t,callback:n})}setToasts(e){let t={toasts:e};e.length===0&&(t.hovering=!1,t.focused=!1),this.update(t)}handleFocusManagement(e){let t=$r(ua(this.state.viewport));if(!this.state.viewport||!ei(this.state.viewport,t)||!li(t))return;if(e===void 0){this.restoreFocusToPrevElement();return}let n=hM.toasts(this.state),r=hM.toastIndex(this.state,e),i=null,a=r+1;for(;a<n.length;){if(n[a].transitionStatus!==`ending`){i=n[a];break}a+=1}if(!i)for(a=r-1;a>=0;){if(n[a].transitionStatus!==`ending`){i=n[a];break}--a}i?i.ref?.current?.focus():this.restoreFocusToPrevElement()}}})),vM,yM=p((()=>{$t(),D(),sM(),_M(),vM=function(e){let{children:r,timeout:i=5e3,limit:a=3,toastManager:o}=e,s=T(()=>new gM({timeout:i,limit:a,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return Zt(s.disposeEffect),t.useEffect(function(){if(o)return o[` subscribe`](({action:e,options:t})=>{let n=t.id;e===`promise`&&t.promise?s.promiseToast(t.promise,t):e===`update`&&n?s.updateToast(n,t):e===`close`?s.closeToast(n):s.addToast(t)})},[s,i,o]),s.useSyncedValues({timeout:i,limit:a}),(0,n.jsx)(oM.Provider,{value:s,children:r})},process.env.NODE_ENV!==`production`&&(vM.displayName=`ToastProvider`)})),bM,xM=p((()=>{bM=function(e){return e.frontmostHeight=`--toast-frontmost-height`,e}({})})),SM,CM=p((()=>{uo(),tl(),da(),cl(),Nc(),Ra(),ul(),sM(),J(),pM(),xM(),SM=t.forwardRef(function(e,r){let{render:i,className:a,style:o,children:s,...c}=e,l=aM(),u=Ac(),d=t.useRef(!1),f=t.useRef(!1),p=t.useRef(!1),m=l.useState(`isEmpty`),h=l.useState(`toasts`),g=l.useState(`focused`),_=l.useState(`expanded`),v=l.useState(`prevFocusElement`),y=h[0]?.height??0,b=t.useMemo(()=>h.some(e=>e.transitionStatus===`ending`),[h]);t.useEffect(()=>{let e=l.state.viewport;if(!e)return;function t(t){m||t.key===`F6`&&ti(t)!==e&&(t.preventDefault(),l.setPrevFocusElement($r(ua(e))),e?.focus({preventScroll:!0}),l.pauseTimers(),l.setFocused(!0))}return lo(Zn(e),`keydown`,t)},[l,m]),t.useEffect(()=>{let e=l.state.viewport;if(!e||m)return;let t=Zn(e);function n(e){ti(e)===t&&(l.setIsWindowFocused(!1),l.pauseTimers())}function r(n){if(n.relatedTarget)return;let r=ti(n),i=$r(ua(e));(r===t||!ei(e,r)||!li(i))&&l.resumeTimers(),u.start(0,()=>l.setIsWindowFocused(!0))}return el(lo(t,`blur`,n,!0),lo(t,`focus`,r,!0))},[l,u,m]),t.useEffect(()=>{let e=l.state.viewport;if(!(!e||m))return lo(ua(e),`pointerdown`,l.handleDocumentPointerDown,!0)},[m,l]);function x(e){let t=l.state.viewport;t&&(d.current=!0,e.relatedTarget===t?h[0]?.ref?.current?.focus():l.restoreFocusToPrevElement())}function S(e){e.key===`Tab`&&e.shiftKey&&ti(e.nativeEvent)===l.state.viewport&&(e.preventDefault(),l.restoreFocusToPrevElement(),l.resumeTimers())}function C(){let e=l.state.toasts.some(e=>e.transitionStatus===`ending`);!l.state.isWindowFocused||e||p.current||!f.current||(l.resumeTimers(),l.setHovering(!1),f.current=!1)}t.useEffect(C,[b,l]);function w(){l.pauseTimers(),l.setHovering(!0),f.current=!1}function T(){b||p.current?f.current=!0:(l.resumeTimers(),l.setHovering(!1))}function E(e){e.pointerType===`touch`&&(p.current=!0)}function D(e){e.pointerType===`touch`&&(p.current=!1,C())}function O(){if(d.current){d.current=!1;return}g||li($r(ua(l.state.viewport)))&&(l.setFocused(!0),l.pauseTimers())}function k(e){!g||ei(l.state.viewport,e.relatedTarget)||(l.setFocused(!1),l.resumeTimers())}let A={tabIndex:-1,role:`region`,"aria-live":`polite`,"aria-atomic":!1,"aria-relevant":`additions text`,"aria-label":`Notifications`,onMouseEnter:w,onMouseMove:w,onMouseLeave:T,onFocus:O,onBlur:k,onKeyDown:S,onClick:O,onPointerDown:E,onPointerUp:D,onPointerCancel:D},j={expanded:_},M=q(`div`,e,{ref:[r,l.setViewport],state:j,props:[A,{style:{[bM.frontmostHeight]:y?`${y}px`:void 0}},c,{children:(0,n.jsxs)(t.Fragment,{children:[!m&&v&&(0,n.jsx)(ll,{onFocus:x}),s,!m&&v&&(0,n.jsx)(ll,{onFocus:x})]})}]}),N=t.useMemo(()=>h.filter(e=>e.priority===`high`),[h]);return(0,n.jsxs)(t.Fragment,{children:[!m&&v&&(0,n.jsx)(ll,{onFocus:x}),M,!g&&N.length>0&&(0,n.jsx)(`div`,{style:ol,children:N.map(e=>(0,n.jsxs)(`div`,{role:`alert`,"aria-atomic":!0,children:[(0,n.jsx)(`div`,{children:e.title}),(0,n.jsx)(`div`,{children:e.description})]},e.id))})]})}),process.env.NODE_ENV!==`production`&&(SM.displayName=`ToastViewport`)}));function wM(){let e=t.useContext(TM);if(!e)throw Error(process.env.NODE_ENV===`production`?G(66):`Base UI: ToastRootContext is missing. Toast parts must be used within <Toast.Root>.`);return e}var TM,EM=p((()=>{K(),TM=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(TM.displayName=`ToastRootContext`)})),DM,OM=p((()=>{DM=function(e){return e.index=`--toast-index`,e.offsetY=`--toast-offset-y`,e.height=`--toast-height`,e.swipeMovementX=`--toast-swipe-movement-x`,e.swipeMovementY=`--toast-swipe-movement-y`,e}({})}));function kM(e,t,n){switch(e){case`up`:return-n;case`down`:return n;case`left`:return-t;case`right`:return t;default:return 0}}function AM(e){let t=Zn(e).getComputedStyle(e).transform,n=0,r=0,i=1;if(t&&t!==`none`){let e=t.match(/matrix(?:3d)?\(([^)]+)\)/);if(e){let t=e[1].split(`, `).map(parseFloat);t.length===6?(n=t[4],r=t[5],i=Math.sqrt(t[0]*t[0]+t[1]*t[1])):t.length===16&&(n=t[12],r=t[13],i=t[0])}}return{x:n,y:r,scale:i}}var jM,MM,NM,PM,FM,IM,LM,RM=p((()=>{uo(),da(),Rm(),I(),N(),Ra(),EM(),mn(),sM(),J(),yo(),OM(),Rl(),jM={...pn,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},MM=40,NM=10,PM=.5,FM=1,IM=`${Nl},${Pl}`,LM=t.forwardRef(function(e,i){let{toast:a,render:o,className:s,swipeDirection:c=[`down`,`right`],style:l,...u}=e,d=a.positionerProps?.anchor!==void 0,f=[];d||(f=Array.isArray(c)?c:[c]);let p=f.length>0,m=aM(),[h,g]=t.useState(void 0),[_,v]=t.useState(!1),[y,b]=t.useState(!1),[x,S]=t.useState(!1),[C,w]=t.useState({x:0,y:0}),[T,E]=t.useState({x:0,y:0,scale:1}),[D,k]=t.useState(),[A,j]=t.useState(),[M,N]=t.useState(null),P=t.useRef(null),I=t.useRef({x:0,y:0}),L=t.useRef({x:0,y:0,scale:1}),R=t.useRef(void 0),ee=t.useRef(0),z=t.useRef(!1),B=t.useRef({x:0,y:0}),V=t.useRef(!1),te=m.useState(`toastIndex`,a.id),ne=m.useState(`toastVisibleIndex`,a.id),H=m.useState(`toastOffsetY`,a.id),re=m.useState(`focused`),U=m.useState(`expanded`);vo({open:a.transitionStatus!==`ending`,ref:P,onComplete(){a.transitionStatus===`ending`&&m.removeToast(a.id)}});let W=O((e=!1)=>{let t=P.current;if(!t)return;let n=t.style.height;t.style.height=`auto`;let i=t.offsetHeight;t.style.height=n;function o(){m.updateToastInternal(a.id,{ref:P,height:i,...a.transitionStatus===`starting`?{transitionStatus:void 0}:{}})}e?r.flushSync(o):o()});F(W,[W]);function ie(e,t){let n=e,r=t;return!f.includes(`left`)&&!f.includes(`right`)?n=e>0?e**PM:-(Math.abs(e)**PM):(!f.includes(`right`)&&e>0&&(n=e**PM),!f.includes(`left`)&&e<0&&(n=-(Math.abs(e)**PM))),!f.includes(`up`)&&!f.includes(`down`)?r=t>0?t**PM:-(Math.abs(t)**PM):(!f.includes(`down`)&&t>0&&(r=t**PM),!f.includes(`up`)&&t<0&&(r=-(Math.abs(t)**PM))),{x:n,y:r}}function ae(e){if(e.button!==0)return;e.pointerType===`touch`&&m.pauseTimers();let t=ti(e.nativeEvent);if(!(t&&t.closest(`button,a,input,textarea,[role="button"],${IM}`))){if(z.current=!1,R.current=void 0,ee.current=0,I.current={x:e.clientX,y:e.clientY},B.current=I.current,P.current){let e=AM(P.current);L.current=e,E(e),w({x:e.x,y:e.y})}m.setHovering(!0),v(!0),b(!1),N(null),V.current=!0,P.current?.setPointerCapture(e.pointerId)}}function oe(e){if(!_)return;e.preventDefault(),V.current&&=(I.current={x:e.clientX,y:e.clientY},!1);let{clientY:t,clientX:n,movementX:r,movementY:i}=e;(i<0&&t>B.current.y||i>0&&t<B.current.y)&&(B.current={x:B.current.x,y:t}),(r<0&&n>B.current.x||r>0&&n<B.current.x)&&(B.current={x:n,y:B.current.y});let a=n-I.current.x,o=t-I.current.y,s=t-B.current.y,c=n-B.current.x;if(!y&&Math.sqrt(a*a+o*o)>=FM&&(b(!0),M===null)){let e=f.includes(`left`)||f.includes(`right`),t=f.includes(`up`)||f.includes(`down`);e&&t&&N(Math.abs(a)>Math.abs(o)?`horizontal`:`vertical`)}let l;if(!R.current)M===`vertical`?o>0?l=`down`:o<0&&(l=`up`):M===`horizontal`?a>0?l=`right`:a<0&&(l=`left`):l=Math.abs(a)>=Math.abs(o)?a>0?`right`:`left`:o>0?`down`:`up`,l&&f.includes(l)&&(R.current=l,ee.current=kM(l,a,o),g(l));else{let e=R.current,t=kM(e,c,s);t>MM?(z.current=!1,g(e)):!(f.includes(`left`)&&f.includes(`right`))&&!(f.includes(`up`)&&f.includes(`down`))&&ee.current-t>=NM&&(z.current=!0)}let u=ie(a,o),d=L.current.x,p=L.current.y;M===`horizontal`?(f.includes(`left`)||f.includes(`right`))&&(d+=u.x):(M===`vertical`||(f.includes(`left`)||f.includes(`right`))&&(d+=u.x),(f.includes(`up`)||f.includes(`down`))&&(p+=u.y)),w({x:d,y:p})}function G(e){if(!_)return;if(v(!1),b(!1),N(null),P.current?.releasePointerCapture(e.pointerId),z.current){w({x:T.x,y:T.y}),g(void 0);return}let t=!1,n=C.x-T.x,r=C.y-T.y,i;for(let e of f){switch(e){case`right`:n>MM&&(t=!0,i=`right`);break;case`left`:n<-MM&&(t=!0,i=`left`);break;case`down`:r>MM&&(t=!0,i=`down`);break;case`up`:r<-MM&&(t=!0,i=`up`);break;default:break}if(t)break}t?(g(i),S(!0),m.closeToast(a.id)):(w({x:T.x,y:T.y}),g(void 0))}function K(){_&&(v(!1),b(!1),N(null),w({x:T.x,y:T.y}),g(void 0))}function se(e){if(e.key===`Escape`){if(!P.current||!ei(P.current,$r(ua(P.current))))return;m.closeToast(a.id)}}t.useEffect(()=>{if(!p)return;let e=P.current;if(!e)return;function t(t){ei(e,ti(t))&&t.preventDefault()}return lo(e,`touchmove`,t,{passive:!1})},[p]);function ce(){if(!_&&C.x===T.x&&C.y===T.y&&!x)return{[DM.swipeMovementX]:`0px`,[DM.swipeMovementY]:`0px`};let e=C.x-T.x,t=C.y-T.y;return{transition:_?`none`:void 0,transform:_?`translateX(${C.x}px) translateY(${C.y}px) scale(${T.scale})`:void 0,[DM.swipeMovementX]:`${e}px`,[DM.swipeMovementY]:`${t}px`}}let le=a.priority===`high`,ue={role:le?`alertdialog`:`dialog`,tabIndex:0,"aria-modal":!1,"aria-labelledby":D,"aria-describedby":A,"aria-hidden":le&&!re?!0:void 0,onPointerDown:p?ae:void 0,onPointerMove:p?oe:void 0,onPointerUp:p?G:void 0,onPointerCancel:p?K:void 0,onKeyDown:se,inert:Lm(a.limited),style:{...ce(),[DM.index]:a.transitionStatus===`ending`?te:ne,[DM.offsetY]:`${H}px`,[DM.height]:a.height?`${a.height}px`:void 0}},de=t.useMemo(()=>({rootRef:P,toast:a,titleId:D,setTitleId:k,descriptionId:A,setDescriptionId:j,swiping:_,swipeDirection:h,recalculateHeight:W,index:te,visibleIndex:ne,expanded:U}),[a,D,A,_,h,W,te,ne,U]),fe={transitionStatus:a.transitionStatus,expanded:U,limited:a.limited||!1,type:a.type,swiping:de.swiping,swipeDirection:de.swipeDirection},pe=q(`div`,e,{ref:[i,de.rootRef],state:fe,stateAttributesMapping:jM,props:[ue,u]});return(0,n.jsx)(TM.Provider,{value:de,children:pe})}),process.env.NODE_ENV!==`production`&&(LM.displayName=`ToastRoot`)})),zM,BM=p((()=>{I(),EM(),J(),zM=t.forwardRef(function(e,n){let{render:r,className:i,style:a,...o}=e,{visibleIndex:s,expanded:c,recalculateHeight:l}=wM(),u=t.useRef(null);return F(()=>{let e=u.current;if(!e||(l(),typeof ResizeObserver!=`function`||typeof MutationObserver!=`function`))return;let t=new ResizeObserver(()=>l(!0)),n=new MutationObserver(()=>l(!0));return t.observe(e),n.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>{t.disconnect(),n.disconnect()}},[l]),q(`div`,e,{ref:[n,u],state:{expanded:c,behind:s>0},props:o})}),process.env.NODE_ENV!==`production`&&(zM.displayName=`ToastContent`)})),VM,HM=p((()=>{Jt(),I(),EM(),J(),VM=t.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{toast:c,setDescriptionId:l}=wM(),u=o??c.description,d=!!u,f=Gt(a);F(()=>{if(d)return l(f),()=>{l(void 0)}},[d,f,l]);let p=q(`p`,e,{ref:t,state:{type:c.type},props:{...s,id:f,children:u}});return d?p:null}),process.env.NODE_ENV!==`production`&&(VM.displayName=`ToastDescription`)})),UM,WM=p((()=>{I(),Jt(),EM(),J(),UM=t.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{toast:c,setTitleId:l}=wM(),u=o??c.title,d=!!u,f=Gt(a);F(()=>{if(d)return l(f),()=>{l(void 0)}},[d,f,l]);let p=q(`h2`,e,{ref:t,state:{type:c.type},props:{...s,id:f,children:u}});return d?p:null}),process.env.NODE_ENV!==`production`&&(UM.displayName=`ToastTitle`)})),GM,KM=p((()=>{EM(),sM(),kr(),J(),GM=t.forwardRef(function(e,n){let{render:r,className:i,style:a,disabled:o,nativeButton:s=!0,...c}=e,l=aM(),{toast:u}=wM(),d=l.useState(`expanded`),[f,p]=t.useState(!1),{getButtonProps:m,buttonRef:h}=Er({disabled:o,native:s}),g={type:u.type};return q(`button`,e,{ref:[n,h],state:g,props:[{"aria-hidden":!d&&!f,onClick(){l.closeToast(u.id)},onFocus(){p(!0)},onBlur(){p(!1)}},c,m]})}),process.env.NODE_ENV!==`production`&&(GM.displayName=`ToastClose`)})),qM,JM=p((()=>{EM(),kr(),J(),qM=t.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,{toast:c}=wM(),l=c.actionProps?.children??s.children,u=!!l,{getButtonProps:d,buttonRef:f}=Er({disabled:a,native:o}),p={type:c.type},m=q(`button`,e,{ref:[t,f],state:p,props:[s,c.actionProps,d,{children:l}]});return u?m:null}),process.env.NODE_ENV!==`production`&&(qM.displayName=`ToastAction`)})),YM,XM=p((()=>{PD(),YM=ND}));function ZM(){let e=t.useContext(QM);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(84):`Base UI: ToastPositionerContext is missing. ToastPositioner parts must be placed within <Toast.Positioner>.`);return e}var QM,$M=p((()=>{K(),QM=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(QM.displayName=`ToastPositionerContext`)})),eN,tN=p((()=>{br(),De(),__(),Rl(),$M(),Hp(),Eh(),OM(),sM(),x_(),eN=t.forwardRef(function(e,r){let{toast:i,...a}=e,o=aM(),s=i.positionerProps??Ee,{render:c,className:l,anchor:u=s.anchor,positionMethod:d=s.positionMethod??`absolute`,side:f=s.side??`top`,align:p=s.align??`center`,sideOffset:m=s.sideOffset??0,alignOffset:h=s.alignOffset??0,collisionBoundary:g=s.collisionBoundary??`clipping-ancestors`,collisionPadding:_=s.collisionPadding??5,arrowPadding:v=s.arrowPadding??5,sticky:y=s.sticky??!1,disableAnchorTracking:b=s.disableAnchorTracking??!1,collisionAvoidance:x=s.collisionAvoidance??Il,style:S,...C}=a,[w,T]=t.useState(null),E=o.useState(`toastIndex`,i.id),D=o.useState(`toastVisibleIndex`,i.id),O=er(u)?u:null,k=h_({anchor:O,positionMethod:d,floatingRootContext:Xf({open:!0,onOpenChange:we,elements:{floating:w,reference:O}}),mounted:!0,side:f,sideOffset:m,align:p,alignOffset:h,collisionBoundary:g,collisionPadding:_,sticky:y,arrowPadding:v,disableAnchorTracking:b,keepMounted:!0,collisionAvoidance:x}),A=b_(e,t.useMemo(()=>({side:k.side,align:k.align,anchorHidden:k.anchorHidden}),[k.side,k.align,k.anchorHidden]),{styles:{...k.positionerStyles,[DM.index]:i.transitionStatus===`ending`?E:D},transitionStatus:i.transitionStatus,props:C,refs:[r,T]});return(0,n.jsx)(QM.Provider,{value:k,children:A})}),process.env.NODE_ENV!==`production`&&(eN.displayName=`ToastPositioner`)})),nN,rN=p((()=>{$M(),J(),nN=t.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,{arrowRef:o,side:s,align:c,arrowUncentered:l,arrowStyles:u}=ZM();return q(`div`,e,{state:{side:s,align:c,uncentered:l},ref:[t,o],props:[{style:u,"aria-hidden":!0},a]})}),process.env.NODE_ENV!==`production`&&(nN.displayName=`ToastArrow`)}));function iN(){let e=t.useContext(oM);if(!e)throw Error(process.env.NODE_ENV===`production`?G(73):`Base UI: useToastManager must be used within <Toast.Provider>.`);let n=e.useState(`toasts`);return t.useMemo(()=>({toasts:n,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[n,e])}var aN=p((()=>{K(),sM()}));function oN(){let e=new Set;function t(t){e.forEach(e=>e(t))}return{" subscribe":function(t){return e.add(t),()=>{e.delete(t)}},add(e){let n=e.id||cM(`toast`);return t({action:`add`,options:{...e,id:n,transitionStatus:`starting`}}),n},close(e){t({action:`close`,options:{id:e}})},update(e,n){t({action:`update`,options:{...n,id:e}})},promise(e,n){let r=e;return t({action:`promise`,options:{...n,promise:e,setPromise(e){r=e}}}),r}}}var sN=p((()=>{uM()})),cN=p((()=>{yM(),CM(),RM(),BM(),HM(),WM(),KM(),JM(),XM(),tN(),rN(),aN(),sN()})),lN=p((()=>{cN()}));function uN(e=!0){let n=t.useContext(dN);if(n===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?G(7):`Base UI: ToggleGroupContext is missing. ToggleGroup parts must be placed within <ToggleGroup>.`);return n}var dN,fN=p((()=>{K(),dN=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(dN.displayName=`ToggleGroupContext`)})),pN,mN=p((()=>{N(),w(),I(),x(),Xt(),J(),fN(),kr(),ex(),Rt(),It(),pN=t.forwardRef(function(e,t){let{className:r,defaultPressed:i=!1,disabled:a=!1,form:o,onPressedChange:s,pressed:c,render:l,type:u,value:d,nativeButton:f=!0,style:p,...m}=e,h=Yt(d||void 0),g=uN(),_=g?.value??[],v=g?void 0:i,b=(a||g?.disabled)??!1;process.env.NODE_ENV!==`production`&&F(()=>{g&&d===void 0&&g.isValueInitialized&&y("A `<Toggle>` component rendered in a `<ToggleGroup>` has no explicit `value` prop.",`This will cause issues between the Toggle Group and Toggle values.`,"Provide the `<Toggle>` with a `value` prop matching the `<ToggleGroup>` values prop type.")},[g,d,g?.isValueInitialized]);let[x,C]=S({controlled:g?h!==void 0&&_.indexOf(h)>-1:c,default:v,name:`Toggle`,state:`pressed`}),w=O((e,t)=>{h&&g?.setGroupValue?.(h,e,t),s?.(e,t)}),{getButtonProps:T,buttonRef:E}=Er({disabled:b,native:f}),D={disabled:b,pressed:x},k=[E,t],A=[{"aria-pressed":x,onClick(e){let t=!x,n=Y(at,e.nativeEvent);w(t,n),!n.isCanceled&&C(t)}},m,T],j=q(`button`,e,{enabled:!g,state:D,ref:k,props:A});return g?(0,n.jsx)($b,{tag:`button`,render:l,className:r,style:p,state:D,refs:k,props:A}):j}),process.env.NODE_ENV!==`production`&&(pN.displayName=`Toggle`)})),hN=p((()=>{mN()})),gN,_N=p((()=>{gN=function(e){return e.disabled=`data-disabled`,e.orientation=`data-orientation`,e.multiple=`data-multiple`,e}({})})),vN,yN,bN=p((()=>{N(),w(),J(),fw(),mb(),fN(),_N(),vN={multiple(e){return e?{[gN.multiple]:``}:null}},yN=t.forwardRef(function(e,r){let{defaultValue:i,disabled:a=!1,loopFocus:o=!0,onValueChange:s,orientation:c=`horizontal`,multiple:l=!1,value:u,className:d,render:f,style:p,...m}=e,h=fb(!0),g=t.useMemo(()=>{if(u===void 0)return i??[]},[u,i]),_=t.useMemo(()=>u!==void 0||i!==void 0,[u,i]),v=(h?.disabled??!1)||a,[y,b]=S({controlled:u,default:g,name:`ToggleGroup`,state:`value`}),x=O((e,t,n)=>{let r;if(l?(r=y.slice(),t?r.push(e):r.splice(y.indexOf(e),1)):r=t?[e]:[],Array.isArray(r)){if(s?.(r,n),n.isCanceled)return;b(r)}}),C={disabled:v,multiple:l,orientation:c},w=t.useMemo(()=>({disabled:v,orientation:c,setGroupValue:x,value:y,isValueInitialized:_}),[v,c,x,y,_]),T={role:`group`},E=q(`div`,e,{enabled:!!h,state:C,ref:r,props:[T,m],stateAttributesMapping:vN});return(0,n.jsx)(dN.Provider,{value:w,children:h?E:(0,n.jsx)(dw,{render:f,className:d,style:p,state:C,refs:[r],props:[T,m],stateAttributesMapping:vN,loopFocus:o,enableHomeAndEndKeys:!0,orientation:c})})}),process.env.NODE_ENV!==`production`&&(yN.displayName=`ToggleGroup`)})),xN=p((()=>{bN()})),SN=p((()=>{ky(),mb(),fw(),J(),K(),Ar(),ex(),Tr(),co()}));function CN(e){let n=t.useContext(wN);if(n===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?G(72):`Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>.`);return n}var wN,TN=p((()=>{K(),wN=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(wN.displayName=`TooltipRootContext`)}));function EN(){return{...Gf(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}var DN,ON,kN=p((()=>{Mf(),D(),Hp(),It(),Yf(),DN={...qf,disabled:Q(e=>e.disabled),instantType:Q(e=>e.instantType),isInstantPhase:Q(e=>e.isInstantPhase),trackCursorAxis:Q(e=>e.trackCursorAxis),disableHoverablePopup:Q(e=>e.disableHoverablePopup),lastOpenChangeReason:Q(e=>e.openChangeReason),closeOnClick:Q(e=>e.closeOnClick),closeDelay:Q(e=>e.closeDelay),hasViewport:Q(e=>e.hasViewport)},ON=class e extends Df{constructor(e){super({...EN(),...e},{popupRef:t.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new Vf},DN)}setOpen=(e,t)=>{let n=t.reason,i=n===st,a=e&&n===`trigger-focus`,o=!e&&(n===`trigger-press`||n===`escape-key`);if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let s=()=>{let r={open:e,openChangeReason:n};a?r.instantType=`focus`:o?r.instantType=`dismiss`:n===`trigger-hover`&&(r.instantType=void 0);let i=t.trigger?.id??null;(i||e)&&(r.activeTriggerId=i,r.activeTriggerElement=t.trigger??null),this.update(r)};i?r.flushSync(s):s()};static useStore(t,n){let r=T(()=>new e(n)).current,i=t??r,a=ep({popupStore:i,onOpenChange:i.setOpen});return i.state.floatingRootContext=a,i}}})),AN,jN=p((()=>{yf(),kc(),I(),TN(),Hp(),Rt(),Yf(),kN(),It(),AN=mf(function(e){let{disabled:r=!1,defaultOpen:i=!1,open:a,disableHoverablePopup:o=!1,trackCursorAxis:s=`none`,actionsRef:c,onOpenChange:l,onOpenChangeComplete:u,handle:d,triggerId:f,defaultTriggerId:p=null,children:m}=e,h=ON.useStore(d?.store,{open:i,openProp:a,activeTriggerId:p,triggerIdProp:f});Oc(()=>{a===void 0&&h.state.open===!1&&i===!0&&h.update({open:!0,activeTriggerId:p})}),h.useControlledProp(`openProp`,a),h.useControlledProp(`triggerIdProp`,f),h.useContextCallback(`onOpenChange`,l),h.useContextCallback(`onOpenChangeComplete`,u);let g=h.useState(`open`),_=!r&&g,v=h.useState(`activeTriggerId`),y=h.useState(`payload`);h.useSyncedValues({trackCursorAxis:s,disableHoverablePopup:o}),F(()=>{g&&r&&h.setOpen(!1,Y(jt))},[g,r,h]),h.useSyncedValue(`disabled`,r),Rf(h);let{forceUnmount:b,transitionStatus:x}=zf(_,h),S=h.select(`floatingRootContext`),C=h.useState(`isInstantPhase`),w=h.useState(`instantType`),T=h.useState(`lastOpenChangeReason`),E=t.useRef(null);F(()=>{x===`ending`&&T===`none`||x!==`ending`&&C?(w!==`delay`&&(E.current=w),h.set(`instantType`,`delay`)):E.current!==null&&(h.set(`instantType`,E.current),E.current=null)},[x,C,T,w,h]),F(()=>{_&&(v??h.set(`payload`,void 0))},[h,v,_]);let D=t.useCallback(()=>{h.setOpen(!1,Y(Mt))},[h]);t.useImperativeHandle(c,()=>({unmount:b,close:D}),[b,D]);let{getReferenceProps:O,getFloatingProps:k,getTriggerProps:A}=gp([xu(S,{enabled:!r,referencePress:()=>h.select(`closeOnClick`)}),_u(S,{enabled:!r&&s!==`none`,axis:s===`none`?void 0:s})]),j=t.useMemo(()=>O(),[O]),M=t.useMemo(()=>A(),[A]),N=t.useMemo(()=>k(),[k]);return h.useSyncedValues({activeTriggerProps:j,inactiveTriggerProps:M,popupProps:N}),(0,n.jsx)(wN.Provider,{value:h,children:typeof m==`function`?m({payload:y}):m})}),process.env.NODE_ENV!==`production`&&(AN.displayName=`TooltipRoot`)}));function MN(){return t.useContext(NN)}var NN,PN=p((()=>{NN=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(NN.displayName=`TooltipProviderContext`)})),FN,IN=p((()=>{ym(),FN=function(e){return e[e.popupOpen=um.popupOpen]=`popupOpen`,e.triggerDisabled=`data-trigger-disabled`,e}({})})),LN=p((()=>{})),RN,zN=p((()=>{K(),yf(),TN(),ym(),J(),Yf(),Xt(),PN(),Hp(),IN(),LN(),RN=hf(function(e,n){let{className:r,render:i,handle:a,payload:o,disabled:s,delay:c,closeOnClick:l=!0,closeDelay:u,id:d,style:f,...p}=e,m=CN(!0),h=a?.store??m;if(!h)throw Error(process.env.NODE_ENV===`production`?G(82):`Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle.`);let g=Yt(d),_=h.useState(`isTriggerActive`,g),v=h.useState(`isOpenedByTrigger`,g),y=h.useState(`floatingRootContext`),b=t.useRef(null),x=c??600,S=u??0,{registerTrigger:C,isMountedByThisTrigger:w}=Lf(g,b,h,{payload:o,closeOnClick:l,closeDelay:S}),T=MN(),{delayRef:E,isInstantPhase:D,hasProvider:O}=Zc(y,{open:v});h.useSyncedValue(`isInstantPhase`,D);let k=h.useState(`disabled`),A=s??k,j=h.useState(`trackCursorAxis`),M=h.useState(`disableHoverablePopup`),N=pp(y,{enabled:!A,mouseOnly:!0,move:!1,handleClose:!M&&j!==`both`?Lp():null,restMs(){let e=T?.delay,t=typeof E.current==`object`?E.current.open:void 0,n=x;return O&&(n=t===0?0:c??e??x),n},delay(){let e=typeof E.current==`object`?E.current.close:void 0,t=S;return u==null&&O&&(t=e),{close:t}},triggerElementRef:b,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),P=np(y,{enabled:!A}).reference,F={open:v},I=h.useState(`triggerProps`,w);return q(`button`,e,{state:F,ref:[n,C,b],props:[N,P,I,{onPointerDown(){h.set(`closeOnClick`,l)},id:g,[FN.triggerDisabled]:A?``:void 0},p],stateAttributesMapping:gm})}),process.env.NODE_ENV!==`production`&&(RN.displayName=`TooltipTrigger`)}));function BN(){let e=t.useContext(VN);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(70):`Base UI: <Tooltip.Portal> is missing.`);return e}var VN,HN=p((()=>{K(),VN=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(VN.displayName=`TooltipPortalContext`)})),UN,WN=p((()=>{TN(),HN(),PD(),UN=t.forwardRef(function(e,t){let{keepMounted:r=!1,...i}=e;return CN().useState(`mounted`)||r?(0,n.jsx)(VN.Provider,{value:r,children:(0,n.jsx)(ND,{ref:t,...i})}):null}),process.env.NODE_ENV!==`production`&&(UN.displayName=`TooltipPortal`)}));function GN(){let e=t.useContext(KN);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?G(71):`Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>.`);return e}var KN,qN=p((()=>{K(),KN=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(KN.displayName=`TooltipPositionerContext`)})),JN,YN=p((()=>{TN(),qN(),__(),HN(),Rl(),f_(),x_(),JN=t.forwardRef(function(e,r){let{render:i,className:a,anchor:o,positionMethod:s=`absolute`,side:c=`top`,align:l=`center`,sideOffset:u=0,alignOffset:d=0,collisionBoundary:f=`clipping-ancestors`,collisionPadding:p=5,arrowPadding:m=5,sticky:h=!1,disableAnchorTracking:g=!1,collisionAvoidance:_=Il,style:v,...y}=e,b=CN(),x=BN(),S=b.useState(`open`),C=b.useState(`mounted`),w=b.useState(`trackCursorAxis`),T=b.useState(`disableHoverablePopup`),E=b.useState(`floatingRootContext`),D=b.useState(`instantType`),O=b.useState(`transitionStatus`),k=h_({anchor:o,positionMethod:s,floatingRootContext:E,mounted:C,side:c,sideOffset:u,align:l,alignOffset:d,collisionBoundary:f,collisionPadding:p,sticky:h,arrowPadding:m,disableAnchorTracking:g,keepMounted:x,collisionAvoidance:_,adaptiveOrigin:b.useState(`hasViewport`)?d_:void 0}),A=b_(e,t.useMemo(()=>({open:S,side:k.side,align:k.align,anchorHidden:k.anchorHidden,instant:w===`none`?D:`tracking-cursor`}),[S,k.side,k.align,k.anchorHidden,w,D]),{styles:k.positionerStyles,transitionStatus:O,props:y,refs:[r,b.useStateSetter(`positionerElement`)],hidden:!C,inert:!S||w===`both`||T});return(0,n.jsx)(KN.Provider,{value:k,children:A})}),process.env.NODE_ENV!==`production`&&(JN.displayName=`TooltipPositioner`)})),XN,ZN,QN=p((()=>{TN(),qN(),ym(),mn(),yo(),J(),y_(),Hp(),XN={...vm,...pn},ZN=t.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,o=CN(),{side:s,align:c}=GN(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`);vo({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}});let m=o.useState(`disabled`),h=o.useState(`closeDelay`);return dp(p,{enabled:!m,closeDelay:h}),q(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,o.useStateSetter(`popupElement`)],props:[f,v_(d),a],stateAttributesMapping:XN})}),process.env.NODE_ENV!==`production`&&(ZN.displayName=`TooltipPopup`)})),$N,eP=p((()=>{Hp(),PN(),$N=function(e){let{delay:r,closeDelay:i,timeout:a=400}=e,o=t.useMemo(()=>({delay:r,closeDelay:i}),[r,i]),s=t.useMemo(()=>({open:r,close:i}),[r,i]);return(0,n.jsx)(NN.Provider,{value:o,children:(0,n.jsx)(Xc,{delay:s,timeoutMs:a,children:e.children})})},process.env.NODE_ENV!==`production`&&($N.displayName=`TooltipProvider`)})),tP=p((()=>{jN(),zN(),WN(),YN(),QN(),qN(),ym(),J(),TN(),eP(),Ax(),K(),kN(),Rt(),It()})),nP=p((()=>{tP()})),rP=p((()=>{})),iP=p((()=>{rP()})),aP=p((()=>{Co(),$m(),ev(),gv(),yv(),Uv(),Zv(),uy(),jy(),Fx(),Bx(),Hx(),wx(),KC(),$C(),ew(),tw(),iw(),Px(),pw(),Xe(),Iw(),Lw(),vE(),BE(),MD(),FD(),ID(),QD(),nO(),QO(),hA(),ky(),hj(),Oj(),iM(),lN(),hN(),xN(),SN(),nP(),iP()}));aP();var oP=({children:e,...t})=>(0,n.jsx)(sm,{...t,children:e}),sP,cP=p((()=>{Ao(),sP=ko(`inline-flex cursor-pointer items-center justify-center rounded-full whitespace-nowrap transition-all select-none disabled:pointer-events-none disabled:opacity-50 [&>svg]:shrink-0`,{variants:{tone:{brand:``,accent:``,neutral:``,error:``,info:``,warning:``,success:``},variant:{fill:`active:scale-[0.98]`,outline:`border active:scale-[0.98]`,ghost:`active:scale-[0.98]`,soft:`border active:scale-[0.98]`,elevated:`shadow-xs not-active:hover:shadow-md`},size:{large:`h-2xl gap-xs px-md style-text-default-2 [&>svg]:size-md`,medium:`h-xl gap-2xs px-sm style-text-default-0 [&>svg]:size-sm`,small:`h-lg gap-3xs px-xs style-text-default--1 [&>svg]:size-xs`,extraSmall:`h-md gap-3xs px-2xs style-text-default--2 [&>svg]:size-xs`,iconLarge:`size-2xl p-[0px] [&>svg]:size-md`,iconMedium:`size-xl p-[0px] [&>svg]:size-sm`,iconSmall:`size-lg p-[0px] [&>svg]:size-xs`,iconExtraSmall:`size-md p-[0px] [&>svg]:size-xs`}},defaultVariants:{tone:`brand`,variant:`fill`,size:`medium`},compoundVariants:[{variant:`fill`,tone:`brand`,className:`bg-brand-default text-brand-on-default hover:bg-brand-muted`},{variant:`fill`,tone:`accent`,className:`bg-accent-default text-accent-on-default hover:bg-accent-muted`},{variant:`fill`,tone:`neutral`,className:`bg-neutral-default text-neutral-on-default hover:bg-neutral-muted`},{variant:`fill`,tone:`error`,className:`bg-error-default text-error-on-default hover:bg-error-muted`},{variant:`fill`,tone:`info`,className:`bg-info-default text-info-on-default hover:bg-info-muted`},{variant:`fill`,tone:`success`,className:`bg-success-default text-success-on-default hover:bg-success-muted`},{variant:`fill`,tone:`warning`,className:`bg-warning-default text-warning-on-default hover:bg-warning-muted`},{variant:`outline`,tone:`brand`,className:`border-brand-border text-brand-default hover:bg-brand-subtle hover:text-brand-on-container`},{variant:`outline`,tone:`accent`,className:`border-accent-border text-accent-default hover:bg-accent-subtle hover:text-accent-on-container`},{variant:`outline`,tone:`neutral`,className:`border-neutral-border text-neutral-default hover:bg-neutral-subtle hover:text-neutral-on-container`},{variant:`outline`,tone:`error`,className:`border-error-border text-error-default hover:bg-error-subtle hover:text-error-on-container`},{variant:`outline`,tone:`info`,className:`border-info-border text-info-default hover:bg-info-subtle hover:text-info-on-container`},{variant:`outline`,tone:`success`,className:`border-success-border text-success-default hover:bg-success-subtle hover:text-success-on-container`},{variant:`outline`,tone:`warning`,className:`border-warning-border text-warning-default hover:bg-warning-subtle hover:text-warning-on-container`},{variant:`ghost`,tone:`brand`,className:`text-brand-default hover:bg-brand-subtle hover:text-brand-on-container`},{variant:`ghost`,tone:`accent`,className:`text-accent-default hover:bg-accent-subtle hover:text-accent-on-container`},{variant:`ghost`,tone:`neutral`,className:`text-neutral-default hover:bg-neutral-subtle hover:text-neutral-on-container`},{variant:`ghost`,tone:`error`,className:`text-error-default hover:bg-error-subtle hover:text-error-on-container`},{variant:`ghost`,tone:`info`,className:`text-info-default hover:bg-info-subtle hover:text-info-on-container`},{variant:`ghost`,tone:`success`,className:`text-success-default hover:bg-success-subtle hover:text-success-on-container`},{variant:`ghost`,tone:`warning`,className:`text-warning-default hover:bg-warning-subtle hover:text-warning-on-container`},{variant:`soft`,tone:`brand`,className:`border-brand-border bg-brand-container text-brand-on-container hover:border-brand-border-strong hover:bg-brand-container-high`},{variant:`soft`,tone:`accent`,className:`border-accent-border bg-accent-container text-accent-on-container hover:border-accent-border-strong hover:bg-accent-container-high`},{variant:`soft`,tone:`neutral`,className:`border-neutral-border bg-neutral-container text-neutral-on-container hover:border-neutral-border-strong hover:bg-neutral-container-high`},{variant:`soft`,tone:`error`,className:`border-error-border bg-error-container text-error-on-container hover:border-error-border-strong hover:bg-error-container-high`},{variant:`soft`,tone:`info`,className:`border-info-border bg-info-container text-info-on-container hover:border-info-border-strong hover:bg-info-container-high`},{variant:`soft`,tone:`success`,className:`border-success-border bg-success-container text-success-on-container hover:border-success-border-strong hover:bg-success-container-high`},{variant:`soft`,tone:`warning`,className:`border-warning-border bg-warning-container text-warning-on-container hover:border-warning-border-strong hover:bg-warning-container-high`},{variant:`elevated`,tone:`brand`,className:`bg-brand-container text-brand-on-container not-active:hover:bg-brand-container-high`},{variant:`elevated`,tone:`accent`,className:`bg-accent-container text-accent-on-container not-active:hover:bg-accent-container-high`},{variant:`elevated`,tone:`neutral`,className:`bg-surface-2 text-on-surface not-active:hover:bg-surface-3`},{variant:`elevated`,tone:`error`,className:`bg-error-container text-error-on-container not-active:hover:bg-error-container-high`},{variant:`elevated`,tone:`info`,className:`bg-info-container text-info-on-container not-active:hover:bg-info-container-high`},{variant:`elevated`,tone:`success`,className:`bg-success-container text-success-on-container not-active:hover:bg-success-container-high`},{variant:`elevated`,tone:`warning`,className:`bg-warning-container text-warning-on-container not-active:hover:bg-warning-container-high`}]})})),lP,uP=p((()=>{aP(),cP(),Z(),lP=({tone:e,variant:t,size:r,className:i,children:a,...o})=>(0,n.jsx)(_v,{"data-size":r,className:X(sP({tone:e,variant:t,size:r,className:i})),...o,children:a})})),dP=p((()=>{uP()}));aP(),dP(),Z();var fP=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Cm,{className:X(``,e),ref:r,...i,render:(0,n.jsx)(lP,{"aria-label":`Close`,tone:`neutral`,variant:`outline`,children:t})}),pP=(0,_.createContext)({tone:`brand`}),mP=()=>(0,_.useContext)(pP);aP(),dP(),Z();var hP=({className:e,children:t,ref:r,...i})=>{let{tone:a}=mP();return(0,n.jsx)(Cm,{"data-confirm":!0,className:X(``,e),ref:r,...i,render:(0,n.jsx)(lP,{tone:a,children:t})})};Z();var gP=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`space-y-3xs`,e),ref:r,...i,children:t});aP(),Z();var _P=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Tm,{className:X(`mb-[0px] style-text-prose-0`,e),ref:r,...i,children:t});Z();var vP=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`flex items-start justify-end gap-2xs`,e),ref:r,...i,children:t});Z();var yP=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`flex w-full items-start justify-center gap-sm [&>svg]:size-xl [&>svg]:shrink-0`,e),ref:r,...i,children:t});Ao();var bP=ko(`fixed top-1/2 left-1/2 max-w-[lg(100vw-3rem)] min-w-1/3 -translate-1/2 space-y-sm overflow-hidden rounded-3xl bg-surface-3 p-md shadow-md transition-all duration-150 data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0`,{variants:{tone:{brand:`[&_svg]:text-brand-default`,accent:`[&_svg]:text-accent-default`,neutral:`[&_svg]:text-neutral-default`,error:`[&_svg]:text-error-default`,info:`[&_svg]:text-info-default`,success:`[&_svg]:text-success-default`,warning:`[&_svg]:text-warning-default`}},defaultVariants:{tone:`brand`}});aP(),Z();var xP=({tone:e,className:t,children:r,ref:i,...a})=>(0,n.jsx)(pP.Provider,{value:{tone:e},children:(0,n.jsxs)(Vm,{children:[(0,n.jsx)(xm,{className:`fixed inset-[0px] min-h-dvh bg-scrim/30 transition-all duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-[-webkit-touch-callout:none]:absolute`}),(0,n.jsx)(Fm,{className:X(bP({tone:e,className:t})),ref:i,...a,children:r})]})});aP(),Z();var SP=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Um,{className:X(`style-text-strong-1`,e),ref:r,...i,children:t});aP(),Z();var CP=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Gm,{className:X(``,e),ref:r,...i,render:t});ev();var wP=({children:e,...t})=>(0,n.jsx)(sg,{...t,children:e});ev();var TP=({children:e,...t})=>(0,n.jsx)(Wg,{...t,children:e});ev(),Z();var EP=({emptyText:e,className:t,children:r,ref:i,...a})=>(0,n.jsx)(r_,{children:(0,n.jsx)(T_,{className:X(``,t),ref:i,...a,sideOffset:16,children:(0,n.jsxs)(O_,{className:`max-h-[22.5rem] w-[calc(var(--anchor-width)+var(--spacing-md))] max-w-[calc(var(--available-width))] overflow-hidden rounded-xl bg-surface-2 shadow-md`,children:[(0,n.jsx)(Y_,{className:`ml-3xs p-sm style-text-prose--1 text-on-surface-variant empty:m-[0px] empty:p-[0px]`,children:e}),(0,n.jsx)(Kg,{className:`max-h-[min(22.5rem,var(--available-height))] scroll-pt-[2.25rem] scroll-pb-[0.5rem] overflow-y-auto overscroll-contain data-empty:p-[0px]`,children:r})]})})}),DP,OP=p((()=>{Ao(),DP=ko(`group flex w-full items-center rounded-full leading-0 text-ellipsis caret-brand-border-strong outline outline-transparent transition-all placeholder:opacity-60 focus-within:outline-brand-border-strong not-focus-within:hover:outline-border-strong disabled:cursor-not-allowed aria-invalid:bg-error-container aria-invalid:text-error-on-container aria-invalid:caret-error-border-strong aria-invalid:outline-error-border aria-invalid:focus-within:outline-error-border-strong aria-invalid:not-focus-within:hover:outline-error-border data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50`,{variants:{variant:{primary:`bg-surface shadow-2xs`,secondary:`bg-surface-low`},size:{small:`h-lg gap-3xs px-xs style-text-prose--1`,medium:`h-xl gap-2xs px-sm style-text-prose-0`,large:`h-2xl gap-xs px-md style-text-prose-1`}},defaultVariants:{variant:`primary`,size:`medium`}})}));OP(),Z();var kP=({variant:e,className:t,children:r,ref:i,...a})=>(0,n.jsx)(`div`,{className:X(DP({variant:e}),t),ref:i,...a,children:r});ev(),Z();var AP=({placeholder:e,className:t,ref:r,...i})=>(0,n.jsx)(kg,{placeholder:e,className:X(`grow text-ellipsis outline-none placeholder:opacity-85`,t),ref:r,...i});ev(),Z();var jP=({placeholder:e=`Search…`,emptyText:t,className:r,children:i,ref:a,...o})=>(0,n.jsx)(r_,{children:(0,n.jsx)(T_,{className:X(``,r),ref:a,...o,align:`end`,sideOffset:4,children:(0,n.jsxs)(O_,{className:`max-h-[20.5rem] max-w-(--available-width) origin-(--transform-origin) overflow-hidden rounded-lg bg-surface-2 shadow-lg transition-[transform,scale,opacity] [--input-container-height:3rem] data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0`,children:[(0,n.jsx)(`div`,{className:`m-3xs flex h-(--input-container-height) items-center justify-center text-center`,children:(0,n.jsx)(kP,{children:(0,n.jsx)(AP,{placeholder:e})})}),(0,n.jsx)(Y_,{className:`p-sm style-text-prose--1 empty:m-[0px] empty:p-[0px]`,children:t}),(0,n.jsx)(Kg,{className:`max-h-[calc(19.5rem-var(--input-container-height))] scroll-pt-xl scroll-pb-[0.35rem] overflow-auto overscroll-contain`,children:i})]})})});ev(),Z();var MP=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(G_,{className:X(`group flex h-lg min-w-(--anchor-width) cursor-default items-center rounded-md style-text-prose--1 select-none hover:cursor-pointer hover:bg-accent-default hover:text-surface data-highlighted:relative data-highlighted:z-0 data-highlighted:bg-accent-default data-highlighted:text-surface before:data-highlighted:absolute before:data-highlighted:inset-[0px] before:data-highlighted:z-[-1] before:data-highlighted:rounded-md`,e),ref:r,...i,children:(0,n.jsx)(`span`,{className:`text-lg leading-none`,children:t})});ev(),Z();var NP=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(N_,{className:X(`block space-y-3xs`,e),ref:r,...i,children:t});ev(),Z();var PP=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(F_,{className:X(`sticky top-[0px] z-1 my-[0px] mr-[0px] ml-[3px] bg-surface-2 px-sm pt-sm pb-3xs style-text-strong--2 text-on-surface-variant`,e),ref:r,...i,children:t});Z();var FP=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`inline-flex items-center gap-xs style-text-default-0 text-on-surface-variant`,e),ref:r,...i,children:t});ev(),Z();var IP=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(G_,{className:X(`mx-xs flex cursor-default items-center rounded-lg px-2xs py-3xs style-text-prose-0 select-none first:mt-xs last:mb-xs hover:cursor-pointer hover:bg-neutral-container-high hover:text-neutral-on-container data-highlighted:relative data-highlighted:z-0 data-highlighted:bg-neutral-container-high data-highlighted:text-neutral-on-container before:data-highlighted:absolute before:data-highlighted:inset-x-sm before:data-highlighted:inset-y-[0px] before:data-highlighted:z-[-1] before:data-highlighted:rounded-sm`,e),ref:r,...i,children:t});ev(),Z();var LP=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(q_,{className:X(`grid grid-cols-5`,e),ref:r,...i,children:t});ev(),Z();var RP=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Qg,{className:X(`flex items-center gap-2xs p-xs style-text-prose--1 text-on-surface-variant empty:hidden`,e),ref:r,...i,children:t});ev(),Z();var zP=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(yg,{className:X(``,e),ref:r,...i,render:()=>(0,n.jsx)(n.Fragment,{children:t})});Ao();var BP=ko(`group/avatar relative inline-flex shrink-0 items-center justify-center rounded-full`,{variants:{size:{small:`size-lg style-text-default--1`,medium:`size-xl style-text-default-0`,large:`size-2xl style-text-default-1`}},defaultVariants:{size:`medium`}}),VP=ko(`absolute right-0 bottom-0 inline-flex items-center justify-center rounded-full outline-3 outline-surface-background group-data-[size=large]/avatar:size-md group-data-[size=medium]/avatar:size-sm group-data-[size=small]/avatar:size-xs group-data-[size=large]/avatar:[&_svg]:size-sm group-data-[size=medium]/avatar:[&_svg]:size-xs group-data-[size=small]/avatar:[&_svg]:size-2xs`,{variants:{tone:{brand:`bg-brand-default [&>svg]:text-brand-on-default`,accent:`bg-accent-default [&>svg]:text-accent-on-default`,neutral:`bg-neutral-default [&>svg]:text-neutral-on-default`,error:`bg-error-default [&>svg]:text-error-on-default`,info:`bg-info-default [&>svg]:text-info-on-default`,success:`bg-success-default [&>svg]:text-success-on-default`,warning:`bg-warning-default [&>svg]:text-warning-on-default`},position:{topLeft:`top-0 left-0`,topRight:`top-0 right-0`,bottomLeft:`bottom-0 left-0`,bottomRight:`right-0 bottom-0`}},defaultVariants:{tone:`success`,position:`bottomRight`}});gv(),Z();var HP=({size:e=`medium`,className:t,children:r,ref:i,...a})=>(0,n.jsx)(ov,{className:X(BP({className:t,size:e})),"data-size":e,"data-slot":`avatar`,ref:i,...a,children:r});gv(),Z();var UP=({className:e,ref:t,...r})=>(0,n.jsx)(pv,{className:X(`flex size-full items-center justify-center rounded-full bg-surface-3 align-middle shadow-2xs select-none`,e),"data-slot":`avatar-fallback`,ref:t,...r});gv(),Z();var WP=({className:e,ref:t,...r})=>(0,n.jsx)(dv,{className:X(`size-full rounded-full object-cover`,e),"data-slot":`avatar-image`,ref:t,...r});Z();var GP=({tone:e,position:t,className:r,children:i,ref:a,...o})=>(0,n.jsx)(`div`,{"data-slot":`avatar-badge`,className:X(VP({tone:e,position:t,className:r})),ref:a,...o,children:i});Ao();var KP=ko(`inline-flex items-center justify-center gap-3xs rounded-full style-text-default--2 whitespace-nowrap transition-all select-none`,{variants:{size:{small:`h-sm px-xs [&>svg]:size-2xs`,medium:`h-md px-xs [&>svg]:size-xs`,large:`h-lg px-xs [&>svg]:size-sm`,iconSmall:`size-sm [&>svg]:size-2xs`,iconMedium:`size-md [&>svg]:size-xs`,iconLarge:`size-lg [&>svg]:size-sm`},tone:{brand:``,accent:``,neutral:``,error:``,info:``,success:``,warning:``},variant:{fill:`shadow-2xs`,outline:`border`,soft:`border`}},defaultVariants:{size:`medium`,tone:`brand`,variant:`fill`},compoundVariants:[{variant:`fill`,tone:`brand`,className:`bg-brand-default text-brand-on-default`},{variant:`fill`,tone:`accent`,className:`bg-accent-default text-accent-on-default`},{variant:`fill`,tone:`neutral`,className:`bg-neutral-default text-neutral-on-default`},{variant:`fill`,tone:`error`,className:`bg-error-default text-error-on-default`},{variant:`fill`,tone:`info`,className:`bg-info-default text-info-on-default`},{variant:`fill`,tone:`success`,className:`bg-success-default text-success-on-default`},{variant:`fill`,tone:`warning`,className:`bg-warning-default text-warning-on-default`},{variant:`outline`,tone:`brand`,className:`border-brand-default text-brand-default`},{variant:`outline`,tone:`accent`,className:`border-accent-default text-accent-default`},{variant:`outline`,tone:`neutral`,className:`border-neutral-default text-neutral-default`},{variant:`outline`,tone:`error`,className:`border-error-default text-error-default`},{variant:`outline`,tone:`info`,className:`border-info-default text-info-default`},{variant:`outline`,tone:`success`,className:`border-success-default text-success-default`},{variant:`outline`,tone:`warning`,className:`border-warning-default text-warning-default`},{variant:`soft`,tone:`brand`,className:`border-brand-border bg-brand-container text-brand-on-container`},{variant:`soft`,tone:`accent`,className:`border-accent-border bg-accent-container text-accent-on-container`},{variant:`soft`,tone:`neutral`,className:`border-neutral-border bg-neutral-container text-neutral-on-container`},{variant:`soft`,tone:`error`,className:`border-error-border bg-error-container text-error-on-container`},{variant:`soft`,tone:`info`,className:`border-info-border bg-info-container text-info-on-container`},{variant:`soft`,tone:`success`,className:`border-success-border bg-success-container text-success-on-container`},{variant:`soft`,tone:`warning`,className:`border-warning-border bg-warning-container text-warning-on-container`}]});Z();var qP=({className:e,size:t,tone:r,variant:i,children:a,ref:o,...s})=>(0,n.jsx)(`div`,{className:X(KP({className:e,size:t,tone:r,variant:i})),ref:o,...s,children:a});Z();var JP=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`nav`,{className:X(`flex items-center gap-2xs px-sm py-2xs`,e),ref:r,...i,children:t}),YP,XP=p((()=>{YP=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M228,48V96a12,12,0,0,1-12,12H168a12,12,0,0,1,0-24h19l-7.8-7.8a75.55,75.55,0,0,0-53.32-22.26h-.43A75.49,75.49,0,0,0,72.39,75.57,12,12,0,1,1,55.61,58.41a99.38,99.38,0,0,1,69.87-28.47H126A99.42,99.42,0,0,1,196.2,59.23L204,67V48a12,12,0,0,1,24,0ZM183.61,180.43a75.49,75.49,0,0,1-53.09,21.63h-.43A75.55,75.55,0,0,1,76.77,179.8L69,172H88a12,12,0,0,0,0-24H40a12,12,0,0,0-12,12v48a12,12,0,0,0,24,0V189l7.8,7.8A99.42,99.42,0,0,0,130,226.06h.56a99.38,99.38,0,0,0,69.87-28.47,12,12,0,0,0-16.78-17.16Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1-5.66-13.66L180.65,72a79.48,79.48,0,0,0-54.72-22.09h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27,96,96,0,0,1,192,60.7l18.36-18.36A8,8,0,0,1,224,48ZM186.41,183.29A80,80,0,0,1,75.35,184l18.31-18.31A8,8,0,0,0,88,152H40a8,8,0,0,0-8,8v48a8,8,0,0,0,13.66,5.66L64,195.3a95.42,95.42,0,0,0,66,26.76h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M222,48V96a6,6,0,0,1-6,6H168a6,6,0,0,1,0-12h33.52L183.47,72a81.51,81.51,0,0,0-57.53-24h-.46A81.5,81.5,0,0,0,68.19,71.28a6,6,0,1,1-8.38-8.58,93.38,93.38,0,0,1,65.67-26.76H126a93.45,93.45,0,0,1,66,27.53l18,18V48a6,6,0,0,1,12,0ZM187.81,184.72a81.5,81.5,0,0,1-57.29,23.34h-.46a81.51,81.51,0,0,1-57.53-24L54.48,166H88a6,6,0,0,0,0-12H40a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V174.48l18,18.05a93.45,93.45,0,0,0,66,27.53h.52a93.38,93.38,0,0,0,65.67-26.76,6,6,0,1,0-8.38-8.58Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M220,48V96a4,4,0,0,1-4,4H168a4,4,0,0,1,0-8h38.34L184.89,70.54A84,84,0,0,0,66.8,69.85a4,4,0,1,1-5.6-5.72,92,92,0,0,1,129.34.76L212,86.34V48a4,4,0,0,1,8,0ZM189.2,186.15a83.44,83.44,0,0,1-58.68,23.91h-.47a83.52,83.52,0,0,1-58.94-24.6L49.66,164H88a4,4,0,0,0,0-8H40a4,4,0,0,0-4,4v48a4,4,0,0,0,8,0V169.66l21.46,21.45A91.43,91.43,0,0,0,130,218.06h.51a91.45,91.45,0,0,0,64.28-26.19,4,4,0,1,0-5.6-5.72Z`}))]])})),ZP,QP=p((()=>{ZP=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M120.49,167.51a12,12,0,0,1,0,17l-32,32a12,12,0,0,1-17,0l-32-32a12,12,0,1,1,17-17L68,179V48a12,12,0,0,1,24,0V179l11.51-11.52A12,12,0,0,1,120.49,167.51Zm96-96-32-32a12,12,0,0,0-17,0l-32,32a12,12,0,0,0,17,17L164,77V208a12,12,0,0,0,24,0V77l11.51,11.52a12,12,0,0,0,17-17Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M176,48V208H80V48Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M117.66,170.34a8,8,0,0,1,0,11.32l-32,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32L72,188.69V48a8,8,0,0,1,16,0V188.69l18.34-18.35A8,8,0,0,1,117.66,170.34Zm96-96-32-32a8,8,0,0,0-11.32,0l-32,32a8,8,0,0,0,11.32,11.32L168,67.31V208a8,8,0,0,0,16,0V67.31l18.34,18.35a8,8,0,0,0,11.32-11.32Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M119.39,172.94a8,8,0,0,1-1.73,8.72l-32,32a8,8,0,0,1-11.32,0l-32-32A8,8,0,0,1,48,168H72V48a8,8,0,0,1,16,0V168h24A8,8,0,0,1,119.39,172.94Zm94.27-98.6-32-32a8,8,0,0,0-11.32,0l-32,32A8,8,0,0,0,144,88h24V208a8,8,0,0,0,16,0V88h24a8,8,0,0,0,5.66-13.66Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M116.24,171.76a6,6,0,0,1,0,8.48l-32,32a6,6,0,0,1-8.48,0l-32-32a6,6,0,0,1,8.48-8.48L74,193.51V48a6,6,0,0,1,12,0V193.51l21.76-21.75A6,6,0,0,1,116.24,171.76Zm96-96-32-32a6,6,0,0,0-8.48,0l-32,32a6,6,0,0,0,8.48,8.48L170,62.49V208a6,6,0,0,0,12,0V62.49l21.76,21.75a6,6,0,0,0,8.48-8.48Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M117.66,170.34a8,8,0,0,1,0,11.32l-32,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32L72,188.69V48a8,8,0,0,1,16,0V188.69l18.34-18.35A8,8,0,0,1,117.66,170.34Zm96-96-32-32a8,8,0,0,0-11.32,0l-32,32a8,8,0,0,0,11.32,11.32L168,67.31V208a8,8,0,0,0,16,0V67.31l18.34,18.35a8,8,0,0,0,11.32-11.32Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M114.83,173.17a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66,0l-32-32a4,4,0,0,1,5.66-5.66L76,198.34V48a4,4,0,0,1,8,0V198.34l25.17-25.17A4,4,0,0,1,114.83,173.17Zm96-96-32-32a4,4,0,0,0-5.66,0l-32,32a4,4,0,0,0,5.66,5.66L172,57.66V208a4,4,0,0,0,8,0V57.66l25.17,25.17a4,4,0,1,0,5.66-5.66Z`}))]])})),$P,eF=p((()=>{$P=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,96l-80,80L48,96Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z`}))]])})),tF,nF=p((()=>{tF=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M160,48V208L80,128Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M163.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,168,208V48A8,8,0,0,0,163.06,40.61ZM152,188.69,91.31,128,152,67.31Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M168,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,168,48Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M164.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L88.49,128Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z`}))]])})),rF,iF=p((()=>{rF=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M200.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L129,128ZM72,36A12,12,0,0,0,60,48V208a12,12,0,0,0,24,0V48A12,12,0,0,0,72,36Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M192,48V208l-80-80Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M195.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,200,208V48A8,8,0,0,0,195.06,40.61ZM184,188.69,123.31,128,184,67.31ZM80,48V208a8,8,0,0,1-16,0V48a8,8,0,0,1,16,0Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M200,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,200,48ZM72,40a8,8,0,0,0-8,8V208a8,8,0,0,0,16,0V48A8,8,0,0,0,72,40Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M196.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L120.49,128ZM72,42a6,6,0,0,0-6,6V208a6,6,0,0,0,12,0V48A6,6,0,0,0,72,42Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M197.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L123.31,128ZM72,40a8,8,0,0,0-8,8V208a8,8,0,0,0,16,0V48A8,8,0,0,0,72,40Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M194.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L117.66,128ZM72,44a4,4,0,0,0-4,4V208a4,4,0,0,0,8,0V48A4,4,0,0,0,72,44Z`}))]])})),aF,oF=p((()=>{aF=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M152.49,119.51a12,12,0,0,1,0,17l-80,80a12,12,0,0,1-17-17L127,128,55.51,56.49a12,12,0,0,1,17-17ZM184,36a12,12,0,0,0-12,12V208a12,12,0,0,0,24,0V48A12,12,0,0,0,184,36Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M144,128,64,208V48Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M69.66,42.34A8,8,0,0,0,56,48V208a8,8,0,0,0,13.66,5.66l80-80a8,8,0,0,0,0-11.32ZM72,188.69V67.31L132.69,128ZM192,48V208a8,8,0,0,1-16,0V48a8,8,0,0,1,16,0Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M149.66,122.34a8,8,0,0,1,0,11.32l-80,80A8,8,0,0,1,56,208V48a8,8,0,0,1,13.66-5.66ZM184,40a8,8,0,0,0-8,8V208a8,8,0,0,0,16,0V48A8,8,0,0,0,184,40Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M148.24,123.76a6,6,0,0,1,0,8.48l-80,80a6,6,0,0,1-8.48-8.48L135.51,128,59.76,52.24a6,6,0,0,1,8.48-8.48ZM184,42a6,6,0,0,0-6,6V208a6,6,0,0,0,12,0V48A6,6,0,0,0,184,42Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M149.66,122.34a8,8,0,0,1,0,11.32l-80,80a8,8,0,0,1-11.32-11.32L132.69,128,58.34,53.66A8,8,0,0,1,69.66,42.34ZM184,40a8,8,0,0,0-8,8V208a8,8,0,0,0,16,0V48A8,8,0,0,0,184,40Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M146.83,125.17a4,4,0,0,1,0,5.66l-80,80a4,4,0,0,1-5.66-5.66L138.34,128,61.17,50.83a4,4,0,0,1,5.66-5.66ZM184,44a4,4,0,0,0-4,4V208a4,4,0,0,0,8,0V48A4,4,0,0,0,184,44Z`}))]])})),sF,cF=p((()=>{sF=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M176,128,96,208V48Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z`}))]])})),lF,uF=p((()=>{lF=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216.49,168.49a12,12,0,0,1-17,0L128,97,56.49,168.49a12,12,0,0,1-17-17l80-80a12,12,0,0,1,17,0l80,80A12,12,0,0,1,216.49,168.49Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,160H48l80-80Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M213.66,154.34l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,48,168H208a8,8,0,0,0,5.66-13.66ZM67.31,152,128,91.31,188.69,152Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M215.39,163.06A8,8,0,0,1,208,168H48a8,8,0,0,1-5.66-13.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,215.39,163.06Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M210.83,162.83a4,4,0,0,1-5.66,0L128,85.66,50.83,162.83a4,4,0,0,1-5.66-5.66l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,210.83,162.83Z`}))]])})),dF,fF=p((()=>{dF=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M184.49,167.51a12,12,0,0,1,0,17l-48,48a12,12,0,0,1-17,0l-48-48a12,12,0,0,1,17-17L128,207l39.51-39.52A12,12,0,0,1,184.49,167.51Zm-96-79L128,49l39.51,39.52a12,12,0,0,0,17-17l-48-48a12,12,0,0,0-17,0l-48,48a12,12,0,0,0,17,17Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M80,176h96l-48,48ZM128,32,80,80h96Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Zm-48,44.69L99.31,184h57.38ZM80,88h96a8,8,0,0,0,5.66-13.66l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,80,88Zm48-44.69L156.69,72H99.31Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M72.61,83.06a8,8,0,0,1,1.73-8.72l48-48a8,8,0,0,1,11.32,0l48,48A8,8,0,0,1,176,88H80A8,8,0,0,1,72.61,83.06ZM176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M180.24,171.76a6,6,0,0,1,0,8.48l-48,48a6,6,0,0,1-8.48,0l-48-48a6,6,0,0,1,8.48-8.48L128,215.51l43.76-43.75A6,6,0,0,1,180.24,171.76Zm-96-87.52L128,40.49l43.76,43.75a6,6,0,0,0,8.48-8.48l-48-48a6,6,0,0,0-8.48,0l-48,48a6,6,0,0,0,8.48,8.48Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M178.83,173.17a4,4,0,0,1,0,5.66l-48,48a4,4,0,0,1-5.66,0l-48-48a4,4,0,0,1,5.66-5.66L128,218.34l45.17-45.17A4,4,0,0,1,178.83,173.17Zm-96-90.34L128,37.66l45.17,45.17a4,4,0,1,0,5.66-5.66l-48-48a4,4,0,0,0-5.66,0l-48,48a4,4,0,0,0,5.66,5.66Z`}))]])})),pF,mF=p((()=>{pF=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z`}))]])})),hF,gF=p((()=>{hF=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M176.49,95.51a12,12,0,0,1,0,17l-56,56a12,12,0,0,1-17,0l-24-24a12,12,0,1,1,17-17L112,143l47.51-47.52A12,12,0,0,1,176.49,95.51ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M172.24,99.76a6,6,0,0,1,0,8.48l-56,56a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L112,151.51l51.76-51.75A6,6,0,0,1,172.24,99.76ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M170.83,101.17a4,4,0,0,1,0,5.66l-56,56a4,4,0,0,1-5.66,0l-24-24a4,4,0,0,1,5.66-5.66L112,154.34l53.17-53.17A4,4,0,0,1,170.83,101.17ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z`}))]])})),_F,vF=p((()=>{_F=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M236,128a108,108,0,0,1-216,0c0-42.52,24.73-81.34,63-98.9A12,12,0,1,1,93,50.91C63.24,64.57,44,94.83,44,128a84,84,0,0,0,168,0c0-33.17-19.24-63.43-49-77.09A12,12,0,1,1,173,29.1C211.27,46.66,236,85.48,236,128Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60.15,61.59,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20.15-66.41-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,176A72,72,0,0,1,92,65.64a8,8,0,0,1,8,13.85,56,56,0,1,0,56,0,8,8,0,0,1,8-13.85A72,72,0,0,1,128,200Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M230,128a102,102,0,0,1-204,0c0-40.18,23.35-76.86,59.5-93.45a6,6,0,0,1,5,10.9C58.61,60.09,38,92.49,38,128a90,90,0,0,0,180,0c0-35.51-20.61-67.91-52.5-82.55a6,6,0,0,1,5-10.9C206.65,51.14,230,87.82,230,128Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60.15,61.59,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20.15-66.41-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M228,128a100,100,0,0,1-200,0c0-39.4,22.9-75.37,58.33-91.63a4,4,0,1,1,3.34,7.27C57.07,58.6,36,91.71,36,128a92,92,0,0,0,184,0c0-36.29-21.07-69.4-53.67-84.36a4,4,0,1,1,3.34-7.27C205.1,52.63,228,88.6,228,128Z`}))]])})),yF,bF=p((()=>{yF=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M144,128a16,16,0,1,1-16-16A16,16,0,0,1,144,128ZM60,112a16,16,0,1,0,16,16A16,16,0,0,0,60,112Zm136,0a16,16,0,1,0,16,16A16,16,0,0,0,196,112Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M240,96v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V96A16,16,0,0,1,32,80H224A16,16,0,0,1,240,96Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V96A16,16,0,0,0,224,80ZM60,140a12,12,0,1,1,12-12A12,12,0,0,1,60,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,196,140Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128ZM60,118a10,10,0,1,0,10,10A10,10,0,0,0,60,118Zm136,0a10,10,0,1,0,10,10A10,10,0,0,0,196,118Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-76-8a8,8,0,1,0,8,8A8,8,0,0,0,60,120Zm136,0a8,8,0,1,0,8,8A8,8,0,0,0,196,120Z`}))]])})),xF,SF=p((()=>{xF=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,68H133.39l-26-29.29a20,20,0,0,0-15-6.71H40A20,20,0,0,0,20,52V200.62A19.41,19.41,0,0,0,39.38,220H216.89A19.13,19.13,0,0,0,236,200.89V88A20,20,0,0,0,216,68ZM44,56H90.61l10.67,12H44ZM212,196H44V92H212Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,80H32V56a8,8,0,0,1,8-8H92.69a8,8,0,0,1,5.65,2.34Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M216,72H131.31L104,44.69A15.86,15.86,0,0,0,92.69,40H40A16,16,0,0,0,24,56V200.62A15.4,15.4,0,0,0,39.38,216H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72ZM92.69,56l16,16H40V56ZM216,200H40V88H216Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,72H131.31L104,44.69A15.88,15.88,0,0,0,92.69,40H40A16,16,0,0,0,24,56V200.62A15.41,15.41,0,0,0,39.39,216h177.5A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72ZM40,56H92.69l16,16H40Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,74H130.49l-27.9-27.9a13.94,13.94,0,0,0-9.9-4.1H40A14,14,0,0,0,26,56V200.62A13.39,13.39,0,0,0,39.38,214H216.89A13.12,13.12,0,0,0,230,200.89V88A14,14,0,0,0,216,74ZM40,54H92.69a2,2,0,0,1,1.41.59L113.51,74H38V56A2,2,0,0,1,40,54ZM218,200.89a1.11,1.11,0,0,1-1.11,1.11H39.38A1.4,1.4,0,0,1,38,200.62V86H216a2,2,0,0,1,2,2Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,72H131.31L104,44.69A15.86,15.86,0,0,0,92.69,40H40A16,16,0,0,0,24,56V200.62A15.4,15.4,0,0,0,39.38,216H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72ZM40,56H92.69l16,16H40ZM216,200H40V88H216Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,76H129.66L101.17,47.52A11.9,11.9,0,0,0,92.69,44H40A12,12,0,0,0,28,56V200.62A11.4,11.4,0,0,0,39.38,212H216.89A11.12,11.12,0,0,0,228,200.89V88A12,12,0,0,0,216,76ZM36,56a4,4,0,0,1,4-4H92.69a4,4,0,0,1,2.82,1.17L118.34,76H36ZM220,200.89a3.12,3.12,0,0,1-3.11,3.11H39.38A3.39,3.39,0,0,1,36,200.62V84H216a4,4,0,0,1,4,4Z`}))]])})),CF,wF=p((()=>{CF=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M248.23,112.31A20,20,0,0,0,232,104H220V88a20,20,0,0,0-20-20H132L105.34,48a20.12,20.12,0,0,0-12-4H40A20,20,0,0,0,20,64V208a12,12,0,0,0,12,12H211.1a12,12,0,0,0,11.33-8l28.49-81.47.06-.17A20,20,0,0,0,248.23,112.31ZM92,68l28.8,21.6A12,12,0,0,0,128,92h68v12H69.77a20,20,0,0,0-18.94,13.58L44,137.15V68ZM202.59,196H48.89l23.72-68H226.37Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,88v24H69.77a8,8,0,0,0-7.59,5.47L32,208V64a8,8,0,0,1,8-8H93.33a8,8,0,0,1,4.8,1.6L128,80h72A8,8,0,0,1,208,88Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Zm112,136H43.1l26.67-80H232Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M243.36,111.81A14,14,0,0,0,232,106H214V88a14,14,0,0,0-14-14H130L101.74,52.8a14.06,14.06,0,0,0-8.4-2.8H40A14,14,0,0,0,26,64V208a6,6,0,0,0,6,6H211.1a6,6,0,0,0,5.69-4.1l28.49-85.47A14,14,0,0,0,243.36,111.81ZM40,62H93.34a2,2,0,0,1,1.2.4L124.4,84.8A6,6,0,0,0,128,86h72a2,2,0,0,1,2,2v18H69.77a14,14,0,0,0-13.28,9.57L38,171V64A2,2,0,0,1,40,62Zm193.9,58.63L206.78,202H40.33l27.54-82.63a2,2,0,0,1,1.9-1.37H232a2,2,0,0,1,1.9,2.63Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Zm112,136H43.1l26.67-80H232Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M241.72,113a11.88,11.88,0,0,0-9.73-5H212V88a12,12,0,0,0-12-12H129.33l-28.8-21.6a12.05,12.05,0,0,0-7.2-2.4H40A12,12,0,0,0,28,64V208a4,4,0,0,0,4,4H211.09a4,4,0,0,0,3.79-2.74l28.49-85.47A11.86,11.86,0,0,0,241.72,113ZM40,60H93.33a4,4,0,0,1,2.4.8L125.6,83.2a4,4,0,0,0,2.4.8h72a4,4,0,0,1,4,4v20H69.76a12,12,0,0,0-11.38,8.21L36,183.35V64A4,4,0,0,1,40,60Zm195.78,61.26L208.2,204H37.55L66,118.74A4,4,0,0,1,69.76,116H232a4,4,0,0,1,3.79,5.26Z`}))]])})),TF,EF=p((()=>{TF=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,68H132L105.33,48a20.12,20.12,0,0,0-12-4H40A20,20,0,0,0,20,64V200a20,20,0,0,0,20,20H216.89A19.13,19.13,0,0,0,236,200.89V88A20,20,0,0,0,216,68Zm-4,128H44V68H92l28.8,21.6A12,12,0,0,0,128,92h84Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,88V200.89a7.11,7.11,0,0,1-7.11,7.11H40a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H93.33a8,8,0,0,1,4.8,1.6L128,80h88A8,8,0,0,1,224,88Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M232,88V200.89A15.13,15.13,0,0,1,216.89,216H40a16,16,0,0,1-16-16V64A16,16,0,0,1,40,48H93.33a16.12,16.12,0,0,1,9.6,3.2L130.67,72H216A16,16,0,0,1,232,88Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,74H130L101.73,52.8a14,14,0,0,0-8.4-2.8H40A14,14,0,0,0,26,64V200a14,14,0,0,0,14,14H216.89A13.12,13.12,0,0,0,230,200.89V88A14,14,0,0,0,216,74Zm2,126.89a1.11,1.11,0,0,1-1.11,1.11H40a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H93.33a2,2,0,0,1,1.2.4L124.4,84.8A6,6,0,0,0,128,86h88a2,2,0,0,1,2,2Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,76H129.33l-28.8-21.6a12.05,12.05,0,0,0-7.2-2.4H40A12,12,0,0,0,28,64V200a12,12,0,0,0,12,12H216.89A11.12,11.12,0,0,0,228,200.89V88A12,12,0,0,0,216,76Zm4,124.89a3.12,3.12,0,0,1-3.11,3.11H40a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H93.33a4,4,0,0,1,2.4.8L125.6,83.2a4,4,0,0,0,2.4.8h88a4,4,0,0,1,4,4Z`}))]])})),DF,OF=p((()=>{DF=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M234.29,47.91A20,20,0,0,0,216,36H40A20,20,0,0,0,25.2,69.45l.12.14L92,140.75V216a20,20,0,0,0,31.1,16.64l32-21.33A20,20,0,0,0,164,194.66V140.75l66.67-71.16.12-.14A20,20,0,0,0,234.29,47.91Zm-91,79.89A12,12,0,0,0,140,136v56.52l-24,16V136a12,12,0,0,0-3.25-8.2L49.23,60H206.77Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M221.9,61.38,152,136v58.65a8,8,0,0,1-3.56,6.66l-32,21.33A8,8,0,0,1,104,216V136L34.1,61.38A8,8,0,0,1,40,48H216A8,8,0,0,1,221.9,61.38Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M230.6,49.53A15.81,15.81,0,0,0,216,40H40A16,16,0,0,0,28.19,66.76l.08.09L96,139.17V216a16,16,0,0,0,24.87,13.32l32-21.34A16,16,0,0,0,160,194.66V139.17l67.74-72.32.08-.09A15.8,15.8,0,0,0,230.6,49.53ZM40,56h0Zm106.18,74.58A8,8,0,0,0,144,136v58.66L112,216V136a8,8,0,0,0-2.16-5.47L40,56H216Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M227.81,66.76l-.08.09L160,139.17v55.49A16,16,0,0,1,152.87,208l-32,21.34A16,16,0,0,1,96,216V139.17L28.27,66.85l-.08-.09A16,16,0,0,1,40,40H216a16,16,0,0,1,11.84,26.76Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M228.77,50.34A13.8,13.8,0,0,0,216,42H40A14,14,0,0,0,29.67,65.42l.06.07L98,138.38V216a14,14,0,0,0,21.77,11.64l32-21.33A14,14,0,0,0,158,194.66V138.38l68.33-73A13.82,13.82,0,0,0,228.77,50.34Zm-11.26,6.94L147.62,131.9A6,6,0,0,0,146,136v58.66a2,2,0,0,1-.89,1.67l-32,21.33A2,2,0,0,1,110,216V136a6,6,0,0,0-1.62-4.1L38.53,57.32A2,2,0,0,1,40,54H216a1.9,1.9,0,0,1,1.83,1.19A1.86,1.86,0,0,1,217.51,57.28Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M230.6,49.53A15.81,15.81,0,0,0,216,40H40A16,16,0,0,0,28.19,66.76l.08.09L96,139.17V216a16,16,0,0,0,24.87,13.32l32-21.34A16,16,0,0,0,160,194.66V139.17l67.74-72.32.08-.09A15.8,15.8,0,0,0,230.6,49.53ZM40,56h0Zm106.18,74.58A8,8,0,0,0,144,136v58.66L112,216V136a8,8,0,0,0-2.16-5.47L40,56H216Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M227,51.15A11.85,11.85,0,0,0,216,44H40a12,12,0,0,0-8.88,20.07l.05.05L100,137.59V216a12,12,0,0,0,18.66,10l32-21.33a12,12,0,0,0,5.35-10V137.59l68.86-73.52A11.85,11.85,0,0,0,227,51.15Zm-8,7.5-69.9,74.62A4,4,0,0,0,148,136v58.65a4,4,0,0,1-1.78,3.33l-32,21.33A4,4,0,0,1,108,216V136a4,4,0,0,0-1.08-2.74L37.05,58.67A4,4,0,0,1,40,52H216a4,4,0,0,1,3,6.65Z`}))]])})),kF,AF=p((()=>{kF=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M204,136a12,12,0,0,1-12,12H64a12,12,0,0,1,0-24H192A12,12,0,0,1,204,136Zm28-60H24a12,12,0,0,0,0,24H232a12,12,0,0,0,0-24Zm-80,96H104a12,12,0,0,0,0,24h48a12,12,0,0,0,0-24Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M200,136a8,8,0,0,1-8,8H64a8,8,0,0,1,0-16H192A8,8,0,0,1,200,136Zm32-56H24a8,8,0,0,0,0,16H232a8,8,0,0,0,0-16Zm-80,96H104a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM144,176H112a8,8,0,0,1,0-16h32a8,8,0,0,1,0,16Zm32-40H80a8,8,0,0,1,0-16h96a8,8,0,0,1,0,16Zm32-40H48a8,8,0,0,1,0-16H208a8,8,0,0,1,0,16Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M198,136a6,6,0,0,1-6,6H64a6,6,0,0,1,0-12H192A6,6,0,0,1,198,136Zm34-54H24a6,6,0,0,0,0,12H232a6,6,0,0,0,0-12Zm-80,96H104a6,6,0,0,0,0,12h48a6,6,0,0,0,0-12Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M200,136a8,8,0,0,1-8,8H64a8,8,0,0,1,0-16H192A8,8,0,0,1,200,136Zm32-56H24a8,8,0,0,0,0,16H232a8,8,0,0,0,0-16Zm-80,96H104a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M196,136a4,4,0,0,1-4,4H64a4,4,0,0,1,0-8H192A4,4,0,0,1,196,136Zm36-52H24a4,4,0,0,0,0,8H232a4,4,0,0,0,0-8Zm-80,96H104a4,4,0,0,0,0,8h48a4,4,0,0,0,0-8Z`}))]])})),jF,MF=p((()=>{jF=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z`}))]])})),NF,PF=p((()=>{NF=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z`}))]])})),FF,IF=p((()=>{FF=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H72a8,8,0,0,1,0-16H184a8,8,0,0,1,0,16Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128Z`}))]])})),LF,RF=p((()=>{LF=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z`}))]])})),zF,BF=p((()=>{zF=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,36H40A20,20,0,0,0,20,56V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36ZM44,60H76V196H44ZM212,196H100V60H212Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M88,48V208H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H80V200H40ZM216,200H96V56H216V200Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,160H88V56H216V200Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM38,200V56a2,2,0,0,1,2-2H82V202H40A2,2,0,0,1,38,200Zm180,0a2,2,0,0,1-2,2H94V54H216a2,2,0,0,1,2,2Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H80V200H40ZM216,200H96V56H216V200Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM36,200V56a4,4,0,0,1,4-4H84V204H40A4,4,0,0,1,36,200Zm184,0a4,4,0,0,1-4,4H92V52H216a4,4,0,0,1,4,4Z`}))]])})),VF,HF=p((()=>{VF=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,128a12,12,0,0,1-12,12H48a12,12,0,0,1,0-24h68A12,12,0,0,1,128,128ZM48,76H180a12,12,0,0,0,0-24H48a12,12,0,0,0,0,24Zm52,104H48a12,12,0,0,0,0,24h52a12,12,0,0,0,0-24Zm132.49-20.49a12,12,0,0,0-17,0L196,179V112a12,12,0,0,0-24,0v67l-19.51-19.52a12,12,0,0,0-17,17l40,40a12,12,0,0,0,17,0l40-40A12,12,0,0,0,232.49,159.51Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,80v88l-24,24H48V64H208A16,16,0,0,1,224,80Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M128,128a8,8,0,0,1-8,8H48a8,8,0,0,1,0-16h72A8,8,0,0,1,128,128ZM48,72H184a8,8,0,0,0,0-16H48a8,8,0,0,0,0,16Zm56,112H48a8,8,0,0,0,0,16h56a8,8,0,0,0,0-16Zm125.66-21.66a8,8,0,0,0-11.32,0L192,188.69V112a8,8,0,0,0-16,0v76.69l-26.34-26.35a8,8,0,0,0-11.32,11.32l40,40a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,229.66,162.34Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,72h96a8,8,0,0,1,0,16H72a8,8,0,0,1,0-16Zm40,112H72a8,8,0,0,1,0-16h40a8,8,0,0,1,0,16Zm8-48H72a8,8,0,0,1,0-16h48a8,8,0,0,1,0,16Zm77.66,29.66-24,24a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L160,164.69V120a8,8,0,0,1,16,0v44.69l10.34-10.35a8,8,0,0,1,11.32,11.32Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M126,128a6,6,0,0,1-6,6H48a6,6,0,0,1,0-12h72A6,6,0,0,1,126,128ZM48,70H184a6,6,0,0,0,0-12H48a6,6,0,0,0,0,12Zm56,116H48a6,6,0,0,0,0,12h56a6,6,0,0,0,0-12Zm124.24-22.24a6,6,0,0,0-8.48,0L190,193.51V112a6,6,0,0,0-12,0v81.51l-29.76-29.75a6,6,0,0,0-8.48,8.48l40,40a6,6,0,0,0,8.48,0l40-40A6,6,0,0,0,228.24,163.76Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,128a8,8,0,0,1-8,8H48a8,8,0,0,1,0-16h72A8,8,0,0,1,128,128ZM48,72H184a8,8,0,0,0,0-16H48a8,8,0,0,0,0,16Zm56,112H48a8,8,0,0,0,0,16h56a8,8,0,0,0,0-16Zm125.66-21.66a8,8,0,0,0-11.32,0L192,188.69V112a8,8,0,0,0-16,0v76.69l-26.34-26.35a8,8,0,0,0-11.32,11.32l40,40a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,229.66,162.34Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M124,128a4,4,0,0,1-4,4H48a4,4,0,0,1,0-8h72A4,4,0,0,1,124,128ZM48,68H184a4,4,0,0,0,0-8H48a4,4,0,0,0,0,8Zm56,120H48a4,4,0,0,0,0,8h56a4,4,0,0,0,0-8Zm122.83-22.83a4,4,0,0,0-5.66,0L188,198.34V112a4,4,0,0,0-8,0v86.34l-33.17-33.17a4,4,0,0,0-5.66,5.66l40,40a4,4,0,0,0,5.66,0l40-40A4,4,0,0,0,226.83,165.17Z`}))]])})),UF,WF=p((()=>{UF=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M36,128a12,12,0,0,1,12-12h68a12,12,0,0,1,0,24H48A12,12,0,0,1,36,128ZM48,76h52a12,12,0,0,0,0-24H48a12,12,0,0,0,0,24ZM180,180H48a12,12,0,0,0,0,24H180a12,12,0,0,0,0-24ZM232.49,79.51l-40-40a12,12,0,0,0-17,0l-40,40a12,12,0,0,0,17,17L172,77v67a12,12,0,0,0,24,0V77l19.51,19.52a12,12,0,0,0,17-17Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,88v88a16,16,0,0,1-16,16H48V64H200Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M40,128a8,8,0,0,1,8-8h72a8,8,0,0,1,0,16H48A8,8,0,0,1,40,128Zm8-56h56a8,8,0,0,0,0-16H48a8,8,0,0,0,0,16ZM184,184H48a8,8,0,0,0,0,16H184a8,8,0,0,0,0-16ZM229.66,82.34l-40-40a8,8,0,0,0-11.32,0l-40,40a8,8,0,0,0,11.32,11.32L176,67.31V144a8,8,0,0,0,16,0V67.31l26.34,26.35a8,8,0,0,0,11.32-11.32Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,72h40a8,8,0,0,1,0,16H72a8,8,0,0,1,0-16Zm0,48h48a8,8,0,0,1,0,16H72a8,8,0,0,1,0-16Zm96,64H72a8,8,0,0,1,0-16h96a8,8,0,0,1,0,16Zm29.66-82.34a8,8,0,0,1-11.32,0L176,91.31V136a8,8,0,0,1-16,0V91.31l-10.34,10.35a8,8,0,0,1-11.32-11.32l24-24a8,8,0,0,1,11.32,0l24,24A8,8,0,0,1,197.66,101.66Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M42,128a6,6,0,0,1,6-6h72a6,6,0,0,1,0,12H48A6,6,0,0,1,42,128Zm6-58h56a6,6,0,0,0,0-12H48a6,6,0,0,0,0,12ZM184,186H48a6,6,0,0,0,0,12H184a6,6,0,0,0,0-12ZM228.24,83.76l-40-40a6,6,0,0,0-8.48,0l-40,40a6,6,0,0,0,8.48,8.48L178,62.49V144a6,6,0,0,0,12,0V62.49l29.76,29.75a6,6,0,0,0,8.48-8.48Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M40,128a8,8,0,0,1,8-8h72a8,8,0,0,1,0,16H48A8,8,0,0,1,40,128Zm8-56h56a8,8,0,0,0,0-16H48a8,8,0,0,0,0,16ZM184,184H48a8,8,0,0,0,0,16H184a8,8,0,0,0,0-16ZM229.66,82.34l-40-40a8,8,0,0,0-11.32,0l-40,40a8,8,0,0,0,11.32,11.32L176,67.31V144a8,8,0,0,0,16,0V67.31l26.34,26.35a8,8,0,0,0,11.32-11.32Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M44,128a4,4,0,0,1,4-4h72a4,4,0,0,1,0,8H48A4,4,0,0,1,44,128Zm4-60h56a4,4,0,0,0,0-8H48a4,4,0,0,0,0,8ZM184,188H48a4,4,0,0,0,0,8H184a4,4,0,0,0,0-8ZM226.83,85.17l-40-40a4,4,0,0,0-5.66,0l-40,40a4,4,0,0,0,5.66,5.66L180,57.66V144a4,4,0,0,0,8,0V57.66l33.17,33.17a4,4,0,1,0,5.66-5.66Z`}))]])})),GF,KF=p((()=>{GF=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z`}))]])})),qF,JF=p((()=>{qF=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-12-80V80a12,12,0,0,1,24,0v52a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,172Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm-6-82V80a6,6,0,0,1,12,0v56a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,172Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm-4-84V80a4,4,0,0,1,8,0v56a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,172Z`}))]])})),YF,XF=p((()=>{YF=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z`}))]])})),ZF,QF=p((()=>{ZF=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M168.49,104.49,145,128l23.52,23.51a12,12,0,0,1-17,17L128,145l-23.51,23.52a12,12,0,0,1-17-17L111,128,87.51,104.49a12,12,0,0,1,17-17L128,111l23.51-23.52a12,12,0,0,1,17,17ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,130.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M164.24,100.24,136.48,128l27.76,27.76a6,6,0,1,1-8.48,8.48L128,136.48l-27.76,27.76a6,6,0,0,1-8.48-8.48L119.52,128,91.76,100.24a6,6,0,0,1,8.48-8.48L128,119.52l27.76-27.76a6,6,0,0,1,8.48,8.48ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M162.83,98.83,133.66,128l29.17,29.17a4,4,0,0,1-5.66,5.66L128,133.66,98.83,162.83a4,4,0,0,1-5.66-5.66L122.34,128,93.17,98.83a4,4,0,0,1,5.66-5.66L128,122.34l29.17-29.17a4,4,0,1,1,5.66,5.66ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z`}))]])})),$F,eI=p((()=>{$F=(0,_.createContext)({color:`currentColor`,size:`1em`,weight:`regular`,mirrored:!1})})),tI,nI=p((()=>{eI(),tI=_.forwardRef((e,t)=>{let{alt:n,color:r,size:i,weight:a,mirrored:o,children:s,weights:c,...l}=e,{color:u=`currentColor`,size:d,weight:f=`regular`,mirrored:p=!1,...m}=_.useContext($F);return _.createElement(`svg`,{ref:t,xmlns:`http://www.w3.org/2000/svg`,width:i??d,height:i??d,fill:r??u,viewBox:`0 0 256 256`,transform:o||p?`scale(-1, 1)`:void 0,...m,...l},!!n&&_.createElement(`title`,null,n),s,c.get(a??f))}),tI.displayName=`IconBase`})),rI,iI=p((()=>{nI(),XP(),rI=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:YP})),rI.displayName=`ArrowsClockwiseIcon`})),aI,oI=p((()=>{nI(),QP(),aI=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:ZP})),aI.displayName=`ArrowsDownUpIcon`})),sI,cI=p((()=>{nI(),eF(),sI=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:$P})),sI.displayName=`CaretDownIcon`})),lI,uI=p((()=>{nI(),nF(),lI=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:tF})),lI.displayName=`CaretLeftIcon`})),dI,fI=p((()=>{nI(),iF(),dI=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:rF})),dI.displayName=`CaretLineLeftIcon`})),pI,mI=p((()=>{nI(),oF(),pI=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:aF})),pI.displayName=`CaretLineRightIcon`})),hI,gI=p((()=>{nI(),cF(),hI=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:sF})),hI.displayName=`CaretRightIcon`})),_I,vI=p((()=>{nI(),uF(),_I=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:lF})),_I.displayName=`CaretUpIcon`})),yI,bI=p((()=>{nI(),fF(),yI=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:dF})),yI.displayName=`CaretUpDownIcon`})),xI,SI=p((()=>{nI(),mF(),xI=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:pF})),xI.displayName=`CheckIcon`})),CI,wI=p((()=>{nI(),gF(),CI=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:hF})),CI.displayName=`CheckCircleIcon`})),TI,EI=p((()=>{nI(),vF(),TI=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:_F})),TI.displayName=`CircleNotchIcon`})),DI,OI=p((()=>{nI(),bF(),DI=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:yF})),DI.displayName=`DotsThreeIcon`})),kI,AI=p((()=>{nI(),SF(),kI=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:xF})),kI.displayName=`FolderIcon`})),jI,MI=p((()=>{nI(),wF(),jI=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:CF})),jI.displayName=`FolderOpenIcon`})),NI,PI=p((()=>{nI(),EF(),NI=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:TF})),NI.displayName=`FolderSimpleIcon`})),FI,II=p((()=>{nI(),OF(),FI=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:DF})),FI.displayName=`FunnelIcon`})),LI,RI=p((()=>{nI(),AF(),LI=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:kF})),LI.displayName=`FunnelSimpleIcon`})),zI,BI=p((()=>{nI(),MF(),zI=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:jF})),zI.displayName=`InfoIcon`})),VI,HI=p((()=>{nI(),PF(),VI=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:NF})),VI.displayName=`MagnifyingGlassIcon`})),UI,WI=p((()=>{nI(),IF(),UI=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:FF})),UI.displayName=`MinusIcon`})),GI,KI=p((()=>{nI(),RF(),GI=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:LF})),GI.displayName=`PlusIcon`})),qI,JI=p((()=>{nI(),BF(),qI=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:zF})),qI.displayName=`SidebarSimpleIcon`})),YI,XI=p((()=>{nI(),HF(),YI=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:VF})),YI.displayName=`SortAscendingIcon`})),ZI,QI=p((()=>{nI(),WF(),ZI=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:UF})),ZI.displayName=`SortDescendingIcon`})),$I,eL=p((()=>{nI(),KF(),$I=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:GF})),$I.displayName=`WarningIcon`})),tL,nL=p((()=>{nI(),JF(),tL=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:qF})),tL.displayName=`WarningCircleIcon`})),rL,iL=p((()=>{nI(),XF(),rL=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:YF})),rL.displayName=`XIcon`})),aL,oL=p((()=>{nI(),QF(),aL=_.forwardRef((e,t)=>_.createElement(tI,{ref:t,...e,weights:ZF})),aL.displayName=`XCircleIcon`})),sL=p((()=>{iI(),oI(),cI(),uI(),fI(),mI(),gI(),vI(),bI(),SI(),wI(),EI(),OI(),AI(),MI(),PI(),II(),RI(),BI(),HI(),WI(),KI(),JI(),XI(),QI(),eL(),nL(),iL(),oL()}));sL(),Z();var cL=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(`div`,{className:X(`flex size-md items-center justify-center rounded-sm text-on-surface-variant transition-all hover:cursor-pointer hover:bg-neutral-container hover:text-neutral-on-container active:scale-[0.98] active:bg-neutral-container disabled:opacity-50 [&>svg]:size-sm`,e),ref:r,...i,children:[t,(0,n.jsx)(DI,{weight:`bold`})]});Z();var lL=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`inline-flex h-md items-center justify-center gap-2xs rounded-full px-2xs style-text-default--1 text-accent-default [&>svg]:size-xs`,e),ref:r,...i,children:t});Z();var uL=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`hover:bg-neutral-container-2 inline-flex h-md items-center justify-center gap-3xs rounded-md px-2xs style-text-default--1 text-on-surface-variant transition-all hover:cursor-pointer hover:bg-neutral-container active:scale-[0.98] active:bg-neutral-container disabled:opacity-50 [&>svg]:size-xs`,e),ref:r,...i,children:t});sL(),Z();var dL=({className:e,ref:t,...r})=>(0,n.jsx)(`div`,{className:X(`text-on-surface-variant [&>svg]:size-xs`,e),ref:t,...r,children:(0,n.jsx)(hI,{weight:`bold`})});Ao();var fL=ko(`inline-flex cursor-pointer items-center justify-center overflow-hidden rounded-full whitespace-nowrap transition-all select-none *:rounded-none *:bg-transparent disabled:pointer-events-none disabled:opacity-50 [&>button]:text-inherit`,{variants:{size:{large:`*:style-text-default-2 [&>button]:h-2xl [&>button]:px-md [&>button]:[&>svg]:size-lg`,medium:`*:style-text-default-0 [&>button]:h-xl [&>button]:px-sm [&>button]:[&>svg]:size-md`,small:`*:style-text-default--1 [&>button]:h-lg [&>button]:px-xs [&>button]:[&>svg]:size-sm`,extraSmall:`*:style-text-default--2 [&>button]:h-md [&>button]:px-2xs [&>button]:[&>svg]:size-xs`,iconLarge:`*:size-2xl [&>button]:size-2xl [&>button]:p-[0px] [&>button]:[&>svg]:size-lg`,iconMedium:`*:size-xl [&>button]:size-xl [&>button]:p-[0px] [&>button]:[&>svg]:size-md`,iconSmall:`*:size-lg [&>button]:size-lg [&>button]:p-[0px] [&>button]:[&>svg]:size-sm`,iconExtraSmall:`*:size-md [&>button]:size-md [&>button]:p-[0px] [&>button]:[&>svg]:size-xs`},variant:{fill:``,outline:`border`,ghost:``,soft:`border`,elevated:`shadow-xs *:active:scale-100!`},tone:{brand:`[&>*+*]:before:bg-brand-border`,accent:`[&>*+*]:before:bg-accent-border`,neutral:`[&>*+*]:before:bg-neutral-border`,error:`[&>*+*]:before:bg-error-border`,info:`[&>*+*]:before:bg-info-border`,success:`[&>*+*]:before:bg-success-border`,warning:``},orientation:{horizontal:`[&>*+*]:relative [&>*+*]:before:absolute [&>*+*]:before:top-1/2 [&>*+*]:before:left-0 [&>*+*]:before:h-1/2 [&>*+*]:before:w-px [&>*+*]:before:-translate-y-1/2 [&>*+*]:before:content-[""]`,vertical:`flex-col [&>*+*]:relative [&>*+*]:before:absolute [&>*+*]:before:top-0 [&>*+*]:before:left-1/2 [&>*+*]:before:h-px [&>*+*]:before:w-1/2 [&>*+*]:before:-translate-x-1/2 [&>*+*]:before:content-[""]`}},defaultVariants:{size:`medium`,variant:`fill`,tone:`brand`,orientation:`horizontal`},compoundVariants:[{variant:`fill`,tone:`brand`,className:`bg-brand-default text-brand-on-default [&>button:hover]:bg-brand-muted`},{variant:`fill`,tone:`accent`,className:`bg-accent-default text-accent-on-default [&>button:hover]:bg-accent-muted`},{variant:`fill`,tone:`neutral`,className:`bg-neutral-default text-neutral-on-default [&>button:hover]:bg-neutral-muted`},{variant:`fill`,tone:`error`,className:`bg-error-default text-error-on-default [&>button:hover]:bg-error-muted`},{variant:`fill`,tone:`info`,className:`bg-info-default text-info-on-default [&>button:hover]:bg-info-muted`},{variant:`fill`,tone:`success`,className:`bg-success-default text-success-on-default [&>button:hover]:bg-success-muted`},{variant:`fill`,tone:`warning`,className:`bg-warning-default text-warning-on-default [&>button:hover]:bg-warning-muted`},{variant:`outline`,tone:`brand`,className:`border-brand-border text-brand-default [&>button:hover]:bg-brand-subtle [&>button:hover]:text-brand-on-container`},{variant:`outline`,tone:`accent`,className:`border-accent-border text-accent-default [&>button:hover]:bg-accent-subtle [&>button:hover]:text-accent-on-container`},{variant:`outline`,tone:`neutral`,className:`border-neutral-border text-neutral-default [&>button:hover]:bg-neutral-subtle [&>button:hover]:text-neutral-on-container`},{variant:`outline`,tone:`error`,className:`border-error-border text-error-default [&>button:hover]:bg-error-subtle [&>button:hover]:text-error-on-container`},{variant:`outline`,tone:`info`,className:`border-info-border text-info-default [&>button:hover]:bg-info-subtle [&>button:hover]:text-info-on-container`},{variant:`outline`,tone:`success`,className:`border-success-border text-success-default [&>button:hover]:bg-success-subtle [&>button:hover]:text-success-on-container`},{variant:`outline`,tone:`warning`,className:`border-warning-border text-warning-default [&>button:hover]:bg-warning-subtle [&>button:hover]:text-warning-on-container`},{variant:`ghost`,tone:`brand`,className:`text-brand-default [&>button:hover]:bg-brand-subtle [&>button:hover]:text-brand-on-container`},{variant:`ghost`,tone:`accent`,className:`text-accent-default [&>button:hover]:bg-accent-subtle [&>button:hover]:text-accent-on-container`},{variant:`ghost`,tone:`neutral`,className:`text-neutral-default [&>button:hover]:bg-neutral-subtle [&>button:hover]:text-neutral-on-container`},{variant:`ghost`,tone:`error`,className:`text-error-default [&>button:hover]:bg-error-subtle [&>button:hover]:text-error-on-container`},{variant:`ghost`,tone:`info`,className:`text-info-default [&>button:hover]:bg-info-subtle [&>button:hover]:text-info-on-container`},{variant:`ghost`,tone:`success`,className:`text-success-default [&>button:hover]:bg-success-subtle [&>button:hover]:text-success-on-container`},{variant:`ghost`,tone:`warning`,className:`text-warning-default [&>button:hover]:bg-warning-subtle [&>button:hover]:text-warning-on-container`},{variant:`soft`,tone:`brand`,className:`border-brand-border bg-brand-container text-brand-on-container [&>button:hover]:bg-brand-container-high`},{variant:`soft`,tone:`accent`,className:`border-accent-border bg-accent-container text-accent-on-container [&>button:hover]:bg-accent-container-high`},{variant:`soft`,tone:`neutral`,className:`border-neutral-border bg-neutral-container text-neutral-on-container [&>button:hover]:bg-neutral-container-high`},{variant:`soft`,tone:`error`,className:`border-error-border bg-error-container text-error-on-container [&>button:hover]:bg-error-container-high`},{variant:`soft`,tone:`info`,className:`border-info-border bg-info-container text-info-on-container [&>button:hover]:bg-info-container-high`},{variant:`soft`,tone:`success`,className:`border-success-border bg-success-container text-success-on-container [&>button:hover]:bg-success-container-high`},{variant:`soft`,tone:`warning`,className:`border-warning-border bg-warning-container text-warning-on-container [&>button:hover]:bg-warning-container-high`},{variant:`elevated`,tone:`brand`,className:`bg-brand-container text-brand-on-container [&>button]:not-active:hover:bg-brand-container-high [&>button]:active:bg-brand-container`},{variant:`elevated`,tone:`accent`,className:`bg-accent-container text-accent-on-container [&>button]:not-active:hover:bg-accent-container-high [&>button]:active:bg-accent-container`},{variant:`elevated`,tone:`neutral`,className:`bg-surface text-on-surface [&>button]:not-active:hover:bg-neutral-container [&>button]:not-active:hover:text-neutral-on-container [&>button]:active:bg-surface`},{variant:`elevated`,tone:`error`,className:`bg-error-container text-error-on-container [&>button]:not-active:hover:bg-error-container-high [&>button]:active:bg-error-container`},{variant:`elevated`,tone:`info`,className:`bg-info-container text-info-on-container [&>button]:not-active:hover:bg-info-container-high [&>button]:active:bg-info-container`},{variant:`elevated`,tone:`success`,className:`bg-success-container text-success-on-container [&>button]:not-active:hover:bg-success-container-high [&>button]:active:bg-success-container`},{variant:`elevated`,tone:`warning`,className:`bg-warning-container text-warning-on-container [&>button]:not-active:hover:bg-warning-container-high [&>button]:active:bg-warning-container`}]});Z();var pL=({size:e,variant:t,tone:r,orientation:i,className:a,children:o,ref:s,...c})=>(0,n.jsx)(`div`,{className:X(fL({size:e,variant:t,tone:r,orientation:i}),a),ref:s,...c,children:o});Uv(),sL(),Z();var mL=({className:e,...t})=>(0,n.jsx)(Bv,{className:X(`flex`,e),...t,render:(e,t)=>t.indeterminate?(0,n.jsx)(UI,{weight:`bold`,...e,className:`text-accent-default`}):(0,n.jsx)(xI,{weight:`bold`,...e})});Ao();var hL=ko(`group flex size-md items-center justify-center rounded-sm shadow-2xs outline outline-transparent transition-colors not-indeterminate:text-accent-on-default indeterminate:text-accent-default enabled:hover:cursor-pointer enabled:hover:outline-accent-border disabled:cursor-not-allowed disabled:hover:cursor-not-allowed data-checked:bg-accent-default [&:not([data-checked])]:enabled:hover:outline-border-strong`,{variants:{variant:{elevated:`bg-surface shadow-2xs`,inSurface:`bg-surface-low shadow-none inset-shadow-2xs data-checked:inset-shadow-none`}},defaultVariants:{variant:`elevated`}});aP(),Z();var gL=({variant:e,className:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:`flex items-center gap-xs`,children:(0,n.jsx)(Rv,{className:X(hL({variant:e,className:t})),ref:r,...i,children:(0,n.jsx)(mL,{})})});aP(),Z();var _L=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Yv,{"aria-labelledby":_.default.useId(),className:X(`flex flex-col items-start gap-2xs`,e),ref:r,...i,children:t});uy(),Z();var vL=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(sy,{className:X(`ml-sm flex h-(--collapsible-panel-height) flex-col justify-end gap-3xs overflow-hidden border-l border-border pl-sm transition-all duration-150 ease-out data-ending-style:h-0 data-starting-style:h-0 [&[hidden]:not([hidden="until-found"])]:hidden`,e),ref:r,...i,children:t});uy(),sL(),dP(),Z();var yL=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(ry,{render:a=>(0,n.jsxs)(lP,{...a,tone:`neutral`,variant:`ghost`,className:X(`group/trigger flex w-full justify-start gap-xl hover:shadow-2xs data-panel-open:bg-surface data-panel-open:shadow-2xs`,e),ref:r,...i,children:[t,(0,n.jsx)(hI,{weight:`bold`,className:`ml-auto text-on-surface-variant transition-all ease-out group-data-panel-open/trigger:rotate-90`})]})});uy(),Z();var bL=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(ey,{className:X(`flex min-h-xl w-full flex-col justify-center gap-xs`,e),ref:r,...i,children:t});Z();var xL=_.default.createContext(void 0),SL=({items:e,defaultValue:t,className:r,children:i,ref:a,...o})=>{let[s,c]=_.default.useState(t);return(0,n.jsx)(xL.Provider,{value:{currentValue:s,setCurrentValue:c,items:e},children:(0,n.jsx)(`div`,{className:X(`flex flex-col rounded-xl border border-border bg-surface`,r),ref:a,...o,children:i})})};jy();var CL=({children:e,...t})=>(0,n.jsx)(dy,{...t,children:e});jy(),sL(),dP(),Z();var wL=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(Ty,{className:X(`inline-flex h-lg items-center justify-center gap-xs rounded-lg bg-neutral-container pr-3xs pl-xs style-text-default-0 text-neutral-on-container`,e),ref:r,...i,children:[t,(0,n.jsx)(Dy,{"aria-label":`Remove`,render:e=>(0,n.jsx)(lP,{onClick:e.onClick,variant:`ghost`,tone:`error`,size:`iconExtraSmall`,children:(0,n.jsx)(rL,{className:`size-sm`,weight:`bold`})})})]});jy(),Z();var TL=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(by,{"data-chips":!0,className:X(`group flex size-full flex-wrap items-center gap-2xs empty:hidden`,e),ref:r,...i,children:t});jy();var EL=({children:e,...t})=>(0,n.jsx)(Wg,{...t,children:e});jy(),Z();var DL=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Y_,{className:X(`max-h-[min(23rem,var(--available-height))] scroll-py-[0.5rem] overflow-y-auto overscroll-contain p-xs empty:m-[0px] empty:p-[0px]`,e),ref:r,...i,children:t});jy(),Z();var OL=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(N_,{className:X(`block pb-3xs`,e),ref:r,...i,children:t});jy(),Z();var kL=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(F_,{className:X(`sticky top-[0px] z-1 my-[0px] mr-[0px] -ml-2xs bg-surface-2 px-sm pt-2xs pb-3xs style-text-strong--2 text-on-surface-variant`,e),ref:r,...i,children:t}),AL,jL=p((()=>{OP(),Z(),AL=({variant:e,className:t,children:r,ref:i,...a})=>(0,n.jsx)(`div`,{className:X(DP({variant:e}),`py-xs`,t),ref:i,...a,children:r})})),ML,NL=p((()=>{Z(),ML=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`inline-flex items-center gap-2xs style-text-default-0 text-on-surface-variant group-aria-invalid:text-error-on-container`,e),ref:r,...i,children:t})})),PL,FL=p((()=>{iw(),Z(),PL=({className:e,ref:t,...r})=>(0,n.jsx)(nw,{className:X(`w-full grow text-ellipsis outline-none placeholder:opacity-60 disabled:cursor-not-allowed`,e),ref:t,...r})})),IL=p((()=>{jL(),NL(),FL()}));Ao();var LL=ko(`relative shrink-0 rounded-full`,{variants:{orientation:{horizontal:`w-full`,vertical:`h-full`},style:{rounded:`rounded-full`,square:`rounded-none`},variant:{default:`bg-neutral-border`,strong:`bg-neutral-border-strong`},weight:{thick:`[&_[data-label]]:style-text-prose-0`,medium:`[&_[data-label]]:style-text-prose--1`,thin:`[&_[data-label]]:style-text-prose--2`,thinnest:`[&_[data-label]]:style-text-prose--2`}},defaultVariants:{orientation:`horizontal`,style:`rounded`,variant:`default`,weight:`thinnest`},compoundVariants:[{orientation:`horizontal`,weight:`thick`,className:`h-[8px]`},{orientation:`horizontal`,weight:`medium`,className:`h-[4px]`},{orientation:`horizontal`,weight:`thin`,className:`h-[2px]`},{orientation:`horizontal`,weight:`thinnest`,className:`h-px`},{orientation:`vertical`,weight:`thick`,className:`w-[8px]`},{orientation:`vertical`,weight:`medium`,className:`w-[4px]`},{orientation:`vertical`,weight:`thin`,className:`w-[2px]`},{orientation:`vertical`,weight:`thinnest`,className:`w-px`}]});ky(),Z();var RL=({orientation:e,weight:t,style:r,variant:i,children:a,className:o,labelClassName:s,ref:c,...l})=>(0,n.jsx)(Z_,{className:X(`relative`,LL({orientation:e,weight:t,style:r,variant:i}),o),orientation:e,ref:c,...l,children:(0,n.jsx)(`span`,{"data-label":!0,className:X(`absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-surface-background px-2xs whitespace-nowrap text-on-surface-variant`,s),children:a})});jy(),sL(),dP(),IL(),Z();var zL=({inline:e=!1,variant:t,className:r,children:i,ref:a,...o})=>{let s=_.default.useId();return e?(0,n.jsx)(`div`,{className:`h-(--input-container-height) py-2xs pr-2xs`,children:(0,n.jsx)(kg,{className:X(`h-xl w-full rounded-lg bg-surface-low px-sm outline-border transition-all not-active:outline-1 focus-within:outline-2 hover:outline-2 focus:caret-brand-default focus:outline-brand-border data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50`,`placeholder:opacity-60`,`disabled:cursor-not-allowed`,`text-ellipsis`,r),id:s,ref:a,...o})}):(0,n.jsxs)(AL,{variant:t,className:`flex h-full! max-w-[500px] flex-wrap py-xs [&:has([data-chips]:empty)>[role=separator]]:hidden [&:has([data-chips]:not(:empty))]:rounded-xl [&:not(:has([data-chips]))>[role=separator]]:hidden`,children:[i,(0,n.jsx)(RL,{weight:`thinnest`}),(0,n.jsxs)(Ng,{className:`relative flex w-full items-center justify-between [&>input]:pr-[2rem] has-[.combobox-clear]:[&>input]:pr-[calc(0.5rem+1.5rem*2)]`,children:[(0,n.jsx)(kg,{className:X(`w-full text-ellipsis outline-none placeholder:opacity-60 disabled:cursor-not-allowed`,r),id:s,ref:a,...o}),(0,n.jsxs)(ML,{children:[(0,n.jsx)(Rg,{"aria-label":`Clear selection`,className:X(r),keepMounted:!0,render:e=>(0,n.jsx)(lP,{onClick:e.onClick,size:`iconExtraSmall`,variant:`ghost`,tone:`error`,children:(0,n.jsx)(rL,{weight:`bold`})})}),(0,n.jsx)(_g,{"aria-label":`Open popup`,render:(e,t)=>(0,n.jsx)(lP,{onClick:e.onClick,size:`iconExtraSmall`,variant:t.open?`fill`:`ghost`,tone:`brand`,children:(0,n.jsx)(sI,{weight:`bold`})})})]})]})]})};jy(),sL(),Z();var BL=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(U_,{className:X(`mr-2xs grid cursor-default grid-cols-[1fr_0.75rem] items-center gap-xs rounded-md px-2xs py-3xs style-text-default-0 select-none group-data-[side=none]:pr-xs group-data-[side=none]:leading-lg first-of-type:mt-2xs last-of-type:mb-2xs hover:cursor-pointer data-highlighted:relative data-highlighted:z-0 data-highlighted:bg-neutral-container-high data-highlighted:text-neutral-on-container data-highlighted:before:absolute data-highlighted:before:inset-x-3xs data-highlighted:before:inset-y-[0px] data-highlighted:before:z-[-1] data-highlighted:before:rounded-sm data-selected:bg-neutral-default data-selected:text-neutral-on-default pointer-coarse:py-xs`,e),ref:r,...i,children:[(0,n.jsx)(`span`,{className:`col-start-1`,children:t}),(0,n.jsx)(_y,{className:`col-start-2 place-self-end self-center`,children:(0,n.jsx)(xI,{className:`size-sm`,weight:`bold`})})]});jy(),Z();var VL=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Kg,{className:X(`max-h-[min(calc(23rem-var(--input-container-height,0rem)),calc(var(--available-height)-var(--input-container-height,0rem)))] scroll-py-[0.5rem] space-y-3xs overflow-y-auto overscroll-contain data-empty:p-[0px]`,e),ref:r,...i,children:t});jy(),Z();var HL=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(r_,{children:(0,n.jsx)(T_,{className:X(``,e),ref:r,sideOffset:20,...i,children:(0,n.jsx)(O_,{className:`max-h-[23rem] w-(--anchor-width) max-w-(--available-width) origin-(--transform-origin) rounded-xl bg-surface-2 pl-2xs shadow-md transition-[transform,scale,opacity] duration-100 [--input-container-height:4rem] data-ending-style:scale-95 data-ending-style:opacity-0 data-starting-style:scale-95 data-starting-style:opacity-0`,children:t})})});jy(),Z();var UL=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Qg,{className:X(`flex items-center gap-2xs p-xs style-text-prose--1 text-on-surface-variant empty:hidden`,e),ref:r,...i,children:t});jy(),sL(),Z();var WL=({placeholder:e,className:t,children:r,ref:i,...a})=>(0,n.jsxs)(_g,{className:X(`inline-flex h-xl items-center justify-between gap-xl rounded-xl bg-surface pr-sm pl-md style-text-default-0 outline-2 outline-transparent transition-all hover:cursor-pointer hover:outline-border data-popup-open:outline-brand-border`,t),ref:i,...a,children:[(0,n.jsx)(hy,{placeholder:(0,n.jsx)(`span`,{className:`opacity-70`,children:e})}),(0,n.jsx)(Fg,{children:(0,n.jsx)(yI,{})}),r]});jy();var GL=({children:e,...t})=>(0,n.jsx)(hy,{...t,children:e});Hx();var KL=({children:e,...t})=>(0,n.jsx)(im,{...t,children:e});Hx(),sL(),dP(),Z();var qL=({className:e,ref:t,...r})=>(0,n.jsx)(Cm,{className:X(`absolute top-2xs right-2xs`,e),ref:t,...r,render:(0,n.jsx)(lP,{"aria-label":`Close`,variant:`ghost`,size:`iconSmall`,tone:`error`,children:(0,n.jsx)(rL,{weight:`bold`})})});Z();var JL=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`flex h-full flex-col gap-2xs px-md pb-md`,e),ref:r,...i,children:t});Hx(),Z();var YL=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Tm,{className:X(`style-text-prose-0 text-on-surface-variant`,e),ref:r,...i,children:t});Z();var XL=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`flex w-full items-center justify-end gap-2xs px-md pb-md`,e),ref:r,...i,children:t});Z();var ZL=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`flex flex-col px-md pt-md pb-sm`,e),ref:r,...i,children:t});Hx(),Z();var QL=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(Vm,{children:[(0,n.jsx)(xm,{className:`fixed inset-[0px] min-h-dvh bg-scrim opacity-50 transition-all duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-[-webkit-touch-callout:none]:absolute`}),(0,n.jsx)(Fm,{className:X(`fixed top-[calc(50%+1.25rem*var(--nested-dialogs))] left-1/2 max-w-[calc(100vw-3rem)] min-w-1/6 -translate-1/2 scale-[calc(1-0.1*var(--nested-dialogs))] overflow-hidden rounded-3xl bg-surface-2 shadow-lg transition-all duration-150 data-ending-style:top-[calc(50%+0.25rem+1.25rem*var(--nested-dialogs))] data-ending-style:scale-90 data-ending-style:opacity-0 data-nested-dialog-open:after:opacity-100 data-starting-style:top-[calc(50%+0.25rem+1.25rem*var(--nested-dialogs))] data-starting-style:scale-90 data-starting-style:opacity-0`,e),ref:r,...i,children:t})]});Hx(),Z();var $L=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Um,{className:X(`flex items-center gap-2xs style-text-strong-1 [&>svg]:size-md`,e),ref:r,...i,children:t});Hx(),Z();var eR=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Gm,{className:X(``,e),ref:r,...i,render:t});aP();var tR=({children:e,...t})=>(0,n.jsx)(LS,{...t,children:e});aP(),Z();var nR=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Xx,{className:X(`shrink-0`,e),ref:r,...i,render:t});aP(),Z();var rR=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(eS,{className:X(`mx-auto w-full max-w-[32rem] space-y-3xs`,e),ref:r,...i,children:t});aP(),Z();var iR=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(nS,{className:X(`style-text-prose-0 text-on-surface-variant`,e),ref:r,...i,children:t});aP();var aR=({children:e,...t})=>(0,n.jsxs)(PS,{...t,children:[(0,n.jsx)(dS,{}),(0,n.jsx)(cS,{className:`size-full`,children:e})]});aP(),Z();var oR=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(dC,{className:X(``,e),ref:r,...i,render:t});aP(),Z();var sR=`fixed inset-0 min-h-dvh bg-scrim opacity-[calc(var(--backdrop-opacity)*(1-var(--drawer-swipe-progress)))] transition-opacity duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] [--backdrop-opacity:0.2] [--bleed:3rem] data-ending-style:opacity-0 data-ending-style:duration-[calc(var(--drawer-swipe-strength)*0.4s)] data-starting-style:opacity-0 data-swiping:duration-0 supports-[-webkit-touch-callout:none]:absolute dark:[--backdrop-opacity:0.7]`,cR=X(`fixed inset-0 flex`,`items-end justify-center`,`has-[[data-swipe-direction=up]]:items-start has-[[data-swipe-direction=up]]:justify-center`,`has-[[data-swipe-direction=right]]:items-center has-[[data-swipe-direction=right]]:justify-end`,`has-[[data-swipe-direction=left]]:items-center has-[[data-swipe-direction=left]]:justify-start`),lR=X(`touch-auto overflow-y-auto overscroll-contain bg-surface-2 p-md outline outline-border-strong transition-transform duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] data-ending-style:duration-[calc(var(--drawer-swipe-strength)*0.4s)] data-swiping:select-none`,`mb-[-3rem] max-h-[calc(80vh+3rem)] w-full transform-[translateY(var(--drawer-swipe-movement-y))] rounded-t-2xl pb-[calc(1.5rem+env(safe-area-inset-bottom,0)+3rem)] shadow-[0_-8px_24px_var(--color-shadow)] data-ending-style:transform-[translateY(calc(100%-3rem+2px))] data-starting-style:transform-[translateY(calc(100%-3rem+2px))]`,`data-[swipe-direction=up]:mt-[-3rem] data-[swipe-direction=up]:mb-0 data-[swipe-direction=up]:rounded-t-none data-[swipe-direction=up]:rounded-b-2xl data-[swipe-direction=up]:pt-[calc(1.5rem+env(safe-area-inset-top,0)+3rem)] data-[swipe-direction=up]:pb-md data-[swipe-direction=up]:shadow-[0_8px_24px_var(--color-shadow)] data-[swipe-direction=up]:data-ending-style:transform-[translateY(calc(-100%+3rem-2px))] data-[swipe-direction=up]:data-starting-style:transform-[translateY(calc(-100%+3rem-2px))]`,`data-[swipe-direction=right]:mr-[-3rem] data-[swipe-direction=right]:mb-0 data-[swipe-direction=right]:h-full data-[swipe-direction=right]:max-h-dvh data-[swipe-direction=right]:w-[23rem] data-[swipe-direction=right]:max-w-[calc(100vw-3rem)] data-[swipe-direction=right]:transform-[translateX(var(--drawer-swipe-movement-x))] data-[swipe-direction=right]:rounded-none data-[swipe-direction=right]:rounded-l-2xl data-[swipe-direction=right]:pr-[4.5rem] data-[swipe-direction=right]:pb-md data-[swipe-direction=right]:shadow-[-8px_0_24px_var(--color-shadow)] data-[swipe-direction=right]:data-ending-style:transform-[translateX(calc(100%-3rem+2px))] data-[swipe-direction=right]:data-starting-style:transform-[translateX(calc(100%-3rem+2px))]`,`data-[swipe-direction=left]:mb-0 data-[swipe-direction=left]:ml-[-3rem] data-[swipe-direction=left]:h-full data-[swipe-direction=left]:max-h-dvh data-[swipe-direction=left]:w-[23rem] data-[swipe-direction=left]:max-w-[calc(100vw-3rem)] data-[swipe-direction=left]:transform-[translateX(var(--drawer-swipe-movement-x))] data-[swipe-direction=left]:rounded-none data-[swipe-direction=left]:rounded-r-2xl data-[swipe-direction=left]:pb-md data-[swipe-direction=left]:pl-[4.5rem] data-[swipe-direction=left]:shadow-[8px_0_24px_var(--color-shadow)] data-[swipe-direction=left]:data-ending-style:transform-[translateX(calc(-100%+3rem-2px))] data-[swipe-direction=left]:data-starting-style:transform-[translateX(calc(-100%+3rem-2px))]`),uR=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(MS,{children:[(0,n.jsx)(Jx,{className:sR}),(0,n.jsx)(UC,{className:cR,children:(0,n.jsx)(AS,{className:X(lR,e),ref:r,...i,children:t})})]});aP(),Z();var dR=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(lC,{className:X(`style-text-strong-1`,e),ref:r,...i,children:t});Z();var fR=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`flex items-start justify-between pb-sm`,e),ref:r,...i,children:t});Z();var pR=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`space-y-2xs`,e),ref:r,...i,children:t}),mR=m({FieldDescription:()=>hR}),hR,gR=p((()=>{Z(),hR=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`p`,{className:X(`style-text-prose--1 text-on-surface-variant`,e),ref:r,...i,children:t})}));function _R({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}var vR,yR=p((()=>{vR=(e=>(e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e))(vR||{})}));function bR(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}function xR(e){try{++IR,e()}finally{--IR||CR()}}function SR(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=kR(n,e)}function CR(){if(!(IR>0)){for(;NR<PR;){let e=ER[NR];ER[NR++]=void 0,e.notify()}NR=0,PR=0}}function wR(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?vR.None:vR.Mutable,get(){return FR!==void 0&&OR(i,FR,DR),i._snapshot},subscribe(e){let t=bR(e),n={current:!1},r=TR(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=FR,o=t?.compare??Object.is;if(n)FR=i,++DR,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=vR.Mutable|vR.RecursedCheck);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{FR=a,n&&(i.flags&=~vR.RecursedCheck),SR(i)}}};return n?(i.flags=vR.Mutable|vR.Dirty,i.get=function(){let e=i.flags;if(e&vR.Dirty||e&vR.Pending&&jR(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&MR(e)}}else e&vR.Pending&&(i.flags=e&~vR.Pending);return FR!==void 0&&OR(i,FR,DR),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(AR(e),MR(e),CR())}},i}function TR(e){let t=()=>{let t=FR;FR=n,++DR,n.depsTail=void 0,n.flags=vR.Watching|vR.RecursedCheck;try{return e()}finally{FR=t,n.flags&=~vR.RecursedCheck,SR(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:vR.Watching|vR.RecursedCheck,notify(){let e=this.flags;e&vR.Dirty||e&vR.Pending&&jR(this.deps,this)?t():this.flags=vR.Watching},stop(){this.flags=vR.None,this.depsTail=void 0,SR(this)}};return t(),n}var ER,DR,OR,kR,AR,jR,MR,NR,PR,FR,IR,LR=p((()=>{yR(),ER=[],DR=0,{link:OR,unlink:kR,propagate:AR,checkDirty:jR,shallowPropagate:MR}=_R({update(e){return e._update()},notify(e){ER[PR++]=e,e.flags&=~vR.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=vR.Mutable|vR.Dirty,SR(e))}}),NR=0,PR=0,IR=0}));function RR(e){return typeof e==`function`?new BR(e):new zR(e)}var zR,BR,VR=p((()=>{LR(),zR=class{constructor(e){this.atom=wR(e)}setState(e){this.atom.set(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(bR(e))}},BR=class{constructor(e){this.atom=wR(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(bR(e))}}})),HR=p((()=>{LR(),VR()}));function UR(e,t){return new WR(e,t).maybeExecute}var WR,GR=p((()=>{WR=class{constructor(e,t){this.fn=e,this.options=t,this.lastExecutionTime=0,this.isPending=!1,this.maybeExecute=(...e)=>{let t=Date.now()-this.lastExecutionTime;if(this.options.leading&&t>=this.options.wait)this.execute(...e);else if(this.lastArgs=e,!this.timeoutId&&this.options.trailing){let e=this.options.wait-t;this.isPending=!0,this.timeoutId=setTimeout(()=>{this.lastArgs!==void 0&&this.execute(...this.lastArgs)},e)}},this.execute=(...e)=>{this.fn(...e),this.options.onExecute?.(e,this),this.lastExecutionTime=Date.now(),this.clearTimeout(),this.lastArgs=void 0,this.isPending=!1},this.flush=()=>{this.isPending&&this.lastArgs&&this.execute(...this.lastArgs)},this.cancel=()=>{this.clearTimeout(),this.lastArgs=void 0,this.isPending=!1},this.clearTimeout=()=>{this.timeoutId&&=(clearTimeout(this.timeoutId),void 0)},this.options.leading===void 0&&this.options.trailing===void 0&&(this.options.leading=!0,this.options.trailing=!0)}}})),KR=p((()=>{GR()})),qR,JR=p((()=>{qR=class{#e=!0;#t;#n;#r;#i;#a;#o;#s;#c=0;#l=5;#u=!1;#d=!1;#f=null;#p=()=>{this.debugLog(`Connected to event bus`),this.#a=!0,this.#u=!1,this.debugLog(`Emitting queued events`,this.#i),this.#i.forEach(e=>this.emitEventToBus(e)),this.#i=[],this.stopConnectLoop(),this.#n().removeEventListener(`tanstack-connect-success`,this.#p)};#m=()=>{if(this.#c<this.#l){this.#c++,this.dispatchCustomEvent(`tanstack-connect`,{});return}this.#n().removeEventListener(`tanstack-connect`,this.#m),this.#d=!0,this.debugLog(`Max retries reached, giving up on connection`),this.stopConnectLoop()};#h=()=>{this.#u||(this.#u=!0,this.#n().addEventListener(`tanstack-connect-success`,this.#p),this.#m())};constructor({pluginId:e,debug:t=!1,enabled:n=!0,reconnectEveryMs:r=300}){this.#t=e,this.#e=n,this.#n=this.getGlobalTarget,this.#r=t,this.debugLog(` Initializing event subscription for plugin`,this.#t),this.#i=[],this.#a=!1,this.#d=!1,this.#o=null,this.#s=r}startConnectLoop(){this.#o!==null||this.#a||(this.debugLog(`Starting connect loop (every ${this.#s}ms)`),this.#o=setInterval(this.#m,this.#s))}stopConnectLoop(){this.#u=!1,this.#o!==null&&(clearInterval(this.#o),this.#o=null,this.#i=[],this.debugLog(`Stopped connect loop`))}debugLog(...e){this.#r&&console.log(`🌴 [tanstack-devtools:${this.#t}-plugin]`,...e)}getGlobalTarget(){if(typeof globalThis<`u`&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog(`Using global event target`),globalThis.__TANSTACK_EVENT_TARGET__;if(typeof window<`u`&&window.addEventListener!==void 0)return this.debugLog(`Using window as event target`),window;let e=typeof EventTarget<`u`?new EventTarget:void 0;return e===void 0||e.addEventListener===void 0?(this.debugLog(`No event mechanism available, running in non-web environment`),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog(`Using new EventTarget as fallback`),e)}getPluginId(){return this.#t}dispatchCustomEventShim(e,t){try{let n=new Event(e,{detail:t});this.#n().dispatchEvent(n)}catch{this.debugLog(`Failed to dispatch shim event`)}}dispatchCustomEvent(e,t){try{this.#n().dispatchEvent(new CustomEvent(e,{detail:t}))}catch{this.dispatchCustomEventShim(e,t)}}emitEventToBus(e){this.debugLog(`Emitting event to client bus`,e),this.dispatchCustomEvent(`tanstack-dispatch-event`,e)}createEventPayload(e,t){return{type:`${this.#t}:${e}`,payload:t,pluginId:this.#t}}emit(e,t){if(!this.#e){this.debugLog(`Event bus client is disabled, not emitting event`,e,t);return}if(this.#f&&(this.debugLog(`Emitting event to internal event target`,e,t),this.#f.dispatchEvent(new CustomEvent(`${this.#t}:${e}`,{detail:this.createEventPayload(e,t)}))),this.#d){this.debugLog(`Previously failed to connect, not emitting to bus`);return}if(!this.#a){this.debugLog(`Bus not available, will be pushed as soon as connected`),this.#i.push(this.createEventPayload(e,t)),typeof CustomEvent<`u`&&!this.#u&&(this.#h(),this.startConnectLoop());return}return this.emitEventToBus(this.createEventPayload(e,t))}on(e,t,n){let r=n?.withEventTarget??!1,i=`${this.#t}:${e}`;if(r&&(this.#f||=new EventTarget,this.#f.addEventListener(i,e=>{t(e.detail)})),!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`,i),()=>{};let a=e=>{this.debugLog(`Received event from bus`,e.detail),t(e.detail)};return this.#n().addEventListener(i,a),this.debugLog(`Registered event to bus`,i),()=>{r&&this.#f?.removeEventListener(i,a),this.#n().removeEventListener(i,a)}}onAll(e){if(!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`),()=>{};let t=t=>{let n=t.detail;e(n)};return this.#n().addEventListener(`tanstack-devtools-global`,t),()=>this.#n().removeEventListener(`tanstack-devtools-global`,t)}onAllPluginEvents(e){if(!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`),()=>{};let t=t=>{let n=t.detail;this.#t&&n.pluginId!==this.#t||e(n)};return this.#n().addEventListener(`tanstack-devtools-global`,t),()=>this.#n().removeEventListener(`tanstack-devtools-global`,t)}}})),YR=p((()=>{JR()})),XR,ZR,QR=p((()=>{YR(),XR=class extends qR{constructor(){super({pluginId:`form-devtools`,reconnectEveryMs:1e3})}},ZR=new XR}));function $R(e,t){return typeof e==`function`?e(t):e}function ez(e,t){return rz(t).reduce((e,t)=>{if(e===null)return null;if(e!==void 0)return e[t]},e)}function tz(e,t,n){let r=rz(t);function i(e){if(!r.length)return $R(n,e);let t=r.shift();if(typeof t==`string`||typeof t==`number`&&!Array.isArray(e))return typeof e==`object`?(e===null&&(e={}),{...e,[t]:i(e[t])}):{[t]:i()};if(Array.isArray(e)&&typeof t==`number`){let n=e.slice(0,t);return[...n.length?n:Array(t),i(e[t]),...e.slice(t+1)]}return[...Array(t),i()]}return i(e)}function nz(e,t){let n=rz(t);function r(e){if(!e)return;if(n.length===1){let t=n[0];if(Array.isArray(e)&&typeof t==`number`)return e.filter((e,n)=>n!==t);let{[t]:r,...i}=e;return i}let t=n.shift();if((typeof t==`string`||typeof t==`number`&&!Array.isArray(e))&&typeof e==`object`)return{...e,[t]:r(e[t])};if(typeof t==`number`&&Array.isArray(e)){if(t>=e.length)return e;let n=e.slice(0,t);return[...n.length?n:Array(t),r(e[t]),...e.slice(t+1)]}throw Error(`It seems we have created an infinite loop in deleteBy. `)}return r(e)}function rz(e){if(Array.isArray(e))return[...e];if(typeof e!=`string`)throw Error(`Path must be a string.`);return e.replace(/(^\[)|]/gm,``).replace(/\[/g,`.`).replace(fz,vz).replace(pz,`.${vz}.`).replace(mz,`${vz}.`).replace(hz,`.${vz}`).replace(gz,`.`).split(`.`).map(e=>{if(e.startsWith(_z)){let t=e.substring(7),n=parseInt(t,10);return String(n)===t?n:t}return e})}function iz(e,t){return e.length===0?t:t.length===0?e:t.startsWith(`[`)||t.startsWith(`.`)?e+t:`${e}.${t}`}function az(e){return!(Array.isArray(e)&&e.length===0)}function oz(e,t){return t.validationLogic({form:t.form,validators:t.validators,event:{type:e,fieldName:t.fieldName,async:!1},runValidation:e=>e.validators.filter(Boolean).map(e=>({cause:e.cause,validate:e.fn}))})}function sz(e,t){let{asyncDebounceMs:n}=t,{onBlurAsyncDebounceMs:r,onChangeAsyncDebounceMs:i,onDynamicAsyncDebounceMs:a}=t.validators||{},o=n??0;return t.validationLogic({form:t.form,validators:t.validators,event:{type:e,fieldName:t.fieldName,async:!0},runValidation:t=>t.validators.filter(Boolean).map(t=>{let n=t?.cause||e,s=o;switch(n){case`change`:s=i??o;break;case`blur`:s=r??o;break;case`dynamic`:s=a??o;break;case`submit`:s=0;break}return e===`submit`&&(s=0),{cause:n,validate:t.fn,debounceMs:s}})})}function cz(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!t.has(n)||!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length||n.length===0&&!Array.isArray(e)&&!Array.isArray(t)&&(Object.getPrototypeOf(e)!==Object.prototype||Object.getPrototypeOf(t)!==Object.prototype))return!1;for(let i of n)if(!r.includes(i)||!cz(e[i],t[i]))return!1;return!0}function lz(e,t){return e==null?t:{...e,...t}}function uz(){let e=0,t,n=``;if(!wz||Sz+16>256){for(wz=Array(256),e=256;e--;)wz[e]=256*Math.random()|0;e=0,Sz=0}for(;e<16;e++)t=wz[Sz+e],e===6?n+=Cz[t&15|64]:e===8?n+=Cz[t&63|128]:n+=Cz[t],e&1&&e>1&&e<11&&(n+=`-`);return Sz++,n}function dz(e){if(typeof e!=`object`||!e)return e;if(e instanceof Date)return new Date(e.getTime());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++)t[n]=dz(e[n]);return t}if(e instanceof Map){let t=new Map;return e.forEach((e,n)=>{t.set(n,dz(e))}),t}if(e instanceof Set){let t=new Set;return e.forEach(e=>{t.add(dz(e))}),t}let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=dz(e[n]));return t}var fz,pz,mz,hz,gz,_z,vz,yz,bz,xz,Sz,Cz,wz,Tz,Ez=p((()=>{for(KR(),QR(),fz=/^(\d+)$/gm,pz=/\.(\d+)(?=\.)/gm,mz=/^(\d+)\./gm,hz=/\.(\d+$)/gm,gz=/\.{2,}/gm,_z=`__int__`,vz=`${_z}$1`,yz=e=>!!e&&typeof e==`object`&&(`fields`in e),bz=({newFormValidatorError:e,isPreviousErrorFromFormValidator:t,previousErrorValue:n})=>e?{newErrorValue:e,newSource:`form`}:t?{newErrorValue:void 0,newSource:void 0}:n?{newErrorValue:n,newSource:`field`}:{newErrorValue:void 0,newSource:void 0},xz=({formLevelError:e,fieldLevelError:t})=>t?{newErrorValue:t,newSource:`field`}:e?{newErrorValue:e,newSource:`form`}:{newErrorValue:void 0,newSource:void 0},Sz=256,Cz=[];Sz--;)Cz[Sz]=(Sz+256).toString(16).substring(1);Tz=UR(e=>ZR.emit(`form-state`,{id:e.formId,state:e.store.state}),{wait:300})})),Dz,Oz=p((()=>{Dz=e=>{if(!e.validators)return e.runValidation({validators:[],form:e.form});let t=e.event.async,n=t?void 0:{fn:e.validators.onMount,cause:`mount`},r={fn:t?e.validators.onChangeAsync:e.validators.onChange,cause:`change`},i={fn:t?e.validators.onBlurAsync:e.validators.onBlur,cause:`blur`},a={fn:t?e.validators.onSubmitAsync:e.validators.onSubmit,cause:`submit`},o=t?void 0:{fn:()=>void 0,cause:`server`};switch(e.event.type){case`mount`:return e.runValidation({validators:[n],form:e.form});case`submit`:return e.runValidation({validators:[r,i,a,o],form:e.form});case`server`:return e.runValidation({validators:[],form:e.form});case`blur`:return e.runValidation({validators:[i,o],form:e.form});case`change`:return e.runValidation({validators:[r,o],form:e.form});default:throw Error(`Unknown validation event type: ${e.event.type}`)}}}));function kz(e,t){let n=new Map;for(let r of e){let e=r.path??[],i=t,a=``;for(let t=0;t<e.length;t++){let n=e[t];if(n===void 0)continue;let r=typeof n==`object`?n.key:n,o=Number(r);Array.isArray(i)&&!Number.isNaN(o)?a+=`[${o}]`:a+=(t>0?`.`:``)+String(r),i=typeof i==`object`&&i?i[r]:void 0}n.set(a,(n.get(a)??[]).concat(r))}return Object.fromEntries(n)}var Az,jz,Mz,Nz=p((()=>{Az=(e,t)=>{let n=kz(e,t);return{form:n,fields:n}},jz={validate({value:e,validationSource:t},n){let r=n[`~standard`].validate(e);if(r instanceof Promise)throw Error(`async function passed to sync validator`);if(r.issues)return t===`field`?r.issues:Az(r.issues,e)},async validateAsync({value:e,validationSource:t},n){let r=await n[`~standard`].validate(e);if(r.issues)return t===`field`?r.issues:Az(r.issues,e)}},Mz=e=>!!e&&`~standard`in e}));function Pz(e){function t(t){let n=e.getFieldMeta(t)??Fz;e.setFieldMeta(t,{...n,_arrayVersion:(n._arrayVersion||0)+1})}function n(n,r,i){t(n);let a=s(n,r,`move`,i),c=Math.min(r,i),u=Math.max(r,i);for(let e=c;e<=u;e++)a.push(o(n,e));let d=Object.keys(e.fieldInfo).reduce((t,i)=>(i.startsWith(o(n,r))&&t.set(i,e.getFieldMeta(i)),t),new Map);l(a,r<i?`up`:`down`),Object.keys(e.fieldInfo).filter(e=>e.startsWith(o(n,i))).forEach(t=>{let a=t.replace(o(n,i),o(n,r)),s=d.get(a);s&&e.setFieldMeta(t,s)})}function r(e,n){t(e),l(s(e,n,`remove`),`up`)}function i(n,r,i){t(n),s(n,r,`swap`,i).forEach(t=>{if(!t.toString().startsWith(o(n,r)))return;let a=t.toString().replace(o(n,r),o(n,i)),[s,c]=[e.getFieldMeta(t),e.getFieldMeta(a)];s&&e.setFieldMeta(a,s),c&&e.setFieldMeta(t,c)})}function a(n,r){t(n);let i=s(n,r,`insert`);l(i,`down`),i.forEach(t=>{t.toString().startsWith(o(n,r))&&e.setFieldMeta(t,u())})}function o(e,t){return`${e}[${t}]`}function s(t,n,r,i){let a=[o(t,n)];switch(r){case`swap`:a.push(o(t,i));break;case`move`:{let[e,r]=[Math.min(n,i),Math.max(n,i)];for(let n=e;n<=r;n++)a.push(o(t,n));break}default:{let r=e.getFieldValue(t),i=Array.isArray(r)?r.length:0;for(let e=n+1;e<i;e++)a.push(o(t,e));break}}return Object.keys(e.fieldInfo).filter(e=>a.some(t=>e.startsWith(t)))}function c(e,t){return e.replace(/\[(\d+)\]/,(e,n)=>{let r=parseInt(n,10);return`[${t===`up`?r+1:Math.max(0,r-1)}]`})}function l(t,n){(n===`up`?t:[...t].reverse()).forEach(t=>{let r=c(t.toString(),n),i=e.getFieldMeta(r);i?e.setFieldMeta(t,i):e.setFieldMeta(t,u())})}let u=()=>Fz;return{bumpArrayVersion:t,handleArrayMove:n,handleArrayRemove:r,handleArraySwap:i,handleArrayInsert:a}}var Fz,Iz=p((()=>{Fz={isValidating:!1,isTouched:!1,isBlurred:!1,isDirty:!1,isPristine:!0,isValid:!0,isDefaultValue:!0,errors:[],errorMap:{},errorSourceMap:{},_arrayVersion:0}}));function Lz(e){return{values:e.values??{},errorMap:e.errorMap??{},fieldMetaBase:e.fieldMetaBase??{},isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,isSubmitSuccessful:e.isSubmitSuccessful??!1,validationMetaMap:e.validationMetaMap??{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}}}function Rz(e){return e?yz(e)?{formError:Rz(e.form).formError,fieldErrors:e.fields}:{formError:e}:{formError:void 0}}function zz(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}var Bz,Vz=p((()=>{HR(),Ez(),Oz(),Nz(),Iz(),QR(),Bz=class{constructor(e){this.options={},this.fieldInfo={},this.mount=()=>{let e=this.store.subscribe(()=>{Tz(this)}),t=ZR.on(`request-form-state`,e=>{e.payload.id===this._formId&&ZR.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options})}),n=ZR.on(`request-form-reset`,e=>{e.payload.id===this._formId&&this.reset()}),r=ZR.on(`request-form-force-submit`,e=>{e.payload.id===this._formId&&(this._devtoolsSubmissionOverride=!0,this.handleSubmit(),this._devtoolsSubmissionOverride=!1)}),i=()=>{r(),n(),t(),e.unsubscribe(),ZR.emit(`form-unmounted`,{id:this._formId})};this.options.listeners?.onMount?.({formApi:this});let{onMount:a}=this.options.validators||{};return ZR.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options}),a&&this.validateSync(`mount`),i},this.update=e=>{if(!e)return;let t=this.options;this.options=e;let n=e.defaultValues&&!cz(e.defaultValues,t.defaultValues)&&!this.state.isTouched,r=!cz(e.defaultState,t.defaultState)&&!this.state.isTouched;!n&&!r||(xR(()=>{this.baseStore.setState(()=>Lz(Object.assign({},this.state,r?e.defaultState:{},n?{values:e.defaultValues}:{})))}),ZR.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options}))},this.reset=(e,t)=>{let{fieldMeta:n}=this.state,r=this.resetFieldMeta(n);e&&!t?.keepDefaultValues&&(this.options={...this.options,defaultValues:e}),this.baseStore.setState(()=>{let t=e??this.options.defaultValues??this.options.defaultState?.values;return e||Object.values(this.fieldInfo).forEach(e=>{e.instance&&e.instance.options.defaultValue!==void 0&&(t=tz(t,e.instance.name,e.instance.options.defaultValue))}),Lz({...this.options.defaultState,values:t,fieldMetaBase:r})})},this.validateAllFields=async e=>{let t=[];return xR(()=>{Object.values(this.fieldInfo).forEach(n=>{if(!n.instance)return;let r=n.instance;t.push(Promise.resolve().then(()=>r.validate(e,{skipFormValidation:!0}))),n.instance.state.meta.isTouched||n.instance.setMeta(e=>({...e,isTouched:!0}))})}),(await Promise.all(t)).flat()},this.validateArrayFieldsStartingFrom=async(e,t,n)=>{let r=this.getFieldValue(e),i=Array.isArray(r)?Math.max(r.length-1,0):null,a=[`${e}[${t}]`];for(let n=t+1;n<=(i??0);n++)a.push(`${e}[${n}]`);let o=Object.keys(this.fieldInfo).filter(e=>a.some(t=>e.startsWith(t))),s=[];return xR(()=>{o.forEach(e=>{s.push(Promise.resolve().then(()=>this.validateField(e,n)))})}),(await Promise.all(s)).flat()},this.validateField=(e,t)=>{let n=this.fieldInfo[e]?.instance;if(!n){let{hasErrored:n}=this.validateSync(t);return n&&!this.options.asyncAlways?this.getFieldMeta(e)?.errors??[]:this.validateAsync(t).then(()=>this.getFieldMeta(e)?.errors??[])}return n.state.meta.isTouched||n.setMeta(e=>({...e,isTouched:!0})),n.validate(t)},this.validateSync=e=>{let t=oz(e,{...this.options,form:this,validationLogic:this.options.validationLogic||Dz}),n=!1,r={};return xR(()=>{for(let e of t){if(!e.validate)continue;let{formError:t,fieldErrors:i}=Rz(this.runValidator({validate:e.validate,value:{value:this.state.values,formApi:this,validationSource:`form`},type:`validate`})),a=zz(e.cause),o=new Set([...Object.keys(this.state.fieldMeta),...Object.keys(i||{})]);for(let e of o){if(this.baseStore.state.fieldMetaBase[e]===void 0&&!i?.[e])continue;let{errorMap:t,errorSourceMap:n}=this.getFieldMeta(e)??Fz,o=i?.[e],{newErrorValue:s,newSource:c}=bz({newFormValidatorError:o,isPreviousErrorFromFormValidator:n?.[a]===`form`,previousErrorValue:t?.[a]});c===`form`&&(r[e]={...r[e],[a]:o}),t?.[a]!==s&&this.setFieldMeta(e,(e=Fz)=>({...e,errorMap:{...e.errorMap,[a]:s},errorSourceMap:{...e.errorSourceMap,[a]:c}}))}this.state.errorMap?.[a]!==t&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[a]:t}})),(t||i)&&(n=!0)}let i=zz(`submit`);this.state.errorMap?.[i]&&e!==`submit`&&!n&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[i]:void 0}}));let a=zz(`server`);this.state.errorMap?.[a]&&e!==`server`&&!n&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[a]:void 0}}))}),{hasErrored:n,fieldsErrorMap:r}},this.validateAsync=async e=>{let t=sz(e,{...this.options,form:this,validationLogic:this.options.validationLogic||Dz});this.state.isFormValidating||this.baseStore.setState(e=>({...e,isFormValidating:!0}));let n=[],r;for(let e of t){if(!e.validate)continue;let t=zz(e.cause);this.state.validationMetaMap[t]?.lastAbortController.abort();let i=new AbortController;this.state.validationMetaMap[t]={lastAbortController:i},n.push(new Promise(async t=>{let n;try{n=await new Promise((t,n)=>{setTimeout(async()=>{if(i.signal.aborted)return t(void 0);try{t(await this.runValidator({validate:e.validate,value:{value:this.state.values,formApi:this,validationSource:`form`,signal:i.signal},type:`validateAsync`}))}catch(e){n(e)}},e.debounceMs)})}catch(e){n=e}let{formError:a,fieldErrors:o}=Rz(n);o&&(r=r?{...r,...o}:o);let s=zz(e.cause);for(let e of Object.keys(this.state.fieldMeta)){if(this.baseStore.state.fieldMetaBase[e]===void 0)continue;let t=this.getFieldMeta(e);if(!t)continue;let{errorMap:n,errorSourceMap:i}=t,a=r?.[e],{newErrorValue:o,newSource:c}=bz({newFormValidatorError:a,isPreviousErrorFromFormValidator:i?.[s]===`form`,previousErrorValue:n?.[s]});n?.[s]!==o&&this.setFieldMeta(e,e=>({...e,errorMap:{...e.errorMap,[s]:o},errorSourceMap:{...e.errorSourceMap,[s]:c}}))}this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[s]:a}})),t(r?{fieldErrors:r,errorMapKey:s}:void 0)}))}let i=[],a={};if(n.length){i=await Promise.all(n);for(let e of i)if(e?.fieldErrors){let{errorMapKey:t}=e;for(let[n,r]of Object.entries(e.fieldErrors))a[n]={...a[n]||{},[t]:r}}}return this.baseStore.setState(e=>({...e,isFormValidating:!1})),a},this.validate=e=>{let{hasErrored:t,fieldsErrorMap:n}=this.validateSync(e);return t&&!this.options.asyncAlways?n:this.validateAsync(e)},this._handleSubmit=async e=>{this.baseStore.setState(e=>({...e,isSubmitted:!1,submissionAttempts:e.submissionAttempts+1,isSubmitSuccessful:!1})),xR(()=>{Object.values(this.fieldInfo).forEach(e=>{e.instance&&(e.instance.state.meta.isTouched||e.instance.setMeta(e=>({...e,isTouched:!0})))})});let t=e??this.options.onSubmitMeta;if(!this.state.canSubmit&&!this._devtoolsSubmissionOverride){this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t});return}this.baseStore.setState(e=>({...e,isSubmitting:!0}));let n=()=>{this.baseStore.setState(e=>({...e,isSubmitting:!1}))};if(await this.validateAllFields(`submit`),!this.state.isFieldsValid){n(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t}),ZR.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`validateAllFields`,errors:Object.values(this.state.fieldMeta).map(e=>e.errors).flat()});return}if(await this.validate(`submit`),!this.state.isValid){n(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t}),ZR.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`validate`,errors:this.state.errors});return}xR(()=>{Object.values(this.fieldInfo).forEach(e=>{e.instance?.options.listeners?.onSubmit?.({value:e.instance.state.value,fieldApi:e.instance})})}),this.options.listeners?.onSubmit?.({formApi:this,meta:t});try{await this.options.onSubmit?.({value:this.state.values,formApi:this,meta:t}),xR(()=>{this.baseStore.setState(e=>({...e,isSubmitted:!0,isSubmitSuccessful:!0})),ZR.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!0}),n()})}catch(e){throw this.baseStore.setState(e=>({...e,isSubmitSuccessful:!1})),ZR.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`inflight`,onError:e}),n(),e}},this.getFieldValue=e=>ez(this.state.values,e),this.getFieldMeta=e=>this.state.fieldMeta[e],this.getFieldInfo=e=>this.fieldInfo[e]||={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.setFieldMeta=(e,t)=>{this.baseStore.setState(n=>({...n,fieldMetaBase:{...n.fieldMetaBase,[e]:$R(t,n.fieldMetaBase[e])}}))},this.resetFieldMeta=e=>Object.keys(e).reduce((e,t)=>{let n=t;return e[n]=Fz,e},{}),this.setFieldValue=(e,t,n)=>{let r=n?.dontUpdateMeta??!1,i=n?.dontRunListeners??!1,a=n?.dontValidate??!1;xR(()=>{r||this.setFieldMeta(e,e=>({...e,isTouched:!0,isDirty:!0,errorMap:{...e?.errorMap,onMount:void 0}})),this.baseStore.setState(n=>({...n,values:tz(n.values,e,t)}))}),i||this.getFieldInfo(e).instance?.triggerOnChangeListener(),a||this.validateField(e,`change`)},this.deleteField=e=>{let t=[...Object.keys(this.fieldInfo).filter(t=>{let n=e.toString();return t!==n&&t.startsWith(n)}),e];this.baseStore.setState(e=>{let n={...e};return t.forEach(e=>{n.values=nz(n.values,e),delete this.fieldInfo[e],delete n.fieldMetaBase[e]}),n})},this.pushFieldValue=(e,t,n)=>{this.setFieldValue(e,e=>[...Array.isArray(e)?e:[],t],n),Pz(this).bumpArrayVersion(e)},this.insertFieldValue=async(e,t,n,r)=>{this.setFieldValue(e,e=>[...e.slice(0,t),n,...e.slice(t)],lz(r,{dontValidate:!0}));let i=r?.dontValidate??!1;i||await this.validateField(e,`change`),Pz(this).handleArrayInsert(e,t),i||await this.validateArrayFieldsStartingFrom(e,t,`change`)},this.replaceFieldValue=async(e,t,n,r)=>{this.setFieldValue(e,e=>e.map((e,r)=>r===t?n:e),lz(r,{dontValidate:!0})),Pz(this).bumpArrayVersion(e),(r?.dontValidate??!1)||(await this.validateField(e,`change`),await this.validateArrayFieldsStartingFrom(e,t,`change`))},this.removeFieldValue=async(e,t,n)=>{let r=this.getFieldValue(e),i=Array.isArray(r)?Math.max(r.length-1,0):null;if(this.setFieldValue(e,e=>e.filter((e,n)=>n!==t),lz(n,{dontValidate:!0})),Pz(this).handleArrayRemove(e,t),i!==null){let t=`${e}[${i}]`;this.deleteField(t)}(n?.dontValidate??!1)||(await this.validateField(e,`change`),await this.validateArrayFieldsStartingFrom(e,t,`change`))},this.swapFieldValues=(e,t,n,r)=>{this.setFieldValue(e,e=>{let r=e[t],i=e[n];return tz(tz(e,`${t}`,i),`${n}`,r)},lz(r,{dontValidate:!0})),Pz(this).handleArraySwap(e,t,n),(r?.dontValidate??!1)||(this.validateField(e,`change`),this.validateField(`${e}[${t}]`,`change`),this.validateField(`${e}[${n}]`,`change`))},this.moveFieldValues=(e,t,n,r)=>{this.setFieldValue(e,e=>{let r=[...e];return r.splice(n,0,r.splice(t,1)[0]),r},lz(r,{dontValidate:!0})),Pz(this).handleArrayMove(e,t,n),(r?.dontValidate??!1)||(this.validateField(e,`change`),this.validateField(`${e}[${t}]`,`change`),this.validateField(`${e}[${n}]`,`change`))},this.clearFieldValues=(e,t)=>{let n=this.getFieldValue(e),r=Array.isArray(n)?Math.max(n.length-1,0):null;if(this.setFieldValue(e,[],lz(t,{dontValidate:!0})),Pz(this).bumpArrayVersion(e),r!==null)for(let t=0;t<=r;t++){let n=`${e}[${t}]`;this.deleteField(n)}(t?.dontValidate??!1)||this.validateField(e,`change`)},this.resetField=e=>{this.baseStore.setState(t=>{let n=this.getFieldInfo(e).instance?.options.defaultValue,r=ez(this.options.defaultValues,e),i=n??r;return{...t,fieldMetaBase:{...t.fieldMetaBase,[e]:Fz},values:i===void 0?t.values:tz(t.values,e,i)}})},this.setErrorMap=e=>{xR(()=>{Object.entries(e).forEach(([e,t])=>{let n=e;if(yz(t)){let{formError:e,fieldErrors:r}=Rz(t);for(let e of Object.keys(this.fieldInfo))this.getFieldMeta(e)&&this.setFieldMeta(e,t=>({...t,errorMap:{...t.errorMap,[n]:r?.[e]},errorSourceMap:{...t.errorSourceMap,[n]:`form`}}));this.baseStore.setState(t=>({...t,errorMap:{...t.errorMap,[n]:e}}))}else this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[n]:t}}))})})},this.getAllErrors=()=>({form:{errors:this.state.errors,errorMap:this.state.errorMap},fields:Object.entries(this.state.fieldMeta).reduce((e,[t,n])=>(Object.keys(n).length&&n.errors.length&&(e[t]={errors:n.errors,errorMap:n.errorMap}),e),{})}),this.parseValuesWithSchema=e=>jz.validate({value:this.state.values,validationSource:`form`},e),this.parseValuesWithSchemaAsync=e=>jz.validateAsync({value:this.state.values,validationSource:`form`},e),this.timeoutIds={validations:{},listeners:{},formListeners:{}},this._formId=e?.formId??uz(),this._devtoolsSubmissionOverride=!1;let t=Lz({...e?.defaultState,values:e?.defaultValues??e?.defaultState?.values});if(e?.transform){t=e.transform({state:t}).state;for(let e of Object.keys(t.errorMap)){let n=t.errorMap[e];if(!(n===void 0||!yz(n)))for(let r of Object.keys(n.fields)){let i=n.fields[r];if(i===void 0)continue;let a=t.fieldMetaBase[r];t.fieldMetaBase[r]={isTouched:!1,isValidating:!1,isBlurred:!1,isDirty:!1,_arrayVersion:0,...a??{},errorSourceMap:{...a?.errorSourceMap??{},onChange:`form`},errorMap:{...a?.errorMap??{},[e]:i}}}}}this.baseStore=RR(t);let n;this.fieldMetaDerived=RR(e=>{let t=this.baseStore.get(),r=0,i={};for(let a of Object.keys(t.fieldMetaBase)){let o=t.fieldMetaBase[a],s=n?.fieldMetaBase[a],c=e?.[a],l=ez(t.values,a),u=c?.errors;if(!s||o.errorMap!==s.errorMap){u=Object.values(o.errorMap??{}).filter(e=>e!==void 0);let e=this.getFieldInfo(a)?.instance;(!e||!e.options.disableErrorFlat)&&(u=u.flat(1))}let d=!az(u),f=!o.isDirty,p=cz(l,this.getFieldInfo(a)?.instance?.options.defaultValue??ez(this.options.defaultValues,a));if(c&&c.isPristine===f&&c.isValid===d&&c.isDefaultValue===p&&c.errors===u&&o===s){i[a]=c,r++;continue}i[a]={...o,errors:u??[],isPristine:f,isValid:d,isDefaultValue:p}}return Object.keys(t.fieldMetaBase).length?e&&r===Object.keys(t.fieldMetaBase).length?e:(n=this.baseStore.get(),i):i});let r;this.store=RR(e=>{let t=this.baseStore.get(),n=this.fieldMetaDerived.get(),i=Object.values(n).filter(Boolean),a=i.some(e=>e.isValidating),o=i.every(e=>e.isValid),s=i.some(e=>e.isTouched),c=i.some(e=>e.isBlurred),l=i.every(e=>e.isDefaultValue),u=s&&t.errorMap?.onMount,d=i.some(e=>e.isDirty),f=!d,p=!!(t.errorMap?.onMount||i.some(e=>e?.errorMap?.onMount)),m=!!a,h=e?.errors??[];(!r||t.errorMap!==r.errorMap)&&(h=Object.values(t.errorMap).reduce((e,t)=>t===void 0?e:t&&yz(t)?(e.push(t.form),e):(e.push(t),e),[]));let g=h.length===0,_=o&&g,v=this.options.canSubmitWhenInvalid??!1,y=t.submissionAttempts===0&&!s&&!p||!m&&!t.isSubmitting&&_||v,b=t.errorMap;if(u&&(h=h.filter(e=>e!==t.errorMap.onMount),b=Object.assign(b,{onMount:void 0})),e&&r&&e.errorMap===b&&e.fieldMeta===this.fieldMetaDerived.state&&e.errors===h&&e.isFieldsValidating===a&&e.isFieldsValid===o&&e.isFormValid===g&&e.isValid===_&&e.canSubmit===y&&e.isTouched===s&&e.isBlurred===c&&e.isPristine===f&&e.isDefaultValue===l&&e.isDirty===d&&cz(r,t))return e;let x={...t,errorMap:b,fieldMeta:this.fieldMetaDerived.state,errors:h,isFieldsValidating:a,isFieldsValid:o,isFormValid:g,isValid:_,canSubmit:y,isTouched:s,isBlurred:c,isPristine:f,isDefaultValue:l,isDirty:d};return r=this.baseStore.get(),x}),this.handleSubmit=this.handleSubmit.bind(this),this.update(e||{})}get state(){return this.store.state}get formId(){return this._formId}runValidator(e){return Mz(e.validate)?jz[e.type](e.value,e.validate):e.validate(e.value)}handleSubmit(e){return this._handleSubmit(e)}}}));function Hz(e){if(e)return e}function Uz(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}var Wz,Gz=p((()=>{HR(),Nz(),Iz(),Ez(),Oz(),Wz=class{constructor(e){this.options={},this.mount=()=>{this.options.defaultValue!==void 0&&!this.getMeta().isTouched&&this.form.setFieldValue(this.name,this.options.defaultValue,{dontUpdateMeta:!0});let e=this.getInfo();e.instance=this,this.update(this.options);let{onMount:t}=this.options.validators||{};if(t){let e=this.runValidator({validate:t,value:{value:this.state.value,fieldApi:this,validationSource:`field`},type:`validate`});e&&this.setMeta(t=>({...t,errorMap:{...t?.errorMap,onMount:e},errorSourceMap:{...t?.errorSourceMap,onMount:`field`}}))}return this.options.listeners?.onMount?.({value:this.state.value,fieldApi:this}),()=>{for(let[e,t]of Object.entries(this.timeoutIds.validations))t&&(clearTimeout(t),this.timeoutIds.validations[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.listeners))t&&(clearTimeout(t),this.timeoutIds.listeners[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.formListeners))t&&(clearTimeout(t),this.timeoutIds.formListeners[e]=null);let e=this.form.fieldInfo[this.name];if(e&&e.instance===this){for(let[t,n]of Object.entries(e.validationMetaMap))n?.lastAbortController.abort(),e.validationMetaMap[t]=void 0;this.form.baseStore.setState(e=>({...e,fieldMetaBase:{...e.fieldMetaBase,[this.name]:{...Fz,isTouched:e.fieldMetaBase[this.name]?.isTouched??Fz.isTouched,isBlurred:e.fieldMetaBase[this.name]?.isBlurred??Fz.isBlurred,isDirty:e.fieldMetaBase[this.name]?.isDirty??Fz.isDirty}}})),e.instance=null,this.options.listeners?.onUnmount?.({value:this.state.value,fieldApi:this}),this.form.options.listeners?.onFieldUnmount?.({formApi:this.form,fieldApi:this})}}},this.update=e=>{this.options=e,this.name=e.name,!this.state.meta.isTouched&&this.options.defaultValue!==void 0&&(cz(this.form.getFieldValue(this.name),e.defaultValue)||this.form.setFieldValue(this.name,e.defaultValue,{dontUpdateMeta:!0,dontValidate:!0,dontRunListeners:!0})),this.form.getFieldMeta(this.name)||this.form.setFieldMeta(this.name,this.state.meta)},this.getValue=()=>this.form.getFieldValue(this.name),this.setValue=(e,t)=>{this.form.setFieldValue(this.name,e,lz(t,{dontRunListeners:!0,dontValidate:!0})),t?.dontRunListeners||this.triggerOnChangeListener(),t?.dontValidate||this.validate(`change`)},this.getMeta=()=>this.store.state.meta,this.setMeta=e=>this.form.setFieldMeta(this.name,e),this.getInfo=()=>this.form.getFieldInfo(this.name),this.pushValue=(e,t)=>{this.form.pushFieldValue(this.name,e,lz(t,{dontRunListeners:!0})),t?.dontRunListeners||this.triggerOnChangeListener()},this.insertValue=(e,t,n)=>{this.form.insertFieldValue(this.name,e,t,lz(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.replaceValue=(e,t,n)=>{this.form.replaceFieldValue(this.name,e,t,lz(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.removeValue=(e,t)=>{this.form.removeFieldValue(this.name,e,lz(t,{dontRunListeners:!0})),t?.dontRunListeners||this.triggerOnChangeListener()},this.swapValues=(e,t,n)=>{this.form.swapFieldValues(this.name,e,t,lz(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.moveValue=(e,t,n)=>{this.form.moveFieldValues(this.name,e,t,lz(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.clearValues=e=>{this.form.clearFieldValues(this.name,lz(e,{dontRunListeners:!0})),e?.dontRunListeners||this.triggerOnChangeListener()},this.getLinkedFields=e=>{let t=Object.values(this.form.fieldInfo),n=[];for(let r of t){if(!r.instance)continue;let{onChangeListenTo:t,onBlurListenTo:i}=r.instance.options.validators||{};e===`change`&&t?.includes(this.name)&&n.push(r.instance),e===`blur`&&i?.includes(this.name)&&n.push(r.instance)}return n},this.validateSync=(e,t)=>{let n=oz(e,{...this.options,form:this.form,fieldName:this.name,validationLogic:this.form.options.validationLogic||Dz}),r=this.getLinkedFields(e).reduce((t,n)=>{let r=oz(e,{...n.options,form:n.form,fieldName:n.name,validationLogic:n.form.options.validationLogic||Dz});return r.forEach(e=>{e.field=n}),t.concat(r)},[]),i=!1;xR(()=>{let e=(e,n)=>{let r=Uz(n.cause),a=n.validate?Hz(e.runValidator({validate:n.validate,value:{value:e.store.state.value,validationSource:`field`,fieldApi:e},type:`validate`})):void 0,o=t[r],{newErrorValue:s,newSource:c}=xz({formLevelError:o,fieldLevelError:a});e.state.meta.errorMap?.[r]!==s&&e.setMeta(e=>({...e,errorMap:{...e.errorMap,[r]:s},errorSourceMap:{...e.errorSourceMap,[r]:c}})),s&&(i=!0)};for(let t of n)e(this,t);for(let t of r)t.validate&&e(t.field,t)});let a=Uz(`submit`);return this.state.meta.errorMap?.[a]&&e!==`submit`&&!i&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,[a]:void 0},errorSourceMap:{...e.errorSourceMap,[a]:void 0}})),{hasErrored:i}},this.validateAsync=async(e,t)=>{let n=sz(e,{...this.options,form:this.form,fieldName:this.name,validationLogic:this.form.options.validationLogic||Dz}),r=await t,i=this.getLinkedFields(e),a=i.reduce((t,n)=>{let r=sz(e,{...n.options,form:n.form,fieldName:n.name,validationLogic:n.form.options.validationLogic||Dz});return r.forEach(e=>{e.field=n}),t.concat(r)},[]),o=[],s=[],c=n.some(e=>e.validate)||a.some(e=>e.validate);if(c){this.state.meta.isValidating||this.setMeta(e=>({...e,isValidating:!0}));for(let e of i)e.setMeta(e=>({...e,isValidating:!0}))}let l=(e,t,n)=>{let i=Uz(t.cause),a=e.getInfo();a.validationMetaMap[i]?.lastAbortController.abort();let o=new AbortController;a.validationMetaMap[i]={lastAbortController:o},n.push(new Promise(async n=>{let a;try{a=await new Promise((n,r)=>{e.timeoutIds.validations[t.cause]&&clearTimeout(e.timeoutIds.validations[t.cause]),e.timeoutIds.validations[t.cause]=setTimeout(async()=>{if(o.signal.aborted)return n(void 0);try{n(await this.runValidator({validate:t.validate,value:{value:e.store.state.value,fieldApi:e,signal:o.signal,validationSource:`field`},type:`validateAsync`}))}catch(e){r(e)}},t.debounceMs)})}catch(e){a=e}if(o.signal.aborted)return n(void 0);let s=Hz(a),c=r[e.name]?.[i],{newErrorValue:l,newSource:u}=xz({formLevelError:c,fieldLevelError:s});if(e.getInfo().instance!==e)return n(void 0);e.setMeta(e=>({...e,errorMap:{...e?.errorMap,[i]:l},errorSourceMap:{...e.errorSourceMap,[i]:u}})),n(l)}))};for(let e of n)e.validate&&l(this,e,o);for(let e of a)e.validate&&l(e.field,e,s);let u=[];if((o.length||s.length)&&(u=await Promise.all(o),await Promise.all(s)),c){this.setMeta(e=>({...e,isValidating:!1}));for(let e of i)e.setMeta(e=>({...e,isValidating:!1}))}return u.filter(Boolean)},this.validate=(e,t)=>{if(!this.state.meta.isTouched)return[];let{fieldsErrorMap:n}=t?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(e),{hasErrored:r}=this.validateSync(e,n[this.name]??{});if(r&&!this.options.asyncAlways)return this.getInfo().validationMetaMap[Uz(e)]?.lastAbortController.abort(),this.state.meta.errors;let i=t?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(e);return this.validateAsync(e,i)},this.handleChange=e=>{this.setValue(e)},this.handleBlur=()=>{this.state.meta.isTouched||this.setMeta(e=>({...e,isTouched:!0})),this.state.meta.isBlurred||this.setMeta(e=>({...e,isBlurred:!0})),this.validate(`blur`),this.triggerOnBlurListener()},this.setErrorMap=e=>{this.setMeta(t=>({...t,errorMap:{...t.errorMap,...e}}))},this.parseValueWithSchema=e=>jz.validate({value:this.state.value,validationSource:`field`},e),this.parseValueWithSchemaAsync=e=>jz.validateAsync({value:this.state.value,validationSource:`field`},e),this.triggerOnChangeListener=()=>{let e=this.form.options.listeners?.onChangeDebounceMs;e&&e>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this});let t=this.options.listeners?.onChangeDebounceMs;t&&t>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this})},t)):this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this})},this.form=e.form,this.name=e.name,this.options=e,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.store=RR(t=>{this.form.store.get();let n=this.form.getFieldMeta(this.name)??{...Fz,...e.defaultMeta},r=this.form.getFieldValue(this.name);return!n.isTouched&&r===void 0&&this.options.defaultValue!==void 0&&!cz(r,this.options.defaultValue)&&(r=this.options.defaultValue),t&&t.value===r&&t.meta===n?t:{value:r,meta:n}})}get state(){return this.store.state}runValidator(e){return Mz(e.validate)?jz[e.type](e.value,e.validate):e.validate(e.value)}triggerOnBlurListener(){let e=this.form.options.listeners?.onBlurDebounceMs;e&&e>0?(this.timeoutIds.formListeners.blur&&clearTimeout(this.timeoutIds.formListeners.blur),this.timeoutIds.formListeners.blur=setTimeout(()=>{this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this});let t=this.options.listeners?.onBlurDebounceMs;t&&t>0?(this.timeoutIds.listeners.blur&&clearTimeout(this.timeoutIds.listeners.blur),this.timeoutIds.listeners.blur=setTimeout(()=>{this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},t)):this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})}}})),Kz,qz=p((()=>{HR(),Ez(),Kz=class e{constructor(t){if(this.getFormFieldName=e=>{if(typeof this.fieldsMap==`string`)return iz(this.fieldsMap,e);let t=rz(e)[0];if(typeof t!=`string`)return``;let n=e.slice(t.length),r=this.fieldsMap[t];return iz(r,n)},this.getFormFieldOptions=e=>{let t={...e},n=t.validators;if(t.name=this.getFormFieldName(e.name),n&&(n.onChangeListenTo||n.onBlurListenTo)){let e={...n},r=e=>{if(e)return e.map(e=>this.getFormFieldName(e))};e.onChangeListenTo=r(n.onChangeListenTo),e.onBlurListenTo=r(n.onBlurListenTo),t.validators=e}return t},this.mount=()=>()=>{},this.validateArrayFieldsStartingFrom=async(e,t,n)=>this.form.validateArrayFieldsStartingFrom(this.getFormFieldName(e),t,n),this.validateField=(e,t)=>this.form.validateField(this.getFormFieldName(e),t),this.getFieldValue=e=>this.form.getFieldValue(this.getFormFieldName(e)),this.getFieldMeta=e=>this.form.getFieldMeta(this.getFormFieldName(e)),this.setFieldMeta=(e,t)=>this.form.setFieldMeta(this.getFormFieldName(e),t),this.setFieldValue=(e,t,n)=>this.form.setFieldValue(this.getFormFieldName(e),t,n),this.deleteField=e=>this.form.deleteField(this.getFormFieldName(e)),this.pushFieldValue=(e,t,n)=>this.form.pushFieldValue(this.getFormFieldName(e),t,n),this.insertFieldValue=async(e,t,n,r)=>this.form.insertFieldValue(this.getFormFieldName(e),t,n,r),this.replaceFieldValue=async(e,t,n,r)=>this.form.replaceFieldValue(this.getFormFieldName(e),t,n,r),this.removeFieldValue=async(e,t,n)=>this.form.removeFieldValue(this.getFormFieldName(e),t,n),this.swapFieldValues=(e,t,n,r)=>this.form.swapFieldValues(this.getFormFieldName(e),t,n,r),this.moveFieldValues=(e,t,n,r)=>this.form.moveFieldValues(this.getFormFieldName(e),t,n,r),this.clearFieldValues=(e,t)=>this.form.clearFieldValues(this.getFormFieldName(e),t),this.resetField=e=>this.form.resetField(this.getFormFieldName(e)),this.validateAllFields=e=>this.form.validateAllFields(e),t.form instanceof e){let e=t.form;if(this.form=e.form,typeof t.fields==`string`)this.fieldsMap=e.getFormFieldName(t.fields);else{let n={...t.fields};for(let t in n)n[t]=e.getFormFieldName(n[t]);this.fieldsMap=n}}else this.form=t.form,this.fieldsMap=t.fields;this.store=RR(()=>{let e=this.form.store.get(),t;if(typeof this.fieldsMap==`string`)t=ez(e.values,this.fieldsMap);else{t={};let n=this.fieldsMap;for(let r in n)t[r]=ez(e.values,n[r])}return{values:t}})}get state(){return this.store.state}async handleSubmit(e){return this.form.handleSubmit(e)}}}));function Jz(e,t){if(!t)return;let n=Object.assign({},e,{state:dz(e.state)});t(n),n.fieldInfo!==e.fieldInfo&&(e.fieldInfo=n.fieldInfo),n.options!==e.options&&(e.options=n.options);let r=Object.keys({values:null,validationMetaMap:null,fieldMetaBase:null,isSubmitting:null,isSubmitted:null,isValidating:null,submissionAttempts:null,isSubmitSuccessful:null,_force_re_eval:null}).reduce((t,r)=>(e.state[r]!==n.state[r]&&(t[r]=n.state[r]),t),{});return xR(()=>{Object.keys(r).length&&e.baseStore.setState(e=>({...e,...r})),n.state.errorMap!==e.state.errorMap&&e.setErrorMap(n.state.errorMap)}),n}var Yz=p((()=>{HR(),Ez()})),Xz=p((()=>{Vz(),Gz(),Ez(),qz(),Yz()}));function Zz(e,t){return e===t}function Qz(e,t,n=Zz){let r=(0,_.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=(0,_.useCallback)(()=>e?.get(),[e]);return(0,a.useSyncExternalStoreWithSelector)(r,i,i,t,n)}var $z=p((()=>{})),eB=p((()=>{HR(),$z()})),tB,nB=p((()=>{tB=typeof window<`u`?_.useLayoutEffect:_.useEffect}));function rB(e){let[t,n]=(0,_.useState)(()=>({form:e.form,name:e.name})),[r,i]=(0,_.useState)(()=>new Wz({...e}));(t.form!==e.form||t.name!==e.name)&&(i(new Wz({...e})),n({form:e.form,name:e.name}));let a=Qz(r.store,e.mode===`array`?e=>e.meta._arrayVersion||0:e=>e.value),o=Qz(r.store,e=>e.meta.isTouched),s=Qz(r.store,e=>e.meta.isBlurred),c=Qz(r.store,e=>e.meta.isDirty),l=Qz(r.store,e=>e.meta.errorMap),u=Qz(r.store,e=>e.meta.errorSourceMap),d=Qz(r.store,e=>e.meta.isValidating),f=(0,_.useMemo)(()=>({...r,get state(){return{value:e.mode===`array`?r.state.value:a,get meta(){return{...r.state.meta,isTouched:o,isBlurred:s,isDirty:c,errorMap:l,errorSourceMap:u,isValidating:d}}}}}),[r,e.mode,a,o,s,c,l,u,d]);return tB(r.mount,[r]),tB(()=>{r.update(e)}),f}var iB,aB=p((()=>{eB(),Xz(),nB(),iB=(({children:e,...t})=>{let r=rB(t);return(0,n.jsx)(n.Fragment,{children:(0,_.useMemo)(()=>$R(e,r),[e,r])})})}));function oB(){return(0,_.useState)(()=>uz())[0]}var sB=p((()=>{Xz()})),cB,lB,uB=p((()=>{sB(),cB=_,lB=_.version.split(`.`)[0]===`17`?oB:cB.useId}));function dB({form:e,selector:t=e=>e,children:r}){return(0,n.jsx)(n.Fragment,{children:$R(r,Qz(e.store,t))})}function fB(e){let t=lB(),[r,i]=(0,_.useState)(e?.formId),[a,o]=(0,_.useState)(()=>new Bz({...e,formId:e?.formId??t}));if(r!==e?.formId){let n=e?.formId??t;o(new Bz({...e,formId:n})),i(n)}let s=(0,_.useMemo)(()=>{let e={...a,handleSubmit:((...e)=>a._handleSubmit(...e)),get formId(){return a._formId},get state(){return a.store.state}};return e.Field=function(e){return(0,n.jsx)(iB,{...e,form:a})},e.Subscribe=function(e){return(0,n.jsx)(dB,{form:a,selector:e.selector,children:e.children})},e},[a]);tB(a.mount,[]),tB(()=>{a.update(e)});let c=(0,_.useRef)(!1);return tB(()=>{c.current&&e?.transform&&Jz(a,e.transform)},[a,e?.transform]),tB(()=>{c.current=!0}),s}var pB=p((()=>{Xz(),eB(),aB(),nB(),uB()}));function mB({lens:e,selector:t=e=>e,children:r}){return(0,n.jsx)(n.Fragment,{children:$R(r,Qz(e.store,t))})}function hB(e){let[t]=(0,_.useState)(()=>{let r=new Kz(e),i=e.form instanceof Kz?e.form.form:e.form,a=r;return a.AppForm=function(e){return(0,n.jsx)(i.AppForm,{...e})},a.AppField=function(e){return(0,n.jsx)(i.AppField,{...t.getFormFieldOptions(e)})},a.Field=function(e){return(0,n.jsx)(i.Field,{...t.getFormFieldOptions(e)})},a.Subscribe=function(e){return(0,n.jsx)(mB,{lens:t,selector:e.selector,children:e.children})},Object.assign(a,{...e.formComponents})});return tB(t.mount,[t]),t}var gB=p((()=>{eB(),Xz(),nB()}));function _B(){let e=(0,_.useContext)(xB);if(!e)throw Error("`formContext` only works when within a `formComponent` passed to `createFormHook`");return e}function vB(){function e(){let e=(0,_.useContext)(bB);if(!e)throw Error("`fieldContext` only works when within a `fieldComponent` passed to `createFormHook`");return e}return{fieldContext:bB,useFieldContext:e,useFormContext:_B,formContext:xB}}function yB({fieldComponents:e,fieldContext:t,formContext:r,formComponents:i}){function a(a){let o=fB(a),s=(0,_.useMemo)(()=>({children:e})=>(0,n.jsx)(r.Provider,{value:o,children:e}),[o]),c=(0,_.useMemo)(()=>(({children:r,...i})=>(0,n.jsx)(o.Field,{...i,children:i=>(0,n.jsx)(t.Provider,{value:i,children:r(Object.assign(i,e))})})),[o]);return(0,_.useMemo)(()=>Object.assign(o,{AppField:c,AppForm:s,...i}),[o,c,s])}function o({render:e,props:t}){return function(n){return e({...t,...n})}}function s({render:e,props:t,defaultValues:n}){return function(r){let a=hB((0,_.useMemo)(()=>({form:r.form,fields:r.fields,defaultValues:n,formComponents:i}),[r.form,r.fields]));return e({...t,...r,group:a})}}function c(e){return _B()}function l(n){return yB({fieldContext:t,formContext:r,fieldComponents:{...e,...n.fieldComponents},formComponents:{...i,...n.formComponents}})}return{useAppForm:a,withForm:o,withFieldGroup:s,useTypedAppFormContext:c,extendForm:l}}var bB,xB,SB=p((()=>{pB(),gB(),bB=(0,_.createContext)(null),xB=(0,_.createContext)(null)})),CB=p((()=>{Xz(),SB()})),wB,TB=p((()=>{sL(),Dc(),wc(),KV(),Z(),wB=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(VV().Subscribe,{selector:e=>[e.errors],children:([a])=>{if(!a||a.length===0)return null;let o=[];return a.forEach(e=>{if(typeof e==`string`)o.push(e);else if(e?.message&&typeof e.message==`string`)o.push(e.message);else if(typeof e==`object`&&e){let t=e=>{typeof e==`string`?o.push(e):Array.isArray(e)?e.forEach(t):typeof e==`object`&&e&&(`message`in e&&typeof e.message==`string`?o.push(e.message):Object.values(e).forEach(t))};t(e)}}),(0,n.jsxs)(_c,{className:X(``,e),ref:r,tone:`error`,...i,children:[(0,n.jsx)(aL,{weight:`duotone`}),(0,n.jsxs)(Cc,{children:[t,(0,n.jsx)(yc,{children:(0,n.jsx)(`ul`,{children:o.length>0?o.map(e=>(0,n.jsx)(`li`,{children:e},e)):(0,n.jsx)(`li`,{className:`style-text-prose--1`,children:a.toString()})})})]})]})}})})),EB,DB=p((()=>{dP(),KV(),Z(),EB=({className:e,children:t,ref:r,...i})=>{let a=VV(),o=()=>{a.reset()};return(0,n.jsx)(a.Subscribe,{selector:e=>e,children:a=>(0,n.jsx)(lP,{className:X(`w-full`,e),disabled:!a.values,onClick:o,ref:r,type:`reset`,...i,children:t})})}})),OB,kB=p((()=>{sL(),dP(),KV(),Z(),OB=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(VV().Subscribe,{selector:e=>e,children:a=>(0,n.jsx)(lP,{className:X(`w-full`,e),disabled:a.isSubmitting||!a.canSubmit,ref:r,type:`submit`,...i,children:a.isSubmitting?(0,n.jsx)(TI,{className:`animate-spin`,weight:`bold`}):t})})})),AB,jB=p((()=>{iw(),OP(),Z(),AB=({variant:e,size:t,className:r,ref:i,...a})=>{let o=(0,_.useRef)(null),[s,c]=(0,_.useState)(a.defaultValue||`#000000`);return a.type===`color`?(0,n.jsxs)(`button`,{"aria-label":`Open color picker`,className:`relative h-xl w-[calc(var(--spacing-3xl)+5rem)] items-center rounded-xl pl-xs transition-all peer-focus:outline-brand-default hover:cursor-pointer`,onClick:()=>o.current?.click(),type:`button`,children:[(0,n.jsx)(`div`,{className:X(`absolute top-1/2 left-[0px] aspect-square h-full -translate-y-1/2 rounded-l-xl`),style:{backgroundColor:s}}),(0,n.jsx)(nw,{className:`peer pointer-events-none invisible absolute top-lg`,defaultValue:s,onChange:e=>c(e.currentTarget.value),ref:o,type:`color`,value:s,...a}),(0,n.jsx)(`p`,{className:`pl-xl text-left style-text-default-0`,children:s})]}):(0,n.jsx)(nw,{className:X(DP({variant:e,size:t}),r),ref:i,...a})}})),MB=p((()=>{jB()})),NB=m({FieldInput:()=>PB}),PB,FB=p((()=>{KV(),MB(),Z(),PB=({className:e,children:t,ref:r,...i})=>{let a=zV();return(0,n.jsx)(AB,{"aria-invalid":a.state.meta.isTouched&&a.state.meta.errors.length>0&&!a.state.meta.isValid,className:X(``,e),id:a.name,name:a.name,onChange:e=>a.handleChange(e.target.value),ref:r,value:a.state.value,...i,children:t})}})),IB=m({FieldInputGroup:()=>LB}),LB,RB=p((()=>{KV(),IL(),Z(),LB=({className:e,children:t,ref:r,...i})=>{let a=zV();return(0,n.jsx)(AL,{"aria-invalid":a.state.meta.isTouched&&a.state.meta.errors.length>0&&!a.state.meta.isValid,className:X(``,e),id:a.name,ref:r,...i,children:t})}})),zB=m({FieldInputGroupInput:()=>BB}),BB,VB=p((()=>{KV(),IL(),Z(),BB=({className:e,ref:t,...r})=>{let i=zV();return(0,n.jsx)(PL,{"aria-invalid":i.state.meta.isTouched&&i.state.meta.errors.length>0&&!i.state.meta.isValid,className:X(``,e),id:i.name,name:i.name,onChange:e=>i.handleChange(e.target.value),ref:t,value:i.state.value,...r})}})),HB=m({FieldLabel:()=>UB}),UB,WB=p((()=>{KV(),Z(),UB=({className:e,children:t,ref:r,...i})=>{let a=zV(),o=a.name.replace(/([A-Z])/g,` $1`).replace(/^./,e=>e.toUpperCase());return(0,n.jsx)(`div`,{className:X(`style-text-default-0`,e,a.state.meta.errors.length>0&&`text-error-default`),ref:r,...i,children:t||o})}})),GB,KB=p((()=>{hA(),GB=({children:e,...t})=>(0,n.jsx)(ok,{...t,children:e})})),qB,JB=p((()=>{hA(),sL(),Z(),qB=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(qk,{className:X(`grid h-lg cursor-default grid-cols-[1fr_0.75rem] items-center gap-xs rounded-md pl-xs style-text-default-0 outline-none select-none group-data-[side=none]:pr-xs group-data-[side=none]:leading-lg hover:cursor-pointer data-highlighted:relative data-highlighted:z-0 data-highlighted:bg-neutral-container-high data-highlighted:text-neutral-on-container data-highlighted:before:absolute data-highlighted:before:inset-x-3xs data-highlighted:before:inset-y-[0px] data-highlighted:before:z-[-1] data-highlighted:before:rounded-sm data-selected:bg-neutral-default data-selected:text-neutral-on-default pointer-coarse:py-xs`,e),ref:r,...i,children:[(0,n.jsx)(Qk,{children:t}),(0,n.jsx)(Yk,{className:`place-self-end self-center`,children:(0,n.jsx)(xI,{weight:`bold`})})]})})),YB,XB=p((()=>{hA(),Z(),YB=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Hk,{className:X(`relative max-h-(--available-height) scroll-py-md space-y-xs overflow-y-auto`,e),ref:r,...i,children:t})})),ZB,QB=p((()=>{hA(),Z(),ZB=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(_k,{className:X(`flex text-on-surface-variant [&>svg]:size-sm`,e),ref:r,...i,children:t})})),$B,eV=p((()=>{hA(),sL(),Z(),$B=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(xk,{children:(0,n.jsx)(Ak,{className:X(`z-99 outline-none select-none`,e),ref:r,...i,children:(0,n.jsxs)(zk,{className:`group min-w-(--anchor-width) origin-(--transform-origin) rounded-xl bg-surface-2 bg-clip-padding p-2xs shadow-md transition-[transform,scale,opacity] data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0 data-[side=none]:data-ending-style:scale-90 data-[side=none]:data-ending-style:opacity-0 data-[side=none]:data-starting-style:scale-90 data-[side=none]:data-starting-style:opacity-0`,children:[(0,n.jsx)(aA,{className:`top-0 right-0 z-[1px] flex h-md w-full cursor-default items-center justify-center rounded-xl bg-surface-2 before:absolute before:left-0 before:h-full before:w-full before:content-[''] data-[side=none]:before:-top-full`,children:(0,n.jsx)(_I,{className:`size-sm`,weight:`fill`})}),t,(0,n.jsx)(rA,{className:`right-0 bottom-0 z-[1px] flex h-md w-full cursor-default items-center justify-center rounded-xl bg-surface-2 before:absolute before:left-0 before:h-full before:w-full before:content-[''] data-[side=none]:before:-bottom-full`,children:(0,n.jsx)(sI,{className:`size-sm`,weight:`fill`})})]})})})})),tV,nV=p((()=>{Ao(),tV=ko(`flex min-w-[calc(var(--dawn-spacing-3xl)+8rem)] items-center justify-between outline outline-transparent transition-all hover:cursor-pointer aria-invalid:bg-error-container aria-invalid:text-error-on-container aria-invalid:outline-error-border data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50`,{variants:{variant:{primary:`bg-surface shadow-2xs hover:outline-border-strong`,secondary:`bg-neutral-container hover:outline-border-strong`,ghost:`bg-transparent hover:bg-neutral-container`},size:{small:`h-lg rounded-lg px-xs style-text-default--1 [&_[data-value]]:gap-3xs [&>svg]:size-xs`,medium:`h-xl rounded-xl px-sm style-text-default-0 [&_[data-value]]:gap-2xs [&>svg]:size-sm`,large:`h-2xl rounded-2xl px-md style-text-default-1 [&_[data-value]]:gap-xs [&>svg]:size-md`}},defaultVariants:{variant:`primary`,size:`medium`}})})),rV,iV=p((()=>{hA(),nV(),Z(),rV=({variant:e,size:t,className:r,children:i,ref:a,...o})=>(0,n.jsx)(fk,{className:X(tV({variant:e,size:t,className:r})),ref:a,...o,children:i})})),aV,oV=p((()=>{hA(),Z(),aV=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(hk,{"data-value":!0,className:X(`flex items-center justify-start gap-2xs data-placeholder:opacity-70`,e),ref:r,...i,children:t})})),sV,cV=p((()=>{hA(),Z(),sV=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(uA,{className:X(`block space-y-3xs border-border-strong not-last:border-b not-last:pb-xs`,e),ref:r,...i,children:t})})),lV,uV=p((()=>{hA(),Z(),lV=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(fA,{className:X(`sticky top-[0px] z-1 cursor-default bg-surface-2 px-2xs py-3xs style-text-default--2 text-on-surface-variant select-none`,e),ref:r,...i,children:t})})),dV=p((()=>{KB(),JB(),XB(),QB(),eV(),iV(),oV(),cV(),uV()})),fV=m({FieldSelect:()=>pV}),pV,mV=p((()=>{sL(),KV(),dV(),pV=({children:e,...t})=>{let r=zV();return(0,n.jsxs)(GB,{defaultValue:r.state.value,value:r.state.value,onValueChange:e=>r.setValue(e),...t,children:[(0,n.jsxs)(rV,{children:[(0,n.jsx)(aV,{}),(0,n.jsx)(ZB,{children:(0,n.jsx)(yI,{weight:`bold`})})]}),(0,n.jsx)($B,{children:(0,n.jsx)(YB,{children:e})})]})}})),hV,gV=p((()=>{nP(),hV=({children:e,...t})=>(0,n.jsx)($N,{children:(0,n.jsx)(AN,{...t,children:e})})})),_V,vV=p((()=>{nP(),Z(),_V=({side:e=`top`,alignOffset:t=0,sideOffset:r=5,className:i,children:a,...o})=>(0,n.jsx)(UN,{children:(0,n.jsx)(JN,{side:e,alignOffset:t,sideOffset:r,children:(0,n.jsx)(ZN,{className:X(`z-50 w-fit origin-(--transform-origin) animate-in rounded-md bg-surface-2 px-xs py-3xs text-sm text-balance shadow-md fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-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-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,i),...o,children:a})})})})),yV,bV=p((()=>{nP(),yV=({children:e,...t})=>(0,n.jsx)(RN,{...t,render:()=>e})})),xV=p((()=>{gV(),vV(),bV()})),SV,CV=p((()=>{aP(),xV(),Z(),SV=({className:e,children:t,ref:r,...i})=>{let[a,o]=_.default.useState(!1),[s,c]=_.default.useState(!1);return _.default.useEffect(()=>{if(!s)return;let e=()=>c(!1);return window.addEventListener(`pointerup`,e),()=>window.removeEventListener(`pointerup`,e)},[s]),(0,n.jsxs)(hV,{open:a||s,trackCursorAxis:`x`,children:[(0,n.jsx)(yV,{delay:0,render:(0,n.jsx)(cj,{className:X(`absolute aspect-square size-sm rounded-full border-2 border-brand-border-strong bg-surface shadow-xs transition-[width,height] outline-none hover:cursor-pointer data-dragging:size-md data-dragging:cursor-grabbing data-dragging:shadow-sm`,e),onPointerDown:()=>c(!0),onPointerEnter:()=>o(!0),onPointerLeave:()=>o(!1),ref:r,...i,children:t})}),(0,n.jsx)(_V,{sideOffset:10,children:(0,n.jsx)(NA,{})})]})}})),wV,TV=p((()=>{aP(),CV(),Z(),wV=({defaultValue:e,description:t,label:r,leadingIcon:i,max:a=100,min:o=0,showMax:s=!1,showMin:c=!1,trailingIcon:l,value:u,className:d,ref:f,...p})=>{let m=Array.isArray(u)?u:Array.isArray(e)?e:[o,a];return(0,n.jsxs)(`div`,{className:`flex flex-col gap-xs`,children:[r&&(0,n.jsx)(`span`,{className:`style-text-default-0`,children:r}),(0,n.jsxs)(jA,{"aria-label":r,"aria-valuemax":a,"aria-valuemin":o,"aria-valuenow":Array.isArray(u)?u[0]:u??e??o,className:X(`flex h-xs items-center gap-sm`,d),defaultValue:e,max:a,min:o,ref:f,role:`slider`,value:u,...p,children:[i&&(0,n.jsx)(i,{className:`size-sm shrink-0`,weight:`fill`}),c&&(0,n.jsx)(`span`,{className:`style-text-default-0`,children:o}),(0,n.jsx)(qA,{className:`shrink-0 grow hover:cursor-pointer`,children:(0,n.jsxs)(YA,{className:`relative h-2xs rounded-full bg-surface-low inset-shadow-2xs`,children:[(0,n.jsx)(fj,{className:`rounded-full bg-brand-default`}),Array.from({length:m.length},(e,t)=>(0,n.jsx)(SV,{index:t},t))]})}),s&&(0,n.jsx)(`span`,{className:`style-text-default-0`,children:a}),l&&(0,n.jsx)(l,{className:`size-sm shrink-0`,weight:`fill`})]}),t&&(0,n.jsx)(`span`,{className:`style-text-prose--1 text-on-surface-variant`,children:t})]})}})),EV=p((()=>{TV(),CV()})),DV=m({FieldSlider:()=>OV}),OV,kV=p((()=>{KV(),EV(),Z(),OV=({className:e,ref:t,...r})=>{let i=zV();return(0,n.jsx)(wV,{className:X(``,e),onValueChange:e=>i.setValue(e),ref:t,value:i.state.value,...r})}})),AV,jV,MV,NV,PV,FV,IV,LV,RV,zV,BV,VV,HV,UV,WV,GV,KV=p((()=>{CB(),TB(),DB(),kB(),AV=(0,_.lazy)(()=>Promise.resolve().then(()=>(gR(),mR)).then(e=>({default:e.FieldDescription}))),jV=(0,_.lazy)(()=>Promise.resolve().then(()=>(YV(),qV)).then(e=>({default:e.FieldErrors}))),MV=(0,_.lazy)(()=>Promise.resolve().then(()=>(FB(),NB)).then(e=>({default:e.FieldInput}))),NV=(0,_.lazy)(()=>Promise.resolve().then(()=>(RB(),IB)).then(e=>({default:e.FieldInputGroup}))),PV=(0,_.lazy)(()=>Promise.resolve().then(()=>(VB(),zB)).then(e=>({default:e.FieldInputGroupInput}))),FV=(0,_.lazy)(()=>Promise.resolve().then(()=>(WB(),HB)).then(e=>({default:e.FieldLabel}))),IV=(0,_.lazy)(()=>Promise.resolve().then(()=>(mV(),fV)).then(e=>({default:e.FieldSelect}))),LV=(0,_.lazy)(()=>Promise.resolve().then(()=>(kV(),DV)).then(e=>({default:e.FieldSlider}))),{fieldContext:RV,useFieldContext:zV,formContext:BV,useFormContext:VV}=vB(),{useAppForm:HV,withFieldGroup:UV,withForm:WV,useTypedAppFormContext:GV}=yB({fieldContext:RV,fieldComponents:{FieldDescription:AV,FieldErrors:jV,FieldInput:MV,FieldInputGroup:NV,FieldInputGroupInput:PV,FieldLabel:FV,FieldSelect:IV,FieldSlider:LV},formContext:BV,formComponents:{FormErrors:wB,FormReset:EB,FormSubmit:OB}})})),qV=m({FieldErrors:()=>JV}),JV,YV=p((()=>{KV(),Z(),JV=({className:e,children:t,ref:r,...i})=>{let a=zV().state.meta.errors;if((!a||a.length===0)&&!t)return null;let o=[],s=e=>{typeof e==`string`?o.push(e):Array.isArray(e)?e.forEach(s):e&&typeof e==`object`&&(`issues`in e&&Array.isArray(e.issues)?e.issues.forEach(e=>{typeof e?.message==`string`&&o.push(e.message)}):`message`in e&&typeof e.message==`string`?o.push(e.message):Object.values(e).forEach(s))};return a?.forEach(s),o.length===0&&!t?null:(0,n.jsxs)(`ul`,{className:X(`space-y-3xs`,e),ref:r,...i,children:[o.map((e,t)=>(0,n.jsx)(`li`,{className:`flex items-center gap-2xs style-text-strong--1 text-error-default`,children:e},`${e}-${t}`)),t]})}}));Ao();var XV=ko(`relative flex resize flex-col overflow-hidden rounded-xl outline outline-transparent transition-[outline] hover:not-focus-within:outline-border-strong data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50`,{variants:{variant:{primary:`bg-surface shadow-2xs`,secondary:`bg-neutral-container`}},defaultVariants:{variant:`primary`}});Z();var ZV=({variant:e,className:t,ref:r,...i})=>{let a=i.value!==void 0,[o,s]=_.default.useState(String(i.defaultValue??``)),c=a?String(i.value??``):o,l=i.maxLength,u=typeof l==`number`,d=u&&c.length>=l,f=e=>{a||s(e.target.value),i.onChange?.(e)};return(0,n.jsxs)(`div`,{className:X(XV({variant:e,className:t}),d?`outline-error-border-strong`:`focus-within:outline-brand-border-strong`),"data-disabled":i.disabled?!0:void 0,children:[(0,n.jsx)(`textarea`,{className:`grow resize-none px-sm py-xs style-text-prose-0 outline-none focus-within:caret-brand-border-strong`,ref:r,...i,onChange:f,value:c}),u&&(0,n.jsxs)(`span`,{className:X(`w-full px-xs py-2xs text-right style-text-default--1 text-on-surface-variant`,d&&`text-error-default`),children:[c.length,` / `,l]})]})};KV(),Z();var QV=({className:e,ref:t,...r})=>{let i=zV();return(0,n.jsx)(ZV,{"aria-invalid":i.state.meta.isTouched&&i.state.meta.errors.length>0&&!i.state.meta.isValid,className:X(``,e),id:i.name,name:i.name,onChange:e=>i.handleChange(e.target.value),ref:t,value:i.state.value,...r})};Ao();var $V=ko(`flex items-center gap-2xs select-none hover:cursor-pointer`,{variants:{size:{small:`style-text-default--1`,medium:`style-text-default-0`,large:`style-text-default-1`}},defaultVariants:{size:`medium`}}),eH=({className:e,children:t,ref:r,size:i,...a})=>(0,n.jsx)(`label`,{className:$V({className:e,size:i}),"data-slot":`label`,htmlFor:a.htmlFor,ref:r,...a,children:t});KV();var tH=({...e})=>{let t=zV();return(0,n.jsxs)(`div`,{className:`flex items-center gap-xs`,children:[(0,n.jsx)(gL,{checked:t.state.value,id:t.name,name:t.name,onCheckedChange:e=>t.handleChange(e===!0),...e}),e.label&&(0,n.jsx)(eH,{htmlFor:t.name,children:e.label})]})};Ao();var nH=ko(`group flex size-sm shrink-0 items-center justify-center rounded-full outline outline-transparent transition-all hover:outline-border-strong data-checked:bg-brand-default data-checked:outline-brand-border-strong data-disabled:opacity-50`,{variants:{variant:{elevated:`bg-surface shadow-2xs`,inSurface:`bg-surface-low inset-shadow-2xs`}},defaultVariants:{variant:`elevated`}});aP(),Z();var rH=({variant:e,className:t,children:r,ref:i,...a})=>(0,n.jsxs)(eH,{htmlFor:a.id,children:[(0,n.jsx)(qD,{className:X(nH({variant:e,className:t})),ref:i,...a,children:(0,n.jsx)(YD,{"data-indicator":!0,className:`size-2xs origin-center scale-0 rounded-full bg-surface shadow-2xs transition-transform duration-200 ease-out data-checked:scale-100`})}),r]});aP(),Z();var iH=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(eO,{"aria-labelledby":_.useId(),className:X(`flex flex-col items-start gap-2xs data-disabled:opacity-50`,e),ref:r,...i,children:t});KV();var aH=({children:e,...t})=>{let r=zV();return(0,n.jsx)(iH,{name:r.name,onChange:e=>r.handleChange(e.target.value),value:r.state.value,...t,children:e})};Oj(),Z();var oH=({label:e,className:t,ref:r,...i})=>(0,n.jsxs)(`div`,{className:`flex items-center gap-xs`,children:[(0,n.jsx)(Cj,{"aria-label":e??void 0,className:X(`group relative flex h-md w-xl items-center rounded-full bg-surface-low inset-shadow-2xs outline-2 outline-transparent transition-colors ease-[cubic-bezier(0.26,0.75,0.38,0.45)] before:absolute before:rounded-full hover:cursor-pointer hover:not-disabled:outline-accent-border-strong disabled:pointer-events-none disabled:opacity-50 data-checked:bg-accent-default data-disabled:pointer-events-none data-disabled:opacity-50`,t),ref:r,...i,children:(0,n.jsx)(Tj,{className:`aspect-square size-xs translate-x-2xs rounded-full shadow-2xs transition-transform duration-500 ease-[cubic-bezier(0.68,-0.55,0.27,1.55)] data-checked:size-sm data-checked:translate-x-md data-checked:bg-accent-on-default data-unchecked:bg-accent-default`})}),e&&(0,n.jsx)(eH,{htmlFor:i.id,children:e})]});KV();var sH=({...e})=>{let t=zV();return(0,n.jsx)(oH,{checked:t.state.value,id:t.name,name:t.name,onCheckedChange:e=>t.handleChange(e===!0),...e})},cH=(0,_.createContext)(void 0);Ao();var lH=ko(`flex items-center justify-center text-on-surface-variant transition-all hover:cursor-pointer disabled:opacity-70`,{variants:{size:{iconSmall:`size-md rounded-md [&>svg]:size-xs`,iconMedium:`size-lg rounded-lg [&>svg]:size-sm`,iconLarge:`size-xl rounded-xl [&>svg]:size-md`,small:`h-md gap-3xs rounded-md px-2xs style-text-default--2 [&>svg]:size-xs`,medium:`h-lg gap-2xs rounded-lg px-xs style-text-default--1 [&>svg]:size-sm`,large:`h-xl gap-xs rounded-xl px-sm style-text-default-0 [&>svg]:size-md`},tone:{brand:`hover:not-disabled:bg-brand-container hover:not-disabled:text-brand-on-container data-pressed:text-brand-default`,accent:`hover:not-disabled:bg-accent-container hover:not-disabled:text-accent-on-container data-pressed:text-accent-default`,neutral:`hover:not-disabled:bg-surface-low hover:not-disabled:text-neutral-on-container data-pressed:text-neutral-default`,error:`hover:not-disabled:bg-error-container hover:not-disabled:text-error-on-container data-pressed:text-error-default`,info:`hover:not-disabled:bg-info-container hover:not-disabled:text-info-on-container data-pressed:text-info-default`,success:`hover:not-disabled:bg-success-container hover:not-disabled:text-success-on-container data-pressed:text-success-default`,warning:`hover:not-disabled:bg-warning-container hover:not-disabled:text-warning-on-container data-pressed:text-warning-default`}},defaultVariants:{size:`medium`,tone:`brand`}});hN(),Z();var uH=({size:e,tone:t,className:r,children:i,ref:a,...o})=>{let s=(0,_.useContext)(cH),c=e??s?.size??`medium`;return(0,n.jsx)(pN,{ref:a,...o,render:(e,a)=>(0,n.jsx)(`button`,{...e,className:X(lH({size:c,tone:t,className:r})),type:`button`,children:typeof i==`function`?i(a):i})})};KV();var dH=({children:e,...t})=>{let r=zV();return(0,n.jsx)(uH,{id:r.name,name:r.name,onChange:e=>r.handleChange(!r.state.value),pressed:r.state.value,...t,children:e})};Z();var fH=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`form`,{className:X(`space-y-sm`,e),ref:r,...i,children:t});BE(),Z();var pH=({children:e,className:t,ref:r,...i})=>(0,n.jsx)(FE,{className:X(`group flex items-center gap-2xs has-disabled:opacity-30`,t),ref:r,...i,children:e});BE(),Z();var mH=({className:e,...t})=>(0,n.jsx)(LE,{className:X(`relative h-lg w-md rounded-md bg-surface text-center style-text-default-0 shadow-2xs outline outline-transparent transition-colors hover:outline-border-strong focus:outline-brand-border-strong`,e),...t});BE(),sL(),Z();var hH=({className:e,ref:t,...r})=>(0,n.jsx)(Z_,{className:X(`flex items-center justify-center text-on-surface-variant`,e),ref:t,...r,children:(0,n.jsx)(UI,{weight:`bold`})});Z();var gH=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`inline-flex h-md items-center justify-center rounded-md bg-neutral-container-high px-2xs align-middle style-text-default--1 whitespace-nowrap text-neutral-on-container select-none [&:has(svg)]:size-md [&:has(svg)]:p-0 [&>svg]:size-sm`,e),ref:r,...i,children:t}),_H=(e,t)=>{for(let n of e){if(n.id===t)return n;if(n.children?.length){let e=_H(n.children,t);if(e)return e}}return null},vH=(e,t)=>{let n=null;return{nextNodes:e.flatMap(e=>{if(e.id===t)return n=e,[];if(!e.children?.length)return[e];let r=vH(e.children,t);return r.removedNode?(n=r.removedNode,[{...e,children:r.nextNodes}]):[e]}),removedNode:n}},yH=(e,t,n)=>e.map(e=>e.id===t?{...e,children:[...e.children??[],n]}:e.children?.length?{...e,children:yH(e.children,t,n)}:e),bH=(e,t,n)=>{if(t===n)return e;let r=_H(e,t),i=_H(e,n);if(!r||!i?.children||_H(r.children??[],n))return e;let{nextNodes:a,removedNode:o}=vH(e,t);return o?yH(a,n,o):e},xH=(e,t)=>{let{nextNodes:n,removedNode:r}=vH(e,t);return r?[...n,r]:e},SH=Symbol.for(`preact-signals`);function CH(){if(kH>1)kH--;else{var e,t=!1;for((function(){var e=NH;for(NH=void 0;e!==void 0;)e.S.v===e.v&&(e.S.i=e.i),e=e.o})();OH!==void 0;){var n=OH;for(OH=void 0,AH++;n!==void 0;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&RH(n))try{n.c()}catch(n){t||=(e=n,!0)}n=r}}if(AH=0,kH--,t)throw e}}function wH(e){if(kH>0)return e();MH=++jH,kH++;try{return e()}finally{CH()}}var TH=void 0;function EH(e){var t=TH;TH=void 0;try{return e()}finally{TH=t}}var DH,OH=void 0,kH=0,AH=0,jH=0,MH=0,NH=void 0,PH=0;function FH(e){if(TH!==void 0){var t=e.n;if(t===void 0||t.t!==TH)return t={i:0,S:e,p:TH.s,n:void 0,t:TH,e:void 0,x:void 0,r:t},TH.s!==void 0&&(TH.s.n=t),TH.s=t,e.n=t,32&TH.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=TH.s,t.n=void 0,TH.s.n=t,TH.s=t),t}}function IH(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}IH.prototype.brand=SH,IH.prototype.h=function(){return!0},IH.prototype.S=function(e){var t=this,n=this.t;n!==e&&e.e===void 0&&(e.x=n,this.t=e,n===void 0?EH(function(){var e;(e=t.W)==null||e.call(t)}):n.e=e)},IH.prototype.U=function(e){var t=this;if(this.t!==void 0){var n=e.e,r=e.x;n!==void 0&&(n.x=r,e.e=void 0),r!==void 0&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,r===void 0&&EH(function(){var e;(e=t.Z)==null||e.call(t)}))}},IH.prototype.subscribe=function(e){var t=this;return qH(function(){var n=t.value,r=TH;TH=void 0;try{e(n)}finally{TH=r}},{name:`sub`})},IH.prototype.valueOf=function(){return this.value},IH.prototype.toString=function(){return this.value+``},IH.prototype.toJSON=function(){return this.value},IH.prototype.peek=function(){var e=this;return EH(function(){return e.value})},Object.defineProperty(IH.prototype,`value`,{get:function(){var e=FH(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(AH>100)throw Error(`Cycle detected`);(function(e){kH!==0&&AH===0&&e.l!==MH&&(e.l=MH,NH={S:e,v:e.v,i:e.i,o:NH})})(this),this.v=e,this.i++,PH++,kH++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{CH()}}}});function LH(e,t){return new IH(e,t)}function RH(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function zH(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function BH(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function VH(e,t){IH.call(this,void 0),this.x=e,this.s=void 0,this.g=PH-1,this.f=4,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}VH.prototype=new IH,VH.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===PH))return!0;if(this.g=PH,this.f|=1,this.i>0&&!RH(this))return this.f&=-2,!0;var e=TH;try{zH(this),TH=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return TH=e,BH(this),this.f&=-2,!0},VH.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}IH.prototype.S.call(this,e)},VH.prototype.U=function(e){if(this.t!==void 0&&(IH.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},VH.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(VH.prototype,`value`,{get:function(){if(1&this.f)throw Error(`Cycle detected`);var e=FH(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function HH(e,t){return new VH(e,t)}function UH(e){var t=e.m;if(e.m=void 0,typeof t==`function`){kH++;var n=TH;TH=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,WH(e),t}finally{TH=n,CH()}}}function WH(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,UH(e)}function GH(e){if(TH!==this)throw Error(`Out-of-order effect`);BH(this),TH=e,this.f&=-2,8&this.f&&WH(this),CH()}function KH(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name,DH&&DH.push(this)}KH.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t==`function`&&(this.m=t)}finally{e()}},KH.prototype.S=function(){if(1&this.f)throw Error(`Cycle detected`);this.f|=1,this.f&=-9,UH(this),zH(this),kH++;var e=TH;return TH=this,GH.bind(this,e)},KH.prototype.N=function(){2&this.f||(this.f|=2,this.u=OH,OH=this)},KH.prototype.d=function(){this.f|=8,1&this.f||WH(this)},KH.prototype.dispose=function(){this.d()};function qH(e,t){var n=new KH(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}var JH=Object.create,YH=Object.defineProperty,XH=Object.defineProperties,ZH=Object.getOwnPropertyDescriptor,QH=Object.getOwnPropertyDescriptors,$H=Object.getOwnPropertySymbols,eU=Object.prototype.hasOwnProperty,tU=Object.prototype.propertyIsEnumerable,nU=(e,t)=>(t=Symbol[e])?t:Symbol.for(`Symbol.`+e),rU=e=>{throw TypeError(e)},iU=(e,t,n)=>t in e?YH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aU=(e,t)=>{for(var n in t||={})eU.call(t,n)&&iU(e,n,t[n]);if($H)for(var n of $H(t))tU.call(t,n)&&iU(e,n,t[n]);return e},oU=(e,t)=>XH(e,QH(t)),sU=(e,t)=>YH(e,`name`,{value:t,configurable:!0}),cU=e=>[,,,JH(e?.[nU(`metadata`)]??null)],lU=[`class`,`method`,`getter`,`setter`,`accessor`,`field`,`value`,`get`,`set`],uU=e=>e!==void 0&&typeof e!=`function`?rU(`Function expected`):e,dU=(e,t,n,r,i)=>({kind:lU[e],name:t,metadata:r,addInitializer:e=>n._?rU(`Already initialized`):i.push(uU(e||null))}),fU=(e,t)=>iU(t,nU(`metadata`),e[3]),pU=(e,t,n,r)=>{for(var i=0,a=e[t>>1],o=a&&a.length;i<o;i++)t&1?a[i].call(n):r=a[i].call(n,r);return r},mU=(e,t,n,r,i,a)=>{var o,s,c,l,u,d=t&7,f=!!(t&8),p=!!(t&16),m=d>3?e.length+1:d?f?1:2:0,h=lU[d+5],g=d>3&&(e[m-1]=[]),_=e[m]||(e[m]=[]),v=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&ZH(d<4?i:{get[n](){return _U(this,a)},set[n](e){return yU(this,a,e)}},n));d?p&&d<4&&sU(a,(d>2?`set `:d>1?`get `:``)+n):sU(i,n);for(var y=r.length-1;y>=0;y--)l=dU(d,n,c={},e[3],_),d&&(l.static=f,l.private=p,u=l.access={has:p?e=>gU(i,e):e=>n in e},d^3&&(u.get=p?e=>(d^1?_U:bU)(e,i,d^4?a:v.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>yU(e,i,t,d^4?a:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?p?a:v[h]:d>4?void 0:{get:v.get,set:v.set}:i,l),c._=1,d^4||s===void 0?uU(s)&&(d>4?g.unshift(s):d?p?a=s:v[h]=s:i=s):typeof s!=`object`||!s?rU(`Object expected`):(uU(o=s.get)&&(v.get=o),uU(o=s.set)&&(v.set=o),uU(o=s.init)&&g.unshift(o));return d||fU(e,i),v&&YH(i,n,v),p?d^4?a:v:i},hU=(e,t,n)=>t.has(e)||rU(`Cannot `+n),gU=(e,t)=>Object(t)===t?e.has(t):rU(`Cannot use the "in" operator on this value`),_U=(e,t,n)=>(hU(e,t,`read from private field`),n?n.call(e):t.get(e)),vU=(e,t,n)=>t.has(e)?rU(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),yU=(e,t,n,r)=>(hU(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),bU=(e,t,n)=>(hU(e,t,`access private method`),n);function xU(e,t){if(t){let n;return HH(()=>{let r=e();return r&&n&&t(n,r)?n:(n=r,r)})}return HH(e)}function SU(e,t){if(Object.is(e,t))return!0;if(e===null||t===null)return!1;if(typeof e==`function`&&typeof t==`function`)return e===t;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:!e.some((e,n)=>!SU(e,t[n]));if(typeof e==`object`&&typeof t==`object`){let n=Object.keys(e),r=Object.keys(t);return n.length===r.length?!n.some(n=>!SU(e[n],t[n])):!1}return!1}function CU({get:e},t){return{init(e){return LH(e)},get(){return e.call(this).value},set(t){let n=e.call(this);n.peek()!==t&&(n.value=t)}}}function wU(e,t){let n=new WeakMap;return function(){let t=n.get(this);return t||(t=xU(e.bind(this)),n.set(this,t)),t.value}}function TU(e=!0){return function(t,n){n.addInitializer(function(){let t=n.kind===`field`||n.static?this:Object.getPrototypeOf(this),r=Object.getOwnPropertyDescriptor(t,n.name);r&&Object.defineProperty(t,n.name,oU(aU({},r),{enumerable:e}))})}}function EU(...e){let t=e.map(e=>qH(e));return()=>t.forEach(e=>e())}var DU,OU,kU,AU,jU,MU=[CU],NU,PU,FU,IU,LU,RU,zU,BU,VU,HU,UU,WU,GU,KU;jU=[CU],AU=[CU],kU=[TU()],OU=[TU()],DU=[TU()];var qU=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,pU(NU,5,this),vU(this,RU),vU(this,PU,pU(NU,8,this)),pU(NU,11,this),vU(this,zU,pU(NU,12,this)),pU(NU,15,this),vU(this,UU,pU(NU,16,this)),pU(NU,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return _U(this,RU,GU)}get initial(){return _U(this,RU,IU)}get previous(){return _U(this,RU,VU)}set current(e){let t=EH(()=>_U(this,RU,GU));e&&t&&this.equals(t,e)||wH(()=>{_U(this,RU,IU)||yU(this,RU,e,LU),yU(this,RU,t,HU),yU(this,RU,e,KU)})}reset(e=this.defaultValue){wH(()=>{yU(this,RU,void 0,HU),yU(this,RU,e,LU),yU(this,RU,e,KU)})}};NU=cU(null),PU=new WeakMap,RU=new WeakSet,zU=new WeakMap,UU=new WeakMap,FU=mU(NU,20,`#initial`,MU,RU,PU),IU=FU.get,LU=FU.set,BU=mU(NU,20,`#previous`,jU,RU,zU),VU=BU.get,HU=BU.set,WU=mU(NU,20,`#current`,AU,RU,UU),GU=WU.get,KU=WU.set,mU(NU,2,`current`,kU,qU),mU(NU,2,`initial`,OU,qU),mU(NU,2,`previous`,DU,qU),fU(NU,qU);function JU(e){return EH(()=>{let t={};for(let n in e)t[n]=e[n];return t})}var YU=Object.create,XU=Object.defineProperty,ZU=Object.getOwnPropertyDescriptor,QU=Object.getOwnPropertySymbols,$U=Object.prototype.hasOwnProperty,eW=Object.prototype.propertyIsEnumerable,tW=(e,t)=>(t=Symbol[e])?t:Symbol.for(`Symbol.`+e),nW=e=>{throw TypeError(e)},rW=Math.pow,iW=(e,t,n)=>t in e?XU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aW=(e,t)=>{for(var n in t||={})$U.call(t,n)&&iW(e,n,t[n]);if(QU)for(var n of QU(t))eW.call(t,n)&&iW(e,n,t[n]);return e},oW=(e,t)=>XU(e,`name`,{value:t,configurable:!0}),sW=e=>[,,,YU(e?.[tW(`metadata`)]??null)],cW=[`class`,`method`,`getter`,`setter`,`accessor`,`field`,`value`,`get`,`set`],lW=e=>e!==void 0&&typeof e!=`function`?nW(`Function expected`):e,uW=(e,t,n,r,i)=>({kind:cW[e],name:t,metadata:r,addInitializer:e=>n._?nW(`Already initialized`):i.push(lW(e||null))}),dW=(e,t)=>iW(t,tW(`metadata`),e[3]),fW=(e,t,n,r)=>{for(var i=0,a=e[t>>1],o=a&&a.length;i<o;i++)t&1?a[i].call(n):r=a[i].call(n,r);return r},pW=(e,t,n,r,i,a)=>{var o,s,c,l,u,d=t&7,f=!!(t&8),p=!!(t&16),m=d>3?e.length+1:d?f?1:2:0,h=cW[d+5],g=d>3&&(e[m-1]=[]),_=e[m]||(e[m]=[]),v=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&ZU(d<4?i:{get[n](){return gW(this,a)},set[n](e){return vW(this,a,e)}},n));d?p&&d<4&&oW(a,(d>2?`set `:d>1?`get `:``)+n):oW(i,n);for(var y=r.length-1;y>=0;y--)l=uW(d,n,c={},e[3],_),d&&(l.static=f,l.private=p,u=l.access={has:p?e=>hW(i,e):e=>n in e},d^3&&(u.get=p?e=>(d^1?gW:yW)(e,i,d^4?a:v.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>vW(e,i,t,d^4?a:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?p?a:v[h]:d>4?void 0:{get:v.get,set:v.set}:i,l),c._=1,d^4||s===void 0?lW(s)&&(d>4?g.unshift(s):d?p?a=s:v[h]=s:i=s):typeof s!=`object`||!s?nW(`Object expected`):(lW(o=s.get)&&(v.get=o),lW(o=s.set)&&(v.set=o),lW(o=s.init)&&g.unshift(o));return d||dW(e,i),v&&XU(i,n,v),p?d^4?a:v:i},mW=(e,t,n)=>t.has(e)||nW(`Cannot `+n),hW=(e,t)=>Object(t)===t?e.has(t):nW(`Cannot use the "in" operator on this value`),gW=(e,t,n)=>(mW(e,t,`read from private field`),n?n.call(e):t.get(e)),_W=(e,t,n)=>t.has(e)?nW(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),vW=(e,t,n,r)=>(mW(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),yW=(e,t,n)=>(mW(e,t,`access private method`),n),bW=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},xW=class e{constructor(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(t,n){let{top:r,left:i,width:a,height:o,scale:s}=this,c=new e(i+t,r+n,a,o);return c.scale=aW({},s),c}get boundingRectangle(){let{width:e,height:t,left:n,top:r,right:i,bottom:a}=this;return{width:e,height:t,left:n,top:r,right:i,bottom:a}}get center(){let{left:e,top:t,right:n,bottom:r}=this;return new bW((e+n)/2,(t+r)/2)}get area(){let{width:e,height:t}=this;return e*t}equals(t){if(!(t instanceof e))return!1;let{left:n,top:r,width:i,height:a}=this;return n===t.left&&r===t.top&&i===t.width&&a===t.height}containsPoint(e){let{top:t,left:n,bottom:r,right:i}=this;return t<=e.y&&e.y<=r&&n<=e.x&&e.x<=i}intersectionArea(t){return t instanceof e?SW(this,t):0}intersectionRatio(e){let{area:t}=this,n=this.intersectionArea(e);return n/(e.area+t-n)}get bottom(){let{top:e,height:t}=this;return e+t}get right(){let{left:e,width:t}=this;return e+t}get aspectRatio(){let{width:e,height:t}=this;return e/t}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:t,left:n,width:r,height:i}){return new e(n,t,r,i)}static delta(e,t,n={x:`center`,y:`center`}){let r=(e,t)=>{let r=n[t],i=t===`x`?e.left:e.top,a=t===`x`?e.width:e.height;return r==`start`?i:r==`end`?i+a:i+a/2};return bW.delta({x:r(e,`x`),y:r(e,`y`)},{x:r(t,`x`),y:r(t,`y`)})}static intersectionRatio(t,n){return e.from(t).intersectionRatio(e.from(n))}};function SW(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;return r<i&&n<a?o*s:0}var CW,wW,TW,EW,DW,OW=class extends (TW=qU,wW=[wU],CW=[wU],TW){constructor(e){let t=bW.from(e);super(t,(e,t)=>bW.equals(e,t)),fW(DW,5,this),_W(this,EW,0),this.velocity={x:0,y:0}}get delta(){return bW.delta(this.current,this.initial)}get direction(){let{current:e,previous:t}=this;if(!t)return null;let n={x:e.x-t.x,y:e.y-t.y};return!n.x&&!n.y?null:Math.abs(n.x)>Math.abs(n.y)?n.x>0?`right`:`left`:n.y>0?`down`:`up`}get current(){return super.current}set current(e){let{current:t}=this,n=bW.from(e),r={x:n.x-t.x,y:n.y-t.y},i=Date.now(),a=i-gW(this,EW),o=e=>Math.round(e/a*100);wH(()=>{vW(this,EW,i),this.velocity={x:o(r.x),y:o(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(bW.from(e)),this.velocity={x:0,y:0}}};DW=sW(TW),EW=new WeakMap,pW(DW,2,`delta`,wW,OW),pW(DW,2,`direction`,CW,OW),dW(DW,OW);function kW({x:e,y:t},n){let r=Math.abs(e),i=Math.abs(t);return typeof n==`number`?Math.sqrt(rW(r,2)+rW(i,2))>n:`x`in n&&`y`in n?r>n.x&&i>n.y:`x`in n?r>n.x:`y`in n?i>n.y:!1}var AW=(e=>(e.Horizontal=`x`,e.Vertical=`y`,e))(AW||{}),jW=Object.values(AW),MW=Object.create,NW=Object.defineProperty,PW=Object.defineProperties,FW=Object.getOwnPropertyDescriptor,IW=Object.getOwnPropertyDescriptors,LW=Object.getOwnPropertySymbols,RW=Object.prototype.hasOwnProperty,zW=Object.prototype.propertyIsEnumerable,BW=(e,t)=>(t=Symbol[e])?t:Symbol.for(`Symbol.`+e),VW=e=>{throw TypeError(e)},HW=(e,t,n)=>t in e?NW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,UW=(e,t)=>{for(var n in t||={})RW.call(t,n)&&HW(e,n,t[n]);if(LW)for(var n of LW(t))zW.call(t,n)&&HW(e,n,t[n]);return e},WW=(e,t)=>PW(e,IW(t)),GW=(e,t)=>NW(e,`name`,{value:t,configurable:!0}),KW=(e,t)=>{var n={};for(var r in e)RW.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&LW)for(var r of LW(e))t.indexOf(r)<0&&zW.call(e,r)&&(n[r]=e[r]);return n},qW=e=>[,,,MW(e?.[BW(`metadata`)]??null)],JW=[`class`,`method`,`getter`,`setter`,`accessor`,`field`,`value`,`get`,`set`],YW=e=>e!==void 0&&typeof e!=`function`?VW(`Function expected`):e,XW=(e,t,n,r,i)=>({kind:JW[e],name:t,metadata:r,addInitializer:e=>n._?VW(`Already initialized`):i.push(YW(e||null))}),ZW=(e,t)=>HW(t,BW(`metadata`),e[3]),QW=(e,t,n,r)=>{for(var i=0,a=e[t>>1],o=a&&a.length;i<o;i++)t&1?a[i].call(n):r=a[i].call(n,r);return r},$W=(e,t,n,r,i,a)=>{var o,s,c,l,u,d=t&7,f=!!(t&8),p=!!(t&16),m=d>3?e.length+1:d?f?1:2:0,h=JW[d+5],g=d>3&&(e[m-1]=[]),_=e[m]||(e[m]=[]),v=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&FW(d<4?i:{get[n](){return nG(this,a)},set[n](e){return iG(this,a,e)}},n));d?p&&d<4&&GW(a,(d>2?`set `:d>1?`get `:``)+n):GW(i,n);for(var y=r.length-1;y>=0;y--)l=XW(d,n,c={},e[3],_),d&&(l.static=f,l.private=p,u=l.access={has:p?e=>tG(i,e):e=>n in e},d^3&&(u.get=p?e=>(d^1?nG:aG)(e,i,d^4?a:v.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>iG(e,i,t,d^4?a:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?p?a:v[h]:d>4?void 0:{get:v.get,set:v.set}:i,l),c._=1,d^4||s===void 0?YW(s)&&(d>4?g.unshift(s):d?p?a=s:v[h]=s:i=s):typeof s!=`object`||!s?VW(`Object expected`):(YW(o=s.get)&&(v.get=o),YW(o=s.set)&&(v.set=o),YW(o=s.init)&&g.unshift(o));return d||ZW(e,i),v&&NW(i,n,v),p?d^4?a:v:i},eG=(e,t,n)=>t.has(e)||VW(`Cannot `+n),tG=(e,t)=>Object(t)===t?e.has(t):VW(`Cannot use the "in" operator on this value`),nG=(e,t,n)=>(eG(e,t,`read from private field`),n?n.call(e):t.get(e)),rG=(e,t,n)=>t.has(e)?VW(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),iG=(e,t,n,r)=>(eG(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),aG=(e,t,n)=>(eG(e,t,`access private method`),n);function oG(e,t){return{plugin:e,options:t}}function sG(e){return t=>oG(e,t)}function cG(e){return typeof e==`function`?{plugin:e,options:void 0}:e}var lG=[CU],uG,dG,fG,pG=class{constructor(e,t){this.manager=e,this.options=t,rG(this,dG,QW(uG,8,this,!1)),QW(uG,11,this),rG(this,fG,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return EH(()=>this.disabled)}configure(e){this.options=e}registerEffect(e){let t=qH(e.bind(this));return nG(this,fG).add(t),t}destroy(){nG(this,fG).forEach(e=>e())}static configure(e){return oG(this,e)}};uG=qW(null),dG=new WeakMap,fG=new WeakMap,$W(uG,4,`disabled`,lG,pG,dG),ZW(uG,pG);var mG=class extends pG{},hG,gG=class{constructor(e){this.manager=e,this.instances=new Map,rG(this,hG,[])}get values(){return Array.from(this.instances.values())}set values(e){let t=e.map(cG).reduce((e,t)=>{let n=e.find(({plugin:e})=>e===t.plugin);return n?(n.options=t.options,e):[...e,t]},[]),n=t.map(({plugin:e})=>e);for(let e of nG(this,hG))if(!n.includes(e)){if(e.prototype instanceof mG)continue;this.unregister(e)}for(let{plugin:e,options:n}of t)this.register(e,n);iG(this,hG,n)}get(e){return this.instances.get(e)}register(e,t){let n=this.instances.get(e);if(n)return n.options!==t&&(n.options=t),n;let r=new e(this.manager,t);return this.instances.set(e,r),r}unregister(e){let t=this.instances.get(e);t&&(t.destroy(),this.instances.delete(e))}destroy(){for(let e of this.instances.values())e.destroy();this.instances.clear()}};hG=new WeakMap;function _G(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}var vG=[],yG,bG,xG=class extends pG{constructor(e){super(e),rG(this,yG),rG(this,bG),this.computeCollisions=this.computeCollisions.bind(this),iG(this,bG,LH(vG)),this.destroy=EU(()=>{let e=this.computeCollisions(),t=EH(()=>this.manager.dragOperation.position.current);if(e!==vG){let e=nG(this,yG);if(iG(this,yG,t),e&&t.x==e.x&&t.y==e.y)return}else iG(this,yG,void 0);nG(this,bG).value=e},()=>{let{dragOperation:e}=this.manager;e.status.initialized&&this.forceUpdate()})}forceUpdate(e=!0){EH(()=>{e?nG(this,bG).value=this.computeCollisions():iG(this,yG,void 0)})}computeCollisions(e,t){let{registry:n,dragOperation:r}=this.manager,{source:i,shape:a,status:o}=r;if(!o.initialized||!a)return vG;let s=[],c=[];for(let a of e??n.droppables){if(a.disabled||i&&!a.accepts(i))continue;let e=t??a.collisionDetector;if(!e)continue;c.push(a),a.shape;let n=EH(()=>e({droppable:a,dragOperation:r}));n&&(a.collisionPriority!=null&&(n.priority=a.collisionPriority),s.push(n))}return c.length===0?vG:(s.sort(_G),s)}get collisions(){return nG(this,bG).value}};yG=new WeakMap,bG=new WeakMap;var SG,CG,wG=[CU],TG,EG,DG,OG,kG,AG,jG;CG=[CU],SG=[CU];var MG=class e{constructor(e,t){rG(this,OG,QW(DG,8,this)),QW(DG,11,this),rG(this,kG),rG(this,AG,QW(DG,12,this)),QW(DG,15,this),rG(this,jG,QW(DG,16,this)),QW(DG,19,this);let{effects:n,id:r,data:i={},disabled:a=!1,register:o=!0}=e,s=r;iG(this,kG,LH(r)),this.manager=t,this.data=i,this.disabled=a,this.effects=()=>[()=>{let{id:e,manager:t}=this;if(e!==s)return s=e,t?.registry.register(this),()=>t?.registry.unregister(this)},...n?.()??[]],this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),t&&o&&queueMicrotask(this.register)}get id(){let t=nG(this,kG).value;return e.pendingIdChanges?.get(this)??t}set id(t){t!==(e.pendingIdChanges?.get(this)??nG(this,kG).peek())&&(e.pendingIdChanges||(e.pendingIdChanges=new Map,queueMicrotask(()=>{var t;return aG(t=e,TG,EG).call(t)})),e.pendingIdChanges.set(this,t))}register(){return this.manager?.registry.register(this)}unregister(){var e;(e=this.manager)==null||e.registry.unregister(this)}destroy(){var e;(e=this.manager)==null||e.registry.unregister(this)}};DG=qW(null),TG=new WeakSet,EG=function(){let e=MG.pendingIdChanges;MG.pendingIdChanges=null,e&&wH(()=>{for(let[t,n]of e)nG(t,kG).value=n})},OG=new WeakMap,kG=new WeakMap,AG=new WeakMap,jG=new WeakMap,$W(DG,4,`manager`,wG,MG,OG),$W(DG,4,`data`,CG,MG,AG),$W(DG,4,`disabled`,SG,MG,jG),rG(MG,TG),ZW(DG,MG),MG.pendingIdChanges=null;var NG=MG,PG=class{constructor(){this.map=LH(new Map),this.cleanupFunctions=new WeakMap,this.register=(e,t)=>{let n=this.map.peek(),r=n.get(e),i=()=>this.unregister(e,t);if(r===t)return i;r&&r.id===e&&(this.cleanupFunctions.get(r)?.(),this.cleanupFunctions.delete(r));let a=new Map(n);for(let[r,i]of n)if(i===t&&r!==e){a.delete(r);break}a.set(e,t),this.map.value=a;let o=EU(...t.effects());return this.cleanupFunctions.set(t,o),i},this.unregister=(e,t)=>{let n=this.map.peek();if(n.get(e)!==t)return;this.cleanupFunctions.get(t)?.(),this.cleanupFunctions.delete(t);let r=new Map(n);r.delete(e),this.map.value=r}}[Symbol.iterator](){return this.map.peek().values()}get value(){return this.map.value.values()}has(e){return this.map.value.has(e)}get(e){return this.map.value.get(e)}destroy(){for(let e of this)this.cleanupFunctions.get(e)?.(),e.destroy();this.map.value=new Map}},FG,IG,LG,RG,zG,BG,VG,HG,UG,WG,GG,KG=class extends (VG=NG,BG=[CU],zG=[CU],RG=[CU],LG=[wU],IG=[wU],FG=[wU],VG){constructor(e,t){var n=e,{modifiers:r,type:i,sensors:a,plugins:o,effects:s}=n,c=KW(n,[`modifiers`,`type`,`sensors`,`plugins`,`effects`]);super(WW(UW({},c),{effects:()=>[...s?.()??[],()=>{let{manager:e,plugins:t}=this;if(!(!e||!t))for(let n of t){let{plugin:t}=cG(n);e.registry.plugins.register(t)}}]}),t),QW(HG,5,this),rG(this,UG,QW(HG,8,this)),QW(HG,11,this),rG(this,WG,QW(HG,12,this)),QW(HG,15,this),rG(this,GG,QW(HG,16,this,this.isDragSource?`dragging`:`idle`)),QW(HG,19,this),this.type=i,this.sensors=a,this.modifiers=r,this.alignment=c.alignment,this.plugins=o}pluginConfig(e){if(this.plugins)for(let t of this.plugins){let n=cG(t);if(n.plugin===e)return n.options}}get isDropping(){return this.status===`dropping`&&this.isDragSource}get isDragging(){return this.status===`dragging`&&this.isDragSource}get isDragSource(){return this.manager?.dragOperation.source?.id===this.id}};HG=qW(VG),UG=new WeakMap,WG=new WeakMap,GG=new WeakMap,$W(HG,4,`type`,BG,KG,UG),$W(HG,4,`modifiers`,zG,KG,WG),$W(HG,4,`status`,RG,KG,GG),$W(HG,2,`isDropping`,LG,KG),$W(HG,2,`isDragging`,IG,KG),$W(HG,2,`isDragSource`,FG,KG),ZW(HG,KG);var qG,JG,YG,XG,ZG,QG,$G,eK,tK,nK,rK,iK,aK,oK=class extends ($G=NG,QG=[CU],ZG=[CU],XG=[CU],YG=[CU],JG=[CU],qG=[wU],$G){constructor(e,t){var n=e,{accept:r,collisionDetector:i,collisionPriority:a,type:o}=n,s=KW(n,[`accept`,`collisionDetector`,`collisionPriority`,`type`]);super(s,t),QW(eK,5,this),rG(this,tK,QW(eK,8,this)),QW(eK,11,this),rG(this,nK,QW(eK,12,this)),QW(eK,15,this),rG(this,rK,QW(eK,16,this)),QW(eK,19,this),rG(this,iK,QW(eK,20,this)),QW(eK,23,this),rG(this,aK,QW(eK,24,this)),QW(eK,27,this),this.accept=r,this.collisionDetector=i,this.collisionPriority=a,this.type=o}accepts(e){let{accept:t}=this;return t?typeof t==`function`?t(e):e.type?Array.isArray(t)?t.includes(e.type):e.type===t:!1:!0}get isDropTarget(){return this.manager?.dragOperation.target?.id===this.id}};eK=qW($G),tK=new WeakMap,nK=new WeakMap,rK=new WeakMap,iK=new WeakMap,aK=new WeakMap,$W(eK,4,`accept`,QG,oK,tK),$W(eK,4,`type`,ZG,oK,nK),$W(eK,4,`collisionDetector`,XG,oK,rK),$W(eK,4,`collisionPriority`,YG,oK,iK),$W(eK,4,`shape`,JG,oK,aK),$W(eK,2,`isDropTarget`,qG,oK),ZW(eK,oK);var sK=class{constructor(){this.registry=new Map}addEventListener(e,t){let{registry:n}=this,r=new Set(n.get(e));return r.add(t),n.set(e,r),()=>this.removeEventListener(e,t)}removeEventListener(e,t){let{registry:n}=this,r=new Set(n.get(e));r.delete(t),n.set(e,r)}dispatch(e,...t){let{registry:n}=this,r=n.get(e);if(r)for(let e of r)e(...t)}},cK=class extends sK{constructor(e){super(),this.manager=e}dispatch(e,t){let n=[t,this.manager];super.dispatch(e,...n)}};function lK(e,t=!0){let n=!1;return WW(UW({},e),{cancelable:t,get defaultPrevented(){return n},preventDefault(){t&&(n=!0)}})}var uK=class extends mG{constructor(e){super(e);let t=(e,t)=>e.map(({id:e})=>e).join(``)===t.map(({id:e})=>e).join(``),n=[];this.destroy=EU(()=>{let{dragOperation:t,collisionObserver:r}=e;t.status.initializing&&(n=[],r.enable())},()=>{let{collisionObserver:r,monitor:i}=e,{collisions:a}=r;if(r.isDisabled()||NG.pendingIdChanges)return;let o=lK({collisions:a});if(i.dispatch(`collision`,o),o.defaultPrevented||t(a,n))return;n=a;let[s]=a;EH(()=>{s?.id!==e.dragOperation.target?.id&&(r.disable(),e.actions.setDropTarget(s?.id).then(()=>{r.enable()}))})})}},dK=(e=>(e[e.Lowest=0]=`Lowest`,e[e.Low=1]=`Low`,e[e.Normal=2]=`Normal`,e[e.High=3]=`High`,e[e.Highest=4]=`Highest`,e))(dK||{}),fK=(e=>(e[e.Collision=0]=`Collision`,e[e.ShapeIntersection=1]=`ShapeIntersection`,e[e.PointerIntersection=2]=`PointerIntersection`,e))(fK||{}),pK,mK,hK,gK,_K,vK,yK=[CU],bK,xK;vK=[wU],_K=[wU],gK=[wU],hK=[wU],mK=[wU],pK=[wU];var SK=class{constructor(){QW(bK,5,this),rG(this,xK,QW(bK,8,this,`idle`)),QW(bK,11,this)}get current(){return this.value}get idle(){return this.value===`idle`}get initializing(){return this.value===`initializing`}get initialized(){let{value:e}=this;return e!==`idle`&&e!==`initialization-pending`}get dragging(){return this.value===`dragging`}get dropped(){return this.value===`dropped`}set(e){this.value=e}};bK=qW(null),xK=new WeakMap,$W(bK,4,`value`,yK,SK,xK),$W(bK,2,`current`,vK,SK),$W(bK,2,`idle`,_K,SK),$W(bK,2,`initializing`,gK,SK),$W(bK,2,`initialized`,hK,SK),$W(bK,2,`dragging`,mK,SK),$W(bK,2,`dropped`,pK,SK),ZW(bK,SK);var CK=class{constructor(e){this.manager=e}setDragSource(e){let{dragOperation:t}=this.manager;t.sourceIdentifier=typeof e==`string`||typeof e==`number`?e:e.id}setDropTarget(e){return EH(()=>{let{dragOperation:t}=this.manager,n=e??null;if(t.targetIdentifier===n)return Promise.resolve(!1);t.targetIdentifier=n;let r=lK({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch(`dragover`,r),this.manager.renderer.rendering.then(()=>r.defaultPrevented)})}start(e){return EH(()=>{let{dragOperation:t}=this.manager;if(e.source!=null&&this.setDragSource(e.source),!t.source)throw Error(`Cannot start a drag operation without a drag source`);if(!t.status.idle)throw Error(`Cannot start a drag operation while another is active`);let n=new AbortController,{event:r,coordinates:i}=e;wH(()=>{t.status.set(`initialization-pending`),t.shape=null,t.canceled=!1,t.activatorEvent=r??null,t.position.reset(i)});let a=lK({operation:t.snapshot()});return this.manager.monitor.dispatch(`beforedragstart`,a),a.defaultPrevented?(t.reset(),n.abort(),n):(t.status.set(`initializing`),t.controller=n,this.manager.renderer.rendering.then(()=>{if(n.signal.aborted)return;let{status:e}=t;e.current===`initializing`&&wH(()=>{t.status.set(`dragging`),this.manager.monitor.dispatch(`dragstart`,{nativeEvent:r,operation:t.snapshot(),cancelable:!1})})}),n)})}move(e){return EH(()=>{let{dragOperation:t}=this.manager,{status:n,controller:r}=t;if(!n.dragging||!r||r.signal.aborted)return;let i=lK({nativeEvent:e.event,operation:t.snapshot(),by:e.by,to:e.to},e.cancelable??!0);(e.propagate??!0)&&this.manager.monitor.dispatch(`dragmove`,i),queueMicrotask(()=>{if(i.defaultPrevented)return;let n=e.to??{x:t.position.current.x+(e.by?.x??0),y:t.position.current.y+(e.by?.y??0)};t.position.current=n})})}stop(e={}){return EH(()=>{let{dragOperation:t}=this.manager,{controller:n}=t;if(!n||n.signal.aborted)return;let r,i=()=>{let e={resume:()=>{},abort:()=>{}};return r=new Promise((t,n)=>{e.resume=t,e.abort=n}),e};n.abort();let a=()=>{this.manager.renderer.rendering.then(()=>{t.status.set(`dropped`);let e=EH(()=>t.source?.status===`dropping`),r=()=>{t.controller===n&&(t.controller=void 0),t.reset()};if(e){let{source:e}=t,n=qH(()=>{e?.status===`idle`&&(n(),r())})}else this.manager.renderer.rendering.then(r)})};t.canceled=e.canceled??!1,this.manager.monitor.dispatch(`dragend`,{nativeEvent:e.event,operation:t.snapshot(),canceled:e.canceled??!1,suspend:i}),r?r.then(a).catch(()=>t.reset()):a()})}},wK=class extends pG{constructor(e,t){super(e,t),this.manager=e,this.options=t}},TK=class extends AbortController{constructor(e,t){super(),this.constraints=e,this.onActivate=t,this.activated=!1;for(let t of e??[])t.controller=this}onEvent(e){if(!this.activated)if(this.constraints?.length)for(let t of this.constraints)t.onEvent(e);else this.activate(e)}activate(e){this.activated||(this.activated=!0,this.onActivate(e))}abort(e){this.activated=!1,super.abort(e)}},EK,DK=class{constructor(e){this.options=e,rG(this,EK)}set controller(e){iG(this,EK,e),e.signal.addEventListener(`abort`,()=>this.abort())}activate(e){var t;(t=nG(this,EK))==null||t.activate(e)}};EK=new WeakMap;var OK=class extends pG{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},kK=class{constructor(e){this.draggables=new PG,this.droppables=new PG,this.plugins=new gG(e),this.sensors=new gG(e),this.modifiers=new gG(e)}register(e,t){if(e instanceof KG)return this.draggables.register(e.id,e);if(e instanceof oK)return this.droppables.register(e.id,e);if(e.prototype instanceof OK)return this.modifiers.register(e,t);if(e.prototype instanceof wK)return this.sensors.register(e,t);if(e.prototype instanceof pG)return this.plugins.register(e,t);throw Error(`Invalid instance type`)}unregister(e){if(e instanceof NG)return e instanceof KG?this.draggables.unregister(e.id,e):e instanceof oK?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof OK)return this.modifiers.unregister(e);if(e.prototype instanceof wK)return this.sensors.unregister(e);if(e.prototype instanceof pG)return this.plugins.unregister(e);throw Error(`Invalid instance type`)}destroy(){this.draggables.destroy(),this.droppables.destroy(),this.plugins.destroy(),this.sensors.destroy(),this.modifiers.destroy()}},AK,jK,MK,NK,PK,FK,IK,LK,RK=[wU],zK,BK,VK,HK,UK,WK,GK,KK,qK,JK;LK=[CU],IK=[CU],FK=[CU],PK=[CU],NK=[CU],MK=[wU],jK=[wU],AK=[wU];var YK=class{constructor(e){QW(HK,5,this),rG(this,zK),rG(this,BK),rG(this,VK,new qU(void 0,(e,t)=>e&&t?e.equals(t):e===t)),this.status=new SK,rG(this,UK,QW(HK,8,this,!1)),QW(HK,11,this),rG(this,WK,QW(HK,12,this,null)),QW(HK,15,this),rG(this,GK,QW(HK,16,this,null)),QW(HK,19,this),rG(this,KK,QW(HK,20,this,null)),QW(HK,23,this),rG(this,qK,QW(HK,24,this,[])),QW(HK,27,this),this.position=new OW({x:0,y:0}),rG(this,JK,{x:0,y:0}),iG(this,zK,e)}get shape(){let{current:e,initial:t,previous:n}=nG(this,VK);return!e||!t?null:{current:e,initial:t,previous:n}}set shape(e){e?nG(this,VK).current=e:nG(this,VK).reset()}get source(){let e=this.sourceIdentifier;if(e==null)return null;let t=nG(this,zK).registry.draggables.get(e);return t&&iG(this,BK,t),t??nG(this,BK)??null}get target(){let e=this.targetIdentifier;return e==null?null:nG(this,zK).registry.droppables.get(e)??null}get transform(){let{x:e,y:t}=this.position.delta,n={x:e,y:t};for(let e of this.modifiers)n=e.apply(WW(UW({},this.snapshot()),{transform:n}));return iG(this,JK,n),n}snapshot(){return EH(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:nG(this,JK),shape:this.shape?JU(this.shape):null,position:JU(this.position),status:JU(this.status),canceled:this.canceled}))}reset(){wH(()=>{this.status.set(`idle`),this.sourceIdentifier=null,this.targetIdentifier=null,nG(this,VK).reset(),this.position.reset({x:0,y:0}),iG(this,JK,{x:0,y:0}),this.modifiers=[]})}};HK=qW(null),zK=new WeakMap,BK=new WeakMap,VK=new WeakMap,UK=new WeakMap,WK=new WeakMap,GK=new WeakMap,KK=new WeakMap,qK=new WeakMap,JK=new WeakMap,$W(HK,2,`shape`,RK,YK),$W(HK,4,`canceled`,LK,YK,UK),$W(HK,4,`activatorEvent`,IK,YK,WK),$W(HK,4,`sourceIdentifier`,FK,YK,GK),$W(HK,4,`targetIdentifier`,PK,YK,KK),$W(HK,4,`modifiers`,NK,YK,qK),$W(HK,2,`source`,MK,YK),$W(HK,2,`target`,jK,YK),$W(HK,2,`transform`,AK,YK),ZW(HK,YK);var XK={get rendering(){return Promise.resolve()}};function ZK(e,t){return typeof e==`function`?e(t):e??t}var QK=class{constructor(e){this.destroy=()=>{this.dragOperation.status.idle||this.actions.stop({canceled:!0}),this.dragOperation.modifiers.forEach(e=>e.destroy()),this.registry.destroy(),this.collisionObserver.destroy()};let t=e??{},n=ZK(t.plugins,[]),r=ZK(t.sensors,[]),i=ZK(t.modifiers,[]),a=t.renderer??XK,o=new cK(this),s=new kK(this);this.registry=s,this.monitor=o,this.renderer=a,this.actions=new CK(this),this.dragOperation=new YK(this),this.collisionObserver=new xG(this),this.plugins=[uK,...n],this.modifiers=i,this.sensors=r;let{destroy:c}=this,l=EU(()=>{let e=EH(()=>this.dragOperation.modifiers),t=this.modifiers;for(let n of e)t.includes(n)||n.destroy();this.dragOperation.modifiers=(this.dragOperation.source?.modifiers)?.map(e=>{let{plugin:t,options:n}=cG(e);return new t(this,n)})??t});this.destroy=()=>{l(),c()}}get plugins(){return this.registry.plugins.values}set plugins(e){this.registry.plugins.values=e}get modifiers(){return this.registry.modifiers.values}set modifiers(e){this.registry.modifiers.values=e}get sensors(){return this.registry.sensors.values}set sensors(e){this.registry.sensors.values=e}},$K=e=>{throw TypeError(e)},eq=(e,t,n)=>t.has(e)||$K(`Cannot `+n),tq=(e,t,n)=>(eq(e,t,`read from private field`),t.get(e)),nq=(e,t,n)=>t.has(e)?$K(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),rq=(e,t,n,r)=>(eq(e,t,`write to private field`),t.set(e,n),n),iq=(e,t,n)=>(eq(e,t,`access private method`),n);function aq(e){return e?e instanceof KeyframeEffect?!0:`getKeyframes`in e&&typeof e.getKeyframes==`function`:!1}function oq(e,t){let n=e.getAnimations(),r=null;for(let e of n){if(e.playState!==`running`)continue;let{effect:n}=e,i=(aq(n)?n.getKeyframes():[]).filter(t);i.length>0&&(r=[i[i.length-1],e])}return r}function sq(e){let{width:t,height:n,top:r,left:i,bottom:a,right:o}=e.getBoundingClientRect();return{width:t,height:n,top:r,left:i,bottom:a,right:o}}function cq(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function lq(e){return`nodeType`in e}function uq(e){return e?cq(e)?e:lq(e)?`defaultView`in e?e.defaultView??window:e.ownerDocument?.defaultView??window:window:window}function dq(e){let{Document:t}=uq(e);return e instanceof t||`nodeType`in e&&e.nodeType===Node.DOCUMENT_NODE}function fq(e){return!e||cq(e)?!1:e instanceof uq(e).HTMLElement||`namespaceURI`in e&&typeof e.namespaceURI==`string`&&e.namespaceURI.endsWith(`html`)}function pq(e){return e instanceof uq(e).SVGElement||`namespaceURI`in e&&typeof e.namespaceURI==`string`&&e.namespaceURI.endsWith(`svg`)}function mq(e){return e?cq(e)?e.document:lq(e)?dq(e)?e:fq(e)||pq(e)?e.ownerDocument:document:document:document}function hq(e){let{documentElement:t}=mq(e),n=uq(e).visualViewport,r=n?.width??t.clientWidth,i=n?.height??t.clientHeight,a=n?.offsetTop??0,o=n?.offsetLeft??0;return{top:a,left:o,right:o+r,bottom:a+i,width:r,height:i}}function gq(e,t){if(_q(e)&&e.open===!1)return!1;let{overflow:n,overflowX:r,overflowY:i}=getComputedStyle(e);return n===`visible`&&r===`visible`&&i===`visible`}function _q(e){return e.tagName===`DETAILS`}function vq(e,t=e.getBoundingClientRect(),n=0){let r=t,{ownerDocument:i}=e,a=i.defaultView??window,o=e.parentElement;for(;o&&o!==i.documentElement;){if(!gq(o)){let e=o.getBoundingClientRect(),t=n*(e.bottom-e.top),i=n*(e.right-e.left),a=n*(e.bottom-e.top),s=n*(e.right-e.left);r={top:Math.max(r.top,e.top-t),right:Math.min(r.right,e.right+i),bottom:Math.min(r.bottom,e.bottom+a),left:Math.max(r.left,e.left-s),width:0,height:0},r.width=r.right-r.left,r.height=r.bottom-r.top}o=o.parentElement}let s=a.visualViewport,c=s?.offsetTop??0,l=s?.offsetLeft??0,u=s?.width??a.innerWidth,d=s?.height??a.innerHeight,f=n*d,p=n*u;return r={top:Math.max(r.top,c-f),right:Math.min(r.right,l+u+p),bottom:Math.min(r.bottom,c+d+f),left:Math.max(r.left,l-p),width:0,height:0},r.width=r.right-r.left,r.height=r.bottom-r.top,r.width<0&&(r.width=0),r.height<0&&(r.height=0),r}function yq(e){return{x:e.clientX,y:e.clientY}}var bq=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function xq(e=document,t=new Set){if(t.has(e))return[];t.add(e);let n=[e];for(let r of Array.from(e.querySelectorAll(`iframe, frame`)))try{let e=r.contentDocument;e&&!t.has(e)&&n.push(...xq(e,t))}catch{}try{let r=e.defaultView;if(r&&r!==window.top){let i=r.parent;i&&i.document&&i.document!==e&&n.push(...xq(i.document,t))}}catch{}return n}function Sq(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Cq(){let e=Sq()?window.visualViewport:null;return{x:e?.offsetLeft??0,y:e?.offsetTop??0}}function wq(e){return!e||!lq(e)?!1:e instanceof uq(e).ShadowRoot}function Tq(e){if(e&&lq(e)){let t=e.getRootNode();if(wq(t)||t instanceof Document)return t}return mq(e)}function Eq(e){return e.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function Dq(e){let t=`input, textarea, select, canvas, [contenteditable]`,n=e.cloneNode(!0),r=Array.from(e.querySelectorAll(t));return Array.from(n.querySelectorAll(t)).forEach((e,t)=>{let n=r[t];Oq(e)&&Oq(n)&&(e.type!==`file`&&(e.value=n.value),e.type===`radio`&&e.name&&(e.name=`Cloned__${e.name}`)),kq(e)&&kq(n)&&n.width>0&&n.height>0&&e.getContext(`2d`)?.drawImage(n,0,0)}),n}function Oq(e){return`value`in e}function kq(e){return e.tagName===`CANVAS`}function Aq(e,{x:t,y:n}){let r=e.elementFromPoint(t,n);if(jq(r)){let{contentDocument:e}=r;if(e){let{left:i,top:a}=r.getBoundingClientRect();return Aq(e,{x:t-i,y:n-a})}}return r}function jq(e){return e?.tagName===`IFRAME`}var Mq=new WeakMap;function Nq(e){return!!e.closest(`
10
+ \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:a,secondInputs:o,stack:e})}},Bu={inputStabilityCheck:`once`,identityFunctionCheck:`once`},Vu=Symbol(`NOT_FOUND`),Hu=e=>Array.isArray(e)?e:[e],Uu=(e,t)=>{let{identityFunctionCheck:n,inputStabilityCheck:r}={...Bu,...t};return{identityFunctionCheck:{shouldRun:n===`always`||n===`once`&&e,run:Ru},inputStabilityCheck:{shouldRun:r===`always`||r===`once`&&e,run:zu}}},Wu=(e,t)=>e===t,Gu=class{constructor(e){this.value=e}deref(){return this.value}},Ku=()=>typeof WeakRef>`u`?Gu:WeakRef,qu=Ku(),Ju=0,Yu=1})),Zu,Qu,$u=m((()=>{G(),Xu(),Zu=Lu({memoize:dte,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),Qu=(...e)=>{let t=new WeakMap,n=1,r=e[e.length-1],i=e.length-1||1,a=r.length-i;if(a>3)throw Error(process.env.NODE_ENV===`production`?W(2):`Unsupported number of arguments`);return(i,o,s,c)=>{let l=i.__cacheKey__;l||(l={id:n},i.__cacheKey__=l,n+=1);let u=t.get(l);if(!u){let n=e,i=[void 0,void 0,void 0];switch(a){case 0:break;case 1:n=[...e.slice(0,-1),()=>i[0],r];break;case 2:n=[...e.slice(0,-1),()=>i[0],()=>i[1],r];break;case 3:n=[...e.slice(0,-1),()=>i[0],()=>i[1],()=>i[2],r];break;default:throw Error(process.env.NODE_ENV===`production`?W(2):`Unsupported number of arguments`)}u=Zu(...n),u.selectorArgs=i,t.set(l,u)}switch(u.selectorArgs[0]=o,u.selectorArgs[1]=s,u.selectorArgs[2]=c,a){case 0:return u(i);case 1:return u(i,o);case 2:return u(i,o,s);case 3:return u(i,o,s,c);default:throw Error(`unreachable`)}}}}));function ed(){return od}function td(e){ad.push(e)}function nd(e){let t=(t,n)=>{let r=D(id).current,i;try{od=r;for(let e of ad)e.before(r);i=e(t,n);for(let e of ad)e.after(r);r.didInitialize=!0}finally{od=void 0}return i};return t.displayName=e.displayName||e.name,t}function rd(e){return t.forwardRef(nd(e))}function id(){return{didInitialize:!1}}var ad,od,sd=m((()=>{k(),ad=[],od=void 0}));function Q(e,t,n,r,i){return dd(e,t,n,r,i)}function cd(e,n,r,a,o){let s=t.useCallback(()=>n(e.getSnapshot(),r,a,o),[e,n,r,a,o]);return(0,i.useSyncExternalStore)(e.subscribe,s,s)}function ld(e,t,n,r,i){let a=ed();if(!a)return cd(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.didChange=!0)):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},a.syncHooks.push(s)),s.value}function ud(e,t,n,r,i){return(0,a.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var dd,fd=m((()=>{Se(),sd(),dd=be(19)?ld:ud,td({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){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,i))&&(t=!0,r.value=i,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,i.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}})})),pd,md=m((()=>{fd(),pd=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Q(this,e,t,n,r)}}})),hd,gd=m((()=>{md(),fd(),F(),R(),Ae(),hd=class extends pd{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,n){t.useDebugValue(e),L(()=>{this.state[e]!==n&&this.set(e,n)},[e,n])}useSyncedValueWithCleanup(e,t){let n=this;L(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let n=this;if(process.env.NODE_ENV!==`production`){t.useDebugValue(e,e=>Object.keys(e));let n=t.useRef(Object.keys(e)).current,r=Object.keys(e);(n.length!==r.length||n.some((e,t)=>e!==r[t]))&&console.error(`ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.`)}L(()=>{n.update(e)},[n,...Object.values(e)])}useControlledProp(e,n){t.useDebugValue(e);let r=n!==void 0;if(L(()=>{r&&!Object.is(this.state[e],n)&&super.setState({...this.state,[e]:n})},[e,n,r]),process.env.NODE_ENV!==`production`){let t=this.controlledValues??=new Map;t.has(e)||t.set(e,r);let n=t.get(e);n!==void 0&&n!==r&&console.error(`A component is changing the ${r?``:`un`}controlled state of ${e.toString()} to be ${r?`un`:``}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,n,r,i){return t.useDebugValue(e),Q(this,this.selectors[e],n,r,i)}useContextCallback(e,n){t.useDebugValue(e);let r=A(n??De);this.context[e]=r}useStateSetter(e){let n=t.useRef(void 0);return n.current===void 0&&(n.current=t=>{this.set(e,t)}),n.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}}}));function _d(){let[,e]=t.useState({});return t.useCallback(()=>{e({})},[])}var vd=m((()=>{})),yd=m((()=>{})),bd=m((()=>{ite(),$u(),fd(),md(),gd(),yd()})),xd,Sd,Cd=m((()=>{bd(),rl(),Sa(),xd={open:Z(e=>e.open),transitionStatus:Z(e=>e.transitionStatus),domReferenceElement:Z(e=>e.domReferenceElement),referenceElement:Z(e=>e.positionReference??e.referenceElement),floatingElement:Z(e=>e.floatingElement),floatingId:Z(e=>e.floatingId)},Sd=class extends hd{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:nl(),nested:n,triggerElements:i},xd),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&fi(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}}}));function wd(e,n){let r=t.useRef(null),i=t.useRef(null);return t.useCallback(t=>{if(e!==void 0){if(r.current!==null){let e=r.current,t=i.current,a=n.context.triggerElements.getById(e);t&&a===t&&n.context.triggerElements.delete(e),r.current=null,i.current=null}t!==null&&(r.current=e,i.current=t,n.context.triggerElements.add(e,t))}},[n,e])}function Td(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=wd(e,n),o=A(t=>{if(a(t),!t||!n.select(`open`))return;let i=n.select(`activeTriggerId`);if(i===e){n.update({activeTriggerElement:t,...r});return}i??n.update({activeTriggerId:e,activeTriggerElement:t,...r})});return L(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:o,isMountedByThisTrigger:i}}function Ed(e){let t=e.useState(`open`);L(()=>{if(t&&!e.select(`activeTriggerId`)&&e.context.triggerElements.size===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[n,r]=t.value;e.update({activeTriggerId:n,activeTriggerElement:r})}}},[t,e])}function Dd(e,t,n){let{mounted:r,setMounted:i,transitionStatus:a}=bn(e);t.useSyncedValues({mounted:r,transitionStatus:a});let o=A(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return Qa({enabled:!t.useState(`preventUnmountingOnClose`),open:e,ref:t.context.popupRef,onComplete(){e||o()}}),{forceUnmount:o,transitionStatus:a}}var Od=m((()=>{F(),R(),xn(),$a()})),kd,Ad=m((()=>{kd=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);if(n!==t&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t),process.env.NODE_ENV!==`production`&&this.elementsSet.size!==this.idMap.size))throw Error(`Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.`)}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}}));function jd(){return new Sd({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new kd,floatingId:``,syncOnly:!1,nested:!1,onOpenChange:void 0})}var Md=m((()=>{Ld(),Cd()}));function Nd(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:jd(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:ke,inactiveTriggerProps:ke,popupProps:ke}}var Pd,Fd,Id=m((()=>{bd(),Ae(),Md(),Pd=Z(e=>e.triggerIdProp??e.activeTriggerId),Fd={open:Z(e=>e.openProp??e.open),mounted:Z(e=>e.mounted),transitionStatus:Z(e=>e.transitionStatus),floatingRootContext:Z(e=>e.floatingRootContext),preventUnmountingOnClose:Z(e=>e.preventUnmountingOnClose),payload:Z(e=>e.payload),activeTriggerId:Pd,activeTriggerElement:Z(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:Z((e,t)=>t!==void 0&&Pd(e)===t),isOpenedByTrigger:Z((e,t)=>t!==void 0&&Pd(e)===t&&e.open),isMountedByTrigger:Z((e,t)=>t!==void 0&&Pd(e)===t&&e.mounted),triggerProps:Z((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:Z(e=>e.popupProps),popupElement:Z(e=>e.popupElement),positionerElement:Z(e=>e.positionerElement)}})),Ld=m((()=>{Od(),Ad(),Id()}));function Rd(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Jt(),a=dl()!=null;if(process.env.NODE_ENV!==`production`){let e=r.reference;e&&!$n(e)&&console.error("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `context.setPositionReference()`",`instead.`)}let o=D(()=>new Sd({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new kd,floatingId:i,syncOnly:!1,nested:a})).current;return L(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=$n(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}var zd=m((()=>{yr(),Zt(),k(),R(),pl(),Cd(),Ld()}));function Bd(e={}){let{nodeId:n,externalTree:r}=e,i=Rd(e),a=e.rootContext||i,o={reference:a.useState(`referenceElement`),floating:a.useState(`floatingElement`),domReference:a.useState(`domReferenceElement`)},[s,c]=t.useState(null),l=t.useRef(null),u=fl(r);L(()=>{o.domReference&&(l.current=o.domReference)},[o.domReference]);let d=rte({...e,elements:{...o,...s&&{reference:s}}}),f=t.useCallback(e=>{let t=$n(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;c(t),d.refs.setReference(t)},[d.refs]),[p,m]=t.useState(void 0),[h,g]=t.useState(null);a.useSyncedValue(`referenceElement`,p??null);let _=$n(p)?p:null;a.useSyncedValue(`domReferenceElement`,p===void 0?o.domReference:_),a.useSyncedValue(`floatingElement`,h);let v=t.useCallback(e=>{($n(e)||e===null)&&(l.current=e,m(e)),($n(d.refs.reference.current)||d.refs.reference.current===null||e!==null&&!$n(e))&&d.refs.setReference(e)},[d.refs,m]),y=t.useCallback(e=>{g(e),d.refs.setFloating(e)},[d.refs]),b=t.useMemo(()=>({...d.refs,setReference:v,setFloating:y,setPositionReference:f,domReference:l}),[d.refs,v,y,f]),x=t.useMemo(()=>({...d.elements,domReference:o.domReference}),[d.elements,o.domReference]),S=a.useState(`open`),C=a.useState(`floatingId`),w=t.useMemo(()=>({...d,dataRef:a.context.dataRef,open:S,onOpenChange:a.setOpen,events:a.context.events,floatingId:C,refs:b,elements:x,nodeId:n,rootStore:a}),[d,b,x,n,a,S,C]);return L(()=>{a.context.dataRef.current.floatingContext=w;let e=u?.nodesRef.current.find(e=>e.id===n);e&&(e.context=w)}),t.useMemo(()=>({...d,context:w,refs:b,elements:x,rootStore:a}),[d,b,x,w,a])}var Vd=m((()=>{Pu(),yr(),R(),pl(),zd()}));function Hd(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,onOpenChange:r}=e,i=Jt(),a=dl()!=null,o=t.useState(`open`),s=t.useState(`activeTriggerElement`),c=t.useState(n?`popupElement`:`positionerElement`),l=t.context.triggerElements,u=D(()=>new Sd({open:o,transitionStatus:void 0,referenceElement:s,floatingElement:c,triggerElements:l,onOpenChange:r,floatingId:i,syncOnly:!0,nested:a})).current;return L(()=>{let e={open:o,floatingId:i,referenceElement:s,floatingElement:c};$n(s)&&(e.domReferenceElement=s),u.state.positionReference===u.state.referenceElement&&(e.positionReference=s),u.update(e)},[o,i,s,c,u]),u.context.onOpenChange=r,u.context.nested=a,u}var Ud=m((()=>{Zt(),k(),R(),yr(),pl(),Cd()}));function Wd(e,n={}){let r=`rootStore`in e?e.rootStore:e,{events:i,dataRef:a}=r.context,{enabled:o=!0,delay:s}=n,c=t.useRef(!1),l=t.useRef(null),u=Xs(),d=t.useRef(!0);t.useEffect(()=>{let e=r.select(`domReferenceElement`);if(!o)return;let t=Xn(e);function n(){let e=r.select(`domReferenceElement`);!r.select(`open`)&&er(e)&&e===qr(ta(e))&&(c.current=!0)}function i(){d.current=!0}function a(){d.current=!1}return fc(Ka(t,`blur`,n),Gd&&Ka(t,`keydown`,i,!0),Gd&&Ka(t,`pointerdown`,a,!0))},[r,o]),t.useEffect(()=>{if(!o)return;function e(e){if(e.reason===`trigger-press`||e.reason===`escape-key`){let e=r.select(`domReferenceElement`);$n(e)&&(l.current=e,c.current=!0)}}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[i,o,r]);let f=t.useMemo(()=>({onMouseLeave(){c.current=!1,l.current=null},onFocus(e){let t=e.currentTarget;if(c.current){if(l.current===t)return;c.current=!1,l.current=null}let n=Yr(e.nativeEvent);if($n(n)){if(Gd&&!e.relatedTarget){if(!d.current&&!$r(n))return}else if(!ni(n))return}let i=Zr(e.relatedTarget,r.context.triggerElements),{nativeEvent:a,currentTarget:o}=e,f=typeof s==`function`?s():s;if(r.select(`open`)&&i||f===0||f===void 0){r.setOpen(!0,J(dt,a,o));return}u.start(f,()=>{c.current||r.setOpen(!0,J(dt,a,o))})},onBlur(e){c.current=!1,l.current=null;let t=e.relatedTarget,n=e.nativeEvent,i=$n(t)&&t.hasAttribute(Sc(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;u.start(0,()=>{let e=r.select(`domReferenceElement`),o=qr(ta(e));!t&&o===e||Jr(a.current.floatingContext?.refs.floating.current,o)||Jr(e,o)||i||Zr(t??o,r.context.triggerElements)||r.setOpen(!1,J(dt,n))})}}),[a,r,u,s]);return t.useMemo(()=>o?{reference:f,trigger:f}:{},[o,f])}var Gd,Kd=m((()=>{yr(),qa(),pc(),zr(),$s(),na(),ii(),Vt(),zt(),Cc(),Gd=Lr&&Fr}));function qd(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&Zd.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),Zd.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Jd(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=Zd.get(n);a&&a!==e&&qd(a),qd(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,Zd.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function Yd(e){let t=D(Xd.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||=t,en(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}var Xd,Zd,Qd=m((()=>{nn(),k(),$s(),Sa(),Xd=class e{constructor(){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 Qs,this.restTimeout=new Qs,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},Zd=new WeakMap}));function $d(e,n={}){let r=`rootStore`in e?e.rootStore:e,i=r.useState(`open`),a=r.useState(`floatingElement`),o=r.useState(`domReferenceElement`),{dataRef:s}=r.context,{enabled:c=!0,closeDelay:l=0,nodeId:u}=n,d=Yd(r),f=fl(),p=dl(),m=A(()=>lc(s.current.openEvent?.type,d.interactedInside)),h=A(()=>{let e=s.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`}),g=A(e=>Zr(e,r.context.triggerElements)),_=t.useCallback(e=>{let t=sc(l,`close`,d.pointerType),n=()=>{r.setOpen(!1,J(ut,e)),f?.events.emit(`floating.closed`,e)};t?d.openChangeTimeout.start(t,n):(d.openChangeTimeout.clear(),n())},[l,r,d,f]),v=A(()=>{qd(d)}),y=A(e=>{let t=Yr(e);if(!ei(t)){d.interactedInside=!1;return}d.interactedInside=t?.closest(`[aria-haspopup]`)!=null});L(()=>{i||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,v())},[i,d,v]),t.useEffect(()=>v,[v]),L(()=>{if(c&&i&&d.handleCloseOptions?.blockPointerEvents&&h()&&$n(o)&&a){let e=o,t=a,n=ta(a),r=f?.nodesRef.current.find(e=>e.id===p)?.context?.elements.floating;return r&&(r.style.pointerEvents=``),Jd(d,{scopeElement:d.handleCloseOptions?.getScope?.()??d.pointerEventsScopeElement??r??e.closest(`[data-rootownerid]`)??n.body,referenceElement:e,floatingElement:t}),()=>{v()}}},[c,i,o,a,d,h,f,p,v]);let b=Xs();t.useEffect(()=>{if(!c)return;function e(){d.openChangeTimeout.clear(),b.clear(),f?.events.off(`floating.closed`,n),v()}function t(e){if(f&&p&&ai(f.nodesRef.current,p).length>0){f.events.on(`floating.closed`,n);return}if(g(e.relatedTarget))return;let t=s.current.floatingContext?.nodeId??u,r=e.relatedTarget;if(!(f&&t&&$n(r)&&ai(f.nodesRef.current,t,!1).some(e=>Jr(e.context?.elements.floating,r)))){if(d.handler){d.handler(e);return}v(),m()||_(e)}}function n(e){!f||!p||ai(f.nodesRef.current,p).length>0||b.start(0,()=>{f.events.off(`floating.closed`,n),r.setOpen(!1,J(ut,e)),f.events.emit(`floating.closed`,e)})}let i=a;return fc(i&&Ka(i,`mouseenter`,e),i&&Ka(i,`mouseleave`,t),i&&Ka(i,`pointerdown`,y,!0),()=>{f?.events.off(`floating.closed`,n)})},[c,a,r,s,u,m,g,_,v,y,d,f,p,b])}var ef=m((()=>{yr(),qa(),pc(),F(),R(),$s(),na(),ii(),si(),Vt(),zt(),pl(),Qd(),uc()}));function tf(e,n={}){let i=`rootStore`in e?e.rootStore:e,{dataRef:a,events:o}=i.context,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:f=!0,triggerElementRef:p=nf,externalTree:m,isActiveTrigger:h=!0,getHandleCloseContext:g,isClosing:_}=n,v=fl(m),y=Yd(i),b=t.useRef(!1),x=mc(l),S=mc(c),C=mc(d),w=mc(s),T=mc(_);h&&(y.handleCloseOptions=x.current?.__options);let E=A(()=>lc(a.current.openEvent?.type,y.interactedInside)),D=A(e=>Zr(e,i.context.triggerElements)),O=A((e,t,n)=>{let r=i.context.triggerElements;if(r.hasElement(t))return!e||!Jr(e,t);if(!$n(n))return!1;let a=n;return r.hasMatchingElement(e=>Jr(e,a))&&(!e||!Jr(e,a))}),k=A((e,t=!0)=>{let n=sc(S.current,`close`,y.pointerType);n?y.openChangeTimeout.start(n,()=>{i.setOpen(!1,J(ut,e)),v?.events.emit(`floating.closed`,e)}):t&&(y.openChangeTimeout.clear(),i.setOpen(!1,J(ut,e)),v?.events.emit(`floating.closed`,e))}),j=A(()=>{y.handler&&=(ta(i.select(`domReferenceElement`)).removeEventListener(`mousemove`,y.handler),void 0)}),M=A(()=>{qd(y)});return t.useEffect(()=>j,[j]),t.useEffect(()=>{if(!s)return;function e(e){e.open?b.current=!1:(b.current=e.reason===ut,j(),y.openChangeTimeout.clear(),y.restTimeout.clear(),y.blockMouseMove=!0,y.restTimeoutPending=!1)}return o.on(`openchange`,e),()=>{o.off(`openchange`,e)}},[s,o,y,j]),t.useEffect(()=>{if(!s)return;let e=p.current??(h?i.select(`domReferenceElement`):null);if(!$n(e))return;function t(e){if(y.openChangeTimeout.clear(),y.blockMouseMove=!1,u&&!di(y.pointerType))return;let t=cc(C.current),n=sc(S.current,`open`,y.pointerType),r=Yr(e),a=e.currentTarget??null,o=i.select(`domReferenceElement`),s=a;if($n(r)&&!i.context.triggerElements.hasElement(r)){for(let e of i.context.triggerElements.elements())if(Jr(e,r)){s=e;break}}$n(a)&&$n(o)&&!i.context.triggerElements.hasElement(a)&&Jr(a,o)&&(s=o);let c=s==null?!1:O(o,s,r),l=i.select(`open`),d=T.current?.()??i.select(`transitionStatus`)===`ending`,f=!l&&d&&b.current,p=!c&&$n(s)&&$n(o)&&Jr(o,s)&&f,m=t>0&&!n,h=c&&(l||f)||p,g=!l||c;if(h){i.setOpen(!0,J(ut,e,s));return}m||(n?y.openChangeTimeout.start(n,()=>{g&&i.setOpen(!0,J(ut,e,s))}):g&&i.setOpen(!0,J(ut,e,s)))}function n(e){if(E()){M();return}j();let t=ta(i.select(`domReferenceElement`));y.restTimeout.clear(),y.restTimeoutPending=!1;let n=a.current.floatingContext??g?.();if(!D(e.relatedTarget)){if(x.current&&n){i.select(`open`)||y.openChangeTimeout.clear();let r=p.current;y.handler=x.current({...n,tree:v,x:e.clientX,y:e.clientY,onClose(){M(),j(),w.current&&!E()&&r===i.select(`domReferenceElement`)&&k(e,!0)}}),t.addEventListener(`mousemove`,y.handler),y.handler(e);return}(y.pointerType!==`touch`||!Jr(i.select(`floatingElement`),e.relatedTarget))&&k(e)}}return f?fc(Ka(e,`mousemove`,t,{once:!0}),Ka(e,`mouseenter`,t),Ka(e,`mouseleave`,n)):fc(Ka(e,`mouseenter`,t),Ka(e,`mouseleave`,n))},[j,M,a,S,k,i,s,x,y,h,O,E,D,u,f,C,p,v,w,g,T]),t.useMemo(()=>{if(!s)return;function e(e){y.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,n=e.currentTarget,a=i.select(`domReferenceElement`),o=i.select(`open`),s=O(a,n,e.target);if(u&&!di(y.pointerType))return;if(o&&s&&y.handleCloseOptions?.blockPointerEvents){let e=i.select(`floatingElement`);e&&Jd(y,{scopeElement:y.handleCloseOptions?.getScope?.()??n.ownerDocument.body,referenceElement:n,floatingElement:e})}let c=cc(C.current);if(o&&!s||c===0||!s&&y.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;y.restTimeout.clear();function l(){if(y.restTimeoutPending=!1,E())return;let e=i.select(`open`);!y.blockMouseMove&&(!e||s)&&i.setOpen(!0,J(ut,t,n))}y.pointerType===`touch`?r.flushSync(()=>{l()}):s&&o?l():(y.restTimeoutPending=!0,y.restTimeout.start(c,l))}}},[s,y,E,O,u,i,C])}var nf,rf=m((()=>{yr(),qa(),pc(),hc(),F(),na(),ii(),pi(),Vt(),zt(),pl(),Qd(),uc(),nf={current:null}}));function af(e=[]){let n=e.map(e=>e?.reference),r=e.map(e=>e?.floating),i=e.map(e=>e?.item),a=e.map(e=>e?.trigger),o=t.useCallback(t=>of(t,e,`reference`),n),s=t.useCallback(t=>of(t,e,`floating`),r),c=t.useCallback(t=>of(t,e,`item`),i),l=t.useCallback(t=>of(t,e,`trigger`),a);return t.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:c,getTriggerProps:l}),[o,s,c,l])}function of(e,t,n){let r=new Map,i=n===`item`,a={};n===`floating`&&(a.tabIndex=-1,a[Br]=``);for(let t in e)i&&e&&(t===`active`||t===`selected`)||(a[t]=e[t]);for(let o=0;o<t.length;o+=1){let s,c=t[o]?.[n];s=typeof c==`function`?e?c(e):null:c,s&&sf(a,s,i,r)}return sf(a,e,i,r),a}function sf(e,t,n,r){for(let i in t){let a=t[i];n&&(i===`active`||i===`selected`)||(i.startsWith(`on`)?(r.has(i)||r.set(i,[]),typeof a==`function`&&(r.get(i)?.push(a),e[i]=(...e)=>r.get(i)?.map(t=>t(...e)).find(e=>e!==void 0))):e[i]=a)}}var cf=m((()=>{Kr()}));function lf(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function uf(e,t){return lf(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function df(e,t,n){return lf(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function ff(e,t,n){return lf(t,n?e===Hr:e===Ur,e===Gr)}function pf(e,t,n,r){return t===`both`||t===`horizontal`&&r&&r>1?e===hf:lf(t,n?e===Ur:e===Hr,e===Wr)}function mf(e,n){let r=`rootStore`in e?e.rootStore:e,i=r.useState(`open`),a=r.useState(`floatingElement`),o=r.useState(`domReferenceElement`),s=r.context.dataRef,{listRef:c,activeIndex:l,onNavigate:u=()=>{},enabled:d=!0,selectedIndex:f=null,allowEscape:p=!1,loopFocus:m=!1,nested:h=!1,rtl:g=!1,virtual:_=!1,focusItemOnOpen:v=`auto`,focusItemOnHover:y=!0,openOnArrowKeyDown:b=!0,disabledIndices:x=void 0,orientation:S=`vertical`,parentOrientation:C,cols:w=1,id:T,resetOnPointerLeave:E=!0,externalTree:D}=n;process.env.NODE_ENV!==`production`&&(p&&(m||console.warn("`useListNavigation` looping must be enabled to allow escaping."),_||console.warn("`useListNavigation` must be virtual to allow escaping.")),S===`vertical`&&w>1&&console.warn("In grid list navigation mode (`cols` > 1), the `orientation` should",`be either "horizontal" or "both".`));let O=mc(ri(a)),k=dl(),j=fl(D);L(()=>{s.current.orientation=S},[s,S]);let M=ti(o),N=t.useRef(v),P=t.useRef(f??-1),F=t.useRef(null),I=t.useRef(!0),R=A(e=>{u(P.current===-1?null:P.current,e)}),ee=t.useRef(R),z=t.useRef(!!a),B=t.useRef(i),V=t.useRef(!1),te=t.useRef(!1),ne=t.useRef(null),H=mc(x),re=mc(i),ie=mc(f),U=mc(E),ae=A(()=>{function e(e){_?j?.events.emit(`virtualfocus`,e):ne.current=wc(e,{sync:V.current,preventScroll:!0})}let t=c.current[P.current],n=te.current;t&&e(t),(V.current?e=>e():requestAnimationFrame)(()=>{let r=c.current[P.current]||t;r&&(t||e(r),ce&&(n||!I.current)&&r.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});L(()=>{d&&(i&&a?(P.current=f??-1,N.current&&f!=null&&(te.current=!0,R())):z.current&&(P.current=-1,ee.current()))},[d,i,a,f,R]),L(()=>{if(d){if(!i){V.current=!1;return}if(a)if(l==null){if(V.current=!1,ie.current!=null)return;if(z.current&&(P.current=-1,ae()),(!B.current||!z.current)&&N.current&&(F.current!=null||N.current===!0&&F.current==null)){let e=0,t=()=>{c.current[0]==null?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e+=1):(P.current=F.current==null||df(F.current,S,g)||h?Wi(c):Gi(c),F.current=null,R())};t()}}else Ui(c.current,l)||(P.current=l,ae(),te.current=!1)}},[d,i,a,l,ie,h,c,S,g,R,ae,H]),L(()=>{if(!d||a||!j||_||!z.current)return;let e=j.nodesRef.current,t=e.find(e=>e.id===k)?.context?.elements.floating,n=qr(ta(a)),r=e.some(e=>e.context&&Jr(e.context.elements.floating,n));t&&!r&&I.current&&t.focus({preventScroll:!0})},[d,a,j,k,_]),L(()=>{ee.current=R,B.current=i,z.current=!!a}),L(()=>{i||(F.current=null,N.current=v)},[i,v]);let oe=l!=null,se=A(e=>{if(!re.current)return;let t=c.current.indexOf(e.currentTarget);t!==-1&&(P.current!==t||l!==t)&&(P.current=t,R(e))}),ce=t.useMemo(()=>({onFocus(e){V.current=!0,se(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){V.current=!0,te.current=!1,y&&se(e)},onPointerLeave(e){if(!re.current||!I.current||e.pointerType===`touch`)return;V.current=!0;let t=e.relatedTarget;if(!(!y||c.current.includes(t))&&U.current&&(ne.current?.(),ne.current=null,P.current=-1,R(e),!_)){let e=O.current,t=qr(ta(e));e&&Jr(e,t)&&e.focus({preventScroll:!0})}}}),[se,re,O,y,c,R,U,_]),le=t.useCallback(()=>C??j?.nodesRef.current.find(e=>e.id===k)?.context?.dataRef?.current.orientation,[k,j,C]),W=A(e=>{if(I.current=!1,V.current=!0,e.which===229||!re.current&&e.currentTarget===O.current)return;if(h&&pf(e.key,S,g,w)){uf(e.key,le())||ci(e),r.setOpen(!1,J(Ot,e.nativeEvent)),er(o)&&(_?j?.events.emit(`virtualfocus`,o):o.focus());return}let t=P.current,n=Wi(c,x),a=Gi(c,x);if(M||(e.key===`Home`&&(ci(e),P.current=n,R(e)),e.key===`End`&&(ci(e),P.current=a,R(e))),w>1){let t=Array.from({length:c.current.length},()=>({width:1,height:1})),r=Ji(t,w,!1),i=r.findIndex(e=>e!=null&&!Zi(c.current,e,x)),o=r.reduce((e,t,n)=>t!=null&&!Zi(c.current,t,x)?n:e,-1),s=r[qi(r.map(e=>e==null?null:c.current[e]),{event:e,orientation:S,loopFocus:m,rtl:g,cols:w,disabledIndices:Xi([...(typeof x==`function`?null:x)||c.current.map((e,t)=>Zi(c.current,t,x)?t:void 0),void 0],r),minIndex:i,maxIndex:o,prevIndex:Yi(P.current>a?n:P.current,t,r,w,e.key===`ArrowDown`?`bl`:e.key===(g?`ArrowLeft`:`ArrowRight`)?`tr`:`tl`),stopEvent:!0})];if(s!=null&&(P.current=s,R(e)),S===`both`)return}if(uf(e.key,S)){if(ci(e),i&&!_&&qr(e.currentTarget.ownerDocument)===e.currentTarget){P.current=df(e.key,S,g)?n:a,R(e);return}df(e.key,S,g)?m?t>=a?p&&t!==c.current.length?P.current=-1:(V.current=!1,P.current=n):P.current=Ki(c.current,{startingIndex:t,disabledIndices:x}):P.current=Math.min(a,Ki(c.current,{startingIndex:t,disabledIndices:x})):m?t<=n?p&&t!==-1?P.current=c.current.length:(V.current=!1,P.current=a):P.current=Ki(c.current,{startingIndex:t,decrement:!0,disabledIndices:x}):P.current=Math.max(n,Ki(c.current,{startingIndex:t,decrement:!0,disabledIndices:x})),Ui(c.current,P.current)&&(P.current=-1),R(e)}}),G=t.useMemo(()=>_&&i&&oe&&{"aria-activedescendant":`${T}-${l}`},[_,i,oe,T,l]),ue=t.useMemo(()=>({"aria-orientation":S===`both`?void 0:S,...M?{}:G,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&i&&!_){let t=Yr(e.nativeEvent);if(t&&!Jr(O.current,t))return;ci(e),r.setOpen(!1,J(Tt,e.nativeEvent)),er(o)&&o.focus();return}W(e)},onPointerMove(){I.current=!0}}),[G,W,O,S,M,r,i,_,o]),de=t.useMemo(()=>{function e(e){v===`auto`&&li(e.nativeEvent)&&(N.current=!_)}function t(e){N.current=v,v===`auto`&&ui(e.nativeEvent)&&(N.current=!0)}return{onKeyDown(e){let t=r.select(`open`);I.current=!1;let n=e.key.startsWith(`Arrow`),i=ff(e.key,le(),g),a=uf(e.key,S),o=(h?i:a)||e.key===`Enter`||e.key.trim()===``;if(_&&t)return W(e);if(!(!t&&!b&&n)){if(o){let t=uf(e.key,le());F.current=h&&t?null:e.key}if(h){i&&(ci(e),t?(P.current=Wi(c,H.current),R(e)):r.setOpen(!0,J(Ot,e.nativeEvent,e.currentTarget)));return}a&&(ie.current!=null&&(P.current=ie.current),ci(e),!t&&b?r.setOpen(!0,J(Ot,e.nativeEvent,e.currentTarget)):W(e),t&&R(e))}},onFocus(e){r.select(`open`)&&!_&&(P.current=-1,R(e))},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[W,H,v,c,h,R,r,b,S,le,g,ie,_]),fe=t.useMemo(()=>({...G,...de}),[G,de]);return t.useMemo(()=>d?{reference:fe,floating:ue,item:ce,trigger:de}:{},[d,fe,ue,de,ce])}var hf,gf=m((()=>{yr(),hc(),F(),R(),na(),ii(),pi(),ea(),pl(),Vt(),zt(),Ec(),Kr(),hf=`Escape`}));function _f(e,n={}){let r=`rootStore`in e?e.rootStore:e,i=r.useState(`open`),a=r.useState(`floatingId`),o=r.useState(`domReferenceElement`),s=r.useState(`floatingElement`),{role:c=`dialog`}=n,l=Jt(),u=o?.id||l,d=t.useMemo(()=>ri(s)?.id||a,[s,a]),f=vf.get(c)??c,p=dl()!=null,m=t.useMemo(()=>f===`tooltip`||c===`label`?ke:{"aria-haspopup":f===`alertdialog`?`dialog`:f,"aria-expanded":`false`,...f===`listbox`&&{role:`combobox`},...f===`menu`&&p&&{role:`menuitem`},...c===`select`&&{"aria-autocomplete":`none`},...c===`combobox`&&{"aria-autocomplete":`list`}},[f,p,c]),h=t.useMemo(()=>f===`tooltip`||c===`label`?{[`aria-${c===`label`?`labelledby`:`describedby`}`]:i?d:void 0}:{...m,"aria-expanded":i?`true`:`false`,"aria-controls":i?d:void 0,...f===`menu`&&{id:u}},[f,d,i,u,c,m]),g=t.useMemo(()=>{let e={id:d,...f&&{role:f}};return f===`tooltip`||c===`label`?e:{...e,...f===`menu`&&{"aria-labelledby":u}}},[f,d,u,c]),_=t.useCallback(({active:e,selected:t})=>{let n={role:`option`,...e&&{id:`${d}-fui-option`}};switch(c){case`select`:case`combobox`:return{...n,"aria-selected":t};default:}return{}},[d,c]);return t.useMemo(()=>({reference:h,floating:g,item:_,trigger:m}),[h,g,m,_])}var vf,yf=m((()=>{Zt(),Ae(),ii(),pl(),vf=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]])}));function bf(e,n){let r=`rootStore`in e?e.rootStore:e,i=r.context.dataRef,a=r.useState(`open`),{listRef:o,elementsRef:s,activeIndex:c,onMatch:l,onTypingChange:u,enabled:d=!0,resetMs:f=750,selectedIndex:p=null}=n,m=Xs(),h=t.useRef(``),g=t.useRef(p??c??-1),_=t.useRef(null);L(()=>{!a&&p!==null||(m.clear(),_.current=null,h.current!==``&&(h.current=``))},[a,p,m]),L(()=>{a&&h.current===``&&(g.current=p??c??-1)},[a,p,c]);let v=A(e=>{e?i.current.typing||(i.current.typing=e,u?.(e)):i.current.typing&&(i.current.typing=e,u?.(e))}),y=A(e=>{function t(e){let t=s?.current[e];return!t||$i(t)}function n(e,n,r=0){if(e.length===0)return-1;let i=(r%e.length+e.length)%e.length,a=n.toLocaleLowerCase();for(let n=0;n<e.length;n+=1){let r=(i+n)%e.length;if(!(!e[r]?.toLocaleLowerCase().startsWith(a)||!t(r)))return r}return-1}let r=o.current;if(h.current.length>0&&e.key===` `&&(ci(e),v(!0)),h.current.length>0&&h.current[0]!==` `&&n(r,h.current)===-1&&e.key!==` `&&v(!1),r==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;a&&e.key!==` `&&(ci(e),v(!0));let i=h.current===``;i&&(g.current=p??c??-1),r.every(e=>e?e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase():!0)&&h.current===e.key&&(h.current=``,g.current=_.current),h.current+=e.key,m.start(f,()=>{h.current=``,g.current=_.current,v(!1)});let u=((i?p??c??-1:g.current)??0)+1,d=n(r,h.current,u);d===-1?e.key!==` `&&(h.current=``,v(!1)):(l?.(d),_.current=d)}),b=A(e=>{let t=e.relatedTarget,n=r.select(`domReferenceElement`),i=r.select(`floatingElement`),a=Jr(n,t),o=Jr(i,t);a||o||(m.clear(),h.current=``,g.current=_.current,v(!1))}),x=t.useMemo(()=>({onKeyDown:y,onBlur:b}),[y,b]),S=t.useMemo(()=>({onKeyDown:y,onBlur:b}),[y,b]);return t.useMemo(()=>d?{reference:x,floating:S}:{},[d,x,S])}var mte=m((()=>{F(),R(),$s(),ii(),pi(),ea()}));function xf(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function Sf(e,t,n,r,i,a,o,s,c,l){let u=!1;return xf(e,t,n,r,i,a)&&(u=!u),xf(e,t,i,a,o,s)&&(u=!u),xf(e,t,o,s,c,l)&&(u=!u),xf(e,t,c,l,n,r)&&(u=!u),u}function hte(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Cf(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function wf(e={}){let{blockPointerEvents:t=!1}=e,n=new Qs,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*Ef;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=Yr(r),g=r.type===`mouseleave`,_=Jr(u,h),v=Jr(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&$n(r.relatedTarget)&&Jr(u,r.relatedTarget))return;function y(){return!!(s&&ai(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=Cf(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=Cf(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=Cf(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=Cf(d,f,x.right-1,A,S.left+1,k);break;default:}if(j)return;if(l&&!hte(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?Df/2:Df*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+Df+1,o=C||T?S.bottom-Df:S.top,s=C?T?S.bottom-Df:S.top:S.bottom-Df;M=Sf(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?Df/2:Df*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-Df,o=C||T?S.top+Df:S.bottom,s=C?T?S.top+Df:S.bottom:S.top+Df;M=Sf(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?Df/2:Df*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+Df+1,o=w||E?S.right-Df:S.left,s=w?E?S.right-Df:S.left:S.right-Df;M=Sf(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?Df/2:Df*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-Df,o=w||E?S.left+Df:S.right,s=w?E?S.left+Df:S.right:S.left+Df;M=Sf(d,f,a,r,a,i,o,S.top,s,S.bottom);break}default:}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}var Tf,Ef,Df,gte=m((()=>{yr(),$s(),ii(),si(),Tf=.1,Ef=Tf*Tf,Df=.5})),Of=m((()=>{Wee(),Yee(),tl(),pl(),al(),Xee(),$ee(),wl(),Vd(),zd(),Ud(),Kd(),ef(),rf(),yr(),qa(),pc(),$s(),hc(),F(),R(),na(),Sa(),Vt(),zt(),uc(),cf(),gf(),yf(),mte(),gte(),Pu()}));function _te(e){let n=t.useRef(``),r=t.useCallback(t=>{t.defaultPrevented||(n.current=t.pointerType,e(t,t.pointerType))},[e]);return{onClick:t.useCallback(t=>{if(t.detail===0){e(t,`keyboard`);return}`pointerType`in t?e(t,t.pointerType):e(t,n.current),n.current=``},[e]),onPointerDown:r}}var vte=m((()=>{}));function kf(e,n){let r=t.useRef(e),i=A(n);L(()=>{r.current!==e&&i(r.current)},[e,i]),L(()=>{r.current=e},[e])}var Af=m((()=>{R(),F()}));function jf(e){let[n,r]=t.useState(null),i=A((t,n)=>{e||r(n||(Nr?`touch`:``))});kf(e,t=>{t&&!e&&r(null)});let{onClick:a,onPointerDown:o}=_te(i);return t.useMemo(()=>({openMethod:n,triggerProps:{onClick:a,onPointerDown:o}}),[n,a,o])}var Mf=m((()=>{F(),vte(),zr(),Af()}));function Nf(e){let{store:n,parentContext:r,actionsRef:i,isDrawer:a}=e,o=n.useState(`open`),s=n.useState(`disablePointerDismissal`),c=n.useState(`modal`),l=n.useState(`popupElement`),{openMethod:u,triggerProps:d}=jf(o);Ed(n);let{forceUnmount:f}=Dd(o,n),p=t.useCallback(()=>{n.setOpen(!1,J(Ft))},[n]);t.useImperativeHandle(i,()=>({unmount:f,close:p}),[f,p]);let m=Hd({popupStore:n,onOpenChange:n.setOpen,treatPopupAsFloatingElement:!0}),[h,g]=t.useState(0),[_,v]=t.useState(0),y=h===0,b=_f(m),x=Sl(m,{outsidePressEvent(){return n.context.internalBackdropRef.current||n.context.backdropRef.current?`intentional`:{mouse:c===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(e){if(!n.context.outsidePressEnabledRef.current||`button`in e&&e.button!==0||`touches`in e&&e.touches.length!==1)return!1;let t=Yr(e);if(y&&!s){let e=t;return c&&(n.context.internalBackdropRef.current||n.context.backdropRef.current)?n.context.internalBackdropRef.current===e||n.context.backdropRef.current===e||Jr(e,l)&&!e?.hasAttribute(`data-base-ui-portal`):!0}return!1},escapeKey:y});ec(o&&c===!0,l);let{getReferenceProps:S,getFloatingProps:C,getTriggerProps:w}=af([b,x]);n.useContextCallback(`onNestedDialogOpen`,(e,t)=>{g(e),v(t)}),n.useContextCallback(`onNestedDialogClose`,()=>{g(0),v(0)}),t.useEffect(()=>(r?.onNestedDialogOpen&&o&&r.onNestedDialogOpen(h+1,_+ +!!a),r?.onNestedDialogClose&&!o&&r.onNestedDialogClose(),()=>{r?.onNestedDialogClose&&o&&r.onNestedDialogClose()}),[a,o,h,_,r]);let T=t.useMemo(()=>S(d),[S,d]),E=t.useMemo(()=>w(d),[w,d]),D=t.useMemo(()=>C(),[C]);n.useSyncedValues({openMethod:u,activeTriggerProps:T,inactiveTriggerProps:E,popupProps:D,floatingRootContext:m,nestedOpenDialogCount:h,nestedOpenDrawerCount:_})}var Pf=m((()=>{oc(),Of(),Sa(),Mf(),Vt(),zt(),Ld()}));function Ff(e){let n=t.useContext(If);if(e===!1&&n===void 0)throw Error(process.env.NODE_ENV===`production`?W(27):`Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.`);return n}var If,Lf=m((()=>{G(),If=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(If.displayName=`DialogRootContext`)}));function yte(e={}){return{...Nd(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}var Rf,zf,Bf=m((()=>{bd(),k(),Ld(),Rf={...Fd,modal:Z(e=>e.modal),nested:Z(e=>e.nested),nestedOpenDialogCount:Z(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:Z(e=>e.nestedOpenDrawerCount),disablePointerDismissal:Z(e=>e.disablePointerDismissal),openMethod:Z(e=>e.openMethod),descriptionElementId:Z(e=>e.descriptionElementId),titleElementId:Z(e=>e.titleElementId),viewportElement:Z(e=>e.viewportElement),role:Z(e=>e.role)},zf=class e extends hd{constructor(e){super(yte(e),{popupRef:t.createRef(),backdropRef:t.createRef(),internalBackdropRef:t.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new kd,onOpenChange:void 0,onOpenChangeComplete:void 0},Rf)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let n={open:e},r=t.trigger?.id??null;(r||e)&&(n.activeTriggerId=r,n.activeTriggerElement=t.trigger??null),this.update(n)};static useStore(t,n){let r=D(()=>new e(n)).current;return t??r}}}));function Vf(e){let{children:r,open:i,defaultOpen:a=!1,onOpenChange:o,onOpenChangeComplete:s,disablePointerDismissal:c=!1,modal:l=!0,actionsRef:u,handle:d,triggerId:f,defaultTriggerId:p=null}=e,m=Ff(!0),h=t.useContext(Hf),g=!!m,_=zf.useStore(d?.store,{open:a,openProp:i,activeTriggerId:p,triggerIdProp:f,modal:l,disablePointerDismissal:c,nested:g});Js(()=>{i===void 0&&_.state.open===!1&&a===!0&&_.update({open:!0,activeTriggerId:p})}),_.useControlledProp(`openProp`,i),_.useControlledProp(`triggerIdProp`,f),_.useSyncedValues({disablePointerDismissal:c,nested:g,modal:l}),_.useContextCallback(`onOpenChange`,o),_.useContextCallback(`onOpenChangeComplete`,s);let v=_.useState(`payload`);Nf({store:_,actionsRef:u,parentContext:m?.store.context,isDrawer:h,onOpenChange:o,triggerIdProp:f});let y=t.useMemo(()=>({store:_}),[_]);return(0,n.jsx)(Hf.Provider,{value:!1,children:(0,n.jsx)(If.Provider,{value:y,children:typeof r==`function`?r({payload:v}):r})})}var Hf,Uf=m((()=>{Ys(),Pf(),Lf(),Bf(),Hf=t.createContext(!1),process.env.NODE_ENV!==`production`&&(Hf.displayName=`IsDrawerContext`)}));function bte(e){let{children:r,open:i,defaultOpen:a=!1,onOpenChange:o,onOpenChangeComplete:s,actionsRef:c,handle:l,triggerId:u,defaultTriggerId:d=null}=e,f=Ff(!0),p=!!f,m=zf.useStore(l?.store,{open:a,openProp:i,activeTriggerId:d,triggerIdProp:u,modal:!0,disablePointerDismissal:!0,nested:p,role:`alertdialog`});m.useControlledProp(`openProp`,i),m.useControlledProp(`triggerIdProp`,u),m.useSyncedValue(`nested`,p),m.useContextCallback(`onOpenChange`,o),m.useContextCallback(`onOpenChangeComplete`,s);let h=m.useState(`payload`);Nf({store:m,actionsRef:c,parentContext:f?.store.context,isDrawer:!1,onOpenChange:o,triggerIdProp:u});let g=t.useMemo(()=>({store:m}),[m]);return(0,n.jsx)(Hf.Provider,{value:!1,children:(0,n.jsx)(If.Provider,{value:g,children:typeof r==`function`?r({payload:h}):r})})}var xte=m((()=>{Uf(),Pf(),Lf(),Bf()})),Wf,Gf,Kf,qf,Jf,Yf,Xf,Zf,Qf,$f,ep=m((()=>{_n(),Wf=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=pn.startingStyle]=`startingStyle`,e[e.endingStyle=pn.endingStyle]=`endingStyle`,e.anchorHidden=`data-anchor-hidden`,e.side=`data-side`,e.align=`data-align`,e}({}),Gf=function(e){return e.popupOpen=`data-popup-open`,e.pressed=`data-pressed`,e}({}),Kf={[Gf.popupOpen]:``},qf={[Gf.popupOpen]:``,[Gf.pressed]:``},Jf={[Wf.open]:``},Yf={[Wf.closed]:``},Xf={[Wf.anchorHidden]:``},Zf={open(e){return e?Kf:null}},Qf={open(e){return e?qf:null}},$f={open(e){return e?Jf:Yf},anchorHidden(e){return e?Xf:null}}})),tp,np,rp=m((()=>{Lf(),q(),ep(),_n(),tp={...$f,...gn},np=t.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,{store:s}=Ff(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return K(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:tp,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),process.env.NODE_ENV!==`production`&&(np.displayName=`DialogBackdrop`)})),ip,ap=m((()=>{Lf(),q(),Dr(),Vt(),zt(),ip=t.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,style:o,...s}=e,{store:c}=Ff(),l=c.useState(`open`);function u(e){l&&c.setOpen(!1,J(mt,e.nativeEvent))}let{getButtonProps:d,buttonRef:f}=wr({disabled:i,native:a});return K(`button`,e,{state:{disabled:i},ref:[t,f],props:[{onClick:u},s,d]})}),process.env.NODE_ENV!==`production`&&(ip.displayName=`DialogClose`)})),op,sp=m((()=>{Lf(),q(),$t(),op=t.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{store:s}=Ff(),c=Qt(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),K(`p`,e,{ref:t,props:[{id:c},o]})}),process.env.NODE_ENV!==`production`&&(op.displayName=`DialogDescription`)})),cp,Ste=m((()=>{cp=function(e){return e.nestedDialogs=`--nested-dialogs`,e}({})})),lp,Cte=m((()=>{ep(),lp=function(e){return e[e.open=Wf.open]=`open`,e[e.closed=Wf.closed]=`closed`,e[e.startingStyle=Wf.startingStyle]=`startingStyle`,e[e.endingStyle=Wf.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e}({})}));function up(){let e=t.useContext(dp);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(26):`Base UI: <Dialog.Portal> is missing.`);return e}var dp,fp=m((()=>{G(),dp=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(dp.displayName=`DialogPortalContext`)})),pp,mp,hp=m((()=>{Of(),Lf(),q(),ep(),_n(),Ste(),Cte(),fp(),$a(),Ga(),pp={...$f,...gn,nestedDialogOpen(e){return e?{[lp.nestedDialogOpen]:``}:null}},mp=t.forwardRef(function(e,t){let{className:r,finalFocus:i,initialFocus:a,render:o,style:s,...c}=e,{store:l}=Ff(),u=l.useState(`descriptionElementId`),d=l.useState(`disablePointerDismissal`),f=l.useState(`floatingRootContext`),p=l.useState(`popupProps`),m=l.useState(`modal`),h=l.useState(`mounted`),g=l.useState(`nested`),_=l.useState(`nestedOpenDialogCount`),v=l.useState(`open`),y=l.useState(`openMethod`),b=l.useState(`titleElementId`),x=l.useState(`transitionStatus`),S=l.useState(`role`);up(),Qa({open:v,ref:l.context.popupRef,onComplete(){v&&l.context.onOpenChangeComplete?.(!0)}});function C(e){return e===`touch`?l.context.popupRef.current:!0}let w=a===void 0?C:a,T=K(`div`,e,{state:{open:v,nested:g,transitionStatus:x,nestedDialogOpen:_>0},props:[p,{"aria-labelledby":b??void 0,"aria-describedby":u??void 0,role:S,tabIndex:-1,hidden:!h,onKeyDown(e){Ba.has(e.key)&&e.stopPropagation()},style:{[cp.nestedDialogs]:_}},c],ref:[t,l.context.popupRef,l.useStateSetter(`popupElement`)],stateAttributesMapping:pp});return(0,n.jsx)(_l,{context:f,openInteractionType:y,disabled:!h,closeOnFocusOut:!d,initialFocus:w,returnFocus:i,modal:m!==!1,restoreFocus:`popup`,children:T})}),process.env.NODE_ENV!==`production`&&(mp.displayName=`DialogPopup`)}));function gp(e){return be(19)?e:e?`true`:void 0}var _p=m((()=>{Se()})),vp,yp=m((()=>{vp=t.forwardRef(function(e,t){let{cutout:r,...i}=e,a;if(r){let e=r.getBoundingClientRect();a=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,n.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...i,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:a}})}),process.env.NODE_ENV!==`production`&&(vp.displayName=`InternalBackdrop`)})),bp,xp=m((()=>{_p(),Of(),Lf(),fp(),yp(),bp=t.forwardRef(function(e,t){let{keepMounted:r=!1,...i}=e,{store:a}=Ff(),o=a.useState(`mounted`),s=a.useState(`modal`),c=a.useState(`open`);return o||r?(0,n.jsx)(dp.Provider,{value:r,children:(0,n.jsxs)(el,{ref:t,...i,children:[o&&s===!0&&(0,n.jsx)(vp,{ref:a.context.internalBackdropRef,inert:gp(!c)}),e.children]})}):null}),process.env.NODE_ENV!==`production`&&(bp.displayName=`DialogPortal`)})),Sp,Cp=m((()=>{Lf(),q(),$t(),Sp=t.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{store:s}=Ff(),c=Qt(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),K(`h2`,e,{ref:t,props:[{id:c},o]})}),process.env.NODE_ENV!==`production`&&(Sp.displayName=`DialogTitle`)})),wp,Tp=m((()=>{G(),Lf(),Er(),q(),ep(),Yc(),Ld(),$t(),Of(),wp=t.forwardRef(function(e,n){let{render:r,className:i,disabled:a=!1,nativeButton:o=!0,id:s,payload:c,handle:l,style:u,...d}=e,f=Ff(!0),p=l?.store??f?.store;if(!p)throw Error(process.env.NODE_ENV===`production`?W(79):`Base UI: <Dialog.Trigger> must be used within <Dialog.Root> or provided with a handle.`);let m=Qt(s),h=p.useState(`floatingRootContext`),g=p.useState(`isOpenedByTrigger`,m),_=t.useRef(null),{registerTrigger:v,isMountedByThisTrigger:y}=Td(m,_,p,{payload:c}),{getButtonProps:b,buttonRef:x}=wr({disabled:a,native:o}),S=af([bl(h,{enabled:h!=null})]),C={disabled:a,open:g},w=p.useState(`triggerProps`,y);return K(`button`,e,{state:C,ref:[x,n,v,_],props:[S.getReferenceProps(),w,{[Vc]:``,id:m},d,b],stateAttributesMapping:Zf})}),process.env.NODE_ENV!==`production`&&(wp.displayName=`DialogTrigger`)})),Ep,wte=m((()=>{ep(),Ep=function(e){return e[e.open=Wf.open]=`open`,e[e.closed=Wf.closed]=`closed`,e[e.startingStyle=Wf.startingStyle]=`startingStyle`,e[e.endingStyle=Wf.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e}({})})),Dp,Op,kp=m((()=>{q(),ep(),_n(),Lf(),fp(),wte(),Dp={...$f,...gn,nested(e){return e?{[Ep.nested]:``}:null},nestedDialogOpen(e){return e?{[Ep.nestedDialogOpen]:``}:null}},Op=t.forwardRef(function(e,t){let{className:n,render:r,children:i,style:a,...o}=e,s=up(),{store:c}=Ff(),l=c.useState(`open`),u=c.useState(`nested`),d=c.useState(`transitionStatus`),f=c.useState(`nestedOpenDialogCount`),p=c.useState(`mounted`);return K(`div`,e,{enabled:s||p,state:{open:l,nested:u,transitionStatus:d,nestedDialogOpen:f>0},ref:[t,c.useStateSetter(`viewportElement`)],stateAttributesMapping:Dp,props:[{role:`presentation`,hidden:!p,style:{pointerEvents:l?void 0:`none`},children:i},o]})}),process.env.NODE_ENV!==`production`&&(Op.displayName=`DialogViewport`)})),Tte=m((()=>{xte(),rp(),ap(),sp(),hp(),xp(),Cp(),Tp(),kp(),Bf(),Vt(),zt()})),Ete=m((()=>{Tte()}));function Ap(){let e=t.useContext(Pp);if(!e)throw Error(process.env.NODE_ENV===`production`?W(22):`Base UI: ComboboxRootContext is missing. Combobox parts must be placed within <Combobox.Root>.`);return e}function jp(){let e=t.useContext(Fp);if(!e)throw Error(process.env.NODE_ENV===`production`?W(23):`Base UI: ComboboxFloatingContext is missing. Combobox parts must be placed within <Combobox.Root>.`);return e}function Mp(){let e=t.useContext(Ip);if(!e)throw Error(process.env.NODE_ENV===`production`?W(24):`Base UI: ComboboxItemsContext is missing. Combobox parts must be placed within <Combobox.Root>.`);return e}function Np(){return t.useContext(Lp)}var Pp,Fp,Ip,Lp,Rp=m((()=>{G(),Pp=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Pp.displayName=`ComboboxRootContext`),Fp=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Fp.displayName=`ComboboxFloatingContext`),Ip=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Ip.displayName=`ComboboxDerivedItemsContext`),Lp=t.createContext(``),process.env.NODE_ENV!==`production`&&(Lp.displayName=`ComboboxInputValueContext`)}));function zp(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function Bp(e,t,n){return!e||e.length===0?!1:e.some(e=>e===void 0?!1:zp(t,e,n))}function Vp(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e===void 0?!1:zp(e,t,n))}function Hp(e,t,n){return e.filter(e=>!zp(t,e,n))}var Up,Wp=m((()=>{Up=(e,t)=>Object.is(e,t)}));function Gp(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}var Kp=m((()=>{}));function qp(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function Jp(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(qp(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function Yp(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return Gp(e)}function Xp(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?Gp(e.value):Gp(e)}function Zp(e,t,n){function r(){return Yp(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){let n=t,i=qp(n)?n.flatMap(e=>e.items):n;if(typeof e!=`object`||!e){let t=i.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=i.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function Qp(e,r,i){return e.reduce((e,a,o)=>(o>0&&e.push(`, `),e.push((0,n.jsx)(t.Fragment,{children:Zp(a,r,i)},o)),e),[])}var $p=m((()=>{Kp()})),em,tm=m((()=>{bd(),Wp(),$p(),em={id:Z(e=>e.id),labelId:Z(e=>e.labelId),items:Z(e=>e.items),selectedValue:Z(e=>e.selectedValue),hasSelectionChips:Z(e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0}),hasSelectedValue:Z(e=>{let{selectedValue:t,selectionMode:n}=e;return t==null?!1:n===`multiple`&&Array.isArray(t)?t.length>0:!0}),hasNullItemLabel:Z((e,t)=>t?Jp(e.items):!1),open:Z(e=>e.open),mounted:Z(e=>e.mounted),forceMounted:Z(e=>e.forceMounted),inline:Z(e=>e.inline),activeIndex:Z(e=>e.activeIndex),selectedIndex:Z(e=>e.selectedIndex),isActive:Z((e,t)=>e.activeIndex===t),isSelected:Z((e,t)=>{let n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(e=>zp(t,e,n)):zp(t,r,n)}),transitionStatus:Z(e=>e.transitionStatus),popupProps:Z(e=>e.popupProps),inputProps:Z(e=>e.inputProps),triggerProps:Z(e=>e.triggerProps),getItemProps:Z(e=>e.getItemProps),positionerElement:Z(e=>e.positionerElement),listElement:Z(e=>e.listElement),triggerElement:Z(e=>e.triggerElement),inputElement:Z(e=>e.inputElement),inputGroupElement:Z(e=>e.inputGroupElement),popupSide:Z(e=>e.popupSide),openMethod:Z(e=>e.openMethod),inputInsidePopup:Z(e=>e.inputInsidePopup),selectionMode:Z(e=>e.selectionMode),name:Z(e=>e.name),form:Z(e=>e.form),disabled:Z(e=>e.disabled),readOnly:Z(e=>e.readOnly),required:Z(e=>e.required),grid:Z(e=>e.grid),virtualized:Z(e=>e.virtualized),itemToStringLabel:Z(e=>e.itemToStringLabel),isItemEqualToValue:Z(e=>e.isItemEqualToValue),modal:Z(e=>e.modal),autoHighlight:Z(e=>e.autoHighlight),submitOnItemClick:Z(e=>e.submitOnItemClick)}})),nm=m((()=>{Ae()})),rm,Dte=m((()=>{rm=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}({})})),im,am,om,sm,cm=m((()=>{Dte(),im={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},am={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},om={disabled:!1,...am},sm={valid(e){return e===null?null:e?{[rm.valid]:``}:{[rm.invalid]:``}}}}));function lm(e=!0){let n=t.useContext(um);if(n.setValidityData===De&&!e)throw Error(process.env.NODE_ENV===`production`?W(28):`Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.`);return n}var um,dm=m((()=>{G(),Ae(),nm(),cm(),um=t.createContext({invalid:void 0,name:void 0,validityData:{state:im,errors:[],error:``,value:``,initialValue:null},setValidityData:De,disabled:void 0,touched:am.touched,setTouched:De,dirty:am.dirty,setDirty:De,filled:am.filled,setFilled:De,focused:am.focused,setFocused:De,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:om,markedDirtyRef:{current:!1},registerFieldControl:De,validation:{getValidationProps:(e=ke)=>e,getInputValidationProps:(e=ke)=>e,inputRef:{current:null},commit:async()=>{}}}),process.env.NODE_ENV!==`production`&&(um.displayName=`FieldRootContext`)}));function fm(e,n){let{enabled:r=!0,getValue:i,id:a,value:o}=n,{registerFieldControl:s}=lm(),c=t.useRef(null);c.current||=Symbol(),L(()=>{let t=c.current;if(!(!t||!r))return s(t,{controlRef:e,getValue:i,id:a,value:o}),()=>{s(t,void 0)}},[e,r,i,a,s,o])}var pm=m((()=>{R(),dm()}));function mm(){return t.useContext(hm)}var hm,gm=m((()=>{nm(),hm=t.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:De,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}}),process.env.NODE_ENV!==`production`&&(hm.displayName=`FormContext`)}));function _m(){return t.useContext(vm)}var vm,ym=m((()=>{nm(),vm=t.createContext({controlId:void 0,registerControlId:De,labelId:void 0,setLabelId:De,messageIds:[],setMessageIds:De,getDescriptionProps:e=>e}),process.env.NODE_ENV!==`production`&&(vm.displayName=`LabelableContext`)}));function bm(e={}){let{id:n,implicit:r=!1,controlRef:i}=e,{controlId:a,registerControlId:o}=_m(),s=Qt(n),c=r?a:void 0,l=D(()=>Symbol(`labelable-control`)),u=t.useRef(!1),d=t.useRef(n!=null),f=A(()=>{!u.current||o===De||(u.current=!1,o(l.current,void 0))});return L(()=>{if(o===De)return;let e;if(r){let t=i?.current;e=$n(t)&&t.closest(`label`)!=null?n??null:c??s}else if(n!=null)d.current=!0,e=n;else if(d.current)e=s;else{f();return}if(e===void 0){f();return}u.current=!0,o(l.current,e)},[n,i,c,o,r,s,l,f]),t.useEffect(()=>f,[f]),a??s}var xm=m((()=>{R(),F(),k(),yr(),nm(),$t(),ym()}));function Ote(e,t){return(n,r)=>{if(n==null)return!1;let i=Yp(n,t);return e.contains(i,r)}}function kte(e,t,n){return(r,i)=>{if(r==null)return!1;if(!i)return!0;let a=Yp(r,t),o=n==null?``:Yp(n,t);return o&&e.contains(o,i)&&o.length===i.length?!0:e.contains(a,i)}}var Ate=m((()=>{$p()}));function jte(e={}){let t={usage:`search`,sensitivity:`base`,ignorePunctuation:!0,...e},n=`${Sm(e.locale)}|${JSON.stringify(t)}`,r=Cm.get(n);if(r)return r;let i=new Intl.Collator(e.locale,t),a={contains(e,t,n){if(!t)return!0;let r=Yp(e,n);for(let e=0;e<=r.length-t.length;e+=1)if(i.compare(r.slice(e,e+t.length),t)===0)return!0;return!1},startsWith(e,t,n){if(!t)return!0;let r=Yp(e,n);return i.compare(r.slice(0,t.length),t)===0},endsWith(e,t,n){if(!t)return!0;let r=Yp(e,n),a=t.length;return r.length>=a&&i.compare(r.slice(r.length-a),t)===0}};return Cm.set(n,a),a}function Sm(e){return Array.isArray(e)?e.map(e=>Sm(e)).join(`,`):e==null?``:String(e)}var Cm,Mte=m((()=>{$p(),Cm=new Map})),wm,Tm=m((()=>{Mte(),wm=jte})),Em,Dm,Nte=m((()=>{Em=Symbol(`none`),Dm={value:Em,index:-1}}));function Om(e){let{id:r,onOpenChangeComplete:i,defaultSelectedValue:a=null,selectedValue:o,onSelectedValueChange:s,defaultInputValue:c,inputValue:l,open:u,defaultOpen:d=!1,selectionMode:f=`none`,onItemHighlighted:p,name:m,form:h,disabled:g=!1,readOnly:_=!1,required:v=!1,inputRef:y,grid:b=!1,items:x,filteredItems:S,filter:C,openOnInputClick:T=!0,autoHighlight:E=!1,keepHighlight:O=!1,highlightItemOnHover:k=!0,loopFocus:j=!0,itemToStringLabel:M,itemToStringValue:N,isItemEqualToValue:P=Up,virtualized:F=!1,inline:I=!1,fillInputOnItemPress:R=!0,modal:ee=!1,limit:z=-1,autoComplete:B=`list`,formAutoComplete:V,locale:te,submitOnItemClick:ne=!1}=e,{clearErrors:H}=mm(),{setDirty:re,validityData:ie,shouldValidateOnChange:U,setFilled:ae,name:oe,disabled:se,setTouched:ce,setFocused:le,validationMode:W,validation:G}=lm(),ue=bm({id:r}),de=wm({locale:te}),[fe,me]=t.useState(!1),[he,ge]=t.useState(null),_e=t.useRef([]),ve=t.useRef([]),ye=t.useRef(null),be=t.useRef(null),xe=t.useRef(null),Se=t.useRef(null),Ce=t.useRef(null),we=t.useRef(!0),Te=t.useRef(!1),Ee=t.useRef(null),Ae=t.useRef(null),je=t.useRef(null),Me=t.useRef(Dm),Ne=t.useRef(null),Pe=t.useRef([]),Fe=t.useRef([]),Ie=se||g,Le=oe??m,Re=f===`multiple`,ze=f===`single`,Be=l!==void 0||c!==void 0,Ve=x!==void 0,He=S!==void 0,Ue;Ue=E===`always`?`always`:E?`input-change`:!1;let[We,Ge]=w({controlled:o,default:Re?a??Oe:a,name:`Combobox`,state:`selectedValue`}),Ke=t.useMemo(()=>C===null?()=>!0:C===void 0?ze&&!fe?kte(de,M,We):Ote(de,M):C,[C,ze,We,fe,de,M]),qe=D(()=>Be?c??``:ze?Yp(We,M):``).current,[Je,Ye]=w({controlled:l,default:qe,name:`Combobox`,state:`inputValue`}),[Xe,Ze]=w({controlled:u,default:d,name:`Combobox`,state:`open`}),Qe=qp(x),$e=he??(Je===``?``:String(Je).trim()),K=ze?Yp(We,M):``,et=ze&&!fe&&$e!==``&&K!==``&&K.length===$e.length&&de.contains(K,$e),tt=et?``:$e,nt=Ve&&He&&et,rt=t.useMemo(()=>x?Qe?x.flatMap(e=>e.items):x:Oe,[x,Qe]),it=t.useMemo(()=>{if(S&&!nt)return S;if(!x)return Oe;if(Qe){let e=x,t=[],n=0;for(let r of e){if(z>-1&&n>=z)break;let e=tt===``?r.items:r.items.filter(e=>Ke(e,tt,M));if(e.length===0)continue;let i=z>-1?z-n:1/0,a=e.slice(0,i);if(a.length>0){let e={...r,items:a};t.push(e),n+=a.length}}return t}if(tt===``)return z>-1?rt.slice(0,z):rt;let e=[];for(let t of rt){if(z>-1&&e.length>=z)break;Ke(t,tt,M)&&e.push(t)}return e},[S,nt,x,Qe,tt,z,Ke,M,rt]),at=t.useMemo(()=>Qe?it.flatMap(e=>e.items):it,[it,Qe]),ot=D(()=>new pd({id:ue,labelId:void 0,selectedValue:We,open:Xe,filter:Ke,query:$e,items:x,selectionMode:f,listRef:_e,labelsRef:ve,popupRef:ye,emptyRef:Ce,inputRef:be,startDismissRef:xe,endDismissRef:Se,keyboardActiveRef:we,chipsContainerRef:Ee,clearRef:Ae,valuesRef:Pe,allValuesRef:Fe,selectionEventRef:je,name:Le,form:h,disabled:Ie,readOnly:_,required:v,grid:b,isGrouped:Qe,virtualized:F,openOnInputClick:T,itemToStringLabel:M,isItemEqualToValue:P,modal:ee,autoHighlight:Ue,submitOnItemClick:ne,hasInputValue:Be,mounted:!1,forceMounted:!1,transitionStatus:`idle`,inline:I,activeIndex:null,selectedIndex:null,popupProps:{},inputProps:{},triggerProps:{},positionerElement:null,listElement:null,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,onOpenChangeComplete:i||De,setOpen:De,setInputValue:De,setSelectedValue:De,setIndices:De,onItemHighlighted:De,handleSelection:De,getItemProps:()=>ke,forceMount:De,requestSubmit:De})).current,st=f===`none`?Je:We,q=t.useMemo(()=>f===`none`?st:Array.isArray(We)?We.map(e=>Xp(e,N)):Xp(We,N),[st,N,f,We]),lt=A(p),ut=A(i),dt=Q(ot,em.activeIndex),ft=Q(ot,em.selectedIndex),mt=Q(ot,em.positionerElement),ht=Q(ot,em.listElement),gt=Q(ot,em.triggerElement),_t=Q(ot,em.inputElement),vt=Q(ot,em.inputGroupElement),yt=Q(ot,em.inline),bt=Q(ot,em.inputInsidePopup),St=mc(gt),{mounted:Ct,setMounted:Tt,transitionStatus:Et}=bn(Xe),{openMethod:Dt,triggerProps:Ot}=jf(Xe),kt=A(()=>q);fm(bt?St:be,{id:ue,value:st,getValue:kt});let At=A(()=>{x?ve.current=at.map(e=>Yp(e,M)):ot.set(`forceMounted`,!0)}),jt=t.useRef(We);L(()=>{We!==jt.current&&At()},[At,We]);let Mt=A(e=>{ot.update(e);let t=e.type||`none`;if(e.activeIndex!==void 0)if(e.activeIndex===null)Me.current!==Dm&&(Me.current=Dm,lt(void 0,Bt(t,void 0,{index:-1})));else{let n=Pe.current[e.activeIndex];Me.current={value:n,index:e.activeIndex},lt(n,Bt(t,void 0,{index:e.activeIndex}))}}),Nt=A((t,n)=>{if(Te.current=n.reason===xt,e.onInputValueChange?.(t,n),!n.isCanceled){if(n.reason===`input-change`){let e=n.event,r=e.inputType;if(e.type===`compositionend`||r!=null&&r!==``&&r!==`insertReplacementText`){let e=t.trim()!==``;e&&me(!0),Ne.current={hasQuery:e},e&&Ue&&ot.state.activeIndex==null&&ot.set(`activeIndex`,0)}}Ye(t)}}),Pt=A((t,n)=>{if(Xe!==t&&(n.reason===`escape-key`&&Ve&&at.length===0&&!ot.state.emptyRef.current&&n.allowPropagation(),e.onOpenChange?.(t,n),!n.isCanceled&&(!t&&fe&&(ze?(yt||ge($e),$e===``&&me(!1)):Re&&(yt||bt?Mt({activeIndex:null}):ge($e),Nt(``,J(xt,n.event)))),Ze(t),!t&&bt&&(n.reason===`focus-out`||n.reason===`outside-press`)&&(ce(!0),le(!1),W===`onBlur`)))){let e=f===`none`?Je:We;G.commit(e)}}),Ft=A((e,t)=>{s?.(e,t),!t.isCanceled&&(Ge(e),(f===`none`&&ye.current&&R||ze&&!ot.state.inputInsidePopup)&&Nt(Yp(e,M),J(t.reason,t.event)),ze&&e!=null&&t.reason!==`input-change`&&fe&&!yt&&ge($e))}),It=A((e,t)=>{let n=t;if(n===void 0){if(dt===null)return;n=Pe.current[dt]}let r=Yr(e),i=je.current??e;je.current=null;let a=J(pt,i),o=r?.closest(`a`)?.getAttribute(`href`);if(o){o.startsWith(`#`)&&Pt(!1,a);return}if(Re){let e=Array.isArray(We)?We:[];if(Ft(Bp(e,n,ot.state.isItemEqualToValue)?Hp(e,n,ot.state.isItemEqualToValue):[...e,n],a),!(be.current&&be.current.value.trim()!==``))return;ot.state.inputInsidePopup?Nt(``,J(xt,a.event)):Pt(!1,a)}else Ft(n,a),Pt(!1,a)}),Lt=A(()=>{if(!ot.state.submitOnItemClick)return;let e=G.inputRef.current?.form??ot.state.inputElement?.form;e&&typeof e.requestSubmit==`function`&&e.requestSubmit()}),Rt=A(()=>{if(Tt(!1),ut?.(!1),me(!1),ge(null),Mt(f===`none`?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),Re&&be.current&&be.current.value!==``&&!Te.current&&Nt(``,J(xt)),ze)if(ot.state.inputInsidePopup)be.current&&be.current.value!==``&&Nt(``,J(xt));else{let e=Yp(We,M);be.current&&be.current.value!==e&&Nt(e,J(e===``?xt:ct))}}),zt=t.useMemo(()=>yt&&mt?{current:mt.closest(`[role="dialog"]`)}:ye,[yt,mt]);Qa({enabled:!e.actionsRef,open:Xe,ref:zt,onComplete(){Xe||Rt()}}),t.useImperativeHandle(e.actionsRef,()=>({unmount:Rt}),[Rt]),L(function(){if(Xe||f===`none`)return;let e=x?rt:Fe.current;if(Re){let t=Array.isArray(We)?We:[],n=t[t.length-1],r=Vp(e,n,P);Mt({selectedIndex:r===-1?null:r})}else{let t=Vp(e,We,P);Mt({selectedIndex:t===-1?null:t})}},[Xe,We,x,f,rt,Re,P,Mt]),L(()=>{x&&(Pe.current=at,_e.current.length=at.length)},[x,at]),L(()=>{let e=Ne.current;if(e&&(e.hasQuery?Ue&&ot.set(`activeIndex`,0):Ue===`always`&&ot.set(`activeIndex`,0),Ne.current=null),!Xe&&!yt)return;let t=Ve||He?at:Pe.current,n=ot.state.activeIndex;if(n==null){if(Ue===`always`&&t.length>0){ot.set(`activeIndex`,0);return}Me.current!==Dm&&(Me.current=Dm,ot.state.onItemHighlighted(void 0,Bt(ct,void 0,{index:-1})));return}if(n>=t.length){Me.current!==Dm&&(Me.current=Dm,ot.state.onItemHighlighted(void 0,Bt(ct,void 0,{index:-1}))),ot.set(`activeIndex`,null);return}let r=t[n],i=Me.current.value,a=i!==Em&&zp(r,i,ot.state.isItemEqualToValue);(Me.current.index!==n||!a)&&(Me.current={value:r,index:n},ot.state.onItemHighlighted(r,Bt(ct,void 0,{index:n})))},[dt,Ue,He,Ve,at,yt,Xe,ot]),L(()=>{if(f===`none`){ae(String(Je)!==``);return}ae(Re?Array.isArray(We)&&We.length>0:We!=null)},[ae,f,Je,We,Re]),t.useEffect(()=>{Ve&&Ue&&at.length===0&&Mt({activeIndex:null})},[Ve,Ue,at.length,Mt]),kf($e,()=>{!Xe||$e===``||$e===String(qe)||me(!0)}),kf(We,()=>{if(f!==`none`&&(H(Le),re(We!==ie.initialValue),U()?G.commit(We):G.commit(We,!0),ze&&!Be&&!bt)){let e=Yp(We,M);Je!==e&&Nt(e,J(ct))}}),kf(Je,()=>{f===`none`&&(H(Le),re(Je!==ie.initialValue),U()?G.commit(Je):G.commit(Je,!0))}),kf(x,()=>{if(!ze||Be||bt||fe)return;let e=Yp(We,M);Je!==e&&Nt(e,J(ct))});let Vt=Rd({open:yt?!0:Xe,onOpenChange:Pt,elements:{reference:bt?gt:_t,floating:mt}}),Ht,Ut;yt||(Ht=b?`grid`:`listbox`,Ut=Xe?`true`:`false`);let{getReferenceProps:Wt,getFloatingProps:Gt,getItemProps:Kt}=af([t.useMemo(()=>{let e=_t?.tagName===`INPUT`,t=_t==null||e,n=t||Xe,r=t?{autoComplete:`off`,spellCheck:`false`,autoCorrect:`off`,autoCapitalize:`none`}:{};return n&&(r.role=`combobox`,r[`aria-expanded`]=Ut,r[`aria-haspopup`]=Ht,r[`aria-controls`]=Xe?ht?.id:void 0,r[`aria-autocomplete`]=B),{reference:r,floating:{role:`presentation`}}},[_t,Xe,Ut,Ht,ht?.id,B]),bl(Vt,{enabled:!_&&!Ie&&T,event:`mousedown-only`,toggle:!1,touchOpenDelay:bt?0:100,reason:wt}),Sl(Vt,{enabled:!_&&!Ie&&!yt,outsidePressEvent:{mouse:`sloppy`,touch:`intentional`},bubbles:yt?!0:void 0,outsidePress(e){let t=Yr(e);return!Jr(gt,t)&&!Jr(Ae.current,t)&&!Jr(Ee.current,t)&&!Jr(vt,t)}}),mf(Vt,{enabled:!_&&!Ie,id:ue,listRef:_e,activeIndex:dt,selectedIndex:ft,virtual:!0,loopFocus:j,allowEscape:j&&!Ue,focusItemOnOpen:fe||f===`none`&&!Ue?!1:`auto`,focusItemOnHover:k,resetOnPointerLeave:!O,cols:b?2:1,orientation:b?`horizontal`:void 0,disabledIndices:Oe,onNavigate(e,t){!t&&!Xe||Et===`ending`||Mt(t?{activeIndex:e,type:we.current?`keyboard`:`pointer`}:{activeIndex:e})}})]);Js(()=>{ot.update({inline:I,popupProps:Gt(),inputProps:Wt(),triggerProps:Ot,getItemProps:Kt,setOpen:Pt,setInputValue:Nt,setSelectedValue:Ft,setIndices:Mt,onItemHighlighted:lt,handleSelection:It,forceMount:At,requestSubmit:Lt})}),L(()=>{ot.update({id:ue,selectedValue:We,open:Xe,mounted:Ct,transitionStatus:Et,items:x,inline:I,popupProps:Gt(),inputProps:Wt(),triggerProps:Ot,openMethod:Dt,getItemProps:Kt,selectionMode:f,name:Le,form:h,disabled:Ie,readOnly:_,required:v,grid:b,isGrouped:Qe,virtualized:F,onOpenChangeComplete:ut,openOnInputClick:T,itemToStringLabel:M,modal:ee,autoHighlight:Ue,isItemEqualToValue:P,submitOnItemClick:ne,hasInputValue:Be,requestSubmit:Lt})},[ot,ue,We,Xe,Ct,Et,x,Gt,Wt,Kt,Dt,Ot,f,Le,Ie,_,v,G,b,Qe,F,ut,T,M,ee,P,ne,Be,I,Lt,Ue,h]);let qt=pe(y,G.inputRef),Jt=t.useMemo(()=>({query:$e,hasItems:Ve,filteredItems:it,flatFilteredItems:at}),[$e,Ve,it,at]),Yt=t.useMemo(()=>Array.isArray(st)?``:Xp(st,N),[st,N]),Xt=Re&&Array.isArray(We)&&We.length>0,Zt=Re||f===`none`?void 0:Le,Qt=t.useMemo(()=>!Re||!Array.isArray(We)||!Le?null:We.map(e=>{let t=Xp(e,N);return(0,n.jsx)(`input`,{type:`hidden`,form:h,name:Le,value:t},t)}),[Re,We,h,Le,N]),$t=(0,n.jsxs)(t.Fragment,{children:[e.children,(0,n.jsx)(`input`,{...G.getInputValidationProps({onFocus(){if(bt){gt?.focus();return}(be.current||gt)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.currentTarget.value,n=J(ct,e.nativeEvent);function r(){if(Re)return;if(f===`none`){re(t!==ie.initialValue),Nt(t,n),U()&&G.commit(t);return}let e=Pe.current.find(e=>Xp(e,N).toLowerCase()===t.toLowerCase()||Yp(e,M).toLowerCase()===t.toLowerCase());e!=null&&(re(e!==ie.initialValue),Ft?.(e,n),U()&&G.commit(e))}x?r():(At(),queueMicrotask(r))}}),id:ue&&Zt==null?`${ue}-hidden-input`:void 0,form:h,name:Zt,autoComplete:V,disabled:Ie,required:v&&!Xt,readOnly:_,value:Yt,ref:qt,style:Zt?vc:_c,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Qt]});return(0,n.jsx)(Pp.Provider,{value:ot,children:(0,n.jsx)(Fp.Provider,{value:Vt,children:(0,n.jsx)(Ip.Provider,{value:Jt,children:(0,n.jsx)(Lp.Provider,{value:Je,children:$t})})})})}var km=m((()=>{E(),R(),Ys(),F(),ye(),hc(),yc(),k(),bd(),Ae(),Of(),Sa(),Vt(),zt(),Rp(),tm(),$a(),dm(),pm(),gm(),xm(),Ate(),Tm(),xn(),Mf(),Af(),nm(),$p(),Wp(),Nte()}));function Am(e){let{openOnInputClick:r=!1,value:i,defaultValue:a,onValueChange:o,mode:s=`list`,itemToStringValue:c,...l}=e,u=s===`inline`||s===`both`,d=s===`inline`||s===`none`,f=i!==void 0,[p,m]=t.useState(a??``),[h,g]=t.useState(``);t.useEffect(()=>{f&&g(``)},[i,f]);let _;_=u&&h!==``?h:f?i??``:p;let v=A((e,t)=>{g(``),f||m(e),o?.(e,t)}),y=wm(),b=t.useMemo(()=>l.filter===void 0?y.contains:l.filter,[l.filter,y]),x=String(f?i:p).trim(),S=t.useMemo(()=>s===`both`?b===null?null:(e,t,n)=>b(e,x,n):d?null:b,[b,s,x,d]),C=A((t,n)=>{e.onItemHighlighted?.(t,n),n.reason!==`pointer`&&g(u?t==null?``:Yp(t,c):``)});return(0,n.jsx)(Om,{...l,itemToStringLabel:c,openOnInputClick:r,selectionMode:`none`,fillInputOnItemPress:!0,filter:S,autoComplete:s,inputValue:_,defaultInputValue:a,onInputValueChange:v,onItemHighlighted:C})}var jm=m((()=>{F(),km(),Tm(),$p(),zt()})),Mm,Nm=m((()=>{ep(),cm(),Mm={...Qf,...sm,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":``}:null}}));function Pm(e){let t=e.getBoundingClientRect();if(process.env.NODE_ENV!==`production`)return t;let n=Xn(e),r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(!(r.content!==`none`||i.content!==`none`))return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}var Fm=m((()=>{na()}));function Im(e){return e==null?void 0:`${e}-label`}function Lm(e,t){return e??t}var Rm=m((()=>{})),zm,Bm,Vm=m((()=>{bd(),F(),$s(),na(),q(),Dr(),Rp(),Nm(),tm(),dm(),ym(),Sa(),Fm(),Vt(),zt(),Of(),xm(),Rm(),zm=2,Bm=t.forwardRef(function(e,n){let{render:r,className:i,nativeButton:a=!0,disabled:o=!1,id:s,style:c,...l}=e,{state:u,disabled:d,setTouched:f,setFocused:p,validationMode:m,validation:h}=lm(),{labelId:g}=_m(),_=Ap(),{filteredItems:v}=Mp(),y=Q(_,em.selectionMode),b=Q(_,em.disabled),x=Q(_,em.readOnly),S=Q(_,em.required),C=Q(_,em.mounted),w=Q(_,em.popupSide),T=Q(_,em.positionerElement),E=Q(_,em.listElement),D=Q(_,em.triggerProps),O=Q(_,em.triggerElement),k=Q(_,em.inputInsidePopup),j=Q(_,em.id),M=Q(_,em.labelId),N=Q(_,em.open),P=Q(_,em.selectedValue),F=Q(_,em.activeIndex),I=Q(_,em.selectedIndex),L=Q(_,em.hasSelectedValue),R=jp(),ee=Np(),z=Xs(),B=d||b||o,V=v.length===0,te=C&&T?w:null;bm({id:k?s:void 0});let ne=k?s??j:s,H=Lm(g,M),re=t.useRef(``);function ie(e){re.current=e.pointerType}let U=R.useState(`domReferenceElement`);t.useEffect(()=>{k&&O&&O!==U&&R.set(`domReferenceElement`,O)},[O,U,R,k]);let{reference:ae}=bf(R,{enabled:!N&&!x&&!b&&y===`single`,listRef:_.state.labelsRef,activeIndex:F,selectedIndex:I,onMatch(e){let t=_.state.valuesRef.current[e];t!==void 0&&_.state.setSelectedValue(t,J(`none`))}}),{reference:oe}=bl(R,{enabled:!x&&!b,event:`mousedown`}),{buttonRef:se,getButtonProps:ce}=wr({native:a,disabled:B}),le={...u,open:N,disabled:B,popupSide:te,listEmpty:V,placeholder:y===`none`?!1:!L};return K(`button`,e,{ref:[n,se,A(e=>{_.set(`triggerElement`,e)})],state:le,props:[D,oe,ae,{id:ne,tabIndex:k?0:-1,role:k?`combobox`:void 0,"aria-expanded":N?`true`:`false`,"aria-haspopup":k?`dialog`:`listbox`,"aria-controls":N?E?.id:void 0,"aria-required":k&&S||void 0,"aria-labelledby":H,onPointerDown:ie,onPointerEnter:ie,onFocus(){p(!0),!(B||x)&&z.start(0,_.state.forceMount)},onBlur(e){if(!Jr(T,e.relatedTarget)&&(f(!0),p(!1),m===`onBlur`)){let e=y===`none`?ee:P;h.commit(e)}},onMouseDown(e){if(B||x||(k||R.set(`domReferenceElement`,e.currentTarget),_.state.forceMount(),re.current!==`touch`&&(_.state.inputRef.current?.focus(),k||e.preventDefault()),N))return;let t=ta(e.currentTarget);function n(e){if(!O)return;let t=Yr(e),n=_.state.positionerElement,r=_.state.listElement;if(Jr(O,t)||Jr(n,t)||Jr(r,t)||t===O)return;let i=Pm(O),a=e.clientX>=i.left-zm&&e.clientX<=i.right+zm,o=e.clientY>=i.top-zm&&e.clientY<=i.bottom+zm;a&&o||_.state.setOpen(!1,J(`cancel-open`,e))}k&&t.addEventListener(`mouseup`,n,{once:!0})},onKeyDown(e){B||x||(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(ci(e),_.state.setOpen(!0,J(Ot,e.nativeEvent)),_.state.inputRef.current?.focus())}},h?h.getValidationProps(l):l,ce],stateAttributesMapping:Mm})}),process.env.NODE_ENV!==`production`&&(Bm.displayName=`ComboboxTrigger`)})),Hm,Um=m((()=>{Vm(),Hm=Bm}));function Wm(){return t.useContext(Gm)}var Gm,Km=m((()=>{Gm=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Gm.displayName=`ComboboxChipsContext`)}));function qm(e){let n=t.useContext(Jm);if(n===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?W(21):`Base UI: <Combobox.Popup> and <Combobox.Arrow> must be used within the <Combobox.Positioner> component`);return n}var Jm,Ym=m((()=>{G(),Jm=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Jm.displayName=`ComboboxPositionerContext`)})),Xm,Zm=m((()=>{ye(),F(),yc(),Dr(),Vt(),zt(),Rp(),Xm=t.forwardRef(function(e,t){let r=Ap(),{buttonRef:i,getButtonProps:a}=wr({native:!1});return(0,n.jsx)(`span`,{ref:pe(t,i),...a({onClick:A(e=>{r.state.setOpen(!1,J(mt,e.nativeEvent,e.currentTarget))})}),"aria-label":`Dismiss`,tabIndex:void 0,style:vc})}),process.env.NODE_ENV!==`production`&&(Xm.displayName=`ComboboxInternalDismissButton`)})),Qm,$m=m((()=>{bd(),F(),zr(),$t(),q(),Rp(),Nm(),tm(),dm(),cm(),ym(),Km(),Sa(),Ym(),Vt(),zt(),ce(),Rm(),Zm(),Qm=t.forwardRef(function(e,r){let{render:i,className:a,disabled:o=!1,id:s,style:c,...l}=e,{state:u,disabled:d,setTouched:f,setFocused:p,validationMode:m,validation:h}=lm(),{labelId:g}=_m(),_=Wm(),v=!!qm(!0),y=Ap(),{filteredItems:b}=Mp(),x=Np(),S=oe(),C=Q(y,em.required),w=Q(y,em.disabled),T=Q(y,em.readOnly),E=Q(y,em.name),D=Q(y,em.form),O=Q(y,em.selectionMode),k=Q(y,em.autoHighlight),j=Q(y,em.inputProps),M=Q(y,em.triggerProps),N=Q(y,em.open),P=Q(y,em.mounted),F=Q(y,em.selectedValue),I=Q(y,em.popupSide),L=Q(y,em.positionerElement),R=Q(y,em.id),ee=Q(y,em.inline),z=Q(y,em.modal),B=!!k,V=P&&L?I:null,te=d||w||o,ne=b.length===0,H=v||ee,re=!H||z,ie=Qt(s??(H?void 0:R)),U=Lm(g,void 0),ae=v?am:u,[se,ce]=t.useState(null),le=t.useRef(!1),W=t.useRef(null),G=t.useRef(!1),ue=A(e=>{let t=v||y.state.inline;t&&!y.state.hasInputValue&&y.state.setInputValue(``,J(ct)),y.update({inputElement:e,inputInsidePopup:t})}),de=v||!h?l:h.getValidationProps(l),fe={...ae,open:N,disabled:te,readOnly:T,popupSide:V,listEmpty:ne};function pe(e){if(!_)return;let t,{highlightedChipIndex:n}=_,r=_.chipsRef.current.length;if(n!==void 0){if(e.key===`ArrowLeft`)e.preventDefault(),t=n>0?n-1:void 0;else if(e.key===`ArrowRight`)e.preventDefault(),t=n<r-1?n+1:void 0;else if(e.key===`Backspace`||e.key===`Delete`){e.preventDefault();let r=n>=F.length-1?F.length-2:n;t=r>=0?r:void 0,y.state.setIndices({activeIndex:null,selectedIndex:null,type:`keyboard`})}return t}return e.key===`ArrowLeft`&&(e.currentTarget.selectionStart??0)===0&&F.length>0?(e.preventDefault(),t=r>0?r-1:void 0):e.key===`Backspace`&&e.currentTarget.value===``&&F.length>0&&(y.state.setIndices({activeIndex:null,selectedIndex:null,type:`keyboard`}),e.preventDefault()),t}let me=K(`input`,e,{state:fe,ref:[r,y.state.inputRef,ue],props:[j,M,{type:`text`,value:e.value??se??x,"aria-readonly":T||void 0,"aria-required":C||void 0,"aria-labelledby":U,disabled:te,readOnly:T,required:O===`none`?C:void 0,form:D,...O===`none`&&E&&{name:E},id:ie,onFocus(){if(p(!0),!ee||!G.current)return;G.current=!1;let e=W.current;e==null||!Object.hasOwn(y.state.valuesRef.current,e)||y.state.setIndices({activeIndex:e})},onBlur(){f(!0),p(!1);let e=y.state.activeIndex;if(ee&&e!==null&&k!==`always`&&(W.current=e,G.current=!0,y.state.setIndices({activeIndex:null})),m===`onBlur`){let e=O===`none`?x:F;h.commit(e)}},onCompositionStart(e){Ir||(le.current=!0,ce(e.currentTarget.value))},onCompositionEnd(e){le.current=!1;let t=e.currentTarget.value;ce(null),y.state.setInputValue(t,J(bt,e.nativeEvent))},onChange(e){let t=e.nativeEvent.inputType,n=!t||t===`insertReplacementText`,r=le.current||!n;if(le.current){let t=e.currentTarget.value;ce(t),t===``&&!y.state.openOnInputClick&&!y.state.inputInsidePopup&&y.state.setOpen(!1,J(xt,e.nativeEvent));let n=t.trim(),i=B&&n!==``;!T&&!te&&n&&r&&(y.state.setOpen(!0,J(bt,e.nativeEvent)),B||y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?`keyboard`:`pointer`})),N&&y.state.activeIndex!==null&&!i&&y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?`keyboard`:`pointer`});return}y.state.setInputValue(e.currentTarget.value,J(bt,e.nativeEvent));let i=e.currentTarget.value===``,a=J(xt,e.nativeEvent);i&&!y.state.inputInsidePopup&&(O===`single`&&y.state.setSelectedValue(null,a),y.state.openOnInputClick||y.state.setOpen(!1,a));let o=e.currentTarget.value.trim();!T&&!te&&o&&r&&(y.state.setOpen(!0,J(bt,e.nativeEvent)),B||y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?`keyboard`:`pointer`})),N&&y.state.activeIndex!==null&&!B&&y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?`keyboard`:`pointer`})},onKeyDown(e){if(te||T||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;y.state.keyboardActiveRef.current=!0;let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r=S===`rtl`;if(e.key===`Home`){ci(e);let n=Pr&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if(e.key===`End`){ci(e);let i=Pr&&r?0:t.value.length;t.setSelectionRange(i,i),t.scrollLeft=r?-n:n;return}if(!P&&e.key===`Escape`){let t=O===`multiple`&&Array.isArray(F)?F.length===0:F===null,n=J(Et,e.nativeEvent),r=O===`multiple`?[]:null;y.state.setInputValue(``,n),y.state.setSelectedValue(r,n),!t&&!y.state.inline&&!n.isPropagationAllowed&&e.stopPropagation();return}if(_&&e.key===`Backspace`&&t.value===``&&_.highlightedChipIndex===void 0&&Array.isArray(F)&&F.length>0){let t=_.chipsRef.current.length,n=t>0?t-1:F.length-1,r=F.filter((e,t)=>t!==n);y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?`keyboard`:`pointer`}),y.state.setSelectedValue(r,J(ct,e.nativeEvent));return}let i=_?.highlightedChipIndex!==void 0,a=pe(e);if(_?.setHighlightedChipIndex(a),a===void 0?i&&y.state.inputRef.current?.focus():_?.chipsRef.current[a]?.focus(),e.which!==229&&e.key===`Enter`&&N){let t=y.state.activeIndex,n=e.nativeEvent;if(t===null){if(ee)return;y.state.setOpen(!1,J(ct,n));return}ci(e);let r=y.state.listRef.current[t];r&&(y.state.selectionEventRef.current=n,r.click(),y.state.selectionEventRef.current=null)}},onPointerMove(){y.state.keyboardActiveRef.current=!1},onPointerDown(){y.state.keyboardActiveRef.current=!1}},de],stateAttributesMapping:Mm});return(0,n.jsxs)(t.Fragment,{children:[N&&re&&(0,n.jsx)(Xm,{ref:y.state.startDismissRef}),me]})}),process.env.NODE_ENV!==`production`&&(Qm.displayName=`ComboboxInput`)}));function eh(e,t,n,r,i){if(e.baseUIHandlerPrevented||r)return;let a=Yr(e.nativeEvent),o=$n(a)?a:null;o!==e.currentTarget&&(i?.(o)||ei(o))||(e.preventDefault(),!n&&(t.state.inputRef.current?.focus(),t.state.openOnInputClick&&t.state.setOpen(!0,J(wt,e.nativeEvent))))}var th=m((()=>{yr(),Vt(),zt(),ii()})),nh,rh=m((()=>{F(),bd(),q(),dm(),Rp(),tm(),Nm(),th(),ii(),nh=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=lm(),s=Ap(),{filteredItems:c}=Mp(),l=Q(s,em.open),u=Q(s,em.mounted),d=Q(s,em.popupSide),f=Q(s,em.positionerElement),p=Q(s,em.disabled),m=Q(s,em.readOnly),h=Q(s,em.hasSelectedValue),g=Q(s,em.selectionMode),_=u&&f?d:null,v=p,y=c.length===0,b=g===`none`?!1:!h,x={...o,open:l,disabled:v,readOnly:m,popupSide:_,listEmpty:y,placeholder:b};return K(`div`,e,{ref:[t,A(e=>{s.set(`inputGroupElement`,e)})],props:[{role:`group`,onMouseDown(e){eh(e,s,v,m,e=>Jr(s.state.chipsContainerRef.current,e))}},a],state:x,stateAttributesMapping:Mm})}),process.env.NODE_ENV!==`production`&&(nh.displayName=`ComboboxInputGroup`)})),ih,ah=m((()=>{q(),ih=t.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e;return K(`span`,e,{ref:t,props:[{"aria-hidden":!0,children:`▼`},a]})}),process.env.NODE_ENV!==`production`&&(ih.displayName=`ComboboxIcon`)})),oh,sh,ch=m((()=>{bd(),Rp(),q(),tm(),Dr(),dm(),xn(),_n(),$a(),Vt(),zt(),ep(),oh={...gn,...Zf},sh=t.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,keepMounted:o=!1,style:s,...c}=e,{disabled:l}=lm(),u=Ap(),d=Q(u,em.selectionMode),f=Q(u,em.disabled),p=Q(u,em.readOnly),m=Q(u,em.open),h=Q(u,em.selectedValue),g=Q(u,em.hasSelectionChips),_=Np(),v=!1;v=d===`none`?_!==``:d===`single`?h!=null:g;let y=l||f||i,{buttonRef:b,getButtonProps:x}=wr({native:a,disabled:y}),{mounted:S,transitionStatus:C,setMounted:w}=bn(v),T={disabled:y,open:m,transitionStatus:C};Qa({open:v,ref:u.state.clearRef,onComplete(){v||w(!1)}});let E=K(`button`,e,{state:T,ref:[t,b,u.state.clearRef],props:[{tabIndex:-1,children:`x`,onMouseDown(e){e.preventDefault()},onClick(e){if(y||p)return;let t=u.state.keyboardActiveRef;u.state.setInputValue(``,J(ht,e.nativeEvent)),d===`none`?u.state.setIndices({activeIndex:null,type:t.current?`keyboard`:`pointer`}):(u.state.setSelectedValue(Array.isArray(h)?[]:null,J(ht,e.nativeEvent)),u.state.setIndices({activeIndex:null,selectedIndex:null,type:t.current?`keyboard`:`pointer`})),u.state.inputRef.current?.focus()}},c,x],stateAttributesMapping:oh});return o||S?E:null}),process.env.NODE_ENV!==`production`&&(sh.displayName=`ComboboxClear`)}));function lh(){return t.useContext(dh)}function uh(e){let{children:r,items:i}=e,a=t.useMemo(()=>({items:i}),[i]);return(0,n.jsx)(dh.Provider,{value:a,children:r})}var dh,fh=m((()=>{dh=t.createContext(null),process.env.NODE_ENV!==`production`&&(dh.displayName=`GroupCollectionContext`)}));function ph(e){let{children:r}=e,{filteredItems:i}=Mp(),a=lh(),o=a?a.items:i;return o?(0,n.jsx)(t.Fragment,{children:o.map(r)}):null}var mh=m((()=>{Rp(),fh()})),hh,gh=m((()=>{bd(),F(),q(),Rp(),Ym(),tm(),mh(),ae(),Sa(),hh=t.forwardRef(function(e,r){var i;let{render:a,className:o,style:s,children:c,...l}=e,u=Ap(),d=jp(),f=!!qm(!0),{filteredItems:p,hasItems:m}=Mp(),h=Q(u,em.selectionMode),g=Q(u,em.grid),_=Q(u,em.popupProps),v=Q(u,em.virtualized),y=h===`multiple`,b=p.length===0,x=A(e=>{u.set(`positionerElement`,e)}),S=A(e=>{u.set(`listElement`,e)}),C=t.useMemo(()=>typeof c==`function`?i||=(0,n.jsx)(ph,{children:c}):c,[c]),w={empty:b},T=d.useState(`floatingId`),E=K(`div`,e,{state:w,ref:[r,S,f?null:x],props:[_,{children:C,tabIndex:-1,id:T,role:g?`grid`:`listbox`,"aria-multiselectable":y?`true`:void 0,onKeyDown(e){if(!(u.state.disabled||u.state.readOnly)&&e.key===`Enter`){let t=u.state.activeIndex;if(t==null)return;ci(e);let n=e.nativeEvent,r=u.state.listRef.current[t];r&&(u.state.selectionEventRef.current=n,r.click(),u.state.selectionEventRef.current=null)}},onKeyDownCapture(){u.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){u.state.keyboardActiveRef.current=!1}},l]});return v?E:(0,n.jsx)(H,{elementsRef:u.state.listRef,labelsRef:m?void 0:u.state.labelsRef,children:E})}),process.env.NODE_ENV!==`production`&&(hh.displayName=`ComboboxList`)}));function _h(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=null;for(;t.nextNode();){let e=t.currentNode;e.nodeValue!==``&&(n=e)}return n}function vh(){let e=Xs(),n=t.useRef(null);return t.useEffect(()=>{if(Nr)return;let t=n.current;if(t==null)return;let r=_h(t);if(r==null)return;let i=r.nodeValue??``,a=`${i}${yh}`;return r.nodeValue=a,e.start(200,()=>{r.nodeValue===a&&(r.nodeValue=i)}),()=>{e.clear(),r.nodeValue===a&&(r.nodeValue=i)}},[n,e]),n}var yh,bh=m((()=>{zr(),$s(),yh=`⁠`})),xh,Sh=m((()=>{q(),bh(),xh=t.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e;return K(`div`,e,{ref:[t,vh()],props:[{children:a,role:`status`,"aria-live":`polite`,"aria-atomic":!0},o]})}),process.env.NODE_ENV!==`production`&&(xh.displayName=`ComboboxStatus`)}));function Pte(){let e=t.useContext(Ch);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(20):`Base UI: <Combobox.Portal> is missing.`);return e}var Ch,wh=m((()=>{G(),Ch=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Ch.displayName=`ComboboxPortalContext`)})),Th,Eh=m((()=>{bd(),Of(),Rp(),wh(),tm(),Th=t.forwardRef(function(e,t){let{keepMounted:r=!1,...i}=e,a=Ap(),o=Q(a,em.mounted),s=Q(a,em.forceMounted);return o||r||s?(0,n.jsx)(Ch.Provider,{value:r,children:(0,n.jsx)(el,{ref:t,...i})}):null}),process.env.NODE_ENV!==`production`&&(Th.displayName=`ComboboxPortal`)})),Dh,Oh,Fte=m((()=>{Vi(),Dh=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0,offsetParent:d=`real`}=hi(e,t)||{};if(l==null)return{};let f=Oi(u),p={x:n,y:r},m=xi(i),h=yi(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],C=d===`real`?await o.getOffsetParent?.(l):s.floating,w=s.floating[b]||a.floating[h];(!w||!await o.isElement?.(C))&&(w=s.floating[b]||a.floating[h]);let T=x/2-S/2,E=w/2-g[h]/2-1,D=Math.min(f[v],E),O=Math.min(f[y],E),k=D,A=w-g[h]-O,j=w/2-g[h]/2+T,M=mi(k,j,A),N=!c.arrow&&_i(i)!=null&&j!==M&&a.reference[h]/2-(j<k?D:O)-g[h]/2<0,P=N?j<k?j-k:j-A:0;return{[m]:p[m]+P,data:{[m]:M,centerOffset:j-M-P,...N&&{alignmentOffset:P}},reset:N}}}),Oh=(e,t)=>({...Dh(e),options:[e,t]})})),kh,Ite=m((()=>{Pu(),kh={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await Nu().fn(e)).data?.referenceHidden||a}}}}})),Ah,jh,Mh=m((()=>{na(),Vi(),Ah={sideX:`left`,sideY:`top`},jh={name:`adaptiveOrigin`,async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:a,strategy:o,placement:s}=e,c=Xn(i),l=c.getComputedStyle(i);if(!(l.transitionDuration!==`0s`&&l.transitionDuration!==``))return{x:t,y:n,data:Ah};let u=await a.getOffsetParent?.(i),d={width:0,height:0};if(o===`fixed`&&c?.visualViewport)d={width:c.visualViewport.width,height:c.visualViewport.height};else if(u===c){let e=ta(i);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await a.isElement?.(u)&&(d=await a.getDimensions(u));let f=gi(s),p=t,m=n;f===`left`&&(p=d.width-(t+r.width)),f===`top`&&(m=d.height-(n+r.height));let h=f===`left`?`right`:Ah.sideX,g=f===`top`?`bottom`:Ah.sideY;return{x:p,y:m,data:{sideX:h,sideY:g}}}}}));function Nh(e,t,n){let 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 Ph(e,t,n){let{rects:r,placement:i}=e;return{side:Nh(t,gi(i),n),align:_i(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Fh(e){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,keepMounted:p=!1,floatingRootContext:m,mounted:h,collisionAvoidance:g,shiftCrossAxis:_=!1,nodeId:v,adaptiveOrigin:y,lazyFlip:b=!1,externalTree:x}=e,[S,C]=t.useState(null);!h&&S!==null&&C(null);let w=g.side||`flip`,T=g.align||`flip`,E=g.fallbackAxisSide||`end`,D=typeof n==`function`?n:void 0,O=A(D),k=D?O:n,j=mc(n),M=mc(h),N=oe()===`rtl`,P=S||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":N?`left`:`right`,"inline-start":N?`right`:`left`}[i],F=o===`center`?P:`${P}-${o}`,I=l,R=+(i===`bottom`),ee=+(i===`top`),z=+(i===`right`),B=+(i===`left`);typeof I==`number`?I={top:I+R,right:I+B,bottom:I+ee,left:I+z}:I&&={top:(I.top||0)+R,right:(I.right||0)+B,bottom:(I.bottom||0)+ee,left:(I.left||0)+z};let V={boundary:c===`clipping-ancestors`?`clippingAncestors`:c,padding:I},te=t.useRef(null),ne=mc(a),H=mc(s),re=[Ou(e=>{let t=Ph(e,i,N),n=typeof ne.current==`function`?ne.current(t):ne.current,r=typeof H.current==`function`?H.current(t):H.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[typeof a==`function`?0:a,typeof s==`function`?0:s,N,i])],ie=T===`none`&&w!==`shift`,U=!ie&&(u||_||w===`shift`),ae=w===`none`?null:ju({...V,padding:{top:I.top+1,right:I.right+1,bottom:I.bottom+1,left:I.left+1},mainAxis:!_&&w===`flip`,crossAxis:T===`flip`?`alignment`:!1,fallbackAxisSideDirection:E}),se=ie?null:ku(e=>{let t=ta(e.elements.floating).documentElement;return{...V,rootBoundary:_?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:T!==`none`,crossAxis:U,limiter:u||_?void 0:Au(e=>{if(!te.current)return{};let{width:t,height:n}=te.current.getBoundingClientRect(),r=bi(gi(e.placement)),i=r===`y`?t:n,a=r===`y`?I.left+I.right:I.top+I.bottom;return{offset:i/2+a/2}})}},[V,u,_,I,T]);w===`shift`||T===`shift`||o===`center`?re.push(se,ae):re.push(ae,se),re.push(Mu({...V,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!M.current)return;let i=e.style;i.setProperty(`--available-width`,`${t}px`),i.setProperty(`--available-height`,`${n}px`);let a=Xn(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(`--anchor-width`,`${u}px`),i.setProperty(`--anchor-height`,`${d}px`)}}),Oh(()=>({element:te.current||ta(te.current).createElement(`div`),padding:d,offsetParent:`floating`}),[d]),{name:`transformOrigin`,fn(e){let{elements:t,middlewareData:n,placement:r,rects:o,y:s}=e,c=gi(r),l=bi(c),u=te.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=u?.clientWidth||0,m=u?.clientHeight||0,h=d+p/2,g=f+m/2,_=Math.abs(n.shift?.y||0),v=o.reference.height/2,y=typeof a==`function`?a(Ph(e,i,N)):a,b=_>y,x={top:`${h}px calc(100% + ${y}px)`,bottom:`${h}px ${-y}px`,left:`calc(100% + ${y}px) ${g}px`,right:`${-y}px ${g}px`}[c],S=`${h}px ${o.reference.y+v-s}px`;return t.floating.style.setProperty(`--transform-origin`,U&&l===`y`&&b?S:x),{}}},kh,y),L(()=>{!h&&m&&m.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[h,m]);let ce=t.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<`u`,layoutShift:!f&&typeof IntersectionObserver<`u`}),[f]),{refs:le,elements:W,x:G,y:ue,middlewareData:de,update:fe,placement:pe,context:me,isPositioned:he,floatingStyles:ge}=Bd({rootContext:m,open:p?h:void 0,placement:F,middleware:re,strategy:r,whileElementsMounted:p?void 0:(...e)=>du(...e,ce),nodeId:v,externalTree:x}),{sideX:_e,sideY:ve}=de.adaptiveOrigin||Ah,ye=he?r:`fixed`,be=t.useMemo(()=>{let e=y?{position:ye,[_e]:G,[ve]:ue}:{position:ye,...ge};return he||(e.opacity=0),e},[y,ye,_e,G,ve,ue,ge,he]),xe=t.useRef(null);L(()=>{if(!h)return;let e=j.current,t=typeof e==`function`?e():e,n=(Ih(t)?t.current:t)||null;n!==xe.current&&(le.setPositionReference(n),xe.current=n)},[h,le,k,j]),t.useEffect(()=>{if(!h)return;let e=j.current;typeof e!=`function`&&Ih(e)&&e.current!==xe.current&&(le.setPositionReference(e.current),xe.current=e.current)},[h,le,k,j]),t.useEffect(()=>{if(p&&h&&W.domReference&&W.floating)return du(W.domReference,W.floating,fe,ce)},[p,h,W,fe,ce]);let Se=gi(pe),Ce=Nh(i,Se,N),we=_i(pe)||`center`,Te=!!de.hide?.referenceHidden;L(()=>{b&&h&&he&&C(Se)},[b,h,he,Se]);let Ee=t.useMemo(()=>({position:`absolute`,top:de.arrow?.y,left:de.arrow?.x}),[de.arrow]),De=de.arrow?.centerOffset!==0;return t.useMemo(()=>({positionerStyles:be,arrowStyles:Ee,arrowRef:te,arrowUncentered:De,side:Ce,align:we,physicalSide:Se,anchorHidden:Te,refs:le,context:me,isPositioned:he,update:fe}),[be,Ee,te,De,Ce,we,Se,Te,le,me,he,fe])}function Ih(e){return e!=null&&`current`in e}var Lh=m((()=>{Vi(),na(),R(),hc(),F(),Of(),ce(),Fte(),Ite(),Mh()}));function Rh(e){return e===`starting`?Bc:ke}var zh=m((()=>{Ae(),Yc()}));function Bh(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),K(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},Rh(r),i],stateAttributesMapping:$f})}var Vh=m((()=>{ep(),q(),zh()}));function Hh(e,n,r,i){let[a,o]=t.useState(!1);L(()=>{if(!e||!n||r==null){o(!1);return}let t=ta(r).documentElement.clientWidth,i=r.offsetWidth;o(t>0&&i>0&&i>=t-Uh)},[e,n,r]),ec(e&&(!n||a),i)}var Uh,Wh=m((()=>{na(),oc(),R(),Uh=20})),Gh,Kh=m((()=>{bd(),R(),F(),_p(),Rp(),Ym(),Lh(),wh(),Yc(),tm(),yp(),Vh(),Wh(),Gh=t.forwardRef(function(e,t){let{render:r,className:i,anchor:a,positionMethod:o=`absolute`,side:s=`bottom`,align:c=`center`,sideOffset:l=0,alignOffset:u=0,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f=5,arrowPadding:p=5,sticky:m=!1,disableAnchorTracking:h=!1,collisionAvoidance:g=Kc,style:_,...v}=e,y=Ap(),{filteredItems:b}=Mp(),x=jp(),S=Pte(),C=Q(y,em.modal),w=Q(y,em.open),T=Q(y,em.mounted),E=Q(y,em.openMethod),D=Q(y,em.positionerElement),O=Q(y,em.triggerElement),k=Q(y,em.inputElement),j=Q(y,em.inputGroupElement),M=Q(y,em.inputInsidePopup),N=Q(y,em.transitionStatus),P=b.length===0,F=Fh({anchor:a??(M?O:j??k),floatingRootContext:x,positionMethod:o,mounted:T,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:h,keepMounted:S,collisionAvoidance:g,lazyFlip:!0});Hh(w&&C,E===`touch`,D,O);let I={open:w,side:F.side,align:F.align,anchorHidden:F.anchorHidden,empty:P};L(()=>{y.set(`popupSide`,F.side)},[y,F.side]);let R=A(e=>{y.set(`positionerElement`,e)}),ee=Bh(e,I,{styles:F.positionerStyles,transitionStatus:N,props:v,refs:[t,R],hidden:!T,inert:!w});return(0,n.jsxs)(Jm.Provider,{value:F,children:[T&&C&&(0,n.jsx)(vp,{inert:gp(!w),cutout:j??k??O}),ee]})}),process.env.NODE_ENV!==`production`&&(Gh.displayName=`ComboboxPositioner`)})),qh,Jh,Yh=m((()=>{bd(),Of(),q(),Rp(),tm(),ep(),Ym(),$a(),_n(),Sa(),zh(),Zm(),qh={...$f,...gn},Jh=t.forwardRef(function(e,r){let{render:i,className:a,style:o,initialFocus:s,finalFocus:c,...l}=e,u=Ap(),d=qm(),f=jp(),{filteredItems:p}=Mp(),m=Q(u,em.mounted),h=Q(u,em.open),g=Q(u,em.openMethod),_=Q(u,em.transitionStatus),v=Q(u,em.inputInsidePopup),y=Q(u,em.inputElement),b=Q(u,em.modal),x=p.length===0;Qa({open:h,ref:u.state.popupRef,onComplete(){h&&u.state.onOpenChangeComplete(!0)}});let S=K(`div`,e,{state:{open:h,side:d.side,align:d.align,anchorHidden:d.anchorHidden,transitionStatus:_,empty:x},ref:[r,u.state.popupRef],props:[{role:v?`dialog`:`presentation`,tabIndex:-1,onFocus(e){let t=Yr(e.nativeEvent);g!==`touch`&&(Jr(u.state.listElement,t)||t===e.currentTarget)&&u.state.inputRef.current?.focus()}},Rh(_),l],stateAttributesMapping:qh}),C=s===void 0?v?e=>e===`touch`?u.state.popupRef.current:y:!1:s,w;w=c??(v?void 0:!1);let T=!v||b;return(0,n.jsx)(_l,{context:f,disabled:!m,modal:T,openInteractionType:g,initialFocus:C,returnFocus:w,getInsideElements:()=>[u.state.startDismissRef.current,u.state.endDismissRef.current],children:(0,n.jsxs)(t.Fragment,{children:[S,T&&(0,n.jsx)(Xm,{ref:u.state.endDismissRef})]})})}),process.env.NODE_ENV!==`production`&&(Jh.displayName=`ComboboxPopup`)}));function Lte(){let e=t.useContext(Xh);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(18):`Base UI: ComboboxGroupContext is missing. ComboboxGroup parts must be placed within <Combobox.Group>.`);return e}var Xh,Zh=m((()=>{G(),Xh=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Xh.displayName=`ComboboxGroupContext`)})),Qh,$h=m((()=>{q(),Zh(),fh(),Qh=t.forwardRef(function(e,r){let{render:i,className:a,style:o,items:s,...c}=e,[l,u]=t.useState(),d=t.useMemo(()=>({labelId:l,setLabelId:u,items:s}),[l,u,s]),f=K(`div`,e,{ref:r,props:[{role:`group`,"aria-labelledby":l},c]}),p=(0,n.jsx)(Xh.Provider,{value:d,children:f});return s?(0,n.jsx)(uh,{items:s,children:p}):p}),process.env.NODE_ENV!==`production`&&(Qh.displayName=`ComboboxGroup`)})),eg,tg=m((()=>{R(),$t(),Zh(),q(),eg=t.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{setLabelId:s}=Lte(),c=Qt(a);return L(()=>(s(c),()=>{s(void 0)}),[c,s]),K(`div`,e,{ref:t,props:[{id:c},o]})}),process.env.NODE_ENV!==`production`&&(eg.displayName=`ComboboxGroupLabel`)}));function ng(){let e=t.useContext(rg);if(!e)throw Error(process.env.NODE_ENV===`production`?W(19):`Base UI: ComboboxItemContext is missing. ComboboxItem parts must be placed within <Combobox.Item>.`);return e}var rg,ig=m((()=>{G(),rg=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(rg.displayName=`ComboboxItemContext`)}));function Rte(){return t.useContext(ag)}var ag,og=m((()=>{ag=t.createContext(!1),process.env.NODE_ENV!==`production`&&(ag.displayName=`ComboboxRowContext`)})),sg,cg=m((()=>{bd(),R(),Rp(),kn(),q(),ig(),tm(),Dr(),og(),Wp(),sg=t.memo(t.forwardRef(function(e,i){let{render:a,className:o,value:s=null,index:c,disabled:l=!1,nativeButton:u=!1,style:d,...f}=e,p=t.useRef(!1),m=t.useRef(null),h=Dn({index:c,textRef:m,indexGuessBehavior:On.GuessFromOrder}),g=Ap(),_=Rte(),{flatFilteredItems:v,hasItems:y}=Mp(),b=Q(g,em.open),x=Q(g,em.selectionMode),S=Q(g,em.readOnly),C=Q(g,em.virtualized),w=Q(g,em.isItemEqualToValue),T=x!==`none`,E=c??(C?Vp(v,s,w):h.index),D=h.index!==-1,O=Q(g,em.id),k=Q(g,em.isActive,E),A=Q(g,em.isSelected,s),j=Q(g,em.getItemProps),M=t.useRef(null),N=O!=null&&D?`${O}-${E}`:void 0,P=A&&T;L(()=>{if(!(D&&(C||c!=null)))return;let e=g.state.listRef.current;return e[E]=M.current,()=>{delete e[E]}},[D,C,E,c,g]),L(()=>{if(!D||y)return;let e=g.state.valuesRef.current;return e[E]=s,x!==`none`&&g.state.allValuesRef.current.push(s),()=>{delete e[E]}},[D,y,E,s,g,x]),L(()=>{if(!b){p.current=!1;return}if(!D||y)return;let e=g.state.selectedValue;zp(s,Array.isArray(e)?e[e.length-1]:e,w)&&g.set(`selectedIndex`,E)},[D,y,b,g,E,s,w]);let F={disabled:l,selected:P,highlighted:k},I=j({active:k,selected:P});I.id=void 0,I.onFocus=void 0;let{getButtonProps:R,buttonRef:ee}=wr({disabled:l,focusableWhenDisabled:!0,native:u,composite:!0});function z(e){function t(){g.state.handleSelection(e,s)}g.state.submitOnItemClick?(r.flushSync(t),g.state.requestSubmit()):t()}let B={id:N,role:_?`gridcell`:`option`,"aria-selected":T?P:void 0,tabIndex:void 0,onPointerDownCapture(e){p.current=!0,e.preventDefault()},onMouseDown(e){e.preventDefault()},onClick(e){l||S||z(e.nativeEvent)},onMouseUp(e){let t=p.current;p.current=!1,!(l||S||e.button!==0||t||!k)&&z(e.nativeEvent)}},V=K(`div`,e,{ref:[ee,i,h.ref,M],state:F,props:[I,B,f,R]}),te=t.useMemo(()=>({selected:P,textRef:m}),[P,m]);return(0,n.jsx)(rg.Provider,{value:te,children:V})})),process.env.NODE_ENV!==`production`&&(sg.displayName=`ComboboxItem`)})),lg,zte=m((()=>{cg(),lg=sg})),ug,dg=m((()=>{q(),og(),ug=t.forwardRef(function(e,t){let{render:r,className:i,style:a,...o}=e,s=K(`div`,e,{ref:t,props:[{role:`row`},o]});return(0,n.jsx)(ag.Provider,{value:!0,children:s})}),process.env.NODE_ENV!==`production`&&(ug.displayName=`ComboboxRow`)})),fg,pg=m((()=>{q(),Rp(),bh(),fg=t.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,{filteredItems:s}=Mp(),c=Ap(),l=vh(),u=s.length===0?a:null;return K(`div`,e,{ref:[t,c.state.emptyRef,l],props:[{children:u,role:`status`,"aria-live":`polite`,"aria-atomic":!0},o]})}),process.env.NODE_ENV!==`production`&&(fg.displayName=`ComboboxEmpty`)})),mg,hg=m((()=>{q(),mg=t.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return K(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})}),process.env.NODE_ENV!==`production`&&(mg.displayName=`Separator`)})),Bte=m((()=>{jm(),Rp(),Um(),$m(),rh(),ah(),ch(),gh(),Sh(),Eh(),bd(),ep(),_n(),q(),tm(),Kh(),Yh(),Ym(),$h(),tg(),zte(),dg(),mh(),pg(),hg(),Tm()})),gg=m((()=>{Bte()}));function _g(){let e=t.useContext(vg);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(13):`Base UI: AvatarRootContext is missing. Avatar parts must be placed within <Avatar.Root>.`);return e}var vg,yg=m((()=>{G(),vg=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(vg.displayName=`AvatarRootContext`)})),bg,xg=m((()=>{bg={imageLoadingStatus:()=>null}})),Sg,Vte=m((()=>{q(),yg(),xg(),Sg=t.forwardRef(function(e,r){let{className:i,render:a,style:o,...s}=e,[c,l]=t.useState(`idle`),u={imageLoadingStatus:c},d=t.useMemo(()=>({imageLoadingStatus:c,setImageLoadingStatus:l}),[c,l]),f=K(`span`,e,{state:u,ref:r,props:s,stateAttributesMapping:bg});return(0,n.jsx)(vg.Provider,{value:d,children:f})}),process.env.NODE_ENV!==`production`&&(Sg.displayName=`AvatarRoot`)}));function Hte(e,{referrerPolicy:n,crossOrigin:r}){let[i,a]=t.useState(`idle`);return L(()=>{if(!e)return a(`error`),De;let t=!0,i=new window.Image,o=e=>()=>{t&&a(e)};return a(`loading`),i.onload=o(`loaded`),i.onerror=o(`error`),n&&(i.referrerPolicy=n),i.crossOrigin=r??null,i.src=e,i.complete&&a(i.naturalWidth>0?`loaded`:`error`),()=>{t=!1}},[e,r,n]),i}var Ute=m((()=>{R(),nm()})),Cg,wg,Wte=m((()=>{F(),R(),q(),yg(),xg(),$a(),_n(),xn(),Ute(),Cg={...bg,...gn},wg=t.forwardRef(function(e,n){let{className:r,render:i,onLoadingStatusChange:a,referrerPolicy:o,crossOrigin:s,style:c,...l}=e,u=_g(),d=Hte(e.src,{referrerPolicy:o,crossOrigin:s}),f=d===`loaded`,{mounted:p,transitionStatus:m,setMounted:h}=bn(f),g=t.useRef(null),_=A(e=>{a?.(e),u.setImageLoadingStatus(e)});L(()=>{d!==`idle`&&_(d)},[d,_]);let v={imageLoadingStatus:d,transitionStatus:m};Qa({open:f,ref:g,onComplete(){f||h(!1)}});let y=K(`img`,e,{state:v,ref:[n,g],props:l,stateAttributesMapping:Cg,enabled:p});return p?y:null}),process.env.NODE_ENV!==`production`&&(wg.displayName=`AvatarImage`)})),Tg,Gte=m((()=>{$s(),q(),yg(),xg(),Tg=t.forwardRef(function(e,n){let{className:r,render:i,delay:a,style:o,...s}=e,{imageLoadingStatus:c}=_g(),[l,u]=t.useState(a===void 0),d=Xs();return t.useEffect(()=>(a!==void 0&&d.start(a,()=>u(!0)),d.clear),[d,a]),K(`span`,e,{state:{imageLoadingStatus:c},ref:n,props:s,stateAttributesMapping:bg,enabled:c!==`loaded`&&l})}),process.env.NODE_ENV!==`production`&&(Tg.displayName=`AvatarFallback`)})),Kte=m((()=>{Vte(),Wte(),Gte()})),Eg=m((()=>{Kte()})),Dg,qte=m((()=>{Er(),q(),Dg=t.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:u}=wr({disabled:i,focusableWhenDisabled:a,native:o});return K(`button`,e,{state:{disabled:i},ref:[t,u],props:[c,l]})}),process.env.NODE_ENV!==`production`&&(Dg.displayName=`Button`)})),Jte=m((()=>{qte()})),Og,Yte=m((()=>{Og=function(e){return e.checked=`data-checked`,e.unchecked=`data-unchecked`,e.indeterminate=`data-indeterminate`,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}({})}));function kg(e){return t.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[Og.checked]:``}:{[Og.unchecked]:``}},...sm}),[e.indeterminate])}var Ag=m((()=>{Yte(),cm()}));function jg(){return t.useContext(Mg)}var Mg,Ng=m((()=>{Mg=t.createContext({disabled:!1}),process.env.NODE_ENV!==`production`&&(Mg.displayName=`FieldItemContext`)}));function Pg(e,n,r,i=!0,a){let[o,s]=t.useState(),c=Qt(a?`${a}-label`:void 0),l=e??n??o;return L(()=>{let t=e||n||!i?void 0:Fg(r.current,c);o!==t&&s(t)}),l}function Fg(e,t){let n=Ig(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function Ig(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}var Lg=m((()=>{R(),$t()}));function Rg(e=!0){let n=t.useContext(zg);if(n===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?W(3):`Base UI: CheckboxGroupContext is missing. CheckboxGroup parts must be placed within <CheckboxGroup>.`);return n}var zg,Bg=m((()=>{G(),zg=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(zg.displayName=`CheckboxGroupContext`)}));function Vg(){let e=t.useContext(Hg);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(14):`Base UI: CheckboxRootContext is missing. Checkbox parts must be placed within <Checkbox.Root>.`);return e}var Hg,Ug=m((()=>{G(),Hg=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Hg.displayName=`CheckboxRootContext`)})),Wg,Gg,Kg=m((()=>{Ae(),E(),F(),R(),ye(),k(),yc(),nm(),Ag(),q(),$t(),$e(),Er(),dm(),pm(),Ng(),gm(),ym(),Lg(),Bg(),Ug(),Vt(),zt(),Af(),Wg=`data-parent`,Gg=t.forwardRef(function(e,r){let{checked:i,className:a,defaultChecked:o=!1,"aria-labelledby":s,disabled:c=!1,form:l,id:u,indeterminate:d=!1,inputRef:f,name:p,onCheckedChange:m,parent:h=!1,readOnly:g=!1,render:_,required:v=!1,uncheckedValue:y,value:b,nativeButton:x=!1,style:S,...C}=e,{clearErrors:T}=mm(),{disabled:E,name:O,setDirty:k,setFilled:j,setFocused:M,setTouched:N,state:P,validationMode:F,validityData:I,shouldValidateOnChange:R,validation:ee}=lm(),z=jg(),{labelId:B,controlId:V,registerControlId:te,getDescriptionProps:ne}=_m(),H=Rg(),re=H?.parent,ie=re&&H.allValues,U=E||z.disabled||H?.disabled||c,ae=O??p,oe=b??ae,se=Qt(),ce=Qt(),le=V;ie?le=h?ce:`${re.id}-${oe}`:u&&(le=u);let W={};ie&&(h?W=H.parent.getParentProps():oe&&(W=H.parent.getChildProps(oe)));let G=A(m),{checked:ue=i,indeterminate:de=d,onCheckedChange:fe,...me}=W,he=H?.value,ge=H?.setValue,_e=H?.defaultValue,ve=t.useRef(null),ye=D(()=>Symbol(`checkbox-control`)),be=t.useRef(!1),{getButtonProps:xe,buttonRef:Se}=wr({disabled:U,native:x}),Ce=H?.validation??ee,[we,Te]=w({controlled:oe&&he&&!h?he.includes(oe):ue,default:oe&&_e&&!h?_e.includes(oe):o,name:`Checkbox`,state:`checked`});L(()=>{te!==De&&(be.current=!0,te(ye.current,le))},[le,H,te,h,ye]),t.useEffect(()=>{let e=ye.current;return()=>{!be.current||te===De||(be.current=!1,te(e,void 0))}},[te,ye]),fm(ve,{enabled:!H,id:se,value:we});let Ee=t.useRef(null),Oe=pe(f,Ee,Ce.inputRef),Ae=Pg(s,B,Ee,!x,le??void 0);L(()=>{Ee.current&&(Ee.current.indeterminate=de,we&&j(!0))},[we,de,j]),kf(we,()=>{H&&!h||(T(ae),j(we),k(we!==I.initialValue),R()?Ce.commit(we):Ce.commit(we,!0))});let je=Le({checked:we,disabled:U,form:l,name:h?void 0:ae,id:x?void 0:le??void 0,required:v,ref:Oe,style:ae?vc:_c,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(g){e.preventDefault();return}let t=e.currentTarget.checked,n=J(ct,e.nativeEvent);fe?.(t,n),G(t,n),!n.isCanceled&&(Te(t),oe&&he&&ge&&!h&&!ie&&ge(t?[...he,oe]:he.filter(e=>e!==oe),n))},onFocus(){ve.current?.focus()}},b===void 0?ke:{value:(H?we&&b:b)||``},ne,H?Ce.getValidationProps:Ce.getInputValidationProps),Me=ie?!!ue:we,Ne=ie&&de||d;t.useEffect(()=>{if(!re||!oe)return;let e=re.disabledStatesRef.current;return e.set(oe,U),()=>{e.delete(oe)}},[re,U,oe]);let Pe=t.useMemo(()=>({...P,checked:Me,disabled:U,readOnly:g,required:v,indeterminate:Ne}),[P,Me,U,g,v,Ne]),Fe=kg(Pe),Ie=K(`span`,e,{state:Pe,ref:[Se,ve,r,H?.registerControlRef],props:[{id:x?le??void 0:se,role:`checkbox`,"aria-checked":de?`mixed`:we,"aria-readonly":g||void 0,"aria-required":v||void 0,"aria-labelledby":Ae,[Wg]:h?``:void 0,onFocus(){M(!0)},onBlur(){let e=Ee.current;e&&(N(!0),M(!1),F===`onBlur`&&Ce.commit(H?he:e.checked))},onClick(e){g||U||(e.preventDefault(),Ee.current?.dispatchEvent(new PointerEvent(`click`,{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey})))}},ne,Ce.getValidationProps,C,me,xe],stateAttributesMapping:Fe});return(0,n.jsxs)(Hg.Provider,{value:Pe,children:[Ie,!we&&!H&&ae&&!h&&y!==void 0&&(0,n.jsx)(`input`,{type:`hidden`,form:l,name:ae,value:y}),(0,n.jsx)(`input`,{...je,suppressHydrationWarning:!0})]})}),process.env.NODE_ENV!==`production`&&(Gg.displayName=`CheckboxRoot`)})),qg,Jg=m((()=>{Ug(),q(),Ag(),$a(),xn(),_n(),cm(),qg=t.forwardRef(function(e,n){let{render:r,className:i,style:a,keepMounted:o=!1,...s}=e,c=Vg(),l=c.checked||c.indeterminate,{mounted:u,transitionStatus:d,setMounted:f}=bn(l),p=t.useRef(null),m={...c,transitionStatus:d};Qa({open:l,ref:p,onComplete(){l||f(!1)}});let h=kg(c),g=t.useMemo(()=>({...h,...gn,...sm}),[h]),_=o||u,v=K(`span`,e,{ref:[n,p],state:m,stateAttributesMapping:g,props:s});return _?v:null}),process.env.NODE_ENV!==`production`&&(qg.displayName=`CheckboxIndicator`)})),Yg=m((()=>{Kg(),Jg()})),Xg=m((()=>{Yg()}));function Zg(e){let{allValues:n=Qg,value:r=Qg,onValueChange:i}=e,a=t.useRef(r),o=t.useRef(new Map),[s,c]=t.useState(`mixed`),l=Qt(),u=r.length===n.length,d=r.length!==n.length&&r.length>0,f=A(i),p=t.useCallback(()=>({id:l,indeterminate:d,checked:u,"aria-controls":n.map(e=>`${l}-${e}`).join(` `),onCheckedChange(e,t){let i=a.current,l=n.filter(e=>o.current.get(e)&&i.includes(e)),u=n.filter(e=>!o.current.get(e)||o.current.get(e)&&i.includes(e));if(i.length===u.length||i.length===0){r.length===u.length?f(l,t):f(u,t);return}s===`mixed`?(f(u,t),c(`on`)):s===`on`?(f(l,t),c(`off`)):s===`off`&&(f(i,t),c(`mixed`))}}),[n,u,l,d,f,s,r.length]),m=t.useCallback(e=>({checked:r.includes(e),onCheckedChange(t,n){let i=r.slice();t?i.push(e):i.splice(i.indexOf(e),1),a.current=i,f(i,n),c(`mixed`)}}),[f,r]);return t.useMemo(()=>({id:l,indeterminate:d,getParentProps:p,getChildProps:m,disabledStatesRef:o}),[l,d,p,m])}var Qg,$g=m((()=>{F(),$t(),Qg=[]}));function e_(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}var t_=m((()=>{})),n_,r_=m((()=>{E(),F(),Ae(),$t(),q(),Bg(),dm(),pm(),ym(),cm(),Kg(),$g(),gm(),Af(),t_(),n_=t.forwardRef(function(e,r){let{allValues:i,className:a,defaultValue:o,disabled:s=!1,id:c,onValueChange:l,render:u,value:d,style:f,...p}=e,{disabled:m,name:h,state:g,validation:_,setFilled:v,setDirty:y,shouldValidateOnChange:b,validityData:x}=lm(),{labelId:S,getDescriptionProps:C}=_m(),{clearErrors:T}=mm(),E=m||s,D=t.useMemo(()=>{if(d===void 0)return o??[]},[d,o]),[O,k]=w({controlled:d,default:D,name:`CheckboxGroup`,state:`value`}),j=A((e,t)=>{l?.(e,t),!t.isCanceled&&k(e)}),M=Zg({allValues:i,value:O,onValueChange:j}),N=Qt(c),P=t.useRef(null),F=t.useCallback(e=>{P.current==null&&e!=null&&!e.hasAttribute(`data-parent`)&&(P.current=e)},[]);fm(P,{enabled:!!h,id:N,value:O});let I=O??Oe;kf(I,()=>{h&&T(h);let e=Array.isArray(x.initialValue)?x.initialValue:Oe;v(I.length>0),y(!e_(I,e)),b()?_.commit(I):_.commit(I,!0)});let L={...g,disabled:E},R=t.useMemo(()=>({allValues:i,value:O,defaultValue:D,setValue:j,parent:M,disabled:E,validation:_,registerControlRef:F}),[i,O,D,j,M,E,_,F]),ee=K(`div`,e,{state:L,ref:r,props:[{role:`group`,"aria-labelledby":S},C,p],stateAttributesMapping:sm});return(0,n.jsx)(zg.Provider,{value:R,children:ee})}),process.env.NODE_ENV!==`production`&&(n_.displayName=`CheckboxGroup`)})),i_=m((()=>{r_()})),a_,o_=m((()=>{Bn(),_n(),a_={...zn,...gn}})),s_,c_=m((()=>{F(),q(),Cn(),En(),o_(),s_=t.forwardRef(function(e,r){let{render:i,className:a,defaultOpen:o=!1,disabled:s=!1,onOpenChange:c,open:l,style:u,...d}=e,f=A(c),p=Sn({open:l,defaultOpen:o,onOpenChange:f,disabled:s}),m=t.useMemo(()=>({open:p.open,disabled:p.disabled,transitionStatus:p.transitionStatus}),[p.open,p.disabled,p.transitionStatus]),h=t.useMemo(()=>({...p,onOpenChange:f,state:m}),[p,f,m]),g=K(`div`,e,{state:m,ref:r,props:d,stateAttributesMapping:a_});return(0,n.jsx)(Tn.Provider,{value:h,children:g})}),process.env.NODE_ENV!==`production`&&(s_.displayName=`CollapsibleRoot`)})),l_,u_,d_=m((()=>{Bn(),_n(),q(),Dr(),En(),l_={...Rn,...gn},u_=t.forwardRef(function(e,n){let{panelId:r,open:i,handleTrigger:a,state:o,disabled:s}=wn(),{className:c,disabled:l=s,id:u,render:d,nativeButton:f=!0,style:p,...m}=e,{getButtonProps:h,buttonRef:g}=wr({disabled:l,focusableWhenDisabled:!0,native:f}),_=t.useMemo(()=>({"aria-controls":i?r:void 0,"aria-expanded":i,onClick:a}),[r,i,a]);return K(`button`,e,{state:o,ref:[n,g],props:[_,m,h],stateAttributesMapping:l_})}),process.env.NODE_ENV!==`production`&&(u_.displayName=`CollapsibleTrigger`)})),f_,p_=m((()=>{f_=function(e){return e.collapsiblePanelHeight=`--collapsible-panel-height`,e.collapsiblePanelWidth=`--collapsible-panel-width`,e}({})})),m_,h_=m((()=>{R(),B(),q(),En(),o_(),Xa(),p_(),$a(),m_=t.forwardRef(function(e,n){let{className:r,hiddenUntilFound:i,keepMounted:a,render:o,id:s,style:c,...l}=e;process.env.NODE_ENV!==`production`&&L(()=>{i&&a===!1&&ee("The `keepMounted={false}` prop on a Collapsible will be ignored when using `hiddenUntilFound` since it requires the Panel to remain mounted even when closed.")},[i,a]);let{abortControllerRef:u,animationTypeRef:d,height:f,mounted:p,onOpenChange:m,open:h,panelId:g,panelRef:_,runOnceAnimationsFinish:v,setDimensions:y,setHiddenUntilFound:b,setKeepMounted:x,setMounted:S,setPanelIdState:C,setOpen:w,setVisible:T,state:E,transitionDimensionRef:D,visible:O,width:k,transitionStatus:A}=wn(),j=i??!1,M=a??!1;L(()=>{if(s)return C(s),()=>{C(void 0)}},[s,C]),L(()=>{b(j)},[b,j]),L(()=>{x(M)},[x,M]);let{props:N}=Ya({abortControllerRef:u,animationTypeRef:d,externalRef:n,height:f,hiddenUntilFound:j,id:g,keepMounted:M,mounted:p,onOpenChange:m,open:h,panelRef:_,runOnceAnimationsFinish:v,setDimensions:y,setMounted:S,setOpen:w,setVisible:T,transitionDimensionRef:D,visible:O,width:k});Qa({open:h&&A===`idle`,ref:_,onComplete(){h&&y({height:void 0,width:void 0})}});let P=K(`div`,e,{state:t.useMemo(()=>({...E,transitionStatus:A}),[E,A]),ref:[n,_],props:[N,{style:{[f_.collapsiblePanelHeight]:f===void 0?`auto`:`${f}px`,[f_.collapsiblePanelWidth]:k===void 0?`auto`:`${k}px`}},l],stateAttributesMapping:a_});return M||j||p?P:null}),process.env.NODE_ENV!==`production`&&(m_.displayName=`CollapsiblePanel`)})),g_=m((()=>{c_(),d_(),h_()})),__=m((()=>{g_()}));function v_(e){let{multiple:t=!1,defaultValue:r,value:i,onValueChange:a,autoComplete:o,...s}=e;return(0,n.jsx)(Om,{...s,selectionMode:t?`multiple`:`single`,selectedValue:i,defaultSelectedValue:r,onSelectedValueChange:a,formAutoComplete:o})}var y_=m((()=>{km()}));function b_(e,t){let n=Qt(e);return L(()=>(t(n),()=>{t(void 0)}),[n,t]),n}var x_=m((()=>{R(),$t()}));function S_(e){let{children:r,placeholder:i}=e,a=Ap(),o=Q(a,em.itemToStringLabel),s=Q(a,em.selectedValue),c=Q(a,em.items),l=Q(a,em.selectionMode)===`multiple`,u=Q(a,em.hasSelectedValue),d=!u&&i!=null&&r==null,f=Q(a,em.hasNullItemLabel,d),p=null;return p=typeof r==`function`?r(s):r??(!u&&i!=null&&!f?i:l&&Array.isArray(s)?Qp(s,c,o):Zp(s,c,o)),(0,n.jsx)(t.Fragment,{children:p})}var C_=m((()=>{bd(),Rp(),$p(),tm()})),w_,T_,E_=m((()=>{ig(),xn(),$a(),q(),_n(),w_=t.forwardRef(function(e,t){let r=e.keepMounted??!1,{selected:i}=ng();return r||i?(0,n.jsx)(T_,{...e,ref:t}):null}),process.env.NODE_ENV!==`production`&&(w_.displayName=`ComboboxItemIndicator`),T_=t.memo(t.forwardRef((e,n)=>{let{render:r,className:i,style:a,keepMounted:o,...s}=e,{selected:c}=ng(),l=t.useRef(null),{transitionStatus:u,setMounted:d}=bn(c),f=K(`span`,e,{ref:[n,l],state:{selected:c,transitionStatus:u},props:[{"aria-hidden":!0,children:`✔️`},s],stateAttributesMapping:gn});return Qa({open:c,ref:l,onComplete(){c||d(!1)}}),f})),process.env.NODE_ENV!==`production`&&(T_.displayName=`Inner`)})),D_,O_=m((()=>{bd(),Ae(),q(),Km(),ae(),Rp(),tm(),th(),D_=t.forwardRef(function(e,r){let{render:i,className:a,style:o,...s}=e,c=Ap(),l=Q(c,em.open),u=Q(c,em.hasSelectionChips),[d,f]=t.useState(void 0);l&&d!==void 0&&f(void 0);let p=t.useRef([]),m=K(`div`,e,{ref:[r,c.state.chipsContainerRef],props:[u?{role:`toolbar`}:ke,{onMouseDown(e){eh(e,c,c.state.disabled,c.state.readOnly)}},s]}),h=t.useMemo(()=>({highlightedChipIndex:d,setHighlightedChipIndex:f,chipsRef:p}),[d,f,p]);return(0,n.jsx)(Gm.Provider,{value:h,children:(0,n.jsx)(H,{elementsRef:p,children:m})})}),process.env.NODE_ENV!==`production`&&(D_.displayName=`ComboboxChips`)}));function k_(){let e=t.useContext(A_);if(!e)throw Error(process.env.NODE_ENV===`production`?W(17):`useComboboxChipContext must be used within a ComboboxChip`);return e}var A_,j_=m((()=>{G(),A_=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(A_.displayName=`ComboboxChipContext`)})),M_,N_=m((()=>{bd(),q(),Km(),Rp(),kn(),j_(),Sa(),tm(),Vt(),zt(),M_=t.forwardRef(function(e,i){let{render:a,className:o,style:s,...c}=e,l=Ap(),{setHighlightedChipIndex:u,chipsRef:d}=Wm(),f=Q(l,em.disabled),p=Q(l,em.readOnly),m=Q(l,em.selectedValue),{ref:h,index:g}=Dn();function _(e){let t=g;if(e.key===`ArrowLeft`)e.preventDefault(),t=g>0?g-1:void 0;else if(e.key===`ArrowRight`)e.preventDefault(),t=g<d.current.length-1?g+1:void 0;else if(e.key===`Backspace`||e.key===`Delete`){let n=g>=m.length-1?m.length-2:g;t=n>=0?n:void 0,ci(e),l.state.setIndices({activeIndex:null,selectedIndex:null,type:`keyboard`}),l.state.setSelectedValue(m.filter((e,t)=>t!==g),J(ct,e.nativeEvent))}else e.key===`Enter`||e.key===` `?(ci(e),t=void 0):e.key===`ArrowDown`||e.key===`ArrowUp`?(ci(e),l.state.setOpen(!0,J(Ot,e.nativeEvent)),t=void 0):e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&(t=void 0);return t}let v=K(`div`,e,{ref:[i,h],state:{disabled:f},props:[{tabIndex:-1,"aria-disabled":f||void 0,"aria-readonly":p||void 0,onKeyDown(e){if(f||p)return;let t=_(e);r.flushSync(()=>{u(t)}),t===void 0?l.state.inputRef.current?.focus():d.current[t]?.focus()}},c]}),y=t.useMemo(()=>({index:g}),[g]);return(0,n.jsx)(A_.Provider,{value:y,children:v})}),process.env.NODE_ENV!==`production`&&(M_.displayName=`ComboboxChip`)})),P_,F_=m((()=>{bd(),q(),Rp(),j_(),Dr(),Sa(),tm(),Vt(),zt(),Wp(),P_=t.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,style:o,...s}=e,c=Ap(),{index:l}=k_(),u=Q(c,em.disabled),d=Q(c,em.readOnly),f=Q(c,em.selectedValue),p=Q(c,em.isItemEqualToValue),m=u||i,{buttonRef:h,getButtonProps:g}=wr({native:a,disabled:m||d,focusableWhenDisabled:!0}),_={disabled:m};function v(e){let t=c.state.activeIndex;if(t==null)return;let n=Vp(c.state.valuesRef.current,e,p);n!==-1&&t===n&&c.state.setIndices({activeIndex:null,type:c.state.keyboardActiveRef.current?`keyboard`:`pointer`})}function y(e){let t=J(gt,e.nativeEvent),n=f[l];return v(n),c.state.setSelectedValue(f.filter((e,t)=>t!==l),t),c.state.inputRef.current?.focus(),t}return K(`button`,e,{ref:[t,h],state:_,props:[{tabIndex:-1,onMouseDown(e){e.preventDefault()},onClick(e){m||d||y(e).isPropagationAllowed||e.stopPropagation()},onKeyDown(e){m||d||(e.key===`Enter`||e.key===` `)&&(y(e).isPropagationAllowed||ci(e))}},s,g]})}),process.env.NODE_ENV!==`production`&&(P_.displayName=`ComboboxChipRemove`)})),I_=m((()=>{hg()})),L_=m((()=>{y_(),C(),Kt(),bd(),q(),dm(),cm(),yr(),na(),F(),Sa(),x_(),ym(),Rm(),Rp(),tm(),C_(),$m(),rh(),Vm(),gh(),Sh(),Eh(),ep(),_n(),Kh(),Yh(),Ym(),ah(),$h(),tg(),cg(),E_(),O_(),N_(),F_(),dg(),mh(),pg(),ch(),I_(),Tm()})),R_=m((()=>{L_()}));function z_(e=!0){let n=t.useContext(B_);if(n===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?W(25):`Base UI: ContextMenuRootContext is missing. ContextMenu parts must be placed within <ContextMenu.Root>.`);return n}var B_,V_=m((()=>{G(),B_=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(B_.displayName=`ContextMenuRootContext`)}));function H_(e){let n=t.useContext(U_);if(n===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?W(33):`Base UI: MenuPositionerContext is missing. MenuPositioner parts must be placed within <Menu.Positioner>.`);return n}var U_,W_=m((()=>{G(),U_=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(U_.displayName=`MenuPositionerContext`)}));function G_(e){let n=t.useContext(K_);if(n===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?W(36):`Base UI: MenuRootContext is missing. Menu parts must be placed within <Menu.Root>.`);return n}var K_,q_=m((()=>{G(),K_=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(K_.displayName=`MenuRootContext`)}));function J_(){let e=t.useContext(Y_);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(30):`Base UI: MenuCheckboxItemContext is missing. MenuCheckboxItem parts must be placed within <Menu.CheckboxItem>.`);return e}var Y_,X_=m((()=>{G(),Y_=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Y_.displayName=`MenuCheckboxItemContext`)}));function Z_(e){let{closeOnClick:n,highlighted:r,id:i,nodeId:a,store:o,typingRef:s,itemRef:c,itemMetadata:l}=e,{events:u}=o.useState(`floatingTreeRoot`),d=z_(!0),f=d!==void 0;return t.useMemo(()=>({id:i,role:`menuitem`,tabIndex:r?0:-1,onKeyDown(e){e.key===` `&&s?.current&&e.preventDefault()},onMouseMove(e){a&&u.emit(`itemhover`,{nodeId:a,target:e.currentTarget})},onClick(e){n&&u.emit(`close`,{domEvent:e,reason:pt})},onMouseUp(e){if(d){let t=d.initialCursorPointRef.current;if(d.initialCursorPointRef.current=null,f&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1||f&&!Lr&&e.button===2)return}c.current&&o.context.allowMouseUpTriggerRef.current&&(!f||e.button===2)&&(!l||l.type===`regular-item`)&&c.current.click()}}),[n,r,i,u,a,o,s,c,d,f,l])}var Q_=m((()=>{zr(),zt(),V_()}));function $_(e){let{closeOnClick:n,disabled:r=!1,highlighted:i,id:a,store:o,typingRef:s=o.context.typingRef,nativeButton:c,itemMetadata:l,nodeId:u}=e,d=t.useRef(null),{getButtonProps:f,buttonRef:p}=wr({disabled:r,focusableWhenDisabled:!0,native:c,composite:!0}),m=Z_({closeOnClick:n,highlighted:i,id:a,nodeId:u,store:o,typingRef:s,itemRef:d,itemMetadata:l}),h=t.useCallback(e=>Le(m,{onMouseEnter(){l.type===`submenu-trigger`&&l.setActive()}},e,f),[m,f,l]),g=pe(d,p);return t.useMemo(()=>({getItemProps:h,itemRef:g}),[h,g])}var ev,tv=m((()=>{ye(),Dr(),$e(),Q_(),ev={type:`regular-item`}})),nv,rv=m((()=>{nv=function(e){return e.checked=`data-checked`,e.unchecked=`data-unchecked`,e.disabled=`data-disabled`,e.highlighted=`data-highlighted`,e}({})})),iv,av=m((()=>{_n(),rv(),iv={checked(e){return e?{[nv.checked]:``}:{[nv.unchecked]:``}},...gn}})),ov,sv=m((()=>{F(),E(),X_(),tv(),kn(),q_(),q(),$t(),av(),W_(),Vt(),zt(),ov=t.forwardRef(function(e,r){let{render:i,className:a,id:o,label:s,nativeButton:c=!1,disabled:l=!1,closeOnClick:u=!1,checked:d,defaultChecked:f,onCheckedChange:p,style:m,...h}=e,g=Dn({label:s}),_=H_(!0),v=Qt(o),{store:y}=G_(),b=y.useState(`isActive`,g.index),x=y.useState(`itemProps`),[S,C]=w({controlled:d,default:f??!1,name:`MenuCheckboxItem`,state:`checked`}),{getItemProps:T,itemRef:E}=$_({closeOnClick:u,disabled:l,highlighted:b,id:v,store:y,nativeButton:c,nodeId:_?.context.nodeId,itemMetadata:ev}),D=t.useMemo(()=>({disabled:l,highlighted:b,checked:S}),[l,b,S]),O=K(`div`,e,{state:D,stateAttributesMapping:iv,props:[x,{role:`menuitemcheckbox`,"aria-checked":S,onClick:A(e=>{let t={...J(pt,e.nativeEvent),preventUnmountOnClose:()=>{}};p?.(!S,t),!t.isCanceled&&C(e=>!e)})},h,T],ref:[E,r,g.ref]});return(0,n.jsx)(Y_.Provider,{value:D,children:O})}),process.env.NODE_ENV!==`production`&&(ov.displayName=`MenuCheckboxItem`)})),cv,lv=m((()=>{X_(),q(),av(),xn(),$a(),cv=t.forwardRef(function(e,n){let{render:r,className:i,style:a,keepMounted:o=!1,...s}=e,c=J_(),l=t.useRef(null),{transitionStatus:u,setMounted:d}=bn(c.checked);return Qa({open:c.checked,ref:l,onComplete(){c.checked||d(!1)}}),K(`span`,e,{state:{checked:c.checked,disabled:c.disabled,highlighted:c.highlighted,transitionStatus:u},ref:[n,l],stateAttributesMapping:iv,props:{"aria-hidden":!0,...s},enabled:o||c.checked})}),process.env.NODE_ENV!==`production`&&(cv.displayName=`MenuCheckboxItemIndicator`)}));function uv(){let e=t.useContext(dv);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(31):`Base UI: MenuGroupRootContext is missing. Menu group parts must be used within <Menu.Group>.`);return e}var dv,fv=m((()=>{G(),dv=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(dv.displayName=`MenuGroupContext`)})),pv,mv=m((()=>{q(),fv(),pv=t.forwardRef(function(e,r){let{render:i,className:a,style:o,...s}=e,[c,l]=t.useState(void 0),u=t.useMemo(()=>({setLabelId:l}),[l]),d=K(`div`,e,{ref:r,props:{role:`group`,"aria-labelledby":c,...s}});return(0,n.jsx)(dv.Provider,{value:u,children:d})}),process.env.NODE_ENV!==`production`&&(pv.displayName=`MenuGroup`)})),hv,gv=m((()=>{R(),q(),$t(),fv(),hv=t.forwardRef(function(e,t){let{className:n,render:r,id:i,style:a,...o}=e,s=Qt(i),{setLabelId:c}=uv();return L(()=>(c(s),()=>{c(void 0)}),[c,s]),K(`div`,e,{ref:t,props:{id:s,role:`presentation`,...o}})}),process.env.NODE_ENV!==`production`&&(hv.displayName=`MenuGroupLabel`)})),_v,vv=m((()=>{tv(),q_(),q(),$t(),kn(),W_(),_v=t.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!0,style:l,...u}=e,d=Dn({label:a}),f=H_(!0),p=Qt(i),{store:m}=G_(),h=m.useState(`isActive`,d.index),g=m.useState(`itemProps`),{getItemProps:_,itemRef:v}=$_({closeOnClick:c,disabled:s,highlighted:h,id:p,store:m,nativeButton:o,nodeId:f?.context.nodeId,itemMetadata:ev});return K(`div`,e,{state:{disabled:s,highlighted:h},props:[g,u,_],ref:[v,t,d.ref]})}),process.env.NODE_ENV!==`production`&&(_v.displayName=`MenuItem`)}));function yv(e){let n=t.useContext(bv);if(n===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?W(69):`Base UI: ToolbarRootContext is missing. Toolbar parts must be placed within <Toolbar.Root>.`);return n}var bv,xv=m((()=>{G(),bv=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(bv.displayName=`ToolbarRootContext`)})),Sv,Cv,wv=m((()=>{Of(),q_(),W_(),q(),ep(),_n(),$a(),Vt(),zt(),xv(),Ga(),zh(),Sv={...$f,...gn},Cv=t.forwardRef(function(e,r){let{render:i,className:a,style:o,finalFocus:s,...c}=e,{store:l}=G_(),{side:u,align:d}=H_(),f=yv(!0)!=null,p=l.useState(`open`),m=l.useState(`transitionStatus`),h=l.useState(`popupProps`),g=l.useState(`mounted`),_=l.useState(`instantType`),v=l.useState(`activeTriggerElement`),y=l.useState(`parent`),b=l.useState(`lastOpenChangeReason`),x=l.useState(`rootId`),S=l.useState(`floatingRootContext`),C=l.useState(`floatingTreeRoot`),w=l.useState(`closeDelay`),T=l.useState(`activeTriggerElement`),E=y.type===`context-menu`;Qa({open:p,ref:l.context.popupRef,onComplete(){p&&l.context.onOpenChangeComplete?.(!0)}}),t.useEffect(()=>{function e(e){l.setOpen(!1,J(e.reason,e.domEvent))}return C.events.on(`close`,e),()=>{C.events.off(`close`,e)}},[C.events,l]);let D=l.useState(`hoverEnabled`),O=l.useState(`disabled`);$d(S,{enabled:D&&!O&&!E&&y.type!==`menubar`,closeDelay:w});let k={transitionStatus:m,side:u,align:d,open:p,nested:y.type===`menu`,instant:_},A=t.useCallback(e=>{l.set(`popupElement`,e)},[l]),j=K(`div`,e,{state:k,ref:[r,l.context.popupRef,A],stateAttributesMapping:Sv,props:[h,{onKeyDown(e){f&&Ba.has(e.key)&&e.stopPropagation()}},Rh(m),c,{"data-rootownerid":x}]}),M=y.type===void 0||E;return(v||y.type===`menubar`&&b!==`outside-press`)&&(M=!0),(0,n.jsx)(_l,{context:S,modal:E,disabled:!g,returnFocus:s===void 0?M:s,initialFocus:y.type!==`menu`,restoreFocus:!0,externalTree:y.type===`menubar`?void 0:C,previousFocusableElement:T,nextFocusableElement:y.type===void 0?l.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:y.type===void 0?l.context.beforeContentFocusGuardRef:void 0,children:j})}),process.env.NODE_ENV!==`production`&&(Cv.displayName=`MenuPopup`)}));function Xte(){let e=t.useContext(Tv);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(32):`Base UI: <Menu.Portal> is missing.`);return e}var Tv,Ev=m((()=>{G(),Tv=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Tv.displayName=`MenuPortalContext`)})),Dv,Ov=m((()=>{Of(),q_(),Ev(),Dv=t.forwardRef(function(e,t){let{keepMounted:r=!1,...i}=e,{store:a}=G_();return a.useState(`mounted`)||r?(0,n.jsx)(Tv.Provider,{value:r,children:(0,n.jsx)(el,{ref:t,...i})}):null}),process.env.NODE_ENV!==`production`&&(Dv.displayName=`MenuPortal`)})),kv,Av=m((()=>{_p(),R(),$s(),Of(),W_(),q_(),Lh(),ae(),yp(),Ev(),Yc(),V_(),Vt(),zt(),Mh(),yn(),Vh(),Wh(),kv=t.forwardRef(function(e,r){let{anchor:i,positionMethod:a=`absolute`,className:o,render:s,side:c,align:l,sideOffset:u=0,alignOffset:d=0,collisionBoundary:f=`clipping-ancestors`,collisionPadding:p=5,arrowPadding:m=5,sticky:h=!1,disableAnchorTracking:g=!1,collisionAvoidance:_=Kc,style:v,...y}=e,{store:b}=G_(),x=Xte(),S=z_(!0),C=b.useState(`parent`),w=b.useState(`floatingRootContext`),T=b.useState(`floatingTreeRoot`),E=b.useState(`mounted`),D=b.useState(`open`),O=b.useState(`modal`),k=b.useState(`openMethod`),A=b.useState(`activeTriggerElement`),j=b.useState(`transitionStatus`),M=b.useState(`positionerElement`),N=b.useState(`instantType`),P=b.useState(`hasViewport`),F=b.useState(`lastOpenChangeReason`),I=b.useState(`floatingNodeId`),R=b.useState(`floatingParentNodeId`),ee=w.useState(`domReferenceElement`),z=t.useRef(null),B=vn(M,!1,!1),V=i,te=u,ne=d,re=l,ie=_;C.type===`context-menu`&&(V=i??C.context?.anchor,re??=`start`,!c&&re!==`center`&&(ne=e.alignOffset??2,te=e.sideOffset??-5));let U=c,ae=re;C.type===`menu`?(U??=`inline-end`,ae??=`start`,ie=e.collisionAvoidance??qc):C.type===`menubar`&&(U??=`bottom`,ae??=`start`);let oe=C.type===`context-menu`,se=Fh({anchor:V,floatingRootContext:w,positionMethod:S?`fixed`:a,mounted:E,side:U,sideOffset:te,align:ae,alignOffset:ne,arrowPadding:oe?0:m,collisionBoundary:f,collisionPadding:p,sticky:h,nodeId:I,keepMounted:x,disableAnchorTracking:g,collisionAvoidance:ie,shiftCrossAxis:oe&&!(`side`in ie&&ie.side===`flip`),externalTree:T,adaptiveOrigin:P?jh:void 0});t.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===I&&b.set(`hoverEnabled`,!1),e.nodeId!==I&&e.parentNodeId===b.select(`floatingParentNodeId`)&&b.setOpen(!1,J(Nt)))}return T.events.on(`menuopenchange`,e),()=>{T.events.off(`menuopenchange`,e)}},[b,T.events,I]),t.useEffect(()=>{if(b.select(`floatingParentNodeId`)==null)return;function e(e){if(e.open||e.nodeId!==b.select(`floatingParentNodeId`))return;let t=e.reason??`sibling-open`;b.setOpen(!1,J(t))}return T.events.on(`menuopenchange`,e),()=>{T.events.off(`menuopenchange`,e)}},[T.events,b]);let ce=Xs();t.useEffect(()=>{D||ce.clear()},[D,ce]),t.useEffect(()=>{function e(e){if(!(!D||e.nodeId!==b.select(`floatingParentNodeId`)))if(e.target&&A&&A!==e.target){let e=b.select(`closeDelay`);e>0?ce.isStarted()||ce.start(e,()=>{b.setOpen(!1,J(Nt))}):b.setOpen(!1,J(Nt))}else ce.clear()}return T.events.on(`itemhover`,e),()=>{T.events.off(`itemhover`,e)}},[T.events,D,A,b,ce]),t.useEffect(()=>{let e={open:D,nodeId:I,parentNodeId:R,reason:b.select(`lastOpenChangeReason`)};T.events.emit(`menuopenchange`,e)},[T.events,D,b,I,R]),L(()=>{let e=ee,t=z.current;if(e&&(z.current=e),t&&e&&e!==t){b.set(`instantType`,void 0);let e=new AbortController;return B(()=>{b.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[ee,B,b]);let le={open:D,side:se.side,align:se.align,anchorHidden:se.anchorHidden,nested:C.type===`menu`,instant:N},W=C.type===`menubar`&&C.context.modal;Hh(D&&(W||O&&F!==`trigger-hover`),k===`touch`,M,A);let G=Bh(e,le,{styles:se.positionerStyles,transitionStatus:j,props:y,refs:[r,b.useStateSetter(`positionerElement`)],hidden:!E,inert:!D}),ue=E&&C.type!==`menu`&&(C.type!==`menubar`&&O&&F!==`trigger-hover`||C.type===`menubar`&&C.context.modal),de=null;return C.type===`menubar`?de=C.context.contentElement:C.type===void 0&&(de=A),(0,n.jsxs)(U_.Provider,{value:se,children:[ue&&(0,n.jsx)(vp,{ref:C.type===`context-menu`||C.type===`nested-context-menu`?C.context.internalBackdropRef:null,inert:gp(!D),cutout:de}),(0,n.jsx)(sl,{id:I,children:(0,n.jsx)(H,{elementsRef:b.context.itemDomElements,labelsRef:b.context.itemLabels,children:G})})]})}),process.env.NODE_ENV!==`production`&&(kv.displayName=`MenuPositioner`)}));function Zte(){let e=t.useContext(jv);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(34):`Base UI: MenuRadioGroupContext is missing. MenuRadioGroup parts must be placed within <Menu.RadioGroup>.`);return e}var jv,Mv=m((()=>{G(),jv=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(jv.displayName=`MenuRadioGroupContext`)})),Nv,Pv=m((()=>{E(),F(),Mv(),q(),Nv=t.memo(t.forwardRef(function(e,r){let{render:i,className:a,value:o,defaultValue:s,onValueChange:c,disabled:l=!1,style:u,...d}=e,[f,p]=w({controlled:o,default:s,name:`MenuRadioGroup`}),m=A(c),h=A((e,t)=>{m?.(e,t),!t.isCanceled&&p(e)}),g=K(`div`,e,{state:{disabled:l},ref:r,props:{role:`group`,"aria-disabled":l||void 0,...d}}),_=t.useMemo(()=>({value:f,setValue:h,disabled:l}),[f,h,l]);return(0,n.jsx)(jv.Provider,{value:_,children:g})})),process.env.NODE_ENV!==`production`&&(Nv.displayName=`MenuRadioGroup`)}));function Qte(){let e=t.useContext(Fv);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(35):`Base UI: MenuRadioItemContext is missing. MenuRadioItem parts must be placed within <Menu.RadioItem>.`);return e}var Fv,Iv=m((()=>{G(),Fv=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Fv.displayName=`MenuRadioItemContext`)})),Lv,Rv=m((()=>{F(),q_(),q(),$t(),Mv(),Iv(),av(),kn(),tv(),W_(),Vt(),zt(),Lv=t.forwardRef(function(e,r){let{render:i,className:a,id:o,label:s,nativeButton:c=!1,disabled:l=!1,closeOnClick:u=!1,value:d,style:f,...p}=e,m=Dn({label:s}),h=H_(!0),g=Qt(o),{store:_}=G_(),v=_.useState(`isActive`,m.index),y=_.useState(`itemProps`),{value:b,setValue:x,disabled:S}=Zte(),C=S||l,w=b===d,{getItemProps:T,itemRef:E}=$_({closeOnClick:u,disabled:C,highlighted:v,id:g,store:_,nativeButton:c,nodeId:h?.context.nodeId,itemMetadata:ev}),D=t.useMemo(()=>({disabled:C,highlighted:v,checked:w}),[C,v,w]),O=K(`div`,e,{state:D,stateAttributesMapping:iv,props:[y,{role:`menuitemradio`,"aria-checked":w,onClick:A(e=>{x(d,{...J(pt,e.nativeEvent),preventUnmountOnClose:()=>{}})})},p,T],ref:[E,r,m.ref]});return(0,n.jsx)(Fv.Provider,{value:D,children:O})}),process.env.NODE_ENV!==`production`&&(Lv.displayName=`MenuRadioItem`)})),zv,Bv=m((()=>{Iv(),q(),av(),xn(),$a(),zv=t.forwardRef(function(e,n){let{render:r,className:i,style:a,keepMounted:o=!1,...s}=e,c=Qte(),l=t.useRef(null),{transitionStatus:u,setMounted:d}=bn(c.checked);return Qa({open:c.checked,ref:l,onComplete(){c.checked||d(!1)}}),K(`span`,e,{state:{checked:c.checked,disabled:c.disabled,highlighted:c.highlighted,transitionStatus:u},stateAttributesMapping:iv,ref:[n,l],props:{"aria-hidden":!0,...s},enabled:o||c.checked})}),process.env.NODE_ENV!==`production`&&(zv.displayName=`MenuRadioItemIndicator`)}));function Vv(e){let n=t.useContext(Hv);if(n===null&&!e)throw Error(process.env.NODE_ENV===`production`?W(5):`Base UI: MenubarContext is missing. Menubar parts must be placed within <Menubar>.`);return n}var Hv,Uv=m((()=>{G(),Hv=t.createContext(null),process.env.NODE_ENV!==`production`&&(Hv.displayName=`MenubarContext`)}));function $te(){return{...Nd(),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new il,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:ke,keyboardEventRelay:void 0,closeDelay:0,hasViewport:!1}}var Wv,Gv,Kv=m((()=>{bd(),Ae(),k(),al(),Ld(),Wv={...Fd,disabled:Z(e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled),modal:Z(e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0)),openMethod:Z(e=>e.openMethod),allowMouseEnter:Z(e=>e.allowMouseEnter),stickIfOpen:Z(e=>e.stickIfOpen),parent:Z(e=>e.parent),rootId:Z(e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId),activeIndex:Z(e=>e.activeIndex),isActive:Z((e,t)=>e.activeIndex===t),hoverEnabled:Z(e=>e.hoverEnabled),instantType:Z(e=>e.instantType),lastOpenChangeReason:Z(e=>e.openChangeReason),floatingTreeRoot:Z(e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot),floatingNodeId:Z(e=>e.floatingNodeId),floatingParentNodeId:Z(e=>e.floatingParentNodeId),itemProps:Z(e=>e.itemProps),closeDelay:Z(e=>e.closeDelay),hasViewport:Z(e=>e.hasViewport),keyboardEventRelay:Z(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)})},Gv=class e extends hd{constructor(e){super({...$te(),...e},{positionerRef:t.createRef(),popupRef:t.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:t.createRef(),beforeContentFocusGuardRef:t.createRef(),onOpenChangeComplete:void 0,triggerElements:new kd},Wv),this.unsubscribeParentListener=this.observe(`parent`,e=>{if(this.unsubscribeParentListener?.(),e.type===`menu`){let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);this.unsubscribeParentListener=e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);t===i&&n===a&&r===o||(t=i,n=a,r=o,this.notifyAll())}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}static useStore(t,n){let r=D(()=>new e(n)).current;return t??r}unsubscribeParentListener=null}}));function qv(){return t.useContext(Jv)}var Jv,Yv=m((()=>{Jv=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Jv.displayName=`MenuSubmenuRootContext`)})),Xv,Zv=m((()=>{$s(),F(),Zt(),R(),Ys(),Ae(),sd(),Of(),q_(),Uv(),Yc(),ce(),Mf(),Vt(),zt(),V_(),$e(),Kv(),Ld(),Yv(),Xv=nd(function(e){let{children:r,open:i,onOpenChange:a,onOpenChangeComplete:o,defaultOpen:s=!1,disabled:c=!1,modal:l,loopFocus:u=!0,orientation:d=`vertical`,actionsRef:f,closeParentOnEsc:p=!1,handle:m,triggerId:h,defaultTriggerId:g=null,highlightItemOnHover:_=!0}=e,v=z_(!0),y=G_(!0),b=Vv(!0),x=qv(),S=t.useMemo(()=>x&&y?{type:`menu`,store:y.store}:b?{type:`menubar`,context:b}:v&&!y?{type:`context-menu`,context:v}:{type:void 0},[v,y,b,x]),C=Gv.useStore(m?.store,{open:s,openProp:i,activeTriggerId:g,triggerIdProp:h,parent:S});Js(()=>{i===void 0&&C.state.open===!1&&s===!0&&C.update({open:!0,activeTriggerId:g})}),C.useControlledProp(`openProp`,i),C.useControlledProp(`triggerIdProp`,h),C.useContextCallback(`onOpenChangeComplete`,o);let w=C.useState(`floatingTreeRoot`),T=ol(w),E=dl();L(()=>{v&&!y?C.update({parent:{type:`context-menu`,context:v},floatingNodeId:T,floatingParentNodeId:E}):y&&C.update({floatingNodeId:T,floatingParentNodeId:E})},[v,y,T,E,C]);let D=C.useState(`open`),O=C.useState(`activeTriggerElement`),k=C.useState(`positionerElement`),j=C.useState(`hoverEnabled`),M=C.useState(`disabled`),N=C.useState(`lastOpenChangeReason`),P=C.useState(`parent`),F=C.useState(`activeIndex`),I=C.useState(`payload`),R=C.useState(`floatingParentNodeId`),ee=t.useRef(null),z=R!=null;process.env.NODE_ENV!==`production`&&P.type!==void 0&&l!==void 0&&console.warn("Base UI: The `modal` prop is not supported on nested menus. It will be ignored.");let{openMethod:B,triggerProps:V}=jf(D);C.useSyncedValues({disabled:c,modal:P.type===void 0?l:void 0,openMethod:B,rootId:Jt()}),Ed(C);let{forceUnmount:te}=Dd(D,C,()=>{C.update({allowMouseEnter:!1,stickIfOpen:!0})}),ne=t.useRef(P.type!==`context-menu`),H=Xs();t.useEffect(()=>{if(D||(ee.current=null),P.type===`context-menu`){if(!D){H.clear(),ne.current=!1;return}H.start(500,()=>{ne.current=!0})}},[H,D,P.type]),L(()=>{!D&&!j&&C.set(`hoverEnabled`,!0)},[D,j,C]);let re=t.useRef(!0),ie=Xs(),U=A((e,t)=>{let n=t.reason;if(D===e&&t.trigger===O&&N===n||(t.preventUnmountOnClose=()=>{C.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&(t.trigger=O??void 0),a?.(e,t),t.isCanceled))return;C.state.floatingRootContext.dispatchOpenChange(e,t);let r=t.event;if(e===!1&&r?.type===`click`&&r.pointerType===`touch`&&!re.current)return;if(!e&&F!==null){let e=C.context.itemDomElements.current[F];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}e&&n===`trigger-focus`?(re.current=!1,ie.start(300,()=>{re.current=!0})):(re.current=!0,ie.clear());let i=(n===`trigger-press`||n===`item-press`)&&r.detail===0&&r?.isTrusted,o=!e&&(n===`escape-key`||n==null),s={open:e,openChangeReason:n};ee.current=t.event??null;let c=t.trigger?.id??null;(c||e)&&(s.activeTriggerId=c,s.activeTriggerElement=t.trigger??null),C.update(s),P.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?C.set(`instantType`,`group`):i||o?C.set(`instantType`,i?`click`:`dismiss`):C.set(`instantType`,void 0)}),ae=t.useCallback(()=>{C.setOpen(!1,J(Ft))},[C]);t.useImperativeHandle(f,()=>({unmount:te,close:ae}),[te,ae]);let se;P.type===`context-menu`&&(se=P.context),t.useImperativeHandle(se?.positionerRef,()=>k,[k]),t.useImperativeHandle(se?.actionsRef,()=>({setOpen:U}),[U]);let ce=Hd({popupStore:C,onOpenChange:U}),le=ce.context.events;t.useEffect(()=>{let e=({open:e,eventDetails:t})=>U(e,t);return le.on(`setOpen`,e),()=>{le?.off(`setOpen`,e)}},[le,U]);let W=Sl(ce,{enabled:!M,bubbles:{escapeKey:p&&P.type===`menu`},outsidePress(){return P.type!==`context-menu`||ee.current?.type===`contextmenu`?!0:ne.current},externalTree:z?w:void 0}),G=_f(ce,{role:`menu`}),ue=oe(),de=t.useCallback(e=>{C.select(`activeIndex`)!==e&&C.set(`activeIndex`,e)},[C]),fe=mf(ce,{enabled:!M,listRef:C.context.itemDomElements,activeIndex:F,nested:P.type!==void 0,loopFocus:u,orientation:d,parentOrientation:P.type===`menubar`?P.context.orientation:void 0,rtl:ue===`rtl`,disabledIndices:Oe,onNavigate:de,openOnArrowKeyDown:P.type!==`context-menu`,externalTree:z?w:void 0,focusItemOnHover:_}),pe=t.useCallback(e=>{C.context.typingRef.current=e},[C]),{getReferenceProps:me,getFloatingProps:he,getItemProps:ge,getTriggerProps:_e}=af([W,G,fe,bf(ce,{listRef:C.context.itemLabels,elementsRef:C.context.itemDomElements,activeIndex:F,resetMs:500,onMatch:e=>{D&&e!==F&&C.set(`activeIndex`,e)},onTypingChange:pe})]),ve=t.useMemo(()=>{let e=Le(me(),{onMouseMove(){C.set(`allowMouseEnter`,!0)}},V);return delete e.role,e},[me,C,V]),ye=t.useMemo(()=>{let e=_e();if(!e)return e;let t=Le(e,V);return delete t.role,delete t[`aria-controls`],t},[_e,V]),be=t.useMemo(()=>he({onMouseMove(){C.set(`allowMouseEnter`,!0),P.type===`menu`&&C.set(`hoverEnabled`,!1)},onClick(){C.select(`hoverEnabled`)&&C.set(`hoverEnabled`,!1)},onKeyDown(e){let t=C.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}}),[he,P.type,C]),xe=t.useMemo(()=>ge(),[ge]);C.useSyncedValues({floatingRootContext:ce,activeTriggerProps:ve,inactiveTriggerProps:ye,popupProps:be,itemProps:xe});let Se=t.useMemo(()=>({store:C,parent:S}),[C,S]),Ce=(0,n.jsx)(K_.Provider,{value:Se,children:typeof r==`function`?r({payload:I}):r});return P.type===void 0||P.type===`context-menu`?(0,n.jsx)(cl,{externalTree:w,children:Ce}):Ce}),process.env.NODE_ENV!==`production`&&(Xv.displayName=`MenuRoot`)}));function ene(e){let r=G_().store,i=t.useMemo(()=>({parentMenu:r}),[r]);return(0,n.jsx)(Jv.Provider,{value:i,children:(0,n.jsx)(Xv,{...e})})}var Qv=m((()=>{Zv(),q_(),Yv()}));function $v(e={}){let{highlightItemOnHover:n,highlightedIndex:r,onHighlightedIndexChange:i}=br(),{ref:a,index:o}=Dn(e),s=r===o,c=t.useRef(null),l=pe(a,c);return{compositeProps:t.useMemo(()=>({tabIndex:s?0:-1,onFocus(){i(o)},onMouseMove(){let e=c.current;if(!n||!e)return;let t=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!s&&!t&&e.focus()}}),[s,i,o,n]),compositeRef:l,index:o}}var ey=m((()=>{ye(),Sr(),kn()}));function ty(e){let{render:t,className:n,style:r,state:i=ke,props:a=Oe,refs:o=Oe,metadata:s,stateAttributesMapping:c,tag:l=`div`,...u}=e,{compositeProps:d,compositeRef:f}=$v({metadata:s});return K(l,e,{state:i,ref:[...o,f],props:[d,...a,u],stateAttributesMapping:c})}var ny=m((()=>{Ae(),q(),ey()}));function ry(e){if(er(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`)??void 0;if(!cr(e))return ry(dr(e))}var iy=m((()=>{yr()}));function ay(e,n){let i=t.useRef(null);return{preFocusGuardRef:i,handlePreFocusGuardFocus:A(t=>{r.flushSync(()=>{e.setOpen(!1,J(Tt,t.nativeEvent,t.currentTarget))}),_ee(i.current)?.focus()}),handleFocusTargetFocus:A(t=>{let i=e.select(`positionerElement`);if(i&&va(t,i))e.context.beforeContentFocusGuardRef.current?.focus();else{r.flushSync(()=>{e.setOpen(!1,J(Tt,t.nativeEvent,t.currentTarget))});let a=gee(e.context.triggerFocusTargetRef.current||n.current);for(;a!==null&&Jr(i,a);){let e=a;if(a=ha(a),a===e)break}a?.focus()}})}}var oy=m((()=>{F(),Sa(),Vt(),zt()}));function tne(e){let{enabled:n=!0,mouseDownAction:r,open:i}=e,a=t.useRef(!1);return t.useMemo(()=>n?{onMouseDown:e=>{(r===`open`&&!i||r===`close`&&i)&&(a.current=!0,ta(e.currentTarget).addEventListener(`click`,()=>{a.current=!1},{once:!0}))},onClick:e=>{a.current&&(a.current=!1,e.preventBaseUIHandler())}}:ke,[n,r,i])}var nne=m((()=>{na(),Ae()}));function rne(e,n){let r=Xs(),[i,a]=t.useState(!1);return L(()=>{e&&n===`trigger-hover`?(a(!0),r.start(500,()=>{a(!1)})):e||(r.clear(),a(!1))},[e,n,r]),i}function ine(){let e=z_(!0),n=G_(!0),r=Vv(!0);return t.useMemo(()=>r?{type:`menubar`,context:r}:e&&!n?{type:`context-menu`,context:e}:{type:void 0},[e,n,r])}var sy,cy,ane=m((()=>{G(),$s(),na(),sd(),F(),R(),Ae(),Of(),al(),Sa(),q_(),ep(),q(),Er(),Fm(),ny(),Sr(),iy(),Ld(),oy(),$t(),zt(),nne(),V_(),Uv(),Yc(),xc(),sy=2,cy=rd(function(e,r){let{render:i,className:a,disabled:o=!1,nativeButton:s=!0,id:c,openOnHover:l,delay:u=100,closeDelay:d=0,handle:f,payload:p,style:m,...h}=e,g=G_(!0),_=f?.store??g?.store;if(!_)throw Error(process.env.NODE_ENV===`production`?W(85):`Base UI: <Menu.Trigger> must be either used within a <Menu.Root> component or provided with a handle.`);let v=Qt(c),y=_.useState(`isTriggerActive`,v),b=_.useState(`floatingRootContext`),x=_.useState(`isOpenedByTrigger`,v),S=t.useRef(null),C=ine(),w=br(!0),T=fl(),E=t.useMemo(()=>T??new il,[T]),{registerTrigger:D,isMountedByThisTrigger:O}=Td(v,S,_,{payload:p,closeDelay:d,parent:C,floatingTreeRoot:E,floatingNodeId:ol(E),floatingParentNodeId:dl(),keyboardEventRelay:w?.relayKeyboardEvent}),k=C.type===`menubar`,j=_.useState(`disabled`),M=o||j||k&&C.context.disabled,{getButtonProps:N,buttonRef:P}=wr({disabled:M,native:s});t.useEffect(()=>{!x&&C.type===void 0&&(_.context.allowMouseUpTriggerRef.current=!1)},[_,x,C.type]);let F=t.useRef(null),I=Xs(),L=A(e=>{if(!F.current)return;I.clear(),_.context.allowMouseUpTriggerRef.current=!1;let t=e.target;if(Jr(F.current,t)||Jr(_.select(`positionerElement`),t)||t===F.current||t!=null&&ry(t)===_.select(`rootId`))return;let n=Pm(F.current);e.clientX>=n.left-sy&&e.clientX<=n.right+sy&&e.clientY>=n.top-sy&&e.clientY<=n.bottom+sy||E.events.emit(`close`,{domEvent:e,reason:Mt})});t.useEffect(()=>{x&&_.select(`lastOpenChangeReason`)===`trigger-hover`&&ta(F.current).addEventListener(`mouseup`,L,{once:!0})},[x,L,_]);let R=k&&C.context.hasSubmenuOpen,ee=tf(b,{enabled:(l??R)&&!M&&C.type!==`context-menu`&&(!k||R&&!O),handleClose:wf({blockPointerEvents:!k}),mouseOnly:!0,move:!1,restMs:C.type===void 0?u:void 0,delay:{close:d},triggerElementRef:S,externalTree:E,isActiveTrigger:y,isClosing:()=>_.select(`transitionStatus`)===`ending`}),z=rne(x,_.select(`lastOpenChangeReason`)),B=bl(b,{enabled:!M&&C.type!==`context-menu`,event:x&&k?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:C.type===void 0?z:!1}),V=Wd(b,{enabled:!M&&R}),te=tne({open:x,enabled:k,mouseDownAction:`open`}),ne=af([B,V]),H={disabled:M,open:x},re=_.useState(`triggerProps`,O),ie=[F,r,P,D,S],U=[ne.getReferenceProps(),ee??ke,re,{"aria-haspopup":`menu`,id:v,onMouseDown:e=>{_.select(`open`)||(I.start(200,()=>{_.context.allowMouseUpTriggerRef.current=!0}),ta(e.currentTarget).addEventListener(`mouseup`,L,{once:!0}))}},k?{role:`menuitem`}:{},te,h,N],{preFocusGuardRef:ae,handlePreFocusGuardFocus:oe,handleFocusTargetFocus:se}=ay(_,S),ce=K(`button`,e,{enabled:!k,stateAttributesMapping:Qf,state:H,ref:ie,props:U});return k?(0,n.jsx)(ty,{tag:`button`,render:i,className:a,style:m,state:H,refs:ie,props:U,stateAttributesMapping:Qf}):x?(0,n.jsxs)(t.Fragment,{children:[(0,n.jsx)(bc,{ref:ae,onFocus:oe},`${v}-pre-focus-guard`),(0,n.jsx)(t.Fragment,{children:ce},v),(0,n.jsx)(bc,{ref:_.context.triggerFocusTargetRef,onFocus:se},`${v}-post-focus-guard`)]}):(0,n.jsx)(t.Fragment,{children:ce},v)}),process.env.NODE_ENV!==`production`&&(cy.displayName=`MenuTrigger`)}));function ly(e){let[n,r]=t.useState({current:e,previous:null});return e!==n.current&&r({current:e,previous:n.current}),n.previous}var uy=m((()=>{}));function dy(e){let t=lr(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=er(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r;return(Ni(n)!==a||Ni(r)!==o)&&(n=a,r=o),{width:n,height:r}}var fy=m((()=>{Vi(),yr()}));function one(e){let{popupElement:n,positionerElement:r,content:i,mounted:a,enabled:o=_y,onMeasureLayout:s,onMeasureLayoutComplete:c,side:l,direction:u}=e,d=vn(n,!0,!1),f=rn(),p=t.useRef(null),m=t.useRef(null),h=t.useRef(!0),g=t.useRef(De),_=A(s),v=A(c),y=t.useMemo(()=>{let e=l===`top`,t=l===`left`;return u===`rtl`?(e||=l===`inline-end`,t||=l===`inline-end`):(e||=l===`inline-start`,t||=l===`inline-start`),e?{position:`absolute`,[l===`top`?`bottom`:`top`]:`0`,[t?`right`:`left`]:`0`}:ke},[l,u]);L(()=>{if(!a||!o()||typeof ResizeObserver!=`function`){g.current=De,h.current=!0,p.current=null,m.current=null;return}if(!n||!r)return;g.current=my(n,y);let e=new ResizeObserver(e=>{let t=e[0];t&&(m.current={width:Math.ceil(t.borderBoxSize[0].inlineSize),height:Math.ceil(t.borderBoxSize[0].blockSize)})});e.observe(n),hy(n,`auto`);let t=py(n,`position`,`static`),i=py(n,`transform`,`none`),s=py(n,`scale`,`1`),c=my(r,{"--available-width":`max-content`,"--available-height":`max-content`});function l(){t(),i(),c()}function u(){l(),s()}if(_?.(),h.current||p.current===null){gy(r,`max-content`);let t=dy(n);return p.current=t,gy(r,t),u(),v?.(null,t),h.current=!1,()=>{e.disconnect(),g.current(),g.current=De}}hy(n,`auto`),gy(r,`max-content`);let b=p.current??m.current,x=dy(n);if(p.current=x,!b)return gy(r,x),u(),v?.(null,x),()=>{e.disconnect(),f.cancel(),g.current(),g.current=De};hy(n,b),u(),v?.(b,x),gy(r,x);let S=new AbortController;return f.request(()=>{hy(n,x),d(()=>{n.style.setProperty(`--popup-width`,`auto`),n.style.setProperty(`--popup-height`,`auto`)},S.signal)}),()=>{e.disconnect(),S.abort(),f.cancel(),g.current(),g.current=De}},[i,n,r,d,f,o,a,_,v,y])}function py(e,t,n){let r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r)}}function my(e,t){let n=[];for(let[r,i]of Object.entries(t))n.push(py(e,r,i));return n.length?()=>{n.forEach(e=>e())}:De}function hy(e,t){let n=t===`auto`?`auto`:`${t.width}px`,r=t===`auto`?`auto`:`${t.height}px`;e.style.setProperty(`--popup-width`,n),e.style.setProperty(`--popup-height`,r)}function gy(e,t){let n=t===`max-content`?`max-content`:`${t.width}px`,r=t===`max-content`?`max-content`:`${t.height}px`;e.style.setProperty(`--positioner-width`,n),e.style.setProperty(`--positioner-height`,r)}var _y,sne=m((()=>{un(),R(),F(),Ae(),yn(),fy(),_y=()=>!0})),cne=m((()=>{ce()})),vy=m((()=>{cne()}));function lne(e){let{store:i,side:a,cssVars:o,children:s}=e,c=oe(),l=i.useState(`activeTriggerElement`),u=i.useState(`activeTriggerId`),d=i.useState(`open`),f=i.useState(`payload`),p=i.useState(`mounted`),m=i.useState(`popupElement`),h=i.useState(`positionerElement`),g=ly(d?l:null),_=fne(u,f),v=t.useRef(null),[y,b]=t.useState(null),[x,S]=t.useState(null),C=t.useRef(null),w=t.useRef(null),T=vn(C,!0,!1),E=rn(),[D,O]=t.useState(null),[k,j]=t.useState(!1);L(()=>(i.set(`hasViewport`,!0),()=>{i.set(`hasViewport`,!1)}),[i]);let M=A(()=>{C.current?.style.setProperty(`animation`,`none`),C.current?.style.setProperty(`transition`,`none`),w.current?.style.setProperty(`display`,`none`)}),N=A(e=>{C.current?.style.removeProperty(`animation`),C.current?.style.removeProperty(`transition`),w.current?.style.removeProperty(`display`),e&&O(e)}),P=t.useRef(null);L(()=>{l&&g&&l!==g&&P.current!==l&&v.current&&(b(v.current),j(!0),S(dne(g,l)),E.request(()=>{r.flushSync(()=>{j(!1)}),T(()=>{b(null),O(null),v.current=null})}),P.current=l)},[l,g,y,T,E]),L(()=>{let e=C.current;if(!e)return;let t=ta(e).createElement(`div`);for(let n of Array.from(e.childNodes))t.appendChild(n.cloneNode(!0));v.current=t});let F=y!=null,I;I=F?(0,n.jsxs)(t.Fragment,{children:[(0,n.jsx)(`div`,{"data-previous":!0,inert:gp(!0),ref:w,style:{...D?{[o.popupWidth]:`${D.width}px`,[o.popupHeight]:`${D.height}px`}:null,position:`absolute`},"data-ending-style":k?void 0:``},`previous`),(0,n.jsx)(`div`,{"data-current":!0,ref:C,"data-starting-style":k?``:void 0,children:s},_)]}):(0,n.jsx)(`div`,{"data-current":!0,ref:C,children:s},_),L(()=>{let e=w.current;!e||!y||e.replaceChildren(...Array.from(y.childNodes))},[y]),one({popupElement:m,positionerElement:h,mounted:p,content:f,onMeasureLayout:M,onMeasureLayoutComplete:N,side:a,direction:c});let R={activationDirection:une(x),transitioning:F};return{children:I,state:R}}function une(e){if(e)return`${yy(e.horizontal,5,`right`,`left`)} ${yy(e.vertical,5,`down`,`up`)}`}function yy(e,t,n,r){return e>t?n:e<-t?r:``}function dne(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i={x:n.left+n.width/2,y:n.top+n.height/2},a={x:r.left+r.width/2,y:r.top+r.height/2};return{horizontal:a.x-i.x,vertical:a.y-i.y}}function fne(e,n){let[r,i]=t.useState(0),a=t.useRef(e),o=t.useRef(n),s=t.useRef(!1);return L(()=>{let t=a.current,r=o.current,c=e!==t,l=n!==r;c?(i(e=>e+1),s.current=!l):s.current&&l&&(i(e=>e+1),s.current=!1),a.current=e,o.current=n},[e,n]),`${e??`current`}-${r}`}var by=m((()=>{_p(),un(),uy(),R(),F(),na(),yn(),sne(),vy()})),xy,Sy=m((()=>{G(),qn(),R(),B(),Kt(),Of(),q_(),$t(),ep(),kn(),tv(),q(),W_(),Ld(),Yv(),xy=t.forwardRef(function(e,n){let{render:r,className:i,label:a,id:o,nativeButton:s=!1,openOnHover:c=!0,delay:l=100,closeDelay:u=0,disabled:d=!1,style:f,...p}=e,m=Dn(),h=H_(),{store:g}=G_(),_=Qt(o),v=g.useState(`open`),y=g.useState(`floatingRootContext`),b=g.useState(`floatingTreeRoot`),x=wd(_,g),S=t.useCallback(e=>{let t=x(e);return e!==null&&g.select(`open`)&&g.select(`activeTriggerId`)==null&&g.update({activeTriggerId:_,activeTriggerElement:e,closeDelay:u}),t},[x,u,g,_]),C=t.useRef(null),w=t.useCallback(e=>{C.current=e,g.set(`activeTriggerElement`,e)},[g]);process.env.NODE_ENV!==`production`&&L(()=>{let e=C.current;e&&Kn(e)&&!d&&ee(`A disabled element was detected on <Menu.SubmenuTrigger>. To properly disable the trigger, use the \`disabled\` prop on the component instead of setting it on the rendered element.${Gt.captureOwnerStack?.()||``}`)});let T=qv();if(!T?.parentMenu)throw Error(process.env.NODE_ENV===`production`?W(37):`Base UI: <Menu.SubmenuTrigger> must be placed in <Menu.SubmenuRoot>.`);g.useSyncedValue(`closeDelay`,u);let E=T.parentMenu,D=E.useState(`itemProps`),O=E.useState(`isActive`,m.index),k=t.useMemo(()=>({type:`submenu-trigger`,setActive(){E.set(`activeIndex`,m.index)}}),[E,m.index]),A=g.useState(`disabled`),j=d||A,{getItemProps:M,itemRef:N}=$_({closeOnClick:!1,disabled:j,highlighted:O,id:_,store:g,typingRef:E.context.typingRef,nativeButton:s,itemMetadata:k,nodeId:h?.context.nodeId}),P=g.useState(`hoverEnabled`),F=E.useState(`allowMouseEnter`),I=tf(y,{enabled:P&&c&&!j,handleClose:wf({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:l,delay:F?{open:l,close:u}:0,triggerElementRef:C,externalTree:b,isClosing:()=>g.select(`transitionStatus`)===`ending`}),R=af([bl(y,{enabled:!j,event:`mousedown`,toggle:!c,ignoreMouse:c,stickIfOpen:!1})]),z=g.useState(`triggerProps`,!0);return delete z.id,K(`div`,e,{state:{disabled:j,highlighted:O,open:v},stateAttributesMapping:Zf,props:[R.getReferenceProps(),I,z,D,{tabIndex:v||O?0:-1,onBlur(){O&&E.set(`activeIndex`,null)}},p,M],ref:[n,m.ref,N,S,w]})}),process.env.NODE_ENV!==`production`&&(xy.displayName=`MenuSubmenuTrigger`)})),pne=m((()=>{W_(),q_(),q(),ep(),_n(),V_(),zt(),sv(),lv(),mv(),gv(),vv(),$t(),kn(),Q_(),Dr(),$e(),wv(),Ov(),Av(),Pv(),Rv(),Bv(),Zv(),Qv(),ane(),by(),hg(),Sy(),G(),Vt(),Kv()})),Cy=m((()=>{pne()})),mne=m((()=>{Zt(),V_(),Cy(),q_(),qa(),na(),$s(),Sa(),q(),Vt(),ep(),zt(),iy(),_n(),Ov(),Av(),wv(),W_(),mv(),gv(),vv(),sv(),lv(),$t(),kn(),Q_(),Dr(),$e(),Pv(),Rv(),Bv(),Qv(),Sy(),hg()}));function wy(){return t.useContext(Ty)??Ey}var Ty,Ey,Dy=m((()=>{Ty=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Ty.displayName=`CSPContext`),Ey={disableStyleElements:!1}})),hne=m((()=>{Dy()})),gne=m((()=>{rp(),ap(),sp(),hp(),xp(),Uf(),kp(),Cp(),Tp(),Bf(),Vt(),zt()})),Oy=m((()=>{gne()})),ky,Ay=m((()=>{ky=function(e){return e.nestedDrawers=`--nested-drawers`,e.height=`--drawer-height`,e.frontmostHeight=`--drawer-frontmost-height`,e.swipeMovementX=`--drawer-swipe-movement-x`,e.swipeMovementY=`--drawer-swipe-movement-y`,e.snapPointOffset=`--drawer-snap-point-offset`,e.swipeStrength=`--drawer-swipe-strength`,e}({})})),jy,My=m((()=>{jy=function(e){return e.swipeProgress=`--drawer-swipe-progress`,e}({})})),Ny,Py,Fy=m((()=>{Lf(),q(),ep(),_n(),Ay(),My(),Ny={...$f,...gn},Py=t.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,{store:s}=Ff(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return K(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:Ny,props:[{role:`presentation`,hidden:!u,style:{pointerEvents:c?void 0:`none`,userSelect:`none`,WebkitUserSelect:`none`,[jy.swipeProgress]:`0`,[ky.swipeStrength]:`1`}},o],enabled:a||!l})}),process.env.NODE_ENV!==`production`&&(Py.displayName=`DrawerBackdrop`)})),Iy,Ly=m((()=>{ap(),Iy=ip})),Ry,zy=m((()=>{Ry=`data-drawer-content`})),By,Vy=m((()=>{Lf(),q(),zy(),By=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return Ff(),K(`div`,e,{ref:t,props:[{[Ry]:``},a]})}),process.env.NODE_ENV!==`production`&&(By.displayName=`DrawerContent`)})),Hy,Uy=m((()=>{sp(),Hy=op}));function Wy(e){let n=t.useContext(Gy);if(e===!1&&n===void 0)throw Error(process.env.NODE_ENV===`production`?W(91):`Base UI: DrawerProviderContext is missing. Use <Drawer.Provider>.`);return n}var Gy,Ky=m((()=>{G(),Gy=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Gy.displayName=`DrawerProviderContext`)})),qy,Jy,Yy=m((()=>{R(),q(),Ky(),My(),Ay(),qy={active(e){return e?{"data-active":``}:{"data-inactive":``}}},Jy=t.forwardRef(function(e,n){let{render:r,className:i,style:a,...o}=e,s=Wy(!0),c=s?.active??!1,l=s?.visualStateStore,u=t.useRef(null);return L(()=>{let e=u.current;if(!e||!l)return;let t=()=>{let{swipeProgress:t,frontmostHeight:n}=l.getSnapshot();t<=0?e.style.setProperty(jy.swipeProgress,`0`):e.style.setProperty(jy.swipeProgress,`${t}`),n<=0?e.style.removeProperty(ky.height):e.style.setProperty(ky.height,`${n}px`)};t();let n=l.subscribe(t);return()=>{n(),e.style.setProperty(jy.swipeProgress,`0`),e.style.removeProperty(ky.height)}},[l]),K(`div`,e,{ref:[n,u],state:{active:c},props:[{style:{[jy.swipeProgress]:`0`}},o],stateAttributesMapping:qy})}),process.env.NODE_ENV!==`production`&&(Jy.displayName=`DrawerIndent`)})),Xy,Zy,Qy=m((()=>{q(),Ky(),Xy={active(e){return e?{"data-active":``}:{"data-inactive":``}}},Zy=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return K(`div`,e,{ref:t,state:{active:Wy(!0)?.active??!1},props:a,stateAttributesMapping:Xy})}),process.env.NODE_ENV!==`production`&&(Zy.displayName=`DrawerIndentBackground`)})),$y,eb=m((()=>{ep(),$y=function(e){return e[e.open=Wf.open]=`open`,e[e.closed=Wf.closed]=`closed`,e[e.startingStyle=Wf.startingStyle]=`startingStyle`,e[e.endingStyle=Wf.endingStyle]=`endingStyle`,e.expanded=`data-expanded`,e.nestedDrawerOpen=`data-nested-drawer-open`,e.nestedDrawerSwiping=`data-nested-drawer-swiping`,e.swipeDismiss=`data-swipe-dismiss`,e.swipeDirection=`data-swipe-direction`,e.swiping=`data-swiping`,e}({})}));function tb(e){let n=t.useContext(nb);if(e===!1&&n===void 0)throw Error(process.env.NODE_ENV===`production`?W(90):`Base UI: DrawerRootContext is missing. Drawer parts must be placed within <Drawer.Root>.`);return n}var nb,rb=m((()=>{G(),nb=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(nb.displayName=`DrawerRootContext`)}));function ib(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}var ab=m((()=>{}));function ob(e,t,n){if(!Number.isFinite(t)||t<=0)return null;if(typeof e==`number`)return Number.isFinite(e)?e<=1?ib(e,0,1)*t:e:null;let r=e.trim();if(r.endsWith(`px`)){let e=Number.parseFloat(r);return Number.isFinite(e)?e:null}if(r.endsWith(`rem`)){let e=Number.parseFloat(r);return Number.isFinite(e)?e*n:null}return null}function sb(e,t){let n=null,r=1/0;for(let i of t){let t=Math.abs(i.height-e);t<r&&(r=t,n=i)}return n}function cb(){let{store:e}=Ff(),{snapPoints:n,activeSnapPoint:r,setActiveSnapPoint:i,popupHeight:a}=tb(),o=e.useState(`viewportElement`),[s,c]=t.useState(0),[l,u]=t.useState(16),d=A(()=>{let e=ta(o).documentElement;o&&c(o.offsetHeight),o||c(e.clientHeight);let t=parseFloat(getComputedStyle(e).fontSize);Number.isFinite(t)&&u(t)});L(()=>{if(d(),!o||typeof ResizeObserver!=`function`)return;let e=new ResizeObserver(d);return e.observe(o),()=>{e.disconnect()}},[d,o]);let f=t.useMemo(()=>{if(!n||n.length===0||s<=0||a<=0)return[];let e=Math.min(a,s);if(!Number.isFinite(e)||e<=0)return[];let t=n.map(t=>{let n=ob(t,s,l);if(n===null||!Number.isFinite(n))return null;let r=ib(n,0,e);return{value:t,height:r,offset:Math.max(0,a-r)}}).filter(e=>!!e);if(t.length<=1)return t;let r=[],i=[];for(let e=t.length-1;e>=0;--e){let n=t[e];i.some(e=>Math.abs(e-n.height)<=1)||(i.push(n.height),r.push(n))}return r.reverse(),r},[a,l,n,s]);return{snapPoints:n,activeSnapPoint:r,setActiveSnapPoint:i,popupHeight:a,viewportHeight:s,resolvedSnapPoints:f,activeSnapPointOffset:t.useMemo(()=>{if(r===void 0)return f[0];if(r===null)return;let e=f.find(e=>Object.is(e.value,r));if(e)return e;let t=Math.min(a,s),n=ob(r,s,l);if(!(n===null||!Number.isFinite(n)))return sb(ib(n,0,t),f)??void 0},[r,a,f,l,s])?.offset??null}}var lb=m((()=>{R(),F(),na(),ab(),Lf(),rb()}));function ub(e){let n=t.useContext(db);if(e===!1&&n===null)throw Error(process.env.NODE_ENV===`production`?W(92):`Base UI: DrawerViewportContext is missing. Drawer parts must be placed within <Drawer.Viewport>.`);return n}var db,fb=m((()=>{G(),db=t.createContext(null),process.env.NODE_ENV!==`production`&&(db.displayName=`DrawerViewportContext`)}));function pb(){mb||=(typeof CSS<`u`&&`registerProperty`in CSS&&([ky.swipeMovementX,ky.swipeMovementY,ky.snapPointOffset].forEach(e=>{try{CSS.registerProperty({name:e,syntax:`<length>`,inherits:!1,initialValue:`0px`})}catch{}}),[{name:jy.swipeProgress,initialValue:`0`},{name:ky.swipeStrength,initialValue:`1`}].forEach(({name:e,initialValue:t})=>{try{CSS.registerProperty({name:e,syntax:`<number>`,inherits:!1,initialValue:t})}catch{}})),!0)}var mb,hb,gb,_b=m((()=>{C(),Kt(),R(),F(),Ae(),Of(),Lf(),q(),ep(),_n(),My(),Ay(),eb(),fp(),$a(),Ga(),rb(),lb(),fb(),mb=!1,hb={...$f,...gn,expanded(e){return e?{[$y.expanded]:``}:null},nestedDrawerOpen(e){return e?{[$y.nestedDrawerOpen]:``}:null},nestedDrawerSwiping(e){return e?{[$y.nestedDrawerSwiping]:``}:null},swipeDirection(e){return e?{[$y.swipeDirection]:e}:null},swiping(e){return e?{[$y.swiping]:``}:null}},gb=t.forwardRef(function(e,r){let{className:i,finalFocus:a,initialFocus:o,render:s,style:c,...l}=e,{store:u}=Ff(),{swipeDirection:d,frontmostHeight:f,hasNestedDrawer:p,nestedSwiping:m,nestedSwipeProgressStore:h,onPopupHeightChange:g,notifyParentFrontmostHeight:_,notifyParentHasNestedDrawer:v}=tb(),y=u.useState(`descriptionElementId`),b=u.useState(`disablePointerDismissal`),S=u.useState(`floatingRootContext`),C=u.useState(`popupProps`),w=u.useState(`modal`),T=u.useState(`mounted`),E=u.useState(`nested`),D=u.useState(`nestedOpenDrawerCount`),O=u.useState(`transitionStatus`),k=u.useState(`open`),j=u.useState(`openMethod`),M=u.useState(`titleElementId`),N=u.useState(`role`),P=D>0,F=ub(!0),I=F?.swiping??!1,R=F?.swipeStrength??null,{snapPoints:ee,activeSnapPoint:z,activeSnapPointOffset:B}=cb();up();let[V,te]=t.useState(0),ne=t.useRef(0);process.env.NODE_ENV!==`production`&&t.useEffect(()=>{F||x(`<Drawer.Popup> expected to be rendered within <Drawer.Viewport>. Omitting the viewport disables drawer swipe handling and touch scroll locking. Wrap <Drawer.Popup> in <Drawer.Viewport>.${Gt.captureOwnerStack?.()||``}`)},[F]);let H=A(()=>{let e=u.context.popupRef.current;if(!e)return;let t=e.offsetHeight;if(ne.current>0&&f>ne.current&&t>ne.current)return;if(ne.current>0&&p){let e=ne.current;te(e),g(e);return}let n=t;n!==ne.current&&(ne.current=n,te(n),g(n))});L(()=>{if(!T){ne.current=0,te(0),g(0);return}let e=u.context.popupRef.current;if(!e||(pb(),H(),typeof ResizeObserver!=`function`))return;let t=new ResizeObserver(H);return t.observe(e),()=>{t.disconnect()}},[H,T,P,g,u.context.popupRef]),L(()=>{let e=u.context.popupRef,t=()=>{let t=e.current;if(!t)return;let n=h.getSnapshot();n>0?t.style.setProperty(jy.swipeProgress,`${n}`):t.style.setProperty(jy.swipeProgress,`0`)};t();let n=h.subscribe(t);return()=>{n();let t=e.current;t&&t.style.setProperty(jy.swipeProgress,`0`)}},[h,u.context.popupRef]),t.useEffect(()=>{if(k)return _?.(f),()=>{_?.(0)}},[f,k,_]),t.useEffect(()=>{if(v)return v(k||O===`ending`),()=>{v(!1)}},[v,k,O]),Qa({open:k,ref:u.context.popupRef,onComplete(){k&&u.context.onOpenChangeComplete?.(!0)}});let re=o===void 0?u.context.popupRef:o,ie={open:k,nested:E,transitionStatus:O,expanded:z===1,nestedDrawerOpen:P,nestedDrawerSwiping:m,swipeDirection:d,swiping:I},U;V&&!(!p&&O!==`ending`)&&(U=`${V}px`);let ae=ee&&ee.length>0&&(d===`down`||d===`up`),oe=null;ae&&B!==null&&(oe=d===`up`?-B:B);let se=F?F.getDragStyles():ke;if(ae&&d===`down`){let e=B??0,t=Number.parseFloat(String(se[ky.swipeMovementY]??0)),n=Number.isFinite(t)?e+t:e;if(I&&n<0&&Number.isFinite(t)){let t=-Math.sqrt(Math.abs(n))-e;se={...se,transform:void 0,[ky.swipeMovementY]:`${t}px`}}else se={...se,transform:void 0}}let ce=K(`div`,e,{state:ie,props:[C,{"aria-labelledby":M,"aria-describedby":y,role:N,tabIndex:-1,hidden:!T,onKeyDown(e){Ba.has(e.key)&&e.stopPropagation()},style:{...se,[jy.swipeProgress]:`0`,[ky.nestedDrawers]:D,[ky.height]:U,[ky.snapPointOffset]:typeof oe==`number`?`${oe}px`:`0px`,[ky.frontmostHeight]:f?`${f}px`:void 0,[ky.swipeStrength]:typeof R==`number`&&Number.isFinite(R)&&R>0?`${R}`:`1`}},l],ref:[r,u.context.popupRef,u.useStateSetter(`popupElement`)],stateAttributesMapping:hb});return(0,n.jsx)(_l,{context:S,openInteractionType:j,disabled:!T,closeOnFocusOut:!b,initialFocus:re,returnFocus:a,modal:w!==!1,restoreFocus:`popup`,children:ce})}),process.env.NODE_ENV!==`production`&&(gb.displayName=`DrawerPopup`)})),vb,yb=m((()=>{xp(),vb=bp}));function bb(e){let{children:r}=e,[i,a]=t.useState(()=>new Map),[o]=t.useState(xb),s=A((e,t)=>{a(n=>{if(n.get(e)===t)return n;let r=new Map(n);return r.set(e,t),r})}),c=A(e=>{a(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})}),l=t.useMemo(()=>{for(let e of i.values())if(e)return!0;return!1},[i]),u=t.useMemo(()=>({setDrawerOpen:s,removeDrawer:c,active:l,visualStateStore:o}),[l,c,s,o]);return(0,n.jsx)(Gy.Provider,{value:u,children:r})}function xb(){let e={swipeProgress:0,frontmostHeight:0},t=new Set;return{getSnapshot:()=>e,set(n){let r=e.swipeProgress;n.swipeProgress!==void 0&&(r=Number.isFinite(n.swipeProgress)?n.swipeProgress:0);let i=e.frontmostHeight;n.frontmostHeight!==void 0&&(i=Number.isFinite(n.frontmostHeight)?n.frontmostHeight:0),!(r===e.swipeProgress&&i===e.frontmostHeight)&&(e={swipeProgress:r,frontmostHeight:i},t.forEach(e=>{e()}))},subscribe(e){return t.add(e),()=>{t.delete(e)}}}}var Sb=m((()=>{F(),Ky()}));function Cb(e){let{children:r,open:i,defaultOpen:a=!1,onOpenChange:o,onOpenChangeComplete:s,disablePointerDismissal:c=!1,modal:l=!0,actionsRef:u,handle:d,triggerId:f,defaultTriggerId:p=null,swipeDirection:m=`down`,snapToSequentialPoints:h=!1,snapPoints:g,snapPoint:_,defaultSnapPoint:v,onSnapPointChange:y}=e,b=A(y),x=tb(!0),S=x?.onNestedSwipeProgressChange,C=x?.onNestedFrontmostHeightChange,T=x?.onNestedSwipingChange,E=x?.onNestedDrawerPresenceChange,[D,O]=t.useState(0),[k,j]=t.useState(0),[M,N]=t.useState(!1),[P,F]=t.useState(!1),[I]=t.useState(wb),L=v===void 0?g?.[0]??null:v,R=_!==void 0,[ee,z]=w({controlled:_,default:L,name:`Drawer`,state:`snapPoint`}),B=t.useRef(!1),V=A((e,t)=>{let n=t??J(`none`);b?.(e,n),!n.isCanceled&&z(e)}),te=t.useMemo(()=>R||!g||g.length===0?ee:ee===null||!g.some(e=>Object.is(e,ee))?L:ee,[ee,R,L,g]),ne=A(e=>{O(e),!B.current&&e>0&&j(e)}),H=A(e=>{if(e>0){B.current=!0,j(e);return}B.current=!1,D>0&&j(D)}),re=A(e=>{N(e)}),ie=A(e=>{I.set(e),S?.(e)}),U=A(e=>{F(e),T?.(e)}),ae=A((e,t)=>{o?.(e,t),!t.isCanceled&&!e&&g&&g.length>0&&V(L,J(t.reason,t.event,t.trigger))}),oe=t.useMemo(()=>({swipeDirection:m,snapToSequentialPoints:h,snapPoints:g,activeSnapPoint:te,setActiveSnapPoint:V,frontmostHeight:k,popupHeight:D,hasNestedDrawer:M,nestedSwiping:P,nestedSwipeProgressStore:I,onNestedDrawerPresenceChange:re,onPopupHeightChange:ne,onNestedFrontmostHeightChange:H,onNestedSwipingChange:U,onNestedSwipeProgressChange:ie,notifyParentFrontmostHeight:C,notifyParentSwipingChange:T,notifyParentSwipeProgressChange:S,notifyParentHasNestedDrawer:E}),[te,k,M,P,I,E,S,T,C,re,H,ie,U,ne,D,V,g,h,m]),se=typeof r==`function`?e=>(0,n.jsxs)(t.Fragment,{children:[Eb||=(0,n.jsx)(Tb,{}),r(e)]}):(0,n.jsxs)(t.Fragment,{children:[Db||=(0,n.jsx)(Tb,{}),r]});return(0,n.jsx)(nb.Provider,{value:oe,children:(0,n.jsx)(Hf.Provider,{value:!0,children:(0,n.jsx)(Vf,{open:i,defaultOpen:a,onOpenChange:ae,onOpenChangeComplete:s,disablePointerDismissal:c,modal:l,actionsRef:u,handle:d,triggerId:f,defaultTriggerId:p,children:se})})})}function wb(){let e=0,t=new Set;return{getSnapshot:()=>e,set(n){let r=Number.isFinite(n)?n:0;r!==e&&(e=r,t.forEach(e=>{e()}))},subscribe(e){return t.add(e),()=>{t.delete(e)}}}}function Tb(){let e=Jt(),n=Wy(!0),r=Ff(!1),i=r.store.useState(`open`),a=r.store.useState(`nestedOpenDialogCount`),o=r.store.useState(`popupElement`),s=a===0;return t.useEffect(()=>{if(!(!n||e==null))return()=>{n.removeDrawer(e)}},[e,n]),t.useEffect(()=>{e!=null&&n?.setDrawerOpen(e,i)},[e,i,n]),t.useEffect(()=>{if(!i||!s||!Ir)return;let e=Xn(o).CloseWatcher;if(!e)return;function t(e){r.store.select(`open`)&&r.store.setOpen(!1,J(Dt,e))}let n=new e,a=Ka(n,`close`,t);return()=>{a(),n.destroy()}},[r.store,s,i,o]),null}var Eb,Db,Ob=m((()=>{qa(),E(),F(),na(),zr(),Zt(),rb(),Oy(),Uf(),Vt(),zt(),Lf(),Ky()}));function kb(e,t){let n=lr(e);if(t===`vertical`){let t=n.overflowY;return(t===`auto`||t===`scroll`)&&e.scrollHeight>e.clientHeight}let r=n.overflowX;return(r===`auto`||r===`scroll`)&&e.scrollWidth>e.clientWidth}function Ab(e,t,n){let r=e;for(;r&&r!==t;){for(let e of n)if(kb(r,e))return!0;r=r.parentElement}return!1}function jb(e,t,n=`vertical`){let r=er(e)?e:null;for(;r&&r!==t;){if(kb(r,n))return r;r=r.parentElement}return kb(t,n)?t:null}var Mb=m((()=>{yr()}));function Nb(e,t,n){return typeof e?.elementFromPoint==`function`?e.elementFromPoint(t,n):null}var Pb=m((()=>{}));function Fb(e,t,n){switch(e){case`up`:return-n;case`down`:return n;case`left`:return-t;case`right`:return t;default:return 0}}function Ib(e){let t=Xn(e).getComputedStyle(e).transform,n=0,r=0,i=1;if(t&&t!==`none`){let e=t.match(/matrix(?:3d)?\(([^)]+)\)/);if(e){let t=e[1].split(`, `).map(parseFloat);t.length===6?(n=t[4],r=t[5],i=Math.sqrt(t[0]*t[0]+t[1]*t[1])):t.length===16&&(n=t[12],r=t[13],i=t[0])}}return{x:n,y:r,scale:i}}function Lb(e){return Number.isFinite(e)&&e>0?e:null}function Rb(e){return e%2==1}function zb(e,t,n){let r=e[n];if(typeof r==`function`)try{r.call(e,t)}catch(e){if(e&&typeof e==`object`&&`name`in e&&e.name===`NotFoundError`)return;throw e}}function Bb(e){let{enabled:n,directions:r,elementRef:i,movementCssVars:a,canStart:o,ignoreSelectorWhenTouch:s=!0,ignoreScrollableAncestors:c=!1,swipeThreshold:l,onDismiss:u,onProgress:d,onCancel:f,onSwipeStart:p,onRelease:m,onSwipingChange:h,trackDrag:g=!0}=e,_=qb,v=r.length===1?r[0]:void 0,y=Math.max(0,typeof l==`number`?l:Vb),b=r.includes(`left`),x=r.includes(`right`),S=r.includes(`up`),C=r.includes(`down`),w=b||x,T=S||C,E=t.useMemo(()=>{let e=[];return T&&e.push(`vertical`),w&&e.push(`horizontal`),e},[w,T]),[D,O]=t.useState(void 0),[k,j]=t.useState(!1),[M,N]=t.useState(!1),[P,F]=t.useState(!1),[I,L]=t.useState({x:0,y:0}),[R,ee]=t.useState({x:0,y:0,scale:1}),[z,B]=t.useState(null),V=t.useRef({x:0,y:0}),te=t.useRef({x:0,y:0}),ne=t.useRef(null),H=t.useRef({x:0,y:0,scale:1}),re=t.useRef(void 0),ie=t.useRef(0),U=t.useRef(!1),ae=t.useRef({x:0,y:0}),oe=t.useRef(!1),se=t.useRef(!1),ce=t.useRef(null),le=t.useRef(!1),W=t.useRef(!1),G=t.useRef({width:0,height:0}),ue=t.useRef(0),de=t.useRef(y),fe=t.useRef(null),pe=t.useRef(null),me=t.useRef({x:0,y:0}),he=t.useRef(null),ge=t.useRef(!1),_e=A(e=>{ge.current!==e&&(ge.current=e,j(e),h?.(e))});function ve(e){if(!e)return;if(typeof l!=`function`){de.current=y;return}let t=i.current;if(!t)return;let n=l({element:t,direction:e});de.current=Math.max(0,n)}let ye=A((e,t)=>{let n=Number.isFinite(e)?ib(e,0,1):0,r=n!==ue.current,i=!1;if(t){let e=he.current;i=!e||e.deltaX!==t.deltaX||e.deltaY!==t.deltaY||e.direction!==t.direction}!r&&!i||(ue.current=n,t?he.current=t:r&&(he.current=null),d?.(n,t))});function be(e,t){if(t===null)return;let n=pe.current;if(n&&t>n.time){let r=Math.max(t-n.time,Gb);me.current={x:(e.x-n.x)/r,y:(e.y-n.y)/r}}pe.current={x:e.x,y:e.y,time:t}}let xe=t.useCallback(()=>{O(void 0),_e(!1),N(!1),F(!1),L({x:0,y:0}),ee({x:0,y:0,scale:1}),B(null),ye(0),de.current=y,V.current={x:0,y:0},te.current={x:0,y:0},H.current={x:0,y:0,scale:1},re.current=void 0,ie.current=0,U.current=!1,ae.current={x:0,y:0},oe.current=!1,ne.current=null,se.current=!1,ce.current=null,le.current=!1,W.current=!1,G.current={width:0,height:0},fe.current=null,pe.current=null,me.current={x:0,y:0},he.current=null},[_e,y,ye]);t.useEffect(()=>{typeof l!=`function`&&(de.current=y)},[y,l]);function Se(e){if(`touches`in e){let t=e.touches[0];return t?{x:t.clientX,y:t.clientY}:null}return{x:e.clientX,y:e.clientY}}function Ce(e){return`touches`in e?!0:e.pointerType===`touch`}function we(e,t){return Nb(ta(i.current),e.x,e.y)??Yr(t)}function Te(e,t){return w&&!T?jb(e,t,`horizontal`):T&&!w?jb(e,t,`vertical`):jb(e,t,`vertical`)??jb(e,t,`horizontal`)}function Ee(e,t,n){le.current=!1;let r=Ce(e),a=we(t,e.nativeEvent),o=ta(i.current).body,l=r&&o?Te(a,o):null,u=n?.ignoreScrollableTarget??!1;if(l&&!u||(le.current=!!(l&&u),a&&a.closest(_)&&(!r||s)))return!1;let d=i.current;if(c&&d&&a&&E.length>0&&!(n?.ignoreScrollableAncestors??!1)&&Ab(a,d,E))return!1;if(U.current=!1,re.current=void 0,ie.current=0,V.current=t,fe.current=Lb(e.timeStamp),ae.current=t,ne.current=t,d){G.current={width:d.offsetWidth,height:d.offsetHeight},ve(v);let t=Ib(d);H.current=t,te.current={x:t.x,y:t.y},ee(t),L({x:t.x,y:t.y}),be({x:t.x,y:t.y},fe.current),`touches`in e||zb(d,e.pointerId,`setPointerCapture`)}return p?.(e.nativeEvent),_e(!0),N(!1),B(null),oe.current=!0,ye(0),!0}function De(){Oe(),le.current=!1,ne.current=null}function Oe(){se.current=!1,ce.current=null}function ke(e){if(De(),!ge.current)return;_e(!1),N(!1),B(null);let t=g?R:H.current;te.current={x:t.x,y:t.y},L({x:t.x,y:t.y}),O(void 0),W.current=!1;let n=i.current;n&&zb(n,e.pointerId,`releasePointerCapture`),ye(0,{deltaX:0,deltaY:0,direction:void 0}),f?.(e.nativeEvent)}function Ae(e,t){let n=e=>e>=0?e**.5:-(Math.abs(e)**.5),r=(e,t,r)=>!t&&e<0||!r&&e>0?n(e):e;return{x:w?r(e,b,x):n(e),y:T?r(t,S,C):n(t)}}function je(e,t,n){let r=Math.abs(t),i=Math.abs(n);if(T&&n!==0&&(!w||i>=r)){let t=Math.max(0,e.scrollHeight-e.clientHeight),r=e.scrollTop<=0,i=e.scrollTop>=t;return n>0&&r&&C||n<0&&i&&S}if(w&&t!==0&&(!T||r>i)){let n=Math.max(0,e.scrollWidth-e.clientWidth),r=e.scrollLeft<=0,i=e.scrollLeft>=n;return t>0&&r&&x||t<0&&i&&b}return null}let Me=A(e=>{if(!n||e.defaultPrevented||e.nativeEvent.defaultPrevented||!(`touches`in e)&&e.button!==0)return;let t=Se(e);t&&(se.current=!0,ce.current=t,le.current=!1,W.current=!1,(!o||o(t,{nativeEvent:e.nativeEvent,direction:v}))&&Ee(e,t)&&Oe())});function Ne(e,t,r){if(!n||!ge.current)return;let i=Yr(e.nativeEvent);if(Ce(e)&&!le.current){let t=e.currentTarget;if(Te(i,t))return}if(`touches`in e||e.preventDefault(),oe.current){V.current=t;let n=Lb(e.timeStamp);n!==null&&(fe.current=n),oe.current=!1}let a=t.x,o=t.y,s=r.x,c=r.y;(c<0&&o>ae.current.y||c>0&&o<ae.current.y)&&(ae.current={x:ae.current.x,y:o}),(s<0&&a>ae.current.x||s>0&&a<ae.current.x)&&(ae.current={x:a,y:ae.current.y});let l=a-V.current.x,u=o-V.current.y,d=o-ae.current.y,f=a-ae.current.x;M||Math.sqrt(l*l+u*u)>=Ub&&(N(!0),z===null&&w&&T&&B(Math.abs(l)>Math.abs(u)?`horizontal`:`vertical`));let p;if(!re.current)z===`vertical`?u>0?p=`down`:u<0&&(p=`up`):z===`horizontal`?l>0?p=`right`:l<0&&(p=`left`):p=Math.abs(l)>=Math.abs(u)?l>0?`right`:`left`:u>0?`down`:`up`,p&&(p===`left`&&b||p===`right`&&x||p===`up`&&S||p===`down`&&C)&&(re.current=p,ie.current=Fb(p,l,u),O(p),ve(p));else{let e=re.current,t=Fb(e,f,d);t>de.current?(U.current=!1,O(e)):!(b&&x)&&!(S&&C)&&ie.current-t>=Hb&&(U.current=!0)}let m=Ae(l,u),h=H.current.x,_=H.current.y;z===`horizontal`?w&&(h+=m.x):(z===`vertical`||w&&(h+=m.x),T&&(_+=m.y)),te.current={x:h,y:_},g&&L({x:h,y:_}),be({x:h,y:_},Lb(e.timeStamp));let y=h-H.current.x,E=_-H.current.y,D=re.current,k=v??re.current;if(!k){ye(0,{deltaX:y,deltaY:E,direction:D});return}let A=k===`left`||k===`right`?G.current.width:G.current.height,j=H.current.scale||1;if(A<=0||j<=0){ye(0,{deltaX:y,deltaY:E,direction:D});return}let P=Fb(k,h-H.current.x,_-H.current.y);if(P<=0){ye(0,{deltaX:y,deltaY:E,direction:D});return}ye(P/(A*j),{deltaX:y,deltaY:E,direction:D})}let Pe=A(e=>{let t=Se(e);if(!t)return;if(!(`touches`in e)){let t=Rb(e.buttons);t&&(W.current=!0);let n=e.buttons===0&&W.current;if(e.buttons!==0&&!t||n){ke(e);return}}if(!k&&se.current){if(!Ce(e)&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)){De();return}if(!o||o(t,{nativeEvent:e.nativeEvent,direction:v})){let n=ce.current,r=!1;if(Ce(e)){let a=i.current;if(n&&a){let i=we(t,e.nativeEvent),o=ta(a).body,s=o?Te(i,o):null;if(s&&(Jr(a,s)||Jr(s,a))){let e=je(s,t.x-n.x,t.y-n.y);if(e===!1)return;e===!0&&(r=!0)}}}Ee(e,t,{ignoreScrollableTarget:r,ignoreScrollableAncestors:r})&&(n&&r?(Oe(),V.current=n,ae.current=n,ne.current=n,oe.current=!1):(Oe(),le.current=!1))}}let n=ne.current,r=n===null?{x:0,y:0}:{x:t.x-n.x,y:t.y-n.y};ne.current=t,Ne(e,t,r)}),Fe=A(e=>{if(!n)return;let t=te.current,a=H.current,o=t.x-a.x,s=t.y-a.y,c={deltaX:o,deltaY:s,direction:D??re.current};if(!ge.current){De(),ye(0,c);return}_e(!1),N(!1),B(null),De(),W.current=!1;let l=i.current;l&&(`touches`in e||zb(l,e.pointerId,`releasePointerCapture`));let d=o,f=s,p=fe.current,h=Lb(e.timeStamp),g=p!==null&&h!==null&&h>p?h-p:0,_=g>0?Math.max(g,Wb):0,y=_>0?d/_:0,b=_>0?f/_:0,x=me.current.x,S=me.current.y,C=pe.current;if(C&&h!==null&&h>=C.time){let e=h-C.time;if(e<=Kb){let n=Math.max(e,Gb),r=t.x-C.x,i=t.y-C.y,a=r/n,o=i/n;a!==0&&(x=a),o!==0&&(S=o)}else x=0,S=0}let w=m?.({event:e.nativeEvent,direction:D??re.current,deltaX:d,deltaY:f,velocityX:y,velocityY:b,releaseVelocityX:x,releaseVelocityY:S}),T=typeof w==`boolean`;if(U.current&&!T){te.current={x:a.x,y:a.y},L({x:a.x,y:a.y}),O(void 0),ye(0,c);return}let E=!1,k;if(T)E=w,k=D??re.current??v;else for(let e of r){switch(e){case`right`:d>de.current&&(E=!0,k=`right`);break;case`left`:d<-de.current&&(E=!0,k=`left`);break;case`down`:f>de.current&&(E=!0,k=`down`);break;case`up`:f<-de.current&&(E=!0,k=`up`);break;default:break}if(E)break}E&&k?(O(k),F(!0),u?.(e.nativeEvent,{direction:k})):(te.current={x:a.x,y:a.y},L({x:a.x,y:a.y}),O(void 0),ye(0,c))}),Ie=t.useCallback(()=>{let e=g?I:te.current,t=g?R:H.current;if(!k&&e.x===t.x&&e.y===t.y&&!P)return{[a.x]:`0px`,[a.y]:`0px`};let n=e.x-t.x,r=e.y-t.y;return{transition:k?`none`:void 0,transform:k?`translateX(${e.x}px) translateY(${e.y}px) scale(${t.scale})`:void 0,[a.x]:`${n}px`,[a.y]:`${r}px`}},[P,I,R,k,a,g]);return{swiping:k,swipeDirection:D,dragDismissed:P,getPointerProps:t.useCallback(()=>n?{onPointerDown:Me,onPointerMove:Pe,onPointerUp:Fe,onPointerCancel:Fe}:{},[n,Fe,Pe,Me]),getTouchProps:t.useCallback(()=>n?{onTouchStart:Me,onTouchMove:Pe,onTouchEnd:Fe,onTouchCancel:Fe}:{},[n,Fe,Pe,Me]),getDragStyles:Ie,reset:xe}}var Vb,Hb,Ub,Wb,Gb,Kb,qb,Jb=m((()=>{F(),na(),Sa(),Mb(),ab(),Pb(),Vb=40,Hb=10,Ub=1,Wb=50,Gb=16,Kb=80,qb=`button,a,input,select,textarea,label,[role="button"]`})),Yb,Xb=m((()=>{Cp(),Yb=Sp})),Zb,Qb=m((()=>{Tp(),Zb=wp}));function $b(e,t,n){if(n){e?.setAttribute($y.swipeDismiss,``),t?.setAttribute($y.swipeDismiss,``);return}e?.removeAttribute($y.swipeDismiss),t?.removeAttribute($y.swipeDismiss)}function ex(e,t){if(e){if(t){e.setAttribute($y.swiping,``);return}e.removeAttribute($y.swiping)}}function tx(e){return!!e?.closest(Wc)}function nx(e){return!!e?.closest(Ox)}function rx(e,t){let n=t===`left`||t===`right`?e.offsetWidth:e.offsetHeight;return Math.max(n*.5,_x)}function ix(e,t){return e instanceof t.HTMLInputElement&&e.type===`range`}function ax(e){return $n(e)?e.tagName===`INPUT`||e.tagName===`TEXTAREA`:!1}function ox(e,t){let n=$n(e.anchorNode)?e.anchorNode:e.anchorNode?.parentElement,r=$n(e.focusNode)?e.focusNode:e.focusNode?.parentElement;return e.containsNode(t,!0)||Jr(t,n)||Jr(t,r)}function sx(e,t){let n=qr(e);if(n&&Jr(t,n)&&ax(n)){let{selectionStart:e,selectionEnd:t}=n;if(e!=null&&t!=null&&e<t)return!0}let r=e.getSelection?.();return!r||r.isCollapsed?!1:ox(r,t)}function cx(e,t){let n=e.composedPath();return n?n.some(e=>ix(e,t)):ix(Yr(e),t)}function lx(e){return cx(e.nativeEvent,Xn(e.currentTarget))}function ux(e,t){e.lastX=t.clientX,e.lastY=t.clientY}function dx(e,t,n){if(e.preserveNativeCrossAxisScroll)return!0;if(e.allowSwipe===!0||!e.hasCrossAxisScrollableContent)return!1;let r=n?t.clientY-e.startY:t.clientX-e.startX,i=n?t.clientX-e.startX:t.clientY-e.startY,a=Math.abs(r),o=Math.abs(i);return o<6||o<=a+2?!1:(e.preserveNativeCrossAxisScroll=!0,!0)}function fx(e,t){return t===`vertical`?e.scrollHeight>e.clientHeight:e.scrollWidth>e.clientWidth}function px(e,t){if(t===`vertical`){let t=Math.max(0,e.scrollHeight-e.clientHeight);return{offset:e.scrollTop,max:t}}let n=Math.max(0,e.scrollWidth-e.clientWidth);return{offset:e.scrollLeft,max:n}}function mx(e,t,n){let{offset:r,max:i}=px(e,t),a=gx(n,t);return a===null?!1:a?r<=0:r>=i}function hx(e,t,n,r){let{offset:i,max:a}=px(e,t),o=gx(n,t);return o===null||!(o?r>0:r<0)?!1:o?i<=0:i>=a}function gx(e,t){return t===`vertical`?e===`down`?!0:e===`up`?!1:null:e===`right`?!0:e===`left`?!1:null}var _x,vx,yx,bx,xx,Sx,Cx,wx,Tx,Ex,Dx,Ox,kx,Ax=m((()=>{yr(),qa(),na(),un(),F(),Lf(),kp(),$e(),rb(),lb(),Ky(),ab(),Jb(),Ay(),eb(),My(),zy(),zt(),Vt(),Sa(),fb(),_n(),Mb(),Yc(),Pb(),_x=10,vx=.5,yx=.5,bx=300,xx=4,Sx=.2,Cx=4,wx=80,Tx=360,Ex=.1,Dx=1,Ox=`[${Ry}]`,kx=t.forwardRef(function(e,i){let{className:a,render:o,style:s,children:c,...l}=e,{store:u}=Ff(),{swipeDirection:d,notifyParentSwipingChange:f,notifyParentSwipeProgressChange:p,frontmostHeight:m,snapToSequentialPoints:h}=tb(),g=Wy(!0)?.visualStateStore,_=u.useState(`open`),v=u.useState(`mounted`),y=u.useState(`nested`),b=u.useState(`nestedOpenDrawerCount`),x=u.useState(`viewportElement`),S=u.useState(`popupElement`),C=b>0,w=d===`left`||d===`right`?`horizontal`:`vertical`,T=w===`vertical`,E=T?`horizontal`:`vertical`,{snapPoints:D,resolvedSnapPoints:O,activeSnapPoint:k,activeSnapPointOffset:j,setActiveSnapPoint:M,popupHeight:N}=cb(),[P,F]=t.useState(null),I=t.useRef(void 0),L=t.useRef(null),R=rn(),ee=t.useRef(!1),z=t.useRef(``),B=t.useRef(!1),V=t.useRef(!1),te=t.useRef(null),ne=t.useMemo(()=>{if(!D||D.length<2||d!==`down`&&d!==`up`||O.length<2)return null;let e=O.map(e=>e.offset).filter(e=>Number.isFinite(e)).sort((e,t)=>e-t);if(e.length<2)return null;let t=e[0],n=e[1],r=e[e.length-1],i=n-t;if(!Number.isFinite(i)||i<=0){let e=r-t;if(!Number.isFinite(e)||e<=0)return null;i=e}return{minOffset:t,range:i}},[O,D,d]),H=t.useMemo(()=>!ne||j===null?null:ib((j-ne.minOffset)/ne.range,0,1),[j,ne]),re=t.useMemo(()=>D&&D.length>0&&(d===`down`||d===`up`)?d===`down`?[`down`,`up`]:[`up`,`down`]:[d],[D,d]),ie=A(e=>{$b(u.context.popupRef.current,u.context.backdropRef.current,e)}),U=A(()=>{ie(!1),u.context.popupRef.current?.removeAttribute(pn.endingStyle),F(null)}),ae=A(()=>{ee.current&&(ee.current=!1,f?.(!1))}),oe=A(({resolvedProgress:e,shouldTrackProgress:t,notifyParent:n})=>{let r=_&&!y&&t,i=r?e:0,a=_&&t?e:0;n&&p&&(p(a),a<=0&&ae()),g?.set({swipeProgress:i,frontmostHeight:i>0?m:0});let o=u.context.backdropRef.current;if(o){if(!r||i<=0){o.style.setProperty(jy.swipeProgress,`0`),o.style.removeProperty(ky.height);return}o.style.setProperty(jy.swipeProgress,`${i}`),m>0?o.style.setProperty(ky.height,`${m}px`):o.style.removeProperty(ky.height)}});function se({direction:e,deltaX:t,deltaY:n,velocityX:r,velocityY:i,releaseVelocityX:a,releaseVelocityY:o}){if(!e)return null;let s=u.context.popupRef.current;if(!s)return null;let c=e===`left`||e===`right`?s.offsetWidth:s.offsetHeight;if(!Number.isFinite(c)||c<=0)return null;let l=e===`left`||e===`right`?t:n,d=D&&D.length>0?j??0:0,f=0;e===`down`?f=d:e===`up`&&(f=-d);let p=f+l,m=e===`left`||e===`up`?-p:p,h=Math.max(0,c-m);if(!Number.isFinite(h)||h<=0)return null;let g=e===`left`||e===`right`?a:o,_=e===`left`||e===`right`?r:i,v=Math.abs(g)>0&&Number.isFinite(g)?g:_,y=e===`left`||e===`up`?-v:v;if(!Number.isFinite(y)||y<=Sx)return null;let b=ib(h/ib(y,Sx,Cx),wx,Tx);if(!Number.isFinite(b))return null;let x=ib(Ex+(b-wx)/(Tx-wx)*(Dx-Ex),Ex,Dx);return!Number.isFinite(x)||x<=0?null:x}function ce(e){if(ee.current||!e)return;let t=e.direction??d,n=t===`left`||t===`right`?e.deltaX:e.deltaY;!Number.isFinite(n)||Math.abs(n)<_x||(ee.current=!0,f?.(!0))}let le=Bb({enabled:v&&!C,directions:re,elementRef:u.context.popupRef,ignoreSelectorWhenTouch:!1,ignoreScrollableAncestors:!0,movementCssVars:{x:ky.swipeMovementX,y:ky.swipeMovementY},onSwipeStart(e){if(`touches`in e||`pointerType`in e&&e.pointerType===`touch`)return;let t=u.context.popupRef.current;if(!t)return;let n=ta(t).getSelection?.();if(!n||n.isCollapsed)return;let r=$n(n.anchorNode)?n.anchorNode:n.anchorNode?.parentElement,i=$n(n.focusNode)?n.focusNode:n.focusNode?.parentElement;!Jr(t,r)&&!Jr(t,i)||n.removeAllRanges()},onSwipingChange(e){ex(u.context.backdropRef.current,e),!e&&!p&&ae()},swipeThreshold({element:e,direction:t}){return rx(e,t)},canStart(e,t){let n=u.context.popupRef.current;if(!n)return!1;let r=n.ownerDocument,i=Nb(r,e.x,e.y);if(!i||!Jr(n,i))return!1;let a=t.nativeEvent;return!((`touches`in a||`pointerType`in a&&a.pointerType===`touch`)&&sx(r,n)||a.type===`touchstart`&&tx(i))},onProgress(e,t){ce(t);let n=t?.direction??le.swipeDirection,r=n===void 0||n===d,i=!!(D&&D.length>0),a=i&&(d===`down`||d===`up`)||!i||d===`left`||d===`right`||r,o=e;if(ne&&N>0){if(t&&Number.isFinite(t.deltaY))o=ib((ib((j??ne.minOffset)+t.deltaY,0,N)-ne.minOffset)/ne.range,0,1);else if(H!==null)o=H;else if(n===`down`||n===`up`){let t=e*N,r=j??ne.minOffset;o=ib(((n===`down`?r+t:r-t)-ne.minOffset)/ne.range,0,1)}}oe({resolvedProgress:o,shouldTrackProgress:a,notifyParent:!0})},onRelease({event:e,deltaX:t,deltaY:n,direction:i,velocityX:a,velocityY:o,releaseVelocityX:s,releaseVelocityY:c}){let l={deltaX:t,deltaY:n,velocityX:a,velocityY:o,releaseVelocityX:s,releaseVelocityY:c};function f(e){let t=u.context.popupRef.current;t&&(ae(),ie(!0),t.style.removeProperty(`transition`),t.setAttribute(pn.endingStyle,``),r.flushSync(()=>{F(se({direction:e,...l}))}))}if(!D||D.length===0){if(!i){U();return}let e=u.context.popupRef.current;if(!e){U();return}let r=rx(e,i),s=i===`left`||i===`right`?t:n;if(!Number.isFinite(s)){U();return}let c=i===`left`||i===`up`?-s:s;if(c<=0)return U(),!1;let l=i===`left`||i===`right`?a:o;if((i===`left`||i===`up`?-l:l)>=vx&&c>0)return f(i),!0;let d=c>r;return d?f(i):U(),d}if(d!==`down`&&d!==`up`){U();return}if(!N||O.length===0){U();return}let p=d===`down`?n:-n;if(!Number.isFinite(p)){U();return}let m=Math.sign(p),g=d===`down`?c:-c,_=d===`down`?o:-o,v=Number.isFinite(g)?g:_;if(m!==0&&Math.abs(p)>=_x&&Number.isFinite(v)){let e=Math.sign(v);e!==0&&e!==m&&(v=_)}let y=j??0,b=ib(y+p,0,N),x=Number.isFinite(v)&&Math.abs(v)>=yx?ib(v,-xx,xx)*bx:0,S=h?b:ib(b+x,0,N),C=J(It,e),w=()=>(I.current=k,M?.(null,C),f(d),!0);if(h){let e=[...O].sort((e,t)=>e.offset-t.offset);if(e.length===0)return U(),!1;let t=0,n=Math.abs(y-e[0].offset);for(let r=1;r<e.length;r+=1){let i=Math.abs(y-e[r].offset);i<n&&(n=i,t=r)}let r=e[0];n=Math.abs(S-r.offset);for(let t of e){let e=Math.abs(S-t.offset);e<n&&(n=e,r=t)}let i=Math.sign(v),a=m!==0&&i!==0&&i===m&&Math.abs(v)>=yx,o=S;if(a){let n=ib(t+m,0,e.length-1);if(n!==t){let t=e[n];(m>0?S<t.offset:S>t.offset)&&(r=t,o=t.offset)}else if(m>0)return w()}return Math.abs(o-N)<Math.abs(o-r.offset)?w():(M?.(r.value,C),U(),!1)}if(v>=vx&&p>0)return w();let T=O[0],E=Math.abs(S-T.offset);for(let e of O){let t=Math.abs(S-e.offset);t<E&&(E=t,T=e)}return Math.abs(S-N)<E?w():(M?.(T.value,C),U(),!1)},onDismiss(e){g?.set({swipeProgress:0,frontmostHeight:0});let t=u.context.backdropRef.current;t&&(t.style.setProperty(jy.swipeProgress,`0`),t.style.removeProperty(ky.height));let n=J(It,e);if(u.setOpen(!1,n),n.isCanceled){let t=I.current;t!==void 0&&M?.(t,J(It,e)),I.current=void 0,L.current?.(),U();return}if(u.select(`open`)){let t=e;R.request(()=>{if(u.select(`open`)){let e=I.current;e!==void 0&&M?.(e,J(It,t)),I.current=void 0,U(),L.current?.()}else I.current=void 0});return}I.current=void 0,ie(!0)}}),W=le.getPointerProps(),G=le.getTouchProps(),ue=le.reset;L.current=ue,t.useEffect(()=>{let e=x??S;if(!e)return;let t=e,n=ta(t),r=Xn(n);function i(e){if(V.current)return;let i=te.current,a=e.touches[0];if(!a||!i)return;let o=T?a.clientY-i.lastY:a.clientX-i.lastX;if(cx(e,r)){i.allowSwipe=!1,ux(i,a);return}if(e.touches.length===2){ux(i,a);return}if(sx(n,t)||!_||!v||C){ux(i,a);return}if(dx(i,a,T)){ux(i,a);return}let s=i.scrollTarget;if(!s||s===n.documentElement||s===n.body){e.cancelable&&e.preventDefault(),ux(i,a);return}if(!fx(s,w)){e.cancelable&&e.preventDefault(),ux(i,a);return}let c=o;if(c!==0){let t=hx(s,w,d,c);i.allowSwipe?e.cancelable&&e.preventDefault():e.cancelable&&t?(i.allowSwipe=!0,e.preventDefault()):i.allowSwipe=!1}ux(i,a)}return Ka(n,`touchmove`,i,{passive:!1,capture:!0})},[v,C,_,S,T,w,d,x]),t.useEffect(()=>{!ne||le.swiping||oe({resolvedProgress:!_||y?0:H??0,shouldTrackProgress:!0,notifyParent:!1})},[oe,m,y,p,_,H,ne,le.swiping,u,g]),t.useEffect(()=>{if(p)return _||p(0),()=>{p(0)}},[p,_]),t.useEffect(()=>{_&&(ue(),U())},[U,_,ue]),t.useEffect(()=>()=>{g?.set({swipeProgress:0,frontmostHeight:0}),ex(u.context.backdropRef.current,!1),ae()},[ae,u,g]);let de=t.useMemo(()=>({swiping:le.swiping,getDragStyles:le.getDragStyles,swipeStrength:P??null,setSwipeDismissed(e){$b(u.context.popupRef.current,u.context.backdropRef.current,e)}}),[u,le.getDragStyles,le.swiping,P]);function fe(){V.current=!1,te.current=null,z.current=``,B.current=!1}return(0,n.jsx)(Op,{ref:i,className:a,render:o,...Le(l,{onPointerDown(e){if(z.current=e.pointerType,B.current=e.pointerType===`pen`,!_||!v||C)return;let t=Nb(ta(e.currentTarget),e.clientX,e.clientY);tx(t)||nx(t)||e.pointerType!==`touch`&&W.onPointerDown?.(e)},onPointerMove(e){e.pointerType!==`touch`&&W.onPointerMove?.(e)},onPointerUp(e){z.current===e.pointerType&&(z.current=``),e.pointerType!==`touch`&&W.onPointerUp?.(e)},onPointerCancel(e){z.current===e.pointerType&&(z.current=``),e.pointerType!==`touch`&&W.onPointerCancel?.(e)},onTouchStart(e){if(z.current===`pen`&&B.current){B.current=!1,V.current=!1,te.current=null;return}if(!_||!v||C){V.current=!1,te.current=null;return}let t=e.touches[0];if(!t)return;if(lx(e)){V.current=!1,te.current=null;return}if(V.current=tx(Nb(ta(e.currentTarget),t.clientX,t.clientY)),V.current){te.current=null;return}let n=x??S,r=Yr(e.nativeEvent),i=$n(r)?r:null;if(n&&i&&!Jr(n,i)){V.current=!0,te.current=null;return}let a=null,o=!1;n&&i&&(a=jb(i,n,w),o=jb(i,n,E)!=null);let s=null;a&&(s=mx(a,w,d)?null:!1),te.current={startX:t.clientX,startY:t.clientY,lastX:t.clientX,lastY:t.clientY,scrollTarget:a,hasCrossAxisScrollableContent:o,allowSwipe:s,preserveNativeCrossAxisScroll:!1},G.onTouchStart?.(e)},onTouchMove(e){if(V.current||lx(e))return;let t=te.current;t?.preserveNativeCrossAxisScroll||t?.allowSwipe===!1||t?.scrollTarget!=null&&!t.allowSwipe||G.onTouchMove?.(e)},onTouchEnd(e){fe(),G.onTouchEnd?.(e)},onTouchCancel(e){fe(),G.onTouchCancel?.(e)},"data-nested-dialog-open":void 0}),children:(0,n.jsx)(db.Provider,{value:de,children:c})})}),process.env.NODE_ENV!==`production`&&(kx.displayName=`DrawerViewport`)})),jx=m((()=>{Fy(),Ly(),Vy(),Uy(),Yy(),Qy(),_b(),yb(),Sb(),Ob(),F(),$s(),Lf(),q(),Vt(),zt(),Jb(),Ay(),eb(),My(),rb(),$t(),Ld(),Ky(),ep(),Xb(),Qb(),Ax(),Bf()})),Mx=m((()=>{jx()}));function Nx(e=!1){let n=t.useContext(Px);if(!n&&!e)throw Error(process.env.NODE_ENV===`production`?W(86):`Base UI: FieldsetRootContext is missing. Fieldset parts must be placed within <Fieldset.Root>.`);return n}var Px,Fx=m((()=>{G(),Px=t.createContext({legendId:void 0,setLegendId:()=>{},disabled:void 0}),process.env.NODE_ENV!==`production`&&(Px.displayName=`FieldsetRootContext`)})),Ix,Lx=m((()=>{E(),R(),na(),F(),dm(),pm(),ym(),xm(),cm(),q(),Vt(),zt(),Sa(),Ix=t.forwardRef(function(e,n){let{render:r,className:i,id:a,name:o,value:s,disabled:c=!1,onValueChange:l,defaultValue:u,autoFocus:d=!1,style:f,...p}=e,{state:m,name:h,disabled:g,setTouched:_,setDirty:v,validityData:y,setFocused:b,setFilled:x,validationMode:S,validation:C}=lm(),T=g||c,E=h??o,D={...m,disabled:T},{labelId:O}=_m(),k=bm({id:a});L(()=>{let e=s!=null;C.inputRef.current?.value||e&&s!==``?x(!0):e&&s===``&&x(!1)},[C.inputRef,x,s]);let j=t.useRef(null);L(()=>{d&&j.current===qr(ta(j.current))&&b(!0)},[d,b]);let[M]=w({controlled:s,default:u,name:`FieldControl`,state:`value`}),N=s!==void 0,P=N?M:void 0,F=A(()=>C.inputRef.current?.value);return fm(C.inputRef,{id:k,value:P,getValue:F}),K(`input`,e,{ref:[n,j],state:D,props:[{id:k,disabled:T,name:E,ref:C.inputRef,"aria-labelledby":O,autoFocus:d,...N?{value:P}:{defaultValue:u},onChange(e){let t=e.currentTarget.value;l?.(t,J(ct,e.nativeEvent)),v(t!==y.initialValue),x(t!==``)},onFocus(){b(!0)},onBlur(e){_(!0),b(!1),S===`onBlur`&&C.commit(e.currentTarget.value)},onKeyDown(e){e.currentTarget.tagName===`INPUT`&&e.key===`Enter`&&(_(!0),C.commit(e.currentTarget.value))}},C.getInputValidationProps(),p],stateAttributesMapping:sm})}),process.env.NODE_ENV!==`production`&&(Ix.displayName=`FieldControl`)})),Rx=m((()=>{F(),dm(),cm(),Fx(),gm(),k(),$e(),$t(),ym(),Lg(),xm(),yr(),na(),Sa(),x_(),q(),Ae(),$s(),R(),C(),Kt(),$a(),_n(),xn(),Lx(),Ng(),Bg()})),zx=m((()=>{Rx()})),Bx=m((()=>{Fx(),q(),R(),$t()})),Vx=m((()=>{F(),Ae(),Vt(),zt(),gm(),q(),Af()})),Hx,Ux=m((()=>{zx(),Hx=t.forwardRef(function(e,t){return(0,n.jsx)(Ix,{ref:t,...e})}),process.env.NODE_ENV!==`production`&&(Hx.displayName=`Input`)})),Wx=m((()=>{Ux()})),Gx,Kx=m((()=>{Gx=`data-composite-item-active`}));function qx(e){let{itemSizes:n,cols:r=1,loopFocus:i=!0,onLoop:a,dense:o=!1,orientation:s=`both`,direction:c,highlightedIndex:l,onHighlightedIndexChange:u,rootRef:d,enableHomeAndEndKeys:f=!1,stopEventPropagation:p=!1,disabledIndices:m,modifierKeys:h=Yx}=e,[g,_]=t.useState(0),v=r>1,y=t.useRef(null),b=pe(y,d),x=t.useRef([]),S=t.useRef(!1),C=l??g,w=A((e,t=!1)=>{if((u??_)(e),t){let t=x.current[e];wa(y.current,t,c,s)}}),T=A(e=>{if(e.size===0||S.current)return;S.current=!0;let t=Array.from(e.keys()),n=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,r=n?t.indexOf(n):-1;r!==-1&&w(r),wa(y.current,n,c,s)}),E=A((e,t,n)=>a?a?.(e,t,n,x):n),D=t.useMemo(()=>({"aria-orientation":s===`both`?void 0:s,ref:b,onFocus(e){let t=y.current,n=Yr(e.nativeEvent);!t||n==null||!Ca(n)||n.setSelectionRange(0,n.value.length??0)},onKeyDown(e){let t=f?za:Ra;if(!t.has(e.key)||Jx(e,h)||!y.current)return;let l=c===`rtl`,u=l?ka:Aa,d={horizontal:u,vertical:Oa,both:u}[s],g=l?Aa:ka,_={horizontal:g,vertical:Da,both:g}[s],b=Yr(e.nativeEvent);if(b!=null&&Ca(b)&&!Kn(b)){let t=b.selectionStart,n=b.selectionEnd,r=b.value??``;if(t==null||e.shiftKey||t!==n||e.key!==_&&t<r.length||e.key!==d&&t>0)return}let S=C,T=Wi(x,m),D=Gi(x,m);if(v){let t=n||Array.from({length:x.current.length},()=>({width:1,height:1})),a=Ji(t,r,o),c=a.findIndex(e=>e!=null&&!Zi(x.current,e,m)),u=a.reduce((e,t,n)=>t!=null&&!Zi(x.current,t,m)?n:e,-1);S=a[qi(a.map(e=>e==null?null:x.current[e]),{event:e,orientation:s,loopFocus:i,onLoop:E,cols:r,disabledIndices:Xi([...m||x.current.map((e,t)=>Zi(x.current,t)?t:void 0),void 0],a),minIndex:c,maxIndex:u,prevIndex:Yi(C>D?T:C,t,a,r,e.key===`ArrowDown`?`bl`:e.key===`ArrowRight`?`tr`:`tl`),rtl:l})]}let O={horizontal:[u],vertical:[Oa],both:[u,Oa]}[s],k={horizontal:[g],vertical:[Da],both:[g,Da]}[s],A=v?t:{horizontal:f?Fa:Pa,vertical:f?La:Ia,both:t}[s];f&&(e.key===`Home`?S=T:e.key===`End`&&(S=D)),S===C&&(O.includes(e.key)||k.includes(e.key))&&(i&&S===D&&O.includes(e.key)?(S=T,a&&(S=a(e,C,S,x))):i&&S===T&&k.includes(e.key)?(S=D,a&&(S=a(e,C,S,x))):S=Ki(x.current,{startingIndex:S,decrement:k.includes(e.key),disabledIndices:m})),S!==C&&!Ui(x.current,S)&&(p&&e.stopPropagation(),A.has(e.key)&&e.preventDefault(),w(S,!0),queueMicrotask(()=>{x.current[S]?.focus()}))}}),[r,o,c,m,x,f,C,v,n,i,a,E,b,h,w,s,p]);return t.useMemo(()=>({props:D,highlightedIndex:C,onHighlightedIndexChange:w,elementsRef:x,disabledIndices:m,onMapChange:T,relayKeyboardEvent:D.onKeyDown}),[D,C,w,x,m,T])}function Jx(e,t){for(let n of Wa.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}var Yx,Xx=m((()=>{qn(),F(),ye(),Ga(),Kx(),Sa(),Yx=[]}));function Zx(e){let{render:r,className:i,style:a,refs:o=Oe,props:s=Oe,state:c=ke,stateAttributesMapping:l,highlightedIndex:u,onHighlightedIndexChange:d,orientation:f,dense:p,itemSizes:m,loopFocus:h,onLoop:g,cols:_,enableHomeAndEndKeys:v,onMapChange:y,stopEventPropagation:b=!0,rootRef:x,disabledIndices:S,modifierKeys:C,highlightItemOnHover:w=!1,tag:T=`div`,...E}=e,{props:D,highlightedIndex:O,onHighlightedIndexChange:k,elementsRef:A,onMapChange:j,relayKeyboardEvent:M}=qx({itemSizes:m,cols:_,loopFocus:h,onLoop:g,dense:p,orientation:f,highlightedIndex:u,onHighlightedIndexChange:d,rootRef:x,stopEventPropagation:b,enableHomeAndEndKeys:v,direction:oe(),disabledIndices:S,modifierKeys:C}),N=K(T,e,{state:c,ref:o,props:[D,...s,E],stateAttributesMapping:l}),P=t.useMemo(()=>({highlightedIndex:O,onHighlightedIndexChange:k,highlightItemOnHover:w,relayKeyboardEvent:M}),[O,k,w,M]);return(0,n.jsx)(xr.Provider,{value:P,children:(0,n.jsx)(H,{elementsRef:A,onMapChange:e=>{y?.(e),j(e)},children:N})})}var Qx=m((()=>{Ae(),ae(),Xx(),Sr(),q(),ce()})),$x=m((()=>{Of(),Uv(),Qx(),$t()}));function eS(){let e=t.useContext(tS);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(38):`Base UI: MeterRootContext is missing. Meter parts must be placed within <Meter.Root>.`);return e}var tS,nS=m((()=>{G(),tS=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(tS.displayName=`MeterRootContext`)}));function rS(e,t){let n=JSON.stringify({locale:e,options:t}),r=sS.get(n);if(r)return r;let i=new Intl.NumberFormat(e,t);return sS.set(n,i),i}function iS(e,t,n){return e==null?``:rS(t,n).format(e)}function aS(e,t,n){return iS(e,t,{...n,maximumFractionDigits:20})}function oS(e,t,n){return e==null?``:n?iS(e,t,n):iS(e/100,t,{style:`percent`})}var sS,cS=m((()=>{sS=new Map})),lS,uS=m((()=>{yc(),nS(),cS(),q(),lS=t.forwardRef(function(e,r){let{format:i,getAriaValueText:a,locale:o,max:s=100,min:c=0,value:l,render:u,className:d,children:f,style:p,...m}=e,[h,g]=t.useState(),_=oS(l,o,i),v=`${l}%`;a?v=a(_,l):i&&(v=_);let y={"aria-labelledby":h,"aria-valuemax":s,"aria-valuemin":c,"aria-valuenow":l,"aria-valuetext":v,role:`meter`,children:(0,n.jsxs)(t.Fragment,{children:[f,(0,n.jsx)(`span`,{role:`presentation`,style:_c,children:`x`})]})},b=t.useMemo(()=>({formattedValue:_,max:s,min:c,setLabelId:g,value:l}),[_,s,c,g,l]),x=K(`div`,e,{ref:r,props:[y,m]});return(0,n.jsx)(tS.Provider,{value:b,children:x})}),process.env.NODE_ENV!==`production`&&(lS.displayName=`MeterRoot`)})),dS,fS=m((()=>{q(),dS=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return K(`div`,e,{ref:t,props:a})}),process.env.NODE_ENV!==`production`&&(dS.displayName=`MeterTrack`)}));function pS(e,t,n){return(e-t)*100/(n-t)}var mS=m((()=>{})),hS,gS=m((()=>{mS(),nS(),q(),hS=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=eS();return K(`div`,e,{ref:t,props:[{style:{insetInlineStart:0,height:`inherit`,width:`${pS(o.value,o.min,o.max)}%`}},a]})}),process.env.NODE_ENV!==`production`&&(hS.displayName=`MeterIndicator`)})),_S,vS=m((()=>{nS(),q(),_S=t.forwardRef(function(e,t){let{className:n,render:r,children:i,style:a,...o}=e,{value:s,formattedValue:c}=eS();return K(`span`,e,{ref:t,props:[{"aria-hidden":!0,children:typeof i==`function`?i(c,s):(c||s)??``},o]})}),process.env.NODE_ENV!==`production`&&(_S.displayName=`MeterValue`)})),yS,bS=m((()=>{nS(),q(),x_(),yS=t.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{setLabelId:s}=eS();return K(`span`,e,{ref:t,props:[{id:b_(a,s),role:`presentation`},o]})}),process.env.NODE_ENV!==`production`&&(yS.displayName=`MeterLabel`)})),xS=m((()=>{uS(),fS(),gS(),vS(),bS()})),SS=m((()=>{xS()})),CS=m((()=>{yr(),E(),F(),na(),Of(),Sa(),q(),G(),$a(),xn(),fy(),zt(),Ae(),Qx(),Md(),$t(),R(),_p(),_n(),ep(),qa(),$s(),un(),hc(),Qd(),Vt(),Yc(),xc(),ny(),Dr(),yn(),pc(),Lh(),Mh(),Vh(),Zt(),ce()}));function wS(){let e=t.useContext(TS);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(43):`Base UI: NumberFieldRootContext is missing. NumberField parts must be placed within <NumberField.Root>.`);return e}var TS,ES=m((()=>{G(),TS=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(TS.displayName=`NumberFieldRootContext`)})),DS,OS=m((()=>{cm(),DS={inputValue:()=>null,value:()=>null,...sm}}));function kS(e,t){let n=rS(e,t).formatToParts(11111.1),r={};return n.forEach(e=>{r[e.type]=e.value}),rS(e).formatToParts(.1).forEach(e=>{e.type===`decimal`&&(r[e.type]=e.value)}),r}function AS(e,t,n){if(e==null)return null;let r=String(e).replace(/\p{Cf}/gu,``).trim();r=r.replace(aC,`-`).replace(oC,`+`);let i=!1,a=r.match(/([+-])\s*$/);a&&(a[1]===`-`&&(i=!0),r=r.replace(/([+-])\s*$/,``));let o=r.match(/^\s*([+-])/);o&&(o[1]===`-`&&(i=!0),r=r.replace(/^\s*[+-]/,``));let s=t;s===void 0&&(KS.test(r)||qS.test(r)?s=`ar`:JS.test(r)&&(s=`zh`));let{group:c,decimal:l,currency:u}=kS(s,n),d=rS(s,n).formatToParts(1).filter(e=>e.type===`unit`).map(e=>eC(e.value)),f=d.length?new RegExp(d.join(`|`),`g`):null,p=null;c&&(p=/\p{Zs}/u.test(c)?/\p{Zs}/gu:c===`'`||c===`’`?/['’]/g:new RegExp(eC(c),`g`));let m=[{regex:c?p:null,replacement:``},{regex:l?new RegExp(eC(l),`g`):null,replacement:`.`},{regex:/./g,replacement:`.`},{regex:/,/g,replacement:``},{regex:/٫/g,replacement:`.`},{regex:/٬/g,replacement:``},{regex:u?new RegExp(eC(u),`g`):null,replacement:``},{regex:f,replacement:``},{regex:BS,replacement:e=>String(NS.indexOf(e))},{regex:VS,replacement:e=>String(PS.indexOf(e))},{regex:HS,replacement:e=>String(FS.indexOf(e))},{regex:US,replacement:e=>MS[e]}].reduce((e,{regex:t,replacement:n})=>t?e.replace(t,n):e,r),h=m.lastIndexOf(`.`);if(h!==-1&&(m=`${m.slice(0,h).replace(/\./g,``)}.${m.slice(h+1).replace(/\./g,``)}`),/^[-+]?Infinity$/i.test(r)||/[∞]/.test(r))return null;let g=(i?`-`:``)+m,_=parseFloat(g),v=n?.style,y=v===`unit`&&n?.unit===`percent`,b=WS.test(e)||v===`percent`;return GS.test(e)?_/=1e3:!y&&b&&(_/=100),Number.isNaN(_)?null:_}var jS,MS,NS,PS,FS,IS,LS,RS,zS,BS,VS,HS,US,WS,GS,KS,qS,JS,YS,XS,ZS,QS,$S,eC,tC,nC,rC,iC,aC,oC,sC,cC,lC=m((()=>{cS(),jS=[`零`,`〇`,`一`,`二`,`三`,`四`,`五`,`六`,`七`,`八`,`九`],MS={零:`0`,〇:`0`,一:`1`,二:`2`,三:`3`,四:`4`,五:`5`,六:`6`,七:`7`,八:`8`,九:`9`},NS=[`٠`,`١`,`٢`,`٣`,`٤`,`٥`,`٦`,`٧`,`٨`,`٩`],PS=[`۰`,`۱`,`۲`,`۳`,`۴`,`۵`,`۶`,`۷`,`۸`,`۹`],FS=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],IS=[`%`,`٪`,`%`,`﹪`],LS=[`‰`,`؉`],RS=[`−`,`-`,`‒`,`–`,`—`,`﹣`],zS=[`+`,`﹢`],BS=RegExp(`[${NS.join(``)}]`,`g`),VS=RegExp(`[${PS.join(``)}]`,`g`),HS=RegExp(`[${FS.join(``)}]`,`g`),US=RegExp(`[${jS.join(``)}]`,`g`),WS=RegExp(`[${IS.join(``)}]`),GS=RegExp(`[${LS.join(``)}]`),KS=/[٠١٢٣٤٥٦٧٨٩]/,qS=/[۰۱۲۳۴۵۶۷۸۹]/,JS=/[零〇一二三四五六七八九]/,YS=RegExp(`[${FS.join(``)}]`),XS=[`.`,`,`,`.`,`,`,`٫`,`٬`],ZS=/\p{Zs}/u,QS=[`+`,...zS],$S=[`-`,...RS],eC=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),tC=e=>e.replace(/[-\\\]^]/g,e=>`\\${e}`),nC=e=>`[${e.map(tC).join(``)}]`,rC=nC([`-`].concat(RS)),iC=nC([`+`].concat(zS)),aC=new RegExp(rC,`gu`),oC=new RegExp(iC,`gu`),sC=new RegExp(rC),cC=new RegExp(iC)})),uC=m((()=>{}));function _ne(e){let t=rS(`en-US`).resolvedOptions(),n=e?.minimumFractionDigits??t.minimumFractionDigits??0;return{maximumFractionDigits:Math.max(e?.maximumFractionDigits??t.maximumFractionDigits??20,n),minimumFractionDigits:n}}function vne(e,t){if(!Number.isFinite(e))return e;let n=Math.min(Math.max(t,0),20);return Number(e.toFixed(n))}function dC(e,t){let{maximumFractionDigits:n}=_ne(t);return vne(e,n)}function yne(e,t,n,r=`directional`){if(n===0)return e;let i=Math.abs(n),a=Math.sign(n),o=i*fC*a,s=r===`nearest`?n:i,c=(e-t+o)/s,l;return l=r===`nearest`?Math.round(c):a>0?Math.floor(c):Math.ceil(c),t+l*(r===`nearest`?n:i)}function bne(e,{step:t,minWithDefault:n,maxWithDefault:r,minWithZeroDefault:i,format:a,snapOnStep:o,small:s,clamp:c}){if(e===null)return e;let l=c?ib(e,n,r):e;if(t!=null&&o){if(t===0)return dC(l,a);let e=i;return!s&&n!==-(2**53-1)&&(e=n),dC(yne(l,e,t,s?`nearest`:`directional`),a)}return dC(l,a)}var fC,xne=m((()=>{ab(),cS(),fC=1e-10}));function pC(e,t,n){return n?.maximumFractionDigits!=null||n?.minimumFractionDigits!=null?iS(e,t,n):aS(e,t,n)}var mC,Sne=m((()=>{qa(),E(),F(),R(),hc(),vd(),ye(),yc(),na(),zr(),Sa(),ES(),dm(),xm(),OS(),q(),lC(),cS(),uC(),xne(),Vt(),zt(),mC=t.forwardRef(function(e,r){let{id:i,min:a,max:o,smallStep:s=.1,step:c=1,largeStep:l=10,required:u=!1,disabled:d=!1,readOnly:f=!1,form:p,name:m,defaultValue:h,value:g,onValueChange:_,onValueCommitted:v,allowWheelScrub:y=!1,snapOnStep:b=!1,allowOutOfRange:x=!1,format:S,locale:C,render:T,className:E,inputRef:D,style:O,...k}=e,{setDirty:j,validityData:M,disabled:N,setFilled:P,invalid:F,name:I,state:R,validation:ee,shouldValidateOnChange:z}=lm(),B=N||d,V=I??m,te=c===`any`?1:c,[ne,H]=t.useState(!1),re=a??-(2**53-1),ie=o??2**53-1,U=a??0,ae=S?.style,oe=t.useRef(null),se=pe(D,ee.inputRef),ce=bm({id:i}),[le,W]=w({controlled:g,default:h,name:`NumberField`,state:`value`}),G=le??null,ue=mc(G);L(()=>{P(G!==null)},[P,G]);let de=_d(),fe=mc(S),me=t.useRef(!1),he=A((e,t)=>{me.current=!1,v?.(e,t)}),ge=t.useRef(!0),_e=t.useRef(null),[ve,ye]=t.useState(()=>g===void 0?iS(G,C,S):pC(G,C,S)),[be,xe]=t.useState(`numeric`),Se=A(()=>{let{decimal:e,group:t,currency:n,literal:r}=kS(C,S),i=new Set;XS.forEach(e=>i.add(e)),e&&i.add(e),t&&(i.add(t),ZS.test(t)&&i.add(` `));let a=ae===`percent`||ae===`unit`&&S?.unit===`percent`,o=ae===`percent`||ae===`unit`&&S?.unit===`permille`;return a&&IS.forEach(e=>i.add(e)),o&&LS.forEach(e=>i.add(e)),ae===`currency`&&n&&i.add(n),r&&(Array.from(r).forEach(e=>i.add(e)),ZS.test(r)&&i.add(` `)),QS.forEach(e=>i.add(e)),re<0&&$S.forEach(e=>i.add(e)),i}),Ce=A(e=>e?.altKey?s:e?.shiftKey?l:te),we=A((e,t)=>{let n=t.event,r=t.direction,i=t.reason,a=!x||!(i===`input-change`||i===`input-blur`||i===`input-paste`||i===`input-clear`||i===`none`),o=bne(e,{step:r?Ce(n)*r:void 0,format:fe.current,minWithDefault:re,maxWithDefault:ie,minWithZeroDefault:U,snapOnStep:b,small:n?.altKey??!1,clamp:a}),s=t.reason===`input-change`||t.reason===`input-clear`||t.reason===`input-blur`||t.reason===`input-paste`||t.reason===`none`,c=o!==G||s&&(e!==G||ge.current===!1);if(c){if(_e.current=o,_?.(o,t),t.isCanceled)return c;W(o),j(o!==M.initialValue),me.current=!0}return ge.current&&ye(iS(o,C,S)),de(),c}),Te=A((e,{direction:t,currentValue:n,event:r,reason:i})=>{let o=n??ue.current;return we(typeof o==`number`?o+e*t:Math.max(0,a??0),J(i,r,void 0,{direction:t}))});L(function(){if(!ge.current)return;let e=g===void 0?iS(G,C,S):pC(G,C,S);e!==ve&&ye(e)}),L(function(){if(!Nr)return;let e=`text`;re>=0&&(e=`decimal`),xe(e)},[re,ae]),t.useEffect(function(){let e=oe.current;if(B||f||!y||!e)return;function t(e){e.ctrlKey||qr(ta(oe.current))!==oe.current||(e.preventDefault(),Te(Ce(e)??1,{direction:e.deltaY>0?-1:1,event:e,reason:`wheel`}))}return Ka(e,`wheel`,t)},[y,Te,B,f,l,te,Ce]);let Ee=t.useMemo(()=>({...R,disabled:B,readOnly:f,required:u,value:G,inputValue:ve,scrubbing:ne}),[R,B,f,u,G,ve,ne]),De=t.useMemo(()=>({inputRef:oe,inputValue:ve,value:G,minWithDefault:re,maxWithDefault:ie,disabled:B,readOnly:f,id:ce,setValue:we,incrementValue:Te,getStepAmount:Ce,allowInputSyncRef:ge,formatOptionsRef:fe,valueRef:ue,lastChangedValueRef:_e,hasPendingCommitRef:me,name:V,required:u,invalid:F,inputMode:be,getAllowedNonNumericKeys:Se,min:a,max:o,setInputValue:ye,locale:C,isScrubbing:ne,setIsScrubbing:H,state:Ee,onValueCommitted:he}),[oe,ve,G,re,ie,B,f,ce,we,Te,Ce,fe,ue,V,u,F,be,Se,a,o,ye,C,ne,Ee,he]),Oe=K(`div`,e,{ref:r,state:Ee,props:k,stateAttributesMapping:DS});return(0,n.jsxs)(TS.Provider,{value:De,children:[Oe,(0,n.jsx)(`input`,{...ee.getInputValidationProps({onFocus(){oe.current?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.currentTarget.valueAsNumber,n=Number.isNaN(t)?null:t,r=J(ct,e.nativeEvent);j(n!==M.initialValue),we(n,r),z()&&ee.commit(n)}}),ref:se,type:`number`,form:p,name:V,value:G??``,min:a,max:o,step:c,disabled:B,required:u,"aria-hidden":!0,tabIndex:-1,style:V?vc:_c,suppressHydrationWarning:!0})]})}),process.env.NODE_ENV!==`production`&&(mC.displayName=`NumberFieldRoot`)})),hC,Cne=m((()=>{ES(),OS(),q(),hC=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=wS();return K(`div`,e,{ref:t,state:o,props:[{role:`group`},a],stateAttributesMapping:DS})}),process.env.NODE_ENV!==`production`&&(hC.displayName=`NumberFieldGroup`)}));function wne(){let e=D(_C.create).current;return en(e.disposeEffect),e}var gC,_C,Tne=m((()=>{k(),nn(),$s(),gC=0,_C=class e extends Qs{static create(){return new e}start(e,t){this.clear(),this.currentId=setInterval(()=>{t()},e)}clear=()=>{this.currentId!==gC&&(clearInterval(this.currentId),this.currentId=gC)}}}));function vC(e){return e===`touch`||e===`pen`}function Ene(e){let{disabled:n,readOnly:r=!1,tick:i,onStop:a,tickDelay:o=yC,startDelay:s=bC,scrollDistance:c=xC,elementRef:l}=e,u=Xs(),d=wne(),f=Xs(),p=t.useRef(!1),m=t.useRef(0),h=t.useRef({x:0,y:0}),g=t.useRef(!1),_=t.useRef(!1),v=t.useRef(``),y=t.useRef(()=>{}),b=A(()=>{f.clear(),u.clear(),d.clear(),y.current(),m.current=0}),x=A(e=>{b();let t=l.current;if(!t)return;let n=Xn(t);function r(e){e.preventDefault()}if(y.current=Ka(n,`contextmenu`,r),Ka(n,`pointerup`,e=>{p.current=!1,b(),a?.(e)},{once:!0}),!i(e)){b();return}u.start(s,()=>{d.start(o,()=>{i(e)||b()})})});return t.useEffect(()=>()=>b(),[b]),{pointerHandlers:{onTouchStart(){g.current=!0},onTouchEnd(){g.current=!1},onPointerDown(e){let t=!e.button||e.button===0;e.defaultPrevented||!t||n||r||(v.current=e.pointerType,_.current=!1,p.current=!0,h.current={x:e.clientX,y:e.clientY},vC(e.pointerType)?f.start(SC,()=>{let t=m.current;m.current=0,p.current&&t<CC?(x(e.nativeEvent),_.current=!0):(_.current=!1,b())}):(e.preventDefault(),x(e.nativeEvent)))},onPointerUp(e){vC(e.pointerType)&&(p.current=!1)},onPointerMove(e){if(n||r||!vC(e.pointerType)||!p.current)return;m.current!=null&&(m.current+=1);let{x:t,y:i}=h.current,a=t-e.clientX,o=i-e.clientY;a**2+o**2>c**2&&b()},onMouseEnter(e){e.defaultPrevented||n||r||!p.current||g.current||vC(v.current)||x(e.nativeEvent)},onMouseLeave(){g.current||b()},onMouseUp(){g.current||b()}},shouldSkipClick:A(e=>e.defaultPrevented?!0:vC(v.current)?_.current:e.detail!==0)}}var yC,bC,xC,SC,CC,Dne=m((()=>{qa(),$s(),Tne(),F(),na(),yC=60,bC=400,xC=8,SC=50,CC=3}));function One(e){return e===`touch`||e===`pen`}function wC(e){let{allowInputSyncRef:t,disabled:n,formatOptionsRef:r,getStepAmount:i,id:a,incrementValue:o,inputRef:s,inputValue:c,isIncrement:l,locale:u,readOnly:d,setValue:f,valueRef:p,lastChangedValueRef:m,onValueCommitted:h}=e,g=l?vt:yt;function _(e){t.current=!0;let n=AS(c,u,r.current);n!==null&&(p.current=n,f(n,J(g,e,void 0,{direction:l?1:-1})))}let{pointerHandlers:v,shouldSkipClick:y}=Ene({disabled:n||d,elementRef:s,tickDelay:60,startDelay:400,scrollDistance:8,tick(e){return o(i(e)??1,{direction:l?1:-1,event:e,reason:g})},onStop(e){h(m.current??p.current,Bt(g,e))}});return{disabled:n,"aria-readonly":d||void 0,"aria-label":l?`Increase`:`Decrease`,"aria-controls":a,tabIndex:-1,style:{WebkitUserSelect:`none`,userSelect:`none`},...v,onClick(e){let t=n||d;if(e.defaultPrevented||t||y(e))return;_(e.nativeEvent);let r=i(e)??1,a=p.current;o(r,{direction:l?1:-1,event:e.nativeEvent,reason:g});let s=m.current??p.current;s!==a&&h(s,Bt(g,e.nativeEvent))},onPointerDown(e){let t=!e.button||e.button===0;e.defaultPrevented||d||!t||n||(_(e.nativeEvent),One(e.pointerType)||s.current?.focus(),v.onPointerDown(e))}}}var TC=m((()=>{Dne(),uC(),lC(),Vt(),zt()})),EC,kne=m((()=>{q(),Dr(),ES(),TC(),OS(),EC=t.forwardRef(function(e,n){let{render:r,className:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{allowInputSyncRef:l,disabled:u,formatOptionsRef:d,getStepAmount:f,id:p,incrementValue:m,inputRef:h,inputValue:g,locale:_,maxWithDefault:v,readOnly:y,setValue:b,state:x,value:S,valueRef:C,lastChangedValueRef:w,onValueCommitted:T}=wS(),E=a||u||S!=null&&S>=v,D=wC({isIncrement:!0,inputRef:h,inputValue:g,disabled:E,readOnly:y,id:p,setValue:b,getStepAmount:f,incrementValue:m,allowInputSyncRef:l,formatOptionsRef:d,valueRef:C,locale:_,lastChangedValueRef:w,onValueCommitted:T}),{getButtonProps:O,buttonRef:k}=wr({disabled:E,native:o,focusableWhenDisabled:!0}),A=t.useMemo(()=>({...x,disabled:E}),[x,E]);return K(`button`,e,{ref:[n,k],state:A,props:[D,c,O],stateAttributesMapping:DS})}),process.env.NODE_ENV!==`production`&&(EC.displayName=`NumberFieldIncrement`)})),DC,Ane=m((()=>{q(),Dr(),ES(),TC(),OS(),DC=t.forwardRef(function(e,n){let{render:r,className:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{allowInputSyncRef:l,disabled:u,formatOptionsRef:d,getStepAmount:f,id:p,incrementValue:m,inputRef:h,inputValue:g,minWithDefault:_,readOnly:v,setValue:y,state:b,value:x,valueRef:S,locale:C,lastChangedValueRef:w,onValueCommitted:T}=wS(),E=a||u||x!=null&&x<=_,D=wC({isIncrement:!1,inputRef:h,inputValue:g,disabled:E,readOnly:v,id:p,setValue:y,getStepAmount:f,incrementValue:m,allowInputSyncRef:l,formatOptionsRef:d,valueRef:S,locale:C,lastChangedValueRef:w,onValueCommitted:T}),{getButtonProps:O,buttonRef:k}=wr({disabled:E,native:o,focusableWhenDisabled:!0}),A=t.useMemo(()=>({...b,disabled:E}),[b,E]);return K(`button`,e,{ref:[n,k],state:A,props:[D,c,O],stateAttributesMapping:DS})}),process.env.NODE_ENV!==`production`&&(DC.displayName=`NumberFieldDecrement`)})),OC,kC,AC,jne=m((()=>{Sa(),ES(),dm(),pm(),cm(),gm(),ym(),uC(),lC(),OS(),q(),Vt(),cS(),Af(),zt(),OC={...sm,...DS},kC=new Set([`Backspace`,`Delete`,`ArrowLeft`,`ArrowRight`,`Tab`,`Enter`,`Escape`]),AC=t.forwardRef(function(e,n){let{render:r,className:i,style:a,...o}=e,{allowInputSyncRef:s,disabled:c,formatOptionsRef:l,getAllowedNonNumericKeys:u,getStepAmount:d,id:f,incrementValue:p,inputMode:m,inputValue:h,max:g,min:_,name:v,readOnly:y,required:b,setValue:x,state:S,setInputValue:C,locale:w,inputRef:T,value:E,onValueCommitted:D,lastChangedValueRef:O,hasPendingCommitRef:k,valueRef:A}=wS(),{clearErrors:j}=mm(),{validationMode:M,setTouched:N,setFocused:P,invalid:F,shouldValidateOnChange:I,validation:L}=lm(),{labelId:R}=_m(),ee=t.useRef(!1),z=t.useRef(!1);return fm(T,{id:f,value:E}),kf(E,e=>{let t=I();if(j(v),t&&L.commit(E),!(e===E||t)){if(z.current){z.current=!1;return}L.commit(E,!0)}}),K(`input`,e,{ref:[n,T],state:S,props:[{id:f,required:b,disabled:c,readOnly:y,inputMode:m,value:h,type:`text`,autoComplete:`off`,autoCorrect:`off`,spellCheck:`false`,"aria-roledescription":`Number field`,"aria-invalid":F||void 0,"aria-labelledby":R,suppressHydrationWarning:!0,onFocus(e){if(e.defaultPrevented||y||c||(P(!0),ee.current))return;ee.current=!0;let t=e.currentTarget,n=t.value.length;t.setSelectionRange(n,n)},onBlur(e){if(e.defaultPrevented||y||c)return;N(!0),P(!1);let t=!s.current,n=k.current;if(s.current=!0,h.trim()===``){x(null,J(xt,e.nativeEvent)),M===`onBlur`&&L.commit(null),D(null,Bt(xt,e.nativeEvent));return}let r=l.current,i=AS(h,w,r);if(i===null)return;let a=r?.maximumFractionDigits!=null||r?.minimumFractionDigits!=null,o=r?.maximumFractionDigits,u=a&&typeof o==`number`?Number(i.toFixed(o)):i,d=Bt(St,e.nativeEvent),f=E!==u,p=t||f||n;M===`onBlur`&&L.commit(u),f&&(z.current=!0,x(u,J(St,e.nativeEvent))),p&&D(u,d);let m=iS(u,w,r);!(!a&&i===E&&h===aS(i,w,r))&&h!==m&&C(m)},onChange(e){if(e.nativeEvent.defaultPrevented)return;s.current=!1;let t=e.currentTarget.value;if(t.trim()===``){C(t),x(null,J(xt,e.nativeEvent));return}let n=u();if(!Array.from(t).every(e=>{let t=e>=`0`&&e<=`9`,r=KS.test(e),i=JS.test(e),a=qS.test(e),o=YS.test(e),s=sC.test(e);return t||r||i||a||o||s||n.has(e)}))return;let r=AS(t,w,l.current);C(t),r!==null&&x(r,J(bt,e.nativeEvent))},onKeyDown(e){if(e.defaultPrevented||y||c)return;let t=e.nativeEvent;s.current=!0;let n=u(),r=n.has(e.key),{decimal:i,currency:a,percentSign:o}=kS(w,l.current),f=e.currentTarget.selectionStart,m=e.currentTarget.selectionEnd,v=f===0&&m===h.length,b=e=>f!=null&&m!=null&&e>=f&&e<m;if(sC.test(e.key)&&Array.from(n).some(e=>sC.test(e||``))){let e=h.search(aC),t=e!=null&&e!==-1&&b(e);r=!(sC.test(h)||cC.test(h))||v||t}if(cC.test(e.key)&&Array.from(n).some(e=>cC.test(e||``))){let e=h.search(oC),t=e!=null&&e!==-1&&b(e);r=!(sC.test(h)||cC.test(h))||v||t}[i,a,o].forEach(t=>{if(e.key===t){let e=b(h.indexOf(t));r=!h.includes(t)||v||e}});let S=e.key>=`0`&&e.key<=`9`,C=KS.test(e.key),T=JS.test(e.key),E=YS.test(e.key),k=kC.has(e.key);if(e.which===229||e.altKey||e.ctrlKey||e.metaKey||r||S||C||E||T||k)return;let j=AS(h,w,l.current),M=d(e)??1;ci(e);let N=Bt(kt,t);e.key===`ArrowUp`?(p(M,{direction:1,currentValue:j,event:t,reason:kt}),D(O.current??A.current,N)):e.key===`ArrowDown`?(p(M,{direction:-1,currentValue:j,event:t,reason:kt}),D(O.current??A.current,N)):e.key===`Home`&&_!=null?(x(_,J(kt,t)),D(O.current??A.current,N)):e.key===`End`&&g!=null&&(x(g,J(kt,t)),D(O.current??A.current,N))},onPaste(e){if(e.defaultPrevented||y||c)return;e.preventDefault();let t=(e.clipboardData||window.Clipboard).getData(`text/plain`),n=AS(t,w,l.current);n!==null&&(s.current=!1,x(n,J(Ct,e.nativeEvent)),C(t))}},L.getValidationProps(),o],stateAttributesMapping:OC})}),process.env.NODE_ENV!==`production`&&(AC.displayName=`NumberFieldInput`)}));function Mne(){let e=t.useContext(jC);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(44):`Base UI: NumberFieldScrubAreaContext is missing. NumberFieldScrubArea parts must be placed within <NumberField.ScrubArea>.`);return e}var jC,MC=m((()=>{G(),jC=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(jC.displayName=`NumberFieldScrubAreaContext`)}));function Nne(e,t){let n=Xn(t),r=t.getBoundingClientRect();if(r&&e!=null)return{x:r.left-e/2,y:r.top-e/2,width:r.right+e/2,height:r.bottom+e/2};let i=n.visualViewport;return i?{x:i.offsetLeft,y:i.offsetTop,width:i.offsetLeft+i.width,height:i.offsetTop+i.height}:{x:0,y:0,width:n.document.documentElement.clientWidth,height:n.document.documentElement.clientHeight}}var Pne=m((()=>{na()}));function Fne(e,t){let n=Xn(e).visualViewport;if(!n)return()=>{};function r(){n&&(t.current=n.scale)}return r(),Ka(n,`resize`,r)}var Ine=m((()=>{qa(),na()})),NC,Lne=m((()=>{qa(),pc(),na(),zr(),F(),$s(),ES(),OS(),MC(),q(),Pne(),Ine(),uC(),Vt(),zt(),Sa(),NC=t.forwardRef(function(e,i){let{render:a,className:o,direction:s=`horizontal`,pixelSensitivity:c=2,teleportDistance:l,style:u,...d}=e,{state:f,setIsScrubbing:p,disabled:m,readOnly:h,inputRef:g,incrementValue:_,getStepAmount:v,onValueCommitted:y,lastChangedValueRef:b,valueRef:x}=wS(),S=t.useRef(null),C=t.useRef(!1),w=t.useRef(!1),T=t.useRef(null),E=t.useRef(null),D=t.useRef({x:0,y:0}),O=t.useRef(1),k=Xs(),[j,M]=t.useState(!1),[N,P]=t.useState(!1),[F,I]=t.useState(!1);t.useEffect(()=>{if(!(!F||!E.current))return Fne(E.current,O)},[F]);function L(e,t){E.current&&(E.current.style.transform=`translate3d(${e}px,${t}px,0) scale(${1/O.current})`)}let R=A(({movementX:e,movementY:t})=>{let n=E.current,r=S.current;if(!n||!r)return;let i=Nne(l,r),a=D.current,o={x:Math.round(a.x+e),y:Math.round(a.y+t)},s=n.offsetWidth,c=n.offsetHeight;o.x+s/2<i.x?o.x=i.width-s/2:o.x+s/2>i.width&&(o.x=i.x-s/2),o.y+c/2<i.y?o.y=i.height-c/2:o.y+c/2>i.height&&(o.y=i.y-c/2),D.current=o,L(o.x,o.y)}),ee=A((e,{clientX:t,clientY:n})=>{r.flushSync(()=>{I(e),p(e)});let i=E.current;if(!i||!e)return;let a={x:t-i.offsetWidth/2,y:n-i.offsetHeight/2};D.current=a,L(a.x,a.y)});t.useEffect(function(){if(!g.current||m||h||!F)return;let e=0;function t(e){function t(){try{ta(S.current).exitPointerLock()}catch{}finally{C.current=!1,ee(!1,e),y(b.current??x.current,Bt(jt,e)),!w.current&&T.current!=null&&T.current.dispatchEvent(new MouseEvent(`click`,{bubbles:!0,cancelable:!0})),w.current=!1,T.current=null}}Pr?k.start(20,t):t()}function n(t){if(!C.current)return;t.preventDefault(),R(t);let{movementX:n,movementY:r}=t;if(e+=s===`vertical`?r:n,Math.abs(e)>=c){e=0,w.current=!0;let i=(s===`vertical`?-r:n)*(v(t)??1);i!==0&&_(Math.abs(i),{direction:i>=0?1:-1,event:t,reason:jt})}}let r=Xn(g.current),i=fc(Ka(r,`pointerup`,t,!0),Ka(r,`pointermove`,n,!0));return()=>{k.clear(),i()}},[m,h,_,F,v,g,ee,R,s,c,b,y,x,k]),t.useEffect(function(){let e=S.current;if(!e||m||h)return;function t(e){e.touches.length===1&&e.preventDefault()}return Ka(e,`touchstart`,t)},[m,h]);let z=K(`span`,e,{ref:[i,S],state:f,props:[{role:`presentation`,style:{touchAction:`none`,WebkitUserSelect:`none`,userSelect:`none`},async onPointerDown(e){let t=!e.button||e.button===0;if(e.defaultPrevented||h||!t||m)return;let n=e.pointerType===`touch`;if(M(n),e.pointerType===`mouse`&&(e.preventDefault(),g.current?.focus()),C.current=!0,w.current=!1,T.current=Yr(e.nativeEvent),ee(!0,e.nativeEvent),!n&&!Mr)try{await ta(S.current).body.requestPointerLock(),P(!1)}catch{P(!0)}finally{C.current&&r.flushSync(()=>{ee(!0,e.nativeEvent)})}}},d],stateAttributesMapping:DS}),B=t.useMemo(()=>({isScrubbing:F,isTouchInput:j,isPointerLockDenied:N,scrubAreaCursorRef:E,scrubAreaRef:S,direction:s,pixelSensitivity:c,teleportDistance:l}),[F,j,N,s,c,l]);return(0,n.jsx)(jC.Provider,{value:B,children:z})}),process.env.NODE_ENV!==`production`&&(NC.displayName=`NumberFieldScrubArea`)})),PC,Rne=m((()=>{zr(),na(),ES(),OS(),MC(),q(),PC=t.forwardRef(function(e,n){let{render:i,className:a,style:o,...s}=e,{state:c}=wS(),{isScrubbing:l,isTouchInput:u,isPointerLockDenied:d,scrubAreaCursorRef:f}=Mne(),[p,m]=t.useState(null),h=K(`span`,e,{enabled:l&&!Mr&&!u&&!d,ref:[n,f,m],state:c,props:[{role:`presentation`,style:{position:`fixed`,top:0,left:0,pointerEvents:`none`}},s],stateAttributesMapping:DS});return h&&r.createPortal(h,ta(p).body)}),process.env.NODE_ENV!==`production`&&(PC.displayName=`NumberFieldScrubAreaCursor`)})),zne=m((()=>{Sne(),Cne(),kne(),Ane(),jne(),Lne(),Rne()})),FC=m((()=>{zne()}));function Bne(){let e=t.useContext(IC);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(98):`Base UI: OTPFieldRootContext is missing. OTPField parts must be placed within <OTPField.Root>.`);return e}function Vne(e,t,n){return{...e,value:t,index:n,filled:t!==``}}var IC,LC=m((()=>{G(),IC=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(IC.displayName=`OTPFieldRootContext`)})),RC,zC,BC=m((()=>{cm(),RC={value:()=>null,length:()=>null,...sm},zC={value:()=>null,index:()=>null,...sm}}));function VC(e){return e===`none`?null:KC[e]}function HC(e){return(e??``).replace(/\s/g,``)}function UC(e,t,n,r){let i=HC(e),a=VC(n);return a?i=i.replace(a.regexp,``):r&&(i=r(i)),Array.from(i).slice(0,Math.max(t,0)).join(``)}function WC(e,t,n,r,i,a){let o=UC(n,r,i,a);return UC(`${e.slice(0,t)}${o}${e.slice(t+o.length)}`,r,i,a)}function GC(e,t){return t<0||t>=e.length?e:`${e.slice(0,t)}${e.slice(t+1)}`}var KC,qC=m((()=>{KC={numeric:{slotPattern:`\\d{1}`,getRootPattern:e=>`\\d{${e}}`,regexp:/[^\d]/g,inputMode:`numeric`},alpha:{slotPattern:`[a-zA-Z]{1}`,getRootPattern:e=>`[a-zA-Z]{${e}}`,regexp:/[^a-zA-Z]/g,inputMode:`text`},alphanumeric:{slotPattern:`[a-zA-Z0-9]{1}`,getRootPattern:e=>`[a-zA-Z0-9]{${e}}`,regexp:/[^a-zA-Z0-9]/g,inputMode:`text`}}}));function Hne(...e){let t=e.flatMap(e=>e?.split(/\s+/).filter(Boolean)??[]);return t.length>0?Array.from(new Set(t)).join(` `):void 0}function Une(e){let{inputCount:n,length:r,sanitizeValue:i,validationType:a}=e;t.useEffect(()=>{if(!Number.isInteger(r)||r<=0||n===0||n===r)return;let e=Gt.captureOwnerStack?.()||``;ee(`<OTPField.Root> \`length\` must match the number of rendered <OTPField.Input /> parts. Received \`length={${r}}\` but rendered ${n} input${n===1?``:`s`}.`,e)},[n,r]),t.useEffect(()=>{if(Number.isInteger(r)&&r>0)return;let e=Gt.captureOwnerStack?.()||``;ee(`<OTPField.Root> \`length\` must be a positive integer. Received \`length={${String(r)}}\`.`,e)},[r]),t.useEffect(()=>{i==null||a===`none`||ee('<OTPField.Root> `sanitizeValue` is only used when `validationType="none"`.',Gt.captureOwnerStack?.()||``)},[i,a])}var JC,Wne=m((()=>{Kt(),E(),R(),F(),hc(),yc(),B(),na(),Sa(),ae(),dm(),pm(),gm(),ym(),Lg(),xm(),q(),Af(),Vt(),zt(),LC(),BC(),qC(),JC=t.forwardRef(function(e,r){let{"aria-describedby":i,"aria-labelledby":a,id:o,autoComplete:s=`one-time-code`,defaultValue:c,value:l,onValueChange:u,onValueComplete:d,form:f,length:p,autoSubmit:m=!1,mask:h=!1,inputMode:g,validationType:_=`numeric`,sanitizeValue:v,disabled:y=!1,readOnly:b=!1,required:x=!1,name:S,onValueInvalid:C,render:T,className:E,style:D,...O}=e,{setDirty:k,validityData:j,disabled:M,setFilled:N,invalid:P,name:F,state:I,validation:R,validationMode:ee,shouldValidateOnChange:z,setFocused:B,setTouched:V}=lm(),{clearErrors:te}=mm(),{getDescriptionProps:ne,labelId:re}=_m(),ie=M||y,U=F??S,[ae,oe]=w({controlled:l,default:c,name:`OTPField`,state:`value`}),se=t.useRef(null),ce=t.useRef([]),le=t.useRef(null),W=t.useRef(null),G=t.useMemo(()=>({get current(){return ce.current[0]??null}}),[]),ue=bm({id:o}),de=Pg(a,re,G,!0,ue),fe=a==null?de:void 0,pe=Hne(ne({})[`aria-describedby`],i),me=VC(_),he=me?.slotPattern,ge=me?.getRootPattern(p),_e=g??me?.inputMode,ve=Number.isInteger(p)&&p>0,ye=UC(ae,p,_,v),be=mc(ye),xe=ye!==``,[Se,Ce]=t.useState(0),[we,Te]=t.useState(()=>Math.min(ye.length,p-1)),[Ee,De]=t.useState(!1),Oe=Ee?Math.min(we,Math.max(p-1,0)):Math.min(ye.length,p-1);L(()=>{N(xe)},[xe,N]),process.env.NODE_ENV!==`production`&&Une({inputCount:Se,length:p,sanitizeValue:v,validationType:_}),fm(G,{id:ue,getValue:()=>be.current,value:ye});let ke=A(e=>{let t=Math.min(Math.max(e,0),Math.max(ce.current.length-1,0)),n=ce.current[t];n?.focus(),n?.select()}),Ae=A((e,t)=>{le.current={index:e,value:t}});function je(){let e=R.inputRef.current?.form??ce.current[0]?.form??null;if(f){let t=ta(se.current).getElementById(f);t?.tagName===`FORM`&&(e=t)}e&&typeof e.requestSubmit==`function`&&e.requestSubmit()}kf(ye,()=>{te(U),k(ye!==j.initialValue),z()?R.commit(ye):R.commit(ye,!0);let e=W.current;e!=null&&(W.current=null,e.value===ye&&(d?.(ye,e.eventDetails),m&&je()));let t=le.current;t!=null&&(le.current=null,t.value===ye&&ke(t.index))});let Me=A((e,t)=>{let n=UC(e,p,_,v);return n===be.current||(u?.(n,t),t.isCanceled)?null:(oe(n),n.length===p&&be.current.length!==p?W.current={value:n,eventDetails:Bt(t.reason,t.event)}:n.length!==p&&(W.current=null),n)}),Ne=A((e,t)=>{C?.(e,t)}),Pe=A((e,t)=>{if(e>be.current.length){ke(Math.min(be.current.length,p-1));return}Te(e),De(!0),B(!0),t.currentTarget.select()}),Fe=A(e=>{Jr(se.current,e.relatedTarget)||(V(!0),De(!1),B(!1),ee===`onBlur`&&R.commit(be.current))}),Ie=t.useCallback(e=>{if(ue!=null)return e===0?ue:`${ue}-${e+1}`},[ue]),Le=t.useMemo(()=>({...I,complete:ye.length===p,disabled:ie,filled:xe,focused:Ee,length:p,readOnly:b,required:x,value:ye}),[ie,I,xe,Ee,p,b,x,ye]),Re=t.useMemo(()=>({autoComplete:s,activeIndex:Oe,disabled:ie,form:f,focusInput:ke,queueFocusInput:Ae,getInputId:Ie,handleInputBlur:Fe,handleInputFocus:Pe,inputMode:_e,inputAriaLabelledBy:fe,invalid:P,length:p,mask:h,pattern:he,reportValueInvalid:Ne,readOnly:b,required:x,sanitizeValue:v,setValue:Me,state:Le,validationType:_,value:ye}),[Oe,s,ie,ke,f,Ie,Fe,Pe,_e,fe,P,p,h,he,Ae,b,Ne,x,v,Me,Le,_,ye]),ze=K(`div`,e,{ref:[r,se],state:Le,props:[{role:`group`,"aria-describedby":pe,"aria-labelledby":de},O],stateAttributesMapping:RC});return(0,n.jsx)(H,{elementsRef:ce,onMapChange:e=>{Ce(e.size)},children:(0,n.jsxs)(IC.Provider,{value:Re,children:[ze,ve&&(0,n.jsx)(`input`,{...R.getInputValidationProps({onFocus(){ke(0)},onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.currentTarget.value,n=UC(t,p,_,v);HC(t).length>n.length&&Ne(t,Bt(`input-change`,e.nativeEvent));let r=Me(n,J(`input-change`,e.nativeEvent));r!=null&&r!==``&&Ae(r.length-1,r)}}),ref:R.inputRef,type:`text`,id:ue&&U==null?`${ue}-hidden-input`:void 0,form:f,name:U,value:ye,autoComplete:s,inputMode:_e,minLength:p,maxLength:p,pattern:ge,disabled:ie,readOnly:b,required:x,"aria-hidden":!0,tabIndex:-1,style:U?vc:_c})]})})}),process.env.NODE_ENV!==`production`&&(JC.displayName=`OTPFieldRoot`)})),YC,Gne=m((()=>{Kt(),B(),Sa(),kn(),q(),Vt(),zt(),LC(),BC(),qC(),YC=t.forwardRef(function(e,n){let{"aria-label":r,"aria-labelledby":i,render:a,className:o,style:s,...c}=e,{activeIndex:l,autoComplete:u,disabled:d,form:f,focusInput:p,queueFocusInput:m,getInputId:h,handleInputBlur:g,handleInputFocus:_,inputMode:v,inputAriaLabelledBy:y,invalid:b,length:x,mask:S,pattern:C,reportValueInvalid:w,readOnly:T,required:E,sanitizeValue:D,setValue:O,state:k,validationType:A,value:j}=Bne(),{ref:M,index:N}=Dn({indexGuessBehavior:On.GuessFromOrder}),P=t.useRef(null),F=j[N]??``,I=Vne(k,F,N),L=r,R=i??y,z=N===0?void 0:L;process.env.NODE_ENV!==`production`&&t.useEffect(()=>{N!==0||L==null||P.current?.labels?.length||ee("<OTPField.Input> ignores `aria-label` on the first input. Use a `<label>` or `<Field.Label>` to label the OTP field.",Gt.captureOwnerStack?.()||``)},[N,L]);let B={id:h(N),value:F,type:S?`password`:`text`,inputMode:v,autoComplete:N===0?u:`off`,autoCorrect:`off`,spellCheck:`false`,enterKeyHint:N===x-1?`done`:`next`,maxLength:N===0?x:1,tabIndex:l===N?0:-1,disabled:d,form:f,pattern:C,readOnly:T,required:E,"aria-labelledby":z==null?R:void 0,"aria-invalid":b||void 0,"aria-label":z,onMouseDown(e){e.defaultPrevented||d||(e.preventDefault(),p(N))},onFocus(e){e.defaultPrevented||d||_(N,e)},onBlur(e){e.defaultPrevented||g(e)},onChange(e){if(e.defaultPrevented||d||T)return;let t=e.currentTarget.value,n=UC(e.currentTarget.value,x,A,D);if(HC(t).length>n.length&&w(t,Bt(bt,e.nativeEvent)),n===``){t===``?O(GC(j,N),J(xt,e.nativeEvent)):F!==``&&(e.currentTarget.value=F,e.currentTarget.select());return}let r=O(WC(j,N,n,x,A,D),J(bt,e.nativeEvent));r!=null&&m(Math.min(N+n.length,x-1),r)},onKeyDown(e){if(e.defaultPrevented||d)return;if(e.key===`ArrowLeft`){ci(e),p(Math.max(0,N-1));return}if(e.key===`ArrowRight`){ci(e),p(Math.min(x-1,N+1));return}if(e.key===`Home`){ci(e),p(0);return}if(e.key===`End`){ci(e),p(Math.max(j.length-1,0));return}if(T)return;if(e.key===`Delete`){ci(e);let t=O(GC(j,N),J(kt,e.nativeEvent));t!=null&&m(N,t);return}let t=e.currentTarget.value,n=e.currentTarget.selectionStart===0&&e.currentTarget.selectionEnd===t.length;if(e.key.length===1&&n&&F===e.key){ci(e),p(Math.min(x-1,N+1));return}if(e.key===`Backspace`){ci(e);let t=F===``?Math.max(0,N-1):N,n=Math.max(0,N-1),r=O(GC(j,t),J(kt,e.nativeEvent));r!=null&&m(n,r)}},onPaste(e){if(e.defaultPrevented||d||T)return;let t=``;try{t=e.clipboardData?.getData(`text/plain`)??``}catch{process.env.NODE_ENV!==`production`&&ee(`<OTPField.Input> could not read clipboard text during paste handling.`,Gt.captureOwnerStack?.()||``);return}e.preventDefault();let n=UC(t,x,A,D);if(HC(t).length>n.length&&w(t,Bt(Ct,e.nativeEvent)),n===``)return;let r=O(WC(j,N,n,x,A,D),J(Ct,e.nativeEvent));r!=null&&m(Math.min(N+n.length,x-1),r)}};return K(`input`,e,{ref:[n,M,P],state:I,props:[B,c],stateAttributesMapping:zC})}),process.env.NODE_ENV!==`production`&&(YC.displayName=`OTPFieldInput`)})),Kne=m((()=>{Wne(),Gne(),hg()})),XC=m((()=>{Kne()}));function ZC(e){let n=t.useContext(QC);if(n===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?W(47):`Base UI: PopoverRootContext is missing. Popover parts must be placed within <Popover.Root>.`);return n}var QC,$C=m((()=>{G(),QC=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(QC.displayName=`PopoverRootContext`)}));function qne(){return{...Nd(),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}var ew,tw,nw=m((()=>{bd(),$s(),k(),nn(),zt(),Ld(),Yc(),ew={...Fd,disabled:Z(e=>e.disabled),instantType:Z(e=>e.instantType),openMethod:Z(e=>e.openMethod),openChangeReason:Z(e=>e.openChangeReason),modal:Z(e=>e.modal),focusManagerModal:Z(e=>e.focusManagerModal),stickIfOpen:Z(e=>e.stickIfOpen),titleElementId:Z(e=>e.titleElementId),descriptionElementId:Z(e=>e.descriptionElementId),openOnHover:Z(e=>e.openOnHover),closeDelay:Z(e=>e.closeDelay),hasViewport:Z(e=>e.hasViewport)},tw=class e extends hd{constructor(e){let n={...qne(),...e};n.open&&e?.mounted===void 0&&(n.mounted=!0),super(n,{popupRef:t.createRef(),backdropRef:t.createRef(),internalBackdropRef:t.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:t.createRef(),beforeContentFocusGuardRef:t.createRef(),stickIfOpenTimeout:new Qs,triggerElements:new kd},ew)}setOpen=(e,t)=>{let n=t.reason===ut,i=t.reason===`trigger-press`&&t.event.detail===0,a=!e&&(t.reason===`escape-key`||t.reason==null);if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let o=()=>{let n={open:e,openChangeReason:t.reason},r=t.trigger?.id??null;(r||e)&&(n.activeTriggerId=r,n.activeTriggerElement=t.trigger??null),this.update(n)};n?(this.set(`stickIfOpen`,!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set(`stickIfOpen`,!1)}),r.flushSync(o)):o(),i||a?this.set(`instantType`,i?`click`:`dismiss`):t.reason===`focus-out`?this.set(`instantType`,`focus`):this.set(`instantType`,void 0)};static useStore(t,n){let r=D(()=>new e(n)).current,i=t??r;return en(r.disposeEffect),i}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}}));function rw({props:e}){let{children:r,open:i,defaultOpen:a=!1,onOpenChange:o,onOpenChangeComplete:s,modal:c=!1,handle:l,triggerId:u,defaultTriggerId:d=null}=e,f=tw.useStore(l?.store,{modal:c,open:a,openProp:i,activeTriggerId:d,triggerIdProp:u});Js(()=>{i===void 0&&f.state.open===!1&&a===!0&&f.update({open:!0,activeTriggerId:d})}),f.useControlledProp(`openProp`,i),f.useControlledProp(`triggerIdProp`,u);let p=f.useState(`open`),m=f.useState(`payload`);f.useContextCallback(`onOpenChange`,o),f.useContextCallback(`onOpenChangeComplete`,s);let{openMethod:h,triggerProps:g}=jf(p);Ed(f);let{forceUnmount:_}=Dd(p,f,()=>{f.update({stickIfOpen:!0,openChangeReason:null})});t.useEffect(()=>{p||f.context.stickIfOpenTimeout.clear()},[f,p]);let v=t.useCallback(()=>{f.setOpen(!1,J(Ft))},[f]);t.useImperativeHandle(e.actionsRef,()=>({unmount:_,close:v}),[_,v]);let y=Hd({popupStore:f,onOpenChange:f.setOpen}),{getReferenceProps:b,getFloatingProps:x,getTriggerProps:S}=af([Sl(y,{outsidePressEvent:{mouse:c===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),_f(y)]),C=t.useMemo(()=>b(g),[b,g]),w=t.useMemo(()=>S(g),[S,g]),T=t.useMemo(()=>x(),[x]);f.useSyncedValues({modal:c,openMethod:h,activeTriggerProps:C,inactiveTriggerProps:w,popupProps:T,floatingRootContext:y,nested:dl()!=null});let E=t.useMemo(()=>({store:f}),[f]);return(0,n.jsx)(QC.Provider,{value:E,children:typeof r==`function`?r({payload:m}):r})}function Jne(e){return ZC(!0)?(0,n.jsx)(rw,{props:e}):(0,n.jsx)(cl,{children:(0,n.jsx)(rw,{props:e})})}var Yne=m((()=>{Ys(),Of(),$C(),nw(),Vt(),zt(),Ld(),Mf()})),Xne=m((()=>{})),iw,Zne=m((()=>{G(),$C(),Er(),ep(),q(),Yc(),Of(),Xne(),$t(),xc(),zt(),Ld(),oy(),iw=t.forwardRef(function(e,r){let{render:i,className:a,disabled:o=!1,nativeButton:s=!0,handle:c,payload:l,openOnHover:u=!1,delay:d=300,closeDelay:f=0,id:p,style:m,...h}=e,g=ZC(!0),_=c?.store??g?.store;if(!_)throw Error(process.env.NODE_ENV===`production`?W(74):`Base UI: <Popover.Trigger> must be either used within a <Popover.Root> component or provided with a handle.`);let v=Qt(p),y=_.useState(`isTriggerActive`,v),b=_.useState(`floatingRootContext`),x=_.useState(`isOpenedByTrigger`,v),S=t.useRef(null),{registerTrigger:C,isMountedByThisTrigger:w}=Td(v,S,_,{payload:l,disabled:o,openOnHover:u,closeDelay:f}),T=_.useState(`openChangeReason`),E=_.useState(`stickIfOpen`),D=_.useState(`openMethod`),O=_.useState(`focusManagerModal`),k=tf(b,{enabled:b!=null&&u&&(D!==`touch`||T!==`trigger-press`),mouseOnly:!0,move:!1,handleClose:wf(),restMs:d,delay:{close:f},triggerElementRef:S,isActiveTrigger:y,isClosing:()=>_.select(`transitionStatus`)===`ending`}),A=af([bl(b,{enabled:b!=null,stickIfOpen:E})]),j=_.useState(`triggerProps`,w),M={disabled:o,open:x},{getButtonProps:N,buttonRef:P}=wr({disabled:o,native:s}),F=t.useMemo(()=>({open(e){return e&&T===`trigger-press`?Qf.open(e):Zf.open(e)}}),[T]),I=K(`button`,e,{state:M,ref:[P,r,C,S],props:[A.getReferenceProps(),k,j,{[Vc]:``,id:v},h,N],stateAttributesMapping:F}),{preFocusGuardRef:L,handlePreFocusGuardFocus:R,handleFocusTargetFocus:ee}=ay(_,S);return y&&!O?(0,n.jsxs)(t.Fragment,{children:[(0,n.jsx)(bc,{ref:L,onFocus:R}),(0,n.jsx)(t.Fragment,{children:I},v),(0,n.jsx)(bc,{ref:_.context.triggerFocusTargetRef,onFocus:ee})]}):(0,n.jsx)(t.Fragment,{children:I},v)}),process.env.NODE_ENV!==`production`&&(iw.displayName=`PopoverTrigger`)}));function Qne(){let e=t.useContext(aw);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(45):`Base UI: <Popover.Portal> is missing.`);return e}var aw,ow=m((()=>{G(),aw=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(aw.displayName=`PopoverPortalContext`)})),sw,$ne=m((()=>{Of(),$C(),ow(),sw=t.forwardRef(function(e,t){let{keepMounted:r=!1,...i}=e,{store:a}=ZC();return a.useState(`mounted`)||r?(0,n.jsx)(aw.Provider,{value:r,children:(0,n.jsx)(el,{ref:t,...i})}):null}),process.env.NODE_ENV!==`production`&&(sw.displayName=`PopoverPortal`)}));function cw(){let e=t.useContext(lw);if(!e)throw Error(process.env.NODE_ENV===`production`?W(46):`Base UI: PopoverPositionerContext is missing. PopoverPositioner parts must be placed within <Popover.Positioner>.`);return e}var lw,uw=m((()=>{G(),lw=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(lw.displayName=`PopoverPositionerContext`)})),dw,ere=m((()=>{_p(),R(),Of(),$C(),uw(),Lh(),ow(),yp(),zt(),Yc(),yn(),Mh(),Vh(),Wh(),dw=t.forwardRef(function(e,r){let{render:i,className:a,anchor:o,positionMethod:s=`absolute`,side:c=`bottom`,align:l=`center`,sideOffset:u=0,alignOffset:d=0,collisionBoundary:f=`clipping-ancestors`,collisionPadding:p=5,arrowPadding:m=5,sticky:h=!1,disableAnchorTracking:g=!1,collisionAvoidance:_=qc,style:v,...y}=e,{store:b}=ZC(),x=Qne(),S=ol(),C=b.useState(`floatingRootContext`),w=b.useState(`mounted`),T=b.useState(`open`),E=b.useState(`openChangeReason`),D=b.useState(`activeTriggerElement`),O=b.useState(`modal`),k=b.useState(`openMethod`),A=b.useState(`positionerElement`),j=b.useState(`instantType`),M=b.useState(`transitionStatus`),N=b.useState(`hasViewport`),P=t.useRef(null),F=vn(A,!1,!1),I=Fh({anchor:o,floatingRootContext:C,positionMethod:s,mounted:w,side:c,sideOffset:u,align:l,alignOffset:d,arrowPadding:m,collisionBoundary:f,collisionPadding:p,sticky:h,disableAnchorTracking:g,keepMounted:x,nodeId:S,collisionAvoidance:_,adaptiveOrigin:N?jh:void 0}),R=C.useState(`domReferenceElement`);L(()=>{let e=R,t=P.current;if(e&&(P.current=e),t&&e&&e!==t){b.set(`instantType`,void 0);let e=new AbortController;return F(()=>{b.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[R,F,b]);let ee={open:T,side:I.side,align:I.align,anchorHidden:I.anchorHidden,instant:j};Hh(T&&O===!0&&E!==`trigger-hover`,k===`touch`,A,D);let z=t.useCallback(e=>{b.set(`positionerElement`,e)},[b]),B=Bh(e,ee,{styles:I.positionerStyles,transitionStatus:M,props:y,refs:[r,z],hidden:!w,inert:!T});return(0,n.jsxs)(lw.Provider,{value:I,children:[w&&O===!0&&E!==`trigger-hover`&&(0,n.jsx)(vp,{ref:b.context.internalBackdropRef,inert:gp(!T),cutout:D}),(0,n.jsx)(sl,{id:S,children:B})]})}),process.env.NODE_ENV!==`production`&&(dw.displayName=`PopoverPositioner`)}));function tre(){let[e,n]=t.useState(0),r=A(()=>(n(e=>e+1),()=>{n(e=>Math.max(0,e-1))}));return{context:t.useMemo(()=>({register:r}),[r]),hasClosePart:e>0}}function nre(e){let{value:t,children:r}=e;return(0,n.jsx)(fw.Provider,{value:t,children:r})}var fw,pw=m((()=>{F(),fw=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(fw.displayName=`ClosePartContext`)})),mw,hw,rre=m((()=>{yr(),Of(),$C(),uw(),ep(),_n(),$a(),q(),zt(),Ga(),xv(),zh(),pw(),mw={...$f,...gn},hw=t.forwardRef(function(e,r){let{className:i,render:a,initialFocus:o,finalFocus:s,style:c,...l}=e,{store:u}=ZC(),d=cw(),f=yv(!0)!=null,{context:p,hasClosePart:m}=tre(),h=u.useState(`open`),g=u.useState(`openMethod`),_=u.useState(`instantType`),v=u.useState(`transitionStatus`),y=u.useState(`popupProps`),b=u.useState(`titleElementId`),x=u.useState(`descriptionElementId`),S=u.useState(`modal`),C=u.useState(`mounted`),w=u.useState(`openChangeReason`),T=u.useState(`activeTriggerElement`),E=u.useState(`floatingRootContext`);Qa({open:h,ref:u.context.popupRef,onComplete(){h&&u.context.onOpenChangeComplete?.(!0)}});let D=u.useState(`disabled`),O=u.useState(`openOnHover`),k=u.useState(`closeDelay`);$d(E,{enabled:O&&!D,closeDelay:k});function A(e){return e===`touch`?u.context.popupRef.current:!0}let j=o===void 0?A:o,M={open:h,side:d.side,align:d.align,instant:_,transitionStatus:v},N=S!==!1&&m;u.useSyncedValue(`focusManagerModal`,N);let P=t.useCallback(e=>{u.set(`popupElement`,e)},[u]),F=K(`div`,e,{state:M,ref:[r,u.context.popupRef,P],props:[y,{"aria-labelledby":b,"aria-describedby":x,onKeyDown(e){f&&Ba.has(e.key)&&e.stopPropagation()}},Rh(v),l],stateAttributesMapping:mw});return(0,n.jsx)(_l,{context:E,openInteractionType:g,modal:N,disabled:!C||w===`trigger-hover`,initialFocus:j,returnFocus:s,restoreFocus:`popup`,previousFocusableElement:er(T)?T:void 0,nextFocusableElement:u.context.triggerFocusTargetRef,beforeContentFocusGuardRef:u.context.beforeContentFocusGuardRef,children:(0,n.jsx)(nre,{value:p,children:F})})}),process.env.NODE_ENV!==`production`&&(hw.displayName=`PopoverPopup`)})),gw,ire=m((()=>{uw(),$C(),ep(),q(),gw=t.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,{store:o}=ZC(),s=o.useState(`open`),{arrowRef:c,side:l,align:u,arrowUncentered:d,arrowStyles:f}=cw();return K(`div`,e,{state:{open:s,side:l,align:u,uncentered:d},ref:[t,c],props:[{style:f,"aria-hidden":!0},a],stateAttributesMapping:$f})}),process.env.NODE_ENV!==`production`&&(gw.displayName=`PopoverArrow`)})),_w,are=m((()=>{R(),$C(),q(),$t(),_w=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o}=ZC(),s=Qt(a.id);return L(()=>(o.set(`titleElementId`,s),()=>{o.set(`titleElementId`,void 0)}),[o,s]),K(`h2`,e,{ref:t,props:[{id:s},a]})}),process.env.NODE_ENV!==`production`&&(_w.displayName=`PopoverTitle`)})),vw,ore=m((()=>{R(),$C(),$t(),q(),vw=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o}=ZC(),s=Qt(a.id);return L(()=>(o.set(`descriptionElementId`,s),()=>{o.set(`descriptionElementId`,void 0)}),[o,s]),K(`p`,e,{ref:t,props:[{id:s},a]})}),process.env.NODE_ENV!==`production`&&(vw.displayName=`PopoverDescription`)})),yw,sre=m((()=>{yw=function(e){return e.popupWidth=`--popup-width`,e.popupHeight=`--popup-height`,e}({})})),bw,xw,cre=m((()=>{$C(),uw(),q(),sre(),by(),bw={activationDirection:e=>e?{"data-activation-direction":e}:null},xw=t.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,{store:s}=ZC(),{side:c}=cw(),l=s.useState(`instantType`),{children:u,state:d}=lne({store:s,side:c,cssVars:yw,children:a});return K(`div`,e,{state:{activationDirection:d.activationDirection,transitioning:d.transitioning,instant:l},ref:t,props:[o,{children:u}],stateAttributesMapping:bw})}),process.env.NODE_ENV!==`production`&&(xw.displayName=`PopoverViewport`)}));function lre(){return new Sw}var Sw,ure=m((()=>{G(),Vt(),zt(),nw(),Sw=class{constructor(){this.store=new tw}open(e){let t=e?this.store.context.triggerElements.getById(e)??void 0:void 0;if(e&&!t)throw Error(process.env.NODE_ENV===`production`?W(80,e):`Base UI: PopoverHandle.open: No trigger found with id "${e}".`);this.store.setOpen(!0,J(Ft,void 0,t))}close(){this.store.setOpen(!1,J(Ft,void 0,void 0))}get isOpen(){return this.store.state.open}}})),dre=m((()=>{Yne(),Zne(),$ne(),ere(),rre(),ire(),$C(),ep(),_n(),q(),zt(),are(),ore(),Dr(),Vt(),pw(),cre(),ure()})),Cw=m((()=>{dre()})),ww,Tw=m((()=>{Of(),ww=t.forwardRef(function(e,i){let{children:a,container:o,className:s,render:c,style:l,...u}=e,{portalNode:d,portalSubtree:f}=Xc({container:o,ref:i,componentProps:e,elementProps:u});return!f&&!d?null:(0,n.jsxs)(t.Fragment,{children:[f,d&&r.createPortal(a,d)]})}),process.env.NODE_ENV!==`production`&&(ww.displayName=`FloatingPortalLite`)})),fre=m((()=>{R(),Ys(),Of(),G(),Vt(),zt(),bd(),k(),Ld(),Tw(),ep(),q(),$t(),Lh(),Yc(),Mh(),Vh(),F(),_n(),$a(),zh(),by()})),pre=m((()=>{hc(),yc(),cS(),q(),G(),mS(),x_()})),Ew,mre=m((()=>{Ew=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}({})})),Dw,Ow=m((()=>{_n(),cm(),mre(),Dw={checked(e){return e?{[Ew.checked]:``}:{[Ew.unchecked]:``}},...gn,...sm}}));function hre(){return t.useContext(kw)}var kw,Aw=m((()=>{kw=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(kw.displayName=`RadioGroupContext`)}));function gre(){let e=t.useContext(jw);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(52):`Base UI: RadioRootContext is missing. Radio parts must be placed within <Radio.Root>.`);return e}var jw,Mw=m((()=>{G(),jw=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(jw.displayName=`RadioRootContext`)})),Nw,_re=m((()=>{ye(),R(),F(),yc(),Ae(),Vt(),zt(),nm(),Ow(),$t(),q(),Dr(),Kx(),ny(),dm(),Ng(),ym(),Lg(),xm(),Aw(),Kp(),Mw(),Nw=t.forwardRef(function(e,r){let{render:i,className:a,disabled:o=!1,readOnly:s=!1,required:c=!1,"aria-labelledby":l,value:u,inputRef:d,nativeButton:f=!1,id:p,style:m,...h}=e,g=hre(),{disabled:_,readOnly:v,required:y,form:b,checkedValue:x,touched:S=!1,validation:C,name:w}=g??{},T=g?.setCheckedValue??De,E=g?.setTouched??De,D=g?.registerControlRef??De,O=g?.registerInputRef??De,{setDirty:k,validityData:j,setTouched:M,setFilled:N,state:P,disabled:F}=lm(),I=jg(),{labelId:R,getDescriptionProps:ee}=_m(),z=F||I.disabled||_||o,B=v||s,V=y||c,te=b,ne=g?x===u:u===``,H=t.useMemo(()=>Gp(u),[u]),re=t.useRef(null),ie=t.useRef(null),U=A(e=>{e&&D(e,z)}),ae=pe(d,ie,O);L(()=>{ie.current?.checked&&N(!0)},[N]),L(()=>{if(ie.current){if(z&&ne){O(null);return}re.current&&D(re.current,z),O(ie.current)}},[ne,z,D,O]);let oe=Qt(),se=bm({id:p,implicit:!1,controlRef:re}),ce=f?void 0:se,le=Pg(l,R,ie,!f,ce),W={role:`radio`,"aria-checked":ne,"aria-required":V||void 0,"aria-readonly":B||void 0,"aria-labelledby":le,[Gx]:ne?``:void 0,id:f?se:oe,onKeyDown(e){e.key===`Enter`&&e.preventDefault()},onClick(e){e.defaultPrevented||z||B||(e.preventDefault(),ie.current?.dispatchEvent(new PointerEvent(`click`,{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey})))},onFocus(e){e.defaultPrevented||z||B||!S||(ie.current?.click(),E(!1))}},{getButtonProps:G,buttonRef:ue}=wr({disabled:z,native:f}),de={type:`radio`,ref:ae,form:te,id:ce,name:w,tabIndex:-1,style:w?vc:_c,"aria-hidden":!0,...u===void 0?ke:{value:H},disabled:z,checked:ne,required:V,readOnly:B,onChange(e){if(e.nativeEvent.defaultPrevented||z||B||u===void 0)return;let t=J(ct,e.nativeEvent);t.isCanceled||(M(!0),k(u!==j.initialValue),N(!0),T(u,t))},onFocus(){re.current?.focus()}},fe=t.useMemo(()=>({...P,required:V,disabled:z,readOnly:B,checked:ne}),[P,z,B,ne,V]),me=fe,he=g!==void 0,ge=[r,re,ue,U],_e=[W,ee,C?.getValidationProps??ke,h,G],ve=K(`span`,e,{enabled:!he,state:fe,ref:ge,props:_e,stateAttributesMapping:Dw});return(0,n.jsxs)(jw.Provider,{value:me,children:[he?(0,n.jsx)(ty,{tag:`span`,render:i,className:a,style:m,state:fe,refs:ge,props:_e,stateAttributesMapping:Dw}):ve,(0,n.jsx)(`input`,{...de,suppressHydrationWarning:!0})]})}),process.env.NODE_ENV!==`production`&&(Nw.displayName=`RadioRoot`)})),Pw,vre=m((()=>{q(),Mw(),Ow(),$a(),xn(),Pw=t.forwardRef(function(e,n){let{render:r,className:i,style:a,keepMounted:o=!1,...s}=e,c=gre(),l=c.checked,{mounted:u,transitionStatus:d,setMounted:f}=bn(l),p={...c,transitionStatus:d},m=t.useRef(null),h=o||u,g=K(`span`,e,{ref:[n,m],state:p,props:s,stateAttributesMapping:Dw});return Qa({open:l,ref:m,onComplete(){l||f(!1)}}),h?g:null}),process.env.NODE_ENV!==`production`&&(Pw.displayName=`RadioIndicator`)})),yre=m((()=>{_re(),vre()})),bre=m((()=>{yre()})),Fw,Iw,xre=m((()=>{E(),F(),$t(),Sa(),Ga(),Qx(),dm(),pm(),cm(),Fx(),gm(),ym(),Af(),Aw(),Fw=[Va],Iw=t.forwardRef(function(e,r){let{render:i,className:a,disabled:o,readOnly:s,required:c,onValueChange:l,value:u,defaultValue:d,form:f,name:p,inputRef:m,id:h,style:g,..._}=e,{setTouched:v,setFocused:y,shouldValidateOnChange:b,validationMode:x,name:S,disabled:C,state:T,validation:E,setDirty:D,setFilled:O,validityData:k}=lm(),{labelId:j}=_m(),{clearErrors:M}=mm(),N=Nx(!0),P=C||o,F=S??p,I=Qt(h),[L,R]=w({controlled:u,default:d,name:`RadioGroup`,state:`value`}),ee=A(l),z=A((e,t)=>{ee(e,t),!t.isCanceled&&R(e)}),B=t.useRef(null),V=t.useRef(null),te=t.useRef(null);function ne(e){let t;return m&&(typeof m==`function`?t=m(e):m.current=e),V.current=e,E.inputRef.current=e,t}let H=A((e,t=!1)=>{if(e){if(t){B.current===e&&(B.current=null);return}B.current??=e}}),re=A(e=>{if(!e||e.disabled)return;te.current||=e;let t=V.current;if(e.checked||t==null||t.disabled)return ne(e)});fm(B,{id:I,value:L,getValue:A(()=>L??null)}),kf(L,()=>{M(F),D(L!==k.initialValue),O(L!=null),b()?E.commit(L):E.commit(L,!0);let e=te.current;L==null&&e&&!e.disabled&&ne(e)});let[ie,U]=t.useState(!1),ae=_[`aria-labelledby`]??j??N?.legendId,oe={...T,disabled:P??!1,required:c??!1,readOnly:s??!1},se=t.useMemo(()=>({...T,checkedValue:L,disabled:P,form:f,validation:E,name:F,onValueChange:ee,readOnly:s,registerControlRef:H,registerInputRef:re,required:c,setCheckedValue:z,setTouched:U,touched:ie}),[L,P,f,E,T,F,ee,s,H,re,c,z,U,ie]),ce={role:`radiogroup`,"aria-required":c||void 0,"aria-disabled":P||void 0,"aria-readonly":s||void 0,"aria-labelledby":ae,onFocus(){y(!0)},onBlur(e){Jr(e.currentTarget,e.relatedTarget)||(v(!0),y(!1),x===`onBlur`&&E.commit(L))},onKeyDownCapture(e){e.key.startsWith(`Arrow`)&&(v(!0),U(!0),y(!0))}};return(0,n.jsx)(kw.Provider,{value:se,children:(0,n.jsx)(Zx,{render:i,className:a,style:g,state:oe,props:[ce,E.getValidationProps,_],refs:[r],stateAttributesMapping:sm,enableHomeAndEndKeys:!1,modifierKeys:Fw})})}),process.env.NODE_ENV!==`production`&&(Iw.displayName=`RadioGroup`)})),Sre=m((()=>{xre()}));function Lw(){let e=t.useContext(Rw);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(53):`Base UI: ScrollAreaRootContext is missing. ScrollArea parts must be placed within <ScrollArea.Root>.`);return e}var Rw,zw=m((()=>{G(),Rw=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(Rw.displayName=`ScrollAreaRootContext`)})),Bw,Vw=m((()=>{Bw=function(e){return e.scrollAreaCornerHeight=`--scroll-area-corner-height`,e.scrollAreaCornerWidth=`--scroll-area-corner-width`,e}({})})),Hw=m((()=>{}));function Uw(e,t,n){if(!e)return 0;let r=getComputedStyle(e),i=n===`x`?`Inline`:`Block`;return n===`x`&&t===`margin`?parseFloat(r[`${t}InlineStart`])*2:parseFloat(r[`${t}${i}Start`])+parseFloat(r[`${t}${i}End`])}var Ww=m((()=>{})),Gw,Cre=m((()=>{Gw=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}({})})),Kw,qw,Jw=m((()=>{Kw=`base-ui-disable-scrollbar`,qw={className:Kw,getElement(e){return(0,n.jsx)(`style`,{nonce:e,href:Kw,precedence:`base-ui:low`,children:`.${Kw}{scrollbar-width:none}.${Kw}::-webkit-scrollbar{display:none}`})}},process.env.NODE_ENV!==`production`&&(qw.getElement.displayName=`styleDisableScrollbar.getElement`)})),Yw,wre=m((()=>{Yw=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}({})})),Xw,Zw=m((()=>{wre(),Xw={hasOverflowX:e=>e?{[Yw.hasOverflowX]:``}:null,hasOverflowY:e=>e?{[Yw.hasOverflowY]:``}:null,overflowXStart:e=>e?{[Yw.overflowXStart]:``}:null,overflowXEnd:e=>e?{[Yw.overflowXEnd]:``}:null,overflowYStart:e=>e?{[Yw.overflowYStart]:``}:null,overflowYEnd:e=>e?{[Yw.overflowYEnd]:``}:null,cornerHidden:()=>null}}));function Tre(e){if(typeof e==`number`){let t=Math.max(0,e);return{xStart:t,xEnd:t,yStart:t,yEnd:t}}return{xStart:Math.max(0,e?.xStart||0),xEnd:Math.max(0,e?.xEnd||0),yStart:Math.max(0,e?.yStart||0),yEnd:Math.max(0,e?.yEnd||0)}}var Qw,$w,eT,tT,nT,Ere=m((()=>{F(),$s(),zw(),q(),Vw(),Hw(),Ww(),Cre(),Jw(),$t(),Zw(),Sa(),Dy(),Qw={x:0,y:0},$w={width:0,height:0},eT={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},tT={x:!0,y:!0,corner:!0},nT=t.forwardRef(function(e,r){let{render:i,className:a,overflowEdgeThreshold:o,style:s,...c}=e,l=Tre(o),u=Qt(),d=Xs(),f=Xs(),{nonce:p,disableStyleElements:m}=wy(),[h,g]=t.useState(!1),[_,v]=t.useState(!1),[y,b]=t.useState(!1),[x,S]=t.useState(!1),[C,w]=t.useState(!1),[T,E]=t.useState($w),[D,O]=t.useState($w),[k,j]=t.useState(eT),[M,N]=t.useState(tT),P=t.useRef(null),F=t.useRef(null),I=t.useRef(null),L=t.useRef(null),R=t.useRef(null),ee=t.useRef(null),z=t.useRef(null),B=t.useRef(!1),V=t.useRef(0),te=t.useRef(0),ne=t.useRef(0),H=t.useRef(0),re=t.useRef(`vertical`),ie=t.useRef(Qw),U=A(e=>{let t=e.x-ie.current.x,n=e.y-ie.current.y;ie.current=e,n!==0&&(b(!0),d.start(500,()=>{b(!1)})),t!==0&&(v(!0),f.start(500,()=>{v(!1)}))}),ae=A(e=>{e.button===0&&(B.current=!0,V.current=e.clientY,te.current=e.clientX,re.current=e.currentTarget.getAttribute(Gw.orientation),F.current&&(ne.current=F.current.scrollTop,H.current=F.current.scrollLeft),R.current&&re.current===`vertical`&&R.current.setPointerCapture(e.pointerId),ee.current&&re.current===`horizontal`&&ee.current.setPointerCapture(e.pointerId))}),oe=A(e=>{if(!B.current)return;let t=e.clientY-V.current,n=e.clientX-te.current;if(F.current){let r=F.current.scrollHeight,i=F.current.clientHeight,a=F.current.scrollWidth,o=F.current.clientWidth;if(R.current&&I.current&&re.current===`vertical`){let n=Uw(I.current,`padding`,`y`),a=Uw(R.current,`margin`,`y`),o=R.current.offsetHeight,s=t/(I.current.offsetHeight-o-n-a);F.current.scrollTop=ne.current+s*(r-i),e.preventDefault(),b(!0),d.start(500,()=>{b(!1)})}if(ee.current&&L.current&&re.current===`horizontal`){let t=Uw(L.current,`padding`,`x`),r=Uw(ee.current,`margin`,`x`),i=ee.current.offsetWidth,s=n/(L.current.offsetWidth-i-t-r);F.current.scrollLeft=H.current+s*(a-o),e.preventDefault(),v(!0),f.start(500,()=>{v(!1)})}}}),se=A(e=>{B.current=!1,R.current&&re.current===`vertical`&&R.current.releasePointerCapture(e.pointerId),ee.current&&re.current===`horizontal`&&ee.current.releasePointerCapture(e.pointerId)});function ce(e){S(e.pointerType===`touch`)}function le(e){ce(e),e.pointerType!==`touch`&&g(Jr(P.current,e.target))}let W=t.useMemo(()=>({scrolling:_||y,hasOverflowX:!M.x,hasOverflowY:!M.y,overflowXStart:k.xStart,overflowXEnd:k.xEnd,overflowYStart:k.yStart,overflowYEnd:k.yEnd,cornerHidden:M.corner}),[_,y,M.x,M.y,M.corner,k]),G={role:`presentation`,onPointerEnter:le,onPointerMove:le,onPointerDown:ce,onPointerLeave(){g(!1)},style:{position:`relative`,[Bw.scrollAreaCornerHeight]:`${T.height}px`,[Bw.scrollAreaCornerWidth]:`${T.width}px`}},ue=K(`div`,e,{state:W,ref:[r,P],props:[G,c],stateAttributesMapping:Xw}),de=t.useMemo(()=>({handlePointerDown:ae,handlePointerMove:oe,handlePointerUp:se,handleScroll:U,cornerSize:T,setCornerSize:E,thumbSize:D,setThumbSize:O,hasMeasuredScrollbar:C,setHasMeasuredScrollbar:w,touchModality:x,cornerRef:z,scrollingX:_,setScrollingX:v,scrollingY:y,setScrollingY:b,hovering:h,setHovering:g,viewportRef:F,rootRef:P,scrollbarYRef:I,scrollbarXRef:L,thumbYRef:R,thumbXRef:ee,rootId:u,hiddenState:M,setHiddenState:N,overflowEdges:k,setOverflowEdges:j,viewportState:W,overflowEdgeThreshold:l}),[ae,oe,se,U,T,D,C,x,_,v,y,b,h,g,u,M,k,W,l]);return(0,n.jsxs)(Rw.Provider,{value:de,children:[!m&&qw.getElement(p),ue]})}),process.env.NODE_ENV!==`production`&&(nT.displayName=`ScrollAreaRoot`)})),rT,iT=m((()=>{rT=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(rT.displayName=`ScrollAreaViewportContext`)})),aT,Dre=m((()=>{aT=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}({})}));function oT(e,t){return Math.max(0,e-t)}function sT(e,t){if(t<=0)return 0;let n=ib(e,0,t),r=n,i=t-n,a=r<=1,o=i<=1;return a&&o?r<=i?0:t:a?0:o?t:n}var cT=m((()=>{ab()}));function Ore(){lT||Mr||(typeof CSS<`u`&&`registerProperty`in CSS&&[aT.scrollAreaOverflowXStart,aT.scrollAreaOverflowXEnd,aT.scrollAreaOverflowYStart,aT.scrollAreaOverflowYEnd].forEach(e=>{try{CSS.registerProperty({name:e,syntax:`<length>`,inherits:!1,initialValue:`0px`})}catch{}}),lT=!0)}function kre(e){let t=e.clientHeight>=e.scrollHeight,n=e.clientWidth>=e.scrollWidth;return{y:t,x:n,corner:t||n}}function Are(e,t){return e.y===t.y&&e.x===t.x&&e.corner===t.corner?e:t}var lT,uT,jre=m((()=>{F(),R(),zr(),$s(),zw(),iT(),q(),ce(),Ww(),Hw(),ab(),Jw(),Zw(),Dre(),cT(),lT=!1,uT=t.forwardRef(function(e,r){let{render:i,className:a,style:o,...s}=e,{viewportRef:c,scrollbarYRef:l,scrollbarXRef:u,thumbYRef:d,thumbXRef:f,cornerRef:p,cornerSize:m,setCornerSize:h,setThumbSize:g,rootId:_,setHiddenState:v,hiddenState:y,setHasMeasuredScrollbar:b,handleScroll:x,setHovering:S,setOverflowEdges:C,overflowEdges:w,overflowEdgeThreshold:T,scrollingX:E,scrollingY:D}=Lw(),O=oe(),k=t.useRef(!0),j=t.useRef([NaN,NaN,NaN,NaN]),M=Xs(),N=Xs(),P=A(()=>{let e=c.current,t=l.current,n=u.current,r=d.current,i=f.current,a=p.current;if(!e)return;let o=e.scrollHeight,s=e.scrollWidth,_=e.clientHeight,y=e.clientWidth,x=e.scrollTop,S=e.scrollLeft,w=j.current,E=Number.isNaN(w[0]);if(w[0]=_,w[1]=o,w[2]=y,w[3]=s,E&&b(!0),o===0||s===0)return;let D=kre(e),k=D.y,A=D.x,M=y/s,N=_/o,P=Math.max(0,s-y),F=Math.max(0,o-_),I=0,L=0;if(!A){let e=0;e=ib(O===`rtl`?-S:S,0,P),I=sT(e,P),L=P-I}let R=k?0:ib(x,0,F),ee=k?0:sT(R,F),z=k?0:F-ee,B=A?0:y,V=k?0:_,te=0,ne=0;!A&&!k&&(te=t?.offsetWidth||0,ne=n?.offsetHeight||0);let H=m.width===0&&m.height===0,re=H?te:0,ie=H?ne:0,U=Uw(n,`padding`,`x`),ae=Uw(t,`padding`,`y`),oe=Uw(i,`margin`,`x`),se=Uw(r,`margin`,`y`),ce=B-U-oe,le=V-ae-se,W=n?Math.min(n.offsetWidth-re,ce):ce,G=t?Math.min(t.offsetHeight-ie,le):le,ue=Math.max(16,W*M),de=Math.max(16,G*N);if(g(e=>e.height===de&&e.width===ue?e:{width:ue,height:de}),t&&r){let e=t.offsetHeight-de-ae-se,n=o-_,i=n===0?0:x/n,a=Math.min(e,Math.max(0,i*e));r.style.transform=`translate3d(0,${a}px,0)`}if(n&&i){let e=n.offsetWidth-ue-U-oe,t=s-y,r=t===0?0:S/t,a=O===`rtl`?ib(r*e,-e,0):ib(r*e,0,e);i.style.transform=`translate3d(${a}px,0,0)`}let fe=[[aT.scrollAreaOverflowXStart,I],[aT.scrollAreaOverflowXEnd,L],[aT.scrollAreaOverflowYStart,ee],[aT.scrollAreaOverflowYEnd,z]];for(let[t,n]of fe)e.style.setProperty(t,`${n}px`);a&&(A||k?h({width:0,height:0}):!A&&!k&&h({width:te,height:ne})),v(e=>Are(e,D));let pe={xStart:!A&&I>T.xStart,xEnd:!A&&L>T.xEnd,yStart:!k&&ee>T.yStart,yEnd:!k&&z>T.yEnd};C(e=>e.xStart===pe.xStart&&e.xEnd===pe.xEnd&&e.yStart===pe.yStart&&e.yEnd===pe.yEnd?e:pe)});L(()=>{c.current&&Ore()},[c]),L(()=>{queueMicrotask(P)},[P,y,O]),L(()=>{c.current?.matches(`:hover`)&&S(!0)},[c,S]),t.useEffect(()=>{let e=c.current;if(typeof ResizeObserver>`u`||!e)return;let t=!1,n=new ResizeObserver(()=>{if(!t){t=!0;let n=j.current;if(n[0]===e.clientHeight&&n[1]===e.scrollHeight&&n[2]===e.clientWidth&&n[3]===e.scrollWidth)return}P()});return n.observe(e),N.start(0,()=>{let t=e.getAnimations({subtree:!0});t.length!==0&&Promise.allSettled(t.map(e=>e.finished)).then(P).catch(()=>{})}),()=>{n.disconnect(),N.clear()}},[P,c,N]);function F(){k.current=!1}let I={role:`presentation`,..._&&{"data-id":`${_}-viewport`},tabIndex:y.x&&y.y?-1:0,className:qw.className,style:{overflow:`scroll`},onScroll(){c.current&&(P(),k.current||x({x:c.current.scrollLeft,y:c.current.scrollTop}),M.start(100,()=>{k.current=!0}))},onWheel:F,onTouchMove:F,onPointerMove:F,onPointerEnter:F,onKeyDown:F},R=t.useMemo(()=>({scrolling:E||D,hasOverflowX:!y.x,hasOverflowY:!y.y,overflowXStart:w.xStart,overflowXEnd:w.xEnd,overflowYStart:w.yStart,overflowYEnd:w.yEnd,cornerHidden:y.corner}),[E,D,y.x,y.y,y.corner,w]),ee=K(`div`,e,{ref:[r,c],state:R,props:[I,s],stateAttributesMapping:Xw}),z=t.useMemo(()=>({computeThumbPosition:P}),[P]);return(0,n.jsx)(rT.Provider,{value:z,children:ee})}),process.env.NODE_ENV!==`production`&&(uT.displayName=`ScrollAreaViewport`)}));function Mre(){let e=t.useContext(dT);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(54):`Base UI: ScrollAreaScrollbarContext is missing. ScrollAreaScrollbar parts must be placed within <ScrollArea.Scrollbar>.`);return e}var dT,fT=m((()=>{G(),dT=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(dT.displayName=`ScrollAreaScrollbarContext`)})),pT,mT=m((()=>{pT=function(e){return e.scrollAreaThumbHeight=`--scroll-area-thumb-height`,e.scrollAreaThumbWidth=`--scroll-area-thumb-width`,e}({})})),hT,Nre=m((()=>{qa(),Sa(),zw(),fT(),q(),Ww(),Vw(),mT(),ce(),Zw(),hT=t.forwardRef(function(e,r){let{render:i,className:a,orientation:o=`vertical`,keepMounted:s=!1,style:c,...l}=e,{hovering:u,scrollingX:d,scrollingY:f,hiddenState:p,overflowEdges:m,scrollbarYRef:h,scrollbarXRef:g,viewportRef:_,thumbYRef:v,thumbXRef:y,handlePointerDown:b,handlePointerUp:x,rootId:S,thumbSize:C,hasMeasuredScrollbar:w}=Lw(),T={hovering:u,scrolling:{horizontal:d,vertical:f}[o],orientation:o,hasOverflowX:!p.x,hasOverflowY:!p.y,overflowXStart:m.xStart,overflowXEnd:m.xEnd,overflowYStart:m.yStart,overflowYEnd:m.yEnd,cornerHidden:p.corner},E=oe(),D=!w&&!s;t.useEffect(()=>{let e=_.current,t=o===`vertical`?h.current:g.current;if(!t)return;function n(n){if(!(!e||!t||n.ctrlKey)){if(n.preventDefault(),o===`vertical`){if(e.scrollTop===0&&n.deltaY<0)return}else if(e.scrollLeft===0&&n.deltaX<0)return;if(o===`vertical`){if(e.scrollTop===e.scrollHeight-e.clientHeight&&n.deltaY>0)return}else if(e.scrollLeft===e.scrollWidth-e.clientWidth&&n.deltaX>0)return;o===`vertical`?e.scrollTop+=n.deltaY:e.scrollLeft+=n.deltaX}}return Ka(t,`wheel`,n,{passive:!1})},[o,g,h,_]);let O={...S&&{"data-id":`${S}-scrollbar`},onPointerDown(e){if(e.button!==0)return;let t=Yr(e.nativeEvent),n=o===`vertical`?v.current:y.current;if(!(n&&Jr(n,t))&&_.current){if(v.current&&h.current&&o===`vertical`){let t=Uw(v.current,`margin`,`y`),n=Uw(h.current,`padding`,`y`),r=v.current.offsetHeight,i=h.current.getBoundingClientRect(),a=e.clientY-i.top-r/2-n+t/2,o=_.current.scrollHeight,s=_.current.clientHeight,c=a/(h.current.offsetHeight-r-n-t)*(o-s);_.current.scrollTop=c}if(y.current&&g.current&&o===`horizontal`){let t=Uw(y.current,`margin`,`x`),n=Uw(g.current,`padding`,`x`),r=y.current.offsetWidth,i=g.current.getBoundingClientRect(),a=e.clientX-i.left-r/2-n+t/2,o=_.current.scrollWidth,s=_.current.clientWidth,c=a/(g.current.offsetWidth-r-n-t),l;E===`rtl`?(l=(1-c)*(o-s),_.current.scrollLeft<=0&&(l=-l)):l=c*(o-s),_.current.scrollLeft=l}b(e)}},onPointerUp:x,style:{position:`absolute`,touchAction:`none`,WebkitUserSelect:`none`,userSelect:`none`,visibility:D?`hidden`:void 0,...o===`vertical`&&{top:0,bottom:`var(${Bw.scrollAreaCornerHeight})`,insetInlineEnd:0,[pT.scrollAreaThumbHeight]:`${C.height}px`},...o===`horizontal`&&{insetInlineStart:0,insetInlineEnd:`var(${Bw.scrollAreaCornerWidth})`,bottom:0,[pT.scrollAreaThumbWidth]:`${C.width}px`}}},k=K(`div`,e,{ref:[r,o===`vertical`?h:g],state:T,props:[O,l],stateAttributesMapping:Xw}),A=t.useMemo(()=>({orientation:o}),[o]),j=o===`vertical`?p.y:p.x;return s||!j?(0,n.jsx)(dT.Provider,{value:A,children:k}):null}),process.env.NODE_ENV!==`production`&&(hT.displayName=`ScrollAreaScrollbar`)})),gT,Pre=m((()=>{zw(),fT(),mT(),q(),gT=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{thumbYRef:o,thumbXRef:s,handlePointerDown:c,handlePointerMove:l,handlePointerUp:u,setScrollingX:d,setScrollingY:f,hasMeasuredScrollbar:p}=Lw(),{orientation:m}=Mre();return K(`div`,e,{ref:[t,m===`vertical`?o:s],state:{orientation:m},props:[{onPointerDown:c,onPointerMove:l,onPointerUp(e){m===`vertical`&&f(!1),m===`horizontal`&&d(!1),u(e)},style:{visibility:p?void 0:`hidden`,...m===`vertical`&&{height:`var(${pT.scrollAreaThumbHeight})`},...m===`horizontal`&&{width:`var(${pT.scrollAreaThumbWidth})`}}},a]})}),process.env.NODE_ENV!==`production`&&(gT.displayName=`ScrollAreaThumb`)})),_T,Fre=m((()=>{zw(),q(),_T=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{cornerRef:o,cornerSize:s,hiddenState:c}=Lw(),l=K(`div`,e,{ref:[t,o],props:[{style:{position:`absolute`,bottom:0,insetInlineEnd:0,width:s.width,height:s.height}},a]});return c.corner?null:l}),process.env.NODE_ENV!==`production`&&(_T.displayName=`ScrollAreaCorner`)})),Ire=m((()=>{Ere(),jre(),Nre(),R(),iT(),q(),zw(),Zw(),Pre(),Fre()})),vT=m((()=>{Ire()}));function yT(){let e=t.useContext(xT);if(e===null)throw Error(process.env.NODE_ENV===`production`?W(60):`Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.`);return e}function bT(){let e=t.useContext(ST);if(e===null)throw Error(process.env.NODE_ENV===`production`?W(61):`Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>.`);return e}var xT,ST,CT=m((()=>{G(),xT=t.createContext(null),process.env.NODE_ENV!==`production`&&(xT.displayName=`SelectRootContext`),ST=t.createContext(null),process.env.NODE_ENV!==`production`&&(ST.displayName=`SelectFloatingContext`)})),wT,TT=m((()=>{bd(),Wp(),$p(),wT={id:Z(e=>e.id),labelId:Z(e=>e.labelId),modal:Z(e=>e.modal),multiple:Z(e=>e.multiple),items:Z(e=>e.items),itemToStringLabel:Z(e=>e.itemToStringLabel),itemToStringValue:Z(e=>e.itemToStringValue),isItemEqualToValue:Z(e=>e.isItemEqualToValue),value:Z(e=>e.value),hasSelectedValue:Z(e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Xp(t,r)!==``}),hasNullItemLabel:Z((e,t)=>t?Jp(e.items):!1),open:Z(e=>e.open),mounted:Z(e=>e.mounted),forceMount:Z(e=>e.forceMount),transitionStatus:Z(e=>e.transitionStatus),openMethod:Z(e=>e.openMethod),activeIndex:Z(e=>e.activeIndex),selectedIndex:Z(e=>e.selectedIndex),isActive:Z((e,t)=>e.activeIndex===t),isSelected:Z((e,t,n)=>{let r=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(e=>zp(n,e,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:zp(n,i,r)}),isSelectedByFocus:Z((e,t)=>e.selectedIndex===t),popupProps:Z(e=>e.popupProps),triggerProps:Z(e=>e.triggerProps),triggerElement:Z(e=>e.triggerElement),positionerElement:Z(e=>e.positionerElement),listElement:Z(e=>e.listElement),scrollUpArrowVisible:Z(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:Z(e=>e.scrollDownArrowVisible),hasScrollArrows:Z(e=>e.hasScrollArrows)}}));function Lre(e){let{id:r,value:i,defaultValue:a=null,onValueChange:o,open:s,defaultOpen:c=!1,onOpenChange:l,name:u,form:d,autoComplete:f,disabled:p=!1,readOnly:m=!1,required:h=!1,modal:g=!0,actionsRef:_,inputRef:v,onOpenChangeComplete:y,items:b,multiple:x=!1,itemToStringLabel:S,itemToStringValue:C,isItemEqualToValue:T=Up,highlightItemOnHover:E=!0,children:O}=e,{clearErrors:k}=mm(),{setDirty:j,setTouched:M,setFocused:N,shouldValidateOnChange:P,validityData:F,setFilled:I,name:R,disabled:ee,validation:z,validationMode:B}=lm(),V=bm({id:r}),te=ee||p,ne=R??u,[H,re]=w({controlled:i,default:x?a??Oe:a,name:`Select`,state:`value`}),[ie,U]=w({controlled:s,default:c,name:`Select`,state:`open`}),ae=t.useRef([]),oe=t.useRef([]),se=t.useRef(null),ce=t.useRef(null),le=t.useRef(0),W=t.useRef(null),G=t.useRef([]),ue=t.useRef(!1),de=t.useRef(!1),fe=t.useRef(null),me=t.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),he=t.useRef(!1),{mounted:ge,setMounted:_e,transitionStatus:ve}=bn(ie),{openMethod:ye,triggerProps:be}=jf(ie),xe=D(()=>new pd({id:V,labelId:void 0,modal:g,multiple:x,itemToStringLabel:S,itemToStringValue:C,isItemEqualToValue:T,value:H,open:ie,mounted:ge,transitionStatus:ve,items:b,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,Se=Q(xe,wT.activeIndex),Ce=Q(xe,wT.selectedIndex),we=Q(xe,wT.triggerElement),Te=Q(xe,wT.positionerElement),Ee=ly(ye),De=ye??Ee,Ae=t.useMemo(()=>x&&Array.isArray(H)&&H.length===0?``:Xp(H,C),[x,H,C]),je=t.useMemo(()=>x&&Array.isArray(H)?H.map(e=>Xp(e,C)):Xp(H,C),[x,H,C]);fm(mc(xe.state.triggerElement),{id:V,value:H,getValue:A(()=>je)});let Me=t.useRef(H);L(()=>{H!==Me.current&&xe.set(`forceMount`,!0)},[xe,H]),L(()=>{I(x?Array.isArray(H)&&H.length>0:H!=null)},[x,H,I]),L(function(){if(ie)return;let e=G.current;if(x){let t=Array.isArray(H)?H:[];if(t.length===0){xe.set(`selectedIndex`,null);return}let n=t[t.length-1],r=Vp(e,n,T);xe.set(`selectedIndex`,r===-1?null:r);return}let t=Vp(e,H,T);xe.set(`selectedIndex`,t===-1?null:t)},[x,ie,H,G,T,xe]),kf(H,()=>{k(ne),j(H!==F.initialValue),P()?z.commit(H):z.commit(H,!0)});let Ne=A((e,t)=>{if(l?.(e,t),!t.isCanceled&&(U(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(M(!0),N(!1),B===`onBlur`&&z.commit(H)),!e&&xe.state.activeIndex!==null)){let e=ae.current[xe.state.activeIndex];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}}),Pe=A(()=>{_e(!1),xe.update({activeIndex:null,openMethod:null}),y?.(!1)});Qa({enabled:!_,open:ie,ref:se,onComplete(){ie||Pe()}}),t.useImperativeHandle(_,()=>({unmount:Pe}),[Pe]);let Fe=A((e,t)=>{o?.(e,t),!t.isCanceled&&re(e)}),Ie=A(()=>{let e=xe.state.listElement||se.current;if(!e)return;let t=oT(e.scrollHeight,e.clientHeight),n=sT(e.scrollTop,t),r=n>0,i=n<t;xe.state.scrollUpArrowVisible!==r&&xe.set(`scrollUpArrowVisible`,r),xe.state.scrollDownArrowVisible!==i&&xe.set(`scrollDownArrowVisible`,i)}),Re=Rd({open:ie,onOpenChange:Ne,elements:{reference:we,floating:Te}}),{getReferenceProps:ze,getFloatingProps:Be,getItemProps:Ve}=af([bl(Re,{enabled:!m&&!te,event:`mousedown`}),Sl(Re,{bubbles:!1}),mf(Re,{enabled:!m&&!te,listRef:ae,activeIndex:Se,selectedIndex:Ce,disabledIndices:Oe,onNavigate(e){e===null&&!ie||xe.set(`activeIndex`,e)},focusItemOnHover:E}),bf(Re,{enabled:!m&&!te&&(ie||!x),listRef:oe,activeIndex:Se,selectedIndex:Ce,onMatch(e){ie?xe.set(`activeIndex`,e):Fe(G.current[e],J(`none`))},onTypingChange(e){ue.current=e}})]),He=t.useMemo(()=>Le(ze(),be,V?{id:V}:ke),[ze,be,V]);Js(()=>{xe.update({popupProps:Be(),triggerProps:He})}),L(()=>{xe.update({id:V,modal:g,multiple:x,value:H,open:ie,mounted:ge,transitionStatus:ve,popupProps:Be(),triggerProps:He,items:b,itemToStringLabel:S,itemToStringValue:C,isItemEqualToValue:T,openMethod:De})},[xe,V,g,x,H,ie,ge,ve,Be,He,b,S,C,T,De]);let Ue=t.useMemo(()=>({store:xe,name:ne,required:h,disabled:te,readOnly:m,multiple:x,highlightItemOnHover:E,setValue:Fe,setOpen:Ne,listRef:ae,popupRef:se,scrollHandlerRef:ce,handleScrollArrowVisibility:Ie,scrollArrowsMountedCountRef:le,getItemProps:Ve,events:Re.context.events,valueRef:W,valuesRef:G,labelsRef:oe,typingRef:ue,selectionRef:me,selectedItemTextRef:fe,validation:z,onOpenChangeComplete:y,keyboardActiveRef:de,alignItemWithTriggerActiveRef:he,initialValueRef:Me}),[xe,ne,h,te,m,x,E,Fe,Ne,Ve,Re.context.events,z,y,Ie]),We=pe(v,z.inputRef),Ge=x&&Array.isArray(H)&&H.length>0,Ke=x?void 0:ne,qe=t.useMemo(()=>!x||!Array.isArray(H)||!ne?null:H.map(e=>{let t=Xp(e,C);return(0,n.jsx)(`input`,{type:`hidden`,form:d,name:ne,value:t},t)}),[x,H,d,ne,C]);return(0,n.jsx)(xT.Provider,{value:Ue,children:(0,n.jsxs)(ST.Provider,{value:Re,children:[O,(0,n.jsx)(`input`,{...z.getInputValidationProps({onFocus(){xe.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.currentTarget.value,n=J(ct,e.nativeEvent);function r(){if(x)return;let e=G.current.find(e=>Xp(e,C).toLowerCase()===t.toLowerCase()||Yp(e,S).toLowerCase()===t.toLowerCase());e!=null&&(j(e!==F.initialValue),Fe(e,n),P()&&z.commit(e))}xe.set(`forceMount`,!0),queueMicrotask(r)}}),id:V&&Ke==null?`${V}-hidden-input`:void 0,form:d,name:Ke,autoComplete:f,value:Ae,disabled:te,required:h&&!Ge,readOnly:m,ref:We,style:ne?vc:_c,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),qe]})})}var Rre=m((()=>{yc(),ye(),k(),Ys(),uy(),E(),R(),F(),hc(),bd(),Ae(),Of(),CT(),dm(),pm(),xm(),xn(),TT(),Vt(),zt(),$a(),gm(),$p(),Wp(),Af(),Mf(),cT(),$e()})),ET,DT,OT,kT,AT,zre=m((()=>{na(),$s(),F(),ye(),hc(),bd(),CT(),dm(),ym(),ep(),cm(),q(),TT(),Fm(),Sa(),$e(),Dr(),Vt(),zt(),xm(),Rm(),ET=2,DT=400,OT=200,kT={...Qf,...sm,value:()=>null},AT=t.forwardRef(function(e,n){let{render:r,className:i,id:a,disabled:o=!1,nativeButton:s=!0,style:c,...l}=e,{setTouched:u,setFocused:d,validationMode:f,state:p,disabled:m}=lm(),{labelId:h}=_m(),{store:g,setOpen:_,selectionRef:v,validation:y,readOnly:b,required:x,alignItemWithTriggerActiveRef:S,disabled:C,keyboardActiveRef:w}=yT(),T=m||C||o,E=Q(g,wT.open),D=Q(g,wT.value),O=Q(g,wT.triggerProps),k=Q(g,wT.positionerElement),j=Q(g,wT.listElement),M=Q(g,wT.id),N=Q(g,wT.labelId),P=Q(g,wT.hasSelectedValue),F=!P&&E,I=Q(g,wT.hasNullItemLabel,F),L=a??M,R=Lm(h,N);bm({id:L});let ee=mc(k),z=t.useRef(null),{getButtonProps:B,buttonRef:V}=wr({disabled:T,native:s}),te=pe(n,z,V,A(e=>{g.set(`triggerElement`,e)})),ne=Xs(),H=Xs(),re=Xs(),ie=Xs();t.useEffect(()=>{if(E)return P||I?ie.start(OT,()=>{v.current.allowUnselectedMouseUp=!0,re.start(OT,()=>{v.current.allowSelectedMouseUp=!0})}):re.start(DT,()=>{v.current.allowUnselectedMouseUp=!0,v.current.allowSelectedMouseUp=!0}),()=>{re.clear(),ie.clear()};v.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},H.clear()},[E,P,I,v,H,re,ie]);let U=t.useMemo(()=>j?.id??ri(k)?.id,[j,k]),ae=Le(O,{id:L,role:`combobox`,"aria-expanded":E?`true`:`false`,"aria-haspopup":`listbox`,"aria-controls":E?U:void 0,"aria-labelledby":R,"aria-readonly":b||void 0,"aria-required":x||void 0,tabIndex:T?-1:0,ref:te,onFocus(e){d(!0),E&&S.current&&_(!1,J(ct,e.nativeEvent)),ne.start(0,()=>{g.set(`forceMount`,!0)})},onBlur(e){Jr(k,e.relatedTarget)||(u(!0),d(!1),f===`onBlur`&&y.commit(D))},onPointerMove(){w.current=!1},onKeyDown(){w.current=!0},onMouseDown(e){if(E)return;let t=ta(e.currentTarget);function n(e){if(!z.current)return;let t=e.target;if(Jr(z.current,t)||Jr(ee.current,t)||t===z.current)return;let n=Pm(z.current);e.clientX>=n.left-ET&&e.clientX<=n.right+ET&&e.clientY>=n.top-ET&&e.clientY<=n.bottom+ET||_(!1,J(Mt,e))}H.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},y.getValidationProps,l,B);ae.role=`combobox`;let oe={...p,open:E,disabled:T,value:D,readOnly:b,placeholder:!P};return K(`button`,e,{ref:[n,z],state:oe,stateAttributesMapping:kT,props:ae})}),process.env.NODE_ENV!==`production`&&(AT.displayName=`SelectTrigger`)})),jT,MT,Bre=m((()=>{bd(),q(),CT(),$p(),TT(),jT={value:()=>null},MT=t.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,{store:c,valueRef:l}=yT(),u=Q(c,wT.value),d=Q(c,wT.items),f=Q(c,wT.itemToStringLabel),p=Q(c,wT.hasSelectedValue),m=!p&&a!=null&&i==null,h=Q(c,wT.hasNullItemLabel,m),g={value:u,placeholder:!p},_=null;return _=typeof i==`function`?i(u):i??(!p&&a!=null&&!h?a:Array.isArray(u)?Qp(u,d,f):Zp(u,d,f)),K(`span`,e,{state:g,ref:[t,l],props:[{children:_},s],stateAttributesMapping:jT})}),process.env.NODE_ENV!==`production`&&(MT.displayName=`SelectValue`)})),NT,Vre=m((()=>{bd(),q(),CT(),ep(),TT(),NT=t.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,{store:o}=yT();return K(`span`,e,{state:{open:Q(o,wT.open)},ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:Zf})}),process.env.NODE_ENV!==`production`&&(NT.displayName=`SelectIcon`)})),PT,Hre=m((()=>{PT=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(PT.displayName=`SelectPortalContext`)})),FT,Ure=m((()=>{bd(),Of(),Hre(),CT(),TT(),FT=t.forwardRef(function(e,t){let{store:r}=yT(),i=Q(r,wT.mounted),a=Q(r,wT.forceMount);return i||a?(0,n.jsx)(PT.Provider,{value:!0,children:(0,n.jsx)(el,{ref:t,...e})}):null}),process.env.NODE_ENV!==`production`&&(FT.displayName=`SelectPortal`)}));function IT(){let e=t.useContext(LT);if(!e)throw Error(process.env.NODE_ENV===`production`?W(59):`Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>.`);return e}var LT,RT=m((()=>{G(),LT=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(LT.displayName=`SelectPositionerContext`)}));function zT(e,t){e&&Object.assign(e.style,t)}var BT,VT=m((()=>{BT={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`}})),HT,UT,Wre=m((()=>{_p(),R(),F(),bd(),CT(),ae(),Lh(),RT(),yp(),Yc(),VT(),TT(),Vt(),zt(),Wp(),Vh(),Wh(),HT={position:`fixed`},UT=t.forwardRef(function(e,r){let{anchor:i,positionMethod:a=`absolute`,className:o,render:s,side:c=`bottom`,align:l=`center`,sideOffset:u=0,alignOffset:d=0,collisionBoundary:f=`clipping-ancestors`,collisionPadding:p,arrowPadding:m=5,sticky:h=!1,disableAnchorTracking:g,alignItemWithTrigger:_=!0,collisionAvoidance:v=Kc,style:y,...b}=e,{store:x,listRef:S,labelsRef:C,alignItemWithTriggerActiveRef:w,selectedItemTextRef:T,valuesRef:E,initialValueRef:D,popupRef:O,setValue:k}=yT(),j=bT(),M=Q(x,wT.open),N=Q(x,wT.mounted),P=Q(x,wT.modal),F=Q(x,wT.value),I=Q(x,wT.openMethod),R=Q(x,wT.positionerElement),ee=Q(x,wT.triggerElement),z=Q(x,wT.isItemEqualToValue),B=Q(x,wT.transitionStatus),V=t.useRef(null),te=t.useRef(null),[ne,re]=t.useState(_),ie=N&&ne&&I!==`touch`;!N&&ne!==_&&re(_),L(()=>{N||(wT.scrollUpArrowVisible(x.state)&&x.set(`scrollUpArrowVisible`,!1),wT.scrollDownArrowVisible(x.state)&&x.set(`scrollDownArrowVisible`,!1))},[x,N]),t.useImperativeHandle(w,()=>ie),Hh((ie||P)&&M,I===`touch`,R,ee);let U=Fh({anchor:i,floatingRootContext:j,positionMethod:a,mounted:N,side:c,sideOffset:u,align:l,alignOffset:d,arrowPadding:m,collisionBoundary:f,collisionPadding:p,sticky:h,disableAnchorTracking:g??ie,collisionAvoidance:v,keepMounted:!0}),ae=ie?`none`:U.side,oe=ie?HT:U.positionerStyles,se=Bh(e,{open:M,side:ae,align:U.align,anchorHidden:U.anchorHidden},{styles:oe,transitionStatus:B,props:b,refs:[r,A(e=>{x.set(`positionerElement`,e)})],hidden:!N,inert:!M}),ce=t.useRef(0),le=A(e=>{if(e.size===0&&ce.current===0||E.current.length===0)return;let t=ce.current;if(ce.current=e.size,e.size===t)return;let n=J(ct);if(t!==0&&!x.state.multiple&&F!==null&&Vp(E.current,F,z)===-1){let e=D.current,t=e!=null&&Vp(E.current,e,z)!==-1?e:null;k(t,n),t===null&&(x.set(`selectedIndex`,null),T.current=null)}if(t!==0&&x.state.multiple&&Array.isArray(F)){let e=e=>Vp(E.current,e,z)!==-1,t=F.filter(t=>e(t));(t.length!==F.length||t.some(e=>!Bp(F,e,z)))&&(k(t,n),t.length===0&&(x.set(`selectedIndex`,null),T.current=null))}if(M&&ie){x.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};zT(R,e),zT(O.current,e)}}),W=t.useMemo(()=>({...U,side:ae,alignItemWithTriggerActive:ie,setControlledAlignItemWithTrigger:re,scrollUpArrowRef:V,scrollDownArrowRef:te}),[U,ae,ie,re]);return(0,n.jsx)(H,{elementsRef:S,labelsRef:C,onMapChange:le,children:(0,n.jsxs)(LT.Provider,{value:W,children:[N&&P&&(0,n.jsx)(vp,{inert:gp(!M),cutout:ee}),se]})})}),process.env.NODE_ENV!==`production`&&(UT.displayName=`SelectPositioner`)}));function WT(e){let t=e.maxHeight||``;return t.endsWith(`px`)&&parseFloat(t)||1/0}function GT(e){return oT(e.scrollHeight,e.clientHeight)}function KT(e){return hu.getScale(e)}function qT(e,t,n){return e/n[t]}function JT(e,t){return ki({x:qT(e.x,`x`,t),y:qT(e.y,`y`,t),width:qT(e.width,`x`,t),height:qT(e.height,`y`,t)})}function Gre(e){let{style:t}=e,n={};for(let[e,r]of ZT)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of ZT){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var YT,XT,ZT,Kre=m((()=>{Vi(),qa(),zr(),F(),na(),R(),bd(),un(),Of(),CT(),ep(),RT(),Jw(),_n(),$a(),q(),TT(),VT(),Vt(),zt(),xv(),Ga(),zh(),ab(),cT(),Dy(),ce(),YT={...$f,...gn},XT=t.forwardRef(function(e,r){let{render:i,className:a,style:o,finalFocus:s,...c}=e,{store:l,popupRef:u,onOpenChangeComplete:d,setOpen:f,valueRef:p,selectedItemTextRef:m,keyboardActiveRef:h,multiple:g,handleScrollArrowVisibility:_,scrollHandlerRef:v,listRef:y,highlightItemOnHover:b}=yT(),{side:x,align:S,alignItemWithTriggerActive:C,isPositioned:w,setControlledAlignItemWithTrigger:T,scrollDownArrowRef:E,scrollUpArrowRef:D}=IT(),O=yv(!0)!=null,k=bT(),j=oe(),{nonce:M,disableStyleElements:N}=wy(),P=Q(l,wT.id),F=Q(l,wT.open),I=Q(l,wT.mounted),R=Q(l,wT.popupProps),ee=Q(l,wT.transitionStatus),z=Q(l,wT.triggerElement),B=Q(l,wT.positionerElement),V=Q(l,wT.listElement),te=t.useRef(!1),ne=t.useRef(!1),H=t.useRef({}),re=rn(),ie=A(e=>{if(!B||!u.current||!ne.current)return;if(te.current||!C){_();return}let t=B.style.top===`0px`,n=B.style.bottom===`0px`;if(!t&&!n){_();return}let r=KT(B),i=qT(B.getBoundingClientRect().height,`y`,r),a=ta(B),o=getComputedStyle(B),s=parseFloat(o.marginTop),c=parseFloat(o.marginBottom),l=WT(getComputedStyle(u.current)),d=Math.min(a.documentElement.clientHeight-s-c,l),f=e.scrollTop,p=GT(e),m=0,h=null,g=!1,v=!1,y=e=>{B.style.height=`${e}px`},b=(t,n)=>{let r=ib(t,0,d-i);r>0&&y(i+r),e.scrollTop=n,d-(i+r)<=1&&(te.current=!0),_()},x=t?p-f:f,S=Math.min(i+x,d);if(m=S,x<=1){b(x,t?p:0);return}if(d-S>1?t?v=!0:h=0:(g=!0,n&&f<p&&(h=f-(x-(i+x-d)))),m=Math.ceil(m),m!==0&&y(m),v||h!=null){let t=GT(e),n=v?t:ib(h,0,t);Math.abs(e.scrollTop-n)>1&&(e.scrollTop=n)}(g||m>=d-1)&&(te.current=!0),_()});t.useImperativeHandle(v,()=>ie,[ie]),Qa({open:F,ref:u,onComplete(){F&&d?.(!0)}});let U={open:F,transitionStatus:ee,side:x,align:S};L(()=>{!B||!u.current||Object.keys(H.current).length||(H.current={top:B.style.top||`0`,left:B.style.left||`0`,right:B.style.right,height:B.style.height,bottom:B.style.bottom,minHeight:B.style.minHeight,maxHeight:B.style.maxHeight,marginTop:B.style.marginTop,marginBottom:B.style.marginBottom})},[u,B]),L(()=>{F||C||(ne.current=!1,te.current=!1,zT(B,H.current))},[F,C,B,u]),L(()=>{let e=u.current;if(!F||!z||!B||!e||C&&!w||l.state.transitionStatus===`ending`)return;if(!C){ne.current=!0,re.request(_),e.style.removeProperty(`--transform-origin`);return}let t=Gre(e);e.style.removeProperty(`--transform-origin`);try{let t=m.current,n=p.current,r=getComputedStyle(B),i=getComputedStyle(e),a=ta(z),o=Xn(B),s=KT(z),c=JT(z.getBoundingClientRect(),s),u=JT(B.getBoundingClientRect(),s),d=c.height,f=V||e,h=f.scrollHeight,g=parseFloat(i.borderBottomWidth),v=parseFloat(r.marginTop)||10,x=parseFloat(r.marginBottom)||10,S=parseFloat(r.minHeight)||100,C=WT(i),w=a.documentElement.clientHeight-v-x,E=a.documentElement.clientWidth,D=w-c.bottom+d,O,k=j===`rtl`?c.right-u.width:c.left,A=0;if(t&&n){let e=JT(n.getBoundingClientRect(),s);O=JT(t.getBoundingClientRect(),s),k=u.left+(j===`rtl`?e.right-O.right:e.left-O.left);let r=e.top-c.top+e.height/2;A=O.top-u.top+O.height/2-r}let M=D+A+x+g,N=Math.min(w,M),P=w-v-x,F=M-N,I=E-5;B.style.left=`${ib(k,5,I-u.width)}px`,B.style.height=`${N}px`,B.style.maxHeight=`auto`,B.style.marginTop=`${v}px`,B.style.marginBottom=`${x}px`,e.style.height=`100%`;let L=GT(f),R=F>=L-1;R&&(N=Math.min(w,u.height)-(F-L));let ee=c.top<20||c.bottom>w-20||Math.ceil(N)+1<Math.min(h,S),re=(o.visualViewport?.scale??1)!==1&&Mr;if(ee||re){ne.current=!0,zT(B,H.current),T(!1);return}let ie=Math.max(S,N);if(R){let e=Math.max(0,w-M);B.style.top=u.height>=P?`0`:`${e}px`,B.style.height=`${N}px`,f.scrollTop=GT(f)}else B.style.bottom=`0`,f.scrollTop=F;if(O){let t=u.top,n=u.height,r=O.top+O.height/2,i=ib(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(ie===w||N>=C)&&(te.current=!0),_(),b&&l.state.selectedIndex===null&&l.state.activeIndex===null&&y.current[0]!=null&&l.set(`activeIndex`,0),ne.current=!0}finally{t()}},[l,F,B,z,p,m,u,_,C,T,re,E,D,V,y,b,j,w]),t.useEffect(()=>{if(!C||!B||!F)return;let e=Xn(B);function t(e){f(!1,J(Lt,e))}return Ka(e,`resize`,t)},[f,C,B,F]);let ae={...V?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":g||void 0,id:`${P}-list`},onKeyDown(e){h.current=!0,O&&Ba.has(e.key)&&e.stopPropagation()},onMouseMove(){h.current=!1},onScroll(e){V||ie(e.currentTarget)},...C&&{style:V?{height:`100%`}:BT}},se=K(`div`,e,{ref:[r,u],state:U,stateAttributesMapping:YT,props:[R,ae,Rh(ee),{className:!V&&C?qw.className:void 0},c]});return(0,n.jsxs)(t.Fragment,{children:[!N&&qw.getElement(M),(0,n.jsx)(_l,{context:k,modal:!1,disabled:!I,returnFocus:s,restoreFocus:!0,children:se})]})}),process.env.NODE_ENV!==`production`&&(XT.displayName=`SelectPopup`),ZT=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]]})),QT,qre=m((()=>{F(),bd(),CT(),RT(),q(),Jw(),VT(),TT(),QT=t.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,{store:o,scrollHandlerRef:s}=yT(),{alignItemWithTriggerActive:c}=IT(),l=Q(o,wT.hasScrollArrows),u=Q(o,wT.openMethod),d=Q(o,wT.multiple),f={id:`${Q(o,wT.id)}-list`,role:`listbox`,"aria-multiselectable":d||void 0,onScroll(e){s.current?.(e.currentTarget)},...c&&{style:BT},className:l&&u!==`touch`?qw.className:void 0};return K(`div`,e,{ref:[t,A(e=>{o.set(`listElement`,e)})],props:[f,a]})}),process.env.NODE_ENV!==`production`&&(QT.displayName=`SelectList`)}));function $T(){let e=t.useContext(eE);if(!e)throw Error(process.env.NODE_ENV===`production`?W(57):`Base UI: SelectItemContext is missing. SelectItem parts must be placed within <Select.Item>.`);return e}var eE,tE=m((()=>{G(),eE=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(eE.displayName=`SelectItemContext`)})),nE,Jre=m((()=>{R(),hc(),bd(),CT(),kn(),q(),tE(),TT(),Dr(),Vt(),zt(),Wp(),nE=t.memo(t.forwardRef(function(e,r){let{render:i,className:a,value:o=null,label:s,disabled:c=!1,nativeButton:l=!1,style:u,...d}=e,f=t.useRef(null),p=Dn({label:s,textRef:f,indexGuessBehavior:On.GuessFromOrder}),{store:m,getItemProps:h,setOpen:g,setValue:_,selectionRef:v,typingRef:y,valuesRef:b,multiple:x,selectedItemTextRef:S}=yT(),C=Q(m,wT.isActive,p.index),w=Q(m,wT.isSelected,p.index,o),T=Q(m,wT.isSelectedByFocus,p.index),E=Q(m,wT.isItemEqualToValue),D=p.index,O=D!==-1,k=t.useRef(null),A=mc(D);L(()=>{if(!O)return;let e=b.current;return e[D]=o,()=>{delete e[D]}},[O,D,o,b]),L(()=>{if(!O)return;let e=m.state.value,t=e;x&&Array.isArray(e)&&e.length>0&&(t=e[e.length-1]),t!==void 0&&zp(o,t,E)&&(m.set(`selectedIndex`,D),f.current&&(S.current=f.current))},[O,D,x,E,m,o,S]);let j={disabled:c,selected:w,highlighted:C},M=h({active:C,selected:w});M.id=void 0;let N=t.useRef(null),P=t.useRef(`mouse`),F=t.useRef(!1),{getButtonProps:I,buttonRef:R}=wr({disabled:c,focusableWhenDisabled:!0,native:l,composite:!0});function ee(e){let t=m.state.value;if(x){let n=Array.isArray(t)?t:[];_(w?Hp(n,o,E):[...n,o],J(pt,e))}else _(o,J(pt,e)),g(!1,J(pt,e))}let z={role:`option`,"aria-selected":w,tabIndex:C?0:-1,onTouchStart(){v.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(e){N.current=e.key,m.set(`activeIndex`,D),e.key===` `&&y.current&&e.preventDefault()},onClick(e){F.current=!1,!(e.type===`keydown`&&N.current===null)&&(c||e.type===`keydown`&&N.current===` `&&y.current||P.current!==`touch`&&!C||(N.current=null,ee(e.nativeEvent)))},onPointerEnter(e){P.current=e.pointerType},onPointerDown(e){P.current=e.pointerType,F.current=!0},onMouseUp(){if(c)return;if(F.current){F.current=!1;return}let e=!v.current.allowSelectedMouseUp&&w,t=!v.current.allowUnselectedMouseUp&&!w;e||t||P.current!==`touch`&&!C||k.current?.click()}},B=K(`div`,e,{ref:[R,r,p.ref,k],state:j,props:[M,z,d,I]}),V=t.useMemo(()=>({selected:w,indexRef:A,textRef:f,selectedByFocus:T,hasRegistered:O}),[w,A,f,T,O]);return(0,n.jsx)(eE.Provider,{value:V,children:B})})),process.env.NODE_ENV!==`production`&&(nE.displayName=`SelectItem`)})),rE,iE,Yre=m((()=>{tE(),xn(),$a(),q(),_n(),rE=t.forwardRef(function(e,t){let r=e.keepMounted??!1,{selected:i}=$T();return r||i?(0,n.jsx)(iE,{...e,ref:t}):null}),process.env.NODE_ENV!==`production`&&(rE.displayName=`SelectItemIndicator`),iE=t.memo(t.forwardRef((e,n)=>{let{render:r,className:i,style:a,keepMounted:o,...s}=e,{selected:c}=$T(),l=t.useRef(null),{transitionStatus:u,setMounted:d}=bn(c),f=K(`span`,e,{ref:[n,l],state:{selected:c,transitionStatus:u},props:[{"aria-hidden":!0,children:`✔️`},s],stateAttributesMapping:gn});return Qa({open:c,ref:l,onComplete(){c||d(!1)}}),f})),process.env.NODE_ENV!==`production`&&(iE.displayName=`Inner`)})),aE,Xre=m((()=>{CT(),tE(),q(),aE=t.memo(t.forwardRef(function(e,n){let{indexRef:r,textRef:i,selectedByFocus:a,hasRegistered:o}=$T(),{selectedItemTextRef:s}=yT(),{className:c,render:l,style:u,...d}=e;return K(`div`,e,{ref:[t.useCallback(e=>{if(!e||!o)return;let t=s.current===null||!s.current.isConnected;(a||t&&r.current===0)&&(s.current=e)},[s,r,a,o]),n,i],props:d})})),process.env.NODE_ENV!==`production`&&(aE.displayName=`SelectItemText`)}));function Zre(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n<e.length;n+=1){let i=e[n];if(i&&i.offsetTop>=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return o<t&&s?sT(s.offsetTop-i,a):0}let o=e.length-1,s=n+r-i+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?sT(l.offsetTop+l.offsetHeight-r+i,a):a}var oE,sE=m((()=>{$s(),bd(),R(),CT(),RT(),xn(),$a(),q(),cT(),TT(),oE=t.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:a,keepMounted:o=!1,...s}=e,c=a===`up`,{store:l,popupRef:u,listRef:d,handleScrollArrowVisibility:f,scrollArrowsMountedCountRef:p}=yT(),{side:m,scrollDownArrowRef:h,scrollUpArrowRef:g}=IT(),_=Q(l,c?wT.scrollUpArrowVisible:wT.scrollDownArrowVisible),v=Q(l,wT.openMethod),y=_&&v!==`touch`,b=Xs(),x=c?g:h,{transitionStatus:S,setMounted:C}=bn(y);L(()=>(p.current+=1,l.state.hasScrollArrows||l.set(`hasScrollArrows`,!0),()=>{p.current=Math.max(0,p.current-1),p.current===0&&l.state.hasScrollArrows&&l.set(`hasScrollArrows`,!1)}),[l,p]),Qa({open:y,ref:x,onComplete(){y||C(!1)}});let w=K(`div`,e,{ref:[t,x],state:{direction:a,visible:y,side:m,transitionStatus:S},props:[{"aria-hidden":!0,children:c?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||b.isStarted())return;l.set(`activeIndex`,null);function t(){let e=l.state.listElement??u.current;if(!e)return;l.set(`activeIndex`,null),f();let n=oT(e.scrollHeight,e.clientHeight),r=sT(e.scrollTop,n),i=r===(c?0:n),a=d.current;if(r!==e.scrollTop&&(e.scrollTop=r),a.length===0&&l.set(c?`scrollUpArrowVisible`:`scrollDownArrowVisible`,!i),i){b.clear();return}if(a.length>0){let t=x.current?.offsetHeight||0;e.scrollTop=Zre(a,c,r,e.clientHeight,t,n)}b.start(40,t)}b.start(40,t)},onMouseLeave(){b.clear()}},s]});return y||o?w:null}),process.env.NODE_ENV!==`production`&&(oE.displayName=`SelectScrollArrow`)})),cE,Qre=m((()=>{sE(),cE=t.forwardRef(function(e,t){return(0,n.jsx)(oE,{...e,ref:t,direction:`down`})}),process.env.NODE_ENV!==`production`&&(cE.displayName=`SelectScrollDownArrow`)})),lE,$re=m((()=>{sE(),lE=t.forwardRef(function(e,t){return(0,n.jsx)(oE,{...e,ref:t,direction:`up`})}),process.env.NODE_ENV!==`production`&&(lE.displayName=`SelectScrollUpArrow`)}));function eie(){let e=t.useContext(uE);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(56):`Base UI: SelectGroupContext is missing. SelectGroup parts must be placed within <Select.Group>.`);return e}var uE,dE=m((()=>{G(),uE=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(uE.displayName=`SelectGroupContext`)})),fE,tie=m((()=>{dE(),q(),fE=t.forwardRef(function(e,r){let{className:i,render:a,style:o,...s}=e,[c,l]=t.useState(),u=t.useMemo(()=>({labelId:c,setLabelId:l}),[c,l]),d=K(`div`,e,{ref:r,props:[{role:`group`,"aria-labelledby":c},s]});return(0,n.jsx)(uE.Provider,{value:u,children:d})}),process.env.NODE_ENV!==`production`&&(fE.displayName=`SelectGroup`)})),pE,nie=m((()=>{R(),$t(),dE(),q(),pE=t.forwardRef(function(e,t){let{className:n,render:r,id:i,style:a,...o}=e,{setLabelId:s}=eie(),c=Qt(i);return L(()=>{s(c)},[c,s]),K(`div`,e,{ref:t,props:[{id:c},o]})}),process.env.NODE_ENV!==`production`&&(pE.displayName=`SelectGroupLabel`)})),rie=m((()=>{Rre(),bd(),q(),dm(),cm(),yr(),na(),F(),Sa(),x_(),ym(),Rm(),CT(),TT(),zre(),Bre(),Vre(),Ure(),ep(),_n(),Wre(),Kre(),qre(),Jre(),Yre(),Xre(),RT(),Qre(),$re(),tie(),nie(),hg()})),mE=m((()=>{rie()}));function hE(e,t){return e-t}var gE=m((()=>{}));function iie(e,t,n){let r=e.slice();return r[t]=n,r.sort(hE)}var aie=m((()=>{gE()}));function _E(e,t,n,r,i,a){let o=e;return o=ib(o,n,r),i&&(o=iie(a,t,ib(o,a[t-1]||-1/0,a[t+1]||1/0))),o}var vE=m((()=>{ab(),aie()}));function yE(e,t,n){if(!Array.isArray(e))return!0;let r=e.reduce((e,t,n,r)=>(n===r.length-1||e.push(Math.abs(t-r[n+1])),e),[]);return Math.min(...r)>=t*n}var bE=m((()=>{})),xE,SE=m((()=>{cm(),xE={activeThumbIndex:()=>null,max:()=>null,min:()=>null,minStepsBetweenValues:()=>null,step:()=>null,values:()=>null,...sm}}));function CE(){let e=t.useContext(wE);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(62):`Base UI: SliderRootContext is missing. Slider parts must be placed within <Slider.Root>.`);return e}var wE,TE=m((()=>{G(),wE=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(wE.displayName=`SliderRootContext`)}));function oie(e){return`key`in e?kt:bt}function sie(e,t){return typeof e==`number`&&typeof t==`number`?e===t:Array.isArray(e)&&Array.isArray(t)?e_(e,t):!1}var EE,cie=m((()=>{na(),E(),F(),hc(),R(),B(),Vt(),Af(),$t(),q(),ab(),t_(),Sa(),ae(),dm(),pm(),gm(),ym(),Rm(),gE(),vE(),bE(),SE(),TE(),zt(),EE=t.forwardRef(function(e,r){let{"aria-labelledby":i,className:a,defaultValue:o,disabled:s=!1,id:c,format:l,largeStep:u=10,locale:d,render:f,max:p=100,min:m=0,minStepsBetweenValues:h=0,form:g,name:_,onValueChange:v,onValueCommitted:y,orientation:b=`horizontal`,step:x=1,thumbCollisionBehavior:S=`push`,thumbAlignment:C=`center`,value:T,style:E,...D}=e,O=Qt(c),k=Im(O),j=A(v),M=A(y),{clearErrors:N}=mm(),{state:P,disabled:F,name:I,setTouched:R,setDirty:z,validityData:B,shouldValidateOnChange:V,validation:te}=lm(),{labelId:ne}=_m(),[re,ie]=t.useState(),U=i??Lm(ne,re),ae=F||s,oe=I??_,[se,ce]=w({controlled:T,default:o??m,name:`Slider`}),le=t.useRef(null),W=t.useRef(null),G=t.useRef([]),ue=t.useRef(null),de=t.useRef(null),fe=t.useRef(-1),pe=t.useRef(null),me=t.useRef(null),he=t.useRef(`none`),ge=mc(l),[_e,ve]=t.useState(-1),[ye,be]=t.useState(-1),[xe,Se]=t.useState(!1),[Ce,we]=t.useState(()=>new Map),[Te,Ee]=t.useState([void 0,void 0]),De=A(e=>{ve(e),e!==-1&&be(e)});fm(W,{id:O,value:se}),kf(se,()=>{N(oe),V()?te.commit(se):te.commit(se,!0);let e=B.initialValue,t;t=Array.isArray(se)&&Array.isArray(e)?!e_(se,e):se!==e,z(t)});let Oe=A(e=>{e&&(W.current=e)}),ke=Array.isArray(se),Ae=t.useMemo(()=>ke?se.slice().sort(hE):[ib(se,m,p)],[p,m,ke,se]),je=A((e,t)=>{if(Number.isNaN(e)||sie(e,se))return;let n=t??J(`none`,void 0,void 0,{activeThumbIndex:-1});he.current=n.reason;let r=n.event,i=new(r.constructor??Event)(r.type,r);Object.defineProperty(i,`target`,{writable:!0,value:{value:e,name:oe}}),n.event=i,me.current=e,j(e,n),!n.isCanceled&&ce(e)}),Me=A((e,t,n)=>{let r=_E(e,t,m,p,ke,Ae);if(yE(r,x,h)){let e=oie(n);je(r,J(e,n.nativeEvent,void 0,{activeThumbIndex:t})),R(!0),M(me.current??r,Bt(e,n.nativeEvent))}});process.env.NODE_ENV!==`production`&&m>=p&&ee("Slider `max` must be greater than `min`."),L(()=>{let e=qr(ta(le.current));ae&&Jr(le.current,e)&&e.blur()},[ae]),ae&&_e!==-1&&De(-1);let Ne=t.useMemo(()=>({...P,activeThumbIndex:_e,disabled:ae,dragging:xe,orientation:b,max:p,min:m,minStepsBetweenValues:h,step:x,values:Ae}),[P,_e,ae,xe,p,m,h,b,x,Ae]),Pe=t.useMemo(()=>({active:_e,controlRef:W,disabled:ae,dragging:xe,validation:te,formatOptionsRef:ge,handleInputChange:Me,indicatorPosition:Te,inset:C!==`center`,labelId:U,rootLabelId:k,largeStep:u,lastUsedThumbIndex:ye,lastChangedValueRef:me,lastChangeReasonRef:he,form:g,locale:d,max:p,min:m,minStepsBetweenValues:h,name:oe,onValueCommitted:M,orientation:b,pressedInputRef:ue,pressedThumbCenterOffsetRef:de,pressedThumbIndexRef:fe,pressedValuesRef:pe,registerFieldControlRef:Oe,renderBeforeHydration:C===`edge`,setActive:De,setDragging:Se,setIndicatorPosition:Ee,setLabelId:ie,setValue:je,state:Ne,step:x,thumbCollisionBehavior:S,thumbMap:Ce,thumbRefs:G,values:Ae}),[_e,W,U,k,ae,xe,te,ge,Me,Te,u,ye,me,he,g,d,p,m,h,oe,M,b,ue,de,fe,pe,Oe,De,Se,Ee,ie,je,Ne,x,S,C,Ce,G,Ae]),Fe=K(`div`,e,{state:Ne,ref:[r,le],props:[{"aria-labelledby":U,id:O,role:`group`},te.getValidationProps,D],stateAttributesMapping:xE});return(0,n.jsx)(wE.Provider,{value:Pe,children:(0,n.jsx)(H,{elementsRef:G,onMapChange:we,children:Fe})})}),process.env.NODE_ENV!==`production`&&(EE.displayName=`SliderRoot`)})),DE,lie=m((()=>{cS(),q(),TE(),SE(),DE=t.forwardRef(function(e,n){let{"aria-live":r=`off`,render:i,className:a,children:o,style:s,...c}=e,{thumbMap:l,state:u,values:d,formatOptionsRef:f,locale:p}=CE(),m=t.useMemo(()=>{let e=``;for(let t of l.values())t?.inputId&&(e+=`${t.inputId} `);return e.trim()===``?void 0:e.trim()},[l]),h=t.useMemo(()=>{let e=[];for(let t=0;t<d.length;t+=1)e.push(iS(d[t],p,f.current??void 0));return e},[f,p,d]),g=t.useMemo(()=>{let e=[];for(let t=0;t<d.length;t+=1)e.push(h[t]||d[t]);return e.join(` – `)},[d,h]);return K(`output`,e,{state:u,ref:n,props:[{"aria-live":r,children:typeof o==`function`?o(h,d):g,htmlFor:m},c],stateAttributesMapping:xE})}),process.env.NODE_ENV!==`production`&&(DE.displayName=`SliderValue`)}));function OE(e){let t=e.getBoundingClientRect();return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}var kE=m((()=>{}));function AE(e){if(e===0)return 0;if(Math.abs(e)<1){let t=e.toExponential().split(`e-`),n=t[0].split(`.`)[1];return(n?n.length:0)+parseInt(t[1],10)}let t=e.toString().split(`.`)[1];return t?t.length:0}function jE(e,t,n){let r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(Math.max(AE(t),AE(n))))}var ME=m((()=>{}));function NE({values:e,index:t,nextValue:n,min:r,max:i,step:a,minStepsBetweenValues:o,initialValues:s}){if(e.length===0)return[];let c=e.slice(),l=a*o,u=c.length-1,d=s??e;c[t]=ib(n,r+t*l,i-(u-t)*l);for(let e=t+1;e<=u;e+=1){let t=c[e-1]+l,n=i-(u-e)*l,r=d[e]??c[e],a=Math.max(c[e],t);r<a&&(a=Math.max(r,t)),c[e]=ib(a,t,n)}for(let e=t-1;e>=0;--e){let t=c[e+1]-l,n=r+e*l,i=d[e]??c[e],a=Math.min(c[e],t);i>a&&(a=Math.min(i,t)),c[e]=ib(a,n,t)}for(let e=0;e<=u;e+=1)c[e]=Number(c[e].toFixed(12));return c}var uie=m((()=>{ab()}));function die({behavior:e,values:t,currentValues:n,initialValues:r,pressedIndex:i,nextValue:a,min:o,max:s,step:c,minStepsBetweenValues:l}){let u=n??t,d=r??t;if(!(u.length>1))return{value:a,thumbIndex:0,didSwap:!1};let f=c*l;switch(e){case`swap`:{let e=u[i],t=1e-7,n=u.slice(),r=n[i-1],p=n[i+1],m=ib(a,r==null?o:r+f,p==null?s:p-f),h=Number(m.toFixed(12));n[i]=h;let g=a>e,_=a<e,v=g&&p!=null&&a>=p-t,y=_&&r!=null&&a<=r+t;if(!v&&!y)return{value:n,thumbIndex:i,didSwap:!1};let b=v?i+1:i-1,x=n.map((e,t)=>t===i?h:d[t]??u[t]),S=a;S=v?Math.max(a,n[b]):Math.min(a,n[b]);let C=NE({values:n,index:b,nextValue:S,min:o,max:s,step:c,minStepsBetweenValues:l,initialValues:x}),w=v?b-1:b+1;if(w>=0&&w<C.length){let e=C[w-1],t=C[w+1],n=e==null?o:e+f;n=Math.max(n,o+w*f);let r=t==null?s:t-f;r=Math.min(r,s-(C.length-1-w)*f);let i=ib(h,n,r);C[w]=Number(i.toFixed(12))}return{value:C,thumbIndex:b,didSwap:!0}}case`push`:return{value:NE({values:u,index:i,nextValue:a,min:o,max:s,step:c,minStepsBetweenValues:l}),thumbIndex:i,didSwap:!1};default:{let e=u.slice(),t=e[i-1],n=e[i+1],r=ib(a,t==null?o:t+f,n==null?s:n-f);return e[i]=Number(r.toFixed(12)),{value:e,thumbIndex:i,didSwap:!1}}}}var fie=m((()=>{ab(),uie()}));function pie(e,t){if(!e)return{start:0,end:0};function n(e){let t=e==null?0:parseFloat(e);return Number.isNaN(t)?0:t}let r=t?`Top`:`InlineStart`,i=t?`Bottom`:`InlineEnd`;return{start:n(e[`border${r}Width`])+n(e[`padding${r}`]),end:n(e[`border${i}Width`])+n(e[`padding${i}`])}}function PE(e,t){if(t.current!=null&&e.changedTouches){let n=e;for(let e=0;e<n.changedTouches.length;e+=1){let r=n.changedTouches[e];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return null}return{x:e.clientX,y:e.clientY}}var FE,IE,mie=m((()=>{yr(),qa(),na(),un(),F(),hc(),Sa(),ab(),Vt(),zt(),q(),ce(),TE(),SE(),kE(),ME(),bE(),fie(),FE=2,IE=t.forwardRef(function(e,n){let{render:r,className:i,style:a,...o}=e,{disabled:s,dragging:c,inset:l,lastChangedValueRef:u,lastChangeReasonRef:d,max:f,min:p,minStepsBetweenValues:m,onValueCommitted:h,orientation:g,pressedInputRef:_,pressedThumbCenterOffsetRef:v,pressedThumbIndexRef:y,pressedValuesRef:b,registerFieldControlRef:x,renderBeforeHydration:S,setActive:C,setDragging:w,setValue:T,state:E,step:D,thumbCollisionBehavior:O,thumbRefs:k,values:j}=CE(),M=oe(),N=j.length>1,P=g===`vertical`,F=t.useRef(null),I=t.useRef(null),L=A(e=>{e&&I.current==null&&(I.current??=getComputedStyle(e))}),R=t.useRef(null),ee=t.useRef(0),z=t.useRef(0),B=mc(j),V=A(e=>{y.current!==e&&(y.current=e);let t=k.current[e];if(!t){v.current=null,_.current=null;return}_.current=t.querySelector(`input[type="range"]`)}),te=A(e=>{let t=F.current;if(!t)return null;let{width:n,height:r,bottom:i,left:a,right:o}=t.getBoundingClientRect(),s=pie(I.current,P),c=z.current,l=(P?r:n)-s.start-s.end-c*2,u=v.current??0,d=e.x-u,h=e.y-u,g=ib(((P?i-h-s.end:(M===`rtl`?o-d:d-a)-s.start)-c)/l,0,1),_=(f-p)*g+p;if(_=jE(_,D,p),_=ib(_,p,f),!N)return{value:_,thumbIndex:0,didSwap:!1};let x=y.current;if(x<0)return null;let S=die({behavior:O,values:j,currentValues:B.current??j,initialValues:b.current,pressedIndex:x,nextValue:_,min:p,max:f,step:D,minStepsBetweenValues:m});return O===`swap`&&S.didSwap?V(S.thumbIndex):y.current=S.thumbIndex,S}),ne=A(e=>{b.current=N?j.slice():null,B.current=j;let t=y.current,n=t;if(t>-1&&t<j.length){if(j[t]===f){let e=t;for(;e>0&&j[e-1]===f;)--e;n=e}}else{let t=P?`y`:`x`,r;n=-1;for(let i=0;i<k.current.length;i+=1){let a=k.current[i];if($n(a)){let o=OE(a),s=Math.abs(e[t]-o[t]);(r===void 0||s<=r)&&(n=i,r=s)}}}if(n>-1&&n!==t&&V(n),l){let e=k.current[n];$n(e)&&(z.current=e.getBoundingClientRect()[P?`height`:`width`]/2)}}),H=A(e=>{let t=k.current?.[e]?.querySelector(`input[type="range"]`);t&&t.focus({preventScroll:!0,focusVisible:!1})}),re=A(e=>{let t=PE(e,R);if(t==null)return;if(ee.current+=1,e.type===`pointermove`&&e.buttons===0){ie(e);return}let n=te(t);n!=null&&yE(n.value,D,m)&&(!c&&ee.current>FE&&w(!0),T(n.value,J(At,e,void 0,{activeThumbIndex:n.thumbIndex})),B.current=Array.isArray(n.value)?n.value:[n.value],n.didSwap&&H(n.thumbIndex))});function ie(e){C(-1),w(!1),_.current=null,v.current=null;let t=PE(e,R),n=t==null?null:te(t);if(n!=null){let t=d.current;h(u.current??n.value,Bt(t,e))}`pointerType`in e&&F.current?.hasPointerCapture(e.pointerId)&&F.current?.releasePointerCapture(e.pointerId),y.current=-1,R.current=null,b.current=null,ae()}let U=A(e=>{if(s)return;let t=e.changedTouches[0];t!=null&&(R.current=t.identifier);let n=PE(e,R);if(n!=null){ne(n);let t=te(n);if(t==null)return;H(t.thumbIndex),T(t.value,J(_t,e,void 0,{activeThumbIndex:t.thumbIndex})),B.current=Array.isArray(t.value)?t.value:[t.value],t.didSwap&&H(t.thumbIndex)}ee.current=0;let r=ta(F.current);r.addEventListener(`touchmove`,re,{passive:!0}),r.addEventListener(`touchend`,ie,{passive:!0})}),ae=A(()=>{let e=ta(F.current);e.removeEventListener(`pointermove`,re),e.removeEventListener(`pointerup`,ie),e.removeEventListener(`touchmove`,re),e.removeEventListener(`touchend`,ie),b.current=null}),se=rn();return t.useEffect(()=>{let e=F.current;if(!e)return()=>ae();let t=Ka(e,`touchstart`,U,{passive:!0});return()=>{t(),se.cancel(),ae()}},[ae,U,F,se]),t.useEffect(()=>{s&&ae()},[s,ae]),K(`div`,e,{state:E,ref:[n,x,F,L],props:[{"data-base-ui-slider-control":S?``:void 0,onPointerDown(e){let t=F.current,n=Yr(e.nativeEvent);if(!t||s||e.defaultPrevented||!$n(n)||e.button!==0)return;let r=PE(e,R);if(r!=null){ne(r);let n=te(r);if(n==null)return;Jr(k.current[n.thumbIndex],qr(ta(t)))?e.preventDefault():se.request(()=>{H(n.thumbIndex)}),w(!0),v.current??(T(n.value,J(_t,e.nativeEvent,void 0,{activeThumbIndex:n.thumbIndex})),B.current=Array.isArray(n.value)?n.value:[n.value],n.didSwap&&H(n.thumbIndex))}e.nativeEvent.pointerId&&t.setPointerCapture(e.nativeEvent.pointerId),ee.current=0;let i=ta(F.current);i.addEventListener(`pointermove`,re,{passive:!0}),i.addEventListener(`pointerup`,ie,{once:!0})}},o],stateAttributesMapping:xE})}),process.env.NODE_ENV!==`production`&&(IE.displayName=`SliderControl`)})),LE,hie=m((()=>{q(),TE(),SE(),LE=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=CE();return K(`div`,e,{state:o,ref:t,props:[{style:{position:`relative`}},a],stateAttributesMapping:xE})}),process.env.NODE_ENV!==`production`&&(LE.displayName=`SliderTrack`)}));function gie(){return De}function _ie(){return!1}function vie(){return!0}function RE(){return(0,i.useSyncExternalStore)(gie,_ie,vie)}var zE=m((()=>{nm()})),BE,yie=m((()=>{BE=function(e){return e.index=`data-index`,e.dragging=`data-dragging`,e.orientation=`data-orientation`,e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.focused=`data-focused`,e}({})})),bie=m((()=>{}));function xie(e,t,n,r){if(!(t<0))return e.length===2?t===0?`${iS(e[t],r,n)} start range`:`${iS(e[t],r,n)} end range`:n?iS(e[t],r,n):void 0}function VE(e,t,n,r,i){let a=n===1?e+t:e-t;return ib(Number(a.toFixed(Math.max(AE(e),AE(t),AE(r)))),r,i)}var HE,UE,Sie=m((()=>{F(),R(),ye(),yc(),ab(),cS(),$e(),$t(),zE(),q(),mS(),Ga(),kn(),ce(),Dy(),dm(),ii(),xm(),kE(),vE(),ME(),TE(),SE(),yie(),bie(),HE=new Set([Da,Oa,ka,Aa,ja,`End`,Ma,Na]),UE=t.forwardRef(function(e,r){let{render:i,children:a,className:o,"aria-describedby":s,"aria-label":c,"aria-labelledby":l,disabled:u=!1,getAriaLabel:d,getAriaValueText:f,id:p,index:m,inputRef:h,onBlur:g,onFocus:_,onKeyDown:v,tabIndex:y,style:b,...x}=e,{nonce:S}=wy(),C=Qt(p),{active:w,lastUsedThumbIndex:T,controlRef:E,disabled:D,validation:O,formatOptionsRef:k,handleInputChange:j,inset:M,labelId:N,largeStep:P,locale:F,max:I,min:R,minStepsBetweenValues:ee,form:z,name:B,orientation:V,pressedInputRef:te,pressedThumbCenterOffsetRef:ne,pressedThumbIndexRef:H,renderBeforeHydration:re,setActive:ie,setIndicatorPosition:U,state:ae,step:se,values:ce}=CE(),le=oe(),W=u||D,G=ce.length>1,ue=V===`vertical`,de=le===`rtl`,{setTouched:fe,setFocused:me,validationMode:he}=lm(),ge=t.useRef(null),_e=t.useRef(null),ve=t.useRef(!1),ye=Qt(),be=bm(),xe=G?ye:be,{ref:Se,index:Ce}=Dn({metadata:t.useMemo(()=>({inputId:xe}),[xe])}),we=G?m??Ce:0,Te=we===ce.length-1,Ee=ce[we],De=pS(Ee,R,I),[Oe,ke]=t.useState(),Ae=RE(),je=T>=0&&T<ce.length?T:-1,Me=A(()=>{let e=E.current,t=ge.current;if(!e||!t)return;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=ue?`height`:`width`,a=r[i]-n[i],o=(n[i]/2+a*De/100)/r[i]*100,s=Number.isFinite(o)?o:void 0;ke(s),we===0?U(e=>[s,e[1]]):Te&&U(e=>[e[0],s])});L(()=>{M&&queueMicrotask(Me)},[Me,M]),L(()=>{M&&Me()},[Me,M,De]),L(()=>{if(!M||typeof ResizeObserver!=`function`)return;let e=E.current,t=ge.current;if(!e||!t)return;let n=new ResizeObserver(Me);return n.observe(e),n.observe(t),()=>{n.disconnect()}},[E,Me,M]);let Ne=t.useCallback(()=>{let e=ue?`bottom`:`insetInlineStart`,t=ue?`left`:`top`,n;return G?w===we?n=2:je===we&&(n=1):w===we&&(n=1),M?{"--position":`${Oe??0}%`,visibility:re&&Ae||Oe===void 0?`hidden`:void 0,position:`absolute`,[e]:`var(--position)`,[t]:`50%`,translate:`${(ue||!de?-1:1)*50}% ${(ue?1:-1)*50}%`,zIndex:n}:Number.isFinite(De)?{position:`absolute`,[e]:`${De}%`,[t]:`50%`,translate:`${(ue||!de?-1:1)*50}% ${(ue?1:-1)*50}%`,zIndex:n}:_c},[w,we,M,Ae,Oe,G,re,de,je,De,ue]),Pe;V===`vertical`&&(Pe=de?`vertical-rl`:`vertical-lr`);let Fe=typeof d==`function`?d(we):c,Ie=Le({"aria-label":Fe,"aria-labelledby":l??(Fe==null?N:void 0),"aria-describedby":s,"aria-orientation":V,"aria-valuenow":Ee,"aria-valuetext":typeof f==`function`?f(iS(Ee,F,k.current??void 0),Ee,we):xie(ce,we,k.current??void 0,F),disabled:W,form:z,id:xe,max:I,min:R,name:B,onChange(e){j(e.currentTarget.valueAsNumber,we,e)},onFocus(e){let t=ve.current;ve.current=!1,ie(we),me(!0),t&&e.stopPropagation()},onBlur(e){if(ve.current){e.stopPropagation();return}ge.current&&(ie(-1),fe(!0),me(!1),he===`onBlur`&&O.commit(_E(Ee,we,R,I,G,ce)))},onKeyDown(e){if(!HE.has(e.key))return;Ba.has(e.key)&&e.stopPropagation();let t=null,n=jE(Ee,se,R);switch(e.key){case Da:t=VE(n,e.shiftKey?P:se,1,R,I);break;case Aa:t=VE(n,e.shiftKey?P:se,de?-1:1,R,I);break;case Oa:t=VE(n,e.shiftKey?P:se,-1,R,I);break;case ka:t=VE(n,e.shiftKey?P:se,de?1:-1,R,I);break;case Ma:t=VE(n,P,1,R,I);break;case Na:t=VE(n,P,-1,R,I);break;case`End`:t=I,G&&(t=Number.isFinite(ce[we+1])?ce[we+1]-se*ee:I);break;case ja:t=R,G&&(t=Number.isFinite(ce[we-1])?ce[we-1]+se*ee:R);break;default:break}if(t!==null){let n=e.currentTarget;ni(n)||(ve.current=!0,n.blur(),n.focus({preventScroll:!0,focusVisible:!0})),j(t,we,e),e.preventDefault()}},step:se,style:{..._c,width:`100%`,height:`100%`,writingMode:Pe},tabIndex:y??void 0,type:`range`,value:Ee??``},O.getInputValidationProps),Re=pe(_e,O.inputRef,h);return K(`div`,e,{state:ae,ref:[r,Se,ge],props:[{[BE.index]:we,children:(0,n.jsxs)(t.Fragment,{children:[a,(0,n.jsx)(`input`,{ref:Re,...Ie,suppressHydrationWarning:!0}),M&&Ae&&re&&Te&&(0,n.jsx)(`script`,{nonce:S,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript?.parentElement;if(!t)return;const e=t.closest("[data-base-ui-slider-control]");if(!e)return;const r=e.querySelector("[data-base-ui-slider-indicator]"),i=e.getBoundingClientRect(),n="vertical"===e.getAttribute("data-orientation")?"height":"width",o=e.querySelectorAll(\'input[type="range"]\'),l=o.length>1,s=o.length-1;let a=null,u=null;for(let t=0;t<o.length;t+=1){const e=o[t],y=parseFloat(e.getAttribute("value")??"");if(Number.isNaN(y))return;const c=e.parentElement;if(!c)return;const p=parseFloat(e.getAttribute("max")??"100"),g=parseFloat(e.getAttribute("min")??"0"),b=c?.getBoundingClientRect(),d=i[n]-b[n],m=100*(y-g)/(p-g),v=(b[n]/2+d*m/100)/i[n]*100;c.style.setProperty("--position",`${v}%`),Number.isFinite(v)&&(c.style.removeProperty("visibility"),r&&(0===t?(a=v,r.style.setProperty("--start-position",`${v}%`),l||r.style.removeProperty("visibility")):t===s&&(u=v-(a??0),r.style.setProperty("--end-position",`${v}%`),r.style.setProperty("--relative-size",`${u}%`),r.style.removeProperty("visibility"))))}}();'},suppressHydrationWarning:!0})]}),id:C,onBlur:g,onFocus:_,onPointerDown(e){if(H.current=we,ge.current!=null){let t=V===`horizontal`?`x`:`y`,n=OE(ge.current);ne.current=(V===`horizontal`?e.clientX:e.clientY)-n[t]}_e.current!=null&&te.current!==_e.current&&(te.current=_e.current)},style:Ne(),suppressHydrationWarning:re||void 0},x],stateAttributesMapping:xE})}),process.env.NODE_ENV!==`production`&&(UE.displayName=`SliderThumb`)}));function Cie(e,t,n,r,i,a){let o=n===void 0||t&&r===void 0?`hidden`:void 0,s=e?`bottom`:`insetInlineStart`,c=e?`height`:`width`,l={visibility:i&&a?`hidden`:o,position:e?`absolute`:`relative`,[e?`width`:`height`]:`inherit`};return l[`--start-position`]=`${n??0}%`,t?(l[`--relative-size`]=`${(r??0)-(n??0)}%`,l[s]=`var(--start-position)`,l[c]=`var(--relative-size)`,l):(l[s]=0,l[c]=`var(--start-position)`,l)}function wie(e,t,n,r){let i=e?`bottom`:`insetInlineStart`,a=e?`height`:`width`,o={position:e?`absolute`:`relative`,[e?`width`:`height`]:`inherit`};if(!t)return o[i]=0,o[a]=`${n}%`,o;let s=r-n;return o[i]=`${n}%`,o[a]=`${s}%`,o}var WE,GE=m((()=>{mS(),zE(),q(),TE(),SE(),WE=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{indicatorPosition:o,inset:s,max:c,min:l,orientation:u,renderBeforeHydration:d,state:f,values:p}=CE(),m=RE(),h=u===`vertical`,g=p.length>1,_=s?Cie(h,g,o[0],o[1],d,m):wie(h,g,pS(p[0],l,c),pS(p[p.length-1],l,c));return K(`div`,e,{state:f,ref:t,props:[{"data-base-ui-slider-indicator":d?``:void 0,style:_,suppressHydrationWarning:d||void 0},a],stateAttributesMapping:xE})}),process.env.NODE_ENV!==`production`&&(WE.displayName=`SliderIndicator`)})),Tie=m((()=>{cie(),yr(),na(),F(),Sa(),x_(),ym(),q(),TE(),SE(),lie(),mie(),hie(),Sie(),GE()})),Eie=m((()=>{Tie()}));function Die(){let e=t.useContext(KE);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(63):`Base UI: SwitchRootContext is missing. Switch parts must be placed within <Switch.Root>.`);return e}var KE,qE=m((()=>{G(),KE=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(KE.displayName=`SwitchRootContext`)})),JE,Oie=m((()=>{JE=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}({})})),YE,XE=m((()=>{cm(),Oie(),YE={...sm,checked(e){return e?{[JE.checked]:``}:{[JE.unchecked]:``}}}})),ZE,QE=m((()=>{E(),F(),ye(),R(),yc(),Ae(),q(),$e(),$t(),Dr(),qE(),XE(),dm(),pm(),gm(),ym(),Lg(),xm(),Vt(),zt(),Af(),ZE=t.forwardRef(function(e,r){let{checked:i,className:a,defaultChecked:o,"aria-labelledby":s,form:c,id:l,inputRef:u,name:d,nativeButton:f=!1,onCheckedChange:p,readOnly:m=!1,required:h=!1,disabled:g=!1,render:_,uncheckedValue:v,value:y,style:b,...x}=e,{clearErrors:S}=mm(),{state:C,setTouched:T,setDirty:E,validityData:D,setFilled:O,setFocused:k,shouldValidateOnChange:j,validationMode:M,disabled:N,name:P,validation:F}=lm(),{labelId:I}=_m(),R=N||g,ee=P??d,z=A(p),B=t.useRef(null),V=pe(B,u,F.inputRef),te=t.useRef(null),ne=Qt(),H=bm({id:l,implicit:!1,controlRef:te}),re=f?void 0:H,[ie,U]=w({controlled:i,default:!!o,name:`Switch`,state:`checked`});fm(te,{id:ne,value:ie}),L(()=>{B.current&&O(B.current.checked)},[B,O]),kf(ie,()=>{S(ee),E(ie!==D.initialValue),O(ie),j()?F.commit(ie):F.commit(ie,!0)});let{getButtonProps:ae,buttonRef:oe}=wr({disabled:R,native:f}),se=Pg(s,I,B,!f,re),ce={id:f?H:ne,role:`switch`,"aria-checked":ie,"aria-readonly":m||void 0,"aria-required":h||void 0,"aria-labelledby":se,onFocus(){R||k(!0)},onBlur(){let e=B.current;!e||R||(T(!0),k(!1),M===`onBlur`&&F.commit(e.checked))},onClick(e){m||R||(e.preventDefault(),B.current?.dispatchEvent(new PointerEvent(`click`,{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey})))}},le=t.useMemo(()=>Le({checked:ie,disabled:R,form:c,id:re,name:ee,required:h,style:ee?vc:_c,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,ref:V,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(m){e.preventDefault();return}let t=e.currentTarget.checked,n=J(ct,e.nativeEvent);z?.(t,n),!n.isCanceled&&U(t)},onFocus(){te.current?.focus()}},F.getInputValidationProps,y===void 0?ke:{value:y}),[ie,R,c,V,re,ee,z,m,h,U,F,y]),W=t.useMemo(()=>({...C,checked:ie,disabled:R,readOnly:m,required:h}),[C,ie,R,m,h]),G=K(`span`,e,{state:W,ref:[r,te,oe],props:[ce,F.getValidationProps,x,ae],stateAttributesMapping:YE});return(0,n.jsxs)(KE.Provider,{value:W,children:[G,!ie&&ee&&v!==void 0&&(0,n.jsx)(`input`,{type:`hidden`,form:c,name:ee,value:v}),(0,n.jsx)(`input`,{...le,suppressHydrationWarning:!0})]})}),process.env.NODE_ENV!==`production`&&(ZE.displayName=`SwitchRoot`)})),$E,eD=m((()=>{qE(),q(),dm(),XE(),$E=t.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=lm(),s=Die();return K(`span`,e,{state:{...o,...s},ref:t,stateAttributesMapping:YE,props:a})}),process.env.NODE_ENV!==`production`&&($E.displayName=`SwitchThumb`)})),tD=m((()=>{QE(),eD()})),nD=m((()=>{tD()}));function rD(){let e=t.useContext(iD);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(64):`Base UI: TabsRootContext is missing. Tabs parts must be placed within <Tabs.Root>.`);return e}var iD,aD=m((()=>{G(),iD=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(iD.displayName=`TabsRootContext`)})),oD,kie=m((()=>{oD=function(e){return e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e}({})})),sD,cD=m((()=>{kie(),sD={tabActivationDirection:e=>({[oD.activationDirection]:e})}}));function lD(e,t,n,r){if(e==null||t==null)return`none`;let i=null,a=null;for(let[n,o]of r.entries()){if(o==null)continue;let r=o.value??o.index;if(e===r&&(i=n),t===r&&(a=n),i!=null&&a!=null)break}if(i==null||a==null)return i!==a&&(typeof e==`number`||typeof e==`string`)&&typeof e==typeof t?n===`horizontal`?t>e?`right`:`left`:t>e?`down`:`up`:`none`;let o=i.getBoundingClientRect(),s=a.getBoundingClientRect();if(n===`horizontal`){if(s.left<o.left)return`left`;if(s.left>o.left)return`right`}else{if(s.top<o.top)return`up`;if(s.top>o.top)return`down`}return`none`}var uD,dD=m((()=>{E(),R(),F(),q(),ae(),aD(),cD(),uD=t.forwardRef(function(e,r){let{className:i,defaultValue:a=0,onValueChange:o,orientation:s=`horizontal`,render:c,value:l,style:u,...d}=e,f=Object.hasOwn(e,`defaultValue`),p=t.useRef([]),[m,h]=t.useState(()=>new Map),[g,_]=w({controlled:l,default:a,name:`Tabs`,state:`value`}),v=l!==void 0,[y,b]=t.useState(()=>new Map),x=t.useCallback(e=>{if(e===void 0)return null;for(let[t,n]of y.entries())if(n!=null&&e===(n.value??n.index))return t;return null},[y]),[S,C]=t.useState(()=>({previousValue:g,tabActivationDirection:`none`})),{previousValue:T,tabActivationDirection:E}=S,D=E,O=!1;T!==g&&(D=lD(T,g,s,y),O=T!=null&&g!=null&&x(g)==null);let k=O?T:g,j=T!==k||E!==D;L(()=>{j&&C({previousValue:k,tabActivationDirection:D})},[k,j,D]);let M=A((e,t)=>{t.activationDirection=lD(g,e,s,y),o?.(e,t),!t.isCanceled&&_(e)}),N=A((e,t)=>{h(n=>{if(n.get(e)===t)return n;let r=new Map(n);return r.set(e,t),r})}),P=A((e,t)=>{h(n=>{if(!n.has(e)||n.get(e)!==t)return n;let r=new Map(n);return r.delete(e),r})}),F=t.useCallback(e=>m.get(e),[m]),I=t.useCallback(e=>{for(let t of y.values())if(e===t?.value)return t?.id},[y]),R=t.useMemo(()=>({getTabElementBySelectedValue:x,getTabIdByPanelValue:I,getTabPanelIdByValue:F,onValueChange:M,orientation:s,registerMountedTabPanel:N,setTabMap:b,unregisterMountedTabPanel:P,tabActivationDirection:D,value:g}),[x,I,F,M,s,N,b,P,D,g]),ee=t.useMemo(()=>{for(let e of y.values())if(e!=null&&e.value===g)return e},[y,g]),z=t.useMemo(()=>{for(let e of y.values())if(e!=null&&!e.disabled)return e.value},[y]);L(()=>{if(v||y.size===0)return;let e=ee?.disabled;if(f&&e&&g===a||!e&&!(ee==null&&g!==null))return;let t=z??null;g!==t&&(_(t),C(e=>e.tabActivationDirection===`none`?e:{...e,tabActivationDirection:`none`}))},[a,z,f,v,ee,_,y,g]);let B=K(`div`,e,{state:{orientation:s,tabActivationDirection:D},ref:r,props:d,stateAttributesMapping:sD});return(0,n.jsx)(iD.Provider,{value:R,children:(0,n.jsx)(H,{elementsRef:p,children:B})})}),process.env.NODE_ENV!==`production`&&(uD.displayName=`TabsRoot`)}));function fD(){let e=t.useContext(pD);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(65):`Base UI: TabsListContext is missing. TabsList parts must be placed within <Tabs.List>.`);return e}var pD,mD=m((()=>{G(),pD=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(pD.displayName=`TabsListContext`)})),hD,gD=m((()=>{na(),R(),$t(),q(),Dr(),Kx(),ey(),aD(),mD(),Vt(),zt(),Sa(),hD=t.forwardRef(function(e,n){let{className:r,disabled:i=!1,render:a,value:o,id:s,nativeButton:c=!0,style:l,...u}=e,{value:d,getTabPanelIdByValue:f,orientation:p}=rD(),{activateOnFocus:m,highlightedTabIndex:h,onTabActivation:g,registerTabResizeObserverElement:_,setHighlightedTabIndex:v,tabsListElement:y}=fD(),b=Qt(s),{compositeProps:x,compositeRef:S,index:C}=$v({metadata:t.useMemo(()=>({disabled:i,id:b,value:o}),[i,b,o])}),w=o===d,T=t.useRef(!1),E=t.useRef(null);t.useEffect(()=>{let e=E.current;if(e)return _(e)},[_]),L(()=>{if(T.current){T.current=!1;return}if(!(w&&C>-1&&h!==C))return;let e=y;if(e!=null){let t=qr(ta(e));if(t&&Jr(e,t))return}i||v(C)},[w,C,h,v,i,y]);let{getButtonProps:D,buttonRef:O}=wr({disabled:i,native:c,focusableWhenDisabled:!0}),k=f(o),A=t.useRef(!1),j=t.useRef(!1);function M(e){w||i||g(o,J(ct,e.nativeEvent,void 0,{activationDirection:`none`}))}function N(e){w||(C>-1&&!i&&v(C),!i&&m&&(!A.current||A.current&&j.current)&&g(o,J(ct,e.nativeEvent,void 0,{activationDirection:`none`})))}function P(e){if(w||i)return;A.current=!0;function t(){A.current=!1,j.current=!1}(!e.button||e.button===0)&&(j.current=!0,ta(e.currentTarget).addEventListener(`pointerup`,t,{once:!0}))}return K(`button`,e,{state:{disabled:i,active:w,orientation:p},ref:[n,O,S,E],props:[x,{role:`tab`,"aria-controls":k,"aria-selected":w,id:b,onClick:M,onFocus:N,onPointerDown:P,[Gx]:w?``:void 0,onKeyDownCapture(){T.current=!0}},u,D]})}),process.env.NODE_ENV!==`production`&&(hD.displayName=`TabsTab`)})),_D=m((()=>{})),vD,Aie=m((()=>{vD=function(e){return e.activeTabLeft=`--active-tab-left`,e.activeTabRight=`--active-tab-right`,e.activeTabTop=`--active-tab-top`,e.activeTabBottom=`--active-tab-bottom`,e.activeTabWidth=`--active-tab-width`,e.activeTabHeight=`--active-tab-height`,e}({})})),yD,bD,jie=m((()=>{vd(),q(),fy(),zE(),aD(),cD(),mD(),_D(),Aie(),Dy(),yD={...sD,activeTabPosition:()=>null,activeTabSize:()=>null},bD=t.forwardRef(function(e,r){let{className:i,render:a,renderBeforeHydration:o=!1,style:s,...c}=e,{nonce:l}=wy(),{getTabElementBySelectedValue:u,orientation:d,tabActivationDirection:f,value:p}=rD(),{tabsListElement:m,registerIndicatorUpdateListener:h}=fD(),g=RE(),_=_d();t.useEffect(()=>h(_),[h,_]);let v=0,y=0,b=0,x=0,S=0,C=0,w=!1;if(p!=null&&m!=null){let e=u(p);if(w=!0,e!=null){let{width:t,height:n}=dy(e),{width:r,height:i}=dy(m),a=e.getBoundingClientRect(),o=m.getBoundingClientRect(),s=r>0?o.width/r:1,c=i>0?o.height/i:1;if(Math.abs(s)>2**-52&&Math.abs(c)>2**-52){let e=a.left-o.left,t=a.top-o.top;v=e/s+m.scrollLeft-m.clientLeft,b=t/c+m.scrollTop-m.clientTop}else v=e.offsetLeft,b=e.offsetTop;S=t,C=n,y=m.scrollWidth-v-S,x=m.scrollHeight-b-C}}let T=t.useMemo(()=>w?{left:v,right:y,top:b,bottom:x}:null,[v,y,b,x,w]),E=t.useMemo(()=>w?{width:S,height:C}:null,[S,C,w]),D=t.useMemo(()=>{if(w)return{[vD.activeTabLeft]:`${v}px`,[vD.activeTabRight]:`${y}px`,[vD.activeTabTop]:`${b}px`,[vD.activeTabBottom]:`${x}px`,[vD.activeTabWidth]:`${S}px`,[vD.activeTabHeight]:`${C}px`}},[v,y,b,x,S,C,w]),O=K(`span`,e,{state:{orientation:d,activeTabPosition:T,activeTabSize:E,tabActivationDirection:f},ref:r,props:[{role:`presentation`,style:D,hidden:!(w&&S>0&&C>0)},c,{suppressHydrationWarning:!0}],stateAttributesMapping:yD});return p==null?null:(0,n.jsxs)(t.Fragment,{children:[O,g&&o&&(0,n.jsx)(`script`,{nonce:l,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();'},suppressHydrationWarning:!0})]})}),process.env.NODE_ENV!==`production`&&(bD.displayName=`TabsIndicator`)})),xD,Mie=m((()=>{_n(),xD=function(e){return e.index=`data-index`,e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e.hidden=`data-hidden`,e[e.startingStyle=pn.startingStyle]=`startingStyle`,e[e.endingStyle=pn.endingStyle]=`endingStyle`,e}({})})),SD,CD,Nie=m((()=>{_p(),R(),$t(),_n(),$a(),xn(),q(),kn(),cD(),aD(),Mie(),SD={...sD,...gn},CD=t.forwardRef(function(e,n){let{className:r,value:i,render:a,keepMounted:o=!1,style:s,...c}=e,{value:l,getTabIdByPanelValue:u,orientation:d,tabActivationDirection:f,registerMountedTabPanel:p,unregisterMountedTabPanel:m}=rD(),h=Qt(),{ref:g,index:_}=Dn({metadata:t.useMemo(()=>({id:h,value:i}),[h,i])}),v=i===l,{mounted:y,transitionStatus:b,setMounted:x}=bn(v),S=!y,C=u(i),w={hidden:S,orientation:d,tabActivationDirection:f,transitionStatus:b},T=t.useRef(null),E=K(`div`,e,{state:w,ref:[n,g,T],props:[{"aria-labelledby":C,hidden:S,id:h,role:`tabpanel`,tabIndex:v?0:-1,inert:gp(!v),[xD.index]:_},c],stateAttributesMapping:SD});return Qa({open:v,ref:T,onComplete(){v||x(!1)}}),L(()=>{if(!(S&&!o)&&h!=null)return p(i,h),()=>{m(i,h)}},[S,o,i,h,p,m]),o||y?E:null}),process.env.NODE_ENV!==`production`&&(CD.displayName=`TabsPanel`)})),wD,Pie=m((()=>{F(),Ae(),Qx(),cD(),aD(),mD(),wD=t.forwardRef(function(e,r){let{activateOnFocus:i=!1,className:a,loopFocus:o=!0,render:s,style:c,...l}=e,{onValueChange:u,orientation:d,value:f,setTabMap:p,tabActivationDirection:m}=rD(),[h,g]=t.useState(0),[_,v]=t.useState(null),y=t.useRef(new Set),b=t.useRef(new Set),x=t.useRef(null),S=A(()=>{y.current.forEach(e=>{e()})});t.useEffect(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{y.current.size&&S()});return x.current=e,_&&e.observe(_),b.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),x.current=null}},[_,S]);let C=A(e=>(y.current.add(e),()=>{y.current.delete(e)})),w=A(e=>(b.current.add(e),x.current?.observe(e),()=>{b.current.delete(e),x.current?.unobserve(e)})),T=A((e,t)=>{e!==f&&u(e,t)}),E={orientation:d,tabActivationDirection:m},D={"aria-orientation":d===`vertical`?`vertical`:void 0,role:`tablist`},O=t.useMemo(()=>({activateOnFocus:i,highlightedTabIndex:h,registerIndicatorUpdateListener:C,registerTabResizeObserverElement:w,onTabActivation:T,setHighlightedTabIndex:g,tabsListElement:_}),[i,h,C,w,T,g,_]);return(0,n.jsx)(pD.Provider,{value:O,children:(0,n.jsx)(Zx,{render:s,className:a,style:c,state:E,refs:[r,v],props:[D,l],stateAttributesMapping:sD,highlightedIndex:h,enableHomeAndEndKeys:!0,loopFocus:o,orientation:d,onHighlightedIndexChange:g,onMapChange:p,disabledIndices:Oe})})}),process.env.NODE_ENV!==`production`&&(wD.displayName=`TabsList`)})),TD=m((()=>{dD(),gD(),jie(),Nie(),Pie()})),ED=m((()=>{TD()}));function DD(){let e=t.useContext(OD);if(!e)throw Error(process.env.NODE_ENV===`production`?W(73):`Base UI: useToastManager must be used within <Toast.Provider>.`);return e}var OD,kD=m((()=>{G(),OD=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(OD.displayName=`ToastContext`)}));function AD(e){return jD+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${jD}`}var jD,MD=m((()=>{jD=0}));function ND(e,t){if(typeof e==`string`)return{description:e};if(typeof e==`function`){let n=e(t);return typeof n==`string`?{description:n}:n}return e}var PD=m((()=>{})),FD=m((()=>{Sa()})),ID,LD,RD,zD=m((()=>{bd(),MD(),na(),$s(),PD(),Sa(),FD(),ID=Qu(e=>e.toasts,e=>{let t=new Map,n=0,r=0;return e.forEach((e,i)=>{let a=e.transitionStatus===`ending`;t.set(e.id,{value:e,domIndex:i,visibleIndex:a?-1:n,offsetY:r}),r+=e.height||0,a||(n+=1)}),t}),LD={toasts:Z(e=>e.toasts),isEmpty:Z(e=>e.toasts.length===0),toast:Z(ID,(e,t)=>e.get(t)?.value),toastIndex:Z(ID,(e,t)=>e.get(t)?.domIndex??-1),toastOffsetY:Z(ID,(e,t)=>e.get(t)?.offsetY??0),toastVisibleIndex:Z(ID,(e,t)=>e.get(t)?.visibleIndex??-1),hovering:Z(e=>e.hovering),focused:Z(e=>e.focused),expanded:Z(e=>e.hovering||e.focused),expandedOrOutOfFocus:Z(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:Z(e=>e.prevFocusElement)},RD=class extends hd{timers=new Map;areTimersPaused=!1;constructor(e){super(e,{},LD)}setFocused(e){this.set(`focused`,e)}setHovering(e){this.set(`hovering`,e)}setIsWindowFocused(e){this.set(`isWindowFocused`,e)}setPrevFocusElement(e){this.set(`prevFocusElement`,e)}setViewport=e=>{this.set(`viewport`,e)};disposeEffect=()=>()=>{this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear()};removeToast(e,t={}){let n=LD.toastIndex(this.state,e);if(n===-1)return;let r=this.state.toasts[n];t.skipOnRemove||r?.onRemove?.();let i=[...this.state.toasts];i.splice(n,1),this.setToasts(i)}addToast=e=>{let{timeout:t,limit:n}=this.state,r=e.id||AD(`toast`);if(e.id){let t=LD.toast(this.state,e.id);if(t)if(t.transitionStatus===`ending`)this.removeToast(e.id,{skipOnRemove:!0});else{let{id:t,transitionStatus:n,...r}=e;return this.updateToastInternal(e.id,r,{resetTimer:!0,markUpdated:!0}),e.id}}let i={...e,id:r,updateKey:0,transitionStatus:`starting`},a=[i,...this.state.toasts],o=a.filter(e=>e.transitionStatus!==`ending`);if(o.length>n){let e=o.length-n,t=o.slice(-e),r=new Set(t.map(e=>e.id));this.setToasts(a.map(e=>{let t=r.has(e.id);return e.limited===t?e:{...e,limited:t}}))}else this.setToasts(a.map(e=>e.limited?{...e,limited:!1}:e));let s=i.timeout??t;return i.type!==`loading`&&s>0&&this.scheduleTimer(r,s,()=>this.closeToast(r)),LD.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),r};updateToast=(e,t)=>{this.updateToastInternal(e,t,{markUpdated:!0})};updateToastInternal=(e,t,n={})=>{let{timeout:r,toasts:i}=this.state,a=LD.toast(this.state,e)??null;if(!a||a.transitionStatus===`ending`)return;let o={...a,...t,...n.markUpdated&&{updateKey:(a.updateKey??0)+1}};this.setToasts(i.map(t=>t.id===e?o:t));let s=o.timeout??r,c=a?.timeout??r,l=Object.hasOwn(t,`timeout`),u=o.transitionStatus!==`ending`&&o.type!==`loading`&&s>0,d=this.timers.has(e),f=c!==s,p=a?.type===`loading`;if(!u&&d){this.timers.get(e)?.timeout?.clear(),this.timers.delete(e);return}if(u&&(!d||f||l||p||n.resetTimer)){let t=this.timers.get(e);t&&(t.timeout?.clear(),this.timers.delete(e)),this.scheduleTimer(e,s,()=>this.closeToast(e)),LD.expandedOrOutOfFocus(this.state)&&this.pauseTimers()}};closeToast=e=>{let t=e===void 0,{limit:n,toasts:r}=this.state,i;if(t)i=r,this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear();else{let t=LD.toast(this.state,e);if(!t)return;i=[t];let n=this.timers.get(e);n?.timeout&&(n.timeout.clear(),this.timers.delete(e))}let a=0,o={toasts:r.map(r=>{if(t||r.id===e)return{...r,transitionStatus:`ending`,height:0};if(r.transitionStatus===`ending`)return r;let i=a>=n;return a+=1,r.limited===i?r:{...r,limited:i}})};(t||r.length===1)&&(o.hovering=!1,o.focused=!1),this.update(o),i.forEach(e=>{e.transitionStatus!==`ending`&&e.onClose?.()}),this.handleFocusManagement(e)};promiseToast=(e,t)=>{let n=ND(t.loading),r=this.addToast({...n,type:`loading`}),i=e.then(e=>{let n=ND(t.success,e);return this.updateToast(r,{...n,type:`success`,timeout:n.timeout}),e}).catch(e=>{let n=ND(t.error,e);return this.updateToast(r,{...n,type:`error`,timeout:n.timeout}),Promise.reject(e)});return{}.hasOwnProperty.call(t,`setPromise`)&&t.setPromise(i),i};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(e=>{if(e.timeout){e.timeout.clear();let t=Date.now()-e.start,n=e.delay-t;e.remaining=n>0?n:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((e,t)=>{e.remaining=e.remaining>0?e.remaining:e.delay,e.timeout??=Qs.create(),e.timeout.start(e.remaining,()=>{this.timers.delete(t),e.callback()}),e.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=e=>{if(e.pointerType!==`touch`)return;let t=Yr(e);Jr(this.state.viewport,t)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(e,t,n){let r=Date.now(),i=!LD.expandedOrOutOfFocus(this.state),a=i?Qs.create():void 0;a?.start(t,()=>{this.timers.delete(e),n()}),this.timers.set(e,{timeout:a,start:i?r:0,delay:t,remaining:t,callback:n})}setToasts(e){let t={toasts:e};e.length===0&&(t.hovering=!1,t.focused=!1),this.update(t)}handleFocusManagement(e){let t=qr(ta(this.state.viewport));if(!this.state.viewport||!Jr(this.state.viewport,t)||!ni(t))return;if(e===void 0){this.restoreFocusToPrevElement();return}let n=LD.toasts(this.state),r=LD.toastIndex(this.state,e),i=null,a=r+1;for(;a<n.length;){if(n[a].transitionStatus!==`ending`){i=n[a];break}a+=1}if(!i)for(a=r-1;a>=0;){if(n[a].transitionStatus!==`ending`){i=n[a];break}--a}i?i.ref?.current?.focus():this.restoreFocusToPrevElement()}}})),BD,VD=m((()=>{nn(),k(),kD(),zD(),BD=function(e){let{children:r,timeout:i=5e3,limit:a=3,toastManager:o}=e,s=D(()=>new RD({timeout:i,limit:a,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return en(s.disposeEffect),t.useEffect(function(){if(o)return o[` subscribe`](({action:e,options:t})=>{let n=t.id;e===`promise`&&t.promise?s.promiseToast(t.promise,t):e===`update`&&n?s.updateToast(n,t):e===`close`?s.closeToast(n):s.addToast(t)})},[s,i,o]),s.useSyncedValues({timeout:i,limit:a}),(0,n.jsx)(OD.Provider,{value:s,children:r})},process.env.NODE_ENV!==`production`&&(BD.displayName=`ToastProvider`)})),HD,UD=m((()=>{HD=function(e){return e.frontmostHeight=`--toast-frontmost-height`,e}({})})),WD,GD=m((()=>{qa(),pc(),na(),yc(),$s(),Sa(),xc(),kD(),q(),FD(),UD(),WD=t.forwardRef(function(e,r){let{render:i,className:a,style:o,children:s,...c}=e,l=DD(),u=Xs(),d=t.useRef(!1),f=t.useRef(!1),p=t.useRef(!1),m=l.useState(`isEmpty`),h=l.useState(`toasts`),g=l.useState(`focused`),_=l.useState(`expanded`),v=l.useState(`prevFocusElement`),y=h[0]?.height??0,b=t.useMemo(()=>h.some(e=>e.transitionStatus===`ending`),[h]);t.useEffect(()=>{let e=l.state.viewport;if(!e)return;function t(t){m||t.key===`F6`&&Yr(t)!==e&&(t.preventDefault(),l.setPrevFocusElement(qr(ta(e))),e?.focus({preventScroll:!0}),l.pauseTimers(),l.setFocused(!0))}return Ka(Xn(e),`keydown`,t)},[l,m]),t.useEffect(()=>{let e=l.state.viewport;if(!e||m)return;let t=Xn(e);function n(e){Yr(e)===t&&(l.setIsWindowFocused(!1),l.pauseTimers())}function r(n){if(n.relatedTarget)return;let r=Yr(n),i=qr(ta(e));(r===t||!Jr(e,r)||!ni(i))&&l.resumeTimers(),u.start(0,()=>l.setIsWindowFocused(!0))}return fc(Ka(t,`blur`,n,!0),Ka(t,`focus`,r,!0))},[l,u,m]),t.useEffect(()=>{let e=l.state.viewport;if(!(!e||m))return Ka(ta(e),`pointerdown`,l.handleDocumentPointerDown,!0)},[m,l]);function x(e){let t=l.state.viewport;t&&(d.current=!0,e.relatedTarget===t?h[0]?.ref?.current?.focus():l.restoreFocusToPrevElement())}function S(e){e.key===`Tab`&&e.shiftKey&&Yr(e.nativeEvent)===l.state.viewport&&(e.preventDefault(),l.restoreFocusToPrevElement(),l.resumeTimers())}function C(){let e=l.state.toasts.some(e=>e.transitionStatus===`ending`);!l.state.isWindowFocused||e||p.current||!f.current||(l.resumeTimers(),l.setHovering(!1),f.current=!1)}t.useEffect(C,[b,l]);function w(){l.pauseTimers(),l.setHovering(!0),f.current=!1}function T(){b||p.current?f.current=!0:(l.resumeTimers(),l.setHovering(!1))}function E(e){e.pointerType===`touch`&&(p.current=!0)}function D(e){e.pointerType===`touch`&&(p.current=!1,C())}function O(){if(d.current){d.current=!1;return}g||ni(qr(ta(l.state.viewport)))&&(l.setFocused(!0),l.pauseTimers())}function k(e){!g||Jr(l.state.viewport,e.relatedTarget)||(l.setFocused(!1),l.resumeTimers())}let A={tabIndex:-1,role:`region`,"aria-live":`polite`,"aria-atomic":!1,"aria-relevant":`additions text`,"aria-label":`Notifications`,onMouseEnter:w,onMouseMove:w,onMouseLeave:T,onFocus:O,onBlur:k,onKeyDown:S,onClick:O,onPointerDown:E,onPointerUp:D,onPointerCancel:D},j={expanded:_},M=K(`div`,e,{ref:[r,l.setViewport],state:j,props:[A,{style:{[HD.frontmostHeight]:y?`${y}px`:void 0}},c,{children:(0,n.jsxs)(t.Fragment,{children:[!m&&v&&(0,n.jsx)(bc,{onFocus:x}),s,!m&&v&&(0,n.jsx)(bc,{onFocus:x})]})}]}),N=t.useMemo(()=>h.filter(e=>e.priority===`high`),[h]);return(0,n.jsxs)(t.Fragment,{children:[!m&&v&&(0,n.jsx)(bc,{onFocus:x}),M,!g&&N.length>0&&(0,n.jsx)(`div`,{style:_c,children:N.map(e=>(0,n.jsxs)(`div`,{role:`alert`,"aria-atomic":!0,children:[(0,n.jsx)(`div`,{children:e.title}),(0,n.jsx)(`div`,{children:e.description})]},e.id))})]})}),process.env.NODE_ENV!==`production`&&(WD.displayName=`ToastViewport`)}));function KD(){let e=t.useContext(qD);if(!e)throw Error(process.env.NODE_ENV===`production`?W(66):`Base UI: ToastRootContext is missing. Toast parts must be used within <Toast.Root>.`);return e}var qD,JD=m((()=>{G(),qD=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(qD.displayName=`ToastRootContext`)})),YD,XD=m((()=>{YD=function(e){return e.index=`--toast-index`,e.offsetY=`--toast-offset-y`,e.height=`--toast-height`,e.swipeMovementX=`--toast-swipe-movement-x`,e.swipeMovementY=`--toast-swipe-movement-y`,e}({})}));function ZD(e,t,n){switch(e){case`up`:return-n;case`down`:return n;case`left`:return-t;case`right`:return t;default:return 0}}function Fie(e){let t=Xn(e).getComputedStyle(e).transform,n=0,r=0,i=1;if(t&&t!==`none`){let e=t.match(/matrix(?:3d)?\(([^)]+)\)/);if(e){let t=e[1].split(`, `).map(parseFloat);t.length===6?(n=t[4],r=t[5],i=Math.sqrt(t[0]*t[0]+t[1]*t[1])):t.length===16&&(n=t[12],r=t[13],i=t[0])}}return{x:n,y:r,scale:i}}var QD,$D,eO,tO,nO,rO,iO,Iie=m((()=>{qa(),na(),_p(),R(),F(),Sa(),JD(),_n(),kD(),q(),$a(),XD(),Yc(),QD={...gn,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},$D=40,eO=10,tO=.5,nO=1,rO=`${Wc},${Gc}`,iO=t.forwardRef(function(e,i){let{toast:a,render:o,className:s,swipeDirection:c=[`down`,`right`],style:l,...u}=e,d=a.positionerProps?.anchor!==void 0,f=[];d||(f=Array.isArray(c)?c:[c]);let p=f.length>0,m=DD(),[h,g]=t.useState(void 0),[_,v]=t.useState(!1),[y,b]=t.useState(!1),[x,S]=t.useState(!1),[C,w]=t.useState({x:0,y:0}),[T,E]=t.useState({x:0,y:0,scale:1}),[D,O]=t.useState(),[k,j]=t.useState(),[M,N]=t.useState(null),P=t.useRef(null),F=t.useRef({x:0,y:0}),I=t.useRef({x:0,y:0,scale:1}),R=t.useRef(void 0),ee=t.useRef(0),z=t.useRef(!1),B=t.useRef({x:0,y:0}),V=t.useRef(!1),te=m.useState(`toastIndex`,a.id),ne=m.useState(`toastVisibleIndex`,a.id),H=m.useState(`toastOffsetY`,a.id),re=m.useState(`focused`),ie=m.useState(`expanded`);Qa({open:a.transitionStatus!==`ending`,ref:P,onComplete(){a.transitionStatus===`ending`&&m.removeToast(a.id)}});let U=A((e=!1)=>{let t=P.current;if(!t)return;let n=t.style.height;t.style.height=`auto`;let i=t.offsetHeight;t.style.height=n;function o(){m.updateToastInternal(a.id,{ref:P,height:i,...a.transitionStatus===`starting`?{transitionStatus:void 0}:{}})}e?r.flushSync(o):o()});L(U,[U]);function ae(e,t){let n=e,r=t;return!f.includes(`left`)&&!f.includes(`right`)?n=e>0?e**tO:-(Math.abs(e)**tO):(!f.includes(`right`)&&e>0&&(n=e**tO),!f.includes(`left`)&&e<0&&(n=-(Math.abs(e)**tO))),!f.includes(`up`)&&!f.includes(`down`)?r=t>0?t**tO:-(Math.abs(t)**tO):(!f.includes(`down`)&&t>0&&(r=t**tO),!f.includes(`up`)&&t<0&&(r=-(Math.abs(t)**tO))),{x:n,y:r}}function oe(e){if(e.button!==0)return;e.pointerType===`touch`&&m.pauseTimers();let t=Yr(e.nativeEvent);if(!(t&&t.closest(`button,a,input,textarea,[role="button"],${rO}`))){if(z.current=!1,R.current=void 0,ee.current=0,F.current={x:e.clientX,y:e.clientY},B.current=F.current,P.current){let e=Fie(P.current);I.current=e,E(e),w({x:e.x,y:e.y})}m.setHovering(!0),v(!0),b(!1),N(null),V.current=!0,P.current?.setPointerCapture(e.pointerId)}}function se(e){if(!_)return;e.preventDefault(),V.current&&=(F.current={x:e.clientX,y:e.clientY},!1);let{clientY:t,clientX:n,movementX:r,movementY:i}=e;(i<0&&t>B.current.y||i>0&&t<B.current.y)&&(B.current={x:B.current.x,y:t}),(r<0&&n>B.current.x||r>0&&n<B.current.x)&&(B.current={x:n,y:B.current.y});let a=n-F.current.x,o=t-F.current.y,s=t-B.current.y,c=n-B.current.x;if(!y&&Math.sqrt(a*a+o*o)>=nO&&(b(!0),M===null)){let e=f.includes(`left`)||f.includes(`right`),t=f.includes(`up`)||f.includes(`down`);e&&t&&N(Math.abs(a)>Math.abs(o)?`horizontal`:`vertical`)}let l;if(!R.current)M===`vertical`?o>0?l=`down`:o<0&&(l=`up`):M===`horizontal`?a>0?l=`right`:a<0&&(l=`left`):l=Math.abs(a)>=Math.abs(o)?a>0?`right`:`left`:o>0?`down`:`up`,l&&f.includes(l)&&(R.current=l,ee.current=ZD(l,a,o),g(l));else{let e=R.current,t=ZD(e,c,s);t>$D?(z.current=!1,g(e)):!(f.includes(`left`)&&f.includes(`right`))&&!(f.includes(`up`)&&f.includes(`down`))&&ee.current-t>=eO&&(z.current=!0)}let u=ae(a,o),d=I.current.x,p=I.current.y;M===`horizontal`?(f.includes(`left`)||f.includes(`right`))&&(d+=u.x):(M===`vertical`||(f.includes(`left`)||f.includes(`right`))&&(d+=u.x),(f.includes(`up`)||f.includes(`down`))&&(p+=u.y)),w({x:d,y:p})}function ce(e){if(!_)return;if(v(!1),b(!1),N(null),P.current?.releasePointerCapture(e.pointerId),z.current){w({x:T.x,y:T.y}),g(void 0);return}let t=!1,n=C.x-T.x,r=C.y-T.y,i;for(let e of f){switch(e){case`right`:n>$D&&(t=!0,i=`right`);break;case`left`:n<-$D&&(t=!0,i=`left`);break;case`down`:r>$D&&(t=!0,i=`down`);break;case`up`:r<-$D&&(t=!0,i=`up`);break;default:break}if(t)break}t?(g(i),S(!0),m.closeToast(a.id)):(w({x:T.x,y:T.y}),g(void 0))}function le(){_&&(v(!1),b(!1),N(null),w({x:T.x,y:T.y}),g(void 0))}function W(e){if(e.key===`Escape`){if(!P.current||!Jr(P.current,qr(ta(P.current))))return;m.closeToast(a.id)}}t.useEffect(()=>{if(!p)return;let e=P.current;if(!e)return;function t(t){Jr(e,Yr(t))&&t.preventDefault()}return Ka(e,`touchmove`,t,{passive:!1})},[p]);function G(){if(!_&&C.x===T.x&&C.y===T.y&&!x)return{[YD.swipeMovementX]:`0px`,[YD.swipeMovementY]:`0px`};let e=C.x-T.x,t=C.y-T.y;return{transition:_?`none`:void 0,transform:_?`translateX(${C.x}px) translateY(${C.y}px) scale(${T.scale})`:void 0,[YD.swipeMovementX]:`${e}px`,[YD.swipeMovementY]:`${t}px`}}let ue=a.priority===`high`,de={role:ue?`alertdialog`:`dialog`,tabIndex:0,"aria-modal":!1,"aria-labelledby":D,"aria-describedby":k,"aria-hidden":ue&&!re?!0:void 0,onPointerDown:p?oe:void 0,onPointerMove:p?se:void 0,onPointerUp:p?ce:void 0,onPointerCancel:p?le:void 0,onKeyDown:W,inert:gp(a.limited),style:{...G(),[YD.index]:a.transitionStatus===`ending`?te:ne,[YD.offsetY]:`${H}px`,[YD.height]:a.height?`${a.height}px`:void 0}},fe=t.useMemo(()=>({rootRef:P,toast:a,titleId:D,setTitleId:O,descriptionId:k,setDescriptionId:j,swiping:_,swipeDirection:h,recalculateHeight:U,index:te,visibleIndex:ne,expanded:ie}),[a,D,k,_,h,U,te,ne,ie]),pe={transitionStatus:a.transitionStatus,expanded:ie,limited:a.limited||!1,type:a.type,swiping:fe.swiping,swipeDirection:fe.swipeDirection},me=K(`div`,e,{ref:[i,fe.rootRef],state:pe,stateAttributesMapping:QD,props:[de,u]});return(0,n.jsx)(qD.Provider,{value:fe,children:me})}),process.env.NODE_ENV!==`production`&&(iO.displayName=`ToastRoot`)})),aO,oO=m((()=>{R(),JD(),q(),aO=t.forwardRef(function(e,n){let{render:r,className:i,style:a,...o}=e,{visibleIndex:s,expanded:c,recalculateHeight:l}=KD(),u=t.useRef(null);return L(()=>{let e=u.current;if(!e||(l(),typeof ResizeObserver!=`function`||typeof MutationObserver!=`function`))return;let t=new ResizeObserver(()=>l(!0)),n=new MutationObserver(()=>l(!0));return t.observe(e),n.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>{t.disconnect(),n.disconnect()}},[l]),K(`div`,e,{ref:[n,u],state:{expanded:c,behind:s>0},props:o})}),process.env.NODE_ENV!==`production`&&(aO.displayName=`ToastContent`)})),sO,cO=m((()=>{Zt(),R(),JD(),q(),sO=t.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{toast:c,setDescriptionId:l}=KD(),u=o??c.description,d=!!u,f=Jt(a);L(()=>{if(d)return l(f),()=>{l(void 0)}},[d,f,l]);let p=K(`p`,e,{ref:t,state:{type:c.type},props:{...s,id:f,children:u}});return d?p:null}),process.env.NODE_ENV!==`production`&&(sO.displayName=`ToastDescription`)})),lO,uO=m((()=>{R(),Zt(),JD(),q(),lO=t.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{toast:c,setTitleId:l}=KD(),u=o??c.title,d=!!u,f=Jt(a);L(()=>{if(d)return l(f),()=>{l(void 0)}},[d,f,l]);let p=K(`h2`,e,{ref:t,state:{type:c.type},props:{...s,id:f,children:u}});return d?p:null}),process.env.NODE_ENV!==`production`&&(lO.displayName=`ToastTitle`)})),dO,fO=m((()=>{JD(),kD(),Er(),q(),dO=t.forwardRef(function(e,n){let{render:r,className:i,style:a,disabled:o,nativeButton:s=!0,...c}=e,l=DD(),{toast:u}=KD(),d=l.useState(`expanded`),[f,p]=t.useState(!1),{getButtonProps:m,buttonRef:h}=wr({disabled:o,native:s}),g={type:u.type};return K(`button`,e,{ref:[n,h],state:g,props:[{"aria-hidden":!d&&!f,onClick(){l.closeToast(u.id)},onFocus(){p(!0)},onBlur(){p(!1)}},c,m]})}),process.env.NODE_ENV!==`production`&&(dO.displayName=`ToastClose`)})),pO,mO=m((()=>{JD(),Er(),q(),pO=t.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,{toast:c}=KD(),l=c.actionProps?.children??s.children,u=!!l,{getButtonProps:d,buttonRef:f}=wr({disabled:a,native:o}),p={type:c.type},m=K(`button`,e,{ref:[t,f],state:p,props:[s,c.actionProps,d,{children:l}]});return u?m:null}),process.env.NODE_ENV!==`production`&&(pO.displayName=`ToastAction`)})),hO,gO=m((()=>{Tw(),hO=ww}));function _O(){let e=t.useContext(vO);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(84):`Base UI: ToastPositionerContext is missing. ToastPositioner parts must be placed within <Toast.Positioner>.`);return e}var vO,yO=m((()=>{G(),vO=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(vO.displayName=`ToastPositionerContext`)})),bO,xO=m((()=>{yr(),Ae(),Lh(),Yc(),yO(),Of(),nm(),XD(),kD(),Vh(),bO=t.forwardRef(function(e,r){let{toast:i,...a}=e,o=DD(),s=i.positionerProps??ke,{render:c,className:l,anchor:u=s.anchor,positionMethod:d=s.positionMethod??`absolute`,side:f=s.side??`top`,align:p=s.align??`center`,sideOffset:m=s.sideOffset??0,alignOffset:h=s.alignOffset??0,collisionBoundary:g=s.collisionBoundary??`clipping-ancestors`,collisionPadding:_=s.collisionPadding??5,arrowPadding:v=s.arrowPadding??5,sticky:y=s.sticky??!1,disableAnchorTracking:b=s.disableAnchorTracking??!1,collisionAvoidance:x=s.collisionAvoidance??qc,style:S,...C}=a,[w,T]=t.useState(null),E=o.useState(`toastIndex`,i.id),D=o.useState(`toastVisibleIndex`,i.id),O=$n(u)?u:null,k=Fh({anchor:O,positionMethod:d,floatingRootContext:Rd({open:!0,onOpenChange:De,elements:{floating:w,reference:O}}),mounted:!0,side:f,sideOffset:m,align:p,alignOffset:h,collisionBoundary:g,collisionPadding:_,sticky:y,arrowPadding:v,disableAnchorTracking:b,keepMounted:!0,collisionAvoidance:x}),A=Bh(e,t.useMemo(()=>({side:k.side,align:k.align,anchorHidden:k.anchorHidden}),[k.side,k.align,k.anchorHidden]),{styles:{...k.positionerStyles,[YD.index]:i.transitionStatus===`ending`?E:D},transitionStatus:i.transitionStatus,props:C,refs:[r,T]});return(0,n.jsx)(vO.Provider,{value:k,children:A})}),process.env.NODE_ENV!==`production`&&(bO.displayName=`ToastPositioner`)})),SO,CO=m((()=>{yO(),q(),SO=t.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,{arrowRef:o,side:s,align:c,arrowUncentered:l,arrowStyles:u}=_O();return K(`div`,e,{state:{side:s,align:c,uncentered:l},ref:[t,o],props:[{style:u,"aria-hidden":!0},a]})}),process.env.NODE_ENV!==`production`&&(SO.displayName=`ToastArrow`)}));function wO(){let e=t.useContext(OD);if(!e)throw Error(process.env.NODE_ENV===`production`?W(73):`Base UI: useToastManager must be used within <Toast.Provider>.`);let n=e.useState(`toasts`);return t.useMemo(()=>({toasts:n,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[n,e])}var TO=m((()=>{G(),kD()}));function EO(){let e=new Set;function t(t){e.forEach(e=>e(t))}return{" subscribe":function(t){return e.add(t),()=>{e.delete(t)}},add(e){let n=e.id||AD(`toast`);return t({action:`add`,options:{...e,id:n,transitionStatus:`starting`}}),n},close(e){t({action:`close`,options:{id:e}})},update(e,n){t({action:`update`,options:{...n,id:e}})},promise(e,n){let r=e;return t({action:`promise`,options:{...n,promise:e,setPromise(e){r=e}}}),r}}}var DO=m((()=>{MD()})),OO=m((()=>{VD(),GD(),Iie(),oO(),cO(),uO(),fO(),mO(),gO(),xO(),CO(),TO(),DO()})),kO=m((()=>{OO()}));function AO(e=!0){let n=t.useContext(jO);if(n===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?W(7):`Base UI: ToggleGroupContext is missing. ToggleGroup parts must be placed within <ToggleGroup>.`);return n}var jO,MO=m((()=>{G(),jO=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(jO.displayName=`ToggleGroupContext`)})),NO,PO=m((()=>{F(),E(),R(),C(),$t(),q(),MO(),Er(),ny(),Vt(),zt(),NO=t.forwardRef(function(e,t){let{className:r,defaultPressed:i=!1,disabled:a=!1,form:o,onPressedChange:s,pressed:c,render:l,type:u,value:d,nativeButton:f=!0,style:p,...m}=e,h=Qt(d||void 0),g=AO(),_=g?.value??[],v=g?void 0:i,y=(a||g?.disabled)??!1;process.env.NODE_ENV!==`production`&&L(()=>{g&&d===void 0&&g.isValueInitialized&&x("A `<Toggle>` component rendered in a `<ToggleGroup>` has no explicit `value` prop.",`This will cause issues between the Toggle Group and Toggle values.`,"Provide the `<Toggle>` with a `value` prop matching the `<ToggleGroup>` values prop type.")},[g,d,g?.isValueInitialized]);let[b,S]=w({controlled:g?h!==void 0&&_.indexOf(h)>-1:c,default:v,name:`Toggle`,state:`pressed`}),C=A((e,t)=>{h&&g?.setGroupValue?.(h,e,t),s?.(e,t)}),{getButtonProps:T,buttonRef:E}=wr({disabled:y,native:f}),D={disabled:y,pressed:b},O=[E,t],k=[{"aria-pressed":b,onClick(e){let t=!b,n=J(ct,e.nativeEvent);C(t,n),!n.isCanceled&&S(t)}},m,T],j=K(`button`,e,{enabled:!g,state:D,ref:O,props:k});return g?(0,n.jsx)(ty,{tag:`button`,render:l,className:r,style:p,state:D,refs:O,props:k}):j}),process.env.NODE_ENV!==`production`&&(NO.displayName=`Toggle`)})),FO=m((()=>{PO()})),IO,LO=m((()=>{IO=function(e){return e.disabled=`data-disabled`,e.orientation=`data-orientation`,e.multiple=`data-multiple`,e}({})})),RO,zO,BO=m((()=>{F(),E(),q(),Qx(),xv(),MO(),LO(),RO={multiple(e){return e?{[IO.multiple]:``}:null}},zO=t.forwardRef(function(e,r){let{defaultValue:i,disabled:a=!1,loopFocus:o=!0,onValueChange:s,orientation:c=`horizontal`,multiple:l=!1,value:u,className:d,render:f,style:p,...m}=e,h=yv(!0),g=t.useMemo(()=>{if(u===void 0)return i??[]},[u,i]),_=t.useMemo(()=>u!==void 0||i!==void 0,[u,i]),v=(h?.disabled??!1)||a,[y,b]=w({controlled:u,default:g,name:`ToggleGroup`,state:`value`}),x=A((e,t,n)=>{let r;if(l?(r=y.slice(),t?r.push(e):r.splice(y.indexOf(e),1)):r=t?[e]:[],Array.isArray(r)){if(s?.(r,n),n.isCanceled)return;b(r)}}),S={disabled:v,multiple:l,orientation:c},C=t.useMemo(()=>({disabled:v,orientation:c,setGroupValue:x,value:y,isValueInitialized:_}),[v,c,x,y,_]),T={role:`group`},E=K(`div`,e,{enabled:!!h,state:S,ref:r,props:[T,m],stateAttributesMapping:RO});return(0,n.jsx)(jO.Provider,{value:C,children:h?E:(0,n.jsx)(Zx,{render:f,className:d,style:p,state:S,refs:[r],props:[T,m],stateAttributesMapping:RO,loopFocus:o,enableHomeAndEndKeys:!0,orientation:c})})}),process.env.NODE_ENV!==`production`&&(zO.displayName=`ToggleGroup`)})),VO=m((()=>{BO()})),HO=m((()=>{I_(),xv(),Qx(),q(),G(),Dr(),ny(),Cr(),Ga()}));function UO(e){let n=t.useContext(WO);if(n===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?W(72):`Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>.`);return n}var WO,GO=m((()=>{G(),WO=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(WO.displayName=`TooltipRootContext`)}));function KO(){return{...Nd(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}var qO,JO,YO=m((()=>{bd(),k(),Of(),zt(),Ld(),qO={...Fd,disabled:Z(e=>e.disabled),instantType:Z(e=>e.instantType),isInstantPhase:Z(e=>e.isInstantPhase),trackCursorAxis:Z(e=>e.trackCursorAxis),disableHoverablePopup:Z(e=>e.disableHoverablePopup),lastOpenChangeReason:Z(e=>e.openChangeReason),closeOnClick:Z(e=>e.closeOnClick),closeDelay:Z(e=>e.closeDelay),hasViewport:Z(e=>e.hasViewport)},JO=class e extends hd{constructor(e){super({...KO(),...e},{popupRef:t.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new kd},qO)}setOpen=(e,t)=>{let n=t.reason,i=n===ut,a=e&&n===`trigger-focus`,o=!e&&(n===`trigger-press`||n===`escape-key`);if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let s=()=>{let r={open:e,openChangeReason:n};a?r.instantType=`focus`:o?r.instantType=`dismiss`:n===`trigger-hover`&&(r.instantType=void 0);let i=t.trigger?.id??null;(i||e)&&(r.activeTriggerId=i,r.activeTriggerElement=t.trigger??null),this.update(r)};i?r.flushSync(s):s()};static useStore(t,n){let r=D(()=>new e(n)).current,i=t??r,a=Hd({popupStore:i,onOpenChange:i.setOpen});return i.state.floatingRootContext=a,i}}})),XO,Lie=m((()=>{sd(),Ys(),R(),GO(),Of(),Vt(),Ld(),YO(),zt(),XO=nd(function(e){let{disabled:r=!1,defaultOpen:i=!1,open:a,disableHoverablePopup:o=!1,trackCursorAxis:s=`none`,actionsRef:c,onOpenChange:l,onOpenChangeComplete:u,handle:d,triggerId:f,defaultTriggerId:p=null,children:m}=e,h=JO.useStore(d?.store,{open:i,openProp:a,activeTriggerId:p,triggerIdProp:f});Js(()=>{a===void 0&&h.state.open===!1&&i===!0&&h.update({open:!0,activeTriggerId:p})}),h.useControlledProp(`openProp`,a),h.useControlledProp(`triggerIdProp`,f),h.useContextCallback(`onOpenChange`,l),h.useContextCallback(`onOpenChangeComplete`,u);let g=h.useState(`open`),_=!r&&g,v=h.useState(`activeTriggerId`),y=h.useState(`payload`);h.useSyncedValues({trackCursorAxis:s,disableHoverablePopup:o}),L(()=>{g&&r&&h.setOpen(!1,J(Pt))},[g,r,h]),h.useSyncedValue(`disabled`,r),Ed(h);let{forceUnmount:b,transitionStatus:x}=Dd(_,h),S=h.select(`floatingRootContext`),C=h.useState(`isInstantPhase`),w=h.useState(`instantType`),T=h.useState(`lastOpenChangeReason`),E=t.useRef(null);L(()=>{x===`ending`&&T===`none`||x!==`ending`&&C?(w!==`delay`&&(E.current=w),h.set(`instantType`,`delay`)):E.current!==null&&(h.set(`instantType`,E.current),E.current=null)},[x,C,T,w,h]),L(()=>{_&&(v??h.set(`payload`,void 0))},[h,v,_]);let D=t.useCallback(()=>{h.setOpen(!1,J(Ft))},[h]);t.useImperativeHandle(c,()=>({unmount:b,close:D}),[b,D]);let{getReferenceProps:O,getFloatingProps:k,getTriggerProps:A}=af([Sl(S,{enabled:!r,referencePress:()=>h.select(`closeOnClick`)}),Qee(S,{enabled:!r&&s!==`none`,axis:s===`none`?void 0:s})]),j=t.useMemo(()=>O(),[O]),M=t.useMemo(()=>A(),[A]),N=t.useMemo(()=>k(),[k]);return h.useSyncedValues({activeTriggerProps:j,inactiveTriggerProps:M,popupProps:N}),(0,n.jsx)(WO.Provider,{value:h,children:typeof m==`function`?m({payload:y}):m})}),process.env.NODE_ENV!==`production`&&(XO.displayName=`TooltipRoot`)}));function Rie(){return t.useContext(ZO)}var ZO,QO=m((()=>{ZO=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(ZO.displayName=`TooltipProviderContext`)})),$O,zie=m((()=>{ep(),$O=function(e){return e[e.popupOpen=Gf.popupOpen]=`popupOpen`,e.triggerDisabled=`data-trigger-disabled`,e}({})})),Bie=m((()=>{})),ek,Vie=m((()=>{G(),sd(),GO(),ep(),q(),Ld(),$t(),QO(),Of(),zie(),Bie(),ek=rd(function(e,n){let{className:r,render:i,handle:a,payload:o,disabled:s,delay:c,closeOnClick:l=!0,closeDelay:u,id:d,style:f,...p}=e,m=UO(!0),h=a?.store??m;if(!h)throw Error(process.env.NODE_ENV===`production`?W(82):`Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle.`);let g=Qt(d),_=h.useState(`isTriggerActive`,g),v=h.useState(`isOpenedByTrigger`,g),y=h.useState(`floatingRootContext`),b=t.useRef(null),x=c??600,S=u??0,{registerTrigger:C,isMountedByThisTrigger:w}=Td(g,b,h,{payload:o,closeOnClick:l,closeDelay:S}),T=Rie(),{delayRef:E,isInstantPhase:D,hasProvider:O}=Uee(y,{open:v});h.useSyncedValue(`isInstantPhase`,D);let k=h.useState(`disabled`),A=s??k,j=h.useState(`trackCursorAxis`),M=h.useState(`disableHoverablePopup`),N=tf(y,{enabled:!A,mouseOnly:!0,move:!1,handleClose:!M&&j!==`both`?wf():null,restMs(){let e=T?.delay,t=typeof E.current==`object`?E.current.open:void 0,n=x;return O&&(n=t===0?0:c??e??x),n},delay(){let e=typeof E.current==`object`?E.current.close:void 0,t=S;return u==null&&O&&(t=e),{close:t}},triggerElementRef:b,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),P=Wd(y,{enabled:!A}).reference,F={open:v},I=h.useState(`triggerProps`,w);return K(`button`,e,{state:F,ref:[n,C,b],props:[N,P,I,{onPointerDown(){h.set(`closeOnClick`,l)},id:g,[$O.triggerDisabled]:A?``:void 0},p],stateAttributesMapping:Zf})}),process.env.NODE_ENV!==`production`&&(ek.displayName=`TooltipTrigger`)}));function Hie(){let e=t.useContext(tk);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(70):`Base UI: <Tooltip.Portal> is missing.`);return e}var tk,nk=m((()=>{G(),tk=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(tk.displayName=`TooltipPortalContext`)})),rk,Uie=m((()=>{GO(),nk(),Tw(),rk=t.forwardRef(function(e,t){let{keepMounted:r=!1,...i}=e;return UO().useState(`mounted`)||r?(0,n.jsx)(tk.Provider,{value:r,children:(0,n.jsx)(ww,{ref:t,...i})}):null}),process.env.NODE_ENV!==`production`&&(rk.displayName=`TooltipPortal`)}));function Wie(){let e=t.useContext(ik);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?W(71):`Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>.`);return e}var ik,ak=m((()=>{G(),ik=t.createContext(void 0),process.env.NODE_ENV!==`production`&&(ik.displayName=`TooltipPositionerContext`)})),ok,Gie=m((()=>{GO(),ak(),Lh(),nk(),Yc(),Mh(),Vh(),ok=t.forwardRef(function(e,r){let{render:i,className:a,anchor:o,positionMethod:s=`absolute`,side:c=`top`,align:l=`center`,sideOffset:u=0,alignOffset:d=0,collisionBoundary:f=`clipping-ancestors`,collisionPadding:p=5,arrowPadding:m=5,sticky:h=!1,disableAnchorTracking:g=!1,collisionAvoidance:_=qc,style:v,...y}=e,b=UO(),x=Hie(),S=b.useState(`open`),C=b.useState(`mounted`),w=b.useState(`trackCursorAxis`),T=b.useState(`disableHoverablePopup`),E=b.useState(`floatingRootContext`),D=b.useState(`instantType`),O=b.useState(`transitionStatus`),k=Fh({anchor:o,positionMethod:s,floatingRootContext:E,mounted:C,side:c,sideOffset:u,align:l,alignOffset:d,collisionBoundary:f,collisionPadding:p,sticky:h,arrowPadding:m,disableAnchorTracking:g,keepMounted:x,collisionAvoidance:_,adaptiveOrigin:b.useState(`hasViewport`)?jh:void 0}),A=Bh(e,t.useMemo(()=>({open:S,side:k.side,align:k.align,anchorHidden:k.anchorHidden,instant:w===`none`?D:`tracking-cursor`}),[S,k.side,k.align,k.anchorHidden,w,D]),{styles:k.positionerStyles,transitionStatus:O,props:y,refs:[r,b.useStateSetter(`positionerElement`)],hidden:!C,inert:!S||w===`both`||T});return(0,n.jsx)(ik.Provider,{value:k,children:A})}),process.env.NODE_ENV!==`production`&&(ok.displayName=`TooltipPositioner`)})),sk,ck,Kie=m((()=>{GO(),ak(),ep(),_n(),$a(),q(),zh(),Of(),sk={...$f,...gn},ck=t.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,o=UO(),{side:s,align:c}=Wie(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`);Qa({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}});let m=o.useState(`disabled`),h=o.useState(`closeDelay`);return $d(p,{enabled:!m,closeDelay:h}),K(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,o.useStateSetter(`popupElement`)],props:[f,Rh(d),a],stateAttributesMapping:sk})}),process.env.NODE_ENV!==`production`&&(ck.displayName=`TooltipPopup`)})),lk,qie=m((()=>{Of(),QO(),lk=function(e){let{delay:r,closeDelay:i,timeout:a=400}=e,o=t.useMemo(()=>({delay:r,closeDelay:i}),[r,i]),s=t.useMemo(()=>({open:r,close:i}),[r,i]);return(0,n.jsx)(ZO.Provider,{value:o,children:(0,n.jsx)(Hee,{delay:s,timeoutMs:a,children:e.children})})},process.env.NODE_ENV!==`production`&&(lk.displayName=`TooltipProvider`)})),Jie=m((()=>{Lie(),Vie(),Uie(),Gie(),Kie(),ak(),ep(),q(),GO(),qie(),by(),G(),YO(),Vt(),zt()})),uk=m((()=>{Jie()})),Yie=m((()=>{})),Xie=m((()=>{Yie()})),dk=m((()=>{ro(),Ete(),gg(),Eg(),Jte(),Xg(),i_(),__(),R_(),mne(),hne(),Oy(),vy(),Mx(),zx(),Bx(),Vx(),Wx(),Cy(),$x(),$e(),SS(),CS(),FC(),XC(),Cw(),fre(),pre(),bre(),Sre(),vT(),mE(),I_(),Eie(),nD(),ED(),kO(),FO(),VO(),HO(),uk(),Xie()}));dk();var Zie=({children:e,...t})=>(0,n.jsx)(bte,{...t,children:e}),fk,Qie=m((()=>{uo(),fk=lo(`inline-flex cursor-pointer items-center justify-center rounded-full whitespace-nowrap transition-all select-none disabled:pointer-events-none disabled:opacity-50 [&>svg]:shrink-0`,{variants:{tone:{brand:``,accent:``,neutral:``,error:``,info:``,warning:``,success:``},variant:{fill:`active:scale-[0.98]`,outline:`border active:scale-[0.98]`,ghost:`active:scale-[0.98]`,soft:`border active:scale-[0.98]`,elevated:`shadow-xs not-active:hover:shadow-md`},size:{large:`h-2xl gap-xs px-md style-text-default-2 [&>svg]:size-md`,medium:`h-xl gap-2xs px-sm style-text-default-0 [&>svg]:size-sm`,small:`h-lg gap-3xs px-xs style-text-default--1 [&>svg]:size-xs`,extraSmall:`h-md gap-3xs px-2xs style-text-default--2 [&>svg]:size-xs`,iconLarge:`size-2xl p-[0px] [&>svg]:size-md`,iconMedium:`size-xl p-[0px] [&>svg]:size-sm`,iconSmall:`size-lg p-[0px] [&>svg]:size-xs`,iconExtraSmall:`size-md p-[0px] [&>svg]:size-xs`}},defaultVariants:{tone:`brand`,variant:`fill`,size:`medium`},compoundVariants:[{variant:`fill`,tone:`brand`,className:`bg-brand-default text-brand-on-default hover:bg-brand-muted`},{variant:`fill`,tone:`accent`,className:`bg-accent-default text-accent-on-default hover:bg-accent-muted`},{variant:`fill`,tone:`neutral`,className:`bg-neutral-default text-neutral-on-default hover:bg-neutral-muted`},{variant:`fill`,tone:`error`,className:`bg-error-default text-error-on-default hover:bg-error-muted`},{variant:`fill`,tone:`info`,className:`bg-info-default text-info-on-default hover:bg-info-muted`},{variant:`fill`,tone:`success`,className:`bg-success-default text-success-on-default hover:bg-success-muted`},{variant:`fill`,tone:`warning`,className:`bg-warning-default text-warning-on-default hover:bg-warning-muted`},{variant:`outline`,tone:`brand`,className:`border-brand-border text-brand-default hover:bg-brand-subtle hover:text-brand-on-container`},{variant:`outline`,tone:`accent`,className:`border-accent-border text-accent-default hover:bg-accent-subtle hover:text-accent-on-container`},{variant:`outline`,tone:`neutral`,className:`border-neutral-border text-neutral-default hover:bg-neutral-subtle hover:text-neutral-on-container`},{variant:`outline`,tone:`error`,className:`border-error-border text-error-default hover:bg-error-subtle hover:text-error-on-container`},{variant:`outline`,tone:`info`,className:`border-info-border text-info-default hover:bg-info-subtle hover:text-info-on-container`},{variant:`outline`,tone:`success`,className:`border-success-border text-success-default hover:bg-success-subtle hover:text-success-on-container`},{variant:`outline`,tone:`warning`,className:`border-warning-border text-warning-default hover:bg-warning-subtle hover:text-warning-on-container`},{variant:`ghost`,tone:`brand`,className:`text-brand-default hover:bg-brand-subtle hover:text-brand-on-container`},{variant:`ghost`,tone:`accent`,className:`text-accent-default hover:bg-accent-subtle hover:text-accent-on-container`},{variant:`ghost`,tone:`neutral`,className:`text-neutral-default hover:bg-neutral-subtle hover:text-neutral-on-container`},{variant:`ghost`,tone:`error`,className:`text-error-default hover:bg-error-subtle hover:text-error-on-container`},{variant:`ghost`,tone:`info`,className:`text-info-default hover:bg-info-subtle hover:text-info-on-container`},{variant:`ghost`,tone:`success`,className:`text-success-default hover:bg-success-subtle hover:text-success-on-container`},{variant:`ghost`,tone:`warning`,className:`text-warning-default hover:bg-warning-subtle hover:text-warning-on-container`},{variant:`soft`,tone:`brand`,className:`border-brand-border bg-brand-container text-brand-on-container hover:border-brand-border-strong hover:bg-brand-container-high`},{variant:`soft`,tone:`accent`,className:`border-accent-border bg-accent-container text-accent-on-container hover:border-accent-border-strong hover:bg-accent-container-high`},{variant:`soft`,tone:`neutral`,className:`border-neutral-border bg-neutral-container text-neutral-on-container hover:border-neutral-border-strong hover:bg-neutral-container-high`},{variant:`soft`,tone:`error`,className:`border-error-border bg-error-container text-error-on-container hover:border-error-border-strong hover:bg-error-container-high`},{variant:`soft`,tone:`info`,className:`border-info-border bg-info-container text-info-on-container hover:border-info-border-strong hover:bg-info-container-high`},{variant:`soft`,tone:`success`,className:`border-success-border bg-success-container text-success-on-container hover:border-success-border-strong hover:bg-success-container-high`},{variant:`soft`,tone:`warning`,className:`border-warning-border bg-warning-container text-warning-on-container hover:border-warning-border-strong hover:bg-warning-container-high`},{variant:`elevated`,tone:`brand`,className:`bg-brand-container text-brand-on-container not-active:hover:bg-brand-container-high`},{variant:`elevated`,tone:`accent`,className:`bg-accent-container text-accent-on-container not-active:hover:bg-accent-container-high`},{variant:`elevated`,tone:`neutral`,className:`bg-surface-2 text-on-surface not-active:hover:bg-surface-3`},{variant:`elevated`,tone:`error`,className:`bg-error-container text-error-on-container not-active:hover:bg-error-container-high`},{variant:`elevated`,tone:`info`,className:`bg-info-container text-info-on-container not-active:hover:bg-info-container-high`},{variant:`elevated`,tone:`success`,className:`bg-success-container text-success-on-container not-active:hover:bg-success-container-high`},{variant:`elevated`,tone:`warning`,className:`bg-warning-container text-warning-on-container not-active:hover:bg-warning-container-high`}]})})),pk,$ie=m((()=>{dk(),Qie(),X(),pk=({tone:e,variant:t,size:r,className:i,children:a,...o})=>(0,n.jsx)(Dg,{"data-size":r,className:Y(fk({tone:e,variant:t,size:r,className:i})),...o,children:a})})),mk=m((()=>{$ie()}));dk(),mk(),X();var eae=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(ip,{className:Y(``,e),ref:r,...i,render:(0,n.jsx)(pk,{"aria-label":`Close`,tone:`neutral`,variant:`outline`,children:t})}),hk=(0,y.createContext)({tone:`brand`}),tae=()=>(0,y.useContext)(hk);dk(),mk(),X();var nae=({className:e,children:t,ref:r,...i})=>{let{tone:a}=tae();return(0,n.jsx)(ip,{"data-confirm":!0,className:Y(``,e),ref:r,...i,render:(0,n.jsx)(pk,{tone:a,children:t})})};X();var rae=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`space-y-3xs`,e),ref:r,...i,children:t});dk(),X();var iae=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(op,{className:Y(`mb-[0px] style-text-prose-0`,e),ref:r,...i,children:t});X();var aae=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex items-start justify-end gap-2xs`,e),ref:r,...i,children:t});X();var oae=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex w-full items-start justify-center gap-sm [&>svg]:size-xl [&>svg]:shrink-0`,e),ref:r,...i,children:t});uo();var sae=lo(`fixed top-1/2 left-1/2 max-w-[lg(100vw-3rem)] min-w-1/3 -translate-1/2 space-y-sm overflow-hidden rounded-3xl bg-surface-3 p-md shadow-md transition-all duration-150 data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0`,{variants:{tone:{brand:`[&_svg]:text-brand-default`,accent:`[&_svg]:text-accent-default`,neutral:`[&_svg]:text-neutral-default`,error:`[&_svg]:text-error-default`,info:`[&_svg]:text-info-default`,success:`[&_svg]:text-success-default`,warning:`[&_svg]:text-warning-default`}},defaultVariants:{tone:`brand`}});dk(),X();var cae=({tone:e,className:t,children:r,ref:i,...a})=>(0,n.jsx)(hk.Provider,{value:{tone:e},children:(0,n.jsxs)(bp,{children:[(0,n.jsx)(np,{className:`fixed inset-[0px] min-h-dvh bg-scrim/30 transition-all duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-[-webkit-touch-callout:none]:absolute`}),(0,n.jsx)(mp,{className:Y(sae({tone:e,className:t})),ref:i,...a,children:r})]})});dk(),X();var gk=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Sp,{className:Y(`style-text-strong-1`,e),ref:r,...i,children:t});dk(),X();var _k=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(wp,{className:Y(``,e),ref:r,...i,render:t});gg();var vk=({children:e,...t})=>(0,n.jsx)(Am,{...t,children:e});gg();var yk=({children:e,...t})=>(0,n.jsx)(ph,{...t,children:e});gg(),X();var bk=({emptyText:e,className:t,children:r,ref:i,...a})=>(0,n.jsx)(Th,{children:(0,n.jsx)(Gh,{className:Y(``,t),ref:i,...a,sideOffset:16,children:(0,n.jsxs)(Jh,{className:`max-h-[22.5rem] w-[calc(var(--anchor-width)+var(--spacing-md))] max-w-[calc(var(--available-width))] overflow-hidden rounded-xl bg-surface-2 shadow-md`,children:[(0,n.jsx)(fg,{className:`ml-3xs p-sm style-text-prose--1 text-on-surface-variant empty:m-[0px] empty:p-[0px]`,children:e}),(0,n.jsx)(hh,{className:`max-h-[min(22.5rem,var(--available-height))] scroll-pt-[2.25rem] scroll-pb-[0.5rem] overflow-y-auto overscroll-contain data-empty:p-[0px]`,children:r})]})})}),xk,Sk=m((()=>{uo(),xk=lo(`group flex w-full items-center rounded-full leading-0 text-ellipsis caret-brand-border-strong outline outline-transparent transition-all placeholder:opacity-60 focus-within:outline-brand-border-strong not-focus-within:hover:outline-border-strong disabled:cursor-not-allowed aria-invalid:bg-error-container aria-invalid:text-error-on-container aria-invalid:caret-error-border-strong aria-invalid:outline-error-border aria-invalid:focus-within:outline-error-border-strong aria-invalid:not-focus-within:hover:outline-error-border data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50`,{variants:{variant:{primary:`bg-surface shadow-2xs`,secondary:`bg-surface-low`},size:{small:`h-lg gap-3xs px-xs style-text-prose--1`,medium:`h-xl gap-2xs px-sm style-text-prose-0`,large:`h-2xl gap-xs px-md style-text-prose-1`}},defaultVariants:{variant:`primary`,size:`medium`}})}));Sk(),X();var Ck=({variant:e,className:t,children:r,ref:i,...a})=>(0,n.jsx)(`div`,{className:Y(xk({variant:e}),t),ref:i,...a,children:r});gg(),X();var wk=({placeholder:e,className:t,ref:r,...i})=>(0,n.jsx)(Qm,{placeholder:e,className:Y(`grow text-ellipsis outline-none placeholder:opacity-85`,t),ref:r,...i});gg(),X();var Tk=({placeholder:e=`Search…`,emptyText:t,className:r,children:i,ref:a,...o})=>(0,n.jsx)(Th,{children:(0,n.jsx)(Gh,{className:Y(``,r),ref:a,...o,align:`end`,sideOffset:4,children:(0,n.jsxs)(Jh,{className:`max-h-[20.5rem] max-w-(--available-width) origin-(--transform-origin) overflow-hidden rounded-lg bg-surface-2 shadow-lg transition-[transform,scale,opacity] [--input-container-height:3rem] data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0`,children:[(0,n.jsx)(`div`,{className:`m-3xs flex h-(--input-container-height) items-center justify-center text-center`,children:(0,n.jsx)(Ck,{children:(0,n.jsx)(wk,{placeholder:e})})}),(0,n.jsx)(fg,{className:`p-sm style-text-prose--1 empty:m-[0px] empty:p-[0px]`,children:t}),(0,n.jsx)(hh,{className:`max-h-[calc(19.5rem-var(--input-container-height))] scroll-pt-xl scroll-pb-[0.35rem] overflow-auto overscroll-contain`,children:i})]})})});gg(),X();var Ek=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(lg,{className:Y(`group flex h-lg min-w-(--anchor-width) cursor-default items-center rounded-md style-text-prose--1 select-none hover:cursor-pointer hover:bg-accent-default hover:text-surface data-highlighted:relative data-highlighted:z-0 data-highlighted:bg-accent-default data-highlighted:text-surface before:data-highlighted:absolute before:data-highlighted:inset-[0px] before:data-highlighted:z-[-1] before:data-highlighted:rounded-md`,e),ref:r,...i,children:(0,n.jsx)(`span`,{className:`text-lg leading-none`,children:t})});gg(),X();var Dk=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Qh,{className:Y(`block space-y-3xs`,e),ref:r,...i,children:t});gg(),X();var Ok=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(eg,{className:Y(`sticky top-[0px] z-1 my-[0px] mr-[0px] ml-[3px] bg-surface-2 px-sm pt-sm pb-3xs style-text-strong--2 text-on-surface-variant`,e),ref:r,...i,children:t});X();var kk=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`inline-flex items-center gap-xs style-text-default-0 text-on-surface-variant`,e),ref:r,...i,children:t});gg(),X();var Ak=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(lg,{className:Y(`mx-xs flex cursor-default items-center rounded-lg px-2xs py-3xs style-text-prose-0 select-none first:mt-xs last:mb-xs hover:cursor-pointer hover:bg-neutral-container-high hover:text-neutral-on-container data-highlighted:relative data-highlighted:z-0 data-highlighted:bg-neutral-container-high data-highlighted:text-neutral-on-container before:data-highlighted:absolute before:data-highlighted:inset-x-sm before:data-highlighted:inset-y-[0px] before:data-highlighted:z-[-1] before:data-highlighted:rounded-sm`,e),ref:r,...i,children:t});gg(),X();var jk=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(ug,{className:Y(`grid grid-cols-5`,e),ref:r,...i,children:t});gg(),X();var Mk=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(xh,{className:Y(`flex items-center gap-2xs p-xs style-text-prose--1 text-on-surface-variant empty:hidden`,e),ref:r,...i,children:t});gg(),X();var Nk=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Hm,{className:Y(``,e),ref:r,...i,render:()=>(0,n.jsx)(n.Fragment,{children:t})});uo();var Pk=lo(`group/avatar relative inline-flex shrink-0 items-center justify-center rounded-full`,{variants:{size:{small:`size-lg style-text-default--1`,medium:`size-xl style-text-default-0`,large:`size-2xl style-text-default-1`}},defaultVariants:{size:`medium`}}),Fk=lo(`absolute right-0 bottom-0 inline-flex items-center justify-center rounded-full outline-3 outline-surface-background group-data-[size=large]/avatar:size-md group-data-[size=medium]/avatar:size-sm group-data-[size=small]/avatar:size-xs group-data-[size=large]/avatar:[&_svg]:size-sm group-data-[size=medium]/avatar:[&_svg]:size-xs group-data-[size=small]/avatar:[&_svg]:size-2xs`,{variants:{tone:{brand:`bg-brand-default [&>svg]:text-brand-on-default`,accent:`bg-accent-default [&>svg]:text-accent-on-default`,neutral:`bg-neutral-default [&>svg]:text-neutral-on-default`,error:`bg-error-default [&>svg]:text-error-on-default`,info:`bg-info-default [&>svg]:text-info-on-default`,success:`bg-success-default [&>svg]:text-success-on-default`,warning:`bg-warning-default [&>svg]:text-warning-on-default`},position:{topLeft:`top-0 left-0`,topRight:`top-0 right-0`,bottomLeft:`bottom-0 left-0`,bottomRight:`right-0 bottom-0`}},defaultVariants:{tone:`success`,position:`bottomRight`}});Eg(),X();var Ik=({size:e=`medium`,className:t,children:r,ref:i,...a})=>(0,n.jsx)(Sg,{className:Y(Pk({className:t,size:e})),"data-size":e,"data-slot":`avatar`,ref:i,...a,children:r});Eg(),X();var Lk=({className:e,ref:t,...r})=>(0,n.jsx)(Tg,{className:Y(`flex size-full items-center justify-center rounded-full bg-surface-3 align-middle shadow-2xs select-none`,e),"data-slot":`avatar-fallback`,ref:t,...r});Eg(),X();var Rk=({className:e,ref:t,...r})=>(0,n.jsx)(wg,{className:Y(`size-full rounded-full object-cover`,e),"data-slot":`avatar-image`,ref:t,...r});X();var zk=({tone:e,position:t,className:r,children:i,ref:a,...o})=>(0,n.jsx)(`div`,{"data-slot":`avatar-badge`,className:Y(Fk({tone:e,position:t,className:r})),ref:a,...o,children:i});uo();var Bk=lo(`inline-flex items-center justify-center gap-3xs rounded-full style-text-default--2 whitespace-nowrap transition-all select-none`,{variants:{size:{small:`h-sm px-xs [&>svg]:size-2xs`,medium:`h-md px-xs [&>svg]:size-xs`,large:`h-lg px-xs [&>svg]:size-sm`,iconSmall:`size-sm [&>svg]:size-2xs`,iconMedium:`size-md [&>svg]:size-xs`,iconLarge:`size-lg [&>svg]:size-sm`},tone:{brand:``,accent:``,neutral:``,error:``,info:``,success:``,warning:``},variant:{fill:`shadow-2xs`,outline:`border`,soft:`border`}},defaultVariants:{size:`medium`,tone:`brand`,variant:`fill`},compoundVariants:[{variant:`fill`,tone:`brand`,className:`bg-brand-default text-brand-on-default`},{variant:`fill`,tone:`accent`,className:`bg-accent-default text-accent-on-default`},{variant:`fill`,tone:`neutral`,className:`bg-neutral-default text-neutral-on-default`},{variant:`fill`,tone:`error`,className:`bg-error-default text-error-on-default`},{variant:`fill`,tone:`info`,className:`bg-info-default text-info-on-default`},{variant:`fill`,tone:`success`,className:`bg-success-default text-success-on-default`},{variant:`fill`,tone:`warning`,className:`bg-warning-default text-warning-on-default`},{variant:`outline`,tone:`brand`,className:`border-brand-default text-brand-default`},{variant:`outline`,tone:`accent`,className:`border-accent-default text-accent-default`},{variant:`outline`,tone:`neutral`,className:`border-neutral-default text-neutral-default`},{variant:`outline`,tone:`error`,className:`border-error-default text-error-default`},{variant:`outline`,tone:`info`,className:`border-info-default text-info-default`},{variant:`outline`,tone:`success`,className:`border-success-default text-success-default`},{variant:`outline`,tone:`warning`,className:`border-warning-default text-warning-default`},{variant:`soft`,tone:`brand`,className:`border-brand-border bg-brand-container text-brand-on-container`},{variant:`soft`,tone:`accent`,className:`border-accent-border bg-accent-container text-accent-on-container`},{variant:`soft`,tone:`neutral`,className:`border-neutral-border bg-neutral-container text-neutral-on-container`},{variant:`soft`,tone:`error`,className:`border-error-border bg-error-container text-error-on-container`},{variant:`soft`,tone:`info`,className:`border-info-border bg-info-container text-info-on-container`},{variant:`soft`,tone:`success`,className:`border-success-border bg-success-container text-success-on-container`},{variant:`soft`,tone:`warning`,className:`border-warning-border bg-warning-container text-warning-on-container`}]});X();var Vk=({className:e,size:t,tone:r,variant:i,children:a,ref:o,...s})=>(0,n.jsx)(`div`,{className:Y(Bk({className:e,size:t,tone:r,variant:i})),ref:o,...s,children:a});X();var Hk=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`nav`,{className:Y(`flex items-center gap-2xs px-sm py-2xs`,e),ref:r,...i,children:t}),Uk,Wk=m((()=>{Uk=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M228,48V96a12,12,0,0,1-12,12H168a12,12,0,0,1,0-24h19l-7.8-7.8a75.55,75.55,0,0,0-53.32-22.26h-.43A75.49,75.49,0,0,0,72.39,75.57,12,12,0,1,1,55.61,58.41a99.38,99.38,0,0,1,69.87-28.47H126A99.42,99.42,0,0,1,196.2,59.23L204,67V48a12,12,0,0,1,24,0ZM183.61,180.43a75.49,75.49,0,0,1-53.09,21.63h-.43A75.55,75.55,0,0,1,76.77,179.8L69,172H88a12,12,0,0,0,0-24H40a12,12,0,0,0-12,12v48a12,12,0,0,0,24,0V189l7.8,7.8A99.42,99.42,0,0,0,130,226.06h.56a99.38,99.38,0,0,0,69.87-28.47,12,12,0,0,0-16.78-17.16Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1-5.66-13.66L180.65,72a79.48,79.48,0,0,0-54.72-22.09h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27,96,96,0,0,1,192,60.7l18.36-18.36A8,8,0,0,1,224,48ZM186.41,183.29A80,80,0,0,1,75.35,184l18.31-18.31A8,8,0,0,0,88,152H40a8,8,0,0,0-8,8v48a8,8,0,0,0,13.66,5.66L64,195.3a95.42,95.42,0,0,0,66,26.76h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M222,48V96a6,6,0,0,1-6,6H168a6,6,0,0,1,0-12h33.52L183.47,72a81.51,81.51,0,0,0-57.53-24h-.46A81.5,81.5,0,0,0,68.19,71.28a6,6,0,1,1-8.38-8.58,93.38,93.38,0,0,1,65.67-26.76H126a93.45,93.45,0,0,1,66,27.53l18,18V48a6,6,0,0,1,12,0ZM187.81,184.72a81.5,81.5,0,0,1-57.29,23.34h-.46a81.51,81.51,0,0,1-57.53-24L54.48,166H88a6,6,0,0,0,0-12H40a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V174.48l18,18.05a93.45,93.45,0,0,0,66,27.53h.52a93.38,93.38,0,0,0,65.67-26.76,6,6,0,1,0-8.38-8.58Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M220,48V96a4,4,0,0,1-4,4H168a4,4,0,0,1,0-8h38.34L184.89,70.54A84,84,0,0,0,66.8,69.85a4,4,0,1,1-5.6-5.72,92,92,0,0,1,129.34.76L212,86.34V48a4,4,0,0,1,8,0ZM189.2,186.15a83.44,83.44,0,0,1-58.68,23.91h-.47a83.52,83.52,0,0,1-58.94-24.6L49.66,164H88a4,4,0,0,0,0-8H40a4,4,0,0,0-4,4v48a4,4,0,0,0,8,0V169.66l21.46,21.45A91.43,91.43,0,0,0,130,218.06h.51a91.45,91.45,0,0,0,64.28-26.19,4,4,0,1,0-5.6-5.72Z`}))]])})),Gk,Kk=m((()=>{Gk=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M120.49,167.51a12,12,0,0,1,0,17l-32,32a12,12,0,0,1-17,0l-32-32a12,12,0,1,1,17-17L68,179V48a12,12,0,0,1,24,0V179l11.51-11.52A12,12,0,0,1,120.49,167.51Zm96-96-32-32a12,12,0,0,0-17,0l-32,32a12,12,0,0,0,17,17L164,77V208a12,12,0,0,0,24,0V77l11.51,11.52a12,12,0,0,0,17-17Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M176,48V208H80V48Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M117.66,170.34a8,8,0,0,1,0,11.32l-32,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32L72,188.69V48a8,8,0,0,1,16,0V188.69l18.34-18.35A8,8,0,0,1,117.66,170.34Zm96-96-32-32a8,8,0,0,0-11.32,0l-32,32a8,8,0,0,0,11.32,11.32L168,67.31V208a8,8,0,0,0,16,0V67.31l18.34,18.35a8,8,0,0,0,11.32-11.32Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M119.39,172.94a8,8,0,0,1-1.73,8.72l-32,32a8,8,0,0,1-11.32,0l-32-32A8,8,0,0,1,48,168H72V48a8,8,0,0,1,16,0V168h24A8,8,0,0,1,119.39,172.94Zm94.27-98.6-32-32a8,8,0,0,0-11.32,0l-32,32A8,8,0,0,0,144,88h24V208a8,8,0,0,0,16,0V88h24a8,8,0,0,0,5.66-13.66Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M116.24,171.76a6,6,0,0,1,0,8.48l-32,32a6,6,0,0,1-8.48,0l-32-32a6,6,0,0,1,8.48-8.48L74,193.51V48a6,6,0,0,1,12,0V193.51l21.76-21.75A6,6,0,0,1,116.24,171.76Zm96-96-32-32a6,6,0,0,0-8.48,0l-32,32a6,6,0,0,0,8.48,8.48L170,62.49V208a6,6,0,0,0,12,0V62.49l21.76,21.75a6,6,0,0,0,8.48-8.48Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M117.66,170.34a8,8,0,0,1,0,11.32l-32,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32L72,188.69V48a8,8,0,0,1,16,0V188.69l18.34-18.35A8,8,0,0,1,117.66,170.34Zm96-96-32-32a8,8,0,0,0-11.32,0l-32,32a8,8,0,0,0,11.32,11.32L168,67.31V208a8,8,0,0,0,16,0V67.31l18.34,18.35a8,8,0,0,0,11.32-11.32Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M114.83,173.17a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66,0l-32-32a4,4,0,0,1,5.66-5.66L76,198.34V48a4,4,0,0,1,8,0V198.34l25.17-25.17A4,4,0,0,1,114.83,173.17Zm96-96-32-32a4,4,0,0,0-5.66,0l-32,32a4,4,0,0,0,5.66,5.66L172,57.66V208a4,4,0,0,0,8,0V57.66l25.17,25.17a4,4,0,1,0,5.66-5.66Z`}))]])})),qk,Jk=m((()=>{qk=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M208,96l-80,80L48,96Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z`}))]])})),Yk,Xk=m((()=>{Yk=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M160,48V208L80,128Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M163.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,168,208V48A8,8,0,0,0,163.06,40.61ZM152,188.69,91.31,128,152,67.31Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M168,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,168,48Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M164.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L88.49,128Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z`}))]])})),Zk,Qk=m((()=>{Zk=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M200.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L129,128ZM72,36A12,12,0,0,0,60,48V208a12,12,0,0,0,24,0V48A12,12,0,0,0,72,36Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M192,48V208l-80-80Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M195.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,200,208V48A8,8,0,0,0,195.06,40.61ZM184,188.69,123.31,128,184,67.31ZM80,48V208a8,8,0,0,1-16,0V48a8,8,0,0,1,16,0Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M200,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,200,48ZM72,40a8,8,0,0,0-8,8V208a8,8,0,0,0,16,0V48A8,8,0,0,0,72,40Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M196.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L120.49,128ZM72,42a6,6,0,0,0-6,6V208a6,6,0,0,0,12,0V48A6,6,0,0,0,72,42Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M197.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L123.31,128ZM72,40a8,8,0,0,0-8,8V208a8,8,0,0,0,16,0V48A8,8,0,0,0,72,40Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M194.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L117.66,128ZM72,44a4,4,0,0,0-4,4V208a4,4,0,0,0,8,0V48A4,4,0,0,0,72,44Z`}))]])})),$k,eA=m((()=>{$k=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M152.49,119.51a12,12,0,0,1,0,17l-80,80a12,12,0,0,1-17-17L127,128,55.51,56.49a12,12,0,0,1,17-17ZM184,36a12,12,0,0,0-12,12V208a12,12,0,0,0,24,0V48A12,12,0,0,0,184,36Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M144,128,64,208V48Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M69.66,42.34A8,8,0,0,0,56,48V208a8,8,0,0,0,13.66,5.66l80-80a8,8,0,0,0,0-11.32ZM72,188.69V67.31L132.69,128ZM192,48V208a8,8,0,0,1-16,0V48a8,8,0,0,1,16,0Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M149.66,122.34a8,8,0,0,1,0,11.32l-80,80A8,8,0,0,1,56,208V48a8,8,0,0,1,13.66-5.66ZM184,40a8,8,0,0,0-8,8V208a8,8,0,0,0,16,0V48A8,8,0,0,0,184,40Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M148.24,123.76a6,6,0,0,1,0,8.48l-80,80a6,6,0,0,1-8.48-8.48L135.51,128,59.76,52.24a6,6,0,0,1,8.48-8.48ZM184,42a6,6,0,0,0-6,6V208a6,6,0,0,0,12,0V48A6,6,0,0,0,184,42Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M149.66,122.34a8,8,0,0,1,0,11.32l-80,80a8,8,0,0,1-11.32-11.32L132.69,128,58.34,53.66A8,8,0,0,1,69.66,42.34ZM184,40a8,8,0,0,0-8,8V208a8,8,0,0,0,16,0V48A8,8,0,0,0,184,40Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M146.83,125.17a4,4,0,0,1,0,5.66l-80,80a4,4,0,0,1-5.66-5.66L138.34,128,61.17,50.83a4,4,0,0,1,5.66-5.66ZM184,44a4,4,0,0,0-4,4V208a4,4,0,0,0,8,0V48A4,4,0,0,0,184,44Z`}))]])})),tA,nA=m((()=>{tA=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M176,128,96,208V48Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z`}))]])})),rA,iA=m((()=>{rA=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216.49,168.49a12,12,0,0,1-17,0L128,97,56.49,168.49a12,12,0,0,1-17-17l80-80a12,12,0,0,1,17,0l80,80A12,12,0,0,1,216.49,168.49Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M208,160H48l80-80Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M213.66,154.34l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,48,168H208a8,8,0,0,0,5.66-13.66ZM67.31,152,128,91.31,188.69,152Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M215.39,163.06A8,8,0,0,1,208,168H48a8,8,0,0,1-5.66-13.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,215.39,163.06Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M210.83,162.83a4,4,0,0,1-5.66,0L128,85.66,50.83,162.83a4,4,0,0,1-5.66-5.66l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,210.83,162.83Z`}))]])})),aA,oA=m((()=>{aA=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M184.49,167.51a12,12,0,0,1,0,17l-48,48a12,12,0,0,1-17,0l-48-48a12,12,0,0,1,17-17L128,207l39.51-39.52A12,12,0,0,1,184.49,167.51Zm-96-79L128,49l39.51,39.52a12,12,0,0,0,17-17l-48-48a12,12,0,0,0-17,0l-48,48a12,12,0,0,0,17,17Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M80,176h96l-48,48ZM128,32,80,80h96Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Zm-48,44.69L99.31,184h57.38ZM80,88h96a8,8,0,0,0,5.66-13.66l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,80,88Zm48-44.69L156.69,72H99.31Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M72.61,83.06a8,8,0,0,1,1.73-8.72l48-48a8,8,0,0,1,11.32,0l48,48A8,8,0,0,1,176,88H80A8,8,0,0,1,72.61,83.06ZM176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M180.24,171.76a6,6,0,0,1,0,8.48l-48,48a6,6,0,0,1-8.48,0l-48-48a6,6,0,0,1,8.48-8.48L128,215.51l43.76-43.75A6,6,0,0,1,180.24,171.76Zm-96-87.52L128,40.49l43.76,43.75a6,6,0,0,0,8.48-8.48l-48-48a6,6,0,0,0-8.48,0l-48,48a6,6,0,0,0,8.48,8.48Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M178.83,173.17a4,4,0,0,1,0,5.66l-48,48a4,4,0,0,1-5.66,0l-48-48a4,4,0,0,1,5.66-5.66L128,218.34l45.17-45.17A4,4,0,0,1,178.83,173.17Zm-96-90.34L128,37.66l45.17,45.17a4,4,0,1,0,5.66-5.66l-48-48a4,4,0,0,0-5.66,0l-48,48a4,4,0,0,0,5.66,5.66Z`}))]])})),sA,cA=m((()=>{sA=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z`}))]])})),lA,uA=m((()=>{lA=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M176.49,95.51a12,12,0,0,1,0,17l-56,56a12,12,0,0,1-17,0l-24-24a12,12,0,1,1,17-17L112,143l47.51-47.52A12,12,0,0,1,176.49,95.51ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M172.24,99.76a6,6,0,0,1,0,8.48l-56,56a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L112,151.51l51.76-51.75A6,6,0,0,1,172.24,99.76ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M170.83,101.17a4,4,0,0,1,0,5.66l-56,56a4,4,0,0,1-5.66,0l-24-24a4,4,0,0,1,5.66-5.66L112,154.34l53.17-53.17A4,4,0,0,1,170.83,101.17ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z`}))]])})),dA,fA=m((()=>{dA=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M236,128a108,108,0,0,1-216,0c0-42.52,24.73-81.34,63-98.9A12,12,0,1,1,93,50.91C63.24,64.57,44,94.83,44,128a84,84,0,0,0,168,0c0-33.17-19.24-63.43-49-77.09A12,12,0,1,1,173,29.1C211.27,46.66,236,85.48,236,128Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60.15,61.59,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20.15-66.41-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,176A72,72,0,0,1,92,65.64a8,8,0,0,1,8,13.85,56,56,0,1,0,56,0,8,8,0,0,1,8-13.85A72,72,0,0,1,128,200Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M230,128a102,102,0,0,1-204,0c0-40.18,23.35-76.86,59.5-93.45a6,6,0,0,1,5,10.9C58.61,60.09,38,92.49,38,128a90,90,0,0,0,180,0c0-35.51-20.61-67.91-52.5-82.55a6,6,0,0,1,5-10.9C206.65,51.14,230,87.82,230,128Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60.15,61.59,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20.15-66.41-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M228,128a100,100,0,0,1-200,0c0-39.4,22.9-75.37,58.33-91.63a4,4,0,1,1,3.34,7.27C57.07,58.6,36,91.71,36,128a92,92,0,0,0,184,0c0-36.29-21.07-69.4-53.67-84.36a4,4,0,1,1,3.34-7.27C205.1,52.63,228,88.6,228,128Z`}))]])})),pA,mA=m((()=>{pA=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,40V168H168V88H88V40Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z`}))]])})),hA,gA=m((()=>{hA=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M144,128a16,16,0,1,1-16-16A16,16,0,0,1,144,128ZM60,112a16,16,0,1,0,16,16A16,16,0,0,0,60,112Zm136,0a16,16,0,1,0,16,16A16,16,0,0,0,196,112Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M240,96v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V96A16,16,0,0,1,32,80H224A16,16,0,0,1,240,96Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M224,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V96A16,16,0,0,0,224,80ZM60,140a12,12,0,1,1,12-12A12,12,0,0,1,60,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,196,140Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128ZM60,118a10,10,0,1,0,10,10A10,10,0,0,0,60,118Zm136,0a10,10,0,1,0,10,10A10,10,0,0,0,196,118Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-76-8a8,8,0,1,0,8,8A8,8,0,0,0,60,120Zm136,0a8,8,0,1,0,8,8A8,8,0,0,0,196,120Z`}))]])})),_A,vA=m((()=>{_A=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M71.51,88.49a12,12,0,0,1,17-17L116,99V24a12,12,0,0,1,24,0V99l27.51-27.52a12,12,0,0,1,17,17l-48,48a12,12,0,0,1-17,0ZM224,116H188a12,12,0,0,0,0,24h32v56H36V140H68a12,12,0,0,0,0-24H32a20,20,0,0,0-20,20v64a20,20,0,0,0,20,20H224a20,20,0,0,0,20-20V136A20,20,0,0,0,224,116Zm-20,52a16,16,0,1,0-16,16A16,16,0,0,0,204,168Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M232,136v64a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V136a8,8,0,0,1,8-8H224A8,8,0,0,1,232,136Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H72a8,8,0,0,1,0,16H32v64H224V136H184a8,8,0,0,1,0-16h40A16,16,0,0,1,240,136Zm-117.66-2.34a8,8,0,0,0,11.32,0l48-48a8,8,0,0,0-11.32-11.32L136,108.69V24a8,8,0,0,0-16,0v84.69L85.66,74.34A8,8,0,0,0,74.34,85.66ZM200,168a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M74.34,85.66A8,8,0,0,1,85.66,74.34L120,108.69V24a8,8,0,0,1,16,0v84.69l34.34-34.35a8,8,0,0,1,11.32,11.32l-48,48a8,8,0,0,1-11.32,0ZM240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H84.4a4,4,0,0,1,2.83,1.17L111,145A24,24,0,0,0,145,145l23.8-23.8A4,4,0,0,1,171.6,120H224A16,16,0,0,1,240,136Zm-40,32a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M238,136v64a14,14,0,0,1-14,14H32a14,14,0,0,1-14-14V136a14,14,0,0,1,14-14H72a6,6,0,0,1,0,12H32a2,2,0,0,0-2,2v64a2,2,0,0,0,2,2H224a2,2,0,0,0,2-2V136a2,2,0,0,0-2-2H184a6,6,0,0,1,0-12h40A14,14,0,0,1,238,136Zm-114.24-3.76a6,6,0,0,0,8.48,0l48-48a6,6,0,0,0-8.48-8.48L134,113.51V24a6,6,0,0,0-12,0v89.51L84.24,75.76a6,6,0,0,0-8.48,8.48ZM198,168a10,10,0,1,0-10,10A10,10,0,0,0,198,168Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H72a8,8,0,0,1,0,16H32v64H224V136H184a8,8,0,0,1,0-16h40A16,16,0,0,1,240,136Zm-117.66-2.34a8,8,0,0,0,11.32,0l48-48a8,8,0,0,0-11.32-11.32L136,108.69V24a8,8,0,0,0-16,0v84.69L85.66,74.34A8,8,0,0,0,74.34,85.66ZM200,168a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M236,136v64a12,12,0,0,1-12,12H32a12,12,0,0,1-12-12V136a12,12,0,0,1,12-12H72a4,4,0,0,1,0,8H32a4,4,0,0,0-4,4v64a4,4,0,0,0,4,4H224a4,4,0,0,0,4-4V136a4,4,0,0,0-4-4H184a4,4,0,0,1,0-8h40A12,12,0,0,1,236,136Zm-110.83-5.17a4,4,0,0,0,5.66,0l48-48a4,4,0,1,0-5.66-5.66L132,118.34V24a4,4,0,0,0-8,0v94.34L82.83,77.17a4,4,0,0,0-5.66,5.66ZM196,168a8,8,0,1,0-8,8A8,8,0,0,0,196,168Z`}))]])})),yA,bA=m((()=>{yA=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,68H133.39l-26-29.29a20,20,0,0,0-15-6.71H40A20,20,0,0,0,20,52V200.62A19.41,19.41,0,0,0,39.38,220H216.89A19.13,19.13,0,0,0,236,200.89V88A20,20,0,0,0,216,68ZM44,56H90.61l10.67,12H44ZM212,196H44V92H212Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M128,80H32V56a8,8,0,0,1,8-8H92.69a8,8,0,0,1,5.65,2.34Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M216,72H131.31L104,44.69A15.86,15.86,0,0,0,92.69,40H40A16,16,0,0,0,24,56V200.62A15.4,15.4,0,0,0,39.38,216H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72ZM92.69,56l16,16H40V56ZM216,200H40V88H216Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,72H131.31L104,44.69A15.88,15.88,0,0,0,92.69,40H40A16,16,0,0,0,24,56V200.62A15.41,15.41,0,0,0,39.39,216h177.5A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72ZM40,56H92.69l16,16H40Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,74H130.49l-27.9-27.9a13.94,13.94,0,0,0-9.9-4.1H40A14,14,0,0,0,26,56V200.62A13.39,13.39,0,0,0,39.38,214H216.89A13.12,13.12,0,0,0,230,200.89V88A14,14,0,0,0,216,74ZM40,54H92.69a2,2,0,0,1,1.41.59L113.51,74H38V56A2,2,0,0,1,40,54ZM218,200.89a1.11,1.11,0,0,1-1.11,1.11H39.38A1.4,1.4,0,0,1,38,200.62V86H216a2,2,0,0,1,2,2Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,72H131.31L104,44.69A15.86,15.86,0,0,0,92.69,40H40A16,16,0,0,0,24,56V200.62A15.4,15.4,0,0,0,39.38,216H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72ZM40,56H92.69l16,16H40ZM216,200H40V88H216Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,76H129.66L101.17,47.52A11.9,11.9,0,0,0,92.69,44H40A12,12,0,0,0,28,56V200.62A11.4,11.4,0,0,0,39.38,212H216.89A11.12,11.12,0,0,0,228,200.89V88A12,12,0,0,0,216,76ZM36,56a4,4,0,0,1,4-4H92.69a4,4,0,0,1,2.82,1.17L118.34,76H36ZM220,200.89a3.12,3.12,0,0,1-3.11,3.11H39.38A3.39,3.39,0,0,1,36,200.62V84H216a4,4,0,0,1,4,4Z`}))]])})),xA,SA=m((()=>{xA=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M248.23,112.31A20,20,0,0,0,232,104H220V88a20,20,0,0,0-20-20H132L105.34,48a20.12,20.12,0,0,0-12-4H40A20,20,0,0,0,20,64V208a12,12,0,0,0,12,12H211.1a12,12,0,0,0,11.33-8l28.49-81.47.06-.17A20,20,0,0,0,248.23,112.31ZM92,68l28.8,21.6A12,12,0,0,0,128,92h68v12H69.77a20,20,0,0,0-18.94,13.58L44,137.15V68ZM202.59,196H48.89l23.72-68H226.37Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M208,88v24H69.77a8,8,0,0,0-7.59,5.47L32,208V64a8,8,0,0,1,8-8H93.33a8,8,0,0,1,4.8,1.6L128,80h72A8,8,0,0,1,208,88Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Zm112,136H43.1l26.67-80H232Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M243.36,111.81A14,14,0,0,0,232,106H214V88a14,14,0,0,0-14-14H130L101.74,52.8a14.06,14.06,0,0,0-8.4-2.8H40A14,14,0,0,0,26,64V208a6,6,0,0,0,6,6H211.1a6,6,0,0,0,5.69-4.1l28.49-85.47A14,14,0,0,0,243.36,111.81ZM40,62H93.34a2,2,0,0,1,1.2.4L124.4,84.8A6,6,0,0,0,128,86h72a2,2,0,0,1,2,2v18H69.77a14,14,0,0,0-13.28,9.57L38,171V64A2,2,0,0,1,40,62Zm193.9,58.63L206.78,202H40.33l27.54-82.63a2,2,0,0,1,1.9-1.37H232a2,2,0,0,1,1.9,2.63Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Zm112,136H43.1l26.67-80H232Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M241.72,113a11.88,11.88,0,0,0-9.73-5H212V88a12,12,0,0,0-12-12H129.33l-28.8-21.6a12.05,12.05,0,0,0-7.2-2.4H40A12,12,0,0,0,28,64V208a4,4,0,0,0,4,4H211.09a4,4,0,0,0,3.79-2.74l28.49-85.47A11.86,11.86,0,0,0,241.72,113ZM40,60H93.33a4,4,0,0,1,2.4.8L125.6,83.2a4,4,0,0,0,2.4.8h72a4,4,0,0,1,4,4v20H69.76a12,12,0,0,0-11.38,8.21L36,183.35V64A4,4,0,0,1,40,60Zm195.78,61.26L208.2,204H37.55L66,118.74A4,4,0,0,1,69.76,116H232a4,4,0,0,1,3.79,5.26Z`}))]])})),CA,wA=m((()=>{CA=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,68H132L105.33,48a20.12,20.12,0,0,0-12-4H40A20,20,0,0,0,20,64V200a20,20,0,0,0,20,20H216.89A19.13,19.13,0,0,0,236,200.89V88A20,20,0,0,0,216,68Zm-4,128H44V68H92l28.8,21.6A12,12,0,0,0,128,92h84Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M224,88V200.89a7.11,7.11,0,0,1-7.11,7.11H40a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H93.33a8,8,0,0,1,4.8,1.6L128,80h88A8,8,0,0,1,224,88Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M232,88V200.89A15.13,15.13,0,0,1,216.89,216H40a16,16,0,0,1-16-16V64A16,16,0,0,1,40,48H93.33a16.12,16.12,0,0,1,9.6,3.2L130.67,72H216A16,16,0,0,1,232,88Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,74H130L101.73,52.8a14,14,0,0,0-8.4-2.8H40A14,14,0,0,0,26,64V200a14,14,0,0,0,14,14H216.89A13.12,13.12,0,0,0,230,200.89V88A14,14,0,0,0,216,74Zm2,126.89a1.11,1.11,0,0,1-1.11,1.11H40a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H93.33a2,2,0,0,1,1.2.4L124.4,84.8A6,6,0,0,0,128,86h88a2,2,0,0,1,2,2Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,76H129.33l-28.8-21.6a12.05,12.05,0,0,0-7.2-2.4H40A12,12,0,0,0,28,64V200a12,12,0,0,0,12,12H216.89A11.12,11.12,0,0,0,228,200.89V88A12,12,0,0,0,216,76Zm4,124.89a3.12,3.12,0,0,1-3.11,3.11H40a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H93.33a4,4,0,0,1,2.4.8L125.6,83.2a4,4,0,0,0,2.4.8h88a4,4,0,0,1,4,4Z`}))]])})),TA,EA=m((()=>{TA=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M234.29,47.91A20,20,0,0,0,216,36H40A20,20,0,0,0,25.2,69.45l.12.14L92,140.75V216a20,20,0,0,0,31.1,16.64l32-21.33A20,20,0,0,0,164,194.66V140.75l66.67-71.16.12-.14A20,20,0,0,0,234.29,47.91Zm-91,79.89A12,12,0,0,0,140,136v56.52l-24,16V136a12,12,0,0,0-3.25-8.2L49.23,60H206.77Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M221.9,61.38,152,136v58.65a8,8,0,0,1-3.56,6.66l-32,21.33A8,8,0,0,1,104,216V136L34.1,61.38A8,8,0,0,1,40,48H216A8,8,0,0,1,221.9,61.38Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M230.6,49.53A15.81,15.81,0,0,0,216,40H40A16,16,0,0,0,28.19,66.76l.08.09L96,139.17V216a16,16,0,0,0,24.87,13.32l32-21.34A16,16,0,0,0,160,194.66V139.17l67.74-72.32.08-.09A15.8,15.8,0,0,0,230.6,49.53ZM40,56h0Zm106.18,74.58A8,8,0,0,0,144,136v58.66L112,216V136a8,8,0,0,0-2.16-5.47L40,56H216Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M227.81,66.76l-.08.09L160,139.17v55.49A16,16,0,0,1,152.87,208l-32,21.34A16,16,0,0,1,96,216V139.17L28.27,66.85l-.08-.09A16,16,0,0,1,40,40H216a16,16,0,0,1,11.84,26.76Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M228.77,50.34A13.8,13.8,0,0,0,216,42H40A14,14,0,0,0,29.67,65.42l.06.07L98,138.38V216a14,14,0,0,0,21.77,11.64l32-21.33A14,14,0,0,0,158,194.66V138.38l68.33-73A13.82,13.82,0,0,0,228.77,50.34Zm-11.26,6.94L147.62,131.9A6,6,0,0,0,146,136v58.66a2,2,0,0,1-.89,1.67l-32,21.33A2,2,0,0,1,110,216V136a6,6,0,0,0-1.62-4.1L38.53,57.32A2,2,0,0,1,40,54H216a1.9,1.9,0,0,1,1.83,1.19A1.86,1.86,0,0,1,217.51,57.28Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M230.6,49.53A15.81,15.81,0,0,0,216,40H40A16,16,0,0,0,28.19,66.76l.08.09L96,139.17V216a16,16,0,0,0,24.87,13.32l32-21.34A16,16,0,0,0,160,194.66V139.17l67.74-72.32.08-.09A15.8,15.8,0,0,0,230.6,49.53ZM40,56h0Zm106.18,74.58A8,8,0,0,0,144,136v58.66L112,216V136a8,8,0,0,0-2.16-5.47L40,56H216Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M227,51.15A11.85,11.85,0,0,0,216,44H40a12,12,0,0,0-8.88,20.07l.05.05L100,137.59V216a12,12,0,0,0,18.66,10l32-21.33a12,12,0,0,0,5.35-10V137.59l68.86-73.52A11.85,11.85,0,0,0,227,51.15Zm-8,7.5-69.9,74.62A4,4,0,0,0,148,136v58.65a4,4,0,0,1-1.78,3.33l-32,21.33A4,4,0,0,1,108,216V136a4,4,0,0,0-1.08-2.74L37.05,58.67A4,4,0,0,1,40,52H216a4,4,0,0,1,3,6.65Z`}))]])})),DA,OA=m((()=>{DA=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M204,136a12,12,0,0,1-12,12H64a12,12,0,0,1,0-24H192A12,12,0,0,1,204,136Zm28-60H24a12,12,0,0,0,0,24H232a12,12,0,0,0,0-24Zm-80,96H104a12,12,0,0,0,0,24h48a12,12,0,0,0,0-24Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M200,136a8,8,0,0,1-8,8H64a8,8,0,0,1,0-16H192A8,8,0,0,1,200,136Zm32-56H24a8,8,0,0,0,0,16H232a8,8,0,0,0,0-16Zm-80,96H104a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM144,176H112a8,8,0,0,1,0-16h32a8,8,0,0,1,0,16Zm32-40H80a8,8,0,0,1,0-16h96a8,8,0,0,1,0,16Zm32-40H48a8,8,0,0,1,0-16H208a8,8,0,0,1,0,16Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M198,136a6,6,0,0,1-6,6H64a6,6,0,0,1,0-12H192A6,6,0,0,1,198,136Zm34-54H24a6,6,0,0,0,0,12H232a6,6,0,0,0,0-12Zm-80,96H104a6,6,0,0,0,0,12h48a6,6,0,0,0,0-12Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M200,136a8,8,0,0,1-8,8H64a8,8,0,0,1,0-16H192A8,8,0,0,1,200,136Zm32-56H24a8,8,0,0,0,0,16H232a8,8,0,0,0,0-16Zm-80,96H104a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M196,136a4,4,0,0,1-4,4H64a4,4,0,0,1,0-8H192A4,4,0,0,1,196,136Zm36-52H24a4,4,0,0,0,0,8H232a4,4,0,0,0,0-8Zm-80,96H104a4,4,0,0,0,0,8h48a4,4,0,0,0,0-8Z`}))]])})),kA,AA=m((()=>{kA=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z`}))]])})),jA,MA=m((()=>{jA=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z`}))]])})),NA,PA=m((()=>{NA=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H72a8,8,0,0,1,0-16H184a8,8,0,0,1,0,16Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128Z`}))]])})),FA,IA=m((()=>{FA=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z`}))]])})),LA,RA=m((()=>{LA=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,36H40A20,20,0,0,0,20,56V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36ZM44,60H76V196H44ZM212,196H100V60H212Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M88,48V208H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H80V200H40ZM216,200H96V56H216V200Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,160H88V56H216V200Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM38,200V56a2,2,0,0,1,2-2H82V202H40A2,2,0,0,1,38,200Zm180,0a2,2,0,0,1-2,2H94V54H216a2,2,0,0,1,2,2Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H80V200H40ZM216,200H96V56H216V200Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM36,200V56a4,4,0,0,1,4-4H84V204H40A4,4,0,0,1,36,200Zm184,0a4,4,0,0,1-4,4H92V52H216a4,4,0,0,1,4,4Z`}))]])})),zA,BA=m((()=>{zA=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M128,128a12,12,0,0,1-12,12H48a12,12,0,0,1,0-24h68A12,12,0,0,1,128,128ZM48,76H180a12,12,0,0,0,0-24H48a12,12,0,0,0,0,24Zm52,104H48a12,12,0,0,0,0,24h52a12,12,0,0,0,0-24Zm132.49-20.49a12,12,0,0,0-17,0L196,179V112a12,12,0,0,0-24,0v67l-19.51-19.52a12,12,0,0,0-17,17l40,40a12,12,0,0,0,17,0l40-40A12,12,0,0,0,232.49,159.51Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M224,80v88l-24,24H48V64H208A16,16,0,0,1,224,80Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M128,128a8,8,0,0,1-8,8H48a8,8,0,0,1,0-16h72A8,8,0,0,1,128,128ZM48,72H184a8,8,0,0,0,0-16H48a8,8,0,0,0,0,16Zm56,112H48a8,8,0,0,0,0,16h56a8,8,0,0,0,0-16Zm125.66-21.66a8,8,0,0,0-11.32,0L192,188.69V112a8,8,0,0,0-16,0v76.69l-26.34-26.35a8,8,0,0,0-11.32,11.32l40,40a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,229.66,162.34Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,72h96a8,8,0,0,1,0,16H72a8,8,0,0,1,0-16Zm40,112H72a8,8,0,0,1,0-16h40a8,8,0,0,1,0,16Zm8-48H72a8,8,0,0,1,0-16h48a8,8,0,0,1,0,16Zm77.66,29.66-24,24a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L160,164.69V120a8,8,0,0,1,16,0v44.69l10.34-10.35a8,8,0,0,1,11.32,11.32Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M126,128a6,6,0,0,1-6,6H48a6,6,0,0,1,0-12h72A6,6,0,0,1,126,128ZM48,70H184a6,6,0,0,0,0-12H48a6,6,0,0,0,0,12Zm56,116H48a6,6,0,0,0,0,12h56a6,6,0,0,0,0-12Zm124.24-22.24a6,6,0,0,0-8.48,0L190,193.51V112a6,6,0,0,0-12,0v81.51l-29.76-29.75a6,6,0,0,0-8.48,8.48l40,40a6,6,0,0,0,8.48,0l40-40A6,6,0,0,0,228.24,163.76Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M128,128a8,8,0,0,1-8,8H48a8,8,0,0,1,0-16h72A8,8,0,0,1,128,128ZM48,72H184a8,8,0,0,0,0-16H48a8,8,0,0,0,0,16Zm56,112H48a8,8,0,0,0,0,16h56a8,8,0,0,0,0-16Zm125.66-21.66a8,8,0,0,0-11.32,0L192,188.69V112a8,8,0,0,0-16,0v76.69l-26.34-26.35a8,8,0,0,0-11.32,11.32l40,40a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,229.66,162.34Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M124,128a4,4,0,0,1-4,4H48a4,4,0,0,1,0-8h72A4,4,0,0,1,124,128ZM48,68H184a4,4,0,0,0,0-8H48a4,4,0,0,0,0,8Zm56,120H48a4,4,0,0,0,0,8h56a4,4,0,0,0,0-8Zm122.83-22.83a4,4,0,0,0-5.66,0L188,198.34V112a4,4,0,0,0-8,0v86.34l-33.17-33.17a4,4,0,0,0-5.66,5.66l40,40a4,4,0,0,0,5.66,0l40-40A4,4,0,0,0,226.83,165.17Z`}))]])})),VA,HA=m((()=>{VA=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M36,128a12,12,0,0,1,12-12h68a12,12,0,0,1,0,24H48A12,12,0,0,1,36,128ZM48,76h52a12,12,0,0,0,0-24H48a12,12,0,0,0,0,24ZM180,180H48a12,12,0,0,0,0,24H180a12,12,0,0,0,0-24ZM232.49,79.51l-40-40a12,12,0,0,0-17,0l-40,40a12,12,0,0,0,17,17L172,77v67a12,12,0,0,0,24,0V77l19.51,19.52a12,12,0,0,0,17-17Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M224,88v88a16,16,0,0,1-16,16H48V64H200Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M40,128a8,8,0,0,1,8-8h72a8,8,0,0,1,0,16H48A8,8,0,0,1,40,128Zm8-56h56a8,8,0,0,0,0-16H48a8,8,0,0,0,0,16ZM184,184H48a8,8,0,0,0,0,16H184a8,8,0,0,0,0-16ZM229.66,82.34l-40-40a8,8,0,0,0-11.32,0l-40,40a8,8,0,0,0,11.32,11.32L176,67.31V144a8,8,0,0,0,16,0V67.31l26.34,26.35a8,8,0,0,0,11.32-11.32Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,72h40a8,8,0,0,1,0,16H72a8,8,0,0,1,0-16Zm0,48h48a8,8,0,0,1,0,16H72a8,8,0,0,1,0-16Zm96,64H72a8,8,0,0,1,0-16h96a8,8,0,0,1,0,16Zm29.66-82.34a8,8,0,0,1-11.32,0L176,91.31V136a8,8,0,0,1-16,0V91.31l-10.34,10.35a8,8,0,0,1-11.32-11.32l24-24a8,8,0,0,1,11.32,0l24,24A8,8,0,0,1,197.66,101.66Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M42,128a6,6,0,0,1,6-6h72a6,6,0,0,1,0,12H48A6,6,0,0,1,42,128Zm6-58h56a6,6,0,0,0,0-12H48a6,6,0,0,0,0,12ZM184,186H48a6,6,0,0,0,0,12H184a6,6,0,0,0,0-12ZM228.24,83.76l-40-40a6,6,0,0,0-8.48,0l-40,40a6,6,0,0,0,8.48,8.48L178,62.49V144a6,6,0,0,0,12,0V62.49l29.76,29.75a6,6,0,0,0,8.48-8.48Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M40,128a8,8,0,0,1,8-8h72a8,8,0,0,1,0,16H48A8,8,0,0,1,40,128Zm8-56h56a8,8,0,0,0,0-16H48a8,8,0,0,0,0,16ZM184,184H48a8,8,0,0,0,0,16H184a8,8,0,0,0,0-16ZM229.66,82.34l-40-40a8,8,0,0,0-11.32,0l-40,40a8,8,0,0,0,11.32,11.32L176,67.31V144a8,8,0,0,0,16,0V67.31l26.34,26.35a8,8,0,0,0,11.32-11.32Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M44,128a4,4,0,0,1,4-4h72a4,4,0,0,1,0,8H48A4,4,0,0,1,44,128Zm4-60h56a4,4,0,0,0,0-8H48a4,4,0,0,0,0,8ZM184,188H48a4,4,0,0,0,0,8H184a4,4,0,0,0,0-8ZM226.83,85.17l-40-40a4,4,0,0,0-5.66,0l-40,40a4,4,0,0,0,5.66,5.66L180,57.66V144a4,4,0,0,0,8,0V57.66l33.17,33.17a4,4,0,1,0,5.66-5.66Z`}))]])})),UA,WA=m((()=>{UA=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z`}))]])})),GA,KA=m((()=>{GA=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-12-80V80a12,12,0,0,1,24,0v52a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,172Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm-6-82V80a6,6,0,0,1,12,0v56a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,172Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm-4-84V80a4,4,0,0,1,8,0v56a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,172Z`}))]])})),qA,JA=m((()=>{qA=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z`}))]])})),YA,XA=m((()=>{YA=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M168.49,104.49,145,128l23.52,23.51a12,12,0,0,1-17,17L128,145l-23.51,23.52a12,12,0,0,1-17-17L111,128,87.51,104.49a12,12,0,0,1,17-17L128,111l23.51-23.52a12,12,0,0,1,17,17ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,130.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M164.24,100.24,136.48,128l27.76,27.76a6,6,0,1,1-8.48,8.48L128,136.48l-27.76,27.76a6,6,0,0,1-8.48-8.48L119.52,128,91.76,100.24a6,6,0,0,1,8.48-8.48L128,119.52l27.76-27.76a6,6,0,0,1,8.48,8.48ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M162.83,98.83,133.66,128l29.17,29.17a4,4,0,0,1-5.66,5.66L128,133.66,98.83,162.83a4,4,0,0,1-5.66-5.66L122.34,128,93.17,98.83a4,4,0,0,1,5.66-5.66L128,122.34l29.17-29.17a4,4,0,1,1,5.66,5.66ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z`}))]])})),ZA,QA=m((()=>{ZA=(0,y.createContext)({color:`currentColor`,size:`1em`,weight:`regular`,mirrored:!1})})),$A,ej=m((()=>{QA(),$A=y.forwardRef((e,t)=>{let{alt:n,color:r,size:i,weight:a,mirrored:o,children:s,weights:c,...l}=e,{color:u=`currentColor`,size:d,weight:f=`regular`,mirrored:p=!1,...m}=y.useContext(ZA);return y.createElement(`svg`,{ref:t,xmlns:`http://www.w3.org/2000/svg`,width:i??d,height:i??d,fill:r??u,viewBox:`0 0 256 256`,transform:o||p?`scale(-1, 1)`:void 0,...m,...l},!!n&&y.createElement(`title`,null,n),s,c.get(a??f))}),$A.displayName=`IconBase`})),tj,nj=m((()=>{ej(),Wk(),tj=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:Uk})),tj.displayName=`ArrowsClockwiseIcon`})),rj,ij=m((()=>{ej(),Kk(),rj=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:Gk})),rj.displayName=`ArrowsDownUpIcon`})),aj,oj=m((()=>{ej(),Jk(),aj=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:qk})),aj.displayName=`CaretDownIcon`})),sj,cj=m((()=>{ej(),Xk(),sj=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:Yk})),sj.displayName=`CaretLeftIcon`})),lj,uj=m((()=>{ej(),Qk(),lj=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:Zk})),lj.displayName=`CaretLineLeftIcon`})),dj,fj=m((()=>{ej(),eA(),dj=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:$k})),dj.displayName=`CaretLineRightIcon`})),pj,mj=m((()=>{ej(),nA(),pj=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:tA})),pj.displayName=`CaretRightIcon`})),hj,gj=m((()=>{ej(),iA(),hj=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:rA})),hj.displayName=`CaretUpIcon`})),_j,vj=m((()=>{ej(),oA(),_j=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:aA})),_j.displayName=`CaretUpDownIcon`})),yj,bj=m((()=>{ej(),cA(),yj=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:sA})),yj.displayName=`CheckIcon`})),xj,Sj=m((()=>{ej(),uA(),xj=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:lA})),xj.displayName=`CheckCircleIcon`})),Cj,lae=m((()=>{ej(),fA(),Cj=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:dA})),Cj.displayName=`CircleNotchIcon`})),wj,uae=m((()=>{ej(),mA(),wj=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:pA})),wj.displayName=`CopyIcon`})),Tj,dae=m((()=>{ej(),gA(),Tj=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:hA})),Tj.displayName=`DotsThreeIcon`})),Ej,fae=m((()=>{ej(),vA(),Ej=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:_A})),Ej.displayName=`DownloadIcon`})),Dj,pae=m((()=>{ej(),bA(),Dj=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:yA})),Dj.displayName=`FolderIcon`})),Oj,mae=m((()=>{ej(),SA(),Oj=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:xA})),Oj.displayName=`FolderOpenIcon`})),kj,hae=m((()=>{ej(),wA(),kj=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:CA})),kj.displayName=`FolderSimpleIcon`})),Aj,gae=m((()=>{ej(),EA(),Aj=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:TA})),Aj.displayName=`FunnelIcon`})),jj,_ae=m((()=>{ej(),OA(),jj=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:DA})),jj.displayName=`FunnelSimpleIcon`})),Mj,vae=m((()=>{ej(),AA(),Mj=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:kA})),Mj.displayName=`InfoIcon`})),Nj,yae=m((()=>{ej(),MA(),Nj=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:jA})),Nj.displayName=`MagnifyingGlassIcon`})),Pj,bae=m((()=>{ej(),PA(),Pj=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:NA})),Pj.displayName=`MinusIcon`})),Fj,xae=m((()=>{ej(),IA(),Fj=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:FA})),Fj.displayName=`PlusIcon`})),Ij,Sae=m((()=>{ej(),RA(),Ij=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:LA})),Ij.displayName=`SidebarSimpleIcon`})),Lj,Cae=m((()=>{ej(),BA(),Lj=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:zA})),Lj.displayName=`SortAscendingIcon`})),Rj,wae=m((()=>{ej(),HA(),Rj=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:VA})),Rj.displayName=`SortDescendingIcon`})),zj,Tae=m((()=>{ej(),WA(),zj=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:UA})),zj.displayName=`WarningIcon`})),Bj,Eae=m((()=>{ej(),KA(),Bj=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:GA})),Bj.displayName=`WarningCircleIcon`})),Vj,Dae=m((()=>{ej(),JA(),Vj=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:qA})),Vj.displayName=`XIcon`})),Hj,Oae=m((()=>{ej(),XA(),Hj=y.forwardRef((e,t)=>y.createElement($A,{ref:t,...e,weights:YA})),Hj.displayName=`XCircleIcon`})),Uj=m((()=>{nj(),ij(),oj(),cj(),uj(),fj(),mj(),gj(),vj(),bj(),Sj(),lae(),uae(),dae(),fae(),pae(),mae(),hae(),gae(),_ae(),vae(),yae(),bae(),xae(),Sae(),Cae(),wae(),Tae(),Eae(),Dae(),Oae()}));Uj(),X();var kae=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(`div`,{className:Y(`flex size-md items-center justify-center rounded-sm text-on-surface-variant transition-all hover:cursor-pointer hover:bg-neutral-container hover:text-neutral-on-container active:scale-[0.98] active:bg-neutral-container disabled:opacity-50 [&>svg]:size-sm`,e),ref:r,...i,children:[t,(0,n.jsx)(Tj,{weight:`bold`})]});X();var Aae=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`inline-flex h-md items-center justify-center gap-2xs rounded-full px-2xs style-text-default--1 text-accent-default [&>svg]:size-xs`,e),ref:r,...i,children:t});X();var jae=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`hover:bg-neutral-container-2 inline-flex h-md items-center justify-center gap-3xs rounded-md px-2xs style-text-default--1 text-on-surface-variant transition-all hover:cursor-pointer hover:bg-neutral-container active:scale-[0.98] active:bg-neutral-container disabled:opacity-50 [&>svg]:size-xs`,e),ref:r,...i,children:t});Uj(),X();var Mae=({className:e,ref:t,...r})=>(0,n.jsx)(`div`,{className:Y(`text-on-surface-variant [&>svg]:size-xs`,e),ref:t,...r,children:(0,n.jsx)(pj,{weight:`bold`})});uo();var Nae=lo(`inline-flex cursor-pointer items-center justify-center overflow-hidden rounded-full whitespace-nowrap transition-all select-none *:rounded-none *:bg-transparent disabled:pointer-events-none disabled:opacity-50 [&>button]:text-inherit`,{variants:{size:{large:`*:style-text-default-2 [&>button]:h-2xl [&>button]:px-md [&>button]:[&>svg]:size-lg`,medium:`*:style-text-default-0 [&>button]:h-xl [&>button]:px-sm [&>button]:[&>svg]:size-md`,small:`*:style-text-default--1 [&>button]:h-lg [&>button]:px-xs [&>button]:[&>svg]:size-sm`,extraSmall:`*:style-text-default--2 [&>button]:h-md [&>button]:px-2xs [&>button]:[&>svg]:size-xs`,iconLarge:`*:size-2xl [&>button]:size-2xl [&>button]:p-[0px] [&>button]:[&>svg]:size-lg`,iconMedium:`*:size-xl [&>button]:size-xl [&>button]:p-[0px] [&>button]:[&>svg]:size-md`,iconSmall:`*:size-lg [&>button]:size-lg [&>button]:p-[0px] [&>button]:[&>svg]:size-sm`,iconExtraSmall:`*:size-md [&>button]:size-md [&>button]:p-[0px] [&>button]:[&>svg]:size-xs`},variant:{fill:``,outline:`border`,ghost:``,soft:`border`,elevated:`shadow-xs *:active:scale-100!`},tone:{brand:`[&>*+*]:before:bg-brand-border`,accent:`[&>*+*]:before:bg-accent-border`,neutral:`[&>*+*]:before:bg-neutral-border`,error:`[&>*+*]:before:bg-error-border`,info:`[&>*+*]:before:bg-info-border`,success:`[&>*+*]:before:bg-success-border`,warning:``},orientation:{horizontal:`[&>*+*]:relative [&>*+*]:before:absolute [&>*+*]:before:top-1/2 [&>*+*]:before:left-0 [&>*+*]:before:h-1/2 [&>*+*]:before:w-px [&>*+*]:before:-translate-y-1/2 [&>*+*]:before:content-[""]`,vertical:`flex-col [&>*+*]:relative [&>*+*]:before:absolute [&>*+*]:before:top-0 [&>*+*]:before:left-1/2 [&>*+*]:before:h-px [&>*+*]:before:w-1/2 [&>*+*]:before:-translate-x-1/2 [&>*+*]:before:content-[""]`}},defaultVariants:{size:`medium`,variant:`fill`,tone:`brand`,orientation:`horizontal`},compoundVariants:[{variant:`fill`,tone:`brand`,className:`bg-brand-default text-brand-on-default [&>button:hover]:bg-brand-muted`},{variant:`fill`,tone:`accent`,className:`bg-accent-default text-accent-on-default [&>button:hover]:bg-accent-muted`},{variant:`fill`,tone:`neutral`,className:`bg-neutral-default text-neutral-on-default [&>button:hover]:bg-neutral-muted`},{variant:`fill`,tone:`error`,className:`bg-error-default text-error-on-default [&>button:hover]:bg-error-muted`},{variant:`fill`,tone:`info`,className:`bg-info-default text-info-on-default [&>button:hover]:bg-info-muted`},{variant:`fill`,tone:`success`,className:`bg-success-default text-success-on-default [&>button:hover]:bg-success-muted`},{variant:`fill`,tone:`warning`,className:`bg-warning-default text-warning-on-default [&>button:hover]:bg-warning-muted`},{variant:`outline`,tone:`brand`,className:`border-brand-border text-brand-default [&>button:hover]:bg-brand-subtle [&>button:hover]:text-brand-on-container`},{variant:`outline`,tone:`accent`,className:`border-accent-border text-accent-default [&>button:hover]:bg-accent-subtle [&>button:hover]:text-accent-on-container`},{variant:`outline`,tone:`neutral`,className:`border-neutral-border text-neutral-default [&>button:hover]:bg-neutral-subtle [&>button:hover]:text-neutral-on-container`},{variant:`outline`,tone:`error`,className:`border-error-border text-error-default [&>button:hover]:bg-error-subtle [&>button:hover]:text-error-on-container`},{variant:`outline`,tone:`info`,className:`border-info-border text-info-default [&>button:hover]:bg-info-subtle [&>button:hover]:text-info-on-container`},{variant:`outline`,tone:`success`,className:`border-success-border text-success-default [&>button:hover]:bg-success-subtle [&>button:hover]:text-success-on-container`},{variant:`outline`,tone:`warning`,className:`border-warning-border text-warning-default [&>button:hover]:bg-warning-subtle [&>button:hover]:text-warning-on-container`},{variant:`ghost`,tone:`brand`,className:`text-brand-default [&>button:hover]:bg-brand-subtle [&>button:hover]:text-brand-on-container`},{variant:`ghost`,tone:`accent`,className:`text-accent-default [&>button:hover]:bg-accent-subtle [&>button:hover]:text-accent-on-container`},{variant:`ghost`,tone:`neutral`,className:`text-neutral-default [&>button:hover]:bg-neutral-subtle [&>button:hover]:text-neutral-on-container`},{variant:`ghost`,tone:`error`,className:`text-error-default [&>button:hover]:bg-error-subtle [&>button:hover]:text-error-on-container`},{variant:`ghost`,tone:`info`,className:`text-info-default [&>button:hover]:bg-info-subtle [&>button:hover]:text-info-on-container`},{variant:`ghost`,tone:`success`,className:`text-success-default [&>button:hover]:bg-success-subtle [&>button:hover]:text-success-on-container`},{variant:`ghost`,tone:`warning`,className:`text-warning-default [&>button:hover]:bg-warning-subtle [&>button:hover]:text-warning-on-container`},{variant:`soft`,tone:`brand`,className:`border-brand-border bg-brand-container text-brand-on-container [&>button:hover]:bg-brand-container-high`},{variant:`soft`,tone:`accent`,className:`border-accent-border bg-accent-container text-accent-on-container [&>button:hover]:bg-accent-container-high`},{variant:`soft`,tone:`neutral`,className:`border-neutral-border bg-neutral-container text-neutral-on-container [&>button:hover]:bg-neutral-container-high`},{variant:`soft`,tone:`error`,className:`border-error-border bg-error-container text-error-on-container [&>button:hover]:bg-error-container-high`},{variant:`soft`,tone:`info`,className:`border-info-border bg-info-container text-info-on-container [&>button:hover]:bg-info-container-high`},{variant:`soft`,tone:`success`,className:`border-success-border bg-success-container text-success-on-container [&>button:hover]:bg-success-container-high`},{variant:`soft`,tone:`warning`,className:`border-warning-border bg-warning-container text-warning-on-container [&>button:hover]:bg-warning-container-high`},{variant:`elevated`,tone:`brand`,className:`bg-brand-container text-brand-on-container [&>button]:not-active:hover:bg-brand-container-high [&>button]:active:bg-brand-container`},{variant:`elevated`,tone:`accent`,className:`bg-accent-container text-accent-on-container [&>button]:not-active:hover:bg-accent-container-high [&>button]:active:bg-accent-container`},{variant:`elevated`,tone:`neutral`,className:`bg-surface text-on-surface [&>button]:not-active:hover:bg-neutral-container [&>button]:not-active:hover:text-neutral-on-container [&>button]:active:bg-surface`},{variant:`elevated`,tone:`error`,className:`bg-error-container text-error-on-container [&>button]:not-active:hover:bg-error-container-high [&>button]:active:bg-error-container`},{variant:`elevated`,tone:`info`,className:`bg-info-container text-info-on-container [&>button]:not-active:hover:bg-info-container-high [&>button]:active:bg-info-container`},{variant:`elevated`,tone:`success`,className:`bg-success-container text-success-on-container [&>button]:not-active:hover:bg-success-container-high [&>button]:active:bg-success-container`},{variant:`elevated`,tone:`warning`,className:`bg-warning-container text-warning-on-container [&>button]:not-active:hover:bg-warning-container-high [&>button]:active:bg-warning-container`}]});X();var Pae=({size:e,variant:t,tone:r,orientation:i,className:a,children:o,ref:s,...c})=>(0,n.jsx)(`div`,{className:Y(Nae({size:e,variant:t,tone:r,orientation:i}),a),ref:s,...c,children:o}),Fae=`dangerouslySetInnerHTML.onCopy.onCopyCapture.onCut.onCutCapture.onPaste.onPasteCapture.onCompositionEnd.onCompositionEndCapture.onCompositionStart.onCompositionStartCapture.onCompositionUpdate.onCompositionUpdateCapture.onFocus.onFocusCapture.onBlur.onBlurCapture.onChange.onChangeCapture.onBeforeInput.onBeforeInputCapture.onInput.onInputCapture.onReset.onResetCapture.onSubmit.onSubmitCapture.onInvalid.onInvalidCapture.onLoad.onLoadCapture.onError.onErrorCapture.onKeyDown.onKeyDownCapture.onKeyPress.onKeyPressCapture.onKeyUp.onKeyUpCapture.onAbort.onAbortCapture.onCanPlay.onCanPlayCapture.onCanPlayThrough.onCanPlayThroughCapture.onDurationChange.onDurationChangeCapture.onEmptied.onEmptiedCapture.onEncrypted.onEncryptedCapture.onEnded.onEndedCapture.onLoadedData.onLoadedDataCapture.onLoadedMetadata.onLoadedMetadataCapture.onLoadStart.onLoadStartCapture.onPause.onPauseCapture.onPlay.onPlayCapture.onPlaying.onPlayingCapture.onProgress.onProgressCapture.onRateChange.onRateChangeCapture.onSeeked.onSeekedCapture.onSeeking.onSeekingCapture.onStalled.onStalledCapture.onSuspend.onSuspendCapture.onTimeUpdate.onTimeUpdateCapture.onVolumeChange.onVolumeChangeCapture.onWaiting.onWaitingCapture.onAuxClick.onAuxClickCapture.onClick.onClickCapture.onContextMenu.onContextMenuCapture.onDoubleClick.onDoubleClickCapture.onDrag.onDragCapture.onDragEnd.onDragEndCapture.onDragEnter.onDragEnterCapture.onDragExit.onDragExitCapture.onDragLeave.onDragLeaveCapture.onDragOver.onDragOverCapture.onDragStart.onDragStartCapture.onDrop.onDropCapture.onMouseDown.onMouseDownCapture.onMouseEnter.onMouseLeave.onMouseMove.onMouseMoveCapture.onMouseOut.onMouseOutCapture.onMouseOver.onMouseOverCapture.onMouseUp.onMouseUpCapture.onSelect.onSelectCapture.onTouchCancel.onTouchCancelCapture.onTouchEnd.onTouchEndCapture.onTouchMove.onTouchMoveCapture.onTouchStart.onTouchStartCapture.onPointerDown.onPointerDownCapture.onPointerMove.onPointerMoveCapture.onPointerUp.onPointerUpCapture.onPointerCancel.onPointerCancelCapture.onPointerEnter.onPointerEnterCapture.onPointerLeave.onPointerLeaveCapture.onPointerOver.onPointerOverCapture.onPointerOut.onPointerOutCapture.onGotPointerCapture.onGotPointerCaptureCapture.onLostPointerCapture.onLostPointerCaptureCapture.onScroll.onScrollCapture.onWheel.onWheelCapture.onAnimationStart.onAnimationStartCapture.onAnimationEnd.onAnimationEndCapture.onAnimationIteration.onAnimationIterationCapture.onTransitionEnd.onTransitionEndCapture`.split(`.`);function Wj(e){return typeof e==`string`?Fae.includes(e):!1}var Iae=new Set(`aria-activedescendant.aria-atomic.aria-autocomplete.aria-busy.aria-checked.aria-colcount.aria-colindex.aria-colspan.aria-controls.aria-current.aria-describedby.aria-details.aria-disabled.aria-errormessage.aria-expanded.aria-flowto.aria-haspopup.aria-hidden.aria-invalid.aria-keyshortcuts.aria-label.aria-labelledby.aria-level.aria-live.aria-modal.aria-multiline.aria-multiselectable.aria-orientation.aria-owns.aria-placeholder.aria-posinset.aria-pressed.aria-readonly.aria-relevant.aria-required.aria-roledescription.aria-rowcount.aria-rowindex.aria-rowspan.aria-selected.aria-setsize.aria-sort.aria-valuemax.aria-valuemin.aria-valuenow.aria-valuetext.className.color.height.id.lang.max.media.method.min.name.style.target.width.role.tabIndex.accentHeight.accumulate.additive.alignmentBaseline.allowReorder.alphabetic.amplitude.arabicForm.ascent.attributeName.attributeType.autoReverse.azimuth.baseFrequency.baselineShift.baseProfile.bbox.begin.bias.by.calcMode.capHeight.clip.clipPath.clipPathUnits.clipRule.colorInterpolation.colorInterpolationFilters.colorProfile.colorRendering.contentScriptType.contentStyleType.cursor.cx.cy.d.decelerate.descent.diffuseConstant.direction.display.divisor.dominantBaseline.dur.dx.dy.edgeMode.elevation.enableBackground.end.exponent.externalResourcesRequired.fill.fillOpacity.fillRule.filter.filterRes.filterUnits.floodColor.floodOpacity.focusable.fontFamily.fontSize.fontSizeAdjust.fontStretch.fontStyle.fontVariant.fontWeight.format.from.fx.fy.g1.g2.glyphName.glyphOrientationHorizontal.glyphOrientationVertical.glyphRef.gradientTransform.gradientUnits.hanging.horizAdvX.horizOriginX.href.ideographic.imageRendering.in2.in.intercept.k1.k2.k3.k4.k.kernelMatrix.kernelUnitLength.kerning.keyPoints.keySplines.keyTimes.lengthAdjust.letterSpacing.lightingColor.limitingConeAngle.local.markerEnd.markerHeight.markerMid.markerStart.markerUnits.markerWidth.mask.maskContentUnits.maskUnits.mathematical.mode.numOctaves.offset.opacity.operator.order.orient.orientation.origin.overflow.overlinePosition.overlineThickness.paintOrder.panose1.pathLength.patternContentUnits.patternTransform.patternUnits.pointerEvents.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.r.radius.refX.refY.renderingIntent.repeatCount.repeatDur.requiredExtensions.requiredFeatures.restart.result.rotate.rx.ry.seed.shapeRendering.slope.spacing.specularConstant.specularExponent.speed.spreadMethod.startOffset.stdDeviation.stemh.stemv.stitchTiles.stopColor.stopOpacity.strikethroughPosition.strikethroughThickness.string.stroke.strokeDasharray.strokeDashoffset.strokeLinecap.strokeLinejoin.strokeMiterlimit.strokeOpacity.strokeWidth.surfaceScale.systemLanguage.tableValues.targetX.targetY.textAnchor.textDecoration.textLength.textRendering.to.transform.u1.u2.underlinePosition.underlineThickness.unicode.unicodeBidi.unicodeRange.unitsPerEm.vAlphabetic.values.vectorEffect.version.vertAdvY.vertOriginX.vertOriginY.vHanging.vIdeographic.viewTarget.visibility.vMathematical.widths.wordSpacing.writingMode.x1.x2.x.xChannelSelector.xHeight.xlinkActuate.xlinkArcrole.xlinkHref.xlinkRole.xlinkShow.xlinkTitle.xlinkType.xmlBase.xmlLang.xmlns.xmlnsXlink.xmlSpace.y1.y2.y.yChannelSelector.z.zoomAndPan.ref.key.angle`.split(`.`));function Gj(e){return typeof e==`string`?Iae.has(e):!1}function Kj(e){return typeof e==`string`&&e.startsWith(`data-`)}function qj(e){if(typeof e!=`object`||!e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Gj(n)||Kj(n))&&(t[n]=e[n]);return t}function Lae(e){if(e==null)return null;if((0,t.isValidElement)(e)&&typeof e.props==`object`&&e.props!==null){var n=e.props;return qj(n)}return typeof e==`object`&&!Array.isArray(e)?qj(e):null}function Jj(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Gj(n)||Kj(n)||Wj(n))&&(t[n]=e[n]);return t}oo();var Rae=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function Yj(){return Yj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yj.apply(null,arguments)}function zae(e,t){if(e==null)return{};var n,r,i=Bae(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Bae(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Vae=(0,t.forwardRef)((e,n)=>{var{children:r,width:i,height:a,viewBox:o,className:s,style:c,title:l,desc:u}=e,d=zae(e,Rae),f=o||{width:i,height:a,x:0,y:0},p=ao(`recharts-surface`,s);return t.createElement(`svg`,Yj({},Jj(d),{className:p,width:i,height:a,style:c,viewBox:`${f.x} ${f.y} ${f.width} ${f.height}`,ref:n}),t.createElement(`title`,null,l),t.createElement(`desc`,null,u),r)}),Hae=(0,t.createContext)(null),Uae=()=>(0,t.useContext)(Hae);function Xj(e){return function(){return e}}var Zj=Math.cos,Qj=Math.sin,$j=Math.sqrt,eM=Math.PI;eM/2;var tM=2*eM,nM=Math.PI,rM=2*nM,iM=1e-6,Wae=rM-iM;function aM(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Gae(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return aM;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var oM=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?aM:Gae(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>iM)if(!(Math.abs(u*s-c*l)>iM)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((nM-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>iM&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>iM||Math.abs(this._y1-l)>iM)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%rM+rM),d>Wae?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>iM&&this._append`A${n},${n},0,${+(d>=nM)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function Kae(){return new oM}Kae.prototype=oM.prototype;function sM(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new oM(t)}Array.prototype.slice;function cM(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function lM(e){this._context=e}lM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function uM(e){return new lM(e)}function dM(e){return e[0]}function fM(e){return e[1]}function pM(e,t){var n=Xj(!0),r=null,i=uM,a=null,o=sM(s);e=typeof e==`function`?e:e===void 0?dM:Xj(e),t=typeof t==`function`?t:t===void 0?fM:Xj(t);function s(s){var c,l=(s=cM(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:Xj(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:Xj(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:Xj(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function mM(e,t,n){var r=null,i=Xj(!0),a=null,o=uM,s=null,c=sM(l);e=typeof e==`function`?e:e===void 0?dM:Xj(+e),t=typeof t==`function`?t:Xj(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?fM:Xj(+n);function l(l){var u,d,f,p=(l=cM(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h)if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return pM().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:Xj(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:Xj(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:Xj(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:Xj(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:Xj(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:Xj(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:Xj(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var hM=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function qae(e){return new hM(e,!0)}function Jae(e){return new hM(e,!1)}var gM={draw(e,t){let n=$j(t/eM);e.moveTo(n,0),e.arc(0,0,n,0,tM)}},Yae={draw(e,t){let n=$j(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},_M=$j(1/3),Xae=_M*2,Zae={draw(e,t){let n=$j(t/Xae),r=n*_M;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Qae={draw(e,t){let n=$j(t),r=-n/2;e.rect(r,r,n,n)}},$ae=.8908130915292852,vM=Qj(eM/10)/Qj(7*eM/10),eoe=Qj(tM/10)*vM,toe=-Zj(tM/10)*vM,noe={draw(e,t){let n=$j(t*$ae),r=eoe*n,i=toe*n;e.moveTo(0,-n),e.lineTo(r,i);for(let t=1;t<5;++t){let a=tM*t/5,o=Zj(a),s=Qj(a);e.lineTo(s*n,-o*n),e.lineTo(o*r-s*i,s*r+o*i)}e.closePath()}},yM=$j(3),roe={draw(e,t){let n=-$j(t/(yM*3));e.moveTo(0,n*2),e.lineTo(-yM*n,-n),e.lineTo(yM*n,-n),e.closePath()}},bM=-.5,xM=$j(3)/2,SM=1/$j(12),ioe=(SM/2+1)*3,aoe={draw(e,t){let n=$j(t/ioe),r=n/2,i=n*SM,a=r,o=n*SM+n,s=-a,c=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,c),e.lineTo(bM*r-xM*i,xM*r+bM*i),e.lineTo(bM*a-xM*o,xM*a+bM*o),e.lineTo(bM*s-xM*c,xM*s+bM*c),e.lineTo(bM*r+xM*i,bM*i-xM*r),e.lineTo(bM*a+xM*o,bM*o-xM*a),e.lineTo(bM*s+xM*c,bM*c-xM*s),e.closePath()}};function ooe(e,t){let n=null,r=sM(i);e=typeof e==`function`?e:Xj(e||gM),t=typeof t==`function`?t:Xj(t===void 0?64:+t);function i(){let i;if(n||=i=r(),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+``||null}return i.type=function(t){return arguments.length?(e=typeof t==`function`?t:Xj(t),i):e},i.size=function(e){return arguments.length?(t=typeof e==`function`?e:Xj(+e),i):t},i.context=function(e){return arguments.length?(n=e??null,i):n},i}function CM(){}function wM(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function TM(e){this._context=e}TM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:wM(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:wM(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function soe(e){return new TM(e)}function EM(e){this._context=e}EM.prototype={areaStart:CM,areaEnd:CM,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:wM(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function coe(e){return new EM(e)}function DM(e){this._context=e}DM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:wM(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function loe(e){return new DM(e)}function OM(e){this._context=e}OM.prototype={areaStart:CM,areaEnd:CM,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function uoe(e){return new OM(e)}function kM(e){return e<0?-1:1}function AM(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(kM(a)+kM(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function jM(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function MM(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function NM(e){this._context=e}NM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:MM(this,this._t0,jM(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,MM(this,jM(this,n=AM(this,e,t)),n);break;default:MM(this,this._t0,n=AM(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function PM(e){this._context=new FM(e)}(PM.prototype=Object.create(NM.prototype)).point=function(e,t){NM.prototype.point.call(this,t,e)};function FM(e){this._context=e}FM.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function doe(e){return new NM(e)}function foe(e){return new PM(e)}function IM(e){this._context=e}IM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=LM(e),i=LM(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function LM(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function poe(e){return new IM(e)}function RM(e,t){this._context=e,this._t=t}RM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function moe(e){return new RM(e,.5)}function hoe(e){return new RM(e,0)}function goe(e){return new RM(e,1)}function zM(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function BM(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function VM(e,t){return e[t]}function HM(e){let t=[];return t.key=e,t}function UM(){var e=Xj([]),t=BM,n=zM,r=VM;function i(i){var a=Array.from(e.apply(this,arguments),HM),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=cM(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:Xj(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:Xj(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?BM:typeof e==`function`?e:Xj(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??zM,i):n},i}function WM(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}zM(e,t)}}function GM(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}zM(e,t)}}function KM(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=(d-(u[r-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]],h=m[r][1]||0,g=m[r-1][1]||0;f+=h-g}c+=d,l+=f*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,zM(e,t)}}var qM=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return e===`__proto__`}e.isUnsafeProperty=t})),JM=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e.includes(`.`)||e.includes(`[`)||e.includes(`]`)}}e.isDeepKey=t})),YM=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}e.toKey=t})),XM=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(t).join(`,`);let n=String(e);return n===`0`&&Object.is(Number(e),-0)?`-0`:n}e.toString=t})),ZM=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=XM(),n=YM();function r(e){if(Array.isArray(e))return e.map(n.toKey);if(typeof e==`symbol`)return[e];e=t.toString(e);let r=[],i=e.length;if(i===0)return r;let a=0,o=``,s=``,c=!1;for(e.charCodeAt(0)===46&&(r.push(``),a++);a<i;){let t=e[a];s?t===`\\`&&a+1<i?(a++,o+=e[a]):t===s?s=``:o+=t:c?t===`"`||t===`'`?s=t:t===`]`?(c=!1,r.push(o),o=``):o+=t:t===`[`?(c=!0,o&&=(r.push(o),``)):t===`.`?o&&=(r.push(o),``):o+=t,a++}return o&&r.push(o),r}e.toPath=r})),QM=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=qM(),n=JM(),r=YM(),i=ZM();function a(e,s,c){if(e==null)return c;switch(typeof s){case`string`:{if(t.isUnsafeProperty(s))return c;let r=e[s];return r===void 0?n.isDeepKey(s)?a(e,i.toPath(s),c):c:r}case`number`:case`symbol`:{typeof s==`number`&&(s=r.toKey(s));let t=e[s];return t===void 0?c:t}default:{if(Array.isArray(s))return o(e,s,c);if(s=Object.is(s?.valueOf(),-0)?`-0`:String(s),t.isUnsafeProperty(s))return c;let n=e[s];return n===void 0?c:n}}}function o(e,n,r){if(n.length===0)return r;let i=e;for(let e=0;e<n.length;e++){if(i==null||t.isUnsafeProperty(n[e]))return r;i=i[n[e]]}return i===void 0?r:i}e.get=a})),$M=h(((e,t)=>{t.exports=QM().get})),eN=4;function tN(e){var t=10**(arguments.length>1&&arguments[1]!==void 0?arguments[1]:eN),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function nN(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.reduce((e,t,r)=>{var i=n[r-1];return typeof i==`string`?e+i+t:i===void 0?e+t:e+tN(i)+t},``)}var rN=v($M()),iN=e=>e===0?0:e>0?1:-1,aN=e=>typeof e==`number`&&e!=+e,oN=e=>typeof e==`string`&&e.indexOf(`%`)===e.length-1,sN=e=>(typeof e==`number`||e instanceof Number)&&!aN(e),cN=e=>sN(e)||typeof e==`string`,lN=0,uN=e=>{var t=++lN;return`${e||``}${t}`},dN=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!sN(e)&&typeof e!=`string`)return n;var i;if(oN(e)){if(t==null)return n;var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return aN(i)&&(i=n),r&&t!=null&&i>t&&(i=t),i},fN=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function pN(e,t,n){return sN(e)&&sN(t)?tN(e+n*(t-e)):t}function mN(e,t,n){if(!(!e||!e.length))return e.find(e=>e&&(typeof t==`function`?t(e):(0,rN.default)(e,t))===n)}var hN=e=>e==null,gN=e=>hN(e)?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function _N(e){return e!=null}function vN(){}oo();var yN=[`type`,`size`,`sizeType`];function bN(){return bN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bN.apply(null,arguments)}function xN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function SN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?xN(Object(n),!0).forEach(function(t){CN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function CN(e,t,n){return(t=wN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wN(e){var t=TN(e,`string`);return typeof t==`symbol`?t:t+``}function TN(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function EN(e,t){if(e==null)return{};var n,r,i=DN(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function DN(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var ON={symbolCircle:gM,symbolCross:Yae,symbolDiamond:Zae,symbolSquare:Qae,symbolStar:noe,symbolTriangle:roe,symbolWye:aoe},kN=Math.PI/180,AN=e=>ON[`symbol${gN(e)}`]||gM,jN=(e,t,n)=>{if(t===`area`)return e;switch(n){case`cross`:return 5*e*e/9;case`diamond`:return .5*e*e/Math.sqrt(3);case`square`:return e*e;case`star`:var r=18*kN;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**2);case`triangle`:return Math.sqrt(3)*e*e/4;case`wye`:return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},MN=(e,t)=>{ON[`symbol${gN(e)}`]=t},NN=e=>{var{type:n=`circle`,size:r=64,sizeType:i=`area`}=e,a=SN(SN({},EN(e,yN)),{},{type:n,size:r,sizeType:i}),o=`circle`;typeof n==`string`&&(o=n);var s=()=>{var e=AN(o),t=ooe().type(e).size(jN(r,i,o))();if(t!==null)return t},{className:c,cx:l,cy:u}=a,d=Jj(a);return sN(l)&&sN(u)&&sN(r)?t.createElement(`path`,bN({},d,{className:ao(`recharts-symbols`,c),transform:`translate(${l}, ${u})`,d:s()})):null};NN.registerSymbol=MN;var PN=e=>`radius`in e&&`startAngle`in e&&`endAngle`in e,FN=(e,n)=>{if(!e||typeof e==`function`||typeof e==`boolean`)return null;var r=e;if((0,t.isValidElement)(e)&&(r=e.props),typeof r!=`object`&&typeof r!=`function`)return null;var i={};return Object.keys(r).forEach(e=>{Wj(e)&&typeof r[e]==`function`&&(i[e]=n||(t=>r[e](r,t)))}),i},IN=(e,t,n)=>r=>(e(t,n,r),null),LN=(e,t,n)=>{if(e===null||typeof e!=`object`&&typeof e!=`function`)return null;var r=null;return Object.keys(e).forEach(i=>{var a=e[i];Wj(i)&&typeof a==`function`&&(r||={},r[i]=IN(a,t,n))}),r};function RN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?RN(Object(n),!0).forEach(function(t){BN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function BN(e,t,n){return(t=VN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VN(e){var t=HN(e,`string`);return typeof t==`symbol`?t:t+``}function HN(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function UN(e,t){var n=zN({},e),r=t;return Object.keys(t).reduce((e,t)=>(e[t]===void 0&&r[t]!==void 0&&(e[t]=r[t]),e),n)}oo();function WN(){return WN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},WN.apply(null,arguments)}function GN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function KN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?GN(Object(n),!0).forEach(function(t){qN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function qN(e,t,n){return(t=JN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JN(e){var t=YN(e,`string`);return typeof t==`symbol`?t:t+``}function YN(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var XN=32,ZN={align:`center`,iconSize:14,inactiveColor:`#ccc`,layout:`horizontal`,verticalAlign:`middle`,labelStyle:{}};function QN(e){if(typeof e==`object`&&e&&`strokeDasharray`in e)return String(e.strokeDasharray)}function $N(e){var{data:n,iconType:r,inactiveColor:i}=e,a=XN/2,o=XN/6,s=XN/3,c=n.inactive?i:n.color,l=r??n.type;if(l===`none`)return null;if(l===`plainline`)return t.createElement(`line`,{strokeWidth:4,fill:`none`,stroke:c,strokeDasharray:QN(n.payload),x1:0,y1:a,x2:XN,y2:a,className:`recharts-legend-icon`});if(l===`line`)return t.createElement(`path`,{strokeWidth:4,fill:`none`,stroke:c,d:`M0,${a}h${s}
11
+ A${o},${o},0,1,1,${2*s},${a}
12
+ H${XN}M${2*s},${a}
13
+ A${o},${o},0,1,1,${s},${a}`,className:`recharts-legend-icon`});if(l===`rect`)return t.createElement(`path`,{stroke:`none`,fill:c,d:`M0,${XN/8}h${XN}v${XN*3/4}h${-XN}z`,className:`recharts-legend-icon`});if(t.isValidElement(n.legendIcon)){var u=KN({},n);return delete u.legendIcon,t.cloneElement(n.legendIcon,u)}return t.createElement(NN,{fill:c,cx:a,cy:a,size:XN,sizeType:`diameter`,type:l})}function eP(e){var{payload:n,iconSize:r,layout:i,formatter:a,inactiveColor:o,iconType:s,labelStyle:c}=e,l={x:0,y:0,width:XN,height:XN},u={display:i===`horizontal`?`inline-block`:`block`,marginRight:10},d={display:`inline-block`,verticalAlign:`middle`,marginRight:4};return n.map((n,i)=>{var f=n.formatter||a,p=ao({"recharts-legend-item":!0,[`legend-item-${i}`]:!0,inactive:n.inactive});if(n.type===`none`)return null;var m=typeof c==`object`?KN({},c):{};m.color=n.inactive?o:m.color||n.color;var h=f?f(n.value,n,i):n.value;return t.createElement(`li`,WN({className:p,style:u,key:`legend-item-${i}`},LN(e,n,i)),t.createElement(Vae,{width:r,height:r,viewBox:l,style:d,"aria-label":`${n.value} legend icon`},t.createElement($N,{data:n,iconType:s,inactiveColor:o})),t.createElement(`span`,{className:`recharts-legend-item-text`,style:m},h))})}var tP=e=>{var n=UN(e,ZN),{payload:r,layout:i,align:a}=n;if(!r||!r.length)return null;var o={padding:0,margin:0,textAlign:i===`horizontal`?a:`left`};return t.createElement(`ul`,{className:`recharts-default-legend`,style:o},t.createElement(eP,WN({},n,{payload:r})))},nP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t){let n=new Map;for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r,e);n.has(a)||n.set(a,i)}return Array.from(n.values())}e.uniqBy=t})),rP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}e.ary=t})),iP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return e}e.identity=t})),aP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return Number.isSafeInteger(e)&&e>=0}e.isLength=t})),oP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=aP();function n(e){return e!=null&&typeof e!=`function`&&t.isLength(e.length)}e.isArrayLike=n})),sP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return typeof e==`object`&&!!e}e.isObjectLike=t})),cP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=oP(),n=sP();function r(e){return n.isObjectLike(e)&&t.isArrayLike(e)}e.isArrayLikeObject=r})),lP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=QM();function n(e){return function(n){return t.get(n,e)}}e.property=n})),uP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}e.isObject=t})),dP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return e==null||typeof e!=`object`&&typeof e!=`function`}e.isPrimitive=t})),fP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}e.isEqualsSameValueZero=t})),pP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=uP(),n=dP(),r=fP();function i(e,t,n){return typeof n==`function`?a(e,t,function e(t,r,i,o,s,c){let l=n(t,r,i,o,s,c);return l===void 0?a(t,r,e,c):!!l},new Map):i(e,t,()=>void 0)}function a(e,n,i,s){if(n===e)return!0;switch(typeof n){case`object`:return o(e,n,i,s);case`function`:return Object.keys(n).length>0?a(e,{...n},i,s):r.isEqualsSameValueZero(e,n);default:return t.isObject(e)?typeof n==`string`?n===``:!0:r.isEqualsSameValueZero(e,n)}}function o(e,t,r,i){if(t==null)return!0;if(Array.isArray(t))return c(e,t,r,i);if(t instanceof Map)return s(e,t,r,i);if(t instanceof Set)return l(e,t,r,i);let a=Object.keys(t);if(e==null||n.isPrimitive(e))return a.length===0;if(a.length===0)return!0;if(i?.has(t))return i.get(t)===e;i?.set(t,e);try{for(let o=0;o<a.length;o++){let s=a[o];if(!n.isPrimitive(e)&&!(s in e)||t[s]===void 0&&e[s]!==void 0||t[s]===null&&e[s]!==null||!r(e[s],t[s],s,e,t,i))return!1}return!0}finally{i?.delete(t)}}function s(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[i,a]of t.entries())if(n(e.get(i),a,i,e,t,r)===!1)return!1;return!0}function c(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let a=0;a<t.length;a++){let o=t[a],s=!1;for(let c=0;c<e.length;c++){if(i.has(c))continue;let l=e[c],u=!1;if(n(l,o,a,e,t,r)&&(u=!0),u){i.add(c),s=!0;break}}if(!s)return!1}return!0}function l(e,t,n,r){return t.size===0?!0:e instanceof Set?c([...e],[...t],n,r):!1}e.isMatchWith=i,e.isSetMatch=l})),mP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=pP();function n(e,n){return t.isMatchWith(e,n,()=>void 0)}e.isMatch=n})),hP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}e.getSymbols=t})),gP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}e.getTag=t})),_P=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),e.argumentsTag=`[object Arguments]`,e.arrayBufferTag=`[object ArrayBuffer]`,e.arrayTag=`[object Array]`,e.bigInt64ArrayTag=`[object BigInt64Array]`,e.bigUint64ArrayTag=`[object BigUint64Array]`,e.booleanTag=`[object Boolean]`,e.dataViewTag=`[object DataView]`,e.dateTag=`[object Date]`,e.errorTag=`[object Error]`,e.float32ArrayTag=`[object Float32Array]`,e.float64ArrayTag=`[object Float64Array]`,e.functionTag=`[object Function]`,e.int16ArrayTag=`[object Int16Array]`,e.int32ArrayTag=`[object Int32Array]`,e.int8ArrayTag=`[object Int8Array]`,e.mapTag=`[object Map]`,e.numberTag=`[object Number]`,e.objectTag=`[object Object]`,e.regexpTag=`[object RegExp]`,e.setTag=`[object Set]`,e.stringTag=`[object String]`,e.symbolTag=`[object Symbol]`,e.uint16ArrayTag=`[object Uint16Array]`,e.uint32ArrayTag=`[object Uint32Array]`,e.uint8ArrayTag=`[object Uint8Array]`,e.uint8ClampedArrayTag=`[object Uint8ClampedArray]`})),vP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),e.globalThis=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})()||Function(`return this`)()})),yP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=vP();function n(e){return t.globalThis.Buffer!==void 0&&t.globalThis.Buffer.isBuffer(e)}e.isBuffer=n})),bP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}e.isTypedArray=t})),xP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=hP(),n=gP(),r=_P(),i=yP(),a=dP(),o=bP();function s(e,t){return c(e,void 0,e,new Map,t)}function c(e,t,n,r=new Map,s=void 0){let d=s?.(e,t,n,r);if(d!==void 0)return d;if(a.isPrimitive(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let i=0;i<e.length;i++)t[i]=c(e[i],i,n,r,s);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[i,a]of e)t.set(i,c(a,i,n,r,s));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let i of e)t.add(c(i,void 0,n,r,s));return t}if(i.isBuffer(e))return e.subarray();if(o.isTypedArray(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let i=0;i<e.length;i++)t[i]=c(e[i],i,n,r,s);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),l(t,e,n,r,s),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),l(t,e,n,r,s),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),l(t,e,n,r,s),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,l(t,e,n,r,s),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),l(t,e,n,r,s),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),l(t,e,n,r,s),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),l(t,e,n,r,s),t}if(typeof e==`object`&&u(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),l(t,e,n,r,s),t}return e}function l(e,n,r=e,i,a){let o=[...Object.keys(n),...t.getSymbols(n)];for(let t=0;t<o.length;t++){let s=o[t],l=Object.getOwnPropertyDescriptor(e,s);(l==null||l.writable)&&(e[s]=c(n[s],s,r,i,a))}}function u(e){switch(n.getTag(e)){case r.argumentsTag:case r.arrayTag:case r.arrayBufferTag:case r.dataViewTag:case r.booleanTag:case r.dateTag:case r.float32ArrayTag:case r.float64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.mapTag:case r.numberTag:case r.objectTag:case r.regexpTag:case r.setTag:case r.stringTag:case r.symbolTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=s,e.cloneDeepWithImpl=c,e.copyProperties=l})),SP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=xP();function n(e){return t.cloneDeepWithImpl(e,void 0,e,new Map,void 0)}e.cloneDeep=n})),CP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=mP(),n=SP();function r(e){return e=n.cloneDeep(e),n=>t.isMatch(n,e)}e.matches=r})),wP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=xP(),n=gP(),r=_P();function i(e,i){return t.cloneDeepWith(e,(a,o,s,c)=>{let l=i?.(a,o,s,c);if(l!==void 0)return l;if(typeof e==`object`){if(n.getTag(e)===r.objectTag&&typeof e.constructor!=`function`){let n={};return c.set(e,n),t.copyProperties(n,e,s,c),n}switch(Object.prototype.toString.call(e)){case r.numberTag:case r.stringTag:case r.booleanTag:{let n=new e.constructor(e?.valueOf());return t.copyProperties(n,e),n}case r.argumentsTag:{let n={};return t.copyProperties(n,e),n.length=e.length,n[Symbol.iterator]=e[Symbol.iterator],n}default:return}}})}e.cloneDeepWith=i})),TP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=wP();function n(e){return t.cloneDeepWith(e)}e.cloneDeep=n})),EP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=/^(?:0|[1-9]\d*)$/;function n(e,n=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<n;case`symbol`:return!1;case`string`:return t.test(e)}}e.isIndex=n})),DP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=gP();function n(e){return typeof e==`object`&&!!e&&t.getTag(e)===`[object Arguments]`}e.isArguments=n})),OP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=JM(),n=EP(),r=DP(),i=ZM();function a(e,a){let o;if(o=Array.isArray(a)?a:typeof a==`string`&&t.isDeepKey(a)&&e?.[a]==null?i.toPath(a):[a],o.length===0)return!1;let s=e;for(let e=0;e<o.length;e++){let t=o[e];if((s==null||!Object.hasOwn(s,t))&&!((Array.isArray(s)||r.isArguments(s))&&n.isIndex(t)&&t<s.length))return!1;s=s[t]}return!0}e.has=a})),kP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=mP(),n=YM(),r=TP(),i=QM(),a=OP();function o(e,o){switch(typeof e){case`object`:Object.is(e?.valueOf(),-0)&&(e=`-0`);break;case`number`:e=n.toKey(e);break}return o=r.cloneDeep(o),function(n){let r=i.get(n,e);return r===void 0?a.has(n,e):o===void 0?r===void 0:t.isMatch(r,o)}}e.matchesProperty=o})),AP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=iP(),n=lP(),r=CP(),i=kP();function a(e){if(e==null)return t.identity;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?i.matchesProperty(e[0],e[1]):r.matches(e);case`string`:case`symbol`:case`number`:return n.property(e)}}e.iteratee=a})),jP=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=nP(),n=rP(),r=iP(),i=cP(),a=AP();function o(e,o=r.identity){return i.isArrayLikeObject(e)?t.uniqBy(Array.from(e),n.ary(a.iteratee(o),1)):[]}e.uniqBy=o})),MP=v(h(((e,t)=>{t.exports=jP().uniqBy}))());function NP(e,t,n){return t===!0?(0,MP.default)(e,n):typeof t==`function`?(0,MP.default)(e,t):e}var PP=(0,t.createContext)(null),FP=e=>e,IP=()=>{var e=(0,t.useContext)(PP);return e?e.store.dispatch:FP},LP=()=>{},RP=()=>LP,zP=(e,t)=>e===t;function BP(e){var n=(0,t.useContext)(PP),r=(0,t.useMemo)(()=>n?t=>{if(t!=null)return e(t)}:LP,[n,e]);return(0,a.useSyncExternalStoreWithSelector)(n?n.subscription.addNestedSub:RP,n?n.store.getState:LP,n?n.store.getState:LP,r,zP)}var VP=(e,t,n)=>{if(t.length===1&&t[0]===n){let t=!1;try{let n={};e(n)===n&&(t=!0)}catch{}if(t){let e;try{throw Error()}catch(t){({stack:e}=t)}console.warn(`The result function returned its own inputs without modification. e.g
14
+ \`createSelector([state => state.todos], todos => todos)\`
15
+ This could lead to inefficient memoization and unnecessary re-renders.
16
+ Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:e})}}},HP=(e,t,n)=>{let{memoize:r,memoizeOptions:i}=t,{inputSelectorResults:a,inputSelectorResultsCopy:o}=e,s=r(()=>({}),...i);if(s.apply(null,a)!==s.apply(null,o)){let e;try{throw Error()}catch(t){({stack:e}=t)}console.warn(`An input selector returned a different result when passed same arguments.
17
+ This means your output selector will likely run more frequently than intended.
18
+ Avoid returning a new reference inside your input selector, e.g.
19
+ \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:a,secondInputs:o,stack:e})}},UP={inputStabilityCheck:`once`,identityFunctionCheck:`once`};function WP(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function GP(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!=`object`)throw TypeError(t)}function KP(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var qP=e=>Array.isArray(e)?e:[e];function JP(e){let t=Array.isArray(e[0])?e[0]:e;return KP(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function YP(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var XP=(e,t)=>{let{identityFunctionCheck:n,inputStabilityCheck:r}={...UP,...t};return{identityFunctionCheck:{shouldRun:n===`always`||n===`once`&&e,run:VP},inputStabilityCheck:{shouldRun:r===`always`||r===`once`&&e,run:HP}}},ZP=class{constructor(e){this.value=e}deref(){return this.value}},QP=typeof WeakRef<`u`?WeakRef:ZP,$P=0,eF=1;function tF(){return{s:$P,v:void 0,o:null,p:null}}function nF(e,t={}){let n=tF(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e<n;e++){let n=arguments[e];if(typeof n==`function`||typeof n==`object`&&n){let e=t.o;e===null&&(t.o=e=new WeakMap);let r=e.get(n);r===void 0?(t=tF(),e.set(n,t)):t=r}else{let e=t.p;e===null&&(t.p=e=new Map);let r=e.get(n);r===void 0?(t=tF(),e.set(n,t)):t=r}}let s=t,c;if(t.s===eF)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=i?.deref?.()??i;e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new QP(c):c}return s.s=eF,s.v=c,c}return o.clearCache=()=>{n=tF(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function rF(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),WP(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=nF,argsMemoizeOptions:u=[],devModeChecks:d={}}={...n,...a},f=qP(c),p=qP(u),m=JP(e),h=s(function(){return t++,o.apply(null,arguments)},...f),g=!0,_=l(function(){r++;let e=YP(m,arguments);if(i=h.apply(null,e),process.env.NODE_ENV!==`production`){let{identityFunctionCheck:t,inputStabilityCheck:n}=XP(g,d);if(t.shouldRun&&t.run(o,e,i),n.shouldRun){let t=YP(m,arguments);n.run({inputSelectorResults:e,inputSelectorResultsCopy:t},{memoize:s,memoizeOptions:f},arguments)}g&&=!1}return i},...p);return Object.assign(_,{resultFunc:o,memoizedResultFunc:h,dependencies:m,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var $=rF(nF),iF=Object.assign((e,t=$)=>{GP(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let n=Object.keys(e);return t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,r)=>(e[n[r]]=t,e),{}))},{withTypes:()=>iF}),aF=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return typeof e==`symbol`?1:e===null?2:e===void 0?3:e===e?0:4}e.compareValues=(e,n,r)=>{if(e!==n){let i=t(e),a=t(n);if(i===a&&i===0){if(e<n)return r===`desc`?1:-1;if(e>n)return r===`desc`?-1:1}return r===`desc`?a-i:i-a}return 0}})),oF=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){return typeof e==`symbol`||e instanceof Symbol}e.isSymbol=t})),sF=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=oF(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(e,i){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||t.isSymbol(e)?!0:typeof e==`string`&&(r.test(e)||!n.test(e))||i!=null&&Object.hasOwn(i,e)}e.isKey=i})),cF=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=aF(),n=sF(),r=ZM();function i(e,i,a,o){if(e==null)return[];a=o?void 0:a,Array.isArray(e)||(e=Object.values(e)),Array.isArray(i)||(i=i==null?[null]:[i]),i.length===0&&(i=[null]),Array.isArray(a)||(a=a==null?[]:[a]),a=a.map(e=>String(e));let s=(e,t)=>{let n=e;for(let e=0;e<t.length&&n!=null;++e)n=n[t[e]];return n},c=(e,t)=>t==null||e==null?t:typeof e==`object`&&`key`in e?Object.hasOwn(t,e.key)?t[e.key]:s(t,e.path):typeof e==`function`?e(t):Array.isArray(e)?s(t,e):typeof t==`object`?t[e]:t,l=i.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||n.isKey(e)?e:{key:e,path:r.toPath(e)}));return e.map(e=>({original:e,criteria:l.map(t=>c(t,e))})).slice().sort((e,n)=>{for(let r=0;r<l.length;r++){let i=t.compareValues(e.criteria[r],n.criteria[r],a[r]);if(i!==0)return i}return 0}).map(e=>e.original)}e.orderBy=i})),lF=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t=1){let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a<e.length;a++){let o=e[a];Array.isArray(o)&&t<r?i(o,t+1):n.push(o)}};return i(e,0),n}e.flatten=t})),uF=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=EP(),n=oP(),r=uP(),i=fP();function a(e,a,o){return r.isObject(o)&&(typeof a==`number`&&n.isArrayLike(o)&&t.isIndex(a)&&a<o.length||typeof a==`string`&&a in o)?i.isEqualsSameValueZero(o[a],e):!1}e.isIterateeCall=a})),dF=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=cF(),n=lF(),r=uF();function i(e,...i){let a=i.length;return a>1&&r.isIterateeCall(e,i[0],i[1])?i=[]:a>2&&r.isIterateeCall(i[0],i[1],i[2])&&(i=[i[0]]),t.orderBy(e,n.flatten(i),[`asc`])}e.sortBy=i})),fF=v(h(((e,t)=>{t.exports=dF().sortBy}))()),pF=e=>e.legend.settings,mF=e=>e.legend.size,hF=$([e=>e.legend.payload,pF],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?(0,fF.default)(r,n):r});function gF(){return BP(hF)}var _F=1;function vF(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[n,r]=(0,t.useState)({height:0,left:0,top:0,width:0});return[n,(0,t.useCallback)(e=>{if(e!=null){var t=e.getBoundingClientRect(),i={height:t.height,left:t.left,top:t.top,width:t.width};(Math.abs(i.height-n.height)>_F||Math.abs(i.left-n.left)>_F||Math.abs(i.top-n.top)>_F||Math.abs(i.width-n.width)>_F)&&r({height:i.height,left:i.left,top:i.top,width:i.width})}},[n.width,n.height,n.top,n.left,...e])]}typeof Symbol==`function`&&Symbol.observable;var yF=()=>Math.random().toString(36).substring(7).split(``).join(`.`);`${yF()}`,`${yF()}`;function bF(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function xF(e){return bF(e)&&`type`in e&&typeof e.type==`string`}var SF=Symbol.for(`immer-nothing`),CF=Symbol.for(`immer-draftable`),wF=Symbol.for(`immer-state`),TF=process.env.NODE_ENV===`production`?[]:[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},`This object has been frozen and should not be mutated`,function(e){return`Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? `+e},`An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.`,`Immer forbids circular references`,"The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},`Object.defineProperty() cannot be used on an Immer draft`,`Object.setPrototypeOf() cannot be used on an Immer draft`,`Immer only supports deleting array indices`,`Immer only supports setting array indices and the 'length' property`,function(e){return`'original' expects a draft, got: ${e}`}];function EF(e,...t){if(process.env.NODE_ENV!==`production`){let n=TF[e],r=XF(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var DF=Object,OF=DF.getPrototypeOf,kF=`constructor`,AF=`prototype`,jF=`configurable`,MF=`enumerable`,NF=`writable`,PF=`value`,FF=e=>!!e&&!!e[wF];function IF(e){return e?zF(e)||KF(e)||!!e[CF]||!!e[kF]?.[CF]||qF(e)||JF(e):!1}var LF=DF[AF][kF].toString(),RF=new WeakMap;function zF(e){if(!e||!YF(e))return!1;let t=OF(e);if(t===null||t===DF[AF])return!0;let n=DF.hasOwnProperty.call(t,kF)&&t[kF];if(n===Object)return!0;if(!XF(n))return!1;let r=RF.get(n);return r===void 0&&(r=Function.toString.call(n),RF.set(n,r)),r===LF}function BF(e,t,n=!0){VF(e)===0?(n?Reflect.ownKeys(e):DF.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function VF(e){let t=e[wF];return t?t.type_:KF(e)?1:qF(e)?2:JF(e)?3:0}var HF=(e,t,n=VF(e))=>n===2?e.has(t):DF[AF].hasOwnProperty.call(e,t),UF=(e,t,n=VF(e))=>n===2?e.get(t):e[t],WF=(e,t,n,r=VF(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function GF(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var KF=Array.isArray,qF=e=>e instanceof Map,JF=e=>e instanceof Set,YF=e=>typeof e==`object`,XF=e=>typeof e==`function`,ZF=e=>typeof e==`boolean`;function QF(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var $F=e=>e.copy_||e.base_,eI=e=>e.modified_?e.copy_:e.base_;function tI(e,t){if(qF(e))return new Map(e);if(JF(e))return new Set(e);if(KF(e))return Array[AF].slice.call(e);let n=zF(e);if(t===!0||t===`class_only`&&!n){let t=DF.getOwnPropertyDescriptors(e);delete t[wF];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[NF]===!1&&(a[NF]=!0,a[jF]=!0),(a.get||a.set)&&(t[i]={[jF]:!0,[NF]:!0,[MF]:a[MF],[PF]:e[i]})}return DF.create(OF(e),t)}else{let t=OF(e);if(t!==null&&n)return{...e};let r=DF.create(t);return DF.assign(r,e)}}function nI(e,t=!1){return aI(e)||FF(e)||!IF(e)?e:(VF(e)>1&&DF.defineProperties(e,{set:iI,add:iI,clear:iI,delete:iI}),DF.freeze(e),t&&BF(e,(e,t)=>{nI(t,!0)},!1),e)}function rI(){EF(2)}var iI={[PF]:rI};function aI(e){return e===null||!YF(e)?!0:DF.isFrozen(e)}var oI=`MapSet`,sI=`Patches`,cI=`ArrayMethods`,lI={};function uI(e){let t=lI[e];return t||EF(0,e),t}var dI=e=>!!lI[e],fI,pI=()=>fI,mI=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:dI(oI)?uI(oI):void 0,arrayMethodsPlugin_:dI(cI)?uI(cI):void 0});function hI(e,t){t&&(e.patchPlugin_=uI(sI),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function gI(e){_I(e),e.drafts_.forEach(yI),e.drafts_=null}function _I(e){e===fI&&(fI=e.parent_)}var vI=e=>fI=mI(fI,e);function yI(e){let t=e[wF];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function bI(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[wF].modified_&&(gI(t),EF(4)),IF(e)&&(e=xI(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[wF].base_,e,t)}else e=xI(t,n);return SI(t,e,!0),gI(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===SF?void 0:e}function xI(e,t){if(aI(t))return t;let n=t[wF];if(!n)return AI(t,e.handledSet_,e);if(!wI(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);OI(n,e)}return n.copy_}function SI(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&nI(t,n)}function CI(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var wI=(e,t)=>e.scope_===t,TI=[];function EI(e,t,n,r){let i=$F(e),a=e.type_;if(r!==void 0&&UF(i,r,a)===t){WF(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;BF(i,(e,n)=>{if(FF(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??TI;for(let e of o)WF(i,e,n,a)}function DI(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!wI(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=eI(i);EI(e,i.draft_??i,a,n),OI(i,r)})}function OI(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}CI(e)}}function kI(e,t,n){let{scope_:r}=e;if(FF(n)){let i=n[wF];wI(i,r)&&i.callbacks_.push(function(){RI(e),EI(e,n,eI(i),t)})}else IF(n)&&e.callbacks_.push(function(){let i=$F(e);e.type_===3?i.has(n)&&AI(n,r.handledSet_,r):UF(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&AI(UF(e.copy_,t,e.type_),r.handledSet_,r)})}function AI(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||FF(e)||t.has(e)||!IF(e)||aI(e)?e:(t.add(e),BF(e,(r,i)=>{if(FF(i)){let t=i[wF];wI(t,n)&&(WF(e,r,eI(t),e.type_),CI(t))}else IF(i)&&AI(i,t,n)}),e)}function jI(e,t){let n=KF(e),r={type_:+!!n,scope_:t?t.scope_:pI(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=MI;n&&(i=[r],a=NI);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var MI={get(e,t){if(t===wF)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=$F(e);if(!HF(i,t,e.type_))return FI(e,i,t);let a=i[t];if(e.finalized_||!IF(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&QF(t))return a;if(a===PI(e.base_,t)){RI(e);let n=e.type_===1?+t:t,r=BI(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in $F(e)},ownKeys(e){return Reflect.ownKeys($F(e))},set(e,t,n){let r=II($F(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=PI($F(e),t),i=r?.[wF];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(GF(n,r)&&(n!==void 0||HF(e.base_,t,e.type_)))return!0;RI(e),LI(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),kI(e,t,n),!0)},deleteProperty(e,t){return RI(e),PI(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),LI(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=$F(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[NF]:!0,[jF]:e.type_!==1||t!==`length`,[MF]:r[MF],[PF]:n[t]}},defineProperty(){EF(11)},getPrototypeOf(e){return OF(e.base_)},setPrototypeOf(){EF(12)}},NI={};for(let e in MI){let t=MI[e];NI[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}NI.deleteProperty=function(e,t){return process.env.NODE_ENV!==`production`&&isNaN(parseInt(t))&&EF(13),NI.set.call(this,e,t,void 0)},NI.set=function(e,t,n){return process.env.NODE_ENV!==`production`&&t!==`length`&&isNaN(parseInt(t))&&EF(14),MI.set.call(this,e[0],t,n,e[0])};function PI(e,t){let n=e[wF];return(n?$F(n):e)[t]}function FI(e,t,n){let r=II(t,n);return r?PF in r?r[PF]:r.get?.call(e.draft_):void 0}function II(e,t){if(!(t in e))return;let n=OF(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=OF(n)}}function LI(e){e.modified_||(e.modified_=!0,e.parent_&&LI(e.parent_))}function RI(e){e.copy_||=(e.assigned_=new Map,tI(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var zI=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(XF(e)&&!XF(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}XF(t)||EF(6),n!==void 0&&!XF(n)&&EF(7);let r;if(IF(e)){let i=vI(this),a=BI(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?gI(i):_I(i)}return hI(i,n),bI(r,i)}else if(!e||!YF(e)){if(r=t(e),r===void 0&&(r=e),r===SF&&(r=void 0),this.autoFreeze_&&nI(r,!0),n){let t=[],i=[];uI(sI).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}else EF(1,e)},this.produceWithPatches=(e,t)=>{if(XF(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},ZF(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),ZF(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),ZF(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){IF(e)||EF(8),FF(e)&&(e=VI(e));let t=vI(this),n=BI(t,e,void 0);return n[wF].isManual_=!0,_I(t),n}finishDraft(e,t){let n=e&&e[wF];(!n||!n.isManual_)&&EF(9);let{scope_:r}=n;return hI(r,t),bI(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=uI(sI).applyPatches_;return FF(e)?r(e,t):this.produce(e,e=>r(e,t))}};function BI(e,t,n,r){let[i,a]=qF(t)?uI(oI).proxyMap_(t,n):JF(t)?uI(oI).proxySet_(t,n):jI(t,n);return(n?.scope_??pI()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?DI(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function VI(e){return FF(e)||EF(10,e),HI(e)}function HI(e){if(!IF(e)||aI(e))return e;let t=e[wF],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=tI(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=tI(e,!0);return BF(n,(e,t)=>{WF(n,e,HI(t))},r),t&&(t.finalized_=!1),n}var UI=new zI().produce;typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__,typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function WI(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw Error(process.env.NODE_ENV===`production`?gL(0):`prepareAction did not return an object`);return{type:e,payload:r.payload,...`meta`in r&&{meta:r.meta},...`error`in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>xF(t)&&t.type===e,n}function GI(e){return IF(e)?UI(e,()=>{}):e}function KI(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var qI=`RTK_autoBatch`,JI=()=>e=>({payload:e,meta:{[qI]:!0}});function YI(e){let t={},n=[],r,i={addCase(e,a){if(process.env.NODE_ENV!==`production`){if(n.length>0)throw Error(process.env.NODE_ENV===`production`?gL(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw Error(process.env.NODE_ENV===`production`?gL(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}let o=typeof e==`string`?e:e.type;if(!o)throw Error(process.env.NODE_ENV===`production`?gL(28):"`builder.addCase` cannot be called with an empty action type");if(o in t)throw Error(process.env.NODE_ENV===`production`?gL(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${o}'`);return t[o]=a,i},addAsyncThunk(e,a){if(process.env.NODE_ENV!==`production`&&r)throw Error(process.env.NODE_ENV===`production`?gL(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return a.pending&&(t[e.pending.type]=a.pending),a.rejected&&(t[e.rejected.type]=a.rejected),a.fulfilled&&(t[e.fulfilled.type]=a.fulfilled),a.settled&&n.push({matcher:e.settled,reducer:a.settled}),i},addMatcher(e,t){if(process.env.NODE_ENV!==`production`&&r)throw Error(process.env.NODE_ENV===`production`?gL(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:e,reducer:t}),i},addDefaultCase(e){if(process.env.NODE_ENV!==`production`&&r)throw Error(process.env.NODE_ENV===`production`?gL(31):"`builder.addDefaultCase` can only be called once");return r=e,i}};return e(i),[t,n,r]}function XI(e){return typeof e==`function`}function ZI(e,t){if(process.env.NODE_ENV!==`production`&&typeof t==`object`)throw Error(process.env.NODE_ENV===`production`?gL(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[n,r,i]=YI(t),a;if(XI(e))a=()=>GI(e());else{let t=GI(e);a=()=>t}function o(e=a(),t){let o=[n[t.type],...r.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return o.filter(e=>!!e).length===0&&(o=[i]),o.reduce((e,n)=>{if(n)if(FF(e)){let r=n(e,t);return r===void 0?e:r}else if(IF(e))return UI(e,e=>n(e,t));else{let r=n(e,t);if(r===void 0){if(e===null)return e;throw Error(`A case reducer on a non-draftable value must not return undefined`)}return r}return e},e)}return o.getInitialState=a,o}var QI=Symbol.for(`rtk-slice-createasyncthunk`);function $I(e,t){return`${e}/${t}`}function eL({creators:e}={}){let t=e?.asyncThunk?.[QI];return function(e){let{name:n,reducerPath:r=n}=e;if(!n)throw Error(process.env.NODE_ENV===`production`?gL(11):"`name` is a required option for createSlice");typeof process<`u`&&process.env.NODE_ENV===`development`&&e.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");let i=(typeof e.reducers==`function`?e.reducers(rL()):e.reducers)||{},a=Object.keys(i),o={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){let n=typeof e==`string`?e:e.type;if(!n)throw Error(process.env.NODE_ENV===`production`?gL(12):"`context.addCase` cannot be called with an empty action type");if(n in o.sliceCaseReducersByType)throw Error(process.env.NODE_ENV===`production`?gL(13):"`context.addCase` cannot be called with two reducers for the same action type: "+n);return o.sliceCaseReducersByType[n]=t,s},addMatcher(e,t){return o.sliceMatchers.push({matcher:e,reducer:t}),s},exposeAction(e,t){return o.actionCreators[e]=t,s},exposeCaseReducer(e,t){return o.sliceCaseReducersByName[e]=t,s}};a.forEach(r=>{let a=i[r],o={reducerName:r,type:$I(n,r),createNotation:typeof e.reducers==`function`};aL(a)?sL(o,a,s,t):iL(o,a,s)});function c(){if(process.env.NODE_ENV!==`production`&&typeof e.extraReducers==`object`)throw Error(process.env.NODE_ENV===`production`?gL(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");let[t={},n=[],r=void 0]=typeof e.extraReducers==`function`?YI(e.extraReducers):[e.extraReducers],i={...t,...o.sliceCaseReducersByType};return ZI(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of o.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)})}let l=e=>e,u=new Map,d=new WeakMap,f;function p(e,t){return f||=c(),f(e,t)}function m(){return f||=c(),f.getInitialState()}function h(t,n=!1){function r(e){let i=e[t];if(i===void 0){if(n)i=KI(d,r,m);else if(process.env.NODE_ENV!==`production`)throw Error(process.env.NODE_ENV===`production`?gL(15):`selectSlice returned undefined for an uninjected slice reducer`)}return i}function i(t=l){return KI(KI(u,n,()=>new WeakMap),t,()=>{let r={};for(let[i,a]of Object.entries(e.selectors??{}))r[i]=tL(a,t,()=>KI(d,t,m),n);return r})}return{reducerPath:t,getSelectors:i,get selectors(){return i(r)},selectSlice:r}}let g={name:n,reducer:p,actions:o.actionCreators,caseReducers:o.sliceCaseReducersByName,getInitialState:m,...h(r),injectInto(e,{reducerPath:t,...n}={}){let i=t??r;return e.inject({reducerPath:i,reducer:p},n),{...g,...h(i,!0)}}};return g}}function tL(e,t,n,r){function i(i,...a){let o=t(i);if(o===void 0){if(r)o=n();else if(process.env.NODE_ENV!==`production`)throw Error(process.env.NODE_ENV===`production`?gL(16):`selectState returned undefined for an uninjected slice reducer`)}return e(o,...a)}return i.unwrapped=e,i}var nL=eL();function rL(){function e(e,t){return{_reducerDefinitionType:`asyncThunk`,payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer(e){return Object.assign({[e.name](...t){return e(...t)}}[e.name],{_reducerDefinitionType:`reducer`})},preparedReducer(e,t){return{_reducerDefinitionType:`reducerWithPrepare`,prepare:e,reducer:t}},asyncThunk:e}}function iL({type:e,reducerName:t,createNotation:n},r,i){let a,o;if(`reducer`in r){if(n&&!oL(r))throw Error(process.env.NODE_ENV===`production`?gL(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?WI(e,o):WI(e))}function aL(e){return e._reducerDefinitionType===`asyncThunk`}function oL(e){return e._reducerDefinitionType===`reducerWithPrepare`}function sL({type:e,reducerName:t},n,r,i){if(!i)throw Error(process.env.NODE_ENV===`production`?gL(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");let{payloadCreator:a,fulfilled:o,pending:s,rejected:c,settled:l,options:u}=n,d=i(e,a,u);r.exposeAction(t,d),o&&r.addCase(d.fulfilled,o),s&&r.addCase(d.pending,s),c&&r.addCase(d.rejected,c),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:o||cL,pending:s||cL,rejected:c||cL,settled:l||cL})}function cL(){}var lL=`listener`,uL=`completed`,dL=`cancelled`;`${dL}`,`${uL}`,`${lL}${dL}`,`${lL}${uL}`;var{assign:fL}=Object,pL=`listenerMiddleware`,mL=fL(WI(`${pL}/add`),{withTypes:()=>mL});`${pL}`;var hL=fL(WI(`${pL}/remove`),{withTypes:()=>hL});function gL(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function _L(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function vL(e){return Number.isFinite(e)}function yL(e){return typeof e==`number`&&e>0&&Number.isFinite(e)}function bL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?bL(Object(n),!0).forEach(function(t){SL(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function SL(e,t,n){return(t=CL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CL(e){var t=wL(e,`string`);return typeof t==`symbol`?t:t+``}function wL(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function TL(e,t,n){return hN(e)||hN(t)?n:cN(t)?(0,rN.default)(e,t,n):typeof t==`function`?t(e):n}var EL=(e,t,n)=>{if(t&&n){var{width:r,height:i}=n,{align:a,verticalAlign:o,layout:s}=t;if((s===`vertical`||s===`horizontal`&&o===`middle`)&&a!==`center`&&sN(e[a]))return xL(xL({},e),{},{[a]:e[a]+(r||0)});if((s===`horizontal`||s===`vertical`&&a===`center`)&&o!==`middle`&&sN(e[o]))return xL(xL({},e),{},{[o]:e[o]+(i||0)})}return e},DL=(e,t)=>e===`horizontal`&&t===`xAxis`||e===`vertical`&&t===`yAxis`||e===`centric`&&t===`angleAxis`||e===`radial`&&t===`radiusAxis`,OL={sign:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r<n;++r)for(var i=0,a=0,o=0;o<t;++o){var s=e[o]?.[r];if(s!=null){var c=s[1],l=s[0],u=aN(c)?l:c;u>=0?(s[0]=i,i+=u,s[1]=i):(s[0]=a,a+=u,s[1]=a)}}}},expand:WM,none:zM,silhouette:GM,wiggle:KM,positive:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r<n;++r)for(var i=0,a=0;a<t;++a){var o=e[a]?.[r];if(o!=null){var s=aN(o[1])?o[0]:o[1];s>=0?(o[0]=i,i+=s,o[1]=i):(o[0]=0,o[1]=0)}}}}},kL=(e,t,n)=>{var r=OL[n]??zM,i=UM().keys(t).value((e,t)=>Number(TL(e,t,0))).order(BM).offset(r)(e);return i.forEach((n,r)=>{n.forEach((n,i)=>{var a=TL(e[i],t[r],0);Array.isArray(a)&&a.length===2&&sN(a[0])&&sN(a[1])&&(n[0]=a[0],n[1]=a[1])})}),i},AL=e=>{var t=e.flat(2).filter(sN);return[Math.min(...t),Math.max(...t)]},jL=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],ML=(e,t,n)=>{if(e!=null)return jL(Object.keys(e).reduce((r,i)=>{var a=e[i];if(!a)return r;var{stackedData:o}=a,s=o.reduce((e,r)=>{var i=AL(_L(r,t,n));return!vL(i[0])||!vL(i[1])?e:[Math.min(e[0],i[0]),Math.max(e[1],i[1])]},[1/0,-1/0]);return[Math.min(s[0],r[0]),Math.max(s[1],r[1])]},[1/0,-1/0]))},NL=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,PL=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,FL=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=(0,fF.default)(t,e=>e.coordinate),a=1/0,o=1,s=i.length;o<s;o++){var c=i[o],l=i[o-1];a=Math.min((c?.coordinate||0)-(l?.coordinate||0),a)}return a===1/0?0:a}return n?void 0:0};function IL(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:i,name:a}=e;return xL(xL({},t),{},{dataKey:n,payload:r,value:i,name:a})}var LL=e=>e.layout.width,RL=e=>e.layout.height,zL=e=>e.layout.margin,BL=$(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),VL=$(e=>e.cartesianAxis.yAxis,e=>Object.values(e));function HL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function UL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?HL(Object(n),!0).forEach(function(t){WL(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function WL(e,t,n){return(t=GL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GL(e){var t=KL(e,`string`);return typeof t==`symbol`?t:t+``}function KL(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var qL=e=>e.brush.height;function JL(e){return VL(e).reduce((e,t)=>t.orientation===`left`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function YL(e){return VL(e).reduce((e,t)=>t.orientation===`right`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function XL(e){return BL(e).reduce((e,t)=>t.orientation===`top`&&!t.mirror&&!t.hide?e+t.height:e,0)}function ZL(e){return BL(e).reduce((e,t)=>t.orientation===`bottom`&&!t.mirror&&!t.hide?e+t.height:e,0)}var QL=$([LL,RL,zL,qL,JL,YL,XL,ZL,pF,mF],(e,t,n,r,i,a,o,s,c,l)=>{var u={left:(n.left||0)+i,right:(n.right||0)+a},d=UL(UL({},{top:(n.top||0)+o,bottom:(n.bottom||0)+s}),u),f=d.bottom;d.bottom+=r,d=EL(d,c,l);var p=e-d.left-d.right,m=t-d.top-d.bottom;return UL(UL({brushBottom:f},d),{},{width:Math.max(p,0),height:Math.max(m,0)})}),$L=$(QL,e=>({x:e.left,y:e.top,width:e.width,height:e.height}));$(LL,RL,(e,t)=>({x:0,y:0,width:e,height:t}));var eR=(0,t.createContext)(null),tR=()=>(0,t.useContext)(eR)!=null,nR=e=>e.brush,rR=$([nR,QL,zL],(e,t,n)=>({height:e.height,x:sN(e.x)?e.x:t.left,y:sN(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:sN(e.width)?e.width:t.width})),iR=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}e.debounce=t})),aR=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=iR();function n(e,n=0,r={}){typeof r!=`object`&&(r={});let{leading:i=!1,trailing:a=!0,maxWait:o}=r,s=[,,];i&&(s[0]=`leading`),a&&(s[1]=`trailing`);let c,l=null,u=t.debounce(function(...t){c=e.apply(this,t),l=null},n,{edges:s}),d=function(...t){return o!=null&&(l===null&&(l=Date.now()),Date.now()-l>=o)?(c=e.apply(this,t),l=Date.now(),u.cancel(),u.schedule(),c):(u.apply(this,t),c)};return d.cancel=u.cancel,d.flush=()=>(u.flush(),c),d}e.debounce=n})),oR=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=aR();function n(e,n=0,r={}){let{leading:i=!0,trailing:a=!0}=r;return t.debounce(e,n,{leading:i,maxWait:n,trailing:a})}e.throttle=n})),sR=h(((e,t)=>{t.exports=oR().throttle})),cR=!0,lR=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(cR&&typeof console<`u`&&console.warn&&(t===void 0&&console.warn(`LogUtils requires an error message argument`),!e))if(t===void 0)console.warn(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var a=0;console.warn(t.replace(/%s/g,()=>r[a++]))}},uR={width:`100%`,height:`100%`,debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},dR=(e,t,n)=>{var{width:r=uR.width,height:i=uR.height,aspect:a,maxHeight:o}=n,s=oN(r)?e:Number(r),c=oN(i)?t:Number(i);return a&&a>0&&(s?c=s/a:c&&(s=c*a),o&&c!=null&&c>o&&(c=o)),{calculatedWidth:s,calculatedHeight:c}},_oe={width:0,height:0,overflow:`visible`},voe={width:0,overflowX:`visible`},yoe={height:0,overflowY:`visible`},boe={},xoe=e=>{var{width:t,height:n}=e,r=oN(t),i=oN(n);return r&&i?_oe:r?voe:i?yoe:boe};function Soe(e){var{width:t,height:n,aspect:r}=e,i=t,a=n;return i===void 0&&a===void 0?(i=uR.width,a=uR.height):i===void 0?i=r&&r>0?void 0:uR.width:a===void 0&&(a=r&&r>0?void 0:uR.height),{width:i,height:a}}oo();var Coe=v(sR());function fR(){return fR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fR.apply(null,arguments)}function pR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?pR(Object(n),!0).forEach(function(t){woe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pR(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function woe(e,t,n){return(t=Toe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Toe(e){var t=Eoe(e,`string`);return typeof t==`symbol`?t:t+``}function Eoe(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var hR=(0,t.createContext)(uR.initialDimension);function Doe(e){return yL(e.width)&&yL(e.height)}function gR(e){var{children:n,width:r,height:i}=e,a=(0,t.useMemo)(()=>({width:r,height:i}),[r,i]);return Doe(a)?t.createElement(hR.Provider,{value:a},n):null}var Ooe=()=>(0,t.useContext)(hR),koe=(0,t.forwardRef)((e,n)=>{var{aspect:r,initialDimension:i=uR.initialDimension,width:a,height:o,minWidth:s=uR.minWidth,minHeight:c,maxHeight:l,children:u,debounce:d=uR.debounce,id:f,className:p,onResize:m,style:h={}}=e,g=(0,t.useRef)(null),_=(0,t.useRef)();_.current=m,(0,t.useImperativeHandle)(n,()=>g.current);var[v,y]=(0,t.useState)({containerWidth:i.width,containerHeight:i.height}),b=(0,t.useCallback)((e,t)=>{y(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);(0,t.useEffect)(()=>{if(g.current==null||typeof ResizeObserver>`u`)return vN;var e=e=>{var t,n=e[0];if(n!=null){var{width:r,height:i}=n.contentRect;b(r,i),(t=_.current)==null||t.call(_,r,i)}};d>0&&(e=(0,Coe.default)(e,d,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),{width:n,height:r}=g.current.getBoundingClientRect();return b(n,r),t.observe(g.current),()=>{t.disconnect()}},[b,d]);var{containerWidth:x,containerHeight:S}=v;lR(!r||r>0,`The aspect(%s) must be greater than zero.`,r);var{calculatedWidth:C,calculatedHeight:w}=dR(x,S,{width:a,height:o,aspect:r,maxHeight:l});return lR(C!=null&&C>0||w!=null&&w>0,`The width(%s) and height(%s) of chart should be greater than 0,
20
+ please check the style of container, or the props width(%s) and height(%s),
21
+ or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
22
+ height and width.`,C,w,a,o,s,c,r),t.createElement(`div`,{id:f?`${f}`:void 0,className:ao(`recharts-responsive-container`,p),style:mR(mR({},h),{},{width:a,height:o,minWidth:s,minHeight:c,maxHeight:l}),ref:g},t.createElement(`div`,{style:xoe({width:a,height:o})},t.createElement(gR,{width:C,height:w},u)))}),Aoe=(0,t.forwardRef)((e,n)=>{var r=Ooe();if(yL(r.width)&&yL(r.height))return e.children;var{width:i,height:a}=Soe({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:o,calculatedHeight:s}=dR(void 0,void 0,{width:i,height:a,aspect:e.aspect,maxHeight:e.maxHeight});return sN(o)&&sN(s)?t.createElement(gR,{width:o,height:s},e.children):t.createElement(koe,fR({},e,{width:i,height:a,ref:n}))}),_R=()=>{var e=tR(),t=BP($L),n=BP(rR),r=BP(nR)?.padding;return!e||!n||!r?t:{width:n.width-r.left-r.right,height:n.height-r.top-r.bottom,x:r.left,y:r.top}},joe={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},Moe=()=>BP(QL)??joe,Noe=()=>BP(LL),Poe=()=>BP(RL),Foe=()=>BP(e=>e.layout.margin),vR=e=>e.layout.layoutType,yR=()=>BP(vR),bR=e=>{var t=e.layout.layoutType;if(t===`centric`||t===`radial`)return t},Ioe=()=>yR()!==void 0,xR=Symbol.for(`immer-nothing`),SR=Symbol.for(`immer-draftable`),CR=Symbol.for(`immer-state`),Loe=process.env.NODE_ENV===`production`?[]:[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},`This object has been frozen and should not be mutated`,function(e){return`Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? `+e},`An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.`,`Immer forbids circular references`,"The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},`Object.defineProperty() cannot be used on an Immer draft`,`Object.setPrototypeOf() cannot be used on an Immer draft`,`Immer only supports deleting array indices`,`Immer only supports setting array indices and the 'length' property`,function(e){return`'original' expects a draft, got: ${e}`}];function wR(e,...t){if(process.env.NODE_ENV!==`production`){let n=Loe[e],r=typeof n==`function`?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var TR=Object.getPrototypeOf;function ER(e){return!!e&&!!e[CR]}function DR(e){return e?kR(e)||Array.isArray(e)||!!e[SR]||!!e.constructor?.[SR]||PR(e)||FR(e):!1}var Roe=Object.prototype.constructor.toString(),OR=new WeakMap;function kR(e){if(!e||typeof e!=`object`)return!1;let t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;let n=Object.hasOwnProperty.call(t,`constructor`)&&t.constructor;if(n===Object)return!0;if(typeof n!=`function`)return!1;let r=OR.get(n);return r===void 0&&(r=Function.toString.call(n),OR.set(n,r)),r===Roe}function AR(e,t,n=!0){jR(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function jR(e){let t=e[CR];return t?t.type_:Array.isArray(e)?1:PR(e)?2:FR(e)?3:0}function MR(e,t){return jR(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function NR(e,t,n){let r=jR(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function zoe(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}function PR(e){return e instanceof Map}function FR(e){return e instanceof Set}function IR(e){return e.copy_||e.base_}function LR(e,t){if(PR(e))return new Map(e);if(FR(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let n=kR(e);if(t===!0||t===`class_only`&&!n){let t=Object.getOwnPropertyDescriptors(e);delete t[CR];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(TR(e),t)}else{let t=TR(e);return t!==null&&n?{...e}:Object.assign(Object.create(t),e)}}function RR(e,t=!1){return BR(e)||ER(e)||!DR(e)?e:(jR(e)>1&&Object.defineProperties(e,{set:zR,add:zR,clear:zR,delete:zR}),Object.freeze(e),t&&Object.values(e).forEach(e=>RR(e,!0)),e)}function Boe(){wR(2)}var zR={value:Boe};function BR(e){return typeof e!=`object`||!e?!0:Object.isFrozen(e)}var Voe={};function VR(e){let t=Voe[e];return t||wR(0,e),t}var HR;function UR(){return HR}function Hoe(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function WR(e,t){t&&(VR(`Patches`),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function GR(e){KR(e),e.drafts_.forEach(Uoe),e.drafts_=null}function KR(e){e===HR&&(HR=e.parent_)}function qR(e){return HR=Hoe(HR,e)}function Uoe(e){let t=e[CR];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function JR(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];return e!==void 0&&e!==n?(n[CR].modified_&&(GR(t),wR(4)),DR(e)&&(e=YR(t,e),t.parent_||ZR(t,e)),t.patches_&&VR(`Patches`).generateReplacementPatches_(n[CR].base_,e,t.patches_,t.inversePatches_)):e=YR(t,n,[]),GR(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===xR?void 0:e}function YR(e,t,n){if(BR(t))return t;let r=e.immer_.shouldUseStrictIteration(),i=t[CR];if(!i)return AR(t,(r,a)=>XR(e,i,t,r,a,n),r),t;if(i.scope_!==e)return t;if(!i.modified_)return ZR(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;let t=i.copy_,a=t,o=!1;i.type_===3&&(a=new Set(t),t.clear(),o=!0),AR(a,(r,a)=>XR(e,i,t,r,a,n,o),r),ZR(e,t,!1),n&&e.patches_&&VR(`Patches`).generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function XR(e,t,n,r,i,a,o){if(i==null||typeof i!=`object`&&!o)return;let s=BR(i);if(!(s&&!o)){if(process.env.NODE_ENV!==`production`&&i===n&&wR(5),ER(i)){let o=YR(e,i,a&&t&&t.type_!==3&&!MR(t.assigned_,r)?a.concat(r):void 0);if(NR(n,r,o),ER(o))e.canAutoFreeze_=!1;else return}else o&&n.add(i);if(DR(i)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[r]===i&&s)return;YR(e,i),(!t||!t.scope_.parent_)&&typeof r!=`symbol`&&(PR(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&ZR(e,i)}}}function ZR(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&RR(t,n)}function Woe(e,t){let n=Array.isArray(e),r={type_:+!!n,scope_:t?t.scope_:UR(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},i=r,a=QR;n&&(i=[r],a=$R);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,s}var QR={get(e,t){if(t===CR)return e;let n=IR(e);if(!MR(n,t))return Goe(e,n,t);let r=n[t];return e.finalized_||!DR(r)?r:r===ez(e.base_,t)?(rz(e),e.copy_[t]=iz(r,e)):r},has(e,t){return t in IR(e)},ownKeys(e){return Reflect.ownKeys(IR(e))},set(e,t,n){let r=tz(IR(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=ez(IR(e),t),i=r?.[CR];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(zoe(n,r)&&(n!==void 0||MR(e.base_,t)))return!0;rz(e),nz(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_[t]=!0,!0)},deleteProperty(e,t){return ez(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,rz(e),nz(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=IR(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!==`length`,enumerable:r.enumerable,value:n[t]}},defineProperty(){wR(11)},getPrototypeOf(e){return TR(e.base_)},setPrototypeOf(){wR(12)}},$R={};AR(QR,(e,t)=>{$R[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),$R.deleteProperty=function(e,t){return process.env.NODE_ENV!==`production`&&isNaN(parseInt(t))&&wR(13),$R.set.call(this,e,t,void 0)},$R.set=function(e,t,n){return process.env.NODE_ENV!==`production`&&t!==`length`&&isNaN(parseInt(t))&&wR(14),QR.set.call(this,e[0],t,n,e[0])};function ez(e,t){let n=e[CR];return(n?IR(n):e)[t]}function Goe(e,t,n){let r=tz(t,n);return r?`value`in r?r.value:r.get?.call(e.draft_):void 0}function tz(e,t){if(!(t in e))return;let n=TR(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=TR(n)}}function nz(e){e.modified_||(e.modified_=!0,e.parent_&&nz(e.parent_))}function rz(e){e.copy_||=LR(e.base_,e.scope_.immer_.useStrictShallowCopy_)}var Koe=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(e,t,n)=>{if(typeof e==`function`&&typeof t!=`function`){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}typeof t!=`function`&&wR(6),n!==void 0&&typeof n!=`function`&&wR(7);let r;if(DR(e)){let i=qR(this),a=iz(e,void 0),o=!0;try{r=t(a),o=!1}finally{o?GR(i):KR(i)}return WR(i,n),JR(r,i)}else if(!e||typeof e!=`object`){if(r=t(e),r===void 0&&(r=e),r===xR&&(r=void 0),this.autoFreeze_&&RR(r,!0),n){let t=[],i=[];VR(`Patches`).generateReplacementPatches_(e,r,t,i),n(t,i)}return r}else wR(1,e)},this.produceWithPatches=(e,t)=>{if(typeof e==`function`)return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},typeof e?.autoFreeze==`boolean`&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy==`boolean`&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof e?.useStrictIteration==`boolean`&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){DR(e)||wR(8),ER(e)&&(e=qoe(e));let t=qR(this),n=iz(e,void 0);return n[CR].isManual_=!0,KR(t),n}finishDraft(e,t){let n=e&&e[CR];(!n||!n.isManual_)&&wR(9);let{scope_:r}=n;return WR(r,t),JR(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=VR(`Patches`).applyPatches_;return ER(e)?r(e,t):this.produce(e,e=>r(e,t))}};function iz(e,t){let n=PR(e)?VR(`MapSet`).proxyMap_(e,t):FR(e)?VR(`MapSet`).proxySet_(e,t):Woe(e,t);return(t?t.scope_:UR()).drafts_.push(n),n}function qoe(e){return ER(e)||wR(10,e),az(e)}function az(e){if(!DR(e)||BR(e))return e;let t=e[CR],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=LR(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=LR(e,!0);return AR(n,(e,t)=>{NR(n,e,az(t))},r),t&&(t.finalized_=!1),n}new Koe().produce;function oz(e){return e}var sz=nL({name:`legend`,initialState:{settings:{layout:`horizontal`,align:`center`,verticalAlign:`middle`,itemSorter:`value`},size:{width:0,height:0},payload:[]},reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(oz(t.payload))},prepare:JI()},replaceLegendPayload:{reducer(e,t){var{prev:n,next:r}=t.payload,i=VI(e).payload.indexOf(oz(n));i>-1&&(e.payload[i]=oz(r))},prepare:JI()},removeLegendPayload:{reducer(e,t){var n=VI(e).payload.indexOf(oz(t.payload));n>-1&&e.payload.splice(n,1)},prepare:JI()}}}),{setLegendSize:cz,setLegendSettings:Joe,addLegendPayload:Yoe,replaceLegendPayload:Xoe,removeLegendPayload:Zoe}=sz.actions;sz.reducer;var Qoe=new Set([`axisLine`,`tickLine`,`activeBar`,`activeDot`,`activeLabel`,`activeShape`,`allowEscapeViewBox`,`background`,`cursor`,`dot`,`label`,`line`,`margin`,`padding`,`position`,`shape`,`style`,`tick`,`wrapperStyle`,`radius`,`throttledEvents`]);function $oe(e,t){return e==null&&t==null?!0:typeof e==`number`&&typeof t==`number`?e===t||e!==e&&t!==t:e===t}function ese(e,t){for(var n of new Set([...Object.keys(e),...Object.keys(t)]))if(Qoe.has(n)){if(e[n]==null&&t[n]==null)continue;if(!(0,o.shallowEqual)(e[n],t[n]))return!1}else if(!$oe(e[n],t[n]))return!1;return!0}var tse=[`contextPayload`];function lz(){return lz=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lz.apply(null,arguments)}function uz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?uz(Object(n),!0).forEach(function(t){nse(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uz(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nse(e,t,n){return(t=rse(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rse(e){var t=ise(e,`string`);return typeof t==`symbol`?t:t+``}function ise(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ase(e,t){if(e==null)return{};var n,r,i=ose(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ose(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function sse(e){return e.value}function cse(e){var{contextPayload:n}=e,r=ase(e,tse),i=NP(n,e.payloadUniqBy,sse),a=dz(dz({},r),{},{payload:i});return t.isValidElement(e.content)?t.cloneElement(e.content,a):typeof e.content==`function`?t.createElement(e.content,a):t.createElement(tP,a)}function lse(e,t,n,r,i,a){var{layout:o,align:s,verticalAlign:c}=t,l,u;return(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null))&&(l=s===`center`&&o===`vertical`?{left:((r||0)-a.width)/2}:s===`right`?{right:n&&n.right||0}:{left:n&&n.left||0}),(!e||(e.top===void 0||e.top===null)&&(e.bottom===void 0||e.bottom===null))&&(u=c===`middle`?{top:((i||0)-a.height)/2}:c===`bottom`?{bottom:n&&n.bottom||0}:{top:n&&n.top||0}),dz(dz({},l),u)}function use(e){var n=IP();return(0,t.useEffect)(()=>{n(Joe(e))},[n,e]),null}function dse(e){var n=IP();return(0,t.useEffect)(()=>(n(cz(e)),()=>{n(cz({width:0,height:0}))}),[n,e]),null}function fse(e,t,n,r){return e===`vertical`&&t!=null?{height:t}:e===`horizontal`?{width:n||r}:null}var pse={align:`center`,iconSize:14,inactiveColor:`#ccc`,itemSorter:`value`,layout:`horizontal`,verticalAlign:`bottom`};function mse(e){var n=UN(e,pse),i=gF(),a=Uae(),o=Foe(),{width:s,height:c,wrapperStyle:l,portal:u}=n,[d,f]=vF([i]),p=Noe(),m=Poe();if(p==null||m==null)return null;var h=p-(o?.left||0)-(o?.right||0),g=fse(n.layout,c,s,h),_=u?l:dz(dz({position:`absolute`,width:g?.width||s||`auto`,height:g?.height||c||`auto`},lse(l,n,o,p,m,d)),l),v=u??a;return v==null||i==null?null:(0,r.createPortal)(t.createElement(`div`,{className:`recharts-legend-wrapper`,style:_,ref:f},t.createElement(use,{layout:n.layout,align:n.align,verticalAlign:n.verticalAlign,itemSorter:n.itemSorter}),!u&&t.createElement(dse,{width:d.width,height:d.height}),t.createElement(cse,lz({},n,g,{margin:o,chartWidth:p,chartHeight:m,contextPayload:i}))),v)}var fz=t.memo(mse,ese);fz.displayName=`Legend`,oo();function pz(){return pz=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pz.apply(null,arguments)}function mz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?mz(Object(n),!0).forEach(function(t){hse(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mz(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function hse(e,t,n){return(t=gse(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gse(e){var t=_se(e,`string`);return typeof t==`symbol`?t:t+``}function _se(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function vse(e){return Array.isArray(e)&&cN(e[0])&&cN(e[1])?e.join(` ~ `):e}var gz={separator:` : `,contentStyle:{margin:0,padding:10,backgroundColor:`#fff`,border:`1px solid #ccc`,whiteSpace:`nowrap`},itemStyle:{display:`block`,paddingTop:4,paddingBottom:4,color:`#000`},labelStyle:{},accessibilityLayer:!1};function yse(e,t){return t==null?e:(0,fF.default)(e,t)}var bse=e=>{var{separator:n=gz.separator,contentStyle:r,itemStyle:i,labelStyle:a=gz.labelStyle,payload:o,formatter:s,itemSorter:c,wrapperClassName:l,labelClassName:u,label:d,labelFormatter:f,accessibilityLayer:p=gz.accessibilityLayer}=e,m=()=>{if(o&&o.length){var e={padding:0,margin:0},r=yse(o,c).map((e,r)=>{if(!e||e.type===`none`)return null;var a=e.formatter||s||vse,{value:c,name:l}=e,u=c,d=l;if(a){var f=a(c,l,e,r,o);if(Array.isArray(f))[u,d]=f;else if(f!=null)u=f;else return null}var p=hz(hz({},gz.itemStyle),{},{color:e.color||gz.itemStyle.color},i);return t.createElement(`li`,{className:`recharts-tooltip-item`,key:`tooltip-item-${r}`,style:p},cN(d)?t.createElement(`span`,{className:`recharts-tooltip-item-name`},d):null,cN(d)?t.createElement(`span`,{className:`recharts-tooltip-item-separator`},n):null,t.createElement(`span`,{className:`recharts-tooltip-item-value`},u),t.createElement(`span`,{className:`recharts-tooltip-item-unit`},e.unit||``))});return t.createElement(`ul`,{className:`recharts-tooltip-item-list`,style:e},r)}return null},h=hz(hz({},gz.contentStyle),r),g=hz({margin:0},a),_=!hN(d),v=_?d:``,y=ao(`recharts-default-tooltip`,l),b=ao(`recharts-tooltip-label`,u);_&&f&&o!=null&&(v=f(d,o));var x=p?{role:`status`,"aria-live":`assertive`}:{};return t.createElement(`div`,pz({className:y,style:h},x),t.createElement(`p`,{className:b,style:g},t.isValidElement(v)?v:`${v}`),m())};oo();var _z=`recharts-tooltip-wrapper`,xse={visibility:`hidden`};function Sse(e){var{coordinate:t,translateX:n,translateY:r}=e;return ao(_z,{[`${_z}-right`]:sN(n)&&t&&sN(t.x)&&n>=t.x,[`${_z}-left`]:sN(n)&&t&&sN(t.x)&&n<t.x,[`${_z}-bottom`]:sN(r)&&t&&sN(t.y)&&r>=t.y,[`${_z}-top`]:sN(r)&&t&&sN(t.y)&&r<t.y})}function vz(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offset:i,position:a,reverseDirection:o,tooltipDimension:s,viewBox:c,viewBoxDimension:l}=e;if(a&&sN(a[r]))return a[r];var u=n[r]-s-(i>0?i:0),d=n[r]+i;if(t[r])return o[r]?u:d;var f=c[r];return f==null?0:o[r]?Math.max(u<f?d:u,f):l==null?0:d+s>f+l?Math.max(u,f):Math.max(d,f)}function Cse(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?`translate3d(${t}px, ${n}px, 0)`:`translate(${t}px, ${n}px)`}}function wse(e){var{allowEscapeViewBox:t,coordinate:n,offsetTop:r,offsetLeft:i,position:a,reverseDirection:o,tooltipBox:s,useTranslate3d:c,viewBox:l}=e,u,d,f;return s.height>0&&s.width>0&&n?(d=vz({allowEscapeViewBox:t,coordinate:n,key:`x`,offset:i,position:a,reverseDirection:o,tooltipDimension:s.width,viewBox:l,viewBoxDimension:l.width}),f=vz({allowEscapeViewBox:t,coordinate:n,key:`y`,offset:r,position:a,reverseDirection:o,tooltipDimension:s.height,viewBox:l,viewBoxDimension:l.height}),u=Cse({translateX:d,translateY:f,useTranslate3d:c})):u=xse,{cssProperties:u,cssClasses:Sse({translateX:d,translateY:f,coordinate:n})}}var yz={devToolsEnabled:!0,isSsr:!(typeof window<`u`&&window.document&&window.document.createElement&&window.setTimeout)};function bz(){var[e,n]=(0,t.useState)(()=>yz.isSsr||!window.matchMedia?!1:window.matchMedia(`(prefers-reduced-motion: reduce)`).matches);return(0,t.useEffect)(()=>{if(window.matchMedia){var e=window.matchMedia(`(prefers-reduced-motion: reduce)`),t=()=>{n(e.matches)};return e.addEventListener(`change`,t),()=>{e.removeEventListener(`change`,t)}}},[]),e}function xz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Sz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?xz(Object(n),!0).forEach(function(t){Tse(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xz(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Tse(e,t,n){return(t=Ese(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ese(e){var t=Dse(e,`string`);return typeof t==`symbol`?t:t+``}function Dse(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Ose(e){if(!(e.prefersReducedMotion&&e.isAnimationActive===`auto`)&&e.isAnimationActive&&e.active)return`transform ${e.animationDuration}ms ${e.animationEasing}`}function kse(e){var n=bz(),[r,i]=t.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));t.useEffect(()=>{var t=t=>{t.key===`Escape`&&i({dismissed:!0,dismissedAtCoordinate:{x:e.coordinate?.x??0,y:e.coordinate?.y??0}})};return document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`keydown`,t)}},[e.coordinate?.x,e.coordinate?.y]),r.dismissed&&((e.coordinate?.x??0)!==r.dismissedAtCoordinate.x||(e.coordinate?.y??0)!==r.dismissedAtCoordinate.y)&&i(Sz(Sz({},r),{},{dismissed:!1}));var{cssClasses:a,cssProperties:o}=wse({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset==`number`?e.offset:e.offset.x,offsetTop:typeof e.offset==`number`?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),s=Sz(Sz({},e.hasPortalFromProps?{}:Sz(Sz({transition:Ose({prefersReducedMotion:n,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},o),{},{pointerEvents:`none`,position:`absolute`,top:0,left:0})),{},{visibility:!r.dismissed&&e.active&&e.hasPayload?`visible`:`hidden`},e.wrapperStyle);return t.createElement(`div`,{xmlns:`http://www.w3.org/1999/xhtml`,tabIndex:-1,className:a,style:s,ref:e.innerRef},e.children)}var Ase=t.memo(kse),jse=()=>BP(e=>e.rootProps.accessibilityLayer)??!0;oo();function Cz(){return Cz=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cz.apply(null,arguments)}function wz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Tz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?wz(Object(n),!0).forEach(function(t){Mse(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wz(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Mse(e,t,n){return(t=Nse(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nse(e){var t=Pse(e,`string`);return typeof t==`symbol`?t:t+``}function Pse(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Ez={curveBasisClosed:coe,curveBasisOpen:loe,curveBasis:soe,curveBumpX:qae,curveBumpY:Jae,curveLinearClosed:uoe,curveLinear:uM,curveMonotoneX:doe,curveMonotoneY:foe,curveNatural:poe,curveStep:moe,curveStepAfter:goe,curveStepBefore:hoe},Dz=e=>vL(e.x)&&vL(e.y),Oz=e=>e.base!=null&&Dz(e.base)&&Dz(e),kz=e=>e.x,Az=e=>e.y,Fse=(e,t)=>{if(typeof e==`function`)return e;var n=`curve${gN(e)}`;if((n===`curveMonotone`||n===`curveBump`)&&t){var r=Ez[`${n}${t===`vertical`?`Y`:`X`}`];if(r)return r}return Ez[n]||uM},jz={connectNulls:!1,type:`linear`},Ise=e=>{var{type:t=jz.type,points:n=[],baseLine:r,layout:i,connectNulls:a=jz.connectNulls}=e,o=Fse(t,i),s=a?n.filter(Dz):n;if(Array.isArray(r)){var c,l=n.map((e,t)=>Tz(Tz({},e),{},{base:r[t]}));return c=i===`vertical`?mM().y(Az).x1(kz).x0(e=>e.base.x):mM().x(kz).y1(Az).y0(e=>e.base.y),c.defined(Oz).curve(o)(a?l.filter(Oz):l)}return(i===`vertical`&&sN(r)?mM().y(Az).x1(kz).x0(r):sN(r)?mM().x(kz).y1(Az).y0(r):pM().x(kz).y(Az)).defined(Dz).curve(o)(s)},Lse=e=>{var{className:n,points:r,path:i,pathRef:a}=e,o=yR();if((!r||!r.length)&&!i)return null;var s={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||o,connectNulls:e.connectNulls},c=r&&r.length?Ise(s):i;return t.createElement(`path`,Cz({},qj(e),FN(e),{className:ao(`recharts-curve`,n),d:c===null?void 0:c,ref:a}))};oo();var Rse=[`x`,`y`,`top`,`left`,`width`,`height`,`className`];function Mz(){return Mz=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mz.apply(null,arguments)}function Nz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zse(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Nz(Object(n),!0).forEach(function(t){Bse(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nz(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Bse(e,t,n){return(t=Vse(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vse(e){var t=Hse(e,`string`);return typeof t==`symbol`?t:t+``}function Hse(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Use(e,t){if(e==null)return{};var n,r,i=Wse(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Wse(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Gse=(e,t,n,r,i,a)=>`M${e},${i}v${r}M${a},${t}h${n}`,Kse=e=>{var{x:n=0,y:r=0,top:i=0,left:a=0,width:o=0,height:s=0,className:c}=e,l=Use(e,Rse),u=zse({x:n,y:r,top:i,left:a,width:o,height:s},l);return!sN(n)||!sN(r)||!sN(o)||!sN(s)||!sN(i)||!sN(a)?null:t.createElement(`path`,Mz({},Jj(u),{className:ao(`recharts-cross`,c),d:Gse(n,r,o,s,i,a)}))};function qse(e,t,n,r){var i=r/2;return{stroke:`none`,fill:`#ccc`,x:e===`horizontal`?t.x-i:n.left+.5,y:e===`horizontal`?n.top+.5:t.y-i,width:e===`horizontal`?r:n.width-1,height:e===`horizontal`?n.height-1:r}}function Pz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Fz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Pz(Object(n),!0).forEach(function(t){Jse(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pz(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Jse(e,t,n){return(t=Yse(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yse(e){var t=Xse(e,`string`);return typeof t==`symbol`?t:t+``}function Xse(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Zse=e=>e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`),Qse=(e,t,n)=>e.map(e=>`${Zse(e)} ${t}ms ${n}`).join(`,`),$se=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((e,t)=>e.filter(e=>t.includes(e))),Iz=(e,t)=>Object.keys(t).reduce((n,r)=>Fz(Fz({},n),{},{[r]:e(r,t[r])}),{});function Lz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Rz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Lz(Object(n),!0).forEach(function(t){ece(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lz(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ece(e,t,n){return(t=tce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tce(e){var t=nce(e,`string`);return typeof t==`symbol`?t:t+``}function nce(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var zz=(e,t,n)=>e+(t-e)*n,Bz=e=>{var{from:t,to:n}=e;return t!==n},Vz=(e,t,n)=>{var r=Iz((t,n)=>{if(Bz(n)){var[r,i]=e(n.from,n.to,n.velocity);return Rz(Rz({},n),{},{from:r,velocity:i})}return n},t);return n<1?Iz((e,t)=>Bz(t)&&r[e]!=null?Rz(Rz({},t),{},{velocity:zz(t.velocity,r[e].velocity,n),from:zz(t.from,r[e].from,n)}):t,t):Vz(e,r,n-1)};function rce(e,t,n,r,i,a){var o,s=r.reduce((n,r)=>Rz(Rz({},n),{},{[r]:{from:e[r],velocity:0,to:t[r]}}),{}),c=()=>Iz((e,t)=>t.from,s),l=()=>!Object.values(s).filter(Bz).length,u=null,d=r=>{o||=r;var f=(r-o)/n.dt;s=Vz(n,s,f),i(Rz(Rz(Rz({},e),t),c())),o=r,l()||(u=a.setTimeout(d))};return()=>(u=a.setTimeout(d),()=>{var e;(e=u)==null||e()})}function ice(e,t,n,r,i,a,o){var s=null,c=i.reduce((n,r)=>{var i=e[r],a=t[r];return i==null||a==null?n:Rz(Rz({},n),{},{[r]:[i,a]})},{}),l,u=i=>{l||=i;var d=(i-l)/r,f=Iz((e,t)=>zz(...t,n(d)),c);if(a(Rz(Rz(Rz({},e),t),f)),d<1)s=o.setTimeout(u);else{var p=Iz((e,t)=>zz(...t,n(1)),c);a(Rz(Rz(Rz({},e),t),p))}};return()=>(s=o.setTimeout(u),()=>{var e;(e=s)==null||e()})}var ace=(e,t,n,r,i,a)=>{var o=$se(e,t);return n==null?()=>(i(Rz(Rz({},e),t)),()=>{}):n.isStepper===!0?rce(e,t,n,o,i,a):ice(e,t,n,r,o,i,a)},Hz=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],Uz=(e,t)=>e.map((e,n)=>e*t**n).reduce((e,t)=>e+t),Wz=(e,t)=>n=>Uz(Hz(e,t),n),oce=(e,t)=>n=>Uz([...Hz(e,t).map((e,t)=>e*t).slice(1),0],n),sce=e=>{var t,n=e.split(`(`);if(n.length!==2||n[0]!==`cubic-bezier`)return null;var r=(t=n[1])==null||(t=t.split(`)`)[0])==null?void 0:t.split(`,`);if(r==null||r.length!==4)return null;var i=r.map(e=>parseFloat(e));return[i[0],i[1],i[2],i[3]]},cce=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length===1)switch(t[0]){case`linear`:return[0,0,1,1];case`ease`:return[.25,.1,.25,1];case`ease-in`:return[.42,0,1,1];case`ease-out`:return[.42,0,.58,1];case`ease-in-out`:return[0,0,.58,1];default:var r=sce(t[0]);if(r)return r}return t.length===4?t:[0,0,1,1]},lce=(e,t,n,r)=>{var i=Wz(e,n),a=Wz(t,r),o=oce(e,n),s=e=>e>1?1:e<0?0:e,c=e=>{for(var t=e>1?1:e,n=t,r=0;r<8;++r){var c=i(n)-t,l=o(n);if(Math.abs(c-t)<1e-4||l<1e-4)return a(n);n=s(n-c/l)}return a(n)};return c.isStepper=!1,c},Gz=function(){return lce(...cce(...arguments))},uce=function(){var{stiff:e=100,damping:t=8,dt:n=17}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=(r,i,a)=>{var o=a+(-(r-i)*e-a*t)*n/1e3,s=a*n/1e3+r;return Math.abs(s-i)<1e-4&&Math.abs(o)<1e-4?[i,0]:[s,o]};return r.isStepper=!0,r.dt=n,r},dce=e=>{if(typeof e==`string`)switch(e){case`ease`:case`ease-in-out`:case`ease-out`:case`ease-in`:case`linear`:return Gz(e);case`spring`:return uce();default:if(e.split(`(`)[0]===`cubic-bezier`)return Gz(e)}return typeof e==`function`?e:null};function fce(e){var t,n=()=>null,r=!1,i=null,a=o=>{if(!r){if(Array.isArray(o)){if(!o.length)return;var[s,...c]=o;if(typeof s==`number`){i=e.setTimeout(a.bind(null,c),s);return}a(s),i=e.setTimeout(a.bind(null,c));return}typeof o==`string`&&(t=o,n(t)),typeof o==`object`&&(t=o,n(t)),typeof o==`function`&&o()}};return{stop:()=>{r=!0},start:e=>{r=!1,i&&=(i(),null),a(e)},subscribe:e=>(n=e,()=>{n=()=>null}),getTimeoutController:()=>e}}var pce=class{setTimeout(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),r=null,i=a=>{a-n>=t?e(a):typeof requestAnimationFrame==`function`&&(r=requestAnimationFrame(i))};return r=requestAnimationFrame(i),()=>{r!=null&&cancelAnimationFrame(r)}}};function mce(){return fce(new pce)}var hce=(0,t.createContext)(mce);function gce(e,n){var r=(0,t.useContext)(hce);return(0,t.useMemo)(()=>n??r(e),[e,n,r])}var _ce={begin:0,duration:1e3,easing:`ease`,isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},Kz={t:0},qz={t:1};function vce(e){var n=UN(e,_ce),{isActive:r,canBegin:i,duration:a,easing:o,begin:s,onAnimationEnd:c,onAnimationStart:l,children:u}=n,d=bz(),f=r===`auto`?!yz.isSsr&&!d:r,p=gce(n.animationId,n.animationManager),[m,h]=(0,t.useState)(f?Kz:qz),g=(0,t.useRef)(null);return(0,t.useEffect)(()=>{f||h(qz)},[f]),(0,t.useEffect)(()=>{if(!f||!i)return vN;var e=ace(Kz,qz,dce(o),a,h,p.getTimeoutController());return p.start([l,s,()=>{g.current=e()},a,c]),()=>{p.stop(),g.current&&g.current(),c()}},[f,i,a,o,s,l,c,p]),u(m.t)}function yce(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`animation-`,r=(0,t.useRef)(uN(n)),i=(0,t.useRef)(e);return i.current!==e&&(r.current=uN(n),i.current=e),r.current}oo();var bce=[`radius`],xce=[`radius`],Sce,Cce,wce,Tce,Ece,Dce,Oce,kce,Ace,jce;function Jz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Yz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Jz(Object(n),!0).forEach(function(t){Mce(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jz(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Mce(e,t,n){return(t=Nce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nce(e){var t=Pce(e,`string`);return typeof t==`symbol`?t:t+``}function Pce(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Xz(){return Xz=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xz.apply(null,arguments)}function Zz(e,t){if(e==null)return{};var n,r,i=Fce(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Fce(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Qz(e,t){return t||=e.slice(0),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var $z=(e,t,n,r,i)=>{var a=tN(n),o=tN(r),s=Math.min(Math.abs(a)/2,Math.abs(o)/2),c=o>=0?1:-1,l=a>=0?1:-1,u=+(o>=0&&a>=0||o<0&&a<0),d;if(s>0&&Array.isArray(i)){for(var f=[0,0,0,0],p=0,m=4;p<m;p++){var h=i[p]??0;f[p]=h>s?s:h}d=nN(Sce||=Qz([`M`,`,`,``]),e,t+c*f[0]),f[0]>0&&(d+=nN(Cce||=Qz([`A `,`,`,`,0,0,`,`,`,`,`,``]),f[0],f[0],u,e+l*f[0],t)),d+=nN(wce||=Qz([`L `,`,`,``]),e+n-l*f[1],t),f[1]>0&&(d+=nN(Tce||=Qz([`A `,`,`,`,0,0,`,`,
23
+ `,`,`,``]),f[1],f[1],u,e+n,t+c*f[1])),d+=nN(Ece||=Qz([`L `,`,`,``]),e+n,t+r-c*f[2]),f[2]>0&&(d+=nN(Dce||=Qz([`A `,`,`,`,0,0,`,`,
24
+ `,`,`,``]),f[2],f[2],u,e+n-l*f[2],t+r)),d+=nN(Oce||=Qz([`L `,`,`,``]),e+l*f[3],t+r),f[3]>0&&(d+=nN(kce||=Qz([`A `,`,`,`,0,0,`,`,
25
+ `,`,`,``]),f[3],f[3],u,e,t+r-c*f[3])),d+=`Z`}else if(s>0&&i===+i&&i>0){var g=Math.min(s,i);d=nN(Ace||=Qz(`M .,.
26
+ A .,.,0,0,.,.,.
27
+ L .,.
28
+ A .,.,0,0,.,.,.
29
+ L .,.
30
+ A .,.,0,0,.,.,.
31
+ L .,.
32
+ A .,.,0,0,.,.,. Z`.split(`.`)),e,t+c*g,g,g,u,e+l*g,t,e+n-l*g,t,g,g,u,e+n,t+c*g,e+n,t+r-c*g,g,g,u,e+n-l*g,t+r,e+l*g,t+r,g,g,u,e,t+r-c*g)}else d=nN(jce||=Qz([`M `,`,`,` h `,` v `,` h `,` Z`]),e,t,n,r,-n);return d},eB={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:`ease`},Ice=e=>{var n=UN(e,eB),r=(0,t.useRef)(null),[i,a]=(0,t.useState)(-1);(0,t.useEffect)(()=>{if(r.current&&r.current.getTotalLength)try{var e=r.current.getTotalLength();e&&a(e)}catch{}},[]);var{x:o,y:s,width:c,height:l,radius:u,className:d}=n,{animationEasing:f,animationDuration:p,animationBegin:m,isAnimationActive:h,isUpdateAnimationActive:g}=n,_=(0,t.useRef)(c),v=(0,t.useRef)(l),y=(0,t.useRef)(o),b=(0,t.useRef)(s),x=yce((0,t.useMemo)(()=>({x:o,y:s,width:c,height:l,radius:u}),[o,s,c,l,u]),`rectangle-`);if(o!==+o||s!==+s||c!==+c||l!==+l||c===0||l===0)return null;var S=ao(`recharts-rectangle`,d);if(!g){var C=Jj(n),{radius:w}=C,T=Zz(C,bce);return t.createElement(`path`,Xz({},T,{x:tN(o),y:tN(s),width:tN(c),height:tN(l),radius:typeof u==`number`?u:void 0,className:S,d:$z(o,s,c,l,u)}))}var E=_.current,D=v.current,O=y.current,k=b.current,A=`0px ${i===-1?1:i}px`,j=`${i}px ${i}px`,M=Qse([`strokeDasharray`],p,typeof f==`string`?f:eB.animationEasing);return t.createElement(vce,{animationId:x,key:x,canBegin:i>0,duration:p,easing:f,isActive:g,begin:m},e=>{var i=pN(E,c,e),a=pN(D,l,e),d=pN(O,o,e),f=pN(k,s,e);r.current&&(_.current=i,v.current=a,y.current=d,b.current=f);var p=h?e>0?{transition:M,strokeDasharray:j}:{strokeDasharray:A}:{strokeDasharray:j},m=Jj(n),{radius:g}=m,x=Zz(m,xce);return t.createElement(`path`,Xz({},x,{radius:typeof u==`number`?u:void 0,className:S,d:$z(d,f,i,a,u),ref:r,style:Yz(Yz({},p),n.style)}))})},tB=Math.PI/180,nB=(e,t,n,r)=>({x:e+Math.cos(-tB*r)*n,y:t+Math.sin(-tB*r)*n}),Lce=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0,width:0,height:0,brushBottom:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(t-(n.top||0)-(n.bottom||0)))/2};function rB(e){var{cx:t,cy:n,radius:r,startAngle:i,endAngle:a}=e;return{points:[nB(t,n,r,i),nB(t,n,r,a)],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}oo();var Rce,zce,Bce,Vce,Hce,Uce,Wce;function iB(){return iB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},iB.apply(null,arguments)}function aB(e,t){return t||=e.slice(0),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Gce=(e,t)=>iN(t-e)*Math.min(Math.abs(t-e),359.999),oB=e=>{var{cx:t,cy:n,radius:r,angle:i,sign:a,isExternal:o,cornerRadius:s,cornerIsExternal:c}=e,l=s*(o?1:-1)+r,u=Math.asin(s/l)/tB,d=c?i:i+a*u,f=nB(t,n,l,d),p=nB(t,n,r,d),m=c?i-a*u:i;return{center:f,circleTangency:p,lineTangency:nB(t,n,l*Math.cos(u*tB),m),theta:u}},sB=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:a,endAngle:o}=e,s=Gce(a,o),c=a+s,l=nB(t,n,i,a),u=nB(t,n,i,c),d=nN(Rce||=aB([`M `,`,`,`
33
+ A `,`,`,`,0,
34
+ `,`,`,`,
35
+ `,`,`,`
36
+ `]),l.x,l.y,i,i,+(Math.abs(s)>180),+(a>c),u.x,u.y);if(r>0){var f=nB(t,n,r,a),p=nB(t,n,r,c);d+=nN(zce||=aB([`L `,`,`,`
37
+ A `,`,`,`,0,
38
+ `,`,`,`,
39
+ `,`,`,` Z`]),p.x,p.y,r,r,+(Math.abs(s)>180),+(a<=c),f.x,f.y)}else d+=nN(Bce||=aB([`L `,`,`,` Z`]),t,n);return d},Kce=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,cornerRadius:a,forceCornerRadius:o,cornerIsExternal:s,startAngle:c,endAngle:l}=e,u=iN(l-c),{circleTangency:d,lineTangency:f,theta:p}=oB({cx:t,cy:n,radius:i,angle:c,sign:u,cornerRadius:a,cornerIsExternal:s}),{circleTangency:m,lineTangency:h,theta:g}=oB({cx:t,cy:n,radius:i,angle:l,sign:-u,cornerRadius:a,cornerIsExternal:s}),_=s?Math.abs(c-l):Math.abs(c-l)-p-g;if(_<0)return o?nN(Vce||=aB([`M `,`,`,`
40
+ a`,`,`,`,0,0,1,`,`,0
41
+ a`,`,`,`,0,0,1,`,`,0
42
+ `]),f.x,f.y,a,a,a*2,a,a,-a*2):sB({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:c,endAngle:l});var v=nN(Hce||=aB([`M `,`,`,`
43
+ A`,`,`,`,0,0,`,`,`,`,`,`
44
+ A`,`,`,`,0,`,`,`,`,`,`,`,`
45
+ A`,`,`,`,0,0,`,`,`,`,`,`
46
+ `]),f.x,f.y,a,a,+(u<0),d.x,d.y,i,i,+(_>180),+(u<0),m.x,m.y,a,a,+(u<0),h.x,h.y);if(r>0){var{circleTangency:y,lineTangency:b,theta:x}=oB({cx:t,cy:n,radius:r,angle:c,sign:u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),{circleTangency:S,lineTangency:C,theta:w}=oB({cx:t,cy:n,radius:r,angle:l,sign:-u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),T=s?Math.abs(c-l):Math.abs(c-l)-x-w;if(T<0&&a===0)return`${v}L${t},${n}Z`;v+=nN(Uce||=aB([`L`,`,`,`
47
+ A`,`,`,`,0,0,`,`,`,`,`,`
48
+ A`,`,`,`,0,`,`,`,`,`,`,`,`
49
+ A`,`,`,`,0,0,`,`,`,`,`,`Z`]),C.x,C.y,a,a,+(u<0),S.x,S.y,r,r,+(T>180),+(u>0),y.x,y.y,a,a,+(u<0),b.x,b.y)}else v+=nN(Wce||=aB([`L`,`,`,`Z`]),t,n);return v},qce={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Jce=e=>{var n=UN(e,qce),{cx:r,cy:i,innerRadius:a,outerRadius:o,cornerRadius:s,forceCornerRadius:c,cornerIsExternal:l,startAngle:u,endAngle:d,className:f}=n;if(o<a||u===d)return null;var p=ao(`recharts-sector`,f),m=o-a,h=dN(s,m,0,!0),g=h>0&&Math.abs(u-d)<360?Kce({cx:r,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(h,m/2),forceCornerRadius:c,cornerIsExternal:l,startAngle:u,endAngle:d}):sB({cx:r,cy:i,innerRadius:a,outerRadius:o,startAngle:u,endAngle:d});return t.createElement(`path`,iB({},Jj(n),{className:p,d:g}))};function Yce(e,t,n){if(e===`horizontal`)return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if(e===`vertical`)return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(PN(t)){if(e===`centric`){var{cx:r,cy:i,innerRadius:a,outerRadius:o,angle:s}=t,c=nB(r,i,a,s),l=nB(r,i,o,s);return[{x:c.x,y:c.y},{x:l.x,y:l.y}]}return rB(t)}}var Xce=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=oF();function n(e){return t.isSymbol(e)?NaN:Number(e)}e.toNumber=n})),Zce=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Xce();function n(e){return e?(e=t.toNumber(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}e.toFinite=n})),Qce=h((e=>{Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=uF(),n=Zce();function r(e,r,i){i&&typeof i!=`number`&&t.isIterateeCall(e,r,i)&&(r=i=void 0),e=n.toFinite(e),r===void 0?(r=e,e=0):r=n.toFinite(r),i=i===void 0?e<r?1:-1:n.toFinite(i);let a=Math.max(Math.ceil((r-e)/(i||1)),0),o=Array(a);for(let t=0;t<a;t++)o[t]=e,e+=i;return o}e.range=r})),$ce=h(((e,t)=>{t.exports=Qce().range})),cB=e=>e.chartData,lB=$([cB],e=>{var t=e.chartData==null?0:e.chartData.length-1;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),uB=(e,t,n,r)=>r?lB(e):cB(e),ele=$([uB],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return t==null?[]:t.slice(n,r+1)});$([lB],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return t==null?[]:t.slice(n,r+1)});var tle=$([cB],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return t==null?[]:t.slice(n,r+1)});function dB(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(vL(t)&&vL(n))return!0}return!1}function fB(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function pB(e,t){if(t&&typeof e!=`function`&&Array.isArray(e)&&e.length===2){var[n,r]=e,i,a;if(vL(n))i=n;else if(typeof n==`function`)return;if(vL(r))a=r;else if(typeof r==`function`)return;var o=[i,a];if(dB(o))return o}}function nle(e,t,n){if(!(!n&&t==null)){if(typeof e==`function`&&t!=null)try{var r=e(t,n);if(dB(r))return fB(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var[i,a]=e,o,s;if(i===`auto`)t!=null&&(o=Math.min(...t));else if(sN(i))o=i;else if(typeof i==`function`)try{t!=null&&(o=i(t?.[0]))}catch{}else if(typeof i==`string`&&NL.test(i)){var c=NL.exec(i);if(c==null||c[1]==null||t==null)o=void 0;else{var l=+c[1];o=t[0]-l}}else o=t?.[0];if(a===`auto`)t!=null&&(s=Math.max(...t));else if(sN(a))s=a;else if(typeof a==`function`)try{t!=null&&(s=a(t?.[1]))}catch{}else if(typeof a==`string`&&PL.test(a)){var u=PL.exec(a);if(u==null||u[1]==null||t==null)s=void 0;else{var d=+u[1];s=t[1]+d}}else s=t?.[1];var f=[o,s];if(dB(f))return t==null?f:fB(f,t,n)}}}var mB=v(h(((e,t)=>{(function(e){"use strict";var n=1e9,r={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:`2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286`},i=!0,a=`[DecimalError] `,o=a+`Invalid argument: `,s=a+`Exponent out of range: `,c=Math.floor,l=Math.pow,u=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,d,f=1e7,p=7,m=9007199254740991,h=c(m/p),g={};g.absoluteValue=g.abs=function(){var e=new this.constructor(this);return e.s&&=1,e},g.comparedTo=g.cmp=function(e){var t,n,r,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1},g.decimalPlaces=g.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*p;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n},g.dividedBy=g.div=function(e){return b(this,new this.constructor(e))},g.dividedToIntegerBy=g.idiv=function(e){var t=this,n=t.constructor;return D(b(t,new n(e),0,1),n.precision)},g.equals=g.eq=function(e){return!this.cmp(e)},g.exponent=function(){return S(this)},g.greaterThan=g.gt=function(e){return this.cmp(e)>0},g.greaterThanOrEqualTo=g.gte=function(e){return this.cmp(e)>=0},g.isInteger=g.isint=function(){return this.e>this.d.length-2},g.isNegative=g.isneg=function(){return this.s<0},g.isPositive=g.ispos=function(){return this.s>0},g.isZero=function(){return this.s===0},g.lessThan=g.lt=function(e){return this.cmp(e)<0},g.lessThanOrEqualTo=g.lte=function(e){return this.cmp(e)<1},g.logarithm=g.log=function(e){var t,n=this,r=n.constructor,o=r.precision,s=o+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(d))throw Error(a+`NaN`);if(n.s<1)throw Error(a+(n.s?`NaN`:`-Infinity`));return n.eq(d)?new r(0):(i=!1,t=b(T(n,s),T(e,s),s),i=!0,D(t,o))},g.minus=g.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?O(t,e):_(t,(e.s=-e.s,e))},g.modulo=g.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(e=new r(e),!e.s)throw Error(a+`NaN`);return n.s?(i=!1,t=b(n,e,0,1).times(e),i=!0,n.minus(t)):D(new r(n),o)},g.naturalExponential=g.exp=function(){return x(this)},g.naturalLogarithm=g.ln=function(){return T(this)},g.negated=g.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},g.plus=g.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?_(t,e):O(t,(e.s=-e.s,e))},g.precision=g.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(o+e);if(t=S(i)+1,r=i.d.length-1,n=r*p+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},g.squareRoot=g.sqrt=function(){var e,t,n,r,o,s,l,u=this,d=u.constructor;if(u.s<1){if(!u.s)return new d(0);throw Error(a+`NaN`)}for(e=S(u),i=!1,o=Math.sqrt(+u),o==0||o==1/0?(t=y(u.d),(t.length+e)%2==0&&(t+=`0`),o=Math.sqrt(t),e=c((e+1)/2)-(e<0||e%2),o==1/0?t=`5e`+e:(t=o.toExponential(),t=t.slice(0,t.indexOf(`e`)+1)+e),r=new d(t)):r=new d(o.toString()),n=d.precision,o=l=n+3;;)if(s=r,r=s.plus(b(u,s,l+2)).times(.5),y(s.d).slice(0,l)===(t=y(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),o==l&&t==`4999`){if(D(s,n+1,0),s.times(s).eq(u)){r=s;break}}else if(t!=`9999`)break;l+=4}return i=!0,D(r,n)},g.times=g.mul=function(e){var t,n,r,a,o,s,c,l,u,d=this,p=d.constructor,m=d.d,h=(e=new p(e)).d;if(!d.s||!e.s)return new p(0);for(e.s*=d.s,n=d.e+e.e,l=m.length,u=h.length,l<u&&(o=m,m=h,h=o,s=l,l=u,u=s),o=[],s=l+u,r=s;r--;)o.push(0);for(r=u;--r>=0;){for(t=0,a=l+r;a>r;)c=o[a]+h[r]*m[a-r-1]+t,o[a--]=c%f|0,t=c/f|0;o[a]=(o[a]+t)%f|0}for(;!o[--s];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,i?D(e,p.precision):e},g.toDecimalPlaces=g.todp=function(e,t){var r=this,i=r.constructor;return r=new i(r),e===void 0?r:(v(e,0,n),t===void 0?t=i.rounding:v(t,0,8),D(r,e+S(r)+1,t))},g.toExponential=function(e,t){var r,i=this,a=i.constructor;return e===void 0?r=k(i,!0):(v(e,0,n),t===void 0?t=a.rounding:v(t,0,8),i=D(new a(i),e+1,t),r=k(i,!0,e+1)),r},g.toFixed=function(e,t){var r,i,a=this,o=a.constructor;return e===void 0?k(a):(v(e,0,n),t===void 0?t=o.rounding:v(t,0,8),i=D(new o(a),e+S(a)+1,t),r=k(i.abs(),!1,e+S(i)+1),a.isneg()&&!a.isZero()?`-`+r:r)},g.toInteger=g.toint=function(){var e=this,t=e.constructor;return D(new t(e),S(e)+1,t.rounding)},g.toNumber=function(){return+this},g.toPower=g.pow=function(e){var t,n,r,o,s,l,u=this,f=u.constructor,h=12,g=+(e=new f(e));if(!e.s)return new f(d);if(u=new f(u),!u.s){if(e.s<1)throw Error(a+`Infinity`);return u}if(u.eq(d))return u;if(r=f.precision,e.eq(d))return D(u,r);if(t=e.e,n=e.d.length-1,l=t>=n,s=u.s,!l){if(s<0)throw Error(a+`NaN`)}else if((n=g<0?-g:g)<=m){for(o=new f(d),t=Math.ceil(r/p+4),i=!1;n%2&&(o=o.times(u),A(o.d,t)),n=c(n/2),n!==0;)u=u.times(u),A(u.d,t);return i=!0,e.s<0?new f(d).div(o):D(o,r)}return s=s<0&&e.d[Math.max(t,n)]&1?-1:1,u.s=1,i=!1,o=e.times(T(u,r+h)),i=!0,o=x(o),o.s=s,o},g.toPrecision=function(e,t){var r,i,a=this,o=a.constructor;return e===void 0?(r=S(a),i=k(a,r<=o.toExpNeg||r>=o.toExpPos)):(v(e,1,n),t===void 0?t=o.rounding:v(t,0,8),a=D(new o(a),e,t),r=S(a),i=k(a,e<=r||r<=o.toExpNeg,e)),i},g.toSignificantDigits=g.tosd=function(e,t){var r=this,i=r.constructor;return e===void 0?(e=i.precision,t=i.rounding):(v(e,1,n),t===void 0?t=i.rounding:v(t,0,8)),D(new i(r),e,t)},g.toString=g.valueOf=g.val=g.toJSON=function(){var e=this,t=S(e),n=e.constructor;return k(e,t<=n.toExpNeg||t>=n.toExpPos)};function _(e,t){var n,r,a,o,s,c,l,u,d=e.constructor,m=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),i?D(t,m):t;if(l=e.d,u=t.d,s=e.e,a=t.e,l=l.slice(),o=s-a,o){for(o<0?(r=l,o=-o,c=u.length):(r=u,a=s,c=l.length),s=Math.ceil(m/p),c=s>c?s+1:c+1,o>c&&(o=c,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(c=l.length,o=u.length,c-o<0&&(o=c,r=u,u=l,l=r),n=0;o;)n=(l[--o]=l[o]+u[o]+n)/f|0,l[o]%=f;for(n&&(l.unshift(n),++a),c=l.length;l[--c]==0;)l.pop();return t.d=l,t.e=a,i?D(t,m):t}function v(e,t,n){if(e!==~~e||e<t||e>n)throw Error(o+e)}function y(e){var t,n,r,i=e.length-1,a=``,o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)r=e[t]+``,n=p-r.length,n&&(a+=w(n)),a+=r;o=e[t],r=o+``,n=p-r.length,n&&(a+=w(n))}else if(o===0)return`0`;for(;o%10==0;)o/=10;return a+o}var b=(function(){function e(e,t){var n,r=0,i=e.length;for(e=e.slice();i--;)n=e[i]*t+r,e[i]=n%f|0,r=n/f|0;return r&&e.unshift(r),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=+(e[n]<t[n]),e[n]=r*f+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,s){var c,l,u,d,m,h,g,_,v,y,b,x,C,w,T,E,O,k,A=r.constructor,j=r.s==i.s?1:-1,M=r.d,N=i.d;if(!r.s)return new A(r);if(!i.s)throw Error(a+`Division by zero`);for(l=r.e-i.e,O=N.length,T=M.length,g=new A(j),_=g.d=[],u=0;N[u]==(M[u]||0);)++u;if(N[u]>(M[u]||0)&&--l,x=o==null?o=A.precision:s?o+(S(r)-S(i))+1:o,x<0)return new A(0);if(x=x/p+2|0,u=0,O==1)for(d=0,N=N[0],x++;(u<T||d)&&x--;u++)C=d*f+(M[u]||0),_[u]=C/N|0,d=C%N|0;else{for(d=f/(N[0]+1)|0,d>1&&(N=e(N,d),M=e(M,d),O=N.length,T=M.length),w=O,v=M.slice(0,O),y=v.length;y<O;)v[y++]=0;k=N.slice(),k.unshift(0),E=N[0],N[1]>=f/2&&++E;do d=0,c=t(N,v,O,y),c<0?(b=v[0],O!=y&&(b=b*f+(v[1]||0)),d=b/E|0,d>1?(d>=f&&(d=f-1),m=e(N,d),h=m.length,y=v.length,c=t(m,v,h,y),c==1&&(d--,n(m,O<h?k:N,h))):(d==0&&(c=d=1),m=N.slice()),h=m.length,h<y&&m.unshift(0),n(v,m,y),c==-1&&(y=v.length,c=t(N,v,O,y),c<1&&(d++,n(v,O<y?k:N,y))),y=v.length):c===0&&(d++,v=[0]),_[u++]=d,c&&v[0]?v[y++]=M[w]||0:(v=[M[w]],y=1);while((w++<T||v[0]!==void 0)&&x--)}return _[0]||_.shift(),g.e=l,D(g,s?o+S(g)+1:o)}})();function x(e,t){var n,r,a,o,c,u,f=0,p=0,m=e.constructor,h=m.precision;if(S(e)>16)throw Error(s+S(e));if(!e.s)return new m(d);for(t==null?(i=!1,u=h):u=t,c=new m(.03125);e.abs().gte(.1);)e=e.times(c),p+=5;for(r=Math.log(l(2,p))/Math.LN10*2+5|0,u+=r,n=a=o=new m(d),m.precision=u;;){if(a=D(a.times(e),u),n=n.times(++f),c=o.plus(b(a,n,u)),y(c.d).slice(0,u)===y(o.d).slice(0,u)){for(;p--;)o=D(o.times(o),u);return m.precision=h,t==null?(i=!0,D(o,h)):o}o=c}}function S(e){for(var t=e.e*p,n=e.d[0];n>=10;n/=10)t++;return t}function C(e,t,n){if(t>e.LN10.sd())throw i=!0,n&&(e.precision=n),Error(a+`LN10 precision limit exceeded`);return D(new e(e.LN10),t)}function w(e){for(var t=``;e--;)t+=`0`;return t}function T(e,t){var n,r,o,s,c,l,u,f,p,m=1,h=10,g=e,_=g.d,v=g.constructor,x=v.precision;if(g.s<1)throw Error(a+(g.s?`NaN`:`-Infinity`));if(g.eq(d))return new v(0);if(t==null?(i=!1,f=x):f=t,g.eq(10))return t??(i=!0),C(v,f);if(f+=h,v.precision=f,n=y(_),r=n.charAt(0),s=S(g),Math.abs(s)<0x5543df729c000){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)g=g.times(e),n=y(g.d),r=n.charAt(0),m++;s=S(g),r>1?(g=new v(`0.`+n),s++):g=new v(r+`.`+n.slice(1))}else return u=C(v,f+2,x).times(s+``),g=T(new v(r+`.`+n.slice(1)),f-h).plus(u),v.precision=x,t==null?(i=!0,D(g,x)):g;for(l=c=g=b(g.minus(d),g.plus(d),f),p=D(g.times(g),f),o=3;;){if(c=D(c.times(p),f),u=l.plus(b(c,new v(o),f)),y(u.d).slice(0,f)===y(l.d).slice(0,f))return l=l.times(2),s!==0&&(l=l.plus(C(v,f+2,x).times(s+``))),l=b(l,new v(m),f),v.precision=x,t==null?(i=!0,D(l,x)):l;l=u,o+=2}}function E(e,t){var n,r,a;for((n=t.indexOf(`.`))>-1&&(t=t.replace(`.`,``)),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=c(n/p),e.d=[],r=(n+1)%p,n<0&&(r+=p),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=p;r<a;)e.d.push(+t.slice(r,r+=p));t=t.slice(r),r=p-t.length}else r-=a;for(;r--;)t+=`0`;if(e.d.push(+t),i&&(e.e>h||e.e<-h))throw Error(s+n)}else e.s=0,e.e=0,e.d=[0];return e}function D(e,t,n){var r,a,o,u,d,m,g,_,v=e.d;for(u=1,o=v[0];o>=10;o/=10)u++;if(r=t-u,r<0)r+=p,a=t,g=v[_=0];else{if(_=Math.ceil((r+1)/p),o=v.length,_>=o)return e;for(g=o=v[_],u=1;o>=10;o/=10)u++;r%=p,a=r-p+u}if(n!==void 0&&(o=l(10,u-a-1),d=g/o%10|0,m=t<0||v[_+1]!==void 0||g%o,m=n<4?(d||m)&&(n==0||n==(e.s<0?3:2)):d>5||d==5&&(n==4||m||n==6&&(r>0?a>0?g/l(10,u-a):0:v[_-1])%10&1||n==(e.s<0?8:7))),t<1||!v[0])return m?(o=S(e),v.length=1,t=t-o-1,v[0]=l(10,(p-t%p)%p),e.e=c(-t/p)||0):(v.length=1,v[0]=e.e=e.s=0),e;if(r==0?(v.length=_,o=1,_--):(v.length=_+1,o=l(10,p-r),v[_]=a>0?(g/l(10,u-a)%l(10,a)|0)*o:0),m)for(;;)if(_==0){(v[0]+=o)==f&&(v[0]=1,++e.e);break}else{if(v[_]+=o,v[_]!=f)break;v[_--]=0,o=1}for(r=v.length;v[--r]===0;)v.pop();if(i&&(e.e>h||e.e<-h))throw Error(s+S(e));return e}function O(e,t){var n,r,a,o,s,c,l,u,d,m,h=e.constructor,g=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),i?D(t,g):t;if(l=e.d,m=t.d,r=t.e,u=e.e,l=l.slice(),s=u-r,s){for(d=s<0,d?(n=l,s=-s,c=m.length):(n=m,r=u,c=l.length),a=Math.max(Math.ceil(g/p),c)+2,s>a&&(s=a,n.length=1),n.reverse(),a=s;a--;)n.push(0);n.reverse()}else{for(a=l.length,c=m.length,d=a<c,d&&(c=a),a=0;a<c;a++)if(l[a]!=m[a]){d=l[a]<m[a];break}s=0}for(d&&(n=l,l=m,m=n,t.s=-t.s),c=l.length,a=m.length-c;a>0;--a)l[c++]=0;for(a=m.length;a>s;){if(l[--a]<m[a]){for(o=a;o&&l[--o]===0;)l[o]=f-1;--l[o],l[a]+=f}l[a]-=m[a]}for(;l[--c]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,i?D(t,g):t):new h(0)}function k(e,t,n){var r,i=S(e),a=y(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+`.`+a.slice(1)+w(r):o>1&&(a=a.charAt(0)+`.`+a.slice(1)),a=a+(i<0?`e`:`e+`)+i):i<0?(a=`0.`+w(-i-1)+a,n&&(r=n-o)>0&&(a+=w(r))):i>=o?(a+=w(i+1-o),n&&(r=n-i-1)>0&&(a=a+`.`+w(r))):((r=i+1)<o&&(a=a.slice(0,r)+`.`+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+=`.`),a+=w(r))),e.s<0?`-`+a:a}function A(e,t){if(e.length>t)return e.length=t,!0}function j(e){var t,n,r;function i(e){var t=this;if(!(t instanceof i))return new i(e);if(t.constructor=i,e instanceof i){t.s=e.s,t.e=e.e,t.d=(e=e.d)?e.slice():e;return}if(typeof e==`number`){if(e*0!=0)throw Error(o+e);if(e>0)t.s=1;else if(e<0)e=-e,t.s=-1;else{t.s=0,t.e=0,t.d=[0];return}if(e===~~e&&e<1e7){t.e=0,t.d=[e];return}return E(t,e.toString())}else if(typeof e!=`string`)throw Error(o+e);if(e.charCodeAt(0)===45?(e=e.slice(1),t.s=-1):t.s=1,u.test(e))E(t,e);else throw Error(o+e)}if(i.prototype=g,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=j,i.config=i.set=M,e===void 0&&(e={}),e)for(r=[`precision`,`rounding`,`toExpNeg`,`toExpPos`,`LN10`],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function M(e){if(!e||typeof e!=`object`)throw Error(a+`Object expected`);var t,r,i,s=[`precision`,1,n,`rounding`,0,8,`toExpNeg`,-1/0,0,`toExpPos`,0,1/0];for(t=0;t<s.length;t+=3)if((i=e[r=s[t]])!==void 0)if(c(i)===i&&i>=s[t+1]&&i<=s[t+2])this[r]=i;else throw Error(o+r+`: `+i);if((i=e[r=`LN10`])!==void 0)if(i==Math.LN10)this[r]=new this(i);else throw Error(o+r+`: `+i);return this}r=j(r),r.default=r.Decimal=r,d=new r(1),typeof define==`function`&&define.amd?define(function(){return r}):t!==void 0&&t.exports?t.exports=r:(e||=typeof self<`u`&&self&&self.self==self?self:Function(`return this`)(),e.Decimal=r)})(e)}))());function hB(e){return e===0?1:Math.floor(new mB.default(e).abs().log(10).toNumber())+1}function gB(e,t,n){for(var r=new mB.default(e),i=0,a=[];r.lt(t)&&i<1e5;)a.push(r.toNumber()),r=r.add(n),i++;return a}var _B=e=>{var[t,n]=e,[r,i]=[t,n];return t>n&&([r,i]=[n,t]),[r,i]},vB=(e,t,n)=>{if(e.lte(0))return new mB.default(0);var r=hB(e.toNumber()),i=new mB.default(10).pow(r),a=e.div(i),o=r===1?.1:.05,s=new mB.default(Math.ceil(a.div(o).toNumber())).add(n).mul(o).mul(i);return t?new mB.default(s.toNumber()):new mB.default(Math.ceil(s.toNumber()))},yB=(e,t,n)=>{if(e.lte(0))return new mB.default(0);var r=[1,2,2.5,5],i=e.toNumber(),a=Math.floor(new mB.default(i).abs().log(10).toNumber()),o=new mB.default(10).pow(a),s=e.div(o).toNumber(),c=r.findIndex(e=>e>=s-1e-10);if(c===-1&&(o=o.mul(10),c=0),c+=n,c>=r.length){var l=Math.floor(c/r.length);c%=r.length,o=o.mul(new mB.default(10).pow(l))}var u=new mB.default(r[c]??1).mul(o);return t?u:new mB.default(Math.ceil(u.toNumber()))},rle=(e,t,n)=>{var r=new mB.default(1),i=new mB.default(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new mB.default(10).pow(hB(e)-1),i=new mB.default(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new mB.default(Math.floor(e)))}else e===0?i=new mB.default(Math.floor((t-1)/2)):n||(i=new mB.default(Math.floor(e)));for(var o=Math.floor((t-1)/2),s=[],c=0;c<t;c++)s.push(i.add(new mB.default(c-o).mul(r)).toNumber());return s},bB=function(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:vB;if(!Number.isFinite((t-e)/(n-1)))return{step:new mB.default(0),tickMin:new mB.default(0),tickMax:new mB.default(0)};var o=a(new mB.default(t).sub(e).div(n-1),r,i),s;e<=0&&t>=0?s=new mB.default(0):(s=new mB.default(e).add(t).div(2),s=s.sub(new mB.default(s).mod(o)));var c=Math.ceil(s.sub(e).div(o).toNumber()),l=Math.ceil(new mB.default(t).sub(s).div(o).toNumber()),u=c+l+1;return u>n?bB(e,t,n,r,i+1,a):(u<n&&(l=t>0?l+(n-u):l,c=t>0?c:c+(n-u)),{step:o,tickMin:s.sub(new mB.default(c).mul(o)),tickMax:s.add(new mB.default(l).mul(o))})},xB=function(e){var[t,n]=e,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`auto`,o=Math.max(r,2),[s,c]=_B([t,n]);if(s===-1/0||c===1/0){var l=c===1/0?[s,...Array(r-1).fill(1/0)]:[...Array(r-1).fill(-1/0),c];return t>n?l.reverse():l}if(s===c)return rle(s,r,i);var{step:u,tickMin:d,tickMax:f}=bB(s,c,o,i,0,a===`snap125`?yB:vB),p=gB(d,f.add(new mB.default(.1).mul(u)),u);return t>n?p.reverse():p},SB=function(e,t){var[n,r]=e,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`auto`,[o,s]=_B([n,r]);if(o===-1/0||s===1/0)return[n,r];if(o===s)return[o];var c=a===`snap125`?yB:vB,l=Math.max(t,2),u=c(new mB.default(s).sub(o).div(l-1),i,0),d=[...gB(new mB.default(o),new mB.default(s),u),s];return i===!1&&(d=d.map(e=>Math.round(e))),n>r?d.reverse():d},ile=e=>e.rootProps.barCategoryGap,CB=e=>e.rootProps.stackOffset,wB=e=>e.rootProps.reverseStackOrder,TB=e=>e.options.chartName,ale=e=>e.rootProps.syncId,ole=e=>e.rootProps.syncMethod,sle=e=>e.options.eventEmitter,EB={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},DB={allowDecimals:!1,allowDuplicatedCategory:!0,allowDataOverflow:!1,angle:0,angleAxisId:0,axisLine:!0,axisLineType:`polygon`,cx:0,cy:0,hide:!1,includeHidden:!1,label:!1,niceTicks:`auto`,orientation:`outer`,reversed:!1,scale:`auto`,tick:!0,tickLine:!0,tickSize:8,type:`auto`,zIndex:EB.axis},OB={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,angle:0,axisLine:!0,includeHidden:!1,hide:!1,niceTicks:`auto`,label:!1,orientation:`right`,radiusAxisId:0,reversed:!1,scale:`auto`,stroke:`#ccc`,tick:!0,tickCount:5,tickLine:!0,type:`auto`,zIndex:EB.axis},kB=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function AB(e,t,n){if(n!==`auto`)return n;if(e!=null)return DL(e,t)?`category`:`number`}function jB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function MB(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?jB(Object(n),!0).forEach(function(t){cle(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jB(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cle(e,t,n){return(t=lle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lle(e){var t=ule(e,`string`);return typeof t==`symbol`?t:t+``}function ule(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var NB={allowDataOverflow:DB.allowDataOverflow,allowDecimals:DB.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:DB.angleAxisId,includeHidden:!1,name:void 0,reversed:DB.reversed,scale:DB.scale,tick:DB.tick,tickCount:void 0,ticks:void 0,type:DB.type,unit:void 0,niceTicks:`auto`},PB={allowDataOverflow:OB.allowDataOverflow,allowDecimals:OB.allowDecimals,allowDuplicatedCategory:OB.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:OB.radiusAxisId,includeHidden:OB.includeHidden,name:void 0,reversed:OB.reversed,scale:OB.scale,tick:OB.tick,tickCount:OB.tickCount,ticks:void 0,type:OB.type,unit:void 0,niceTicks:`auto`},FB=$([(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},bR],(e,t)=>{if(e!=null)return e;var n=AB(t,`angleAxis`,NB.type)??`category`;return MB(MB({},NB),{},{type:n})}),IB=$([(e,t)=>e.polarAxis.radiusAxis[t],bR],(e,t)=>{if(e!=null)return e;var n=AB(t,`radiusAxis`,PB.type)??`category`;return MB(MB({},PB),{},{type:n})}),LB=e=>e.polarOptions,RB=$([LL,RL,QL],Lce),zB=$([LB,RB],(e,t)=>{if(e!=null)return dN(e.innerRadius,t,0)}),BB=$([LB,RB],(e,t)=>{if(e!=null)return dN(e.outerRadius,t,t*.8)}),VB=$([LB],e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]});$([FB,VB],kB);var HB=$([RB,zB,BB],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});$([IB,HB],kB),$([vR,LB,zB,BB,LL,RL],(e,t,n,r,i,a)=>{if(!(e!==`centric`&&e!==`radial`||t==null||n==null||r==null)){var{cx:o,cy:s,startAngle:c,endAngle:l}=t;return{cx:dN(o,i,i/2),cy:dN(s,a,a/2),innerRadius:n,outerRadius:r,startAngle:c,endAngle:l,clockWise:!1}}});var UB=(e,t)=>t,WB=(e,t,n)=>n;function GB(e){return e?.id}function KB(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:i,dataKey:a}=n,o=new Map;return e.forEach(e=>{var t=e.data??r;if(!(t==null||t.length===0)){var n=GB(e);t.forEach((t,r)=>{var s=a==null||i?r:String(TL(t,a,null)),c=TL(t,e.dataKey,0),l=o.has(s)?o.get(s):{};Object.assign(l,{[n]:c}),o.set(s,l)})}}),Array.from(o.values())}function qB(e){return`stackId`in e&&e.stackId!=null&&e.dataKey!=null}var JB=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function YB(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function dle(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return!1}var XB=e=>{var t=vR(e);return t===`horizontal`?`xAxis`:t===`vertical`?`yAxis`:t===`centric`?`angleAxis`:`radiusAxis`},ZB=e=>e.tooltip.settings.axisId;function QB(e){if(e!=null){var t=e.ticks,n=e.bandwidth,r=e.range(),i=[Math.min(...r),Math.max(...r)];return{domain:()=>e.domain(),range:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(e){var t=i[0],n=i[1];return t<=n?e>=t&&e<=n:e>=n&&e<=t},bandwidth:n?()=>n.call(e):void 0,ticks:t?n=>t.call(e,n):void 0,map:(t,n)=>{var r=e(t);if(r!=null){if(e.bandwidth&&n!=null&&n.position){var i=e.bandwidth();switch(n.position){case`middle`:r+=i/2;break;case`end`:r+=i;break;default:break}}return r}}}}}var fle=(e,t)=>{if(t!=null)switch(e){case`linear`:if(!dB(t)){for(var n,r,i=0;i<t.length;i++){var a=t[i];vL(a)&&((n===void 0||a<n)&&(n=a),(r===void 0||a>r)&&(r=a))}return n!==void 0&&r!==void 0?[n,r]:void 0}return t;default:return t}};function $B(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ple(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function eV(e){let t,n,r;e.length===2?(t=e===$B||e===ple?e:mle,n=e,r=e):(t=$B,n=(t,n)=>$B(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function mle(){return 0}function tV(e){return e===null?NaN:+e}function*hle(e,t){if(t===void 0)for(let t of e)t!=null&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}var nV=eV($B),rV=nV.right;nV.left,eV(tV).center;var iV=class extends Map{constructor(e,t=vle){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(aV(this,e))}has(e){return super.has(aV(this,e))}set(e,t){return super.set(gle(this,e),t)}delete(e){return super.delete(_le(this,e))}};function aV({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function gle({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function _le({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function vle(e){return typeof e==`object`&&e?e.valueOf():e}function yle(e=$B){if(e===$B)return oV;if(typeof e!=`function`)throw TypeError(`compare is not a function`);return(t,n)=>{let r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function oV(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:+(e>t))}var ble=Math.sqrt(50),xle=Math.sqrt(10),Sle=Math.sqrt(2);function sV(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=ble?10:a>=xle?5:a>=Sle?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?sV(e,t,n*2):[s,c,l]}function cV(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?sV(t,e,n):sV(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r)if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o;else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function lV(e,t,n){return t=+t,e=+e,n=+n,sV(e,t,n)[2]}function uV(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?lV(t,e,n):lV(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function dV(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function fV(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function pV(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?oV:yle(i);r>n;){if(r-n>600){let a=r-n+1,o=t-n+1,s=Math.log(a),c=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*c*(a-c)/a)*(o-a/2<0?-1:1),u=Math.max(n,Math.floor(t-o*c/a+l)),d=Math.min(r,Math.floor(t+(a-o)*c/a+l));pV(e,t,u,d,i)}let a=e[t],o=n,s=r;for(mV(e,n,t),i(e[r],a)>0&&mV(e,n,r);o<s;){for(mV(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[n],a)===0?mV(e,n,s):(++s,mV(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function mV(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}function Cle(e,t,n){if(e=Float64Array.from(hle(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return fV(e);if(t>=1)return dV(e);var r,i=(r-1)*t,a=Math.floor(i),o=dV(pV(e,a).subarray(0,a+1));return o+(fV(e.subarray(a+1))-o)*(i-a)}}function wle(e,t,n=tV){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e);return o+(+n(e[a+1],a+1,e)-o)*(i-a)}}function Tle(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}function hV(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function gV(e,t){switch(arguments.length){case 0:break;case 1:typeof e==`function`?this.interpolator(e):this.range(e);break;default:this.domain(e),typeof t==`function`?this.interpolator(t):this.range(t);break}return this}var _V=Symbol(`implicit`);function vV(){var e=new iV,t=[],n=[],r=_V;function i(i){let a=e.get(i);if(a===void 0){if(r!==_V)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new iV;for(let r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return vV(t,n).unknown(r)},hV.apply(i,arguments),i}function yV(){var e=vV().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var e=t().length,d=i<r,f=d?i:r,p=d?r:i;a=(p-f)/Math.max(1,e-c+l*2),s&&(a=Math.floor(a)),f+=(p-f-a*(e-c))*u,o=a*(1-c),s&&(f=Math.round(f),o=Math.round(o));var m=Tle(e).map(function(e){return f+a*e});return n(d?m.reverse():m)}return e.domain=function(e){return arguments.length?(t(e),d()):t()},e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(e){return arguments.length?(s=!!e,d()):s},e.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},e.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},e.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},e.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},e.copy=function(){return yV(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},hV.apply(d(),arguments)}function bV(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return bV(t())},e}function xV(){return bV(yV.apply(null,arguments).paddingInner(1))}function SV(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function CV(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function wV(){}var TV=.7,EV=1/TV,DV=`\\s*([+-]?\\d+)\\s*`,OV=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,kV=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,AV=/^#([0-9a-f]{3,8})$/,jV=RegExp(`^rgb\\(${DV},${DV},${DV}\\)$`),MV=RegExp(`^rgb\\(${kV},${kV},${kV}\\)$`),NV=RegExp(`^rgba\\(${DV},${DV},${DV},${OV}\\)$`),PV=RegExp(`^rgba\\(${kV},${kV},${kV},${OV}\\)$`),FV=RegExp(`^hsl\\(${OV},${kV},${kV}\\)$`),IV=RegExp(`^hsla\\(${OV},${kV},${kV},${OV}\\)$`),LV={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};SV(wV,HV,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:RV,formatHex:RV,formatHex8:zV,formatHsl:BV,formatRgb:VV,toString:VV});function RV(){return this.rgb().formatHex()}function zV(){return this.rgb().formatHex8()}function BV(){return tH(this).formatHsl()}function VV(){return this.rgb().formatRgb()}function HV(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=AV.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?UV(t):n===3?new qV(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?WV(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?WV(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=jV.exec(e))?new qV(t[1],t[2],t[3],1):(t=MV.exec(e))?new qV(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=NV.exec(e))?WV(t[1],t[2],t[3],t[4]):(t=PV.exec(e))?WV(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=FV.exec(e))?eH(t[1],t[2]/100,t[3]/100,1):(t=IV.exec(e))?eH(t[1],t[2]/100,t[3]/100,t[4]):LV.hasOwnProperty(e)?UV(LV[e]):e===`transparent`?new qV(NaN,NaN,NaN,0):null}function UV(e){return new qV(e>>16&255,e>>8&255,e&255,1)}function WV(e,t,n,r){return r<=0&&(e=t=n=NaN),new qV(e,t,n,r)}function GV(e){return e instanceof wV||(e=HV(e)),e?(e=e.rgb(),new qV(e.r,e.g,e.b,e.opacity)):new qV}function KV(e,t,n,r){return arguments.length===1?GV(e):new qV(e,t,n,r??1)}function qV(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}SV(qV,KV,CV(wV,{brighter(e){return e=e==null?EV:EV**+e,new qV(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?TV:TV**+e,new qV(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new qV(QV(this.r),QV(this.g),QV(this.b),ZV(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:JV,formatHex:JV,formatHex8:YV,formatRgb:XV,toString:XV}));function JV(){return`#${$V(this.r)}${$V(this.g)}${$V(this.b)}`}function YV(){return`#${$V(this.r)}${$V(this.g)}${$V(this.b)}${$V((isNaN(this.opacity)?1:this.opacity)*255)}`}function XV(){let e=ZV(this.opacity);return`${e===1?`rgb(`:`rgba(`}${QV(this.r)}, ${QV(this.g)}, ${QV(this.b)}${e===1?`)`:`, ${e})`}`}function ZV(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function QV(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function $V(e){return e=QV(e),(e<16?`0`:``)+e.toString(16)}function eH(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new rH(e,t,n,r)}function tH(e){if(e instanceof rH)return new rH(e.h,e.s,e.l,e.opacity);if(e instanceof wV||(e=HV(e)),!e)return new rH;if(e instanceof rH)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new rH(o,s,c,e.opacity)}function nH(e,t,n,r){return arguments.length===1?tH(e):new rH(e,t,n,r??1)}function rH(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}SV(rH,nH,CV(wV,{brighter(e){return e=e==null?EV:EV**+e,new rH(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?TV:TV**+e,new rH(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new qV(oH(e>=240?e-240:e+120,i,r),oH(e,i,r),oH(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new rH(iH(this.h),aH(this.s),aH(this.l),ZV(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=ZV(this.opacity);return`${e===1?`hsl(`:`hsla(`}${iH(this.h)}, ${aH(this.s)*100}%, ${aH(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function iH(e){return e=(e||0)%360,e<0?e+360:e}function aH(e){return Math.max(0,Math.min(1,e||0))}function oH(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var sH=e=>()=>e;function cH(e,t){return function(n){return e+n*t}}function lH(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function uH(e){return(e=+e)==1?dH:function(t,n){return n-t?lH(t,n,e):sH(isNaN(t)?n:t)}}function dH(e,t){var n=t-e;return n?cH(e,n):sH(isNaN(e)?t:e)}var fH=(function e(t){var n=uH(t);function r(e,t){var r=n((e=KV(e)).r,(t=KV(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=dH(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function pH(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function mH(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function hH(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=wH(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function gH(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function _H(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function vH(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=wH(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var yH=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,bH=new RegExp(yH.source,`g`);function xH(e){return function(){return e}}function SH(e){return function(t){return e(t)+``}}function CH(e,t){var n=yH.lastIndex=bH.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=yH.exec(e))&&(i=bH.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:_H(r,i)})),n=bH.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?SH(c[0].x):xH(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function wH(e,t){var n=typeof t,r;return t==null||n===`boolean`?sH(t):(n===`number`?_H:n===`string`?(r=HV(t))?(t=r,fH):CH:t instanceof HV?fH:t instanceof Date?gH:mH(t)?pH:Array.isArray(t)?hH:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?vH:_H)(e,t)}function TH(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function EH(e,t){t===void 0&&(t=e,e=wH);for(var n=0,r=t.length-1,i=t[0],a=Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return a[t](e-t)}}function DH(e){return function(){return e}}function OH(e){return+e}var kH=[0,1];function AH(e){return e}function jH(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:DH(isNaN(t)?NaN:.5)}function MH(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function NH(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=jH(i,r),a=n(o,a)):(r=jH(r,i),a=n(a,o)),function(e){return a(r(e))}}function PH(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=jH(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=rV(e,t,1,r)-1;return a[n](i[n](t))}}function FH(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function IH(){var e=kH,t=kH,n=wH,r,i,a,o=AH,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==AH&&(o=MH(e[0],e[n-1])),s=n>2?PH:NH,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||=s(e.map(r),t,n))(r(o(i)))}return d.invert=function(n){return o(i((l||=s(t,e.map(r),_H))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,OH),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=TH,u()},d.clamp=function(e){return arguments.length?(o=e?!0:AH,u()):o!==AH},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function LH(){return IH()(AH,AH)}function RH(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function zH(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function BH(e){return e=zH(Math.abs(e)),e?e[1]:NaN}function VH(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function HH(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var UH=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function WH(e){if(!(t=UH.exec(e)))throw Error(`invalid format: `+e);var t;return new GH({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}WH.prototype=GH.prototype;function GH(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}GH.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function KH(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var qH;function JH(e,t){var n=zH(e,t);if(!n)return qH=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(qH=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+zH(e,Math.max(0,t+a-1))[0]}function YH(e,t){var n=zH(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var XH={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:RH,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>YH(e*100,t),r:YH,s:JH,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function ZH(e){return e}var QH=Array.prototype.map,$H=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function eU(e){var t=e.grouping===void 0||e.thousands===void 0?ZH:VH(QH.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?ZH:HH(QH.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e,l){e=WH(e);var u=e.fill,d=e.align,f=e.sign,p=e.symbol,m=e.zero,h=e.width,g=e.comma,_=e.precision,v=e.trim,y=e.type;y===`n`?(g=!0,y=`g`):XH[y]||(_===void 0&&(_=12),v=!0,y=`g`),(m||u===`0`&&d===`=`)&&(m=!0,u=`0`,d=`=`);var b=(l&&l.prefix!==void 0?l.prefix:``)+(p===`$`?n:p===`#`&&/[boxX]/.test(y)?`0`+y.toLowerCase():``),x=(p===`$`?r:/[%p]/.test(y)?o:``)+(l&&l.suffix!==void 0?l.suffix:``),S=XH[y],C=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function w(e){var n=b,r=x,o,l,p;if(y===`c`)r=S(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:S(Math.abs(e),_),v&&(e=KH(e)),w&&+e==0&&f!==`+`&&(w=!1),n=(w?f===`(`?f:s:f===`-`||f===`(`?``:f)+n,r=(y===`s`&&!isNaN(e)&&qH!==void 0?$H[8+qH/3]:``)+r+(w&&f===`(`?`)`:``),C){for(o=-1,l=e.length;++o<l;)if(p=e.charCodeAt(o),48>p||p>57){r=(p===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}g&&!m&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<h?Array(h-T+1).join(u):``;switch(g&&m&&(e=t(E+e,E.length?h-r.length:1/0),E=``),d){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r;break}return a(e)}return w.toString=function(){return e+``},w}function u(e,t){var n=Math.max(-8,Math.min(8,Math.floor(BH(t)/3)))*3,r=10**-n,i=l((e=WH(e),e.type=`f`,e),{suffix:$H[8+n/3]});return function(e){return i(r*e)}}return{format:l,formatPrefix:u}}var tU,nU,rU;iU({thousands:`,`,grouping:[3],currency:[`$`,``]});function iU(e){return tU=eU(e),nU=tU.format,rU=tU.formatPrefix,tU}function aU(e){return Math.max(0,-BH(Math.abs(e)))}function oU(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(BH(t)/3)))*3-BH(Math.abs(e)))}function sU(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,BH(t)-BH(e))+1}function cU(e,t,n,r){var i=uV(e,t,n),a;switch(r=WH(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=oU(i,o))&&(r.precision=a),rU(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=sU(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=aU(i))&&(r.precision=a-(r.type===`%`)*2);break}return nU(r)}function lU(e){var t=e.domain;return e.ticks=function(e){var n=t();return cV(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return cU(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-- >0;){if(l=lV(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function uU(){var e=LH();return e.copy=function(){return FH(e,uU())},hV.apply(e,arguments),lU(e)}function dU(e){var t;function n(e){return e==null||isNaN(e=+e)?t:e}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Array.from(t,OH),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return dU(e).unknown(t)},e=arguments.length?Array.from(e,OH):[0,1],lU(n)}function fU(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function pU(e){return Math.log(e)}function mU(e){return Math.exp(e)}function hU(e){return-Math.log(-e)}function gU(e){return-Math.exp(-e)}function _U(e){return isFinite(e)?+(`1e`+e):e<0?0:e}function vU(e){return e===10?_U:e===Math.E?Math.exp:t=>e**+t}function yU(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function bU(e){return(t,n)=>-e(-t,n)}function xU(e){let t=e(pU,mU),n=t.domain,r=10,i,a;function o(){return i=yU(r),a=vU(r),n()[0]<0?(i=bU(i),a=bU(a),e(hU,gU)):e(pU,mU),t}return t.base=function(e){return arguments.length?(r=+e,o()):r},t.domain=function(e){return arguments.length?(n(e),o()):n()},t.ticks=e=>{let t=n(),o=t[0],s=t[t.length-1],c=s<o;c&&([o,s]=[s,o]);let l=i(o),u=i(s),d,f,p=e==null?10:+e,m=[];if(!(r%1)&&u-l<p){if(l=Math.floor(l),u=Math.ceil(u),o>0){for(;l<=u;++l)for(d=1;d<r;++d)if(f=l<0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}}else for(;l<=u;++l)for(d=r-1;d>=1;--d)if(f=l>0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}m.length*2<p&&(m=cV(o,s,p))}else m=cV(l,u,Math.min(u-l,p)).map(a);return c?m.reverse():m},t.tickFormat=(e,n)=>{if(e??=10,n??=r===10?`s`:`,`,typeof n!=`function`&&(!(r%1)&&(n=WH(n)).precision==null&&(n.trim=!0),n=nU(n)),e===1/0)return n;let o=Math.max(1,r*e/t.ticks().length);return e=>{let t=e/a(Math.round(i(e)));return t*r<r-.5&&(t*=r),t<=o?n(e):``}},t.nice=()=>n(fU(n(),{floor:e=>a(Math.floor(i(e))),ceil:e=>a(Math.ceil(i(e)))})),t}function SU(){let e=xU(IH()).domain([1,10]);return e.copy=()=>FH(e,SU()).base(e.base()),hV.apply(e,arguments),e}function CU(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function wU(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function TU(e){var t=1,n=e(CU(t),wU(t));return n.constant=function(n){return arguments.length?e(CU(t=+n),wU(t)):t},lU(n)}function EU(){var e=TU(IH());return e.copy=function(){return FH(e,EU()).constant(e.constant())},hV.apply(e,arguments)}function DU(e){return function(t){return t<0?-((-t)**+e):t**+e}}function OU(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function kU(e){return e<0?-e*e:e*e}function AU(e){var t=e(AH,AH),n=1;function r(){return n===1?e(AH,AH):n===.5?e(OU,kU):e(DU(n),DU(1/n))}return t.exponent=function(e){return arguments.length?(n=+e,r()):n},lU(t)}function jU(){var e=AU(IH());return e.copy=function(){return FH(e,jU()).exponent(e.exponent())},hV.apply(e,arguments),e}function MU(){return jU.apply(null,arguments).exponent(.5)}function NU(e){return Math.sign(e)*e*e}function PU(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function FU(){var e=LH(),t=[0,1],n=!1,r;function i(t){var i=PU(e(t));return isNaN(i)?r:n?Math.round(i):i}return i.invert=function(t){return e.invert(NU(t))},i.domain=function(t){return arguments.length?(e.domain(t),i):e.domain()},i.range=function(n){return arguments.length?(e.range((t=Array.from(n,OH)).map(NU)),i):t.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(n=!!e,i):n},i.clamp=function(t){return arguments.length?(e.clamp(t),i):e.clamp()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return FU(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},hV.apply(i,arguments),lU(i)}function IU(){var e=[],t=[],n=[],r;function i(){var r=0,i=Math.max(1,t.length);for(n=Array(i-1);++r<i;)n[r-1]=wle(e,r/i);return a}function a(e){return e==null||isNaN(e=+e)?r:t[rV(n,e)]}return a.invertExtent=function(r){var i=t.indexOf(r);return i<0?[NaN,NaN]:[i>0?n[i-1]:e[0],i<n.length?n[i]:e[e.length-1]]},a.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort($B),i()},a.range=function(e){return arguments.length?(t=Array.from(e),i()):t.slice()},a.unknown=function(e){return arguments.length?(r=e,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return IU().domain(e).range(t).unknown(r)},hV.apply(a,arguments)}function LU(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(e){return e!=null&&e<=e?i[rV(r,e,0,n)]:a}function s(){var i=-1;for(r=Array(n);++i<n;)r[i]=((i+1)*t-(i-n)*e)/(n+1);return o}return o.domain=function(n){return arguments.length?([e,t]=n,e=+e,t=+t,s()):[e,t]},o.range=function(e){return arguments.length?(n=(i=Array.from(e)).length-1,s()):i.slice()},o.invertExtent=function(a){var o=i.indexOf(a);return o<0?[NaN,NaN]:o<1?[e,r[0]]:o>=n?[r[n-1],t]:[r[o-1],r[o]]},o.unknown=function(e){return arguments.length&&(a=e),o},o.thresholds=function(){return r.slice()},o.copy=function(){return LU().domain([e,t]).range(i).unknown(a)},hV.apply(lU(o),arguments)}function RU(){var e=[.5],t=[0,1],n,r=1;function i(i){return i!=null&&i<=i?t[rV(e,i,0,r)]:n}return i.domain=function(n){return arguments.length?(e=Array.from(n),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(n){return arguments.length?(t=Array.from(n),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(n){var r=t.indexOf(n);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(n=e,i):n},i.copy=function(){return RU().domain(e).range(t).unknown(n)},hV.apply(i,arguments)}var zU=new Date,BU=new Date;function VU(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>VU(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(zU.setTime(+t),BU.setTime(+r),e(zU),e(BU),Math.floor(n(zU,BU))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var HU=VU(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);HU.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?VU(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):HU),HU.range;var UU=1e3,WU=UU*60,GU=WU*60,KU=GU*24,qU=KU*7,JU=KU*30,YU=KU*365,XU=VU(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*UU)},(e,t)=>(t-e)/UU,e=>e.getUTCSeconds());XU.range;var ZU=VU(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*UU)},(e,t)=>{e.setTime(+e+t*WU)},(e,t)=>(t-e)/WU,e=>e.getMinutes());ZU.range;var QU=VU(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*WU)},(e,t)=>(t-e)/WU,e=>e.getUTCMinutes());QU.range;var $U=VU(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*UU-e.getMinutes()*WU)},(e,t)=>{e.setTime(+e+t*GU)},(e,t)=>(t-e)/GU,e=>e.getHours());$U.range;var eW=VU(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*GU)},(e,t)=>(t-e)/GU,e=>e.getUTCHours());eW.range;var tW=VU(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*WU)/KU,e=>e.getDate()-1);tW.range;var nW=VU(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/KU,e=>e.getUTCDate()-1);nW.range;var rW=VU(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/KU,e=>Math.floor(e/KU));rW.range;function iW(e){return VU(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*WU)/qU)}var aW=iW(0),oW=iW(1),sW=iW(2),cW=iW(3),lW=iW(4),uW=iW(5),dW=iW(6);aW.range,oW.range,sW.range,cW.range,lW.range,uW.range,dW.range;function fW(e){return VU(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/qU)}var pW=fW(0),mW=fW(1),hW=fW(2),gW=fW(3),_W=fW(4),vW=fW(5),yW=fW(6);pW.range,mW.range,hW.range,gW.range,_W.range,vW.range,yW.range;var bW=VU(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());bW.range;var xW=VU(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());xW.range;var SW=VU(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());SW.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:VU(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),SW.range;var CW=VU(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());CW.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:VU(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),CW.range;function wW(e,t,n,r,i,a){let o=[[XU,1,UU],[XU,5,5*UU],[XU,15,15*UU],[XU,30,30*UU],[a,1,WU],[a,5,5*WU],[a,15,15*WU],[a,30,30*WU],[i,1,GU],[i,3,3*GU],[i,6,6*GU],[i,12,12*GU],[r,1,KU],[r,2,2*KU],[n,1,qU],[t,1,JU],[t,3,3*JU],[e,1,YU]];function s(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let i=n&&typeof n.range==`function`?n:c(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a}function c(t,n,r){let i=Math.abs(n-t)/r,a=eV(([,,e])=>e).right(o,i);if(a===o.length)return e.every(uV(t/YU,n/YU,r));if(a===0)return HU.every(Math.max(uV(t,n,r),1));let[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[s,c]}var[TW,EW]=wW(CW,xW,pW,rW,eW,QU),[DW,OW]=wW(SW,bW,aW,tW,$U,ZU);function kW(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function AW(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function jW(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function MW(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=zW(i),u=BW(i),d=zW(a),f=BW(a),p=zW(o),m=BW(o),h=zW(s),g=BW(s),_=zW(c),v=BW(c),y={a:N,A:P,b:F,B:I,c:null,d:sG,e:sG,f:fG,g:CG,G:TG,H:cG,I:lG,j:uG,L:dG,m:pG,M:mG,p:L,q:R,Q:JG,s:YG,S:hG,u:gG,U:_G,V:yG,w:bG,W:xG,x:null,X:null,y:SG,Y:wG,Z:EG,"%":qG},b={a:ee,A:z,b:B,B:V,c:null,d:DG,e:DG,f:MG,g:UG,G:GG,H:OG,I:kG,j:AG,L:jG,m:NG,M:PG,p:te,q:ne,Q:JG,s:YG,S:FG,u:IG,U:LG,V:zG,w:BG,W:VG,x:null,X:null,y:HG,Y:WG,Z:KG,"%":qG},x={a:E,A:D,b:O,B:k,c:A,d:ZW,e:ZW,f:rG,g:qW,G:KW,H:$W,I:$W,j:QW,L:nG,m:XW,M:eG,p:T,q:YW,Q:aG,s:oG,S:tG,u:HW,U:UW,V:WW,w:VW,W:GW,x:j,X:M,y:qW,Y:KW,Z:JW,"%":iG};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=NW[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=jW(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=AW(jW(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?mW.ceil(a):mW(a),a=nW.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=kW(jW(r.y,0,1)),o=a.getDay(),a=o>4||o===0?oW.ceil(a):oW(a),a=tW.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else (`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?AW(jW(r.y,0,1)).getUTCDay():kW(jW(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,AW(r)):kW(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in NW?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function A(e,n,r){return w(e,t,n,r)}function j(e,t,r){return w(e,n,t,r)}function M(e,t,n){return w(e,r,t,n)}function N(e){return o[e.getDay()]}function P(e){return a[e.getDay()]}function F(e){return c[e.getMonth()]}function I(e){return s[e.getMonth()]}function L(e){return i[+(e.getHours()>=12)]}function R(e){return 1+~~(e.getMonth()/3)}function ee(e){return o[e.getUTCDay()]}function z(e){return a[e.getUTCDay()]}function B(e){return c[e.getUTCMonth()]}function V(e){return s[e.getUTCMonth()]}function te(e){return i[+(e.getUTCHours()>=12)]}function ne(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var NW={"-":``,_:` `,0:`0`},PW=/^\s*\d+/,FW=/^%/,IW=/[\\^$*+?|[\]().{}]/g;function LW(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function RW(e){return e.replace(IW,`\\$&`)}function zW(e){return RegExp(`^(?:`+e.map(RW).join(`|`)+`)`,`i`)}function BW(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function VW(e,t,n){var r=PW.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function HW(e,t,n){var r=PW.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function UW(e,t,n){var r=PW.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function WW(e,t,n){var r=PW.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function GW(e,t,n){var r=PW.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function KW(e,t,n){var r=PW.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function qW(e,t,n){var r=PW.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function JW(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function YW(e,t,n){var r=PW.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function XW(e,t,n){var r=PW.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ZW(e,t,n){var r=PW.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function QW(e,t,n){var r=PW.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function $W(e,t,n){var r=PW.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function eG(e,t,n){var r=PW.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function tG(e,t,n){var r=PW.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function nG(e,t,n){var r=PW.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function rG(e,t,n){var r=PW.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function iG(e,t,n){var r=FW.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function aG(e,t,n){var r=PW.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function oG(e,t,n){var r=PW.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function sG(e,t){return LW(e.getDate(),t,2)}function cG(e,t){return LW(e.getHours(),t,2)}function lG(e,t){return LW(e.getHours()%12||12,t,2)}function uG(e,t){return LW(1+tW.count(SW(e),e),t,3)}function dG(e,t){return LW(e.getMilliseconds(),t,3)}function fG(e,t){return dG(e,t)+`000`}function pG(e,t){return LW(e.getMonth()+1,t,2)}function mG(e,t){return LW(e.getMinutes(),t,2)}function hG(e,t){return LW(e.getSeconds(),t,2)}function gG(e){var t=e.getDay();return t===0?7:t}function _G(e,t){return LW(aW.count(SW(e)-1,e),t,2)}function vG(e){var t=e.getDay();return t>=4||t===0?lW(e):lW.ceil(e)}function yG(e,t){return e=vG(e),LW(lW.count(SW(e),e)+(SW(e).getDay()===4),t,2)}function bG(e){return e.getDay()}function xG(e,t){return LW(oW.count(SW(e)-1,e),t,2)}function SG(e,t){return LW(e.getFullYear()%100,t,2)}function CG(e,t){return e=vG(e),LW(e.getFullYear()%100,t,2)}function wG(e,t){return LW(e.getFullYear()%1e4,t,4)}function TG(e,t){var n=e.getDay();return e=n>=4||n===0?lW(e):lW.ceil(e),LW(e.getFullYear()%1e4,t,4)}function EG(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+LW(t/60|0,`0`,2)+LW(t%60,`0`,2)}function DG(e,t){return LW(e.getUTCDate(),t,2)}function OG(e,t){return LW(e.getUTCHours(),t,2)}function kG(e,t){return LW(e.getUTCHours()%12||12,t,2)}function AG(e,t){return LW(1+nW.count(CW(e),e),t,3)}function jG(e,t){return LW(e.getUTCMilliseconds(),t,3)}function MG(e,t){return jG(e,t)+`000`}function NG(e,t){return LW(e.getUTCMonth()+1,t,2)}function PG(e,t){return LW(e.getUTCMinutes(),t,2)}function FG(e,t){return LW(e.getUTCSeconds(),t,2)}function IG(e){var t=e.getUTCDay();return t===0?7:t}function LG(e,t){return LW(pW.count(CW(e)-1,e),t,2)}function RG(e){var t=e.getUTCDay();return t>=4||t===0?_W(e):_W.ceil(e)}function zG(e,t){return e=RG(e),LW(_W.count(CW(e),e)+(CW(e).getUTCDay()===4),t,2)}function BG(e){return e.getUTCDay()}function VG(e,t){return LW(mW.count(CW(e)-1,e),t,2)}function HG(e,t){return LW(e.getUTCFullYear()%100,t,2)}function UG(e,t){return e=RG(e),LW(e.getUTCFullYear()%100,t,2)}function WG(e,t){return LW(e.getUTCFullYear()%1e4,t,4)}function GG(e,t){var n=e.getUTCDay();return e=n>=4||n===0?_W(e):_W.ceil(e),LW(e.getUTCFullYear()%1e4,t,4)}function KG(){return`+0000`}function qG(){return`%`}function JG(e){return+e}function YG(e){return Math.floor(e/1e3)}var XG,ZG,QG;$G({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function $G(e){return XG=MW(e),ZG=XG.format,XG.parse,QG=XG.utcFormat,XG.utcParse,XG}function eK(e){return new Date(e)}function tK(e){return e instanceof Date?+e:+new Date(+e)}function nK(e,t,n,r,i,a,o,s,c,l){var u=LH(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e)<e?p:s(e)<e?m:o(e)<e?h:a(e)<e?g:r(e)<e?i(e)<e?_:v:n(e)<e?y:b)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,tK)):f().map(eK)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return t==null?x:l(t)},u.nice=function(e){var n=f();return(!e||typeof e.range!=`function`)&&(e=t(n[0],n[n.length-1],e??10)),e?f(fU(n,e)):u},u.copy=function(){return FH(u,nK(e,t,n,r,i,a,o,s,c,l))},u}function rK(){return hV.apply(nK(DW,OW,SW,bW,aW,tW,$U,ZU,XU,ZG).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function iK(){return hV.apply(nK(TW,EW,CW,xW,pW,nW,eW,QU,XU,QG).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function aK(){var e=0,t=1,n,r,i,a,o=AH,s=!1,c;function l(e){return e==null||isNaN(e=+e)?c:o(i===0?.5:(e=(a(e)-n)*i,s?Math.max(0,Math.min(1,e)):e))}l.domain=function(o){return arguments.length?([e,t]=o,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),l):[e,t]},l.clamp=function(e){return arguments.length?(s=!!e,l):s},l.interpolator=function(e){return arguments.length?(o=e,l):o};function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,o=e(n,r),l):[o(0),o(1)]}}return l.range=u(wH),l.rangeRound=u(TH),l.unknown=function(e){return arguments.length?(c=e,l):c},function(o){return a=o,n=o(e),r=o(t),i=n===r?0:1/(r-n),l}}function oK(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function sK(){var e=lU(aK()(AH));return e.copy=function(){return oK(e,sK())},gV.apply(e,arguments)}function cK(){var e=xU(aK()).domain([1,10]);return e.copy=function(){return oK(e,cK()).base(e.base())},gV.apply(e,arguments)}function lK(){var e=TU(aK());return e.copy=function(){return oK(e,lK()).constant(e.constant())},gV.apply(e,arguments)}function uK(){var e=AU(aK());return e.copy=function(){return oK(e,uK()).exponent(e.exponent())},gV.apply(e,arguments)}function dK(){return uK.apply(null,arguments).exponent(.5)}function fK(){var e=[],t=AH;function n(n){if(n!=null&&!isNaN(n=+n))return t((rV(e,n,1)-1)/(e.length-1))}return n.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort($B),n},n.interpolator=function(e){return arguments.length?(t=e,n):t},n.range=function(){return e.map((n,r)=>t(r/(e.length-1)))},n.quantiles=function(t){return Array.from({length:t+1},(n,r)=>Cle(e,r/t))},n.copy=function(){return fK(t).domain(e)},gV.apply(n,arguments)}function pK(){var e=0,t=.5,n=1,r=1,i,a,o,s,c,l=AH,u,d=!1,f;function p(e){return isNaN(e=+e)?f:(e=.5+((e=+u(e))-a)*(r*e<r*a?s:c),l(d?Math.max(0,Math.min(1,e)):e))}p.domain=function(l){return arguments.length?([e,t,n]=l,i=u(e=+e),a=u(t=+t),o=u(n=+n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p):[e,t,n]},p.clamp=function(e){return arguments.length?(d=!!e,p):d},p.interpolator=function(e){return arguments.length?(l=e,p):l};function m(e){return function(t){var n,r,i;return arguments.length?([n,r,i]=t,l=EH(e,[n,r,i]),p):[l(0),l(.5),l(1)]}}return p.range=m(wH),p.rangeRound=m(TH),p.unknown=function(e){return arguments.length?(f=e,p):f},function(l){return u=l,i=l(e),a=l(t),o=l(n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p}}function mK(){var e=lU(pK()(AH));return e.copy=function(){return oK(e,mK())},gV.apply(e,arguments)}function hK(){var e=xU(pK()).domain([.1,1,10]);return e.copy=function(){return oK(e,hK()).base(e.base())},gV.apply(e,arguments)}function gK(){var e=TU(pK());return e.copy=function(){return oK(e,gK()).constant(e.constant())},gV.apply(e,arguments)}function _K(){var e=AU(pK());return e.copy=function(){return oK(e,_K()).exponent(e.exponent())},gV.apply(e,arguments)}function vK(){return _K.apply(null,arguments).exponent(.5)}var yK=g({scaleBand:()=>yV,scaleDiverging:()=>mK,scaleDivergingLog:()=>hK,scaleDivergingPow:()=>_K,scaleDivergingSqrt:()=>vK,scaleDivergingSymlog:()=>gK,scaleIdentity:()=>dU,scaleImplicit:()=>_V,scaleLinear:()=>uU,scaleLog:()=>SU,scaleOrdinal:()=>vV,scalePoint:()=>xV,scalePow:()=>jU,scaleQuantile:()=>IU,scaleQuantize:()=>LU,scaleRadial:()=>FU,scaleSequential:()=>sK,scaleSequentialLog:()=>cK,scaleSequentialPow:()=>uK,scaleSequentialQuantile:()=>fK,scaleSequentialSqrt:()=>dK,scaleSequentialSymlog:()=>lK,scaleSqrt:()=>MU,scaleSymlog:()=>EU,scaleThreshold:()=>RU,scaleTime:()=>rK,scaleUtc:()=>iK,tickFormat:()=>cU});function bK(e){var t=yK;if(e in t&&typeof t[e]==`function`)return t[e]();var n=`scale${gN(e)}`;if(n in t&&typeof t[n]==`function`)return t[n]()}function xK(e,t,n){if(typeof e==`function`)return e.copy().domain(t).range(n);if(e!=null){var r=bK(e);if(r!=null)return r.domain(t).range(n),r}}function SK(e,t,n,r){if(!(n==null||r==null))return typeof e.scale==`function`?xK(e.scale,n,r):xK(t,n,r)}function CK(e){return`scale${gN(e)}`}function wK(e){return CK(e)in yK}var TK=(e,t,n)=>{if(e!=null){var{scale:r,type:i}=e;if(r===`auto`)return i===`category`&&n&&(n.indexOf(`LineChart`)>=0||n.indexOf(`AreaChart`)>=0||n.indexOf(`ComposedChart`)>=0&&!t)?`point`:i===`category`?`band`:`linear`;if(typeof r==`string`)return wK(r)?r:`point`}};function EK(e,t){for(var n=0,r=e.length,i=e[0]<e[e.length-1];n<r;){var a=Math.floor((n+r)/2);(i?e[a]<t:e[a]>t)?n=a+1:r=a}return n}function DK(e,t){if(e){var n=t??e.domain(),r=n.map(t=>e(t)??0),i=e.range();if(!(n.length===0||i.length<2))return e=>{var t=EK(r,e);if(t<=0)return n[0];if(t>=n.length)return n[n.length-1];var i=r[t-1]??0,a=r[t]??0;return Math.abs(e-i)<=Math.abs(e-a)?n[t-1]:n[t]}}}function OK(e){if(e!=null)return`invert`in e&&typeof e.invert==`function`?e.invert.bind(e):DK(e,void 0)}var kK=v($ce());function AK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jK(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?AK(Object(n),!0).forEach(function(t){MK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function MK(e,t,n){return(t=NK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NK(e){var t=PK(e,`string`);return typeof t==`symbol`?t:t+``}function PK(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var FK=[0,`auto`],IK={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:`preserveEnd`,minTickGap:5,mirror:!1,name:void 0,orientation:`bottom`,padding:{left:0,right:0},reversed:!1,scale:`auto`,tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:`category`,unit:void 0,niceTicks:`auto`},LK=(e,t)=>e.cartesianAxis.xAxis[t],RK=(e,t)=>LK(e,t)??IK,zK={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:FK,hide:!0,id:0,includeHidden:!1,interval:`preserveEnd`,minTickGap:5,mirror:!1,name:void 0,orientation:`left`,padding:{top:0,bottom:0},reversed:!1,scale:`auto`,tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:`number`,unit:void 0,niceTicks:`auto`,width:60},BK=(e,t)=>e.cartesianAxis.yAxis[t],VK=(e,t)=>BK(e,t)??zK,HK={domain:[0,`auto`],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:``,range:[64,64],scale:`auto`,type:`number`,unit:``},UK=(e,t)=>e.cartesianAxis.zAxis[t]??HK,WK=(e,t,n)=>{switch(t){case`xAxis`:return RK(e,n);case`yAxis`:return VK(e,n);case`zAxis`:return UK(e,n);case`angleAxis`:return FB(e,n);case`radiusAxis`:return IB(e,n);default:throw Error(`Unexpected axis type: ${t}`)}},GK=(e,t,n)=>{switch(t){case`xAxis`:return RK(e,n);case`yAxis`:return VK(e,n);default:throw Error(`Unexpected axis type: ${t}`)}},KK=(e,t,n)=>{switch(t){case`xAxis`:return RK(e,n);case`yAxis`:return VK(e,n);case`angleAxis`:return FB(e,n);case`radiusAxis`:return IB(e,n);default:throw Error(`Unexpected axis type: ${t}`)}},qK=e=>e.graphicalItems.cartesianItems.some(e=>e.type===`bar`)||e.graphicalItems.polarItems.some(e=>e.type===`radialBar`);function JK(e,t){return n=>{switch(e){case`xAxis`:return`xAxisId`in n&&n.xAxisId===t;case`yAxis`:return`yAxisId`in n&&n.yAxisId===t;case`zAxis`:return`zAxisId`in n&&n.zAxisId===t;case`angleAxis`:return`angleAxisId`in n&&n.angleAxisId===t;case`radiusAxis`:return`radiusAxisId`in n&&n.radiusAxisId===t;default:return!1}}}var YK=e=>e.graphicalItems.cartesianItems,XK=$([UB,WB],JK),ZK=(e,t,n)=>e.filter(n).filter(e=>t?.includeHidden===!0?!0:!e.hide),QK=$([YK,WK,XK],ZK,{memoizeOptions:{resultEqualityCheck:YB}}),$K=$([QK],e=>e.filter(e=>e.type===`area`||e.type===`bar`).filter(qB)),eq=e=>e.filter(e=>!(`stackId`in e)||e.stackId===void 0),tq=$([QK],eq),nq=e=>e.map(e=>e.data).filter(Boolean).flat(1),rq=$([QK],e=>e.some(e=>!e.data)),iq=$([QK],nq,{memoizeOptions:{resultEqualityCheck:YB}}),aq=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:i}=t;return e.length>0?e:n.slice(r,i+1)},oq=$([iq,uB],aq),sq=(e,t,n)=>t?.dataKey==null?n.length>0?n.map(e=>e.dataKey).flatMap(t=>e.map(e=>({value:TL(e,t)}))):e.map(e=>({value:e})):e.map(e=>({value:TL(e,t.dataKey)})),cq=(e,t,n,r,i,a)=>{var{chartData:o=[],dataStartIndex:s,dataEndIndex:c}=r,l=sq(e,t,n);return i&&t?.dataKey!=null&&a.length>0?[...o.slice(s,c+1).map(e=>({value:TL(e,t.dataKey)})).filter(e=>e.value!=null),...l]:l},lq=$([oq,WK,QK,uB,rq,iq],cq);function uq(e){if(cN(e)||e instanceof Date){var t=Number(e);if(vL(t))return t}}function dq(e){if(Array.isArray(e)){var t=[uq(e[0]),uq(e[1])];return dB(t)?t:void 0}var n=uq(e);if(n!=null)return[n,n]}function fq(e){return e.map(uq).filter(_N)}function pq(e,t){var n=uq(e),r=uq(t);return n==null&&r==null?0:n==null?-1:r==null?1:n-r}var mq=$([lq],e=>e?.map(e=>e.value).sort(pq));function hq(e,t){switch(e){case`xAxis`:return t.direction===`x`;case`yAxis`:return t.direction===`y`;default:return!1}}function gq(e,t,n){if(!n||!n.length)return[];var r;if(typeof t==`number`&&!aN(t))r=t;else if(Array.isArray(t)){var i=fq(t);i.length>0&&(r=Math.max(...i))}return r==null?[]:fq(n.flatMap(t=>{var n=TL(e,t.dataKey),i,a;if(Array.isArray(n)?[i,a]=n:i=a=n,!(!vL(i)||!vL(a)))return[r-i,r+a]}))}var _q=e=>KK(e,XB(e),ZB(e)),vq=$([_q],e=>e?.dataKey),yq=$([$K,uB,_q],KB),bq=(e,t,n,r)=>{var i=t.reduce((e,t)=>{if(t.stackId==null)return e;var n=e[t.stackId];return n??=[],n.push(t),e[t.stackId]=n,e},{});return Object.fromEntries(Object.entries(i).map(t=>{var[i,a]=t,o=r?[...a].reverse():a;return[i,{stackedData:kL(e,o.map(GB),n),graphicalItems:o}]}))},xq=$([yq,$K,CB,wB],bq),Sq=(e,t,n,r)=>{var{dataStartIndex:i,dataEndIndex:a}=t;if(r==null&&n!==`zAxis`){var o=ML(e,i,a);if(!(o!=null&&o[0]===0&&o[1]===0))return o}},Cq=$([WK],e=>e.allowDataOverflow),wq=e=>{if(e==null||!(`domain`in e))return FK;if(e.domain!=null)return e.domain;if(`ticks`in e&&e.ticks!=null){if(e.type===`number`){var t=fq(e.ticks);return[Math.min(...t),Math.max(...t)]}if(e.type===`category`)return e.ticks.map(String)}return e?.domain??FK},Tq=$([WK],wq),Eq=$([Tq,Cq],pB),Dq=$([xq,cB,UB,Eq],Sq,{memoizeOptions:{resultEqualityCheck:JB}}),Oq=e=>e.errorBars,kq=(e,t,n)=>e.flatMap(e=>t[e.id]).filter(Boolean).filter(e=>hq(n,e)),Aq=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter(Boolean);if(r.length!==0){var i=r.flat();return[Math.min(...i),Math.max(...i)]}},jq=function(e,t,n,r,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],o,s;if(n.length>0&&n.forEach(e=>{var n=e.data==null?a:[...e.data],c=r[e.id]?.filter(e=>hq(i,e));n.forEach(n=>{var r=TL(n,t.dataKey??e.dataKey),i=gq(n,r,c);if(i.length>=2){var a=Math.min(...i),l=Math.max(...i);(o==null||a<o)&&(o=a),(s==null||l>s)&&(s=l)}var u=dq(r);u!=null&&(o=o==null?u[0]:Math.min(o,u[0]),s=s==null?u[1]:Math.max(s,u[1]))})}),t?.dataKey!=null&&n.length===0&&e.forEach(e=>{var n=dq(TL(e,t.dataKey));n!=null&&(o=o==null?n[0]:Math.min(o,n[0]),s=s==null?n[1]:Math.max(s,n[1]))}),vL(o)&&vL(s))return[o,s]},Mq=$([oq,WK,tq,Oq,UB,ele],jq,{memoizeOptions:{resultEqualityCheck:JB}});function Nq(e){var{value:t}=e;if(cN(t)||t instanceof Date)return t}var Pq=(e,t,n)=>{var r=e.map(Nq).filter(e=>e!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&fN(r))?(0,kK.default)(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},Fq=e=>e.referenceElements.dots,Iq=(e,t,n)=>e.filter(e=>e.ifOverflow===`extendDomain`).filter(e=>t===`xAxis`?e.xAxisId===n:e.yAxisId===n),Lq=$([Fq,UB,WB],Iq),Rq=e=>e.referenceElements.areas,zq=$([Rq,UB,WB],Iq),Bq=e=>e.referenceElements.lines,Vq=$([Bq,UB,WB],Iq),Hq=(e,t)=>{if(e!=null){var n=fq(e.map(e=>t===`xAxis`?e.x:e.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Uq=$(Lq,UB,Hq),Wq=(e,t)=>{if(e!=null){var n=fq(e.flatMap(e=>[t===`xAxis`?e.x1:e.y1,t===`xAxis`?e.x2:e.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Gq=$([zq,UB],Wq);function Kq(e){if(e.x!=null)return fq([e.x]);var t=e.segment?.map(e=>e.x);return t==null||t.length===0?[]:fq(t)}function qq(e){if(e.y!=null)return fq([e.y]);var t=e.segment?.map(e=>e.y);return t==null||t.length===0?[]:fq(t)}var Jq=(e,t)=>{if(e!=null){var n=e.flatMap(e=>t===`xAxis`?Kq(e):qq(e));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Yq=$(Uq,$([Vq,UB],Jq),Gq,(e,t,n)=>Aq(e,n,t)),Xq=(e,t,n,r,i,a,o,s)=>n??nle(t,o===`vertical`&&s===`xAxis`||o===`horizontal`&&s===`yAxis`?Aq(r,a,i):Aq(a,i),e.allowDataOverflow),Zq=$([WK,Tq,Eq,Dq,Mq,Yq,vR,UB],Xq,{memoizeOptions:{resultEqualityCheck:JB}}),Qq=[0,1],$q=(e,t,n,r,i,a,o)=>{if(!((e==null||n==null||n.length===0)&&o===void 0)){var{dataKey:s,type:c}=e,l=DL(t,a);return l&&s==null?(0,kK.default)(0,n?.length??0):c===`category`?Pq(r,e,l):i===`expand`&&!l?Qq:o}},eJ=$([WK,vR,oq,lq,CB,UB,Zq],$q),tJ=$([WK,qK,TB],TK),nJ=(e,t,n)=>{var{niceTicks:r}=t;if(r!==`none`){var i=wq(t),a=Array.isArray(i)&&(i[0]===`auto`||i[1]===`auto`);if((r===`snap125`||r===`adaptive`)&&t!=null&&t.tickCount&&dB(e)){if(a)return xB(e,t.tickCount,t.allowDecimals,r);if(t.type===`number`)return SB(e,t.tickCount,t.allowDecimals,r)}if(r===`auto`&&n===`linear`&&t!=null&&t.tickCount){if(a&&dB(e))return xB(e,t.tickCount,t.allowDecimals,`adaptive`);if(t.type===`number`&&dB(e))return SB(e,t.tickCount,t.allowDecimals,`adaptive`)}}},rJ=$([eJ,KK,tJ],nJ),iJ=(e,t,n,r)=>{if(r!==`angleAxis`&&e?.type===`number`&&dB(t)&&Array.isArray(n)&&n.length>0){var i=t[0],a=n[0]??0,o=t[1],s=n[n.length-1]??0;return[Math.min(i,a),Math.max(o,s)]}return t},aJ=$([WK,eJ,rJ,UB],iJ),oJ=$($(lq,WK,(e,t)=>{if(!(!t||t.type!==`number`)){var n=1/0,r=Array.from(fq(e.map(e=>e.value))).sort((e,t)=>e-t),i=r[0],a=r[r.length-1];if(i==null||a==null)return 1/0;var o=a-i;if(o===0)return 1/0;for(var s=0;s<r.length-1;s++){var c=r[s],l=r[s+1];if(!(c==null||l==null)){var u=l-c;n=Math.min(n,u)}}return n/o}}),vR,ile,QL,(e,t,n,r,i)=>i,(e,t,n,r,i)=>{if(!vL(e))return 0;var a=t===`vertical`?r.height:r.width;if(i===`gap`)return e*a/2;if(i===`no-gap`){var o=dN(n,e*a),s=e*a/2;return s-o-(s-o)/a*o}return 0}),sJ=(e,t,n)=>{var r=RK(e,t);return r==null||typeof r.padding!=`string`?0:oJ(e,`xAxis`,t,n,r.padding)},cJ=(e,t,n)=>{var r=VK(e,t);return r==null||typeof r.padding!=`string`?0:oJ(e,`yAxis`,t,n,r.padding)},lJ=$(RK,sJ,(e,t)=>{if(e==null)return{left:0,right:0};var{padding:n}=e;return typeof n==`string`?{left:t,right:t}:{left:(n.left??0)+t,right:(n.right??0)+t}}),uJ=$(VK,cJ,(e,t)=>{if(e==null)return{top:0,bottom:0};var{padding:n}=e;return typeof n==`string`?{top:t,bottom:t}:{top:(n.top??0)+t,bottom:(n.bottom??0)+t}}),dJ=$([QL,lJ,rR,nR,(e,t,n)=>n],(e,t,n,r,i)=>{var{padding:a}=r;return i?[a.left,n.width-a.right]:[e.left+t.left,e.left+e.width-t.right]}),fJ=$([QL,vR,uJ,rR,nR,(e,t,n)=>n],(e,t,n,r,i,a)=>{var{padding:o}=i;return a?[r.height-o.bottom,o.top]:t===`horizontal`?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),pJ=(e,t,n,r)=>{switch(t){case`xAxis`:return dJ(e,n,r);case`yAxis`:return fJ(e,n,r);case`zAxis`:return UK(e,n)?.range;case`angleAxis`:return VB(e);case`radiusAxis`:return HB(e,n);default:return}},mJ=$([WK,pJ],kB),hJ=$([WK,tJ,$([tJ,aJ],fle),mJ],SK),gJ=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var{type:i,scale:a}=n;if(DL(e,r)&&(i===`number`||a!==`auto`))return t.map(e=>e.value)}},_J=$([vR,lq,KK,UB],gJ),vJ=$([hJ],QB);$([hJ],OK),$([hJ,mq],DK),$([QK,Oq,UB],kq);function yJ(e,t){return e.id<t.id?-1:+(e.id>t.id)}var bJ=(e,t)=>t,xJ=(e,t,n)=>n,SJ=$(BL,bJ,xJ,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(yJ)),CJ=$(VL,bJ,xJ,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(yJ)),wJ=(e,t)=>({width:e.width,height:t.height}),TJ=(e,t)=>({width:typeof t.width==`number`?t.width:60,height:e.height});$(QL,RK,wJ);var EJ=(e,t,n)=>{switch(t){case`top`:return e.top;case`bottom`:return n-e.bottom;default:return 0}},DJ=(e,t,n)=>{switch(t){case`left`:return e.left;case`right`:return n-e.right;default:return 0}},OJ=$(RL,QL,SJ,bJ,xJ,(e,t,n,r,i)=>{var a={},o;return n.forEach(n=>{var s=wJ(t,n);o??=EJ(t,r,e);var c=r===`top`&&!i||r===`bottom`&&i;a[n.id]=o-Number(c)*s.height,o+=(c?-1:1)*s.height}),a}),kJ=$(LL,QL,CJ,bJ,xJ,(e,t,n,r,i)=>{var a={},o;return n.forEach(n=>{var s=TJ(t,n);o??=DJ(t,r,e);var c=r===`left`&&!i||r===`right`&&i;a[n.id]=o-Number(c)*s.width,o+=(c?-1:1)*s.width}),a});$([QL,RK,(e,t)=>{var n=RK(e,t);if(n!=null)return OJ(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),$([QL,VK,(e,t)=>{var n=VK(e,t);if(n!=null)return kJ(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),$(QL,VK,(e,t)=>({width:typeof t.width==`number`?t.width:60,height:e.height}));var AJ=(e,t,n,r)=>{if(n!=null){var{allowDuplicatedCategory:i,type:a,dataKey:o}=n,s=DL(e,r),c=t.map(e=>e.value),l=c.filter(e=>e!=null);if(o&&s&&a===`category`&&i&&fN(l))return c}},jJ=$([vR,lq,WK,UB],AJ);$([vR,GK,tJ,vJ,jJ,_J,pJ,rJ,UB],(e,t,n,r,i,a,o,s,c)=>{if(t!=null){var l=DL(e,c);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:c,categoricalDomain:a,duplicateDomain:i,isCategorical:l,niceTicks:s,range:o,realScaleType:n,scale:r}}}),$([vR,KK,tJ,vJ,rJ,pJ,jJ,_J,UB],(e,t,n,r,i,a,o,s,c)=>{if(!(t==null||r==null)){var l=DL(e,c),{type:u,ticks:d,tickCount:f}=t,p=n===`scaleBand`&&typeof r.bandwidth==`function`?r.bandwidth()/2:2,m=u===`category`&&r.bandwidth?r.bandwidth()/p:0;m=c===`angleAxis`&&a!=null&&a.length>=2?iN(a[0]-a[1])*2*m:m;var h=d||i;return h?h.map((e,t)=>{var n=o?o.indexOf(e):e,i=r.map(n);return vL(i)?{index:t,coordinate:i+m,value:e,offset:m}:null}).filter(_N):l&&s?s.map((e,t)=>{var n=r.map(e);return vL(n)?{coordinate:n+m,value:e,index:t,offset:m}:null}).filter(_N):r.ticks?r.ticks(f).map((e,t)=>{var n=r.map(e);return vL(n)?{coordinate:n+m,value:e,index:t,offset:m}:null}).filter(_N):r.domain().map((e,t)=>{var n=r.map(e);return vL(n)?{coordinate:n+m,value:o?o[e]:e,index:t,offset:m}:null}).filter(_N)}}),$([vR,KK,vJ,pJ,jJ,_J,UB],(e,t,n,r,i,a,o)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var s=DL(e,o),{tickCount:c}=t,l=0;return l=o===`angleAxis`&&r?.length>=2?iN(r[0]-r[1])*2*l:l,s&&a?a.map((e,t)=>{var r=n.map(e);return vL(r)?{coordinate:r+l,value:e,index:t,offset:l}:null}).filter(_N):n.ticks?n.ticks(c).map((e,t)=>{var r=n.map(e);return vL(r)?{coordinate:r+l,value:e,index:t,offset:l}:null}).filter(_N):n.domain().map((e,t)=>{var r=n.map(e);return vL(r)?{coordinate:r+l,value:i?i[e]:e,index:t,offset:l}:null}).filter(_N)}}),$(WK,vJ,(e,t)=>{if(!(e==null||t==null))return jK(jK({},e),{},{scale:t})}),$((e,t,n)=>UK(e,n),$([$([WK,tJ,eJ,mJ],SK)],QB),(e,t)=>{if(!(e==null||t==null))return jK(jK({},e),{},{scale:t})}),$([vR,BL,VL],(e,t,n)=>{switch(e){case`horizontal`:return t.some(e=>e.reversed)?`right-to-left`:`left-to-right`;case`vertical`:return n.some(e=>e.reversed)?`bottom-to-top`:`top-to-bottom`;case`centric`:case`radial`:return`left-to-right`;default:return}}),$([(e,t,n)=>e.renderedTicks[t]?.[n]],e=>{if(!(!e||e.length===0))return t=>{var n=1/0,r=e[0];for(var i of e){var a=Math.abs(i.coordinate-t);a<n&&(n=a,r=i)}return r?.value}});var MJ=e=>e.options.defaultTooltipEventType,NJ=e=>e.options.validateTooltipEventTypes;function PJ(e,t,n){if(e==null)return t;var r=e?`axis`:`item`;return n==null?t:n.includes(r)?r:t}function FJ(e,t){return PJ(t,MJ(e),NJ(e))}function IJ(e){return BP(t=>FJ(t,e))}var LJ=(e,t)=>{var n,r=Number(t);if(!(aN(r)||t==null))return r>=0?e==null||(n=e[r])==null?void 0:n.value:void 0},RJ=e=>e.tooltip.settings,zJ={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},BJ=nL({name:`tooltip`,initialState:{itemInteraction:{click:zJ,hover:zJ},axisInteraction:{click:zJ,hover:zJ},keyboardInteraction:zJ,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:`hover`,axisId:0,active:!1,defaultIndex:void 0}},reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(oz(t.payload))},prepare:JI()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:n,next:r}=t.payload,i=VI(e).tooltipItemPayloads.indexOf(oz(n));i>-1&&(e.tooltipItemPayloads[i]=oz(r))},prepare:JI()},removeTooltipEntrySettings:{reducer(e,t){var n=VI(e).tooltipItemPayloads.indexOf(oz(t.payload));n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:JI()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:Ele,replaceTooltipEntrySettings:Dle,removeTooltipEntrySettings:Ole,setTooltipSettingsState:VJ,setActiveMouseOverItemIndex:kle,mouseLeaveItem:Ale,mouseLeaveChart:jle,setActiveClickItemIndex:Mle,setMouseOverAxisIndex:Nle,setMouseClickAxisIndex:Ple,setSyncInteraction:HJ,setKeyboardInteraction:Fle}=BJ.actions;BJ.reducer;function UJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function WJ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?UJ(Object(n),!0).forEach(function(t){GJ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UJ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function GJ(e,t,n){return(t=KJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KJ(e){var t=qJ(e,`string`);return typeof t==`symbol`?t:t+``}function qJ(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function JJ(e,t,n){return t===`axis`?n===`click`?e.axisInteraction.click:e.axisInteraction.hover:n===`click`?e.itemInteraction.click:e.itemInteraction.hover}function YJ(e){return e.index!=null}var XJ=(e,t,n,r)=>{if(t==null)return zJ;var i=JJ(e,t,n);if(i==null)return zJ;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var a=e.settings.active===!0;if(YJ(i)){if(a)return WJ(WJ({},i),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return WJ(WJ({},zJ),{},{coordinate:i.coordinate})};function ZJ(e){if(typeof e==`number`)return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}function QJ(e,t){var n=ZJ(e),r=t[0],i=t[1];return n===void 0?!1:n>=Math.min(r,i)&&n<=Math.max(r,i)}function $J(e,t,n){if(n==null||t==null)return!0;var r=TL(e,t);return r==null||!dB(n)?!0:QJ(r,n)}var eY=(e,t,n,r)=>{var i=e?.index;if(i==null)return null;var a=Number(i);if(!vL(a))return i;var o=0,s=1/0;t.length>0&&(s=t.length-1);var c=Math.max(o,Math.min(a,s)),l=t[c];return l==null||$J(l,n,r)?String(c):null},tY=(e,t,n,r,i,a,o)=>{if(a!=null){var s=o[0]?.getPosition(a);if(s!=null)return s;var c=i?.[Number(a)];if(c)switch(n){case`horizontal`:return{x:c.coordinate,y:(r.top+t)/2};default:return{x:(r.left+e)/2,y:c.coordinate}}}},nY=(e,t,n,r)=>{if(t===`axis`)return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i=n===`hover`?e.itemInteraction.hover.graphicalItemId:e.itemInteraction.click.graphicalItemId;if(e.syncInteraction.active&&i==null)return e.tooltipItemPayloads;if(i==null&&(r!=null||e.keyboardInteraction.active)){var a=e.tooltipItemPayloads[0];return a==null?[]:[a]}return e.tooltipItemPayloads.filter(e=>e.settings?.graphicalItemId===i)},rY=e=>e.options.tooltipPayloadSearcher,iY=e=>e.tooltip;function aY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oY(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?aY(Object(n),!0).forEach(function(t){sY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function sY(e,t,n){return(t=cY(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cY(e){var t=lY(e,`string`);return typeof t==`symbol`?t:t+``}function lY(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function uY(e){if(typeof e==`string`||typeof e==`number`)return e}function dY(e){if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return e}function fY(e){if(typeof e==`string`||typeof e==`number`)return e;if(typeof e==`function`)return t=>e(t)}function pY(e){if(typeof e==`string`)return e}function mY(e){if(!(typeof e!=`object`||!e))return{name:`name`in e?uY(e.name):void 0,unit:`unit`in e?dY(e.unit):void 0,dataKey:`dataKey`in e?fY(e.dataKey):void 0,payload:`payload`in e?e.payload:void 0,color:`color`in e?pY(e.color):void 0,fill:`fill`in e?pY(e.fill):void 0}}function hY(e,t){return e??t}var gY=(e,t,n,r,i,a,o)=>{if(!(t==null||a==null)){var{chartData:s,computedData:c,dataStartIndex:l,dataEndIndex:u}=n;return e.reduce((e,n)=>{var{dataDefinedOnItem:d,settings:f}=n,p=hY(d,s),m=Array.isArray(p)?_L(p,l,u):p,h=f?.dataKey??r,g=f?.nameKey,_=r&&Array.isArray(m)&&!Array.isArray(m[0])&&o===`axis`?mN(m,r,i):a(m,t,c,g);return Array.isArray(_)?_.forEach(t=>{var n=mY(t),r=n?.name,i=n?.dataKey,a=n?.payload,o=oY(oY({},f),{},{name:r,unit:n?.unit,color:n?.color??f?.color,fill:n?.fill??f?.fill});e.push(IL({tooltipEntrySettings:o,dataKey:i,payload:a,value:TL(a,i),name:r==null?void 0:String(r)}))}):e.push(IL({tooltipEntrySettings:f,dataKey:h,payload:_,value:TL(_,h),name:TL(_,g)??f?.name})),e},[])}},_Y=$([_q,qK,TB],TK),vY=$([$([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),_q,$([XB,ZB],JK)],ZK,{memoizeOptions:{resultEqualityCheck:YB}}),yY=$([vY],e=>e.filter(qB)),bY=$([vY],nq,{memoizeOptions:{resultEqualityCheck:YB}}),xY=$([vY],e=>e.some(e=>!e.data)),SY=$([bY,cB],aq),CY=$([yY,cB,_q],KB),wY=$([SY,_q,vY,cB,xY,bY],cq),TY=$([_q],wq),EY=$([TY,$([_q],e=>e.allowDataOverflow)],pB),DY=$([$([CY,$([vY],e=>e.filter(qB)),CB,wB],bq),cB,XB,EY],Sq),OY=$([SY,_q,$([vY],eq),Oq,XB,tle],jq,{memoizeOptions:{resultEqualityCheck:JB}}),kY=$([$([Fq,XB,ZB],Iq),XB],Hq),AY=$([$([Rq,XB,ZB],Iq),XB],Wq),jY=$([_q,vR,SY,wY,CB,XB,$([_q,TY,EY,DY,OY,$([kY,$([$([Bq,XB,ZB],Iq),XB],Jq),AY],Aq),vR,XB],Xq)],$q),MY=$([_q,jY,$([jY,_q,_Y],nJ),XB],iJ),NY=e=>pJ(e,XB(e),ZB(e),!1),PY=$([$([_q,_Y,MY,$([_q,NY],kB)],SK)],QB),FY=$([vR,_q,_Y,PY,NY,$([vR,wY,_q,XB],AJ),$([vR,wY,_q,XB],gJ),XB],(e,t,n,r,i,a,o,s)=>{if(t){var{type:c}=t,l=DL(e,s);if(r){var u=n===`scaleBand`&&r.bandwidth?r.bandwidth()/2:2,d=c===`category`&&r.bandwidth?r.bandwidth()/u:0;return d=s===`angleAxis`&&i!=null&&i?.length>=2?iN(i[0]-i[1])*2*d:d,l&&o?o.map((e,t)=>{var n=r.map(e);return vL(n)?{coordinate:n+d,value:e,index:t,offset:d}:null}).filter(_N):r.domain().map((e,t)=>{var n=r.map(e);return vL(n)?{coordinate:n+d,value:a?a[e]:e,index:t,offset:d}:null}).filter(_N)}}}),IY=$([MJ,NJ,RJ],(e,t,n)=>PJ(n.shared,e,t)),LY=e=>e.tooltip.settings.trigger,RY=e=>e.tooltip.settings.defaultIndex,zY=$([iY,IY,LY,RY],XJ),BY=$([zY,SY,vq,jY],eY),VY=$([FY,BY],LJ);$([zY],e=>{if(e)return e.dataKey});var HY=$([zY],e=>{if(e)return e.graphicalItemId}),UY=$([iY,IY,LY,RY],nY);$([zY,$([LL,RL,vR,QL,FY,RY,UY],tY)],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),$([zY],e=>e?.active??!1),$([$([UY,BY,cB,vq,VY,rY,IY],gY)],e=>{if(e!=null){var t=e.map(e=>e.payload).filter(e=>e!=null);return Array.from(new Set(t))}});function WY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function GY(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?WY(Object(n),!0).forEach(function(t){KY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function KY(e,t,n){return(t=qY(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qY(e){var t=JY(e,`string`);return typeof t==`symbol`?t:t+``}function JY(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var YY=()=>BP(_q),XY=()=>{var e=YY(),t=BP(FY),n=BP(PY);return FL(!e||!n?void 0:GY(GY({},e),{},{scale:n}),t)},ZY=()=>BP(TB),QY=(e,t)=>t,$Y=(e,t,n)=>n,eX=(e,t,n,r)=>r;$(FY,e=>(0,fF.default)(e,e=>e.coordinate));var tX=$([iY,QY,$Y,eX],XJ),nX=$([tX,SY,vq,jY],eY),rX=(e,t,n)=>{if(t!=null){var r=iY(e);return t===`axis`?n===`hover`?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n===`hover`?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},iX=$([iY,QY,$Y,eX],nY),aX=$([tX,$([LL,RL,vR,QL,FY,eX,iX],tY)],(e,t)=>e.coordinate??t),oX=$([FY,nX],LJ),sX=$([iX,nX,cB,vq,oX,rY,QY],gY),cX=$([tX,nX],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),lX=$(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(t!=null){var r=e[t];if(r!=null)return n?r.panoramaElement:r.element}});$(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(e=>parseInt(e,10)).concat(Object.values(EB));return Array.from(new Set(t)).sort((e,t)=>e-t)},{memoizeOptions:{resultEqualityCheck:dle}});function uX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dX(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?uX(Object(n),!0).forEach(function(t){fX(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uX(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fX(e,t,n){return(t=pX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pX(e){var t=mX(e,`string`);return typeof t==`symbol`?t:t+``}function mX(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var hX={zIndexMap:Object.values(EB).reduce((e,t)=>dX(dX({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),{})},gX=new Set(Object.values(EB));function _X(e){return gX.has(e)}var vX=nL({name:`zIndex`,initialState:hX,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:JI()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(--e.zIndexMap[n].consumers,e.zIndexMap[n].consumers<=0&&!_X(n)&&delete e.zIndexMap[n])},prepare:JI()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n,element:r,isPanorama:i}=t.payload;e.zIndexMap[n]?i?e.zIndexMap[n].panoramaElement=oz(r):e.zIndexMap[n].element=oz(r):e.zIndexMap[n]={consumers:0,element:i?void 0:oz(r),panoramaElement:i?oz(r):void 0}},prepare:JI()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:JI()}}}),{registerZIndexPortal:yX,unregisterZIndexPortal:bX,registerZIndexPortalElement:Ile,unregisterZIndexPortalElement:Lle}=vX.actions;vX.reducer;function xX(e){var{zIndex:n,children:i}=e,a=Ioe()&&n!==void 0&&n!==0,o=tR(),s=(0,t.useRef)(void 0),c=(0,t.useRef)(new Set),l=IP(),u=BP(e=>lX(e,n,o));if((0,t.useLayoutEffect)(()=>{if(!a){var e=c.current;e.forEach(e=>{l(bX({zIndex:e}))}),e.clear(),s.current=void 0;return}if(c.current.has(n)||(l(yX({zIndex:n})),c.current.add(n)),u){s.current=u;var t=c.current;t.forEach(e=>{e!==n&&(l(bX({zIndex:e})),t.delete(e))})}},[l,n,a,u]),(0,t.useLayoutEffect)(()=>{var e=c.current;return()=>{e.forEach(e=>{l(bX({zIndex:e}))}),e.clear()}},[l]),!a)return i;var d=u??s.current;return d?(0,r.createPortal)(i,d):null}oo();function SX(){return SX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},SX.apply(null,arguments)}function CX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wX(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?CX(Object(n),!0).forEach(function(t){TX(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CX(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function TX(e,t,n){return(t=EX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EX(e){var t=DX(e,`string`);return typeof t==`symbol`?t:t+``}function DX(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function OX(e){var{cursor:n,cursorComp:r,cursorProps:i}=e;return(0,t.isValidElement)(n)?(0,t.cloneElement)(n,i):(0,t.createElement)(r,i)}function kX(e){var{coordinate:n,payload:r,index:i,offset:a,tooltipAxisBandSize:o,layout:s,cursor:c,tooltipEventType:l,chartName:u}=e,d=n,f=r,p=i;if(!c||!d||u!==`ScatterChart`&&l!==`axis`)return null;var m,h,g;if(u===`ScatterChart`)m=d,h=Kse,g=EB.cursorLine;else if(u===`BarChart`)m=qse(s,d,a,o),h=Ice,g=EB.cursorRectangle;else if(s===`radial`&&PN(d)){var{cx:_,cy:v,radius:y,startAngle:b,endAngle:x}=rB(d);m={cx:_,cy:v,startAngle:b,endAngle:x,innerRadius:y,outerRadius:y},h=Jce,g=EB.cursorLine}else m={points:Yce(s,d,a)},h=Lse,g=EB.cursorLine;var S=typeof c==`object`&&`className`in c?c.className:void 0,C=wX(wX(wX(wX({stroke:`#ccc`,pointerEvents:`none`},a),m),Lae(c)),{},{payload:f,payloadIndex:p,className:ao(`recharts-tooltip-cursor`,S)});return t.createElement(xX,{zIndex:e.zIndex??g},t.createElement(OX,{cursor:c,cursorComp:h,cursorProps:C}))}function AX(e){var n=XY(),r=Moe(),i=yR(),a=ZY();return n==null||r==null||i==null||a==null?null:t.createElement(kX,SX({},e,{offset:r,layout:i,tooltipAxisBandSize:n,chartName:a}))}var jX=(0,t.createContext)(null),MX=()=>(0,t.useContext)(jX),NX=v(h(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i<a;i++)o[i]=n[i].fn;return o},c.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var c=this._events[s],l=arguments.length,u,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(d=1,u=Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,p;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(p=1,u=Array(l-1);p<l;p++)u[p-1]=arguments[p];c[d].fn.apply(c[d].context,u)}}return!0},c.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn===t&&(!i||o.once)&&(!n||o.context===n)&&s(this,a);else{for(var c=0,l=[],u=o.length;c<u;c++)(o[c].fn!==t||i&&!o[c].once||n&&o[c].context!==n)&&l.push(o[c]);l.length?this._events[a]=l.length===1?l[0]:l:s(this,a)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,t!==void 0&&(t.exports=c)}))(),1).default,PX=new NX,FX=`recharts.syncEvent.tooltip`;function IX(e){return e.tooltip.syncInteraction}function LX(e,n,r,i,a,o){var s=BP(t=>rX(t,e,n)),c=BP(HY),l=BP(sle),u=BP(ale),d=BP(ole),f=BP(IX)?.sourceViewBox!=null,p=_R();(0,t.useEffect)(()=>{if(!f&&u!=null&&l!=null){var e=HJ({active:o,coordinate:r,dataKey:s,index:a,label:typeof i==`number`?String(i):i,sourceViewBox:p,graphicalItemId:c});PX.emit(FX,u,e,l)}},[f,r,s,c,a,i,l,u,d,o,p])}function RX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zX(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?RX(Object(n),!0).forEach(function(t){BX(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RX(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function BX(e,t,n){return(t=VX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VX(e){var t=HX(e,`string`);return typeof t==`symbol`?t:t+``}function HX(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function UX(e){return e.dataKey}function WX(e,n){return t.isValidElement(e)?t.cloneElement(e,n):typeof e==`function`?t.createElement(e,n):t.createElement(bse,n)}var GX=[],KX={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:`ease`,axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:`auto`,itemSorter:`name`,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:` : `,trigger:`hover`,useTranslate3d:!1,wrapperStyle:{}};function qX(e){var n=UN(e,KX),{active:i,allowEscapeViewBox:a,animationDuration:o,animationEasing:s,content:c,filterNull:l,isAnimationActive:u,offset:d,payloadUniqBy:f,position:p,reverseDirection:m,useTranslate3d:h,wrapperStyle:g,cursor:_,shared:v,trigger:y,defaultIndex:b,portal:x,axisId:S}=n,C=IP(),w=typeof b==`number`?String(b):b;(0,t.useEffect)(()=>{C(VJ({shared:v,trigger:y,axisId:S,active:i,defaultIndex:w}))},[C,v,y,S,i,w]);var T=_R(),E=jse(),D=IJ(v),{activeIndex:O,isActive:k}=BP(e=>cX(e,D,y,w))??{},A=BP(e=>sX(e,D,y,w)),j=BP(e=>oX(e,D,y,w)),M=BP(e=>aX(e,D,y,w)),N=A,P=MX(),F=i??k??!1,[I,L]=vF([N,F]),R=D===`axis`?j:void 0;LX(D,y,M,R,O,F);var ee=x??P;if(ee==null||T==null||D==null)return null;var z=N??GX;F||(z=GX),l&&z.length&&(z=NP(z.filter(e=>e.value!=null&&(e.hide!==!0||n.includeHidden)),f,UX));var B=z.length>0,V=zX(zX({},n),{},{payload:z,label:R,active:F,activeIndex:O,coordinate:M,accessibilityLayer:E}),te=t.createElement(Ase,{allowEscapeViewBox:a,animationDuration:o,animationEasing:s,isAnimationActive:u,active:F,coordinate:M,hasPayload:B,offset:d,position:p,reverseDirection:m,useTranslate3d:h,viewBox:T,wrapperStyle:g,lastBoundingBox:I,innerRef:L,hasPortalFromProps:!!x},WX(c,V));return t.createElement(t.Fragment,null,(0,r.createPortal)(te,ee),F&&t.createElement(AX,{cursor:_,tooltipEventType:D,coordinate:M,payload:z,index:O}))}X();var JX=y.default.createContext(null),YX=({id:e,initialDimension:t={width:320,height:200},config:r,className:i,children:a,ref:o,...s})=>{let c=y.default.useId(),l=`chart-${e??c.replace(/:/g,``)}`;return(0,n.jsx)(JX.Provider,{value:{config:r},children:(0,n.jsx)(`div`,{"data-slot":`chart`,"data-chart":l,className:Y(`flex aspect-video justify-center style-text-default--1 [&_.recharts-cartesian-axis-tick_text]:fill-on-surface-muted [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-neutral-container-high [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-neutral-container-high [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden`,i),ref:o,...s,children:(0,n.jsx)(Aoe,{initialDimension:t,children:a})})})},XX=()=>{let e=y.default.useContext(JX);if(!e)throw Error(`useChart must be used within a ChartContainerProvider`);return e},ZX=({content:e,...t})=>(0,n.jsx)(qX,{content:e,...t});X();var QX=y.default.createContext(null),$X=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(QX.Provider,{value:i,children:(0,n.jsx)(`div`,{className:Y(`min-w-[125px] space-y-2xs rounded-lg bg-surface-2 px-xs py-2xs`,e),ref:r,...i,children:t})}),eZ=()=>{let e=y.default.useContext(QX);if(!e)throw Error(`useChartTooltipContent must be used within a ChartTooltipContentProvider`);return e};X();var tZ=({className:e,children:t,ref:r,...i})=>{let{label:a}=eZ();return(0,n.jsxs)(`p`,{className:Y(`style-text-default-0`,e),ref:r,...i,children:[t,a]})};X();var nZ=y.default.createContext(null),rZ=({className:e,children:t,ref:r,...i})=>{let{payload:a}=eZ();return(0,n.jsx)(`div`,{className:Y(`flex flex-col gap-3xs`,e),ref:r,...i,children:a?.map((e,r)=>(0,n.jsx)(nZ.Provider,{value:e,children:(0,n.jsx)(`div`,{className:`flex items-center justify-between gap-2xs`,children:t})},`payload-${r}`))})},iZ=()=>{let e=y.default.useContext(nZ);if(!e)throw Error(`useChartTooltipPayload must be used within a ChartTooltipPayloadProvider`);return e};X();var aZ=({className:e,children:t,...r})=>(0,n.jsx)(fz,{className:Y(``,e),...r,children:t});X();var oZ=({className:e,children:t,ref:r,...i})=>{let{icon:a,color:o}=fZ();return(0,n.jsxs)(`div`,{style:{color:o},className:Y(`shrink-0 [&>svg]:size-xs`,e),ref:r,...i,children:[t,a&&(0,n.jsx)(a,{})]})};X();var sZ=({shape:e=`circle`,className:t,children:r,ref:i,...a})=>{let{color:o}=fZ();return(0,n.jsx)(`div`,{style:{backgroundColor:o,...e===`circle`&&{borderRadius:`50%`},...e===`diamond`&&{transform:`rotate(45deg)`},...e===`triangle`&&{clipPath:`polygon(50% 0%, 0% 100%, 100% 100%)`},...e===`wye`&&{clipPath:`polygon(50% 0%, 61.8% 35.4%, 98.5% 35.4%, 69.1% 57.1%, 80.9% 92.5%, 50% 70.7%, 19.1% 92.5%, 30.9% 57.1%, 1.5% 35.4%, 38.2% 35.4%)`},...e===`line`&&{maxHeight:`100%`,width:`3px`,borderRadius:`1.5px`}},className:Y(`size-xs`,t),ref:i,...a,children:r})};X();var cZ=({className:e,children:t,ref:r,...i})=>{let{label:a}=fZ();return(0,n.jsxs)(`p`,{className:Y(`style-text-default--1 capitalize`,e),ref:r,...i,children:[t,a]})},lZ=(e,t,n)=>{if(!(typeof t!=`object`||!t)){if(n in e)return e[n];if(`name`in t&&typeof t.name==`string`&&t.name in e)return e[t.name]}};X();var uZ=y.default.createContext(null),dZ=({payload:e,verticalAlign:t=`bottom`,className:r,children:i,ref:a,...o})=>{let{config:s}=XX();return(0,n.jsx)(`div`,{className:Y(`flex items-center justify-center gap-lg`,t===`top`?`mb-md`:`mt-md`,r),ref:a,...o,children:e?.map((e,t)=>{let r=lZ(s,e,typeof e.dataKey==`string`?e.dataKey:`value`);return(0,n.jsx)(uZ.Provider,{value:{color:r?.colour,icon:r?.icon,label:r?.label},children:(0,n.jsxs)(`div`,{className:`flex items-center gap-2xs`,children:[r?.icon?(0,n.jsx)(oZ,{}):(0,n.jsx)(sZ,{}),(0,n.jsx)(cZ,{}),i]})},`payload-${t}`)})})},fZ=()=>{let e=y.default.useContext(uZ);if(!e)throw Error(`useChartLegendPayload must be used within a ChartLegendPayloadProvider`);return e};X();var pZ=({gradients:e,className:t,children:r,ref:i,...a})=>(0,n.jsxs)(`defs`,{className:Y(``,t),ref:i,...a,children:[e.map(e=>(0,n.jsxs)(`linearGradient`,{id:e.id,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,n.jsx)(`stop`,{offset:`5%`,stopColor:e.stopColor,stopOpacity:.8}),(0,n.jsx)(`stop`,{offset:`95%`,stopColor:e.stopColor,stopOpacity:.1})]},e.id)),r]});X();var mZ=({shape:e=`circle`,className:t,children:r,ref:i,...a})=>{let{color:o}=iZ();return(0,n.jsx)(`div`,{style:{backgroundColor:o,...e===`circle`&&{borderRadius:`50%`},...e===`diamond`&&{transform:`rotate(45deg)`},...e===`triangle`&&{clipPath:`polygon(50% 0%, 0% 100%, 100% 100%)`},...e===`wye`&&{clipPath:`polygon(50% 0%, 61.8% 35.4%, 98.5% 35.4%, 69.1% 57.1%, 80.9% 92.5%, 50% 70.7%, 19.1% 92.5%, 30.9% 57.1%, 1.5% 35.4%, 38.2% 35.4%)`},...e===`line`&&{maxHeight:`100%`,width:`3px`,borderRadius:`1.5px`}},className:Y(`size-xs`,t),ref:i,...a,children:r})};X();var hZ=({className:e,children:t,ref:r,...i})=>{let{name:a}=iZ();return(0,n.jsxs)(`p`,{className:Y(`grow text-left style-text-default--1 text-on-surface-variant capitalize`,e),ref:r,...i,children:[t,a]})};X();var gZ=({className:e,children:t,ref:r,...i})=>{let{config:a}=XX(),o=iZ(),s=lZ(a,o,typeof o.dataKey==`string`?o.dataKey:`value`)?.icon;return(0,n.jsxs)(`div`,{style:{color:o.color},className:Y(`shrink-0 [&>svg]:size-xs`,e),ref:r,...i,children:[t,s&&(0,n.jsx)(s,{})]})};Xg(),Uj(),X();var _Z=({className:e,...t})=>(0,n.jsx)(qg,{className:Y(`flex`,e),...t,render:(e,t)=>t.indeterminate?(0,n.jsx)(Pj,{weight:`bold`,...e,className:`text-accent-default`}):(0,n.jsx)(yj,{weight:`bold`,...e})});uo();var vZ=lo(`group flex size-md items-center justify-center rounded-sm shadow-2xs outline outline-transparent transition-colors not-indeterminate:text-accent-on-default indeterminate:text-accent-default enabled:hover:cursor-pointer enabled:hover:outline-accent-border disabled:cursor-not-allowed disabled:hover:cursor-not-allowed data-checked:bg-accent-default [&:not([data-checked])]:enabled:hover:outline-border-strong`,{variants:{variant:{elevated:`bg-surface shadow-2xs`,inSurface:`bg-surface-low shadow-none inset-shadow-2xs data-checked:inset-shadow-none`}},defaultVariants:{variant:`elevated`}});dk(),X();var yZ=({variant:e,className:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:`flex items-center gap-xs`,children:(0,n.jsx)(Gg,{className:Y(vZ({variant:e,className:t})),ref:r,...i,children:(0,n.jsx)(_Z,{})})});dk(),X();var bZ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(n_,{"aria-labelledby":y.default.useId(),className:Y(`flex flex-col items-start gap-2xs`,e),ref:r,...i,children:t});__(),X();var xZ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(m_,{className:Y(`ml-sm flex h-(--collapsible-panel-height) flex-col justify-end gap-3xs overflow-hidden border-l border-border pl-sm transition-all duration-150 ease-out data-ending-style:h-0 data-starting-style:h-0 [&[hidden]:not([hidden="until-found"])]:hidden`,e),ref:r,...i,children:t});__(),Uj(),mk(),X();var SZ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(u_,{render:a=>(0,n.jsxs)(pk,{...a,tone:`neutral`,variant:`ghost`,className:Y(`group/trigger flex w-full justify-start gap-xl hover:shadow-2xs data-panel-open:bg-surface data-panel-open:shadow-2xs`,e),ref:r,...i,children:[t,(0,n.jsx)(pj,{weight:`bold`,className:`ml-auto text-on-surface-variant transition-all ease-out group-data-panel-open/trigger:rotate-90`})]})});__(),X();var CZ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(s_,{className:Y(`flex min-h-xl w-full flex-col justify-center gap-xs`,e),ref:r,...i,children:t});X();var wZ=y.default.createContext(void 0),TZ=({items:e,defaultValue:t,className:r,children:i,ref:a,...o})=>{let[s,c]=y.default.useState(t);return(0,n.jsx)(wZ.Provider,{value:{currentValue:s,setCurrentValue:c,items:e},children:(0,n.jsx)(`div`,{className:Y(`flex flex-col rounded-xl border border-border bg-surface`,r),ref:a,...o,children:i})})},EZ=()=>{let e=y.default.useContext(wZ);if(!e)throw Error(`useCodeBlock must be used within a CodeBlock`);return e};X();var DZ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`absolute top-3xs right-3xs flex items-center gap-3xs`,e),ref:r,...i,children:t});Uj(),mk(),X();var OZ=({className:e,children:t,ref:r,...i})=>{let{currentValue:a}=EZ(),[o,s]=y.default.useState(!1);return(0,n.jsxs)(pk,{onClick:async()=>{try{await navigator.clipboard.writeText(a.content),s(!0),setTimeout(()=>s(!1),2e3)}catch(e){console.error(`Failed to copy text: `,e)}},size:`iconMedium`,variant:`ghost`,tone:`neutral`,className:Y(``,e),ref:r,...i,children:[t,o?(0,n.jsx)(yj,{weight:`bold`,className:`animate-in zoom-in`}):(0,n.jsx)(wj,{weight:`bold`,className:`animate-in zoom-in`})]})};Uj(),mk(),X();var kZ=({className:e,children:t,ref:r,...i})=>{let{currentValue:a}=EZ(),[o,s]=y.default.useState(!1);return(0,n.jsxs)(pk,{onClick:async()=>{try{let e=new Blob([a.content]),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`${a.name}`,n.click(),URL.revokeObjectURL(t),s(!0),setTimeout(()=>s(!1),2e3)}catch(e){console.error(`Failed to download file: `,e)}},size:`iconMedium`,variant:`ghost`,tone:`neutral`,className:Y(``,e),ref:r,...i,children:[t,o?(0,n.jsx)(yj,{weight:`bold`,className:`animate-in zoom-in`}):(0,n.jsx)(Ej,{weight:`bold`,className:`animate-in zoom-in`})]})};X();var AZ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex min-h-2xl items-center justify-between border-b border-border p-2xs`,e),ref:r,...i,children:t});X();var jZ=({className:e,children:t,ref:r,...i})=>{let{currentValue:a}=EZ();return(0,n.jsxs)(`div`,{className:Y(`flex items-center justify-center gap-2xs px-xs style-text-strong-0 text-on-surface-variant [&>svg]:size-sm`,e),ref:r,...i,children:[t,a?.icon,a.name]})},MZ,NZ=m((()=>{mE(),MZ=({children:e,...t})=>(0,n.jsx)(Lre,{...t,children:e})})),PZ,FZ=m((()=>{mE(),Uj(),X(),PZ=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(nE,{className:Y(`grid h-lg cursor-default grid-cols-[1fr_0.75rem] items-center gap-xs rounded-md pl-xs style-text-default-0 outline-none select-none group-data-[side=none]:pr-xs group-data-[side=none]:leading-lg hover:cursor-pointer data-highlighted:relative data-highlighted:z-0 data-highlighted:bg-neutral-container-high data-highlighted:text-neutral-on-container data-highlighted:before:absolute data-highlighted:before:inset-x-3xs data-highlighted:before:inset-y-[0px] data-highlighted:before:z-[-1] data-highlighted:before:rounded-sm data-selected:bg-neutral-default data-selected:text-neutral-on-default pointer-coarse:py-xs`,e),ref:r,...i,children:[(0,n.jsx)(aE,{children:t}),(0,n.jsx)(rE,{className:`place-self-end self-center`,children:(0,n.jsx)(yj,{weight:`bold`})})]})})),IZ,LZ=m((()=>{mE(),X(),IZ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(QT,{className:Y(`relative max-h-(--available-height) scroll-py-md space-y-xs overflow-y-auto`,e),ref:r,...i,children:t})})),RZ,zZ=m((()=>{mE(),X(),RZ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(NT,{className:Y(`flex text-on-surface-variant [&>svg]:size-sm`,e),ref:r,...i,children:t})})),BZ,VZ=m((()=>{mE(),Uj(),X(),BZ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(FT,{children:(0,n.jsx)(UT,{className:Y(`z-99 outline-none select-none`,e),ref:r,...i,children:(0,n.jsxs)(XT,{className:`group min-w-(--anchor-width) origin-(--transform-origin) rounded-xl bg-surface-2 bg-clip-padding p-2xs shadow-md transition-[transform,scale,opacity] data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0 data-[side=none]:data-ending-style:scale-90 data-[side=none]:data-ending-style:opacity-0 data-[side=none]:data-starting-style:scale-90 data-[side=none]:data-starting-style:opacity-0`,children:[(0,n.jsx)(lE,{className:`top-0 right-0 z-[1px] flex h-md w-full cursor-default items-center justify-center rounded-xl bg-surface-2 before:absolute before:left-0 before:h-full before:w-full before:content-[''] data-[side=none]:before:-top-full`,children:(0,n.jsx)(hj,{className:`size-sm`,weight:`fill`})}),t,(0,n.jsx)(cE,{className:`right-0 bottom-0 z-[1px] flex h-md w-full cursor-default items-center justify-center rounded-xl bg-surface-2 before:absolute before:left-0 before:h-full before:w-full before:content-[''] data-[side=none]:before:-bottom-full`,children:(0,n.jsx)(aj,{className:`size-sm`,weight:`fill`})})]})})})})),HZ,UZ=m((()=>{uo(),HZ=lo(`flex min-w-[calc(var(--dawn-spacing-3xl)+8rem)] items-center justify-between outline outline-transparent transition-all hover:cursor-pointer aria-invalid:bg-error-container aria-invalid:text-error-on-container aria-invalid:outline-error-border data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50`,{variants:{variant:{primary:`bg-surface shadow-2xs hover:outline-border-strong`,secondary:`bg-neutral-container hover:outline-border-strong`,ghost:`bg-transparent hover:bg-neutral-container`},size:{small:`h-lg rounded-lg px-xs style-text-default--1 [&_[data-value]]:gap-3xs [&>svg]:size-xs`,medium:`h-xl rounded-xl px-sm style-text-default-0 [&_[data-value]]:gap-2xs [&>svg]:size-sm`,large:`h-2xl rounded-2xl px-md style-text-default-1 [&_[data-value]]:gap-xs [&>svg]:size-md`}},defaultVariants:{variant:`primary`,size:`medium`}})})),WZ,GZ=m((()=>{mE(),UZ(),X(),WZ=({variant:e,size:t,className:r,children:i,ref:a,...o})=>(0,n.jsx)(AT,{className:Y(HZ({variant:e,size:t,className:r})),ref:a,...o,children:i})})),KZ,qZ=m((()=>{mE(),X(),KZ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(MT,{"data-value":!0,className:Y(`flex items-center justify-start gap-2xs data-placeholder:opacity-70`,e),ref:r,...i,children:t})})),JZ,YZ=m((()=>{mE(),X(),JZ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(fE,{className:Y(`block space-y-3xs border-border-strong not-last:border-b not-last:pb-xs`,e),ref:r,...i,children:t})})),XZ,ZZ=m((()=>{mE(),X(),XZ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(pE,{className:Y(`sticky top-[0px] z-1 cursor-default bg-surface-2 px-2xs py-3xs style-text-default--2 text-on-surface-variant select-none`,e),ref:r,...i,children:t})})),QZ=m((()=>{NZ(),FZ(),LZ(),zZ(),VZ(),GZ(),qZ(),YZ(),ZZ()}));Uj(),QZ(),X();var $Z=({className:e,children:t,ref:r,...i})=>{let{currentValue:a,setCurrentValue:o,items:s}=EZ();return(0,n.jsxs)(MZ,{value:a.id,onValueChange:e=>{let t=s.find(t=>t.id===e);t&&o(t)},children:[(0,n.jsxs)(WZ,{className:Y(``,e),ref:r,...i,variant:`ghost`,children:[(0,n.jsx)(KZ,{children:e=>s.find(t=>t.id===e)?.label}),(0,n.jsx)(RZ,{children:(0,n.jsx)(_j,{weight:`bold`})})]}),(0,n.jsx)(BZ,{children:(0,n.jsxs)(IZ,{children:[t,(0,n.jsx)(JZ,{children:s.map(({label:e,id:t})=>(0,n.jsx)(PZ,{value:t,children:e},t))})]})})]})};uo();var eQ=lo(``,{variants:{variant:{default:`space-y-2xs [&_[role=presentation]]:top-1/2 [&_[role=presentation]]:rounded-lg [&_[role=presentation]]:bg-brand-default [&_[role=tab]]:rounded-lg [&_[role=tab]]:px-sm [&_[role=tab]]:style-text-default-0 [&_[role=tab]]:data-active:text-brand-on-default [&_[role=tablist]]:h-xl [&_[role=tablist]]:gap-xs [&_[role=tablist]]:rounded-lg [&_[role=tablist]]:bg-surface-low [&_[role=tablist]]:p-3xs [&_[role=tab]]:hover:[&:not([data-active])]:text-brand-default`,ghost:`space-y-2xs [&_[role=presentation]]:top-1/2 [&_[role=presentation]]:rounded-lg [&_[role=presentation]]:bg-brand-default [&_[role=tab]]:h-xl [&_[role=tab]]:rounded-lg [&_[role=tab]]:px-sm [&_[role=tab]]:style-text-default-0 [&_[role=tab]]:data-active:text-brand-on-default [&_[role=tablist]]:gap-xs [&_[role=tablist]]:rounded-lg [&_[role=tab]]:hover:[&:not([data-active])]:text-brand-default`,underline:`space-y-2xs [&_[role=presentation]]:bg-brand-default [&_[role=tab]]:px-md [&_[role=tab]]:style-text-default-0 [&_[role=tab]]:data-active:text-brand-default [&_[role=tablist]]:h-xl [&_[role=tablist]]:gap-lg [&_[role=tablist]]:border-b-3 [&_[role=tablist]]:border-border **:[[role=presentation]]:bottom-[-4px] **:[[role=presentation]]:h-[3px] [&_[role=tab]]:hover:[&:not([data-active])]:text-brand-default`},fill:{true:`[&_[role=tab]]:grow [&_[role=tablist]]:w-full`,false:`[&_[role=tablist]]:w-fit`}},defaultVariants:{variant:`default`,fill:!0}});ED(),X();var tQ=({variant:e,fill:t,className:r,ref:i,...a})=>(0,n.jsx)(uD,{className:Y(eQ({variant:e,fill:t}),r),ref:i,...a});ED(),X();var nQ=({className:e,...t})=>(0,n.jsx)(bD,{className:Y(`absolute left-[0px] z-[-1] h-(--active-tab-height) w-(--active-tab-width) translate-x-(--active-tab-left) -translate-y-1/2 transition-all duration-300`,e),...t});ED(),X();var rQ=({className:e,...t})=>(0,n.jsx)(wD,{className:Y(`relative z-0 flex`,e),...t});ED(),X();var iQ=({className:e,...t})=>(0,n.jsx)(CD,{className:Y(`relative flex grow items-center justify-start overflow-auto`,e),...t});ED(),X();var aQ=({className:e,...t})=>(0,n.jsx)(hD,{className:Y(`inline-flex items-center justify-center gap-xs text-center break-keep whitespace-nowrap text-on-surface transition-colors duration-300 outline-none select-none hover:cursor-pointer focus-visible:relative focus-visible:before:absolute focus-visible:before:outline`,e),...t});X();var oQ=({className:e,children:t,ref:r,...i})=>{let{currentValue:a,items:o,setCurrentValue:s}=EZ();return(0,n.jsxs)(tQ,{value:a.id,onValueChange:e=>{let t=o.find(t=>t.id===e);t&&s(t)},className:Y(``,e),variant:`ghost`,ref:r,...i,children:[(0,n.jsxs)(rQ,{children:[o.map(({id:e,label:t})=>(0,n.jsx)(aQ,{value:e,children:t},e)),(0,n.jsx)(nQ,{})]}),t]})};X();var sQ=({className:e,children:t,ref:r,...i})=>{let{currentValue:a}=EZ();return(0,n.jsxs)(`div`,{className:Y(`relative overflow-auto rounded-lg px-md py-sm`,e),ref:r,...i,children:[t,(0,n.jsx)(`div`,{dangerouslySetInnerHTML:{__html:a.content}})]})};R_();var cQ=({children:e,...t})=>(0,n.jsx)(v_,{...t,children:e});R_(),Uj(),mk(),X();var lQ=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(M_,{className:Y(`inline-flex h-lg items-center justify-center gap-xs rounded-lg bg-neutral-container pr-3xs pl-xs style-text-default-0 text-neutral-on-container`,e),ref:r,...i,children:[t,(0,n.jsx)(P_,{"aria-label":`Remove`,render:e=>(0,n.jsx)(pk,{onClick:e.onClick,variant:`ghost`,tone:`error`,size:`iconExtraSmall`,children:(0,n.jsx)(Vj,{className:`size-sm`,weight:`bold`})})})]});R_(),X();var uQ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(D_,{"data-chips":!0,className:Y(`group flex size-full flex-wrap items-center gap-2xs empty:hidden`,e),ref:r,...i,children:t});R_();var dQ=({children:e,...t})=>(0,n.jsx)(ph,{...t,children:e});R_(),X();var fQ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(fg,{className:Y(`max-h-[min(23rem,var(--available-height))] scroll-py-[0.5rem] overflow-y-auto overscroll-contain p-xs empty:m-[0px] empty:p-[0px]`,e),ref:r,...i,children:t});R_(),X();var pQ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Qh,{className:Y(`block pb-3xs`,e),ref:r,...i,children:t});R_(),X();var mQ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(eg,{className:Y(`sticky top-[0px] z-1 my-[0px] mr-[0px] -ml-2xs bg-surface-2 px-sm pt-2xs pb-3xs style-text-strong--2 text-on-surface-variant`,e),ref:r,...i,children:t}),hQ,gQ=m((()=>{Sk(),X(),hQ=({variant:e,className:t,children:r,ref:i,...a})=>(0,n.jsx)(`div`,{className:Y(xk({variant:e}),`py-xs`,t),ref:i,...a,children:r})})),_Q,vQ=m((()=>{X(),_Q=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`inline-flex items-center gap-2xs style-text-default-0 text-on-surface-variant group-aria-invalid:text-error-on-container`,e),ref:r,...i,children:t})})),yQ,bQ=m((()=>{Wx(),X(),yQ=({className:e,ref:t,...r})=>(0,n.jsx)(Hx,{className:Y(`w-full grow text-ellipsis outline-none placeholder:opacity-60 disabled:cursor-not-allowed`,e),ref:t,...r})})),xQ=m((()=>{gQ(),vQ(),bQ()}));uo();var SQ=lo(`relative shrink-0 rounded-full`,{variants:{orientation:{horizontal:`w-full`,vertical:`h-full`},style:{rounded:`rounded-full`,square:`rounded-none`},variant:{default:`bg-neutral-border`,strong:`bg-neutral-border-strong`},weight:{thick:`[&_[data-label]]:style-text-prose-0`,medium:`[&_[data-label]]:style-text-prose--1`,thin:`[&_[data-label]]:style-text-prose--2`,thinnest:`[&_[data-label]]:style-text-prose--2`}},defaultVariants:{orientation:`horizontal`,style:`rounded`,variant:`default`,weight:`thinnest`},compoundVariants:[{orientation:`horizontal`,weight:`thick`,className:`h-[8px]`},{orientation:`horizontal`,weight:`medium`,className:`h-[4px]`},{orientation:`horizontal`,weight:`thin`,className:`h-[2px]`},{orientation:`horizontal`,weight:`thinnest`,className:`h-px`},{orientation:`vertical`,weight:`thick`,className:`w-[8px]`},{orientation:`vertical`,weight:`medium`,className:`w-[4px]`},{orientation:`vertical`,weight:`thin`,className:`w-[2px]`},{orientation:`vertical`,weight:`thinnest`,className:`w-px`}]});I_(),X();var CQ=({orientation:e,weight:t,style:r,variant:i,children:a,className:o,labelClassName:s,ref:c,...l})=>(0,n.jsx)(mg,{className:Y(`relative`,SQ({orientation:e,weight:t,style:r,variant:i}),o),orientation:e,ref:c,...l,children:(0,n.jsx)(`span`,{"data-label":!0,className:Y(`absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-surface-background px-2xs whitespace-nowrap text-on-surface-variant`,s),children:a})});R_(),Uj(),mk(),xQ(),X();var wQ=({inline:e=!1,variant:t,className:r,children:i,ref:a,...o})=>{let s=y.default.useId();return e?(0,n.jsx)(`div`,{className:`h-(--input-container-height) py-2xs pr-2xs`,children:(0,n.jsx)(Qm,{className:Y(`h-xl w-full rounded-lg bg-surface-low px-sm outline-border transition-all not-active:outline-1 focus-within:outline-2 hover:outline-2 focus:caret-brand-default focus:outline-brand-border data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50`,`placeholder:opacity-60`,`disabled:cursor-not-allowed`,`text-ellipsis`,r),id:s,ref:a,...o})}):(0,n.jsxs)(hQ,{variant:t,className:`flex h-full! max-w-[500px] flex-wrap py-xs [&:has([data-chips]:empty)>[role=separator]]:hidden [&:has([data-chips]:not(:empty))]:rounded-xl [&:not(:has([data-chips]))>[role=separator]]:hidden`,children:[i,(0,n.jsx)(CQ,{weight:`thinnest`}),(0,n.jsxs)(nh,{className:`relative flex w-full items-center justify-between [&>input]:pr-[2rem] has-[.combobox-clear]:[&>input]:pr-[calc(0.5rem+1.5rem*2)]`,children:[(0,n.jsx)(Qm,{className:Y(`w-full text-ellipsis outline-none placeholder:opacity-60 disabled:cursor-not-allowed`,r),id:s,ref:a,...o}),(0,n.jsxs)(_Q,{children:[(0,n.jsx)(sh,{"aria-label":`Clear selection`,className:Y(r),keepMounted:!0,render:e=>(0,n.jsx)(pk,{onClick:e.onClick,size:`iconExtraSmall`,variant:`ghost`,tone:`error`,children:(0,n.jsx)(Vj,{weight:`bold`})})}),(0,n.jsx)(Bm,{"aria-label":`Open popup`,render:(e,t)=>(0,n.jsx)(pk,{onClick:e.onClick,size:`iconExtraSmall`,variant:t.open?`fill`:`ghost`,tone:`brand`,children:(0,n.jsx)(aj,{weight:`bold`})})})]})]})]})};R_(),Uj(),X();var TQ=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(sg,{className:Y(`mr-2xs grid cursor-default grid-cols-[1fr_0.75rem] items-center gap-xs rounded-md px-2xs py-3xs style-text-default-0 select-none group-data-[side=none]:pr-xs group-data-[side=none]:leading-lg first-of-type:mt-2xs last-of-type:mb-2xs hover:cursor-pointer data-highlighted:relative data-highlighted:z-0 data-highlighted:bg-neutral-container-high data-highlighted:text-neutral-on-container data-highlighted:before:absolute data-highlighted:before:inset-x-3xs data-highlighted:before:inset-y-[0px] data-highlighted:before:z-[-1] data-highlighted:before:rounded-sm data-selected:bg-neutral-default data-selected:text-neutral-on-default pointer-coarse:py-xs`,e),ref:r,...i,children:[(0,n.jsx)(`span`,{className:`col-start-1`,children:t}),(0,n.jsx)(w_,{className:`col-start-2 place-self-end self-center`,children:(0,n.jsx)(yj,{className:`size-sm`,weight:`bold`})})]});R_(),X();var EQ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(hh,{className:Y(`max-h-[min(calc(23rem-var(--input-container-height,0rem)),calc(var(--available-height)-var(--input-container-height,0rem)))] scroll-py-[0.5rem] space-y-3xs overflow-y-auto overscroll-contain data-empty:p-[0px]`,e),ref:r,...i,children:t});R_(),X();var DQ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Th,{children:(0,n.jsx)(Gh,{className:Y(``,e),ref:r,sideOffset:20,...i,children:(0,n.jsx)(Jh,{className:`max-h-[23rem] w-(--anchor-width) max-w-(--available-width) origin-(--transform-origin) rounded-xl bg-surface-2 pl-2xs shadow-md transition-[transform,scale,opacity] duration-100 [--input-container-height:4rem] data-ending-style:scale-95 data-ending-style:opacity-0 data-starting-style:scale-95 data-starting-style:opacity-0`,children:t})})});R_(),X();var OQ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(xh,{className:Y(`flex items-center gap-2xs p-xs style-text-prose--1 text-on-surface-variant empty:hidden`,e),ref:r,...i,children:t});R_(),Uj(),X();var kQ=({placeholder:e,className:t,children:r,ref:i,...a})=>(0,n.jsxs)(Bm,{className:Y(`inline-flex h-xl items-center justify-between gap-xl rounded-xl bg-surface pr-sm pl-md style-text-default-0 outline-2 outline-transparent transition-all hover:cursor-pointer hover:outline-border data-popup-open:outline-brand-border`,t),ref:i,...a,children:[(0,n.jsx)(S_,{placeholder:(0,n.jsx)(`span`,{className:`opacity-70`,children:e})}),(0,n.jsx)(ih,{children:(0,n.jsx)(_j,{})}),r]});R_();var AQ=({children:e,...t})=>(0,n.jsx)(S_,{...t,children:e});Oy();var jQ=({children:e,...t})=>(0,n.jsx)(Vf,{...t,children:e});Oy(),Uj(),mk(),X();var MQ=({className:e,ref:t,...r})=>(0,n.jsx)(ip,{className:Y(`absolute top-2xs right-2xs`,e),ref:t,...r,render:(0,n.jsx)(pk,{"aria-label":`Close`,variant:`ghost`,size:`iconSmall`,tone:`error`,children:(0,n.jsx)(Vj,{weight:`bold`})})});X();var NQ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex h-full flex-col gap-2xs px-md pb-md`,e),ref:r,...i,children:t});Oy(),X();var PQ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(op,{className:Y(`style-text-prose-0 text-on-surface-variant`,e),ref:r,...i,children:t});X();var FQ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex w-full items-center justify-end gap-2xs px-md pb-md`,e),ref:r,...i,children:t});X();var IQ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex flex-col px-md pt-md pb-sm`,e),ref:r,...i,children:t});Oy(),X();var LQ=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(bp,{children:[(0,n.jsx)(np,{className:`fixed inset-0 min-h-dvh bg-scrim backdrop-blur-xl transition-all duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-[-webkit-touch-callout:none]:absolute`}),(0,n.jsx)(mp,{className:Y(`fixed top-[calc(50%+1.25rem*var(--nested-dialogs))] left-1/2 max-w-[calc(100vw-3rem)] min-w-1/6 -translate-1/2 scale-[calc(1-0.1*var(--nested-dialogs))] overflow-hidden rounded-3xl bg-surface-2 shadow-lg transition-all duration-150 data-ending-style:top-[calc(50%+0.25rem+1.25rem*var(--nested-dialogs))] data-ending-style:scale-90 data-ending-style:opacity-0 data-nested-dialog-open:after:opacity-100 data-starting-style:top-[calc(50%+0.25rem+1.25rem*var(--nested-dialogs))] data-starting-style:scale-90 data-starting-style:opacity-0`,e),ref:r,...i,children:t})]});Oy(),X();var RQ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Sp,{className:Y(`flex items-center gap-2xs style-text-strong-1 [&>svg]:size-md`,e),ref:r,...i,children:t});Oy(),X();var zQ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(wp,{className:Y(``,e),ref:r,...i,render:t});dk();var BQ=({children:e,...t})=>(0,n.jsx)(Cb,{...t,children:e});dk(),X();var VQ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Iy,{className:Y(`shrink-0`,e),ref:r,...i,render:t});dk(),X();var HQ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(By,{className:Y(`mx-auto w-full max-w-[32rem] space-y-3xs`,e),ref:r,...i,children:t});dk(),X();var UQ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Hy,{className:Y(`style-text-prose-0 text-on-surface-variant`,e),ref:r,...i,children:t});dk();var WQ=({children:e,...t})=>(0,n.jsxs)(bb,{...t,children:[(0,n.jsx)(Zy,{}),(0,n.jsx)(Jy,{className:`size-full`,children:e})]});dk(),X();var GQ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Zb,{className:Y(``,e),ref:r,...i,render:t});dk(),X();var KQ=`fixed inset-0 min-h-dvh bg-scrim opacity-[calc(var(--backdrop-opacity)*(1-var(--drawer-swipe-progress)))] transition-opacity duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] [--backdrop-opacity:0.2] [--bleed:3rem] data-ending-style:opacity-0 data-ending-style:duration-[calc(var(--drawer-swipe-strength)*0.4s)] data-starting-style:opacity-0 data-swiping:duration-0 supports-[-webkit-touch-callout:none]:absolute dark:[--backdrop-opacity:0.7]`,qQ=Y(`fixed inset-0 flex`,`items-end justify-center`,`has-[[data-swipe-direction=up]]:items-start has-[[data-swipe-direction=up]]:justify-center`,`has-[[data-swipe-direction=right]]:items-center has-[[data-swipe-direction=right]]:justify-end`,`has-[[data-swipe-direction=left]]:items-center has-[[data-swipe-direction=left]]:justify-start`),JQ=Y(`touch-auto overflow-y-auto overscroll-contain bg-surface-2 p-md outline outline-border-strong transition-transform duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] data-ending-style:duration-[calc(var(--drawer-swipe-strength)*0.4s)] data-swiping:select-none`,`mb-[-3rem] max-h-[calc(80vh+3rem)] w-full transform-[translateY(var(--drawer-swipe-movement-y))] rounded-t-2xl pb-[calc(1.5rem+env(safe-area-inset-bottom,0)+3rem)] shadow-[0_-8px_24px_var(--color-shadow)] data-ending-style:transform-[translateY(calc(100%-3rem+2px))] data-starting-style:transform-[translateY(calc(100%-3rem+2px))]`,`data-[swipe-direction=up]:mt-[-3rem] data-[swipe-direction=up]:mb-0 data-[swipe-direction=up]:rounded-t-none data-[swipe-direction=up]:rounded-b-2xl data-[swipe-direction=up]:pt-[calc(1.5rem+env(safe-area-inset-top,0)+3rem)] data-[swipe-direction=up]:pb-md data-[swipe-direction=up]:shadow-[0_8px_24px_var(--color-shadow)] data-[swipe-direction=up]:data-ending-style:transform-[translateY(calc(-100%+3rem-2px))] data-[swipe-direction=up]:data-starting-style:transform-[translateY(calc(-100%+3rem-2px))]`,`data-[swipe-direction=right]:mr-[-3rem] data-[swipe-direction=right]:mb-0 data-[swipe-direction=right]:h-full data-[swipe-direction=right]:max-h-dvh data-[swipe-direction=right]:w-[23rem] data-[swipe-direction=right]:max-w-[calc(100vw-3rem)] data-[swipe-direction=right]:transform-[translateX(var(--drawer-swipe-movement-x))] data-[swipe-direction=right]:rounded-none data-[swipe-direction=right]:rounded-l-2xl data-[swipe-direction=right]:pr-[4.5rem] data-[swipe-direction=right]:pb-md data-[swipe-direction=right]:shadow-[-8px_0_24px_var(--color-shadow)] data-[swipe-direction=right]:data-ending-style:transform-[translateX(calc(100%-3rem+2px))] data-[swipe-direction=right]:data-starting-style:transform-[translateX(calc(100%-3rem+2px))]`,`data-[swipe-direction=left]:mb-0 data-[swipe-direction=left]:ml-[-3rem] data-[swipe-direction=left]:h-full data-[swipe-direction=left]:max-h-dvh data-[swipe-direction=left]:w-[23rem] data-[swipe-direction=left]:max-w-[calc(100vw-3rem)] data-[swipe-direction=left]:transform-[translateX(var(--drawer-swipe-movement-x))] data-[swipe-direction=left]:rounded-none data-[swipe-direction=left]:rounded-r-2xl data-[swipe-direction=left]:pb-md data-[swipe-direction=left]:pl-[4.5rem] data-[swipe-direction=left]:shadow-[8px_0_24px_var(--color-shadow)] data-[swipe-direction=left]:data-ending-style:transform-[translateX(calc(-100%+3rem-2px))] data-[swipe-direction=left]:data-starting-style:transform-[translateX(calc(-100%+3rem-2px))]`),YQ=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(vb,{children:[(0,n.jsx)(Py,{className:KQ}),(0,n.jsx)(kx,{className:qQ,children:(0,n.jsx)(gb,{className:Y(JQ,e),ref:r,...i,children:t})})]});dk(),X();var XQ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Yb,{className:Y(`style-text-strong-1`,e),ref:r,...i,children:t});X();var ZQ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex items-start justify-between pb-sm`,e),ref:r,...i,children:t});X();var QQ=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`space-y-2xs`,e),ref:r,...i,children:t}),$Q=g({FieldDescription:()=>e$}),e$,t$=m((()=>{X(),e$=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`p`,{className:Y(`style-text-prose--1 text-on-surface-variant`,e),ref:r,...i,children:t})}));function n$({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}var r$,i$=m((()=>{r$=(e=>(e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e))(r$||{})}));function a$(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}function o$(e){try{++x$,e()}finally{--x$||c$()}}function s$(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=m$(n,e)}function c$(){if(!(x$>0)){for(;v$<y$;){let e=d$[v$];d$[v$++]=void 0,e.notify()}v$=0,y$=0}}function l$(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?r$.None:r$.Mutable,get(){return b$!==void 0&&p$(i,b$,f$),i._snapshot},subscribe(e){let t=a$(e),n={current:!1},r=u$(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=b$,o=t?.compare??Object.is;if(n)b$=i,++f$,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=r$.Mutable|r$.RecursedCheck);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{b$=a,n&&(i.flags&=~r$.RecursedCheck),s$(i)}}};return n?(i.flags=r$.Mutable|r$.Dirty,i.get=function(){let e=i.flags;if(e&r$.Dirty||e&r$.Pending&&g$(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&_$(e)}}else e&r$.Pending&&(i.flags=e&~r$.Pending);return b$!==void 0&&p$(i,b$,f$),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(h$(e),_$(e),c$())}},i}function u$(e){let t=()=>{let t=b$;b$=n,++f$,n.depsTail=void 0,n.flags=r$.Watching|r$.RecursedCheck;try{return e()}finally{b$=t,n.flags&=~r$.RecursedCheck,s$(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:r$.Watching|r$.RecursedCheck,notify(){let e=this.flags;e&r$.Dirty||e&r$.Pending&&g$(this.deps,this)?t():this.flags=r$.Watching},stop(){this.flags=r$.None,this.depsTail=void 0,s$(this)}};return t(),n}var d$,f$,p$,m$,h$,g$,_$,v$,y$,b$,x$,S$=m((()=>{i$(),d$=[],f$=0,{link:p$,unlink:m$,propagate:h$,checkDirty:g$,shallowPropagate:_$}=n$({update(e){return e._update()},notify(e){d$[y$++]=e,e.flags&=~r$.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=r$.Mutable|r$.Dirty,s$(e))}}),v$=0,y$=0,x$=0}));function C$(e){return typeof e==`function`?new T$(e):new w$(e)}var w$,T$,E$=m((()=>{S$(),w$=class{constructor(e){this.atom=l$(e)}setState(e){this.atom.set(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(a$(e))}},T$=class{constructor(e){this.atom=l$(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(a$(e))}}})),D$=m((()=>{S$(),E$()}));function O$(e,t){return new k$(e,t).maybeExecute}var k$,A$=m((()=>{k$=class{constructor(e,t){this.fn=e,this.options=t,this.lastExecutionTime=0,this.isPending=!1,this.maybeExecute=(...e)=>{let t=Date.now()-this.lastExecutionTime;if(this.options.leading&&t>=this.options.wait)this.execute(...e);else if(this.lastArgs=e,!this.timeoutId&&this.options.trailing){let e=this.options.wait-t;this.isPending=!0,this.timeoutId=setTimeout(()=>{this.lastArgs!==void 0&&this.execute(...this.lastArgs)},e)}},this.execute=(...e)=>{this.fn(...e),this.options.onExecute?.(e,this),this.lastExecutionTime=Date.now(),this.clearTimeout(),this.lastArgs=void 0,this.isPending=!1},this.flush=()=>{this.isPending&&this.lastArgs&&this.execute(...this.lastArgs)},this.cancel=()=>{this.clearTimeout(),this.lastArgs=void 0,this.isPending=!1},this.clearTimeout=()=>{this.timeoutId&&=(clearTimeout(this.timeoutId),void 0)},this.options.leading===void 0&&this.options.trailing===void 0&&(this.options.leading=!0,this.options.trailing=!0)}}})),j$=m((()=>{A$()})),M$,N$=m((()=>{M$=class{#e=!0;#t;#n;#r;#i;#a;#o;#s;#c=0;#l=5;#u=!1;#d=!1;#f=null;#p=()=>{this.debugLog(`Connected to event bus`),this.#a=!0,this.#u=!1,this.debugLog(`Emitting queued events`,this.#i),this.#i.forEach(e=>this.emitEventToBus(e)),this.#i=[],this.stopConnectLoop(),this.#n().removeEventListener(`tanstack-connect-success`,this.#p)};#m=()=>{if(this.#c<this.#l){this.#c++,this.dispatchCustomEvent(`tanstack-connect`,{});return}this.#n().removeEventListener(`tanstack-connect`,this.#m),this.#d=!0,this.debugLog(`Max retries reached, giving up on connection`),this.stopConnectLoop()};#h=()=>{this.#u||(this.#u=!0,this.#n().addEventListener(`tanstack-connect-success`,this.#p),this.#m())};constructor({pluginId:e,debug:t=!1,enabled:n=!0,reconnectEveryMs:r=300}){this.#t=e,this.#e=n,this.#n=this.getGlobalTarget,this.#r=t,this.debugLog(` Initializing event subscription for plugin`,this.#t),this.#i=[],this.#a=!1,this.#d=!1,this.#o=null,this.#s=r}startConnectLoop(){this.#o!==null||this.#a||(this.debugLog(`Starting connect loop (every ${this.#s}ms)`),this.#o=setInterval(this.#m,this.#s))}stopConnectLoop(){this.#u=!1,this.#o!==null&&(clearInterval(this.#o),this.#o=null,this.#i=[],this.debugLog(`Stopped connect loop`))}debugLog(...e){this.#r&&console.log(`🌴 [tanstack-devtools:${this.#t}-plugin]`,...e)}getGlobalTarget(){if(typeof globalThis<`u`&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog(`Using global event target`),globalThis.__TANSTACK_EVENT_TARGET__;if(typeof window<`u`&&window.addEventListener!==void 0)return this.debugLog(`Using window as event target`),window;let e=typeof EventTarget<`u`?new EventTarget:void 0;return e===void 0||e.addEventListener===void 0?(this.debugLog(`No event mechanism available, running in non-web environment`),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog(`Using new EventTarget as fallback`),e)}getPluginId(){return this.#t}dispatchCustomEventShim(e,t){try{let n=new Event(e,{detail:t});this.#n().dispatchEvent(n)}catch{this.debugLog(`Failed to dispatch shim event`)}}dispatchCustomEvent(e,t){try{this.#n().dispatchEvent(new CustomEvent(e,{detail:t}))}catch{this.dispatchCustomEventShim(e,t)}}emitEventToBus(e){this.debugLog(`Emitting event to client bus`,e),this.dispatchCustomEvent(`tanstack-dispatch-event`,e)}createEventPayload(e,t){return{type:`${this.#t}:${e}`,payload:t,pluginId:this.#t}}emit(e,t){if(!this.#e){this.debugLog(`Event bus client is disabled, not emitting event`,e,t);return}if(this.#f&&(this.debugLog(`Emitting event to internal event target`,e,t),this.#f.dispatchEvent(new CustomEvent(`${this.#t}:${e}`,{detail:this.createEventPayload(e,t)}))),this.#d){this.debugLog(`Previously failed to connect, not emitting to bus`);return}if(!this.#a){this.debugLog(`Bus not available, will be pushed as soon as connected`),this.#i.push(this.createEventPayload(e,t)),typeof CustomEvent<`u`&&!this.#u&&(this.#h(),this.startConnectLoop());return}return this.emitEventToBus(this.createEventPayload(e,t))}on(e,t,n){let r=n?.withEventTarget??!1,i=`${this.#t}:${e}`;if(r&&(this.#f||=new EventTarget,this.#f.addEventListener(i,e=>{t(e.detail)})),!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`,i),()=>{};let a=e=>{this.debugLog(`Received event from bus`,e.detail),t(e.detail)};return this.#n().addEventListener(i,a),this.debugLog(`Registered event to bus`,i),()=>{r&&this.#f?.removeEventListener(i,a),this.#n().removeEventListener(i,a)}}onAll(e){if(!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`),()=>{};let t=t=>{let n=t.detail;e(n)};return this.#n().addEventListener(`tanstack-devtools-global`,t),()=>this.#n().removeEventListener(`tanstack-devtools-global`,t)}onAllPluginEvents(e){if(!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`),()=>{};let t=t=>{let n=t.detail;this.#t&&n.pluginId!==this.#t||e(n)};return this.#n().addEventListener(`tanstack-devtools-global`,t),()=>this.#n().removeEventListener(`tanstack-devtools-global`,t)}}})),P$=m((()=>{N$()})),F$,I$,L$=m((()=>{P$(),F$=class extends M${constructor(){super({pluginId:`form-devtools`,reconnectEveryMs:1e3})}},I$=new F$}));function R$(e,t){return typeof e==`function`?e(t):e}function z$(e,t){return H$(t).reduce((e,t)=>{if(e===null)return null;if(e!==void 0)return e[t]},e)}function B$(e,t,n){let r=H$(t);function i(e){if(!r.length)return R$(n,e);let t=r.shift();if(typeof t==`string`||typeof t==`number`&&!Array.isArray(e))return typeof e==`object`?(e===null&&(e={}),{...e,[t]:i(e[t])}):{[t]:i()};if(Array.isArray(e)&&typeof t==`number`){let n=e.slice(0,t);return[...n.length?n:Array(t),i(e[t]),...e.slice(t+1)]}return[...Array(t),i()]}return i(e)}function V$(e,t){let n=H$(t);function r(e){if(!e)return;if(n.length===1){let t=n[0];if(Array.isArray(e)&&typeof t==`number`)return e.filter((e,n)=>n!==t);let{[t]:r,...i}=e;return i}let t=n.shift();if((typeof t==`string`||typeof t==`number`&&!Array.isArray(e))&&typeof e==`object`)return{...e,[t]:r(e[t])};if(typeof t==`number`&&Array.isArray(e)){if(t>=e.length)return e;let n=e.slice(0,t);return[...n.length?n:Array(t),r(e[t]),...e.slice(t+1)]}throw Error(`It seems we have created an infinite loop in deleteBy. `)}return r(e)}function H$(e){if(Array.isArray(e))return[...e];if(typeof e!=`string`)throw Error(`Path must be a string.`);return e.replace(/(^\[)|]/gm,``).replace(/\[/g,`.`).replace(Z$,r1).replace(Q$,`.${r1}.`).replace($$,`${r1}.`).replace(e1,`.${r1}`).replace(t1,`.`).split(`.`).map(e=>{if(e.startsWith(n1)){let t=e.substring(7),n=parseInt(t,10);return String(n)===t?n:t}return e})}function U$(e,t){return e.length===0?t:t.length===0?e:t.startsWith(`[`)||t.startsWith(`.`)?e+t:`${e}.${t}`}function W$(e){return!(Array.isArray(e)&&e.length===0)}function G$(e,t){return t.validationLogic({form:t.form,validators:t.validators,event:{type:e,fieldName:t.fieldName,async:!1},runValidation:e=>e.validators.filter(Boolean).map(e=>({cause:e.cause,validate:e.fn}))})}function K$(e,t){let{asyncDebounceMs:n}=t,{onBlurAsyncDebounceMs:r,onChangeAsyncDebounceMs:i,onDynamicAsyncDebounceMs:a}=t.validators||{},o=n??0;return t.validationLogic({form:t.form,validators:t.validators,event:{type:e,fieldName:t.fieldName,async:!0},runValidation:t=>t.validators.filter(Boolean).map(t=>{let n=t?.cause||e,s=o;switch(n){case`change`:s=i??o;break;case`blur`:s=r??o;break;case`dynamic`:s=a??o;break;case`submit`:s=0;break}return e===`submit`&&(s=0),{cause:n,validate:t.fn,debounceMs:s}})})}function q$(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!t.has(n)||!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length||n.length===0&&!Array.isArray(e)&&!Array.isArray(t)&&(Object.getPrototypeOf(e)!==Object.prototype||Object.getPrototypeOf(t)!==Object.prototype))return!1;for(let i of n)if(!r.includes(i)||!q$(e[i],t[i]))return!1;return!0}function J$(e,t){return e==null?t:{...e,...t}}function Y$(){let e=0,t,n=``;if(!l1||s1+16>256){for(l1=Array(256),e=256;e--;)l1[e]=256*Math.random()|0;e=0,s1=0}for(;e<16;e++)t=l1[s1+e],e===6?n+=c1[t&15|64]:e===8?n+=c1[t&63|128]:n+=c1[t],e&1&&e>1&&e<11&&(n+=`-`);return s1++,n}function X$(e){if(typeof e!=`object`||!e)return e;if(e instanceof Date)return new Date(e.getTime());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++)t[n]=X$(e[n]);return t}if(e instanceof Map){let t=new Map;return e.forEach((e,n)=>{t.set(n,X$(e))}),t}if(e instanceof Set){let t=new Set;return e.forEach(e=>{t.add(X$(e))}),t}let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=X$(e[n]));return t}var Z$,Q$,$$,e1,t1,n1,r1,i1,a1,o1,s1,c1,l1,u1,d1=m((()=>{for(j$(),L$(),Z$=/^(\d+)$/gm,Q$=/\.(\d+)(?=\.)/gm,$$=/^(\d+)\./gm,e1=/\.(\d+$)/gm,t1=/\.{2,}/gm,n1=`__int__`,r1=`${n1}$1`,i1=e=>!!e&&typeof e==`object`&&(`fields`in e),a1=({newFormValidatorError:e,isPreviousErrorFromFormValidator:t,previousErrorValue:n})=>e?{newErrorValue:e,newSource:`form`}:t?{newErrorValue:void 0,newSource:void 0}:n?{newErrorValue:n,newSource:`field`}:{newErrorValue:void 0,newSource:void 0},o1=({formLevelError:e,fieldLevelError:t})=>t?{newErrorValue:t,newSource:`field`}:e?{newErrorValue:e,newSource:`form`}:{newErrorValue:void 0,newSource:void 0},s1=256,c1=[];s1--;)c1[s1]=(s1+256).toString(16).substring(1);u1=O$(e=>I$.emit(`form-state`,{id:e.formId,state:e.store.state}),{wait:300})})),f1,p1=m((()=>{f1=e=>{if(!e.validators)return e.runValidation({validators:[],form:e.form});let t=e.event.async,n=t?void 0:{fn:e.validators.onMount,cause:`mount`},r={fn:t?e.validators.onChangeAsync:e.validators.onChange,cause:`change`},i={fn:t?e.validators.onBlurAsync:e.validators.onBlur,cause:`blur`},a={fn:t?e.validators.onSubmitAsync:e.validators.onSubmit,cause:`submit`},o=t?void 0:{fn:()=>void 0,cause:`server`};switch(e.event.type){case`mount`:return e.runValidation({validators:[n],form:e.form});case`submit`:return e.runValidation({validators:[r,i,a,o],form:e.form});case`server`:return e.runValidation({validators:[],form:e.form});case`blur`:return e.runValidation({validators:[i,o],form:e.form});case`change`:return e.runValidation({validators:[r,o],form:e.form});default:throw Error(`Unknown validation event type: ${e.event.type}`)}}}));function m1(e,t){let n=new Map;for(let r of e){let e=r.path??[],i=t,a=``;for(let t=0;t<e.length;t++){let n=e[t];if(n===void 0)continue;let r=typeof n==`object`?n.key:n,o=Number(r);Array.isArray(i)&&!Number.isNaN(o)?a+=`[${o}]`:a+=(t>0?`.`:``)+String(r),i=typeof i==`object`&&i?i[r]:void 0}n.set(a,(n.get(a)??[]).concat(r))}return Object.fromEntries(n)}var h1,g1,_1,v1=m((()=>{h1=(e,t)=>{let n=m1(e,t);return{form:n,fields:n}},g1={validate({value:e,validationSource:t},n){let r=n[`~standard`].validate(e);if(r instanceof Promise)throw Error(`async function passed to sync validator`);if(r.issues)return t===`field`?r.issues:h1(r.issues,e)},async validateAsync({value:e,validationSource:t},n){let r=await n[`~standard`].validate(e);if(r.issues)return t===`field`?r.issues:h1(r.issues,e)}},_1=e=>!!e&&`~standard`in e}));function y1(e){function t(t){let n=e.getFieldMeta(t)??b1;e.setFieldMeta(t,{...n,_arrayVersion:(n._arrayVersion||0)+1})}function n(n,r,i){t(n);let a=s(n,r,`move`,i),c=Math.min(r,i),u=Math.max(r,i);for(let e=c;e<=u;e++)a.push(o(n,e));let d=Object.keys(e.fieldInfo).reduce((t,i)=>(i.startsWith(o(n,r))&&t.set(i,e.getFieldMeta(i)),t),new Map);l(a,r<i?`up`:`down`),Object.keys(e.fieldInfo).filter(e=>e.startsWith(o(n,i))).forEach(t=>{let a=t.replace(o(n,i),o(n,r)),s=d.get(a);s&&e.setFieldMeta(t,s)})}function r(e,n){t(e),l(s(e,n,`remove`),`up`)}function i(n,r,i){t(n),s(n,r,`swap`,i).forEach(t=>{if(!t.toString().startsWith(o(n,r)))return;let a=t.toString().replace(o(n,r),o(n,i)),[s,c]=[e.getFieldMeta(t),e.getFieldMeta(a)];s&&e.setFieldMeta(a,s),c&&e.setFieldMeta(t,c)})}function a(n,r){t(n);let i=s(n,r,`insert`);l(i,`down`),i.forEach(t=>{t.toString().startsWith(o(n,r))&&e.setFieldMeta(t,u())})}function o(e,t){return`${e}[${t}]`}function s(t,n,r,i){let a=[o(t,n)];switch(r){case`swap`:a.push(o(t,i));break;case`move`:{let[e,r]=[Math.min(n,i),Math.max(n,i)];for(let n=e;n<=r;n++)a.push(o(t,n));break}default:{let r=e.getFieldValue(t),i=Array.isArray(r)?r.length:0;for(let e=n+1;e<i;e++)a.push(o(t,e));break}}return Object.keys(e.fieldInfo).filter(e=>a.some(t=>e.startsWith(t)))}function c(e,t){return e.replace(/\[(\d+)\]/,(e,n)=>{let r=parseInt(n,10);return`[${t===`up`?r+1:Math.max(0,r-1)}]`})}function l(t,n){(n===`up`?t:[...t].reverse()).forEach(t=>{let r=c(t.toString(),n),i=e.getFieldMeta(r);i?e.setFieldMeta(t,i):e.setFieldMeta(t,u())})}let u=()=>b1;return{bumpArrayVersion:t,handleArrayMove:n,handleArrayRemove:r,handleArraySwap:i,handleArrayInsert:a}}var b1,x1=m((()=>{b1={isValidating:!1,isTouched:!1,isBlurred:!1,isDirty:!1,isPristine:!0,isValid:!0,isDefaultValue:!0,errors:[],errorMap:{},errorSourceMap:{},_arrayVersion:0}}));function S1(e){return{values:e.values??{},errorMap:e.errorMap??{},fieldMetaBase:e.fieldMetaBase??{},isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,isSubmitSuccessful:e.isSubmitSuccessful??!1,validationMetaMap:e.validationMetaMap??{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}}}function C1(e){return e?i1(e)?{formError:C1(e.form).formError,fieldErrors:e.fields}:{formError:e}:{formError:void 0}}function w1(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}var T1,E1=m((()=>{D$(),d1(),p1(),v1(),x1(),L$(),T1=class{constructor(e){this.options={},this.fieldInfo={},this.mount=()=>{let e=this.store.subscribe(()=>{u1(this)}),t=I$.on(`request-form-state`,e=>{e.payload.id===this._formId&&I$.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options})}),n=I$.on(`request-form-reset`,e=>{e.payload.id===this._formId&&this.reset()}),r=I$.on(`request-form-force-submit`,e=>{e.payload.id===this._formId&&(this._devtoolsSubmissionOverride=!0,this.handleSubmit(),this._devtoolsSubmissionOverride=!1)}),i=()=>{r(),n(),t(),e.unsubscribe(),I$.emit(`form-unmounted`,{id:this._formId})};this.options.listeners?.onMount?.({formApi:this});let{onMount:a}=this.options.validators||{};return I$.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options}),a&&this.validateSync(`mount`),i},this.update=e=>{if(!e)return;let t=this.options;this.options=e;let n=e.defaultValues&&!q$(e.defaultValues,t.defaultValues)&&!this.state.isTouched,r=!q$(e.defaultState,t.defaultState)&&!this.state.isTouched;!n&&!r||(o$(()=>{this.baseStore.setState(()=>S1(Object.assign({},this.state,r?e.defaultState:{},n?{values:e.defaultValues}:{})))}),I$.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options}))},this.reset=(e,t)=>{let{fieldMeta:n}=this.state,r=this.resetFieldMeta(n);e&&!t?.keepDefaultValues&&(this.options={...this.options,defaultValues:e}),this.baseStore.setState(()=>{let t=e??this.options.defaultValues??this.options.defaultState?.values;return e||Object.values(this.fieldInfo).forEach(e=>{e.instance&&e.instance.options.defaultValue!==void 0&&(t=B$(t,e.instance.name,e.instance.options.defaultValue))}),S1({...this.options.defaultState,values:t,fieldMetaBase:r})})},this.validateAllFields=async e=>{let t=[];return o$(()=>{Object.values(this.fieldInfo).forEach(n=>{if(!n.instance)return;let r=n.instance;t.push(Promise.resolve().then(()=>r.validate(e,{skipFormValidation:!0}))),n.instance.state.meta.isTouched||n.instance.setMeta(e=>({...e,isTouched:!0}))})}),(await Promise.all(t)).flat()},this.validateArrayFieldsStartingFrom=async(e,t,n)=>{let r=this.getFieldValue(e),i=Array.isArray(r)?Math.max(r.length-1,0):null,a=[`${e}[${t}]`];for(let n=t+1;n<=(i??0);n++)a.push(`${e}[${n}]`);let o=Object.keys(this.fieldInfo).filter(e=>a.some(t=>e.startsWith(t))),s=[];return o$(()=>{o.forEach(e=>{s.push(Promise.resolve().then(()=>this.validateField(e,n)))})}),(await Promise.all(s)).flat()},this.validateField=(e,t)=>{let n=this.fieldInfo[e]?.instance;if(!n){let{hasErrored:n}=this.validateSync(t);return n&&!this.options.asyncAlways?this.getFieldMeta(e)?.errors??[]:this.validateAsync(t).then(()=>this.getFieldMeta(e)?.errors??[])}return n.state.meta.isTouched||n.setMeta(e=>({...e,isTouched:!0})),n.validate(t)},this.validateSync=e=>{let t=G$(e,{...this.options,form:this,validationLogic:this.options.validationLogic||f1}),n=!1,r={};return o$(()=>{for(let e of t){if(!e.validate)continue;let{formError:t,fieldErrors:i}=C1(this.runValidator({validate:e.validate,value:{value:this.state.values,formApi:this,validationSource:`form`},type:`validate`})),a=w1(e.cause),o=new Set([...Object.keys(this.state.fieldMeta),...Object.keys(i||{})]);for(let e of o){if(this.baseStore.state.fieldMetaBase[e]===void 0&&!i?.[e])continue;let{errorMap:t,errorSourceMap:n}=this.getFieldMeta(e)??b1,o=i?.[e],{newErrorValue:s,newSource:c}=a1({newFormValidatorError:o,isPreviousErrorFromFormValidator:n?.[a]===`form`,previousErrorValue:t?.[a]});c===`form`&&(r[e]={...r[e],[a]:o}),t?.[a]!==s&&this.setFieldMeta(e,(e=b1)=>({...e,errorMap:{...e.errorMap,[a]:s},errorSourceMap:{...e.errorSourceMap,[a]:c}}))}this.state.errorMap?.[a]!==t&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[a]:t}})),(t||i)&&(n=!0)}let i=w1(`submit`);this.state.errorMap?.[i]&&e!==`submit`&&!n&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[i]:void 0}}));let a=w1(`server`);this.state.errorMap?.[a]&&e!==`server`&&!n&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[a]:void 0}}))}),{hasErrored:n,fieldsErrorMap:r}},this.validateAsync=async e=>{let t=K$(e,{...this.options,form:this,validationLogic:this.options.validationLogic||f1});this.state.isFormValidating||this.baseStore.setState(e=>({...e,isFormValidating:!0}));let n=[],r;for(let e of t){if(!e.validate)continue;let t=w1(e.cause);this.state.validationMetaMap[t]?.lastAbortController.abort();let i=new AbortController;this.state.validationMetaMap[t]={lastAbortController:i},n.push(new Promise(async t=>{let n;try{n=await new Promise((t,n)=>{setTimeout(async()=>{if(i.signal.aborted)return t(void 0);try{t(await this.runValidator({validate:e.validate,value:{value:this.state.values,formApi:this,validationSource:`form`,signal:i.signal},type:`validateAsync`}))}catch(e){n(e)}},e.debounceMs)})}catch(e){n=e}let{formError:a,fieldErrors:o}=C1(n);o&&(r=r?{...r,...o}:o);let s=w1(e.cause);for(let e of Object.keys(this.state.fieldMeta)){if(this.baseStore.state.fieldMetaBase[e]===void 0)continue;let t=this.getFieldMeta(e);if(!t)continue;let{errorMap:n,errorSourceMap:i}=t,a=r?.[e],{newErrorValue:o,newSource:c}=a1({newFormValidatorError:a,isPreviousErrorFromFormValidator:i?.[s]===`form`,previousErrorValue:n?.[s]});n?.[s]!==o&&this.setFieldMeta(e,e=>({...e,errorMap:{...e.errorMap,[s]:o},errorSourceMap:{...e.errorSourceMap,[s]:c}}))}this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[s]:a}})),t(r?{fieldErrors:r,errorMapKey:s}:void 0)}))}let i=[],a={};if(n.length){i=await Promise.all(n);for(let e of i)if(e?.fieldErrors){let{errorMapKey:t}=e;for(let[n,r]of Object.entries(e.fieldErrors))a[n]={...a[n]||{},[t]:r}}}return this.baseStore.setState(e=>({...e,isFormValidating:!1})),a},this.validate=e=>{let{hasErrored:t,fieldsErrorMap:n}=this.validateSync(e);return t&&!this.options.asyncAlways?n:this.validateAsync(e)},this._handleSubmit=async e=>{this.baseStore.setState(e=>({...e,isSubmitted:!1,submissionAttempts:e.submissionAttempts+1,isSubmitSuccessful:!1})),o$(()=>{Object.values(this.fieldInfo).forEach(e=>{e.instance&&(e.instance.state.meta.isTouched||e.instance.setMeta(e=>({...e,isTouched:!0})))})});let t=e??this.options.onSubmitMeta;if(!this.state.canSubmit&&!this._devtoolsSubmissionOverride){this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t});return}this.baseStore.setState(e=>({...e,isSubmitting:!0}));let n=()=>{this.baseStore.setState(e=>({...e,isSubmitting:!1}))};if(await this.validateAllFields(`submit`),!this.state.isFieldsValid){n(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t}),I$.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`validateAllFields`,errors:Object.values(this.state.fieldMeta).map(e=>e.errors).flat()});return}if(await this.validate(`submit`),!this.state.isValid){n(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t}),I$.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`validate`,errors:this.state.errors});return}o$(()=>{Object.values(this.fieldInfo).forEach(e=>{e.instance?.options.listeners?.onSubmit?.({value:e.instance.state.value,fieldApi:e.instance})})}),this.options.listeners?.onSubmit?.({formApi:this,meta:t});try{await this.options.onSubmit?.({value:this.state.values,formApi:this,meta:t}),o$(()=>{this.baseStore.setState(e=>({...e,isSubmitted:!0,isSubmitSuccessful:!0})),I$.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!0}),n()})}catch(e){throw this.baseStore.setState(e=>({...e,isSubmitSuccessful:!1})),I$.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`inflight`,onError:e}),n(),e}},this.getFieldValue=e=>z$(this.state.values,e),this.getFieldMeta=e=>this.state.fieldMeta[e],this.getFieldInfo=e=>this.fieldInfo[e]||={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.setFieldMeta=(e,t)=>{this.baseStore.setState(n=>({...n,fieldMetaBase:{...n.fieldMetaBase,[e]:R$(t,n.fieldMetaBase[e])}}))},this.resetFieldMeta=e=>Object.keys(e).reduce((e,t)=>{let n=t;return e[n]=b1,e},{}),this.setFieldValue=(e,t,n)=>{let r=n?.dontUpdateMeta??!1,i=n?.dontRunListeners??!1,a=n?.dontValidate??!1;o$(()=>{r||this.setFieldMeta(e,e=>({...e,isTouched:!0,isDirty:!0,errorMap:{...e?.errorMap,onMount:void 0}})),this.baseStore.setState(n=>({...n,values:B$(n.values,e,t)}))}),i||this.getFieldInfo(e).instance?.triggerOnChangeListener(),a||this.validateField(e,`change`)},this.deleteField=e=>{let t=[...Object.keys(this.fieldInfo).filter(t=>{let n=e.toString();return t!==n&&t.startsWith(n)}),e];this.baseStore.setState(e=>{let n={...e};return t.forEach(e=>{n.values=V$(n.values,e),delete this.fieldInfo[e],delete n.fieldMetaBase[e]}),n})},this.pushFieldValue=(e,t,n)=>{this.setFieldValue(e,e=>[...Array.isArray(e)?e:[],t],n),y1(this).bumpArrayVersion(e)},this.insertFieldValue=async(e,t,n,r)=>{this.setFieldValue(e,e=>[...e.slice(0,t),n,...e.slice(t)],J$(r,{dontValidate:!0}));let i=r?.dontValidate??!1;i||await this.validateField(e,`change`),y1(this).handleArrayInsert(e,t),i||await this.validateArrayFieldsStartingFrom(e,t,`change`)},this.replaceFieldValue=async(e,t,n,r)=>{this.setFieldValue(e,e=>e.map((e,r)=>r===t?n:e),J$(r,{dontValidate:!0})),y1(this).bumpArrayVersion(e),(r?.dontValidate??!1)||(await this.validateField(e,`change`),await this.validateArrayFieldsStartingFrom(e,t,`change`))},this.removeFieldValue=async(e,t,n)=>{let r=this.getFieldValue(e),i=Array.isArray(r)?Math.max(r.length-1,0):null;if(this.setFieldValue(e,e=>e.filter((e,n)=>n!==t),J$(n,{dontValidate:!0})),y1(this).handleArrayRemove(e,t),i!==null){let t=`${e}[${i}]`;this.deleteField(t)}(n?.dontValidate??!1)||(await this.validateField(e,`change`),await this.validateArrayFieldsStartingFrom(e,t,`change`))},this.swapFieldValues=(e,t,n,r)=>{this.setFieldValue(e,e=>{let r=e[t],i=e[n];return B$(B$(e,`${t}`,i),`${n}`,r)},J$(r,{dontValidate:!0})),y1(this).handleArraySwap(e,t,n),(r?.dontValidate??!1)||(this.validateField(e,`change`),this.validateField(`${e}[${t}]`,`change`),this.validateField(`${e}[${n}]`,`change`))},this.moveFieldValues=(e,t,n,r)=>{this.setFieldValue(e,e=>{let r=[...e];return r.splice(n,0,r.splice(t,1)[0]),r},J$(r,{dontValidate:!0})),y1(this).handleArrayMove(e,t,n),(r?.dontValidate??!1)||(this.validateField(e,`change`),this.validateField(`${e}[${t}]`,`change`),this.validateField(`${e}[${n}]`,`change`))},this.clearFieldValues=(e,t)=>{let n=this.getFieldValue(e),r=Array.isArray(n)?Math.max(n.length-1,0):null;if(this.setFieldValue(e,[],J$(t,{dontValidate:!0})),y1(this).bumpArrayVersion(e),r!==null)for(let t=0;t<=r;t++){let n=`${e}[${t}]`;this.deleteField(n)}(t?.dontValidate??!1)||this.validateField(e,`change`)},this.resetField=e=>{this.baseStore.setState(t=>{let n=this.getFieldInfo(e).instance?.options.defaultValue,r=z$(this.options.defaultValues,e),i=n??r;return{...t,fieldMetaBase:{...t.fieldMetaBase,[e]:b1},values:i===void 0?t.values:B$(t.values,e,i)}})},this.setErrorMap=e=>{o$(()=>{Object.entries(e).forEach(([e,t])=>{let n=e;if(i1(t)){let{formError:e,fieldErrors:r}=C1(t);for(let e of Object.keys(this.fieldInfo))this.getFieldMeta(e)&&this.setFieldMeta(e,t=>({...t,errorMap:{...t.errorMap,[n]:r?.[e]},errorSourceMap:{...t.errorSourceMap,[n]:`form`}}));this.baseStore.setState(t=>({...t,errorMap:{...t.errorMap,[n]:e}}))}else this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[n]:t}}))})})},this.getAllErrors=()=>({form:{errors:this.state.errors,errorMap:this.state.errorMap},fields:Object.entries(this.state.fieldMeta).reduce((e,[t,n])=>(Object.keys(n).length&&n.errors.length&&(e[t]={errors:n.errors,errorMap:n.errorMap}),e),{})}),this.parseValuesWithSchema=e=>g1.validate({value:this.state.values,validationSource:`form`},e),this.parseValuesWithSchemaAsync=e=>g1.validateAsync({value:this.state.values,validationSource:`form`},e),this.timeoutIds={validations:{},listeners:{},formListeners:{}},this._formId=e?.formId??Y$(),this._devtoolsSubmissionOverride=!1;let t=S1({...e?.defaultState,values:e?.defaultValues??e?.defaultState?.values});if(e?.transform){t=e.transform({state:t}).state;for(let e of Object.keys(t.errorMap)){let n=t.errorMap[e];if(!(n===void 0||!i1(n)))for(let r of Object.keys(n.fields)){let i=n.fields[r];if(i===void 0)continue;let a=t.fieldMetaBase[r];t.fieldMetaBase[r]={isTouched:!1,isValidating:!1,isBlurred:!1,isDirty:!1,_arrayVersion:0,...a??{},errorSourceMap:{...a?.errorSourceMap??{},onChange:`form`},errorMap:{...a?.errorMap??{},[e]:i}}}}}this.baseStore=C$(t);let n;this.fieldMetaDerived=C$(e=>{let t=this.baseStore.get(),r=0,i={};for(let a of Object.keys(t.fieldMetaBase)){let o=t.fieldMetaBase[a],s=n?.fieldMetaBase[a],c=e?.[a],l=z$(t.values,a),u=c?.errors;if(!s||o.errorMap!==s.errorMap){u=Object.values(o.errorMap??{}).filter(e=>e!==void 0);let e=this.getFieldInfo(a)?.instance;(!e||!e.options.disableErrorFlat)&&(u=u.flat(1))}let d=!W$(u),f=!o.isDirty,p=q$(l,this.getFieldInfo(a)?.instance?.options.defaultValue??z$(this.options.defaultValues,a));if(c&&c.isPristine===f&&c.isValid===d&&c.isDefaultValue===p&&c.errors===u&&o===s){i[a]=c,r++;continue}i[a]={...o,errors:u??[],isPristine:f,isValid:d,isDefaultValue:p}}return Object.keys(t.fieldMetaBase).length?e&&r===Object.keys(t.fieldMetaBase).length?e:(n=this.baseStore.get(),i):i});let r;this.store=C$(e=>{let t=this.baseStore.get(),n=this.fieldMetaDerived.get(),i=Object.values(n).filter(Boolean),a=i.some(e=>e.isValidating),o=i.every(e=>e.isValid),s=i.some(e=>e.isTouched),c=i.some(e=>e.isBlurred),l=i.every(e=>e.isDefaultValue),u=s&&t.errorMap?.onMount,d=i.some(e=>e.isDirty),f=!d,p=!!(t.errorMap?.onMount||i.some(e=>e?.errorMap?.onMount)),m=!!a,h=e?.errors??[];(!r||t.errorMap!==r.errorMap)&&(h=Object.values(t.errorMap).reduce((e,t)=>t===void 0?e:t&&i1(t)?(e.push(t.form),e):(e.push(t),e),[]));let g=h.length===0,_=o&&g,v=this.options.canSubmitWhenInvalid??!1,y=t.submissionAttempts===0&&!s&&!p||!m&&!t.isSubmitting&&_||v,b=t.errorMap;if(u&&(h=h.filter(e=>e!==t.errorMap.onMount),b=Object.assign(b,{onMount:void 0})),e&&r&&e.errorMap===b&&e.fieldMeta===this.fieldMetaDerived.state&&e.errors===h&&e.isFieldsValidating===a&&e.isFieldsValid===o&&e.isFormValid===g&&e.isValid===_&&e.canSubmit===y&&e.isTouched===s&&e.isBlurred===c&&e.isPristine===f&&e.isDefaultValue===l&&e.isDirty===d&&q$(r,t))return e;let x={...t,errorMap:b,fieldMeta:this.fieldMetaDerived.state,errors:h,isFieldsValidating:a,isFieldsValid:o,isFormValid:g,isValid:_,canSubmit:y,isTouched:s,isBlurred:c,isPristine:f,isDefaultValue:l,isDirty:d};return r=this.baseStore.get(),x}),this.handleSubmit=this.handleSubmit.bind(this),this.update(e||{})}get state(){return this.store.state}get formId(){return this._formId}runValidator(e){return _1(e.validate)?g1[e.type](e.value,e.validate):e.validate(e.value)}handleSubmit(e){return this._handleSubmit(e)}}}));function D1(e){if(e)return e}function O1(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}var k1,Rle=m((()=>{D$(),v1(),x1(),d1(),p1(),k1=class{constructor(e){this.options={},this.mount=()=>{this.options.defaultValue!==void 0&&!this.getMeta().isTouched&&this.form.setFieldValue(this.name,this.options.defaultValue,{dontUpdateMeta:!0});let e=this.getInfo();e.instance=this,this.update(this.options);let{onMount:t}=this.options.validators||{};if(t){let e=this.runValidator({validate:t,value:{value:this.state.value,fieldApi:this,validationSource:`field`},type:`validate`});e&&this.setMeta(t=>({...t,errorMap:{...t?.errorMap,onMount:e},errorSourceMap:{...t?.errorSourceMap,onMount:`field`}}))}return this.options.listeners?.onMount?.({value:this.state.value,fieldApi:this}),()=>{for(let[e,t]of Object.entries(this.timeoutIds.validations))t&&(clearTimeout(t),this.timeoutIds.validations[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.listeners))t&&(clearTimeout(t),this.timeoutIds.listeners[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.formListeners))t&&(clearTimeout(t),this.timeoutIds.formListeners[e]=null);let e=this.form.fieldInfo[this.name];if(e&&e.instance===this){for(let[t,n]of Object.entries(e.validationMetaMap))n?.lastAbortController.abort(),e.validationMetaMap[t]=void 0;this.form.baseStore.setState(e=>({...e,fieldMetaBase:{...e.fieldMetaBase,[this.name]:{...b1,isTouched:e.fieldMetaBase[this.name]?.isTouched??b1.isTouched,isBlurred:e.fieldMetaBase[this.name]?.isBlurred??b1.isBlurred,isDirty:e.fieldMetaBase[this.name]?.isDirty??b1.isDirty}}})),e.instance=null,this.options.listeners?.onUnmount?.({value:this.state.value,fieldApi:this}),this.form.options.listeners?.onFieldUnmount?.({formApi:this.form,fieldApi:this})}}},this.update=e=>{this.options=e,this.name=e.name,!this.state.meta.isTouched&&this.options.defaultValue!==void 0&&(q$(this.form.getFieldValue(this.name),e.defaultValue)||this.form.setFieldValue(this.name,e.defaultValue,{dontUpdateMeta:!0,dontValidate:!0,dontRunListeners:!0})),this.form.getFieldMeta(this.name)||this.form.setFieldMeta(this.name,this.state.meta)},this.getValue=()=>this.form.getFieldValue(this.name),this.setValue=(e,t)=>{this.form.setFieldValue(this.name,e,J$(t,{dontRunListeners:!0,dontValidate:!0})),t?.dontRunListeners||this.triggerOnChangeListener(),t?.dontValidate||this.validate(`change`)},this.getMeta=()=>this.store.state.meta,this.setMeta=e=>this.form.setFieldMeta(this.name,e),this.getInfo=()=>this.form.getFieldInfo(this.name),this.pushValue=(e,t)=>{this.form.pushFieldValue(this.name,e,J$(t,{dontRunListeners:!0})),t?.dontRunListeners||this.triggerOnChangeListener()},this.insertValue=(e,t,n)=>{this.form.insertFieldValue(this.name,e,t,J$(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.replaceValue=(e,t,n)=>{this.form.replaceFieldValue(this.name,e,t,J$(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.removeValue=(e,t)=>{this.form.removeFieldValue(this.name,e,J$(t,{dontRunListeners:!0})),t?.dontRunListeners||this.triggerOnChangeListener()},this.swapValues=(e,t,n)=>{this.form.swapFieldValues(this.name,e,t,J$(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.moveValue=(e,t,n)=>{this.form.moveFieldValues(this.name,e,t,J$(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.clearValues=e=>{this.form.clearFieldValues(this.name,J$(e,{dontRunListeners:!0})),e?.dontRunListeners||this.triggerOnChangeListener()},this.getLinkedFields=e=>{let t=Object.values(this.form.fieldInfo),n=[];for(let r of t){if(!r.instance)continue;let{onChangeListenTo:t,onBlurListenTo:i}=r.instance.options.validators||{};e===`change`&&t?.includes(this.name)&&n.push(r.instance),e===`blur`&&i?.includes(this.name)&&n.push(r.instance)}return n},this.validateSync=(e,t)=>{let n=G$(e,{...this.options,form:this.form,fieldName:this.name,validationLogic:this.form.options.validationLogic||f1}),r=this.getLinkedFields(e).reduce((t,n)=>{let r=G$(e,{...n.options,form:n.form,fieldName:n.name,validationLogic:n.form.options.validationLogic||f1});return r.forEach(e=>{e.field=n}),t.concat(r)},[]),i=!1;o$(()=>{let e=(e,n)=>{let r=O1(n.cause),a=n.validate?D1(e.runValidator({validate:n.validate,value:{value:e.store.state.value,validationSource:`field`,fieldApi:e},type:`validate`})):void 0,o=t[r],{newErrorValue:s,newSource:c}=o1({formLevelError:o,fieldLevelError:a});e.state.meta.errorMap?.[r]!==s&&e.setMeta(e=>({...e,errorMap:{...e.errorMap,[r]:s},errorSourceMap:{...e.errorSourceMap,[r]:c}})),s&&(i=!0)};for(let t of n)e(this,t);for(let t of r)t.validate&&e(t.field,t)});let a=O1(`submit`);return this.state.meta.errorMap?.[a]&&e!==`submit`&&!i&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,[a]:void 0},errorSourceMap:{...e.errorSourceMap,[a]:void 0}})),{hasErrored:i}},this.validateAsync=async(e,t)=>{let n=K$(e,{...this.options,form:this.form,fieldName:this.name,validationLogic:this.form.options.validationLogic||f1}),r=await t,i=this.getLinkedFields(e),a=i.reduce((t,n)=>{let r=K$(e,{...n.options,form:n.form,fieldName:n.name,validationLogic:n.form.options.validationLogic||f1});return r.forEach(e=>{e.field=n}),t.concat(r)},[]),o=[],s=[],c=n.some(e=>e.validate)||a.some(e=>e.validate);if(c){this.state.meta.isValidating||this.setMeta(e=>({...e,isValidating:!0}));for(let e of i)e.setMeta(e=>({...e,isValidating:!0}))}let l=(e,t,n)=>{let i=O1(t.cause),a=e.getInfo();a.validationMetaMap[i]?.lastAbortController.abort();let o=new AbortController;a.validationMetaMap[i]={lastAbortController:o},n.push(new Promise(async n=>{let a;try{a=await new Promise((n,r)=>{e.timeoutIds.validations[t.cause]&&clearTimeout(e.timeoutIds.validations[t.cause]),e.timeoutIds.validations[t.cause]=setTimeout(async()=>{if(o.signal.aborted)return n(void 0);try{n(await this.runValidator({validate:t.validate,value:{value:e.store.state.value,fieldApi:e,signal:o.signal,validationSource:`field`},type:`validateAsync`}))}catch(e){r(e)}},t.debounceMs)})}catch(e){a=e}if(o.signal.aborted)return n(void 0);let s=D1(a),c=r[e.name]?.[i],{newErrorValue:l,newSource:u}=o1({formLevelError:c,fieldLevelError:s});if(e.getInfo().instance!==e)return n(void 0);e.setMeta(e=>({...e,errorMap:{...e?.errorMap,[i]:l},errorSourceMap:{...e.errorSourceMap,[i]:u}})),n(l)}))};for(let e of n)e.validate&&l(this,e,o);for(let e of a)e.validate&&l(e.field,e,s);let u=[];if((o.length||s.length)&&(u=await Promise.all(o),await Promise.all(s)),c){this.setMeta(e=>({...e,isValidating:!1}));for(let e of i)e.setMeta(e=>({...e,isValidating:!1}))}return u.filter(Boolean)},this.validate=(e,t)=>{if(!this.state.meta.isTouched)return[];let{fieldsErrorMap:n}=t?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(e),{hasErrored:r}=this.validateSync(e,n[this.name]??{});if(r&&!this.options.asyncAlways)return this.getInfo().validationMetaMap[O1(e)]?.lastAbortController.abort(),this.state.meta.errors;let i=t?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(e);return this.validateAsync(e,i)},this.handleChange=e=>{this.setValue(e)},this.handleBlur=()=>{this.state.meta.isTouched||this.setMeta(e=>({...e,isTouched:!0})),this.state.meta.isBlurred||this.setMeta(e=>({...e,isBlurred:!0})),this.validate(`blur`),this.triggerOnBlurListener()},this.setErrorMap=e=>{this.setMeta(t=>({...t,errorMap:{...t.errorMap,...e}}))},this.parseValueWithSchema=e=>g1.validate({value:this.state.value,validationSource:`field`},e),this.parseValueWithSchemaAsync=e=>g1.validateAsync({value:this.state.value,validationSource:`field`},e),this.triggerOnChangeListener=()=>{let e=this.form.options.listeners?.onChangeDebounceMs;e&&e>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this});let t=this.options.listeners?.onChangeDebounceMs;t&&t>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this})},t)):this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this})},this.form=e.form,this.name=e.name,this.options=e,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.store=C$(t=>{this.form.store.get();let n=this.form.getFieldMeta(this.name)??{...b1,...e.defaultMeta},r=this.form.getFieldValue(this.name);return!n.isTouched&&r===void 0&&this.options.defaultValue!==void 0&&!q$(r,this.options.defaultValue)&&(r=this.options.defaultValue),t&&t.value===r&&t.meta===n?t:{value:r,meta:n}})}get state(){return this.store.state}runValidator(e){return _1(e.validate)?g1[e.type](e.value,e.validate):e.validate(e.value)}triggerOnBlurListener(){let e=this.form.options.listeners?.onBlurDebounceMs;e&&e>0?(this.timeoutIds.formListeners.blur&&clearTimeout(this.timeoutIds.formListeners.blur),this.timeoutIds.formListeners.blur=setTimeout(()=>{this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this});let t=this.options.listeners?.onBlurDebounceMs;t&&t>0?(this.timeoutIds.listeners.blur&&clearTimeout(this.timeoutIds.listeners.blur),this.timeoutIds.listeners.blur=setTimeout(()=>{this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},t)):this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})}}})),A1,zle=m((()=>{D$(),d1(),A1=class e{constructor(t){if(this.getFormFieldName=e=>{if(typeof this.fieldsMap==`string`)return U$(this.fieldsMap,e);let t=H$(e)[0];if(typeof t!=`string`)return``;let n=e.slice(t.length),r=this.fieldsMap[t];return U$(r,n)},this.getFormFieldOptions=e=>{let t={...e},n=t.validators;if(t.name=this.getFormFieldName(e.name),n&&(n.onChangeListenTo||n.onBlurListenTo)){let e={...n},r=e=>{if(e)return e.map(e=>this.getFormFieldName(e))};e.onChangeListenTo=r(n.onChangeListenTo),e.onBlurListenTo=r(n.onBlurListenTo),t.validators=e}return t},this.mount=()=>()=>{},this.validateArrayFieldsStartingFrom=async(e,t,n)=>this.form.validateArrayFieldsStartingFrom(this.getFormFieldName(e),t,n),this.validateField=(e,t)=>this.form.validateField(this.getFormFieldName(e),t),this.getFieldValue=e=>this.form.getFieldValue(this.getFormFieldName(e)),this.getFieldMeta=e=>this.form.getFieldMeta(this.getFormFieldName(e)),this.setFieldMeta=(e,t)=>this.form.setFieldMeta(this.getFormFieldName(e),t),this.setFieldValue=(e,t,n)=>this.form.setFieldValue(this.getFormFieldName(e),t,n),this.deleteField=e=>this.form.deleteField(this.getFormFieldName(e)),this.pushFieldValue=(e,t,n)=>this.form.pushFieldValue(this.getFormFieldName(e),t,n),this.insertFieldValue=async(e,t,n,r)=>this.form.insertFieldValue(this.getFormFieldName(e),t,n,r),this.replaceFieldValue=async(e,t,n,r)=>this.form.replaceFieldValue(this.getFormFieldName(e),t,n,r),this.removeFieldValue=async(e,t,n)=>this.form.removeFieldValue(this.getFormFieldName(e),t,n),this.swapFieldValues=(e,t,n,r)=>this.form.swapFieldValues(this.getFormFieldName(e),t,n,r),this.moveFieldValues=(e,t,n,r)=>this.form.moveFieldValues(this.getFormFieldName(e),t,n,r),this.clearFieldValues=(e,t)=>this.form.clearFieldValues(this.getFormFieldName(e),t),this.resetField=e=>this.form.resetField(this.getFormFieldName(e)),this.validateAllFields=e=>this.form.validateAllFields(e),t.form instanceof e){let e=t.form;if(this.form=e.form,typeof t.fields==`string`)this.fieldsMap=e.getFormFieldName(t.fields);else{let n={...t.fields};for(let t in n)n[t]=e.getFormFieldName(n[t]);this.fieldsMap=n}}else this.form=t.form,this.fieldsMap=t.fields;this.store=C$(()=>{let e=this.form.store.get(),t;if(typeof this.fieldsMap==`string`)t=z$(e.values,this.fieldsMap);else{t={};let n=this.fieldsMap;for(let r in n)t[r]=z$(e.values,n[r])}return{values:t}})}get state(){return this.store.state}async handleSubmit(e){return this.form.handleSubmit(e)}}}));function Ble(e,t){if(!t)return;let n=Object.assign({},e,{state:X$(e.state)});t(n),n.fieldInfo!==e.fieldInfo&&(e.fieldInfo=n.fieldInfo),n.options!==e.options&&(e.options=n.options);let r=Object.keys({values:null,validationMetaMap:null,fieldMetaBase:null,isSubmitting:null,isSubmitted:null,isValidating:null,submissionAttempts:null,isSubmitSuccessful:null,_force_re_eval:null}).reduce((t,r)=>(e.state[r]!==n.state[r]&&(t[r]=n.state[r]),t),{});return o$(()=>{Object.keys(r).length&&e.baseStore.setState(e=>({...e,...r})),n.state.errorMap!==e.state.errorMap&&e.setErrorMap(n.state.errorMap)}),n}var Vle=m((()=>{D$(),d1()})),j1=m((()=>{E1(),Rle(),d1(),zle(),Vle()}));function Hle(e,t){return e===t}function M1(e,t,n=Hle){let r=(0,y.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=(0,y.useCallback)(()=>e?.get(),[e]);return(0,a.useSyncExternalStoreWithSelector)(r,i,i,t,n)}var Ule=m((()=>{})),N1=m((()=>{D$(),Ule()})),P1,F1=m((()=>{P1=typeof window<`u`?y.useLayoutEffect:y.useEffect}));function Wle(e){let[t,n]=(0,y.useState)(()=>({form:e.form,name:e.name})),[r,i]=(0,y.useState)(()=>new k1({...e}));(t.form!==e.form||t.name!==e.name)&&(i(new k1({...e})),n({form:e.form,name:e.name}));let a=M1(r.store,e.mode===`array`?e=>e.meta._arrayVersion||0:e=>e.value),o=M1(r.store,e=>e.meta.isTouched),s=M1(r.store,e=>e.meta.isBlurred),c=M1(r.store,e=>e.meta.isDirty),l=M1(r.store,e=>e.meta.errorMap),u=M1(r.store,e=>e.meta.errorSourceMap),d=M1(r.store,e=>e.meta.isValidating),f=(0,y.useMemo)(()=>({...r,get state(){return{value:e.mode===`array`?r.state.value:a,get meta(){return{...r.state.meta,isTouched:o,isBlurred:s,isDirty:c,errorMap:l,errorSourceMap:u,isValidating:d}}}}}),[r,e.mode,a,o,s,c,l,u,d]);return P1(r.mount,[r]),P1(()=>{r.update(e)}),f}var I1,Gle=m((()=>{N1(),j1(),F1(),I1=(({children:e,...t})=>{let r=Wle(t);return(0,n.jsx)(n.Fragment,{children:(0,y.useMemo)(()=>R$(e,r),[e,r])})})}));function Kle(){return(0,y.useState)(()=>Y$())[0]}var qle=m((()=>{j1()})),L1,R1,Jle=m((()=>{qle(),L1=y,R1=y.version.split(`.`)[0]===`17`?Kle:L1.useId}));function Yle({form:e,selector:t=e=>e,children:r}){return(0,n.jsx)(n.Fragment,{children:R$(r,M1(e.store,t))})}function Xle(e){let t=R1(),[r,i]=(0,y.useState)(e?.formId),[a,o]=(0,y.useState)(()=>new T1({...e,formId:e?.formId??t}));if(r!==e?.formId){let n=e?.formId??t;o(new T1({...e,formId:n})),i(n)}let s=(0,y.useMemo)(()=>{let e={...a,handleSubmit:((...e)=>a._handleSubmit(...e)),get formId(){return a._formId},get state(){return a.store.state}};return e.Field=function(e){return(0,n.jsx)(I1,{...e,form:a})},e.Subscribe=function(e){return(0,n.jsx)(Yle,{form:a,selector:e.selector,children:e.children})},e},[a]);P1(a.mount,[]),P1(()=>{a.update(e)});let c=(0,y.useRef)(!1);return P1(()=>{c.current&&e?.transform&&Ble(a,e.transform)},[a,e?.transform]),P1(()=>{c.current=!0}),s}var Zle=m((()=>{j1(),N1(),Gle(),F1(),Jle()}));function Qle({lens:e,selector:t=e=>e,children:r}){return(0,n.jsx)(n.Fragment,{children:R$(r,M1(e.store,t))})}function $le(e){let[t]=(0,y.useState)(()=>{let r=new A1(e),i=e.form instanceof A1?e.form.form:e.form,a=r;return a.AppForm=function(e){return(0,n.jsx)(i.AppForm,{...e})},a.AppField=function(e){return(0,n.jsx)(i.AppField,{...t.getFormFieldOptions(e)})},a.Field=function(e){return(0,n.jsx)(i.Field,{...t.getFormFieldOptions(e)})},a.Subscribe=function(e){return(0,n.jsx)(Qle,{lens:t,selector:e.selector,children:e.children})},Object.assign(a,{...e.formComponents})});return P1(t.mount,[t]),t}var eue=m((()=>{N1(),j1(),F1()}));function z1(){let e=(0,y.useContext)(H1);if(!e)throw Error("`formContext` only works when within a `formComponent` passed to `createFormHook`");return e}function tue(){function e(){let e=(0,y.useContext)(V1);if(!e)throw Error("`fieldContext` only works when within a `fieldComponent` passed to `createFormHook`");return e}return{fieldContext:V1,useFieldContext:e,useFormContext:z1,formContext:H1}}function B1({fieldComponents:e,fieldContext:t,formContext:r,formComponents:i}){function a(a){let o=Xle(a),s=(0,y.useMemo)(()=>({children:e})=>(0,n.jsx)(r.Provider,{value:o,children:e}),[o]),c=(0,y.useMemo)(()=>(({children:r,...i})=>(0,n.jsx)(o.Field,{...i,children:i=>(0,n.jsx)(t.Provider,{value:i,children:r(Object.assign(i,e))})})),[o]);return(0,y.useMemo)(()=>Object.assign(o,{AppField:c,AppForm:s,...i}),[o,c,s])}function o({render:e,props:t}){return function(n){return e({...t,...n})}}function s({render:e,props:t,defaultValues:n}){return function(r){let a=$le((0,y.useMemo)(()=>({form:r.form,fields:r.fields,defaultValues:n,formComponents:i}),[r.form,r.fields]));return e({...t,...r,group:a})}}function c(e){return z1()}function l(n){return B1({fieldContext:t,formContext:r,fieldComponents:{...e,...n.fieldComponents},formComponents:{...i,...n.formComponents}})}return{useAppForm:a,withForm:o,withFieldGroup:s,useTypedAppFormContext:c,extendForm:l}}var V1,H1,nue=m((()=>{Zle(),eue(),V1=(0,y.createContext)(null),H1=(0,y.createContext)(null)})),rue=m((()=>{j1(),nue()})),U1,iue=m((()=>{Uj(),Iee(),Ks(),C0(),X(),U1=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(v0().Subscribe,{selector:e=>[e.errors],children:([a])=>{if(!a||a.length===0)return null;let o=[];return a.forEach(e=>{if(typeof e==`string`)o.push(e);else if(e?.message&&typeof e.message==`string`)o.push(e.message);else if(typeof e==`object`&&e){let t=e=>{typeof e==`string`?o.push(e):Array.isArray(e)?e.forEach(t):typeof e==`object`&&e&&(`message`in e&&typeof e.message==`string`?o.push(e.message):Object.values(e).forEach(t))};t(e)}}),(0,n.jsxs)(Hs,{className:Y(``,e),ref:r,tone:`error`,...i,children:[(0,n.jsx)(Hj,{weight:`duotone`}),(0,n.jsxs)(Gs,{children:[t,(0,n.jsx)(Us,{children:(0,n.jsx)(`ul`,{children:o.length>0?o.map(e=>(0,n.jsx)(`li`,{children:e},e)):(0,n.jsx)(`li`,{className:`style-text-prose--1`,children:a.toString()})})})]})]})}})})),W1,aue=m((()=>{mk(),C0(),X(),W1=({className:e,children:t,ref:r,...i})=>{let a=v0(),o=()=>{a.reset()};return(0,n.jsx)(a.Subscribe,{selector:e=>e,children:a=>(0,n.jsx)(pk,{className:Y(`w-full`,e),disabled:!a.values,onClick:o,ref:r,type:`reset`,...i,children:t})})}})),G1,oue=m((()=>{Uj(),mk(),C0(),X(),G1=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(v0().Subscribe,{selector:e=>e,children:a=>(0,n.jsx)(pk,{className:Y(`w-full`,e),disabled:a.isSubmitting||!a.canSubmit,ref:r,type:`submit`,...i,children:a.isSubmitting?(0,n.jsx)(Cj,{className:`animate-spin`,weight:`bold`}):t})})})),K1,sue=m((()=>{Wx(),Sk(),X(),K1=({variant:e,size:t,className:r,ref:i,...a})=>{let o=(0,y.useRef)(null),[s,c]=(0,y.useState)(a.defaultValue||`#000000`);return a.type===`color`?(0,n.jsxs)(`button`,{"aria-label":`Open color picker`,className:`relative h-xl w-[calc(var(--spacing-3xl)+5rem)] items-center rounded-xl pl-xs transition-all peer-focus:outline-brand-default hover:cursor-pointer`,onClick:()=>o.current?.click(),type:`button`,children:[(0,n.jsx)(`div`,{className:Y(`absolute top-1/2 left-[0px] aspect-square h-full -translate-y-1/2 rounded-l-xl`),style:{backgroundColor:s}}),(0,n.jsx)(Hx,{className:`peer pointer-events-none invisible absolute top-lg`,defaultValue:s,onChange:e=>c(e.currentTarget.value),ref:o,type:`color`,value:s,...a}),(0,n.jsx)(`p`,{className:`pl-xl text-left style-text-default-0`,children:s})]}):(0,n.jsx)(Hx,{className:Y(xk({variant:e,size:t}),r),ref:i,...a})}})),q1=m((()=>{sue()})),cue=g({FieldInput:()=>J1}),J1,lue=m((()=>{C0(),q1(),X(),J1=({className:e,children:t,ref:r,...i})=>{let a=g0();return(0,n.jsx)(K1,{"aria-invalid":a.state.meta.isTouched&&a.state.meta.errors.length>0&&!a.state.meta.isValid,className:Y(``,e),id:a.name,name:a.name,onChange:e=>a.handleChange(e.target.value),ref:r,value:a.state.value,...i,children:t})}})),uue=g({FieldInputGroup:()=>Y1}),Y1,due=m((()=>{C0(),xQ(),X(),Y1=({className:e,children:t,ref:r,...i})=>{let a=g0();return(0,n.jsx)(hQ,{"aria-invalid":a.state.meta.isTouched&&a.state.meta.errors.length>0&&!a.state.meta.isValid,className:Y(``,e),id:a.name,ref:r,...i,children:t})}})),fue=g({FieldInputGroupInput:()=>X1}),X1,pue=m((()=>{C0(),xQ(),X(),X1=({className:e,ref:t,...r})=>{let i=g0();return(0,n.jsx)(yQ,{"aria-invalid":i.state.meta.isTouched&&i.state.meta.errors.length>0&&!i.state.meta.isValid,className:Y(``,e),id:i.name,name:i.name,onChange:e=>i.handleChange(e.target.value),ref:t,value:i.state.value,...r})}})),mue=g({FieldLabel:()=>Z1}),Z1,hue=m((()=>{C0(),X(),Z1=({className:e,children:t,ref:r,...i})=>{let a=g0(),o=a.name.replace(/([A-Z])/g,` $1`).replace(/^./,e=>e.toUpperCase());return(0,n.jsx)(`div`,{className:Y(`style-text-default-0`,e,a.state.meta.errors.length>0&&`text-error-default`),ref:r,...i,children:t||o})}})),gue=g({FieldSelect:()=>Q1}),Q1,_ue=m((()=>{Uj(),C0(),QZ(),Q1=({children:e,...t})=>{let r=g0();return(0,n.jsxs)(MZ,{defaultValue:r.state.value,value:r.state.value,onValueChange:e=>r.setValue(e),...t,children:[(0,n.jsxs)(WZ,{children:[(0,n.jsx)(KZ,{}),(0,n.jsx)(RZ,{children:(0,n.jsx)(_j,{weight:`bold`})})]}),(0,n.jsx)(BZ,{children:(0,n.jsx)(IZ,{children:e})})]})}})),$1,vue=m((()=>{uk(),$1=({children:e,...t})=>(0,n.jsx)(lk,{children:(0,n.jsx)(XO,{...t,children:e})})})),e0,yue=m((()=>{uk(),X(),e0=({side:e=`top`,alignOffset:t=0,sideOffset:r=5,className:i,children:a,...o})=>(0,n.jsx)(rk,{children:(0,n.jsx)(ok,{side:e,alignOffset:t,sideOffset:r,children:(0,n.jsx)(ck,{className:Y(`z-50 w-fit origin-(--transform-origin) animate-in rounded-md bg-surface-2 px-xs py-3xs text-sm text-balance shadow-md fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-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-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,i),...o,children:a})})})})),t0,bue=m((()=>{uk(),t0=({children:e,...t})=>(0,n.jsx)(ek,{...t,render:e})})),xue=m((()=>{vue(),yue(),bue()})),n0,r0=m((()=>{dk(),xue(),X(),n0=({className:e,children:t,ref:r,...i})=>{let[a,o]=y.default.useState(!1),[s,c]=y.default.useState(!1);return y.default.useEffect(()=>{if(!s)return;let e=()=>c(!1);return window.addEventListener(`pointerup`,e),()=>window.removeEventListener(`pointerup`,e)},[s]),(0,n.jsxs)($1,{open:a||s,trackCursorAxis:`x`,children:[(0,n.jsx)(t0,{delay:0,children:(0,n.jsx)(UE,{"data-slot":`slider-thumb`,className:Y(`absolute aspect-square rounded-full bg-surface transition-[width,height,opacity] outline-none data-dragging:cursor-grabbing data-dragging:shadow-sm hover:[&:not([data-dragging])]:cursor-pointer`,e),onPointerDown:()=>c(!0),onPointerEnter:()=>o(!0),onPointerLeave:()=>o(!1),ref:r,...i,children:t})}),(0,n.jsx)(e0,{sideOffset:10,children:(0,n.jsx)(DE,{})})]})}})),i0,Sue=m((()=>{uo(),i0=lo(`flex flex-col gap-xs`,{variants:{size:{small:`[&_[data-slot='slider-thumb']]:size-xs [&_[data-slot='slider-thumb']]:border [&_[data-slot='slider-thumb'][data-dragging]]:size-sm [&_[data-slot='slider-track'][data-orientation='horizontal']]:h-3xs [&_[data-slot='slider-track'][data-orientation='vertical']]:w-3xs`,medium:`[&_[data-slot='slider-thumb']]:size-sm [&_[data-slot='slider-thumb']]:border-2 [&_[data-slot='slider-thumb'][data-dragging]]:size-md [&_[data-slot='slider-track'][data-orientation='horizontal']]:h-2xs [&_[data-slot='slider-track'][data-orientation='vertical']]:w-2xs`,large:`[&_[data-slot='slider-thumb']]:size-md [&_[data-slot='slider-thumb']]:border-3 [&_[data-slot='slider-thumb'][data-dragging]]:size-lg [&_[data-slot='slider-track'][data-orientation='horizontal']]:h-xs [&_[data-slot='slider-track'][data-orientation='vertical']]:w-xs`},tone:{brand:`[&_[data-slot='slider-thumb']]:border-brand-default [&_[data-slot=slider-indicator]]:bg-brand-default [&_[data-slot=slider-track]]:bg-brand-container-high`,accent:`[&_[data-slot='slider-thumb']]:border-accent-default [&_[data-slot=slider-indicator]]:bg-accent-default [&_[data-slot=slider-track]]:bg-accent-container-high`,neutral:`[&_[data-slot='slider-thumb']]:border-neutral-default [&_[data-slot=slider-indicator]]:bg-neutral-default [&_[data-slot=slider-track]]:bg-neutral-container-high`,error:`[&_[data-slot='slider-thumb']]:border-error-default [&_[data-slot=slider-indicator]]:bg-error-default [&_[data-slot=slider-track]]:bg-error-container-high`,info:`[&_[data-slot='slider-thumb']]:border-info-default [&_[data-slot=slider-indicator]]:bg-info-default [&_[data-slot=slider-track]]:bg-info-container-high`,success:`[&_[data-slot='slider-thumb']]:border-success-default [&_[data-slot=slider-indicator]]:bg-success-default [&_[data-slot=slider-track]]:bg-success-container-high`,warning:`[&_[data-slot='slider-thumb']]:border-warning-default [&_[data-slot=slider-indicator]]:bg-warning-default [&_[data-slot=slider-track]]:bg-warning-container-high`}},defaultVariants:{size:`medium`,tone:`brand`}})})),a0,Cue=m((()=>{dk(),r0(),Sue(),X(),a0=({size:e,tone:t,defaultValue:r,description:i,label:a,leadingIcon:o,max:s=100,min:c=0,showMax:l=!1,showMin:u=!1,trailingIcon:d,showThumbOnHover:f=!0,value:p,className:m,ref:h,...g})=>{let _=Array.isArray(p)?p:Array.isArray(r)?r:[c,s];return(0,n.jsxs)(`div`,{className:Y(i0({size:e,tone:t}),m),children:[a&&(0,n.jsx)(`span`,{className:`style-text-default-0`,children:a}),(0,n.jsxs)(EE,{"aria-label":a,"aria-valuemax":s,"aria-valuemin":c,"aria-valuenow":Array.isArray(p)?p[0]:p??r??c,className:Y(`flex items-center gap-sm`,m),defaultValue:r,"data-slot":`slider-root`,max:s,min:c,ref:h,role:`slider`,value:p,...g,children:[o&&(0,n.jsx)(o,{className:`size-sm shrink-0`,weight:`fill`}),u&&(0,n.jsx)(`span`,{className:`style-text-default-0`,children:c}),(0,n.jsx)(IE,{className:`shrink-0 hover:cursor-pointer data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full`,children:(0,n.jsxs)(LE,{"data-slot":`slider-track`,className:Y(`relative size-full rounded-full`,!f&&`**:data-[slot='slider-thumb']:opacity-0 hover:**:data-[slot='slider-thumb']:opacity-100 active:**:data-[slot='slider-thumb']:opacity-100 data-dragging:**:data-[slot='slider-thumb']:opacity-100`),children:[(0,n.jsx)(WE,{"data-slot":`slider-indicator`,className:`rounded-full`}),Array.from({length:_.length},(e,t)=>(0,n.jsx)(n0,{index:t},t))]})}),l&&(0,n.jsx)(`span`,{className:`style-text-default-0`,children:s}),d&&(0,n.jsx)(d,{className:`size-sm shrink-0`,weight:`fill`})]}),i&&(0,n.jsx)(`span`,{className:`style-text-prose--1 text-on-surface-variant`,children:i})]})}})),wue=m((()=>{Cue(),r0()})),Tue=g({FieldSlider:()=>o0}),o0,Eue=m((()=>{C0(),wue(),X(),o0=({className:e,ref:t,...r})=>{let i=g0();return(0,n.jsx)(a0,{className:Y(``,e),onValueChange:e=>i.setValue(e),ref:t,value:i.state.value,...r})}})),s0,c0,l0,u0,d0,f0,p0,m0,h0,g0,_0,v0,y0,b0,x0,S0,C0=m((()=>{rue(),iue(),aue(),oue(),s0=(0,y.lazy)(()=>Promise.resolve().then(()=>(t$(),$Q)).then(e=>({default:e.FieldDescription}))),c0=(0,y.lazy)(()=>Promise.resolve().then(()=>(Oue(),Due)).then(e=>({default:e.FieldErrors}))),l0=(0,y.lazy)(()=>Promise.resolve().then(()=>(lue(),cue)).then(e=>({default:e.FieldInput}))),u0=(0,y.lazy)(()=>Promise.resolve().then(()=>(due(),uue)).then(e=>({default:e.FieldInputGroup}))),d0=(0,y.lazy)(()=>Promise.resolve().then(()=>(pue(),fue)).then(e=>({default:e.FieldInputGroupInput}))),f0=(0,y.lazy)(()=>Promise.resolve().then(()=>(hue(),mue)).then(e=>({default:e.FieldLabel}))),p0=(0,y.lazy)(()=>Promise.resolve().then(()=>(_ue(),gue)).then(e=>({default:e.FieldSelect}))),m0=(0,y.lazy)(()=>Promise.resolve().then(()=>(Eue(),Tue)).then(e=>({default:e.FieldSlider}))),{fieldContext:h0,useFieldContext:g0,formContext:_0,useFormContext:v0}=tue(),{useAppForm:y0,withFieldGroup:b0,withForm:x0,useTypedAppFormContext:S0}=B1({fieldContext:h0,fieldComponents:{FieldDescription:s0,FieldErrors:c0,FieldInput:l0,FieldInputGroup:u0,FieldInputGroupInput:d0,FieldLabel:f0,FieldSelect:p0,FieldSlider:m0},formContext:_0,formComponents:{FormErrors:U1,FormReset:W1,FormSubmit:G1}})})),Due=g({FieldErrors:()=>w0}),w0,Oue=m((()=>{C0(),X(),w0=({className:e,children:t,ref:r,...i})=>{let a=g0().state.meta.errors;if((!a||a.length===0)&&!t)return null;let o=[],s=e=>{typeof e==`string`?o.push(e):Array.isArray(e)?e.forEach(s):e&&typeof e==`object`&&(`issues`in e&&Array.isArray(e.issues)?e.issues.forEach(e=>{typeof e?.message==`string`&&o.push(e.message)}):`message`in e&&typeof e.message==`string`?o.push(e.message):Object.values(e).forEach(s))};return a?.forEach(s),o.length===0&&!t?null:(0,n.jsxs)(`ul`,{className:Y(`space-y-3xs`,e),ref:r,...i,children:[o.map((e,t)=>(0,n.jsx)(`li`,{className:`flex items-center gap-2xs style-text-strong--1 text-error-default`,children:e},`${e}-${t}`)),t]})}}));uo();var kue=lo(`relative flex resize flex-col overflow-hidden rounded-xl outline outline-transparent transition-[outline] hover:not-focus-within:outline-border-strong data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50`,{variants:{variant:{primary:`bg-surface shadow-2xs`,secondary:`bg-neutral-container`}},defaultVariants:{variant:`primary`}});X();var T0=({variant:e,className:t,ref:r,...i})=>{let a=i.value!==void 0,[o,s]=y.default.useState(String(i.defaultValue??``)),c=a?String(i.value??``):o,l=i.maxLength,u=typeof l==`number`,d=u&&c.length>=l,f=e=>{a||s(e.target.value),i.onChange?.(e)};return(0,n.jsxs)(`div`,{className:Y(kue({variant:e,className:t}),d?`outline-error-border-strong`:`focus-within:outline-brand-border-strong`),"data-disabled":i.disabled?!0:void 0,children:[(0,n.jsx)(`textarea`,{className:`grow resize-none px-sm py-xs style-text-prose-0 outline-none focus-within:caret-brand-border-strong`,ref:r,...i,onChange:f,value:c}),u&&(0,n.jsxs)(`span`,{className:Y(`w-full px-xs py-2xs text-right style-text-default--1 text-on-surface-variant`,d&&`text-error-default`),children:[c.length,` / `,l]})]})};C0(),X();var Aue=({className:e,ref:t,...r})=>{let i=g0();return(0,n.jsx)(T0,{"aria-invalid":i.state.meta.isTouched&&i.state.meta.errors.length>0&&!i.state.meta.isValid,className:Y(``,e),id:i.name,name:i.name,onChange:e=>i.handleChange(e.target.value),ref:t,value:i.state.value,...r})};uo();var jue=lo(`flex items-center gap-2xs select-none hover:cursor-pointer`,{variants:{size:{small:`style-text-default--1`,medium:`style-text-default-0`,large:`style-text-default-1`}},defaultVariants:{size:`medium`}}),E0=({className:e,children:t,ref:r,size:i,...a})=>(0,n.jsx)(`label`,{className:jue({className:e,size:i}),"data-slot":`label`,htmlFor:a.htmlFor,ref:r,...a,children:t});C0();var Mue=({...e})=>{let t=g0();return(0,n.jsxs)(`div`,{className:`flex items-center gap-xs`,children:[(0,n.jsx)(yZ,{checked:t.state.value,id:t.name,name:t.name,onCheckedChange:e=>t.handleChange(e===!0),...e}),e.label&&(0,n.jsx)(E0,{htmlFor:t.name,children:e.label})]})};uo();var Nue=lo(`group flex size-sm shrink-0 items-center justify-center rounded-full outline outline-transparent transition-all hover:outline-border-strong data-checked:bg-brand-default data-checked:outline-brand-border-strong data-disabled:opacity-50`,{variants:{variant:{elevated:`bg-surface shadow-2xs`,inSurface:`bg-surface-low inset-shadow-2xs`}},defaultVariants:{variant:`elevated`}});dk(),X();var Pue=({variant:e,className:t,children:r,ref:i,...a})=>(0,n.jsxs)(E0,{htmlFor:a.id,children:[(0,n.jsx)(Nw,{className:Y(Nue({variant:e,className:t})),ref:i,...a,children:(0,n.jsx)(Pw,{"data-indicator":!0,className:`size-2xs origin-center scale-0 rounded-full bg-surface shadow-2xs transition-transform duration-200 ease-out data-checked:scale-100`})}),r]});dk(),X();var D0=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Iw,{"aria-labelledby":y.useId(),className:Y(`flex flex-col items-start gap-2xs data-disabled:opacity-50`,e),ref:r,...i,children:t});C0();var Fue=({children:e,...t})=>{let r=g0();return(0,n.jsx)(D0,{name:r.name,onChange:e=>r.handleChange(e.target.value),value:r.state.value,...t,children:e})};nD(),X();var O0=({label:e,className:t,ref:r,...i})=>(0,n.jsxs)(`div`,{className:`flex items-center gap-xs`,children:[(0,n.jsx)(ZE,{"aria-label":e??void 0,className:Y(`group relative flex h-md w-xl items-center rounded-full bg-surface-low inset-shadow-2xs outline-2 outline-transparent transition-colors ease-[cubic-bezier(0.26,0.75,0.38,0.45)] before:absolute before:rounded-full hover:cursor-pointer hover:not-disabled:outline-accent-border-strong disabled:pointer-events-none disabled:opacity-50 data-checked:bg-accent-default data-disabled:pointer-events-none data-disabled:opacity-50`,t),ref:r,...i,children:(0,n.jsx)($E,{className:`aspect-square size-xs translate-x-2xs rounded-full shadow-2xs transition-transform duration-500 ease-[cubic-bezier(0.68,-0.55,0.27,1.55)] data-checked:size-sm data-checked:translate-x-md data-checked:bg-accent-on-default data-unchecked:bg-accent-default`})}),e&&(0,n.jsx)(E0,{htmlFor:i.id,children:e})]});C0();var Iue=({...e})=>{let t=g0();return(0,n.jsx)(O0,{checked:t.state.value,id:t.name,name:t.name,onCheckedChange:e=>t.handleChange(e===!0),...e})},k0=(0,y.createContext)(void 0);uo();var Lue=lo(`flex items-center justify-center text-on-surface-variant transition-all hover:cursor-pointer disabled:opacity-70`,{variants:{size:{iconSmall:`size-md rounded-md [&>svg]:size-xs`,iconMedium:`size-lg rounded-lg [&>svg]:size-sm`,iconLarge:`size-xl rounded-xl [&>svg]:size-md`,small:`h-md gap-3xs rounded-md px-2xs style-text-default--2 [&>svg]:size-xs`,medium:`h-lg gap-2xs rounded-lg px-xs style-text-default--1 [&>svg]:size-sm`,large:`h-xl gap-xs rounded-xl px-sm style-text-default-0 [&>svg]:size-md`},tone:{brand:`hover:not-disabled:bg-brand-container hover:not-disabled:text-brand-on-container data-pressed:text-brand-default`,accent:`hover:not-disabled:bg-accent-container hover:not-disabled:text-accent-on-container data-pressed:text-accent-default`,neutral:`hover:not-disabled:bg-surface-low hover:not-disabled:text-neutral-on-container data-pressed:text-neutral-default`,error:`hover:not-disabled:bg-error-container hover:not-disabled:text-error-on-container data-pressed:text-error-default`,info:`hover:not-disabled:bg-info-container hover:not-disabled:text-info-on-container data-pressed:text-info-default`,success:`hover:not-disabled:bg-success-container hover:not-disabled:text-success-on-container data-pressed:text-success-default`,warning:`hover:not-disabled:bg-warning-container hover:not-disabled:text-warning-on-container data-pressed:text-warning-default`}},defaultVariants:{size:`medium`,tone:`brand`}});FO(),X();var A0=({size:e,tone:t,className:r,children:i,ref:a,...o})=>{let s=(0,y.useContext)(k0),c=e??s?.size??`medium`;return(0,n.jsx)(NO,{ref:a,...o,render:(e,a)=>(0,n.jsx)(`button`,{...e,className:Y(Lue({size:c,tone:t,className:r})),type:`button`,children:typeof i==`function`?i(a):i})})};C0();var Rue=({children:e,...t})=>{let r=g0();return(0,n.jsx)(A0,{id:r.name,name:r.name,onChange:e=>r.handleChange(!r.state.value),pressed:r.state.value,...t,children:e})};X();var zue=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`form`,{className:Y(`space-y-sm`,e),ref:r,...i,children:t});XC(),X();var Bue=({children:e,className:t,ref:r,...i})=>(0,n.jsx)(JC,{className:Y(`group flex items-center gap-2xs has-disabled:opacity-30`,t),ref:r,...i,children:e});XC(),X();var Vue=({className:e,...t})=>(0,n.jsx)(YC,{className:Y(`relative h-lg w-md rounded-md bg-surface text-center style-text-default-0 shadow-2xs outline outline-transparent transition-colors hover:outline-border-strong focus:outline-brand-border-strong`,e),...t});XC(),Uj(),X();var Hue=({className:e,ref:t,...r})=>(0,n.jsx)(mg,{className:Y(`flex items-center justify-center text-on-surface-variant`,e),ref:t,...r,children:(0,n.jsx)(Pj,{weight:`bold`})});X();var Uue=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`inline-flex h-md items-center justify-center rounded-md bg-neutral-container-high px-2xs align-middle style-text-default--1 whitespace-nowrap text-neutral-on-container select-none [&:has(svg)]:size-md [&:has(svg)]:p-0 [&>svg]:size-sm`,e),ref:r,...i,children:t}),j0=(e,t)=>{for(let n of e){if(n.id===t)return n;if(n.children?.length){let e=j0(n.children,t);if(e)return e}}return null},M0=(e,t)=>{let n=null;return{nextNodes:e.flatMap(e=>{if(e.id===t)return n=e,[];if(!e.children?.length)return[e];let r=M0(e.children,t);return r.removedNode?(n=r.removedNode,[{...e,children:r.nextNodes}]):[e]}),removedNode:n}},N0=(e,t,n)=>e.map(e=>e.id===t?{...e,children:[...e.children??[],n]}:e.children?.length?{...e,children:N0(e.children,t,n)}:e),P0=(e,t,n)=>{if(t===n)return e;let r=j0(e,t),i=j0(e,n);if(!r||!i?.children||j0(r.children??[],n))return e;let{nextNodes:a,removedNode:o}=M0(e,t);return o?N0(a,n,o):e},F0=(e,t)=>{let{nextNodes:n,removedNode:r}=M0(e,t);return r?[...n,r]:e},Wue=Symbol.for(`preact-signals`);function I0(){if(H0>1)H0--;else{var e,t=!1;for((function(){var e=G0;for(G0=void 0;e!==void 0;)e.S.v===e.v&&(e.S.i=e.i),e=e.o})();V0!==void 0;){var n=V0;for(V0=void 0,U0++;n!==void 0;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&X0(n))try{n.c()}catch(n){t||=(e=n,!0)}n=r}}if(U0=0,H0--,t)throw e}}function L0(e){if(H0>0)return e();W0=++Gue,H0++;try{return e()}finally{I0()}}var R0=void 0;function z0(e){var t=R0;R0=void 0;try{return e()}finally{R0=t}}var B0,V0=void 0,H0=0,U0=0,Gue=0,W0=0,G0=void 0,K0=0;function q0(e){if(R0!==void 0){var t=e.n;if(t===void 0||t.t!==R0)return t={i:0,S:e,p:R0.s,n:void 0,t:R0,e:void 0,x:void 0,r:t},R0.s!==void 0&&(R0.s.n=t),R0.s=t,e.n=t,32&R0.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=R0.s,t.n=void 0,R0.s.n=t,R0.s=t),t}}function J0(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}J0.prototype.brand=Wue,J0.prototype.h=function(){return!0},J0.prototype.S=function(e){var t=this,n=this.t;n!==e&&e.e===void 0&&(e.x=n,this.t=e,n===void 0?z0(function(){var e;(e=t.W)==null||e.call(t)}):n.e=e)},J0.prototype.U=function(e){var t=this;if(this.t!==void 0){var n=e.e,r=e.x;n!==void 0&&(n.x=r,e.e=void 0),r!==void 0&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,r===void 0&&z0(function(){var e;(e=t.Z)==null||e.call(t)}))}},J0.prototype.subscribe=function(e){var t=this;return i2(function(){var n=t.value,r=R0;R0=void 0;try{e(n)}finally{R0=r}},{name:`sub`})},J0.prototype.valueOf=function(){return this.value},J0.prototype.toString=function(){return this.value+``},J0.prototype.toJSON=function(){return this.value},J0.prototype.peek=function(){var e=this;return z0(function(){return e.value})},Object.defineProperty(J0.prototype,`value`,{get:function(){var e=q0(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(U0>100)throw Error(`Cycle detected`);(function(e){H0!==0&&U0===0&&e.l!==W0&&(e.l=W0,G0={S:e,v:e.v,i:e.i,o:G0})})(this),this.v=e,this.i++,K0++,H0++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{I0()}}}});function Y0(e,t){return new J0(e,t)}function X0(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Z0(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Q0(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function $0(e,t){J0.call(this,void 0),this.x=e,this.s=void 0,this.g=K0-1,this.f=4,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}$0.prototype=new J0,$0.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===K0))return!0;if(this.g=K0,this.f|=1,this.i>0&&!X0(this))return this.f&=-2,!0;var e=R0;try{Z0(this),R0=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return R0=e,Q0(this),this.f&=-2,!0},$0.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}J0.prototype.S.call(this,e)},$0.prototype.U=function(e){if(this.t!==void 0&&(J0.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},$0.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty($0.prototype,`value`,{get:function(){if(1&this.f)throw Error(`Cycle detected`);var e=q0(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function e2(e,t){return new $0(e,t)}function t2(e){var t=e.m;if(e.m=void 0,typeof t==`function`){H0++;var n=R0;R0=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,n2(e),t}finally{R0=n,I0()}}}function n2(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,t2(e)}function Kue(e){if(R0!==this)throw Error(`Out-of-order effect`);Q0(this),R0=e,this.f&=-2,8&this.f&&n2(this),I0()}function r2(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name,B0&&B0.push(this)}r2.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t==`function`&&(this.m=t)}finally{e()}},r2.prototype.S=function(){if(1&this.f)throw Error(`Cycle detected`);this.f|=1,this.f&=-9,t2(this),Z0(this),H0++;var e=R0;return R0=this,Kue.bind(this,e)},r2.prototype.N=function(){2&this.f||(this.f|=2,this.u=V0,V0=this)},r2.prototype.d=function(){this.f|=8,1&this.f||n2(this)},r2.prototype.dispose=function(){this.d()};function i2(e,t){var n=new r2(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}var que=Object.create,a2=Object.defineProperty,Jue=Object.defineProperties,Yue=Object.getOwnPropertyDescriptor,Xue=Object.getOwnPropertyDescriptors,o2=Object.getOwnPropertySymbols,Zue=Object.prototype.hasOwnProperty,Que=Object.prototype.propertyIsEnumerable,s2=(e,t)=>(t=Symbol[e])?t:Symbol.for(`Symbol.`+e),c2=e=>{throw TypeError(e)},l2=(e,t,n)=>t in e?a2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$ue=(e,t)=>{for(var n in t||={})Zue.call(t,n)&&l2(e,n,t[n]);if(o2)for(var n of o2(t))Que.call(t,n)&&l2(e,n,t[n]);return e},ede=(e,t)=>Jue(e,Xue(t)),u2=(e,t)=>a2(e,`name`,{value:t,configurable:!0}),tde=e=>[,,,que(e?.[s2(`metadata`)]??null)],d2=[`class`,`method`,`getter`,`setter`,`accessor`,`field`,`value`,`get`,`set`],f2=e=>e!==void 0&&typeof e!=`function`?c2(`Function expected`):e,nde=(e,t,n,r,i)=>({kind:d2[e],name:t,metadata:r,addInitializer:e=>n._?c2(`Already initialized`):i.push(f2(e||null))}),p2=(e,t)=>l2(t,s2(`metadata`),e[3]),m2=(e,t,n,r)=>{for(var i=0,a=e[t>>1],o=a&&a.length;i<o;i++)t&1?a[i].call(n):r=a[i].call(n,r);return r},h2=(e,t,n,r,i,a)=>{var o,s,c,l,u,d=t&7,f=!!(t&8),p=!!(t&16),m=d>3?e.length+1:d?f?1:2:0,h=d2[d+5],g=d>3&&(e[m-1]=[]),_=e[m]||(e[m]=[]),v=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&Yue(d<4?i:{get[n](){return _2(this,a)},set[n](e){return y2(this,a,e)}},n));d?p&&d<4&&u2(a,(d>2?`set `:d>1?`get `:``)+n):u2(i,n);for(var y=r.length-1;y>=0;y--)l=nde(d,n,c={},e[3],_),d&&(l.static=f,l.private=p,u=l.access={has:p?e=>rde(i,e):e=>n in e},d^3&&(u.get=p?e=>(d^1?_2:ide)(e,i,d^4?a:v.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>y2(e,i,t,d^4?a:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?p?a:v[h]:d>4?void 0:{get:v.get,set:v.set}:i,l),c._=1,d^4||s===void 0?f2(s)&&(d>4?g.unshift(s):d?p?a=s:v[h]=s:i=s):typeof s!=`object`||!s?c2(`Object expected`):(f2(o=s.get)&&(v.get=o),f2(o=s.set)&&(v.set=o),f2(o=s.init)&&g.unshift(o));return d||p2(e,i),v&&a2(i,n,v),p?d^4?a:v:i},g2=(e,t,n)=>t.has(e)||c2(`Cannot `+n),rde=(e,t)=>Object(t)===t?e.has(t):c2(`Cannot use the "in" operator on this value`),_2=(e,t,n)=>(g2(e,t,`read from private field`),n?n.call(e):t.get(e)),v2=(e,t,n)=>t.has(e)?c2(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),y2=(e,t,n,r)=>(g2(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),ide=(e,t,n)=>(g2(e,t,`access private method`),n);function b2(e,t){if(t){let n;return e2(()=>{let r=e();return r&&n&&t(n,r)?n:(n=r,r)})}return e2(e)}function x2(e,t){if(Object.is(e,t))return!0;if(e===null||t===null)return!1;if(typeof e==`function`&&typeof t==`function`)return e===t;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:!e.some((e,n)=>!x2(e,t[n]));if(typeof e==`object`&&typeof t==`object`){let n=Object.keys(e),r=Object.keys(t);return n.length===r.length?!n.some(n=>!x2(e[n],t[n])):!1}return!1}function S2({get:e},t){return{init(e){return Y0(e)},get(){return e.call(this).value},set(t){let n=e.call(this);n.peek()!==t&&(n.value=t)}}}function C2(e,t){let n=new WeakMap;return function(){let t=n.get(this);return t||(t=b2(e.bind(this)),n.set(this,t)),t.value}}function w2(e=!0){return function(t,n){n.addInitializer(function(){let t=n.kind===`field`||n.static?this:Object.getPrototypeOf(this),r=Object.getOwnPropertyDescriptor(t,n.name);r&&Object.defineProperty(t,n.name,ede($ue({},r),{enumerable:e}))})}}function T2(...e){let t=e.map(e=>i2(e));return()=>t.forEach(e=>e())}var E2,D2,O2,k2,A2,ade=[S2],j2,M2,N2,P2,F2,I2,L2,R2,z2,B2,V2,H2,U2,W2;A2=[S2],k2=[S2],O2=[w2()],D2=[w2()],E2=[w2()];var G2=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,m2(j2,5,this),v2(this,I2),v2(this,M2,m2(j2,8,this)),m2(j2,11,this),v2(this,L2,m2(j2,12,this)),m2(j2,15,this),v2(this,V2,m2(j2,16,this)),m2(j2,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return _2(this,I2,U2)}get initial(){return _2(this,I2,P2)}get previous(){return _2(this,I2,z2)}set current(e){let t=z0(()=>_2(this,I2,U2));e&&t&&this.equals(t,e)||L0(()=>{_2(this,I2,P2)||y2(this,I2,e,F2),y2(this,I2,t,B2),y2(this,I2,e,W2)})}reset(e=this.defaultValue){L0(()=>{y2(this,I2,void 0,B2),y2(this,I2,e,F2),y2(this,I2,e,W2)})}};j2=tde(null),M2=new WeakMap,I2=new WeakSet,L2=new WeakMap,V2=new WeakMap,N2=h2(j2,20,`#initial`,ade,I2,M2),P2=N2.get,F2=N2.set,R2=h2(j2,20,`#previous`,A2,I2,L2),z2=R2.get,B2=R2.set,H2=h2(j2,20,`#current`,k2,I2,V2),U2=H2.get,W2=H2.set,h2(j2,2,`current`,O2,G2),h2(j2,2,`initial`,D2,G2),h2(j2,2,`previous`,E2,G2),p2(j2,G2);function K2(e){return z0(()=>{let t={};for(let n in e)t[n]=e[n];return t})}var ode=Object.create,q2=Object.defineProperty,sde=Object.getOwnPropertyDescriptor,J2=Object.getOwnPropertySymbols,cde=Object.prototype.hasOwnProperty,lde=Object.prototype.propertyIsEnumerable,Y2=(e,t)=>(t=Symbol[e])?t:Symbol.for(`Symbol.`+e),X2=e=>{throw TypeError(e)},Z2=Math.pow,Q2=(e,t,n)=>t in e?q2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ude=(e,t)=>{for(var n in t||={})cde.call(t,n)&&Q2(e,n,t[n]);if(J2)for(var n of J2(t))lde.call(t,n)&&Q2(e,n,t[n]);return e},$2=(e,t)=>q2(e,`name`,{value:t,configurable:!0}),dde=e=>[,,,ode(e?.[Y2(`metadata`)]??null)],e4=[`class`,`method`,`getter`,`setter`,`accessor`,`field`,`value`,`get`,`set`],t4=e=>e!==void 0&&typeof e!=`function`?X2(`Function expected`):e,fde=(e,t,n,r,i)=>({kind:e4[e],name:t,metadata:r,addInitializer:e=>n._?X2(`Already initialized`):i.push(t4(e||null))}),n4=(e,t)=>Q2(t,Y2(`metadata`),e[3]),pde=(e,t,n,r)=>{for(var i=0,a=e[t>>1],o=a&&a.length;i<o;i++)t&1?a[i].call(n):r=a[i].call(n,r);return r},r4=(e,t,n,r,i,a)=>{var o,s,c,l,u,d=t&7,f=!!(t&8),p=!!(t&16),m=d>3?e.length+1:d?f?1:2:0,h=e4[d+5],g=d>3&&(e[m-1]=[]),_=e[m]||(e[m]=[]),v=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&sde(d<4?i:{get[n](){return a4(this,a)},set[n](e){return o4(this,a,e)}},n));d?p&&d<4&&$2(a,(d>2?`set `:d>1?`get `:``)+n):$2(i,n);for(var y=r.length-1;y>=0;y--)l=fde(d,n,c={},e[3],_),d&&(l.static=f,l.private=p,u=l.access={has:p?e=>mde(i,e):e=>n in e},d^3&&(u.get=p?e=>(d^1?a4:gde)(e,i,d^4?a:v.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>o4(e,i,t,d^4?a:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?p?a:v[h]:d>4?void 0:{get:v.get,set:v.set}:i,l),c._=1,d^4||s===void 0?t4(s)&&(d>4?g.unshift(s):d?p?a=s:v[h]=s:i=s):typeof s!=`object`||!s?X2(`Object expected`):(t4(o=s.get)&&(v.get=o),t4(o=s.set)&&(v.set=o),t4(o=s.init)&&g.unshift(o));return d||n4(e,i),v&&q2(i,n,v),p?d^4?a:v:i},i4=(e,t,n)=>t.has(e)||X2(`Cannot `+n),mde=(e,t)=>Object(t)===t?e.has(t):X2(`Cannot use the "in" operator on this value`),a4=(e,t,n)=>(i4(e,t,`read from private field`),n?n.call(e):t.get(e)),hde=(e,t,n)=>t.has(e)?X2(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),o4=(e,t,n,r)=>(i4(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),gde=(e,t,n)=>(i4(e,t,`access private method`),n),s4=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},c4=class e{constructor(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(t,n){let{top:r,left:i,width:a,height:o,scale:s}=this,c=new e(i+t,r+n,a,o);return c.scale=ude({},s),c}get boundingRectangle(){let{width:e,height:t,left:n,top:r,right:i,bottom:a}=this;return{width:e,height:t,left:n,top:r,right:i,bottom:a}}get center(){let{left:e,top:t,right:n,bottom:r}=this;return new s4((e+n)/2,(t+r)/2)}get area(){let{width:e,height:t}=this;return e*t}equals(t){if(!(t instanceof e))return!1;let{left:n,top:r,width:i,height:a}=this;return n===t.left&&r===t.top&&i===t.width&&a===t.height}containsPoint(e){let{top:t,left:n,bottom:r,right:i}=this;return t<=e.y&&e.y<=r&&n<=e.x&&e.x<=i}intersectionArea(t){return t instanceof e?_de(this,t):0}intersectionRatio(e){let{area:t}=this,n=this.intersectionArea(e);return n/(e.area+t-n)}get bottom(){let{top:e,height:t}=this;return e+t}get right(){let{left:e,width:t}=this;return e+t}get aspectRatio(){let{width:e,height:t}=this;return e/t}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:t,left:n,width:r,height:i}){return new e(n,t,r,i)}static delta(e,t,n={x:`center`,y:`center`}){let r=(e,t)=>{let r=n[t],i=t===`x`?e.left:e.top,a=t===`x`?e.width:e.height;return r==`start`?i:r==`end`?i+a:i+a/2};return s4.delta({x:r(e,`x`),y:r(e,`y`)},{x:r(t,`x`),y:r(t,`y`)})}static intersectionRatio(t,n){return e.from(t).intersectionRatio(e.from(n))}};function _de(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;return r<i&&n<a?o*s:0}var l4,u4,d4,f4,p4,m4=class extends (d4=G2,u4=[C2],l4=[C2],d4){constructor(e){let t=s4.from(e);super(t,(e,t)=>s4.equals(e,t)),pde(p4,5,this),hde(this,f4,0),this.velocity={x:0,y:0}}get delta(){return s4.delta(this.current,this.initial)}get direction(){let{current:e,previous:t}=this;if(!t)return null;let n={x:e.x-t.x,y:e.y-t.y};return!n.x&&!n.y?null:Math.abs(n.x)>Math.abs(n.y)?n.x>0?`right`:`left`:n.y>0?`down`:`up`}get current(){return super.current}set current(e){let{current:t}=this,n=s4.from(e),r={x:n.x-t.x,y:n.y-t.y},i=Date.now(),a=i-a4(this,f4),o=e=>Math.round(e/a*100);L0(()=>{o4(this,f4,i),this.velocity={x:o(r.x),y:o(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(s4.from(e)),this.velocity={x:0,y:0}}};p4=dde(d4),f4=new WeakMap,r4(p4,2,`delta`,u4,m4),r4(p4,2,`direction`,l4,m4),n4(p4,m4);function h4({x:e,y:t},n){let r=Math.abs(e),i=Math.abs(t);return typeof n==`number`?Math.sqrt(Z2(r,2)+Z2(i,2))>n:`x`in n&&`y`in n?r>n.x&&i>n.y:`x`in n?r>n.x:`y`in n?i>n.y:!1}var g4=(e=>(e.Horizontal=`x`,e.Vertical=`y`,e))(g4||{}),_4=Object.values(g4),vde=Object.create,v4=Object.defineProperty,yde=Object.defineProperties,bde=Object.getOwnPropertyDescriptor,xde=Object.getOwnPropertyDescriptors,y4=Object.getOwnPropertySymbols,b4=Object.prototype.hasOwnProperty,x4=Object.prototype.propertyIsEnumerable,S4=(e,t)=>(t=Symbol[e])?t:Symbol.for(`Symbol.`+e),C4=e=>{throw TypeError(e)},w4=(e,t,n)=>t in e?v4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,T4=(e,t)=>{for(var n in t||={})b4.call(t,n)&&w4(e,n,t[n]);if(y4)for(var n of y4(t))x4.call(t,n)&&w4(e,n,t[n]);return e},E4=(e,t)=>yde(e,xde(t)),D4=(e,t)=>v4(e,`name`,{value:t,configurable:!0}),O4=(e,t)=>{var n={};for(var r in e)b4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&y4)for(var r of y4(e))t.indexOf(r)<0&&x4.call(e,r)&&(n[r]=e[r]);return n},k4=e=>[,,,vde(e?.[S4(`metadata`)]??null)],A4=[`class`,`method`,`getter`,`setter`,`accessor`,`field`,`value`,`get`,`set`],j4=e=>e!==void 0&&typeof e!=`function`?C4(`Function expected`):e,Sde=(e,t,n,r,i)=>({kind:A4[e],name:t,metadata:r,addInitializer:e=>n._?C4(`Already initialized`):i.push(j4(e||null))}),M4=(e,t)=>w4(t,S4(`metadata`),e[3]),N4=(e,t,n,r)=>{for(var i=0,a=e[t>>1],o=a&&a.length;i<o;i++)t&1?a[i].call(n):r=a[i].call(n,r);return r},P4=(e,t,n,r,i,a)=>{var o,s,c,l,u,d=t&7,f=!!(t&8),p=!!(t&16),m=d>3?e.length+1:d?f?1:2:0,h=A4[d+5],g=d>3&&(e[m-1]=[]),_=e[m]||(e[m]=[]),v=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&bde(d<4?i:{get[n](){return I4(this,a)},set[n](e){return R4(this,a,e)}},n));d?p&&d<4&&D4(a,(d>2?`set `:d>1?`get `:``)+n):D4(i,n);for(var y=r.length-1;y>=0;y--)l=Sde(d,n,c={},e[3],_),d&&(l.static=f,l.private=p,u=l.access={has:p?e=>Cde(i,e):e=>n in e},d^3&&(u.get=p?e=>(d^1?I4:z4)(e,i,d^4?a:v.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>R4(e,i,t,d^4?a:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?p?a:v[h]:d>4?void 0:{get:v.get,set:v.set}:i,l),c._=1,d^4||s===void 0?j4(s)&&(d>4?g.unshift(s):d?p?a=s:v[h]=s:i=s):typeof s!=`object`||!s?C4(`Object expected`):(j4(o=s.get)&&(v.get=o),j4(o=s.set)&&(v.set=o),j4(o=s.init)&&g.unshift(o));return d||M4(e,i),v&&v4(i,n,v),p?d^4?a:v:i},F4=(e,t,n)=>t.has(e)||C4(`Cannot `+n),Cde=(e,t)=>Object(t)===t?e.has(t):C4(`Cannot use the "in" operator on this value`),I4=(e,t,n)=>(F4(e,t,`read from private field`),n?n.call(e):t.get(e)),L4=(e,t,n)=>t.has(e)?C4(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),R4=(e,t,n,r)=>(F4(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),z4=(e,t,n)=>(F4(e,t,`access private method`),n);function B4(e,t){return{plugin:e,options:t}}function V4(e){return t=>B4(e,t)}function H4(e){return typeof e==`function`?{plugin:e,options:void 0}:e}var wde=[S2],U4,W4,G4,K4=class{constructor(e,t){this.manager=e,this.options=t,L4(this,W4,N4(U4,8,this,!1)),N4(U4,11,this),L4(this,G4,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return z0(()=>this.disabled)}configure(e){this.options=e}registerEffect(e){let t=i2(e.bind(this));return I4(this,G4).add(t),t}destroy(){I4(this,G4).forEach(e=>e())}static configure(e){return B4(this,e)}};U4=k4(null),W4=new WeakMap,G4=new WeakMap,P4(U4,4,`disabled`,wde,K4,W4),M4(U4,K4);var q4=class extends K4{},J4,Y4=class{constructor(e){this.manager=e,this.instances=new Map,L4(this,J4,[])}get values(){return Array.from(this.instances.values())}set values(e){let t=e.map(H4).reduce((e,t)=>{let n=e.find(({plugin:e})=>e===t.plugin);return n?(n.options=t.options,e):[...e,t]},[]),n=t.map(({plugin:e})=>e);for(let e of I4(this,J4))if(!n.includes(e)){if(e.prototype instanceof q4)continue;this.unregister(e)}for(let{plugin:e,options:n}of t)this.register(e,n);R4(this,J4,n)}get(e){return this.instances.get(e)}register(e,t){let n=this.instances.get(e);if(n)return n.options!==t&&(n.options=t),n;let r=new e(this.manager,t);return this.instances.set(e,r),r}unregister(e){let t=this.instances.get(e);t&&(t.destroy(),this.instances.delete(e))}destroy(){for(let e of this.instances.values())e.destroy();this.instances.clear()}};J4=new WeakMap;function Tde(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}var X4=[],Z4,Q4,Ede=class extends K4{constructor(e){super(e),L4(this,Z4),L4(this,Q4),this.computeCollisions=this.computeCollisions.bind(this),R4(this,Q4,Y0(X4)),this.destroy=T2(()=>{let e=this.computeCollisions(),t=z0(()=>this.manager.dragOperation.position.current);if(e!==X4){let e=I4(this,Z4);if(R4(this,Z4,t),e&&t.x==e.x&&t.y==e.y)return}else R4(this,Z4,void 0);I4(this,Q4).value=e},()=>{let{dragOperation:e}=this.manager;e.status.initialized&&this.forceUpdate()})}forceUpdate(e=!0){z0(()=>{e?I4(this,Q4).value=this.computeCollisions():R4(this,Z4,void 0)})}computeCollisions(e,t){let{registry:n,dragOperation:r}=this.manager,{source:i,shape:a,status:o}=r;if(!o.initialized||!a)return X4;let s=[],c=[];for(let a of e??n.droppables){if(a.disabled||i&&!a.accepts(i))continue;let e=t??a.collisionDetector;if(!e)continue;c.push(a),a.shape;let n=z0(()=>e({droppable:a,dragOperation:r}));n&&(a.collisionPriority!=null&&(n.priority=a.collisionPriority),s.push(n))}return c.length===0?X4:(s.sort(Tde),s)}get collisions(){return I4(this,Q4).value}};Z4=new WeakMap,Q4=new WeakMap;var $4,e3,Dde=[S2],t3,n3,r3,i3,a3,o3,s3;e3=[S2],$4=[S2];var c3=class e{constructor(e,t){L4(this,i3,N4(r3,8,this)),N4(r3,11,this),L4(this,a3),L4(this,o3,N4(r3,12,this)),N4(r3,15,this),L4(this,s3,N4(r3,16,this)),N4(r3,19,this);let{effects:n,id:r,data:i={},disabled:a=!1,register:o=!0}=e,s=r;R4(this,a3,Y0(r)),this.manager=t,this.data=i,this.disabled=a,this.effects=()=>[()=>{let{id:e,manager:t}=this;if(e!==s)return s=e,t?.registry.register(this),()=>t?.registry.unregister(this)},...n?.()??[]],this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),t&&o&&queueMicrotask(this.register)}get id(){let t=I4(this,a3).value;return e.pendingIdChanges?.get(this)??t}set id(t){t!==(e.pendingIdChanges?.get(this)??I4(this,a3).peek())&&(e.pendingIdChanges||(e.pendingIdChanges=new Map,queueMicrotask(()=>{var t;return z4(t=e,t3,n3).call(t)})),e.pendingIdChanges.set(this,t))}register(){return this.manager?.registry.register(this)}unregister(){var e;(e=this.manager)==null||e.registry.unregister(this)}destroy(){var e;(e=this.manager)==null||e.registry.unregister(this)}};r3=k4(null),t3=new WeakSet,n3=function(){let e=c3.pendingIdChanges;c3.pendingIdChanges=null,e&&L0(()=>{for(let[t,n]of e)I4(t,a3).value=n})},i3=new WeakMap,a3=new WeakMap,o3=new WeakMap,s3=new WeakMap,P4(r3,4,`manager`,Dde,c3,i3),P4(r3,4,`data`,e3,c3,o3),P4(r3,4,`disabled`,$4,c3,s3),L4(c3,t3),M4(r3,c3),c3.pendingIdChanges=null;var l3=c3,u3=class{constructor(){this.map=Y0(new Map),this.cleanupFunctions=new WeakMap,this.register=(e,t)=>{let n=this.map.peek(),r=n.get(e),i=()=>this.unregister(e,t);if(r===t)return i;r&&r.id===e&&(this.cleanupFunctions.get(r)?.(),this.cleanupFunctions.delete(r));let a=new Map(n);for(let[r,i]of n)if(i===t&&r!==e){a.delete(r);break}a.set(e,t),this.map.value=a;let o=T2(...t.effects());return this.cleanupFunctions.set(t,o),i},this.unregister=(e,t)=>{let n=this.map.peek();if(n.get(e)!==t)return;this.cleanupFunctions.get(t)?.(),this.cleanupFunctions.delete(t);let r=new Map(n);r.delete(e),this.map.value=r}}[Symbol.iterator](){return this.map.peek().values()}get value(){return this.map.value.values()}has(e){return this.map.value.has(e)}get(e){return this.map.value.get(e)}destroy(){for(let e of this)this.cleanupFunctions.get(e)?.(),e.destroy();this.map.value=new Map}},d3,f3,p3,m3,h3,g3,_3,v3,y3,b3,x3,S3=class extends (_3=l3,g3=[S2],h3=[S2],m3=[S2],p3=[C2],f3=[C2],d3=[C2],_3){constructor(e,t){var n=e,{modifiers:r,type:i,sensors:a,plugins:o,effects:s}=n,c=O4(n,[`modifiers`,`type`,`sensors`,`plugins`,`effects`]);super(E4(T4({},c),{effects:()=>[...s?.()??[],()=>{let{manager:e,plugins:t}=this;if(!(!e||!t))for(let n of t){let{plugin:t}=H4(n);e.registry.plugins.register(t)}}]}),t),N4(v3,5,this),L4(this,y3,N4(v3,8,this)),N4(v3,11,this),L4(this,b3,N4(v3,12,this)),N4(v3,15,this),L4(this,x3,N4(v3,16,this,this.isDragSource?`dragging`:`idle`)),N4(v3,19,this),this.type=i,this.sensors=a,this.modifiers=r,this.alignment=c.alignment,this.plugins=o}pluginConfig(e){if(this.plugins)for(let t of this.plugins){let n=H4(t);if(n.plugin===e)return n.options}}get isDropping(){return this.status===`dropping`&&this.isDragSource}get isDragging(){return this.status===`dragging`&&this.isDragSource}get isDragSource(){return this.manager?.dragOperation.source?.id===this.id}};v3=k4(_3),y3=new WeakMap,b3=new WeakMap,x3=new WeakMap,P4(v3,4,`type`,g3,S3,y3),P4(v3,4,`modifiers`,h3,S3,b3),P4(v3,4,`status`,m3,S3,x3),P4(v3,2,`isDropping`,p3,S3),P4(v3,2,`isDragging`,f3,S3),P4(v3,2,`isDragSource`,d3,S3),M4(v3,S3);var C3,w3,T3,E3,D3,O3,k3,A3,j3,M3,N3,P3,F3,I3=class extends (k3=l3,O3=[S2],D3=[S2],E3=[S2],T3=[S2],w3=[S2],C3=[C2],k3){constructor(e,t){var n=e,{accept:r,collisionDetector:i,collisionPriority:a,type:o}=n,s=O4(n,[`accept`,`collisionDetector`,`collisionPriority`,`type`]);super(s,t),N4(A3,5,this),L4(this,j3,N4(A3,8,this)),N4(A3,11,this),L4(this,M3,N4(A3,12,this)),N4(A3,15,this),L4(this,N3,N4(A3,16,this)),N4(A3,19,this),L4(this,P3,N4(A3,20,this)),N4(A3,23,this),L4(this,F3,N4(A3,24,this)),N4(A3,27,this),this.accept=r,this.collisionDetector=i,this.collisionPriority=a,this.type=o}accepts(e){let{accept:t}=this;return t?typeof t==`function`?t(e):e.type?Array.isArray(t)?t.includes(e.type):e.type===t:!1:!0}get isDropTarget(){return this.manager?.dragOperation.target?.id===this.id}};A3=k4(k3),j3=new WeakMap,M3=new WeakMap,N3=new WeakMap,P3=new WeakMap,F3=new WeakMap,P4(A3,4,`accept`,O3,I3,j3),P4(A3,4,`type`,D3,I3,M3),P4(A3,4,`collisionDetector`,E3,I3,N3),P4(A3,4,`collisionPriority`,T3,I3,P3),P4(A3,4,`shape`,w3,I3,F3),P4(A3,2,`isDropTarget`,C3,I3),M4(A3,I3);var Ode=class{constructor(){this.registry=new Map}addEventListener(e,t){let{registry:n}=this,r=new Set(n.get(e));return r.add(t),n.set(e,r),()=>this.removeEventListener(e,t)}removeEventListener(e,t){let{registry:n}=this,r=new Set(n.get(e));r.delete(t),n.set(e,r)}dispatch(e,...t){let{registry:n}=this,r=n.get(e);if(r)for(let e of r)e(...t)}},kde=class extends Ode{constructor(e){super(),this.manager=e}dispatch(e,t){let n=[t,this.manager];super.dispatch(e,...n)}};function L3(e,t=!0){let n=!1;return E4(T4({},e),{cancelable:t,get defaultPrevented(){return n},preventDefault(){t&&(n=!0)}})}var Ade=class extends q4{constructor(e){super(e);let t=(e,t)=>e.map(({id:e})=>e).join(``)===t.map(({id:e})=>e).join(``),n=[];this.destroy=T2(()=>{let{dragOperation:t,collisionObserver:r}=e;t.status.initializing&&(n=[],r.enable())},()=>{let{collisionObserver:r,monitor:i}=e,{collisions:a}=r;if(r.isDisabled()||l3.pendingIdChanges)return;let o=L3({collisions:a});if(i.dispatch(`collision`,o),o.defaultPrevented||t(a,n))return;n=a;let[s]=a;z0(()=>{s?.id!==e.dragOperation.target?.id&&(r.disable(),e.actions.setDropTarget(s?.id).then(()=>{r.enable()}))})})}},R3=(e=>(e[e.Lowest=0]=`Lowest`,e[e.Low=1]=`Low`,e[e.Normal=2]=`Normal`,e[e.High=3]=`High`,e[e.Highest=4]=`Highest`,e))(R3||{}),z3=(e=>(e[e.Collision=0]=`Collision`,e[e.ShapeIntersection=1]=`ShapeIntersection`,e[e.PointerIntersection=2]=`PointerIntersection`,e))(z3||{}),B3,V3,H3,U3,W3,G3,jde=[S2],K3,q3;G3=[C2],W3=[C2],U3=[C2],H3=[C2],V3=[C2],B3=[C2];var J3=class{constructor(){N4(K3,5,this),L4(this,q3,N4(K3,8,this,`idle`)),N4(K3,11,this)}get current(){return this.value}get idle(){return this.value===`idle`}get initializing(){return this.value===`initializing`}get initialized(){let{value:e}=this;return e!==`idle`&&e!==`initialization-pending`}get dragging(){return this.value===`dragging`}get dropped(){return this.value===`dropped`}set(e){this.value=e}};K3=k4(null),q3=new WeakMap,P4(K3,4,`value`,jde,J3,q3),P4(K3,2,`current`,G3,J3),P4(K3,2,`idle`,W3,J3),P4(K3,2,`initializing`,U3,J3),P4(K3,2,`initialized`,H3,J3),P4(K3,2,`dragging`,V3,J3),P4(K3,2,`dropped`,B3,J3),M4(K3,J3);var Mde=class{constructor(e){this.manager=e}setDragSource(e){let{dragOperation:t}=this.manager;t.sourceIdentifier=typeof e==`string`||typeof e==`number`?e:e.id}setDropTarget(e){return z0(()=>{let{dragOperation:t}=this.manager,n=e??null;if(t.targetIdentifier===n)return Promise.resolve(!1);t.targetIdentifier=n;let r=L3({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch(`dragover`,r),this.manager.renderer.rendering.then(()=>r.defaultPrevented)})}start(e){return z0(()=>{let{dragOperation:t}=this.manager;if(e.source!=null&&this.setDragSource(e.source),!t.source)throw Error(`Cannot start a drag operation without a drag source`);if(!t.status.idle)throw Error(`Cannot start a drag operation while another is active`);let n=new AbortController,{event:r,coordinates:i}=e;L0(()=>{t.status.set(`initialization-pending`),t.shape=null,t.canceled=!1,t.activatorEvent=r??null,t.position.reset(i)});let a=L3({operation:t.snapshot()});return this.manager.monitor.dispatch(`beforedragstart`,a),a.defaultPrevented?(t.reset(),n.abort(),n):(t.status.set(`initializing`),t.controller=n,this.manager.renderer.rendering.then(()=>{if(n.signal.aborted)return;let{status:e}=t;e.current===`initializing`&&L0(()=>{t.status.set(`dragging`),this.manager.monitor.dispatch(`dragstart`,{nativeEvent:r,operation:t.snapshot(),cancelable:!1})})}),n)})}move(e){return z0(()=>{let{dragOperation:t}=this.manager,{status:n,controller:r}=t;if(!n.dragging||!r||r.signal.aborted)return;let i=L3({nativeEvent:e.event,operation:t.snapshot(),by:e.by,to:e.to},e.cancelable??!0);(e.propagate??!0)&&this.manager.monitor.dispatch(`dragmove`,i),queueMicrotask(()=>{if(i.defaultPrevented)return;let n=e.to??{x:t.position.current.x+(e.by?.x??0),y:t.position.current.y+(e.by?.y??0)};t.position.current=n})})}stop(e={}){return z0(()=>{let{dragOperation:t}=this.manager,{controller:n}=t;if(!n||n.signal.aborted)return;let r,i=()=>{let e={resume:()=>{},abort:()=>{}};return r=new Promise((t,n)=>{e.resume=t,e.abort=n}),e};n.abort();let a=()=>{this.manager.renderer.rendering.then(()=>{t.status.set(`dropped`);let e=z0(()=>t.source?.status===`dropping`),r=()=>{t.controller===n&&(t.controller=void 0),t.reset()};if(e){let{source:e}=t,n=i2(()=>{e?.status===`idle`&&(n(),r())})}else this.manager.renderer.rendering.then(r)})};t.canceled=e.canceled??!1,this.manager.monitor.dispatch(`dragend`,{nativeEvent:e.event,operation:t.snapshot(),canceled:e.canceled??!1,suspend:i}),r?r.then(a).catch(()=>t.reset()):a()})}},Y3=class extends K4{constructor(e,t){super(e,t),this.manager=e,this.options=t}},Nde=class extends AbortController{constructor(e,t){super(),this.constraints=e,this.onActivate=t,this.activated=!1;for(let t of e??[])t.controller=this}onEvent(e){if(!this.activated)if(this.constraints?.length)for(let t of this.constraints)t.onEvent(e);else this.activate(e)}activate(e){this.activated||(this.activated=!0,this.onActivate(e))}abort(e){this.activated=!1,super.abort(e)}},X3,Z3=class{constructor(e){this.options=e,L4(this,X3)}set controller(e){R4(this,X3,e),e.signal.addEventListener(`abort`,()=>this.abort())}activate(e){var t;(t=I4(this,X3))==null||t.activate(e)}};X3=new WeakMap;var Q3=class extends K4{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},Pde=class{constructor(e){this.draggables=new u3,this.droppables=new u3,this.plugins=new Y4(e),this.sensors=new Y4(e),this.modifiers=new Y4(e)}register(e,t){if(e instanceof S3)return this.draggables.register(e.id,e);if(e instanceof I3)return this.droppables.register(e.id,e);if(e.prototype instanceof Q3)return this.modifiers.register(e,t);if(e.prototype instanceof Y3)return this.sensors.register(e,t);if(e.prototype instanceof K4)return this.plugins.register(e,t);throw Error(`Invalid instance type`)}unregister(e){if(e instanceof l3)return e instanceof S3?this.draggables.unregister(e.id,e):e instanceof I3?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof Q3)return this.modifiers.unregister(e);if(e.prototype instanceof Y3)return this.sensors.unregister(e);if(e.prototype instanceof K4)return this.plugins.unregister(e);throw Error(`Invalid instance type`)}destroy(){this.draggables.destroy(),this.droppables.destroy(),this.plugins.destroy(),this.sensors.destroy(),this.modifiers.destroy()}},$3,e6,t6,n6,r6,i6,a6,o6,Fde=[C2],s6,c6,l6,u6,d6,f6,p6,m6,h6,g6;o6=[S2],a6=[S2],i6=[S2],r6=[S2],n6=[S2],t6=[C2],e6=[C2],$3=[C2];var _6=class{constructor(e){N4(u6,5,this),L4(this,s6),L4(this,c6),L4(this,l6,new G2(void 0,(e,t)=>e&&t?e.equals(t):e===t)),this.status=new J3,L4(this,d6,N4(u6,8,this,!1)),N4(u6,11,this),L4(this,f6,N4(u6,12,this,null)),N4(u6,15,this),L4(this,p6,N4(u6,16,this,null)),N4(u6,19,this),L4(this,m6,N4(u6,20,this,null)),N4(u6,23,this),L4(this,h6,N4(u6,24,this,[])),N4(u6,27,this),this.position=new m4({x:0,y:0}),L4(this,g6,{x:0,y:0}),R4(this,s6,e)}get shape(){let{current:e,initial:t,previous:n}=I4(this,l6);return!e||!t?null:{current:e,initial:t,previous:n}}set shape(e){e?I4(this,l6).current=e:I4(this,l6).reset()}get source(){let e=this.sourceIdentifier;if(e==null)return null;let t=I4(this,s6).registry.draggables.get(e);return t&&R4(this,c6,t),t??I4(this,c6)??null}get target(){let e=this.targetIdentifier;return e==null?null:I4(this,s6).registry.droppables.get(e)??null}get transform(){let{x:e,y:t}=this.position.delta,n={x:e,y:t};for(let e of this.modifiers)n=e.apply(E4(T4({},this.snapshot()),{transform:n}));return R4(this,g6,n),n}snapshot(){return z0(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:I4(this,g6),shape:this.shape?K2(this.shape):null,position:K2(this.position),status:K2(this.status),canceled:this.canceled}))}reset(){L0(()=>{this.status.set(`idle`),this.sourceIdentifier=null,this.targetIdentifier=null,I4(this,l6).reset(),this.position.reset({x:0,y:0}),R4(this,g6,{x:0,y:0}),this.modifiers=[]})}};u6=k4(null),s6=new WeakMap,c6=new WeakMap,l6=new WeakMap,d6=new WeakMap,f6=new WeakMap,p6=new WeakMap,m6=new WeakMap,h6=new WeakMap,g6=new WeakMap,P4(u6,2,`shape`,Fde,_6),P4(u6,4,`canceled`,o6,_6,d6),P4(u6,4,`activatorEvent`,a6,_6,f6),P4(u6,4,`sourceIdentifier`,i6,_6,p6),P4(u6,4,`targetIdentifier`,r6,_6,m6),P4(u6,4,`modifiers`,n6,_6,h6),P4(u6,2,`source`,t6,_6),P4(u6,2,`target`,e6,_6),P4(u6,2,`transform`,$3,_6),M4(u6,_6);var Ide={get rendering(){return Promise.resolve()}};function v6(e,t){return typeof e==`function`?e(t):e??t}var Lde=class{constructor(e){this.destroy=()=>{this.dragOperation.status.idle||this.actions.stop({canceled:!0}),this.dragOperation.modifiers.forEach(e=>e.destroy()),this.registry.destroy(),this.collisionObserver.destroy()};let t=e??{},n=v6(t.plugins,[]),r=v6(t.sensors,[]),i=v6(t.modifiers,[]),a=t.renderer??Ide,o=new kde(this),s=new Pde(this);this.registry=s,this.monitor=o,this.renderer=a,this.actions=new Mde(this),this.dragOperation=new _6(this),this.collisionObserver=new Ede(this),this.plugins=[Ade,...n],this.modifiers=i,this.sensors=r;let{destroy:c}=this,l=T2(()=>{let e=z0(()=>this.dragOperation.modifiers),t=this.modifiers;for(let n of e)t.includes(n)||n.destroy();this.dragOperation.modifiers=(this.dragOperation.source?.modifiers)?.map(e=>{let{plugin:t,options:n}=H4(e);return new t(this,n)})??t});this.destroy=()=>{l(),c()}}get plugins(){return this.registry.plugins.values}set plugins(e){this.registry.plugins.values=e}get modifiers(){return this.registry.modifiers.values}set modifiers(e){this.registry.modifiers.values=e}get sensors(){return this.registry.sensors.values}set sensors(e){this.registry.sensors.values=e}},y6=e=>{throw TypeError(e)},b6=(e,t,n)=>t.has(e)||y6(`Cannot `+n),x6=(e,t,n)=>(b6(e,t,`read from private field`),t.get(e)),S6=(e,t,n)=>t.has(e)?y6(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),C6=(e,t,n,r)=>(b6(e,t,`write to private field`),t.set(e,n),n),w6=(e,t,n)=>(b6(e,t,`access private method`),n);function T6(e){return e?e instanceof KeyframeEffect?!0:`getKeyframes`in e&&typeof e.getKeyframes==`function`:!1}function Rde(e,t){let n=e.getAnimations(),r=null;for(let e of n){if(e.playState!==`running`)continue;let{effect:n}=e,i=(T6(n)?n.getKeyframes():[]).filter(t);i.length>0&&(r=[i[i.length-1],e])}return r}function E6(e){let{width:t,height:n,top:r,left:i,bottom:a,right:o}=e.getBoundingClientRect();return{width:t,height:n,top:r,left:i,bottom:a,right:o}}function D6(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function O6(e){return`nodeType`in e}function k6(e){return e?D6(e)?e:O6(e)?`defaultView`in e?e.defaultView??window:e.ownerDocument?.defaultView??window:window:window}function A6(e){let{Document:t}=k6(e);return e instanceof t||`nodeType`in e&&e.nodeType===Node.DOCUMENT_NODE}function j6(e){return!e||D6(e)?!1:e instanceof k6(e).HTMLElement||`namespaceURI`in e&&typeof e.namespaceURI==`string`&&e.namespaceURI.endsWith(`html`)}function M6(e){return e instanceof k6(e).SVGElement||`namespaceURI`in e&&typeof e.namespaceURI==`string`&&e.namespaceURI.endsWith(`svg`)}function N6(e){return e?D6(e)?e.document:O6(e)?A6(e)?e:j6(e)||M6(e)?e.ownerDocument:document:document:document}function zde(e){let{documentElement:t}=N6(e),n=k6(e).visualViewport,r=n?.width??t.clientWidth,i=n?.height??t.clientHeight,a=n?.offsetTop??0,o=n?.offsetLeft??0;return{top:a,left:o,right:o+r,bottom:a+i,width:r,height:i}}function Bde(e,t){if(Vde(e)&&e.open===!1)return!1;let{overflow:n,overflowX:r,overflowY:i}=getComputedStyle(e);return n===`visible`&&r===`visible`&&i===`visible`}function Vde(e){return e.tagName===`DETAILS`}function P6(e,t=e.getBoundingClientRect(),n=0){let r=t,{ownerDocument:i}=e,a=i.defaultView??window,o=e.parentElement;for(;o&&o!==i.documentElement;){if(!Bde(o)){let e=o.getBoundingClientRect(),t=n*(e.bottom-e.top),i=n*(e.right-e.left),a=n*(e.bottom-e.top),s=n*(e.right-e.left);r={top:Math.max(r.top,e.top-t),right:Math.min(r.right,e.right+i),bottom:Math.min(r.bottom,e.bottom+a),left:Math.max(r.left,e.left-s),width:0,height:0},r.width=r.right-r.left,r.height=r.bottom-r.top}o=o.parentElement}let s=a.visualViewport,c=s?.offsetTop??0,l=s?.offsetLeft??0,u=s?.width??a.innerWidth,d=s?.height??a.innerHeight,f=n*d,p=n*u;return r={top:Math.max(r.top,c-f),right:Math.min(r.right,l+u+p),bottom:Math.min(r.bottom,c+d+f),left:Math.max(r.left,l-p),width:0,height:0},r.width=r.right-r.left,r.height=r.bottom-r.top,r.width<0&&(r.width=0),r.height<0&&(r.height=0),r}function F6(e){return{x:e.clientX,y:e.clientY}}var I6=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function L6(e=document,t=new Set){if(t.has(e))return[];t.add(e);let n=[e];for(let r of Array.from(e.querySelectorAll(`iframe, frame`)))try{let e=r.contentDocument;e&&!t.has(e)&&n.push(...L6(e,t))}catch{}try{let r=e.defaultView;if(r&&r!==window.top){let i=r.parent;i&&i.document&&i.document!==e&&n.push(...L6(i.document,t))}}catch{}return n}function R6(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function z6(){let e=R6()?window.visualViewport:null;return{x:e?.offsetLeft??0,y:e?.offsetTop??0}}function B6(e){return!e||!O6(e)?!1:e instanceof k6(e).ShadowRoot}function V6(e){if(e&&O6(e)){let t=e.getRootNode();if(B6(t)||t instanceof Document)return t}return N6(e)}function H6(e){return e.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function Hde(e){let t=`input, textarea, select, canvas, [contenteditable]`,n=e.cloneNode(!0),r=Array.from(e.querySelectorAll(t));return Array.from(n.querySelectorAll(t)).forEach((e,t)=>{let n=r[t];U6(e)&&U6(n)&&(e.type!==`file`&&(e.value=n.value),e.type===`radio`&&e.name&&(e.name=`Cloned__${e.name}`)),W6(e)&&W6(n)&&n.width>0&&n.height>0&&e.getContext(`2d`)?.drawImage(n,0,0)}),n}function U6(e){return`value`in e}function W6(e){return e.tagName===`CANVAS`}function G6(e,{x:t,y:n}){let r=e.elementFromPoint(t,n);if(Ude(r)){let{contentDocument:e}=r;if(e){let{left:i,top:a}=r.getBoundingClientRect();return G6(e,{x:t-i,y:n-a})}}return r}function Ude(e){return e?.tagName===`IFRAME`}var K6=new WeakMap;function Wde(e){return!!e.closest(`
11
50
  input:not([disabled]),
12
51
  select:not([disabled]),
13
52
  textarea:not([disabled]),
14
53
  button:not([disabled]),
15
54
  a[href],
16
55
  [contenteditable]:not([contenteditable="false"])
17
- `)}var Pq=class{constructor(){this.entries=new Set,this.clear=()=>{for(let e of this.entries){let[t,{type:n,listener:r,options:i}]=e;t.removeEventListener(n,r,i)}this.entries.clear()}}bind(e,t){let n=Array.isArray(e)?e:[e],r=Array.isArray(t)?t:[t],i=[];for(let e of n)for(let t of r){let{type:n,listener:r,options:a}=t,o=[e,t];e.addEventListener(n,r,a),this.entries.add(o),i.push(o)}let a=this.entries;return function(){for(let e of i){let[t,{type:n,listener:r,options:i}]=e;t.removeEventListener(n,r,i),a.delete(e)}}}};function Fq(e){let t=e?.ownerDocument.defaultView;if(t&&t.self!==t.parent)return t.frameElement}function Iq(e){let t=new Set,n=Fq(e);for(;n;)t.add(n),n=Fq(n);return t}function Lq(e,t){let n=setTimeout(e,t);return()=>clearTimeout(n)}function Rq(e,t){let n=()=>performance.now(),r,i;return function(...a){let o=this;i?(r?.(),r=Lq(()=>{e.apply(o,a),i=n()},t-(n()-i))):(e.apply(o,a),i=n())}}function zq(e,t){return e===t?!0:!e||!t?!1:e.top==t.top&&e.left==t.left&&e.right==t.right&&e.bottom==t.bottom}function Bq(e,t=e.getBoundingClientRect()){let{width:n,height:r}=vq(e,t);return n>0&&r>0}var Vq=bq?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},Hq,Uq=class extends Vq{constructor(e){super(t=>{if(!tq(this,Hq)){rq(this,Hq,!0);return}e(t,this)}),nq(this,Hq,!1)}};Hq=new WeakMap;var Wq=Array.from({length:100},(e,t)=>t/100),Gq=75,Kq,qq,Jq,Yq,Xq,Zq,Qq,$q,eJ,tJ,nJ,rJ=class{constructor(e,t,n={debug:!1,skipInitial:!1}){this.element=e,this.callback=t,nq(this,eJ),this.disconnect=()=>{var e,t,n;rq(this,Qq,!0),(e=tq(this,Jq))==null||e.disconnect(),(t=tq(this,Yq))==null||t.disconnect(),tq(this,Xq).disconnect(),(n=tq(this,Zq))==null||n.remove()},nq(this,Kq,!0),nq(this,qq),nq(this,Jq),nq(this,Yq),nq(this,Xq),nq(this,Zq),nq(this,Qq,!1),nq(this,$q,Rq(()=>{var e;let{element:t}=this;if((e=tq(this,Yq))==null||e.disconnect(),tq(this,Qq)||!tq(this,Kq)||!t.isConnected)return;let n=t.ownerDocument??document,{innerHeight:r,innerWidth:i}=n.defaultView??window,a=t.getBoundingClientRect(),{top:o,left:s,bottom:c,right:l}=vq(t,a),u=-Math.floor(o),d=-Math.floor(s),f=`${u}px ${-Math.floor(i-l)}px ${-Math.floor(r-c)}px ${d}px`;this.boundingClientRect=a,rq(this,Yq,new IntersectionObserver(e=>{let[n]=e,{intersectionRect:r}=n;(n.intersectionRatio===1?xW.intersectionRatio(r,vq(t)):n.intersectionRatio)!==1&&tq(this,$q).call(this)},{threshold:Wq,rootMargin:f,root:n})),tq(this,Yq).observe(t),iq(this,eJ,tJ).call(this)},Gq)),this.boundingClientRect=e.getBoundingClientRect(),rq(this,Kq,Bq(e,this.boundingClientRect));let r=!0;this.callback=e=>{r&&(r=!1,n.skipInitial)||t(e)};let i=e.ownerDocument;n?.debug&&(rq(this,Zq,document.createElement(`div`)),tq(this,Zq).style.background=`rgba(0,0,0,0.15)`,tq(this,Zq).style.position=`fixed`,tq(this,Zq).style.pointerEvents=`none`,i.body.appendChild(tq(this,Zq))),rq(this,Xq,new IntersectionObserver(t=>{var n,r;let{boundingClientRect:i,isIntersecting:a}=t[t.length-1],{width:o,height:s}=i,c=tq(this,Kq);rq(this,Kq,a),!(!o&&!s)&&(c&&!a?((n=tq(this,Yq))==null||n.disconnect(),this.callback(null),(r=tq(this,Jq))==null||r.disconnect(),rq(this,Jq,void 0),tq(this,Zq)&&(tq(this,Zq).style.visibility=`hidden`)):tq(this,$q).call(this),a&&!tq(this,Jq)&&(rq(this,Jq,new Uq(tq(this,$q))),tq(this,Jq).observe(e)))},{threshold:Wq,root:i})),tq(this,Kq)&&!n.skipInitial&&this.callback(this.boundingClientRect),tq(this,Xq).observe(e)}};Kq=new WeakMap,qq=new WeakMap,Jq=new WeakMap,Yq=new WeakMap,Xq=new WeakMap,Zq=new WeakMap,Qq=new WeakMap,$q=new WeakMap,eJ=new WeakSet,tJ=function(){tq(this,Qq)||(iq(this,eJ,nJ).call(this),!zq(this.boundingClientRect,tq(this,qq))&&(this.callback(this.boundingClientRect),rq(this,qq,this.boundingClientRect)))},nJ=function(){if(tq(this,Zq)){let{top:e,left:t,width:n,height:r}=vq(this.element);tq(this,Zq).style.overflow=`hidden`,tq(this,Zq).style.visibility=`visible`,tq(this,Zq).style.top=`${Math.floor(e)}px`,tq(this,Zq).style.left=`${Math.floor(t)}px`,tq(this,Zq).style.width=`${Math.floor(n)}px`,tq(this,Zq).style.height=`${Math.floor(r)}px`}};var iJ=new WeakMap,aJ=new WeakMap;function oJ(e,t){let n=iJ.get(e);return n||={disconnect:new rJ(e,t=>{let n=iJ.get(e);n&&n.callbacks.forEach(e=>e(t))},{skipInitial:!0}).disconnect,callbacks:new Set},n.callbacks.add(t),iJ.set(e,n),()=>{n.callbacks.delete(t),n.callbacks.size===0&&(iJ.delete(e),n.disconnect())}}function sJ(e,t){let n=new Set;for(let r of e){let e=oJ(r,t);n.add(e)}return()=>n.forEach(e=>e())}function cJ(e,t){let n=e.ownerDocument;if(!aJ.has(n)){let e=new AbortController,t=new Set;document.addEventListener(`scroll`,e=>t.forEach(t=>t(e)),{capture:!0,passive:!0,signal:e.signal}),aJ.set(n,{disconnect:()=>e.abort(),listeners:t})}let{listeners:r,disconnect:i}=aJ.get(n)??{};return!r||!i?()=>{}:(r.add(t),()=>{r.delete(t),r.size===0&&(i(),aJ.delete(n))})}var lJ,uJ,dJ,fJ,pJ=class{constructor(e,t,n){this.callback=t,nq(this,lJ),nq(this,uJ,!1),nq(this,dJ),nq(this,fJ,Rq(e=>{if(!tq(this,uJ)&&e.target&&`contains`in e.target&&typeof e.target.contains==`function`){for(let t of tq(this,dJ))if(e.target.contains(t)){this.callback(tq(this,lJ).boundingClientRect);break}}},Gq));let r=Iq(e),i=sJ(r,t),a=cJ(e,tq(this,fJ));rq(this,dJ,r),rq(this,lJ,new rJ(e,t,n)),this.disconnect=()=>{tq(this,uJ)||(rq(this,uJ,!0),i(),a(),tq(this,lJ).disconnect())}}};lJ=new WeakMap,uJ=new WeakMap,dJ=new WeakMap,fJ=new WeakMap;function mJ(e){return`showPopover`in e&&`hidePopover`in e&&typeof e.showPopover==`function`&&typeof e.hidePopover==`function`}function hJ(e){try{mJ(e)&&e.isConnected&&e.hasAttribute(`popover`)&&!e.matches(`:popover-open`)&&e.showPopover()}catch{}}function gJ(e){return!bq||!e?!1:e===mq(e).scrollingElement}function _J(e){let t=uq(e),n=gJ(e)?hq(e):sq(e),r=t.visualViewport,i=gJ(e)?{height:r?.height??t.innerHeight,width:r?.width??t.innerWidth}:{height:e.clientHeight,width:e.clientWidth},a={current:{x:e.scrollLeft,y:e.scrollTop},max:{x:e.scrollWidth-i.width,y:e.scrollHeight-i.height}};return{rect:n,position:a,isTop:a.current.y<=0,isLeft:a.current.x<=0,isBottom:a.current.y>=a.max.y,isRight:a.current.x>=a.max.x}}function vJ(e,t){let{isTop:n,isBottom:r,isLeft:i,isRight:a,position:o}=_J(e),{x:s,y:c}=t??{x:0,y:0},l=!n&&o.current.y+c>0,u=!r&&o.current.y+c<o.max.y,d=!i&&o.current.x+s>0,f=!a&&o.current.x+s<o.max.x;return{top:l,bottom:u,left:d,right:f,x:d||f,y:l||u}}var yJ=class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{let{tasks:e,resolvers:t}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(let t of e)t();for(let e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(e=>this.resolvers.add(e))}},bJ=new yJ(e=>{typeof requestAnimationFrame==`function`?requestAnimationFrame(e):e()}),xJ=new yJ(e=>setTimeout(e,50)),SJ=new Map,CJ=SJ.clear.bind(SJ);function wJ(e,t=!1){if(!t)return TJ(e);let n=SJ.get(e);return n||(n=TJ(e),SJ.set(e,n),xJ.schedule(CJ),n)}function TJ(e){return uq(e).getComputedStyle(e)}function EJ(e,t=wJ(e,!0)){return t.position===`fixed`||t.position===`sticky`}function DJ(e,t=wJ(e,!0)){let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`?n.test(r):!1})}var OJ={excludeElement:!0,escapeShadowDOM:!0};function kJ(e,t=OJ){let{limit:n,excludeElement:r,escapeShadowDOM:i}=t,a=new Set;function o(t){if(n!=null&&a.size>=n||!t)return a;if(dq(t)&&t.scrollingElement!=null&&!a.has(t.scrollingElement))return a.add(t.scrollingElement),a;if(i&&wq(t))return o(t.host);if(!fq(t))return pq(t)?o(t.parentElement):a;if(a.has(t))return a;let s=wJ(t,!0);if(r&&t===e||DJ(t,s)&&a.add(t),EJ(t,s)){let{scrollingElement:e}=t.ownerDocument;return e&&a.add(e),a}return o(t.parentNode)}return e?o(e):a}function AJ(e,t=window.frameElement){let n={x:0,y:0,scaleX:1,scaleY:1};if(!e)return n;let r=Fq(e);for(;r;){if(r===t)return n;let e=sq(r),{x:i,y:a}=jJ(r,e);n.x+=e.left,n.y+=e.top,n.scaleX*=i,n.scaleY*=a,r=Fq(r)}return n}function jJ(e,t=sq(e)){let n=Math.round(t.width),r=Math.round(t.height);if(fq(e))return{x:n/e.offsetWidth,y:r/e.offsetHeight};let i=wJ(e,!0);return{x:(parseFloat(i.width)||n)/n,y:(parseFloat(i.height)||r)/r}}function MJ(e){if(e===`none`)return null;let t=e.split(` `),n=parseFloat(t[0]),r=parseFloat(t[1]);return isNaN(n)&&isNaN(r)?null:{x:isNaN(n)?r:n,y:isNaN(r)?n:r}}function NJ(e){if(e===`none`)return null;let[t,n,r=`0`]=e.split(` `),i={x:parseFloat(t),y:parseFloat(n),z:parseInt(r,10)};return isNaN(i.x)&&isNaN(i.y)?null:{x:isNaN(i.x)?0:i.x,y:isNaN(i.y)?0:i.y,z:isNaN(i.z)?0:i.z}}function PJ(e){let{scale:t,transform:n,translate:r}=e,i=MJ(t),a=NJ(r),o=FJ(n);if(!o&&!i&&!a)return null;let s={x:i?.x??1,y:i?.y??1},c={x:a?.x??0,y:a?.y??0},l={x:o?.x??0,y:o?.y??0,scaleX:o?.scaleX??1,scaleY:o?.scaleY??1};return{x:c.x+l.x,y:c.y+l.y,z:a?.z??0,scaleX:s.x*l.scaleX,scaleY:s.y*l.scaleY}}function FJ(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}var IJ=(e=>(e[e.Idle=0]=`Idle`,e[e.Forward=1]=`Forward`,e[e.Reverse=-1]=`Reverse`,e))(IJ||{}),LJ={x:.2,y:.2},RJ={x:10,y:10};function zJ(e,t,n,r=25,i=LJ,a=RJ){let{x:o,y:s}=t,{rect:c,isTop:l,isBottom:u,isLeft:d,isRight:f}=_J(e),p=AJ(e),m=PJ(wJ(e,!0)),h=m===null?!1:m?.scaleX<0,g=m===null?!1:m?.scaleY<0,_=new xW(c.left*p.scaleX+p.x,c.top*p.scaleY+p.y,c.width*p.scaleX,c.height*p.scaleY),v={x:0,y:0},y={x:0,y:0},b={height:_.height*i.y,width:_.width*i.x};return b.height>0&&(!l||g&&!u)&&s<=_.top+b.height&&n?.y!==1&&o>=_.left-a.x&&o<=_.right+a.x?(v.y=g?1:-1,y.y=r*Math.abs((_.top+b.height-s)/b.height)):b.height>0&&(!u||g&&!l)&&s>=_.bottom-b.height&&n?.y!==-1&&o>=_.left-a.x&&o<=_.right+a.x&&(v.y=g?-1:1,y.y=r*Math.abs((_.bottom-b.height-s)/b.height)),b.width>0&&(!f||h&&!d)&&o>=_.right-b.width&&n?.x!==-1&&s>=_.top-a.y&&s<=_.bottom+a.y?(v.x=h?-1:1,y.x=r*Math.abs((_.right-b.width-o)/b.width)):b.width>0&&(!d||h&&!f)&&o<=_.left+b.width&&n?.x!==1&&s>=_.top-a.y&&s<=_.bottom+a.y&&(v.x=h?1:-1,y.x=r*Math.abs((_.left+b.width-o)/b.width)),{direction:v,speed:y}}function BJ(e,{block:t=`nearest`,inline:n=`nearest`}={}){if(!fq(e))return;let r=kJ(e),i=[];for(let a of r){if(!fq(a))continue;let{top:r,left:o}=HJ(e,a),s=r,c=o;for(let e of i)s-=e.scrollTop,c-=e.scrollLeft;if(t!==`none`){let n=s<a.scrollTop;n!==s+e.offsetHeight>a.scrollTop+a.clientHeight&&(t===`center`?a.scrollTop=s-a.clientHeight/2+e.offsetHeight/2:n?a.scrollTop=s:a.scrollTop=s+e.offsetHeight-a.clientHeight)}if(n!==`none`){let t=c<a.scrollLeft;t!==c+e.offsetWidth>a.scrollLeft+a.clientWidth&&(n===`center`?a.scrollLeft=c-a.clientWidth/2+e.offsetWidth/2:t?a.scrollLeft=c:a.scrollLeft=c+e.offsetWidth-a.clientWidth)}i.push(a)}}function VJ(e){let t=0,n=0,r=e;for(;r;){t+=r.offsetTop,n+=r.offsetLeft;let e=r.offsetParent;if(!fq(e))break;t+=e.clientTop,n+=e.clientLeft,r=e}return{top:t,left:n}}function HJ(e,t){let n=VJ(e),r=VJ(t);return{top:n.top-r.top-t.clientTop,left:n.left-r.left-t.clientLeft}}function UJ(e,t,n){let{scaleX:r,scaleY:i,x:a,y:o}=t,s=e.left+a+(1-r)*parseFloat(n),c=e.top+o+(1-i)*parseFloat(n.slice(n.indexOf(` `)+1)),l=r?e.width*r:e.width,u=i?e.height*i:e.height;return{width:l,height:u,top:c,right:s+l,bottom:c+u,left:s}}function WJ(e,t,n){let{scaleX:r,scaleY:i,x:a,y:o}=t,s=e.left-a-(1-r)*parseFloat(n),c=e.top-o-(1-i)*parseFloat(n.slice(n.indexOf(` `)+1)),l=r?e.width/r:e.width,u=i?e.height/i:e.height;return{width:l,height:u,top:c,right:s+l,bottom:c+u,left:s}}function GJ({element:e,keyframes:t,options:n}){return e.animate(t,n).finished}var KJ=new yJ(e=>setTimeout(e,0)),qJ=new Map,JJ=qJ.clear.bind(qJ);function YJ(e){let t=e.ownerDocument,n=qJ.get(t);if(n)return n;n=t.getAnimations(),qJ.set(t,n),KJ.schedule(JJ);let r=n.filter(t=>aq(t.effect)&&t.effect.target===e);return qJ.set(e,r),n}function XJ(e,t){let n=YJ(e).filter(e=>{if(aq(e.effect)){let{target:n}=e.effect;if((n&&t.isValidTarget?.call(t,n))??!0)return e.effect.getKeyframes().some(e=>{for(let n of t.properties)if(e[n])return!0})}}).map(e=>{let{effect:t,currentTime:n}=e,r=t?.getComputedTiming().duration;if(!(e.pending||e.playState===`finished`)&&typeof r==`number`&&typeof n==`number`&&n<r)return e.currentTime=r,()=>{e.currentTime=n}});if(n.length>0)return()=>n.forEach(e=>e?.())}var ZJ=class extends xW{constructor(e,t={}){let{frameTransform:n=AJ(e),ignoreTransforms:r,getBoundingClientRect:i=sq}=t,a=XJ(e,{properties:[`transform`,`translate`,`scale`,`width`,`height`],isValidTarget:t=>(t!==e||Sq())&&t.contains(e)}),o=i(e),{top:s,left:c,width:l,height:u}=o,d,f=wJ(e),p=PJ(f),m={x:p?.scaleX??1,y:p?.scaleY??1},h=QJ(e,f);a?.(),p&&(d=WJ(o,p,f.transformOrigin),(r||h)&&(s=d.top,c=d.left,l=d.width,u=d.height));let g={width:d?.width??l,height:d?.height??u};if(h&&!r&&d){let e=UJ(d,h,f.transformOrigin);s=e.top,c=e.left,l=e.width,u=e.height,m.x=h.scaleX,m.y=h.scaleY}n&&(r||(c*=n.scaleX,l*=n.scaleX,s*=n.scaleY,u*=n.scaleY),c+=n.x,s+=n.y),super(c,s,l,u),this.scale=m,this.intrinsicWidth=g.width,this.intrinsicHeight=g.height}};function QJ(e,t){let n=e.getAnimations();if(!n.length)return null;let r,i,a,o=!1;for(let e of n){if(e.playState!==`running`)continue;let t=aq(e.effect)?e.effect.getKeyframes():[],n=t[t.length-1];if(!n)continue;let{transform:s,translate:c,scale:l}=n;typeof s==`string`&&s&&(r=s,o=!0),typeof c==`string`&&c&&(i=c,o=!0),typeof l==`string`&&l&&(a=l,o=!0)}return o?PJ({transform:r??t.transform,translate:i??t.translate,scale:a??t.scale}):null}function $J(e){return`style`in e&&typeof e.style==`object`&&e.style!==null&&`setProperty`in e.style&&`removeProperty`in e.style&&typeof e.style.setProperty==`function`&&typeof e.style.removeProperty==`function`}var eY=class{constructor(e){this.element=e,this.initial=new Map}set(e,t=``){let{element:n}=this;if($J(n))for(let[r,i]of Object.entries(e)){let e=`${t}${r}`;this.initial.has(e)||this.initial.set(e,n.style.getPropertyValue(e)),n.style.setProperty(e,typeof i==`string`?i:`${i}px`)}}remove(e,t=``){let{element:n}=this;if($J(n))for(let r of e){let e=`${t}${r}`;n.style.removeProperty(e)}}reset(){let{element:e}=this;if($J(e)){for(let[t,n]of this.initial)e.style.setProperty(t,n);e.getAttribute(`style`)===``&&e.removeAttribute(`style`)}}};function tY(e){return e?e instanceof uq(e).Element||lq(e)&&e.nodeType===Node.ELEMENT_NODE:!1}function nY(e){if(!e)return!1;let{KeyboardEvent:t}=uq(e.target);return e instanceof t}function rY(e){if(!e)return!1;let{PointerEvent:t}=uq(e.target);return e instanceof t}function iY(e){if(!tY(e))return!1;let{tagName:t}=e;return t===`INPUT`||t===`TEXTAREA`||aY(e)}function aY(e){return e.hasAttribute(`contenteditable`)&&e.getAttribute(`contenteditable`)!==`false`}var oY={};function sY(e){let t=oY[e]==null?0:oY[e]+1;return oY[e]=t,`${e}-${t}`}var cY=({dragOperation:e,droppable:t})=>{let n=e.position.current;if(!n)return null;let{id:r}=t;return t.shape&&t.shape.containsPoint(n)?{id:r,value:1/bW.distance(t.shape.center,n),type:fK.PointerIntersection,priority:dK.High}:null},lY=({dragOperation:e,droppable:t})=>{let{shape:n}=e;if(!t.shape||!n?.current)return null;let r=n.current.intersectionArea(t.shape);if(r){let{position:i}=e,a=bW.distance(t.shape.center,i.current),o=r/(n.current.area+t.shape.area-r)/a;return{id:t.id,value:o,type:fK.ShapeIntersection,priority:dK.Normal}}return null},uY=e=>cY(e)??lY(e),dY=Object.create,fY=Object.defineProperty,pY=Object.defineProperties,mY=Object.getOwnPropertyDescriptor,hY=Object.getOwnPropertyDescriptors,gY=Object.getOwnPropertySymbols,_Y=Object.prototype.hasOwnProperty,vY=Object.prototype.propertyIsEnumerable,yY=(e,t)=>(t=Symbol[e])?t:Symbol.for(`Symbol.`+e),bY=e=>{throw TypeError(e)},xY=(e,t,n)=>t in e?fY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,SY=(e,t)=>{for(var n in t||={})_Y.call(t,n)&&xY(e,n,t[n]);if(gY)for(var n of gY(t))vY.call(t,n)&&xY(e,n,t[n]);return e},CY=(e,t)=>pY(e,hY(t)),wY=(e,t)=>fY(e,`name`,{value:t,configurable:!0}),TY=(e,t)=>{var n={};for(var r in e)_Y.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&gY)for(var r of gY(e))t.indexOf(r)<0&&vY.call(e,r)&&(n[r]=e[r]);return n},EY=e=>[,,,dY(e?.[yY(`metadata`)]??null)],DY=[`class`,`method`,`getter`,`setter`,`accessor`,`field`,`value`,`get`,`set`],OY=e=>e!==void 0&&typeof e!=`function`?bY(`Function expected`):e,kY=(e,t,n,r,i)=>({kind:DY[e],name:t,metadata:r,addInitializer:e=>n._?bY(`Already initialized`):i.push(OY(e||null))}),AY=(e,t)=>xY(t,yY(`metadata`),e[3]),jY=(e,t,n,r)=>{for(var i=0,a=e[t>>1],o=a&&a.length;i<o;i++)t&1?a[i].call(n):r=a[i].call(n,r);return r},MY=(e,t,n,r,i,a)=>{var o,s,c,l,u,d=t&7,f=!!(t&8),p=!!(t&16),m=d>3?e.length+1:d?f?1:2:0,h=DY[d+5],g=d>3&&(e[m-1]=[]),_=e[m]||(e[m]=[]),v=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&mY(d<4?i:{get[n](){return FY(this,a)},set[n](e){return LY(this,a,e)}},n));d?p&&d<4&&wY(a,(d>2?`set `:d>1?`get `:``)+n):wY(i,n);for(var y=r.length-1;y>=0;y--)l=kY(d,n,c={},e[3],_),d&&(l.static=f,l.private=p,u=l.access={has:p?e=>PY(i,e):e=>n in e},d^3&&(u.get=p?e=>(d^1?FY:RY)(e,i,d^4?a:v.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>LY(e,i,t,d^4?a:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?p?a:v[h]:d>4?void 0:{get:v.get,set:v.set}:i,l),c._=1,d^4||s===void 0?OY(s)&&(d>4?g.unshift(s):d?p?a=s:v[h]=s:i=s):typeof s!=`object`||!s?bY(`Object expected`):(OY(o=s.get)&&(v.get=o),OY(o=s.set)&&(v.set=o),OY(o=s.init)&&g.unshift(o));return d||AY(e,i),v&&fY(i,n,v),p?d^4?a:v:i},NY=(e,t,n)=>t.has(e)||bY(`Cannot `+n),PY=(e,t)=>Object(t)===t?e.has(t):bY(`Cannot use the "in" operator on this value`),FY=(e,t,n)=>(NY(e,t,`read from private field`),n?n.call(e):t.get(e)),IY=(e,t,n)=>t.has(e)?bY(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),LY=(e,t,n,r)=>(NY(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),RY=(e,t,n)=>(NY(e,t,`access private method`),n),zY={role:`button`,roleDescription:`draggable`},BY=`dnd-kit-description`,VY=`dnd-kit-announcement`,HY={draggable:`To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item in a given direction. Press space again to drop the item in its new position, or press escape to cancel.`},UY={dragstart({operation:{source:e}}){if(e)return`Picked up draggable item ${e.id}.`},dragover({operation:{source:e,target:t}}){if(!(!e||e.id===t?.id))return t?`Draggable item ${e.id} was moved over droppable target ${t.id}.`:`Draggable item ${e.id} is no longer over a droppable target.`},dragend({operation:{source:e,target:t},canceled:n}){if(e)return n?`Dragging was cancelled. Draggable item ${e.id} was dropped.`:t?`Draggable item ${e.id} was dropped over droppable target ${t.id}`:`Draggable item ${e.id} was dropped.`}};function WY(e){let t=e.tagName.toLowerCase();return[`input`,`select`,`textarea`,`a`,`button`].includes(t)}function GY(e,t){let n=document.createElement(`div`);return n.id=e,n.style.setProperty(`display`,`none`),n.textContent=t,n}function KY(e){let t=document.createElement(`div`);return t.id=e,t.setAttribute(`role`,`status`),t.setAttribute(`aria-live`,`polite`),t.setAttribute(`aria-atomic`,`true`),t.style.setProperty(`position`,`fixed`),t.style.setProperty(`width`,`1px`),t.style.setProperty(`height`,`1px`),t.style.setProperty(`margin`,`-1px`),t.style.setProperty(`border`,`0`),t.style.setProperty(`padding`,`0`),t.style.setProperty(`overflow`,`hidden`),t.style.setProperty(`clip`,`rect(0 0 0 0)`),t.style.setProperty(`clip-path`,`inset(100%)`),t.style.setProperty(`white-space`,`nowrap`),t}var qY=[`dragover`,`dragmove`],JY=class extends pG{constructor(e,t){super(e);let{id:n,idPrefix:{description:r=BY,announcement:i=VY}={},announcements:a=UY,screenReaderInstructions:o=HY,debounce:s=500}=t??{},c=n?`${r}-${n}`:sY(r),l=n?`${i}-${n}`:sY(i),u,d,f,p,m=(e=p)=>{!f||!e||f?.nodeValue!==e&&(f.nodeValue=e)},h=()=>bJ.schedule(m),g=YY(h,s),_=Object.entries(a).map(([e,t])=>this.manager.monitor.addEventListener(e,(n,r)=>{let i=f;if(!i)return;let a=t?.(n,r);a&&i.nodeValue!==a&&(p=a,qY.includes(e)?g():(h(),g.cancel()))})),v=()=>{let e=[];u?.isConnected||(u=GY(c,o.draggable),e.push(u)),d?.isConnected||(d=KY(l),f=document.createTextNode(``),d.appendChild(f),e.push(d)),e.length>0&&document.body.append(...e)},y=new Set;function b(){for(let e of y)e()}this.registerEffect(()=>{y.clear();for(let e of this.manager.registry.draggables.value){let t=e.handle??e.element;if(t){(!u||!d)&&y.add(v),(!WY(t)||Sq())&&!t.hasAttribute(`tabindex`)&&y.add(()=>t.setAttribute(`tabindex`,`0`)),!t.hasAttribute(`role`)&&t.tagName.toLowerCase()!==`button`&&y.add(()=>t.setAttribute(`role`,zY.role)),t.hasAttribute(`aria-roledescription`)||y.add(()=>t.setAttribute(`aria-roledescription`,zY.roleDescription)),t.hasAttribute(`aria-describedby`)||y.add(()=>t.setAttribute(`aria-describedby`,c));for(let n of[`aria-pressed`,`aria-grabbed`]){let r=String(e.isDragging);t.getAttribute(n)!==r&&y.add(()=>t.setAttribute(n,r))}let n=String(e.disabled);t.getAttribute(`aria-disabled`)!==n&&y.add(()=>t.setAttribute(`aria-disabled`,n))}}y.size>0&&bJ.schedule(b)}),this.destroy=()=>{super.destroy(),u?.remove(),d?.remove(),_.forEach(e=>e())}}};function YY(e,t){let n,r=()=>{clearTimeout(n),n=setTimeout(e,t)};return r.cancel=()=>clearTimeout(n),r}var XY=new Map,ZY,QY,$Y,eX,tX,nX,rX,iX,aX,oX,sX,cX,lX,uX=class extends (tX=mG,eX=[CU],$Y=[wU],QY=[wU],ZY=[wU],tX){constructor(e,t){super(e,t),jY(rX,5,this),IY(this,aX),IY(this,nX,new Set),IY(this,iX,jY(rX,8,this,new Set)),jY(rX,11,this),this.registerEffect(RY(this,aX,oX))}register(e){return FY(this,nX).add(e),()=>{FY(this,nX).delete(e)}}addRoot(e){return EH(()=>{let t=new Set(this.additionalRoots);t.add(e),this.additionalRoots=t}),()=>{EH(()=>{let t=new Set(this.additionalRoots);t.delete(e),this.additionalRoots=t})}}get sourceRoot(){let{source:e}=this.manager.dragOperation;return Tq(e?.element??null)}get targetRoot(){let{target:e}=this.manager.dragOperation;return Tq(e?.element??null)}get roots(){let{status:e}=this.manager.dragOperation;if(e.initializing||e.initialized){let e=[this.sourceRoot,this.targetRoot].filter(e=>e!=null);return new Set([...e,...this.additionalRoots])}return new Set}};rX=EY(tX),nX=new WeakMap,iX=new WeakMap,aX=new WeakSet,oX=function(){let{roots:e}=this,t=[];for(let n of e)for(let e of FY(this,nX))t.push(RY(this,aX,sX).call(this,n,e));return()=>{for(let e of t)e()}},sX=function(e,t){let n=XY.get(e);n||(n=new Map,XY.set(e,n));let r=n.get(t);if(!r){let i=dq(e)?RY(this,aX,cX).call(this,e,n,t):RY(this,aX,lX).call(this,e,n,t);if(!i)return()=>{};r=i,n.set(t,r)}r.refCount++;let i=!1;return()=>{i||(i=!0,r.refCount--,r.refCount===0&&r.cleanup())}},cX=function(e,t,n){let r=e.createElement(`style`),{nonce:i}=this.options??{};i&&r.setAttribute(`nonce`,i),r.textContent=n,e.head.prepend(r);let a=new MutationObserver(t=>{for(let n of t)for(let t of Array.from(n.removedNodes))if(t===r){e.head.prepend(r);return}});return a.observe(e.head,{childList:!0}),{refCount:0,cleanup:()=>{a.disconnect(),r.remove(),t.delete(n),t.size===0&&XY.delete(e)}}},lX=function(e,t,n){!(`adoptedStyleSheets`in e&&Array.isArray(e.adoptedStyleSheets))&&process.env.NODE_ENV!==`production`&&console.error(`Cannot inject styles: This browser doesn't support adoptedStyleSheets`);let{CSSStyleSheet:r}=e.ownerDocument.defaultView??{};if(!r)return process.env.NODE_ENV!==`production`&&console.error(`Cannot inject styles: CSSStyleSheet constructor not available`),null;let i=new r;return i.replaceSync(n),e.adoptedStyleSheets.push(i),{refCount:0,cleanup:()=>{if(wq(e)&&e.host?.isConnected){let t=e.adoptedStyleSheets.indexOf(i);t!==-1&&e.adoptedStyleSheets.splice(t,1)}t.delete(n),t.size===0&&XY.delete(e)}}},MY(rX,4,`additionalRoots`,eX,uX,iX),MY(rX,2,`sourceRoot`,$Y,uX),MY(rX,2,`targetRoot`,QY,uX),MY(rX,2,`roots`,ZY,uX),AY(rX,uX),uX.configure=sG(uX);var dX=uX,fX=class extends pG{constructor(e,t){super(e,t),this.manager=e;let{cursor:n=`grabbing`}=t??{},r=e.registry.plugins.get(dX)?.register(`* { cursor: ${n} !important; }`);if(r){let e=this.destroy.bind(this);this.destroy=()=>{r(),e()}}}},pX=`data-dnd-`,mX=`${pX}dropping`,hX=`--dnd-`,gX=`${pX}dragging`,_X=`${pX}placeholder`,vX=[gX,_X,`popover`,`aria-pressed`,`aria-grabbing`],yX=[`view-transition-name`],bX=`
18
- :is(:root,:host) [${gX}] {
56
+ `)}var q6=class{constructor(){this.entries=new Set,this.clear=()=>{for(let e of this.entries){let[t,{type:n,listener:r,options:i}]=e;t.removeEventListener(n,r,i)}this.entries.clear()}}bind(e,t){let n=Array.isArray(e)?e:[e],r=Array.isArray(t)?t:[t],i=[];for(let e of n)for(let t of r){let{type:n,listener:r,options:a}=t,o=[e,t];e.addEventListener(n,r,a),this.entries.add(o),i.push(o)}let a=this.entries;return function(){for(let e of i){let[t,{type:n,listener:r,options:i}]=e;t.removeEventListener(n,r,i),a.delete(e)}}}};function J6(e){let t=e?.ownerDocument.defaultView;if(t&&t.self!==t.parent)return t.frameElement}function Gde(e){let t=new Set,n=J6(e);for(;n;)t.add(n),n=J6(n);return t}function Kde(e,t){let n=setTimeout(e,t);return()=>clearTimeout(n)}function Y6(e,t){let n=()=>performance.now(),r,i;return function(...a){let o=this;i?(r?.(),r=Kde(()=>{e.apply(o,a),i=n()},t-(n()-i))):(e.apply(o,a),i=n())}}function qde(e,t){return e===t?!0:!e||!t?!1:e.top==t.top&&e.left==t.left&&e.right==t.right&&e.bottom==t.bottom}function Jde(e,t=e.getBoundingClientRect()){let{width:n,height:r}=P6(e,t);return n>0&&r>0}var Yde=I6?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},X6,Xde=class extends Yde{constructor(e){super(t=>{if(!x6(this,X6)){C6(this,X6,!0);return}e(t,this)}),S6(this,X6,!1)}};X6=new WeakMap;var Z6=Array.from({length:100},(e,t)=>t/100),Q6=75,$6,e8,t8,n8,r8,i8,a8,o8,s8,c8,l8,u8=class{constructor(e,t,n={debug:!1,skipInitial:!1}){this.element=e,this.callback=t,S6(this,s8),this.disconnect=()=>{var e,t,n;C6(this,a8,!0),(e=x6(this,t8))==null||e.disconnect(),(t=x6(this,n8))==null||t.disconnect(),x6(this,r8).disconnect(),(n=x6(this,i8))==null||n.remove()},S6(this,$6,!0),S6(this,e8),S6(this,t8),S6(this,n8),S6(this,r8),S6(this,i8),S6(this,a8,!1),S6(this,o8,Y6(()=>{var e;let{element:t}=this;if((e=x6(this,n8))==null||e.disconnect(),x6(this,a8)||!x6(this,$6)||!t.isConnected)return;let n=t.ownerDocument??document,{innerHeight:r,innerWidth:i}=n.defaultView??window,a=t.getBoundingClientRect(),{top:o,left:s,bottom:c,right:l}=P6(t,a),u=-Math.floor(o),d=-Math.floor(s),f=`${u}px ${-Math.floor(i-l)}px ${-Math.floor(r-c)}px ${d}px`;this.boundingClientRect=a,C6(this,n8,new IntersectionObserver(e=>{let[n]=e,{intersectionRect:r}=n;(n.intersectionRatio===1?c4.intersectionRatio(r,P6(t)):n.intersectionRatio)!==1&&x6(this,o8).call(this)},{threshold:Z6,rootMargin:f,root:n})),x6(this,n8).observe(t),w6(this,s8,c8).call(this)},Q6)),this.boundingClientRect=e.getBoundingClientRect(),C6(this,$6,Jde(e,this.boundingClientRect));let r=!0;this.callback=e=>{r&&(r=!1,n.skipInitial)||t(e)};let i=e.ownerDocument;n?.debug&&(C6(this,i8,document.createElement(`div`)),x6(this,i8).style.background=`rgba(0,0,0,0.15)`,x6(this,i8).style.position=`fixed`,x6(this,i8).style.pointerEvents=`none`,i.body.appendChild(x6(this,i8))),C6(this,r8,new IntersectionObserver(t=>{var n,r;let{boundingClientRect:i,isIntersecting:a}=t[t.length-1],{width:o,height:s}=i,c=x6(this,$6);C6(this,$6,a),!(!o&&!s)&&(c&&!a?((n=x6(this,n8))==null||n.disconnect(),this.callback(null),(r=x6(this,t8))==null||r.disconnect(),C6(this,t8,void 0),x6(this,i8)&&(x6(this,i8).style.visibility=`hidden`)):x6(this,o8).call(this),a&&!x6(this,t8)&&(C6(this,t8,new Xde(x6(this,o8))),x6(this,t8).observe(e)))},{threshold:Z6,root:i})),x6(this,$6)&&!n.skipInitial&&this.callback(this.boundingClientRect),x6(this,r8).observe(e)}};$6=new WeakMap,e8=new WeakMap,t8=new WeakMap,n8=new WeakMap,r8=new WeakMap,i8=new WeakMap,a8=new WeakMap,o8=new WeakMap,s8=new WeakSet,c8=function(){x6(this,a8)||(w6(this,s8,l8).call(this),!qde(this.boundingClientRect,x6(this,e8))&&(this.callback(this.boundingClientRect),C6(this,e8,this.boundingClientRect)))},l8=function(){if(x6(this,i8)){let{top:e,left:t,width:n,height:r}=P6(this.element);x6(this,i8).style.overflow=`hidden`,x6(this,i8).style.visibility=`visible`,x6(this,i8).style.top=`${Math.floor(e)}px`,x6(this,i8).style.left=`${Math.floor(t)}px`,x6(this,i8).style.width=`${Math.floor(n)}px`,x6(this,i8).style.height=`${Math.floor(r)}px`}};var d8=new WeakMap,f8=new WeakMap;function Zde(e,t){let n=d8.get(e);return n||={disconnect:new u8(e,t=>{let n=d8.get(e);n&&n.callbacks.forEach(e=>e(t))},{skipInitial:!0}).disconnect,callbacks:new Set},n.callbacks.add(t),d8.set(e,n),()=>{n.callbacks.delete(t),n.callbacks.size===0&&(d8.delete(e),n.disconnect())}}function Qde(e,t){let n=new Set;for(let r of e){let e=Zde(r,t);n.add(e)}return()=>n.forEach(e=>e())}function $de(e,t){let n=e.ownerDocument;if(!f8.has(n)){let e=new AbortController,t=new Set;document.addEventListener(`scroll`,e=>t.forEach(t=>t(e)),{capture:!0,passive:!0,signal:e.signal}),f8.set(n,{disconnect:()=>e.abort(),listeners:t})}let{listeners:r,disconnect:i}=f8.get(n)??{};return!r||!i?()=>{}:(r.add(t),()=>{r.delete(t),r.size===0&&(i(),f8.delete(n))})}var p8,m8,h8,g8,efe=class{constructor(e,t,n){this.callback=t,S6(this,p8),S6(this,m8,!1),S6(this,h8),S6(this,g8,Y6(e=>{if(!x6(this,m8)&&e.target&&`contains`in e.target&&typeof e.target.contains==`function`){for(let t of x6(this,h8))if(e.target.contains(t)){this.callback(x6(this,p8).boundingClientRect);break}}},Q6));let r=Gde(e),i=Qde(r,t),a=$de(e,x6(this,g8));C6(this,h8,r),C6(this,p8,new u8(e,t,n)),this.disconnect=()=>{x6(this,m8)||(C6(this,m8,!0),i(),a(),x6(this,p8).disconnect())}}};p8=new WeakMap,m8=new WeakMap,h8=new WeakMap,g8=new WeakMap;function _8(e){return`showPopover`in e&&`hidePopover`in e&&typeof e.showPopover==`function`&&typeof e.hidePopover==`function`}function v8(e){try{_8(e)&&e.isConnected&&e.hasAttribute(`popover`)&&!e.matches(`:popover-open`)&&e.showPopover()}catch{}}function y8(e){return!I6||!e?!1:e===N6(e).scrollingElement}function b8(e){let t=k6(e),n=y8(e)?zde(e):E6(e),r=t.visualViewport,i=y8(e)?{height:r?.height??t.innerHeight,width:r?.width??t.innerWidth}:{height:e.clientHeight,width:e.clientWidth},a={current:{x:e.scrollLeft,y:e.scrollTop},max:{x:e.scrollWidth-i.width,y:e.scrollHeight-i.height}};return{rect:n,position:a,isTop:a.current.y<=0,isLeft:a.current.x<=0,isBottom:a.current.y>=a.max.y,isRight:a.current.x>=a.max.x}}function tfe(e,t){let{isTop:n,isBottom:r,isLeft:i,isRight:a,position:o}=b8(e),{x:s,y:c}=t??{x:0,y:0},l=!n&&o.current.y+c>0,u=!r&&o.current.y+c<o.max.y,d=!i&&o.current.x+s>0,f=!a&&o.current.x+s<o.max.x;return{top:l,bottom:u,left:d,right:f,x:d||f,y:l||u}}var x8=class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{let{tasks:e,resolvers:t}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(let t of e)t();for(let e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(e=>this.resolvers.add(e))}},S8=new x8(e=>{typeof requestAnimationFrame==`function`?requestAnimationFrame(e):e()}),nfe=new x8(e=>setTimeout(e,50)),C8=new Map,rfe=C8.clear.bind(C8);function w8(e,t=!1){if(!t)return T8(e);let n=C8.get(e);return n||(n=T8(e),C8.set(e,n),nfe.schedule(rfe),n)}function T8(e){return k6(e).getComputedStyle(e)}function ife(e,t=w8(e,!0)){return t.position===`fixed`||t.position===`sticky`}function afe(e,t=w8(e,!0)){let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`?n.test(r):!1})}var ofe={excludeElement:!0,escapeShadowDOM:!0};function E8(e,t=ofe){let{limit:n,excludeElement:r,escapeShadowDOM:i}=t,a=new Set;function o(t){if(n!=null&&a.size>=n||!t)return a;if(A6(t)&&t.scrollingElement!=null&&!a.has(t.scrollingElement))return a.add(t.scrollingElement),a;if(i&&B6(t))return o(t.host);if(!j6(t))return M6(t)?o(t.parentElement):a;if(a.has(t))return a;let s=w8(t,!0);if(r&&t===e||afe(t,s)&&a.add(t),ife(t,s)){let{scrollingElement:e}=t.ownerDocument;return e&&a.add(e),a}return o(t.parentNode)}return e?o(e):a}function D8(e,t=window.frameElement){let n={x:0,y:0,scaleX:1,scaleY:1};if(!e)return n;let r=J6(e);for(;r;){if(r===t)return n;let e=E6(r),{x:i,y:a}=sfe(r,e);n.x+=e.left,n.y+=e.top,n.scaleX*=i,n.scaleY*=a,r=J6(r)}return n}function sfe(e,t=E6(e)){let n=Math.round(t.width),r=Math.round(t.height);if(j6(e))return{x:n/e.offsetWidth,y:r/e.offsetHeight};let i=w8(e,!0);return{x:(parseFloat(i.width)||n)/n,y:(parseFloat(i.height)||r)/r}}function cfe(e){if(e===`none`)return null;let t=e.split(` `),n=parseFloat(t[0]),r=parseFloat(t[1]);return isNaN(n)&&isNaN(r)?null:{x:isNaN(n)?r:n,y:isNaN(r)?n:r}}function O8(e){if(e===`none`)return null;let[t,n,r=`0`]=e.split(` `),i={x:parseFloat(t),y:parseFloat(n),z:parseInt(r,10)};return isNaN(i.x)&&isNaN(i.y)?null:{x:isNaN(i.x)?0:i.x,y:isNaN(i.y)?0:i.y,z:isNaN(i.z)?0:i.z}}function k8(e){let{scale:t,transform:n,translate:r}=e,i=cfe(t),a=O8(r),o=lfe(n);if(!o&&!i&&!a)return null;let s={x:i?.x??1,y:i?.y??1},c={x:a?.x??0,y:a?.y??0},l={x:o?.x??0,y:o?.y??0,scaleX:o?.scaleX??1,scaleY:o?.scaleY??1};return{x:c.x+l.x,y:c.y+l.y,z:a?.z??0,scaleX:s.x*l.scaleX,scaleY:s.y*l.scaleY}}function lfe(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}var A8=(e=>(e[e.Idle=0]=`Idle`,e[e.Forward=1]=`Forward`,e[e.Reverse=-1]=`Reverse`,e))(A8||{}),ufe={x:.2,y:.2},dfe={x:10,y:10};function ffe(e,t,n,r=25,i=ufe,a=dfe){let{x:o,y:s}=t,{rect:c,isTop:l,isBottom:u,isLeft:d,isRight:f}=b8(e),p=D8(e),m=k8(w8(e,!0)),h=m===null?!1:m?.scaleX<0,g=m===null?!1:m?.scaleY<0,_=new c4(c.left*p.scaleX+p.x,c.top*p.scaleY+p.y,c.width*p.scaleX,c.height*p.scaleY),v={x:0,y:0},y={x:0,y:0},b={height:_.height*i.y,width:_.width*i.x};return b.height>0&&(!l||g&&!u)&&s<=_.top+b.height&&n?.y!==1&&o>=_.left-a.x&&o<=_.right+a.x?(v.y=g?1:-1,y.y=r*Math.abs((_.top+b.height-s)/b.height)):b.height>0&&(!u||g&&!l)&&s>=_.bottom-b.height&&n?.y!==-1&&o>=_.left-a.x&&o<=_.right+a.x&&(v.y=g?-1:1,y.y=r*Math.abs((_.bottom-b.height-s)/b.height)),b.width>0&&(!f||h&&!d)&&o>=_.right-b.width&&n?.x!==-1&&s>=_.top-a.y&&s<=_.bottom+a.y?(v.x=h?-1:1,y.x=r*Math.abs((_.right-b.width-o)/b.width)):b.width>0&&(!d||h&&!f)&&o<=_.left+b.width&&n?.x!==1&&s>=_.top-a.y&&s<=_.bottom+a.y&&(v.x=h?1:-1,y.x=r*Math.abs((_.left+b.width-o)/b.width)),{direction:v,speed:y}}function pfe(e,{block:t=`nearest`,inline:n=`nearest`}={}){if(!j6(e))return;let r=E8(e),i=[];for(let a of r){if(!j6(a))continue;let{top:r,left:o}=mfe(e,a),s=r,c=o;for(let e of i)s-=e.scrollTop,c-=e.scrollLeft;if(t!==`none`){let n=s<a.scrollTop;n!==s+e.offsetHeight>a.scrollTop+a.clientHeight&&(t===`center`?a.scrollTop=s-a.clientHeight/2+e.offsetHeight/2:n?a.scrollTop=s:a.scrollTop=s+e.offsetHeight-a.clientHeight)}if(n!==`none`){let t=c<a.scrollLeft;t!==c+e.offsetWidth>a.scrollLeft+a.clientWidth&&(n===`center`?a.scrollLeft=c-a.clientWidth/2+e.offsetWidth/2:t?a.scrollLeft=c:a.scrollLeft=c+e.offsetWidth-a.clientWidth)}i.push(a)}}function j8(e){let t=0,n=0,r=e;for(;r;){t+=r.offsetTop,n+=r.offsetLeft;let e=r.offsetParent;if(!j6(e))break;t+=e.clientTop,n+=e.clientLeft,r=e}return{top:t,left:n}}function mfe(e,t){let n=j8(e),r=j8(t);return{top:n.top-r.top-t.clientTop,left:n.left-r.left-t.clientLeft}}function hfe(e,t,n){let{scaleX:r,scaleY:i,x:a,y:o}=t,s=e.left+a+(1-r)*parseFloat(n),c=e.top+o+(1-i)*parseFloat(n.slice(n.indexOf(` `)+1)),l=r?e.width*r:e.width,u=i?e.height*i:e.height;return{width:l,height:u,top:c,right:s+l,bottom:c+u,left:s}}function gfe(e,t,n){let{scaleX:r,scaleY:i,x:a,y:o}=t,s=e.left-a-(1-r)*parseFloat(n),c=e.top-o-(1-i)*parseFloat(n.slice(n.indexOf(` `)+1)),l=r?e.width/r:e.width,u=i?e.height/i:e.height;return{width:l,height:u,top:c,right:s+l,bottom:c+u,left:s}}function _fe({element:e,keyframes:t,options:n}){return e.animate(t,n).finished}var vfe=new x8(e=>setTimeout(e,0)),M8=new Map,yfe=M8.clear.bind(M8);function bfe(e){let t=e.ownerDocument,n=M8.get(t);if(n)return n;n=t.getAnimations(),M8.set(t,n),vfe.schedule(yfe);let r=n.filter(t=>T6(t.effect)&&t.effect.target===e);return M8.set(e,r),n}function xfe(e,t){let n=bfe(e).filter(e=>{if(T6(e.effect)){let{target:n}=e.effect;if((n&&t.isValidTarget?.call(t,n))??!0)return e.effect.getKeyframes().some(e=>{for(let n of t.properties)if(e[n])return!0})}}).map(e=>{let{effect:t,currentTime:n}=e,r=t?.getComputedTiming().duration;if(!(e.pending||e.playState===`finished`)&&typeof r==`number`&&typeof n==`number`&&n<r)return e.currentTime=r,()=>{e.currentTime=n}});if(n.length>0)return()=>n.forEach(e=>e?.())}var N8=class extends c4{constructor(e,t={}){let{frameTransform:n=D8(e),ignoreTransforms:r,getBoundingClientRect:i=E6}=t,a=xfe(e,{properties:[`transform`,`translate`,`scale`,`width`,`height`],isValidTarget:t=>(t!==e||R6())&&t.contains(e)}),o=i(e),{top:s,left:c,width:l,height:u}=o,d,f=w8(e),p=k8(f),m={x:p?.scaleX??1,y:p?.scaleY??1},h=Sfe(e,f);a?.(),p&&(d=gfe(o,p,f.transformOrigin),(r||h)&&(s=d.top,c=d.left,l=d.width,u=d.height));let g={width:d?.width??l,height:d?.height??u};if(h&&!r&&d){let e=hfe(d,h,f.transformOrigin);s=e.top,c=e.left,l=e.width,u=e.height,m.x=h.scaleX,m.y=h.scaleY}n&&(r||(c*=n.scaleX,l*=n.scaleX,s*=n.scaleY,u*=n.scaleY),c+=n.x,s+=n.y),super(c,s,l,u),this.scale=m,this.intrinsicWidth=g.width,this.intrinsicHeight=g.height}};function Sfe(e,t){let n=e.getAnimations();if(!n.length)return null;let r,i,a,o=!1;for(let e of n){if(e.playState!==`running`)continue;let t=T6(e.effect)?e.effect.getKeyframes():[],n=t[t.length-1];if(!n)continue;let{transform:s,translate:c,scale:l}=n;typeof s==`string`&&s&&(r=s,o=!0),typeof c==`string`&&c&&(i=c,o=!0),typeof l==`string`&&l&&(a=l,o=!0)}return o?k8({transform:r??t.transform,translate:i??t.translate,scale:a??t.scale}):null}function P8(e){return`style`in e&&typeof e.style==`object`&&e.style!==null&&`setProperty`in e.style&&`removeProperty`in e.style&&typeof e.style.setProperty==`function`&&typeof e.style.removeProperty==`function`}var Cfe=class{constructor(e){this.element=e,this.initial=new Map}set(e,t=``){let{element:n}=this;if(P8(n))for(let[r,i]of Object.entries(e)){let e=`${t}${r}`;this.initial.has(e)||this.initial.set(e,n.style.getPropertyValue(e)),n.style.setProperty(e,typeof i==`string`?i:`${i}px`)}}remove(e,t=``){let{element:n}=this;if(P8(n))for(let r of e){let e=`${t}${r}`;n.style.removeProperty(e)}}reset(){let{element:e}=this;if(P8(e)){for(let[t,n]of this.initial)e.style.setProperty(t,n);e.getAttribute(`style`)===``&&e.removeAttribute(`style`)}}};function F8(e){return e?e instanceof k6(e).Element||O6(e)&&e.nodeType===Node.ELEMENT_NODE:!1}function I8(e){if(!e)return!1;let{KeyboardEvent:t}=k6(e.target);return e instanceof t}function wfe(e){if(!e)return!1;let{PointerEvent:t}=k6(e.target);return e instanceof t}function Tfe(e){if(!F8(e))return!1;let{tagName:t}=e;return t===`INPUT`||t===`TEXTAREA`||Efe(e)}function Efe(e){return e.hasAttribute(`contenteditable`)&&e.getAttribute(`contenteditable`)!==`false`}var L8={};function R8(e){let t=L8[e]==null?0:L8[e]+1;return L8[e]=t,`${e}-${t}`}var Dfe=({dragOperation:e,droppable:t})=>{let n=e.position.current;if(!n)return null;let{id:r}=t;return t.shape&&t.shape.containsPoint(n)?{id:r,value:1/s4.distance(t.shape.center,n),type:z3.PointerIntersection,priority:R3.High}:null},Ofe=({dragOperation:e,droppable:t})=>{let{shape:n}=e;if(!t.shape||!n?.current)return null;let r=n.current.intersectionArea(t.shape);if(r){let{position:i}=e,a=s4.distance(t.shape.center,i.current),o=r/(n.current.area+t.shape.area-r)/a;return{id:t.id,value:o,type:z3.ShapeIntersection,priority:R3.Normal}}return null},kfe=e=>Dfe(e)??Ofe(e),Afe=Object.create,z8=Object.defineProperty,jfe=Object.defineProperties,Mfe=Object.getOwnPropertyDescriptor,Nfe=Object.getOwnPropertyDescriptors,B8=Object.getOwnPropertySymbols,V8=Object.prototype.hasOwnProperty,H8=Object.prototype.propertyIsEnumerable,U8=(e,t)=>(t=Symbol[e])?t:Symbol.for(`Symbol.`+e),W8=e=>{throw TypeError(e)},G8=(e,t,n)=>t in e?z8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,K8=(e,t)=>{for(var n in t||={})V8.call(t,n)&&G8(e,n,t[n]);if(B8)for(var n of B8(t))H8.call(t,n)&&G8(e,n,t[n]);return e},q8=(e,t)=>jfe(e,Nfe(t)),J8=(e,t)=>z8(e,`name`,{value:t,configurable:!0}),Y8=(e,t)=>{var n={};for(var r in e)V8.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&B8)for(var r of B8(e))t.indexOf(r)<0&&H8.call(e,r)&&(n[r]=e[r]);return n},X8=e=>[,,,Afe(e?.[U8(`metadata`)]??null)],Z8=[`class`,`method`,`getter`,`setter`,`accessor`,`field`,`value`,`get`,`set`],Q8=e=>e!==void 0&&typeof e!=`function`?W8(`Function expected`):e,Pfe=(e,t,n,r,i)=>({kind:Z8[e],name:t,metadata:r,addInitializer:e=>n._?W8(`Already initialized`):i.push(Q8(e||null))}),$8=(e,t)=>G8(t,U8(`metadata`),e[3]),e5=(e,t,n,r)=>{for(var i=0,a=e[t>>1],o=a&&a.length;i<o;i++)t&1?a[i].call(n):r=a[i].call(n,r);return r},t5=(e,t,n,r,i,a)=>{var o,s,c,l,u,d=t&7,f=!!(t&8),p=!!(t&16),m=d>3?e.length+1:d?f?1:2:0,h=Z8[d+5],g=d>3&&(e[m-1]=[]),_=e[m]||(e[m]=[]),v=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&Mfe(d<4?i:{get[n](){return r5(this,a)},set[n](e){return a5(this,a,e)}},n));d?p&&d<4&&J8(a,(d>2?`set `:d>1?`get `:``)+n):J8(i,n);for(var y=r.length-1;y>=0;y--)l=Pfe(d,n,c={},e[3],_),d&&(l.static=f,l.private=p,u=l.access={has:p?e=>Ffe(i,e):e=>n in e},d^3&&(u.get=p?e=>(d^1?r5:o5)(e,i,d^4?a:v.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>a5(e,i,t,d^4?a:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?p?a:v[h]:d>4?void 0:{get:v.get,set:v.set}:i,l),c._=1,d^4||s===void 0?Q8(s)&&(d>4?g.unshift(s):d?p?a=s:v[h]=s:i=s):typeof s!=`object`||!s?W8(`Object expected`):(Q8(o=s.get)&&(v.get=o),Q8(o=s.set)&&(v.set=o),Q8(o=s.init)&&g.unshift(o));return d||$8(e,i),v&&z8(i,n,v),p?d^4?a:v:i},n5=(e,t,n)=>t.has(e)||W8(`Cannot `+n),Ffe=(e,t)=>Object(t)===t?e.has(t):W8(`Cannot use the "in" operator on this value`),r5=(e,t,n)=>(n5(e,t,`read from private field`),n?n.call(e):t.get(e)),i5=(e,t,n)=>t.has(e)?W8(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),a5=(e,t,n,r)=>(n5(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),o5=(e,t,n)=>(n5(e,t,`access private method`),n),s5={role:`button`,roleDescription:`draggable`},Ife=`dnd-kit-description`,Lfe=`dnd-kit-announcement`,Rfe={draggable:`To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item in a given direction. Press space again to drop the item in its new position, or press escape to cancel.`},zfe={dragstart({operation:{source:e}}){if(e)return`Picked up draggable item ${e.id}.`},dragover({operation:{source:e,target:t}}){if(!(!e||e.id===t?.id))return t?`Draggable item ${e.id} was moved over droppable target ${t.id}.`:`Draggable item ${e.id} is no longer over a droppable target.`},dragend({operation:{source:e,target:t},canceled:n}){if(e)return n?`Dragging was cancelled. Draggable item ${e.id} was dropped.`:t?`Draggable item ${e.id} was dropped over droppable target ${t.id}`:`Draggable item ${e.id} was dropped.`}};function Bfe(e){let t=e.tagName.toLowerCase();return[`input`,`select`,`textarea`,`a`,`button`].includes(t)}function Vfe(e,t){let n=document.createElement(`div`);return n.id=e,n.style.setProperty(`display`,`none`),n.textContent=t,n}function Hfe(e){let t=document.createElement(`div`);return t.id=e,t.setAttribute(`role`,`status`),t.setAttribute(`aria-live`,`polite`),t.setAttribute(`aria-atomic`,`true`),t.style.setProperty(`position`,`fixed`),t.style.setProperty(`width`,`1px`),t.style.setProperty(`height`,`1px`),t.style.setProperty(`margin`,`-1px`),t.style.setProperty(`border`,`0`),t.style.setProperty(`padding`,`0`),t.style.setProperty(`overflow`,`hidden`),t.style.setProperty(`clip`,`rect(0 0 0 0)`),t.style.setProperty(`clip-path`,`inset(100%)`),t.style.setProperty(`white-space`,`nowrap`),t}var Ufe=[`dragover`,`dragmove`],Wfe=class extends K4{constructor(e,t){super(e);let{id:n,idPrefix:{description:r=Ife,announcement:i=Lfe}={},announcements:a=zfe,screenReaderInstructions:o=Rfe,debounce:s=500}=t??{},c=n?`${r}-${n}`:R8(r),l=n?`${i}-${n}`:R8(i),u,d,f,p,m=(e=p)=>{!f||!e||f?.nodeValue!==e&&(f.nodeValue=e)},h=()=>S8.schedule(m),g=Gfe(h,s),_=Object.entries(a).map(([e,t])=>this.manager.monitor.addEventListener(e,(n,r)=>{let i=f;if(!i)return;let a=t?.(n,r);a&&i.nodeValue!==a&&(p=a,Ufe.includes(e)?g():(h(),g.cancel()))})),v=()=>{let e=[];u?.isConnected||(u=Vfe(c,o.draggable),e.push(u)),d?.isConnected||(d=Hfe(l),f=document.createTextNode(``),d.appendChild(f),e.push(d)),e.length>0&&document.body.append(...e)},y=new Set;function b(){for(let e of y)e()}this.registerEffect(()=>{y.clear();for(let e of this.manager.registry.draggables.value){let t=e.handle??e.element;if(t){(!u||!d)&&y.add(v),(!Bfe(t)||R6())&&!t.hasAttribute(`tabindex`)&&y.add(()=>t.setAttribute(`tabindex`,`0`)),!t.hasAttribute(`role`)&&t.tagName.toLowerCase()!==`button`&&y.add(()=>t.setAttribute(`role`,s5.role)),t.hasAttribute(`aria-roledescription`)||y.add(()=>t.setAttribute(`aria-roledescription`,s5.roleDescription)),t.hasAttribute(`aria-describedby`)||y.add(()=>t.setAttribute(`aria-describedby`,c));for(let n of[`aria-pressed`,`aria-grabbed`]){let r=String(e.isDragging);t.getAttribute(n)!==r&&y.add(()=>t.setAttribute(n,r))}let n=String(e.disabled);t.getAttribute(`aria-disabled`)!==n&&y.add(()=>t.setAttribute(`aria-disabled`,n))}}y.size>0&&S8.schedule(b)}),this.destroy=()=>{super.destroy(),u?.remove(),d?.remove(),_.forEach(e=>e())}}};function Gfe(e,t){let n,r=()=>{clearTimeout(n),n=setTimeout(e,t)};return r.cancel=()=>clearTimeout(n),r}var c5=new Map,l5,u5,d5,f5,p5,m5,h5,g5,_5,v5,y5,b5,x5,S5=class extends (p5=q4,f5=[S2],d5=[C2],u5=[C2],l5=[C2],p5){constructor(e,t){super(e,t),e5(h5,5,this),i5(this,_5),i5(this,m5,new Set),i5(this,g5,e5(h5,8,this,new Set)),e5(h5,11,this),this.registerEffect(o5(this,_5,v5))}register(e){return r5(this,m5).add(e),()=>{r5(this,m5).delete(e)}}addRoot(e){return z0(()=>{let t=new Set(this.additionalRoots);t.add(e),this.additionalRoots=t}),()=>{z0(()=>{let t=new Set(this.additionalRoots);t.delete(e),this.additionalRoots=t})}}get sourceRoot(){let{source:e}=this.manager.dragOperation;return V6(e?.element??null)}get targetRoot(){let{target:e}=this.manager.dragOperation;return V6(e?.element??null)}get roots(){let{status:e}=this.manager.dragOperation;if(e.initializing||e.initialized){let e=[this.sourceRoot,this.targetRoot].filter(e=>e!=null);return new Set([...e,...this.additionalRoots])}return new Set}};h5=X8(p5),m5=new WeakMap,g5=new WeakMap,_5=new WeakSet,v5=function(){let{roots:e}=this,t=[];for(let n of e)for(let e of r5(this,m5))t.push(o5(this,_5,y5).call(this,n,e));return()=>{for(let e of t)e()}},y5=function(e,t){let n=c5.get(e);n||(n=new Map,c5.set(e,n));let r=n.get(t);if(!r){let i=A6(e)?o5(this,_5,b5).call(this,e,n,t):o5(this,_5,x5).call(this,e,n,t);if(!i)return()=>{};r=i,n.set(t,r)}r.refCount++;let i=!1;return()=>{i||(i=!0,r.refCount--,r.refCount===0&&r.cleanup())}},b5=function(e,t,n){let r=e.createElement(`style`),{nonce:i}=this.options??{};i&&r.setAttribute(`nonce`,i),r.textContent=n,e.head.prepend(r);let a=new MutationObserver(t=>{for(let n of t)for(let t of Array.from(n.removedNodes))if(t===r){e.head.prepend(r);return}});return a.observe(e.head,{childList:!0}),{refCount:0,cleanup:()=>{a.disconnect(),r.remove(),t.delete(n),t.size===0&&c5.delete(e)}}},x5=function(e,t,n){!(`adoptedStyleSheets`in e&&Array.isArray(e.adoptedStyleSheets))&&process.env.NODE_ENV!==`production`&&console.error(`Cannot inject styles: This browser doesn't support adoptedStyleSheets`);let{CSSStyleSheet:r}=e.ownerDocument.defaultView??{};if(!r)return process.env.NODE_ENV!==`production`&&console.error(`Cannot inject styles: CSSStyleSheet constructor not available`),null;let i=new r;return i.replaceSync(n),e.adoptedStyleSheets.push(i),{refCount:0,cleanup:()=>{if(B6(e)&&e.host?.isConnected){let t=e.adoptedStyleSheets.indexOf(i);t!==-1&&e.adoptedStyleSheets.splice(t,1)}t.delete(n),t.size===0&&c5.delete(e)}}},t5(h5,4,`additionalRoots`,f5,S5,g5),t5(h5,2,`sourceRoot`,d5,S5),t5(h5,2,`targetRoot`,u5,S5),t5(h5,2,`roots`,l5,S5),$8(h5,S5),S5.configure=V4(S5);var C5=S5,Kfe=class extends K4{constructor(e,t){super(e,t),this.manager=e;let{cursor:n=`grabbing`}=t??{},r=e.registry.plugins.get(C5)?.register(`* { cursor: ${n} !important; }`);if(r){let e=this.destroy.bind(this);this.destroy=()=>{r(),e()}}}},w5=`data-dnd-`,T5=`${w5}dropping`,E5=`--dnd-`,D5=`${w5}dragging`,O5=`${w5}placeholder`,qfe=[D5,O5,`popover`,`aria-pressed`,`aria-grabbing`],Jfe=[`view-transition-name`],Yfe=`
57
+ :is(:root,:host) [${D5}] {
19
58
  position: fixed !important;
20
59
  pointer-events: none !important;
21
60
  touch-action: none;
22
61
  z-index: calc(infinity);
23
62
  will-change: translate;
24
- top: var(${hX}top, 0px) !important;
25
- left: var(${hX}left, 0px) !important;
63
+ top: var(${E5}top, 0px) !important;
64
+ left: var(${E5}left, 0px) !important;
26
65
  right: unset !important;
27
66
  bottom: unset !important;
28
- width: var(${hX}width, auto);
29
- max-width: var(${hX}width, auto);
30
- height: var(${hX}height, auto);
31
- max-height: var(${hX}height, auto);
32
- transform: var(${hX}transform, none) !important;
33
- transition: var(${hX}transition) !important;
67
+ width: var(${E5}width, auto);
68
+ max-width: var(${E5}width, auto);
69
+ height: var(${E5}height, auto);
70
+ max-height: var(${E5}height, auto);
71
+ transform: var(${E5}transform, none) !important;
72
+ transition: var(${E5}transition) !important;
34
73
  }
35
74
 
36
- :is(:root,:host) [${_X}] {
75
+ :is(:root,:host) [${O5}] {
37
76
  transition: none;
38
77
  }
39
78
 
40
- :is(:root,:host) [${_X}='hidden'] {
79
+ :is(:root,:host) [${O5}='hidden'] {
41
80
  visibility: hidden;
42
81
  }
43
82
 
44
- [${gX}] * {
83
+ [${D5}] * {
45
84
  pointer-events: none !important;
46
85
  }
47
86
 
48
- [${gX}]:not([${mX}]) {
49
- translate: var(${hX}translate) !important;
87
+ [${D5}]:not([${T5}]) {
88
+ translate: var(${E5}translate) !important;
50
89
  }
51
90
 
52
- [${gX}][style*='${hX}scale'] {
53
- scale: var(${hX}scale) !important;
54
- transform-origin: var(${hX}transform-origin) !important;
91
+ [${D5}][style*='${E5}scale'] {
92
+ scale: var(${E5}scale) !important;
93
+ transform-origin: var(${E5}transform-origin) !important;
55
94
  }
56
95
 
57
96
  @layer dnd-kit {
58
- :where([${gX}][popover]) {
97
+ :where([${D5}][popover]) {
59
98
  overflow: visible;
60
99
  background: unset;
61
100
  border: unset;
@@ -69,11 +108,11 @@ Avoid returning a new reference inside your input selector, e.g.
69
108
  }
70
109
  }
71
110
  }
72
- [${gX}]::backdrop, [${pX}overlay]:not([${gX}]) {
111
+ [${D5}]::backdrop, [${w5}overlay]:not([${D5}]) {
73
112
  display: none;
74
113
  visibility: hidden;
75
114
  }
76
- `.replace(/\n+/g,` `).replace(/\s+/g,` `).trim();function xX(e,t=`hidden`){return EH(()=>{let{element:n,manager:r}=e;if(!n||!r)return;let i=SX(n,r.registry.droppables),a=[],o=Dq(n),{remove:s}=o;return CX(i,o,a),wX(o,t),o.remove=()=>{a.forEach(e=>e()),s.call(o)},o})}function SX(e,t){let n=new Map;for(let r of t)if(r.element&&(e===r.element||e.contains(r.element))){let e=`${pX}${sY(`dom-id`)}`;r.element.setAttribute(e,``),n.set(r,e)}return n}function CX(e,t,n){for(let[r,i]of e){if(!r.element)continue;let e=`[${i}]`,a=t.matches(e)?t:t.querySelector(e);if(r.element.removeAttribute(i),!a)continue;let o=r.element;r.proxy=a,a.removeAttribute(i),Mq.set(o,a),n.push(()=>{Mq.delete(o),r.proxy=void 0})}}function wX(e,t=`hidden`){e.setAttribute(`inert`,`true`),e.setAttribute(`tab-index`,`-1`),e.setAttribute(`aria-hidden`,`true`),e.setAttribute(_X,t)}function TX(e,t){return e===t?!0:Fq(e)===Fq(t)}function EX(e){let{target:t}=e;`newState`in e&&e.newState===`closed`&&tY(t)&&t.hasAttribute(`popover`)&&requestAnimationFrame(()=>hJ(t))}function DX(e){return e.tagName===`TR`}function OX(e,t,n){let r=new MutationObserver(r=>{let i=!1;for(let n of r){if(n.target!==e){i=!0;continue}if(n.type!==`attributes`)continue;let r=n.attributeName;if(r.startsWith(`aria-`)||vX.includes(r))continue;let a=e.getAttribute(r);if(r===`style`){if($J(e)&&$J(t)){let n=e.style;for(let e of Array.from(t.style))n.getPropertyValue(e)===``&&t.style.removeProperty(e);for(let e of Array.from(n)){if(yX.includes(e)||e.startsWith(hX))continue;let r=n.getPropertyValue(e);t.style.setProperty(e,r)}}}else a===null?t.removeAttribute(r):t.setAttribute(r,a)}i&&n&&t.replaceChildren(...e.cloneNode(!0).childNodes)});return r.observe(e,{attributes:!0,subtree:!0,childList:!0}),r}function kX(e,t,n){let r=new MutationObserver(r=>{for(let i of r)if(i.addedNodes.length!==0)for(let r of Array.from(i.addedNodes)){if(r.contains(e)&&e.nextElementSibling!==t){e.insertAdjacentElement(`afterend`,t),hJ(n);return}if(r.contains(t)&&t.previousElementSibling!==e){t.insertAdjacentElement(`beforebegin`,e),hJ(n);return}}e.isConnected&&t.isConnected&&e.nextElementSibling!==t&&(e.insertAdjacentElement(`afterend`,t),hJ(n))});return r.observe(e.ownerDocument.body,{childList:!0,subtree:!0}),r}function AX(e){return new ResizeObserver(()=>{var t;let n=new ZJ(e.placeholder,{frameTransform:e.frameTransform,ignoreTransforms:!0}),r=e.transformOrigin??{x:1,y:1},i=(e.width-n.width)*r.x+e.delta.x,a=(e.height-n.height)*r.y+e.delta.y,o=Cq();if(e.styles.set({width:n.width-e.widthOffset,height:n.height-e.heightOffset,top:e.top+a+o.y,left:e.left+i+o.x},hX),(t=e.getElementMutationObserver())==null||t.takeRecords(),DX(e.element)&&DX(e.placeholder)){let t=Array.from(e.element.cells),n=Array.from(e.placeholder.cells);e.getSavedCellWidths()||e.setSavedCellWidths(t.map(e=>e.style.width));for(let[e,r]of t.entries()){let t=n[e];r.style.width=`${t.getBoundingClientRect().width}px`}}let s=e.getTranslate()??{x:0,y:0},c=e.left+i+o.x+s.x,l=e.top+a+o.y+s.y,u=n.width-e.widthOffset,d=n.height-e.heightOffset,f=e.frameTransform;e.dragOperation.shape=new xW(c*f.scaleX+f.x,l*f.scaleY+f.y,u*f.scaleX,d*f.scaleY)})}var jX=250,MX=`ease`;function NX(e){var t;let{animation:n}=e;if(typeof n==`function`){let t=n({source:e.source,element:e.element,feedbackElement:e.feedbackElement,placeholder:e.placeholder,translate:e.translate,moved:e.moved});Promise.resolve(t).then(()=>{e.cleanup(),requestAnimationFrame(e.restoreFocus)});return}let{duration:r=jX,easing:i=MX}=n??{};hJ(e.feedbackElement);let[,a]=oq(e.feedbackElement,e=>`translate`in e)??[];a?.pause();let o=e.placeholder??e.element,s={frameTransform:TX(e.feedbackElement,o)?null:void 0},c=new ZJ(e.feedbackElement,s),l=NJ(wJ(e.feedbackElement).translate)??e.translate,u=new ZJ(o,s),d=xW.delta(c,u,e.alignment),f={x:l.x-d.x,y:l.y-d.y},p=Math.round(c.intrinsicHeight)===Math.round(u.intrinsicHeight)?{}:{minHeight:[`${c.intrinsicHeight}px`,`${u.intrinsicHeight}px`],maxHeight:[`${c.intrinsicHeight}px`,`${u.intrinsicHeight}px`]},m=Math.round(c.intrinsicWidth)===Math.round(u.intrinsicWidth)?{}:{minWidth:[`${c.intrinsicWidth}px`,`${u.intrinsicWidth}px`],maxWidth:[`${c.intrinsicWidth}px`,`${u.intrinsicWidth}px`]};e.styles.set({transition:e.transition},hX),e.feedbackElement.setAttribute(mX,``),(t=e.getElementMutationObserver())==null||t.takeRecords(),GJ({element:e.feedbackElement,keyframes:CY(SY(SY({},p),m),{translate:[`${l.x}px ${l.y}px 0`,`${f.x}px ${f.y}px 0`]}),options:{duration:Eq(uq(e.feedbackElement))?0:e.moved||e.feedbackElement!==e.element?r:0,easing:i}}).then(()=>{e.feedbackElement.removeAttribute(mX),a?.finish(),e.cleanup(),requestAnimationFrame(e.restoreFocus)})}var PX,FX,IX,LX,RX,zX,BX,VX=class extends (FX=pG,PX=[CU],FX){constructor(e,t){super(e,t),IY(this,RX),IY(this,LX,jY(IX,8,this)),jY(IX,11,this),this.state={initial:{},current:{}};let n=e.registry.plugins.get(dX),r=n?.register(bX);if(r){let e=this.destroy.bind(this);this.destroy=()=>{r(),e()}}this.registerEffect(RY(this,RX,zX).bind(this,n)),this.registerEffect(RY(this,RX,BX))}};IX=EY(FX),LX=new WeakMap,RX=new WeakSet,zX=function(e){let{overlay:t}=this;if(!t||!e)return;let n=Tq(t);if(n)return e.addRoot(n)},BX=function(){let{state:e,manager:t,options:n}=this,{dragOperation:r}=t,{position:i,source:a,status:o}=r;if(o.idle){e.current={},e.initial={};return}if(!a)return;let{element:s}=a,c=a.pluginConfig(VX),l=c?.feedback??n?.feedback??`default`,u=typeof l==`function`?l(a,t):l;if(!s||u===`none`||!o.initialized||o.initializing)return;let{initial:d}=e,f=this.overlay??s,p=AJ(f),m=AJ(s),h=!TX(s,f),g=new ZJ(s,{frameTransform:h?m:null,ignoreTransforms:!h}),_={x:m.scaleX/p.scaleX,y:m.scaleY/p.scaleY},{width:v,height:y,top:b,left:x}=g;h&&(v/=_.x,y/=_.y);let S=new eY(f),C=wJ(s),{transition:w,translate:T,boxSizing:E,paddingBlockStart:D,paddingBlockEnd:O,paddingInlineStart:k,paddingInlineEnd:A,borderInlineStartWidth:j,borderInlineEndWidth:M,borderBlockStartWidth:N,borderBlockEndWidth:P}=C,F=w.split(`,`).filter(e=>!/^\s*(transform|translate|scale)\b/.test(e)).join(`,`),I=PJ(C),L=C.transform,R=u===`clone`,ee=E===`content-box`,z=ee?parseInt(k)+parseInt(A)+parseInt(j)+parseInt(M):0,B=ee?parseInt(D)+parseInt(O)+parseInt(N)+parseInt(P):0,V=u!==`move`&&!this.overlay?xX(a,R?`clone`:`hidden`):null,te=EH(()=>nY(t.dragOperation.activatorEvent));if(!d.translate){if(this.overlay&&I)d.translate={x:I.x,y:I.y};else if(T!==`none`){let e=NJ(T);e&&(d.translate=e)}}if(!d.transformOrigin){let e=EH(()=>i.current),t=x+(I?.x??0),n=b+(I?.y??0);d.transformOrigin={x:(e.x-t*p.scaleX-p.x)/(v*p.scaleX),y:(e.y-n*p.scaleY-p.y)/(y*p.scaleY)}}let{transformOrigin:ne}=d,H=b*p.scaleY+p.y,re=x*p.scaleX+p.x;if(!d.coordinates&&(d.coordinates={x:re,y:H},_.x!==1||_.y!==1)){let{scaleX:e,scaleY:t}=m,{x:n,y:r}=ne;d.coordinates.x+=(v*e-v)*n,d.coordinates.y+=(y*t-y)*r}d.dimensions||={width:v,height:y},d.frameTransform||=p;let U={x:d.coordinates.x-re,y:d.coordinates.y-H},W={width:(d.dimensions.width*d.frameTransform.scaleX-v*p.scaleX)*ne.x,height:(d.dimensions.height*d.frameTransform.scaleY-y*p.scaleY)*ne.y},ie={x:U.x/p.scaleX+W.width,y:U.y/p.scaleY+W.height},ae={left:x+ie.x,top:b+ie.y};f.setAttribute(gX,`true`);let oe=EH(()=>r.transform),G=d.translate??{x:0,y:0},K=oe.x*p.scaleX+G.x,se=oe.y*p.scaleY+G.y,ce=Cq();S.set({width:v-z,height:y-B,top:ae.top+ce.y,left:ae.left+ce.x,translate:`${K}px ${se}px 0`,transform:this.overlay?`none`:L,transition:F?`${F}, translate 0ms linear`:`translate 0ms linear`,scale:h?`${_.x} ${_.y}`:``,"transform-origin":`${ne.x*100}% ${ne.y*100}%`},hX),V&&(s.insertAdjacentElement(`afterend`,V),n?.rootElement&&(typeof n.rootElement==`function`?n.rootElement(a):n.rootElement).appendChild(s)),mJ(f)&&(f.hasAttribute(`popover`)||f.setAttribute(`popover`,`manual`),hJ(f),f.addEventListener(`beforetoggle`,EX));let le,ue,de,fe=AX({placeholder:V,element:s,feedbackElement:f,frameTransform:p,transformOrigin:ne,width:v,height:y,top:b,left:x,widthOffset:z,heightOffset:B,delta:ie,styles:S,dragOperation:r,getTranslate:()=>e.current.translate,getElementMutationObserver:()=>le,getSavedCellWidths:()=>de,setSavedCellWidths:e=>{de=e}}),pe=new ZJ(f);EH(()=>r.shape=pe);let me=uq(f),he=e=>{this.manager.actions.stop({event:e})},ge=Eq(me);te&&me.addEventListener(`resize`,he),EH(()=>a.status)===`idle`&&requestAnimationFrame(()=>a.status=`dragging`),V&&(fe.observe(V),le=OX(s,V,R),ue=kX(s,V,f));let _e=t.dragOperation.source?.id,ve=()=>{if(!te||_e==null)return;let e=t.registry.draggables.get(_e),n=e?.handle??e?.element;fq(n)&&n.focus()},ye=()=>{if(le?.disconnect(),ue?.disconnect(),fe.disconnect(),me.removeEventListener(`resize`,he),mJ(f)&&(f.removeEventListener(`beforetoggle`,EX),f.removeAttribute(`popover`)),f.removeAttribute(gX),S.reset(),de&&DX(s)){let e=Array.from(s.cells);for(let[t,n]of e.entries())n.style.width=de[t]??``}a.status=`idle`;let t=e.current.translate!=null,n=r.status.dragging;V&&(!n&&t||V.parentElement!==f.parentElement)&&f.isConnected&&V.replaceWith(f),V?.remove()},be=n?.dropAnimation,xe=this,Se=EU(()=>{let{transform:t,status:i}=r;if(!(!t.x&&!t.y&&!e.current.translate)&&i.dragging){let i=d.translate??{x:0,y:0},a={x:t.x/p.scaleX+i.x,y:t.y/p.scaleY+i.y},o=e.current.translate,s=EH(()=>r.modifiers),c=EH(()=>r.shape?.current),l=n?.keyboardTransition,u=te&&!ge&&l!==null?`${l?.duration??250}ms ${l?.easing??`cubic-bezier(0.25, 1, 0.5, 1)`}`:`0ms linear`;if(S.set({transition:F?`${F}, translate ${u}`:`translate ${u}`,translate:`${a.x}px ${a.y}px 0`},hX),le?.takeRecords(),c&&c!==pe&&o&&!s.length){let e=bW.delta(a,o);r.shape=xW.from(c.boundingRectangle).translate(e.x*p.scaleX,e.y*p.scaleY)}else r.shape=new ZJ(f);e.current.translate=a}},function(){if(r.status.dropped){this.dispose(),a.status=`dropping`;let n=c?.dropAnimation===void 0?xe.dropAnimation===void 0?be:xe.dropAnimation:c.dropAnimation,r=e.current.translate,i=r!=null;if(!r&&s!==f&&(r={x:0,y:0}),!r||n===null){ye();return}t.renderer.rendering.then(()=>{NX({source:a,element:s,feedbackElement:f,placeholder:V,translate:r,moved:i,transition:w,alignment:a.alignment,styles:S,animation:n??void 0,getElementMutationObserver:()=>le,cleanup:ye,restoreFocus:ve})})}});return()=>{ye(),Se()}},MY(IX,4,`overlay`,PX,VX,LX),AY(IX,VX),VX.configure=sG(VX);var HX=VX,UX=!0,WX=!1,GX,KX,qX,JX=(qX=[CU],IJ.Forward),YX,XX,ZX;KX=(GX=[CU],IJ.Reverse);var QX=class{constructor(){IY(this,XX,jY(YX,8,this,UX)),jY(YX,11,this),IY(this,ZX,jY(YX,12,this,UX)),jY(YX,15,this)}isLocked(e){return e===IJ.Idle?!1:e==null?this[IJ.Forward]===UX&&this[IJ.Reverse]===UX:this[e]===UX}unlock(e){e!==IJ.Idle&&(this[e]=WX)}};YX=EY(null),XX=new WeakMap,ZX=new WeakMap,MY(YX,4,JX,qX,QX,XX),MY(YX,4,KX,GX,QX,ZX),AY(YX,QX);var $X=[IJ.Forward,IJ.Reverse],eZ=class{constructor(){this.x=new QX,this.y=new QX}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},tZ=class extends pG{constructor(e){super(e);let t=LH(new eZ),n=null;this.signal=t,qH(()=>{let{status:r}=e.dragOperation;if(!r.initialized){n=null,t.value=new eZ;return}let{delta:i}=e.dragOperation.position;if(n){let e={x:nZ(i.x,n.x),y:nZ(i.y,n.y)},r=t.peek();wH(()=>{for(let t of jW)for(let n of $X)e[t]===n&&r[t].unlock(n);t.value=r})}n=i})}get current(){return this.signal.peek()}};function nZ(e,t){return Math.sign(e-t)}var rZ,iZ,aZ,oZ,sZ,cZ,lZ=class extends (iZ=mG,rZ=[CU],iZ){constructor(e){super(e),IY(this,oZ,jY(aZ,8,this,!1)),jY(aZ,11,this),IY(this,sZ),IY(this,cZ,()=>{if(!FY(this,sZ))return;let{element:e,by:t}=FY(this,sZ);t.y&&(e.scrollTop+=t.y),t.x&&(e.scrollLeft+=t.x)}),this.scroll=(e,t)=>{if(this.disabled)return!1;let n=this.getScrollableElements();if(!n)return LY(this,sZ,void 0),!1;let{position:r}=this.manager.dragOperation,i=r?.current;if(i){let{by:r}=e??{},a=r?{x:uZ(r.x),y:uZ(r.y)}:void 0,o=a?void 0:this.scrollIntentTracker.current;if(o?.isLocked())return!1;for(let e of n){let n=vJ(e,r);if(n.x||n.y){let{speed:n,direction:s}=zJ(e,i,a,t?.acceleration,t?.threshold);if(o)for(let e of jW)o[e].isLocked(s[e])&&(n[e]=0,s[e]=0);if(s.x||s.y){let{x:t,y:i}=r??s,a=t*n.x,o=i*n.y;if(a||o){let t=FY(this,sZ)?.by;if(this.autoScrolling&&t&&(t.x&&!a||t.y&&!o))continue;return LY(this,sZ,{element:e,by:{x:a,y:o}}),bJ.schedule(FY(this,cZ)),!0}}}}}return LY(this,sZ,void 0),!1};let t=null,n=null,r=xU(()=>{let{position:n,source:r}=e.dragOperation;if(!n)return null;let i=Aq(Tq(r?.element),n.current);return i&&(t=i),i??t}),i=xU(()=>{let t=r.value,{documentElement:i}=mq(t);if(!t||t===i){let{target:t}=e.dragOperation,r=t?.element;if(r){let e=kJ(r,{excludeElement:!1});return n=e,e}}if(t){let e=kJ(t,{excludeElement:!1});return this.autoScrolling&&n&&e.size<n?.size?n:(n=e,e)}return n=null,null},SU);this.getScrollableElements=()=>i.value,this.scrollIntentTracker=new tZ(e),this.destroy=e.monitor.addEventListener(`dragmove`,t=>{this.disabled||t.defaultPrevented||!nY(e.dragOperation.activatorEvent)||!t.by||this.scroll({by:t.by})&&t.preventDefault()})}};aZ=EY(iZ),oZ=new WeakMap,sZ=new WeakMap,cZ=new WeakMap,MY(aZ,4,`autoScrolling`,rZ,lZ,oZ),AY(aZ,lZ);function uZ(e){return e>0?IJ.Forward:e<0?IJ.Reverse:IJ.Idle}var dZ=new class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{let{tasks:e,resolvers:t}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(let t of e)t();for(let e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(e=>this.resolvers.add(e))}}(e=>{typeof requestAnimationFrame==`function`?requestAnimationFrame(e):e()}),fZ=10,pZ=class extends pG{constructor(e,t){super(e,t);let n=e.registry.plugins.get(lZ);if(!n)throw Error(`AutoScroller plugin depends on Scroller plugin`);this.destroy=qH(()=>{if(this.disabled)return;let{position:t,status:r}=e.dragOperation;if(r.dragging){let e={acceleration:this.options?.acceleration,threshold:typeof this.options?.threshold==`number`?{x:this.options.threshold,y:this.options.threshold}:this.options?.threshold};if(n.scroll(void 0,e)){n.autoScrolling=!0;let t=setInterval(()=>dZ.schedule(()=>n.scroll(void 0,e)),fZ);return()=>{clearInterval(t)}}else n.autoScrolling=!1}})}};pZ.configure=sG(pZ);var mZ=pZ,hZ={capture:!0,passive:!0},gZ,_Z=class extends mG{constructor(e){super(e),IY(this,gZ),this.handleScroll=()=>{FY(this,gZ)??LY(this,gZ,setTimeout(()=>{this.manager.collisionObserver.forceUpdate(!1),LY(this,gZ,void 0)},50))};let{dragOperation:t}=this.manager;this.destroy=qH(()=>{if(t.status.dragging){let e=t.source?.element?.ownerDocument??document;return e.addEventListener(`scroll`,this.handleScroll,hZ),()=>{e.removeEventListener(`scroll`,this.handleScroll,hZ)}}})}};gZ=new WeakMap;var vZ=`* { user-select: none !important; -webkit-user-select: none !important; }`,yZ=class extends pG{constructor(e){super(e),this.manager=e;let t=e.registry.plugins.get(dX)?.register(vZ);if(this.destroy=qH(()=>{let{dragOperation:e}=this.manager;if(e.status.initialized)return bZ(),document.addEventListener(`selectionchange`,bZ,{capture:!0}),()=>{document.removeEventListener(`selectionchange`,bZ,{capture:!0})}}),t){let e=this.destroy.bind(this);this.destroy=()=>{t(),e()}}}};function bZ(){var e;(e=document.getSelection())==null||e.removeAllRanges()}var xZ=Object.freeze({offset:10,keyboardCodes:{start:[`Space`,`Enter`],cancel:[`Escape`],end:[`Space`,`Enter`,`Tab`],up:[`ArrowUp`],down:[`ArrowDown`],left:[`ArrowLeft`],right:[`ArrowRight`]},preventActivation(e,t){let n=t.handle??t.element;return e.target!==n}}),SZ,CZ=class extends wK{constructor(e,t){super(e),this.manager=e,this.options=t,IY(this,SZ,[]),this.listeners=new Pq,this.handleSourceKeyDown=(e,t,n)=>{if(this.disabled||e.defaultPrevented||!tY(e.target)||t.disabled)return;let{keyboardCodes:r=xZ.keyboardCodes,preventActivation:i=xZ.preventActivation}=n??{};r.start.includes(e.code)&&this.manager.dragOperation.status.idle&&(i?.(e,t)||this.handleStart(e,t,n))}}bind(e,t=this.options){return qH(()=>{let n=e.handle??e.element,r=n=>{nY(n)&&this.handleSourceKeyDown(n,e,t)};if(n)return n.addEventListener(`keydown`,r),()=>{n.removeEventListener(`keydown`,r)}})}handleStart(e,t,n){let{element:r}=t;if(!r)throw Error(`Source draggable does not have an associated element`);e.preventDefault(),e.stopImmediatePropagation(),BJ(r);let{center:i}=new ZJ(r);if(this.manager.actions.start({event:e,coordinates:{x:i.x,y:i.y},source:t}).signal.aborted)return this.cleanup();this.sideEffects();let a=mq(r),o=[this.listeners.bind(a,[{type:`keydown`,listener:e=>this.handleKeyDown(e,t,n),options:{capture:!0}}])];FY(this,SZ).push(...o)}handleKeyDown(e,t,n){let{keyboardCodes:r=xZ.keyboardCodes}=n??{};if(TZ(e,[...r.end,...r.cancel])){e.preventDefault();let t=TZ(e,r.cancel);this.handleEnd(e,t);return}TZ(e,r.up)?this.handleMove(`up`,e):TZ(e,r.down)&&this.handleMove(`down`,e),TZ(e,r.left)?this.handleMove(`left`,e):TZ(e,r.right)&&this.handleMove(`right`,e)}handleEnd(e,t){this.manager.actions.stop({event:e,canceled:t}),this.cleanup()}handleMove(e,t){let{shape:n}=this.manager.dragOperation,r=t.shiftKey?5:1,i={x:0,y:0},a=this.options?.offset??xZ.offset;if(typeof a==`number`&&(a={x:a,y:a}),n){switch(e){case`up`:i={x:0,y:-a.y*r};break;case`down`:i={x:0,y:a.y*r};break;case`left`:i={x:-a.x*r,y:0};break;case`right`:i={x:a.x*r,y:0};break}(i.x||i.y)&&(t.preventDefault(),this.manager.actions.move({event:t,by:i}))}}sideEffects(){let e=this.manager.registry.plugins.get(mZ);e?.disabled===!1&&(e.disable(),FY(this,SZ).push(()=>{e.enable()}))}cleanup(){FY(this,SZ).forEach(e=>e()),LY(this,SZ,[])}destroy(){this.cleanup(),this.listeners.clear()}};SZ=new WeakMap,CZ.configure=sG(CZ),CZ.defaults=xZ;var wZ=CZ;function TZ(e,t){return t.includes(e.code)}var EZ,DZ=class extends DK{constructor(){super(...arguments),IY(this,EZ)}onEvent(e){switch(e.type){case`pointerdown`:LY(this,EZ,yq(e));break;case`pointermove`:if(!FY(this,EZ))return;let{x:t,y:n}=yq(e),r={x:t-FY(this,EZ).x,y:n-FY(this,EZ).y},{tolerance:i}=this.options;if(i&&kW(r,i)){this.abort();return}kW(r,this.options.value)&&this.activate(e);break;case`pointerup`:this.abort();break}}abort(){LY(this,EZ,void 0)}};EZ=new WeakMap;var OZ,kZ,AZ=class extends DK{constructor(){super(...arguments),IY(this,OZ),IY(this,kZ)}onEvent(e){switch(e.type){case`pointerdown`:LY(this,kZ,yq(e)),LY(this,OZ,setTimeout(()=>this.activate(e),this.options.value));break;case`pointermove`:if(!FY(this,kZ))return;let{x:t,y:n}=yq(e);kW({x:t-FY(this,kZ).x,y:n-FY(this,kZ).y},this.options.tolerance)&&this.abort();break;case`pointerup`:this.abort();break}}abort(){FY(this,OZ)&&(clearTimeout(FY(this,OZ)),LY(this,kZ,void 0),LY(this,OZ,void 0))}};OZ=new WeakMap,kZ=new WeakMap;var jZ=class{};jZ.Delay=AZ,jZ.Distance=DZ;var MZ=Object.freeze({activationConstraints(e,t){let{pointerType:n,target:r}=e;if(!(n===`mouse`&&tY(r)&&(t.handle===r||t.handle?.contains(r))))return n===`touch`?[new jZ.Delay({value:250,tolerance:5})]:iY(r)&&!e.defaultPrevented?[new jZ.Delay({value:200,tolerance:0})]:[new jZ.Delay({value:200,tolerance:10}),new jZ.Distance({value:5})]},preventActivation(e,t){let{target:n}=e;return n===t.element||n===t.handle||!tY(n)||t.handle?.contains(n)?!1:Nq(n)}}),NZ,PZ=class extends wK{constructor(e,t){super(e),this.manager=e,this.options=t,IY(this,NZ,new Set),this.listeners=new Pq,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{let{event:e,coordinates:t}=this.latest;!e||!t||this.manager.actions.move({event:e,to:t})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(e,t,n=this.options){let{activationConstraints:r=MZ.activationConstraints}=n??{};return typeof r==`function`?r(e,t):r}bind(e,t=this.options){return qH(()=>{let n=new AbortController,{signal:r}=n,i=n=>{rY(n)&&this.handlePointerDown(n,e,t)},a=[e.handle??e.element];t?.activatorElements&&(a=Array.isArray(t.activatorElements)?t.activatorElements:t.activatorElements(e));for(let e of a)e&&(BZ(e.ownerDocument.defaultView),e.addEventListener(`pointerdown`,i,{signal:r}));return()=>n.abort()})}handlePointerDown(e,t,n){if(this.disabled||!e.isPrimary||e.button!==0||!tY(e.target)||t.disabled||IZ(e)||!this.manager.dragOperation.status.idle)return;let{preventActivation:r=MZ.preventActivation}=n??{};if(r?.(e,t))return;let{target:i}=e,a=fq(i)&&i.draggable&&i.getAttribute(`draggable`)===`true`,o=AJ(t.element),{x:s,y:c}=yq(e);this.initialCoordinates={x:s*o.scaleX+o.x,y:c*o.scaleY+o.y};let l=this.activationConstraints(e,t,n);e.sensor=this;let u=new TK(l,e=>this.handleStart(t,e));u.signal.onabort=()=>this.handleCancel(e),u.onEvent(e),this.controller=u;let d=xq(),f=this.listeners.bind(d,[{type:`pointermove`,listener:e=>this.handlePointerMove(e,t)},{type:`pointerup`,listener:this.handlePointerUp,options:{capture:!0}},{type:`pointercancel`,listener:this.handleCancel},{type:`dragstart`,listener:a?this.handleCancel:LZ,options:{capture:!0}}]);FY(this,NZ).add(()=>{f(),this.initialCoordinates=void 0})}handlePointerMove(e,t){var n;if(this.controller?.activated===!1){(n=this.controller)==null||n.onEvent(e);return}if(this.manager.dragOperation.status.dragging){let n=yq(e),r=AJ(t.element);n.x=n.x*r.scaleX+r.x,n.y=n.y*r.scaleY+r.y,e.preventDefault(),e.stopPropagation(),this.latest.event=e,this.latest.coordinates=n,bJ.schedule(this.handleMove)}}handlePointerUp(e){let{status:t}=this.manager.dragOperation;if(!t.idle){e.preventDefault(),e.stopPropagation();let n=!t.initialized;this.manager.actions.stop({event:e,canceled:n})}this.cleanup()}handleKeyDown(e){e.key===`Escape`&&(e.preventDefault(),this.handleCancel(e))}handleStart(e,t){let{manager:n,initialCoordinates:r}=this;if(!r||!n.dragOperation.status.idle||t.defaultPrevented)return;if(n.actions.start({coordinates:r,event:t,source:e}).signal.aborted)return this.cleanup();t.preventDefault();let i=mq(t.target).body;try{i.setPointerCapture(t.pointerId)}catch{this.handleCancel(t);return}let a=tY(t.target)?[t.target,i]:i,o=this.listeners.bind(a,[{type:`touchmove`,listener:LZ,options:{passive:!1}},{type:`click`,listener:LZ},{type:`contextmenu`,listener:LZ},{type:`keydown`,listener:this.handleKeyDown}]);FY(this,NZ).add(o)}handleCancel(e){let{dragOperation:t}=this.manager;t.status.initialized&&this.manager.actions.stop({event:e,canceled:!0}),this.cleanup()}cleanup(){let{controller:e}=this;this.controller=void 0,e&&!e.signal.aborted&&e.abort(),this.latest={event:void 0,coordinates:void 0},FY(this,NZ).forEach(e=>e()),FY(this,NZ).clear()}destroy(){this.cleanup(),this.listeners.clear()}};NZ=new WeakMap,PZ.configure=sG(PZ),PZ.defaults=MZ;var FZ=PZ;function IZ(e){return`sensor`in e}function LZ(e){e.preventDefault()}function RZ(){}var zZ=new WeakSet;function BZ(e){!e||zZ.has(e)||(e.addEventListener(`touchmove`,RZ,{capture:!1,passive:!1}),zZ.add(e))}var VZ={modifiers:[],plugins:[JY,mZ,fX,HX,yZ],sensors:[FZ,wZ]},HZ=class extends QK{constructor(e={}){let t=ZK(e.plugins,VZ.plugins),n=ZK(e.sensors,VZ.sensors),r=ZK(e.modifiers,VZ.modifiers);super(CY(SY({},e),{plugins:[_Z,lZ,dX,...t],sensors:n,modifiers:r}))}},UZ,WZ,GZ,KZ,qZ,JZ,YZ=class extends (GZ=KG,WZ=[CU],UZ=[CU],GZ){constructor(e,t){var n=e,{element:r,effects:i=()=>[],handle:a}=n,o=TY(n,[`element`,`effects`,`handle`]);super(SY({effects:()=>[...i(),()=>{let{manager:e}=this;if(!e)return;let t=(this.sensors?.map(cG)??[...e.sensors]).map(t=>{let n=t instanceof wK?t:e.registry.register(t.plugin),r=t instanceof wK?void 0:t.options;return n.bind(this,r)});return function(){t.forEach(e=>e())}}]},o),t),IY(this,qZ,jY(KZ,8,this)),jY(KZ,11,this),IY(this,JZ,jY(KZ,12,this)),jY(KZ,15,this),this.element=r,this.handle=a}};KZ=EY(GZ),qZ=new WeakMap,JZ=new WeakMap,MY(KZ,4,`handle`,WZ,YZ,qZ),MY(KZ,4,`element`,UZ,YZ,JZ),AY(KZ,YZ);var XZ,ZZ,QZ,$Z,eQ,tQ,nQ,rQ,iQ,aQ,oQ=class extends (QZ=oK,ZZ=[CU],XZ=[CU],QZ){constructor(e,t){var n=e,{element:r,effects:i=()=>[]}=n,a=TY(n,[`element`,`effects`]);let{collisionDetector:o=uY}=a,s=e=>{let{manager:t,element:n}=this;if(!n||e===null){this.shape=void 0;return}if(!t)return;let r=new ZJ(n),i=EH(()=>this.shape);return r&&i?.equals(r)?i:(this.shape=r,r)},c=LH(!1);super(CY(SY({},a),{collisionDetector:o,effects:()=>[...i(),()=>{let{element:e,manager:t}=this;if(!t)return;let{dragOperation:n}=t,{source:r}=n;c.value=!!(r&&n.status.initialized&&e&&!this.disabled&&this.accepts(r))},()=>{let{element:e}=this;if(c.value&&e){let t=new pJ(e,s);return()=>{t.disconnect(),this.shape=void 0}}},()=>{if(this.manager?.dragOperation.status.initialized)return()=>{this.shape=void 0}}]}),t),IY(this,iQ),IY(this,eQ,jY($Z,8,this)),jY($Z,11,this),IY(this,aQ,jY($Z,12,this)),jY($Z,15,this),this.element=r,this.refreshShape=()=>s()}set element(e){LY(this,iQ,e,rQ)}get element(){return this.proxy??FY(this,iQ,nQ)}};$Z=EY(QZ),eQ=new WeakMap,iQ=new WeakSet,aQ=new WeakMap,tQ=MY($Z,20,`#element`,ZZ,iQ,eQ),nQ=tQ.get,rQ=tQ.set,MY($Z,4,`proxy`,XZ,oQ,aQ),AY($Z,oQ);function sQ(e){return typeof e==`object`&&!!e&&`current`in e}function cQ(e){if(e!=null)return sQ(e)?e.current??void 0:e}var lQ=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0?_.useLayoutEffect:_.useEffect;function uQ(){let e=(0,_.useState)(0)[1];return(0,_.useCallback)(()=>{e(e=>e+1)},[e])}function dQ(e,t=!1){let n=(0,_.useRef)(e.peek()),r=(0,_.useRef)(!1),i=uQ();return lQ(()=>qH(()=>{let a=n.current,o=e.value;if(a!==o){if(n.current=o,!r.current)return;t?(0,v.flushSync)(i):i()}}),[e,t,i]),{get value(){return r.current=!0,e.peek()}}}function fQ(e,t=[],n=!1){let r=(0,_.useRef)(e);return r.current=e,dQ((0,_.useMemo)(()=>xU(()=>r.current()),t),n)}function pQ(e,t){let n=(0,_.useRef)(new Map),r=uQ();return lQ(()=>{if(!e){n.current.clear();return}return qH(()=>{let i=!1,a=!1;for(let r of n.current){let[o]=r,s=EH(()=>r[1]),c=e[o];s!==c&&(i=!0,n.current.set(o,c),a=t?.(o,s,c)??!1)}i&&(a?queueMicrotask(()=>(0,v.flushSync)(r)):r())})},[e]),(0,_.useMemo)(()=>e&&new Proxy(e,{get(e,t){let r=e[t];return n.current.set(t,r),r}}),[e])}function mQ(e){let t=(0,_.useRef)(e);return lQ(()=>{t.current=e},[e]),t}function hQ(e,t,n=_.useEffect,r=Object.is){let i=(0,_.useRef)(e);n(()=>{let n=i.current;r(e,n)||(i.current=e,t(e,n))},[t,e])}function gQ(e,t){let n=(0,_.useRef)(cQ(e));lQ(()=>{let r=cQ(e);r!==n.current&&(n.current=r,t(r))})}var _Q=Object.defineProperty,vQ=Object.defineProperties,yQ=Object.getOwnPropertyDescriptors,bQ=Object.getOwnPropertySymbols,xQ=Object.prototype.hasOwnProperty,SQ=Object.prototype.propertyIsEnumerable,CQ=(e,t,n)=>t in e?_Q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wQ=(e,t)=>{for(var n in t||={})xQ.call(t,n)&&CQ(e,n,t[n]);if(bQ)for(var n of bQ(t))SQ.call(t,n)&&CQ(e,n,t[n]);return e},TQ=(e,t)=>vQ(e,yQ(t)),EQ=(e,t)=>{var n={};for(var r in e)xQ.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&bQ)for(var r of bQ(e))t.indexOf(r)<0&&SQ.call(e,r)&&(n[r]=e[r]);return n},DQ=(0,_.createContext)(new HZ),OQ=(0,_.memo)((0,_.forwardRef)(({children:e},t)=>{let[n,r]=(0,_.useState)(0),i=(0,_.useRef)(null),a=(0,_.useRef)(null),o=(0,_.useMemo)(()=>({renderer:{get rendering(){return i.current??Promise.resolve()}},trackRendering(e){i.current||=new Promise(e=>{a.current=e}),(0,_.startTransition)(()=>{e(),r(e=>e+1)})}}),[]);return lQ(()=>{var e;(e=a.current)==null||e.call(a),i.current=null},[e,n]),(0,_.useImperativeHandle)(t,()=>o),null})),kQ=[void 0,SU];function AQ(e){var t=e,{children:r,onCollision:i,onBeforeDragStart:a,onDragStart:o,onDragMove:s,onDragOver:c,onDragEnd:l}=t,u=EQ(t,[`children`,`onCollision`,`onBeforeDragStart`,`onDragStart`,`onDragMove`,`onDragOver`,`onDragEnd`]);let d=(0,_.useRef)(null),{plugins:f,modifiers:p,sensors:m}=u,h=ZK(f,VZ.plugins),g=ZK(m,VZ.sensors),v=ZK(p,VZ.modifiers),y=mQ(a),b=mQ(o),x=mQ(c),S=mQ(s),C=mQ(l),w=mQ(i),T=jQ(()=>u.manager??new HZ(u));return(0,_.useEffect)(()=>{if(!d.current)throw Error(`Renderer not found`);let{renderer:e,trackRendering:t}=d.current,{monitor:n}=T;T.renderer=e;let r=[n.addEventListener(`beforedragstart`,e=>{let n=y.current;n&&t(()=>n(e,T))}),n.addEventListener(`dragstart`,e=>b.current?.call(b,e,T)),n.addEventListener(`dragover`,e=>{let n=x.current;n&&t(()=>n(e,T))}),n.addEventListener(`dragmove`,e=>{let n=S.current;n&&t(()=>n(e,T))}),n.addEventListener(`dragend`,e=>{let n=C.current;n&&t(()=>n(e,T))}),n.addEventListener(`collision`,e=>w.current?.call(w,e,T))];return()=>r.forEach(e=>e())},[T]),hQ(h,()=>T&&(T.plugins=h),...kQ),hQ(g,()=>T&&(T.sensors=g),...kQ),hQ(v,()=>T&&(T.modifiers=v),...kQ),(0,n.jsxs)(DQ.Provider,{value:T,children:[(0,n.jsx)(OQ,{ref:d,children:r}),r]})}function jQ(e){let t=(0,_.useRef)(null);return t.current||=e(),(0,_.useInsertionEffect)(()=>()=>t.current?.destroy(),[]),t.current}function MQ(){return(0,_.useContext)(DQ)}function NQ(e){let t=MQ()??void 0,[n]=(0,_.useState)(()=>e(t));return n.manager!==t&&(n.manager=t),lQ(n.register,[t,n]),n}function PQ(e){let{disabled:t,data:n,element:r,handle:i,id:a,modifiers:o,sensors:s,plugins:c}=e,l=NQ(t=>new YZ(TQ(wQ({},e),{register:!1,handle:cQ(i),element:cQ(r)}),t)),u=pQ(l,FQ);return hQ(a,()=>l.id=a),gQ(i,e=>l.handle=e),gQ(r,e=>l.element=e),hQ(n,()=>n&&(l.data=n)),hQ(t,()=>l.disabled=t===!0),hQ(s,()=>l.sensors=s),hQ(o,()=>l.modifiers=o,void 0,SU),hQ(c,()=>l.plugins=c,void 0,SU),hQ(e.alignment,()=>l.alignment=e.alignment),{draggable:u,get isDragging(){return u.isDragging},get isDropping(){return u.isDropping},get isDragSource(){return u.isDragSource},handleRef:(0,_.useCallback)(e=>{l.handle=e??void 0},[l]),ref:(0,_.useCallback)(e=>{!e&&l.element?.isConnected&&!l.manager?.dragOperation.status.idle||(l.element=e??void 0)},[l])}}function FQ(e,t,n){return!!(e===`isDragSource`&&!n&&t)}function IQ({children:e,className:t,dropAnimation:r,style:i,tag:a,disabled:o}){let s=(0,_.useRef)(null),c=MQ(),l=fQ(()=>c?.dragOperation.source,[c]).value??null,u=typeof o==`function`?o(l):o;(0,_.useEffect)(()=>{if(!s.current||!c||u)return;let e=c.plugins.find(e=>e instanceof HX);if(e)return e.overlay=s.current,()=>{e.overlay=void 0}},[c,u]),(0,_.useEffect)(()=>{if(!c)return;let e=c.plugins.find(e=>e instanceof HX);if(e)return e.dropAnimation=r,()=>{e.dropAnimation=void 0}},[c,r]);let d=(0,_.useMemo)(()=>{if(!c)return null;let e=new Proxy(c.registry,{get(e,t){return t===`register`||t===`unregister`?LQ:e[t]}});return new Proxy(c,{get(t,n){return n===`registry`?e:t[n]}})},[c]);return(0,n.jsx)(DQ.Provider,{value:d,children:(0,_.createElement)(a||`div`,{ref:s,className:t,style:i,"data-dnd-overlay":!0},f())});function f(){return!l||u?null:typeof e==`function`?(0,n.jsx)(RQ,{source:l,children:e}):e}}function LQ(){return()=>{}}function RQ({children:e,source:t}){return e(pQ(t))}var zQ=Object.create,BQ=Object.defineProperty,VQ=Object.getOwnPropertyDescriptor,HQ=(e,t)=>(t=Symbol[e])?t:Symbol.for(`Symbol.`+e),UQ=e=>{throw TypeError(e)},WQ=(e,t,n)=>t in e?BQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,GQ=e=>[,,,zQ(e?.[HQ(`metadata`)]??null)],KQ=[`class`,`method`,`getter`,`setter`,`accessor`,`field`,`value`,`get`,`set`],qQ=e=>e!==void 0&&typeof e!=`function`?UQ(`Function expected`):e,JQ=(e,t,n,r,i)=>({kind:KQ[e],name:t,metadata:r,addInitializer:e=>n._?UQ(`Already initialized`):i.push(qQ(e||null))}),YQ=(e,t)=>WQ(t,HQ(`metadata`),e[3]),XQ=(e,t,n,r)=>{for(var i=0,a=e[t>>1],o=a&&a.length;i<o;i++)a[i].call(n);return r},ZQ=(e,t,n,r,i,a)=>{for(var o,s,c,l,u=t&7,d=!1,f=!1,p=2,m=KQ[u+5],h=e[p]||(e[p]=[]),g=(i=i.prototype,VQ(i,n)),_=r.length-1;_>=0;_--)c=JQ(u,n,s={},e[3],h),c.static=d,c.private=f,l=c.access={has:e=>n in e},l.get=e=>e[n],o=(0,r[_])(g[m],c),s._=1,qQ(o)&&(g[m]=o);return g&&BQ(i,n,g),i},QQ=(e,t,n)=>t.has(e)||UQ(`Cannot `+n),$Q=(e,t,n)=>(QQ(e,t,`read from private field`),t.get(e)),e$=(e,t,n)=>t.has(e)?UQ(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),t$=(e,t,n,r)=>(QQ(e,t,`write to private field`),t.set(e,n),n),n$=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},r$,i$,a$,o$,s$,c$=class extends (a$=qU,i$=[wU],r$=[wU],a$){constructor(e){let t=n$.from(e);super(t,(e,t)=>n$.equals(e,t)),XQ(s$,5,this),e$(this,o$,0),this.velocity={x:0,y:0}}get delta(){return n$.delta(this.current,this.initial)}get direction(){let{current:e,previous:t}=this;if(!t)return null;let n={x:e.x-t.x,y:e.y-t.y};return!n.x&&!n.y?null:Math.abs(n.x)>Math.abs(n.y)?n.x>0?`right`:`left`:n.y>0?`down`:`up`}get current(){return super.current}set current(e){let{current:t}=this,n=n$.from(e),r={x:n.x-t.x,y:n.y-t.y},i=Date.now(),a=i-$Q(this,o$),o=e=>Math.round(e/a*100);wH(()=>{t$(this,o$,i),this.velocity={x:o(r.x),y:o(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(n$.from(e)),this.velocity={x:0,y:0}}};s$=GQ(a$),o$=new WeakMap,ZQ(s$,2,`delta`,i$,c$),ZQ(s$,2,`direction`,r$,c$),YQ(s$,c$);var l$=(e=>(e.Horizontal=`x`,e.Vertical=`y`,e))(l$||{});Object.values(l$);var u$=({dragOperation:e,droppable:t})=>{let n=e.position.current;if(!n)return null;let{id:r}=t;return t.shape&&t.shape.containsPoint(n)?{id:r,value:1/n$.distance(t.shape.center,n),type:fK.PointerIntersection,priority:dK.High}:null},d$=({dragOperation:e,droppable:t})=>{let{shape:n}=e;if(!t.shape||!n?.current)return null;let r=n.current.intersectionArea(t.shape);if(r){let{position:i}=e,a=n$.distance(t.shape.center,i.current),o=r/(n.current.area+t.shape.area-r)/a;return{id:t.id,value:o,type:fK.ShapeIntersection,priority:dK.Normal}}return null},f$=e=>u$(e)??d$(e);function p$(e){let{collisionDetector:t,data:n,disabled:r,element:i,id:a,accept:o,type:s}=e,c=NQ(t=>new oQ(TQ(wQ({},e),{register:!1,element:cQ(i)}),t)),l=pQ(c);return hQ(a,()=>c.id=a),gQ(i,e=>c.element=e),hQ(o,()=>c.accept=o,void 0,SU),hQ(t,()=>c.collisionDetector=t??f$),hQ(n,()=>n&&(c.data=n)),hQ(r,()=>c.disabled=r===!0),hQ(s,()=>c.type=s),{droppable:l,get isDropTarget(){return l.isDropTarget},ref:(0,_.useCallback)(e=>{!e&&c.element?.isConnected&&!c.manager?.dragOperation.status.idle||(c.element=e??void 0)},[c])}}Z();var m$=_.default.createContext(null),h$=({table:e,dataSet:t,setDataSet:r,className:i,children:a,ref:o,...s})=>{let[c,l]=_.default.useState({data:[]}),[u,d]=_.default.useState(null),f=t??c,p=r??l;return(0,n.jsx)(AQ,{onDragStart:({operation:{source:e}})=>{d(e?.data.nodeId??null)},onDragEnd:({operation:{source:e,target:t}})=>{if(d(null),!t)return;let n=e?.data.nodeId,r=t.data.folderId;if(!(!n||n===r)){if(r===`root`){p(e=>({...e,data:xH(e.data,n)}));return}p(e=>({...e,data:bH(e.data,n,r)}))}},plugins:e=>[...e,HX.configure({dropAnimation:null})],children:(0,n.jsx)(m$.Provider,{value:{table:e,className:i,children:a,ref:o,...s,dataSet:f,setDataSet:p,draggingNodeId:u},children:(0,n.jsxs)(`div`,{className:X(`flex flex-col justify-between`,i),ref:o,...s,children:[a,(0,n.jsx)(IQ,{children:t=>(0,n.jsxs)(`div`,{className:X(`relative rounded-md border border-neutral-border bg-neutral-container px-xs py-3xs opacity-80 shadow-md transition-opacity`),children:[e.getRow(String(t.id)).renderValue(`name`)??t.id,(0,n.jsx)(qP,{className:`absolute -top-xs -right-xs`,size:`iconSmall`,children:e.getRow(String(t.id))?.subRows.length+1})]})})]})})})},g$=()=>{let e=_.default.useContext(m$);if(!e)throw Error(`useLayerTree must be used within a LayerTreeProvider`);return e};function _$(e,t){return e?v$(e)?_.createElement(e,t):e:null}function v$(e){return y$(e)||typeof e==`function`||b$(e)}function y$(e){return typeof e==`function`&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function b$(e){return typeof e==`object`&&typeof e.$$typeof==`symbol`&&[`react.memo`,`react.forward_ref`].includes(e.$$typeof.description)}Z();var x$=({row:e,className:t,children:r,ref:i,...a})=>(0,n.jsxs)(`div`,{className:X(`flex items-center justify-between gap-3xs`,t),ref:i,...a,children:[r,e.getVisibleCells().map(e=>(0,n.jsx)(`div`,{style:{width:e.column.getSize()===0?`auto`:e.column.getSize(),minWidth:e.column.columnDef.minSize,maxWidth:e.column.columnDef.maxSize},children:_$(e.column.columnDef.cell,e.getContext())},e.id))]});Z();var S$=({className:e,children:t,...r})=>{let{table:i}=g$(),{isDropTarget:a,ref:o}=p$({id:`root-dropzone`,data:{folderId:`root`,nodeId:`root`}});return(0,n.jsxs)(`div`,{className:X(`flex grow flex-col`,e),...r,children:[t,(0,n.jsx)(`ul`,{className:`flex flex-col gap-xs`,children:i.getRowModel().rows.map(e=>(0,n.jsx)(x$,{row:e},e.id))}),(0,n.jsx)(`div`,{ref:o,className:X(`grow`,a&&`rounded-lg bg-success-container ring-1 ring-success-default ring-inset`)})]})};sL(),dP(),Z();var C$=({className:e,ref:t,...r})=>{let{table:i}=g$();return(0,n.jsx)(lP,{size:`iconMedium`,tone:`neutral`,variant:`ghost`,onClick:()=>{i.getIsSomeRowsExpanded()?i.toggleAllRowsExpanded(!1):i.toggleAllRowsExpanded(!0)},className:X(``,e),ref:t,...r,children:i.getIsSomeRowsExpanded()?(0,n.jsx)(NI,{}):(0,n.jsx)(jI,{})})};sL(),Z();var w$=({className:e,children:t,row:r,icon:i,dndDisabled:a,...o})=>{let{table:s,draggingNodeId:c}=g$(),l=r.getCanExpand(),{ref:u,isDragging:d}=PQ({id:r.id,data:{isFolder:l,nodeId:r.id},disabled:a}),{ref:f,isDropTarget:p}=p$({id:`folder:${r.id}`,data:{folderId:r.id,isFolder:l},disabled:a}),m=r.depth*24,h=_.default.useCallback(e=>{u(e),f(e)},[u,f]),g=()=>{if(l){r.toggleExpanded();return}r.getCanSelect()&&(s.resetRowSelection(),r.toggleSelected())},v=_.default.useMemo(()=>{if(!c)return!1;let e=r.getParentRow();for(;e;){if(e.id===c)return!0;e=e.getParentRow()}return!1},[c,r]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(`button`,{type:`button`,onClick:g,style:{marginLeft:m,width:`calc(100% - ${m}px)`},className:X(`flex h-lg min-w-0 items-center justify-start gap-2xs truncate rounded-lg px-xs style-text-default-0 transition-all hover:cursor-pointer [&>svg]:size-sm [&>svg]:shrink-0`,l&&p&&`bg-success-container text-success-on-container ring ring-success-border`,r.getIsSelected()?`bg-brand-default text-brand-on-default`:`hover:bg-brand-container hover:text-brand-on-container`,(d||v)&&`opacity-60`,e),ref:h,...o,children:[l?r.getIsExpanded()?(0,n.jsx)(jI,{weight:`bold`}):(0,n.jsx)(kI,{weight:`fill`}):i?(0,n.jsx)(i,{weight:`bold`}):null,t]})})};dP(),Z();var T$=({value:e,columnId:t,rows:r,children:i,className:a,ref:o,...s})=>{let{setDataSet:c}=g$();return(0,n.jsx)(lP,{tone:`neutral`,size:`iconSmall`,variant:`ghost`,className:X(``,a),ref:o,onClick:()=>{r.forEach(n=>{n.original[t]=!e}),c(e=>({...e,data:[...e.data]}))},...s,children:i(e)})};sL(),IL(),Z();var E$=({placeholder:e,className:t,children:r,ref:i,...a})=>{let{table:o}=g$();return(0,n.jsxs)(AL,{className:X(``,t),ref:i,...a,children:[(0,n.jsx)(ML,{children:(0,n.jsx)(VI,{weight:`bold`})}),(0,n.jsx)(PL,{placeholder:e,onChange:e=>o.setGlobalFilter(e.target.value),value:o.getState().globalFilter??``}),r]})};Z();var D$=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`flex flex-col gap-3xs`,e),ref:r,...i,children:t});Px();var O$=({children:e,...t})=>(0,n.jsx)(qb,{...t,children:e});Px(),sL(),Z();var k$=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)($y,{className:X(`rounded-md`,`grid cursor-default grid-cols-[1fr_2rem] items-center px-2xs py-3xs style-text-default-0 outline-none select-none before:absolute before:inset-[0px] before:z-[-1] before:rounded-md before:content-[""] hover:cursor-pointer data-highlighted:relative data-highlighted:z-0 data-highlighted:text-neutral-on-container data-highlighted:before:bg-neutral-container-high`,e),ref:r,...i,children:[(0,n.jsx)(`span`,{className:`col-start-1`,children:t}),(0,n.jsx)(tb,{className:`col-start-2 flex items-center justify-center place-self-end self-center`,children:(0,n.jsx)(xI,{className:`size-sm`,weight:`bold`})})]});Px(),Z();var A$=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(ob,{className:X(``,e),ref:r,...i,children:t});Px(),Z();var j$=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(cb,{className:X(`cursor-default px-2xs py-3xs style-text-default--2 text-on-surface-variant select-none`,e),ref:r,...i,children:t});Ao();var M$=ko(`flex cursor-default items-center px-sm py-3xs style-text-default-0 outline-none select-none before:outline before:outline-transparent hover:cursor-pointer data-highlighted:relative data-highlighted:z-0 data-highlighted:before:absolute data-highlighted:before:inset-x-3xs data-highlighted:before:inset-y-[0px] data-highlighted:before:z-[-1] data-highlighted:before:rounded-md`,{variants:{tone:{brand:`text-brand-default data-highlighted:text-brand-on-container data-highlighted:before:bg-brand-container`,accent:`text-accent-default data-highlighted:text-accent-on-container data-highlighted:before:bg-accent-container`,neutral:`text-on-surface data-highlighted:text-neutral-on-container data-highlighted:before:bg-neutral-container-high`,error:`text-error-default data-highlighted:text-error-on-container data-highlighted:before:bg-error-container`,info:`text-info-default data-highlighted:text-info-on-container data-highlighted:before:bg-info-container`,success:`text-success-default data-highlighted:text-success-on-container data-highlighted:before:bg-success-container`,warning:`text-warning-default data-highlighted:text-warning-on-container data-highlighted:before:bg-warning-container`}},defaultVariants:{tone:`neutral`}}),N$=ko(`grid cursor-default grid-cols-[1fr_2rem] items-center px-sm py-3xs style-text-default-0 outline-none select-none before:outline before:outline-transparent hover:cursor-pointer data-highlighted:relative data-highlighted:z-0 data-highlighted:before:absolute data-highlighted:before:inset-x-3xs data-highlighted:before:inset-y-[0px] data-highlighted:before:z-[-1] data-highlighted:before:rounded-md data-popup-open:relative data-popup-open:z-0 data-popup-open:before:absolute data-popup-open:before:inset-x-3xs data-popup-open:before:inset-y-[0px] data-popup-open:before:z-[-1] data-popup-open:before:rounded-sm`,{variants:{tone:{brand:`text-brand-default data-highlighted:text-brand-on-container data-highlighted:before:bg-brand-container data-popup-open:text-brand-on-container data-popup-open:before:bg-brand-container data-[highlighted]:data-[popup-open]:before:bg-brand-container`,accent:`text-accent-default data-highlighted:text-accent-on-container data-highlighted:before:bg-accent-container data-popup-open:text-accent-on-container data-popup-open:before:bg-accent-container data-[highlighted]:data-[popup-open]:before:bg-accent-container`,neutral:`text-on-surface data-highlighted:text-neutral-on-container data-highlighted:before:bg-neutral-container-high data-popup-open:text-neutral-on-container data-popup-open:before:bg-neutral-container-high data-[highlighted]:data-[popup-open]:before:bg-neutral-container-high`,error:`text-error-default data-highlighted:text-error-on-container data-highlighted:before:bg-error-container data-popup-open:text-error-on-container data-popup-open:before:bg-error-container data-[highlighted]:data-[popup-open]:before:bg-error-container`,info:`text-info-default data-highlighted:text-info-on-container data-highlighted:before:bg-info-container data-popup-open:text-info-on-container data-popup-open:before:bg-info-container data-[highlighted]:data-[popup-open]:before:bg-info-container`,success:`text-success-default data-highlighted:text-success-on-container data-highlighted:before:bg-success-container data-popup-open:text-success-on-container data-popup-open:before:bg-success-container data-[highlighted]:data-[popup-open]:before:bg-success-container`,warning:`text-warning-default data-highlighted:text-warning-on-container data-highlighted:before:bg-warning-container data-popup-open:text-warning-on-container data-popup-open:before:bg-warning-container data-[highlighted]:data-[popup-open]:before:bg-warning-container`}},defaultVariants:{tone:`neutral`}});Px(),Z();var P$=({tone:e,className:t,children:r,ref:i,...a})=>(0,n.jsx)(ub,{className:X(M$({tone:e}),t),ref:i,...a,children:(0,n.jsx)(`div`,{className:`flex w-full items-center gap-2xs [&>svg]:size-sm`,children:r})});Px(),Z();var F$=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(xb,{children:(0,n.jsx)(Cb,{className:X(`outline-none`,e),ref:r,sideOffset:8,...i,children:(0,n.jsx)(gb,{className:`w-[calc(100%+var(--spacing-xl))] origin-(--transform-origin) translate-x-[-calc(var(--spacing-xl)/2)] rounded-md bg-surface-2 px-3xs py-2xs shadow-md transition-[transform,scale,opacity] data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0`,children:t})})});Px(),Z();var I$=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Ob,{className:X(``,e),ref:r,...i,children:t});Px(),sL(),Z();var L$=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(Nb,{className:X(`rounded-md`,`grid cursor-default grid-cols-[1fr_2rem] items-center px-2xs py-3xs style-text-default-0 outline-none select-none before:absolute before:inset-[0px] before:z-[-1] before:rounded-md before:content-[""] hover:cursor-pointer data-highlighted:relative data-highlighted:z-0 data-highlighted:text-neutral-on-container data-highlighted:before:bg-neutral-container-high`,e),ref:r,...i,children:[(0,n.jsx)(`span`,{className:`col-start-1 min-w-3xl`,children:t}),(0,n.jsx)(Fb,{className:`col-start-2 flex items-center justify-center place-self-end self-center`,children:(0,n.jsx)(xI,{className:`size-sm`,weight:`bold`})})]});Px(),Z();var R$=({className:e,ref:t,...r})=>(0,n.jsx)(Z_,{className:X(`mx-2xs my-3xs h-px bg-border-strong`,e),ref:t,...r});Z();var z$=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`ml-auto inline-flex items-center gap-3xs`,e),ref:r,...i,children:t});Px();var B$=({children:e,...t})=>(0,n.jsx)(Yb,{...t,children:e});Px(),sL(),Z();var V$=({tone:e,className:t,children:r,ref:i,...a})=>(0,n.jsxs)(jx,{className:X(N$({tone:e}),t),ref:i,...a,children:[(0,n.jsx)(`span`,{className:`col-start-1 min-w-3xl pr-2xl`,children:r}),(0,n.jsx)(hI,{className:`col-start-2 size-xs place-self-end self-center`,weight:`bold`})]});Px(),Z();var H$=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(ux,{className:X(`data-popup-open:pointer-events-none`,e),ref:r,...i,render:t});sL(),dP(),Z();var U$=({className:e,children:t,ref:r,...i})=>{let{table:a}=g$(),o=(e,t)=>{t.toggleSorting(e!==`asc`,t.getCanMultiSort())};return(0,n.jsxs)(O$,{children:[(0,n.jsx)(H$,{children:(0,n.jsxs)(lP,{size:`iconMedium`,tone:`neutral`,variant:`ghost`,className:X(``,e),ref:r,...i,children:[t,(0,n.jsx)(aI,{})]})}),(0,n.jsx)(F$,{children:(0,n.jsxs)(A$,{children:[(0,n.jsx)(j$,{children:`Sort By`}),a.getAllColumns().filter(e=>e.getCanSort()&&e.getIsVisible()).map(e=>(0,n.jsxs)(B$,{children:[(0,n.jsx)(V$,{className:`capitalize`,children:e.id}),(0,n.jsx)(F$,{children:(0,n.jsxs)(I$,{onValueChange:t=>o(t,e),value:e.getIsSorted(),children:[(0,n.jsxs)(L$,{value:`asc`,children:[(0,n.jsx)(YI,{}),` Ascending`]}),(0,n.jsxs)(L$,{value:`desc`,children:[(0,n.jsx)(ZI,{}),` Descending`]})]},e.id)})]},e.id))]})})]})};Ao();var W$=ko(``,{variants:{orientation:{horizontal:`flex items-center justify-between gap-xs [&_[data-track]]:w-full [&_button]:shrink-0`,vertical:`flex flex-col space-y-3xs`},size:{small:`[&_[data-track]]:h-3xs`,medium:`[&_[data-track]]:h-2xs`,large:`[&_[data-track]]:h-xs`},tone:{brand:`[&_[data-indicator]]:bg-brand-default`,accent:`[&_[data-indicator]]:bg-accent-default`,neutral:`[&_[data-indicator]]:bg-neutral-default`,error:`[&_[data-indicator]]:bg-error-default`,info:`[&_[data-indicator]]:bg-info-default`,success:`[&_[data-indicator]]:bg-success-default`,warning:`[&_[data-indicator]]:bg-warning-default`}},defaultVariants:{orientation:`vertical`,size:`medium`,tone:`brand`}});aP(),Z();var G$=({orientation:e,size:t,tone:r,className:i,children:a,ref:o,...s})=>(0,n.jsx)(Cw,{className:X(W$({orientation:e,size:t,tone:r,className:i})),ref:o,...s,children:a});Z();var K$=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`flex items-center justify-between`,e),ref:r,...i,children:t});aP(),Z();var q$=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(kw,{"data-indicator":!0,className:X(`rounded-full`,e),ref:r,...i,children:t});aP(),Z();var J$=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Nw,{className:X(`flex items-center gap-2xs style-text-strong--1 text-on-surface [&>svg]:size-xs`,e),ref:r,...i,children:t});aP(),Z();var Y$=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Tw,{className:X(`w-full self-center rounded-full bg-surface-low inset-shadow-2xs`,e),"data-track":!0,ref:r,...i,children:t});aP(),Z();var X$=({className:e,ref:t,...r})=>(0,n.jsx)(jw,{className:X(`ml-auto text-right style-text-prose--2 text-on-surface-variant`,e),ref:t,...r});Z();var Z$=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`flex items-center justify-between`,e),ref:r,...i,children:t});Z();var Q$=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`span`,{className:X(`text-left style-text-prose--2 whitespace-nowrap text-on-surface-variant`,e),ref:r,...i,children:t});Ao();var $$=ko(`flex flex-col gap-3xs data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 [&_[role="group"]]:rounded-full [&_[role="group"]]:bg-surface [&_[role="group"]]:p-3xs [&_[role="group"]]:shadow-2xs [&_[role="group"]]:outline [&_[role="group"]]:outline-transparent [&_[role="group"]]:transition-all aria-invalid:[&_[role="group"]]:bg-error-container aria-invalid:[&_[role="group"]]:outline-error-border aria-invalid:[&_[role="group"]]:focus-within:outline-error-border-strong aria-invalid:[&_[role="group"]]:not-focus-within:hover:outline-error-border data-[disabled]:[&_[role="group"]]:cursor-not-allowed data-[invalid]:[&_[role="group"]]:bg-error-container data-[invalid]:[&_[role="group"]]:outline-error-border data-[invalid]:[&_[role="group"]]:focus-within:outline-error-border-strong data-[invalid]:[&_[role="group"]]:not-focus-within:hover:outline-error-border aria-invalid:[&_input]:text-error-on-container aria-invalid:[&_input]:caret-error-border-strong data-[invalid]:[&_input]:text-error-on-container data-[invalid]:[&_input]:caret-error-border-strong`,{variants:{size:{small:`[&_input]:style-text-default-0`,medium:`[&_input]:style-text-default-1`,large:`[&_input]:style-text-default-2`}},defaultVariants:{size:`medium`}});vE(),sL(),dP(),Z();var e1=({label:e,size:t,className:r,ref:i,...a})=>{let o=_.default.useId(),{min:s,max:c,value:l,defaultValue:u,onValueChange:d,"aria-invalid":f,...p}=a,[m,h]=_.default.useState(()=>typeof u==`number`?u:null),g=typeof l==`number`||l===null?l:m,v=!!(f||typeof g==`number`&&(typeof s==`number`&&g<s||typeof c==`number`&&g>c)),y=(...e)=>{let[t]=e;typeof l!=`number`&&l!==null&&h(t),d?.(...e)},b=()=>{switch(t){case`small`:return`iconSmall`;case`medium`:return`iconMedium`;case`large`:return`iconLarge`;default:return`iconMedium`}};return(0,n.jsxs)(NT,{className:X($$({size:t,className:r})),ref:i,"aria-invalid":v,"data-invalid":v?``:void 0,defaultValue:u,id:o,max:c,min:s,onValueChange:y,value:l,...p,children:[(0,n.jsxs)(pE,{className:`cursor-ew-resize`,children:[(0,n.jsx)(`label`,{className:`cursor-ew-resize style-text-default--1`,htmlFor:o,children:e}),(0,n.jsx)(hE,{children:(0,n.jsx)(t1,{})})]}),(0,n.jsxs)(FT,{className:`flex w-full items-center`,children:[(0,n.jsx)(eE,{render:e=>(0,n.jsx)(lP,{...e,tone:`error`,variant:`ghost`,size:b(),className:`shrink-0`,children:(0,n.jsx)(UI,{weight:`bold`})})}),(0,n.jsx)(iE,{className:`w-full text-center style-text-default-0 focus:outline-none`}),(0,n.jsx)(QT,{render:e=>(0,n.jsx)(lP,{...e,tone:`success`,variant:`ghost`,size:b(),className:`shrink-0`,children:(0,n.jsx)(GI,{weight:`bold`})})})]})]})};function t1(e){return(0,n.jsxs)(`svg`,{fill:`black`,height:`14`,stroke:`white`,viewBox:`0 0 24 14`,width:`26`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,n.jsx)(`title`,{children:`Resize cursor`}),(0,n.jsx)(`path`,{d:`M19.5 5.5L6.49737 5.51844V2L1 6.9999L6.5 12L6.49737 8.5L19.5 8.5V12L25 6.9999L19.5 2V5.5Z`})]})}MD();var n1=({children:e,...t})=>(0,n.jsx)(YE,{...t,children:e});MD(),Z();var r1=({className:e,ref:t,children:r,...i})=>(0,n.jsx)(xD,{className:X(`style-text-prose--1`,e),ref:t,...i,children:r});MD(),Z();var i1=({className:e,ref:t,children:r,...i})=>(0,n.jsx)(rD,{children:(0,n.jsx)(cD,{className:X(`h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom,transform] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none`),ref:t,sideOffset:8,...i,children:(0,n.jsxs)(hD,{className:`relative h-(--popup-height,auto) w-(--popup-width,auto) max-w-[500px] origin-(--transform-origin) overflow-hidden rounded-xl bg-surface-2 text-on-surface shadow-md transition-[width,height,opacity,scale] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-ending-style:scale-90 data-ending-style:opacity-0 data-instant:transition-none data-starting-style:scale-90 data-starting-style:opacity-0`,children:[(0,n.jsx)(_D,{className:`flex transition-[left] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180`}),(0,n.jsx)(ED,{className:X(`relative h-(--popup-height,auto) w-(--popup-width,auto) max-w-full overflow-clip p-[1.5rem] transition-[width,height] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] **:data-current:w-[calc(var(--popup-width)-3rem)] **:data-current:translate-x-0 **:data-current:opacity-100 **:data-current:transition-[translate,opacity] **:data-current:duration-[350ms,175ms] **:data-current:ease-[cubic-bezier(0.22,1,0.36,1)] **:data-previous:w-[calc(var(--popup-width)-3rem)] **:data-previous:translate-x-0 **:data-previous:opacity-100 **:data-previous:transition-[translate,opacity] **:data-previous:duration-[350ms,175ms] **:data-previous:ease-[cubic-bezier(0.22,1,0.36,1)] **:data-[activation-direction~='left']:data-previous:data-ending-style:translate-x-1/2 **:data-[activation-direction~='left']:data-previous:data-ending-style:opacity-0 **:data-[activation-direction~='left']:data-current:data-starting-style:-translate-x-1/2 **:data-[activation-direction~='left']:data-current:data-starting-style:opacity-0 **:data-[activation-direction~='right']:data-previous:data-ending-style:-translate-x-1/2 **:data-[activation-direction~='right']:data-previous:data-ending-style:opacity-0 **:data-[activation-direction~='right']:data-current:data-starting-style:translate-x-1/2 **:data-[activation-direction~='right']:data-current:data-starting-style:opacity-0`,e),children:r})]})})});MD(),Z();var a1=({className:e,ref:t,children:r,...i})=>(0,n.jsx)(yD,{className:X(`flex items-center gap-2xs style-text-strong-0 [&>svg]:size-sm`,e),ref:t,...i,children:r});MD(),Z();var o1=({className:e,ref:t,children:r,...i})=>(0,n.jsx)(QE,{className:X(`px-xs`,e),ref:t,...i,render:r});Z();var s1=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`flex flex-col gap-3xs pb-xs`,e),ref:r,...i,children:t});Z();var c1=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`space-y-3xs`,e),ref:r,...i,children:t});dP(),Z();var l1=({variant:e,tone:t,className:r,children:i,ref:a,...o})=>e===`ghost`&&t===`neutral`?(0,n.jsx)(lP,{variant:e,tone:t,className:X(`hover:bg-neutral-container-high!`,r),ref:a,...o,children:i}):(0,n.jsx)(lP,{variant:e,tone:t,className:X(``,r),ref:a,...o,children:i});MD();var u1=OD();Z();var d1=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`flex w-full items-center gap-sm rounded-full`,e),ref:r,...i,children:t});Z();var f1=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`span`,{className:X(`flex items-center gap-xs style-text-default-0 [&>svg]:size-md`,e),ref:r,...i,children:t});Z();var p1=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`span`,{className:X(`style-text-default--2 text-on-surface-variant`,e),ref:r,...i,children:t});Z();var m1=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`ml-auto text-on-surface-variant [&>svg]:size-sm`,e),ref:r,...i,children:t});Z();var h1=({compact:e,className:t,children:r,ref:i,...a})=>(0,n.jsx)(`div`,{className:X(`flex flex-col items-start justify-start gap-3xs`,e&&`hidden`,t),ref:i,...a,children:r});Z();var g1=({currentIndex:e,className:t,children:r,ref:i,...a})=>{let o=`progress-${(0,_.useId)().replace(/:/g,``)}`,s=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`style`,{children:`
115
+ `.replace(/\n+/g,` `).replace(/\s+/g,` `).trim();function Xfe(e,t=`hidden`){return z0(()=>{let{element:n,manager:r}=e;if(!n||!r)return;let i=Zfe(n,r.registry.droppables),a=[],o=Hde(n),{remove:s}=o;return Qfe(i,o,a),$fe(o,t),o.remove=()=>{a.forEach(e=>e()),s.call(o)},o})}function Zfe(e,t){let n=new Map;for(let r of t)if(r.element&&(e===r.element||e.contains(r.element))){let e=`${w5}${R8(`dom-id`)}`;r.element.setAttribute(e,``),n.set(r,e)}return n}function Qfe(e,t,n){for(let[r,i]of e){if(!r.element)continue;let e=`[${i}]`,a=t.matches(e)?t:t.querySelector(e);if(r.element.removeAttribute(i),!a)continue;let o=r.element;r.proxy=a,a.removeAttribute(i),K6.set(o,a),n.push(()=>{K6.delete(o),r.proxy=void 0})}}function $fe(e,t=`hidden`){e.setAttribute(`inert`,`true`),e.setAttribute(`tab-index`,`-1`),e.setAttribute(`aria-hidden`,`true`),e.setAttribute(O5,t)}function k5(e,t){return e===t?!0:J6(e)===J6(t)}function A5(e){let{target:t}=e;`newState`in e&&e.newState===`closed`&&F8(t)&&t.hasAttribute(`popover`)&&requestAnimationFrame(()=>v8(t))}function j5(e){return e.tagName===`TR`}function epe(e,t,n){let r=new MutationObserver(r=>{let i=!1;for(let n of r){if(n.target!==e){i=!0;continue}if(n.type!==`attributes`)continue;let r=n.attributeName;if(r.startsWith(`aria-`)||qfe.includes(r))continue;let a=e.getAttribute(r);if(r===`style`){if(P8(e)&&P8(t)){let n=e.style;for(let e of Array.from(t.style))n.getPropertyValue(e)===``&&t.style.removeProperty(e);for(let e of Array.from(n)){if(Jfe.includes(e)||e.startsWith(E5))continue;let r=n.getPropertyValue(e);t.style.setProperty(e,r)}}}else a===null?t.removeAttribute(r):t.setAttribute(r,a)}i&&n&&t.replaceChildren(...e.cloneNode(!0).childNodes)});return r.observe(e,{attributes:!0,subtree:!0,childList:!0}),r}function tpe(e,t,n){let r=new MutationObserver(r=>{for(let i of r)if(i.addedNodes.length!==0)for(let r of Array.from(i.addedNodes)){if(r.contains(e)&&e.nextElementSibling!==t){e.insertAdjacentElement(`afterend`,t),v8(n);return}if(r.contains(t)&&t.previousElementSibling!==e){t.insertAdjacentElement(`beforebegin`,e),v8(n);return}}e.isConnected&&t.isConnected&&e.nextElementSibling!==t&&(e.insertAdjacentElement(`afterend`,t),v8(n))});return r.observe(e.ownerDocument.body,{childList:!0,subtree:!0}),r}function npe(e){return new ResizeObserver(()=>{var t;let n=new N8(e.placeholder,{frameTransform:e.frameTransform,ignoreTransforms:!0}),r=e.transformOrigin??{x:1,y:1},i=(e.width-n.width)*r.x+e.delta.x,a=(e.height-n.height)*r.y+e.delta.y,o=z6();if(e.styles.set({width:n.width-e.widthOffset,height:n.height-e.heightOffset,top:e.top+a+o.y,left:e.left+i+o.x},E5),(t=e.getElementMutationObserver())==null||t.takeRecords(),j5(e.element)&&j5(e.placeholder)){let t=Array.from(e.element.cells),n=Array.from(e.placeholder.cells);e.getSavedCellWidths()||e.setSavedCellWidths(t.map(e=>e.style.width));for(let[e,r]of t.entries()){let t=n[e];r.style.width=`${t.getBoundingClientRect().width}px`}}let s=e.getTranslate()??{x:0,y:0},c=e.left+i+o.x+s.x,l=e.top+a+o.y+s.y,u=n.width-e.widthOffset,d=n.height-e.heightOffset,f=e.frameTransform;e.dragOperation.shape=new c4(c*f.scaleX+f.x,l*f.scaleY+f.y,u*f.scaleX,d*f.scaleY)})}var rpe=250,ipe=`ease`;function ape(e){var t;let{animation:n}=e;if(typeof n==`function`){let t=n({source:e.source,element:e.element,feedbackElement:e.feedbackElement,placeholder:e.placeholder,translate:e.translate,moved:e.moved});Promise.resolve(t).then(()=>{e.cleanup(),requestAnimationFrame(e.restoreFocus)});return}let{duration:r=rpe,easing:i=ipe}=n??{};v8(e.feedbackElement);let[,a]=Rde(e.feedbackElement,e=>`translate`in e)??[];a?.pause();let o=e.placeholder??e.element,s={frameTransform:k5(e.feedbackElement,o)?null:void 0},c=new N8(e.feedbackElement,s),l=O8(w8(e.feedbackElement).translate)??e.translate,u=new N8(o,s),d=c4.delta(c,u,e.alignment),f={x:l.x-d.x,y:l.y-d.y},p=Math.round(c.intrinsicHeight)===Math.round(u.intrinsicHeight)?{}:{minHeight:[`${c.intrinsicHeight}px`,`${u.intrinsicHeight}px`],maxHeight:[`${c.intrinsicHeight}px`,`${u.intrinsicHeight}px`]},m=Math.round(c.intrinsicWidth)===Math.round(u.intrinsicWidth)?{}:{minWidth:[`${c.intrinsicWidth}px`,`${u.intrinsicWidth}px`],maxWidth:[`${c.intrinsicWidth}px`,`${u.intrinsicWidth}px`]};e.styles.set({transition:e.transition},E5),e.feedbackElement.setAttribute(T5,``),(t=e.getElementMutationObserver())==null||t.takeRecords(),_fe({element:e.feedbackElement,keyframes:q8(K8(K8({},p),m),{translate:[`${l.x}px ${l.y}px 0`,`${f.x}px ${f.y}px 0`]}),options:{duration:H6(k6(e.feedbackElement))?0:e.moved||e.feedbackElement!==e.element?r:0,easing:i}}).then(()=>{e.feedbackElement.removeAttribute(T5),a?.finish(),e.cleanup(),requestAnimationFrame(e.restoreFocus)})}var M5,N5,P5,F5,I5,L5,R5,z5=class extends (N5=K4,M5=[S2],N5){constructor(e,t){super(e,t),i5(this,I5),i5(this,F5,e5(P5,8,this)),e5(P5,11,this),this.state={initial:{},current:{}};let n=e.registry.plugins.get(C5),r=n?.register(Yfe);if(r){let e=this.destroy.bind(this);this.destroy=()=>{r(),e()}}this.registerEffect(o5(this,I5,L5).bind(this,n)),this.registerEffect(o5(this,I5,R5))}};P5=X8(N5),F5=new WeakMap,I5=new WeakSet,L5=function(e){let{overlay:t}=this;if(!t||!e)return;let n=V6(t);if(n)return e.addRoot(n)},R5=function(){let{state:e,manager:t,options:n}=this,{dragOperation:r}=t,{position:i,source:a,status:o}=r;if(o.idle){e.current={},e.initial={};return}if(!a)return;let{element:s}=a,c=a.pluginConfig(z5),l=c?.feedback??n?.feedback??`default`,u=typeof l==`function`?l(a,t):l;if(!s||u===`none`||!o.initialized||o.initializing)return;let{initial:d}=e,f=this.overlay??s,p=D8(f),m=D8(s),h=!k5(s,f),g=new N8(s,{frameTransform:h?m:null,ignoreTransforms:!h}),_={x:m.scaleX/p.scaleX,y:m.scaleY/p.scaleY},{width:v,height:y,top:b,left:x}=g;h&&(v/=_.x,y/=_.y);let S=new Cfe(f),C=w8(s),{transition:w,translate:T,boxSizing:E,paddingBlockStart:D,paddingBlockEnd:O,paddingInlineStart:k,paddingInlineEnd:A,borderInlineStartWidth:j,borderInlineEndWidth:M,borderBlockStartWidth:N,borderBlockEndWidth:P}=C,F=w.split(`,`).filter(e=>!/^\s*(transform|translate|scale)\b/.test(e)).join(`,`),I=k8(C),L=C.transform,R=u===`clone`,ee=E===`content-box`,z=ee?parseInt(k)+parseInt(A)+parseInt(j)+parseInt(M):0,B=ee?parseInt(D)+parseInt(O)+parseInt(N)+parseInt(P):0,V=u!==`move`&&!this.overlay?Xfe(a,R?`clone`:`hidden`):null,te=z0(()=>I8(t.dragOperation.activatorEvent));if(!d.translate){if(this.overlay&&I)d.translate={x:I.x,y:I.y};else if(T!==`none`){let e=O8(T);e&&(d.translate=e)}}if(!d.transformOrigin){let e=z0(()=>i.current),t=x+(I?.x??0),n=b+(I?.y??0);d.transformOrigin={x:(e.x-t*p.scaleX-p.x)/(v*p.scaleX),y:(e.y-n*p.scaleY-p.y)/(y*p.scaleY)}}let{transformOrigin:ne}=d,H=b*p.scaleY+p.y,re=x*p.scaleX+p.x;if(!d.coordinates&&(d.coordinates={x:re,y:H},_.x!==1||_.y!==1)){let{scaleX:e,scaleY:t}=m,{x:n,y:r}=ne;d.coordinates.x+=(v*e-v)*n,d.coordinates.y+=(y*t-y)*r}d.dimensions||={width:v,height:y},d.frameTransform||=p;let ie={x:d.coordinates.x-re,y:d.coordinates.y-H},U={width:(d.dimensions.width*d.frameTransform.scaleX-v*p.scaleX)*ne.x,height:(d.dimensions.height*d.frameTransform.scaleY-y*p.scaleY)*ne.y},ae={x:ie.x/p.scaleX+U.width,y:ie.y/p.scaleY+U.height},oe={left:x+ae.x,top:b+ae.y};f.setAttribute(D5,`true`);let se=z0(()=>r.transform),ce=d.translate??{x:0,y:0},le=se.x*p.scaleX+ce.x,W=se.y*p.scaleY+ce.y,G=z6();S.set({width:v-z,height:y-B,top:oe.top+G.y,left:oe.left+G.x,translate:`${le}px ${W}px 0`,transform:this.overlay?`none`:L,transition:F?`${F}, translate 0ms linear`:`translate 0ms linear`,scale:h?`${_.x} ${_.y}`:``,"transform-origin":`${ne.x*100}% ${ne.y*100}%`},E5),V&&(s.insertAdjacentElement(`afterend`,V),n?.rootElement&&(typeof n.rootElement==`function`?n.rootElement(a):n.rootElement).appendChild(s)),_8(f)&&(f.hasAttribute(`popover`)||f.setAttribute(`popover`,`manual`),v8(f),f.addEventListener(`beforetoggle`,A5));let ue,de,fe,pe=npe({placeholder:V,element:s,feedbackElement:f,frameTransform:p,transformOrigin:ne,width:v,height:y,top:b,left:x,widthOffset:z,heightOffset:B,delta:ae,styles:S,dragOperation:r,getTranslate:()=>e.current.translate,getElementMutationObserver:()=>ue,getSavedCellWidths:()=>fe,setSavedCellWidths:e=>{fe=e}}),me=new N8(f);z0(()=>r.shape=me);let he=k6(f),ge=e=>{this.manager.actions.stop({event:e})},_e=H6(he);te&&he.addEventListener(`resize`,ge),z0(()=>a.status)===`idle`&&requestAnimationFrame(()=>a.status=`dragging`),V&&(pe.observe(V),ue=epe(s,V,R),de=tpe(s,V,f));let ve=t.dragOperation.source?.id,ye=()=>{if(!te||ve==null)return;let e=t.registry.draggables.get(ve),n=e?.handle??e?.element;j6(n)&&n.focus()},be=()=>{if(ue?.disconnect(),de?.disconnect(),pe.disconnect(),he.removeEventListener(`resize`,ge),_8(f)&&(f.removeEventListener(`beforetoggle`,A5),f.removeAttribute(`popover`)),f.removeAttribute(D5),S.reset(),fe&&j5(s)){let e=Array.from(s.cells);for(let[t,n]of e.entries())n.style.width=fe[t]??``}a.status=`idle`;let t=e.current.translate!=null,n=r.status.dragging;V&&(!n&&t||V.parentElement!==f.parentElement)&&f.isConnected&&V.replaceWith(f),V?.remove()},xe=n?.dropAnimation,Se=this,Ce=T2(()=>{let{transform:t,status:i}=r;if(!(!t.x&&!t.y&&!e.current.translate)&&i.dragging){let i=d.translate??{x:0,y:0},a={x:t.x/p.scaleX+i.x,y:t.y/p.scaleY+i.y},o=e.current.translate,s=z0(()=>r.modifiers),c=z0(()=>r.shape?.current),l=n?.keyboardTransition,u=te&&!_e&&l!==null?`${l?.duration??250}ms ${l?.easing??`cubic-bezier(0.25, 1, 0.5, 1)`}`:`0ms linear`;if(S.set({transition:F?`${F}, translate ${u}`:`translate ${u}`,translate:`${a.x}px ${a.y}px 0`},E5),ue?.takeRecords(),c&&c!==me&&o&&!s.length){let e=s4.delta(a,o);r.shape=c4.from(c.boundingRectangle).translate(e.x*p.scaleX,e.y*p.scaleY)}else r.shape=new N8(f);e.current.translate=a}},function(){if(r.status.dropped){this.dispose(),a.status=`dropping`;let n=c?.dropAnimation===void 0?Se.dropAnimation===void 0?xe:Se.dropAnimation:c.dropAnimation,r=e.current.translate,i=r!=null;if(!r&&s!==f&&(r={x:0,y:0}),!r||n===null){be();return}t.renderer.rendering.then(()=>{ape({source:a,element:s,feedbackElement:f,placeholder:V,translate:r,moved:i,transition:w,alignment:a.alignment,styles:S,animation:n??void 0,getElementMutationObserver:()=>ue,cleanup:be,restoreFocus:ye})})}});return()=>{be(),Ce()}},t5(P5,4,`overlay`,M5,z5,F5),$8(P5,z5),z5.configure=V4(z5);var B5=z5,V5=!0,ope=!1,H5,U5,W5,spe=(W5=[S2],A8.Forward),G5,K5,q5;U5=(H5=[S2],A8.Reverse);var J5=class{constructor(){i5(this,K5,e5(G5,8,this,V5)),e5(G5,11,this),i5(this,q5,e5(G5,12,this,V5)),e5(G5,15,this)}isLocked(e){return e===A8.Idle?!1:e==null?this[A8.Forward]===V5&&this[A8.Reverse]===V5:this[e]===V5}unlock(e){e!==A8.Idle&&(this[e]=ope)}};G5=X8(null),K5=new WeakMap,q5=new WeakMap,t5(G5,4,spe,W5,J5,K5),t5(G5,4,U5,H5,J5,q5),$8(G5,J5);var cpe=[A8.Forward,A8.Reverse],Y5=class{constructor(){this.x=new J5,this.y=new J5}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},lpe=class extends K4{constructor(e){super(e);let t=Y0(new Y5),n=null;this.signal=t,i2(()=>{let{status:r}=e.dragOperation;if(!r.initialized){n=null,t.value=new Y5;return}let{delta:i}=e.dragOperation.position;if(n){let e={x:X5(i.x,n.x),y:X5(i.y,n.y)},r=t.peek();L0(()=>{for(let t of _4)for(let n of cpe)e[t]===n&&r[t].unlock(n);t.value=r})}n=i})}get current(){return this.signal.peek()}};function X5(e,t){return Math.sign(e-t)}var Z5,Q5,$5,e7,t7,n7,r7=class extends (Q5=q4,Z5=[S2],Q5){constructor(e){super(e),i5(this,e7,e5($5,8,this,!1)),e5($5,11,this),i5(this,t7),i5(this,n7,()=>{if(!r5(this,t7))return;let{element:e,by:t}=r5(this,t7);t.y&&(e.scrollTop+=t.y),t.x&&(e.scrollLeft+=t.x)}),this.scroll=(e,t)=>{if(this.disabled)return!1;let n=this.getScrollableElements();if(!n)return a5(this,t7,void 0),!1;let{position:r}=this.manager.dragOperation,i=r?.current;if(i){let{by:r}=e??{},a=r?{x:i7(r.x),y:i7(r.y)}:void 0,o=a?void 0:this.scrollIntentTracker.current;if(o?.isLocked())return!1;for(let e of n){let n=tfe(e,r);if(n.x||n.y){let{speed:n,direction:s}=ffe(e,i,a,t?.acceleration,t?.threshold);if(o)for(let e of _4)o[e].isLocked(s[e])&&(n[e]=0,s[e]=0);if(s.x||s.y){let{x:t,y:i}=r??s,a=t*n.x,o=i*n.y;if(a||o){let t=r5(this,t7)?.by;if(this.autoScrolling&&t&&(t.x&&!a||t.y&&!o))continue;return a5(this,t7,{element:e,by:{x:a,y:o}}),S8.schedule(r5(this,n7)),!0}}}}}return a5(this,t7,void 0),!1};let t=null,n=null,r=b2(()=>{let{position:n,source:r}=e.dragOperation;if(!n)return null;let i=G6(V6(r?.element),n.current);return i&&(t=i),i??t}),i=b2(()=>{let t=r.value,{documentElement:i}=N6(t);if(!t||t===i){let{target:t}=e.dragOperation,r=t?.element;if(r){let e=E8(r,{excludeElement:!1});return n=e,e}}if(t){let e=E8(t,{excludeElement:!1});return this.autoScrolling&&n&&e.size<n?.size?n:(n=e,e)}return n=null,null},x2);this.getScrollableElements=()=>i.value,this.scrollIntentTracker=new lpe(e),this.destroy=e.monitor.addEventListener(`dragmove`,t=>{this.disabled||t.defaultPrevented||!I8(e.dragOperation.activatorEvent)||!t.by||this.scroll({by:t.by})&&t.preventDefault()})}};$5=X8(Q5),e7=new WeakMap,t7=new WeakMap,n7=new WeakMap,t5($5,4,`autoScrolling`,Z5,r7,e7),$8($5,r7);function i7(e){return e>0?A8.Forward:e<0?A8.Reverse:A8.Idle}var upe=new class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{let{tasks:e,resolvers:t}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(let t of e)t();for(let e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(e=>this.resolvers.add(e))}}(e=>{typeof requestAnimationFrame==`function`?requestAnimationFrame(e):e()}),dpe=10,a7=class extends K4{constructor(e,t){super(e,t);let n=e.registry.plugins.get(r7);if(!n)throw Error(`AutoScroller plugin depends on Scroller plugin`);this.destroy=i2(()=>{if(this.disabled)return;let{position:t,status:r}=e.dragOperation;if(r.dragging){let e={acceleration:this.options?.acceleration,threshold:typeof this.options?.threshold==`number`?{x:this.options.threshold,y:this.options.threshold}:this.options?.threshold};if(n.scroll(void 0,e)){n.autoScrolling=!0;let t=setInterval(()=>upe.schedule(()=>n.scroll(void 0,e)),dpe);return()=>{clearInterval(t)}}else n.autoScrolling=!1}})}};a7.configure=V4(a7);var o7=a7,s7={capture:!0,passive:!0},c7,fpe=class extends q4{constructor(e){super(e),i5(this,c7),this.handleScroll=()=>{r5(this,c7)??a5(this,c7,setTimeout(()=>{this.manager.collisionObserver.forceUpdate(!1),a5(this,c7,void 0)},50))};let{dragOperation:t}=this.manager;this.destroy=i2(()=>{if(t.status.dragging){let e=t.source?.element?.ownerDocument??document;return e.addEventListener(`scroll`,this.handleScroll,s7),()=>{e.removeEventListener(`scroll`,this.handleScroll,s7)}}})}};c7=new WeakMap;var ppe=`* { user-select: none !important; -webkit-user-select: none !important; }`,mpe=class extends K4{constructor(e){super(e),this.manager=e;let t=e.registry.plugins.get(C5)?.register(ppe);if(this.destroy=i2(()=>{let{dragOperation:e}=this.manager;if(e.status.initialized)return l7(),document.addEventListener(`selectionchange`,l7,{capture:!0}),()=>{document.removeEventListener(`selectionchange`,l7,{capture:!0})}}),t){let e=this.destroy.bind(this);this.destroy=()=>{t(),e()}}}};function l7(){var e;(e=document.getSelection())==null||e.removeAllRanges()}var u7=Object.freeze({offset:10,keyboardCodes:{start:[`Space`,`Enter`],cancel:[`Escape`],end:[`Space`,`Enter`,`Tab`],up:[`ArrowUp`],down:[`ArrowDown`],left:[`ArrowLeft`],right:[`ArrowRight`]},preventActivation(e,t){let n=t.handle??t.element;return e.target!==n}}),d7,f7=class extends Y3{constructor(e,t){super(e),this.manager=e,this.options=t,i5(this,d7,[]),this.listeners=new q6,this.handleSourceKeyDown=(e,t,n)=>{if(this.disabled||e.defaultPrevented||!F8(e.target)||t.disabled)return;let{keyboardCodes:r=u7.keyboardCodes,preventActivation:i=u7.preventActivation}=n??{};r.start.includes(e.code)&&this.manager.dragOperation.status.idle&&(i?.(e,t)||this.handleStart(e,t,n))}}bind(e,t=this.options){return i2(()=>{let n=e.handle??e.element,r=n=>{I8(n)&&this.handleSourceKeyDown(n,e,t)};if(n)return n.addEventListener(`keydown`,r),()=>{n.removeEventListener(`keydown`,r)}})}handleStart(e,t,n){let{element:r}=t;if(!r)throw Error(`Source draggable does not have an associated element`);e.preventDefault(),e.stopImmediatePropagation(),pfe(r);let{center:i}=new N8(r);if(this.manager.actions.start({event:e,coordinates:{x:i.x,y:i.y},source:t}).signal.aborted)return this.cleanup();this.sideEffects();let a=N6(r),o=[this.listeners.bind(a,[{type:`keydown`,listener:e=>this.handleKeyDown(e,t,n),options:{capture:!0}}])];r5(this,d7).push(...o)}handleKeyDown(e,t,n){let{keyboardCodes:r=u7.keyboardCodes}=n??{};if(p7(e,[...r.end,...r.cancel])){e.preventDefault();let t=p7(e,r.cancel);this.handleEnd(e,t);return}p7(e,r.up)?this.handleMove(`up`,e):p7(e,r.down)&&this.handleMove(`down`,e),p7(e,r.left)?this.handleMove(`left`,e):p7(e,r.right)&&this.handleMove(`right`,e)}handleEnd(e,t){this.manager.actions.stop({event:e,canceled:t}),this.cleanup()}handleMove(e,t){let{shape:n}=this.manager.dragOperation,r=t.shiftKey?5:1,i={x:0,y:0},a=this.options?.offset??u7.offset;if(typeof a==`number`&&(a={x:a,y:a}),n){switch(e){case`up`:i={x:0,y:-a.y*r};break;case`down`:i={x:0,y:a.y*r};break;case`left`:i={x:-a.x*r,y:0};break;case`right`:i={x:a.x*r,y:0};break}(i.x||i.y)&&(t.preventDefault(),this.manager.actions.move({event:t,by:i}))}}sideEffects(){let e=this.manager.registry.plugins.get(o7);e?.disabled===!1&&(e.disable(),r5(this,d7).push(()=>{e.enable()}))}cleanup(){r5(this,d7).forEach(e=>e()),a5(this,d7,[])}destroy(){this.cleanup(),this.listeners.clear()}};d7=new WeakMap,f7.configure=V4(f7),f7.defaults=u7;var hpe=f7;function p7(e,t){return t.includes(e.code)}var m7,gpe=class extends Z3{constructor(){super(...arguments),i5(this,m7)}onEvent(e){switch(e.type){case`pointerdown`:a5(this,m7,F6(e));break;case`pointermove`:if(!r5(this,m7))return;let{x:t,y:n}=F6(e),r={x:t-r5(this,m7).x,y:n-r5(this,m7).y},{tolerance:i}=this.options;if(i&&h4(r,i)){this.abort();return}h4(r,this.options.value)&&this.activate(e);break;case`pointerup`:this.abort();break}}abort(){a5(this,m7,void 0)}};m7=new WeakMap;var h7,g7,_pe=class extends Z3{constructor(){super(...arguments),i5(this,h7),i5(this,g7)}onEvent(e){switch(e.type){case`pointerdown`:a5(this,g7,F6(e)),a5(this,h7,setTimeout(()=>this.activate(e),this.options.value));break;case`pointermove`:if(!r5(this,g7))return;let{x:t,y:n}=F6(e);h4({x:t-r5(this,g7).x,y:n-r5(this,g7).y},this.options.tolerance)&&this.abort();break;case`pointerup`:this.abort();break}}abort(){r5(this,h7)&&(clearTimeout(r5(this,h7)),a5(this,g7,void 0),a5(this,h7,void 0))}};h7=new WeakMap,g7=new WeakMap;var _7=class{};_7.Delay=_pe,_7.Distance=gpe;var v7=Object.freeze({activationConstraints(e,t){let{pointerType:n,target:r}=e;if(!(n===`mouse`&&F8(r)&&(t.handle===r||t.handle?.contains(r))))return n===`touch`?[new _7.Delay({value:250,tolerance:5})]:Tfe(r)&&!e.defaultPrevented?[new _7.Delay({value:200,tolerance:0})]:[new _7.Delay({value:200,tolerance:10}),new _7.Distance({value:5})]},preventActivation(e,t){let{target:n}=e;return n===t.element||n===t.handle||!F8(n)||t.handle?.contains(n)?!1:Wde(n)}}),y7,b7=class extends Y3{constructor(e,t){super(e),this.manager=e,this.options=t,i5(this,y7,new Set),this.listeners=new q6,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{let{event:e,coordinates:t}=this.latest;!e||!t||this.manager.actions.move({event:e,to:t})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(e,t,n=this.options){let{activationConstraints:r=v7.activationConstraints}=n??{};return typeof r==`function`?r(e,t):r}bind(e,t=this.options){return i2(()=>{let n=new AbortController,{signal:r}=n,i=n=>{wfe(n)&&this.handlePointerDown(n,e,t)},a=[e.handle??e.element];t?.activatorElements&&(a=Array.isArray(t.activatorElements)?t.activatorElements:t.activatorElements(e));for(let e of a)e&&(xpe(e.ownerDocument.defaultView),e.addEventListener(`pointerdown`,i,{signal:r}));return()=>n.abort()})}handlePointerDown(e,t,n){if(this.disabled||!e.isPrimary||e.button!==0||!F8(e.target)||t.disabled||ype(e)||!this.manager.dragOperation.status.idle)return;let{preventActivation:r=v7.preventActivation}=n??{};if(r?.(e,t))return;let{target:i}=e,a=j6(i)&&i.draggable&&i.getAttribute(`draggable`)===`true`,o=D8(t.element),{x:s,y:c}=F6(e);this.initialCoordinates={x:s*o.scaleX+o.x,y:c*o.scaleY+o.y};let l=this.activationConstraints(e,t,n);e.sensor=this;let u=new Nde(l,e=>this.handleStart(t,e));u.signal.onabort=()=>this.handleCancel(e),u.onEvent(e),this.controller=u;let d=L6(),f=this.listeners.bind(d,[{type:`pointermove`,listener:e=>this.handlePointerMove(e,t)},{type:`pointerup`,listener:this.handlePointerUp,options:{capture:!0}},{type:`pointercancel`,listener:this.handleCancel},{type:`dragstart`,listener:a?this.handleCancel:x7,options:{capture:!0}}]);r5(this,y7).add(()=>{f(),this.initialCoordinates=void 0})}handlePointerMove(e,t){var n;if(this.controller?.activated===!1){(n=this.controller)==null||n.onEvent(e);return}if(this.manager.dragOperation.status.dragging){let n=F6(e),r=D8(t.element);n.x=n.x*r.scaleX+r.x,n.y=n.y*r.scaleY+r.y,e.preventDefault(),e.stopPropagation(),this.latest.event=e,this.latest.coordinates=n,S8.schedule(this.handleMove)}}handlePointerUp(e){let{status:t}=this.manager.dragOperation;if(!t.idle){e.preventDefault(),e.stopPropagation();let n=!t.initialized;this.manager.actions.stop({event:e,canceled:n})}this.cleanup()}handleKeyDown(e){e.key===`Escape`&&(e.preventDefault(),this.handleCancel(e))}handleStart(e,t){let{manager:n,initialCoordinates:r}=this;if(!r||!n.dragOperation.status.idle||t.defaultPrevented)return;if(n.actions.start({coordinates:r,event:t,source:e}).signal.aborted)return this.cleanup();t.preventDefault();let i=N6(t.target).body;try{i.setPointerCapture(t.pointerId)}catch{this.handleCancel(t);return}let a=F8(t.target)?[t.target,i]:i,o=this.listeners.bind(a,[{type:`touchmove`,listener:x7,options:{passive:!1}},{type:`click`,listener:x7},{type:`contextmenu`,listener:x7},{type:`keydown`,listener:this.handleKeyDown}]);r5(this,y7).add(o)}handleCancel(e){let{dragOperation:t}=this.manager;t.status.initialized&&this.manager.actions.stop({event:e,canceled:!0}),this.cleanup()}cleanup(){let{controller:e}=this;this.controller=void 0,e&&!e.signal.aborted&&e.abort(),this.latest={event:void 0,coordinates:void 0},r5(this,y7).forEach(e=>e()),r5(this,y7).clear()}destroy(){this.cleanup(),this.listeners.clear()}};y7=new WeakMap,b7.configure=V4(b7),b7.defaults=v7;var vpe=b7;function ype(e){return`sensor`in e}function x7(e){e.preventDefault()}function bpe(){}var S7=new WeakSet;function xpe(e){!e||S7.has(e)||(e.addEventListener(`touchmove`,bpe,{capture:!1,passive:!1}),S7.add(e))}var C7={modifiers:[],plugins:[Wfe,o7,Kfe,B5,mpe],sensors:[vpe,hpe]},w7=class extends Lde{constructor(e={}){let t=v6(e.plugins,C7.plugins),n=v6(e.sensors,C7.sensors),r=v6(e.modifiers,C7.modifiers);super(q8(K8({},e),{plugins:[fpe,r7,C5,...t],sensors:n,modifiers:r}))}},T7,E7,D7,O7,k7,A7,j7=class extends (D7=S3,E7=[S2],T7=[S2],D7){constructor(e,t){var n=e,{element:r,effects:i=()=>[],handle:a}=n,o=Y8(n,[`element`,`effects`,`handle`]);super(K8({effects:()=>[...i(),()=>{let{manager:e}=this;if(!e)return;let t=(this.sensors?.map(H4)??[...e.sensors]).map(t=>{let n=t instanceof Y3?t:e.registry.register(t.plugin),r=t instanceof Y3?void 0:t.options;return n.bind(this,r)});return function(){t.forEach(e=>e())}}]},o),t),i5(this,k7,e5(O7,8,this)),e5(O7,11,this),i5(this,A7,e5(O7,12,this)),e5(O7,15,this),this.element=r,this.handle=a}};O7=X8(D7),k7=new WeakMap,A7=new WeakMap,t5(O7,4,`handle`,E7,j7,k7),t5(O7,4,`element`,T7,j7,A7),$8(O7,j7);var M7,N7,P7,F7,I7,L7,R7,z7,B7,V7,H7=class extends (P7=I3,N7=[S2],M7=[S2],P7){constructor(e,t){var n=e,{element:r,effects:i=()=>[]}=n,a=Y8(n,[`element`,`effects`]);let{collisionDetector:o=kfe}=a,s=e=>{let{manager:t,element:n}=this;if(!n||e===null){this.shape=void 0;return}if(!t)return;let r=new N8(n),i=z0(()=>this.shape);return r&&i?.equals(r)?i:(this.shape=r,r)},c=Y0(!1);super(q8(K8({},a),{collisionDetector:o,effects:()=>[...i(),()=>{let{element:e,manager:t}=this;if(!t)return;let{dragOperation:n}=t,{source:r}=n;c.value=!!(r&&n.status.initialized&&e&&!this.disabled&&this.accepts(r))},()=>{let{element:e}=this;if(c.value&&e){let t=new efe(e,s);return()=>{t.disconnect(),this.shape=void 0}}},()=>{if(this.manager?.dragOperation.status.initialized)return()=>{this.shape=void 0}}]}),t),i5(this,B7),i5(this,I7,e5(F7,8,this)),e5(F7,11,this),i5(this,V7,e5(F7,12,this)),e5(F7,15,this),this.element=r,this.refreshShape=()=>s()}set element(e){a5(this,B7,e,z7)}get element(){return this.proxy??r5(this,B7,R7)}};F7=X8(P7),I7=new WeakMap,B7=new WeakSet,V7=new WeakMap,L7=t5(F7,20,`#element`,N7,B7,I7),R7=L7.get,z7=L7.set,t5(F7,4,`proxy`,M7,H7,V7),$8(F7,H7);function Spe(e){return typeof e==`object`&&!!e&&`current`in e}function U7(e){if(e!=null)return Spe(e)?e.current??void 0:e}var W7=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0?y.useLayoutEffect:y.useEffect;function G7(){let e=(0,y.useState)(0)[1];return(0,y.useCallback)(()=>{e(e=>e+1)},[e])}function Cpe(e,t=!1){let n=(0,y.useRef)(e.peek()),r=(0,y.useRef)(!1),i=G7();return W7(()=>i2(()=>{let a=n.current,o=e.value;if(a!==o){if(n.current=o,!r.current)return;t?(0,b.flushSync)(i):i()}}),[e,t,i]),{get value(){return r.current=!0,e.peek()}}}function wpe(e,t=[],n=!1){let r=(0,y.useRef)(e);return r.current=e,Cpe((0,y.useMemo)(()=>b2(()=>r.current()),t),n)}function K7(e,t){let n=(0,y.useRef)(new Map),r=G7();return W7(()=>{if(!e){n.current.clear();return}return i2(()=>{let i=!1,a=!1;for(let r of n.current){let[o]=r,s=z0(()=>r[1]),c=e[o];s!==c&&(i=!0,n.current.set(o,c),a=t?.(o,s,c)??!1)}i&&(a?queueMicrotask(()=>(0,b.flushSync)(r)):r())})},[e]),(0,y.useMemo)(()=>e&&new Proxy(e,{get(e,t){let r=e[t];return n.current.set(t,r),r}}),[e])}function q7(e){let t=(0,y.useRef)(e);return W7(()=>{t.current=e},[e]),t}function J7(e,t,n=y.useEffect,r=Object.is){let i=(0,y.useRef)(e);n(()=>{let n=i.current;r(e,n)||(i.current=e,t(e,n))},[t,e])}function Y7(e,t){let n=(0,y.useRef)(U7(e));W7(()=>{let r=U7(e);r!==n.current&&(n.current=r,t(r))})}var Tpe=Object.defineProperty,Epe=Object.defineProperties,Dpe=Object.getOwnPropertyDescriptors,X7=Object.getOwnPropertySymbols,Z7=Object.prototype.hasOwnProperty,Q7=Object.prototype.propertyIsEnumerable,$7=(e,t,n)=>t in e?Tpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,e9=(e,t)=>{for(var n in t||={})Z7.call(t,n)&&$7(e,n,t[n]);if(X7)for(var n of X7(t))Q7.call(t,n)&&$7(e,n,t[n]);return e},t9=(e,t)=>Epe(e,Dpe(t)),Ope=(e,t)=>{var n={};for(var r in e)Z7.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&X7)for(var r of X7(e))t.indexOf(r)<0&&Q7.call(e,r)&&(n[r]=e[r]);return n},n9=(0,y.createContext)(new w7),kpe=(0,y.memo)((0,y.forwardRef)(({children:e},t)=>{let[n,r]=(0,y.useState)(0),i=(0,y.useRef)(null),a=(0,y.useRef)(null),o=(0,y.useMemo)(()=>({renderer:{get rendering(){return i.current??Promise.resolve()}},trackRendering(e){i.current||=new Promise(e=>{a.current=e}),(0,y.startTransition)(()=>{e(),r(e=>e+1)})}}),[]);return W7(()=>{var e;(e=a.current)==null||e.call(a),i.current=null},[e,n]),(0,y.useImperativeHandle)(t,()=>o),null})),r9=[void 0,x2];function Ape(e){var t=e,{children:r,onCollision:i,onBeforeDragStart:a,onDragStart:o,onDragMove:s,onDragOver:c,onDragEnd:l}=t,u=Ope(t,[`children`,`onCollision`,`onBeforeDragStart`,`onDragStart`,`onDragMove`,`onDragOver`,`onDragEnd`]);let d=(0,y.useRef)(null),{plugins:f,modifiers:p,sensors:m}=u,h=v6(f,C7.plugins),g=v6(m,C7.sensors),_=v6(p,C7.modifiers),v=q7(a),b=q7(o),x=q7(c),S=q7(s),C=q7(l),w=q7(i),T=jpe(()=>u.manager??new w7(u));return(0,y.useEffect)(()=>{if(!d.current)throw Error(`Renderer not found`);let{renderer:e,trackRendering:t}=d.current,{monitor:n}=T;T.renderer=e;let r=[n.addEventListener(`beforedragstart`,e=>{let n=v.current;n&&t(()=>n(e,T))}),n.addEventListener(`dragstart`,e=>b.current?.call(b,e,T)),n.addEventListener(`dragover`,e=>{let n=x.current;n&&t(()=>n(e,T))}),n.addEventListener(`dragmove`,e=>{let n=S.current;n&&t(()=>n(e,T))}),n.addEventListener(`dragend`,e=>{let n=C.current;n&&t(()=>n(e,T))}),n.addEventListener(`collision`,e=>w.current?.call(w,e,T))];return()=>r.forEach(e=>e())},[T]),J7(h,()=>T&&(T.plugins=h),...r9),J7(g,()=>T&&(T.sensors=g),...r9),J7(_,()=>T&&(T.modifiers=_),...r9),(0,n.jsxs)(n9.Provider,{value:T,children:[(0,n.jsx)(kpe,{ref:d,children:r}),r]})}function jpe(e){let t=(0,y.useRef)(null);return t.current||=e(),(0,y.useInsertionEffect)(()=>()=>t.current?.destroy(),[]),t.current}function i9(){return(0,y.useContext)(n9)}function a9(e){let t=i9()??void 0,[n]=(0,y.useState)(()=>e(t));return n.manager!==t&&(n.manager=t),W7(n.register,[t,n]),n}function Mpe(e){let{disabled:t,data:n,element:r,handle:i,id:a,modifiers:o,sensors:s,plugins:c}=e,l=a9(t=>new j7(t9(e9({},e),{register:!1,handle:U7(i),element:U7(r)}),t)),u=K7(l,Npe);return J7(a,()=>l.id=a),Y7(i,e=>l.handle=e),Y7(r,e=>l.element=e),J7(n,()=>n&&(l.data=n)),J7(t,()=>l.disabled=t===!0),J7(s,()=>l.sensors=s),J7(o,()=>l.modifiers=o,void 0,x2),J7(c,()=>l.plugins=c,void 0,x2),J7(e.alignment,()=>l.alignment=e.alignment),{draggable:u,get isDragging(){return u.isDragging},get isDropping(){return u.isDropping},get isDragSource(){return u.isDragSource},handleRef:(0,y.useCallback)(e=>{l.handle=e??void 0},[l]),ref:(0,y.useCallback)(e=>{!e&&l.element?.isConnected&&!l.manager?.dragOperation.status.idle||(l.element=e??void 0)},[l])}}function Npe(e,t,n){return!!(e===`isDragSource`&&!n&&t)}function Ppe({children:e,className:t,dropAnimation:r,style:i,tag:a,disabled:o}){let s=(0,y.useRef)(null),c=i9(),l=wpe(()=>c?.dragOperation.source,[c]).value??null,u=typeof o==`function`?o(l):o;(0,y.useEffect)(()=>{if(!s.current||!c||u)return;let e=c.plugins.find(e=>e instanceof B5);if(e)return e.overlay=s.current,()=>{e.overlay=void 0}},[c,u]),(0,y.useEffect)(()=>{if(!c)return;let e=c.plugins.find(e=>e instanceof B5);if(e)return e.dropAnimation=r,()=>{e.dropAnimation=void 0}},[c,r]);let d=(0,y.useMemo)(()=>{if(!c)return null;let e=new Proxy(c.registry,{get(e,t){return t===`register`||t===`unregister`?Fpe:e[t]}});return new Proxy(c,{get(t,n){return n===`registry`?e:t[n]}})},[c]);return(0,n.jsx)(n9.Provider,{value:d,children:(0,y.createElement)(a||`div`,{ref:s,className:t,style:i,"data-dnd-overlay":!0},f())});function f(){return!l||u?null:typeof e==`function`?(0,n.jsx)(Ipe,{source:l,children:e}):e}}function Fpe(){return()=>{}}function Ipe({children:e,source:t}){return e(K7(t))}var Lpe=Object.create,o9=Object.defineProperty,Rpe=Object.getOwnPropertyDescriptor,s9=(e,t)=>(t=Symbol[e])?t:Symbol.for(`Symbol.`+e),c9=e=>{throw TypeError(e)},zpe=(e,t,n)=>t in e?o9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bpe=e=>[,,,Lpe(e?.[s9(`metadata`)]??null)],l9=[`class`,`method`,`getter`,`setter`,`accessor`,`field`,`value`,`get`,`set`],u9=e=>e!==void 0&&typeof e!=`function`?c9(`Function expected`):e,Vpe=(e,t,n,r,i)=>({kind:l9[e],name:t,metadata:r,addInitializer:e=>n._?c9(`Already initialized`):i.push(u9(e||null))}),Hpe=(e,t)=>zpe(t,s9(`metadata`),e[3]),Upe=(e,t,n,r)=>{for(var i=0,a=e[t>>1],o=a&&a.length;i<o;i++)a[i].call(n);return r},d9=(e,t,n,r,i,a)=>{for(var o,s,c,l,u=t&7,d=!1,f=!1,p=2,m=l9[u+5],h=e[p]||(e[p]=[]),g=(i=i.prototype,Rpe(i,n)),_=r.length-1;_>=0;_--)c=Vpe(u,n,s={},e[3],h),c.static=d,c.private=f,l=c.access={has:e=>n in e},l.get=e=>e[n],o=(0,r[_])(g[m],c),s._=1,u9(o)&&(g[m]=o);return g&&o9(i,n,g),i},f9=(e,t,n)=>t.has(e)||c9(`Cannot `+n),Wpe=(e,t,n)=>(f9(e,t,`read from private field`),t.get(e)),Gpe=(e,t,n)=>t.has(e)?c9(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),Kpe=(e,t,n,r)=>(f9(e,t,`write to private field`),t.set(e,n),n),p9=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},m9,h9,g9,_9,v9,y9=class extends (g9=G2,h9=[C2],m9=[C2],g9){constructor(e){let t=p9.from(e);super(t,(e,t)=>p9.equals(e,t)),Upe(v9,5,this),Gpe(this,_9,0),this.velocity={x:0,y:0}}get delta(){return p9.delta(this.current,this.initial)}get direction(){let{current:e,previous:t}=this;if(!t)return null;let n={x:e.x-t.x,y:e.y-t.y};return!n.x&&!n.y?null:Math.abs(n.x)>Math.abs(n.y)?n.x>0?`right`:`left`:n.y>0?`down`:`up`}get current(){return super.current}set current(e){let{current:t}=this,n=p9.from(e),r={x:n.x-t.x,y:n.y-t.y},i=Date.now(),a=i-Wpe(this,_9),o=e=>Math.round(e/a*100);L0(()=>{Kpe(this,_9,i),this.velocity={x:o(r.x),y:o(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(p9.from(e)),this.velocity={x:0,y:0}}};v9=Bpe(g9),_9=new WeakMap,d9(v9,2,`delta`,h9,y9),d9(v9,2,`direction`,m9,y9),Hpe(v9,y9);var b9=(e=>(e.Horizontal=`x`,e.Vertical=`y`,e))(b9||{});Object.values(b9);var qpe=({dragOperation:e,droppable:t})=>{let n=e.position.current;if(!n)return null;let{id:r}=t;return t.shape&&t.shape.containsPoint(n)?{id:r,value:1/p9.distance(t.shape.center,n),type:z3.PointerIntersection,priority:R3.High}:null},Jpe=({dragOperation:e,droppable:t})=>{let{shape:n}=e;if(!t.shape||!n?.current)return null;let r=n.current.intersectionArea(t.shape);if(r){let{position:i}=e,a=p9.distance(t.shape.center,i.current),o=r/(n.current.area+t.shape.area-r)/a;return{id:t.id,value:o,type:z3.ShapeIntersection,priority:R3.Normal}}return null},Ype=e=>qpe(e)??Jpe(e);function x9(e){let{collisionDetector:t,data:n,disabled:r,element:i,id:a,accept:o,type:s}=e,c=a9(t=>new H7(t9(e9({},e),{register:!1,element:U7(i)}),t)),l=K7(c);return J7(a,()=>c.id=a),Y7(i,e=>c.element=e),J7(o,()=>c.accept=o,void 0,x2),J7(t,()=>c.collisionDetector=t??Ype),J7(n,()=>n&&(c.data=n)),J7(r,()=>c.disabled=r===!0),J7(s,()=>c.type=s),{droppable:l,get isDropTarget(){return l.isDropTarget},ref:(0,y.useCallback)(e=>{!e&&c.element?.isConnected&&!c.manager?.dragOperation.status.idle||(c.element=e??void 0)},[c])}}X();var S9=y.default.createContext(null),Xpe=({table:e,dataSet:t,setDataSet:r,className:i,children:a,ref:o,...s})=>{let[c,l]=y.default.useState({data:[]}),[u,d]=y.default.useState(null),f=t??c,p=r??l;return(0,n.jsx)(Ape,{onDragStart:({operation:{source:e}})=>{d(e?.data.nodeId??null)},onDragEnd:({operation:{source:e,target:t}})=>{if(d(null),!t)return;let n=e?.data.nodeId,r=t.data.folderId;if(!(!n||n===r)){if(r===`root`){p(e=>({...e,data:F0(e.data,n)}));return}p(e=>({...e,data:P0(e.data,n,r)}))}},plugins:e=>[...e,B5.configure({dropAnimation:null})],children:(0,n.jsx)(S9.Provider,{value:{table:e,className:i,children:a,ref:o,...s,dataSet:f,setDataSet:p,draggingNodeId:u},children:(0,n.jsxs)(`div`,{className:Y(`flex flex-col justify-between`,i),ref:o,...s,children:[a,(0,n.jsx)(Ppe,{children:t=>(0,n.jsxs)(`div`,{className:Y(`relative rounded-md border border-neutral-border bg-neutral-container px-xs py-3xs opacity-80 shadow-md transition-opacity`),children:[e.getRow(String(t.id)).renderValue(`name`)??t.id,(0,n.jsx)(Vk,{className:`absolute -top-xs -right-xs`,size:`iconSmall`,children:e.getRow(String(t.id))?.subRows.length+1})]})})]})})})},C9=()=>{let e=y.default.useContext(S9);if(!e)throw Error(`useLayerTree must be used within a LayerTreeProvider`);return e};function w9(e,t){return e?Zpe(e)?y.createElement(e,t):e:null}function Zpe(e){return Qpe(e)||typeof e==`function`||$pe(e)}function Qpe(e){return typeof e==`function`&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function $pe(e){return typeof e==`object`&&typeof e.$$typeof==`symbol`&&[`react.memo`,`react.forward_ref`].includes(e.$$typeof.description)}X();var T9=({row:e,className:t,children:r,ref:i,...a})=>(0,n.jsxs)(`div`,{className:Y(`flex items-center justify-between gap-3xs`,t),ref:i,...a,children:[r,e.getVisibleCells().map(e=>(0,n.jsx)(`div`,{style:{width:e.column.getSize()===0?`auto`:e.column.getSize(),minWidth:e.column.columnDef.minSize,maxWidth:e.column.columnDef.maxSize},children:w9(e.column.columnDef.cell,e.getContext())},e.id))]});X();var eme=({className:e,children:t,...r})=>{let{table:i}=C9(),{isDropTarget:a,ref:o}=x9({id:`root-dropzone`,data:{folderId:`root`,nodeId:`root`}});return(0,n.jsxs)(`div`,{className:Y(`flex grow flex-col`,e),...r,children:[t,(0,n.jsx)(`ul`,{className:`flex flex-col gap-xs`,children:i.getRowModel().rows.map(e=>(0,n.jsx)(T9,{row:e},e.id))}),(0,n.jsx)(`div`,{ref:o,className:Y(`grow`,a&&`rounded-lg bg-success-container ring-1 ring-success-default ring-inset`)})]})};Uj(),mk(),X();var tme=({className:e,ref:t,...r})=>{let{table:i}=C9();return(0,n.jsx)(pk,{size:`iconMedium`,tone:`neutral`,variant:`ghost`,onClick:()=>{i.getIsSomeRowsExpanded()?i.toggleAllRowsExpanded(!1):i.toggleAllRowsExpanded(!0)},className:Y(``,e),ref:t,...r,children:i.getIsSomeRowsExpanded()?(0,n.jsx)(kj,{}):(0,n.jsx)(Oj,{})})};Uj(),X();var nme=({className:e,children:t,row:r,icon:i,dndDisabled:a,...o})=>{let{table:s,draggingNodeId:c}=C9(),l=r.getCanExpand(),{ref:u,isDragging:d}=Mpe({id:r.id,data:{isFolder:l,nodeId:r.id},disabled:a}),{ref:f,isDropTarget:p}=x9({id:`folder:${r.id}`,data:{folderId:r.id,isFolder:l},disabled:a}),m=r.depth*24,h=y.default.useCallback(e=>{u(e),f(e)},[u,f]),g=()=>{if(l){r.toggleExpanded();return}r.getCanSelect()&&(s.resetRowSelection(),r.toggleSelected())},_=y.default.useMemo(()=>{if(!c)return!1;let e=r.getParentRow();for(;e;){if(e.id===c)return!0;e=e.getParentRow()}return!1},[c,r]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(`button`,{type:`button`,onClick:g,style:{marginLeft:m,width:`calc(100% - ${m}px)`},className:Y(`flex h-lg min-w-0 items-center justify-start gap-2xs truncate rounded-lg px-xs style-text-default-0 transition-all hover:cursor-pointer [&>svg]:size-sm [&>svg]:shrink-0`,l&&p&&`bg-success-container text-success-on-container ring ring-success-border`,r.getIsSelected()?`bg-brand-default text-brand-on-default`:`hover:bg-brand-container hover:text-brand-on-container`,(d||_)&&`opacity-60`,e),ref:h,...o,children:[l?r.getIsExpanded()?(0,n.jsx)(Oj,{weight:`bold`}):(0,n.jsx)(Dj,{weight:`fill`}):i?(0,n.jsx)(i,{weight:`bold`}):null,t]})})};mk(),X();var rme=({value:e,columnId:t,rows:r,children:i,className:a,ref:o,...s})=>{let{setDataSet:c}=C9();return(0,n.jsx)(pk,{tone:`neutral`,size:`iconSmall`,variant:`ghost`,className:Y(``,a),ref:o,onClick:()=>{r.forEach(n=>{n.original[t]=!e}),c(e=>({...e,data:[...e.data]}))},...s,children:i(e)})};Uj(),xQ(),X();var ime=({placeholder:e,className:t,children:r,ref:i,...a})=>{let{table:o}=C9();return(0,n.jsxs)(hQ,{className:Y(``,t),ref:i,...a,children:[(0,n.jsx)(_Q,{children:(0,n.jsx)(Nj,{weight:`bold`})}),(0,n.jsx)(yQ,{placeholder:e,onChange:e=>o.setGlobalFilter(e.target.value),value:o.getState().globalFilter??``}),r]})};X();var ame=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex flex-col gap-3xs`,e),ref:r,...i,children:t});Cy();var E9=({children:e,...t})=>(0,n.jsx)(Xv,{...t,children:e});Cy(),Uj(),X();var ome=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(ov,{className:Y(`rounded-md`,`grid cursor-default grid-cols-[1fr_2rem] items-center px-2xs py-3xs style-text-default-0 outline-none select-none before:absolute before:inset-[0px] before:z-[-1] before:rounded-md before:content-[""] hover:cursor-pointer data-highlighted:relative data-highlighted:z-0 data-highlighted:text-neutral-on-container data-highlighted:before:bg-neutral-container-high`,e),ref:r,...i,children:[(0,n.jsx)(`span`,{className:`col-start-1`,children:t}),(0,n.jsx)(cv,{className:`col-start-2 flex items-center justify-center place-self-end self-center`,children:(0,n.jsx)(yj,{className:`size-sm`,weight:`bold`})})]});Cy(),X();var D9=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(pv,{className:Y(``,e),ref:r,...i,children:t});Cy(),X();var O9=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(hv,{className:Y(`cursor-default px-2xs py-3xs style-text-default--2 text-on-surface-variant select-none`,e),ref:r,...i,children:t});uo();var sme=lo(`flex cursor-default items-center px-sm py-3xs style-text-default-0 outline-none select-none before:outline before:outline-transparent hover:cursor-pointer data-highlighted:relative data-highlighted:z-0 data-highlighted:before:absolute data-highlighted:before:inset-x-3xs data-highlighted:before:inset-y-[0px] data-highlighted:before:z-[-1] data-highlighted:before:rounded-md`,{variants:{tone:{brand:`text-brand-default data-highlighted:text-brand-on-container data-highlighted:before:bg-brand-container`,accent:`text-accent-default data-highlighted:text-accent-on-container data-highlighted:before:bg-accent-container`,neutral:`text-on-surface data-highlighted:text-neutral-on-container data-highlighted:before:bg-neutral-container-high`,error:`text-error-default data-highlighted:text-error-on-container data-highlighted:before:bg-error-container`,info:`text-info-default data-highlighted:text-info-on-container data-highlighted:before:bg-info-container`,success:`text-success-default data-highlighted:text-success-on-container data-highlighted:before:bg-success-container`,warning:`text-warning-default data-highlighted:text-warning-on-container data-highlighted:before:bg-warning-container`}},defaultVariants:{tone:`neutral`}}),cme=lo(`grid cursor-default grid-cols-[1fr_2rem] items-center px-sm py-3xs style-text-default-0 outline-none select-none before:outline before:outline-transparent hover:cursor-pointer data-highlighted:relative data-highlighted:z-0 data-highlighted:before:absolute data-highlighted:before:inset-x-3xs data-highlighted:before:inset-y-[0px] data-highlighted:before:z-[-1] data-highlighted:before:rounded-md data-popup-open:relative data-popup-open:z-0 data-popup-open:before:absolute data-popup-open:before:inset-x-3xs data-popup-open:before:inset-y-[0px] data-popup-open:before:z-[-1] data-popup-open:before:rounded-sm`,{variants:{tone:{brand:`text-brand-default data-highlighted:text-brand-on-container data-highlighted:before:bg-brand-container data-popup-open:text-brand-on-container data-popup-open:before:bg-brand-container data-[highlighted]:data-[popup-open]:before:bg-brand-container`,accent:`text-accent-default data-highlighted:text-accent-on-container data-highlighted:before:bg-accent-container data-popup-open:text-accent-on-container data-popup-open:before:bg-accent-container data-[highlighted]:data-[popup-open]:before:bg-accent-container`,neutral:`text-on-surface data-highlighted:text-neutral-on-container data-highlighted:before:bg-neutral-container-high data-popup-open:text-neutral-on-container data-popup-open:before:bg-neutral-container-high data-[highlighted]:data-[popup-open]:before:bg-neutral-container-high`,error:`text-error-default data-highlighted:text-error-on-container data-highlighted:before:bg-error-container data-popup-open:text-error-on-container data-popup-open:before:bg-error-container data-[highlighted]:data-[popup-open]:before:bg-error-container`,info:`text-info-default data-highlighted:text-info-on-container data-highlighted:before:bg-info-container data-popup-open:text-info-on-container data-popup-open:before:bg-info-container data-[highlighted]:data-[popup-open]:before:bg-info-container`,success:`text-success-default data-highlighted:text-success-on-container data-highlighted:before:bg-success-container data-popup-open:text-success-on-container data-popup-open:before:bg-success-container data-[highlighted]:data-[popup-open]:before:bg-success-container`,warning:`text-warning-default data-highlighted:text-warning-on-container data-highlighted:before:bg-warning-container data-popup-open:text-warning-on-container data-popup-open:before:bg-warning-container data-[highlighted]:data-[popup-open]:before:bg-warning-container`}},defaultVariants:{tone:`neutral`}});Cy(),X();var lme=({tone:e,className:t,children:r,ref:i,...a})=>(0,n.jsx)(_v,{className:Y(sme({tone:e}),t),ref:i,...a,children:(0,n.jsx)(`div`,{className:`flex w-full items-center gap-2xs [&>svg]:size-sm`,children:r})});Cy(),X();var k9=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Dv,{children:(0,n.jsx)(kv,{className:Y(`outline-none`,e),ref:r,sideOffset:8,...i,children:(0,n.jsx)(Cv,{className:`w-[calc(100%+var(--spacing-xl))] origin-(--transform-origin) translate-x-[-calc(var(--spacing-xl)/2)] rounded-md bg-surface-2 px-3xs py-2xs shadow-md transition-[transform,scale,opacity] data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0`,children:t})})});Cy(),X();var A9=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Nv,{className:Y(``,e),ref:r,...i,children:t});Cy(),Uj(),X();var j9=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(Lv,{className:Y(`rounded-md`,`grid cursor-default grid-cols-[1fr_2rem] items-center px-2xs py-3xs style-text-default-0 outline-none select-none before:absolute before:inset-[0px] before:z-[-1] before:rounded-md before:content-[""] hover:cursor-pointer data-highlighted:relative data-highlighted:z-0 data-highlighted:text-neutral-on-container data-highlighted:before:bg-neutral-container-high`,e),ref:r,...i,children:[(0,n.jsx)(`span`,{className:`col-start-1 min-w-3xl`,children:t}),(0,n.jsx)(zv,{className:`col-start-2 flex items-center justify-center place-self-end self-center`,children:(0,n.jsx)(yj,{className:`size-sm`,weight:`bold`})})]});Cy(),X();var ume=({className:e,ref:t,...r})=>(0,n.jsx)(mg,{className:Y(`mx-2xs my-3xs h-px bg-border-strong`,e),ref:t,...r});X();var dme=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`ml-auto inline-flex items-center gap-3xs`,e),ref:r,...i,children:t});Cy();var M9=({children:e,...t})=>(0,n.jsx)(ene,{...t,children:e});Cy(),Uj(),X();var N9=({tone:e,className:t,children:r,ref:i,...a})=>(0,n.jsxs)(xy,{className:Y(cme({tone:e}),t),ref:i,...a,children:[(0,n.jsx)(`span`,{className:`col-start-1 min-w-3xl pr-2xl`,children:r}),(0,n.jsx)(pj,{className:`col-start-2 size-xs place-self-end self-center`,weight:`bold`})]});Cy(),X();var P9=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(cy,{className:Y(`data-popup-open:pointer-events-none`,e),ref:r,...i,render:t});Uj(),mk(),X();var fme=({className:e,children:t,ref:r,...i})=>{let{table:a}=C9(),o=(e,t)=>{t.toggleSorting(e!==`asc`,t.getCanMultiSort())};return(0,n.jsxs)(E9,{children:[(0,n.jsx)(P9,{children:(0,n.jsxs)(pk,{size:`iconMedium`,tone:`neutral`,variant:`ghost`,className:Y(``,e),ref:r,...i,children:[t,(0,n.jsx)(rj,{})]})}),(0,n.jsx)(k9,{children:(0,n.jsxs)(D9,{children:[(0,n.jsx)(O9,{children:`Sort By`}),a.getAllColumns().filter(e=>e.getCanSort()&&e.getIsVisible()).map(e=>(0,n.jsxs)(M9,{children:[(0,n.jsx)(N9,{className:`capitalize`,children:e.id}),(0,n.jsx)(k9,{children:(0,n.jsxs)(A9,{onValueChange:t=>o(t,e),value:e.getIsSorted(),children:[(0,n.jsxs)(j9,{value:`asc`,children:[(0,n.jsx)(Lj,{}),` Ascending`]}),(0,n.jsxs)(j9,{value:`desc`,children:[(0,n.jsx)(Rj,{}),` Descending`]})]},e.id)})]},e.id))]})})]})};uo();var pme=lo(``,{variants:{orientation:{horizontal:`flex items-center justify-between gap-xs [&_[data-track]]:w-full [&_button]:shrink-0`,vertical:`flex flex-col space-y-3xs`},size:{small:`[&_[data-track]]:h-3xs`,medium:`[&_[data-track]]:h-2xs`,large:`[&_[data-track]]:h-xs`},tone:{brand:`[&_[data-indicator]]:bg-brand-default`,accent:`[&_[data-indicator]]:bg-accent-default`,neutral:`[&_[data-indicator]]:bg-neutral-default`,error:`[&_[data-indicator]]:bg-error-default`,info:`[&_[data-indicator]]:bg-info-default`,success:`[&_[data-indicator]]:bg-success-default`,warning:`[&_[data-indicator]]:bg-warning-default`}},defaultVariants:{orientation:`vertical`,size:`medium`,tone:`brand`}});dk(),X();var mme=({orientation:e,size:t,tone:r,className:i,children:a,ref:o,...s})=>(0,n.jsx)(lS,{className:Y(pme({orientation:e,size:t,tone:r,className:i})),ref:o,...s,children:a});X();var hme=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex items-center justify-between`,e),ref:r,...i,children:t});dk(),X();var gme=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(hS,{"data-indicator":!0,className:Y(`rounded-full`,e),ref:r,...i,children:t});dk(),X();var _me=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(yS,{className:Y(`flex items-center gap-2xs style-text-strong--1 text-on-surface [&>svg]:size-xs`,e),ref:r,...i,children:t});dk(),X();var vme=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(dS,{className:Y(`w-full self-center rounded-full bg-surface-low inset-shadow-2xs`,e),"data-track":!0,ref:r,...i,children:t});dk(),X();var yme=({className:e,ref:t,...r})=>(0,n.jsx)(_S,{className:Y(`ml-auto text-right style-text-prose--2 text-on-surface-variant`,e),ref:t,...r});X();var bme=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex items-center justify-between`,e),ref:r,...i,children:t});X();var xme=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`span`,{className:Y(`text-left style-text-prose--2 whitespace-nowrap text-on-surface-variant`,e),ref:r,...i,children:t});uo();var Sme=lo(`flex flex-col gap-3xs data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 [&_[role="group"]]:rounded-full [&_[role="group"]]:bg-surface [&_[role="group"]]:p-3xs [&_[role="group"]]:shadow-2xs [&_[role="group"]]:outline [&_[role="group"]]:outline-transparent [&_[role="group"]]:transition-all aria-invalid:[&_[role="group"]]:bg-error-container aria-invalid:[&_[role="group"]]:outline-error-border aria-invalid:[&_[role="group"]]:focus-within:outline-error-border-strong aria-invalid:[&_[role="group"]]:not-focus-within:hover:outline-error-border data-[disabled]:[&_[role="group"]]:cursor-not-allowed data-[invalid]:[&_[role="group"]]:bg-error-container data-[invalid]:[&_[role="group"]]:outline-error-border data-[invalid]:[&_[role="group"]]:focus-within:outline-error-border-strong data-[invalid]:[&_[role="group"]]:not-focus-within:hover:outline-error-border aria-invalid:[&_input]:text-error-on-container aria-invalid:[&_input]:caret-error-border-strong data-[invalid]:[&_input]:text-error-on-container data-[invalid]:[&_input]:caret-error-border-strong`,{variants:{size:{small:`[&_input]:style-text-default-0`,medium:`[&_input]:style-text-default-1`,large:`[&_input]:style-text-default-2`}},defaultVariants:{size:`medium`}});FC(),Uj(),mk(),X();var Cme=({label:e,size:t,className:r,ref:i,...a})=>{let o=y.default.useId(),{min:s,max:c,value:l,defaultValue:u,onValueChange:d,"aria-invalid":f,...p}=a,[m,h]=y.default.useState(()=>typeof u==`number`?u:null),g=typeof l==`number`||l===null?l:m,_=!!(f||typeof g==`number`&&(typeof s==`number`&&g<s||typeof c==`number`&&g>c)),v=(...e)=>{let[t]=e;typeof l!=`number`&&l!==null&&h(t),d?.(...e)},b=()=>{switch(t){case`small`:return`iconSmall`;case`medium`:return`iconMedium`;case`large`:return`iconLarge`;default:return`iconMedium`}};return(0,n.jsxs)(mC,{className:Y(Sme({size:t,className:r})),ref:i,"aria-invalid":_,"data-invalid":_?``:void 0,defaultValue:u,id:o,max:c,min:s,onValueChange:v,value:l,...p,children:[(0,n.jsxs)(NC,{className:`cursor-ew-resize`,children:[(0,n.jsx)(`label`,{className:`cursor-ew-resize style-text-default--1`,htmlFor:o,children:e}),(0,n.jsx)(PC,{children:(0,n.jsx)(wme,{})})]}),(0,n.jsxs)(hC,{className:`flex w-full items-center`,children:[(0,n.jsx)(DC,{render:e=>(0,n.jsx)(pk,{...e,tone:`error`,variant:`ghost`,size:b(),className:`shrink-0`,children:(0,n.jsx)(Pj,{weight:`bold`})})}),(0,n.jsx)(AC,{className:`w-full text-center style-text-default-0 focus:outline-none`}),(0,n.jsx)(EC,{render:e=>(0,n.jsx)(pk,{...e,tone:`success`,variant:`ghost`,size:b(),className:`shrink-0`,children:(0,n.jsx)(Fj,{weight:`bold`})})})]})]})};function wme(e){return(0,n.jsxs)(`svg`,{fill:`black`,height:`14`,stroke:`white`,viewBox:`0 0 24 14`,width:`26`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,n.jsx)(`title`,{children:`Resize cursor`}),(0,n.jsx)(`path`,{d:`M19.5 5.5L6.49737 5.51844V2L1 6.9999L6.5 12L6.49737 8.5L19.5 8.5V12L25 6.9999L19.5 2V5.5Z`})]})}Cw();var F9=({children:e,...t})=>(0,n.jsx)(Jne,{...t,children:e});Cw(),X();var Tme=({className:e,ref:t,children:r,...i})=>(0,n.jsx)(vw,{className:Y(`style-text-prose--1`,e),ref:t,...i,children:r});Cw(),X();var I9=({className:e,ref:t,children:r,...i})=>(0,n.jsx)(sw,{children:(0,n.jsx)(dw,{className:Y(`h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom,transform] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none`),ref:t,sideOffset:8,...i,children:(0,n.jsxs)(hw,{className:`relative h-(--popup-height,auto) w-(--popup-width,auto) max-w-[500px] origin-(--transform-origin) overflow-hidden rounded-xl bg-surface-2 text-on-surface shadow-md transition-[width,height,opacity,scale] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-ending-style:scale-90 data-ending-style:opacity-0 data-instant:transition-none data-starting-style:scale-90 data-starting-style:opacity-0`,children:[(0,n.jsx)(gw,{className:`flex transition-[left] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180`}),(0,n.jsx)(xw,{className:Y(`relative h-(--popup-height,auto) w-(--popup-width,auto) max-w-full overflow-clip p-[1.5rem] transition-[width,height] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] **:data-current:w-[calc(var(--popup-width)-3rem)] **:data-current:translate-x-0 **:data-current:opacity-100 **:data-current:transition-[translate,opacity] **:data-current:duration-[350ms,175ms] **:data-current:ease-[cubic-bezier(0.22,1,0.36,1)] **:data-previous:w-[calc(var(--popup-width)-3rem)] **:data-previous:translate-x-0 **:data-previous:opacity-100 **:data-previous:transition-[translate,opacity] **:data-previous:duration-[350ms,175ms] **:data-previous:ease-[cubic-bezier(0.22,1,0.36,1)] **:data-[activation-direction~='left']:data-previous:data-ending-style:translate-x-1/2 **:data-[activation-direction~='left']:data-previous:data-ending-style:opacity-0 **:data-[activation-direction~='left']:data-current:data-starting-style:-translate-x-1/2 **:data-[activation-direction~='left']:data-current:data-starting-style:opacity-0 **:data-[activation-direction~='right']:data-previous:data-ending-style:-translate-x-1/2 **:data-[activation-direction~='right']:data-previous:data-ending-style:opacity-0 **:data-[activation-direction~='right']:data-current:data-starting-style:translate-x-1/2 **:data-[activation-direction~='right']:data-current:data-starting-style:opacity-0`,e),children:r})]})})});Cw(),X();var Eme=({className:e,ref:t,children:r,...i})=>(0,n.jsx)(_w,{className:Y(`flex items-center gap-2xs style-text-strong-0 [&>svg]:size-sm`,e),ref:t,...i,children:r});Cw(),X();var L9=({className:e,ref:t,children:r,...i})=>(0,n.jsx)(iw,{className:Y(`px-xs`,e),ref:t,...i,render:r});X();var Dme=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex flex-col gap-3xs pb-xs`,e),ref:r,...i,children:t});X();var R9=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`space-y-3xs`,e),ref:r,...i,children:t});mk(),X();var Ome=({variant:e,tone:t,className:r,children:i,ref:a,...o})=>e===`ghost`&&t===`neutral`?(0,n.jsx)(pk,{variant:e,tone:t,className:Y(`hover:bg-neutral-container-high!`,r),ref:a,...o,children:i}):(0,n.jsx)(pk,{variant:e,tone:t,className:Y(``,r),ref:a,...o,children:i});Cw();var kme=lre();X();var Ame=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex w-full items-center gap-sm rounded-full`,e),ref:r,...i,children:t});X();var jme=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`span`,{className:Y(`flex items-center gap-xs style-text-default-0 [&>svg]:size-md`,e),ref:r,...i,children:t});X();var Mme=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`span`,{className:Y(`style-text-default--2 text-on-surface-variant`,e),ref:r,...i,children:t});X();var Nme=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`ml-auto text-on-surface-variant [&>svg]:size-sm`,e),ref:r,...i,children:t});X();var Pme=({compact:e,className:t,children:r,ref:i,...a})=>(0,n.jsx)(`div`,{className:Y(`flex flex-col items-start justify-start gap-3xs`,e&&`hidden`,t),ref:i,...a,children:r});X();var Fme=({currentIndex:e,className:t,children:r,ref:i,...a})=>{let o=`progress-${(0,y.useId)().replace(/:/g,``)}`,s=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`style`,{children:`
77
116
  .${o} > :nth-child(${s}) [data-slot='progress-indicator'] {
78
117
  background-color: var(--color-accent-container);
79
118
  border: 1px solid var(--color-accent-border-strong);
@@ -88,9 +127,9 @@ Avoid returning a new reference inside your input selector, e.g.
88
127
  .${o} > :nth-child(-n+${s-1}) [data-slot='progress-bar'] {
89
128
  background-color: var(--color-accent-default);
90
129
  }
91
- `}),(0,n.jsx)(`div`,{className:X(`flex w-full items-center justify-center gap-2xs`,o,t),ref:i,...a,children:r})]})};Z();var _1=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:`w-full`,children:(0,n.jsx)(`div`,{className:X(`h-3xs w-full grow rounded-full bg-accent-default/20 transition-colors ease-in-out`,e),"data-slot":`progress-bar`,ref:r,...i,children:t})});Z();var v1=({title:e,description:t,className:r,children:i,ref:a,...o})=>(0,n.jsxs)(`div`,{className:`relative`,children:[(0,n.jsx)(`div`,{className:X(`flex size-md shrink-0 flex-col items-center justify-center rounded-full border border-neutral-border bg-neutral-container text-center style-text-default--2 text-accent-default transition-colors ease-in-out [&>svg]:size-xs`,r),"data-slot":`progress-indicator`,ref:a,...o,children:i}),(0,n.jsxs)(`div`,{className:`absolute top-full left-1/2 w-3xl -translate-x-1/2 translate-y-2xs`,children:[e&&(0,n.jsx)(`div`,{className:`text-center style-text-strong--2 text-on-surface`,children:e}),t&&(0,n.jsx)(`div`,{className:`text-center style-text-prose--2 text-on-surface-variant`,children:t})]})]});Ao();var y1=ko(`absolute top-[0px] right-[0px] flex`,{variants:{tone:{brand:`[&_[data-dot]]:bg-brand-default [&_[data-radar-ping]]:bg-brand-default`,accent:`[&_[data-dot]]:bg-accent-default [&_[data-radar-ping]]:bg-accent-default`,neutral:`[&_[data-dot]]:bg-neutral-default [&_[data-radar-ping]]:bg-neutral-default`,info:`[&_[data-dot]]:bg-info-default [&_[data-radar-ping]]:bg-info-default`,error:`[&_[data-dot]]:bg-error-default [&_[data-radar-ping]]:bg-error-default`,success:`[&_[data-dot]]:bg-success-default [&_[data-radar-ping]]:bg-success-default`,warning:`[&_[data-dot]]:bg-warning-default [&_[data-radar-ping]]:bg-warning-default`},size:{small:`-mt-3xs -mr-3xs style-text-default--2 [&_[data-dot]]:size-sm`,medium:`-mt-2xs -mr-2xs style-text-default--1 [&_[data-dot]]:size-md`,large:`-mt-xs -mr-xs style-text-default-0 [&_[data-dot]]:size-lg`}},defaultVariants:{tone:`brand`,size:`medium`}});Z();var b1=({hidePing:e=!1,tone:t=`brand`,size:r=`medium`,className:i,children:a,ref:o,...s})=>(0,n.jsxs)(`div`,{className:X(y1({tone:t,size:r,className:i})),ref:o,...s,children:[!e&&(0,n.jsx)(`span`,{className:`absolute inline-flex size-full animate-ping rounded-full opacity-75`,"data-radar-ping":!0}),(0,n.jsx)(`span`,{className:`relative flex items-center justify-center rounded-full text-surface`,"data-dot":!0,children:a})]});Z();var x1=({withHandle:e=!1,className:t,...r})=>(0,n.jsx)(o.Separator,{className:X(`relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-[0px] after:left-1/2 after:w-px after:-translate-x-1/2 focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full after:aria-[orientation=horizontal]:left-[0px] after:aria-[orientation=horizontal]:h-px after:aria-[orientation=horizontal]:w-full after:aria-[orientation=horizontal]:translate-x-[0px] after:aria-[orientation=horizontal]:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90`,t),"data-slot":`resizable-handle`,...r,children:e&&(0,n.jsx)(`div`,{className:`z-10 flex h-md w-3xs shrink-0 rounded-lg bg-border`})});Z();var S1=({className:e,...t})=>(0,n.jsx)(o.Panel,{className:X(``,e),"data-slot":`resizable-panel`,...t});Z();var C1=({className:e,...t})=>(0,n.jsx)(o.Group,{className:X(`flex h-full aria-[orientation=vertical]:flex-col`,e),"data-slot":`resizable-panel-group`,...t});QO(),Z();var w1=({orientation:e=`vertical`,defaultHeight:t=200,className:r,children:i,ref:a,...o})=>(0,n.jsxs)(TO,{className:X(r,`overflow-hidden rounded-xl bg-surface-low`,e===`horizontal`&&`h-full`),ref:a,style:{height:e===`vertical`?`${t}px`:`100%`},...o,children:[(0,n.jsx)(RO,{className:X(`flex h-full gap-xs overscroll-contain rounded-xl bg-surface-low py-xs pr-md inset-shadow-2xs before:pointer-events-none before:absolute before:top-0 before:left-0 before:block before:h-[min(40px,var(--scroll-area-overflow-y-start))] before:w-full before:bg-linear-to-b before:from-shadow before:to-transparent before:transition-[height] before:duration-100 before:ease-out before:content-[""] before:[--scroll-area-overflow-y-start:inherit] after:pointer-events-none after:absolute after:bottom-0 after:left-0 after:block after:h-[min(40px,var(--scroll-area-overflow-y-end,40px))] after:w-full after:bg-linear-to-t after:from-shadow after:to-transparent after:transition-[height] after:duration-100 after:ease-out after:content-[""] after:[--scroll-area-overflow-y-end:inherit]`,e===`horizontal`&&`flex-row pb-md pl-sm`,e===`vertical`&&`flex-col pl-sm`),children:i}),(0,n.jsx)(GO,{className:X(`ml-sm opacity-0 transition-opacity delay-300 hover:cursor-pointer data-hovering:opacity-100 data-hovering:delay-0 data-hovering:duration-75 data-scrolling:opacity-100 data-scrolling:delay-0 data-scrolling:duration-75`,e===`vertical`&&`my-xs mr-2xs w-2xs`,e===`horizontal`&&`mx-xs mb-xs h-2xs`),orientation:e,children:(0,n.jsx)(qO,{className:`size-full rounded-full bg-accent-default shadow-xs`})}),(0,n.jsx)(YO,{})]});Z();var T1=_.default.createContext(null),E1=({defaultOpen:e=!0,side:t=`left`,collapsible:r=`icon`,className:i,children:a,ref:o,...s})=>{let[c,l]=_.default.useState(e),[u,d]=_.default.useState(!1);return _.default.useEffect(()=>{let t=()=>{let t=window.innerWidth<328;d(t),t&&e&&r!==`none`&&l(!1)};return t(),window.addEventListener(`resize`,t),()=>window.removeEventListener(`resize`,t)},[e,r]),(0,n.jsx)(T1.Provider,{value:{defaultOpen:e,open:c,setOpen:l,side:t,trigger:()=>l(!c),isMobile:u,setIsMobile:d,collapsible:r},children:(0,n.jsx)(`div`,{className:X(`relative size-full`,t===`left`?`flex flex-row`:`flex flex-row-reverse`,i),ref:o,...s,children:a})})},D1=()=>{let e=_.default.useContext(T1);if(!e)throw Error(`useSidebar must be used within a SidebarProvider`);return e};Z();var O1=({tone:e=`default`,width:t=400,className:r,children:i,...a})=>{let{open:o,setOpen:s,isMobile:c,collapsible:l,side:u}=D1(),d=_.default.useRef(null);return _.default.useEffect(()=>{let e=e=>{d.current&&!d.current.contains(e.target)&&c&&o&&s&&s(!1)};return document.addEventListener(`click`,e),()=>{document.removeEventListener(`click`,e)}},[o,s,c]),(0,n.jsx)(`div`,{className:X(`sticky left-[0px] flex h-full shrink-0 flex-col justify-between overflow-hidden border-border bg-surface transition-[width,transform] duration-300 ease-in-out`,r,e===`ghost`&&!c&&`bg-transparent`,l===`none`?`gap-lg`:l===`offcanvas`||l===`icon`?o?`gap-lg`:`gap-sm`:`gap-lg`,(l===`offcanvas`||l===`icon`)&&!o&&c?`absolute z-50 -translate-x-full`:(l===`offcanvas`||l===`icon`)&&o&&c?`absolute z-50`:``,l===`offcanvas`&&!o&&`border-none`,o&&`p-md`,l===`icon`&&!o&&`py-md`,c&&`border-none`,u===`left`?`border-r`:`border-l`),ref:d,style:l===`none`?{width:`${t}px`}:l===`offcanvas`?o?c?{width:`33.333333%`}:{width:`${t}px`}:{width:`0px`}:l==`icon`?o?{width:`${t}px`}:c?{width:`0px`}:{width:`80px`}:{width:`${t}px`},...a,children:i})};sL(),dP(),Z();var k1=({className:e,children:t,ref:r,...i})=>{let{trigger:a,collapsible:o}=D1();return o===`none`?null:(0,n.jsxs)(lP,{className:X(`shrink-0 border-none`,e),ref:r,size:`iconMedium`,variant:`ghost`,onClick:e=>{e.stopPropagation(),a&&a()},...i,children:[t,(0,n.jsx)(qI,{weight:`bold`})]})};QO(),Z();var A1=({className:e,children:t,ref:r,...i})=>{let{open:a}=D1();return(0,n.jsx)(TO,{className:X(`mb-auto min-h-0 flex-1 overflow-hidden rounded-xl transition-all duration-300 ease-in-out`,a?``:`w-fit self-center`,e),ref:r,...i,children:(0,n.jsxs)(RO,{className:X(`flex h-full scrollbar-none flex-col items-center divide-y divide-border overflow-y-auto overscroll-contain [&::-webkit-scrollbar]:hidden`,`before:pointer-events-none before:absolute before:top-0 before:left-0 before:block before:h-[min(40px,var(--scroll-area-overflow-y-start))] before:w-full before:bg-linear-to-b before:from-shadow/35 before:to-transparent before:transition-[height] before:duration-100 before:ease-out before:content-[""] before:[--scroll-area-overflow-y-start:inherit]`,`after:pointer-events-none after:absolute after:bottom-0 after:left-0 after:block after:h-[min(40px,var(--scroll-area-overflow-y-end,40px))] after:w-full after:bg-linear-to-t after:from-shadow/35 after:to-transparent after:transition-[height] after:duration-100 after:ease-out after:content-[""] after:[--scroll-area-overflow-y-end:inherit]`,a?`gap-md`:`gap-xs px-3xs pt-3xs`),children:[!a&&(0,n.jsx)(k1,{}),t]})})};Z();var j1=({className:e,children:t,ref:r,...i})=>{let{open:a,collapsible:o}=D1(),s=o===`none`||a;return(0,n.jsx)(`div`,{className:X(`flex shrink-0 animate-in items-center truncate p-3xs transition-all duration-300 ease-in-out`,a?`justify-start fade-in-0`:`justify-center self-center fade-out-0`,e),ref:r,...i,children:typeof t==`function`?t(s):t})};Z();var M1=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`flex w-full flex-col items-start gap-3xs not-last-of-type:pb-md`,e),ref:r,...i,children:t});Z();var N1=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`flex w-full flex-col gap-3xs`,e),ref:r,...i,children:t});Z();var P1=({className:e,children:t,ref:r,...i})=>{let{open:a,collapsible:o}=D1();return o===`none`||a?(0,n.jsx)(`span`,{className:X(`inline-flex h-md w-full items-center justify-between truncate pr-3xs pl-sm style-text-default--1 text-on-surface-variant transition-all duration-200 ease-out`,o!==`none`&&a&&`animate-in fade-in-0 slide-in-from-left-2`,e),ref:r,...i,children:t}):null};Z();var F1=({className:e,children:t,ref:r,...i})=>{let{open:a,collapsible:o}=D1(),s=o===`none`||a;return(0,n.jsxs)(`div`,{className:X(`flex shrink-0 items-center justify-between truncate style-text-strong-1 transition-all duration-300 ease-in-out`,a?`h-2xl pr-3xs pl-xs`:`self-center`,e),ref:r,...i,children:[(0,n.jsx)(`div`,{className:X(`flex items-center justify-center gap-xs transition-all duration-200 ease-out`,a&&`justify-start`,o!==`none`&&`animate-in`,s?`fade-in-0`:`fade-out-0`),children:typeof t==`function`?t(s):t}),a&&(0,n.jsx)(k1,{})]})};Z();var I1=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`flex w-full flex-col items-start gap-3xs p-3xs`,e),ref:r,...i,children:t});Z();var L1=({className:e,children:t,ref:r,...i})=>{let{open:a}=D1();return(0,n.jsx)(qP,{className:X(!a&&`hidden`,e),ref:r,...i,children:t})};Z();var R1=({isActive:e,className:t,children:r,ref:i,...a})=>{let{open:o,collapsible:s}=D1();return(0,n.jsx)(`button`,{className:X(`inline-flex cursor-pointer items-center gap-2xs rounded-full border border-transparent style-text-default-0 whitespace-nowrap transition-all duration-200 ease-out select-none active:scale-95 disabled:pointer-events-none disabled:opacity-50 [&>svg]:shrink-0`,e?`pointer-events-none bg-surface text-on-surface shadow-2xs`:`text-neutral-default hover:bg-neutral-container hover:text-neutral-on-container`,!(s===`none`||o)&&`mx-auto`,o?`h-xl w-full pl-sm`:`size-xl justify-center *:hidden [&>svg]:block`,s!==`none`&&o&&`animate-in fade-in-0 slide-in-from-left-2`,t),ref:i,...a,children:r})};Z();var z1=({className:e,children:t,ref:r,...i})=>{let{open:a}=D1();return a?(0,n.jsx)(bL,{className:X(``,e),ref:r,...i,children:t}):(0,n.jsx)(n1,{children:t})};Z();var B1=({className:e,children:t,ref:r,...i})=>{let{open:a}=D1();return a?(0,n.jsx)(vL,{className:X(``,e),ref:r,...i,children:t}):(0,n.jsx)(i1,{side:`right`,className:`w-fit p-[0.5rem_0.5rem]`,children:(0,n.jsx)(c1,{className:`flex gap-3xs`,children:t})})};sL(),Z();var V1=({className:e,children:t,ref:r,...i})=>{let{open:a}=D1();return a?(0,n.jsx)(yL,{className:X(`gap-2xs! whitespace-nowrap shadow-none! transition-all duration-200 ease-out select-none hover:bg-neutral-container hover:text-neutral-on-container data-panel-open:bg-neutral-container! [&>svg]:shrink-0!`,e),ref:r,...i,children:t}):(0,n.jsx)(o1,{children:(0,n.jsxs)(`button`,{className:X(`flex size-xl items-center justify-center rounded-xl shadow-none! transition-colors *:hidden hover:cursor-pointer hover:bg-neutral-container hover:text-neutral-on-container data-popup-open:bg-neutral-container [&>svg]:block`),children:[t,(0,n.jsx)(hI,{weight:`bold`,className:`absolute right-2xs size-xs text-on-surface-variant`})]})})};Z();var H1=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`flex h-xl w-full items-center justify-between gap-2xs`,e),ref:r,...i,children:t});Z();var U1=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:X(`animate-pulse rounded-lg bg-surface-2 shadow-sm`,e),ref:r,...i,children:t}),W1=_.createContext(null),G1=({defaultView:e=`list`,table:t,className:r,children:i,ref:a,...o})=>{let[s,c]=_.useState(e);return(0,n.jsx)(W1.Provider,{value:{view:s,setView:c,table:t,className:r,children:i,ref:a,...o},children:(0,n.jsx)(`div`,{className:`flex flex-col gap-sm`,children:i})})},K1=()=>{let e=_.useContext(W1);if(!e)throw Error(`useTable must be used within a TableProvider`);return e};Z();var q1=({rowGridOverride:e,rowListOverride:t,className:r,children:i,ref:a,...o})=>{let{view:s,table:c}=K1(),l=c.getRowModel().rows;return(0,n.jsx)(`tbody`,{className:X(`divide-y divide-border`,s===`grid`&&`grid grid-cols-5 gap-sm`,r),ref:a,...o,children:l.map(r=>i?i(r):s===`grid`?e?(0,n.jsx)(e,{row:r},r.id):(0,n.jsx)(r0,{row:r},r.id):s===`list`?t?(0,n.jsx)(t,{row:r},r.id):(0,n.jsx)(i0,{row:r},r.id):null)})};sL(),dP(),Z();var J1=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(lP,{className:X(``,e),ref:r,...i,children:[t,(0,n.jsx)(FI,{weight:`bold`})]});sL(),dP(),Z();var Y1=({className:e,children:t,ref:r,...i})=>{let{table:a}=K1();return(0,n.jsxs)(lP,{className:X(`shrink-0`,e),disabled:!a.getCanPreviousPage(),onClick:()=>{a.setPageIndex(0)},ref:r,size:`iconSmall`,variant:`ghost`,tone:`neutral`,...i,children:[t,(0,n.jsx)(dI,{weight:`bold`})]})};Z();var X1=({className:e,children:t,ref:r,...i})=>{let{table:a}=K1();return(0,n.jsxs)(`tfoot`,{className:X(``,e),ref:r,...i,children:[t,a.getFooterGroups().map(e=>(0,n.jsx)(`tr`,{children:e.headers.map(e=>(0,n.jsx)(`th`,{colSpan:e.colSpan,children:e.isPlaceholder?null:_$(e.column.columnDef.footer,e.getContext())},e.id))},e.id))]})};sL(),Z();var Z1=({className:e,children:t,ref:r,...i})=>{let{table:a}=K1();return(0,n.jsxs)(`thead`,{className:X(``),ref:r,...i,children:[t,a.getHeaderGroups().map(t=>(0,n.jsx)(`tr`,{className:`rounded-lg`,children:t.headers.map(t=>(0,n.jsx)(`th`,{className:X(`h-xl bg-neutral-container px-sm text-left style-text-default-0 text-neutral-on-container transition-colors first:rounded-l-xl last:rounded-r-xl`,t.column.getCanSort()&&`hover:cursor-pointer hover:bg-neutral-container-high`,t.isPlaceholder&&`cursor-default`,e),colSpan:t.colSpan,onClick:t.column.getToggleSortingHandler(),style:{width:t.column.getSize(),minWidth:t.column.columnDef.minSize,maxWidth:t.column.columnDef.maxSize},children:t.isPlaceholder?null:(0,n.jsxs)(`div`,{className:X(`inline-flex items-center justify-center gap-2xs [&>svg]:size-sm`,t.column.getCanSort()&&`select-none hover:cursor-pointer`),children:[_$(t.column.columnDef.header,t.getContext()),{asc:(0,n.jsx)(ZI,{weight:`bold`}),desc:(0,n.jsx)(YI,{weight:`bold`})}[t.column.getIsSorted()]??(t.column.getCanSort()?(0,n.jsx)(LI,{weight:`bold`}):null)]})},t.id))},t.id))]})};sL(),dP(),Z();var Q1=({className:e,children:t,ref:r,...i})=>{let{table:a}=K1();return(0,n.jsxs)(lP,{className:X(`shrink-0`,e),disabled:!a.getCanNextPage(),onClick:()=>{a.setPageIndex(a.getPageCount()-1)},ref:r,size:`iconSmall`,variant:`ghost`,tone:`neutral`,...i,children:[t,(0,n.jsx)(pI,{weight:`bold`})]})};sL(),dP(),Z();var $1=({className:e,children:t,ref:r,...i})=>{let{table:a}=K1();return(0,n.jsxs)(lP,{className:X(`shrink-0`,e),disabled:!a.getCanNextPage(),onClick:()=>{a.nextPage()},ref:r,size:`iconSmall`,variant:`ghost`,tone:`neutral`,...i,children:[t,(0,n.jsx)(hI,{weight:`bold`})]})};sL(),dP(),Z();var e0=({className:e,children:t,ref:r,...i})=>{let{table:a}=K1();return(0,n.jsxs)(lP,{className:X(`shrink-0`,e),disabled:!a.getCanPreviousPage(),onClick:()=>{a.previousPage()},ref:r,size:`iconSmall`,variant:`ghost`,tone:`neutral`,...i,children:[t,(0,n.jsx)(lI,{weight:`bold`})]})};sL(),dP(),Z();var t0=({className:e,children:t,ref:r,...i})=>{let a=_.useReducer(()=>({}),{})[1];return(0,n.jsxs)(lP,{className:X(``,e),onClick:()=>{a()},ref:r,size:`iconMedium`,...i,children:[t,(0,n.jsx)(rI,{weight:`bold`})]})},n0=({children:e})=>{let{table:t}=K1(),n=t.getState().pagination.pageIndex,r=t.getState().pagination.pageSize,i=t.getFilteredRowModel().rows.length,a=i===0?0:n*r+1;return e(a,i===0?0:Math.min(a+r-1,i),i)};Z();var r0=({row:e,className:t,children:r,ref:i,...a})=>(0,n.jsx)(`tr`,{className:X(`aspect-video min-h-2xl rounded-md bg-neutral-container p-xs`,t),ref:i,...a,children:e.getVisibleCells().map(e=>(0,n.jsxs)(`td`,{children:[r,_$(e.column.columnDef.cell,e.getContext())]},e.id))});Z();var i0=({row:e,className:t,children:r,ref:i,...a})=>(0,n.jsx)(`tr`,{className:X(``,t),ref:i,...a,children:e.getVisibleCells().map(e=>(0,n.jsxs)(`td`,{className:`p-sm`,style:{width:e.column.getSize(),minWidth:e.column.columnDef.minSize,maxWidth:e.column.columnDef.maxSize},children:[r,_$(e.column.columnDef.cell,e.getContext())]},e.id))});MB(),Z();var a0=({className:e,children:t,ref:r,...i})=>{let{table:a}=K1();return(0,n.jsx)(AB,{className:X(``,e),onChange:e=>{a.setGlobalFilter(String(e.target.value))},placeholder:`Search by ${a.getAllColumns().map(e=>e.id).join(`, `)}`,ref:r,value:a.getState().globalFilter??``,...i,children:t})};sL(),dP(),Z();var o0=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(lP,{className:X(``,e),ref:r,...i,children:[t,(0,n.jsx)(aI,{weight:`bold`})]});Ao();var s0=ko(``,{variants:{variant:{default:`space-y-2xs [&_[role=presentation]]:top-1/2 [&_[role=presentation]]:rounded-lg [&_[role=presentation]]:bg-brand-default [&_[role=tab]]:rounded-lg [&_[role=tab]]:px-sm [&_[role=tab]]:style-text-default-0 [&_[role=tab]]:data-active:text-brand-on-default [&_[role=tablist]]:h-xl [&_[role=tablist]]:gap-xs [&_[role=tablist]]:rounded-lg [&_[role=tablist]]:bg-surface-low [&_[role=tablist]]:p-3xs [&_[role=tab]]:hover:[&:not([data-active])]:text-brand-default`,ghost:`space-y-2xs [&_[role=presentation]]:top-1/2 [&_[role=presentation]]:rounded-lg [&_[role=presentation]]:bg-brand-default [&_[role=tab]]:h-xl [&_[role=tab]]:rounded-lg [&_[role=tab]]:px-sm [&_[role=tab]]:style-text-default-0 [&_[role=tab]]:data-active:text-brand-on-default [&_[role=tablist]]:gap-xs [&_[role=tablist]]:rounded-lg [&_[role=tab]]:hover:[&:not([data-active])]:text-brand-default`,underline:`space-y-2xs [&_[role=presentation]]:bg-brand-default [&_[role=tab]]:px-md [&_[role=tab]]:style-text-default-0 [&_[role=tab]]:data-active:text-brand-default [&_[role=tablist]]:h-xl [&_[role=tablist]]:gap-lg [&_[role=tablist]]:border-b-3 [&_[role=tablist]]:border-border **:[[role=presentation]]:bottom-[-4px] **:[[role=presentation]]:h-[3px] [&_[role=tab]]:hover:[&:not([data-active])]:text-brand-default`},fill:{true:`[&_[role=tab]]:grow [&_[role=tablist]]:w-full`,false:`[&_[role=tablist]]:w-fit`}},defaultVariants:{variant:`default`,fill:!0}});iM(),Z();var c0=({variant:e,fill:t,className:r,ref:i,...a})=>(0,n.jsx)(Lj,{className:X(s0({variant:e,fill:t}),r),ref:i,...a});iM(),Z();var l0=({className:e,...t})=>(0,n.jsx)(Jj,{className:X(`absolute left-[0px] z-[-1] h-(--active-tab-height) w-(--active-tab-width) translate-x-(--active-tab-left) -translate-y-1/2 transition-all duration-300`,e),...t});iM(),Z();var u0=({className:e,...t})=>(0,n.jsx)(tM,{className:X(`relative z-0 flex`,e),...t});iM(),Z();var d0=({className:e,...t})=>(0,n.jsx)($j,{className:X(`relative flex grow items-center justify-start overflow-auto`,e),...t});iM(),Z();var f0=({className:e,...t})=>(0,n.jsx)(Hj,{className:X(`inline-flex items-center justify-center gap-xs text-center break-keep whitespace-nowrap text-on-surface transition-colors duration-300 outline-none select-none hover:cursor-pointer focus-visible:relative focus-visible:before:absolute focus-visible:before:outline`,e),...t});lN();var p0=()=>{let e=oN(),t=t=>e.add({...t,data:{...t.data,icon:t.icon,variant:t.variant}});return{...e,add:t}},m0=()=>{let e=iN();return{add:t=>e.add({...t,data:{...t.data,icon:t.icon,variant:t.variant}}),toasts:e.toasts}};lN(),sL(),dP(),Z();var h0=({className:e,ref:t,toast:r,...i})=>{let a=r.timeout??1e4,o=2*Math.PI*14;_.default.useEffect(()=>{let e,t=performance.now(),n=r=>{Math.min(r-t,a)<a&&(e=requestAnimationFrame(n))};return e=requestAnimationFrame(n),()=>cancelAnimationFrame(e)},[a]);let s=()=>{switch(r.data?.variant){case`brand`:return`bg-brand-default`;case`accent`:return`bg-accent-default`;case`neutral`:return`bg-neutral-default`;case`error`:return`bg-error-default`;case`info`:return`bg-info-default`;case`success`:return`bg-success-default`;case`warning`:return`bg-warning-default`;default:return`bg-neutral-default`}},c=()=>{switch(r.data?.variant){case`brand`:return`border-brand-border-strong`;case`accent`:return`border-accent-border-strong`;case`neutral`:return`border-neutral-border-strong`;case`error`:return`border-error-border-strong`;case`info`:return`border-info-border-strong`;case`success`:return`border-success-border-strong`;case`warning`:return`border-warning-border-strong`;default:return`border-neutral-border-strong`}},l=()=>{if(r.data?.icon)return(0,n.jsx)(r.data.icon,{weight:`fill`});switch(r.data?.variant){case`brand`:return(0,n.jsx)(zI,{weight:`fill`});case`accent`:return(0,n.jsx)(zI,{weight:`fill`});case`neutral`:return(0,n.jsx)(zI,{weight:`fill`});case`error`:return(0,n.jsx)(tL,{weight:`fill`});case`info`:return(0,n.jsx)(zI,{weight:`fill`});case`success`:return(0,n.jsx)(CI,{weight:`fill`});case`warning`:return(0,n.jsx)($I,{weight:`fill`});default:return(0,n.jsx)(zI,{weight:`fill`})}};return(0,n.jsxs)(LM,{className:X(`absolute right-[0px] bottom-[0px] left-auto z-[calc(1000-var(--toast-index))] mr-[0px] flex h-2xl origin-bottom transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--peek))-(var(--shrink)*var(--height))))_scale(var(--scale))] items-center justify-center gap-xs overflow-hidden rounded-xl border bg-surface bg-clip-padding pr-sm shadow-lg select-none [--gap:0.75rem] [--height:var(--toast-frontmost-height,var(--toast-height))] [--offset-y:calc(var(--toast-offset-y)*-1+calc(var(--toast-index)*var(--gap)*-1)+var(--toast-swipe-movement-y))] [--peek:0.75rem] [--scale:calc(max(0,1-(var(--toast-index)*0.1)))] [--shrink:calc(1-var(--scale))] [transition:transform_0.5s_cubic-bezier(0.22,1,0.36,1),opacity_0.5s,height_0.15s] after:absolute after:top-full after:left-[0px] after:w-full after:content-[''] data-ending-style:opacity-0 data-expanded:h-(--toast-height) data-expanded:transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--offset-y)))] data-limited:opacity-0 data-starting-style:transform-[translateY(150%)] data-ending-style:data-[swipe-direction=down]:transform-[translateY(calc(var(--toast-swipe-movement-y)+150%))] data-expanded:data-ending-style:data-[swipe-direction=down]:transform-[translateY(calc(var(--toast-swipe-movement-y)+150%))] data-ending-style:data-[swipe-direction=left]:transform-[translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))] data-expanded:data-ending-style:data-[swipe-direction=left]:transform-[translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))] data-ending-style:data-[swipe-direction=right]:transform-[translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))] data-expanded:data-ending-style:data-[swipe-direction=right]:transform-[translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))] data-ending-style:data-[swipe-direction=up]:transform-[translateY(calc(var(--toast-swipe-movement-y)-150%))] data-expanded:data-ending-style:data-[swipe-direction=up]:transform-[translateY(calc(var(--toast-swipe-movement-y)-150%))] [&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:transform-[translateY(150%)]`,e,c()),ref:t,toast:r,...i,children:[(0,n.jsx)(`div`,{className:X(`flex aspect-square size-2xl items-center justify-center [&>svg]:size-lg [&>svg]:text-on-surface-inverse`,s()),children:l()}),(0,n.jsxs)(zM,{className:`flex items-center justify-center gap-xs overflow-hidden pl-2xs transition-opacity duration-250 data-behind:pointer-events-none data-behind:opacity-0 data-expanded:pointer-events-auto data-expanded:opacity-100`,children:[(0,n.jsxs)(`div`,{children:[(0,n.jsx)(UM,{className:`style-text-strong--1`}),(0,n.jsx)(VM,{className:`style-text-prose--1 whitespace-nowrap text-on-surface-variant`})]}),(0,n.jsxs)(`div`,{className:`ml-xl flex h-lg grow items-center justify-center gap-xs`,children:[(0,n.jsx)(qM,{render:e=>(0,n.jsx)(lP,{"data-testid":`toast-action-button`,onClick:e.onClick,size:`small`,tone:r.data?.variant,variant:`soft`,children:e.children})}),r.actionProps&&(0,n.jsx)(RL,{variant:`strong`,orientation:`vertical`,weight:`thinnest`}),(0,n.jsxs)(GM,{"aria-label":`Close`,className:`relative flex size-sm items-center justify-center rounded-full bg-transparent p-xs text-on-surface-variant transition-colors hover:cursor-pointer hover:bg-error-container hover:text-error-on-container`,children:[(0,n.jsx)(`span`,{className:`pointer-events-none absolute inset-[0px] z-10 flex items-center justify-center`,children:(0,n.jsx)(`svg`,{width:`100%`,height:`100%`,viewBox:`0 0 32 32`,className:`block -rotate-90`,children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`style`,{children:`
130
+ `}),(0,n.jsx)(`div`,{className:Y(`flex w-full items-center justify-center gap-2xs`,o,t),ref:i,...a,children:r})]})};X();var Ime=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:`w-full`,children:(0,n.jsx)(`div`,{className:Y(`h-3xs w-full grow rounded-full bg-accent-default/20 transition-colors ease-in-out`,e),"data-slot":`progress-bar`,ref:r,...i,children:t})});X();var Lme=({title:e,description:t,className:r,children:i,ref:a,...o})=>(0,n.jsxs)(`div`,{className:`relative`,children:[(0,n.jsx)(`div`,{className:Y(`flex size-md shrink-0 flex-col items-center justify-center rounded-full border border-neutral-border bg-neutral-container text-center style-text-default--2 text-accent-default transition-colors ease-in-out [&>svg]:size-xs`,r),"data-slot":`progress-indicator`,ref:a,...o,children:i}),(0,n.jsxs)(`div`,{className:`absolute top-full left-1/2 w-3xl -translate-x-1/2 translate-y-2xs`,children:[e&&(0,n.jsx)(`div`,{className:`text-center style-text-strong--2 text-on-surface`,children:e}),t&&(0,n.jsx)(`div`,{className:`text-center style-text-prose--2 text-on-surface-variant`,children:t})]})]});uo();var Rme=lo(`absolute top-[0px] right-[0px] flex`,{variants:{tone:{brand:`[&_[data-dot]]:bg-brand-default [&_[data-radar-ping]]:bg-brand-default`,accent:`[&_[data-dot]]:bg-accent-default [&_[data-radar-ping]]:bg-accent-default`,neutral:`[&_[data-dot]]:bg-neutral-default [&_[data-radar-ping]]:bg-neutral-default`,info:`[&_[data-dot]]:bg-info-default [&_[data-radar-ping]]:bg-info-default`,error:`[&_[data-dot]]:bg-error-default [&_[data-radar-ping]]:bg-error-default`,success:`[&_[data-dot]]:bg-success-default [&_[data-radar-ping]]:bg-success-default`,warning:`[&_[data-dot]]:bg-warning-default [&_[data-radar-ping]]:bg-warning-default`},size:{small:`-mt-3xs -mr-3xs style-text-default--2 [&_[data-dot]]:size-sm`,medium:`-mt-2xs -mr-2xs style-text-default--1 [&_[data-dot]]:size-md`,large:`-mt-xs -mr-xs style-text-default-0 [&_[data-dot]]:size-lg`}},defaultVariants:{tone:`brand`,size:`medium`}});X();var zme=({hidePing:e=!1,tone:t=`brand`,size:r=`medium`,className:i,children:a,ref:o,...s})=>(0,n.jsxs)(`div`,{className:Y(Rme({tone:t,size:r,className:i})),ref:o,...s,children:[!e&&(0,n.jsx)(`span`,{className:`absolute inline-flex size-full animate-ping rounded-full opacity-75`,"data-radar-ping":!0}),(0,n.jsx)(`span`,{className:`relative flex items-center justify-center rounded-full text-surface`,"data-dot":!0,children:a})]});X();var Bme=({withHandle:e=!1,className:t,...r})=>(0,n.jsx)(s.Separator,{className:Y(`relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-[0px] after:left-1/2 after:w-px after:-translate-x-1/2 focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full after:aria-[orientation=horizontal]:left-[0px] after:aria-[orientation=horizontal]:h-px after:aria-[orientation=horizontal]:w-full after:aria-[orientation=horizontal]:translate-x-[0px] after:aria-[orientation=horizontal]:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90`,t),"data-slot":`resizable-handle`,...r,children:e&&(0,n.jsx)(`div`,{className:`z-10 flex h-md w-3xs shrink-0 rounded-lg bg-border`})});X();var Vme=({className:e,...t})=>(0,n.jsx)(s.Panel,{className:Y(``,e),"data-slot":`resizable-panel`,...t});X();var Hme=({className:e,...t})=>(0,n.jsx)(s.Group,{className:Y(`flex h-full aria-[orientation=vertical]:flex-col`,e),"data-slot":`resizable-panel-group`,...t});vT(),X();var Ume=({orientation:e=`vertical`,defaultHeight:t=200,className:r,children:i,ref:a,...o})=>(0,n.jsxs)(nT,{className:Y(r,`overflow-hidden rounded-xl bg-surface-low`,e===`horizontal`&&`h-full`),ref:a,style:{height:e===`vertical`?`${t}px`:`100%`},...o,children:[(0,n.jsx)(uT,{className:Y(`flex h-full gap-xs overscroll-contain rounded-xl bg-surface-low py-xs pr-md inset-shadow-2xs before:pointer-events-none before:absolute before:top-0 before:left-0 before:block before:h-[min(40px,var(--scroll-area-overflow-y-start))] before:w-full before:bg-linear-to-b before:from-shadow before:to-transparent before:transition-[height] before:duration-100 before:ease-out before:content-[""] before:[--scroll-area-overflow-y-start:inherit] after:pointer-events-none after:absolute after:bottom-0 after:left-0 after:block after:h-[min(40px,var(--scroll-area-overflow-y-end,40px))] after:w-full after:bg-linear-to-t after:from-shadow after:to-transparent after:transition-[height] after:duration-100 after:ease-out after:content-[""] after:[--scroll-area-overflow-y-end:inherit]`,e===`horizontal`&&`flex-row pb-md pl-sm`,e===`vertical`&&`flex-col pl-sm`),children:i}),(0,n.jsx)(hT,{className:Y(`ml-sm opacity-0 transition-opacity delay-300 hover:cursor-pointer data-hovering:opacity-100 data-hovering:delay-0 data-hovering:duration-75 data-scrolling:opacity-100 data-scrolling:delay-0 data-scrolling:duration-75`,e===`vertical`&&`my-xs mr-2xs w-2xs`,e===`horizontal`&&`mx-xs mb-xs h-2xs`),orientation:e,children:(0,n.jsx)(gT,{className:`size-full rounded-full bg-accent-default shadow-xs`})}),(0,n.jsx)(_T,{})]});X();var z9=y.default.createContext(null),Wme=({defaultOpen:e=!0,side:t=`left`,collapsible:r=`icon`,className:i,children:a,ref:o,...s})=>{let[c,l]=y.default.useState(e),[u,d]=y.default.useState(!1);return y.default.useEffect(()=>{let t=()=>{let t=window.innerWidth<328;d(t),t&&e&&r!==`none`&&l(!1)};return t(),window.addEventListener(`resize`,t),()=>window.removeEventListener(`resize`,t)},[e,r]),(0,n.jsx)(z9.Provider,{value:{defaultOpen:e,open:c,setOpen:l,side:t,trigger:()=>l(!c),isMobile:u,setIsMobile:d,collapsible:r},children:(0,n.jsx)(`div`,{className:Y(`relative size-full`,t===`left`?`flex flex-row`:`flex flex-row-reverse`,i),ref:o,...s,children:a})})},B9=()=>{let e=y.default.useContext(z9);if(!e)throw Error(`useSidebar must be used within a SidebarProvider`);return e};X();var Gme=({tone:e=`default`,width:t=400,className:r,children:i,...a})=>{let{open:o,setOpen:s,isMobile:c,collapsible:l,side:u}=B9(),d=y.default.useRef(null);return y.default.useEffect(()=>{let e=e=>{d.current&&!d.current.contains(e.target)&&c&&o&&s&&s(!1)};return document.addEventListener(`click`,e),()=>{document.removeEventListener(`click`,e)}},[o,s,c]),(0,n.jsx)(`div`,{className:Y(`sticky left-[0px] flex h-full shrink-0 flex-col justify-between overflow-hidden border-border bg-surface transition-[width,transform] duration-300 ease-in-out`,r,e===`ghost`&&!c&&`bg-transparent`,l===`none`?`gap-lg`:l===`offcanvas`||l===`icon`?o?`gap-lg`:`gap-sm`:`gap-lg`,(l===`offcanvas`||l===`icon`)&&!o&&c?`absolute z-50 -translate-x-full`:(l===`offcanvas`||l===`icon`)&&o&&c?`absolute z-50`:``,l===`offcanvas`&&!o&&`border-none`,o&&`p-md`,l===`icon`&&!o&&`py-md`,c&&`border-none`,u===`left`?`border-r`:`border-l`),ref:d,style:l===`none`?{width:`${t}px`}:l===`offcanvas`?o?c?{width:`33.333333%`}:{width:`${t}px`}:{width:`0px`}:l==`icon`?o?{width:`${t}px`}:c?{width:`0px`}:{width:`80px`}:{width:`${t}px`},...a,children:i})};Uj(),mk(),X();var V9=({className:e,children:t,ref:r,...i})=>{let{trigger:a,collapsible:o}=B9();return o===`none`?null:(0,n.jsxs)(pk,{className:Y(`shrink-0 border-none`,e),ref:r,size:`iconMedium`,variant:`ghost`,onClick:e=>{e.stopPropagation(),a&&a()},...i,children:[t,(0,n.jsx)(Ij,{weight:`bold`})]})};vT(),X();var Kme=({className:e,children:t,ref:r,...i})=>{let{open:a}=B9();return(0,n.jsx)(nT,{className:Y(`mb-auto min-h-0 flex-1 overflow-hidden rounded-xl transition-all duration-300 ease-in-out`,a?``:`w-fit self-center`,e),ref:r,...i,children:(0,n.jsxs)(uT,{className:Y(`flex h-full scrollbar-none flex-col items-center divide-y divide-border overflow-y-auto overscroll-contain [&::-webkit-scrollbar]:hidden`,`before:pointer-events-none before:absolute before:top-0 before:left-0 before:block before:h-[min(40px,var(--scroll-area-overflow-y-start))] before:w-full before:bg-linear-to-b before:from-shadow/35 before:to-transparent before:transition-[height] before:duration-100 before:ease-out before:content-[""] before:[--scroll-area-overflow-y-start:inherit]`,`after:pointer-events-none after:absolute after:bottom-0 after:left-0 after:block after:h-[min(40px,var(--scroll-area-overflow-y-end,40px))] after:w-full after:bg-linear-to-t after:from-shadow/35 after:to-transparent after:transition-[height] after:duration-100 after:ease-out after:content-[""] after:[--scroll-area-overflow-y-end:inherit]`,a?`gap-md`:`gap-xs px-3xs pt-3xs`),children:[!a&&(0,n.jsx)(V9,{}),t]})})};X();var qme=({className:e,children:t,ref:r,...i})=>{let{open:a,collapsible:o}=B9(),s=o===`none`||a;return(0,n.jsx)(`div`,{className:Y(`flex shrink-0 animate-in items-center truncate p-3xs transition-all duration-300 ease-in-out`,a?`justify-start fade-in-0`:`justify-center self-center fade-out-0`,e),ref:r,...i,children:typeof t==`function`?t(s):t})};X();var Jme=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex w-full flex-col items-start gap-3xs not-last-of-type:pb-md`,e),ref:r,...i,children:t});X();var Yme=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex w-full flex-col gap-3xs`,e),ref:r,...i,children:t});X();var Xme=({className:e,children:t,ref:r,...i})=>{let{open:a,collapsible:o}=B9();return o===`none`||a?(0,n.jsx)(`span`,{className:Y(`inline-flex h-md w-full items-center justify-between truncate pr-3xs pl-sm style-text-default--1 text-on-surface-variant transition-all duration-200 ease-out`,o!==`none`&&a&&`animate-in fade-in-0 slide-in-from-left-2`,e),ref:r,...i,children:t}):null};X();var Zme=({className:e,children:t,ref:r,...i})=>{let{open:a,collapsible:o}=B9(),s=o===`none`||a;return(0,n.jsxs)(`div`,{className:Y(`flex shrink-0 items-center justify-between truncate style-text-strong-1 transition-all duration-300 ease-in-out`,a?`h-2xl pr-3xs pl-xs`:`self-center`,e),ref:r,...i,children:[(0,n.jsx)(`div`,{className:Y(`flex items-center justify-center gap-xs transition-all duration-200 ease-out`,a&&`justify-start`,o!==`none`&&`animate-in`,s?`fade-in-0`:`fade-out-0`),children:typeof t==`function`?t(s):t}),a&&(0,n.jsx)(V9,{})]})};X();var Qme=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex w-full flex-col items-start gap-3xs p-3xs`,e),ref:r,...i,children:t});X();var $me=({className:e,children:t,ref:r,...i})=>{let{open:a}=B9();return(0,n.jsx)(Vk,{className:Y(!a&&`hidden`,e),ref:r,...i,children:t})};X();var ehe=({isActive:e,className:t,children:r,ref:i,...a})=>{let{open:o,collapsible:s}=B9();return(0,n.jsx)(`button`,{className:Y(`inline-flex cursor-pointer items-center gap-2xs rounded-full border border-transparent style-text-default-0 whitespace-nowrap transition-all duration-200 ease-out select-none active:scale-95 disabled:pointer-events-none disabled:opacity-50 [&>svg]:shrink-0`,e?`pointer-events-none bg-surface text-on-surface shadow-2xs`:`text-neutral-default hover:bg-neutral-container hover:text-neutral-on-container`,!(s===`none`||o)&&`mx-auto`,o?`h-xl w-full pl-sm`:`size-xl justify-center *:hidden [&>svg]:block`,s!==`none`&&o&&`animate-in fade-in-0 slide-in-from-left-2`,t),ref:i,...a,children:r})};X();var the=({className:e,children:t,ref:r,...i})=>{let{open:a}=B9();return a?(0,n.jsx)(CZ,{className:Y(``,e),ref:r,...i,children:t}):(0,n.jsx)(F9,{children:t})};X();var nhe=({className:e,children:t,ref:r,...i})=>{let{open:a}=B9();return a?(0,n.jsx)(xZ,{className:Y(``,e),ref:r,...i,children:t}):(0,n.jsx)(I9,{side:`right`,className:`w-fit p-[0.5rem_0.5rem]`,children:(0,n.jsx)(R9,{className:`flex gap-3xs`,children:t})})};Uj(),X();var rhe=({className:e,children:t,ref:r,...i})=>{let{open:a}=B9();return a?(0,n.jsx)(SZ,{className:Y(`gap-2xs! whitespace-nowrap shadow-none! transition-all duration-200 ease-out select-none hover:bg-neutral-container hover:text-neutral-on-container data-panel-open:bg-neutral-container! [&>svg]:shrink-0!`,e),ref:r,...i,children:t}):(0,n.jsx)(L9,{children:(0,n.jsxs)(`button`,{className:Y(`flex size-xl items-center justify-center rounded-xl shadow-none! transition-colors *:hidden hover:cursor-pointer hover:bg-neutral-container hover:text-neutral-on-container data-popup-open:bg-neutral-container [&>svg]:block`),children:[t,(0,n.jsx)(pj,{weight:`bold`,className:`absolute right-2xs size-xs text-on-surface-variant`})]})})};X();var ihe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex h-xl w-full items-center justify-between gap-2xs`,e),ref:r,...i,children:t});X();var ahe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`animate-pulse rounded-lg bg-surface-2 shadow-sm`,e),ref:r,...i,children:t}),H9=y.createContext(null),ohe=({defaultView:e=`list`,table:t,className:r,children:i,ref:a,...o})=>{let[s,c]=y.useState(e);return(0,n.jsx)(H9.Provider,{value:{view:s,setView:c,table:t,className:r,children:i,ref:a,...o},children:(0,n.jsx)(`div`,{className:`flex flex-col gap-sm`,children:i})})},U9=()=>{let e=y.useContext(H9);if(!e)throw Error(`useTable must be used within a TableProvider`);return e};X();var she=({rowGridOverride:e,rowListOverride:t,className:r,children:i,ref:a,...o})=>{let{view:s,table:c}=U9(),l=c.getRowModel().rows;return(0,n.jsx)(`tbody`,{className:Y(`divide-y divide-border`,s===`grid`&&`grid grid-cols-5 gap-sm`,r),ref:a,...o,children:l.map(r=>i?i(r):s===`grid`?e?(0,n.jsx)(e,{row:r},r.id):(0,n.jsx)(W9,{row:r},r.id):s===`list`?t?(0,n.jsx)(t,{row:r},r.id):(0,n.jsx)(G9,{row:r},r.id):null)})};Uj(),mk(),X();var che=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(pk,{className:Y(``,e),ref:r,...i,children:[t,(0,n.jsx)(Aj,{weight:`bold`})]});Uj(),mk(),X();var lhe=({className:e,children:t,ref:r,...i})=>{let{table:a}=U9();return(0,n.jsxs)(pk,{className:Y(`shrink-0`,e),disabled:!a.getCanPreviousPage(),onClick:()=>{a.setPageIndex(0)},ref:r,size:`iconSmall`,variant:`ghost`,tone:`neutral`,...i,children:[t,(0,n.jsx)(lj,{weight:`bold`})]})};X();var uhe=({className:e,children:t,ref:r,...i})=>{let{table:a}=U9();return(0,n.jsxs)(`tfoot`,{className:Y(``,e),ref:r,...i,children:[t,a.getFooterGroups().map(e=>(0,n.jsx)(`tr`,{children:e.headers.map(e=>(0,n.jsx)(`th`,{colSpan:e.colSpan,children:e.isPlaceholder?null:w9(e.column.columnDef.footer,e.getContext())},e.id))},e.id))]})};Uj(),X();var dhe=({className:e,children:t,ref:r,...i})=>{let{table:a}=U9();return(0,n.jsxs)(`thead`,{className:Y(``),ref:r,...i,children:[t,a.getHeaderGroups().map(t=>(0,n.jsx)(`tr`,{className:`rounded-lg`,children:t.headers.map(t=>(0,n.jsx)(`th`,{className:Y(`h-xl bg-neutral-container px-sm text-left style-text-default-0 text-neutral-on-container transition-colors first:rounded-l-xl last:rounded-r-xl`,t.column.getCanSort()&&`hover:cursor-pointer hover:bg-neutral-container-high`,t.isPlaceholder&&`cursor-default`,e),colSpan:t.colSpan,onClick:t.column.getToggleSortingHandler(),style:{width:t.column.getSize(),minWidth:t.column.columnDef.minSize,maxWidth:t.column.columnDef.maxSize},children:t.isPlaceholder?null:(0,n.jsxs)(`div`,{className:Y(`inline-flex items-center justify-center gap-2xs [&>svg]:size-sm`,t.column.getCanSort()&&`select-none hover:cursor-pointer`),children:[w9(t.column.columnDef.header,t.getContext()),{asc:(0,n.jsx)(Rj,{weight:`bold`}),desc:(0,n.jsx)(Lj,{weight:`bold`})}[t.column.getIsSorted()]??(t.column.getCanSort()?(0,n.jsx)(jj,{weight:`bold`}):null)]})},t.id))},t.id))]})};Uj(),mk(),X();var fhe=({className:e,children:t,ref:r,...i})=>{let{table:a}=U9();return(0,n.jsxs)(pk,{className:Y(`shrink-0`,e),disabled:!a.getCanNextPage(),onClick:()=>{a.setPageIndex(a.getPageCount()-1)},ref:r,size:`iconSmall`,variant:`ghost`,tone:`neutral`,...i,children:[t,(0,n.jsx)(dj,{weight:`bold`})]})};Uj(),mk(),X();var phe=({className:e,children:t,ref:r,...i})=>{let{table:a}=U9();return(0,n.jsxs)(pk,{className:Y(`shrink-0`,e),disabled:!a.getCanNextPage(),onClick:()=>{a.nextPage()},ref:r,size:`iconSmall`,variant:`ghost`,tone:`neutral`,...i,children:[t,(0,n.jsx)(pj,{weight:`bold`})]})};Uj(),mk(),X();var mhe=({className:e,children:t,ref:r,...i})=>{let{table:a}=U9();return(0,n.jsxs)(pk,{className:Y(`shrink-0`,e),disabled:!a.getCanPreviousPage(),onClick:()=>{a.previousPage()},ref:r,size:`iconSmall`,variant:`ghost`,tone:`neutral`,...i,children:[t,(0,n.jsx)(sj,{weight:`bold`})]})};Uj(),mk(),X();var hhe=({className:e,children:t,ref:r,...i})=>{let a=y.useReducer(()=>({}),{})[1];return(0,n.jsxs)(pk,{className:Y(``,e),onClick:()=>{a()},ref:r,size:`iconMedium`,...i,children:[t,(0,n.jsx)(tj,{weight:`bold`})]})},ghe=({children:e})=>{let{table:t}=U9(),n=t.getState().pagination.pageIndex,r=t.getState().pagination.pageSize,i=t.getFilteredRowModel().rows.length,a=i===0?0:n*r+1;return e(a,i===0?0:Math.min(a+r-1,i),i)};X();var W9=({row:e,className:t,children:r,ref:i,...a})=>(0,n.jsx)(`tr`,{className:Y(`aspect-video min-h-2xl rounded-md bg-neutral-container p-xs`,t),ref:i,...a,children:e.getVisibleCells().map(e=>(0,n.jsxs)(`td`,{children:[r,w9(e.column.columnDef.cell,e.getContext())]},e.id))});X();var G9=({row:e,className:t,children:r,ref:i,...a})=>(0,n.jsx)(`tr`,{className:Y(``,t),ref:i,...a,children:e.getVisibleCells().map(e=>(0,n.jsxs)(`td`,{className:`p-sm`,style:{width:e.column.getSize(),minWidth:e.column.columnDef.minSize,maxWidth:e.column.columnDef.maxSize},children:[r,w9(e.column.columnDef.cell,e.getContext())]},e.id))});q1(),X();var _he=({className:e,children:t,ref:r,...i})=>{let{table:a}=U9();return(0,n.jsx)(K1,{className:Y(``,e),onChange:e=>{a.setGlobalFilter(String(e.target.value))},placeholder:`Search by ${a.getAllColumns().map(e=>e.id).join(`, `)}`,ref:r,value:a.getState().globalFilter??``,...i,children:t})};Uj(),mk(),X();var vhe=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(pk,{className:Y(``,e),ref:r,...i,children:[t,(0,n.jsx)(rj,{weight:`bold`})]});kO();var K9=()=>{let e=EO(),t=t=>e.add({...t,data:{...t.data,icon:t.icon,variant:t.variant}});return{...e,add:t}},q9=()=>{let e=wO();return{add:t=>e.add({...t,data:{...t.data,icon:t.icon,variant:t.variant}}),toasts:e.toasts}};kO(),Uj(),mk(),X();var J9=({className:e,ref:t,toast:r,...i})=>{let a=r.timeout??1e4,o=2*Math.PI*14;y.default.useEffect(()=>{let e,t=performance.now(),n=r=>{Math.min(r-t,a)<a&&(e=requestAnimationFrame(n))};return e=requestAnimationFrame(n),()=>cancelAnimationFrame(e)},[a]);let s=()=>{switch(r.data?.variant){case`brand`:return`bg-brand-default`;case`accent`:return`bg-accent-default`;case`neutral`:return`bg-neutral-default`;case`error`:return`bg-error-default`;case`info`:return`bg-info-default`;case`success`:return`bg-success-default`;case`warning`:return`bg-warning-default`;default:return`bg-neutral-default`}},c=()=>{switch(r.data?.variant){case`brand`:return`border-brand-border-strong`;case`accent`:return`border-accent-border-strong`;case`neutral`:return`border-neutral-border-strong`;case`error`:return`border-error-border-strong`;case`info`:return`border-info-border-strong`;case`success`:return`border-success-border-strong`;case`warning`:return`border-warning-border-strong`;default:return`border-neutral-border-strong`}},l=()=>{if(r.data?.icon)return(0,n.jsx)(r.data.icon,{weight:`fill`});switch(r.data?.variant){case`brand`:return(0,n.jsx)(Mj,{weight:`fill`});case`accent`:return(0,n.jsx)(Mj,{weight:`fill`});case`neutral`:return(0,n.jsx)(Mj,{weight:`fill`});case`error`:return(0,n.jsx)(Bj,{weight:`fill`});case`info`:return(0,n.jsx)(Mj,{weight:`fill`});case`success`:return(0,n.jsx)(xj,{weight:`fill`});case`warning`:return(0,n.jsx)(zj,{weight:`fill`});default:return(0,n.jsx)(Mj,{weight:`fill`})}};return(0,n.jsxs)(iO,{className:Y(`absolute right-[0px] bottom-[0px] left-auto z-[calc(1000-var(--toast-index))] mr-[0px] flex h-2xl origin-bottom transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--peek))-(var(--shrink)*var(--height))))_scale(var(--scale))] items-center justify-center gap-xs overflow-hidden rounded-xl border bg-surface bg-clip-padding pr-sm shadow-lg select-none [--gap:0.75rem] [--height:var(--toast-frontmost-height,var(--toast-height))] [--offset-y:calc(var(--toast-offset-y)*-1+calc(var(--toast-index)*var(--gap)*-1)+var(--toast-swipe-movement-y))] [--peek:0.75rem] [--scale:calc(max(0,1-(var(--toast-index)*0.1)))] [--shrink:calc(1-var(--scale))] [transition:transform_0.5s_cubic-bezier(0.22,1,0.36,1),opacity_0.5s,height_0.15s] after:absolute after:top-full after:left-[0px] after:w-full after:content-[''] data-ending-style:opacity-0 data-expanded:h-(--toast-height) data-expanded:transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--offset-y)))] data-limited:opacity-0 data-starting-style:transform-[translateY(150%)] data-ending-style:data-[swipe-direction=down]:transform-[translateY(calc(var(--toast-swipe-movement-y)+150%))] data-expanded:data-ending-style:data-[swipe-direction=down]:transform-[translateY(calc(var(--toast-swipe-movement-y)+150%))] data-ending-style:data-[swipe-direction=left]:transform-[translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))] data-expanded:data-ending-style:data-[swipe-direction=left]:transform-[translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))] data-ending-style:data-[swipe-direction=right]:transform-[translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))] data-expanded:data-ending-style:data-[swipe-direction=right]:transform-[translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))] data-ending-style:data-[swipe-direction=up]:transform-[translateY(calc(var(--toast-swipe-movement-y)-150%))] data-expanded:data-ending-style:data-[swipe-direction=up]:transform-[translateY(calc(var(--toast-swipe-movement-y)-150%))] [&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:transform-[translateY(150%)]`,e,c()),ref:t,toast:r,...i,children:[(0,n.jsx)(`div`,{className:Y(`flex aspect-square size-2xl items-center justify-center [&>svg]:size-lg [&>svg]:text-on-surface-inverse`,s()),children:l()}),(0,n.jsxs)(aO,{className:`flex items-center justify-center gap-xs overflow-hidden pl-2xs transition-opacity duration-250 data-behind:pointer-events-none data-behind:opacity-0 data-expanded:pointer-events-auto data-expanded:opacity-100`,children:[(0,n.jsxs)(`div`,{children:[(0,n.jsx)(lO,{className:`style-text-strong--1`}),(0,n.jsx)(sO,{className:`style-text-prose--1 whitespace-nowrap text-on-surface-variant`})]}),(0,n.jsxs)(`div`,{className:`ml-xl flex h-lg grow items-center justify-center gap-xs`,children:[(0,n.jsx)(pO,{render:e=>(0,n.jsx)(pk,{"data-testid":`toast-action-button`,onClick:e.onClick,size:`small`,tone:r.data?.variant,variant:`soft`,children:e.children})}),r.actionProps&&(0,n.jsx)(CQ,{variant:`strong`,orientation:`vertical`,weight:`thinnest`}),(0,n.jsxs)(dO,{"aria-label":`Close`,className:`relative flex size-sm items-center justify-center rounded-full bg-transparent p-xs text-on-surface-variant transition-colors hover:cursor-pointer hover:bg-error-container hover:text-error-on-container`,children:[(0,n.jsx)(`span`,{className:`pointer-events-none absolute inset-[0px] z-10 flex items-center justify-center`,children:(0,n.jsx)(`svg`,{width:`100%`,height:`100%`,viewBox:`0 0 32 32`,className:`block -rotate-90`,children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`style`,{children:`
92
131
  @keyframes toast-drain-${r.id} {
93
132
  from { stroke-dashoffset: 0; }
94
133
  to { stroke-dashoffset: ${o}; }
95
134
  }
96
- `}),(0,n.jsx)(`circle`,{cx:`16`,cy:`16`,r:`14`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeDasharray:o,strokeLinecap:`round`,className:`text-error-border-strong`,style:{animation:`toast-drain-${r.id} ${a}ms linear forwards`}})]})})}),(0,n.jsx)(rL,{className:`size-sm shrink-0`,weight:`bold`})]})]})]})]},r.id)};lN(),Z();var g0=({className:e,ref:t,...r})=>{let{toasts:i}=m0();return(0,n.jsx)(YM,{children:(0,n.jsx)(SM,{className:X(`fixed top-auto right-[1rem] bottom-[1rem] z-10 mx-auto flex w-[250px] sm:right-[2rem] sm:bottom-[2rem] sm:w-[300px]`,e),ref:t,...r,children:i.map(e=>(0,n.jsx)(h0,{toast:e},e.id))})})};lN(),Z();var _0=({className:e,ref:t,toast:r,...i})=>(0,n.jsxs)(LM,{className:X(`group flex w-max origin-(--transform-origin) flex-col rounded-2xl bg-surface px-sm py-2xs shadow-lg transition-[transform,scale,opacity] data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0`,e),ref:t,toast:r,...i,children:[(0,n.jsx)(nN,{className:`data-[side=bottom]:-top-3xs data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:-bottom-3xs data-[side=top]:rotate-180`}),(0,n.jsx)(zM,{children:(0,n.jsx)(VM,{className:`style-text-default--1`})})]});lN(),Z();var v0=({className:e,ref:t,...r})=>{let{toasts:i}=m0();return(0,n.jsx)(YM,{children:(0,n.jsx)(SM,{className:X(`fixed top-auto right-[1rem] bottom-[1rem] z-10 mx-auto flex w-[250px] sm:right-[2rem] sm:bottom-[2rem] sm:w-[300px]`,e),ref:t,...r,children:i.map(e=>(0,n.jsx)(eN,{className:`z-[calc(1000-var(--toast-index))]`,toast:e,children:(0,n.jsx)(_0,{toast:e})},e.id))})})};lN(),Z();var y0=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(`div`,{className:X(``,e),ref:r,...i,children:[(0,n.jsx)(vM,{timeout:1e4,toastManager:b0,children:(0,n.jsx)(v0,{})}),(0,n.jsx)(vM,{timeout:1e4,toastManager:x0,children:(0,n.jsx)(g0,{})}),t]}),b0=p0(),x0=p0();Ao();var S0=ko(`group flex w-fit items-center justify-center gap-3xs bg-neutral-container`,{variants:{size:{small:`h-lg rounded-lg px-3xs`,medium:`h-xl rounded-xl px-2xs`,large:`h-2xl rounded-2xl px-xs`}},defaultVariants:{size:`medium`}});xN(),Z(),Z(),e.Accordion=lc,e.AccordionHeader=uc,e.AccordionItem=dc,e.AccordionPanel=fc,e.AccordionSubtitle=pc,e.AccordionTitle=mc,e.Alert=_c,e.AlertActions=Tc,e.AlertContent=Cc,e.AlertDescription=yc,e.AlertDialog=oP,e.AlertDialogActions=vP,e.AlertDialogClose=fP,e.AlertDialogConfirm=hP,e.AlertDialogContent=gP,e.AlertDialogDescription=_P,e.AlertDialogHeader=yP,e.AlertDialogPopup=xP,e.AlertDialogTitle=SP,e.AlertDialogTrigger=CP,e.AlertTitle=xc,e.AnchoredToastItem=_0,e.AnchoredToasts=v0,e.Autocomplete=wP,e.AutocompleteCollection=TP,e.AutocompleteContent=EP,e.AutocompleteGridContent=jP,e.AutocompleteGridItem=MP,e.AutocompleteGroup=NP,e.AutocompleteGroupLabel=PP,e.AutocompleteInputGroup=kP,e.AutocompleteInputGroupAddon=FP,e.AutocompleteInputGroupInput=AP,e.AutocompleteItem=IP,e.AutocompleteRow=LP,e.AutocompleteStatus=RP,e.AutocompleteTrigger=zP,e.Avatar=HP,e.AvatarBadge=GP,e.AvatarFallback=UP,e.AvatarImage=WP,e.Badge=qP,e.Breadcrumb=JP,e.BreadcrumbEllipsis=cL,e.BreadcrumbItem=lL,e.BreadcrumbLink=uL,e.BreadcrumbSeparator=dL,e.Button=lP,e.ButtonGroup=pL,e.Checkbox=gL,e.CheckboxGroup=_L,e.CheckboxIndicator=mL,e.CodeBlock=SL,e.Collapsible=bL,e.CollapsiblePanel=vL,e.CollapsibleTrigger=yL,e.Combobox=CL,e.ComboboxChip=wL,e.ComboboxChips=TL,e.ComboboxCollection=EL,e.ComboboxEmpty=DL,e.ComboboxGroup=OL,e.ComboboxGroupLabel=kL,e.ComboboxInput=zL,e.ComboboxItem=BL,e.ComboboxList=VL,e.ComboboxPopup=HL,e.ComboboxStatus=UL,e.ComboboxTrigger=WL,e.ComboboxValue=GL,e.Dialog=KL,e.DialogClose=qL,e.DialogContent=JL,e.DialogDescription=YL,e.DialogFooter=XL,e.DialogHeader=ZL,e.DialogPopup=QL,e.DialogTitle=$L,e.DialogTrigger=eR,e.Drawer=tR,e.DrawerClose=nR,e.DrawerContent=rR,e.DrawerDescription=iR,e.DrawerHeader=fR,e.DrawerPopup=uR,e.DrawerProvider=aR,e.DrawerTitle=dR,e.DrawerTrigger=oR,e.Field=pR,e.FieldCheckbox=tH,e.FieldDescription=hR,e.FieldErrors=JV,e.FieldInput=PB,e.FieldLabel=UB,e.FieldRadioGroup=aH,e.FieldSelect=pV,e.FieldSlider=OV,e.FieldSwitch=sH,e.FieldTextArea=QV,e.FieldToggle=dH,e.Form=fH,e.FormErrors=wB,e.FormReset=EB,e.FormSubmit=OB,e.Input=AB,e.InputGroup=AL,e.InputGroupAddon=ML,e.InputGroupInput=PL,e.InputOTP=pH,e.InputOTPSlot=mH,e.InputOtpSeparator=hH,e.Kbd=gH,e.Label=eH,e.LayerTree=h$,e.LayerTreeBody=S$,e.LayerTreeExpandAll=C$,e.LayerTreeFooter=D$,e.LayerTreeNode=w$,e.LayerTreeNodeToggle=T$,e.LayerTreeRow=x$,e.LayerTreeSearch=E$,e.LayerTreeSort=U$,e.Menu=O$,e.MenuCheckboxItem=k$,e.MenuGroup=A$,e.MenuGroupLabel=j$,e.MenuItem=P$,e.MenuPopup=F$,e.MenuRadioGroup=I$,e.MenuRadioItem=L$,e.MenuSeparator=R$,e.MenuShortcut=z$,e.MenuSubmenu=B$,e.MenuSubmenuTrigger=V$,e.MenuTrigger=H$,e.Meter=G$,e.MeterFooter=Z$,e.MeterHeader=K$,e.MeterIndicator=q$,e.MeterLabel=J$,e.MeterSubtitle=Q$,e.MeterTrack=Y$,e.MeterValue=X$,e.NumberField=e1,e.Popover=n1,e.PopoverButton=l1,e.PopoverContent=c1,e.PopoverDescription=r1,e.PopoverHeader=s1,e.PopoverPanel=i1,e.PopoverTitle=a1,e.PopoverTrigger=o1,e.Profile=d1,e.ProfileAction=m1,e.ProfileContent=h1,e.ProfileName=f1,e.ProfileSubname=p1,e.Progress=g1,e.ProgressBar=_1,e.ProgressIndicator=v1,e.RadarPing=b1,e.Radio=rH,e.RadioGroup=iH,e.ResizeableHandle=x1,e.ResizeablePanel=S1,e.ResizeablePanelGroup=C1,e.ScrollArea=w1,e.Select=GB,e.SelectGroup=sV,e.SelectGroupLabel=lV,e.SelectIcon=ZB,e.SelectItem=qB,e.SelectList=YB,e.SelectPopup=$B,e.SelectTrigger=rV,e.SelectValue=aV,e.Separator=RL,e.Sidebar=O1,e.SidebarContent=A1,e.SidebarFooter=j1,e.SidebarGroup=M1,e.SidebarGroupContent=N1,e.SidebarGroupLabel=P1,e.SidebarHeader=F1,e.SidebarMenu=I1,e.SidebarMenuBadge=L1,e.SidebarMenuButton=R1,e.SidebarMenuCollapsible=z1,e.SidebarMenuCollapsiblePanel=B1,e.SidebarMenuCollapsibleTrigger=V1,e.SidebarMenuItem=H1,e.SidebarProvider=E1,e.SidebarToggle=k1,e.Skeleton=U1,e.Slider=wV,e.SliderThumb=SV,e.StackToastItem=h0,e.StackToasts=g0,e.Switch=oH,e.Table=G1,e.TableBody=q1,e.TableFilter=J1,e.TableFirstPage=Y1,e.TableFooter=X1,e.TableHeader=Z1,e.TableLastPage=Q1,e.TableNextPage=$1,e.TablePagination=n0,e.TablePreviousPage=e0,e.TableRefresh=t0,e.TableRowGrid=r0,e.TableRowList=i0,e.TableSearch=a0,e.TableSort=o0,e.Tabs=c0,e.TabsIndicator=l0,e.TabsList=u0,e.TabsPanel=d0,e.TabsTab=f0,e.TextArea=ZV,e.ToastProvider=y0,e.Toggle=uH,e.ToggleGroup=({size:e=`medium`,className:t,children:r,ref:i,...a})=>{let o=e??`medium`;return(0,n.jsx)(cH.Provider,{value:{size:o},children:(0,n.jsx)(yN,{className:X(S0({size:o,className:t})),"data-size":o,ref:i,...a,children:r})})},e.Tooltip=hV,e.TooltipContent=_V,e.TooltipTrigger=yV,e.anchoredToastManager=b0,e.cn=X,e.fieldContext=RV,e.findLayerTreeNode=_H,e.formContext=BV,e.insertLayerTreeNode=yH,e.moveLayerTreeNode=bH,e.moveLayerTreeNodeToRoot=xH,e.popoverHandle=u1,e.removeLayerTreeNode=vH,e.stackToastManager=x0,e.useAppForm=HV,e.useFieldContext=zV,e.useFormContext=VV,e.useSidebar=D1,e.useTable=K1,e.useToastManager=m0,e.useTypedAppFormContext=GV,e.withFieldGroup=UV,e.withForm=WV});
135
+ `}),(0,n.jsx)(`circle`,{cx:`16`,cy:`16`,r:`14`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeDasharray:o,strokeLinecap:`round`,className:`text-error-border-strong`,style:{animation:`toast-drain-${r.id} ${a}ms linear forwards`}})]})})}),(0,n.jsx)(Vj,{className:`size-sm shrink-0`,weight:`bold`})]})]})]})]},r.id)};kO(),X();var Y9=({className:e,ref:t,...r})=>{let{toasts:i}=q9();return(0,n.jsx)(hO,{children:(0,n.jsx)(WD,{className:Y(`fixed top-auto right-[1rem] bottom-[1rem] z-10 mx-auto flex w-[250px] sm:right-[2rem] sm:bottom-[2rem] sm:w-[300px]`,e),ref:t,...r,children:i.map(e=>(0,n.jsx)(J9,{toast:e},e.id))})})};kO(),X();var X9=({className:e,ref:t,toast:r,...i})=>(0,n.jsxs)(iO,{className:Y(`group flex w-max origin-(--transform-origin) flex-col rounded-2xl bg-surface px-sm py-2xs shadow-lg transition-[transform,scale,opacity] data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0`,e),ref:t,toast:r,...i,children:[(0,n.jsx)(SO,{className:`data-[side=bottom]:-top-3xs data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:-bottom-3xs data-[side=top]:rotate-180`}),(0,n.jsx)(aO,{children:(0,n.jsx)(sO,{className:`style-text-default--1`})})]});kO(),X();var Z9=({className:e,ref:t,...r})=>{let{toasts:i}=q9();return(0,n.jsx)(hO,{children:(0,n.jsx)(WD,{className:Y(`fixed top-auto right-[1rem] bottom-[1rem] z-10 mx-auto flex w-[250px] sm:right-[2rem] sm:bottom-[2rem] sm:w-[300px]`,e),ref:t,...r,children:i.map(e=>(0,n.jsx)(bO,{className:`z-[calc(1000-var(--toast-index))]`,toast:e,children:(0,n.jsx)(X9,{toast:e})},e.id))})})};kO(),X();var yhe=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(`div`,{className:Y(``,e),ref:r,...i,children:[(0,n.jsx)(BD,{timeout:1e4,toastManager:Q9,children:(0,n.jsx)(Z9,{})}),(0,n.jsx)(BD,{timeout:1e4,toastManager:$9,children:(0,n.jsx)(Y9,{})}),t]}),Q9=K9(),$9=K9();uo();var bhe=lo(`group flex w-fit items-center justify-center gap-3xs bg-neutral-container`,{variants:{size:{small:`h-lg rounded-lg px-3xs`,medium:`h-xl rounded-xl px-2xs`,large:`h-2xl rounded-2xl px-xs`}},defaultVariants:{size:`medium`}});VO(),X(),X(),e.Accordion=Tee,e.AccordionHeader=Eee,e.AccordionItem=Dee,e.AccordionPanel=Oee,e.AccordionSubtitle=kee,e.AccordionTitle=Aee,e.Alert=Hs,e.AlertActions=qs,e.AlertContent=Gs,e.AlertDescription=Us,e.AlertDialog=Zie,e.AlertDialogActions=aae,e.AlertDialogClose=eae,e.AlertDialogConfirm=nae,e.AlertDialogContent=rae,e.AlertDialogDescription=iae,e.AlertDialogHeader=oae,e.AlertDialogPopup=cae,e.AlertDialogTitle=gk,e.AlertDialogTrigger=_k,e.AlertTitle=Ws,e.AnchoredToastItem=X9,e.AnchoredToasts=Z9,e.Autocomplete=vk,e.AutocompleteCollection=yk,e.AutocompleteContent=bk,e.AutocompleteGridContent=Tk,e.AutocompleteGridItem=Ek,e.AutocompleteGroup=Dk,e.AutocompleteGroupLabel=Ok,e.AutocompleteInputGroup=Ck,e.AutocompleteInputGroupAddon=kk,e.AutocompleteInputGroupInput=wk,e.AutocompleteItem=Ak,e.AutocompleteRow=jk,e.AutocompleteStatus=Mk,e.AutocompleteTrigger=Nk,e.Avatar=Ik,e.AvatarBadge=zk,e.AvatarFallback=Lk,e.AvatarImage=Rk,e.Badge=Vk,e.Breadcrumb=Hk,e.BreadcrumbEllipsis=kae,e.BreadcrumbItem=Aae,e.BreadcrumbLink=jae,e.BreadcrumbSeparator=Mae,e.Button=pk,e.ButtonGroup=Pae,e.ChartContainer=YX,e.ChartLegend=aZ,e.ChartLegendContent=dZ,e.ChartLegendIcon=oZ,e.ChartLegendIndicator=sZ,e.ChartLegendLabel=cZ,e.ChartLinearGradient=pZ,e.ChartTooltip=ZX,e.ChartTooltipContent=$X,e.ChartTooltipIcon=gZ,e.ChartTooltipIndicator=mZ,e.ChartTooltipLabel=tZ,e.ChartTooltipName=hZ,e.ChartTooltipPayload=rZ,e.Checkbox=yZ,e.CheckboxGroup=bZ,e.CheckboxIndicator=_Z,e.CodeBlock=TZ,e.CodeBlockActions=DZ,e.CodeBlockCopy=OZ,e.CodeBlockDownload=kZ,e.CodeBlockHeader=AZ,e.CodeBlockName=jZ,e.CodeBlockSelect=$Z,e.CodeBlockTabs=oQ,e.CodeBlockWindow=sQ,e.Collapsible=CZ,e.CollapsiblePanel=xZ,e.CollapsibleTrigger=SZ,e.Combobox=cQ,e.ComboboxChip=lQ,e.ComboboxChips=uQ,e.ComboboxCollection=dQ,e.ComboboxEmpty=fQ,e.ComboboxGroup=pQ,e.ComboboxGroupLabel=mQ,e.ComboboxInput=wQ,e.ComboboxItem=TQ,e.ComboboxList=EQ,e.ComboboxPopup=DQ,e.ComboboxStatus=OQ,e.ComboboxTrigger=kQ,e.ComboboxValue=AQ,e.Dialog=jQ,e.DialogClose=MQ,e.DialogContent=NQ,e.DialogDescription=PQ,e.DialogFooter=FQ,e.DialogHeader=IQ,e.DialogPopup=LQ,e.DialogTitle=RQ,e.DialogTrigger=zQ,e.Drawer=BQ,e.DrawerClose=VQ,e.DrawerContent=HQ,e.DrawerDescription=UQ,e.DrawerHeader=ZQ,e.DrawerPopup=YQ,e.DrawerProvider=WQ,e.DrawerTitle=XQ,e.DrawerTrigger=GQ,e.Field=QQ,e.FieldCheckbox=Mue,e.FieldDescription=e$,e.FieldErrors=w0,e.FieldInput=J1,e.FieldLabel=Z1,e.FieldRadioGroup=Fue,e.FieldSelect=Q1,e.FieldSlider=o0,e.FieldSwitch=Iue,e.FieldTextArea=Aue,e.FieldToggle=Rue,e.Form=zue,e.FormErrors=U1,e.FormReset=W1,e.FormSubmit=G1,e.Input=K1,e.InputGroup=hQ,e.InputGroupAddon=_Q,e.InputGroupInput=yQ,e.InputOTP=Bue,e.InputOTPSlot=Vue,e.InputOtpSeparator=Hue,e.Kbd=Uue,e.Label=E0,e.LayerTree=Xpe,e.LayerTreeBody=eme,e.LayerTreeExpandAll=tme,e.LayerTreeFooter=ame,e.LayerTreeNode=nme,e.LayerTreeNodeToggle=rme,e.LayerTreeRow=T9,e.LayerTreeSearch=ime,e.LayerTreeSort=fme,e.Menu=E9,e.MenuCheckboxItem=ome,e.MenuGroup=D9,e.MenuGroupLabel=O9,e.MenuItem=lme,e.MenuPopup=k9,e.MenuRadioGroup=A9,e.MenuRadioItem=j9,e.MenuSeparator=ume,e.MenuShortcut=dme,e.MenuSubmenu=M9,e.MenuSubmenuTrigger=N9,e.MenuTrigger=P9,e.Meter=mme,e.MeterFooter=bme,e.MeterHeader=hme,e.MeterIndicator=gme,e.MeterLabel=_me,e.MeterSubtitle=xme,e.MeterTrack=vme,e.MeterValue=yme,e.NumberField=Cme,e.Popover=F9,e.PopoverButton=Ome,e.PopoverContent=R9,e.PopoverDescription=Tme,e.PopoverHeader=Dme,e.PopoverPanel=I9,e.PopoverTitle=Eme,e.PopoverTrigger=L9,e.Profile=Ame,e.ProfileAction=Nme,e.ProfileContent=Pme,e.ProfileName=jme,e.ProfileSubname=Mme,e.Progress=Fme,e.ProgressBar=Ime,e.ProgressIndicator=Lme,e.RadarPing=zme,e.Radio=Pue,e.RadioGroup=D0,e.ResizeableHandle=Bme,e.ResizeablePanel=Vme,e.ResizeablePanelGroup=Hme,e.ScrollArea=Ume,e.Select=MZ,e.SelectGroup=JZ,e.SelectGroupLabel=XZ,e.SelectIcon=RZ,e.SelectItem=PZ,e.SelectList=IZ,e.SelectPopup=BZ,e.SelectTrigger=WZ,e.SelectValue=KZ,e.Separator=CQ,e.Sidebar=Gme,e.SidebarContent=Kme,e.SidebarFooter=qme,e.SidebarGroup=Jme,e.SidebarGroupContent=Yme,e.SidebarGroupLabel=Xme,e.SidebarHeader=Zme,e.SidebarMenu=Qme,e.SidebarMenuBadge=$me,e.SidebarMenuButton=ehe,e.SidebarMenuCollapsible=the,e.SidebarMenuCollapsiblePanel=nhe,e.SidebarMenuCollapsibleTrigger=rhe,e.SidebarMenuItem=ihe,e.SidebarProvider=Wme,e.SidebarToggle=V9,e.Skeleton=ahe,e.Slider=a0,e.SliderThumb=n0,e.StackToastItem=J9,e.StackToasts=Y9,e.Switch=O0,e.Table=ohe,e.TableBody=she,e.TableFilter=che,e.TableFirstPage=lhe,e.TableFooter=uhe,e.TableHeader=dhe,e.TableLastPage=fhe,e.TableNextPage=phe,e.TablePagination=ghe,e.TablePreviousPage=mhe,e.TableRefresh=hhe,e.TableRowGrid=W9,e.TableRowList=G9,e.TableSearch=_he,e.TableSort=vhe,e.Tabs=tQ,e.TabsIndicator=nQ,e.TabsList=rQ,e.TabsPanel=iQ,e.TabsTab=aQ,e.TextArea=T0,e.ToastProvider=yhe,e.Toggle=A0,e.ToggleGroup=({size:e=`medium`,className:t,children:r,ref:i,...a})=>{let o=e??`medium`;return(0,n.jsx)(k0.Provider,{value:{size:o},children:(0,n.jsx)(zO,{className:Y(bhe({size:o,className:t})),"data-size":o,ref:i,...a,children:r})})},e.Tooltip=$1,e.TooltipContent=e0,e.TooltipTrigger=t0,e.anchoredToastManager=Q9,e.cn=Y,e.fieldContext=h0,e.findLayerTreeNode=j0,e.formContext=_0,e.getPayloadConfigFromPayload=lZ,e.insertLayerTreeNode=N0,e.moveLayerTreeNode=P0,e.moveLayerTreeNodeToRoot=F0,e.popoverHandle=kme,e.removeLayerTreeNode=M0,e.stackToastManager=$9,e.useAppForm=y0,e.useChartTooltipContent=eZ,e.useChartTooltipPayload=iZ,e.useFieldContext=g0,e.useFormContext=v0,e.useSidebar=B9,e.useTable=U9,e.useToastManager=q9,e.useTypedAppFormContext=S0,e.withFieldGroup=b0,e.withForm=x0});