UNPKG

@uhcougarnet/ui

Version:

UH Components Library

81 lines 439 kB
(function(_,$){typeof exports=="object"&&typeof module<"u"?$(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],$):(_=typeof globalThis<"u"?globalThis:_||self,$(_["uh-ui"]={},_["react/jsx-runtime"],_.React,_.ReactDOM))})(this,function(_,$,i,ze){"use strict";function dc(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const x=dc(i),kh=dc(ze);function C(){return C=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)({}).hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},C.apply(null,arguments)}function Fh(e,n){const t=i.createContext(n);function o(a){const{children:s,...c}=a,l=i.useMemo(()=>c,Object.values(c));return i.createElement(t.Provider,{value:l},s)}function r(a){const s=i.useContext(t);if(s)return s;if(n!==void 0)return n;throw new Error(`\`${a}\` must be used within \`${e}\``)}return o.displayName=e+"Provider",[o,r]}function pe(e,n=[]){let t=[];function o(a,s){const c=i.createContext(s),l=t.length;t=[...t,s];function d(f){const{scope:g,children:p,...v}=f,m=(g==null?void 0:g[e][l])||c,h=i.useMemo(()=>v,Object.values(v));return i.createElement(m.Provider,{value:h},p)}function u(f,g){const p=(g==null?void 0:g[e][l])||c,v=i.useContext(p);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${a}\``)}return d.displayName=a+"Provider",[d,u]}const r=()=>{const a=t.map(s=>i.createContext(s));return function(c){const l=(c==null?void 0:c[e])||a;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return r.scopeName=e,[o,Lh(r,...n)]}function Lh(...e){const n=e[0];if(e.length===1)return n;const t=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(a){const s=o.reduce((c,{useScope:l,scopeName:d})=>{const f=l(a)[`__scope${d}`];return{...c,...f}},{});return i.useMemo(()=>({[`__scope${n.scopeName}`]:s}),[s])}};return t.scopeName=n.scopeName,t}function Vh(e,n){typeof e=="function"?e(n):e!=null&&(e.current=n)}function Cn(...e){return n=>e.forEach(t=>Vh(t,n))}function q(...e){return i.useCallback(Cn(...e),e)}const Xe=i.forwardRef((e,n)=>{const{children:t,...o}=e,r=i.Children.toArray(t),a=r.find(Hh);if(a){const s=a.props.children,c=r.map(l=>l===a?i.Children.count(s)>1?i.Children.only(null):i.isValidElement(s)?s.props.children:null:l);return i.createElement(Vr,C({},o,{ref:n}),i.isValidElement(s)?i.cloneElement(s,void 0,c):null)}return i.createElement(Vr,C({},o,{ref:n}),t)});Xe.displayName="Slot";const Vr=i.forwardRef((e,n)=>{const{children:t,...o}=e;return i.isValidElement(t)?i.cloneElement(t,{...zh(o,t.props),ref:n?Cn(n,t.ref):t.ref}):i.Children.count(t)>1?i.Children.only(null):null});Vr.displayName="SlotClone";const Hr=({children:e})=>i.createElement(i.Fragment,null,e);function Hh(e){return i.isValidElement(e)&&e.type===Hr}function zh(e,n){const t={...n};for(const o in n){const r=e[o],a=n[o];/^on[A-Z]/.test(o)?r&&a?t[o]=(...c)=>{a(...c),r(...c)}:r&&(t[o]=r):o==="style"?t[o]={...r,...a}:o==="className"&&(t[o]=[r,a].filter(Boolean).join(" "))}return{...e,...t}}function at(e){const n=e+"CollectionProvider",[t,o]=pe(n),[r,a]=t(n,{collectionRef:{current:null},itemMap:new Map}),s=p=>{const{scope:v,children:m}=p,h=i.useRef(null),b=i.useRef(new Map).current;return i.createElement(r,{scope:v,itemMap:b,collectionRef:h},m)},c=e+"CollectionSlot",l=i.forwardRef((p,v)=>{const{scope:m,children:h}=p,b=a(c,m),w=q(v,b.collectionRef);return i.createElement(Xe,{ref:w},h)}),d=e+"CollectionItemSlot",u="data-radix-collection-item",f=i.forwardRef((p,v)=>{const{scope:m,children:h,...b}=p,w=i.useRef(null),y=q(v,w),S=a(d,m);return i.useEffect(()=>(S.itemMap.set(w,{ref:w,...b}),()=>void S.itemMap.delete(w))),i.createElement(Xe,{[u]:"",ref:y},h)});function g(p){const v=a(e+"CollectionConsumer",p);return i.useCallback(()=>{const h=v.collectionRef.current;if(!h)return[];const b=Array.from(h.querySelectorAll(`[${u}]`));return Array.from(v.itemMap.values()).sort((S,E)=>b.indexOf(S.ref.current)-b.indexOf(E.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:l,ItemSlot:f},g,o]}function T(e,n,{checkForDefaultPrevented:t=!0}={}){return function(r){if(e==null||e(r),t===!1||!r.defaultPrevented)return n==null?void 0:n(r)}}function ce(e){const n=i.useRef(e);return i.useEffect(()=>{n.current=e}),i.useMemo(()=>(...t)=>{var o;return(o=n.current)===null||o===void 0?void 0:o.call(n,...t)},[])}function ve({prop:e,defaultProp:n,onChange:t=()=>{}}){const[o,r]=Bh({defaultProp:n,onChange:t}),a=e!==void 0,s=a?e:o,c=ce(t),l=i.useCallback(d=>{if(a){const f=typeof d=="function"?d(e):d;f!==e&&c(f)}else r(d)},[a,e,r,c]);return[s,l]}function Bh({defaultProp:e,onChange:n}){const t=i.useState(e),[o]=t,r=i.useRef(o),a=ce(n);return i.useEffect(()=>{r.current!==o&&(a(o),r.current=o)},[o,r,a]),t}const B=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,n)=>{const t=i.forwardRef((o,r)=>{const{asChild:a,...s}=o,c=a?Xe:n;return i.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),i.createElement(c,C({},s,{ref:r}))});return t.displayName=`Primitive.${n}`,{...e,[n]:t}},{});function Sn(e,n){e&&ze.flushSync(()=>e.dispatchEvent(n))}const we=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{};function Gh(e,n){return i.useReducer((t,o)=>{const r=n[t][o];return r??t},e)}const he=e=>{const{present:n,children:t}=e,o=Wh(n),r=typeof t=="function"?t({present:o.isPresent}):i.Children.only(t),a=q(o.ref,r.ref);return typeof t=="function"||o.isPresent?i.cloneElement(r,{ref:a}):null};he.displayName="Presence";function Wh(e){const[n,t]=i.useState(),o=i.useRef({}),r=i.useRef(e),a=i.useRef("none"),s=e?"mounted":"unmounted",[c,l]=Gh(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const d=So(o.current);a.current=c==="mounted"?d:"none"},[c]),we(()=>{const d=o.current,u=r.current;if(u!==e){const g=a.current,p=So(d);e?l("MOUNT"):p==="none"||(d==null?void 0:d.display)==="none"?l("UNMOUNT"):l(u&&g!==p?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),we(()=>{if(n){const d=f=>{const p=So(o.current).includes(f.animationName);f.target===n&&p&&ze.flushSync(()=>l("ANIMATION_END"))},u=f=>{f.target===n&&(a.current=So(o.current))};return n.addEventListener("animationstart",u),n.addEventListener("animationcancel",d),n.addEventListener("animationend",d),()=>{n.removeEventListener("animationstart",u),n.removeEventListener("animationcancel",d),n.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[n,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:i.useCallback(d=>{d&&(o.current=getComputedStyle(d)),t(d)},[])}}function So(e){return(e==null?void 0:e.animationName)||"none"}const Kh=x.useId||(()=>{});let Uh=0;function ye(e){const[n,t]=x.useState(Kh());return we(()=>{e||t(o=>o??String(Uh++))},[e]),e||(n?`radix-${n}`:"")}const uc="Collapsible",[jh,fc]=pe(uc),[Yh,zr]=jh(uc),Rh=i.forwardRef((e,n)=>{const{__scopeCollapsible:t,open:o,defaultOpen:r,disabled:a,onOpenChange:s,...c}=e,[l=!1,d]=ve({prop:o,defaultProp:r,onChange:s});return i.createElement(Yh,{scope:t,disabled:a,contentId:ye(),open:l,onOpenToggle:i.useCallback(()=>d(u=>!u),[d])},i.createElement(B.div,C({"data-state":Br(l),"data-disabled":a?"":void 0},c,{ref:n})))}),qh="CollapsibleTrigger",pc=i.forwardRef((e,n)=>{const{__scopeCollapsible:t,...o}=e,r=zr(qh,t);return i.createElement(B.button,C({type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":Br(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled},o,{ref:n,onClick:T(e.onClick,r.onOpenToggle)}))}),gc="CollapsibleContent",mc=i.forwardRef((e,n)=>{const{forceMount:t,...o}=e,r=zr(gc,e.__scopeCollapsible);return i.createElement(he,{present:t||r.open},({present:a})=>i.createElement(Xh,C({},o,{ref:n,present:a})))}),Xh=i.forwardRef((e,n)=>{const{__scopeCollapsible:t,present:o,children:r,...a}=e,s=zr(gc,t),[c,l]=i.useState(o),d=i.useRef(null),u=q(n,d),f=i.useRef(0),g=f.current,p=i.useRef(0),v=p.current,m=s.open||c,h=i.useRef(m),b=i.useRef();return i.useEffect(()=>{const w=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(w)},[]),we(()=>{const w=d.current;if(w){b.current=b.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const y=w.getBoundingClientRect();f.current=y.height,p.current=y.width,h.current||(w.style.transitionDuration=b.current.transitionDuration,w.style.animationName=b.current.animationName),l(o)}},[s.open,o]),i.createElement(B.div,C({"data-state":Br(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!m},a,{ref:u,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style}}),m&&r)});function Br(e){return e?"open":"closed"}const vc=Rh,Qh=pc,Zh=mc,Jh=i.createContext(void 0);function Be(e){const n=i.useContext(Jh);return e||n||"ltr"}const bt="Accordion",eb=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Gr,tb,nb]=at(bt),[Eo,BM]=pe(bt,[nb,fc]),Wr=fc(),hc=i.forwardRef((e,n)=>{const{type:t,...o}=e,r=o,a=o;return i.createElement(Gr.Provider,{scope:e.__scopeAccordion},t==="multiple"?i.createElement(sb,C({},a,{ref:n})):i.createElement(ab,C({},r,{ref:n})))});hc.propTypes={type(e){const n=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):e.type==="multiple"&&typeof n=="string"?new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):e.type==="single"&&Array.isArray(n)?new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};const[bc,ob]=Eo(bt),[$c,rb]=Eo(bt,{collapsible:!1}),ab=i.forwardRef((e,n)=>{const{value:t,defaultValue:o,onValueChange:r=()=>{},collapsible:a=!1,...s}=e,[c,l]=ve({prop:t,defaultProp:o,onChange:r});return i.createElement(bc,{scope:e.__scopeAccordion,value:c?[c]:[],onItemOpen:l,onItemClose:i.useCallback(()=>a&&l(""),[a,l])},i.createElement($c,{scope:e.__scopeAccordion,collapsible:a},i.createElement(wc,C({},s,{ref:n}))))}),sb=i.forwardRef((e,n)=>{const{value:t,defaultValue:o,onValueChange:r=()=>{},...a}=e,[s=[],c]=ve({prop:t,defaultProp:o,onChange:r}),l=i.useCallback(u=>c((f=[])=>[...f,u]),[c]),d=i.useCallback(u=>c((f=[])=>f.filter(g=>g!==u)),[c]);return i.createElement(bc,{scope:e.__scopeAccordion,value:s,onItemOpen:l,onItemClose:d},i.createElement($c,{scope:e.__scopeAccordion,collapsible:!0},i.createElement(wc,C({},a,{ref:n}))))}),[ib,_o]=Eo(bt),wc=i.forwardRef((e,n)=>{const{__scopeAccordion:t,disabled:o,dir:r,orientation:a="vertical",...s}=e,c=i.useRef(null),l=q(c,n),d=tb(t),f=Be(r)==="ltr",g=T(e.onKeyDown,p=>{var v;if(!eb.includes(p.key))return;const m=p.target,h=d().filter(D=>{var F;return!((F=D.ref.current)!==null&&F!==void 0&&F.disabled)}),b=h.findIndex(D=>D.ref.current===m),w=h.length;if(b===-1)return;p.preventDefault();let y=b;const S=0,E=w-1,M=()=>{y=b+1,y>E&&(y=S)},P=()=>{y=b-1,y<S&&(y=E)};switch(p.key){case"Home":y=S;break;case"End":y=E;break;case"ArrowRight":a==="horizontal"&&(f?M():P());break;case"ArrowDown":a==="vertical"&&M();break;case"ArrowLeft":a==="horizontal"&&(f?P():M());break;case"ArrowUp":a==="vertical"&&P();break}const O=y%w;(v=h[O].ref.current)===null||v===void 0||v.focus()});return i.createElement(ib,{scope:t,disabled:o,direction:r,orientation:a},i.createElement(Gr.Slot,{scope:t},i.createElement(B.div,C({},s,{"data-orientation":a,ref:l,onKeyDown:o?void 0:g}))))}),Kr="AccordionItem",[cb,Ur]=Eo(Kr),lb=i.forwardRef((e,n)=>{const{__scopeAccordion:t,value:o,...r}=e,a=_o(Kr,t),s=ob(Kr,t),c=Wr(t),l=ye(),d=o&&s.value.includes(o)||!1,u=a.disabled||e.disabled;return i.createElement(cb,{scope:t,open:d,disabled:u,triggerId:l},i.createElement(vc,C({"data-orientation":a.orientation,"data-state":xc(d)},c,r,{ref:n,disabled:u,open:d,onOpenChange:f=>{f?s.onItemOpen(o):s.onItemClose(o)}})))}),db="AccordionHeader",ub=i.forwardRef((e,n)=>{const{__scopeAccordion:t,...o}=e,r=_o(bt,t),a=Ur(db,t);return i.createElement(B.h3,C({"data-orientation":r.orientation,"data-state":xc(a.open),"data-disabled":a.disabled?"":void 0},o,{ref:n}))}),yc="AccordionTrigger",fb=i.forwardRef((e,n)=>{const{__scopeAccordion:t,...o}=e,r=_o(bt,t),a=Ur(yc,t),s=rb(yc,t),c=Wr(t);return i.createElement(Gr.ItemSlot,{scope:t},i.createElement(Qh,C({"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":r.orientation,id:a.triggerId},c,o,{ref:n})))}),pb="AccordionContent",gb=i.forwardRef((e,n)=>{const{__scopeAccordion:t,...o}=e,r=_o(bt,t),a=Ur(pb,t),s=Wr(t);return i.createElement(Zh,C({role:"region","aria-labelledby":a.triggerId,"data-orientation":r.orientation},s,o,{ref:n,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}}))});function xc(e){return e?"open":"closed"}const mb=hc,vb=lb,hb=ub,Cc=fb,Sc=gb;/** * @license lucide-react v0.341.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var bb={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"};/** * @license lucide-react v0.341.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const $b=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),Ne=(e,n)=>{const t=i.forwardRef(({color:o="currentColor",size:r=24,strokeWidth:a=2,absoluteStrokeWidth:s,className:c="",children:l,...d},u)=>i.createElement("svg",{ref:u,...bb,width:r,height:r,stroke:o,strokeWidth:s?Number(a)*24/Number(r):a,className:["lucide",`lucide-${$b(e)}`,c].join(" "),...d},[...n.map(([f,g])=>i.createElement(f,g)),...Array.isArray(l)?l:[l]]));return t.displayName=`${e}`,t};/** * @license lucide-react v0.341.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ec=Ne("AlertCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** * @license lucide-react v0.341.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const wb=Ne("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** * @license lucide-react v0.341.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const yb=Ne("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** * @license lucide-react v0.341.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xb=Ne("CheckCircle2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** * @license lucide-react v0.341.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const En=Ne("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** * @license lucide-react v0.341.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Po=Ne("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** * @license lucide-react v0.341.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Cb=Ne("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** * @license lucide-react v0.341.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Mo=Ne("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** * @license lucide-react v0.341.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Sb=Ne("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** * @license lucide-react v0.341.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Do=Ne("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** * @license lucide-react v0.341.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Eb=Ne("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** * @license lucide-react v0.341.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _b=Ne("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** * @license lucide-react v0.341.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Pb=Ne("XCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** * @license lucide-react v0.341.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const jr=Ne("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function _c(e){var n,t,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(n=0;n<r;n++)e[n]&&(t=_c(e[n]))&&(o&&(o+=" "),o+=t)}else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function Mb(){for(var e,n,t=0,o="",r=arguments.length;t<r;t++)(e=arguments[t])&&(n=_c(e))&&(o&&(o+=" "),o+=n);return o}const Yr="-";function Db(e){const n=Tb(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:o}=e;function r(s){const c=s.split(Yr);return c[0]===""&&c.length!==1&&c.shift(),Pc(c,n)||Nb(s)}function a(s,c){const l=t[s]||[];return c&&o[s]?[...l,...o[s]]:l}return{getClassGroupId:r,getConflictingClassGroupIds:a}}function Pc(e,n){var s;if(e.length===0)return n.classGroupId;const t=e[0],o=n.nextPart.get(t),r=o?Pc(e.slice(1),o):void 0;if(r)return r;if(n.validators.length===0)return;const a=e.join(Yr);return(s=n.validators.find(({validator:c})=>c(a)))==null?void 0:s.classGroupId}const Mc=/^\[(.+)\]$/;function Nb(e){if(Mc.test(e)){const n=Mc.exec(e)[1],t=n==null?void 0:n.substring(0,n.indexOf(":"));if(t)return"arbitrary.."+t}}function Tb(e){const{theme:n,prefix:t}=e,o={nextPart:new Map,validators:[]};return Ib(Object.entries(e.classGroups),t).forEach(([a,s])=>{Rr(s,o,a,n)}),o}function Rr(e,n,t,o){e.forEach(r=>{if(typeof r=="string"){const a=r===""?n:Dc(n,r);a.classGroupId=t;return}if(typeof r=="function"){if(Ob(r)){Rr(r(o),n,t,o);return}n.validators.push({validator:r,classGroupId:t});return}Object.entries(r).forEach(([a,s])=>{Rr(s,Dc(n,a),t,o)})})}function Dc(e,n){let t=e;return n.split(Yr).forEach(o=>{t.nextPart.has(o)||t.nextPart.set(o,{nextPart:new Map,validators:[]}),t=t.nextPart.get(o)}),t}function Ob(e){return e.isThemeGetter}function Ib(e,n){return n?e.map(([t,o])=>{const r=o.map(a=>typeof a=="string"?n+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,c])=>[n+s,c])):a);return[t,r]}):e}function Ab(e){if(e<1)return{get:()=>{},set:()=>{}};let n=0,t=new Map,o=new Map;function r(a,s){t.set(a,s),n++,n>e&&(n=0,o=t,t=new Map)}return{get(a){let s=t.get(a);if(s!==void 0)return s;if((s=o.get(a))!==void 0)return r(a,s),s},set(a,s){t.has(a)?t.set(a,s):r(a,s)}}}const Nc="!";function kb(e){const n=e.separator,t=n.length===1,o=n[0],r=n.length;return function(s){const c=[];let l=0,d=0,u;for(let m=0;m<s.length;m++){let h=s[m];if(l===0){if(h===o&&(t||s.slice(m,m+r)===n)){c.push(s.slice(d,m)),d=m+r;continue}if(h==="/"){u=m;continue}}h==="["?l++:h==="]"&&l--}const f=c.length===0?s:s.substring(d),g=f.startsWith(Nc),p=g?f.substring(1):f,v=u&&u>d?u-d:void 0;return{modifiers:c,hasImportantModifier:g,baseClassName:p,maybePostfixModifierPosition:v}}}function Fb(e){if(e.length<=1)return e;const n=[];let t=[];return e.forEach(o=>{o[0]==="["?(n.push(...t.sort(),o),t=[]):t.push(o)}),n.push(...t.sort()),n}function Lb(e){return{cache:Ab(e.cacheSize),splitModifiers:kb(e),...Db(e)}}const Vb=/\s+/;function Hb(e,n){const{splitModifiers:t,getClassGroupId:o,getConflictingClassGroupIds:r}=n,a=new Set;return e.trim().split(Vb).map(s=>{const{modifiers:c,hasImportantModifier:l,baseClassName:d,maybePostfixModifierPosition:u}=t(s);let f=o(u?d.substring(0,u):d),g=!!u;if(!f){if(!u)return{isTailwindClass:!1,originalClassName:s};if(f=o(d),!f)return{isTailwindClass:!1,originalClassName:s};g=!1}const p=Fb(c).join(":");return{isTailwindClass:!0,modifierId:l?p+Nc:p,classGroupId:f,originalClassName:s,hasPostfixModifier:g}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:c,classGroupId:l,hasPostfixModifier:d}=s,u=c+l;return a.has(u)?!1:(a.add(u),r(l,d).forEach(f=>a.add(c+f)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function zb(){let e=0,n,t,o="";for(;e<arguments.length;)(n=arguments[e++])&&(t=Tc(n))&&(o&&(o+=" "),o+=t);return o}function Tc(e){if(typeof e=="string")return e;let n,t="";for(let o=0;o<e.length;o++)e[o]&&(n=Tc(e[o]))&&(t&&(t+=" "),t+=n);return t}function Bb(e,...n){let t,o,r,a=s;function s(l){const d=n.reduce((u,f)=>f(u),e());return t=Lb(d),o=t.cache.get,r=t.cache.set,a=c,c(l)}function c(l){const d=o(l);if(d)return d;const u=Hb(l,t);return r(l,u),u}return function(){return a(zb.apply(null,arguments))}}function be(e){const n=t=>t[e]||[];return n.isThemeGetter=!0,n}const Oc=/^\[(?:([a-z-]+):)?(.+)\]$/i,Gb=/^\d+\/\d+$/,Wb=new Set(["px","full","screen"]),Kb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ub=/\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$/,jb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Yb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Rb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function st(e){return It(e)||Wb.has(e)||Gb.test(e)}function $t(e){return Xt(e,"length",n0)}function It(e){return!!e&&!Number.isNaN(Number(e))}function No(e){return Xt(e,"number",It)}function _n(e){return!!e&&Number.isInteger(Number(e))}function qb(e){return e.endsWith("%")&&It(e.slice(0,-1))}function re(e){return Oc.test(e)}function wt(e){return Kb.test(e)}const Xb=new Set(["length","size","percentage"]);function Qb(e){return Xt(e,Xb,Ic)}function Zb(e){return Xt(e,"position",Ic)}const Jb=new Set(["image","url"]);function e0(e){return Xt(e,Jb,r0)}function t0(e){return Xt(e,"",o0)}function Pn(){return!0}function Xt(e,n,t){const o=Oc.exec(e);return o?o[1]?typeof n=="string"?o[1]===n:n.has(o[1]):t(o[2]):!1}function n0(e){return Ub.test(e)&&!jb.test(e)}function Ic(){return!1}function o0(e){return Yb.test(e)}function r0(e){return Rb.test(e)}function a0(){const e=be("colors"),n=be("spacing"),t=be("blur"),o=be("brightness"),r=be("borderColor"),a=be("borderRadius"),s=be("borderSpacing"),c=be("borderWidth"),l=be("contrast"),d=be("grayscale"),u=be("hueRotate"),f=be("invert"),g=be("gap"),p=be("gradientColorStops"),v=be("gradientColorStopPositions"),m=be("inset"),h=be("margin"),b=be("opacity"),w=be("padding"),y=be("saturate"),S=be("scale"),E=be("sepia"),M=be("skew"),P=be("space"),O=be("translate"),D=()=>["auto","contain","none"],F=()=>["auto","hidden","clip","visible","scroll"],K=()=>["auto",re,n],V=()=>[re,n],X=()=>["",st,$t],A=()=>["auto",It,re],G=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],R=()=>["solid","dashed","dotted","double","none"],k=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>["start","end","center","between","around","evenly","stretch"],z=()=>["","0",re],I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>[It,No],j=()=>[It,re];return{cacheSize:500,separator:":",theme:{colors:[Pn],spacing:[st,$t],blur:["none","",wt,re],brightness:H(),borderColor:[e],borderRadius:["none","","full",wt,re],borderSpacing:V(),borderWidth:X(),contrast:H(),grayscale:z(),hueRotate:j(),invert:z(),gap:V(),gradientColorStops:[e],gradientColorStopPositions:[qb,$t],inset:K(),margin:K(),opacity:H(),padding:V(),saturate:H(),scale:H(),sepia:z(),skew:j(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",re]}],container:["container"],columns:[{columns:[wt]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"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"],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:[...G(),re]}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],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:["auto",_n,re]}],basis:[{basis:K()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",re]}],grow:[{grow:z()}],shrink:[{shrink:z()}],order:[{order:["first","last","none",_n,re]}],"grid-cols":[{"grid-cols":[Pn]}],"col-start-end":[{col:["auto",{span:["full",_n,re]},re]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[Pn]}],"row-start-end":[{row:["auto",{span:[_n,re]},re]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",re]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",re]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...L()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...L(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...L(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[h]}],mx:[{mx:[h]}],my:[{my:[h]}],ms:[{ms:[h]}],me:[{me:[h]}],mt:[{mt:[h]}],mr:[{mr:[h]}],mb:[{mb:[h]}],ml:[{ml:[h]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",re,n]}],"min-w":[{"min-w":[re,n,"min","max","fit"]}],"max-w":[{"max-w":[re,n,"none","full","min","max","fit","prose",{screen:[wt]},wt]}],h:[{h:[re,n,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[re,n,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[re,n,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[re,n,"auto","min","max","fit"]}],"font-size":[{text:["base",wt,$t]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",No]}],"font-family":[{font:[Pn]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",re]}],"line-clamp":[{"line-clamp":["none",It,No]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",st,re]}],"list-image":[{"list-image":["none",re]}],"list-style-type":[{list:["none","disc","decimal",re]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...R(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",st,$t]}],"underline-offset":[{"underline-offset":["auto",st,re]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...G(),Zb]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Qb]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},e0]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...R(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:R()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[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:["",...R()]}],"outline-offset":[{"outline-offset":[st,re]}],"outline-w":[{outline:[st,$t]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[st,$t]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",wt,t0]}],"shadow-color":[{shadow:[Pn]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...k(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":k()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[o]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",wt,re]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[y]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",re]}],duration:[{duration:j()}],ease:[{ease:["linear","in","out","in-out",re]}],delay:[{delay:j()}],animate:[{animate:["none","spin","ping","pulse","bounce",re]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[_n,re]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",re]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",re]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"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",re]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[st,$t,No]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}}const s0=Bb(a0);function N(...e){return s0(Mb(e))}const i0=mb,Ac=x.forwardRef(({className:e,...n},t)=>$.jsx(vb,{ref:t,className:N("border-b",e),...n}));Ac.displayName="AccordionItem";const kc=x.forwardRef(({className:e,children:n,...t},o)=>$.jsx(hb,{className:"flex",children:$.jsxs(Cc,{ref:o,className:N("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...t,children:[n,$.jsx(Po,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));kc.displayName=Cc.displayName;const Fc=x.forwardRef(({className:e,children:n,...t},o)=>$.jsx(Sc,{ref:o,className:N("overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...t,children:$.jsx("div",{className:"pb-4 pt-0",children:n})}));Fc.displayName=Sc.displayName;function Lc(e){var n,t,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e))for(n=0;n<e.length;n++)e[n]&&(t=Lc(e[n]))&&(o&&(o+=" "),o+=t);else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function c0(){for(var e,n,t=0,o="";t<arguments.length;)(e=arguments[t++])&&(n=Lc(e))&&(o&&(o+=" "),o+=n);return o}const Vc=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Hc=c0,yt=(e,n)=>t=>{var o;if((n==null?void 0:n.variants)==null)return Hc(e,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:r,defaultVariants:a}=n,s=Object.keys(r).map(d=>{const u=t==null?void 0:t[d],f=a==null?void 0:a[d];if(u===null)return null;const g=Vc(u)||Vc(f);return r[d][g]}),c=t&&Object.entries(t).reduce((d,u)=>{let[f,g]=u;return g===void 0||(d[f]=g),d},{}),l=n==null||(o=n.compoundVariants)===null||o===void 0?void 0:o.reduce((d,u)=>{let{class:f,className:g,...p}=u;return Object.entries(p).every(v=>{let[m,h]=v;return Array.isArray(h)?h.includes({...a,...c}[m]):{...a,...c}[m]===h})?[...d,f,g]:d},[]);return Hc(e,s,l,t==null?void 0:t.class,t==null?void 0:t.className)},l0=yt("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),zc=x.forwardRef(({className:e,variant:n,...t},o)=>$.jsx("div",{ref:o,role:"alert",className:N(l0({variant:n}),e),...t}));zc.displayName="Alert";const Bc=x.forwardRef(({className:e,...n},t)=>$.jsx("h5",{ref:t,className:N("mb-1 font-medium leading-none tracking-tight",e),...n}));Bc.displayName="AlertTitle";const Gc=x.forwardRef(({className:e,...n},t)=>$.jsx("div",{ref:t,className:N("text-sm [&_p]:leading-relaxed",e),...n}));Gc.displayName="AlertDescription";function d0(e,n=globalThis==null?void 0:globalThis.document){const t=ce(e);i.useEffect(()=>{const o=r=>{r.key==="Escape"&&t(r)};return n.addEventListener("keydown",o),()=>n.removeEventListener("keydown",o)},[t,n])}const qr="dismissableLayer.update",u0="dismissableLayer.pointerDownOutside",f0="dismissableLayer.focusOutside";let Wc;const Kc=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xt=i.forwardRef((e,n)=>{var t;const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:c,onDismiss:l,...d}=e,u=i.useContext(Kc),[f,g]=i.useState(null),p=(t=f==null?void 0:f.ownerDocument)!==null&&t!==void 0?t:globalThis==null?void 0:globalThis.document,[,v]=i.useState({}),m=q(n,O=>g(O)),h=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=h.indexOf(b),y=f?h.indexOf(f):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,E=y>=w,M=g0(O=>{const D=O.target,F=[...u.branches].some(K=>K.contains(D));!E||F||(a==null||a(O),c==null||c(O),O.defaultPrevented||l==null||l())},p),P=m0(O=>{const D=O.target;[...u.branches].some(K=>K.contains(D))||(s==null||s(O),c==null||c(O),O.defaultPrevented||l==null||l())},p);return d0(O=>{y===u.layers.size-1&&(r==null||r(O),!O.defaultPrevented&&l&&(O.preventDefault(),l()))},p),i.useEffect(()=>{if(f)return o&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Wc=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Uc(),()=>{o&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Wc)}},[f,p,o,u]),i.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Uc())},[f,u]),i.useEffect(()=>{const O=()=>v({});return document.addEventListener(qr,O),()=>document.removeEventListener(qr,O)},[]),i.createElement(B.div,C({},d,{ref:m,style:{pointerEvents:S?E?"auto":"none":void 0,...e.style},onFocusCapture:T(e.onFocusCapture,P.onFocusCapture),onBlurCapture:T(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:T(e.onPointerDownCapture,M.onPointerDownCapture)}))}),p0=i.forwardRef((e,n)=>{const t=i.useContext(Kc),o=i.useRef(null),r=q(n,o);return i.useEffect(()=>{const a=o.current;if(a)return t.branches.add(a),()=>{t.branches.delete(a)}},[t.branches]),i.createElement(B.div,C({},e,{ref:r}))});function g0(e,n=globalThis==null?void 0:globalThis.document){const t=ce(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const a=c=>{if(c.target&&!o.current){let d=function(){jc(u0,t,l,{discrete:!0})};const l={originalEvent:c};c.pointerType==="touch"?(n.removeEventListener("click",r.current),r.current=d,n.addEventListener("click",r.current,{once:!0})):d()}else n.removeEventListener("click",r.current);o.current=!1},s=window.setTimeout(()=>{n.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),n.removeEventListener("pointerdown",a),n.removeEventListener("click",r.current)}},[n,t]),{onPointerDownCapture:()=>o.current=!0}}function m0(e,n=globalThis==null?void 0:globalThis.document){const t=ce(e),o=i.useRef(!1);return i.useEffect(()=>{const r=a=>{a.target&&!o.current&&jc(f0,t,{originalEvent:a},{discrete:!1})};return n.addEventListener("focusin",r),()=>n.removeEventListener("focusin",r)},[n,t]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Uc(){const e=new CustomEvent(qr);document.dispatchEvent(e)}function jc(e,n,t,{discrete:o}){const r=t.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:t});n&&r.addEventListener(e,n,{once:!0}),o?Sn(r,a):r.dispatchEvent(a)}const v0=xt,h0=p0,Xr="focusScope.autoFocusOnMount",Qr="focusScope.autoFocusOnUnmount",Yc={bubbles:!1,cancelable:!0},To=i.forwardRef((e,n)=>{const{loop:t=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:a,...s}=e,[c,l]=i.useState(null),d=ce(r),u=ce(a),f=i.useRef(null),g=q(n,m=>l(m)),p=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let m=function(y){if(p.paused||!c)return;const S=y.target;c.contains(S)?f.current=S:Ct(f.current,{select:!0})},h=function(y){if(p.paused||!c)return;const S=y.relatedTarget;S!==null&&(c.contains(S)||Ct(f.current,{select:!0}))},b=function(y){if(document.activeElement===document.body)for(const E of y)E.removedNodes.length>0&&Ct(c)};document.addEventListener("focusin",m),document.addEventListener("focusout",h);const w=new MutationObserver(b);return c&&w.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",h),w.disconnect()}}},[o,c,p.paused]),i.useEffect(()=>{if(c){Xc.add(p);const m=document.activeElement;if(!c.contains(m)){const b=new CustomEvent(Xr,Yc);c.addEventListener(Xr,d),c.dispatchEvent(b),b.defaultPrevented||(b0(C0(Rc(c)),{select:!0}),document.activeElement===m&&Ct(c))}return()=>{c.removeEventListener(Xr,d),setTimeout(()=>{const b=new CustomEvent(Qr,Yc);c.addEventListener(Qr,u),c.dispatchEvent(b),b.defaultPrevented||Ct(m??document.body,{select:!0}),c.removeEventListener(Qr,u),Xc.remove(p)},0)}}},[c,d,u,p]);const v=i.useCallback(m=>{if(!t&&!o||p.paused)return;const h=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,b=document.activeElement;if(h&&b){const w=m.currentTarget,[y,S]=$0(w);y&&S?!m.shiftKey&&b===S?(m.preventDefault(),t&&Ct(y,{select:!0})):m.shiftKey&&b===y&&(m.preventDefault(),t&&Ct(S,{select:!0})):b===w&&m.preventDefault()}},[t,o,p.paused]);return i.createElement(B.div,C({tabIndex:-1},s,{ref:g,onKeyDown:v}))});function b0(e,{select:n=!1}={}){const t=document.activeElement;for(const o of e)if(Ct(o,{select:n}),document.activeElement!==t)return}function $0(e){const n=Rc(e),t=qc(n,e),o=qc(n.reverse(),e);return[t,o]}function Rc(e){const n=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)n.push(t.currentNode);return n}function qc(e,n){for(const t of e)if(!w0(t,{upTo:n}))return t}function w0(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function y0(e){return e instanceof HTMLInputElement&&"select"in e}function Ct(e,{select:n=!1}={}){if(e&&e.focus){const t=document.activeElement;e.focus({preventScroll:!0}),e!==t&&y0(e)&&n&&e.select()}}const Xc=x0();function x0(){let e=[];return{add(n){const t=e[0];n!==t&&(t==null||t.pause()),e=Qc(e,n),e.unshift(n)},remove(n){var t;e=Qc(e,n),(t=e[0])===null||t===void 0||t.resume()}}}function Qc(e,n){const t=[...e],o=t.indexOf(n);return o!==-1&&t.splice(o,1),t}function C0(e){return e.filter(n=>n.tagName!=="A")}const Mn=i.forwardRef((e,n)=>{var t;const{container:o=globalThis==null||(t=globalThis.document)===null||t===void 0?void 0:t.body,...r}=e;return o?ze.createPortal(i.createElement(B.div,C({},r,{ref:n})),o):null});let Zr=0;function Oo(){i.useEffect(()=>{var e,n;const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=t[0])!==null&&e!==void 0?e:Zc()),document.body.insertAdjacentElement("beforeend",(n=t[1])!==null&&n!==void 0?n:Zc()),Zr++,()=>{Zr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(o=>o.remove()),Zr--}},[])}function Zc(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var St=function(){return St=Object.assign||function(n){for(var t,o=1,r=arguments.length;o<r;o++){t=arguments[o];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(n[a]=t[a])}return n},St.apply(this,arguments)};function S0(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(