@qodo/design-system 0.2.0 → 0.3.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/dist/design-system.css +1 -1
- package/dist/index.cjs.js +46 -26
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +119 -1
- package/dist/index.esm.js +6574 -4301
- package/dist/index.esm.js.map +1 -1
- package/package.json +11 -3
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react"),Ko=require("react-dom");function Yo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const l=Yo(O),er=Yo(Ko),Dl={primary:{50:"#eff6ff",100:"#dbeafe",500:"#3b82f6",600:"#2563eb",900:"#1e3a8a"},secondary:{50:"#f8fafc",100:"#f1f5f9",500:"#64748b",600:"#475569",900:"#0f172a"},success:{50:"#f0fdf4",500:"#22c55e",600:"#16a34a"},error:{50:"#fef2f2",500:"#ef4444",600:"#dc2626"}},Fl={xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"3rem"},Ll={sm:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem"},$l={fontFamily:{sans:["Inter","system-ui","sans-serif"],mono:["JetBrains Mono","monospace"]},fontSize:{xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem"}};var It={exports:{}},mt={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var eo;function Vl(){if(eo)return mt;eo=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,o,s){var a=null;if(s!==void 0&&(a=""+s),o.key!==void 0&&(a=""+o.key),"key"in o){s={};for(var i in o)i!=="key"&&(s[i]=o[i])}else s=o;return o=s.ref,{$$typeof:e,type:n,key:a,ref:o!==void 0?o:null,props:s}}return mt.Fragment=t,mt.jsx=r,mt.jsxs=r,mt}var gt={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var to;function Bl(){return to||(to=1,process.env.NODE_ENV!=="production"&&function(){function e(E){if(E==null)return null;if(typeof E=="function")return E.$$typeof===K?null:E.displayName||E.name||null;if(typeof E=="string")return E;switch(E){case m:return"Fragment";case y:return"Profiler";case g:return"StrictMode";case P:return"Suspense";case N:return"SuspenseList";case W:return"Activity"}if(typeof E=="object")switch(typeof E.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),E.$$typeof){case x:return"Portal";case w:return(E.displayName||"Context")+".Provider";case b:return(E._context.displayName||"Context")+".Consumer";case S:var V=E.render;return E=E.displayName,E||(E=V.displayName||V.name||"",E=E!==""?"ForwardRef("+E+")":"ForwardRef"),E;case k:return V=E.displayName||null,V!==null?V:e(E.type)||"Memo";case R:V=E._payload,E=E._init;try{return e(E(V))}catch{}}return null}function t(E){return""+E}function r(E){try{t(E);var V=!1}catch{V=!0}if(V){V=console;var C=V.error,I=typeof Symbol=="function"&&Symbol.toStringTag&&E[Symbol.toStringTag]||E.constructor.name||"Object";return C.call(V,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",I),t(E)}}function n(E){if(E===m)return"<>";if(typeof E=="object"&&E!==null&&E.$$typeof===R)return"<...>";try{var V=e(E);return V?"<"+V+">":"<...>"}catch{return"<...>"}}function o(){var E=X.A;return E===null?null:E.getOwner()}function s(){return Error("react-stack-top-frame")}function a(E){if(Z.call(E,"key")){var V=Object.getOwnPropertyDescriptor(E,"key").get;if(V&&V.isReactWarning)return!1}return E.key!==void 0}function i(E,V){function C(){q||(q=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",V))}C.isReactWarning=!0,Object.defineProperty(E,"key",{get:C,configurable:!0})}function c(){var E=e(this.type);return F[E]||(F[E]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),E=this.props.ref,E!==void 0?E:null}function u(E,V,C,I,j,_,Y,T){return C=_.ref,E={$$typeof:h,type:E,key:V,props:_,_owner:j},(C!==void 0?C:null)!==null?Object.defineProperty(E,"ref",{enumerable:!1,get:c}):Object.defineProperty(E,"ref",{enumerable:!1,value:null}),E._store={},Object.defineProperty(E._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(E,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(E,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Y}),Object.defineProperty(E,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:T}),Object.freeze&&(Object.freeze(E.props),Object.freeze(E)),E}function f(E,V,C,I,j,_,Y,T){var L=V.children;if(L!==void 0)if(I)if(ee(L)){for(I=0;I<L.length;I++)p(L[I]);Object.freeze&&Object.freeze(L)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else p(L);if(Z.call(V,"key")){L=e(E);var U=Object.keys(V).filter(function(re){return re!=="key"});I=0<U.length?"{key: someKey, "+U.join(": ..., ")+": ...}":"{key: someKey}",te[L+I]||(U=0<U.length?"{"+U.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,j,Z,te,Z),q[Z+j]=!0)}if(Z=null,z!==void 0&&(r(z),Z=""+z),a(N)&&(r(N.key),Z=""+N.key),"key"in N){z={};for(var ce in N)ce!=="key"&&(z[ce]=N[ce])}else z=N;return Z&&i(z,typeof C=="function"?C.displayName||C.name||"Unknown":C),u(C,Z,ee,K,o(),z,ye,W)}function f(C){typeof C=="object"&&C!==null&&C.$$typeof===g&&C._store&&(C._store.validated=1)}var v=I,g=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),w=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),L=Symbol.for("react.client.reference"),B=v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=Object.prototype.hasOwnProperty,H=Array.isArray,F=console.createTask?console.createTask:function(){return null};v={"react-stack-bottom-frame":function(C){return C()}};var Y,_={},$=v["react-stack-bottom-frame"].bind(v,s)(),R=F(n(s)),q={};Ye.Fragment=p,Ye.jsx=function(C,N,z,j,K){var ee=1e4>B.recentlyCreatedOwnerStacks++;return d(C,N,z,!1,j,K,ee?Error("react-stack-top-frame"):$,ee?F(n(C)):R)},Ye.jsxs=function(C,N,z,j,K){var ee=1e4>B.recentlyCreatedOwnerStacks++;return d(C,N,z,!0,j,K,ee?Error("react-stack-top-frame"):$,ee?F(n(C)):R)}}()),Ye}var Mr;function Gs(){return Mr||(Mr=1,process.env.NODE_ENV==="production"?nt.exports=zs():nt.exports=Ws()),nt.exports}var m=Gs();function xn(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=xn(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function yn(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=xn(e))&&(n&&(n+=" "),n+=t);return n}const jr=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Lr=yn,kt=(e,t)=>r=>{var n;if(t?.variants==null)return Lr(e,r?.class,r?.className);const{variants:o,defaultVariants:s}=t,a=Object.keys(o).map(u=>{const d=r?.[u],f=s?.[u];if(d===null)return null;const v=jr(d)||jr(f);return o[u][v]}),i=r&&Object.entries(r).reduce((u,d)=>{let[f,v]=d;return v===void 0||(u[f]=v),u},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,d)=>{let{class:f,className:v,...g}=d;return Object.entries(g).every(b=>{let[p,h]=b;return Array.isArray(h)?h.includes({...s,...i}[p]):{...s,...i}[p]===h})?[...u,f,v]:u},[]);return Lr(e,a,c,r?.class,r?.className)},sr="-",Vs=e=>{const t=Hs(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{const i=a.split(sr);return i[0]===""&&i.length!==1&&i.shift(),wn(i,t)||Bs(a)},getConflictingClassGroupIds:(a,i)=>{const c=r[a]||[];return i&&n[a]?[...c,...n[a]]:c}}},wn=(e,t)=>{if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?wn(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(sr);return t.validators.find(({validator:a})=>a(s))?.classGroupId},Fr=/^\[(.+)\]$/,Bs=e=>{if(Fr.test(e)){const t=Fr.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Hs=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const o in r)Yt(r[o],n,o,t);return n},Yt=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:$r(t,o);s.classGroupId=r;return}if(typeof o=="function"){if(Us(o)){Yt(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([s,a])=>{Yt(a,$r(t,s),r,n)})})},$r=(e,t)=>{let r=e;return t.split(sr).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Us=e=>e.isThemeGetter,Ys=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const o=(s,a)=>{r.set(s,a),t++,t>e&&(t=0,n=r,r=new Map)};return{get(s){let a=r.get(s);if(a!==void 0)return a;if((a=n.get(s))!==void 0)return o(s,a),a},set(s,a){r.has(s)?r.set(s,a):o(s,a)}}},Kt="!",Xt=":",Ks=Xt.length,Xs=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const s=[];let a=0,i=0,c=0,u;for(let b=0;b<o.length;b++){let p=o[b];if(a===0&&i===0){if(p===Xt){s.push(o.slice(c,b)),c=b+Ks;continue}if(p==="/"){u=b;continue}}p==="["?a++:p==="]"?a--:p==="("?i++:p===")"&&i--}const d=s.length===0?o:o.substring(c),f=qs(d),v=f!==d,g=u&&u>c?u-c:void 0;return{modifiers:s,hasImportantModifier:v,baseClassName:f,maybePostfixModifierPosition:g}};if(t){const o=t+Xt,s=n;n=a=>a.startsWith(o)?s(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(r){const o=n;n=s=>r({className:s,parseClassName:o})}return n},qs=e=>e.endsWith(Kt)?e.substring(0,e.length-1):e.startsWith(Kt)?e.substring(1):e,Zs=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const o=[];let s=[];return n.forEach(a=>{a[0]==="["||t[a]?(o.push(...s.sort(),a),s=[]):s.push(a)}),o.push(...s.sort()),o}},Js=e=>({cache:Ys(e.cacheSize),parseClassName:Xs(e),sortModifiers:Zs(e),...Vs(e)}),Qs=/\s+/,ea=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:s}=t,a=[],i=e.trim().split(Qs);let c="";for(let u=i.length-1;u>=0;u-=1){const d=i[u],{isExternal:f,modifiers:v,hasImportantModifier:g,baseClassName:b,maybePostfixModifierPosition:p}=r(d);if(f){c=d+(c.length>0?" "+c:c);continue}let h=!!p,x=n(h?b.substring(0,p):b);if(!x){if(!h){c=d+(c.length>0?" "+c:c);continue}if(x=n(b),!x){c=d+(c.length>0?" "+c:c);continue}h=!1}const y=s(v).join(":"),w=g?y+Kt:y,k=w+x;if(a.includes(k))continue;a.push(k);const A=o(x,h);for(let O=0;O<A.length;++O){const P=A[O];a.push(w+P)}c=d+(c.length>0?" "+c:c)}return c};function ta(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Cn(t))&&(n&&(n+=" "),n+=r);return n}const Cn=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Cn(e[n]))&&(r&&(r+=" "),r+=t);return r};function ra(e,...t){let r,n,o,s=a;function a(c){const u=t.reduce((d,f)=>f(d),e());return r=Js(u),n=r.cache.get,o=r.cache.set,s=i,i(c)}function i(c){const u=n(c);if(u)return u;const d=ea(c,r);return o(c,d),d}return function(){return s(ta.apply(null,arguments))}}const J=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},kn=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,En=/^\((?:(\w[\w-]*):)?(.+)\)$/i,na=/^\d+\/\d+$/,oa=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,sa=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,aa=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ia=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ca=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,De=e=>na.test(e),D=e=>!!e&&!Number.isNaN(Number(e)),we=e=>!!e&&Number.isInteger(Number(e)),Mt=e=>e.endsWith("%")&&D(e.slice(0,-1)),ve=e=>oa.test(e),la=()=>!0,ua=e=>sa.test(e)&&!aa.test(e),Rn=()=>!1,da=e=>ia.test(e),fa=e=>ca.test(e),pa=e=>!S(e)&&!T(e),ma=e=>Ge(e,Sn,Rn),S=e=>kn.test(e),Pe=e=>Ge(e,Tn,ua),jt=e=>Ge(e,xa,D),zr=e=>Ge(e,An,Rn),ga=e=>Ge(e,Pn,fa),ot=e=>Ge(e,On,da),T=e=>En.test(e),Ke=e=>Ve(e,Tn),va=e=>Ve(e,ya),Wr=e=>Ve(e,An),ha=e=>Ve(e,Sn),ba=e=>Ve(e,Pn),st=e=>Ve(e,On,!0),Ge=(e,t,r)=>{const n=kn.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Ve=(e,t,r=!1)=>{const n=En.exec(e);return n?n[1]?t(n[1]):r:!1},An=e=>e==="position"||e==="percentage",Pn=e=>e==="image"||e==="url",Sn=e=>e==="length"||e==="size"||e==="bg-size",Tn=e=>e==="length",xa=e=>e==="number",ya=e=>e==="family-name",On=e=>e==="shadow",wa=()=>{const e=J("color"),t=J("font"),r=J("text"),n=J("font-weight"),o=J("tracking"),s=J("leading"),a=J("breakpoint"),i=J("container"),c=J("spacing"),u=J("radius"),d=J("shadow"),f=J("inset-shadow"),v=J("text-shadow"),g=J("drop-shadow"),b=J("blur"),p=J("perspective"),h=J("aspect"),x=J("ease"),y=J("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...k(),T,S],O=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],E=()=>[T,S,c],M=()=>[De,"full","auto",...E()],L=()=>[we,"none","subgrid",T,S],B=()=>["auto",{span:["full",we,T,S]},we,T,S],U=()=>[we,"auto",T,S],H=()=>["auto","min","max","fr",T,S],F=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],_=()=>["auto",...E()],$=()=>[De,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],R=()=>[e,T,S],q=()=>[...k(),Wr,zr,{position:[T,S]}],C=()=>["no-repeat",{repeat:["","x","y","space","round"]}],N=()=>["auto","cover","contain",ha,ma,{size:[T,S]}],z=()=>[Mt,Ke,Pe],j=()=>["","none","full",u,T,S],K=()=>["",D,Ke,Pe],ee=()=>["solid","dashed","dotted","double"],ye=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],W=()=>[D,Mt,Wr,zr],Z=()=>["","none",b,T,S],te=()=>["none",D,T,S],ce=()=>["none",D,T,S],Ae=()=>[D,T,S],Ie=()=>[De,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ve],breakpoint:[ve],color:[la],container:[ve],"drop-shadow":[ve],ease:["in","out","in-out"],font:[pa],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ve],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ve],shadow:[ve],spacing:["px",D],text:[ve],"text-shadow":[ve],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",De,S,T,h]}],container:["container"],columns:[{columns:[D,S,T,i]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{start:M()}],end:[{end:M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[we,"auto",T,S]}],basis:[{basis:[De,"full","auto",i,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[D,De,"auto","initial","none",S]}],grow:[{grow:["",D,T,S]}],shrink:[{shrink:["",D,T,S]}],order:[{order:[we,"first","last","none",T,S]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:B()}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:B()}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...F(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...F()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":F()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:_()}],mx:[{mx:_()}],my:[{my:_()}],ms:[{ms:_()}],me:[{me:_()}],mt:[{mt:_()}],mr:[{mr:_()}],mb:[{mb:_()}],ml:[{ml:_()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],w:[{w:[i,"screen",...$()]}],"min-w":[{"min-w":[i,"screen","none",...$()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[a]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",r,Ke,Pe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,T,jt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Mt,S]}],"font-family":[{font:[va,S,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,T,S]}],"line-clamp":[{"line-clamp":[D,"none",T,jt]}],leading:[{leading:[s,...E()]}],"list-image":[{"list-image":["none",T,S]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",T,S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[D,"from-font","auto",T,Pe]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[D,"auto",T,S]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",T,S]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",T,S]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:q()}],"bg-repeat":[{bg:C()}],"bg-size":[{bg:N()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},we,T,S],radial:["",T,S],conic:[we,T,S]},ba,ga]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:z()}],"gradient-via-pos":[{via:z()}],"gradient-to-pos":[{to:z()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:j()}],"rounded-s":[{"rounded-s":j()}],"rounded-e":[{"rounded-e":j()}],"rounded-t":[{"rounded-t":j()}],"rounded-r":[{"rounded-r":j()}],"rounded-b":[{"rounded-b":j()}],"rounded-l":[{"rounded-l":j()}],"rounded-ss":[{"rounded-ss":j()}],"rounded-se":[{"rounded-se":j()}],"rounded-ee":[{"rounded-ee":j()}],"rounded-es":[{"rounded-es":j()}],"rounded-tl":[{"rounded-tl":j()}],"rounded-tr":[{"rounded-tr":j()}],"rounded-br":[{"rounded-br":j()}],"rounded-bl":[{"rounded-bl":j()}],"border-w":[{border:K()}],"border-w-x":[{"border-x":K()}],"border-w-y":[{"border-y":K()}],"border-w-s":[{"border-s":K()}],"border-w-e":[{"border-e":K()}],"border-w-t":[{"border-t":K()}],"border-w-r":[{"border-r":K()}],"border-w-b":[{"border-b":K()}],"border-w-l":[{"border-l":K()}],"divide-x":[{"divide-x":K()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":K()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[D,T,S]}],"outline-w":[{outline:["",D,Ke,Pe]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",d,st,ot]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",f,st,ot]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[D,Pe]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":K()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",v,st,ot]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[D,T,S]}],"mix-blend":[{"mix-blend":[...ye(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ye()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[D]}],"mask-image-linear-from-pos":[{"mask-linear-from":W()}],"mask-image-linear-to-pos":[{"mask-linear-to":W()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":W()}],"mask-image-t-to-pos":[{"mask-t-to":W()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":W()}],"mask-image-r-to-pos":[{"mask-r-to":W()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":W()}],"mask-image-b-to-pos":[{"mask-b-to":W()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":W()}],"mask-image-l-to-pos":[{"mask-l-to":W()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":W()}],"mask-image-x-to-pos":[{"mask-x-to":W()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":W()}],"mask-image-y-to-pos":[{"mask-y-to":W()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[T,S]}],"mask-image-radial-from-pos":[{"mask-radial-from":W()}],"mask-image-radial-to-pos":[{"mask-radial-to":W()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[D]}],"mask-image-conic-from-pos":[{"mask-conic-from":W()}],"mask-image-conic-to-pos":[{"mask-conic-to":W()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:q()}],"mask-repeat":[{mask:C()}],"mask-size":[{mask:N()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",T,S]}],filter:[{filter:["","none",T,S]}],blur:[{blur:Z()}],brightness:[{brightness:[D,T,S]}],contrast:[{contrast:[D,T,S]}],"drop-shadow":[{"drop-shadow":["","none",g,st,ot]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",D,T,S]}],"hue-rotate":[{"hue-rotate":[D,T,S]}],invert:[{invert:["",D,T,S]}],saturate:[{saturate:[D,T,S]}],sepia:[{sepia:["",D,T,S]}],"backdrop-filter":[{"backdrop-filter":["","none",T,S]}],"backdrop-blur":[{"backdrop-blur":Z()}],"backdrop-brightness":[{"backdrop-brightness":[D,T,S]}],"backdrop-contrast":[{"backdrop-contrast":[D,T,S]}],"backdrop-grayscale":[{"backdrop-grayscale":["",D,T,S]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[D,T,S]}],"backdrop-invert":[{"backdrop-invert":["",D,T,S]}],"backdrop-opacity":[{"backdrop-opacity":[D,T,S]}],"backdrop-saturate":[{"backdrop-saturate":[D,T,S]}],"backdrop-sepia":[{"backdrop-sepia":["",D,T,S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",T,S]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[D,"initial",T,S]}],ease:[{ease:["linear","initial",x,T,S]}],delay:[{delay:[D,T,S]}],animate:[{animate:["none",y,T,S]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,T,S]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:te()}],"rotate-x":[{"rotate-x":te()}],"rotate-y":[{"rotate-y":te()}],"rotate-z":[{"rotate-z":te()}],scale:[{scale:ce()}],"scale-x":[{"scale-x":ce()}],"scale-y":[{"scale-y":ce()}],"scale-z":[{"scale-z":ce()}],"scale-3d":["scale-3d"],skew:[{skew:Ae()}],"skew-x":[{"skew-x":Ae()}],"skew-y":[{"skew-y":Ae()}],transform:[{transform:[T,S,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ie()}],"translate-x":[{"translate-x":Ie()}],"translate-y":[{"translate-y":Ie()}],"translate-z":[{"translate-z":Ie()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",T,S]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",T,S]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[D,Ke,Pe,jt]}],stroke:[{stroke:["none",...R()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Ca=ra(wa);function G(...e){return Ca(yn(e))}const ka=kt("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80 dark:bg-primary dark:text-primary-foreground dark:hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/80 dark:bg-destructive dark:text-destructive-foreground dark:hover:bg-destructive/80",outline:"border border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-background dark:text-foreground dark:hover:bg-accent dark:hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 dark:bg-secondary dark:text-secondary-foreground dark:hover:bg-secondary/80",ghost:"text-foreground hover:bg-accent hover:text-accent-foreground dark:text-foreground dark:hover:bg-accent dark:hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline dark:text-primary",success:"bg-success text-success-foreground hover:bg-success/80 dark:bg-success dark:text-success-foreground dark:hover:bg-success/80",warning:"bg-warning text-warning-foreground hover:bg-warning/80 dark:bg-warning dark:text-warning-foreground dark:hover:bg-warning/80"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Nn=l.forwardRef(({className:e,variant:t,size:r,...n},o)=>m.jsx("button",{className:G(ka({variant:t,size:r,className:e})),ref:o,...n}));Nn.displayName="Button";const Ea=kt("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border-input flex h-9 w-full min-w-0 rounded-md border bg-background px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:border-input dark:bg-background dark:text-foreground dark:placeholder:text-muted-foreground",{variants:{variant:{default:"bg-background border-input text-foreground placeholder:text-muted-foreground dark:bg-background dark:border-input dark:text-foreground dark:placeholder:text-muted-foreground",secondary:"bg-secondary border-secondary text-secondary-foreground placeholder:text-muted-foreground dark:bg-secondary dark:border-secondary dark:text-secondary-foreground dark:placeholder:text-muted-foreground",accent:"bg-accent border-accent text-accent-foreground placeholder:text-muted-foreground dark:bg-accent dark:border-accent dark:text-accent-foreground dark:placeholder:text-muted-foreground",success:"bg-success border-success text-success-foreground placeholder:text-success-foreground/70 dark:bg-success dark:border-success dark:text-success-foreground dark:placeholder:text-success-foreground/70",warning:"bg-warning border-warning text-warning-foreground placeholder:text-warning-foreground/70 dark:bg-warning dark:border-warning dark:text-warning-foreground dark:placeholder:text-warning-foreground/70",destructive:"bg-destructive border-destructive text-destructive-foreground placeholder:text-destructive-foreground/70 dark:bg-destructive dark:border-destructive dark:text-destructive-foreground dark:placeholder:text-destructive-foreground/70"}},defaultVariants:{variant:"default"}});function Ra({className:e,variant:t,type:r,...n}){return m.jsx("input",{type:r,"data-slot":"input",className:G(Ea({variant:t,className:e})),...n})}function Gr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _n(...e){return t=>{let r=!1;const n=e.map(o=>{const s=Gr(o,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let o=0;o<n.length;o++){const s=n[o];typeof s=="function"?s():Gr(e[o],null)}}}}function Q(...e){return l.useCallback(_n(...e),e)}function Xe(e){const t=Pa(e),r=l.forwardRef((n,o)=>{const{children:s,...a}=n,i=l.Children.toArray(s),c=i.find(Ta);if(c){const u=c.props.children,d=i.map(f=>f===c?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:o,children:l.isValidElement(u)?l.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}var Aa=Xe("Slot");function Pa(e){const t=l.forwardRef((r,n)=>{const{children:o,...s}=r;if(l.isValidElement(o)){const a=Na(o),i=Oa(s,o.props);return o.type!==l.Fragment&&(i.ref=n?_n(n,a):a),l.cloneElement(o,i)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var In=Symbol("radix.slottable");function Sa(e){const t=({children:r})=>m.jsx(m.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=In,t}function Ta(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===In}function Oa(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function Na(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const _a=kt("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden dark:border-border",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90 dark:bg-primary dark:text-primary-foreground dark:[a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90 dark:bg-secondary dark:text-secondary-foreground dark:[a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-destructive-foreground [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive dark:text-destructive-foreground dark:[a&]:hover:bg-destructive/90",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground dark:text-foreground dark:[a&]:hover:bg-accent dark:[a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Ia({className:e,variant:t,asChild:r=!1,...n}){const o=r?Aa:"span";return m.jsx(o,{"data-slot":"badge",className:G(_a({variant:t}),e),...n})}function Da({className:e,...t}){return m.jsx("div",{"data-slot":"card",className:G("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm dark:bg-card dark:text-card-foreground dark:border-border",e),...t})}function Ma({className:e,...t}){return m.jsx("div",{"data-slot":"card-header",className:G("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function ja({className:e,...t}){return m.jsx("div",{"data-slot":"card-title",className:G("leading-none font-semibold",e),...t})}function La({className:e,...t}){return m.jsx("div",{"data-slot":"card-description",className:G("text-muted-foreground text-sm dark:text-muted-foreground",e),...t})}function Fa({className:e,...t}){return m.jsx("div",{"data-slot":"card-action",className:G("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...t})}function $a({className:e,...t}){return m.jsx("div",{"data-slot":"card-content",className:G("px-6",e),...t})}function za({className:e,...t}){return m.jsx("div",{"data-slot":"card-footer",className:G("flex items-center px-6 [.border-t]:pt-6",e),...t})}function X(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}function Wa(e,t){const r=l.createContext(t),n=s=>{const{children:a,...i}=s,c=l.useMemo(()=>i,Object.values(i));return m.jsx(r.Provider,{value:c,children:a})};n.displayName=e+"Provider";function o(s){const a=l.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[n,o]}function pe(e,t=[]){let r=[];function n(s,a){const i=l.createContext(a),c=r.length;r=[...r,a];const u=f=>{const{scope:v,children:g,...b}=f,p=v?.[e]?.[c]||i,h=l.useMemo(()=>b,Object.values(b));return m.jsx(p.Provider,{value:h,children:g})};u.displayName=s+"Provider";function d(f,v){const g=v?.[e]?.[c]||i,b=l.useContext(g);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const o=()=>{const s=r.map(a=>l.createContext(a));return function(i){const c=i?.[e]||s;return l.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[n,Ga(o,...t)]}function Ga(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=n.reduce((i,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...i,...f}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}var he=globalThis?.document?l.useLayoutEffect:()=>{},Va=l[" useId ".trim().toString()]||(()=>{}),Ba=0;function Se(e){const[t,r]=l.useState(Va());return he(()=>{r(n=>n??String(Ba++))},[e]),e||(t?`radix-${t}`:"")}var Ha=l[" useInsertionEffect ".trim().toString()]||he;function me({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,s,a]=Ua({defaultProp:t,onChange:r}),i=e!==void 0,c=i?e:o;{const d=l.useRef(e!==void 0);l.useEffect(()=>{const f=d.current;f!==i&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=i},[i,n])}const u=l.useCallback(d=>{if(i){const f=Ya(d)?d(e):d;f!==e&&a.current?.(f)}else s(d)},[i,e,s,a]);return[c,u]}function Ua({defaultProp:e,onChange:t}){const[r,n]=l.useState(e),o=l.useRef(r),s=l.useRef(t);return Ha(()=>{s.current=t},[t]),l.useEffect(()=>{o.current!==r&&(s.current?.(r),o.current=r)},[r,o]),[r,n,s]}function Ya(e){return typeof e=="function"}var Ka=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],V=Ka.reduce((e,t)=>{const r=Xe(`Primitive.${t}`),n=l.forwardRef((o,s)=>{const{asChild:a,...i}=o,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(c,{...i,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Xa(e,t){e&&bn.flushSync(()=>e.dispatchEvent(t))}function Te(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...r)=>t.current?.(...r),[])}function qa(e,t=globalThis?.document){const r=Te(e);l.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Za="DismissableLayer",qt="dismissableLayer.update",Ja="dismissableLayer.pointerDownOutside",Qa="dismissableLayer.focusOutside",Vr,Dn=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ar=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...c}=e,u=l.useContext(Dn),[d,f]=l.useState(null),v=d?.ownerDocument??globalThis?.document,[,g]=l.useState({}),b=Q(t,P=>f(P)),p=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=p.indexOf(h),y=d?p.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,k=y>=x,A=ri(P=>{const E=P.target,M=[...u.branches].some(L=>L.contains(E));!k||M||(o?.(P),a?.(P),P.defaultPrevented||i?.())},v),O=ni(P=>{const E=P.target;[...u.branches].some(L=>L.contains(E))||(s?.(P),a?.(P),P.defaultPrevented||i?.())},v);return qa(P=>{y===u.layers.size-1&&(n?.(P),!P.defaultPrevented&&i&&(P.preventDefault(),i()))},v),l.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Vr=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Br(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Vr)}},[d,v,r,u]),l.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Br())},[d,u]),l.useEffect(()=>{const P=()=>g({});return document.addEventListener(qt,P),()=>document.removeEventListener(qt,P)},[]),m.jsx(V.div,{...c,ref:b,style:{pointerEvents:w?k?"auto":"none":void 0,...e.style},onFocusCapture:X(e.onFocusCapture,O.onFocusCapture),onBlurCapture:X(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:X(e.onPointerDownCapture,A.onPointerDownCapture)})});ar.displayName=Za;var ei="DismissableLayerBranch",ti=l.forwardRef((e,t)=>{const r=l.useContext(Dn),n=l.useRef(null),o=Q(t,n);return l.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),m.jsx(V.div,{...e,ref:o})});ti.displayName=ei;function ri(e,t=globalThis?.document){const r=Te(e),n=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const s=i=>{if(i.target&&!n.current){let c=function(){Mn(Ja,r,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function ni(e,t=globalThis?.document){const r=Te(e),n=l.useRef(!1);return l.useEffect(()=>{const o=s=>{s.target&&!n.current&&Mn(Qa,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Br(){const e=new CustomEvent(qt);document.dispatchEvent(e)}function Mn(e,t,r,{discrete:n}){const o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Xa(o,s):o.dispatchEvent(s)}var Lt="focusScope.autoFocusOnMount",Ft="focusScope.autoFocusOnUnmount",Hr={bubbles:!1,cancelable:!0},oi="FocusScope",jn=l.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[i,c]=l.useState(null),u=Te(o),d=Te(s),f=l.useRef(null),v=Q(t,p=>c(p)),g=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(n){let p=function(w){if(g.paused||!i)return;const k=w.target;i.contains(k)?f.current=k:Ce(f.current,{select:!0})},h=function(w){if(g.paused||!i)return;const k=w.relatedTarget;k!==null&&(i.contains(k)||Ce(f.current,{select:!0}))},x=function(w){if(document.activeElement===document.body)for(const A of w)A.removedNodes.length>0&&Ce(i)};document.addEventListener("focusin",p),document.addEventListener("focusout",h);const y=new MutationObserver(x);return i&&y.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",h),y.disconnect()}}},[n,i,g.paused]),l.useEffect(()=>{if(i){Yr.add(g);const p=document.activeElement;if(!i.contains(p)){const x=new CustomEvent(Lt,Hr);i.addEventListener(Lt,u),i.dispatchEvent(x),x.defaultPrevented||(si(ui(Ln(i)),{select:!0}),document.activeElement===p&&Ce(i))}return()=>{i.removeEventListener(Lt,u),setTimeout(()=>{const x=new CustomEvent(Ft,Hr);i.addEventListener(Ft,d),i.dispatchEvent(x),x.defaultPrevented||Ce(p??document.body,{select:!0}),i.removeEventListener(Ft,d),Yr.remove(g)},0)}}},[i,u,d,g]);const b=l.useCallback(p=>{if(!r&&!n||g.paused)return;const h=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,x=document.activeElement;if(h&&x){const y=p.currentTarget,[w,k]=ai(y);w&&k?!p.shiftKey&&x===k?(p.preventDefault(),r&&Ce(w,{select:!0})):p.shiftKey&&x===w&&(p.preventDefault(),r&&Ce(k,{select:!0})):x===y&&p.preventDefault()}},[r,n,g.paused]);return m.jsx(V.div,{tabIndex:-1,...a,ref:v,onKeyDown:b})});jn.displayName=oi;function si(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Ce(n,{select:t}),document.activeElement!==r)return}function ai(e){const t=Ln(e),r=Ur(t,e),n=Ur(t.reverse(),e);return[r,n]}function Ln(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Ur(e,t){for(const r of e)if(!ii(r,{upTo:t}))return r}function ii(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ci(e){return e instanceof HTMLInputElement&&"select"in e}function Ce(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&ci(e)&&t&&e.select()}}var Yr=li();function li(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=Kr(e,t),e.unshift(t)},remove(t){e=Kr(e,t),e[0]?.resume()}}}function Kr(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function ui(e){return e.filter(t=>t.tagName!=="A")}var di="Portal",ir=l.forwardRef((e,t)=>{const{container:r,...n}=e,[o,s]=l.useState(!1);he(()=>s(!0),[]);const a=r||o&&globalThis?.document?.body;return a?vn.createPortal(m.jsx(V.div,{...n,ref:t}),a):null});ir.displayName=di;function fi(e,t){return l.useReducer((r,n)=>t[r][n]??r,e)}var _e=e=>{const{present:t,children:r}=e,n=pi(t),o=typeof r=="function"?r({present:n.isPresent}):l.Children.only(r),s=Q(n.ref,mi(o));return typeof r=="function"||n.isPresent?l.cloneElement(o,{ref:s}):null};_e.displayName="Presence";function pi(e){const[t,r]=l.useState(),n=l.useRef(null),o=l.useRef(e),s=l.useRef("none"),a=e?"mounted":"unmounted",[i,c]=fi(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=at(n.current);s.current=i==="mounted"?u:"none"},[i]),he(()=>{const u=n.current,d=o.current;if(d!==e){const v=s.current,g=at(u);e?c("MOUNT"):g==="none"||u?.display==="none"?c("UNMOUNT"):c(d&&v!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),he(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=g=>{const p=at(n.current).includes(g.animationName);if(g.target===t&&p&&(c("ANIMATION_END"),!o.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},v=g=>{g.target===t&&(s.current=at(n.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:l.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function at(e){return e?.animationName||"none"}function mi(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var $t=0;function gi(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Xr()),document.body.insertAdjacentElement("beforeend",e[1]??Xr()),$t++,()=>{$t===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),$t--}},[])}function Xr(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var le=function(){return le=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},le.apply(this,arguments)};function Fn(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function vi(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,s;n<o;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}var ft="right-scroll-bar-position",pt="width-before-scroll-bar",hi="with-scroll-bars-hidden",bi="--removed-body-scroll-bar-size";function zt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function xi(e,t){var r=I.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var yi=typeof window<"u"?l.useLayoutEffect:l.useEffect,qr=new WeakMap;function wi(e,t){var r=xi(null,function(n){return e.forEach(function(o){return zt(o,n)})});return yi(function(){var n=qr.get(r);if(n){var o=new Set(n),s=new Set(e),a=r.current;o.forEach(function(i){s.has(i)||zt(i,null)}),s.forEach(function(i){o.has(i)||zt(i,a)})}qr.set(r,e)},[e]),r}function Ci(e){return e}function ki(e,t){t===void 0&&(t=Ci);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var a=t(s,n);return r.push(a),function(){r=r.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(n=!0;r.length;){var a=r;r=[],a.forEach(s)}r={push:function(i){return s(i)},filter:function(){return r}}},assignMedium:function(s){n=!0;var a=[];if(r.length){var i=r;r=[],i.forEach(s),a=r}var c=function(){var d=a;a=[],d.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),r}}}};return o}function Ei(e){e===void 0&&(e={});var t=ki(null);return t.options=le({async:!0,ssr:!1},e),t}var $n=function(e){var t=e.sideCar,r=Fn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return l.createElement(n,le({},r))};$n.isSideCarExport=!0;function Ri(e,t){return e.useMedium(t),$n}var zn=Ei(),Wt=function(){},Et=l.forwardRef(function(e,t){var r=l.useRef(null),n=l.useState({onScrollCapture:Wt,onWheelCapture:Wt,onTouchMoveCapture:Wt}),o=n[0],s=n[1],a=e.forwardProps,i=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,v=e.sideCar,g=e.noRelative,b=e.noIsolation,p=e.inert,h=e.allowPinchZoom,x=e.as,y=x===void 0?"div":x,w=e.gapMode,k=Fn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),A=v,O=wi([r,t]),P=le(le({},k),o);return l.createElement(l.Fragment,null,d&&l.createElement(A,{sideCar:zn,removeScrollBar:u,shards:f,noRelative:g,noIsolation:b,inert:p,setCallbacks:s,allowPinchZoom:!!h,lockRef:r,gapMode:w}),a?l.cloneElement(l.Children.only(i),le(le({},P),{ref:O})):l.createElement(y,le({},P,{className:c,ref:O}),i))});Et.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Et.classNames={fullWidth:pt,zeroRight:ft};var Ai=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Pi(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ai();return t&&e.setAttribute("nonce",t),e}function Si(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ti(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Oi=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Pi())&&(Si(t,r),Ti(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ni=function(){var e=Oi();return function(t,r){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Wn=function(){var e=Ni(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},_i={left:0,top:0,right:0,gap:0},Gt=function(e){return parseInt(e||"",10)||0},Ii=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Gt(r),Gt(n),Gt(o)]},Di=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return _i;var t=Ii(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Mi=Wn(),Fe="data-scroll-locked",ji=function(e,t,r,n){var o=e.left,s=e.top,a=e.right,i=e.gap;return r===void 0&&(r="margin"),`
|
|
23
|
-
.`.concat(
|
|
22
|
+
<%s key={someKey} {...props} />`,I,L,U,L),te[L+I]=!0)}if(L=null,C!==void 0&&(r(C),L=""+C),a(V)&&(r(V.key),L=""+V.key),"key"in V){C={};for(var J in V)J!=="key"&&(C[J]=V[J])}else C=V;return L&&i(C,typeof E=="function"?E.displayName||E.name||"Unknown":E),u(E,L,_,j,o(),C,Y,T)}function p(E){typeof E=="object"&&E!==null&&E.$$typeof===h&&E._store&&(E._store.validated=1)}var v=O,h=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),w=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),K=Symbol.for("react.client.reference"),X=v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=Object.prototype.hasOwnProperty,ee=Array.isArray,z=console.createTask?console.createTask:function(){return null};v={"react-stack-bottom-frame":function(E){return E()}};var q,F={},H=v["react-stack-bottom-frame"].bind(v,s)(),A=z(n(s)),te={};gt.Fragment=m,gt.jsx=function(E,V,C,I,j){var _=1e4>X.recentlyCreatedOwnerStacks++;return f(E,V,C,!1,I,j,_?Error("react-stack-top-frame"):H,_?z(n(E)):A)},gt.jsxs=function(E,V,C,I,j){var _=1e4>X.recentlyCreatedOwnerStacks++;return f(E,V,C,!0,I,j,_?Error("react-stack-top-frame"):H,_?z(n(E)):A)}}()),gt}var ro;function zl(){return ro||(ro=1,process.env.NODE_ENV==="production"?It.exports=Vl():It.exports=Bl()),It.exports}var d=zl();function qo(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=qo(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Xo(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=qo(e))&&(n&&(n+=" "),n+=t);return n}const no=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,oo=Xo,tr=(e,t)=>r=>{var n;if(t?.variants==null)return oo(e,r?.class,r?.className);const{variants:o,defaultVariants:s}=t,a=Object.keys(o).map(u=>{const f=r?.[u],p=s?.[u];if(f===null)return null;const v=no(f)||no(p);return o[u][v]}),i=r&&Object.entries(r).reduce((u,f)=>{let[p,v]=f;return v===void 0||(u[p]=v),u},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:p,className:v,...h}=f;return Object.entries(h).every(x=>{let[m,g]=x;return Array.isArray(g)?g.includes({...s,...i}[m]):{...s,...i}[m]===g})?[...u,p,v]:u},[]);return oo(e,a,c,r?.class,r?.className)},un="-",Wl=e=>{const t=Hl(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{const i=a.split(un);return i[0]===""&&i.length!==1&&i.shift(),Zo(i,t)||Gl(a)},getConflictingClassGroupIds:(a,i)=>{const c=r[a]||[];return i&&n[a]?[...c,...n[a]]:c}}},Zo=(e,t)=>{if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?Zo(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(un);return t.validators.find(({validator:a})=>a(s))?.classGroupId},so=/^\[(.+)\]$/,Gl=e=>{if(so.test(e)){const t=so.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Hl=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const o in r)Wr(r[o],n,o,t);return n},Wr=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:ao(t,o);s.classGroupId=r;return}if(typeof o=="function"){if(Ul(o)){Wr(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([s,a])=>{Wr(a,ao(t,s),r,n)})})},ao=(e,t)=>{let r=e;return t.split(un).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Ul=e=>e.isThemeGetter,Kl=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const o=(s,a)=>{r.set(s,a),t++,t>e&&(t=0,n=r,r=new Map)};return{get(s){let a=r.get(s);if(a!==void 0)return a;if((a=n.get(s))!==void 0)return o(s,a),a},set(s,a){r.has(s)?r.set(s,a):o(s,a)}}},Gr="!",Hr=":",Yl=Hr.length,ql=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const s=[];let a=0,i=0,c=0,u;for(let x=0;x<o.length;x++){let m=o[x];if(a===0&&i===0){if(m===Hr){s.push(o.slice(c,x)),c=x+Yl;continue}if(m==="/"){u=x;continue}}m==="["?a++:m==="]"?a--:m==="("?i++:m===")"&&i--}const f=s.length===0?o:o.substring(c),p=Xl(f),v=p!==f,h=u&&u>c?u-c:void 0;return{modifiers:s,hasImportantModifier:v,baseClassName:p,maybePostfixModifierPosition:h}};if(t){const o=t+Hr,s=n;n=a=>a.startsWith(o)?s(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(r){const o=n;n=s=>r({className:s,parseClassName:o})}return n},Xl=e=>e.endsWith(Gr)?e.substring(0,e.length-1):e.startsWith(Gr)?e.substring(1):e,Zl=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const o=[];let s=[];return n.forEach(a=>{a[0]==="["||t[a]?(o.push(...s.sort(),a),s=[]):s.push(a)}),o.push(...s.sort()),o}},Jl=e=>({cache:Kl(e.cacheSize),parseClassName:ql(e),sortModifiers:Zl(e),...Wl(e)}),Ql=/\s+/,ec=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:s}=t,a=[],i=e.trim().split(Ql);let c="";for(let u=i.length-1;u>=0;u-=1){const f=i[u],{isExternal:p,modifiers:v,hasImportantModifier:h,baseClassName:x,maybePostfixModifierPosition:m}=r(f);if(p){c=f+(c.length>0?" "+c:c);continue}let g=!!m,y=n(g?x.substring(0,m):x);if(!y){if(!g){c=f+(c.length>0?" "+c:c);continue}if(y=n(x),!y){c=f+(c.length>0?" "+c:c);continue}g=!1}const b=s(v).join(":"),w=h?b+Gr:b,S=w+y;if(a.includes(S))continue;a.push(S);const P=o(y,g);for(let N=0;N<P.length;++N){const k=P[N];a.push(w+k)}c=f+(c.length>0?" "+c:c)}return c};function tc(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Jo(t))&&(n&&(n+=" "),n+=r);return n}const Jo=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Jo(e[n]))&&(r&&(r+=" "),r+=t);return r};function rc(e,...t){let r,n,o,s=a;function a(c){const u=t.reduce((f,p)=>p(f),e());return r=Jl(u),n=r.cache.get,o=r.cache.set,s=i,i(c)}function i(c){const u=n(c);if(u)return u;const f=ec(c,r);return o(c,f),f}return function(){return s(tc.apply(null,arguments))}}const se=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Qo=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,es=/^\((?:(\w[\w-]*):)?(.+)\)$/i,nc=/^\d+\/\d+$/,oc=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,sc=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ac=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ic=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,lc=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qe=e=>nc.test(e),Q=e=>!!e&&!Number.isNaN(Number(e)),Ae=e=>!!e&&Number.isInteger(Number(e)),kr=e=>e.endsWith("%")&&Q(e.slice(0,-1)),Ee=e=>oc.test(e),cc=()=>!0,uc=e=>sc.test(e)&&!ac.test(e),ts=()=>!1,dc=e=>ic.test(e),fc=e=>lc.test(e),pc=e=>!M(e)&&!D(e),mc=e=>at(e,os,ts),M=e=>Qo.test(e),$e=e=>at(e,ss,uc),Ar=e=>at(e,xc,Q),io=e=>at(e,rs,ts),gc=e=>at(e,ns,fc),Ot=e=>at(e,as,dc),D=e=>es.test(e),ht=e=>it(e,ss),hc=e=>it(e,yc),lo=e=>it(e,rs),vc=e=>it(e,os),bc=e=>it(e,ns),_t=e=>it(e,as,!0),at=(e,t,r)=>{const n=Qo.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},it=(e,t,r=!1)=>{const n=es.exec(e);return n?n[1]?t(n[1]):r:!1},rs=e=>e==="position"||e==="percentage",ns=e=>e==="image"||e==="url",os=e=>e==="length"||e==="size"||e==="bg-size",ss=e=>e==="length",xc=e=>e==="number",yc=e=>e==="family-name",as=e=>e==="shadow",wc=()=>{const e=se("color"),t=se("font"),r=se("text"),n=se("font-weight"),o=se("tracking"),s=se("leading"),a=se("breakpoint"),i=se("container"),c=se("spacing"),u=se("radius"),f=se("shadow"),p=se("inset-shadow"),v=se("text-shadow"),h=se("drop-shadow"),x=se("blur"),m=se("perspective"),g=se("aspect"),y=se("ease"),b=se("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],P=()=>[...S(),D,M],N=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],R=()=>[D,M,c],W=()=>[qe,"full","auto",...R()],K=()=>[Ae,"none","subgrid",D,M],X=()=>["auto",{span:["full",Ae,D,M]},Ae,D,M],Z=()=>[Ae,"auto",D,M],ee=()=>["auto","min","max","fr",D,M],z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],q=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...R()],H=()=>[qe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],A=()=>[e,D,M],te=()=>[...S(),lo,io,{position:[D,M]}],E=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",vc,mc,{size:[D,M]}],C=()=>[kr,ht,$e],I=()=>["","none","full",u,D,M],j=()=>["",Q,ht,$e],_=()=>["solid","dashed","dotted","double"],Y=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],T=()=>[Q,kr,lo,io],L=()=>["","none",x,D,M],U=()=>["none",Q,D,M],J=()=>["none",Q,D,M],re=()=>[Q,D,M],oe=()=>[qe,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ee],breakpoint:[Ee],color:[cc],container:[Ee],"drop-shadow":[Ee],ease:["in","out","in-out"],font:[pc],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ee],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ee],shadow:[Ee],spacing:["px",Q],text:[Ee],"text-shadow":[Ee],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",qe,M,D,g]}],container:["container"],columns:[{columns:[Q,M,D,i]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:P()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:W()}],"inset-x":[{"inset-x":W()}],"inset-y":[{"inset-y":W()}],start:[{start:W()}],end:[{end:W()}],top:[{top:W()}],right:[{right:W()}],bottom:[{bottom:W()}],left:[{left:W()}],visibility:["visible","invisible","collapse"],z:[{z:[Ae,"auto",D,M]}],basis:[{basis:[qe,"full","auto",i,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Q,qe,"auto","initial","none",M]}],grow:[{grow:["",Q,D,M]}],shrink:[{shrink:["",Q,D,M]}],order:[{order:[Ae,"first","last","none",D,M]}],"grid-cols":[{"grid-cols":K()}],"col-start-end":[{col:X()}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":K()}],"row-start-end":[{row:X()}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...z(),"normal"]}],"justify-items":[{"justify-items":[...q(),"normal"]}],"justify-self":[{"justify-self":["auto",...q()]}],"align-content":[{content:["normal",...z()]}],"align-items":[{items:[...q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...q(),{baseline:["","last"]}]}],"place-content":[{"place-content":z()}],"place-items":[{"place-items":[...q(),"baseline"]}],"place-self":[{"place-self":["auto",...q()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],w:[{w:[i,"screen",...H()]}],"min-w":[{"min-w":[i,"screen","none",...H()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[a]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",r,ht,$e]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,D,Ar]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",kr,M]}],"font-family":[{font:[hc,M,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,D,M]}],"line-clamp":[{"line-clamp":[Q,"none",D,Ar]}],leading:[{leading:[s,...R()]}],"list-image":[{"list-image":["none",D,M]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",D,M]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[..._(),"wavy"]}],"text-decoration-thickness":[{decoration:[Q,"from-font","auto",D,$e]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[Q,"auto",D,M]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",D,M]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",D,M]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:te()}],"bg-repeat":[{bg:E()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ae,D,M],radial:["",D,M],conic:[Ae,D,M]},bc,gc]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:C()}],"gradient-via-pos":[{via:C()}],"gradient-to-pos":[{to:C()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:j()}],"border-w-x":[{"border-x":j()}],"border-w-y":[{"border-y":j()}],"border-w-s":[{"border-s":j()}],"border-w-e":[{"border-e":j()}],"border-w-t":[{"border-t":j()}],"border-w-r":[{"border-r":j()}],"border-w-b":[{"border-b":j()}],"border-w-l":[{"border-l":j()}],"divide-x":[{"divide-x":j()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":j()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[..._(),"hidden","none"]}],"divide-style":[{divide:[..._(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[..._(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Q,D,M]}],"outline-w":[{outline:["",Q,ht,$e]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",f,_t,Ot]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",p,_t,Ot]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[Q,$e]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":j()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",v,_t,Ot]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[Q,D,M]}],"mix-blend":[{"mix-blend":[...Y(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Y()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Q]}],"mask-image-linear-from-pos":[{"mask-linear-from":T()}],"mask-image-linear-to-pos":[{"mask-linear-to":T()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":T()}],"mask-image-t-to-pos":[{"mask-t-to":T()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":T()}],"mask-image-r-to-pos":[{"mask-r-to":T()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":T()}],"mask-image-b-to-pos":[{"mask-b-to":T()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":T()}],"mask-image-l-to-pos":[{"mask-l-to":T()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":T()}],"mask-image-x-to-pos":[{"mask-x-to":T()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":T()}],"mask-image-y-to-pos":[{"mask-y-to":T()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[D,M]}],"mask-image-radial-from-pos":[{"mask-radial-from":T()}],"mask-image-radial-to-pos":[{"mask-radial-to":T()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[Q]}],"mask-image-conic-from-pos":[{"mask-conic-from":T()}],"mask-image-conic-to-pos":[{"mask-conic-to":T()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:te()}],"mask-repeat":[{mask:E()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",D,M]}],filter:[{filter:["","none",D,M]}],blur:[{blur:L()}],brightness:[{brightness:[Q,D,M]}],contrast:[{contrast:[Q,D,M]}],"drop-shadow":[{"drop-shadow":["","none",h,_t,Ot]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",Q,D,M]}],"hue-rotate":[{"hue-rotate":[Q,D,M]}],invert:[{invert:["",Q,D,M]}],saturate:[{saturate:[Q,D,M]}],sepia:[{sepia:["",Q,D,M]}],"backdrop-filter":[{"backdrop-filter":["","none",D,M]}],"backdrop-blur":[{"backdrop-blur":L()}],"backdrop-brightness":[{"backdrop-brightness":[Q,D,M]}],"backdrop-contrast":[{"backdrop-contrast":[Q,D,M]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Q,D,M]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Q,D,M]}],"backdrop-invert":[{"backdrop-invert":["",Q,D,M]}],"backdrop-opacity":[{"backdrop-opacity":[Q,D,M]}],"backdrop-saturate":[{"backdrop-saturate":[Q,D,M]}],"backdrop-sepia":[{"backdrop-sepia":["",Q,D,M]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",D,M]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Q,"initial",D,M]}],ease:[{ease:["linear","initial",y,D,M]}],delay:[{delay:[Q,D,M]}],animate:[{animate:["none",b,D,M]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,D,M]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:U()}],"rotate-x":[{"rotate-x":U()}],"rotate-y":[{"rotate-y":U()}],"rotate-z":[{"rotate-z":U()}],scale:[{scale:J()}],"scale-x":[{"scale-x":J()}],"scale-y":[{"scale-y":J()}],"scale-z":[{"scale-z":J()}],"scale-3d":["scale-3d"],skew:[{skew:re()}],"skew-x":[{"skew-x":re()}],"skew-y":[{"skew-y":re()}],transform:[{transform:[D,M,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:oe()}],"translate-x":[{"translate-x":oe()}],"translate-y":[{"translate-y":oe()}],"translate-z":[{"translate-z":oe()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",D,M]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",D,M]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[Q,ht,$e,Ar]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Cc=rc(wc);function $(...e){return Cc(Xo(e))}const Sc=tr("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-pointer",{variants:{variant:{default:"bg-purple-300 text-black font-normal hover:bg-primary/80 dark:bg-primary dark:text-primary-foreground dark:hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/80 dark:bg-destructive dark:text-destructive-foreground dark:hover:bg-destructive/80",outline:"border border-purple-mutted-600 shadow-xs hover:text-purple-100 text-purple-mutted-400",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 dark:bg-secondary dark:text-secondary-foreground dark:hover:bg-secondary/80",ghost:"text-foreground hover:bg-accent hover:text-accent-foreground dark:text-foreground dark:hover:bg-accent dark:hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline dark:text-primary",success:"bg-success text-success-foreground hover:bg-success/80 dark:bg-success dark:text-success-foreground dark:hover:bg-success/80",warning:"bg-warning text-warning-foreground hover:bg-warning/80 dark:bg-warning dark:text-warning-foreground dark:hover:bg-warning/80"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),rr=l.forwardRef(({className:e,variant:t,size:r,...n},o)=>d.jsx("button",{className:$(Sc({variant:t,size:r,className:e})),ref:o,...n}));rr.displayName="Button";const Ec=tr("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border-input flex h-9 w-full min-w-0 rounded-md border bg-background px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:border-input dark:bg-background dark:text-foreground dark:placeholder:text-muted-foreground",{variants:{variant:{default:"bg-purple-mutted-700 border-purple-mutted-500 text-purple-mutted-300 text-sm",secondary:"bg-secondary border-secondary text-secondary-foreground placeholder:text-muted-foreground dark:bg-secondary dark:border-secondary dark:text-secondary-foreground dark:placeholder:text-muted-foreground",accent:"bg-accent border-accent text-accent-foreground placeholder:text-muted-foreground dark:bg-accent dark:border-accent dark:text-accent-foreground dark:placeholder:text-muted-foreground",success:"bg-success border-success text-success-foreground placeholder:text-success-foreground/70 dark:bg-success dark:border-success dark:text-success-foreground dark:placeholder:text-success-foreground/70",warning:"bg-warning border-warning text-warning-foreground placeholder:text-warning-foreground/70 dark:bg-warning dark:border-warning dark:text-warning-foreground dark:placeholder:text-warning-foreground/70",destructive:"bg-destructive border-destructive text-destructive-foreground placeholder:text-destructive-foreground/70 dark:bg-destructive dark:border-destructive dark:text-destructive-foreground dark:placeholder:text-destructive-foreground/70"}},defaultVariants:{variant:"default"}});function is({className:e,variant:t,type:r,...n}){return d.jsx("input",{type:r,"data-slot":"input",className:$(Ec({variant:t,className:e})),...n})}function co(e,[t,r]){return Math.min(r,Math.max(t,e))}function G(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}function Pc(e,t){const r=l.createContext(t),n=s=>{const{children:a,...i}=s,c=l.useMemo(()=>i,Object.values(i));return d.jsx(r.Provider,{value:c,children:a})};n.displayName=e+"Provider";function o(s){const a=l.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[n,o]}function pe(e,t=[]){let r=[];function n(s,a){const i=l.createContext(a),c=r.length;r=[...r,a];const u=p=>{const{scope:v,children:h,...x}=p,m=v?.[e]?.[c]||i,g=l.useMemo(()=>x,Object.values(x));return d.jsx(m.Provider,{value:g,children:h})};u.displayName=s+"Provider";function f(p,v){const h=v?.[e]?.[c]||i,x=l.useContext(h);if(x)return x;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[u,f]}const o=()=>{const s=r.map(a=>l.createContext(a));return function(i){const c=i?.[e]||s;return l.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[n,Rc(o,...t)]}function Rc(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=n.reduce((i,{useScope:c,scopeName:u})=>{const p=c(s)[`__scope${u}`];return{...i,...p}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function uo(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ve(...e){return t=>{let r=!1;const n=e.map(o=>{const s=uo(o,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let o=0;o<n.length;o++){const s=n[o];typeof s=="function"?s():uo(e[o],null)}}}}function ne(...e){return l.useCallback(Ve(...e),e)}function Be(e){const t=kc(e),r=l.forwardRef((n,o)=>{const{children:s,...a}=n,i=l.Children.toArray(s),c=i.find(Tc);if(c){const u=c.props.children,f=i.map(p=>p===c?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:p);return d.jsx(t,{...a,ref:o,children:l.isValidElement(u)?l.cloneElement(u,void 0,f):null})}return d.jsx(t,{...a,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}var ls=Be("Slot");function kc(e){const t=l.forwardRef((r,n)=>{const{children:o,...s}=r;if(l.isValidElement(o)){const a=Ic(o),i=Nc(s,o.props);return o.type!==l.Fragment&&(i.ref=n?Ve(n,a):a),l.cloneElement(o,i)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var cs=Symbol("radix.slottable");function Ac(e){const t=({children:r})=>d.jsx(d.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=cs,t}function Tc(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===cs}function Nc(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...i)=>{const c=s(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function Ic(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function dn(e){const t=e+"CollectionProvider",[r,n]=pe(t),[o,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:g,children:y}=m,b=O.useRef(null),w=O.useRef(new Map).current;return d.jsx(o,{scope:g,itemMap:w,collectionRef:b,children:y})};a.displayName=t;const i=e+"CollectionSlot",c=Be(i),u=O.forwardRef((m,g)=>{const{scope:y,children:b}=m,w=s(i,y),S=ne(g,w.collectionRef);return d.jsx(c,{ref:S,children:b})});u.displayName=i;const f=e+"CollectionItemSlot",p="data-radix-collection-item",v=Be(f),h=O.forwardRef((m,g)=>{const{scope:y,children:b,...w}=m,S=O.useRef(null),P=ne(g,S),N=s(f,y);return O.useEffect(()=>(N.itemMap.set(S,{ref:S,...w}),()=>void N.itemMap.delete(S))),d.jsx(v,{[p]:"",ref:P,children:b})});h.displayName=f;function x(m){const g=s(e+"CollectionConsumer",m);return O.useCallback(()=>{const b=g.collectionRef.current;if(!b)return[];const w=Array.from(b.querySelectorAll(`[${p}]`));return Array.from(g.itemMap.values()).sort((N,k)=>w.indexOf(N.ref.current)-w.indexOf(k.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:u,ItemSlot:h},x,n]}var Oc=l.createContext(void 0);function nr(e){const t=l.useContext(Oc);return e||t||"ltr"}var _c=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],B=_c.reduce((e,t)=>{const r=Be(`Primitive.${t}`),n=l.forwardRef((o,s)=>{const{asChild:a,...i}=o,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...i,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function jc(e,t){e&&er.flushSync(()=>e.dispatchEvent(t))}function Ne(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...r)=>t.current?.(...r),[])}function Mc(e,t=globalThis?.document){const r=Ne(e);l.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Dc="DismissableLayer",Ur="dismissableLayer.update",Fc="dismissableLayer.pointerDownOutside",Lc="dismissableLayer.focusOutside",fo,us=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),St=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...c}=e,u=l.useContext(us),[f,p]=l.useState(null),v=f?.ownerDocument??globalThis?.document,[,h]=l.useState({}),x=ne(t,k=>p(k)),m=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=f?m.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,P=Bc(k=>{const R=k.target,W=[...u.branches].some(K=>K.contains(R));!S||W||(o?.(k),a?.(k),k.defaultPrevented||i?.())},v),N=zc(k=>{const R=k.target;[...u.branches].some(K=>K.contains(R))||(s?.(k),a?.(k),k.defaultPrevented||i?.())},v);return Mc(k=>{b===u.layers.size-1&&(n?.(k),!k.defaultPrevented&&i&&(k.preventDefault(),i()))},v),l.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(fo=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),po(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=fo)}},[f,v,r,u]),l.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),po())},[f,u]),l.useEffect(()=>{const k=()=>h({});return document.addEventListener(Ur,k),()=>document.removeEventListener(Ur,k)},[]),d.jsx(B.div,{...c,ref:x,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:G(e.onFocusCapture,N.onFocusCapture),onBlurCapture:G(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:G(e.onPointerDownCapture,P.onPointerDownCapture)})});St.displayName=Dc;var $c="DismissableLayerBranch",Vc=l.forwardRef((e,t)=>{const r=l.useContext(us),n=l.useRef(null),o=ne(t,n);return l.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),d.jsx(B.div,{...e,ref:o})});Vc.displayName=$c;function Bc(e,t=globalThis?.document){const r=Ne(e),n=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const s=i=>{if(i.target&&!n.current){let c=function(){ds(Fc,r,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function zc(e,t=globalThis?.document){const r=Ne(e),n=l.useRef(!1);return l.useEffect(()=>{const o=s=>{s.target&&!n.current&&ds(Lc,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function po(){const e=new CustomEvent(Ur);document.dispatchEvent(e)}function ds(e,t,r,{discrete:n}){const o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?jc(o,s):o.dispatchEvent(s)}var Tr=0;function fn(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??mo()),document.body.insertAdjacentElement("beforeend",e[1]??mo()),Tr++,()=>{Tr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Tr--}},[])}function mo(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Nr="focusScope.autoFocusOnMount",Ir="focusScope.autoFocusOnUnmount",go={bubbles:!1,cancelable:!0},Wc="FocusScope",or=l.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[i,c]=l.useState(null),u=Ne(o),f=Ne(s),p=l.useRef(null),v=ne(t,m=>c(m)),h=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(n){let m=function(w){if(h.paused||!i)return;const S=w.target;i.contains(S)?p.current=S:Te(p.current,{select:!0})},g=function(w){if(h.paused||!i)return;const S=w.relatedTarget;S!==null&&(i.contains(S)||Te(p.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const P of w)P.removedNodes.length>0&&Te(i)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const b=new MutationObserver(y);return i&&b.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),b.disconnect()}}},[n,i,h.paused]),l.useEffect(()=>{if(i){vo.add(h);const m=document.activeElement;if(!i.contains(m)){const y=new CustomEvent(Nr,go);i.addEventListener(Nr,u),i.dispatchEvent(y),y.defaultPrevented||(Gc(qc(fs(i)),{select:!0}),document.activeElement===m&&Te(i))}return()=>{i.removeEventListener(Nr,u),setTimeout(()=>{const y=new CustomEvent(Ir,go);i.addEventListener(Ir,f),i.dispatchEvent(y),y.defaultPrevented||Te(m??document.body,{select:!0}),i.removeEventListener(Ir,f),vo.remove(h)},0)}}},[i,u,f,h]);const x=l.useCallback(m=>{if(!r&&!n||h.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(g&&y){const b=m.currentTarget,[w,S]=Hc(b);w&&S?!m.shiftKey&&y===S?(m.preventDefault(),r&&Te(w,{select:!0})):m.shiftKey&&y===w&&(m.preventDefault(),r&&Te(S,{select:!0})):y===b&&m.preventDefault()}},[r,n,h.paused]);return d.jsx(B.div,{tabIndex:-1,...a,ref:v,onKeyDown:x})});or.displayName=Wc;function Gc(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Te(n,{select:t}),document.activeElement!==r)return}function Hc(e){const t=fs(e),r=ho(t,e),n=ho(t.reverse(),e);return[r,n]}function fs(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function ho(e,t){for(const r of e)if(!Uc(r,{upTo:t}))return r}function Uc(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Kc(e){return e instanceof HTMLInputElement&&"select"in e}function Te(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Kc(e)&&t&&e.select()}}var vo=Yc();function Yc(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=bo(e,t),e.unshift(t)},remove(t){e=bo(e,t),e[0]?.resume()}}}function bo(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function qc(e){return e.filter(t=>t.tagName!=="A")}var ie=globalThis?.document?l.useLayoutEffect:()=>{},Xc=l[" useId ".trim().toString()]||(()=>{}),Zc=0;function ae(e){const[t,r]=l.useState(Xc());return ie(()=>{r(n=>n??String(Zc++))},[e]),t?`radix-${t}`:""}const Jc=["top","right","bottom","left"],Ie=Math.min,ce=Math.max,Wt=Math.round,jt=Math.floor,we=e=>({x:e,y:e}),Qc={left:"right",right:"left",bottom:"top",top:"bottom"},eu={start:"end",end:"start"};function Kr(e,t,r){return ce(e,Ie(t,r))}function Pe(e,t){return typeof e=="function"?e(t):e}function Re(e){return e.split("-")[0]}function lt(e){return e.split("-")[1]}function pn(e){return e==="x"?"y":"x"}function mn(e){return e==="y"?"height":"width"}const tu=new Set(["top","bottom"]);function ye(e){return tu.has(Re(e))?"y":"x"}function gn(e){return pn(ye(e))}function ru(e,t,r){r===void 0&&(r=!1);const n=lt(e),o=gn(e),s=mn(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Gt(a)),[a,Gt(a)]}function nu(e){const t=Gt(e);return[Yr(e),t,Yr(t)]}function Yr(e){return e.replace(/start|end/g,t=>eu[t])}const xo=["left","right"],yo=["right","left"],ou=["top","bottom"],su=["bottom","top"];function au(e,t,r){switch(e){case"top":case"bottom":return r?t?yo:xo:t?xo:yo;case"left":case"right":return t?ou:su;default:return[]}}function iu(e,t,r,n){const o=lt(e);let s=au(Re(e),r==="start",n);return o&&(s=s.map(a=>a+"-"+o),t&&(s=s.concat(s.map(Yr)))),s}function Gt(e){return e.replace(/left|right|bottom|top/g,t=>Qc[t])}function lu(e){return{top:0,right:0,bottom:0,left:0,...e}}function ps(e){return typeof e!="number"?lu(e):{top:e,right:e,bottom:e,left:e}}function Ht(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function wo(e,t,r){let{reference:n,floating:o}=e;const s=ye(t),a=gn(t),i=mn(a),c=Re(t),u=s==="y",f=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,v=n[i]/2-o[i]/2;let h;switch(c){case"top":h={x:f,y:n.y-o.height};break;case"bottom":h={x:f,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:p};break;case"left":h={x:n.x-o.width,y:p};break;default:h={x:n.x,y:n.y}}switch(lt(t)){case"start":h[a]-=v*(r&&u?-1:1);break;case"end":h[a]+=v*(r&&u?-1:1);break}return h}const cu=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:a}=r,i=s.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=wo(u,n,c),v=n,h={},x=0;for(let m=0;m<i.length;m++){const{name:g,fn:y}=i[m],{x:b,y:w,data:S,reset:P}=await y({x:f,y:p,initialPlacement:n,placement:v,strategy:o,middlewareData:h,rects:u,platform:a,elements:{reference:e,floating:t}});f=b??f,p=w??p,h={...h,[g]:{...h[g],...S}},P&&x<=50&&(x++,typeof P=="object"&&(P.placement&&(v=P.placement),P.rects&&(u=P.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):P.rects),{x:f,y:p}=wo(u,v,c)),m=-1)}return{x:f,y:p,placement:v,strategy:o,middlewareData:h}};async function yt(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:a,elements:i,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:v=!1,padding:h=0}=Pe(t,e),x=ps(h),g=i[v?p==="floating"?"reference":"floating":p],y=Ht(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(g)))==null||r?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:u,rootBoundary:f,strategy:c})),b=p==="floating"?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),S=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},P=Ht(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:b,offsetParent:w,strategy:c}):b);return{top:(y.top-P.top+x.top)/S.y,bottom:(P.bottom-y.bottom+x.bottom)/S.y,left:(y.left-P.left+x.left)/S.x,right:(P.right-y.right+x.right)/S.x}}const uu=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:s,platform:a,elements:i,middlewareData:c}=t,{element:u,padding:f=0}=Pe(e,t)||{};if(u==null)return{};const p=ps(f),v={x:r,y:n},h=gn(o),x=mn(h),m=await a.getDimensions(u),g=h==="y",y=g?"top":"left",b=g?"bottom":"right",w=g?"clientHeight":"clientWidth",S=s.reference[x]+s.reference[h]-v[h]-s.floating[x],P=v[h]-s.reference[h],N=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let k=N?N[w]:0;(!k||!await(a.isElement==null?void 0:a.isElement(N)))&&(k=i.floating[w]||s.floating[x]);const R=S/2-P/2,W=k/2-m[x]/2-1,K=Ie(p[y],W),X=Ie(p[b],W),Z=K,ee=k-m[x]-X,z=k/2-m[x]/2+R,q=Kr(Z,z,ee),F=!c.arrow&<(o)!=null&&z!==q&&s.reference[x]/2-(z<Z?K:X)-m[x]/2<0,H=F?z<Z?z-Z:z-ee:0;return{[h]:v[h]+H,data:{[h]:q,centerOffset:z-q-H,...F&&{alignmentOffset:H}},reset:F}}}),du=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:s,rects:a,initialPlacement:i,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:v,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:m=!0,...g}=Pe(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const y=Re(o),b=ye(i),w=Re(i)===i,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),P=v||(w||!m?[Gt(i)]:nu(i)),N=x!=="none";!v&&N&&P.push(...iu(i,m,x,S));const k=[i,...P],R=await yt(t,g),W=[];let K=((n=s.flip)==null?void 0:n.overflows)||[];if(f&&W.push(R[y]),p){const z=ru(o,a,S);W.push(R[z[0]],R[z[1]])}if(K=[...K,{placement:o,overflows:W}],!W.every(z=>z<=0)){var X,Z;const z=(((X=s.flip)==null?void 0:X.index)||0)+1,q=k[z];if(q&&(!(p==="alignment"?b!==ye(q):!1)||K.every(A=>ye(A.placement)===b?A.overflows[0]>0:!0)))return{data:{index:z,overflows:K},reset:{placement:q}};let F=(Z=K.filter(H=>H.overflows[0]<=0).sort((H,A)=>H.overflows[1]-A.overflows[1])[0])==null?void 0:Z.placement;if(!F)switch(h){case"bestFit":{var ee;const H=(ee=K.filter(A=>{if(N){const te=ye(A.placement);return te===b||te==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(te=>te>0).reduce((te,E)=>te+E,0)]).sort((A,te)=>A[1]-te[1])[0])==null?void 0:ee[0];H&&(F=H);break}case"initialPlacement":F=i;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function Co(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function So(e){return Jc.some(t=>e[t]>=0)}const fu=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=Pe(e,t);switch(n){case"referenceHidden":{const s=await yt(t,{...o,elementContext:"reference"}),a=Co(s,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:So(a)}}}case"escaped":{const s=await yt(t,{...o,altBoundary:!0}),a=Co(s,r.floating);return{data:{escapedOffsets:a,escaped:So(a)}}}default:return{}}}}},ms=new Set(["left","top"]);async function pu(e,t){const{placement:r,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=Re(r),i=lt(r),c=ye(r)==="y",u=ms.has(a)?-1:1,f=s&&c?-1:1,p=Pe(t,e);let{mainAxis:v,crossAxis:h,alignmentAxis:x}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return i&&typeof x=="number"&&(h=i==="end"?x*-1:x),c?{x:h*f,y:v*u}:{x:v*u,y:h*f}}const mu=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:s,placement:a,middlewareData:i}=t,c=await pu(t,e);return a===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:a}}}}},gu=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:i={fn:g=>{let{x:y,y:b}=g;return{x:y,y:b}}},...c}=Pe(e,t),u={x:r,y:n},f=await yt(t,c),p=ye(Re(o)),v=pn(p);let h=u[v],x=u[p];if(s){const g=v==="y"?"top":"left",y=v==="y"?"bottom":"right",b=h+f[g],w=h-f[y];h=Kr(b,h,w)}if(a){const g=p==="y"?"top":"left",y=p==="y"?"bottom":"right",b=x+f[g],w=x-f[y];x=Kr(b,x,w)}const m=i.fn({...t,[v]:h,[p]:x});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[v]:s,[p]:a}}}}}},hu=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:s,middlewareData:a}=t,{offset:i=0,mainAxis:c=!0,crossAxis:u=!0}=Pe(e,t),f={x:r,y:n},p=ye(o),v=pn(p);let h=f[v],x=f[p];const m=Pe(i,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const w=v==="y"?"height":"width",S=s.reference[v]-s.floating[w]+g.mainAxis,P=s.reference[v]+s.reference[w]-g.mainAxis;h<S?h=S:h>P&&(h=P)}if(u){var y,b;const w=v==="y"?"width":"height",S=ms.has(Re(o)),P=s.reference[p]-s.floating[w]+(S&&((y=a.offset)==null?void 0:y[p])||0)+(S?0:g.crossAxis),N=s.reference[p]+s.reference[w]+(S?0:((b=a.offset)==null?void 0:b[p])||0)-(S?g.crossAxis:0);x<P?x=P:x>N&&(x=N)}return{[v]:h,[p]:x}}}},vu=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:s,platform:a,elements:i}=t,{apply:c=()=>{},...u}=Pe(e,t),f=await yt(t,u),p=Re(o),v=lt(o),h=ye(o)==="y",{width:x,height:m}=s.floating;let g,y;p==="top"||p==="bottom"?(g=p,y=v===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(y=p,g=v==="end"?"top":"bottom");const b=m-f.top-f.bottom,w=x-f.left-f.right,S=Ie(m-f[g],b),P=Ie(x-f[y],w),N=!t.middlewareData.shift;let k=S,R=P;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(R=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(k=b),N&&!v){const K=ce(f.left,0),X=ce(f.right,0),Z=ce(f.top,0),ee=ce(f.bottom,0);h?R=x-2*(K!==0||X!==0?K+X:ce(f.left,f.right)):k=m-2*(Z!==0||ee!==0?Z+ee:ce(f.top,f.bottom))}await c({...t,availableWidth:R,availableHeight:k});const W=await a.getDimensions(i.floating);return x!==W.width||m!==W.height?{reset:{rects:!0}}:{}}}};function sr(){return typeof window<"u"}function ct(e){return gs(e)?(e.nodeName||"").toLowerCase():"#document"}function ue(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Se(e){var t;return(t=(gs(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gs(e){return sr()?e instanceof Node||e instanceof ue(e).Node:!1}function ge(e){return sr()?e instanceof Element||e instanceof ue(e).Element:!1}function Ce(e){return sr()?e instanceof HTMLElement||e instanceof ue(e).HTMLElement:!1}function Eo(e){return!sr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ue(e).ShadowRoot}const bu=new Set(["inline","contents"]);function Et(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=he(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!bu.has(o)}const xu=new Set(["table","td","th"]);function yu(e){return xu.has(ct(e))}const wu=[":popover-open",":modal"];function ar(e){return wu.some(t=>{try{return e.matches(t)}catch{return!1}})}const Cu=["transform","translate","scale","rotate","perspective"],Su=["transform","translate","scale","rotate","perspective","filter"],Eu=["paint","layout","strict","content"];function hn(e){const t=vn(),r=ge(e)?he(e):e;return Cu.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||Su.some(n=>(r.willChange||"").includes(n))||Eu.some(n=>(r.contain||"").includes(n))}function Pu(e){let t=Oe(e);for(;Ce(t)&&!nt(t);){if(hn(t))return t;if(ar(t))return null;t=Oe(t)}return null}function vn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ru=new Set(["html","body","#document"]);function nt(e){return Ru.has(ct(e))}function he(e){return ue(e).getComputedStyle(e)}function ir(e){return ge(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Oe(e){if(ct(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Eo(e)&&e.host||Se(e);return Eo(t)?t.host:t}function hs(e){const t=Oe(e);return nt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ce(t)&&Et(t)?t:hs(t)}function wt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=hs(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),a=ue(o);if(s){const i=qr(a);return t.concat(a,a.visualViewport||[],Et(o)?o:[],i&&r?wt(i):[])}return t.concat(o,wt(o,[],r))}function qr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vs(e){const t=he(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Ce(e),s=o?e.offsetWidth:r,a=o?e.offsetHeight:n,i=Wt(r)!==s||Wt(n)!==a;return i&&(r=s,n=a),{width:r,height:n,$:i}}function bn(e){return ge(e)?e:e.contextElement}function tt(e){const t=bn(e);if(!Ce(t))return we(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=vs(t);let a=(s?Wt(r.width):r.width)/n,i=(s?Wt(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const ku=we(0);function bs(e){const t=ue(e);return!vn()||!t.visualViewport?ku:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Au(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ue(e)?!1:t}function ze(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=bn(e);let a=we(1);t&&(n?ge(n)&&(a=tt(n)):a=tt(e));const i=Au(s,r,n)?bs(s):we(0);let c=(o.left+i.x)/a.x,u=(o.top+i.y)/a.y,f=o.width/a.x,p=o.height/a.y;if(s){const v=ue(s),h=n&&ge(n)?ue(n):n;let x=v,m=qr(x);for(;m&&n&&h!==x;){const g=tt(m),y=m.getBoundingClientRect(),b=he(m),w=y.left+(m.clientLeft+parseFloat(b.paddingLeft))*g.x,S=y.top+(m.clientTop+parseFloat(b.paddingTop))*g.y;c*=g.x,u*=g.y,f*=g.x,p*=g.y,c+=w,u+=S,x=ue(m),m=qr(x)}}return Ht({width:f,height:p,x:c,y:u})}function xn(e,t){const r=ir(e).scrollLeft;return t?t.left+r:ze(Se(e)).left+r}function xs(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-(r?0:xn(e,n)),s=n.top+t.scrollTop;return{x:o,y:s}}function Tu(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",a=Se(n),i=t?ar(t.floating):!1;if(n===a||i&&s)return r;let c={scrollLeft:0,scrollTop:0},u=we(1);const f=we(0),p=Ce(n);if((p||!p&&!s)&&((ct(n)!=="body"||Et(a))&&(c=ir(n)),Ce(n))){const h=ze(n);u=tt(n),f.x=h.x+n.clientLeft,f.y=h.y+n.clientTop}const v=a&&!p&&!s?xs(a,c,!0):we(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+f.x+v.x,y:r.y*u.y-c.scrollTop*u.y+f.y+v.y}}function Nu(e){return Array.from(e.getClientRects())}function Iu(e){const t=Se(e),r=ir(e),n=e.ownerDocument.body,o=ce(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=ce(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+xn(e);const i=-r.scrollTop;return he(n).direction==="rtl"&&(a+=ce(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:a,y:i}}function Ou(e,t){const r=ue(e),n=Se(e),o=r.visualViewport;let s=n.clientWidth,a=n.clientHeight,i=0,c=0;if(o){s=o.width,a=o.height;const u=vn();(!u||u&&t==="fixed")&&(i=o.offsetLeft,c=o.offsetTop)}return{width:s,height:a,x:i,y:c}}const _u=new Set(["absolute","fixed"]);function ju(e,t){const r=ze(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=Ce(e)?tt(e):we(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,c=o*s.x,u=n*s.y;return{width:a,height:i,x:c,y:u}}function Po(e,t,r){let n;if(t==="viewport")n=Ou(e,r);else if(t==="document")n=Iu(Se(e));else if(ge(t))n=ju(t,r);else{const o=bs(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ht(n)}function ys(e,t){const r=Oe(e);return r===t||!ge(r)||nt(r)?!1:he(r).position==="fixed"||ys(r,t)}function Mu(e,t){const r=t.get(e);if(r)return r;let n=wt(e,[],!1).filter(i=>ge(i)&&ct(i)!=="body"),o=null;const s=he(e).position==="fixed";let a=s?Oe(e):e;for(;ge(a)&&!nt(a);){const i=he(a),c=hn(a);!c&&i.position==="fixed"&&(o=null),(s?!c&&!o:!c&&i.position==="static"&&!!o&&_u.has(o.position)||Et(a)&&!c&&ys(e,a))?n=n.filter(f=>f!==a):o=i,a=Oe(a)}return t.set(e,n),n}function Du(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const a=[...r==="clippingAncestors"?ar(t)?[]:Mu(t,this._c):[].concat(r),n],i=a[0],c=a.reduce((u,f)=>{const p=Po(t,f,o);return u.top=ce(p.top,u.top),u.right=Ie(p.right,u.right),u.bottom=Ie(p.bottom,u.bottom),u.left=ce(p.left,u.left),u},Po(t,i,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Fu(e){const{width:t,height:r}=vs(e);return{width:t,height:r}}function Lu(e,t,r){const n=Ce(t),o=Se(t),s=r==="fixed",a=ze(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const c=we(0);function u(){c.x=xn(o)}if(n||!n&&!s)if((ct(t)!=="body"||Et(o))&&(i=ir(t)),n){const h=ze(t,!0,s,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else o&&u();s&&!n&&o&&u();const f=o&&!n&&!s?xs(o,i):we(0),p=a.left+i.scrollLeft-c.x-f.x,v=a.top+i.scrollTop-c.y-f.y;return{x:p,y:v,width:a.width,height:a.height}}function Or(e){return he(e).position==="static"}function Ro(e,t){if(!Ce(e)||he(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Se(e)===r&&(r=r.ownerDocument.body),r}function ws(e,t){const r=ue(e);if(ar(e))return r;if(!Ce(e)){let o=Oe(e);for(;o&&!nt(o);){if(ge(o)&&!Or(o))return o;o=Oe(o)}return r}let n=Ro(e,t);for(;n&&yu(n)&&Or(n);)n=Ro(n,t);return n&&nt(n)&&Or(n)&&!hn(n)?r:n||Pu(e)||r}const $u=async function(e){const t=this.getOffsetParent||ws,r=this.getDimensions,n=await r(e.floating);return{reference:Lu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Vu(e){return he(e).direction==="rtl"}const Bu={convertOffsetParentRelativeRectToViewportRelativeRect:Tu,getDocumentElement:Se,getClippingRect:Du,getOffsetParent:ws,getElementRects:$u,getClientRects:Nu,getDimensions:Fu,getScale:tt,isElement:ge,isRTL:Vu};function Cs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function zu(e,t){let r=null,n;const o=Se(e);function s(){var i;clearTimeout(n),(i=r)==null||i.disconnect(),r=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:f,top:p,width:v,height:h}=u;if(i||t(),!v||!h)return;const x=jt(p),m=jt(o.clientWidth-(f+v)),g=jt(o.clientHeight-(p+h)),y=jt(f),w={rootMargin:-x+"px "+-m+"px "+-g+"px "+-y+"px",threshold:ce(0,Ie(1,c))||1};let S=!0;function P(N){const k=N[0].intersectionRatio;if(k!==c){if(!S)return a();k?a(!1,k):n=setTimeout(()=>{a(!1,1e-7)},1e3)}k===1&&!Cs(u,e.getBoundingClientRect())&&a(),S=!1}try{r=new IntersectionObserver(P,{...w,root:o.ownerDocument})}catch{r=new IntersectionObserver(P,w)}r.observe(e)}return a(!0),s}function Wu(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=bn(e),f=o||s?[...u?wt(u):[],...wt(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",r,{passive:!0}),s&&y.addEventListener("resize",r)});const p=u&&i?zu(u,r):null;let v=-1,h=null;a&&(h=new ResizeObserver(y=>{let[b]=y;b&&b.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),r()}),u&&!c&&h.observe(u),h.observe(t));let x,m=c?ze(e):null;c&&g();function g(){const y=ze(e);m&&!Cs(m,y)&&r(),m=y,x=requestAnimationFrame(g)}return r(),()=>{var y;f.forEach(b=>{o&&b.removeEventListener("scroll",r),s&&b.removeEventListener("resize",r)}),p?.(),(y=h)==null||y.disconnect(),h=null,c&&cancelAnimationFrame(x)}}const Gu=mu,Hu=gu,Uu=du,Ku=vu,Yu=fu,ko=uu,qu=hu,Xu=(e,t,r)=>{const n=new Map,o={platform:Bu,...r},s={...o.platform,_c:n};return cu(e,t,{...o,platform:s})};var Zu=typeof document<"u",Ju=function(){},Vt=Zu?O.useLayoutEffect:Ju;function Ut(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Ut(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const s=o[n];if(!(s==="_owner"&&e.$$typeof)&&!Ut(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Ss(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ao(e,t){const r=Ss(e);return Math.round(t*r)/r}function _r(e){const t=l.useRef(e);return Vt(()=>{t.current=e}),t}function Qu(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:c,open:u}=e,[f,p]=l.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[v,h]=l.useState(n);Ut(v,n)||h(n);const[x,m]=l.useState(null),[g,y]=l.useState(null),b=l.useCallback(A=>{A!==N.current&&(N.current=A,m(A))},[]),w=l.useCallback(A=>{A!==k.current&&(k.current=A,y(A))},[]),S=s||x,P=a||g,N=l.useRef(null),k=l.useRef(null),R=l.useRef(f),W=c!=null,K=_r(c),X=_r(o),Z=_r(u),ee=l.useCallback(()=>{if(!N.current||!k.current)return;const A={placement:t,strategy:r,middleware:v};X.current&&(A.platform=X.current),Xu(N.current,k.current,A).then(te=>{const E={...te,isPositioned:Z.current!==!1};z.current&&!Ut(R.current,E)&&(R.current=E,er.flushSync(()=>{p(E)}))})},[v,t,r,X,Z]);Vt(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,p(A=>({...A,isPositioned:!1})))},[u]);const z=l.useRef(!1);Vt(()=>(z.current=!0,()=>{z.current=!1}),[]),Vt(()=>{if(S&&(N.current=S),P&&(k.current=P),S&&P){if(K.current)return K.current(S,P,ee);ee()}},[S,P,ee,K,W]);const q=l.useMemo(()=>({reference:N,floating:k,setReference:b,setFloating:w}),[b,w]),F=l.useMemo(()=>({reference:S,floating:P}),[S,P]),H=l.useMemo(()=>{const A={position:r,left:0,top:0};if(!F.floating)return A;const te=Ao(F.floating,f.x),E=Ao(F.floating,f.y);return i?{...A,transform:"translate("+te+"px, "+E+"px)",...Ss(F.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:te,top:E}},[r,i,F.floating,f.x,f.y]);return l.useMemo(()=>({...f,update:ee,refs:q,elements:F,floatingStyles:H}),[f,ee,q,F,H])}const ed=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?ko({element:n.current,padding:o}).fn(r):{}:n?ko({element:n,padding:o}).fn(r):{}}}},td=(e,t)=>({...Gu(e),options:[e,t]}),rd=(e,t)=>({...Hu(e),options:[e,t]}),nd=(e,t)=>({...qu(e),options:[e,t]}),od=(e,t)=>({...Uu(e),options:[e,t]}),sd=(e,t)=>({...Ku(e),options:[e,t]}),ad=(e,t)=>({...Yu(e),options:[e,t]}),id=(e,t)=>({...ed(e),options:[e,t]});var ld="Arrow",Es=l.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...s}=e;return d.jsx(B.svg,{...s,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});Es.displayName=ld;var cd=Es;function Ps(e){const[t,r]=l.useState(void 0);return ie(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,i;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,i=u.blockSize}else a=e.offsetWidth,i=e.offsetHeight;r({width:a,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var yn="Popper",[Rs,ut]=pe(yn),[ud,ks]=Rs(yn),As=e=>{const{__scopePopper:t,children:r}=e,[n,o]=l.useState(null);return d.jsx(ud,{scope:t,anchor:n,onAnchorChange:o,children:r})};As.displayName=yn;var Ts="PopperAnchor",Ns=l.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,s=ks(Ts,r),a=l.useRef(null),i=ne(t,a);return l.useEffect(()=>{s.onAnchorChange(n?.current||a.current)}),n?null:d.jsx(B.div,{...o,ref:i})});Ns.displayName=Ts;var wn="PopperContent",[dd,fd]=Rs(wn),Is=l.forwardRef((e,t)=>{const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:v=!1,updatePositionStrategy:h="optimized",onPlaced:x,...m}=e,g=ks(wn,r),[y,b]=l.useState(null),w=ne(t,T=>b(T)),[S,P]=l.useState(null),N=Ps(S),k=N?.width??0,R=N?.height??0,W=n+(s!=="center"?"-"+s:""),K=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},X=Array.isArray(u)?u:[u],Z=X.length>0,ee={padding:K,boundary:X.filter(md),altBoundary:Z},{refs:z,floatingStyles:q,placement:F,isPositioned:H,middlewareData:A}=Qu({strategy:"fixed",placement:W,whileElementsMounted:(...T)=>Wu(...T,{animationFrame:h==="always"}),elements:{reference:g.anchor},middleware:[td({mainAxis:o+R,alignmentAxis:a}),c&&rd({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?nd():void 0,...ee}),c&&od({...ee}),sd({...ee,apply:({elements:T,rects:L,availableWidth:U,availableHeight:J})=>{const{width:re,height:oe}=L.reference,fe=T.floating.style;fe.setProperty("--radix-popper-available-width",`${U}px`),fe.setProperty("--radix-popper-available-height",`${J}px`),fe.setProperty("--radix-popper-anchor-width",`${re}px`),fe.setProperty("--radix-popper-anchor-height",`${oe}px`)}}),S&&id({element:S,padding:i}),gd({arrowWidth:k,arrowHeight:R}),v&&ad({strategy:"referenceHidden",...ee})]}),[te,E]=js(F),V=Ne(x);ie(()=>{H&&V?.()},[H,V]);const C=A.arrow?.x,I=A.arrow?.y,j=A.arrow?.centerOffset!==0,[_,Y]=l.useState();return ie(()=>{y&&Y(window.getComputedStyle(y).zIndex)},[y]),d.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:H?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:_,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(dd,{scope:r,placedSide:te,onArrowChange:P,arrowX:C,arrowY:I,shouldHideArrow:j,children:d.jsx(B.div,{"data-side":te,"data-align":E,...m,ref:w,style:{...m.style,animation:H?void 0:"none"}})})})});Is.displayName=wn;var Os="PopperArrow",pd={top:"bottom",right:"left",bottom:"top",left:"right"},_s=l.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,s=fd(Os,n),a=pd[s.placedSide];return d.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:d.jsx(cd,{...o,ref:r,style:{...o.style,display:"block"}})})});_s.displayName=Os;function md(e){return e!==null}var gd=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:o}=t,a=o.arrow?.centerOffset!==0,i=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,f]=js(r),p={start:"0%",center:"50%",end:"100%"}[f],v=(o.arrow?.x??0)+i/2,h=(o.arrow?.y??0)+c/2;let x="",m="";return u==="bottom"?(x=a?p:`${v}px`,m=`${-c}px`):u==="top"?(x=a?p:`${v}px`,m=`${n.floating.height+c}px`):u==="right"?(x=`${-c}px`,m=a?p:`${h}px`):u==="left"&&(x=`${n.floating.width+c}px`,m=a?p:`${h}px`),{data:{x,y:m}}}});function js(e){const[t,r="center"]=e.split("-");return[t,r]}var Cn=As,lr=Ns,Sn=Is,En=_s,hd="Portal",Pt=l.forwardRef((e,t)=>{const{container:r,...n}=e,[o,s]=l.useState(!1);ie(()=>s(!0),[]);const a=r||o&&globalThis?.document?.body;return a?Ko.createPortal(d.jsx(B.div,{...n,ref:t}),a):null});Pt.displayName=hd;var vd=l[" useInsertionEffect ".trim().toString()]||ie;function de({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,s,a]=bd({defaultProp:t,onChange:r}),i=e!==void 0,c=i?e:o;{const f=l.useRef(e!==void 0);l.useEffect(()=>{const p=f.current;p!==i&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=i},[i,n])}const u=l.useCallback(f=>{if(i){const p=xd(f)?f(e):f;p!==e&&a.current?.(p)}else s(f)},[i,e,s,a]);return[c,u]}function bd({defaultProp:e,onChange:t}){const[r,n]=l.useState(e),o=l.useRef(r),s=l.useRef(t);return vd(()=>{s.current=t},[t]),l.useEffect(()=>{o.current!==r&&(s.current?.(r),o.current=r)},[r,o]),[r,n,s]}function xd(e){return typeof e=="function"}function Ms(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Ds=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"}),yd="VisuallyHidden",Fs=l.forwardRef((e,t)=>d.jsx(B.span,{...e,ref:t,style:{...Ds,...e.style}}));Fs.displayName=yd;var wd=Fs,Cd=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Xe=new WeakMap,Mt=new WeakMap,Dt={},jr=0,Ls=function(e){return e&&(e.host||Ls(e.parentNode))},Sd=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Ls(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Ed=function(e,t,r,n){var o=Sd(t,Array.isArray(e)?e:[e]);Dt[r]||(Dt[r]=new WeakMap);var s=Dt[r],a=[],i=new Set,c=new Set(o),u=function(p){!p||i.has(p)||(i.add(p),u(p.parentNode))};o.forEach(u);var f=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(v){if(i.has(v))f(v);else try{var h=v.getAttribute(n),x=h!==null&&h!=="false",m=(Xe.get(v)||0)+1,g=(s.get(v)||0)+1;Xe.set(v,m),s.set(v,g),a.push(v),m===1&&x&&Mt.set(v,!0),g===1&&v.setAttribute(r,"true"),x||v.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",v,y)}})};return f(t),i.clear(),jr++,function(){a.forEach(function(p){var v=Xe.get(p)-1,h=s.get(p)-1;Xe.set(p,v),s.set(p,h),v||(Mt.has(p)||p.removeAttribute(n),Mt.delete(p)),h||p.removeAttribute(r)}),jr--,jr||(Xe=new WeakMap,Xe=new WeakMap,Mt=new WeakMap,Dt={})}},Pn=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=Cd(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),Ed(n,o,r,"aria-hidden")):function(){return null}},xe=function(){return xe=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},xe.apply(this,arguments)};function $s(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Pd(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,s;n<o;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}var Bt="right-scroll-bar-position",zt="width-before-scroll-bar",Rd="with-scroll-bars-hidden",kd="--removed-body-scroll-bar-size";function Mr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ad(e,t){var r=O.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var Td=typeof window<"u"?l.useLayoutEffect:l.useEffect,To=new WeakMap;function Nd(e,t){var r=Ad(null,function(n){return e.forEach(function(o){return Mr(o,n)})});return Td(function(){var n=To.get(r);if(n){var o=new Set(n),s=new Set(e),a=r.current;o.forEach(function(i){s.has(i)||Mr(i,null)}),s.forEach(function(i){o.has(i)||Mr(i,a)})}To.set(r,e)},[e]),r}function Id(e){return e}function Od(e,t){t===void 0&&(t=Id);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var a=t(s,n);return r.push(a),function(){r=r.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(n=!0;r.length;){var a=r;r=[],a.forEach(s)}r={push:function(i){return s(i)},filter:function(){return r}}},assignMedium:function(s){n=!0;var a=[];if(r.length){var i=r;r=[],i.forEach(s),a=r}var c=function(){var f=a;a=[],f.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(f){a.push(f),u()},filter:function(f){return a=a.filter(f),r}}}};return o}function _d(e){e===void 0&&(e={});var t=Od(null);return t.options=xe({async:!0,ssr:!1},e),t}var Vs=function(e){var t=e.sideCar,r=$s(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return l.createElement(n,xe({},r))};Vs.isSideCarExport=!0;function jd(e,t){return e.useMedium(t),Vs}var Bs=_d(),Dr=function(){},cr=l.forwardRef(function(e,t){var r=l.useRef(null),n=l.useState({onScrollCapture:Dr,onWheelCapture:Dr,onTouchMoveCapture:Dr}),o=n[0],s=n[1],a=e.forwardProps,i=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,v=e.sideCar,h=e.noRelative,x=e.noIsolation,m=e.inert,g=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,w=e.gapMode,S=$s(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=v,N=Nd([r,t]),k=xe(xe({},S),o);return l.createElement(l.Fragment,null,f&&l.createElement(P,{sideCar:Bs,removeScrollBar:u,shards:p,noRelative:h,noIsolation:x,inert:m,setCallbacks:s,allowPinchZoom:!!g,lockRef:r,gapMode:w}),a?l.cloneElement(l.Children.only(i),xe(xe({},k),{ref:N})):l.createElement(b,xe({},k,{className:c,ref:N}),i))});cr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};cr.classNames={fullWidth:zt,zeroRight:Bt};var Md=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Dd(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Md();return t&&e.setAttribute("nonce",t),e}function Fd(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ld(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var $d=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Dd())&&(Fd(t,r),Ld(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Vd=function(){var e=$d();return function(t,r){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},zs=function(){var e=Vd(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Bd={left:0,top:0,right:0,gap:0},Fr=function(e){return parseInt(e||"",10)||0},zd=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Fr(r),Fr(n),Fr(o)]},Wd=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Bd;var t=zd(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Gd=zs(),rt="data-scroll-locked",Hd=function(e,t,r,n){var o=e.left,s=e.top,a=e.right,i=e.gap;return r===void 0&&(r="margin"),`
|
|
23
|
+
.`.concat(Rd,` {
|
|
24
24
|
overflow: hidden `).concat(n,`;
|
|
25
25
|
padding-right: `).concat(i,"px ").concat(n,`;
|
|
26
26
|
}
|
|
27
|
-
body[`).concat(
|
|
27
|
+
body[`).concat(rt,`] {
|
|
28
28
|
overflow: hidden `).concat(n,`;
|
|
29
29
|
overscroll-behavior: contain;
|
|
30
30
|
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
|
|
@@ -37,66 +37,86 @@ React keys must be passed directly to JSX without using spread:
|
|
|
37
37
|
`),r==="padding"&&"padding-right: ".concat(i,"px ").concat(n,";")].filter(Boolean).join(""),`
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
.`).concat(
|
|
40
|
+
.`).concat(Bt,` {
|
|
41
41
|
right: `).concat(i,"px ").concat(n,`;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
.`).concat(
|
|
44
|
+
.`).concat(zt,` {
|
|
45
45
|
margin-right: `).concat(i,"px ").concat(n,`;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
.`).concat(
|
|
48
|
+
.`).concat(Bt," .").concat(Bt,` {
|
|
49
49
|
right: 0 `).concat(n,`;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
.`).concat(
|
|
52
|
+
.`).concat(zt," .").concat(zt,` {
|
|
53
53
|
margin-right: 0 `).concat(n,`;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
body[`).concat(
|
|
57
|
-
`).concat(
|
|
56
|
+
body[`).concat(rt,`] {
|
|
57
|
+
`).concat(kd,": ").concat(i,`px;
|
|
58
58
|
}
|
|
59
|
-
`)},
|
|
59
|
+
`)},No=function(){var e=parseInt(document.body.getAttribute(rt)||"0",10);return isFinite(e)?e:0},Ud=function(){l.useEffect(function(){return document.body.setAttribute(rt,(No()+1).toString()),function(){var e=No()-1;e<=0?document.body.removeAttribute(rt):document.body.setAttribute(rt,e.toString())}},[])},Kd=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;Ud();var s=l.useMemo(function(){return Wd(o)},[o]);return l.createElement(Gd,{styles:Hd(s,!t,o,r?"":"!important")})},Xr=!1;if(typeof window<"u")try{var Ft=Object.defineProperty({},"passive",{get:function(){return Xr=!0,!0}});window.addEventListener("test",Ft,Ft),window.removeEventListener("test",Ft,Ft)}catch{Xr=!1}var Ze=Xr?{passive:!1}:!1,Yd=function(e){return e.tagName==="TEXTAREA"},Ws=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Yd(e)&&r[t]==="visible")},qd=function(e){return Ws(e,"overflowY")},Xd=function(e){return Ws(e,"overflowX")},Io=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=Gs(e,n);if(o){var s=Hs(e,n),a=s[1],i=s[2];if(a>i)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Zd=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Jd=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},Gs=function(e,t){return e==="v"?qd(t):Xd(t)},Hs=function(e,t){return e==="v"?Zd(t):Jd(t)},Qd=function(e,t){return e==="h"&&t==="rtl"?-1:1},ef=function(e,t,r,n,o){var s=Qd(e,window.getComputedStyle(t).direction),a=s*n,i=r.target,c=t.contains(i),u=!1,f=a>0,p=0,v=0;do{if(!i)break;var h=Hs(e,i),x=h[0],m=h[1],g=h[2],y=m-g-s*x;(x||y)&&Gs(e,i)&&(p+=y,v+=x);var b=i.parentNode;i=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!c&&i!==document.body||c&&(t.contains(i)||t===i));return(f&&Math.abs(p)<1||!f&&Math.abs(v)<1)&&(u=!0),u},Lt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Oo=function(e){return[e.deltaX,e.deltaY]},_o=function(e){return e&&"current"in e?e.current:e},tf=function(e,t){return e[0]===t[0]&&e[1]===t[1]},rf=function(e){return`
|
|
60
60
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
61
61
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
62
|
-
`)},Ki=0,je=[];function Xi(e){var t=l.useRef([]),r=l.useRef([0,0]),n=l.useRef(),o=l.useState(Ki++)[0],s=l.useState(Wn)[0],a=l.useRef(e);l.useEffect(function(){a.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=vi([e.lockRef.current],(e.shards||[]).map(en),!0).filter(Boolean);return p.forEach(function(h){return h.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=l.useCallback(function(p,h){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!a.current.allowPinchZoom;var x=ct(p),y=r.current,w="deltaX"in p?p.deltaX:y[0]-x[0],k="deltaY"in p?p.deltaY:y[1]-x[1],A,O=p.target,P=Math.abs(w)>Math.abs(k)?"h":"v";if("touches"in p&&P==="h"&&O.type==="range")return!1;var E=Jr(P,O);if(!E)return!0;if(E?A=P:(A=P==="v"?"h":"v",E=Jr(P,O)),!E)return!1;if(!n.current&&"changedTouches"in p&&(w||k)&&(n.current=A),!A)return!0;var M=n.current||A;return Hi(M,h,p,M==="h"?w:k)},[]),c=l.useCallback(function(p){var h=p;if(!(!je.length||je[je.length-1]!==s)){var x="deltaY"in h?Qr(h):ct(h),y=t.current.filter(function(A){return A.name===h.type&&(A.target===h.target||h.target===A.shadowParent)&&Ui(A.delta,x)})[0];if(y&&y.should){h.cancelable&&h.preventDefault();return}if(!y){var w=(a.current.shards||[]).map(en).filter(Boolean).filter(function(A){return A.contains(h.target)}),k=w.length>0?i(h,w[0]):!a.current.noIsolation;k&&h.cancelable&&h.preventDefault()}}},[]),u=l.useCallback(function(p,h,x,y){var w={name:p,delta:h,target:x,should:y,shadowParent:qi(x)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(k){return k!==w})},1)},[]),d=l.useCallback(function(p){r.current=ct(p),n.current=void 0},[]),f=l.useCallback(function(p){u(p.type,Qr(p),p.target,i(p,e.lockRef.current))},[]),v=l.useCallback(function(p){u(p.type,ct(p),p.target,i(p,e.lockRef.current))},[]);l.useEffect(function(){return je.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:v}),document.addEventListener("wheel",c,Me),document.addEventListener("touchmove",c,Me),document.addEventListener("touchstart",d,Me),function(){je=je.filter(function(p){return p!==s}),document.removeEventListener("wheel",c,Me),document.removeEventListener("touchmove",c,Me),document.removeEventListener("touchstart",d,Me)}},[]);var g=e.removeScrollBar,b=e.inert;return l.createElement(l.Fragment,null,b?l.createElement(s,{styles:Yi(o)}):null,g?l.createElement(Fi,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function qi(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Zi=Ri(zn,Xi);var Hn=l.forwardRef(function(e,t){return l.createElement(Et,le({},e,{ref:t,sideCar:Zi}))});Hn.classNames=Et.classNames;var Ji=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Le=new WeakMap,lt=new WeakMap,ut={},Vt=0,Un=function(e){return e&&(e.host||Un(e.parentNode))},Qi=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Un(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},ec=function(e,t,r,n){var o=Qi(t,Array.isArray(e)?e:[e]);ut[r]||(ut[r]=new WeakMap);var s=ut[r],a=[],i=new Set,c=new Set(o),u=function(f){!f||i.has(f)||(i.add(f),u(f.parentNode))};o.forEach(u);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(v){if(i.has(v))d(v);else try{var g=v.getAttribute(n),b=g!==null&&g!=="false",p=(Le.get(v)||0)+1,h=(s.get(v)||0)+1;Le.set(v,p),s.set(v,h),a.push(v),p===1&&b&<.set(v,!0),h===1&&v.setAttribute(r,"true"),b||v.setAttribute(n,"true")}catch(x){console.error("aria-hidden: cannot operate on ",v,x)}})};return d(t),i.clear(),Vt++,function(){a.forEach(function(f){var v=Le.get(f)-1,g=s.get(f)-1;Le.set(f,v),s.set(f,g),v||(lt.has(f)||f.removeAttribute(n),lt.delete(f)),g||f.removeAttribute(r)}),Vt--,Vt||(Le=new WeakMap,Le=new WeakMap,lt=new WeakMap,ut={})}},tc=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=Ji(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),ec(n,o,r,"aria-hidden")):function(){return null}},Rt="Dialog",[Yn,Wd]=pe(Rt),[rc,ae]=Yn(Rt),Kn=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:s,modal:a=!0}=e,i=l.useRef(null),c=l.useRef(null),[u,d]=me({prop:n,defaultProp:o??!1,onChange:s,caller:Rt});return m.jsx(rc,{scope:t,triggerRef:i,contentRef:c,contentId:Se(),titleId:Se(),descriptionId:Se(),open:u,onOpenChange:d,onOpenToggle:l.useCallback(()=>d(f=>!f),[d]),modal:a,children:r})};Kn.displayName=Rt;var Xn="DialogTrigger",qn=l.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=ae(Xn,r),s=Q(t,o.triggerRef);return m.jsx(V.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ur(o.open),...n,ref:s,onClick:X(e.onClick,o.onOpenToggle)})});qn.displayName=Xn;var cr="DialogPortal",[nc,Zn]=Yn(cr,{forceMount:void 0}),Jn=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,s=ae(cr,t);return m.jsx(nc,{scope:t,forceMount:r,children:l.Children.map(n,a=>m.jsx(_e,{present:r||s.open,children:m.jsx(ir,{asChild:!0,container:o,children:a})}))})};Jn.displayName=cr;var gt="DialogOverlay",Qn=l.forwardRef((e,t)=>{const r=Zn(gt,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,s=ae(gt,e.__scopeDialog);return s.modal?m.jsx(_e,{present:n||s.open,children:m.jsx(sc,{...o,ref:t})}):null});Qn.displayName=gt;var oc=Xe("DialogOverlay.RemoveScroll"),sc=l.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=ae(gt,r);return m.jsx(Hn,{as:oc,allowPinchZoom:!0,shards:[o.contentRef],children:m.jsx(V.div,{"data-state":ur(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Oe="DialogContent",eo=l.forwardRef((e,t)=>{const r=Zn(Oe,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,s=ae(Oe,e.__scopeDialog);return m.jsx(_e,{present:n||s.open,children:s.modal?m.jsx(ac,{...o,ref:t}):m.jsx(ic,{...o,ref:t})})});eo.displayName=Oe;var ac=l.forwardRef((e,t)=>{const r=ae(Oe,e.__scopeDialog),n=l.useRef(null),o=Q(t,r.contentRef,n);return l.useEffect(()=>{const s=n.current;if(s)return tc(s)},[]),m.jsx(to,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:X(e.onCloseAutoFocus,s=>{s.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:X(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,i=a.button===0&&a.ctrlKey===!0;(a.button===2||i)&&s.preventDefault()}),onFocusOutside:X(e.onFocusOutside,s=>s.preventDefault())})}),ic=l.forwardRef((e,t)=>{const r=ae(Oe,e.__scopeDialog),n=l.useRef(!1),o=l.useRef(!1);return m.jsx(to,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(n.current||r.triggerRef.current?.focus(),s.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;r.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),to=l.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:s,...a}=e,i=ae(Oe,r),c=l.useRef(null),u=Q(t,c);return gi(),m.jsxs(m.Fragment,{children:[m.jsx(jn,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:s,children:m.jsx(ar,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":ur(i.open),...a,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),m.jsxs(m.Fragment,{children:[m.jsx(cc,{titleId:i.titleId}),m.jsx(uc,{contentRef:c,descriptionId:i.descriptionId})]})]})}),lr="DialogTitle",ro=l.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=ae(lr,r);return m.jsx(V.h2,{id:o.titleId,...n,ref:t})});ro.displayName=lr;var no="DialogDescription",oo=l.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=ae(no,r);return m.jsx(V.p,{id:o.descriptionId,...n,ref:t})});oo.displayName=no;var so="DialogClose",ao=l.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=ae(so,r);return m.jsx(V.button,{type:"button",...n,ref:t,onClick:X(e.onClick,()=>o.onOpenChange(!1))})});ao.displayName=so;function ur(e){return e?"open":"closed"}var io="DialogTitleWarning",[Gd,co]=Wa(io,{contentName:Oe,titleName:lr,docsSlug:"dialog"}),cc=({titleId:e})=>{const t=co(io),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
`)},nf=0,Je=[];function of(e){var t=l.useRef([]),r=l.useRef([0,0]),n=l.useRef(),o=l.useState(nf++)[0],s=l.useState(zs)[0],a=l.useRef(e);l.useEffect(function(){a.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=Pd([e.lockRef.current],(e.shards||[]).map(_o),!0).filter(Boolean);return m.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=l.useCallback(function(m,g){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!a.current.allowPinchZoom;var y=Lt(m),b=r.current,w="deltaX"in m?m.deltaX:b[0]-y[0],S="deltaY"in m?m.deltaY:b[1]-y[1],P,N=m.target,k=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in m&&k==="h"&&N.type==="range")return!1;var R=Io(k,N);if(!R)return!0;if(R?P=k:(P=k==="v"?"h":"v",R=Io(k,N)),!R)return!1;if(!n.current&&"changedTouches"in m&&(w||S)&&(n.current=P),!P)return!0;var W=n.current||P;return ef(W,g,m,W==="h"?w:S)},[]),c=l.useCallback(function(m){var g=m;if(!(!Je.length||Je[Je.length-1]!==s)){var y="deltaY"in g?Oo(g):Lt(g),b=t.current.filter(function(P){return P.name===g.type&&(P.target===g.target||g.target===P.shadowParent)&&tf(P.delta,y)})[0];if(b&&b.should){g.cancelable&&g.preventDefault();return}if(!b){var w=(a.current.shards||[]).map(_o).filter(Boolean).filter(function(P){return P.contains(g.target)}),S=w.length>0?i(g,w[0]):!a.current.noIsolation;S&&g.cancelable&&g.preventDefault()}}},[]),u=l.useCallback(function(m,g,y,b){var w={name:m,delta:g,target:y,should:b,shadowParent:sf(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),f=l.useCallback(function(m){r.current=Lt(m),n.current=void 0},[]),p=l.useCallback(function(m){u(m.type,Oo(m),m.target,i(m,e.lockRef.current))},[]),v=l.useCallback(function(m){u(m.type,Lt(m),m.target,i(m,e.lockRef.current))},[]);l.useEffect(function(){return Je.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:v}),document.addEventListener("wheel",c,Ze),document.addEventListener("touchmove",c,Ze),document.addEventListener("touchstart",f,Ze),function(){Je=Je.filter(function(m){return m!==s}),document.removeEventListener("wheel",c,Ze),document.removeEventListener("touchmove",c,Ze),document.removeEventListener("touchstart",f,Ze)}},[]);var h=e.removeScrollBar,x=e.inert;return l.createElement(l.Fragment,null,x?l.createElement(s,{styles:rf(o)}):null,h?l.createElement(Kd,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function sf(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const af=jd(Bs,of);var ur=l.forwardRef(function(e,t){return l.createElement(cr,xe({},e,{ref:t,sideCar:af}))});ur.classNames=cr.classNames;var lf=[" ","Enter","ArrowUp","ArrowDown"],cf=[" ","Enter"],We="Select",[dr,fr,uf]=dn(We),[dt,Lh]=pe(We,[uf,ut]),pr=ut(),[df,je]=dt(We),[ff,pf]=dt(We),Us=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:s,value:a,defaultValue:i,onValueChange:c,dir:u,name:f,autoComplete:p,disabled:v,required:h,form:x}=e,m=pr(t),[g,y]=l.useState(null),[b,w]=l.useState(null),[S,P]=l.useState(!1),N=nr(u),[k,R]=de({prop:n,defaultProp:o??!1,onChange:s,caller:We}),[W,K]=de({prop:a,defaultProp:i,onChange:c,caller:We}),X=l.useRef(null),Z=g?x||!!g.closest("form"):!0,[ee,z]=l.useState(new Set),q=Array.from(ee).map(F=>F.props.value).join(";");return d.jsx(Cn,{...m,children:d.jsxs(df,{required:h,scope:t,trigger:g,onTriggerChange:y,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:P,contentId:ae(),value:W,onValueChange:K,open:k,onOpenChange:R,dir:N,triggerPointerDownPosRef:X,disabled:v,children:[d.jsx(dr.Provider,{scope:t,children:d.jsx(ff,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(F=>{z(H=>new Set(H).add(F))},[]),onNativeOptionRemove:l.useCallback(F=>{z(H=>{const A=new Set(H);return A.delete(F),A})},[]),children:r})}),Z?d.jsxs(va,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:p,value:W,onChange:F=>K(F.target.value),disabled:v,form:x,children:[W===void 0?d.jsx("option",{value:""}):null,Array.from(ee)]},q):null]})})};Us.displayName=We;var Ks="SelectTrigger",Ys=l.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...o}=e,s=pr(r),a=je(Ks,r),i=a.disabled||n,c=ne(t,a.onTriggerChange),u=fr(r),f=l.useRef("touch"),[p,v,h]=xa(m=>{const g=u().filter(w=>!w.disabled),y=g.find(w=>w.value===a.value),b=ya(g,m,y);b!==void 0&&a.onValueChange(b.value)}),x=m=>{i||(a.onOpenChange(!0),h()),m&&(a.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return d.jsx(lr,{asChild:!0,...s,children:d.jsx(B.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":ba(a.value)?"":void 0,...o,ref:c,onClick:G(o.onClick,m=>{m.currentTarget.focus(),f.current!=="mouse"&&x(m)}),onPointerDown:G(o.onPointerDown,m=>{f.current=m.pointerType;const g=m.target;g.hasPointerCapture(m.pointerId)&&g.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(x(m),m.preventDefault())}),onKeyDown:G(o.onKeyDown,m=>{const g=p.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&v(m.key),!(g&&m.key===" ")&&lf.includes(m.key)&&(x(),m.preventDefault())})})})});Ys.displayName=Ks;var qs="SelectValue",Xs=l.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:s,placeholder:a="",...i}=e,c=je(qs,r),{onValueNodeHasChildrenChange:u}=c,f=s!==void 0,p=ne(t,c.onValueNodeChange);return ie(()=>{u(f)},[u,f]),d.jsx(B.span,{...i,ref:p,style:{pointerEvents:"none"},children:ba(c.value)?d.jsx(d.Fragment,{children:a}):s})});Xs.displayName=qs;var mf="SelectIcon",Zs=l.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return d.jsx(B.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})});Zs.displayName=mf;var gf="SelectPortal",Js=e=>d.jsx(Pt,{asChild:!0,...e});Js.displayName=gf;var Ge="SelectContent",Qs=l.forwardRef((e,t)=>{const r=je(Ge,e.__scopeSelect),[n,o]=l.useState();if(ie(()=>{o(new DocumentFragment)},[]),!r.open){const s=n;return s?er.createPortal(d.jsx(ea,{scope:e.__scopeSelect,children:d.jsx(dr.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),s):null}return d.jsx(ta,{...e,ref:t})});Qs.displayName=Ge;var me=10,[ea,Me]=dt(Ge),hf="SelectContentImpl",vf=Be("SelectContent.RemoveScroll"),ta=l.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:a,side:i,sideOffset:c,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:v,collisionPadding:h,sticky:x,hideWhenDetached:m,avoidCollisions:g,...y}=e,b=je(Ge,r),[w,S]=l.useState(null),[P,N]=l.useState(null),k=ne(t,T=>S(T)),[R,W]=l.useState(null),[K,X]=l.useState(null),Z=fr(r),[ee,z]=l.useState(!1),q=l.useRef(!1);l.useEffect(()=>{if(w)return Pn(w)},[w]),fn();const F=l.useCallback(T=>{const[L,...U]=Z().map(oe=>oe.ref.current),[J]=U.slice(-1),re=document.activeElement;for(const oe of T)if(oe===re||(oe?.scrollIntoView({block:"nearest"}),oe===L&&P&&(P.scrollTop=0),oe===J&&P&&(P.scrollTop=P.scrollHeight),oe?.focus(),document.activeElement!==re))return},[Z,P]),H=l.useCallback(()=>F([R,w]),[F,R,w]);l.useEffect(()=>{ee&&H()},[ee,H]);const{onOpenChange:A,triggerPointerDownPosRef:te}=b;l.useEffect(()=>{if(w){let T={x:0,y:0};const L=J=>{T={x:Math.abs(Math.round(J.pageX)-(te.current?.x??0)),y:Math.abs(Math.round(J.pageY)-(te.current?.y??0))}},U=J=>{T.x<=10&&T.y<=10?J.preventDefault():w.contains(J.target)||A(!1),document.removeEventListener("pointermove",L),te.current=null};return te.current!==null&&(document.addEventListener("pointermove",L),document.addEventListener("pointerup",U,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",L),document.removeEventListener("pointerup",U,{capture:!0})}}},[w,A,te]),l.useEffect(()=>{const T=()=>A(!1);return window.addEventListener("blur",T),window.addEventListener("resize",T),()=>{window.removeEventListener("blur",T),window.removeEventListener("resize",T)}},[A]);const[E,V]=xa(T=>{const L=Z().filter(re=>!re.disabled),U=L.find(re=>re.ref.current===document.activeElement),J=ya(L,T,U);J&&setTimeout(()=>J.ref.current.focus())}),C=l.useCallback((T,L,U)=>{const J=!q.current&&!U;(b.value!==void 0&&b.value===L||J)&&(W(T),J&&(q.current=!0))},[b.value]),I=l.useCallback(()=>w?.focus(),[w]),j=l.useCallback((T,L,U)=>{const J=!q.current&&!U;(b.value!==void 0&&b.value===L||J)&&X(T)},[b.value]),_=n==="popper"?Zr:ra,Y=_===Zr?{side:i,sideOffset:c,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:v,collisionPadding:h,sticky:x,hideWhenDetached:m,avoidCollisions:g}:{};return d.jsx(ea,{scope:r,content:w,viewport:P,onViewportChange:N,itemRefCallback:C,selectedItem:R,onItemLeave:I,itemTextRefCallback:j,focusSelectedItem:H,selectedItemText:K,position:n,isPositioned:ee,searchRef:E,children:d.jsx(ur,{as:vf,allowPinchZoom:!0,children:d.jsx(or,{asChild:!0,trapped:b.open,onMountAutoFocus:T=>{T.preventDefault()},onUnmountAutoFocus:G(o,T=>{b.trigger?.focus({preventScroll:!0}),T.preventDefault()}),children:d.jsx(St,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:T=>T.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:d.jsx(_,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:T=>T.preventDefault(),...y,...Y,onPlaced:()=>z(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:G(y.onKeyDown,T=>{const L=T.ctrlKey||T.altKey||T.metaKey;if(T.key==="Tab"&&T.preventDefault(),!L&&T.key.length===1&&V(T.key),["ArrowUp","ArrowDown","Home","End"].includes(T.key)){let J=Z().filter(re=>!re.disabled).map(re=>re.ref.current);if(["ArrowUp","End"].includes(T.key)&&(J=J.slice().reverse()),["ArrowUp","ArrowDown"].includes(T.key)){const re=T.target,oe=J.indexOf(re);J=J.slice(oe+1)}setTimeout(()=>F(J)),T.preventDefault()}})})})})})})});ta.displayName=hf;var bf="SelectItemAlignedPosition",ra=l.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...o}=e,s=je(Ge,r),a=Me(Ge,r),[i,c]=l.useState(null),[u,f]=l.useState(null),p=ne(t,k=>f(k)),v=fr(r),h=l.useRef(!1),x=l.useRef(!0),{viewport:m,selectedItem:g,selectedItemText:y,focusSelectedItem:b}=a,w=l.useCallback(()=>{if(s.trigger&&s.valueNode&&i&&u&&m&&g&&y){const k=s.trigger.getBoundingClientRect(),R=u.getBoundingClientRect(),W=s.valueNode.getBoundingClientRect(),K=y.getBoundingClientRect();if(s.dir!=="rtl"){const re=K.left-R.left,oe=W.left-re,fe=k.left-oe,Le=k.width+fe,Er=Math.max(Le,R.width),Pr=window.innerWidth-me,Rr=co(oe,[me,Math.max(me,Pr-Er)]);i.style.minWidth=Le+"px",i.style.left=Rr+"px"}else{const re=R.right-K.right,oe=window.innerWidth-W.right-re,fe=window.innerWidth-k.right-oe,Le=k.width+fe,Er=Math.max(Le,R.width),Pr=window.innerWidth-me,Rr=co(oe,[me,Math.max(me,Pr-Er)]);i.style.minWidth=Le+"px",i.style.right=Rr+"px"}const X=v(),Z=window.innerHeight-me*2,ee=m.scrollHeight,z=window.getComputedStyle(u),q=parseInt(z.borderTopWidth,10),F=parseInt(z.paddingTop,10),H=parseInt(z.borderBottomWidth,10),A=parseInt(z.paddingBottom,10),te=q+F+ee+A+H,E=Math.min(g.offsetHeight*5,te),V=window.getComputedStyle(m),C=parseInt(V.paddingTop,10),I=parseInt(V.paddingBottom,10),j=k.top+k.height/2-me,_=Z-j,Y=g.offsetHeight/2,T=g.offsetTop+Y,L=q+F+T,U=te-L;if(L<=j){const re=X.length>0&&g===X[X.length-1].ref.current;i.style.bottom="0px";const oe=u.clientHeight-m.offsetTop-m.offsetHeight,fe=Math.max(_,Y+(re?I:0)+oe+H),Le=L+fe;i.style.height=Le+"px"}else{const re=X.length>0&&g===X[0].ref.current;i.style.top="0px";const fe=Math.max(j,q+m.offsetTop+(re?C:0)+Y)+U;i.style.height=fe+"px",m.scrollTop=L-j+m.offsetTop}i.style.margin=`${me}px 0`,i.style.minHeight=E+"px",i.style.maxHeight=Z+"px",n?.(),requestAnimationFrame(()=>h.current=!0)}},[v,s.trigger,s.valueNode,i,u,m,g,y,s.dir,n]);ie(()=>w(),[w]);const[S,P]=l.useState();ie(()=>{u&&P(window.getComputedStyle(u).zIndex)},[u]);const N=l.useCallback(k=>{k&&x.current===!0&&(w(),b?.(),x.current=!1)},[w,b]);return d.jsx(yf,{scope:r,contentWrapper:i,shouldExpandOnScrollRef:h,onScrollButtonChange:N,children:d.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:d.jsx(B.div,{...o,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});ra.displayName=bf;var xf="SelectPopperPosition",Zr=l.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=me,...s}=e,a=pr(r);return d.jsx(Sn,{...a,...s,ref:t,align:n,collisionPadding:o,style:{boxSizing:"border-box",...s.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)"}})});Zr.displayName=xf;var[yf,Rn]=dt(Ge,{}),Jr="SelectViewport",na=l.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...o}=e,s=Me(Jr,r),a=Rn(Jr,r),i=ne(t,s.onViewportChange),c=l.useRef(0);return d.jsxs(d.Fragment,{children:[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:n}),d.jsx(dr.Slot,{scope:r,children:d.jsx(B.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:G(o.onScroll,u=>{const f=u.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:v}=a;if(v?.current&&p){const h=Math.abs(c.current-f.scrollTop);if(h>0){const x=window.innerHeight-me*2,m=parseFloat(p.style.minHeight),g=parseFloat(p.style.height),y=Math.max(m,g);if(y<x){const b=y+h,w=Math.min(x,b),S=b-w;p.style.height=w+"px",p.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,p.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});na.displayName=Jr;var oa="SelectGroup",[wf,Cf]=dt(oa),sa=l.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=ae();return d.jsx(wf,{scope:r,id:o,children:d.jsx(B.div,{role:"group","aria-labelledby":o,...n,ref:t})})});sa.displayName=oa;var aa="SelectLabel",ia=l.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Cf(aa,r);return d.jsx(B.div,{id:o.id,...n,ref:t})});ia.displayName=aa;var Kt="SelectItem",[Sf,la]=dt(Kt),ca=l.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:s,...a}=e,i=je(Kt,r),c=Me(Kt,r),u=i.value===n,[f,p]=l.useState(s??""),[v,h]=l.useState(!1),x=ne(t,b=>c.itemRefCallback?.(b,n,o)),m=ae(),g=l.useRef("touch"),y=()=>{o||(i.onValueChange(n),i.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Sf,{scope:r,value:n,disabled:o,textId:m,isSelected:u,onItemTextChange:l.useCallback(b=>{p(w=>w||(b?.textContent??"").trim())},[]),children:d.jsx(dr.ItemSlot,{scope:r,value:n,disabled:o,textValue:f,children:d.jsx(B.div,{role:"option","aria-labelledby":m,"data-highlighted":v?"":void 0,"aria-selected":u&&v,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...a,ref:x,onFocus:G(a.onFocus,()=>h(!0)),onBlur:G(a.onBlur,()=>h(!1)),onClick:G(a.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:G(a.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:G(a.onPointerDown,b=>{g.current=b.pointerType}),onPointerMove:G(a.onPointerMove,b=>{g.current=b.pointerType,o?c.onItemLeave?.():g.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:G(a.onPointerLeave,b=>{b.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:G(a.onKeyDown,b=>{c.searchRef?.current!==""&&b.key===" "||(cf.includes(b.key)&&y(),b.key===" "&&b.preventDefault())})})})})});ca.displayName=Kt;var bt="SelectItemText",ua=l.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,...s}=e,a=je(bt,r),i=Me(bt,r),c=la(bt,r),u=pf(bt,r),[f,p]=l.useState(null),v=ne(t,y=>p(y),c.onItemTextChange,y=>i.itemTextRefCallback?.(y,c.value,c.disabled)),h=f?.textContent,x=l.useMemo(()=>d.jsx("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:m,onNativeOptionRemove:g}=u;return ie(()=>(m(x),()=>g(x)),[m,g,x]),d.jsxs(d.Fragment,{children:[d.jsx(B.span,{id:c.textId,...s,ref:v}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?er.createPortal(s.children,a.valueNode):null]})});ua.displayName=bt;var da="SelectItemIndicator",fa=l.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return la(da,r).isSelected?d.jsx(B.span,{"aria-hidden":!0,...n,ref:t}):null});fa.displayName=da;var Qr="SelectScrollUpButton",pa=l.forwardRef((e,t)=>{const r=Me(Qr,e.__scopeSelect),n=Rn(Qr,e.__scopeSelect),[o,s]=l.useState(!1),a=ne(t,n.onScrollButtonChange);return ie(()=>{if(r.viewport&&r.isPositioned){let i=function(){const u=c.scrollTop>0;s(u)};const c=r.viewport;return i(),c.addEventListener("scroll",i),()=>c.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),o?d.jsx(ga,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=r;i&&c&&(i.scrollTop=i.scrollTop-c.offsetHeight)}}):null});pa.displayName=Qr;var en="SelectScrollDownButton",ma=l.forwardRef((e,t)=>{const r=Me(en,e.__scopeSelect),n=Rn(en,e.__scopeSelect),[o,s]=l.useState(!1),a=ne(t,n.onScrollButtonChange);return ie(()=>{if(r.viewport&&r.isPositioned){let i=function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<u;s(f)};const c=r.viewport;return i(),c.addEventListener("scroll",i),()=>c.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),o?d.jsx(ga,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=r;i&&c&&(i.scrollTop=i.scrollTop+c.offsetHeight)}}):null});ma.displayName=en;var ga=l.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=e,s=Me("SelectScrollButton",r),a=l.useRef(null),i=fr(r),c=l.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return l.useEffect(()=>()=>c(),[c]),ie(()=>{i().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[i]),d.jsx(B.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:G(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(n,50))}),onPointerMove:G(o.onPointerMove,()=>{s.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(n,50))}),onPointerLeave:G(o.onPointerLeave,()=>{c()})})}),Ef="SelectSeparator",ha=l.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return d.jsx(B.div,{"aria-hidden":!0,...n,ref:t})});ha.displayName=Ef;var tn="SelectArrow",Pf=l.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=pr(r),s=je(tn,r),a=Me(tn,r);return s.open&&a.position==="popper"?d.jsx(En,{...o,...n,ref:t}):null});Pf.displayName=tn;var Rf="SelectBubbleInput",va=l.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const o=l.useRef(null),s=ne(n,o),a=Ms(t);return l.useEffect(()=>{const i=o.current;if(!i)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==t&&f){const p=new Event("change",{bubbles:!0});f.call(i,t),i.dispatchEvent(p)}},[a,t]),d.jsx(B.select,{...r,style:{...Ds,...r.style},ref:s,defaultValue:t})});va.displayName=Rf;function ba(e){return e===""||e===void 0}function xa(e){const t=Ne(e),r=l.useRef(""),n=l.useRef(0),o=l.useCallback(a=>{const i=r.current+a;t(i),function c(u){r.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>c(""),1e3))}(i)},[t]),s=l.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,s]}function ya(e,t,r){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=r?e.indexOf(r):-1;let a=kf(e,Math.max(s,0));o.length===1&&(a=a.filter(u=>u!==r));const c=a.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==r?c:void 0}function kf(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Af=Us,wa=Ys,Tf=Xs,Nf=Zs,If=Js,Ca=Qs,Of=na,_f=sa,Sa=ia,Ea=ca,jf=ua,Mf=fa,Pa=pa,Ra=ma,ka=ha;/**
|
|
63
|
+
* @license lucide-react v0.525.0 - ISC
|
|
64
|
+
*
|
|
65
|
+
* This source code is licensed under the ISC license.
|
|
66
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
+
*/const Df=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ff=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),jo=e=>{const t=Ff(e);return t.charAt(0).toUpperCase()+t.slice(1)},Aa=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),Lf=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
68
|
+
* @license lucide-react v0.525.0 - ISC
|
|
69
|
+
*
|
|
70
|
+
* This source code is licensed under the ISC license.
|
|
71
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
+
*/var $f={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
67
73
|
* @license lucide-react v0.525.0 - ISC
|
|
68
74
|
*
|
|
69
75
|
* This source code is licensed under the ISC license.
|
|
70
76
|
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const
|
|
77
|
+
*/const Vf=O.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:s,iconNode:a,...i},c)=>O.createElement("svg",{ref:c,...$f,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Aa("lucide",o),...!s&&!Lf(i)&&{"aria-hidden":"true"},...i},[...a.map(([u,f])=>O.createElement(u,f)),...Array.isArray(s)?s:[s]]));/**
|
|
72
78
|
* @license lucide-react v0.525.0 - ISC
|
|
73
79
|
*
|
|
74
80
|
* This source code is licensed under the ISC license.
|
|
75
81
|
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/
|
|
82
|
+
*/const ft=(e,t)=>{const r=O.forwardRef(({className:n,...o},s)=>O.createElement(Vf,{ref:s,iconNode:t,className:Aa(`lucide-${Df(jo(e))}`,`lucide-${e}`,n),...o}));return r.displayName=jo(e),r};/**
|
|
77
83
|
* @license lucide-react v0.525.0 - ISC
|
|
78
84
|
*
|
|
79
85
|
* This source code is licensed under the ISC license.
|
|
80
86
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const
|
|
87
|
+
*/const Bf=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ta=ft("check",Bf);/**
|
|
82
88
|
* @license lucide-react v0.525.0 - ISC
|
|
83
89
|
*
|
|
84
90
|
* This source code is licensed under the ISC license.
|
|
85
91
|
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const
|
|
92
|
+
*/const zf=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],kn=ft("chevron-down",zf);/**
|
|
87
93
|
* @license lucide-react v0.525.0 - ISC
|
|
88
94
|
*
|
|
89
95
|
* This source code is licensed under the ISC license.
|
|
90
96
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const
|
|
97
|
+
*/const Wf=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Gf=ft("chevron-up",Wf);/**
|
|
92
98
|
* @license lucide-react v0.525.0 - ISC
|
|
93
99
|
*
|
|
94
100
|
* This source code is licensed under the ISC license.
|
|
95
101
|
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const
|
|
102
|
+
*/const Hf=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Uf=ft("chevrons-up-down",Hf);/**
|
|
103
|
+
* @license lucide-react v0.525.0 - ISC
|
|
104
|
+
*
|
|
105
|
+
* This source code is licensed under the ISC license.
|
|
106
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
+
*/const Kf=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Yf=ft("search",Kf);/**
|
|
108
|
+
* @license lucide-react v0.525.0 - ISC
|
|
109
|
+
*
|
|
110
|
+
* This source code is licensed under the ISC license.
|
|
111
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
+
*/const qf=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Xf=ft("x",qf),Na=Af,Zf=_f,Ia=Tf,An=l.forwardRef(({className:e,children:t,...r},n)=>d.jsxs(wa,{ref:n,className:$($("flex h-9 w-full min-w-0 items-center justify-between","rounded-md border bg-purple-mutted-700 border-purple-mutted-500","text-sm data-[placeholder]:text-muted-foreground [&:not([data-placeholder])]:text-purple-mutted-300 md:text-sm ","px-3 py-1","shadow-xs transition-[color,box-shadow] outline-none","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",e)),...r,children:[t,d.jsx(Nf,{asChild:!0,children:d.jsx(kn,{className:"h-4 w-4 text-purple-mutted-300"})})]}));An.displayName=wa.displayName;const Tn=l.forwardRef(({className:e,...t},r)=>d.jsx(Pa,{ref:r,className:$("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(Gf,{className:"h-4 w-4"})}));Tn.displayName=Pa.displayName;const Nn=l.forwardRef(({className:e,...t},r)=>d.jsx(Ra,{ref:r,className:$("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(kn,{className:"h-4 w-4"})}));Nn.displayName=Ra.displayName;const In=l.forwardRef(({className:e,children:t,position:r="popper",...n},o)=>d.jsx(If,{children:d.jsxs(Ca,{ref:o,className:$("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-purple-mutted-600 border-purple-mutted-500 text-purple-mutted-300 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[d.jsx(Tn,{}),d.jsx(Of,{className:$("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),d.jsx(Nn,{})]})}));In.displayName=Ca.displayName;const Oa=l.forwardRef(({className:e,...t},r)=>d.jsx(Sa,{ref:r,className:$("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Oa.displayName=Sa.displayName;const On=l.forwardRef(({className:e,children:t,...r},n)=>d.jsxs(Ea,{ref:n,className:$($("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none","focus:bg-purple-mutted-500 focus:text-purple-100 text-purple-100","data-[disabled]:pointer-events-none data-[disabled]:opacity-50"),e),...r,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(Mf,{children:d.jsx(Ta,{className:"h-4 w-4"})})}),d.jsx(jf,{children:t})]}));On.displayName=Ea.displayName;const _a=l.forwardRef(({className:e,...t},r)=>d.jsx(ka,{ref:r,className:$("-mx-1 my-1 h-px bg-muted",e),...t}));_a.displayName=ka.displayName;var Mo=1,Jf=.9,Qf=.8,ep=.17,Lr=.1,$r=.999,tp=.9999,rp=.99,np=/[\\\/_+.#"@\[\(\{&]/,op=/[\\\/_+.#"@\[\(\{&]/g,sp=/[\s-]/,ja=/[\s-]/g;function rn(e,t,r,n,o,s,a){if(s===t.length)return o===e.length?Mo:rp;var i=`${o},${s}`;if(a[i]!==void 0)return a[i];for(var c=n.charAt(s),u=r.indexOf(c,o),f=0,p,v,h,x;u>=0;)p=rn(e,t,r,n,u+1,s+1,a),p>f&&(u===o?p*=Mo:np.test(e.charAt(u-1))?(p*=Qf,h=e.slice(o,u-1).match(op),h&&o>0&&(p*=Math.pow($r,h.length))):sp.test(e.charAt(u-1))?(p*=Jf,x=e.slice(o,u-1).match(ja),x&&o>0&&(p*=Math.pow($r,x.length))):(p*=ep,o>0&&(p*=Math.pow($r,u-o))),e.charAt(u)!==t.charAt(s)&&(p*=tp)),(p<Lr&&r.charAt(u-1)===n.charAt(s+1)||n.charAt(s+1)===n.charAt(s)&&r.charAt(u-1)!==n.charAt(s))&&(v=rn(e,t,r,n,u+1,s+2,a),v*Lr>p&&(p=v*Lr)),p>f&&(f=p),u=r.indexOf(c,u+1);return a[i]=f,f}function Do(e){return e.toLowerCase().replace(ja," ")}function ap(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,rn(e,t,Do(e),Do(t),0,0,{})}function ip(e,t){return l.useReducer((r,n)=>t[r][n]??r,e)}var ke=e=>{const{present:t,children:r}=e,n=lp(t),o=typeof r=="function"?r({present:n.isPresent}):l.Children.only(r),s=ne(n.ref,cp(o));return typeof r=="function"||n.isPresent?l.cloneElement(o,{ref:s}):null};ke.displayName="Presence";function lp(e){const[t,r]=l.useState(),n=l.useRef(null),o=l.useRef(e),s=l.useRef("none"),a=e?"mounted":"unmounted",[i,c]=ip(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=$t(n.current);s.current=i==="mounted"?u:"none"},[i]),ie(()=>{const u=n.current,f=o.current;if(f!==e){const v=s.current,h=$t(u);e?c("MOUNT"):h==="none"||u?.display==="none"?c("UNMOUNT"):c(f&&v!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),ie(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,p=h=>{const m=$t(n.current).includes(h.animationName);if(h.target===t&&m&&(c("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},v=h=>{h.target===t&&(s.current=$t(n.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:l.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function $t(e){return e?.animationName||"none"}function cp(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var mr="Dialog",[Ma,$h]=pe(mr),[up,ve]=Ma(mr),Da=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:s,modal:a=!0}=e,i=l.useRef(null),c=l.useRef(null),[u,f]=de({prop:n,defaultProp:o??!1,onChange:s,caller:mr});return d.jsx(up,{scope:t,triggerRef:i,contentRef:c,contentId:ae(),titleId:ae(),descriptionId:ae(),open:u,onOpenChange:f,onOpenToggle:l.useCallback(()=>f(p=>!p),[f]),modal:a,children:r})};Da.displayName=mr;var Fa="DialogTrigger",La=l.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=ve(Fa,r),s=ne(t,o.triggerRef);return d.jsx(B.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Mn(o.open),...n,ref:s,onClick:G(e.onClick,o.onOpenToggle)})});La.displayName=Fa;var _n="DialogPortal",[dp,$a]=Ma(_n,{forceMount:void 0}),Va=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,s=ve(_n,t);return d.jsx(dp,{scope:t,forceMount:r,children:l.Children.map(n,a=>d.jsx(ke,{present:r||s.open,children:d.jsx(Pt,{asChild:!0,container:o,children:a})}))})};Va.displayName=_n;var Yt="DialogOverlay",Ba=l.forwardRef((e,t)=>{const r=$a(Yt,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,s=ve(Yt,e.__scopeDialog);return s.modal?d.jsx(ke,{present:n||s.open,children:d.jsx(pp,{...o,ref:t})}):null});Ba.displayName=Yt;var fp=Be("DialogOverlay.RemoveScroll"),pp=l.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=ve(Yt,r);return d.jsx(ur,{as:fp,allowPinchZoom:!0,shards:[o.contentRef],children:d.jsx(B.div,{"data-state":Mn(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),He="DialogContent",za=l.forwardRef((e,t)=>{const r=$a(He,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,s=ve(He,e.__scopeDialog);return d.jsx(ke,{present:n||s.open,children:s.modal?d.jsx(mp,{...o,ref:t}):d.jsx(gp,{...o,ref:t})})});za.displayName=He;var mp=l.forwardRef((e,t)=>{const r=ve(He,e.__scopeDialog),n=l.useRef(null),o=ne(t,r.contentRef,n);return l.useEffect(()=>{const s=n.current;if(s)return Pn(s)},[]),d.jsx(Wa,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:G(e.onCloseAutoFocus,s=>{s.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:G(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,i=a.button===0&&a.ctrlKey===!0;(a.button===2||i)&&s.preventDefault()}),onFocusOutside:G(e.onFocusOutside,s=>s.preventDefault())})}),gp=l.forwardRef((e,t)=>{const r=ve(He,e.__scopeDialog),n=l.useRef(!1),o=l.useRef(!1);return d.jsx(Wa,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(n.current||r.triggerRef.current?.focus(),s.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;r.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Wa=l.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:s,...a}=e,i=ve(He,r),c=l.useRef(null),u=ne(t,c);return fn(),d.jsxs(d.Fragment,{children:[d.jsx(or,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:s,children:d.jsx(St,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Mn(i.open),...a,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(hp,{titleId:i.titleId}),d.jsx(bp,{contentRef:c,descriptionId:i.descriptionId})]})]})}),jn="DialogTitle",Ga=l.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=ve(jn,r);return d.jsx(B.h2,{id:o.titleId,...n,ref:t})});Ga.displayName=jn;var Ha="DialogDescription",Ua=l.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=ve(Ha,r);return d.jsx(B.p,{id:o.descriptionId,...n,ref:t})});Ua.displayName=Ha;var Ka="DialogClose",Ya=l.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=ve(Ka,r);return d.jsx(B.button,{type:"button",...n,ref:t,onClick:G(e.onClick,()=>o.onOpenChange(!1))})});Ya.displayName=Ka;function Mn(e){return e?"open":"closed"}var qa="DialogTitleWarning",[Vh,Xa]=Pc(qa,{contentName:He,titleName:jn,docsSlug:"dialog"}),hp=({titleId:e})=>{const t=Xa(qa),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
113
|
+
|
|
114
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
115
|
+
|
|
116
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},vp="DialogDescriptionWarning",bp=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Xa(vp).contentName}}.`;return l.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Za=Da,xp=La,Ja=Va,Qa=Ba,ei=za,yp=Ga,wp=Ua,ti=Ya,vt='[cmdk-group=""]',Vr='[cmdk-group-items=""]',Cp='[cmdk-group-heading=""]',ri='[cmdk-item=""]',Fo=`${ri}:not([aria-disabled="true"])`,nn="cmdk-item-select",Qe="data-value",Sp=(e,t,r)=>ap(e,t,r),ni=l.createContext(void 0),Rt=()=>l.useContext(ni),oi=l.createContext(void 0),Dn=()=>l.useContext(oi),si=l.createContext(void 0),ai=l.forwardRef((e,t)=>{let r=et(()=>{var C,I;return{search:"",value:(I=(C=e.value)!=null?C:e.defaultValue)!=null?I:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=et(()=>new Set),o=et(()=>new Map),s=et(()=>new Map),a=et(()=>new Set),i=ii(e),{label:c,children:u,value:f,onValueChange:p,filter:v,shouldFilter:h,loop:x,disablePointerSelection:m=!1,vimBindings:g=!0,...y}=e,b=ae(),w=ae(),S=ae(),P=l.useRef(null),N=jp();Ue(()=>{if(f!==void 0){let C=f.trim();r.current.value=C,k.emit()}},[f]),Ue(()=>{N(6,ee)},[]);let k=l.useMemo(()=>({subscribe:C=>(a.current.add(C),()=>a.current.delete(C)),snapshot:()=>r.current,setState:(C,I,j)=>{var _,Y,T,L;if(!Object.is(r.current[C],I)){if(r.current[C]=I,C==="search")Z(),K(),N(1,X);else if(C==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let U=document.getElementById(S);U?U.focus():(_=document.getElementById(b))==null||_.focus()}if(N(7,()=>{var U;r.current.selectedItemId=(U=z())==null?void 0:U.id,k.emit()}),j||N(5,ee),((Y=i.current)==null?void 0:Y.value)!==void 0){let U=I??"";(L=(T=i.current).onValueChange)==null||L.call(T,U);return}}k.emit()}},emit:()=>{a.current.forEach(C=>C())}}),[]),R=l.useMemo(()=>({value:(C,I,j)=>{var _;I!==((_=s.current.get(C))==null?void 0:_.value)&&(s.current.set(C,{value:I,keywords:j}),r.current.filtered.items.set(C,W(I,j)),N(2,()=>{K(),k.emit()}))},item:(C,I)=>(n.current.add(C),I&&(o.current.has(I)?o.current.get(I).add(C):o.current.set(I,new Set([C]))),N(3,()=>{Z(),K(),r.current.value||X(),k.emit()}),()=>{s.current.delete(C),n.current.delete(C),r.current.filtered.items.delete(C);let j=z();N(4,()=>{Z(),j?.getAttribute("id")===C&&X(),k.emit()})}),group:C=>(o.current.has(C)||o.current.set(C,new Set),()=>{s.current.delete(C),o.current.delete(C)}),filter:()=>i.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:b,inputId:S,labelId:w,listInnerRef:P}),[]);function W(C,I){var j,_;let Y=(_=(j=i.current)==null?void 0:j.filter)!=null?_:Sp;return C?Y(C,r.current.search,I):0}function K(){if(!r.current.search||i.current.shouldFilter===!1)return;let C=r.current.filtered.items,I=[];r.current.filtered.groups.forEach(_=>{let Y=o.current.get(_),T=0;Y.forEach(L=>{let U=C.get(L);T=Math.max(U,T)}),I.push([_,T])});let j=P.current;q().sort((_,Y)=>{var T,L;let U=_.getAttribute("id"),J=Y.getAttribute("id");return((T=C.get(J))!=null?T:0)-((L=C.get(U))!=null?L:0)}).forEach(_=>{let Y=_.closest(Vr);Y?Y.appendChild(_.parentElement===Y?_:_.closest(`${Vr} > *`)):j.appendChild(_.parentElement===j?_:_.closest(`${Vr} > *`))}),I.sort((_,Y)=>Y[1]-_[1]).forEach(_=>{var Y;let T=(Y=P.current)==null?void 0:Y.querySelector(`${vt}[${Qe}="${encodeURIComponent(_[0])}"]`);T?.parentElement.appendChild(T)})}function X(){let C=q().find(j=>j.getAttribute("aria-disabled")!=="true"),I=C?.getAttribute(Qe);k.setState("value",I||void 0)}function Z(){var C,I,j,_;if(!r.current.search||i.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let Y=0;for(let T of n.current){let L=(I=(C=s.current.get(T))==null?void 0:C.value)!=null?I:"",U=(_=(j=s.current.get(T))==null?void 0:j.keywords)!=null?_:[],J=W(L,U);r.current.filtered.items.set(T,J),J>0&&Y++}for(let[T,L]of o.current)for(let U of L)if(r.current.filtered.items.get(U)>0){r.current.filtered.groups.add(T);break}r.current.filtered.count=Y}function ee(){var C,I,j;let _=z();_&&(((C=_.parentElement)==null?void 0:C.firstChild)===_&&((j=(I=_.closest(vt))==null?void 0:I.querySelector(Cp))==null||j.scrollIntoView({block:"nearest"})),_.scrollIntoView({block:"nearest"}))}function z(){var C;return(C=P.current)==null?void 0:C.querySelector(`${ri}[aria-selected="true"]`)}function q(){var C;return Array.from(((C=P.current)==null?void 0:C.querySelectorAll(Fo))||[])}function F(C){let I=q()[C];I&&k.setState("value",I.getAttribute(Qe))}function H(C){var I;let j=z(),_=q(),Y=_.findIndex(L=>L===j),T=_[Y+C];(I=i.current)!=null&&I.loop&&(T=Y+C<0?_[_.length-1]:Y+C===_.length?_[0]:_[Y+C]),T&&k.setState("value",T.getAttribute(Qe))}function A(C){let I=z(),j=I?.closest(vt),_;for(;j&&!_;)j=C>0?Op(j,vt):_p(j,vt),_=j?.querySelector(Fo);_?k.setState("value",_.getAttribute(Qe)):H(C)}let te=()=>F(q().length-1),E=C=>{C.preventDefault(),C.metaKey?te():C.altKey?A(1):H(1)},V=C=>{C.preventDefault(),C.metaKey?F(0):C.altKey?A(-1):H(-1)};return l.createElement(B.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:C=>{var I;(I=y.onKeyDown)==null||I.call(y,C);let j=C.nativeEvent.isComposing||C.keyCode===229;if(!(C.defaultPrevented||j))switch(C.key){case"n":case"j":{g&&C.ctrlKey&&E(C);break}case"ArrowDown":{E(C);break}case"p":case"k":{g&&C.ctrlKey&&V(C);break}case"ArrowUp":{V(C);break}case"Home":{C.preventDefault(),F(0);break}case"End":{C.preventDefault(),te();break}case"Enter":{C.preventDefault();let _=z();if(_){let Y=new Event(nn);_.dispatchEvent(Y)}}}}},l.createElement("label",{"cmdk-label":"",htmlFor:R.inputId,id:R.labelId,style:Dp},c),gr(e,C=>l.createElement(oi.Provider,{value:k},l.createElement(ni.Provider,{value:R},C))))}),Ep=l.forwardRef((e,t)=>{var r,n;let o=ae(),s=l.useRef(null),a=l.useContext(si),i=Rt(),c=ii(e),u=(n=(r=c.current)==null?void 0:r.forceMount)!=null?n:a?.forceMount;Ue(()=>{if(!u)return i.item(o,a?.id)},[u]);let f=li(o,s,[e.value,e.children,s],e.keywords),p=Dn(),v=_e(N=>N.value&&N.value===f.current),h=_e(N=>u||i.filter()===!1?!0:N.search?N.filtered.items.get(o)>0:!0);l.useEffect(()=>{let N=s.current;if(!(!N||e.disabled))return N.addEventListener(nn,x),()=>N.removeEventListener(nn,x)},[h,e.onSelect,e.disabled]);function x(){var N,k;m(),(k=(N=c.current).onSelect)==null||k.call(N,f.current)}function m(){p.setState("value",f.current,!0)}if(!h)return null;let{disabled:g,value:y,onSelect:b,forceMount:w,keywords:S,...P}=e;return l.createElement(B.div,{ref:Ve(s,t),...P,id:o,"cmdk-item":"",role:"option","aria-disabled":!!g,"aria-selected":!!v,"data-disabled":!!g,"data-selected":!!v,onPointerMove:g||i.getDisablePointerSelection()?void 0:m,onClick:g?void 0:x},e.children)}),Pp=l.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:o,...s}=e,a=ae(),i=l.useRef(null),c=l.useRef(null),u=ae(),f=Rt(),p=_e(h=>o||f.filter()===!1?!0:h.search?h.filtered.groups.has(a):!0);Ue(()=>f.group(a),[]),li(a,i,[e.value,e.heading,c]);let v=l.useMemo(()=>({id:a,forceMount:o}),[o]);return l.createElement(B.div,{ref:Ve(i,t),...s,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},r&&l.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},r),gr(e,h=>l.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?u:void 0},l.createElement(si.Provider,{value:v},h))))}),Rp=l.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,o=l.useRef(null),s=_e(a=>!a.search);return!r&&!s?null:l.createElement(B.div,{ref:Ve(o,t),...n,"cmdk-separator":"",role:"separator"})}),kp=l.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,o=e.value!=null,s=Dn(),a=_e(u=>u.search),i=_e(u=>u.selectedItemId),c=Rt();return l.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),l.createElement(B.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":i,id:c.inputId,type:"text",value:o?e.value:a,onChange:u=>{o||s.setState("search",u.target.value),r?.(u.target.value)}})}),Ap=l.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...o}=e,s=l.useRef(null),a=l.useRef(null),i=_e(u=>u.selectedItemId),c=Rt();return l.useEffect(()=>{if(a.current&&s.current){let u=a.current,f=s.current,p,v=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let h=u.offsetHeight;f.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return v.observe(u),()=>{cancelAnimationFrame(p),v.unobserve(u)}}},[]),l.createElement(B.div,{ref:Ve(s,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":n,id:c.listId},gr(e,u=>l.createElement("div",{ref:Ve(a,c.listInnerRef),"cmdk-list-sizer":""},u)))}),Tp=l.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:o,contentClassName:s,container:a,...i}=e;return l.createElement(Za,{open:r,onOpenChange:n},l.createElement(Ja,{container:a},l.createElement(Qa,{"cmdk-overlay":"",className:o}),l.createElement(ei,{"aria-label":e.label,"cmdk-dialog":"",className:s},l.createElement(ai,{ref:t,...i}))))}),Np=l.forwardRef((e,t)=>_e(r=>r.filtered.count===0)?l.createElement(B.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Ip=l.forwardRef((e,t)=>{let{progress:r,children:n,label:o="Loading...",...s}=e;return l.createElement(B.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},gr(e,a=>l.createElement("div",{"aria-hidden":!0},a)))}),pt=Object.assign(ai,{List:Ap,Item:Ep,Input:kp,Group:Pp,Separator:Rp,Dialog:Tp,Empty:Np,Loading:Ip});function Op(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function _p(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function ii(e){let t=l.useRef(e);return Ue(()=>{t.current=e}),t}var Ue=typeof window>"u"?l.useEffect:l.useLayoutEffect;function et(e){let t=l.useRef();return t.current===void 0&&(t.current=e()),t}function _e(e){let t=Dn(),r=()=>e(t.snapshot());return l.useSyncExternalStore(t.subscribe,r,r)}function li(e,t,r,n=[]){let o=l.useRef(),s=Rt();return Ue(()=>{var a;let i=(()=>{var u;for(let f of r){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(u=f.current.textContent)==null?void 0:u.trim():o.current}})(),c=n.map(u=>u.trim());s.value(e,i,c),(a=t.current)==null||a.setAttribute(Qe,i),o.current=i}),o}var jp=()=>{let[e,t]=l.useState(),r=et(()=>new Map);return Ue(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,o)=>{r.current.set(n,o),t({})}};function Mp(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function gr({asChild:e,children:t},r){return e&&l.isValidElement(t)?l.cloneElement(Mp(t),{ref:t.ref},r(t.props.children)):r(t)}var Dp={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Fp({...e}){return d.jsx(Za,{"data-slot":"dialog",...e})}function Lp({...e}){return d.jsx(xp,{"data-slot":"dialog-trigger",...e})}function ci({...e}){return d.jsx(Ja,{"data-slot":"dialog-portal",...e})}function $p({...e}){return d.jsx(ti,{"data-slot":"dialog-close",...e})}function ui({className:e,...t}){return d.jsx(Qa,{"data-slot":"dialog-overlay",className:$("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-foreground/50 dark:bg-foreground/50",e),...t})}function Vp({className:e,children:t,showCloseButton:r=!0,...n}){return d.jsxs(ci,{"data-slot":"dialog-portal",children:[d.jsx(ui,{}),d.jsxs(ei,{"data-slot":"dialog-content",className:$("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg dark:bg-background dark:border-border",e),...n,children:[t,r&&d.jsxs(ti,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[d.jsx(Xf,{}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Bp({className:e,...t}){return d.jsx("div",{"data-slot":"dialog-header",className:$("flex flex-col gap-2 text-center sm:text-left",e),...t})}function zp({className:e,...t}){return d.jsx("div",{"data-slot":"dialog-footer",className:$("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function Wp({className:e,...t}){return d.jsx(yp,{"data-slot":"dialog-title",className:$("text-lg leading-none font-semibold",e),...t})}function Gp({className:e,...t}){return d.jsx(wp,{"data-slot":"dialog-description",className:$("text-muted-foreground text-sm dark:text-muted-foreground",e),...t})}function Hp({className:e,...t}){return d.jsx(pt,{"data-slot":"command",className:$("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}function Up({className:e,...t}){return d.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b border-purple-mutted-400 px-3 text-purple-mutted-300",children:[d.jsx(Yf,{className:"size-4 shrink-0 opacity-50"}),d.jsx(pt.Input,{"data-slot":"command-input",className:$("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function Kp({className:e,...t}){return d.jsx(pt.List,{"data-slot":"command-list",className:$("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function Yp({...e}){return d.jsx(pt.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm text-purple-mutted-300",...e})}function qp({className:e,...t}){return d.jsx(pt.Group,{"data-slot":"command-group",className:$("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}function Xp({className:e,...t}){return d.jsx(pt.Item,{"data-slot":"command-item",className:$("data-[selected=true]:bg-purple-mutted-500 data-[selected=true]:text-purple-100 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var hr="Popover",[di,Bh]=pe(hr,[ut]),kt=ut(),[Zp,De]=di(hr),fi=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:s,modal:a=!1}=e,i=kt(t),c=l.useRef(null),[u,f]=l.useState(!1),[p,v]=de({prop:n,defaultProp:o??!1,onChange:s,caller:hr});return d.jsx(Cn,{...i,children:d.jsx(Zp,{scope:t,contentId:ae(),triggerRef:c,open:p,onOpenChange:v,onOpenToggle:l.useCallback(()=>v(h=>!h),[v]),hasCustomAnchor:u,onCustomAnchorAdd:l.useCallback(()=>f(!0),[]),onCustomAnchorRemove:l.useCallback(()=>f(!1),[]),modal:a,children:r})})};fi.displayName=hr;var pi="PopoverAnchor",Jp=l.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=De(pi,r),s=kt(r),{onCustomAnchorAdd:a,onCustomAnchorRemove:i}=o;return l.useEffect(()=>(a(),()=>i()),[a,i]),d.jsx(lr,{...s,...n,ref:t})});Jp.displayName=pi;var mi="PopoverTrigger",gi=l.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=De(mi,r),s=kt(r),a=ne(t,o.triggerRef),i=d.jsx(B.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":yi(o.open),...n,ref:a,onClick:G(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:d.jsx(lr,{asChild:!0,...s,children:i})});gi.displayName=mi;var Fn="PopoverPortal",[Qp,em]=di(Fn,{forceMount:void 0}),hi=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,s=De(Fn,t);return d.jsx(Qp,{scope:t,forceMount:r,children:d.jsx(ke,{present:r||s.open,children:d.jsx(Pt,{asChild:!0,container:o,children:n})})})};hi.displayName=Fn;var ot="PopoverContent",vi=l.forwardRef((e,t)=>{const r=em(ot,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,s=De(ot,e.__scopePopover);return d.jsx(ke,{present:n||s.open,children:s.modal?d.jsx(rm,{...o,ref:t}):d.jsx(nm,{...o,ref:t})})});vi.displayName=ot;var tm=Be("PopoverContent.RemoveScroll"),rm=l.forwardRef((e,t)=>{const r=De(ot,e.__scopePopover),n=l.useRef(null),o=ne(t,n),s=l.useRef(!1);return l.useEffect(()=>{const a=n.current;if(a)return Pn(a)},[]),d.jsx(ur,{as:tm,allowPinchZoom:!0,children:d.jsx(bi,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:G(e.onCloseAutoFocus,a=>{a.preventDefault(),s.current||r.triggerRef.current?.focus()}),onPointerDownOutside:G(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0,u=i.button===2||c;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:G(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),nm=l.forwardRef((e,t)=>{const r=De(ot,e.__scopePopover),n=l.useRef(!1),o=l.useRef(!1);return d.jsx(bi,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(n.current||r.triggerRef.current?.focus(),s.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;r.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),bi=l.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:f,...p}=e,v=De(ot,r),h=kt(r);return fn(),d.jsx(or,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:s,children:d.jsx(St,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:f,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>v.onOpenChange(!1),children:d.jsx(Sn,{"data-state":yi(v.open),role:"dialog",id:v.contentId,...h,...p,ref:t,style:{...p.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)"}})})})}),xi="PopoverClose",om=l.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=De(xi,r);return d.jsx(B.button,{type:"button",...n,ref:t,onClick:G(e.onClick,()=>o.onOpenChange(!1))})});om.displayName=xi;var sm="PopoverArrow",am=l.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=kt(r);return d.jsx(En,{...o,...n,ref:t})});am.displayName=sm;function yi(e){return e?"open":"closed"}var im=fi,lm=gi,cm=hi,um=vi;function dm({...e}){return d.jsx(im,{"data-slot":"popover",...e})}function fm({...e}){return d.jsx(lm,{"data-slot":"popover-trigger",...e})}function pm({className:e,align:t="center",sideOffset:r=4,...n}){return d.jsx(cm,{children:d.jsx(um,{"data-slot":"popover-content",align:t,sideOffset:r,className:$("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...n})})}const Ln=l.forwardRef(({options:e,value:t,onValueChange:r,placeholder:n="Select option...",searchPlaceholder:o="Search...",emptyText:s="No option found.",disabled:a=!1,className:i,...c},u)=>{const[f,p]=l.useState(!1),[v,h]=l.useState(0),x=l.useRef(null),m=e.find(g=>g.value===t);return l.useEffect(()=>{x.current&&h(x.current.offsetWidth)},[]),d.jsxs(dm,{open:f,onOpenChange:p,children:[d.jsx(fm,{asChild:!0,children:d.jsxs(rr,{ref:g=>{typeof u=="function"?u(g):u&&(u.current=g),x.current=g},variant:"outline",role:"combobox","aria-expanded":f,className:$("w-full h-9 px-3 py-1 justify-between rounded-md","border border-purple-mutted-500 bg-purple-mutted-700 hover:bg-purple-mutted-700","text-sm md:text-sm text-purple-mutted-300 hover:text-purple-mutted-300 focus:text-purple-mutted-300 active:text-purple-mutted-300","shadow-xs transition-[color,box-shadow] outline-none",{"text-muted-foreground":!m},i),disabled:a,...c,children:[m?m.label:n,d.jsx(Uf,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),d.jsx(pm,{className:"p-0 border bg-purple-mutted-600 border-purple-mutted-500 text-purple-mutted-300",style:{width:v>0?`${v}px`:"auto"},children:d.jsxs(Hp,{className:"w-full bg-purple-mutted-600",children:[d.jsx(Up,{placeholder:o}),d.jsxs(Kp,{children:[d.jsx(Yp,{children:s}),d.jsx(qp,{children:e.map(g=>d.jsxs(Xp,{value:g.value,disabled:g.disabled,className:$("text-purple-100 hover:bg-purple-mutted-500","focus:bg-purple-mutted-500 focus:text-purple-100",{"bg-purple-mutted-500":t===g.value}),onSelect:y=>{y!==t&&r?.(y===t?"":y),p(!1)},children:[d.jsx(Ta,{className:$("mr-2 h-4 w-4",t===g.value?"opacity-100":"opacity-0")}),g.label]},g.value))})]})]})})]})});Ln.displayName="Combobox";const mm=tr("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden dark:border-border",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90 dark:bg-primary dark:text-primary-foreground dark:[a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90 dark:bg-secondary dark:text-secondary-foreground dark:[a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-destructive-foreground [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive dark:text-destructive-foreground dark:[a&]:hover:bg-destructive/90",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground dark:text-foreground dark:[a&]:hover:bg-accent dark:[a&]:hover:text-accent-foreground",success:"bg-green-100 text-green-800 border-green-200 dark:bg-green-900/30 dark:text-green-400 dark:border-green-800 "}},defaultVariants:{variant:"default"}});function gm({className:e,variant:t,asChild:r=!1,...n}){const o=r?ls:"span";return d.jsx(o,{"data-slot":"badge",className:$(mm({variant:t}),e),...n})}function hm({className:e,...t}){return d.jsx("div",{"data-slot":"card",className:$("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm dark:bg-card dark:text-card-foreground dark:border-border",e),...t})}function vm({className:e,...t}){return d.jsx("div",{"data-slot":"card-header",className:$("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function bm({className:e,...t}){return d.jsx("div",{"data-slot":"card-title",className:$("leading-none font-semibold",e),...t})}function xm({className:e,...t}){return d.jsx("div",{"data-slot":"card-description",className:$("text-muted-foreground text-sm dark:text-muted-foreground",e),...t})}function ym({className:e,...t}){return d.jsx("div",{"data-slot":"card-action",className:$("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...t})}function wm({className:e,...t}){return d.jsx("div",{"data-slot":"card-content",className:$("px-6",e),...t})}function Cm({className:e,...t}){return d.jsx("div",{"data-slot":"card-footer",className:$("flex items-center px-6 [.border-t]:pt-6",e),...t})}var $n="Progress",Vn=100,[Sm,zh]=pe($n),[Em,Pm]=Sm($n),wi=l.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:o,getValueLabel:s=Rm,...a}=e;(o||o===0)&&!Lo(o)&&console.error(km(`${o}`,"Progress"));const i=Lo(o)?o:Vn;n!==null&&!$o(n,i)&&console.error(Am(`${n}`,"Progress"));const c=$o(n,i)?n:null,u=qt(c)?s(c,i):void 0;return d.jsx(Em,{scope:r,value:c,max:i,children:d.jsx(B.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":qt(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":Ei(c,i),"data-value":c??void 0,"data-max":i,...a,ref:t})})});wi.displayName=$n;var Ci="ProgressIndicator",Si=l.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,o=Pm(Ci,r);return d.jsx(B.div,{"data-state":Ei(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...n,ref:t})});Si.displayName=Ci;function Rm(e,t){return`${Math.round(e/t*100)}%`}function Ei(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function qt(e){return typeof e=="number"}function Lo(e){return qt(e)&&!isNaN(e)&&e>0}function $o(e,t){return qt(e)&&!isNaN(e)&&e<=t&&e>=0}function km(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Vn}\`.`}function Am(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
97
117
|
- a positive number
|
|
98
|
-
- less than the value passed to \`max\` (or ${
|
|
118
|
+
- less than the value passed to \`max\` (or ${Vn} if no \`max\` prop is set)
|
|
99
119
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
100
120
|
|
|
101
|
-
Defaulting to \`null\`.`}var Wc=go,Gc=ho;function Vc({className:e,value:t,...r}){return m.jsx(Wc,{"data-slot":"progress",className:G("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full dark:bg-primary/20",e),...r,children:m.jsx(Gc,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all dark:bg-primary",style:{transform:`translateX(-${100-(t||0)}%)`}})})}function Bc({className:e,...t}){return m.jsx("div",{"data-slot":"skeleton",className:G("bg-accent animate-pulse rounded-md dark:bg-accent",e),...t})}function Hc(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function xo(e){const[t,r]=l.useState(void 0);return he(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,i;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,i=u.blockSize}else a=e.offsetWidth,i=e.offsetHeight;r({width:a,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var At="Switch",[Uc,Bd]=pe(At),[Yc,Kc]=Uc(At),yo=l.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:s,required:a,disabled:i,value:c="on",onCheckedChange:u,form:d,...f}=e,[v,g]=l.useState(null),b=Q(t,w=>g(w)),p=l.useRef(!1),h=v?d||!!v.closest("form"):!0,[x,y]=me({prop:o,defaultProp:s??!1,onChange:u,caller:At});return m.jsxs(Yc,{scope:r,checked:x,disabled:i,children:[m.jsx(V.button,{type:"button",role:"switch","aria-checked":x,"aria-required":a,"data-state":Eo(x),"data-disabled":i?"":void 0,disabled:i,value:c,...f,ref:b,onClick:X(e.onClick,w=>{y(k=>!k),h&&(p.current=w.isPropagationStopped(),p.current||w.stopPropagation())})}),h&&m.jsx(ko,{control:v,bubbles:!p.current,name:n,value:c,checked:x,required:a,disabled:i,form:d,style:{transform:"translateX(-100%)"}})]})});yo.displayName=At;var wo="SwitchThumb",Co=l.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=Kc(wo,r);return m.jsx(V.span,{"data-state":Eo(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});Co.displayName=wo;var Xc="SwitchBubbleInput",ko=l.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},s)=>{const a=l.useRef(null),i=Q(a,s),c=Hc(r),u=xo(t);return l.useEffect(()=>{const d=a.current;if(!d)return;const f=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(f,"checked").set;if(c!==r&&g){const b=new Event("click",{bubbles:n});g.call(d,r),d.dispatchEvent(b)}},[c,r,n]),m.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:i,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});ko.displayName=Xc;function Eo(e){return e?"checked":"unchecked"}var qc=yo,Zc=Co;function Jc({className:e,...t}){return m.jsx(qc,{"data-slot":"switch",className:G("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:data-[state=checked]:bg-primary dark:data-[state=unchecked]:bg-input",e),...t,children:m.jsx(Zc,{"data-slot":"switch-thumb",className:G("bg-background pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground")})})}var Ro="Toggle",pr=l.forwardRef((e,t)=>{const{pressed:r,defaultPressed:n,onPressedChange:o,...s}=e,[a,i]=me({prop:r,onChange:o,defaultProp:n??!1,caller:Ro});return m.jsx(V.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:X(e.onClick,()=>{e.disabled||i(!a)})})});pr.displayName=Ro;var Qc=pr;const Ao=kt("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium text-foreground hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap dark:text-foreground dark:hover:bg-muted dark:hover:text-muted-foreground dark:data-[state=on]:bg-accent dark:data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent text-foreground dark:bg-transparent dark:text-foreground",outline:"border border-input bg-transparent text-foreground shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-transparent dark:text-foreground dark:hover:bg-accent dark:hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function el({className:e,variant:t,size:r,...n}){return m.jsx(Qc,{"data-slot":"toggle",className:G(Ao({variant:t,size:r,className:e})),...n})}function Po(e){const t=e+"CollectionProvider",[r,n]=pe(t),[o,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:h,children:x}=p,y=I.useRef(null),w=I.useRef(new Map).current;return m.jsx(o,{scope:h,itemMap:w,collectionRef:y,children:x})};a.displayName=t;const i=e+"CollectionSlot",c=Xe(i),u=I.forwardRef((p,h)=>{const{scope:x,children:y}=p,w=s(i,x),k=Q(h,w.collectionRef);return m.jsx(c,{ref:k,children:y})});u.displayName=i;const d=e+"CollectionItemSlot",f="data-radix-collection-item",v=Xe(d),g=I.forwardRef((p,h)=>{const{scope:x,children:y,...w}=p,k=I.useRef(null),A=Q(h,k),O=s(d,x);return I.useEffect(()=>(O.itemMap.set(k,{ref:k,...w}),()=>void O.itemMap.delete(k))),m.jsx(v,{[f]:"",ref:A,children:y})});g.displayName=d;function b(p){const h=s(e+"CollectionConsumer",p);return I.useCallback(()=>{const y=h.collectionRef.current;if(!y)return[];const w=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(h.itemMap.values()).sort((O,P)=>w.indexOf(O.ref.current)-w.indexOf(P.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:u,ItemSlot:g},b,n]}var tl=l.createContext(void 0);function mr(e){const t=l.useContext(tl);return e||t||"ltr"}var Bt="rovingFocusGroup.onEntryFocus",rl={bubbles:!1,cancelable:!0},Qe="RovingFocusGroup",[Jt,So,nl]=Po(Qe),[ol,To]=pe(Qe,[nl]),[sl,al]=ol(Qe),Oo=l.forwardRef((e,t)=>m.jsx(Jt.Provider,{scope:e.__scopeRovingFocusGroup,children:m.jsx(Jt.Slot,{scope:e.__scopeRovingFocusGroup,children:m.jsx(il,{...e,ref:t})})}));Oo.displayName=Qe;var il=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,v=l.useRef(null),g=Q(t,v),b=mr(s),[p,h]=me({prop:a,defaultProp:i??null,onChange:c,caller:Qe}),[x,y]=l.useState(!1),w=Te(u),k=So(r),A=l.useRef(!1),[O,P]=l.useState(0);return l.useEffect(()=>{const E=v.current;if(E)return E.addEventListener(Bt,w),()=>E.removeEventListener(Bt,w)},[w]),m.jsx(sl,{scope:r,orientation:n,dir:b,loop:o,currentTabStopId:p,onItemFocus:l.useCallback(E=>h(E),[h]),onItemShiftTab:l.useCallback(()=>y(!0),[]),onFocusableItemAdd:l.useCallback(()=>P(E=>E+1),[]),onFocusableItemRemove:l.useCallback(()=>P(E=>E-1),[]),children:m.jsx(V.div,{tabIndex:x||O===0?-1:0,"data-orientation":n,...f,ref:g,style:{outline:"none",...e.style},onMouseDown:X(e.onMouseDown,()=>{A.current=!0}),onFocus:X(e.onFocus,E=>{const M=!A.current;if(E.target===E.currentTarget&&M&&!x){const L=new CustomEvent(Bt,rl);if(E.currentTarget.dispatchEvent(L),!L.defaultPrevented){const B=k().filter(_=>_.focusable),U=B.find(_=>_.active),H=B.find(_=>_.id===p),Y=[U,H,...B].filter(Boolean).map(_=>_.ref.current);Io(Y,d)}}A.current=!1}),onBlur:X(e.onBlur,()=>y(!1))})})}),No="RovingFocusGroupItem",_o=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:s,children:a,...i}=e,c=Se(),u=s||c,d=al(No,r),f=d.currentTabStopId===u,v=So(r),{onFocusableItemAdd:g,onFocusableItemRemove:b,currentTabStopId:p}=d;return l.useEffect(()=>{if(n)return g(),()=>b()},[n,g,b]),m.jsx(Jt.ItemSlot,{scope:r,id:u,focusable:n,active:o,children:m.jsx(V.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...i,ref:t,onMouseDown:X(e.onMouseDown,h=>{n?d.onItemFocus(u):h.preventDefault()}),onFocus:X(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:X(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){d.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const x=ul(h,d.orientation,d.dir);if(x!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let w=v().filter(k=>k.focusable).map(k=>k.ref.current);if(x==="last")w.reverse();else if(x==="prev"||x==="next"){x==="prev"&&w.reverse();const k=w.indexOf(h.currentTarget);w=d.loop?dl(w,k+1):w.slice(k+1)}setTimeout(()=>Io(w))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:p!=null}):a})})});_o.displayName=No;var cl={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ll(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function ul(e,t,r){const n=ll(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return cl[n]}function Io(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function dl(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var fl=Oo,pl=_o,Re="ToggleGroup",[Do,Hd]=pe(Re,[To]),Mo=To(),gr=I.forwardRef((e,t)=>{const{type:r,...n}=e;if(r==="single"){const o=n;return m.jsx(ml,{...o,ref:t})}if(r==="multiple"){const o=n;return m.jsx(gl,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${Re}\``)});gr.displayName=Re;var[jo,Lo]=Do(Re),ml=I.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...s}=e,[a,i]=me({prop:r,defaultProp:n??"",onChange:o,caller:Re});return m.jsx(jo,{scope:e.__scopeToggleGroup,type:"single",value:I.useMemo(()=>a?[a]:[],[a]),onItemActivate:i,onItemDeactivate:I.useCallback(()=>i(""),[i]),children:m.jsx(Fo,{...s,ref:t})})}),gl=I.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...s}=e,[a,i]=me({prop:r,defaultProp:n??[],onChange:o,caller:Re}),c=I.useCallback(d=>i((f=[])=>[...f,d]),[i]),u=I.useCallback(d=>i((f=[])=>f.filter(v=>v!==d)),[i]);return m.jsx(jo,{scope:e.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:c,onItemDeactivate:u,children:m.jsx(Fo,{...s,ref:t})})});gr.displayName=Re;var[vl,hl]=Do(Re),Fo=I.forwardRef((e,t)=>{const{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:o=!0,orientation:s,dir:a,loop:i=!0,...c}=e,u=Mo(r),d=mr(a),f={role:"group",dir:d,...c};return m.jsx(vl,{scope:r,rovingFocus:o,disabled:n,children:o?m.jsx(fl,{asChild:!0,...u,orientation:s,dir:d,loop:i,children:m.jsx(V.div,{...f,ref:t})}):m.jsx(V.div,{...f,ref:t})})}),ht="ToggleGroupItem",$o=I.forwardRef((e,t)=>{const r=Lo(ht,e.__scopeToggleGroup),n=hl(ht,e.__scopeToggleGroup),o=Mo(e.__scopeToggleGroup),s=r.value.includes(e.value),a=n.disabled||e.disabled,i={...e,pressed:s,disabled:a},c=I.useRef(null);return n.rovingFocus?m.jsx(pl,{asChild:!0,...o,focusable:!a,active:s,ref:c,children:m.jsx(on,{...i,ref:t})}):m.jsx(on,{...i,ref:t})});$o.displayName=ht;var on=I.forwardRef((e,t)=>{const{__scopeToggleGroup:r,value:n,...o}=e,s=Lo(ht,r),a={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=s.type==="single"?a:void 0;return m.jsx(pr,{...i,...o,ref:t,onPressedChange:c=>{c?s.onItemActivate(n):s.onItemDeactivate(n)}})}),bl=gr,xl=$o;const zo=l.createContext({size:"default",variant:"default"});function yl({className:e,variant:t,size:r,children:n,...o}){return m.jsx(bl,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:G("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs dark:data-[variant=outline]:shadow-xs",e),...o,children:m.jsx(zo.Provider,{value:{variant:t,size:r},children:n})})}function wl({className:e,children:t,variant:r,size:n,...o}){const s=l.useContext(zo);return m.jsx(xl,{"data-slot":"toggle-group-item","data-variant":s.variant||r,"data-size":s.size||n,className:G(Ao({variant:s.variant||r,size:s.size||n}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",e),...o,children:t})}const Cl=["top","right","bottom","left"],ke=Math.min,re=Math.max,bt=Math.round,dt=Math.floor,de=e=>({x:e,y:e}),kl={left:"right",right:"left",bottom:"top",top:"bottom"},El={start:"end",end:"start"};function Qt(e,t,r){return re(e,ke(t,r))}function be(e,t){return typeof e=="function"?e(t):e}function xe(e){return e.split("-")[0]}function Be(e){return e.split("-")[1]}function vr(e){return e==="x"?"y":"x"}function hr(e){return e==="y"?"height":"width"}const Rl=new Set(["top","bottom"]);function ue(e){return Rl.has(xe(e))?"y":"x"}function br(e){return vr(ue(e))}function Al(e,t,r){r===void 0&&(r=!1);const n=Be(e),o=br(e),s=hr(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=xt(a)),[a,xt(a)]}function Pl(e){const t=xt(e);return[er(e),t,er(t)]}function er(e){return e.replace(/start|end/g,t=>El[t])}const sn=["left","right"],an=["right","left"],Sl=["top","bottom"],Tl=["bottom","top"];function Ol(e,t,r){switch(e){case"top":case"bottom":return r?t?an:sn:t?sn:an;case"left":case"right":return t?Sl:Tl;default:return[]}}function Nl(e,t,r,n){const o=Be(e);let s=Ol(xe(e),r==="start",n);return o&&(s=s.map(a=>a+"-"+o),t&&(s=s.concat(s.map(er)))),s}function xt(e){return e.replace(/left|right|bottom|top/g,t=>kl[t])}function _l(e){return{top:0,right:0,bottom:0,left:0,...e}}function Wo(e){return typeof e!="number"?_l(e):{top:e,right:e,bottom:e,left:e}}function yt(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function cn(e,t,r){let{reference:n,floating:o}=e;const s=ue(t),a=br(t),i=hr(a),c=xe(t),u=s==="y",d=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,v=n[i]/2-o[i]/2;let g;switch(c){case"top":g={x:d,y:n.y-o.height};break;case"bottom":g={x:d,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:f};break;case"left":g={x:n.x-o.width,y:f};break;default:g={x:n.x,y:n.y}}switch(Be(t)){case"start":g[a]-=v*(r&&u?-1:1);break;case"end":g[a]+=v*(r&&u?-1:1);break}return g}const Il=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:a}=r,i=s.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=cn(u,n,c),v=n,g={},b=0;for(let p=0;p<i.length;p++){const{name:h,fn:x}=i[p],{x:y,y:w,data:k,reset:A}=await x({x:d,y:f,initialPlacement:n,placement:v,strategy:o,middlewareData:g,rects:u,platform:a,elements:{reference:e,floating:t}});d=y??d,f=w??f,g={...g,[h]:{...g[h],...k}},A&&b<=50&&(b++,typeof A=="object"&&(A.placement&&(v=A.placement),A.rects&&(u=A.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):A.rects),{x:d,y:f}=cn(u,v,c)),p=-1)}return{x:d,y:f,placement:v,strategy:o,middlewareData:g}};async function qe(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:a,elements:i,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:v=!1,padding:g=0}=be(t,e),b=Wo(g),h=i[v?f==="floating"?"reference":"floating":f],x=yt(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(h)))==null||r?h:h.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:u,rootBoundary:d,strategy:c})),y=f==="floating"?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),k=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},A=yt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:w,strategy:c}):y);return{top:(x.top-A.top+b.top)/k.y,bottom:(A.bottom-x.bottom+b.bottom)/k.y,left:(x.left-A.left+b.left)/k.x,right:(A.right-x.right+b.right)/k.x}}const Dl=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:s,platform:a,elements:i,middlewareData:c}=t,{element:u,padding:d=0}=be(e,t)||{};if(u==null)return{};const f=Wo(d),v={x:r,y:n},g=br(o),b=hr(g),p=await a.getDimensions(u),h=g==="y",x=h?"top":"left",y=h?"bottom":"right",w=h?"clientHeight":"clientWidth",k=s.reference[b]+s.reference[g]-v[g]-s.floating[b],A=v[g]-s.reference[g],O=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let P=O?O[w]:0;(!P||!await(a.isElement==null?void 0:a.isElement(O)))&&(P=i.floating[w]||s.floating[b]);const E=k/2-A/2,M=P/2-p[b]/2-1,L=ke(f[x],M),B=ke(f[y],M),U=L,H=P-p[b]-B,F=P/2-p[b]/2+E,Y=Qt(U,F,H),_=!c.arrow&&Be(o)!=null&&F!==Y&&s.reference[b]/2-(F<U?L:B)-p[b]/2<0,$=_?F<U?F-U:F-H:0;return{[g]:v[g]+$,data:{[g]:Y,centerOffset:F-Y-$,..._&&{alignmentOffset:$}},reset:_}}}),Ml=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:s,rects:a,initialPlacement:i,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:v,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:p=!0,...h}=be(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const x=xe(o),y=ue(i),w=xe(i)===i,k=await(c.isRTL==null?void 0:c.isRTL(u.floating)),A=v||(w||!p?[xt(i)]:Pl(i)),O=b!=="none";!v&&O&&A.push(...Nl(i,p,b,k));const P=[i,...A],E=await qe(t,h),M=[];let L=((n=s.flip)==null?void 0:n.overflows)||[];if(d&&M.push(E[x]),f){const F=Al(o,a,k);M.push(E[F[0]],E[F[1]])}if(L=[...L,{placement:o,overflows:M}],!M.every(F=>F<=0)){var B,U;const F=(((B=s.flip)==null?void 0:B.index)||0)+1,Y=P[F];if(Y&&(!(f==="alignment"?y!==ue(Y):!1)||L.every(R=>ue(R.placement)===y?R.overflows[0]>0:!0)))return{data:{index:F,overflows:L},reset:{placement:Y}};let _=(U=L.filter($=>$.overflows[0]<=0).sort(($,R)=>$.overflows[1]-R.overflows[1])[0])==null?void 0:U.placement;if(!_)switch(g){case"bestFit":{var H;const $=(H=L.filter(R=>{if(O){const q=ue(R.placement);return q===y||q==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(q=>q>0).reduce((q,C)=>q+C,0)]).sort((R,q)=>R[1]-q[1])[0])==null?void 0:H[0];$&&(_=$);break}case"initialPlacement":_=i;break}if(o!==_)return{reset:{placement:_}}}return{}}}};function ln(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function un(e){return Cl.some(t=>e[t]>=0)}const jl=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=be(e,t);switch(n){case"referenceHidden":{const s=await qe(t,{...o,elementContext:"reference"}),a=ln(s,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:un(a)}}}case"escaped":{const s=await qe(t,{...o,altBoundary:!0}),a=ln(s,r.floating);return{data:{escapedOffsets:a,escaped:un(a)}}}default:return{}}}}},Go=new Set(["left","top"]);async function Ll(e,t){const{placement:r,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=xe(r),i=Be(r),c=ue(r)==="y",u=Go.has(a)?-1:1,d=s&&c?-1:1,f=be(t,e);let{mainAxis:v,crossAxis:g,alignmentAxis:b}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return i&&typeof b=="number"&&(g=i==="end"?b*-1:b),c?{x:g*d,y:v*u}:{x:v*u,y:g*d}}const Fl=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:s,placement:a,middlewareData:i}=t,c=await Ll(t,e);return a===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:a}}}}},$l=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:i={fn:h=>{let{x,y}=h;return{x,y}}},...c}=be(e,t),u={x:r,y:n},d=await qe(t,c),f=ue(xe(o)),v=vr(f);let g=u[v],b=u[f];if(s){const h=v==="y"?"top":"left",x=v==="y"?"bottom":"right",y=g+d[h],w=g-d[x];g=Qt(y,g,w)}if(a){const h=f==="y"?"top":"left",x=f==="y"?"bottom":"right",y=b+d[h],w=b-d[x];b=Qt(y,b,w)}const p=i.fn({...t,[v]:g,[f]:b});return{...p,data:{x:p.x-r,y:p.y-n,enabled:{[v]:s,[f]:a}}}}}},zl=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:s,middlewareData:a}=t,{offset:i=0,mainAxis:c=!0,crossAxis:u=!0}=be(e,t),d={x:r,y:n},f=ue(o),v=vr(f);let g=d[v],b=d[f];const p=be(i,t),h=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const w=v==="y"?"height":"width",k=s.reference[v]-s.floating[w]+h.mainAxis,A=s.reference[v]+s.reference[w]-h.mainAxis;g<k?g=k:g>A&&(g=A)}if(u){var x,y;const w=v==="y"?"width":"height",k=Go.has(xe(o)),A=s.reference[f]-s.floating[w]+(k&&((x=a.offset)==null?void 0:x[f])||0)+(k?0:h.crossAxis),O=s.reference[f]+s.reference[w]+(k?0:((y=a.offset)==null?void 0:y[f])||0)-(k?h.crossAxis:0);b<A?b=A:b>O&&(b=O)}return{[v]:g,[f]:b}}}},Wl=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:s,platform:a,elements:i}=t,{apply:c=()=>{},...u}=be(e,t),d=await qe(t,u),f=xe(o),v=Be(o),g=ue(o)==="y",{width:b,height:p}=s.floating;let h,x;f==="top"||f==="bottom"?(h=f,x=v===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(x=f,h=v==="end"?"top":"bottom");const y=p-d.top-d.bottom,w=b-d.left-d.right,k=ke(p-d[h],y),A=ke(b-d[x],w),O=!t.middlewareData.shift;let P=k,E=A;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(E=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(P=y),O&&!v){const L=re(d.left,0),B=re(d.right,0),U=re(d.top,0),H=re(d.bottom,0);g?E=b-2*(L!==0||B!==0?L+B:re(d.left,d.right)):P=p-2*(U!==0||H!==0?U+H:re(d.top,d.bottom))}await c({...t,availableWidth:E,availableHeight:P});const M=await a.getDimensions(i.floating);return b!==M.width||p!==M.height?{reset:{rects:!0}}:{}}}};function Pt(){return typeof window<"u"}function He(e){return Vo(e)?(e.nodeName||"").toLowerCase():"#document"}function ne(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ge(e){var t;return(t=(Vo(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Vo(e){return Pt()?e instanceof Node||e instanceof ne(e).Node:!1}function oe(e){return Pt()?e instanceof Element||e instanceof ne(e).Element:!1}function fe(e){return Pt()?e instanceof HTMLElement||e instanceof ne(e).HTMLElement:!1}function dn(e){return!Pt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ne(e).ShadowRoot}const Gl=new Set(["inline","contents"]);function et(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=se(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Gl.has(o)}const Vl=new Set(["table","td","th"]);function Bl(e){return Vl.has(He(e))}const Hl=[":popover-open",":modal"];function St(e){return Hl.some(t=>{try{return e.matches(t)}catch{return!1}})}const Ul=["transform","translate","scale","rotate","perspective"],Yl=["transform","translate","scale","rotate","perspective","filter"],Kl=["paint","layout","strict","content"];function xr(e){const t=yr(),r=oe(e)?se(e):e;return Ul.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||Yl.some(n=>(r.willChange||"").includes(n))||Kl.some(n=>(r.contain||"").includes(n))}function Xl(e){let t=Ee(e);for(;fe(t)&&!ze(t);){if(xr(t))return t;if(St(t))return null;t=Ee(t)}return null}function yr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ql=new Set(["html","body","#document"]);function ze(e){return ql.has(He(e))}function se(e){return ne(e).getComputedStyle(e)}function Tt(e){return oe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ee(e){if(He(e)==="html")return e;const t=e.assignedSlot||e.parentNode||dn(e)&&e.host||ge(e);return dn(t)?t.host:t}function Bo(e){const t=Ee(e);return ze(t)?e.ownerDocument?e.ownerDocument.body:e.body:fe(t)&&et(t)?t:Bo(t)}function Ze(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Bo(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),a=ne(o);if(s){const i=tr(a);return t.concat(a,a.visualViewport||[],et(o)?o:[],i&&r?Ze(i):[])}return t.concat(o,Ze(o,[],r))}function tr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ho(e){const t=se(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=fe(e),s=o?e.offsetWidth:r,a=o?e.offsetHeight:n,i=bt(r)!==s||bt(n)!==a;return i&&(r=s,n=a),{width:r,height:n,$:i}}function wr(e){return oe(e)?e:e.contextElement}function $e(e){const t=wr(e);if(!fe(t))return de(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=Ho(t);let a=(s?bt(r.width):r.width)/n,i=(s?bt(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const Zl=de(0);function Uo(e){const t=ne(e);return!yr()||!t.visualViewport?Zl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Jl(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ne(e)?!1:t}function Ne(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=wr(e);let a=de(1);t&&(n?oe(n)&&(a=$e(n)):a=$e(e));const i=Jl(s,r,n)?Uo(s):de(0);let c=(o.left+i.x)/a.x,u=(o.top+i.y)/a.y,d=o.width/a.x,f=o.height/a.y;if(s){const v=ne(s),g=n&&oe(n)?ne(n):n;let b=v,p=tr(b);for(;p&&n&&g!==b;){const h=$e(p),x=p.getBoundingClientRect(),y=se(p),w=x.left+(p.clientLeft+parseFloat(y.paddingLeft))*h.x,k=x.top+(p.clientTop+parseFloat(y.paddingTop))*h.y;c*=h.x,u*=h.y,d*=h.x,f*=h.y,c+=w,u+=k,b=ne(p),p=tr(b)}}return yt({width:d,height:f,x:c,y:u})}function Cr(e,t){const r=Tt(e).scrollLeft;return t?t.left+r:Ne(ge(e)).left+r}function Yo(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-(r?0:Cr(e,n)),s=n.top+t.scrollTop;return{x:o,y:s}}function Ql(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",a=ge(n),i=t?St(t.floating):!1;if(n===a||i&&s)return r;let c={scrollLeft:0,scrollTop:0},u=de(1);const d=de(0),f=fe(n);if((f||!f&&!s)&&((He(n)!=="body"||et(a))&&(c=Tt(n)),fe(n))){const g=Ne(n);u=$e(n),d.x=g.x+n.clientLeft,d.y=g.y+n.clientTop}const v=a&&!f&&!s?Yo(a,c,!0):de(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x+v.x,y:r.y*u.y-c.scrollTop*u.y+d.y+v.y}}function eu(e){return Array.from(e.getClientRects())}function tu(e){const t=ge(e),r=Tt(e),n=e.ownerDocument.body,o=re(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=re(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Cr(e);const i=-r.scrollTop;return se(n).direction==="rtl"&&(a+=re(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:a,y:i}}function ru(e,t){const r=ne(e),n=ge(e),o=r.visualViewport;let s=n.clientWidth,a=n.clientHeight,i=0,c=0;if(o){s=o.width,a=o.height;const u=yr();(!u||u&&t==="fixed")&&(i=o.offsetLeft,c=o.offsetTop)}return{width:s,height:a,x:i,y:c}}const nu=new Set(["absolute","fixed"]);function ou(e,t){const r=Ne(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=fe(e)?$e(e):de(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,c=o*s.x,u=n*s.y;return{width:a,height:i,x:c,y:u}}function fn(e,t,r){let n;if(t==="viewport")n=ru(e,r);else if(t==="document")n=tu(ge(e));else if(oe(t))n=ou(t,r);else{const o=Uo(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return yt(n)}function Ko(e,t){const r=Ee(e);return r===t||!oe(r)||ze(r)?!1:se(r).position==="fixed"||Ko(r,t)}function su(e,t){const r=t.get(e);if(r)return r;let n=Ze(e,[],!1).filter(i=>oe(i)&&He(i)!=="body"),o=null;const s=se(e).position==="fixed";let a=s?Ee(e):e;for(;oe(a)&&!ze(a);){const i=se(a),c=xr(a);!c&&i.position==="fixed"&&(o=null),(s?!c&&!o:!c&&i.position==="static"&&!!o&&nu.has(o.position)||et(a)&&!c&&Ko(e,a))?n=n.filter(d=>d!==a):o=i,a=Ee(a)}return t.set(e,n),n}function au(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const a=[...r==="clippingAncestors"?St(t)?[]:su(t,this._c):[].concat(r),n],i=a[0],c=a.reduce((u,d)=>{const f=fn(t,d,o);return u.top=re(f.top,u.top),u.right=ke(f.right,u.right),u.bottom=ke(f.bottom,u.bottom),u.left=re(f.left,u.left),u},fn(t,i,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function iu(e){const{width:t,height:r}=Ho(e);return{width:t,height:r}}function cu(e,t,r){const n=fe(t),o=ge(t),s=r==="fixed",a=Ne(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const c=de(0);function u(){c.x=Cr(o)}if(n||!n&&!s)if((He(t)!=="body"||et(o))&&(i=Tt(t)),n){const g=Ne(t,!0,s,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else o&&u();s&&!n&&o&&u();const d=o&&!n&&!s?Yo(o,i):de(0),f=a.left+i.scrollLeft-c.x-d.x,v=a.top+i.scrollTop-c.y-d.y;return{x:f,y:v,width:a.width,height:a.height}}function Ht(e){return se(e).position==="static"}function pn(e,t){if(!fe(e)||se(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ge(e)===r&&(r=r.ownerDocument.body),r}function Xo(e,t){const r=ne(e);if(St(e))return r;if(!fe(e)){let o=Ee(e);for(;o&&!ze(o);){if(oe(o)&&!Ht(o))return o;o=Ee(o)}return r}let n=pn(e,t);for(;n&&Bl(n)&&Ht(n);)n=pn(n,t);return n&&ze(n)&&Ht(n)&&!xr(n)?r:n||Xl(e)||r}const lu=async function(e){const t=this.getOffsetParent||Xo,r=this.getDimensions,n=await r(e.floating);return{reference:cu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function uu(e){return se(e).direction==="rtl"}const du={convertOffsetParentRelativeRectToViewportRelativeRect:Ql,getDocumentElement:ge,getClippingRect:au,getOffsetParent:Xo,getElementRects:lu,getClientRects:eu,getDimensions:iu,getScale:$e,isElement:oe,isRTL:uu};function qo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function fu(e,t){let r=null,n;const o=ge(e);function s(){var i;clearTimeout(n),(i=r)==null||i.disconnect(),r=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:d,top:f,width:v,height:g}=u;if(i||t(),!v||!g)return;const b=dt(f),p=dt(o.clientWidth-(d+v)),h=dt(o.clientHeight-(f+g)),x=dt(d),w={rootMargin:-b+"px "+-p+"px "+-h+"px "+-x+"px",threshold:re(0,ke(1,c))||1};let k=!0;function A(O){const P=O[0].intersectionRatio;if(P!==c){if(!k)return a();P?a(!1,P):n=setTimeout(()=>{a(!1,1e-7)},1e3)}P===1&&!qo(u,e.getBoundingClientRect())&&a(),k=!1}try{r=new IntersectionObserver(A,{...w,root:o.ownerDocument})}catch{r=new IntersectionObserver(A,w)}r.observe(e)}return a(!0),s}function pu(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=wr(e),d=o||s?[...u?Ze(u):[],...Ze(t)]:[];d.forEach(x=>{o&&x.addEventListener("scroll",r,{passive:!0}),s&&x.addEventListener("resize",r)});const f=u&&i?fu(u,r):null;let v=-1,g=null;a&&(g=new ResizeObserver(x=>{let[y]=x;y&&y.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var w;(w=g)==null||w.observe(t)})),r()}),u&&!c&&g.observe(u),g.observe(t));let b,p=c?Ne(e):null;c&&h();function h(){const x=Ne(e);p&&!qo(p,x)&&r(),p=x,b=requestAnimationFrame(h)}return r(),()=>{var x;d.forEach(y=>{o&&y.removeEventListener("scroll",r),s&&y.removeEventListener("resize",r)}),f?.(),(x=g)==null||x.disconnect(),g=null,c&&cancelAnimationFrame(b)}}const mu=Fl,gu=$l,vu=Ml,hu=Wl,bu=jl,mn=Dl,xu=zl,yu=(e,t,r)=>{const n=new Map,o={platform:du,...r},s={...o.platform,_c:n};return Il(e,t,{...o,platform:s})};var wu=typeof document<"u",Cu=function(){},mt=wu?I.useLayoutEffect:Cu;function wt(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!wt(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const s=o[n];if(!(s==="_owner"&&e.$$typeof)&&!wt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Zo(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function gn(e,t){const r=Zo(e);return Math.round(t*r)/r}function Ut(e){const t=l.useRef(e);return mt(()=>{t.current=e}),t}function ku(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:c,open:u}=e,[d,f]=l.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[v,g]=l.useState(n);wt(v,n)||g(n);const[b,p]=l.useState(null),[h,x]=l.useState(null),y=l.useCallback(R=>{R!==O.current&&(O.current=R,p(R))},[]),w=l.useCallback(R=>{R!==P.current&&(P.current=R,x(R))},[]),k=s||b,A=a||h,O=l.useRef(null),P=l.useRef(null),E=l.useRef(d),M=c!=null,L=Ut(c),B=Ut(o),U=Ut(u),H=l.useCallback(()=>{if(!O.current||!P.current)return;const R={placement:t,strategy:r,middleware:v};B.current&&(R.platform=B.current),yu(O.current,P.current,R).then(q=>{const C={...q,isPositioned:U.current!==!1};F.current&&!wt(E.current,C)&&(E.current=C,bn.flushSync(()=>{f(C)}))})},[v,t,r,B,U]);mt(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,f(R=>({...R,isPositioned:!1})))},[u]);const F=l.useRef(!1);mt(()=>(F.current=!0,()=>{F.current=!1}),[]),mt(()=>{if(k&&(O.current=k),A&&(P.current=A),k&&A){if(L.current)return L.current(k,A,H);H()}},[k,A,H,L,M]);const Y=l.useMemo(()=>({reference:O,floating:P,setReference:y,setFloating:w}),[y,w]),_=l.useMemo(()=>({reference:k,floating:A}),[k,A]),$=l.useMemo(()=>{const R={position:r,left:0,top:0};if(!_.floating)return R;const q=gn(_.floating,d.x),C=gn(_.floating,d.y);return i?{...R,transform:"translate("+q+"px, "+C+"px)",...Zo(_.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:q,top:C}},[r,i,_.floating,d.x,d.y]);return l.useMemo(()=>({...d,update:H,refs:Y,elements:_,floatingStyles:$}),[d,H,Y,_,$])}const Eu=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?mn({element:n.current,padding:o}).fn(r):{}:n?mn({element:n,padding:o}).fn(r):{}}}},Ru=(e,t)=>({...mu(e),options:[e,t]}),Au=(e,t)=>({...gu(e),options:[e,t]}),Pu=(e,t)=>({...xu(e),options:[e,t]}),Su=(e,t)=>({...vu(e),options:[e,t]}),Tu=(e,t)=>({...hu(e),options:[e,t]}),Ou=(e,t)=>({...bu(e),options:[e,t]}),Nu=(e,t)=>({...Eu(e),options:[e,t]});var _u="Arrow",Jo=l.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...s}=e;return m.jsx(V.svg,{...s,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});Jo.displayName=_u;var Iu=Jo,kr="Popper",[Qo,es]=pe(kr),[Du,ts]=Qo(kr),rs=e=>{const{__scopePopper:t,children:r}=e,[n,o]=l.useState(null);return m.jsx(Du,{scope:t,anchor:n,onAnchorChange:o,children:r})};rs.displayName=kr;var ns="PopperAnchor",os=l.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,s=ts(ns,r),a=l.useRef(null),i=Q(t,a);return l.useEffect(()=>{s.onAnchorChange(n?.current||a.current)}),n?null:m.jsx(V.div,{...o,ref:i})});os.displayName=ns;var Er="PopperContent",[Mu,ju]=Qo(Er),ss=l.forwardRef((e,t)=>{const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:v=!1,updatePositionStrategy:g="optimized",onPlaced:b,...p}=e,h=ts(Er,r),[x,y]=l.useState(null),w=Q(t,W=>y(W)),[k,A]=l.useState(null),O=xo(k),P=O?.width??0,E=O?.height??0,M=n+(s!=="center"?"-"+s:""),L=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},B=Array.isArray(u)?u:[u],U=B.length>0,H={padding:L,boundary:B.filter(Fu),altBoundary:U},{refs:F,floatingStyles:Y,placement:_,isPositioned:$,middlewareData:R}=ku({strategy:"fixed",placement:M,whileElementsMounted:(...W)=>pu(...W,{animationFrame:g==="always"}),elements:{reference:h.anchor},middleware:[Ru({mainAxis:o+E,alignmentAxis:a}),c&&Au({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Pu():void 0,...H}),c&&Su({...H}),Tu({...H,apply:({elements:W,rects:Z,availableWidth:te,availableHeight:ce})=>{const{width:Ae,height:Ie}=Z.reference,rt=W.floating.style;rt.setProperty("--radix-popper-available-width",`${te}px`),rt.setProperty("--radix-popper-available-height",`${ce}px`),rt.setProperty("--radix-popper-anchor-width",`${Ae}px`),rt.setProperty("--radix-popper-anchor-height",`${Ie}px`)}}),k&&Nu({element:k,padding:i}),$u({arrowWidth:P,arrowHeight:E}),v&&Ou({strategy:"referenceHidden",...H})]}),[q,C]=cs(_),N=Te(b);he(()=>{$&&N?.()},[$,N]);const z=R.arrow?.x,j=R.arrow?.y,K=R.arrow?.centerOffset!==0,[ee,ye]=l.useState();return he(()=>{x&&ye(window.getComputedStyle(x).zIndex)},[x]),m.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:$?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,"--radix-popper-transform-origin":[R.transformOrigin?.x,R.transformOrigin?.y].join(" "),...R.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(Mu,{scope:r,placedSide:q,onArrowChange:A,arrowX:z,arrowY:j,shouldHideArrow:K,children:m.jsx(V.div,{"data-side":q,"data-align":C,...p,ref:w,style:{...p.style,animation:$?void 0:"none"}})})})});ss.displayName=Er;var as="PopperArrow",Lu={top:"bottom",right:"left",bottom:"top",left:"right"},is=l.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,s=ju(as,n),a=Lu[s.placedSide];return m.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:m.jsx(Iu,{...o,ref:r,style:{...o.style,display:"block"}})})});is.displayName=as;function Fu(e){return e!==null}var $u=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:o}=t,a=o.arrow?.centerOffset!==0,i=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,d]=cs(r),f={start:"0%",center:"50%",end:"100%"}[d],v=(o.arrow?.x??0)+i/2,g=(o.arrow?.y??0)+c/2;let b="",p="";return u==="bottom"?(b=a?f:`${v}px`,p=`${-c}px`):u==="top"?(b=a?f:`${v}px`,p=`${n.floating.height+c}px`):u==="right"?(b=`${-c}px`,p=a?f:`${g}px`):u==="left"&&(b=`${n.floating.width+c}px`,p=a?f:`${g}px`),{data:{x:b,y:p}}}});function cs(e){const[t,r="center"]=e.split("-");return[t,r]}var zu=rs,Wu=os,Gu=ss,Vu=is,Bu=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"}),Hu="VisuallyHidden",ls=l.forwardRef((e,t)=>m.jsx(V.span,{...e,ref:t,style:{...Bu,...e.style}}));ls.displayName=Hu;var Uu=ls,[Ot,Ud]=pe("Tooltip",[es]),Nt=es(),us="TooltipProvider",Yu=700,rr="tooltip.open",[Ku,Rr]=Ot(us),ds=e=>{const{__scopeTooltip:t,delayDuration:r=Yu,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:s}=e,a=l.useRef(!0),i=l.useRef(!1),c=l.useRef(0);return l.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),m.jsx(Ku,{scope:t,isOpenDelayedRef:a,delayDuration:r,onOpen:l.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:l.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,n)},[n]),isPointerInTransitRef:i,onPointerInTransitChange:l.useCallback(u=>{i.current=u},[]),disableHoverableContent:o,children:s})};ds.displayName=us;var Je="Tooltip",[Xu,tt]=Ot(Je),fs=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:s,disableHoverableContent:a,delayDuration:i}=e,c=Rr(Je,e.__scopeTooltip),u=Nt(t),[d,f]=l.useState(null),v=Se(),g=l.useRef(0),b=a??c.disableHoverableContent,p=i??c.delayDuration,h=l.useRef(!1),[x,y]=me({prop:n,defaultProp:o??!1,onChange:P=>{P?(c.onOpen(),document.dispatchEvent(new CustomEvent(rr))):c.onClose(),s?.(P)},caller:Je}),w=l.useMemo(()=>x?h.current?"delayed-open":"instant-open":"closed",[x]),k=l.useCallback(()=>{window.clearTimeout(g.current),g.current=0,h.current=!1,y(!0)},[y]),A=l.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y(!1)},[y]),O=l.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{h.current=!0,y(!0),g.current=0},p)},[p,y]);return l.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),m.jsx(zu,{...u,children:m.jsx(Xu,{scope:t,contentId:v,open:x,stateAttribute:w,trigger:d,onTriggerChange:f,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayedRef.current?O():k()},[c.isOpenDelayedRef,O,k]),onTriggerLeave:l.useCallback(()=>{b?A():(window.clearTimeout(g.current),g.current=0)},[A,b]),onOpen:k,onClose:A,disableHoverableContent:b,children:r})})};fs.displayName=Je;var nr="TooltipTrigger",ps=l.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=tt(nr,r),s=Rr(nr,r),a=Nt(r),i=l.useRef(null),c=Q(t,i,o.onTriggerChange),u=l.useRef(!1),d=l.useRef(!1),f=l.useCallback(()=>u.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),m.jsx(Wu,{asChild:!0,...a,children:m.jsx(V.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:c,onPointerMove:X(e.onPointerMove,v=>{v.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:X(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:X(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:X(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:X(e.onBlur,o.onClose),onClick:X(e.onClick,o.onClose)})})});ps.displayName=nr;var Ar="TooltipPortal",[qu,Zu]=Ot(Ar,{forceMount:void 0}),ms=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,s=tt(Ar,t);return m.jsx(qu,{scope:t,forceMount:r,children:m.jsx(_e,{present:r||s.open,children:m.jsx(ir,{asChild:!0,container:o,children:n})})})};ms.displayName=Ar;var We="TooltipContent",gs=l.forwardRef((e,t)=>{const r=Zu(We,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...s}=e,a=tt(We,e.__scopeTooltip);return m.jsx(_e,{present:n||a.open,children:a.disableHoverableContent?m.jsx(vs,{side:o,...s,ref:t}):m.jsx(Ju,{side:o,...s,ref:t})})}),Ju=l.forwardRef((e,t)=>{const r=tt(We,e.__scopeTooltip),n=Rr(We,e.__scopeTooltip),o=l.useRef(null),s=Q(t,o),[a,i]=l.useState(null),{trigger:c,onClose:u}=r,d=o.current,{onPointerInTransitChange:f}=n,v=l.useCallback(()=>{i(null),f(!1)},[f]),g=l.useCallback((b,p)=>{const h=b.currentTarget,x={x:b.clientX,y:b.clientY},y=rd(x,h.getBoundingClientRect()),w=nd(x,y),k=od(p.getBoundingClientRect()),A=ad([...w,...k]);i(A),f(!0)},[f]);return l.useEffect(()=>()=>v(),[v]),l.useEffect(()=>{if(c&&d){const b=h=>g(h,d),p=h=>g(h,c);return c.addEventListener("pointerleave",b),d.addEventListener("pointerleave",p),()=>{c.removeEventListener("pointerleave",b),d.removeEventListener("pointerleave",p)}}},[c,d,g,v]),l.useEffect(()=>{if(a){const b=p=>{const h=p.target,x={x:p.clientX,y:p.clientY},y=c?.contains(h)||d?.contains(h),w=!sd(x,a);y?v():w&&(v(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,d,a,u,v]),m.jsx(vs,{...e,ref:s})}),[Qu,ed]=Ot(Je,{isInside:!1}),td=Sa("TooltipContent"),vs=l.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:a,...i}=e,c=tt(We,r),u=Nt(r),{onClose:d}=c;return l.useEffect(()=>(document.addEventListener(rr,d),()=>document.removeEventListener(rr,d)),[d]),l.useEffect(()=>{if(c.trigger){const f=v=>{v.target?.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),m.jsx(ar,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:m.jsxs(Gu,{"data-state":c.stateAttribute,...u,...i,ref:t,style:{...i.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:[m.jsx(td,{children:n}),m.jsx(Qu,{scope:r,isInside:!0,children:m.jsx(Uu,{id:c.contentId,role:"tooltip",children:o||n})})]})})});gs.displayName=We;var hs="TooltipArrow",bs=l.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Nt(r);return ed(hs,r).isInside?null:m.jsx(Vu,{...o,...n,ref:t})});bs.displayName=hs;function rd(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(r,n,o,s)){case s:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function nd(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function od(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function sd(e,t){const{x:r,y:n}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],c=t[a],u=i.x,d=i.y,f=c.x,v=c.y;d>n!=v>n&&r<(f-u)*(n-d)/(v-d)+u&&(o=!o)}return o}function ad(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),id(t)}function id(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const s=r[r.length-1],a=r[r.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var cd=ds,ld=fs,ud=ps,dd=ms,fd=gs,pd=bs;function xs({delayDuration:e=0,...t}){return m.jsx(cd,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function md({...e}){return m.jsx(xs,{children:m.jsx(ld,{"data-slot":"tooltip",...e})})}function gd({...e}){return m.jsx(ud,{"data-slot":"tooltip-trigger",...e})}function vd({className:e,sideOffset:t=0,children:r,...n}){return m.jsx(dd,{children:m.jsxs(fd,{"data-slot":"tooltip-content",sideOffset:t,className:G("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance dark:bg-primary dark:text-primary-foreground",e),...n,children:[r,m.jsx(pd,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] dark:bg-primary dark:fill-primary"})]})})}var _t="Collapsible",[hd,ys]=pe(_t),[bd,Pr]=hd(_t),ws=l.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:s,onOpenChange:a,...i}=e,[c,u]=me({prop:n,defaultProp:o??!1,onChange:a,caller:_t});return m.jsx(bd,{scope:r,disabled:s,contentId:Se(),open:c,onOpenToggle:l.useCallback(()=>u(d=>!d),[u]),children:m.jsx(V.div,{"data-state":Tr(c),"data-disabled":s?"":void 0,...i,ref:t})})});ws.displayName=_t;var Cs="CollapsibleTrigger",ks=l.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=Pr(Cs,r);return m.jsx(V.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Tr(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:X(e.onClick,o.onOpenToggle)})});ks.displayName=Cs;var Sr="CollapsibleContent",Es=l.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Pr(Sr,e.__scopeCollapsible);return m.jsx(_e,{present:r||o.open,children:({present:s})=>m.jsx(xd,{...n,ref:t,present:s})})});Es.displayName=Sr;var xd=l.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...s}=e,a=Pr(Sr,r),[i,c]=l.useState(n),u=l.useRef(null),d=Q(t,u),f=l.useRef(0),v=f.current,g=l.useRef(0),b=g.current,p=a.open||i,h=l.useRef(p),x=l.useRef(void 0);return l.useEffect(()=>{const y=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(y)},[]),he(()=>{const y=u.current;if(y){x.current=x.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const w=y.getBoundingClientRect();f.current=w.height,g.current=w.width,h.current||(y.style.transitionDuration=x.current.transitionDuration,y.style.animationName=x.current.animationName),c(n)}},[a.open,n]),m.jsx(V.div,{"data-state":Tr(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!p,...s,ref:d,style:{"--radix-collapsible-content-height":v?`${v}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:p&&o})});function Tr(e){return e?"open":"closed"}var yd=ws,wd=ks,Cd=Es,ie="Accordion",kd=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Or,Ed,Rd]=Po(ie),[It,Yd]=pe(ie,[Rd,ys]),Nr=ys(),Rs=I.forwardRef((e,t)=>{const{type:r,...n}=e,o=n,s=n;return m.jsx(Or.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?m.jsx(Td,{...s,ref:t}):m.jsx(Sd,{...o,ref:t})})});Rs.displayName=ie;var[As,Ad]=It(ie),[Ps,Pd]=It(ie,{collapsible:!1}),Sd=I.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:s=!1,...a}=e,[i,c]=me({prop:r,defaultProp:n??"",onChange:o,caller:ie});return m.jsx(As,{scope:e.__scopeAccordion,value:I.useMemo(()=>i?[i]:[],[i]),onItemOpen:c,onItemClose:I.useCallback(()=>s&&c(""),[s,c]),children:m.jsx(Ps,{scope:e.__scopeAccordion,collapsible:s,children:m.jsx(Ss,{...a,ref:t})})})}),Td=I.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...s}=e,[a,i]=me({prop:r,defaultProp:n??[],onChange:o,caller:ie}),c=I.useCallback(d=>i((f=[])=>[...f,d]),[i]),u=I.useCallback(d=>i((f=[])=>f.filter(v=>v!==d)),[i]);return m.jsx(As,{scope:e.__scopeAccordion,value:a,onItemOpen:c,onItemClose:u,children:m.jsx(Ps,{scope:e.__scopeAccordion,collapsible:!0,children:m.jsx(Ss,{...s,ref:t})})})}),[Od,Dt]=It(ie),Ss=I.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:o,orientation:s="vertical",...a}=e,i=I.useRef(null),c=Q(i,t),u=Ed(r),f=mr(o)==="ltr",v=X(e.onKeyDown,g=>{if(!kd.includes(g.key))return;const b=g.target,p=u().filter(E=>!E.ref.current?.disabled),h=p.findIndex(E=>E.ref.current===b),x=p.length;if(h===-1)return;g.preventDefault();let y=h;const w=0,k=x-1,A=()=>{y=h+1,y>k&&(y=w)},O=()=>{y=h-1,y<w&&(y=k)};switch(g.key){case"Home":y=w;break;case"End":y=k;break;case"ArrowRight":s==="horizontal"&&(f?A():O());break;case"ArrowDown":s==="vertical"&&A();break;case"ArrowLeft":s==="horizontal"&&(f?O():A());break;case"ArrowUp":s==="vertical"&&O();break}const P=y%x;p[P].ref.current?.focus()});return m.jsx(Od,{scope:r,disabled:n,direction:o,orientation:s,children:m.jsx(Or.Slot,{scope:r,children:m.jsx(V.div,{...a,"data-orientation":s,ref:c,onKeyDown:n?void 0:v})})})}),Ct="AccordionItem",[Nd,_r]=It(Ct),Ts=I.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...o}=e,s=Dt(Ct,r),a=Ad(Ct,r),i=Nr(r),c=Se(),u=n&&a.value.includes(n)||!1,d=s.disabled||e.disabled;return m.jsx(Nd,{scope:r,open:u,disabled:d,triggerId:c,children:m.jsx(yd,{"data-orientation":s.orientation,"data-state":Ms(u),...i,...o,ref:t,disabled:d,open:u,onOpenChange:f=>{f?a.onItemOpen(n):a.onItemClose(n)}})})});Ts.displayName=Ct;var Os="AccordionHeader",Ns=I.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Dt(ie,r),s=_r(Os,r);return m.jsx(V.h3,{"data-orientation":o.orientation,"data-state":Ms(s.open),"data-disabled":s.disabled?"":void 0,...n,ref:t})});Ns.displayName=Os;var or="AccordionTrigger",_s=I.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Dt(ie,r),s=_r(or,r),a=Pd(or,r),i=Nr(r);return m.jsx(Or.ItemSlot,{scope:r,children:m.jsx(wd,{"aria-disabled":s.open&&!a.collapsible||void 0,"data-orientation":o.orientation,id:s.triggerId,...i,...n,ref:t})})});_s.displayName=or;var Is="AccordionContent",Ds=I.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Dt(ie,r),s=_r(Is,r),a=Nr(r);return m.jsx(Cd,{role:"region","aria-labelledby":s.triggerId,"data-orientation":o.orientation,...a,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});Ds.displayName=Is;function Ms(e){return e?"open":"closed"}var _d=Rs,Id=Ts,Dd=Ns,Md=_s,jd=Ds;function Ld({...e}){return m.jsx(_d,{"data-slot":"accordion",...e})}function Fd({className:e,...t}){return m.jsx(Id,{"data-slot":"accordion-item",className:G("border-b last:border-b-0 dark:border-border",e),...t})}function $d({className:e,children:t,...r}){return m.jsx(Dd,{className:"flex",children:m.jsxs(Md,{"data-slot":"accordion-trigger",className:G("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium text-foreground transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180 dark:text-foreground dark:focus-visible:border-ring dark:focus-visible:ring-ring/50",e),...r,children:[t,m.jsx(Ec,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200 dark:text-muted-foreground"})]})})}function zd({className:e,children:t,...r}){return m.jsx(jd,{"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-foreground dark:text-foreground",...r,children:m.jsx("div",{className:G("pt-0 pb-4",e),children:t})})}exports.Accordion=Ld;exports.AccordionContent=zd;exports.AccordionItem=Fd;exports.AccordionTrigger=$d;exports.Badge=Ia;exports.Button=Nn;exports.Card=Da;exports.CardAction=Fa;exports.CardContent=$a;exports.CardDescription=La;exports.CardFooter=za;exports.CardHeader=Ma;exports.CardTitle=ja;exports.Dialog=Pc;exports.DialogClose=Tc;exports.DialogContent=Oc;exports.DialogDescription=Dc;exports.DialogFooter=_c;exports.DialogHeader=Nc;exports.DialogOverlay=mo;exports.DialogPortal=po;exports.DialogTitle=Ic;exports.DialogTrigger=Sc;exports.Input=Ra;exports.Progress=Vc;exports.Skeleton=Bc;exports.Switch=Jc;exports.Toggle=el;exports.ToggleGroup=yl;exports.ToggleGroupItem=wl;exports.Tooltip=md;exports.TooltipContent=vd;exports.TooltipProvider=xs;exports.TooltipTrigger=gd;exports.borderRadius=Fs;exports.cn=G;exports.colors=js;exports.spacing=Ls;exports.typography=$s;
|
|
121
|
+
Defaulting to \`null\`.`}var Tm=wi,Nm=Si;function Im({className:e,value:t,...r}){return d.jsx(Tm,{"data-slot":"progress",className:$("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full dark:bg-primary/20",e),...r,children:d.jsx(Nm,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all dark:bg-primary",style:{transform:`translateX(-${100-(t||0)}%)`}})})}function Om({className:e,...t}){return d.jsx("div",{"data-slot":"skeleton",className:$("bg-accent animate-pulse rounded-md dark:bg-accent",e),...t})}var vr="Switch",[_m,Wh]=pe(vr),[jm,Mm]=_m(vr),Pi=l.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:s,required:a,disabled:i,value:c="on",onCheckedChange:u,form:f,...p}=e,[v,h]=l.useState(null),x=ne(t,w=>h(w)),m=l.useRef(!1),g=v?f||!!v.closest("form"):!0,[y,b]=de({prop:o,defaultProp:s??!1,onChange:u,caller:vr});return d.jsxs(jm,{scope:r,checked:y,disabled:i,children:[d.jsx(B.button,{type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":Ti(y),"data-disabled":i?"":void 0,disabled:i,value:c,...p,ref:x,onClick:G(e.onClick,w=>{b(S=>!S),g&&(m.current=w.isPropagationStopped(),m.current||w.stopPropagation())})}),g&&d.jsx(Ai,{control:v,bubbles:!m.current,name:n,value:c,checked:y,required:a,disabled:i,form:f,style:{transform:"translateX(-100%)"}})]})});Pi.displayName=vr;var Ri="SwitchThumb",ki=l.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=Mm(Ri,r);return d.jsx(B.span,{"data-state":Ti(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});ki.displayName=Ri;var Dm="SwitchBubbleInput",Ai=l.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},s)=>{const a=l.useRef(null),i=ne(a,s),c=Ms(r),u=Ps(t);return l.useEffect(()=>{const f=a.current;if(!f)return;const p=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(p,"checked").set;if(c!==r&&h){const x=new Event("click",{bubbles:n});h.call(f,r),f.dispatchEvent(x)}},[c,r,n]),d.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:i,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ai.displayName=Dm;function Ti(e){return e?"checked":"unchecked"}var Fm=Pi,Lm=ki;function $m({className:e,...t}){return d.jsx(Fm,{"data-slot":"switch",className:$("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:data-[state=checked]:bg-primary dark:data-[state=unchecked]:bg-input",e),...t,children:d.jsx(Lm,{"data-slot":"switch-thumb",className:$("bg-background pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground")})})}var Ni="Toggle",Bn=l.forwardRef((e,t)=>{const{pressed:r,defaultPressed:n,onPressedChange:o,...s}=e,[a,i]=de({prop:r,onChange:o,defaultProp:n??!1,caller:Ni});return d.jsx(B.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:G(e.onClick,()=>{e.disabled||i(!a)})})});Bn.displayName=Ni;var Vm=Bn;const Ii=tr("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium text-foreground hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap dark:text-foreground dark:hover:bg-muted dark:hover:text-muted-foreground dark:data-[state=on]:bg-accent dark:data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent text-foreground dark:bg-transparent dark:text-foreground",outline:"border border-input bg-transparent text-foreground shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-transparent dark:text-foreground dark:hover:bg-accent dark:hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function Bm({className:e,variant:t,size:r,...n}){return d.jsx(Vm,{"data-slot":"toggle",className:$(Ii({variant:t,size:r,className:e})),...n})}var Br="rovingFocusGroup.onEntryFocus",zm={bubbles:!1,cancelable:!0},At="RovingFocusGroup",[on,Oi,Wm]=dn(At),[Gm,_i]=pe(At,[Wm]),[Hm,Um]=Gm(At),ji=l.forwardRef((e,t)=>d.jsx(on.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(on.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Km,{...e,ref:t})})}));ji.displayName=At;var Km=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...p}=e,v=l.useRef(null),h=ne(t,v),x=nr(s),[m,g]=de({prop:a,defaultProp:i??null,onChange:c,caller:At}),[y,b]=l.useState(!1),w=Ne(u),S=Oi(r),P=l.useRef(!1),[N,k]=l.useState(0);return l.useEffect(()=>{const R=v.current;if(R)return R.addEventListener(Br,w),()=>R.removeEventListener(Br,w)},[w]),d.jsx(Hm,{scope:r,orientation:n,dir:x,loop:o,currentTabStopId:m,onItemFocus:l.useCallback(R=>g(R),[g]),onItemShiftTab:l.useCallback(()=>b(!0),[]),onFocusableItemAdd:l.useCallback(()=>k(R=>R+1),[]),onFocusableItemRemove:l.useCallback(()=>k(R=>R-1),[]),children:d.jsx(B.div,{tabIndex:y||N===0?-1:0,"data-orientation":n,...p,ref:h,style:{outline:"none",...e.style},onMouseDown:G(e.onMouseDown,()=>{P.current=!0}),onFocus:G(e.onFocus,R=>{const W=!P.current;if(R.target===R.currentTarget&&W&&!y){const K=new CustomEvent(Br,zm);if(R.currentTarget.dispatchEvent(K),!K.defaultPrevented){const X=S().filter(F=>F.focusable),Z=X.find(F=>F.active),ee=X.find(F=>F.id===m),q=[Z,ee,...X].filter(Boolean).map(F=>F.ref.current);Fi(q,f)}}P.current=!1}),onBlur:G(e.onBlur,()=>b(!1))})})}),Mi="RovingFocusGroupItem",Di=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:s,children:a,...i}=e,c=ae(),u=s||c,f=Um(Mi,r),p=f.currentTabStopId===u,v=Oi(r),{onFocusableItemAdd:h,onFocusableItemRemove:x,currentTabStopId:m}=f;return l.useEffect(()=>{if(n)return h(),()=>x()},[n,h,x]),d.jsx(on.ItemSlot,{scope:r,id:u,focusable:n,active:o,children:d.jsx(B.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...i,ref:t,onMouseDown:G(e.onMouseDown,g=>{n?f.onItemFocus(u):g.preventDefault()}),onFocus:G(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:G(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){f.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const y=Xm(g,f.orientation,f.dir);if(y!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let w=v().filter(S=>S.focusable).map(S=>S.ref.current);if(y==="last")w.reverse();else if(y==="prev"||y==="next"){y==="prev"&&w.reverse();const S=w.indexOf(g.currentTarget);w=f.loop?Zm(w,S+1):w.slice(S+1)}setTimeout(()=>Fi(w))}}),children:typeof a=="function"?a({isCurrentTabStop:p,hasTabStop:m!=null}):a})})});Di.displayName=Mi;var Ym={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function qm(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Xm(e,t,r){const n=qm(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Ym[n]}function Fi(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Zm(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Jm=ji,Qm=Di,Fe="ToggleGroup",[Li,Gh]=pe(Fe,[_i]),$i=_i(),zn=O.forwardRef((e,t)=>{const{type:r,...n}=e;if(r==="single"){const o=n;return d.jsx(eg,{...o,ref:t})}if(r==="multiple"){const o=n;return d.jsx(tg,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${Fe}\``)});zn.displayName=Fe;var[Vi,Bi]=Li(Fe),eg=O.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...s}=e,[a,i]=de({prop:r,defaultProp:n??"",onChange:o,caller:Fe});return d.jsx(Vi,{scope:e.__scopeToggleGroup,type:"single",value:O.useMemo(()=>a?[a]:[],[a]),onItemActivate:i,onItemDeactivate:O.useCallback(()=>i(""),[i]),children:d.jsx(zi,{...s,ref:t})})}),tg=O.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...s}=e,[a,i]=de({prop:r,defaultProp:n??[],onChange:o,caller:Fe}),c=O.useCallback(f=>i((p=[])=>[...p,f]),[i]),u=O.useCallback(f=>i((p=[])=>p.filter(v=>v!==f)),[i]);return d.jsx(Vi,{scope:e.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:c,onItemDeactivate:u,children:d.jsx(zi,{...s,ref:t})})});zn.displayName=Fe;var[rg,ng]=Li(Fe),zi=O.forwardRef((e,t)=>{const{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:o=!0,orientation:s,dir:a,loop:i=!0,...c}=e,u=$i(r),f=nr(a),p={role:"group",dir:f,...c};return d.jsx(rg,{scope:r,rovingFocus:o,disabled:n,children:o?d.jsx(Jm,{asChild:!0,...u,orientation:s,dir:f,loop:i,children:d.jsx(B.div,{...p,ref:t})}):d.jsx(B.div,{...p,ref:t})})}),Xt="ToggleGroupItem",Wi=O.forwardRef((e,t)=>{const r=Bi(Xt,e.__scopeToggleGroup),n=ng(Xt,e.__scopeToggleGroup),o=$i(e.__scopeToggleGroup),s=r.value.includes(e.value),a=n.disabled||e.disabled,i={...e,pressed:s,disabled:a},c=O.useRef(null);return n.rovingFocus?d.jsx(Qm,{asChild:!0,...o,focusable:!a,active:s,ref:c,children:d.jsx(Vo,{...i,ref:t})}):d.jsx(Vo,{...i,ref:t})});Wi.displayName=Xt;var Vo=O.forwardRef((e,t)=>{const{__scopeToggleGroup:r,value:n,...o}=e,s=Bi(Xt,r),a={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=s.type==="single"?a:void 0;return d.jsx(Bn,{...i,...o,ref:t,onPressedChange:c=>{c?s.onItemActivate(n):s.onItemDeactivate(n)}})}),og=zn,sg=Wi;const Gi=l.createContext({size:"default",variant:"default"});function ag({className:e,variant:t,size:r,children:n,...o}){return d.jsx(og,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:$("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs dark:data-[variant=outline]:shadow-xs",e),...o,children:d.jsx(Gi.Provider,{value:{variant:t,size:r},children:n})})}function ig({className:e,children:t,variant:r,size:n,...o}){const s=l.useContext(Gi);return d.jsx(sg,{"data-slot":"toggle-group-item","data-variant":s.variant||r,"data-size":s.size||n,className:$(Ii({variant:s.variant||r,size:s.size||n}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",e),...o,children:t})}var[br,Hh]=pe("Tooltip",[ut]),xr=ut(),Hi="TooltipProvider",lg=700,sn="tooltip.open",[cg,Wn]=br(Hi),Ui=e=>{const{__scopeTooltip:t,delayDuration:r=lg,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:s}=e,a=l.useRef(!0),i=l.useRef(!1),c=l.useRef(0);return l.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),d.jsx(cg,{scope:t,isOpenDelayedRef:a,delayDuration:r,onOpen:l.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:l.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,n)},[n]),isPointerInTransitRef:i,onPointerInTransitChange:l.useCallback(u=>{i.current=u},[]),disableHoverableContent:o,children:s})};Ui.displayName=Hi;var Ct="Tooltip",[ug,Tt]=br(Ct),Ki=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:s,disableHoverableContent:a,delayDuration:i}=e,c=Wn(Ct,e.__scopeTooltip),u=xr(t),[f,p]=l.useState(null),v=ae(),h=l.useRef(0),x=a??c.disableHoverableContent,m=i??c.delayDuration,g=l.useRef(!1),[y,b]=de({prop:n,defaultProp:o??!1,onChange:k=>{k?(c.onOpen(),document.dispatchEvent(new CustomEvent(sn))):c.onClose(),s?.(k)},caller:Ct}),w=l.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),S=l.useCallback(()=>{window.clearTimeout(h.current),h.current=0,g.current=!1,b(!0)},[b]),P=l.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b(!1)},[b]),N=l.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{g.current=!0,b(!0),h.current=0},m)},[m,b]);return l.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),d.jsx(Cn,{...u,children:d.jsx(ug,{scope:t,contentId:v,open:y,stateAttribute:w,trigger:f,onTriggerChange:p,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayedRef.current?N():S()},[c.isOpenDelayedRef,N,S]),onTriggerLeave:l.useCallback(()=>{x?P():(window.clearTimeout(h.current),h.current=0)},[P,x]),onOpen:S,onClose:P,disableHoverableContent:x,children:r})})};Ki.displayName=Ct;var an="TooltipTrigger",Yi=l.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Tt(an,r),s=Wn(an,r),a=xr(r),i=l.useRef(null),c=ne(t,i,o.onTriggerChange),u=l.useRef(!1),f=l.useRef(!1),p=l.useCallback(()=>u.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),d.jsx(lr,{asChild:!0,...a,children:d.jsx(B.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:c,onPointerMove:G(e.onPointerMove,v=>{v.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:G(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:G(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:G(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:G(e.onBlur,o.onClose),onClick:G(e.onClick,o.onClose)})})});Yi.displayName=an;var Gn="TooltipPortal",[dg,fg]=br(Gn,{forceMount:void 0}),qi=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,s=Tt(Gn,t);return d.jsx(dg,{scope:t,forceMount:r,children:d.jsx(ke,{present:r||s.open,children:d.jsx(Pt,{asChild:!0,container:o,children:n})})})};qi.displayName=Gn;var st="TooltipContent",Xi=l.forwardRef((e,t)=>{const r=fg(st,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...s}=e,a=Tt(st,e.__scopeTooltip);return d.jsx(ke,{present:n||a.open,children:a.disableHoverableContent?d.jsx(Zi,{side:o,...s,ref:t}):d.jsx(pg,{side:o,...s,ref:t})})}),pg=l.forwardRef((e,t)=>{const r=Tt(st,e.__scopeTooltip),n=Wn(st,e.__scopeTooltip),o=l.useRef(null),s=ne(t,o),[a,i]=l.useState(null),{trigger:c,onClose:u}=r,f=o.current,{onPointerInTransitChange:p}=n,v=l.useCallback(()=>{i(null),p(!1)},[p]),h=l.useCallback((x,m)=>{const g=x.currentTarget,y={x:x.clientX,y:x.clientY},b=vg(y,g.getBoundingClientRect()),w=bg(y,b),S=xg(m.getBoundingClientRect()),P=wg([...w,...S]);i(P),p(!0)},[p]);return l.useEffect(()=>()=>v(),[v]),l.useEffect(()=>{if(c&&f){const x=g=>h(g,f),m=g=>h(g,c);return c.addEventListener("pointerleave",x),f.addEventListener("pointerleave",m),()=>{c.removeEventListener("pointerleave",x),f.removeEventListener("pointerleave",m)}}},[c,f,h,v]),l.useEffect(()=>{if(a){const x=m=>{const g=m.target,y={x:m.clientX,y:m.clientY},b=c?.contains(g)||f?.contains(g),w=!yg(y,a);b?v():w&&(v(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,f,a,u,v]),d.jsx(Zi,{...e,ref:s})}),[mg,gg]=br(Ct,{isInside:!1}),hg=Ac("TooltipContent"),Zi=l.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:a,...i}=e,c=Tt(st,r),u=xr(r),{onClose:f}=c;return l.useEffect(()=>(document.addEventListener(sn,f),()=>document.removeEventListener(sn,f)),[f]),l.useEffect(()=>{if(c.trigger){const p=v=>{v.target?.contains(c.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[c.trigger,f]),d.jsx(St,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:d.jsxs(Sn,{"data-state":c.stateAttribute,...u,...i,ref:t,style:{...i.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:[d.jsx(hg,{children:n}),d.jsx(mg,{scope:r,isInside:!0,children:d.jsx(wd,{id:c.contentId,role:"tooltip",children:o||n})})]})})});Xi.displayName=st;var Ji="TooltipArrow",Qi=l.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=xr(r);return gg(Ji,r).isInside?null:d.jsx(En,{...o,...n,ref:t})});Qi.displayName=Ji;function vg(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(r,n,o,s)){case s:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function bg(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function xg(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function yg(e,t){const{x:r,y:n}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],c=t[a],u=i.x,f=i.y,p=c.x,v=c.y;f>n!=v>n&&r<(p-u)*(n-f)/(v-f)+u&&(o=!o)}return o}function wg(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),Cg(t)}function Cg(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const s=r[r.length-1],a=r[r.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Sg=Ui,Eg=Ki,Pg=Yi,Rg=qi,kg=Xi,Ag=Qi;function el({delayDuration:e=0,...t}){return d.jsx(Sg,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function tl({...e}){return d.jsx(el,{children:d.jsx(Eg,{"data-slot":"tooltip",...e})})}function rl({...e}){return d.jsx(Pg,{"data-slot":"tooltip-trigger",...e})}function nl({className:e,sideOffset:t=0,children:r,...n}){return d.jsx(Rg,{children:d.jsxs(kg,{"data-slot":"tooltip-content",sideOffset:t,className:$("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance dark:bg-primary dark:text-primary-foreground",e),...n,children:[r,d.jsx(Ag,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] dark:bg-primary dark:fill-primary"})]})})}var yr="Collapsible",[Tg,ol]=pe(yr),[Ng,Hn]=Tg(yr),sl=l.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:s,onOpenChange:a,...i}=e,[c,u]=de({prop:n,defaultProp:o??!1,onChange:a,caller:yr});return d.jsx(Ng,{scope:r,disabled:s,contentId:ae(),open:c,onOpenToggle:l.useCallback(()=>u(f=>!f),[u]),children:d.jsx(B.div,{"data-state":Kn(c),"data-disabled":s?"":void 0,...i,ref:t})})});sl.displayName=yr;var al="CollapsibleTrigger",il=l.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=Hn(al,r);return d.jsx(B.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Kn(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:G(e.onClick,o.onOpenToggle)})});il.displayName=al;var Un="CollapsibleContent",ll=l.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Hn(Un,e.__scopeCollapsible);return d.jsx(ke,{present:r||o.open,children:({present:s})=>d.jsx(Ig,{...n,ref:t,present:s})})});ll.displayName=Un;var Ig=l.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...s}=e,a=Hn(Un,r),[i,c]=l.useState(n),u=l.useRef(null),f=ne(t,u),p=l.useRef(0),v=p.current,h=l.useRef(0),x=h.current,m=a.open||i,g=l.useRef(m),y=l.useRef(void 0);return l.useEffect(()=>{const b=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(b)},[]),ie(()=>{const b=u.current;if(b){y.current=y.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const w=b.getBoundingClientRect();p.current=w.height,h.current=w.width,g.current||(b.style.transitionDuration=y.current.transitionDuration,b.style.animationName=y.current.animationName),c(n)}},[a.open,n]),d.jsx(B.div,{"data-state":Kn(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m,...s,ref:f,style:{"--radix-collapsible-content-height":v?`${v}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...e.style},children:m&&o})});function Kn(e){return e?"open":"closed"}var Og=sl,_g=il,jg=ll,be="Accordion",Mg=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Yn,Dg,Fg]=dn(be),[wr,Uh]=pe(be,[Fg,ol]),qn=ol(),cl=O.forwardRef((e,t)=>{const{type:r,...n}=e,o=n,s=n;return d.jsx(Yn.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?d.jsx(Bg,{...s,ref:t}):d.jsx(Vg,{...o,ref:t})})});cl.displayName=be;var[ul,Lg]=wr(be),[dl,$g]=wr(be,{collapsible:!1}),Vg=O.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:s=!1,...a}=e,[i,c]=de({prop:r,defaultProp:n??"",onChange:o,caller:be});return d.jsx(ul,{scope:e.__scopeAccordion,value:O.useMemo(()=>i?[i]:[],[i]),onItemOpen:c,onItemClose:O.useCallback(()=>s&&c(""),[s,c]),children:d.jsx(dl,{scope:e.__scopeAccordion,collapsible:s,children:d.jsx(fl,{...a,ref:t})})})}),Bg=O.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...s}=e,[a,i]=de({prop:r,defaultProp:n??[],onChange:o,caller:be}),c=O.useCallback(f=>i((p=[])=>[...p,f]),[i]),u=O.useCallback(f=>i((p=[])=>p.filter(v=>v!==f)),[i]);return d.jsx(ul,{scope:e.__scopeAccordion,value:a,onItemOpen:c,onItemClose:u,children:d.jsx(dl,{scope:e.__scopeAccordion,collapsible:!0,children:d.jsx(fl,{...s,ref:t})})})}),[zg,Cr]=wr(be),fl=O.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:o,orientation:s="vertical",...a}=e,i=O.useRef(null),c=ne(i,t),u=Dg(r),p=nr(o)==="ltr",v=G(e.onKeyDown,h=>{if(!Mg.includes(h.key))return;const x=h.target,m=u().filter(R=>!R.ref.current?.disabled),g=m.findIndex(R=>R.ref.current===x),y=m.length;if(g===-1)return;h.preventDefault();let b=g;const w=0,S=y-1,P=()=>{b=g+1,b>S&&(b=w)},N=()=>{b=g-1,b<w&&(b=S)};switch(h.key){case"Home":b=w;break;case"End":b=S;break;case"ArrowRight":s==="horizontal"&&(p?P():N());break;case"ArrowDown":s==="vertical"&&P();break;case"ArrowLeft":s==="horizontal"&&(p?N():P());break;case"ArrowUp":s==="vertical"&&N();break}const k=b%y;m[k].ref.current?.focus()});return d.jsx(zg,{scope:r,disabled:n,direction:o,orientation:s,children:d.jsx(Yn.Slot,{scope:r,children:d.jsx(B.div,{...a,"data-orientation":s,ref:c,onKeyDown:n?void 0:v})})})}),Zt="AccordionItem",[Wg,Xn]=wr(Zt),pl=O.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...o}=e,s=Cr(Zt,r),a=Lg(Zt,r),i=qn(r),c=ae(),u=n&&a.value.includes(n)||!1,f=s.disabled||e.disabled;return d.jsx(Wg,{scope:r,open:u,disabled:f,triggerId:c,children:d.jsx(Og,{"data-orientation":s.orientation,"data-state":xl(u),...i,...o,ref:t,disabled:f,open:u,onOpenChange:p=>{p?a.onItemOpen(n):a.onItemClose(n)}})})});pl.displayName=Zt;var ml="AccordionHeader",gl=O.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Cr(be,r),s=Xn(ml,r);return d.jsx(B.h3,{"data-orientation":o.orientation,"data-state":xl(s.open),"data-disabled":s.disabled?"":void 0,...n,ref:t})});gl.displayName=ml;var ln="AccordionTrigger",hl=O.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Cr(be,r),s=Xn(ln,r),a=$g(ln,r),i=qn(r);return d.jsx(Yn.ItemSlot,{scope:r,children:d.jsx(_g,{"aria-disabled":s.open&&!a.collapsible||void 0,"data-orientation":o.orientation,id:s.triggerId,...i,...n,ref:t})})});hl.displayName=ln;var vl="AccordionContent",bl=O.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Cr(be,r),s=Xn(vl,r),a=qn(r);return d.jsx(jg,{role:"region","aria-labelledby":s.triggerId,"data-orientation":o.orientation,...a,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});bl.displayName=vl;function xl(e){return e?"open":"closed"}var Gg=cl,Hg=pl,Ug=gl,Kg=hl,Yg=bl;function qg({...e}){return d.jsx(Gg,{"data-slot":"accordion",...e})}function Xg({className:e,...t}){return d.jsx(Hg,{"data-slot":"accordion-item",className:$("border-b last:border-b-0 dark:border-border",e),...t})}function Zg({className:e,children:t,...r}){return d.jsx(Ug,{className:"flex",children:d.jsxs(Kg,{"data-slot":"accordion-trigger",className:$("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium text-foreground transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180 dark:text-foreground dark:focus-visible:border-ring dark:focus-visible:ring-ring/50",e),...r,children:[t,d.jsx(kn,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200 dark:text-muted-foreground"})]})})}function Jg({className:e,children:t,...r}){return d.jsx(Yg,{"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-foreground dark:text-foreground",...r,children:d.jsx("div",{className:$("pt-0 pb-4",e),children:t})})}var Qg=e=>e.type==="checkbox",xt=e=>e instanceof Date,Zn=e=>e==null;const yl=e=>typeof e=="object";var Ke=e=>!Zn(e)&&!Array.isArray(e)&&yl(e)&&!xt(e),eh=e=>Ke(e)&&e.target?Qg(e.target)?e.target.checked:e.target.value:e,th=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,rh=(e,t)=>e.has(th(t)),nh=e=>{const t=e.constructor&&e.constructor.prototype;return Ke(t)&&t.hasOwnProperty("isPrototypeOf")},oh=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function wl(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(oh&&(e instanceof Blob||n))&&(r||Ke(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!nh(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=wl(e[o]));else return e;return t}var Cl=e=>/^\w*$/.test(e),cn=e=>e===void 0,sh=e=>Array.isArray(e)?e.filter(Boolean):[],Sl=e=>sh(e.replace(/["|']|\]/g,"").split(/\.|\[/)),le=(e,t,r)=>{if(!t||!Ke(e))return r;const n=(Cl(t)?[t]:Sl(t)).reduce((o,s)=>Zn(o)?o:o[s],e);return cn(n)||n===e?cn(e[t])?r:e[t]:n},zr=e=>typeof e=="boolean",Bo=(e,t,r)=>{let n=-1;const o=Cl(t)?[t]:Sl(t),s=o.length,a=s-1;for(;++n<s;){const i=o[n];let c=r;if(n!==a){const u=e[i];c=Ke(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}if(i==="__proto__"||i==="constructor"||i==="prototype")return;e[i]=c,e=e[i]}};const zo={BLUR:"blur",CHANGE:"change"},Wo={all:"all"},Jn=O.createContext(null);Jn.displayName="HookFormContext";const Nt=()=>O.useContext(Jn),ah=e=>{const{children:t,...r}=e;return O.createElement(Jn.Provider,{value:r},t)};var ih=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(o,s,{get:()=>{const a=s;return t._proxyFormState[a]!==Wo.all&&(t._proxyFormState[a]=!n||Wo.all),r&&(r[a]=!0),e[a]}});return o};const El=typeof window<"u"?O.useLayoutEffect:O.useEffect;function Pl(e){const t=Nt(),{control:r=t.control,disabled:n,name:o,exact:s}=e||{},[a,i]=O.useState(r._formState),c=O.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return El(()=>r._subscribe({name:o,formState:c.current,exact:s,callback:u=>{!n&&i({...r._formState,...u})}}),[o,n,s]),O.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),O.useMemo(()=>ih(a,r,c.current,!1),[a,r])}var lh=e=>typeof e=="string",ch=(e,t,r,n,o)=>lh(e)?le(r,e,o):Array.isArray(e)?e.map(s=>le(r,s)):r,Go=e=>Zn(e)||!yl(e);function Rl(e,t,r=new WeakSet){if(Go(e)||Go(t))return e===t;if(xt(e)&&xt(t))return e.getTime()===t.getTime();const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const s of n){const a=e[s];if(!o.includes(s))return!1;if(s!=="ref"){const i=t[s];if(xt(a)&&xt(i)||Ke(a)&&Ke(i)||Array.isArray(a)&&Array.isArray(i)?!Rl(a,i,r):a!==i)return!1}}return!0}function uh(e){const t=Nt(),{control:r=t.control,name:n,defaultValue:o,disabled:s,exact:a,compute:i}=e||{},c=O.useRef(o),u=O.useRef(i),f=O.useRef(void 0);u.current=i;const p=O.useMemo(()=>r._getWatch(n,c.current),[r,n]),[v,h]=O.useState(u.current?u.current(p):p);return El(()=>r._subscribe({name:n,formState:{values:!0},exact:a,callback:x=>{if(!s){const m=ch(n,r._names,x.values||r._formValues,!1,c.current);if(u.current){const g=u.current(m);Rl(g,f.current)||(h(g),f.current=g)}else h(m)}}}),[r,s,n,a]),O.useEffect(()=>r._removeUnmounted()),v}function dh(e){const t=Nt(),{name:r,disabled:n,control:o=t.control,shouldUnregister:s,defaultValue:a}=e,i=rh(o._names.array,r),c=O.useMemo(()=>le(o._formValues,r,le(o._defaultValues,r,a)),[o,r,a]),u=uh({control:o,name:r,defaultValue:c,exact:!0}),f=Pl({control:o,name:r,exact:!0}),p=O.useRef(e),v=O.useRef(o.register(r,{...e.rules,value:u,...zr(e.disabled)?{disabled:e.disabled}:{}}));p.current=e;const h=O.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!le(f.errors,r)},isDirty:{enumerable:!0,get:()=>!!le(f.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!le(f.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!le(f.validatingFields,r)},error:{enumerable:!0,get:()=>le(f.errors,r)}}),[f,r]),x=O.useCallback(b=>v.current.onChange({target:{value:eh(b),name:r},type:zo.CHANGE}),[r]),m=O.useCallback(()=>v.current.onBlur({target:{value:le(o._formValues,r),name:r},type:zo.BLUR}),[r,o._formValues]),g=O.useCallback(b=>{const w=le(o._fields,r);w&&b&&(w._f.ref={focus:()=>b.focus&&b.focus(),select:()=>b.select&&b.select(),setCustomValidity:S=>b.setCustomValidity(S),reportValidity:()=>b.reportValidity()})},[o._fields,r]),y=O.useMemo(()=>({name:r,value:u,...zr(n)||f.disabled?{disabled:f.disabled||n}:{},onChange:x,onBlur:m,ref:g}),[r,n,f.disabled,x,m,g,u]);return O.useEffect(()=>{const b=o._options.shouldUnregister||s;o.register(r,{...p.current.rules,...zr(p.current.disabled)?{disabled:p.current.disabled}:{}});const w=(S,P)=>{const N=le(o._fields,S);N&&N._f&&(N._f.mount=P)};if(w(r,!0),b){const S=wl(le(o._options.defaultValues,r));Bo(o._defaultValues,r,S),cn(le(o._formValues,r))&&Bo(o._formValues,r,S)}return!i&&o.register(r),()=>{(i?b&&!o._state.action:b)?o.unregister(r):w(r,!1)}},[r,o,i,s]),O.useEffect(()=>{o._setDisabledField({disabled:n,name:r})},[n,r,o]),O.useMemo(()=>({field:y,formState:f,fieldState:h}),[y,f,h])}const fh=e=>e.render(dh(e)),kl=O.createContext(void 0),Al=e=>{const{methods:t,disabled:r,children:n}=e;return d.jsx(kl.Provider,{value:{disabled:r},children:d.jsx(ah,{...t,children:n})})},Tl=()=>{const e=O.useContext(kl),t=Nt();if(!e||!t)throw new Error("formContext must be used within a FormProvider");return{...e,...t}},ph=({type:e="button",...t})=>{const r=()=>e==="submit"||e==="reset"?"default":"outline";return d.jsx(rr,{type:e,variant:r(),...t})};var Nl={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Ho=O.createContext&&O.createContext(Nl),mh=["attr","size","title"];function gh(e,t){if(e==null)return{};var r=hh(e,t),n,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)n=s[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function hh(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Jt(){return Jt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jt.apply(this,arguments)}function Uo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Qt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Uo(Object(r),!0).forEach(function(n){vh(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uo(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vh(e,t,r){return t=bh(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bh(e){var t=xh(e,"string");return typeof t=="symbol"?t:t+""}function xh(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Il(e){return e&&e.map((t,r)=>O.createElement(t.tag,Qt({key:r},t.attr),Il(t.child)))}function yh(e){return t=>O.createElement(wh,Jt({attr:Qt({},e.attr)},t),Il(e.child))}function wh(e){var t=r=>{var{attr:n,size:o,title:s}=e,a=gh(e,mh),i=o||r.size||"1em",c;return r.className&&(c=r.className),e.className&&(c=(c?c+" ":"")+e.className),O.createElement("svg",Jt({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,a,{className:c,style:Qt(Qt({color:e.color||r.color},r.style),e.style),height:i,width:i,xmlns:"http://www.w3.org/2000/svg"}),s&&O.createElement("title",null,s),e.children)};return Ho!==void 0?O.createElement(Ho.Consumer,null,r=>t(r)):t(Nl)}function Ch(e){return yh({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Circle_Info"},child:[{tag:"g",attr:{},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M11.5,15a.5.5,0,0,0,1,0h0V10.981a.5.5,0,0,0-1,0Z"},child:[]},{tag:"circle",attr:{cx:"12",cy:"8.999",r:"0.5"},child:[]}]},{tag:"path",attr:{d:"M12,2.065A9.934,9.934,0,1,1,2.066,12,9.945,9.945,0,0,1,12,2.065Zm0,18.867A8.934,8.934,0,1,0,3.066,12,8.944,8.944,0,0,0,12,20.932Z"},child:[]}]}]}]})(e)}var Sh="Label",Ol=l.forwardRef((e,t)=>d.jsx(B.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));Ol.displayName=Sh;var Eh=Ol;function Ph({className:e,...t}){return d.jsx(Eh,{"data-slot":"label",className:$("flex items-center text-purple-mutted-300 gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const _l=l.createContext({}),Rh=({...e})=>d.jsx(_l.Provider,{value:{name:e.name},children:d.jsx(fh,{...e})}),Sr=()=>{const e=l.useContext(_l),t=l.useContext(jl),{getFieldState:r}=Nt(),n=Pl({name:e.name}),o=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:s}=t;return{id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...o}},jl=l.createContext({});function kh({className:e,...t}){const r=l.useId();return d.jsx(jl.Provider,{value:{id:r},children:d.jsx("div",{"data-slot":"form-item",className:$("grid gap-2",e),...t})})}function Ah({className:e,...t}){const{error:r,formItemId:n}=Sr();return d.jsx(Ph,{"data-slot":"form-label","data-error":!!r,className:$("data-[error=true]:text-destructive font-normal text-sm",e),htmlFor:n,...t})}function Th({...e}){const{error:t,formItemId:r,formDescriptionId:n,formMessageId:o}=Sr();return d.jsx(ls,{"data-slot":"form-control",id:r,"aria-describedby":t?`${n} ${o}`:`${n}`,"aria-invalid":!!t,...e})}function Nh({className:e,...t}){const{formDescriptionId:r}=Sr();return d.jsx("p",{"data-slot":"form-description",id:r,className:$("text-purple-mutted-300 text-sm",e),...t})}function Ih({className:e,...t}){const{error:r,formMessageId:n}=Sr(),o=r?String(r?.message??""):t.children;return o?d.jsx("p",{"data-slot":"form-message",id:n,className:$("text-destructive text-sm",e),...t,children:o}):null}const Qn=e=>t=>{const{name:r,label:n,description:o,tooltip:s,...a}=t,{control:i,disabled:c}=Tl(),u=()=>s?d.jsxs(tl,{children:[d.jsx(rl,{asChild:!0,children:d.jsx(Ch,{size:16})}),d.jsx(nl,{children:d.jsx("p",{children:s})})]}):d.jsx(d.Fragment,{}),f=()=>o?d.jsx(Nh,{children:o}):d.jsx(d.Fragment,{});return d.jsx(Rh,{control:i,name:r,render:({field:p})=>d.jsxs(kh,{className:"flex flex-col gap-1.5",children:[n&&d.jsx(Ah,{children:d.jsxs("span",{className:"flex items-center gap-1",children:[n,!!s&&u()]})}),d.jsx(Th,{children:d.jsx(e,{...p,...a,disabled:c})}),!!o&&f(),d.jsx(Ih,{})]})})},Oh=Qn(is),Ml=O.forwardRef(({options:e,placeholder:t,value:r,onChange:n,disabled:o},s)=>{const a=c=>{n&&n({target:{value:c}})},i=c=>d.jsx(On,{value:c.value,disabled:c.disabled,children:c.label},c.value);return d.jsxs(Na,{value:r,onValueChange:a,disabled:o,children:[d.jsx(An,{ref:s,children:d.jsx(Ia,{placeholder:t})}),d.jsx(In,{children:e.map(i)})]})});Ml.displayName="BaseSelectComponent";const _h=Qn(Ml),jh=O.forwardRef((e,t)=>{const{options:r=[],placeholder:n,value:o,onChange:s=()=>{},disabled:a,searchPlaceholder:i,emptyText:c}=e,u=f=>{s({target:{value:f}})};return d.jsx(Ln,{ref:t,options:r,value:o,onValueChange:u,placeholder:n,searchPlaceholder:i,emptyText:c,disabled:a})}),Mh=Qn(jh),Dh=e=>d.jsx("hr",{className:"w-full h-px border-purple-mutted-500",...e}),Fh=({children:e,description:t,className:r})=>d.jsxs("div",{className:$("space-y-1",r),children:[d.jsx("h2",{className:"flex items-center gap-2.5 text-2xl text-white",children:e}),t&&d.jsx("span",{className:"text-sm text-purple-mutted-300",children:t})]}),Ye=e=>{const{className:t,disabled:r=!1,methods:n,onSubmit:o=()=>{},...s}=e,{handleSubmit:a}=n,i=$("flex flex-col gap-6",{},t);return d.jsx(Al,{methods:n,disabled:r,children:d.jsx("form",{className:i,onSubmit:a(o),...s})})};Ye.Button=ph;Ye.Input=Oh;Ye.Select=_h;Ye.Combobox=Mh;Ye.Divider=Dh;Ye.Title=Fh;exports.Accordion=qg;exports.AccordionContent=Jg;exports.AccordionItem=Xg;exports.AccordionTrigger=Zg;exports.Badge=gm;exports.Button=rr;exports.Card=hm;exports.CardAction=ym;exports.CardContent=wm;exports.CardDescription=xm;exports.CardFooter=Cm;exports.CardHeader=vm;exports.CardTitle=bm;exports.Combobox=Ln;exports.Dialog=Fp;exports.DialogClose=$p;exports.DialogContent=Vp;exports.DialogDescription=Gp;exports.DialogFooter=zp;exports.DialogHeader=Bp;exports.DialogOverlay=ui;exports.DialogPortal=ci;exports.DialogTitle=Wp;exports.DialogTrigger=Lp;exports.Form=Ye;exports.FormProvider=Al;exports.Input=is;exports.Progress=Im;exports.Select=Na;exports.SelectContent=In;exports.SelectGroup=Zf;exports.SelectItem=On;exports.SelectLabel=Oa;exports.SelectScrollDownButton=Nn;exports.SelectScrollUpButton=Tn;exports.SelectSeparator=_a;exports.SelectTrigger=An;exports.SelectValue=Ia;exports.Skeleton=Om;exports.Switch=$m;exports.Toggle=Bm;exports.ToggleGroup=ag;exports.ToggleGroupItem=ig;exports.Tooltip=tl;exports.TooltipContent=nl;exports.TooltipProvider=el;exports.TooltipTrigger=rl;exports.borderRadius=Ll;exports.cn=$;exports.colors=Dl;exports.spacing=Fl;exports.typography=$l;exports.useFormContext=Tl;
|
|
102
122
|
//# sourceMappingURL=index.cjs.js.map
|