@justin_evo/evo-ui 1.0.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +70 -70
- package/dist/Nav/Nav.d.ts +15 -0
- package/dist/TopNav/TopNav.d.ts +19 -0
- package/dist/evo-ui.css +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +3300 -3157
- package/package.json +1 -1
- package/src/Nav/Nav.tsx +96 -14
- package/src/RichTextArea/RichTextArea.tsx +20 -3
- package/src/TopNav/TopNav.tsx +169 -0
- package/src/css/checkbox.module.scss +8 -5
- package/src/css/nav.module.scss +170 -15
- package/src/css/topnav.module.scss +172 -0
package/dist/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),jn=require("react-dom"),kn=r.createContext(null),Nn="evo-ui-theme";function ln(){return typeof window>"u"||!window.matchMedia?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function dn(n){if(!n||typeof window>"u")return null;try{const t=window.localStorage.getItem(n);if(t==="light"||t==="dark"||t==="system")return t}catch{}return null}const ss=({children:n,defaultTheme:t="system",storageKey:s=Nn,attribute:o="data-theme",enableTransitions:a=!0,target:i})=>{const[l,c]=r.useState(()=>dn(s)??t),[p,v]=r.useState(()=>{const D=dn(s)??t;return D==="system"?ln():D}),y=r.useRef(!0),_=r.useCallback(D=>{if(typeof document>"u")return;const $=i??document.documentElement;a&&!y.current&&($.setAttribute("data-theme-transition","true"),window.clearTimeout($.__evoThemeTimer),$.__evoThemeTimer=window.setTimeout(()=>{$.removeAttribute("data-theme-transition")},250)),o==="class"&&($.classList.remove("light","dark"),$.classList.add(D)),$.setAttribute("data-theme",D),y.current=!1},[o,a,i]);r.useEffect(()=>{_(p)},[p,_]),r.useEffect(()=>{v(l==="system"?ln():l)},[l]),r.useEffect(()=>{if(l!=="system"||typeof window>"u"||!window.matchMedia)return;const D=window.matchMedia("(prefers-color-scheme: dark)"),$=z=>{v(z.matches?"dark":"light")};return D.addEventListener("change",$),()=>D.removeEventListener("change",$)},[l]);const b=r.useCallback(D=>{if(c(D),s&&typeof window<"u")try{window.localStorage.setItem(s,D)}catch{}},[s]),M=r.useCallback(()=>{b(p==="dark"?"light":"dark")},[p,b]),k=r.useMemo(()=>({theme:l,resolvedTheme:p,setTheme:b,toggleTheme:M}),[l,p,b,M]);return e.jsx(kn.Provider,{value:k,children:n})},En=()=>{const n=r.useContext(kn);if(n)return n;const t=typeof document<"u"&&document.documentElement.getAttribute("data-theme")==="dark"?"dark":"light";return{theme:t,resolvedTheme:t,setTheme:()=>{typeof document<"u"&&console.warn("[evo-ui] useEvoTheme called without <EvoThemeProvider>. Wrap your app in <EvoThemeProvider> to enable setTheme().")},toggleTheme:()=>{}}},os=(n=Nn)=>`(function(){try{var s=localStorage.getItem('${n}');var t=s||'system';var r=t==='system'?(matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light'):t;document.documentElement.setAttribute('data-theme',r);}catch(e){}})();`,rs="_toggle_1aoav_1",as="_track_1aoav_19",is="_thumb_1aoav_29",cs="_sun_1aoav_49",ls="_moon_1aoav_54",ds="_sm_1aoav_68",us="_md_1aoav_81",hs="_lg_1aoav_94",gt={toggle:rs,track:as,thumb:is,sun:cs,moon:ls,sm:ds,md:us,lg:hs},ps=({size:n="md",ariaLabel:t="Toggle color theme",className:s})=>{const{resolvedTheme:o,toggleTheme:a}=En(),i=o==="dark",l=[gt.toggle,gt[n],s].filter(Boolean).join(" ");return e.jsx("button",{type:"button",role:"switch","aria-checked":i,"aria-label":t,onClick:a,className:l,"data-theme-state":o,children:e.jsx("span",{className:gt.track,children:e.jsxs("span",{className:gt.thumb,children:[e.jsxs("svg",{className:gt.sun,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"4"}),e.jsx("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"})]}),e.jsx("svg",{className:gt.moon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})})]})})})},_s="_button_5wbw9_1",fs="_label_5wbw9_38",ms="_icon_5wbw9_44",vs="_spinner_5wbw9_56",xs="_sm_5wbw9_72",gs="_md_5wbw9_80",bs="_lg_5wbw9_82",ys="_rounded_5wbw9_90",ws="_square_5wbw9_94",js="_iconOnly_5wbw9_106",ks="_fullWidth_5wbw9_119",Ns="_solid_5wbw9_124",Es="_outline_5wbw9_126",Ts="_ghost_5wbw9_130",Is="_soft_5wbw9_135",$s="_primary_5wbw9_139",Cs="_secondary_5wbw9_197",Ms="_danger_5wbw9_257",Ls="_warning_5wbw9_315",Ds="_success_5wbw9_371",Bs="_info_5wbw9_429",Ge={button:_s,label:fs,icon:ms,spinner:vs,"evo-btn-spin":"_evo-btn-spin_5wbw9_1",sm:xs,md:gs,lg:bs,rounded:ys,square:ws,iconOnly:js,fullWidth:ks,solid:Ns,outline:Es,ghost:Ts,soft:Is,primary:$s,secondary:Cs,danger:Ms,warning:Ls,success:Ds,info:Bs},Ss=r.forwardRef(function({label:t,children:s,variant:o="solid",severity:a="primary",size:i="md",shape:l="default",iconLeft:c,iconRight:p,loading:v=!1,loadingText:y,fullWidth:_=!1,disabled:b,type:M="button",className:k,...D},$){const q=v?y:s??t,G=b||v,H=[Ge.button,Ge[o],Ge[a],Ge[i],l!=="default"?Ge[l]:"",_?Ge.fullWidth:"",q?"":Ge.iconOnly,k].filter(Boolean).join(" ");return e.jsxs("button",{ref:$,type:M,className:H,disabled:G,"aria-busy":v||void 0,...D,children:[v?e.jsx("span",{className:Ge.spinner,"aria-hidden":"true"}):c&&e.jsx("span",{className:Ge.icon,children:c}),q!=null&&q!==""&&e.jsx("span",{className:Ge.label,children:q}),!v&&p&&e.jsx("span",{className:Ge.icon,children:p})]})}),Rs="_root_kkcxo_1",As="_elevated_kkcxo_15",zs="_outlined_kkcxo_20",Ps="_ghost_kkcxo_26",Os="_media_kkcxo_40",Ws="_interactive_kkcxo_72",Hs="_mediaImg_kkcxo_112",Fs="_header_kkcxo_119",qs="_body_kkcxo_126",Vs="_footer_kkcxo_132",Us="_title_kkcxo_141",Gs="_description_kkcxo_149",Ke={root:Rs,elevated:As,outlined:zs,ghost:Ps,"orient-vertical":"_orient-vertical_kkcxo_32","orient-horizontal":"_orient-horizontal_kkcxo_36",media:Os,"orient-responsive":"_orient-responsive_kkcxo_51",interactive:Ws,mediaImg:Hs,header:Fs,body:qs,footer:Vs,title:Us,description:Gs};function xt(...n){return n.filter(Boolean).join(" ")}function Ks(n,t,s,o){return xt(Ke.root,Ke[n],Ke[`orient-${t}`],s&&Ke.interactive,o)}const Bt=r.forwardRef(function(t,s){const{variant:o="elevated",orientation:a="vertical",interactive:i,className:l,children:c,...p}=t,v=i===!0,y=Ks(o,a,v,l);if(v&&typeof p.href=="string"){const _=p;return e.jsx("a",{ref:s,className:y,..._,children:c})}if(v){const{type:_="button",...b}=p;return e.jsx("button",{ref:s,type:_,className:y,...b,children:c})}return e.jsx("div",{ref:s,className:y,...p,children:c})});Bt.displayName="EvoCardRoot";const Ut=r.forwardRef(function({className:t,...s},o){return e.jsx("div",{ref:o,className:xt(Ke.header,t),...s})});Ut.displayName="EvoCardHeader";const Gt=r.forwardRef(function({className:t,...s},o){return e.jsx("div",{ref:o,className:xt(Ke.body,t),...s})});Gt.displayName="EvoCardBody";const Kt=r.forwardRef(function({className:t,...s},o){return e.jsx("div",{ref:o,className:xt(Ke.footer,t),...s})});Kt.displayName="EvoCardFooter";const Qt=r.forwardRef(function({as:t="h3",className:s,children:o,...a},i){return r.createElement(t,{ref:i,className:xt(Ke.title,s),...a},o)});Qt.displayName="EvoCardTitle";const Yt=r.forwardRef(function({className:t,...s},o){return e.jsx("p",{ref:o,className:xt(Ke.description,t),...s})});Yt.displayName="EvoCardDescription";const Xt=r.forwardRef(function({src:t,alt:s,aspectRatio:o,className:a,style:i,children:l,...c},p){const v=o!=null?{aspectRatio:o,...i}:i;return e.jsx("div",{ref:p,className:xt(Ke.media,a),style:v,...c,children:t?e.jsx("img",{src:t,alt:s??"",className:Ke.mediaImg}):l})});Xt.displayName="EvoCardMedia";const ct=Bt;ct.Root=Bt;ct.Header=Ut;ct.Title=Qt;ct.Description=Yt;ct.Body=Gt;ct.Footer=Kt;ct.Media=Xt;const Qs={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch",baseline:"baseline"},Ys={start:"flex-start",center:"center",end:"flex-end",between:"space-between",around:"space-around",evenly:"space-evenly"},Xs=({children:n,direction:t="column",gap:s="1rem",align:o="stretch",justify:a="start",wrap:i=!1,className:l="",style:c})=>e.jsx("div",{className:l,style:{display:"flex",flexDirection:t,gap:typeof s=="number"?`${s}px`:s,alignItems:Qs[o],justifyContent:Ys[a],flexWrap:i?"wrap":"nowrap",...c},children:n}),Pt=n=>n===void 0?void 0:typeof n=="number"?`${n}px`:n,Js=({children:n,colSpan:t,rowSpan:s,className:o="",style:a})=>e.jsx("div",{className:o,style:{gridColumn:t?`span ${t}`:void 0,gridRow:s?`span ${s}`:void 0,...a},children:n}),Tn=({children:n,cols:t=3,rows:s,gap:o="1rem",colGap:a,rowGap:i,className:l="",style:c})=>e.jsx("div",{className:l,style:{display:"grid",gridTemplateColumns:typeof t=="number"?`repeat(${t}, 1fr)`:t,gridTemplateRows:s?typeof s=="number"?`repeat(${s}, auto)`:s:void 0,gap:Pt(o),columnGap:Pt(a),rowGap:Pt(i),...c},children:n});Tn.Item=Js;const Zs="_divider_rorxd_1",eo="_horizontal_rorxd_6",to="_vertical_rorxd_13",no="_labeled_rorxd_20",so="_line_rorxd_27",oo="_labelText_rorxd_33",ut={divider:Zs,horizontal:eo,vertical:to,labeled:no,line:so,labelText:oo},ro=({orientation:n="horizontal",label:t,className:s=""})=>t?e.jsxs("div",{className:`${ut.labeled} ${s}`,children:[e.jsx("div",{className:ut.line}),e.jsx("span",{className:ut.labelText,children:t}),e.jsx("div",{className:ut.line})]}):e.jsx("div",{className:[ut.divider,n==="vertical"?ut.vertical:ut.horizontal,s].filter(Boolean).join(" ")}),ao="_container_131l9_1",io="_centered_131l9_7",co="_sm_131l9_12",lo="_md_131l9_16",uo="_lg_131l9_20",ho="_xl_131l9_24",po="_full_131l9_28",Ot={container:ao,centered:io,sm:co,md:lo,lg:uo,xl:ho,full:po},_o=({children:n,size:t="lg",centered:s=!0,className:o=""})=>e.jsx("div",{className:[Ot.container,Ot[t],s?Ot.centered:"",o].filter(Boolean).join(" "),children:n}),fo="_tabs_9memw_1",mo="_tabList_9memw_6",vo="_tab_9memw_1",xo="_disabled_9memw_36",go="_active_9memw_36",bo="_tabPanel_9memw_52",wt={tabs:fo,tabList:mo,tab:vo,disabled:xo,active:go,tabPanel:bo},In=r.createContext(null),$n=()=>{const n=r.useContext(In);if(!n)throw new Error("Tab components must be used within EvoTabs");return n},yo=({children:n,className:t=""})=>e.jsx("div",{className:`${wt.tabList} ${t}`,role:"tablist",children:n}),wo=({id:n,children:t,disabled:s=!1,className:o=""})=>{const{active:a,setActive:i}=$n();return e.jsx("button",{role:"tab","aria-selected":a===n,disabled:s,className:[wt.tab,a===n?wt.active:"",s?wt.disabled:"",o].filter(Boolean).join(" "),onClick:()=>i(n),children:t})},jo=({id:n,children:t,className:s=""})=>{const{active:o}=$n();return o!==n?null:e.jsx("div",{role:"tabpanel",className:`${wt.tabPanel} ${s}`,children:t})},St=({children:n,defaultTab:t="",className:s=""})=>{const[o,a]=r.useState(t);return e.jsx(In.Provider,{value:{active:o,setActive:a},children:e.jsx("div",{className:`${wt.tabs} ${s}`,children:n})})};St.List=yo;St.Tab=wo;St.Panel=jo;const ko="_breadcrumb_7jmv3_1",No="_item_7jmv3_12",Eo="_separator_7jmv3_18",To="_link_7jmv3_28",Io="_text_7jmv3_44",$o="_current_7jmv3_49",yt={breadcrumb:ko,item:No,separator:Eo,link:To,text:Io,current:$o},Co=({children:n,href:t,current:s=!1})=>e.jsx("li",{className:yt.item,children:t&&!s?e.jsx("a",{href:t,className:yt.link,children:n}):e.jsx("span",{className:[yt.text,s?yt.current:""].filter(Boolean).join(" "),"aria-current":s?"page":void 0,children:n})}),Cn=({children:n,separator:t="/",className:s=""})=>{const o=r.Children.toArray(n);return e.jsx("nav",{"aria-label":"breadcrumb",className:s,children:e.jsx("ol",{className:yt.breadcrumb,children:o.map((a,i)=>e.jsxs(r.Fragment,{children:[a,i<o.length-1&&e.jsx("li",{className:yt.separator,"aria-hidden":"true",children:t})]},i))})})};Cn.Item=Co;const Mo="_navContainer_petvt_1",Lo="_navList_petvt_7",Do="_navLi_petvt_7",Bo="_navRow_petvt_20",So="_active_petvt_51",Ro="_disabled_petvt_65",Ao="_navRowTop_petvt_71",zo="_navRowSub_petvt_75",Po="_navLabel_petvt_83",Oo="_navIcon_petvt_92",Wo="_chevron_petvt_103",Ho="_chevronOpen_petvt_108",Fo="_navSubList_petvt_112",qo="_navGroup_petvt_124",Vo="_navGroupLabel_petvt_130",Uo="_navSkeletonItem_petvt_140",Go="_navSkeletonIcon_petvt_147",Ko="_navSkeletonText_petvt_156",Qo="_navQuickAction_petvt_172",Yo="_navTrigger_petvt_201",Xo="_navBackdrop_petvt_224",Jo="_navDesktop_petvt_232",Zo="_navMobile_petvt_236",er="_navDrawerOpen_petvt_257",_e={navContainer:Mo,navList:Lo,navLi:Do,navRow:Bo,active:So,disabled:Ro,navRowTop:Ao,navRowSub:zo,navLabel:Po,navIcon:Oo,chevron:Wo,chevronOpen:Ho,navSubList:Fo,navGroup:qo,navGroupLabel:Vo,navSkeletonItem:Uo,navSkeletonIcon:Go,navSkeletonText:Ko,navQuickAction:Qo,navTrigger:Yo,navBackdrop:Xo,navDesktop:Jo,navMobile:Zo,navDrawerOpen:er},Mn=r.createContext(null),un=r.createContext({depth:0});function tr(n){const[t,s]=r.useState(!1);return r.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const o=window.matchMedia(`(max-width: ${n-1}px)`),a=()=>s(o.matches);return a(),o.addEventListener("change",a),()=>o.removeEventListener("change",a)},[n]),t}function Ln(n,t,s){const[o,a]=r.useState(t),i=n!==void 0,l=i?n:o,c=r.useCallback(p=>{i||a(p),s==null||s(p)},[i,s]);return[l,c]}const Ft="data-evo-nav-row";function nr(n){return n?Array.from(n.querySelectorAll(`[${Ft}]:not([data-disabled="true"])`)).filter(t=>t.offsetParent!==null):[]}function $t(n,t,s){var l;const o=nr(n);if(o.length===0)return;const a=o.indexOf(t);let i;s==="first"?i=0:s==="last"?i=o.length-1:i=Math.max(0,Math.min(o.length-1,a+s)),(l=o[i])==null||l.focus()}const sr=({open:n})=>e.jsx("svg",{viewBox:"0 0 16 16",fill:"none",width:"12",height:"12","aria-hidden":"true",className:[_e.chevron,n?_e.chevronOpen:""].filter(Boolean).join(" "),children:e.jsx("path",{d:"M6 4l4 4-4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),or=()=>e.jsx("svg",{viewBox:"0 0 16 16",fill:"none",width:"14",height:"14","aria-hidden":"true",children:e.jsx("path",{d:"M8 3v10M3 8h10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),rr=()=>e.jsx("svg",{viewBox:"0 0 20 20",fill:"none",width:"18",height:"18","aria-hidden":"true",children:e.jsx("path",{d:"M3 5h14M3 10h14M3 15h14",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}),ar=()=>e.jsx("svg",{viewBox:"0 0 20 20",fill:"none",width:"18",height:"18","aria-hidden":"true",children:e.jsx("path",{d:"M5 5l10 10M15 5L5 15",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})});function ir(n){const t=[],s=[],o=a=>{if(Array.isArray(a)){a.forEach(o);return}if(r.isValidElement(a)){const i=a.type;if(typeof i!="string"&&(i==null?void 0:i.displayName)==="EvoNavSubItem"){s.push(a);return}}t.push(a)};return o(n),{label:t,subs:s}}const Dn=r.forwardRef(function({children:t,icon:s,active:o=!1,href:a,onClick:i,open:l,defaultOpen:c=!1,onOpenChange:p,disabled:v=!1,className:y,tier:_},b){const M=r.useContext(Mn),{depth:k}=r.useContext(un),D=r.useRef(null),$=r.useId(),z=`${$}-sub`,{label:q,subs:G}=r.useMemo(()=>ir(t),[t]),H=G.length>0,[w,S]=Ln(H?l:!1,H?c:!1,p),L=r.useCallback(()=>{H&&S(!w)},[H,w,S]),I=r.useCallback(N=>{v||(H&&!a&&L(),i==null||i(N),M!=null&&M.isMobile&&a&&!H&&M.closeDrawer())},[v,H,a,i,M,L]),ee=N=>{var se,J,de;if(v)return;const V=N.currentTarget,Y=V.closest(`.${_e.navContainer}`);switch(N.key){case"ArrowDown":N.preventDefault(),$t(Y,V,1);break;case"ArrowUp":N.preventDefault(),$t(Y,V,-1);break;case"ArrowRight":if(H)if(N.preventDefault(),!w)S(!0);else{const te=V.closest("li"),oe=te==null?void 0:te.querySelector(`ul [${Ft}]`);oe==null||oe.focus()}break;case"ArrowLeft":if(N.preventDefault(),H&&w)S(!1);else if(k>0){const te=(J=(se=V.closest("li"))==null?void 0:se.parentElement)==null?void 0:J.closest("li");(de=te==null?void 0:te.querySelector(`[${Ft}]`))==null||de.focus()}break;case"Home":N.preventDefault(),$t(Y,V,"first");break;case"End":N.preventDefault(),$t(Y,V,"last");break;case"Enter":case" ":{(N.key===" "||a===void 0)&&(N.preventDefault(),I(N));break}}},O=[_e.navRow,_==="subitem"?_e.navRowSub:_e.navRowTop,o?_e.active:"",v?_e.disabled:"",y].filter(Boolean).join(" "),x=_==="subitem"&&k>0?{"--evo-nav-indent":`${k*.875}rem`}:void 0,Q={"data-evo-nav-row":"",id:$,className:O,style:x,"aria-current":o?"page":void 0,"aria-expanded":H?w:void 0,"aria-controls":H?z:void 0,"aria-disabled":v||void 0,"data-disabled":v?"true":void 0,"data-active":o?"true":void 0,tabIndex:v?-1:0,onKeyDown:ee},B=e.jsxs(e.Fragment,{children:[s&&e.jsx("span",{className:_e.navIcon,children:s}),e.jsx("span",{className:_e.navLabel,children:q}),H&&e.jsx(sr,{open:w})]});let re;if(a&&!v){const N={href:a,onClick:I};re=e.jsx("a",{ref:D,...Q,...N,children:B})}else re=e.jsx("button",{ref:D,type:"button",disabled:v,onClick:I,...Q,children:B});return e.jsxs("li",{ref:b,className:_e.navLi,children:[re,H&&e.jsx(un.Provider,{value:{depth:k+1},children:e.jsx("ul",{id:z,role:"group","aria-labelledby":$,hidden:!w,className:_e.navSubList,children:G})})]})}),Jt=r.forwardRef(function(t,s){return e.jsx(Dn,{ref:s,tier:"item",...t})});Jt.displayName="EvoNavItem";const Zt=r.forwardRef(function(t,s){return e.jsx(Dn,{ref:s,tier:"subitem",...t})});Zt.displayName="EvoNavSubItem";const en=r.forwardRef(function({label:t,children:s,className:o},a){const i=r.useId();return e.jsxs("li",{ref:a,className:[_e.navGroup,o].filter(Boolean).join(" "),children:[e.jsx("div",{id:i,role:"heading","aria-level":3,className:_e.navGroupLabel,children:t}),e.jsx("ul",{role:"group","aria-labelledby":i,className:_e.navList,children:s})]})});en.displayName="EvoNavGroup";const Bn=({count:n=4})=>e.jsx(e.Fragment,{children:Array.from({length:n}).map((t,s)=>e.jsxs("li",{"aria-hidden":"true",className:_e.navSkeletonItem,children:[e.jsx("span",{className:_e.navSkeletonIcon}),e.jsx("span",{className:_e.navSkeletonText,style:{width:`${45+s%4*12}%`}})]},s))}),tn=r.forwardRef(function({label:t="Create New",icon:s,className:o,type:a="button",...i},l){return e.jsx("li",{className:_e.navLi,children:e.jsxs("button",{ref:l,type:a,className:[_e.navQuickAction,o].filter(Boolean).join(" "),...i,children:[e.jsx("span",{className:_e.navIcon,children:s??e.jsx(or,{})}),e.jsx("span",{className:_e.navLabel,children:t})]})})});tn.displayName="EvoNavQuickAction";const Sn=r.forwardRef(function({children:t,breakpoint:s=768,drawerOpen:o,defaultDrawerOpen:a=!1,onDrawerOpenChange:i,hideTrigger:l=!1,className:c,"aria-label":p="Main navigation",...v},y){const _=tr(s),[b,M]=Ln(o,a,i),k=r.useCallback(()=>M(!1),[M]),D=r.useId(),$=r.useRef(null);r.useEffect(()=>{if(!_||!b)return;const H=w=>{w.key==="Escape"&&k()};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[_,b,k]),r.useEffect(()=>{if(!_||!b)return;const H=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=H}},[_,b]),r.useEffect(()=>{!_&&b&&k()},[_,b,k]);const z=r.useMemo(()=>({isMobile:_,drawerOpen:b,setDrawerOpen:M,closeDrawer:k,rootId:D}),[_,b,M,k,D]),q=[_e.navContainer,_?_e.navMobile:_e.navDesktop,_&&b?_e.navDrawerOpen:"",c].filter(Boolean).join(" "),G=H=>{$.current=H,typeof y=="function"?y(H):y&&(y.current=H)};return e.jsxs(Mn.Provider,{value:z,children:[_&&!l&&e.jsx("button",{type:"button",className:_e.navTrigger,"aria-expanded":b,"aria-controls":D,"aria-label":b?"Close navigation":"Open navigation",onClick:()=>M(!b),children:b?e.jsx(ar,{}):e.jsx(rr,{})}),_&&b&&e.jsx("div",{className:_e.navBackdrop,"aria-hidden":"true",onClick:k}),e.jsx("nav",{ref:G,id:D,role:"navigation","aria-label":p,"aria-hidden":_&&!b?!0:void 0,className:q,...v,children:e.jsx("ul",{className:_e.navList,children:t})})]})});Sn.displayName="EvoNav";const cr=Object.assign(Sn,{Group:en,Item:Jt,SubItem:Zt,Skeleton:Bn,QuickAction:tn}),lr="_topNav_hpesm_27",dr="_topNavInner_hpesm_35",ur="_topNavBrand_hpesm_43",hr="_topNavMenu_hpesm_52",pr="_topNavItemRow_hpesm_63",_r="_topNavMenuScroll_hpesm_68",fr="_topNavItem_hpesm_63",mr="_topNavItemActive_hpesm_108",vr="_topNavItemLabel_hpesm_117",xr="_topNavIcon_hpesm_121",gr="_topNavActions_hpesm_131",br="_topNavToggle_hpesm_139",yr="_toggleIcon_hpesm_163",wr="_topNavDropdown_hpesm_167",jr="_topNavDropdownContent_hpesm_183",kr="_topNavDropdownContentOpen_hpesm_206",Nr="_topNavDropdownItem_hpesm_211",Er="_topNavMenuDrawer_hpesm_247",Tr="_topNavDropdownTrigger_hpesm_265",Ir="_topNavMenuDrawerClosed_hpesm_272",$r="_topNavDropdownInDrawer_hpesm_278",Cr="_topNavBackdrop_hpesm_291",Mr="_topNavReducedMotion_hpesm_301",he={topNav:lr,topNavInner:dr,topNavBrand:ur,topNavMenu:hr,topNavItemRow:pr,topNavMenuScroll:_r,topNavItem:fr,topNavItemActive:mr,topNavItemLabel:vr,topNavIcon:xr,topNavActions:gr,topNavToggle:br,toggleIcon:yr,topNavDropdown:wr,topNavDropdownContent:jr,topNavDropdownContentOpen:kr,topNavDropdownItem:Nr,topNavMenuDrawer:Er,topNavDropdownTrigger:Tr,topNavMenuDrawerClosed:Ir,topNavDropdownInDrawer:$r,topNavBackdrop:Cr,topNavReducedMotion:Mr},Ue=(...n)=>n.filter(Boolean).join(" ");function Lr(n,t){return s=>{n==null||n(s),s.defaultPrevented||t==null||t(s)}}function Rn(n){const{value:t,defaultValue:s,onChange:o}=n,[a,i]=r.useState(s),l=t!==void 0,c=l?t:a,p=r.useCallback(v=>{l||i(v),o==null||o(v)},[l,o]);return[c,p]}const Dr=typeof window<"u"?r.useLayoutEffect:r.useEffect;function nn(n,t=!1){const[s,o]=r.useState(t);return Dr(()=>{var l;if(typeof window>"u"||!window.matchMedia)return;const a=window.matchMedia(n),i=()=>o(a.matches);return i(),(l=a.addEventListener)==null||l.call(a,"change",i),()=>{var c;return(c=a.removeEventListener)==null?void 0:c.call(a,"change",i)}},[n]),s}const Br=n=>nn(`(max-width: ${n-1}px)`),Sr=()=>nn("(hover: hover) and (pointer: fine)",!0),Rr=()=>nn("(prefers-reduced-motion: reduce)");function qt(n){return n?Array.from(n.querySelectorAll('a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"]), input:not([disabled]), select:not([disabled]), textarea:not([disabled])')).filter(t=>!t.hasAttribute("aria-hidden")&&t.offsetParent!==null):[]}const An=r.forwardRef(function({children:t,...s},o){const a=r.Children.only(t),i=a.props??{},l={...s,...i};l.className=Ue(s.className,i.className),(s.style||i.style)&&(l.style={...s.style,...i.style});for(const c of Object.keys(s))if(c.startsWith("on")&&typeof s[c]=="function"){const p=s[c],v=i[c];l[c]=Lr(p,v)}return r.cloneElement(a,l)}),Tt=r.createContext(null);function zn(n){const t=r.useContext(Tt);if(!t)throw new Error(`EvoTopNav.${n} must be rendered inside <EvoTopNav>.`);return t}const Pn=r.createContext(null),Ar=({open:n})=>e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",className:he.toggleIcon,children:n?e.jsx(e.Fragment,{children:e.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}):e.jsx(e.Fragment,{children:e.jsx("path",{d:"M3 5h12M3 9h12M3 13h12",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})})}),zr=({open:n})=>e.jsx("svg",{viewBox:"0 0 12 12",width:"10",height:"10",fill:"none","aria-hidden":"true",className:Ue(he.dropdownChevron,n&&he.dropdownChevronOpen),children:e.jsx("path",{d:"M3 4.5l3 3 3-3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),On=r.forwardRef(function({children:t,className:s,...o},a){return e.jsx("div",{ref:a,className:Ue(he.topNavBrand,s),...o,children:t})}),Wn=r.forwardRef(function({children:t,className:s,...o},a){const i=zn("Menu"),l=r.useRef(null),c=_=>{l.current=_,i.menuRef.current=_,typeof a=="function"?a(_):a&&(a.current=_)},p=i.toggleCount>0,v=i.isCollapsed&&p,y=v&&!i.drawerOpen;return e.jsx("ul",{ref:c,id:i.menuId,className:Ue(he.topNavMenu,v&&he.topNavMenuDrawer,y&&he.topNavMenuDrawerClosed,i.isCollapsed&&!p&&he.topNavMenuScroll,s),"data-state":v?i.drawerOpen?"open":"closed":"inline","aria-hidden":y||void 0,...o,children:t})}),Hn=r.forwardRef(function({children:t,active:s,icon:o,href:a,target:i,rel:l,onClick:c,asChild:p,className:v},y){const _=r.useContext(Tt),b=!!_&&_.isCollapsed&&_.drawerOpen,M=z=>{c==null||c(z),!z.defaultPrevented&&b&&_.setDrawerOpen(!1)},k={className:Ue(he.topNavItem,s&&he.topNavItemActive,v),"aria-current":s?"page":void 0,"data-active":s||void 0},D=e.jsxs(e.Fragment,{children:[o&&e.jsx("span",{className:he.topNavIcon,"aria-hidden":"true",children:o}),e.jsx("span",{className:he.topNavItemLabel,children:t})]});let $;return p?$=e.jsx(An,{...k,onClick:M,ref:y,children:t}):a?$=e.jsx("a",{ref:y,href:a,target:i,rel:l??(i==="_blank"?"noopener noreferrer":void 0),onClick:M,...k,children:D}):$=e.jsx("button",{ref:y,type:"button",onClick:M,...k,children:D}),e.jsx("li",{className:he.topNavItemRow,children:$})}),Fn=r.forwardRef(function({children:t,className:s,...o},a){return e.jsx("div",{ref:a,className:Ue(he.topNavActions,s),...o,children:t})}),qn=r.forwardRef(function({icon:t,className:s,onClick:o,"aria-label":a,...i},l){const c=zn("Toggle"),p=r.useRef(null);r.useEffect(()=>c.registerToggle(),[c]);const v=_=>{p.current=_,c.toggleRef.current=_,typeof l=="function"?l(_):l&&(l.current=_)},y=_=>{o==null||o(_),_.defaultPrevented||c.setDrawerOpen(!c.drawerOpen)};return e.jsx("button",{ref:v,id:c.toggleId,type:"button",className:Ue(he.topNavToggle,s),"aria-expanded":c.drawerOpen,"aria-controls":c.menuId,"aria-label":a??(c.drawerOpen?"Close menu":"Open menu"),onClick:y,...i,children:t??e.jsx(Ar,{open:c.drawerOpen})})}),Vn=({label:n,icon:t,active:s,hoverable:o=!0,open:a,defaultOpen:i=!1,onOpenChange:l,children:c,className:p})=>{const v=r.useContext(Tt),y=!!v&&v.isCollapsed&&v.toggleCount>0,[_,b]=Rn({value:a,defaultValue:i,onChange:l}),M=Sr(),k=o&&M&&!y,D=r.useRef(null),$=r.useRef(null),z=r.useRef(null),q=r.useId(),G=r.useRef(null),H=r.useCallback(()=>{var x;b(!1),(x=D.current)==null||x.focus()},[b]);r.useEffect(()=>{if(!_||y)return;const x=Q=>{const B=z.current;B&&Q.target instanceof Node&&!B.contains(Q.target)&&b(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[_,y,b]),r.useEffect(()=>{if(!_||y)return;const x=Q=>{Q.key==="Escape"&&(Q.stopPropagation(),H())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[_,y,H]);const w=r.useCallback(x=>{var V;const Q=qt($.current);if(Q.length===0)return;const B=document.activeElement,re=B?Q.indexOf(B):-1;let N=0;x==="first"?N=0:x==="last"?N=Q.length-1:x===1?N=re<0?0:(re+1)%Q.length:N=re<0?Q.length-1:(re-1+Q.length)%Q.length,(V=Q[N])==null||V.focus()},[]),S=x=>{x.key==="ArrowDown"||x.key==="Enter"||x.key===" "?(x.preventDefault(),b(!0),requestAnimationFrame(()=>w("first"))):x.key==="ArrowUp"&&(x.preventDefault(),b(!0),requestAnimationFrame(()=>w("last")))},L=x=>{x.key==="ArrowDown"?(x.preventDefault(),w(1)):x.key==="ArrowUp"?(x.preventDefault(),w(-1)):x.key==="Home"?(x.preventDefault(),w("first")):x.key==="End"?(x.preventDefault(),w("last")):x.key==="Tab"&&b(!1)},I=()=>{k&&(G.current&&clearTimeout(G.current),b(!0))},ee=()=>{k&&(G.current&&clearTimeout(G.current),G.current=setTimeout(()=>b(!1),120))},O=r.useMemo(()=>({open:_,setOpen:b,triggerRef:D,contentRef:$,contentId:q,focusItem:w,inDrawer:y}),[_,b,q,w,y]);return e.jsx(Pn.Provider,{value:O,children:e.jsxs("li",{ref:z,className:Ue(he.topNavDropdown,y&&he.topNavDropdownInDrawer,_&&he.topNavDropdownOpen,p),onMouseEnter:I,onMouseLeave:ee,children:[e.jsxs("button",{ref:D,type:"button",className:Ue(he.topNavItem,he.topNavDropdownTrigger,s&&he.topNavItemActive),"aria-haspopup":"menu","aria-expanded":_,"aria-controls":q,"aria-current":s?"page":void 0,onClick:()=>b(!_),onKeyDown:S,children:[t&&e.jsx("span",{className:he.topNavIcon,"aria-hidden":"true",children:t}),e.jsx("span",{className:he.topNavItemLabel,children:n}),e.jsx(zr,{open:_})]}),e.jsx("ul",{ref:$,id:q,role:"menu",className:Ue(he.topNavDropdownContent,_&&he.topNavDropdownContentOpen),"aria-hidden":!_||void 0,onKeyDown:L,children:c})]})})},Un=r.forwardRef(function({children:t,icon:s,active:o,href:a,target:i,rel:l,onClick:c,asChild:p,className:v},y){const _=r.useContext(Pn),b=r.useContext(Tt),M=z=>{c==null||c(z),z.defaultPrevented||(_==null||_.setOpen(!1),b&&b.isCollapsed&&b.drawerOpen&&b.setDrawerOpen(!1))},k={className:Ue(he.topNavDropdownItem,o&&he.topNavItemActive,v),role:"menuitem","aria-current":o?"page":void 0},D=e.jsxs(e.Fragment,{children:[s&&e.jsx("span",{className:he.topNavIcon,"aria-hidden":"true",children:s}),e.jsx("span",{className:he.topNavItemLabel,children:t})]});let $;return p?$=e.jsx(An,{...k,onClick:M,ref:y,children:t}):a?$=e.jsx("a",{ref:y,href:a,target:i,rel:l??(i==="_blank"?"noopener noreferrer":void 0),onClick:M,...k,children:D}):$=e.jsx("button",{ref:y,type:"button",onClick:M,...k,children:D}),e.jsx("li",{children:$})}),tt=r.forwardRef(function({children:t,open:s,defaultOpen:o=!1,onOpenChange:a,collapseBelow:i=768,className:l,...c},p){const[v,y]=Rn({value:s,defaultValue:o,onChange:a}),_=Br(i),b=Rr(),[M,k]=r.useState(0),D=r.useCallback(()=>(k(L=>L+1),()=>k(L=>Math.max(0,L-1))),[]),$=r.useId(),z=r.useId(),q=r.useRef(null),G=r.useRef(null),H=r.useRef(null),w=_&&v&&M>0;r.useEffect(()=>{!_&&v&&y(!1)},[_,v,y]),r.useEffect(()=>{if(!w)return;const L=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=L}},[w]),r.useEffect(()=>{if(!w)return;H.current=document.activeElement??null;const I=requestAnimationFrame(()=>{var x;(x=qt(q.current)[0])==null||x.focus()}),ee=O=>{if(O.key==="Escape"){O.preventDefault(),y(!1);return}if(O.key!=="Tab"||!q.current)return;const x=qt(q.current);if(x.length===0)return;const Q=x[0],B=x[x.length-1],re=document.activeElement;O.shiftKey&&re===Q?(O.preventDefault(),B.focus()):(!O.shiftKey&&re===B||re&&!q.current.contains(re))&&(O.preventDefault(),Q.focus())};return document.addEventListener("keydown",ee),()=>{cancelAnimationFrame(I),document.removeEventListener("keydown",ee)}},[w,y]),r.useEffect(()=>{if(w)return;const L=H.current;if(L&&typeof L.focus=="function"){const I=document.activeElement;(!I||I===document.body||q.current&&q.current.contains(I))&&L.focus(),H.current=null}},[w]);const S=r.useMemo(()=>({drawerOpen:v,setDrawerOpen:y,isCollapsed:_,menuId:$,toggleId:z,registerToggle:D,toggleCount:M,menuRef:q,toggleRef:G}),[v,y,_,$,z,D,M]);return e.jsx(Tt.Provider,{value:S,children:e.jsxs("nav",{ref:p,className:Ue(he.topNav,w&&he.topNavDrawerOpen,b&&he.topNavReducedMotion,l),"data-collapsed":_||void 0,"data-drawer-open":w||void 0,...c,children:[e.jsx("div",{className:he.topNavInner,children:t}),w&&e.jsx("div",{className:he.topNavBackdrop,onClick:()=>y(!1),"aria-hidden":"true"})]})})});On.displayName="EvoTopNav.Brand";Wn.displayName="EvoTopNav.Menu";Hn.displayName="EvoTopNav.Item";Fn.displayName="EvoTopNav.Actions";qn.displayName="EvoTopNav.Toggle";Vn.displayName="EvoTopNav.Dropdown";Un.displayName="EvoTopNav.DropdownItem";tt.displayName="EvoTopNav";tt.Brand=On;tt.Menu=Wn;tt.Item=Hn;tt.Actions=Fn;tt.Toggle=qn;tt.Dropdown=Vn;tt.DropdownItem=Un;const Pr="_pagination_1lhxw_1",Or="_pageBtn_1lhxw_8",Wr="_activePage_1lhxw_34",Hr="_navBtn_1lhxw_45",Fr="_ellipsis_1lhxw_49",ot={pagination:Pr,pageBtn:Or,activePage:Wr,navBtn:Hr,ellipsis:Fr},hn=(n,t)=>Array.from({length:t-n+1},(s,o)=>n+o),qr=({total:n,page:t,pageSize:s=10,siblingCount:o=1,onChange:a,className:i=""})=>{const l=Math.max(1,Math.ceil(n/s)),c=()=>{if(l<=7)return hn(1,l);const p=Math.max(2,t-o),v=Math.min(l-1,t+o),y=[1];return p>2&&y.push("..."),y.push(...hn(p,v)),v<l-1&&y.push("..."),l>1&&y.push(l),y};return e.jsxs("nav",{className:`${ot.pagination} ${i}`,"aria-label":"Pagination",children:[e.jsx("button",{className:`${ot.pageBtn} ${ot.navBtn}`,disabled:t<=1,onClick:()=>a(t-1),"aria-label":"Previous page",children:"‹"}),c().map((p,v)=>p==="..."?e.jsx("span",{className:ot.ellipsis,children:"…"},`ellipsis-${v}`):e.jsx("button",{className:[ot.pageBtn,p===t?ot.activePage:""].filter(Boolean).join(" "),onClick:()=>a(p),"aria-label":`Page ${p}`,"aria-current":p===t?"page":void 0,children:p},p)),e.jsx("button",{className:`${ot.pageBtn} ${ot.navBtn}`,disabled:t>=l,onClick:()=>a(t+1),"aria-label":"Next page",children:"›"})]})},Vr="_overlay_1qpdy_1",Ur="_palette_1qpdy_23",Gr="_searchRow_1qpdy_46",Kr="_searchIconWrap_1qpdy_54",Qr="_searchInput_1qpdy_61",Yr="_escBadge_1qpdy_75",Xr="_results_1qpdy_86",Jr="_empty_1qpdy_102",Zr="_group_1qpdy_109",ea="_groupLabel_1qpdy_113",ta="_resultItem_1qpdy_122",na="_resultActive_1qpdy_135",sa="_resultIcon_1qpdy_139",oa="_resultLabel_1qpdy_149",ra="_resultDesc_1qpdy_157",aa="_resultShortcut_1qpdy_163",ia="_footer_1qpdy_178",ca="_footerRight_1qpdy_202",De={overlay:Vr,palette:Ur,searchRow:Gr,searchIconWrap:Kr,searchInput:Qr,escBadge:Yr,results:Xr,empty:Jr,group:Zr,groupLabel:ea,resultItem:ta,resultActive:na,resultIcon:sa,resultLabel:oa,resultDesc:ra,resultShortcut:aa,footer:ia,footerRight:ca},la=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.userAgent),da=()=>e.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",width:"16",height:"16",children:[e.jsx("circle",{cx:"7",cy:"7",r:"4.5",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M10.5 10.5L13 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),ua=({items:n,placeholder:t="Search commands…",open:s,onClose:o})=>{const[a,i]=r.useState(!1),[l,c]=r.useState(""),[p,v]=r.useState(0),y=r.useRef(null),_=r.useRef(null),b=s!==void 0,M=b?s:a,k=r.useCallback(()=>{b||i(!1),o==null||o()},[b,o]);r.useEffect(()=>{const w=S=>{(S.ctrlKey||S.metaKey)&&S.key==="k"&&(S.preventDefault(),b||i(L=>!L)),S.key==="Escape"&&M&&k()};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[b,M,k]),r.useEffect(()=>{if(M){c(""),v(0);const w=setTimeout(()=>{var S;return(S=y.current)==null?void 0:S.focus()},30);return()=>clearTimeout(w)}},[M]);const $=(l.trim()?n.filter(w=>{var S,L;return w.label.toLowerCase().includes(l.toLowerCase())||((S=w.description)==null?void 0:S.toLowerCase().includes(l.toLowerCase()))||((L=w.group)==null?void 0:L.toLowerCase().includes(l.toLowerCase()))}):n).reduce((w,S)=>{const L=S.group??"Actions";return w[L]||(w[L]=[]),w[L].push(S),w},{}),z=Object.values($).flat(),q=w=>{var L;const S=(L=_.current)==null?void 0:L.querySelector(`[data-idx="${w}"]`);S==null||S.scrollIntoView({block:"nearest"})},G=w=>{w.key==="ArrowDown"?(w.preventDefault(),v(S=>{const L=Math.min(S+1,z.length-1);return q(L),L})):w.key==="ArrowUp"?(w.preventDefault(),v(S=>{const L=Math.max(S-1,0);return q(L),L})):w.key==="Enter"&&z[p]&&(z[p].onSelect(),k())};if(!M)return null;let H=0;return e.jsx("div",{className:De.overlay,onClick:k,role:"dialog","aria-modal":"true",children:e.jsxs("div",{className:De.palette,onClick:w=>w.stopPropagation(),onKeyDown:G,children:[e.jsxs("div",{className:De.searchRow,children:[e.jsx("span",{className:De.searchIconWrap,children:e.jsx(da,{})}),e.jsx("input",{ref:y,className:De.searchInput,placeholder:t,value:l,onChange:w=>{c(w.target.value),v(0)},"aria-label":"Command search"}),e.jsx("kbd",{className:De.escBadge,children:"Esc"})]}),e.jsxs("div",{className:De.results,ref:_,children:[z.length===0&&e.jsxs("div",{className:De.empty,children:["No results for “",l,"”"]}),Object.entries($).map(([w,S])=>e.jsxs("div",{className:De.group,children:[e.jsx("div",{className:De.groupLabel,children:w}),S.map(L=>{const I=H++;return e.jsxs("button",{"data-idx":I,className:[De.resultItem,I===p?De.resultActive:""].filter(Boolean).join(" "),onClick:()=>{L.onSelect(),k()},onMouseEnter:()=>v(I),children:[L.icon&&e.jsx("span",{className:De.resultIcon,children:L.icon}),e.jsx("span",{className:De.resultLabel,children:L.label}),L.description&&e.jsx("span",{className:De.resultDesc,children:L.description}),L.shortcut&&e.jsx("span",{className:De.resultShortcut,children:L.shortcut.map((ee,O)=>e.jsx("kbd",{children:ee},O))})]},L.label)})]},w))]}),e.jsxs("div",{className:De.footer,children:[e.jsxs("span",{children:[e.jsx("kbd",{children:"↑"}),e.jsx("kbd",{children:"↓"})," navigate"]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"↵"})," select"]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"Esc"})," close"]}),e.jsxs("span",{className:De.footerRight,children:[e.jsx("kbd",{children:la?"⌘":"Ctrl"}),e.jsx("kbd",{children:"K"})," toggle"]})]})]})})},ha="_field_l0kkf_1",pa="_fullWidth_l0kkf_8",_a="_label_l0kkf_12",fa="_inputWrapper_l0kkf_18",ma="_hasError_l0kkf_30",va="_sm_l0kkf_38",xa="_md_l0kkf_42",ga="_lg_l0kkf_46",ba="_input_l0kkf_18",ya="_adornment_l0kkf_69",wa="_trailingAdornment_l0kkf_78",ja="_errorText_l0kkf_83",ka="_helperText_l0kkf_89",Ve={field:ha,fullWidth:pa,label:_a,inputWrapper:fa,hasError:ma,sm:va,md:xa,lg:ga,input:ba,adornment:ya,trailingAdornment:wa,errorText:ja,helperText:ka},Na=({label:n,helperText:t,error:s,size:o="md",leadingAdornment:a,trailingAdornment:i,fullWidth:l=!1,className:c="",id:p,...v})=>{const y=p??(n==null?void 0:n.toLowerCase().replace(/\s+/g,"-"));return e.jsxs("div",{className:[Ve.field,l?Ve.fullWidth:"",c].filter(Boolean).join(" "),children:[n&&e.jsx("label",{htmlFor:y,className:Ve.label,children:n}),e.jsxs("div",{className:[Ve.inputWrapper,Ve[o],s?Ve.hasError:""].filter(Boolean).join(" "),children:[a&&e.jsx("span",{className:Ve.adornment,children:a}),e.jsx("input",{id:y,className:Ve.input,"aria-invalid":!!s,"aria-describedby":s?`${y}-error`:t?`${y}-helper`:void 0,...v}),i&&e.jsx("span",{className:`${Ve.adornment} ${Ve.trailingAdornment}`,children:i})]}),s&&e.jsx("p",{id:`${y}-error`,className:Ve.errorText,children:s}),!s&&t&&e.jsx("p",{id:`${y}-helper`,className:Ve.helperText,children:t})]})},Ea="_field_t1e02_1",Ta="_fullWidth_t1e02_9",Ia="_label_t1e02_13",$a="_shell_t1e02_19",Ca="_hasError_t1e02_33",Ma="_disabled_t1e02_39",La="_dragOver_t1e02_43",Da="_toolbar_t1e02_48",Ba="_divider_t1e02_61",Sa="_toolBtn_t1e02_69",Ra="_toolBtnActive_t1e02_101",Aa="_editor_t1e02_110",za="_editorEmpty_t1e02_122",Pa="_dropOverlay_t1e02_186",Oa="_linkPrompt_t1e02_202",Wa="_linkInput_t1e02_211",Ha="_linkBtn_t1e02_228",Fa="_linkBtnGhost_t1e02_229",qa="_helperText_t1e02_256",Va="_errorText_t1e02_262",Ne={field:Ea,fullWidth:Ta,label:Ia,shell:$a,hasError:Ca,disabled:Ma,dragOver:La,toolbar:Da,divider:Ba,toolBtn:Sa,toolBtnActive:Ra,editor:Aa,editorEmpty:za,dropOverlay:Pa,linkPrompt:Oa,linkInput:Wa,linkBtn:Ha,linkBtnGhost:Fa,helperText:qa,errorText:Va},Ce=({children:n})=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:n}),Me={bold:e.jsxs(Ce,{children:[e.jsx("path",{d:"M6 4h8a4 4 0 0 1 0 8H6z"}),e.jsx("path",{d:"M6 12h9a4 4 0 0 1 0 8H6z"})]}),italic:e.jsxs(Ce,{children:[e.jsx("line",{x1:"19",y1:"4",x2:"10",y2:"4"}),e.jsx("line",{x1:"14",y1:"20",x2:"5",y2:"20"}),e.jsx("line",{x1:"15",y1:"4",x2:"9",y2:"20"})]}),underline:e.jsxs(Ce,{children:[e.jsx("path",{d:"M6 3v7a6 6 0 0 0 12 0V3"}),e.jsx("line",{x1:"4",y1:"21",x2:"20",y2:"21"})]}),strike:e.jsxs(Ce,{children:[e.jsx("path",{d:"M16 4H9a3 3 0 0 0-2.83 4"}),e.jsx("path",{d:"M14 12a4 4 0 0 1 0 8H6"}),e.jsx("line",{x1:"4",y1:"12",x2:"20",y2:"12"})]}),h1:e.jsxs(Ce,{children:[e.jsx("path",{d:"M4 12h8"}),e.jsx("path",{d:"M4 18V6"}),e.jsx("path",{d:"M12 18V6"}),e.jsx("path",{d:"M17 10l3-2v10"})]}),h2:e.jsxs(Ce,{children:[e.jsx("path",{d:"M4 12h8"}),e.jsx("path",{d:"M4 18V6"}),e.jsx("path",{d:"M12 18V6"}),e.jsx("path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1"})]}),h3:e.jsxs(Ce,{children:[e.jsx("path",{d:"M4 12h8"}),e.jsx("path",{d:"M4 18V6"}),e.jsx("path",{d:"M12 18V6"}),e.jsx("path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2"}),e.jsx("path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2"})]}),paragraph:e.jsxs(Ce,{children:[e.jsx("path",{d:"M13 4v16"}),e.jsx("path",{d:"M17 4v16"}),e.jsx("path",{d:"M19 4H9.5a4.5 4.5 0 0 0 0 9H13"})]}),ul:e.jsxs(Ce,{children:[e.jsx("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),e.jsx("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),e.jsx("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),e.jsx("line",{x1:"3",y1:"6",x2:"3.01",y2:"6"}),e.jsx("line",{x1:"3",y1:"12",x2:"3.01",y2:"12"}),e.jsx("line",{x1:"3",y1:"18",x2:"3.01",y2:"18"})]}),ol:e.jsxs(Ce,{children:[e.jsx("line",{x1:"10",y1:"6",x2:"21",y2:"6"}),e.jsx("line",{x1:"10",y1:"12",x2:"21",y2:"12"}),e.jsx("line",{x1:"10",y1:"18",x2:"21",y2:"18"}),e.jsx("path",{d:"M4 6h1v4"}),e.jsx("path",{d:"M4 10h2"}),e.jsx("path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1"})]}),quote:e.jsxs(Ce,{children:[e.jsx("path",{d:"M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z"}),e.jsx("path",{d:"M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z"})]}),code:e.jsxs(Ce,{children:[e.jsx("polyline",{points:"16 18 22 12 16 6"}),e.jsx("polyline",{points:"8 6 2 12 8 18"})]}),link:e.jsxs(Ce,{children:[e.jsx("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),e.jsx("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]}),image:e.jsxs(Ce,{children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),e.jsx("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),e.jsx("polyline",{points:"21 15 16 10 5 21"})]}),alignLeft:e.jsxs(Ce,{children:[e.jsx("line",{x1:"17",y1:"10",x2:"3",y2:"10"}),e.jsx("line",{x1:"21",y1:"6",x2:"3",y2:"6"}),e.jsx("line",{x1:"21",y1:"14",x2:"3",y2:"14"}),e.jsx("line",{x1:"17",y1:"18",x2:"3",y2:"18"})]}),alignCenter:e.jsxs(Ce,{children:[e.jsx("line",{x1:"18",y1:"10",x2:"6",y2:"10"}),e.jsx("line",{x1:"21",y1:"6",x2:"3",y2:"6"}),e.jsx("line",{x1:"21",y1:"14",x2:"3",y2:"14"}),e.jsx("line",{x1:"18",y1:"18",x2:"6",y2:"18"})]}),alignRight:e.jsxs(Ce,{children:[e.jsx("line",{x1:"21",y1:"10",x2:"7",y2:"10"}),e.jsx("line",{x1:"21",y1:"6",x2:"3",y2:"6"}),e.jsx("line",{x1:"21",y1:"14",x2:"3",y2:"14"}),e.jsx("line",{x1:"21",y1:"18",x2:"7",y2:"18"})]}),clear:e.jsx(Ce,{children:e.jsx("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})}),undo:e.jsxs(Ce,{children:[e.jsx("path",{d:"M3 7v6h6"}),e.jsx("path",{d:"M21 17a9 9 0 0 0-15-6.7L3 13"})]}),redo:e.jsxs(Ce,{children:[e.jsx("path",{d:"M21 7v6h-6"}),e.jsx("path",{d:"M3 17a9 9 0 0 1 15-6.7L21 13"})]})},Wt={bold:{label:"Bold",icon:Me.bold,command:"bold",shortcut:"⌘B"},italic:{label:"Italic",icon:Me.italic,command:"italic",shortcut:"⌘I"},underline:{label:"Underline",icon:Me.underline,command:"underline",shortcut:"⌘U"},strike:{label:"Strikethrough",icon:Me.strike,command:"strikeThrough",query:"strikeThrough"},h1:{label:"Heading 1",icon:Me.h1,command:"formatBlock",arg:"H1"},h2:{label:"Heading 2",icon:Me.h2,command:"formatBlock",arg:"H2"},h3:{label:"Heading 3",icon:Me.h3,command:"formatBlock",arg:"H3"},paragraph:{label:"Paragraph",icon:Me.paragraph,command:"formatBlock",arg:"P"},ul:{label:"Bulleted list",icon:Me.ul,command:"insertUnorderedList"},ol:{label:"Numbered list",icon:Me.ol,command:"insertOrderedList"},quote:{label:"Blockquote",icon:Me.quote,command:"formatBlock",arg:"BLOCKQUOTE"},code:{label:"Inline code",icon:Me.code,command:"formatBlock",arg:"PRE"},"align-left":{label:"Align left",icon:Me.alignLeft,command:"justifyLeft"},"align-center":{label:"Align center",icon:Me.alignCenter,command:"justifyCenter"},"align-right":{label:"Align right",icon:Me.alignRight,command:"justifyRight"},clear:{label:"Clear formatting",icon:Me.clear,command:"removeFormat"},undo:{label:"Undo",icon:Me.undo,command:"undo",shortcut:"⌘Z"},redo:{label:"Redo",icon:Me.redo,command:"redo",shortcut:"⇧⌘Z"}},Ua=["image/png","image/jpeg","image/gif","image/webp","image/svg+xml"];function Ga(n){return typeof n=="object"&&n!==null}function Ka(n){return new Promise((t,s)=>{const o=new FileReader;o.onload=()=>t(String(o.result)),o.onerror=()=>s(o.error),o.readAsDataURL(n)})}function ht(n,t){try{document.execCommand(n,!1,t)}catch{}}const Qa=/^(?:P|DIV|H[1-6]|BLOCKQUOTE|PRE|UL|OL|LI|TABLE)$/;function Ct(n,t){const s=window.getSelection();if(!s||s.rangeCount===0)return null;const o=s.getRangeAt(0).startContainer,a=o.nodeType===1?o:o.parentElement;let i=null;try{i=(a==null?void 0:a.closest(t))??null}catch{return null}return i&&n.contains(i)&&i!==n?i:null}function pn(n,t){var y;const s=window.getSelection();if(!s||s.rangeCount===0)return!1;const o=s.getRangeAt(0),a=o.startContainer,i=a.nodeType===1?a:a.parentElement;if(!i)return!1;const l=[];let c=null;try{c=i.closest(t)}catch{return!1}for(;c&&n.contains(c)&&c!==n;)l.push(c),c=((y=c.parentElement)==null?void 0:y.closest(t))??null;if(l.length===0)return!1;const p=document.createElement("span");p.setAttribute("data-evo-caret",""),o.insertNode(p),l.forEach(_=>{if(Array.from(_.children).some(M=>Qa.test(M.tagName)))_.replaceWith(...Array.from(_.childNodes));else{const M=document.createElement("p");for(;_.firstChild;)M.appendChild(_.firstChild);M.childNodes.length||M.appendChild(document.createElement("br")),_.replaceWith(M)}});const v=n.querySelector("span[data-evo-caret]");if(v){const _=v.parentElement,b=document.createRange();b.setStartBefore(v),b.collapse(!0),s.removeAllRanges(),s.addRange(b),v.remove(),_&&!_.childNodes.length&&_.appendChild(document.createElement("br"))}return!0}function Ya(n){const t=/^(?:P|DIV|H[1-6]|UL|OL|PRE|BLOCKQUOTE|TABLE)$/,s=[];let o=[];const a=()=>{if(!o.length)return;const i=document.createElement("p");o.forEach(l=>i.appendChild(l)),o=[],s.push(i)};return Array.from(n.childNodes).forEach(i=>{if(i.nodeType===1&&t.test(i.tagName)){a();let l=i;if(l.tagName==="DIV"){const c=document.createElement("p");for(;l.firstChild;)c.appendChild(l.firstChild);l=c}s.push(l)}else o.push(i)}),a(),s.forEach(i=>{!i.textContent&&!i.querySelector("br,img")&&i.appendChild(document.createElement("br"))}),s}function Xa(n){const t=window.getSelection();if(!t||t.rangeCount===0)return!1;const s=t.getRangeAt(0);if(!s.collapsed)return!1;const o=s.startContainer,a=o.nodeType===1?o:o.parentElement,i=(a==null?void 0:a.closest("pre,blockquote"))??null;if(!i||!n.contains(i)||i===n)return!1;const l=document.createRange();l.setStart(s.startContainer,s.startOffset),l.setEnd(i,i.childNodes.length);const c=Ya(l.extractContents());if(c.length===0){const y=document.createElement("p");y.appendChild(document.createElement("br")),c.push(y)}let p=i;c.forEach(y=>{p.after(y),p=y}),i.firstChild||i.remove();const v=document.createRange();return v.setStart(c[0],0),v.collapse(!0),t.removeAllRanges(),t.addRange(v),!0}const Ja=["bold","italic","underline","divider","h1","h2","divider","ul","ol","divider","link","image"],Za=r.forwardRef(function({value:t,defaultValue:s,onChange:o,tools:a=Ja,placeholder:i="Start writing…",minHeight:l=160,maxHeight:c,disabled:p=!1,readOnly:v=!1,label:y,helperText:_,error:b,fullWidth:M=!1,onImageUpload:k,acceptedImageTypes:D=Ua,maxImageSize:$,onImageError:z,className:q="",id:G},H){const w=r.useRef(null),S=r.useRef(null),L=r.useRef(""),I=t!==void 0,[ee,O]=r.useState({}),[x,Q]=r.useState(!0),[B,re]=r.useState(!1),[N,V]=r.useState(null),Y=G??(y==null?void 0:y.toLowerCase().replace(/\s+/g,"-"))??void 0;r.useEffect(()=>{var u,E;const m=w.current;m&&(I?t!==L.current&&(m.innerHTML=t??"",L.current=t??"",Q(!((u=m.textContent)!=null&&u.trim()))):s&&!L.current&&(m.innerHTML=s,L.current=s,Q(!((E=m.textContent)!=null&&E.trim()))))},[t,s,I]);const se=r.useCallback(()=>{const m=w.current,u={};Object.entries(Wt).forEach(([E,T])=>{try{T.command==="formatBlock"?m?(T.arg??"").toUpperCase()==="P"?u[E]=!!Ct(m,"P,DIV")&&!Ct(m,"BLOCKQUOTE,PRE,H1,H2,H3,H4,H5,H6"):u[E]=!!Ct(m,T.arg??""):u[E]=!1:u[E]=document.queryCommandState(T.query??T.command)}catch{u[E]=!1}}),O(u)},[]),J=r.useCallback(()=>{var E;const m=w.current;if(!m)return;const u=m.innerHTML;L.current=u,Q(!((E=m.textContent)!=null&&E.trim())&&!m.querySelector("img")),o==null||o(u),se()},[o,se]);r.useImperativeHandle(H,()=>({getHTML:()=>{var m;return((m=w.current)==null?void 0:m.innerHTML)??""},setHTML:m=>{const u=w.current;u&&(u.innerHTML=m,J())},getText:()=>{var m;return((m=w.current)==null?void 0:m.textContent)??""},focus:()=>{var m;return(m=w.current)==null?void 0:m.focus()},insertImage:(m,u="")=>de(m,u),insertHTML:m=>{var u;(u=w.current)==null||u.focus(),ht("insertHTML",m),J()},clear:()=>{const m=w.current;m&&(m.innerHTML="",J())}}),[J]);const de=r.useCallback((m,u="")=>{var T;(T=w.current)==null||T.focus();const E=`<img src="${m.replace(/"/g,""")}" alt="${u.replace(/"/g,""")}" />`;ht("insertHTML",E),J()},[J]),te=r.useCallback(async m=>{if(!D.includes(m.type)){z==null||z({code:"wrong-type",message:`Unsupported image type: ${m.type}`});return}if($&&m.size>$){z==null||z({code:"too-large",message:`Image exceeds ${($/1024/1024).toFixed(1)} MB`});return}try{const u=k?await k(m):await Ka(m);de(u,m.name)}catch(u){z==null||z({code:"upload-failed",message:u instanceof Error?u.message:"Upload failed"})}},[D,$,k,z,de]),oe=r.useCallback(m=>{const u=w.current;u==null||u.focus();const E=Wt[m];if(E){if(E.command==="formatBlock"&&u){const T=E.arg??"";T.toUpperCase()!=="P"&&Ct(u,T)?pn(u,T):(pn(u,"BLOCKQUOTE,PRE,H1,H2,H3,H4,H5,H6"),ht("formatBlock",T))}else ht(E.command,E.arg);J()}},[J]),ae=r.useCallback(()=>{var m;(m=S.current)==null||m.click()},[]),Ee=r.useCallback(()=>{const m=window.getSelection(),u=m&&m.rangeCount>0?m.getRangeAt(0).cloneRange():null;V({url:"https://",range:u})},[]),Te=r.useCallback(()=>{var E,T;if(!N)return;const{url:m,range:u}=N;if((E=w.current)==null||E.focus(),u){const U=window.getSelection();U==null||U.removeAllRanges(),U==null||U.addRange(u)}if(m&&m!=="https://"){ht("createLink",m);const U=(T=w.current)==null?void 0:T.querySelectorAll('a[href="'+m+'"]');U==null||U.forEach(ge=>ge.setAttribute("target","_blank"))}V(null),J()},[N,J]),be=r.useCallback(()=>{J()},[J]),ce=r.useCallback(m=>{if(m.key==="Enter"&&!m.shiftKey&&!m.metaKey&&!m.ctrlKey&&!m.altKey){const T=w.current;if(T&&Xa(T)){m.preventDefault(),J();return}}if(!(m.metaKey||m.ctrlKey))return;const E=m.key.toLowerCase();E==="b"?(m.preventDefault(),oe("bold")):E==="i"?(m.preventDefault(),oe("italic")):E==="u"&&(m.preventDefault(),oe("underline"))},[oe,J]),Be=r.useCallback(async m=>{var T,U;const u=(T=m.clipboardData)==null?void 0:T.items;if(!u)return;for(let ge=0;ge<u.length;ge++){const ue=u[ge];if(ue.type.startsWith("image/")){m.preventDefault();const Pe=ue.getAsFile();Pe&&await te(Pe);return}}const E=(U=m.clipboardData)==null?void 0:U.getData("text/plain");E!==void 0&&E!==""&&(m.preventDefault(),ht("insertText",E))},[te]),ye=r.useCallback(m=>{m.dataTransfer.types.includes("Files")&&(m.preventDefault(),re(!0))},[]),ve=r.useCallback(()=>re(!1),[]),le=r.useCallback(async m=>{re(!1);const u=Array.from(m.dataTransfer.files??[]).filter(E=>E.type.startsWith("image/"));if(u.length!==0){m.preventDefault();for(const E of u)await te(E)}},[te]),xe=r.useCallback(async m=>{const u=Array.from(m.target.files??[]);m.target.value="";for(const E of u)await te(E)},[te]);r.useEffect(()=>{const m=()=>{const u=w.current;u&&(document.activeElement===u||u.contains(document.activeElement))&&se()};return document.addEventListener("selectionchange",m),()=>document.removeEventListener("selectionchange",m)},[se]);const We=r.useMemo(()=>a.length>0?e.jsx("div",{className:Ne.toolbar,role:"toolbar","aria-label":"Formatting toolbar",children:a.map((u,E)=>{var ge;if(u==="divider")return e.jsx("span",{className:Ne.divider,"aria-hidden":"true"},`d-${E}`);if(Ga(u)){const ue=((ge=u.isActive)==null?void 0:ge.call(u))??!1;return e.jsx("button",{type:"button",className:[Ne.toolBtn,ue?Ne.toolBtnActive:""].filter(Boolean).join(" "),title:u.label,"aria-label":u.label,"aria-pressed":ue,disabled:p||v,onMouseDown:Pe=>Pe.preventDefault(),onClick:()=>u.onAction(we()),children:u.icon},u.key)}if(u==="image")return e.jsx("button",{type:"button",className:Ne.toolBtn,title:"Insert image","aria-label":"Insert image",disabled:p||v,onMouseDown:ue=>ue.preventDefault(),onClick:ae,children:Me.image},"image");if(u==="link")return e.jsx("button",{type:"button",className:Ne.toolBtn,title:"Insert link","aria-label":"Insert link",disabled:p||v,onMouseDown:ue=>ue.preventDefault(),onClick:Ee,children:Me.link},"link");const T=Wt[u];if(!T)return null;const U=!!ee[u];return e.jsx("button",{type:"button",className:[Ne.toolBtn,U?Ne.toolBtnActive:""].filter(Boolean).join(" "),title:`${T.label}${T.shortcut?` (${T.shortcut})`:""}`,"aria-label":T.label,"aria-pressed":U,disabled:p||v,onMouseDown:ue=>ue.preventDefault(),onClick:()=>oe(u),children:T.icon},u)})}):null,[a,ee,p,v,ae,Ee,oe]),we=r.useCallback(()=>({getHTML:()=>{var m;return((m=w.current)==null?void 0:m.innerHTML)??""},setHTML:m=>{const u=w.current;u&&(u.innerHTML=m,J())},getText:()=>{var m;return((m=w.current)==null?void 0:m.textContent)??""},focus:()=>{var m;return(m=w.current)==null?void 0:m.focus()},insertImage:(m,u="")=>de(m,u),insertHTML:m=>{var u;(u=w.current)==null||u.focus(),ht("insertHTML",m),J()},clear:()=>{const m=w.current;m&&(m.innerHTML="",J())}}),[J,de]),ke={minHeight:typeof l=="number"?`${l}px`:l,maxHeight:c!==void 0?typeof c=="number"?`${c}px`:c:void 0};return e.jsxs("div",{className:[Ne.field,M?Ne.fullWidth:"",q].filter(Boolean).join(" "),children:[y&&e.jsx("label",{htmlFor:Y,className:Ne.label,children:y}),e.jsxs("div",{className:[Ne.shell,b?Ne.hasError:"",p?Ne.disabled:"",B?Ne.dragOver:""].filter(Boolean).join(" "),children:[We,e.jsx("div",{ref:w,id:Y,className:[Ne.editor,x?Ne.editorEmpty:""].filter(Boolean).join(" "),contentEditable:!p&&!v,suppressContentEditableWarning:!0,role:"textbox","aria-multiline":"true","aria-label":y??"Rich text editor","aria-invalid":!!b,"aria-readonly":v,"aria-disabled":p,"data-placeholder":i,style:ke,onInput:be,onKeyDown:ce,onPaste:Be,onDragOver:ye,onDragLeave:ve,onDrop:le,onBlur:se}),B&&e.jsx("div",{className:Ne.dropOverlay,"aria-hidden":"true",children:e.jsx("span",{children:"Drop image to upload"})}),N&&e.jsxs("div",{className:Ne.linkPrompt,role:"dialog","aria-label":"Insert link",children:[e.jsx("input",{type:"url",className:Ne.linkInput,value:N.url,autoFocus:!0,onChange:m=>V({...N,url:m.target.value}),onKeyDown:m=>{m.key==="Enter"?(m.preventDefault(),Te()):m.key==="Escape"&&(m.preventDefault(),V(null))},placeholder:"https://example.com"}),e.jsx("button",{type:"button",className:Ne.linkBtn,onClick:Te,children:"Apply"}),e.jsx("button",{type:"button",className:Ne.linkBtnGhost,onClick:()=>V(null),children:"Cancel"})]}),e.jsx("input",{ref:S,type:"file",accept:D.join(","),multiple:!0,hidden:!0,onChange:xe})]}),b&&e.jsx("p",{className:Ne.errorText,children:b}),!b&&_&&e.jsx("p",{className:Ne.helperText,children:_})]})}),ei="_field_121w6_7",ti="_fullWidth_121w6_15",ni="_disabled_121w6_19",si="_trigger_121w6_19",oi="_label_121w6_25",ri="_selectWrapper_121w6_33",ai="_open_121w6_66",ii="_hasError_121w6_70",ci="_sm_121w6_82",li="_md_121w6_89",di="_lg_121w6_95",ui="_triggerValue_121w6_102",hi="_triggerPlaceholder_121w6_103",pi="_triggerChips_121w6_113",_i="_chipRow_121w6_120",fi="_chip_121w6_120",mi="_chipIcon_121w6_143",vi="_chipLabel_121w6_151",xi="_chipRemove_121w6_158",gi="_countMore_121w6_175",bi="_triggerText_121w6_185",yi="_triggerIcon_121w6_192",wi="_triggerActions_121w6_200",ji="_clearBtn_121w6_208",ki="_chevron_121w6_225",Ni="_chevronOpen_121w6_233",Ei="_menu_121w6_245",Ti="_menuOpen_121w6_1",Ii="_searchRow_121w6_271",$i="_searchIconWrap_121w6_280",Ci="_searchInput_121w6_286",Mi="_bulkRow_121w6_302",Li="_bulkBtn_121w6_311",Di="_bulkCount_121w6_333",Bi="_list_121w6_341",Si="_empty_121w6_367",Ri="_option_121w6_375",Ai="_optionActive_121w6_396",zi="_optionDisabled_121w6_396",Pi="_optionSelected_121w6_401",Oi="_optionTitle_121w6_404",Wi="_optionIcon_121w6_413",Hi="_optionLabel_121w6_424",Fi="_optionDesc_121w6_439",qi="_check_121w6_448",Vi="_checkbox_121w6_459",Ui="_checkboxChecked_121w6_473",Gi="_errorText_121w6_484",Ki="_helperText_121w6_491",K={field:ei,fullWidth:ti,disabled:ni,trigger:si,label:oi,selectWrapper:ri,open:ai,hasError:ii,sm:ci,md:li,lg:di,triggerValue:ui,triggerPlaceholder:hi,triggerChips:pi,chipRow:_i,chip:fi,chipIcon:mi,chipLabel:vi,chipRemove:xi,countMore:gi,triggerText:bi,triggerIcon:yi,triggerActions:wi,clearBtn:ji,chevron:ki,chevronOpen:Ni,menu:Ei,menuOpen:Ti,searchRow:Ii,searchIconWrap:$i,searchInput:Ci,bulkRow:Mi,bulkBtn:Li,bulkCount:Di,list:Bi,empty:Si,option:Ri,optionActive:Ai,optionDisabled:zi,optionSelected:Pi,optionTitle:Oi,optionIcon:Wi,optionLabel:Hi,optionDesc:Fi,check:qi,checkbox:Vi,checkboxChecked:Ui,errorText:Gi,helperText:Ki},Qi=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 6l4 4 4-4",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),_n=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M3.5 8.5l3 3 6-7",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),fn=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"12",height:"12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}),Yi=()=>e.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"7",cy:"7",r:"4.5",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M10.5 10.5L13 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),Xi=n=>{const{label:t,options:s,placeholder:o="Select an option",helperText:a,error:i,size:l="md",fullWidth:c=!1,disabled:p=!1,searchable:v=!1,clearable:y=!1,id:_,name:b,className:M=""}=n,k=n.multiple===!0,D=k?n.multipleDisplay??"chips":"chips",$=k?n.maxSelections:void 0,z=k?n.showSelectAll??!1:!1,q=r.useId(),G=_??`evo-select-${q}`,H=`${G}-listbox`,w=n.value,S=n.defaultValue,L=w!==void 0,I=k?Array.isArray(S)?S:[]:typeof S=="string"?S:"",[ee,O]=r.useState(I),x=L?w:ee,Q=k?Array.isArray(x)?x:[]:typeof x=="string"&&x?[x]:[],[B,re]=r.useState(!1),[N,V]=r.useState(-1),[Y,se]=r.useState(""),J=r.useRef(null),de=r.useRef(null),te=r.useRef(null),oe=r.useRef(null),ae=v&&Y?s.filter(u=>u.label.toLowerCase().includes(Y.toLowerCase())):s,Ee=k?void 0:s.find(u=>u.value===x),Te=k?s.filter(u=>Q.includes(u.value)):[],be=k&&$!==void 0&&Q.length>=$,ce=r.useCallback(u=>{var E,T;L||O(u),k?(E=n.onChange)==null||E.call(n,u):(T=n.onChange)==null||T.call(n,u)},[L,k,n.onChange]),Be=r.useCallback(u=>{if(k){const E=Array.isArray(x)?x:[];if(E.includes(u))ce(E.filter(T=>T!==u));else{if($!==void 0&&E.length>=$)return;ce([...E,u])}}else ce(u)},[ce,k,$,x]);r.useEffect(()=>{if(!B)return;const u=E=>{var T;(T=J.current)!=null&&T.contains(E.target)||(re(!1),se(""))};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[B]),r.useEffect(()=>{if(B){const u=ae.findIndex(E=>Q.includes(E.value));if(V(u>=0?u:ae.findIndex(E=>!E.disabled)),v){const E=setTimeout(()=>{var T;return(T=te.current)==null?void 0:T.focus()},30);return()=>clearTimeout(E)}}else se(""),V(-1)},[B]),r.useEffect(()=>{var E;if(!B||N<0)return;const u=(E=oe.current)==null?void 0:E.querySelector(`[data-idx="${N}"]`);u==null||u.scrollIntoView({block:"nearest"})},[N,B]);const ye=u=>{if(ae.length===0)return;let E=N;for(let T=0;T<ae.length;T++)if(E=(E+u+ae.length)%ae.length,!ae[E].disabled){V(E);return}},ve=u=>{var E,T;if(!p){if(!B){(u.key==="Enter"||u.key===" "||u.key==="ArrowDown"||u.key==="ArrowUp")&&(u.preventDefault(),re(!0));return}if(u.key==="Escape")u.preventDefault(),re(!1),(E=de.current)==null||E.focus();else if(u.key==="ArrowDown")u.preventDefault(),ye(1);else if(u.key==="ArrowUp")u.preventDefault(),ye(-1);else if(u.key==="Enter"){u.preventDefault();const U=ae[N];if(U&&!U.disabled){if(!Q.includes(U.value)&&be)return;Be(U.value),k||(re(!1),(T=de.current)==null||T.focus())}}else if(u.key==="Home"){u.preventDefault();const U=ae.findIndex(ge=>!ge.disabled);U>=0&&V(U)}else if(u.key==="End"){u.preventDefault();for(let U=ae.length-1;U>=0;U--)if(!ae[U].disabled){V(U);break}}else u.key==="Tab"&&re(!1)}},le=u=>{var T;u.disabled||!Q.includes(u.value)&&be||(Be(u.value),k||(re(!1),(T=de.current)==null||T.focus()))},xe=u=>{u.stopPropagation(),ce(k?[]:"")},We=(u,E)=>{if(u.stopPropagation(),!k)return;const T=Array.isArray(x)?x:[];ce(T.filter(U=>U!==E))},we=()=>{if(!k)return;const u=ae.filter(U=>!U.disabled).map(U=>U.value),E=Array.from(new Set([...Array.isArray(x)?x:[],...u])),T=$!==void 0?E.slice(0,$):E;ce(T)},ke=k?Q.length>0:!!x,m=()=>{var u;if(!ke)return e.jsx("span",{className:K.triggerPlaceholder,children:e.jsx("span",{className:K.triggerText,children:o})});if(!k)return e.jsxs("span",{className:K.triggerValue,children:[(Ee==null?void 0:Ee.icon)&&e.jsx("span",{className:K.triggerIcon,children:Ee.icon}),e.jsx("span",{className:K.triggerText,children:Ee==null?void 0:Ee.label})]});if(D==="count"){const E=((u=Te[0])==null?void 0:u.label)??"",T=Te.length-1;return e.jsx("span",{className:K.triggerValue,children:e.jsxs("span",{className:K.triggerText,children:[E,T>0&&e.jsxs("span",{className:K.countMore,children:[", +",T," more"]})]})})}return e.jsx("span",{className:K.chipRow,children:Te.map(E=>e.jsxs("span",{className:K.chip,children:[E.icon&&e.jsx("span",{className:K.chipIcon,children:E.icon}),e.jsx("span",{className:K.chipLabel,children:E.label}),!p&&e.jsx("span",{role:"button",tabIndex:-1,"aria-label":`Remove ${E.label}`,className:K.chipRemove,onClick:T=>We(T,E.value),onMouseDown:T=>T.preventDefault(),children:e.jsx(fn,{})})]},E.value))})};return e.jsxs("div",{ref:J,className:[K.field,c?K.fullWidth:"",p?K.disabled:"",M].filter(Boolean).join(" "),children:[t&&e.jsx("label",{htmlFor:G,className:K.label,children:t}),e.jsxs("div",{className:K.selectWrapper,children:[e.jsxs("button",{ref:de,id:G,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":B,"aria-controls":H,"aria-invalid":!!i,"aria-multiselectable":k||void 0,disabled:p,className:[K.trigger,K[l],B?K.open:"",i?K.hasError:"",k&&D==="chips"&&Q.length>0?K.triggerChips:""].filter(Boolean).join(" "),onClick:()=>!p&&re(u=>!u),onKeyDown:ve,children:[m(),e.jsxs("span",{className:K.triggerActions,children:[y&&ke&&!p&&e.jsx("span",{role:"button",tabIndex:-1,"aria-label":"Clear selection",className:K.clearBtn,onClick:xe,onMouseDown:u=>u.preventDefault(),children:e.jsx(fn,{})}),e.jsx("span",{className:[K.chevron,B?K.chevronOpen:""].filter(Boolean).join(" "),children:e.jsx(Qi,{})})]})]}),B&&e.jsxs("div",{className:K.menu,role:"listbox",id:H,"aria-labelledby":G,"aria-multiselectable":k||void 0,"aria-activedescendant":N>=0?`${G}-opt-${N}`:void 0,children:[v&&e.jsxs("div",{className:K.searchRow,children:[e.jsx("span",{className:K.searchIconWrap,children:e.jsx(Yi,{})}),e.jsx("input",{ref:te,type:"text",className:K.searchInput,placeholder:"Search...",value:Y,onChange:u=>{se(u.target.value),V(0)},onKeyDown:ve})]}),k&&z&&ae.length>0&&e.jsxs("div",{className:K.bulkRow,children:[e.jsx("button",{type:"button",className:K.bulkBtn,onClick:we,disabled:$!==void 0&&Q.length>=$,children:"Select all"}),e.jsx("button",{type:"button",className:K.bulkBtn,onClick:()=>ce([]),disabled:Q.length===0,children:"Clear all"}),$!==void 0&&e.jsxs("span",{className:K.bulkCount,children:[Q.length," / ",$]})]}),e.jsx("div",{className:K.list,ref:oe,role:"presentation",children:ae.length===0?e.jsx("div",{className:K.empty,children:"No results"}):ae.map((u,E)=>{const T=Q.includes(u.value),U=E===N,ge=!T&&be,ue=u.disabled||ge;return e.jsxs("div",{id:`${G}-opt-${E}`,role:"option","aria-selected":T,"aria-disabled":ue,"data-idx":E,className:[K.option,T?K.optionSelected:"",U?K.optionActive:"",ue?K.optionDisabled:""].filter(Boolean).join(" "),onClick:()=>!ue&&le(u),onMouseEnter:()=>!ue&&V(E),children:[k&&e.jsx("span",{className:[K.checkbox,T?K.checkboxChecked:""].filter(Boolean).join(" "),"aria-hidden":"true",children:T&&e.jsx(_n,{})}),u.icon&&e.jsx("span",{className:K.optionIcon,children:u.icon}),e.jsxs("span",{className:K.optionLabel,children:[e.jsx("span",{className:K.optionTitle,children:u.label}),u.description&&e.jsx("span",{className:K.optionDesc,children:u.description})]}),!k&&e.jsx("span",{className:K.check,"aria-hidden":!0,children:T&&e.jsx(_n,{})})]},u.value)})})]}),b&&!k&&e.jsx("input",{type:"hidden",name:b,value:x}),b&&k&&Q.map(u=>e.jsx("input",{type:"hidden",name:b,value:u},u))]}),i&&e.jsx("p",{className:K.errorText,children:i}),!i&&a&&e.jsx("p",{className:K.helperText,children:a})]})},Ji="_field_sc9v8_16",Zi="_fullWidth_sc9v8_24",ec="_disabled_sc9v8_28",tc="_trigger_sc9v8_28",nc="_label_sc9v8_34",sc="_selectWrapper_sc9v8_41",oc="_open_sc9v8_70",rc="_hasError_sc9v8_74",ac="_sm_sc9v8_86",ic="_md_sc9v8_93",cc="_lg_sc9v8_99",lc="_triggerValue_sc9v8_106",dc="_triggerPlaceholder_sc9v8_107",uc="_triggerText_sc9v8_120",hc="_triggerActions_sc9v8_127",pc="_chip_sc9v8_136",_c="_chipLabel_sc9v8_152",fc="_chipRemove_sc9v8_158",mc="_chipOverflow_sc9v8_174",vc="_clearBtn_sc9v8_188",xc="_chevron_sc9v8_204",gc="_chevronOpen_sc9v8_212",bc="_menu_sc9v8_224",yc="_menuOpen_sc9v8_1",wc="_searchRow_sc9v8_250",jc="_searchIconWrap_sc9v8_259",kc="_searchInput_sc9v8_265",Nc="_tree_sc9v8_281",Ec="_empty_sc9v8_306",Tc="_row_sc9v8_314",Ic="_rowDisabled_sc9v8_331",$c="_rowActive_sc9v8_335",Cc="_rowSelected_sc9v8_340",Mc="_rowLabel_sc9v8_343",Lc="_indent_sc9v8_353",Dc="_indentUnit_sc9v8_359",Bc="_toggle_sc9v8_375",Sc="_toggleOpen_sc9v8_391",Rc="_togglePlaceholder_sc9v8_396",Ac="_spinner_sc9v8_403",zc="_spin_sc9v8_403",Pc="_checkbox_sc9v8_418",Oc="_checkboxChecked_sc9v8_436",Wc="_checkboxMixed_sc9v8_442",Hc="_rowIcon_sc9v8_449",Fc="_rowText_sc9v8_459",qc="_rowDesc_sc9v8_474",Vc="_match_sc9v8_483",Uc="_check_sc9v8_418",Gc="_menuFooter_sc9v8_502",Kc="_footerBtn_sc9v8_513",Qc="_errorText_sc9v8_529",Yc="_helperText_sc9v8_536",F={field:Ji,fullWidth:Zi,disabled:ec,trigger:tc,label:nc,selectWrapper:sc,open:oc,hasError:rc,sm:ac,md:ic,lg:cc,triggerValue:lc,triggerPlaceholder:dc,triggerText:uc,triggerActions:hc,chip:pc,chipLabel:_c,chipRemove:fc,chipOverflow:mc,clearBtn:vc,chevron:xc,chevronOpen:gc,menu:bc,menuOpen:yc,searchRow:wc,searchIconWrap:jc,searchInput:kc,tree:Nc,empty:Ec,row:Tc,rowDisabled:Ic,rowActive:$c,rowSelected:Cc,rowLabel:Mc,indent:Lc,indentUnit:Dc,toggle:Bc,toggleOpen:Sc,togglePlaceholder:Rc,spinner:Ac,spin:zc,checkbox:Pc,checkboxChecked:Oc,checkboxMixed:Wc,rowIcon:Hc,rowText:Fc,rowDesc:qc,match:Vc,check:Uc,menuFooter:Gc,footerBtn:Kc,errorText:Qc,helperText:Yc},Xc=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 6l4 4 4-4",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),Jc=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"10",height:"10",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M6 4l4 4-4 4",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),mn=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"12",height:"12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M3.5 8.5l3 3 6-7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),Zc=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"10",height:"10",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 8h8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})}),vn=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"12",height:"12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}),el=()=>e.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"7",cy:"7",r:"4.5",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M10.5 10.5L13 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),tl=n=>{const t=new Map,s=new Map,o=new Set,a=(i,l)=>{for(const c of i)t.set(c.value,c),s.set(c.value,l),!c.children||c.children.length===0?c.isLeaf!==!1&&o.add(c.value):a(c.children,c.value)};return a(n,null),{nodeByValue:t,parentByValue:s,leafValues:o}},bt=(n,t=[])=>{if(!n.children||n.children.length===0)return t.push(n.value),t;for(const s of n.children)bt(s,t);return t},nl=(n,t,s)=>{const o=new Set,a=new Set,i=(l,c)=>{let p=!1;for(const v of l){const y=s(v,t),_=v.children?i(v.children,[...c,v.value]):!1;(y||_)&&(o.add(v.value),c.forEach(b=>o.add(b)),p=!0,y&&a.add(v.value))}return p};return i(n,[]),{visible:o,matched:a}},sl=(n,t)=>n.label.toLowerCase().includes(t.toLowerCase()),ol=(n,t)=>{if(!t)return n;const s=n.toLowerCase().indexOf(t.toLowerCase());return s===-1?n:e.jsxs(e.Fragment,{children:[n.slice(0,s),e.jsx("span",{className:F.match,children:n.slice(s,s+t.length)}),n.slice(s+t.length)]})},rl=({data:n,value:t,defaultValue:s,onChange:o,multiple:a=!1,checkStrictly:i=!1,checkedStrategy:l="leaf",expandedKeys:c,defaultExpandedKeys:p,onExpandedChange:v,defaultExpandAll:y=!1,loadChildren:_,searchable:b=!1,filter:M=sl,maxTagCount:k=3,label:D,placeholder:$=a?"Select items":"Select an item",helperText:z,error:q,size:G="md",fullWidth:H=!1,disabled:w=!1,clearable:S=!1,id:L,name:I,className:ee=""})=>{const O=r.useId(),x=L??`evo-tree-${O}`,Q=`${x}-tree`,B=t!==void 0,re=r.useMemo(()=>{const h=B?t:s;return h==null?[]:Array.isArray(h)?h:[h]},[]),[N,V]=r.useState(re),Y=r.useMemo(()=>B?t==null?[]:Array.isArray(t)?t:[t]:N,[B,t,N]),[se,J]=r.useState({}),[de,te]=r.useState(new Set),oe=r.useMemo(()=>{if(Object.keys(se).length===0)return n;const h=d=>d.map(g=>{const R=se[g.value]??g.children;return R?{...g,children:h(R)}:g});return h(n)},[n,se]),ae=r.useMemo(()=>tl(oe),[oe]),Ee=r.useMemo(()=>{if(c)return c;if(p)return p;if(y){const h=[],d=g=>g.forEach(j=>{j.children&&j.children.length&&(h.push(j.value),d(j.children))});return d(n),h}return[]},[]),[Te,be]=r.useState(Ee),ce=c??Te,Be=r.useMemo(()=>new Set(ce),[ce]),ye=r.useCallback(h=>{c===void 0&&be(h),v==null||v(h)},[c,v]),[ve,le]=r.useState(!1),[xe,We]=r.useState(""),[we,ke]=r.useState(-1),m=r.useRef(null),u=r.useRef(null),E=r.useRef(null),T=r.useRef(null),U=r.useMemo(()=>!b||!xe.trim()?null:nl(oe,xe,M),[oe,xe,b,M]),ge=r.useMemo(()=>U?U.visible:Be,[U,Be]),ue=r.useMemo(()=>{const h=[],d=(g,j)=>{for(const R of g){if(U&&!U.visible.has(R.value))continue;const Z=R.children&&R.children.length>0||R.isLeaf===!1;h.push({node:R,level:j,hasChildren:Z}),Z&&ge.has(R.value)&&R.children&&d(R.children,j+1)}};return d(oe,0),h},[oe,ge,U]),Pe=r.useMemo(()=>new Set(Y),[Y]),ze=r.useCallback(h=>{if(!a||i||!h.children||h.children.length===0)return Pe.has(h.value)?"checked":"unchecked";const d=bt(h);if(d.length===0)return Pe.has(h.value)?"checked":"unchecked";let g=0;for(const j of d)Pe.has(j)&&g++;return g===0?"unchecked":g===d.length?"checked":"mixed"},[a,i,Pe]),He=r.useCallback(h=>{if(!a||i)return Array.from(h);if(l==="leaf")return Array.from(h).filter(j=>ae.leafValues.has(j));if(l==="all"){const j=new Set(h),R=Z=>{for(const pe of Z)pe.children&&pe.children.length&&(R(pe.children),bt(pe).every(je=>h.has(je))&&j.add(pe.value))};return R(oe),Array.from(j)}const d=[],g=j=>{for(const R of j)R.children&&R.children.length?bt(R).every(pe=>h.has(pe))?d.push(R.value):g(R.children):h.has(R.value)&&d.push(R.value)};return g(oe),d},[a,i,l,oe,ae.leafValues]),Le=r.useCallback(h=>{const d=He(h);B||V(d);const g=d.map(j=>ae.nodeByValue.get(j)).filter(Boolean);o==null||o(d,g)},[He,B,ae.nodeByValue,o]),Qe=r.useCallback(h=>{B||V(h?[h]:[]),o==null||o(h,h?ae.nodeByValue.get(h)??null:null)},[B,ae.nodeByValue,o]),Ze=r.useMemo(()=>{if(!a||i)return new Set(Y);const h=new Set;for(const d of Y){const g=ae.nodeByValue.get(d);if(!g){h.add(d);continue}!g.children||g.children.length===0?h.add(d):bt(g).forEach(j=>h.add(j))}return h},[Y,a,i,ae.nodeByValue]),nt=r.useCallback(h=>{if(Be.has(h.value)){ye(ce.filter(j=>j!==h.value));return}ye([...ce,h.value]),_&&!se[h.value]&&(h.isLeaf===!1||!h.children&&h.isLeaf!==!0)&&(te(j=>new Set(j).add(h.value)),_(h).then(j=>{J(R=>({...R,[h.value]:j}))}).finally(()=>{te(j=>{const R=new Set(j);return R.delete(h.value),R})}))},[ce,Be,ye,_,se]),Ye=r.useCallback(h=>{var R;if(h.disabled)return;if(!a){Qe(h.value),le(!1),(R=u.current)==null||R.focus();return}if(i){const Z=new Set(Y);Z.has(h.value)?Z.delete(h.value):Z.add(h.value);const pe=Array.from(Z);B||V(pe);const Se=pe.map(je=>ae.nodeByValue.get(je)).filter(Boolean);o==null||o(pe,Se);return}const d=new Set(Ze),g=ze(h),j=h.children&&h.children.length?bt(h):[h.value];g==="checked"?j.forEach(Z=>d.delete(Z)):j.forEach(Z=>d.add(Z)),Le(d)},[a,i,Y,Ze,ze,Le,Qe,B,ae.nodeByValue,o]);r.useEffect(()=>{if(!ve)return;const h=d=>{var g;(g=m.current)!=null&&g.contains(d.target)||(le(!1),We(""))};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[ve]),r.useEffect(()=>{if(ve){const h=ue.findIndex(d=>Pe.has(d.node.value));if(ke(h>=0?h:ue.findIndex(d=>!d.node.disabled)),b){const d=setTimeout(()=>{var g;return(g=E.current)==null?void 0:g.focus()},30);return()=>clearTimeout(d)}}else We(""),ke(-1)},[ve]),r.useEffect(()=>{var d;if(!ve||we<0)return;const h=(d=T.current)==null?void 0:d.querySelector(`[data-idx="${we}"]`);h==null||h.scrollIntoView({block:"nearest"})},[we,ve]);const lt=h=>{if(ue.length===0)return;let d=we;for(let g=0;g<ue.length;g++)if(d=(d+h+ue.length)%ue.length,!ue[d].node.disabled){ke(d);return}},dt=h=>{var g;if(w)return;if(!ve){(h.key==="Enter"||h.key===" "||h.key==="ArrowDown"||h.key==="ArrowUp")&&(h.preventDefault(),le(!0));return}const d=ue[we];if(h.key==="Escape")h.preventDefault(),le(!1),(g=u.current)==null||g.focus();else if(h.key==="ArrowDown")h.preventDefault(),lt(1);else if(h.key==="ArrowUp")h.preventDefault(),lt(-1);else if(h.key==="ArrowRight"){if(!d)return;if(h.preventDefault(),d.hasChildren&&!Be.has(d.node.value))nt(d.node);else if(d.hasChildren){const j=we+1;j<ue.length&&ue[j].level>d.level&&ke(j)}}else if(h.key==="ArrowLeft"){if(!d)return;if(h.preventDefault(),d.hasChildren&&Be.has(d.node.value))nt(d.node);else for(let j=we-1;j>=0;j--)if(ue[j].level<d.level){ke(j);break}}else if(h.key==="Enter")h.preventDefault(),d&&Ye(d.node);else if(h.key===" "&&a)h.preventDefault(),d&&Ye(d.node);else if(h.key==="Home"){h.preventDefault();const j=ue.findIndex(R=>!R.node.disabled);j>=0&&ke(j)}else if(h.key==="End"){h.preventDefault();for(let j=ue.length-1;j>=0;j--)if(!ue[j].node.disabled){ke(j);break}}else h.key==="Tab"&&le(!1)},kt=h=>{h.stopPropagation(),a?Le(new Set):Qe("")},f=()=>{if(a){const d=Y.map(R=>ae.nodeByValue.get(R)).filter(Boolean);if(d.length===0)return e.jsx("span",{className:F.triggerPlaceholder,children:e.jsx("span",{className:F.triggerText,children:$})});const g=d.slice(0,k),j=d.length-g.length;return e.jsxs("span",{className:F.triggerValue,children:[g.map(R=>e.jsxs("span",{className:F.chip,children:[e.jsx("span",{className:F.chipLabel,children:R.label}),e.jsx("span",{role:"button","aria-label":`Remove ${R.label}`,tabIndex:-1,className:F.chipRemove,onMouseDown:Z=>Z.preventDefault(),onClick:Z=>{Z.stopPropagation(),Ye(R)},children:e.jsx(vn,{})})]},R.value)),j>0&&e.jsxs("span",{className:F.chipOverflow,children:["+",j]})]})}const h=Y[0]?ae.nodeByValue.get(Y[0]):void 0;return e.jsxs("span",{className:h?F.triggerValue:F.triggerPlaceholder,children:[(h==null?void 0:h.icon)&&e.jsx("span",{className:F.rowIcon,children:h.icon}),e.jsx("span",{className:F.triggerText,children:(h==null?void 0:h.label)??$})]})},C=(h,d)=>{const{node:g,level:j,hasChildren:R}=h,Z=Be.has(g.value),pe=ze(g),Se=!a&&Pe.has(g.value),je=d===we,Ie=de.has(g.value);return e.jsxs("div",{id:`${x}-row-${d}`,role:"treeitem","aria-level":j+1,"aria-expanded":R?Z:void 0,"aria-selected":a?void 0:Se,"aria-checked":a?pe==="mixed"?"mixed":pe==="checked"?"true":"false":void 0,"aria-disabled":g.disabled,"data-idx":d,className:[F.row,je?F.rowActive:"",Se?F.rowSelected:"",g.disabled?F.rowDisabled:""].filter(Boolean).join(" "),onClick:()=>Ye(g),onMouseEnter:()=>!g.disabled&&ke(d),children:[e.jsx("span",{className:F.indent,"aria-hidden":!0,children:Array.from({length:j}).map(($e,Re)=>e.jsx("span",{className:F.indentUnit},Re))}),R?Ie?e.jsx("span",{className:F.toggle,"aria-hidden":!0,children:e.jsx("span",{className:F.spinner})}):e.jsx("span",{className:[F.toggle,Z?F.toggleOpen:""].filter(Boolean).join(" "),role:"button",tabIndex:-1,"aria-label":Z?"Collapse":"Expand",onClick:$e=>{$e.stopPropagation(),nt(g)},onMouseDown:$e=>$e.preventDefault(),children:e.jsx(Jc,{})}):e.jsx("span",{className:F.togglePlaceholder,"aria-hidden":!0}),a&&e.jsxs("span",{className:[F.checkbox,pe==="checked"?F.checkboxChecked:"",pe==="mixed"?F.checkboxMixed:""].filter(Boolean).join(" "),"aria-hidden":!0,children:[pe==="checked"&&e.jsx(mn,{}),pe==="mixed"&&e.jsx(Zc,{})]}),g.icon&&e.jsx("span",{className:F.rowIcon,children:g.icon}),e.jsxs("span",{className:F.rowText,children:[e.jsx("span",{className:F.rowLabel,children:xe?ol(g.label,xe):g.label}),g.description&&e.jsx("span",{className:F.rowDesc,children:g.description})]}),!a&&Se&&e.jsx("span",{className:F.check,"aria-hidden":!0,children:e.jsx(mn,{})})]},g.value)},W=Y.length>0,X=a?Y.join(","):Y[0]??"";return e.jsxs("div",{ref:m,className:[F.field,H?F.fullWidth:"",w?F.disabled:"",ee].filter(Boolean).join(" "),children:[D&&e.jsx("label",{htmlFor:x,className:F.label,children:D}),e.jsxs("div",{className:F.selectWrapper,children:[e.jsxs("button",{ref:u,id:x,type:"button",role:"combobox","aria-haspopup":"tree","aria-expanded":ve,"aria-controls":Q,"aria-invalid":!!q,disabled:w,className:[F.trigger,F[G],ve?F.open:"",q?F.hasError:""].filter(Boolean).join(" "),onClick:()=>!w&&le(h=>!h),onKeyDown:dt,children:[f(),e.jsxs("span",{className:F.triggerActions,children:[S&&W&&!w&&e.jsx("span",{role:"button",tabIndex:-1,"aria-label":"Clear selection",className:F.clearBtn,onClick:kt,onMouseDown:h=>h.preventDefault(),children:e.jsx(vn,{})}),e.jsx("span",{className:[F.chevron,ve?F.chevronOpen:""].filter(Boolean).join(" "),children:e.jsx(Xc,{})})]})]}),ve&&e.jsxs("div",{className:F.menu,children:[b&&e.jsxs("div",{className:F.searchRow,children:[e.jsx("span",{className:F.searchIconWrap,children:e.jsx(el,{})}),e.jsx("input",{ref:E,type:"text",className:F.searchInput,placeholder:"Search...",value:xe,onChange:h=>{We(h.target.value),ke(0)},onKeyDown:dt})]}),e.jsx("div",{ref:T,className:F.tree,role:"tree",id:Q,"aria-labelledby":x,"aria-multiselectable":a||void 0,"aria-activedescendant":we>=0?`${x}-row-${we}`:void 0,children:ue.length===0?e.jsx("div",{className:F.empty,children:"No results"}):ue.map((h,d)=>C(h,d))}),a&&W&&e.jsxs("div",{className:F.menuFooter,children:[e.jsxs("span",{children:[Y.length," selected"]}),e.jsx("button",{type:"button",className:F.footerBtn,onClick:()=>Le(new Set),children:"Clear all"})]})]}),I&&e.jsx("input",{type:"hidden",name:I,value:X})]}),q&&e.jsx("p",{className:F.errorText,children:q}),!q&&z&&e.jsx("p",{className:F.helperText,children:z})]})},al="_field_1i6oh_7",il="_fullWidth_1i6oh_15",cl="_disabled_1i6oh_19",ll="_inputWrapper_1i6oh_19",dl="_label_1i6oh_25",ul="_acWrapper_1i6oh_33",hl="_open_1i6oh_57",pl="_hasError_1i6oh_61",_l="_sm_1i6oh_69",fl="_md_1i6oh_74",ml="_lg_1i6oh_79",vl="_searchIconWrap_1i6oh_85",xl="_input_1i6oh_19",gl="_actions_1i6oh_119",bl="_statusIcon_1i6oh_126",yl="_clearBtn_1i6oh_132",wl="_spinner_1i6oh_152",jl="_evoAcSpin_1i6oh_1",kl="_menu_1i6oh_169",Nl="_evoAcMenuOpen_1i6oh_1",El="_sectionHeader_1i6oh_200",Tl="_recoveryBox_1i6oh_216",Il="_list_1i6oh_227",$l="_empty_1i6oh_252",Cl="_statusRow_1i6oh_253",Ml="_option_1i6oh_268",Ll="_optionActive_1i6oh_290",Dl="_optionDisabled_1i6oh_290",Bl="_optionSelected_1i6oh_294",Sl="_optionTitle_1i6oh_297",Rl="_optionRecovery_1i6oh_306",Al="_optionIcon_1i6oh_310",zl="_optionLabel_1i6oh_321",Pl="_optionDesc_1i6oh_336",Ol="_mark_1i6oh_346",Wl="_check_1i6oh_353",Hl="_errorText_1i6oh_364",Fl="_helperText_1i6oh_371",ie={field:al,fullWidth:il,disabled:cl,inputWrapper:ll,label:dl,acWrapper:ul,open:hl,hasError:pl,sm:_l,md:fl,lg:ml,searchIconWrap:vl,input:xl,actions:gl,statusIcon:bl,clearBtn:yl,spinner:wl,evoAcSpin:jl,menu:kl,evoAcMenuOpen:Nl,sectionHeader:El,recoveryBox:Tl,list:Il,empty:$l,statusRow:Cl,option:Ml,optionActive:Ll,optionDisabled:Dl,optionSelected:Bl,optionTitle:Sl,optionRecovery:Rl,optionIcon:Al,optionLabel:zl,optionDesc:Pl,mark:Ol,check:Wl,errorText:Hl,helperText:Fl},ql=()=>e.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"7",cy:"7",r:"4.5",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M10.5 10.5L13 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),Vl=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"12",height:"12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}),Ul=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M3.5 8.5l3 3 6-7",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),xn=()=>e.jsxs("svg",{viewBox:"0 0 16 16",width:"13",height:"13",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M8 4.5V8l2.5 1.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),Gl=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"13",height:"13",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M8 1.5l1.6 4.9 4.9 1.6-4.9 1.6L8 14.5l-1.6-4.9L1.5 8l4.9-1.6L8 1.5z",stroke:"currentColor",strokeWidth:"1.4",strokeLinejoin:"round"})}),gn=()=>e.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",className:ie.spinner,children:[e.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"2",strokeOpacity:"0.25"}),e.jsx("path",{d:"M14 8a6 6 0 0 0-6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),bn=new Map,Kl=n=>({get:()=>bn.get(n)??[],set:t=>{bn.set(n,t)}}),Ql=n=>({get:()=>{if(typeof window>"u")return[];try{const t=window.localStorage.getItem(`evo-recents:${n}`),s=t?JSON.parse(t):[];return Array.isArray(s)?s.filter(o=>typeof o=="string"):[]}catch{return[]}},set:t=>{if(!(typeof window>"u"))try{window.localStorage.setItem(`evo-recents:${n}`,JSON.stringify(t))}catch{}}});function yn(n,t){const s=n.length,o=t.length;if(s===0)return o;if(o===0)return s;let a=Array.from({length:o+1},(l,c)=>c),i=new Array(o+1);for(let l=1;l<=s;l++){i[0]=l;for(let c=1;c<=o;c++){const p=n[l-1]===t[c-1]?0:1;i[c]=Math.min(a[c]+1,i[c-1]+1,a[c-1]+p)}[a,i]=[i,a]}return a[o]}function Yl(n,t){const s=t.trim().toLowerCase();if(s.length<2)return null;let o=null,a=1/0;for(const l of n){if(l.disabled)continue;const c=l.label.toLowerCase(),p=Math.min(yn(s,c),yn(s,c.slice(0,s.length)));p<a&&(a=p,o=l)}if(!o)return null;const i=Math.max(1,Math.min(3,Math.round(s.length*.4)));return a<=i?{option:o,distance:a}:null}function Xl(n,t){const s=t.trim();if(!s)return n;const o=n.toLowerCase().indexOf(s.toLowerCase());return o<0?n:e.jsxs(e.Fragment,{children:[n.slice(0,o),e.jsx("mark",{className:ie.mark,children:n.slice(o,o+s.length)}),n.slice(o+s.length)]})}const Gn=r.forwardRef(({options:n,value:t,defaultValue:s=null,onChange:o,inputValue:a,onInputChange:i,label:l,placeholder:c="Search…",helperText:p,error:v,size:y="md",fullWidth:_=!1,disabled:b=!1,clearable:M=!0,loading:k=!1,debounce:D=0,minChars:$=0,maxResults:z=50,filter:q,highlightMatch:G=!0,openOnFocus:H=!0,emptyMessage:w="No results",smartRecovery:S=!1,recents:L=!1,renderOption:I,id:ee,name:O,className:x="",...Q},B)=>{const re=r.useId(),N=ee??`evo-autocomplete-${re}`,V=`${N}-listbox`,Y=t!==void 0,[se,J]=r.useState(s),de=Y?t:se,te=r.useMemo(()=>n.find(d=>d.value===de)??null,[n,de]),oe=a!==void 0,[ae,Ee]=r.useState(()=>{var d;return((d=n.find(g=>g.value===s))==null?void 0:d.label)??""}),Te=oe?a:ae,be=r.useMemo(()=>{if(!L)return null;const d={max:5,storage:Kl(O??N),label:"Recent"};return typeof L=="object"?{...d,...L}:d},[L,O,N]),[ce,Be]=r.useState(()=>(be==null?void 0:be.storage.get())??[]),[ye,ve]=r.useState(!1),[le,xe]=r.useState(0),We=r.useRef(null),we=r.useRef(null),ke=r.useRef(null),m=r.useRef(null),u=r.useCallback(d=>{we.current=d,typeof B=="function"?B(d):B&&(B.current=d)},[B]),T=Te.trim(),U=T.length>0&&T.length<$,ge=!!be&&T.length===0&&ce.length>0,ue=r.useMemo(()=>ge?ce.map(d=>n.find(g=>g.value===d)).filter(d=>!!d&&!d.disabled).slice(0,be.max):[],[ge,ce,n,be]),Pe=r.useMemo(()=>{if(U)return[];if(q===!1||T.length===0)return n.slice(0,z);const d=typeof q=="function"?q:(g,j)=>g.label.toLowerCase().includes(j.toLowerCase());return n.filter(g=>d(g,T)).slice(0,z)},[n,q,T,U,z]),ze=ge?ue:Pe,He=r.useMemo(()=>!S||k||U||ge||ze.length>0||T.length===0?null:Yl(n,T),[S,k,U,ge,ze.length,T,n]),Le=He?[He.option]:ze;r.useEffect(()=>{if(!ye)return;const d=g=>{var j;(j=We.current)!=null&&j.contains(g.target)||Ye()};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[ye]),r.useEffect(()=>{var g;if(!ye)return;const d=(g=ke.current)==null?void 0:g.querySelector(`[data-idx="${le}"]`);d==null||d.scrollIntoView({block:"nearest"})},[le,ye]),r.useEffect(()=>{ye||oe||Ee((te==null?void 0:te.label)??"")},[de]),r.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const Qe=r.useCallback(d=>{i&&(D>0?(m.current&&clearTimeout(m.current),m.current=setTimeout(()=>i(d),D)):i(d))},[i,D]),Ze=r.useCallback((d,g)=>{Y||J(d),o==null||o(d,g)},[Y,o]),nt=r.useCallback(d=>{be&&Be(g=>{const j=[d,...g.filter(R=>R!==d)].slice(0,be.max);return be.storage.set(j),j})},[be]),Ye=r.useCallback(()=>{ve(!1),xe(0),!oe&&te&&Ee(te.label)},[oe,te]),lt=r.useCallback(d=>{var g;d.disabled||(Ze(d.value,d),oe||Ee(d.label),Qe(d.label),nt(d.value),ve(!1),xe(0),(g=we.current)==null||g.focus())},[Ze,oe,Qe,nt]),dt=d=>{const g=d.target.value;oe||Ee(g),Qe(g),te&&g!==te.label&&Ze(null,null),xe(0),ye||ve(!0)},kt=()=>{var d;oe||Ee(""),Qe(""),Ze(null,null),xe(0),(d=we.current)==null||d.focus(),ve(!0)},f=d=>{if(Le.length===0)return;let g=le;for(let j=0;j<Le.length;j++)if(g=(g+d+Le.length)%Le.length,!Le[g].disabled){xe(g);return}},C=d=>{if(!b){if(!ye){(d.key==="ArrowDown"||d.key==="ArrowUp")&&(d.preventDefault(),ve(!0));return}switch(d.key){case"ArrowDown":d.preventDefault(),f(1);break;case"ArrowUp":d.preventDefault(),f(-1);break;case"Home":d.preventDefault(),xe(Le.findIndex(g=>!g.disabled));break;case"End":d.preventDefault();for(let g=Le.length-1;g>=0;g--)if(!Le[g].disabled){xe(g);break}break;case"Enter":{const g=Le[le];g&&!g.disabled&&(d.preventDefault(),lt(g));break}case"Escape":d.preventDefault(),Ye();break;case"Tab":Ye();break}}},W=ie[y],X=ye&&Le[le]?`${N}-opt-${le}`:void 0,h=(d,g,j)=>{const R=g===le,Z=d.value===de;return e.jsx("div",{id:`${N}-opt-${g}`,role:"option","aria-selected":Z,"aria-disabled":d.disabled||void 0,"data-idx":g,className:[ie.option,R?ie.optionActive:"",Z?ie.optionSelected:"",d.disabled?ie.optionDisabled:"",j==="recovery"?ie.optionRecovery:""].filter(Boolean).join(" "),onClick:()=>lt(d),onMouseEnter:()=>!d.disabled&&xe(g),children:I?I(d,{active:R,query:T}):e.jsxs(e.Fragment,{children:[j==="recent"&&e.jsx("span",{className:ie.optionIcon,"aria-hidden":"true",children:e.jsx(xn,{})}),j!=="recent"&&d.icon&&e.jsx("span",{className:ie.optionIcon,"aria-hidden":"true",children:d.icon}),e.jsxs("span",{className:ie.optionLabel,children:[e.jsx("span",{className:ie.optionTitle,children:G&&j==="option"?Xl(d.label,T):d.label}),d.description&&e.jsx("span",{className:ie.optionDesc,children:d.description})]}),Z&&e.jsx("span",{className:ie.check,"aria-hidden":"true",children:e.jsx(Ul,{})})]})},`${j}-${d.value}`)};return e.jsxs("div",{ref:We,className:[ie.field,_?ie.fullWidth:"",b?ie.disabled:"",x].filter(Boolean).join(" "),children:[l&&e.jsx("label",{htmlFor:N,className:ie.label,children:l}),e.jsxs("div",{className:ie.acWrapper,children:[e.jsxs("div",{className:[ie.inputWrapper,W,ye?ie.open:"",v?ie.hasError:""].filter(Boolean).join(" "),children:[e.jsx("span",{className:ie.searchIconWrap,"aria-hidden":"true",children:e.jsx(ql,{})}),e.jsx("input",{...Q,ref:u,id:N,type:"text",role:"combobox",autoComplete:"off","aria-autocomplete":"list","aria-expanded":ye,"aria-controls":V,"aria-activedescendant":X,"aria-invalid":!!v||void 0,"aria-describedby":v?`${N}-error`:p?`${N}-helper`:void 0,className:ie.input,placeholder:c,value:Te,disabled:b,onChange:dt,onKeyDown:C,onFocus:()=>H&&!b&&ve(!0)}),e.jsxs("span",{className:ie.actions,children:[k&&e.jsx("span",{className:ie.statusIcon,"aria-hidden":"true",children:e.jsx(gn,{})}),M&&!b&&(Te.length>0||de)&&e.jsx("button",{type:"button",tabIndex:-1,"aria-label":"Clear",className:ie.clearBtn,onClick:kt,onMouseDown:d=>d.preventDefault(),children:e.jsx(Vl,{})})]})]}),ye&&e.jsx("div",{className:ie.menu,role:"listbox",id:V,"aria-label":l??"Suggestions",children:k?e.jsxs("div",{className:ie.statusRow,children:[e.jsx(gn,{}),e.jsx("span",{children:"Loading…"})]}):U?e.jsxs("div",{className:ie.empty,children:["Type ",$-T.length," more character",$-T.length===1?"":"s","…"]}):He?e.jsxs("div",{className:ie.recoveryBox,children:[e.jsxs("div",{className:ie.sectionHeader,children:[e.jsx(Gl,{}),e.jsxs("span",{children:["No exact match — did you mean",He.distance===1?" this":"","?"]})]}),e.jsx("div",{className:ie.list,ref:ke,role:"presentation",children:h(He.option,0,"recovery")})]}):Le.length>0?e.jsxs(e.Fragment,{children:[ge&&e.jsxs("div",{className:ie.sectionHeader,children:[e.jsx(xn,{}),e.jsx("span",{children:be.label})]}),e.jsx("div",{className:ie.list,ref:ke,role:"presentation",children:Le.map((d,g)=>h(d,g,ge?"recent":"option"))})]}):T.length===0?e.jsx("div",{className:ie.empty,children:"Type to search…"}):e.jsx("div",{className:ie.empty,children:w})}),O&&e.jsx("input",{type:"hidden",name:O,value:de??""})]}),v&&e.jsx("p",{id:`${N}-error`,className:ie.errorText,children:v}),!v&&p&&e.jsx("p",{id:`${N}-helper`,className:ie.helperText,children:p})]})});Gn.displayName="EvoAutoComplete";const Jl="_group_ufbfw_1",Zl="_groupLabel_ufbfw_10",ed="_checkbox_ufbfw_18",td="_disabled_ufbfw_23",nd="_input_ufbfw_28",sd="_label_ufbfw_35",od="_checkmark_ufbfw_35",rd="_labelText_ufbfw_100",ad="_helperText_ufbfw_105",et={group:Jl,groupLabel:Zl,checkbox:ed,disabled:td,input:nd,label:sd,checkmark:od,labelText:rd,helperText:ad},id=({children:n,label:t,className:s=""})=>e.jsxs("fieldset",{className:`${et.group} ${s}`,children:[t&&e.jsx("legend",{className:et.groupLabel,children:t}),n]}),Kn=({label:n,helperText:t,indeterminate:s=!1,className:o="",disabled:a,id:i,...l})=>{const c=r.useRef(null);r.useEffect(()=>{c.current&&(c.current.indeterminate=s)},[s]);const p=i??(n==null?void 0:n.toLowerCase().replace(/\s+/g,"-"));return e.jsxs("div",{className:[et.checkbox,a?et.disabled:"",o].filter(Boolean).join(" "),children:[e.jsx("input",{type:"checkbox",id:p,ref:c,disabled:a,className:et.input,...l}),e.jsxs("label",{htmlFor:p,className:et.label,children:[e.jsx("span",{className:et.checkmark}),e.jsx("span",{className:et.labelText,children:n})]}),t&&e.jsx("p",{className:et.helperText,children:t})]})};Kn.Group=id;const cd="_group_1oqsu_1",ld="_groupLabel_1oqsu_10",dd="_radio_1oqsu_18",ud="_disabled_1oqsu_22",hd="_input_1oqsu_27",pd="_label_1oqsu_34",_d="_radiomark_1oqsu_34",fd="_labelText_1oqsu_78",at={group:cd,groupLabel:ld,radio:dd,disabled:ud,input:hd,label:pd,radiomark:_d,labelText:fd},Qn=r.createContext(null),md=({children:n,name:t,value:s,onChange:o,label:a,className:i=""})=>e.jsx(Qn.Provider,{value:{name:t,value:s,onChange:o},children:e.jsxs("fieldset",{className:`${at.group} ${i}`,children:[a&&e.jsx("legend",{className:at.groupLabel,children:a}),n]})}),Yn=({value:n,label:t,disabled:s=!1,className:o=""})=>{const a=r.useContext(Qn),i=a?a.value===n:!1,l=`${(a==null?void 0:a.name)??"radio"}-${n}`;return e.jsxs("div",{className:[at.radio,s?at.disabled:"",o].filter(Boolean).join(" "),children:[e.jsx("input",{type:"radio",id:l,name:a==null?void 0:a.name,value:n,checked:i,disabled:s,className:at.input,onChange:()=>a==null?void 0:a.onChange(n)}),e.jsxs("label",{htmlFor:l,className:at.label,children:[e.jsx("span",{className:at.radiomark}),e.jsx("span",{className:at.labelText,children:t})]})]})};Yn.Group=md;const vd="_toggleWrapper_ke3d2_1",xd="_disabled_ke3d2_8",gd="_hiddenInput_ke3d2_14",bd="_track_ke3d2_21",yd="_sm_ke3d2_29",wd="_md_ke3d2_33",jd="_lg_ke3d2_37",kd="_on_ke3d2_41",Nd="_thumb_ke3d2_45",Ed="_label_ke3d2_55",rt={toggleWrapper:vd,disabled:xd,hiddenInput:gd,track:bd,sm:yd,md:wd,lg:jd,on:kd,thumb:Nd,label:Ed},wn={sm:"0.75rem",md:"1rem",lg:"1.25rem"},Td={sm:"0.75rem",md:"1rem",lg:"1.25rem"},Id=({checked:n,onChange:t,label:s,disabled:o=!1,size:a="md",className:i=""})=>e.jsxs("label",{className:[rt.toggleWrapper,o?rt.disabled:"",i].filter(Boolean).join(" "),children:[e.jsx("input",{type:"checkbox",role:"switch",className:rt.hiddenInput,checked:n,disabled:o,onChange:l=>t(l.target.checked)}),e.jsx("span",{className:[rt.track,rt[a],n?rt.on:""].filter(Boolean).join(" "),children:e.jsx("span",{className:rt.thumb,style:{width:wn[a],height:wn[a],transform:n?`translateX(${Td[a]})`:"translateX(0)"}})}),s&&e.jsx("span",{className:rt.label,children:s})]}),$d="_form_1cylw_1",Cd="_form_sm_1cylw_10",Md="_form_md_1cylw_15",Ld="_form_lg_1cylw_20",Dd="_header_1cylw_25",Bd="_headerBadge_1cylw_33",Sd="_headerTitle_1cylw_47",Rd="_headerDesc_1cylw_56",Ad="_section_1cylw_63",zd="_sectionHead_1cylw_74",Pd="_sectionTitle_1cylw_93",Od="_sectionDesc_1cylw_102",Wd="_sectionBody_1cylw_109",Hd="_section_split_1cylw_116",Fd="_row_1cylw_130",qd="_row_sm_1cylw_139",Vd="_row_md_1cylw_143",Ud="_row_lg_1cylw_147",Gd="_row_align_start_1cylw_151",Kd="_row_align_center_1cylw_155",Qd="_row_align_end_1cylw_159",Yd="_field_1cylw_163",Xd="_fieldLabel_1cylw_170",Jd="_fieldRequired_1cylw_180",Zd="_fieldControl_1cylw_186",eu="_fieldDesc_1cylw_191",tu="_fieldError_1cylw_198",nu="_field_error_1cylw_217",su="_actions_1cylw_221",ou="_actions_divider_1cylw_229",ru="_actions_left_1cylw_235",au="_actions_right_1cylw_239",iu="_actions_center_1cylw_243",cu="_actions_between_1cylw_247",me={form:$d,form_sm:Cd,form_md:Md,form_lg:Ld,header:Dd,headerBadge:Bd,headerTitle:Sd,headerDesc:Rd,section:Ad,sectionHead:zd,sectionTitle:Pd,sectionDesc:Od,sectionBody:Wd,section_split:Hd,row:Fd,row_sm:qd,row_md:Vd,row_lg:Ud,row_align_start:Gd,row_align_center:Kd,row_align_end:Qd,field:Yd,fieldLabel:Xd,fieldRequired:Jd,fieldControl:Zd,fieldDesc:eu,fieldError:tu,field_error:nu,actions:su,actions_divider:ou,actions_left:ru,actions_right:au,actions_center:iu,actions_between:cu},Xn=r.createContext({}),lu=()=>r.useContext(Xn),vt=(...n)=>n.filter(Boolean).join(" "),jt=({children:n,disabled:t=!1,size:s="md",layout:o="vertical",maxWidth:a,className:i="",style:l,...c})=>e.jsx(Xn.Provider,{value:{disabled:t,size:s,layout:o},children:e.jsx("form",{className:vt(me.form,me[`form_${s}`],me[`form_${o}`],i),style:a!==void 0?{maxWidth:a,...l}:l,...c,children:n})}),du=({title:n,description:t,badge:s,children:o,className:a=""})=>e.jsxs("header",{className:vt(me.header,a),children:[s&&e.jsx("div",{className:me.headerBadge,children:s}),n&&e.jsx("h2",{className:me.headerTitle,children:n}),t&&e.jsx("p",{className:me.headerDesc,children:t}),o]}),uu=({title:n,description:t,variant:s="stacked",children:o,className:a=""})=>e.jsxs("section",{className:vt(me.section,me[`section_${s}`],a),children:[(n||t)&&e.jsxs("div",{className:me.sectionHead,children:[n&&e.jsx("h3",{className:me.sectionTitle,children:n}),t&&e.jsx("p",{className:me.sectionDesc,children:t})]}),e.jsx("div",{className:me.sectionBody,children:o})]}),hu=({children:n,gap:t="md",align:s="start",className:o=""})=>e.jsx("div",{className:vt(me.row,me[`row_${t}`],me[`row_align_${s}`],o),children:n}),pu=({children:n,label:t,description:s,error:o,required:a,htmlFor:i,className:l=""})=>{const c=r.useId(),p=i??`evo-field-${c}`;return t||s||o?e.jsxs("div",{className:vt(me.field,o?me.field_error:"",l),children:[t&&e.jsxs("label",{htmlFor:p,className:me.fieldLabel,children:[t,a&&e.jsx("span",{className:me.fieldRequired,"aria-hidden":"true",children:"*"})]}),e.jsx("div",{className:me.fieldControl,children:n}),o?e.jsx("p",{className:me.fieldError,role:"alert",children:o}):s?e.jsx("p",{className:me.fieldDesc,children:s}):null]}):e.jsx("div",{className:vt(me.field,l),children:n})},_u=({children:n,align:t="right",divider:s=!0,className:o=""})=>e.jsx("div",{className:vt(me.actions,me[`actions_${t}`],s?me.actions_divider:"",o),children:n});jt.Header=du;jt.Section=uu;jt.Row=hu;jt.Field=pu;jt.Actions=_u;const fu="_overlay_118t4_19",mu="_overlayFadeIn_118t4_1",vu="_dialog_118t4_32",xu="_dialogSlideUp_118t4_1",gu="_sm_118t4_45",bu="_md_118t4_48",yu="_lg_118t4_51",wu="_fullscreen_118t4_54",ju="_header_118t4_60",ku="_headerContent_118t4_70",Nu="_closeBtn_118t4_78",Eu="_body_118t4_98",Tu="_footer_118t4_108",it={overlay:fu,overlayFadeIn:mu,dialog:vu,dialogSlideUp:xu,sm:gu,md:bu,lg:yu,fullscreen:wu,header:ju,headerContent:ku,closeBtn:Nu,body:Eu,footer:Tu},Iu=({children:n,onClose:t})=>e.jsxs("div",{className:it.header,children:[e.jsx("div",{className:it.headerContent,children:n}),t&&e.jsx("button",{className:it.closeBtn,onClick:t,"aria-label":"Close modal",children:"✕"})]}),$u=({children:n})=>e.jsx("div",{className:it.body,children:n}),Cu=({children:n})=>e.jsx("div",{className:it.footer,children:n}),Rt=({open:n,onClose:t,children:s,size:o="md",className:a=""})=>(r.useEffect(()=>{if(n)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[n]),r.useEffect(()=>{if(!n)return;const i=l=>{l.key==="Escape"&&t()};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[n,t]),n?jn.createPortal(e.jsx("div",{className:it.overlay,onClick:i=>{i.target===i.currentTarget&&t()},children:e.jsx("div",{className:[it.dialog,it[o],a].filter(Boolean).join(" "),role:"dialog","aria-modal":"true",children:s})}),document.body):null);Rt.Header=Iu;Rt.Body=$u;Rt.Footer=Cu;const Mu="_toasterRoot_izzak_61",Lu="_srOnly_izzak_68",Du="_anchor_izzak_80",Bu="_overflowPill_izzak_145",Su="_toast_izzak_61",Ru="_evoToastEnterRight_izzak_1",Au="_evoToastEnterLeft_izzak_1",zu="_evoToastEnterTop_izzak_1",Pu="_evoToastEnterBottom_izzak_1",Ou="_exiting_izzak_207",Wu="_evoToastExit_izzak_1",Hu="_noMotion_izzak_211",Fu="_toastIcon_izzak_227",qu="_toastBody_izzak_269",Vu="_toastTitle_izzak_274",Uu="_toastDescription_izzak_279",Gu="_toastCount_izzak_285",Ku="_toastProgressTrack_izzak_303",Qu="_toastProgressFill_izzak_315",Yu="_toastAction_izzak_348",Xu="_toastClose_izzak_371",Ju="_bellWrapper_izzak_392",Zu="_bell_izzak_392",eh="_bellOpen_izzak_442",th="_bellBadge_izzak_446",nh="_bellBadgeZero_izzak_465",sh="_bellPanelHost_izzak_470",oh="_panel_izzak_514",rh="_evoPanelEnter_izzak_1",ah="_panelHeader_izzak_532",ih="_panelTitle_izzak_541",ch="_panelHeaderActions_izzak_546",lh="_panelMarkAll_izzak_552",dh="_panelClose_izzak_572",uh="_panelBody_izzak_591",hh="_panelState_izzak_595",ph="_panelStateError_izzak_605",_h="_itemList_izzak_609",fh="_emptyState_izzak_621",mh="_emptyIcon_izzak_630",vh="_emptyTitle_izzak_641",xh="_emptyHint_izzak_647",gh="_item_izzak_609",bh="_itemUnread_izzak_661",yh="_itemInteractive_izzak_665",wh="_itemUnreadDot_izzak_676",jh="_itemMedia_izzak_690",kh="_itemAvatar_izzak_716",Nh="_itemMediaGlyph_izzak_722",Eh="_itemBody_izzak_726",Th="_itemTitle_izzak_731",Ih="_itemDescription_izzak_738",$h="_itemMeta_izzak_749",Ch="_itemTimestamp_izzak_758",Mh="_itemAction_izzak_762",Lh="_itemDismiss_izzak_782",A={toasterRoot:Mu,srOnly:Lu,anchor:Du,"anchor-top-left":"_anchor-top-left_izzak_94","anchor-top-center":"_anchor-top-center_izzak_101","anchor-top-right":"_anchor-top-right_izzak_109","anchor-bottom-left":"_anchor-bottom-left_izzak_116","anchor-bottom-center":"_anchor-bottom-center_izzak_122","anchor-bottom-right":"_anchor-bottom-right_izzak_129",overflowPill:Bu,toast:Su,evoToastEnterRight:Ru,evoToastEnterLeft:Au,evoToastEnterTop:zu,evoToastEnterBottom:Pu,exiting:Ou,evoToastExit:Wu,noMotion:Hu,"sev-success":"_sev-success_izzak_224",toastIcon:Fu,"sev-error":"_sev-error_izzak_232","sev-warning":"_sev-warning_izzak_240","sev-info":"_sev-info_izzak_248",toastBody:qu,toastTitle:Vu,toastDescription:Uu,toastCount:Gu,toastProgressTrack:Ku,toastProgressFill:Qu,toastAction:Yu,toastClose:Xu,bellWrapper:Ju,bell:Zu,"bell-ghost":"_bell-ghost_izzak_418","bell-solid":"_bell-solid_izzak_422","bell-sm":"_bell-sm_izzak_427","bell-md":"_bell-md_izzak_432","bell-lg":"_bell-lg_izzak_437",bellOpen:eh,bellBadge:th,bellBadgeZero:nh,bellPanelHost:sh,"place-bottom-end":"_place-bottom-end_izzak_488","place-bottom-start":"_place-bottom-start_izzak_493","place-bottom":"_place-bottom_izzak_488","place-top-end":"_place-top-end_izzak_504","place-top-start":"_place-top-start_izzak_509",panel:oh,evoPanelEnter:rh,panelHeader:ah,panelTitle:ih,panelHeaderActions:ch,panelMarkAll:lh,panelClose:dh,panelBody:uh,panelState:hh,panelStateError:ph,itemList:_h,emptyState:fh,emptyIcon:mh,emptyTitle:vh,emptyHint:xh,item:gh,itemUnread:bh,itemInteractive:yh,itemUnreadDot:wh,itemMedia:jh,itemAvatar:kh,itemMediaGlyph:Nh,itemBody:Eh,itemTitle:Th,itemDescription:Ih,itemMeta:$h,itemTimestamp:Ch,itemAction:Mh,itemDismiss:Lh},Jn={defaultAnchor:"top-right",defaultDuration:4e3,maxVisible:3,pauseOnFocusLoss:!0,persistErrors:!1},Dh=180,Bh=Object.freeze([]),Sh=Object.freeze({items:Object.freeze([]),unread:0});class Rh{constructor(){this.toasts=[],this.inboxItems=[],this.inboxSnapshot={items:[],unread:0},this.inboxOwnedExternally=!1,this.inboxOnChange=null,this.toastListeners=new Set,this.inboxListeners=new Set,this.configListeners=new Set,this.config=Jn,this.counter=0}setConfig(t){const s={...this.config,...t};Object.keys(s).some(a=>s[a]!==this.config[a])&&(this.config=s,this.notifyConfig())}getConfig(){return this.config}subscribeConfig(t){return this.configListeners.add(t),()=>{this.configListeners.delete(t)}}notifyConfig(){this.configListeners.forEach(t=>t())}resolveDuration(t,s){return t.persistent===!0?1/0:t.duration!=null?t.duration:s==="error"&&this.config.persistErrors&&t.persistent!==!1?1/0:this.config.defaultDuration}bindExternalInbox(t,s){t!==void 0?(this.inboxOwnedExternally=!0,this.inboxItems=t,this.inboxOnChange=s??null,this.refreshInboxSnapshot(),this.notifyInbox()):(this.inboxOwnedExternally=!1,this.inboxOnChange=null)}refreshInboxSnapshot(){let t=0;for(const s of this.inboxItems)s.read||(t+=1);this.inboxSnapshot={items:this.inboxItems,unread:t}}nextId(){return this.counter+=1,`evo-${Date.now().toString(36)}-${this.counter}`}pushToast(t,s={}){const o=s.severity??"info";if(s.groupKey!=null&&s.id==null){const c=this.toasts.find(p=>p.groupKey===s.groupKey&&!p.exiting);if(c)return this.toasts=this.toasts.map(p=>p.id===c.id?{...p,...s,id:c.id,severity:o,duration:this.resolveDuration(s,o),message:t,count:p.count+1,restartKey:p.restartKey+1}:p),this.applyInboxSideEffect(c.id,t,s),this.notifyToasts(),c.id}const a=s.id??this.nextId(),i=this.resolveDuration(s,o);if(this.toasts.find(c=>c.id===a))this.toasts=this.toasts.map(c=>c.id===a?{...c,...s,id:a,severity:o,duration:i,message:t,restartKey:c.restartKey+1,exiting:!1}:c);else{const c={...s,id:a,severity:o,duration:i,message:t,createdAt:Date.now(),count:1,restartKey:0};this.toasts=[...this.toasts,c]}return this.applyInboxSideEffect(a,t,s),this.notifyToasts(),a}applyInboxSideEffect(t,s,o){if(!o.inbox)return;const a={id:`${t}-inbox`,title:o.title??s,description:o.description,severity:o.severity??"info",icon:o.icon,action:o.action,...typeof o.inbox=="object"?o.inbox:{}};this.pushInbox(a)}updateToast(t,s){const o=this.toasts.findIndex(l=>l.id===t);if(o===-1)return;const a=this.toasts[o],i={...a,...s,id:t,severity:s.severity??a.severity,message:"title"in s&&s.title!=null?s.title:a.message,restartKey:a.restartKey+1};s.persistent===!0?i.duration=1/0:s.duration!=null?i.duration=s.duration:s.persistent===!1&&(i.duration=this.resolveDuration({...s,persistent:!1},i.severity)),this.toasts=this.toasts.map(l=>l.id===t?i:l),this.notifyToasts()}dismissToast(t,s="dismiss"){var a,i;if(t==null){const l=this.toasts.filter(c=>!c.exiting);if(l.length===0)return;l.forEach(c=>{var p;return(p=c.onDismiss)==null?void 0:p.call(c,c.id)}),this.toasts=this.toasts.map(c=>c.exiting?c:{...c,exiting:!0}),this.notifyToasts();return}const o=this.toasts.find(l=>l.id===t);!o||o.exiting||(s==="auto"?(a=o.onAutoClose)==null||a.call(o,t):(i=o.onDismiss)==null||i.call(o,t),this.toasts=this.toasts.map(l=>l.id===t?{...l,exiting:!0}:l),this.notifyToasts())}removeToast(t){const s=this.toasts.length;this.toasts=this.toasts.filter(o=>o.id!==t),this.toasts.length!==s&&this.notifyToasts()}getToasts(){return this.toasts}subscribeToasts(t){return this.toastListeners.add(t),()=>{this.toastListeners.delete(t)}}notifyToasts(){this.toastListeners.forEach(t=>t(this.toasts))}pushInbox(t){const s=t.id??this.nextId(),o=t.timestamp instanceof Date?t.timestamp.getTime():t.timestamp??Date.now(),a={id:s,title:t.title,description:t.description,severity:t.severity??"info",icon:t.icon,avatarUrl:t.avatarUrl,timestamp:o,read:t.read??!1,action:t.action,onClick:t.onClick,meta:t.meta},l=this.inboxItems.findIndex(c=>c.id===s)===-1?[a,...this.inboxItems]:this.inboxItems.map(c=>c.id===s?a:c);if(this.commitInbox(l),t.toast){const c={id:`${s}-toast`,title:a.title,description:a.description,severity:a.severity,icon:a.icon,action:a.action,...typeof t.toast=="object"?t.toast:{}};this.pushToast(a.title,c)}return s}markRead(t){this.commitInbox(this.inboxItems.map(s=>s.id===t?{...s,read:!0}:s))}markUnread(t){this.commitInbox(this.inboxItems.map(s=>s.id===t?{...s,read:!1}:s))}markAllRead(){this.commitInbox(this.inboxItems.map(t=>t.read?t:{...t,read:!0}))}removeInbox(t){this.commitInbox(this.inboxItems.filter(s=>s.id!==t))}clearInbox(){this.commitInbox([])}setInboxItems(t){this.commitInbox(t)}getInboxState(){return this.inboxSnapshot}subscribeInbox(t){return this.inboxListeners.add(t),()=>{this.inboxListeners.delete(t)}}commitInbox(t){var s;this.inboxItems=t,this.refreshInboxSnapshot(),this.inboxOwnedExternally&&((s=this.inboxOnChange)==null||s.call(this,t)),this.notifyInbox()}notifyInbox(){const t=this.inboxSnapshot;this.inboxListeners.forEach(s=>s(t))}}const ne=new Rh,Ah=(n,t)=>ne.pushToast(n,t),Je=Ah;Je.success=(n,t)=>ne.pushToast(n,{...t,severity:"success"});Je.error=(n,t)=>ne.pushToast(n,{...t,severity:"error"});Je.warning=(n,t)=>ne.pushToast(n,{...t,severity:"warning"});Je.info=(n,t)=>ne.pushToast(n,{...t,severity:"info"});Je.loading=(n,t)=>ne.pushToast(n,{...t,severity:"info",persistent:!0,dismissible:!1});Je.update=(n,t)=>ne.updateToast(n,t);Je.dismiss=n=>ne.dismissToast(n);Je.promise=(n,t)=>{const s=ne.pushToast(typeof t.loading=="object"&&t.loading!==null&&!Mt(t.loading)?t.loading.title??"":t.loading,{...typeof t.loading=="object"&&!Mt(t.loading)?t.loading:{},severity:"info",persistent:!0,dismissible:!1});return(typeof n=="function"?n():n).then(a=>{const i=typeof t.success=="function"?t.success(a):t.success,l=i!==null&&typeof i=="object"&&!Mt(i),c=l?i:{},p=l?c.title??"":i;ne.updateToast(s,{...c,severity:"success",persistent:!1,dismissible:!0,title:p})},a=>{const i=typeof t.error=="function"?t.error(a):t.error,l=i!==null&&typeof i=="object"&&!Mt(i),c=l?i:{},p=l?c.title??"":i;ne.updateToast(s,{...c,severity:"error",persistent:!1,dismissible:!0,title:p})}),s};Je.progress=(n,t)=>{const s=ne.pushToast(n,{...t,severity:(t==null?void 0:t.severity)??"info",persistent:!0,dismissible:(t==null?void 0:t.dismissible)??!1,progress:Vt((t==null?void 0:t.progress)??0)});return{id:s,setProgress:o=>ne.updateToast(s,{progress:Vt(o)}),update:o=>ne.updateToast(s,o),done:o=>ne.updateToast(s,{...o,severity:(o==null?void 0:o.severity)??"success",progress:1,persistent:!1,dismissible:!0}),fail:o=>ne.updateToast(s,{...o,severity:(o==null?void 0:o.severity)??"error",persistent:!1,dismissible:!0}),dismiss:()=>ne.dismissToast(s)}};function Mt(n){if(n==null)return!0;const t=typeof n;return!!(t==="string"||t==="number"||t==="boolean"||Array.isArray(n)||t==="object"&&n!==null&&"$$typeof"in n)}function Vt(n){return typeof n!="number"||Number.isNaN(n)||n<0?0:n>1?1:n}const zh={toast:Je,push:n=>ne.pushInbox(n),inbox:{markRead:n=>ne.markRead(n),markUnread:n=>ne.markUnread(n),markAllRead:()=>ne.markAllRead(),remove:n=>ne.removeInbox(n),clear:()=>ne.clearInbox(),setItems:n=>ne.setInboxItems(n),getState:()=>ne.getInboxState(),subscribe:n=>ne.subscribeInbox(n)},dismissAll:()=>ne.dismissToast()};function Xe(...n){return n.filter(Boolean).join(" ")}const Zn={success:"✓",error:"✕",warning:"!",info:"i"};function Ph(n,t){const s=Math.max(0,t-n),o=Math.floor(s/1e3);if(o<60)return"just now";const a=Math.floor(o/60);if(a<60)return`${a}m ago`;const i=Math.floor(a/60);if(i<24)return`${i}h ago`;const l=Math.floor(i/24);return l<7?`${l}d ago`:new Date(n).toLocaleDateString()}function es(n){const t=[],s=n.title??n.message;return(typeof s=="string"||typeof s=="number")&&t.push(String(s)),(typeof n.description=="string"||typeof n.description=="number")&&t.push(String(n.description)),t.join(". ")}function Oh(){return r.useSyncExternalStore(n=>ne.subscribeToasts(()=>n()),()=>ne.getToasts(),()=>Bh)}function sn(){return r.useSyncExternalStore(n=>ne.subscribeInbox(()=>n()),()=>ne.getInboxState(),()=>Sh)}function Wh(){return r.useSyncExternalStore(n=>ne.subscribeConfig(n),()=>ne.getConfig(),()=>Jn)}const on=({children:n,defaultAnchor:t="top-right",maxVisible:s=3,defaultDuration:o=4e3,pauseOnFocusLoss:a=!0,persistErrors:i=!1,inboxItems:l,onInboxChange:c})=>(r.useLayoutEffect(()=>{ne.setConfig({defaultAnchor:t,maxVisible:s,defaultDuration:o,pauseOnFocusLoss:a,persistErrors:i})},[t,s,o,a,i]),r.useLayoutEffect(()=>{ne.bindExternalInbox(l,c)},[l,c]),e.jsx(e.Fragment,{children:n}));on.displayName="EvoNotificationProvider";const Hh=({toast:n,anchor:t,index:s,total:o,hovered:a,pausedExternally:i,reducedMotion:l})=>{const c=r.useRef(0),p=r.useRef(null),v=r.useRef(null),y=r.useRef(n.restartKey),_=n.exiting??!1,b=a||i,M=Number.isFinite(n.duration);r.useEffect(()=>{if(!_)return;const x=window.setTimeout(()=>ne.removeToast(n.id),l?0:Dh);return()=>window.clearTimeout(x)},[_,l,n.id]),r.useEffect(()=>{if(y.current!==n.restartKey&&(y.current=n.restartKey,c.current=0),!M||_)return;if(b){p.current!=null&&(c.current+=Date.now()-p.current,p.current=null),v.current!=null&&(window.clearTimeout(v.current),v.current=null);return}const x=Math.max(0,n.duration-c.current);return p.current=Date.now(),v.current=window.setTimeout(()=>ne.dismissToast(n.id,"auto"),x),()=>{v.current!=null&&(window.clearTimeout(v.current),v.current=null),p.current!=null&&(c.current+=Date.now()-p.current,p.current=null)}},[b,M,_,n.duration,n.restartKey,n.id]);const k=o-1-s,D=a?1:Math.max(.94,1-k*.04),$=a?k*8:k*6,z=a?1:Math.max(.7,1-k*.15),q=t.startsWith("bottom")?1:-1,G={transform:`translateY(${$*q}px) scale(${D})`,opacity:z,zIndex:1e3+s},H=n.dismissible??!0,w=n.icon??Zn[n.severity],S=n.title??n.message,L=es(n),I=typeof n.progress=="number",ee=I?Vt(n.progress):0,O=L!=="";return e.jsxs("div",{className:Xe(A.toast,A[`sev-${n.severity}`],_&&A.exiting,l&&A.noMotion,n.className),style:G,role:O?"group":n.severity==="error"?"alert":"status","aria-label":O?L:void 0,children:[e.jsx("span",{className:A.toastIcon,"aria-hidden":"true",children:w}),e.jsxs("div",{className:A.toastBody,children:[S!=null&&e.jsxs("div",{className:A.toastTitle,children:[S,n.count>1&&e.jsxs("span",{className:A.toastCount,"aria-label":`repeated ${n.count} times`,children:["×",n.count]})]}),n.description!=null&&e.jsx("div",{className:A.toastDescription,children:n.description})]}),n.action&&e.jsx("button",{type:"button",className:A.toastAction,onClick:x=>{n.action.onClick(x),ne.dismissToast(n.id)},children:n.action.label}),H&&e.jsx("button",{type:"button",className:A.toastClose,onClick:()=>{ne.dismissToast(n.id)},"aria-label":"Dismiss notification",children:"✕"}),I&&e.jsx("div",{className:A.toastProgressTrack,role:"progressbar","aria-valuemin":0,"aria-valuemax":1,"aria-valuenow":ee,children:e.jsx("div",{className:A.toastProgressFill,style:{transform:`scaleX(${ee})`}})})]})},Fh=["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"];let Nt=null;const rn=({anchor:n,className:t})=>{const s=Oh(),{defaultAnchor:o,maxVisible:a,pauseOnFocusLoss:i}=Wh(),l=n??o,[c,p]=r.useState(null),[v,y]=r.useState(!0),[_,b]=r.useState(!1),[M,k]=r.useState(!1),[D,$]=r.useState(!1),[z,q]=r.useState(""),[G,H]=r.useState(""),w=r.useRef(new Set),S=r.useRef(null);if(S.current||(S.current=Symbol("evo-toaster")),r.useEffect(()=>{const I=S.current;return Nt==null?(Nt=I,$(!0)):Nt!==I&&console.warn("[EvoNotification] More than one <EvoNotificationToaster> is mounted; only the first renders. Remove the duplicate(s)."),()=>{Nt===I&&(Nt=null)}},[]),r.useEffect(()=>{var O;if(k(!0),typeof window>"u")return;const I=window.matchMedia("(prefers-reduced-motion: reduce)");b(I.matches);const ee=x=>b(x.matches);return(O=I.addEventListener)==null||O.call(I,"change",ee),()=>{var x;return(x=I.removeEventListener)==null?void 0:x.call(I,"change",ee)}},[]),r.useEffect(()=>{if(!i)return;const I=()=>y(!0),ee=()=>y(!1);return window.addEventListener("focus",I),window.addEventListener("blur",ee),()=>{window.removeEventListener("focus",I),window.removeEventListener("blur",ee)}},[i]),r.useEffect(()=>{const I=w.current,ee=new Set;for(const O of s){if(ee.add(O.id),I.has(O.id)||O.exiting)continue;I.add(O.id);const x=es(O);x&&(O.severity==="error"?H(x):q(x))}for(const O of I)ee.has(O)||I.delete(O)},[s]),r.useEffect(()=>{const I=ee=>{if(ee.key==="Escape"&&c!=null){const O=s.filter(x=>!x.exiting&&(x.anchor??l)===c);O.length>0&&ne.dismissToast(O[O.length-1].id)}};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[s,l,c]),!M||typeof document>"u"||!D)return null;const L={"top-left":[],"top-center":[],"top-right":[],"bottom-left":[],"bottom-center":[],"bottom-right":[]};for(const I of s){const ee=I.anchor??l;L[ee].push(I)}return jn.createPortal(e.jsxs("div",{className:Xe(A.toasterRoot,t),"aria-label":"Notifications",children:[e.jsx("div",{className:A.srOnly,"aria-live":"polite","aria-atomic":"true",children:z}),e.jsx("div",{className:A.srOnly,"aria-live":"assertive","aria-atomic":"true",children:G}),Fh.map(I=>{const ee=L[I];if(ee.length===0)return null;const O=Math.max(0,ee.length-a),x=ee.slice(Math.max(0,ee.length-a)),Q=c===I,B=!v;return e.jsxs("div",{className:Xe(A.anchor,A[`anchor-${I}`]),onMouseEnter:()=>p(I),onMouseLeave:()=>p(null),onFocus:()=>p(I),onBlur:re=>{re.currentTarget.contains(re.relatedTarget)||p(null)},children:[O>0&&e.jsxs("div",{className:A.overflowPill,"aria-hidden":"true",children:["+",O," more"]}),x.map((re,N)=>e.jsx(Hh,{toast:re,anchor:I,index:N,total:x.length,hovered:Q,pausedExternally:B,reducedMotion:_},re.id))]},I)})]}),document.body)};rn.displayName="EvoNotificationToaster";const an=r.forwardRef(function({variant:t="ghost",size:s="md",hideZero:o=!0,maxBadgeCount:a=99,panelPlacement:i="bottom-end",renderPanel:l="popover",panelTitle:c,panelEmptyState:p,className:v,onClick:y,..._},b){const{unread:M}=sn(),[k,D]=r.useState(!1),$=r.useRef(null),z=r.useId();r.useEffect(()=>{if(!k||l!=="popover")return;const H=S=>{var L;(L=$.current)!=null&&L.contains(S.target)||D(!1)},w=S=>{S.key==="Escape"&&D(!1)};return document.addEventListener("mousedown",H),document.addEventListener("keydown",w),()=>{document.removeEventListener("mousedown",H),document.removeEventListener("keydown",w)}},[k,l]);const q=M>a?`${a}+`:String(M),G=M>0||!o;return e.jsxs("div",{ref:$,className:A.bellWrapper,children:[e.jsxs("button",{ref:b,type:"button",className:Xe(A.bell,A[`bell-${t}`],A[`bell-${s}`],k&&A.bellOpen,v),"aria-label":M>0?`Notifications, ${M} unread`:"Notifications","aria-haspopup":l==="popover"?"dialog":void 0,"aria-expanded":l==="popover"?k:void 0,"aria-controls":l==="popover"?z:void 0,onClick:H=>{y==null||y(H),l==="popover"&&D(w=>!w)},..._,children:[e.jsx(ts,{}),G&&e.jsx("span",{className:Xe(A.bellBadge,M===0&&A.bellBadgeZero),children:q})]}),l==="popover"&&k&&e.jsx("div",{id:z,className:Xe(A.bellPanelHost,A[`place-${i}`]),children:e.jsx(At,{open:!0,onClose:()=>D(!1),title:c,emptyState:p})})]})});an.displayName="EvoNotificationBell";const ts=()=>e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 8 3 8H3s3-1 3-8"}),e.jsx("path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0"})]}),At=r.forwardRef(function({open:t=!0,onClose:s,title:o="Notifications",emptyState:a,loading:i=!1,error:l,showMarkAllRead:c=!0,maxHeight:p=480,className:v,style:y,..._},b){const{items:M,unread:k}=sn();return t?e.jsxs("div",{ref:b,className:Xe(A.panel,v),role:"dialog","aria-label":typeof o=="string"?o:"Notifications",style:y,..._,children:[e.jsxs("header",{className:A.panelHeader,children:[e.jsx("div",{className:A.panelTitle,children:o}),e.jsxs("div",{className:A.panelHeaderActions,children:[c&&k>0&&e.jsx("button",{type:"button",className:A.panelMarkAll,onClick:()=>ne.markAllRead(),children:"Mark all read"}),s&&e.jsx("button",{type:"button",className:A.panelClose,onClick:s,"aria-label":"Close notifications",children:"✕"})]})]}),e.jsx("div",{className:A.panelBody,style:{maxHeight:typeof p=="number"?`${p}px`:p},children:i?e.jsx("div",{className:A.panelState,children:"Loading…"}):l?e.jsx("div",{className:Xe(A.panelState,A.panelStateError),children:l}):M.length===0?e.jsx("div",{className:A.panelState,children:a??e.jsx(qh,{})}):e.jsx("ul",{className:A.itemList,children:M.map(D=>e.jsx("li",{children:e.jsx(zt,{item:D})},D.id))})})]}):null});At.displayName="EvoNotificationPanel";const qh=()=>e.jsxs("div",{className:A.emptyState,children:[e.jsx("div",{className:A.emptyIcon,"aria-hidden":"true",children:e.jsx(ts,{})}),e.jsx("div",{className:A.emptyTitle,children:"You're all caught up"}),e.jsx("div",{className:A.emptyHint,children:"New notifications will appear here."})]}),zt=r.forwardRef(function({item:t,onClick:s,className:o,...a},i){const[l,c]=r.useState(t.timestamp);r.useEffect(()=>{c(Date.now());const b=window.setInterval(()=>c(Date.now()),6e4);return()=>window.clearInterval(b)},[]);const p=r.useCallback(()=>{var b;(b=s??t.onClick)==null||b(t),t.read||ne.markRead(t.id)},[t,s]),v=r.useCallback(b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),p())},[p]),y=!!(s??t.onClick),_=t.icon??Zn[t.severity];return e.jsxs("div",{ref:i,className:Xe(A.item,!t.read&&A.itemUnread,y&&A.itemInteractive,o),role:y?"button":"group",tabIndex:y?0:void 0,onClick:y?p:void 0,onKeyDown:y?v:void 0,...a,children:[e.jsx("span",{className:A.itemUnreadDot,"aria-hidden":t.read}),e.jsx("div",{className:Xe(A.itemMedia,A[`sev-${t.severity}`]),"aria-hidden":"true",children:t.avatarUrl?e.jsx("img",{src:t.avatarUrl,alt:"",className:A.itemAvatar}):e.jsx("span",{className:A.itemMediaGlyph,children:_})}),e.jsxs("div",{className:A.itemBody,children:[e.jsx("div",{className:A.itemTitle,children:t.title}),t.description!=null&&e.jsx("div",{className:A.itemDescription,children:t.description}),e.jsxs("div",{className:A.itemMeta,children:[e.jsx("span",{className:A.itemTimestamp,children:Ph(t.timestamp,l)}),t.action&&e.jsx("button",{type:"button",className:A.itemAction,onClick:b=>{b.stopPropagation(),t.action.onClick(b)},children:t.action.label})]})]}),e.jsx("button",{type:"button",className:A.itemDismiss,onClick:b=>{b.stopPropagation(),ne.removeInbox(t.id)},"aria-label":"Remove notification",children:"✕"})]})});zt.displayName="EvoNotificationItem";function Vh(){return sn()}const Uh={Provider:on,Toaster:rn,Bell:an,Panel:At,Item:zt},Gh="_wrapper_1fxx0_11",Kh="_tooltip_1fxx0_17",Qh="_tooltipFadeIn_1fxx0_1",Yh="_top_1fxx0_33",Xh="_bottom_1fxx0_38",Jh="_left_1fxx0_43",Zh="_right_1fxx0_48",ep="_arrow_1fxx0_54",Lt={wrapper:Gh,tooltip:Kh,tooltipFadeIn:Qh,top:Yh,bottom:Xh,left:Jh,right:Zh,arrow:ep},tp=({content:n,children:t,placement:s="top",className:o=""})=>{const[a,i]=r.useState(!1);return e.jsxs("span",{className:`${Lt.wrapper} ${o}`,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onFocus:()=>i(!0),onBlur:()=>i(!1),children:[t,a&&e.jsxs("span",{className:`${Lt.tooltip} ${Lt[s]}`,role:"tooltip",children:[n,e.jsx("span",{className:Lt.arrow})]})]})},np="_alert_slsq7_1",sp="_success_slsq7_10",op="_alertIcon_slsq7_14",rp="_alertTitle_slsq7_17",ap="_error_slsq7_20",ip="_warning_slsq7_30",cp="_info_slsq7_40",lp="_alertContent_slsq7_65",dp="_alertDescription_slsq7_76",up="_dismissBtn_slsq7_83",pt={alert:np,success:sp,alertIcon:op,alertTitle:rp,error:ap,warning:ip,info:cp,alertContent:lp,alertDescription:dp,dismissBtn:up},hp={success:"✓",error:"✕",warning:"⚠",info:"i"},pp=({type:n="info",title:t,children:s,dismissible:o=!1,className:a=""})=>{const[i,l]=r.useState(!1);return i?null:e.jsxs("div",{className:[pt.alert,pt[n],a].filter(Boolean).join(" "),role:"alert",children:[e.jsx("span",{className:pt.alertIcon,children:hp[n]}),e.jsxs("div",{className:pt.alertContent,children:[t&&e.jsx("p",{className:pt.alertTitle,children:t}),e.jsx("div",{className:pt.alertDescription,children:s})]}),o&&e.jsx("button",{className:pt.dismissBtn,onClick:()=>l(!0),"aria-label":"Dismiss alert",children:"✕"})]})},_p="_badge_nypvn_1",fp="_sm_nypvn_12",mp="_md_nypvn_16",vp="_lg_nypvn_20",xp="_solid_nypvn_25",gp="_primary_nypvn_25",bp="_secondary_nypvn_30",yp="_success_nypvn_35",wp="_warning_nypvn_40",jp="_danger_nypvn_45",kp="_info_nypvn_50",Np="_outline_nypvn_56",Ep="_subtle_nypvn_84",Tp="_dot_nypvn_115",Ip="_removeBtn_nypvn_123",$p="_badgeGroup_nypvn_142",ft={badge:_p,sm:fp,md:mp,lg:vp,solid:xp,primary:gp,secondary:bp,success:yp,warning:wp,danger:jp,info:kp,outline:Np,subtle:Ep,dot:Tp,removeBtn:Ip,badgeGroup:$p},Cp=({children:n,className:t=""})=>e.jsx("div",{className:`${ft.badgeGroup} ${t}`,children:n}),ns=({children:n,severity:t="primary",variant:s="solid",size:o="md",dot:a=!1,removable:i=!1,onRemove:l,className:c=""})=>e.jsxs("span",{className:[ft.badge,ft[t],ft[s],ft[o],c].filter(Boolean).join(" "),children:[a&&e.jsx("span",{className:ft.dot}),n,i&&e.jsx("button",{className:ft.removeBtn,onClick:l,"aria-label":"Remove",children:"✕"})]});ns.Group=Cp;const Mp="_skeleton_7wr3a_9",Lp="_animated_7wr3a_14",Dp="_textGroup_7wr3a_20",mt={skeleton:Mp,animated:Lp,textGroup:Dp},Et=n=>typeof n=="number"?`${n}px`:n,Bp=({lines:n=3,className:t="",animated:s=!0})=>e.jsx("div",{className:`${mt.textGroup} ${t}`,children:Array.from({length:n}).map((o,a)=>e.jsx("div",{className:[mt.skeleton,s?mt.animated:""].filter(Boolean).join(" "),style:{width:a===n-1?"65%":"100%",height:"0.875rem",borderRadius:"4px"}},a))}),Sp=({size:n=40,className:t="",animated:s=!0})=>e.jsx("div",{className:[mt.skeleton,s?mt.animated:"",t].filter(Boolean).join(" "),style:{width:Et(n),height:Et(n),borderRadius:"50%"}}),cn=({width:n="100%",height:t="1rem",borderRadius:s="6px",className:o="",animated:a=!0})=>e.jsx("div",{className:[mt.skeleton,a?mt.animated:"",o].filter(Boolean).join(" "),style:{width:Et(n),height:Et(t),borderRadius:Et(s)}});cn.Text=Bp;cn.Circle=Sp;const Rp="_wrapper_69yee_1",Ap="_scroll_69yee_11",zp="_table_69yee_30",Pp="_caption_69yee_38",Op="_thead_69yee_46",Wp="_th_69yee_46",Hp="_sortBtn_69yee_63",Fp="_sortIcon_69yee_85",qp="_sortActive_69yee_92",Vp="_tbody_69yee_99",Up="_tr_69yee_99",Gp="_td_69yee_103",Kp="_hoverable_69yee_167",Qp="_striped_69yee_171",Yp="_bordered_69yee_179",Xp="_stickyHeader_69yee_184",Jp="_clickable_69yee_195",Zp="_empty_69yee_202",e_="_emptyText_69yee_209",t_="_skeleton_69yee_213",n_="_evoTableShimmer_69yee_1",s_="_responsiveStack_69yee_237",o_="_emptyRow_69yee_272",fe={wrapper:Rp,scroll:Ap,table:zp,caption:Pp,thead:Op,th:Wp,sortBtn:Hp,sortIcon:Fp,sortActive:qp,tbody:Vp,tr:Up,td:Gp,"align-left":"_align-left_69yee_115","align-center":"_align-center_69yee_119","align-right":"_align-right_69yee_123","size-sm":"_size-sm_69yee_137","size-md":"_size-md_69yee_147","size-lg":"_size-lg_69yee_157",hoverable:Kp,striped:Qp,bordered:Yp,stickyHeader:Xp,clickable:Jp,empty:Zp,emptyText:e_,skeleton:t_,evoTableShimmer:n_,responsiveStack:s_,emptyRow:o_};function Ht(n,t){return t.split(".").reduce((s,o)=>{if(s!=null&&typeof s=="object")return s[o]},n)}function r_(n,t){return n==null&&t==null?0:n==null?-1:t==null?1:typeof n=="number"&&typeof t=="number"?n-t:String(n).localeCompare(String(t),void 0,{numeric:!0,sensitivity:"base"})}function a_(n,t,s){if(typeof s=="function")return s(n,t);if(s&&n&&typeof n=="object"){const o=n[s];if(typeof o=="string"||typeof o=="number")return o}return t}const i_=({direction:n})=>e.jsxs("svg",{className:fe.sortIcon,width:"8",height:"12",viewBox:"0 0 8 12","aria-hidden":"true",focusable:"false",children:[e.jsx("path",{d:"M4 0 L8 4 H0 Z",fill:"currentColor",opacity:n==="asc"?1:.3}),e.jsx("path",{d:"M4 12 L0 8 H8 Z",fill:"currentColor",opacity:n==="desc"?1:.3})]}),c_=({columns:n,data:t,size:s="md",striped:o=!1,hoverable:a=!0,bordered:i=!1,stickyHeader:l=!1,loading:c=!1,loadingRows:p=5,rowKey:v,emptyState:y,emptyText:_="No data available.",onRowClick:b,onRowDoubleClick:M,getRowClassName:k,responsive:D="scroll",caption:$,sort:z,onSortChange:q,defaultSort:G,className:H})=>{const w=z!==void 0,[S,L]=r.useState(G??null),I=w?z:S,ee=N=>{let V;!I||I.key!==N?V={key:N,direction:"asc"}:I.direction==="asc"?V={key:N,direction:"desc"}:V=null,w||L(V),q==null||q(V)},O=r.useMemo(()=>{if(!I)return t;const N=n.find(se=>se.key===I.key);if(!N)return t;const V=I.direction,Y=[...t];return N.sortFn?Y.sort((se,J)=>N.sortFn(se,J,V)):Y.sort((se,J)=>{const de=Ht(se,N.key),te=Ht(J,N.key),oe=r_(de,te);return V==="asc"?oe:-oe}),Y},[t,n,I]),x=!!(b||M),Q=[fe.wrapper,fe[`size-${s}`],o&&fe.striped,a&&fe.hoverable,i&&fe.bordered,l&&fe.stickyHeader,D==="stack"&&fe.responsiveStack,x&&fe.clickable,H].filter(Boolean).join(" "),B=N=>{const V=N.align??"left",Y=(I==null?void 0:I.key)===N.key,se=Y?I.direction:void 0,J=Y?se==="asc"?"ascending":"descending":N.sortable?"none":void 0,de=[fe.th,fe[`align-${V}`],N.headerClassName].filter(Boolean).join(" ");return e.jsx("th",{scope:"col",className:de,style:N.width?{width:N.width}:void 0,"aria-sort":J,children:N.sortable?e.jsxs("button",{type:"button",className:[fe.sortBtn,Y?fe.sortActive:""].filter(Boolean).join(" "),onClick:()=>ee(N.key),children:[e.jsx("span",{children:N.header}),e.jsx(i_,{direction:se})]}):N.header},N.key)},re=()=>c?Array.from({length:Math.max(1,p)}).map((N,V)=>e.jsx("tr",{className:fe.tr,children:n.map(Y=>e.jsx("td",{className:[fe.td,fe[`align-${Y.align??"left"}`]].filter(Boolean).join(" "),"data-label":typeof Y.header=="string"?Y.header:Y.key,children:e.jsx("span",{className:fe.skeleton})},Y.key))},`evo-skeleton-${V}`)):O.length===0?e.jsx("tr",{className:fe.emptyRow,children:e.jsx("td",{colSpan:n.length,className:fe.empty,children:y??e.jsx("span",{className:fe.emptyText,children:_})})}):O.map((N,V)=>{const Y=[fe.tr,k==null?void 0:k(N,V)].filter(Boolean).join(" ");return e.jsx("tr",{className:Y,onClick:b?()=>b(N,V):void 0,onDoubleClick:M?()=>M(N,V):void 0,children:n.map(se=>{const J=Ht(N,se.key),de=se.align??"left",te=[fe.td,fe[`align-${de}`],se.cellClassName].filter(Boolean).join(" ");return e.jsx("td",{className:te,"data-label":typeof se.header=="string"?se.header:se.key,children:se.render?se.render(J,N,V):J==null?"":String(J)},se.key)})},a_(N,V,v))});return e.jsx("div",{className:Q,children:e.jsx("div",{className:fe.scroll,children:e.jsxs("table",{className:fe.table,children:[$&&e.jsx("caption",{className:fe.caption,children:$}),e.jsx("thead",{className:fe.thead,children:e.jsx("tr",{children:n.map(B)})}),e.jsx("tbody",{className:fe.tbody,children:re()})]})})})},l_="_root_1wpat_1",d_="_fullWidth_1wpat_11",u_="_label_1wpat_15",h_="_stage_1wpat_21",p_="_disabled_1wpat_38",__="_bgChecker_1wpat_43",f_="_imageWrap_1wpat_49",m_="_image_1wpat_49",v_="_overlay_1wpat_68",x_="_overlayCircle_1wpat_77",g_="_circleMask_1wpat_82",b_="_grid_1wpat_89",y_="_gridLine_1wpat_95",w_="_h_1wpat_99",j_="_v_1wpat_104",k_="_handle_1wpat_110",N_="_handleTL_1wpat_128",E_="_handleTR_1wpat_134",T_="_handleBL_1wpat_140",I_="_handleBR_1wpat_146",$_="_handleT_1wpat_128",C_="_handleB_1wpat_140",M_="_handleL_1wpat_166",L_="_handleR_1wpat_166",D_="_controls_1wpat_200",B_="_controlGroup_1wpat_211",S_="_controlLabel_1wpat_218",R_="_iconBtn_1wpat_227",A_="_zoomSlider_1wpat_260",z_="_ratioRow_1wpat_294",P_="_ratioChip_1wpat_300",O_="_active_1wpat_318",W_="_divider_1wpat_333",H_="_helper_1wpat_339",F_="_placeholder_1wpat_344",q_="_spinner_1wpat_356",P={root:l_,fullWidth:d_,label:u_,stage:h_,disabled:p_,bgChecker:__,imageWrap:f_,image:m_,overlay:v_,overlayCircle:x_,circleMask:g_,grid:b_,gridLine:y_,h:w_,v:j_,handle:k_,handleTL:N_,handleTR:E_,handleBL:T_,handleBR:I_,handleT:$_,handleB:C_,handleL:M_,handleR:L_,controls:D_,controlGroup:B_,controlLabel:S_,iconBtn:R_,zoomSlider:A_,ratioRow:z_,ratioChip:P_,active:O_,divider:W_,helper:H_,placeholder:F_,spinner:q_},V_=[{label:"Free",value:null},{label:"1:1",value:1},{label:"4:3",value:4/3},{label:"3:4",value:3/4},{label:"16:9",value:16/9},{label:"9:16",value:9/16}],Dt=24,Fe=(n,t,s)=>Math.min(s,Math.max(t,n)),_t=n=>(Math.round(n/90)*90%360+360)%360,U_=r.forwardRef(function({src:t,aspectRatio:s,circular:o=!1,showGrid:a=!0,showControls:i=!0,ratioPresets:l,minZoom:c=1,maxZoom:p=4,defaultZoom:v=1,defaultRotation:y=0,defaultCrop:_,height:b=360,background:M="checker",label:k,helperText:D,onChange:$,onReady:z,onError:q,disabled:G=!1,fullWidth:H=!0,className:w,ariaLabel:S},L){const I=o?1:s,ee=r.useRef(null),O=r.useRef(null),[x,Q]=r.useState({w:0,h:0}),[B,re]=r.useState(null),[N,V]=r.useState(!1),[Y,se]=r.useState(!1),[J,de]=r.useState(v),[te,oe]=r.useState(_t(y)),[ae,Ee]=r.useState({x:0,y:0}),[Te,be]=r.useState({left:(_==null?void 0:_.x)??10,top:(_==null?void 0:_.y)??10,width:(_==null?void 0:_.width)??80,height:(_==null?void 0:_.height)??80}),[ce,Be]=r.useState(I??null);r.useEffect(()=>{Be(I??null)},[I]),r.useLayoutEffect(()=>{const f=ee.current;if(!f)return;const C=()=>{const X=f.getBoundingClientRect();Q({w:X.width,h:X.height})};C();const W=new ResizeObserver(C);return W.observe(f),()=>W.disconnect()},[]),r.useEffect(()=>{if(V(!1),se(!1),re(null),!t)return;const f=new Image;return f.crossOrigin="anonymous",f.onload=()=>{re({w:f.naturalWidth,h:f.naturalHeight}),V(!0),z==null||z({naturalWidth:f.naturalWidth,naturalHeight:f.naturalHeight})},f.onerror=()=>{se(!0),q==null||q(new Error(`Failed to load image: ${t}`))},f.src=t,()=>{f.onload=null,f.onerror=null}},[t]);const ye=r.useMemo(()=>{if(!B||!x.w||!x.h)return 1;const f=te===90||te===270,C=f?B.h:B.w,W=f?B.w:B.h;return Math.min(x.w/C,x.h/W)},[B,x.w,x.h,te]),ve=r.useMemo(()=>{if(!B)return{w:0,h:0};const f=ye*J;return{w:B.w*f,h:B.h*f}},[B,ye,J]),le=r.useMemo(()=>({left:Te.left/100*x.w,top:Te.top/100*x.h,width:Te.width/100*x.w,height:Te.height/100*x.h}),[Te,x]),xe=r.useCallback(()=>{if(!B||!x.w||!x.h)return null;const f=ye*J,C=x.w/2+ae.x,W=x.h/2+ae.y,X=le.left+le.width/2,h=le.top+le.height/2,d=X-C,g=h-W,j=-te*Math.PI/180,R=d*Math.cos(j)-g*Math.sin(j),Z=d*Math.sin(j)+g*Math.cos(j),pe=te===90||te===270,Se=pe?le.height:le.width,je=pe?le.width:le.height,Ie=(R-Se/2)/f+B.w/2,$e=(Z-je/2)/f+B.h/2,Re=Se/f,Oe=je/f;return{x:Ie,y:$e,width:Re,height:Oe,rotation:te,sourceWidth:B.w,sourceHeight:B.h}},[B,x,ye,J,ae,le,te]),We=r.useRef("");r.useEffect(()=>{if(!N)return;const f=xe();if(!f)return;const C=`${f.x.toFixed(2)},${f.y.toFixed(2)},${f.width.toFixed(2)},${f.height.toFixed(2)},${f.rotation}`;C!==We.current&&(We.current=C,$==null||$(f))},[N,xe,$]),r.useEffect(()=>{ce==null||!x.w||!x.h||be(f=>{const C=f.width/100*x.w,W=f.height/100*x.h,X=C/ce;let h=C,d=X;X>W&&(d=W,h=W*ce);const g=(f.left+f.width/2)/100*x.w,j=(f.top+f.height/2)/100*x.h;let R=g-h/2,Z=j-d/2;return R=Fe(R,0,x.w-h),Z=Fe(Z,0,x.h-d),{left:R/x.w*100,top:Z/x.h*100,width:h/x.w*100,height:d/x.h*100}})},[ce,x.w,x.h]);const we=r.useRef(null),ke=r.useRef(null),m=r.useRef(new Map),u=f=>{var C,W;if(!(G||!N)){if((W=(C=f.target).setPointerCapture)==null||W.call(C,f.pointerId),m.current.set(f.pointerId,{x:f.clientX,y:f.clientY}),m.current.size===2){const X=Array.from(m.current.values()),h=Math.hypot(X[0].x-X[1].x,X[0].y-X[1].y);ke.current={startDist:h,startZoom:J},we.current=null;return}we.current={type:"pan",startX:f.clientX,startY:f.clientY,startPan:ae}}},E=f=>{if(!m.current.has(f.pointerId))return;if(m.current.set(f.pointerId,{x:f.clientX,y:f.clientY}),ke.current&&m.current.size>=2){const h=Array.from(m.current.values()),d=Math.hypot(h[0].x-h[1].x,h[0].y-h[1].y),g=Fe(ke.current.startZoom*(d/ke.current.startDist),c,p);de(g);return}const C=we.current;if(!C)return;const W=f.clientX-C.startX,X=f.clientY-C.startY;C.type==="pan"?Ee({x:C.startPan.x+W,y:C.startPan.y+X}):C.type==="move"?ge(W,X,C.startCrop):C.type==="resize"&&ue(C.corner,W,X,C.startCrop)},T=f=>{m.current.delete(f.pointerId),m.current.size<2&&(ke.current=null),m.current.size===0&&(we.current=null)},U=f=>{if(G||!N)return;f.preventDefault();const C=-f.deltaY*.0015;de(W=>Fe(W*(1+C),c,p))},ge=(f,C,W)=>{const X=x.w,h=x.h,d=W.left/100*X,g=W.top/100*h,j=W.width/100*X,R=W.height/100*h,Z=Fe(d+f,0,X-j),pe=Fe(g+C,0,h-R);be({left:Z/X*100,top:pe/h*100,width:W.width,height:W.height})},ue=(f,C,W,X)=>{const h=x.w,d=x.h;let g=X.left/100*h,j=X.top/100*d,R=X.width/100*h,Z=X.height/100*d;const pe=g+R,Se=j+Z;let je=g,Ie=j,$e=pe,Re=Se;f.includes("l")&&(je=Fe(g+C,0,pe-Dt)),f.includes("r")&&($e=Fe(pe+C,g+Dt,h)),f.includes("t")&&(Ie=Fe(j+W,0,Se-Dt)),f.includes("b")&&(Re=Fe(Se+W,j+Dt,d));let Oe=$e-je,qe=Re-Ie;if(ce!=null){if(f.length===2){const Ae=Oe,st=Oe/ce;st<=qe||f==="tl"||f==="tr"||f==="bl"||f==="br"?qe=Ae/ce:Oe=st*ce,f.includes("t")&&(Ie=Re-qe),f.includes("b")&&(Re=Ie+qe),f.includes("l")&&(je=$e-Oe),f.includes("r")&&($e=je+Oe)}else if(f==="l"||f==="r"){qe=Oe/ce;const Ae=(j+Se)/2;Ie=Ae-qe/2,Re=Ae+qe/2}else if(f==="t"||f==="b"){Oe=qe*ce;const Ae=(g+pe)/2;je=Ae-Oe/2,$e=Ae+Oe/2}if(je<0&&($e+=-je,je=0),Ie<0&&(Re+=-Ie,Ie=0),$e>h){const Ae=$e-h;$e=h,je-=Ae}if(Re>d){const Ae=Re-d;Re=d,Ie-=Ae}if(Oe=$e-je,qe=Re-Ie,Math.abs(Oe/qe-ce)>.001)if(Oe/qe>ce){const Ae=qe*ce,st=(je+$e)/2;je=st-Ae/2,$e=st+Ae/2}else{const Ae=Oe/ce,st=(Ie+Re)/2;Ie=st-Ae/2,Re=st+Ae/2}}be({left:je/h*100,top:Ie/d*100,width:($e-je)/h*100,height:(Re-Ie)/d*100})},Pe=f=>{var C,W;G||!N||(f.stopPropagation(),(W=(C=f.target).setPointerCapture)==null||W.call(C,f.pointerId),m.current.set(f.pointerId,{x:f.clientX,y:f.clientY}),we.current={type:"move",startX:f.clientX,startY:f.clientY,startCrop:{...Te}})},ze=f=>C=>{var W,X;G||!N||(C.stopPropagation(),(X=(W=C.target).setPointerCapture)==null||X.call(W,C.pointerId),m.current.set(C.pointerId,{x:C.clientX,y:C.clientY}),we.current={type:"resize",corner:f,startX:C.clientX,startY:C.clientY,startCrop:{...Te}})},He=r.useCallback(f=>{const C=xe();if(!C||!O.current)return null;let W=Math.max(1,Math.round(C.width)),X=Math.max(1,Math.round(C.height));const{maxWidth:h,maxHeight:d}=f??{};if(h&&W>h){const Z=h/W;W=h,X=Math.round(X*Z)}if(d&&X>d){const Z=d/X;X=d,W=Math.round(W*Z)}const g=document.createElement("canvas");g.width=W,g.height=X;const j=g.getContext("2d");if(!j)return null;j.imageSmoothingQuality="high";const R=O.current;if(j.save(),C.rotation===0)j.drawImage(R,C.x,C.y,C.width,C.height,0,0,W,X);else{j.translate(W/2,X/2),j.rotate(C.rotation*Math.PI/180);const Z=C.rotation===90||C.rotation===270,pe=Z?X:W,Se=Z?W:X,je=Z?C.height:C.width,Ie=Z?C.width:C.height;j.drawImage(R,C.x,C.y,je,Ie,-pe/2,-Se/2,pe,Se)}return j.restore(),o&&(j.globalCompositeOperation="destination-in",j.beginPath(),j.arc(W/2,X/2,Math.min(W,X)/2,0,Math.PI*2),j.closePath(),j.fill()),g},[xe,o]);r.useImperativeHandle(L,()=>({getCrop:()=>xe(),getCroppedCanvas:f=>He(f),getCroppedBlob:f=>new Promise((C,W)=>{const X=He(f);if(!X)return W(new Error("Cropper not ready"));X.toBlob(h=>h?C(h):W(new Error("Canvas export failed")),(f==null?void 0:f.type)??"image/png",(f==null?void 0:f.quality)??.92)}),getCroppedDataURL:async f=>{const C=He(f);if(!C)throw new Error("Cropper not ready");return C.toDataURL((f==null?void 0:f.type)??"image/png",(f==null?void 0:f.quality)??.92)},reset:()=>{de(v),oe(_t(y)),Ee({x:0,y:0}),be({left:(_==null?void 0:_.x)??10,top:(_==null?void 0:_.y)??10,width:(_==null?void 0:_.width)??80,height:(_==null?void 0:_.height)??80})},rotate:f=>{oe(f===void 0?C=>_t(C+90):_t(f))},setZoom:f=>de(Fe(f,c,p))}),[xe,He,v,y,_,c,p]);const Le={height:typeof b=="number"?`${b}px`:b},Qe=B?{width:ve.w,height:ve.h,transform:`translate(${ae.x}px, ${ae.y}px) rotate(${te}deg)`}:{display:"none"},Ze={left:le.left,top:le.top,width:le.width,height:le.height},nt=o?{"--mask-cx":`${le.left+le.width/2}px`,"--mask-cy":`${le.top+le.height/2}px`,"--mask-r":`${Math.min(le.width,le.height)/2}px`}:{},Ye=[P.stage,M==="checker"?P.bgChecker:"",G?P.disabled:""].filter(Boolean).join(" "),lt=[P.root,H?P.fullWidth:"",w??""].filter(Boolean).join(" "),dt=l??V_,kt=i&&!o&&dt.length>0;return e.jsxs("div",{className:lt,children:[k&&e.jsx("div",{className:P.label,children:k}),kt&&e.jsx("div",{className:P.ratioRow,role:"radiogroup","aria-label":"Aspect ratio",children:dt.map(f=>e.jsx("button",{type:"button",role:"radio","aria-checked":ce===f.value,className:`${P.ratioChip} ${ce===f.value?P.active:""}`,disabled:G,onClick:()=>Be(f.value),children:f.label},f.label))}),e.jsxs("div",{ref:ee,className:Ye,style:Le,role:"application","aria-label":S??"Image cropper","aria-disabled":G,onPointerDown:u,onPointerMove:E,onPointerUp:T,onPointerCancel:T,onWheel:U,children:[!N&&!Y&&e.jsxs("div",{className:P.placeholder,children:[e.jsx("div",{className:P.spinner,"aria-hidden":!0}),e.jsx("div",{children:"Loading image…"})]}),Y&&e.jsx("div",{className:P.placeholder,children:e.jsx("div",{children:"Couldn't load image."})}),e.jsx("div",{className:P.imageWrap,children:e.jsx("img",{ref:O,src:t,alt:"",draggable:!1,className:P.image,style:Qe})}),N&&e.jsxs(e.Fragment,{children:[o&&e.jsx("div",{className:P.circleMask,style:nt}),e.jsxs("div",{className:`${P.overlay} ${o?P.overlayCircle:""}`,style:Ze,onPointerDown:Pe,onPointerMove:E,onPointerUp:T,onPointerCancel:T,children:[a&&!o&&e.jsxs("div",{className:P.grid,"aria-hidden":!0,children:[e.jsx("div",{className:`${P.gridLine} ${P.h}`,style:{top:"33.33%"}}),e.jsx("div",{className:`${P.gridLine} ${P.h}`,style:{top:"66.66%"}}),e.jsx("div",{className:`${P.gridLine} ${P.v}`,style:{left:"33.33%"}}),e.jsx("div",{className:`${P.gridLine} ${P.v}`,style:{left:"66.66%"}})]}),e.jsx("div",{className:`${P.handle} ${P.handleTL}`,onPointerDown:ze("tl")}),e.jsx("div",{className:`${P.handle} ${P.handleTR}`,onPointerDown:ze("tr")}),e.jsx("div",{className:`${P.handle} ${P.handleBL}`,onPointerDown:ze("bl")}),e.jsx("div",{className:`${P.handle} ${P.handleBR}`,onPointerDown:ze("br")}),e.jsx("div",{className:`${P.handle} ${P.handleT}`,onPointerDown:ze("t")}),e.jsx("div",{className:`${P.handle} ${P.handleB}`,onPointerDown:ze("b")}),e.jsx("div",{className:`${P.handle} ${P.handleL}`,onPointerDown:ze("l")}),e.jsx("div",{className:`${P.handle} ${P.handleR}`,onPointerDown:ze("r")})]})]})]}),i&&e.jsxs("div",{className:P.controls,"aria-label":"Cropper controls",children:[e.jsxs("div",{className:P.controlGroup,children:[e.jsx("span",{className:P.controlLabel,children:"Zoom"}),e.jsx("button",{type:"button",className:P.iconBtn,"aria-label":"Zoom out",disabled:G||J<=c,onClick:()=>de(f=>Fe(f-.1,c,p)),children:e.jsx(K_,{})}),e.jsx("input",{type:"range",className:P.zoomSlider,min:c,max:p,step:.01,value:J,disabled:G,onChange:f=>de(parseFloat(f.target.value)),"aria-label":"Zoom level"}),e.jsx("button",{type:"button",className:P.iconBtn,"aria-label":"Zoom in",disabled:G||J>=p,onClick:()=>de(f=>Fe(f+.1,c,p)),children:e.jsx(G_,{})})]}),e.jsx("div",{className:P.divider,"aria-hidden":!0}),e.jsxs("div",{className:P.controlGroup,children:[e.jsx("span",{className:P.controlLabel,children:"Rotate"}),e.jsx("button",{type:"button",className:P.iconBtn,"aria-label":"Rotate left",disabled:G,onClick:()=>oe(f=>_t(f-90)),children:e.jsx(Q_,{})}),e.jsx("button",{type:"button",className:P.iconBtn,"aria-label":"Rotate right",disabled:G,onClick:()=>oe(f=>_t(f+90)),children:e.jsx(Y_,{})})]}),e.jsx("div",{className:P.divider,"aria-hidden":!0}),e.jsx("div",{className:P.controlGroup,children:e.jsx("button",{type:"button",className:P.iconBtn,"aria-label":"Reset",disabled:G,onClick:()=>{de(v),oe(_t(y)),Ee({x:0,y:0}),be({left:(_==null?void 0:_.x)??10,top:(_==null?void 0:_.y)??10,width:(_==null?void 0:_.width)??80,height:(_==null?void 0:_.height)??80})},children:e.jsx(X_,{})})})]}),D&&e.jsx("div",{className:P.helper,children:D})]})}),It={width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},G_=()=>e.jsxs("svg",{...It,children:[e.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),e.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),K_=()=>e.jsx("svg",{...It,children:e.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})}),Q_=()=>e.jsxs("svg",{...It,children:[e.jsx("polyline",{points:"1 4 1 10 7 10"}),e.jsx("path",{d:"M3.51 15a9 9 0 1 0 2.13-9.36L1 10"})]}),Y_=()=>e.jsxs("svg",{...It,children:[e.jsx("polyline",{points:"23 4 23 10 17 10"}),e.jsx("path",{d:"M20.49 15a9 9 0 1 1-2.13-9.36L23 10"})]}),X_=()=>e.jsxs("svg",{...It,children:[e.jsx("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),e.jsx("polyline",{points:"3 3 3 8 8 8"})]});exports.EvoAlert=pp;exports.EvoAutoComplete=Gn;exports.EvoBadge=ns;exports.EvoBreadcrumb=Cn;exports.EvoButton=Ss;exports.EvoCard=ct;exports.EvoCardBody=Gt;exports.EvoCardDescription=Yt;exports.EvoCardFooter=Kt;exports.EvoCardHeader=Ut;exports.EvoCardMedia=Xt;exports.EvoCardRoot=Bt;exports.EvoCardTitle=Qt;exports.EvoCheckbox=Kn;exports.EvoCommandPalette=ua;exports.EvoContainer=_o;exports.EvoDivider=ro;exports.EvoForm=jt;exports.EvoGrid=Tn;exports.EvoImageCropper=U_;exports.EvoInput=Na;exports.EvoModal=Rt;exports.EvoNav=cr;exports.EvoNavGroup=en;exports.EvoNavItem=Jt;exports.EvoNavQuickAction=tn;exports.EvoNavSkeleton=Bn;exports.EvoNavSubItem=Zt;exports.EvoNotification=Uh;exports.EvoNotificationBell=an;exports.EvoNotificationItem=zt;exports.EvoNotificationPanel=At;exports.EvoNotificationProvider=on;exports.EvoNotificationToaster=rn;exports.EvoPagination=qr;exports.EvoRadio=Yn;exports.EvoRichTextArea=Za;exports.EvoSelect=Xi;exports.EvoSkeleton=cn;exports.EvoStack=Xs;exports.EvoTable=c_;exports.EvoTabs=St;exports.EvoThemeProvider=ss;exports.EvoThemeToggle=ps;exports.EvoToggle=Id;exports.EvoTooltip=tp;exports.EvoTopNav=tt;exports.EvoTreeSelect=rl;exports.evoLocalRecents=Ql;exports.evoNotify=zh;exports.getEvoThemeScript=os;exports.useEvoInbox=Vh;exports.useEvoTheme=En;exports.useFormContext=lu;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),Nn=require("react-dom"),En=r.createContext(null),Tn="evo-ui-theme";function un(){return typeof window>"u"||!window.matchMedia?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function hn(n){if(!n||typeof window>"u")return null;try{const t=window.localStorage.getItem(n);if(t==="light"||t==="dark"||t==="system")return t}catch{}return null}const rs=({children:n,defaultTheme:t="system",storageKey:s=Tn,attribute:o="data-theme",enableTransitions:a=!0,target:i})=>{const[l,c]=r.useState(()=>hn(s)??t),[p,v]=r.useState(()=>{const C=hn(s)??t;return C==="system"?un():C}),b=r.useRef(!0),_=r.useCallback(C=>{if(typeof document>"u")return;const E=i??document.documentElement;a&&!b.current&&(E.setAttribute("data-theme-transition","true"),window.clearTimeout(E.__evoThemeTimer),E.__evoThemeTimer=window.setTimeout(()=>{E.removeAttribute("data-theme-transition")},250)),o==="class"&&(E.classList.remove("light","dark"),E.classList.add(C)),E.setAttribute("data-theme",C),b.current=!1},[o,a,i]);r.useEffect(()=>{_(p)},[p,_]),r.useEffect(()=>{v(l==="system"?un():l)},[l]),r.useEffect(()=>{if(l!=="system"||typeof window>"u"||!window.matchMedia)return;const C=window.matchMedia("(prefers-color-scheme: dark)"),E=D=>{v(D.matches?"dark":"light")};return C.addEventListener("change",E),()=>C.removeEventListener("change",E)},[l]);const x=r.useCallback(C=>{if(c(C),s&&typeof window<"u")try{window.localStorage.setItem(s,C)}catch{}},[s]),N=r.useCallback(()=>{x(p==="dark"?"light":"dark")},[p,x]),w=r.useMemo(()=>({theme:l,resolvedTheme:p,setTheme:x,toggleTheme:N}),[l,p,x,N]);return e.jsx(En.Provider,{value:w,children:n})},In=()=>{const n=r.useContext(En);if(n)return n;const t=typeof document<"u"&&document.documentElement.getAttribute("data-theme")==="dark"?"dark":"light";return{theme:t,resolvedTheme:t,setTheme:()=>{typeof document<"u"&&console.warn("[evo-ui] useEvoTheme called without <EvoThemeProvider>. Wrap your app in <EvoThemeProvider> to enable setTheme().")},toggleTheme:()=>{}}},as=(n=Tn)=>`(function(){try{var s=localStorage.getItem('${n}');var t=s||'system';var r=t==='system'?(matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light'):t;document.documentElement.setAttribute('data-theme',r);}catch(e){}})();`,is="_toggle_1aoav_1",cs="_track_1aoav_19",ls="_thumb_1aoav_29",ds="_sun_1aoav_49",us="_moon_1aoav_54",hs="_sm_1aoav_68",ps="_md_1aoav_81",_s="_lg_1aoav_94",gt={toggle:is,track:cs,thumb:ls,sun:ds,moon:us,sm:hs,md:ps,lg:_s},fs=({size:n="md",ariaLabel:t="Toggle color theme",className:s})=>{const{resolvedTheme:o,toggleTheme:a}=In(),i=o==="dark",l=[gt.toggle,gt[n],s].filter(Boolean).join(" ");return e.jsx("button",{type:"button",role:"switch","aria-checked":i,"aria-label":t,onClick:a,className:l,"data-theme-state":o,children:e.jsx("span",{className:gt.track,children:e.jsxs("span",{className:gt.thumb,children:[e.jsxs("svg",{className:gt.sun,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"4"}),e.jsx("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"})]}),e.jsx("svg",{className:gt.moon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})})]})})})},ms="_button_5wbw9_1",vs="_label_5wbw9_38",xs="_icon_5wbw9_44",gs="_spinner_5wbw9_56",bs="_sm_5wbw9_72",ys="_md_5wbw9_80",ws="_lg_5wbw9_82",js="_rounded_5wbw9_90",ks="_square_5wbw9_94",Ns="_iconOnly_5wbw9_106",Es="_fullWidth_5wbw9_119",Ts="_solid_5wbw9_124",Is="_outline_5wbw9_126",$s="_ghost_5wbw9_130",Cs="_soft_5wbw9_135",Ss="_primary_5wbw9_139",Ls="_secondary_5wbw9_197",Ms="_danger_5wbw9_257",Ds="_warning_5wbw9_315",Bs="_success_5wbw9_371",Rs="_info_5wbw9_429",Ke={button:ms,label:vs,icon:xs,spinner:gs,"evo-btn-spin":"_evo-btn-spin_5wbw9_1",sm:bs,md:ys,lg:ws,rounded:js,square:ks,iconOnly:Ns,fullWidth:Es,solid:Ts,outline:Is,ghost:$s,soft:Cs,primary:Ss,secondary:Ls,danger:Ms,warning:Ds,success:Bs,info:Rs},As=r.forwardRef(function({label:t,children:s,variant:o="solid",severity:a="primary",size:i="md",shape:l="default",iconLeft:c,iconRight:p,loading:v=!1,loadingText:b,fullWidth:_=!1,disabled:x,type:N="button",className:w,...C},E){const V=v?b:s??t,H=x||v,ue=[Ke.button,Ke[o],Ke[a],Ke[i],l!=="default"?Ke[l]:"",_?Ke.fullWidth:"",V?"":Ke.iconOnly,w].filter(Boolean).join(" ");return e.jsxs("button",{ref:E,type:N,className:ue,disabled:H,"aria-busy":v||void 0,...C,children:[v?e.jsx("span",{className:Ke.spinner,"aria-hidden":"true"}):c&&e.jsx("span",{className:Ke.icon,children:c}),V!=null&&V!==""&&e.jsx("span",{className:Ke.label,children:V}),!v&&p&&e.jsx("span",{className:Ke.icon,children:p})]})}),zs="_root_kkcxo_1",Ps="_elevated_kkcxo_15",Os="_outlined_kkcxo_20",Ws="_ghost_kkcxo_26",Hs="_media_kkcxo_40",qs="_interactive_kkcxo_72",Fs="_mediaImg_kkcxo_112",Gs="_header_kkcxo_119",Vs="_body_kkcxo_126",Ks="_footer_kkcxo_132",Us="_title_kkcxo_141",Ys="_description_kkcxo_149",Ue={root:zs,elevated:Ps,outlined:Os,ghost:Ws,"orient-vertical":"_orient-vertical_kkcxo_32","orient-horizontal":"_orient-horizontal_kkcxo_36",media:Hs,"orient-responsive":"_orient-responsive_kkcxo_51",interactive:qs,mediaImg:Fs,header:Gs,body:Vs,footer:Ks,title:Us,description:Ys};function xt(...n){return n.filter(Boolean).join(" ")}function Qs(n,t,s,o){return xt(Ue.root,Ue[n],Ue[`orient-${t}`],s&&Ue.interactive,o)}const Dt=r.forwardRef(function(t,s){const{variant:o="elevated",orientation:a="vertical",interactive:i,className:l,children:c,...p}=t,v=i===!0,b=Qs(o,a,v,l);if(v&&typeof p.href=="string"){const _=p;return e.jsx("a",{ref:s,className:b,..._,children:c})}if(v){const{type:_="button",...x}=p;return e.jsx("button",{ref:s,type:_,className:b,...x,children:c})}return e.jsx("div",{ref:s,className:b,...p,children:c})});Dt.displayName="EvoCardRoot";const Vt=r.forwardRef(function({className:t,...s},o){return e.jsx("div",{ref:o,className:xt(Ue.header,t),...s})});Vt.displayName="EvoCardHeader";const Kt=r.forwardRef(function({className:t,...s},o){return e.jsx("div",{ref:o,className:xt(Ue.body,t),...s})});Kt.displayName="EvoCardBody";const Ut=r.forwardRef(function({className:t,...s},o){return e.jsx("div",{ref:o,className:xt(Ue.footer,t),...s})});Ut.displayName="EvoCardFooter";const Yt=r.forwardRef(function({as:t="h3",className:s,children:o,...a},i){return r.createElement(t,{ref:i,className:xt(Ue.title,s),...a},o)});Yt.displayName="EvoCardTitle";const Qt=r.forwardRef(function({className:t,...s},o){return e.jsx("p",{ref:o,className:xt(Ue.description,t),...s})});Qt.displayName="EvoCardDescription";const Xt=r.forwardRef(function({src:t,alt:s,aspectRatio:o,className:a,style:i,children:l,...c},p){const v=o!=null?{aspectRatio:o,...i}:i;return e.jsx("div",{ref:p,className:xt(Ue.media,a),style:v,...c,children:t?e.jsx("img",{src:t,alt:s??"",className:Ue.mediaImg}):l})});Xt.displayName="EvoCardMedia";const ct=Dt;ct.Root=Dt;ct.Header=Vt;ct.Title=Yt;ct.Description=Qt;ct.Body=Kt;ct.Footer=Ut;ct.Media=Xt;const Xs={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch",baseline:"baseline"},Js={start:"flex-start",center:"center",end:"flex-end",between:"space-between",around:"space-around",evenly:"space-evenly"},Zs=({children:n,direction:t="column",gap:s="1rem",align:o="stretch",justify:a="start",wrap:i=!1,className:l="",style:c})=>e.jsx("div",{className:l,style:{display:"flex",flexDirection:t,gap:typeof s=="number"?`${s}px`:s,alignItems:Xs[o],justifyContent:Js[a],flexWrap:i?"wrap":"nowrap",...c},children:n}),Pt=n=>n===void 0?void 0:typeof n=="number"?`${n}px`:n,eo=({children:n,colSpan:t,rowSpan:s,className:o="",style:a})=>e.jsx("div",{className:o,style:{gridColumn:t?`span ${t}`:void 0,gridRow:s?`span ${s}`:void 0,...a},children:n}),$n=({children:n,cols:t=3,rows:s,gap:o="1rem",colGap:a,rowGap:i,className:l="",style:c})=>e.jsx("div",{className:l,style:{display:"grid",gridTemplateColumns:typeof t=="number"?`repeat(${t}, 1fr)`:t,gridTemplateRows:s?typeof s=="number"?`repeat(${s}, auto)`:s:void 0,gap:Pt(o),columnGap:Pt(a),rowGap:Pt(i),...c},children:n});$n.Item=eo;const to="_divider_rorxd_1",no="_horizontal_rorxd_6",so="_vertical_rorxd_13",oo="_labeled_rorxd_20",ro="_line_rorxd_27",ao="_labelText_rorxd_33",ut={divider:to,horizontal:no,vertical:so,labeled:oo,line:ro,labelText:ao},io=({orientation:n="horizontal",label:t,className:s=""})=>t?e.jsxs("div",{className:`${ut.labeled} ${s}`,children:[e.jsx("div",{className:ut.line}),e.jsx("span",{className:ut.labelText,children:t}),e.jsx("div",{className:ut.line})]}):e.jsx("div",{className:[ut.divider,n==="vertical"?ut.vertical:ut.horizontal,s].filter(Boolean).join(" ")}),co="_container_131l9_1",lo="_centered_131l9_7",uo="_sm_131l9_12",ho="_md_131l9_16",po="_lg_131l9_20",_o="_xl_131l9_24",fo="_full_131l9_28",Ot={container:co,centered:lo,sm:uo,md:ho,lg:po,xl:_o,full:fo},mo=({children:n,size:t="lg",centered:s=!0,className:o=""})=>e.jsx("div",{className:[Ot.container,Ot[t],s?Ot.centered:"",o].filter(Boolean).join(" "),children:n}),vo="_tabs_9memw_1",xo="_tabList_9memw_6",go="_tab_9memw_1",bo="_disabled_9memw_36",yo="_active_9memw_36",wo="_tabPanel_9memw_52",wt={tabs:vo,tabList:xo,tab:go,disabled:bo,active:yo,tabPanel:wo},Cn=r.createContext(null),Sn=()=>{const n=r.useContext(Cn);if(!n)throw new Error("Tab components must be used within EvoTabs");return n},jo=({children:n,className:t=""})=>e.jsx("div",{className:`${wt.tabList} ${t}`,role:"tablist",children:n}),ko=({id:n,children:t,disabled:s=!1,className:o=""})=>{const{active:a,setActive:i}=Sn();return e.jsx("button",{role:"tab","aria-selected":a===n,disabled:s,className:[wt.tab,a===n?wt.active:"",s?wt.disabled:"",o].filter(Boolean).join(" "),onClick:()=>i(n),children:t})},No=({id:n,children:t,className:s=""})=>{const{active:o}=Sn();return o!==n?null:e.jsx("div",{role:"tabpanel",className:`${wt.tabPanel} ${s}`,children:t})},Bt=({children:n,defaultTab:t="",className:s=""})=>{const[o,a]=r.useState(t);return e.jsx(Cn.Provider,{value:{active:o,setActive:a},children:e.jsx("div",{className:`${wt.tabs} ${s}`,children:n})})};Bt.List=jo;Bt.Tab=ko;Bt.Panel=No;const Eo="_breadcrumb_7jmv3_1",To="_item_7jmv3_12",Io="_separator_7jmv3_18",$o="_link_7jmv3_28",Co="_text_7jmv3_44",So="_current_7jmv3_49",yt={breadcrumb:Eo,item:To,separator:Io,link:$o,text:Co,current:So},Lo=({children:n,href:t,current:s=!1})=>e.jsx("li",{className:yt.item,children:t&&!s?e.jsx("a",{href:t,className:yt.link,children:n}):e.jsx("span",{className:[yt.text,s?yt.current:""].filter(Boolean).join(" "),"aria-current":s?"page":void 0,children:n})}),Ln=({children:n,separator:t="/",className:s=""})=>{const o=r.Children.toArray(n);return e.jsx("nav",{"aria-label":"breadcrumb",className:s,children:e.jsx("ol",{className:yt.breadcrumb,children:o.map((a,i)=>e.jsxs(r.Fragment,{children:[a,i<o.length-1&&e.jsx("li",{className:yt.separator,"aria-hidden":"true",children:t})]},i))})})};Ln.Item=Lo;const Mo="_navContainer_ng5y4_1",Do="_navList_ng5y4_7",Bo="_navLi_ng5y4_7",Ro="_navRow_ng5y4_20",Ao="_navIcon_ng5y4_47",zo="_active_ng5y4_55",Po="_disabled_ng5y4_63",Oo="_navRowTop_ng5y4_69",Wo="_navRowSub_ng5y4_73",Ho="_navLabel_ng5y4_81",qo="_chevron_ng5y4_157",Fo="_chevronOpen_ng5y4_162",Go="_navSubList_ng5y4_166",Vo="_navGroup_ng5y4_178",Ko="_navGroupLabel_ng5y4_187",Uo="_navGroupLabelText_ng5y4_199",Yo="_navGroupToggle_ng5y4_208",Qo="_navGroupCount_ng5y4_228",Xo="_navGroupPanel_ng5y4_244",Jo="_navSkeletonItem_ng5y4_260",Zo="_navSkeletonIcon_ng5y4_267",er="_navSkeletonText_ng5y4_276",tr="_navQuickAction_ng5y4_292",nr="_navTrigger_ng5y4_321",sr="_navBackdrop_ng5y4_344",or="_navDesktop_ng5y4_352",rr="_navMobile_ng5y4_356",ar="_navDrawerOpen_ng5y4_377",ir="_navCollapsed_ng5y4_389",pe={navContainer:Mo,navList:Do,navLi:Bo,navRow:Ro,navIcon:Ao,active:zo,disabled:Po,navRowTop:Oo,navRowSub:Wo,navLabel:Ho,chevron:qo,chevronOpen:Fo,navSubList:Go,navGroup:Vo,navGroupLabel:Ko,navGroupLabelText:Uo,navGroupToggle:Yo,navGroupCount:Qo,navGroupPanel:Xo,navSkeletonItem:Jo,navSkeletonIcon:Zo,navSkeletonText:er,navQuickAction:tr,navTrigger:nr,navBackdrop:sr,navDesktop:or,navMobile:rr,navDrawerOpen:ar,navCollapsed:ir},Jt=r.createContext(null),pn=r.createContext({depth:0});function cr(n){const[t,s]=r.useState(!1);return r.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const o=window.matchMedia(`(max-width: ${n-1}px)`),a=()=>s(o.matches);return a(),o.addEventListener("change",a),()=>o.removeEventListener("change",a)},[n]),t}function Zt(n,t,s){const[o,a]=r.useState(t),i=n!==void 0,l=i?n:o,c=r.useCallback(p=>{i||a(p),s==null||s(p)},[i,s]);return[l,c]}const qt="data-evo-nav-row";function lr(n){return n?Array.from(n.querySelectorAll(`[${qt}]:not([data-disabled="true"])`)).filter(t=>t.offsetParent!==null&&t.closest("[inert]")===null):[]}function $t(n,t,s){var l;const o=lr(n);if(o.length===0)return;const a=o.indexOf(t);let i;s==="first"?i=0:s==="last"?i=o.length-1:i=Math.max(0,Math.min(o.length-1,a+s)),(l=o[i])==null||l.focus()}const Mn=({open:n})=>e.jsx("svg",{viewBox:"0 0 16 16",fill:"none",width:"12",height:"12","aria-hidden":"true",className:[pe.chevron,n?pe.chevronOpen:""].filter(Boolean).join(" "),children:e.jsx("path",{d:"M6 4l4 4-4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),dr=()=>e.jsx("svg",{viewBox:"0 0 16 16",fill:"none",width:"14",height:"14","aria-hidden":"true",children:e.jsx("path",{d:"M8 3v10M3 8h10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),ur=()=>e.jsx("svg",{viewBox:"0 0 20 20",fill:"none",width:"18",height:"18","aria-hidden":"true",children:e.jsx("path",{d:"M3 5h14M3 10h14M3 15h14",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}),hr=()=>e.jsx("svg",{viewBox:"0 0 20 20",fill:"none",width:"18",height:"18","aria-hidden":"true",children:e.jsx("path",{d:"M5 5l10 10M15 5L5 15",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})});function pr(n){const t=[],s=[],o=a=>{if(Array.isArray(a)){a.forEach(o);return}if(r.isValidElement(a)){const i=a.type;if(typeof i!="string"&&(i==null?void 0:i.displayName)==="EvoNavSubItem"){s.push(a);return}}t.push(a)};return o(n),{label:t,subs:s}}const Dn=r.forwardRef(function({children:t,icon:s,active:o=!1,href:a,onClick:i,tooltip:l,open:c,defaultOpen:p=!1,onOpenChange:v,disabled:b=!1,className:_,tier:x},N){const w=r.useContext(Jt),C=(w==null?void 0:w.collapsed)??!1,{depth:E}=r.useContext(pn),D=r.useRef(null),V=r.useId(),H=`${V}-sub`,{label:ue,subs:j}=r.useMemo(()=>pr(t),[t]),M=j.length>0,[B,S]=Zt(M?c:!1,M?p:!1,v),se=r.useCallback(()=>{M&&S(!B)},[M,B,S]),Q=r.useCallback(A=>{b||(M&&!a&&se(),i==null||i(A),w!=null&&w.isMobile&&a&&!M&&w.closeDrawer())},[b,M,a,i,w,se]),y=A=>{var ae,ee,J;if(b)return;const W=A.currentTarget,G=W.closest(`.${pe.navContainer}`);switch(A.key){case"ArrowDown":A.preventDefault(),$t(G,W,1);break;case"ArrowUp":A.preventDefault(),$t(G,W,-1);break;case"ArrowRight":if(M)if(A.preventDefault(),!B)S(!0);else{const Y=W.closest("li"),me=Y==null?void 0:Y.querySelector(`ul [${qt}]`);me==null||me.focus()}break;case"ArrowLeft":if(A.preventDefault(),M&&B)S(!1);else if(E>0){const Y=(ee=(ae=W.closest("li"))==null?void 0:ae.parentElement)==null?void 0:ee.closest("li");(J=Y==null?void 0:Y.querySelector(`[${qt}]`))==null||J.focus()}break;case"Home":A.preventDefault(),$t(G,W,"first");break;case"End":A.preventDefault(),$t(G,W,"last");break;case"Enter":case" ":{(A.key===" "||a===void 0)&&(A.preventDefault(),Q(A));break}}},te=[pe.navRow,x==="subitem"?pe.navRowSub:pe.navRowTop,o?pe.active:"",b?pe.disabled:"",_].filter(Boolean).join(" "),R=x==="subitem"&&E>0?{"--evo-nav-indent":`${E*.875}rem`}:void 0,he={"data-evo-nav-row":"",id:V,className:te,style:R,title:C&&l?l:void 0,"aria-current":o?"page":void 0,"aria-expanded":M?B:void 0,"aria-controls":M?H:void 0,"aria-disabled":b||void 0,"data-disabled":b?"true":void 0,"data-active":o?"true":void 0,tabIndex:b?-1:0,onKeyDown:y},$=e.jsxs(e.Fragment,{children:[s&&e.jsx("span",{className:pe.navIcon,children:s}),e.jsx("span",{className:pe.navLabel,children:ue}),M&&e.jsx(Mn,{open:B})]});let P;if(a&&!b){const A={href:a,onClick:Q};P=e.jsx("a",{ref:D,...he,...A,children:$})}else P=e.jsx("button",{ref:D,type:"button",disabled:b,onClick:Q,...he,children:$});return e.jsxs("li",{ref:N,className:pe.navLi,children:[P,M&&e.jsx(pn.Provider,{value:{depth:E+1},children:e.jsx("ul",{id:H,role:"group","aria-labelledby":V,hidden:!B,className:pe.navSubList,children:j})})]})}),en=r.forwardRef(function(t,s){return e.jsx(Dn,{ref:s,tier:"item",...t})});en.displayName="EvoNavItem";const tn=r.forwardRef(function(t,s){return e.jsx(Dn,{ref:s,tier:"subitem",...t})});tn.displayName="EvoNavSubItem";const nn=r.forwardRef(function({label:t,children:s,className:o,collapsible:a=!1,defaultOpen:i=!0,open:l,onOpenChange:c,count:p},v){var ue;const b=r.useId(),_=`${b}-panel`,x=((ue=r.useContext(Jt))==null?void 0:ue.collapsed)??!1,N=a&&!x,[w,C]=Zt(N?l:!0,N?i:!0,c),E=x?!0:w,D=r.useRef(null);r.useEffect(()=>{const j=D.current;j&&(E?j.removeAttribute("inert"):j.setAttribute("inert",""))},[E]);const V=p!=null?e.jsx("span",{className:pe.navGroupCount,"aria-hidden":"true",children:p}):null,H=e.jsx("ul",{role:"group","aria-labelledby":b,className:pe.navList,children:s});return e.jsxs("li",{ref:v,className:[pe.navGroup,o].filter(Boolean).join(" "),children:[N?e.jsxs("button",{type:"button",id:b,className:[pe.navGroupLabel,pe.navGroupToggle].join(" "),"aria-expanded":E,"aria-controls":_,onClick:()=>C(!w),children:[e.jsx("span",{className:pe.navGroupLabelText,children:t}),V,e.jsx(Mn,{open:E})]}):e.jsxs("div",{id:b,role:"heading","aria-level":3,className:pe.navGroupLabel,children:[e.jsx("span",{className:pe.navGroupLabelText,children:t}),V]}),N?e.jsx("div",{ref:D,id:_,className:pe.navGroupPanel,"data-open":E?"true":"false",children:H}):H]})});nn.displayName="EvoNavGroup";const Bn=({count:n=4})=>e.jsx(e.Fragment,{children:Array.from({length:n}).map((t,s)=>e.jsxs("li",{"aria-hidden":"true",className:pe.navSkeletonItem,children:[e.jsx("span",{className:pe.navSkeletonIcon}),e.jsx("span",{className:pe.navSkeletonText,style:{width:`${45+s%4*12}%`}})]},s))}),sn=r.forwardRef(function({label:t="Create New",icon:s,className:o,type:a="button",...i},l){return e.jsx("li",{className:pe.navLi,children:e.jsxs("button",{ref:l,type:a,className:[pe.navQuickAction,o].filter(Boolean).join(" "),...i,children:[e.jsx("span",{className:pe.navIcon,children:s??e.jsx(dr,{})}),e.jsx("span",{className:pe.navLabel,children:t})]})})});sn.displayName="EvoNavQuickAction";const Rn=r.forwardRef(function({children:t,breakpoint:s=768,drawerOpen:o,defaultDrawerOpen:a=!1,onDrawerOpenChange:i,hideTrigger:l=!1,collapsed:c=!1,className:p,"aria-label":v="Main navigation",...b},_){const x=cr(s),[N,w]=Zt(o,a,i),C=r.useCallback(()=>w(!1),[w]),E=r.useId(),D=r.useRef(null);r.useEffect(()=>{if(!x||!N)return;const j=M=>{M.key==="Escape"&&C()};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},[x,N,C]),r.useEffect(()=>{if(!x||!N)return;const j=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=j}},[x,N]),r.useEffect(()=>{!x&&N&&C()},[x,N,C]);const V=r.useMemo(()=>({isMobile:x,drawerOpen:N,setDrawerOpen:w,closeDrawer:C,rootId:E,collapsed:c}),[x,N,w,C,E,c]),H=[pe.navContainer,x?pe.navMobile:pe.navDesktop,x&&N?pe.navDrawerOpen:"",c?pe.navCollapsed:"",p].filter(Boolean).join(" "),ue=j=>{D.current=j,typeof _=="function"?_(j):_&&(_.current=j)};return e.jsxs(Jt.Provider,{value:V,children:[x&&!l&&e.jsx("button",{type:"button",className:pe.navTrigger,"aria-expanded":N,"aria-controls":E,"aria-label":N?"Close navigation":"Open navigation",onClick:()=>w(!N),children:N?e.jsx(hr,{}):e.jsx(ur,{})}),x&&N&&e.jsx("div",{className:pe.navBackdrop,"aria-hidden":"true",onClick:C}),e.jsx("nav",{ref:ue,id:E,role:"navigation","aria-label":v,"aria-hidden":x&&!N?!0:void 0,className:H,...b,children:e.jsx("ul",{className:pe.navList,children:t})})]})});Rn.displayName="EvoNav";const _r=Object.assign(Rn,{Group:nn,Item:en,SubItem:tn,Skeleton:Bn,QuickAction:sn}),fr="_topNav_hq4o3_45",mr="_topNavInner_hq4o3_53",vr="_topNavBrand_hq4o3_61",xr="_topNavMenu_hq4o3_70",gr="_topNavItemRow_hq4o3_81",br="_topNavMenuScroll_hq4o3_86",yr="_topNavItem_hq4o3_81",wr="_topNavItemActive_hq4o3_126",jr="_topNavItemLabel_hq4o3_135",kr="_topNavIcon_hq4o3_139",Nr="_topNavActions_hq4o3_149",Er="_topNavSearch_hq4o3_157",Tr="_topNavSearchIcon_hq4o3_182",Ir="_topNavSearchText_hq4o3_187",$r="_topNavSearchKbd_hq4o3_192",Cr="_topNavToggle_hq4o3_203",Sr="_toggleIcon_hq4o3_227",Lr="_topNavDropdown_hq4o3_231",Mr="_topNavDropdownContent_hq4o3_247",Dr="_topNavDropdownContentOpen_hq4o3_270",Br="_topNavDropdownItem_hq4o3_275",Rr="_topNavMenuDrawer_hq4o3_311",Ar="_topNavDropdownTrigger_hq4o3_329",zr="_topNavMenuDrawerClosed_hq4o3_336",Pr="_topNavDropdownInDrawer_hq4o3_342",Or="_topNavBackdrop_hq4o3_355",Wr="_topNavSticky_hq4o3_422",Hr="_topNavProgress_hq4o3_455",qr="_topNavReducedMotion_hq4o3_468",ie={topNav:fr,topNavInner:mr,topNavBrand:vr,topNavMenu:xr,topNavItemRow:gr,topNavMenuScroll:br,topNavItem:yr,topNavItemActive:wr,topNavItemLabel:jr,topNavIcon:kr,topNavActions:Nr,topNavSearch:Er,topNavSearchIcon:Tr,topNavSearchText:Ir,topNavSearchKbd:$r,topNavToggle:Cr,toggleIcon:Sr,topNavDropdown:Lr,topNavDropdownContent:Mr,topNavDropdownContentOpen:Dr,topNavDropdownItem:Br,topNavMenuDrawer:Rr,topNavDropdownTrigger:Ar,topNavMenuDrawerClosed:zr,topNavDropdownInDrawer:Pr,topNavBackdrop:Or,topNavSticky:Wr,topNavProgress:Hr,topNavReducedMotion:qr},Fe=(...n)=>n.filter(Boolean).join(" ");function Fr(n,t){return s=>{n==null||n(s),s.defaultPrevented||t==null||t(s)}}function An(n){const{value:t,defaultValue:s,onChange:o}=n,[a,i]=r.useState(s),l=t!==void 0,c=l?t:a,p=r.useCallback(v=>{l||i(v),o==null||o(v)},[l,o]);return[c,p]}const Gr=typeof window<"u"?r.useLayoutEffect:r.useEffect;function on(n,t=!1){const[s,o]=r.useState(t);return Gr(()=>{var l;if(typeof window>"u"||!window.matchMedia)return;const a=window.matchMedia(n),i=()=>o(a.matches);return i(),(l=a.addEventListener)==null||l.call(a,"change",i),()=>{var c;return(c=a.removeEventListener)==null?void 0:c.call(a,"change",i)}},[n]),s}const Vr=n=>on(`(max-width: ${n-1}px)`),Kr=()=>on("(hover: hover) and (pointer: fine)",!0),Ur=()=>on("(prefers-reduced-motion: reduce)");function Yr(n,t,s){const[o,a]=r.useState(!1),[i,l]=r.useState(!1),[c,p]=r.useState(0),v=r.useRef(0);return r.useEffect(()=>{if(typeof window>"u"||!n){a(!1),l(!1),p(0),v.current=0;return}let b=0;const _=()=>{b=0;const N=document.documentElement,w=window.scrollY||N.scrollTop||0;if(a(w>8),l(t==="hide"?w>v.current&&w>64:!1),s){const C=N.scrollHeight-N.clientHeight||1;p(Math.min(1,Math.max(0,w/C)))}v.current=w},x=()=>{b||(b=requestAnimationFrame(_))};return _(),window.addEventListener("scroll",x,{passive:!0}),window.addEventListener("resize",x,{passive:!0}),()=>{b&&cancelAnimationFrame(b),window.removeEventListener("scroll",x),window.removeEventListener("resize",x)}},[n,t,s]),{scrolled:o,hidden:i,progress:c}}function Ft(n){return n?Array.from(n.querySelectorAll('a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"]), input:not([disabled]), select:not([disabled]), textarea:not([disabled])')).filter(t=>!t.hasAttribute("aria-hidden")&&t.offsetParent!==null):[]}const zn=r.forwardRef(function({children:t,...s},o){const a=r.Children.only(t),i=a.props??{},l={...s,...i};l.className=Fe(s.className,i.className),(s.style||i.style)&&(l.style={...s.style,...i.style});for(const c of Object.keys(s))if(c.startsWith("on")&&typeof s[c]=="function"){const p=s[c],v=i[c];l[c]=Fr(p,v)}return r.cloneElement(a,l)}),Tt=r.createContext(null);function Pn(n){const t=r.useContext(Tt);if(!t)throw new Error(`EvoTopNav.${n} must be rendered inside <EvoTopNav>.`);return t}const On=r.createContext(null),Qr=({open:n})=>e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",className:ie.toggleIcon,children:n?e.jsx(e.Fragment,{children:e.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}):e.jsx(e.Fragment,{children:e.jsx("path",{d:"M3 5h12M3 9h12M3 13h12",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})})}),Xr=({open:n})=>e.jsx("svg",{viewBox:"0 0 12 12",width:"10",height:"10",fill:"none","aria-hidden":"true",className:Fe(ie.dropdownChevron,n&&ie.dropdownChevronOpen),children:e.jsx("path",{d:"M3 4.5l3 3 3-3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Jr=()=>e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("circle",{cx:"11",cy:"11",r:"7"}),e.jsx("path",{d:"m20 20-3.2-3.2"})]}),Wn=r.forwardRef(function({children:t,className:s,...o},a){return e.jsx("div",{ref:a,className:Fe(ie.topNavBrand,s),...o,children:t})}),Hn=r.forwardRef(function({children:t,className:s,...o},a){const i=Pn("Menu"),l=r.useRef(null),c=_=>{l.current=_,i.menuRef.current=_,typeof a=="function"?a(_):a&&(a.current=_)},p=i.toggleCount>0,v=i.isCollapsed&&p,b=v&&!i.drawerOpen;return e.jsx("ul",{ref:c,id:i.menuId,className:Fe(ie.topNavMenu,v&&ie.topNavMenuDrawer,b&&ie.topNavMenuDrawerClosed,i.isCollapsed&&!p&&ie.topNavMenuScroll,s),"data-state":v?i.drawerOpen?"open":"closed":"inline","aria-hidden":b||void 0,...o,children:t})}),qn=r.forwardRef(function({children:t,active:s,icon:o,href:a,target:i,rel:l,onClick:c,asChild:p,className:v},b){const _=r.useContext(Tt),x=!!_&&_.isCollapsed&&_.drawerOpen,N=D=>{c==null||c(D),!D.defaultPrevented&&x&&_.setDrawerOpen(!1)},w={className:Fe(ie.topNavItem,s&&ie.topNavItemActive,v),"aria-current":s?"page":void 0,"data-active":s||void 0},C=e.jsxs(e.Fragment,{children:[o&&e.jsx("span",{className:ie.topNavIcon,"aria-hidden":"true",children:o}),e.jsx("span",{className:ie.topNavItemLabel,children:t})]});let E;return p?E=e.jsx(zn,{...w,onClick:N,ref:b,children:t}):a?E=e.jsx("a",{ref:b,href:a,target:i,rel:l??(i==="_blank"?"noopener noreferrer":void 0),onClick:N,...w,children:C}):E=e.jsx("button",{ref:b,type:"button",onClick:N,...w,children:C}),e.jsx("li",{className:ie.topNavItemRow,children:E})}),Fn=r.forwardRef(function({children:t,className:s,...o},a){return e.jsx("div",{ref:a,className:Fe(ie.topNavActions,s),...o,children:t})}),Gn=r.forwardRef(function({icon:t,className:s,onClick:o,"aria-label":a,...i},l){const c=Pn("Toggle"),p=r.useRef(null);r.useEffect(()=>c.registerToggle(),[c]);const v=_=>{p.current=_,c.toggleRef.current=_,typeof l=="function"?l(_):l&&(l.current=_)},b=_=>{o==null||o(_),_.defaultPrevented||c.setDrawerOpen(!c.drawerOpen)};return e.jsx("button",{ref:v,id:c.toggleId,type:"button",className:Fe(ie.topNavToggle,s),"aria-expanded":c.drawerOpen,"aria-controls":c.menuId,"aria-label":a??(c.drawerOpen?"Close menu":"Open menu"),onClick:b,...i,children:t??e.jsx(Qr,{open:c.drawerOpen})})}),Vn=r.forwardRef(function({placeholder:t="Search…",shortcut:s,shortcutHint:o,className:a,onClick:i,...l},c){const p=r.useRef(null),v=N=>{p.current=N,typeof c=="function"?c(N):c&&(c.current=N)},[b,_]=r.useState(null);r.useEffect(()=>{if(o!==void 0)return;const N=typeof navigator<"u"&&(navigator.platform||navigator.userAgent)||"";_(/Mac|iPhone|iPad|iPod/.test(N)?"⌘K":"Ctrl K")},[o]);const x=o!==void 0?o:b;return r.useEffect(()=>{if(!s)return;const N=s.toLowerCase().split("+").map(D=>D.trim()),w=N.some(D=>["mod","cmd","meta","ctrl","control"].includes(D)),C=N[N.length-1],E=D=>{var H;const V=D.metaKey||D.ctrlKey;(!w||V)&&D.key.toLowerCase()===C&&(D.preventDefault(),(H=p.current)==null||H.click())};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[s]),e.jsxs("button",{ref:v,className:Fe(ie.topNavSearch,a),onClick:i,...l,type:"button",children:[e.jsx("span",{className:ie.topNavSearchIcon,"aria-hidden":"true",children:e.jsx(Jr,{})}),e.jsx("span",{className:ie.topNavSearchText,children:t}),x!=null&&e.jsx("kbd",{className:ie.topNavSearchKbd,children:x})]})}),Kn=({label:n,icon:t,active:s,hoverable:o=!0,open:a,defaultOpen:i=!1,onOpenChange:l,children:c,className:p})=>{const v=r.useContext(Tt),b=!!v&&v.isCollapsed&&v.toggleCount>0,[_,x]=An({value:a,defaultValue:i,onChange:l}),N=Kr(),w=o&&N&&!b,C=r.useRef(null),E=r.useRef(null),D=r.useRef(null),V=r.useId(),H=r.useRef(null),ue=r.useCallback(()=>{var y;x(!1),(y=C.current)==null||y.focus()},[x]);r.useEffect(()=>{if(!_||b)return;const y=te=>{const R=D.current;R&&te.target instanceof Node&&!R.contains(te.target)&&x(!1)};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[_,b,x]),r.useEffect(()=>{if(!_||b)return;const y=te=>{te.key==="Escape"&&(te.stopPropagation(),ue())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[_,b,ue]);const j=r.useCallback(y=>{var P;const te=Ft(E.current);if(te.length===0)return;const R=document.activeElement,he=R?te.indexOf(R):-1;let $=0;y==="first"?$=0:y==="last"?$=te.length-1:y===1?$=he<0?0:(he+1)%te.length:$=he<0?te.length-1:(he-1+te.length)%te.length,(P=te[$])==null||P.focus()},[]),M=y=>{y.key==="ArrowDown"||y.key==="Enter"||y.key===" "?(y.preventDefault(),x(!0),requestAnimationFrame(()=>j("first"))):y.key==="ArrowUp"&&(y.preventDefault(),x(!0),requestAnimationFrame(()=>j("last")))},B=y=>{y.key==="ArrowDown"?(y.preventDefault(),j(1)):y.key==="ArrowUp"?(y.preventDefault(),j(-1)):y.key==="Home"?(y.preventDefault(),j("first")):y.key==="End"?(y.preventDefault(),j("last")):y.key==="Tab"&&x(!1)},S=()=>{w&&(H.current&&clearTimeout(H.current),x(!0))},se=()=>{w&&(H.current&&clearTimeout(H.current),H.current=setTimeout(()=>x(!1),120))},Q=r.useMemo(()=>({open:_,setOpen:x,triggerRef:C,contentRef:E,contentId:V,focusItem:j,inDrawer:b}),[_,x,V,j,b]);return e.jsx(On.Provider,{value:Q,children:e.jsxs("li",{ref:D,className:Fe(ie.topNavDropdown,b&&ie.topNavDropdownInDrawer,_&&ie.topNavDropdownOpen,p),onMouseEnter:S,onMouseLeave:se,children:[e.jsxs("button",{ref:C,type:"button",className:Fe(ie.topNavItem,ie.topNavDropdownTrigger,s&&ie.topNavItemActive),"aria-haspopup":"menu","aria-expanded":_,"aria-controls":V,"aria-current":s?"page":void 0,onClick:()=>x(!_),onKeyDown:M,children:[t&&e.jsx("span",{className:ie.topNavIcon,"aria-hidden":"true",children:t}),e.jsx("span",{className:ie.topNavItemLabel,children:n}),e.jsx(Xr,{open:_})]}),e.jsx("ul",{ref:E,id:V,role:"menu",className:Fe(ie.topNavDropdownContent,_&&ie.topNavDropdownContentOpen),"aria-hidden":!_||void 0,onKeyDown:B,children:c})]})})},Un=r.forwardRef(function({children:t,icon:s,active:o,href:a,target:i,rel:l,onClick:c,asChild:p,className:v},b){const _=r.useContext(On),x=r.useContext(Tt),N=D=>{c==null||c(D),D.defaultPrevented||(_==null||_.setOpen(!1),x&&x.isCollapsed&&x.drawerOpen&&x.setDrawerOpen(!1))},w={className:Fe(ie.topNavDropdownItem,o&&ie.topNavItemActive,v),role:"menuitem","aria-current":o?"page":void 0},C=e.jsxs(e.Fragment,{children:[s&&e.jsx("span",{className:ie.topNavIcon,"aria-hidden":"true",children:s}),e.jsx("span",{className:ie.topNavItemLabel,children:t})]});let E;return p?E=e.jsx(zn,{...w,onClick:N,ref:b,children:t}):a?E=e.jsx("a",{ref:b,href:a,target:i,rel:l??(i==="_blank"?"noopener noreferrer":void 0),onClick:N,...w,children:C}):E=e.jsx("button",{ref:b,type:"button",onClick:N,...w,children:C}),e.jsx("li",{children:E})}),Je=r.forwardRef(function({children:t,open:s,defaultOpen:o=!1,onOpenChange:a,collapseBelow:i=768,entrance:l="none",sticky:c=!1,scrollBehavior:p="none",showProgress:v=!1,className:b,style:_,...x},N){const[w,C]=An({value:s,defaultValue:o,onChange:a}),E=Vr(i),D=Ur(),V=p!=="none"||v,{scrolled:H,hidden:ue,progress:j}=Yr(V,p,v),M=l!=="none"&&!D,B=v?{..._,"--evo-topnav-progress":j}:_,[S,se]=r.useState(0),Q=r.useCallback(()=>(se(W=>W+1),()=>se(W=>Math.max(0,W-1))),[]),y=r.useId(),te=r.useId(),R=r.useRef(null),he=r.useRef(null),$=r.useRef(null),P=E&&w&&S>0;r.useEffect(()=>{!E&&w&&C(!1)},[E,w,C]),r.useEffect(()=>{if(!P)return;const W=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=W}},[P]),r.useEffect(()=>{if(!P)return;$.current=document.activeElement??null;const G=requestAnimationFrame(()=>{var J;(J=Ft(R.current)[0])==null||J.focus()}),ae=ee=>{if(ee.key==="Escape"){ee.preventDefault(),C(!1);return}if(ee.key!=="Tab"||!R.current)return;const J=Ft(R.current);if(J.length===0)return;const Y=J[0],me=J[J.length-1],ye=document.activeElement;ee.shiftKey&&ye===Y?(ee.preventDefault(),me.focus()):(!ee.shiftKey&&ye===me||ye&&!R.current.contains(ye))&&(ee.preventDefault(),Y.focus())};return document.addEventListener("keydown",ae),()=>{cancelAnimationFrame(G),document.removeEventListener("keydown",ae)}},[P,C]),r.useEffect(()=>{if(P)return;const W=$.current;if(W&&typeof W.focus=="function"){const G=document.activeElement;(!G||G===document.body||R.current&&R.current.contains(G))&&W.focus(),$.current=null}},[P]);const A=r.useMemo(()=>({drawerOpen:w,setDrawerOpen:C,isCollapsed:E,menuId:y,toggleId:te,registerToggle:Q,toggleCount:S,menuRef:R,toggleRef:he}),[w,C,E,y,te,Q,S]);return e.jsx(Tt.Provider,{value:A,children:e.jsxs("nav",{ref:N,className:Fe(ie.topNav,c&&ie.topNavSticky,P&&ie.topNavDrawerOpen,D&&ie.topNavReducedMotion,b),style:B,"data-collapsed":E||void 0,"data-drawer-open":P||void 0,"data-entrance":M?l:void 0,"data-scroll":p!=="none"?p:void 0,"data-scrolled":H||void 0,"data-hidden":ue||void 0,...x,children:[e.jsx("div",{className:ie.topNavInner,children:t}),v&&e.jsx("span",{className:ie.topNavProgress,"aria-hidden":"true"}),P&&e.jsx("div",{className:ie.topNavBackdrop,onClick:()=>C(!1),"aria-hidden":"true"})]})})});Wn.displayName="EvoTopNav.Brand";Hn.displayName="EvoTopNav.Menu";qn.displayName="EvoTopNav.Item";Fn.displayName="EvoTopNav.Actions";Gn.displayName="EvoTopNav.Toggle";Vn.displayName="EvoTopNav.Search";Kn.displayName="EvoTopNav.Dropdown";Un.displayName="EvoTopNav.DropdownItem";Je.displayName="EvoTopNav";Je.Brand=Wn;Je.Menu=Hn;Je.Item=qn;Je.Actions=Fn;Je.Toggle=Gn;Je.Search=Vn;Je.Dropdown=Kn;Je.DropdownItem=Un;const Zr="_pagination_1lhxw_1",ea="_pageBtn_1lhxw_8",ta="_activePage_1lhxw_34",na="_navBtn_1lhxw_45",sa="_ellipsis_1lhxw_49",ot={pagination:Zr,pageBtn:ea,activePage:ta,navBtn:na,ellipsis:sa},_n=(n,t)=>Array.from({length:t-n+1},(s,o)=>n+o),oa=({total:n,page:t,pageSize:s=10,siblingCount:o=1,onChange:a,className:i=""})=>{const l=Math.max(1,Math.ceil(n/s)),c=()=>{if(l<=7)return _n(1,l);const p=Math.max(2,t-o),v=Math.min(l-1,t+o),b=[1];return p>2&&b.push("..."),b.push(..._n(p,v)),v<l-1&&b.push("..."),l>1&&b.push(l),b};return e.jsxs("nav",{className:`${ot.pagination} ${i}`,"aria-label":"Pagination",children:[e.jsx("button",{className:`${ot.pageBtn} ${ot.navBtn}`,disabled:t<=1,onClick:()=>a(t-1),"aria-label":"Previous page",children:"‹"}),c().map((p,v)=>p==="..."?e.jsx("span",{className:ot.ellipsis,children:"…"},`ellipsis-${v}`):e.jsx("button",{className:[ot.pageBtn,p===t?ot.activePage:""].filter(Boolean).join(" "),onClick:()=>a(p),"aria-label":`Page ${p}`,"aria-current":p===t?"page":void 0,children:p},p)),e.jsx("button",{className:`${ot.pageBtn} ${ot.navBtn}`,disabled:t>=l,onClick:()=>a(t+1),"aria-label":"Next page",children:"›"})]})},ra="_overlay_1qpdy_1",aa="_palette_1qpdy_23",ia="_searchRow_1qpdy_46",ca="_searchIconWrap_1qpdy_54",la="_searchInput_1qpdy_61",da="_escBadge_1qpdy_75",ua="_results_1qpdy_86",ha="_empty_1qpdy_102",pa="_group_1qpdy_109",_a="_groupLabel_1qpdy_113",fa="_resultItem_1qpdy_122",ma="_resultActive_1qpdy_135",va="_resultIcon_1qpdy_139",xa="_resultLabel_1qpdy_149",ga="_resultDesc_1qpdy_157",ba="_resultShortcut_1qpdy_163",ya="_footer_1qpdy_178",wa="_footerRight_1qpdy_202",De={overlay:ra,palette:aa,searchRow:ia,searchIconWrap:ca,searchInput:la,escBadge:da,results:ua,empty:ha,group:pa,groupLabel:_a,resultItem:fa,resultActive:ma,resultIcon:va,resultLabel:xa,resultDesc:ga,resultShortcut:ba,footer:ya,footerRight:wa},ja=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.userAgent),ka=()=>e.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",width:"16",height:"16",children:[e.jsx("circle",{cx:"7",cy:"7",r:"4.5",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M10.5 10.5L13 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),Na=({items:n,placeholder:t="Search commands…",open:s,onClose:o})=>{const[a,i]=r.useState(!1),[l,c]=r.useState(""),[p,v]=r.useState(0),b=r.useRef(null),_=r.useRef(null),x=s!==void 0,N=x?s:a,w=r.useCallback(()=>{x||i(!1),o==null||o()},[x,o]);r.useEffect(()=>{const j=M=>{(M.ctrlKey||M.metaKey)&&M.key==="k"&&(M.preventDefault(),x||i(B=>!B)),M.key==="Escape"&&N&&w()};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},[x,N,w]),r.useEffect(()=>{if(N){c(""),v(0);const j=setTimeout(()=>{var M;return(M=b.current)==null?void 0:M.focus()},30);return()=>clearTimeout(j)}},[N]);const E=(l.trim()?n.filter(j=>{var M,B;return j.label.toLowerCase().includes(l.toLowerCase())||((M=j.description)==null?void 0:M.toLowerCase().includes(l.toLowerCase()))||((B=j.group)==null?void 0:B.toLowerCase().includes(l.toLowerCase()))}):n).reduce((j,M)=>{const B=M.group??"Actions";return j[B]||(j[B]=[]),j[B].push(M),j},{}),D=Object.values(E).flat(),V=j=>{var B;const M=(B=_.current)==null?void 0:B.querySelector(`[data-idx="${j}"]`);M==null||M.scrollIntoView({block:"nearest"})},H=j=>{j.key==="ArrowDown"?(j.preventDefault(),v(M=>{const B=Math.min(M+1,D.length-1);return V(B),B})):j.key==="ArrowUp"?(j.preventDefault(),v(M=>{const B=Math.max(M-1,0);return V(B),B})):j.key==="Enter"&&D[p]&&(D[p].onSelect(),w())};if(!N)return null;let ue=0;return e.jsx("div",{className:De.overlay,onClick:w,role:"dialog","aria-modal":"true",children:e.jsxs("div",{className:De.palette,onClick:j=>j.stopPropagation(),onKeyDown:H,children:[e.jsxs("div",{className:De.searchRow,children:[e.jsx("span",{className:De.searchIconWrap,children:e.jsx(ka,{})}),e.jsx("input",{ref:b,className:De.searchInput,placeholder:t,value:l,onChange:j=>{c(j.target.value),v(0)},"aria-label":"Command search"}),e.jsx("kbd",{className:De.escBadge,children:"Esc"})]}),e.jsxs("div",{className:De.results,ref:_,children:[D.length===0&&e.jsxs("div",{className:De.empty,children:["No results for “",l,"”"]}),Object.entries(E).map(([j,M])=>e.jsxs("div",{className:De.group,children:[e.jsx("div",{className:De.groupLabel,children:j}),M.map(B=>{const S=ue++;return e.jsxs("button",{"data-idx":S,className:[De.resultItem,S===p?De.resultActive:""].filter(Boolean).join(" "),onClick:()=>{B.onSelect(),w()},onMouseEnter:()=>v(S),children:[B.icon&&e.jsx("span",{className:De.resultIcon,children:B.icon}),e.jsx("span",{className:De.resultLabel,children:B.label}),B.description&&e.jsx("span",{className:De.resultDesc,children:B.description}),B.shortcut&&e.jsx("span",{className:De.resultShortcut,children:B.shortcut.map((se,Q)=>e.jsx("kbd",{children:se},Q))})]},B.label)})]},j))]}),e.jsxs("div",{className:De.footer,children:[e.jsxs("span",{children:[e.jsx("kbd",{children:"↑"}),e.jsx("kbd",{children:"↓"})," navigate"]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"↵"})," select"]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"Esc"})," close"]}),e.jsxs("span",{className:De.footerRight,children:[e.jsx("kbd",{children:ja?"⌘":"Ctrl"}),e.jsx("kbd",{children:"K"})," toggle"]})]})]})})},Ea="_field_l0kkf_1",Ta="_fullWidth_l0kkf_8",Ia="_label_l0kkf_12",$a="_inputWrapper_l0kkf_18",Ca="_hasError_l0kkf_30",Sa="_sm_l0kkf_38",La="_md_l0kkf_42",Ma="_lg_l0kkf_46",Da="_input_l0kkf_18",Ba="_adornment_l0kkf_69",Ra="_trailingAdornment_l0kkf_78",Aa="_errorText_l0kkf_83",za="_helperText_l0kkf_89",Ve={field:Ea,fullWidth:Ta,label:Ia,inputWrapper:$a,hasError:Ca,sm:Sa,md:La,lg:Ma,input:Da,adornment:Ba,trailingAdornment:Ra,errorText:Aa,helperText:za},Pa=({label:n,helperText:t,error:s,size:o="md",leadingAdornment:a,trailingAdornment:i,fullWidth:l=!1,className:c="",id:p,...v})=>{const b=p??(n==null?void 0:n.toLowerCase().replace(/\s+/g,"-"));return e.jsxs("div",{className:[Ve.field,l?Ve.fullWidth:"",c].filter(Boolean).join(" "),children:[n&&e.jsx("label",{htmlFor:b,className:Ve.label,children:n}),e.jsxs("div",{className:[Ve.inputWrapper,Ve[o],s?Ve.hasError:""].filter(Boolean).join(" "),children:[a&&e.jsx("span",{className:Ve.adornment,children:a}),e.jsx("input",{id:b,className:Ve.input,"aria-invalid":!!s,"aria-describedby":s?`${b}-error`:t?`${b}-helper`:void 0,...v}),i&&e.jsx("span",{className:`${Ve.adornment} ${Ve.trailingAdornment}`,children:i})]}),s&&e.jsx("p",{id:`${b}-error`,className:Ve.errorText,children:s}),!s&&t&&e.jsx("p",{id:`${b}-helper`,className:Ve.helperText,children:t})]})},Oa="_field_t1e02_1",Wa="_fullWidth_t1e02_9",Ha="_label_t1e02_13",qa="_shell_t1e02_19",Fa="_hasError_t1e02_33",Ga="_disabled_t1e02_39",Va="_dragOver_t1e02_43",Ka="_toolbar_t1e02_48",Ua="_divider_t1e02_61",Ya="_toolBtn_t1e02_69",Qa="_toolBtnActive_t1e02_101",Xa="_editor_t1e02_110",Ja="_editorEmpty_t1e02_122",Za="_dropOverlay_t1e02_186",ei="_linkPrompt_t1e02_202",ti="_linkInput_t1e02_211",ni="_linkBtn_t1e02_228",si="_linkBtnGhost_t1e02_229",oi="_helperText_t1e02_256",ri="_errorText_t1e02_262",Te={field:Oa,fullWidth:Wa,label:Ha,shell:qa,hasError:Fa,disabled:Ga,dragOver:Va,toolbar:Ka,divider:Ua,toolBtn:Ya,toolBtnActive:Qa,editor:Xa,editorEmpty:Ja,dropOverlay:Za,linkPrompt:ei,linkInput:ti,linkBtn:ni,linkBtnGhost:si,helperText:oi,errorText:ri},Ce=({children:n})=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:n}),Se={bold:e.jsxs(Ce,{children:[e.jsx("path",{d:"M6 4h8a4 4 0 0 1 0 8H6z"}),e.jsx("path",{d:"M6 12h9a4 4 0 0 1 0 8H6z"})]}),italic:e.jsxs(Ce,{children:[e.jsx("line",{x1:"19",y1:"4",x2:"10",y2:"4"}),e.jsx("line",{x1:"14",y1:"20",x2:"5",y2:"20"}),e.jsx("line",{x1:"15",y1:"4",x2:"9",y2:"20"})]}),underline:e.jsxs(Ce,{children:[e.jsx("path",{d:"M6 3v7a6 6 0 0 0 12 0V3"}),e.jsx("line",{x1:"4",y1:"21",x2:"20",y2:"21"})]}),strike:e.jsxs(Ce,{children:[e.jsx("path",{d:"M16 4H9a3 3 0 0 0-2.83 4"}),e.jsx("path",{d:"M14 12a4 4 0 0 1 0 8H6"}),e.jsx("line",{x1:"4",y1:"12",x2:"20",y2:"12"})]}),h1:e.jsxs(Ce,{children:[e.jsx("path",{d:"M4 12h8"}),e.jsx("path",{d:"M4 18V6"}),e.jsx("path",{d:"M12 18V6"}),e.jsx("path",{d:"M17 10l3-2v10"})]}),h2:e.jsxs(Ce,{children:[e.jsx("path",{d:"M4 12h8"}),e.jsx("path",{d:"M4 18V6"}),e.jsx("path",{d:"M12 18V6"}),e.jsx("path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1"})]}),h3:e.jsxs(Ce,{children:[e.jsx("path",{d:"M4 12h8"}),e.jsx("path",{d:"M4 18V6"}),e.jsx("path",{d:"M12 18V6"}),e.jsx("path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2"}),e.jsx("path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2"})]}),paragraph:e.jsxs(Ce,{children:[e.jsx("path",{d:"M13 4v16"}),e.jsx("path",{d:"M17 4v16"}),e.jsx("path",{d:"M19 4H9.5a4.5 4.5 0 0 0 0 9H13"})]}),ul:e.jsxs(Ce,{children:[e.jsx("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),e.jsx("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),e.jsx("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),e.jsx("line",{x1:"3",y1:"6",x2:"3.01",y2:"6"}),e.jsx("line",{x1:"3",y1:"12",x2:"3.01",y2:"12"}),e.jsx("line",{x1:"3",y1:"18",x2:"3.01",y2:"18"})]}),ol:e.jsxs(Ce,{children:[e.jsx("line",{x1:"10",y1:"6",x2:"21",y2:"6"}),e.jsx("line",{x1:"10",y1:"12",x2:"21",y2:"12"}),e.jsx("line",{x1:"10",y1:"18",x2:"21",y2:"18"}),e.jsx("path",{d:"M4 6h1v4"}),e.jsx("path",{d:"M4 10h2"}),e.jsx("path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1"})]}),quote:e.jsxs(Ce,{children:[e.jsx("path",{d:"M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z"}),e.jsx("path",{d:"M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z"})]}),code:e.jsxs(Ce,{children:[e.jsx("polyline",{points:"16 18 22 12 16 6"}),e.jsx("polyline",{points:"8 6 2 12 8 18"})]}),link:e.jsxs(Ce,{children:[e.jsx("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),e.jsx("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]}),image:e.jsxs(Ce,{children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),e.jsx("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),e.jsx("polyline",{points:"21 15 16 10 5 21"})]}),alignLeft:e.jsxs(Ce,{children:[e.jsx("line",{x1:"17",y1:"10",x2:"3",y2:"10"}),e.jsx("line",{x1:"21",y1:"6",x2:"3",y2:"6"}),e.jsx("line",{x1:"21",y1:"14",x2:"3",y2:"14"}),e.jsx("line",{x1:"17",y1:"18",x2:"3",y2:"18"})]}),alignCenter:e.jsxs(Ce,{children:[e.jsx("line",{x1:"18",y1:"10",x2:"6",y2:"10"}),e.jsx("line",{x1:"21",y1:"6",x2:"3",y2:"6"}),e.jsx("line",{x1:"21",y1:"14",x2:"3",y2:"14"}),e.jsx("line",{x1:"18",y1:"18",x2:"6",y2:"18"})]}),alignRight:e.jsxs(Ce,{children:[e.jsx("line",{x1:"21",y1:"10",x2:"7",y2:"10"}),e.jsx("line",{x1:"21",y1:"6",x2:"3",y2:"6"}),e.jsx("line",{x1:"21",y1:"14",x2:"3",y2:"14"}),e.jsx("line",{x1:"21",y1:"18",x2:"7",y2:"18"})]}),clear:e.jsx(Ce,{children:e.jsx("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})}),undo:e.jsxs(Ce,{children:[e.jsx("path",{d:"M3 7v6h6"}),e.jsx("path",{d:"M21 17a9 9 0 0 0-15-6.7L3 13"})]}),redo:e.jsxs(Ce,{children:[e.jsx("path",{d:"M21 7v6h-6"}),e.jsx("path",{d:"M3 17a9 9 0 0 1 15-6.7L21 13"})]})},Wt={bold:{label:"Bold",icon:Se.bold,command:"bold",shortcut:"⌘B"},italic:{label:"Italic",icon:Se.italic,command:"italic",shortcut:"⌘I"},underline:{label:"Underline",icon:Se.underline,command:"underline",shortcut:"⌘U"},strike:{label:"Strikethrough",icon:Se.strike,command:"strikeThrough",query:"strikeThrough"},h1:{label:"Heading 1",icon:Se.h1,command:"formatBlock",arg:"H1"},h2:{label:"Heading 2",icon:Se.h2,command:"formatBlock",arg:"H2"},h3:{label:"Heading 3",icon:Se.h3,command:"formatBlock",arg:"H3"},paragraph:{label:"Paragraph",icon:Se.paragraph,command:"formatBlock",arg:"P"},ul:{label:"Bulleted list",icon:Se.ul,command:"insertUnorderedList"},ol:{label:"Numbered list",icon:Se.ol,command:"insertOrderedList"},quote:{label:"Blockquote",icon:Se.quote,command:"formatBlock",arg:"BLOCKQUOTE"},code:{label:"Inline code",icon:Se.code,command:"formatBlock",arg:"PRE"},"align-left":{label:"Align left",icon:Se.alignLeft,command:"justifyLeft"},"align-center":{label:"Align center",icon:Se.alignCenter,command:"justifyCenter"},"align-right":{label:"Align right",icon:Se.alignRight,command:"justifyRight"},clear:{label:"Clear formatting",icon:Se.clear,command:"removeFormat"},undo:{label:"Undo",icon:Se.undo,command:"undo",shortcut:"⌘Z"},redo:{label:"Redo",icon:Se.redo,command:"redo",shortcut:"⇧⌘Z"}},ai=["image/png","image/jpeg","image/gif","image/webp","image/svg+xml"];function ii(n){return typeof n=="object"&&n!==null}function ci(n){return new Promise((t,s)=>{const o=new FileReader;o.onload=()=>t(String(o.result)),o.onerror=()=>s(o.error),o.readAsDataURL(n)})}function ht(n,t){try{document.execCommand(n,!1,t)}catch{}}const li=/^(?:P|DIV|H[1-6]|BLOCKQUOTE|PRE|UL|OL|LI|TABLE)$/;function Ct(n,t){const s=window.getSelection();if(!s||s.rangeCount===0)return null;const o=s.getRangeAt(0).startContainer,a=o.nodeType===1?o:o.parentElement;let i=null;try{i=(a==null?void 0:a.closest(t))??null}catch{return null}return i&&n.contains(i)&&i!==n?i:null}function fn(n,t){var b;const s=window.getSelection();if(!s||s.rangeCount===0)return!1;const o=s.getRangeAt(0),a=o.startContainer,i=a.nodeType===1?a:a.parentElement;if(!i)return!1;const l=[];let c=null;try{c=i.closest(t)}catch{return!1}for(;c&&n.contains(c)&&c!==n;)l.push(c),c=((b=c.parentElement)==null?void 0:b.closest(t))??null;if(l.length===0)return!1;const p=document.createElement("span");p.setAttribute("data-evo-caret",""),o.insertNode(p),l.forEach(_=>{if(Array.from(_.children).some(N=>li.test(N.tagName)))_.replaceWith(...Array.from(_.childNodes));else{const N=document.createElement("p");for(;_.firstChild;)N.appendChild(_.firstChild);N.childNodes.length||N.appendChild(document.createElement("br")),_.replaceWith(N)}});const v=n.querySelector("span[data-evo-caret]");if(v){const _=v.parentElement,x=document.createRange();x.setStartBefore(v),x.collapse(!0),s.removeAllRanges(),s.addRange(x),v.remove(),_&&!_.childNodes.length&&_.appendChild(document.createElement("br"))}return!0}function di(n){const t=/^(?:P|DIV|H[1-6]|UL|OL|PRE|BLOCKQUOTE|TABLE)$/,s=[];let o=[];const a=()=>{if(!o.length)return;const i=document.createElement("p");o.forEach(l=>i.appendChild(l)),o=[],s.push(i)};return Array.from(n.childNodes).forEach(i=>{if(i.nodeType===1&&t.test(i.tagName)){a();let l=i;if(l.tagName==="DIV"){const c=document.createElement("p");for(;l.firstChild;)c.appendChild(l.firstChild);l=c}s.push(l)}else o.push(i)}),a(),s.forEach(i=>{!i.textContent&&!i.querySelector("br,img")&&i.appendChild(document.createElement("br"))}),s}function ui(n){const t=window.getSelection();if(!t||t.rangeCount===0)return!1;const s=t.getRangeAt(0);if(!s.collapsed)return!1;const o=s.startContainer,a=o.nodeType===1?o:o.parentElement,i=(a==null?void 0:a.closest("pre,blockquote"))??null;if(!i||!n.contains(i)||i===n)return!1;const l=document.createRange();l.setStart(s.startContainer,s.startOffset),l.setEnd(i,i.childNodes.length);const c=di(l.extractContents());if(c.length===0){const b=document.createElement("p");b.appendChild(document.createElement("br")),c.push(b)}let p=i;c.forEach(b=>{p.after(b),p=b}),i.firstChild||i.remove();const v=document.createRange();return v.setStart(c[0],0),v.collapse(!0),t.removeAllRanges(),t.addRange(v),!0}const hi=["bold","italic","underline","divider","h1","h2","divider","ul","ol","divider","link","image"],pi=r.forwardRef(function({value:t,defaultValue:s,onChange:o,tools:a=hi,placeholder:i="Start writing…",minHeight:l=160,maxHeight:c,disabled:p=!1,readOnly:v=!1,label:b,helperText:_,error:x,fullWidth:N=!1,onImageUpload:w,acceptedImageTypes:C=ai,maxImageSize:E,onImageError:D,className:V="",id:H},ue){const j=r.useRef(null),M=r.useRef(null),B=r.useRef(""),S=t!==void 0,[se,Q]=r.useState({}),[y,te]=r.useState(!0),[R,he]=r.useState(!1),[$,P]=r.useState(null),A=H??(b==null?void 0:b.toLowerCase().replace(/\s+/g,"-"))??void 0;r.useEffect(()=>{var u,T;const m=j.current;m&&(S?t!==B.current&&(m.innerHTML=t??"",B.current=t??"",te(!((u=m.textContent)!=null&&u.trim()))):s&&!B.current&&(m.innerHTML=s,B.current=s,te(!((T=m.textContent)!=null&&T.trim()))))},[t,s,S]);const W=r.useCallback(()=>{const m=j.current,u={};Object.entries(Wt).forEach(([T,I])=>{try{I.command==="formatBlock"?m?(I.arg??"").toUpperCase()==="P"?u[T]=!!Ct(m,"P,DIV")&&!Ct(m,"BLOCKQUOTE,PRE,H1,H2,H3,H4,H5,H6"):u[T]=!!Ct(m,I.arg??""):u[T]=!1:u[T]=document.queryCommandState(I.query??I.command)}catch{u[T]=!1}}),Q(u)},[]),G=r.useCallback(()=>{var T;const m=j.current;if(!m)return;const u=m.innerHTML;B.current=u,te(!((T=m.textContent)!=null&&T.trim())&&!m.querySelector("img")),o==null||o(u),W()},[o,W]);r.useImperativeHandle(ue,()=>({getHTML:()=>{var m;return((m=j.current)==null?void 0:m.innerHTML)??""},setHTML:m=>{const u=j.current;u&&(u.innerHTML=m,G())},getText:()=>{var m;return((m=j.current)==null?void 0:m.textContent)??""},focus:()=>{var m;return(m=j.current)==null?void 0:m.focus()},insertImage:(m,u="")=>ae(m,u),insertHTML:m=>{var u;(u=j.current)==null||u.focus(),ht("insertHTML",m),G()},clear:()=>{const m=j.current;m&&(m.innerHTML="",G())}}),[G]);const ae=r.useCallback((m,u="")=>{const T=j.current;if(!T)return;T.focus();const I=m.replace(/"/g,"""),K=u.replace(/"/g,""");ht("insertHTML",`<img src="${I}" alt="${K}" /><p data-evo-caret><br></p>`);const fe=T.querySelector("p[data-evo-caret]");if(fe){fe.removeAttribute("data-evo-caret");const oe=window.getSelection(),Le=document.createRange();Le.setStart(fe,0),Le.collapse(!0),oe==null||oe.removeAllRanges(),oe==null||oe.addRange(Le)}G()},[G]),ee=r.useCallback(async m=>{if(!C.includes(m.type)){D==null||D({code:"wrong-type",message:`Unsupported image type: ${m.type}`});return}if(E&&m.size>E){D==null||D({code:"too-large",message:`Image exceeds ${(E/1024/1024).toFixed(1)} MB`});return}try{const u=w?await w(m):await ci(m);ae(u,m.name)}catch(u){D==null||D({code:"upload-failed",message:u instanceof Error?u.message:"Upload failed"})}},[C,E,w,D,ae]),J=r.useCallback(m=>{const u=j.current;u==null||u.focus();const T=Wt[m];if(T){if(T.command==="formatBlock"&&u){const I=T.arg??"";I.toUpperCase()!=="P"&&Ct(u,I)?fn(u,I):(fn(u,"BLOCKQUOTE,PRE,H1,H2,H3,H4,H5,H6"),ht("formatBlock",I))}else ht(T.command,T.arg);G()}},[G]),Y=r.useCallback(()=>{var m;(m=M.current)==null||m.click()},[]),me=r.useCallback(()=>{const m=window.getSelection(),u=m&&m.rangeCount>0?m.getRangeAt(0).cloneRange():null;P({url:"https://",range:u})},[]),ye=r.useCallback(()=>{var T,I;if(!$)return;const{url:m,range:u}=$;if((T=j.current)==null||T.focus(),u){const K=window.getSelection();K==null||K.removeAllRanges(),K==null||K.addRange(u)}if(m&&m!=="https://"){ht("createLink",m);const K=(I=j.current)==null?void 0:I.querySelectorAll('a[href="'+m+'"]');K==null||K.forEach(fe=>fe.setAttribute("target","_blank"))}P(null),G()},[$,G]),we=r.useCallback(()=>{G()},[G]),le=r.useCallback(m=>{if(m.key==="Enter"&&!m.shiftKey&&!m.metaKey&&!m.ctrlKey&&!m.altKey){const I=j.current;if(I&&ui(I)){m.preventDefault(),G();return}}if(!(m.metaKey||m.ctrlKey))return;const T=m.key.toLowerCase();T==="b"?(m.preventDefault(),J("bold")):T==="i"?(m.preventDefault(),J("italic")):T==="u"&&(m.preventDefault(),J("underline"))},[J,G]),Be=r.useCallback(async m=>{var I,K;const u=(I=m.clipboardData)==null?void 0:I.items;if(!u)return;for(let fe=0;fe<u.length;fe++){const oe=u[fe];if(oe.type.startsWith("image/")){m.preventDefault();const Le=oe.getAsFile();Le&&await ee(Le);return}}const T=(K=m.clipboardData)==null?void 0:K.getData("text/plain");T!==void 0&&T!==""&&(m.preventDefault(),ht("insertText",T))},[ee]),je=r.useCallback(m=>{m.dataTransfer.types.includes("Files")&&(m.preventDefault(),he(!0))},[]),ge=r.useCallback(()=>he(!1),[]),de=r.useCallback(async m=>{he(!1);const u=Array.from(m.dataTransfer.files??[]).filter(T=>T.type.startsWith("image/"));if(u.length!==0){m.preventDefault();for(const T of u)await ee(T)}},[ee]),be=r.useCallback(async m=>{const u=Array.from(m.target.files??[]);m.target.value="";for(const T of u)await ee(T)},[ee]);r.useEffect(()=>{const m=()=>{const u=j.current;u&&(document.activeElement===u||u.contains(document.activeElement))&&W()};return document.addEventListener("selectionchange",m),()=>document.removeEventListener("selectionchange",m)},[W]);const We=r.useMemo(()=>a.length>0?e.jsx("div",{className:Te.toolbar,role:"toolbar","aria-label":"Formatting toolbar",children:a.map((u,T)=>{var fe;if(u==="divider")return e.jsx("span",{className:Te.divider,"aria-hidden":"true"},`d-${T}`);if(ii(u)){const oe=((fe=u.isActive)==null?void 0:fe.call(u))??!1;return e.jsx("button",{type:"button",className:[Te.toolBtn,oe?Te.toolBtnActive:""].filter(Boolean).join(" "),title:u.label,"aria-label":u.label,"aria-pressed":oe,disabled:p||v,onMouseDown:Le=>Le.preventDefault(),onClick:()=>u.onAction(ke()),children:u.icon},u.key)}if(u==="image")return e.jsx("button",{type:"button",className:Te.toolBtn,title:"Insert image","aria-label":"Insert image",disabled:p||v,onMouseDown:oe=>oe.preventDefault(),onClick:Y,children:Se.image},"image");if(u==="link")return e.jsx("button",{type:"button",className:Te.toolBtn,title:"Insert link","aria-label":"Insert link",disabled:p||v,onMouseDown:oe=>oe.preventDefault(),onClick:me,children:Se.link},"link");const I=Wt[u];if(!I)return null;const K=!!se[u];return e.jsx("button",{type:"button",className:[Te.toolBtn,K?Te.toolBtnActive:""].filter(Boolean).join(" "),title:`${I.label}${I.shortcut?` (${I.shortcut})`:""}`,"aria-label":I.label,"aria-pressed":K,disabled:p||v,onMouseDown:oe=>oe.preventDefault(),onClick:()=>J(u),children:I.icon},u)})}):null,[a,se,p,v,Y,me,J]),ke=r.useCallback(()=>({getHTML:()=>{var m;return((m=j.current)==null?void 0:m.innerHTML)??""},setHTML:m=>{const u=j.current;u&&(u.innerHTML=m,G())},getText:()=>{var m;return((m=j.current)==null?void 0:m.textContent)??""},focus:()=>{var m;return(m=j.current)==null?void 0:m.focus()},insertImage:(m,u="")=>ae(m,u),insertHTML:m=>{var u;(u=j.current)==null||u.focus(),ht("insertHTML",m),G()},clear:()=>{const m=j.current;m&&(m.innerHTML="",G())}}),[G,ae]),Ee={minHeight:typeof l=="number"?`${l}px`:l,maxHeight:c!==void 0?typeof c=="number"?`${c}px`:c:void 0};return e.jsxs("div",{className:[Te.field,N?Te.fullWidth:"",V].filter(Boolean).join(" "),children:[b&&e.jsx("label",{htmlFor:A,className:Te.label,children:b}),e.jsxs("div",{className:[Te.shell,x?Te.hasError:"",p?Te.disabled:"",R?Te.dragOver:""].filter(Boolean).join(" "),children:[We,e.jsx("div",{ref:j,id:A,className:[Te.editor,y?Te.editorEmpty:""].filter(Boolean).join(" "),contentEditable:!p&&!v,suppressContentEditableWarning:!0,role:"textbox","aria-multiline":"true","aria-label":b??"Rich text editor","aria-invalid":!!x,"aria-readonly":v,"aria-disabled":p,"data-placeholder":i,style:Ee,onInput:we,onKeyDown:le,onPaste:Be,onDragOver:je,onDragLeave:ge,onDrop:de,onBlur:W}),R&&e.jsx("div",{className:Te.dropOverlay,"aria-hidden":"true",children:e.jsx("span",{children:"Drop image to upload"})}),$&&e.jsxs("div",{className:Te.linkPrompt,role:"dialog","aria-label":"Insert link",children:[e.jsx("input",{type:"url",className:Te.linkInput,value:$.url,autoFocus:!0,onChange:m=>P({...$,url:m.target.value}),onKeyDown:m=>{m.key==="Enter"?(m.preventDefault(),ye()):m.key==="Escape"&&(m.preventDefault(),P(null))},placeholder:"https://example.com"}),e.jsx("button",{type:"button",className:Te.linkBtn,onClick:ye,children:"Apply"}),e.jsx("button",{type:"button",className:Te.linkBtnGhost,onClick:()=>P(null),children:"Cancel"})]}),e.jsx("input",{ref:M,type:"file",accept:C.join(","),multiple:!0,hidden:!0,onChange:be})]}),x&&e.jsx("p",{className:Te.errorText,children:x}),!x&&_&&e.jsx("p",{className:Te.helperText,children:_})]})}),_i="_field_121w6_7",fi="_fullWidth_121w6_15",mi="_disabled_121w6_19",vi="_trigger_121w6_19",xi="_label_121w6_25",gi="_selectWrapper_121w6_33",bi="_open_121w6_66",yi="_hasError_121w6_70",wi="_sm_121w6_82",ji="_md_121w6_89",ki="_lg_121w6_95",Ni="_triggerValue_121w6_102",Ei="_triggerPlaceholder_121w6_103",Ti="_triggerChips_121w6_113",Ii="_chipRow_121w6_120",$i="_chip_121w6_120",Ci="_chipIcon_121w6_143",Si="_chipLabel_121w6_151",Li="_chipRemove_121w6_158",Mi="_countMore_121w6_175",Di="_triggerText_121w6_185",Bi="_triggerIcon_121w6_192",Ri="_triggerActions_121w6_200",Ai="_clearBtn_121w6_208",zi="_chevron_121w6_225",Pi="_chevronOpen_121w6_233",Oi="_menu_121w6_245",Wi="_menuOpen_121w6_1",Hi="_searchRow_121w6_271",qi="_searchIconWrap_121w6_280",Fi="_searchInput_121w6_286",Gi="_bulkRow_121w6_302",Vi="_bulkBtn_121w6_311",Ki="_bulkCount_121w6_333",Ui="_list_121w6_341",Yi="_empty_121w6_367",Qi="_option_121w6_375",Xi="_optionActive_121w6_396",Ji="_optionDisabled_121w6_396",Zi="_optionSelected_121w6_401",ec="_optionTitle_121w6_404",tc="_optionIcon_121w6_413",nc="_optionLabel_121w6_424",sc="_optionDesc_121w6_439",oc="_check_121w6_448",rc="_checkbox_121w6_459",ac="_checkboxChecked_121w6_473",ic="_errorText_121w6_484",cc="_helperText_121w6_491",X={field:_i,fullWidth:fi,disabled:mi,trigger:vi,label:xi,selectWrapper:gi,open:bi,hasError:yi,sm:wi,md:ji,lg:ki,triggerValue:Ni,triggerPlaceholder:Ei,triggerChips:Ti,chipRow:Ii,chip:$i,chipIcon:Ci,chipLabel:Si,chipRemove:Li,countMore:Mi,triggerText:Di,triggerIcon:Bi,triggerActions:Ri,clearBtn:Ai,chevron:zi,chevronOpen:Pi,menu:Oi,menuOpen:Wi,searchRow:Hi,searchIconWrap:qi,searchInput:Fi,bulkRow:Gi,bulkBtn:Vi,bulkCount:Ki,list:Ui,empty:Yi,option:Qi,optionActive:Xi,optionDisabled:Ji,optionSelected:Zi,optionTitle:ec,optionIcon:tc,optionLabel:nc,optionDesc:sc,check:oc,checkbox:rc,checkboxChecked:ac,errorText:ic,helperText:cc},lc=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 6l4 4 4-4",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),mn=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M3.5 8.5l3 3 6-7",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),vn=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"12",height:"12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}),dc=()=>e.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"7",cy:"7",r:"4.5",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M10.5 10.5L13 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),uc=n=>{const{label:t,options:s,placeholder:o="Select an option",helperText:a,error:i,size:l="md",fullWidth:c=!1,disabled:p=!1,searchable:v=!1,clearable:b=!1,id:_,name:x,className:N=""}=n,w=n.multiple===!0,C=w?n.multipleDisplay??"chips":"chips",E=w?n.maxSelections:void 0,D=w?n.showSelectAll??!1:!1,V=r.useId(),H=_??`evo-select-${V}`,ue=`${H}-listbox`,j=n.value,M=n.defaultValue,B=j!==void 0,S=w?Array.isArray(M)?M:[]:typeof M=="string"?M:"",[se,Q]=r.useState(S),y=B?j:se,te=w?Array.isArray(y)?y:[]:typeof y=="string"&&y?[y]:[],[R,he]=r.useState(!1),[$,P]=r.useState(-1),[A,W]=r.useState(""),G=r.useRef(null),ae=r.useRef(null),ee=r.useRef(null),J=r.useRef(null),Y=v&&A?s.filter(u=>u.label.toLowerCase().includes(A.toLowerCase())):s,me=w?void 0:s.find(u=>u.value===y),ye=w?s.filter(u=>te.includes(u.value)):[],we=w&&E!==void 0&&te.length>=E,le=r.useCallback(u=>{var T,I;B||Q(u),w?(T=n.onChange)==null||T.call(n,u):(I=n.onChange)==null||I.call(n,u)},[B,w,n.onChange]),Be=r.useCallback(u=>{if(w){const T=Array.isArray(y)?y:[];if(T.includes(u))le(T.filter(I=>I!==u));else{if(E!==void 0&&T.length>=E)return;le([...T,u])}}else le(u)},[le,w,E,y]);r.useEffect(()=>{if(!R)return;const u=T=>{var I;(I=G.current)!=null&&I.contains(T.target)||(he(!1),W(""))};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[R]),r.useEffect(()=>{if(R){const u=Y.findIndex(T=>te.includes(T.value));if(P(u>=0?u:Y.findIndex(T=>!T.disabled)),v){const T=setTimeout(()=>{var I;return(I=ee.current)==null?void 0:I.focus()},30);return()=>clearTimeout(T)}}else W(""),P(-1)},[R]),r.useEffect(()=>{var T;if(!R||$<0)return;const u=(T=J.current)==null?void 0:T.querySelector(`[data-idx="${$}"]`);u==null||u.scrollIntoView({block:"nearest"})},[$,R]);const je=u=>{if(Y.length===0)return;let T=$;for(let I=0;I<Y.length;I++)if(T=(T+u+Y.length)%Y.length,!Y[T].disabled){P(T);return}},ge=u=>{var T,I;if(!p){if(!R){(u.key==="Enter"||u.key===" "||u.key==="ArrowDown"||u.key==="ArrowUp")&&(u.preventDefault(),he(!0));return}if(u.key==="Escape")u.preventDefault(),he(!1),(T=ae.current)==null||T.focus();else if(u.key==="ArrowDown")u.preventDefault(),je(1);else if(u.key==="ArrowUp")u.preventDefault(),je(-1);else if(u.key==="Enter"){u.preventDefault();const K=Y[$];if(K&&!K.disabled){if(!te.includes(K.value)&&we)return;Be(K.value),w||(he(!1),(I=ae.current)==null||I.focus())}}else if(u.key==="Home"){u.preventDefault();const K=Y.findIndex(fe=>!fe.disabled);K>=0&&P(K)}else if(u.key==="End"){u.preventDefault();for(let K=Y.length-1;K>=0;K--)if(!Y[K].disabled){P(K);break}}else u.key==="Tab"&&he(!1)}},de=u=>{var I;u.disabled||!te.includes(u.value)&&we||(Be(u.value),w||(he(!1),(I=ae.current)==null||I.focus()))},be=u=>{u.stopPropagation(),le(w?[]:"")},We=(u,T)=>{if(u.stopPropagation(),!w)return;const I=Array.isArray(y)?y:[];le(I.filter(K=>K!==T))},ke=()=>{if(!w)return;const u=Y.filter(K=>!K.disabled).map(K=>K.value),T=Array.from(new Set([...Array.isArray(y)?y:[],...u])),I=E!==void 0?T.slice(0,E):T;le(I)},Ee=w?te.length>0:!!y,m=()=>{var u;if(!Ee)return e.jsx("span",{className:X.triggerPlaceholder,children:e.jsx("span",{className:X.triggerText,children:o})});if(!w)return e.jsxs("span",{className:X.triggerValue,children:[(me==null?void 0:me.icon)&&e.jsx("span",{className:X.triggerIcon,children:me.icon}),e.jsx("span",{className:X.triggerText,children:me==null?void 0:me.label})]});if(C==="count"){const T=((u=ye[0])==null?void 0:u.label)??"",I=ye.length-1;return e.jsx("span",{className:X.triggerValue,children:e.jsxs("span",{className:X.triggerText,children:[T,I>0&&e.jsxs("span",{className:X.countMore,children:[", +",I," more"]})]})})}return e.jsx("span",{className:X.chipRow,children:ye.map(T=>e.jsxs("span",{className:X.chip,children:[T.icon&&e.jsx("span",{className:X.chipIcon,children:T.icon}),e.jsx("span",{className:X.chipLabel,children:T.label}),!p&&e.jsx("span",{role:"button",tabIndex:-1,"aria-label":`Remove ${T.label}`,className:X.chipRemove,onClick:I=>We(I,T.value),onMouseDown:I=>I.preventDefault(),children:e.jsx(vn,{})})]},T.value))})};return e.jsxs("div",{ref:G,className:[X.field,c?X.fullWidth:"",p?X.disabled:"",N].filter(Boolean).join(" "),children:[t&&e.jsx("label",{htmlFor:H,className:X.label,children:t}),e.jsxs("div",{className:X.selectWrapper,children:[e.jsxs("button",{ref:ae,id:H,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":R,"aria-controls":ue,"aria-invalid":!!i,"aria-multiselectable":w||void 0,disabled:p,className:[X.trigger,X[l],R?X.open:"",i?X.hasError:"",w&&C==="chips"&&te.length>0?X.triggerChips:""].filter(Boolean).join(" "),onClick:()=>!p&&he(u=>!u),onKeyDown:ge,children:[m(),e.jsxs("span",{className:X.triggerActions,children:[b&&Ee&&!p&&e.jsx("span",{role:"button",tabIndex:-1,"aria-label":"Clear selection",className:X.clearBtn,onClick:be,onMouseDown:u=>u.preventDefault(),children:e.jsx(vn,{})}),e.jsx("span",{className:[X.chevron,R?X.chevronOpen:""].filter(Boolean).join(" "),children:e.jsx(lc,{})})]})]}),R&&e.jsxs("div",{className:X.menu,role:"listbox",id:ue,"aria-labelledby":H,"aria-multiselectable":w||void 0,"aria-activedescendant":$>=0?`${H}-opt-${$}`:void 0,children:[v&&e.jsxs("div",{className:X.searchRow,children:[e.jsx("span",{className:X.searchIconWrap,children:e.jsx(dc,{})}),e.jsx("input",{ref:ee,type:"text",className:X.searchInput,placeholder:"Search...",value:A,onChange:u=>{W(u.target.value),P(0)},onKeyDown:ge})]}),w&&D&&Y.length>0&&e.jsxs("div",{className:X.bulkRow,children:[e.jsx("button",{type:"button",className:X.bulkBtn,onClick:ke,disabled:E!==void 0&&te.length>=E,children:"Select all"}),e.jsx("button",{type:"button",className:X.bulkBtn,onClick:()=>le([]),disabled:te.length===0,children:"Clear all"}),E!==void 0&&e.jsxs("span",{className:X.bulkCount,children:[te.length," / ",E]})]}),e.jsx("div",{className:X.list,ref:J,role:"presentation",children:Y.length===0?e.jsx("div",{className:X.empty,children:"No results"}):Y.map((u,T)=>{const I=te.includes(u.value),K=T===$,fe=!I&&we,oe=u.disabled||fe;return e.jsxs("div",{id:`${H}-opt-${T}`,role:"option","aria-selected":I,"aria-disabled":oe,"data-idx":T,className:[X.option,I?X.optionSelected:"",K?X.optionActive:"",oe?X.optionDisabled:""].filter(Boolean).join(" "),onClick:()=>!oe&&de(u),onMouseEnter:()=>!oe&&P(T),children:[w&&e.jsx("span",{className:[X.checkbox,I?X.checkboxChecked:""].filter(Boolean).join(" "),"aria-hidden":"true",children:I&&e.jsx(mn,{})}),u.icon&&e.jsx("span",{className:X.optionIcon,children:u.icon}),e.jsxs("span",{className:X.optionLabel,children:[e.jsx("span",{className:X.optionTitle,children:u.label}),u.description&&e.jsx("span",{className:X.optionDesc,children:u.description})]}),!w&&e.jsx("span",{className:X.check,"aria-hidden":!0,children:I&&e.jsx(mn,{})})]},u.value)})})]}),x&&!w&&e.jsx("input",{type:"hidden",name:x,value:y}),x&&w&&te.map(u=>e.jsx("input",{type:"hidden",name:x,value:u},u))]}),i&&e.jsx("p",{className:X.errorText,children:i}),!i&&a&&e.jsx("p",{className:X.helperText,children:a})]})},hc="_field_sc9v8_16",pc="_fullWidth_sc9v8_24",_c="_disabled_sc9v8_28",fc="_trigger_sc9v8_28",mc="_label_sc9v8_34",vc="_selectWrapper_sc9v8_41",xc="_open_sc9v8_70",gc="_hasError_sc9v8_74",bc="_sm_sc9v8_86",yc="_md_sc9v8_93",wc="_lg_sc9v8_99",jc="_triggerValue_sc9v8_106",kc="_triggerPlaceholder_sc9v8_107",Nc="_triggerText_sc9v8_120",Ec="_triggerActions_sc9v8_127",Tc="_chip_sc9v8_136",Ic="_chipLabel_sc9v8_152",$c="_chipRemove_sc9v8_158",Cc="_chipOverflow_sc9v8_174",Sc="_clearBtn_sc9v8_188",Lc="_chevron_sc9v8_204",Mc="_chevronOpen_sc9v8_212",Dc="_menu_sc9v8_224",Bc="_menuOpen_sc9v8_1",Rc="_searchRow_sc9v8_250",Ac="_searchIconWrap_sc9v8_259",zc="_searchInput_sc9v8_265",Pc="_tree_sc9v8_281",Oc="_empty_sc9v8_306",Wc="_row_sc9v8_314",Hc="_rowDisabled_sc9v8_331",qc="_rowActive_sc9v8_335",Fc="_rowSelected_sc9v8_340",Gc="_rowLabel_sc9v8_343",Vc="_indent_sc9v8_353",Kc="_indentUnit_sc9v8_359",Uc="_toggle_sc9v8_375",Yc="_toggleOpen_sc9v8_391",Qc="_togglePlaceholder_sc9v8_396",Xc="_spinner_sc9v8_403",Jc="_spin_sc9v8_403",Zc="_checkbox_sc9v8_418",el="_checkboxChecked_sc9v8_436",tl="_checkboxMixed_sc9v8_442",nl="_rowIcon_sc9v8_449",sl="_rowText_sc9v8_459",ol="_rowDesc_sc9v8_474",rl="_match_sc9v8_483",al="_check_sc9v8_418",il="_menuFooter_sc9v8_502",cl="_footerBtn_sc9v8_513",ll="_errorText_sc9v8_529",dl="_helperText_sc9v8_536",U={field:hc,fullWidth:pc,disabled:_c,trigger:fc,label:mc,selectWrapper:vc,open:xc,hasError:gc,sm:bc,md:yc,lg:wc,triggerValue:jc,triggerPlaceholder:kc,triggerText:Nc,triggerActions:Ec,chip:Tc,chipLabel:Ic,chipRemove:$c,chipOverflow:Cc,clearBtn:Sc,chevron:Lc,chevronOpen:Mc,menu:Dc,menuOpen:Bc,searchRow:Rc,searchIconWrap:Ac,searchInput:zc,tree:Pc,empty:Oc,row:Wc,rowDisabled:Hc,rowActive:qc,rowSelected:Fc,rowLabel:Gc,indent:Vc,indentUnit:Kc,toggle:Uc,toggleOpen:Yc,togglePlaceholder:Qc,spinner:Xc,spin:Jc,checkbox:Zc,checkboxChecked:el,checkboxMixed:tl,rowIcon:nl,rowText:sl,rowDesc:ol,match:rl,check:al,menuFooter:il,footerBtn:cl,errorText:ll,helperText:dl},ul=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 6l4 4 4-4",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),hl=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"10",height:"10",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M6 4l4 4-4 4",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),xn=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"12",height:"12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M3.5 8.5l3 3 6-7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),pl=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"10",height:"10",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 8h8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})}),gn=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"12",height:"12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}),_l=()=>e.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"7",cy:"7",r:"4.5",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M10.5 10.5L13 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),fl=n=>{const t=new Map,s=new Map,o=new Set,a=(i,l)=>{for(const c of i)t.set(c.value,c),s.set(c.value,l),!c.children||c.children.length===0?c.isLeaf!==!1&&o.add(c.value):a(c.children,c.value)};return a(n,null),{nodeByValue:t,parentByValue:s,leafValues:o}},bt=(n,t=[])=>{if(!n.children||n.children.length===0)return t.push(n.value),t;for(const s of n.children)bt(s,t);return t},ml=(n,t,s)=>{const o=new Set,a=new Set,i=(l,c)=>{let p=!1;for(const v of l){const b=s(v,t),_=v.children?i(v.children,[...c,v.value]):!1;(b||_)&&(o.add(v.value),c.forEach(x=>o.add(x)),p=!0,b&&a.add(v.value))}return p};return i(n,[]),{visible:o,matched:a}},vl=(n,t)=>n.label.toLowerCase().includes(t.toLowerCase()),xl=(n,t)=>{if(!t)return n;const s=n.toLowerCase().indexOf(t.toLowerCase());return s===-1?n:e.jsxs(e.Fragment,{children:[n.slice(0,s),e.jsx("span",{className:U.match,children:n.slice(s,s+t.length)}),n.slice(s+t.length)]})},gl=({data:n,value:t,defaultValue:s,onChange:o,multiple:a=!1,checkStrictly:i=!1,checkedStrategy:l="leaf",expandedKeys:c,defaultExpandedKeys:p,onExpandedChange:v,defaultExpandAll:b=!1,loadChildren:_,searchable:x=!1,filter:N=vl,maxTagCount:w=3,label:C,placeholder:E=a?"Select items":"Select an item",helperText:D,error:V,size:H="md",fullWidth:ue=!1,disabled:j=!1,clearable:M=!1,id:B,name:S,className:se=""})=>{const Q=r.useId(),y=B??`evo-tree-${Q}`,te=`${y}-tree`,R=t!==void 0,he=r.useMemo(()=>{const h=R?t:s;return h==null?[]:Array.isArray(h)?h:[h]},[]),[$,P]=r.useState(he),A=r.useMemo(()=>R?t==null?[]:Array.isArray(t)?t:[t]:$,[R,t,$]),[W,G]=r.useState({}),[ae,ee]=r.useState(new Set),J=r.useMemo(()=>{if(Object.keys(W).length===0)return n;const h=d=>d.map(g=>{const z=W[g.value]??g.children;return z?{...g,children:h(z)}:g});return h(n)},[n,W]),Y=r.useMemo(()=>fl(J),[J]),me=r.useMemo(()=>{if(c)return c;if(p)return p;if(b){const h=[],d=g=>g.forEach(k=>{k.children&&k.children.length&&(h.push(k.value),d(k.children))});return d(n),h}return[]},[]),[ye,we]=r.useState(me),le=c??ye,Be=r.useMemo(()=>new Set(le),[le]),je=r.useCallback(h=>{c===void 0&&we(h),v==null||v(h)},[c,v]),[ge,de]=r.useState(!1),[be,We]=r.useState(""),[ke,Ee]=r.useState(-1),m=r.useRef(null),u=r.useRef(null),T=r.useRef(null),I=r.useRef(null),K=r.useMemo(()=>!x||!be.trim()?null:ml(J,be,N),[J,be,x,N]),fe=r.useMemo(()=>K?K.visible:Be,[K,Be]),oe=r.useMemo(()=>{const h=[],d=(g,k)=>{for(const z of g){if(K&&!K.visible.has(z.value))continue;const ne=z.children&&z.children.length>0||z.isLeaf===!1;h.push({node:z,level:k,hasChildren:ne}),ne&&fe.has(z.value)&&z.children&&d(z.children,k+1)}};return d(J,0),h},[J,fe,K]),Le=r.useMemo(()=>new Set(A),[A]),Pe=r.useCallback(h=>{if(!a||i||!h.children||h.children.length===0)return Le.has(h.value)?"checked":"unchecked";const d=bt(h);if(d.length===0)return Le.has(h.value)?"checked":"unchecked";let g=0;for(const k of d)Le.has(k)&&g++;return g===0?"unchecked":g===d.length?"checked":"mixed"},[a,i,Le]),He=r.useCallback(h=>{if(!a||i)return Array.from(h);if(l==="leaf")return Array.from(h).filter(k=>Y.leafValues.has(k));if(l==="all"){const k=new Set(h),z=ne=>{for(const _e of ne)_e.children&&_e.children.length&&(z(_e.children),bt(_e).every(Ne=>h.has(Ne))&&k.add(_e.value))};return z(J),Array.from(k)}const d=[],g=k=>{for(const z of k)z.children&&z.children.length?bt(z).every(_e=>h.has(_e))?d.push(z.value):g(z.children):h.has(z.value)&&d.push(z.value)};return g(J),d},[a,i,l,J,Y.leafValues]),Me=r.useCallback(h=>{const d=He(h);R||P(d);const g=d.map(k=>Y.nodeByValue.get(k)).filter(Boolean);o==null||o(d,g)},[He,R,Y.nodeByValue,o]),Ye=r.useCallback(h=>{R||P(h?[h]:[]),o==null||o(h,h?Y.nodeByValue.get(h)??null:null)},[R,Y.nodeByValue,o]),et=r.useMemo(()=>{if(!a||i)return new Set(A);const h=new Set;for(const d of A){const g=Y.nodeByValue.get(d);if(!g){h.add(d);continue}!g.children||g.children.length===0?h.add(d):bt(g).forEach(k=>h.add(k))}return h},[A,a,i,Y.nodeByValue]),nt=r.useCallback(h=>{if(Be.has(h.value)){je(le.filter(k=>k!==h.value));return}je([...le,h.value]),_&&!W[h.value]&&(h.isLeaf===!1||!h.children&&h.isLeaf!==!0)&&(ee(k=>new Set(k).add(h.value)),_(h).then(k=>{G(z=>({...z,[h.value]:k}))}).finally(()=>{ee(k=>{const z=new Set(k);return z.delete(h.value),z})}))},[le,Be,je,_,W]),Qe=r.useCallback(h=>{var z;if(h.disabled)return;if(!a){Ye(h.value),de(!1),(z=u.current)==null||z.focus();return}if(i){const ne=new Set(A);ne.has(h.value)?ne.delete(h.value):ne.add(h.value);const _e=Array.from(ne);R||P(_e);const Re=_e.map(Ne=>Y.nodeByValue.get(Ne)).filter(Boolean);o==null||o(_e,Re);return}const d=new Set(et),g=Pe(h),k=h.children&&h.children.length?bt(h):[h.value];g==="checked"?k.forEach(ne=>d.delete(ne)):k.forEach(ne=>d.add(ne)),Me(d)},[a,i,A,et,Pe,Me,Ye,R,Y.nodeByValue,o]);r.useEffect(()=>{if(!ge)return;const h=d=>{var g;(g=m.current)!=null&&g.contains(d.target)||(de(!1),We(""))};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[ge]),r.useEffect(()=>{if(ge){const h=oe.findIndex(d=>Le.has(d.node.value));if(Ee(h>=0?h:oe.findIndex(d=>!d.node.disabled)),x){const d=setTimeout(()=>{var g;return(g=T.current)==null?void 0:g.focus()},30);return()=>clearTimeout(d)}}else We(""),Ee(-1)},[ge]),r.useEffect(()=>{var d;if(!ge||ke<0)return;const h=(d=I.current)==null?void 0:d.querySelector(`[data-idx="${ke}"]`);h==null||h.scrollIntoView({block:"nearest"})},[ke,ge]);const lt=h=>{if(oe.length===0)return;let d=ke;for(let g=0;g<oe.length;g++)if(d=(d+h+oe.length)%oe.length,!oe[d].node.disabled){Ee(d);return}},dt=h=>{var g;if(j)return;if(!ge){(h.key==="Enter"||h.key===" "||h.key==="ArrowDown"||h.key==="ArrowUp")&&(h.preventDefault(),de(!0));return}const d=oe[ke];if(h.key==="Escape")h.preventDefault(),de(!1),(g=u.current)==null||g.focus();else if(h.key==="ArrowDown")h.preventDefault(),lt(1);else if(h.key==="ArrowUp")h.preventDefault(),lt(-1);else if(h.key==="ArrowRight"){if(!d)return;if(h.preventDefault(),d.hasChildren&&!Be.has(d.node.value))nt(d.node);else if(d.hasChildren){const k=ke+1;k<oe.length&&oe[k].level>d.level&&Ee(k)}}else if(h.key==="ArrowLeft"){if(!d)return;if(h.preventDefault(),d.hasChildren&&Be.has(d.node.value))nt(d.node);else for(let k=ke-1;k>=0;k--)if(oe[k].level<d.level){Ee(k);break}}else if(h.key==="Enter")h.preventDefault(),d&&Qe(d.node);else if(h.key===" "&&a)h.preventDefault(),d&&Qe(d.node);else if(h.key==="Home"){h.preventDefault();const k=oe.findIndex(z=>!z.node.disabled);k>=0&&Ee(k)}else if(h.key==="End"){h.preventDefault();for(let k=oe.length-1;k>=0;k--)if(!oe[k].node.disabled){Ee(k);break}}else h.key==="Tab"&&de(!1)},kt=h=>{h.stopPropagation(),a?Me(new Set):Ye("")},f=()=>{if(a){const d=A.map(z=>Y.nodeByValue.get(z)).filter(Boolean);if(d.length===0)return e.jsx("span",{className:U.triggerPlaceholder,children:e.jsx("span",{className:U.triggerText,children:E})});const g=d.slice(0,w),k=d.length-g.length;return e.jsxs("span",{className:U.triggerValue,children:[g.map(z=>e.jsxs("span",{className:U.chip,children:[e.jsx("span",{className:U.chipLabel,children:z.label}),e.jsx("span",{role:"button","aria-label":`Remove ${z.label}`,tabIndex:-1,className:U.chipRemove,onMouseDown:ne=>ne.preventDefault(),onClick:ne=>{ne.stopPropagation(),Qe(z)},children:e.jsx(gn,{})})]},z.value)),k>0&&e.jsxs("span",{className:U.chipOverflow,children:["+",k]})]})}const h=A[0]?Y.nodeByValue.get(A[0]):void 0;return e.jsxs("span",{className:h?U.triggerValue:U.triggerPlaceholder,children:[(h==null?void 0:h.icon)&&e.jsx("span",{className:U.rowIcon,children:h.icon}),e.jsx("span",{className:U.triggerText,children:(h==null?void 0:h.label)??E})]})},L=(h,d)=>{const{node:g,level:k,hasChildren:z}=h,ne=Be.has(g.value),_e=Pe(g),Re=!a&&Le.has(g.value),Ne=d===ke,Ie=ae.has(g.value);return e.jsxs("div",{id:`${y}-row-${d}`,role:"treeitem","aria-level":k+1,"aria-expanded":z?ne:void 0,"aria-selected":a?void 0:Re,"aria-checked":a?_e==="mixed"?"mixed":_e==="checked"?"true":"false":void 0,"aria-disabled":g.disabled,"data-idx":d,className:[U.row,Ne?U.rowActive:"",Re?U.rowSelected:"",g.disabled?U.rowDisabled:""].filter(Boolean).join(" "),onClick:()=>Qe(g),onMouseEnter:()=>!g.disabled&&Ee(d),children:[e.jsx("span",{className:U.indent,"aria-hidden":!0,children:Array.from({length:k}).map(($e,Ae)=>e.jsx("span",{className:U.indentUnit},Ae))}),z?Ie?e.jsx("span",{className:U.toggle,"aria-hidden":!0,children:e.jsx("span",{className:U.spinner})}):e.jsx("span",{className:[U.toggle,ne?U.toggleOpen:""].filter(Boolean).join(" "),role:"button",tabIndex:-1,"aria-label":ne?"Collapse":"Expand",onClick:$e=>{$e.stopPropagation(),nt(g)},onMouseDown:$e=>$e.preventDefault(),children:e.jsx(hl,{})}):e.jsx("span",{className:U.togglePlaceholder,"aria-hidden":!0}),a&&e.jsxs("span",{className:[U.checkbox,_e==="checked"?U.checkboxChecked:"",_e==="mixed"?U.checkboxMixed:""].filter(Boolean).join(" "),"aria-hidden":!0,children:[_e==="checked"&&e.jsx(xn,{}),_e==="mixed"&&e.jsx(pl,{})]}),g.icon&&e.jsx("span",{className:U.rowIcon,children:g.icon}),e.jsxs("span",{className:U.rowText,children:[e.jsx("span",{className:U.rowLabel,children:be?xl(g.label,be):g.label}),g.description&&e.jsx("span",{className:U.rowDesc,children:g.description})]}),!a&&Re&&e.jsx("span",{className:U.check,"aria-hidden":!0,children:e.jsx(xn,{})})]},g.value)},F=A.length>0,Z=a?A.join(","):A[0]??"";return e.jsxs("div",{ref:m,className:[U.field,ue?U.fullWidth:"",j?U.disabled:"",se].filter(Boolean).join(" "),children:[C&&e.jsx("label",{htmlFor:y,className:U.label,children:C}),e.jsxs("div",{className:U.selectWrapper,children:[e.jsxs("button",{ref:u,id:y,type:"button",role:"combobox","aria-haspopup":"tree","aria-expanded":ge,"aria-controls":te,"aria-invalid":!!V,disabled:j,className:[U.trigger,U[H],ge?U.open:"",V?U.hasError:""].filter(Boolean).join(" "),onClick:()=>!j&&de(h=>!h),onKeyDown:dt,children:[f(),e.jsxs("span",{className:U.triggerActions,children:[M&&F&&!j&&e.jsx("span",{role:"button",tabIndex:-1,"aria-label":"Clear selection",className:U.clearBtn,onClick:kt,onMouseDown:h=>h.preventDefault(),children:e.jsx(gn,{})}),e.jsx("span",{className:[U.chevron,ge?U.chevronOpen:""].filter(Boolean).join(" "),children:e.jsx(ul,{})})]})]}),ge&&e.jsxs("div",{className:U.menu,children:[x&&e.jsxs("div",{className:U.searchRow,children:[e.jsx("span",{className:U.searchIconWrap,children:e.jsx(_l,{})}),e.jsx("input",{ref:T,type:"text",className:U.searchInput,placeholder:"Search...",value:be,onChange:h=>{We(h.target.value),Ee(0)},onKeyDown:dt})]}),e.jsx("div",{ref:I,className:U.tree,role:"tree",id:te,"aria-labelledby":y,"aria-multiselectable":a||void 0,"aria-activedescendant":ke>=0?`${y}-row-${ke}`:void 0,children:oe.length===0?e.jsx("div",{className:U.empty,children:"No results"}):oe.map((h,d)=>L(h,d))}),a&&F&&e.jsxs("div",{className:U.menuFooter,children:[e.jsxs("span",{children:[A.length," selected"]}),e.jsx("button",{type:"button",className:U.footerBtn,onClick:()=>Me(new Set),children:"Clear all"})]})]}),S&&e.jsx("input",{type:"hidden",name:S,value:Z})]}),V&&e.jsx("p",{className:U.errorText,children:V}),!V&&D&&e.jsx("p",{className:U.helperText,children:D})]})},bl="_field_1i6oh_7",yl="_fullWidth_1i6oh_15",wl="_disabled_1i6oh_19",jl="_inputWrapper_1i6oh_19",kl="_label_1i6oh_25",Nl="_acWrapper_1i6oh_33",El="_open_1i6oh_57",Tl="_hasError_1i6oh_61",Il="_sm_1i6oh_69",$l="_md_1i6oh_74",Cl="_lg_1i6oh_79",Sl="_searchIconWrap_1i6oh_85",Ll="_input_1i6oh_19",Ml="_actions_1i6oh_119",Dl="_statusIcon_1i6oh_126",Bl="_clearBtn_1i6oh_132",Rl="_spinner_1i6oh_152",Al="_evoAcSpin_1i6oh_1",zl="_menu_1i6oh_169",Pl="_evoAcMenuOpen_1i6oh_1",Ol="_sectionHeader_1i6oh_200",Wl="_recoveryBox_1i6oh_216",Hl="_list_1i6oh_227",ql="_empty_1i6oh_252",Fl="_statusRow_1i6oh_253",Gl="_option_1i6oh_268",Vl="_optionActive_1i6oh_290",Kl="_optionDisabled_1i6oh_290",Ul="_optionSelected_1i6oh_294",Yl="_optionTitle_1i6oh_297",Ql="_optionRecovery_1i6oh_306",Xl="_optionIcon_1i6oh_310",Jl="_optionLabel_1i6oh_321",Zl="_optionDesc_1i6oh_336",ed="_mark_1i6oh_346",td="_check_1i6oh_353",nd="_errorText_1i6oh_364",sd="_helperText_1i6oh_371",ce={field:bl,fullWidth:yl,disabled:wl,inputWrapper:jl,label:kl,acWrapper:Nl,open:El,hasError:Tl,sm:Il,md:$l,lg:Cl,searchIconWrap:Sl,input:Ll,actions:Ml,statusIcon:Dl,clearBtn:Bl,spinner:Rl,evoAcSpin:Al,menu:zl,evoAcMenuOpen:Pl,sectionHeader:Ol,recoveryBox:Wl,list:Hl,empty:ql,statusRow:Fl,option:Gl,optionActive:Vl,optionDisabled:Kl,optionSelected:Ul,optionTitle:Yl,optionRecovery:Ql,optionIcon:Xl,optionLabel:Jl,optionDesc:Zl,mark:ed,check:td,errorText:nd,helperText:sd},od=()=>e.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"7",cy:"7",r:"4.5",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M10.5 10.5L13 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),rd=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"12",height:"12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}),ad=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M3.5 8.5l3 3 6-7",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),bn=()=>e.jsxs("svg",{viewBox:"0 0 16 16",width:"13",height:"13",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M8 4.5V8l2.5 1.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),id=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"13",height:"13",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M8 1.5l1.6 4.9 4.9 1.6-4.9 1.6L8 14.5l-1.6-4.9L1.5 8l4.9-1.6L8 1.5z",stroke:"currentColor",strokeWidth:"1.4",strokeLinejoin:"round"})}),yn=()=>e.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",className:ce.spinner,children:[e.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"2",strokeOpacity:"0.25"}),e.jsx("path",{d:"M14 8a6 6 0 0 0-6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),wn=new Map,cd=n=>({get:()=>wn.get(n)??[],set:t=>{wn.set(n,t)}}),ld=n=>({get:()=>{if(typeof window>"u")return[];try{const t=window.localStorage.getItem(`evo-recents:${n}`),s=t?JSON.parse(t):[];return Array.isArray(s)?s.filter(o=>typeof o=="string"):[]}catch{return[]}},set:t=>{if(!(typeof window>"u"))try{window.localStorage.setItem(`evo-recents:${n}`,JSON.stringify(t))}catch{}}});function jn(n,t){const s=n.length,o=t.length;if(s===0)return o;if(o===0)return s;let a=Array.from({length:o+1},(l,c)=>c),i=new Array(o+1);for(let l=1;l<=s;l++){i[0]=l;for(let c=1;c<=o;c++){const p=n[l-1]===t[c-1]?0:1;i[c]=Math.min(a[c]+1,i[c-1]+1,a[c-1]+p)}[a,i]=[i,a]}return a[o]}function dd(n,t){const s=t.trim().toLowerCase();if(s.length<2)return null;let o=null,a=1/0;for(const l of n){if(l.disabled)continue;const c=l.label.toLowerCase(),p=Math.min(jn(s,c),jn(s,c.slice(0,s.length)));p<a&&(a=p,o=l)}if(!o)return null;const i=Math.max(1,Math.min(3,Math.round(s.length*.4)));return a<=i?{option:o,distance:a}:null}function ud(n,t){const s=t.trim();if(!s)return n;const o=n.toLowerCase().indexOf(s.toLowerCase());return o<0?n:e.jsxs(e.Fragment,{children:[n.slice(0,o),e.jsx("mark",{className:ce.mark,children:n.slice(o,o+s.length)}),n.slice(o+s.length)]})}const Yn=r.forwardRef(({options:n,value:t,defaultValue:s=null,onChange:o,inputValue:a,onInputChange:i,label:l,placeholder:c="Search…",helperText:p,error:v,size:b="md",fullWidth:_=!1,disabled:x=!1,clearable:N=!0,loading:w=!1,debounce:C=0,minChars:E=0,maxResults:D=50,filter:V,highlightMatch:H=!0,openOnFocus:ue=!0,emptyMessage:j="No results",smartRecovery:M=!1,recents:B=!1,renderOption:S,id:se,name:Q,className:y="",...te},R)=>{const he=r.useId(),$=se??`evo-autocomplete-${he}`,P=`${$}-listbox`,A=t!==void 0,[W,G]=r.useState(s),ae=A?t:W,ee=r.useMemo(()=>n.find(d=>d.value===ae)??null,[n,ae]),J=a!==void 0,[Y,me]=r.useState(()=>{var d;return((d=n.find(g=>g.value===s))==null?void 0:d.label)??""}),ye=J?a:Y,we=r.useMemo(()=>{if(!B)return null;const d={max:5,storage:cd(Q??$),label:"Recent"};return typeof B=="object"?{...d,...B}:d},[B,Q,$]),[le,Be]=r.useState(()=>(we==null?void 0:we.storage.get())??[]),[je,ge]=r.useState(!1),[de,be]=r.useState(0),We=r.useRef(null),ke=r.useRef(null),Ee=r.useRef(null),m=r.useRef(null),u=r.useCallback(d=>{ke.current=d,typeof R=="function"?R(d):R&&(R.current=d)},[R]),I=ye.trim(),K=I.length>0&&I.length<E,fe=!!we&&I.length===0&&le.length>0,oe=r.useMemo(()=>fe?le.map(d=>n.find(g=>g.value===d)).filter(d=>!!d&&!d.disabled).slice(0,we.max):[],[fe,le,n,we]),Le=r.useMemo(()=>{if(K)return[];if(V===!1||I.length===0)return n.slice(0,D);const d=typeof V=="function"?V:(g,k)=>g.label.toLowerCase().includes(k.toLowerCase());return n.filter(g=>d(g,I)).slice(0,D)},[n,V,I,K,D]),Pe=fe?oe:Le,He=r.useMemo(()=>!M||w||K||fe||Pe.length>0||I.length===0?null:dd(n,I),[M,w,K,fe,Pe.length,I,n]),Me=He?[He.option]:Pe;r.useEffect(()=>{if(!je)return;const d=g=>{var k;(k=We.current)!=null&&k.contains(g.target)||Qe()};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[je]),r.useEffect(()=>{var g;if(!je)return;const d=(g=Ee.current)==null?void 0:g.querySelector(`[data-idx="${de}"]`);d==null||d.scrollIntoView({block:"nearest"})},[de,je]),r.useEffect(()=>{je||J||me((ee==null?void 0:ee.label)??"")},[ae]),r.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const Ye=r.useCallback(d=>{i&&(C>0?(m.current&&clearTimeout(m.current),m.current=setTimeout(()=>i(d),C)):i(d))},[i,C]),et=r.useCallback((d,g)=>{A||G(d),o==null||o(d,g)},[A,o]),nt=r.useCallback(d=>{we&&Be(g=>{const k=[d,...g.filter(z=>z!==d)].slice(0,we.max);return we.storage.set(k),k})},[we]),Qe=r.useCallback(()=>{ge(!1),be(0),!J&&ee&&me(ee.label)},[J,ee]),lt=r.useCallback(d=>{var g;d.disabled||(et(d.value,d),J||me(d.label),Ye(d.label),nt(d.value),ge(!1),be(0),(g=ke.current)==null||g.focus())},[et,J,Ye,nt]),dt=d=>{const g=d.target.value;J||me(g),Ye(g),ee&&g!==ee.label&&et(null,null),be(0),je||ge(!0)},kt=()=>{var d;J||me(""),Ye(""),et(null,null),be(0),(d=ke.current)==null||d.focus(),ge(!0)},f=d=>{if(Me.length===0)return;let g=de;for(let k=0;k<Me.length;k++)if(g=(g+d+Me.length)%Me.length,!Me[g].disabled){be(g);return}},L=d=>{if(!x){if(!je){(d.key==="ArrowDown"||d.key==="ArrowUp")&&(d.preventDefault(),ge(!0));return}switch(d.key){case"ArrowDown":d.preventDefault(),f(1);break;case"ArrowUp":d.preventDefault(),f(-1);break;case"Home":d.preventDefault(),be(Me.findIndex(g=>!g.disabled));break;case"End":d.preventDefault();for(let g=Me.length-1;g>=0;g--)if(!Me[g].disabled){be(g);break}break;case"Enter":{const g=Me[de];g&&!g.disabled&&(d.preventDefault(),lt(g));break}case"Escape":d.preventDefault(),Qe();break;case"Tab":Qe();break}}},F=ce[b],Z=je&&Me[de]?`${$}-opt-${de}`:void 0,h=(d,g,k)=>{const z=g===de,ne=d.value===ae;return e.jsx("div",{id:`${$}-opt-${g}`,role:"option","aria-selected":ne,"aria-disabled":d.disabled||void 0,"data-idx":g,className:[ce.option,z?ce.optionActive:"",ne?ce.optionSelected:"",d.disabled?ce.optionDisabled:"",k==="recovery"?ce.optionRecovery:""].filter(Boolean).join(" "),onClick:()=>lt(d),onMouseEnter:()=>!d.disabled&&be(g),children:S?S(d,{active:z,query:I}):e.jsxs(e.Fragment,{children:[k==="recent"&&e.jsx("span",{className:ce.optionIcon,"aria-hidden":"true",children:e.jsx(bn,{})}),k!=="recent"&&d.icon&&e.jsx("span",{className:ce.optionIcon,"aria-hidden":"true",children:d.icon}),e.jsxs("span",{className:ce.optionLabel,children:[e.jsx("span",{className:ce.optionTitle,children:H&&k==="option"?ud(d.label,I):d.label}),d.description&&e.jsx("span",{className:ce.optionDesc,children:d.description})]}),ne&&e.jsx("span",{className:ce.check,"aria-hidden":"true",children:e.jsx(ad,{})})]})},`${k}-${d.value}`)};return e.jsxs("div",{ref:We,className:[ce.field,_?ce.fullWidth:"",x?ce.disabled:"",y].filter(Boolean).join(" "),children:[l&&e.jsx("label",{htmlFor:$,className:ce.label,children:l}),e.jsxs("div",{className:ce.acWrapper,children:[e.jsxs("div",{className:[ce.inputWrapper,F,je?ce.open:"",v?ce.hasError:""].filter(Boolean).join(" "),children:[e.jsx("span",{className:ce.searchIconWrap,"aria-hidden":"true",children:e.jsx(od,{})}),e.jsx("input",{...te,ref:u,id:$,type:"text",role:"combobox",autoComplete:"off","aria-autocomplete":"list","aria-expanded":je,"aria-controls":P,"aria-activedescendant":Z,"aria-invalid":!!v||void 0,"aria-describedby":v?`${$}-error`:p?`${$}-helper`:void 0,className:ce.input,placeholder:c,value:ye,disabled:x,onChange:dt,onKeyDown:L,onFocus:()=>ue&&!x&&ge(!0)}),e.jsxs("span",{className:ce.actions,children:[w&&e.jsx("span",{className:ce.statusIcon,"aria-hidden":"true",children:e.jsx(yn,{})}),N&&!x&&(ye.length>0||ae)&&e.jsx("button",{type:"button",tabIndex:-1,"aria-label":"Clear",className:ce.clearBtn,onClick:kt,onMouseDown:d=>d.preventDefault(),children:e.jsx(rd,{})})]})]}),je&&e.jsx("div",{className:ce.menu,role:"listbox",id:P,"aria-label":l??"Suggestions",children:w?e.jsxs("div",{className:ce.statusRow,children:[e.jsx(yn,{}),e.jsx("span",{children:"Loading…"})]}):K?e.jsxs("div",{className:ce.empty,children:["Type ",E-I.length," more character",E-I.length===1?"":"s","…"]}):He?e.jsxs("div",{className:ce.recoveryBox,children:[e.jsxs("div",{className:ce.sectionHeader,children:[e.jsx(id,{}),e.jsxs("span",{children:["No exact match — did you mean",He.distance===1?" this":"","?"]})]}),e.jsx("div",{className:ce.list,ref:Ee,role:"presentation",children:h(He.option,0,"recovery")})]}):Me.length>0?e.jsxs(e.Fragment,{children:[fe&&e.jsxs("div",{className:ce.sectionHeader,children:[e.jsx(bn,{}),e.jsx("span",{children:we.label})]}),e.jsx("div",{className:ce.list,ref:Ee,role:"presentation",children:Me.map((d,g)=>h(d,g,fe?"recent":"option"))})]}):I.length===0?e.jsx("div",{className:ce.empty,children:"Type to search…"}):e.jsx("div",{className:ce.empty,children:j})}),Q&&e.jsx("input",{type:"hidden",name:Q,value:ae??""})]}),v&&e.jsx("p",{id:`${$}-error`,className:ce.errorText,children:v}),!v&&p&&e.jsx("p",{id:`${$}-helper`,className:ce.helperText,children:p})]})});Yn.displayName="EvoAutoComplete";const hd="_group_1xjt7_1",pd="_groupLabel_1xjt7_10",_d="_checkbox_1xjt7_18",fd="_disabled_1xjt7_23",md="_input_1xjt7_28",vd="_label_1xjt7_35",xd="_checkmark_1xjt7_35",gd="_labelText_1xjt7_100",bd="_helperText_1xjt7_105",tt={group:hd,groupLabel:pd,checkbox:_d,disabled:fd,input:md,label:vd,checkmark:xd,labelText:gd,helperText:bd},yd=({children:n,label:t,className:s=""})=>e.jsxs("fieldset",{className:`${tt.group} ${s}`,children:[t&&e.jsx("legend",{className:tt.groupLabel,children:t}),n]}),Qn=({label:n,helperText:t,indeterminate:s=!1,className:o="",disabled:a,id:i,...l})=>{const c=r.useRef(null);r.useEffect(()=>{c.current&&(c.current.indeterminate=s)},[s]);const p=i??(n==null?void 0:n.toLowerCase().replace(/\s+/g,"-"));return e.jsxs("div",{className:[tt.checkbox,a?tt.disabled:"",o].filter(Boolean).join(" "),children:[e.jsx("input",{type:"checkbox",id:p,ref:c,disabled:a,className:tt.input,...l}),e.jsxs("label",{htmlFor:p,className:tt.label,children:[e.jsx("span",{className:tt.checkmark}),e.jsx("span",{className:tt.labelText,children:n})]}),t&&e.jsx("p",{className:tt.helperText,children:t})]})};Qn.Group=yd;const wd="_group_1oqsu_1",jd="_groupLabel_1oqsu_10",kd="_radio_1oqsu_18",Nd="_disabled_1oqsu_22",Ed="_input_1oqsu_27",Td="_label_1oqsu_34",Id="_radiomark_1oqsu_34",$d="_labelText_1oqsu_78",at={group:wd,groupLabel:jd,radio:kd,disabled:Nd,input:Ed,label:Td,radiomark:Id,labelText:$d},Xn=r.createContext(null),Cd=({children:n,name:t,value:s,onChange:o,label:a,className:i=""})=>e.jsx(Xn.Provider,{value:{name:t,value:s,onChange:o},children:e.jsxs("fieldset",{className:`${at.group} ${i}`,children:[a&&e.jsx("legend",{className:at.groupLabel,children:a}),n]})}),Jn=({value:n,label:t,disabled:s=!1,className:o=""})=>{const a=r.useContext(Xn),i=a?a.value===n:!1,l=`${(a==null?void 0:a.name)??"radio"}-${n}`;return e.jsxs("div",{className:[at.radio,s?at.disabled:"",o].filter(Boolean).join(" "),children:[e.jsx("input",{type:"radio",id:l,name:a==null?void 0:a.name,value:n,checked:i,disabled:s,className:at.input,onChange:()=>a==null?void 0:a.onChange(n)}),e.jsxs("label",{htmlFor:l,className:at.label,children:[e.jsx("span",{className:at.radiomark}),e.jsx("span",{className:at.labelText,children:t})]})]})};Jn.Group=Cd;const Sd="_toggleWrapper_ke3d2_1",Ld="_disabled_ke3d2_8",Md="_hiddenInput_ke3d2_14",Dd="_track_ke3d2_21",Bd="_sm_ke3d2_29",Rd="_md_ke3d2_33",Ad="_lg_ke3d2_37",zd="_on_ke3d2_41",Pd="_thumb_ke3d2_45",Od="_label_ke3d2_55",rt={toggleWrapper:Sd,disabled:Ld,hiddenInput:Md,track:Dd,sm:Bd,md:Rd,lg:Ad,on:zd,thumb:Pd,label:Od},kn={sm:"0.75rem",md:"1rem",lg:"1.25rem"},Wd={sm:"0.75rem",md:"1rem",lg:"1.25rem"},Hd=({checked:n,onChange:t,label:s,disabled:o=!1,size:a="md",className:i=""})=>e.jsxs("label",{className:[rt.toggleWrapper,o?rt.disabled:"",i].filter(Boolean).join(" "),children:[e.jsx("input",{type:"checkbox",role:"switch",className:rt.hiddenInput,checked:n,disabled:o,onChange:l=>t(l.target.checked)}),e.jsx("span",{className:[rt.track,rt[a],n?rt.on:""].filter(Boolean).join(" "),children:e.jsx("span",{className:rt.thumb,style:{width:kn[a],height:kn[a],transform:n?`translateX(${Wd[a]})`:"translateX(0)"}})}),s&&e.jsx("span",{className:rt.label,children:s})]}),qd="_form_1cylw_1",Fd="_form_sm_1cylw_10",Gd="_form_md_1cylw_15",Vd="_form_lg_1cylw_20",Kd="_header_1cylw_25",Ud="_headerBadge_1cylw_33",Yd="_headerTitle_1cylw_47",Qd="_headerDesc_1cylw_56",Xd="_section_1cylw_63",Jd="_sectionHead_1cylw_74",Zd="_sectionTitle_1cylw_93",eu="_sectionDesc_1cylw_102",tu="_sectionBody_1cylw_109",nu="_section_split_1cylw_116",su="_row_1cylw_130",ou="_row_sm_1cylw_139",ru="_row_md_1cylw_143",au="_row_lg_1cylw_147",iu="_row_align_start_1cylw_151",cu="_row_align_center_1cylw_155",lu="_row_align_end_1cylw_159",du="_field_1cylw_163",uu="_fieldLabel_1cylw_170",hu="_fieldRequired_1cylw_180",pu="_fieldControl_1cylw_186",_u="_fieldDesc_1cylw_191",fu="_fieldError_1cylw_198",mu="_field_error_1cylw_217",vu="_actions_1cylw_221",xu="_actions_divider_1cylw_229",gu="_actions_left_1cylw_235",bu="_actions_right_1cylw_239",yu="_actions_center_1cylw_243",wu="_actions_between_1cylw_247",xe={form:qd,form_sm:Fd,form_md:Gd,form_lg:Vd,header:Kd,headerBadge:Ud,headerTitle:Yd,headerDesc:Qd,section:Xd,sectionHead:Jd,sectionTitle:Zd,sectionDesc:eu,sectionBody:tu,section_split:nu,row:su,row_sm:ou,row_md:ru,row_lg:au,row_align_start:iu,row_align_center:cu,row_align_end:lu,field:du,fieldLabel:uu,fieldRequired:hu,fieldControl:pu,fieldDesc:_u,fieldError:fu,field_error:mu,actions:vu,actions_divider:xu,actions_left:gu,actions_right:bu,actions_center:yu,actions_between:wu},Zn=r.createContext({}),ju=()=>r.useContext(Zn),vt=(...n)=>n.filter(Boolean).join(" "),jt=({children:n,disabled:t=!1,size:s="md",layout:o="vertical",maxWidth:a,className:i="",style:l,...c})=>e.jsx(Zn.Provider,{value:{disabled:t,size:s,layout:o},children:e.jsx("form",{className:vt(xe.form,xe[`form_${s}`],xe[`form_${o}`],i),style:a!==void 0?{maxWidth:a,...l}:l,...c,children:n})}),ku=({title:n,description:t,badge:s,children:o,className:a=""})=>e.jsxs("header",{className:vt(xe.header,a),children:[s&&e.jsx("div",{className:xe.headerBadge,children:s}),n&&e.jsx("h2",{className:xe.headerTitle,children:n}),t&&e.jsx("p",{className:xe.headerDesc,children:t}),o]}),Nu=({title:n,description:t,variant:s="stacked",children:o,className:a=""})=>e.jsxs("section",{className:vt(xe.section,xe[`section_${s}`],a),children:[(n||t)&&e.jsxs("div",{className:xe.sectionHead,children:[n&&e.jsx("h3",{className:xe.sectionTitle,children:n}),t&&e.jsx("p",{className:xe.sectionDesc,children:t})]}),e.jsx("div",{className:xe.sectionBody,children:o})]}),Eu=({children:n,gap:t="md",align:s="start",className:o=""})=>e.jsx("div",{className:vt(xe.row,xe[`row_${t}`],xe[`row_align_${s}`],o),children:n}),Tu=({children:n,label:t,description:s,error:o,required:a,htmlFor:i,className:l=""})=>{const c=r.useId(),p=i??`evo-field-${c}`;return t||s||o?e.jsxs("div",{className:vt(xe.field,o?xe.field_error:"",l),children:[t&&e.jsxs("label",{htmlFor:p,className:xe.fieldLabel,children:[t,a&&e.jsx("span",{className:xe.fieldRequired,"aria-hidden":"true",children:"*"})]}),e.jsx("div",{className:xe.fieldControl,children:n}),o?e.jsx("p",{className:xe.fieldError,role:"alert",children:o}):s?e.jsx("p",{className:xe.fieldDesc,children:s}):null]}):e.jsx("div",{className:vt(xe.field,l),children:n})},Iu=({children:n,align:t="right",divider:s=!0,className:o=""})=>e.jsx("div",{className:vt(xe.actions,xe[`actions_${t}`],s?xe.actions_divider:"",o),children:n});jt.Header=ku;jt.Section=Nu;jt.Row=Eu;jt.Field=Tu;jt.Actions=Iu;const $u="_overlay_118t4_19",Cu="_overlayFadeIn_118t4_1",Su="_dialog_118t4_32",Lu="_dialogSlideUp_118t4_1",Mu="_sm_118t4_45",Du="_md_118t4_48",Bu="_lg_118t4_51",Ru="_fullscreen_118t4_54",Au="_header_118t4_60",zu="_headerContent_118t4_70",Pu="_closeBtn_118t4_78",Ou="_body_118t4_98",Wu="_footer_118t4_108",it={overlay:$u,overlayFadeIn:Cu,dialog:Su,dialogSlideUp:Lu,sm:Mu,md:Du,lg:Bu,fullscreen:Ru,header:Au,headerContent:zu,closeBtn:Pu,body:Ou,footer:Wu},Hu=({children:n,onClose:t})=>e.jsxs("div",{className:it.header,children:[e.jsx("div",{className:it.headerContent,children:n}),t&&e.jsx("button",{className:it.closeBtn,onClick:t,"aria-label":"Close modal",children:"✕"})]}),qu=({children:n})=>e.jsx("div",{className:it.body,children:n}),Fu=({children:n})=>e.jsx("div",{className:it.footer,children:n}),Rt=({open:n,onClose:t,children:s,size:o="md",className:a=""})=>(r.useEffect(()=>{if(n)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[n]),r.useEffect(()=>{if(!n)return;const i=l=>{l.key==="Escape"&&t()};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[n,t]),n?Nn.createPortal(e.jsx("div",{className:it.overlay,onClick:i=>{i.target===i.currentTarget&&t()},children:e.jsx("div",{className:[it.dialog,it[o],a].filter(Boolean).join(" "),role:"dialog","aria-modal":"true",children:s})}),document.body):null);Rt.Header=Hu;Rt.Body=qu;Rt.Footer=Fu;const Gu="_toasterRoot_izzak_61",Vu="_srOnly_izzak_68",Ku="_anchor_izzak_80",Uu="_overflowPill_izzak_145",Yu="_toast_izzak_61",Qu="_evoToastEnterRight_izzak_1",Xu="_evoToastEnterLeft_izzak_1",Ju="_evoToastEnterTop_izzak_1",Zu="_evoToastEnterBottom_izzak_1",eh="_exiting_izzak_207",th="_evoToastExit_izzak_1",nh="_noMotion_izzak_211",sh="_toastIcon_izzak_227",oh="_toastBody_izzak_269",rh="_toastTitle_izzak_274",ah="_toastDescription_izzak_279",ih="_toastCount_izzak_285",ch="_toastProgressTrack_izzak_303",lh="_toastProgressFill_izzak_315",dh="_toastAction_izzak_348",uh="_toastClose_izzak_371",hh="_bellWrapper_izzak_392",ph="_bell_izzak_392",_h="_bellOpen_izzak_442",fh="_bellBadge_izzak_446",mh="_bellBadgeZero_izzak_465",vh="_bellPanelHost_izzak_470",xh="_panel_izzak_514",gh="_evoPanelEnter_izzak_1",bh="_panelHeader_izzak_532",yh="_panelTitle_izzak_541",wh="_panelHeaderActions_izzak_546",jh="_panelMarkAll_izzak_552",kh="_panelClose_izzak_572",Nh="_panelBody_izzak_591",Eh="_panelState_izzak_595",Th="_panelStateError_izzak_605",Ih="_itemList_izzak_609",$h="_emptyState_izzak_621",Ch="_emptyIcon_izzak_630",Sh="_emptyTitle_izzak_641",Lh="_emptyHint_izzak_647",Mh="_item_izzak_609",Dh="_itemUnread_izzak_661",Bh="_itemInteractive_izzak_665",Rh="_itemUnreadDot_izzak_676",Ah="_itemMedia_izzak_690",zh="_itemAvatar_izzak_716",Ph="_itemMediaGlyph_izzak_722",Oh="_itemBody_izzak_726",Wh="_itemTitle_izzak_731",Hh="_itemDescription_izzak_738",qh="_itemMeta_izzak_749",Fh="_itemTimestamp_izzak_758",Gh="_itemAction_izzak_762",Vh="_itemDismiss_izzak_782",O={toasterRoot:Gu,srOnly:Vu,anchor:Ku,"anchor-top-left":"_anchor-top-left_izzak_94","anchor-top-center":"_anchor-top-center_izzak_101","anchor-top-right":"_anchor-top-right_izzak_109","anchor-bottom-left":"_anchor-bottom-left_izzak_116","anchor-bottom-center":"_anchor-bottom-center_izzak_122","anchor-bottom-right":"_anchor-bottom-right_izzak_129",overflowPill:Uu,toast:Yu,evoToastEnterRight:Qu,evoToastEnterLeft:Xu,evoToastEnterTop:Ju,evoToastEnterBottom:Zu,exiting:eh,evoToastExit:th,noMotion:nh,"sev-success":"_sev-success_izzak_224",toastIcon:sh,"sev-error":"_sev-error_izzak_232","sev-warning":"_sev-warning_izzak_240","sev-info":"_sev-info_izzak_248",toastBody:oh,toastTitle:rh,toastDescription:ah,toastCount:ih,toastProgressTrack:ch,toastProgressFill:lh,toastAction:dh,toastClose:uh,bellWrapper:hh,bell:ph,"bell-ghost":"_bell-ghost_izzak_418","bell-solid":"_bell-solid_izzak_422","bell-sm":"_bell-sm_izzak_427","bell-md":"_bell-md_izzak_432","bell-lg":"_bell-lg_izzak_437",bellOpen:_h,bellBadge:fh,bellBadgeZero:mh,bellPanelHost:vh,"place-bottom-end":"_place-bottom-end_izzak_488","place-bottom-start":"_place-bottom-start_izzak_493","place-bottom":"_place-bottom_izzak_488","place-top-end":"_place-top-end_izzak_504","place-top-start":"_place-top-start_izzak_509",panel:xh,evoPanelEnter:gh,panelHeader:bh,panelTitle:yh,panelHeaderActions:wh,panelMarkAll:jh,panelClose:kh,panelBody:Nh,panelState:Eh,panelStateError:Th,itemList:Ih,emptyState:$h,emptyIcon:Ch,emptyTitle:Sh,emptyHint:Lh,item:Mh,itemUnread:Dh,itemInteractive:Bh,itemUnreadDot:Rh,itemMedia:Ah,itemAvatar:zh,itemMediaGlyph:Ph,itemBody:Oh,itemTitle:Wh,itemDescription:Hh,itemMeta:qh,itemTimestamp:Fh,itemAction:Gh,itemDismiss:Vh},es={defaultAnchor:"top-right",defaultDuration:4e3,maxVisible:3,pauseOnFocusLoss:!0,persistErrors:!1},Kh=180,Uh=Object.freeze([]),Yh=Object.freeze({items:Object.freeze([]),unread:0});class Qh{constructor(){this.toasts=[],this.inboxItems=[],this.inboxSnapshot={items:[],unread:0},this.inboxOwnedExternally=!1,this.inboxOnChange=null,this.toastListeners=new Set,this.inboxListeners=new Set,this.configListeners=new Set,this.config=es,this.counter=0}setConfig(t){const s={...this.config,...t};Object.keys(s).some(a=>s[a]!==this.config[a])&&(this.config=s,this.notifyConfig())}getConfig(){return this.config}subscribeConfig(t){return this.configListeners.add(t),()=>{this.configListeners.delete(t)}}notifyConfig(){this.configListeners.forEach(t=>t())}resolveDuration(t,s){return t.persistent===!0?1/0:t.duration!=null?t.duration:s==="error"&&this.config.persistErrors&&t.persistent!==!1?1/0:this.config.defaultDuration}bindExternalInbox(t,s){t!==void 0?(this.inboxOwnedExternally=!0,this.inboxItems=t,this.inboxOnChange=s??null,this.refreshInboxSnapshot(),this.notifyInbox()):(this.inboxOwnedExternally=!1,this.inboxOnChange=null)}refreshInboxSnapshot(){let t=0;for(const s of this.inboxItems)s.read||(t+=1);this.inboxSnapshot={items:this.inboxItems,unread:t}}nextId(){return this.counter+=1,`evo-${Date.now().toString(36)}-${this.counter}`}pushToast(t,s={}){const o=s.severity??"info";if(s.groupKey!=null&&s.id==null){const c=this.toasts.find(p=>p.groupKey===s.groupKey&&!p.exiting);if(c)return this.toasts=this.toasts.map(p=>p.id===c.id?{...p,...s,id:c.id,severity:o,duration:this.resolveDuration(s,o),message:t,count:p.count+1,restartKey:p.restartKey+1}:p),this.applyInboxSideEffect(c.id,t,s),this.notifyToasts(),c.id}const a=s.id??this.nextId(),i=this.resolveDuration(s,o);if(this.toasts.find(c=>c.id===a))this.toasts=this.toasts.map(c=>c.id===a?{...c,...s,id:a,severity:o,duration:i,message:t,restartKey:c.restartKey+1,exiting:!1}:c);else{const c={...s,id:a,severity:o,duration:i,message:t,createdAt:Date.now(),count:1,restartKey:0};this.toasts=[...this.toasts,c]}return this.applyInboxSideEffect(a,t,s),this.notifyToasts(),a}applyInboxSideEffect(t,s,o){if(!o.inbox)return;const a={id:`${t}-inbox`,title:o.title??s,description:o.description,severity:o.severity??"info",icon:o.icon,action:o.action,...typeof o.inbox=="object"?o.inbox:{}};this.pushInbox(a)}updateToast(t,s){const o=this.toasts.findIndex(l=>l.id===t);if(o===-1)return;const a=this.toasts[o],i={...a,...s,id:t,severity:s.severity??a.severity,message:"title"in s&&s.title!=null?s.title:a.message,restartKey:a.restartKey+1};s.persistent===!0?i.duration=1/0:s.duration!=null?i.duration=s.duration:s.persistent===!1&&(i.duration=this.resolveDuration({...s,persistent:!1},i.severity)),this.toasts=this.toasts.map(l=>l.id===t?i:l),this.notifyToasts()}dismissToast(t,s="dismiss"){var a,i;if(t==null){const l=this.toasts.filter(c=>!c.exiting);if(l.length===0)return;l.forEach(c=>{var p;return(p=c.onDismiss)==null?void 0:p.call(c,c.id)}),this.toasts=this.toasts.map(c=>c.exiting?c:{...c,exiting:!0}),this.notifyToasts();return}const o=this.toasts.find(l=>l.id===t);!o||o.exiting||(s==="auto"?(a=o.onAutoClose)==null||a.call(o,t):(i=o.onDismiss)==null||i.call(o,t),this.toasts=this.toasts.map(l=>l.id===t?{...l,exiting:!0}:l),this.notifyToasts())}removeToast(t){const s=this.toasts.length;this.toasts=this.toasts.filter(o=>o.id!==t),this.toasts.length!==s&&this.notifyToasts()}getToasts(){return this.toasts}subscribeToasts(t){return this.toastListeners.add(t),()=>{this.toastListeners.delete(t)}}notifyToasts(){this.toastListeners.forEach(t=>t(this.toasts))}pushInbox(t){const s=t.id??this.nextId(),o=t.timestamp instanceof Date?t.timestamp.getTime():t.timestamp??Date.now(),a={id:s,title:t.title,description:t.description,severity:t.severity??"info",icon:t.icon,avatarUrl:t.avatarUrl,timestamp:o,read:t.read??!1,action:t.action,onClick:t.onClick,meta:t.meta},l=this.inboxItems.findIndex(c=>c.id===s)===-1?[a,...this.inboxItems]:this.inboxItems.map(c=>c.id===s?a:c);if(this.commitInbox(l),t.toast){const c={id:`${s}-toast`,title:a.title,description:a.description,severity:a.severity,icon:a.icon,action:a.action,...typeof t.toast=="object"?t.toast:{}};this.pushToast(a.title,c)}return s}markRead(t){this.commitInbox(this.inboxItems.map(s=>s.id===t?{...s,read:!0}:s))}markUnread(t){this.commitInbox(this.inboxItems.map(s=>s.id===t?{...s,read:!1}:s))}markAllRead(){this.commitInbox(this.inboxItems.map(t=>t.read?t:{...t,read:!0}))}removeInbox(t){this.commitInbox(this.inboxItems.filter(s=>s.id!==t))}clearInbox(){this.commitInbox([])}setInboxItems(t){this.commitInbox(t)}getInboxState(){return this.inboxSnapshot}subscribeInbox(t){return this.inboxListeners.add(t),()=>{this.inboxListeners.delete(t)}}commitInbox(t){var s;this.inboxItems=t,this.refreshInboxSnapshot(),this.inboxOwnedExternally&&((s=this.inboxOnChange)==null||s.call(this,t)),this.notifyInbox()}notifyInbox(){const t=this.inboxSnapshot;this.inboxListeners.forEach(s=>s(t))}}const re=new Qh,Xh=(n,t)=>re.pushToast(n,t),Ze=Xh;Ze.success=(n,t)=>re.pushToast(n,{...t,severity:"success"});Ze.error=(n,t)=>re.pushToast(n,{...t,severity:"error"});Ze.warning=(n,t)=>re.pushToast(n,{...t,severity:"warning"});Ze.info=(n,t)=>re.pushToast(n,{...t,severity:"info"});Ze.loading=(n,t)=>re.pushToast(n,{...t,severity:"info",persistent:!0,dismissible:!1});Ze.update=(n,t)=>re.updateToast(n,t);Ze.dismiss=n=>re.dismissToast(n);Ze.promise=(n,t)=>{const s=re.pushToast(typeof t.loading=="object"&&t.loading!==null&&!St(t.loading)?t.loading.title??"":t.loading,{...typeof t.loading=="object"&&!St(t.loading)?t.loading:{},severity:"info",persistent:!0,dismissible:!1});return(typeof n=="function"?n():n).then(a=>{const i=typeof t.success=="function"?t.success(a):t.success,l=i!==null&&typeof i=="object"&&!St(i),c=l?i:{},p=l?c.title??"":i;re.updateToast(s,{...c,severity:"success",persistent:!1,dismissible:!0,title:p})},a=>{const i=typeof t.error=="function"?t.error(a):t.error,l=i!==null&&typeof i=="object"&&!St(i),c=l?i:{},p=l?c.title??"":i;re.updateToast(s,{...c,severity:"error",persistent:!1,dismissible:!0,title:p})}),s};Ze.progress=(n,t)=>{const s=re.pushToast(n,{...t,severity:(t==null?void 0:t.severity)??"info",persistent:!0,dismissible:(t==null?void 0:t.dismissible)??!1,progress:Gt((t==null?void 0:t.progress)??0)});return{id:s,setProgress:o=>re.updateToast(s,{progress:Gt(o)}),update:o=>re.updateToast(s,o),done:o=>re.updateToast(s,{...o,severity:(o==null?void 0:o.severity)??"success",progress:1,persistent:!1,dismissible:!0}),fail:o=>re.updateToast(s,{...o,severity:(o==null?void 0:o.severity)??"error",persistent:!1,dismissible:!0}),dismiss:()=>re.dismissToast(s)}};function St(n){if(n==null)return!0;const t=typeof n;return!!(t==="string"||t==="number"||t==="boolean"||Array.isArray(n)||t==="object"&&n!==null&&"$$typeof"in n)}function Gt(n){return typeof n!="number"||Number.isNaN(n)||n<0?0:n>1?1:n}const Jh={toast:Ze,push:n=>re.pushInbox(n),inbox:{markRead:n=>re.markRead(n),markUnread:n=>re.markUnread(n),markAllRead:()=>re.markAllRead(),remove:n=>re.removeInbox(n),clear:()=>re.clearInbox(),setItems:n=>re.setInboxItems(n),getState:()=>re.getInboxState(),subscribe:n=>re.subscribeInbox(n)},dismissAll:()=>re.dismissToast()};function Xe(...n){return n.filter(Boolean).join(" ")}const ts={success:"✓",error:"✕",warning:"!",info:"i"};function Zh(n,t){const s=Math.max(0,t-n),o=Math.floor(s/1e3);if(o<60)return"just now";const a=Math.floor(o/60);if(a<60)return`${a}m ago`;const i=Math.floor(a/60);if(i<24)return`${i}h ago`;const l=Math.floor(i/24);return l<7?`${l}d ago`:new Date(n).toLocaleDateString()}function ns(n){const t=[],s=n.title??n.message;return(typeof s=="string"||typeof s=="number")&&t.push(String(s)),(typeof n.description=="string"||typeof n.description=="number")&&t.push(String(n.description)),t.join(". ")}function ep(){return r.useSyncExternalStore(n=>re.subscribeToasts(()=>n()),()=>re.getToasts(),()=>Uh)}function rn(){return r.useSyncExternalStore(n=>re.subscribeInbox(()=>n()),()=>re.getInboxState(),()=>Yh)}function tp(){return r.useSyncExternalStore(n=>re.subscribeConfig(n),()=>re.getConfig(),()=>es)}const an=({children:n,defaultAnchor:t="top-right",maxVisible:s=3,defaultDuration:o=4e3,pauseOnFocusLoss:a=!0,persistErrors:i=!1,inboxItems:l,onInboxChange:c})=>(r.useLayoutEffect(()=>{re.setConfig({defaultAnchor:t,maxVisible:s,defaultDuration:o,pauseOnFocusLoss:a,persistErrors:i})},[t,s,o,a,i]),r.useLayoutEffect(()=>{re.bindExternalInbox(l,c)},[l,c]),e.jsx(e.Fragment,{children:n}));an.displayName="EvoNotificationProvider";const np=({toast:n,anchor:t,index:s,total:o,hovered:a,pausedExternally:i,reducedMotion:l})=>{const c=r.useRef(0),p=r.useRef(null),v=r.useRef(null),b=r.useRef(n.restartKey),_=n.exiting??!1,x=a||i,N=Number.isFinite(n.duration);r.useEffect(()=>{if(!_)return;const y=window.setTimeout(()=>re.removeToast(n.id),l?0:Kh);return()=>window.clearTimeout(y)},[_,l,n.id]),r.useEffect(()=>{if(b.current!==n.restartKey&&(b.current=n.restartKey,c.current=0),!N||_)return;if(x){p.current!=null&&(c.current+=Date.now()-p.current,p.current=null),v.current!=null&&(window.clearTimeout(v.current),v.current=null);return}const y=Math.max(0,n.duration-c.current);return p.current=Date.now(),v.current=window.setTimeout(()=>re.dismissToast(n.id,"auto"),y),()=>{v.current!=null&&(window.clearTimeout(v.current),v.current=null),p.current!=null&&(c.current+=Date.now()-p.current,p.current=null)}},[x,N,_,n.duration,n.restartKey,n.id]);const w=o-1-s,C=a?1:Math.max(.94,1-w*.04),E=a?w*8:w*6,D=a?1:Math.max(.7,1-w*.15),V=t.startsWith("bottom")?1:-1,H={transform:`translateY(${E*V}px) scale(${C})`,opacity:D,zIndex:1e3+s},ue=n.dismissible??!0,j=n.icon??ts[n.severity],M=n.title??n.message,B=ns(n),S=typeof n.progress=="number",se=S?Gt(n.progress):0,Q=B!=="";return e.jsxs("div",{className:Xe(O.toast,O[`sev-${n.severity}`],_&&O.exiting,l&&O.noMotion,n.className),style:H,role:Q?"group":n.severity==="error"?"alert":"status","aria-label":Q?B:void 0,children:[e.jsx("span",{className:O.toastIcon,"aria-hidden":"true",children:j}),e.jsxs("div",{className:O.toastBody,children:[M!=null&&e.jsxs("div",{className:O.toastTitle,children:[M,n.count>1&&e.jsxs("span",{className:O.toastCount,"aria-label":`repeated ${n.count} times`,children:["×",n.count]})]}),n.description!=null&&e.jsx("div",{className:O.toastDescription,children:n.description})]}),n.action&&e.jsx("button",{type:"button",className:O.toastAction,onClick:y=>{n.action.onClick(y),re.dismissToast(n.id)},children:n.action.label}),ue&&e.jsx("button",{type:"button",className:O.toastClose,onClick:()=>{re.dismissToast(n.id)},"aria-label":"Dismiss notification",children:"✕"}),S&&e.jsx("div",{className:O.toastProgressTrack,role:"progressbar","aria-valuemin":0,"aria-valuemax":1,"aria-valuenow":se,children:e.jsx("div",{className:O.toastProgressFill,style:{transform:`scaleX(${se})`}})})]})},sp=["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"];let Nt=null;const cn=({anchor:n,className:t})=>{const s=ep(),{defaultAnchor:o,maxVisible:a,pauseOnFocusLoss:i}=tp(),l=n??o,[c,p]=r.useState(null),[v,b]=r.useState(!0),[_,x]=r.useState(!1),[N,w]=r.useState(!1),[C,E]=r.useState(!1),[D,V]=r.useState(""),[H,ue]=r.useState(""),j=r.useRef(new Set),M=r.useRef(null);if(M.current||(M.current=Symbol("evo-toaster")),r.useEffect(()=>{const S=M.current;return Nt==null?(Nt=S,E(!0)):Nt!==S&&console.warn("[EvoNotification] More than one <EvoNotificationToaster> is mounted; only the first renders. Remove the duplicate(s)."),()=>{Nt===S&&(Nt=null)}},[]),r.useEffect(()=>{var Q;if(w(!0),typeof window>"u")return;const S=window.matchMedia("(prefers-reduced-motion: reduce)");x(S.matches);const se=y=>x(y.matches);return(Q=S.addEventListener)==null||Q.call(S,"change",se),()=>{var y;return(y=S.removeEventListener)==null?void 0:y.call(S,"change",se)}},[]),r.useEffect(()=>{if(!i)return;const S=()=>b(!0),se=()=>b(!1);return window.addEventListener("focus",S),window.addEventListener("blur",se),()=>{window.removeEventListener("focus",S),window.removeEventListener("blur",se)}},[i]),r.useEffect(()=>{const S=j.current,se=new Set;for(const Q of s){if(se.add(Q.id),S.has(Q.id)||Q.exiting)continue;S.add(Q.id);const y=ns(Q);y&&(Q.severity==="error"?ue(y):V(y))}for(const Q of S)se.has(Q)||S.delete(Q)},[s]),r.useEffect(()=>{const S=se=>{if(se.key==="Escape"&&c!=null){const Q=s.filter(y=>!y.exiting&&(y.anchor??l)===c);Q.length>0&&re.dismissToast(Q[Q.length-1].id)}};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[s,l,c]),!N||typeof document>"u"||!C)return null;const B={"top-left":[],"top-center":[],"top-right":[],"bottom-left":[],"bottom-center":[],"bottom-right":[]};for(const S of s){const se=S.anchor??l;B[se].push(S)}return Nn.createPortal(e.jsxs("div",{className:Xe(O.toasterRoot,t),"aria-label":"Notifications",children:[e.jsx("div",{className:O.srOnly,"aria-live":"polite","aria-atomic":"true",children:D}),e.jsx("div",{className:O.srOnly,"aria-live":"assertive","aria-atomic":"true",children:H}),sp.map(S=>{const se=B[S];if(se.length===0)return null;const Q=Math.max(0,se.length-a),y=se.slice(Math.max(0,se.length-a)),te=c===S,R=!v;return e.jsxs("div",{className:Xe(O.anchor,O[`anchor-${S}`]),onMouseEnter:()=>p(S),onMouseLeave:()=>p(null),onFocus:()=>p(S),onBlur:he=>{he.currentTarget.contains(he.relatedTarget)||p(null)},children:[Q>0&&e.jsxs("div",{className:O.overflowPill,"aria-hidden":"true",children:["+",Q," more"]}),y.map((he,$)=>e.jsx(np,{toast:he,anchor:S,index:$,total:y.length,hovered:te,pausedExternally:R,reducedMotion:_},he.id))]},S)})]}),document.body)};cn.displayName="EvoNotificationToaster";const ln=r.forwardRef(function({variant:t="ghost",size:s="md",hideZero:o=!0,maxBadgeCount:a=99,panelPlacement:i="bottom-end",renderPanel:l="popover",panelTitle:c,panelEmptyState:p,className:v,onClick:b,..._},x){const{unread:N}=rn(),[w,C]=r.useState(!1),E=r.useRef(null),D=r.useId();r.useEffect(()=>{if(!w||l!=="popover")return;const ue=M=>{var B;(B=E.current)!=null&&B.contains(M.target)||C(!1)},j=M=>{M.key==="Escape"&&C(!1)};return document.addEventListener("mousedown",ue),document.addEventListener("keydown",j),()=>{document.removeEventListener("mousedown",ue),document.removeEventListener("keydown",j)}},[w,l]);const V=N>a?`${a}+`:String(N),H=N>0||!o;return e.jsxs("div",{ref:E,className:O.bellWrapper,children:[e.jsxs("button",{ref:x,type:"button",className:Xe(O.bell,O[`bell-${t}`],O[`bell-${s}`],w&&O.bellOpen,v),"aria-label":N>0?`Notifications, ${N} unread`:"Notifications","aria-haspopup":l==="popover"?"dialog":void 0,"aria-expanded":l==="popover"?w:void 0,"aria-controls":l==="popover"?D:void 0,onClick:ue=>{b==null||b(ue),l==="popover"&&C(j=>!j)},..._,children:[e.jsx(ss,{}),H&&e.jsx("span",{className:Xe(O.bellBadge,N===0&&O.bellBadgeZero),children:V})]}),l==="popover"&&w&&e.jsx("div",{id:D,className:Xe(O.bellPanelHost,O[`place-${i}`]),children:e.jsx(At,{open:!0,onClose:()=>C(!1),title:c,emptyState:p})})]})});ln.displayName="EvoNotificationBell";const ss=()=>e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 8 3 8H3s3-1 3-8"}),e.jsx("path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0"})]}),At=r.forwardRef(function({open:t=!0,onClose:s,title:o="Notifications",emptyState:a,loading:i=!1,error:l,showMarkAllRead:c=!0,maxHeight:p=480,className:v,style:b,..._},x){const{items:N,unread:w}=rn();return t?e.jsxs("div",{ref:x,className:Xe(O.panel,v),role:"dialog","aria-label":typeof o=="string"?o:"Notifications",style:b,..._,children:[e.jsxs("header",{className:O.panelHeader,children:[e.jsx("div",{className:O.panelTitle,children:o}),e.jsxs("div",{className:O.panelHeaderActions,children:[c&&w>0&&e.jsx("button",{type:"button",className:O.panelMarkAll,onClick:()=>re.markAllRead(),children:"Mark all read"}),s&&e.jsx("button",{type:"button",className:O.panelClose,onClick:s,"aria-label":"Close notifications",children:"✕"})]})]}),e.jsx("div",{className:O.panelBody,style:{maxHeight:typeof p=="number"?`${p}px`:p},children:i?e.jsx("div",{className:O.panelState,children:"Loading…"}):l?e.jsx("div",{className:Xe(O.panelState,O.panelStateError),children:l}):N.length===0?e.jsx("div",{className:O.panelState,children:a??e.jsx(op,{})}):e.jsx("ul",{className:O.itemList,children:N.map(C=>e.jsx("li",{children:e.jsx(zt,{item:C})},C.id))})})]}):null});At.displayName="EvoNotificationPanel";const op=()=>e.jsxs("div",{className:O.emptyState,children:[e.jsx("div",{className:O.emptyIcon,"aria-hidden":"true",children:e.jsx(ss,{})}),e.jsx("div",{className:O.emptyTitle,children:"You're all caught up"}),e.jsx("div",{className:O.emptyHint,children:"New notifications will appear here."})]}),zt=r.forwardRef(function({item:t,onClick:s,className:o,...a},i){const[l,c]=r.useState(t.timestamp);r.useEffect(()=>{c(Date.now());const x=window.setInterval(()=>c(Date.now()),6e4);return()=>window.clearInterval(x)},[]);const p=r.useCallback(()=>{var x;(x=s??t.onClick)==null||x(t),t.read||re.markRead(t.id)},[t,s]),v=r.useCallback(x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),p())},[p]),b=!!(s??t.onClick),_=t.icon??ts[t.severity];return e.jsxs("div",{ref:i,className:Xe(O.item,!t.read&&O.itemUnread,b&&O.itemInteractive,o),role:b?"button":"group",tabIndex:b?0:void 0,onClick:b?p:void 0,onKeyDown:b?v:void 0,...a,children:[e.jsx("span",{className:O.itemUnreadDot,"aria-hidden":t.read}),e.jsx("div",{className:Xe(O.itemMedia,O[`sev-${t.severity}`]),"aria-hidden":"true",children:t.avatarUrl?e.jsx("img",{src:t.avatarUrl,alt:"",className:O.itemAvatar}):e.jsx("span",{className:O.itemMediaGlyph,children:_})}),e.jsxs("div",{className:O.itemBody,children:[e.jsx("div",{className:O.itemTitle,children:t.title}),t.description!=null&&e.jsx("div",{className:O.itemDescription,children:t.description}),e.jsxs("div",{className:O.itemMeta,children:[e.jsx("span",{className:O.itemTimestamp,children:Zh(t.timestamp,l)}),t.action&&e.jsx("button",{type:"button",className:O.itemAction,onClick:x=>{x.stopPropagation(),t.action.onClick(x)},children:t.action.label})]})]}),e.jsx("button",{type:"button",className:O.itemDismiss,onClick:x=>{x.stopPropagation(),re.removeInbox(t.id)},"aria-label":"Remove notification",children:"✕"})]})});zt.displayName="EvoNotificationItem";function rp(){return rn()}const ap={Provider:an,Toaster:cn,Bell:ln,Panel:At,Item:zt},ip="_wrapper_1fxx0_11",cp="_tooltip_1fxx0_17",lp="_tooltipFadeIn_1fxx0_1",dp="_top_1fxx0_33",up="_bottom_1fxx0_38",hp="_left_1fxx0_43",pp="_right_1fxx0_48",_p="_arrow_1fxx0_54",Lt={wrapper:ip,tooltip:cp,tooltipFadeIn:lp,top:dp,bottom:up,left:hp,right:pp,arrow:_p},fp=({content:n,children:t,placement:s="top",className:o=""})=>{const[a,i]=r.useState(!1);return e.jsxs("span",{className:`${Lt.wrapper} ${o}`,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onFocus:()=>i(!0),onBlur:()=>i(!1),children:[t,a&&e.jsxs("span",{className:`${Lt.tooltip} ${Lt[s]}`,role:"tooltip",children:[n,e.jsx("span",{className:Lt.arrow})]})]})},mp="_alert_slsq7_1",vp="_success_slsq7_10",xp="_alertIcon_slsq7_14",gp="_alertTitle_slsq7_17",bp="_error_slsq7_20",yp="_warning_slsq7_30",wp="_info_slsq7_40",jp="_alertContent_slsq7_65",kp="_alertDescription_slsq7_76",Np="_dismissBtn_slsq7_83",pt={alert:mp,success:vp,alertIcon:xp,alertTitle:gp,error:bp,warning:yp,info:wp,alertContent:jp,alertDescription:kp,dismissBtn:Np},Ep={success:"✓",error:"✕",warning:"⚠",info:"i"},Tp=({type:n="info",title:t,children:s,dismissible:o=!1,className:a=""})=>{const[i,l]=r.useState(!1);return i?null:e.jsxs("div",{className:[pt.alert,pt[n],a].filter(Boolean).join(" "),role:"alert",children:[e.jsx("span",{className:pt.alertIcon,children:Ep[n]}),e.jsxs("div",{className:pt.alertContent,children:[t&&e.jsx("p",{className:pt.alertTitle,children:t}),e.jsx("div",{className:pt.alertDescription,children:s})]}),o&&e.jsx("button",{className:pt.dismissBtn,onClick:()=>l(!0),"aria-label":"Dismiss alert",children:"✕"})]})},Ip="_badge_nypvn_1",$p="_sm_nypvn_12",Cp="_md_nypvn_16",Sp="_lg_nypvn_20",Lp="_solid_nypvn_25",Mp="_primary_nypvn_25",Dp="_secondary_nypvn_30",Bp="_success_nypvn_35",Rp="_warning_nypvn_40",Ap="_danger_nypvn_45",zp="_info_nypvn_50",Pp="_outline_nypvn_56",Op="_subtle_nypvn_84",Wp="_dot_nypvn_115",Hp="_removeBtn_nypvn_123",qp="_badgeGroup_nypvn_142",ft={badge:Ip,sm:$p,md:Cp,lg:Sp,solid:Lp,primary:Mp,secondary:Dp,success:Bp,warning:Rp,danger:Ap,info:zp,outline:Pp,subtle:Op,dot:Wp,removeBtn:Hp,badgeGroup:qp},Fp=({children:n,className:t=""})=>e.jsx("div",{className:`${ft.badgeGroup} ${t}`,children:n}),os=({children:n,severity:t="primary",variant:s="solid",size:o="md",dot:a=!1,removable:i=!1,onRemove:l,className:c=""})=>e.jsxs("span",{className:[ft.badge,ft[t],ft[s],ft[o],c].filter(Boolean).join(" "),children:[a&&e.jsx("span",{className:ft.dot}),n,i&&e.jsx("button",{className:ft.removeBtn,onClick:l,"aria-label":"Remove",children:"✕"})]});os.Group=Fp;const Gp="_skeleton_7wr3a_9",Vp="_animated_7wr3a_14",Kp="_textGroup_7wr3a_20",mt={skeleton:Gp,animated:Vp,textGroup:Kp},Et=n=>typeof n=="number"?`${n}px`:n,Up=({lines:n=3,className:t="",animated:s=!0})=>e.jsx("div",{className:`${mt.textGroup} ${t}`,children:Array.from({length:n}).map((o,a)=>e.jsx("div",{className:[mt.skeleton,s?mt.animated:""].filter(Boolean).join(" "),style:{width:a===n-1?"65%":"100%",height:"0.875rem",borderRadius:"4px"}},a))}),Yp=({size:n=40,className:t="",animated:s=!0})=>e.jsx("div",{className:[mt.skeleton,s?mt.animated:"",t].filter(Boolean).join(" "),style:{width:Et(n),height:Et(n),borderRadius:"50%"}}),dn=({width:n="100%",height:t="1rem",borderRadius:s="6px",className:o="",animated:a=!0})=>e.jsx("div",{className:[mt.skeleton,a?mt.animated:"",o].filter(Boolean).join(" "),style:{width:Et(n),height:Et(t),borderRadius:Et(s)}});dn.Text=Up;dn.Circle=Yp;const Qp="_wrapper_69yee_1",Xp="_scroll_69yee_11",Jp="_table_69yee_30",Zp="_caption_69yee_38",e_="_thead_69yee_46",t_="_th_69yee_46",n_="_sortBtn_69yee_63",s_="_sortIcon_69yee_85",o_="_sortActive_69yee_92",r_="_tbody_69yee_99",a_="_tr_69yee_99",i_="_td_69yee_103",c_="_hoverable_69yee_167",l_="_striped_69yee_171",d_="_bordered_69yee_179",u_="_stickyHeader_69yee_184",h_="_clickable_69yee_195",p_="_empty_69yee_202",__="_emptyText_69yee_209",f_="_skeleton_69yee_213",m_="_evoTableShimmer_69yee_1",v_="_responsiveStack_69yee_237",x_="_emptyRow_69yee_272",ve={wrapper:Qp,scroll:Xp,table:Jp,caption:Zp,thead:e_,th:t_,sortBtn:n_,sortIcon:s_,sortActive:o_,tbody:r_,tr:a_,td:i_,"align-left":"_align-left_69yee_115","align-center":"_align-center_69yee_119","align-right":"_align-right_69yee_123","size-sm":"_size-sm_69yee_137","size-md":"_size-md_69yee_147","size-lg":"_size-lg_69yee_157",hoverable:c_,striped:l_,bordered:d_,stickyHeader:u_,clickable:h_,empty:p_,emptyText:__,skeleton:f_,evoTableShimmer:m_,responsiveStack:v_,emptyRow:x_};function Ht(n,t){return t.split(".").reduce((s,o)=>{if(s!=null&&typeof s=="object")return s[o]},n)}function g_(n,t){return n==null&&t==null?0:n==null?-1:t==null?1:typeof n=="number"&&typeof t=="number"?n-t:String(n).localeCompare(String(t),void 0,{numeric:!0,sensitivity:"base"})}function b_(n,t,s){if(typeof s=="function")return s(n,t);if(s&&n&&typeof n=="object"){const o=n[s];if(typeof o=="string"||typeof o=="number")return o}return t}const y_=({direction:n})=>e.jsxs("svg",{className:ve.sortIcon,width:"8",height:"12",viewBox:"0 0 8 12","aria-hidden":"true",focusable:"false",children:[e.jsx("path",{d:"M4 0 L8 4 H0 Z",fill:"currentColor",opacity:n==="asc"?1:.3}),e.jsx("path",{d:"M4 12 L0 8 H8 Z",fill:"currentColor",opacity:n==="desc"?1:.3})]}),w_=({columns:n,data:t,size:s="md",striped:o=!1,hoverable:a=!0,bordered:i=!1,stickyHeader:l=!1,loading:c=!1,loadingRows:p=5,rowKey:v,emptyState:b,emptyText:_="No data available.",onRowClick:x,onRowDoubleClick:N,getRowClassName:w,responsive:C="scroll",caption:E,sort:D,onSortChange:V,defaultSort:H,className:ue})=>{const j=D!==void 0,[M,B]=r.useState(H??null),S=j?D:M,se=$=>{let P;!S||S.key!==$?P={key:$,direction:"asc"}:S.direction==="asc"?P={key:$,direction:"desc"}:P=null,j||B(P),V==null||V(P)},Q=r.useMemo(()=>{if(!S)return t;const $=n.find(W=>W.key===S.key);if(!$)return t;const P=S.direction,A=[...t];return $.sortFn?A.sort((W,G)=>$.sortFn(W,G,P)):A.sort((W,G)=>{const ae=Ht(W,$.key),ee=Ht(G,$.key),J=g_(ae,ee);return P==="asc"?J:-J}),A},[t,n,S]),y=!!(x||N),te=[ve.wrapper,ve[`size-${s}`],o&&ve.striped,a&&ve.hoverable,i&&ve.bordered,l&&ve.stickyHeader,C==="stack"&&ve.responsiveStack,y&&ve.clickable,ue].filter(Boolean).join(" "),R=$=>{const P=$.align??"left",A=(S==null?void 0:S.key)===$.key,W=A?S.direction:void 0,G=A?W==="asc"?"ascending":"descending":$.sortable?"none":void 0,ae=[ve.th,ve[`align-${P}`],$.headerClassName].filter(Boolean).join(" ");return e.jsx("th",{scope:"col",className:ae,style:$.width?{width:$.width}:void 0,"aria-sort":G,children:$.sortable?e.jsxs("button",{type:"button",className:[ve.sortBtn,A?ve.sortActive:""].filter(Boolean).join(" "),onClick:()=>se($.key),children:[e.jsx("span",{children:$.header}),e.jsx(y_,{direction:W})]}):$.header},$.key)},he=()=>c?Array.from({length:Math.max(1,p)}).map(($,P)=>e.jsx("tr",{className:ve.tr,children:n.map(A=>e.jsx("td",{className:[ve.td,ve[`align-${A.align??"left"}`]].filter(Boolean).join(" "),"data-label":typeof A.header=="string"?A.header:A.key,children:e.jsx("span",{className:ve.skeleton})},A.key))},`evo-skeleton-${P}`)):Q.length===0?e.jsx("tr",{className:ve.emptyRow,children:e.jsx("td",{colSpan:n.length,className:ve.empty,children:b??e.jsx("span",{className:ve.emptyText,children:_})})}):Q.map(($,P)=>{const A=[ve.tr,w==null?void 0:w($,P)].filter(Boolean).join(" ");return e.jsx("tr",{className:A,onClick:x?()=>x($,P):void 0,onDoubleClick:N?()=>N($,P):void 0,children:n.map(W=>{const G=Ht($,W.key),ae=W.align??"left",ee=[ve.td,ve[`align-${ae}`],W.cellClassName].filter(Boolean).join(" ");return e.jsx("td",{className:ee,"data-label":typeof W.header=="string"?W.header:W.key,children:W.render?W.render(G,$,P):G==null?"":String(G)},W.key)})},b_($,P,v))});return e.jsx("div",{className:te,children:e.jsx("div",{className:ve.scroll,children:e.jsxs("table",{className:ve.table,children:[E&&e.jsx("caption",{className:ve.caption,children:E}),e.jsx("thead",{className:ve.thead,children:e.jsx("tr",{children:n.map(R)})}),e.jsx("tbody",{className:ve.tbody,children:he()})]})})})},j_="_root_1wpat_1",k_="_fullWidth_1wpat_11",N_="_label_1wpat_15",E_="_stage_1wpat_21",T_="_disabled_1wpat_38",I_="_bgChecker_1wpat_43",$_="_imageWrap_1wpat_49",C_="_image_1wpat_49",S_="_overlay_1wpat_68",L_="_overlayCircle_1wpat_77",M_="_circleMask_1wpat_82",D_="_grid_1wpat_89",B_="_gridLine_1wpat_95",R_="_h_1wpat_99",A_="_v_1wpat_104",z_="_handle_1wpat_110",P_="_handleTL_1wpat_128",O_="_handleTR_1wpat_134",W_="_handleBL_1wpat_140",H_="_handleBR_1wpat_146",q_="_handleT_1wpat_128",F_="_handleB_1wpat_140",G_="_handleL_1wpat_166",V_="_handleR_1wpat_166",K_="_controls_1wpat_200",U_="_controlGroup_1wpat_211",Y_="_controlLabel_1wpat_218",Q_="_iconBtn_1wpat_227",X_="_zoomSlider_1wpat_260",J_="_ratioRow_1wpat_294",Z_="_ratioChip_1wpat_300",ef="_active_1wpat_318",tf="_divider_1wpat_333",nf="_helper_1wpat_339",sf="_placeholder_1wpat_344",of="_spinner_1wpat_356",q={root:j_,fullWidth:k_,label:N_,stage:E_,disabled:T_,bgChecker:I_,imageWrap:$_,image:C_,overlay:S_,overlayCircle:L_,circleMask:M_,grid:D_,gridLine:B_,h:R_,v:A_,handle:z_,handleTL:P_,handleTR:O_,handleBL:W_,handleBR:H_,handleT:q_,handleB:F_,handleL:G_,handleR:V_,controls:K_,controlGroup:U_,controlLabel:Y_,iconBtn:Q_,zoomSlider:X_,ratioRow:J_,ratioChip:Z_,active:ef,divider:tf,helper:nf,placeholder:sf,spinner:of},rf=[{label:"Free",value:null},{label:"1:1",value:1},{label:"4:3",value:4/3},{label:"3:4",value:3/4},{label:"16:9",value:16/9},{label:"9:16",value:9/16}],Mt=24,qe=(n,t,s)=>Math.min(s,Math.max(t,n)),_t=n=>(Math.round(n/90)*90%360+360)%360,af=r.forwardRef(function({src:t,aspectRatio:s,circular:o=!1,showGrid:a=!0,showControls:i=!0,ratioPresets:l,minZoom:c=1,maxZoom:p=4,defaultZoom:v=1,defaultRotation:b=0,defaultCrop:_,height:x=360,background:N="checker",label:w,helperText:C,onChange:E,onReady:D,onError:V,disabled:H=!1,fullWidth:ue=!0,className:j,ariaLabel:M},B){const S=o?1:s,se=r.useRef(null),Q=r.useRef(null),[y,te]=r.useState({w:0,h:0}),[R,he]=r.useState(null),[$,P]=r.useState(!1),[A,W]=r.useState(!1),[G,ae]=r.useState(v),[ee,J]=r.useState(_t(b)),[Y,me]=r.useState({x:0,y:0}),[ye,we]=r.useState({left:(_==null?void 0:_.x)??10,top:(_==null?void 0:_.y)??10,width:(_==null?void 0:_.width)??80,height:(_==null?void 0:_.height)??80}),[le,Be]=r.useState(S??null);r.useEffect(()=>{Be(S??null)},[S]),r.useLayoutEffect(()=>{const f=se.current;if(!f)return;const L=()=>{const Z=f.getBoundingClientRect();te({w:Z.width,h:Z.height})};L();const F=new ResizeObserver(L);return F.observe(f),()=>F.disconnect()},[]),r.useEffect(()=>{if(P(!1),W(!1),he(null),!t)return;const f=new Image;return f.crossOrigin="anonymous",f.onload=()=>{he({w:f.naturalWidth,h:f.naturalHeight}),P(!0),D==null||D({naturalWidth:f.naturalWidth,naturalHeight:f.naturalHeight})},f.onerror=()=>{W(!0),V==null||V(new Error(`Failed to load image: ${t}`))},f.src=t,()=>{f.onload=null,f.onerror=null}},[t]);const je=r.useMemo(()=>{if(!R||!y.w||!y.h)return 1;const f=ee===90||ee===270,L=f?R.h:R.w,F=f?R.w:R.h;return Math.min(y.w/L,y.h/F)},[R,y.w,y.h,ee]),ge=r.useMemo(()=>{if(!R)return{w:0,h:0};const f=je*G;return{w:R.w*f,h:R.h*f}},[R,je,G]),de=r.useMemo(()=>({left:ye.left/100*y.w,top:ye.top/100*y.h,width:ye.width/100*y.w,height:ye.height/100*y.h}),[ye,y]),be=r.useCallback(()=>{if(!R||!y.w||!y.h)return null;const f=je*G,L=y.w/2+Y.x,F=y.h/2+Y.y,Z=de.left+de.width/2,h=de.top+de.height/2,d=Z-L,g=h-F,k=-ee*Math.PI/180,z=d*Math.cos(k)-g*Math.sin(k),ne=d*Math.sin(k)+g*Math.cos(k),_e=ee===90||ee===270,Re=_e?de.height:de.width,Ne=_e?de.width:de.height,Ie=(z-Re/2)/f+R.w/2,$e=(ne-Ne/2)/f+R.h/2,Ae=Re/f,Oe=Ne/f;return{x:Ie,y:$e,width:Ae,height:Oe,rotation:ee,sourceWidth:R.w,sourceHeight:R.h}},[R,y,je,G,Y,de,ee]),We=r.useRef("");r.useEffect(()=>{if(!$)return;const f=be();if(!f)return;const L=`${f.x.toFixed(2)},${f.y.toFixed(2)},${f.width.toFixed(2)},${f.height.toFixed(2)},${f.rotation}`;L!==We.current&&(We.current=L,E==null||E(f))},[$,be,E]),r.useEffect(()=>{le==null||!y.w||!y.h||we(f=>{const L=f.width/100*y.w,F=f.height/100*y.h,Z=L/le;let h=L,d=Z;Z>F&&(d=F,h=F*le);const g=(f.left+f.width/2)/100*y.w,k=(f.top+f.height/2)/100*y.h;let z=g-h/2,ne=k-d/2;return z=qe(z,0,y.w-h),ne=qe(ne,0,y.h-d),{left:z/y.w*100,top:ne/y.h*100,width:h/y.w*100,height:d/y.h*100}})},[le,y.w,y.h]);const ke=r.useRef(null),Ee=r.useRef(null),m=r.useRef(new Map),u=f=>{var L,F;if(!(H||!$)){if((F=(L=f.target).setPointerCapture)==null||F.call(L,f.pointerId),m.current.set(f.pointerId,{x:f.clientX,y:f.clientY}),m.current.size===2){const Z=Array.from(m.current.values()),h=Math.hypot(Z[0].x-Z[1].x,Z[0].y-Z[1].y);Ee.current={startDist:h,startZoom:G},ke.current=null;return}ke.current={type:"pan",startX:f.clientX,startY:f.clientY,startPan:Y}}},T=f=>{if(!m.current.has(f.pointerId))return;if(m.current.set(f.pointerId,{x:f.clientX,y:f.clientY}),Ee.current&&m.current.size>=2){const h=Array.from(m.current.values()),d=Math.hypot(h[0].x-h[1].x,h[0].y-h[1].y),g=qe(Ee.current.startZoom*(d/Ee.current.startDist),c,p);ae(g);return}const L=ke.current;if(!L)return;const F=f.clientX-L.startX,Z=f.clientY-L.startY;L.type==="pan"?me({x:L.startPan.x+F,y:L.startPan.y+Z}):L.type==="move"?fe(F,Z,L.startCrop):L.type==="resize"&&oe(L.corner,F,Z,L.startCrop)},I=f=>{m.current.delete(f.pointerId),m.current.size<2&&(Ee.current=null),m.current.size===0&&(ke.current=null)},K=f=>{if(H||!$)return;f.preventDefault();const L=-f.deltaY*.0015;ae(F=>qe(F*(1+L),c,p))},fe=(f,L,F)=>{const Z=y.w,h=y.h,d=F.left/100*Z,g=F.top/100*h,k=F.width/100*Z,z=F.height/100*h,ne=qe(d+f,0,Z-k),_e=qe(g+L,0,h-z);we({left:ne/Z*100,top:_e/h*100,width:F.width,height:F.height})},oe=(f,L,F,Z)=>{const h=y.w,d=y.h;let g=Z.left/100*h,k=Z.top/100*d,z=Z.width/100*h,ne=Z.height/100*d;const _e=g+z,Re=k+ne;let Ne=g,Ie=k,$e=_e,Ae=Re;f.includes("l")&&(Ne=qe(g+L,0,_e-Mt)),f.includes("r")&&($e=qe(_e+L,g+Mt,h)),f.includes("t")&&(Ie=qe(k+F,0,Re-Mt)),f.includes("b")&&(Ae=qe(Re+F,k+Mt,d));let Oe=$e-Ne,Ge=Ae-Ie;if(le!=null){if(f.length===2){const ze=Oe,st=Oe/le;st<=Ge||f==="tl"||f==="tr"||f==="bl"||f==="br"?Ge=ze/le:Oe=st*le,f.includes("t")&&(Ie=Ae-Ge),f.includes("b")&&(Ae=Ie+Ge),f.includes("l")&&(Ne=$e-Oe),f.includes("r")&&($e=Ne+Oe)}else if(f==="l"||f==="r"){Ge=Oe/le;const ze=(k+Re)/2;Ie=ze-Ge/2,Ae=ze+Ge/2}else if(f==="t"||f==="b"){Oe=Ge*le;const ze=(g+_e)/2;Ne=ze-Oe/2,$e=ze+Oe/2}if(Ne<0&&($e+=-Ne,Ne=0),Ie<0&&(Ae+=-Ie,Ie=0),$e>h){const ze=$e-h;$e=h,Ne-=ze}if(Ae>d){const ze=Ae-d;Ae=d,Ie-=ze}if(Oe=$e-Ne,Ge=Ae-Ie,Math.abs(Oe/Ge-le)>.001)if(Oe/Ge>le){const ze=Ge*le,st=(Ne+$e)/2;Ne=st-ze/2,$e=st+ze/2}else{const ze=Oe/le,st=(Ie+Ae)/2;Ie=st-ze/2,Ae=st+ze/2}}we({left:Ne/h*100,top:Ie/d*100,width:($e-Ne)/h*100,height:(Ae-Ie)/d*100})},Le=f=>{var L,F;H||!$||(f.stopPropagation(),(F=(L=f.target).setPointerCapture)==null||F.call(L,f.pointerId),m.current.set(f.pointerId,{x:f.clientX,y:f.clientY}),ke.current={type:"move",startX:f.clientX,startY:f.clientY,startCrop:{...ye}})},Pe=f=>L=>{var F,Z;H||!$||(L.stopPropagation(),(Z=(F=L.target).setPointerCapture)==null||Z.call(F,L.pointerId),m.current.set(L.pointerId,{x:L.clientX,y:L.clientY}),ke.current={type:"resize",corner:f,startX:L.clientX,startY:L.clientY,startCrop:{...ye}})},He=r.useCallback(f=>{const L=be();if(!L||!Q.current)return null;let F=Math.max(1,Math.round(L.width)),Z=Math.max(1,Math.round(L.height));const{maxWidth:h,maxHeight:d}=f??{};if(h&&F>h){const ne=h/F;F=h,Z=Math.round(Z*ne)}if(d&&Z>d){const ne=d/Z;Z=d,F=Math.round(F*ne)}const g=document.createElement("canvas");g.width=F,g.height=Z;const k=g.getContext("2d");if(!k)return null;k.imageSmoothingQuality="high";const z=Q.current;if(k.save(),L.rotation===0)k.drawImage(z,L.x,L.y,L.width,L.height,0,0,F,Z);else{k.translate(F/2,Z/2),k.rotate(L.rotation*Math.PI/180);const ne=L.rotation===90||L.rotation===270,_e=ne?Z:F,Re=ne?F:Z,Ne=ne?L.height:L.width,Ie=ne?L.width:L.height;k.drawImage(z,L.x,L.y,Ne,Ie,-_e/2,-Re/2,_e,Re)}return k.restore(),o&&(k.globalCompositeOperation="destination-in",k.beginPath(),k.arc(F/2,Z/2,Math.min(F,Z)/2,0,Math.PI*2),k.closePath(),k.fill()),g},[be,o]);r.useImperativeHandle(B,()=>({getCrop:()=>be(),getCroppedCanvas:f=>He(f),getCroppedBlob:f=>new Promise((L,F)=>{const Z=He(f);if(!Z)return F(new Error("Cropper not ready"));Z.toBlob(h=>h?L(h):F(new Error("Canvas export failed")),(f==null?void 0:f.type)??"image/png",(f==null?void 0:f.quality)??.92)}),getCroppedDataURL:async f=>{const L=He(f);if(!L)throw new Error("Cropper not ready");return L.toDataURL((f==null?void 0:f.type)??"image/png",(f==null?void 0:f.quality)??.92)},reset:()=>{ae(v),J(_t(b)),me({x:0,y:0}),we({left:(_==null?void 0:_.x)??10,top:(_==null?void 0:_.y)??10,width:(_==null?void 0:_.width)??80,height:(_==null?void 0:_.height)??80})},rotate:f=>{J(f===void 0?L=>_t(L+90):_t(f))},setZoom:f=>ae(qe(f,c,p))}),[be,He,v,b,_,c,p]);const Me={height:typeof x=="number"?`${x}px`:x},Ye=R?{width:ge.w,height:ge.h,transform:`translate(${Y.x}px, ${Y.y}px) rotate(${ee}deg)`}:{display:"none"},et={left:de.left,top:de.top,width:de.width,height:de.height},nt=o?{"--mask-cx":`${de.left+de.width/2}px`,"--mask-cy":`${de.top+de.height/2}px`,"--mask-r":`${Math.min(de.width,de.height)/2}px`}:{},Qe=[q.stage,N==="checker"?q.bgChecker:"",H?q.disabled:""].filter(Boolean).join(" "),lt=[q.root,ue?q.fullWidth:"",j??""].filter(Boolean).join(" "),dt=l??rf,kt=i&&!o&&dt.length>0;return e.jsxs("div",{className:lt,children:[w&&e.jsx("div",{className:q.label,children:w}),kt&&e.jsx("div",{className:q.ratioRow,role:"radiogroup","aria-label":"Aspect ratio",children:dt.map(f=>e.jsx("button",{type:"button",role:"radio","aria-checked":le===f.value,className:`${q.ratioChip} ${le===f.value?q.active:""}`,disabled:H,onClick:()=>Be(f.value),children:f.label},f.label))}),e.jsxs("div",{ref:se,className:Qe,style:Me,role:"application","aria-label":M??"Image cropper","aria-disabled":H,onPointerDown:u,onPointerMove:T,onPointerUp:I,onPointerCancel:I,onWheel:K,children:[!$&&!A&&e.jsxs("div",{className:q.placeholder,children:[e.jsx("div",{className:q.spinner,"aria-hidden":!0}),e.jsx("div",{children:"Loading image…"})]}),A&&e.jsx("div",{className:q.placeholder,children:e.jsx("div",{children:"Couldn't load image."})}),e.jsx("div",{className:q.imageWrap,children:e.jsx("img",{ref:Q,src:t,alt:"",draggable:!1,className:q.image,style:Ye})}),$&&e.jsxs(e.Fragment,{children:[o&&e.jsx("div",{className:q.circleMask,style:nt}),e.jsxs("div",{className:`${q.overlay} ${o?q.overlayCircle:""}`,style:et,onPointerDown:Le,onPointerMove:T,onPointerUp:I,onPointerCancel:I,children:[a&&!o&&e.jsxs("div",{className:q.grid,"aria-hidden":!0,children:[e.jsx("div",{className:`${q.gridLine} ${q.h}`,style:{top:"33.33%"}}),e.jsx("div",{className:`${q.gridLine} ${q.h}`,style:{top:"66.66%"}}),e.jsx("div",{className:`${q.gridLine} ${q.v}`,style:{left:"33.33%"}}),e.jsx("div",{className:`${q.gridLine} ${q.v}`,style:{left:"66.66%"}})]}),e.jsx("div",{className:`${q.handle} ${q.handleTL}`,onPointerDown:Pe("tl")}),e.jsx("div",{className:`${q.handle} ${q.handleTR}`,onPointerDown:Pe("tr")}),e.jsx("div",{className:`${q.handle} ${q.handleBL}`,onPointerDown:Pe("bl")}),e.jsx("div",{className:`${q.handle} ${q.handleBR}`,onPointerDown:Pe("br")}),e.jsx("div",{className:`${q.handle} ${q.handleT}`,onPointerDown:Pe("t")}),e.jsx("div",{className:`${q.handle} ${q.handleB}`,onPointerDown:Pe("b")}),e.jsx("div",{className:`${q.handle} ${q.handleL}`,onPointerDown:Pe("l")}),e.jsx("div",{className:`${q.handle} ${q.handleR}`,onPointerDown:Pe("r")})]})]})]}),i&&e.jsxs("div",{className:q.controls,"aria-label":"Cropper controls",children:[e.jsxs("div",{className:q.controlGroup,children:[e.jsx("span",{className:q.controlLabel,children:"Zoom"}),e.jsx("button",{type:"button",className:q.iconBtn,"aria-label":"Zoom out",disabled:H||G<=c,onClick:()=>ae(f=>qe(f-.1,c,p)),children:e.jsx(lf,{})}),e.jsx("input",{type:"range",className:q.zoomSlider,min:c,max:p,step:.01,value:G,disabled:H,onChange:f=>ae(parseFloat(f.target.value)),"aria-label":"Zoom level"}),e.jsx("button",{type:"button",className:q.iconBtn,"aria-label":"Zoom in",disabled:H||G>=p,onClick:()=>ae(f=>qe(f+.1,c,p)),children:e.jsx(cf,{})})]}),e.jsx("div",{className:q.divider,"aria-hidden":!0}),e.jsxs("div",{className:q.controlGroup,children:[e.jsx("span",{className:q.controlLabel,children:"Rotate"}),e.jsx("button",{type:"button",className:q.iconBtn,"aria-label":"Rotate left",disabled:H,onClick:()=>J(f=>_t(f-90)),children:e.jsx(df,{})}),e.jsx("button",{type:"button",className:q.iconBtn,"aria-label":"Rotate right",disabled:H,onClick:()=>J(f=>_t(f+90)),children:e.jsx(uf,{})})]}),e.jsx("div",{className:q.divider,"aria-hidden":!0}),e.jsx("div",{className:q.controlGroup,children:e.jsx("button",{type:"button",className:q.iconBtn,"aria-label":"Reset",disabled:H,onClick:()=>{ae(v),J(_t(b)),me({x:0,y:0}),we({left:(_==null?void 0:_.x)??10,top:(_==null?void 0:_.y)??10,width:(_==null?void 0:_.width)??80,height:(_==null?void 0:_.height)??80})},children:e.jsx(hf,{})})})]}),C&&e.jsx("div",{className:q.helper,children:C})]})}),It={width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},cf=()=>e.jsxs("svg",{...It,children:[e.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),e.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),lf=()=>e.jsx("svg",{...It,children:e.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})}),df=()=>e.jsxs("svg",{...It,children:[e.jsx("polyline",{points:"1 4 1 10 7 10"}),e.jsx("path",{d:"M3.51 15a9 9 0 1 0 2.13-9.36L1 10"})]}),uf=()=>e.jsxs("svg",{...It,children:[e.jsx("polyline",{points:"23 4 23 10 17 10"}),e.jsx("path",{d:"M20.49 15a9 9 0 1 1-2.13-9.36L23 10"})]}),hf=()=>e.jsxs("svg",{...It,children:[e.jsx("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),e.jsx("polyline",{points:"3 3 3 8 8 8"})]});exports.EvoAlert=Tp;exports.EvoAutoComplete=Yn;exports.EvoBadge=os;exports.EvoBreadcrumb=Ln;exports.EvoButton=As;exports.EvoCard=ct;exports.EvoCardBody=Kt;exports.EvoCardDescription=Qt;exports.EvoCardFooter=Ut;exports.EvoCardHeader=Vt;exports.EvoCardMedia=Xt;exports.EvoCardRoot=Dt;exports.EvoCardTitle=Yt;exports.EvoCheckbox=Qn;exports.EvoCommandPalette=Na;exports.EvoContainer=mo;exports.EvoDivider=io;exports.EvoForm=jt;exports.EvoGrid=$n;exports.EvoImageCropper=af;exports.EvoInput=Pa;exports.EvoModal=Rt;exports.EvoNav=_r;exports.EvoNavGroup=nn;exports.EvoNavItem=en;exports.EvoNavQuickAction=sn;exports.EvoNavSkeleton=Bn;exports.EvoNavSubItem=tn;exports.EvoNotification=ap;exports.EvoNotificationBell=ln;exports.EvoNotificationItem=zt;exports.EvoNotificationPanel=At;exports.EvoNotificationProvider=an;exports.EvoNotificationToaster=cn;exports.EvoPagination=oa;exports.EvoRadio=Jn;exports.EvoRichTextArea=pi;exports.EvoSelect=uc;exports.EvoSkeleton=dn;exports.EvoStack=Zs;exports.EvoTable=w_;exports.EvoTabs=Bt;exports.EvoThemeProvider=rs;exports.EvoThemeToggle=fs;exports.EvoToggle=Hd;exports.EvoTooltip=fp;exports.EvoTopNav=Je;exports.EvoTreeSelect=gl;exports.evoLocalRecents=ld;exports.evoNotify=Jh;exports.getEvoThemeScript=as;exports.useEvoInbox=rp;exports.useEvoTheme=In;exports.useFormContext=ju;
|