@nevuto/components 0.18.0 β 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Table/TableCell.d.ts +15 -1
- package/dist/Table/TableCell.d.ts.map +1 -1
- package/dist/Table/TableScroll.d.ts +4 -3
- package/dist/Table/TableScroll.d.ts.map +1 -1
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +1665 -1657
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("react"),j=require("@nevuto/icons"),pt=require("react-dom"),na="_root_1l23b_1",oa="_item_1l23b_9",aa="_unordered_1l23b_20",ra="_ordered_1l23b_24",Es={root:na,item:oa,unordered:aa,ordered:ra};function la({children:t,className:s}){return e.jsx("li",{className:[Es.item,s].filter(Boolean).join(" "),children:t})}function Vn({ordered:t=!1,children:s,className:n}){const o=t?"ol":"ul";return e.jsx(o,{className:[Es.root,t?Es.ordered:Es.unordered,n].filter(Boolean).join(" "),children:s})}Vn.Item=la;const ia="_root_r9m7s_1",ca="_transparent_r9m7s_32",da="_sm_r9m7s_37",ua="_base_r9m7s_38",_a="_lg_r9m7s_39",ma="_xl_r9m7s_40",fa="_inverted_r9m7s_43",ha="_loading_r9m7s_51",pa="_neutral_r9m7s_64",xa="_danger_r9m7s_85",ga="_fullWidth_r9m7s_173",ba="_dark_r9m7s_178",ja="_content_r9m7s_197",va="_spinnerWrapper_r9m7s_209",ya="_spinner_r9m7s_209",Na="_spin_r9m7s_209",gt={root:ia,transparent:ca,sm:da,base:ua,lg:_a,xl:ma,inverted:fa,loading:ha,neutral:pa,danger:xa,fullWidth:ga,dark:ba,content:ja,spinnerWrapper:va,spinner:ya,spin:Na};function ve({variant:t="inverted",size:s="base",loading:n=!1,fullWidth:o=!1,leftIcon:a,rightIcon:r,children:l,className:i,...c}){const u=[gt.root,gt[t],gt[s],n&>.loading,o&>.fullWidth,i].filter(Boolean).join(" "),_=e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:gt.content,style:n?{visibility:"hidden"}:void 0,children:[a&&e.jsx("span",{"aria-hidden":!0,style:{display:"inline-flex"},children:a}),l,r&&e.jsx("span",{"aria-hidden":!0,style:{display:"inline-flex"},children:r})]}),n&&e.jsx("span",{className:gt.spinnerWrapper,"aria-hidden":!0,children:e.jsx("span",{className:gt.spinner})})]});if("href"in c&&c.href!==void 0){const{href:p,...x}=c;return e.jsx("a",{href:p,className:u,...x,children:_})}const{disabled:m,type:f="button",...h}=c;return e.jsx("button",{type:f,className:u,disabled:m||n,"aria-disabled":n||m,...h,children:_})}const $a="_root_z9l5v_5",wa="_full_z9l5v_24",ka="_size2xsmall_z9l5v_27",Ia="_sizeXsmall_z9l5v_28",za="_sizeSm_z9l5v_29",Sa="_sizeBase_z9l5v_30",Ba="_sizeLg_z9l5v_31",Ca="_sizeXl_z9l5v_32",Ta="_iconWrap_z9l5v_35",Da="_neutral_z9l5v_49",Ma="_loading_z9l5v_54",Ra="_inverted_z9l5v_71",Ea="_transparent_z9l5v_97",La="_spinnerWrap_z9l5v_122",Aa="_spinner_z9l5v_122",qa="_spin_z9l5v_122",qe={root:$a,full:wa,size2xsmall:ka,sizeXsmall:Ia,sizeSm:za,sizeBase:Sa,sizeLg:Ba,sizeXl:Ca,iconWrap:Ta,neutral:Da,loading:Ma,inverted:Ra,transparent:Ea,spinnerWrap:La,spinner:Aa,spin:qa},Fa={"2xsmall":qe.size2xsmall,xsmall:qe.sizeXsmall,sm:qe.sizeSm,base:qe.sizeBase,lg:qe.sizeLg,xl:qe.sizeXl};function xe({icon:t,variant:s="neutral",size:n="base",radius:o="default",loading:a=!1,className:r,...l}){const i=[qe.root,qe[s],Fa[n],o==="full"&&qe.full,a&&qe.loading,r].filter(Boolean).join(" "),c=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:qe.iconWrap,style:a?{visibility:"hidden"}:void 0,"aria-hidden":!0,children:t}),a&&e.jsx("span",{className:qe.spinnerWrap,"aria-hidden":!0,children:e.jsx("span",{className:qe.spinner})})]});if("href"in l&&l.href!==void 0){const{href:f,...h}=l;return e.jsx("a",{href:f,className:i,...h,children:c})}const{disabled:u,type:_="button",...m}=l;return e.jsx("button",{type:_,className:i,disabled:u||a,"aria-disabled":a||u,...m,children:c})}const Pa="_menu_cic39_1",Oa={menu:Pa};function Qe({children:t,className:s,style:n}){return e.jsx("div",{className:[Oa.menu,s].filter(Boolean).join(" "),style:n,role:"menu",children:t})}const bn=d.createContext(()=>{});function Kn(){return d.useContext(bn)}const Wa="_item_1v5kd_1",Ha="_forceHover_1v5kd_25",Ga="_active_1v5kd_33",Ua="_danger_1v5kd_49",Va="_iconSlot_1v5kd_53",Ka="_leftIcon_1v5kd_66",Ya="_avatar_1v5kd_78",Xa="_itemLabel_1v5kd_85",Za="_itemLabelChecked_1v5kd_93",Ja="_count_1v5kd_96",Qa="_badge_1v5kd_105",er="_itemRight_1v5kd_112",fe={item:Wa,forceHover:Ha,active:Ga,danger:Ua,iconSlot:Va,leftIcon:Ka,avatar:Ya,itemLabel:Xa,itemLabelChecked:Za,count:Ja,badge:Qa,itemRight:er};function $e({label:t,leftIcon:s,avatar:n,rightSlot:o,count:a,badge:r,variant:l="default",disabled:i=!1,active:c=!1,forceHover:u=!1,onClick:_,closeOnClick:m=!0,className:f}){const h=Kn();function p(){_==null||_(),m&&h()}return e.jsxs("button",{role:"menuitem",className:[fe.item,fe[l],c&&fe.active,u&&fe.forceHover,f].filter(Boolean).join(" "),disabled:i,onClick:p,children:[s&&e.jsx("span",{className:fe.leftIcon,children:s}),n&&e.jsx("span",{className:fe.avatar,children:n}),e.jsx("span",{className:fe.itemLabel,children:t}),a!==void 0&&e.jsx("span",{className:fe.count,children:a}),r&&e.jsx("span",{className:fe.badge,children:r}),o&&e.jsx("span",{className:fe.itemRight,children:o})]})}function Yn({label:t,checked:s=!1,leftIcon:n,avatar:o,count:a,badge:r,disabled:l=!1,forceHover:i=!1,onClick:c,className:u}){return e.jsxs("button",{role:"menuitemradio","aria-checked":s,className:[fe.item,s&&fe.checked,i&&fe.forceHover,u].filter(Boolean).join(" "),disabled:l,onClick:c,children:[e.jsx("span",{className:fe.iconSlot,children:s&&e.jsx(j.CircleIcon,{size:4,fill:"currentColor"})}),n&&e.jsx("span",{className:fe.leftIcon,children:n}),o&&e.jsx("span",{className:fe.avatar,children:o}),e.jsx("span",{className:[fe.itemLabel,s&&fe.itemLabelChecked].filter(Boolean).join(" "),children:t}),a!==void 0&&e.jsx("span",{className:fe.count,children:a}),r&&e.jsx("span",{className:fe.badge,children:r})]})}function Xn({label:t,checked:s=!1,leftIcon:n,avatar:o,count:a,badge:r,disabled:l=!1,forceHover:i=!1,onClick:c,className:u}){return e.jsxs("button",{role:"menuitemcheckbox","aria-checked":s,className:[fe.item,s&&fe.checked,i&&fe.forceHover,u].filter(Boolean).join(" "),disabled:l,onClick:c,children:[e.jsx("span",{className:fe.iconSlot,children:s&&e.jsx(j.CheckIcon,{size:15})}),n&&e.jsx("span",{className:fe.leftIcon,children:n}),o&&e.jsx("span",{className:fe.avatar,children:o}),e.jsx("span",{className:[fe.itemLabel,s&&fe.itemLabelChecked].filter(Boolean).join(" "),children:t}),a!==void 0&&e.jsx("span",{className:fe.count,children:a}),r&&e.jsx("span",{className:fe.badge,children:r})]})}var tr=typeof window<"u"?d.useLayoutEffect:d.useEffect;function Zn({value:t,defaultValue:s,onChange:n}){const o=t!==void 0,[a,r]=d.useState(s),l=o?t:a;function i(c){o||r(c),n==null||n(c)}return[l,i]}function fs(t){d.useEffect(()=>{if(!t)return;const s=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=s}},[t])}const sr="_panel_1doee_1",nr="_bare_1doee_16",Sn={panel:sr,bare:nr};function or(t,s,n,o,a){const r=window.innerWidth,l=window.innerHeight,i=8,[c,u]=o.split("-");let _=0,m=0;return c==="bottom"||c==="top"?(c==="bottom"?(_=t.bottom+a,_+n>l-i&&t.top-a-n>=i&&(_=t.top-a-n)):(_=t.top-a-n,_<i&&t.bottom+a+n<=l-i&&(_=t.bottom+a)),u==="end"?m=t.right-s:u==="start"?m=t.left:m=t.left+t.width/2-s/2):(c==="left"?(m=t.left-a-s,m<i&&t.right+a+s<=r-i&&(m=t.right+a)):(m=t.right+a,m+s>r-i&&t.left-a-s>=i&&(m=t.left-a-s)),u==="end"?_=t.bottom-n:u==="start"?_=t.top:_=t.top+t.height/2-n/2),m=Math.max(i,Math.min(m,r-s-i)),_=Math.max(i,Math.min(_,l-n-i)),{top:_,left:m}}function Ee({trigger:t,children:s,open:n,onOpenChange:o,placement:a="bottom-start",offset:r=8,bare:l=!1,className:i,matchTriggerWidth:c=!1}){const[u,_]=Zn({value:n,defaultValue:!1,onChange:o}),m=d.useRef(null),f=d.useRef(null),[h,p]=d.useState(null),[x,N]=d.useState(null),b=u??!1,z=d.useCallback(()=>_(!1),[_]),g=d.useCallback(()=>{var Q;if(!f.current)return;const S=(Q=m.current)==null?void 0:Q.firstElementChild;if(!S)return;const w=S.getBoundingClientRect();c&&N(w.width);const{offsetWidth:T,offsetHeight:R}=f.current,H=c?w.width:T;p(or(w,H,R,a,r))},[c,a,r]);return tr(()=>{b&&g()},[b,g]),d.useEffect(()=>{if(b)return window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[b,g]),d.useEffect(()=>{b||p(null)},[b]),d.useEffect(()=>{if(!b)return;function S(w){w.key==="Escape"&&(w.preventDefault(),_(!1))}return document.addEventListener("keydown",S,!0),()=>document.removeEventListener("keydown",S,!0)},[b]),d.useEffect(()=>{if(!b)return;function S(w){var R,H,Q;const T=w.target;(R=f.current)!=null&&R.contains(T)||(H=m.current)!=null&&H.contains(T)||(Q=T.closest)!=null&&Q.call(T,"[data-popover-panel]")||_(!1)}return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[b]),d.useEffect(()=>{if(!b)return;function S(w){var R;const T=w.target;(R=f.current)!=null&&R.contains(T)||_(!1)}return window.addEventListener("scroll",S,{capture:!0,passive:!0}),()=>window.removeEventListener("scroll",S,{capture:!0})},[b]),e.jsxs(e.Fragment,{children:[e.jsx("span",{ref:m,style:{display:"contents"},onClick:()=>_(!b),children:t}),b&&pt.createPortal(e.jsx("div",{ref:f,"data-popover-panel":!0,className:[l?Sn.bare:Sn.panel,i].filter(Boolean).join(" "),style:h?{top:h.top,left:h.left,...x?{width:x}:{}}:{visibility:"hidden",top:0,left:0},children:e.jsx(bn.Provider,{value:z,children:s})}),document.body)]})}const ar="_root_1l5yx_1",rr="_removable_1l5yx_28",lr="_rounded_1l5yx_30",ir="_full_1l5yx_31",cr="_clickable_1l5yx_33",dr="_leftIcon_1l5yx_45",ur="_label_1l5yx_52",_r="_removeBtn_1l5yx_54",bt={root:ar,"size-2xs":"_size-2xs_1l5yx_14","size-xs":"_size-xs_1l5yx_21",removable:rr,rounded:lr,full:ir,clickable:cr,leftIcon:dr,label:ur,removeBtn:_r};function hs({label:t,size:s="xs",shape:n="full",leftIcon:o,removable:a=!1,onRemove:r,onClick:l,className:i}){const c=[bt.root,bt[`size-${s}`],bt[n],l?bt.clickable:"",a?bt.removable:"",i].filter(Boolean).join(" "),u=e.jsxs(e.Fragment,{children:[o&&e.jsx("span",{className:bt.leftIcon,children:o}),e.jsx("span",{className:bt.label,children:t}),a&&e.jsx("button",{type:"button",className:bt.removeBtn,onClick:_=>{_.stopPropagation(),r==null||r()},"aria-label":`Remove ${t}`,children:e.jsx(j.CloseIcon,{size:15})})]});return l?e.jsx("button",{type:"button",className:c,onClick:l,children:u}):e.jsx("div",{className:c,children:u})}const mr="_root_1mx71_1",fr="_chat_1mx71_14",hr="_dragging_1mx71_21",pr="_input_1mx71_26",xr="_emailFields_1mx71_47",gr="_emailField_1mx71_47",br="_emailLabel_1mx71_66",jr="_emailRecipients_1mx71_72",vr="_fromSelector_1mx71_81",yr="_fromButton_1mx71_88",Nr="_fromValue_1mx71_98",$r="_recipientInput_1mx71_107",wr="_recipientToggles_1mx71_124",kr="_recipientToggle_1mx71_124",Ir="_subjectInput_1mx71_140",zr="_newEmail_1mx71_153",Sr="_replyPreview_1mx71_158",Br="_replyContent_1mx71_167",Cr="_replyLabel_1mx71_174",Tr="_replyText_1mx71_180",Dr="_filled_1mx71_189",Mr="_attachments_1mx71_191",Rr="_actionRow_1mx71_197",Er="_actions_1mx71_198",Lr="_actionButton_1mx71_214",Ar="_disabled_1mx71_215",qr="_srOnly_1mx71_217",Fr="_emojiPicker_1mx71_228",Pr="_emojiOption_1mx71_236",de={root:mr,chat:fr,dragging:hr,input:pr,emailFields:xr,emailField:gr,emailLabel:br,emailRecipients:jr,fromSelector:vr,fromButton:yr,fromValue:Nr,recipientInput:$r,recipientToggles:wr,recipientToggle:kr,subjectInput:Ir,newEmail:zr,replyPreview:Sr,replyContent:Br,replyLabel:Cr,replyText:Tr,filled:Dr,attachments:Mr,actionRow:Rr,actions:Er,actionButton:Lr,disabled:Ar,srOnly:qr,emojiPicker:Fr,emojiOption:Pr},Or=d.forwardRef(function({state:s,variant:n="chat",new:o=!1,actions:a,attachments:r,replyTo:l,onCancelReply:i,value:c,defaultValue:u,onChange:_,onDraftChange:m,onDraftClear:f,onFocus:h,onBlur:p,onKeyDown:x,onSubmit:N,actionItems:b=[],actionLabel:z="Action",onActionSelect:g,onAttach:S,onEmojiSelect:w,onFilesDrop:T,submitLabel:R="Send message",attachmentLabel:H="Attach file",from:Q=[],fromOptions:ee=[],onFromSelect:Y,to:$=[],cc:k=[],bcc:C=[],subject:te,defaultSubject:V="",onSubjectChange:ne,onRecipientAdd:I,onRecipientRemove:F,fromLabel:oe="From",toLabel:le="To",ccLabel:v="Cc",bccLabel:D="Bcc",subjectLabel:A="Subject",placeholder:P="Ask a follow up...",disabled:B=!1,loading:G=!1,className:q,...U},L){const M=d.useRef(null),[K,ae]=d.useState(()=>String(u??"")),[he,X]=d.useState(!1),[re,ce]=d.useState(!1),[pe,E]=d.useState(!1),[W,y]=d.useState(!1),[Z,se]=d.useState(!1),[ge,_e]=d.useState(V),[Te,et]=d.useState(k.length>0),[Ye,we]=d.useState(C.length>0),[wn,kn]=d.useState({from:"",to:"",cc:"",bcc:""}),Qt=d.useRef(0),es=n==="email"&&o,ts=c===void 0?K:String(c),Ko=te===void 0?ge:te,xs=ts.trim().length>0||!!r,In=s??(xs?"filled":he?"active":"default");d.useLayoutEffect(()=>{const O=M.current;if(!O)return;const De=es?120:20,xt=es?240:192;O.style.height="auto",O.style.height=`${Math.max(De,Math.min(O.scrollHeight,xt))}px`,O.style.overflowY=O.scrollHeight>xt?"auto":"hidden"},[ts,es]);function Yo(O){M.current=O,typeof L=="function"?L(O):L&&(L.current=O)}function Xo(O){c===void 0&&ae(O.target.value),_==null||_(O),m==null||m(O.target.value)}function zn(){!B&&xs&&(N==null||N(ts),c===void 0&&ae(""),f==null||f())}function Zo(O){x==null||x(O),!O.defaultPrevented&&O.key==="Enter"&&!O.shiftKey&&(O.preventDefault(),zn())}function Jo(O){const De=`${ts}${O}`;c===void 0&&ae(De),m==null||m(De),w==null||w(O),ce(!1)}const Qo=[de.root,de[In],de[n],es&&de.newEmail,Z&&de.dragging,B&&de.disabled,q].filter(Boolean).join(" "),ea=e.jsxs(e.Fragment,{children:[n!=="email"&&b.length>0&&e.jsx(Ee,{open:pe,onOpenChange:E,placement:"top-start",offset:6,bare:!0,trigger:e.jsx(ve,{variant:"neutral",size:"sm",className:de.actionButton,leftIcon:e.jsx(j.PlusIcon,{}),disabled:B,children:z}),children:e.jsx(Qe,{children:b.map(O=>e.jsx($e,{label:O.label,leftIcon:O.icon,disabled:O.disabled,onClick:()=>g==null?void 0:g(O)},O.id))})}),e.jsx(xe,{icon:e.jsx(j.PaperclipIcon,{}),"aria-label":H,variant:"neutral",size:"sm",radius:"full",onClick:S,disabled:B}),e.jsx(Ee,{open:re,onOpenChange:ce,placement:"top-start",offset:6,trigger:e.jsx(xe,{icon:e.jsx(j.SmileIcon,{}),"aria-label":"Add emoji",variant:"neutral",size:"sm",radius:"full",disabled:B}),children:e.jsx("div",{className:de.emojiPicker,"aria-label":"Choose an emoji",children:["π","π","π","π₯³","π","π","π₯","β€οΈ","π","π","π€","β
"].map(O=>e.jsx("button",{type:"button",className:de.emojiOption,"aria-label":`Add ${O}`,onClick:()=>Jo(O),children:O},O))})})]});function Gs(O,De){function xt(){const Le=wn[O].trim();Le&&(I==null||I(O,Le),kn(Ft=>({...Ft,[O]:""})))}return e.jsxs(e.Fragment,{children:[De.map((Le,Ft)=>e.jsx(hs,{label:Le.label??Le.email,size:"2xs",removable:!!F,onRemove:F?()=>F(O,Le,Ft):void 0},Le.id??`${Le.email}-${Ft}`)),e.jsx("input",{type:"text",inputMode:"email",autoComplete:"off",autoCorrect:"off",autoCapitalize:"none",spellCheck:!1,className:de.recipientInput,value:wn[O],disabled:B,"aria-label":`Add ${O} email`,onChange:Le=>{const Ft=Le.target.value;kn(sa=>({...sa,[O]:Ft}))},onKeyDown:Le=>{Le.key==="Enter"&&(Le.preventDefault(),xt())},onBlur:()=>{xt()}})]})}const tt=Q[0],ta=ee.length>0?e.jsx(Ee,{open:W,onOpenChange:y,placement:"bottom-start",offset:4,bare:!0,trigger:e.jsx(ve,{variant:"transparent",size:"sm",className:de.fromButton,rightIcon:e.jsx(j.CaretDownIcon,{size:12}),disabled:B,"aria-label":`${oe}: ${(tt==null?void 0:tt.email)??""}`,children:(tt==null?void 0:tt.email)??oe}),children:e.jsx(Qe,{children:ee.map((O,De)=>e.jsx($e,{label:O.label?`${O.label} Β· ${O.email}`:O.email,onClick:()=>{Y==null||Y(O),y(!1)}},O.id??`${O.email}-${De}`))})}):e.jsx("span",{className:de.fromValue,children:(tt==null?void 0:tt.email)??"β"});return e.jsxs("div",{className:Qo,"data-state":In,onDragEnter:O=>{B||!T||(O.preventDefault(),Qt.current+=1,se(!0))},onDragOver:O=>{B||!T||(O.preventDefault(),O.dataTransfer.dropEffect="copy")},onDragLeave:O=>{B||!T||(O.preventDefault(),Qt.current-=1,Qt.current<=0&&(Qt.current=0,se(!1)))},onDrop:O=>{if(B||!T)return;O.preventDefault(),Qt.current=0,se(!1);const De=Array.from(O.dataTransfer.files);De.length&&T(De)},children:[e.jsx("span",{className:de.srOnly,"aria-live":"polite",children:Z?"Drop image files to attach them":""}),l&&e.jsxs("div",{className:de.replyPreview,children:[e.jsxs("div",{className:de.replyContent,children:[e.jsx("span",{className:de.replyLabel,children:"Replying to"}),e.jsx("span",{className:de.replyText,children:l})]}),e.jsx(xe,{icon:e.jsx(j.XIcon,{}),"aria-label":"Cancel reply",variant:"transparent",size:"2xsmall",radius:"full",onClick:i})]}),es&&e.jsxs("div",{className:de.emailFields,children:[e.jsxs("div",{className:de.emailField,children:[e.jsxs("span",{className:de.emailLabel,children:[oe,":"]}),e.jsx("div",{className:de.fromSelector,children:ta})]}),e.jsxs("div",{className:de.emailField,children:[e.jsxs("span",{className:de.emailLabel,children:[le,":"]}),e.jsx("div",{className:de.emailRecipients,children:Gs("to",$)}),e.jsxs("div",{className:de.recipientToggles,children:[!Te&&k.length===0&&e.jsx(ve,{variant:"transparent",size:"sm",className:de.recipientToggle,"aria-expanded":!1,onClick:()=>et(!0),disabled:B,children:v}),!Ye&&C.length===0&&e.jsx(ve,{variant:"transparent",size:"sm",className:de.recipientToggle,"aria-expanded":!1,onClick:()=>we(!0),disabled:B,children:D})]})]}),(Te||k.length>0)&&e.jsxs("div",{className:de.emailField,children:[e.jsxs("span",{className:de.emailLabel,children:[v,":"]}),e.jsx("div",{className:de.emailRecipients,children:Gs("cc",k)})]}),(Ye||C.length>0)&&e.jsxs("div",{className:de.emailField,children:[e.jsxs("span",{className:de.emailLabel,children:[D,":"]}),e.jsx("div",{className:de.emailRecipients,children:Gs("bcc",C)})]}),e.jsxs("label",{className:de.emailField,children:[e.jsxs("span",{className:de.emailLabel,children:[A,":"]}),e.jsx("input",{type:"text",autoComplete:"off",className:de.subjectInput,value:Ko,disabled:B,"aria-label":A,onChange:O=>{te===void 0&&_e(O.target.value),ne==null||ne(O.target.value)}})]})]}),r&&e.jsx("div",{className:de.attachments,children:r}),e.jsx("textarea",{...U,ref:Yo,className:de.input,"aria-label":U["aria-label"]??"Message",value:ts,placeholder:P,disabled:B,rows:1,onChange:Xo,onFocus:O=>{X(!0),h==null||h(O)},onBlur:O=>{X(!1),p==null||p(O)},onKeyDown:Zo,onPaste:O=>{var xt;if((xt=U.onPaste)==null||xt.call(U,O),B||!T)return;const De=Array.from(O.clipboardData.files);De.length>0&&T(De)}}),e.jsxs("div",{className:de.actionRow,children:[e.jsx("div",{className:de.actions,children:a===void 0?ea:a}),e.jsx(xe,{icon:e.jsx(j.ArrowUpIcon,{}),"aria-label":R,variant:xs?"inverted":"neutral",size:"sm",radius:"full",onClick:zn,disabled:B||!xs,loading:G})]})]})}),Wr="_root_o2rrr_5",Hr="_spin_o2rrr_1",Gr="_xs_o2rrr_14",Ur="_sm_o2rrr_20",Vr="_md_o2rrr_26",Kr="_lg_o2rrr_32",Bn={root:Wr,spin:Hr,xs:Gr,sm:Ur,md:Vr,lg:Kr};function Ct({size:t="md",className:s,label:n="Loadingβ¦"}){return e.jsx("span",{className:[Bn.root,Bn[t],s].filter(Boolean).join(" "),role:"status","aria-label":n})}const Yr="_trigger_1gpq3_2",Xr="_tooltip_1gpq3_7",Zr="_top_1gpq3_24",Jr="_bottom_1gpq3_30",Qr="_left_1gpq3_36",el="_right_1gpq3_42",tl="_enter_1gpq3_48",sl="_tooltipEnter_1gpq3_1",nl="_exit_1gpq3_52",ol="_tooltipExit_1gpq3_1",ss={trigger:Yr,tooltip:Xr,top:Zr,bottom:Jr,left:Qr,right:el,enter:tl,tooltipEnter:sl,exit:nl,tooltipExit:ol};function al(t,s,n,o){switch(n){case"top":return{top:t.top-s.height-o,left:t.left+t.width/2-s.width/2};case"bottom":return{top:t.bottom+o,left:t.left+t.width/2-s.width/2};case"left":return{top:t.top+t.height/2-s.height/2,left:t.left-s.width-o};case"right":return{top:t.top+t.height/2-s.height/2,left:t.right+o}}}function ht({content:t,placement:s="top",delay:n=100,children:o,disabled:a=!1}){const[r,l]=d.useState(!1),[i,c]=d.useState(!1),[u,_]=d.useState(null),m=d.useRef(null),f=d.useRef(null),h=d.useRef(null),p=d.useCallback(()=>{if(!a){if(h.current&&clearTimeout(h.current),r){c(!1);return}h.current=setTimeout(()=>{c(!1),l(!0)},n)}},[n,a,r]),x=d.useCallback(()=>{h.current&&clearTimeout(h.current),r&&c(!0)},[r]),N=d.useCallback(()=>{l(!1),c(!1),_(null)},[]);d.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]),d.useEffect(()=>{if(!i)return;const z=setTimeout(N,240);return()=>clearTimeout(z)},[i,N]),d.useEffect(()=>{a&&x()},[a,x]),d.useLayoutEffect(()=>{if(!r||!m.current||!f.current)return;const z=m.current.getBoundingClientRect(),g={width:f.current.offsetWidth,height:f.current.offsetHeight};_(al(z,g,s,8))},[r,s,t]);const b=u?{top:u.top,left:u.left}:{visibility:"hidden",top:-9999,left:-9999};return e.jsxs(e.Fragment,{children:[e.jsx("span",{ref:m,className:ss.trigger,onMouseEnter:p,onMouseLeave:x,onFocus:p,onBlur:x,children:o}),r&&pt.createPortal(e.jsx("div",{ref:f,role:"tooltip",className:[ss.tooltip,ss[s],u&&(i?ss.exit:ss.enter)].filter(Boolean).join(" "),style:b,onAnimationEnd:z=>{i&&z.target===z.currentTarget&&N()},children:t}),document.body)]})}const rl="_root_1jckr_1",ll="_fileOutline_1jckr_25",il="_image_1jckr_36",cl="_placeholder_1jckr_43",dl="_play_1jckr_53",Pt={root:rl,fileOutline:ll,image:il,placeholder:cl,play:dl},Cn=/\.(mp4|webm|mov|m4v)(\?|#|$)/i,ul=/\.(jpe?g|png|webp|gif|avif|svg|bmp|ico)(\?|#|$)/i,_l={"square-4xl":{width:200,height:200,radius:12,fold:25},"square-2xl":{width:96,height:96,radius:8,fold:12},"square-xl":{width:64,height:64,radius:8,fold:10},"landscape-lg":{width:64,height:40,radius:6,fold:6},"landscape-md":{width:40,height:30,radius:6,fold:5},"landscape-sm":{width:32,height:24,radius:4,fold:4},base:{width:24,height:32,radius:4,fold:4},"portrait-sm":{width:24,height:32,radius:4,fold:4},"portrait-xs":{width:15,height:20,radius:4,fold:3},"portrait-2xs":{width:15,height:20,radius:4,fold:3},"2xs":{width:15,height:20,radius:4,fold:3}};function Us(t,s,n){return Math.min(n,Math.max(s,t))}function Tn(t,s,n,o){return`M${n},0 H${t-o} L${t},${o} V${s-n} Q${t},${s} ${t-n},${s} H${n} Q0,${s} 0,${s-n} V${n} Q0,0 ${n},0 Z`}function zt({variant:t="image",size:s="base",src:n,alt:o="",className:a,style:r}){const{width:l,height:i,radius:c,fold:u}=_l[s],[_,m]=d.useState(!1),f=Math.min(l,i),h=t==="video"||t!=="file"&&!!n&&Cn.test(n),p=t!=="file"&&!!n&&(Cn.test(n)||t==="video"&&!ul.test(n)),x=t==="file"||!n||_,N=t==="file"?Us(Math.round(f*.52),12,32):Us(Math.round(f*.34),10,24),b=t==="file"?{borderRadius:0,clipPath:`path('${Tn(l,i,c,u)}')`}:{borderRadius:c};return e.jsxs("span",{className:[Pt.root,a].filter(Boolean).join(" "),"data-variant":t,style:{width:l,height:i,...b,...r},children:[x?e.jsx("span",{className:Pt.placeholder,children:t==="file"?e.jsx(j.FileIcon,{size:N}):h?e.jsx(j.PlayIcon,{size:N}):e.jsx(j.ImageIcon,{size:N})}):e.jsxs(e.Fragment,{children:[p?e.jsx("video",{src:n,className:Pt.image,muted:!0,playsInline:!0,preload:"metadata",onError:()=>m(!0)}):e.jsx("img",{src:n,alt:o,className:Pt.image,onError:()=>m(!0)}),h&&e.jsx("span",{className:Pt.play,children:e.jsx(j.PlayIcon,{size:Us(Math.round(f*.4),10,28)})})]}),t==="file"&&e.jsx("svg",{className:Pt.fileOutline,viewBox:`0 0 ${l} ${i}`,preserveAspectRatio:"none","aria-hidden":"true",focusable:"false",children:e.jsx("path",{d:Tn(l,i,c,u),vectorEffect:"non-scaling-stroke"})})]})}const ml="_root_b94lz_1",fl="_image_b94lz_14",hl="_file_b94lz_21",pl="_videoContainer_b94lz_29",xl="_video_b94lz_29",gl="_fileContent_b94lz_43",bl="_fileName_b94lz_49",jl="_fileSize_b94lz_50",vl="_remove_b94lz_68",st={root:ml,image:fl,file:hl,videoContainer:pl,video:xl,fileContent:gl,fileName:bl,fileSize:jl,remove:vl};function Jn({src:t,alt:s="",variant:n="image",fileName:o,fileSize:a,loading:r=!1,onRemove:l,className:i,...c}){return e.jsxs("div",{className:[st.root,n==="file"&&st.file,n==="video"&&st.videoContainer,i].filter(Boolean).join(" "),...c,children:[r?e.jsx(Ct,{size:"sm",label:"Uploading attachment"}):n==="file"?e.jsxs(e.Fragment,{children:[e.jsx(zt,{variant:"file",size:"base"}),e.jsxs("span",{className:st.fileContent,children:[e.jsx("span",{className:st.fileName,children:o??"File"}),a&&e.jsx("span",{className:st.fileSize,children:a})]})]}):n==="video"&&t?e.jsx("video",{src:t,className:st.video,controls:!0}):t?e.jsx("img",{src:t,alt:s,className:st.image}):null,!r&&l&&e.jsx("span",{className:st.remove,children:e.jsx(xe,{icon:e.jsx(j.XIcon,{}),"aria-label":"Remove attachment",variant:"neutral",size:"xsmall",radius:"full",onClick:l})})]})}const yl="_overlay_dmo51_1",Nl="_dialog_dmo51_13",$l="_topbar_dmo51_23",wl="_counter_dmo51_30",kl="_stage_dmo51_36",Il="_image_dmo51_46",Ot={overlay:yl,dialog:Nl,topbar:$l,counter:wl,stage:kl,image:Il};function zl({images:t,index:s,onIndexChange:n,onClose:o}){const a=d.useRef(null),r=s>0,l=s<t.length-1,i=t[s];fs(!0),d.useEffect(()=>{var u;(u=a.current)==null||u.focus()},[]),d.useEffect(()=>{function u(_){_.key==="Escape"&&o(),_.key==="ArrowLeft"&&r&&n(s-1),_.key==="ArrowRight"&&l&&n(s+1)}return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[l,r,s,o,n]);function c(u){u.target===u.currentTarget&&o()}return i?pt.createPortal(e.jsx("div",{className:Ot.overlay,role:"dialog","aria-modal":"true","aria-label":"Image preview",onMouseDown:c,children:e.jsxs("div",{ref:a,className:Ot.dialog,tabIndex:-1,onMouseDown:c,children:[e.jsxs("div",{className:Ot.topbar,children:[e.jsxs("span",{className:Ot.counter,children:[s+1," / ",t.length]}),e.jsx(xe,{icon:e.jsx(j.XIcon,{}),"aria-label":"Close image preview",variant:"neutral",size:"base",radius:"full",onClick:o})]}),e.jsxs("div",{className:Ot.stage,onMouseDown:c,children:[t.length>1&&e.jsx(xe,{icon:e.jsx(j.ChevronLeftIcon,{}),"aria-label":"Previous image",variant:"neutral",size:"lg",radius:"full",disabled:!r,onClick:()=>n(s-1)}),e.jsx("img",{src:i.src,alt:i.alt??"",className:Ot.image}),t.length>1&&e.jsx(xe,{icon:e.jsx(j.ChevronRightIcon,{}),"aria-label":"Next image",variant:"neutral",size:"lg",radius:"full",disabled:!l,onClick:()=>n(s+1)})]})]})}),document.body):null}const Sl="_animated_a3bgv_1",Bl="_deleting_a3bgv_18",Cl="_root_a3bgv_37",Tl="_messageRow_a3bgv_47",Dl="_collapsed_a3bgv_54",Ml="_old_a3bgv_59",Rl="_outgoing_a3bgv_63",El="_incoming_a3bgv_68",Ll="_email_a3bgv_73",Al="_bubbleRow_a3bgv_92",ql="_content_a3bgv_101",Fl="_emailMeta_a3bgv_113",Pl="_emailAuthor_a3bgv_128",Ol="_emailSnippet_a3bgv_139",Wl="_emailTimestamp_a3bgv_151",Hl="_bubble_a3bgv_92",Gl="_references_a3bgv_169",Ul="_files_a3bgv_170",Vl="_imageBubble_a3bgv_176",Kl="_emailBodyWrapper_a3bgv_185",Yl="_sentImage_a3bgv_206",Xl="_imageCount_a3bgv_211",Zl="_dots_a3bgv_224",Jl="_sentVideo_a3bgv_290",Ql="_imageButton_a3bgv_298",ei="_replyReference_a3bgv_336",ti="_typing_a3bgv_348",si="_menuButton_a3bgv_387",ni="_statusInline_a3bgv_400",oi="_status_failed_a3bgv_416",ai="_retry_a3bgv_418",ri="_srOnly_a3bgv_433",me={animated:Sl,"bubble-send":"_bubble-send_a3bgv_1",deleting:Bl,"bubble-delete":"_bubble-delete_a3bgv_1",root:Cl,messageRow:Tl,collapsed:Dl,old:Ml,outgoing:Rl,incoming:El,email:Ll,bubbleRow:Al,content:ql,emailMeta:Fl,emailAuthor:Pl,emailSnippet:Ol,emailTimestamp:Wl,bubble:Hl,references:Gl,files:Ul,imageBubble:Vl,emailBodyWrapper:Kl,sentImage:Yl,imageCount:Xl,dots:Zl,sentVideo:Jl,imageButton:Ql,replyReference:ei,typing:ti,"typing-dot":"_typing-dot_a3bgv_1",menuButton:si,statusInline:ni,status_failed:oi,retry:ai,srOnly:ri};function li({children:t,variant:s="chat",textValue:n,side:o="outgoing",images:a=[],references:r,files:l=[],maxVisibleImages:i=4,status:c,statusLabel:u,onRetry:_,author:m,timestamp:f,replyTo:h,typing:p=!1,animate:x=!0,onEdit:N,onCopy:b,onReply:z,onDelete:g,menuItems:S,onMenuItemSelect:w,className:T,old:R,...H}){const[Q,ee]=d.useState(!!R),[Y,$]=d.useState(!1),[k,C]=d.useState(null),te=d.useRef(null),V=n??(typeof t=="string"?t:""),ne=a.slice(0,i),I=Math.max(0,a.length-ne.length),F=u??(c==="sent"?"Sent":c==="read"?"Read":void 0),oe=[m,f,F].filter(Boolean).join(" Β· "),le=s==="chat"&&!p&&!!oe,v=[f,F].filter(Boolean).join(" Β· "),D=!p&&(S!==void 0?S.length>0:o==="outgoing"||s==="email");async function A(){var G;await((G=navigator.clipboard)==null?void 0:G.writeText(V)),b==null||b(V)}function P(){Y||($(!0),te.current=setTimeout(()=>g==null?void 0:g(),200))}d.useEffect(()=>()=>{te.current&&clearTimeout(te.current)},[]);const B=D?e.jsx("div",{className:me.menuButton,children:e.jsx(Ee,{bare:!0,placement:"left-start",offset:4,trigger:e.jsx(xe,{icon:e.jsx(j.EllipsisIcon,{}),"aria-label":"Message actions",variant:"transparent",size:"xsmall",radius:"full"}),children:e.jsx(Qe,{children:S!==void 0?S.map(G=>e.jsx($e,{label:G.label,leftIcon:G.icon,variant:G.variant,disabled:G.disabled,onClick:()=>w==null?void 0:w(G)},G.id)):s==="email"&&o==="incoming"?e.jsxs(e.Fragment,{children:[e.jsx($e,{label:"Copy",leftIcon:e.jsx(j.CopyIcon,{size:15}),onClick:A}),e.jsx($e,{label:"Reply",leftIcon:e.jsx(j.ReplyIcon,{size:15}),onClick:()=>z==null?void 0:z(V)})]}):e.jsxs(e.Fragment,{children:[e.jsx($e,{label:"Edit",leftIcon:e.jsx(j.PencilIcon,{size:15}),onClick:()=>N==null?void 0:N(V)}),e.jsx($e,{label:"Copy",leftIcon:e.jsx(j.CopyIcon,{size:15}),onClick:A}),e.jsx($e,{label:"Reply",leftIcon:e.jsx(j.ReplyIcon,{size:15}),onClick:()=>z==null?void 0:z(V)}),e.jsx($e,{label:"Delete",leftIcon:e.jsx(j.TrashIcon,{size:15}),variant:"danger",disabled:!g,onClick:P})]})})})}):null;return e.jsxs("div",{className:[me.root,me[o],me[s],x&&me.animated,Y&&me.deleting,Q&&me.collapsed,R&&me.old,T].filter(Boolean).join(" "),tabIndex:le?0:void 0,role:"article","aria-label":`${o==="outgoing"?"Sent":"Received"} message${m?` from ${m}`:""}`,...H,children:[e.jsx("div",{className:me.messageRow,onClick:R?()=>ee(!Q):void 0,children:e.jsxs("div",{className:me.bubbleRow,children:[s==="chat"&&o==="outgoing"&&B,e.jsx(ht,{disabled:!le,placement:"top",content:e.jsx("span",{children:oe}),children:e.jsxs("div",{className:me.content,children:[s==="email"&&!p&&(m||v)&&e.jsxs("div",{className:me.emailMeta,children:[m&&e.jsx("strong",{className:me.emailAuthor,children:m}),Q&&e.jsx("span",{className:me.emailSnippet,children:V}),v&&e.jsx("span",{className:me.emailTimestamp,children:v})]}),!Q&&e.jsxs("div",{className:me.emailBodyWrapper,onClick:R?G=>G.stopPropagation():void 0,children:[!p&&r&&e.jsx("div",{className:me.references,children:r}),!p&&ne.length>0&&e.jsxs("div",{className:me.imageBubble,children:[ne.map((G,q)=>e.jsx("button",{type:"button",className:me.imageButton,"aria-label":`Open image ${q+1} of ${a.length}`,onClick:()=>C(q),children:e.jsx("img",{src:G.src,alt:G.alt??"",className:me.sentImage})},`${G.src}-${q}`)),I>0&&e.jsxs("button",{type:"button",className:me.imageCount,"aria-label":`Open ${I} more images`,onClick:()=>C(ne.length),children:["+",I]})]}),!p&&l.length>0&&e.jsx("div",{className:me.files,children:l.map(G=>{const q=/\.(mp4|webm|ogg|mov)$/i.test(G.name),U=G.src||G.url;return q&&U?e.jsx("video",{src:U,controls:!0,className:me.sentVideo,preload:"metadata"},G.id):e.jsx(Jn,{variant:"file",fileName:G.name,fileSize:G.size},G.id)})}),(p||t||o==="outgoing"&&(c==="sending"||c==="failed"))&&e.jsxs("div",{className:me.bubble,children:[p?e.jsx("div",{className:me.typing,role:"status","aria-label":"Typing",children:e.jsxs("span",{className:me.dots,"aria-hidden":!0,children:[e.jsx("span",{}),e.jsx("span",{}),e.jsx("span",{})]})}):e.jsxs(e.Fragment,{children:[h&&e.jsx("div",{className:me.replyReference,children:h}),e.jsx("div",{children:t})]}),!p&&o==="outgoing"&&(c==="sending"||c==="failed")&&e.jsxs("span",{className:[me.statusInline,c&&me[`status_${c}`]].filter(Boolean).join(" "),role:"status",children:[c==="sending"&&e.jsx(Ct,{size:"xs",label:"Message sending"}),c==="failed"&&e.jsx("button",{type:"button",className:me.retry,onClick:_,"aria-label":"Message failed. Retry",children:e.jsx(j.CircleAlertIcon,{size:14})}),c&&e.jsx("span",{className:me.srOnly,children:c})]})]})]})]})}),(s==="email"||o==="incoming")&&B]})}),k!==null&&e.jsx(zl,{images:a,index:k,onIndexChange:C,onClose:()=>C(null)})]})}const ii="_root_1yg2r_1",ci="_product_1yg2r_13",di="_collection_1yg2r_14",ui="_content_1yg2r_24",_i="_image_1yg2r_26",mi="_icon_1yg2r_27",fi="_title_1yg2r_53",hi="_description_1yg2r_54",pi="_priceRow_1yg2r_63",xi="_price_1yg2r_63",gi="_originalPrice_1yg2r_76",bi="_codeRow_1yg2r_83",ji="_code_1yg2r_83",vi="_link_1yg2r_97",yi="_checkoutContent_1yg2r_116",Ni="_checkoutItems_1yg2r_117",$i="_checkoutItem_1yg2r_117",wi="_checkoutItemText_1yg2r_119",ki="_checkoutItemTitle_1yg2r_136",ye={root:ii,product:ci,collection:di,"quick-checkout":"_quick-checkout_1yg2r_16",content:ui,image:_i,icon:mi,title:fi,description:hi,priceRow:pi,price:xi,originalPrice:gi,codeRow:bi,code:ji,link:vi,checkoutContent:yi,checkoutItems:Ni,checkoutItem:$i,checkoutItemText:wi,checkoutItemTitle:ki};function Ii({type:t="default",title:s,description:n,icon:o,image:a,imageAlt:r="",price:l,originalPrice:i,code:c,href:u,onCodeCopy:_,checkoutItems:m=[],checkoutHref:f,checkoutLabel:h="Checkout",onRemove:p,className:x,...N}){async function b(){var g;c&&(await((g=navigator.clipboard)==null?void 0:g.writeText(c)),_==null||_(c))}const z=t==="product"||t==="collection";return e.jsxs("div",{className:[ye.root,ye[t],x].filter(Boolean).join(" "),...N,children:[z?e.jsx(zt,{variant:"image",size:"square-xl",src:a,alt:r}):a?e.jsx("img",{src:a,alt:r,className:ye.image}):o?e.jsx("span",{className:ye.icon,"aria-hidden":!0,children:o}):t==="discount"?e.jsx("span",{className:ye.icon,"aria-hidden":!0,children:e.jsx(j.TagIcon,{size:15})}):null,e.jsxs("span",{className:ye.content,children:[e.jsx("span",{className:ye.title,children:s}),n&&e.jsx("span",{className:ye.description,children:n}),(l||i)&&e.jsxs("span",{className:ye.priceRow,children:[l&&e.jsx("span",{className:ye.price,children:l}),i&&e.jsx("span",{className:ye.originalPrice,children:i})]}),t==="discount"&&c&&e.jsxs("span",{className:ye.codeRow,children:[e.jsx("code",{className:ye.code,children:c}),e.jsx(xe,{icon:e.jsx(j.CopyIcon,{}),"aria-label":`Copy ${c}`,variant:"transparent",size:"2xsmall",radius:"full",onClick:b})]})]}),t==="quick-checkout"&&e.jsxs("span",{className:ye.checkoutContent,children:[e.jsx("span",{className:ye.checkoutItems,children:m.map(g=>e.jsxs("span",{className:ye.checkoutItem,children:[e.jsx(zt,{variant:"image",size:"base",src:g.image,alt:""}),e.jsxs("span",{className:ye.checkoutItemText,children:[e.jsx("span",{className:ye.checkoutItemTitle,children:g.title}),(g.price||g.originalPrice)&&e.jsxs("span",{className:ye.priceRow,children:[g.price&&e.jsx("span",{className:ye.description,children:g.price}),g.originalPrice&&e.jsx("span",{className:ye.originalPrice,children:g.originalPrice})]})]})]},g.id))}),f&&e.jsx(ve,{href:f,variant:"inverted",size:"sm",children:h})]}),u&&e.jsx("a",{className:ye.link,href:u,"aria-label":`Go to ${String(s)}`,children:e.jsx(j.ArrowUpRightIcon,{size:15})}),p&&e.jsx(xe,{icon:e.jsx(j.XIcon,{}),"aria-label":"Remove reference",variant:"transparent",size:"2xsmall",radius:"full",onClick:p})]})}const zi="_root_1eld0_1",Si="_line_1eld0_8",Bi="_label_1eld0_14",Ci="_unreadLabel_1eld0_15",Ti="_unread_1eld0_15",_t={root:zi,line:Si,label:Bi,unreadLabel:Ci,unread:Ti};function Di({label:t,className:s,...n}){return e.jsxs("div",{className:[_t.root,s].filter(Boolean).join(" "),role:"separator","aria-label":t,...n,children:[e.jsx("span",{className:_t.line}),e.jsx("time",{className:_t.label,children:t}),e.jsx("span",{className:_t.line})]})}function Mi({count:t,label:s,className:n,...o}){const a=s??`${t} unread messages`;return e.jsxs("div",{className:[_t.root,_t.unread,n].filter(Boolean).join(" "),role:"separator","aria-label":a,...o,children:[e.jsx("span",{className:_t.line}),e.jsx("span",{className:_t.unreadLabel,children:a}),e.jsx("span",{className:_t.line})]})}const Ri="_root_1dxv0_1",Ei="_sm_1dxv0_31",Li="_base_1dxv0_32",Ai="_lg_1dxv0_33",qi="_xl_1dxv0_34",Fi="_label_1dxv0_37",Pi="_iconWrap_1dxv0_43",Oi="_interactive_1dxv0_58",Wi="_subtle_1dxv0_59",Hi="_muted_1dxv0_60",Wt={root:Ri,sm:Ei,base:Li,lg:Ai,xl:qi,label:Fi,iconWrap:Pi,interactive:Oi,subtle:Wi,muted:Hi};function Jt({tone:t="interactive",size:s="base",leftIcon:n,rightIcon:o,children:a,className:r,disabled:l,...i}){return e.jsxs("button",{className:[Wt.root,Wt[t],Wt[s],r].filter(Boolean).join(" "),disabled:l,...i,children:[n&&e.jsx("span",{className:Wt.iconWrap,"aria-hidden":!0,children:n}),a&&e.jsx("span",{className:Wt.label,children:a}),o&&e.jsx("span",{className:Wt.iconWrap,"aria-hidden":!0,children:o})]})}const Gi="_root_yzw2i_1",Ui="_horizontal_yzw2i_6",Vi="_solid_yzw2i_11",Ki="_dashed_yzw2i_15",Yi="_vertical_yzw2i_24",Xi="_withLabel_yzw2i_43",Zi="_line_yzw2i_50",Ji="_label_yzw2i_67",nt={root:Gi,horizontal:Ui,solid:Vi,dashed:Ki,vertical:Yi,withLabel:Xi,line:Zi,label:Ji};function Qi({orientation:t="horizontal",variant:s="solid",children:n,className:o}){return n&&t==="horizontal"?e.jsxs("div",{role:"separator","aria-orientation":t,className:[nt.withLabel,o].filter(Boolean).join(" "),children:[e.jsx("span",{className:[nt.line,nt[s]].join(" ")}),e.jsx("span",{className:nt.label,children:n}),e.jsx("span",{className:[nt.line,nt[s]].join(" ")})]}):e.jsx("div",{role:"separator","aria-orientation":t,className:[nt.root,nt[t],nt[s],o].filter(Boolean).join(" ")})}const jt=t=>t===void 0?void 0:`var(--spacing-${t})`;function Qn(t){const{padding:s,paddingX:n,paddingY:o,paddingTop:a,paddingRight:r,paddingBottom:l,paddingLeft:i,margin:c,marginX:u,marginY:_,marginTop:m,marginRight:f,marginBottom:h,marginLeft:p,background:x,border:N,radius:b,shadow:z,width:g,height:S,minWidth:w,maxWidth:T,minHeight:R,maxHeight:H}=t;return{paddingTop:jt(a??o??s),paddingRight:jt(r??n??s),paddingBottom:jt(l??o??s),paddingLeft:jt(i??n??s),marginTop:jt(m??_??c),marginRight:jt(f??u??c),marginBottom:jt(h??_??c),marginLeft:jt(p??u??c),backgroundColor:x?`var(--backgrounds-bg-${x})`:void 0,border:N&&N!==!0?`1px solid var(--borders-border-${N})`:void 0,borderRadius:b?`var(--radius-${b})`:void 0,boxShadow:z?`var(--shadow-${z})`:N===!0?"var(--elevation-card-rest)":void 0,width:g,height:S,minWidth:w,maxWidth:T,minHeight:R,maxHeight:H}}function jn({as:t="div",className:s,style:n,children:o,padding:a,paddingX:r,paddingY:l,paddingTop:i,paddingRight:c,paddingBottom:u,paddingLeft:_,margin:m,marginX:f,marginY:h,marginTop:p,marginRight:x,marginBottom:N,marginLeft:b,background:z,border:g,radius:S,shadow:w,width:T,height:R,minWidth:H,maxWidth:Q,minHeight:ee,maxHeight:Y,...$}){const k=Qn({padding:a,paddingX:r,paddingY:l,paddingTop:i,paddingRight:c,paddingBottom:u,paddingLeft:_,margin:m,marginX:f,marginY:h,marginTop:p,marginRight:x,marginBottom:N,marginLeft:b,background:z,border:g,radius:S,shadow:w,width:T,height:R,minWidth:H,maxWidth:Q,minHeight:ee,maxHeight:Y});return e.jsx(t,{className:s,style:{...k,...n},...$,children:o})}const eo=["xs","sm","md","lg","xl","2xl"];function Ws(t){return typeof t=="object"&&t!==null}function Zt(t,s,n,o){const a=n===void 0?{}:Ws(n)?n:{xs:n};for(const r of eo){const l=a[r];t[`--${s}-${r}`]=l===void 0?"initial":o(l)}}const ec="_flex_75qj3_7",tc={flex:ec},sc={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch",baseline:"baseline"},nc={start:"flex-start",center:"center",end:"flex-end","space-between":"space-between","space-around":"space-around","space-evenly":"space-evenly"},oc=t=>`var(--spacing-${t})`;function ac({direction:t="row",gap:s,align:n,justify:o,wrap:a=!1,className:r,style:l,...i}){const c=Ws(t)?{xs:"row",...t}:t,u={};return Zt(u,"nv-flex-direction",c,_=>_),Zt(u,"nv-flex-gap",s,oc),e.jsx(jn,{className:[tc.flex,r].filter(Boolean).join(" "),style:{alignItems:n?sc[n]:void 0,justifyContent:o?nc[o]:void 0,flexWrap:a?"wrap":"nowrap",...u,...l},...i})}const rc="_grid_hwnxu_7",lc={grid:rc},ic=t=>typeof t=="number"?`repeat(${t}, 1fr)`:t,Dn=t=>`var(--spacing-${t})`;function cc({columns:t=1,gap:s,gapX:n,gapY:o,className:a,style:r,...l}){const i=Ws(t)?{xs:1,...t}:t,c={};return Zt(c,"nv-grid-columns",i,ic),Zt(c,"nv-grid-gap-x",n??s,Dn),Zt(c,"nv-grid-gap-y",o??s,Dn),e.jsx(jn,{className:[lc.grid,a].filter(Boolean).join(" "),style:{...c,...r},...l})}const dc="_button_1r0m4_1",uc={button:dc};function to({label:t="More actions",className:s,type:n="button",...o}){return e.jsx("button",{type:n,"aria-label":t,className:[uc.button,s].filter(Boolean).join(" "),...o,children:e.jsx(j.EllipsisVerticalIcon,{size:15,"aria-hidden":!0})})}const _c="_root_1h02n_1",mc="_disabled_1h02n_12",fc="_input_1h02n_17",hc="_box_1h02n_30",pc="_checked_1h02n_45",xc="_indeterminate_1h02n_46",gc="_label_1h02n_88",Dt={root:_c,disabled:mc,input:fc,box:hc,checked:pc,indeterminate:xc,label:gc};function ps({indeterminate:t=!1,label:s,disabled:n,checked:o,className:a,"data-state":r,...l}){const i=d.useRef(null);d.useEffect(()=>{i.current&&(i.current.indeterminate=t)},[t]);const c=[Dt.root,n&&Dt.disabled,a].filter(Boolean).join(" "),u=[Dt.box,o&&Dt.checked,t&&Dt.indeterminate].filter(Boolean).join(" ");return e.jsxs("label",{className:c,"data-state":r,children:[e.jsx("input",{ref:i,type:"checkbox",className:Dt.input,disabled:n,checked:o,readOnly:!l.onChange,...l}),e.jsxs("span",{className:u,"aria-hidden":!0,children:[o&&!t&&e.jsx(j.CheckIcon,{size:10,strokeWidth:3.5}),t&&e.jsx(j.MinusIcon,{size:10,strokeWidth:3.5})]}),s&&e.jsx("span",{className:Dt.label,children:s})]})}const bc="_root_7t1as_1",jc="_disabled_7t1as_10",vc="_input_7t1as_15",yc="_track_7t1as_28",Nc="_checked_7t1as_39",$c="_thumb_7t1as_45",wc="_small_7t1as_78",kc="_label_7t1as_98",ot={root:bc,disabled:jc,input:vc,track:yc,checked:Nc,thumb:$c,small:wc,label:kc};function vn({label:t,disabled:s,checked:n,size:o="default",className:a,"data-state":r,...l}){const i=[ot.root,s&&ot.disabled,o==="small"&&ot.small,a].filter(Boolean).join(" "),c=[ot.track,n&&ot.checked].filter(Boolean).join(" "),u=[ot.thumb,n&&ot.checked].filter(Boolean).join(" ");return e.jsxs("label",{className:i,"data-state":r,children:[e.jsx("input",{type:"checkbox",role:"switch",className:ot.input,disabled:s,checked:n,readOnly:!l.onChange,...l}),e.jsx("span",{className:c,"aria-hidden":!0,children:e.jsx("span",{className:u})}),t&&e.jsx("span",{className:ot.label,children:t})]})}const Ic="_cell_uhvjk_1",zc="_header_uhvjk_40",Sc="_content_uhvjk_72",Bc="_text_uhvjk_88",Cc="_multiline_uhvjk_95",Tc="_slot_uhvjk_104",Dc="_errorIcon_uhvjk_105",Mc="_error_uhvjk_105",Rc="_disabled_uhvjk_125",Ec="_readOnly_uhvjk_131",Lc="_hidden_uhvjk_142",Ac="_pinned_uhvjk_146",qc="_dirty_uhvjk_157",Fc="_dirtyIndicator_uhvjk_162",Pc="_dirtyDot_uhvjk_170",Oc="_selected_uhvjk_188",Wc="_dragSelected_uhvjk_215",Hc="_anchor_uhvjk_215",Gc="_fillHandle_uhvjk_228",je={cell:Ic,header:zc,"tone-base":"_tone-base_uhvjk_45","tone-subtle":"_tone-subtle_uhvjk_49","tone-muted":"_tone-muted_uhvjk_53","align-start":"_align-start_uhvjk_57","align-center":"_align-center_uhvjk_62","align-end":"_align-end_uhvjk_67",content:Sc,text:Bc,multiline:Cc,slot:Tc,errorIcon:Dc,error:Mc,disabled:Rc,readOnly:Ec,hidden:Lc,pinned:Ac,dirty:qc,dirtyIndicator:Fc,dirtyDot:Pc,selected:Oc,dragSelected:Wc,anchor:Hc,fillHandle:Gc},He=d.forwardRef(function({header:s=!1,tone:n=s?"subtle":"base",align:o="start",error:a=!1,disabled:r=!1,readOnly:l=!1,multiline:i=!1,anchor:c=!1,selected:u=!1,dragSelected:_=!1,clipboardValue:m,errorMessage:f,dirty:h=!1,dirtyLabel:p="Edited",hidden:x=!1,pinned:N,stickyOffset:b=0,width:z,leading:g,trailing:S,className:w,style:T,tabIndex:R,children:H,...Q},ee){const Y=d.Children.toArray(H).length>0&&d.Children.toArray(H).every($=>typeof $=="string"||typeof $=="number");return e.jsxs("div",{ref:ee,role:s?"columnheader":"gridcell","aria-disabled":r||void 0,"aria-readonly":l||void 0,"aria-invalid":a||void 0,"data-grid-cell":"true","data-grid-value":m==null?void 0:String(m),className:[je.cell,je[`tone-${n}`],je[`align-${o}`],s&&je.header,a&&je.error,r&&je.disabled,l&&je.readOnly,i&&je.multiline,c&&je.anchor,u&&je.selected,_&&je.dragSelected,h&&je.dirty,x&&je.hidden,N&&je.pinned,w].filter(Boolean).join(" "),style:{...z!==void 0?{width:z,flex:"none"}:{},...N?{position:"sticky",[N]:b}:{},...T},tabIndex:r?-1:R??0,...Q,children:[a&&(f?e.jsx(ht,{content:f,delay:0,children:e.jsx("span",{className:je.errorIcon,tabIndex:0,"aria-label":"Cell error",children:e.jsx(j.WarningCircleIcon,{size:15})})}):e.jsx("span",{className:je.errorIcon,"aria-hidden":!0,children:e.jsx(j.WarningCircleIcon,{size:15})})),g&&e.jsx("span",{className:je.slot,children:g}),e.jsx("span",{className:je.content,children:Y?e.jsx("span",{className:je.text,children:H}):H}),S&&e.jsx("span",{className:je.slot,children:S}),h&&e.jsx("span",{className:je.dirtyIndicator,children:e.jsx(ht,{content:p,delay:0,children:e.jsx("span",{className:je.dirtyDot,"aria-label":typeof p=="string"?p:void 0})})}),c&&e.jsx("span",{className:je.fillHandle,"data-grid-fill-handle":"true","aria-hidden":!0})]})}),Uc="_checkbox_8aiar_2",Vc={checkbox:Uc};function so({checked:t,onCheckedChange:s,disabled:n,label:o="Toggle value",variant:a="switch",align:r,...l}){return e.jsx(He,{disabled:n,align:r??(a==="checkbox"?"center":"start"),...l,children:a==="checkbox"?e.jsx(ps,{className:Vc.checkbox,checked:t,disabled:n,"aria-label":o,onChange:i=>s==null?void 0:s(i.target.checked)}):e.jsx(vn,{size:"small",checked:t,disabled:n,"aria-label":o,onChange:i=>s==null?void 0:s(i.target.checked)})})}const Kc="_input_18rm2_1",Yc="_number_18rm2_16",Xc="_currency_18rm2_18",Zc="_textarea_18rm2_19",Jc="_stepper_18rm2_20",qt={input:Kc,number:Yc,currency:Xc,textarea:Zc,stepper:Jc};function Hs({value:t,defaultValue:s="",onValueChange:n,inputProps:o,inputDisabled:a,showStepper:r=!0,disabled:l,error:i,trailing:c,...u}){const _=t!==void 0,[m,f]=d.useState(String(t??s));d.useEffect(()=>{_&&f(String(t??""))},[_,t]);const h=()=>n==null?void 0:n(m===""?null:Number(m)),p=x=>{const N=Number((o==null?void 0:o.step)??1),b=(o==null?void 0:o.min)===void 0?-1/0:Number(o.min),z=(o==null?void 0:o.max)===void 0?1/0:Number(o.max),g=Math.min(z,Math.max(b,(Number(m)||0)+x*N));f(String(g)),n==null||n(g)};return e.jsx(He,{disabled:l,error:i,trailing:c??(r&&e.jsxs("span",{className:qt.stepper,children:[e.jsx("button",{type:"button",tabIndex:-1,"aria-label":"Increase",onClick:()=>p(1),children:e.jsx(j.ChevronUpIcon,{size:12})}),e.jsx("button",{type:"button",tabIndex:-1,"aria-label":"Decrease",onClick:()=>p(-1),children:e.jsx(j.ChevronDownIcon,{size:12})})]})),...u,children:e.jsx("input",{className:[qt.input,qt.number].join(" "),type:"number",inputMode:"decimal",value:m,disabled:l||a,onChange:x=>f(x.target.value),onBlur:h,onKeyDown:x=>{x.key==="Enter"&&x.currentTarget.blur()},...o})})}function Qc(t,s){var n;return((n=new Intl.NumberFormat(s,{style:"currency",currency:t}).formatToParts(0).find(o=>o.type==="currency"))==null?void 0:n.value)??t}function no({currency:t="USD",locale:s="en",inputProps:n,accessory:o,action:a,showStepper:r=!1,...l}){return e.jsx(Hs,{leading:e.jsxs(e.Fragment,{children:[e.jsx("span",{className:qt.currency,children:Qc(t,s)}),o]}),trailing:a,showStepper:r,inputProps:{step:"0.01",...n},...l})}const ed="_separator_1js2l_1",td={separator:ed};function oo(){return e.jsx("div",{className:td.separator,role:"separator"})}const sd="_group_o27hj_1",nd="_groupLabel_o27hj_6",Mn={group:sd,groupLabel:nd};function od({label:t,children:s}){return e.jsxs("div",{className:Mn.group,role:"group",children:[e.jsx("span",{className:Mn.groupLabel,children:t}),s]})}const ad="_menuTitle_eu6pb_1",rd={menuTitle:ad};function ld({children:t,className:s}){return e.jsx("div",{className:[rd.menuTitle,s].filter(Boolean).join(" "),children:t})}const id="_caption_13w9b_1",cd="_captionIcon_13w9b_14",Rn={caption:id,captionIcon:cd};function dd({children:t,leftIcon:s,className:n}){return e.jsxs("div",{className:[Rn.caption,n].filter(Boolean).join(" "),children:[s&&e.jsx("span",{className:Rn.captionIcon,children:s}),e.jsx("span",{children:t})]})}const ud="_root_1sesb_2",_d="_inner_1sesb_14",md="_xsmall_1sesb_24",fd="_small_1sesb_25",hd="_base_1sesb_26",pd="_large_1sesb_27",xd="_xlarge_1sesb_28",gd="_full_1sesb_40",bd="_rounded_1sesb_43",jd="_letters_1sesb_59",vd="_image_1sesb_75",yd="_iconWrap_1sesb_83",vt={root:ud,inner:_d,"size-2xs":"_size-2xs_1sesb_23",xsmall:md,small:fd,base:hd,large:pd,xlarge:xd,"size-2xlarge":"_size-2xlarge_1sesb_29",full:gd,rounded:bd,letters:jd,"letters-size-2xs":"_letters-size-2xs_1sesb_66","letters-xsmall":"_letters-xsmall_1sesb_67","letters-small":"_letters-small_1sesb_68","letters-base":"_letters-base_1sesb_69","letters-large":"_letters-large_1sesb_70","letters-xlarge":"_letters-xlarge_1sesb_71","letters-size-2xlarge":"_letters-size-2xlarge_1sesb_72",image:vd,iconWrap:yd},En={"2xs":10,xsmall:12,small:13,base:15,large:16,xlarge:18,"2xlarge":20},Ln={"2xs":"size-2xs",xsmall:"xsmall",small:"small",base:"base",large:"large",xlarge:"xlarge","2xlarge":"size-2xlarge"};function St({size:t="base",shape:s="full",className:n,href:o,target:a,rel:r,...l}){const i=[vt.root,vt[Ln[t]],vt[s],n].filter(Boolean).join(" "),c=o?"a":"div";return e.jsx(c,{className:i,href:o,target:a,rel:r,children:e.jsxs("div",{className:vt.inner,children:[l.type==="letters"&&e.jsx("span",{className:[vt.letters,vt[`letters-${Ln[t]}`]].join(" "),children:l.initials.slice(0,2).toUpperCase()}),l.type==="image"&&e.jsx("img",{src:l.src,alt:l.alt??"",className:vt.image,draggable:!1}),l.type==="icon"&&e.jsx("span",{className:vt.iconWrap,style:{width:En[t],height:En[t]},children:l.icon})]})})}const Nd="_root_qhrr0_2",$d="_pill_qhrr0_57",wd="_iconSlot_qhrr0_68",kd="_iconOnly_qhrr0_76",Id="_iconWrap_qhrr0_84",zd="_dotWrap_qhrr0_94",Sd="_dot_qhrr0_94",Bd="_status_qhrr0_111",Fe={root:Nd,"size-2xs":"_size-2xs_qhrr0_16","size-xs":"_size-xs_qhrr0_24","size-sm":"_size-sm_qhrr0_32","size-base":"_size-base_qhrr0_40","size-lg":"_size-lg_qhrr0_48",pill:$d,iconSlot:wd,iconOnly:kd,iconWrap:Id,dotWrap:zd,dot:Sd,status:Bd,"preset-beta":"_preset-beta_qhrr0_122","preset-new":"_preset-new_qhrr0_123","preset-coming-soon":"_preset-coming-soon_qhrr0_124","color-neutral":"_color-neutral_qhrr0_163","color-information":"_color-information_qhrr0_171","color-feature":"_color-feature_qhrr0_179","color-success":"_color-success_qhrr0_187","color-warning":"_color-warning_qhrr0_195","color-error":"_color-error_qhrr0_203"};function Bt({color:t="neutral",size:s="2xs",preset:n,dot:o=!1,pill:a=!1,leftIcon:r,rightIcon:l,icon:i,children:c,className:u,style:_}){const m=!!i&&!c&&!o&&!n&&!r&&!l,f=[Fe.root,Fe[`size-${s}`],n?Fe[`preset-${n}`]:Fe[`color-${t}`],o&&Fe.status,a&&!n&&Fe.pill,m&&Fe.iconOnly,u].filter(Boolean).join(" ");return e.jsxs("span",{className:f,style:_,children:[o&&e.jsx("span",{className:Fe.dotWrap,"aria-hidden":!0,children:e.jsx("span",{className:Fe.dot})}),m?e.jsx("span",{className:Fe.iconWrap,"aria-hidden":!0,children:i}):e.jsxs(e.Fragment,{children:[r&&e.jsx("span",{className:Fe.iconSlot,"aria-hidden":!0,children:r}),c&&e.jsx("span",{children:c}),l&&e.jsx("span",{className:Fe.iconSlot,"aria-hidden":!0,children:l})]})]})}const Cd="_menuAvatar_1u5ju_1",Td="_avatarInfo_1u5ju_10",Dd="_avatarName_1u5ju_18",Md="_avatarEmail_1u5ju_28",gs={menuAvatar:Cd,avatarInfo:Td,avatarName:Dd,avatarEmail:Md};function Rd({name:t,email:s,src:n,initials:o,badge:a,className:r}){return e.jsxs("div",{className:[gs.menuAvatar,r].filter(Boolean).join(" "),children:[n?e.jsx(St,{type:"image",src:n,size:"small",shape:"full"}):e.jsx(St,{type:"letters",initials:o??t.slice(0,2),size:"small",shape:"full"}),e.jsxs("div",{className:gs.avatarInfo,children:[e.jsx("span",{className:gs.avatarName,children:t}),s&&e.jsx("span",{className:gs.avatarEmail,children:s})]}),a&&e.jsx(Bt,{color:"neutral",size:"2xs",children:a})]})}const Ed="_root_u5hmq_1",Ld="_plus_u5hmq_12",Ad="_text_u5hmq_12",qd="_subtle_u5hmq_13",Fd="_optional_u5hmq_17",Pd="_info_u5hmq_24",ns={root:Ed,plus:Ld,text:Ad,subtle:qd,optional:Fd,info:Pd};function yn({type:t="subtle",optional:s=!1,tooltip:n,htmlFor:o,children:a,className:r}){const l=[ns.root,ns[t],r].filter(Boolean).join(" ");return e.jsxs("label",{htmlFor:o,className:l,children:[e.jsx("span",{className:ns.text,children:a}),s&&e.jsx("span",{className:ns.optional,children:"(Optional)"}),n&&e.jsx(ht,{content:n,placement:"top",children:e.jsx(j.InfoIcon,{size:15,className:ns.info})})]})}const Od="_track_biq63_7",Wd="_sm_biq63_16",Hd="_md_biq63_17",Gd="_lg_biq63_18",Ud="_fill_biq63_21",Vd="_indeterminate_biq63_27",Kd="_neutral_biq63_35",Yd="_information_biq63_36",Xd="_success_biq63_37",Zd="_warning_biq63_38",Jd="_error_biq63_39",os={track:Od,sm:Wd,md:Hd,lg:Gd,fill:Ud,indeterminate:Vd,neutral:Kd,information:Yd,success:Xd,warning:Zd,error:Jd};function ao({value:t=0,max:s=100,color:n="information",size:o="md",indeterminate:a=!1,className:r,label:l}){const i=a?void 0:Math.min(100,Math.max(0,t/s*100));return e.jsx("div",{className:[os.track,os[o],os[n],r].filter(Boolean).join(" "),role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,"aria-label":l,children:e.jsx("div",{className:[os.fill,a&&os.indeterminate].filter(Boolean).join(" "),style:i!==void 0?{width:`${i}%`}:void 0})})}const Qd="_menuUsage_kfhrv_1",eu="_usageHeader_kfhrv_10",tu="_usageValue_kfhrv_17",su="_usageMessage_kfhrv_30",as={menuUsage:Qd,usageHeader:eu,usageValue:tu,"usageValue-normal":"_usageValue-normal_kfhrv_25","usageValue-warning":"_usageValue-warning_kfhrv_26","usageValue-critical":"_usageValue-critical_kfhrv_27","usageValue-empty":"_usageValue-empty_kfhrv_28",usageMessage:su};function nu(t,s){if(t===0)return"empty";const n=t/s;return n<=.1?"critical":n<=.2?"warning":"normal"}const ou={normal:"success",warning:"warning",critical:"error",empty:"neutral"},au={warning:"Less than 20% of credits left. Consider upgrading to avoid interruptions.",critical:"Less than 10% of credits left. Consider upgrading to avoid interruptions.",empty:"All credits have been used. Consider upgrading to avoid interruptions."};function ru({label:t,tooltip:s,value:n,max:o,actionLabel:a="Upgrade plan",onAction:r,className:l}){const i=nu(n,o),c=i!=="normal";return e.jsxs("div",{className:[as.menuUsage,l].filter(Boolean).join(" "),children:[e.jsxs("div",{className:as.usageHeader,children:[e.jsx(yn,{type:"plus",tooltip:s,children:t}),e.jsxs("span",{className:[as.usageValue,as[`usageValue-${i}`]].join(" "),children:[n," / ",o]})]}),e.jsx(ao,{value:n,max:o,color:ou[i],size:"sm"}),c&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:as.usageMessage,children:au[i]}),e.jsx(ve,{variant:"neutral",size:"base",onClick:r,style:{width:"100%"},children:a})]})]})}const lu="_root_10f5b_2",Vs={root:lu,"size-thin":"_size-thin_10f5b_7","size-default":"_size-default_10f5b_8","dir-y":"_dir-y_10f5b_11","dir-x":"_dir-x_10f5b_12","dir-both":"_dir-both_10f5b_13"},Tt=d.forwardRef(function({children:s,direction:n="y",size:o="thin",maxHeight:a,maxWidth:r,onScroll:l,className:i,style:c},u){const _=[Vs.root,Vs[`dir-${n}`],Vs[`size-${o}`],i].filter(Boolean).join(" ");return e.jsx("div",{ref:u,className:_,onScroll:l,style:{maxHeight:a,maxWidth:r,...c},children:s})}),iu="_menu_740d6_1",cu="_items_740d6_6",du="_footer_740d6_12",Ks={menu:iu,items:cu,footer:du};function ro({columns:t,onVisibilityChange:s,onReset:n,label:o="View",disabled:a}){const r=t.some(l=>!l.visible);return e.jsx(Ee,{placement:"bottom-start",bare:!0,trigger:e.jsx(ve,{variant:"neutral",size:"sm",disabled:a,leftIcon:e.jsx(j.SlidersHorizontalIcon,{size:15}),children:o}),children:e.jsxs(Qe,{className:Ks.menu,children:[e.jsx(Tt,{direction:"y",size:"thin",maxHeight:"320px",className:Ks.items,children:t.map(l=>e.jsx(Xn,{label:l.label,checked:l.visible,disabled:l.disabled,onClick:()=>s(l.id,!l.visible)},l.id))}),r&&n&&e.jsxs("div",{className:Ks.footer,children:[e.jsx(oo,{}),e.jsx($e,{label:"Reset columns",onClick:n})]})]})})}const uu="_header_pi8tp_1",_u="_actions_pi8tp_13",mu="_content_pi8tp_20",bs={header:uu,actions:_u,content:mu};function lo({start:t,end:s,children:n,className:o,...a}){return e.jsxs("div",{className:[bs.header,o].filter(Boolean).join(" "),...a,children:[e.jsx("div",{className:bs.actions,children:t}),n&&e.jsx("div",{className:bs.content,children:n}),e.jsx("div",{className:bs.actions,children:s})]})}const fu="_label_spf5k_1",hu="_info_spf5k_2",pu="_icon_spf5k_2",Ys={label:fu,info:hu,icon:pu};function io({children:t,thumbnail:s,tooltip:n,errorCount:o,icon:a,...r}){const l=o!==void 0&&o>0;return e.jsxs(He,{header:!0,leading:s,trailing:l||a?e.jsxs(e.Fragment,{children:[l&&e.jsx(Bt,{color:"error",children:o}),a&&e.jsx("span",{className:Ys.icon,children:a})]}):void 0,...r,children:[e.jsx("span",{className:Ys.label,children:t}),n&&e.jsx(ht,{content:n,delay:0,children:e.jsx("span",{className:Ys.info,tabIndex:0,"aria-label":"More information",children:e.jsx(j.InfoIcon,{size:15})})})]})}const xu="_root_1w7o6_1",gu="_message_1w7o6_2",bu="_count_1w7o6_3",Xs={root:xu,message:gu,count:bu};function co({errors:t,activeIndex:s=0,onErrorSelect:n,className:o}){if(t.length===0)return null;const a=Math.min(s,t.length-1),r=t[a];return e.jsxs("div",{className:[Xs.root,o].filter(Boolean).join(" "),role:"status",children:[e.jsx(j.WarningCircleIcon,{size:15,"aria-hidden":!0}),e.jsx("span",{className:Xs.message,children:r.message}),e.jsxs("span",{className:Xs.count,children:[a+1,"/",t.length]}),e.jsx(ve,{variant:"neutral",size:"sm",onClick:()=>n==null?void 0:n(r,a),children:"Go to error"})]})}function uo({children:t,action:s,actionProps:n,disabled:o,...a}){return e.jsx(He,{disabled:o,trailing:e.jsx(Jt,{tone:"interactive",size:"sm",disabled:o,...n,children:s}),...a,children:t})}function _o({children:t,color:s="muted",...n}){return e.jsx(He,{tone:s==="muted"?"subtle":"base",readOnly:!0,...n,children:t})}const ju="_row_6u4cf_1",vu="_header_6u4cf_12",An={row:ju,header:vu};function Ps({header:t=!1,rowIndex:s,className:n,children:o,...a}){return e.jsx("div",{role:"row","data-row-index":s,className:[An.row,t&&An.header,n].filter(Boolean).join(" "),...a,children:o})}const yu="_skeleton_10bej_1",Nu="_animated_10bej_16",$u="_pulse_10bej_1",Zs={skeleton:yu,"tone-base":"_tone-base_10bej_8","tone-subtle":"_tone-subtle_10bej_12",animated:Nu,pulse:$u};function Ne({width:t,height:s,radius:n,animated:o=!0,tone:a="base",className:r,style:l}){const i={...l};return t!==void 0&&(i.width=typeof t=="number"?`${t}px`:t),s!==void 0&&(i.height=typeof s=="number"?`${s}px`:s),n!==void 0&&(i.borderRadius=n==="full"?"9999px":typeof n=="number"?`${n}px`:n),e.jsx("span",{className:[Zs.skeleton,Zs[`tone-${a}`],o?Zs.animated:"",r].filter(Boolean).join(" "),style:i,"aria-hidden":"true"})}function mo({columns:t,rows:s=5,className:n}){return e.jsxs(vo,{columns:t,className:n,"aria-label":"Loading data","aria-busy":"true",children:[e.jsx(Ps,{header:!0,children:Array.from({length:t},(o,a)=>e.jsx(He,{header:!0,children:e.jsx(Ne,{width:"70%",height:12})},a))}),Array.from({length:s},(o,a)=>e.jsx(Ps,{children:Array.from({length:t},(r,l)=>e.jsx(He,{children:e.jsx(Ne,{width:"60%",height:12})},l))},a))]})}const wu="_value_gtwgo_1",ku="_hiddenSelect_gtwgo_12",Iu="_trigger_gtwgo_22",zu="_popoverPanel_gtwgo_37",Ls={value:wu,hiddenSelect:ku,trigger:Iu,popoverPanel:zu};function fo({value:t,options:s,onValueChange:n,placeholder:o="Select",disabled:a,selectProps:r,...l}){const i=s.find(g=>g.value===t),[c,u]=d.useState(!1),_=d.useRef(null),m=d.useCallback(()=>{var g,S;return((g=_.current)==null?void 0:g.dataset.anchor)==="true"||((S=_.current)==null?void 0:S.dataset.selected)==="true"},[]),f=d.useCallback(()=>{a||u(!0)},[a]),h=d.useCallback(g=>{if(g.target.closest("[data-select-trigger]")){g.stopPropagation(),f();return}m()&&f()},[m,f]),p=d.useCallback(g=>{g.preventDefault(),f()},[f]),x=d.useCallback(g=>{(g.key==="Enter"||g.key===" "||g.key==="ArrowDown")&&g.target.closest('[role="gridcell"]')===_.current&&(g.preventDefault(),g.stopPropagation(),f())},[f]),N=d.useCallback(g=>{var S;n==null||n(g),u(!1),(S=_.current)==null||S.focus()},[n]),b=(i==null?void 0:i.render)??(i==null?void 0:i.label)??o,z=e.jsx("span",{"data-select-trigger":!0,className:Ls.trigger,role:"button",tabIndex:-1,"aria-label":"Open options",children:e.jsx(j.CaretUpDownIcon,{size:15})});return e.jsxs(He,{ref:_,disabled:a,trailing:z,clipboardValue:t,onClick:h,onDoubleClick:p,onKeyDown:x,...l,children:[e.jsx("span",{className:Ls.value,children:b}),e.jsx("select",{className:Ls.hiddenSelect,value:t,tabIndex:-1,"aria-hidden":"true",onChange:()=>{},children:s.map(g=>e.jsx("option",{value:g.value,children:g.label},g.value))}),c&&e.jsx(Su,{cellRef:_,options:s,value:t,onSelect:N,onClose:()=>{var g;u(!1),(g=_.current)==null||g.focus()}})]})}function Su({cellRef:t,options:s,value:n,onSelect:o,onClose:a}){var h;const r=d.useRef(null),l=(h=t.current)==null?void 0:h.getBoundingClientRect(),i=l?l.bottom+4:0,c=l?l.left:0,u=l?l.width:220,_=typeof window<"u"?window.innerHeight:9999,m=Math.min(s.length*32+16,300),f=i+m>_-8?l?l.top-m-4:0:i;return d.useEffect(()=>{function p(x){x.key==="Escape"&&(x.preventDefault(),x.stopPropagation(),a())}return document.addEventListener("keydown",p,!0),()=>document.removeEventListener("keydown",p,!0)},[a]),d.useEffect(()=>{function p(x){var N,b;(N=r.current)!=null&&N.contains(x.target)||(b=t.current)!=null&&b.contains(x.target)||a()}return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[a,t]),d.useEffect(()=>{function p(x){var N;(N=r.current)!=null&&N.contains(x.target)||a()}return window.addEventListener("scroll",p,{capture:!0,passive:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})},[a]),pt.createPortal(e.jsx("div",{ref:r,className:Ls.popoverPanel,style:{top:f,left:c,minWidth:u},onMouseDown:p=>p.stopPropagation(),role:"listbox","aria-label":"Select option","data-popover-panel":!0,children:e.jsx(Qe,{children:s.map(p=>e.jsx(Yn,{label:p.label,checked:p.value===n,disabled:p.disabled,onClick:()=>o(p.value)},p.value))})}),document.body)}function ho({value:t,defaultValue:s="",onValueChange:n,inputProps:o,disabled:a,error:r,...l}){const i=t!==void 0,[c,u]=d.useState(t??s);d.useEffect(()=>{i&&u(t??"")},[i,t]);const _=()=>n==null?void 0:n(c);return e.jsx(He,{disabled:a,error:r,...l,children:e.jsx("input",{className:qt.input,value:c,disabled:a,onChange:m=>u(m.target.value),onBlur:_,onKeyDown:m=>{m.key==="Enter"&&m.currentTarget.blur(),m.key==="Escape"&&(u(t??s),m.currentTarget.blur())},...o})})}function po({value:t,defaultValue:s="",onValueChange:n,textareaProps:o,disabled:a,...r}){const l=t!==void 0,[i,c]=d.useState(t??s),u=d.useRef(null);return d.useEffect(()=>{l&&c(t??"")},[l,t]),d.useEffect(()=>{u.current&&(u.current.style.height="0px",u.current.style.height=`${Math.max(u.current.scrollHeight,24)}px`)},[i]),e.jsx(He,{multiline:!0,disabled:a,...r,children:e.jsx("textarea",{ref:u,className:[qt.input,qt.textarea].join(" "),value:i,disabled:a,onChange:_=>c(_.target.value),onBlur:()=>n==null?void 0:n(i),...o})})}function xo({value:t,onValueChange:s,toggleLabel:n="Toggle quantity",...o}){const a=r=>s==null?void 0:s({...t,checked:r,quantity:r?t.quantity??0:null});return e.jsx(Hs,{...o,value:t.quantity??"",inputDisabled:!t.checked,leading:e.jsx(vn,{size:"small",checked:t.checked,disabled:t.disabledToggle,"aria-label":n,onChange:r=>a(r.target.checked)}),onValueChange:r=>s==null?void 0:s({...t,quantity:r,checked:r!==null})})}const go=40,Bu="_viewport_1hdir_1",Cu="_canvas_1hdir_6",Tu="_window_1hdir_11",Js={viewport:Bu,canvas:Cu,window:Tu};function qn(t,s){return s.getBoundingClientRect().top-t.getBoundingClientRect().top+t.scrollTop}function bo({items:t,height:s,rowHeight:n=go,overscan:o=5,renderRow:a,onEndReached:r,endReachedThreshold:l=10,loadingMore:i=!1,className:c}){const{scrollContainerRef:u,setBodyHeight:_}=d.useContext(jo),m=d.useRef(null),[f,h]=d.useState(0),[p,x]=d.useState(0),N=s??p;d.useEffect(()=>{if(s!==void 0)return _==null||_(s),()=>_==null?void 0:_(0)},[s,_]),d.useEffect(()=>{if(s!==void 0)return;const w=u==null?void 0:u.current;if(!w||!m.current)return;const T=()=>x(Math.max(0,w.clientHeight-qn(w,m.current))),R=new ResizeObserver(T);return R.observe(w),T(),()=>R.disconnect()},[s,u]),d.useEffect(()=>{const w=u==null?void 0:u.current;if(!w||!m.current)return;const T=()=>{h(Math.max(0,w.scrollTop-qn(w,m.current)));const R=w.scrollHeight-w.scrollTop-w.clientHeight;!i&&R<=n*l&&(r==null||r())};return w.addEventListener("scroll",T,{passive:!0}),T(),()=>w.removeEventListener("scroll",T)},[u,i,n,l,r]);const b=Math.max(0,Math.floor(f/n)-o),z=Math.ceil(N/n)+o*2,g=Math.min(t.length,b+z),S=d.useMemo(()=>t.slice(b,g),[t,b,g]);return e.jsx("div",{ref:m,className:[Js.viewport,c].filter(Boolean).join(" "),style:s!==void 0?{minHeight:s}:void 0,role:"rowgroup",children:e.jsx("div",{className:Js.canvas,style:{height:t.length*n},children:e.jsx("div",{className:Js.window,style:{"--nv-data-grid-offset":`${b*n}px`},children:S.map((w,T)=>a(w,b+T))})})})}const Du="_grid_qa1ux_1",Mu={grid:Du},jo=d.createContext({scrollContainerRef:null}),Ru='button, a[href], [role="button"]:not([data-select-trigger]), [data-grid-interactive]';function Qs(t){var s;return t instanceof Element&&!!((s=t.closest(Ru))!=null&&s.closest('[role="gridcell"]'))}function Eu({columns:t=1,totalRows:s,className:n,style:o,children:a,onKeyDown:r,onMouseDown:l,onMouseOver:i,onMouseUp:c,onCopy:u,onPaste:_,selection:m,defaultSelection:f=null,onSelectionChange:h,getCellValue:p,onPasteCells:x,onCopyCells:N,onFill:b,onUndo:z,onRedo:g,onDoubleClick:S,...w}){const T=typeof t=="number"?`repeat(${t}, minmax(0, 1fr))`:t,R=d.useRef(null),[H,Q]=d.useState(),[ee,Y]=d.useState(f),$=m===void 0?ee:m,k=d.useRef(!1),C=d.useRef(!1),te=d.useRef(null),V=()=>{if(!R.current)return[];const v=Array.from(R.current.querySelectorAll('[role="row"]'));if(!v.some(P=>P.dataset.rowIndex!==void 0))return v.map(P=>Array.from(P.querySelectorAll(':scope > [role="gridcell"]'))).filter(P=>P.length>0);const A=[];for(const P of v){const B=P.dataset.rowIndex;if(B===void 0)continue;const G=Array.from(P.querySelectorAll(':scope > [role="gridcell"]'));G.length>0&&(A[Number(B)]=G)}return A},ne=v=>{const D=v instanceof Element?v.closest('[role="gridcell"]'):null;if(!D)return null;const A=D.closest('[role="row"]');if(!A)return null;if(A.dataset.rowIndex!==void 0){const G=Number(A.dataset.rowIndex),U=Array.from(A.querySelectorAll(':scope > [role="gridcell"]')).indexOf(D);return U>=0?{row:G,column:U}:null}const P=V(),B=P.findIndex(G=>G==null?void 0:G.includes(D));return B<0?null:{row:B,column:P[B].indexOf(D)}},I=v=>{var D;return!(v instanceof Node&&((D=R.current)!=null&&D.contains(v)))},F=v=>{m===void 0&&Y(v),h==null||h(v)},oe=d.useRef();d.useEffect(()=>{const v=()=>{var L,M,K;const A=V();if(A.forEach(ae=>{ae&&ae.forEach(he=>{delete he.dataset.selected,delete he.dataset.anchor,delete he.dataset.rangeSelected,delete he.dataset.fillTarget})}),!$)return;const P=Math.min($.anchor.row,$.end.row),B=Math.max($.anchor.row,$.end.row),G=Math.min($.anchor.column,$.end.column),q=Math.max($.anchor.column,$.end.column);for(let ae=P;ae<=B;ae+=1)for(let he=G;he<=q;he+=1){const X=(L=A[ae])==null?void 0:L[he];X&&(X.dataset.rangeSelected="true")}const U=(M=A[$.anchor.row])==null?void 0:M[$.anchor.column];if(U&&(U.dataset.selected="true",U.dataset.anchor="true"),te.current){const ae=Math.min(P,te.current.row),he=Math.max(B,te.current.row),X=Math.min(G,te.current.column),re=Math.max(q,te.current.column);for(let ce=ae;ce<=he;ce+=1)for(let pe=X;pe<=re;pe+=1){const E=(K=A[ce])==null?void 0:K[pe];E&&!E.dataset.rangeSelected&&(E.dataset.fillTarget="true")}}};if(oe.current=v,v(),!R.current)return;const D=new MutationObserver(A=>{A.some(B=>B.addedNodes.length>0||B.removedNodes.length>0)&&v()});return D.observe(R.current,{childList:!0,subtree:!0}),()=>D.disconnect()},[$,a]);const le=v=>{const D=V(),A=Math.min(v.anchor.row,v.end.row),P=Math.max(v.anchor.row,v.end.row),B=Math.min(v.anchor.column,v.end.column),G=Math.max(v.anchor.column,v.end.column);return Array.from({length:P-A+1},(q,U)=>Array.from({length:G-B+1},(L,M)=>{var he;if(p)return p(A+U,B+M);const K=(he=D[A+U])==null?void 0:he[B+M];if(!K)return"";const ae=K.querySelector("input, textarea, select");return K.dataset.gridValue??(ae==null?void 0:ae.value)??K.innerText.trim()}))};return e.jsx(jo.Provider,{value:{scrollContainerRef:R,bodyHeight:H,setBodyHeight:Q},children:e.jsx("div",{role:"grid",ref:R,className:[Mu.grid,n].filter(Boolean).join(" "),style:{"--nv-data-grid-columns":T,maxHeight:H?`calc(${H}px + var(--nv-data-grid-header-height, 65px))`:void 0,...o},onKeyDown:v=>{var K,ae,he,X,re,ce,pe,E,W,y,Z,se,ge;if(r==null||r(v),v.defaultPrevented||I(v.target)||Qs(v.target)&&(v.key==="Enter"||v.key===" "))return;const D=v.metaKey||v.ctrlKey;if(D&&v.key.toLowerCase()==="z"){v.preventDefault(),v.shiftKey?g==null||g():z==null||z();return}if(D&&v.key.toLowerCase()==="y"){v.preventDefault(),g==null||g();return}if(D&&v.key.toLowerCase()==="a"){v.preventDefault();const _e=V(),Te=s!=null?s-1:_e.length-1,et=(((K=_e.find(Ye=>Ye))==null?void 0:K.length)??1)-1;Te>=0&&et>=0&&F({anchor:{row:0,column:0},end:{row:Te,column:et}});return}const A=v.target.matches("input, textarea, select");if(A&&!["Escape","Tab","Enter"].includes(v.key))return;const P=V(),B=ne(v.target)??($==null?void 0:$.anchor);if(!B)return;const G=((he=(ae=P[B.row])==null?void 0:ae[B.column])==null?void 0:he.getAttribute("aria-readonly"))==="true";if(!A&&v.key.length===1&&!D){if(G)return;const _e=(re=(X=P[B.row])==null?void 0:X[B.column])==null?void 0:re.querySelector("input, textarea, select");_e&&_e.focus();return}if(v.key==="Enter"&&!A){if(v.preventDefault(),G)return;(E=(pe=(ce=P[B.row])==null?void 0:ce[B.column])==null?void 0:pe.querySelector("input, textarea, select, button"))==null||E.focus();return}if(v.key==="Escape"&&A){v.preventDefault(),v.target.blur(),(y=(W=P[B.row])==null?void 0:W[B.column])==null||y.focus();return}const q=v.key==="Tab"&&!v.shiftKey,U=v.key==="Tab"&&v.shiftKey,L=v.key==="ArrowLeft"||U?{row:B.row,column:B.column-1}:v.key==="ArrowRight"||q?{row:B.row,column:B.column+1}:v.key==="ArrowUp"?{row:B.row-1,column:B.column}:v.key==="ArrowDown"||v.key==="Enter"?{row:B.row+1,column:B.column}:null;if(!L)return;L.column>=(((Z=P[L.row])==null?void 0:Z.length)??0)?(L.row+=1,L.column=0):L.column<0&&(L.row-=1,L.column=(((se=P[L.row])==null?void 0:se.length)??1)-1);const M=(ge=P[L.row])==null?void 0:ge[L.column];M&&(v.preventDefault(),M.focus(),F(v.shiftKey&&$?{anchor:$.anchor,end:L}:{anchor:L,end:L}))},onDoubleClick:v=>{var A;if(S==null||S(v),v.defaultPrevented||I(v.target)||Qs(v.target))return;const D=v.target.closest('[role="gridcell"]');(D==null?void 0:D.getAttribute("aria-readonly"))!=="true"&&((A=D==null?void 0:D.querySelector("input, textarea, select"))==null||A.focus())},onMouseDown:v=>{if(l==null||l(v),I(v.target)||Qs(v.target)||v.target.matches("input:focus, textarea:focus, select:focus"))return;v.button===0&&v.preventDefault();const D=ne(v.target);if(!D)return;const A=v.target.closest('[role="gridcell"]'),P=A==null?void 0:A.getBoundingClientRect(),B=!!P&&!!$&&$.anchor.row===D.row&&$.anchor.column===D.column&&v.clientX>=P.right-8&&v.clientY>=P.bottom-8;if(v.target.closest("[data-grid-fill-handle]")||B){C.current=!0,te.current=D;return}k.current=!0,A==null||A.focus(),F(v.shiftKey&&$?{anchor:$.anchor,end:D}:{anchor:D,end:D})},onMouseOver:v=>{var A;i==null||i(v);const D=ne(v.target);if(D){if(k.current||C.current){const P=document.activeElement;P!=null&&P.matches("input, textarea, select")&&P.blur()}C.current?(te.current=D,(A=oe.current)==null||A.call(oe)):k.current&&$&&F({anchor:$.anchor,end:D})}},onMouseUp:v=>{var D;c==null||c(v),k.current=!1,C.current&&$&&te.current&&(b==null||b({source:$,target:te.current})),C.current=!1,te.current=null,(D=oe.current)==null||D.call(oe)},onCopy:v=>{if(u==null||u(v),!$||v.defaultPrevented)return;const D=le($),A=D.map(P=>P.join(" ")).join(`
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("react"),j=require("@nevuto/icons"),pt=require("react-dom"),oa="_root_1l23b_1",aa="_item_1l23b_9",ra="_unordered_1l23b_20",la="_ordered_1l23b_24",Es={root:oa,item:aa,unordered:ra,ordered:la};function ia({children:t,className:s}){return e.jsx("li",{className:[Es.item,s].filter(Boolean).join(" "),children:t})}function Vn({ordered:t=!1,children:s,className:n}){const o=t?"ol":"ul";return e.jsx(o,{className:[Es.root,t?Es.ordered:Es.unordered,n].filter(Boolean).join(" "),children:s})}Vn.Item=ia;const ca="_root_r9m7s_1",da="_transparent_r9m7s_32",ua="_sm_r9m7s_37",_a="_base_r9m7s_38",ma="_lg_r9m7s_39",fa="_xl_r9m7s_40",ha="_inverted_r9m7s_43",pa="_loading_r9m7s_51",xa="_neutral_r9m7s_64",ga="_danger_r9m7s_85",ba="_fullWidth_r9m7s_173",ja="_dark_r9m7s_178",va="_content_r9m7s_197",ya="_spinnerWrapper_r9m7s_209",Na="_spinner_r9m7s_209",$a="_spin_r9m7s_209",gt={root:ca,transparent:da,sm:ua,base:_a,lg:ma,xl:fa,inverted:ha,loading:pa,neutral:xa,danger:ga,fullWidth:ba,dark:ja,content:va,spinnerWrapper:ya,spinner:Na,spin:$a};function ve({variant:t="inverted",size:s="base",loading:n=!1,fullWidth:o=!1,leftIcon:a,rightIcon:r,children:l,className:i,...c}){const u=[gt.root,gt[t],gt[s],n&>.loading,o&>.fullWidth,i].filter(Boolean).join(" "),_=e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:gt.content,style:n?{visibility:"hidden"}:void 0,children:[a&&e.jsx("span",{"aria-hidden":!0,style:{display:"inline-flex"},children:a}),l,r&&e.jsx("span",{"aria-hidden":!0,style:{display:"inline-flex"},children:r})]}),n&&e.jsx("span",{className:gt.spinnerWrapper,"aria-hidden":!0,children:e.jsx("span",{className:gt.spinner})})]});if("href"in c&&c.href!==void 0){const{href:p,...x}=c;return e.jsx("a",{href:p,className:u,...x,children:_})}const{disabled:m,type:h="button",...f}=c;return e.jsx("button",{type:h,className:u,disabled:m||n,"aria-disabled":n||m,...f,children:_})}const wa="_root_z9l5v_5",ka="_full_z9l5v_24",Ia="_size2xsmall_z9l5v_27",za="_sizeXsmall_z9l5v_28",Sa="_sizeSm_z9l5v_29",Ba="_sizeBase_z9l5v_30",Ca="_sizeLg_z9l5v_31",Ta="_sizeXl_z9l5v_32",Da="_iconWrap_z9l5v_35",Ma="_neutral_z9l5v_49",Ra="_loading_z9l5v_54",Ea="_inverted_z9l5v_71",La="_transparent_z9l5v_97",Aa="_spinnerWrap_z9l5v_122",qa="_spinner_z9l5v_122",Fa="_spin_z9l5v_122",qe={root:wa,full:ka,size2xsmall:Ia,sizeXsmall:za,sizeSm:Sa,sizeBase:Ba,sizeLg:Ca,sizeXl:Ta,iconWrap:Da,neutral:Ma,loading:Ra,inverted:Ea,transparent:La,spinnerWrap:Aa,spinner:qa,spin:Fa},Pa={"2xsmall":qe.size2xsmall,xsmall:qe.sizeXsmall,sm:qe.sizeSm,base:qe.sizeBase,lg:qe.sizeLg,xl:qe.sizeXl};function xe({icon:t,variant:s="neutral",size:n="base",radius:o="default",loading:a=!1,className:r,...l}){const i=[qe.root,qe[s],Pa[n],o==="full"&&qe.full,a&&qe.loading,r].filter(Boolean).join(" "),c=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:qe.iconWrap,style:a?{visibility:"hidden"}:void 0,"aria-hidden":!0,children:t}),a&&e.jsx("span",{className:qe.spinnerWrap,"aria-hidden":!0,children:e.jsx("span",{className:qe.spinner})})]});if("href"in l&&l.href!==void 0){const{href:h,...f}=l;return e.jsx("a",{href:h,className:i,...f,children:c})}const{disabled:u,type:_="button",...m}=l;return e.jsx("button",{type:_,className:i,disabled:u||a,"aria-disabled":a||u,...m,children:c})}const Oa="_menu_cic39_1",Wa={menu:Oa};function Je({children:t,className:s,style:n}){return e.jsx("div",{className:[Wa.menu,s].filter(Boolean).join(" "),style:n,role:"menu",children:t})}const bn=d.createContext(()=>{});function Kn(){return d.useContext(bn)}const Ha="_item_1v5kd_1",Ga="_forceHover_1v5kd_25",Ua="_active_1v5kd_33",Va="_danger_1v5kd_49",Ka="_iconSlot_1v5kd_53",Ya="_leftIcon_1v5kd_66",Xa="_avatar_1v5kd_78",Za="_itemLabel_1v5kd_85",Ja="_itemLabelChecked_1v5kd_93",Qa="_count_1v5kd_96",er="_badge_1v5kd_105",tr="_itemRight_1v5kd_112",fe={item:Ha,forceHover:Ga,active:Ua,danger:Va,iconSlot:Ka,leftIcon:Ya,avatar:Xa,itemLabel:Za,itemLabelChecked:Ja,count:Qa,badge:er,itemRight:tr};function $e({label:t,leftIcon:s,avatar:n,rightSlot:o,count:a,badge:r,variant:l="default",disabled:i=!1,active:c=!1,forceHover:u=!1,onClick:_,closeOnClick:m=!0,className:h}){const f=Kn();function p(){_==null||_(),m&&f()}return e.jsxs("button",{role:"menuitem",className:[fe.item,fe[l],c&&fe.active,u&&fe.forceHover,h].filter(Boolean).join(" "),disabled:i,onClick:p,children:[s&&e.jsx("span",{className:fe.leftIcon,children:s}),n&&e.jsx("span",{className:fe.avatar,children:n}),e.jsx("span",{className:fe.itemLabel,children:t}),a!==void 0&&e.jsx("span",{className:fe.count,children:a}),r&&e.jsx("span",{className:fe.badge,children:r}),o&&e.jsx("span",{className:fe.itemRight,children:o})]})}function Yn({label:t,checked:s=!1,leftIcon:n,avatar:o,count:a,badge:r,disabled:l=!1,forceHover:i=!1,onClick:c,className:u}){return e.jsxs("button",{role:"menuitemradio","aria-checked":s,className:[fe.item,s&&fe.checked,i&&fe.forceHover,u].filter(Boolean).join(" "),disabled:l,onClick:c,children:[e.jsx("span",{className:fe.iconSlot,children:s&&e.jsx(j.CircleIcon,{size:4,fill:"currentColor"})}),n&&e.jsx("span",{className:fe.leftIcon,children:n}),o&&e.jsx("span",{className:fe.avatar,children:o}),e.jsx("span",{className:[fe.itemLabel,s&&fe.itemLabelChecked].filter(Boolean).join(" "),children:t}),a!==void 0&&e.jsx("span",{className:fe.count,children:a}),r&&e.jsx("span",{className:fe.badge,children:r})]})}function Xn({label:t,checked:s=!1,leftIcon:n,avatar:o,count:a,badge:r,disabled:l=!1,forceHover:i=!1,onClick:c,className:u}){return e.jsxs("button",{role:"menuitemcheckbox","aria-checked":s,className:[fe.item,s&&fe.checked,i&&fe.forceHover,u].filter(Boolean).join(" "),disabled:l,onClick:c,children:[e.jsx("span",{className:fe.iconSlot,children:s&&e.jsx(j.CheckIcon,{size:15})}),n&&e.jsx("span",{className:fe.leftIcon,children:n}),o&&e.jsx("span",{className:fe.avatar,children:o}),e.jsx("span",{className:[fe.itemLabel,s&&fe.itemLabelChecked].filter(Boolean).join(" "),children:t}),a!==void 0&&e.jsx("span",{className:fe.count,children:a}),r&&e.jsx("span",{className:fe.badge,children:r})]})}var sr=typeof window<"u"?d.useLayoutEffect:d.useEffect;function Zn({value:t,defaultValue:s,onChange:n}){const o=t!==void 0,[a,r]=d.useState(s),l=o?t:a;function i(c){o||r(c),n==null||n(c)}return[l,i]}function hs(t){d.useEffect(()=>{if(!t)return;const s=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=s}},[t])}const nr="_panel_1doee_1",or="_bare_1doee_16",Sn={panel:nr,bare:or};function ar(t,s,n,o,a){const r=window.innerWidth,l=window.innerHeight,i=8,[c,u]=o.split("-");let _=0,m=0;return c==="bottom"||c==="top"?(c==="bottom"?(_=t.bottom+a,_+n>l-i&&t.top-a-n>=i&&(_=t.top-a-n)):(_=t.top-a-n,_<i&&t.bottom+a+n<=l-i&&(_=t.bottom+a)),u==="end"?m=t.right-s:u==="start"?m=t.left:m=t.left+t.width/2-s/2):(c==="left"?(m=t.left-a-s,m<i&&t.right+a+s<=r-i&&(m=t.right+a)):(m=t.right+a,m+s>r-i&&t.left-a-s>=i&&(m=t.left-a-s)),u==="end"?_=t.bottom-n:u==="start"?_=t.top:_=t.top+t.height/2-n/2),m=Math.max(i,Math.min(m,r-s-i)),_=Math.max(i,Math.min(_,l-n-i)),{top:_,left:m}}function Ee({trigger:t,children:s,open:n,onOpenChange:o,placement:a="bottom-start",offset:r=8,bare:l=!1,className:i,matchTriggerWidth:c=!1}){const[u,_]=Zn({value:n,defaultValue:!1,onChange:o}),m=d.useRef(null),h=d.useRef(null),[f,p]=d.useState(null),[x,N]=d.useState(null),b=u??!1,z=d.useCallback(()=>_(!1),[_]),g=d.useCallback(()=>{var Q;if(!h.current)return;const S=(Q=m.current)==null?void 0:Q.firstElementChild;if(!S)return;const w=S.getBoundingClientRect();c&&N(w.width);const{offsetWidth:T,offsetHeight:R}=h.current,H=c?w.width:T;p(ar(w,H,R,a,r))},[c,a,r]);return sr(()=>{b&&g()},[b,g]),d.useEffect(()=>{if(b)return window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[b,g]),d.useEffect(()=>{b||p(null)},[b]),d.useEffect(()=>{if(!b)return;function S(w){w.key==="Escape"&&(w.preventDefault(),_(!1))}return document.addEventListener("keydown",S,!0),()=>document.removeEventListener("keydown",S,!0)},[b]),d.useEffect(()=>{if(!b)return;function S(w){var R,H,Q;const T=w.target;(R=h.current)!=null&&R.contains(T)||(H=m.current)!=null&&H.contains(T)||(Q=T.closest)!=null&&Q.call(T,"[data-popover-panel]")||_(!1)}return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[b]),d.useEffect(()=>{if(!b)return;function S(w){var R;const T=w.target;(R=h.current)!=null&&R.contains(T)||_(!1)}return window.addEventListener("scroll",S,{capture:!0,passive:!0}),()=>window.removeEventListener("scroll",S,{capture:!0})},[b]),e.jsxs(e.Fragment,{children:[e.jsx("span",{ref:m,style:{display:"contents"},onClick:()=>_(!b),children:t}),b&&pt.createPortal(e.jsx("div",{ref:h,"data-popover-panel":!0,className:[l?Sn.bare:Sn.panel,i].filter(Boolean).join(" "),style:f?{top:f.top,left:f.left,...x?{width:x}:{}}:{visibility:"hidden",top:0,left:0},children:e.jsx(bn.Provider,{value:z,children:s})}),document.body)]})}const rr="_root_1l5yx_1",lr="_removable_1l5yx_28",ir="_rounded_1l5yx_30",cr="_full_1l5yx_31",dr="_clickable_1l5yx_33",ur="_leftIcon_1l5yx_45",_r="_label_1l5yx_52",mr="_removeBtn_1l5yx_54",bt={root:rr,"size-2xs":"_size-2xs_1l5yx_14","size-xs":"_size-xs_1l5yx_21",removable:lr,rounded:ir,full:cr,clickable:dr,leftIcon:ur,label:_r,removeBtn:mr};function ps({label:t,size:s="xs",shape:n="full",leftIcon:o,removable:a=!1,onRemove:r,onClick:l,className:i}){const c=[bt.root,bt[`size-${s}`],bt[n],l?bt.clickable:"",a?bt.removable:"",i].filter(Boolean).join(" "),u=e.jsxs(e.Fragment,{children:[o&&e.jsx("span",{className:bt.leftIcon,children:o}),e.jsx("span",{className:bt.label,children:t}),a&&e.jsx("button",{type:"button",className:bt.removeBtn,onClick:_=>{_.stopPropagation(),r==null||r()},"aria-label":`Remove ${t}`,children:e.jsx(j.CloseIcon,{size:15})})]});return l?e.jsx("button",{type:"button",className:c,onClick:l,children:u}):e.jsx("div",{className:c,children:u})}const fr="_root_1mx71_1",hr="_chat_1mx71_14",pr="_dragging_1mx71_21",xr="_input_1mx71_26",gr="_emailFields_1mx71_47",br="_emailField_1mx71_47",jr="_emailLabel_1mx71_66",vr="_emailRecipients_1mx71_72",yr="_fromSelector_1mx71_81",Nr="_fromButton_1mx71_88",$r="_fromValue_1mx71_98",wr="_recipientInput_1mx71_107",kr="_recipientToggles_1mx71_124",Ir="_recipientToggle_1mx71_124",zr="_subjectInput_1mx71_140",Sr="_newEmail_1mx71_153",Br="_replyPreview_1mx71_158",Cr="_replyContent_1mx71_167",Tr="_replyLabel_1mx71_174",Dr="_replyText_1mx71_180",Mr="_filled_1mx71_189",Rr="_attachments_1mx71_191",Er="_actionRow_1mx71_197",Lr="_actions_1mx71_198",Ar="_actionButton_1mx71_214",qr="_disabled_1mx71_215",Fr="_srOnly_1mx71_217",Pr="_emojiPicker_1mx71_228",Or="_emojiOption_1mx71_236",de={root:fr,chat:hr,dragging:pr,input:xr,emailFields:gr,emailField:br,emailLabel:jr,emailRecipients:vr,fromSelector:yr,fromButton:Nr,fromValue:$r,recipientInput:wr,recipientToggles:kr,recipientToggle:Ir,subjectInput:zr,newEmail:Sr,replyPreview:Br,replyContent:Cr,replyLabel:Tr,replyText:Dr,filled:Mr,attachments:Rr,actionRow:Er,actions:Lr,actionButton:Ar,disabled:qr,srOnly:Fr,emojiPicker:Pr,emojiOption:Or},Wr=d.forwardRef(function({state:s,variant:n="chat",new:o=!1,actions:a,attachments:r,replyTo:l,onCancelReply:i,value:c,defaultValue:u,onChange:_,onDraftChange:m,onDraftClear:h,onFocus:f,onBlur:p,onKeyDown:x,onSubmit:N,actionItems:b=[],actionLabel:z="Action",onActionSelect:g,onAttach:S,onEmojiSelect:w,onFilesDrop:T,submitLabel:R="Send message",attachmentLabel:H="Attach file",from:Q=[],fromOptions:ee=[],onFromSelect:Y,to:$=[],cc:k=[],bcc:C=[],subject:te,defaultSubject:V="",onSubjectChange:ne,onRecipientAdd:I,onRecipientRemove:F,fromLabel:oe="From",toLabel:le="To",ccLabel:v="Cc",bccLabel:D="Bcc",subjectLabel:A="Subject",placeholder:P="Ask a follow up...",disabled:B=!1,loading:G=!1,className:q,...U},L){const M=d.useRef(null),[K,ae]=d.useState(()=>String(u??"")),[he,X]=d.useState(!1),[re,ce]=d.useState(!1),[pe,E]=d.useState(!1),[W,y]=d.useState(!1),[Z,se]=d.useState(!1),[ge,_e]=d.useState(V),[Te,Qe]=d.useState(k.length>0),[Ye,we]=d.useState(C.length>0),[wn,kn]=d.useState({from:"",to:"",cc:"",bcc:""}),es=d.useRef(0),ts=n==="email"&&o,ss=c===void 0?K:String(c),Yo=te===void 0?ge:te,gs=ss.trim().length>0||!!r,In=s??(gs?"filled":he?"active":"default");d.useLayoutEffect(()=>{const O=M.current;if(!O)return;const De=ts?120:20,xt=ts?240:192;O.style.height="auto",O.style.height=`${Math.max(De,Math.min(O.scrollHeight,xt))}px`,O.style.overflowY=O.scrollHeight>xt?"auto":"hidden"},[ss,ts]);function Xo(O){M.current=O,typeof L=="function"?L(O):L&&(L.current=O)}function Zo(O){c===void 0&&ae(O.target.value),_==null||_(O),m==null||m(O.target.value)}function zn(){!B&&gs&&(N==null||N(ss),c===void 0&&ae(""),h==null||h())}function Jo(O){x==null||x(O),!O.defaultPrevented&&O.key==="Enter"&&!O.shiftKey&&(O.preventDefault(),zn())}function Qo(O){const De=`${ss}${O}`;c===void 0&&ae(De),m==null||m(De),w==null||w(O),ce(!1)}const ea=[de.root,de[In],de[n],ts&&de.newEmail,Z&&de.dragging,B&&de.disabled,q].filter(Boolean).join(" "),ta=e.jsxs(e.Fragment,{children:[n!=="email"&&b.length>0&&e.jsx(Ee,{open:pe,onOpenChange:E,placement:"top-start",offset:6,bare:!0,trigger:e.jsx(ve,{variant:"neutral",size:"sm",className:de.actionButton,leftIcon:e.jsx(j.PlusIcon,{}),disabled:B,children:z}),children:e.jsx(Je,{children:b.map(O=>e.jsx($e,{label:O.label,leftIcon:O.icon,disabled:O.disabled,onClick:()=>g==null?void 0:g(O)},O.id))})}),e.jsx(xe,{icon:e.jsx(j.PaperclipIcon,{}),"aria-label":H,variant:"neutral",size:"sm",radius:"full",onClick:S,disabled:B}),e.jsx(Ee,{open:re,onOpenChange:ce,placement:"top-start",offset:6,trigger:e.jsx(xe,{icon:e.jsx(j.SmileIcon,{}),"aria-label":"Add emoji",variant:"neutral",size:"sm",radius:"full",disabled:B}),children:e.jsx("div",{className:de.emojiPicker,"aria-label":"Choose an emoji",children:["π","π","π","π₯³","π","π","π₯","β€οΈ","π","π","π€","β
"].map(O=>e.jsx("button",{type:"button",className:de.emojiOption,"aria-label":`Add ${O}`,onClick:()=>Qo(O),children:O},O))})})]});function Gs(O,De){function xt(){const Le=wn[O].trim();Le&&(I==null||I(O,Le),kn(Pt=>({...Pt,[O]:""})))}return e.jsxs(e.Fragment,{children:[De.map((Le,Pt)=>e.jsx(ps,{label:Le.label??Le.email,size:"2xs",removable:!!F,onRemove:F?()=>F(O,Le,Pt):void 0},Le.id??`${Le.email}-${Pt}`)),e.jsx("input",{type:"text",inputMode:"email",autoComplete:"off",autoCorrect:"off",autoCapitalize:"none",spellCheck:!1,className:de.recipientInput,value:wn[O],disabled:B,"aria-label":`Add ${O} email`,onChange:Le=>{const Pt=Le.target.value;kn(na=>({...na,[O]:Pt}))},onKeyDown:Le=>{Le.key==="Enter"&&(Le.preventDefault(),xt())},onBlur:()=>{xt()}})]})}const et=Q[0],sa=ee.length>0?e.jsx(Ee,{open:W,onOpenChange:y,placement:"bottom-start",offset:4,bare:!0,trigger:e.jsx(ve,{variant:"transparent",size:"sm",className:de.fromButton,rightIcon:e.jsx(j.CaretDownIcon,{size:12}),disabled:B,"aria-label":`${oe}: ${(et==null?void 0:et.email)??""}`,children:(et==null?void 0:et.email)??oe}),children:e.jsx(Je,{children:ee.map((O,De)=>e.jsx($e,{label:O.label?`${O.label} Β· ${O.email}`:O.email,onClick:()=>{Y==null||Y(O),y(!1)}},O.id??`${O.email}-${De}`))})}):e.jsx("span",{className:de.fromValue,children:(et==null?void 0:et.email)??"β"});return e.jsxs("div",{className:ea,"data-state":In,onDragEnter:O=>{B||!T||(O.preventDefault(),es.current+=1,se(!0))},onDragOver:O=>{B||!T||(O.preventDefault(),O.dataTransfer.dropEffect="copy")},onDragLeave:O=>{B||!T||(O.preventDefault(),es.current-=1,es.current<=0&&(es.current=0,se(!1)))},onDrop:O=>{if(B||!T)return;O.preventDefault(),es.current=0,se(!1);const De=Array.from(O.dataTransfer.files);De.length&&T(De)},children:[e.jsx("span",{className:de.srOnly,"aria-live":"polite",children:Z?"Drop image files to attach them":""}),l&&e.jsxs("div",{className:de.replyPreview,children:[e.jsxs("div",{className:de.replyContent,children:[e.jsx("span",{className:de.replyLabel,children:"Replying to"}),e.jsx("span",{className:de.replyText,children:l})]}),e.jsx(xe,{icon:e.jsx(j.XIcon,{}),"aria-label":"Cancel reply",variant:"transparent",size:"2xsmall",radius:"full",onClick:i})]}),ts&&e.jsxs("div",{className:de.emailFields,children:[e.jsxs("div",{className:de.emailField,children:[e.jsxs("span",{className:de.emailLabel,children:[oe,":"]}),e.jsx("div",{className:de.fromSelector,children:sa})]}),e.jsxs("div",{className:de.emailField,children:[e.jsxs("span",{className:de.emailLabel,children:[le,":"]}),e.jsx("div",{className:de.emailRecipients,children:Gs("to",$)}),e.jsxs("div",{className:de.recipientToggles,children:[!Te&&k.length===0&&e.jsx(ve,{variant:"transparent",size:"sm",className:de.recipientToggle,"aria-expanded":!1,onClick:()=>Qe(!0),disabled:B,children:v}),!Ye&&C.length===0&&e.jsx(ve,{variant:"transparent",size:"sm",className:de.recipientToggle,"aria-expanded":!1,onClick:()=>we(!0),disabled:B,children:D})]})]}),(Te||k.length>0)&&e.jsxs("div",{className:de.emailField,children:[e.jsxs("span",{className:de.emailLabel,children:[v,":"]}),e.jsx("div",{className:de.emailRecipients,children:Gs("cc",k)})]}),(Ye||C.length>0)&&e.jsxs("div",{className:de.emailField,children:[e.jsxs("span",{className:de.emailLabel,children:[D,":"]}),e.jsx("div",{className:de.emailRecipients,children:Gs("bcc",C)})]}),e.jsxs("label",{className:de.emailField,children:[e.jsxs("span",{className:de.emailLabel,children:[A,":"]}),e.jsx("input",{type:"text",autoComplete:"off",className:de.subjectInput,value:Yo,disabled:B,"aria-label":A,onChange:O=>{te===void 0&&_e(O.target.value),ne==null||ne(O.target.value)}})]})]}),r&&e.jsx("div",{className:de.attachments,children:r}),e.jsx("textarea",{...U,ref:Xo,className:de.input,"aria-label":U["aria-label"]??"Message",value:ss,placeholder:P,disabled:B,rows:1,onChange:Zo,onFocus:O=>{X(!0),f==null||f(O)},onBlur:O=>{X(!1),p==null||p(O)},onKeyDown:Jo,onPaste:O=>{var xt;if((xt=U.onPaste)==null||xt.call(U,O),B||!T)return;const De=Array.from(O.clipboardData.files);De.length>0&&T(De)}}),e.jsxs("div",{className:de.actionRow,children:[e.jsx("div",{className:de.actions,children:a===void 0?ta:a}),e.jsx(xe,{icon:e.jsx(j.ArrowUpIcon,{}),"aria-label":R,variant:gs?"inverted":"neutral",size:"sm",radius:"full",onClick:zn,disabled:B||!gs,loading:G})]})]})}),Hr="_root_o2rrr_5",Gr="_spin_o2rrr_1",Ur="_xs_o2rrr_14",Vr="_sm_o2rrr_20",Kr="_md_o2rrr_26",Yr="_lg_o2rrr_32",Bn={root:Hr,spin:Gr,xs:Ur,sm:Vr,md:Kr,lg:Yr};function Tt({size:t="md",className:s,label:n="Loadingβ¦"}){return e.jsx("span",{className:[Bn.root,Bn[t],s].filter(Boolean).join(" "),role:"status","aria-label":n})}const Xr="_trigger_1gpq3_2",Zr="_tooltip_1gpq3_7",Jr="_top_1gpq3_24",Qr="_bottom_1gpq3_30",el="_left_1gpq3_36",tl="_right_1gpq3_42",sl="_enter_1gpq3_48",nl="_tooltipEnter_1gpq3_1",ol="_exit_1gpq3_52",al="_tooltipExit_1gpq3_1",ns={trigger:Xr,tooltip:Zr,top:Jr,bottom:Qr,left:el,right:tl,enter:sl,tooltipEnter:nl,exit:ol,tooltipExit:al};function rl(t,s,n,o){switch(n){case"top":return{top:t.top-s.height-o,left:t.left+t.width/2-s.width/2};case"bottom":return{top:t.bottom+o,left:t.left+t.width/2-s.width/2};case"left":return{top:t.top+t.height/2-s.height/2,left:t.left-s.width-o};case"right":return{top:t.top+t.height/2-s.height/2,left:t.right+o}}}function ht({content:t,placement:s="top",delay:n=100,children:o,disabled:a=!1}){const[r,l]=d.useState(!1),[i,c]=d.useState(!1),[u,_]=d.useState(null),m=d.useRef(null),h=d.useRef(null),f=d.useRef(null),p=d.useCallback(()=>{if(!a){if(f.current&&clearTimeout(f.current),r){c(!1);return}f.current=setTimeout(()=>{c(!1),l(!0)},n)}},[n,a,r]),x=d.useCallback(()=>{f.current&&clearTimeout(f.current),r&&c(!0)},[r]),N=d.useCallback(()=>{l(!1),c(!1),_(null)},[]);d.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]),d.useEffect(()=>{if(!i)return;const z=setTimeout(N,240);return()=>clearTimeout(z)},[i,N]),d.useEffect(()=>{a&&x()},[a,x]),d.useLayoutEffect(()=>{if(!r||!m.current||!h.current)return;const z=m.current.getBoundingClientRect(),g={width:h.current.offsetWidth,height:h.current.offsetHeight};_(rl(z,g,s,8))},[r,s,t]);const b=u?{top:u.top,left:u.left}:{visibility:"hidden",top:-9999,left:-9999};return e.jsxs(e.Fragment,{children:[e.jsx("span",{ref:m,className:ns.trigger,onMouseEnter:p,onMouseLeave:x,onFocus:p,onBlur:x,children:o}),r&&pt.createPortal(e.jsx("div",{ref:h,role:"tooltip",className:[ns.tooltip,ns[s],u&&(i?ns.exit:ns.enter)].filter(Boolean).join(" "),style:b,onAnimationEnd:z=>{i&&z.target===z.currentTarget&&N()},children:t}),document.body)]})}const ll="_root_1jckr_1",il="_fileOutline_1jckr_25",cl="_image_1jckr_36",dl="_placeholder_1jckr_43",ul="_play_1jckr_53",Ot={root:ll,fileOutline:il,image:cl,placeholder:dl,play:ul},Cn=/\.(mp4|webm|mov|m4v)(\?|#|$)/i,_l=/\.(jpe?g|png|webp|gif|avif|svg|bmp|ico)(\?|#|$)/i,ml={"square-4xl":{width:200,height:200,radius:12,fold:25},"square-2xl":{width:96,height:96,radius:8,fold:12},"square-xl":{width:64,height:64,radius:8,fold:10},"landscape-lg":{width:64,height:40,radius:6,fold:6},"landscape-md":{width:40,height:30,radius:6,fold:5},"landscape-sm":{width:32,height:24,radius:4,fold:4},base:{width:24,height:32,radius:4,fold:4},"portrait-sm":{width:24,height:32,radius:4,fold:4},"portrait-xs":{width:15,height:20,radius:4,fold:3},"portrait-2xs":{width:15,height:20,radius:4,fold:3},"2xs":{width:15,height:20,radius:4,fold:3}};function Us(t,s,n){return Math.min(n,Math.max(s,t))}function Tn(t,s,n,o){return`M${n},0 H${t-o} L${t},${o} V${s-n} Q${t},${s} ${t-n},${s} H${n} Q0,${s} 0,${s-n} V${n} Q0,0 ${n},0 Z`}function St({variant:t="image",size:s="base",src:n,alt:o="",className:a,style:r}){const{width:l,height:i,radius:c,fold:u}=ml[s],[_,m]=d.useState(!1),h=Math.min(l,i),f=t==="video"||t!=="file"&&!!n&&Cn.test(n),p=t!=="file"&&!!n&&(Cn.test(n)||t==="video"&&!_l.test(n)),x=t==="file"||!n||_,N=t==="file"?Us(Math.round(h*.52),12,32):Us(Math.round(h*.34),10,24),b=t==="file"?{borderRadius:0,clipPath:`path('${Tn(l,i,c,u)}')`}:{borderRadius:c};return e.jsxs("span",{className:[Ot.root,a].filter(Boolean).join(" "),"data-variant":t,style:{width:l,height:i,...b,...r},children:[x?e.jsx("span",{className:Ot.placeholder,children:t==="file"?e.jsx(j.FileIcon,{size:N}):f?e.jsx(j.PlayIcon,{size:N}):e.jsx(j.ImageIcon,{size:N})}):e.jsxs(e.Fragment,{children:[p?e.jsx("video",{src:n,className:Ot.image,muted:!0,playsInline:!0,preload:"metadata",onError:()=>m(!0)}):e.jsx("img",{src:n,alt:o,className:Ot.image,onError:()=>m(!0)}),f&&e.jsx("span",{className:Ot.play,children:e.jsx(j.PlayIcon,{size:Us(Math.round(h*.4),10,28)})})]}),t==="file"&&e.jsx("svg",{className:Ot.fileOutline,viewBox:`0 0 ${l} ${i}`,preserveAspectRatio:"none","aria-hidden":"true",focusable:"false",children:e.jsx("path",{d:Tn(l,i,c,u),vectorEffect:"non-scaling-stroke"})})]})}const fl="_root_b94lz_1",hl="_image_b94lz_14",pl="_file_b94lz_21",xl="_videoContainer_b94lz_29",gl="_video_b94lz_29",bl="_fileContent_b94lz_43",jl="_fileName_b94lz_49",vl="_fileSize_b94lz_50",yl="_remove_b94lz_68",tt={root:fl,image:hl,file:pl,videoContainer:xl,video:gl,fileContent:bl,fileName:jl,fileSize:vl,remove:yl};function Jn({src:t,alt:s="",variant:n="image",fileName:o,fileSize:a,loading:r=!1,onRemove:l,className:i,...c}){return e.jsxs("div",{className:[tt.root,n==="file"&&tt.file,n==="video"&&tt.videoContainer,i].filter(Boolean).join(" "),...c,children:[r?e.jsx(Tt,{size:"sm",label:"Uploading attachment"}):n==="file"?e.jsxs(e.Fragment,{children:[e.jsx(St,{variant:"file",size:"base"}),e.jsxs("span",{className:tt.fileContent,children:[e.jsx("span",{className:tt.fileName,children:o??"File"}),a&&e.jsx("span",{className:tt.fileSize,children:a})]})]}):n==="video"&&t?e.jsx("video",{src:t,className:tt.video,controls:!0}):t?e.jsx("img",{src:t,alt:s,className:tt.image}):null,!r&&l&&e.jsx("span",{className:tt.remove,children:e.jsx(xe,{icon:e.jsx(j.XIcon,{}),"aria-label":"Remove attachment",variant:"neutral",size:"xsmall",radius:"full",onClick:l})})]})}const Nl="_overlay_dmo51_1",$l="_dialog_dmo51_13",wl="_topbar_dmo51_23",kl="_counter_dmo51_30",Il="_stage_dmo51_36",zl="_image_dmo51_46",Wt={overlay:Nl,dialog:$l,topbar:wl,counter:kl,stage:Il,image:zl};function Sl({images:t,index:s,onIndexChange:n,onClose:o}){const a=d.useRef(null),r=s>0,l=s<t.length-1,i=t[s];hs(!0),d.useEffect(()=>{var u;(u=a.current)==null||u.focus()},[]),d.useEffect(()=>{function u(_){_.key==="Escape"&&o(),_.key==="ArrowLeft"&&r&&n(s-1),_.key==="ArrowRight"&&l&&n(s+1)}return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[l,r,s,o,n]);function c(u){u.target===u.currentTarget&&o()}return i?pt.createPortal(e.jsx("div",{className:Wt.overlay,role:"dialog","aria-modal":"true","aria-label":"Image preview",onMouseDown:c,children:e.jsxs("div",{ref:a,className:Wt.dialog,tabIndex:-1,onMouseDown:c,children:[e.jsxs("div",{className:Wt.topbar,children:[e.jsxs("span",{className:Wt.counter,children:[s+1," / ",t.length]}),e.jsx(xe,{icon:e.jsx(j.XIcon,{}),"aria-label":"Close image preview",variant:"neutral",size:"base",radius:"full",onClick:o})]}),e.jsxs("div",{className:Wt.stage,onMouseDown:c,children:[t.length>1&&e.jsx(xe,{icon:e.jsx(j.ChevronLeftIcon,{}),"aria-label":"Previous image",variant:"neutral",size:"lg",radius:"full",disabled:!r,onClick:()=>n(s-1)}),e.jsx("img",{src:i.src,alt:i.alt??"",className:Wt.image}),t.length>1&&e.jsx(xe,{icon:e.jsx(j.ChevronRightIcon,{}),"aria-label":"Next image",variant:"neutral",size:"lg",radius:"full",disabled:!l,onClick:()=>n(s+1)})]})]})}),document.body):null}const Bl="_animated_a3bgv_1",Cl="_deleting_a3bgv_18",Tl="_root_a3bgv_37",Dl="_messageRow_a3bgv_47",Ml="_collapsed_a3bgv_54",Rl="_old_a3bgv_59",El="_outgoing_a3bgv_63",Ll="_incoming_a3bgv_68",Al="_email_a3bgv_73",ql="_bubbleRow_a3bgv_92",Fl="_content_a3bgv_101",Pl="_emailMeta_a3bgv_113",Ol="_emailAuthor_a3bgv_128",Wl="_emailSnippet_a3bgv_139",Hl="_emailTimestamp_a3bgv_151",Gl="_bubble_a3bgv_92",Ul="_references_a3bgv_169",Vl="_files_a3bgv_170",Kl="_imageBubble_a3bgv_176",Yl="_emailBodyWrapper_a3bgv_185",Xl="_sentImage_a3bgv_206",Zl="_imageCount_a3bgv_211",Jl="_dots_a3bgv_224",Ql="_sentVideo_a3bgv_290",ei="_imageButton_a3bgv_298",ti="_replyReference_a3bgv_336",si="_typing_a3bgv_348",ni="_menuButton_a3bgv_387",oi="_statusInline_a3bgv_400",ai="_status_failed_a3bgv_416",ri="_retry_a3bgv_418",li="_srOnly_a3bgv_433",me={animated:Bl,"bubble-send":"_bubble-send_a3bgv_1",deleting:Cl,"bubble-delete":"_bubble-delete_a3bgv_1",root:Tl,messageRow:Dl,collapsed:Ml,old:Rl,outgoing:El,incoming:Ll,email:Al,bubbleRow:ql,content:Fl,emailMeta:Pl,emailAuthor:Ol,emailSnippet:Wl,emailTimestamp:Hl,bubble:Gl,references:Ul,files:Vl,imageBubble:Kl,emailBodyWrapper:Yl,sentImage:Xl,imageCount:Zl,dots:Jl,sentVideo:Ql,imageButton:ei,replyReference:ti,typing:si,"typing-dot":"_typing-dot_a3bgv_1",menuButton:ni,statusInline:oi,status_failed:ai,retry:ri,srOnly:li};function ii({children:t,variant:s="chat",textValue:n,side:o="outgoing",images:a=[],references:r,files:l=[],maxVisibleImages:i=4,status:c,statusLabel:u,onRetry:_,author:m,timestamp:h,replyTo:f,typing:p=!1,animate:x=!0,onEdit:N,onCopy:b,onReply:z,onDelete:g,menuItems:S,onMenuItemSelect:w,className:T,old:R,...H}){const[Q,ee]=d.useState(!!R),[Y,$]=d.useState(!1),[k,C]=d.useState(null),te=d.useRef(null),V=n??(typeof t=="string"?t:""),ne=a.slice(0,i),I=Math.max(0,a.length-ne.length),F=u??(c==="sent"?"Sent":c==="read"?"Read":void 0),oe=[m,h,F].filter(Boolean).join(" Β· "),le=s==="chat"&&!p&&!!oe,v=[h,F].filter(Boolean).join(" Β· "),D=!p&&(S!==void 0?S.length>0:o==="outgoing"||s==="email");async function A(){var G;await((G=navigator.clipboard)==null?void 0:G.writeText(V)),b==null||b(V)}function P(){Y||($(!0),te.current=setTimeout(()=>g==null?void 0:g(),200))}d.useEffect(()=>()=>{te.current&&clearTimeout(te.current)},[]);const B=D?e.jsx("div",{className:me.menuButton,children:e.jsx(Ee,{bare:!0,placement:"left-start",offset:4,trigger:e.jsx(xe,{icon:e.jsx(j.EllipsisIcon,{}),"aria-label":"Message actions",variant:"transparent",size:"xsmall",radius:"full"}),children:e.jsx(Je,{children:S!==void 0?S.map(G=>e.jsx($e,{label:G.label,leftIcon:G.icon,variant:G.variant,disabled:G.disabled,onClick:()=>w==null?void 0:w(G)},G.id)):s==="email"&&o==="incoming"?e.jsxs(e.Fragment,{children:[e.jsx($e,{label:"Copy",leftIcon:e.jsx(j.CopyIcon,{size:15}),onClick:A}),e.jsx($e,{label:"Reply",leftIcon:e.jsx(j.ReplyIcon,{size:15}),onClick:()=>z==null?void 0:z(V)})]}):e.jsxs(e.Fragment,{children:[e.jsx($e,{label:"Edit",leftIcon:e.jsx(j.PencilIcon,{size:15}),onClick:()=>N==null?void 0:N(V)}),e.jsx($e,{label:"Copy",leftIcon:e.jsx(j.CopyIcon,{size:15}),onClick:A}),e.jsx($e,{label:"Reply",leftIcon:e.jsx(j.ReplyIcon,{size:15}),onClick:()=>z==null?void 0:z(V)}),e.jsx($e,{label:"Delete",leftIcon:e.jsx(j.TrashIcon,{size:15}),variant:"danger",disabled:!g,onClick:P})]})})})}):null;return e.jsxs("div",{className:[me.root,me[o],me[s],x&&me.animated,Y&&me.deleting,Q&&me.collapsed,R&&me.old,T].filter(Boolean).join(" "),tabIndex:le?0:void 0,role:"article","aria-label":`${o==="outgoing"?"Sent":"Received"} message${m?` from ${m}`:""}`,...H,children:[e.jsx("div",{className:me.messageRow,onClick:R?()=>ee(!Q):void 0,children:e.jsxs("div",{className:me.bubbleRow,children:[s==="chat"&&o==="outgoing"&&B,e.jsx(ht,{disabled:!le,placement:"top",content:e.jsx("span",{children:oe}),children:e.jsxs("div",{className:me.content,children:[s==="email"&&!p&&(m||v)&&e.jsxs("div",{className:me.emailMeta,children:[m&&e.jsx("strong",{className:me.emailAuthor,children:m}),Q&&e.jsx("span",{className:me.emailSnippet,children:V}),v&&e.jsx("span",{className:me.emailTimestamp,children:v})]}),!Q&&e.jsxs("div",{className:me.emailBodyWrapper,onClick:R?G=>G.stopPropagation():void 0,children:[!p&&r&&e.jsx("div",{className:me.references,children:r}),!p&&ne.length>0&&e.jsxs("div",{className:me.imageBubble,children:[ne.map((G,q)=>e.jsx("button",{type:"button",className:me.imageButton,"aria-label":`Open image ${q+1} of ${a.length}`,onClick:()=>C(q),children:e.jsx("img",{src:G.src,alt:G.alt??"",className:me.sentImage})},`${G.src}-${q}`)),I>0&&e.jsxs("button",{type:"button",className:me.imageCount,"aria-label":`Open ${I} more images`,onClick:()=>C(ne.length),children:["+",I]})]}),!p&&l.length>0&&e.jsx("div",{className:me.files,children:l.map(G=>{const q=/\.(mp4|webm|ogg|mov)$/i.test(G.name),U=G.src||G.url;return q&&U?e.jsx("video",{src:U,controls:!0,className:me.sentVideo,preload:"metadata"},G.id):e.jsx(Jn,{variant:"file",fileName:G.name,fileSize:G.size},G.id)})}),(p||t||o==="outgoing"&&(c==="sending"||c==="failed"))&&e.jsxs("div",{className:me.bubble,children:[p?e.jsx("div",{className:me.typing,role:"status","aria-label":"Typing",children:e.jsxs("span",{className:me.dots,"aria-hidden":!0,children:[e.jsx("span",{}),e.jsx("span",{}),e.jsx("span",{})]})}):e.jsxs(e.Fragment,{children:[f&&e.jsx("div",{className:me.replyReference,children:f}),e.jsx("div",{children:t})]}),!p&&o==="outgoing"&&(c==="sending"||c==="failed")&&e.jsxs("span",{className:[me.statusInline,c&&me[`status_${c}`]].filter(Boolean).join(" "),role:"status",children:[c==="sending"&&e.jsx(Tt,{size:"xs",label:"Message sending"}),c==="failed"&&e.jsx("button",{type:"button",className:me.retry,onClick:_,"aria-label":"Message failed. Retry",children:e.jsx(j.CircleAlertIcon,{size:14})}),c&&e.jsx("span",{className:me.srOnly,children:c})]})]})]})]})}),(s==="email"||o==="incoming")&&B]})}),k!==null&&e.jsx(Sl,{images:a,index:k,onIndexChange:C,onClose:()=>C(null)})]})}const ci="_root_1yg2r_1",di="_product_1yg2r_13",ui="_collection_1yg2r_14",_i="_content_1yg2r_24",mi="_image_1yg2r_26",fi="_icon_1yg2r_27",hi="_title_1yg2r_53",pi="_description_1yg2r_54",xi="_priceRow_1yg2r_63",gi="_price_1yg2r_63",bi="_originalPrice_1yg2r_76",ji="_codeRow_1yg2r_83",vi="_code_1yg2r_83",yi="_link_1yg2r_97",Ni="_checkoutContent_1yg2r_116",$i="_checkoutItems_1yg2r_117",wi="_checkoutItem_1yg2r_117",ki="_checkoutItemText_1yg2r_119",Ii="_checkoutItemTitle_1yg2r_136",ye={root:ci,product:di,collection:ui,"quick-checkout":"_quick-checkout_1yg2r_16",content:_i,image:mi,icon:fi,title:hi,description:pi,priceRow:xi,price:gi,originalPrice:bi,codeRow:ji,code:vi,link:yi,checkoutContent:Ni,checkoutItems:$i,checkoutItem:wi,checkoutItemText:ki,checkoutItemTitle:Ii};function zi({type:t="default",title:s,description:n,icon:o,image:a,imageAlt:r="",price:l,originalPrice:i,code:c,href:u,onCodeCopy:_,checkoutItems:m=[],checkoutHref:h,checkoutLabel:f="Checkout",onRemove:p,className:x,...N}){async function b(){var g;c&&(await((g=navigator.clipboard)==null?void 0:g.writeText(c)),_==null||_(c))}const z=t==="product"||t==="collection";return e.jsxs("div",{className:[ye.root,ye[t],x].filter(Boolean).join(" "),...N,children:[z?e.jsx(St,{variant:"image",size:"square-xl",src:a,alt:r}):a?e.jsx("img",{src:a,alt:r,className:ye.image}):o?e.jsx("span",{className:ye.icon,"aria-hidden":!0,children:o}):t==="discount"?e.jsx("span",{className:ye.icon,"aria-hidden":!0,children:e.jsx(j.TagIcon,{size:15})}):null,e.jsxs("span",{className:ye.content,children:[e.jsx("span",{className:ye.title,children:s}),n&&e.jsx("span",{className:ye.description,children:n}),(l||i)&&e.jsxs("span",{className:ye.priceRow,children:[l&&e.jsx("span",{className:ye.price,children:l}),i&&e.jsx("span",{className:ye.originalPrice,children:i})]}),t==="discount"&&c&&e.jsxs("span",{className:ye.codeRow,children:[e.jsx("code",{className:ye.code,children:c}),e.jsx(xe,{icon:e.jsx(j.CopyIcon,{}),"aria-label":`Copy ${c}`,variant:"transparent",size:"2xsmall",radius:"full",onClick:b})]})]}),t==="quick-checkout"&&e.jsxs("span",{className:ye.checkoutContent,children:[e.jsx("span",{className:ye.checkoutItems,children:m.map(g=>e.jsxs("span",{className:ye.checkoutItem,children:[e.jsx(St,{variant:"image",size:"base",src:g.image,alt:""}),e.jsxs("span",{className:ye.checkoutItemText,children:[e.jsx("span",{className:ye.checkoutItemTitle,children:g.title}),(g.price||g.originalPrice)&&e.jsxs("span",{className:ye.priceRow,children:[g.price&&e.jsx("span",{className:ye.description,children:g.price}),g.originalPrice&&e.jsx("span",{className:ye.originalPrice,children:g.originalPrice})]})]})]},g.id))}),h&&e.jsx(ve,{href:h,variant:"inverted",size:"sm",children:f})]}),u&&e.jsx("a",{className:ye.link,href:u,"aria-label":`Go to ${String(s)}`,children:e.jsx(j.ArrowUpRightIcon,{size:15})}),p&&e.jsx(xe,{icon:e.jsx(j.XIcon,{}),"aria-label":"Remove reference",variant:"transparent",size:"2xsmall",radius:"full",onClick:p})]})}const Si="_root_1eld0_1",Bi="_line_1eld0_8",Ci="_label_1eld0_14",Ti="_unreadLabel_1eld0_15",Di="_unread_1eld0_15",_t={root:Si,line:Bi,label:Ci,unreadLabel:Ti,unread:Di};function Mi({label:t,className:s,...n}){return e.jsxs("div",{className:[_t.root,s].filter(Boolean).join(" "),role:"separator","aria-label":t,...n,children:[e.jsx("span",{className:_t.line}),e.jsx("time",{className:_t.label,children:t}),e.jsx("span",{className:_t.line})]})}function Ri({count:t,label:s,className:n,...o}){const a=s??`${t} unread messages`;return e.jsxs("div",{className:[_t.root,_t.unread,n].filter(Boolean).join(" "),role:"separator","aria-label":a,...o,children:[e.jsx("span",{className:_t.line}),e.jsx("span",{className:_t.unreadLabel,children:a}),e.jsx("span",{className:_t.line})]})}const Ei="_root_1dxv0_1",Li="_sm_1dxv0_31",Ai="_base_1dxv0_32",qi="_lg_1dxv0_33",Fi="_xl_1dxv0_34",Pi="_label_1dxv0_37",Oi="_iconWrap_1dxv0_43",Wi="_interactive_1dxv0_58",Hi="_subtle_1dxv0_59",Gi="_muted_1dxv0_60",Ht={root:Ei,sm:Li,base:Ai,lg:qi,xl:Fi,label:Pi,iconWrap:Oi,interactive:Wi,subtle:Hi,muted:Gi};function Qt({tone:t="interactive",size:s="base",leftIcon:n,rightIcon:o,children:a,className:r,disabled:l,...i}){return e.jsxs("button",{className:[Ht.root,Ht[t],Ht[s],r].filter(Boolean).join(" "),disabled:l,...i,children:[n&&e.jsx("span",{className:Ht.iconWrap,"aria-hidden":!0,children:n}),a&&e.jsx("span",{className:Ht.label,children:a}),o&&e.jsx("span",{className:Ht.iconWrap,"aria-hidden":!0,children:o})]})}const Ui="_root_yzw2i_1",Vi="_horizontal_yzw2i_6",Ki="_solid_yzw2i_11",Yi="_dashed_yzw2i_15",Xi="_vertical_yzw2i_24",Zi="_withLabel_yzw2i_43",Ji="_line_yzw2i_50",Qi="_label_yzw2i_67",st={root:Ui,horizontal:Vi,solid:Ki,dashed:Yi,vertical:Xi,withLabel:Zi,line:Ji,label:Qi};function ec({orientation:t="horizontal",variant:s="solid",children:n,className:o}){return n&&t==="horizontal"?e.jsxs("div",{role:"separator","aria-orientation":t,className:[st.withLabel,o].filter(Boolean).join(" "),children:[e.jsx("span",{className:[st.line,st[s]].join(" ")}),e.jsx("span",{className:st.label,children:n}),e.jsx("span",{className:[st.line,st[s]].join(" ")})]}):e.jsx("div",{role:"separator","aria-orientation":t,className:[st.root,st[t],st[s],o].filter(Boolean).join(" ")})}const jt=t=>t===void 0?void 0:`var(--spacing-${t})`;function Qn(t){const{padding:s,paddingX:n,paddingY:o,paddingTop:a,paddingRight:r,paddingBottom:l,paddingLeft:i,margin:c,marginX:u,marginY:_,marginTop:m,marginRight:h,marginBottom:f,marginLeft:p,background:x,border:N,radius:b,shadow:z,width:g,height:S,minWidth:w,maxWidth:T,minHeight:R,maxHeight:H}=t;return{paddingTop:jt(a??o??s),paddingRight:jt(r??n??s),paddingBottom:jt(l??o??s),paddingLeft:jt(i??n??s),marginTop:jt(m??_??c),marginRight:jt(h??u??c),marginBottom:jt(f??_??c),marginLeft:jt(p??u??c),backgroundColor:x?`var(--backgrounds-bg-${x})`:void 0,border:N&&N!==!0?`1px solid var(--borders-border-${N})`:void 0,borderRadius:b?`var(--radius-${b})`:void 0,boxShadow:z?`var(--shadow-${z})`:N===!0?"var(--elevation-card-rest)":void 0,width:g,height:S,minWidth:w,maxWidth:T,minHeight:R,maxHeight:H}}function jn({as:t="div",className:s,style:n,children:o,padding:a,paddingX:r,paddingY:l,paddingTop:i,paddingRight:c,paddingBottom:u,paddingLeft:_,margin:m,marginX:h,marginY:f,marginTop:p,marginRight:x,marginBottom:N,marginLeft:b,background:z,border:g,radius:S,shadow:w,width:T,height:R,minWidth:H,maxWidth:Q,minHeight:ee,maxHeight:Y,...$}){const k=Qn({padding:a,paddingX:r,paddingY:l,paddingTop:i,paddingRight:c,paddingBottom:u,paddingLeft:_,margin:m,marginX:h,marginY:f,marginTop:p,marginRight:x,marginBottom:N,marginLeft:b,background:z,border:g,radius:S,shadow:w,width:T,height:R,minWidth:H,maxWidth:Q,minHeight:ee,maxHeight:Y});return e.jsx(t,{className:s,style:{...k,...n},...$,children:o})}const eo=["xs","sm","md","lg","xl","2xl"];function Ws(t){return typeof t=="object"&&t!==null}function Jt(t,s,n,o){const a=n===void 0?{}:Ws(n)?n:{xs:n};for(const r of eo){const l=a[r];t[`--${s}-${r}`]=l===void 0?"initial":o(l)}}const tc="_flex_75qj3_7",sc={flex:tc},nc={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch",baseline:"baseline"},oc={start:"flex-start",center:"center",end:"flex-end","space-between":"space-between","space-around":"space-around","space-evenly":"space-evenly"},ac=t=>`var(--spacing-${t})`;function rc({direction:t="row",gap:s,align:n,justify:o,wrap:a=!1,className:r,style:l,...i}){const c=Ws(t)?{xs:"row",...t}:t,u={};return Jt(u,"nv-flex-direction",c,_=>_),Jt(u,"nv-flex-gap",s,ac),e.jsx(jn,{className:[sc.flex,r].filter(Boolean).join(" "),style:{alignItems:n?nc[n]:void 0,justifyContent:o?oc[o]:void 0,flexWrap:a?"wrap":"nowrap",...u,...l},...i})}const lc="_grid_hwnxu_7",ic={grid:lc},cc=t=>typeof t=="number"?`repeat(${t}, 1fr)`:t,Dn=t=>`var(--spacing-${t})`;function dc({columns:t=1,gap:s,gapX:n,gapY:o,className:a,style:r,...l}){const i=Ws(t)?{xs:1,...t}:t,c={};return Jt(c,"nv-grid-columns",i,cc),Jt(c,"nv-grid-gap-x",n??s,Dn),Jt(c,"nv-grid-gap-y",o??s,Dn),e.jsx(jn,{className:[ic.grid,a].filter(Boolean).join(" "),style:{...c,...r},...l})}const uc="_button_1r0m4_1",_c={button:uc};function to({label:t="More actions",className:s,type:n="button",...o}){return e.jsx("button",{type:n,"aria-label":t,className:[_c.button,s].filter(Boolean).join(" "),...o,children:e.jsx(j.EllipsisVerticalIcon,{size:15,"aria-hidden":!0})})}const mc="_root_1h02n_1",fc="_disabled_1h02n_12",hc="_input_1h02n_17",pc="_box_1h02n_30",xc="_checked_1h02n_45",gc="_indeterminate_1h02n_46",bc="_label_1h02n_88",Mt={root:mc,disabled:fc,input:hc,box:pc,checked:xc,indeterminate:gc,label:bc};function xs({indeterminate:t=!1,label:s,disabled:n,checked:o,className:a,"data-state":r,...l}){const i=d.useRef(null);d.useEffect(()=>{i.current&&(i.current.indeterminate=t)},[t]);const c=[Mt.root,n&&Mt.disabled,a].filter(Boolean).join(" "),u=[Mt.box,o&&Mt.checked,t&&Mt.indeterminate].filter(Boolean).join(" ");return e.jsxs("label",{className:c,"data-state":r,children:[e.jsx("input",{ref:i,type:"checkbox",className:Mt.input,disabled:n,checked:o,readOnly:!l.onChange,...l}),e.jsxs("span",{className:u,"aria-hidden":!0,children:[o&&!t&&e.jsx(j.CheckIcon,{size:10,strokeWidth:3.5}),t&&e.jsx(j.MinusIcon,{size:10,strokeWidth:3.5})]}),s&&e.jsx("span",{className:Mt.label,children:s})]})}const jc="_root_7t1as_1",vc="_disabled_7t1as_10",yc="_input_7t1as_15",Nc="_track_7t1as_28",$c="_checked_7t1as_39",wc="_thumb_7t1as_45",kc="_small_7t1as_78",Ic="_label_7t1as_98",nt={root:jc,disabled:vc,input:yc,track:Nc,checked:$c,thumb:wc,small:kc,label:Ic};function vn({label:t,disabled:s,checked:n,size:o="default",className:a,"data-state":r,...l}){const i=[nt.root,s&&nt.disabled,o==="small"&&nt.small,a].filter(Boolean).join(" "),c=[nt.track,n&&nt.checked].filter(Boolean).join(" "),u=[nt.thumb,n&&nt.checked].filter(Boolean).join(" ");return e.jsxs("label",{className:i,"data-state":r,children:[e.jsx("input",{type:"checkbox",role:"switch",className:nt.input,disabled:s,checked:n,readOnly:!l.onChange,...l}),e.jsx("span",{className:c,"aria-hidden":!0,children:e.jsx("span",{className:u})}),t&&e.jsx("span",{className:nt.label,children:t})]})}const zc="_cell_uhvjk_1",Sc="_header_uhvjk_40",Bc="_content_uhvjk_72",Cc="_text_uhvjk_88",Tc="_multiline_uhvjk_95",Dc="_slot_uhvjk_104",Mc="_errorIcon_uhvjk_105",Rc="_error_uhvjk_105",Ec="_disabled_uhvjk_125",Lc="_readOnly_uhvjk_131",Ac="_hidden_uhvjk_142",qc="_pinned_uhvjk_146",Fc="_dirty_uhvjk_157",Pc="_dirtyIndicator_uhvjk_162",Oc="_dirtyDot_uhvjk_170",Wc="_selected_uhvjk_188",Hc="_dragSelected_uhvjk_215",Gc="_anchor_uhvjk_215",Uc="_fillHandle_uhvjk_228",je={cell:zc,header:Sc,"tone-base":"_tone-base_uhvjk_45","tone-subtle":"_tone-subtle_uhvjk_49","tone-muted":"_tone-muted_uhvjk_53","align-start":"_align-start_uhvjk_57","align-center":"_align-center_uhvjk_62","align-end":"_align-end_uhvjk_67",content:Bc,text:Cc,multiline:Tc,slot:Dc,errorIcon:Mc,error:Rc,disabled:Ec,readOnly:Lc,hidden:Ac,pinned:qc,dirty:Fc,dirtyIndicator:Pc,dirtyDot:Oc,selected:Wc,dragSelected:Hc,anchor:Gc,fillHandle:Uc},He=d.forwardRef(function({header:s=!1,tone:n=s?"subtle":"base",align:o="start",error:a=!1,disabled:r=!1,readOnly:l=!1,multiline:i=!1,anchor:c=!1,selected:u=!1,dragSelected:_=!1,clipboardValue:m,errorMessage:h,dirty:f=!1,dirtyLabel:p="Edited",hidden:x=!1,pinned:N,stickyOffset:b=0,width:z,leading:g,trailing:S,className:w,style:T,tabIndex:R,children:H,...Q},ee){const Y=d.Children.toArray(H).length>0&&d.Children.toArray(H).every($=>typeof $=="string"||typeof $=="number");return e.jsxs("div",{ref:ee,role:s?"columnheader":"gridcell","aria-disabled":r||void 0,"aria-readonly":l||void 0,"aria-invalid":a||void 0,"data-grid-cell":"true","data-grid-value":m==null?void 0:String(m),className:[je.cell,je[`tone-${n}`],je[`align-${o}`],s&&je.header,a&&je.error,r&&je.disabled,l&&je.readOnly,i&&je.multiline,c&&je.anchor,u&&je.selected,_&&je.dragSelected,f&&je.dirty,x&&je.hidden,N&&je.pinned,w].filter(Boolean).join(" "),style:{...z!==void 0?{width:z,flex:"none"}:{},...N?{position:"sticky",[N]:b}:{},...T},tabIndex:r?-1:R??0,...Q,children:[a&&(h?e.jsx(ht,{content:h,delay:0,children:e.jsx("span",{className:je.errorIcon,tabIndex:0,"aria-label":"Cell error",children:e.jsx(j.WarningCircleIcon,{size:15})})}):e.jsx("span",{className:je.errorIcon,"aria-hidden":!0,children:e.jsx(j.WarningCircleIcon,{size:15})})),g&&e.jsx("span",{className:je.slot,children:g}),e.jsx("span",{className:je.content,children:Y?e.jsx("span",{className:je.text,children:H}):H}),S&&e.jsx("span",{className:je.slot,children:S}),f&&e.jsx("span",{className:je.dirtyIndicator,children:e.jsx(ht,{content:p,delay:0,children:e.jsx("span",{className:je.dirtyDot,"aria-label":typeof p=="string"?p:void 0})})}),c&&e.jsx("span",{className:je.fillHandle,"data-grid-fill-handle":"true","aria-hidden":!0})]})}),Vc="_checkbox_8aiar_2",Kc={checkbox:Vc};function so({checked:t,onCheckedChange:s,disabled:n,label:o="Toggle value",variant:a="switch",align:r,...l}){return e.jsx(He,{disabled:n,align:r??(a==="checkbox"?"center":"start"),...l,children:a==="checkbox"?e.jsx(xs,{className:Kc.checkbox,checked:t,disabled:n,"aria-label":o,onChange:i=>s==null?void 0:s(i.target.checked)}):e.jsx(vn,{size:"small",checked:t,disabled:n,"aria-label":o,onChange:i=>s==null?void 0:s(i.target.checked)})})}const Yc="_input_18rm2_1",Xc="_number_18rm2_16",Zc="_currency_18rm2_18",Jc="_textarea_18rm2_19",Qc="_stepper_18rm2_20",Ft={input:Yc,number:Xc,currency:Zc,textarea:Jc,stepper:Qc};function Hs({value:t,defaultValue:s="",onValueChange:n,inputProps:o,inputDisabled:a,showStepper:r=!0,disabled:l,error:i,trailing:c,...u}){const _=t!==void 0,[m,h]=d.useState(String(t??s));d.useEffect(()=>{_&&h(String(t??""))},[_,t]);const f=()=>n==null?void 0:n(m===""?null:Number(m)),p=x=>{const N=Number((o==null?void 0:o.step)??1),b=(o==null?void 0:o.min)===void 0?-1/0:Number(o.min),z=(o==null?void 0:o.max)===void 0?1/0:Number(o.max),g=Math.min(z,Math.max(b,(Number(m)||0)+x*N));h(String(g)),n==null||n(g)};return e.jsx(He,{disabled:l,error:i,trailing:c??(r&&e.jsxs("span",{className:Ft.stepper,children:[e.jsx("button",{type:"button",tabIndex:-1,"aria-label":"Increase",onClick:()=>p(1),children:e.jsx(j.ChevronUpIcon,{size:12})}),e.jsx("button",{type:"button",tabIndex:-1,"aria-label":"Decrease",onClick:()=>p(-1),children:e.jsx(j.ChevronDownIcon,{size:12})})]})),...u,children:e.jsx("input",{className:[Ft.input,Ft.number].join(" "),type:"number",inputMode:"decimal",value:m,disabled:l||a,onChange:x=>h(x.target.value),onBlur:f,onKeyDown:x=>{x.key==="Enter"&&x.currentTarget.blur()},...o})})}function ed(t,s){var n;return((n=new Intl.NumberFormat(s,{style:"currency",currency:t}).formatToParts(0).find(o=>o.type==="currency"))==null?void 0:n.value)??t}function no({currency:t="USD",locale:s="en",inputProps:n,accessory:o,action:a,showStepper:r=!1,...l}){return e.jsx(Hs,{leading:e.jsxs(e.Fragment,{children:[e.jsx("span",{className:Ft.currency,children:ed(t,s)}),o]}),trailing:a,showStepper:r,inputProps:{step:"0.01",...n},...l})}const td="_separator_1js2l_1",sd={separator:td};function oo(){return e.jsx("div",{className:sd.separator,role:"separator"})}const nd="_group_o27hj_1",od="_groupLabel_o27hj_6",Mn={group:nd,groupLabel:od};function ad({label:t,children:s}){return e.jsxs("div",{className:Mn.group,role:"group",children:[e.jsx("span",{className:Mn.groupLabel,children:t}),s]})}const rd="_menuTitle_eu6pb_1",ld={menuTitle:rd};function id({children:t,className:s}){return e.jsx("div",{className:[ld.menuTitle,s].filter(Boolean).join(" "),children:t})}const cd="_caption_13w9b_1",dd="_captionIcon_13w9b_14",Rn={caption:cd,captionIcon:dd};function ud({children:t,leftIcon:s,className:n}){return e.jsxs("div",{className:[Rn.caption,n].filter(Boolean).join(" "),children:[s&&e.jsx("span",{className:Rn.captionIcon,children:s}),e.jsx("span",{children:t})]})}const _d="_root_1sesb_2",md="_inner_1sesb_14",fd="_xsmall_1sesb_24",hd="_small_1sesb_25",pd="_base_1sesb_26",xd="_large_1sesb_27",gd="_xlarge_1sesb_28",bd="_full_1sesb_40",jd="_rounded_1sesb_43",vd="_letters_1sesb_59",yd="_image_1sesb_75",Nd="_iconWrap_1sesb_83",vt={root:_d,inner:md,"size-2xs":"_size-2xs_1sesb_23",xsmall:fd,small:hd,base:pd,large:xd,xlarge:gd,"size-2xlarge":"_size-2xlarge_1sesb_29",full:bd,rounded:jd,letters:vd,"letters-size-2xs":"_letters-size-2xs_1sesb_66","letters-xsmall":"_letters-xsmall_1sesb_67","letters-small":"_letters-small_1sesb_68","letters-base":"_letters-base_1sesb_69","letters-large":"_letters-large_1sesb_70","letters-xlarge":"_letters-xlarge_1sesb_71","letters-size-2xlarge":"_letters-size-2xlarge_1sesb_72",image:yd,iconWrap:Nd},En={"2xs":10,xsmall:12,small:13,base:15,large:16,xlarge:18,"2xlarge":20},Ln={"2xs":"size-2xs",xsmall:"xsmall",small:"small",base:"base",large:"large",xlarge:"xlarge","2xlarge":"size-2xlarge"};function Bt({size:t="base",shape:s="full",className:n,href:o,target:a,rel:r,...l}){const i=[vt.root,vt[Ln[t]],vt[s],n].filter(Boolean).join(" "),c=o?"a":"div";return e.jsx(c,{className:i,href:o,target:a,rel:r,children:e.jsxs("div",{className:vt.inner,children:[l.type==="letters"&&e.jsx("span",{className:[vt.letters,vt[`letters-${Ln[t]}`]].join(" "),children:l.initials.slice(0,2).toUpperCase()}),l.type==="image"&&e.jsx("img",{src:l.src,alt:l.alt??"",className:vt.image,draggable:!1}),l.type==="icon"&&e.jsx("span",{className:vt.iconWrap,style:{width:En[t],height:En[t]},children:l.icon})]})})}const $d="_root_qhrr0_2",wd="_pill_qhrr0_57",kd="_iconSlot_qhrr0_68",Id="_iconOnly_qhrr0_76",zd="_iconWrap_qhrr0_84",Sd="_dotWrap_qhrr0_94",Bd="_dot_qhrr0_94",Cd="_status_qhrr0_111",Fe={root:$d,"size-2xs":"_size-2xs_qhrr0_16","size-xs":"_size-xs_qhrr0_24","size-sm":"_size-sm_qhrr0_32","size-base":"_size-base_qhrr0_40","size-lg":"_size-lg_qhrr0_48",pill:wd,iconSlot:kd,iconOnly:Id,iconWrap:zd,dotWrap:Sd,dot:Bd,status:Cd,"preset-beta":"_preset-beta_qhrr0_122","preset-new":"_preset-new_qhrr0_123","preset-coming-soon":"_preset-coming-soon_qhrr0_124","color-neutral":"_color-neutral_qhrr0_163","color-information":"_color-information_qhrr0_171","color-feature":"_color-feature_qhrr0_179","color-success":"_color-success_qhrr0_187","color-warning":"_color-warning_qhrr0_195","color-error":"_color-error_qhrr0_203"};function Ct({color:t="neutral",size:s="2xs",preset:n,dot:o=!1,pill:a=!1,leftIcon:r,rightIcon:l,icon:i,children:c,className:u,style:_}){const m=!!i&&!c&&!o&&!n&&!r&&!l,h=[Fe.root,Fe[`size-${s}`],n?Fe[`preset-${n}`]:Fe[`color-${t}`],o&&Fe.status,a&&!n&&Fe.pill,m&&Fe.iconOnly,u].filter(Boolean).join(" ");return e.jsxs("span",{className:h,style:_,children:[o&&e.jsx("span",{className:Fe.dotWrap,"aria-hidden":!0,children:e.jsx("span",{className:Fe.dot})}),m?e.jsx("span",{className:Fe.iconWrap,"aria-hidden":!0,children:i}):e.jsxs(e.Fragment,{children:[r&&e.jsx("span",{className:Fe.iconSlot,"aria-hidden":!0,children:r}),c&&e.jsx("span",{children:c}),l&&e.jsx("span",{className:Fe.iconSlot,"aria-hidden":!0,children:l})]})]})}const Td="_menuAvatar_1u5ju_1",Dd="_avatarInfo_1u5ju_10",Md="_avatarName_1u5ju_18",Rd="_avatarEmail_1u5ju_28",bs={menuAvatar:Td,avatarInfo:Dd,avatarName:Md,avatarEmail:Rd};function Ed({name:t,email:s,src:n,initials:o,badge:a,className:r}){return e.jsxs("div",{className:[bs.menuAvatar,r].filter(Boolean).join(" "),children:[n?e.jsx(Bt,{type:"image",src:n,size:"small",shape:"full"}):e.jsx(Bt,{type:"letters",initials:o??t.slice(0,2),size:"small",shape:"full"}),e.jsxs("div",{className:bs.avatarInfo,children:[e.jsx("span",{className:bs.avatarName,children:t}),s&&e.jsx("span",{className:bs.avatarEmail,children:s})]}),a&&e.jsx(Ct,{color:"neutral",size:"2xs",children:a})]})}const Ld="_root_u5hmq_1",Ad="_plus_u5hmq_12",qd="_text_u5hmq_12",Fd="_subtle_u5hmq_13",Pd="_optional_u5hmq_17",Od="_info_u5hmq_24",os={root:Ld,plus:Ad,text:qd,subtle:Fd,optional:Pd,info:Od};function yn({type:t="subtle",optional:s=!1,tooltip:n,htmlFor:o,children:a,className:r}){const l=[os.root,os[t],r].filter(Boolean).join(" ");return e.jsxs("label",{htmlFor:o,className:l,children:[e.jsx("span",{className:os.text,children:a}),s&&e.jsx("span",{className:os.optional,children:"(Optional)"}),n&&e.jsx(ht,{content:n,placement:"top",children:e.jsx(j.InfoIcon,{size:15,className:os.info})})]})}const Wd="_track_biq63_7",Hd="_sm_biq63_16",Gd="_md_biq63_17",Ud="_lg_biq63_18",Vd="_fill_biq63_21",Kd="_indeterminate_biq63_27",Yd="_neutral_biq63_35",Xd="_information_biq63_36",Zd="_success_biq63_37",Jd="_warning_biq63_38",Qd="_error_biq63_39",as={track:Wd,sm:Hd,md:Gd,lg:Ud,fill:Vd,indeterminate:Kd,neutral:Yd,information:Xd,success:Zd,warning:Jd,error:Qd};function ao({value:t=0,max:s=100,color:n="information",size:o="md",indeterminate:a=!1,className:r,label:l}){const i=a?void 0:Math.min(100,Math.max(0,t/s*100));return e.jsx("div",{className:[as.track,as[o],as[n],r].filter(Boolean).join(" "),role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,"aria-label":l,children:e.jsx("div",{className:[as.fill,a&&as.indeterminate].filter(Boolean).join(" "),style:i!==void 0?{width:`${i}%`}:void 0})})}const eu="_menuUsage_kfhrv_1",tu="_usageHeader_kfhrv_10",su="_usageValue_kfhrv_17",nu="_usageMessage_kfhrv_30",rs={menuUsage:eu,usageHeader:tu,usageValue:su,"usageValue-normal":"_usageValue-normal_kfhrv_25","usageValue-warning":"_usageValue-warning_kfhrv_26","usageValue-critical":"_usageValue-critical_kfhrv_27","usageValue-empty":"_usageValue-empty_kfhrv_28",usageMessage:nu};function ou(t,s){if(t===0)return"empty";const n=t/s;return n<=.1?"critical":n<=.2?"warning":"normal"}const au={normal:"success",warning:"warning",critical:"error",empty:"neutral"},ru={warning:"Less than 20% of credits left. Consider upgrading to avoid interruptions.",critical:"Less than 10% of credits left. Consider upgrading to avoid interruptions.",empty:"All credits have been used. Consider upgrading to avoid interruptions."};function lu({label:t,tooltip:s,value:n,max:o,actionLabel:a="Upgrade plan",onAction:r,className:l}){const i=ou(n,o),c=i!=="normal";return e.jsxs("div",{className:[rs.menuUsage,l].filter(Boolean).join(" "),children:[e.jsxs("div",{className:rs.usageHeader,children:[e.jsx(yn,{type:"plus",tooltip:s,children:t}),e.jsxs("span",{className:[rs.usageValue,rs[`usageValue-${i}`]].join(" "),children:[n," / ",o]})]}),e.jsx(ao,{value:n,max:o,color:au[i],size:"sm"}),c&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:rs.usageMessage,children:ru[i]}),e.jsx(ve,{variant:"neutral",size:"base",onClick:r,style:{width:"100%"},children:a})]})]})}const iu="_root_10f5b_2",Vs={root:iu,"size-thin":"_size-thin_10f5b_7","size-default":"_size-default_10f5b_8","dir-y":"_dir-y_10f5b_11","dir-x":"_dir-x_10f5b_12","dir-both":"_dir-both_10f5b_13"},Dt=d.forwardRef(function({children:s,direction:n="y",size:o="thin",maxHeight:a,maxWidth:r,onScroll:l,className:i,style:c},u){const _=[Vs.root,Vs[`dir-${n}`],Vs[`size-${o}`],i].filter(Boolean).join(" ");return e.jsx("div",{ref:u,className:_,onScroll:l,style:{maxHeight:a,maxWidth:r,...c},children:s})}),cu="_menu_740d6_1",du="_items_740d6_6",uu="_footer_740d6_12",Ks={menu:cu,items:du,footer:uu};function ro({columns:t,onVisibilityChange:s,onReset:n,label:o="View",disabled:a}){const r=t.some(l=>!l.visible);return e.jsx(Ee,{placement:"bottom-start",bare:!0,trigger:e.jsx(ve,{variant:"neutral",size:"sm",disabled:a,leftIcon:e.jsx(j.SlidersHorizontalIcon,{size:15}),children:o}),children:e.jsxs(Je,{className:Ks.menu,children:[e.jsx(Dt,{direction:"y",size:"thin",maxHeight:"320px",className:Ks.items,children:t.map(l=>e.jsx(Xn,{label:l.label,checked:l.visible,disabled:l.disabled,onClick:()=>s(l.id,!l.visible)},l.id))}),r&&n&&e.jsxs("div",{className:Ks.footer,children:[e.jsx(oo,{}),e.jsx($e,{label:"Reset columns",onClick:n})]})]})})}const _u="_header_pi8tp_1",mu="_actions_pi8tp_13",fu="_content_pi8tp_20",js={header:_u,actions:mu,content:fu};function lo({start:t,end:s,children:n,className:o,...a}){return e.jsxs("div",{className:[js.header,o].filter(Boolean).join(" "),...a,children:[e.jsx("div",{className:js.actions,children:t}),n&&e.jsx("div",{className:js.content,children:n}),e.jsx("div",{className:js.actions,children:s})]})}const hu="_label_spf5k_1",pu="_info_spf5k_2",xu="_icon_spf5k_2",Ys={label:hu,info:pu,icon:xu};function io({children:t,thumbnail:s,tooltip:n,errorCount:o,icon:a,...r}){const l=o!==void 0&&o>0;return e.jsxs(He,{header:!0,leading:s,trailing:l||a?e.jsxs(e.Fragment,{children:[l&&e.jsx(Ct,{color:"error",children:o}),a&&e.jsx("span",{className:Ys.icon,children:a})]}):void 0,...r,children:[e.jsx("span",{className:Ys.label,children:t}),n&&e.jsx(ht,{content:n,delay:0,children:e.jsx("span",{className:Ys.info,tabIndex:0,"aria-label":"More information",children:e.jsx(j.InfoIcon,{size:15})})})]})}const gu="_root_1w7o6_1",bu="_message_1w7o6_2",ju="_count_1w7o6_3",Xs={root:gu,message:bu,count:ju};function co({errors:t,activeIndex:s=0,onErrorSelect:n,className:o}){if(t.length===0)return null;const a=Math.min(s,t.length-1),r=t[a];return e.jsxs("div",{className:[Xs.root,o].filter(Boolean).join(" "),role:"status",children:[e.jsx(j.WarningCircleIcon,{size:15,"aria-hidden":!0}),e.jsx("span",{className:Xs.message,children:r.message}),e.jsxs("span",{className:Xs.count,children:[a+1,"/",t.length]}),e.jsx(ve,{variant:"neutral",size:"sm",onClick:()=>n==null?void 0:n(r,a),children:"Go to error"})]})}function uo({children:t,action:s,actionProps:n,disabled:o,...a}){return e.jsx(He,{disabled:o,trailing:e.jsx(Qt,{tone:"interactive",size:"sm",disabled:o,...n,children:s}),...a,children:t})}function _o({children:t,color:s="muted",...n}){return e.jsx(He,{tone:s==="muted"?"subtle":"base",readOnly:!0,...n,children:t})}const vu="_row_6u4cf_1",yu="_header_6u4cf_12",An={row:vu,header:yu};function Ps({header:t=!1,rowIndex:s,className:n,children:o,...a}){return e.jsx("div",{role:"row","data-row-index":s,className:[An.row,t&&An.header,n].filter(Boolean).join(" "),...a,children:o})}const Nu="_skeleton_10bej_1",$u="_animated_10bej_16",wu="_pulse_10bej_1",Zs={skeleton:Nu,"tone-base":"_tone-base_10bej_8","tone-subtle":"_tone-subtle_10bej_12",animated:$u,pulse:wu};function Ne({width:t,height:s,radius:n,animated:o=!0,tone:a="base",className:r,style:l}){const i={...l};return t!==void 0&&(i.width=typeof t=="number"?`${t}px`:t),s!==void 0&&(i.height=typeof s=="number"?`${s}px`:s),n!==void 0&&(i.borderRadius=n==="full"?"9999px":typeof n=="number"?`${n}px`:n),e.jsx("span",{className:[Zs.skeleton,Zs[`tone-${a}`],o?Zs.animated:"",r].filter(Boolean).join(" "),style:i,"aria-hidden":"true"})}function mo({columns:t,rows:s=5,className:n}){return e.jsxs(vo,{columns:t,className:n,"aria-label":"Loading data","aria-busy":"true",children:[e.jsx(Ps,{header:!0,children:Array.from({length:t},(o,a)=>e.jsx(He,{header:!0,children:e.jsx(Ne,{width:"70%",height:12})},a))}),Array.from({length:s},(o,a)=>e.jsx(Ps,{children:Array.from({length:t},(r,l)=>e.jsx(He,{children:e.jsx(Ne,{width:"60%",height:12})},l))},a))]})}const ku="_value_gtwgo_1",Iu="_hiddenSelect_gtwgo_12",zu="_trigger_gtwgo_22",Su="_popoverPanel_gtwgo_37",Ls={value:ku,hiddenSelect:Iu,trigger:zu,popoverPanel:Su};function fo({value:t,options:s,onValueChange:n,placeholder:o="Select",disabled:a,selectProps:r,...l}){const i=s.find(g=>g.value===t),[c,u]=d.useState(!1),_=d.useRef(null),m=d.useCallback(()=>{var g,S;return((g=_.current)==null?void 0:g.dataset.anchor)==="true"||((S=_.current)==null?void 0:S.dataset.selected)==="true"},[]),h=d.useCallback(()=>{a||u(!0)},[a]),f=d.useCallback(g=>{if(g.target.closest("[data-select-trigger]")){g.stopPropagation(),h();return}m()&&h()},[m,h]),p=d.useCallback(g=>{g.preventDefault(),h()},[h]),x=d.useCallback(g=>{(g.key==="Enter"||g.key===" "||g.key==="ArrowDown")&&g.target.closest('[role="gridcell"]')===_.current&&(g.preventDefault(),g.stopPropagation(),h())},[h]),N=d.useCallback(g=>{var S;n==null||n(g),u(!1),(S=_.current)==null||S.focus()},[n]),b=(i==null?void 0:i.render)??(i==null?void 0:i.label)??o,z=e.jsx("span",{"data-select-trigger":!0,className:Ls.trigger,role:"button",tabIndex:-1,"aria-label":"Open options",children:e.jsx(j.CaretUpDownIcon,{size:15})});return e.jsxs(He,{ref:_,disabled:a,trailing:z,clipboardValue:t,onClick:f,onDoubleClick:p,onKeyDown:x,...l,children:[e.jsx("span",{className:Ls.value,children:b}),e.jsx("select",{className:Ls.hiddenSelect,value:t,tabIndex:-1,"aria-hidden":"true",onChange:()=>{},children:s.map(g=>e.jsx("option",{value:g.value,children:g.label},g.value))}),c&&e.jsx(Bu,{cellRef:_,options:s,value:t,onSelect:N,onClose:()=>{var g;u(!1),(g=_.current)==null||g.focus()}})]})}function Bu({cellRef:t,options:s,value:n,onSelect:o,onClose:a}){var f;const r=d.useRef(null),l=(f=t.current)==null?void 0:f.getBoundingClientRect(),i=l?l.bottom+4:0,c=l?l.left:0,u=l?l.width:220,_=typeof window<"u"?window.innerHeight:9999,m=Math.min(s.length*32+16,300),h=i+m>_-8?l?l.top-m-4:0:i;return d.useEffect(()=>{function p(x){x.key==="Escape"&&(x.preventDefault(),x.stopPropagation(),a())}return document.addEventListener("keydown",p,!0),()=>document.removeEventListener("keydown",p,!0)},[a]),d.useEffect(()=>{function p(x){var N,b;(N=r.current)!=null&&N.contains(x.target)||(b=t.current)!=null&&b.contains(x.target)||a()}return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[a,t]),d.useEffect(()=>{function p(x){var N;(N=r.current)!=null&&N.contains(x.target)||a()}return window.addEventListener("scroll",p,{capture:!0,passive:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})},[a]),pt.createPortal(e.jsx("div",{ref:r,className:Ls.popoverPanel,style:{top:h,left:c,minWidth:u},onMouseDown:p=>p.stopPropagation(),role:"listbox","aria-label":"Select option","data-popover-panel":!0,children:e.jsx(Je,{children:s.map(p=>e.jsx(Yn,{label:p.label,checked:p.value===n,disabled:p.disabled,onClick:()=>o(p.value)},p.value))})}),document.body)}function ho({value:t,defaultValue:s="",onValueChange:n,inputProps:o,disabled:a,error:r,...l}){const i=t!==void 0,[c,u]=d.useState(t??s);d.useEffect(()=>{i&&u(t??"")},[i,t]);const _=()=>n==null?void 0:n(c);return e.jsx(He,{disabled:a,error:r,...l,children:e.jsx("input",{className:Ft.input,value:c,disabled:a,onChange:m=>u(m.target.value),onBlur:_,onKeyDown:m=>{m.key==="Enter"&&m.currentTarget.blur(),m.key==="Escape"&&(u(t??s),m.currentTarget.blur())},...o})})}function po({value:t,defaultValue:s="",onValueChange:n,textareaProps:o,disabled:a,...r}){const l=t!==void 0,[i,c]=d.useState(t??s),u=d.useRef(null);return d.useEffect(()=>{l&&c(t??"")},[l,t]),d.useEffect(()=>{u.current&&(u.current.style.height="0px",u.current.style.height=`${Math.max(u.current.scrollHeight,24)}px`)},[i]),e.jsx(He,{multiline:!0,disabled:a,...r,children:e.jsx("textarea",{ref:u,className:[Ft.input,Ft.textarea].join(" "),value:i,disabled:a,onChange:_=>c(_.target.value),onBlur:()=>n==null?void 0:n(i),...o})})}function xo({value:t,onValueChange:s,toggleLabel:n="Toggle quantity",...o}){const a=r=>s==null?void 0:s({...t,checked:r,quantity:r?t.quantity??0:null});return e.jsx(Hs,{...o,value:t.quantity??"",inputDisabled:!t.checked,leading:e.jsx(vn,{size:"small",checked:t.checked,disabled:t.disabledToggle,"aria-label":n,onChange:r=>a(r.target.checked)}),onValueChange:r=>s==null?void 0:s({...t,quantity:r,checked:r!==null})})}const go=40,Cu="_viewport_1hdir_1",Tu="_canvas_1hdir_6",Du="_window_1hdir_11",Js={viewport:Cu,canvas:Tu,window:Du};function qn(t,s){return s.getBoundingClientRect().top-t.getBoundingClientRect().top+t.scrollTop}function bo({items:t,height:s,rowHeight:n=go,overscan:o=5,renderRow:a,onEndReached:r,endReachedThreshold:l=10,loadingMore:i=!1,className:c}){const{scrollContainerRef:u,setBodyHeight:_}=d.useContext(jo),m=d.useRef(null),[h,f]=d.useState(0),[p,x]=d.useState(0),N=s??p;d.useEffect(()=>{if(s!==void 0)return _==null||_(s),()=>_==null?void 0:_(0)},[s,_]),d.useEffect(()=>{if(s!==void 0)return;const w=u==null?void 0:u.current;if(!w||!m.current)return;const T=()=>x(Math.max(0,w.clientHeight-qn(w,m.current))),R=new ResizeObserver(T);return R.observe(w),T(),()=>R.disconnect()},[s,u]),d.useEffect(()=>{const w=u==null?void 0:u.current;if(!w||!m.current)return;const T=()=>{f(Math.max(0,w.scrollTop-qn(w,m.current)));const R=w.scrollHeight-w.scrollTop-w.clientHeight;!i&&R<=n*l&&(r==null||r())};return w.addEventListener("scroll",T,{passive:!0}),T(),()=>w.removeEventListener("scroll",T)},[u,i,n,l,r]);const b=Math.max(0,Math.floor(h/n)-o),z=Math.ceil(N/n)+o*2,g=Math.min(t.length,b+z),S=d.useMemo(()=>t.slice(b,g),[t,b,g]);return e.jsx("div",{ref:m,className:[Js.viewport,c].filter(Boolean).join(" "),style:s!==void 0?{minHeight:s}:void 0,role:"rowgroup",children:e.jsx("div",{className:Js.canvas,style:{height:t.length*n},children:e.jsx("div",{className:Js.window,style:{"--nv-data-grid-offset":`${b*n}px`},children:S.map((w,T)=>a(w,b+T))})})})}const Mu="_grid_qa1ux_1",Ru={grid:Mu},jo=d.createContext({scrollContainerRef:null}),Eu='button, a[href], [role="button"]:not([data-select-trigger]), [data-grid-interactive]';function Qs(t){var s;return t instanceof Element&&!!((s=t.closest(Eu))!=null&&s.closest('[role="gridcell"]'))}function Lu({columns:t=1,totalRows:s,className:n,style:o,children:a,onKeyDown:r,onMouseDown:l,onMouseOver:i,onMouseUp:c,onCopy:u,onPaste:_,selection:m,defaultSelection:h=null,onSelectionChange:f,getCellValue:p,onPasteCells:x,onCopyCells:N,onFill:b,onUndo:z,onRedo:g,onDoubleClick:S,...w}){const T=typeof t=="number"?`repeat(${t}, minmax(0, 1fr))`:t,R=d.useRef(null),[H,Q]=d.useState(),[ee,Y]=d.useState(h),$=m===void 0?ee:m,k=d.useRef(!1),C=d.useRef(!1),te=d.useRef(null),V=()=>{if(!R.current)return[];const v=Array.from(R.current.querySelectorAll('[role="row"]'));if(!v.some(P=>P.dataset.rowIndex!==void 0))return v.map(P=>Array.from(P.querySelectorAll(':scope > [role="gridcell"]'))).filter(P=>P.length>0);const A=[];for(const P of v){const B=P.dataset.rowIndex;if(B===void 0)continue;const G=Array.from(P.querySelectorAll(':scope > [role="gridcell"]'));G.length>0&&(A[Number(B)]=G)}return A},ne=v=>{const D=v instanceof Element?v.closest('[role="gridcell"]'):null;if(!D)return null;const A=D.closest('[role="row"]');if(!A)return null;if(A.dataset.rowIndex!==void 0){const G=Number(A.dataset.rowIndex),U=Array.from(A.querySelectorAll(':scope > [role="gridcell"]')).indexOf(D);return U>=0?{row:G,column:U}:null}const P=V(),B=P.findIndex(G=>G==null?void 0:G.includes(D));return B<0?null:{row:B,column:P[B].indexOf(D)}},I=v=>{var D;return!(v instanceof Node&&((D=R.current)!=null&&D.contains(v)))},F=v=>{m===void 0&&Y(v),f==null||f(v)},oe=d.useRef();d.useEffect(()=>{const v=()=>{var L,M,K;const A=V();if(A.forEach(ae=>{ae&&ae.forEach(he=>{delete he.dataset.selected,delete he.dataset.anchor,delete he.dataset.rangeSelected,delete he.dataset.fillTarget})}),!$)return;const P=Math.min($.anchor.row,$.end.row),B=Math.max($.anchor.row,$.end.row),G=Math.min($.anchor.column,$.end.column),q=Math.max($.anchor.column,$.end.column);for(let ae=P;ae<=B;ae+=1)for(let he=G;he<=q;he+=1){const X=(L=A[ae])==null?void 0:L[he];X&&(X.dataset.rangeSelected="true")}const U=(M=A[$.anchor.row])==null?void 0:M[$.anchor.column];if(U&&(U.dataset.selected="true",U.dataset.anchor="true"),te.current){const ae=Math.min(P,te.current.row),he=Math.max(B,te.current.row),X=Math.min(G,te.current.column),re=Math.max(q,te.current.column);for(let ce=ae;ce<=he;ce+=1)for(let pe=X;pe<=re;pe+=1){const E=(K=A[ce])==null?void 0:K[pe];E&&!E.dataset.rangeSelected&&(E.dataset.fillTarget="true")}}};if(oe.current=v,v(),!R.current)return;const D=new MutationObserver(A=>{A.some(B=>B.addedNodes.length>0||B.removedNodes.length>0)&&v()});return D.observe(R.current,{childList:!0,subtree:!0}),()=>D.disconnect()},[$,a]);const le=v=>{const D=V(),A=Math.min(v.anchor.row,v.end.row),P=Math.max(v.anchor.row,v.end.row),B=Math.min(v.anchor.column,v.end.column),G=Math.max(v.anchor.column,v.end.column);return Array.from({length:P-A+1},(q,U)=>Array.from({length:G-B+1},(L,M)=>{var he;if(p)return p(A+U,B+M);const K=(he=D[A+U])==null?void 0:he[B+M];if(!K)return"";const ae=K.querySelector("input, textarea, select");return K.dataset.gridValue??(ae==null?void 0:ae.value)??K.innerText.trim()}))};return e.jsx(jo.Provider,{value:{scrollContainerRef:R,bodyHeight:H,setBodyHeight:Q},children:e.jsx("div",{role:"grid",ref:R,className:[Ru.grid,n].filter(Boolean).join(" "),style:{"--nv-data-grid-columns":T,maxHeight:H?`calc(${H}px + var(--nv-data-grid-header-height, 65px))`:void 0,...o},onKeyDown:v=>{var K,ae,he,X,re,ce,pe,E,W,y,Z,se,ge;if(r==null||r(v),v.defaultPrevented||I(v.target)||Qs(v.target)&&(v.key==="Enter"||v.key===" "))return;const D=v.metaKey||v.ctrlKey;if(D&&v.key.toLowerCase()==="z"){v.preventDefault(),v.shiftKey?g==null||g():z==null||z();return}if(D&&v.key.toLowerCase()==="y"){v.preventDefault(),g==null||g();return}if(D&&v.key.toLowerCase()==="a"){v.preventDefault();const _e=V(),Te=s!=null?s-1:_e.length-1,Qe=(((K=_e.find(Ye=>Ye))==null?void 0:K.length)??1)-1;Te>=0&&Qe>=0&&F({anchor:{row:0,column:0},end:{row:Te,column:Qe}});return}const A=v.target.matches("input, textarea, select");if(A&&!["Escape","Tab","Enter"].includes(v.key))return;const P=V(),B=ne(v.target)??($==null?void 0:$.anchor);if(!B)return;const G=((he=(ae=P[B.row])==null?void 0:ae[B.column])==null?void 0:he.getAttribute("aria-readonly"))==="true";if(!A&&v.key.length===1&&!D){if(G)return;const _e=(re=(X=P[B.row])==null?void 0:X[B.column])==null?void 0:re.querySelector("input, textarea, select");_e&&_e.focus();return}if(v.key==="Enter"&&!A){if(v.preventDefault(),G)return;(E=(pe=(ce=P[B.row])==null?void 0:ce[B.column])==null?void 0:pe.querySelector("input, textarea, select, button"))==null||E.focus();return}if(v.key==="Escape"&&A){v.preventDefault(),v.target.blur(),(y=(W=P[B.row])==null?void 0:W[B.column])==null||y.focus();return}const q=v.key==="Tab"&&!v.shiftKey,U=v.key==="Tab"&&v.shiftKey,L=v.key==="ArrowLeft"||U?{row:B.row,column:B.column-1}:v.key==="ArrowRight"||q?{row:B.row,column:B.column+1}:v.key==="ArrowUp"?{row:B.row-1,column:B.column}:v.key==="ArrowDown"||v.key==="Enter"?{row:B.row+1,column:B.column}:null;if(!L)return;L.column>=(((Z=P[L.row])==null?void 0:Z.length)??0)?(L.row+=1,L.column=0):L.column<0&&(L.row-=1,L.column=(((se=P[L.row])==null?void 0:se.length)??1)-1);const M=(ge=P[L.row])==null?void 0:ge[L.column];M&&(v.preventDefault(),M.focus(),F(v.shiftKey&&$?{anchor:$.anchor,end:L}:{anchor:L,end:L}))},onDoubleClick:v=>{var A;if(S==null||S(v),v.defaultPrevented||I(v.target)||Qs(v.target))return;const D=v.target.closest('[role="gridcell"]');(D==null?void 0:D.getAttribute("aria-readonly"))!=="true"&&((A=D==null?void 0:D.querySelector("input, textarea, select"))==null||A.focus())},onMouseDown:v=>{if(l==null||l(v),I(v.target)||Qs(v.target)||v.target.matches("input:focus, textarea:focus, select:focus"))return;v.button===0&&v.preventDefault();const D=ne(v.target);if(!D)return;const A=v.target.closest('[role="gridcell"]'),P=A==null?void 0:A.getBoundingClientRect(),B=!!P&&!!$&&$.anchor.row===D.row&&$.anchor.column===D.column&&v.clientX>=P.right-8&&v.clientY>=P.bottom-8;if(v.target.closest("[data-grid-fill-handle]")||B){C.current=!0,te.current=D;return}k.current=!0,A==null||A.focus(),F(v.shiftKey&&$?{anchor:$.anchor,end:D}:{anchor:D,end:D})},onMouseOver:v=>{var A;i==null||i(v);const D=ne(v.target);if(D){if(k.current||C.current){const P=document.activeElement;P!=null&&P.matches("input, textarea, select")&&P.blur()}C.current?(te.current=D,(A=oe.current)==null||A.call(oe)):k.current&&$&&F({anchor:$.anchor,end:D})}},onMouseUp:v=>{var D;c==null||c(v),k.current=!1,C.current&&$&&te.current&&(b==null||b({source:$,target:te.current})),C.current=!1,te.current=null,(D=oe.current)==null||D.call(oe)},onCopy:v=>{if(u==null||u(v),!$||v.defaultPrevented)return;const D=le($),A=D.map(P=>P.join(" ")).join(`
|
|
2
2
|
`);v.clipboardData.setData("text/plain",A),v.preventDefault(),N==null||N({selection:$,values:D,text:A})},onPaste:v=>{if(_==null||_(v),!$||v.defaultPrevented||!x)return;const A=v.clipboardData.getData("text/plain").replace(/\r/g,"").split(`
|
|
3
|
-
`).map(P=>P.split(" "));v.preventDefault(),x({start:$.anchor,values:A})},...w,children:a})})}const vo=Object.assign(Eu,{Row:Ps,Header:lo,HeaderCell:io,ErrorSummary:co,Cell:He,TextCell:ho,NumberCell:Hs,CurrencyCell:no,ColumnVisibility:ro,BooleanCell:so,ReadOnlyCell:_o,SelectCell:fo,LinkCell:uo,MultilineCell:po,ToggleableNumberCell:xo,Skeleton:mo,VirtualBody:bo,ActionButton:to}),Lu="_root_1qu2a_1",Au="_disabled_1qu2a_12",qu="_singleLine_1qu2a_16",Fu="_bordered_1qu2a_22",Pu="_input_1qu2a_48",Ou="_box_1qu2a_62",Wu="_boxChecked_1qu2a_79",Hu="_boxIndeterminate_1qu2a_80",Gu="_content_1qu2a_127",Uu="_labelRow_1qu2a_135",Vu="_labelText_1qu2a_141",Ku="_optional_1qu2a_148",Yu="_infoIcon_1qu2a_155",Xu="_price_1qu2a_160",Zu="_description_1qu2a_168",Se={root:Lu,disabled:Au,singleLine:qu,bordered:Fu,input:Pu,box:Ou,boxChecked:Wu,boxIndeterminate:Hu,content:Gu,labelRow:Uu,labelText:Vu,optional:Ku,infoIcon:Yu,price:Xu,description:Zu};function Ju({label:t,optional:s,tooltip:n,description:o,badge:a,badgeColor:r="information",price:l,bordered:i=!1,indeterminate:c=!1,checked:u,defaultChecked:_,disabled:m,onChange:f,className:h,"data-state":p,...x}){const N=d.useRef(null),b=u!==void 0,[z,g]=d.useState(_??!1),S=b?!!u:z;d.useEffect(()=>{N.current&&(N.current.indeterminate=c)},[c]);function w(H){b||g(H.target.checked),f==null||f(H)}const T=[Se.root,i&&Se.bordered,!o&&Se.singleLine,(S||c)&&Se.checked,m&&Se.disabled,h].filter(Boolean).join(" "),R=[Se.box,S&&!c&&Se.boxChecked,c&&Se.boxIndeterminate].filter(Boolean).join(" ");return e.jsxs("label",{className:T,"data-state":p,children:[e.jsx("input",{ref:N,type:"checkbox",className:Se.input,checked:u,defaultChecked:b?void 0:_,readOnly:b&&!f,disabled:m,onChange:w,...x}),e.jsxs("span",{className:R,"aria-hidden":!0,children:[S&&!c&&e.jsx(j.CheckIcon,{size:10,strokeWidth:3.5}),c&&e.jsx(j.MinusIcon,{size:10,strokeWidth:3.5})]}),e.jsxs("div",{className:Se.content,children:[e.jsxs("div",{className:Se.labelRow,children:[e.jsx("span",{className:Se.labelText,children:t}),s&&e.jsx("span",{className:Se.optional,children:"(Optional)"}),n&&e.jsx(ht,{content:n,placement:"top",children:e.jsx(j.InfoIcon,{size:15,className:Se.infoIcon})}),a&&e.jsx(Bt,{color:r,children:a}),l&&e.jsx("span",{className:Se.price,children:l})]}),o&&e.jsx("p",{className:Se.description,children:o})]})]})}const Qu="_root_1mv4n_1",e_="_disabled_1mv4n_12",t_="_input_1mv4n_17",s_="_circle_1mv4n_30",n_="_checked_1mv4n_57",o_="_label_1mv4n_96",Ht={root:Qu,disabled:e_,input:t_,circle:s_,checked:n_,label:o_};function yo({label:t,disabled:s,checked:n,className:o,"data-state":a,...r}){const l=[Ht.root,s&&Ht.disabled,o].filter(Boolean).join(" "),i=[Ht.circle,n&&Ht.checked].filter(Boolean).join(" ");return e.jsxs("label",{className:l,"data-state":a,children:[e.jsx("input",{type:"radio",className:Ht.input,disabled:s,checked:n,readOnly:!r.onChange,...r}),e.jsx("span",{className:i,"aria-hidden":!0}),t&&e.jsx("span",{className:Ht.label,children:t})]})}const a_="_root_k8ipa_1",r_="_disabled_k8ipa_12",l_="_singleLine_k8ipa_16",i_="_bordered_k8ipa_22",c_="_checked_k8ipa_31",d_="_input_k8ipa_57",u_="_circle_k8ipa_71",__="_circleChecked_k8ipa_99",m_="_content_k8ipa_146",f_="_labelRow_k8ipa_154",h_="_labelText_k8ipa_160",p_="_optional_k8ipa_167",x_="_infoIcon_k8ipa_174",g_="_leftIcon_k8ipa_179",b_="_price_k8ipa_186",j_="_description_k8ipa_194",Be={root:a_,disabled:r_,singleLine:l_,bordered:i_,checked:c_,input:d_,circle:u_,circleChecked:__,content:m_,labelRow:f_,labelText:h_,optional:p_,infoIcon:x_,leftIcon:g_,price:b_,description:j_};function v_({label:t,leftIcon:s,optional:n,tooltip:o,description:a,badge:r,badgeColor:l="information",badgePreset:i,price:c,bordered:u=!1,checked:_,defaultChecked:m,disabled:f,onChange:h,className:p,"data-state":x,...N}){const b=_!==void 0,[z,g]=d.useState(m??!1),S=b?!!_:z;function w(H){b||g(H.target.checked),h==null||h(H)}const T=[Be.root,u&&Be.bordered,S&&Be.checked,f&&Be.disabled,!a&&Be.singleLine,p].filter(Boolean).join(" "),R=[Be.circle,S&&Be.circleChecked].filter(Boolean).join(" ");return e.jsxs("label",{className:T,"data-state":x,children:[e.jsx("input",{type:"radio",className:Be.input,checked:_,defaultChecked:b?void 0:m,readOnly:b&&!h,disabled:f,onChange:w,...N}),e.jsx("span",{className:R,"aria-hidden":!0}),e.jsxs("div",{className:Be.content,children:[e.jsxs("div",{className:Be.labelRow,children:[s&&e.jsx("span",{className:Be.leftIcon,"aria-hidden":!0,children:s}),e.jsx("span",{className:Be.labelText,children:t}),n&&e.jsx("span",{className:Be.optional,children:"(Optional)"}),o&&e.jsx(ht,{content:o,placement:"top",children:e.jsx(j.InfoIcon,{size:15,className:Be.infoIcon})}),r&&(i?e.jsx(Bt,{preset:i,children:r}):e.jsx(Bt,{color:l,children:r})),c&&e.jsx("span",{className:Be.price,children:c})]}),a&&e.jsx("p",{className:Be.description,children:a})]})]})}const y_="_root_1tb49_1",N_="_background_1tb49_10",$_="_disabled_1tb49_20",w_="_row_1tb49_36",k_="_input_1tb49_51",I_="_track_1tb49_65",z_="_checked_1tb49_76",S_="_thumb_1tb49_83",B_="_small_1tb49_117",C_="_content_1tb49_133",T_="_labelRow_1tb49_141",D_="_labelText_1tb49_153",M_="_optional_1tb49_160",R_="_infoIcon_1tb49_167",E_="_description_1tb49_172",L_="_revealed_1tb49_182",ke={root:y_,background:N_,disabled:$_,row:w_,input:k_,track:I_,checked:z_,thumb:S_,small:B_,content:C_,labelRow:T_,labelText:D_,optional:M_,infoIcon:R_,description:E_,revealed:L_};function A_({label:t,optional:s,tooltip:n,description:o,background:a=!1,size:r="default",children:l,checked:i,defaultChecked:c,disabled:u,onChange:_,className:m,"data-state":f,...h}){const p=i!==void 0,[x,N]=d.useState(c??!1),b=p?!!i:x;function z(T){p||N(T.target.checked),_==null||_(T)}const g=[ke.root,a&&ke.background,r==="small"&&ke.small,u&&ke.disabled,m].filter(Boolean).join(" "),S=[ke.track,b&&ke.checked].filter(Boolean).join(" "),w=[ke.thumb,b&&ke.checked].filter(Boolean).join(" ");return e.jsxs("div",{className:g,"data-state":f,children:[e.jsxs("label",{className:ke.row,children:[e.jsx("input",{type:"checkbox",role:"switch",className:ke.input,checked:i,defaultChecked:p?void 0:c,readOnly:p&&!_,disabled:u,onChange:z,...h}),e.jsx("span",{className:S,"aria-hidden":!0,children:e.jsx("span",{className:w})}),e.jsxs("div",{className:ke.content,children:[e.jsxs("div",{className:ke.labelRow,children:[e.jsx("span",{className:ke.labelText,children:t}),s&&e.jsx("span",{className:ke.optional,children:"(Optional)"}),n&&e.jsx(ht,{content:n,placement:"top",children:e.jsx(j.InfoIcon,{size:15,className:ke.infoIcon})})]}),o&&e.jsx("p",{className:ke.description,children:o})]})]}),b&&l&&e.jsx("div",{className:ke.revealed,children:l})]})}const q_="_wrap_1sfxx_2",F_="_base_1sfxx_15",P_="_sm_1sfxx_16",O_="_withSlot_1sfxx_19",W_="_input_1sfxx_26",H_="_withLeftIcon_1sfxx_32",G_="_withRightIcon_1sfxx_33",U_="_iconLeft_1sfxx_37",V_="_iconDivider_1sfxx_37",K_="_prefix_1sfxx_42",Y_="_suffix_1sfxx_56",X_="_white_1sfxx_70",Z_="_gray_1sfxx_73",J_="_disabled_1sfxx_82",Q_="_error_1sfxx_98",em="_rightSlot_1sfxx_189",tm="_iconRight_1sfxx_193",sm="_aiSlot_1sfxx_217",Ie={wrap:q_,base:F_,sm:P_,withSlot:O_,input:W_,withLeftIcon:H_,withRightIcon:G_,iconLeft:U_,iconDivider:V_,prefix:K_,suffix:Y_,white:X_,gray:Z_,disabled:J_,error:Q_,rightSlot:em,iconRight:tm,aiSlot:sm},Ke=d.forwardRef(function({size:s="base",variant:n="white",error:o=!1,leftIcon:a,rightIcon:r,leftIconDivider:l=!1,rightIconDivider:i=!1,prefix:c,suffix:u,rightSlot:_,aiSlot:m,inputClassName:f,className:h,disabled:p,"aria-invalid":x,...N},b){const z=o||x===!0||x==="true",g=!!c||!!u||!!_||!!a||!!r||!!m,S=[Ie.wrap,Ie[s],Ie[n],g?Ie.withSlot:"",a?Ie.withLeftIcon:"",r?Ie.withRightIcon:"",z?Ie.error:"",p?Ie.disabled:"",h].filter(Boolean).join(" ");return e.jsxs("div",{className:S,children:[c&&e.jsx("span",{className:Ie.prefix,children:c}),a&&e.jsx("span",{className:[Ie.iconLeft,l?Ie.iconDivider:""].filter(Boolean).join(" "),children:a}),e.jsx("input",{ref:b,className:[Ie.input,f].filter(Boolean).join(" "),disabled:p,"aria-invalid":x??(o||void 0),...N}),r&&e.jsx("span",{className:[Ie.iconRight,i?Ie.iconDivider:""].filter(Boolean).join(" "),children:r}),_&&e.jsx("span",{className:Ie.rightSlot,children:_}),m&&e.jsx("span",{className:Ie.aiSlot,children:m}),u&&e.jsx("span",{className:Ie.suffix,children:u})]})}),nm="_root_ade08_1",om={root:nm};function No({onClick:t,"aria-label":s="Clear"}){return e.jsx("button",{type:"button",className:om.root,onClick:t,tabIndex:-1,"aria-label":s,children:e.jsx(j.CloseIcon,{size:10})})}const am="_root_1agox_1",rm="_squared_1agox_19",lm="_rounded_1agox_24",im="_bgField_1agox_31",cm="_contrastBgSubtle_1agox_36",dm="_bgFieldComponent_1agox_42",_s={root:am,squared:rm,rounded:lm,bgField:im,contrastBgSubtle:cm,bgFieldComponent:dm},um={"bg-field":_s.bgField,"contrast-bg-subtle":_s.contrastBgSubtle,"bg-field-component":_s.bgFieldComponent};function mt({children:t,bg:s="bg-field",radius:n="default",className:o}){return e.jsx("kbd",{className:[_s.root,um[s],_s[n],o].filter(Boolean).join(" "),children:t})}const _m="_input_1d4yp_1",mm="_shortcut_1d4yp_7",Fn={input:_m,shortcut:mm},$o=d.forwardRef(function({value:s,defaultValue:n,onChange:o,onClear:a,shortcut:r,inputClassName:l,...i},c){const u=d.useRef(null),_=s!==void 0,[m,f]=d.useState(n??""),h=_?s??"":m;function p(b){_||f(b.target.value),o==null||o(b)}function x(){var z;const b=u.current;if(b){const g=(z=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"))==null?void 0:z.set;g==null||g.call(b,""),b.dispatchEvent(new Event("input",{bubbles:!0})),b.focus()}else _||f("");a==null||a()}const N=h?e.jsx(No,{onClick:x,"aria-label":"Clear search"}):r?e.jsx(mt,{className:Fn.shortcut,bg:"bg-field-component",children:r}):void 0;return e.jsx(Ke,{ref:b=>{u.current=b,typeof c=="function"?c(b):c&&(c.current=b)},type:"search",value:h,onChange:p,leftIcon:e.jsx(j.MagnifyingGlassIcon,{size:15}),rightIcon:N,inputClassName:[Fn.input,l].filter(Boolean).join(" "),...i})}),fm="_root_3xwqj_1",hm="_text_3xwqj_11",pm="_illustration_3xwqj_18",xm="_card_3xwqj_28",gm="_cardLeft_3xwqj_35",bm="_cardRight_3xwqj_40",jm="_cardFront_3xwqj_45",vm="_title_3xwqj_68",ym="_description_3xwqj_76",Nm="_actions_3xwqj_84",Pe={root:fm,text:hm,illustration:pm,card:xm,cardLeft:gm,cardRight:bm,cardFront:jm,title:vm,description:ym,actions:Nm};function wo({icon:t=e.jsx(j.TagPlusIcon,{}),sideIcons:s=[e.jsx(j.UserRoundIcon,{}),e.jsx(j.FileTextIcon,{})],title:n,description:o,actionLabel:a,actionIcon:r,onAction:l,linkLabel:i,onLink:c,height:u=400,className:_}){const m=a||i;return e.jsxs("div",{className:[Pe.root,_].filter(Boolean).join(" "),style:{height:typeof u=="number"?`${u}px`:u},children:[t&&e.jsxs("div",{className:Pe.illustration,"aria-hidden":"true",children:[e.jsx(St,{type:"icon",icon:s[0],size:"xlarge",shape:"rounded",className:[Pe.card,Pe.cardLeft].join(" ")}),e.jsx(St,{type:"icon",icon:s[1],size:"xlarge",shape:"rounded",className:[Pe.card,Pe.cardRight].join(" ")}),e.jsx(St,{type:"icon",icon:t,size:"xlarge",shape:"rounded",className:[Pe.card,Pe.cardFront].join(" ")})]}),e.jsxs("div",{className:Pe.text,children:[e.jsx("p",{className:Pe.title,children:n}),o&&e.jsx("p",{className:Pe.description,children:o})]}),m&&e.jsxs("div",{className:Pe.actions,children:[a&&e.jsx(ve,{variant:"neutral",size:"base",leftIcon:r,onClick:l,children:a}),i&&e.jsx(Jt,{size:"lg",tone:"base",rightIcon:e.jsx(j.CaretRightIcon,{size:12}),onClick:c,children:i})]})]})}const $m="_root_11lz5_3",wm="_fullWidth_11lz5_13",km="_item_11lz5_18",Im="_iconOnly_11lz5_22",zm="_active_11lz5_48",Sm="_forceHover_11lz5_49",Bm="_icon_11lz5_22",Cm="_label_11lz5_87",It={root:$m,fullWidth:wm,item:km,iconOnly:Im,active:zm,forceHover:Sm,icon:Bm,label:Cm};function ko({children:t,fullWidth:s=!1,className:n,style:o}){return e.jsx("div",{className:[It.root,s?It.fullWidth:void 0,n].filter(Boolean).join(" "),style:o,role:"tablist",children:t})}function fn({label:t,icon:s,"aria-label":n,active:o=!1,disabled:a=!1,forceHover:r=!1,onClick:l,className:i}){const c=!t;return e.jsxs("button",{type:"button",role:"tab","aria-selected":o,"aria-label":n??t,className:[It.item,c&&It.iconOnly,o&&It.active,r&&It.forceHover,i].filter(Boolean).join(" "),disabled:a,onClick:l,children:[s&&e.jsx("span",{className:It.icon,children:s}),t&&e.jsx("span",{className:It.label,children:t})]})}const Tm="_search_nwd4i_5",Dm="_modalInputWrap_nwd4i_20",Mm="_modalInput_nwd4i_20",Rm="_areaRow_nwd4i_31",Em="_areaTrigger_nwd4i_37",Lm="_areaMenu_nwd4i_48",Am="_backButton_nwd4i_85",qm="_clearBtn_nwd4i_90",Fm="_results_nwd4i_105",Pm="_group_nwd4i_113",Om="_groupLabel_nwd4i_117",Wm="_item_nwd4i_127",Hm="_elaborated_nwd4i_142",Gm="_itemDescription_nwd4i_146",Um="_hover_nwd4i_153",Vm="_focus_nwd4i_155",Km="_itemAvatar_nwd4i_159",Ym="_itemThumbnail_nwd4i_166",Xm="_itemIcon_nwd4i_173",Zm="_itemCopy_nwd4i_182",Jm="_itemLabel_nwd4i_189",Qm="_subtext_nwd4i_202",ef="_badge_nwd4i_210",tf="_shortcut_nwd4i_226",sf="_shortcutPart_nwd4i_233",nf="_shortcutThen_nwd4i_234",of="_showMore_nwd4i_236",af="_recommendation_nwd4i_245",rf="_overlay_nwd4i_264",lf="_dialog_nwd4i_274",cf="_srOnly_nwd4i_325",df="_recommendationContent_nwd4i_352",uf="_recommendationHeader_nwd4i_359",_f="_recommendationIcon_nwd4i_366",mf="_recommendationTitle_nwd4i_376",ff="_recommendationDescription_nwd4i_386",hf="_recommendationArrow_nwd4i_396",pf="_controlItem_nwd4i_406",xf="_empty_nwd4i_413",gf="_emptyBox_nwd4i_414",bf="_loading_nwd4i_430",jf="_skeletonHeading_nwd4i_436",vf="_pulse_nwd4i_1",yf="_skeletonRow_nwd4i_445",Nf="_footer_nwd4i_468",$f="_footerGroup_nwd4i_482",wf="_footerLabel_nwd4i_488",kf="_footerKeys_nwd4i_492",If="_footerDivider_nwd4i_498",J={search:Tm,modalInputWrap:Dm,modalInput:Mm,areaRow:Rm,areaTrigger:Em,areaMenu:Lm,backButton:Am,clearBtn:qm,results:Fm,group:Pm,groupLabel:Om,item:Wm,elaborated:Hm,itemDescription:Gm,hover:Um,focus:Vm,itemAvatar:Km,itemThumbnail:Ym,itemIcon:Xm,itemCopy:Zm,itemLabel:Jm,subtext:Qm,badge:ef,shortcut:tf,shortcutPart:sf,shortcutThen:nf,showMore:of,recommendation:af,overlay:rf,dialog:lf,"search-overlay-in":"_search-overlay-in_nwd4i_1","search-overlay-out":"_search-overlay-out_nwd4i_1","search-dialog-in":"_search-dialog-in_nwd4i_1","search-dialog-out":"_search-dialog-out_nwd4i_1",srOnly:cf,recommendationContent:df,recommendationHeader:uf,recommendationIcon:_f,recommendationTitle:mf,recommendationDescription:ff,recommendationArrow:hf,controlItem:pf,empty:xf,emptyBox:gf,loading:bf,skeletonHeading:jf,pulse:vf,skeletonRow:yf,footer:Nf,footerGroup:$f,footerLabel:wf,footerKeys:kf,footerDivider:If},Io=d.forwardRef(function({depth:s="default",loading:n=!1,areas:o,area:a,defaultArea:r,onAreaChange:l,value:i,defaultValue:c,onChange:u,onClear:_,onBack:m,className:f,...h},p){var ee;const x=i!==void 0,[N,b]=d.useState((c==null?void 0:c.toString())??""),z=x?String(i??""):N,g=a!==void 0,[S,w]=d.useState(r??((ee=o==null?void 0:o[0])==null?void 0:ee.id)??""),T=g?a:S,R=(o==null?void 0:o.find(Y=>Y.id===T))??(o==null?void 0:o[0]),H=!!(o&&o.length>0),Q=e.jsxs("div",{className:[J.modalInput,s==="one-down"?J.oneDown:"",H?"":f].filter(Boolean).join(" "),children:[s==="one-down"&&e.jsx(xe,{type:"button",variant:"transparent",size:"sm",icon:e.jsx(j.CornerDownLeftIcon,{size:14}),"aria-label":"Back",onClick:m,className:J.backButton}),e.jsx("input",{ref:p,type:"search",value:z,onChange:Y=>{x||b(Y.target.value),u==null||u(Y)},...h}),n&&e.jsx(Ct,{size:"xs"}),z&&e.jsx(ve,{type:"button",variant:"transparent",size:"sm",className:J.clearBtn,onClick:()=>{x||b(""),_==null||_()},children:"Clear"})]});return H?e.jsxs("div",{className:[J.modalInputWrap,s==="one-down"?J.oneDown:"",f].filter(Boolean).join(" "),children:[e.jsx("div",{className:J.areaRow,children:e.jsx(Ee,{bare:!0,placement:"bottom-start",offset:4,trigger:e.jsx("button",{type:"button",className:J.areaTrigger,children:e.jsx(Bt,{size:"2xs",color:"neutral",leftIcon:R==null?void 0:R.icon,rightIcon:e.jsx(j.CaretDownIcon,{size:12}),children:(R==null?void 0:R.label)??T})}),children:e.jsx(Qe,{className:J.areaMenu,children:o.map(Y=>e.jsx($e,{label:Y.label,leftIcon:Y.icon,active:Y.id===T,onClick:()=>{g||w(Y.id),l==null||l(Y.id)}},Y.id))})})}),Q]}):Q});function zf({size:t=12}){return e.jsx("svg",{width:t,height:t,viewBox:"0 0 15 15",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.5 1.5C4.5 0.671573 5.17157 0 6 0H9C9.82843 0 10.5 0.671573 10.5 1.5V3.5H13C13.8284 3.5 14.5 4.17157 14.5 5V9C14.5 9.82843 13.8284 10.5 13 10.5H10.5V13.5C10.5 14.3284 9.82843 15 9 15H6C5.17157 15 4.5 14.3284 4.5 13.5V10.5H2C1.17157 10.5 0.5 9.82843 0.5 9V5C0.5 4.17157 1.17157 3.5 2 3.5H4.5V1.5ZM4.5 5.5H6.5V7.5H4.5V5.5ZM8.5 5.5H10.5V7.5H8.5V5.5Z"})})}function hn({type:t="result",state:s="default",avatar:n,thumbnail:o,icon:a,label:r,subtext:l,description:i,badge:c,shortcut:u,thenLabel:_="then",className:m,children:f,...h}){return t==="title"?e.jsx("div",{className:[J.groupLabel,m].filter(Boolean).join(" "),...h,children:r??f}):t==="show-more"?e.jsxs("div",{className:[J.item,J.showMore,J[s],m].filter(Boolean).join(" "),role:"option",...h,children:[e.jsx(j.PlusIcon,{size:14}),e.jsx("span",{children:r??f??"Show more"})]}):t==="recommendation"?e.jsxs("div",{className:[J.recommendation,J[s],m].filter(Boolean).join(" "),role:"option","aria-selected":s==="focus",tabIndex:0,...h,children:[e.jsxs("div",{className:J.recommendationContent,children:[e.jsxs("div",{className:J.recommendationHeader,children:[e.jsx("span",{className:J.recommendationIcon,children:a??e.jsx(zf,{size:12})}),e.jsx("span",{className:J.recommendationTitle,children:r??f})]}),i&&e.jsx("div",{className:J.recommendationDescription,children:i})]}),e.jsx("span",{className:J.recommendationArrow,"aria-hidden":"true",children:e.jsx("svg",{width:"6",height:"8",viewBox:"0 0 6 8",fill:"currentColor",children:e.jsx("path",{d:"M0.5 0.75L5.5 4L0.5 7.25V0.75Z"})})})]}):t==="control"?e.jsx("div",{className:[J.controlItem,J[s],m].filter(Boolean).join(" "),role:"group",...h,children:f??e.jsxs(ko,{fullWidth:!0,children:[e.jsx(fn,{label:"Label",icon:e.jsx(j.FlameIcon,{size:14}),active:!0}),e.jsx(fn,{label:"Label",icon:e.jsx(j.FlameIcon,{size:14})})]})}):e.jsxs("div",{className:[J.item,t==="result-elaborated"?J.elaborated:"",J[s],m].filter(Boolean).join(" "),role:"option","aria-selected":s==="focus",tabIndex:-1,...h,children:[n&&e.jsx("span",{className:J.itemAvatar,children:n}),o&&e.jsx("span",{className:J.itemThumbnail,children:o}),a&&e.jsx("span",{className:J.itemIcon,children:a}),e.jsxs("span",{className:J.itemCopy,children:[e.jsx("span",{className:J.itemLabel,children:r??f}),i&&e.jsx("span",{className:J.itemDescription,children:i})]}),l&&e.jsx("span",{className:J.subtext,children:l}),c&&(typeof c=="string"?e.jsx(Bt,{size:"2xs",color:"neutral",children:c}):c),u&&e.jsx("span",{className:J.shortcut,children:u.map((p,x)=>e.jsxs("span",{className:J.shortcutPart,children:[e.jsx(mt,{children:p}),x<u.length-1&&e.jsx("span",{className:J.shortcutThen,children:_})]},`${p}-${x}`))})]})}function Sf(t){return typeof t=="string"||typeof t=="number"?String(t):""}function zo({groups:t,placeholder:s="Jump to or find something...",defaultQuery:n="",query:o,onQueryChange:a,onSelect:r,onShowMore:l,onBack:i,footer:c,emptyState:u,emptyIcon:_,emptyActionLabel:m,emptyActionIcon:f,onEmptyAction:h,initialTitle:p="Find anything",initialDescription:x="Search across products, orders, customers and settings.",emptyTitle:N="No results found",emptyDescription:b="We couldn't find anything that matched your search.",loading:z=!1,areas:g,area:S,defaultArea:w,onAreaChange:T,filterItems:R=!0,filterFn:H,allAreaId:Q=(V=>(V=g==null?void 0:g[0])==null?void 0:V.id)()??"all",showMoreLabel:ee="Show more",navigationLabel:Y="Navigate",openResultLabel:$="Open result",thenLabel:k,className:C,...te}){var he;const[ne,I]=d.useState(n),[F,oe]=d.useState(w??((he=g==null?void 0:g[0])==null?void 0:he.id)??""),[le,v]=d.useState(0),D=d.useId(),A=d.useRef(null),P=o??ne,B=S??F,G=d.useMemo(()=>{const X=B&&B!==Q?t.filter(ce=>!ce.area||ce.area===B):t;if(R===!1)return X;const re=P.toLowerCase().trim();return re?X.map(ce=>({...ce,items:ce.items.filter(pe=>H?H(pe,re):`${Sf(pe.label)} ${pe.keywords??""}`.toLowerCase().includes(re))})).filter(ce=>ce.items.length):X},[t,P,R,H,B,Q]),q=d.useMemo(()=>G.flatMap(X=>[...X.items.map(re=>({kind:"result",item:re,group:X})),...X.hasMore&&l?[{kind:"show-more",group:X}]:[]]),[G,l]);d.useEffect(()=>{v(X=>Math.min(X,Math.max(q.length-1,0)))},[q.length]),d.useEffect(()=>{const X=A.current,re=X==null?void 0:X.querySelector(`[id="${D}-option-${le}"]`);if(!X||!re)return;const ce=X.getBoundingClientRect(),pe=re.getBoundingClientRect();pe.top<ce.top?X.scrollTop+=pe.top-ce.top:pe.bottom>ce.bottom&&(X.scrollTop+=pe.bottom-ce.bottom)},[le,q,D]);function U(X){var re;o===void 0&&I(X),v(0),(re=A.current)==null||re.scrollTo({top:0}),a==null||a(X)}function L(X){var re;S===void 0&&oe(X),T==null||T(X),v(0),(re=A.current)==null||re.scrollTo({top:0})}function M(){L(Q),i==null||i()}function K(X){if(q.length&&(X.key==="ArrowDown"&&(X.preventDefault(),v(re=>(re+1)%q.length)),X.key==="ArrowUp"&&(X.preventDefault(),v(re=>(re-1+q.length)%q.length)),X.key==="Enter")){X.preventDefault();const re=q[le];(re==null?void 0:re.kind)==="result"&&(r==null||r(re.item)),(re==null?void 0:re.kind)==="show-more"&&(l==null||l(re.group))}}let ae=-1;return e.jsxs("div",{className:[J.search,C].filter(Boolean).join(" "),role:"combobox","aria-expanded":"true","aria-controls":D,...te,children:[e.jsx(Io,{areas:g,area:B,onAreaChange:L,value:P,onChange:X=>U(X.target.value),onKeyDown:K,onClear:()=>U(""),depth:B&&B!==Q?"one-down":"default",onBack:M,placeholder:s,loading:z,"aria-label":"Search",role:"searchbox","aria-controls":D,"aria-activedescendant":q.length?`${D}-option-${le}`:void 0}),e.jsx(Tt,{ref:A,size:"thin",direction:"y",className:J.results,maxHeight:"300px",children:e.jsx("div",{id:D,role:"listbox",children:z&&!G.length?e.jsxs("div",{className:J.loading,children:[e.jsx("div",{className:J.skeletonHeading}),Array.from({length:5}).map((X,re)=>e.jsx("div",{className:J.skeletonRow},re))]}):G.length?G.map(X=>{let re=-1;return e.jsxs("div",{className:J.group,children:[e.jsx("div",{className:J.groupLabel,role:"presentation",children:X.label}),X.items.map(ce=>{ae+=1;const pe=ae;return e.jsx(hn,{id:`${D}-option-${pe}`,type:ce.type,state:pe===le?"focus":"default",avatar:ce.avatar,thumbnail:ce.thumbnail,icon:ce.icon,label:ce.label,description:ce.description,subtext:ce.meta,badge:ce.badge,shortcut:ce.shortcut,thenLabel:k,onMouseEnter:()=>v(pe),onClick:()=>r==null?void 0:r(ce)},ce.id)}),X.hasMore&&l&&(ae+=1,re=ae,e.jsx(hn,{id:`${D}-option-${re}`,type:"show-more",state:re===le?"focus":"default",label:ee,onMouseEnter:()=>v(re),onClick:()=>l(X)}))]},X.label)}):u!=null&&typeof u!="string"?e.jsx("div",{className:J.emptyBox,children:u}):e.jsx(wo,{icon:_,title:typeof u=="string"?u:P.trim()?N:p,description:P.trim()?b:x,actionLabel:m,actionIcon:f,onAction:h&&(()=>h(P)),height:"auto",className:J.empty})})}),c!==null&&(c??e.jsxs("div",{className:J.footer,children:[e.jsxs("div",{className:J.footerGroup,children:[e.jsx("span",{className:J.footerLabel,children:Y}),e.jsxs("div",{className:J.footerKeys,children:[e.jsx(mt,{children:"β"}),e.jsx(mt,{children:"β"})]})]}),e.jsx("div",{className:J.footerDivider}),e.jsxs("div",{className:J.footerGroup,children:[e.jsx("span",{className:J.footerLabel,children:$}),e.jsx(mt,{children:"β΅"})]})]}))]})}function Bf({open:t,onOpenChange:s,title:n="Search",description:o="Search commands, navigation and records.",closeOnSelect:a=!0,onSelect:r,...l}){const i=d.useRef(null),c=d.useRef(null),u=d.useRef(null),_=d.useId(),m=d.useId(),[f,h]=d.useState(t);if(t&&!f&&h(!0),fs(f),d.useEffect(()=>{if(t||!f)return;const x=[i.current,c.current].flatMap(b=>{var z;return((z=b==null?void 0:b.getAnimations)==null?void 0:z.call(b))??[]});if(!x.length){h(!1);return}let N=!1;return Promise.all(x.map(b=>b.finished)).then(()=>{N||h(!1)},()=>{}),()=>{N=!0}},[t,f]),d.useEffect(()=>{if(f)return;const x=u.current;u.current=null;const N=!document.activeElement||document.activeElement===document.body;x!=null&&x.isConnected&&N&&x.focus()},[f]),d.useEffect(()=>{var z;if(!t)return;const x=document.activeElement;(z=c.current)!=null&&z.contains(x)||(u.current=x);const N=requestAnimationFrame(()=>{var g,S;return(S=(g=c.current)==null?void 0:g.querySelector('input[type="search"]'))==null?void 0:S.focus()});function b(g){if(g.key==="Escape"&&s(!1),g.key!=="Tab"||!c.current)return;const S=Array.from(c.current.querySelectorAll('button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])'));if(!S.length)return;const w=S[0],T=S[S.length-1];g.shiftKey&&document.activeElement===w&&(g.preventDefault(),T.focus()),!g.shiftKey&&document.activeElement===T&&(g.preventDefault(),w.focus())}return document.addEventListener("keydown",b),()=>{cancelAnimationFrame(N),document.removeEventListener("keydown",b)}},[t,s]),!f)return null;const p=t?"open":"closed";return pt.createPortal(e.jsx("div",{ref:i,className:J.overlay,"data-state":p,onMouseDown:x=>{t&&x.target===x.currentTarget&&s(!1)},children:e.jsxs("div",{ref:c,className:J.dialog,"data-state":p,role:"dialog","aria-modal":"true","aria-labelledby":_,"aria-describedby":m,children:[e.jsx("h2",{id:_,className:J.srOnly,children:n}),e.jsx("p",{id:m,className:J.srOnly,children:o}),e.jsx(zo,{...l,onSelect:x=>{r==null||r(x),a&&s(!1)}})]})}),document.body)}function Cf(t,s=!0){d.useEffect(()=>{if(!s)return;function n(o){o.key.toLowerCase()==="k"&&(o.metaKey||o.ctrlKey)&&(o.preventDefault(),t(!0))}return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[s,t])}const Tf="_root_ngc1v_1",Df="_img_ngc1v_11",Mf="_xsmall_ngc1v_19",Rf="_small_ngc1v_20",Ef="_base_ngc1v_21",Lf="_large_ngc1v_22",Af="_xlarge_ngc1v_23",en={root:Tf,img:Df,xsmall:Mf,small:Rf,base:Ef,large:Lf,xlarge:Af},qf="https://cdn.nevu.to/flags";function Ff({country:t,size:s="base",className:n}){const o=t.toUpperCase();return e.jsx("span",{className:[en.root,en[s],n].filter(Boolean).join(" "),children:e.jsx("img",{src:`${qf}/${o}.svg`,alt:o,loading:"lazy",className:en.img,onError:a=>{a.currentTarget.style.display="none"}})})}const Pf="_root_usrbs_1",Of="_item_usrbs_9",Wf="_muted_usrbs_21",Hf="_subtle_usrbs_25",Gf="_link_usrbs_30",Uf="_label_usrbs_36",Vf="_separator_usrbs_57",Kf="_current_usrbs_69",Ve={root:Pf,item:Of,muted:Wf,subtle:Hf,link:Gf,label:Uf,separator:Vf,current:Kf};function So(){return e.jsx("span",{className:Ve.separator,children:e.jsx(j.CaretRightIcon,{size:14,strokeWidth:1.5})})}function Yf({children:t,href:s,color:n="muted",className:o,...a}){const r=[Ve.item,Ve[n],o].filter(Boolean).join(" ");return e.jsxs("span",{className:r,...a,children:[s?e.jsx("a",{href:s,className:Ve.link,children:t}):e.jsx("span",{className:Ve.label,children:t}),e.jsx(So,{})]})}function Xf({items:t,color:s="muted",className:n}){return e.jsx("nav",{className:[Ve.root,Ve[s],n].filter(Boolean).join(" "),"aria-label":"breadcrumb",children:t.map((o,a)=>{const r=a===t.length-1;return e.jsxs("span",{className:[Ve.item,r&&Ve.current].filter(Boolean).join(" "),children:[o.href&&!r?e.jsx("a",{href:o.href,onClick:o.onClick,className:Ve.link,children:o.label}):e.jsx("span",{className:Ve.label,children:o.label}),!r&&e.jsx(So,{})]},a)})})}const Zf="_root_b9xiu_1",Jf="_hover_b9xiu_19",Qf="_selected_b9xiu_24",eh="_disabled_b9xiu_29",th="_highlighted_b9xiu_35",sh="_highlightedHover_b9xiu_40",nh="_focus_b9xiu_45",oh="_highlightedFocus_b9xiu_53",ah="_outside_b9xiu_63",rh="_rangeStart_b9xiu_69",lh="_inRange_b9xiu_75",ih="_rangeEnd_b9xiu_81",ch="_label_b9xiu_88",dh="_dot_b9xiu_95",uh="_dotInverted_b9xiu_106",rs={root:Zf,hover:Jf,selected:Qf,disabled:eh,highlighted:th,highlightedHover:sh,focus:nh,highlightedFocus:oh,outside:ah,rangeStart:rh,inRange:lh,rangeEnd:ih,label:ch,dot:dh,dotInverted:uh};function Bo({day:t,state:s="default",today:n=!1,marker:o=!1,onClick:a,onMouseEnter:r,onMouseLeave:l,className:i}){const c=s.replace(/-([a-z])/g,(h,p)=>p.toUpperCase()),u=rs[c],_=[rs.root,u,i].filter(Boolean).join(" "),m=n||o,f=s==="selected"||s==="range-start"||s==="range-end";return e.jsxs("button",{type:"button",className:_,onClick:a,onMouseEnter:r,onMouseLeave:l,disabled:s==="disabled",children:[e.jsx("span",{className:rs.label,children:t}),m&&e.jsx("span",{className:[rs.dot,f?rs.dotInverted:""].filter(Boolean).join(" ")})]})}const _h="_root_28ykl_1",mh={root:_h};function Co({label:t,className:s}){return e.jsx("span",{className:[mh.root,s].filter(Boolean).join(" "),children:t})}const fh="_root_1c3s6_1",hh="_arrow_1c3s6_21",ph="_label_1c3s6_39",js={root:fh,arrow:hh,label:ph};function To({label:t,onPrev:s,onNext:n,className:o}){return e.jsxs("div",{className:[js.root,o].filter(Boolean).join(" "),children:[e.jsx("button",{type:"button",className:js.arrow,onClick:s,"aria-label":"Previous month",children:e.jsx(j.CaretLeftIcon,{size:16})}),e.jsx("span",{className:js.label,children:t}),e.jsx("button",{type:"button",className:js.arrow,onClick:n,"aria-label":"Next month",children:e.jsx(j.CaretRightIcon,{size:16})})]})}const xh=["January","February","March","April","May","June","July","August","September","October","November","December"],gh=["M","T","W","T","F","S","S"];function bh(t,s){return!t||!s?!1:t.getFullYear()===s.getFullYear()&&t.getMonth()===s.getMonth()&&t.getDate()===s.getDate()}function jh(t){return bh(t,new Date)}function vs(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate())}function tn(t,s){return new Date(t.getFullYear(),t.getMonth()+s,1)}function vh(t,s){const o=new Date(t,s,1).getDay(),a=o===0?6:o-1,r=new Date(t,s,1-a);return Array.from({length:42},(l,i)=>new Date(r.getFullYear(),r.getMonth(),r.getDate()+i))}const yh="_root_vn4gz_1",Nh="_selector_vn4gz_8",$h="_grid_vn4gz_12",sn={root:yh,selector:Nh,grid:$h};function wh(t,s,n,o,a,r){if(t.getMonth()!==s)return"outside";const l=vs(t).getTime(),i=n?vs(n).getTime():null,u=(o?vs(o).getTime():null)??(r==="end"&&a?vs(a).getTime():null);return i!==null&&l===i?u!==null&&u>i?"range-start":"selected":u!==null&&i!==null&&l===u&&u>i?"range-end":i!==null&&u!==null&&l>i&&l<u?"in-range":"default"}function As({year:t,month:s,selectedStart:n,selectedEnd:o,hoverDate:a,selectionPhase:r="start",onDayClick:l,onDayHover:i,onPrevMonth:c,onNextMonth:u,className:_}){const m=vh(t,s),f=`${xh[s]} ${t}`;return e.jsxs("div",{className:[sn.root,_].filter(Boolean).join(" "),children:[e.jsx(To,{label:f,onPrev:c,onNext:u,className:sn.selector}),e.jsxs("div",{className:sn.grid,children:[gh.map((h,p)=>e.jsx(Co,{label:h},p)),m.map((h,p)=>{const x=wh(h,s,n,o,a,r),N=jh(h)&&x!=="outside";return e.jsx(Bo,{day:h.getDate(),state:x,today:N,onClick:x==="outside"?void 0:()=>l==null?void 0:l(h),onMouseEnter:x!=="outside"?()=>i==null?void 0:i(h):void 0,onMouseLeave:()=>i==null?void 0:i(null)},p)})]})]})}const kh="_root_kf3hs_1",Ih="_sidebar_kf3hs_11",zh="_body_kf3hs_22",Sh="_calendars_kf3hs_30",Bh="_divider_kf3hs_37",Ch="_footer_kf3hs_47",Th="_footerCol_kf3hs_55",Dh="_footerGap_kf3hs_64",Ge={root:kh,sidebar:Ih,body:zh,calendars:Sh,divider:Bh,footer:Ch,footerCol:Th,footerGap:Dh};function pn({variant:t="single",value:s,onChange:n,startDate:o,endDate:a,onRangeChange:r,defaultValue:l,defaultStartDate:i,defaultEndDate:c,defaultMonth:u,sidebar:_,footer:m,footerStart:f,footerEnd:h,className:p}){const x=o!==void 0||a!==void 0,N=s!==void 0,[b,z]=d.useState(i??null),[g,S]=d.useState(c??null),[w,T]=d.useState(l??null),[R,H]=d.useState(null),[Q,ee]=d.useState("start"),Y=u??new Date,[$,k]=d.useState(new Date(Y.getFullYear(),Y.getMonth(),1)),C=x?o??null:b,te=x?a??null:g,V=N?s??null:w;function ne(){k(U=>tn(U,-1))}function I(){k(U=>tn(U,1))}function F(U){N||T(U),n==null||n(U)}function oe(U){if(Q==="start"||!C){x||(z(U),S(null)),r==null||r(U,null),ee("end");return}const L=C.getTime();U.getTime()>=L?(x||S(U),r==null||r(C,U),ee("start")):(x||(z(U),S(null)),r==null||r(U,null))}const le=$.getMonth(),v=$.getFullYear(),D=tn($,1),A=D.getMonth(),P=D.getFullYear(),B=_!=null,G=t==="range"&&(f!=null||h!=null),q=t==="single"&&m!=null;return e.jsxs("div",{className:[Ge.root,p].filter(Boolean).join(" "),children:[B&&e.jsx("aside",{className:Ge.sidebar,children:_}),e.jsxs("div",{className:Ge.body,children:[e.jsx("div",{className:Ge.calendars,children:t==="single"?e.jsx(As,{year:v,month:le,selectedStart:V,onDayClick:F,onPrevMonth:ne,onNextMonth:I}):e.jsxs(e.Fragment,{children:[e.jsx(As,{year:v,month:le,selectedStart:C,selectedEnd:te,hoverDate:R,selectionPhase:Q,onDayClick:oe,onDayHover:H,onPrevMonth:ne,onNextMonth:I}),e.jsx("div",{className:Ge.divider}),e.jsx(As,{year:P,month:A,selectedStart:C,selectedEnd:te,hoverDate:R,selectionPhase:Q,onDayClick:oe,onDayHover:H,onPrevMonth:ne,onNextMonth:I})]})}),G&&e.jsxs("div",{className:Ge.footer,children:[e.jsx("div",{className:Ge.footerCol,children:f}),e.jsx("div",{className:Ge.footerGap}),e.jsx("div",{className:Ge.footerCol,children:h})]}),q&&e.jsx("div",{className:Ge.footer,children:e.jsx("div",{className:Ge.footerCol,children:m})})]})]})}const Mh="_field_oo6ph_1",Rh="_root_oo6ph_8",Eh="_icon_oo6ph_24",nn={field:Mh,root:Rh,icon:Eh};function on({className:t,...s}){return e.jsxs("span",{className:nn.field,children:[e.jsx("input",{type:"time",...s,className:[nn.root,t].filter(Boolean).join(" ")}),e.jsx(j.ClockIcon,{className:nn.icon,size:16,"aria-hidden":!0})]})}const Lh="_root_1whgf_1",Ah="_hover_1whgf_20",qh="_selected_1whgf_25",Fh="_focus_1whgf_30",Pn={root:Lh,hover:Ah,selected:qh,focus:Fh};function Do({label:t,state:s="default",onClick:n,className:o}){const a=[Pn.root,s!=="default"&&Pn[s],o].filter(Boolean).join(" ");return e.jsx("button",{type:"button",className:a,onClick:n,children:t})}const Ph="_wrapper_1ex4u_1",Oh="_input_1ex4u_7",Wh="_footerField_1ex4u_14",Hh="_footerLabel_1ex4u_18",Gh="_dateInput_1ex4u_27",Uh="_timeInput_1ex4u_50",Vh="_presets_1ex4u_75",Me={wrapper:Ph,input:Oh,footerField:Wh,footerLabel:Hh,dateInput:Gh,timeInput:Uh,presets:Vh};function Je(t){return String(t).padStart(2,"0")}function an(t){return t?`${Je(t.getHours())}:${Je(t.getMinutes())}`:null}function rn(t,s){if(!t)return null;const[n,o]=s.split(":").map(Number),a=new Date(t);return a.setHours(n||0,o||0,0,0),a}function Kh(t,s){return t?`${Je(t.getDate())}/${Je(t.getMonth()+1)}/${t.getFullYear()} ${s}`:""}function Yh(t,s,n,o){if(!t)return"";const a=`${Je(t.getDate())}/${Je(t.getMonth()+1)}/${t.getFullYear()} ${n}`;if(!s)return`${a} - ...`;const r=`${Je(s.getDate())}/${Je(s.getMonth()+1)}/${s.getFullYear()} ${o}`;return`${a} - ${r}`}function Xh(t){const s=new Date,n=new Date;return t>0?n.setDate(n.getDate()-t):t===-1?n.setDate(1):t===-2&&(n.setDate(1),n.setMonth(0)),[n,s]}const Zh=[{label:"Today",days:0},{label:"Last 7 days",days:7},{label:"Last 30 days",days:30},{label:"Last 3 months",days:90},{label:"Last 12 months",days:365},{label:"Month to date",days:-1},{label:"Year to date",days:-2}];function Mo({mode:t="single",value:s,onChange:n,startDate:o,endDate:a,onRangeChange:r,disabled:l,className:i,inputWrapClassName:c,...u}){const[_,m]=d.useState(!1),[f,h]=d.useState(null),[p,x]=d.useState(null),[N,b]=d.useState(null),[z,g]=d.useState("12:00"),[S,w]=d.useState("12:00"),[T,R]=d.useState("12:00"),[H,Q]=d.useState(null),ee=s!==void 0,Y=o!==void 0||a!==void 0,$=ee?s??null:f,k=Y?o??null:p,C=Y?a??null:N,te=an($)??z,V=an(k)??S,ne=an(C)??T;function I(q,U=te){const L=rn(q,U);ee||h(L),n==null||n(L)}function F(q,U,L={}){const M=rn(q,L.start??V),K=rn(U,L.end??ne);Y||(x(M),b(K)),M&&K&&Q(null),r==null||r(M,K)}function oe(q){g(q),$&&I($,q)}function le(q){w(q),k&&F(k,C,{start:q})}function v(q){R(q),C&&F(k,C,{end:q})}function D(q){q.stopPropagation(),t==="single"?I(null):(F(null,null),Q(null))}const A=t==="single"?!!$:!!k,P=t==="single"?"DD/MM/YYYY HH:MM":"DD/MM/YYYY HH:MM - DD/MM/YYYY HH:MM",B=t==="single"?Kh($,te):Yh(k,C,V,ne),G=q=>q?`${q.getFullYear()}-${Je(q.getMonth()+1)}-${Je(q.getDate())}`:"";return e.jsx("div",{className:[Me.wrapper,i].filter(Boolean).join(" "),children:e.jsx(Ee,{open:_,onOpenChange:q=>!l&&m(q),placement:"bottom-start",offset:4,bare:!0,trigger:e.jsx(Ke,{readOnly:!0,value:B,placeholder:P,leftIcon:e.jsx(j.CalendarIcon,{size:16}),rightIcon:A?e.jsx(No,{onClick:D}):void 0,leftIconDivider:!0,disabled:l,className:[Me.input,c].filter(Boolean).join(" "),...u}),children:t==="single"?e.jsx(pn,{variant:"single",value:$,onChange:q=>{I(q),q&&m(!1)},footer:e.jsxs("div",{className:Me.footerField,children:[e.jsx("input",{type:"date",value:G($),onChange:q=>{const U=q.target.value;I(U?new Date(U+"T00:00:00"):null)},className:Me.dateInput}),e.jsx(on,{value:te,onChange:q=>oe(q.target.value),className:Me.timeInput})]})}):e.jsx(pn,{variant:"range",startDate:k,endDate:C,onRangeChange:F,sidebar:e.jsx("div",{className:Me.presets,children:Zh.map(q=>e.jsx(Do,{label:q.label,state:H===q.label?"selected":"default",onClick:()=>{const[U,L]=Xh(q.days);Q(q.label),F(U,L)}},q.label))}),footerStart:e.jsxs("div",{className:Me.footerField,children:[e.jsx("span",{className:Me.footerLabel,children:"Start"}),e.jsx("input",{type:"date",value:G(k),onChange:q=>{const U=q.target.value;F(U?new Date(U+"T00:00:00"):null,C)},className:Me.dateInput}),e.jsx(on,{value:V,onChange:q=>le(q.target.value),className:Me.timeInput})]}),footerEnd:e.jsxs("div",{className:Me.footerField,children:[e.jsx("span",{className:Me.footerLabel,children:"End"}),e.jsx("input",{type:"date",value:G(C),onChange:q=>{const U=q.target.value;F(k,U?new Date(U+"T00:00:00"):null)},className:Me.dateInput}),e.jsx(on,{value:ne,onChange:q=>v(q.target.value),className:Me.timeInput})]})})})})}const Jh="_menu_11wa6_1",Qh="_header_11wa6_14",ep="_items_11wa6_21",tp="_footer_11wa6_30",ys={menu:Jh,header:Qh,items:ep,footer:tp};function Nn({children:t,emptyState:s,header:n,footer:o,className:a,style:r}){const l=!!t&&(Array.isArray(t)?t.length>0:!0);return e.jsxs("div",{className:[ys.menu,a].filter(Boolean).join(" "),style:r,role:"menu",children:[n&&e.jsx("div",{className:ys.header,children:n}),e.jsx(Tt,{size:"thin",maxHeight:"280px",className:ys.items,children:l?t:s}),o&&e.jsx("div",{className:ys.footer,children:o})]})}const sp="_item_8ylz7_1",np="_selected_8ylz7_24",op="_label_8ylz7_24",ap="_disabled_8ylz7_28",rp="_forceHover_8ylz7_35",lp="_icon_8ylz7_56",ip="_leftIcon_8ylz7_72",cp="_count_8ylz7_96",dp="_badge_8ylz7_109",at={item:sp,selected:np,label:op,disabled:ap,forceHover:rp,icon:lp,leftIcon:ip,count:cp,badge:dp};function $n({label:t,labelNode:s,mode:n="single",selected:o=!1,disabled:a=!1,forceHover:r=!1,leftIcon:l,count:i,badge:c,onClick:u}){return e.jsxs("button",{type:"button",role:n==="multi"?"menuitemcheckbox":"menuitemradio","aria-checked":o,disabled:a,onClick:u,className:[at.item,o?at.selected:"",a?at.disabled:"",r?at.forceHover:""].filter(Boolean).join(" "),children:[e.jsx("span",{className:at.icon,children:o&&e.jsx(j.CheckIcon,{size:15})}),l&&e.jsx("span",{className:at.leftIcon,children:l}),e.jsx("span",{className:at.label,children:s??t}),i!==void 0&&e.jsx("span",{className:at.count,children:i}),c&&e.jsx("span",{className:at.badge,children:c})]})}const up="_wrapper_jx5no_1",_p="_trigger_jx5no_8",mp="_triggerInput_jx5no_14",fp="_nativeWrap_jx5no_21",hp="_base_jx5no_32",pp="_sm_jx5no_33",xp="_white_jx5no_35",gp="_gray_jx5no_36",bp="_nativeDisabled_jx5no_38",jp="_nativeError_jx5no_45",vp="_nativeSelect_jx5no_59",yp="_chevron_jx5no_83",Np="_nativePlaceholder_jx5no_91",$p="_chevronSm_jx5no_111",wp="_chevronOpen_jx5no_115",kp="_rightSlotWrap_jx5no_119",Ip="_clearBtn_jx5no_125",zp="_chips_jx5no_145",ze={wrapper:up,trigger:_p,triggerInput:mp,nativeWrap:fp,base:hp,sm:pp,white:xp,gray:gp,nativeDisabled:bp,nativeError:jp,nativeSelect:vp,chevron:yp,nativePlaceholder:Np,chevronSm:$p,chevronOpen:wp,rightSlotWrap:kp,clearBtn:Ip,chips:zp};function Sp({options:t,mode:s="single",native:n=!1,value:o,onChange:a,defaultValue:r,values:l,onChangeMulti:i,defaultValues:c,placeholder:u="Select",size:_="base",variant:m="white",error:f=!1,disabled:h=!1,emptyState:p,footer:x,className:N,inputWrapClassName:b,id:z,name:g,required:S,form:w,autoComplete:T,"aria-label":R,"aria-describedby":H,"aria-invalid":Q}){var q,U;const[ee,Y]=d.useState(!1),[$,k]=d.useState(r??null),[C,te]=d.useState(c??[]),V=o!==void 0,ne=l!==void 0,I=V?o??null:$,F=ne?l??[]:C,oe=d.useRef(null);function le(L){I!==L&&(V||k(L),a==null||a(L)),Y(!1)}function v(L){const M=F.includes(L)?F.filter(K=>K!==L):[...F,L];ne||te(M),i==null||i(M)}function D(L){L.stopPropagation(),ne||te([]),i==null||i([])}const A=s==="multi"&&F.length>0,P=s==="single"?((q=t.find(L=>L.value===I))==null?void 0:q.label)??"":"",B=e.jsx("div",{className:[ze.chevron,_==="sm"?ze.chevronSm:"",ee?ze.chevronOpen:""].filter(Boolean).join(" "),children:e.jsx(j.CaretUpDownIcon,{size:15})}),G=e.jsxs("div",{className:ze.rightSlotWrap,children:[A&&!h&&e.jsx("button",{type:"button",className:ze.clearBtn,onClick:D,tabIndex:-1,children:e.jsx(j.CloseIcon,{size:10})}),B]});return n&&s==="single"?e.jsx("div",{className:[ze.wrapper,N].filter(Boolean).join(" "),children:e.jsxs("div",{className:[ze.nativeWrap,ze[_],ze[m],f||Q===!0?ze.nativeError:"",h?ze.nativeDisabled:"",b].filter(Boolean).join(" "),children:[e.jsxs("select",{id:z,name:g,required:S,form:w,autoComplete:T,value:I??"",disabled:h,className:[ze.nativeSelect,I===null?ze.nativePlaceholder:""].filter(Boolean).join(" "),"aria-label":R,"aria-describedby":H,"aria-invalid":Q??(f||void 0),onChange:L=>le(L.target.value),children:[e.jsx("option",{value:"",disabled:!0,children:u}),t.map(L=>e.jsx("option",{value:L.value,disabled:L.disabled,children:L.label},L.value))]}),B]})}):e.jsxs("div",{ref:oe,className:[ze.wrapper,N].filter(Boolean).join(" "),children:[e.jsx(Ee,{open:ee,onOpenChange:L=>!h&&Y(L),placement:"bottom-start",offset:8,bare:!0,trigger:e.jsx(Ke,{id:z,readOnly:!0,value:P,placeholder:s==="multi"&&F.length>0?`${F.length} selected`:u,rightSlot:G,size:_,variant:m,error:f,disabled:h,className:[ze.trigger,b].filter(Boolean).join(" "),inputClassName:ze.triggerInput,role:"combobox","aria-label":R,"aria-expanded":ee,"aria-haspopup":"listbox","aria-describedby":H,"aria-invalid":Q}),children:e.jsx(Nn,{emptyState:p,footer:x,style:{minWidth:(U=oe.current)==null?void 0:U.offsetWidth},children:t.length===0?null:t.map(L=>e.jsx($n,{label:L.label,labelNode:L.labelNode,mode:s,selected:s==="single"?I===L.value:F.includes(L.value),disabled:L.disabled,leftIcon:L.leftIcon,onClick:()=>{s==="single"?le(L.value):v(L.value)}},L.value))})}),s==="multi"&&F.length>0&&e.jsx("div",{className:ze.chips,onClick:L=>L.stopPropagation(),children:F.map(L=>{const M=t.find(K=>K.value===L);return M?e.jsx(hs,{label:M.label,size:_==="sm"?"2xs":"xs",shape:"rounded",leftIcon:M.leftIcon,removable:!h,onRemove:()=>v(L)},L):null})})]})}const Bp="_title_8luao_1",Cp={title:Bp};function Tp({children:t,className:s}){return e.jsx("div",{className:[Cp.title,s].filter(Boolean).join(" "),children:t})}const Dp="_wrap_ft3z8_1",Mp="_input_ft3z8_10",Rp="_clearBtn_ft3z8_28",ln={wrap:Dp,input:Mp,clearBtn:Rp};function Ep({value:t,defaultValue:s,onChange:n,placeholder:o="Search options",inputRef:a,className:r,style:l}){const i=t!==void 0,[c,u]=d.useState(s??""),_=i?t??"":c;function m(h){i||u(h.target.value),n==null||n(h.target.value)}function f(){i||u(""),n==null||n("")}return e.jsxs("div",{className:[ln.wrap,r].filter(Boolean).join(" "),style:l,children:[e.jsx("input",{ref:a,className:ln.input,placeholder:o,value:_,onChange:m}),_&&e.jsx("button",{type:"button",className:ln.clearBtn,onClick:f,tabIndex:-1,"aria-label":"Clear search",children:e.jsx(j.CloseIcon,{size:10})})]})}const Lp="_wrapper_1bd4v_1",Ap="_chips_1bd4v_6",qp="_chevron_1bd4v_15",Fp="_chevronSm_1bd4v_26",Pp="_chevronOpen_1bd4v_30",Op="_rightSlotWrap_1bd4v_36",Wp="_clearBtn_1bd4v_42",Hp="_emptyState_1bd4v_62",yt={wrapper:Lp,chips:Ap,chevron:qp,chevronSm:Fp,chevronOpen:Pp,rightSlotWrap:Op,clearBtn:Wp,emptyState:Hp};function Gp({options:t,mode:s="single",value:n,onChange:o,defaultValue:a,values:r,onChangeMulti:l,defaultValues:i,placeholder:c="Searchβ¦",size:u="base",variant:_="white",error:m=!1,disabled:f=!1,emptyState:h,className:p,inputWrapClassName:x}){var L;const N=n!==void 0,b=r!==void 0,z=t.find(M=>M.value===(N?n:a)),[g,S]=d.useState(a??null),[w,T]=d.useState(i??[]),[R,H]=d.useState((z==null?void 0:z.label)??""),[Q,ee]=d.useState(!1),[Y,$]=d.useState(-1),k=N?n??null:g,C=b?r??[]:w,te=d.useRef(null),V=d.useRef(null);d.useEffect(()=>{if(!N||s!=="single")return;const M=t.find(K=>K.value===n);H((M==null?void 0:M.label)??"")},[n,N,t,s]);const ne=t.filter(M=>M.label.toLowerCase().includes(R.toLowerCase()));function I(M){M.disabled||(H(M.label),N||S(M.value),o==null||o(M.value),ee(!1),$(-1))}function F(M){if(M.disabled)return;const K=C.includes(M.value)?C.filter(ae=>ae!==M.value):[...C,M.value];b||T(K),l==null||l(K),H(""),$(-1)}function oe(M){const K=C.filter(ae=>ae!==M);b||T(K),l==null||l(K)}function le(M){var K;M.stopPropagation(),H(""),s==="single"?(N||S(null),o==null||o(null)):(b||T([]),l==null||l([])),ee(!1),(K=V.current)==null||K.focus()}function v(){if(s==="single"){const M=t.find(K=>K.value===k);H((M==null?void 0:M.label)??"")}else H("");ee(!1),$(-1)}function D(M){f||(M?ee(!0):v())}function A(M){const K=M.target.value;H(K),ee(!0),$(-1),K===""&&s==="single"&&(N||S(null),o==null||o(null))}function P(M){if(!Q){(M.key==="ArrowDown"||M.key==="ArrowUp")&&(ee(!0),$(0),M.preventDefault());return}if(M.key==="ArrowDown")M.preventDefault(),$(K=>K+1<ne.length?K+1:0);else if(M.key==="ArrowUp")M.preventDefault(),$(K=>K-1<0?ne.length-1:K-1);else if(M.key==="Enter"){M.preventDefault();const K=ne[Y];K&&!K.disabled&&(s==="single"?I(K):F(K))}else M.key==="Escape"&&v()}const B=s==="single"?k!=null:C.length>0,G=h??e.jsx("div",{className:yt.emptyState,children:"No results found."}),q=e.jsx("div",{className:[yt.chevron,u==="sm"?yt.chevronSm:"",Q?yt.chevronOpen:""].filter(Boolean).join(" "),children:e.jsx(j.CaretUpDownIcon,{size:15})}),U=e.jsxs("div",{className:yt.rightSlotWrap,children:[B&&!f&&e.jsx("button",{type:"button",className:yt.clearBtn,onClick:le,tabIndex:-1,children:e.jsx(j.CloseIcon,{size:10})}),q]});return e.jsxs("div",{ref:te,className:[yt.wrapper,p].filter(Boolean).join(" "),children:[e.jsx(Ee,{open:Q,onOpenChange:D,placement:"bottom-start",offset:4,bare:!0,trigger:e.jsx(Ke,{ref:V,value:R,placeholder:c,rightSlot:U,size:u,variant:_,error:m,disabled:f,autoComplete:"off",onChange:A,onFocus:()=>ee(!0),onKeyDown:P,onClick:M=>M.stopPropagation(),className:x}),children:e.jsx(Nn,{emptyState:G,style:{minWidth:(L=te.current)==null?void 0:L.offsetWidth},children:ne.map((M,K)=>e.jsx($n,{label:M.label,mode:s,selected:s==="single"?k===M.value:C.includes(M.value),disabled:M.disabled,forceHover:K===Y,leftIcon:M.leftIcon,onClick:()=>s==="single"?I(M):F(M)},M.value))})}),s==="multi"&&C.length>0&&e.jsx("div",{className:yt.chips,onClick:M=>M.stopPropagation(),children:C.map(M=>{const K=t.find(ae=>ae.value===M);return K?e.jsx(hs,{label:K.label,size:u==="sm"?"2xs":"xs",shape:"rounded",leftIcon:K.leftIcon,removable:!f,onRemove:()=>oe(M)},M):null})})]})}const Up="_wrapper_165ts_1",Vp="_chips_165ts_7",Kp="_addBtn_165ts_14",cn={wrapper:Up,chips:Vp,addBtn:Kp};function Yp({value:t,defaultValue:s,onChange:n,placeholder:o="Type and press Enterβ¦",validate:a,size:r="base",variant:l="white",error:i=!1,disabled:c=!1,loading:u=!1,keepPlaceholder:_=!1,className:m,inputWrapClassName:f}){const[h=[],p]=Zn({value:t,defaultValue:s,onChange:n}),[x,N]=d.useState(""),b=d.useRef(null);function z(w){const T=w.trim();T&&(h.includes(T)||a&&!a(T)||(p([...h,T]),N("")))}function g(w){p(h.filter(T=>T!==w))}function S(w){w.key==="Enter"&&(w.preventDefault(),z(x)),w.key==="Backspace"&&x===""&&h.length>0&&g(h[h.length-1])}return e.jsxs("div",{className:[cn.wrapper,m].filter(Boolean).join(" "),onClick:()=>{var w;return!c&&((w=b.current)==null?void 0:w.focus())},children:[e.jsx(Ke,{ref:b,value:x,onChange:w=>N(w.target.value),onKeyDown:S,placeholder:_||h.length===0?o:"",size:r,variant:l,error:i,disabled:c,autoComplete:"off",className:f,rightIcon:e.jsx("button",{type:"button",className:cn.addBtn,onClick:()=>z(x),tabIndex:-1,"aria-label":"Add tag",disabled:c||u,children:u?e.jsx(Ct,{size:"xs"}):e.jsx(j.PlusIcon,{size:15})})}),h.length>0&&e.jsx("div",{className:cn.chips,children:h.map(w=>e.jsx(hs,{label:w,size:r==="sm"?"2xs":"xs",shape:"rounded",removable:!c,onRemove:()=>g(w)},w))})]})}const Xp="_tree_1s0qa_1",Zp="_item_1s0qa_13",Jp="_disabled_1s0qa_34",Qp="_selected_1s0qa_36",ex="_label_1s0qa_36",tx="_indent_1s0qa_38",sx="_connector_1s0qa_39",nx="_control_1s0qa_50",ox="_expand_1s0qa_51",ax="_expandOpen_1s0qa_67",rx="_expandHidden_1s0qa_68",lx="_leftIcon_1s0qa_69",Oe={tree:Xp,item:Zp,disabled:Jp,selected:Qp,label:ex,indent:tx,connector:sx,control:nx,expand:ox,expandOpen:ax,expandHidden:rx,leftIcon:lx},qs=t=>(t.children??[]).flatMap(s=>[s.id,...qs(s)]);function xn(t,s,n=1,o){return t.flatMap(a=>{var r;return[{node:a,level:n,parentId:o},...(r=a.children)!=null&&r.length&&s.has(a.id)?xn(a.children,s,n+1,a.id):[]]})}const Ro=d.forwardRef(function({id:s,label:n,type:o="check",level:a=1,selected:r=!1,indeterminate:l=!1,expanded:i=!1,hasChildren:c=!1,leftIcon:u,disabled:_=!1,tabIndex:m=-1,setSize:f,positionInSet:h,onSelect:p,onExpand:x,onKeyDown:N},b){return e.jsxs("div",{ref:b,id:s,role:"treeitem","aria-level":a,"aria-setsize":f,"aria-posinset":h,"aria-selected":r,"aria-checked":o==="check"?l?"mixed":r:void 0,"aria-expanded":c?i:void 0,"aria-disabled":_||void 0,tabIndex:_?-1:m,onClick:_?void 0:p,onKeyDown:N,className:[Oe.item,r&&Oe.selected,_&&Oe.disabled].filter(Boolean).join(" "),children:[e.jsx("span",{className:Oe.indent,style:{"--tree-level":a},"aria-hidden":!0,children:Array.from({length:a-1},(z,g)=>e.jsx("span",{className:Oe.connector},g))}),e.jsx("span",{className:Oe.control,"aria-hidden":!0,children:o==="radio"?e.jsx(yo,{checked:r,disabled:_,tabIndex:-1}):e.jsx(ps,{checked:r,indeterminate:l,disabled:_,tabIndex:-1})}),e.jsx("button",{type:"button",className:[Oe.expand,i&&Oe.expandOpen,!c&&Oe.expandHidden].filter(Boolean).join(" "),tabIndex:-1,"aria-label":i?"Collapse":"Expand",disabled:_||!c,onClick:z=>{z.stopPropagation(),x==null||x()},children:e.jsx(j.CaretRightIcon,{size:12})}),u&&e.jsx("span",{className:Oe.leftIcon,"aria-hidden":!0,children:u}),e.jsx("span",{className:Oe.label,children:n})]})});function ix({items:t,selectionMode:s="multiple",value:n,defaultValue:o=[],onValueChange:a,expandedValue:r,defaultExpandedValue:l=[],onExpandedValueChange:i,disabled:c=!1,ariaLabel:u="Tree select",className:_,...m}){var ne;const[f,h]=d.useState(o),[p,x]=d.useState(l),N=n??f,b=r??p,z=d.useMemo(()=>new Set(N),[N]),g=d.useMemo(()=>new Set(b),[b]),S=d.useMemo(()=>xn(t,g),[t,g]),w=d.useMemo(()=>new Set(t.flatMap(I=>[I.id,...qs(I)])),[t]),T=d.useMemo(()=>new Map(xn(t,w).map(I=>[I.node.id,I.node])),[t,w]),R=d.useRef(new Map),H=(ne=S.find(({node:I})=>!I.disabled))==null?void 0:ne.node.id,[Q,ee]=d.useState(H);d.useEffect(()=>{S.some(({node:I})=>I.id===Q&&!I.disabled)||ee(H)},[Q,H,S]);const Y=I=>{n===void 0&&h(I),a==null||a(I)},$=I=>{r===void 0&&x(I),i==null||i(I)},k=I=>{if(c||I.disabled)return;if(s==="single")return Y(z.has(I.id)?[]:[I.id]);const F=qs(I),oe=[I.id,...F],le=F.length?!F.every(D=>z.has(D)):!z.has(I.id),v=new Set(N);oe.forEach(D=>le?v.add(D):v.delete(D)),Y([...v])},C=(I,F)=>{const oe=new Set(b);F??!oe.has(I)?oe.add(I):oe.delete(I),$([...oe])},te=I=>{var F;ee(I),(F=R.current.get(I))==null||F.focus()},V=(I,F,oe)=>{var le,v,D,A;if(I.key==="ArrowDown"||I.key==="ArrowUp"){I.preventDefault();const P=I.key==="ArrowDown"?1:-1;let B=oe+P;for(;(le=S[B])!=null&&le.node.disabled;)B+=P;S[B]&&te(S[B].node.id)}else if(I.key==="ArrowRight")I.preventDefault(),(v=F.node.children)!=null&&v.length&&!g.has(F.node.id)?C(F.node.id,!0):(D=F.node.children)!=null&&D.length&&te(F.node.children[0].id);else if(I.key==="ArrowLeft")I.preventDefault(),(A=F.node.children)!=null&&A.length&&g.has(F.node.id)?C(F.node.id,!1):F.parentId&&te(F.parentId);else if(I.key==="Home"||I.key==="End"){I.preventDefault();const P=(I.key==="Home"?S:[...S].reverse()).find(({node:B})=>!B.disabled);P&&te(P.node.id)}else(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),k(F.node))};return e.jsx("div",{role:"tree","aria-label":u,"aria-multiselectable":s==="multiple"||void 0,className:[Oe.tree,_].filter(Boolean).join(" "),...m,children:S.map((I,F)=>{var A,P;const oe=qs(I.node),le=oe.filter(B=>z.has(B)).length,v=z.has(I.node.id)||oe.length>0&&le===oe.length,D=I.parentId?((A=T.get(I.parentId))==null?void 0:A.children)??[]:t;return e.jsx(Ro,{ref:B=>{B?R.current.set(I.node.id,B):R.current.delete(I.node.id)},id:`tree-select-${I.node.id}`,label:I.node.label,leftIcon:I.node.icon,type:s==="single"?"radio":"check",level:I.level,selected:v,indeterminate:!v&&le>0,expanded:g.has(I.node.id),hasChildren:!!((P=I.node.children)!=null&&P.length),disabled:c||I.node.disabled,tabIndex:(Q??H)===I.node.id?0:-1,setSize:D.length,positionInSet:D.findIndex(B=>B.id===I.node.id)+1,onSelect:()=>k(I.node),onExpand:()=>C(I.node.id),onKeyDown:B=>V(B,I,F)},I.node.id)})})}const cx="_card_h4g5m_1",dx="_white_h4g5m_8",ux="_gray_h4g5m_9",_x="_hoverable_h4g5m_17",Ns={card:cx,white:dx,gray:ux,"p-sm":"_p-sm_h4g5m_12","p-md":"_p-md_h4g5m_13","p-lg":"_p-lg_h4g5m_14",hoverable:_x};function Eo({variant:t="white",padding:s="md",hoverable:n=!1,as:o="div",className:a,children:r,...l}){return e.jsx(o,{className:[Ns.card,Ns[t],s!=="none"&&Ns[`p-${s}`],n&&Ns.hoverable,a].filter(Boolean).join(" "),...l,children:r})}const mx="_root_14mwi_1",fx={root:mx};function hx({"aria-label":t,sticky:s=!1,stickyOffset:n,className:o,children:a}){return e.jsx(Eo,{role:"grid","aria-label":t,padding:"none","data-table-sticky":s||void 0,className:[fx.root,o].filter(Boolean).join(" "),style:s&&n!==void 0?{"--table-sticky-top":typeof n=="number"?`${n}px`:n}:void 0,children:a})}const px="_cell_18zb8_1",xx="_base_18zb8_12",gx="_subtle_18zb8_13",bx="_header_18zb8_14",jx="_right_18zb8_21",vx="_center_18zb8_26",$s={cell:px,base:xx,subtle:gx,header:bx,right:jx,center:vx};function yx({variant:t="base",align:s="left",flex:n,sort:o,loading:a=!1,skeletonWidth:r="60%",skeletonTone:l="base",children:i,className:c,style:u}){return e.jsx("div",{role:t==="header"?"columnheader":"gridcell","aria-sort":t==="header"&&o?o:void 0,className:[$s.cell,$s[t],s==="right"&&$s.right,s==="center"&&$s.center,c].filter(Boolean).join(" "),style:n!==void 0?{...u,flex:n}:u,children:a?e.jsx(Ne,{width:r,height:12,radius:4,tone:l}):i})}const Nx="_root_s4sto_1",$x="_media_s4sto_8",wx="_content_s4sto_14",kx="_titleRow_s4sto_20",Ix="_title_s4sto_20",zx="_subtitle_s4sto_35",rt={root:Nx,media:$x,content:wx,titleRow:kx,title:Ix,subtitle:zx};function Sx({media:t,title:s,titleAction:n,subtitle:o,loading:a=!1,loadingMedia:r=!0,loadingSubtitle:l=!0,className:i}){return a?e.jsxs("div",{className:[rt.root,i].filter(Boolean).join(" "),children:[r&&e.jsx("span",{className:rt.media,children:e.jsx(Ne,{width:24,height:32,radius:4})}),e.jsxs("div",{className:rt.content,style:{gap:6},children:[e.jsx(Ne,{width:140,height:12,radius:4}),l&&e.jsx(Ne,{width:90,height:10,radius:4})]})]}):e.jsxs("div",{className:[rt.root,i].filter(Boolean).join(" "),children:[t&&e.jsx("span",{className:rt.media,children:t}),e.jsxs("div",{className:rt.content,children:[e.jsxs("div",{className:rt.titleRow,children:[e.jsx("span",{className:rt.title,children:s}),n]}),o&&e.jsx("span",{className:rt.subtitle,children:o})]})]})}const Bx="_wrap_1cybh_1",Cx="_scroll_1cybh_14",Tx="_fits_1cybh_21",Dx="_probe_1cybh_26",Mx="_edge_1cybh_40",Rx="_edgeVisible_1cybh_50",Ex="_edgeLeft_1cybh_54",Lx="_edgeRight_1cybh_59",Xe={wrap:Bx,scroll:Cx,fits:Tx,probe:Dx,edge:Mx,edgeVisible:Rx,edgeLeft:Ex,edgeRight:Lx};function Ax({minWidth:t=720,children:s,className:n,style:o}){const a=d.useRef(null),r=d.useRef(null),l=d.useRef(null),[i,c]=d.useState({left:!1,right:!1}),[u,_]=d.useState(!1),m=d.useCallback(()=>{const f=r.current;if(!f)return;const h=f.scrollWidth-f.clientWidth,p=f.scrollLeft>1,x=h>1&&f.scrollLeft<h-1;c(N=>N.left===p&&N.right===x?N:{left:p,right:x})},[]);return d.useEffect(()=>{const f=r.current;if(!f)return;m();const h=new ResizeObserver(m);return h.observe(f),()=>h.disconnect()},[m]),d.useEffect(()=>{const f=a.current,h=l.current;if(!f||!h)return;const p=()=>_(f.clientWidth>=h.offsetWidth);p();const x=new ResizeObserver(p);return x.observe(f),()=>x.disconnect()},[t]),e.jsxs("div",{ref:a,className:[Xe.wrap,n].filter(Boolean).join(" "),style:{"--table-min-width":typeof t=="number"?`${t}px`:t,...o},children:[e.jsx(Tt,{ref:r,direction:"x",size:"thin",onScroll:m,className:[Xe.scroll,u&&Xe.fits].filter(Boolean).join(" "),children:s}),e.jsx("div",{ref:l,"aria-hidden":!0,className:Xe.probe}),e.jsx("div",{"aria-hidden":!0,className:[Xe.edge,Xe.edgeLeft,!u&&i.left&&Xe.edgeVisible].filter(Boolean).join(" ")}),e.jsx("div",{"aria-hidden":!0,className:[Xe.edge,Xe.edgeRight,!u&&i.right&&Xe.edgeVisible].filter(Boolean).join(" ")})]})}const qx="_row_1fm3v_1",Fx="_withoutBottomBorder_1fm3v_16",Px="_selected_1fm3v_25",Ox="_loading_1fm3v_34",Wx="_selectable_1fm3v_40",Hx="_clickable_1fm3v_44",Gx="_checkCell_1fm3v_48",Ux="_loadingCells_1fm3v_54",Nt={row:qx,withoutBottomBorder:Fx,selected:Px,loading:Ox,selectable:Wx,clickable:Hx,checkCell:Gx,loadingCells:Ux};function Vx({selectable:t=!1,selected:s=!1,loading:n=!1,bottomBorder:o=!0,onSelect:a,onClick:r,"data-state":l,children:i,className:c,style:u}){return e.jsxs("div",{role:"row","aria-selected":t?s:void 0,"data-state":l,onClick:r,style:u,className:[Nt.row,!o&&Nt.withoutBottomBorder,t&&Nt.selectable,r&&Nt.clickable,s&&Nt.selected,n&&Nt.loading,c].filter(Boolean).join(" "),children:[t&&e.jsx("div",{className:Nt.checkCell,onClick:_=>_.stopPropagation(),children:e.jsx(ps,{checked:s,onChange:_=>a==null?void 0:a(_.target.checked),"aria-label":"Select row"})}),n?e.jsxs("div",{className:Nt.loadingCells,children:[e.jsx(Ne,{width:120,height:12}),e.jsx(Ne,{width:180,height:12}),e.jsx(Ne,{width:140,height:12}),e.jsx(Ne,{width:160,height:12})]}):i]})}const Kx="_group_ry2sb_1",Yx="_header_ry2sb_5",Xx="_checkCell_ry2sb_24",dn={group:Kx,header:Yx,checkCell:Xx};function Zx({selectable:t=!1,checked:s=!1,indeterminate:n=!1,onCheckAll:o,children:a,className:r}){return e.jsx("div",{role:"rowgroup",className:dn.group,children:e.jsxs("div",{role:"row",className:[dn.header,r].filter(Boolean).join(" "),children:[t&&e.jsx("div",{className:dn.checkCell,children:e.jsx(ps,{checked:s,indeterminate:n,onChange:l=>o==null?void 0:o(l.target.checked),"aria-label":"Select all rows"})}),a]})})}const Jx="_footer_xj4kv_1",Qx="_range_xj4kv_10",e1="_pagination_xj4kv_18",t1="_pageLabel_xj4kv_24",Gt={footer:Jx,range:Qx,pagination:e1,pageLabel:t1},s1={range:(t,s,n)=>`${t} β ${s} of ${n} results`,pages:(t,s)=>`${t} of ${s} pages`,prev:"Prev",next:"Next"};function n1({page:t,totalPages:s,from:n,to:o,total:a,loading:r=!1,onPrev:l,onNext:i,labels:c,className:u}){const _={...s1,...c};return r?e.jsxs("div",{className:[Gt.footer,u].filter(Boolean).join(" "),children:[e.jsx(Ne,{width:140,height:12,radius:4}),e.jsxs("div",{className:Gt.pagination,children:[e.jsx(Ne,{width:90,height:12,radius:4}),e.jsx(Ne,{width:48,height:30,radius:6}),e.jsx(Ne,{width:48,height:30,radius:6})]})]}):e.jsxs("div",{className:[Gt.footer,u].filter(Boolean).join(" "),children:[e.jsx("span",{className:Gt.range,children:_.range(n,o,a)}),e.jsxs("div",{className:Gt.pagination,children:[e.jsx("span",{className:Gt.pageLabel,children:_.pages(t,s)}),e.jsx(ve,{variant:"transparent",size:"sm",disabled:t<=1,onClick:l,children:_.prev}),e.jsx(ve,{variant:"transparent",size:"sm",disabled:t>=s,onClick:i,children:_.next})]})]})}const o1="_root_1frkr_1",a1="_left_1frkr_11",r1="_right_1frkr_16",l1="_searchWrap_1frkr_23",i1="_sortWrap_1frkr_51",Ze={root:o1,left:a1,right:r1,searchWrap:l1,sortWrap:i1};function c1({filterBar:t,onAddFilter:s,searchValue:n,onSearchChange:o,onSearchClear:a,searchPlaceholder:r="Search table",sortMenu:l,onSort:i,loading:c=!1,className:u}){if(c)return e.jsxs("div",{className:[Ze.root,u].filter(Boolean).join(" "),children:[e.jsx("div",{className:Ze.left,children:e.jsx(Ne,{width:92,height:32,radius:6})}),e.jsxs("div",{className:Ze.right,children:[e.jsx("div",{className:Ze.searchWrap,children:e.jsx(Ne,{width:"100%",height:32,radius:6})}),e.jsx("div",{className:Ze.sortWrap,children:e.jsx(Ne,{width:32,height:32,radius:6})})]})]});const _=e.jsx(xe,{icon:e.jsx(j.FunnelSimpleIcon,{size:15}),"aria-label":"Sort",variant:"neutral",size:"sm",onClick:l?void 0:i});return e.jsxs("div",{className:[Ze.root,u].filter(Boolean).join(" "),children:[e.jsx("div",{className:Ze.left,children:t??e.jsx(ve,{variant:"neutral",size:"sm",onClick:s,children:"Add filter"})}),e.jsxs("div",{className:Ze.right,children:[e.jsx("div",{className:Ze.searchWrap,children:e.jsx($o,{value:n,onChange:o,onClear:a,placeholder:r,size:"sm"})}),e.jsx("div",{className:Ze.sortWrap,children:l?e.jsx(Ee,{trigger:_,placement:"bottom-end",bare:!0,children:l}):_})]})]})}const d1="_root_1w0ln_1",u1="_loading_1w0ln_33",_1="_left_1w0ln_37",m1="_count_1w0ln_43",f1="_title_1w0ln_52",h1="_right_1w0ln_62",Ut={root:d1,loading:u1,left:_1,count:m1,title:f1,right:h1};function p1({title:t,count:s,loading:n=!1,actions:o,className:a}){return e.jsxs("div",{"data-table-menu":"",className:[Ut.root,n&&Ut.loading,a].filter(Boolean).join(" "),children:[e.jsx("div",{className:Ut.left,children:n?e.jsx(Ne,{width:200,height:24,radius:6}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:Ut.title,children:t}),s!==void 0&&e.jsx("span",{className:Ut.count,children:s})]})}),e.jsx("div",{className:Ut.right,children:n?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{width:60,height:28,radius:6}),e.jsx(Ne,{width:72,height:28,radius:6}),e.jsx(Ne,{width:64,height:28,radius:6})]}):o})]})}const x1="_root_1ldy9_11",g1="_closing_1ldy9_23",b1="_label_1ldy9_27",j1="_separator_1ldy9_41",ws={root:x1,closing:g1,label:b1,separator:j1};function v1({open:t=!0,label:s,children:n,className:o}){const[a,r]=d.useState(t),[l,i]=d.useState(!1),[c,u]=d.useState(s);if(d.useEffect(()=>{t?(r(!0),i(!1),u(s)):i(!0)},[t,s]),!a)return null;const _=t?s:c;return e.jsxs("div",{className:[ws.root,l&&ws.closing,o].filter(Boolean).join(" "),onAnimationEnd:()=>{l&&r(!1)},children:[_&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:ws.label,children:_}),e.jsx("span",{className:ws.separator,"aria-hidden":!0})]}),n]})}const y1="_root_vn4zx_1",N1="_right_vn4zx_34",$1="_label_vn4zx_40",w1="_keys_vn4zx_44",ks={root:y1,right:N1,label:$1,keys:w1};function k1({label:t,keys:s,variant:n="center",onClick:o}){return e.jsxs("button",{type:"button",onClick:o,className:[ks.root,ks[n]].join(" "),children:[e.jsx("span",{className:ks.label,children:t}),s&&s.length>0&&e.jsx("span",{className:ks.keys,children:s.map((a,r)=>e.jsx(mt,{bg:"contrast-bg-subtle",radius:"squared",children:a},r))})]})}const I1="_root_exjmp_1",z1={root:I1};function Lo({color:t="bg-component",children:s,className:n}){const o=d.Children.map(s,a=>d.isValidElement(a)?d.cloneElement(a,{color:t}):a);return e.jsx("div",{className:[z1.root,n].filter(Boolean).join(" "),children:o})}const S1="_root_l48f4_1",B1="_muted_l48f4_29",C1="_base_l48f4_33",T1="_icon_l48f4_38",D1="_bgComponent_l48f4_56",M1="_bgBase_l48f4_70",Is={root:S1,default:"_default_l48f4_28",muted:B1,base:C1,icon:T1,static:"_static_l48f4_45",bgComponent:D1,bgBase:M1};function us({as:t="button",type:s="default",color:n="bg-component",active:o=!1,disabled:a=!1,forceHover:r=!1,children:l,className:i,onClick:c,...u}){const _=[Is.root,Is[s],Is[n==="bg-component"?"bgComponent":"bgBase"],i].filter(Boolean).join(" ");return t==="span"?e.jsx("span",{className:[_,Is.static].join(" "),onClick:m=>m.stopPropagation(),children:l}):e.jsx("button",{type:"button",disabled:a,onClick:c,"data-active":o||void 0,"data-hover":r||void 0,className:_,...u,children:l})}const R1="_menu_2c8zh_1",E1="_header_2c8zh_13",L1="_items_2c8zh_19",A1="_footer_2c8zh_26",zs={menu:R1,header:E1,items:L1,footer:A1};function q1({children:t,emptyState:s,header:n,footer:o,width:a,maxHeight:r="280px",className:l,style:i}){const c=!!t&&(Array.isArray(t)?t.filter(Boolean).length>0:!0);return e.jsxs("div",{className:[zs.menu,l].filter(Boolean).join(" "),style:{width:a,...i},children:[n&&e.jsx("div",{className:zs.header,children:n}),e.jsx(Tt,{size:"thin",maxHeight:r,className:zs.items,children:c?t:s}),o&&e.jsx("div",{className:zs.footer,children:o})]})}const F1="_item_1pevj_1",P1="_selected_1pevj_25",O1="_label_1pevj_25",W1="_disabled_1pevj_30",H1="_forceHover_1pevj_31",G1="_icon_1pevj_49",U1="_count_1pevj_73",V1="_badge_1pevj_85",$t={item:F1,selected:P1,label:O1,disabled:W1,forceHover:H1,icon:G1,count:U1,badge:V1};function K1({label:t,mode:s="multi",selected:n=!1,disabled:o=!1,forceHover:a=!1,count:r,badge:l,onClick:i}){return e.jsxs("button",{type:"button",role:s==="multi"?"menuitemcheckbox":"menuitemradio","aria-checked":n,disabled:o,onClick:i,className:[$t.item,n?$t.selected:"",o?$t.disabled:"",a?$t.forceHover:""].filter(Boolean).join(" "),children:[e.jsx("span",{className:$t.icon,children:n&&(s==="single"?e.jsx(j.CircleIcon,{size:4,fill:"currentColor"}):e.jsx(j.CheckIcon,{size:15}))}),e.jsx("span",{className:$t.label,children:t}),r!==void 0&&e.jsx("span",{className:$t.count,children:r}),l&&e.jsx("span",{className:$t.badge,children:l})]})}const Y1="_title_y8ftw_1",X1={title:Y1};function Z1({children:t,className:s}){return e.jsx("div",{className:[X1.title,s].filter(Boolean).join(" "),children:t})}const J1="_wrap_1dang_1",Q1="_input_1dang_10",eg="_clearBtn_1dang_28",un={wrap:J1,input:Q1,clearBtn:eg};function tg({value:t,defaultValue:s,onChange:n,placeholder:o="Search",loading:a=!1,inputRef:r,className:l}){const i=t!==void 0,[c,u]=d.useState(s??""),_=i?t??"":c;function m(h){i||u(h.target.value),n==null||n(h.target.value)}function f(){i||u(""),n==null||n("")}return e.jsxs("div",{className:[un.wrap,l].filter(Boolean).join(" "),children:[e.jsx("input",{ref:r,className:un.input,placeholder:o,value:_,onChange:m}),a&&e.jsx(Ct,{size:"xs"}),_&&!a&&e.jsx("button",{type:"button",className:un.clearBtn,onClick:f,tabIndex:-1,"aria-label":"Clear search",children:e.jsx(j.CloseIcon,{size:10})})]})}const sg="_divider_dzqey_1",ng={divider:sg};function og(){return e.jsx("div",{className:ng.divider,"aria-hidden":!0})}const ag="_root_1u0dt_1",Ao={root:ag};function rg(t){return e.jsx("div",{className:Ao.root,children:e.jsx(Mo,{size:"sm",variant:"white",...t})})}function lg(t){return e.jsx("div",{className:Ao.root,children:e.jsx(Ke,{size:"sm",variant:"white",...t})})}const ig="_root_4lcd6_1",cg="_line_4lcd6_10",On={root:ig,line:cg};function dg({count:t=3}){return e.jsx("div",{className:On.root,children:Array.from({length:t},(s,n)=>e.jsx("div",{className:On.line,style:n===t-1?{width:"50%"}:void 0},n))})}function ug({label:t,operator:s,value:n,active:o=!1,onRemove:a,className:r}){return e.jsxs(Lo,{color:"bg-base",className:r,children:[e.jsx(us,{as:"span",type:"muted",children:t}),s&&n&&e.jsx(us,{as:"span",type:"muted",children:s}),n&&e.jsx(us,{type:"base",active:o,children:n}),a&&e.jsx(us,{type:"icon",onClick:l=>{l.stopPropagation(),a()},"aria-label":"Remove filter",children:e.jsx(j.CloseIcon,{size:14})})]})}const _g="_bar_a739b_1",mg={bar:_g};function fg({children:t,addFilterLabel:s="Add filter",addFilterContent:n,addFilterOpen:o,onAddFilterOpenChange:a,onClearAll:r,className:l}){const i=!!t&&(Array.isArray(t)?t.filter(Boolean).length>0:!0),c=e.jsx(ve,{variant:"neutral",size:"sm",children:s});return e.jsxs("div",{className:[mg.bar,l].filter(Boolean).join(" "),children:[t,n?e.jsx(Ee,{trigger:c,open:o,onOpenChange:a,placement:"bottom-start",bare:!0,children:n}):c,i&&r&&e.jsx(Jt,{tone:"muted",size:"sm",onClick:r,children:"Clear all"})]})}const hg="_overlay_19ov8_2",pg="_overlayEnter_19ov8_1",xg="_dialog_19ov8_21",gg="_modalEnter_19ov8_1",bg="_exit_19ov8_36",jg="_overlayExit_19ov8_1",vg="_modalExit_19ov8_1",yg="_sm_19ov8_92",Ng="_md_19ov8_93",$g="_lg_19ov8_94",wg="_xl_19ov8_95",kg="_full_19ov8_96",Ig="_header_19ov8_101",zg="_title_19ov8_110",Sg="_headerActions_19ov8_118",Bg="_bodyNoPadding_19ov8_127",Cg="_body_19ov8_127",Tg="_footer_19ov8_141",Dg="_closeBtn_19ov8_160",Ue={overlay:hg,overlayEnter:pg,dialog:xg,modalEnter:gg,exit:bg,overlayExit:jg,modalExit:vg,sm:yg,md:Ng,lg:$g,xl:wg,full:kg,header:Ig,title:zg,headerActions:Sg,bodyNoPadding:Bg,body:Cg,footer:Tg,closeBtn:Dg};function qo({open:t,onClose:s,title:n,children:o,footer:a,size:r="md",closable:l=!0,className:i,bodyClassName:c,bodyPadding:u="normal"}){const _=d.useRef(null),[m,f]=d.useState(t);return fs(t||m),d.useEffect(()=>{if(t){f(!0);return}if(!m)return;const h=setTimeout(()=>f(!1),280);return()=>clearTimeout(h)},[t,m]),d.useEffect(()=>{if(!t)return;function h(p){p.key==="Escape"&&!p.defaultPrevented&&s()}return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[t,s]),d.useEffect(()=>{var h;t&&((h=_.current)==null||h.focus())},[t]),!t&&!m?null:pt.createPortal(e.jsx("div",{className:[Ue.overlay,!t&&Ue.exit].filter(Boolean).join(" "),onMouseDown:h=>{t&&h.target===h.currentTarget&&s()},"aria-modal":"true",role:"dialog",children:e.jsxs("div",{ref:_,className:[Ue.dialog,Ue[r],i].filter(Boolean).join(" "),tabIndex:-1,"aria-labelledby":n?"modal-title":void 0,onAnimationEnd:h=>{!t&&h.target===h.currentTarget&&f(!1)},children:[(n||l)&&e.jsxs("div",{className:Ue.header,children:[n&&e.jsx("span",{id:"modal-title",className:Ue.title,children:n}),l&&e.jsxs("div",{className:Ue.headerActions,children:[e.jsx(mt,{children:"esc"}),e.jsx("button",{className:Ue.closeBtn,onClick:s,"aria-label":"Close",children:e.jsx(j.CloseIcon,{size:16})})]})]}),o&&e.jsx(Tt,{direction:"y",size:"thin",className:[Ue.body,u==="none"&&Ue.bodyNoPadding,c].filter(Boolean).join(" "),children:o}),a&&e.jsx("div",{className:Ue.footer,children:a})]})}),document.body)}const Mg="_banner_1shpp_3",Rg="_illustration_1shpp_20",Eg="_sparkle_1shpp_32",Lg="_closeBtn_1shpp_38",Ag="_content_1shpp_68",qg="_title_1shpp_75",Fg="_description_1shpp_83",Pg="_features_1shpp_92",Og="_featureItem_1shpp_101",Wg="_featureCheck_1shpp_110",Hg="_actions_1shpp_124",Ae={banner:Mg,"banner-illustration":"_banner-illustration_1shpp_16",illustration:Rg,"banner-default":"_banner-default_1shpp_26",sparkle:Eg,closeBtn:Lg,content:Ag,title:qg,description:Fg,features:Pg,featureItem:Og,featureCheck:Wg,actions:Hg};function Gg({open:t,onClose:s,illustration:n,title:o="Unlock this feature",description:a="Upgrade your plan to get access to this and many other powerful features.",features:r=[],onUpgrade:l,upgradeLabel:i="Upgrade to plan",cancelLabel:c="Maybe later"}){return e.jsxs(qo,{open:t,onClose:s,size:"sm",closable:!1,children:[e.jsxs("div",{className:[Ae.banner,n?Ae["banner-illustration"]:Ae["banner-default"]].join(" "),children:[e.jsx("button",{className:Ae.closeBtn,onClick:s,"aria-label":"Close",children:e.jsx(j.CloseIcon,{size:16})}),n?e.jsx("img",{src:n,alt:"",className:Ae.illustration}):e.jsx(j.SparkleIcon,{size:48,className:Ae.sparkle})]}),e.jsxs("div",{className:Ae.content,children:[e.jsx("h2",{className:Ae.title,children:o}),a&&e.jsx("p",{className:Ae.description,children:a}),r.length>0&&e.jsx("ul",{className:Ae.features,children:r.map((u,_)=>e.jsxs("li",{className:Ae.featureItem,children:[e.jsx("span",{className:Ae.featureCheck,children:e.jsx(j.CheckIcon,{size:15})}),e.jsx("span",{children:u})]},_))}),e.jsxs("div",{className:Ae.actions,children:[e.jsx(ve,{variant:"inverted",size:"base",onClick:l,style:{width:"100%"},children:i}),e.jsx(ve,{variant:"transparent",size:"base",onClick:s,style:{width:"100%"},children:c})]})]})]})}const Ug="_root_dx5sl_1",Vg="_item_dx5sl_8",Kg="_plain_dx5sl_12",Yg="_filled_dx5sl_14",Xg="_trigger_dx5sl_19",Zg="_caret_dx5sl_47",Jg="_caretOpen_dx5sl_55",Qg="_triggerLabel_dx5sl_60",eb="_body_dx5sl_68",lt={root:Ug,item:Vg,plain:Kg,filled:Yg,trigger:Xg,caret:Zg,caretOpen:Jg,triggerLabel:Qg,body:eb};function tb({items:t,variant:s="plain",className:n}){const[o,a]=d.useState(null);function r(l){a(i=>i===l?null:l)}return e.jsx("div",{className:[lt.root,n].filter(Boolean).join(" "),children:t.map((l,i)=>{const c=o===i;return e.jsxs("div",{className:[lt.item,lt[s],c?lt.open:""].filter(Boolean).join(" "),children:[e.jsxs("button",{type:"button",className:lt.trigger,onClick:()=>r(i),"aria-expanded":c,children:[e.jsx("span",{className:[lt.caret,c?lt.caretOpen:""].filter(Boolean).join(" "),children:e.jsx(j.CaretRightIcon,{size:11})}),e.jsx("span",{className:lt.triggerLabel,children:l.title})]}),c&&e.jsx("div",{className:lt.body,children:l.content})]},i)})})}const sb="_wrap_12lby_2",nb="_textarea_12lby_12",ob="_white_12lby_32",ab="_gray_12lby_33",rb="_disabled_12lby_36",lb="_error_12lby_47",ib="_resize_none_12lby_67",cb="_resize_vertical_12lby_68",db="_resize_both_12lby_69",ub="_resizeIcon_12lby_72",_b="_aiSlot_12lby_83",wt={wrap:sb,textarea:nb,white:ob,gray:ab,disabled:rb,error:lb,resize_none:ib,resize_vertical:cb,resize_both:db,resizeIcon:ub,aiSlot:_b},mb=d.forwardRef(function({variant:s="white",error:n=!1,resize:o="vertical",aiSlot:a,className:r,disabled:l,...i},c){const u=[wt.wrap,wt[s],n?wt.error:"",l?wt.disabled:"",r].filter(Boolean).join(" ");return e.jsxs("div",{className:u,children:[e.jsx("textarea",{ref:c,className:[wt.textarea,wt[`resize_${o}`]].join(" "),disabled:l,...i}),a&&e.jsx("span",{className:wt.aiSlot,children:a}),o!=="none"&&!l&&e.jsx("span",{className:wt.resizeIcon,"aria-hidden":!0,children:e.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:[e.jsx("line",{x1:"1",y1:"9",x2:"9",y2:"1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),e.jsx("line",{x1:"5",y1:"9",x2:"9",y2:"5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})})]})}),fb="_toggle_tpd5d_1",hb={toggle:fb},pb=d.forwardRef(function(s,n){const[o,a]=d.useState(!1);return e.jsx(Ke,{ref:n,type:o?"text":"password",rightIcon:e.jsx("button",{type:"button",className:hb.toggle,onClick:()=>a(r=>!r),tabIndex:-1,"aria-label":o?"Hide password":"Show password",children:o?e.jsx(j.EyeSlashIcon,{size:15}):e.jsx(j.EyeIcon,{size:15})}),...s})}),xb="_root_1yoja_1",gb="_segments_1yoja_8",bb="_segment_1yoja_8",jb="_footer_1yoja_21",vb="_label_1yoja_26",ls={root:xb,segments:gb,segment:bb,footer:jb,label:vb};function Fo(t){if(!t)return 0;let s=0;return t.length>=8&&s++,/[A-Z]/.test(t)&&s++,/[a-z]/.test(t)&&s++,/[0-9]/.test(t)&&s++,/[^A-Za-z0-9]/.test(t)&&s++,Math.min(4,s)}const yb={0:"",1:"Weak",2:"Fair",3:"Good",4:"Strong"},Nb={0:"",1:"var(--red-500)",2:"var(--orange-500)",3:"var(--green-400)",4:"var(--green-600)"};function $b({value:t,className:s}){const n=Fo(t),o=Nb[n];return e.jsxs("div",{className:[ls.root,s].filter(Boolean).join(" "),"data-strength":n,children:[e.jsx("div",{className:ls.segments,children:[1,2,3,4].map(a=>e.jsx("div",{className:ls.segment,style:{backgroundColor:a<=n&&n>0?o:void 0}},a))}),e.jsx("div",{className:ls.footer,children:e.jsx("span",{className:ls.label,style:{color:n>0?o:void 0},children:yb[n]})})]})}const wb="_input_16i73_1",kb={input:wb};function Ib(t){var s;return((s=new Intl.NumberFormat("en",{style:"currency",currency:t}).formatToParts(0).find(n=>n.type==="currency"))==null?void 0:s.value)??t}const zb=d.forwardRef(function({currency:s="USD",...n},o){const a=Ib(s);return e.jsx(Ke,{ref:o,type:"number",step:"0.01",min:"0",placeholder:"0.00",prefix:s,suffix:a,inputClassName:kb.input,...n})}),Sb="_input_rggu7_1",Bb="_stepper_rggu7_3",Cb="_btn_rggu7_9",Ss={input:Sb,stepper:Bb,btn:Cb},Tb=d.forwardRef(function({min:s,max:n,step:o=1,decimals:a=2,value:r,defaultValue:l,disabled:i,size:c="base",onChange:u,onBlur:_,placeholder:m="0.00",...f},h){const p=k=>{let C=k;return s!==void 0&&(C=Math.max(s,C)),n!==void 0&&(C=Math.min(n,C)),C},x=k=>p(k).toFixed(a),N=r!==void 0,[b,z]=d.useState(()=>l!==void 0?x(Number(l)):""),[g,S]=d.useState(null),w=N?r===null||r===""?"":String(r):b,T=g??w,R=parseFloat(T)||0,H=s===void 0||R>s,Q=n===void 0||R<n;function ee(k,C){u==null||u({...C??{},target:{...(C==null?void 0:C.target)??{},value:k}})}function Y(k){S(null),N||z(k),ee(k)}const $=k=>Y(x(R+k));return e.jsx(Ke,{ref:h,type:"text",inputMode:"decimal",value:T,placeholder:m,disabled:i,size:c,inputClassName:Ss.input,onChange:k=>{const C=s!==void 0&&s>=0?k.target.value.replace(/-/g,""):k.target.value;S(C),N||z(C),ee(C,k)},onBlur:k=>{S(null);const C=x(R);N?parseFloat(C)!==R&&ee(C):z(C),_==null||_(k)},rightSlot:e.jsxs("div",{className:Ss.stepper,children:[e.jsx("button",{type:"button",className:Ss.btn,onClick:()=>$(-o),disabled:i||!H,tabIndex:-1,"aria-label":"Decrease",children:e.jsx(j.MinusIcon,{size:10,strokeWidth:3.5})}),e.jsx("button",{type:"button",className:Ss.btn,onClick:()=>$(o),disabled:i||!Q,tabIndex:-1,"aria-label":"Increase",children:e.jsx(j.PlusIcon,{size:10,strokeWidth:3.5})})]}),...f})}),Db=d.forwardRef(function({prefix:s,suffix:n,...o},a){const r=s??(n?void 0:"https://");return e.jsx(Ke,{ref:a,type:"url",prefix:r,suffix:n,...o})}),Mb="_wrap_a8jgq_1",Rb="_white_a8jgq_12",Eb="_gray_a8jgq_13",Lb="_disabled_a8jgq_16",Ab="_focused_a8jgq_16",qb="_error_a8jgq_16",Fb="_input_a8jgq_36",Pb="_cardIcon_a8jgq_37",Ob="_cardRow_a8jgq_40",Wb="_divider_a8jgq_54",Hb="_bottomRow_a8jgq_59",Gb="_cvvDivider_a8jgq_64",Ub="_cvvInput_a8jgq_70",Re={wrap:Mb,white:Rb,gray:Eb,disabled:Lb,focused:Ab,error:qb,input:Fb,cardIcon:Pb,cardRow:Ob,divider:Wb,bottomRow:Hb,cvvDivider:Gb,cvvInput:Ub};function Wn(t){return t.replace(/\D/g,"").slice(0,16).replace(/(.{4})(?=.)/g,"$1 ")}function Hn(t){const s=t.replace(/\D/g,"").slice(0,4);return s.length>2?s.slice(0,2)+"/"+s.slice(2):s}const Vb=d.forwardRef(function({variant:s="white",error:n=!1,disabled:o=!1,className:a,defaultCardNumber:r="",defaultExpiry:l="",defaultCvv:i="",onChange:c},u){const[_,m]=d.useState(()=>Wn(r)),[f,h]=d.useState(()=>Hn(l)),[p,x]=d.useState(()=>i.replace(/\D/g,"").slice(0,4)),[N,b]=d.useState(!1),z=T=>{c==null||c(T)},g=[Re.wrap,Re[s],N?Re.focused:"",n?Re.error:"",o?Re.disabled:"",a].filter(Boolean).join(" "),S=()=>b(!0),w=()=>b(!1);return e.jsxs("div",{ref:u,className:g,children:[e.jsxs("div",{className:Re.cardRow,children:[e.jsx("input",{className:Re.input,type:"text",inputMode:"numeric",placeholder:"0000 0000 0000 0000",value:_,disabled:o,maxLength:19,onFocus:S,onBlur:w,onChange:T=>{const R=Wn(T.target.value);m(R),z({cardNumber:R,expiry:f,cvv:p})}}),e.jsx("span",{className:Re.cardIcon,"aria-hidden":!0,children:e.jsx(j.CreditCardIcon,{size:16})})]}),e.jsx("div",{className:Re.divider}),e.jsxs("div",{className:Re.bottomRow,children:[e.jsx("input",{className:Re.input,type:"text",inputMode:"numeric",placeholder:"MM/YY",value:f,disabled:o,maxLength:5,onFocus:S,onBlur:w,onChange:T=>{const R=Hn(T.target.value);h(R),z({cardNumber:_,expiry:R,cvv:p})}}),e.jsx("div",{className:Re.cvvDivider}),e.jsx("input",{className:[Re.input,Re.cvvInput].join(" "),type:"text",inputMode:"numeric",placeholder:"123",value:p,disabled:o,maxLength:4,onFocus:S,onBlur:w,onChange:T=>{const R=T.target.value.replace(/\D/g,"").slice(0,4);x(R),z({cardNumber:_,expiry:f,cvv:R})}})]})]})}),Kb="_root_1pfhj_1",Yb="_separator_1pfhj_7",Xb="_cell_1pfhj_17",Zb="_base_1pfhj_33",Jb="_sm_1pfhj_34",Qb="_white_1pfhj_41",ej="_gray_1pfhj_42",tj="_disabled_1pfhj_45",sj="_error_1pfhj_56",Mt={root:Kb,separator:Yb,cell:Xb,base:Zb,sm:Jb,white:Qb,gray:ej,disabled:tj,error:sj};function nj({length:t=6,value:s="",onChange:n,inputType:o="text",placeholder:a,separator:r,shouldAutoFocus:l=!1,disabled:i=!1,error:c=!1,size:u="base",variant:_="white",className:m}){const f=d.useRef([]),h=d.useRef(0),p=o==="number"||o==="tel";d.useEffect(()=>{var $;l&&(($=f.current[0])==null||$.focus())},[l]);function x($){var C,te;const k=Math.max(0,Math.min(t-1,$));(C=f.current[k])==null||C.focus(),(te=f.current[k])==null||te.select(),h.current=k}function N($){return p?/^\d$/.test($):$.trim().length===1}function b($){const k=s[$];return k&&k!==" "?k:""}function z($){const k=s.padEnd(t," ").slice(0,t).split("");$(k),n==null||n(k.join("").trimEnd())}function g($,k){z(C=>{C[$]=k||" "})}function S($){return p?$.replace(/\D/g,""):$.replace(/\s/g,"")}function w($,k){const C=S(k),te=C.length>=t?0:$,V=C.slice(0,t-te);V&&(z(ne=>{[...V].forEach((I,F)=>{ne[te+F]=I})}),x(te+V.length))}function T($,k){const C=k.replace(/\s/g,"");if(C.length>1){w($,C);return}N(C)&&(g($,C),x($+1))}function R($,k){k.metaKey||k.ctrlKey||k.altKey||(k.key==="Backspace"?(k.preventDefault(),b($)?g($,""):$>0&&(g($-1,""),x($-1))):k.key==="Delete"?(k.preventDefault(),g($,"")):k.key==="ArrowLeft"?(k.preventDefault(),x($-1)):k.key==="ArrowRight"?(k.preventDefault(),x($+1)):k.key===" "||k.key==="ArrowUp"||k.key==="ArrowDown"?k.preventDefault():k.key===b($)?(k.preventDefault(),x($+1)):p&&!/^\d$/.test(k.key)&&k.key.length===1&&k.preventDefault())}function H($){$.preventDefault(),w(h.current,$.clipboardData.getData("text/plain"))}function Q($,k){h.current=$,k.target.select()}function ee($){if(typeof a=="string"&&a.length===t)return a[$]}const Y=[Mt.cell,Mt[u],Mt[_],c&&Mt.error,i&&Mt.disabled].filter(Boolean).join(" ");return e.jsx("div",{className:[Mt.root,m].filter(Boolean).join(" "),children:Array.from({length:t},($,k)=>e.jsxs(d.Fragment,{children:[e.jsx("input",{ref:C=>{f.current[k]=C},type:o==="number"?"tel":o,inputMode:p?"numeric":void 0,maxLength:1,value:b(k),placeholder:ee(k),disabled:i,"aria-label":`Please enter OTP character ${k+1}`,autoComplete:k===0?"one-time-code":"off",className:Y,onChange:C=>T(k,C.target.value),onKeyDown:C=>R(k,C),onPaste:H,onFocus:C=>Q(k,C)}),r&&k<t-1&&e.jsx("span",{className:Mt.separator,children:r})]},k))})}const oj="_root_1fq6t_1",aj="_info_1fq6t_11",rj="_name_1fq6t_19",lj="_size_1fq6t_30",ij="_uploading_1fq6t_37",cj="_error_1fq6t_44",dj="_actions_1fq6t_51",uj="_errorIcon_1fq6t_58",it={root:oj,info:aj,name:rj,size:lj,uploading:ij,error:cj,actions:dj,errorIcon:uj};function _j(t){return t<1024?`${t}B`:t<1024*1024?`${(t/1024).toFixed(2)}KB`:`${(t/(1024*1024)).toFixed(2)}MB`}function Po({file:t,status:s="idle",errorMessage:n="File exceeds size limit.",onRemove:o,className:a}){return e.jsxs("div",{className:[it.root,it[s],a].filter(Boolean).join(" "),children:[e.jsx(zt,{variant:"file",size:"portrait-sm"}),e.jsxs("div",{className:it.info,children:[e.jsx("span",{className:it.name,children:t.name}),s==="idle"&&e.jsx("span",{className:it.size,children:_j(t.size)}),s==="uploading"&&e.jsx("span",{className:it.uploading,children:"Preprocessing..."}),s==="error"&&e.jsx("span",{className:it.error,children:n})]}),e.jsxs("div",{className:it.actions,children:[s==="uploading"&&e.jsx(Ct,{size:"sm"}),s==="error"&&e.jsx(j.WarningCircleIcon,{size:16,className:it.errorIcon}),s!=="uploading"&&e.jsx(xe,{size:"sm",variant:"transparent",radius:"full",icon:e.jsx(j.CloseIcon,{size:14}),"aria-label":"Remove file",onClick:o})]})]})}const mj="_root_mgxdc_1",fj="_disabled_mgxdc_19",hj="_dragging_mgxdc_20",pj="_hasFiles_mgxdc_31",xj="_compact_mgxdc_50",gj="_description_mgxdc_58",bj="_dropOverlay_mgxdc_62",jj="_dropOverlayIcon_mgxdc_67",vj="_compactRow_mgxdc_73",yj="_compactThumb_mgxdc_85",Nj="_compactInfo_mgxdc_109",$j="_compactName_mgxdc_117",wj="_compactMeta_mgxdc_127",kj="_compactActions_mgxdc_133",Ij="_compactMenuDropdown_mgxdc_138",zj="_hasFilesFile_mgxdc_155",Sj="_hasFilesFileWithoutAdd_mgxdc_164",Bj="_addFileBtn_mgxdc_168",Cj="_input_mgxdc_194",Tj="_actions_mgxdc_213",Dj="_withActions_mgxdc_222",Mj="_dropOverlayText_mgxdc_257",Rj="_previewItem_mgxdc_265",Ej="_previewItemLarge_mgxdc_273",Lj="_previewItemActive_mgxdc_277",Aj="_menuTrigger_mgxdc_297",qj="_menuTriggerOpen_mgxdc_307",Fj="_menuDropdown_mgxdc_311",Pj="_coverBadge_mgxdc_319",Oj="_smallGrid_mgxdc_339",Wj="_addControl_mgxdc_349",Hj="_addBtn_mgxdc_355",Gj="_addMenuDropdown_mgxdc_375",ue={root:mj,disabled:fj,dragging:hj,hasFiles:pj,compact:xj,description:gj,dropOverlay:bj,dropOverlayIcon:jj,compactRow:vj,compactThumb:yj,compactInfo:Nj,compactName:$j,compactMeta:wj,compactActions:kj,compactMenuDropdown:Ij,hasFilesFile:zj,hasFilesFileWithoutAdd:Sj,addFileBtn:Bj,input:Cj,actions:Tj,withActions:Dj,dropOverlayText:Mj,previewItem:Rj,previewItemLarge:Ej,previewItemActive:Lj,menuTrigger:Aj,menuTriggerOpen:qj,menuDropdown:Fj,coverBadge:Pj,smallGrid:Oj,addControl:Wj,addBtn:Hj,addMenuDropdown:Gj},Uj=9;function Vj(t){return t<1024?`${t}B`:t<1024*1024?`${(t/1024).toFixed(2)}KB`:`${(t/(1024*1024)).toFixed(2)}MB`}function Kj(t,s){return s?s.split(",").some(n=>{const o=n.trim().toLowerCase();return o?o.startsWith(".")?t.name.toLowerCase().endsWith(o):o.endsWith("/*")?t.type.toLowerCase().startsWith(o.slice(0,-1)):t.type.toLowerCase()===o:!1}):!0}function Yj({mode:t="media",onChange:s,onView:n,onMediaClick:o,onImageClick:a,onPreviewClick:r,onRemovePreviewUrl:l,onMakeThumbnail:i,onSelectExisting:c,selectExisting:u,onUploadNew:_,uploadNewLabel:m="Upload new",selectExistingLabel:f="Select existing",showActions:h,statuses:p,defaultFiles:x,defaultPreviewUrls:N,accept:b,multiple:z=!1,maxFiles:g=Uj,compact:S=!1,disabled:w=!1,label:T="Upload Files",description:R="Drag and drop files here or click to upload",className:H}){var W;const Q=S?!1:z,ee=S?1:g,Y=c??(typeof u=="function"?u:void 0),$=h??!!(Y||u),k=d.useRef(null),[C,te]=d.useState(!1),[V,ne]=d.useState(()=>{const y=[...N??[],...(x==null?void 0:x.map(Z=>({file:Z})))??[]];return(S?y.slice(0,1):y).map(Z=>"file"in Z?{file:Z.file,url:URL.createObjectURL(Z.file)}:{url:Z.url,name:Z.name,type:Z.type})}),[I,F]=d.useState(null),[oe,le]=d.useState(!1),v=t!=="file",D=b??(v?"image/*,video/*":void 0);d.useEffect(()=>()=>V.forEach(y=>{y.file&&URL.revokeObjectURL(y.url)}),[V]),d.useEffect(()=>{if(I===null&&!oe)return;function y(){F(null),le(!1)}return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[I,oe]);function A(){var y;w||(y=k.current)==null||y.click()}function P(y,Z=!1){y.length&&ne(se=>{const ge=!S&&(z||Z),_e=ge?se:[];ge||se.forEach(we=>{we.file?URL.revokeObjectURL(we.url):l==null||l({url:we.url,name:we.name,type:we.type})});const Te=ee-_e.length;if(Te<=0)return se;const et=y.slice(0,Te).map(we=>({file:we,url:URL.createObjectURL(we)})),Ye=[..._e,...et];return s==null||s(Ye.map(we=>we.file).filter(we=>!!we)),Ye})}function B(y){ne(Z=>{const se=Z[y];se.file?URL.revokeObjectURL(se.url):l==null||l({url:se.url,name:se.name,type:se.type});const ge=Z.filter((_e,Te)=>Te!==y);return s==null||s(ge.map(_e=>_e.file).filter(_e=>!!_e)),ge}),F(null)}function G(y){if(y!==0){if(i){i(y),F(null);return}ne(Z=>{const se=[...Z],[ge]=se.splice(y,1);return se.unshift(ge),s==null||s(se.map(_e=>_e.file).filter(_e=>!!_e)),se}),F(null)}}function q(y){y.target===y.currentTarget&&!w&&!V.length&&(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),A())}function U(y){y.preventDefault(),w||te(!0)}function L(y){y.preventDefault(),te(!1)}function M(y){if(y.preventDefault(),te(!1),w)return;const Z=Array.from(y.dataTransfer.files).filter(se=>Kj(se,D));P(Z,V.length>0)}function K(y){P(Array.from(y.target.files??[]),V.length>0),y.target.value=""}const ae=V.length>0,he=!w&&V.length<ee,X=S&&ae&&v,re=[ue.root,$&&!ae&&ue.withActions,S&&ue.compact,ae&&ue.hasFiles,ae&&t==="file"&&ue.hasFilesFile,ae&&t==="file"&&!he&&ue.hasFilesFileWithoutAdd,X&&ue.compactRow,C&&ue.dragging,w&&ue.disabled,H].filter(Boolean).join(" ");function ce(y){var Z;return y.type==="video"||(Z=y.file)!=null&&Z.type.startsWith("video/")?"video":"image"}function pe(y){const Z=I===y;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`${ue.menuTrigger}${Z?` ${ue.menuTriggerOpen}`:""}`,children:e.jsx(xe,{size:"2xsmall",radius:"full",variant:"neutral",icon:e.jsx(j.DotsThreeIcon,{}),"aria-label":"Options",onMouseDown:se=>se.stopPropagation(),onClick:se=>{se.stopPropagation(),le(!1),F(ge=>ge===y?null:y)}})}),Z&&e.jsx("div",{className:ue.menuDropdown,onMouseDown:se=>se.stopPropagation(),onClick:se=>se.stopPropagation(),children:e.jsxs(Qe,{children:[e.jsx($e,{label:"View",leftIcon:e.jsx(j.EyeIcon,{size:14}),onClick:()=>{const se=V[y];se.file&&n?n(se.file):window.open(se.url,"_blank","noopener,noreferrer"),F(null)}}),y!==0&&e.jsx($e,{label:"Make thumbnail",leftIcon:e.jsx(j.GalleryHorizontalEndIcon,{size:14}),onClick:()=>G(y)}),e.jsx($e,{label:"Delete",leftIcon:e.jsx(j.TrashIcon,{size:14}),variant:"danger",onClick:()=>B(y)})]})})]})}function E(){var se,ge;const y=V[0],Z=I===0;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:ue.compactThumb,onClick:()=>{var _e;y.file&&((_e=o??a)==null||_e(y.file,0)),r==null||r(0)},children:e.jsx(zt,{variant:ce(y),size:"square-xl",src:y.url,alt:y.name??((se=y.file)==null?void 0:se.name)??""})}),e.jsxs("div",{className:ue.compactInfo,children:[e.jsx("span",{className:ue.compactName,children:y.name??((ge=y.file)==null?void 0:ge.name)??"Image"}),y.file&&e.jsx("span",{className:ue.compactMeta,children:Vj(y.file.size)})]}),e.jsxs("div",{className:ue.compactActions,children:[e.jsx(xe,{size:"sm",radius:"full",variant:"transparent",icon:e.jsx(j.DotsThreeIcon,{}),"aria-label":"Options",disabled:w,onMouseDown:_e=>_e.stopPropagation(),onClick:_e=>{_e.stopPropagation(),le(!1),F(Te=>Te===0?null:0)}}),Z&&e.jsx("div",{className:ue.compactMenuDropdown,onMouseDown:_e=>_e.stopPropagation(),onClick:_e=>_e.stopPropagation(),children:e.jsxs(Qe,{children:[e.jsx($e,{label:"View",leftIcon:e.jsx(j.EyeIcon,{size:14}),onClick:()=>{y.file&&n?n(y.file):window.open(y.url,"_blank","noopener,noreferrer"),F(null)}}),e.jsx($e,{label:"Replace",leftIcon:e.jsx(j.ArrowsClockwiseIcon,{size:14}),onClick:()=>{F(null),A()}}),e.jsx($e,{label:"Delete",leftIcon:e.jsx(j.TrashIcon,{size:14}),variant:"danger",onClick:()=>B(0)})]})})]})]})}return e.jsxs("div",{className:re,role:ae?void 0:"button",tabIndex:w||ae?-1:0,"aria-disabled":w,"aria-label":ae?void 0:T,onClick:ae?void 0:A,onKeyDown:q,onDragStart:y=>y.preventDefault(),onDragOver:U,onDragLeave:L,onDrop:M,children:[e.jsx("input",{ref:k,type:"file",accept:D,multiple:Q,disabled:w,onChange:K,className:ue.input,tabIndex:-1}),C&&e.jsxs("div",{className:ue.dropOverlay,children:[e.jsx(j.UploadSimpleIcon,{size:24,className:ue.dropOverlayIcon}),e.jsx("span",{className:ue.dropOverlayText,children:"Drop files to upload"})]}),X?E():ae?t==="file"?e.jsxs(e.Fragment,{children:[V.map((y,Z)=>e.jsx(Po,{file:y.file??new File([],y.name??"file"),status:(p==null?void 0:p[Z])??"idle",onRemove:()=>B(Z)},y.url)),he&&e.jsxs("button",{type:"button",className:ue.addFileBtn,onClick:y=>{y.stopPropagation(),A()},children:[e.jsx(j.PlusIcon,{size:14}),e.jsx("span",{children:"Add file"})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:[ue.previewItem,ue.previewItemLarge,I===0&&ue.previewItemActive].filter(Boolean).join(" "),onClick:()=>{var y;V[0].file&&((y=o??a)==null||y(V[0].file,0)),r==null||r(0)},children:[e.jsx(zt,{variant:ce(V[0]),size:"square-4xl",src:V[0].url,alt:V[0].name??((W=V[0].file)==null?void 0:W.name)??""}),e.jsx("span",{className:ue.coverBadge,"aria-label":"Cover",children:e.jsx(j.GalleryHorizontalEndIcon,{size:12})}),pe(0)]}),e.jsxs("div",{className:ue.smallGrid,children:[V.slice(1).map((y,Z)=>{var se;return e.jsxs("div",{className:[ue.previewItem,I===Z+1&&ue.previewItemActive].filter(Boolean).join(" "),onClick:()=>{var ge;y.file&&((ge=o??a)==null||ge(y.file,Z+1)),r==null||r(Z+1)},children:[e.jsx(zt,{variant:ce(y),size:"square-2xl",src:y.url,alt:y.name??((se=y.file)==null?void 0:se.name)??""}),pe(Z+1)]},y.url)}),he&&e.jsxs("div",{className:ue.addControl,children:[e.jsx("button",{type:"button",className:ue.addBtn,"aria-label":"Add more files","aria-haspopup":Y?"menu":void 0,"aria-expanded":Y?oe:void 0,onClick:y=>{if(y.stopPropagation(),!Y){A();return}F(null),le(Z=>!Z)},children:e.jsx(j.PlusIcon,{size:20})}),Y&&oe&&e.jsx("div",{className:ue.addMenuDropdown,onMouseDown:y=>y.stopPropagation(),onClick:y=>y.stopPropagation(),children:e.jsxs(Qe,{children:[e.jsx($e,{label:m,onClick:()=>{le(!1),_?_():A()}}),e.jsx($e,{label:f,onClick:()=>{le(!1),Y()}})]})})]})]})]}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:ue.description,children:R}),$&&e.jsxs("div",{className:ue.actions,onClick:y=>y.stopPropagation(),children:[e.jsx(ve,{type:"button",variant:"neutral",size:"sm",disabled:w,onClick:y=>{y.stopPropagation(),_?_():A()},children:m}),e.jsx(Jt,{type:"button",tone:"base",size:"base",disabled:w,onClick:y=>{y.stopPropagation(),Y==null||Y()},children:f})]})]})]})}const Xj="_root_1i411_1",Zj="_truncate_1i411_17",Bs={root:Xj,"size-2xsmall":"_size-2xsmall_1i411_7","size-xsmall":"_size-xsmall_1i411_8","size-small":"_size-small_1i411_9","size-medium":"_size-medium_1i411_10","size-large":"_size-large_1i411_11","size-xlarge":"_size-xlarge_1i411_12","weight-400":"_weight-400_1i411_14","weight-500":"_weight-500_1i411_15",truncate:Zj};function ft({as:t="p",size:s="medium",weight:n="400",color:o="inherit",align:a,truncate:r=!1,className:l,style:i,children:c,...u}){const _=[Bs.root,Bs[`size-${s}`],Bs[`weight-${n}`],r&&Bs.truncate,l].filter(Boolean).join(" "),m={color:o==="inherit"?void 0:`var(--foregrounds-fg-${o})`,textAlign:a,...i};return e.jsx(t,{className:_,style:m,...u,children:c})}const Jj="_root_na36l_1",Qj="_image_na36l_18",ev="_placeholder_na36l_26",tv="_placeholderIcon_na36l_40",is={root:Jj,image:Qj,placeholder:ev,placeholderIcon:tv};function Oo({status:t="default",src:s,alt:n="",loadingLabel:o="Loading previewβ¦",loadingHint:a="~5 min",noPreviewLabel:r="Preview couldn't be loaded",className:l}){const[i,c]=d.useState(!1),u=t==="no-preview"||!s||i;return e.jsx("div",{className:[is.root,l].filter(Boolean).join(" "),children:t==="loading"?e.jsxs("div",{className:is.placeholder,children:[e.jsx(Ct,{size:"sm"}),e.jsx(ft,{size:"small",weight:"500",color:"subtle",children:o}),e.jsx(ft,{size:"xsmall",color:"muted",children:a})]}):u?e.jsxs("div",{className:is.placeholder,children:[e.jsx(j.ImageSquareIcon,{size:24,className:is.placeholderIcon}),e.jsx(ft,{size:"small",color:"subtle",children:r})]}):e.jsx("img",{src:s,alt:n,className:is.image,onError:()=>c(!0)})})}const sv="_root_1ukn0_1",nv="_frame_1ukn0_9",ov="_badges_1ukn0_21",av="_thumbnailWrap_1ukn0_27",rv="_info_1ukn0_31",lv="_text_1ukn0_39",iv="_actions_1ukn0_46",Rt={root:sv,frame:nv,badges:ov,thumbnailWrap:av,info:rv,text:lv,actions:iv};function cv({status:t="default",src:s,alt:n,badges:o,title:a,version:r,onEdit:l,editLabel:i="Edit",activeLabel:c,onActiveClick:u,"data-state":_,className:m,style:f}){return e.jsxs("div",{className:[Rt.root,m].filter(Boolean).join(" "),"data-state":_,style:f,children:[e.jsxs("div",{className:Rt.frame,children:[o&&e.jsx("div",{className:Rt.badges,children:o}),e.jsx("div",{className:Rt.thumbnailWrap,children:e.jsx(Oo,{status:t,src:s,alt:n})})]}),e.jsxs("div",{className:Rt.info,children:[e.jsxs("div",{className:Rt.text,children:[r&&e.jsx(ft,{size:"small",weight:"500",color:"subtle",truncate:!0,children:r}),e.jsx(ft,{size:"large",weight:"500",color:"base",truncate:!0,children:a})]}),(l||c)&&e.jsxs("div",{className:Rt.actions,children:[l&&e.jsx(ve,{variant:"neutral",size:"sm",onClick:l,children:i}),c&&e.jsx(ve,{variant:"neutral",size:"sm",onClick:u,children:c})]})]})]})}const dv="_root_iumlv_1",uv={root:dv};function _v({children:t,className:s}){return e.jsx("div",{className:[uv.root,s].filter(Boolean).join(" "),children:t})}const mv="_root_6n4or_1",fv="_dragHandle_6n4or_12",hv="_content_6n4or_19",pv="_valueRow_6n4or_27",xv="_removeButton_6n4or_37",cs={root:mv,dragHandle:fv,content:hv,valueRow:pv,removeButton:xv};function gv({attributeSlot:t,operatorSlot:s,valueSlot:n,onRemove:o,removeLabel:a="Remove",removeDisabled:r=!1,dragHandleProps:l,className:i}){return e.jsxs("div",{className:[cs.root,i].filter(Boolean).join(" "),children:[e.jsx("span",{className:cs.dragHandle,children:e.jsx(xe,{icon:e.jsx(j.DotsSixVerticalIcon,{size:15}),variant:"transparent","aria-label":"Drag to reorder",...l})}),e.jsxs("div",{className:cs.content,children:[t,e.jsxs("div",{className:cs.valueRow,children:[s,n]})]}),o&&e.jsx("span",{className:cs.removeButton,children:e.jsx(xe,{icon:e.jsx(j.CloseIcon,{size:15}),variant:"transparent","aria-label":a,disabled:r,onClick:o})})]})}const bv="_root_srgnl_1",jv="_icon_srgnl_12",vv="_content_srgnl_19",yv="_message_srgnl_25",Cs={root:bv,icon:jv,content:vv,message:yv};function Nv({message:t,learnMoreLabel:s="Learn more",learnMoreHref:n,onLearnMore:o,className:a,style:r}){const l=n||o;function i(){n?window.open(n,"_blank","noopener,noreferrer"):o==null||o()}return e.jsxs("div",{className:[Cs.root,a].filter(Boolean).join(" "),style:r,children:[e.jsx("span",{className:Cs.icon,children:e.jsx(j.InfoIcon,{size:14})}),e.jsxs("span",{className:Cs.content,children:[e.jsx("span",{className:Cs.message,children:t}),l&&e.jsx(Jt,{size:"sm",tone:"interactive",onClick:i,children:s})]})]})}const $v="_root_8ommz_1",wv="_closable_8ommz_18",kv="_icon_8ommz_22",Iv="_content_8ommz_75",zv="_title_8ommz_80",Sv="_description_8ommz_84",Bv="_actions_8ommz_88",Cv="_compact_8ommz_96",ct={root:$v,closable:wv,icon:kv,"variant-information":"_variant-information_8ommz_35","variant-success":"_variant-success_8ommz_43","variant-warning":"_variant-warning_8ommz_51","variant-error":"_variant-error_8ommz_59","variant-neutral":"_variant-neutral_8ommz_67",content:Iv,title:zv,description:Sv,actions:Bv,compact:Cv},Tv={information:e.jsx(j.InfoIcon,{size:15}),success:e.jsx(j.CheckCircleIcon,{size:15}),warning:e.jsx(j.WarningCircleIcon,{size:15}),error:e.jsx(j.XCircleIcon,{size:15}),neutral:e.jsx(j.InfoIcon,{size:15})};function Dv({variant:t="information",title:s,description:n,actions:o,closable:a=!1,compact:r=!1,open:l=!0,onClose:i,className:c,style:u}){const[_,m]=d.useState(l);if(d.useEffect(()=>{m(l)},[l]),!_)return null;function f(){m(!1),i==null||i()}return e.jsxs("div",{role:"alert",className:[ct.root,ct[`variant-${t}`],r&&ct.compact,a&&ct.closable,c].filter(Boolean).join(" "),style:u,children:[e.jsx("span",{className:ct.icon,children:Tv[t]}),e.jsxs("div",{className:ct.content,children:[!r&&s&&e.jsx("div",{className:ct.title,children:s}),n&&e.jsx("div",{className:ct.description,children:n}),o&&e.jsx("div",{className:ct.actions,children:o})]}),a&&e.jsx(xe,{icon:e.jsx(j.CloseIcon,{size:15}),"aria-label":"Kapat",variant:"transparent",size:"2xsmall",onClick:f})]})}const Mv="_root_1tqf5_3",Rv="_line_1tqf5_14",Ev="_filled_1tqf5_30",Lv="_ghost_1tqf5_38",Av="_body_1tqf5_44",qv="_title_1tqf5_51",Vt={root:Mv,line:Rv,"type-information":"_type-information_1tqf5_23","type-warning":"_type-warning_1tqf5_24","type-error":"_type-error_1tqf5_25","type-success":"_type-success_1tqf5_26",filled:Ev,ghost:Lv,body:Av,title:qv};function Fv({type:t="information",variant:s="filled",title:n,children:o,className:a}){const r=[Vt.root,Vt[`type-${t}`],Vt[s],a].filter(Boolean).join(" ");return e.jsxs("div",{className:r,children:[e.jsx("span",{className:Vt.line,"aria-hidden":!0}),e.jsxs("p",{className:Vt.body,children:[n&&e.jsx("strong",{className:Vt.title,children:n}),o]})]})}const Pv="_root_1h8c7_1",Ov="_image_1h8c7_13",Wv="_content_1h8c7_28",Hv="_title_1h8c7_38",Gv="_description_1h8c7_49",Uv="_actions_1h8c7_58",Vv="_dismiss_1h8c7_66",kt={root:Pv,image:Ov,content:Wv,title:Hv,description:Gv,actions:Uv,dismiss:Vv};function Kv({title:t,description:s,action:n,imagePosition:o="right",imageSrc:a,dismissible:r=!1,onDismiss:l,className:i}){const c=e.jsx("span",{className:kt.image,style:a?{backgroundImage:`url(${a})`}:void 0,"aria-hidden":!0});return e.jsxs("div",{className:[kt.root,o==="left"&&kt.imageLeft,i].filter(Boolean).join(" "),children:[o==="left"&&c,e.jsxs("div",{className:kt.content,children:[e.jsx("h3",{className:kt.title,children:t}),e.jsx("p",{className:kt.description,children:s}),n&&e.jsx("div",{className:kt.actions,children:n})]}),o==="right"&&c,r&&e.jsx("button",{type:"button",className:kt.dismiss,onClick:l,"aria-label":"Dismiss",children:e.jsx(j.CloseIcon,{size:16})})]})}const Yv="_root_168dh_3",Xv="_item_168dh_12",Zv="_active_168dh_30",Jv="_forceHover_168dh_32",Fs={root:Yv,item:Xv,active:Zv,forceHover:Jv};function Qv({children:t,className:s,style:n}){return e.jsx("div",{className:[Fs.root,s].filter(Boolean).join(" "),style:n,role:"tablist",children:t})}function e0({label:t,active:s=!1,forceHover:n=!1,onClick:o,className:a}){return e.jsx("button",{type:"button",role:"tab","aria-selected":s,className:[Fs.item,s&&Fs.active,n&&Fs.forceHover,a].filter(Boolean).join(" "),onClick:o,children:t})}const t0="_root_cndph_3",s0="_item_cndph_9",n0="_icon_cndph_36",o0="_label_cndph_48",a0="_forceFocus_cndph_59",r0="_active_cndph_67",At={root:t0,item:s0,icon:n0,label:o0,forceFocus:a0,active:r0};function l0({children:t,className:s,style:n}){return e.jsx("div",{className:[At.root,s].filter(Boolean).join(" "),style:n,role:"tablist",children:t})}const i0={"not-started":j.CircleDashedIcon,"in-progress":j.ContrastIcon,completed:j.CheckCircleIcon};function c0({label:t,status:s="not-started",active:n=!1,forceFocus:o=!1,onClick:a,className:r}){const l=i0[s];return e.jsxs("button",{type:"button",role:"tab","aria-selected":n,className:[At.item,At[`status-${s}`],n&&At.active,o&&At.forceFocus,r].filter(Boolean).join(" "),onClick:a,children:[e.jsx("span",{className:At.icon,children:e.jsx(l,{size:15})}),e.jsx("span",{className:At.label,children:t})]})}const d0="_root_1dw74_1",u0="_normal_1dw74_12",_0="_disabled_1dw74_13",m0="_error_1dw74_14",f0="_icon_1dw74_24",h0="_iconSlot_1dw74_28",Ts={root:d0,normal:u0,disabled:_0,error:m0,icon:f0,iconSlot:h0};function gn({type:t="normal",children:s,className:n,id:o}){const a=[Ts.root,Ts[t],n].filter(Boolean).join(" ");return e.jsxs("span",{id:o,className:a,children:[t==="error"&&e.jsx("span",{className:Ts.iconSlot,children:e.jsx(j.WarningCircleIcon,{size:15,className:Ts.icon})}),s]})}const p0="_root_17015_1",x0={root:p0};function g0({label:t,labelType:s="plus",optional:n=!1,tooltip:o,hint:a,error:r,id:l,children:i,className:c,style:u}){const _=d.useId(),m=l??`${_}-field`,f=`${m}-hint`,h=`${m}-error`,p=r!=null&&r!==!1,x=p?h:a?f:void 0,N=d.Children.only(i),b=d.isValidElement(N)?d.cloneElement(N,{id:N.props.id??m,"aria-describedby":N.props["aria-describedby"]??x,...p?typeof N.type=="string"?{"aria-invalid":!0}:{error:N.props.error??!0,"aria-invalid":!0}:null}):N;return e.jsxs("div",{className:[x0.root,c].filter(Boolean).join(" "),style:u,children:[t&&e.jsx(yn,{htmlFor:m,type:s,optional:n,tooltip:o,children:t}),b,p?e.jsx(gn,{id:h,type:"error",children:r}):a?e.jsx(gn,{id:f,type:"normal",children:a}):null]})}const b0="_root_hmptw_1",j0="_truncate_hmptw_18",Ds={root:b0,"size-medium":"_size-medium_hmptw_7","size-large":"_size-large_hmptw_8","size-xlarge":"_size-xlarge_hmptw_9","size-2xlarge":"_size-2xlarge_hmptw_10","size-3xlarge":"_size-3xlarge_hmptw_11","size-4xlarge":"_size-4xlarge_hmptw_12","size-5xlarge":"_size-5xlarge_hmptw_13","weight-400":"_weight-400_hmptw_15","weight-500":"_weight-500_hmptw_16",truncate:j0},v0={h1:"xlarge",h2:"large",h3:"medium",h4:"xlarge",h5:"large",h6:"medium"};function Wo({as:t="h1",size:s,weight:n="500",color:o="inherit",align:a,truncate:r=!1,className:l,style:i,children:c,...u}){const _=s??v0[t],m=[Ds.root,Ds[`size-${_}`],Ds[`weight-${n}`],r&&Ds.truncate,l].filter(Boolean).join(" "),f={color:o==="inherit"?void 0:`var(--foregrounds-fg-${o})`,textAlign:a,...i};return e.jsx(t,{className:m,style:f,...u,children:c})}const y0="_root_1r3rq_7",N0="_trigger_1r3rq_12",$0="_triggerCheckers_1r3rq_35",w0="_triggerColor_1r3rq_41",k0="_panel_1r3rq_47",I0="_panelInline_1r3rq_57",z0="_modeTabs_1r3rq_62",S0="_modeActive_1r3rq_64",B0="_gradientControls_1r3rq_65",C0="_subheading_1r3rq_66",T0="_stopRow_1r3rq_68",D0="_stopWrap_1r3rq_69",M0="_stop_1r3rq_68",R0="_addStop_1r3rq_70",E0="_stopActive_1r3rq_71",L0="_removeStop_1r3rq_72",A0="_gradientStyles_1r3rq_75",q0="_styleActive_1r3rq_77",F0="_gradientMode_1r3rq_78",P0="_pickerRow_1r3rq_78",O0="_hexRow_1r3rq_79",W0="_alphaRow_1r3rq_80",H0="_presetGrid_1r3rq_81",G0="_gradient_1r3rq_65",U0="_gradWhite_1r3rq_101",V0="_gradBlack_1r3rq_108",K0="_cursor_1r3rq_115",Y0="_hueBar_1r3rq_129",X0="_hueCursor_1r3rq_149",Z0="_hexWrap_1r3rq_168",J0="_hexSwatch_1r3rq_180",Q0="_hexInput_1r3rq_188",ey="_alphaTrack_1r3rq_208",ty="_alphaSlider_1r3rq_226",sy="_alphaInputWrap_1r3rq_262",ny="_alphaInput_1r3rq_262",oy="_alphaPercent_1r3rq_293",ay="_swatch_1r3rq_308",ry="_deleteAction_1r3rq_331",ie={root:y0,trigger:N0,triggerCheckers:$0,triggerColor:w0,panel:k0,panelInline:I0,modeTabs:z0,modeActive:S0,gradientControls:B0,subheading:C0,stopRow:T0,stopWrap:D0,stop:M0,addStop:R0,stopActive:E0,removeStop:L0,gradientStyles:A0,styleActive:q0,gradientMode:F0,pickerRow:P0,hexRow:O0,alphaRow:W0,presetGrid:H0,gradient:G0,gradWhite:U0,gradBlack:V0,cursor:K0,hueBar:Y0,hueCursor:X0,hexWrap:Z0,hexSwatch:J0,hexInput:Q0,alphaTrack:ey,alphaSlider:ty,alphaInputWrap:sy,alphaInput:ny,alphaPercent:oy,swatch:ay,deleteAction:ry};function Ho(t,s,n){s/=100,n/=100;const o=r=>(r+t/60)%6,a=r=>n*(1-s*Math.max(0,Math.min(o(r),4-o(r),1)));return[Math.round(a(5)*255),Math.round(a(3)*255),Math.round(a(1)*255)]}function ms(t,s,n){return"#"+[t,s,n].map(o=>o.toString(16).padStart(2,"0")).join("")}function Os(t){const s=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return s?[parseInt(s[1],16),parseInt(s[2],16),parseInt(s[3],16)]:null}function ly(t,s,n){t/=255,s/=255,n/=255;const o=Math.max(t,s,n),a=Math.min(t,s,n),r=o-a;let l=0;return r!==0&&(o===t?l=((s-n)/r+6)%6:o===s?l=(n-t)/r+2:l=(t-s)/r+4,l*=60),[Math.round(l),o===0?0:Math.round(r/o*100),Math.round(o*100)]}function Ms(t){const s=Os(t);return s?ly(...s):[0,100,100]}function Kt(t,s,n){return ms(...Ho(t,s,n))}function iy(t){const s=/rgba?\(\s*(\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\s*\)/.exec(t);return s?{hex:ms(+s[1],+s[2],+s[3]),alpha:s[4]!==void 0?Math.round(+s[4]*100):100}:null}const cy=[["#FF0000","#FF8C00","#FFFF00","#00CC00","#00AAFF","#3300CC","#FF00FF"],["#000000","#333333","#666666","#888888","#AAAAAA","#DDDDDD","#FFFFFF"]];function dy(t){const s=t.trim(),n=/^#?([a-f\d])([a-f\d])([a-f\d])$/i.exec(s);if(n)return`#${n.slice(1).map(i=>i+i).join("")}`.toUpperCase();const o=Os(s);if(o)return ms(...o).toUpperCase();const a=/^rgba?\(\s*(\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\s*\)$/i.exec(s);if(!a)return null;const r=a.slice(1,4).map(Number),l=a[4]===void 0?1:Number(a[4]);return r.some(i=>i>255)||l<0||l>1?null:ms(r[0],r[1],r[2]).toUpperCase()}const uy=[{id:"linear-90",label:"Linear gradient 90 degrees"},{id:"linear-180",label:"Linear gradient 180 degrees"},{id:"linear-135",label:"Linear gradient 135 degrees"},{id:"radial-center",label:"Radial gradient at 50% 50%"},{id:"radial-top-left",label:"Radial gradient at 0% 0%"}];function Et(t,s){const n=[...t].sort((a,r)=>a.position-r.position).map(a=>`${a.color} ${a.position}%`).join(", ");return s==="radial-center"?`radial-gradient(circle at 50% 50%, ${n})`:s==="radial-top-left"?`radial-gradient(circle at 0% 0%, ${n})`:`linear-gradient(${s==="linear-180"?180:s==="linear-135"?135:90}deg, ${n})`}function Go({value:t,defaultValue:s="#3b82f6",onChange:n,showAlpha:o=!1,alwaysOpen:a=!1,presetColors:r,onDelete:l,deleteLabel:i="Delete",mode:c="solid",defaultMode:u="solid",solidLabel:_="Solid",gradientLabel:m="Gradient"}){const f=t!==void 0,h=Array.from(new Set((r??cy.flat()).map(dy).filter(E=>E!==null)));function p(E){if(E.startsWith("rgb")){const W=iy(E);if(W)return{hsb:Ms(W.hex),alpha:W.alpha}}return{hsb:Ms(E),alpha:100}}const x=p(f?t:s),[N,b]=d.useState(x.hsb),[z,g]=d.useState(x.alpha),[S,w]=d.useState(()=>Kt(...x.hsb)),[T,R]=d.useState(a),[H,Q]=d.useState(c==="gradient"?"gradient":u),[ee,Y]=d.useState("linear-90"),[$,k]=d.useState([{id:"start",color:"#000000",position:0},{id:"end",color:"#666666",position:100}]),[C,te]=d.useState("start"),[V,ne,I]=N,F=Kt(V,ne,I),oe=ms(...Ho(V,100,100)),le=Os(F),v=o?`rgba(${le[0]}, ${le[1]}, ${le[2]}, ${z/100})`:F,D=d.useRef(null),A=d.useRef(null),P=d.useRef(!1),B=d.useRef(!1);d.useEffect(()=>{if(!f||!t||t.includes("gradient("))return;const E=p(t);b(E.hsb),g(E.alpha),w(Kt(...E.hsb))},[t]);function G(E,W,y,Z){const se=Kt(E,W,y),[ge,_e,Te]=Os(se),et=o?`rgba(${ge}, ${_e}, ${Te}, ${+(Z/100).toFixed(2)})`:se;if(H==="gradient"){const Ye=$.map(we=>we.id===C?{...we,color:et}:we);k(Ye),n==null||n(Et(Ye,ee));return}n==null||n(et)}function q(E){te(E.id);const W=p(E.color);b(W.hsb),g(W.alpha),w(Kt(...W.hsb))}function U(){const W={id:`stop-${Date.now()}`,color:F,position:50},y=[...$,W];k(y),q(W),n==null||n(Et(y,ee))}function L(E){Y(E),n==null||n(Et($,E))}function M(E,W){const y=$.map(Z=>Z.id===E?{...Z,color:W}:Z);k(y),n==null||n(Et(y,ee))}function K(E){var y;const W=$.filter(Z=>Z.id!==E);k(W),C===E&&te(((y=W[0])==null?void 0:y.id)??""),n==null||n(Et(W,ee))}function ae(E,W,y,Z=z){const se=Kt(E,W,y);w(se),f||(b([E,W,y]),g(Z)),G(E,W,y,Z)}function he(E){if(!D.current)return;const W=D.current.getBoundingClientRect(),y=Math.max(0,Math.min(E.clientX-W.left,W.width)),Z=Math.max(0,Math.min(E.clientY-W.top,W.height)),se=Math.round(y/W.width*100),ge=Math.round((1-Z/W.height)*100);b([V,se,ge]),ae(V,se,ge)}function X(E){if(!A.current)return;const W=A.current.getBoundingClientRect(),y=Math.max(0,Math.min(E.clientY-W.top,W.height)),Z=Math.round(y/W.height*360);b([Z,ne,I]),ae(Z,ne,I)}function re(E){let W=E.target.value;if(W.startsWith("#")&&(W=W.slice(1)),W=W.replace(/[^a-f0-9]/gi,"").slice(0,6),w("#"+W),W.length===6){const y=Ms("#"+W);b(y),G(y[0],y[1],y[2],z)}}function ce(E){const W=Ms(E);b(W),w(E.toUpperCase()),G(W[0],W[1],W[2],z)}const pe=e.jsxs("div",{className:[a?ie.panelInline:ie.panel,H==="gradient"&&ie.gradientMode].filter(Boolean).join(" "),children:[c==="both"&&e.jsxs("div",{className:ie.modeTabs,children:[e.jsx("button",{type:"button",className:H==="solid"?ie.modeActive:"",onClick:()=>Q("solid"),children:_}),e.jsx("button",{type:"button",className:H==="gradient"?ie.modeActive:"",onClick:()=>Q("gradient"),children:m})]}),H==="gradient"&&e.jsxs("div",{className:ie.gradientControls,children:[e.jsx("div",{className:ie.subheading,children:"Gradient colors"}),e.jsxs("div",{className:ie.stopRow,children:[$.map((E,W)=>e.jsxs("span",{className:ie.stopWrap,children:[e.jsx(Ee,{placement:"bottom-start",offset:6,bare:!0,trigger:e.jsx("button",{type:"button",className:[ie.stop,C===E.id&&ie.stopActive].filter(Boolean).join(" "),style:{background:E.color},onClick:()=>q(E),"aria-label":`Edit color stop at ${E.position}%`}),children:e.jsx(Go,{alwaysOpen:!0,value:E.color,onChange:y=>M(E.id,y),presetColors:r,showAlpha:o})}),W>1&&e.jsx("button",{type:"button",className:ie.removeStop,onClick:()=>K(E.id),"aria-label":"Remove color stop",children:e.jsx(j.XIcon,{size:10})})]},E.id)),e.jsx("button",{type:"button",className:ie.addStop,onClick:U,"aria-label":"Add color stop",children:e.jsx(j.PlusIcon,{size:14})})]}),e.jsx("div",{className:ie.subheading,children:"Style"}),e.jsx("div",{className:ie.gradientStyles,children:uy.map(E=>e.jsx("button",{type:"button",className:ee===E.id?ie.styleActive:"",style:{background:Et($,E.id)},onClick:()=>L(E.id),"aria-label":E.label,title:E.label},E.id))})]}),e.jsxs("div",{className:ie.pickerRow,children:[e.jsxs("div",{ref:D,className:ie.gradient,style:{background:oe},onPointerDown:E=>{var W;P.current=!0,(W=D.current)==null||W.setPointerCapture(E.pointerId),he(E)},onPointerMove:E=>{P.current&&he(E)},onPointerUp:()=>{P.current=!1},children:[e.jsx("div",{className:ie.gradWhite}),e.jsx("div",{className:ie.gradBlack}),e.jsx("div",{className:ie.cursor,style:{left:`${ne}%`,top:`${100-I}%`}})]}),e.jsx("div",{ref:A,className:ie.hueBar,onPointerDown:E=>{var W;B.current=!0,(W=A.current)==null||W.setPointerCapture(E.pointerId),X(E)},onPointerMove:E=>{B.current&&X(E)},onPointerUp:()=>{B.current=!1},children:e.jsx("div",{className:ie.hueCursor,style:{top:`${V/360*100}%`}})})]}),e.jsx("div",{className:ie.hexRow,children:e.jsxs("div",{className:ie.hexWrap,children:[e.jsx("span",{className:ie.hexSwatch,style:{background:F}}),e.jsx("input",{className:ie.hexInput,value:S.toUpperCase(),onChange:re,spellCheck:!1,maxLength:7})]})}),o&&e.jsxs("div",{className:ie.alphaRow,children:[e.jsx("div",{className:ie.alphaTrack,style:{"--alpha-color":F},children:e.jsx("input",{type:"range",min:0,max:100,value:z,onChange:E=>{const W=Number(E.target.value);g(W),ae(V,ne,I,W)},className:ie.alphaSlider})}),e.jsxs("div",{className:ie.alphaInputWrap,children:[e.jsx("input",{className:ie.alphaInput,type:"number",min:0,max:100,value:z,onChange:E=>{const W=Math.max(0,Math.min(100,Number(E.target.value)));g(W),ae(V,ne,I,W)}}),e.jsx("span",{className:ie.alphaPercent,children:"%"})]})]}),h.length>0&&e.jsx("div",{className:ie.presetGrid,children:h.map(E=>e.jsx("button",{type:"button",className:ie.swatch,style:{background:E},onClick:()=>ce(E),"aria-label":`Select color ${E}`},E))}),l&&e.jsx("div",{className:ie.deleteAction,children:e.jsx(ve,{variant:"danger",size:"sm",fullWidth:!0,onClick:()=>{l(),a||R(!1)},children:i})})]});return a?e.jsx("div",{className:ie.root,children:pe}):e.jsx("div",{className:ie.root,children:e.jsx(Ee,{open:T,onOpenChange:R,placement:"bottom-start",offset:4,bare:!0,trigger:e.jsxs("button",{className:ie.trigger,"aria-label":`Color: ${v}`,children:[o&&e.jsx("span",{className:ie.triggerCheckers}),e.jsx("span",{className:ie.triggerColor,style:{background:H==="gradient"?Et($,ee):v}})]}),children:pe})})}const _y="_root_cizb6_2",my="_disabled_cizb6_9",fy="_header_cizb6_15",hy="_label_cizb6_21",py="_values_cizb6_28",xy="_trackWrap_cizb6_36",gy="_track_cizb6_36",by="_fill_cizb6_53",jy="_input_cizb6_61",vy="_inputActive_cizb6_90",yy="_tooltip_cizb6_118",Ny="_minmax_cizb6_145",be={root:_y,disabled:my,header:fy,label:hy,values:py,trackWrap:xy,track:gy,fill:by,input:jy,inputActive:vy,tooltip:yy,minmax:Ny},Gn=16;function $y(t){return`calc(${t}% + ${Gn/2-t/100*Gn}px)`}function _n({value:t,pct:s}){return e.jsx("div",{className:be.tooltip,style:{left:$y(s)},children:t})}function wy(t){const{min:s=0,max:n=100,step:o=1,disabled:a=!1,label:r,formatValue:l=h=>String(h),className:i}=t,c=d.useId(),u=h=>n===s?0:Math.max(0,Math.min(100,(h-s)/(n-s)*100)),[_,m]=d.useState(null);if(t.range){const[h,p]=t.value;return e.jsxs("div",{className:[be.root,a&&be.disabled,i].filter(Boolean).join(" "),children:[r&&e.jsxs("div",{className:be.header,children:[e.jsx("span",{className:be.label,children:r}),e.jsxs("span",{className:be.values,children:[l(h)," β ",l(p)]})]}),e.jsxs("div",{className:be.trackWrap,children:[e.jsx("div",{className:be.track,children:e.jsx("div",{className:be.fill,style:{left:`${u(h)}%`,width:`${u(p)-u(h)}%`}})}),_==="lo"&&e.jsx(_n,{value:l(h),pct:u(h)}),_==="hi"&&e.jsx(_n,{value:l(p),pct:u(p)}),e.jsx("input",{type:"range",id:`${c}-minimum`,"aria-label":r?`${r} minimum`:"Minimum value",className:`${be.input} ${_==="lo"?be.inputActive:""}`,min:s,max:n,step:o,value:h,disabled:a,onChange:x=>t.onChange([Math.min(Number(x.target.value),p-o),p]),onPointerDown:()=>m("lo"),onPointerUp:()=>m(null),onFocus:()=>m("lo"),onBlur:()=>m(null)}),e.jsx("input",{type:"range",id:`${c}-maximum`,"aria-label":r?`${r} maximum`:"Maximum value",className:`${be.input} ${_==="hi"?be.inputActive:""}`,min:s,max:n,step:o,value:p,disabled:a,onChange:x=>t.onChange([h,Math.max(Number(x.target.value),h+o)]),onPointerDown:()=>m("hi"),onPointerUp:()=>m(null),onFocus:()=>m("hi"),onBlur:()=>m(null)})]}),!r&&e.jsxs("div",{className:be.minmax,children:[e.jsx("span",{children:l(s)}),e.jsx("span",{children:l(n)})]})]})}const f=t.value;return e.jsxs("div",{className:[be.root,a&&be.disabled,i].filter(Boolean).join(" "),children:[r&&e.jsxs("div",{className:be.header,children:[e.jsx("label",{htmlFor:c,className:be.label,children:r}),e.jsx("span",{className:be.values,children:l(f)})]}),e.jsxs("div",{className:be.trackWrap,children:[e.jsx("div",{className:be.track,children:e.jsx("div",{className:be.fill,style:{left:"0%",width:`${u(f)}%`}})}),_==="single"&&e.jsx(_n,{value:l(f),pct:u(f)}),e.jsx("input",{id:c,"aria-label":r?void 0:"Value",type:"range",className:`${be.input} ${_==="single"?be.inputActive:""}`,min:s,max:n,step:o,value:f,disabled:a,onChange:h=>t.onChange(Number(h.target.value)),onPointerDown:()=>m("single"),onPointerUp:()=>m(null),onFocus:()=>m("single"),onBlur:()=>m(null)})]}),!r&&e.jsxs("div",{className:be.minmax,children:[e.jsx("span",{children:l(s)}),e.jsx("span",{children:l(n)})]})]})}const ky="_overlay_7161b_1",Iy="_dialog_7161b_19",zy="_content_7161b_38",Sy="_title_7161b_42",By="_description_7161b_50",Cy="_footer_7161b_57",Yt={overlay:ky,dialog:Iy,content:zy,title:Sy,description:By,footer:Cy};function Ty({open:t,onClose:s,onConfirm:n,title:o,description:a,variant:r="confirm",cancelLabel:l="Cancel",confirmLabel:i="Continue",confirmLoading:c=!1,className:u}){const _=d.useRef(null);return fs(t),d.useEffect(()=>{if(!t||c)return;function m(f){f.key==="Escape"&&s()}return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[t,c,s]),d.useEffect(()=>{var m;t&&((m=_.current)==null||m.focus())},[t]),t?pt.createPortal(e.jsx("div",{className:Yt.overlay,onMouseDown:m=>{m.target===m.currentTarget&&!c&&s()},children:e.jsxs("div",{ref:_,role:"alertdialog","aria-modal":"true","aria-labelledby":"prompt-title","aria-describedby":a?"prompt-description":void 0,className:[Yt.dialog,u].filter(Boolean).join(" "),tabIndex:-1,children:[e.jsxs("div",{className:Yt.content,children:[e.jsx("h2",{id:"prompt-title",className:Yt.title,children:o}),a&&e.jsx("p",{id:"prompt-description",className:Yt.description,children:a})]}),e.jsxs("div",{className:Yt.footer,children:[e.jsx(ve,{variant:"neutral",size:"sm",disabled:c,onClick:s,children:l}),e.jsx(ve,{variant:r==="danger"?"danger":"inverted",size:"sm",loading:c,onClick:n,children:i})]})]})}),document.body):null}const Dy="_overlay_1mpyx_2",My="_fadeIn_1mpyx_1",Ry="_panel_1mpyx_16",Ey="_slideInRight_1mpyx_1",Ly="_sm_1mpyx_38",Ay="_md_1mpyx_39",qy="_lg_1mpyx_40",Fy="_header_1mpyx_51",Py="_title_1mpyx_60",Oy="_headerActions_1mpyx_68",Wy="_body_1mpyx_76",Hy="_footer_1mpyx_86",Gy="_closeBtn_1mpyx_98",dt={overlay:Dy,fadeIn:My,panel:Ry,slideInRight:Ey,sm:Ly,md:Ay,lg:qy,header:Fy,title:Py,headerActions:Oy,body:Wy,footer:Hy,closeBtn:Gy};function Uy({open:t,onClose:s,title:n,children:o,footer:a,width:r="md",closable:l=!0,className:i}){const c=d.useRef(null);return fs(t),d.useEffect(()=>{if(!t)return;function u(_){_.key==="Escape"&&!_.defaultPrevented&&s()}return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[t,s]),d.useEffect(()=>{var u;t&&((u=c.current)==null||u.focus())},[t]),t?pt.createPortal(e.jsx("div",{className:dt.overlay,onMouseDown:u=>{u.target===u.currentTarget&&s()},"aria-modal":"true",role:"dialog",children:e.jsxs("div",{ref:c,className:[dt.panel,dt[r],i].filter(Boolean).join(" "),tabIndex:-1,"aria-labelledby":n?"drawer-title":void 0,children:[(n||l)&&e.jsxs("div",{className:dt.header,children:[n&&e.jsx("span",{id:"drawer-title",className:dt.title,children:n}),l&&e.jsxs("div",{className:dt.headerActions,children:[e.jsx(mt,{children:"esc"}),e.jsx("button",{className:dt.closeBtn,onClick:s,"aria-label":"Close",children:e.jsx(j.CloseIcon,{size:16})})]})]}),o&&e.jsx(Tt,{direction:"y",size:"thin",className:dt.body,children:o}),a&&e.jsx("div",{className:dt.footer,children:a})]})}),document.body):null}const Vy="_container_1vfw5_2",Ky="_slot_1vfw5_14",Yy="_slotContent_1vfw5_20",Xy="_card_1vfw5_25",Zy="_toastEnter_1vfw5_1",Jy="_exit_1vfw5_45",Qy="_toastCollapse_1vfw5_1",eN="_toastExit_1vfw5_1",tN="_icon_1vfw5_123",sN="_content_1vfw5_149",nN="_title_1vfw5_157",oN="_description_1vfw5_164",aN="_closeBtn_1vfw5_171",We={container:Vy,slot:Ky,slotContent:Yy,card:Xy,toastEnter:Zy,exit:Jy,toastCollapse:Qy,toastExit:eN,icon:tN,"icon-information":"_icon-information_1vfw5_132","icon-success":"_icon-success_1vfw5_135","icon-warning":"_icon-warning_1vfw5_138","icon-error":"_icon-error_1vfw5_141","icon-neutral":"_icon-neutral_1vfw5_144",content:sN,title:nN,description:oN,closeBtn:aN},rN={information:e.jsx(j.InfoIcon,{size:16}),success:e.jsx(j.CheckCircleIcon,{size:16}),warning:e.jsx(j.WarningCircleIcon,{size:16}),error:e.jsx(j.XCircleIcon,{size:16}),neutral:e.jsx(j.InfoIcon,{size:16})};function Uo({id:t,title:s,description:n,variant:o="neutral",duration:a=4e3,closable:r=!0,onRemove:l}){const[i,c]=d.useState(!1),u=d.useRef(!1),_=d.useCallback(()=>{c(!0)},[]),m=d.useCallback(()=>{u.current||(u.current=!0,l(t))},[t,l]);return d.useEffect(()=>{if(a===1/0||i)return;const f=setTimeout(_,a);return()=>clearTimeout(f)},[a,_,i]),d.useEffect(()=>{if(!i)return;const f=setTimeout(m,400);return()=>clearTimeout(f)},[i,m]),e.jsx("div",{className:[We.slot,i&&We.exit].filter(Boolean).join(" "),onAnimationEnd:f=>{i&&f.target===f.currentTarget&&m()},children:e.jsx("div",{className:We.slotContent,children:e.jsxs("div",{className:[We.card,We[o]].filter(Boolean).join(" "),role:"alert",children:[e.jsx("span",{className:[We.icon,We[`icon-${o}`]].join(" "),children:rN[o]}),e.jsxs("div",{className:We.content,children:[s&&e.jsx("span",{className:We.title,children:s}),n&&e.jsx("span",{className:We.description,children:n})]}),r&&e.jsx("button",{className:We.closeBtn,onClick:_,"aria-label":"Kapat",children:e.jsx(j.CloseIcon,{size:14})})]})})})}const Vo=d.createContext(null);function lN({children:t}){const[s,n]=d.useState([]),o=d.useCallback(r=>{const l=Math.random().toString(36).slice(2);n(i=>[...i,{...r,id:l}])},[]),a=d.useCallback(r=>{n(l=>l.filter(i=>i.id!==r))},[]);return e.jsxs(Vo.Provider,{value:{toast:o,toasts:s},children:[t,pt.createPortal(e.jsx("div",{className:We.container,"aria-live":"polite",children:s.map(r=>e.jsx(Uo,{...r,onRemove:a},r.id))}),document.body)]})}function iN(){const t=d.useContext(Vo);if(!t)throw new Error("useToast must be used inside <ToastProvider>");const{toast:s,toasts:n}=t;return{toast:s,toasts:n,success:(o,a)=>s({title:o,variant:"success",...a}),error:(o,a)=>s({title:o,variant:"error",...a}),warning:(o,a)=>s({title:o,variant:"warning",...a}),information:(o,a)=>s({title:o,variant:"information",...a})}}const cN="_root_18xzd_1",dN="_settings_18xzd_25",uN="_compact_18xzd_30",_N="_icon_18xzd_47",mN="_avatar_18xzd_57",fN="_label_18xzd_66",hN="_trailingIcon_18xzd_81",pN="_dark_18xzd_97",ut={root:cN,settings:dN,compact:uN,icon:_N,avatar:mN,label:fN,trailingIcon:hN,dark:pN};function xN({area:t,label:s,avatar:n,compact:o=!1,variant:a="light",className:r,...l}){return e.jsxs("button",{type:"button","aria-label":o?s:void 0,className:[ut.root,a==="dark"&&ut.dark,ut[t],o&&ut.compact,r].filter(Boolean).join(" "),...l,children:[t==="settings"?e.jsx("span",{className:ut.icon,"aria-hidden":!0,children:e.jsx(j.ArrowLeftIcon,{size:15})}):e.jsx("span",{className:ut.avatar,children:n}),e.jsx("span",{className:ut.label,children:s}),t==="main"&&e.jsx("span",{className:[ut.icon,ut.trailingIcon].join(" "),"aria-hidden":!0,children:e.jsx(j.DotsThreeIcon,{size:15})})]})}const gN="_root_fom94_1",bN="_label_fom94_34",jN="_icon_fom94_46",vN="_dark_fom94_55",Rs={root:gN,label:bN,icon:jN,dark:vN};function yN({label:t,open:s=!0,variant:n="light",className:o,...a}){return e.jsxs("button",{type:"button",className:[Rs.root,n==="dark"&&Rs.dark,o].filter(Boolean).join(" "),...a,children:[e.jsx("span",{className:Rs.label,children:t}),e.jsx("span",{className:Rs.icon,"aria-hidden":!0,children:s?e.jsx(j.MinusIcon,{size:15}):e.jsx(j.PlusIcon,{size:15})})]})}const NN="_root_6a53x_1",$N="_compact_6a53x_24",wN="_parent_6a53x_30",kN="_child_6a53x_34",IN="_extension_6a53x_38",zN="_selected_6a53x_47",SN="_marginBottom_6a53x_58",BN="_body_6a53x_62",CN="_icon_6a53x_79",TN="_label_6a53x_89",DN="_count_6a53x_122",MN="_badge_6a53x_129",RN="_kbd_6a53x_130",EN="_rightButtons_6a53x_136",LN="_dark_6a53x_169",Ce={root:NN,compact:$N,parent:wN,child:kN,extension:IN,selected:zN,marginBottom:SN,body:BN,icon:CN,label:TN,count:DN,badge:MN,kbd:RN,rightButtons:EN,dark:LN};function AN({type:t,label:s,leftIcon:n,avatar:o,count:a,badge:r,kbd:l,rightButtons:i,onClick:c,selected:u=!1,compact:_=!1,variant:m="light",className:f,...h}){return e.jsxs("div",{className:[Ce.root,m==="dark"&&Ce.dark,t==="parent"&&Ce.parent,(t==="child"||t==="child-bottom")&&Ce.child,t==="extension"&&Ce.extension,t==="child-bottom"&&Ce.marginBottom,u&&Ce.selected,_&&Ce.compact,f].filter(Boolean).join(" "),...h,children:[e.jsxs("button",{type:"button",className:Ce.body,"aria-label":_?s:void 0,onClick:c,children:[t==="extension"?e.jsx("span",{className:Ce.icon,children:o}):t==="parent"&&n&&e.jsx("span",{className:Ce.icon,"aria-hidden":!0,children:n}),e.jsx("span",{className:Ce.label,children:s}),a!==void 0&&e.jsx("span",{className:Ce.count,children:a}),t==="parent"&&r&&e.jsx("span",{className:Ce.badge,children:r}),l&&e.jsx("span",{className:Ce.kbd,children:l})]}),t==="parent"&&i&&e.jsx("div",{className:Ce.rightButtons,children:i})]})}const qN="_root_12bbt_1",FN="_description_12bbt_48",PN="_trailing_12bbt_49",ON="_content_12bbt_53",WN="_heading_12bbt_60",HN="_square_12bbt_79",Xt={root:qN,description:FN,trailing:PN,content:ON,heading:WN,square:HN},GN=d.forwardRef(function({as:s,heading:n,variant:o="row",description:a,icon:r,avatar:l,trailing:i,href:c,disabled:u=!1,className:_,onClick:m,onKeyDown:f,"data-state":h="default",...p},x){const N=s??(c?"a":"button"),b=N==="button",z=i===null?null:i??(o==="row"?e.jsx(j.ChevronRightIcon,{size:16}):null),g=w=>{if(u){w.preventDefault(),w.stopPropagation();return}m==null||m(w)},S=w=>{if(u){w.preventDefault();return}f==null||f(w)};return e.jsxs(N,{ref:x,className:[Xt.root,Xt[o],_].filter(Boolean).join(" "),href:u?void 0:c,type:b?"button":void 0,disabled:b?u:void 0,"aria-disabled":u||void 0,tabIndex:u&&!b?-1:void 0,"data-state":h,onClick:g,onKeyDown:S,...p,children:[l??(r!==void 0?e.jsx(St,{type:"icon",icon:r,size:"small",shape:"rounded"}):null),e.jsxs("span",{className:Xt.content,children:[e.jsx(ft,{as:"span",size:"small",weight:"500",color:"inherit",className:Xt.heading,truncate:!0,children:n}),a!==void 0&&e.jsx(ft,{as:"span",size:"small",color:"inherit",className:Xt.description,truncate:!0,children:a})]}),z!==null&&e.jsx("span",{className:Xt.trailing,"aria-hidden":"true",children:z})]})}),UN="_root_zwf0t_2",VN="_close_zwf0t_22",KN="_content_zwf0t_28",mn={root:UN,close:VN,content:KN};function YN({heading:t,description:s,icon:n,state:o="default",onClose:a,className:r,...l}){return e.jsxs("div",{className:[mn.root,r].filter(Boolean).join(" "),"data-state":o,...l,children:[e.jsx(St,{type:"icon",icon:n,size:"base",shape:"rounded"}),e.jsxs("div",{className:mn.content,children:[e.jsx(Wo,{as:"h6",size:"medium",weight:"500",truncate:!0,children:t}),s&&e.jsx(ft,{as:"span",size:"small",color:"subtle",truncate:!0,children:s})]}),a&&e.jsx("span",{className:mn.close,children:e.jsx(xe,{icon:e.jsx(j.CloseIcon,{size:14}),"aria-label":"Remove node",variant:"transparent",size:"2xsmall",onClick:i=>{i.stopPropagation(),a()}})})]})}const XN="_root_1jm9u_2",ZN="_svg_1jm9u_10",JN="_edgePath_1jm9u_17",QN="_arrowMarker_1jm9u_24",e$="_label_1jm9u_46",ds={root:XN,svg:ZN,edgePath:JN,arrowMarker:QN,label:e$},t$={bezier:"M 10 15 C 100 15 140 65 230 65",straight:"M 10 15 L 230 65",step:"M 10 15 L 120 15 L 120 65 L 230 65"};function s$({type:t="bezier",label:s,state:n="default",className:o}){const r=`flow-arrow-${d.useId().replace(/:/g,"")}`;return e.jsxs("div",{className:[ds.root,o].filter(Boolean).join(" "),"data-state":n,children:[e.jsxs("svg",{className:ds.svg,viewBox:"0 0 240 80",fill:"none","aria-hidden":!0,children:[e.jsx("defs",{children:e.jsx("marker",{id:r,viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto",children:e.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:ds.arrowMarker})})}),e.jsx("path",{d:t$[t],className:ds.edgePath,markerEnd:`url(#${r})`})]}),s&&e.jsx("span",{className:ds.label,children:s})]})}const n$="_root_1rb36_2",o$={root:n$};function a$({onZoomIn:t,onZoomOut:s,onFitView:n,onReset:o,className:a}){return e.jsxs("div",{className:[o$.root,a].filter(Boolean).join(" "),children:[e.jsx(xe,{icon:e.jsx(j.ZoomInIcon,{size:15}),"aria-label":"Zoom in",variant:"transparent",size:"sm",radius:"full",onClick:t}),e.jsx(xe,{icon:e.jsx(j.ZoomOutIcon,{size:15}),"aria-label":"Zoom out",variant:"transparent",size:"sm",radius:"full",onClick:s}),e.jsx(xe,{icon:e.jsx(j.ArrowsOutSimpleIcon,{size:15}),"aria-label":"Fit view",variant:"transparent",size:"sm",radius:"full",onClick:n}),e.jsx(xe,{icon:e.jsx(j.ArrowsClockwiseIcon,{size:15}),"aria-label":"Reset",variant:"transparent",size:"sm",radius:"full",onClick:o})]})}const r$="_root_1br1r_2",l$="_pulsing_1br1r_18",Un={root:r$,pulsing:l$};function i$({pulsing:t=!1,disabled:s,onClick:n,"aria-label":o="Add step",className:a}){return e.jsx("span",{className:[Un.root,t?Un.pulsing:void 0,a].filter(Boolean).join(" "),children:e.jsx(xe,{icon:e.jsx(j.PlusIcon,{size:15}),"aria-label":o,variant:"neutral",size:"sm",radius:"full",disabled:s,onClick:n})})}const c$="_root_1fr6n_1",d$={root:c$};function u$({className:t,...s}){return e.jsx("div",{...s,className:[d$.root,t].filter(Boolean).join(" ")})}const _$="_root_6gd8v_1",m$="_item_6gd8v_2",f$="_header_6gd8v_4",h$="_indicator_6gd8v_5",p$="_open_6gd8v_6",x$="_plus_6gd8v_7",g$="_content_6gd8v_9",Lt={root:_$,item:m$,header:f$,indicator:h$,open:p$,plus:x$,content:g$};function b$({status:t}){return t==="completed"?e.jsx(j.CircleCheckIcon,{size:16}):t==="in-progress"?e.jsx(j.ContrastIcon,{size:16}):e.jsx(j.CircleDashedIcon,{size:16})}function j$({items:t,defaultOpen:s,className:n}){const[o,a]=d.useState(s);return e.jsx("div",{className:[Lt.root,n].filter(Boolean).join(" "),children:t.map(r=>{const l=o===r.id;return e.jsxs("div",{className:[Lt.item,l&&Lt.open].filter(Boolean).join(" "),children:[e.jsxs("button",{type:"button",className:Lt.header,"aria-expanded":l,onClick:()=>a(l?void 0:r.id),children:[e.jsx("span",{className:Lt.indicator,children:e.jsx(b$,{status:r.status})}),r.title,e.jsx("span",{className:Lt.plus,children:e.jsx(j.PlusIcon,{size:16})})]}),l&&e.jsx("div",{className:Lt.content,children:r.content})]},r.id)})})}exports.Accordion=tb;exports.Alert=Dv;exports.AutoComplete=Gp;exports.Avatar=St;exports.BREAKPOINTS=eo;exports.Badge=Bt;exports.Box=jn;exports.Breadcrumb=Xf;exports.BreadcrumbItem=Yf;exports.Button=ve;exports.ButtonGroup=Lo;exports.ButtonGroupItem=us;exports.Callout=Fv;exports.CalloutCard=Kv;exports.Card=Eo;exports.CardInput=Vb;exports.Chat=Or;exports.ChatAttachment=Jn;exports.ChatBubble=li;exports.ChatDateSeparator=Di;exports.ChatReference=Ii;exports.ChatUnreadSeparator=Mi;exports.Checkbox=ps;exports.CheckboxLabel=Ju;exports.ColorPicker=Go;exports.CommandBar=v1;exports.CommandBarButton=k1;exports.ConditionBlock=_v;exports.ConditionRow=gv;exports.Container=u$;exports.CurrencyInput=zb;exports.DATA_GRID_ROW_HEIGHT=go;exports.DataGrid=vo;exports.DataGridActionButton=to;exports.DataGridBooleanCell=so;exports.DataGridCell=He;exports.DataGridColumnVisibility=ro;exports.DataGridCurrencyCell=no;exports.DataGridErrorSummary=co;exports.DataGridHeader=lo;exports.DataGridHeaderCell=io;exports.DataGridLinkCell=uo;exports.DataGridMultilineCell=po;exports.DataGridNumberCell=Hs;exports.DataGridReadOnlyCell=_o;exports.DataGridRow=Ps;exports.DataGridSelectCell=fo;exports.DataGridSkeleton=mo;exports.DataGridTextCell=ho;exports.DataGridToggleableNumberCell=xo;exports.DataGridVirtualBody=bo;exports.DatePicker=pn;exports.DatePickerCalendar=As;exports.DatePickerCell=Bo;exports.DatePickerDay=Co;exports.DatePickerInput=Mo;exports.DatePickerPreset=Do;exports.DatePickerSelector=To;exports.Divider=Qi;exports.Drawer=Uy;exports.EmptyState=wo;exports.Field=g0;exports.FileUploadArea=Yj;exports.FileUploadCard=Po;exports.FilterMenu=q1;exports.FilterMenuDateItem=rg;exports.FilterMenuDivider=og;exports.FilterMenuInputItem=lg;exports.FilterMenuItem=K1;exports.FilterMenuSearch=tg;exports.FilterMenuSkeleton=dg;exports.FilterMenuTitle=Z1;exports.Flag=Ff;exports.Flex=ac;exports.FlowAddButton=i$;exports.FlowControls=a$;exports.FlowEdge=s$;exports.FlowNode=YN;exports.Grid=cc;exports.Heading=Wo;exports.HelperBanner=Nv;exports.Hint=gn;exports.IconButton=xe;exports.Input=Ke;exports.Kbd=mt;exports.Label=yn;exports.LinkButton=Jt;exports.List=Vn;exports.Menu=Qe;exports.MenuAvatar=Rd;exports.MenuCaption=dd;exports.MenuGroup=od;exports.MenuItem=$e;exports.MenuItemCheckbox=Xn;exports.MenuItemRadio=Yn;exports.MenuSeparator=oo;exports.MenuTitle=ld;exports.MenuUsage=ru;exports.Modal=qo;exports.NavigationCard=GN;exports.NumberInput=Tb;exports.OtpInput=nj;exports.PasswordInput=pb;exports.PasswordStrength=$b;exports.Popover=Ee;exports.PopoverCloseContext=bn;exports.ProgressAccordion=j$;exports.ProgressBar=ao;exports.ProgressTabs=l0;exports.ProgressTabsItem=c0;exports.Prompt=Ty;exports.Radio=yo;exports.RadioLabel=v_;exports.RangeSlider=wy;exports.Scrollable=Tt;exports.Search=zo;exports.SearchDialog=Bf;exports.SearchInput=$o;exports.SearchItem=hn;exports.SearchModalInput=Io;exports.SegmentedControl=ko;exports.SegmentedControlItem=fn;exports.Select=Sp;exports.SelectItem=$n;exports.SelectMenu=Nn;exports.SelectMenuSearch=Ep;exports.SelectMenuTitle=Tp;exports.SidebarHeader=xN;exports.SidebarListItem=AN;exports.SidebarTitle=yN;exports.Skeleton=Ne;exports.Spinner=Ct;exports.Switch=vn;exports.SwitchLabel=A_;exports.TabItem=e0;exports.Table=hx;exports.TableCell=yx;exports.TableCellMedia=Sx;exports.TableFilter=c1;exports.TableFilterBar=fg;exports.TableFilterChip=ug;exports.TableFooter=n1;exports.TableHeader=Zx;exports.TableMenu=p1;exports.TableRow=Vx;exports.TableScroll=Ax;exports.Tabs=Qv;exports.Tag=hs;exports.TagSelect=Yp;exports.Text=ft;exports.Textarea=mb;exports.ThemeCard=cv;exports.ThemeCardThumbnail=Oo;exports.Thumbnail=zt;exports.ToastCard=Uo;exports.ToastProvider=lN;exports.Tooltip=ht;exports.TreeSelect=ix;exports.TreeSelectItem=Ro;exports.UnlockFeaturesModal=Gg;exports.UrlInput=Db;exports.getPasswordStrength=Fo;exports.isResponsiveObject=Ws;exports.resolveBoxStyle=Qn;exports.setResponsiveVars=Zt;exports.usePopoverClose=Kn;exports.useSearchShortcut=Cf;exports.useToast=iN;
|
|
3
|
+
`).map(P=>P.split(" "));v.preventDefault(),x({start:$.anchor,values:A})},...w,children:a})})}const vo=Object.assign(Lu,{Row:Ps,Header:lo,HeaderCell:io,ErrorSummary:co,Cell:He,TextCell:ho,NumberCell:Hs,CurrencyCell:no,ColumnVisibility:ro,BooleanCell:so,ReadOnlyCell:_o,SelectCell:fo,LinkCell:uo,MultilineCell:po,ToggleableNumberCell:xo,Skeleton:mo,VirtualBody:bo,ActionButton:to}),Au="_root_1qu2a_1",qu="_disabled_1qu2a_12",Fu="_singleLine_1qu2a_16",Pu="_bordered_1qu2a_22",Ou="_input_1qu2a_48",Wu="_box_1qu2a_62",Hu="_boxChecked_1qu2a_79",Gu="_boxIndeterminate_1qu2a_80",Uu="_content_1qu2a_127",Vu="_labelRow_1qu2a_135",Ku="_labelText_1qu2a_141",Yu="_optional_1qu2a_148",Xu="_infoIcon_1qu2a_155",Zu="_price_1qu2a_160",Ju="_description_1qu2a_168",Se={root:Au,disabled:qu,singleLine:Fu,bordered:Pu,input:Ou,box:Wu,boxChecked:Hu,boxIndeterminate:Gu,content:Uu,labelRow:Vu,labelText:Ku,optional:Yu,infoIcon:Xu,price:Zu,description:Ju};function Qu({label:t,optional:s,tooltip:n,description:o,badge:a,badgeColor:r="information",price:l,bordered:i=!1,indeterminate:c=!1,checked:u,defaultChecked:_,disabled:m,onChange:h,className:f,"data-state":p,...x}){const N=d.useRef(null),b=u!==void 0,[z,g]=d.useState(_??!1),S=b?!!u:z;d.useEffect(()=>{N.current&&(N.current.indeterminate=c)},[c]);function w(H){b||g(H.target.checked),h==null||h(H)}const T=[Se.root,i&&Se.bordered,!o&&Se.singleLine,(S||c)&&Se.checked,m&&Se.disabled,f].filter(Boolean).join(" "),R=[Se.box,S&&!c&&Se.boxChecked,c&&Se.boxIndeterminate].filter(Boolean).join(" ");return e.jsxs("label",{className:T,"data-state":p,children:[e.jsx("input",{ref:N,type:"checkbox",className:Se.input,checked:u,defaultChecked:b?void 0:_,readOnly:b&&!h,disabled:m,onChange:w,...x}),e.jsxs("span",{className:R,"aria-hidden":!0,children:[S&&!c&&e.jsx(j.CheckIcon,{size:10,strokeWidth:3.5}),c&&e.jsx(j.MinusIcon,{size:10,strokeWidth:3.5})]}),e.jsxs("div",{className:Se.content,children:[e.jsxs("div",{className:Se.labelRow,children:[e.jsx("span",{className:Se.labelText,children:t}),s&&e.jsx("span",{className:Se.optional,children:"(Optional)"}),n&&e.jsx(ht,{content:n,placement:"top",children:e.jsx(j.InfoIcon,{size:15,className:Se.infoIcon})}),a&&e.jsx(Ct,{color:r,children:a}),l&&e.jsx("span",{className:Se.price,children:l})]}),o&&e.jsx("p",{className:Se.description,children:o})]})]})}const e_="_root_1mv4n_1",t_="_disabled_1mv4n_12",s_="_input_1mv4n_17",n_="_circle_1mv4n_30",o_="_checked_1mv4n_57",a_="_label_1mv4n_96",Gt={root:e_,disabled:t_,input:s_,circle:n_,checked:o_,label:a_};function yo({label:t,disabled:s,checked:n,className:o,"data-state":a,...r}){const l=[Gt.root,s&&Gt.disabled,o].filter(Boolean).join(" "),i=[Gt.circle,n&&Gt.checked].filter(Boolean).join(" ");return e.jsxs("label",{className:l,"data-state":a,children:[e.jsx("input",{type:"radio",className:Gt.input,disabled:s,checked:n,readOnly:!r.onChange,...r}),e.jsx("span",{className:i,"aria-hidden":!0}),t&&e.jsx("span",{className:Gt.label,children:t})]})}const r_="_root_k8ipa_1",l_="_disabled_k8ipa_12",i_="_singleLine_k8ipa_16",c_="_bordered_k8ipa_22",d_="_checked_k8ipa_31",u_="_input_k8ipa_57",__="_circle_k8ipa_71",m_="_circleChecked_k8ipa_99",f_="_content_k8ipa_146",h_="_labelRow_k8ipa_154",p_="_labelText_k8ipa_160",x_="_optional_k8ipa_167",g_="_infoIcon_k8ipa_174",b_="_leftIcon_k8ipa_179",j_="_price_k8ipa_186",v_="_description_k8ipa_194",Be={root:r_,disabled:l_,singleLine:i_,bordered:c_,checked:d_,input:u_,circle:__,circleChecked:m_,content:f_,labelRow:h_,labelText:p_,optional:x_,infoIcon:g_,leftIcon:b_,price:j_,description:v_};function y_({label:t,leftIcon:s,optional:n,tooltip:o,description:a,badge:r,badgeColor:l="information",badgePreset:i,price:c,bordered:u=!1,checked:_,defaultChecked:m,disabled:h,onChange:f,className:p,"data-state":x,...N}){const b=_!==void 0,[z,g]=d.useState(m??!1),S=b?!!_:z;function w(H){b||g(H.target.checked),f==null||f(H)}const T=[Be.root,u&&Be.bordered,S&&Be.checked,h&&Be.disabled,!a&&Be.singleLine,p].filter(Boolean).join(" "),R=[Be.circle,S&&Be.circleChecked].filter(Boolean).join(" ");return e.jsxs("label",{className:T,"data-state":x,children:[e.jsx("input",{type:"radio",className:Be.input,checked:_,defaultChecked:b?void 0:m,readOnly:b&&!f,disabled:h,onChange:w,...N}),e.jsx("span",{className:R,"aria-hidden":!0}),e.jsxs("div",{className:Be.content,children:[e.jsxs("div",{className:Be.labelRow,children:[s&&e.jsx("span",{className:Be.leftIcon,"aria-hidden":!0,children:s}),e.jsx("span",{className:Be.labelText,children:t}),n&&e.jsx("span",{className:Be.optional,children:"(Optional)"}),o&&e.jsx(ht,{content:o,placement:"top",children:e.jsx(j.InfoIcon,{size:15,className:Be.infoIcon})}),r&&(i?e.jsx(Ct,{preset:i,children:r}):e.jsx(Ct,{color:l,children:r})),c&&e.jsx("span",{className:Be.price,children:c})]}),a&&e.jsx("p",{className:Be.description,children:a})]})]})}const N_="_root_1tb49_1",$_="_background_1tb49_10",w_="_disabled_1tb49_20",k_="_row_1tb49_36",I_="_input_1tb49_51",z_="_track_1tb49_65",S_="_checked_1tb49_76",B_="_thumb_1tb49_83",C_="_small_1tb49_117",T_="_content_1tb49_133",D_="_labelRow_1tb49_141",M_="_labelText_1tb49_153",R_="_optional_1tb49_160",E_="_infoIcon_1tb49_167",L_="_description_1tb49_172",A_="_revealed_1tb49_182",ke={root:N_,background:$_,disabled:w_,row:k_,input:I_,track:z_,checked:S_,thumb:B_,small:C_,content:T_,labelRow:D_,labelText:M_,optional:R_,infoIcon:E_,description:L_,revealed:A_};function q_({label:t,optional:s,tooltip:n,description:o,background:a=!1,size:r="default",children:l,checked:i,defaultChecked:c,disabled:u,onChange:_,className:m,"data-state":h,...f}){const p=i!==void 0,[x,N]=d.useState(c??!1),b=p?!!i:x;function z(T){p||N(T.target.checked),_==null||_(T)}const g=[ke.root,a&&ke.background,r==="small"&&ke.small,u&&ke.disabled,m].filter(Boolean).join(" "),S=[ke.track,b&&ke.checked].filter(Boolean).join(" "),w=[ke.thumb,b&&ke.checked].filter(Boolean).join(" ");return e.jsxs("div",{className:g,"data-state":h,children:[e.jsxs("label",{className:ke.row,children:[e.jsx("input",{type:"checkbox",role:"switch",className:ke.input,checked:i,defaultChecked:p?void 0:c,readOnly:p&&!_,disabled:u,onChange:z,...f}),e.jsx("span",{className:S,"aria-hidden":!0,children:e.jsx("span",{className:w})}),e.jsxs("div",{className:ke.content,children:[e.jsxs("div",{className:ke.labelRow,children:[e.jsx("span",{className:ke.labelText,children:t}),s&&e.jsx("span",{className:ke.optional,children:"(Optional)"}),n&&e.jsx(ht,{content:n,placement:"top",children:e.jsx(j.InfoIcon,{size:15,className:ke.infoIcon})})]}),o&&e.jsx("p",{className:ke.description,children:o})]})]}),b&&l&&e.jsx("div",{className:ke.revealed,children:l})]})}const F_="_wrap_1sfxx_2",P_="_base_1sfxx_15",O_="_sm_1sfxx_16",W_="_withSlot_1sfxx_19",H_="_input_1sfxx_26",G_="_withLeftIcon_1sfxx_32",U_="_withRightIcon_1sfxx_33",V_="_iconLeft_1sfxx_37",K_="_iconDivider_1sfxx_37",Y_="_prefix_1sfxx_42",X_="_suffix_1sfxx_56",Z_="_white_1sfxx_70",J_="_gray_1sfxx_73",Q_="_disabled_1sfxx_82",em="_error_1sfxx_98",tm="_rightSlot_1sfxx_189",sm="_iconRight_1sfxx_193",nm="_aiSlot_1sfxx_217",Ie={wrap:F_,base:P_,sm:O_,withSlot:W_,input:H_,withLeftIcon:G_,withRightIcon:U_,iconLeft:V_,iconDivider:K_,prefix:Y_,suffix:X_,white:Z_,gray:J_,disabled:Q_,error:em,rightSlot:tm,iconRight:sm,aiSlot:nm},Ke=d.forwardRef(function({size:s="base",variant:n="white",error:o=!1,leftIcon:a,rightIcon:r,leftIconDivider:l=!1,rightIconDivider:i=!1,prefix:c,suffix:u,rightSlot:_,aiSlot:m,inputClassName:h,className:f,disabled:p,"aria-invalid":x,...N},b){const z=o||x===!0||x==="true",g=!!c||!!u||!!_||!!a||!!r||!!m,S=[Ie.wrap,Ie[s],Ie[n],g?Ie.withSlot:"",a?Ie.withLeftIcon:"",r?Ie.withRightIcon:"",z?Ie.error:"",p?Ie.disabled:"",f].filter(Boolean).join(" ");return e.jsxs("div",{className:S,children:[c&&e.jsx("span",{className:Ie.prefix,children:c}),a&&e.jsx("span",{className:[Ie.iconLeft,l?Ie.iconDivider:""].filter(Boolean).join(" "),children:a}),e.jsx("input",{ref:b,className:[Ie.input,h].filter(Boolean).join(" "),disabled:p,"aria-invalid":x??(o||void 0),...N}),r&&e.jsx("span",{className:[Ie.iconRight,i?Ie.iconDivider:""].filter(Boolean).join(" "),children:r}),_&&e.jsx("span",{className:Ie.rightSlot,children:_}),m&&e.jsx("span",{className:Ie.aiSlot,children:m}),u&&e.jsx("span",{className:Ie.suffix,children:u})]})}),om="_root_ade08_1",am={root:om};function No({onClick:t,"aria-label":s="Clear"}){return e.jsx("button",{type:"button",className:am.root,onClick:t,tabIndex:-1,"aria-label":s,children:e.jsx(j.CloseIcon,{size:10})})}const rm="_root_1agox_1",lm="_squared_1agox_19",im="_rounded_1agox_24",cm="_bgField_1agox_31",dm="_contrastBgSubtle_1agox_36",um="_bgFieldComponent_1agox_42",ms={root:rm,squared:lm,rounded:im,bgField:cm,contrastBgSubtle:dm,bgFieldComponent:um},_m={"bg-field":ms.bgField,"contrast-bg-subtle":ms.contrastBgSubtle,"bg-field-component":ms.bgFieldComponent};function mt({children:t,bg:s="bg-field",radius:n="default",className:o}){return e.jsx("kbd",{className:[ms.root,_m[s],ms[n],o].filter(Boolean).join(" "),children:t})}const mm="_input_1d4yp_1",fm="_shortcut_1d4yp_7",Fn={input:mm,shortcut:fm},$o=d.forwardRef(function({value:s,defaultValue:n,onChange:o,onClear:a,shortcut:r,inputClassName:l,...i},c){const u=d.useRef(null),_=s!==void 0,[m,h]=d.useState(n??""),f=_?s??"":m;function p(b){_||h(b.target.value),o==null||o(b)}function x(){var z;const b=u.current;if(b){const g=(z=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"))==null?void 0:z.set;g==null||g.call(b,""),b.dispatchEvent(new Event("input",{bubbles:!0})),b.focus()}else _||h("");a==null||a()}const N=f?e.jsx(No,{onClick:x,"aria-label":"Clear search"}):r?e.jsx(mt,{className:Fn.shortcut,bg:"bg-field-component",children:r}):void 0;return e.jsx(Ke,{ref:b=>{u.current=b,typeof c=="function"?c(b):c&&(c.current=b)},type:"search",value:f,onChange:p,leftIcon:e.jsx(j.MagnifyingGlassIcon,{size:15}),rightIcon:N,inputClassName:[Fn.input,l].filter(Boolean).join(" "),...i})}),hm="_root_3xwqj_1",pm="_text_3xwqj_11",xm="_illustration_3xwqj_18",gm="_card_3xwqj_28",bm="_cardLeft_3xwqj_35",jm="_cardRight_3xwqj_40",vm="_cardFront_3xwqj_45",ym="_title_3xwqj_68",Nm="_description_3xwqj_76",$m="_actions_3xwqj_84",Pe={root:hm,text:pm,illustration:xm,card:gm,cardLeft:bm,cardRight:jm,cardFront:vm,title:ym,description:Nm,actions:$m};function wo({icon:t=e.jsx(j.TagPlusIcon,{}),sideIcons:s=[e.jsx(j.UserRoundIcon,{}),e.jsx(j.FileTextIcon,{})],title:n,description:o,actionLabel:a,actionIcon:r,onAction:l,linkLabel:i,onLink:c,height:u=400,className:_}){const m=a||i;return e.jsxs("div",{className:[Pe.root,_].filter(Boolean).join(" "),style:{height:typeof u=="number"?`${u}px`:u},children:[t&&e.jsxs("div",{className:Pe.illustration,"aria-hidden":"true",children:[e.jsx(Bt,{type:"icon",icon:s[0],size:"xlarge",shape:"rounded",className:[Pe.card,Pe.cardLeft].join(" ")}),e.jsx(Bt,{type:"icon",icon:s[1],size:"xlarge",shape:"rounded",className:[Pe.card,Pe.cardRight].join(" ")}),e.jsx(Bt,{type:"icon",icon:t,size:"xlarge",shape:"rounded",className:[Pe.card,Pe.cardFront].join(" ")})]}),e.jsxs("div",{className:Pe.text,children:[e.jsx("p",{className:Pe.title,children:n}),o&&e.jsx("p",{className:Pe.description,children:o})]}),m&&e.jsxs("div",{className:Pe.actions,children:[a&&e.jsx(ve,{variant:"neutral",size:"base",leftIcon:r,onClick:l,children:a}),i&&e.jsx(Qt,{size:"lg",tone:"base",rightIcon:e.jsx(j.CaretRightIcon,{size:12}),onClick:c,children:i})]})]})}const wm="_root_11lz5_3",km="_fullWidth_11lz5_13",Im="_item_11lz5_18",zm="_iconOnly_11lz5_22",Sm="_active_11lz5_48",Bm="_forceHover_11lz5_49",Cm="_icon_11lz5_22",Tm="_label_11lz5_87",zt={root:wm,fullWidth:km,item:Im,iconOnly:zm,active:Sm,forceHover:Bm,icon:Cm,label:Tm};function ko({children:t,fullWidth:s=!1,className:n,style:o}){return e.jsx("div",{className:[zt.root,s?zt.fullWidth:void 0,n].filter(Boolean).join(" "),style:o,role:"tablist",children:t})}function fn({label:t,icon:s,"aria-label":n,active:o=!1,disabled:a=!1,forceHover:r=!1,onClick:l,className:i}){const c=!t;return e.jsxs("button",{type:"button",role:"tab","aria-selected":o,"aria-label":n??t,className:[zt.item,c&&zt.iconOnly,o&&zt.active,r&&zt.forceHover,i].filter(Boolean).join(" "),disabled:a,onClick:l,children:[s&&e.jsx("span",{className:zt.icon,children:s}),t&&e.jsx("span",{className:zt.label,children:t})]})}const Dm="_search_nwd4i_5",Mm="_modalInputWrap_nwd4i_20",Rm="_modalInput_nwd4i_20",Em="_areaRow_nwd4i_31",Lm="_areaTrigger_nwd4i_37",Am="_areaMenu_nwd4i_48",qm="_backButton_nwd4i_85",Fm="_clearBtn_nwd4i_90",Pm="_results_nwd4i_105",Om="_group_nwd4i_113",Wm="_groupLabel_nwd4i_117",Hm="_item_nwd4i_127",Gm="_elaborated_nwd4i_142",Um="_itemDescription_nwd4i_146",Vm="_hover_nwd4i_153",Km="_focus_nwd4i_155",Ym="_itemAvatar_nwd4i_159",Xm="_itemThumbnail_nwd4i_166",Zm="_itemIcon_nwd4i_173",Jm="_itemCopy_nwd4i_182",Qm="_itemLabel_nwd4i_189",ef="_subtext_nwd4i_202",tf="_badge_nwd4i_210",sf="_shortcut_nwd4i_226",nf="_shortcutPart_nwd4i_233",of="_shortcutThen_nwd4i_234",af="_showMore_nwd4i_236",rf="_recommendation_nwd4i_245",lf="_overlay_nwd4i_264",cf="_dialog_nwd4i_274",df="_srOnly_nwd4i_325",uf="_recommendationContent_nwd4i_352",_f="_recommendationHeader_nwd4i_359",mf="_recommendationIcon_nwd4i_366",ff="_recommendationTitle_nwd4i_376",hf="_recommendationDescription_nwd4i_386",pf="_recommendationArrow_nwd4i_396",xf="_controlItem_nwd4i_406",gf="_empty_nwd4i_413",bf="_emptyBox_nwd4i_414",jf="_loading_nwd4i_430",vf="_skeletonHeading_nwd4i_436",yf="_pulse_nwd4i_1",Nf="_skeletonRow_nwd4i_445",$f="_footer_nwd4i_468",wf="_footerGroup_nwd4i_482",kf="_footerLabel_nwd4i_488",If="_footerKeys_nwd4i_492",zf="_footerDivider_nwd4i_498",J={search:Dm,modalInputWrap:Mm,modalInput:Rm,areaRow:Em,areaTrigger:Lm,areaMenu:Am,backButton:qm,clearBtn:Fm,results:Pm,group:Om,groupLabel:Wm,item:Hm,elaborated:Gm,itemDescription:Um,hover:Vm,focus:Km,itemAvatar:Ym,itemThumbnail:Xm,itemIcon:Zm,itemCopy:Jm,itemLabel:Qm,subtext:ef,badge:tf,shortcut:sf,shortcutPart:nf,shortcutThen:of,showMore:af,recommendation:rf,overlay:lf,dialog:cf,"search-overlay-in":"_search-overlay-in_nwd4i_1","search-overlay-out":"_search-overlay-out_nwd4i_1","search-dialog-in":"_search-dialog-in_nwd4i_1","search-dialog-out":"_search-dialog-out_nwd4i_1",srOnly:df,recommendationContent:uf,recommendationHeader:_f,recommendationIcon:mf,recommendationTitle:ff,recommendationDescription:hf,recommendationArrow:pf,controlItem:xf,empty:gf,emptyBox:bf,loading:jf,skeletonHeading:vf,pulse:yf,skeletonRow:Nf,footer:$f,footerGroup:wf,footerLabel:kf,footerKeys:If,footerDivider:zf},Io=d.forwardRef(function({depth:s="default",loading:n=!1,areas:o,area:a,defaultArea:r,onAreaChange:l,value:i,defaultValue:c,onChange:u,onClear:_,onBack:m,className:h,...f},p){var ee;const x=i!==void 0,[N,b]=d.useState((c==null?void 0:c.toString())??""),z=x?String(i??""):N,g=a!==void 0,[S,w]=d.useState(r??((ee=o==null?void 0:o[0])==null?void 0:ee.id)??""),T=g?a:S,R=(o==null?void 0:o.find(Y=>Y.id===T))??(o==null?void 0:o[0]),H=!!(o&&o.length>0),Q=e.jsxs("div",{className:[J.modalInput,s==="one-down"?J.oneDown:"",H?"":h].filter(Boolean).join(" "),children:[s==="one-down"&&e.jsx(xe,{type:"button",variant:"transparent",size:"sm",icon:e.jsx(j.CornerDownLeftIcon,{size:14}),"aria-label":"Back",onClick:m,className:J.backButton}),e.jsx("input",{ref:p,type:"search",value:z,onChange:Y=>{x||b(Y.target.value),u==null||u(Y)},...f}),n&&e.jsx(Tt,{size:"xs"}),z&&e.jsx(ve,{type:"button",variant:"transparent",size:"sm",className:J.clearBtn,onClick:()=>{x||b(""),_==null||_()},children:"Clear"})]});return H?e.jsxs("div",{className:[J.modalInputWrap,s==="one-down"?J.oneDown:"",h].filter(Boolean).join(" "),children:[e.jsx("div",{className:J.areaRow,children:e.jsx(Ee,{bare:!0,placement:"bottom-start",offset:4,trigger:e.jsx("button",{type:"button",className:J.areaTrigger,children:e.jsx(Ct,{size:"2xs",color:"neutral",leftIcon:R==null?void 0:R.icon,rightIcon:e.jsx(j.CaretDownIcon,{size:12}),children:(R==null?void 0:R.label)??T})}),children:e.jsx(Je,{className:J.areaMenu,children:o.map(Y=>e.jsx($e,{label:Y.label,leftIcon:Y.icon,active:Y.id===T,onClick:()=>{g||w(Y.id),l==null||l(Y.id)}},Y.id))})})}),Q]}):Q});function Sf({size:t=12}){return e.jsx("svg",{width:t,height:t,viewBox:"0 0 15 15",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.5 1.5C4.5 0.671573 5.17157 0 6 0H9C9.82843 0 10.5 0.671573 10.5 1.5V3.5H13C13.8284 3.5 14.5 4.17157 14.5 5V9C14.5 9.82843 13.8284 10.5 13 10.5H10.5V13.5C10.5 14.3284 9.82843 15 9 15H6C5.17157 15 4.5 14.3284 4.5 13.5V10.5H2C1.17157 10.5 0.5 9.82843 0.5 9V5C0.5 4.17157 1.17157 3.5 2 3.5H4.5V1.5ZM4.5 5.5H6.5V7.5H4.5V5.5ZM8.5 5.5H10.5V7.5H8.5V5.5Z"})})}function hn({type:t="result",state:s="default",avatar:n,thumbnail:o,icon:a,label:r,subtext:l,description:i,badge:c,shortcut:u,thenLabel:_="then",className:m,children:h,...f}){return t==="title"?e.jsx("div",{className:[J.groupLabel,m].filter(Boolean).join(" "),...f,children:r??h}):t==="show-more"?e.jsxs("div",{className:[J.item,J.showMore,J[s],m].filter(Boolean).join(" "),role:"option",...f,children:[e.jsx(j.PlusIcon,{size:14}),e.jsx("span",{children:r??h??"Show more"})]}):t==="recommendation"?e.jsxs("div",{className:[J.recommendation,J[s],m].filter(Boolean).join(" "),role:"option","aria-selected":s==="focus",tabIndex:0,...f,children:[e.jsxs("div",{className:J.recommendationContent,children:[e.jsxs("div",{className:J.recommendationHeader,children:[e.jsx("span",{className:J.recommendationIcon,children:a??e.jsx(Sf,{size:12})}),e.jsx("span",{className:J.recommendationTitle,children:r??h})]}),i&&e.jsx("div",{className:J.recommendationDescription,children:i})]}),e.jsx("span",{className:J.recommendationArrow,"aria-hidden":"true",children:e.jsx("svg",{width:"6",height:"8",viewBox:"0 0 6 8",fill:"currentColor",children:e.jsx("path",{d:"M0.5 0.75L5.5 4L0.5 7.25V0.75Z"})})})]}):t==="control"?e.jsx("div",{className:[J.controlItem,J[s],m].filter(Boolean).join(" "),role:"group",...f,children:h??e.jsxs(ko,{fullWidth:!0,children:[e.jsx(fn,{label:"Label",icon:e.jsx(j.FlameIcon,{size:14}),active:!0}),e.jsx(fn,{label:"Label",icon:e.jsx(j.FlameIcon,{size:14})})]})}):e.jsxs("div",{className:[J.item,t==="result-elaborated"?J.elaborated:"",J[s],m].filter(Boolean).join(" "),role:"option","aria-selected":s==="focus",tabIndex:-1,...f,children:[n&&e.jsx("span",{className:J.itemAvatar,children:n}),o&&e.jsx("span",{className:J.itemThumbnail,children:o}),a&&e.jsx("span",{className:J.itemIcon,children:a}),e.jsxs("span",{className:J.itemCopy,children:[e.jsx("span",{className:J.itemLabel,children:r??h}),i&&e.jsx("span",{className:J.itemDescription,children:i})]}),l&&e.jsx("span",{className:J.subtext,children:l}),c&&(typeof c=="string"?e.jsx(Ct,{size:"2xs",color:"neutral",children:c}):c),u&&e.jsx("span",{className:J.shortcut,children:u.map((p,x)=>e.jsxs("span",{className:J.shortcutPart,children:[e.jsx(mt,{children:p}),x<u.length-1&&e.jsx("span",{className:J.shortcutThen,children:_})]},`${p}-${x}`))})]})}function Bf(t){return typeof t=="string"||typeof t=="number"?String(t):""}function zo({groups:t,placeholder:s="Jump to or find something...",defaultQuery:n="",query:o,onQueryChange:a,onSelect:r,onShowMore:l,onBack:i,footer:c,emptyState:u,emptyIcon:_,emptyActionLabel:m,emptyActionIcon:h,onEmptyAction:f,initialTitle:p="Find anything",initialDescription:x="Search across products, orders, customers and settings.",emptyTitle:N="No results found",emptyDescription:b="We couldn't find anything that matched your search.",loading:z=!1,areas:g,area:S,defaultArea:w,onAreaChange:T,filterItems:R=!0,filterFn:H,allAreaId:Q=(V=>(V=g==null?void 0:g[0])==null?void 0:V.id)()??"all",showMoreLabel:ee="Show more",navigationLabel:Y="Navigate",openResultLabel:$="Open result",thenLabel:k,className:C,...te}){var he;const[ne,I]=d.useState(n),[F,oe]=d.useState(w??((he=g==null?void 0:g[0])==null?void 0:he.id)??""),[le,v]=d.useState(0),D=d.useId(),A=d.useRef(null),P=o??ne,B=S??F,G=d.useMemo(()=>{const X=B&&B!==Q?t.filter(ce=>!ce.area||ce.area===B):t;if(R===!1)return X;const re=P.toLowerCase().trim();return re?X.map(ce=>({...ce,items:ce.items.filter(pe=>H?H(pe,re):`${Bf(pe.label)} ${pe.keywords??""}`.toLowerCase().includes(re))})).filter(ce=>ce.items.length):X},[t,P,R,H,B,Q]),q=d.useMemo(()=>G.flatMap(X=>[...X.items.map(re=>({kind:"result",item:re,group:X})),...X.hasMore&&l?[{kind:"show-more",group:X}]:[]]),[G,l]);d.useEffect(()=>{v(X=>Math.min(X,Math.max(q.length-1,0)))},[q.length]),d.useEffect(()=>{const X=A.current,re=X==null?void 0:X.querySelector(`[id="${D}-option-${le}"]`);if(!X||!re)return;const ce=X.getBoundingClientRect(),pe=re.getBoundingClientRect();pe.top<ce.top?X.scrollTop+=pe.top-ce.top:pe.bottom>ce.bottom&&(X.scrollTop+=pe.bottom-ce.bottom)},[le,q,D]);function U(X){var re;o===void 0&&I(X),v(0),(re=A.current)==null||re.scrollTo({top:0}),a==null||a(X)}function L(X){var re;S===void 0&&oe(X),T==null||T(X),v(0),(re=A.current)==null||re.scrollTo({top:0})}function M(){L(Q),i==null||i()}function K(X){if(q.length&&(X.key==="ArrowDown"&&(X.preventDefault(),v(re=>(re+1)%q.length)),X.key==="ArrowUp"&&(X.preventDefault(),v(re=>(re-1+q.length)%q.length)),X.key==="Enter")){X.preventDefault();const re=q[le];(re==null?void 0:re.kind)==="result"&&(r==null||r(re.item)),(re==null?void 0:re.kind)==="show-more"&&(l==null||l(re.group))}}let ae=-1;return e.jsxs("div",{className:[J.search,C].filter(Boolean).join(" "),role:"combobox","aria-expanded":"true","aria-controls":D,...te,children:[e.jsx(Io,{areas:g,area:B,onAreaChange:L,value:P,onChange:X=>U(X.target.value),onKeyDown:K,onClear:()=>U(""),depth:B&&B!==Q?"one-down":"default",onBack:M,placeholder:s,loading:z,"aria-label":"Search",role:"searchbox","aria-controls":D,"aria-activedescendant":q.length?`${D}-option-${le}`:void 0}),e.jsx(Dt,{ref:A,size:"thin",direction:"y",className:J.results,maxHeight:"300px",children:e.jsx("div",{id:D,role:"listbox",children:z&&!G.length?e.jsxs("div",{className:J.loading,children:[e.jsx("div",{className:J.skeletonHeading}),Array.from({length:5}).map((X,re)=>e.jsx("div",{className:J.skeletonRow},re))]}):G.length?G.map(X=>{let re=-1;return e.jsxs("div",{className:J.group,children:[e.jsx("div",{className:J.groupLabel,role:"presentation",children:X.label}),X.items.map(ce=>{ae+=1;const pe=ae;return e.jsx(hn,{id:`${D}-option-${pe}`,type:ce.type,state:pe===le?"focus":"default",avatar:ce.avatar,thumbnail:ce.thumbnail,icon:ce.icon,label:ce.label,description:ce.description,subtext:ce.meta,badge:ce.badge,shortcut:ce.shortcut,thenLabel:k,onMouseEnter:()=>v(pe),onClick:()=>r==null?void 0:r(ce)},ce.id)}),X.hasMore&&l&&(ae+=1,re=ae,e.jsx(hn,{id:`${D}-option-${re}`,type:"show-more",state:re===le?"focus":"default",label:ee,onMouseEnter:()=>v(re),onClick:()=>l(X)}))]},X.label)}):u!=null&&typeof u!="string"?e.jsx("div",{className:J.emptyBox,children:u}):e.jsx(wo,{icon:_,title:typeof u=="string"?u:P.trim()?N:p,description:P.trim()?b:x,actionLabel:m,actionIcon:h,onAction:f&&(()=>f(P)),height:"auto",className:J.empty})})}),c!==null&&(c??e.jsxs("div",{className:J.footer,children:[e.jsxs("div",{className:J.footerGroup,children:[e.jsx("span",{className:J.footerLabel,children:Y}),e.jsxs("div",{className:J.footerKeys,children:[e.jsx(mt,{children:"β"}),e.jsx(mt,{children:"β"})]})]}),e.jsx("div",{className:J.footerDivider}),e.jsxs("div",{className:J.footerGroup,children:[e.jsx("span",{className:J.footerLabel,children:$}),e.jsx(mt,{children:"β΅"})]})]}))]})}function Cf({open:t,onOpenChange:s,title:n="Search",description:o="Search commands, navigation and records.",closeOnSelect:a=!0,onSelect:r,...l}){const i=d.useRef(null),c=d.useRef(null),u=d.useRef(null),_=d.useId(),m=d.useId(),[h,f]=d.useState(t);if(t&&!h&&f(!0),hs(h),d.useEffect(()=>{if(t||!h)return;const x=[i.current,c.current].flatMap(b=>{var z;return((z=b==null?void 0:b.getAnimations)==null?void 0:z.call(b))??[]});if(!x.length){f(!1);return}let N=!1;return Promise.all(x.map(b=>b.finished)).then(()=>{N||f(!1)},()=>{}),()=>{N=!0}},[t,h]),d.useEffect(()=>{if(h)return;const x=u.current;u.current=null;const N=!document.activeElement||document.activeElement===document.body;x!=null&&x.isConnected&&N&&x.focus()},[h]),d.useEffect(()=>{var z;if(!t)return;const x=document.activeElement;(z=c.current)!=null&&z.contains(x)||(u.current=x);const N=requestAnimationFrame(()=>{var g,S;return(S=(g=c.current)==null?void 0:g.querySelector('input[type="search"]'))==null?void 0:S.focus()});function b(g){if(g.key==="Escape"&&s(!1),g.key!=="Tab"||!c.current)return;const S=Array.from(c.current.querySelectorAll('button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])'));if(!S.length)return;const w=S[0],T=S[S.length-1];g.shiftKey&&document.activeElement===w&&(g.preventDefault(),T.focus()),!g.shiftKey&&document.activeElement===T&&(g.preventDefault(),w.focus())}return document.addEventListener("keydown",b),()=>{cancelAnimationFrame(N),document.removeEventListener("keydown",b)}},[t,s]),!h)return null;const p=t?"open":"closed";return pt.createPortal(e.jsx("div",{ref:i,className:J.overlay,"data-state":p,onMouseDown:x=>{t&&x.target===x.currentTarget&&s(!1)},children:e.jsxs("div",{ref:c,className:J.dialog,"data-state":p,role:"dialog","aria-modal":"true","aria-labelledby":_,"aria-describedby":m,children:[e.jsx("h2",{id:_,className:J.srOnly,children:n}),e.jsx("p",{id:m,className:J.srOnly,children:o}),e.jsx(zo,{...l,onSelect:x=>{r==null||r(x),a&&s(!1)}})]})}),document.body)}function Tf(t,s=!0){d.useEffect(()=>{if(!s)return;function n(o){o.key.toLowerCase()==="k"&&(o.metaKey||o.ctrlKey)&&(o.preventDefault(),t(!0))}return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[s,t])}const Df="_root_ngc1v_1",Mf="_img_ngc1v_11",Rf="_xsmall_ngc1v_19",Ef="_small_ngc1v_20",Lf="_base_ngc1v_21",Af="_large_ngc1v_22",qf="_xlarge_ngc1v_23",en={root:Df,img:Mf,xsmall:Rf,small:Ef,base:Lf,large:Af,xlarge:qf},Ff="https://cdn.nevu.to/flags";function Pf({country:t,size:s="base",className:n}){const o=t.toUpperCase();return e.jsx("span",{className:[en.root,en[s],n].filter(Boolean).join(" "),children:e.jsx("img",{src:`${Ff}/${o}.svg`,alt:o,loading:"lazy",className:en.img,onError:a=>{a.currentTarget.style.display="none"}})})}const Of="_root_usrbs_1",Wf="_item_usrbs_9",Hf="_muted_usrbs_21",Gf="_subtle_usrbs_25",Uf="_link_usrbs_30",Vf="_label_usrbs_36",Kf="_separator_usrbs_57",Yf="_current_usrbs_69",Ve={root:Of,item:Wf,muted:Hf,subtle:Gf,link:Uf,label:Vf,separator:Kf,current:Yf};function So(){return e.jsx("span",{className:Ve.separator,children:e.jsx(j.CaretRightIcon,{size:14,strokeWidth:1.5})})}function Xf({children:t,href:s,color:n="muted",className:o,...a}){const r=[Ve.item,Ve[n],o].filter(Boolean).join(" ");return e.jsxs("span",{className:r,...a,children:[s?e.jsx("a",{href:s,className:Ve.link,children:t}):e.jsx("span",{className:Ve.label,children:t}),e.jsx(So,{})]})}function Zf({items:t,color:s="muted",className:n}){return e.jsx("nav",{className:[Ve.root,Ve[s],n].filter(Boolean).join(" "),"aria-label":"breadcrumb",children:t.map((o,a)=>{const r=a===t.length-1;return e.jsxs("span",{className:[Ve.item,r&&Ve.current].filter(Boolean).join(" "),children:[o.href&&!r?e.jsx("a",{href:o.href,onClick:o.onClick,className:Ve.link,children:o.label}):e.jsx("span",{className:Ve.label,children:o.label}),!r&&e.jsx(So,{})]},a)})})}const Jf="_root_b9xiu_1",Qf="_hover_b9xiu_19",eh="_selected_b9xiu_24",th="_disabled_b9xiu_29",sh="_highlighted_b9xiu_35",nh="_highlightedHover_b9xiu_40",oh="_focus_b9xiu_45",ah="_highlightedFocus_b9xiu_53",rh="_outside_b9xiu_63",lh="_rangeStart_b9xiu_69",ih="_inRange_b9xiu_75",ch="_rangeEnd_b9xiu_81",dh="_label_b9xiu_88",uh="_dot_b9xiu_95",_h="_dotInverted_b9xiu_106",ls={root:Jf,hover:Qf,selected:eh,disabled:th,highlighted:sh,highlightedHover:nh,focus:oh,highlightedFocus:ah,outside:rh,rangeStart:lh,inRange:ih,rangeEnd:ch,label:dh,dot:uh,dotInverted:_h};function Bo({day:t,state:s="default",today:n=!1,marker:o=!1,onClick:a,onMouseEnter:r,onMouseLeave:l,className:i}){const c=s.replace(/-([a-z])/g,(f,p)=>p.toUpperCase()),u=ls[c],_=[ls.root,u,i].filter(Boolean).join(" "),m=n||o,h=s==="selected"||s==="range-start"||s==="range-end";return e.jsxs("button",{type:"button",className:_,onClick:a,onMouseEnter:r,onMouseLeave:l,disabled:s==="disabled",children:[e.jsx("span",{className:ls.label,children:t}),m&&e.jsx("span",{className:[ls.dot,h?ls.dotInverted:""].filter(Boolean).join(" ")})]})}const mh="_root_28ykl_1",fh={root:mh};function Co({label:t,className:s}){return e.jsx("span",{className:[fh.root,s].filter(Boolean).join(" "),children:t})}const hh="_root_1c3s6_1",ph="_arrow_1c3s6_21",xh="_label_1c3s6_39",vs={root:hh,arrow:ph,label:xh};function To({label:t,onPrev:s,onNext:n,className:o}){return e.jsxs("div",{className:[vs.root,o].filter(Boolean).join(" "),children:[e.jsx("button",{type:"button",className:vs.arrow,onClick:s,"aria-label":"Previous month",children:e.jsx(j.CaretLeftIcon,{size:16})}),e.jsx("span",{className:vs.label,children:t}),e.jsx("button",{type:"button",className:vs.arrow,onClick:n,"aria-label":"Next month",children:e.jsx(j.CaretRightIcon,{size:16})})]})}const gh=["January","February","March","April","May","June","July","August","September","October","November","December"],bh=["M","T","W","T","F","S","S"];function jh(t,s){return!t||!s?!1:t.getFullYear()===s.getFullYear()&&t.getMonth()===s.getMonth()&&t.getDate()===s.getDate()}function vh(t){return jh(t,new Date)}function ys(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate())}function tn(t,s){return new Date(t.getFullYear(),t.getMonth()+s,1)}function yh(t,s){const o=new Date(t,s,1).getDay(),a=o===0?6:o-1,r=new Date(t,s,1-a);return Array.from({length:42},(l,i)=>new Date(r.getFullYear(),r.getMonth(),r.getDate()+i))}const Nh="_root_vn4gz_1",$h="_selector_vn4gz_8",wh="_grid_vn4gz_12",sn={root:Nh,selector:$h,grid:wh};function kh(t,s,n,o,a,r){if(t.getMonth()!==s)return"outside";const l=ys(t).getTime(),i=n?ys(n).getTime():null,u=(o?ys(o).getTime():null)??(r==="end"&&a?ys(a).getTime():null);return i!==null&&l===i?u!==null&&u>i?"range-start":"selected":u!==null&&i!==null&&l===u&&u>i?"range-end":i!==null&&u!==null&&l>i&&l<u?"in-range":"default"}function As({year:t,month:s,selectedStart:n,selectedEnd:o,hoverDate:a,selectionPhase:r="start",onDayClick:l,onDayHover:i,onPrevMonth:c,onNextMonth:u,className:_}){const m=yh(t,s),h=`${gh[s]} ${t}`;return e.jsxs("div",{className:[sn.root,_].filter(Boolean).join(" "),children:[e.jsx(To,{label:h,onPrev:c,onNext:u,className:sn.selector}),e.jsxs("div",{className:sn.grid,children:[bh.map((f,p)=>e.jsx(Co,{label:f},p)),m.map((f,p)=>{const x=kh(f,s,n,o,a,r),N=vh(f)&&x!=="outside";return e.jsx(Bo,{day:f.getDate(),state:x,today:N,onClick:x==="outside"?void 0:()=>l==null?void 0:l(f),onMouseEnter:x!=="outside"?()=>i==null?void 0:i(f):void 0,onMouseLeave:()=>i==null?void 0:i(null)},p)})]})]})}const Ih="_root_kf3hs_1",zh="_sidebar_kf3hs_11",Sh="_body_kf3hs_22",Bh="_calendars_kf3hs_30",Ch="_divider_kf3hs_37",Th="_footer_kf3hs_47",Dh="_footerCol_kf3hs_55",Mh="_footerGap_kf3hs_64",Ge={root:Ih,sidebar:zh,body:Sh,calendars:Bh,divider:Ch,footer:Th,footerCol:Dh,footerGap:Mh};function pn({variant:t="single",value:s,onChange:n,startDate:o,endDate:a,onRangeChange:r,defaultValue:l,defaultStartDate:i,defaultEndDate:c,defaultMonth:u,sidebar:_,footer:m,footerStart:h,footerEnd:f,className:p}){const x=o!==void 0||a!==void 0,N=s!==void 0,[b,z]=d.useState(i??null),[g,S]=d.useState(c??null),[w,T]=d.useState(l??null),[R,H]=d.useState(null),[Q,ee]=d.useState("start"),Y=u??new Date,[$,k]=d.useState(new Date(Y.getFullYear(),Y.getMonth(),1)),C=x?o??null:b,te=x?a??null:g,V=N?s??null:w;function ne(){k(U=>tn(U,-1))}function I(){k(U=>tn(U,1))}function F(U){N||T(U),n==null||n(U)}function oe(U){if(Q==="start"||!C){x||(z(U),S(null)),r==null||r(U,null),ee("end");return}const L=C.getTime();U.getTime()>=L?(x||S(U),r==null||r(C,U),ee("start")):(x||(z(U),S(null)),r==null||r(U,null))}const le=$.getMonth(),v=$.getFullYear(),D=tn($,1),A=D.getMonth(),P=D.getFullYear(),B=_!=null,G=t==="range"&&(h!=null||f!=null),q=t==="single"&&m!=null;return e.jsxs("div",{className:[Ge.root,p].filter(Boolean).join(" "),children:[B&&e.jsx("aside",{className:Ge.sidebar,children:_}),e.jsxs("div",{className:Ge.body,children:[e.jsx("div",{className:Ge.calendars,children:t==="single"?e.jsx(As,{year:v,month:le,selectedStart:V,onDayClick:F,onPrevMonth:ne,onNextMonth:I}):e.jsxs(e.Fragment,{children:[e.jsx(As,{year:v,month:le,selectedStart:C,selectedEnd:te,hoverDate:R,selectionPhase:Q,onDayClick:oe,onDayHover:H,onPrevMonth:ne,onNextMonth:I}),e.jsx("div",{className:Ge.divider}),e.jsx(As,{year:P,month:A,selectedStart:C,selectedEnd:te,hoverDate:R,selectionPhase:Q,onDayClick:oe,onDayHover:H,onPrevMonth:ne,onNextMonth:I})]})}),G&&e.jsxs("div",{className:Ge.footer,children:[e.jsx("div",{className:Ge.footerCol,children:h}),e.jsx("div",{className:Ge.footerGap}),e.jsx("div",{className:Ge.footerCol,children:f})]}),q&&e.jsx("div",{className:Ge.footer,children:e.jsx("div",{className:Ge.footerCol,children:m})})]})]})}const Rh="_field_oo6ph_1",Eh="_root_oo6ph_8",Lh="_icon_oo6ph_24",nn={field:Rh,root:Eh,icon:Lh};function on({className:t,...s}){return e.jsxs("span",{className:nn.field,children:[e.jsx("input",{type:"time",...s,className:[nn.root,t].filter(Boolean).join(" ")}),e.jsx(j.ClockIcon,{className:nn.icon,size:16,"aria-hidden":!0})]})}const Ah="_root_1whgf_1",qh="_hover_1whgf_20",Fh="_selected_1whgf_25",Ph="_focus_1whgf_30",Pn={root:Ah,hover:qh,selected:Fh,focus:Ph};function Do({label:t,state:s="default",onClick:n,className:o}){const a=[Pn.root,s!=="default"&&Pn[s],o].filter(Boolean).join(" ");return e.jsx("button",{type:"button",className:a,onClick:n,children:t})}const Oh="_wrapper_1ex4u_1",Wh="_input_1ex4u_7",Hh="_footerField_1ex4u_14",Gh="_footerLabel_1ex4u_18",Uh="_dateInput_1ex4u_27",Vh="_timeInput_1ex4u_50",Kh="_presets_1ex4u_75",Me={wrapper:Oh,input:Wh,footerField:Hh,footerLabel:Gh,dateInput:Uh,timeInput:Vh,presets:Kh};function Ze(t){return String(t).padStart(2,"0")}function an(t){return t?`${Ze(t.getHours())}:${Ze(t.getMinutes())}`:null}function rn(t,s){if(!t)return null;const[n,o]=s.split(":").map(Number),a=new Date(t);return a.setHours(n||0,o||0,0,0),a}function Yh(t,s){return t?`${Ze(t.getDate())}/${Ze(t.getMonth()+1)}/${t.getFullYear()} ${s}`:""}function Xh(t,s,n,o){if(!t)return"";const a=`${Ze(t.getDate())}/${Ze(t.getMonth()+1)}/${t.getFullYear()} ${n}`;if(!s)return`${a} - ...`;const r=`${Ze(s.getDate())}/${Ze(s.getMonth()+1)}/${s.getFullYear()} ${o}`;return`${a} - ${r}`}function Zh(t){const s=new Date,n=new Date;return t>0?n.setDate(n.getDate()-t):t===-1?n.setDate(1):t===-2&&(n.setDate(1),n.setMonth(0)),[n,s]}const Jh=[{label:"Today",days:0},{label:"Last 7 days",days:7},{label:"Last 30 days",days:30},{label:"Last 3 months",days:90},{label:"Last 12 months",days:365},{label:"Month to date",days:-1},{label:"Year to date",days:-2}];function Mo({mode:t="single",value:s,onChange:n,startDate:o,endDate:a,onRangeChange:r,disabled:l,className:i,inputWrapClassName:c,...u}){const[_,m]=d.useState(!1),[h,f]=d.useState(null),[p,x]=d.useState(null),[N,b]=d.useState(null),[z,g]=d.useState("12:00"),[S,w]=d.useState("12:00"),[T,R]=d.useState("12:00"),[H,Q]=d.useState(null),ee=s!==void 0,Y=o!==void 0||a!==void 0,$=ee?s??null:h,k=Y?o??null:p,C=Y?a??null:N,te=an($)??z,V=an(k)??S,ne=an(C)??T;function I(q,U=te){const L=rn(q,U);ee||f(L),n==null||n(L)}function F(q,U,L={}){const M=rn(q,L.start??V),K=rn(U,L.end??ne);Y||(x(M),b(K)),M&&K&&Q(null),r==null||r(M,K)}function oe(q){g(q),$&&I($,q)}function le(q){w(q),k&&F(k,C,{start:q})}function v(q){R(q),C&&F(k,C,{end:q})}function D(q){q.stopPropagation(),t==="single"?I(null):(F(null,null),Q(null))}const A=t==="single"?!!$:!!k,P=t==="single"?"DD/MM/YYYY HH:MM":"DD/MM/YYYY HH:MM - DD/MM/YYYY HH:MM",B=t==="single"?Yh($,te):Xh(k,C,V,ne),G=q=>q?`${q.getFullYear()}-${Ze(q.getMonth()+1)}-${Ze(q.getDate())}`:"";return e.jsx("div",{className:[Me.wrapper,i].filter(Boolean).join(" "),children:e.jsx(Ee,{open:_,onOpenChange:q=>!l&&m(q),placement:"bottom-start",offset:4,bare:!0,trigger:e.jsx(Ke,{readOnly:!0,value:B,placeholder:P,leftIcon:e.jsx(j.CalendarIcon,{size:16}),rightIcon:A?e.jsx(No,{onClick:D}):void 0,leftIconDivider:!0,disabled:l,className:[Me.input,c].filter(Boolean).join(" "),...u}),children:t==="single"?e.jsx(pn,{variant:"single",value:$,onChange:q=>{I(q),q&&m(!1)},footer:e.jsxs("div",{className:Me.footerField,children:[e.jsx("input",{type:"date",value:G($),onChange:q=>{const U=q.target.value;I(U?new Date(U+"T00:00:00"):null)},className:Me.dateInput}),e.jsx(on,{value:te,onChange:q=>oe(q.target.value),className:Me.timeInput})]})}):e.jsx(pn,{variant:"range",startDate:k,endDate:C,onRangeChange:F,sidebar:e.jsx("div",{className:Me.presets,children:Jh.map(q=>e.jsx(Do,{label:q.label,state:H===q.label?"selected":"default",onClick:()=>{const[U,L]=Zh(q.days);Q(q.label),F(U,L)}},q.label))}),footerStart:e.jsxs("div",{className:Me.footerField,children:[e.jsx("span",{className:Me.footerLabel,children:"Start"}),e.jsx("input",{type:"date",value:G(k),onChange:q=>{const U=q.target.value;F(U?new Date(U+"T00:00:00"):null,C)},className:Me.dateInput}),e.jsx(on,{value:V,onChange:q=>le(q.target.value),className:Me.timeInput})]}),footerEnd:e.jsxs("div",{className:Me.footerField,children:[e.jsx("span",{className:Me.footerLabel,children:"End"}),e.jsx("input",{type:"date",value:G(C),onChange:q=>{const U=q.target.value;F(k,U?new Date(U+"T00:00:00"):null)},className:Me.dateInput}),e.jsx(on,{value:ne,onChange:q=>v(q.target.value),className:Me.timeInput})]})})})})}const Qh="_menu_11wa6_1",ep="_header_11wa6_14",tp="_items_11wa6_21",sp="_footer_11wa6_30",Ns={menu:Qh,header:ep,items:tp,footer:sp};function Nn({children:t,emptyState:s,header:n,footer:o,className:a,style:r}){const l=!!t&&(Array.isArray(t)?t.length>0:!0);return e.jsxs("div",{className:[Ns.menu,a].filter(Boolean).join(" "),style:r,role:"menu",children:[n&&e.jsx("div",{className:Ns.header,children:n}),e.jsx(Dt,{size:"thin",maxHeight:"280px",className:Ns.items,children:l?t:s}),o&&e.jsx("div",{className:Ns.footer,children:o})]})}const np="_item_8ylz7_1",op="_selected_8ylz7_24",ap="_label_8ylz7_24",rp="_disabled_8ylz7_28",lp="_forceHover_8ylz7_35",ip="_icon_8ylz7_56",cp="_leftIcon_8ylz7_72",dp="_count_8ylz7_96",up="_badge_8ylz7_109",ot={item:np,selected:op,label:ap,disabled:rp,forceHover:lp,icon:ip,leftIcon:cp,count:dp,badge:up};function $n({label:t,labelNode:s,mode:n="single",selected:o=!1,disabled:a=!1,forceHover:r=!1,leftIcon:l,count:i,badge:c,onClick:u}){return e.jsxs("button",{type:"button",role:n==="multi"?"menuitemcheckbox":"menuitemradio","aria-checked":o,disabled:a,onClick:u,className:[ot.item,o?ot.selected:"",a?ot.disabled:"",r?ot.forceHover:""].filter(Boolean).join(" "),children:[e.jsx("span",{className:ot.icon,children:o&&e.jsx(j.CheckIcon,{size:15})}),l&&e.jsx("span",{className:ot.leftIcon,children:l}),e.jsx("span",{className:ot.label,children:s??t}),i!==void 0&&e.jsx("span",{className:ot.count,children:i}),c&&e.jsx("span",{className:ot.badge,children:c})]})}const _p="_wrapper_jx5no_1",mp="_trigger_jx5no_8",fp="_triggerInput_jx5no_14",hp="_nativeWrap_jx5no_21",pp="_base_jx5no_32",xp="_sm_jx5no_33",gp="_white_jx5no_35",bp="_gray_jx5no_36",jp="_nativeDisabled_jx5no_38",vp="_nativeError_jx5no_45",yp="_nativeSelect_jx5no_59",Np="_chevron_jx5no_83",$p="_nativePlaceholder_jx5no_91",wp="_chevronSm_jx5no_111",kp="_chevronOpen_jx5no_115",Ip="_rightSlotWrap_jx5no_119",zp="_clearBtn_jx5no_125",Sp="_chips_jx5no_145",ze={wrapper:_p,trigger:mp,triggerInput:fp,nativeWrap:hp,base:pp,sm:xp,white:gp,gray:bp,nativeDisabled:jp,nativeError:vp,nativeSelect:yp,chevron:Np,nativePlaceholder:$p,chevronSm:wp,chevronOpen:kp,rightSlotWrap:Ip,clearBtn:zp,chips:Sp};function Bp({options:t,mode:s="single",native:n=!1,value:o,onChange:a,defaultValue:r,values:l,onChangeMulti:i,defaultValues:c,placeholder:u="Select",size:_="base",variant:m="white",error:h=!1,disabled:f=!1,emptyState:p,footer:x,className:N,inputWrapClassName:b,id:z,name:g,required:S,form:w,autoComplete:T,"aria-label":R,"aria-describedby":H,"aria-invalid":Q}){var q,U;const[ee,Y]=d.useState(!1),[$,k]=d.useState(r??null),[C,te]=d.useState(c??[]),V=o!==void 0,ne=l!==void 0,I=V?o??null:$,F=ne?l??[]:C,oe=d.useRef(null);function le(L){I!==L&&(V||k(L),a==null||a(L)),Y(!1)}function v(L){const M=F.includes(L)?F.filter(K=>K!==L):[...F,L];ne||te(M),i==null||i(M)}function D(L){L.stopPropagation(),ne||te([]),i==null||i([])}const A=s==="multi"&&F.length>0,P=s==="single"?((q=t.find(L=>L.value===I))==null?void 0:q.label)??"":"",B=e.jsx("div",{className:[ze.chevron,_==="sm"?ze.chevronSm:"",ee?ze.chevronOpen:""].filter(Boolean).join(" "),children:e.jsx(j.CaretUpDownIcon,{size:15})}),G=e.jsxs("div",{className:ze.rightSlotWrap,children:[A&&!f&&e.jsx("button",{type:"button",className:ze.clearBtn,onClick:D,tabIndex:-1,children:e.jsx(j.CloseIcon,{size:10})}),B]});return n&&s==="single"?e.jsx("div",{className:[ze.wrapper,N].filter(Boolean).join(" "),children:e.jsxs("div",{className:[ze.nativeWrap,ze[_],ze[m],h||Q===!0?ze.nativeError:"",f?ze.nativeDisabled:"",b].filter(Boolean).join(" "),children:[e.jsxs("select",{id:z,name:g,required:S,form:w,autoComplete:T,value:I??"",disabled:f,className:[ze.nativeSelect,I===null?ze.nativePlaceholder:""].filter(Boolean).join(" "),"aria-label":R,"aria-describedby":H,"aria-invalid":Q??(h||void 0),onChange:L=>le(L.target.value),children:[e.jsx("option",{value:"",disabled:!0,children:u}),t.map(L=>e.jsx("option",{value:L.value,disabled:L.disabled,children:L.label},L.value))]}),B]})}):e.jsxs("div",{ref:oe,className:[ze.wrapper,N].filter(Boolean).join(" "),children:[e.jsx(Ee,{open:ee,onOpenChange:L=>!f&&Y(L),placement:"bottom-start",offset:8,bare:!0,trigger:e.jsx(Ke,{id:z,readOnly:!0,value:P,placeholder:s==="multi"&&F.length>0?`${F.length} selected`:u,rightSlot:G,size:_,variant:m,error:h,disabled:f,className:[ze.trigger,b].filter(Boolean).join(" "),inputClassName:ze.triggerInput,role:"combobox","aria-label":R,"aria-expanded":ee,"aria-haspopup":"listbox","aria-describedby":H,"aria-invalid":Q}),children:e.jsx(Nn,{emptyState:p,footer:x,style:{minWidth:(U=oe.current)==null?void 0:U.offsetWidth},children:t.length===0?null:t.map(L=>e.jsx($n,{label:L.label,labelNode:L.labelNode,mode:s,selected:s==="single"?I===L.value:F.includes(L.value),disabled:L.disabled,leftIcon:L.leftIcon,onClick:()=>{s==="single"?le(L.value):v(L.value)}},L.value))})}),s==="multi"&&F.length>0&&e.jsx("div",{className:ze.chips,onClick:L=>L.stopPropagation(),children:F.map(L=>{const M=t.find(K=>K.value===L);return M?e.jsx(ps,{label:M.label,size:_==="sm"?"2xs":"xs",shape:"rounded",leftIcon:M.leftIcon,removable:!f,onRemove:()=>v(L)},L):null})})]})}const Cp="_title_8luao_1",Tp={title:Cp};function Dp({children:t,className:s}){return e.jsx("div",{className:[Tp.title,s].filter(Boolean).join(" "),children:t})}const Mp="_wrap_ft3z8_1",Rp="_input_ft3z8_10",Ep="_clearBtn_ft3z8_28",ln={wrap:Mp,input:Rp,clearBtn:Ep};function Lp({value:t,defaultValue:s,onChange:n,placeholder:o="Search options",inputRef:a,className:r,style:l}){const i=t!==void 0,[c,u]=d.useState(s??""),_=i?t??"":c;function m(f){i||u(f.target.value),n==null||n(f.target.value)}function h(){i||u(""),n==null||n("")}return e.jsxs("div",{className:[ln.wrap,r].filter(Boolean).join(" "),style:l,children:[e.jsx("input",{ref:a,className:ln.input,placeholder:o,value:_,onChange:m}),_&&e.jsx("button",{type:"button",className:ln.clearBtn,onClick:h,tabIndex:-1,"aria-label":"Clear search",children:e.jsx(j.CloseIcon,{size:10})})]})}const Ap="_wrapper_1bd4v_1",qp="_chips_1bd4v_6",Fp="_chevron_1bd4v_15",Pp="_chevronSm_1bd4v_26",Op="_chevronOpen_1bd4v_30",Wp="_rightSlotWrap_1bd4v_36",Hp="_clearBtn_1bd4v_42",Gp="_emptyState_1bd4v_62",yt={wrapper:Ap,chips:qp,chevron:Fp,chevronSm:Pp,chevronOpen:Op,rightSlotWrap:Wp,clearBtn:Hp,emptyState:Gp};function Up({options:t,mode:s="single",value:n,onChange:o,defaultValue:a,values:r,onChangeMulti:l,defaultValues:i,placeholder:c="Searchβ¦",size:u="base",variant:_="white",error:m=!1,disabled:h=!1,emptyState:f,className:p,inputWrapClassName:x}){var L;const N=n!==void 0,b=r!==void 0,z=t.find(M=>M.value===(N?n:a)),[g,S]=d.useState(a??null),[w,T]=d.useState(i??[]),[R,H]=d.useState((z==null?void 0:z.label)??""),[Q,ee]=d.useState(!1),[Y,$]=d.useState(-1),k=N?n??null:g,C=b?r??[]:w,te=d.useRef(null),V=d.useRef(null);d.useEffect(()=>{if(!N||s!=="single")return;const M=t.find(K=>K.value===n);H((M==null?void 0:M.label)??"")},[n,N,t,s]);const ne=t.filter(M=>M.label.toLowerCase().includes(R.toLowerCase()));function I(M){M.disabled||(H(M.label),N||S(M.value),o==null||o(M.value),ee(!1),$(-1))}function F(M){if(M.disabled)return;const K=C.includes(M.value)?C.filter(ae=>ae!==M.value):[...C,M.value];b||T(K),l==null||l(K),H(""),$(-1)}function oe(M){const K=C.filter(ae=>ae!==M);b||T(K),l==null||l(K)}function le(M){var K;M.stopPropagation(),H(""),s==="single"?(N||S(null),o==null||o(null)):(b||T([]),l==null||l([])),ee(!1),(K=V.current)==null||K.focus()}function v(){if(s==="single"){const M=t.find(K=>K.value===k);H((M==null?void 0:M.label)??"")}else H("");ee(!1),$(-1)}function D(M){h||(M?ee(!0):v())}function A(M){const K=M.target.value;H(K),ee(!0),$(-1),K===""&&s==="single"&&(N||S(null),o==null||o(null))}function P(M){if(!Q){(M.key==="ArrowDown"||M.key==="ArrowUp")&&(ee(!0),$(0),M.preventDefault());return}if(M.key==="ArrowDown")M.preventDefault(),$(K=>K+1<ne.length?K+1:0);else if(M.key==="ArrowUp")M.preventDefault(),$(K=>K-1<0?ne.length-1:K-1);else if(M.key==="Enter"){M.preventDefault();const K=ne[Y];K&&!K.disabled&&(s==="single"?I(K):F(K))}else M.key==="Escape"&&v()}const B=s==="single"?k!=null:C.length>0,G=f??e.jsx("div",{className:yt.emptyState,children:"No results found."}),q=e.jsx("div",{className:[yt.chevron,u==="sm"?yt.chevronSm:"",Q?yt.chevronOpen:""].filter(Boolean).join(" "),children:e.jsx(j.CaretUpDownIcon,{size:15})}),U=e.jsxs("div",{className:yt.rightSlotWrap,children:[B&&!h&&e.jsx("button",{type:"button",className:yt.clearBtn,onClick:le,tabIndex:-1,children:e.jsx(j.CloseIcon,{size:10})}),q]});return e.jsxs("div",{ref:te,className:[yt.wrapper,p].filter(Boolean).join(" "),children:[e.jsx(Ee,{open:Q,onOpenChange:D,placement:"bottom-start",offset:4,bare:!0,trigger:e.jsx(Ke,{ref:V,value:R,placeholder:c,rightSlot:U,size:u,variant:_,error:m,disabled:h,autoComplete:"off",onChange:A,onFocus:()=>ee(!0),onKeyDown:P,onClick:M=>M.stopPropagation(),className:x}),children:e.jsx(Nn,{emptyState:G,style:{minWidth:(L=te.current)==null?void 0:L.offsetWidth},children:ne.map((M,K)=>e.jsx($n,{label:M.label,mode:s,selected:s==="single"?k===M.value:C.includes(M.value),disabled:M.disabled,forceHover:K===Y,leftIcon:M.leftIcon,onClick:()=>s==="single"?I(M):F(M)},M.value))})}),s==="multi"&&C.length>0&&e.jsx("div",{className:yt.chips,onClick:M=>M.stopPropagation(),children:C.map(M=>{const K=t.find(ae=>ae.value===M);return K?e.jsx(ps,{label:K.label,size:u==="sm"?"2xs":"xs",shape:"rounded",leftIcon:K.leftIcon,removable:!h,onRemove:()=>oe(M)},M):null})})]})}const Vp="_wrapper_165ts_1",Kp="_chips_165ts_7",Yp="_addBtn_165ts_14",cn={wrapper:Vp,chips:Kp,addBtn:Yp};function Xp({value:t,defaultValue:s,onChange:n,placeholder:o="Type and press Enterβ¦",validate:a,size:r="base",variant:l="white",error:i=!1,disabled:c=!1,loading:u=!1,keepPlaceholder:_=!1,className:m,inputWrapClassName:h}){const[f=[],p]=Zn({value:t,defaultValue:s,onChange:n}),[x,N]=d.useState(""),b=d.useRef(null);function z(w){const T=w.trim();T&&(f.includes(T)||a&&!a(T)||(p([...f,T]),N("")))}function g(w){p(f.filter(T=>T!==w))}function S(w){w.key==="Enter"&&(w.preventDefault(),z(x)),w.key==="Backspace"&&x===""&&f.length>0&&g(f[f.length-1])}return e.jsxs("div",{className:[cn.wrapper,m].filter(Boolean).join(" "),onClick:()=>{var w;return!c&&((w=b.current)==null?void 0:w.focus())},children:[e.jsx(Ke,{ref:b,value:x,onChange:w=>N(w.target.value),onKeyDown:S,placeholder:_||f.length===0?o:"",size:r,variant:l,error:i,disabled:c,autoComplete:"off",className:h,rightIcon:e.jsx("button",{type:"button",className:cn.addBtn,onClick:()=>z(x),tabIndex:-1,"aria-label":"Add tag",disabled:c||u,children:u?e.jsx(Tt,{size:"xs"}):e.jsx(j.PlusIcon,{size:15})})}),f.length>0&&e.jsx("div",{className:cn.chips,children:f.map(w=>e.jsx(ps,{label:w,size:r==="sm"?"2xs":"xs",shape:"rounded",removable:!c,onRemove:()=>g(w)},w))})]})}const Zp="_tree_1s0qa_1",Jp="_item_1s0qa_13",Qp="_disabled_1s0qa_34",ex="_selected_1s0qa_36",tx="_label_1s0qa_36",sx="_indent_1s0qa_38",nx="_connector_1s0qa_39",ox="_control_1s0qa_50",ax="_expand_1s0qa_51",rx="_expandOpen_1s0qa_67",lx="_expandHidden_1s0qa_68",ix="_leftIcon_1s0qa_69",Oe={tree:Zp,item:Jp,disabled:Qp,selected:ex,label:tx,indent:sx,connector:nx,control:ox,expand:ax,expandOpen:rx,expandHidden:lx,leftIcon:ix},qs=t=>(t.children??[]).flatMap(s=>[s.id,...qs(s)]);function xn(t,s,n=1,o){return t.flatMap(a=>{var r;return[{node:a,level:n,parentId:o},...(r=a.children)!=null&&r.length&&s.has(a.id)?xn(a.children,s,n+1,a.id):[]]})}const Ro=d.forwardRef(function({id:s,label:n,type:o="check",level:a=1,selected:r=!1,indeterminate:l=!1,expanded:i=!1,hasChildren:c=!1,leftIcon:u,disabled:_=!1,tabIndex:m=-1,setSize:h,positionInSet:f,onSelect:p,onExpand:x,onKeyDown:N},b){return e.jsxs("div",{ref:b,id:s,role:"treeitem","aria-level":a,"aria-setsize":h,"aria-posinset":f,"aria-selected":r,"aria-checked":o==="check"?l?"mixed":r:void 0,"aria-expanded":c?i:void 0,"aria-disabled":_||void 0,tabIndex:_?-1:m,onClick:_?void 0:p,onKeyDown:N,className:[Oe.item,r&&Oe.selected,_&&Oe.disabled].filter(Boolean).join(" "),children:[e.jsx("span",{className:Oe.indent,style:{"--tree-level":a},"aria-hidden":!0,children:Array.from({length:a-1},(z,g)=>e.jsx("span",{className:Oe.connector},g))}),e.jsx("span",{className:Oe.control,"aria-hidden":!0,children:o==="radio"?e.jsx(yo,{checked:r,disabled:_,tabIndex:-1}):e.jsx(xs,{checked:r,indeterminate:l,disabled:_,tabIndex:-1})}),e.jsx("button",{type:"button",className:[Oe.expand,i&&Oe.expandOpen,!c&&Oe.expandHidden].filter(Boolean).join(" "),tabIndex:-1,"aria-label":i?"Collapse":"Expand",disabled:_||!c,onClick:z=>{z.stopPropagation(),x==null||x()},children:e.jsx(j.CaretRightIcon,{size:12})}),u&&e.jsx("span",{className:Oe.leftIcon,"aria-hidden":!0,children:u}),e.jsx("span",{className:Oe.label,children:n})]})});function cx({items:t,selectionMode:s="multiple",value:n,defaultValue:o=[],onValueChange:a,expandedValue:r,defaultExpandedValue:l=[],onExpandedValueChange:i,disabled:c=!1,ariaLabel:u="Tree select",className:_,...m}){var ne;const[h,f]=d.useState(o),[p,x]=d.useState(l),N=n??h,b=r??p,z=d.useMemo(()=>new Set(N),[N]),g=d.useMemo(()=>new Set(b),[b]),S=d.useMemo(()=>xn(t,g),[t,g]),w=d.useMemo(()=>new Set(t.flatMap(I=>[I.id,...qs(I)])),[t]),T=d.useMemo(()=>new Map(xn(t,w).map(I=>[I.node.id,I.node])),[t,w]),R=d.useRef(new Map),H=(ne=S.find(({node:I})=>!I.disabled))==null?void 0:ne.node.id,[Q,ee]=d.useState(H);d.useEffect(()=>{S.some(({node:I})=>I.id===Q&&!I.disabled)||ee(H)},[Q,H,S]);const Y=I=>{n===void 0&&f(I),a==null||a(I)},$=I=>{r===void 0&&x(I),i==null||i(I)},k=I=>{if(c||I.disabled)return;if(s==="single")return Y(z.has(I.id)?[]:[I.id]);const F=qs(I),oe=[I.id,...F],le=F.length?!F.every(D=>z.has(D)):!z.has(I.id),v=new Set(N);oe.forEach(D=>le?v.add(D):v.delete(D)),Y([...v])},C=(I,F)=>{const oe=new Set(b);F??!oe.has(I)?oe.add(I):oe.delete(I),$([...oe])},te=I=>{var F;ee(I),(F=R.current.get(I))==null||F.focus()},V=(I,F,oe)=>{var le,v,D,A;if(I.key==="ArrowDown"||I.key==="ArrowUp"){I.preventDefault();const P=I.key==="ArrowDown"?1:-1;let B=oe+P;for(;(le=S[B])!=null&&le.node.disabled;)B+=P;S[B]&&te(S[B].node.id)}else if(I.key==="ArrowRight")I.preventDefault(),(v=F.node.children)!=null&&v.length&&!g.has(F.node.id)?C(F.node.id,!0):(D=F.node.children)!=null&&D.length&&te(F.node.children[0].id);else if(I.key==="ArrowLeft")I.preventDefault(),(A=F.node.children)!=null&&A.length&&g.has(F.node.id)?C(F.node.id,!1):F.parentId&&te(F.parentId);else if(I.key==="Home"||I.key==="End"){I.preventDefault();const P=(I.key==="Home"?S:[...S].reverse()).find(({node:B})=>!B.disabled);P&&te(P.node.id)}else(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),k(F.node))};return e.jsx("div",{role:"tree","aria-label":u,"aria-multiselectable":s==="multiple"||void 0,className:[Oe.tree,_].filter(Boolean).join(" "),...m,children:S.map((I,F)=>{var A,P;const oe=qs(I.node),le=oe.filter(B=>z.has(B)).length,v=z.has(I.node.id)||oe.length>0&&le===oe.length,D=I.parentId?((A=T.get(I.parentId))==null?void 0:A.children)??[]:t;return e.jsx(Ro,{ref:B=>{B?R.current.set(I.node.id,B):R.current.delete(I.node.id)},id:`tree-select-${I.node.id}`,label:I.node.label,leftIcon:I.node.icon,type:s==="single"?"radio":"check",level:I.level,selected:v,indeterminate:!v&&le>0,expanded:g.has(I.node.id),hasChildren:!!((P=I.node.children)!=null&&P.length),disabled:c||I.node.disabled,tabIndex:(Q??H)===I.node.id?0:-1,setSize:D.length,positionInSet:D.findIndex(B=>B.id===I.node.id)+1,onSelect:()=>k(I.node),onExpand:()=>C(I.node.id),onKeyDown:B=>V(B,I,F)},I.node.id)})})}const dx="_card_h4g5m_1",ux="_white_h4g5m_8",_x="_gray_h4g5m_9",mx="_hoverable_h4g5m_17",$s={card:dx,white:ux,gray:_x,"p-sm":"_p-sm_h4g5m_12","p-md":"_p-md_h4g5m_13","p-lg":"_p-lg_h4g5m_14",hoverable:mx};function Eo({variant:t="white",padding:s="md",hoverable:n=!1,as:o="div",className:a,children:r,...l}){return e.jsx(o,{className:[$s.card,$s[t],s!=="none"&&$s[`p-${s}`],n&&$s.hoverable,a].filter(Boolean).join(" "),...l,children:r})}const fx="_root_17x6j_1",hx={root:fx};function px({"aria-label":t,sticky:s=!1,stickyOffset:n,className:o,children:a}){return e.jsx(Eo,{role:"grid","aria-label":t,padding:"none","data-table-sticky":s||void 0,className:[hx.root,o].filter(Boolean).join(" "),style:s&&n!==void 0?{"--table-sticky-top":typeof n=="number"?`${n}px`:n}:void 0,children:a})}const xx="_cell_evy7o_1",gx="_base_evy7o_12",bx="_subtle_evy7o_13",jx="_header_evy7o_14",vx="_right_evy7o_21",yx="_center_evy7o_26",Nx="_hideBelowSm_evy7o_35",$x="_hideBelowMd_evy7o_39",wx="_hideBelowLg_evy7o_43",kx="_actions_evy7o_48",Nt={cell:xx,base:gx,subtle:bx,header:jx,right:vx,center:yx,hideBelowSm:Nx,hideBelowMd:$x,hideBelowLg:wx,actions:kx};function Ix({variant:t="base",align:s="left",flex:n,sort:o,loading:a=!1,skeletonWidth:r="60%",skeletonTone:l="base",hideBelow:i,actions:c=!1,children:u,className:_,style:m}){return e.jsx("div",{role:t==="header"?"columnheader":"gridcell","aria-sort":t==="header"&&o?o:void 0,"data-table-hide":i,className:[Nt.cell,Nt[t],s==="right"&&Nt.right,s==="center"&&Nt.center,i==="sm"&&Nt.hideBelowSm,i==="md"&&Nt.hideBelowMd,i==="lg"&&Nt.hideBelowLg,c&&Nt.actions,_].filter(Boolean).join(" "),style:n!==void 0?{...m,flex:n}:m,children:a?e.jsx(Ne,{width:r,height:12,radius:4,tone:l}):u})}const zx="_root_s4sto_1",Sx="_media_s4sto_8",Bx="_content_s4sto_14",Cx="_titleRow_s4sto_20",Tx="_title_s4sto_20",Dx="_subtitle_s4sto_35",at={root:zx,media:Sx,content:Bx,titleRow:Cx,title:Tx,subtitle:Dx};function Mx({media:t,title:s,titleAction:n,subtitle:o,loading:a=!1,loadingMedia:r=!0,loadingSubtitle:l=!0,className:i}){return a?e.jsxs("div",{className:[at.root,i].filter(Boolean).join(" "),children:[r&&e.jsx("span",{className:at.media,children:e.jsx(Ne,{width:24,height:32,radius:4})}),e.jsxs("div",{className:at.content,style:{gap:6},children:[e.jsx(Ne,{width:140,height:12,radius:4}),l&&e.jsx(Ne,{width:90,height:10,radius:4})]})]}):e.jsxs("div",{className:[at.root,i].filter(Boolean).join(" "),children:[t&&e.jsx("span",{className:at.media,children:t}),e.jsxs("div",{className:at.content,children:[e.jsxs("div",{className:at.titleRow,children:[e.jsx("span",{className:at.title,children:s}),n]}),o&&e.jsx("span",{className:at.subtitle,children:o})]})]})}const Rx="_group_pe73j_1",Ex="_header_pe73j_5",Lx="_checkCell_pe73j_29",dn={group:Rx,header:Ex,checkCell:Lx};function Lo({selectable:t=!1,checked:s=!1,indeterminate:n=!1,onCheckAll:o,children:a,className:r}){return e.jsx("div",{role:"rowgroup",className:dn.group,children:e.jsxs("div",{role:"row",className:[dn.header,r].filter(Boolean).join(" "),children:[t&&e.jsx("div",{"data-table-check":"",className:dn.checkCell,children:e.jsx(xs,{checked:s,indeterminate:n,onChange:l=>o==null?void 0:o(l.target.checked),"aria-label":"Select all rows"})}),a]})})}const Ax="_wrap_19h3b_1",qx="_scroll_19h3b_14",Fx="_header_19h3b_23",Px="_edge_19h3b_38",Ox="_edgeVisible_19h3b_51",Wx="_edgeLeft_19h3b_55",Hx="_edgeRight_19h3b_60",rt={wrap:Ax,scroll:qx,header:Fx,edge:Px,edgeVisible:Ox,edgeLeft:Wx,edgeRight:Hx};function Gx({minWidth:t=720,children:s,className:n,style:o}){const a=d.useRef(null),r=d.useRef(null),[l,i]=d.useState({left:!1,right:!1}),c=d.Children.toArray(s),u=c.filter(f=>d.isValidElement(f)&&f.type===Lo),_=u.length?c.filter(f=>!u.includes(f)):c,m=d.useCallback(()=>{const f=a.current;if(!f)return;r.current&&(r.current.scrollLeft=f.scrollLeft);const p=f.scrollWidth-f.clientWidth,x=f.scrollLeft>1,N=p>1&&f.scrollLeft<p-1;i(b=>b.left===x&&b.right===N?b:{left:x,right:N})},[]);d.useEffect(()=>{const f=a.current;if(!f)return;m();const p=new ResizeObserver(m);return p.observe(f),()=>p.disconnect()},[m]);const h=d.useCallback(f=>{const p=a.current;p&&f.deltaX&&(p.scrollLeft+=f.deltaX)},[]);return e.jsxs("div",{className:[rt.wrap,n].filter(Boolean).join(" "),style:{"--table-min-width":typeof t=="number"?`${t}px`:t,...o},children:[u.length>0&&e.jsx("div",{ref:r,"data-table-header-strip":"",className:rt.header,onWheel:h,children:u}),e.jsx(Dt,{ref:a,direction:"x",size:"thin",onScroll:m,className:rt.scroll,children:_}),e.jsx("div",{"aria-hidden":!0,className:[rt.edge,rt.edgeLeft,l.left&&rt.edgeVisible].filter(Boolean).join(" ")}),e.jsx("div",{"aria-hidden":!0,className:[rt.edge,rt.edgeRight,l.right&&rt.edgeVisible].filter(Boolean).join(" ")})]})}const Ux="_row_1qhbi_1",Vx="_withoutBottomBorder_1qhbi_16",Kx="_selected_1qhbi_25",Yx="_loading_1qhbi_34",Xx="_selectable_1qhbi_40",Zx="_clickable_1qhbi_44",Jx="_checkCell_1qhbi_48",Qx="_loadingCells_1qhbi_54",$t={row:Ux,withoutBottomBorder:Vx,selected:Kx,loading:Yx,selectable:Xx,clickable:Zx,checkCell:Jx,loadingCells:Qx};function e1({selectable:t=!1,selected:s=!1,loading:n=!1,bottomBorder:o=!0,onSelect:a,onClick:r,"data-state":l,children:i,className:c,style:u}){return e.jsxs("div",{role:"row","aria-selected":t?s:void 0,"data-state":l,onClick:r,style:u,className:[$t.row,!o&&$t.withoutBottomBorder,t&&$t.selectable,r&&$t.clickable,s&&$t.selected,n&&$t.loading,c].filter(Boolean).join(" "),children:[t&&e.jsx("div",{"data-table-check":"",className:$t.checkCell,onClick:_=>_.stopPropagation(),children:e.jsx(xs,{checked:s,onChange:_=>a==null?void 0:a(_.target.checked),"aria-label":"Select row"})}),n?e.jsxs("div",{className:$t.loadingCells,children:[e.jsx(Ne,{width:120,height:12}),e.jsx(Ne,{width:180,height:12}),e.jsx(Ne,{width:140,height:12}),e.jsx(Ne,{width:160,height:12})]}):i]})}const t1="_footer_xj4kv_1",s1="_range_xj4kv_10",n1="_pagination_xj4kv_18",o1="_pageLabel_xj4kv_24",Ut={footer:t1,range:s1,pagination:n1,pageLabel:o1},a1={range:(t,s,n)=>`${t} β ${s} of ${n} results`,pages:(t,s)=>`${t} of ${s} pages`,prev:"Prev",next:"Next"};function r1({page:t,totalPages:s,from:n,to:o,total:a,loading:r=!1,onPrev:l,onNext:i,labels:c,className:u}){const _={...a1,...c};return r?e.jsxs("div",{className:[Ut.footer,u].filter(Boolean).join(" "),children:[e.jsx(Ne,{width:140,height:12,radius:4}),e.jsxs("div",{className:Ut.pagination,children:[e.jsx(Ne,{width:90,height:12,radius:4}),e.jsx(Ne,{width:48,height:30,radius:6}),e.jsx(Ne,{width:48,height:30,radius:6})]})]}):e.jsxs("div",{className:[Ut.footer,u].filter(Boolean).join(" "),children:[e.jsx("span",{className:Ut.range,children:_.range(n,o,a)}),e.jsxs("div",{className:Ut.pagination,children:[e.jsx("span",{className:Ut.pageLabel,children:_.pages(t,s)}),e.jsx(ve,{variant:"transparent",size:"sm",disabled:t<=1,onClick:l,children:_.prev}),e.jsx(ve,{variant:"transparent",size:"sm",disabled:t>=s,onClick:i,children:_.next})]})]})}const l1="_root_1frkr_1",i1="_left_1frkr_11",c1="_right_1frkr_16",d1="_searchWrap_1frkr_23",u1="_sortWrap_1frkr_51",Xe={root:l1,left:i1,right:c1,searchWrap:d1,sortWrap:u1};function _1({filterBar:t,onAddFilter:s,searchValue:n,onSearchChange:o,onSearchClear:a,searchPlaceholder:r="Search table",sortMenu:l,onSort:i,loading:c=!1,className:u}){if(c)return e.jsxs("div",{className:[Xe.root,u].filter(Boolean).join(" "),children:[e.jsx("div",{className:Xe.left,children:e.jsx(Ne,{width:92,height:32,radius:6})}),e.jsxs("div",{className:Xe.right,children:[e.jsx("div",{className:Xe.searchWrap,children:e.jsx(Ne,{width:"100%",height:32,radius:6})}),e.jsx("div",{className:Xe.sortWrap,children:e.jsx(Ne,{width:32,height:32,radius:6})})]})]});const _=e.jsx(xe,{icon:e.jsx(j.FunnelSimpleIcon,{size:15}),"aria-label":"Sort",variant:"neutral",size:"sm",onClick:l?void 0:i});return e.jsxs("div",{className:[Xe.root,u].filter(Boolean).join(" "),children:[e.jsx("div",{className:Xe.left,children:t??e.jsx(ve,{variant:"neutral",size:"sm",onClick:s,children:"Add filter"})}),e.jsxs("div",{className:Xe.right,children:[e.jsx("div",{className:Xe.searchWrap,children:e.jsx($o,{value:n,onChange:o,onClear:a,placeholder:r,size:"sm"})}),e.jsx("div",{className:Xe.sortWrap,children:l?e.jsx(Ee,{trigger:_,placement:"bottom-end",bare:!0,children:l}):_})]})]})}const m1="_root_16jhw_1",f1="_loading_16jhw_55",h1="_left_16jhw_63",p1="_count_16jhw_69",x1="_title_16jhw_78",g1="_right_16jhw_88",Vt={root:m1,loading:f1,left:h1,count:p1,title:x1,right:g1};function b1({title:t,count:s,loading:n=!1,actions:o,className:a}){return e.jsxs("div",{"data-table-menu":"",className:[Vt.root,n&&Vt.loading,a].filter(Boolean).join(" "),children:[e.jsx("div",{className:Vt.left,children:n?e.jsx(Ne,{width:200,height:24,radius:6}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:Vt.title,children:t}),s!==void 0&&e.jsx("span",{className:Vt.count,children:s})]})}),e.jsx("div",{className:Vt.right,children:n?e.jsxs(e.Fragment,{children:[e.jsx(Ne,{width:60,height:28,radius:6}),e.jsx(Ne,{width:72,height:28,radius:6}),e.jsx(Ne,{width:64,height:28,radius:6})]}):o})]})}const j1="_root_1ldy9_11",v1="_closing_1ldy9_23",y1="_label_1ldy9_27",N1="_separator_1ldy9_41",ws={root:j1,closing:v1,label:y1,separator:N1};function $1({open:t=!0,label:s,children:n,className:o}){const[a,r]=d.useState(t),[l,i]=d.useState(!1),[c,u]=d.useState(s);if(d.useEffect(()=>{t?(r(!0),i(!1),u(s)):i(!0)},[t,s]),!a)return null;const _=t?s:c;return e.jsxs("div",{className:[ws.root,l&&ws.closing,o].filter(Boolean).join(" "),onAnimationEnd:()=>{l&&r(!1)},children:[_&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:ws.label,children:_}),e.jsx("span",{className:ws.separator,"aria-hidden":!0})]}),n]})}const w1="_root_vn4zx_1",k1="_right_vn4zx_34",I1="_label_vn4zx_40",z1="_keys_vn4zx_44",ks={root:w1,right:k1,label:I1,keys:z1};function S1({label:t,keys:s,variant:n="center",onClick:o}){return e.jsxs("button",{type:"button",onClick:o,className:[ks.root,ks[n]].join(" "),children:[e.jsx("span",{className:ks.label,children:t}),s&&s.length>0&&e.jsx("span",{className:ks.keys,children:s.map((a,r)=>e.jsx(mt,{bg:"contrast-bg-subtle",radius:"squared",children:a},r))})]})}const B1="_root_exjmp_1",C1={root:B1};function Ao({color:t="bg-component",children:s,className:n}){const o=d.Children.map(s,a=>d.isValidElement(a)?d.cloneElement(a,{color:t}):a);return e.jsx("div",{className:[C1.root,n].filter(Boolean).join(" "),children:o})}const T1="_root_l48f4_1",D1="_muted_l48f4_29",M1="_base_l48f4_33",R1="_icon_l48f4_38",E1="_bgComponent_l48f4_56",L1="_bgBase_l48f4_70",Is={root:T1,default:"_default_l48f4_28",muted:D1,base:M1,icon:R1,static:"_static_l48f4_45",bgComponent:E1,bgBase:L1};function _s({as:t="button",type:s="default",color:n="bg-component",active:o=!1,disabled:a=!1,forceHover:r=!1,children:l,className:i,onClick:c,...u}){const _=[Is.root,Is[s],Is[n==="bg-component"?"bgComponent":"bgBase"],i].filter(Boolean).join(" ");return t==="span"?e.jsx("span",{className:[_,Is.static].join(" "),onClick:m=>m.stopPropagation(),children:l}):e.jsx("button",{type:"button",disabled:a,onClick:c,"data-active":o||void 0,"data-hover":r||void 0,className:_,...u,children:l})}const A1="_menu_2c8zh_1",q1="_header_2c8zh_13",F1="_items_2c8zh_19",P1="_footer_2c8zh_26",zs={menu:A1,header:q1,items:F1,footer:P1};function O1({children:t,emptyState:s,header:n,footer:o,width:a,maxHeight:r="280px",className:l,style:i}){const c=!!t&&(Array.isArray(t)?t.filter(Boolean).length>0:!0);return e.jsxs("div",{className:[zs.menu,l].filter(Boolean).join(" "),style:{width:a,...i},children:[n&&e.jsx("div",{className:zs.header,children:n}),e.jsx(Dt,{size:"thin",maxHeight:r,className:zs.items,children:c?t:s}),o&&e.jsx("div",{className:zs.footer,children:o})]})}const W1="_item_1pevj_1",H1="_selected_1pevj_25",G1="_label_1pevj_25",U1="_disabled_1pevj_30",V1="_forceHover_1pevj_31",K1="_icon_1pevj_49",Y1="_count_1pevj_73",X1="_badge_1pevj_85",wt={item:W1,selected:H1,label:G1,disabled:U1,forceHover:V1,icon:K1,count:Y1,badge:X1};function Z1({label:t,mode:s="multi",selected:n=!1,disabled:o=!1,forceHover:a=!1,count:r,badge:l,onClick:i}){return e.jsxs("button",{type:"button",role:s==="multi"?"menuitemcheckbox":"menuitemradio","aria-checked":n,disabled:o,onClick:i,className:[wt.item,n?wt.selected:"",o?wt.disabled:"",a?wt.forceHover:""].filter(Boolean).join(" "),children:[e.jsx("span",{className:wt.icon,children:n&&(s==="single"?e.jsx(j.CircleIcon,{size:4,fill:"currentColor"}):e.jsx(j.CheckIcon,{size:15}))}),e.jsx("span",{className:wt.label,children:t}),r!==void 0&&e.jsx("span",{className:wt.count,children:r}),l&&e.jsx("span",{className:wt.badge,children:l})]})}const J1="_title_y8ftw_1",Q1={title:J1};function eg({children:t,className:s}){return e.jsx("div",{className:[Q1.title,s].filter(Boolean).join(" "),children:t})}const tg="_wrap_1dang_1",sg="_input_1dang_10",ng="_clearBtn_1dang_28",un={wrap:tg,input:sg,clearBtn:ng};function og({value:t,defaultValue:s,onChange:n,placeholder:o="Search",loading:a=!1,inputRef:r,className:l}){const i=t!==void 0,[c,u]=d.useState(s??""),_=i?t??"":c;function m(f){i||u(f.target.value),n==null||n(f.target.value)}function h(){i||u(""),n==null||n("")}return e.jsxs("div",{className:[un.wrap,l].filter(Boolean).join(" "),children:[e.jsx("input",{ref:r,className:un.input,placeholder:o,value:_,onChange:m}),a&&e.jsx(Tt,{size:"xs"}),_&&!a&&e.jsx("button",{type:"button",className:un.clearBtn,onClick:h,tabIndex:-1,"aria-label":"Clear search",children:e.jsx(j.CloseIcon,{size:10})})]})}const ag="_divider_dzqey_1",rg={divider:ag};function lg(){return e.jsx("div",{className:rg.divider,"aria-hidden":!0})}const ig="_root_1u0dt_1",qo={root:ig};function cg(t){return e.jsx("div",{className:qo.root,children:e.jsx(Mo,{size:"sm",variant:"white",...t})})}function dg(t){return e.jsx("div",{className:qo.root,children:e.jsx(Ke,{size:"sm",variant:"white",...t})})}const ug="_root_4lcd6_1",_g="_line_4lcd6_10",On={root:ug,line:_g};function mg({count:t=3}){return e.jsx("div",{className:On.root,children:Array.from({length:t},(s,n)=>e.jsx("div",{className:On.line,style:n===t-1?{width:"50%"}:void 0},n))})}function fg({label:t,operator:s,value:n,active:o=!1,onRemove:a,className:r}){return e.jsxs(Ao,{color:"bg-base",className:r,children:[e.jsx(_s,{as:"span",type:"muted",children:t}),s&&n&&e.jsx(_s,{as:"span",type:"muted",children:s}),n&&e.jsx(_s,{type:"base",active:o,children:n}),a&&e.jsx(_s,{type:"icon",onClick:l=>{l.stopPropagation(),a()},"aria-label":"Remove filter",children:e.jsx(j.CloseIcon,{size:14})})]})}const hg="_bar_a739b_1",pg={bar:hg};function xg({children:t,addFilterLabel:s="Add filter",addFilterContent:n,addFilterOpen:o,onAddFilterOpenChange:a,onClearAll:r,className:l}){const i=!!t&&(Array.isArray(t)?t.filter(Boolean).length>0:!0),c=e.jsx(ve,{variant:"neutral",size:"sm",children:s});return e.jsxs("div",{className:[pg.bar,l].filter(Boolean).join(" "),children:[t,n?e.jsx(Ee,{trigger:c,open:o,onOpenChange:a,placement:"bottom-start",bare:!0,children:n}):c,i&&r&&e.jsx(Qt,{tone:"muted",size:"sm",onClick:r,children:"Clear all"})]})}const gg="_overlay_19ov8_2",bg="_overlayEnter_19ov8_1",jg="_dialog_19ov8_21",vg="_modalEnter_19ov8_1",yg="_exit_19ov8_36",Ng="_overlayExit_19ov8_1",$g="_modalExit_19ov8_1",wg="_sm_19ov8_92",kg="_md_19ov8_93",Ig="_lg_19ov8_94",zg="_xl_19ov8_95",Sg="_full_19ov8_96",Bg="_header_19ov8_101",Cg="_title_19ov8_110",Tg="_headerActions_19ov8_118",Dg="_bodyNoPadding_19ov8_127",Mg="_body_19ov8_127",Rg="_footer_19ov8_141",Eg="_closeBtn_19ov8_160",Ue={overlay:gg,overlayEnter:bg,dialog:jg,modalEnter:vg,exit:yg,overlayExit:Ng,modalExit:$g,sm:wg,md:kg,lg:Ig,xl:zg,full:Sg,header:Bg,title:Cg,headerActions:Tg,bodyNoPadding:Dg,body:Mg,footer:Rg,closeBtn:Eg};function Fo({open:t,onClose:s,title:n,children:o,footer:a,size:r="md",closable:l=!0,className:i,bodyClassName:c,bodyPadding:u="normal"}){const _=d.useRef(null),[m,h]=d.useState(t);return hs(t||m),d.useEffect(()=>{if(t){h(!0);return}if(!m)return;const f=setTimeout(()=>h(!1),280);return()=>clearTimeout(f)},[t,m]),d.useEffect(()=>{if(!t)return;function f(p){p.key==="Escape"&&!p.defaultPrevented&&s()}return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[t,s]),d.useEffect(()=>{var f;t&&((f=_.current)==null||f.focus())},[t]),!t&&!m?null:pt.createPortal(e.jsx("div",{className:[Ue.overlay,!t&&Ue.exit].filter(Boolean).join(" "),onMouseDown:f=>{t&&f.target===f.currentTarget&&s()},"aria-modal":"true",role:"dialog",children:e.jsxs("div",{ref:_,className:[Ue.dialog,Ue[r],i].filter(Boolean).join(" "),tabIndex:-1,"aria-labelledby":n?"modal-title":void 0,onAnimationEnd:f=>{!t&&f.target===f.currentTarget&&h(!1)},children:[(n||l)&&e.jsxs("div",{className:Ue.header,children:[n&&e.jsx("span",{id:"modal-title",className:Ue.title,children:n}),l&&e.jsxs("div",{className:Ue.headerActions,children:[e.jsx(mt,{children:"esc"}),e.jsx("button",{className:Ue.closeBtn,onClick:s,"aria-label":"Close",children:e.jsx(j.CloseIcon,{size:16})})]})]}),o&&e.jsx(Dt,{direction:"y",size:"thin",className:[Ue.body,u==="none"&&Ue.bodyNoPadding,c].filter(Boolean).join(" "),children:o}),a&&e.jsx("div",{className:Ue.footer,children:a})]})}),document.body)}const Lg="_banner_1shpp_3",Ag="_illustration_1shpp_20",qg="_sparkle_1shpp_32",Fg="_closeBtn_1shpp_38",Pg="_content_1shpp_68",Og="_title_1shpp_75",Wg="_description_1shpp_83",Hg="_features_1shpp_92",Gg="_featureItem_1shpp_101",Ug="_featureCheck_1shpp_110",Vg="_actions_1shpp_124",Ae={banner:Lg,"banner-illustration":"_banner-illustration_1shpp_16",illustration:Ag,"banner-default":"_banner-default_1shpp_26",sparkle:qg,closeBtn:Fg,content:Pg,title:Og,description:Wg,features:Hg,featureItem:Gg,featureCheck:Ug,actions:Vg};function Kg({open:t,onClose:s,illustration:n,title:o="Unlock this feature",description:a="Upgrade your plan to get access to this and many other powerful features.",features:r=[],onUpgrade:l,upgradeLabel:i="Upgrade to plan",cancelLabel:c="Maybe later"}){return e.jsxs(Fo,{open:t,onClose:s,size:"sm",closable:!1,children:[e.jsxs("div",{className:[Ae.banner,n?Ae["banner-illustration"]:Ae["banner-default"]].join(" "),children:[e.jsx("button",{className:Ae.closeBtn,onClick:s,"aria-label":"Close",children:e.jsx(j.CloseIcon,{size:16})}),n?e.jsx("img",{src:n,alt:"",className:Ae.illustration}):e.jsx(j.SparkleIcon,{size:48,className:Ae.sparkle})]}),e.jsxs("div",{className:Ae.content,children:[e.jsx("h2",{className:Ae.title,children:o}),a&&e.jsx("p",{className:Ae.description,children:a}),r.length>0&&e.jsx("ul",{className:Ae.features,children:r.map((u,_)=>e.jsxs("li",{className:Ae.featureItem,children:[e.jsx("span",{className:Ae.featureCheck,children:e.jsx(j.CheckIcon,{size:15})}),e.jsx("span",{children:u})]},_))}),e.jsxs("div",{className:Ae.actions,children:[e.jsx(ve,{variant:"inverted",size:"base",onClick:l,style:{width:"100%"},children:i}),e.jsx(ve,{variant:"transparent",size:"base",onClick:s,style:{width:"100%"},children:c})]})]})]})}const Yg="_root_dx5sl_1",Xg="_item_dx5sl_8",Zg="_plain_dx5sl_12",Jg="_filled_dx5sl_14",Qg="_trigger_dx5sl_19",eb="_caret_dx5sl_47",tb="_caretOpen_dx5sl_55",sb="_triggerLabel_dx5sl_60",nb="_body_dx5sl_68",lt={root:Yg,item:Xg,plain:Zg,filled:Jg,trigger:Qg,caret:eb,caretOpen:tb,triggerLabel:sb,body:nb};function ob({items:t,variant:s="plain",className:n}){const[o,a]=d.useState(null);function r(l){a(i=>i===l?null:l)}return e.jsx("div",{className:[lt.root,n].filter(Boolean).join(" "),children:t.map((l,i)=>{const c=o===i;return e.jsxs("div",{className:[lt.item,lt[s],c?lt.open:""].filter(Boolean).join(" "),children:[e.jsxs("button",{type:"button",className:lt.trigger,onClick:()=>r(i),"aria-expanded":c,children:[e.jsx("span",{className:[lt.caret,c?lt.caretOpen:""].filter(Boolean).join(" "),children:e.jsx(j.CaretRightIcon,{size:11})}),e.jsx("span",{className:lt.triggerLabel,children:l.title})]}),c&&e.jsx("div",{className:lt.body,children:l.content})]},i)})})}const ab="_wrap_12lby_2",rb="_textarea_12lby_12",lb="_white_12lby_32",ib="_gray_12lby_33",cb="_disabled_12lby_36",db="_error_12lby_47",ub="_resize_none_12lby_67",_b="_resize_vertical_12lby_68",mb="_resize_both_12lby_69",fb="_resizeIcon_12lby_72",hb="_aiSlot_12lby_83",kt={wrap:ab,textarea:rb,white:lb,gray:ib,disabled:cb,error:db,resize_none:ub,resize_vertical:_b,resize_both:mb,resizeIcon:fb,aiSlot:hb},pb=d.forwardRef(function({variant:s="white",error:n=!1,resize:o="vertical",aiSlot:a,className:r,disabled:l,...i},c){const u=[kt.wrap,kt[s],n?kt.error:"",l?kt.disabled:"",r].filter(Boolean).join(" ");return e.jsxs("div",{className:u,children:[e.jsx("textarea",{ref:c,className:[kt.textarea,kt[`resize_${o}`]].join(" "),disabled:l,...i}),a&&e.jsx("span",{className:kt.aiSlot,children:a}),o!=="none"&&!l&&e.jsx("span",{className:kt.resizeIcon,"aria-hidden":!0,children:e.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:[e.jsx("line",{x1:"1",y1:"9",x2:"9",y2:"1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),e.jsx("line",{x1:"5",y1:"9",x2:"9",y2:"5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})})]})}),xb="_toggle_tpd5d_1",gb={toggle:xb},bb=d.forwardRef(function(s,n){const[o,a]=d.useState(!1);return e.jsx(Ke,{ref:n,type:o?"text":"password",rightIcon:e.jsx("button",{type:"button",className:gb.toggle,onClick:()=>a(r=>!r),tabIndex:-1,"aria-label":o?"Hide password":"Show password",children:o?e.jsx(j.EyeSlashIcon,{size:15}):e.jsx(j.EyeIcon,{size:15})}),...s})}),jb="_root_1yoja_1",vb="_segments_1yoja_8",yb="_segment_1yoja_8",Nb="_footer_1yoja_21",$b="_label_1yoja_26",is={root:jb,segments:vb,segment:yb,footer:Nb,label:$b};function Po(t){if(!t)return 0;let s=0;return t.length>=8&&s++,/[A-Z]/.test(t)&&s++,/[a-z]/.test(t)&&s++,/[0-9]/.test(t)&&s++,/[^A-Za-z0-9]/.test(t)&&s++,Math.min(4,s)}const wb={0:"",1:"Weak",2:"Fair",3:"Good",4:"Strong"},kb={0:"",1:"var(--red-500)",2:"var(--orange-500)",3:"var(--green-400)",4:"var(--green-600)"};function Ib({value:t,className:s}){const n=Po(t),o=kb[n];return e.jsxs("div",{className:[is.root,s].filter(Boolean).join(" "),"data-strength":n,children:[e.jsx("div",{className:is.segments,children:[1,2,3,4].map(a=>e.jsx("div",{className:is.segment,style:{backgroundColor:a<=n&&n>0?o:void 0}},a))}),e.jsx("div",{className:is.footer,children:e.jsx("span",{className:is.label,style:{color:n>0?o:void 0},children:wb[n]})})]})}const zb="_input_16i73_1",Sb={input:zb};function Bb(t){var s;return((s=new Intl.NumberFormat("en",{style:"currency",currency:t}).formatToParts(0).find(n=>n.type==="currency"))==null?void 0:s.value)??t}const Cb=d.forwardRef(function({currency:s="USD",...n},o){const a=Bb(s);return e.jsx(Ke,{ref:o,type:"number",step:"0.01",min:"0",placeholder:"0.00",prefix:s,suffix:a,inputClassName:Sb.input,...n})}),Tb="_input_rggu7_1",Db="_stepper_rggu7_3",Mb="_btn_rggu7_9",Ss={input:Tb,stepper:Db,btn:Mb},Rb=d.forwardRef(function({min:s,max:n,step:o=1,decimals:a=2,value:r,defaultValue:l,disabled:i,size:c="base",onChange:u,onBlur:_,placeholder:m="0.00",...h},f){const p=k=>{let C=k;return s!==void 0&&(C=Math.max(s,C)),n!==void 0&&(C=Math.min(n,C)),C},x=k=>p(k).toFixed(a),N=r!==void 0,[b,z]=d.useState(()=>l!==void 0?x(Number(l)):""),[g,S]=d.useState(null),w=N?r===null||r===""?"":String(r):b,T=g??w,R=parseFloat(T)||0,H=s===void 0||R>s,Q=n===void 0||R<n;function ee(k,C){u==null||u({...C??{},target:{...(C==null?void 0:C.target)??{},value:k}})}function Y(k){S(null),N||z(k),ee(k)}const $=k=>Y(x(R+k));return e.jsx(Ke,{ref:f,type:"text",inputMode:"decimal",value:T,placeholder:m,disabled:i,size:c,inputClassName:Ss.input,onChange:k=>{const C=s!==void 0&&s>=0?k.target.value.replace(/-/g,""):k.target.value;S(C),N||z(C),ee(C,k)},onBlur:k=>{S(null);const C=x(R);N?parseFloat(C)!==R&&ee(C):z(C),_==null||_(k)},rightSlot:e.jsxs("div",{className:Ss.stepper,children:[e.jsx("button",{type:"button",className:Ss.btn,onClick:()=>$(-o),disabled:i||!H,tabIndex:-1,"aria-label":"Decrease",children:e.jsx(j.MinusIcon,{size:10,strokeWidth:3.5})}),e.jsx("button",{type:"button",className:Ss.btn,onClick:()=>$(o),disabled:i||!Q,tabIndex:-1,"aria-label":"Increase",children:e.jsx(j.PlusIcon,{size:10,strokeWidth:3.5})})]}),...h})}),Eb=d.forwardRef(function({prefix:s,suffix:n,...o},a){const r=s??(n?void 0:"https://");return e.jsx(Ke,{ref:a,type:"url",prefix:r,suffix:n,...o})}),Lb="_wrap_a8jgq_1",Ab="_white_a8jgq_12",qb="_gray_a8jgq_13",Fb="_disabled_a8jgq_16",Pb="_focused_a8jgq_16",Ob="_error_a8jgq_16",Wb="_input_a8jgq_36",Hb="_cardIcon_a8jgq_37",Gb="_cardRow_a8jgq_40",Ub="_divider_a8jgq_54",Vb="_bottomRow_a8jgq_59",Kb="_cvvDivider_a8jgq_64",Yb="_cvvInput_a8jgq_70",Re={wrap:Lb,white:Ab,gray:qb,disabled:Fb,focused:Pb,error:Ob,input:Wb,cardIcon:Hb,cardRow:Gb,divider:Ub,bottomRow:Vb,cvvDivider:Kb,cvvInput:Yb};function Wn(t){return t.replace(/\D/g,"").slice(0,16).replace(/(.{4})(?=.)/g,"$1 ")}function Hn(t){const s=t.replace(/\D/g,"").slice(0,4);return s.length>2?s.slice(0,2)+"/"+s.slice(2):s}const Xb=d.forwardRef(function({variant:s="white",error:n=!1,disabled:o=!1,className:a,defaultCardNumber:r="",defaultExpiry:l="",defaultCvv:i="",onChange:c},u){const[_,m]=d.useState(()=>Wn(r)),[h,f]=d.useState(()=>Hn(l)),[p,x]=d.useState(()=>i.replace(/\D/g,"").slice(0,4)),[N,b]=d.useState(!1),z=T=>{c==null||c(T)},g=[Re.wrap,Re[s],N?Re.focused:"",n?Re.error:"",o?Re.disabled:"",a].filter(Boolean).join(" "),S=()=>b(!0),w=()=>b(!1);return e.jsxs("div",{ref:u,className:g,children:[e.jsxs("div",{className:Re.cardRow,children:[e.jsx("input",{className:Re.input,type:"text",inputMode:"numeric",placeholder:"0000 0000 0000 0000",value:_,disabled:o,maxLength:19,onFocus:S,onBlur:w,onChange:T=>{const R=Wn(T.target.value);m(R),z({cardNumber:R,expiry:h,cvv:p})}}),e.jsx("span",{className:Re.cardIcon,"aria-hidden":!0,children:e.jsx(j.CreditCardIcon,{size:16})})]}),e.jsx("div",{className:Re.divider}),e.jsxs("div",{className:Re.bottomRow,children:[e.jsx("input",{className:Re.input,type:"text",inputMode:"numeric",placeholder:"MM/YY",value:h,disabled:o,maxLength:5,onFocus:S,onBlur:w,onChange:T=>{const R=Hn(T.target.value);f(R),z({cardNumber:_,expiry:R,cvv:p})}}),e.jsx("div",{className:Re.cvvDivider}),e.jsx("input",{className:[Re.input,Re.cvvInput].join(" "),type:"text",inputMode:"numeric",placeholder:"123",value:p,disabled:o,maxLength:4,onFocus:S,onBlur:w,onChange:T=>{const R=T.target.value.replace(/\D/g,"").slice(0,4);x(R),z({cardNumber:_,expiry:h,cvv:R})}})]})]})}),Zb="_root_1pfhj_1",Jb="_separator_1pfhj_7",Qb="_cell_1pfhj_17",ej="_base_1pfhj_33",tj="_sm_1pfhj_34",sj="_white_1pfhj_41",nj="_gray_1pfhj_42",oj="_disabled_1pfhj_45",aj="_error_1pfhj_56",Rt={root:Zb,separator:Jb,cell:Qb,base:ej,sm:tj,white:sj,gray:nj,disabled:oj,error:aj};function rj({length:t=6,value:s="",onChange:n,inputType:o="text",placeholder:a,separator:r,shouldAutoFocus:l=!1,disabled:i=!1,error:c=!1,size:u="base",variant:_="white",className:m}){const h=d.useRef([]),f=d.useRef(0),p=o==="number"||o==="tel";d.useEffect(()=>{var $;l&&(($=h.current[0])==null||$.focus())},[l]);function x($){var C,te;const k=Math.max(0,Math.min(t-1,$));(C=h.current[k])==null||C.focus(),(te=h.current[k])==null||te.select(),f.current=k}function N($){return p?/^\d$/.test($):$.trim().length===1}function b($){const k=s[$];return k&&k!==" "?k:""}function z($){const k=s.padEnd(t," ").slice(0,t).split("");$(k),n==null||n(k.join("").trimEnd())}function g($,k){z(C=>{C[$]=k||" "})}function S($){return p?$.replace(/\D/g,""):$.replace(/\s/g,"")}function w($,k){const C=S(k),te=C.length>=t?0:$,V=C.slice(0,t-te);V&&(z(ne=>{[...V].forEach((I,F)=>{ne[te+F]=I})}),x(te+V.length))}function T($,k){const C=k.replace(/\s/g,"");if(C.length>1){w($,C);return}N(C)&&(g($,C),x($+1))}function R($,k){k.metaKey||k.ctrlKey||k.altKey||(k.key==="Backspace"?(k.preventDefault(),b($)?g($,""):$>0&&(g($-1,""),x($-1))):k.key==="Delete"?(k.preventDefault(),g($,"")):k.key==="ArrowLeft"?(k.preventDefault(),x($-1)):k.key==="ArrowRight"?(k.preventDefault(),x($+1)):k.key===" "||k.key==="ArrowUp"||k.key==="ArrowDown"?k.preventDefault():k.key===b($)?(k.preventDefault(),x($+1)):p&&!/^\d$/.test(k.key)&&k.key.length===1&&k.preventDefault())}function H($){$.preventDefault(),w(f.current,$.clipboardData.getData("text/plain"))}function Q($,k){f.current=$,k.target.select()}function ee($){if(typeof a=="string"&&a.length===t)return a[$]}const Y=[Rt.cell,Rt[u],Rt[_],c&&Rt.error,i&&Rt.disabled].filter(Boolean).join(" ");return e.jsx("div",{className:[Rt.root,m].filter(Boolean).join(" "),children:Array.from({length:t},($,k)=>e.jsxs(d.Fragment,{children:[e.jsx("input",{ref:C=>{h.current[k]=C},type:o==="number"?"tel":o,inputMode:p?"numeric":void 0,maxLength:1,value:b(k),placeholder:ee(k),disabled:i,"aria-label":`Please enter OTP character ${k+1}`,autoComplete:k===0?"one-time-code":"off",className:Y,onChange:C=>T(k,C.target.value),onKeyDown:C=>R(k,C),onPaste:H,onFocus:C=>Q(k,C)}),r&&k<t-1&&e.jsx("span",{className:Rt.separator,children:r})]},k))})}const lj="_root_1fq6t_1",ij="_info_1fq6t_11",cj="_name_1fq6t_19",dj="_size_1fq6t_30",uj="_uploading_1fq6t_37",_j="_error_1fq6t_44",mj="_actions_1fq6t_51",fj="_errorIcon_1fq6t_58",it={root:lj,info:ij,name:cj,size:dj,uploading:uj,error:_j,actions:mj,errorIcon:fj};function hj(t){return t<1024?`${t}B`:t<1024*1024?`${(t/1024).toFixed(2)}KB`:`${(t/(1024*1024)).toFixed(2)}MB`}function Oo({file:t,status:s="idle",errorMessage:n="File exceeds size limit.",onRemove:o,className:a}){return e.jsxs("div",{className:[it.root,it[s],a].filter(Boolean).join(" "),children:[e.jsx(St,{variant:"file",size:"portrait-sm"}),e.jsxs("div",{className:it.info,children:[e.jsx("span",{className:it.name,children:t.name}),s==="idle"&&e.jsx("span",{className:it.size,children:hj(t.size)}),s==="uploading"&&e.jsx("span",{className:it.uploading,children:"Preprocessing..."}),s==="error"&&e.jsx("span",{className:it.error,children:n})]}),e.jsxs("div",{className:it.actions,children:[s==="uploading"&&e.jsx(Tt,{size:"sm"}),s==="error"&&e.jsx(j.WarningCircleIcon,{size:16,className:it.errorIcon}),s!=="uploading"&&e.jsx(xe,{size:"sm",variant:"transparent",radius:"full",icon:e.jsx(j.CloseIcon,{size:14}),"aria-label":"Remove file",onClick:o})]})]})}const pj="_root_mgxdc_1",xj="_disabled_mgxdc_19",gj="_dragging_mgxdc_20",bj="_hasFiles_mgxdc_31",jj="_compact_mgxdc_50",vj="_description_mgxdc_58",yj="_dropOverlay_mgxdc_62",Nj="_dropOverlayIcon_mgxdc_67",$j="_compactRow_mgxdc_73",wj="_compactThumb_mgxdc_85",kj="_compactInfo_mgxdc_109",Ij="_compactName_mgxdc_117",zj="_compactMeta_mgxdc_127",Sj="_compactActions_mgxdc_133",Bj="_compactMenuDropdown_mgxdc_138",Cj="_hasFilesFile_mgxdc_155",Tj="_hasFilesFileWithoutAdd_mgxdc_164",Dj="_addFileBtn_mgxdc_168",Mj="_input_mgxdc_194",Rj="_actions_mgxdc_213",Ej="_withActions_mgxdc_222",Lj="_dropOverlayText_mgxdc_257",Aj="_previewItem_mgxdc_265",qj="_previewItemLarge_mgxdc_273",Fj="_previewItemActive_mgxdc_277",Pj="_menuTrigger_mgxdc_297",Oj="_menuTriggerOpen_mgxdc_307",Wj="_menuDropdown_mgxdc_311",Hj="_coverBadge_mgxdc_319",Gj="_smallGrid_mgxdc_339",Uj="_addControl_mgxdc_349",Vj="_addBtn_mgxdc_355",Kj="_addMenuDropdown_mgxdc_375",ue={root:pj,disabled:xj,dragging:gj,hasFiles:bj,compact:jj,description:vj,dropOverlay:yj,dropOverlayIcon:Nj,compactRow:$j,compactThumb:wj,compactInfo:kj,compactName:Ij,compactMeta:zj,compactActions:Sj,compactMenuDropdown:Bj,hasFilesFile:Cj,hasFilesFileWithoutAdd:Tj,addFileBtn:Dj,input:Mj,actions:Rj,withActions:Ej,dropOverlayText:Lj,previewItem:Aj,previewItemLarge:qj,previewItemActive:Fj,menuTrigger:Pj,menuTriggerOpen:Oj,menuDropdown:Wj,coverBadge:Hj,smallGrid:Gj,addControl:Uj,addBtn:Vj,addMenuDropdown:Kj},Yj=9;function Xj(t){return t<1024?`${t}B`:t<1024*1024?`${(t/1024).toFixed(2)}KB`:`${(t/(1024*1024)).toFixed(2)}MB`}function Zj(t,s){return s?s.split(",").some(n=>{const o=n.trim().toLowerCase();return o?o.startsWith(".")?t.name.toLowerCase().endsWith(o):o.endsWith("/*")?t.type.toLowerCase().startsWith(o.slice(0,-1)):t.type.toLowerCase()===o:!1}):!0}function Jj({mode:t="media",onChange:s,onView:n,onMediaClick:o,onImageClick:a,onPreviewClick:r,onRemovePreviewUrl:l,onMakeThumbnail:i,onSelectExisting:c,selectExisting:u,onUploadNew:_,uploadNewLabel:m="Upload new",selectExistingLabel:h="Select existing",showActions:f,statuses:p,defaultFiles:x,defaultPreviewUrls:N,accept:b,multiple:z=!1,maxFiles:g=Yj,compact:S=!1,disabled:w=!1,label:T="Upload Files",description:R="Drag and drop files here or click to upload",className:H}){var W;const Q=S?!1:z,ee=S?1:g,Y=c??(typeof u=="function"?u:void 0),$=f??!!(Y||u),k=d.useRef(null),[C,te]=d.useState(!1),[V,ne]=d.useState(()=>{const y=[...N??[],...(x==null?void 0:x.map(Z=>({file:Z})))??[]];return(S?y.slice(0,1):y).map(Z=>"file"in Z?{file:Z.file,url:URL.createObjectURL(Z.file)}:{url:Z.url,name:Z.name,type:Z.type})}),[I,F]=d.useState(null),[oe,le]=d.useState(!1),v=t!=="file",D=b??(v?"image/*,video/*":void 0);d.useEffect(()=>()=>V.forEach(y=>{y.file&&URL.revokeObjectURL(y.url)}),[V]),d.useEffect(()=>{if(I===null&&!oe)return;function y(){F(null),le(!1)}return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[I,oe]);function A(){var y;w||(y=k.current)==null||y.click()}function P(y,Z=!1){y.length&&ne(se=>{const ge=!S&&(z||Z),_e=ge?se:[];ge||se.forEach(we=>{we.file?URL.revokeObjectURL(we.url):l==null||l({url:we.url,name:we.name,type:we.type})});const Te=ee-_e.length;if(Te<=0)return se;const Qe=y.slice(0,Te).map(we=>({file:we,url:URL.createObjectURL(we)})),Ye=[..._e,...Qe];return s==null||s(Ye.map(we=>we.file).filter(we=>!!we)),Ye})}function B(y){ne(Z=>{const se=Z[y];se.file?URL.revokeObjectURL(se.url):l==null||l({url:se.url,name:se.name,type:se.type});const ge=Z.filter((_e,Te)=>Te!==y);return s==null||s(ge.map(_e=>_e.file).filter(_e=>!!_e)),ge}),F(null)}function G(y){if(y!==0){if(i){i(y),F(null);return}ne(Z=>{const se=[...Z],[ge]=se.splice(y,1);return se.unshift(ge),s==null||s(se.map(_e=>_e.file).filter(_e=>!!_e)),se}),F(null)}}function q(y){y.target===y.currentTarget&&!w&&!V.length&&(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),A())}function U(y){y.preventDefault(),w||te(!0)}function L(y){y.preventDefault(),te(!1)}function M(y){if(y.preventDefault(),te(!1),w)return;const Z=Array.from(y.dataTransfer.files).filter(se=>Zj(se,D));P(Z,V.length>0)}function K(y){P(Array.from(y.target.files??[]),V.length>0),y.target.value=""}const ae=V.length>0,he=!w&&V.length<ee,X=S&&ae&&v,re=[ue.root,$&&!ae&&ue.withActions,S&&ue.compact,ae&&ue.hasFiles,ae&&t==="file"&&ue.hasFilesFile,ae&&t==="file"&&!he&&ue.hasFilesFileWithoutAdd,X&&ue.compactRow,C&&ue.dragging,w&&ue.disabled,H].filter(Boolean).join(" ");function ce(y){var Z;return y.type==="video"||(Z=y.file)!=null&&Z.type.startsWith("video/")?"video":"image"}function pe(y){const Z=I===y;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`${ue.menuTrigger}${Z?` ${ue.menuTriggerOpen}`:""}`,children:e.jsx(xe,{size:"2xsmall",radius:"full",variant:"neutral",icon:e.jsx(j.DotsThreeIcon,{}),"aria-label":"Options",onMouseDown:se=>se.stopPropagation(),onClick:se=>{se.stopPropagation(),le(!1),F(ge=>ge===y?null:y)}})}),Z&&e.jsx("div",{className:ue.menuDropdown,onMouseDown:se=>se.stopPropagation(),onClick:se=>se.stopPropagation(),children:e.jsxs(Je,{children:[e.jsx($e,{label:"View",leftIcon:e.jsx(j.EyeIcon,{size:14}),onClick:()=>{const se=V[y];se.file&&n?n(se.file):window.open(se.url,"_blank","noopener,noreferrer"),F(null)}}),y!==0&&e.jsx($e,{label:"Make thumbnail",leftIcon:e.jsx(j.GalleryHorizontalEndIcon,{size:14}),onClick:()=>G(y)}),e.jsx($e,{label:"Delete",leftIcon:e.jsx(j.TrashIcon,{size:14}),variant:"danger",onClick:()=>B(y)})]})})]})}function E(){var se,ge;const y=V[0],Z=I===0;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:ue.compactThumb,onClick:()=>{var _e;y.file&&((_e=o??a)==null||_e(y.file,0)),r==null||r(0)},children:e.jsx(St,{variant:ce(y),size:"square-xl",src:y.url,alt:y.name??((se=y.file)==null?void 0:se.name)??""})}),e.jsxs("div",{className:ue.compactInfo,children:[e.jsx("span",{className:ue.compactName,children:y.name??((ge=y.file)==null?void 0:ge.name)??"Image"}),y.file&&e.jsx("span",{className:ue.compactMeta,children:Xj(y.file.size)})]}),e.jsxs("div",{className:ue.compactActions,children:[e.jsx(xe,{size:"sm",radius:"full",variant:"transparent",icon:e.jsx(j.DotsThreeIcon,{}),"aria-label":"Options",disabled:w,onMouseDown:_e=>_e.stopPropagation(),onClick:_e=>{_e.stopPropagation(),le(!1),F(Te=>Te===0?null:0)}}),Z&&e.jsx("div",{className:ue.compactMenuDropdown,onMouseDown:_e=>_e.stopPropagation(),onClick:_e=>_e.stopPropagation(),children:e.jsxs(Je,{children:[e.jsx($e,{label:"View",leftIcon:e.jsx(j.EyeIcon,{size:14}),onClick:()=>{y.file&&n?n(y.file):window.open(y.url,"_blank","noopener,noreferrer"),F(null)}}),e.jsx($e,{label:"Replace",leftIcon:e.jsx(j.ArrowsClockwiseIcon,{size:14}),onClick:()=>{F(null),A()}}),e.jsx($e,{label:"Delete",leftIcon:e.jsx(j.TrashIcon,{size:14}),variant:"danger",onClick:()=>B(0)})]})})]})]})}return e.jsxs("div",{className:re,role:ae?void 0:"button",tabIndex:w||ae?-1:0,"aria-disabled":w,"aria-label":ae?void 0:T,onClick:ae?void 0:A,onKeyDown:q,onDragStart:y=>y.preventDefault(),onDragOver:U,onDragLeave:L,onDrop:M,children:[e.jsx("input",{ref:k,type:"file",accept:D,multiple:Q,disabled:w,onChange:K,className:ue.input,tabIndex:-1}),C&&e.jsxs("div",{className:ue.dropOverlay,children:[e.jsx(j.UploadSimpleIcon,{size:24,className:ue.dropOverlayIcon}),e.jsx("span",{className:ue.dropOverlayText,children:"Drop files to upload"})]}),X?E():ae?t==="file"?e.jsxs(e.Fragment,{children:[V.map((y,Z)=>e.jsx(Oo,{file:y.file??new File([],y.name??"file"),status:(p==null?void 0:p[Z])??"idle",onRemove:()=>B(Z)},y.url)),he&&e.jsxs("button",{type:"button",className:ue.addFileBtn,onClick:y=>{y.stopPropagation(),A()},children:[e.jsx(j.PlusIcon,{size:14}),e.jsx("span",{children:"Add file"})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:[ue.previewItem,ue.previewItemLarge,I===0&&ue.previewItemActive].filter(Boolean).join(" "),onClick:()=>{var y;V[0].file&&((y=o??a)==null||y(V[0].file,0)),r==null||r(0)},children:[e.jsx(St,{variant:ce(V[0]),size:"square-4xl",src:V[0].url,alt:V[0].name??((W=V[0].file)==null?void 0:W.name)??""}),e.jsx("span",{className:ue.coverBadge,"aria-label":"Cover",children:e.jsx(j.GalleryHorizontalEndIcon,{size:12})}),pe(0)]}),e.jsxs("div",{className:ue.smallGrid,children:[V.slice(1).map((y,Z)=>{var se;return e.jsxs("div",{className:[ue.previewItem,I===Z+1&&ue.previewItemActive].filter(Boolean).join(" "),onClick:()=>{var ge;y.file&&((ge=o??a)==null||ge(y.file,Z+1)),r==null||r(Z+1)},children:[e.jsx(St,{variant:ce(y),size:"square-2xl",src:y.url,alt:y.name??((se=y.file)==null?void 0:se.name)??""}),pe(Z+1)]},y.url)}),he&&e.jsxs("div",{className:ue.addControl,children:[e.jsx("button",{type:"button",className:ue.addBtn,"aria-label":"Add more files","aria-haspopup":Y?"menu":void 0,"aria-expanded":Y?oe:void 0,onClick:y=>{if(y.stopPropagation(),!Y){A();return}F(null),le(Z=>!Z)},children:e.jsx(j.PlusIcon,{size:20})}),Y&&oe&&e.jsx("div",{className:ue.addMenuDropdown,onMouseDown:y=>y.stopPropagation(),onClick:y=>y.stopPropagation(),children:e.jsxs(Je,{children:[e.jsx($e,{label:m,onClick:()=>{le(!1),_?_():A()}}),e.jsx($e,{label:h,onClick:()=>{le(!1),Y()}})]})})]})]})]}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:ue.description,children:R}),$&&e.jsxs("div",{className:ue.actions,onClick:y=>y.stopPropagation(),children:[e.jsx(ve,{type:"button",variant:"neutral",size:"sm",disabled:w,onClick:y=>{y.stopPropagation(),_?_():A()},children:m}),e.jsx(Qt,{type:"button",tone:"base",size:"base",disabled:w,onClick:y=>{y.stopPropagation(),Y==null||Y()},children:h})]})]})]})}const Qj="_root_1i411_1",ev="_truncate_1i411_17",Bs={root:Qj,"size-2xsmall":"_size-2xsmall_1i411_7","size-xsmall":"_size-xsmall_1i411_8","size-small":"_size-small_1i411_9","size-medium":"_size-medium_1i411_10","size-large":"_size-large_1i411_11","size-xlarge":"_size-xlarge_1i411_12","weight-400":"_weight-400_1i411_14","weight-500":"_weight-500_1i411_15",truncate:ev};function ft({as:t="p",size:s="medium",weight:n="400",color:o="inherit",align:a,truncate:r=!1,className:l,style:i,children:c,...u}){const _=[Bs.root,Bs[`size-${s}`],Bs[`weight-${n}`],r&&Bs.truncate,l].filter(Boolean).join(" "),m={color:o==="inherit"?void 0:`var(--foregrounds-fg-${o})`,textAlign:a,...i};return e.jsx(t,{className:_,style:m,...u,children:c})}const tv="_root_na36l_1",sv="_image_na36l_18",nv="_placeholder_na36l_26",ov="_placeholderIcon_na36l_40",cs={root:tv,image:sv,placeholder:nv,placeholderIcon:ov};function Wo({status:t="default",src:s,alt:n="",loadingLabel:o="Loading previewβ¦",loadingHint:a="~5 min",noPreviewLabel:r="Preview couldn't be loaded",className:l}){const[i,c]=d.useState(!1),u=t==="no-preview"||!s||i;return e.jsx("div",{className:[cs.root,l].filter(Boolean).join(" "),children:t==="loading"?e.jsxs("div",{className:cs.placeholder,children:[e.jsx(Tt,{size:"sm"}),e.jsx(ft,{size:"small",weight:"500",color:"subtle",children:o}),e.jsx(ft,{size:"xsmall",color:"muted",children:a})]}):u?e.jsxs("div",{className:cs.placeholder,children:[e.jsx(j.ImageSquareIcon,{size:24,className:cs.placeholderIcon}),e.jsx(ft,{size:"small",color:"subtle",children:r})]}):e.jsx("img",{src:s,alt:n,className:cs.image,onError:()=>c(!0)})})}const av="_root_1ukn0_1",rv="_frame_1ukn0_9",lv="_badges_1ukn0_21",iv="_thumbnailWrap_1ukn0_27",cv="_info_1ukn0_31",dv="_text_1ukn0_39",uv="_actions_1ukn0_46",Et={root:av,frame:rv,badges:lv,thumbnailWrap:iv,info:cv,text:dv,actions:uv};function _v({status:t="default",src:s,alt:n,badges:o,title:a,version:r,onEdit:l,editLabel:i="Edit",activeLabel:c,onActiveClick:u,"data-state":_,className:m,style:h}){return e.jsxs("div",{className:[Et.root,m].filter(Boolean).join(" "),"data-state":_,style:h,children:[e.jsxs("div",{className:Et.frame,children:[o&&e.jsx("div",{className:Et.badges,children:o}),e.jsx("div",{className:Et.thumbnailWrap,children:e.jsx(Wo,{status:t,src:s,alt:n})})]}),e.jsxs("div",{className:Et.info,children:[e.jsxs("div",{className:Et.text,children:[r&&e.jsx(ft,{size:"small",weight:"500",color:"subtle",truncate:!0,children:r}),e.jsx(ft,{size:"large",weight:"500",color:"base",truncate:!0,children:a})]}),(l||c)&&e.jsxs("div",{className:Et.actions,children:[l&&e.jsx(ve,{variant:"neutral",size:"sm",onClick:l,children:i}),c&&e.jsx(ve,{variant:"neutral",size:"sm",onClick:u,children:c})]})]})]})}const mv="_root_iumlv_1",fv={root:mv};function hv({children:t,className:s}){return e.jsx("div",{className:[fv.root,s].filter(Boolean).join(" "),children:t})}const pv="_root_6n4or_1",xv="_dragHandle_6n4or_12",gv="_content_6n4or_19",bv="_valueRow_6n4or_27",jv="_removeButton_6n4or_37",ds={root:pv,dragHandle:xv,content:gv,valueRow:bv,removeButton:jv};function vv({attributeSlot:t,operatorSlot:s,valueSlot:n,onRemove:o,removeLabel:a="Remove",removeDisabled:r=!1,dragHandleProps:l,className:i}){return e.jsxs("div",{className:[ds.root,i].filter(Boolean).join(" "),children:[e.jsx("span",{className:ds.dragHandle,children:e.jsx(xe,{icon:e.jsx(j.DotsSixVerticalIcon,{size:15}),variant:"transparent","aria-label":"Drag to reorder",...l})}),e.jsxs("div",{className:ds.content,children:[t,e.jsxs("div",{className:ds.valueRow,children:[s,n]})]}),o&&e.jsx("span",{className:ds.removeButton,children:e.jsx(xe,{icon:e.jsx(j.CloseIcon,{size:15}),variant:"transparent","aria-label":a,disabled:r,onClick:o})})]})}const yv="_root_srgnl_1",Nv="_icon_srgnl_12",$v="_content_srgnl_19",wv="_message_srgnl_25",Cs={root:yv,icon:Nv,content:$v,message:wv};function kv({message:t,learnMoreLabel:s="Learn more",learnMoreHref:n,onLearnMore:o,className:a,style:r}){const l=n||o;function i(){n?window.open(n,"_blank","noopener,noreferrer"):o==null||o()}return e.jsxs("div",{className:[Cs.root,a].filter(Boolean).join(" "),style:r,children:[e.jsx("span",{className:Cs.icon,children:e.jsx(j.InfoIcon,{size:14})}),e.jsxs("span",{className:Cs.content,children:[e.jsx("span",{className:Cs.message,children:t}),l&&e.jsx(Qt,{size:"sm",tone:"interactive",onClick:i,children:s})]})]})}const Iv="_root_8ommz_1",zv="_closable_8ommz_18",Sv="_icon_8ommz_22",Bv="_content_8ommz_75",Cv="_title_8ommz_80",Tv="_description_8ommz_84",Dv="_actions_8ommz_88",Mv="_compact_8ommz_96",ct={root:Iv,closable:zv,icon:Sv,"variant-information":"_variant-information_8ommz_35","variant-success":"_variant-success_8ommz_43","variant-warning":"_variant-warning_8ommz_51","variant-error":"_variant-error_8ommz_59","variant-neutral":"_variant-neutral_8ommz_67",content:Bv,title:Cv,description:Tv,actions:Dv,compact:Mv},Rv={information:e.jsx(j.InfoIcon,{size:15}),success:e.jsx(j.CheckCircleIcon,{size:15}),warning:e.jsx(j.WarningCircleIcon,{size:15}),error:e.jsx(j.XCircleIcon,{size:15}),neutral:e.jsx(j.InfoIcon,{size:15})};function Ev({variant:t="information",title:s,description:n,actions:o,closable:a=!1,compact:r=!1,open:l=!0,onClose:i,className:c,style:u}){const[_,m]=d.useState(l);if(d.useEffect(()=>{m(l)},[l]),!_)return null;function h(){m(!1),i==null||i()}return e.jsxs("div",{role:"alert",className:[ct.root,ct[`variant-${t}`],r&&ct.compact,a&&ct.closable,c].filter(Boolean).join(" "),style:u,children:[e.jsx("span",{className:ct.icon,children:Rv[t]}),e.jsxs("div",{className:ct.content,children:[!r&&s&&e.jsx("div",{className:ct.title,children:s}),n&&e.jsx("div",{className:ct.description,children:n}),o&&e.jsx("div",{className:ct.actions,children:o})]}),a&&e.jsx(xe,{icon:e.jsx(j.CloseIcon,{size:15}),"aria-label":"Kapat",variant:"transparent",size:"2xsmall",onClick:h})]})}const Lv="_root_1tqf5_3",Av="_line_1tqf5_14",qv="_filled_1tqf5_30",Fv="_ghost_1tqf5_38",Pv="_body_1tqf5_44",Ov="_title_1tqf5_51",Kt={root:Lv,line:Av,"type-information":"_type-information_1tqf5_23","type-warning":"_type-warning_1tqf5_24","type-error":"_type-error_1tqf5_25","type-success":"_type-success_1tqf5_26",filled:qv,ghost:Fv,body:Pv,title:Ov};function Wv({type:t="information",variant:s="filled",title:n,children:o,className:a}){const r=[Kt.root,Kt[`type-${t}`],Kt[s],a].filter(Boolean).join(" ");return e.jsxs("div",{className:r,children:[e.jsx("span",{className:Kt.line,"aria-hidden":!0}),e.jsxs("p",{className:Kt.body,children:[n&&e.jsx("strong",{className:Kt.title,children:n}),o]})]})}const Hv="_root_1h8c7_1",Gv="_image_1h8c7_13",Uv="_content_1h8c7_28",Vv="_title_1h8c7_38",Kv="_description_1h8c7_49",Yv="_actions_1h8c7_58",Xv="_dismiss_1h8c7_66",It={root:Hv,image:Gv,content:Uv,title:Vv,description:Kv,actions:Yv,dismiss:Xv};function Zv({title:t,description:s,action:n,imagePosition:o="right",imageSrc:a,dismissible:r=!1,onDismiss:l,className:i}){const c=e.jsx("span",{className:It.image,style:a?{backgroundImage:`url(${a})`}:void 0,"aria-hidden":!0});return e.jsxs("div",{className:[It.root,o==="left"&&It.imageLeft,i].filter(Boolean).join(" "),children:[o==="left"&&c,e.jsxs("div",{className:It.content,children:[e.jsx("h3",{className:It.title,children:t}),e.jsx("p",{className:It.description,children:s}),n&&e.jsx("div",{className:It.actions,children:n})]}),o==="right"&&c,r&&e.jsx("button",{type:"button",className:It.dismiss,onClick:l,"aria-label":"Dismiss",children:e.jsx(j.CloseIcon,{size:16})})]})}const Jv="_root_168dh_3",Qv="_item_168dh_12",e0="_active_168dh_30",t0="_forceHover_168dh_32",Fs={root:Jv,item:Qv,active:e0,forceHover:t0};function s0({children:t,className:s,style:n}){return e.jsx("div",{className:[Fs.root,s].filter(Boolean).join(" "),style:n,role:"tablist",children:t})}function n0({label:t,active:s=!1,forceHover:n=!1,onClick:o,className:a}){return e.jsx("button",{type:"button",role:"tab","aria-selected":s,className:[Fs.item,s&&Fs.active,n&&Fs.forceHover,a].filter(Boolean).join(" "),onClick:o,children:t})}const o0="_root_cndph_3",a0="_item_cndph_9",r0="_icon_cndph_36",l0="_label_cndph_48",i0="_forceFocus_cndph_59",c0="_active_cndph_67",qt={root:o0,item:a0,icon:r0,label:l0,forceFocus:i0,active:c0};function d0({children:t,className:s,style:n}){return e.jsx("div",{className:[qt.root,s].filter(Boolean).join(" "),style:n,role:"tablist",children:t})}const u0={"not-started":j.CircleDashedIcon,"in-progress":j.ContrastIcon,completed:j.CheckCircleIcon};function _0({label:t,status:s="not-started",active:n=!1,forceFocus:o=!1,onClick:a,className:r}){const l=u0[s];return e.jsxs("button",{type:"button",role:"tab","aria-selected":n,className:[qt.item,qt[`status-${s}`],n&&qt.active,o&&qt.forceFocus,r].filter(Boolean).join(" "),onClick:a,children:[e.jsx("span",{className:qt.icon,children:e.jsx(l,{size:15})}),e.jsx("span",{className:qt.label,children:t})]})}const m0="_root_1dw74_1",f0="_normal_1dw74_12",h0="_disabled_1dw74_13",p0="_error_1dw74_14",x0="_icon_1dw74_24",g0="_iconSlot_1dw74_28",Ts={root:m0,normal:f0,disabled:h0,error:p0,icon:x0,iconSlot:g0};function gn({type:t="normal",children:s,className:n,id:o}){const a=[Ts.root,Ts[t],n].filter(Boolean).join(" ");return e.jsxs("span",{id:o,className:a,children:[t==="error"&&e.jsx("span",{className:Ts.iconSlot,children:e.jsx(j.WarningCircleIcon,{size:15,className:Ts.icon})}),s]})}const b0="_root_17015_1",j0={root:b0};function v0({label:t,labelType:s="plus",optional:n=!1,tooltip:o,hint:a,error:r,id:l,children:i,className:c,style:u}){const _=d.useId(),m=l??`${_}-field`,h=`${m}-hint`,f=`${m}-error`,p=r!=null&&r!==!1,x=p?f:a?h:void 0,N=d.Children.only(i),b=d.isValidElement(N)?d.cloneElement(N,{id:N.props.id??m,"aria-describedby":N.props["aria-describedby"]??x,...p?typeof N.type=="string"?{"aria-invalid":!0}:{error:N.props.error??!0,"aria-invalid":!0}:null}):N;return e.jsxs("div",{className:[j0.root,c].filter(Boolean).join(" "),style:u,children:[t&&e.jsx(yn,{htmlFor:m,type:s,optional:n,tooltip:o,children:t}),b,p?e.jsx(gn,{id:f,type:"error",children:r}):a?e.jsx(gn,{id:h,type:"normal",children:a}):null]})}const y0="_root_hmptw_1",N0="_truncate_hmptw_18",Ds={root:y0,"size-medium":"_size-medium_hmptw_7","size-large":"_size-large_hmptw_8","size-xlarge":"_size-xlarge_hmptw_9","size-2xlarge":"_size-2xlarge_hmptw_10","size-3xlarge":"_size-3xlarge_hmptw_11","size-4xlarge":"_size-4xlarge_hmptw_12","size-5xlarge":"_size-5xlarge_hmptw_13","weight-400":"_weight-400_hmptw_15","weight-500":"_weight-500_hmptw_16",truncate:N0},$0={h1:"xlarge",h2:"large",h3:"medium",h4:"xlarge",h5:"large",h6:"medium"};function Ho({as:t="h1",size:s,weight:n="500",color:o="inherit",align:a,truncate:r=!1,className:l,style:i,children:c,...u}){const _=s??$0[t],m=[Ds.root,Ds[`size-${_}`],Ds[`weight-${n}`],r&&Ds.truncate,l].filter(Boolean).join(" "),h={color:o==="inherit"?void 0:`var(--foregrounds-fg-${o})`,textAlign:a,...i};return e.jsx(t,{className:m,style:h,...u,children:c})}const w0="_root_1r3rq_7",k0="_trigger_1r3rq_12",I0="_triggerCheckers_1r3rq_35",z0="_triggerColor_1r3rq_41",S0="_panel_1r3rq_47",B0="_panelInline_1r3rq_57",C0="_modeTabs_1r3rq_62",T0="_modeActive_1r3rq_64",D0="_gradientControls_1r3rq_65",M0="_subheading_1r3rq_66",R0="_stopRow_1r3rq_68",E0="_stopWrap_1r3rq_69",L0="_stop_1r3rq_68",A0="_addStop_1r3rq_70",q0="_stopActive_1r3rq_71",F0="_removeStop_1r3rq_72",P0="_gradientStyles_1r3rq_75",O0="_styleActive_1r3rq_77",W0="_gradientMode_1r3rq_78",H0="_pickerRow_1r3rq_78",G0="_hexRow_1r3rq_79",U0="_alphaRow_1r3rq_80",V0="_presetGrid_1r3rq_81",K0="_gradient_1r3rq_65",Y0="_gradWhite_1r3rq_101",X0="_gradBlack_1r3rq_108",Z0="_cursor_1r3rq_115",J0="_hueBar_1r3rq_129",Q0="_hueCursor_1r3rq_149",ey="_hexWrap_1r3rq_168",ty="_hexSwatch_1r3rq_180",sy="_hexInput_1r3rq_188",ny="_alphaTrack_1r3rq_208",oy="_alphaSlider_1r3rq_226",ay="_alphaInputWrap_1r3rq_262",ry="_alphaInput_1r3rq_262",ly="_alphaPercent_1r3rq_293",iy="_swatch_1r3rq_308",cy="_deleteAction_1r3rq_331",ie={root:w0,trigger:k0,triggerCheckers:I0,triggerColor:z0,panel:S0,panelInline:B0,modeTabs:C0,modeActive:T0,gradientControls:D0,subheading:M0,stopRow:R0,stopWrap:E0,stop:L0,addStop:A0,stopActive:q0,removeStop:F0,gradientStyles:P0,styleActive:O0,gradientMode:W0,pickerRow:H0,hexRow:G0,alphaRow:U0,presetGrid:V0,gradient:K0,gradWhite:Y0,gradBlack:X0,cursor:Z0,hueBar:J0,hueCursor:Q0,hexWrap:ey,hexSwatch:ty,hexInput:sy,alphaTrack:ny,alphaSlider:oy,alphaInputWrap:ay,alphaInput:ry,alphaPercent:ly,swatch:iy,deleteAction:cy};function Go(t,s,n){s/=100,n/=100;const o=r=>(r+t/60)%6,a=r=>n*(1-s*Math.max(0,Math.min(o(r),4-o(r),1)));return[Math.round(a(5)*255),Math.round(a(3)*255),Math.round(a(1)*255)]}function fs(t,s,n){return"#"+[t,s,n].map(o=>o.toString(16).padStart(2,"0")).join("")}function Os(t){const s=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return s?[parseInt(s[1],16),parseInt(s[2],16),parseInt(s[3],16)]:null}function dy(t,s,n){t/=255,s/=255,n/=255;const o=Math.max(t,s,n),a=Math.min(t,s,n),r=o-a;let l=0;return r!==0&&(o===t?l=((s-n)/r+6)%6:o===s?l=(n-t)/r+2:l=(t-s)/r+4,l*=60),[Math.round(l),o===0?0:Math.round(r/o*100),Math.round(o*100)]}function Ms(t){const s=Os(t);return s?dy(...s):[0,100,100]}function Yt(t,s,n){return fs(...Go(t,s,n))}function uy(t){const s=/rgba?\(\s*(\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\s*\)/.exec(t);return s?{hex:fs(+s[1],+s[2],+s[3]),alpha:s[4]!==void 0?Math.round(+s[4]*100):100}:null}const _y=[["#FF0000","#FF8C00","#FFFF00","#00CC00","#00AAFF","#3300CC","#FF00FF"],["#000000","#333333","#666666","#888888","#AAAAAA","#DDDDDD","#FFFFFF"]];function my(t){const s=t.trim(),n=/^#?([a-f\d])([a-f\d])([a-f\d])$/i.exec(s);if(n)return`#${n.slice(1).map(i=>i+i).join("")}`.toUpperCase();const o=Os(s);if(o)return fs(...o).toUpperCase();const a=/^rgba?\(\s*(\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\s*\)$/i.exec(s);if(!a)return null;const r=a.slice(1,4).map(Number),l=a[4]===void 0?1:Number(a[4]);return r.some(i=>i>255)||l<0||l>1?null:fs(r[0],r[1],r[2]).toUpperCase()}const fy=[{id:"linear-90",label:"Linear gradient 90 degrees"},{id:"linear-180",label:"Linear gradient 180 degrees"},{id:"linear-135",label:"Linear gradient 135 degrees"},{id:"radial-center",label:"Radial gradient at 50% 50%"},{id:"radial-top-left",label:"Radial gradient at 0% 0%"}];function Lt(t,s){const n=[...t].sort((a,r)=>a.position-r.position).map(a=>`${a.color} ${a.position}%`).join(", ");return s==="radial-center"?`radial-gradient(circle at 50% 50%, ${n})`:s==="radial-top-left"?`radial-gradient(circle at 0% 0%, ${n})`:`linear-gradient(${s==="linear-180"?180:s==="linear-135"?135:90}deg, ${n})`}function Uo({value:t,defaultValue:s="#3b82f6",onChange:n,showAlpha:o=!1,alwaysOpen:a=!1,presetColors:r,onDelete:l,deleteLabel:i="Delete",mode:c="solid",defaultMode:u="solid",solidLabel:_="Solid",gradientLabel:m="Gradient"}){const h=t!==void 0,f=Array.from(new Set((r??_y.flat()).map(my).filter(E=>E!==null)));function p(E){if(E.startsWith("rgb")){const W=uy(E);if(W)return{hsb:Ms(W.hex),alpha:W.alpha}}return{hsb:Ms(E),alpha:100}}const x=p(h?t:s),[N,b]=d.useState(x.hsb),[z,g]=d.useState(x.alpha),[S,w]=d.useState(()=>Yt(...x.hsb)),[T,R]=d.useState(a),[H,Q]=d.useState(c==="gradient"?"gradient":u),[ee,Y]=d.useState("linear-90"),[$,k]=d.useState([{id:"start",color:"#000000",position:0},{id:"end",color:"#666666",position:100}]),[C,te]=d.useState("start"),[V,ne,I]=N,F=Yt(V,ne,I),oe=fs(...Go(V,100,100)),le=Os(F),v=o?`rgba(${le[0]}, ${le[1]}, ${le[2]}, ${z/100})`:F,D=d.useRef(null),A=d.useRef(null),P=d.useRef(!1),B=d.useRef(!1);d.useEffect(()=>{if(!h||!t||t.includes("gradient("))return;const E=p(t);b(E.hsb),g(E.alpha),w(Yt(...E.hsb))},[t]);function G(E,W,y,Z){const se=Yt(E,W,y),[ge,_e,Te]=Os(se),Qe=o?`rgba(${ge}, ${_e}, ${Te}, ${+(Z/100).toFixed(2)})`:se;if(H==="gradient"){const Ye=$.map(we=>we.id===C?{...we,color:Qe}:we);k(Ye),n==null||n(Lt(Ye,ee));return}n==null||n(Qe)}function q(E){te(E.id);const W=p(E.color);b(W.hsb),g(W.alpha),w(Yt(...W.hsb))}function U(){const W={id:`stop-${Date.now()}`,color:F,position:50},y=[...$,W];k(y),q(W),n==null||n(Lt(y,ee))}function L(E){Y(E),n==null||n(Lt($,E))}function M(E,W){const y=$.map(Z=>Z.id===E?{...Z,color:W}:Z);k(y),n==null||n(Lt(y,ee))}function K(E){var y;const W=$.filter(Z=>Z.id!==E);k(W),C===E&&te(((y=W[0])==null?void 0:y.id)??""),n==null||n(Lt(W,ee))}function ae(E,W,y,Z=z){const se=Yt(E,W,y);w(se),h||(b([E,W,y]),g(Z)),G(E,W,y,Z)}function he(E){if(!D.current)return;const W=D.current.getBoundingClientRect(),y=Math.max(0,Math.min(E.clientX-W.left,W.width)),Z=Math.max(0,Math.min(E.clientY-W.top,W.height)),se=Math.round(y/W.width*100),ge=Math.round((1-Z/W.height)*100);b([V,se,ge]),ae(V,se,ge)}function X(E){if(!A.current)return;const W=A.current.getBoundingClientRect(),y=Math.max(0,Math.min(E.clientY-W.top,W.height)),Z=Math.round(y/W.height*360);b([Z,ne,I]),ae(Z,ne,I)}function re(E){let W=E.target.value;if(W.startsWith("#")&&(W=W.slice(1)),W=W.replace(/[^a-f0-9]/gi,"").slice(0,6),w("#"+W),W.length===6){const y=Ms("#"+W);b(y),G(y[0],y[1],y[2],z)}}function ce(E){const W=Ms(E);b(W),w(E.toUpperCase()),G(W[0],W[1],W[2],z)}const pe=e.jsxs("div",{className:[a?ie.panelInline:ie.panel,H==="gradient"&&ie.gradientMode].filter(Boolean).join(" "),children:[c==="both"&&e.jsxs("div",{className:ie.modeTabs,children:[e.jsx("button",{type:"button",className:H==="solid"?ie.modeActive:"",onClick:()=>Q("solid"),children:_}),e.jsx("button",{type:"button",className:H==="gradient"?ie.modeActive:"",onClick:()=>Q("gradient"),children:m})]}),H==="gradient"&&e.jsxs("div",{className:ie.gradientControls,children:[e.jsx("div",{className:ie.subheading,children:"Gradient colors"}),e.jsxs("div",{className:ie.stopRow,children:[$.map((E,W)=>e.jsxs("span",{className:ie.stopWrap,children:[e.jsx(Ee,{placement:"bottom-start",offset:6,bare:!0,trigger:e.jsx("button",{type:"button",className:[ie.stop,C===E.id&&ie.stopActive].filter(Boolean).join(" "),style:{background:E.color},onClick:()=>q(E),"aria-label":`Edit color stop at ${E.position}%`}),children:e.jsx(Uo,{alwaysOpen:!0,value:E.color,onChange:y=>M(E.id,y),presetColors:r,showAlpha:o})}),W>1&&e.jsx("button",{type:"button",className:ie.removeStop,onClick:()=>K(E.id),"aria-label":"Remove color stop",children:e.jsx(j.XIcon,{size:10})})]},E.id)),e.jsx("button",{type:"button",className:ie.addStop,onClick:U,"aria-label":"Add color stop",children:e.jsx(j.PlusIcon,{size:14})})]}),e.jsx("div",{className:ie.subheading,children:"Style"}),e.jsx("div",{className:ie.gradientStyles,children:fy.map(E=>e.jsx("button",{type:"button",className:ee===E.id?ie.styleActive:"",style:{background:Lt($,E.id)},onClick:()=>L(E.id),"aria-label":E.label,title:E.label},E.id))})]}),e.jsxs("div",{className:ie.pickerRow,children:[e.jsxs("div",{ref:D,className:ie.gradient,style:{background:oe},onPointerDown:E=>{var W;P.current=!0,(W=D.current)==null||W.setPointerCapture(E.pointerId),he(E)},onPointerMove:E=>{P.current&&he(E)},onPointerUp:()=>{P.current=!1},children:[e.jsx("div",{className:ie.gradWhite}),e.jsx("div",{className:ie.gradBlack}),e.jsx("div",{className:ie.cursor,style:{left:`${ne}%`,top:`${100-I}%`}})]}),e.jsx("div",{ref:A,className:ie.hueBar,onPointerDown:E=>{var W;B.current=!0,(W=A.current)==null||W.setPointerCapture(E.pointerId),X(E)},onPointerMove:E=>{B.current&&X(E)},onPointerUp:()=>{B.current=!1},children:e.jsx("div",{className:ie.hueCursor,style:{top:`${V/360*100}%`}})})]}),e.jsx("div",{className:ie.hexRow,children:e.jsxs("div",{className:ie.hexWrap,children:[e.jsx("span",{className:ie.hexSwatch,style:{background:F}}),e.jsx("input",{className:ie.hexInput,value:S.toUpperCase(),onChange:re,spellCheck:!1,maxLength:7})]})}),o&&e.jsxs("div",{className:ie.alphaRow,children:[e.jsx("div",{className:ie.alphaTrack,style:{"--alpha-color":F},children:e.jsx("input",{type:"range",min:0,max:100,value:z,onChange:E=>{const W=Number(E.target.value);g(W),ae(V,ne,I,W)},className:ie.alphaSlider})}),e.jsxs("div",{className:ie.alphaInputWrap,children:[e.jsx("input",{className:ie.alphaInput,type:"number",min:0,max:100,value:z,onChange:E=>{const W=Math.max(0,Math.min(100,Number(E.target.value)));g(W),ae(V,ne,I,W)}}),e.jsx("span",{className:ie.alphaPercent,children:"%"})]})]}),f.length>0&&e.jsx("div",{className:ie.presetGrid,children:f.map(E=>e.jsx("button",{type:"button",className:ie.swatch,style:{background:E},onClick:()=>ce(E),"aria-label":`Select color ${E}`},E))}),l&&e.jsx("div",{className:ie.deleteAction,children:e.jsx(ve,{variant:"danger",size:"sm",fullWidth:!0,onClick:()=>{l(),a||R(!1)},children:i})})]});return a?e.jsx("div",{className:ie.root,children:pe}):e.jsx("div",{className:ie.root,children:e.jsx(Ee,{open:T,onOpenChange:R,placement:"bottom-start",offset:4,bare:!0,trigger:e.jsxs("button",{className:ie.trigger,"aria-label":`Color: ${v}`,children:[o&&e.jsx("span",{className:ie.triggerCheckers}),e.jsx("span",{className:ie.triggerColor,style:{background:H==="gradient"?Lt($,ee):v}})]}),children:pe})})}const hy="_root_cizb6_2",py="_disabled_cizb6_9",xy="_header_cizb6_15",gy="_label_cizb6_21",by="_values_cizb6_28",jy="_trackWrap_cizb6_36",vy="_track_cizb6_36",yy="_fill_cizb6_53",Ny="_input_cizb6_61",$y="_inputActive_cizb6_90",wy="_tooltip_cizb6_118",ky="_minmax_cizb6_145",be={root:hy,disabled:py,header:xy,label:gy,values:by,trackWrap:jy,track:vy,fill:yy,input:Ny,inputActive:$y,tooltip:wy,minmax:ky},Gn=16;function Iy(t){return`calc(${t}% + ${Gn/2-t/100*Gn}px)`}function _n({value:t,pct:s}){return e.jsx("div",{className:be.tooltip,style:{left:Iy(s)},children:t})}function zy(t){const{min:s=0,max:n=100,step:o=1,disabled:a=!1,label:r,formatValue:l=f=>String(f),className:i}=t,c=d.useId(),u=f=>n===s?0:Math.max(0,Math.min(100,(f-s)/(n-s)*100)),[_,m]=d.useState(null);if(t.range){const[f,p]=t.value;return e.jsxs("div",{className:[be.root,a&&be.disabled,i].filter(Boolean).join(" "),children:[r&&e.jsxs("div",{className:be.header,children:[e.jsx("span",{className:be.label,children:r}),e.jsxs("span",{className:be.values,children:[l(f)," β ",l(p)]})]}),e.jsxs("div",{className:be.trackWrap,children:[e.jsx("div",{className:be.track,children:e.jsx("div",{className:be.fill,style:{left:`${u(f)}%`,width:`${u(p)-u(f)}%`}})}),_==="lo"&&e.jsx(_n,{value:l(f),pct:u(f)}),_==="hi"&&e.jsx(_n,{value:l(p),pct:u(p)}),e.jsx("input",{type:"range",id:`${c}-minimum`,"aria-label":r?`${r} minimum`:"Minimum value",className:`${be.input} ${_==="lo"?be.inputActive:""}`,min:s,max:n,step:o,value:f,disabled:a,onChange:x=>t.onChange([Math.min(Number(x.target.value),p-o),p]),onPointerDown:()=>m("lo"),onPointerUp:()=>m(null),onFocus:()=>m("lo"),onBlur:()=>m(null)}),e.jsx("input",{type:"range",id:`${c}-maximum`,"aria-label":r?`${r} maximum`:"Maximum value",className:`${be.input} ${_==="hi"?be.inputActive:""}`,min:s,max:n,step:o,value:p,disabled:a,onChange:x=>t.onChange([f,Math.max(Number(x.target.value),f+o)]),onPointerDown:()=>m("hi"),onPointerUp:()=>m(null),onFocus:()=>m("hi"),onBlur:()=>m(null)})]}),!r&&e.jsxs("div",{className:be.minmax,children:[e.jsx("span",{children:l(s)}),e.jsx("span",{children:l(n)})]})]})}const h=t.value;return e.jsxs("div",{className:[be.root,a&&be.disabled,i].filter(Boolean).join(" "),children:[r&&e.jsxs("div",{className:be.header,children:[e.jsx("label",{htmlFor:c,className:be.label,children:r}),e.jsx("span",{className:be.values,children:l(h)})]}),e.jsxs("div",{className:be.trackWrap,children:[e.jsx("div",{className:be.track,children:e.jsx("div",{className:be.fill,style:{left:"0%",width:`${u(h)}%`}})}),_==="single"&&e.jsx(_n,{value:l(h),pct:u(h)}),e.jsx("input",{id:c,"aria-label":r?void 0:"Value",type:"range",className:`${be.input} ${_==="single"?be.inputActive:""}`,min:s,max:n,step:o,value:h,disabled:a,onChange:f=>t.onChange(Number(f.target.value)),onPointerDown:()=>m("single"),onPointerUp:()=>m(null),onFocus:()=>m("single"),onBlur:()=>m(null)})]}),!r&&e.jsxs("div",{className:be.minmax,children:[e.jsx("span",{children:l(s)}),e.jsx("span",{children:l(n)})]})]})}const Sy="_overlay_7161b_1",By="_dialog_7161b_19",Cy="_content_7161b_38",Ty="_title_7161b_42",Dy="_description_7161b_50",My="_footer_7161b_57",Xt={overlay:Sy,dialog:By,content:Cy,title:Ty,description:Dy,footer:My};function Ry({open:t,onClose:s,onConfirm:n,title:o,description:a,variant:r="confirm",cancelLabel:l="Cancel",confirmLabel:i="Continue",confirmLoading:c=!1,className:u}){const _=d.useRef(null);return hs(t),d.useEffect(()=>{if(!t||c)return;function m(h){h.key==="Escape"&&s()}return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[t,c,s]),d.useEffect(()=>{var m;t&&((m=_.current)==null||m.focus())},[t]),t?pt.createPortal(e.jsx("div",{className:Xt.overlay,onMouseDown:m=>{m.target===m.currentTarget&&!c&&s()},children:e.jsxs("div",{ref:_,role:"alertdialog","aria-modal":"true","aria-labelledby":"prompt-title","aria-describedby":a?"prompt-description":void 0,className:[Xt.dialog,u].filter(Boolean).join(" "),tabIndex:-1,children:[e.jsxs("div",{className:Xt.content,children:[e.jsx("h2",{id:"prompt-title",className:Xt.title,children:o}),a&&e.jsx("p",{id:"prompt-description",className:Xt.description,children:a})]}),e.jsxs("div",{className:Xt.footer,children:[e.jsx(ve,{variant:"neutral",size:"sm",disabled:c,onClick:s,children:l}),e.jsx(ve,{variant:r==="danger"?"danger":"inverted",size:"sm",loading:c,onClick:n,children:i})]})]})}),document.body):null}const Ey="_overlay_1mpyx_2",Ly="_fadeIn_1mpyx_1",Ay="_panel_1mpyx_16",qy="_slideInRight_1mpyx_1",Fy="_sm_1mpyx_38",Py="_md_1mpyx_39",Oy="_lg_1mpyx_40",Wy="_header_1mpyx_51",Hy="_title_1mpyx_60",Gy="_headerActions_1mpyx_68",Uy="_body_1mpyx_76",Vy="_footer_1mpyx_86",Ky="_closeBtn_1mpyx_98",dt={overlay:Ey,fadeIn:Ly,panel:Ay,slideInRight:qy,sm:Fy,md:Py,lg:Oy,header:Wy,title:Hy,headerActions:Gy,body:Uy,footer:Vy,closeBtn:Ky};function Yy({open:t,onClose:s,title:n,children:o,footer:a,width:r="md",closable:l=!0,className:i}){const c=d.useRef(null);return hs(t),d.useEffect(()=>{if(!t)return;function u(_){_.key==="Escape"&&!_.defaultPrevented&&s()}return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[t,s]),d.useEffect(()=>{var u;t&&((u=c.current)==null||u.focus())},[t]),t?pt.createPortal(e.jsx("div",{className:dt.overlay,onMouseDown:u=>{u.target===u.currentTarget&&s()},"aria-modal":"true",role:"dialog",children:e.jsxs("div",{ref:c,className:[dt.panel,dt[r],i].filter(Boolean).join(" "),tabIndex:-1,"aria-labelledby":n?"drawer-title":void 0,children:[(n||l)&&e.jsxs("div",{className:dt.header,children:[n&&e.jsx("span",{id:"drawer-title",className:dt.title,children:n}),l&&e.jsxs("div",{className:dt.headerActions,children:[e.jsx(mt,{children:"esc"}),e.jsx("button",{className:dt.closeBtn,onClick:s,"aria-label":"Close",children:e.jsx(j.CloseIcon,{size:16})})]})]}),o&&e.jsx(Dt,{direction:"y",size:"thin",className:dt.body,children:o}),a&&e.jsx("div",{className:dt.footer,children:a})]})}),document.body):null}const Xy="_container_1vfw5_2",Zy="_slot_1vfw5_14",Jy="_slotContent_1vfw5_20",Qy="_card_1vfw5_25",eN="_toastEnter_1vfw5_1",tN="_exit_1vfw5_45",sN="_toastCollapse_1vfw5_1",nN="_toastExit_1vfw5_1",oN="_icon_1vfw5_123",aN="_content_1vfw5_149",rN="_title_1vfw5_157",lN="_description_1vfw5_164",iN="_closeBtn_1vfw5_171",We={container:Xy,slot:Zy,slotContent:Jy,card:Qy,toastEnter:eN,exit:tN,toastCollapse:sN,toastExit:nN,icon:oN,"icon-information":"_icon-information_1vfw5_132","icon-success":"_icon-success_1vfw5_135","icon-warning":"_icon-warning_1vfw5_138","icon-error":"_icon-error_1vfw5_141","icon-neutral":"_icon-neutral_1vfw5_144",content:aN,title:rN,description:lN,closeBtn:iN},cN={information:e.jsx(j.InfoIcon,{size:16}),success:e.jsx(j.CheckCircleIcon,{size:16}),warning:e.jsx(j.WarningCircleIcon,{size:16}),error:e.jsx(j.XCircleIcon,{size:16}),neutral:e.jsx(j.InfoIcon,{size:16})};function Vo({id:t,title:s,description:n,variant:o="neutral",duration:a=4e3,closable:r=!0,onRemove:l}){const[i,c]=d.useState(!1),u=d.useRef(!1),_=d.useCallback(()=>{c(!0)},[]),m=d.useCallback(()=>{u.current||(u.current=!0,l(t))},[t,l]);return d.useEffect(()=>{if(a===1/0||i)return;const h=setTimeout(_,a);return()=>clearTimeout(h)},[a,_,i]),d.useEffect(()=>{if(!i)return;const h=setTimeout(m,400);return()=>clearTimeout(h)},[i,m]),e.jsx("div",{className:[We.slot,i&&We.exit].filter(Boolean).join(" "),onAnimationEnd:h=>{i&&h.target===h.currentTarget&&m()},children:e.jsx("div",{className:We.slotContent,children:e.jsxs("div",{className:[We.card,We[o]].filter(Boolean).join(" "),role:"alert",children:[e.jsx("span",{className:[We.icon,We[`icon-${o}`]].join(" "),children:cN[o]}),e.jsxs("div",{className:We.content,children:[s&&e.jsx("span",{className:We.title,children:s}),n&&e.jsx("span",{className:We.description,children:n})]}),r&&e.jsx("button",{className:We.closeBtn,onClick:_,"aria-label":"Kapat",children:e.jsx(j.CloseIcon,{size:14})})]})})})}const Ko=d.createContext(null);function dN({children:t}){const[s,n]=d.useState([]),o=d.useCallback(r=>{const l=Math.random().toString(36).slice(2);n(i=>[...i,{...r,id:l}])},[]),a=d.useCallback(r=>{n(l=>l.filter(i=>i.id!==r))},[]);return e.jsxs(Ko.Provider,{value:{toast:o,toasts:s},children:[t,pt.createPortal(e.jsx("div",{className:We.container,"aria-live":"polite",children:s.map(r=>e.jsx(Vo,{...r,onRemove:a},r.id))}),document.body)]})}function uN(){const t=d.useContext(Ko);if(!t)throw new Error("useToast must be used inside <ToastProvider>");const{toast:s,toasts:n}=t;return{toast:s,toasts:n,success:(o,a)=>s({title:o,variant:"success",...a}),error:(o,a)=>s({title:o,variant:"error",...a}),warning:(o,a)=>s({title:o,variant:"warning",...a}),information:(o,a)=>s({title:o,variant:"information",...a})}}const _N="_root_18xzd_1",mN="_settings_18xzd_25",fN="_compact_18xzd_30",hN="_icon_18xzd_47",pN="_avatar_18xzd_57",xN="_label_18xzd_66",gN="_trailingIcon_18xzd_81",bN="_dark_18xzd_97",ut={root:_N,settings:mN,compact:fN,icon:hN,avatar:pN,label:xN,trailingIcon:gN,dark:bN};function jN({area:t,label:s,avatar:n,compact:o=!1,variant:a="light",className:r,...l}){return e.jsxs("button",{type:"button","aria-label":o?s:void 0,className:[ut.root,a==="dark"&&ut.dark,ut[t],o&&ut.compact,r].filter(Boolean).join(" "),...l,children:[t==="settings"?e.jsx("span",{className:ut.icon,"aria-hidden":!0,children:e.jsx(j.ArrowLeftIcon,{size:15})}):e.jsx("span",{className:ut.avatar,children:n}),e.jsx("span",{className:ut.label,children:s}),t==="main"&&e.jsx("span",{className:[ut.icon,ut.trailingIcon].join(" "),"aria-hidden":!0,children:e.jsx(j.DotsThreeIcon,{size:15})})]})}const vN="_root_fom94_1",yN="_label_fom94_34",NN="_icon_fom94_46",$N="_dark_fom94_55",Rs={root:vN,label:yN,icon:NN,dark:$N};function wN({label:t,open:s=!0,variant:n="light",className:o,...a}){return e.jsxs("button",{type:"button",className:[Rs.root,n==="dark"&&Rs.dark,o].filter(Boolean).join(" "),...a,children:[e.jsx("span",{className:Rs.label,children:t}),e.jsx("span",{className:Rs.icon,"aria-hidden":!0,children:s?e.jsx(j.MinusIcon,{size:15}):e.jsx(j.PlusIcon,{size:15})})]})}const kN="_root_6a53x_1",IN="_compact_6a53x_24",zN="_parent_6a53x_30",SN="_child_6a53x_34",BN="_extension_6a53x_38",CN="_selected_6a53x_47",TN="_marginBottom_6a53x_58",DN="_body_6a53x_62",MN="_icon_6a53x_79",RN="_label_6a53x_89",EN="_count_6a53x_122",LN="_badge_6a53x_129",AN="_kbd_6a53x_130",qN="_rightButtons_6a53x_136",FN="_dark_6a53x_169",Ce={root:kN,compact:IN,parent:zN,child:SN,extension:BN,selected:CN,marginBottom:TN,body:DN,icon:MN,label:RN,count:EN,badge:LN,kbd:AN,rightButtons:qN,dark:FN};function PN({type:t,label:s,leftIcon:n,avatar:o,count:a,badge:r,kbd:l,rightButtons:i,onClick:c,selected:u=!1,compact:_=!1,variant:m="light",className:h,...f}){return e.jsxs("div",{className:[Ce.root,m==="dark"&&Ce.dark,t==="parent"&&Ce.parent,(t==="child"||t==="child-bottom")&&Ce.child,t==="extension"&&Ce.extension,t==="child-bottom"&&Ce.marginBottom,u&&Ce.selected,_&&Ce.compact,h].filter(Boolean).join(" "),...f,children:[e.jsxs("button",{type:"button",className:Ce.body,"aria-label":_?s:void 0,onClick:c,children:[t==="extension"?e.jsx("span",{className:Ce.icon,children:o}):t==="parent"&&n&&e.jsx("span",{className:Ce.icon,"aria-hidden":!0,children:n}),e.jsx("span",{className:Ce.label,children:s}),a!==void 0&&e.jsx("span",{className:Ce.count,children:a}),t==="parent"&&r&&e.jsx("span",{className:Ce.badge,children:r}),l&&e.jsx("span",{className:Ce.kbd,children:l})]}),t==="parent"&&i&&e.jsx("div",{className:Ce.rightButtons,children:i})]})}const ON="_root_12bbt_1",WN="_description_12bbt_48",HN="_trailing_12bbt_49",GN="_content_12bbt_53",UN="_heading_12bbt_60",VN="_square_12bbt_79",Zt={root:ON,description:WN,trailing:HN,content:GN,heading:UN,square:VN},KN=d.forwardRef(function({as:s,heading:n,variant:o="row",description:a,icon:r,avatar:l,trailing:i,href:c,disabled:u=!1,className:_,onClick:m,onKeyDown:h,"data-state":f="default",...p},x){const N=s??(c?"a":"button"),b=N==="button",z=i===null?null:i??(o==="row"?e.jsx(j.ChevronRightIcon,{size:16}):null),g=w=>{if(u){w.preventDefault(),w.stopPropagation();return}m==null||m(w)},S=w=>{if(u){w.preventDefault();return}h==null||h(w)};return e.jsxs(N,{ref:x,className:[Zt.root,Zt[o],_].filter(Boolean).join(" "),href:u?void 0:c,type:b?"button":void 0,disabled:b?u:void 0,"aria-disabled":u||void 0,tabIndex:u&&!b?-1:void 0,"data-state":f,onClick:g,onKeyDown:S,...p,children:[l??(r!==void 0?e.jsx(Bt,{type:"icon",icon:r,size:"small",shape:"rounded"}):null),e.jsxs("span",{className:Zt.content,children:[e.jsx(ft,{as:"span",size:"small",weight:"500",color:"inherit",className:Zt.heading,truncate:!0,children:n}),a!==void 0&&e.jsx(ft,{as:"span",size:"small",color:"inherit",className:Zt.description,truncate:!0,children:a})]}),z!==null&&e.jsx("span",{className:Zt.trailing,"aria-hidden":"true",children:z})]})}),YN="_root_zwf0t_2",XN="_close_zwf0t_22",ZN="_content_zwf0t_28",mn={root:YN,close:XN,content:ZN};function JN({heading:t,description:s,icon:n,state:o="default",onClose:a,className:r,...l}){return e.jsxs("div",{className:[mn.root,r].filter(Boolean).join(" "),"data-state":o,...l,children:[e.jsx(Bt,{type:"icon",icon:n,size:"base",shape:"rounded"}),e.jsxs("div",{className:mn.content,children:[e.jsx(Ho,{as:"h6",size:"medium",weight:"500",truncate:!0,children:t}),s&&e.jsx(ft,{as:"span",size:"small",color:"subtle",truncate:!0,children:s})]}),a&&e.jsx("span",{className:mn.close,children:e.jsx(xe,{icon:e.jsx(j.CloseIcon,{size:14}),"aria-label":"Remove node",variant:"transparent",size:"2xsmall",onClick:i=>{i.stopPropagation(),a()}})})]})}const QN="_root_1jm9u_2",e$="_svg_1jm9u_10",t$="_edgePath_1jm9u_17",s$="_arrowMarker_1jm9u_24",n$="_label_1jm9u_46",us={root:QN,svg:e$,edgePath:t$,arrowMarker:s$,label:n$},o$={bezier:"M 10 15 C 100 15 140 65 230 65",straight:"M 10 15 L 230 65",step:"M 10 15 L 120 15 L 120 65 L 230 65"};function a$({type:t="bezier",label:s,state:n="default",className:o}){const r=`flow-arrow-${d.useId().replace(/:/g,"")}`;return e.jsxs("div",{className:[us.root,o].filter(Boolean).join(" "),"data-state":n,children:[e.jsxs("svg",{className:us.svg,viewBox:"0 0 240 80",fill:"none","aria-hidden":!0,children:[e.jsx("defs",{children:e.jsx("marker",{id:r,viewBox:"0 0 10 10",refX:"10",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto",children:e.jsx("path",{d:"M 0 0 L 10 5 L 0 10 z",className:us.arrowMarker})})}),e.jsx("path",{d:o$[t],className:us.edgePath,markerEnd:`url(#${r})`})]}),s&&e.jsx("span",{className:us.label,children:s})]})}const r$="_root_1rb36_2",l$={root:r$};function i$({onZoomIn:t,onZoomOut:s,onFitView:n,onReset:o,className:a}){return e.jsxs("div",{className:[l$.root,a].filter(Boolean).join(" "),children:[e.jsx(xe,{icon:e.jsx(j.ZoomInIcon,{size:15}),"aria-label":"Zoom in",variant:"transparent",size:"sm",radius:"full",onClick:t}),e.jsx(xe,{icon:e.jsx(j.ZoomOutIcon,{size:15}),"aria-label":"Zoom out",variant:"transparent",size:"sm",radius:"full",onClick:s}),e.jsx(xe,{icon:e.jsx(j.ArrowsOutSimpleIcon,{size:15}),"aria-label":"Fit view",variant:"transparent",size:"sm",radius:"full",onClick:n}),e.jsx(xe,{icon:e.jsx(j.ArrowsClockwiseIcon,{size:15}),"aria-label":"Reset",variant:"transparent",size:"sm",radius:"full",onClick:o})]})}const c$="_root_1br1r_2",d$="_pulsing_1br1r_18",Un={root:c$,pulsing:d$};function u$({pulsing:t=!1,disabled:s,onClick:n,"aria-label":o="Add step",className:a}){return e.jsx("span",{className:[Un.root,t?Un.pulsing:void 0,a].filter(Boolean).join(" "),children:e.jsx(xe,{icon:e.jsx(j.PlusIcon,{size:15}),"aria-label":o,variant:"neutral",size:"sm",radius:"full",disabled:s,onClick:n})})}const _$="_root_1fr6n_1",m$={root:_$};function f$({className:t,...s}){return e.jsx("div",{...s,className:[m$.root,t].filter(Boolean).join(" ")})}const h$="_root_6gd8v_1",p$="_item_6gd8v_2",x$="_header_6gd8v_4",g$="_indicator_6gd8v_5",b$="_open_6gd8v_6",j$="_plus_6gd8v_7",v$="_content_6gd8v_9",At={root:h$,item:p$,header:x$,indicator:g$,open:b$,plus:j$,content:v$};function y$({status:t}){return t==="completed"?e.jsx(j.CircleCheckIcon,{size:16}):t==="in-progress"?e.jsx(j.ContrastIcon,{size:16}):e.jsx(j.CircleDashedIcon,{size:16})}function N$({items:t,defaultOpen:s,className:n}){const[o,a]=d.useState(s);return e.jsx("div",{className:[At.root,n].filter(Boolean).join(" "),children:t.map(r=>{const l=o===r.id;return e.jsxs("div",{className:[At.item,l&&At.open].filter(Boolean).join(" "),children:[e.jsxs("button",{type:"button",className:At.header,"aria-expanded":l,onClick:()=>a(l?void 0:r.id),children:[e.jsx("span",{className:At.indicator,children:e.jsx(y$,{status:r.status})}),r.title,e.jsx("span",{className:At.plus,children:e.jsx(j.PlusIcon,{size:16})})]}),l&&e.jsx("div",{className:At.content,children:r.content})]},r.id)})})}exports.Accordion=ob;exports.Alert=Ev;exports.AutoComplete=Up;exports.Avatar=Bt;exports.BREAKPOINTS=eo;exports.Badge=Ct;exports.Box=jn;exports.Breadcrumb=Zf;exports.BreadcrumbItem=Xf;exports.Button=ve;exports.ButtonGroup=Ao;exports.ButtonGroupItem=_s;exports.Callout=Wv;exports.CalloutCard=Zv;exports.Card=Eo;exports.CardInput=Xb;exports.Chat=Wr;exports.ChatAttachment=Jn;exports.ChatBubble=ii;exports.ChatDateSeparator=Mi;exports.ChatReference=zi;exports.ChatUnreadSeparator=Ri;exports.Checkbox=xs;exports.CheckboxLabel=Qu;exports.ColorPicker=Uo;exports.CommandBar=$1;exports.CommandBarButton=S1;exports.ConditionBlock=hv;exports.ConditionRow=vv;exports.Container=f$;exports.CurrencyInput=Cb;exports.DATA_GRID_ROW_HEIGHT=go;exports.DataGrid=vo;exports.DataGridActionButton=to;exports.DataGridBooleanCell=so;exports.DataGridCell=He;exports.DataGridColumnVisibility=ro;exports.DataGridCurrencyCell=no;exports.DataGridErrorSummary=co;exports.DataGridHeader=lo;exports.DataGridHeaderCell=io;exports.DataGridLinkCell=uo;exports.DataGridMultilineCell=po;exports.DataGridNumberCell=Hs;exports.DataGridReadOnlyCell=_o;exports.DataGridRow=Ps;exports.DataGridSelectCell=fo;exports.DataGridSkeleton=mo;exports.DataGridTextCell=ho;exports.DataGridToggleableNumberCell=xo;exports.DataGridVirtualBody=bo;exports.DatePicker=pn;exports.DatePickerCalendar=As;exports.DatePickerCell=Bo;exports.DatePickerDay=Co;exports.DatePickerInput=Mo;exports.DatePickerPreset=Do;exports.DatePickerSelector=To;exports.Divider=ec;exports.Drawer=Yy;exports.EmptyState=wo;exports.Field=v0;exports.FileUploadArea=Jj;exports.FileUploadCard=Oo;exports.FilterMenu=O1;exports.FilterMenuDateItem=cg;exports.FilterMenuDivider=lg;exports.FilterMenuInputItem=dg;exports.FilterMenuItem=Z1;exports.FilterMenuSearch=og;exports.FilterMenuSkeleton=mg;exports.FilterMenuTitle=eg;exports.Flag=Pf;exports.Flex=rc;exports.FlowAddButton=u$;exports.FlowControls=i$;exports.FlowEdge=a$;exports.FlowNode=JN;exports.Grid=dc;exports.Heading=Ho;exports.HelperBanner=kv;exports.Hint=gn;exports.IconButton=xe;exports.Input=Ke;exports.Kbd=mt;exports.Label=yn;exports.LinkButton=Qt;exports.List=Vn;exports.Menu=Je;exports.MenuAvatar=Ed;exports.MenuCaption=ud;exports.MenuGroup=ad;exports.MenuItem=$e;exports.MenuItemCheckbox=Xn;exports.MenuItemRadio=Yn;exports.MenuSeparator=oo;exports.MenuTitle=id;exports.MenuUsage=lu;exports.Modal=Fo;exports.NavigationCard=KN;exports.NumberInput=Rb;exports.OtpInput=rj;exports.PasswordInput=bb;exports.PasswordStrength=Ib;exports.Popover=Ee;exports.PopoverCloseContext=bn;exports.ProgressAccordion=N$;exports.ProgressBar=ao;exports.ProgressTabs=d0;exports.ProgressTabsItem=_0;exports.Prompt=Ry;exports.Radio=yo;exports.RadioLabel=y_;exports.RangeSlider=zy;exports.Scrollable=Dt;exports.Search=zo;exports.SearchDialog=Cf;exports.SearchInput=$o;exports.SearchItem=hn;exports.SearchModalInput=Io;exports.SegmentedControl=ko;exports.SegmentedControlItem=fn;exports.Select=Bp;exports.SelectItem=$n;exports.SelectMenu=Nn;exports.SelectMenuSearch=Lp;exports.SelectMenuTitle=Dp;exports.SidebarHeader=jN;exports.SidebarListItem=PN;exports.SidebarTitle=wN;exports.Skeleton=Ne;exports.Spinner=Tt;exports.Switch=vn;exports.SwitchLabel=q_;exports.TabItem=n0;exports.Table=px;exports.TableCell=Ix;exports.TableCellMedia=Mx;exports.TableFilter=_1;exports.TableFilterBar=xg;exports.TableFilterChip=fg;exports.TableFooter=r1;exports.TableHeader=Lo;exports.TableMenu=b1;exports.TableRow=e1;exports.TableScroll=Gx;exports.Tabs=s0;exports.Tag=ps;exports.TagSelect=Xp;exports.Text=ft;exports.Textarea=pb;exports.ThemeCard=_v;exports.ThemeCardThumbnail=Wo;exports.Thumbnail=St;exports.ToastCard=Vo;exports.ToastProvider=dN;exports.Tooltip=ht;exports.TreeSelect=cx;exports.TreeSelectItem=Ro;exports.UnlockFeaturesModal=Kg;exports.UrlInput=Eb;exports.getPasswordStrength=Po;exports.isResponsiveObject=Ws;exports.resolveBoxStyle=Qn;exports.setResponsiveVars=Jt;exports.usePopoverClose=Kn;exports.useSearchShortcut=Tf;exports.useToast=uN;
|