@aarthiklabs/credit-sdk 0.0.2 → 0.0.3-1

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.
@@ -1,2 +1 @@
1
- import { Shell as AarthikShell } from "./layout/shell";
2
- export { AarthikShell };
1
+ export { Shell as AarthikShell } from "./layout/shell";
@@ -1,2 +1 @@
1
- import { Shell as AarthikShell } from "./layout/shell";
2
- export { AarthikShell };
1
+ export { Shell as AarthikShell } from "./layout/shell";
package/dist/index.cjs CHANGED
@@ -1 +1,69 @@
1
- module.exports = {};
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("react"),Go=require("react-dom");function Yo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const u=Yo(k),Bt=Yo(Go);var Kt={exports:{}},Dt={};var zr;function gi(){if(zr)return Dt;zr=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,s){var a=null;if(s!==void 0&&(a=""+s),o.key!==void 0&&(a=""+o.key),"key"in o){s={};for(var i in o)i!=="key"&&(s[i]=o[i])}else s=o;return o=s.ref,{$$typeof:e,type:r,key:a,ref:o!==void 0?o:null,props:s}}return Dt.Fragment=t,Dt.jsx=n,Dt.jsxs=n,Dt}var Nt={};var Ur;function hi(){return Ur||(Ur=1,process.env.NODE_ENV!=="production"&&(function(){function e(C){if(C==null)return null;if(typeof C=="function")return C.$$typeof===Y?null:C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case v:return"Fragment";case S:return"Profiler";case y:return"StrictMode";case D:return"Suspense";case w:return"SuspenseList";case z:return"Activity"}if(typeof C=="object")switch(typeof C.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),C.$$typeof){case m:return"Portal";case b:return C.displayName||"Context";case R:return(C._context.displayName||"Context")+".Consumer";case O:var V=C.render;return C=C.displayName,C||(C=V.displayName||V.name||"",C=C!==""?"ForwardRef("+C+")":"ForwardRef"),C;case E:return V=C.displayName||null,V!==null?V:e(C.type)||"Memo";case I:V=C._payload,C=C._init;try{return e(C(V))}catch{}}return null}function t(C){return""+C}function n(C){try{t(C);var V=!1}catch{V=!0}if(V){V=console;var L=V.error,q=typeof Symbol=="function"&&Symbol.toStringTag&&C[Symbol.toStringTag]||C.constructor.name||"Object";return L.call(V,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",q),t(C)}}function r(C){if(C===v)return"<>";if(typeof C=="object"&&C!==null&&C.$$typeof===I)return"<...>";try{var V=e(C);return V?"<"+V+">":"<...>"}catch{return"<...>"}}function o(){var C=Z.A;return C===null?null:C.getOwner()}function s(){return Error("react-stack-top-frame")}function a(C){if(_.call(C,"key")){var V=Object.getOwnPropertyDescriptor(C,"key").get;if(V&&V.isReactWarning)return!1}return C.key!==void 0}function i(C,V){function L(){ee||(ee=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",V))}L.isReactWarning=!0,Object.defineProperty(C,"key",{get:L,configurable:!0})}function c(){var C=e(this.type);return re[C]||(re[C]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),C=this.props.ref,C!==void 0?C:null}function l(C,V,L,q,ge,Re){var B=L.ref;return C={$$typeof:h,type:C,key:V,props:L,_owner:q},(B!==void 0?B:null)!==null?Object.defineProperty(C,"ref",{enumerable:!1,get:c}):Object.defineProperty(C,"ref",{enumerable:!1,value:null}),C._store={},Object.defineProperty(C._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(C,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(C,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ge}),Object.defineProperty(C,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Re}),Object.freeze&&(Object.freeze(C.props),Object.freeze(C)),C}function d(C,V,L,q,ge,Re){var B=V.children;if(B!==void 0)if(q)if(te(B)){for(q=0;q<B.length;q++)f(B[q]);Object.freeze&&Object.freeze(B)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f(B);if(_.call(V,"key")){B=e(C);var W=Object.keys(V).filter(function(be){return be!=="key"});q=0<W.length?"{key: someKey, "+W.join(": ..., ")+": ...}":"{key: someKey}",xe[B+q]||(W=0<W.length?"{"+W.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
+ let props = %s;
3
+ <%s {...props} />
4
+ React keys must be passed directly to JSX without using spread:
5
+ let props = %s;
6
+ <%s key={someKey} {...props} />`,q,B,W,B),xe[B+q]=!0)}if(B=null,L!==void 0&&(n(L),B=""+L),a(V)&&(n(V.key),B=""+V.key),"key"in V){L={};for(var de in V)de!=="key"&&(L[de]=V[de])}else L=V;return B&&i(L,typeof C=="function"?C.displayName||C.name||"Unknown":C),l(C,B,L,o(),ge,Re)}function f(C){p(C)?C._store&&(C._store.validated=1):typeof C=="object"&&C!==null&&C.$$typeof===I&&(C._payload.status==="fulfilled"?p(C._payload.value)&&C._payload.value._store&&(C._payload.value._store.validated=1):C._store&&(C._store.validated=1))}function p(C){return typeof C=="object"&&C!==null&&C.$$typeof===h}var g=k,h=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),b=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),Y=Symbol.for("react.client.reference"),Z=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_=Object.prototype.hasOwnProperty,te=Array.isArray,F=console.createTask?console.createTask:function(){return null};g={react_stack_bottom_frame:function(C){return C()}};var ee,re={},N=g.react_stack_bottom_frame.bind(g,s)(),ue=F(r(s)),xe={};Nt.Fragment=v,Nt.jsx=function(C,V,L){var q=1e4>Z.recentlyCreatedOwnerStacks++;return d(C,V,L,!1,q?Error("react-stack-top-frame"):N,q?F(r(C)):ue)},Nt.jsxs=function(C,V,L){var q=1e4>Z.recentlyCreatedOwnerStacks++;return d(C,V,L,!0,q?Error("react-stack-top-frame"):N,q?F(r(C)):ue)}})()),Nt}var Hr;function vi(){return Hr||(Hr=1,process.env.NODE_ENV==="production"?Kt.exports=gi():Kt.exports=hi()),Kt.exports}var x=vi();const $n=768;function bi(){const[e,t]=u.useState(void 0);return u.useEffect(()=>{const n=window.matchMedia(`(max-width: ${$n-1}px)`),r=()=>{t(window.innerWidth<$n)};return n.addEventListener("change",r),t(window.innerWidth<$n),()=>n.removeEventListener("change",r)},[]),!!e}function Dn(){return typeof window<"u"}function Nn(e){return Rr(e)?(e.nodeName||"").toLowerCase():"#document"}function Ve(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function yi(e){var t;return(t=(Rr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Rr(e){return Dn()?e instanceof Node||e instanceof Ve(e).Node:!1}function at(e){return Dn()?e instanceof Element||e instanceof Ve(e).Element:!1}function ze(e){return Dn()?e instanceof HTMLElement||e instanceof Ve(e).HTMLElement:!1}function cr(e){return!Dn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ve(e).ShadowRoot}const wi=new Set(["inline","contents"]);function In(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Cr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!wi.has(o)}function Ei(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const xi=new Set(["html","body","#document"]);function mn(e){return xi.has(Nn(e))}function Cr(e){return Ve(e).getComputedStyle(e)}function qo(e){if(Nn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||cr(e)&&e.host||yi(e);return cr(t)?t.host:t}function Ko(e){const t=qo(e);return mn(t)?e.ownerDocument?e.ownerDocument.body:e.body:ze(t)&&In(t)?t:Ko(t)}function Lt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ko(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=Ve(o);if(s){const i=Si(a);return t.concat(a,a.visualViewport||[],In(o)?o:[],i&&n?Lt(i):[])}return t.concat(o,Lt(o,[],n))}function Si(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Gr={};function Ze(e,t){const n=u.useRef(Gr);return n.current===Gr&&(n.current=e(t)),n}const Vn=u[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Ri=Vn&&Vn!==u.useLayoutEffect?Vn:e=>e();function se(e){const t=Ze(Ci).current;return t.next=e,Ri(t.effect),t.trampoline}function Ci(){const e={next:void 0,callback:Ti,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Ti(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}let ur;process.env.NODE_ENV!=="production"&&(ur=new Set);function Yr(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");ur.has(t)||(ur.add(t),console.error(`Base UI: ${t}`))}}const Oi=()=>{},Ee=typeof document<"u"?u.useLayoutEffect:Oi;function dr(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const jt={};function Xo(e,t,n,r,o){let s={...fr(e,jt)};return t&&(s=gn(s,t)),n&&(s=gn(s,n)),r&&(s=gn(s,r)),s}function ki(e){if(e.length===0)return jt;if(e.length===1)return fr(e[0],jt);let t={...fr(e[0],jt)};for(let n=1;n<e.length;n+=1)t=gn(t,e[n]);return t}function gn(e,t){return Zo(t)?t(e):Di(e,t)}function Di(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=dr(e.style,r);break}case"className":{e[n]=Jo(e.className,r);break}default:Ni(n,r)?e[n]=Ii(e[n],r):e[n]=r}}return e}function Ni(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function Zo(e){return typeof e=="function"}function fr(e,t){return Zo(e)?e(t):e??jt}function Ii(e,t){return t?e?n=>{if(Pi(n)){const o=n;pr(o);const s=t(o);return o.baseUIHandlerPrevented||e?.(o),s}const r=t(n);return e?.(n),r}:t:e}function pr(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Jo(e,t){return t?e?t+" "+e:t:e}function Pi(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function dt(e,...t){const n=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const Qo=u.createContext(void 0);process.env.NODE_ENV!=="production"&&(Qo.displayName="CompositeRootContext");function Ai(e=!1){const t=u.useContext(Qo);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":dt(16));return t}function _i(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:s}=e,a=r&&t!==!1,i=r&&t===!1;return{props:u.useMemo(()=>{const l={onKeyDown(d){n&&t&&d.key!=="Tab"&&d.preventDefault()}};return r||(l.tabIndex=o,!s&&n&&(l.tabIndex=t?o:-1)),(s&&(t||a)||!s&&n)&&(l["aria-disabled"]=n),s&&(!t||i)&&(l.disabled=n),l},[r,n,t,a,i,s,o])}}function Tr(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,s=u.useRef(null),a=Ai(!0)!==void 0,i=se(()=>{const p=s.current;return!!(p?.tagName==="A"&&p?.href)}),{props:c}=_i({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&u.useEffect(()=>{if(!s.current)return;const p=s.current.tagName==="BUTTON";o?p||Yr("A component that acts as a button was not rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is a real <button>, or set the `nativeButton` prop on the component to `false`."):p&&Yr("A component that acts as a button was rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is not a real <button>, or set the `nativeButton` prop on the component to `true`.")},[o]);const l=u.useCallback(()=>{const p=s.current;Mi(p)&&a&&t&&c.disabled===void 0&&p.disabled&&(p.disabled=!1)},[t,c.disabled,a]);Ee(l,[l]);const d=u.useCallback((p={})=>{const{onClick:g,onMouseDown:h,onKeyUp:m,onKeyDown:v,onPointerDown:y,...S}=p;return Xo({type:o?"button":void 0,onClick(b){if(t){b.preventDefault();return}g?.(b)},onMouseDown(b){t||h?.(b)},onKeyDown(b){if(t||(pr(b),v?.(b)),b.baseUIHandlerPrevented)return;const O=b.target===b.currentTarget&&!o&&!i()&&!t,D=b.key==="Enter",w=b.key===" ";O&&((w||D)&&b.preventDefault(),D&&g?.(b))},onKeyUp(b){t||(pr(b),m?.(b)),!b.baseUIHandlerPrevented&&b.target===b.currentTarget&&!o&&!t&&b.key===" "&&g?.(b)},onPointerDown(b){if(t){b.preventDefault();return}y?.(b)}},o?void 0:{role:"button"},c,S)},[t,c,o,i]),f=se(p=>{s.current=p,l()});return{getButtonProps:d,buttonRef:f}}function Mi(e){return ze(e)&&e.tagName==="BUTTON"}function bn(e,t,n,r){const o=Ze(es).current;return ji(o,e,t,n,r)&&ts(o,[e,t,n,r]),o.callback}function Li(e){const t=Ze(es).current;return Fi(t,e)&&ts(t,e),t.callback}function es(){return{callback:null,cleanup:null,refs:[]}}function ji(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function Fi(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function ts(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const a=s(n);typeof a=="function"&&(r[o]=a);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const a=r[o];typeof a=="function"?a():s(null);break}case"object":{s.current=null;break}}}}}}}const $i=parseInt(u.version,10);function Or(e){return $i>=e}function qr(e){if(!u.isValidElement(e))return null;const t=e,n=t.props;return(Or(19)?n?.ref:t.ref)??null}function Vi(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const s=t[r](o);s!=null&&Object.assign(n,s);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function Bi(e,t){return typeof e=="function"?e(t):e}function Wi(e,t){return typeof e=="function"?e(t):e}function ns(){}const Ie=Object.freeze({}),rs="data-base-ui-click-trigger",zi={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function Je(e,t,n={}){const r=t.render,o=Ui(t,n);if(n.enabled===!1)return null;const s=n.state??Ie;return Hi(e,r,o,s)}function Ui(e,t={}){const{className:n,style:r,render:o}=e,{state:s=Ie,ref:a,props:i,stateAttributesMapping:c,enabled:l=!0}=t,d=l?Bi(n,s):void 0,f=l?Wi(r,s):void 0,p=l?Vi(s,c):Ie,g=l?dr(p,Array.isArray(i)?ki(i):i)??Ie:Ie;return typeof document<"u"&&(l?Array.isArray(a)?g.ref=Li([g.ref,qr(o),...a]):g.ref=bn(g.ref,qr(o),a):bn(null,null)),l?(d!==void 0&&(g.className=Jo(g.className,d)),f!==void 0&&(g.style=dr(g.style,f)),g):Ie}function Hi(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=Xo(n,t.props);return o.ref=n.ref,u.cloneElement(t,o)}if(e&&typeof e=="string")return Gi(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":dt(8))}function Gi(e,t){return e==="button"?k.createElement("button",{type:"button",...t,key:t.key}):e==="img"?k.createElement("img",{alt:"",...t,key:t.key}):u.createElement(e,t)}const os=u.forwardRef(function(t,n){const{render:r,className:o,disabled:s=!1,focusableWhenDisabled:a=!1,nativeButton:i=!0,...c}=t,l=!!s,{getButtonProps:d,buttonRef:f}=Tr({disabled:l,focusableWhenDisabled:a,native:i}),p=u.useMemo(()=>({disabled:l}),[l]);return Je("button",t,{state:p,ref:[n,f],props:[c,d]})});process.env.NODE_ENV!=="production"&&(os.displayName="Button");function ss(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=ss(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function as(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=ss(e))&&(r&&(r+=" "),r+=t);return r}const Kr=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Xr=as,Yi=(e,t)=>n=>{var r;if(t?.variants==null)return Xr(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,a=Object.keys(o).map(l=>{const d=n?.[l],f=s?.[l];if(d===null)return null;const p=Kr(d)||Kr(f);return o[l][p]}),i=n&&Object.entries(n).reduce((l,d)=>{let[f,p]=d;return p===void 0||(l[f]=p),l},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,d)=>{let{class:f,className:p,...g}=d;return Object.entries(g).every(h=>{let[m,v]=h;return Array.isArray(v)?v.includes({...s,...i}[m]):{...s,...i}[m]===v})?[...l,f,p]:l},[]);return Xr(e,a,c,n?.class,n?.className)},qi=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Ki=(e,t)=>({classGroupId:e,validator:t}),is=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),yn="-",Zr=[],Xi="arbitrary..",Zi=e=>{const t=Qi(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Ji(a);const i=a.split(yn),c=i[0]===""&&i.length>1?1:0;return ls(i,c,t)},getConflictingClassGroupIds:(a,i)=>{if(i){const c=r[a],l=n[a];return c?l?qi(l,c):c:l||Zr}return n[a]||Zr}}},ls=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const l=ls(e,t+1,s);if(l)return l}const a=n.validators;if(a===null)return;const i=t===0?e.join(yn):e.slice(t).join(yn),c=a.length;for(let l=0;l<c;l++){const d=a[l];if(d.validator(i))return d.classGroupId}},Ji=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Xi+r:void 0})(),Qi=e=>{const{theme:t,classGroups:n}=e;return el(n,t)},el=(e,t)=>{const n=is();for(const r in e){const o=e[r];kr(o,n,r,t)}return n},kr=(e,t,n,r)=>{const o=e.length;for(let s=0;s<o;s++){const a=e[s];tl(a,t,n,r)}},tl=(e,t,n,r)=>{if(typeof e=="string"){nl(e,t,n);return}if(typeof e=="function"){rl(e,t,n,r);return}ol(e,t,n,r)},nl=(e,t,n)=>{const r=e===""?t:cs(t,e);r.classGroupId=n},rl=(e,t,n,r)=>{if(sl(e)){kr(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Ki(n,e))},ol=(e,t,n,r)=>{const o=Object.entries(e),s=o.length;for(let a=0;a<s;a++){const[i,c]=o[a];kr(c,cs(t,i),n,r)}},cs=(e,t)=>{let n=e;const r=t.split(yn),o=r.length;for(let s=0;s<o;s++){const a=r[s];let i=n.nextPart.get(a);i||(i=is(),n.nextPart.set(a,i)),n=i}return n},sl=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,al=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(s,a)=>{n[s]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let a=n[s];if(a!==void 0)return a;if((a=r[s])!==void 0)return o(s,a),a},set(s,a){s in n?n[s]=a:o(s,a)}}},mr="!",Jr=":",il=[],Qr=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),ll=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let a=0,i=0,c=0,l;const d=o.length;for(let m=0;m<d;m++){const v=o[m];if(a===0&&i===0){if(v===Jr){s.push(o.slice(c,m)),c=m+1;continue}if(v==="/"){l=m;continue}}v==="["?a++:v==="]"?a--:v==="("?i++:v===")"&&i--}const f=s.length===0?o:o.slice(c);let p=f,g=!1;f.endsWith(mr)?(p=f.slice(0,-1),g=!0):f.startsWith(mr)&&(p=f.slice(1),g=!0);const h=l&&l>c?l-c:void 0;return Qr(s,g,p,h)};if(t){const o=t+Jr,s=r;r=a=>a.startsWith(o)?s(a.slice(o.length)):Qr(il,!1,a,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},cl=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let s=0;s<n.length;s++){const a=n[s],i=a[0]==="[",c=t.has(a);i||c?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(a)):o.push(a)}return o.length>0&&(o.sort(),r.push(...o)),r}},ul=e=>({cache:al(e.cacheSize),parseClassName:ll(e),sortModifiers:cl(e),...Zi(e)}),dl=/\s+/,fl=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,a=[],i=e.trim().split(dl);let c="";for(let l=i.length-1;l>=0;l-=1){const d=i[l],{isExternal:f,modifiers:p,hasImportantModifier:g,baseClassName:h,maybePostfixModifierPosition:m}=n(d);if(f){c=d+(c.length>0?" "+c:c);continue}let v=!!m,y=r(v?h.substring(0,m):h);if(!y){if(!v){c=d+(c.length>0?" "+c:c);continue}if(y=r(h),!y){c=d+(c.length>0?" "+c:c);continue}v=!1}const S=p.length===0?"":p.length===1?p[0]:s(p).join(":"),R=g?S+mr:S,b=R+y;if(a.indexOf(b)>-1)continue;a.push(b);const O=o(y,v);for(let D=0;D<O.length;++D){const w=O[D];a.push(R+w)}c=d+(c.length>0?" "+c:c)}return c},pl=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=us(n))&&(o&&(o+=" "),o+=r);return o},us=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=us(e[r]))&&(n&&(n+=" "),n+=t);return n},ml=(e,...t)=>{let n,r,o,s;const a=c=>{const l=t.reduce((d,f)=>f(d),e());return n=ul(l),r=n.cache.get,o=n.cache.set,s=i,i(c)},i=c=>{const l=r(c);if(l)return l;const d=fl(c,n);return o(c,d),d};return s=a,(...c)=>s(pl(...c))},gl=[],ye=e=>{const t=n=>n[e]||gl;return t.isThemeGetter=!0,t},ds=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,fs=/^\((?:(\w[\w-]*):)?(.+)\)$/i,hl=/^\d+\/\d+$/,vl=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,bl=/\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$/,yl=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,wl=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,El=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,mt=e=>hl.test(e),X=e=>!!e&&!Number.isNaN(Number(e)),Ye=e=>!!e&&Number.isInteger(Number(e)),Bn=e=>e.endsWith("%")&&X(e.slice(0,-1)),We=e=>vl.test(e),xl=()=>!0,Sl=e=>bl.test(e)&&!yl.test(e),ps=()=>!1,Rl=e=>wl.test(e),Cl=e=>El.test(e),Tl=e=>!P(e)&&!A(e),Ol=e=>Rt(e,hs,ps),P=e=>ds.test(e),ot=e=>Rt(e,vs,Sl),Wn=e=>Rt(e,Pl,X),eo=e=>Rt(e,ms,ps),kl=e=>Rt(e,gs,Cl),Xt=e=>Rt(e,bs,Rl),A=e=>fs.test(e),It=e=>Ct(e,vs),Dl=e=>Ct(e,Al),to=e=>Ct(e,ms),Nl=e=>Ct(e,hs),Il=e=>Ct(e,gs),Zt=e=>Ct(e,bs,!0),Rt=(e,t,n)=>{const r=ds.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Ct=(e,t,n=!1)=>{const r=fs.exec(e);return r?r[1]?t(r[1]):n:!1},ms=e=>e==="position"||e==="percentage",gs=e=>e==="image"||e==="url",hs=e=>e==="length"||e==="size"||e==="bg-size",vs=e=>e==="length",Pl=e=>e==="number",Al=e=>e==="family-name",bs=e=>e==="shadow",_l=()=>{const e=ye("color"),t=ye("font"),n=ye("text"),r=ye("font-weight"),o=ye("tracking"),s=ye("leading"),a=ye("breakpoint"),i=ye("container"),c=ye("spacing"),l=ye("radius"),d=ye("shadow"),f=ye("inset-shadow"),p=ye("text-shadow"),g=ye("drop-shadow"),h=ye("blur"),m=ye("perspective"),v=ye("aspect"),y=ye("ease"),S=ye("animate"),R=()=>["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"],O=()=>[...b(),A,P],D=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],E=()=>[A,P,c],I=()=>[mt,"full","auto",...E()],z=()=>[Ye,"none","subgrid",A,P],Y=()=>["auto",{span:["full",Ye,A,P]},Ye,A,P],Z=()=>[Ye,"auto",A,P],_=()=>["auto","min","max","fr",A,P],te=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],ee=()=>["auto",...E()],re=()=>[mt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],N=()=>[e,A,P],ue=()=>[...b(),to,eo,{position:[A,P]}],xe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],C=()=>["auto","cover","contain",Nl,Ol,{size:[A,P]}],V=()=>[Bn,It,ot],L=()=>["","none","full",l,A,P],q=()=>["",X,It,ot],ge=()=>["solid","dashed","dotted","double"],Re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],B=()=>[X,Bn,to,eo],W=()=>["","none",h,A,P],de=()=>["none",X,A,P],be=()=>["none",X,A,P],T=()=>[X,A,P],K=()=>[mt,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[We],breakpoint:[We],color:[xl],container:[We],"drop-shadow":[We],ease:["in","out","in-out"],font:[Tl],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[We],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[We],shadow:[We],spacing:["px",X],text:[We],"text-shadow":[We],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",mt,P,A,v]}],container:["container"],columns:[{columns:[X,P,A,i]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"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:O()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[Ye,"auto",A,P]}],basis:[{basis:[mt,"full","auto",i,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[X,mt,"auto","initial","none",P]}],grow:[{grow:["",X,A,P]}],shrink:[{shrink:["",X,A,P]}],order:[{order:[Ye,"first","last","none",A,P]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:Y()}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:Y()}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":_()}],"auto-rows":[{"auto-rows":_()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...te(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...te()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:ee()}],mx:[{mx:ee()}],my:[{my:ee()}],ms:[{ms:ee()}],me:[{me:ee()}],mt:[{mt:ee()}],mr:[{mr:ee()}],mb:[{mb:ee()}],ml:[{ml:ee()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:re()}],w:[{w:[i,"screen",...re()]}],"min-w":[{"min-w":[i,"screen","none",...re()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[a]},...re()]}],h:[{h:["screen","lh",...re()]}],"min-h":[{"min-h":["screen","lh","none",...re()]}],"max-h":[{"max-h":["screen","lh",...re()]}],"font-size":[{text:["base",n,It,ot]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,A,Wn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Bn,P]}],"font-family":[{font:[Dl,P,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,A,P]}],"line-clamp":[{"line-clamp":[X,"none",A,Wn]}],leading:[{leading:[s,...E()]}],"list-image":[{"list-image":["none",A,P]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",A,P]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ge(),"wavy"]}],"text-decoration-thickness":[{decoration:[X,"from-font","auto",A,ot]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[X,"auto",A,P]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",A,P]}],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",A,P]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ue()}],"bg-repeat":[{bg:xe()}],"bg-size":[{bg:C()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ye,A,P],radial:["",A,P],conic:[Ye,A,P]},Il,kl]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:q()}],"border-w-x":[{"border-x":q()}],"border-w-y":[{"border-y":q()}],"border-w-s":[{"border-s":q()}],"border-w-e":[{"border-e":q()}],"border-w-t":[{"border-t":q()}],"border-w-r":[{"border-r":q()}],"border-w-b":[{"border-b":q()}],"border-w-l":[{"border-l":q()}],"divide-x":[{"divide-x":q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ge(),"hidden","none"]}],"divide-style":[{divide:[...ge(),"hidden","none"]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...ge(),"none","hidden"]}],"outline-offset":[{"outline-offset":[X,A,P]}],"outline-w":[{outline:["",X,It,ot]}],"outline-color":[{outline:N()}],shadow:[{shadow:["","none",d,Zt,Xt]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",f,Zt,Xt]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[X,ot]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":q()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":["none",p,Zt,Xt]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[X,A,P]}],"mix-blend":[{"mix-blend":[...Re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Re()}],"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":[X]}],"mask-image-linear-from-pos":[{"mask-linear-from":B()}],"mask-image-linear-to-pos":[{"mask-linear-to":B()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":B()}],"mask-image-t-to-pos":[{"mask-t-to":B()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":B()}],"mask-image-r-to-pos":[{"mask-r-to":B()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":B()}],"mask-image-b-to-pos":[{"mask-b-to":B()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":B()}],"mask-image-l-to-pos":[{"mask-l-to":B()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":B()}],"mask-image-x-to-pos":[{"mask-x-to":B()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":B()}],"mask-image-y-to-pos":[{"mask-y-to":B()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[A,P]}],"mask-image-radial-from-pos":[{"mask-radial-from":B()}],"mask-image-radial-to-pos":[{"mask-radial-to":B()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"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":[X]}],"mask-image-conic-from-pos":[{"mask-conic-from":B()}],"mask-image-conic-to-pos":[{"mask-conic-to":B()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ue()}],"mask-repeat":[{mask:xe()}],"mask-size":[{mask:C()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",A,P]}],filter:[{filter:["","none",A,P]}],blur:[{blur:W()}],brightness:[{brightness:[X,A,P]}],contrast:[{contrast:[X,A,P]}],"drop-shadow":[{"drop-shadow":["","none",g,Zt,Xt]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:["",X,A,P]}],"hue-rotate":[{"hue-rotate":[X,A,P]}],invert:[{invert:["",X,A,P]}],saturate:[{saturate:[X,A,P]}],sepia:[{sepia:["",X,A,P]}],"backdrop-filter":[{"backdrop-filter":["","none",A,P]}],"backdrop-blur":[{"backdrop-blur":W()}],"backdrop-brightness":[{"backdrop-brightness":[X,A,P]}],"backdrop-contrast":[{"backdrop-contrast":[X,A,P]}],"backdrop-grayscale":[{"backdrop-grayscale":["",X,A,P]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[X,A,P]}],"backdrop-invert":[{"backdrop-invert":["",X,A,P]}],"backdrop-opacity":[{"backdrop-opacity":[X,A,P]}],"backdrop-saturate":[{"backdrop-saturate":[X,A,P]}],"backdrop-sepia":[{"backdrop-sepia":["",X,A,P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",A,P]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[X,"initial",A,P]}],ease:[{ease:["linear","initial",y,A,P]}],delay:[{delay:[X,A,P]}],animate:[{animate:["none",S,A,P]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,A,P]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":["scale-3d"],skew:[{skew:T()}],"skew-x":[{"skew-x":T()}],"skew-y":[{"skew-y":T()}],transform:[{transform:[A,P,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:K()}],"translate-x":[{"translate-x":K()}],"translate-y":[{"translate-y":K()}],"translate-z":[{"translate-z":K()}],"translate-none":["translate-none"],accent:[{accent:N()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:N()}],"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",A,P]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",A,P]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[X,It,ot,Wn]}],stroke:[{stroke:["none",...N()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Ml=ml(_l);function ke(...e){return Ml(as(e))}const Ll=Yi("focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-[3px] aria-invalid:ring-[3px] [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",destructive:"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function ct({className:e,variant:t="default",size:n="default",...r}){return x.jsx(os,{"data-slot":"button",className:ke(Ll({variant:t,size:n,className:e})),...r})}const Dr=u.createContext(void 0);process.env.NODE_ENV!=="production"&&(Dr.displayName="DialogRootContext");function Qe(e){const t=u.useContext(Dr);if(e===!1&&t===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.":dt(27));return t}let wn=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const jl={[wn.startingStyle]:""},Fl={[wn.endingStyle]:""},ys={transitionStatus(e){return e==="starting"?jl:e==="ending"?Fl:null}};let lt=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=wn.startingStyle]="startingStyle",e[e.endingStyle=wn.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e})({}),$l=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const Vl={[$l.popupOpen]:""},Bl={[lt.open]:""},Wl={[lt.closed]:""},zl={[lt.anchorHidden]:""},Ul={open(e){return e?Vl:null}},ws={open(e){return e?Bl:Wl},anchorHidden(e){return e?zl:null}},Hl={...ws,...ys},Es=u.forwardRef(function(t,n){const{render:r,className:o,forceRender:s=!1,...a}=t,{store:i}=Qe(),c=i.useState("open"),l=i.useState("nested"),d=i.useState("mounted"),f=i.useState("transitionStatus"),p=u.useMemo(()=>({open:c,transitionStatus:f}),[c,f]);return Je("div",t,{state:p,ref:[i.context.backdropRef,n],stateAttributesMapping:Hl,props:[{role:"presentation",hidden:!d,style:{userSelect:"none",WebkitUserSelect:"none"}},a],enabled:s||!l})});process.env.NODE_ENV!=="production"&&(Es.displayName="DialogBackdrop");const Gl="none",Ft="trigger-press",Yl="trigger-hover",xs="outside-press",ql="close-press",Ss="focus-out",Kl="escape-key",Xl="imperative-action";function Pe(e,t,n,r){let o=!1,s=!1;const a=Ie;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){s=!0},get isCanceled(){return o},get isPropagationAllowed(){return s},trigger:n,...a}}const Nr=u.forwardRef(function(t,n){const{render:r,className:o,disabled:s=!1,nativeButton:a=!0,...i}=t,{store:c}=Qe(),l=c.useState("open");function d(h){l&&c.setOpen(!1,Pe(ql,h.nativeEvent))}const{getButtonProps:f,buttonRef:p}=Tr({disabled:s,native:a}),g=u.useMemo(()=>({disabled:s}),[s]);return Je("button",t,{state:g,ref:[n,p],props:[{onClick:d},i,f]})});process.env.NODE_ENV!=="production"&&(Nr.displayName="DialogClose");const Zl={...u};let no=0;function Jl(e,t="mui"){const[n,r]=u.useState(e),o=e||n;return u.useEffect(()=>{n==null&&(no+=1,r(`${t}-${no}`))},[n,t]),o}const ro=Zl.useId;function Pn(e,t){if(ro!==void 0){const n=ro();return e??(t?`${t}-${n}`:n)}return Jl(e,t)}function Ir(e){return Pn(e,"base-ui")}const Rs=u.forwardRef(function(t,n){const{render:r,className:o,id:s,...a}=t,{store:i}=Qe(),c=Ir(s);return i.useSyncedValueWithCleanup("descriptionElementId",c),Je("p",t,{ref:n,props:[{id:c},a]})});process.env.NODE_ENV!=="production"&&(Rs.displayName="DialogDescription");const Ql=[];function Cs(e){u.useEffect(e,Ql)}const Pt=0;class xt{static create(){return new xt}currentId=Pt;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Pt,n()},t)}isStarted(){return this.currentId!==Pt}clear=()=>{this.currentId!==Pt&&(clearTimeout(this.currentId),this.currentId=Pt)};disposeEffect=()=>this.clear}function Wt(){const e=Ze(xt.create).current;return Cs(e.disposeEffect),e}function Mt(e){const t=Ze(ec,e).current;return t.next=e,Ee(t.effect),t}function ec(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const Tt=typeof navigator<"u",zn=sc(),Ts=ic(),Os=ac(),tc=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),nc=zn.platform==="MacIntel"&&zn.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(zn.platform),rc=Tt&&/apple/i.test(navigator.vendor),gr=Tt&&/android/i.test(Ts)||/android/i.test(Os);Tt&&Ts.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const oc=Os.includes("jsdom/");function sc(){if(!Tt)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function ac(){if(!Tt)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function ic(){if(!Tt)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const hr="data-base-ui-focusable",ks="active",Ds="selected",lc="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function bt(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function he(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&cr(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Me(e){return"composedPath"in e?e.composedPath()[0]:e.target}function _e(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function cc(e){return e.matches("html,body")}function Ne(e){return e?.ownerDocument||document}function Ns(e){return ze(e)&&e.matches(lc)}function oo(e){return e?e.getAttribute("role")==="combobox"&&Ns(e):!1}function vr(e){return e?e.hasAttribute(hr)?e:e.querySelector(`[${hr}]`)||e:null}function yt(e,t,n=!0){return e.filter(o=>o.parentId===t&&(!n||o.context?.open)).flatMap(o=>[o,...yt(e,o.id,n)])}function so(e,t){let n=[],r=e.find(o=>o.id===t)?.parentId;for(;r;){const o=e.find(s=>s.id===r);r=o?.parentId,o&&(n=n.concat(o))}return n}function uc(e){e.preventDefault(),e.stopPropagation()}function dc(e){return"nativeEvent"in e}function fc(e){return e.mozInputSource===0&&e.isTrusted?!0:gr&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function pc(e){return oc?!1:!gr&&e.width===0&&e.height===0||gr&&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 ao(e,t){return["mouse","pen"].includes(e)}function Is(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}var mc=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],En=mc.join(","),Ps=typeof Element>"u",St=Ps?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,xn=!Ps&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Sn=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=o===""||o==="true",a=s||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Sn(t.parentNode));return a},gc=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},As=function(t,n,r){if(Sn(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(En));return n&&St.call(t,En)&&o.unshift(t),o=o.filter(r),o},Rn=function(t,n,r){for(var o=[],s=Array.from(t);s.length;){var a=s.shift();if(!Sn(a,!1))if(a.tagName==="SLOT"){var i=a.assignedElements(),c=i.length?i:a.children,l=Rn(c,!0,r);r.flatten?o.push.apply(o,l):o.push({scopeParent:a,candidates:l})}else{var d=St.call(a,En);d&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Sn(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(f&&p){var g=Rn(f===!0?a.children:f.children,!0,r);r.flatten?o.push.apply(o,g):o.push({scopeParent:a,candidates:g})}else s.unshift.apply(s,a.children)}}return o},_s=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Ms=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||gc(t))&&!_s(t)?0:t.tabIndex},hc=function(t,n){var r=Ms(t);return r<0&&n&&!_s(t)?0:r},vc=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Ls=function(t){return t.tagName==="INPUT"},bc=function(t){return Ls(t)&&t.type==="hidden"},yc=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},wc=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},Ec=function(t){if(!t.name)return!0;var n=t.form||xn(t),r=function(i){return n.querySelectorAll('input[type="radio"][name="'+i+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var s=wc(o,t.form);return!s||s===t},xc=function(t){return Ls(t)&&t.type==="radio"},Sc=function(t){return xc(t)&&!Ec(t)},Rc=function(t){var n,r=t&&xn(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var a,i,c;for(s=!!((a=o)!==null&&a!==void 0&&(i=a.ownerDocument)!==null&&i!==void 0&&i.contains(o)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!s&&o;){var l,d,f;r=xn(o),o=(l=r)===null||l===void 0?void 0:l.host,s=!!((d=o)!==null&&d!==void 0&&(f=d.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return s},io=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},Cc=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(t).visibility==="hidden")return!0;var a=St.call(t,"details>summary:first-of-type"),i=a?t.parentElement:t;if(St.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var c=t;t;){var l=t.parentElement,d=xn(t);if(l&&!l.shadowRoot&&o(l)===!0)return io(t);t.assignedSlot?t=t.assignedSlot:!l&&d!==t.ownerDocument?t=d.host:t=l}t=c}if(Rc(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return io(t);return!1},Tc=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return St.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},br=function(t,n){return!(n.disabled||bc(n)||Cc(n,t)||yc(n)||Tc(n))},yr=function(t,n){return!(Sc(n)||Ms(n)<0||!br(t,n))},Oc=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},js=function(t){var n=[],r=[];return t.forEach(function(o,s){var a=!!o.scopeParent,i=a?o.scopeParent:o,c=hc(i,a),l=a?js(o.candidates):i;c===0?a?n.push.apply(n,l):n.push(i):r.push({documentOrder:s,tabIndex:c,item:o,isScope:a,content:l})}),r.sort(vc).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},An=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Rn([t],n.includeContainer,{filter:yr.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Oc}):r=As(t,n.includeContainer,yr.bind(null,n)),js(r)},kc=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Rn([t],n.includeContainer,{filter:br.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=As(t,n.includeContainer,br.bind(null,n)),r},Fs=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return St.call(t,En)===!1?!1:yr(n,t)};const Gt=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function $s(e,t){const n=An(e,Gt()),r=n.length;if(r===0)return;const o=bt(Ne(e)),s=n.indexOf(o),a=s===-1?t===1?0:r-1:s+t;return n[a]}function Vs(e){return $s(Ne(e).body,1)||e}function Bs(e){return $s(Ne(e).body,-1)||e}function $t(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!he(n,r)}function Dc(e){An(e,Gt()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function lo(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Nc(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(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)}}}const Ws=u.createContext(null);process.env.NODE_ENV!=="production"&&(Ws.displayName="FloatingNodeContext");const zs=u.createContext(null);process.env.NODE_ENV!=="production"&&(zs.displayName="FloatingTreeContext");const Us=()=>u.useContext(Ws)?.id||null,Hs=e=>{const t=u.useContext(zs);return e??t};function Cn(e){return`data-base-ui-${e}`}const Gs={clip:"rect(0 0 0 0)",overflow:"hidden",whiteSpace:"nowrap",position:"fixed",top:0,left:0,border:0,padding:0,width:1,height:1,margin:-1},Jt=null;let co=globalThis.requestAnimationFrame;class Ic{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)n[o]?.(t)};request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV==="test"&&co!==requestAnimationFrame&&(co=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const Qt=new Ic;class Fe{static create(){return new Fe}static request(t){return Qt.request(t)}static cancel(t){return Qt.cancel(t)}currentId=Jt;request(t){this.cancel(),this.currentId=Qt.request(()=>{this.currentId=Jt,t()})}cancel=()=>{this.currentId!==Jt&&(Qt.cancel(this.currentId),this.currentId=Jt)};disposeEffect=()=>this.cancel}function Pr(){const e=Ze(Fe.create).current;return Cs(e.disposeEffect),e}function _n(e){return e?.ownerDocument||document}const zt=u.forwardRef(function(t,n){const[r,o]=u.useState();Ee(()=>{rc&&o("button")},[]);const s={tabIndex:0,role:r};return x.jsx("span",{...t,ref:n,style:Gs,"aria-hidden":r?void 0:!0,...s,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(zt.displayName="FocusGuard");let uo=0;function Un(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(uo);const s=()=>e?.focus({preventScroll:n});o?s():uo=requestAnimationFrame(s)}const wt={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function fo(e){return e==="inert"?wt.inert:e==="aria-hidden"?wt["aria-hidden"]:wt.none}let en=new WeakSet,tn={},Hn=0;const Ys=e=>e&&(e.host||Ys(e.parentNode)),Pc=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Ys(n);return e.contains(r)?r:null}).filter(n=>n!=null);function Ac(e,t,n,r){const o="data-base-ui-inert",s=r?"inert":n?"aria-hidden":null,a=Pc(t,e),i=new Set,c=new Set(a),l=[];tn[o]||(tn[o]=new WeakMap);const d=tn[o];a.forEach(f),p(t),i.clear();function f(g){!g||i.has(g)||(i.add(g),g.parentNode&&f(g.parentNode))}function p(g){!g||c.has(g)||[].forEach.call(g.children,h=>{if(Nn(h)!=="script")if(i.has(h))p(h);else{const m=s?h.getAttribute(s):null,v=m!==null&&m!=="false",y=fo(s),S=(y.get(h)||0)+1,R=(d.get(h)||0)+1;y.set(h,S),d.set(h,R),l.push(h),S===1&&v&&en.add(h),R===1&&h.setAttribute(o,""),!v&&s&&h.setAttribute(s,s==="inert"?"":"true")}})}return Hn+=1,()=>{l.forEach(g=>{const h=fo(s),v=(h.get(g)||0)-1,y=(d.get(g)||0)-1;h.set(g,v),d.set(g,y),v||(!en.has(g)&&s&&g.removeAttribute(s),en.delete(g)),y||g.removeAttribute(o)}),Hn-=1,Hn||(wt.inert=new WeakMap,wt["aria-hidden"]=new WeakMap,wt.none=new WeakMap,en=new WeakSet,tn={})}}function _c(e,t=!1,n=!1){const r=Ne(e[0]).body;return Ac(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Ar=u.createContext(null);process.env.NODE_ENV!=="production"&&(Ar.displayName="PortalContext");const qs=()=>u.useContext(Ar),Mc=Cn("portal");function Lc(e={}){const{ref:t,container:n,componentProps:r=Ie,elementProps:o,elementState:s}=e,a=Pn(),c=qs()?.portalNode,[l,d]=u.useState(null),[f,p]=u.useState(null),g=u.useRef(null);Ee(()=>{if(n===null){g.current&&(g.current=null,p(null),d(null));return}if(a==null)return;const v=(n&&(Rr(n)?n:n.current))??c??document.body;if(v==null){g.current&&(g.current=null,p(null),d(null));return}g.current!==v&&(g.current=v,p(null),d(v))},[n,c,a]);const h=Je("div",r,{ref:[t,p],state:s,props:[{id:a,[Mc]:""},o]});return{portalNode:f,portalSubtree:l&&h?Bt.createPortal(h,l):null}}const Ks=u.forwardRef(function(t,n){const{children:r,container:o,className:s,render:a,renderGuards:i,...c}=t,{portalNode:l,portalSubtree:d}=Lc({container:o,ref:n,componentProps:t,elementProps:c}),f=u.useRef(null),p=u.useRef(null),g=u.useRef(null),h=u.useRef(null),[m,v]=u.useState(null),y=m?.modal,S=m?.open,R=typeof i=="boolean"?i:!!m&&!m.modal&&m.open&&!!l;u.useEffect(()=>{if(!l||y)return;function O(D){l&&$t(D)&&(D.type==="focusin"?lo:Dc)(l)}return l.addEventListener("focusin",O,!0),l.addEventListener("focusout",O,!0),()=>{l.removeEventListener("focusin",O,!0),l.removeEventListener("focusout",O,!0)}},[l,y]),u.useEffect(()=>{!l||S||lo(l)},[S,l]);const b=u.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:g,afterInsideRef:h,portalNode:l,setFocusManagerState:v}),[l]);return x.jsxs(u.Fragment,{children:[d,x.jsxs(Ar.Provider,{value:b,children:[R&&l&&x.jsx(zt,{"data-type":"outside",ref:f,onFocus:O=>{if($t(O,l))g.current?.focus();else{const D=m?m.domReference:null;Bs(D)?.focus()}}}),R&&l&&x.jsx("span",{"aria-owns":l.id,style:zi}),l&&Bt.createPortal(r,l),R&&l&&x.jsx(zt,{"data-type":"outside",ref:p,onFocus:O=>{if($t(O,l))h.current?.focus();else{const D=m?m.domReference:null;Vs(D)?.focus(),m?.closeOnFocusOut&&m?.onOpenChange(!1,Pe(Ss,O.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(Ks.displayName="FloatingPortal");function it(e){return e==null?e:"current"in e?e.current:e}function jc(e,t){const n=Ve(e.target);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"):""}const po=20;let Ke=[];function _r(){Ke=Ke.filter(e=>e.isConnected)}function Fc(e){_r(),e&&Nn(e)!=="body"&&(Ke.push(e),Ke.length>po&&(Ke=Ke.slice(-po)))}function Gn(){return _r(),Ke[Ke.length-1]}function $c(e){if(!e)return null;const t=Gt();return Fs(e,t)?e:An(e,t)[0]||e}function Vc(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Cr(e).display!=="none"}function mo(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=Gt(),o=kc(e,n).filter(a=>{const i=a.getAttribute("data-tabindex")||"";return Fs(a,n)||a.hasAttribute("data-tabindex")&&!i.startsWith("-")}),s=e.getAttribute("tabindex");t.current.includes("floating")||o.length===0?s!=="0"&&e.setAttribute("tabindex","0"):(s!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function Bc(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],initialFocus:s=!0,returnFocus:a=!0,restoreFocus:i=!1,modal:c=!0,closeOnFocusOut:l=!0,openInteractionType:d="",getInsideElements:f=()=>[],nextFocusableElement:p,previousFocusableElement:g,beforeContentFocusGuardRef:h,externalTree:m}=e,v="rootStore"in t?t.rootStore:t,y=v.useState("open"),S=v.useState("domReferenceElement"),R=v.useState("floatingElement"),{events:b,dataRef:O}=v.context,D=se(()=>O.current.floatingContext?.nodeId),w=se(f),E=s===!1,I=oo(S)&&E,z=Mt(o),Y=Mt(s),Z=Mt(a),_=Mt(d),te=Hs(m),F=qs(),ee=u.useRef(null),re=u.useRef(null),N=u.useRef(!1),ue=u.useRef(!1),xe=u.useRef(!1),C=u.useRef(-1),V=u.useRef(""),L=u.useRef(""),q=Wt(),ge=Wt(),Re=Pr(),B=F!=null,W=vr(R),de=se((j=W)=>j?An(j,Gt()):[]),be=se(j=>{const H=de(j);return z.current.map(()=>H).filter(Boolean).flat()});u.useEffect(()=>{if(r||!c)return;function j(fe){fe.key==="Tab"&&he(W,bt(Ne(W)))&&de().length===0&&!I&&uc(fe)}const H=Ne(W);return H.addEventListener("keydown",j),()=>{H.removeEventListener("keydown",j)}},[r,S,W,c,z,I,de,be]),u.useEffect(()=>{if(r||!R)return;function j(H){const fe=Me(H),oe=de().indexOf(fe);oe!==-1&&(C.current=oe)}return R.addEventListener("focusin",j),()=>{R.removeEventListener("focusin",j)}},[r,R,de]),u.useEffect(()=>{if(r||!y)return;const j=Ne(W);function H(){xe.current=!1}function fe(oe){const M=Me(oe),J=he(R,M)||he(S,M)||he(F?.portalNode,M);xe.current=!J,L.current=oe.pointerType||"keyboard"}function ae(){L.current="keyboard"}return j.addEventListener("pointerdown",fe,!0),j.addEventListener("pointerup",H,!0),j.addEventListener("pointercancel",H,!0),j.addEventListener("keydown",ae,!0),()=>{j.removeEventListener("pointerdown",fe,!0),j.removeEventListener("pointerup",H,!0),j.removeEventListener("pointercancel",H,!0),j.removeEventListener("keydown",ae,!0)}},[r,R,S,W,y,F]),u.useEffect(()=>{if(r||!l)return;function j(){ue.current=!0,ge.start(0,()=>{ue.current=!1})}function H(M){const J=M.relatedTarget,Ce=M.currentTarget,Te=Me(M);queueMicrotask(()=>{const Be=D(),pt=v.context.triggerElements,Ot=!(he(S,J)||he(R,J)||he(J,R)||he(F?.portalNode,J)||J!=null&&pt.hasElement(J)||pt.hasMatchingElement(Se=>he(Se,J))||J?.hasAttribute(Cn("focus-guard"))||te&&(yt(te.nodesRef.current,Be).find(Se=>he(Se.context?.elements.floating,J)||he(Se.context?.elements.domReference,J))||so(te.nodesRef.current,Be).find(Se=>[Se.context?.elements.floating,vr(Se.context?.elements.floating)].includes(J)||Se.context?.elements.domReference===J)));if(Ce===S&&W&&mo(W,z),i&&Ce!==S&&!Vc(Te)&&bt(Ne(W))===Ne(W).body){if(ze(W)&&(W.focus(),i==="popup")){Re.request(()=>{W.focus()});return}const Se=C.current,tt=de(),nt=tt[Se]||tt[tt.length-1]||W;ze(nt)&&nt.focus()}if(O.current.insideReactTree){O.current.insideReactTree=!1;return}(I||!c)&&J&&Ot&&!ue.current&&(I||J!==Gn())&&(N.current=!0,v.setOpen(!1,Pe(Ss,M)))})}function fe(){xe.current||(O.current.insideReactTree=!0,q.start(0,()=>{O.current.insideReactTree=!1}))}const ae=ze(S)?S:null,oe=[];if(!(!R&&!ae))return ae&&(ae.addEventListener("focusout",H),ae.addEventListener("pointerdown",j),oe.push(()=>{ae.removeEventListener("focusout",H),ae.removeEventListener("pointerdown",j)})),R&&(R.addEventListener("focusout",H),F&&(R.addEventListener("focusout",fe,!0),oe.push(()=>{R.removeEventListener("focusout",fe,!0)})),oe.push(()=>{R.removeEventListener("focusout",H)})),()=>{oe.forEach(M=>{M()})}},[r,S,R,W,c,te,F,v,l,i,de,I,D,z,O,q,ge,Re]);const T=u.useRef(null),K=u.useRef(null),U=bn(T,h,F?.beforeInsideRef),$=bn(K,F?.afterInsideRef);u.useEffect(()=>{if(r||!R||!y)return;const j=Array.from(F?.portalNode?.querySelectorAll(`[${Cn("portal")}]`)||[]),fe=(te?so(te.nodesRef.current,D()):[]).find(M=>oo(M.context?.elements.domReference||null))?.context?.elements.domReference,ae=[R,fe,...j,...w(),ee.current,re.current,T.current,K.current,F?.beforeOutsideRef.current,F?.afterOutsideRef.current,it(g),it(p),I?S:null].filter(M=>M!=null),oe=_c(ae,c||I);return()=>{oe()}},[y,r,S,R,c,z,F,I,te,D,w,p,g]),Ee(()=>{if(!y||r||!ze(W))return;const j=Ne(W),H=bt(j);queueMicrotask(()=>{const fe=be(W),ae=Y.current,oe=typeof ae=="function"?ae(_.current||""):ae;if(oe===void 0||oe===!1)return;let M;oe===!0||oe===null?M=fe[0]||W:M=it(oe),M=M||fe[0]||W,!he(W,H)&&Un(M,{preventScroll:M===W})})},[r,y,W,E,be,Y,_]),Ee(()=>{if(r||!W)return;const j=Ne(W),H=bt(j);Fc(H);function fe(M){if(M.open||(V.current=jc(M.nativeEvent,L.current)),M.reason===Yl&&M.nativeEvent.type==="mouseleave"&&(N.current=!0),M.reason===xs)if(M.nested)N.current=!1;else if(fc(M.nativeEvent)||pc(M.nativeEvent))N.current=!1;else{let J=!1;document.createElement("div").focus({get preventScroll(){return J=!0,!1}}),J?N.current=!1:N.current=!0}}b.on("openchange",fe);const ae=j.createElement("span");ae.setAttribute("tabindex","-1"),ae.setAttribute("aria-hidden","true"),Object.assign(ae.style,Gs),B&&S&&S.insertAdjacentElement("afterend",ae);function oe(){const M=Z.current;let J=typeof M=="function"?M(V.current):M;if(J===void 0||J===!1)return null;if(J===null&&(J=!0),typeof J=="boolean"){const Te=S||Gn();return Te&&Te.isConnected?Te:ae}const Ce=S||Gn()||ae;return it(J)||Ce}return()=>{b.off("openchange",fe);const M=bt(j),J=he(R,M)||te&&yt(te.nodesRef.current,D(),!1).some(Te=>he(Te.context?.elements.floating,M)),Ce=oe();queueMicrotask(()=>{const Te=$c(Ce),Be=typeof Z.current!="boolean";Z.current&&!N.current&&ze(Te)&&(!(!Be&&Te!==M&&M!==j.body)||J)&&Te.focus({preventScroll:!0}),ae.remove()})}},[r,R,W,Z,O,b,te,B,S,D]),u.useEffect(()=>{queueMicrotask(()=>{N.current=!1})},[r]),u.useEffect(()=>{if(r||!y)return;function j(fe){Me(fe)?.closest(`[${rs}]`)&&(ue.current=!0)}const H=Ne(W);return H.addEventListener("pointerdown",j,!0),()=>{H.removeEventListener("pointerdown",j,!0)}},[r,y,W]),Ee(()=>{if(!r&&F)return F.setFocusManagerState({modal:c,closeOnFocusOut:l,open:y,onOpenChange:v.setOpen,domReference:S}),()=>{F.setFocusManagerState(null)}},[r,F,c,y,v,l,S]),Ee(()=>{if(!(r||!W))return mo(W,z),()=>{queueMicrotask(_r)}},[r,W,z]);const Q=!r&&(c?!I:!0)&&(B||c);return x.jsxs(u.Fragment,{children:[Q&&x.jsx(zt,{"data-type":"inside",ref:U,onFocus:j=>{if(c){const H=be();Un(H[H.length-1])}else F?.portalNode&&(N.current=!1,$t(j,F.portalNode)?Vs(S)?.focus():it(g??F.beforeOutsideRef)?.focus())}}),n,Q&&x.jsx(zt,{"data-type":"inside",ref:$,onFocus:j=>{c?Un(be()[0]):F?.portalNode&&(l&&(N.current=!0),$t(j,F.portalNode)?Bs(S)?.focus():it(p??F.afterOutsideRef)?.focus())}})]})}function Wc(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:o=!0,event:s="click",toggle:a=!0,ignoreMouse:i=!1,stickIfOpen:c=!0,touchOpenDelay:l=0}=t,d=u.useRef(void 0),f=Pr(),p=Wt(),g=u.useMemo(()=>({onPointerDown(h){d.current=h.pointerType},onMouseDown(h){const m=d.current,v=h.nativeEvent,y=n.select("open");if(h.button!==0||s==="click"||ao(m)&&i)return;const S=r.current.openEvent,R=S?.type,b=n.select("domReferenceElement")!==h.currentTarget,O=y&&b||!(y&&a&&(!(S&&c)||R==="click"||R==="mousedown"));if(Ns(v.target)){const w=Pe(Ft,v,v.target);O&&m==="touch"&&l>0?p.start(l,()=>{n.setOpen(!0,w)}):n.setOpen(O,w);return}const D=h.currentTarget;f.request(()=>{const w=Pe(Ft,v,D);O&&m==="touch"&&l>0?p.start(l,()=>{n.setOpen(!0,w)}):n.setOpen(O,w)})},onClick(h){if(s==="mousedown-only")return;const m=d.current;if(s==="mousedown"&&m){d.current=void 0;return}if(ao(m)&&i)return;const v=n.select("open"),y=r.current.openEvent,S=n.select("domReferenceElement")!==h.currentTarget,R=v&&S||!(v&&a&&(!(y&&c)||Is(y))),b=Pe(Ft,h.nativeEvent,h.currentTarget);R&&m==="touch"&&l>0?p.start(l,()=>{n.setOpen(!0,b)}):n.setOpen(R,b)},onKeyDown(){d.current=void 0}}),[r,s,i,n,c,a,f,p,l]);return u.useMemo(()=>o?{reference:g}:Ie,[o,g])}const zc={intentional:"onClick",sloppy:"onPointerDown"};function Uc(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function Hc(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),s=n.useState("referenceElement"),a=n.useState("domReferenceElement"),{onOpenChange:i,dataRef:c}=n.context,{enabled:l=!0,escapeKey:d=!0,outsidePress:f=!0,outsidePressEvent:p="sloppy",referencePress:g=!1,referencePressEvent:h="sloppy",ancestorScroll:m=!1,bubbles:v,externalTree:y}=t,S=Hs(y),R=se(typeof f=="function"?f:()=>!1),b=typeof f=="function"?R:f,O=u.useRef(!1),{escapeKey:D,outsidePress:w}=Uc(v),E=u.useRef(null),I=Wt(),z=Wt(),Y=se(()=>{z.clear(),c.current.insideReactTree=!1}),Z=u.useRef(!1),_=u.useRef(""),te=se(T=>{_.current=T.pointerType}),F=se(()=>{const T=_.current,K=T==="pen"||!T?"mouse":T,U=typeof p=="function"?p():p;return typeof U=="string"?U:U[K]}),ee=se(T=>{if(!r||!l||!d||T.key!=="Escape"||Z.current)return;const K=c.current.floatingContext?.nodeId,U=S?yt(S.nodesRef.current,K):[];if(!D&&U.length>0){let j=!0;if(U.forEach(H=>{H.context?.open&&!H.context.dataRef.current.__escapeKeyBubbles&&(j=!1)}),!j)return}const $=dc(T)?T.nativeEvent:T,Q=Pe(Kl,$);n.setOpen(!1,Q),!D&&!Q.isPropagationAllowed&&T.stopPropagation()}),re=se(T=>{const K=F();return K==="intentional"&&T.type!=="click"||K==="sloppy"&&T.type==="click"}),N=se(()=>{c.current.insideReactTree=!0,z.start(0,Y)}),ue=se((T,K=!1)=>{if(re(T)){Y();return}if(c.current.insideReactTree){Y();return}if(F()==="intentional"&&K||typeof b=="function"&&!b(T))return;const U=Me(T),$=`[${Cn("inert")}]`,Q=Ne(n.select("floatingElement")).querySelectorAll($),j=n.context.triggerElements;if(U&&(j.hasElement(U)||j.hasMatchingElement(M=>he(M,U))))return;let H=at(U)?U:null;for(;H&&!mn(H);){const M=qo(H);if(mn(M)||!at(M))break;H=M}if(Q.length&&at(U)&&!cc(U)&&!he(U,n.select("floatingElement"))&&Array.from(Q).every(M=>!he(H,M)))return;if(ze(U)&&!("touches"in T)){const M=mn(U),J=Cr(U),Ce=/auto|scroll/,Te=M||Ce.test(J.overflowX),Be=M||Ce.test(J.overflowY),pt=Te&&U.clientWidth>0&&U.scrollWidth>U.clientWidth,Ot=Be&&U.clientHeight>0&&U.scrollHeight>U.clientHeight,Se=J.direction==="rtl",tt=Ot&&(Se?T.offsetX<=U.offsetWidth-U.clientWidth:T.offsetX>U.clientWidth),nt=pt&&T.offsetY>U.clientHeight;if(tt||nt)return}const fe=c.current.floatingContext?.nodeId,ae=S&&yt(S.nodesRef.current,fe).some(M=>_e(T,M.context?.elements.floating));if(_e(T,n.select("floatingElement"))||_e(T,n.select("domReferenceElement"))||ae)return;const oe=S?yt(S.nodesRef.current,fe):[];if(oe.length>0){let M=!0;if(oe.forEach(J=>{J.context?.open&&!J.context.dataRef.current.__outsidePressBubbles&&(M=!1)}),!M)return}n.setOpen(!1,Pe(xs,T)),Y()}),xe=se(T=>{F()!=="sloppy"||T.pointerType==="touch"||!n.select("open")||!l||_e(T,n.select("floatingElement"))||_e(T,n.select("domReferenceElement"))||ue(T)}),C=se(T=>{if(F()!=="sloppy"||!n.select("open")||!l||_e(T,n.select("floatingElement"))||_e(T,n.select("domReferenceElement")))return;const K=T.touches[0];K&&(E.current={startTime:Date.now(),startX:K.clientX,startY:K.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},I.start(1e3,()=>{E.current&&(E.current.dismissOnTouchEnd=!1,E.current.dismissOnMouseDown=!1)}))}),V=se(T=>{const K=Me(T);function U(){C(T),K?.removeEventListener(T.type,U)}K?.addEventListener(T.type,U)}),L=se(T=>{const K=O.current;if(O.current=!1,I.clear(),T.type==="mousedown"&&E.current&&!E.current.dismissOnMouseDown)return;const U=Me(T);function $(){T.type==="pointerdown"?xe(T):ue(T,K),U?.removeEventListener(T.type,$)}U?.addEventListener(T.type,$)}),q=se(T=>{if(F()!=="sloppy"||!E.current||_e(T,n.select("floatingElement"))||_e(T,n.select("domReferenceElement")))return;const K=T.touches[0];if(!K)return;const U=Math.abs(K.clientX-E.current.startX),$=Math.abs(K.clientY-E.current.startY),Q=Math.sqrt(U*U+$*$);Q>5&&(E.current.dismissOnTouchEnd=!0),Q>10&&(ue(T),I.clear(),E.current=null)}),ge=se(T=>{const K=Me(T);function U(){q(T),K?.removeEventListener(T.type,U)}K?.addEventListener(T.type,U)}),Re=se(T=>{F()!=="sloppy"||!E.current||_e(T,n.select("floatingElement"))||_e(T,n.select("domReferenceElement"))||(E.current.dismissOnTouchEnd&&ue(T),I.clear(),E.current=null)}),B=se(T=>{const K=Me(T);function U(){Re(T),K?.removeEventListener(T.type,U)}K?.addEventListener(T.type,U)});u.useEffect(()=>{if(!r||!l)return;c.current.__escapeKeyBubbles=D,c.current.__outsidePressBubbles=w;const T=new xt;function K(H){n.setOpen(!1,Pe(Gl,H))}function U(){T.clear(),Z.current=!0}function $(){T.start(Ei()?5:0,()=>{Z.current=!1})}const Q=Ne(o);Q.addEventListener("pointerdown",te,!0),d&&(Q.addEventListener("keydown",ee),Q.addEventListener("compositionstart",U),Q.addEventListener("compositionend",$)),b&&(Q.addEventListener("click",L,!0),Q.addEventListener("pointerdown",L,!0),Q.addEventListener("touchstart",V,!0),Q.addEventListener("touchmove",ge,!0),Q.addEventListener("touchend",B,!0),Q.addEventListener("mousedown",L,!0));let j=[];return m&&(at(a)&&(j=Lt(a)),at(o)&&(j=j.concat(Lt(o))),!at(s)&&s&&s.contextElement&&(j=j.concat(Lt(s.contextElement)))),j=j.filter(H=>H!==Q.defaultView?.visualViewport),j.forEach(H=>{H.addEventListener("scroll",K,{passive:!0})}),()=>{Q.removeEventListener("pointerdown",te,!0),d&&(Q.removeEventListener("keydown",ee),Q.removeEventListener("compositionstart",U),Q.removeEventListener("compositionend",$)),b&&(Q.removeEventListener("click",L,!0),Q.removeEventListener("pointerdown",L,!0),Q.removeEventListener("touchstart",V,!0),Q.removeEventListener("touchmove",ge,!0),Q.removeEventListener("touchend",B,!0),Q.removeEventListener("mousedown",L,!0)),j.forEach(H=>{H.removeEventListener("scroll",K)}),T.clear()}},[c,o,s,a,d,b,r,i,m,l,D,w,ee,ue,L,xe,V,ge,B,te,n]),u.useEffect(Y,[b,Y]);const W=u.useMemo(()=>({onKeyDown:ee,...g&&{[zc[h]]:T=>{n.setOpen(!1,Pe(Ft,T.nativeEvent))},...h!=="intentional"&&{onClick(T){n.setOpen(!1,Pe(Ft,T.nativeEvent))}}}}),[ee,n,g,h]),de=se(T=>{const K=Me(T.nativeEvent);!he(n.select("floatingElement"),K)||T.button!==0||(O.current=!0)}),be=u.useMemo(()=>({onKeyDown:ee,onPointerDown:de,onMouseDown:de,onMouseUp:de,onClickCapture:N,onMouseDownCapture:N,onPointerDownCapture:N,onMouseUpCapture:N,onTouchEndCapture:N,onTouchMoveCapture:N}),[ee,de,N]);return u.useMemo(()=>l?{reference:W,floating:be,trigger:W}:{},[l,W,be])}var Gc=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const o={};e(o)===o&&(r=!0)}catch{}if(r){let o;try{throw new Error}catch(s){({stack:o}=s)}console.warn(`The result function returned its own inputs without modification. e.g
7
+ \`createSelector([state => state.todos], todos => todos)\`
8
+ This could lead to inefficient memoization and unnecessary re-renders.
9
+ Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},Yc=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:s,inputSelectorResultsCopy:a}=e,i=r(()=>({}),...o);if(!(i.apply(null,s)===i.apply(null,a))){let l;try{throw new Error}catch(d){({stack:l}=d)}console.warn(`An input selector returned a different result when passed same arguments.
10
+ This means your output selector will likely run more frequently than intended.
11
+ Avoid returning a new reference inside your input selector, e.g.
12
+ \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:s,secondInputs:a,stack:l})}},qc={inputStabilityCheck:"once",identityFunctionCheck:"once"},Tn=Symbol("NOT_FOUND");function Kc(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Xc(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Zc(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var go=e=>Array.isArray(e)?e:[e];function Jc(e){const t=Array.isArray(e[0])?e[0]:e;return Zc(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function ho(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var Qc=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...qc,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:Gc},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:Yc}}};function eu(e){let t;return{get(n){return t&&e(t.key,n)?t.value:Tn},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function tu(e,t){let n=[];function r(i){const c=n.findIndex(l=>t(i,l.key));if(c>-1){const l=n[c];return c>0&&(n.splice(c,1),n.unshift(l)),l.value}return Tn}function o(i,c){r(i)===Tn&&(n.unshift({key:i,value:c}),n.length>e&&n.pop())}function s(){return n}function a(){n=[]}return{get:r,put:o,getEntries:s,clear:a}}var nu=(e,t)=>e===t;function ru(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let s=0;s<o;s++)if(!e(n[s],r[s]))return!1;return!0}}function ou(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=nu,maxSize:o=1,resultEqualityCheck:s}=n,a=ru(r);let i=0;const c=o<=1?eu(a):tu(o,a);function l(){let d=c.get(arguments);if(d===Tn){if(d=e.apply(null,arguments),i++,s){const p=c.getEntries().find(g=>s(g.value,d));p&&(d=p.value,i!==0&&i--)}c.put(arguments,d)}return d}return l.clearCache=()=>{c.clear(),l.resetResultsCount()},l.resultsCount=()=>i,l.resetResultsCount=()=>{i=0},l}var su=class{constructor(e){this.value=e}deref(){return this.value}},au=typeof WeakRef<"u"?WeakRef:su,iu=0,vo=1;function nn(){return{s:iu,v:void 0,o:null,p:null}}function Xs(e,t={}){let n=nn();const{resultEqualityCheck:r}=t;let o,s=0;function a(){let i=n;const{length:c}=arguments;for(let f=0,p=c;f<p;f++){const g=arguments[f];if(typeof g=="function"||typeof g=="object"&&g!==null){let h=i.o;h===null&&(i.o=h=new WeakMap);const m=h.get(g);m===void 0?(i=nn(),h.set(g,i)):i=m}else{let h=i.p;h===null&&(i.p=h=new Map);const m=h.get(g);m===void 0?(i=nn(),h.set(g,i)):i=m}}const l=i;let d;if(i.s===vo)d=i.v;else if(d=e.apply(null,arguments),s++,r){const f=o?.deref?.()??o;f!=null&&r(f,d)&&(d=f,s!==0&&s--),o=typeof d=="object"&&d!==null||typeof d=="function"?new au(d):d}return l.s=vo,l.v=d,d}return a.clearCache=()=>{n=nn(),a.resetResultsCount()},a.resultsCount=()=>s,a.resetResultsCount=()=>{s=0},a}function Zs(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let s=0,a=0,i,c={},l=o.pop();typeof l=="object"&&(c=l,l=o.pop()),Kc(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const d={...n,...c},{memoize:f,memoizeOptions:p=[],argsMemoize:g=Xs,argsMemoizeOptions:h=[],devModeChecks:m={}}=d,v=go(p),y=go(h),S=Jc(o),R=f(function(){return s++,l.apply(null,arguments)},...v);let b=!0;const O=g(function(){a++;const w=ho(S,arguments);if(i=R.apply(null,w),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:E,inputStabilityCheck:I}=Qc(b,m);if(E.shouldRun&&E.run(l,w,i),I.shouldRun){const z=ho(S,arguments);I.run({inputSelectorResults:w,inputSelectorResultsCopy:z},{memoize:f,memoizeOptions:v},arguments)}b&&(b=!1)}return i},...y);return Object.assign(O,{resultFunc:l,memoizedResultFunc:R,dependencies:S,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>i,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:f,argsMemoize:g})};return Object.assign(r,{withTypes:()=>r}),r}var lu=Zs(Xs),cu=Object.assign((e,t=lu)=>{Xc(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(s=>e[s]);return t(r,(...s)=>s.reduce((a,i,c)=>(a[n[c]]=i,a),{}))},{withTypes:()=>cu});Zs({memoize:ou,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const le=(e,t,n,r,o,s,...a)=>{if(a.length>0)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of selectors":dt(1));let i;if(e)i=e;else throw new Error("Missing arguments");return i};var rn={exports:{}},Yn={};var bo;function uu(){if(bo)return Yn;bo=1;var e=k;function t(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,a=e.useDebugValue;function i(f,p){var g=p(),h=r({inst:{value:g,getSnapshot:p}}),m=h[0].inst,v=h[1];return s(function(){m.value=g,m.getSnapshot=p,c(m)&&v({inst:m})},[f,g,p]),o(function(){return c(m)&&v({inst:m}),f(function(){c(m)&&v({inst:m})})},[f]),a(g),g}function c(f){var p=f.getSnapshot;f=f.value;try{var g=p();return!n(f,g)}catch{return!0}}function l(f,p){return p()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:i;return Yn.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,Yn}var qn={};var yo;function du(){return yo||(yo=1,process.env.NODE_ENV!=="production"&&(function(){function e(g,h){return g===h&&(g!==0||1/g===1/h)||g!==g&&h!==h}function t(g,h){d||o.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=h();if(!f){var v=h();s(m,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}v=a({inst:{value:m,getSnapshot:h}});var y=v[0].inst,S=v[1];return c(function(){y.value=m,y.getSnapshot=h,n(y)&&S({inst:y})},[g,m,h]),i(function(){return n(y)&&S({inst:y}),g(function(){n(y)&&S({inst:y})})},[g]),l(m),m}function n(g){var h=g.getSnapshot;g=g.value;try{var m=h();return!s(g,m)}catch{return!0}}function r(g,h){return h()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=k,s=typeof Object.is=="function"?Object.is:e,a=o.useState,i=o.useEffect,c=o.useLayoutEffect,l=o.useDebugValue,d=!1,f=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;qn.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),qn}var wo;function Mr(){return wo||(wo=1,process.env.NODE_ENV==="production"?rn.exports=uu():rn.exports=du()),rn.exports}var fu=Mr(),on={exports:{}},Kn={};var Eo;function pu(){if(Eo)return Kn;Eo=1;var e=k,t=Mr();function n(l,d){return l===d&&(l!==0||1/l===1/d)||l!==l&&d!==d}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,a=e.useEffect,i=e.useMemo,c=e.useDebugValue;return Kn.useSyncExternalStoreWithSelector=function(l,d,f,p,g){var h=s(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=i(function(){function y(D){if(!S){if(S=!0,R=D,D=p(D),g!==void 0&&m.hasValue){var w=m.value;if(g(w,D))return b=w}return b=D}if(w=b,r(R,D))return w;var E=p(D);return g!==void 0&&g(w,E)?(R=D,w):(R=D,b=E)}var S=!1,R,b,O=f===void 0?null:f;return[function(){return y(d())},O===null?void 0:function(){return y(O())}]},[d,f,p,g]);var v=o(l,h[0],h[1]);return a(function(){m.hasValue=!0,m.value=v},[v]),c(v),v},Kn}var Xn={};var xo;function mu(){return xo||(xo=1,process.env.NODE_ENV!=="production"&&(function(){function e(l,d){return l===d&&(l!==0||1/l===1/d)||l!==l&&d!==d}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=k,n=Mr(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,s=t.useRef,a=t.useEffect,i=t.useMemo,c=t.useDebugValue;Xn.useSyncExternalStoreWithSelector=function(l,d,f,p,g){var h=s(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=i(function(){function y(D){if(!S){if(S=!0,R=D,D=p(D),g!==void 0&&m.hasValue){var w=m.value;if(g(w,D))return b=w}return b=D}if(w=b,r(R,D))return w;var E=p(D);return g!==void 0&&g(w,E)?(R=D,w):(R=D,b=E)}var S=!1,R,b,O=f===void 0?null:f;return[function(){return y(d())},O===null?void 0:function(){return y(O())}]},[d,f,p,g]);var v=o(l,h[0],h[1]);return a(function(){m.hasValue=!0,m.value=v},[v]),c(v),v},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Xn}var So;function gu(){return So||(So=1,process.env.NODE_ENV==="production"?on.exports=pu():on.exports=mu()),on.exports}var hu=gu();const vu=Or(19),bu=vu?wu:Eu;function yu(e,t,n,r,o){return bu(e,t,n,r,o)}function wu(e,t,n,r,o){const s=u.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return fu.useSyncExternalStore(e.subscribe,s,s)}function Eu(e,t,n,r,o){return hu.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,s=>t(s,n,r,o))}class Vt{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){Vt.prototype.setState.call(this,{...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||Vt.prototype.setState.call(this,{...this.state,[t]:n})}notifyAll(){const t={...this.state};Vt.prototype.setState.call(this,t)}}class Js extends Vt{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}controlledValues=new Map;useSyncedValue(t,n){u.useDebugValue(t),Ee(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){Ee(()=>(this.state[t]!==n&&this.set(t,n),()=>{this.set(t,void 0)}),[t,n])}useSyncedValues(t){if(process.env.NODE_ENV!=="production"){u.useDebugValue(t,s=>Object.keys(s));const r=u.useRef(Object.keys(t)).current,o=Object.keys(t);(r.length!==o.length||r.some((s,a)=>s!==o[a]))&&console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}const n=Object.values(t);Ee(()=>{this.update(t)},n)}useControlledProp(t,n,r){u.useDebugValue(t);const o=n!==void 0;if(process.env.NODE_ENV!=="production"){const s=this.controlledValues.get(t);s!==void 0&&s!==o&&console.error(`A component is changing the ${o?"":"un"}controlled state of ${t.toString()} to be ${o?"un":""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}this.controlledValues.has(t)||(this.controlledValues.set(t,o),!o&&!Object.is(this.state[t],r)&&super.setState({...this.state,[t]:r})),Ee(()=>{o&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r,o])}set(t,n){this.controlledValues.get(t)!==!0&&super.set(t,n)}update(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.update(n)}setState(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.setState({...this.state,...n})}select=(t,n,r,o)=>{const s=this.selectors[t];return s(this.state,n,r,o)};useState=(t,n,r,o)=>{u.useDebugValue(t);const s=this.selectors[t];return yu(this,s,n,r,o)};useContextCallback(t,n){u.useDebugValue(t);const r=se(n??ns);this.context[t]=r}useStateSetter(t){const n=u.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let o=r(this.state);return n(o,o,this),this.subscribe(s=>{const a=r(s);if(!Object.is(o,a)){const i=o;o=a,n(a,i,this)}})}}const xu={open:le(e=>e.open),domReferenceElement:le(e=>e.domReferenceElement),referenceElement:le(e=>e.positionReference??e.referenceElement),floatingElement:le(e=>e.floatingElement),floatingId:le(e=>e.floatingId)};class Qs extends Js{constructor(t){const{nested:n,noEmit:r,onOpenChange:o,triggerElements:s,...a}=t;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:Nc(),nested:n,noEmit:r,triggerElements:s},xu)}setOpen=(t,n)=>{if((!t||!this.state.open||Is(n.event))&&(this.context.dataRef.current.openEvent=t?n.event:void 0),!this.context.noEmit){const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)}this.context.onOpenChange?.(t,n)}}function Su(e,t=!1,n=!1){const[r,o]=u.useState(e&&t?"idle":void 0),[s,a]=u.useState(e);return e&&!s&&(a(!0),o("starting")),!e&&s&&r!=="ending"&&!n&&o("ending"),!e&&!s&&r==="ending"&&o(void 0),Ee(()=>{if(!e&&s&&r!=="ending"&&n){const i=Fe.request(()=>{o("ending")});return()=>{Fe.cancel(i)}}},[e,s,r,n]),Ee(()=>{if(!e||t)return;const i=Fe.request(()=>{o(void 0)});return()=>{Fe.cancel(i)}},[t,e]),Ee(()=>{if(!e||!t)return;e&&s&&r!=="idle"&&o("starting");const i=Fe.request(()=>{o("idle")});return()=>{Fe.cancel(i)}},[t,e,s,o,r]),u.useMemo(()=>({mounted:s,setMounted:a,transitionStatus:r}),[s,r])}function Ru(e,t=!1,n=!0){const r=Pr();return se((o,s=null)=>{r.cancel();const a=it(e);a!=null&&(typeof a.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED?o():r.request(()=>{function i(){a&&Promise.all(a.getAnimations().map(c=>c.finished)).then(()=>{s!=null&&s.aborted||Bt.flushSync(o)}).catch(()=>{if(n){if(s!=null&&s.aborted)return;Bt.flushSync(o)}else a.getAnimations().length>0&&a.getAnimations().some(c=>c.pending||c.playState!=="finished")&&i()})}t?r.request(i):i()}))})}function ea(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,s=Mt(n),a=se(o),i=Ru(r,n);u.useEffect(()=>{t&&i(()=>{n===s.current&&a()})},[t,n,a,i,s])}function Cu(e,t){const n=u.useRef(null);return u.useCallback(r=>{e!==void 0&&(n.current!==null&&(t.context.triggerElements.delete(n.current),n.current=null),r!==null&&(n.current=e,t.context.triggerElements.add(e,r)))},[t,e])}function Tu(e,t,n,r){const o=n.useState("isMountedByTrigger",e),s=Cu(e,n),a=se(i=>{s(i),i!==null&&n.select("open")&&n.select("activeTriggerId")==null&&n.update({activeTriggerId:e,activeTriggerElement:i,...r})});return Ee(()=>{o&&n.update({activeTriggerElement:t.current,...r})},[o,n,t,...Object.values(r)]),{registerTrigger:a,isMountedByThisTrigger:o}}function Ou(e){const t=e.useState("open");Ee(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[r,o]=n.value;e.update({activeTriggerId:r,activeTriggerElement:o})}}},[t,e])}function ku(e,t,n){const{mounted:r,setMounted:o,transitionStatus:s}=Su(e);t.useSyncedValues({mounted:r,transitionStatus:s});const a=se(()=>{o(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}),i=t.useState("preventUnmountingOnClose");return ea({enabled:!i,open:e,ref:t.context.popupRef,onComplete(){e||a()}}),{forceUnmount:a,transitionStatus:s}}class ta{constructor(){this.elements=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);if(r!==n&&(r!==void 0&&this.elements.delete(r),this.elements.add(n),this.idMap.set(t,n),process.env.NODE_ENV!=="production"&&this.elements.size!==this.idMap.size))throw new Error(process.env.NODE_ENV!=="production"?"Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.":dt(87))}delete(t){const n=this.idMap.get(t);n&&(this.elements.delete(n),this.idMap.delete(t))}hasElement(t){return this.elements.has(t)}hasMatchingElement(t){for(const n of this.elements)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}get size(){return this.idMap.size}}function Du(){return new Qs({open:!1,floatingElement:null,referenceElement:null,triggerElements:new ta,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function Nu(){return{open:!1,mounted:!1,transitionStatus:"idle",floatingRootContext:Du(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,popupElement:null,positionerElement:null,activeTriggerProps:Ie,inactiveTriggerProps:Ie,popupProps:Ie}}const Iu={open:le(e=>e.open),mounted:le(e=>e.mounted),transitionStatus:le(e=>e.transitionStatus),floatingRootContext:le(e=>e.floatingRootContext),preventUnmountingOnClose:le(e=>e.preventUnmountingOnClose),payload:le(e=>e.payload),activeTriggerId:le(e=>e.activeTriggerId),activeTriggerElement:le(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:le((e,t)=>t!==void 0&&e.activeTriggerId===t),isOpenedByTrigger:le((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.open),isMountedByTrigger:le((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.mounted),triggerProps:le((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:le(e=>e.popupProps),popupElement:le(e=>e.popupElement),positionerElement:le(e=>e.positionerElement)};function Pu(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:o}=e,s=Pn(),a=Us()!=null,i=t.useState("open"),c=t.useState("activeTriggerElement"),l=t.useState(r?"popupElement":"positionerElement"),d=t.context.triggerElements,f=Ze(()=>new Qs({open:i,referenceElement:c,floatingElement:l,triggerElements:d,onOpenChange:o,floatingId:s,nested:a,noEmit:n})).current;return Ee(()=>{const p={open:i,floatingId:s,referenceElement:c,floatingElement:l};at(c)&&(p.domReferenceElement=c),f.update(p)},[i,s,c,l,f]),f.context.onOpenChange=o,f.context.nested=a,f.context.noEmit=n,f}function na(e=[]){const t=e.map(l=>l?.reference),n=e.map(l=>l?.floating),r=e.map(l=>l?.item),o=e.map(l=>l?.trigger),s=u.useCallback(l=>sn(l,e,"reference"),t),a=u.useCallback(l=>sn(l,e,"floating"),n),i=u.useCallback(l=>sn(l,e,"item"),r),c=u.useCallback(l=>sn(l,e,"trigger"),o);return u.useMemo(()=>({getReferenceProps:s,getFloatingProps:a,getItemProps:i,getTriggerProps:c}),[s,a,i,c])}function sn(e,t,n){const r=new Map,o=n==="item",s={};n==="floating"&&(s.tabIndex=-1,s[hr]="");for(const a in e)o&&e&&(a===ks||a===Ds)||(s[a]=e[a]);for(let a=0;a<t.length;a+=1){let i;const c=t[a]?.[n];typeof c=="function"?i=e?c(e):null:i=c,i&&Ro(s,i,o,r)}return Ro(s,e,o,r),s}function Ro(e,t,n,r){for(const o in t){const s=t[o];n&&(o===ks||o===Ds)||(o.startsWith("on")?(r.has(o)||r.set(o,[]),typeof s=="function"&&(r.get(o)?.push(s),e[o]=(...a)=>r.get(o)?.map(i=>i(...a)).find(i=>i!==void 0))):e[o]=s)}}const Au=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function _u(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingId"),s=n.useState("domReferenceElement"),a=n.useState("floatingElement"),{enabled:i=!0,role:c="dialog"}=t,l=Pn(),d=s?.id||l,f=u.useMemo(()=>vr(a)?.id||o,[a,o]),p=Au.get(c)??c,h=Us()!=null,m=u.useMemo(()=>p==="tooltip"||c==="label"?Ie:{"aria-haspopup":p==="alertdialog"?"dialog":p,"aria-expanded":"false",...p==="listbox"&&{role:"combobox"},...p==="menu"&&h&&{role:"menuitem"},...c==="select"&&{"aria-autocomplete":"none"},...c==="combobox"&&{"aria-autocomplete":"list"}},[p,h,c]),v=u.useMemo(()=>p==="tooltip"||c==="label"?{[`aria-${c==="label"?"labelledby":"describedby"}`]:r?f:void 0}:{...m,"aria-expanded":r?"true":"false","aria-controls":r?f:void 0,...p==="menu"&&{id:d}},[p,f,r,d,c,m]),y=u.useMemo(()=>{const R={id:f,...p&&{role:p}};return p==="tooltip"||c==="label"?R:{...R,...p==="menu"&&{"aria-labelledby":d}}},[p,f,d,c]),S=u.useCallback(({active:R,selected:b})=>{const O={role:"option",...R&&{id:`${f}-fui-option`}};switch(c){case"select":case"combobox":return{...O,"aria-selected":b}}return{}},[f,c]);return u.useMemo(()=>i?{reference:v,floating:y,item:S,trigger:m}:{},[i,v,y,m,S])}let Mu=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),Lu=(function(e){return e[e.open=lt.open]="open",e[e.closed=lt.closed]="closed",e[e.startingStyle=lt.startingStyle]="startingStyle",e[e.endingStyle=lt.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const Lr=u.createContext(void 0);process.env.NODE_ENV!=="production"&&(Lr.displayName="DialogPortalContext");function ju(){const e=u.useContext(Lr);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Dialog.Portal> is missing.":dt(26));return e}const ra="ArrowUp",oa="ArrowDown",sa="ArrowLeft",aa="ArrowRight",ia="Home",la="End",Fu=new Set([sa,aa]),$u=new Set([ra,oa]),Vu=new Set([...Fu,...$u]);[...Vu];const Bu=new Set([ra,oa,sa,aa,ia,la]),Wu={...ws,...ys,nestedDialogOpen(e){return e?{[Lu.nestedDialogOpen]:""}:null}},ca=u.forwardRef(function(t,n){const{className:r,finalFocus:o,initialFocus:s,render:a,...i}=t,{store:c}=Qe(),l=c.useState("descriptionElementId"),d=c.useState("disablePointerDismissal"),f=c.useState("floatingRootContext"),p=c.useState("popupProps"),g=c.useState("modal"),h=c.useState("mounted"),m=c.useState("nested"),v=c.useState("nestedOpenDialogCount"),y=c.useState("open"),S=c.useState("openMethod"),R=c.useState("titleElementId"),b=c.useState("transitionStatus"),O=c.useState("role");ju(),ea({open:y,ref:c.context.popupRef,onComplete(){y&&c.context.onOpenChangeComplete?.(!0)}});function D(Y){return Y==="touch"?c.context.popupRef.current:!0}const w=s===void 0?D:s,E=v>0,I=u.useMemo(()=>({open:y,nested:m,transitionStatus:b,nestedDialogOpen:E}),[y,m,b,E]),z=Je("div",t,{state:I,props:[p,{"aria-labelledby":R??void 0,"aria-describedby":l??void 0,role:O,tabIndex:-1,hidden:!h,onKeyDown(Y){Bu.has(Y.key)&&Y.stopPropagation()},style:{[Mu.nestedDialogs]:v}},i],ref:[n,c.context.popupRef,c.useStateSetter("popupElement")],stateAttributesMapping:Wu});return x.jsx(Bc,{context:f,openInteractionType:S,disabled:!h,closeOnFocusOut:!d,initialFocus:w,returnFocus:o,modal:g!==!1,restoreFocus:"popup",children:z})});process.env.NODE_ENV!=="production"&&(ca.displayName="DialogPopup");function zu(e){return Or(19)?e:e?"true":void 0}const ua=u.forwardRef(function(t,n){const{cutout:r,...o}=t;let s;if(r){const a=r?.getBoundingClientRect();s=`polygon(
13
+ 0% 0%,
14
+ 100% 0%,
15
+ 100% 100%,
16
+ 0% 100%,
17
+ 0% 0%,
18
+ ${a.left}px ${a.top}px,
19
+ ${a.left}px ${a.bottom}px,
20
+ ${a.right}px ${a.bottom}px,
21
+ ${a.right}px ${a.top}px,
22
+ ${a.left}px ${a.top}px
23
+ )`}return x.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:s}})});process.env.NODE_ENV!=="production"&&(ua.displayName="InternalBackdrop");const da=u.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,{store:s}=Qe(),a=s.useState("mounted"),i=s.useState("modal");return a||r?x.jsx(Lr.Provider,{value:r,children:x.jsxs(Ks,{ref:n,...o,children:[a&&i===!0&&x.jsx(ua,{ref:s.context.internalBackdropRef,inert:zu(!open)}),t.children]})}):null});process.env.NODE_ENV!=="production"&&(da.displayName="DialogPortal");let Co={},To={},Oo="";function Uu(e){if(typeof document>"u")return!1;const t=_n(e);return Ve(t).innerWidth-t.documentElement.clientWidth>0}function Hu(e){const t=_n(e),n=t.documentElement,r=t.body,o=In(n)?n:r,s=o.style.overflow;return o.style.overflow="hidden",()=>{o.style.overflow=s}}function Gu(e){const t=_n(e),n=t.documentElement,r=t.body,o=Ve(n);let s=0,a=0;const i=Fe.create(),c=typeof CSS<"u"&&CSS.supports?.("scrollbar-gutter","stable");if(tc&&(o.visualViewport?.scale??1)!==1)return()=>{};function l(){const p=o.getComputedStyle(n),g=o.getComputedStyle(r),v=(p.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";s=n.scrollTop,a=n.scrollLeft,Co={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Oo=n.style.scrollBehavior,To={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};const y=n.scrollHeight>n.clientHeight,S=n.scrollWidth>n.clientWidth,R=p.overflowY==="scroll"||g.overflowY==="scroll",b=p.overflowX==="scroll"||g.overflowX==="scroll",O=Math.max(0,o.innerWidth-n.clientWidth),D=Math.max(0,o.innerHeight-n.clientHeight),w=parseFloat(g.marginTop)+parseFloat(g.marginBottom),E=parseFloat(g.marginLeft)+parseFloat(g.marginRight),I=In(n)?n:r;if(c){n.style.scrollbarGutter=v,I.style.overflowY="hidden",I.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:v,overflowY:"hidden",overflowX:"hidden"}),(y||R)&&(n.style.overflowY="scroll"),(S||b)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:w||D?`calc(100dvh - ${w+D}px)`:"100dvh",width:E||O?`calc(100vw - ${E+O}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=s,r.scrollLeft=a,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function d(){Object.assign(n.style,Co),Object.assign(r.style,To),c||(n.scrollTop=s,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=Oo)}function f(){d(),i.request(l)}return l(),o.addEventListener("resize",f),()=>{i.cancel(),d(),typeof o.removeEventListener=="function"&&o.removeEventListener("resize",f)}}class Yu{lockCount=0;restore=null;timeoutLock=xt.create();timeoutUnlock=xt.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=_n(t).documentElement,o=Ve(r).getComputedStyle(r).overflowY;if(o==="hidden"||o==="clip"){this.restore=ns;return}const s=nc||!Uu(t);this.restore=s?Hu(t):Gu(t)}}const qu=new Yu;function Ku(e=!0,t=null){Ee(()=>{if(e)return qu.acquire(t)},[e,t])}function Xu(e){const t=u.useRef(""),n=u.useCallback(o=>{o.defaultPrevented||(t.current=o.pointerType,e(o,o.pointerType))},[e]);return{onClick:u.useCallback(o=>{if(o.detail===0){e(o,"keyboard");return}"pointerType"in o&&e(o,o.pointerType),e(o,t.current),t.current=""},[e]),onPointerDown:n}}function Zu(e){const[t,n]=u.useState(null),r=se((i,c)=>{e||n(c)}),o=u.useCallback(()=>{n(null)},[]),{onClick:s,onPointerDown:a}=Xu(r);return u.useMemo(()=>({openMethod:t,reset:o,triggerProps:{onClick:s,onPointerDown:a}}),[t,o,s,a])}function Ju(e){const{store:t,parentContext:n,actionsRef:r}=e,o=t.useState("open"),s=t.useState("disablePointerDismissal"),a=t.useState("modal"),i=t.useState("popupElement"),{openMethod:c,triggerProps:l,reset:d}=Zu(o);Ou(t);const{forceUnmount:f}=ku(o,t,()=>{d()}),p=se(z=>{const Y=Pe(z);return Y.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},Y}),g=u.useCallback(()=>{t.setOpen(!1,p(Xl))},[t,p]);u.useImperativeHandle(r,()=>({unmount:f,close:g}),[f,g]);const h=Pu({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[m,v]=u.useState(0),y=m===0,S=_u(h),R=Hc(h,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:a==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(z){if("button"in z&&z.button!==0||"touches"in z&&z.touches.length!==1)return!1;const Y=Me(z);if(y&&!s){const Z=Y;return a&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===Z||t.context.backdropRef.current===Z||he(Z,i)&&!Z?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:y});Ku(o&&a===!0,i);const{getReferenceProps:b,getFloatingProps:O,getTriggerProps:D}=na([S,R]);t.useContextCallback("onNestedDialogOpen",z=>{v(z+1)}),t.useContextCallback("onNestedDialogClose",()=>{v(0)}),u.useEffect(()=>(n?.onNestedDialogOpen&&o&&n.onNestedDialogOpen(m),n?.onNestedDialogClose&&!o&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&o&&n.onNestedDialogClose()}),[o,n,m]);const w=u.useMemo(()=>b(l),[b,l]),E=u.useMemo(()=>D(l),[D,l]),I=u.useMemo(()=>O(),[O]);t.useSyncedValues({openMethod:c,activeTriggerProps:w,inactiveTriggerProps:E,popupProps:I,floatingRootContext:h,nestedOpenDialogCount:m})}const Qu={...Iu,modal:le(e=>e.modal),nested:le(e=>e.nested),nestedOpenDialogCount:le(e=>e.nestedOpenDialogCount),disablePointerDismissal:le(e=>e.disablePointerDismissal),openMethod:le(e=>e.openMethod),descriptionElementId:le(e=>e.descriptionElementId),titleElementId:le(e=>e.titleElementId),viewportElement:le(e=>e.viewportElement),role:le(e=>e.role)};class ed extends Js{constructor(t){super(td(t),{popupRef:u.createRef(),backdropRef:u.createRef(),internalBackdropRef:u.createRef(),triggerElements:new ta,onOpenChange:void 0,onOpenChangeComplete:void 0},Qu)}setOpen=(t,n)=>{if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&n.trigger==null&&this.state.activeTriggerId!=null&&(n.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,n),n.isCanceled)return;const r={open:t,nativeEvent:n.event,reason:n.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",r);const o={open:t},s=n.trigger?.id??null;(s||t)&&(o.activeTriggerId=s,o.activeTriggerElement=n.trigger??null),this.update(o)}}function td(e={}){return{...Nu(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function nd(e){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:o,onOpenChangeComplete:s,disablePointerDismissal:a=!1,modal:i=!0,actionsRef:c,handle:l,triggerId:d,defaultTriggerId:f=null}=e,p=Qe(!0),g=!!p,h=Ze(()=>l?.store??new ed({open:n??r,activeTriggerId:d!==void 0?d:f,modal:i,disablePointerDismissal:a,nested:g})).current;h.useControlledProp("open",n,r),h.useControlledProp("activeTriggerId",d,f),h.useSyncedValues({disablePointerDismissal:a,nested:g,modal:i}),h.useContextCallback("onOpenChange",o),h.useContextCallback("onOpenChangeComplete",s);const m=h.useState("payload");Ju({store:h,actionsRef:c,parentContext:p?.store.context});const v=u.useMemo(()=>({store:h}),[h]);return x.jsx(Dr.Provider,{value:v,children:typeof t=="function"?t({payload:m}):t})}const fa=u.forwardRef(function(t,n){const{render:r,className:o,id:s,...a}=t,{store:i}=Qe(),c=Ir(s);return i.useSyncedValueWithCleanup("titleElementId",c),Je("h2",t,{ref:n,props:[{id:c},a]})});process.env.NODE_ENV!=="production"&&(fa.displayName="DialogTitle");const pa=u.forwardRef(function(t,n){const{render:r,className:o,disabled:s=!1,nativeButton:a=!0,id:i,payload:c,handle:l,...d}=t,f=Qe(!0),p=l?.store??f?.store;if(!p)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Dialog.Trigger> must be used within <Dialog.Root> or provided with a handle.":dt(79));const g=Ir(i),h=p.useState("floatingRootContext"),m=p.useState("isOpenedByTrigger",g),v=u.useRef(null),{registerTrigger:y,isMountedByThisTrigger:S}=Tu(g,v,p,{payload:c}),{getButtonProps:R,buttonRef:b}=Tr({disabled:s,native:a}),O=Wc(h,{enabled:h!=null}),D=na([O]),w=u.useMemo(()=>({disabled:s,open:m}),[s,m]),E=p.useState("triggerProps",S);return Je("button",t,{state:w,ref:[b,n,y,v],props:[D.getReferenceProps(),E,{[rs]:"",id:g},d,R],stateAttributesMapping:Ul})});process.env.NODE_ENV!=="production"&&(pa.displayName="DialogTrigger");const rd=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),od=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),ko=e=>{const t=od(e);return t.charAt(0).toUpperCase()+t.slice(1)},ma=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),sd=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var ad={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const id=k.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:a,...i},c)=>k.createElement("svg",{ref:c,...ad,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ma("lucide",o),...!s&&!sd(i)&&{"aria-hidden":"true"},...i},[...a.map(([l,d])=>k.createElement(l,d)),...Array.isArray(s)?s:[s]]));const Mn=(e,t)=>{const n=k.forwardRef(({className:r,...o},s)=>k.createElement(id,{ref:s,iconNode:t,className:ma(`lucide-${rd(ko(e))}`,`lucide-${e}`,r),...o}));return n.displayName=ko(e),n};const ld=[["path",{d:"m15 15 6 6",key:"1s409w"}],["path",{d:"m15 9 6-6",key:"ko1vev"}],["path",{d:"M21 16v5h-5",key:"1ck2sf"}],["path",{d:"M21 8V3h-5",key:"1qoq8a"}],["path",{d:"M3 16v5h5",key:"1t08am"}],["path",{d:"m3 21 6-6",key:"wwnumi"}],["path",{d:"M3 8V3h5",key:"1ln10m"}],["path",{d:"M9 9 3 3",key:"v551iv"}]],ga=Mn("expand",ld);const cd=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ud=Mn("loader-circle",cd);const dd=[["path",{d:"m15 15 6 6m-6-6v4.8m0-4.8h4.8",key:"17vawe"}],["path",{d:"M9 19.8V15m0 0H4.2M9 15l-6 6",key:"chjx8e"}],["path",{d:"M15 4.2V9m0 0h4.8M15 9l6-6",key:"lav6yq"}],["path",{d:"M9 4.2V9m0 0H4.2M9 9 3 3",key:"1pxi2q"}]],ha=Mn("shrink",dd);const fd=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],pd=Mn("x",fd);function md({...e}){return x.jsx(nd,{"data-slot":"dialog",...e})}function gd({...e}){return x.jsx(pa,{"data-slot":"dialog-trigger",...e})}function hd({...e}){return x.jsx(da,{"data-slot":"dialog-portal",...e})}function vd({className:e,...t}){return x.jsx(Es,{"data-slot":"dialog-overlay",className:ke("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 isolate z-50",e),...t})}function bd({className:e,children:t,showCloseButton:n=!0,...r}){return x.jsxs(hd,{children:[x.jsx(vd,{}),x.jsxs(ca,{"data-slot":"dialog-content",className:ke("bg-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/10 grid max-w-[calc(100%-2rem)] gap-4 rounded-xl p-4 text-sm ring-1 duration-100 sm:max-w-sm fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none",e),...r,children:[t,n&&x.jsxs(Nr,{"data-slot":"dialog-close",render:x.jsx(ct,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[x.jsx(pd,{}),x.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function yd({className:e,...t}){return x.jsx("div",{"data-slot":"dialog-header",className:ke("gap-2 flex flex-col",e),...t})}function wd({className:e,showCloseButton:t=!1,children:n,...r}){return x.jsxs("div",{"data-slot":"dialog-footer",className:ke("bg-muted/50 -mx-4 -mb-4 rounded-b-xl border-t p-4 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...r,children:[n,t&&x.jsx(Nr,{render:x.jsx(ct,{variant:"outline"}),children:"Close"})]})}function Ed({className:e,...t}){return x.jsx(fa,{"data-slot":"dialog-title",className:ke("text-sm leading-none font-medium",e),...t})}function xd({className:e,...t}){return x.jsx(Rs,{"data-slot":"dialog-description",className:ke("text-muted-foreground *:[a]:hover:text-foreground text-sm *:[a]:underline *:[a]:underline-offset-3",e),...t})}function va({className:e,...t}){return x.jsx(ud,{role:"status","aria-label":"Loading",className:ke("size-4 animate-spin",e),...t})}const Sd="min-w-full w-full max-w-full min-h-full h-full max-h-full",Rd="min-w-full w-full max-w-full min-h-full h-full max-h-full",Cd="md:min-w-lg md:w-min-w-lg md:max-w-min-w-lg md:min-h-11/12 md:h-11/12 md:max-h-11/12 md:aspect-9/16 lg:min-w-3xl lg:w-3xl lg:max-w-3xl lg:min-h-11/12 lg:h-11/12 lg:max-h-11/12 lg:aspect-video xl:min-w-3xl xl:w-3xl xl:max-w-3xl xl:min-h-11/12 xl:h-11/12 xl:max-h-11/12 xl:aspect-video 2xl:min-w-5xl 2xl:w-5xl 2xl:max-w-5xl 2xl:min-h-11/12 2xl:h-11/12 2xl:max-h-11/12 2xl:aspect-video",Td="min-w-full w-full max-w-full min-h-11/12 h-11/12 max-h-11/12",On={styles:{dialog:{expanded:Sd,compacted:Cd},drawer:{expanded:Rd,compacted:Td}}};function ba({className:e}){return x.jsx("iframe",{className:ke("w-full h-full flex flex-col items-center justify-center rounded-xl",e),src:"https://aarthikbandhu.com"})}function Od({open:e,setOpen:t,loading:n,setLoading:r,isFullScreen:o,setIsFullScreen:s,triggerProperties:{label:a,component:i=void 0},title:c}){return k.useEffect(()=>{setTimeout(()=>{r(!1)},5e3)},[r]),x.jsxs(md,{open:e,onOpenChange:t,children:[x.jsx(gd,{render:i||x.jsx(ct,{variant:"default",children:a})}),x.jsxs(bd,{showCloseButton:!1,className:`shadow-2xl shadow-foreground p-0.5 m-0 flex flex-col items-center justify-center gap-0 bg-background ${o?On.styles.dialog.expanded:On.styles.dialog.compacted}`,children:[x.jsxs(yd,{className:"absolute top-0 left-0 right-0 border-0 bg-background min-h-8 h-8 max-h-8 min-w-full w-full max-w-full shrink grow-0 flex flex-row items-center justify-center gap-0 rounded-t-xl px-1 py-0 mx-0 my-0",children:[x.jsx(Ed,{className:"rounded-xl text-lg leading-none min-w-1/2 w-1/2 max-w-/12 h-full flex flex-row items-center justify-start",children:c}),x.jsx(xd,{className:"rounded-xl text-xs leading-none min-w-1/2 w-1/2 max-w-1/2 h-full flex flex-row items-center justify-end",children:x.jsx(ct,{variant:"outline",size:"icon-sm",className:"rounded-lg",onClick:()=>s(l=>!l),children:o?x.jsx(ha,{}):x.jsx(ga,{})})})]}),x.jsx("div",{className:"min-w-full w-full max-w-full mt-8 mb-4 mx-0 rounded-xl border shadow-inner grow shrink-0",children:n?x.jsx("div",{className:"w-full h-full flex flex-col items-center justify-center",children:x.jsx(va,{})}):x.jsx(ba,{})}),x.jsx(wd,{className:"absolute bottom-0 left-0 right-0 border-0 bg-background min-h-4 h-4 max-h-4 min-w-full w-full max-w-full shrink grow-0 flex flex-row items-center justify-center rounded-b-xl px-2 py-2 mx-0 my-0",children:x.jsx("div",{className:"text-xs text-foreground",children:"Powered by Aarthik Labs"})})]})]})}function Xe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Do(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ya(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Do(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Do(e[o],null)}}}}function ft(...e){return u.useCallback(ya(...e),e)}function kd(e,t){const n=u.createContext(t),r=s=>{const{children:a,...i}=s,c=u.useMemo(()=>i,Object.values(i));return x.jsx(n.Provider,{value:c,children:a})};r.displayName=e+"Provider";function o(s){const a=u.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Dd(e,t=[]){let n=[];function r(s,a){const i=u.createContext(a),c=n.length;n=[...n,a];const l=f=>{const{scope:p,children:g,...h}=f,m=p?.[e]?.[c]||i,v=u.useMemo(()=>h,Object.values(h));return x.jsx(m.Provider,{value:v,children:g})};l.displayName=s+"Provider";function d(f,p){const g=p?.[e]?.[c]||i,h=u.useContext(g);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[l,d]}const o=()=>{const s=n.map(a=>u.createContext(a));return function(i){const c=i?.[e]||s;return u.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[r,Nd(o,...t)]}function Nd(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((i,{useScope:c,scopeName:l})=>{const f=c(s)[`__scope${l}`];return{...i,...f}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Ut=globalThis?.document?u.useLayoutEffect:()=>{},Id=u[" useId ".trim().toString()]||(()=>{}),Pd=0;function Zn(e){const[t,n]=u.useState(Id());return Ut(()=>{n(r=>r??String(Pd++))},[e]),e||(t?`radix-${t}`:"")}var Ad=u[" useInsertionEffect ".trim().toString()]||Ut;function _d({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,a]=Md({defaultProp:t,onChange:n}),i=e!==void 0,c=i?e:o;{const d=u.useRef(e!==void 0);u.useEffect(()=>{const f=d.current;f!==i&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=i},[i,r])}const l=u.useCallback(d=>{if(i){const f=Ld(d)?d(e):d;f!==e&&a.current?.(f)}else s(d)},[i,e,s,a]);return[c,l]}function Md({defaultProp:e,onChange:t}){const[n,r]=u.useState(e),o=u.useRef(n),s=u.useRef(t);return Ad(()=>{s.current=t},[t]),u.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function Ld(e){return typeof e=="function"}function wa(e){const t=jd(e),n=u.forwardRef((r,o)=>{const{children:s,...a}=r,i=u.Children.toArray(s),c=i.find($d);if(c){const l=c.props.children,d=i.map(f=>f===c?u.Children.count(l)>1?u.Children.only(null):u.isValidElement(l)?l.props.children:null:f);return x.jsx(t,{...a,ref:o,children:u.isValidElement(l)?u.cloneElement(l,void 0,d):null})}return x.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function jd(e){const t=u.forwardRef((n,r)=>{const{children:o,...s}=n;if(u.isValidElement(o)){const a=Bd(o),i=Vd(s,o.props);return o.type!==u.Fragment&&(i.ref=r?ya(r,a):a),u.cloneElement(o,i)}return u.Children.count(o)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Fd=Symbol("radix.slottable");function $d(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Fd}function Vd(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Bd(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Wd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ue=Wd.reduce((e,t)=>{const n=wa(`Primitive.${t}`),r=u.forwardRef((o,s)=>{const{asChild:a,...i}=o,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(c,{...i,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function zd(e,t){e&&Bt.flushSync(()=>e.dispatchEvent(t))}function Ht(e){const t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...n)=>t.current?.(...n),[])}function Ud(e,t=globalThis?.document){const n=Ht(e);u.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Hd="DismissableLayer",wr="dismissableLayer.update",Gd="dismissableLayer.pointerDownOutside",Yd="dismissableLayer.focusOutside",No,Ea=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xa=u.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...c}=e,l=u.useContext(Ea),[d,f]=u.useState(null),p=d?.ownerDocument??globalThis?.document,[,g]=u.useState({}),h=ft(t,w=>f(w)),m=Array.from(l.layers),[v]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(v),S=d?m.indexOf(d):-1,R=l.layersWithOutsidePointerEventsDisabled.size>0,b=S>=y,O=Xd(w=>{const E=w.target,I=[...l.branches].some(z=>z.contains(E));!b||I||(o?.(w),a?.(w),w.defaultPrevented||i?.())},p),D=Zd(w=>{const E=w.target;[...l.branches].some(z=>z.contains(E))||(s?.(w),a?.(w),w.defaultPrevented||i?.())},p);return Ud(w=>{S===l.layers.size-1&&(r?.(w),!w.defaultPrevented&&i&&(w.preventDefault(),i()))},p),u.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(No=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),Io(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=No)}},[d,p,n,l]),u.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),Io())},[d,l]),u.useEffect(()=>{const w=()=>g({});return document.addEventListener(wr,w),()=>document.removeEventListener(wr,w)},[]),x.jsx(Ue.div,{...c,ref:h,style:{pointerEvents:R?b?"auto":"none":void 0,...e.style},onFocusCapture:Xe(e.onFocusCapture,D.onFocusCapture),onBlurCapture:Xe(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:Xe(e.onPointerDownCapture,O.onPointerDownCapture)})});xa.displayName=Hd;var qd="DismissableLayerBranch",Kd=u.forwardRef((e,t)=>{const n=u.useContext(Ea),r=u.useRef(null),o=ft(t,r);return u.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),x.jsx(Ue.div,{...e,ref:o})});Kd.displayName=qd;function Xd(e,t=globalThis?.document){const n=Ht(e),r=u.useRef(!1),o=u.useRef(()=>{});return u.useEffect(()=>{const s=i=>{if(i.target&&!r.current){let c=function(){Sa(Gd,n,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Zd(e,t=globalThis?.document){const n=Ht(e),r=u.useRef(!1);return u.useEffect(()=>{const o=s=>{s.target&&!r.current&&Sa(Yd,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Io(){const e=new CustomEvent(wr);document.dispatchEvent(e)}function Sa(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?zd(o,s):o.dispatchEvent(s)}var Jn="focusScope.autoFocusOnMount",Qn="focusScope.autoFocusOnUnmount",Po={bubbles:!1,cancelable:!0},Jd="FocusScope",Ra=u.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[i,c]=u.useState(null),l=Ht(o),d=Ht(s),f=u.useRef(null),p=ft(t,m=>c(m)),g=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(r){let m=function(R){if(g.paused||!i)return;const b=R.target;i.contains(b)?f.current=b:qe(f.current,{select:!0})},v=function(R){if(g.paused||!i)return;const b=R.relatedTarget;b!==null&&(i.contains(b)||qe(f.current,{select:!0}))},y=function(R){if(document.activeElement===document.body)for(const O of R)O.removedNodes.length>0&&qe(i)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const S=new MutationObserver(y);return i&&S.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),S.disconnect()}}},[r,i,g.paused]),u.useEffect(()=>{if(i){_o.add(g);const m=document.activeElement;if(!i.contains(m)){const y=new CustomEvent(Jn,Po);i.addEventListener(Jn,l),i.dispatchEvent(y),y.defaultPrevented||(Qd(of(Ca(i)),{select:!0}),document.activeElement===m&&qe(i))}return()=>{i.removeEventListener(Jn,l),setTimeout(()=>{const y=new CustomEvent(Qn,Po);i.addEventListener(Qn,d),i.dispatchEvent(y),y.defaultPrevented||qe(m??document.body,{select:!0}),i.removeEventListener(Qn,d),_o.remove(g)},0)}}},[i,l,d,g]);const h=u.useCallback(m=>{if(!n&&!r||g.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(v&&y){const S=m.currentTarget,[R,b]=ef(S);R&&b?!m.shiftKey&&y===b?(m.preventDefault(),n&&qe(R,{select:!0})):m.shiftKey&&y===R&&(m.preventDefault(),n&&qe(b,{select:!0})):y===S&&m.preventDefault()}},[n,r,g.paused]);return x.jsx(Ue.div,{tabIndex:-1,...a,ref:p,onKeyDown:h})});Ra.displayName=Jd;function Qd(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(qe(r,{select:t}),document.activeElement!==n)return}function ef(e){const t=Ca(e),n=Ao(t,e),r=Ao(t.reverse(),e);return[n,r]}function Ca(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ao(e,t){for(const n of e)if(!tf(n,{upTo:t}))return n}function tf(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function nf(e){return e instanceof HTMLInputElement&&"select"in e}function qe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&nf(e)&&t&&e.select()}}var _o=rf();function rf(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Mo(e,t),e.unshift(t)},remove(t){e=Mo(e,t),e[0]?.resume()}}}function Mo(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function of(e){return e.filter(t=>t.tagName!=="A")}var sf="Portal",Ta=u.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=u.useState(!1);Ut(()=>s(!0),[]);const a=n||o&&globalThis?.document?.body;return a?Go.createPortal(x.jsx(Ue.div,{...r,ref:t}),a):null});Ta.displayName=sf;function af(e,t){return u.useReducer((n,r)=>t[n][r]??n,e)}var Ln=e=>{const{present:t,children:n}=e,r=lf(t),o=typeof n=="function"?n({present:r.isPresent}):u.Children.only(n),s=ft(r.ref,cf(o));return typeof n=="function"||r.isPresent?u.cloneElement(o,{ref:s}):null};Ln.displayName="Presence";function lf(e){const[t,n]=u.useState(),r=u.useRef(null),o=u.useRef(e),s=u.useRef("none"),a=e?"mounted":"unmounted",[i,c]=af(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const l=an(r.current);s.current=i==="mounted"?l:"none"},[i]),Ut(()=>{const l=r.current,d=o.current;if(d!==e){const p=s.current,g=an(l);e?c("MOUNT"):g==="none"||l?.display==="none"?c("UNMOUNT"):c(d&&p!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Ut(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,f=g=>{const m=an(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&m&&(c("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=g=>{g.target===t&&(s.current=an(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:u.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function an(e){return e?.animationName||"none"}function cf(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var er=0;function uf(){u.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Lo()),document.body.insertAdjacentElement("beforeend",e[1]??Lo()),er++,()=>{er===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),er--}},[])}function Lo(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var $e=function(){return $e=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},$e.apply(this,arguments)};function Oa(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function df(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var hn="right-scroll-bar-position",vn="width-before-scroll-bar",ff="with-scroll-bars-hidden",pf="--removed-body-scroll-bar-size";function tr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function mf(e,t){var n=k.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var gf=typeof window<"u"?u.useLayoutEffect:u.useEffect,jo=new WeakMap;function hf(e,t){var n=mf(null,function(r){return e.forEach(function(o){return tr(o,r)})});return gf(function(){var r=jo.get(n);if(r){var o=new Set(r),s=new Set(e),a=n.current;o.forEach(function(i){s.has(i)||tr(i,null)}),s.forEach(function(i){o.has(i)||tr(i,a)})}jo.set(n,e)},[e]),n}function vf(e){return e}function bf(e,t){t===void 0&&(t=vf);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,r);return n.push(a),function(){n=n.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(r=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(i){return s(i)},filter:function(){return n}}},assignMedium:function(s){r=!0;var a=[];if(n.length){var i=n;n=[],i.forEach(s),a=n}var c=function(){var d=a;a=[],d.forEach(s)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(d){a.push(d),l()},filter:function(d){return a=a.filter(d),n}}}};return o}function yf(e){e===void 0&&(e={});var t=bf(null);return t.options=$e({async:!0,ssr:!1},e),t}var ka=function(e){var t=e.sideCar,n=Oa(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return u.createElement(r,$e({},n))};ka.isSideCarExport=!0;function wf(e,t){return e.useMedium(t),ka}var Da=yf(),nr=function(){},jn=u.forwardRef(function(e,t){var n=u.useRef(null),r=u.useState({onScrollCapture:nr,onWheelCapture:nr,onTouchMoveCapture:nr}),o=r[0],s=r[1],a=e.forwardProps,i=e.children,c=e.className,l=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,g=e.noRelative,h=e.noIsolation,m=e.inert,v=e.allowPinchZoom,y=e.as,S=y===void 0?"div":y,R=e.gapMode,b=Oa(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=p,D=hf([n,t]),w=$e($e({},b),o);return u.createElement(u.Fragment,null,d&&u.createElement(O,{sideCar:Da,removeScrollBar:l,shards:f,noRelative:g,noIsolation:h,inert:m,setCallbacks:s,allowPinchZoom:!!v,lockRef:n,gapMode:R}),a?u.cloneElement(u.Children.only(i),$e($e({},w),{ref:D})):u.createElement(S,$e({},w,{className:c,ref:D}),i))});jn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};jn.classNames={fullWidth:vn,zeroRight:hn};var Ef=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function xf(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ef();return t&&e.setAttribute("nonce",t),e}function Sf(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Rf(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Cf=function(){var e=0,t=null;return{add:function(n){e==0&&(t=xf())&&(Sf(t,n),Rf(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Tf=function(){var e=Cf();return function(t,n){u.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Na=function(){var e=Tf(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Of={left:0,top:0,right:0,gap:0},rr=function(e){return parseInt(e||"",10)||0},kf=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[rr(n),rr(r),rr(o)]},Df=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Of;var t=kf(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Nf=Na(),Et="data-scroll-locked",If=function(e,t,n,r){var o=e.left,s=e.top,a=e.right,i=e.gap;return n===void 0&&(n="margin"),`
24
+ .`.concat(ff,` {
25
+ overflow: hidden `).concat(r,`;
26
+ padding-right: `).concat(i,"px ").concat(r,`;
27
+ }
28
+ body[`).concat(Et,`] {
29
+ overflow: hidden `).concat(r,`;
30
+ overscroll-behavior: contain;
31
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
32
+ padding-left: `.concat(o,`px;
33
+ padding-top: `).concat(s,`px;
34
+ padding-right: `).concat(a,`px;
35
+ margin-left:0;
36
+ margin-top:0;
37
+ margin-right: `).concat(i,"px ").concat(r,`;
38
+ `),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
39
+ }
40
+
41
+ .`).concat(hn,` {
42
+ right: `).concat(i,"px ").concat(r,`;
43
+ }
44
+
45
+ .`).concat(vn,` {
46
+ margin-right: `).concat(i,"px ").concat(r,`;
47
+ }
48
+
49
+ .`).concat(hn," .").concat(hn,` {
50
+ right: 0 `).concat(r,`;
51
+ }
52
+
53
+ .`).concat(vn," .").concat(vn,` {
54
+ margin-right: 0 `).concat(r,`;
55
+ }
56
+
57
+ body[`).concat(Et,`] {
58
+ `).concat(pf,": ").concat(i,`px;
59
+ }
60
+ `)},Fo=function(){var e=parseInt(document.body.getAttribute(Et)||"0",10);return isFinite(e)?e:0},Pf=function(){u.useEffect(function(){return document.body.setAttribute(Et,(Fo()+1).toString()),function(){var e=Fo()-1;e<=0?document.body.removeAttribute(Et):document.body.setAttribute(Et,e.toString())}},[])},Af=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Pf();var s=u.useMemo(function(){return Df(o)},[o]);return u.createElement(Nf,{styles:If(s,!t,o,n?"":"!important")})},Er=!1;if(typeof window<"u")try{var ln=Object.defineProperty({},"passive",{get:function(){return Er=!0,!0}});window.addEventListener("test",ln,ln),window.removeEventListener("test",ln,ln)}catch{Er=!1}var gt=Er?{passive:!1}:!1,_f=function(e){return e.tagName==="TEXTAREA"},Ia=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!_f(e)&&n[t]==="visible")},Mf=function(e){return Ia(e,"overflowY")},Lf=function(e){return Ia(e,"overflowX")},$o=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Pa(e,r);if(o){var s=Aa(e,r),a=s[1],i=s[2];if(a>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},jf=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Ff=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Pa=function(e,t){return e==="v"?Mf(t):Lf(t)},Aa=function(e,t){return e==="v"?jf(t):Ff(t)},$f=function(e,t){return e==="h"&&t==="rtl"?-1:1},Vf=function(e,t,n,r,o){var s=$f(e,window.getComputedStyle(t).direction),a=s*r,i=n.target,c=t.contains(i),l=!1,d=a>0,f=0,p=0;do{if(!i)break;var g=Aa(e,i),h=g[0],m=g[1],v=g[2],y=m-v-s*h;(h||y)&&Pa(e,i)&&(f+=y,p+=h);var S=i.parentNode;i=S&&S.nodeType===Node.DOCUMENT_FRAGMENT_NODE?S.host:S}while(!c&&i!==document.body||c&&(t.contains(i)||t===i));return(d&&Math.abs(f)<1||!d&&Math.abs(p)<1)&&(l=!0),l},cn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Vo=function(e){return[e.deltaX,e.deltaY]},Bo=function(e){return e&&"current"in e?e.current:e},Bf=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Wf=function(e){return`
61
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
62
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
63
+ `)},zf=0,ht=[];function Uf(e){var t=u.useRef([]),n=u.useRef([0,0]),r=u.useRef(),o=u.useState(zf++)[0],s=u.useState(Na)[0],a=u.useRef(e);u.useEffect(function(){a.current=e},[e]),u.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=df([e.lockRef.current],(e.shards||[]).map(Bo),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=u.useCallback(function(m,v){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!a.current.allowPinchZoom;var y=cn(m),S=n.current,R="deltaX"in m?m.deltaX:S[0]-y[0],b="deltaY"in m?m.deltaY:S[1]-y[1],O,D=m.target,w=Math.abs(R)>Math.abs(b)?"h":"v";if("touches"in m&&w==="h"&&D.type==="range")return!1;var E=window.getSelection(),I=E&&E.anchorNode,z=I?I===D||I.contains(D):!1;if(z)return!1;var Y=$o(w,D);if(!Y)return!0;if(Y?O=w:(O=w==="v"?"h":"v",Y=$o(w,D)),!Y)return!1;if(!r.current&&"changedTouches"in m&&(R||b)&&(r.current=O),!O)return!0;var Z=r.current||O;return Vf(Z,v,m,Z==="h"?R:b)},[]),c=u.useCallback(function(m){var v=m;if(!(!ht.length||ht[ht.length-1]!==s)){var y="deltaY"in v?Vo(v):cn(v),S=t.current.filter(function(O){return O.name===v.type&&(O.target===v.target||v.target===O.shadowParent)&&Bf(O.delta,y)})[0];if(S&&S.should){v.cancelable&&v.preventDefault();return}if(!S){var R=(a.current.shards||[]).map(Bo).filter(Boolean).filter(function(O){return O.contains(v.target)}),b=R.length>0?i(v,R[0]):!a.current.noIsolation;b&&v.cancelable&&v.preventDefault()}}},[]),l=u.useCallback(function(m,v,y,S){var R={name:m,delta:v,target:y,should:S,shadowParent:Hf(y)};t.current.push(R),setTimeout(function(){t.current=t.current.filter(function(b){return b!==R})},1)},[]),d=u.useCallback(function(m){n.current=cn(m),r.current=void 0},[]),f=u.useCallback(function(m){l(m.type,Vo(m),m.target,i(m,e.lockRef.current))},[]),p=u.useCallback(function(m){l(m.type,cn(m),m.target,i(m,e.lockRef.current))},[]);u.useEffect(function(){return ht.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,gt),document.addEventListener("touchmove",c,gt),document.addEventListener("touchstart",d,gt),function(){ht=ht.filter(function(m){return m!==s}),document.removeEventListener("wheel",c,gt),document.removeEventListener("touchmove",c,gt),document.removeEventListener("touchstart",d,gt)}},[]);var g=e.removeScrollBar,h=e.inert;return u.createElement(u.Fragment,null,h?u.createElement(s,{styles:Wf(o)}):null,g?u.createElement(Af,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Hf(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Gf=wf(Da,Uf);var _a=u.forwardRef(function(e,t){return u.createElement(jn,$e({},e,{ref:t,sideCar:Gf}))});_a.classNames=jn.classNames;var Yf=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},vt=new WeakMap,un=new WeakMap,dn={},or=0,Ma=function(e){return e&&(e.host||Ma(e.parentNode))},qf=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Ma(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Kf=function(e,t,n,r){var o=qf(t,Array.isArray(e)?e:[e]);dn[n]||(dn[n]=new WeakMap);var s=dn[n],a=[],i=new Set,c=new Set(o),l=function(f){!f||i.has(f)||(i.add(f),l(f.parentNode))};o.forEach(l);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(p){if(i.has(p))d(p);else try{var g=p.getAttribute(r),h=g!==null&&g!=="false",m=(vt.get(p)||0)+1,v=(s.get(p)||0)+1;vt.set(p,m),s.set(p,v),a.push(p),m===1&&h&&un.set(p,!0),v===1&&p.setAttribute(n,"true"),h||p.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return d(t),i.clear(),or++,function(){a.forEach(function(f){var p=vt.get(f)-1,g=s.get(f)-1;vt.set(f,p),s.set(f,g),p||(un.has(f)||f.removeAttribute(r),un.delete(f)),g||f.removeAttribute(n)}),or--,or||(vt=new WeakMap,vt=new WeakMap,un=new WeakMap,dn={})}},Xf=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Yf(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Kf(r,o,n,"aria-hidden")):function(){return null}},Fn="Dialog",[La]=Dd(Fn),[Zf,Le]=La(Fn),ja=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:a=!0}=e,i=u.useRef(null),c=u.useRef(null),[l,d]=_d({prop:r,defaultProp:o??!1,onChange:s,caller:Fn});return x.jsx(Zf,{scope:t,triggerRef:i,contentRef:c,contentId:Zn(),titleId:Zn(),descriptionId:Zn(),open:l,onOpenChange:d,onOpenToggle:u.useCallback(()=>d(f=>!f),[d]),modal:a,children:n})};ja.displayName=Fn;var Fa="DialogTrigger",$a=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Le(Fa,n),s=ft(t,o.triggerRef);return x.jsx(Ue.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":$r(o.open),...r,ref:s,onClick:Xe(e.onClick,o.onOpenToggle)})});$a.displayName=Fa;var jr="DialogPortal",[Jf,Va]=La(jr,{forceMount:void 0}),Ba=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=Le(jr,t);return x.jsx(Jf,{scope:t,forceMount:n,children:u.Children.map(r,a=>x.jsx(Ln,{present:n||s.open,children:x.jsx(Ta,{asChild:!0,container:o,children:a})}))})};Ba.displayName=jr;var kn="DialogOverlay",Wa=u.forwardRef((e,t)=>{const n=Va(kn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Le(kn,e.__scopeDialog);return s.modal?x.jsx(Ln,{present:r||s.open,children:x.jsx(ep,{...o,ref:t})}):null});Wa.displayName=kn;var Qf=wa("DialogOverlay.RemoveScroll"),ep=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Le(kn,n);return x.jsx(_a,{as:Qf,allowPinchZoom:!0,shards:[o.contentRef],children:x.jsx(Ue.div,{"data-state":$r(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ut="DialogContent",za=u.forwardRef((e,t)=>{const n=Va(ut,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Le(ut,e.__scopeDialog);return x.jsx(Ln,{present:r||s.open,children:s.modal?x.jsx(tp,{...o,ref:t}):x.jsx(np,{...o,ref:t})})});za.displayName=ut;var tp=u.forwardRef((e,t)=>{const n=Le(ut,e.__scopeDialog),r=u.useRef(null),o=ft(t,n.contentRef,r);return u.useEffect(()=>{const s=r.current;if(s)return Xf(s)},[]),x.jsx(Ua,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Xe(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Xe(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,i=a.button===0&&a.ctrlKey===!0;(a.button===2||i)&&s.preventDefault()}),onFocusOutside:Xe(e.onFocusOutside,s=>s.preventDefault())})}),np=u.forwardRef((e,t)=>{const n=Le(ut,e.__scopeDialog),r=u.useRef(!1),o=u.useRef(!1);return x.jsx(Ua,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Ua=u.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...a}=e,i=Le(ut,n),c=u.useRef(null),l=ft(t,c);return uf(),x.jsxs(x.Fragment,{children:[x.jsx(Ra,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:x.jsx(xa,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":$r(i.open),...a,ref:l,onDismiss:()=>i.onOpenChange(!1)})}),x.jsxs(x.Fragment,{children:[x.jsx(rp,{titleId:i.titleId}),x.jsx(sp,{contentRef:c,descriptionId:i.descriptionId})]})]})}),Fr="DialogTitle",Ha=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Le(Fr,n);return x.jsx(Ue.h2,{id:o.titleId,...r,ref:t})});Ha.displayName=Fr;var Ga="DialogDescription",Ya=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Le(Ga,n);return x.jsx(Ue.p,{id:o.descriptionId,...r,ref:t})});Ya.displayName=Ga;var qa="DialogClose",Ka=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Le(qa,n);return x.jsx(Ue.button,{type:"button",...r,ref:t,onClick:Xe(e.onClick,()=>o.onOpenChange(!1))})});Ka.displayName=qa;function $r(e){return e?"open":"closed"}var Xa="DialogTitleWarning",[em,Za]=kd(Xa,{contentName:ut,titleName:Fr,docsSlug:"dialog"}),rp=({titleId:e})=>{const t=Za(Xa),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
64
+
65
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
66
+
67
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return u.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},op="DialogDescriptionWarning",sp=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Za(op).contentName}}.`;return u.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},ap=ja,ip=$a,lp=Ba,cp=Wa,up=za,dp=Ha,fp=Ya,pp=Ka;function mp(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const Ja=k.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Yt=()=>{const e=k.useContext(Ja);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};mp(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
68
+ [data-state=closed]
69
+ ){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function gp(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function hp(){return Vr(/^Mac/)}function vp(){return Vr(/^iPhone/)}function Wo(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function bp(){return Vr(/^iPad/)||hp()&&navigator.maxTouchPoints>1}function Qa(){return vp()||bp()}function Vr(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const yp=24,wp=typeof window<"u"?k.useLayoutEffect:k.useEffect;function zo(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const sr=typeof document<"u"&&window.visualViewport;function Uo(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function ei(e){for(Uo(e)&&(e=e.parentElement);e&&!Uo(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const Ep=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let fn=0,ar;function xp(e={}){let{isDisabled:t}=e;wp(()=>{if(!t)return fn++,fn===1&&Qa()&&(ar=Sp()),()=>{fn--,fn===0&&ar?.()}},[t])}function Sp(){let e,t=0,n=f=>{e=ei(f.target),!(e===document.documentElement&&e===document.body)&&(t=f.changedTouches[0].pageY)},r=f=>{if(!e||e===document.documentElement||e===document.body){f.preventDefault();return}let p=f.changedTouches[0].pageY,g=e.scrollTop,h=e.scrollHeight-e.clientHeight;h!==0&&((g<=0&&p>t||g>=h&&p<t)&&f.preventDefault(),t=p)},o=f=>{let p=f.target;xr(p)&&p!==document.activeElement&&(f.preventDefault(),p.style.transform="translateY(-2000px)",p.focus(),requestAnimationFrame(()=>{p.style.transform=""}))},s=f=>{let p=f.target;xr(p)&&(p.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{p.style.transform="",sr&&(sr.height<window.innerHeight?requestAnimationFrame(()=>{Ho(p)}):sr.addEventListener("resize",()=>Ho(p),{once:!0}))}))},a=()=>{window.scrollTo(0,0)},i=window.pageXOffset,c=window.pageYOffset,l=zo(Rp(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let d=zo(At(document,"touchstart",n,{passive:!1,capture:!0}),At(document,"touchmove",r,{passive:!1,capture:!0}),At(document,"touchend",o,{passive:!1,capture:!0}),At(document,"focus",s,!0),At(window,"scroll",a));return()=>{l(),d(),window.scrollTo(i,c)}}function Rp(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function At(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Ho(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=ei(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,o=e.getBoundingClientRect().top,s=e.getBoundingClientRect().bottom;const a=n.getBoundingClientRect().bottom+yp;s>a&&(n.scrollTop+=o-r)}e=n.parentElement}}function xr(e){return e instanceof HTMLInputElement&&!Ep.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function Cp(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Tp(...e){return t=>e.forEach(n=>Cp(n,t))}function ti(...e){return u.useCallback(Tp(...e),e)}const ni=new WeakMap;function we(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([o,s])=>{if(o.startsWith("--")){e.style.setProperty(o,s);return}r[o]=e.style[o],e.style[o]=s}),!n&&ni.set(e,r)}function Op(e,t){if(!e||!(e instanceof HTMLElement))return;let n=ni.get(e);n&&(e.style[t]=n[t])}const ve=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function pn(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let o=r.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[ve(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[ve(t)?5:4]):null)}function kp(e){return 8*(Math.log(e+1)-2)}function ir(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function Dp(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const pe={DURATION:.5,EASE:[.32,.72,0,1]},ri=.4,Np=.25,Ip=100,oi=8,st=16,Sr=26,lr="vaul-dragging";function si(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function Pp({defaultProp:e,onChange:t}){const n=k.useState(e),[r]=n,o=k.useRef(r),s=si(t);return k.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}function ai({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Pp({defaultProp:t,onChange:n}),s=e!==void 0,a=s?e:r,i=si(n),c=k.useCallback(l=>{if(s){const f=typeof l=="function"?l(e):l;f!==e&&i(f)}else o(l)},[s,e,o,i]);return[a,c]}function Ap({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:s,onSnapPointChange:a,direction:i="bottom",container:c,snapToSequentialPoint:l}){const[d,f]=ai({prop:e,defaultProp:n?.[0],onChange:t}),[p,g]=k.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);k.useEffect(()=>{function w(){g({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",w),()=>window.removeEventListener("resize",w)},[]);const h=k.useMemo(()=>d===n?.[n.length-1]||null,[n,d]),m=k.useMemo(()=>{var w;return(w=n?.findIndex(E=>E===d))!=null?w:null},[n,d]),v=n&&n.length>0&&(s||s===0)&&!Number.isNaN(s)&&n[s]===d||!n,y=k.useMemo(()=>{const w=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var E;return(E=n?.map(I=>{const z=typeof I=="string";let Y=0;if(z&&(Y=parseInt(I,10)),ve(i)){const _=z?Y:p?I*w.height:0;return p?i==="bottom"?w.height-_:-w.height+_:_}const Z=z?Y:p?I*w.width:0;return p?i==="right"?w.width-Z:-w.width+Z:Z}))!=null?E:[]},[n,p,c]),S=k.useMemo(()=>m!==null?y?.[m]:null,[y,m]),R=k.useCallback(w=>{var E;const I=(E=y?.findIndex(z=>z===w))!=null?E:null;a(I),we(r.current,{transition:`transform ${pe.DURATION}s cubic-bezier(${pe.EASE.join(",")})`,transform:ve(i)?`translate3d(0, ${w}px, 0)`:`translate3d(${w}px, 0, 0)`}),y&&I!==y.length-1&&s!==void 0&&I!==s&&I<s?we(o.current,{transition:`opacity ${pe.DURATION}s cubic-bezier(${pe.EASE.join(",")})`,opacity:"0"}):we(o.current,{transition:`opacity ${pe.DURATION}s cubic-bezier(${pe.EASE.join(",")})`,opacity:"1"}),f(n?.[Math.max(I,0)])},[r.current,n,y,s,o,f]);k.useEffect(()=>{if(d||e){var w;const E=(w=n?.findIndex(I=>I===e||I===d))!=null?w:-1;y&&E!==-1&&typeof y[E]=="number"&&R(y[E])}},[d,e,n,y,R]);function b({draggedDistance:w,closeDrawer:E,velocity:I,dismissible:z}){if(s===void 0)return;const Y=i==="bottom"||i==="right"?(S??0)-w:(S??0)+w,Z=m===s-1,_=m===0,te=w>0;if(Z&&we(o.current,{transition:`opacity ${pe.DURATION}s cubic-bezier(${pe.EASE.join(",")})`}),!l&&I>2&&!te){z?E():R(y[0]);return}if(!l&&I>2&&te&&y&&n){R(y[n.length-1]);return}const F=y?.reduce((re,N)=>typeof re!="number"||typeof N!="number"?re:Math.abs(N-Y)<Math.abs(re-Y)?N:re),ee=ve(i)?window.innerHeight:window.innerWidth;if(I>ri&&Math.abs(w)<ee*.4){const re=te?1:-1;if(re>0&&h&&n){R(y[n.length-1]);return}if(_&&re<0&&z&&E(),m===null)return;R(y[m+re]);return}R(F)}function O({draggedDistance:w}){if(S===null)return;const E=i==="bottom"||i==="right"?S-w:S+w;(i==="bottom"||i==="right")&&E<y[y.length-1]||(i==="top"||i==="left")&&E>y[y.length-1]||we(r.current,{transform:ve(i)?`translate3d(0, ${E}px, 0)`:`translate3d(${E}px, 0, 0)`})}function D(w,E){if(!n||typeof m!="number"||!y||s===void 0)return null;const I=m===s-1;if(m>=s&&E)return 0;if(I&&!E)return 1;if(!v&&!I)return null;const Y=I?m+1:m-1,Z=I?y[Y]-y[Y-1]:y[Y+1]-y[Y],_=w/Math.abs(Z);return I?1-_:_}return{isLastSnapPoint:h,activeSnapPoint:d,shouldFade:v,getPercentageDragged:D,setActiveSnapPoint:f,activeSnapPointIndex:m,onRelease:b,onDrag:O,snapPointsOffset:y}}const _p=()=>()=>{};function Mp(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=Yt(),s=k.useRef(null),a=k.useMemo(()=>document.body.style.backgroundColor,[]);function i(){return(window.innerWidth-Sr)/window.innerWidth}k.useEffect(()=>{if(t&&n){s.current&&clearTimeout(s.current);const c=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!c)return;Dp(r&&!o?ir(document.body,{background:"black"}):_p,ir(c,{transformOrigin:ve(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${pe.DURATION}s`,transitionTimingFunction:`cubic-bezier(${pe.EASE.join(",")})`}));const l=ir(c,{borderRadius:`${oi}px`,overflow:"hidden",...ve(e)?{transform:`scale(${i()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${i()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{l(),s.current=window.setTimeout(()=>{a?document.body.style.background=a:document.body.style.removeProperty("background")},pe.DURATION*1e3)}}},[t,n,a])}let _t=null;function Lp({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:s}){const[a,i]=k.useState(()=>typeof window<"u"?window.location.href:""),c=k.useRef(0),l=k.useCallback(()=>{if(Wo()&&_t===null&&e&&!s){_t={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:f,innerHeight:p}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-c.current}px`,left:`${-f}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const g=p-window.innerHeight;g&&c.current>=p&&(document.body.style.top=`${-(c.current+g)}px`)}),300)}},[e]),d=k.useCallback(()=>{if(Wo()&&_t!==null&&!s){const f=-parseInt(document.body.style.top,10),p=-parseInt(document.body.style.left,10);Object.assign(document.body.style,_t),window.requestAnimationFrame(()=>{if(o&&a!==window.location.href){i(window.location.href);return}window.scrollTo(p,f)}),_t=null}},[a]);return k.useEffect(()=>{function f(){c.current=window.scrollY}return f(),window.addEventListener("scroll",f),()=>{window.removeEventListener("scroll",f)}},[]),k.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||d()}},[t,d]),k.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&l(),t||window.setTimeout(()=>{d()},500)):d())},[e,r,a,t,n,l,d]),{restorePositionSetting:d}}function jp({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:s,shouldScaleBackground:a=!1,setBackgroundColorOnScale:i=!0,closeThreshold:c=Np,scrollLockTimeout:l=Ip,dismissible:d=!0,handleOnly:f=!1,fadeFromIndex:p=s&&s.length-1,activeSnapPoint:g,setActiveSnapPoint:h,fixed:m,modal:v=!0,onClose:y,nested:S,noBodyStyles:R=!1,direction:b="bottom",defaultOpen:O=!1,disablePreventScroll:D=!0,snapToSequentialPoint:w=!1,preventScrollRestoration:E=!1,repositionInputs:I=!0,onAnimationEnd:z,container:Y,autoFocus:Z=!1}){var _,te;const[F=!1,ee]=ai({defaultProp:O,prop:e,onChange:G=>{t?.(G),!G&&!S&&Ot(),setTimeout(()=>{z?.(G)},pe.DURATION*1e3),G&&!v&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),G||(document.body.style.pointerEvents="auto")}}),[re,N]=k.useState(!1),[ue,xe]=k.useState(!1),[C,V]=k.useState(!1),L=k.useRef(null),q=k.useRef(null),ge=k.useRef(null),Re=k.useRef(null),B=k.useRef(null),W=k.useRef(!1),de=k.useRef(null),be=k.useRef(0),T=k.useRef(!1),K=k.useRef(!O),U=k.useRef(0),$=k.useRef(null),Q=k.useRef(((_=$.current)==null?void 0:_.getBoundingClientRect().height)||0),j=k.useRef(((te=$.current)==null?void 0:te.getBoundingClientRect().width)||0),H=k.useRef(0),fe=k.useCallback(G=>{s&&G===Ce.length-1&&(q.current=new Date)},[]),{activeSnapPoint:ae,activeSnapPointIndex:oe,setActiveSnapPoint:M,onRelease:J,snapPointsOffset:Ce,onDrag:Te,shouldFade:Be,getPercentageDragged:pt}=Ap({snapPoints:s,activeSnapPointProp:g,setActiveSnapPointProp:h,drawerRef:$,fadeFromIndex:p,overlayRef:L,onSnapPointChange:fe,direction:b,container:Y,snapToSequentialPoint:w});xp({isDisabled:!F||ue||!v||C||!re||!I||!D});const{restorePositionSetting:Ot}=Lp({isOpen:F,modal:v,nested:S??!1,hasBeenOpened:re,preventScrollRestoration:E,noBodyStyles:R});function Se(){return(window.innerWidth-Sr)/window.innerWidth}function tt(G){var ie,ce;!d&&!s||$.current&&!$.current.contains(G.target)||(Q.current=((ie=$.current)==null?void 0:ie.getBoundingClientRect().height)||0,j.current=((ce=$.current)==null?void 0:ce.getBoundingClientRect().width)||0,xe(!0),ge.current=new Date,Qa()&&window.addEventListener("touchend",()=>W.current=!1,{once:!0}),G.target.setPointerCapture(G.pointerId),be.current=ve(b)?G.pageY:G.pageX)}function nt(G,ie){var ce;let ne=G;const me=(ce=window.getSelection())==null?void 0:ce.toString(),De=$.current?pn($.current,b):null,Oe=new Date;if(ne.tagName==="SELECT"||ne.hasAttribute("data-vaul-no-drag")||ne.closest("[data-vaul-no-drag]"))return!1;if(b==="right"||b==="left")return!0;if(q.current&&Oe.getTime()-q.current.getTime()<500)return!1;if(De!==null&&(b==="bottom"?De>0:De<0))return!0;if(me&&me.length>0)return!1;if(B.current&&Oe.getTime()-B.current.getTime()<l&&De===0||ie)return B.current=Oe,!1;for(;ne;){if(ne.scrollHeight>ne.clientHeight){if(ne.scrollTop!==0)return B.current=new Date,!1;if(ne.getAttribute("role")==="dialog")return!0}ne=ne.parentNode}return!0}function ci(G){if($.current&&ue){const ie=b==="bottom"||b==="right"?1:-1,ce=(be.current-(ve(b)?G.pageY:G.pageX))*ie,ne=ce>0,me=s&&!d&&!ne;if(me&&oe===0)return;const De=Math.abs(ce),Oe=document.querySelector("[data-vaul-drawer-wrapper]"),He=b==="bottom"||b==="top"?Q.current:j.current;let Ae=De/He;const rt=pt(De,ne);if(rt!==null&&(Ae=rt),me&&Ae>=1||!W.current&&!nt(G.target,ne))return;if($.current.classList.add(lr),W.current=!0,we($.current,{transition:"none"}),we(L.current,{transition:"none"}),s&&Te({draggedDistance:ce}),ne&&!s){const je=kp(ce),qt=Math.min(je*-1,0)*ie;we($.current,{transform:ve(b)?`translate3d(0, ${qt}px, 0)`:`translate3d(${qt}px, 0, 0)`});return}const Ge=1-Ae;if((Be||p&&oe===p-1)&&(r?.(G,Ae),we(L.current,{opacity:`${Ge}`,transition:"none"},!0)),Oe&&L.current&&a){const je=Math.min(Se()+Ae*(1-Se()),1),qt=8-Ae*8,Wr=Math.max(0,14-Ae*14);we(Oe,{borderRadius:`${qt}px`,transform:ve(b)?`scale(${je}) translate3d(0, ${Wr}px, 0)`:`scale(${je}) translate3d(${Wr}px, 0, 0)`,transition:"none"},!0)}if(!s){const je=De*ie;we($.current,{transform:ve(b)?`translate3d(0, ${je}px, 0)`:`translate3d(${je}px, 0, 0)`})}}}k.useEffect(()=>{window.requestAnimationFrame(()=>{K.current=!0})},[]),k.useEffect(()=>{var G;function ie(){if(!$.current||!I)return;const ce=document.activeElement;if(xr(ce)||T.current){var ne;const me=((ne=window.visualViewport)==null?void 0:ne.height)||0,De=window.innerHeight;let Oe=De-me;const He=$.current.getBoundingClientRect().height||0,Ae=He>De*.8;H.current||(H.current=He);const rt=$.current.getBoundingClientRect().top;if(Math.abs(U.current-Oe)>60&&(T.current=!T.current),s&&s.length>0&&Ce&&oe){const Ge=Ce[oe]||0;Oe+=Ge}if(U.current=Oe,He>me||T.current){const Ge=$.current.getBoundingClientRect().height;let je=Ge;Ge>me&&(je=me-(Ae?rt:Sr)),m?$.current.style.height=`${Ge-Math.max(Oe,0)}px`:$.current.style.height=`${Math.max(je,me-rt)}px`}else gp()||($.current.style.height=`${H.current}px`);s&&s.length>0&&!T.current?$.current.style.bottom="0px":$.current.style.bottom=`${Math.max(Oe,0)}px`}}return(G=window.visualViewport)==null||G.addEventListener("resize",ie),()=>{var ce;return(ce=window.visualViewport)==null?void 0:ce.removeEventListener("resize",ie)}},[oe,s,Ce]);function kt(G){ui(),y?.(),G||ee(!1),setTimeout(()=>{s&&M(s[0])},pe.DURATION*1e3)}function Br(){if(!$.current)return;const G=document.querySelector("[data-vaul-drawer-wrapper]"),ie=pn($.current,b);we($.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${pe.DURATION}s cubic-bezier(${pe.EASE.join(",")})`}),we(L.current,{transition:`opacity ${pe.DURATION}s cubic-bezier(${pe.EASE.join(",")})`,opacity:"1"}),a&&ie&&ie>0&&F&&we(G,{borderRadius:`${oi}px`,overflow:"hidden",...ve(b)?{transform:`scale(${Se()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Se()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${pe.DURATION}s`,transitionTimingFunction:`cubic-bezier(${pe.EASE.join(",")})`},!0)}function ui(){!ue||!$.current||($.current.classList.remove(lr),W.current=!1,xe(!1),Re.current=new Date)}function di(G){if(!ue||!$.current)return;$.current.classList.remove(lr),W.current=!1,xe(!1),Re.current=new Date;const ie=pn($.current,b);if(!G||!nt(G.target,!1)||!ie||Number.isNaN(ie)||ge.current===null)return;const ce=Re.current.getTime()-ge.current.getTime(),ne=be.current-(ve(b)?G.pageY:G.pageX),me=Math.abs(ne)/ce;if(me>.05&&(V(!0),setTimeout(()=>{V(!1)},200)),s){J({draggedDistance:ne*(b==="bottom"||b==="right"?1:-1),closeDrawer:kt,velocity:me,dismissible:d}),o?.(G,!0);return}if(b==="bottom"||b==="right"?ne>0:ne<0){Br(),o?.(G,!0);return}if(me>ri){kt(),o?.(G,!1);return}var De;const Oe=Math.min((De=$.current.getBoundingClientRect().height)!=null?De:0,window.innerHeight);var He;const Ae=Math.min((He=$.current.getBoundingClientRect().width)!=null?He:0,window.innerWidth),rt=b==="left"||b==="right";if(Math.abs(ie)>=(rt?Ae:Oe)*c){kt(),o?.(G,!1);return}o?.(G,!0),Br()}k.useEffect(()=>(F&&(we(document.documentElement,{scrollBehavior:"auto"}),q.current=new Date),()=>{Op(document.documentElement,"scrollBehavior")}),[F]);function fi(G){const ie=G?(window.innerWidth-st)/window.innerWidth:1,ce=G?-st:0;de.current&&window.clearTimeout(de.current),we($.current,{transition:`transform ${pe.DURATION}s cubic-bezier(${pe.EASE.join(",")})`,transform:ve(b)?`scale(${ie}) translate3d(0, ${ce}px, 0)`:`scale(${ie}) translate3d(${ce}px, 0, 0)`}),!G&&$.current&&(de.current=setTimeout(()=>{const ne=pn($.current,b);we($.current,{transition:"none",transform:ve(b)?`translate3d(0, ${ne}px, 0)`:`translate3d(${ne}px, 0, 0)`})},500))}function pi(G,ie){if(ie<0)return;const ce=(window.innerWidth-st)/window.innerWidth,ne=ce+ie*(1-ce),me=-st+ie*st;we($.current,{transform:ve(b)?`scale(${ne}) translate3d(0, ${me}px, 0)`:`scale(${ne}) translate3d(${me}px, 0, 0)`,transition:"none"})}function mi(G,ie){const ce=ve(b)?window.innerHeight:window.innerWidth,ne=ie?(ce-st)/ce:1,me=ie?-st:0;ie&&we($.current,{transition:`transform ${pe.DURATION}s cubic-bezier(${pe.EASE.join(",")})`,transform:ve(b)?`scale(${ne}) translate3d(0, ${me}px, 0)`:`scale(${ne}) translate3d(${me}px, 0, 0)`})}return k.useEffect(()=>{v||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[v]),k.createElement(ap,{defaultOpen:O,onOpenChange:G=>{!d&&!G||(G?N(!0):kt(!0),ee(G))},open:F},k.createElement(Ja.Provider,{value:{activeSnapPoint:ae,snapPoints:s,setActiveSnapPoint:M,drawerRef:$,overlayRef:L,onOpenChange:t,onPress:tt,onRelease:di,onDrag:ci,dismissible:d,shouldAnimate:K,handleOnly:f,isOpen:F,isDragging:ue,shouldFade:Be,closeDrawer:kt,onNestedDrag:pi,onNestedOpenChange:fi,onNestedRelease:mi,keyboardIsOpen:T,modal:v,snapPointsOffset:Ce,activeSnapPointIndex:oe,direction:b,shouldScaleBackground:a,setBackgroundColorOnScale:i,noBodyStyles:R,container:Y,autoFocus:Z}},n))}const ii=k.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:s,isOpen:a,modal:i,shouldAnimate:c}=Yt(),l=ti(t,n),d=r&&r.length>0;if(!i)return null;const f=k.useCallback(p=>o(p),[o]);return k.createElement(cp,{onMouseUp:f,ref:l,"data-vaul-overlay":"","data-vaul-snap-points":a&&d?"true":"false","data-vaul-snap-points-overlay":a&&s?"true":"false","data-vaul-animate":c?.current?"true":"false",...e})});ii.displayName="Drawer.Overlay";const li=k.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},o){const{drawerRef:s,onPress:a,onRelease:i,onDrag:c,keyboardIsOpen:l,snapPointsOffset:d,activeSnapPointIndex:f,modal:p,isOpen:g,direction:h,snapPoints:m,container:v,handleOnly:y,shouldAnimate:S,autoFocus:R}=Yt(),[b,O]=k.useState(!1),D=ti(o,s),w=k.useRef(null),E=k.useRef(null),I=k.useRef(!1),z=m&&m.length>0;Mp();const Y=(_,te,F=0)=>{if(I.current)return!0;const ee=Math.abs(_.y),re=Math.abs(_.x),N=re>ee,ue=["bottom","right"].includes(te)?1:-1;if(te==="left"||te==="right"){if(!(_.x*ue<0)&&re>=0&&re<=F)return N}else if(!(_.y*ue<0)&&ee>=0&&ee<=F)return!N;return I.current=!0,!0};k.useEffect(()=>{z&&window.requestAnimationFrame(()=>{O(!0)})},[]);function Z(_){w.current=null,I.current=!1,i(_)}return k.createElement(up,{"data-vaul-drawer-direction":h,"data-vaul-drawer":"","data-vaul-delayed-snap-points":b?"true":"false","data-vaul-snap-points":g&&z?"true":"false","data-vaul-custom-container":v?"true":"false","data-vaul-animate":S?.current?"true":"false",...r,ref:D,style:d&&d.length>0?{"--snap-point-height":`${d[f??0]}px`,...t}:t,onPointerDown:_=>{y||(r.onPointerDown==null||r.onPointerDown.call(r,_),w.current={x:_.pageX,y:_.pageY},a(_))},onOpenAutoFocus:_=>{n?.(_),R||_.preventDefault()},onPointerDownOutside:_=>{if(e?.(_),!p||_.defaultPrevented){_.preventDefault();return}l.current&&(l.current=!1)},onFocusOutside:_=>{if(!p){_.preventDefault();return}},onPointerMove:_=>{if(E.current=_,y||(r.onPointerMove==null||r.onPointerMove.call(r,_),!w.current))return;const te=_.pageY-w.current.y,F=_.pageX-w.current.x,ee=_.pointerType==="touch"?10:2;Y({x:F,y:te},h,ee)?c(_):(Math.abs(F)>ee||Math.abs(te)>ee)&&(w.current=null)},onPointerUp:_=>{r.onPointerUp==null||r.onPointerUp.call(r,_),w.current=null,I.current=!1,i(_)},onPointerOut:_=>{r.onPointerOut==null||r.onPointerOut.call(r,_),Z(E.current)},onContextMenu:_=>{r.onContextMenu==null||r.onContextMenu.call(r,_),E.current&&Z(E.current)}})});li.displayName="Drawer.Content";const Fp=250,$p=120,Vp=k.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:o,isDragging:s,snapPoints:a,activeSnapPoint:i,setActiveSnapPoint:c,dismissible:l,handleOnly:d,isOpen:f,onPress:p,onDrag:g}=Yt(),h=k.useRef(null),m=k.useRef(!1);function v(){if(m.current){R();return}window.setTimeout(()=>{y()},$p)}function y(){if(s||e||m.current){R();return}if(R(),!a||a.length===0){l||o();return}if(i===a[a.length-1]&&l){o();return}const O=a.findIndex(w=>w===i);if(O===-1)return;const D=a[O+1];c(D)}function S(){h.current=window.setTimeout(()=>{m.current=!0},Fp)}function R(){h.current&&window.clearTimeout(h.current),m.current=!1}return k.createElement("div",{onClick:v,onPointerCancel:R,onPointerDown:b=>{d&&p(b),S()},onPointerMove:b=>{d&&g(b)},ref:r,"data-vaul-drawer-visible":f?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},k.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});Vp.displayName="Drawer.Handle";function Bp(e){const t=Yt(),{container:n=t.container,...r}=e;return k.createElement(lp,{container:n,...r})}const et={Root:jp,Content:li,Overlay:ii,Trigger:ip,Portal:Bp,Close:pp,Title:dp,Description:fp};function Wp({...e}){return x.jsx(et.Root,{"data-slot":"drawer",...e})}function zp({...e}){return x.jsx(et.Trigger,{"data-slot":"drawer-trigger",...e})}function Up({...e}){return x.jsx(et.Portal,{"data-slot":"drawer-portal",...e})}function Hp({...e}){return x.jsx(et.Close,{"data-slot":"drawer-close",...e})}function Gp({className:e,...t}){return x.jsx(et.Overlay,{"data-slot":"drawer-overlay",className:ke("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 z-50",e),...t})}function Yp({className:e,children:t,...n}){return x.jsxs(Up,{"data-slot":"drawer-portal",children:[x.jsx(Gp,{}),x.jsxs(et.Content,{"data-slot":"drawer-content",className:ke("bg-background flex h-auto flex-col text-sm data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-xl data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:rounded-r-xl data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:rounded-l-xl data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-xl data-[vaul-drawer-direction=top]:border-b data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm group/drawer-content fixed z-50",e),...n,children:[x.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-1 w-25 shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),t]})]})}function qp({className:e,...t}){return x.jsx("div",{"data-slot":"drawer-header",className:ke("gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-0.5 md:text-left flex flex-col",e),...t})}function Kp({className:e,...t}){return x.jsx("div",{"data-slot":"drawer-footer",className:ke("gap-2 p-4 mt-auto flex flex-col",e),...t})}function Xp({className:e,...t}){return x.jsx(et.Title,{"data-slot":"drawer-title",className:ke("text-foreground text-base font-medium",e),...t})}function Zp({className:e,...t}){return x.jsx(et.Description,{"data-slot":"drawer-description",className:ke("text-muted-foreground text-sm",e),...t})}function Jp({open:e,setOpen:t,loading:n,setLoading:r,isFullScreen:o,setIsFullScreen:s,triggerProperties:{label:a,component:i=void 0},title:c}){return k.useEffect(()=>{setTimeout(()=>{r(!1)},5e3)},[r]),x.jsxs(Wp,{open:e,onOpenChange:t,modal:!0,direction:"bottom",handleOnly:!0,children:[x.jsx(zp,{asChild:!0,children:i||x.jsx(ct,{variant:"default",children:a})}),x.jsxs(Yp,{className:`shadow-2xl shadow-foreground ${o?On.styles.drawer.expanded:On.styles.drawer.compacted}`,children:[x.jsxs(qp,{className:"text-left",children:[x.jsx(Xp,{children:c}),x.jsx(Zp,{children:x.jsx(ct,{variant:"outline",size:"icon-sm",className:"rounded-lg",onClick:()=>s(l=>!l),children:o?x.jsx(ha,{}):x.jsx(ga,{})})})]}),n?x.jsx("div",{className:"w-full h-full flex flex-col items-center justify-center",children:x.jsx(va,{})}):x.jsx(ba,{}),x.jsx(Kp,{className:"pt-2",children:x.jsx(Hp,{asChild:!0,children:x.jsx(ct,{variant:"default",children:"Cancel"})})})]})]})}function Qp({triggerProperties:e,title:t,fullscreen:n="none"}){const[r,o]=u.useState(!1),s=bi(),[a,i]=u.useState(!0),[c,l]=u.useState(n==="all"||n==="mobile-only"&&s||n==="desktop-only"&&!s);return s?x.jsx(Jp,{open:r,setOpen:o,loading:a,setLoading:i,isFullScreen:c,setIsFullScreen:l,title:t,triggerProperties:e},"with-drawer"):x.jsx(Od,{open:r,setOpen:o,loading:a,setLoading:i,isFullScreen:c,setIsFullScreen:l,title:t,triggerProperties:e},"with-dialog")}exports.AarthikShell=Qp;