@dnotrever2/super-kit 0.1.13 → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("react"),Ye=require("react-dom"),Ze="_badge_lyltm_1",Je="_neutral_lyltm_18",Qe="_accent_lyltm_24",Pe="_outline_lyltm_29",et="_success_lyltm_35",tt="_warning_lyltm_40",st="_danger_lyltm_45",nt="_info_lyltm_50",lt="_count_lyltm_55",ot="_mono_lyltm_63",at="_version_lyltm_71",ct="_dismiss_lyltm_80",it="_dismissBtn_lyltm_84",rt="_dot_lyltm_98",dt="_dotIndicator_lyltm_111",_t="_pill_lyltm_119",V={badge:Ze,neutral:Je,accent:Qe,outline:Pe,success:et,warning:tt,danger:st,info:nt,count:lt,mono:ot,version:at,dismiss:ct,dismissBtn:it,dot:rt,dotIndicator:dt,pill:_t},ut=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"10",height:"10",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})});function je({variant:n="neutral",icon:l,pill:t=!1,dismissable:s=!1,onDismiss:c,dotColor:a,children:i,className:r,...o}){if(n==="dot"){const f=[V.badge,V.dot,r].filter(Boolean).join(" ");return e.jsxs("span",{...o,className:f,children:[e.jsx("span",{className:V.dotIndicator,style:{background:a??"var(--accent)"}}),i]})}const h=[V.badge,V[n],t?V.pill:null,s?V.dismiss:null,r].filter(Boolean).join(" ");return e.jsxs("span",{...o,className:h,children:[l||null,i,s&&e.jsx("button",{type:"button",className:V.dismissBtn,"aria-label":"Remove",onClick:c,children:e.jsx(ut,{})})]})}je.displayName="Badge";function ge({direction:n="vertical",track:l=!1,arrows:t=!1,autoHide:s=!1,expand:c=!1,scrollbarSize:a,height:i,children:r,className:o,style:h,...f}){const j=["sb",l?"sb-track":null,t?"sb-arrows":null,s?"sb-auto-hide":null,c?"sb-expand":null,o].filter(Boolean).join(" "),g=n==="vertical"?{overflowY:"auto",overflowX:"hidden"}:n==="horizontal"?{overflowX:"auto",overflowY:"hidden"}:{overflow:"auto"},u=a!==void 0?{"--sb-w":`${a}px`}:void 0;return e.jsx("div",{...f,className:j,style:{height:i,...g,...u,...h},children:r})}ge.displayName="Scrollable";const ht="_btn_xuv7s_1",mt="_icon_xuv7s_33",xt="_primary_xuv7s_42",ft="_secondary_xuv7s_50",jt="_ghost_xuv7s_60",gt="_danger_xuv7s_70",vt="_success_xuv7s_78",bt="_warning_xuv7s_86",kt="_sm_xuv7s_95",yt="_md_xuv7s_103",Nt="_lg_xuv7s_105",le={btn:ht,icon:mt,primary:xt,secondary:ft,ghost:jt,danger:gt,success:vt,warning:bt,sm:kt,md:yt,lg:Nt},ve=m.forwardRef(({type:n="button",variant:l="secondary",size:t="md",icon:s,loading:c=!1,children:a,className:i,disabled:r,...o},h)=>{const f=[le.btn,le[l],le[t],i].filter(Boolean).join(" ");return e.jsxs("button",{ref:h,type:n,disabled:r||c,className:f,...o,children:[s?e.jsx("span",{className:le.icon,children:s}):null,a]})});ve.displayName="Button";const pt="_card_1gxgi_1",wt="_bordered_1gxgi_8",Bt="_tilt_1gxgi_12",Ct="_closeBtn_1gxgi_20",It="_padSm_1gxgi_41",$t="_padMd_1gxgi_42",Mt="_padLg_1gxgi_43",St="_padNone_1gxgi_44",Lt="_header_1gxgi_47",Rt="_headerIcon_1gxgi_54",Tt="_title_1gxgi_63",qt="_subtitle_1gxgi_69",At="_stat_1gxgi_76",Dt="_statValue_1gxgi_83",Ot="_statUnit_1gxgi_91",Et="_statDelta_1gxgi_97",Wt="_deltaPositive_1gxgi_102",Ft="_deltaNegative_1gxgi_103",zt="_deltaNeutral_1gxgi_104",k={card:pt,bordered:wt,tilt:Bt,closeBtn:Ct,padSm:It,padMd:$t,padLg:Mt,padNone:St,header:Lt,headerIcon:Rt,title:Tt,subtitle:qt,stat:At,statValue:Dt,statUnit:Ot,statDelta:Et,deltaPositive:Wt,deltaNegative:Ft,deltaNeutral:zt},Vt={none:k.padNone,sm:k.padSm,md:k.padMd,lg:k.padLg},Xt=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"10",height:"10",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})});function be({padding:n="md",bordered:l=!1,tilt:t=!1,onClose:s,closeBtnProps:c,children:a,className:i,...r}){const o=[k.card,Vt[n],l?k.bordered:null,t?k.tilt:null,i].filter(Boolean).join(" ");return e.jsxs("div",{...r,className:o,children:[s&&e.jsx("button",{type:"button","aria-label":"Close",...c,className:[k.closeBtn,c==null?void 0:c.className].filter(Boolean).join(" "),onClick:s,children:e.jsx(Xt,{})}),a]})}be.displayName="Card";function ke({icon:n,title:l,subtitle:t,className:s,...c}){return e.jsxs("div",{...c,className:[k.header,s].filter(Boolean).join(" "),children:[n&&e.jsx("span",{className:k.headerIcon,children:n}),e.jsxs("div",{children:[e.jsx("div",{className:k.title,children:l}),t&&e.jsx("div",{className:k.subtitle,children:t})]})]})}ke.displayName="CardHeader";function ye({value:n,unit:l,delta:t,deltaDirection:s="positive",className:c,...a}){const i=[k.statDelta,s==="positive"?k.deltaPositive:s==="negative"?k.deltaNegative:k.deltaNeutral].filter(Boolean).join(" ");return e.jsxs("div",{...a,className:[k.stat,c].filter(Boolean).join(" "),children:[e.jsxs("span",{className:k.statValue,children:[n,l&&e.jsxs("span",{className:k.statUnit,children:[" ",l]})]}),t&&e.jsx("span",{className:i,children:t})]})}ye.displayName="CardStat";function oe(n,l,t){const[s,c]=m.useState(l),a=n!==void 0,i=a?n:s,r=m.useCallback(o=>{a||c(o),t==null||t(o)},[a,t]);return[i,r,a]}const Gt="X",Ut=/[a-zA-Z0-9]/;function re(n,l={}){const t=l.allowedPattern??Ut;return n.split("").filter(s=>t.test(s)).join("")}function Ne(n,l,t={}){const s=t.placeholder??Gt,c=re(n,t);let a=0,i="";for(const r of l){if(a>=c.length)break;if(r===s){i+=c[a],a+=1;continue}i+=r}return i}const Ht="_wrapper_25x8h_1",Kt="_field_25x8h_7",Yt="_label_25x8h_13",Zt="_input_25x8h_22",Jt="_hasIcon_25x8h_52",Qt="_hasIconRight_25x8h_55",Pt="_hasClear_25x8h_58",es="_hasClearAndIconRight_25x8h_61",ts="_iconSlot_25x8h_64",ss="_iconSlotRight_25x8h_78",ns="_iconSlotRightWithClear_25x8h_92",ls="_clearBtn_25x8h_95",I={wrapper:Ht,field:Kt,label:Yt,input:Zt,hasIcon:Jt,hasIconRight:Qt,hasClear:Pt,hasClearAndIconRight:es,iconSlot:ts,iconSlotRight:ss,iconSlotRightWithClear:ns,clearBtn:ls},os=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"12",height:"12",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})}),pe=m.forwardRef(({label:n,icon:l,iconPosition:t="left",clearable:s=!1,clearButtonProps:c,clearLabel:a,defaultValue:i="",disabled:r,mask:o,maskAllowedPattern:h,maskPlaceholder:f,selectOnFocus:j=!1,textAlign:g,inputProps:u,onChange:p,onValueChange:$,value:T,wrapperProps:N,fieldProps:v,className:M,style:F,...x},G)=>{const U=m.useRef(null),[J,ee]=oe(T,i,b=>{$==null||$({value:b,rawValue:o?re(b,{allowedPattern:h}):b})});m.useImperativeHandle(G,()=>U.current);const C=m.useCallback(b=>o?Ne(b,o,{allowedPattern:h,placeholder:f}):b,[o,h,f]),S=b=>{var Y;const K=C(b.target.value);b.target.value=K,ee(K),p==null||p(b),(Y=u==null?void 0:u.onChange)==null||Y.call(u,b)},D=()=>{var b;ee(""),(b=U.current)==null||b.focus()},L=l&&t==="right",O=l&&t==="left",H=[I.input,O?I.hasIcon:null,L?I.hasIconRight:null,s&&L?I.hasClearAndIconRight:s?I.hasClear:null,M,u==null?void 0:u.className].filter(Boolean).join(" "),Q=b=>{var K,Y;j&&b.target.select(),(K=x.onFocus)==null||K.call(x,b),(Y=u==null?void 0:u.onFocus)==null||Y.call(u,b)},w={...F,...u==null?void 0:u.style,...g?{textAlign:g}:null},z=r||(u==null?void 0:u.disabled),se=e.jsx("input",{...x,...u,ref:U,disabled:z,value:C(J),onChange:S,onFocus:Q,className:H,style:w}),te=[I.wrapper,N==null?void 0:N.className].filter(Boolean).join(" "),ne=e.jsxs("span",{...N,className:te,children:[O?e.jsx("span",{className:I.iconSlot,children:l}):null,se,L?e.jsx("span",{className:[I.iconSlotRight,s?I.iconSlotRightWithClear:null].filter(Boolean).join(" "),children:l}):null,s?e.jsx("button",{type:"button","aria-label":"Clear",title:"Clear",disabled:z||J.length===0,onClick:D,className:I.clearBtn,...c,children:(c==null?void 0:c.children)??e.jsx(os,{})}):null]});return!n&&!v?ne:e.jsxs("div",{...v,className:[I.field,v==null?void 0:v.className].filter(Boolean).join(" "),children:[n?e.jsx("label",{className:I.label,children:n}):null,ne]})});pe.displayName="Input";const as="_checkbox_7kjwa_2",cs="_checkboxBox_7kjwa_13",is="_checked_7kjwa_33",rs="_indeterminate_7kjwa_42",ds="_disabled_7kjwa_55",_s="_radio_7kjwa_61",us="_radioDot_7kjwa_72",hs="_radioChecked_7kjwa_85",ms="_radioDisabled_7kjwa_97",xs="_radioGroup_7kjwa_102",fs="_switchWrap_7kjwa_109",js="_switchTrack_7kjwa_120",gs="_switchOn_7kjwa_143",vs="_switchDisabled_7kjwa_153",B={checkbox:as,checkboxBox:cs,checked:is,indeterminate:rs,disabled:ds,radio:_s,radioDot:us,radioChecked:hs,radioDisabled:ms,radioGroup:xs,switchWrap:fs,switchTrack:js,switchOn:gs,switchDisabled:vs},bs=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M20 6 9 17l-5-5"})});function we({label:n,checked:l,defaultChecked:t,indeterminate:s=!1,disabled:c=!1,onChange:a,className:i,...r}){const o=l??t??!1,h=[B.checkbox,o&&!s?B.checked:null,s?B.indeterminate:null,c?B.disabled:null,i].filter(Boolean).join(" ");return e.jsxs("label",{className:h,children:[e.jsx("input",{...r,type:"checkbox",checked:o,disabled:c,style:{display:"none"},onChange:f=>a==null?void 0:a(f.currentTarget.checked)}),e.jsx("span",{className:B.checkboxBox,children:!s&&e.jsx(bs,{})}),n]})}we.displayName="Checkbox";function Be({label:n,checked:l=!1,disabled:t=!1,onChange:s,value:c,className:a,...i}){const r=[B.radio,l?B.radioChecked:null,t?B.radioDisabled:null,a].filter(Boolean).join(" ");return e.jsxs("label",{className:r,children:[e.jsx("input",{...i,type:"radio",checked:l,disabled:t,value:c,style:{display:"none"},onChange:o=>s==null?void 0:s(o.currentTarget.value)}),e.jsx("span",{className:B.radioDot}),n]})}Be.displayName="Radio";function Ce({children:n,className:l,...t}){const s=[B.radioGroup,l].filter(Boolean).join(" ");return e.jsx("div",{...t,className:s,role:"radiogroup",children:n})}Ce.displayName="RadioGroup";function Ie({label:n,checked:l,defaultChecked:t,disabled:s=!1,onChange:c,className:a,...i}){const r=l??t??!1,o=[B.switchWrap,r?B.switchOn:null,s?B.switchDisabled:null,a].filter(Boolean).join(" ");return e.jsxs("label",{className:o,children:[e.jsx("input",{...i,type:"checkbox",checked:r,disabled:s,style:{display:"none"},onChange:h=>c==null?void 0:c(h.currentTarget.checked)}),e.jsx("span",{className:B.switchTrack}),n]})}Ie.displayName="Switch";const ks="_menu_pga52_1",ys="_item_pga52_13",Ns="_active_pga52_41",ps="_danger_pga52_53",ws="_disabled_pga52_65",Bs="_kbd_pga52_71",Cs="_separator_pga52_79",Z={menu:ks,item:ys,active:Ns,danger:ps,disabled:ws,kbd:Bs,separator:Cs};function $e({children:n,className:l,...t}){const s=[Z.menu,l].filter(Boolean).join(" ");return e.jsx("div",{...t,className:s,role:"menu",children:n})}$e.displayName="Menu";function Me({icon:n,kbd:l,active:t=!1,danger:s=!1,disabled:c=!1,children:a,className:i,...r}){const o=[Z.item,t?Z.active:null,s?Z.danger:null,c?Z.disabled:null,i].filter(Boolean).join(" ");return e.jsxs("button",{...r,type:"button",className:o,disabled:c,role:"menuitem",children:[n,a,l&&e.jsx("span",{className:Z.kbd,children:l})]})}Me.displayName="MenuItem";function Se({className:n,...l}){const t=[Z.separator,n].filter(Boolean).join(" ");return e.jsx("div",{...l,className:t,role:"separator"})}Se.displayName="MenuSeparator";const Is="_backdrop_pya14_1",$s="_modal_pya14_23",Ms="_header_pya14_37",Ss="_titleBlock_pya14_45",Ls="_title_pya14_45",Rs="_subtitle_pya14_58",Ts="_closeBtn_pya14_64",qs="_body_pya14_86",As="_footer_pya14_92",E={backdrop:Is,modal:$s,header:Ms,titleBlock:Ss,title:Ls,subtitle:Rs,closeBtn:Ts,body:qs,footer:As},Ds=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"11",height:"11",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})}),Le=m.forwardRef(({open:n,title:l,subtitle:t,children:s,footer:c,closeOnBackdrop:a=!0,showCloseButton:i=!0,backdropProps:r,modalProps:o,headerProps:h,bodyProps:f,footerProps:j,closeButtonProps:g,onOpenChange:u,onClose:p},$)=>{const T=m.useRef(null);m.useImperativeHandle($,()=>T.current),m.useEffect(()=>{if(!n)return;const x=G=>{G.key==="Escape"&&N()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[n]);const N=()=>{u==null||u(!1),p==null||p()},v=x=>{a&&x.target===x.currentTarget&&N()};if(!n)return null;const M=[E.backdrop,r==null?void 0:r.className].filter(Boolean).join(" "),F=[E.modal,o==null?void 0:o.className].filter(Boolean).join(" ");return e.jsx("div",{...r,className:M,onClick:v,role:"presentation",children:e.jsxs("div",{ref:T,...o,className:F,role:"dialog","aria-modal":"true",children:[(l||i)&&e.jsxs("header",{...h,className:[E.header,h==null?void 0:h.className].filter(Boolean).join(" "),children:[e.jsxs("div",{className:E.titleBlock,children:[l?e.jsx("div",{className:E.title,children:l}):null,t?e.jsx("div",{className:E.subtitle,children:t}):null]}),i&&e.jsx("button",{type:"button","aria-label":"Close",className:E.closeBtn,onClick:N,...g,children:(g==null?void 0:g.children)??e.jsx(Ds,{})})]}),e.jsx("section",{...f,className:[E.body,f==null?void 0:f.className].filter(Boolean).join(" "),children:s}),c&&e.jsx("footer",{...j,className:[E.footer,j==null?void 0:j.className].filter(Boolean).join(" "),children:c})]})})});Le.displayName="Modal";const Os="_wrapper_10d4l_1",Es="_pop_10d4l_8",Ws="_sideRight_10d4l_22",Fs="_sideTop_10d4l_27",zs="_arrow_10d4l_34",Vs="_head_10d4l_60",Xs="_title_10d4l_67",Gs="_closeBtn_10d4l_74",Us="_body_10d4l_105",W={wrapper:Os,pop:Es,sideRight:Ws,sideTop:Fs,arrow:zs,head:Vs,title:Xs,closeBtn:Gs,body:Us},Hs=()=>e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]});function Re({open:n,defaultOpen:l=!1,title:t,children:s,trigger:c,side:a="bottom-start",showCloseButton:i=!0,onOpenChange:r,popProps:o}){const[h,f]=m.useState(l),j=n!==void 0,g=j?n:h,u=m.useRef(null);function p(v){j||f(v),r==null||r(v)}m.useEffect(()=>{function v(M){u.current&&!u.current.contains(M.target)&&p(!1)}return g&&document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[g]);const $=a.startsWith("top"),T=a.endsWith("end"),N=[W.pop,T?W.sideRight:null,$?W.sideTop:null,o==null?void 0:o.className].filter(Boolean).join(" ");return e.jsxs("div",{ref:u,className:W.wrapper,children:[c&&e.jsx("div",{onClick:()=>p(!g),style:{display:"inline-flex"},children:c}),g&&e.jsxs("div",{...o,className:N,children:[e.jsx("span",{className:W.arrow}),(t||i)&&e.jsxs("div",{className:W.head,children:[t&&e.jsx("span",{className:W.title,children:t}),i&&e.jsx("button",{type:"button",className:W.closeBtn,"aria-label":"Close",onClick:()=>p(!1),children:e.jsx(Hs,{})})]}),e.jsx("div",{className:W.body,children:s})]})]})}Re.displayName="Popover";const Ks="_group_1ltkm_1",Ys="_pb_1ltkm_11",Zs="_on_1ltkm_40",Js="_accent_1ltkm_45",Qs="_solo_1ltkm_50",Ps="_disabled_1ltkm_65",P={group:Ks,pb:Ys,on:Zs,accent:Js,solo:Qs,disabled:Ps};function Te({children:n,className:l,...t}){const s=[P.group,l].filter(Boolean).join(" ");return e.jsx("div",{...t,className:s,role:"group",children:n})}Te.displayName="PushButtonGroup";function qe({on:n=!1,accent:l=!1,solo:t=!1,icon:s,children:c,disabled:a=!1,className:i,...r}){const o=[P.pb,n?P.on:null,n&&l?P.accent:null,t?P.solo:null,a?P.disabled:null,i].filter(Boolean).join(" ");return e.jsxs("button",{...r,type:"button",className:o,disabled:a,children:[s,c]})}qe.displayName="PushButton";const en="_root_qhol4_1",tn="_field_qhol4_6",sn="_label_qhol4_12",nn="_labelMeta_qhol4_24",ln="_trigger_qhol4_33",on="_triggerOpen_qhol4_59",an="_triggerConnectedBottom_qhol4_64",cn="_triggerConnectedTop_qhol4_69",rn="_triggerValue_qhol4_74",dn="_triggerPlaceholder_qhol4_83",_n="_chevron_qhol4_85",un="_chevronOpen_qhol4_94",hn="_chips_qhol4_97",mn="_chip_qhol4_97",xn="_chipOverflow_qhol4_120",fn="_clearBtn_qhol4_123",jn="_popover_qhol4_143",gn="_popoverBottom_qhol4_154",vn="_popoverTop_qhol4_162",bn="_search_qhol4_181",kn="_searchIcon_qhol4_188",yn="_searchInput_qhol4_195",Nn="_list_qhol4_209",pn="_item_qhol4_217",wn="_itemAlignLeft_qhol4_230",Bn="_itemAlignCenter_qhol4_231",Cn="_itemAlignRight_qhol4_232",In="_itemActive_qhol4_235",$n="_itemDisabled_qhol4_243",Mn="_itemMeta_qhol4_245",Sn="_checkbox_qhol4_254",Ln="_checkboxChecked_qhol4_266",Rn="_checkIcon_qhol4_278",Tn="_emptyState_qhol4_299",qn="_popFooter_qhol4_307",An="_popFooterBtn_qhol4_317",_={root:en,field:tn,label:sn,labelMeta:nn,trigger:ln,triggerOpen:on,triggerConnectedBottom:an,triggerConnectedTop:cn,triggerValue:rn,triggerPlaceholder:dn,chevron:_n,chevronOpen:un,chips:hn,chip:mn,chipOverflow:xn,clearBtn:fn,popover:jn,popoverBottom:gn,popoverTop:vn,search:bn,searchIcon:kn,searchInput:yn,list:Nn,item:pn,itemAlignLeft:wn,itemAlignCenter:Bn,itemAlignRight:Cn,itemActive:In,itemDisabled:$n,itemMeta:Mn,checkbox:Sn,checkboxChecked:Ln,checkIcon:Rn,emptyState:Tn,popFooter:qn,popFooterBtn:An},Dn=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"14",height:"14",children:e.jsx("path",{d:"m6 9 6 6 6-6"})}),fe=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"12",height:"12",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})}),On=()=>e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"11",cy:"11",r:"7"}),e.jsx("path",{d:"m20 20-3.5-3.5"})]}),ce=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",width:"10",height:"10",children:e.jsx("path",{d:"M20 6 9 17l-5-5"})}),En=(n,l)=>{const t=l.trim().toLowerCase();return t?n.filter(s=>String(s.label).toLowerCase().includes(t)):n},Ae=m.forwardRef(({label:n,clearable:l=!1,defaultValue:t=null,disabled:s=!1,emptyLabel:c="No options found",filterOptions:a=En,isLoading:i=!1,loadingLabel:r="Loading...",multiple:o=!1,onSearchChange:h,onValueChange:f,options:j,optionsAlign:g="left",optionsPosition:u="bottom",placeholder:p="Select",searchable:$=!1,searchPlaceholder:T="Search...",showSelectedCount:N=!0,showClearAll:v=!0,showSelectedValues:M=!0,closeOnSelect:F,selectProps:x,value:G,className:U,...J},ee)=>{const[C,S]=m.useState(!1),[D,L]=m.useState(""),O=m.useRef(null),[H,Q]=oe(G,t,d=>{const y=j.filter(q=>Array.isArray(d)?d.includes(q.value):q.value===d);f==null||f(d,y)}),w=m.useMemo(()=>Array.isArray(H)?H:H?[H]:[],[H]),z=m.useMemo(()=>j.filter(d=>w.includes(d.value)),[j,w]),se=m.useMemo(()=>a(j,D),[a,j,D]);m.useEffect(()=>{if(!C)return;const d=y=>{O.current&&!O.current.contains(y.target)&&S(!1)};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[C]);const te=d=>{L(d),h==null||h(d)},ne=d=>{if(!d.disabled){if(o){const y=w.includes(d.value)?w.filter(q=>q!==d.value):[...w,d.value];Q(y),F&&S(!1);return}Q(d.value),(F??!0)&&S(!1)}},b=()=>{Q(o?[]:null),te("")},K=()=>{if(w.length>0){b();return}Q(j.filter(d=>!d.disabled).map(d=>d.value))},Y=d=>{var y;(y=x==null?void 0:x.onClick)==null||y.call(x,d),!d.defaultPrevented&&!s&&S(q=>!q)},ze=d=>{var y;(y=x==null?void 0:x.onKeyDown)==null||y.call(x,d),!d.defaultPrevented&&((d.key==="Enter"||d.key===" ")&&(d.preventDefault(),S(q=>!q)),d.key==="Escape"&&S(!1))},_e=u==="top",Ve=[_.trigger,C?_.triggerOpen:null,C?_e?_.triggerConnectedTop:_.triggerConnectedBottom:null,x==null?void 0:x.className].filter(Boolean).join(" "),Xe=!o||M,Ge=o&&M&&z.length>0,ae=o,Ue=o&&(w.length>0||v),ue=Xe&&z.length>0,he=2,me=z.length-he,He=[_.root,U].filter(Boolean).join(" "),Ke={left:_.itemAlignLeft,center:_.itemAlignCenter,right:_.itemAlignRight}[g],xe=e.jsxs("div",{ref:O,...J,className:He,children:[e.jsxs("button",{...x,type:"button",className:Ve,disabled:s,"aria-haspopup":"listbox","aria-expanded":C,onClick:Y,onKeyDown:ze,children:[Ge?e.jsxs("div",{className:_.chips,children:[z.slice(0,he).map(d=>e.jsx("span",{className:_.chip,children:d.label},d.value)),me>0&&e.jsxs("span",{className:[_.chip,_.chipOverflow].join(" "),children:["+",me]})]}):e.jsx("span",{className:[_.triggerValue,ue?null:_.triggerPlaceholder].filter(Boolean).join(" "),children:ue?z.map(d=>d.label).join(", "):p}),l&&w.length>0&&e.jsx("button",{type:"button","aria-label":"Clear",className:_.clearBtn,disabled:s,onClick:d=>{d.stopPropagation(),b()},children:e.jsx(fe,{})}),e.jsx("span",{className:[_.chevron,C?_.chevronOpen:null].filter(Boolean).join(" "),children:e.jsx(Dn,{})})]}),C&&e.jsxs("div",{className:[_.popover,_e?_.popoverTop:_.popoverBottom].join(" "),role:"listbox","aria-multiselectable":o||void 0,children:[$&&e.jsxs("div",{className:_.search,children:[e.jsx("span",{className:_.searchIcon,children:e.jsx(On,{})}),e.jsx("input",{autoFocus:!0,value:D,placeholder:T,className:_.searchInput,onChange:d=>te(d.target.value)}),D&&e.jsx("button",{className:_.clearBtn,onClick:()=>te(""),children:e.jsx(fe,{})})]}),e.jsxs("ul",{className:[_.list,"sb"].join(" "),children:[i&&e.jsx("li",{className:_.emptyState,children:r}),!i&&se.length===0&&e.jsx("li",{className:_.emptyState,children:c}),!i&&se.map(d=>{const y=w.includes(d.value),q=[_.item,Ke,y?_.itemActive:null,d.disabled?_.itemDisabled:null].filter(Boolean).join(" ");return e.jsxs("li",{className:q,role:"option","aria-selected":y,onClick:()=>ne(d),children:[!ae&&g==="right"&&y&&e.jsx("span",{className:_.checkIcon,children:e.jsx(ce,{})}),ae?e.jsx("span",{className:[_.checkbox,y?_.checkboxChecked:null].filter(Boolean).join(" "),children:y&&e.jsx(ce,{})}):null,e.jsx("span",{children:d.label}),d.meta&&e.jsx("span",{className:_.itemMeta,children:d.meta}),!ae&&g!=="right"&&y&&e.jsx("span",{className:_.checkIcon,children:e.jsx(ce,{})})]},d.value)})]}),Ue&&(N||v)&&e.jsxs("div",{className:_.popFooter,children:[N&&e.jsxs("span",{children:[w.length," selected"]}),v&&e.jsx("button",{className:_.popFooterBtn,onClick:K,children:w.length>0?"Clear all":"Check all"})]})]})]});return n?e.jsxs("div",{className:_.field,children:[e.jsxs("label",{className:_.label,children:[n,o&&N&&w.length>0&&e.jsxs("span",{className:_.labelMeta,children:["· ",w.length," selected"]})]}),xe]}):xe});Ae.displayName="Select";const Wn="_ring_mxe7t_2",Fn="_spin_mxe7t_1",zn="_ringMuted_mxe7t_12",Vn="_sm_mxe7t_14",Xn="_md_mxe7t_15",Gn="_lg_mxe7t_16",Un="_onAccent_mxe7t_19",Hn="_dots_mxe7t_29",Kn="_dot_mxe7t_29",Yn="_dotPulse_mxe7t_1",Zn="_bar_mxe7t_52",Jn="_barFill_mxe7t_62",Qn="_barSlide_mxe7t_1",A={ring:Wn,spin:Fn,ringMuted:zn,sm:Vn,md:Xn,lg:Gn,onAccent:Un,dots:Hn,dot:Kn,dotPulse:Yn,bar:Zn,barFill:Jn,barSlide:Qn};function De({variant:n="ring",size:l="md",muted:t=!1,onAccent:s=!1,className:c,...a}){if(n==="dots"){const r=[A.dots,c].filter(Boolean).join(" ");return e.jsxs("span",{...a,className:r,role:"status","aria-label":"Loading",children:[e.jsx("span",{className:A.dot}),e.jsx("span",{className:A.dot}),e.jsx("span",{className:A.dot})]})}if(n==="bar"){const r=[A.bar,c].filter(Boolean).join(" ");return e.jsx("span",{...a,className:r,role:"status","aria-label":"Loading",children:e.jsx("span",{className:A.barFill})})}const i=[A.ring,A[l],t?A.ringMuted:null,s?A.onAccent:null,c].filter(Boolean).join(" ");return e.jsx("span",{...a,className:i,role:"status","aria-label":"Loading"})}De.displayName="Spinner";const Pn="_field_fazrx_1",el="_label_fazrx_7",tl="_wrapper_fazrx_16",sl="_textarea_fazrx_20",nl="_mono_fazrx_53",ll="_hasClear_fazrx_59",ol="_clearBtn_fazrx_62",al="_footer_fazrx_84",cl="_helpText_fazrx_92",il="_charCount_fazrx_94",rl="_charCountOver_fazrx_100",R={field:Pn,label:el,wrapper:tl,textarea:sl,mono:nl,hasClear:ll,clearBtn:ol,footer:al,helpText:cl,charCount:il,charCountOver:rl},dl=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"12",height:"12",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})}),Oe=m.forwardRef(({label:n,helpText:l,maxLength:t,clearable:s=!1,mono:c=!1,value:a,defaultValue:i="",disabled:r,textareaProps:o,wrapperProps:h,fieldProps:f,clearButtonProps:j,onChange:g,onValueChange:u,className:p,style:$,...T},N)=>{const[v,M]=oe(a,i,L=>u==null?void 0:u(L)),F=L=>{var O;M(L.target.value),g==null||g(L),(O=o==null?void 0:o.onChange)==null||O.call(o,L)},x=()=>{M("")},G=t!==void 0&&v.length>t,U=[R.textarea,"sb",c?R.mono:null,s?R.hasClear:null,p,o==null?void 0:o.className].filter(Boolean).join(" "),J=[R.wrapper,h==null?void 0:h.className].filter(Boolean).join(" "),ee=[R.field,f==null?void 0:f.className].filter(Boolean).join(" "),C={...$,...o==null?void 0:o.style},S=r||(o==null?void 0:o.disabled),D=e.jsxs("div",{...h,className:J,children:[e.jsx("textarea",{...T,...o,ref:N,disabled:S,maxLength:t,value:v,onChange:F,className:U,style:C}),s&&e.jsx("button",{type:"button",className:R.clearBtn,disabled:S||v.length===0,"aria-label":"Clear",onClick:x,...j,children:(j==null?void 0:j.children)??e.jsx(dl,{})})]});return!n&&!l&&t===void 0?D:e.jsxs("div",{...f,className:ee,children:[n&&e.jsx("label",{className:R.label,children:n}),D,(l||t!==void 0)&&e.jsxs("div",{className:R.footer,children:[l&&e.jsx("span",{className:R.helpText,children:l}),t!==void 0&&e.jsxs("span",{className:[R.charCount,G?R.charCountOver:null].filter(Boolean).join(" "),children:[v.length," / ",t]})]})]})});Oe.displayName="Textarea";const _l="_toast_d6t69_1",ul="_slideUp_d6t69_1",hl="_toastExiting_d6t69_26",ml="_slideOut_d6t69_1",xl="_lead_d6t69_30",fl="_body_d6t69_37",jl="_title_d6t69_45",gl="_message_d6t69_51",vl="_closeBtn_d6t69_56",bl="_ok_d6t69_79",kl="_error_d6t69_82",yl="_warning_d6t69_85",Nl="_info_d6t69_88",pl="_stack_d6t69_92",X={toast:_l,slideUp:ul,toastExiting:hl,slideOut:ml,lead:xl,body:fl,title:jl,message:gl,closeBtn:vl,ok:bl,error:kl,warning:yl,info:Nl,stack:pl},wl=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:e.jsx("path",{d:"M20 6 9 17l-5-5"})}),Ee=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"11",height:"11",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})}),Bl=()=>e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:[e.jsx("path",{d:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),e.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),e.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),Cl=()=>e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),e.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]}),Il={ok:e.jsx(wl,{}),error:e.jsx(Ee,{}),warning:e.jsx(Bl,{}),info:e.jsx(Cl,{})};function de({variant:n="ok",title:l,message:t,onDismiss:s,className:c,...a}){const i=[X.toast,X[n],c].filter(Boolean).join(" ");return e.jsxs("div",{...a,className:i,role:"alert",children:[e.jsx("span",{className:X.lead,children:Il[n]}),e.jsxs("div",{className:X.body,children:[e.jsx("div",{className:X.title,children:l}),t&&e.jsx("div",{className:X.message,children:t})]}),s&&e.jsx("button",{type:"button",className:X.closeBtn,"aria-label":"Dismiss",onClick:s,children:e.jsx(Ee,{})})]})}de.displayName="Toast";const We=m.createContext(null);function $l({children:n}){const[l,t]=m.useState([]),s=m.useCallback(a=>{t(i=>i.filter(r=>r.id!==a))},[]),c=m.useCallback(a=>{const i=Math.random().toString(36).slice(2),r=a.duration??4e3;return t(o=>[...o,{...a,id:i}]),r>0&&setTimeout(()=>s(i),r),i},[s]);return e.jsxs(We.Provider,{value:{toast:c,dismiss:s},children:[n,typeof document<"u"&&Ye.createPortal(e.jsx("div",{className:X.stack,children:l.map(a=>e.jsx(de,{variant:a.variant,title:a.title,message:a.message,onDismiss:()=>s(a.id)},a.id))}),document.body)]})}function Ml(){const n=m.useContext(We);if(!n)throw new Error("useToast must be used within a ToastProvider");return n}const Sl="_wrapper_1pjxy_1",Ll="_tooltip_1pjxy_6",Rl="_fadeIn_1pjxy_1",Tl="_top_1pjxy_33",ql="_bottom_1pjxy_52",Al="_left_1pjxy_72",Dl="_right_1pjxy_94",Ol="_kbd_1pjxy_115",ie={wrapper:Sl,tooltip:Ll,fadeIn:Rl,top:Tl,bottom:ql,left:Al,right:Dl,kbd:Ol};function Fe({content:n,side:l="top",children:t,wrapperProps:s,disabled:c=!1}){const[a,i]=m.useState(!1);if(c)return e.jsx(e.Fragment,{children:t});const r=[ie.tooltip,ie[l]].filter(Boolean).join(" "),o=[ie.wrapper,s==null?void 0:s.className].filter(Boolean).join(" ");return e.jsxs("span",{...s,className:o,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onFocus:()=>i(!0),onBlur:()=>i(!1),children:[t,a&&e.jsx("span",{className:r,role:"tooltip",children:n})]})}Fe.displayName="Tooltip";exports.Badge=je;exports.Button=ve;exports.Card=be;exports.CardHeader=ke;exports.CardStat=ye;exports.Checkbox=we;exports.Input=pe;exports.Menu=$e;exports.MenuItem=Me;exports.MenuSeparator=Se;exports.Modal=Le;exports.Popover=Re;exports.PushButton=qe;exports.PushButtonGroup=Te;exports.Radio=Be;exports.RadioGroup=Ce;exports.Scrollable=ge;exports.Select=Ae;exports.Spinner=De;exports.Switch=Ie;exports.Textarea=Oe;exports.Toast=de;exports.ToastProvider=$l;exports.Tooltip=Fe;exports.applyMask=Ne;exports.getRawMaskValue=re;exports.useControlledState=oe;exports.useToast=Ml;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),g=require("react"),ss=require("react-dom"),ts="_badge_12rpd_1",ns="_secondary_12rpd_25",ls="_primary_12rpd_35",as="_ghost_12rpd_44",os="_outline_12rpd_54",cs="_success_12rpd_61",is="_warning_12rpd_70",rs="_danger_12rpd_79",ds="_coloredText_12rpd_88",_s="_indicator_12rpd_98",us="_label_12rpd_119",hs="_dismiss_12rpd_143",fs="_dismissBtn_12rpd_147",ms="_pill_12rpd_161",H={badge:ts,secondary:ns,primary:ls,ghost:as,outline:os,success:cs,warning:is,danger:rs,coloredText:ds,indicator:_s,label:us,"label-right":"_label-right_12rpd_124","label-left":"_label-left_12rpd_133",dismiss:hs,dismissBtn:fs,pill:ms},xs=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"10",height:"10",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})});function Ne({variant:s="secondary",icon:o,pill:n=!1,outline:c=!1,coloredText:t=!1,indicator:i=!1,label:l=!1,labelDirection:r="right",dismissable:a=!1,onDismiss:_,children:j,className:x,...h}){const u=[H.badge,H[s],c?H.outline:null,t?H.coloredText:null,i?H.indicator:null,n?H.pill:null,l&&!i?H.label:null,l&&!i?H[`label-${r}`]:null,a&&!i?H.dismiss:null,x].filter(Boolean).join(" ");return e.jsxs("span",{...h,className:u,children:[!i&&o?o:null,i?null:j,a&&!i&&e.jsx("button",{type:"button",className:H.dismissBtn,"aria-label":"Remove",onClick:_,children:e.jsx(xs,{})})]})}Ne.displayName="Badge";const js="_breadcrumb_1y22n_1",bs="_list_1y22n_7",gs="_item_1y22n_17",vs="_separator_1y22n_23",ks="_link_1y22n_33",Ns="_current_1y22n_34",ys="_button_1y22n_68",ws="_disabled_1y22n_79",ee={breadcrumb:js,list:bs,item:gs,separator:vs,link:ks,current:Ns,button:ys,disabled:ws},ps=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",width:"12",height:"12",children:e.jsx("path",{d:"m9 18 6-6-6-6"})});function ue({items:s,separator:o=e.jsx(ps,{}),label:n="Breadcrumb",className:c,...t}){const i=[ee.breadcrumb,c].filter(Boolean).join(" ");return e.jsx("nav",{...t,className:i,"aria-label":n,children:e.jsx("ol",{className:ee.list,children:s.map((l,r)=>{var x,h;const a=r===s.length-1,_=l.current??a,j=l.disabled||_;return e.jsxs("li",{className:ee.item,children:[r>0&&e.jsx("span",{className:ee.separator,"aria-hidden":"true",children:o}),l.href&&!j?e.jsx("a",{...l.linkProps,className:[ee.link,(x=l.linkProps)==null?void 0:x.className].filter(Boolean).join(" "),href:l.href,children:l.label}):l.onClick&&!j?e.jsx("button",{...l.buttonProps,type:"button",className:[ee.link,ee.button,(h=l.buttonProps)==null?void 0:h.className].filter(Boolean).join(" "),onClick:l.onClick,children:l.label}):e.jsx("span",{className:[ee.current,l.disabled?ee.disabled:null].filter(Boolean).join(" "),"aria-current":_?"page":void 0,children:l.label})]},r)})})})}ue.displayName="Breadcrumb";const Bs=ue;function ye({direction:s="vertical",track:o=!1,arrows:n=!1,autoHide:c=!1,expand:t=!1,scrollbarSize:i,height:l,children:r,className:a,style:_,...j}){const x=["sb",o?"sb-track":null,n?"sb-arrows":null,c?"sb-auto-hide":null,t?"sb-expand":null,a].filter(Boolean).join(" "),h=s==="vertical"?{overflowY:"auto",overflowX:"hidden"}:s==="horizontal"?{overflowX:"auto",overflowY:"hidden"}:{overflow:"auto"},u=i!==void 0?{"--sb-w":`${i}px`}:void 0;return e.jsx("div",{...j,className:x,style:{height:l,...h,...u,..._},children:r})}ye.displayName="Scrollable";const Cs="_btn_1nul4_1",$s="_icon_1nul4_33",Is="_primary_1nul4_42",Ts="_secondary_1nul4_50",Ls="_ghost_1nul4_60",Ms="_danger_1nul4_70",Ss="_success_1nul4_78",Rs="_warning_1nul4_86",Ds="_rounded_1nul4_95",qs="_outline_1nul4_99",As="_coloredText_1nul4_103",Os="_sm_1nul4_194",Es="_md_1nul4_202",Fs="_lg_1nul4_204",ae={btn:Cs,icon:$s,primary:Is,secondary:Ts,ghost:Ls,danger:Ms,success:Ss,warning:Rs,rounded:Ds,outline:qs,coloredText:As,sm:Os,md:Es,lg:Fs},we=g.forwardRef(({type:s="button",variant:o="secondary",size:n="md",icon:c,outline:t=!1,rounded:i=!1,coloredText:l=!1,children:r,className:a,disabled:_,...j},x)=>{const h=[ae.btn,ae[o],ae[n],t?ae.outline:null,i?ae.rounded:null,l?ae.coloredText:null,a].filter(Boolean).join(" ");return e.jsxs("button",{ref:x,type:s,disabled:_,className:h,...j,children:[c?e.jsx("span",{className:ae.icon,children:c}):null,r]})});we.displayName="Button";const Ws="_card_wlcwa_1",Vs="_bordered_wlcwa_8",zs="_tilt_wlcwa_12",Xs="_closeBtn_wlcwa_26",Gs="_padSm_wlcwa_47",Us="_padMd_wlcwa_48",Hs="_padLg_wlcwa_49",Ks="_padNone_wlcwa_50",Ys="_header_wlcwa_53",Zs="_headerIcon_wlcwa_60",Js="_title_wlcwa_69",Qs="_subtitle_wlcwa_75",Ps="_stat_wlcwa_82",et="_statValue_wlcwa_89",st="_statUnit_wlcwa_97",tt="_statDelta_wlcwa_103",nt="_deltaPositive_wlcwa_108",lt="_deltaNegative_wlcwa_109",at="_deltaNeutral_wlcwa_110",S={card:Ws,bordered:Vs,tilt:zs,closeBtn:Xs,padSm:Gs,padMd:Us,padLg:Hs,padNone:Ks,header:Ys,headerIcon:Zs,title:Js,subtitle:Qs,stat:Ps,statValue:et,statUnit:st,statDelta:tt,deltaPositive:nt,deltaNegative:lt,deltaNeutral:at},ot={none:S.padNone,sm:S.padSm,md:S.padMd,lg:S.padLg},ct=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"10",height:"10",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})});function pe({padding:s="md",bordered:o=!1,tilt:n=!1,onClose:c,closeBtnProps:t,children:i,className:l,...r}){const a=[S.card,ot[s],o?S.bordered:null,n?S.tilt:null,l].filter(Boolean).join(" ");return e.jsxs("div",{...r,className:a,children:[c&&e.jsx("button",{type:"button","aria-label":"Close",...t,className:[S.closeBtn,t==null?void 0:t.className].filter(Boolean).join(" "),onClick:c,children:e.jsx(ct,{})}),i]})}pe.displayName="Card";function Be({icon:s,title:o,subtitle:n,className:c,...t}){return e.jsxs("div",{...t,className:[S.header,c].filter(Boolean).join(" "),children:[s&&e.jsx("span",{className:S.headerIcon,children:s}),e.jsxs("div",{children:[e.jsx("div",{className:S.title,children:o}),n&&e.jsx("div",{className:S.subtitle,children:n})]})]})}Be.displayName="CardHeader";function Ce({value:s,unit:o,delta:n,deltaDirection:c="positive",className:t,...i}){const l=[S.statDelta,c==="positive"?S.deltaPositive:c==="negative"?S.deltaNegative:S.deltaNeutral].filter(Boolean).join(" ");return e.jsxs("div",{...i,className:[S.stat,t].filter(Boolean).join(" "),children:[e.jsxs("span",{className:S.statValue,children:[s,o&&e.jsxs("span",{className:S.statUnit,children:[" ",o]})]}),n&&e.jsx("span",{className:l,children:n})]})}Ce.displayName="CardStat";function ie(s,o,n){const[c,t]=g.useState(o),i=s!==void 0,l=i?s:c,r=g.useCallback(a=>{i||t(a),n==null||n(a)},[i,n]);return[l,r,i]}const it="X",rt=/[a-zA-Z0-9]/;function he(s,o={}){const n=o.allowedPattern??rt;return s.split("").filter(c=>n.test(c)).join("")}function $e(s,o,n={}){const c=n.placeholder??it,t=he(s,n);let i=0,l="";for(const r of o){if(i>=t.length)break;if(r===c){l+=t[i],i+=1;continue}l+=r}return l}const dt="_wrapper_25x8h_1",_t="_field_25x8h_7",ut="_label_25x8h_13",ht="_input_25x8h_22",ft="_hasIcon_25x8h_52",mt="_hasIconRight_25x8h_55",xt="_hasClear_25x8h_58",jt="_hasClearAndIconRight_25x8h_61",bt="_iconSlot_25x8h_64",gt="_iconSlotRight_25x8h_78",vt="_iconSlotRightWithClear_25x8h_92",kt="_clearBtn_25x8h_95",W={wrapper:dt,field:_t,label:ut,input:ht,hasIcon:ft,hasIconRight:mt,hasClear:xt,hasClearAndIconRight:jt,iconSlot:bt,iconSlotRight:gt,iconSlotRightWithClear:vt,clearBtn:kt},Nt=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"12",height:"12",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})}),Ie=g.forwardRef(({label:s,icon:o,iconPosition:n="left",clearable:c=!1,clearButtonProps:t,clearLabel:i,defaultValue:l="",disabled:r,mask:a,maskAllowedPattern:_,maskPlaceholder:j,selectOnFocus:x=!1,textAlign:h,inputProps:u,onChange:w,onValueChange:L,value:C,wrapperProps:N,fieldProps:b,className:v,style:q,...k},G)=>{const Z=g.useRef(null),[J,f]=ie(C,l,p=>{L==null||L({value:p,rawValue:a?he(p,{allowedPattern:_}):p})});g.useImperativeHandle(G,()=>Z.current);const $=g.useCallback(p=>a?$e(p,a,{allowedPattern:_,placeholder:j}):p,[a,_,j]),B=p=>{var le;const ne=$(p.target.value);p.target.value=ne,f(ne),w==null||w(p),(le=u==null?void 0:u.onChange)==null||le.call(u,p)},I=()=>{var p;f(""),(p=Z.current)==null||p.focus()},y=o&&n==="right",M=o&&n==="left",Q=[W.input,M?W.hasIcon:null,y?W.hasIconRight:null,c&&y?W.hasClearAndIconRight:c?W.hasClear:null,v,u==null?void 0:u.className].filter(Boolean).join(" "),P=p=>{var ne,le;x&&p.target.select(),(ne=k.onFocus)==null||ne.call(k,p),(le=u==null?void 0:u.onFocus)==null||le.call(u,p)},R={...q,...u==null?void 0:u.style,...h?{textAlign:h}:null},V=r||(u==null?void 0:u.disabled),A=e.jsx("input",{...k,...u,ref:Z,disabled:V,value:$(J),onChange:B,onFocus:P,className:Q,style:R}),T=[W.wrapper,N==null?void 0:N.className].filter(Boolean).join(" "),F=e.jsxs("span",{...N,className:T,children:[M?e.jsx("span",{className:W.iconSlot,children:o}):null,A,y?e.jsx("span",{className:[W.iconSlotRight,c?W.iconSlotRightWithClear:null].filter(Boolean).join(" "),children:o}):null,c?e.jsx("button",{type:"button","aria-label":"Clear",title:"Clear",disabled:V||J.length===0,onClick:I,className:W.clearBtn,...t,children:(t==null?void 0:t.children)??e.jsx(Nt,{})}):null]});return!s&&!b?F:e.jsxs("div",{...b,className:[W.field,b==null?void 0:b.className].filter(Boolean).join(" "),children:[s?e.jsx("label",{className:W.label,children:s}):null,F]})});Ie.displayName="Input";const yt="_checkbox_7kjwa_2",wt="_checkboxBox_7kjwa_13",pt="_checked_7kjwa_33",Bt="_indeterminate_7kjwa_42",Ct="_disabled_7kjwa_55",$t="_radio_7kjwa_61",It="_radioDot_7kjwa_72",Tt="_radioChecked_7kjwa_85",Lt="_radioDisabled_7kjwa_97",Mt="_radioGroup_7kjwa_102",St="_switchWrap_7kjwa_109",Rt="_switchTrack_7kjwa_120",Dt="_switchOn_7kjwa_143",qt="_switchDisabled_7kjwa_153",E={checkbox:yt,checkboxBox:wt,checked:pt,indeterminate:Bt,disabled:Ct,radio:$t,radioDot:It,radioChecked:Tt,radioDisabled:Lt,radioGroup:Mt,switchWrap:St,switchTrack:Rt,switchOn:Dt,switchDisabled:qt},At=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M20 6 9 17l-5-5"})});function Te({label:s,checked:o,defaultChecked:n,indeterminate:c=!1,disabled:t=!1,onChange:i,className:l,...r}){const a=o??n??!1,_=[E.checkbox,a&&!c?E.checked:null,c?E.indeterminate:null,t?E.disabled:null,l].filter(Boolean).join(" ");return e.jsxs("label",{className:_,children:[e.jsx("input",{...r,type:"checkbox",checked:a,disabled:t,style:{display:"none"},onChange:j=>i==null?void 0:i(j.currentTarget.checked)}),e.jsx("span",{className:E.checkboxBox,children:!c&&e.jsx(At,{})}),s]})}Te.displayName="Checkbox";function Le({label:s,checked:o=!1,disabled:n=!1,onChange:c,value:t,className:i,...l}){const r=[E.radio,o?E.radioChecked:null,n?E.radioDisabled:null,i].filter(Boolean).join(" ");return e.jsxs("label",{className:r,children:[e.jsx("input",{...l,type:"radio",checked:o,disabled:n,value:t,style:{display:"none"},onChange:a=>c==null?void 0:c(a.currentTarget.value)}),e.jsx("span",{className:E.radioDot}),s]})}Le.displayName="Radio";function Me({children:s,className:o,...n}){const c=[E.radioGroup,o].filter(Boolean).join(" ");return e.jsx("div",{...n,className:c,role:"radiogroup",children:s})}Me.displayName="RadioGroup";function Se({label:s,checked:o,defaultChecked:n,disabled:c=!1,onChange:t,className:i,...l}){const r=o??n??!1,a=[E.switchWrap,r?E.switchOn:null,c?E.switchDisabled:null,i].filter(Boolean).join(" ");return e.jsxs("label",{className:a,children:[e.jsx("input",{...l,type:"checkbox",checked:r,disabled:c,style:{display:"none"},onChange:_=>t==null?void 0:t(_.currentTarget.checked)}),e.jsx("span",{className:E.switchTrack}),s]})}Se.displayName="Switch";const Ot="_menu_pga52_1",Et="_item_pga52_13",Ft="_active_pga52_41",Wt="_danger_pga52_53",Vt="_disabled_pga52_65",zt="_kbd_pga52_71",Xt="_separator_pga52_79",oe={menu:Ot,item:Et,active:Ft,danger:Wt,disabled:Vt,kbd:zt,separator:Xt};function Re({children:s,className:o,...n}){const c=[oe.menu,o].filter(Boolean).join(" ");return e.jsx("div",{...n,className:c,role:"menu",children:s})}Re.displayName="Menu";function De({icon:s,kbd:o,active:n=!1,danger:c=!1,disabled:t=!1,children:i,className:l,...r}){const a=[oe.item,n?oe.active:null,c?oe.danger:null,t?oe.disabled:null,l].filter(Boolean).join(" ");return e.jsxs("button",{...r,type:"button",className:a,disabled:t,role:"menuitem",children:[s,i,o&&e.jsx("span",{className:oe.kbd,children:o})]})}De.displayName="MenuItem";function qe({className:s,...o}){const n=[oe.separator,s].filter(Boolean).join(" ");return e.jsx("div",{...o,className:n,role:"separator"})}qe.displayName="MenuSeparator";const Gt="_backdrop_pya14_1",Ut="_modal_pya14_23",Ht="_header_pya14_37",Kt="_titleBlock_pya14_45",Yt="_title_pya14_45",Zt="_subtitle_pya14_58",Jt="_closeBtn_pya14_64",Qt="_body_pya14_86",Pt="_footer_pya14_92",se={backdrop:Gt,modal:Ut,header:Ht,titleBlock:Kt,title:Yt,subtitle:Zt,closeBtn:Jt,body:Qt,footer:Pt},en=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"11",height:"11",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})}),Ae=g.forwardRef(({open:s,title:o,subtitle:n,children:c,footer:t,closeOnBackdrop:i=!0,showCloseButton:l=!0,backdropProps:r,modalProps:a,headerProps:_,bodyProps:j,footerProps:x,closeButtonProps:h,onOpenChange:u,onClose:w},L)=>{const C=g.useRef(null);g.useImperativeHandle(L,()=>C.current),g.useEffect(()=>{if(!s)return;const k=G=>{G.key==="Escape"&&N()};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[s]);const N=()=>{u==null||u(!1),w==null||w()},b=k=>{i&&k.target===k.currentTarget&&N()};if(!s)return null;const v=[se.backdrop,r==null?void 0:r.className].filter(Boolean).join(" "),q=[se.modal,a==null?void 0:a.className].filter(Boolean).join(" ");return e.jsx("div",{...r,className:v,onClick:b,role:"presentation",children:e.jsxs("div",{ref:C,...a,className:q,role:"dialog","aria-modal":"true",children:[(o||l)&&e.jsxs("header",{..._,className:[se.header,_==null?void 0:_.className].filter(Boolean).join(" "),children:[e.jsxs("div",{className:se.titleBlock,children:[o?e.jsx("div",{className:se.title,children:o}):null,n?e.jsx("div",{className:se.subtitle,children:n}):null]}),l&&e.jsx("button",{type:"button","aria-label":"Close",className:se.closeBtn,onClick:N,...h,children:(h==null?void 0:h.children)??e.jsx(en,{})})]}),e.jsx("section",{...j,className:[se.body,j==null?void 0:j.className].filter(Boolean).join(" "),children:c}),t&&e.jsx("footer",{...x,className:[se.footer,x==null?void 0:x.className].filter(Boolean).join(" "),children:t})]})})});Ae.displayName="Modal";const sn="_wrapper_10d4l_1",tn="_pop_10d4l_8",nn="_sideRight_10d4l_22",ln="_sideTop_10d4l_27",an="_arrow_10d4l_34",on="_head_10d4l_60",cn="_title_10d4l_67",rn="_closeBtn_10d4l_74",dn="_body_10d4l_105",te={wrapper:sn,pop:tn,sideRight:nn,sideTop:ln,arrow:an,head:on,title:cn,closeBtn:rn,body:dn},_n=()=>e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]});function Oe({open:s,defaultOpen:o=!1,title:n,children:c,trigger:t,side:i="bottom-start",showCloseButton:l=!0,onOpenChange:r,popProps:a}){const[_,j]=g.useState(o),x=s!==void 0,h=x?s:_,u=g.useRef(null);function w(b){x||j(b),r==null||r(b)}g.useEffect(()=>{function b(v){u.current&&!u.current.contains(v.target)&&w(!1)}return h&&document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[h]);const L=i.startsWith("top"),C=i.endsWith("end"),N=[te.pop,C?te.sideRight:null,L?te.sideTop:null,a==null?void 0:a.className].filter(Boolean).join(" ");return e.jsxs("div",{ref:u,className:te.wrapper,children:[t&&e.jsx("div",{onClick:()=>w(!h),style:{display:"inline-flex"},children:t}),h&&e.jsxs("div",{...a,className:N,children:[e.jsx("span",{className:te.arrow}),(n||l)&&e.jsxs("div",{className:te.head,children:[n&&e.jsx("span",{className:te.title,children:n}),l&&e.jsx("button",{type:"button",className:te.closeBtn,"aria-label":"Close",onClick:()=>w(!1),children:e.jsx(_n,{})})]}),e.jsx("div",{className:te.body,children:c})]})]})}Oe.displayName="Popover";const un="_progress_1sdsr_1",hn="_circular_1sdsr_10",fn="_header_1sdsr_15",mn="_label_1sdsr_23",xn="_value_1sdsr_33",jn="_track_1sdsr_41",bn="_fill_1sdsr_55",gn="_accent_1sdsr_63",vn="_success_1sdsr_64",kn="_warning_1sdsr_65",Nn="_danger_1sdsr_66",yn="_info_1sdsr_67",wn="_neutral_1sdsr_68",pn="_indeterminate_1sdsr_72",Bn="_progressSlide_1sdsr_1",Cn="_circleLabel_1sdsr_84",$n="_circle_1sdsr_84",In="_circleValue_1sdsr_132",Tn="_indeterminateCircle_1sdsr_146",Ln="_progressSpin_1sdsr_1",Mn="_progressSpinReverse_1sdsr_1",O={progress:un,circular:hn,header:fn,label:mn,value:xn,track:jn,"bar-sm":"_bar-sm_1sdsr_51","bar-md":"_bar-md_1sdsr_52","bar-lg":"_bar-lg_1sdsr_53",fill:bn,accent:gn,success:vn,warning:kn,danger:Nn,info:yn,neutral:wn,indeterminate:pn,progressSlide:Bn,circleLabel:Cn,circle:$n,"circle-sm":"_circle-sm_1sdsr_117","circle-md":"_circle-md_1sdsr_122","circle-lg":"_circle-lg_1sdsr_127",circleValue:In,indeterminateCircle:Tn,progressSpin:Ln,progressSpinReverse:Mn};function Sn(s,o,n){return Math.min(Math.max(s,o),n)}function Ee({value:s,max:o=100,variant:n="accent",size:c="md",shape:t="bar",label:i,valueLabel:l,showValue:r,indeterminate:a=!1,className:_,...j}){const x=o>0?o:100,h=a||typeof s!="number",u=typeof s=="number"?Sn(s,0,x):0,w=Math.round(u/x*100),L=r??t==="circle",C=[O.progress,O[n],t==="circle"?O.circular:null,_].filter(Boolean).join(" "),N={role:"progressbar","aria-valuemin":h?void 0:0,"aria-valuemax":h?void 0:x,"aria-valuenow":h?void 0:u,"aria-valuetext":l};if(t==="circle"){const v=[O.circle,O[`circle-${c}`],h?O.indeterminateCircle:null].filter(Boolean).join(" ");return e.jsxs("div",{...j,className:C,children:[i&&e.jsx("span",{className:O.circleLabel,children:i}),e.jsx("div",{className:v,style:{"--progress-percent":`${w}%`},...N,children:L&&e.jsx("span",{className:O.circleValue,children:l??(h?"Loading":`${w}%`)})})]})}const b=[O.track,O[`bar-${c}`],h?O.indeterminate:null].filter(Boolean).join(" ");return e.jsxs("div",{...j,className:C,children:[(i||L)&&e.jsxs("div",{className:O.header,children:[i&&e.jsx("span",{className:O.label,children:i}),L&&e.jsx("span",{className:O.value,children:l??(h?"Loading":`${w}%`)})]}),e.jsx("div",{className:b,...N,children:e.jsx("span",{className:O.fill,style:h?void 0:{width:`${w}%`}})})]})}Ee.displayName="Progress";const Rn="_group_1ltkm_1",Dn="_pb_1ltkm_11",qn="_on_1ltkm_40",An="_accent_1ltkm_45",On="_solo_1ltkm_50",En="_disabled_1ltkm_65",ce={group:Rn,pb:Dn,on:qn,accent:An,solo:On,disabled:En};function Fe({children:s,className:o,...n}){const c=[ce.group,o].filter(Boolean).join(" ");return e.jsx("div",{...n,className:c,role:"group",children:s})}Fe.displayName="PushButtonGroup";function We({on:s=!1,accent:o=!1,solo:n=!1,icon:c,children:t,disabled:i=!1,className:l,...r}){const a=[ce.pb,s?ce.on:null,s&&o?ce.accent:null,n?ce.solo:null,i?ce.disabled:null,l].filter(Boolean).join(" ");return e.jsxs("button",{...r,type:"button",className:a,disabled:i,children:[c,t]})}We.displayName="PushButton";const Fn="_root_qhol4_1",Wn="_field_qhol4_6",Vn="_label_qhol4_12",zn="_labelMeta_qhol4_24",Xn="_trigger_qhol4_33",Gn="_triggerOpen_qhol4_59",Un="_triggerConnectedBottom_qhol4_64",Hn="_triggerConnectedTop_qhol4_69",Kn="_triggerValue_qhol4_74",Yn="_triggerPlaceholder_qhol4_83",Zn="_chevron_qhol4_85",Jn="_chevronOpen_qhol4_94",Qn="_chips_qhol4_97",Pn="_chip_qhol4_97",el="_chipOverflow_qhol4_120",sl="_clearBtn_qhol4_123",tl="_popover_qhol4_143",nl="_popoverBottom_qhol4_154",ll="_popoverTop_qhol4_162",al="_search_qhol4_181",ol="_searchIcon_qhol4_188",cl="_searchInput_qhol4_195",il="_list_qhol4_209",rl="_item_qhol4_217",dl="_itemAlignLeft_qhol4_230",_l="_itemAlignCenter_qhol4_231",ul="_itemAlignRight_qhol4_232",hl="_itemActive_qhol4_235",fl="_itemDisabled_qhol4_243",ml="_itemMeta_qhol4_245",xl="_checkbox_qhol4_254",jl="_checkboxChecked_qhol4_266",bl="_checkIcon_qhol4_278",gl="_emptyState_qhol4_299",vl="_popFooter_qhol4_307",kl="_popFooterBtn_qhol4_317",m={root:Fn,field:Wn,label:Vn,labelMeta:zn,trigger:Xn,triggerOpen:Gn,triggerConnectedBottom:Un,triggerConnectedTop:Hn,triggerValue:Kn,triggerPlaceholder:Yn,chevron:Zn,chevronOpen:Jn,chips:Qn,chip:Pn,chipOverflow:el,clearBtn:sl,popover:tl,popoverBottom:nl,popoverTop:ll,search:al,searchIcon:ol,searchInput:cl,list:il,item:rl,itemAlignLeft:dl,itemAlignCenter:_l,itemAlignRight:ul,itemActive:hl,itemDisabled:fl,itemMeta:ml,checkbox:xl,checkboxChecked:jl,checkIcon:bl,emptyState:gl,popFooter:vl,popFooterBtn:kl},Nl=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"14",height:"14",children:e.jsx("path",{d:"m6 9 6 6 6-6"})}),ke=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"12",height:"12",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})}),yl=()=>e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"11",cy:"11",r:"7"}),e.jsx("path",{d:"m20 20-3.5-3.5"})]}),de=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",width:"10",height:"10",children:e.jsx("path",{d:"M20 6 9 17l-5-5"})}),wl=(s,o)=>{const n=o.trim().toLowerCase();return n?s.filter(c=>String(c.label).toLowerCase().includes(n)):s},Ve=g.forwardRef(({label:s,clearable:o=!1,defaultValue:n=null,disabled:c=!1,emptyLabel:t="No options found",filterOptions:i=wl,isLoading:l=!1,loadingLabel:r="Loading...",multiple:a=!1,onSearchChange:_,onValueChange:j,options:x,optionsAlign:h="left",optionsPosition:u="bottom",placeholder:w="Select",searchable:L=!1,searchPlaceholder:C="Search...",showSelectedCount:N=!0,showClearAll:b=!0,showSelectedValues:v=!0,closeOnSelect:q,selectProps:k,value:G,className:Z,...J},f)=>{const[$,B]=g.useState(!1),[I,y]=g.useState(""),M=g.useRef(null),[Q,P]=ie(G,n,d=>{const D=x.filter(U=>Array.isArray(d)?d.includes(U.value):U.value===d);j==null||j(d,D)}),R=g.useMemo(()=>Array.isArray(Q)?Q:Q?[Q]:[],[Q]),V=g.useMemo(()=>x.filter(d=>R.includes(d.value)),[x,R]),A=g.useMemo(()=>i(x,I),[i,x,I]);g.useEffect(()=>{if(!$)return;const d=D=>{M.current&&!M.current.contains(D.target)&&B(!1)};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[$]);const T=d=>{y(d),_==null||_(d)},F=d=>{if(!d.disabled){if(a){const D=R.includes(d.value)?R.filter(U=>U!==d.value):[...R,d.value];P(D),q&&B(!1);return}P(d.value),(q??!0)&&B(!1)}},p=()=>{P(a?[]:null),T("")},ne=()=>{if(R.length>0){p();return}P(x.filter(d=>!d.disabled).map(d=>d.value))},le=d=>{var D;(D=k==null?void 0:k.onClick)==null||D.call(k,d),!d.defaultPrevented&&!c&&B(U=>!U)},Ke=d=>{var D;(D=k==null?void 0:k.onKeyDown)==null||D.call(k,d),!d.defaultPrevented&&((d.key==="Enter"||d.key===" ")&&(d.preventDefault(),B(U=>!U)),d.key==="Escape"&&B(!1))},xe=u==="top",Ye=[m.trigger,$?m.triggerOpen:null,$?xe?m.triggerConnectedTop:m.triggerConnectedBottom:null,k==null?void 0:k.className].filter(Boolean).join(" "),Ze=!a||v,Je=a&&v&&V.length>0,re=a,Qe=a&&(R.length>0||b),je=Ze&&V.length>0,be=2,ge=V.length-be,Pe=[m.root,Z].filter(Boolean).join(" "),es={left:m.itemAlignLeft,center:m.itemAlignCenter,right:m.itemAlignRight}[h],ve=e.jsxs("div",{ref:M,...J,className:Pe,children:[e.jsxs("button",{...k,type:"button",className:Ye,disabled:c,"aria-haspopup":"listbox","aria-expanded":$,onClick:le,onKeyDown:Ke,children:[Je?e.jsxs("div",{className:m.chips,children:[V.slice(0,be).map(d=>e.jsx("span",{className:m.chip,children:d.label},d.value)),ge>0&&e.jsxs("span",{className:[m.chip,m.chipOverflow].join(" "),children:["+",ge]})]}):e.jsx("span",{className:[m.triggerValue,je?null:m.triggerPlaceholder].filter(Boolean).join(" "),children:je?V.map(d=>d.label).join(", "):w}),o&&R.length>0&&e.jsx("button",{type:"button","aria-label":"Clear",className:m.clearBtn,disabled:c,onClick:d=>{d.stopPropagation(),p()},children:e.jsx(ke,{})}),e.jsx("span",{className:[m.chevron,$?m.chevronOpen:null].filter(Boolean).join(" "),children:e.jsx(Nl,{})})]}),$&&e.jsxs("div",{className:[m.popover,xe?m.popoverTop:m.popoverBottom].join(" "),role:"listbox","aria-multiselectable":a||void 0,children:[L&&e.jsxs("div",{className:m.search,children:[e.jsx("span",{className:m.searchIcon,children:e.jsx(yl,{})}),e.jsx("input",{autoFocus:!0,value:I,placeholder:C,className:m.searchInput,onChange:d=>T(d.target.value)}),I&&e.jsx("button",{className:m.clearBtn,onClick:()=>T(""),children:e.jsx(ke,{})})]}),e.jsxs("ul",{className:[m.list,"sb"].join(" "),children:[l&&e.jsx("li",{className:m.emptyState,children:r}),!l&&A.length===0&&e.jsx("li",{className:m.emptyState,children:t}),!l&&A.map(d=>{const D=R.includes(d.value),U=[m.item,es,D?m.itemActive:null,d.disabled?m.itemDisabled:null].filter(Boolean).join(" ");return e.jsxs("li",{className:U,role:"option","aria-selected":D,onClick:()=>F(d),children:[!re&&h==="right"&&D&&e.jsx("span",{className:m.checkIcon,children:e.jsx(de,{})}),re?e.jsx("span",{className:[m.checkbox,D?m.checkboxChecked:null].filter(Boolean).join(" "),children:D&&e.jsx(de,{})}):null,e.jsx("span",{children:d.label}),d.meta&&e.jsx("span",{className:m.itemMeta,children:d.meta}),!re&&h!=="right"&&D&&e.jsx("span",{className:m.checkIcon,children:e.jsx(de,{})})]},d.value)})]}),Qe&&(N||b)&&e.jsxs("div",{className:m.popFooter,children:[N&&e.jsxs("span",{children:[R.length," selected"]}),b&&e.jsx("button",{className:m.popFooterBtn,onClick:ne,children:R.length>0?"Clear all":"Check all"})]})]})]});return s?e.jsxs("div",{className:m.field,children:[e.jsxs("label",{className:m.label,children:[s,a&&N&&R.length>0&&e.jsxs("span",{className:m.labelMeta,children:["· ",R.length," selected"]})]}),ve]}):ve});Ve.displayName="Select";const pl="_ring_mxe7t_2",Bl="_spin_mxe7t_1",Cl="_ringMuted_mxe7t_12",$l="_sm_mxe7t_14",Il="_md_mxe7t_15",Tl="_lg_mxe7t_16",Ll="_onAccent_mxe7t_19",Ml="_dots_mxe7t_29",Sl="_dot_mxe7t_29",Rl="_dotPulse_mxe7t_1",Dl="_bar_mxe7t_52",ql="_barFill_mxe7t_62",Al="_barSlide_mxe7t_1",K={ring:pl,spin:Bl,ringMuted:Cl,sm:$l,md:Il,lg:Tl,onAccent:Ll,dots:Ml,dot:Sl,dotPulse:Rl,bar:Dl,barFill:ql,barSlide:Al};function fe({variant:s="ring",size:o="md",muted:n=!1,onAccent:c=!1,className:t,...i}){if(s==="dots"){const r=[K.dots,t].filter(Boolean).join(" ");return e.jsxs("span",{...i,className:r,role:"status","aria-label":"Loading",children:[e.jsx("span",{className:K.dot}),e.jsx("span",{className:K.dot}),e.jsx("span",{className:K.dot})]})}if(s==="bar"){const r=[K.bar,t].filter(Boolean).join(" ");return e.jsx("span",{...i,className:r,role:"status","aria-label":"Loading",children:e.jsx("span",{className:K.barFill})})}const l=[K.ring,K[o],n?K.ringMuted:null,c?K.onAccent:null,t].filter(Boolean).join(" ");return e.jsx("span",{...i,className:l,role:"status","aria-label":"Loading"})}fe.displayName="Spinner";const Ol="_tabs_wiau5_1",El="_list_wiau5_9",Fl="_tabItem_wiau5_21",Wl="_tab_wiau5_1",Vl="_closable_wiau5_54",zl="_disabled_wiau5_58",Xl="_closeBtn_wiau5_77",Gl="_panel_wiau5_106",Ul="_raised_wiau5_112",Hl="_inactiveTransparent_wiau5_136",Kl="_rounded_wiau5_145",Yl="_underline_wiau5_186",Zl="_transparent_wiau5_218",z={tabs:Ol,list:El,tabItem:Fl,tab:Wl,closable:Vl,disabled:zl,closeBtn:Xl,panel:Gl,raised:Ul,inactiveTransparent:Hl,rounded:Kl,underline:Yl,transparent:Zl},Jl=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",width:"11",height:"11",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})});function Ql(s){var o,n;return((o=s.find(c=>!c.disabled))==null?void 0:o.value)??((n=s[0])==null?void 0:n.value)??""}function ze({items:s,value:o,defaultValue:n,onValueChange:c,variant:t="raised",ariaLabel:i="Tabs",disabled:l=!1,closable:r=!1,closeLabel:a="Close tab",onTabClose:_,tabClassName:j,tabItemClassName:x,transparent:h=!1,inactiveTransparent:u=!1,className:w,...L}){var J;const C=g.useId(),N=g.useRef([]),[b,v]=ie(o,n??Ql(s),c),q=s.find(f=>f.value===b),k=[z.tabs,z[t],h?z.transparent:null,u?z.inactiveTransparent:null,w].filter(Boolean).join(" "),G=(f,$)=>{var B,I;if(s.length!==0)for(let y=1;y<=s.length;y+=1){const M=(f+y*$+s.length)%s.length;if(!((B=s[M])!=null&&B.disabled)&&!l){(I=N.current[M])==null||I.focus(),v(s[M].value);return}}},Z=(f,$)=>{var B,I;if(f.key==="ArrowRight"){f.preventDefault(),G($,1);return}if(f.key==="ArrowLeft"){f.preventDefault(),G($,-1);return}if(f.key==="Home"){f.preventDefault();const y=l?-1:s.findIndex(M=>!M.disabled);y>=0&&((B=N.current[y])==null||B.focus(),v(s[y].value));return}if(f.key==="End"){f.preventDefault();const y=l?-1:s.map(M=>!M.disabled).lastIndexOf(!0);y>=0&&((I=N.current[y])==null||I.focus(),v(s[y].value))}};return e.jsxs("div",{...L,className:k,children:[e.jsx("div",{className:z.list,role:"tablist","aria-label":i,children:s.map((f,$)=>{var P,R,V;const B=f.value===b,I=l||f.disabled,y=!I&&(f.closable??r),M=`${C}-${f.value}-tab`,Q=`${C}-${f.value}-panel`;return e.jsxs("span",{role:"presentation",className:[z.tabItem,y?z.closable:null,I?z.disabled:null,x,f.className].filter(Boolean).join(" "),"data-selected":B?"true":void 0,children:[e.jsx("button",{...f.tabProps,ref:A=>{N.current[$]=A},type:"button",role:"tab",id:M,"aria-selected":B,"aria-controls":Q,tabIndex:B?0:-1,disabled:I,className:[z.tab,j,(P=f.tabProps)==null?void 0:P.className].filter(Boolean).join(" "),onClick:A=>{var T,F;(F=(T=f.tabProps)==null?void 0:T.onClick)==null||F.call(T,A),A.defaultPrevented||v(f.value)},onKeyDown:A=>{var T,F;(F=(T=f.tabProps)==null?void 0:T.onKeyDown)==null||F.call(T,A),A.defaultPrevented||Z(A,$)},children:f.label}),y&&e.jsx("button",{...f.closeButtonProps,type:"button",className:[z.closeBtn,(R=f.closeButtonProps)==null?void 0:R.className].filter(Boolean).join(" "),"aria-label":f.closeLabel??a,disabled:I,onClick:A=>{var T,F,p;(F=(T=f.closeButtonProps)==null?void 0:T.onClick)==null||F.call(T,A),!A.defaultPrevented&&((p=f.onClose)==null||p.call(f,f.value),_==null||_(f.value))},children:((V=f.closeButtonProps)==null?void 0:V.children)??e.jsx(Jl,{})})]},f.value)})}),(q==null?void 0:q.content)!==void 0&&e.jsx("div",{...q.panelProps,className:[z.panel,(J=q.panelProps)==null?void 0:J.className].filter(Boolean).join(" "),role:"tabpanel",id:`${C}-${q.value}-panel`,"aria-labelledby":`${C}-${q.value}-tab`,children:q.content})]})}ze.displayName="Tabs";const Pl="_field_fazrx_1",ea="_label_fazrx_7",sa="_wrapper_fazrx_16",ta="_textarea_fazrx_20",na="_mono_fazrx_53",la="_hasClear_fazrx_59",aa="_clearBtn_fazrx_62",oa="_footer_fazrx_84",ca="_helpText_fazrx_92",ia="_charCount_fazrx_94",ra="_charCountOver_fazrx_100",X={field:Pl,label:ea,wrapper:sa,textarea:ta,mono:na,hasClear:la,clearBtn:aa,footer:oa,helpText:ca,charCount:ia,charCountOver:ra},da=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"12",height:"12",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})}),Xe=g.forwardRef(({label:s,helpText:o,maxLength:n,clearable:c=!1,mono:t=!1,value:i,defaultValue:l="",disabled:r,textareaProps:a,wrapperProps:_,fieldProps:j,clearButtonProps:x,onChange:h,onValueChange:u,className:w,style:L,...C},N)=>{const[b,v]=ie(i,l,y=>u==null?void 0:u(y)),q=y=>{var M;v(y.target.value),h==null||h(y),(M=a==null?void 0:a.onChange)==null||M.call(a,y)},k=()=>{v("")},G=n!==void 0&&b.length>n,Z=[X.textarea,"sb",t?X.mono:null,c?X.hasClear:null,w,a==null?void 0:a.className].filter(Boolean).join(" "),J=[X.wrapper,_==null?void 0:_.className].filter(Boolean).join(" "),f=[X.field,j==null?void 0:j.className].filter(Boolean).join(" "),$={...L,...a==null?void 0:a.style},B=r||(a==null?void 0:a.disabled),I=e.jsxs("div",{..._,className:J,children:[e.jsx("textarea",{...C,...a,ref:N,disabled:B,maxLength:n,value:b,onChange:q,className:Z,style:$}),c&&e.jsx("button",{type:"button",className:X.clearBtn,disabled:B||b.length===0,"aria-label":"Clear",onClick:k,...x,children:(x==null?void 0:x.children)??e.jsx(da,{})})]});return!s&&!o&&n===void 0?I:e.jsxs("div",{...j,className:f,children:[s&&e.jsx("label",{className:X.label,children:s}),I,(o||n!==void 0)&&e.jsxs("div",{className:X.footer,children:[o&&e.jsx("span",{className:X.helpText,children:o}),n!==void 0&&e.jsxs("span",{className:[X.charCount,G?X.charCountOver:null].filter(Boolean).join(" "),children:[b.length," / ",n]})]})]})});Xe.displayName="Textarea";const _a="_toast_4d9rv_1",ua="_slideUp_4d9rv_1",ha="_toastExiting_4d9rv_27",fa="_slideOut_4d9rv_1",ma="_lead_4d9rv_31",xa="_body_4d9rv_41",ja="_title_4d9rv_49",ba="_message_4d9rv_55",ga="_closeBtn_4d9rv_60",va="_ok_4d9rv_83",ka="_error_4d9rv_86",Na="_warning_4d9rv_89",ya="_info_4d9rv_92",wa="_loading_4d9rv_95",pa="_overlay_4d9rv_99",Ba="_stack_4d9rv_108",Y={toast:_a,slideUp:ua,toastExiting:ha,slideOut:fa,lead:ma,body:xa,title:ja,message:ba,closeBtn:ga,ok:va,error:ka,warning:Na,info:ya,loading:wa,overlay:pa,stack:Ba},Ca=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:e.jsx("path",{d:"M20 6 9 17l-5-5"})}),Ge=({size:s=11})=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:s,height:s,children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})}),$a=()=>e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:[e.jsx("path",{d:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),e.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),e.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),Ia=()=>e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),e.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]}),Ta={ok:e.jsx(Ca,{}),error:e.jsx(Ge,{size:18}),warning:e.jsx($a,{}),info:e.jsx(Ia,{}),loading:e.jsx(fe,{size:"sm",muted:!0})};function me({variant:s="ok",title:o,message:n,overlay:c=!1,onDismiss:t,className:i,...l}){const r=s==="loading",a=[Y.toast,Y[s],i].filter(Boolean).join(" "),_=e.jsxs("div",{...l,className:a,role:"alert",children:[e.jsx("span",{className:Y.lead,children:Ta[s]}),e.jsxs("div",{className:Y.body,children:[e.jsx("div",{className:Y.title,children:o}),n&&e.jsx("div",{className:Y.message,children:n})]}),t&&!r&&e.jsx("button",{type:"button",className:Y.closeBtn,"aria-label":"Dismiss",onClick:t,children:e.jsx(Ge,{})})]});return!c||!r?_:e.jsxs(e.Fragment,{children:[e.jsx("div",{className:Y.overlay,"aria-hidden":"true"}),_]})}me.displayName="Toast";const Ue=g.createContext(null);function La({children:s}){const[o,n]=g.useState([]),c=g.useCallback(l=>{n(r=>r.filter(a=>a.id!==l))},[]),t=g.useCallback(l=>{const r=Math.random().toString(36).slice(2),a=l.duration??(l.variant==="loading"?0:4e3);return n(_=>[..._,{...l,id:r}]),a>0&&setTimeout(()=>c(r),a),r},[c]),i=o.some(l=>l.variant==="loading"&&l.overlay);return e.jsxs(Ue.Provider,{value:{toast:t,dismiss:c},children:[s,typeof document<"u"&&ss.createPortal(e.jsxs(e.Fragment,{children:[i&&e.jsx("div",{className:Y.overlay,"aria-hidden":"true"}),e.jsx("div",{className:Y.stack,children:o.map(l=>e.jsx(me,{variant:l.variant,title:l.title,message:l.message,onDismiss:()=>c(l.id)},l.id))})]}),document.body)]})}function Ma(){const s=g.useContext(Ue);if(!s)throw new Error("useToast must be used within a ToastProvider");return s}const Sa="_wrapper_1pjxy_1",Ra="_tooltip_1pjxy_6",Da="_fadeIn_1pjxy_1",qa="_top_1pjxy_33",Aa="_bottom_1pjxy_52",Oa="_left_1pjxy_72",Ea="_right_1pjxy_94",Fa="_kbd_1pjxy_115",_e={wrapper:Sa,tooltip:Ra,fadeIn:Da,top:qa,bottom:Aa,left:Oa,right:Ea,kbd:Fa},Wa=800;function He({content:s,side:o="top",delay:n=Wa,children:c,wrapperProps:t,disabled:i=!1}){const[l,r]=g.useState(!1),a=g.useRef(null),_=()=>{a.current!==null&&(window.clearTimeout(a.current),a.current=null)};if(g.useEffect(()=>_,[]),i)return e.jsx(e.Fragment,{children:c});const j=()=>{if(_(),n<=0){r(!0);return}a.current=window.setTimeout(()=>{r(!0),a.current=null},n)},x=()=>{_(),r(!1)},h=b=>{var v;(v=t==null?void 0:t.onMouseEnter)==null||v.call(t,b),j()},u=b=>{var v;(v=t==null?void 0:t.onMouseLeave)==null||v.call(t,b),x()},w=b=>{var v;(v=t==null?void 0:t.onFocus)==null||v.call(t,b),j()},L=b=>{var v;(v=t==null?void 0:t.onBlur)==null||v.call(t,b),x()},C=[_e.tooltip,_e[o]].filter(Boolean).join(" "),N=[_e.wrapper,t==null?void 0:t.className].filter(Boolean).join(" ");return e.jsxs("span",{...t,className:N,onMouseEnter:h,onMouseLeave:u,onFocus:w,onBlur:L,children:[c,l&&e.jsx("span",{className:C,role:"tooltip",children:s})]})}He.displayName="Tooltip";exports.Badge=Ne;exports.BreadCrumb=Bs;exports.Breadcrumb=ue;exports.Button=we;exports.Card=pe;exports.CardHeader=Be;exports.CardStat=Ce;exports.Checkbox=Te;exports.Input=Ie;exports.Menu=Re;exports.MenuItem=De;exports.MenuSeparator=qe;exports.Modal=Ae;exports.Popover=Oe;exports.Progress=Ee;exports.PushButton=We;exports.PushButtonGroup=Fe;exports.Radio=Le;exports.RadioGroup=Me;exports.Scrollable=ye;exports.Select=Ve;exports.Spinner=fe;exports.Switch=Se;exports.Tabs=ze;exports.Textarea=Xe;exports.Toast=me;exports.ToastProvider=La;exports.Tooltip=He;exports.applyMask=$e;exports.getRawMaskValue=he;exports.useControlledState=ie;exports.useToast=Ma;
2
2
  //# sourceMappingURL=super-kit.cjs.map