loomrail 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apps/cli/dist/index.js +2664 -783
- package/apps/cli/migrations/0062_agent_run_activity.sql +36 -0
- package/apps/web/dist/assets/{index-Ev7mo9dU.css → index-DItZd8Bz.css} +1 -1
- package/apps/web/dist/assets/index-DbAOELar.js +13 -0
- package/apps/web/dist/assets/index-DbAOELar.js.map +1 -0
- package/apps/web/dist/assets/{radix-vendor-CRdHXIPR.js → radix-vendor-CC__Vkax.js} +2 -2
- package/apps/web/dist/assets/radix-vendor-CC__Vkax.js.map +1 -0
- package/apps/web/dist/assets/react-vendor-D3MgmOsQ.js +10 -0
- package/apps/web/dist/assets/react-vendor-D3MgmOsQ.js.map +1 -0
- package/apps/web/dist/assets/tanstack-vendor-DT_E_B5V.js +3 -0
- package/apps/web/dist/assets/tanstack-vendor-DT_E_B5V.js.map +1 -0
- package/apps/web/dist/index.html +5 -5
- package/package.json +1 -1
- package/apps/web/dist/assets/index-DnefyhG4.js +0 -13
- package/apps/web/dist/assets/index-DnefyhG4.js.map +0 -1
- package/apps/web/dist/assets/radix-vendor-CRdHXIPR.js.map +0 -1
- package/apps/web/dist/assets/react-vendor-BicOiEU0.js +0 -10
- package/apps/web/dist/assets/react-vendor-BicOiEU0.js.map +0 -1
- package/apps/web/dist/assets/tanstack-vendor-Do8jh46X.js +0 -2
- package/apps/web/dist/assets/tanstack-vendor-Do8jh46X.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{i as t,r as n,t as r}from"./react-vendor-BicOiEU0.js";var i=e(t(),1),a=Object.defineProperty,o=(e,t)=>a(e,`name`,{value:t,configurable:!0});function s(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}o(s,`setRef`);function c(...e){return t=>{let n=!1,r=e.map(e=>{let r=s(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():s(e[t],null)}}}}o(c,`composeRefs`);function l(...e){return i.useCallback(c(...e),e)}o(l,`useComposedRefs`);var u=e(n(),1),d=r(),f=Object.defineProperty,p=(e,t)=>f(e,`name`,{value:t,configurable:!0});function m(e){let t=i.forwardRef((t,n)=>{let{children:r,...a}=t,o=null,s=!1,c=[];S(r)&&typeof E==`function`&&(r=E(r._payload)),i.Children.forEach(r,e=>{if(b(e)){s=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;S(n)&&typeof E==`function`&&(n=E(n._payload)),o=_(t,n),c.push(o?.props?.children)}else c.push(e)}),o?o=i.cloneElement(o,void 0,c):!s&&i.Children.count(r)===1&&i.isValidElement(r)&&(o=r);let u=o?y(o):void 0,d=l(n,u);if(!o){if(r||r===0)throw Error(s?T(e):w(e));return r}let f=v(a,o.props??{});return o.type!==i.Fragment&&(f.ref=n?d:u),i.cloneElement(o,f)});return t.displayName=`${e}.Slot`,t}p(m,`createSlot`);var h=Symbol.for(`radix.slottable`);function g(e){let t=p(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=h,t}p(g,`createSlottable`);var _=p((e,t)=>{if(`child`in e.props){let t=e.props.child;return i.isValidElement(t)?i.cloneElement(t,void 0,e.props.children(t.props.children)):null}return i.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function v(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}p(v,`mergeProps`);function y(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)}p(y,`getElementRef`);function b(e){return i.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===h}p(b,`isSlottable`);var x=Symbol.for(`react.lazy`);function S(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===x&&`_payload`in e&&C(e._payload)}p(S,`isLazyComponent`);function C(e){return typeof e==`object`&&!!e&&`then`in e}p(C,`isPromiseLike`);var w=p(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),T=p(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),E=i.use,D=Object.defineProperty,O=(e,t)=>D(e,`name`,{value:t,configurable:!0}),k=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=m(`Primitive.${t}`),r=i.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,d.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function A(e,t){e&&u.flushSync(()=>e.dispatchEvent(t))}O(A,`dispatchDiscreteCustomEvent`);var j=Object.defineProperty,M=(e,t)=>j(e,`name`,{value:t,configurable:!0}),N=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),P=i.forwardRef(M(function(e,t){return(0,d.jsx)(k.span,{...e,ref:t,style:{...N,...e.style}})},`VisuallyHidden`)),ee=Object.defineProperty,F=(e,t)=>ee(e,`name`,{value:t,configurable:!0});function I(e,t){let n=i.createContext(t);n.displayName=e+`Context`;let r=F(e=>{let{children:t,...r}=e,a=i.useMemo(()=>r,Object.values(r));return(0,d.jsx)(n.Provider,{value:a,children:t})},`Provider`);r.displayName=e+`Provider`;function a(r,a={}){let{optional:o=!1}=a,s=i.useContext(n);if(s)return s;if(t!==void 0)return t;if(!o)throw Error(`\`${r}\` must be used within \`${e}\``)}return F(a,`useContext`),[r,a]}F(I,`createContext`);function L(e,t=[]){let n=[];function r(t,r){let a=i.createContext(r);a.displayName=t+`Context`;let o=n.length;n=[...n,r];let s=F(t=>{let{scope:n,children:r,...s}=t,c=n?.[e]?.[o]||a,l=i.useMemo(()=>s,Object.values(s));return(0,d.jsx)(c.Provider,{value:l,children:r})},`Provider`);s.displayName=t+`Provider`;function c(n,s,c={}){let{optional:l=!1}=c,u=s?.[e]?.[o]||a,d=i.useContext(u);if(d)return d;if(r!==void 0)return r;if(!l)throw Error(`\`${n}\` must be used within \`${t}\``)}return F(c,`useContext`),[s,c]}F(r,`createContext`);let a=F(()=>{let t=n.map(e=>i.createContext(e));return F(function(n){let r=n?.[e]||t;return i.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return a.scopeName=e,[r,te(a,...t)]}F(L,`createContextScope`);function te(...e){let t=e[0];if(e.length===1)return t;let n=F(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return F(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}F(te,`composeContextScopes`);var ne=Object.defineProperty,R=(e,t)=>ne(e,`name`,{value:t,configurable:!0});function re(e){let t=e+`CollectionProvider`,[n,r]=L(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=R(e=>{let{scope:t,children:n}=e,r=i.useRef(null),o=i.useRef(new Map).current;return(0,d.jsx)(a,{scope:t,itemMap:o,collectionRef:r,children:n})},`CollectionProvider`);s.displayName=t;let c=e+`CollectionSlot`,u=m(c),f=i.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=l(t,o(c,n).collectionRef);return(0,d.jsx)(u,{ref:i,children:r})});f.displayName=c;let p=e+`CollectionItemSlot`,h=`data-radix-collection-item`,g=m(p),_=i.forwardRef((e,t)=>{let{scope:n,children:r,...a}=e,s=i.useRef(null),c=l(t,s),u=o(p,n);return i.useEffect(()=>(u.itemMap.set(s,{ref:s,...a}),()=>void u.itemMap.delete(s))),(0,d.jsx)(g,{[h]:``,ref:c,children:r})});_.displayName=p;function v(t){let n=o(e+`CollectionConsumer`,t);return i.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${h}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return R(v,`useCollection`),[{Provider:s,Slot:f,ItemSlot:_},v,r]}R(re,`createCollection`);var ie=new WeakMap,ae=class e extends Map{static{R(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],ie.set(this,!0)}set(e,t){return ie.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=ce(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=oe(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=oe(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return oe(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function oe(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=se(e,t);return n===-1?void 0:e[n]}R(oe,`at`);function se(e,t){let n=e.length,r=ce(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}R(se,`toSafeIndex`);function ce(e){return e!==e||e===0?0:Math.trunc(e)}R(ce,`toSafeInteger`);function le(e){let t=e+`CollectionProvider`,[n,r]=L(t),[a,o]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new ae,setItemMap:R(()=>void 0,`setItemMap`)}),s=R(({state:e,...t})=>e?(0,d.jsx)(u,{...t,state:e}):(0,d.jsx)(c,{...t}),`CollectionProvider`);s.displayName=t;let c=R(e=>{let t=y();return(0,d.jsx)(u,{...e,state:t})},`CollectionInit`);c.displayName=t+`Init`;let u=R(e=>{let{scope:t,children:n,state:r}=e,o=i.useRef(null),[s,c]=i.useState(null),u=l(o,c),[f,p]=r;return i.useEffect(()=>{if(!s)return;let e=pe(()=>{});return e.observe(s,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[s]),(0,d.jsx)(a,{scope:t,itemMap:f,setItemMap:p,collectionRef:u,collectionRefObject:o,collectionElement:s,children:n})},`CollectionProviderImpl`);u.displayName=t+`Impl`;let f=e+`CollectionSlot`,p=m(f),h=i.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=l(t,o(f,n).collectionRef);return(0,d.jsx)(p,{ref:i,children:r})});h.displayName=f;let g=e+`CollectionItemSlot`,_=m(g),v=i.forwardRef((e,t)=>{let{scope:n,children:r,...a}=e,s=i.useRef(null),[c,u]=i.useState(null),f=l(t,s,u),{setItemMap:p}=o(g,n),m=i.useRef(a);ue(m.current,a)||(m.current=a);let h=m.current;return i.useEffect(()=>{let e=h;return p(t=>c?t.has(c)?t.set(c,{...e,element:c}).toSorted(fe):(t.set(c,{...e,element:c}),t.toSorted(fe)):t),()=>{p(e=>!c||!e.has(c)?e:(e.delete(c),new ae(e)))}},[c,h,p]),(0,d.jsx)(_,{"data-radix-collection-item":``,ref:f,children:r})});v.displayName=g;function y(){return i.useState(new ae)}R(y,`useInitCollection`);function b(t){let{itemMap:n}=o(e+`CollectionConsumer`,t);return n}return R(b,`useCollection`),[{Provider:s,Slot:h,ItemSlot:v},{createCollectionScope:r,useCollection:b,useInitCollection:y}]}R(le,`createCollection`);function ue(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}R(ue,`shallowEqual`);function de(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}R(de,`isElementPreceding`);function fe(e,t){return!e[1].element||!t[1].element?0:de(e[1].element,t[1].element)?-1:1}R(fe,`sortByDocumentPosition`);function pe(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}R(pe,`getChildListObserver`);var me=Object.defineProperty,he=(e,t)=>me(e,`name`,{value:t,configurable:!0}),ge=!!(typeof window<`u`&&window.document&&window.document.createElement);function z(e,t,{checkForDefaultPrevented:n=!0}={}){return he(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}he(z,`composeEventHandlers`);function _e(e){if(!ge)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}he(_e,`getOwnerWindow`);function ve(e){if(!ge)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}he(ve,`getOwnerDocument`);function ye(e,t=!1){let{activeElement:n}=ve(e);if(!n?.nodeName)return null;if(be(n)&&n.contentDocument)return ye(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=ve(n).getElementById(e);if(t)return t}}return n}he(ye,`getActiveElement`);function be(e){return e.tagName===`IFRAME`}he(be,`isFrame`);var B=globalThis?.document?i.useLayoutEffect:()=>{},xe=Object.defineProperty,Se=(e,t)=>xe(e,`name`,{value:t,configurable:!0}),Ce=i.useEffectEvent,we=i.useInsertionEffect;function Te(e){if(typeof Ce==`function`)return Ce(e);let t=i.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof we==`function`?we(()=>{t.current=e}):B(()=>{t.current=e}),i.useMemo(()=>((...e)=>t.current?.(...e)),[])}Se(Te,`useEffectEvent`);var Ee=Object.defineProperty,De=(e,t)=>Ee(e,`name`,{value:t,configurable:!0}),Oe=i.useInsertionEffect||B;function ke({prop:e,defaultProp:t,onChange:n=De(()=>{},`onChange`),caller:r}){let[a,o,s]=Ae({defaultProp:t,onChange:n}),c=e!==void 0;return[c?e:a,i.useCallback(t=>{if(c){let n=je(t)?t(e):t;n!==e&&s.current?.(n)}else o(t)},[c,e,o,s])]}De(ke,`useControllableState`);function Ae({defaultProp:e,onChange:t}){let[n,r]=i.useState(e),a=i.useRef(n),o=i.useRef(t);return Oe(()=>{o.current=t},[t]),i.useEffect(()=>{a.current!==n&&(o.current?.(n),a.current=n)},[n,a]),[n,r,o]}De(Ae,`useUncontrolledState`);function je(e){return typeof e==`function`}De(je,`isFunction`);var Me=Symbol(`RADIX:SYNC_STATE`);function Ne(e,t,n,r){let{prop:a,defaultProp:o,onChange:s,caller:c}=t,l=a!==void 0,u=Te(s),d=[{...n,state:o}];r&&d.push(r);let[f,p]=i.useReducer((t,n)=>{if(n.type===Me)return{...t,state:n.state};let r=e(t,n);return l&&!Object.is(r.state,t.state)&&u(r.state),r},...d),m=f.state,h=i.useRef(m);i.useEffect(()=>{h.current!==m&&(h.current=m,l||u(m))},[m,h,l]);let g=i.useMemo(()=>a===void 0?f:{...f,state:a},[f,a]);return i.useEffect(()=>{l&&!Object.is(a,f.state)&&p({type:Me,state:a})},[a,f.state,l]),[g,p]}De(Ne,`useControllableStateReducer`);var Pe=Object.defineProperty,Fe=(e,t)=>Pe(e,`name`,{value:t,configurable:!0});function Ie(e,t){return i.useReducer((e,n)=>t[e][n]??e,e)}Fe(Ie,`useStateMachine`);var V=Fe(e=>{let{present:t,children:n}=e,r=Le(t),a=typeof n==`function`?n({present:r.isPresent}):i.Children.only(n),o=ze(r.ref,Ve(a));return typeof n==`function`||r.isPresent?i.cloneElement(a,{ref:o}):null},`Presence`);function Le(e){let[t,n]=i.useState(),r=i.useRef(null),a=i.useRef(e),o=i.useRef(`none`),s=i.useRef(void 0),[c,l]=Ie(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return i.useEffect(()=>{c===`mounted`?(o.current=s.current??Be(r.current),s.current=void 0):o.current=`none`},[c]),B(()=>{let t=r.current,n=a.current;if(n!==e){let r=o.current,i=Be(t);e?(s.current=i,l(`MOUNT`)):i===`none`||t?.display===`none`?l(`UNMOUNT`):l(n&&r!==i?`ANIMATION_OUT`:`UNMOUNT`),a.current=e}},[e,l]),B(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,i=Fe(i=>{let o=Be(r.current).includes(CSS.escape(i.animationName));if(i.target===t&&o&&(l(`ANIMATION_END`),!a.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=Fe(e=>{e.target===t&&(o.current=Be(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,i),t.addEventListener(`animationend`,i),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,i),t.removeEventListener(`animationend`,i)}}l(`ANIMATION_END`)},[t,l]),{isPresent:[`mounted`,`unmountSuspended`].includes(c),ref:i.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,s.current=Be(t)}else r.current=null;n(e)},[])}}Fe(Le,`usePresence`);function Re(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Fe(Re,`setRef`);function ze(...e){let t=i.useRef(e);return t.current=e,i.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Re(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():Re(n[e],null)}}},[])}Fe(ze,`useStableComposedRefs`);function Be(e){return e?.animationName||`none`}Fe(Be,`getAnimationName`);function Ve(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)}Fe(Ve,`getElementRef`);var He=Object.defineProperty,Ue=(e,t)=>He(e,`name`,{value:t,configurable:!0}),We=i.useId||(()=>void 0),Ge=0;function H(e){let[t,n]=i.useState(We());return B(()=>{e||n(e=>e??String(Ge++))},[e]),e||(t?`radix-${t}`:``)}Ue(H,`useId`);var Ke=Object.defineProperty,qe=(e,t)=>Ke(e,`name`,{value:t,configurable:!0}),Je=i.createContext(void 0);function Ye(e){let t=i.useContext(Je);return e||t||`ltr`}qe(Ye,`useDirection`);var Xe=Object.defineProperty,Ze=(e,t)=>Xe(e,`name`,{value:t,configurable:!0});function U(e){let t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>((...e)=>t.current?.(...e)),[])}Ze(U,`useCallbackRef`);var Qe=Object.defineProperty,W=(e,t)=>Qe(e,`name`,{value:t,configurable:!0}),$e=`dismissableLayer.update`,et=`dismissableLayer.pointerDownOutside`,tt=`dismissableLayer.focusOutside`,nt,rt=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),it=i.forwardRef(W(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:c,onDismiss:u,...f}=e,p=i.useContext(rt),[m,h]=i.useState(null),g=m?.ownerDocument??globalThis?.document,[,_]=i.useState({}),v=l(t,h),y=Array.from(p.layers),[b]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),x=b?y.indexOf(b):-1,S=m?y.indexOf(m):-1,C=p.layersWithOutsidePointerEventsDisabled.size>0,w=S>=x,T=i.useRef(!1),E=st(e=>{o?.(e),c?.(e),e.defaultPrevented||u?.()},{ownerDocument:g,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:T,dismissableSurfaces:p.dismissableSurfaces,shouldHandlePointerDownOutside:i.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...p.branches].some(t=>t.contains(e));return w&&!t},[p.branches,w])}),D=ct(e=>{if(r&&T.current)return;let t=e.target;[...p.branches].some(e=>e.contains(t))||(s?.(e),c?.(e),e.defaultPrevented||u?.())},g),O=m?S===y.length-1:!1,A=U(e=>{e.key===`Escape`&&(a?.(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))});return i.useEffect(()=>{if(O)return g.addEventListener(`keydown`,A,{capture:!0}),()=>g.removeEventListener(`keydown`,A,{capture:!0})},[g,O,A]),i.useEffect(()=>{if(m)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(nt=g.body.style.pointerEvents,g.body.style.pointerEvents=`none`),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),lt(),()=>{n&&(p.layersWithOutsidePointerEventsDisabled.delete(m),p.layersWithOutsidePointerEventsDisabled.size===0&&(g.body.style.pointerEvents=nt))}},[m,g,n,p]),i.useEffect(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),lt())},[m,p]),i.useEffect(()=>{let e=W(()=>_({}),`handleUpdate`);return document.addEventListener($e,e),()=>document.removeEventListener($e,e)},[]),(0,d.jsx)(k.div,{...f,ref:v,style:{pointerEvents:C?w?`auto`:`none`:void 0,...e.style},onFocusCapture:z(e.onFocusCapture,D.onFocusCapture),onBlurCapture:z(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:z(e.onPointerDownCapture,E.onPointerDownCapture)})},`DismissableLayer`));function at(){let e=i.useContext(rt),[t,n]=i.useState(null);return i.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}W(at,`useDismissableLayerSurface`);var ot=W(()=>!0,`IS_TRUE`);function st(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:o,shouldHandlePointerDownOutside:s=ot}=t,c=U(e),l=i.useRef(!1),u=i.useRef(!1),d=i.useRef(new Map),f=i.useRef(()=>{});return i.useEffect(()=>{function e(){u.current=!1,a.current=!1,d.current.clear()}W(e,`resetOutsideInteraction`);function t(){return Array.from(d.current.values()).some(Boolean)}W(t,`isOutsideInteractionIntercepted`);function i(e){if(!u.current)return;let t=e.target;t instanceof Node&&[...o].some(e=>e.contains(t))||d.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{u.current&&f.current()},0)}W(i,`handleInteractionCapture`);function p(e){u.current&&d.current.set(e.type,!1)}W(p,`handleInteractionBubble`);let m=W(i=>{if(i.target&&!l.current){let o=function(){n.removeEventListener(`click`,f.current);let r=t();e(),r||ut(et,c,p,{discrete:!0})};if(W(o,`handleAndDispatchPointerDownOutsideEvent`),!s(i.target)){n.removeEventListener(`click`,f.current),e(),l.current=!1;return}let p={originalEvent:i};u.current=!0,a.current=r&&i.button===0,d.current.clear(),!r||i.button!==0?o():(n.removeEventListener(`click`,f.current),f.current=o,n.addEventListener(`click`,f.current,{once:!0}))}else n.removeEventListener(`click`,f.current),e();l.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,i,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,f.current);for(let e of h)n.removeEventListener(e,i,!0),n.removeEventListener(e,p)}},[n,c,r,a,o,s]),{onPointerDownCapture:W(()=>l.current=!0,`onPointerDownCapture`)}}W(st,`usePointerDownOutside`);function ct(e,t=globalThis?.document){let n=U(e),r=i.useRef(!1);return i.useEffect(()=>{let e=W(e=>{e.target&&!r.current&&ut(tt,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:W(()=>r.current=!0,`onFocusCapture`),onBlurCapture:W(()=>r.current=!1,`onBlurCapture`)}}W(ct,`useFocusOutside`);function lt(){let e=new CustomEvent($e);document.dispatchEvent(e)}W(lt,`dispatchUpdate`);function ut(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?A(i,a):i.dispatchEvent(a)}W(ut,`handleAndDispatchCustomEvent`);var dt=Object.defineProperty,G=(e,t)=>dt(e,`name`,{value:t,configurable:!0}),ft=`focusScope.autoFocusOnMount`,pt=`focusScope.autoFocusOnUnmount`,mt={bubbles:!1,cancelable:!0},ht=i.forwardRef(G(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...s}=e,[c,u]=i.useState(null),f=U(a),p=U(o),m=i.useRef(null),h=l(t,u),g=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(r){let e=function(e){if(g.paused||!c)return;let t=e.target;c.contains(t)?m.current=t:St(m.current,{select:!0})},t=function(e){if(g.paused||!c)return;let t=e.relatedTarget;t!==null&&(c.contains(t)||St(m.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&St(c)};G(e,`handleFocusIn`),G(t,`handleFocusOut`),G(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,c,g.paused]),i.useEffect(()=>{if(c){Ct.add(g);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(ft,mt);c.addEventListener(ft,f),c.dispatchEvent(t),t.defaultPrevented||(gt(Et(vt(c)),{select:!0}),document.activeElement===e&&St(c))}return()=>{c.removeEventListener(ft,f),setTimeout(()=>{let t=new CustomEvent(pt,mt);c.addEventListener(pt,p),c.dispatchEvent(t),t.defaultPrevented||St(e??document.body,{select:!0}),c.removeEventListener(pt,p),Ct.remove(g)},0)}}},[c,f,p,g]);let _=i.useCallback(e=>{if(!n&&!r||g.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=_t(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&St(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&St(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,g.paused]);return(0,d.jsx)(k.div,{tabIndex:-1,...s,ref:h,onKeyDown:_})},`FocusScope`));function gt(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(St(r,{select:t}),document.activeElement!==n)return}G(gt,`focusFirst`);function _t(e){let t=vt(e);return[yt(t,e),yt(t.reverse(),e)]}G(_t,`getTabbableEdges`);function vt(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:G(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}G(vt,`getTabbableCandidates`);function yt(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):bt(r,{upTo:t})))return r}G(yt,`findVisible`);function bt(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}G(bt,`isHidden`);function xt(e){return e instanceof HTMLInputElement&&`select`in e}G(xt,`isSelectableInput`);function St(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&xt(e)&&t&&e.select()}}G(St,`focus`);var Ct=wt();function wt(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Tt(e,t),e.unshift(t)},remove(t){e=Tt(e,t),e[0]?.resume()}}}G(wt,`createFocusScopesStack`);function Tt(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}G(Tt,`arrayRemove`);function Et(e){return e.filter(e=>e.tagName!==`A`)}G(Et,`removeLinks`);var Dt=Object.defineProperty,Ot=i.forwardRef(((e,t)=>Dt(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[a,o]=i.useState(!1);B(()=>o(!0),[]);let s=n||a&&globalThis?.document?.body;return s?u.createPortal((0,d.jsx)(k.div,{...r,ref:t}),s):null},`Portal`)),kt=Object.defineProperty,At=(e,t)=>kt(e,`name`,{value:t,configurable:!0}),jt=0,Mt=null;function Nt(e){return Pt(),e.children}At(Nt,`FocusGuards`);function Pt(){i.useEffect(()=>{Mt||={start:Ft(),end:Ft()};let{start:e,end:t}=Mt;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),jt++,()=>{jt===1&&(Mt?.start.remove(),Mt?.end.remove(),Mt=null),jt=Math.max(0,jt-1)}},[])}At(Pt,`useFocusGuards`);function Ft(){let 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}At(Ft,`createFocusGuard`);var It=function(){return It=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},It.apply(this,arguments)};function Lt(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Rt(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var zt=`right-scroll-bar-position`,Bt=`width-before-scroll-bar`,Vt=`with-scroll-bars-hidden`,Ht=`--removed-body-scroll-bar-size`;function Ut(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Wt(e,t){var n=(0,i.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Gt=typeof window<`u`?i.useLayoutEffect:i.useEffect,Kt=new WeakMap;function qt(e,t){var n=Wt(t||null,function(t){return e.forEach(function(e){return Ut(e,t)})});return Gt(function(){var t=Kt.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Ut(e,null)}),i.forEach(function(e){r.has(e)||Ut(e,a)})}Kt.set(n,e)},[e]),n}function Jt(e){return e}function Yt(e,t){t===void 0&&(t=Jt);var n=[],r=!1;return{read:function(){if(r)throw 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(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Xt(e){e===void 0&&(e={});var t=Yt(null);return t.options=It({async:!0,ssr:!1},e),t}var Zt=function(e){var t=e.sideCar,n=Lt(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return i.createElement(r,It({},n))};Zt.isSideCarExport=!0;function Qt(e,t){return e.useMedium(t),Zt}var $t=Xt(),en=function(){},tn=i.forwardRef(function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:en,onWheelCapture:en,onTouchMoveCapture:en}),a=r[0],o=r[1],s=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=Lt(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=qt([n,t]),w=It(It({},x),a);return i.createElement(i.Fragment,null,d&&i.createElement(S,{sideCar:$t,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:o,allowPinchZoom:!!_,lockRef:n,gapMode:b}),s?i.cloneElement(i.Children.only(c),It(It({},w),{ref:C})):i.createElement(y,It({},w,{className:l,ref:C}),c))});tn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},tn.classNames={fullWidth:Bt,zeroRight:zt};var nn=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function rn(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=nn();return t&&e.setAttribute(`nonce`,t),e}function an(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function on(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var sn=function(){var e=0,t=null;return{add:function(n){e==0&&(t=rn())&&(an(t,n),on(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},cn=function(){var e=sn();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ln=function(){var e=cn();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},un={left:0,top:0,right:0,gap:0},dn=function(e){return parseInt(e||``,10)||0},fn=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[dn(n),dn(r),dn(i)]},pn=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return un;var t=fn(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])}},mn=ln(),hn=`data-scroll-locked`,gn=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
1
|
+
import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{i as t,r as n,t as r}from"./react-vendor-D3MgmOsQ.js";var i=e(t(),1),a=Object.defineProperty,o=(e,t)=>a(e,`name`,{value:t,configurable:!0});function s(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}o(s,`setRef`);function c(...e){return t=>{let n=!1,r=e.map(e=>{let r=s(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():s(e[t],null)}}}}o(c,`composeRefs`);function l(...e){return i.useCallback(c(...e),e)}o(l,`useComposedRefs`);var u=e(n(),1),d=r(),f=Object.defineProperty,p=(e,t)=>f(e,`name`,{value:t,configurable:!0});function m(e){let t=i.forwardRef((t,n)=>{let{children:r,...a}=t,o=null,s=!1,c=[];S(r)&&typeof E==`function`&&(r=E(r._payload)),i.Children.forEach(r,e=>{if(b(e)){s=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;S(n)&&typeof E==`function`&&(n=E(n._payload)),o=_(t,n),c.push(o?.props?.children)}else c.push(e)}),o?o=i.cloneElement(o,void 0,c):!s&&i.Children.count(r)===1&&i.isValidElement(r)&&(o=r);let u=o?y(o):void 0,d=l(n,u);if(!o){if(r||r===0)throw Error(s?T(e):w(e));return r}let f=v(a,o.props??{});return o.type!==i.Fragment&&(f.ref=n?d:u),i.cloneElement(o,f)});return t.displayName=`${e}.Slot`,t}p(m,`createSlot`);var h=Symbol.for(`radix.slottable`);function g(e){let t=p(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=h,t}p(g,`createSlottable`);var _=p((e,t)=>{if(`child`in e.props){let t=e.props.child;return i.isValidElement(t)?i.cloneElement(t,void 0,e.props.children(t.props.children)):null}return i.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function v(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}p(v,`mergeProps`);function y(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)}p(y,`getElementRef`);function b(e){return i.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===h}p(b,`isSlottable`);var x=Symbol.for(`react.lazy`);function S(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===x&&`_payload`in e&&C(e._payload)}p(S,`isLazyComponent`);function C(e){return typeof e==`object`&&!!e&&`then`in e}p(C,`isPromiseLike`);var w=p(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),T=p(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),E=i.use,D=Object.defineProperty,O=(e,t)=>D(e,`name`,{value:t,configurable:!0}),k=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=m(`Primitive.${t}`),r=i.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,d.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function A(e,t){e&&u.flushSync(()=>e.dispatchEvent(t))}O(A,`dispatchDiscreteCustomEvent`);var j=Object.defineProperty,M=(e,t)=>j(e,`name`,{value:t,configurable:!0}),N=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),P=i.forwardRef(M(function(e,t){return(0,d.jsx)(k.span,{...e,ref:t,style:{...N,...e.style}})},`VisuallyHidden`)),ee=Object.defineProperty,F=(e,t)=>ee(e,`name`,{value:t,configurable:!0});function I(e,t){let n=i.createContext(t);n.displayName=e+`Context`;let r=F(e=>{let{children:t,...r}=e,a=i.useMemo(()=>r,Object.values(r));return(0,d.jsx)(n.Provider,{value:a,children:t})},`Provider`);r.displayName=e+`Provider`;function a(r,a={}){let{optional:o=!1}=a,s=i.useContext(n);if(s)return s;if(t!==void 0)return t;if(!o)throw Error(`\`${r}\` must be used within \`${e}\``)}return F(a,`useContext`),[r,a]}F(I,`createContext`);function L(e,t=[]){let n=[];function r(t,r){let a=i.createContext(r);a.displayName=t+`Context`;let o=n.length;n=[...n,r];let s=F(t=>{let{scope:n,children:r,...s}=t,c=n?.[e]?.[o]||a,l=i.useMemo(()=>s,Object.values(s));return(0,d.jsx)(c.Provider,{value:l,children:r})},`Provider`);s.displayName=t+`Provider`;function c(n,s,c={}){let{optional:l=!1}=c,u=s?.[e]?.[o]||a,d=i.useContext(u);if(d)return d;if(r!==void 0)return r;if(!l)throw Error(`\`${n}\` must be used within \`${t}\``)}return F(c,`useContext`),[s,c]}F(r,`createContext`);let a=F(()=>{let t=n.map(e=>i.createContext(e));return F(function(n){let r=n?.[e]||t;return i.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return a.scopeName=e,[r,te(a,...t)]}F(L,`createContextScope`);function te(...e){let t=e[0];if(e.length===1)return t;let n=F(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return F(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}F(te,`composeContextScopes`);var ne=Object.defineProperty,R=(e,t)=>ne(e,`name`,{value:t,configurable:!0});function re(e){let t=e+`CollectionProvider`,[n,r]=L(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=R(e=>{let{scope:t,children:n}=e,r=i.useRef(null),o=i.useRef(new Map).current;return(0,d.jsx)(a,{scope:t,itemMap:o,collectionRef:r,children:n})},`CollectionProvider`);s.displayName=t;let c=e+`CollectionSlot`,u=m(c),f=i.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=l(t,o(c,n).collectionRef);return(0,d.jsx)(u,{ref:i,children:r})});f.displayName=c;let p=e+`CollectionItemSlot`,h=`data-radix-collection-item`,g=m(p),_=i.forwardRef((e,t)=>{let{scope:n,children:r,...a}=e,s=i.useRef(null),c=l(t,s),u=o(p,n);return i.useEffect(()=>(u.itemMap.set(s,{ref:s,...a}),()=>void u.itemMap.delete(s))),(0,d.jsx)(g,{[h]:``,ref:c,children:r})});_.displayName=p;function v(t){let n=o(e+`CollectionConsumer`,t);return i.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${h}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return R(v,`useCollection`),[{Provider:s,Slot:f,ItemSlot:_},v,r]}R(re,`createCollection`);var ie=new WeakMap,ae=class e extends Map{static{R(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],ie.set(this,!0)}set(e,t){return ie.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=ce(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=oe(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=oe(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return oe(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function oe(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=se(e,t);return n===-1?void 0:e[n]}R(oe,`at`);function se(e,t){let n=e.length,r=ce(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}R(se,`toSafeIndex`);function ce(e){return e!==e||e===0?0:Math.trunc(e)}R(ce,`toSafeInteger`);function le(e){let t=e+`CollectionProvider`,[n,r]=L(t),[a,o]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new ae,setItemMap:R(()=>void 0,`setItemMap`)}),s=R(({state:e,...t})=>e?(0,d.jsx)(u,{...t,state:e}):(0,d.jsx)(c,{...t}),`CollectionProvider`);s.displayName=t;let c=R(e=>{let t=y();return(0,d.jsx)(u,{...e,state:t})},`CollectionInit`);c.displayName=t+`Init`;let u=R(e=>{let{scope:t,children:n,state:r}=e,o=i.useRef(null),[s,c]=i.useState(null),u=l(o,c),[f,p]=r;return i.useEffect(()=>{if(!s)return;let e=pe(()=>{});return e.observe(s,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[s]),(0,d.jsx)(a,{scope:t,itemMap:f,setItemMap:p,collectionRef:u,collectionRefObject:o,collectionElement:s,children:n})},`CollectionProviderImpl`);u.displayName=t+`Impl`;let f=e+`CollectionSlot`,p=m(f),h=i.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=l(t,o(f,n).collectionRef);return(0,d.jsx)(p,{ref:i,children:r})});h.displayName=f;let g=e+`CollectionItemSlot`,_=m(g),v=i.forwardRef((e,t)=>{let{scope:n,children:r,...a}=e,s=i.useRef(null),[c,u]=i.useState(null),f=l(t,s,u),{setItemMap:p}=o(g,n),m=i.useRef(a);ue(m.current,a)||(m.current=a);let h=m.current;return i.useEffect(()=>{let e=h;return p(t=>c?t.has(c)?t.set(c,{...e,element:c}).toSorted(fe):(t.set(c,{...e,element:c}),t.toSorted(fe)):t),()=>{p(e=>!c||!e.has(c)?e:(e.delete(c),new ae(e)))}},[c,h,p]),(0,d.jsx)(_,{"data-radix-collection-item":``,ref:f,children:r})});v.displayName=g;function y(){return i.useState(new ae)}R(y,`useInitCollection`);function b(t){let{itemMap:n}=o(e+`CollectionConsumer`,t);return n}return R(b,`useCollection`),[{Provider:s,Slot:h,ItemSlot:v},{createCollectionScope:r,useCollection:b,useInitCollection:y}]}R(le,`createCollection`);function ue(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}R(ue,`shallowEqual`);function de(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}R(de,`isElementPreceding`);function fe(e,t){return!e[1].element||!t[1].element?0:de(e[1].element,t[1].element)?-1:1}R(fe,`sortByDocumentPosition`);function pe(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}R(pe,`getChildListObserver`);var me=Object.defineProperty,he=(e,t)=>me(e,`name`,{value:t,configurable:!0}),ge=!!(typeof window<`u`&&window.document&&window.document.createElement);function z(e,t,{checkForDefaultPrevented:n=!0}={}){return he(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}he(z,`composeEventHandlers`);function _e(e){if(!ge)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}he(_e,`getOwnerWindow`);function ve(e){if(!ge)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}he(ve,`getOwnerDocument`);function ye(e,t=!1){let{activeElement:n}=ve(e);if(!n?.nodeName)return null;if(be(n)&&n.contentDocument)return ye(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=ve(n).getElementById(e);if(t)return t}}return n}he(ye,`getActiveElement`);function be(e){return e.tagName===`IFRAME`}he(be,`isFrame`);var B=globalThis?.document?i.useLayoutEffect:()=>{},xe=Object.defineProperty,Se=(e,t)=>xe(e,`name`,{value:t,configurable:!0}),Ce=i.useEffectEvent,we=i.useInsertionEffect;function Te(e){if(typeof Ce==`function`)return Ce(e);let t=i.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof we==`function`?we(()=>{t.current=e}):B(()=>{t.current=e}),i.useMemo(()=>((...e)=>t.current?.(...e)),[])}Se(Te,`useEffectEvent`);var Ee=Object.defineProperty,De=(e,t)=>Ee(e,`name`,{value:t,configurable:!0}),Oe=i.useInsertionEffect||B;function ke({prop:e,defaultProp:t,onChange:n=De(()=>{},`onChange`),caller:r}){let[a,o,s]=Ae({defaultProp:t,onChange:n}),c=e!==void 0;return[c?e:a,i.useCallback(t=>{if(c){let n=je(t)?t(e):t;n!==e&&s.current?.(n)}else o(t)},[c,e,o,s])]}De(ke,`useControllableState`);function Ae({defaultProp:e,onChange:t}){let[n,r]=i.useState(e),a=i.useRef(n),o=i.useRef(t);return Oe(()=>{o.current=t},[t]),i.useEffect(()=>{a.current!==n&&(o.current?.(n),a.current=n)},[n,a]),[n,r,o]}De(Ae,`useUncontrolledState`);function je(e){return typeof e==`function`}De(je,`isFunction`);var Me=Symbol(`RADIX:SYNC_STATE`);function Ne(e,t,n,r){let{prop:a,defaultProp:o,onChange:s,caller:c}=t,l=a!==void 0,u=Te(s),d=[{...n,state:o}];r&&d.push(r);let[f,p]=i.useReducer((t,n)=>{if(n.type===Me)return{...t,state:n.state};let r=e(t,n);return l&&!Object.is(r.state,t.state)&&u(r.state),r},...d),m=f.state,h=i.useRef(m);i.useEffect(()=>{h.current!==m&&(h.current=m,l||u(m))},[m,h,l]);let g=i.useMemo(()=>a===void 0?f:{...f,state:a},[f,a]);return i.useEffect(()=>{l&&!Object.is(a,f.state)&&p({type:Me,state:a})},[a,f.state,l]),[g,p]}De(Ne,`useControllableStateReducer`);var Pe=Object.defineProperty,Fe=(e,t)=>Pe(e,`name`,{value:t,configurable:!0});function Ie(e,t){return i.useReducer((e,n)=>t[e][n]??e,e)}Fe(Ie,`useStateMachine`);var V=Fe(e=>{let{present:t,children:n}=e,r=Le(t),a=typeof n==`function`?n({present:r.isPresent}):i.Children.only(n),o=ze(r.ref,Ve(a));return typeof n==`function`||r.isPresent?i.cloneElement(a,{ref:o}):null},`Presence`);function Le(e){let[t,n]=i.useState(),r=i.useRef(null),a=i.useRef(e),o=i.useRef(`none`),s=i.useRef(void 0),[c,l]=Ie(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return i.useEffect(()=>{c===`mounted`?(o.current=s.current??Be(r.current),s.current=void 0):o.current=`none`},[c]),B(()=>{let t=r.current,n=a.current;if(n!==e){let r=o.current,i=Be(t);e?(s.current=i,l(`MOUNT`)):i===`none`||t?.display===`none`?l(`UNMOUNT`):l(n&&r!==i?`ANIMATION_OUT`:`UNMOUNT`),a.current=e}},[e,l]),B(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,i=Fe(i=>{let o=Be(r.current).includes(CSS.escape(i.animationName));if(i.target===t&&o&&(l(`ANIMATION_END`),!a.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=Fe(e=>{e.target===t&&(o.current=Be(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,i),t.addEventListener(`animationend`,i),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,i),t.removeEventListener(`animationend`,i)}}l(`ANIMATION_END`)},[t,l]),{isPresent:[`mounted`,`unmountSuspended`].includes(c),ref:i.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,s.current=Be(t)}else r.current=null;n(e)},[])}}Fe(Le,`usePresence`);function Re(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Fe(Re,`setRef`);function ze(...e){let t=i.useRef(e);return t.current=e,i.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Re(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():Re(n[e],null)}}},[])}Fe(ze,`useStableComposedRefs`);function Be(e){return e?.animationName||`none`}Fe(Be,`getAnimationName`);function Ve(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)}Fe(Ve,`getElementRef`);var He=Object.defineProperty,Ue=(e,t)=>He(e,`name`,{value:t,configurable:!0}),We=i.useId||(()=>void 0),Ge=0;function H(e){let[t,n]=i.useState(We());return B(()=>{e||n(e=>e??String(Ge++))},[e]),e||(t?`radix-${t}`:``)}Ue(H,`useId`);var Ke=Object.defineProperty,qe=(e,t)=>Ke(e,`name`,{value:t,configurable:!0}),Je=i.createContext(void 0);function Ye(e){let t=i.useContext(Je);return e||t||`ltr`}qe(Ye,`useDirection`);var Xe=Object.defineProperty,Ze=(e,t)=>Xe(e,`name`,{value:t,configurable:!0});function U(e){let t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>((...e)=>t.current?.(...e)),[])}Ze(U,`useCallbackRef`);var Qe=Object.defineProperty,W=(e,t)=>Qe(e,`name`,{value:t,configurable:!0}),$e=`dismissableLayer.update`,et=`dismissableLayer.pointerDownOutside`,tt=`dismissableLayer.focusOutside`,nt,rt=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),it=i.forwardRef(W(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:c,onDismiss:u,...f}=e,p=i.useContext(rt),[m,h]=i.useState(null),g=m?.ownerDocument??globalThis?.document,[,_]=i.useState({}),v=l(t,h),y=Array.from(p.layers),[b]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),x=b?y.indexOf(b):-1,S=m?y.indexOf(m):-1,C=p.layersWithOutsidePointerEventsDisabled.size>0,w=S>=x,T=i.useRef(!1),E=st(e=>{o?.(e),c?.(e),e.defaultPrevented||u?.()},{ownerDocument:g,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:T,dismissableSurfaces:p.dismissableSurfaces,shouldHandlePointerDownOutside:i.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...p.branches].some(t=>t.contains(e));return w&&!t},[p.branches,w])}),D=ct(e=>{if(r&&T.current)return;let t=e.target;[...p.branches].some(e=>e.contains(t))||(s?.(e),c?.(e),e.defaultPrevented||u?.())},g),O=m?S===y.length-1:!1,A=U(e=>{e.key===`Escape`&&(a?.(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))});return i.useEffect(()=>{if(O)return g.addEventListener(`keydown`,A,{capture:!0}),()=>g.removeEventListener(`keydown`,A,{capture:!0})},[g,O,A]),i.useEffect(()=>{if(m)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(nt=g.body.style.pointerEvents,g.body.style.pointerEvents=`none`),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),lt(),()=>{n&&(p.layersWithOutsidePointerEventsDisabled.delete(m),p.layersWithOutsidePointerEventsDisabled.size===0&&(g.body.style.pointerEvents=nt))}},[m,g,n,p]),i.useEffect(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),lt())},[m,p]),i.useEffect(()=>{let e=W(()=>_({}),`handleUpdate`);return document.addEventListener($e,e),()=>document.removeEventListener($e,e)},[]),(0,d.jsx)(k.div,{...f,ref:v,style:{pointerEvents:C?w?`auto`:`none`:void 0,...e.style},onFocusCapture:z(e.onFocusCapture,D.onFocusCapture),onBlurCapture:z(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:z(e.onPointerDownCapture,E.onPointerDownCapture)})},`DismissableLayer`));function at(){let e=i.useContext(rt),[t,n]=i.useState(null);return i.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}W(at,`useDismissableLayerSurface`);var ot=W(()=>!0,`IS_TRUE`);function st(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:o,shouldHandlePointerDownOutside:s=ot}=t,c=U(e),l=i.useRef(!1),u=i.useRef(!1),d=i.useRef(new Map),f=i.useRef(()=>{});return i.useEffect(()=>{function e(){u.current=!1,a.current=!1,d.current.clear()}W(e,`resetOutsideInteraction`);function t(){return Array.from(d.current.values()).some(Boolean)}W(t,`isOutsideInteractionIntercepted`);function i(e){if(!u.current)return;let t=e.target;t instanceof Node&&[...o].some(e=>e.contains(t))||d.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{u.current&&f.current()},0)}W(i,`handleInteractionCapture`);function p(e){u.current&&d.current.set(e.type,!1)}W(p,`handleInteractionBubble`);let m=W(i=>{if(i.target&&!l.current){let o=function(){n.removeEventListener(`click`,f.current);let r=t();e(),r||ut(et,c,p,{discrete:!0})};if(W(o,`handleAndDispatchPointerDownOutsideEvent`),!s(i.target)){n.removeEventListener(`click`,f.current),e(),l.current=!1;return}let p={originalEvent:i};u.current=!0,a.current=r&&i.button===0,d.current.clear(),!r||i.button!==0?o():(n.removeEventListener(`click`,f.current),f.current=o,n.addEventListener(`click`,f.current,{once:!0}))}else n.removeEventListener(`click`,f.current),e();l.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,i,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,f.current);for(let e of h)n.removeEventListener(e,i,!0),n.removeEventListener(e,p)}},[n,c,r,a,o,s]),{onPointerDownCapture:W(()=>l.current=!0,`onPointerDownCapture`)}}W(st,`usePointerDownOutside`);function ct(e,t=globalThis?.document){let n=U(e),r=i.useRef(!1);return i.useEffect(()=>{let e=W(e=>{e.target&&!r.current&&ut(tt,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:W(()=>r.current=!0,`onFocusCapture`),onBlurCapture:W(()=>r.current=!1,`onBlurCapture`)}}W(ct,`useFocusOutside`);function lt(){let e=new CustomEvent($e);document.dispatchEvent(e)}W(lt,`dispatchUpdate`);function ut(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?A(i,a):i.dispatchEvent(a)}W(ut,`handleAndDispatchCustomEvent`);var dt=Object.defineProperty,G=(e,t)=>dt(e,`name`,{value:t,configurable:!0}),ft=`focusScope.autoFocusOnMount`,pt=`focusScope.autoFocusOnUnmount`,mt={bubbles:!1,cancelable:!0},ht=i.forwardRef(G(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...s}=e,[c,u]=i.useState(null),f=U(a),p=U(o),m=i.useRef(null),h=l(t,u),g=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(r){let e=function(e){if(g.paused||!c)return;let t=e.target;c.contains(t)?m.current=t:St(m.current,{select:!0})},t=function(e){if(g.paused||!c)return;let t=e.relatedTarget;t!==null&&(c.contains(t)||St(m.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&St(c)};G(e,`handleFocusIn`),G(t,`handleFocusOut`),G(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,c,g.paused]),i.useEffect(()=>{if(c){Ct.add(g);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(ft,mt);c.addEventListener(ft,f),c.dispatchEvent(t),t.defaultPrevented||(gt(Et(vt(c)),{select:!0}),document.activeElement===e&&St(c))}return()=>{c.removeEventListener(ft,f),setTimeout(()=>{let t=new CustomEvent(pt,mt);c.addEventListener(pt,p),c.dispatchEvent(t),t.defaultPrevented||St(e??document.body,{select:!0}),c.removeEventListener(pt,p),Ct.remove(g)},0)}}},[c,f,p,g]);let _=i.useCallback(e=>{if(!n&&!r||g.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=_t(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&St(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&St(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,g.paused]);return(0,d.jsx)(k.div,{tabIndex:-1,...s,ref:h,onKeyDown:_})},`FocusScope`));function gt(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(St(r,{select:t}),document.activeElement!==n)return}G(gt,`focusFirst`);function _t(e){let t=vt(e);return[yt(t,e),yt(t.reverse(),e)]}G(_t,`getTabbableEdges`);function vt(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:G(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}G(vt,`getTabbableCandidates`);function yt(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):bt(r,{upTo:t})))return r}G(yt,`findVisible`);function bt(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}G(bt,`isHidden`);function xt(e){return e instanceof HTMLInputElement&&`select`in e}G(xt,`isSelectableInput`);function St(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&xt(e)&&t&&e.select()}}G(St,`focus`);var Ct=wt();function wt(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Tt(e,t),e.unshift(t)},remove(t){e=Tt(e,t),e[0]?.resume()}}}G(wt,`createFocusScopesStack`);function Tt(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}G(Tt,`arrayRemove`);function Et(e){return e.filter(e=>e.tagName!==`A`)}G(Et,`removeLinks`);var Dt=Object.defineProperty,Ot=i.forwardRef(((e,t)=>Dt(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[a,o]=i.useState(!1);B(()=>o(!0),[]);let s=n||a&&globalThis?.document?.body;return s?u.createPortal((0,d.jsx)(k.div,{...r,ref:t}),s):null},`Portal`)),kt=Object.defineProperty,At=(e,t)=>kt(e,`name`,{value:t,configurable:!0}),jt=0,Mt=null;function Nt(e){return Pt(),e.children}At(Nt,`FocusGuards`);function Pt(){i.useEffect(()=>{Mt||={start:Ft(),end:Ft()};let{start:e,end:t}=Mt;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),jt++,()=>{jt===1&&(Mt?.start.remove(),Mt?.end.remove(),Mt=null),jt=Math.max(0,jt-1)}},[])}At(Pt,`useFocusGuards`);function Ft(){let 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}At(Ft,`createFocusGuard`);var It=function(){return It=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},It.apply(this,arguments)};function Lt(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Rt(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var zt=`right-scroll-bar-position`,Bt=`width-before-scroll-bar`,Vt=`with-scroll-bars-hidden`,Ht=`--removed-body-scroll-bar-size`;function Ut(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Wt(e,t){var n=(0,i.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Gt=typeof window<`u`?i.useLayoutEffect:i.useEffect,Kt=new WeakMap;function qt(e,t){var n=Wt(t||null,function(t){return e.forEach(function(e){return Ut(e,t)})});return Gt(function(){var t=Kt.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Ut(e,null)}),i.forEach(function(e){r.has(e)||Ut(e,a)})}Kt.set(n,e)},[e]),n}function Jt(e){return e}function Yt(e,t){t===void 0&&(t=Jt);var n=[],r=!1;return{read:function(){if(r)throw 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(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Xt(e){e===void 0&&(e={});var t=Yt(null);return t.options=It({async:!0,ssr:!1},e),t}var Zt=function(e){var t=e.sideCar,n=Lt(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return i.createElement(r,It({},n))};Zt.isSideCarExport=!0;function Qt(e,t){return e.useMedium(t),Zt}var $t=Xt(),en=function(){},tn=i.forwardRef(function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:en,onWheelCapture:en,onTouchMoveCapture:en}),a=r[0],o=r[1],s=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=Lt(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=qt([n,t]),w=It(It({},x),a);return i.createElement(i.Fragment,null,d&&i.createElement(S,{sideCar:$t,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:o,allowPinchZoom:!!_,lockRef:n,gapMode:b}),s?i.cloneElement(i.Children.only(c),It(It({},w),{ref:C})):i.createElement(y,It({},w,{className:l,ref:C}),c))});tn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},tn.classNames={fullWidth:Bt,zeroRight:zt};var nn=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function rn(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=nn();return t&&e.setAttribute(`nonce`,t),e}function an(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function on(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var sn=function(){var e=0,t=null;return{add:function(n){e==0&&(t=rn())&&(an(t,n),on(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},cn=function(){var e=sn();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ln=function(){var e=cn();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},un={left:0,top:0,right:0,gap:0},dn=function(e){return parseInt(e||``,10)||0},fn=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[dn(n),dn(r),dn(i)]},pn=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return un;var t=fn(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])}},mn=ln(),hn=`data-scroll-locked`,gn=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
2
2
|
.${Vt} {
|
|
3
3
|
overflow: hidden ${r};
|
|
4
4
|
padding-right: ${s}px ${r};
|
|
@@ -39,4 +39,4 @@ import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{i as t,r as n,t as r}f
|
|
|
39
39
|
.block-interactivity-${e} {pointer-events: none;}
|
|
40
40
|
.allow-interactivity-${e} {pointer-events: all;}
|
|
41
41
|
`},zn=0,Bn=[];function Vn(e){var t=i.useRef([]),n=i.useRef([0,0]),r=i.useRef(),a=i.useState(zn++)[0],o=i.useState(ln)[0],s=i.useRef(e);i.useEffect(function(){s.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${a}`);var t=Rt([e.lockRef.current],(e.shards||[]).map(In),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${a}`)}),function(){document.body.classList.remove(`block-interactivity-${a}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${a}`)})}}},[e.inert,e.lockRef.current,e.shards]);var c=i.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!s.current.allowPinchZoom;var i=Pn(e),a=n.current,o=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(o)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Dn(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Dn(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(o||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Nn(h,t,e,h===`h`?o:c,!0)},[]),l=i.useCallback(function(e){var n=e;if(!(!Bn.length||Bn[Bn.length-1]!==o)){var r=`deltaY`in n?Fn(n):Pn(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Ln(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var a=(s.current.shards||[]).map(In).filter(Boolean).filter(function(e){return e.contains(n.target)});(a.length>0?c(n,a[0]):!s.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=i.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Hn(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=i.useCallback(function(e){n.current=Pn(e),r.current=void 0},[]),f=i.useCallback(function(t){u(t.type,Fn(t),t.target,c(t,e.lockRef.current))},[]),p=i.useCallback(function(t){u(t.type,Pn(t),t.target,c(t,e.lockRef.current))},[]);i.useEffect(function(){return Bn.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,l,Sn),document.addEventListener(`touchmove`,l,Sn),document.addEventListener(`touchstart`,d,Sn),function(){Bn=Bn.filter(function(e){return e!==o}),document.removeEventListener(`wheel`,l,Sn),document.removeEventListener(`touchmove`,l,Sn),document.removeEventListener(`touchstart`,d,Sn)}},[]);var m=e.removeScrollBar,h=e.inert;return i.createElement(i.Fragment,null,h?i.createElement(o,{styles:Rn(a)}):null,m?i.createElement(yn,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Hn(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Un=Qt($t,Vn),Wn=i.forwardRef(function(e,t){return i.createElement(tn,It({},e,{ref:t,sideCar:Un}))});Wn.classNames=tn.classNames;var Gn=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Kn=new WeakMap,qn=new WeakMap,Jn={},Yn=0,Xn=function(e){return e&&(e.host||Xn(e.parentNode))},Zn=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Xn(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Qn=function(e,t,n,r){var i=Zn(t,Array.isArray(e)?e:[e]);Jn[n]||(Jn[n]=new WeakMap);var a=Jn[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Kn.get(e)||0)+1,l=(a.get(e)||0)+1;Kn.set(e,c),a.set(e,l),o.push(e),c===1&&i&&qn.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Yn++,function(){o.forEach(function(e){var t=Kn.get(e)-1,i=a.get(e)-1;Kn.set(e,t),a.set(e,i),t||(qn.has(e)||e.removeAttribute(r),qn.delete(e)),i||e.removeAttribute(n)}),Yn--,Yn||(Kn=new WeakMap,Kn=new WeakMap,qn=new WeakMap,Jn={})}},$n=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Gn(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Qn(r,i,n,`aria-hidden`)):function(){return null}},er=Object.defineProperty,K=(e,t)=>er(e,`name`,{value:t,configurable:!0}),tr=`Dialog`,[nr,rr]=L(tr),[ir,q]=nr(tr),ar=K(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=i.useRef(null),l=i.useRef(null),[u,f]=ke({prop:r,defaultProp:a??!1,onChange:o,caller:tr}),[p,m]=i.useState(0),[h,g]=i.useState(0);return(0,d.jsx)(ir,{scope:t,triggerRef:c,contentRef:l,contentId:H(),titleId:H(),descriptionId:H(),titlePresent:p>0,descriptionPresent:h>0,setTitleCount:m,setDescriptionCount:g,open:u,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(e=>!e),[f]),modal:s,children:n})},`Dialog`),or=`DialogTrigger`,sr=i.forwardRef(K(function(e,t){let{__scopeDialog:n,...r}=e,i=q(or,n),a=l(t,i.triggerRef);return(0,d.jsx)(k.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Dr(i.open),...r,ref:a,onClick:z(e.onClick,i.onOpenToggle)})},`DialogTrigger`)),cr=`DialogPortal`,[lr,ur]=nr(cr,{forceMount:void 0}),dr=K(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:a}=e,o=q(cr,t);return(0,d.jsx)(lr,{scope:t,forceMount:n,children:i.Children.map(r,e=>(0,d.jsx)(V,{present:n||o.open,children:(0,d.jsx)(Ot,{asChild:!0,container:a,children:e})}))})},`DialogPortal`),fr=`DialogOverlay`,pr=i.forwardRef(K(function(e,t){let n=ur(fr,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=q(fr,e.__scopeDialog);return a.modal?(0,d.jsx)(V,{present:r||a.open,children:(0,d.jsx)(hr,{...i,ref:t})}):null},`DialogOverlay`)),mr=m(`DialogOverlay.RemoveScroll`),hr=i.forwardRef(K(function(e,t){let{__scopeDialog:n,...r}=e,i=q(fr,n),a=l(t,at());return(0,d.jsx)(Wn,{as:mr,allowPinchZoom:!0,shards:[i.contentRef],children:(0,d.jsx)(k.div,{"data-state":Dr(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),gr=`DialogContent`,_r=i.forwardRef(K(function(e,t){let n=ur(gr,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=q(gr,e.__scopeDialog);return(0,d.jsx)(V,{present:r||a.open,children:a.modal?(0,d.jsx)(vr,{...i,ref:t}):(0,d.jsx)(yr,{...i,ref:t})})},`DialogContent`)),vr=i.forwardRef(K(function(e,t){let n=q(gr,e.__scopeDialog),r=i.useRef(null),a=l(t,n.contentRef,r);return i.useEffect(()=>{let e=r.current;if(e)return $n(e)},[]),(0,d.jsx)(br,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:z(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:z(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:z(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),yr=i.forwardRef(K(function(e,t){let n=q(gr,e.__scopeDialog),r=i.useRef(!1),a=i.useRef(!1);return(0,d.jsx)(br,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(a.current=!0));let i=t.target;n.triggerRef.current?.contains(i)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&a.current&&t.preventDefault()}})},`DialogContentNonModal`)),br=i.forwardRef(K(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=q(gr,n);return Pt(),(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(ht,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,d.jsx)(it,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":Dr(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`)),xr=`DialogTitle`,Sr=i.forwardRef(K(function(e,t){let{__scopeDialog:n,...r}=e,i=q(xr,n),{setTitleCount:a}=i;return B(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,d.jsx)(k.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),Cr=`DialogDescription`,wr=i.forwardRef(K(function(e,t){let{__scopeDialog:n,...r}=e,i=q(Cr,n),{setDescriptionCount:a}=i;return B(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,d.jsx)(k.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),Tr=`DialogClose`,Er=i.forwardRef(K(function(e,t){let{__scopeDialog:n,...r}=e,i=q(Tr,n);return(0,d.jsx)(k.button,{type:`button`,...r,ref:t,onClick:z(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function Dr(e){return e?`open`:`closed`}K(Dr,`getState`);var Or=Object.defineProperty,kr=(e,t)=>Or(e,`name`,{value:t,configurable:!0});function Ar(e){let[t,n]=i.useState(void 0);return B(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}n(void 0)},[e]),t}kr(Ar,`useSize`);var jr=Object.defineProperty,Mr=(e,t)=>jr(e,`name`,{value:t,configurable:!0}),Nr=`Checkbox`,[Pr,Fr]=L(Nr),[Ir,Lr]=Pr(Nr);function Rr(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:a,disabled:o,form:s,name:c,onCheckedChange:l,required:u,value:f=`on`,internal_do_not_use_render:p}=e,[m,h]=ke({prop:n,defaultProp:a??!1,onChange:l,caller:Nr}),[g,_]=i.useState(null),[v,y]=i.useState(null),b=i.useRef(!1),[x,S]=i.useReducer(e=>e+1,0),C=!g||!!s||!!g.closest(`form`),w={checked:m,disabled:o,setChecked:h,control:g,setControl:_,name:c,form:s,value:f,hasConsumerStoppedPropagationRef:b,userInteractionCount:x,onUserInteraction:S,required:u,defaultChecked:!qr(a)&&a,isFormControl:C,bubbleInput:v,setBubbleInput:y};return(0,d.jsx)(Ir,{scope:t,...w,children:Kr(p)?p(w):r})}Mr(Rr,`CheckboxProvider`);var zr=`CheckboxTrigger`,Br=i.forwardRef(Mr(function({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},a){let{control:o,value:s,disabled:c,checked:u,required:f,setControl:p,setChecked:m,hasConsumerStoppedPropagationRef:h,onUserInteraction:g,isFormControl:_,bubbleInput:v}=Lr(zr,e),y=l(a,p),b=i.useRef(u);return i.useEffect(()=>{let e=o?.form;if(e){let t=Mr(()=>m(b.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[o,m]),(0,d.jsx)(k.button,{type:`button`,role:`checkbox`,"aria-checked":qr(u)?`mixed`:u,"aria-required":f,"data-state":Jr(u),"data-disabled":c?``:void 0,disabled:c,value:s,...r,ref:y,onKeyDown:z(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:z(n,e=>{g(),m(e=>qr(e)?!0:!e),v&&_&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())})})},`CheckboxTrigger`)),Vr=i.forwardRef(Mr(function(e,t){let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...f}=e;return(0,d.jsx)(Rr,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Br,{...f,ref:t,__scopeCheckbox:n}),e&&(0,d.jsx)(Gr,{__scopeCheckbox:n})]})})},`Checkbox`)),Hr=`CheckboxIndicator`,Ur=i.forwardRef(Mr(function(e,t){let{__scopeCheckbox:n,forceMount:r,...i}=e,a=Lr(Hr,n);return(0,d.jsx)(V,{present:r||qr(a.checked)||a.checked===!0,children:(0,d.jsx)(k.span,{"data-state":Jr(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})},`CheckboxIndicator`)),Wr=`CheckboxBubbleInput`,Gr=i.forwardRef(Mr(function({__scopeCheckbox:e,onClick:t,...n},r){let{control:a,hasConsumerStoppedPropagationRef:o,userInteractionCount:s,checked:c,defaultChecked:u,required:f,disabled:p,name:m,value:h,form:g,bubbleInput:_,setBubbleInput:v}=Lr(Wr,e),y=l(r,v),b=Ar(a),x=i.useRef(!1),S=i.useRef(c),C=i.useRef(s);i.useEffect(()=>{let e=_;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=s!==C.current;C.current=s;let i=S.current!==c;S.current=c;let a=!(r&&o.current);if(i&&n){x.current=!r;let t=new Event(`click`,{bubbles:a});e.indeterminate=qr(c),n.call(e,!qr(c)&&c),e.dispatchEvent(t),x.current=!1}},[_,c,o,s]);let w=i.useRef(!qr(c)&&c);return(0,d.jsx)(k.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:u??w.current,required:f,disabled:p,name:m,value:h,form:g,...n,tabIndex:-1,ref:y,onClick:z(t,e=>{x.current&&e.stopPropagation()}),style:{...n.style,...b,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`CheckboxBubbleInput`));function Kr(e){return typeof e==`function`}Mr(Kr,`isFunction`);function qr(e){return e===`indeterminate`}Mr(qr,`isIndeterminate`);function Jr(e){return qr(e)?`indeterminate`:e?`checked`:`unchecked`}Mr(Jr,`getState`);var Yr=[`top`,`right`,`bottom`,`left`],Xr=Math.min,Zr=Math.max,Qr=Math.round,$r=Math.floor,ei=e=>({x:e,y:e}),ti={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function ni(e,t,n){return Zr(e,Xr(t,n))}function ri(e,t){return typeof e==`function`?e(t):e}function ii(e){return e.split(`-`)[0]}function ai(e){return e.split(`-`)[1]}function oi(e){return e===`x`?`y`:`x`}function si(e){return e===`y`?`height`:`width`}function ci(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function li(e){return oi(ci(e))}function ui(e,t,n){n===void 0&&(n=!1);let r=ai(e),i=li(e),a=si(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=yi(o)),[o,yi(o)]}function di(e){let t=yi(e);return[fi(e),t,fi(t)]}function fi(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var pi=[`left`,`right`],mi=[`right`,`left`],hi=[`top`,`bottom`],gi=[`bottom`,`top`];function _i(e,t,n){switch(e){case`top`:case`bottom`:return n?t?mi:pi:t?pi:mi;case`left`:case`right`:return t?hi:gi;default:return[]}}function vi(e,t,n,r){let i=ai(e),a=_i(ii(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(fi)))),a}function yi(e){let t=ii(e);return ti[t]+e.slice(t.length)}function bi(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function xi(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:bi(e)}function Si(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Ci(e,t,n){let{reference:r,floating:i}=e,a=ci(t),o=li(t),s=si(o),c=ii(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=ai(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function wi(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=ri(t,e),p=xi(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Si(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Si(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Ti=50,Ei=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:wi},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Ci(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Ti&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Ci(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Di=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=ri(e,t)||{};if(l==null)return{};let d=xi(u),f={x:n,y:r},p=li(i),m=si(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Xr(d[_],T),D=Xr(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=ni(E,k,O),j=!c.arrow&&ai(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,M=j?k<E?k-E:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),Oi=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=ri(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=ii(r),_=ci(o),v=ii(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[yi(o)]:di(o)),x=p!==`none`;!d&&x&&b.push(...vi(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=ui(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===ci(t)||T.every(e=>ci(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=ci(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function ki(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ai(e){return Yr.some(t=>e[t]>=0)}var ji=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=ri(e,t);switch(i){case`referenceHidden`:{let e=ki(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ai(e)}}}case`escaped`:{let e=ki(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ai(e)}}}default:return{}}}}},Mi=new Set([`left`,`top`]);async function Ni(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ii(n),s=ai(n),c=ci(n)===`y`,l=Mi.has(o)?-1:1,u=a&&c?-1:1,d=ri(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Pi=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Ni(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Fi=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=ri(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=ci(i),p=oi(f),m=u[p],h=u[f],g=(e,t)=>ni(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Ii=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=ri(e,t),u={x:n,y:r},d=ci(i),f=oi(d),p=u[f],m=u[d],h=ri(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Mi.has(ii(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Li=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=ri(e,t),c=await i.detectOverflow(t,s),l=ii(n),u=ai(n),d=ci(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Xr(p-c[m],g),y=Xr(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Zr(c.left,c.right):S=p-2*Zr(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Ri(){return typeof window<`u`}function zi(e){return Vi(e)?(e.nodeName||``).toLowerCase():`#document`}function J(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Bi(e){return((Vi(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Vi(e){return Ri()?e instanceof Node||e instanceof J(e).Node:!1}function Hi(e){return Ri()?e instanceof Element||e instanceof J(e).Element:!1}function Ui(e){return Ri()?e instanceof HTMLElement||e instanceof J(e).HTMLElement:!1}function Wi(e){return!Ri()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof J(e).ShadowRoot}function Gi(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=na(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Ki(e){return/^(table|td|th)$/.test(zi(e))}function qi(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Ji=/transform|translate|scale|rotate|perspective|filter/,Yi=/paint|layout|strict|content/,Xi=e=>!!e&&e!==`none`,Zi;function Qi(e){let t=Hi(e)?na(e):e;return Xi(t.transform)||Xi(t.translate)||Xi(t.scale)||Xi(t.rotate)||Xi(t.perspective)||!ea()&&(Xi(t.backdropFilter)||Xi(t.filter))||Ji.test(t.willChange||``)||Yi.test(t.contain||``)}function $i(e){let t=ia(e);for(;Ui(t)&&!ta(t);){if(Qi(t))return t;if(qi(t))return null;t=ia(t)}return null}function ea(){return Zi??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Zi}function ta(e){return/^(html|body|#document)$/.test(zi(e))}function na(e){return J(e).getComputedStyle(e)}function ra(e){return Hi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ia(e){if(zi(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Wi(e)&&e.host||Bi(e);return Wi(t)?t.host:t}function aa(e){let t=ia(e);return ta(t)?(e.ownerDocument||e).body:Ui(t)&&Gi(t)?t:aa(t)}function oa(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=aa(e),i=r===e.ownerDocument?.body,a=J(r);if(i){let e=sa(a);return t.concat(a,a.visualViewport||[],Gi(r)?r:[],e&&n?oa(e):[])}return t.concat(r,oa(r,[],n))}function sa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ca(e){let t=na(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Ui(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Qr(n)!==a||Qr(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function la(e){return Hi(e)?e:e.contextElement}function ua(e){let t=la(e);if(!Ui(t))return ei(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ca(t),o=(a?Qr(n.width):n.width)/r,s=(a?Qr(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var da=ei(0);function fa(e){let t=J(e);return!ea()||!t.visualViewport?da:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function pa(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===J(e)}function ma(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=la(e),o=ei(1);t&&(r?Hi(r)&&(o=ua(r)):o=ua(e));let s=pa(a,n,r)?fa(a):ei(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=J(a),t=Hi(r)?J(r):r,n=e,i=sa(n);for(;i&&t!==n;){let e=ua(i),t=i.getBoundingClientRect(),r=na(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=J(i),i=sa(n)}}return Si({width:u,height:d,x:c,y:l})}function ha(e,t){let n=ra(e).scrollLeft;return t?t.left+n:ma(Bi(e)).left+n}function ga(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ha(e,n),y:n.top+t.scrollTop}}function _a(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Bi(r),s=t?qi(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=ei(1),u=ei(0),d=Ui(r);if((d||!a)&&((zi(r)!==`body`||Gi(o))&&(c=ra(r)),d)){let e=ma(r);l=ua(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?ga(o,c):ei(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function va(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function ya(e){let t=ra(e),n=e.ownerDocument.body,r=Zr(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Zr(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+ha(e),o=-t.scrollTop;return na(n).direction===`rtl`&&(a+=Zr(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var ba=25;function xa(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=J(e),a=Bi(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!ea()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(ha(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=ba&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Sa(e,t){let n=ma(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=ua(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ca(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=xa(e,n,t);else if(t===`document`)r=ya(Bi(e));else if(Hi(t))r=Sa(t,n);else{let n=fa(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Si(r)}function wa(e,t){let n=t.get(e);if(n)return n;let r=oa(e,[],!1).filter(e=>Hi(e)&&zi(e)!==`body`),i=null,a=na(e).position===`fixed`,o=a?ia(e):e;for(;Hi(o)&&!ta(o);){let e=na(o),t=Qi(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=ia(o)}return t.set(e,r),r}function Ta(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?qi(t)?[]:wa(t,this._c):[].concat(n),r],o=Ca(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Ca(t,a[e],i);s=Zr(n.top,s),c=Xr(n.right,c),l=Xr(n.bottom,l),u=Zr(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Ea(e){let{width:t,height:n}=ca(e);return{width:t,height:n}}function Da(e,t,n){let r=Ui(t),i=Bi(t),a=n===`fixed`,o=ma(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=ei(0);if((r||!a)&&((zi(t)!==`body`||Gi(i))&&(s=ra(t)),r)){let e=ma(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=ha(i));let l=i&&!r&&!a?ga(i,s):ei(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Oa(e){return na(e).position===`static`}function ka(e,t){if(!Ui(e)||na(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Bi(e)===n&&(n=n.ownerDocument.body),n}function Aa(e,t){let n=J(e);if(qi(e))return n;if(!Ui(e)){let t=ia(e);for(;t&&!ta(t);){if(Hi(t)&&!Oa(t))return t;t=ia(t)}return n}let r=ka(e,t);for(;r&&Ki(r)&&Oa(r);)r=ka(r,t);return r&&ta(r)&&Oa(r)&&!Qi(r)?n:r||$i(e)||n}var ja=async function(e){let t=this.getOffsetParent||Aa,n=this.getDimensions,r=await n(e.floating);return{reference:Da(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ma(e){return na(e).direction===`rtl`}var Na={convertOffsetParentRelativeRectToViewportRelativeRect:_a,getDocumentElement:Bi,getClippingRect:Ta,getOffsetParent:Aa,getElementRects:ja,getClientRects:va,getDimensions:Ea,getScale:ua,isElement:Hi,isRTL:Ma};function Pa(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Fa(e,t,n){let r=null,i,a=Bi(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=$r(d),h=$r(a.clientWidth-(u+f)),g=$r(a.clientHeight-(d+p)),_=$r(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Zr(0,Xr(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Pa(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=J(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Ia(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=la(e),u=i||a?[...l?oa(l):[],...t?oa(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Fa(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?ma(e):null;c&&g();function g(){let t=ma(e);h&&!Pa(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var La=Pi,Ra=Fi,za=Oi,Ba=Li,Va=ji,Ha=Di,Ua=Ii,Wa=(e,t,n)=>{let r=new Map,i=n??{},a={...Na,...i.platform,_c:r};return Ei(e,t,{...i,platform:a})},Ga=typeof document<`u`?i.useLayoutEffect:function(){};function Ka(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ka(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Ka(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function qa(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ja(e,t){let n=qa(e);return Math.round(t*n)/n}function Ya(e){let t=i.useRef(e);return Ga(()=>{t.current=e}),t}function Xa(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:a,elements:{reference:o,floating:s}={},transform:c=!0,whileElementsMounted:l,open:d}=e,[f,p]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=i.useState(r);Ka(m,r)||h(r);let[g,_]=i.useState(null),[v,y]=i.useState(null),b=i.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=i.useCallback(e=>{e!==T.current&&(T.current=e,y(e))},[]),S=o||g,C=s||v,w=i.useRef(null),T=i.useRef(null),E=i.useRef(f),D=l!=null,O=Ya(l),k=Ya(a),A=Ya(d),j=i.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:t,strategy:n,middleware:m};k.current&&(e.platform=k.current),Wa(w.current,T.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!Ka(E.current,t)&&(E.current=t,u.flushSync(()=>{p(t)}))})},[m,t,n,k,A]);Ga(()=>{d===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);let M=i.useRef(!1);Ga(()=>(M.current=!0,()=>{M.current=!1}),[]),Ga(()=>{if(S&&(w.current=S),C&&(T.current=C),S&&C){if(O.current)return O.current(S,C,j);j()}},[S,C,j,O,D]);let N=i.useMemo(()=>({reference:w,floating:T,setReference:b,setFloating:x}),[b,x]),P=i.useMemo(()=>({reference:S,floating:C}),[S,C]),ee=i.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=Ja(P.floating,f.x),r=Ja(P.floating,f.y);return c?{...e,transform:`translate(`+t+`px, `+r+`px)`,...qa(P.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,c,P.floating,f.x,f.y]);return i.useMemo(()=>({...f,update:j,refs:N,elements:P,floatingStyles:ee}),[f,j,N,P,ee])}var Za=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Ha({element:r.current,padding:i}).fn(n):r?Ha({element:r,padding:i}).fn(n):{}}}},Qa=(e,t)=>{let n=La(e);return{name:n.name,fn:n.fn,options:[e,t]}},$a=(e,t)=>{let n=Ra(e);return{name:n.name,fn:n.fn,options:[e,t]}},eo=(e,t)=>({fn:Ua(e).fn,options:[e,t]}),to=(e,t)=>{let n=za(e);return{name:n.name,fn:n.fn,options:[e,t]}},no=(e,t)=>{let n=Ba(e);return{name:n.name,fn:n.fn,options:[e,t]}},ro=(e,t)=>{let n=Va(e);return{name:n.name,fn:n.fn,options:[e,t]}},io=(e,t)=>{let n=Za(e);return{name:n.name,fn:n.fn,options:[e,t]}},ao=Object.defineProperty,oo=i.forwardRef(((e,t)=>ao(e,`name`,{value:t,configurable:!0}))(function(e,t){let{children:n,width:r=10,height:i=5,...a}=e;return(0,d.jsx)(k.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,d.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})},`Arrow`)),so=Object.defineProperty,co=(e,t)=>so(e,`name`,{value:t,configurable:!0}),lo=`Popper`,[uo,fo]=L(lo),[po,mo]=uo(lo),ho=co(e=>{let{__scopePopper:t,children:n}=e,[r,a]=i.useState(null),[o,s]=i.useState(void 0);return(0,d.jsx)(po,{scope:t,anchor:r,onAnchorChange:a,placementState:o,setPlacementState:s,children:n})},`Popper`),go=`PopperAnchor`,_o=i.forwardRef(co(function(e,t){let{__scopePopper:n,virtualRef:r,...a}=e,o=mo(go,n),s=i.useRef(null),c=o.onAnchorChange,u=l(t,i.useCallback(e=>{s.current=e,e&&c(e)},[c])),f=i.useRef(null);i.useEffect(()=>{if(!r)return;let e=f.current;f.current=r.current,e!==f.current&&c(f.current)});let p=o.placementState&&Do(o.placementState),m=p?.[0],h=p?.[1];return r?null:(0,d.jsx)(k.div,{"data-radix-popper-side":m,"data-radix-popper-align":h,...a,ref:u})},`PopperAnchor`)),vo=`PopperContent`,[yo,bo]=uo(vo),xo=i.forwardRef(co(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:s=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:m=`partial`,hideWhenDetached:h=!1,updatePositionStrategy:g=`optimized`,onPlaced:_,...v}=e,y=mo(vo,n),[b,x]=i.useState(null),S=l(t,x),[C,w]=i.useState(null),T=Ar(C),E=T?.width??0,D=T?.height??0,O=r+(o===`center`?``:`-`+o),A=typeof p==`number`?p:{top:0,right:0,bottom:0,left:0,...p},j=Array.isArray(f)?f:[f],M=j.length>0,N={padding:A,boundary:j.filter(To),altBoundary:M},{refs:P,floatingStyles:ee,placement:F,isPositioned:I,middlewareData:L}=Xa({strategy:`fixed`,placement:O,whileElementsMounted:co((...e)=>Ia(...e,{animationFrame:g===`always`}),`whileElementsMounted`),elements:{reference:y.anchor},middleware:[Qa({mainAxis:a+D,alignmentAxis:s}),u&&$a({mainAxis:!0,crossAxis:!1,limiter:m===`partial`?eo():void 0,...N}),u&&to({...N}),no({...N,apply:co(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),C&&io({element:C,padding:c}),Eo({arrowWidth:E,arrowHeight:D}),h&&ro({strategy:`referenceHidden`,...N,boundary:M?N.boundary:void 0})]}),te=y.setPlacementState;B(()=>(te(F),()=>{te(void 0)}),[F,te]);let[ne,R]=Do(F),re=U(_);B(()=>{I&&re?.()},[I,re]);let ie=L.arrow?.x,ae=L.arrow?.y,oe=L.arrow?.centerOffset!==0,[se,ce]=i.useState();return B(()=>{b&&ce(window.getComputedStyle(b).zIndex)},[b]),(0,d.jsx)(`div`,{ref:P.setFloating,"data-radix-popper-content-wrapper":``,style:{...ee,transform:I?ee.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:se,"--radix-popper-transform-origin":[L.transformOrigin?.x,L.transformOrigin?.y].join(` `),...L.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,d.jsx)(yo,{scope:n,placedSide:ne,placedAlign:R,onArrowChange:w,arrowX:ie,arrowY:ae,shouldHideArrow:oe,children:(0,d.jsx)(k.div,{"data-side":ne,"data-align":R,...v,ref:S,style:{...v.style,animation:I?v.style?.animation:`none`}})})})},`PopperContent`)),So=`PopperArrow`,Co={top:`bottom`,right:`left`,bottom:`top`,left:`right`},wo=i.forwardRef(co(function(e,t){let{__scopePopper:n,...r}=e,i=bo(So,n),a=Co[i.placedSide];return(0,d.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,d.jsx)(oo,{...r,ref:t,style:{...r.style,display:`block`}})})},`PopperArrow`));function To(e){return e!==null}co(To,`isNotNull`);var Eo=co(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Do(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function Do(e){let[t,n=`center`]=e.split(`-`);return[t,n]}co(Do,`getSideAndAlignFromPlacement`);var Oo=ho,ko=_o,Ao=xo,jo=wo,Mo=Object.defineProperty,No=(e,t)=>Mo(e,`name`,{value:t,configurable:!0}),Po=!1;function Fo(){let[e,t]=i.useState(Po);return i.useEffect(()=>{Po||(Po=!0,t(!0))},[]),e}No(Fo,`useIsHydrated`);var Io=i.useSyncExternalStore;function Lo(){return()=>{}}No(Lo,`subscribe`);function Ro(){return Io(Lo,()=>!0,()=>!1)}No(Ro,`useIsHydratedModern`);var zo=typeof Io==`function`?Ro:Fo,Bo=Object.defineProperty,Vo=(e,t)=>Bo(e,`name`,{value:t,configurable:!0}),Ho=`rovingFocusGroup.onEntryFocus`,Uo={bubbles:!1,cancelable:!0},Wo=`RovingFocusGroup`,[Go,Ko,qo]=re(Wo),[Jo,Yo]=L(Wo,[qo]),[Xo,Zo]=Jo(Wo),Qo=i.forwardRef(Vo(function(e,t){return(0,d.jsx)(Go.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)(Go.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)($o,{...e,ref:t})})})},`RovingFocusGroup`)),$o=i.forwardRef(Vo(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:f,preventScrollOnEntryFocus:p=!1,...m}=e,h=i.useRef(null),g=l(t,h),_=Ye(o),[v,y]=ke({prop:s,defaultProp:c??null,onChange:u,caller:Wo}),[b,x]=i.useState(!1),S=U(f),C=Ko(n),w=i.useRef(!1),[T,E]=i.useState(0);return i.useEffect(()=>{let e=h.current;if(e)return e.addEventListener(Ho,S),()=>e.removeEventListener(Ho,S)},[S]),(0,d.jsx)(Xo,{scope:n,orientation:r,dir:_,loop:a,currentTabStopId:v,onItemFocus:i.useCallback(e=>y(e),[y]),onItemShiftTab:i.useCallback(()=>x(!0),[]),onFocusableItemAdd:i.useCallback(()=>E(e=>e+1),[]),onFocusableItemRemove:i.useCallback(()=>E(e=>e-1),[]),children:(0,d.jsx)(k.div,{tabIndex:b||T===0?-1:0,"data-orientation":r,...m,ref:g,style:{outline:`none`,...e.style},onMouseDown:z(e.onMouseDown,()=>{w.current=!0}),onFocus:z(e.onFocus,e=>{let t=!w.current;if(e.target===e.currentTarget&&t&&!b){let t=new CustomEvent(Ho,Uo);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=C().filter(e=>e.focusable);as([e.find(e=>e.active),e.find(e=>e.id===v),...e].filter(Boolean).map(e=>e.ref.current),p)}}w.current=!1}),onBlur:z(e.onBlur,()=>x(!1))})})},`RovingFocusGroupImpl`)),es=`RovingFocusGroupItem`,ts=i.forwardRef(Vo(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:o,children:s,...c}=e,l=H(),u=o||l,f=Zo(es,n),p=f.currentTabStopId===u,m=Ko(n),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:_}=f,v=zo();return B(()=>{if(!(!v||!r))return h(),()=>g()},[v,r,h,g]),i.useEffect(()=>{if(!(v||!r))return h(),()=>g()},[v,r,h,g]),(0,d.jsx)(Go.ItemSlot,{scope:n,id:u,focusable:r,active:a,children:(0,d.jsx)(k.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...c,ref:t,onMouseDown:z(e.onMouseDown,e=>{r?f.onItemFocus(u):e.preventDefault()}),onFocus:z(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:z(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){f.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=is(e,f.orientation,f.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=m().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=f.loop?os(n,r+1):n.slice(r+1)}setTimeout(()=>as(n))}}),children:typeof s==`function`?s({isCurrentTabStop:p,hasTabStop:_!=null}):s})})},`RovingFocusGroupItem`)),ns={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function rs(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}Vo(rs,`getDirectionAwareKey`);function is(e,t,n){let r=rs(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return ns[r]}Vo(is,`getFocusIntent`);function as(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}Vo(as,`focusFirst`);function os(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Vo(os,`wrapArray`);var ss=Qo,cs=ts,ls=Object.defineProperty,Y=(e,t)=>ls(e,`name`,{value:t,configurable:!0}),us=[`Enter`,` `],ds=[`ArrowDown`,`PageUp`,`Home`],fs=[`ArrowUp`,`PageDown`,`End`],ps=[...ds,...fs];[...us],[...us];var ms=`Menu`,[hs,gs,_s]=re(ms),[vs,ys]=L(ms,[_s,fo,Yo]),bs=fo(),xs=Yo(),[Ss,Cs]=vs(ms),[ws,Ts]=vs(ms),Es=Y(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:o,modal:s=!0}=e,c=bs(t),[l,u]=i.useState(null),f=i.useRef(!1),p=U(o),m=Ye(a);return i.useEffect(()=>{let e=Y(()=>{f.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=Y(()=>f.current=!1,`handlePointer`);return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),i.useEffect(()=>{if(!n)return;let e=Y(()=>p(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,p]),(0,d.jsx)(Oo,{...c,children:(0,d.jsx)(Ss,{scope:t,open:n,onOpenChange:p,content:l,onContentChange:u,children:(0,d.jsx)(ws,{scope:t,onClose:i.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:m,modal:s,children:r})})})},`Menu`),Ds=i.forwardRef(Y(function(e,t){let{__scopeMenu:n,...r}=e,i=bs(n);return(0,d.jsx)(ko,{...i,...r,ref:t})},`MenuAnchor`)),Os=`MenuPortal`,[ks,As]=vs(Os,{forceMount:void 0}),js=Y(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=Cs(Os,t);return(0,d.jsx)(ks,{scope:t,forceMount:n,children:(0,d.jsx)(V,{present:n||a.open,children:(0,d.jsx)(Ot,{asChild:!0,container:i,children:r})})})},`MenuPortal`),Ms=`MenuContent`,[Ns,Ps]=vs(Ms),Fs=i.forwardRef(Y(function(e,t){let n=As(Ms,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Cs(Ms,e.__scopeMenu),o=Ts(Ms,e.__scopeMenu);return(0,d.jsx)(hs.Provider,{scope:e.__scopeMenu,children:(0,d.jsx)(V,{present:r||a.open,children:(0,d.jsx)(hs.Slot,{scope:e.__scopeMenu,children:o.modal?(0,d.jsx)(Is,{...i,ref:t}):(0,d.jsx)(Ls,{...i,ref:t})})})})},`MenuContent`)),Is=i.forwardRef(Y(function(e,t){let n=Cs(Ms,e.__scopeMenu),r=i.useRef(null),a=l(t,r);return i.useEffect(()=>{let e=r.current;if(e)return $n(e)},[]),(0,d.jsx)(zs,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:z(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),Ls=i.forwardRef(Y(function(e,t){let n=Cs(Ms,e.__scopeMenu);return(0,d.jsx)(zs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),Rs=m(`MenuContent.ScrollLock`),zs=i.forwardRef(Y(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:h,onDismiss:g,disableOutsideScroll:_,...v}=e,y=Cs(Ms,n),b=Ts(Ms,n),x=bs(n),S=xs(n),C=gs(n),[w,T]=i.useState(null),E=i.useRef(null),D=l(t,E,y.onContentChange),O=i.useRef(0),k=i.useRef(``),A=i.useRef(0),j=i.useRef(null),M=i.useRef(`right`),N=i.useRef(0),P=_?Wn:i.Fragment,ee=_?{as:Rs,allowPinchZoom:!0}:void 0,F=Y(e=>{let t=k.current+e,n=C().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=nc(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;Y((function e(t){k.current=t,window.clearTimeout(O.current),t!==``&&(O.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(t),o&&setTimeout(()=>o.focus())},`handleTypeaheadSearch`);i.useEffect(()=>()=>window.clearTimeout(O.current),[]),Pt();let I=i.useCallback(e=>M.current===j.current?.side&&ic(e,j.current?.area),[]);return(0,d.jsx)(Ns,{scope:n,searchRef:k,onItemEnter:i.useCallback(e=>{I(e)&&e.preventDefault()},[I]),onItemLeave:i.useCallback(e=>{I(e)||(E.current?.focus(),T(null))},[I]),onTriggerLeave:i.useCallback(e=>{I(e)&&e.preventDefault()},[I]),pointerGraceTimerRef:A,onPointerGraceIntentChange:i.useCallback(e=>{j.current=e},[]),children:(0,d.jsx)(P,{...ee,children:(0,d.jsx)(ht,{asChild:!0,trapped:a,onMountAutoFocus:z(o,e=>{e.preventDefault(),E.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:(0,d.jsx)(it,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:h,onDismiss:g,children:(0,d.jsx)(ss,{asChild:!0,...S,dir:b.dir,orientation:`vertical`,loop:r,currentTabStopId:w,onCurrentTabStopIdChange:T,onEntryFocus:z(u,e=>{b.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,d.jsx)(Ao,{role:`menu`,"aria-orientation":`vertical`,"data-state":Zs(y.open),"data-radix-menu-content":``,dir:b.dir,...x,...v,ref:D,style:{outline:`none`,...v.style},onKeyDown:z(v.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&F(e.key));let i=E.current;if(e.target!==i||!ps.includes(e.key))return;e.preventDefault();let a=C().filter(e=>!e.disabled).map(e=>e.ref.current);fs.includes(e.key)&&a.reverse(),ec(a)}),onBlur:z(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(O.current),k.current=``)}),onPointerMove:z(e.onPointerMove,ac(e=>{let t=e.target,n=N.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>N.current?`right`:`left`;M.current=t,N.current=e.clientX}}))})})})})})})},`MenuContentImpl`)),Bs=`MenuItem`,Vs=`menu.itemSelect`,Hs=i.forwardRef(Y(function(e,t){let{disabled:n=!1,onSelect:r,...a}=e,o=i.useRef(null),s=Ts(Bs,e.__scopeMenu),c=Ps(Bs,e.__scopeMenu),u=l(t,o),f=i.useRef(!1),p=Y(()=>{let e=o.current;if(!n&&e){let t=new CustomEvent(Vs,{bubbles:!0,cancelable:!0});e.addEventListener(Vs,e=>r?.(e),{once:!0}),A(e,t),t.defaultPrevented?f.current=!1:s.onClose()}},`handleSelect`);return(0,d.jsx)(Us,{...a,ref:u,disabled:n,onClick:z(e.onClick,p),onPointerDown:t=>{e.onPointerDown?.(t),f.current=!0},onPointerUp:z(e.onPointerUp,e=>{f.current||e.currentTarget?.click()}),onKeyDown:z(e.onKeyDown,e=>{n||e.target!==e.currentTarget||(c.searchRef.current===``||e.key!==` `)&&us.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),Us=i.forwardRef(Y(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:a,...o}=e,s=Ps(Bs,n),c=xs(n),u=i.useRef(null),f=l(t,u),[p,m]=i.useState(!1),[h,g]=i.useState(``);return i.useEffect(()=>{let e=u.current;e&&g((e.textContent??``).trim())},[o.children]),(0,d.jsx)(hs.ItemSlot,{scope:n,disabled:r,textValue:a??h,children:(0,d.jsx)(cs,{asChild:!0,...c,focusable:!r,children:(0,d.jsx)(k.div,{role:`menuitem`,"data-highlighted":p?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...o,ref:f,onPointerMove:z(e.onPointerMove,ac(e=>{r?s.onItemLeave(e):(s.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:z(e.onPointerLeave,ac(e=>s.onItemLeave(e))),onFocus:z(e.onFocus,()=>m(!0)),onBlur:z(e.onBlur,()=>m(!1))})})})},`MenuItemImpl`)),[Ws,Gs]=vs(`MenuRadioGroup`,{value:void 0,onValueChange:Y(()=>{},`onValueChange`)}),[Ks,qs]=vs(`MenuItemIndicator`,{checked:!1}),Js=i.forwardRef(Y(function(e,t){let{__scopeMenu:n,...r}=e;return(0,d.jsx)(k.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})},`MenuSeparator`)),[Ys,Xs]=vs(`MenuSub`);function Zs(e){return e?`open`:`closed`}Y(Zs,`getOpenState`);function Qs(e){return e===`indeterminate`}Y(Qs,`isIndeterminate`);function $s(e){return Qs(e)?`indeterminate`:e?`checked`:`unchecked`}Y($s,`getCheckedState`);function ec(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}Y(ec,`focusFirst`);function tc(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Y(tc,`wrapArray`);function nc(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=tc(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}Y(nc,`getNextMatch`);function rc(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}Y(rc,`isPointInPolygon`);function ic(e,t){return t?rc({x:e.clientX,y:e.clientY},t):!1}Y(ic,`isPointerInGraceArea`);function ac(e){return t=>t.pointerType===`mouse`?e(t):void 0}Y(ac,`whenMouse`);var oc=Es,sc=Ds,cc=js,lc=Fs,uc=Hs,dc=Js,fc=Object.defineProperty,pc=(e,t)=>fc(e,`name`,{value:t,configurable:!0}),mc=`DropdownMenu`,[hc,gc]=L(mc,[ys]),_c=ys(),[vc,yc]=hc(mc),bc=pc(e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:o,onOpenChange:s,modal:c=!0}=e,l=_c(t),u=i.useRef(null),[f,p]=ke({prop:a,defaultProp:o??!1,onChange:s,caller:mc});return(0,d.jsx)(vc,{scope:t,triggerId:H(),triggerRef:u,contentId:H(),open:f,onOpenChange:p,onOpenToggle:i.useCallback(()=>p(e=>!e),[p]),modal:c,children:(0,d.jsx)(oc,{...l,open:f,onOpenChange:p,dir:r,modal:c,children:n})})},`DropdownMenu`),xc=`DropdownMenuTrigger`,Sc=i.forwardRef(pc(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=yc(xc,n),o=_c(n),s=l(t,a.triggerRef);return(0,d.jsx)(sc,{asChild:!0,...o,children:(0,d.jsx)(k.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:z(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:z(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),Cc=pc(e=>{let{__scopeDropdownMenu:t,...n}=e,r=_c(t);return(0,d.jsx)(cc,{...r,...n})},`DropdownMenuPortal`),wc=`DropdownMenuContent`,Tc=i.forwardRef(pc(function(e,t){let{__scopeDropdownMenu:n,...r}=e,a=yc(wc,n),o=_c(n),s=i.useRef(!1);return(0,d.jsx)(lc,{id:a.contentId,"aria-labelledby":a.triggerId,...o,...r,ref:t,onCloseAutoFocus:z(e.onCloseAutoFocus,e=>{s.current||a.triggerRef.current?.focus(),s.current=!1,e.preventDefault()}),onInteractOutside:z(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!a.modal||r)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuContent`)),Ec=i.forwardRef(pc(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=_c(n);return(0,d.jsx)(uc,{...i,...r,ref:t})},`DropdownMenuItem`)),Dc=i.forwardRef(pc(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=_c(n);return(0,d.jsx)(dc,{...i,...r,ref:t})},`DropdownMenuSeparator`)),Oc=bc,kc=Sc,Ac=Cc,jc=Tc,Mc=Ec,Nc=Dc,Pc=Object.defineProperty,Fc=(e,t)=>Pc(e,`name`,{value:t,configurable:!0});function Ic(e){let t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}Fc(Ic,`usePrevious`);var Lc=Object.defineProperty,Rc=(e,t)=>Lc(e,`name`,{value:t,configurable:!0});function zc(e,[t,n]){return Math.min(n,Math.max(t,e))}Rc(zc,`clamp`);var Bc=Object.defineProperty,Vc=(e,t)=>Bc(e,`name`,{value:t,configurable:!0}),Hc=`Popover`,[Uc,Wc]=L(Hc,[fo]),Gc=fo(),[Kc,qc]=Uc(Hc),Jc=Vc(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:s=!1}=e,c=Gc(t),l=i.useRef(null),[u,f]=i.useState(!1),[p,m]=ke({prop:r,defaultProp:a??!1,onChange:o,caller:Hc});return(0,d.jsx)(Oo,{...c,children:(0,d.jsx)(Kc,{scope:t,contentId:H(),triggerRef:l,open:p,onOpenChange:m,onOpenToggle:i.useCallback(()=>m(e=>!e),[m]),hasCustomAnchor:u,onCustomAnchorAdd:i.useCallback(()=>f(!0),[]),onCustomAnchorRemove:i.useCallback(()=>f(!1),[]),modal:s,children:n})})},`Popover`),Yc=`PopoverTrigger`,Xc=i.forwardRef(Vc(function(e,t){let{__scopePopover:n,...r}=e,i=qc(Yc,n),a=Gc(n),o=l(t,i.triggerRef),s=(0,d.jsx)(k.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":sl(i.open),...r,ref:o,onClick:z(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,d.jsx)(ko,{asChild:!0,...a,children:s})},`PopoverTrigger`)),Zc=`PopoverPortal`,[Qc,$c]=Uc(Zc,{forceMount:void 0}),el=Vc(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=qc(Zc,t);return(0,d.jsx)(Qc,{scope:t,forceMount:n,children:(0,d.jsx)(V,{present:n||a.open,children:(0,d.jsx)(Ot,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),tl=`PopoverContent`,nl=i.forwardRef(Vc(function(e,t){let n=$c(tl,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=qc(tl,e.__scopePopover);return(0,d.jsx)(V,{present:r||a.open,children:a.modal?(0,d.jsx)(il,{...i,ref:t}):(0,d.jsx)(al,{...i,ref:t})})},`PopoverContent`)),rl=m(`PopoverContent.RemoveScroll`),il=i.forwardRef(Vc(function(e,t){let n=qc(tl,e.__scopePopover),r=i.useRef(null),a=l(t,r),o=i.useRef(!1);return i.useEffect(()=>{let e=r.current;if(e)return $n(e)},[]),(0,d.jsx)(Wn,{as:rl,allowPinchZoom:!0,children:(0,d.jsx)(ol,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:z(e.onCloseAutoFocus,e=>{e.preventDefault(),o.current||n.triggerRef.current?.focus()}),onPointerDownOutside:z(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;o.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:z(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),al=i.forwardRef(Vc(function(e,t){let n=qc(tl,e.__scopePopover),r=i.useRef(!1),a=i.useRef(!1);return(0,d.jsx)(ol,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(a.current=!0));let i=t.target;n.triggerRef.current?.contains(i)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&a.current&&t.preventDefault()}})},`PopoverContentNonModal`)),ol=i.forwardRef(Vc(function(e,t){let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...f}=e,p=qc(tl,n),m=Gc(n);return Pt(),(0,d.jsx)(ht,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,d.jsx)(it,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>p.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,d.jsx)(Ao,{"data-state":sl(p.open),role:`dialog`,id:p.contentId,...m,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})},`PopoverContentImpl`));function sl(e){return e?`open`:`closed`}Vc(sl,`getState`);var cl=Jc,ll=Xc,ul=el,dl=nl,fl=Object.defineProperty,X=(e,t)=>fl(e,`name`,{value:t,configurable:!0}),pl=`Radio`,[ml,hl]=L(pl),[gl,_l]=ml(pl);function vl(e){let{__scopeRadio:t,checked:n=!1,children:r,disabled:a,form:o,name:s,onCheck:c,required:l,value:u=`on`,internal_do_not_use_render:f}=e,[p,m]=i.useState(null),[h,g]=i.useState(null),_=i.useRef(!1),[v,y]=i.useReducer(e=>e+1,0),b={checked:n,disabled:a,required:l,name:s,form:o,value:u,control:p,setControl:m,hasConsumerStoppedPropagationRef:_,userInteractionCount:v,onUserInteraction:y,isFormControl:!p||!!o||!!p.closest(`form`),bubbleInput:h,setBubbleInput:g,onCheck:X(()=>c?.(),`onCheck`)};return(0,d.jsx)(gl,{scope:t,...b,children:Tl(f)?f(b):r})}X(vl,`RadioProvider`);var yl=`RadioTrigger`,bl=i.forwardRef(X(function({__scopeRadio:e,onClick:t,...n},r){let{checked:i,disabled:a,value:o,setControl:s,onCheck:c,hasConsumerStoppedPropagationRef:u,onUserInteraction:f,isFormControl:p,bubbleInput:m}=_l(yl,e),h=l(r,s);return(0,d.jsx)(k.button,{type:`button`,role:`radio`,"aria-checked":i,"data-state":El(i),"data-disabled":a?``:void 0,disabled:a,value:o,...n,ref:h,onClick:z(t,e=>{i||(f(),c()),m&&p&&(u.current=e.isPropagationStopped(),u.current||e.stopPropagation())})})},`RadioTrigger`)),xl=`RadioIndicator`,Sl=i.forwardRef(X(function(e,t){let{__scopeRadio:n,forceMount:r,...i}=e,a=_l(xl,n);return(0,d.jsx)(V,{present:r||a.checked,children:(0,d.jsx)(k.span,{"data-state":El(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t})})},`RadioIndicator`)),Cl=`RadioBubbleInput`,wl=i.forwardRef(X(function({__scopeRadio:e,onClick:t,...n},r){let{control:a,checked:o,required:s,disabled:c,name:u,value:f,form:p,bubbleInput:m,setBubbleInput:h,hasConsumerStoppedPropagationRef:g,userInteractionCount:_}=_l(Cl,e),v=l(r,h),y=Ar(a),b=i.useRef(!1),x=i.useRef(o),S=i.useRef(_);i.useEffect(()=>{let e=m;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=_!==S.current;S.current=_;let i=x.current!==o;x.current=o;let a=!(r&&g.current);if(i&&n){b.current=!r;let t=new Event(`click`,{bubbles:a});n.call(e,o),e.dispatchEvent(t),b.current=!1}},[m,o,g,_]);let C=i.useRef(o);return(0,d.jsx)(k.input,{type:`radio`,"aria-hidden":!0,defaultChecked:C.current,required:s,disabled:c,name:u,value:f,form:p,...n,tabIndex:-1,ref:v,onClick:z(t,e=>{b.current&&e.stopPropagation()}),style:{...n.style,...y,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`RadioBubbleInput`));function Tl(e){return typeof e==`function`}X(Tl,`isFunction`);function El(e){return e?`checked`:`unchecked`}X(El,`getState`);var Dl=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],Ol=`RadioGroup`,[kl,Al]=L(Ol,[Yo,hl]),jl=Yo(),Ml=hl(),[Nl,Pl]=kl(Ol),Fl=i.forwardRef(X(function(e,t){let{__scopeRadioGroup:n,name:r,form:a,defaultValue:o,value:s,required:c=!1,disabled:u=!1,orientation:f,dir:p,loop:m=!0,onValueChange:h,...g}=e,_=jl(n),v=Ye(p),[y,b]=ke({prop:s,defaultProp:o??null,onChange:h,caller:Ol}),[x,S]=i.useState(null),C=l(t,S),w=i.useRef(y);return i.useEffect(()=>{let e=a?x?.ownerDocument.getElementById(a):x?.closest(`form`);if(e instanceof HTMLFormElement){let t=X(()=>b(w.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[x,a,b]),(0,d.jsx)(Nl,{scope:n,name:r,form:a,required:c,disabled:u,value:y,onValueChange:b,children:(0,d.jsx)(ss,{asChild:!0,..._,orientation:f,dir:v,loop:m,children:(0,d.jsx)(k.div,{role:`radiogroup`,"aria-required":c,"aria-orientation":f,"data-disabled":u?``:void 0,dir:v,...g,ref:C})})})},`RadioGroup`)),Il=`RadioGroupItemProvider`,Ll=`RadioGroupItemTrigger`;function Rl(e){let{__scopeRadioGroup:t,value:n,disabled:r,children:i,internal_do_not_use_render:a}=e,o=Pl(Il,t),s=Ml(t),c=o.disabled||r;return(0,d.jsx)(vl,{...s,checked:o.value===n,disabled:c,required:o.required,name:o.name,form:o.form,value:n,onCheck:()=>o.onValueChange(n),internal_do_not_use_render:a,children:i})}X(Rl,`RadioGroupItemProvider`);var zl=i.forwardRef(X(function(e,t){let{__scopeRadioGroup:n,...r}=e,a=jl(n),o=Ml(n),{checked:s,disabled:c}=_l(Ll,o.__scopeRadio),u=i.useRef(null),f=l(t,u),p=i.useRef(!1);return i.useEffect(()=>{let e=X(e=>{Dl.includes(e.key)&&(p.current=!0)},`handleKeyDown`),t=X(()=>p.current=!1,`handleKeyUp`);return document.addEventListener(`keydown`,e),document.addEventListener(`keyup`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`keyup`,t)}},[]),(0,d.jsx)(cs,{asChild:!0,...a,focusable:!c,active:s,children:(0,d.jsx)(bl,{...o,...r,ref:f,onKeyDown:z(r.onKeyDown,e=>{e.key===`Enter`&&e.preventDefault()}),onFocus:z(r.onFocus,()=>{p.current&&u.current?.click()})})})},`RadioGroupItemTrigger`)),Bl=i.forwardRef(X(function(e,t){let{__scopeRadioGroup:n,value:r,disabled:i,...a}=e;return(0,d.jsx)(Rl,{__scopeRadioGroup:n,value:r,disabled:i,internal_do_not_use_render:({isFormControl:e})=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(zl,{...a,ref:t,__scopeRadioGroup:n}),e&&(0,d.jsx)(Vl,{__scopeRadioGroup:n})]})})},`RadioGroupItem`)),Vl=i.forwardRef(X(function(e,t){let{__scopeRadioGroup:n,...r}=e,i=Ml(n);return(0,d.jsx)(wl,{...i,...r,ref:t})},`RadioGroupItemBubbleInput`)),Hl=i.forwardRef(X(function(e,t){let{__scopeRadioGroup:n,...r}=e,i=Ml(n);return(0,d.jsx)(Sl,{...i,...r,ref:t})},`RadioGroupIndicator`)),Ul=Object.defineProperty,Z=(e,t)=>Ul(e,`name`,{value:t,configurable:!0}),Wl=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Gl=[` `,`Enter`],Kl=`Select`,[ql,Jl,Yl]=re(Kl),[Xl,Zl]=L(Kl,[Yl,fo]),Ql=fo(),[$l,eu]=Xl(Kl),[tu,nu]=Xl(Kl);function ru(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:o,value:s,defaultValue:c,onValueChange:l,dir:u,name:f,autoComplete:p,disabled:m,required:h,form:g,internal_do_not_use_render:_}=e,v=Ql(t),[y,b]=i.useState(null),[x,S]=i.useState(null),[C,w]=i.useState(!1),T=Ye(u),[E,D]=ke({prop:r,defaultProp:a??!1,onChange:o,caller:Kl}),[O,k]=ke({prop:s,defaultProp:c,onChange:l,caller:Kl}),A=i.useRef(null),j=i.useRef(O);i.useEffect(()=>{let e=g?y?.ownerDocument.getElementById(g):y?.form;if(e instanceof HTMLFormElement){let t=Z(()=>k(j.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[g,y,k]);let M=!y||!!g||!!y.closest(`form`),[N,P]=i.useState(new Set),ee=H(),F=Array.from(N).map(e=>e.props.value).join(`;`),I=i.useCallback(e=>{P(t=>new Set(t).add(e))},[]),L=i.useCallback(e=>{P(t=>{let n=new Set(t);return n.delete(e),n})},[]),te={required:h,trigger:y,onTriggerChange:b,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:C,onValueNodeHasChildrenChange:w,contentId:ee,value:O,onValueChange:k,open:E,onOpenChange:D,dir:T,triggerPointerDownPosRef:A,disabled:m,name:f,autoComplete:p,form:g,nativeOptions:N,nativeSelectKey:F,isFormControl:M};return(0,d.jsx)(Oo,{...v,children:(0,d.jsx)($l,{scope:t,...te,children:(0,d.jsx)(ql.Provider,{scope:t,children:(0,d.jsx)(tu,{scope:t,onNativeOptionAdd:I,onNativeOptionRemove:L,children:Ru(_)?_(te):n})})})})}Z(ru,`SelectProvider`);var iu=Z(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,d.jsx)(ru,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,d.jsxs)(d.Fragment,{children:[n,e?(0,d.jsx)(Lu,{__scopeSelect:t}):null]})})},`Select`),au=`SelectTrigger`,ou=i.forwardRef(Z(function(e,t){let{__scopeSelect:n,disabled:r=!1,...a}=e,o=Ql(n),s=eu(au,n),c=s.disabled||r,u=l(t,s.onTriggerChange),f=Jl(n),p=i.useRef(`touch`),[m,h,g]=Bu(e=>{let t=f().filter(e=>!e.disabled),n=Vu(t,e,t.find(e=>e.value===s.value));n!==void 0&&s.onValueChange(n.value)}),_=Z(e=>{c||(s.onOpenChange(!0),g()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,d.jsx)(ko,{asChild:!0,...o,children:(0,d.jsx)(k.button,{type:`button`,role:`combobox`,"aria-controls":s.open?s.contentId:void 0,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":`none`,dir:s.dir,"data-state":s.open?`open`:`closed`,disabled:c,"data-disabled":c?``:void 0,"data-placeholder":zu(s.value)?``:void 0,...a,ref:u,onClick:z(a.onClick,e=>{e.currentTarget.focus(),p.current!==`mouse`&&_(e)}),onPointerDown:z(a.onPointerDown,e=>{p.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(_(e),e.preventDefault())}),onKeyDown:z(a.onKeyDown,e=>{let t=m.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&h(e.key),!(t&&e.key===` `)&&Wl.includes(e.key)&&(_(),e.preventDefault())})})})},`SelectTrigger`)),su=`SelectValue`,cu=i.forwardRef(Z(function(e,t){let{__scopeSelect:n,className:r,style:a,children:o,placeholder:s=``,...c}=e,u=eu(su,n),{onValueNodeHasChildrenChange:f}=u,p=o!==void 0,m=l(t,u.onValueNodeChange);B(()=>{f(p)},[f,p]);let h=zu(u.value);return(0,d.jsx)(k.span,{...c,asChild:!h&&c.asChild,ref:m,style:{pointerEvents:`none`},children:(0,d.jsx)(i.Fragment,{children:h?s:o},h?`placeholder`:`value`)})},`SelectValue`)),lu=i.forwardRef(Z(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,d.jsx)(k.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[uu,du]=Xl(`SelectPortal`,{forceMount:void 0}),fu=Z(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,d.jsx)(uu,{scope:e.__scopeSelect,forceMount:n,children:(0,d.jsx)(Ot,{asChild:!0,...r})})},`SelectPortal`),pu=`SelectContent`,mu=i.forwardRef(Z(function(e,t){let n=du(pu,e.__scopeSelect),{forceMount:r=n.forceMount,...a}=e,o=eu(pu,e.__scopeSelect),[s,c]=i.useState();return B(()=>{c(new DocumentFragment)},[]),(0,d.jsx)(V,{present:r||o.open,children:({present:e})=>e?(0,d.jsx)(yu,{...a,ref:t}):(0,d.jsx)(hu,{...a,fragment:s})})},`SelectContent`)),hu=i.forwardRef(Z(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?u.createPortal((0,d.jsx)(gu,{scope:n,children:(0,d.jsx)(ql.Slot,{scope:n,children:(0,d.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),Q=10,[gu,_u]=Xl(pu),vu=m(`SelectContent.RemoveScroll`),yu=i.forwardRef(Z(function(e,t){let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:s,side:c,sideOffset:u,align:f,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:g,sticky:_,hideWhenDetached:v,avoidCollisions:y,...b}=e,x=eu(pu,n),[S,C]=i.useState(null),[w,T]=i.useState(null),E=l(t,C),[D,O]=i.useState(null),[k,A]=i.useState(null),j=Jl(n),[M,N]=i.useState(!1),P=i.useRef(!1);i.useEffect(()=>{if(S)return $n(S)},[S]),Pt();let ee=i.useCallback(e=>{let[t,...n]=j().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&w&&(w.scrollTop=0),n===r&&w&&(w.scrollTop=w.scrollHeight),n?.focus(),document.activeElement!==i))return},[j,w]),F=i.useCallback(()=>ee([D,S]),[ee,D,S]);i.useEffect(()=>{M&&F()},[M,F]);let{onOpenChange:I,triggerPointerDownPosRef:L}=x;i.useEffect(()=>{if(S){let e={x:0,y:0},t=Z(t=>{e={x:Math.abs(Math.round(t.pageX)-(L.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(L.current?.y??0))}},`handlePointerMove`),n=Z(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(S)||I(!1),document.removeEventListener(`pointermove`,t),L.current=null},`handlePointerUp`);return L.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[S,I,L]),i.useEffect(()=>{let e=Z(()=>I(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[I]);let[te,ne]=Bu(e=>{let t=j().filter(e=>!e.disabled),n=Vu(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),R=i.useCallback((e,t,n)=>{let r=!P.current&&!n;(x.value!==void 0&&x.value===t||r)&&(O(e),r&&(P.current=!0))},[x.value]),re=i.useCallback(()=>S?.focus(),[S]),ie=i.useCallback((e,t,n)=>{let r=!P.current&&!n;(x.value!==void 0&&x.value===t||r)&&A(e)},[x.value]),ae=r===`popper`?xu:bu,oe=ae===xu?{side:c,sideOffset:u,align:f,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:g,sticky:_,hideWhenDetached:v,avoidCollisions:y}:{};return(0,d.jsx)(gu,{scope:n,content:S,viewport:w,onViewportChange:T,itemRefCallback:R,selectedItem:D,onItemLeave:re,itemTextRefCallback:ie,focusSelectedItem:F,selectedItemText:k,position:r,isPositioned:M,searchRef:te,children:(0,d.jsx)(Wn,{as:vu,allowPinchZoom:!0,children:(0,d.jsx)(ht,{asChild:!0,trapped:x.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:z(a,e=>{x.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,d.jsx)(it,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:(0,d.jsx)(ae,{role:`listbox`,id:x.contentId,"data-state":x.open?`open`:`closed`,dir:x.dir,onContextMenu:e=>e.preventDefault(),...b,...oe,onPlaced:()=>N(!0),ref:E,style:{display:`flex`,flexDirection:`column`,outline:`none`,...b.style},onKeyDown:z(b.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ne(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=j().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>ee(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),bu=i.forwardRef(Z(function(e,t){let{__scopeSelect:n,onPlaced:r,...a}=e,o=eu(pu,n),s=_u(pu,n),[c,u]=i.useState(null),[f,p]=i.useState(null),m=l(t,p),h=Jl(n),g=i.useRef(!1),_=i.useRef(!0),{viewport:v,selectedItem:y,selectedItemText:b,focusSelectedItem:x}=s,S=i.useCallback(()=>{if(o.trigger&&o.valueNode&&c&&f&&v&&y&&b){let e=o.trigger.getBoundingClientRect(),t=f.getBoundingClientRect(),n=o.valueNode.getBoundingClientRect(),i=b.getBoundingClientRect();if(o.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-Q,d=zc(a,[Q,Math.max(Q,u-l)]);c.style.minWidth=s+`px`,c.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-Q,d=zc(a,[Q,Math.max(Q,u-l)]);c.style.minWidth=s+`px`,c.style.right=d+`px`}let a=h(),s=window.innerHeight-Q*2,l=v.scrollHeight,u=window.getComputedStyle(f),d=parseInt(u.borderTopWidth,10),p=parseInt(u.paddingTop,10),m=parseInt(u.borderBottomWidth,10),_=parseInt(u.paddingBottom,10),x=d+p+l+_+m,S=Math.min(y.offsetHeight*5,x),C=window.getComputedStyle(v),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-Q,D=s-E,O=y.offsetHeight/2,k=y.offsetTop+O,A=d+p+k,j=x-A;if(A<=E){let e=a.length>0&&y===a[a.length-1].ref.current;c.style.bottom=`0px`;let t=f.clientHeight-v.offsetTop-v.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+m);c.style.height=n+`px`}else{let e=a.length>0&&y===a[0].ref.current;c.style.top=`0px`;let t=Math.max(E,d+v.offsetTop+(e?w:0)+O)+j;c.style.height=t+`px`,v.scrollTop=A-E+v.offsetTop}c.style.margin=`${Q}px 0`,c.style.minHeight=S+`px`,c.style.maxHeight=s+`px`,r?.(),requestAnimationFrame(()=>g.current=!0)}},[h,o.trigger,o.valueNode,c,f,v,y,b,o.dir,r]);B(()=>S(),[S]);let[C,w]=i.useState();B(()=>{f&&w(window.getComputedStyle(f).zIndex)},[f]);let T=i.useCallback(e=>{e&&_.current===!0&&(S(),x?.(),_.current=!1)},[S,x]);return(0,d.jsx)(Su,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:g,onScrollButtonChange:T,children:(0,d.jsx)(`div`,{ref:u,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:C},children:(0,d.jsx)(k.div,{...a,ref:m,style:{boxSizing:`border-box`,maxHeight:`100%`,...a.style}})})})},`SelectItemAlignedPosition`)),xu=i.forwardRef(Z(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=Q,...a}=e,o=Ql(n);return(0,d.jsx)(Ao,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[Su,Cu]=Xl(pu,{}),wu=`SelectViewport`,Tu=i.forwardRef(Z(function(e,t){let{__scopeSelect:n,nonce:r,...a}=e,o=_u(wu,n),s=Cu(wu,n),c=l(t,o.onViewportChange),u=i.useRef(0);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,d.jsx)(ql.Slot,{scope:n,children:(0,d.jsx)(k.div,{"data-radix-select-viewport":``,role:`presentation`,...a,ref:c,style:{position:`relative`,flex:1,overflow:`hidden auto`,...a.style},onScroll:z(a.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=s;if(r?.current&&n){let e=Math.abs(u.current-t.scrollTop);if(e>0){let r=window.innerHeight-Q*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}u.current=t.scrollTop})})})]})},`SelectViewport`)),[Eu,Du]=Xl(`SelectGroup`),Ou=`SelectItem`,[ku,Au]=Xl(Ou),ju=i.forwardRef(Z(function(e,t){let{__scopeSelect:n,value:r,disabled:a=!1,textValue:o,...s}=e,c=eu(Ou,n),u=_u(Ou,n),f=c.value===r,[p,m]=i.useState(o??``),[h,g]=i.useState(!1),_=l(t,U(e=>u.itemRefCallback?.(e,r,a))),v=H(),y=i.useRef(`touch`),b=Z(()=>{a||(c.onValueChange(r),c.onOpenChange(!1))},`handleSelect`);return(0,d.jsx)(ku,{scope:n,value:r,disabled:a,textId:v,isSelected:f,onItemTextChange:i.useCallback(e=>{m(t=>t||(e?.textContent??``).trim())},[]),children:(0,d.jsx)(ql.ItemSlot,{scope:n,value:r,disabled:a,textValue:p,children:(0,d.jsx)(k.div,{role:`option`,"aria-labelledby":v,"data-highlighted":h?``:void 0,"aria-selected":f&&h,"data-state":f?`checked`:`unchecked`,"aria-disabled":a||void 0,"data-disabled":a?``:void 0,tabIndex:a?void 0:-1,...s,ref:_,onFocus:z(s.onFocus,()=>g(!0)),onBlur:z(s.onBlur,()=>g(!1)),onClick:z(s.onClick,()=>{y.current!==`mouse`&&b()}),onPointerUp:z(s.onPointerUp,()=>{y.current===`mouse`&&b()}),onPointerDown:z(s.onPointerDown,e=>{y.current=e.pointerType}),onPointerMove:z(s.onPointerMove,e=>{y.current=e.pointerType,a?u.onItemLeave?.():y.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:z(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:z(s.onKeyDown,e=>{a||e.target!==e.currentTarget||(u.searchRef?.current===``||e.key!==` `)&&(Gl.includes(e.key)&&b(),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),Mu=`SelectItemText`,Nu=i.forwardRef(Z(function(e,t){let{__scopeSelect:n,className:r,style:a,...o}=e,s=eu(Mu,n),c=_u(Mu,n),f=Au(Mu,n),p=nu(Mu,n),[m,h]=i.useState(null),g=U(e=>c.itemTextRefCallback?.(e,f.value,f.disabled)),_=l(t,h,f.onItemTextChange,g),v=m?.textContent,y=i.useMemo(()=>(0,d.jsx)(`option`,{value:f.value,disabled:f.disabled,children:v},f.value),[f.disabled,f.value,v]),{onNativeOptionAdd:b,onNativeOptionRemove:x}=p;return B(()=>(b(y),()=>x(y)),[b,x,y]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(k.span,{id:f.textId,...o,ref:_}),f.isSelected&&s.valueNode&&!s.valueNodeHasChildren&&!zu(s.value)?u.createPortal(o.children,s.valueNode):null]})},`SelectItemText`)),Pu=`SelectItemIndicator`,Fu=i.forwardRef(Z(function(e,t){let{__scopeSelect:n,...r}=e;return Au(Pu,n).isSelected?(0,d.jsx)(k.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),Iu=`SelectBubbleInput`,Lu=i.forwardRef(Z(function({__scopeSelect:e,...t},n){let r=eu(Iu,e),{value:a,onValueChange:o,required:s,disabled:c,name:u,autoComplete:f,form:p}=r,{nativeOptions:m,nativeSelectKey:h}=r,g=i.useRef(null),_=l(n,g),v=a??``,y=Ic(v),b=Array.from(m).some(e=>(e.props.value??``)===``);return i.useEffect(()=>{let e=g.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(y!==v&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,v),e.dispatchEvent(t)}},[y,v]),(0,d.jsxs)(k.select,{"aria-hidden":!0,required:s,tabIndex:-1,name:u,autoComplete:f,disabled:c,form:p,onChange:e=>o(e.target.value),...t,style:{...N,...t.style},ref:_,defaultValue:v,children:[zu(a)&&!b?(0,d.jsx)(`option`,{value:``}):null,Array.from(m)]},h)},`SelectBubbleInput`));function Ru(e){return typeof e==`function`}Z(Ru,`isFunction`);function zu(e){return e===``||e===void 0}Z(zu,`shouldShowPlaceholder`);function Bu(e){let t=U(e),n=i.useRef(``),r=i.useRef(0),a=i.useCallback(e=>{let i=n.current+e;t(i),Z((function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(i)},[t]),o=i.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return i.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,o]}Z(Bu,`useTypeaheadSearch`);function Vu(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Hu(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}Z(Vu,`findNextItem`);function Hu(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Z(Hu,`wrapArray`);var Uu=Object.defineProperty,Wu=(e,t)=>Uu(e,`name`,{value:t,configurable:!0}),Gu=`Switch`,[Ku,qu]=L(Gu),[Ju,Yu]=Ku(Gu);function Xu(e){let{__scopeSwitch:t,checked:n,children:r,defaultChecked:a,disabled:o,form:s,name:c,onCheckedChange:l,required:u,value:f=`on`,internal_do_not_use_render:p}=e,[m,h]=ke({prop:n,defaultProp:a??!1,onChange:l,caller:Gu}),[g,_]=i.useState(null),[v,y]=i.useState(null),b=i.useRef(!1),[x,S]=i.useReducer(e=>e+1,0),C={checked:m,setChecked:h,disabled:o,control:g,setControl:_,name:c,form:s,value:f,hasConsumerStoppedPropagationRef:b,userInteractionCount:x,onUserInteraction:S,required:u,defaultChecked:a,isFormControl:!g||!!s||!!g.closest(`form`),bubbleInput:v,setBubbleInput:y};return(0,d.jsx)(Ju,{scope:t,...C,children:id(p)?p(C):r})}Wu(Xu,`SwitchProvider`);var Zu=`SwitchTrigger`,Qu=i.forwardRef(Wu(function({__scopeSwitch:e,onClick:t,...n},r){let{control:a,form:o,value:s,disabled:c,checked:u,required:f,setControl:p,setChecked:m,hasConsumerStoppedPropagationRef:h,onUserInteraction:g,isFormControl:_,bubbleInput:v}=Yu(Zu,e),y=l(r,p),b=i.useRef(u);return i.useEffect(()=>{let e=o?a?.ownerDocument.getElementById(o):a?.form;if(e instanceof HTMLFormElement){let t=Wu(()=>m(b.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,o,m]),(0,d.jsx)(k.button,{type:`button`,role:`switch`,"aria-checked":u,"aria-required":f,"data-state":ad(u),"data-disabled":c?``:void 0,disabled:c,value:s,...n,ref:y,onClick:z(t,e=>{g(),m(e=>!e),v&&_&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())})})},`SwitchTrigger`)),$u=i.forwardRef(Wu(function(e,t){let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...f}=e;return(0,d.jsx)(Xu,{__scopeSwitch:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Qu,{...f,ref:t,__scopeSwitch:n}),e&&(0,d.jsx)(rd,{__scopeSwitch:n})]})})},`Switch`)),ed=`SwitchThumb`,td=i.forwardRef(Wu(function(e,t){let{__scopeSwitch:n,...r}=e,i=Yu(ed,n);return(0,d.jsx)(k.span,{"data-state":ad(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})},`SwitchThumb`)),nd=`SwitchBubbleInput`,rd=i.forwardRef(Wu(function({__scopeSwitch:e,onClick:t,...n},r){let{control:a,hasConsumerStoppedPropagationRef:o,userInteractionCount:s,checked:c,defaultChecked:u,required:f,disabled:p,name:m,value:h,form:g,bubbleInput:_,setBubbleInput:v}=Yu(nd,e),y=l(r,v),b=Ar(a),x=i.useRef(!1),S=i.useRef(c),C=i.useRef(s);i.useEffect(()=>{let e=_;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=s!==C.current;C.current=s;let i=S.current!==c;S.current=c;let a=!(r&&o.current);if(i&&n){x.current=!r;let t=new Event(`click`,{bubbles:a});n.call(e,c),e.dispatchEvent(t),x.current=!1}},[_,c,o,s]);let w=i.useRef(c);return(0,d.jsx)(k.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:u??w.current,required:f,disabled:p,name:m,value:h,form:g,...n,tabIndex:-1,ref:y,onClick:z(t,e=>{x.current&&e.stopPropagation()}),style:{...n.style,...b,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`SwitchBubbleInput`));function id(e){return typeof e==`function`}Wu(id,`isFunction`);function ad(e){return e?`checked`:`unchecked`}Wu(ad,`getState`);var od=Object.defineProperty,$=(e,t)=>od(e,`name`,{value:t,configurable:!0}),[sd,cd]=L(`Tooltip`,[fo]),ld=fo(),ud=`TooltipProvider`,dd=700,fd=`tooltip.open`,[pd,md]=sd(ud),hd=$(e=>{let{__scopeTooltip:t,delayDuration:n=dd,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:o}=e,s=i.useRef(!0),c=i.useRef(!1),l=i.useRef(0);return i.useEffect(()=>{let e=l.current;return()=>window.clearTimeout(e)},[]),(0,d.jsx)(pd,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:i.useCallback(()=>{r<=0||(window.clearTimeout(l.current),s.current=!1)},[r]),onClose:i.useCallback(()=>{r<=0||(window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r))},[r]),isPointerInTransitRef:c,onPointerInTransitChange:i.useCallback(e=>{c.current=e},[]),disableHoverableContent:a,children:o})},`TooltipProvider`),gd=`Tooltip`,[_d,vd]=sd(gd),yd=$(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:a,onOpenChange:o,disableHoverableContent:s,delayDuration:c}=e,l=md(gd,e.__scopeTooltip),u=ld(t),[f,p]=i.useState(null),[m,h]=i.useState(void 0),g=H(),_=i.useRef(0),v=s??l.disableHoverableContent,y=c??l.delayDuration,b=i.useRef(!1),[x,S]=ke({prop:r,defaultProp:a??!1,onChange:$(e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(fd))):l.onClose(),o?.(e)},`onChange`),caller:gd}),C=i.useMemo(()=>x?b.current?`delayed-open`:`instant-open`:`closed`,[x]),w=i.useCallback(()=>{window.clearTimeout(_.current),_.current=0,b.current=!1,S(!0)},[S]),T=i.useCallback(()=>{window.clearTimeout(_.current),_.current=0,S(!1)},[S]),E=i.useCallback(()=>{window.clearTimeout(_.current),_.current=window.setTimeout(()=>{b.current=!0,S(!0),_.current=0},y)},[y,S]);i.useEffect(()=>()=>{_.current&&=(window.clearTimeout(_.current),0)},[]);let D=m??g;return(0,d.jsx)(Oo,{...u,children:(0,d.jsx)(_d,{scope:t,contentId:D,setContentId:h,open:x,stateAttribute:C,trigger:f,onTriggerChange:p,onTriggerEnter:i.useCallback(()=>{l.isOpenDelayedRef.current?E():w()},[l.isOpenDelayedRef,E,w]),onTriggerLeave:i.useCallback(()=>{v?T():(window.clearTimeout(_.current),_.current=0)},[T,v]),onOpen:w,onClose:T,disableHoverableContent:v,children:n})})},`Tooltip`),bd=`TooltipTrigger`,xd=i.forwardRef($(function(e,t){let{__scopeTooltip:n,...r}=e,a=vd(bd,n),o=md(bd,n),s=ld(n),c=l(t,i.useRef(null),a.onTriggerChange),u=i.useRef(!1),f=i.useRef(!1),p=i.useCallback(()=>u.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener(`pointerup`,p),[p]),(0,d.jsx)(ko,{asChild:!0,...s,children:(0,d.jsx)(k.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:c,onPointerMove:z(e.onPointerMove,e=>{e.pointerType!==`touch`&&!f.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),f.current=!0)}),onPointerLeave:z(e.onPointerLeave,()=>{a.onTriggerLeave(),f.current=!1}),onPointerDown:z(e.onPointerDown,()=>{a.open&&a.onClose(),u.current=!0,document.addEventListener(`pointerup`,p,{once:!0})}),onFocus:z(e.onFocus,()=>{u.current||a.onOpen()}),onBlur:z(e.onBlur,a.onClose),onClick:z(e.onClick,a.onClose)})})},`TooltipTrigger`)),Sd=`TooltipPortal`,[Cd,wd]=sd(Sd,{forceMount:void 0}),Td=$(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=vd(Sd,t);return(0,d.jsx)(Cd,{scope:t,forceMount:n,children:(0,d.jsx)(V,{present:n||a.open,children:(0,d.jsx)(Ot,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),Ed=`TooltipContent`,Dd=i.forwardRef($(function(e,t){let n=wd(Ed,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=vd(Ed,e.__scopeTooltip);return(0,d.jsx)(V,{present:r||o.open,children:o.disableHoverableContent?(0,d.jsx)(Ad,{side:i,...a,ref:t}):(0,d.jsx)(Od,{side:i,...a,ref:t})})},`TooltipContent`)),Od=i.forwardRef($(function(e,t){let n=vd(Ed,e.__scopeTooltip),r=md(Ed,e.__scopeTooltip),a=i.useRef(null),o=l(t,a),[s,c]=i.useState(null),{trigger:u,onClose:f}=n,p=a.current,{onPointerInTransitChange:m}=r,h=i.useCallback(()=>{c(null),m(!1)},[m]),g=i.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=Nd(r,Md(r,n.getBoundingClientRect())),a=Pd(t.getBoundingClientRect()),o=Id([...i,...a]);c(o),m(!0)},[m]);return i.useEffect(()=>()=>h(),[h]),i.useEffect(()=>{if(u&&p){let e=$(e=>g(e,p),`handleTriggerLeave`),t=$(e=>g(e,u),`handleContentLeave`);return u.addEventListener(`pointerleave`,e),p.addEventListener(`pointerleave`,t),()=>{u.removeEventListener(`pointerleave`,e),p.removeEventListener(`pointerleave`,t)}}},[u,p,g,h]),i.useEffect(()=>{if(s){let e=$(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=u?.contains(t)||p?.contains(t),i=!Fd(n,s);r?h():i&&(h(),f())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[u,p,s,f,h]),(0,d.jsx)(Ad,{...e,ref:o})},`TooltipContentHoverable`)),kd=g(`TooltipContent`),Ad=i.forwardRef($(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":a,id:o,onEscapeKeyDown:s,onPointerDownOutside:c,...l}=e,u=vd(Ed,n),f=ld(n),{onClose:p}=u;i.useEffect(()=>(document.addEventListener(fd,p),()=>document.removeEventListener(fd,p)),[p]),i.useEffect(()=>{if(u.trigger){let e=$(e=>{e.target instanceof Node&&e.target.contains(u.trigger)&&p()},`handleScroll`);return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[u.trigger,p]);let{setContentId:m}=u;return B(()=>(m(o),()=>{m(void 0)}),[o,m]),(0,d.jsx)(it,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:e=>e.preventDefault(),onDismiss:p,children:(0,d.jsxs)(Ao,{"data-state":u.stateAttribute,role:a?void 0:`tooltip`,id:a?void 0:u.contentId,...f,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,d.jsx)(kd,{children:r}),a?(0,d.jsx)(P,{id:u.contentId,role:`tooltip`,children:a}):null]})})},`TooltipContentImpl`)),jd=i.forwardRef($(function(e,t){let{__scopeTooltip:n,...r}=e,i=ld(n);return(0,d.jsx)(jo,{...i,...r,ref:t})},`TooltipArrow`));function Md(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}$(Md,`getExitSideFromRect`);function Nd(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}$(Nd,`getPaddedExitPoints`);function Pd(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}$(Pd,`getPointsFromRect`);function Fd(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}$(Fd,`isPointInPolygon`);function Id(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),Ld(t)}$(Id,`getHull`);function Ld(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}$(Ld,`getHullPresorted`);var Rd=hd,zd=yd,Bd=xd,Vd=Td,Hd=Dd,Ud=jd;export{Nc as A,Sr as B,ul as C,Mc as D,jc as E,Er as F,_r as I,wr as L,Vr as M,Ur as N,Ac as O,ar as P,pr as R,dl as S,ll as T,sr as V,cu as _,zd as a,Hl as b,td as c,lu as d,ju as f,ou as g,fu as h,Rd as i,kc as j,Oc as k,iu as l,Nu as m,Hd as n,Bd as o,Fu as p,Vd as r,$u as s,Ud as t,mu as u,Tu as v,cl as w,Bl as x,Fl as y,dr as z};
|
|
42
|
-
//# sourceMappingURL=radix-vendor-
|
|
42
|
+
//# sourceMappingURL=radix-vendor-CC__Vkax.js.map
|