??????????????
??????????????
??????????????
??????????????
Warning : Undefined variable $auth in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
Warning : Trying to access array offset on value of type null in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
??????????????
??????????????
??????????????
??????????????
File Manager
✏️ Edit File: /home/mklsvubc/am1atec.co.uk/wp-content/plugins/surerank/build/vendor-4ff60e8d/index.js
⬅ Kembali
"use strict";(globalThis.webpackChunksurerank=globalThis.webpackChunksurerank||[]).push([[3897],{74443(e,t,r){r.d(t,{A:()=>c});var n=r(10790),s=r(51609),o=r(44329),l=r(56877),i=r(89667),a=r(20659),d=r(71087);const c=(0,s.forwardRef)(({id:e,label:t,defaultChecked:r=!1,checked:c,onChange:u,indeterminate:m,disabled:p,size:f="md",className:g,...x},h)=>{const b=(0,s.useMemo)(()=>e||`checkbox-${(0,o.Ak)()}`,[e]),y=(0,s.useMemo)(()=>`${b}-description`,[b]),v=(0,s.useMemo)(()=>typeof c<"u",[c]),[w,j]=(0,s.useState)(r||!1),N="primary",k={sm:{checkbox:"size-4 rounded gap-1",icon:"size-3",text:"text-sm",description:"text-sm",gap:"gap-0.5"},md:{checkbox:"size-5 rounded gap-1",icon:"size-4",text:"text-base",description:"text-sm",gap:"gap-1"}},C={primary:{checkbox:"border-border-strong hover:border-border-interactive checked:border-border-interactive bg-white checked:bg-toggle-on checked:hover:bg-toggle-on-hover checked:hover:border-toggle-on-hover focus:ring-2 focus:ring-offset-2 focus:ring-focus",icon:"text-white"}},S=(0,s.useCallback)(()=>v?c:w,[v,c,w]),A=(0,s.useCallback)(()=>(0,s.isValidElement)(t)?t:t?.heading||t?.description?(0,n.jsxs)("div",{className:k[f].gap,children:[t?.heading&&(0,n.jsx)(d.A,{className:(0,l.cn)("text-text-primary font-medium leading-4 m-0",k[f].text,k[f].gap,p&&"text-text-disabled"),htmlFor:b,children:t?.heading}),t?.description&&(0,n.jsx)(d.A,{tag:"p",id:y,className:(0,l.cn)("font-normal leading-5 m-0",k[f].description,p&&"text-text-disabled"),variant:"help",children:t?.description})]}):null,[t,f,p]);return(0,n.jsxs)("div",{className:(0,l.cn)("inline-flex items-center justify-center gap-2",!!t&&"items-start",p&&"cursor-not-allowed"),children:[(0,n.jsxs)("span",{className:(0,l.cn)("relative flex items-center justify-center rounded-full p-0.5",!p&&"cursor-pointer"),children:[(0,n.jsx)("input",{ref:h,id:b,type:"checkbox",...m&&{"aria-checked":"mixed"},...t?.description&&{"aria-describedby":y},className:(0,l.cn)("peer relative cursor-pointer appearance-none transition-all m-0 before:content-[''] checked:before:content-[''] checked:before:hidden before:hidden !border-1.5 border-solid focus:outline-none",C[N].checkbox,k[f].checkbox,p&&"cursor-not-allowed disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled",g),checked:S(),onChange:e=>{if(p)return;const t=e.target.checked;v||j(t),"function"==typeof u&&u(t)},disabled:p,...x}),(0,n.jsx)("span",{"aria-hidden":"true",className:(0,l.cn)("pointer-events-none inline-flex items-center absolute top-2/4 not-rtl:left-2/4 rtl:right-2/4 -translate-y-2/4 -translate-x-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",C[N].icon,p&&"cursor-not-allowed peer-disabled:text-border-disabled"),children:(0,n.jsx)(m?a.A:i.A,{className:(0,l.cn)(k[f]?.icon)})})]}),!!t&&A()]})});c.displayName="Checkbox"},45350(e,t,r){r.d(t,{mc:()=>S});var n=r(10790),s=r(51609),o=r(56877);const l={sm:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},md:{1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},lg:{1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"}},i={sm:{xs:"gap-2",sm:"gap-4",md:"gap-5",lg:"gap-6",xl:"gap-6","2xl":"gap-8"},md:{xs:"md:gap-2",sm:"md:gap-4",md:"md:gap-5",lg:"md:gap-6",xl:"md:gap-6","2xl":"md:gap-8"},lg:{xs:"lg:gap-2",sm:"lg:gap-4",md:"lg:gap-5",lg:"lg:gap-6",xl:"lg:gap-6","2xl":"lg:gap-8"}},a={sm:{xs:"gap-x-2",sm:"gap-x-4",md:"gap-x-5",lg:"gap-x-6",xl:"gap-x-6","2xl":"gap-x-8"},md:{xs:"md:gap-x-2",sm:"md:gap-x-4",md:"md:gap-x-5",lg:"md:gap-x-6",xl:"md:gap-x-6","2xl":"md:gap-x-8"},lg:{xs:"lg:gap-x-2",sm:"lg:gap-x-4",md:"lg:gap-x-5",lg:"lg:gap-x-6",xl:"lg:gap-x-6","2xl":"lg:gap-x-8"}},d={sm:{xs:"gap-y-2",sm:"gap-y-4",md:"gap-y-5",lg:"gap-y-6",xl:"gap-y-6","2xl":"gap-y-8"},md:{xs:"md:gap-y-2",sm:"md:gap-y-4",md:"md:gap-y-5",lg:"md:gap-y-6",xl:"md:gap-y-6","2xl":"md:gap-y-8"},lg:{xs:"lg:gap-y-2",sm:"lg:gap-y-4",md:"lg:gap-y-5",lg:"lg:gap-y-6",xl:"lg:gap-y-6","2xl":"lg:gap-y-8"}},c={sm:{1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12"},md:{1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12"},lg:{1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12"}},u={sm:{1:"col-start-1",2:"col-start-2",3:"col-start-3",4:"col-start-4",5:"col-start-5",6:"col-start-6",7:"col-start-7",8:"col-start-8",9:"col-start-9",10:"col-start-10",11:"col-start-11",12:"col-start-12"},md:{1:"md:col-start-1",2:"md:col-start-2",3:"md:col-start-3",4:"md:col-start-4",5:"md:col-start-5",6:"md:col-start-6",7:"md:col-start-7",8:"md:col-start-8",9:"md:col-start-9",10:"md:col-start-10",11:"md:col-start-11",12:"md:col-start-12"},lg:{1:"lg:col-start-1",2:"lg:col-start-2",3:"lg:col-start-3",4:"lg:col-start-4",5:"lg:col-start-5",6:"lg:col-start-6",7:"lg:col-start-7",8:"lg:col-start-8",9:"lg:col-start-9",10:"lg:col-start-10",11:"lg:col-start-11",12:"lg:col-start-12"}},m={sm:{row:"grid-flow-row",column:"grid-flow-col","row-dense":"grid-flow-row-dense","column-dense":"grid-flow-col-dense"},md:{row:"md:grid-flow-row",column:"md:grid-flow-col","row-dense":"md:grid-flow-row-dense","column-dense":"md:grid-flow-col-dense"},lg:{row:"lg:grid-flow-row",column:"lg:grid-flow-col","row-dense":"lg:grid-flow-row-dense","column-dense":"lg:grid-flow-col-dense"}},p={sm:{normal:"justify-normal",start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly",stretch:"justify-stretch"},md:{normal:"md:justify-normal",start:"md:justify-start",end:"md:justify-end",center:"md:justify-center",between:"md:justify-between",around:"md:justify-around",evenly:"md:justify-evenly",stretch:"md:justify-stretch"},lg:{normal:"lg:justify-normal",start:"lg:justify-start",end:"lg:justify-end",center:"lg:justify-center",between:"lg:justify-between",around:"lg:justify-around",evenly:"lg:justify-evenly",stretch:"lg:justify-stretch"}},f={sm:{start:"items-start",end:"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"},md:{start:"md:items-start",end:"md:items-end",center:"md:items-center",baseline:"md:items-baseline",stretch:"md:items-stretch"},lg:{start:"lg:items-start",end:"lg:items-end",center:"lg:items-center",baseline:"lg:items-baseline",stretch:"lg:items-stretch"}},g={sm:{start:"self-start",end:"self-end",center:"self-center",baseline:"self-baseline",stretch:"self-stretch"},md:{start:"md:self-start",end:"md:self-end",center:"md:self-center",baseline:"md:self-baseline",stretch:"md:self-stretch"},lg:{start:"lg:self-start",end:"lg:self-end",center:"lg:self-center",baseline:"lg:self-baseline",stretch:"lg:self-stretch"}},x={sm:{auto:"justify-self-auto",start:"justify-self-start",end:"justify-self-end",center:"justify-self-center",baseline:"justify-self-baseline",stretch:"justify-self-stretch"},md:{auto:"md:justify-self-auto",start:"md:justify-self-start",end:"md:justify-self-end",center:"md:justify-self-center",baseline:"md:justify-self-baseline",stretch:"md:justify-self-stretch"},lg:{auto:"lg:justify-self-auto",start:"lg:justify-self-start",end:"lg:justify-self-end",center:"lg:justify-self-center",baseline:"lg:justify-self-baseline",stretch:"lg:justify-self-stretch"}},h={sm:{row:"flex-row","row-reverse":"flex-row-reverse",column:"flex-col","column-reverse":"flex-col-reverse"},md:{row:"md:flex-row","row-reverse":"md:flex-row-reverse",column:"md:flex-col","column-reverse":"md:flex-col-reverse"},lg:{row:"lg:flex-row","row-reverse":"lg:flex-row-reverse",column:"lg:flex-col","column-reverse":"lg:flex-col-reverse"}},b={sm:{wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse",nowrap:"flex-nowrap"},md:{wrap:"md:flex-wrap","wrap-reverse":"md:flex-wrap-reverse",nowrap:"md:flex-nowrap"},lg:{wrap:"lg:flex-wrap","wrap-reverse":"lg:flex-wrap-reverse",nowrap:"lg:flex-nowrap"}},y={sm:{1:"w-full",2:"w-1/2",3:"w-1/3",4:"w-1/4",5:"w-1/5",6:"w-1/6",7:"w-1/7",8:"w-1/8",9:"w-1/9",10:"w-1/10",11:"w-1/11",12:"w-1/12"},md:{1:"md:w-full",2:"md:w-1/2",3:"md:w-1/3",4:"md:w-1/4",5:"md:w-1/5",6:"md:w-1/6",7:"md:w-1/7",8:"md:w-1/8",9:"md:w-1/9",10:"md:w-1/10",11:"md:w-1/11",12:"md:w-1/12"},lg:{1:"lg:w-full",2:"lg:w-1/2",3:"lg:w-1/3",4:"lg:w-1/4",5:"lg:w-1/5",6:"lg:w-1/6",7:"lg:w-1/7",8:"lg:w-1/8",9:"lg:w-1/9",10:"lg:w-1/10",11:"lg:w-1/11",12:"lg:w-1/12"}},v={sm:{1:"order-1",2:"order-2",3:"order-3",4:"order-4",5:"order-5",6:"order-6",7:"order-7",8:"order-8",9:"order-9",10:"order-10",11:"order-11",12:"order-12",first:"order-first",last:"order-last",none:"order-none"},md:{1:"md:order-1",2:"md:order-2",3:"md:order-3",4:"md:order-4",5:"md:order-5",6:"md:order-6",7:"md:order-7",8:"md:order-8",9:"md:order-9",10:"md:order-10",11:"md:order-11",12:"md:order-12",first:"md:order-first",last:"md:order-last",none:"md:order-none"},lg:{1:"lg:order-1",2:"lg:order-2",3:"lg:order-3",4:"lg:order-4",5:"lg:order-5",6:"lg:order-6",7:"lg:order-7",8:"lg:order-8",9:"lg:order-9",10:"lg:order-10",11:"lg:order-11",12:"lg:order-12",first:"lg:order-first",last:"lg:order-last",none:"lg:order-none"}},w={sm:{0:"grow-0",1:"grow"},md:{0:"md:grow-0",1:"md:grow"},lg:{0:"lg:grow-0",1:"lg:grow"}},j={sm:{0:"shrink-0",1:"shrink"},md:{0:"md:shrink-0",1:"md:shrink"},lg:{0:"lg:shrink-0",1:"lg:shrink"}},N=(e,t,r,n="sm")=>{const s=[];switch(typeof e){case"object":for(const[n,l]of Object.entries(e))t[n]&&s.push(t?.[n]?.[l]??t?.[n]?.[r?.[n]]??"");break;case"string":case"number":const o=n;s.push(t?.[o]?.[e]??t?.[o]?.[r?.[o]]??"");break;default:if(void 0===e)break;s.push(t?.[n]?.[r]??"")}return s.join(" ")},k=({className:e,cols:t,gap:r,gapX:s,gapY:c,align:u,justify:g,gridFlow:x,colsSubGrid:h=!1,rowsSubGrid:b=!1,autoRows:y=!1,autoCols:v=!1,children:w,...j})=>{const k=N(t,l,1),C=N(r,i,"sm"),S=N(s,a,""),A=N(c,d,""),z=N(u,f,""),E=N(g,p,""),D=N(x,m,"");return(0,n.jsx)("div",{className:(0,o.cn)("grid",{"grid-cols-subgrid":h,"grid-rows-subgrid":b,"auto-cols-auto":v,"auto-rows-auto":y},k,C,S,A,z,E,D,e),...j,children:w})};k.Item=({className:e,children:t,colSpan:r,colStart:s,alignSelf:l,justifySelf:i,...a})=>{const d=N(r,c,0),m=N(s,u,0),p=N(l,g,""),f=N(i,x,"");return(0,n.jsx)("div",{className:(0,o.cn)(d,m,p,f,e),...a,children:t})};const C=(0,s.createContext)({}),S=({containerType:e="flex",gap:t="sm",gapX:r,gapY:s,direction:l,justify:c,align:u,wrap:m,cols:g,className:x,children:y,...v})=>{if("grid"===e)return(0,n.jsx)(C.Provider,{value:{containerType:e},children:(0,n.jsx)(k,{className:x,gap:t,gapX:r,gapY:s,cols:g,children:y,align:u,justify:c,...v})});const w=N(m,b,""),j=N(t,i,"sm"),S=N(r,a,""),A=N(s,d,""),z=N(l,h,""),E=N(c,p,""),D=N(u,f,""),I=(0,o.cn)("flex",w,j,S,A,z,E,D,x);return(0,n.jsx)(C.Provider,{value:{containerType:e,cols:g},children:"flex"===e?(0,n.jsx)("div",{className:I,children:y}):(0,n.jsx)(k,{className:x,gap:t,gapX:r,gapY:s,cols:g,children:y,align:u,justify:c,...v})})},A=({grow:e,shrink:t,order:r,alignSelf:l,justifySelf:i,className:a,children:d,...c})=>{const{containerType:u,cols:m}=(0,s.useContext)(C);if("grid"===u)return(0,n.jsx)(k.Item,{className:a,alignSelf:l,justifySelf:i,children:d,...c});const p=N(l,g,""),f=N(i,x,""),h=N(e,w,0),b=N(t,j,0),S=N(r,v,0),A=N(m,y,1);return(0,n.jsx)("div",{className:(0,o.cn)("box-border",h,b,S,p,f,A,a),children:d})};S.Item=A,S.displayName="Container",A.displayName="Container.Item"},24345(e,t,r){r.d(t,{A:()=>F});var n=r(10790),s=r(51609),o=r(53232),l=r(69011),i=r(51409),a=r(84e3),d=r(65313),c=r(60125),u=r(88652),m=r(99524),p=r(48497),f=r(6463),g=r(74279),x=r(14533),h=r(47402),b=r(56877),y=r(40337),v=r(4155);const w=()=>(0,n.jsx)("span",{className:"bg-icon-interactive h-1 w-1 absolute rounded-full inline-block bottom-0 left-1/2 right-1/2"}),j=e=>(0,d.GP)(e,"E").slice(0,1),N=(e,t=24)=>Array.from({length:t},(t,r)=>e+r),k=(e,t)=>t?(0,g.g)((0,x.a)(e,(0,y.q)(t)),(0,v.O)(t)):e,C=e=>"multiple"===e?[]:"range"===e?{from:void 0,to:void 0}:void 0;var S=r(88029);const A=({width:e,className:t,classNames:r,selectedDates:y,setSelectedDates:v,showOutsideDays:C=!0,mode:A="single",variant:z="normal",alignment:E="horizontal",numberOfMonths:D,enableTimeSelection:I=!1,disabled:M,...P})=>{const R=s.isValidElement(P.footer)||"function"==typeof P.footer,F=I&&"multiple"!==A,[T,O]=(0,s.useState)(!1),[L,_]=(0,s.useState)(!1),[B,$]=(0,s.useState)((new Date).getFullYear()),[V,K]=(0,s.useState)(B-B%24);void 0===y&&(y="multiple"===A?[]:"range"===A?{from:void 0,to:void 0}:void 0);const H=({weekdays:e})=>(0,n.jsx)("div",{className:"flex justify-between",children:e.map((e,t)=>(0,n.jsx)("button",{className:"h-10 w-10 px-1.5 py-2 text-center text-text-secondary text-sm font-normal content-center bg-transparent border-none shrink-0",children:e},t))}),G=e=>(0,n.jsx)("div",{className:"flex flex-col bsf-force-ui-month-weeks",children:e.children[1].props.children.map((e,t)=>(0,n.jsx)("div",{className:"flex flex-row justify-between",children:e},t))}),W=(e,t,r)=>(0,n.jsxs)("div",{className:"flex flex-col items-start gap-1 flex-1",children:[(0,n.jsx)("span",{className:"text-xs font-medium text-text-secondary",children:r}),(0,n.jsx)("input",{type:"time",className:(0,b.cn)("w-full px-2 py-1 rounded text-sm font-normal text-text-primary bg-field-secondary-background outline outline-1 outline-border-subtle border-none transition-[color,box-shadow,outline] duration-200","focus:outline-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",!t&&"outline-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled"),value:t?(0,d.GP)(t,"HH:mm"):"",disabled:!t,onChange:t=>((e,t)=>{const{value:r}=e.target;if(!r)return;if("single"===t){if(!(y instanceof Date))return;const[e,t]=r.split(":").map(Number);return void v((0,g.g)((0,x.a)(y,e),t))}const n=y;if(!n?.[t])return;const[s,o]=r.split(":").map(Number),l=(0,g.g)((0,x.a)(n[t],s),o),i={...n,[t]:l},a="from"===t?"to":"from";i.from&&i.to&&(0,h.d)(i.from,i.to)&&(i[a]=k(i[a],l)),v(i)})(t,e),"aria-label":r})]}),Y=F?(0,n.jsx)("div",{className:(0,b.cn)("flex items-end gap-3 p-2 bg-background-primary border-solid border-border-subtle","presets"===z?"border-l border-r border-t-0 border-b":"border border-t-0",!R&&("presets"===z?"rounded-br-md":"rounded-bl-md rounded-br-md")),children:"single"===A?W("single",y,"Time"):(0,n.jsxs)(n.Fragment,{children:[W("from",y?.from,"Start time"),W("to",y?.to,"End time")]})}):null,U=(0,b.cn)("relative bg-background-primary shadow-datepicker-wrapper",e,"vertical"===E?"flex flex-col":"flex flex-row gap-3","normal"===z?"rounded-tr-md rounded-tl-md border border-solid border-border-subtle":"","presets"===z?"rounded-tr-md border border-solid border-border-subtle":"","dualdate"===z?"rounded-tr-md rounded-tl-md border border-solid border-border-subtle":"",R||F?"rounded-b-none":"rounded-bl-md rounded-br-md");return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(a.h,{mode:A,selected:y,onSelect:(e,t)=>{if("range"===A){const r=y,n=e=>!!e&&(I?(0,u.r)(t,e):(0,m.n)(t,e)),s=(e,t)=>I?k(e,t):e;if(!r?.from&&!r?.to||r?.from&&r?.to)return n(r?.from)||n(r?.to)?void v({from:void 0,to:void 0}):void v({from:s(t,r?.from),to:void 0});if(r?.from&&!r?.to){if(I?(0,p.Y)(t,(0,f.o)(r.from)):t<r.from)return void v({from:s(t,r.from),to:r.from});let e=s(t,r.to);return I&&(0,p.Y)(e,r.from)&&(e=k(e,r.from)),void v({from:r.from,to:e})}v(e)}else if("multiple"===A)y.some(e=>(0,d.GP)(e,"yyyy-MM-dd")===(0,d.GP)(t,"yyyy-MM-dd"))?v(y.filter(e=>(0,d.GP)(e,"yyyy-MM-dd")!==(0,d.GP)(t,"yyyy-MM-dd"))):v([...y,t]);else if("single"===A){if(I&&e instanceof Date&&y instanceof Date)return void v(k(e,y));v(e)}},hideNavigation:!0,captionLayout:"label",className:(0,b.cn)(t),formatters:{formatWeekdayName:j},classNames:{months:U,month:"flex flex-col p-2 gap-1 text-center w-full",caption:"relative flex justify-center items-center",table:"w-full border-separate border-spacing-0",head_row:"flex mb-1",head_cell:"text-muted-foreground rounded-md w-10 font-normal text-sm",row:"flex w-full mt-2",cell:"h-10 w-10 text-center text-sm p-0 relative",...r},numberOfMonths:D,showOutsideDays:!0,components:{MonthCaption:function(e){const{goToMonth:t,nextMonth:r,previousMonth:s}=(0,i.w)(),a=(0,d.GP)(e.calendarMonth.date,"yyyy"),c=(0,d.GP)(e.calendarMonth.date,"MMMM"),u=new Date(e.calendarMonth.date);u.setDate(u.getDate()-u.getDay());const m=Array.from({length:7},(e,t)=>{const r=new Date(u);return r.setDate(u.getDate()+t),j(r)});let p;return p=L?`${V} - ${V+23}`:T?a:`${c} ${a}`,(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex justify-between",children:[(0,n.jsx)(S.A,{variant:"ghost",onClick:()=>{if(L)K(V-24);else if(T){const r=new Date(B-1,e.calendarMonth.date.getMonth());$(r.getFullYear()),t(r)}else t(s)},className:"bg-background-primary border-none cursor-pointer","aria-label":"Previous Button",icon:(0,n.jsx)(o.A,{className:"h-4 w-4 text-button-tertiary-color"})}),(0,n.jsx)(S.A,{variant:"ghost",onClick:()=>{D>1||(T?(_(!0),O(!1)):L?_(!1):O(!T))},children:p}),(0,n.jsx)(S.A,{variant:"ghost",onClick:()=>{if(L)K(V+24);else if(T){const r=new Date(B+1,e.calendarMonth.date.getMonth());$(r.getFullYear()),t(r)}else t(r)},className:"bg-background-primary border-none cursor-pointer","aria-label":"Next Button",icon:(0,n.jsx)(l.A,{className:"h-4 w-4 text-button-tertiary-color"})})]}),L&&(0,n.jsx)("div",{className:"grid grid-cols-4 w-full",children:N(V).map(r=>(0,n.jsxs)(S.A,{variant:"ghost",onClick:()=>(r=>{$(r),_(!1),O(!0),t(new Date(r,e.calendarMonth.date.getMonth()))})(r),className:(0,b.cn)("h-10 w-full text-center font-normal relative",r===B&&r!==(new Date).getFullYear()&&"bg-background-brand text-text-on-color hover:bg-background-brand hover:text-black",r===(new Date).getFullYear()&&"font-semibold"),children:[r,r===(new Date).getFullYear()&&w()]},r))}),T&&!L&&(0,n.jsx)("div",{className:"grid grid-cols-4 gap-2 my-12",children:Array.from({length:12},(r,s)=>(0,n.jsxs)(S.A,{variant:"ghost",onClick:()=>{O(!1),t(new Date(B,s))},className:(0,b.cn)("px-1.5 py-2 h-10 w-[4.375rem] text-center font-normal relative",s===e.calendarMonth.date.getMonth()&&s!==(new Date).getMonth()&&B===e.calendarMonth.date.getFullYear()&&e.calendarMonth.date.getFullYear()!==(new Date).getFullYear()&&"bg-background-brand text-text-on-color hover:bg-background-brand hover:text-black",s===(new Date).getMonth()&&(new Date).getFullYear()===B&&"font-semibold"),children:[(0,d.GP)(new Date(0,s),"MMM"),(new Date).getMonth()===s&&(new Date).getFullYear()===B&&w()]},s))}),!T&&!L&&(0,n.jsx)(H,{weekdays:m})]})},DayButton:({day:e,modifiers:t,...r})=>{const{selected:s,today:o,disabled:l,outside:i,range_middle:a,range_start:u,range_end:m}=t,p=u||m||a,f=new Date,g=y?.to,x=(0,d.GP)(e.displayMonth,"yyyy-MM")===(0,d.GP)(f,"yyyy-MM"),h=g&&(0,d.GP)(g,"yyyy-MM")===(0,d.GP)(e.date,"yyyy-MM"),v=(0,c.a)(f,1),w=(0,d.GP)(e.date,"yyyy-MM")===(0,d.GP)(v,"yyyy-MM"),j=x||h||p,N=!C&&i,k=(0,b.cn)("h-10 w-10 flex items-center justify-center transition text-text-secondary relative text-sm","border-none rounded",!s&&!p||i?"bg-transparent hover:bg-button-tertiary-hover":"bg-background-brand text-text-on-color",a&&j&&!i?"bg-brand-background-50 text-text-secondary rounded-none":"",l?"opacity-50 cursor-not-allowed text-text-disabled":"cursor-pointer",i&&!p||!j&&i||i&&!w||i?"bg-transparent opacity-50 text-text-disabled cursor-auto":"");return(0,n.jsxs)("button",{className:(0,b.cn)(k,o&&"font-semibold",N&&"opacity-0",u&&"fui-range-start",m&&"fui-range-end",a&&"fui-range-middle",{"[&:is([data-hover=true])]:bg-brand-background-50 [&:is([data-hover=true])]:rounded-none":!p&&!s}),disabled:l||i,onClick:e=>{"function"==typeof r.onClick&&r.onClick(e)},onMouseEnter:e=>{"function"==typeof r.onMouseEnter&&r.onMouseEnter(e),e.currentTarget.setAttribute("data-hover","true")},onMouseLeave:e=>{"function"==typeof r.onMouseLeave&&r.onMouseLeave(e),e.currentTarget.setAttribute("data-hover","false")},"aria-label":(0,d.GP)(e.date,"EEEE, MMMM do, yyyy"),"data-selected":s,"data-day":(0,d.GP)(e.date,"yyyy-MM-dd"),children:[r.children,o&&j&&(0,n.jsx)("span",{className:"absolute h-1 w-1 bg-background-brand rounded-full bottom-1"})]})},Day:e=>{const t=Object.entries(e).reduce((e,[t,r])=>(t.startsWith("data-")&&(e[t]=r),e),{});return(0,n.jsx)("div",{...t,className:(0,b.cn)(e.className,"inline-flex"),children:e.children})},Weekdays:()=>(0,n.jsx)(n.Fragment,{}),Week:e=>(0,n.jsx)("div",{className:(0,b.cn)("bsf-force-ui-month-week flex flex-row",e.className),children:e.children}),Months:e=>(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:(0,b.cn)("bsf-force-ui-date-picker-month",U),children:e?.children?.map((e,t)=>e?(0,n.jsx)(s.Fragment,{children:e.map((e,t)=>(0,n.jsxs)(s.Fragment,{children:[t>0&&(0,n.jsx)("div",{className:"border border-solid border-border-subtle border-l-0"}),e]},t))},t):null)})}),MonthGrid:e=>T||L?(0,n.jsx)(n.Fragment,{}):(0,n.jsx)(G,{...e})},..."range"===A?{required:!1}:{},...P,footer:F?(0,n.jsxs)(n.Fragment,{children:[Y,P.footer]}):P.footer,onDayMouseEnter:(e,t,r)=>{if("range"!==A)return;const n=y;if(n?.from&&n?.to||!n?.from&&!n?.to)return void Array.from(document.querySelectorAll("[data-hover]")).forEach(e=>{e.setAttribute("data-hover","false")});const s=r.target,o=new Date(s.dataset.day),l=(0,p.Y)(o,n.from),i=(0,h.d)(o,n.to);let a;switch(z){case"dualdate":case"presets":a=s.closest(".bsf-force-ui-date-picker-month");break;default:a=s.closest(".bsf-force-ui-month-weeks")}const d=Array.from(a.querySelectorAll("button"));i&&d.sort((e,t)=>(0,h.d)(new Date(e.dataset.day),new Date(t.dataset.day))?-1:1),l&&d.sort((e,t)=>(0,p.Y)(new Date(e.dataset.day),new Date(t.dataset.day))?1:-1);const c=d.indexOf(s),u=d.findIndex(e=>"true"===e.getAttribute("data-selected")),m=[],f=Math.min(c,u),g=Math.max(c,u);for(let p=f;p<=g;p++)d[p]?.disabled||m.push(d[p]);d.forEach(e=>{e.setAttribute("data-hover",m.includes(e)?"true":"false")})},disabled:M})})};var z=r(80696),E=r(81301),D=r(80337),I=r(54352),M=r(69821),P=r(27763),R=r(11580);const F=({selectionType:e="single",variant:t="normal",presets:r=[],onCancel:o,onApply:l,onDateSelect:i,applyButtonText:a="Apply",cancelButtonText:d="Cancel",showOutsideDays:c=!0,isFooter:u=!0,enableTimeSelection:m=!1,selected:p,disabled:g,...x})=>{const[h,y]=(0,s.useState)(()=>{if(!p)return C(e);const t="multiple"===e&&Array.isArray(p),r="single"===e&&p instanceof Date;return t||"range"===e&&"from"in p&&"to"in p||r?p:C(e)}),v=e=>{y(e),i&&i(e)},w=[{label:"Today",range:{from:(0,z.R)(),to:(0,z.R)()}},{label:"Yesterday",range:{from:(0,E.K)(),to:(0,E.K)()}},{label:"This Week",range:{from:(0,D.k)(new Date,{weekStartsOn:1}),to:(0,I.$)(new Date,{weekStartsOn:1})}},{label:"Last 7 Days",range:{from:(0,f.o)((0,M.e)(new Date,6)),to:(0,f.o)(new Date)}},{label:"This Month",range:{from:(0,P.w)(new Date),to:(0,R.p)(new Date)}},{label:"Last 30 Days",range:{from:(0,f.o)((0,M.e)(new Date,29)),to:(0,f.o)(new Date)}}],j=r.length>0?r:w,N=()=>{y("multiple"===e?[]:{from:void 0,to:void 0}),o&&o()},k=()=>{l&&l(h)};return"normal"===t?(0,n.jsx)(A,{...x,mode:e,variant:t,width:"w-[18.5rem]",enableTimeSelection:m,selectedDates:h,showOutsideDays:c,setSelectedDates:v,footer:u&&(0,n.jsxs)("div",{className:"flex bg-background-primary justify-end p-2 gap-3 border border-solid border-border-subtle border-t-0 rounded-md rounded-tl-none rounded-tr-none",children:[(0,n.jsx)(S.A,{variant:"outline",onClick:N,children:d}),(0,n.jsx)(S.A,{onClick:k,children:a})]}),disabled:g}):"dualdate"===t?(0,n.jsx)(A,{mode:e,numberOfMonths:2,alignment:"horizontal",enableTimeSelection:m,selectedDates:h,setSelectedDates:v,showOutsideDays:c,variant:t,width:"w-auto",footer:(0,n.jsxs)("div",{className:"flex bg-background-primary justify-end p-2 gap-3 border border-solid border-border-subtle border-t-0 rounded-md rounded-tl-none rounded-tr-none",children:[(0,n.jsx)(S.A,{variant:"outline",onClick:N,children:d}),(0,n.jsx)(S.A,{onClick:k,children:a})]}),disabled:g,...x}):"presets"===t?(0,n.jsxs)("div",{className:"flex flex-row shadow-datepicker-wrapper",children:[(0,n.jsx)("div",{className:"flex flex-col gap-1 p-3 items-start border border-solid border-border-subtle border-r-0 rounded-tl-md rounded-bl-md bg-background-primary",children:j.map((e,t)=>{const r=h&&"from"in h&&"to"in h&&h.from?.getTime()===e.range.from.getTime()&&h.to?.getTime()===e.range.to.getTime();return(0,n.jsx)(S.A,{onClick:()=>(e=>{y(e)})(e.range),variant:"ghost",className:(0,b.cn)("text-left font-medium text-sm text-nowrap w-full",r&&"bg-brand-background-50"),children:e.label},t)})}),(0,n.jsx)(A,{...x,mode:e,enableTimeSelection:m,selectedDates:h,setSelectedDates:v,variant:t,showOutsideDays:c,width:"w-auto",numberOfMonths:2,footer:(0,n.jsxs)("div",{className:"flex justify-end p-2 gap-3 border-l border-r border-t-0 border-b border-solid border-border-subtle bg-background-primary rounded-br-md",children:[(0,n.jsx)(S.A,{variant:"outline",onClick:N,children:d}),(0,n.jsx)(S.A,{onClick:k,children:a})]}),disabled:g})]}):void 0}},85173(e,t,r){r.d(t,{Ay:()=>g});var n=r(10790),s=r(51609),o=r(25164),l=r(92451),i=r(56877),a=r(96307),d=r(75795),c=r(83505);const u=(0,s.createContext)({}),m=()=>(0,s.useContext)(u),p={open:{opacity:1},exit:{opacity:0}},f={duration:.2},g=({open:e,setOpen:t,children:r,trigger:o=null,className:l,exitOnClickOutside:a=!1,exitOnEsc:d=!0,design:m="simple",scrollLock:p=!0})=>{const f=void 0!==e&&void 0!==t,[g,x]=(0,s.useState)(!1),h=(0,s.useRef)(null),b=(0,s.useRef)(null),y=(0,s.useId)(),v=`${y}-title`,w=`${y}-description`,j=(0,s.useRef)(!1),N=(0,s.useRef)(!1),k=(0,s.useMemo)(()=>f?e:g,[e,g]),C=(0,s.useMemo)(()=>f?t:x,[x,t]),{refs:S,context:A}=(0,c.we)({open:k,onOpenChange:C}),z=(0,c.kp)(A),E=(0,c.s9)(A,{enabled:a||d,escapeKey:d,outsidePress:e=>!!a&&!e?.target?.closest("ul.fui-toast-container")}),D=(0,c.It)(A,{role:"dialog"}),{getFloatingProps:I}=(0,c.bv)([z,E,D]),M=()=>{k||C(!0)},P=(0,s.useCallback)(()=>(0,s.isValidElement)(o)?(0,s.cloneElement)(o,{onClick:(0,i.OK)(M,o?.props?.onClick),ref:S.setReference,"aria-haspopup":"dialog","aria-expanded":k}):"function"==typeof o?o({onClick:M,"aria-haspopup":"dialog","aria-expanded":k}):null,[o,M,S.setReference,k]);return(0,n.jsxs)(n.Fragment,{children:[P(),(0,n.jsx)(u.Provider,{value:{open:k,setOpen:C,handleClose:()=>{k&&C(!1)},design:m,context:A,getFloatingProps:I,refs:S,dialogContainerRef:b,dialogRef:h,scrollLock:p,className:l,titleId:v,descriptionId:w,hasTitleRef:j,hasDescriptionRef:N},children:r})]})};g.displayName="Dialog";const x=({children:e,className:t,ariaLabel:r})=>{const{open:s,handleClose:a,context:d,getFloatingProps:u,dialogRef:g,scrollLock:x,dialogContainerRef:h,className:b,refs:y,titleId:v,descriptionId:w,hasTitleRef:j,hasDescriptionRef:N}=m();return(0,n.jsx)(o.N,{children:s&&(0,n.jsx)(c.zR,{ref:h,lockScroll:x,className:(0,i.cn)("z-999999",b),"aria-modal":"true",children:(0,n.jsx)(c.s3,{context:d,...y?.reference&&{returnFocus:y.reference},children:(0,n.jsx)(l.P.div,{className:"fixed inset-0 overflow-y-auto",initial:"exit",animate:"open",exit:"exit",variants:p,role:"dialog","aria-modal":"true","aria-label":j?.current?void 0:r,"aria-labelledby":j?.current?v:void 0,"aria-describedby":N?.current?w:void 0,transition:f,children:(0,n.jsx)("div",{className:"flex items-center justify-center min-h-full",children:(0,n.jsx)("div",{ref:e=>{e&&(g.current=e,d&&d.refs.setFloating(e))},...u?.(),className:(0,i.cn)("flex flex-col gap-5 w-120 h-fit bg-background-primary border border-solid border-border-subtle rounded-xl shadow-soft-shadow-2xl my-5 overflow-hidden",t),children:"function"==typeof e?e({close:a}):e})})})})})})};x.displayName="Dialog.Panel";const h=({children:e,...t})=>(0,n.jsx)(c.XF,{...t,children:e});h.displayName="Dialog.Portal";const b=({className:e,...t})=>{const{open:r,dialogContainerRef:s}=m();return s?.current?(0,n.jsx)(n.Fragment,{children:(0,d.createPortal)((0,n.jsx)(o.N,{children:r&&(0,n.jsx)(l.P.div,{className:(0,i.cn)("fixed inset-0 -z-10 bg-background-inverse/90",e),...t,initial:"exit",animate:"open",exit:"exit",variants:p,transition:f})}),s.current)}):null};b.displayName="Dialog.Backdrop";const y=({children:e,className:t,...r})=>(0,n.jsx)("div",{className:(0,i.cn)("space-y-2 px-5 pt-5 pb-1",t),...r,children:e});y.displayName="Dialog.Header";const v=({children:e,as:t="h3",className:r,...o})=>{const{titleId:l,hasTitleRef:a}=m();return(0,s.useEffect)(()=>(a&&(a.current=!0),()=>{a&&(a.current=!1)}),[a]),(0,n.jsx)(t,{id:l,className:(0,i.cn)("text-base font-semibold text-text-primary m-0 p-0",r),...o,children:e})};v.displayName="Dialog.Title";const w=({children:e,as:t="p",className:r,...o})=>{const{descriptionId:l,hasDescriptionRef:a}=m();return(0,s.useEffect)(()=>(a&&(a.current=!0),()=>{a&&(a.current=!1)}),[a]),(0,n.jsx)(t,{id:l,className:(0,i.cn)("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",r),...o,children:e})};w.displayName="Dialog.Description";const j=({className:e,...t})=>(0,n.jsx)("button",{className:(0,i.cn)("bg-transparent inline-flex justify-center items-center border-0 p-1 m-0 cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-border-strong outline-none shadow-none",e),"aria-label":"Close dialog",...t,children:(0,n.jsx)(a.A,{className:"size-4 text-text-primary shrink-0"})}),N=({children:e,as:t=s.Fragment,...r})=>{const{handleClose:o}=m();return e?t===s.Fragment?"function"==typeof e?e({close:o}):(0,s.cloneElement)(e,{onClick:o}):(0,n.jsx)(t,{...r,onClick:o,"aria-label":"Close dialog",children:e}):(0,n.jsx)(j,{onClick:o,...r})};N.displayName="Dialog.CloseButton";const k=({children:e,className:t,...r})=>(0,n.jsx)("div",{className:(0,i.cn)("px-5",t),...r,children:e});k.displayName="Dialog.Body";const C=({children:e,className:t})=>{const{design:r,handleClose:s}=m();return(0,n.jsx)("div",{className:(0,i.cn)("p-4 flex justify-end gap-3",{"bg-background-secondary":"footer-divided"===r},t),children:e?"function"==typeof e?e({close:s}):e:null})};C.displayName="Dialog.Footer",g.Panel=x,g.Portal=h,g.Title=v,g.Description=w,g.CloseButton=N,g.Header=y,g.Body=k,g.Footer=C,g.Backdrop=b},59572(e,t,r){r.d(t,{A:()=>k,Y:()=>N});var n=r(10790),s=r(51609),o=r(56877),l=r(83505),i=r(25164),a=r(92451);const d={left:{open:{x:0},exit:{x:"-100%"}},right:{open:{x:0},exit:{x:"100%"}}},c=({children:e,className:t,ariaLabel:r})=>{const{open:s,position:c,handleClose:u,transitionDuration:m,getFloatingProps:p,drawerContainerRef:f,scrollLock:g,context:x,className:h,refs:b,titleId:y,descriptionId:v,hasTitleRef:w,hasDescriptionRef:j}=N();return x&&p?(0,n.jsx)(i.N,{children:s&&(0,n.jsx)(l.zR,{ref:f,lockScroll:g,className:(0,o.cn)("z-50",h),children:(0,n.jsx)(l.s3,{context:x,modal:!0,...b?.reference&&{returnFocus:b.reference},children:(0,n.jsx)("div",{className:"fixed inset-0 overflow-hidden",children:(0,n.jsx)("div",{className:"relative inset-0 h-full flex items-center",children:(0,n.jsx)("div",{className:(0,o.cn)("flex items-center justify-center h-full w-full",{"justify-start":"left"===c,"justify-end":"right"===c}),children:(0,n.jsx)(a.P.div,{className:(0,o.cn)("flex flex-col w-120 h-full bg-background-primary shadow-2xl overflow-hidden z-20",t),initial:"exit",animate:"open",exit:"exit",variants:d[c],transition:m,ref:e=>{setTimeout(()=>{b?.setFloating(e)},1e3*((m?.duration||.3)+.1))},"aria-label":w?.current?void 0:r,"aria-labelledby":w?.current?y:void 0,"aria-describedby":j?.current?v:void 0,role:"dialog","aria-modal":"true",...p?.(),children:"function"==typeof e?e({close:u}):e})})})})})})}):null};c.displayName="Drawer.Panel";const u=({children:e,className:t,...r})=>(0,n.jsx)("div",{className:(0,o.cn)("space-y-2 px-5 pt-5 pb-4",t),...r,children:e});u.displayName="Drawer.Header";const m=({children:e,as:t="h3",className:r,...l})=>{const{titleId:i,hasTitleRef:a}=N();return(0,s.useEffect)(()=>(a&&(a.current=!0),()=>{a&&(a.current=!1)}),[a]),(0,n.jsx)(t,{id:i,className:(0,o.cn)("text-base font-semibold text-text-primary m-0 p-0",r),...l,children:e})};m.displayName="Drawer.Title";const p=({children:e,as:t="p",className:r,...l})=>{const{descriptionId:i,hasDescriptionRef:a}=N();return(0,s.useEffect)(()=>(a&&(a.current=!0),()=>{a&&(a.current=!1)}),[a]),(0,n.jsx)(t,{id:i,className:(0,o.cn)("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",r),...l,children:e})};p.displayName="Drawer.Description";const f=({children:e,className:t,...r})=>(0,n.jsx)("div",{className:(0,o.cn)("px-5 pb-4 pt-2 flex flex-col flex-1 overflow-y-auto overflow-x-hidden",t),...r,children:e});f.displayName="Drawer.Body";const g=({children:e,className:t})=>{const{design:r,handleClose:s}=N();return(0,n.jsx)("div",{className:(0,o.cn)("px-5 py-4 flex justify-end gap-3 mt-auto",{"bg-background-secondary":"footer-divided"===r,"border-t border-b-0 border-x-0 border-solid border-border-subtle":"footer-bordered"===r},t),children:e?"function"==typeof e?e({close:s}):e:null})};g.displayName="Drawer.Footer";var x=r(96307);const h=({className:e,...t})=>(0,n.jsx)("button",{className:(0,o.cn)("bg-transparent inline-flex justify-center items-center border-0 p-1 m-0 cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-border-strong outline-none shadow-none",e),"aria-label":"Close drawer",...t,children:(0,n.jsx)(x.A,{className:"size-4 text-text-primary shrink-0"})}),b=({children:e,as:t=s.Fragment,...r})=>{const{handleClose:o}=N();return e?t===s.Fragment?"function"==typeof e?e({close:o}):(0,s.isValidElement)(e)?(0,s.cloneElement)(e,{onClick:o}):(0,n.jsx)(h,{onClick:o,...r}):(0,n.jsx)(t,{...r,onClick:o,children:e}):(0,n.jsx)(h,{onClick:o,...r})};b.displayName="Drawer.CloseButton";var y=r(75795);const v={open:{opacity:1},exit:{opacity:0}},w=({className:e,...t})=>{const{open:r,drawerContainerRef:l,transitionDuration:d}=N(),[c,u]=(0,s.useState)(null);(0,s.useEffect)(()=>{l?.current&&u(l.current)},[r,l]);const m=(0,n.jsx)(i.N,{mode:"wait",children:r&&(0,s.createElement)(a.P.div,{className:(0,o.cn)("fixed inset-0 -z-10 bg-background-inverse/90",e),...t,initial:"exit",animate:"open",exit:"exit",variants:v,transition:d,key:"backdrop"})});return c?(0,y.createPortal)(m,c):m};w.displayName="Drawer.Backdrop";const j=(0,s.createContext)({}),N=()=>(0,s.useContext)(j),k=({open:e,setOpen:t,children:r,trigger:i,className:a,exitOnClickOutside:d=!1,exitOnEsc:c=!0,design:u="simple",position:m="right",transitionDuration:p=.2,scrollLock:f=!0})=>{const g=void 0!==e&&void 0!==t,[x,h]=(0,s.useState)(!1),b=(0,s.useRef)(null),y=(0,s.useId)(),v=`${y}-title`,w=`${y}-description`,N=(0,s.useRef)(!1),k=(0,s.useRef)(!1),C=(0,s.useMemo)(()=>g?e:x,[e,x,g]),S=(0,s.useMemo)(()=>g?t:h,[t,h,g]),A=()=>{C||S(!0)},{refs:z,context:E}=(0,l.we)({open:C,onOpenChange:S,transform:!1}),D=(0,l.s9)(E,{enabled:c||d,escapeKey:c,outsidePress:e=>!!d&&!e?.target?.closest("ul.fui-toast-container")}),I=(0,l.It)(E,{role:"dialog"}),M=(0,l.kp)(E),{getFloatingProps:P}=(0,l.bv)([D,I,M]),R=(0,s.useCallback)(()=>(0,s.isValidElement)(i)?(0,s.cloneElement)(i,{onClick:(0,o.OK)(A,i.props.onClick),ref:z.setReference,"aria-haspopup":"dialog","aria-expanded":C}):"function"==typeof i?i({onClick:A,"aria-haspopup":"dialog","aria-expanded":C}):null,[i,A,z.setReference]);return(0,n.jsxs)(n.Fragment,{children:[R(),(0,n.jsx)(j.Provider,{value:{open:C,setOpen:S,handleClose:()=>{C&&S(!1)},design:u,position:m,drawerContainerRef:b,transitionDuration:{duration:p},getFloatingProps:P,scrollLock:f,context:E,className:a,refs:z,titleId:v,descriptionId:w,hasTitleRef:N,hasDescriptionRef:k},children:r})]})};k.displayName="Drawer",k.Panel=c,k.Header=u,k.Title=m,k.Description=p,k.Body=f,k.CloseButton=b,k.Footer=g,k.Backdrop=w,k.Portal=({children:e,...t})=>(0,n.jsx)(l.XF,{...t,children:e})},55462(e,t,r){r.d(t,{rI:()=>v});var n=r(10790),s=r(51609),o=r(83505),l=r(34743),i=r(46885),a=r(56877),d=r(92451),c=r(25164),u=r(97073);const m=(0,s.createContext)({}),p=()=>(0,s.useContext)(m),f=({size:e="md",children:t,className:r})=>(0,n.jsx)(m.Provider,{value:{size:e},children:(0,n.jsx)("div",{className:(0,a.cn)("flex flex-col bg-background-primary p-2",r),children:t})});f.displayName="Menu";const g=({heading:e,arrow:t=!1,showArrowOnHover:r=!1,open:o=!0,onClick:l,children:i,className:m})=>{const[f,g]=(0,s.useState)(o),[x,h]=(0,s.useState)(!1),{size:b}=p(),y={sm:"size-4",md:"size-5"}[b??"md"];return(0,n.jsxs)("div",{children:[!!e&&(0,n.jsxs)("button",{type:"button",onClick:()=>{g(!f),l&&l(!f)},onMouseEnter:()=>r&&h(!0),onMouseLeave:()=>r&&h(!1),className:(0,a.cn)("text-text-primary bg-transparent cursor-pointer flex justify-between items-center gap-1",{sm:"text-xs",md:"text-sm"}[b??"md"],e?"p-1":"p-0","border-none w-full",m),"aria-expanded":f,children:[(0,n.jsx)("span",{className:"text-text-tertiary",children:e}),t&&(0,n.jsx)(d.P.span,{className:"flex items-center text-border-strong",initial:"hidden",animate:r?f||x?"visible":"hidden":"visible",exit:"hidden",variants:{visible:{opacity:1},hidden:{opacity:0}},transition:{duration:.15},children:(0,n.jsx)(d.P.span,{className:"inline-flex p-1",variants:{open:{rotate:180},closed:{rotate:0}},animate:f?"open":"closed",transition:{duration:.15},children:(0,n.jsx)(u.A,{className:(0,a.cn)("shrink-0",y)})})})]}),(0,n.jsx)(c.N,{initial:!1,children:f&&(0,n.jsx)(d.P.ul,{role:"menu",variants:{open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},initial:"closed",animate:"open",exit:"closed",transition:{duration:.3,ease:"easeInOut"},className:"overflow flex gap-0.5 flex-col m-0 bg-white rounded p-0",children:i})})]})};g.displayName="Menu.List";const x=({disabled:e=!1,active:t,onClick:r,children:s,className:o,...l})=>{const{size:i}=p();return(0,n.jsx)("li",{role:"menuitem",tabIndex:e?-1:0,onClick:e?void 0:r,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&r?.()},className:(0,a.cn)("flex p-1 gap-1 items-center bg-transparent border-none rounded text-text-secondary cursor-pointer m-0",{sm:"[&>svg]:size-4 [&>svg]:m-1 [&>*:not(svg)]:mx-1 [&>*:not(svg)]:my-0.5 text-sm",md:"[&>svg]:size-5 [&>svg]:m-1.5 [&>*:not(svg)]:m-1 text-base"}[i??"md"],"hover:bg-background-secondary hover:text-text-primary",e?"text-text-disabled hover:text-text-disabled cursor-not-allowed hover:bg-transparent":"",t?"text-icon-primary [&>svg]:text-icon-interactive bg-background-secondary":"","transition-colors duration-300 ease-in-out",o),"aria-disabled":e,...l,children:s})};x.displayName="Menu.Item";const h=({variant:e="solid",className:t})=>(0,n.jsx)("li",{className:"m-0 p-0 list-none",role:"separator","aria-hidden":"true",children:(0,n.jsx)("hr",{className:(0,a.cn)("w-full border-0 border-t border-border-subtle",{solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted",double:"border-double",hidden:"border-hidden",none:"border-none"}[e],t)})});h.displayName="Menu.Separator",f.List=g,f.Item=x,f.Separator=h;const b=(0,s.createContext)({}),y=()=>(0,s.useContext)(b),v=({placement:e="bottom",offset:t=10,boundary:r="clippingAncestors",children:d,className:c})=>{const[u,m]=(0,s.useState)(!1),{refs:p,floatingStyles:f,context:g}=(0,o.we)({open:u,onOpenChange:m,placement:e,strategy:"fixed",middleware:[(0,l.cY)(t),(0,l.UU)({boundary:r}),(0,l.BN)({boundary:r})],whileElementsMounted:i.ll}),x=(0,o.kp)(g),h=(0,o.s9)(g),y=(0,o.It)(g,{role:"menu"}),{getReferenceProps:v,getFloatingProps:w}=(0,o.bv)([x,h,y]),{isMounted:j,styles:N}=(0,o.DL)(g,{duration:150,initial:{opacity:0,scale:.95},open:{opacity:1,scale:1},close:{opacity:0,scale:.95}}),k=()=>m(e=>!e);return(0,n.jsx)(b.Provider,{value:{refs:p,handleClose:()=>m(!1),isMounted:j,styles:N,floatingStyles:f,getFloatingProps:w,context:g},children:(0,n.jsxs)("div",{className:(0,a.cn)("relative inline-block",c),children:[s.Children.map(d,e=>s.isValidElement(e)&&"DropdownMenu.Trigger"===e?.type?.displayName?(0,s.cloneElement)(e,{ref:p.setReference,onClick:k,...v()}):null),s.Children.toArray(d).filter(e=>s.isValidElement(e)&&["DropdownMenu.Portal","DropdownMenu.ContentWrapper"].includes(e.type.displayName||"")).map(e=>e)]})})};v.displayName="DropdownMenu";const w=({children:e,className:t})=>{const{refs:r,floatingStyles:l,getFloatingProps:i,isMounted:a,styles:d,context:c}=y();return a&&c?(0,n.jsx)(o.s3,{context:c,modal:!1,children:(0,n.jsx)("div",{ref:r.setFloating,className:t,style:{...l,...d},...i(),children:s.Children.map(e,e=>"DropdownMenu.Content"===e?.type?.displayName?e:null)})}):null};w.displayName="DropdownMenu.ContentWrapper";const j=({children:e,root:t,id:r})=>(0,n.jsx)(o.XF,{id:r,root:t,children:e});j.displayName="DropdownMenu.Portal";const N=s.forwardRef(({children:e,className:t,...r},o)=>(0,s.isValidElement)(e)?s.cloneElement(e,{className:(0,a.cn)(t,e.props.className),ref:o,...r}):(0,n.jsx)("button",{ref:o,type:"button",className:(0,a.cn)("cursor-pointer bg-transparent border-none p-0",t),...r,children:e}));N.displayName="DropdownMenu.Trigger";const k=({children:e,className:t,...r})=>(0,n.jsx)("div",{className:(0,a.cn)("border border-solid border-border-subtle rounded-md shadow-lg overflow-hidden",t),children:(0,n.jsx)(f,{...r,children:e})});k.displayName="DropdownMenu.Content";const C=e=>(0,n.jsx)(f.List,{...e});C.displayName="DropdownMenu.List";const S=({children:e,as:t=f.Item,...r})=>{const{handleClose:o}=y();return e?t===s.Fragment&&(0,s.isValidElement)(e)?(0,s.cloneElement)(e,{onClick:(0,a.OK)(e.props?.onClick,o)}):(0,n.jsx)(t,{...r,className:(0,a.cn)("px-2",r.className),onClick:(0,a.OK)(r.onClick,o),children:e}):null};S.displayName="DropdownMenu.Item";const A=e=>(0,n.jsx)(f.Separator,{...e});A.displayName="DropdownMenu.Separator",v.Trigger=N,v.Content=k,v.List=C,v.Item=S,v.Separator=A,v.Portal=j,v.ContentWrapper=w},98590(e,t,r){r.d(t,{A:()=>q});var n=r(10790),s=r(12532),o=r(6246),l=r(17784),i=r(60083),a=r(40290),d=r(59798),c=r(45838),u=r(16191),m=r(56877);const p={sm:"px-3 py-1.5 rounded [&_.editor-content>p]:text-xs [&_.editor-content>p]:font-normal [&_.pointer-events-none]:text-xs [&_.pointer-events-none]:font-normal [&_.editor-content>p]:content-center [&_.editor-content>p]:min-h-5",md:"px-3.5 py-2 rounded-md [&_.editor-content>p]:text-sm [&_.editor-content>p]:font-normal [&_.pointer-events-none]:text-sm [&_.pointer-events-none]:font-normal [&_.editor-content>p]:content-center [&_.editor-content>p]:min-h-6",lg:"px-4 py-2.5 rounded-md [&_.editor-content>p]:text-base [&_.editor-content>p]:font-normal [&_.pointer-events-none]:text-base [&_.pointer-events-none]:font-normal [&_.editor-content>p]:content-center [&_.editor-content>p]:min-h-7"},f={sm:"p-1.5 rounded-md max-h-[10.75rem]",md:"p-2 rounded-lg max-h-[13.5rem]",lg:"p-2 rounded-lg max-h-[13.5rem]"},g={sm:"p-1.5 rounded text-xs leading-5 font-normal",md:"p-2 rounded-md text-sm leading-6 font-normal",lg:"p-2 rounded-md text-base leading-6 font-normal"};var x=r(51609),h=r(94439),b=r(95591),y=r(73105),v=r(48832);const w=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",j=w?x.useLayoutEffect:x.useEffect,N=(0,v.guI)("SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND"),k=e=>{e.scrollIntoView({block:"nearest",inline:"nearest"})};function C({close:e,editor:t,anchorElementRef:r,resolution:n,options:s,menuRenderFn:o,onSelectOption:l,shouldSplitNodeWithQuery:i=!1,commandPriority:a=v.AcJ,preselectFirstItem:d=!0}){const[c,u]=(0,x.useState)(null),m=null!==c?Math.min(s.length-1,c):null,p=n.match&&n.match.matchingString||null;(0,x.useEffect)(()=>{d&&u(0)},[p,d]);const f=(0,x.useCallback)(r=>{t.update(()=>{const t=n.match&&i?function(e){const t=(0,v.vJq)();if(!(0,v.I2P)(t)||!t.isCollapsed())return null;const r=t.anchor;if("text"!==r.type)return null;const n=r.getNode();if(!n.isSimpleText())return null;const s=r.offset,o=function(e,t,r){let n=r;for(let s=n;s<=t.length;s++)e.slice(-s)===t.substring(0,s)&&(n=s);return n}(n.getTextContent().slice(0,s),e.matchingString,e.replaceableString.length),l=s-o;if(l<0)return null;let i;return 0===l?[i]=n.splitText(s):[,i]=n.splitText(l,s),i}(n.match):null;l(r,t,e,n.match?n.match.matchingString:"")})},[t,i,n.match,l,e]),g=(0,x.useCallback)(e=>{const r=t.getRootElement();null!==r&&(r.setAttribute("aria-activedescendant","typeahead-item-"+e),u(e))},[t]);return(0,x.useEffect)(()=>()=>{const e=t.getRootElement();null!==e&&e.removeAttribute("aria-activedescendant")},[t]),j(()=>{null===s?u(null):null===m&&d&&g(0)},[s,m,g,d]),(0,x.useEffect)(()=>(0,y.Sd)(t.registerCommand(N,({option:e})=>!(!e.ref||null===e.ref.current)&&(k(e.ref.current),!0),a)),[t,g,a]),(0,x.useEffect)(()=>(0,y.Sd)(t.registerCommand(v.bbF,e=>{const r=e;if(null!==s&&s.length){const e=function(e,t){return null===e?0:e!==t-1?e+1:0}(m,s.length);g(e);const n=s[e];if(!n)return g(-1),r.preventDefault(),r.stopImmediatePropagation(),!0;n.ref&&n.ref.current&&t.dispatchCommand(N,{index:e,option:n}),r.preventDefault(),r.stopImmediatePropagation()}return!0},a),t.registerCommand(v.UDz,e=>{const t=e;if(null!==s&&s.length){const e=function(e,t){return null===e?t-1:0!==e?e-1:t-1}(m,s.length);g(e);const r=s[e];if(!r)return g(-1),t.preventDefault(),t.stopImmediatePropagation(),!0;r.ref&&r.ref.current&&k(r.ref.current),t.preventDefault(),t.stopImmediatePropagation()}return!0},a),t.registerCommand(v.Q$N,t=>{const r=t;return r.preventDefault(),r.stopImmediatePropagation(),e(),!0},a),t.registerCommand(v.OXk,e=>{const t=e;return!(null===s||null===m||!s[m])&&(t.preventDefault(),t.stopImmediatePropagation(),f(s[m]),!0)},a),t.registerCommand(v.RTo,e=>!(null===s||null===m||!s[m])&&(null!==e&&(e.preventDefault(),e.stopImmediatePropagation()),f(s[m]),!0),a)),[f,e,t,s,m,g,a]),o(r,{selectedIndex:m,selectOptionAndCleanUp:f,setHighlightedIndex:u},p)}function S({options:e,onQueryChange:t,onSelectOption:r,onOpen:s,onClose:o,menuRenderFn:l,triggerFn:i,anchorClassName:a,commandPriority:d=v.AcJ,parent:c,preselectFirstItem:u=!0,ignoreEntityBoundary:m=!1}){const[p]=(0,h.DF)(),[f,g]=(0,x.useState)(null),y=function(e,t,r,n=(w?document.body:void 0),s=!0){const[o]=(0,h.DF)(),l=(0,x.useRef)(null);null!==e&&null===l.current&&w&&(l.current=document.createElement("div"));const i=(0,x.useCallback)(()=>{if(null===l.current||void 0===n)return;l.current.style.top=l.current.style.bottom;const t=o.getRootElement(),i=l.current,a=i.firstChild;if(null!==t&&null!==e){const{left:o,top:d,width:c,height:u}=e.getRect();if(i.style.top=`${d+l.current.offsetHeight+3+(s?window.pageYOffset:0)}px`,i.style.left=`${o+window.pageXOffset}px`,i.style.height=`${u}px`,i.style.width=`${c}px`,null!==a){a.style.top=`${d}`;const e=a.getBoundingClientRect(),r=e.height,n=e.width,l=t.getBoundingClientRect();o+n>l.right&&(i.style.left=`${l.right-n+window.pageXOffset}px`),(d+r>window.innerHeight||d+r>l.bottom)&&d-l.top>r+u&&(i.style.top=`${d-r-u+(s?window.pageYOffset:0)}px`)}i.isConnected||(function(e,t){void 0!==t&&(e.className=t),e.setAttribute("aria-label","Typeahead menu"),e.setAttribute("role","listbox"),e.style.display="block",e.style.position="absolute"}(i,r),n.append(i)),i.setAttribute("id","typeahead-menu"),t.setAttribute("aria-controls","typeahead-menu")}},[o,e,s,r,n]);(0,x.useEffect)(()=>{const t=o.getRootElement();return null!==e&&i(),()=>{null!==t&&t.removeAttribute("aria-controls");const e=l.current;null!==e&&e.isConnected&&(e.remove(),e.removeAttribute("id"))}},[o,i,e]);const a=(0,x.useCallback)(r=>{null!==e&&(r||t(null))},[e,t]);return(0,b.GZ)(e,l.current,i,a),l}(f,g,a,c),j=(0,x.useCallback)(()=>{g(null),void 0!==o&&null!==f&&o()},[o,f]),N=(0,x.useCallback)(e=>{g(e),void 0!==s&&null===f&&s(e)},[s,f]);return(0,x.useEffect)(()=>{const e=p.registerUpdateListener(()=>{p.getEditorState().read(()=>{if(!p.isEditable())return void j();if(p.isComposing())return;const e=(p._window||window).document.createRange(),r=(0,v.vJq)(),n=function(e){let t=null;return e.getEditorState().read(()=>{const e=(0,v.vJq)();(0,v.I2P)(e)&&(t=function(e){const t=e.anchor;if("text"!==t.type)return null;const r=t.getNode();if(!r.isSimpleText())return null;const n=t.offset;return r.getTextContent().slice(0,n)}(e))}),t}(p);if(!(0,v.I2P)(r)||!r.isCollapsed()||null===n||null===e)return void j();const s=i(n,p);t(s?s.matchingString:null),null===s||!m&&function(e,t){return 0===t&&e.getEditorState().read(()=>{const e=(0,v.vJq)();if((0,v.I2P)(e)){const t=e.anchor.getNode().getPreviousSibling();return(0,v.kFe)(t)&&t.isTextEntity()}return!1})}(p,s.leadOffset)||!function(e,t,r){const n=(0,v.VwU)(r);if(null===n||!n.isCollapsed)return!1;const s=n.anchorNode,o=e,l=n.anchorOffset;if(null===s||null===l)return!1;try{t.setStart(s,o),t.setEnd(s,l)}catch{return!1}return!0}(s.leadOffset,e,p)?j():(0,x.startTransition)(()=>N({getRect:()=>e.getBoundingClientRect(),match:s}))})});return()=>{e()}},[p,i,t,f,j,N,m]),(0,x.useEffect)(()=>p.registerEditableListener(e=>{e||j()}),[p,j]),null===f||null===p||null===y.current?null:(0,n.jsx)(C,{close:j,resolution:f,editor:p,anchorElementRef:y,options:e,menuRenderFn:l,shouldSplitNodeWithQuery:!0,onSelectOption:r,commandPriority:d,preselectFirstItem:u})}var A=r(87835);const z=e=>{switch(e){case"sm":return"xs";case"md":default:return"sm";case"lg":return"md"}},E=({data:e,by:t,size:r,nodeKey:s})=>{const[o]=(0,h.DF)(),l=!o.isEditable();let i=e;"object"==typeof e&&(i=e[t]);const a=(0,x.useCallback)(e=>{const t=(0,v.nsf)(s);if(!t||!t.isSelected())return!1;let r=!1;const n=t.getPreviousSibling();return(0,v.ff4)(n)&&(n.selectEnd(),r=!0),(0,v.kFe)(n)&&(n.select(),r=!0),(0,v.Cyw)(n)&&(n.selectNext(),r=!0),null===n&&(t.selectPrevious(),r=!0),r&&e.preventDefault(),r},[s]),d=(0,x.useCallback)(e=>{const t=(0,v.nsf)(s);if(!t||!t.isSelected())return!1;let r=!1;const n=t.getNextSibling();return(0,v.ff4)(n)&&(n.selectStart(),r=!0),(0,v.kFe)(n)&&(n.select(0,0),r=!0),(0,v.Cyw)(n)&&(n.selectPrevious(),r=!0),null===n&&(t.selectNext(),r=!0),r&&e.preventDefault(),r},[s]);return(0,x.useEffect)(()=>{const e=(0,y.Sd)(o.registerCommand(v.AX0,a,v.AcJ),o.registerCommand(v.JM3,d,v.AcJ));return()=>{e()}},[o,a,d]),(0,n.jsx)(A.A,{className:"inline-flex",type:"rounded",size:z(r),label:i,icon:null,closable:!0,onClose:e=>{e.stopPropagation(),e.preventDefault(),!l&&o.update(()=>{const e=(0,v.nsf)(s);e&&e.remove()})},disabled:l})};class D extends v.Kp7{__data;__by;__size;constructor(e,t,r,n){super(n),this.__data=e,this.__by=t,this.__size=r}static getType(){return"mention"}static clone(e){return new D(e.__data,e.__by,e.__size,e.__key)}static importJSON(e){return I(e.data,e.by,e.size)}createDOM(){return document.createElement("span")}updateDOM(){return!1}exportDOM(){return{element:document.createElement("span")}}exportJSON(){return{type:D.getType(),data:this.__data,by:this.__by,size:this.__size,version:1}}decorate(){return(0,n.jsx)(E,{data:this.__data,by:this.__by,size:this.__size,nodeKey:this.__key})}}const I=(e,t,r)=>new D(e,t,r);class M extends b.BB{data;constructor(e,t="name",r){const n="string"==typeof e?e:String(e?.[t]??"");super(void 0===r?n:`${n}-${r}`),this.data=e}}class P{value;constructor(e){this.value=e}}const R={search(e,t,r,n){setTimeout(()=>{if(!Array.isArray(e))return[];const s=e.filter(e=>{if("string"==typeof e)return e.toLowerCase().includes(t.toLowerCase());const r=e?.[n]?.toString();return!!r&&r.toLowerCase().includes(t.toLowerCase())});r(s)},500)}},F=(0,x.forwardRef)(({size:e,className:t,children:r,...s},o)=>(0,n.jsx)("ul",{role:"menu",ref:o,className:(0,m.cn)("absolute inset-x-0 top-full m-0 w-full h-auto overflow-y-auto overflow-x-hidden z-10 bg-background-primary border border-solid border-border-subtle shadow-lg list-none",f[e],t),...s,children:r}));F.displayName="EditorCombobox";const T=(0,x.forwardRef)(({size:e,children:t,selected:r=!1,className:s,...o},l)=>(0,n.jsx)("li",{role:"option",ref:l,className:(0,m.cn)("m-0 text-text-primary cursor-pointer",g[e],r&&"bg-button-tertiary-hover",s),...o,children:t}));T.displayName="EditorCombobox.Item";const O=Object.assign(F,{Item:T});var L=r(83505),_=r(34743),B=r(46885);const $=({optionsArray:e,by:t="name",size:r="md",trigger:s="@",menuComponent:o=O,menuItemComponent:l=O.Item,autoSpace:i=!0})=>{const{y:a,refs:d,strategy:c}=(0,L.we)({placement:"bottom",strategy:"absolute",middleware:[(0,_.cY)(8),(0,_.RK)(),(0,_.BN)(),(0,_.UU)()],whileElementsMounted:B.ll}),u=(0,x.useRef)(!1),m=(0,x.useRef)(null),p=(0,x.useMemo)(()=>{const e="\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'\"~=<>_:;",t=[s].join(""),r="[^"+t+e+"\\s]",n=new RegExp(`(^|\\s|\\()([${t}]((?:${r}${"(?:\\.[ |$]| |["+e+"]|)"}){0,75}))$`),o=new RegExp(`(^|\\s|\\()([${t}]((?:${r}){0,50}))$`);return e=>{let t=n.exec(e);if(null===t&&(t=o.exec(e)),null!==t){const e=t[3];if(e.length>=0)return{leadOffset:t.index+t[1].length,matchingString:e,replaceableString:t[2]}}return null}},[s]),[f]=(0,h.DF)(),[g,b]=(0,x.useState)(null),[w,j]=(0,x.useState)(!1),[N,k]=(0,x.useState)(void 0),C=function(e,t,r="name"){const[n,s]=(0,x.useState)([]),o=(0,x.useRef)(new WeakMap),l=(0,x.useRef)(new Map),i=(0,x.useRef)(e);return(0,x.useEffect)(()=>{i.current!==e&&(o.current=new WeakMap,l.current.clear(),i.current=e,null!==t&&R.search(e,t,e=>{s(e)},r))},[e,r,t]),(0,x.useEffect)(()=>{if(null===t)return void s([]);const n=o.current,i=l.current;let a=i.get(t);a||(a=new P(t),i.set(t,a));const d=n.get(a);if(null!==d){if(void 0!==d)return void s(d);if(n.set(a,null),R.search(e,t,e=>{const r=i.get(t);r&&(n.set(r,e),s(e))},r),i.size>100){const e=Array.from(i.entries()).slice(-50);l.current=new Map(e)}}},[t,e,r]),n}(e,g,t),A=(0,x.useCallback)((e,n,s)=>{f.update(()=>{const o=I(e.data,t,r);n&&n.replace(o),s(),j(!1)})},[f]),z=(0,x.useMemo)(()=>C.map((e,r)=>new M(e,t,r)),[C,t]),E=(0,x.useCallback)(e=>{if(!i)return!1;const{key:t,ctrlKey:r,metaKey:n}=e;if(r||n||" "===t||t.length>1||u.current)return u.current&&(u.current=!1),!1;const s=(0,v.vJq)(),{focus:o,anchor:l}=s,[a]=s.getNodes();if(!l||!o||l?.key!==o?.key||l?.offset!==o?.offset||!a)return!1;if((e=>e instanceof D)(a)){const e=(0,v.sTu)(" ");return a.insertAfter(e),!0}return!1},[f,s,i]),F=(0,x.useCallback)(e=>{const{key:t}=e;return"Backspace"===t&&(u.current=!0,!0)},[u]),T=(0,x.useCallback)(()=>{j(!0)},[]),$=(0,x.useCallback)(()=>(T(),!1),[]);return(0,x.useEffect)(()=>{if(f)return(0,y.Sd)(f.registerCommand(v.R18,E,v.AcJ),f.registerCommand(v.gCZ,F,v.AcJ),f.registerCommand(v.$7r,$,v.AcJ))},[f,E]),(0,x.useEffect)(()=>{if(!f)return;const e=()=>{const e=f.getRootElement()?.getRootNode(),t=e instanceof ShadowRoot?e:void 0;k(e=>e===t?e:t)};return e(),f.registerRootListener(e)},[f]),(0,x.useEffect)(()=>{if(!f)return;const e=f.getRootElement()?.parentElement?.parentElement;e&&d.setReference(e)},[f,d]),(0,x.useEffect)(()=>{w||j(z.length>0)},[z]),(0,x.useEffect)(()=>{if(!w)return;const e=e=>{const t=f.getRootElement(),r=d.floating.current,n=e.composedPath(),s=!!t&&n.includes(t),o=!!r&&n.includes(r);!s&&!o&&(j(!1),b(null))},t=()=>{setTimeout(()=>{const e=f.getRootElement(),t=d.floating.current;if(e){const r=e.getRootNode(),n=r instanceof ShadowRoot?r.activeElement:e.ownerDocument.activeElement;t&&(!n||!t.contains(n))&&(j(!1),b(null))}},100)};document.addEventListener("mousedown",e);const r=f.getRootElement();return r&&r.addEventListener("blur",t,!0),()=>{document.removeEventListener("mousedown",e),r&&r.removeEventListener("blur",t,!0)}},[w,f,d.floating]),(0,n.jsx)(S,{onOpen:T,onQueryChange:b,onSelectOption:A,triggerFn:p,options:z,parent:N,menuRenderFn:(e,{selectedIndex:s,selectOptionAndCleanUp:i,setHighlightedIndex:u})=>w&&e.current&&z?.length?(0,n.jsx)(o,{className:"w-full",size:r,ref:e=>{d.setFloating(e),m.current=e},onMouseDown:e=>e.preventDefault(),style:{position:c,top:a??0,left:0,width:"100%",boxSizing:"border-box"},children:z.map((e,o)=>(0,n.jsx)(l,{ref:e.ref,size:r,selected:o===s,onMouseDown:e=>e.preventDefault(),onMouseEnter:()=>{u(o)},onClick:()=>i(e),children:"string"==typeof e.data?e.data:e.data?.[t]},e.key))}):null})},V={ltr:"ltr",rtl:"rtl",paragraph:"editor-paragraph",quote:"editor-quote",heading:{h1:"editor-heading-h1",h2:"editor-heading-h2",h3:"editor-heading-h3",h4:"editor-heading-h4",h5:"editor-heading-h5",h6:"editor-heading-h6"},list:{nested:{listitem:"editor-nested-listitem"},ol:"editor-list-ol",ul:"editor-list-ul",listitem:"editor-listItem",listitemChecked:"editor-listItemChecked",listitemUnchecked:"editor-listItemUnchecked"},hashtag:"editor-hashtag",image:"editor-image",link:"editor-link",text:{bold:"editor-textBold",code:"editor-textCode",italic:"editor-textItalic",strikethrough:"editor-textStrikethrough",subscript:"editor-textSubscript",superscript:"editor-textSuperscript",underline:"editor-textUnderline",underlineStrikethrough:"editor-textUnderlineStrikethrough"},code:"editor-code",codeHighlight:{atrule:"editor-tokenAttr",attr:"editor-tokenAttr",boolean:"editor-tokenProperty",builtin:"editor-tokenSelector",cdata:"editor-tokenComment",char:"editor-tokenSelector",class:"editor-tokenFunction","class-name":"editor-tokenFunction",comment:"editor-tokenComment",constant:"editor-tokenProperty",deleted:"editor-tokenProperty",doctype:"editor-tokenComment",entity:"editor-tokenOperator",function:"editor-tokenFunction",important:"editor-tokenVariable",inserted:"editor-tokenSelector",keyword:"editor-tokenAttr",namespace:"editor-tokenVariable",number:"editor-tokenProperty",operator:"editor-tokenOperator",prolog:"editor-tokenComment",property:"editor-tokenProperty",punctuation:"editor-tokenPunctuation",regex:"editor-tokenVariable",selector:"editor-tokenSelector",string:"editor-tokenSelector",symbol:"editor-tokenProperty",tag:"editor-tokenProperty",url:"editor-tokenOperator",variable:"editor-tokenVariable"}},K=({content:e})=>(0,n.jsx)("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 flex items-center justify-start text-field-placeholder w-full",children:(0,n.jsx)("span",{className:"truncate",children:e})}),H=({style:e})=>{const[t]=(0,h.DF)();return(0,x.useLayoutEffect)(()=>{t&&t.registerRootListener(t=>{t&&e&&0!==Object.keys(e).length&&Object.assign(t.style,e)})},[t]),null};var G=r(27639);function W(e){const t=(0,v.NiT)().getTextContentSize();let r=0;const n=e._nodeMap;for(const[,s]of n)"mention"===s.__type&&(r+=1);return t+r}function Y({maxLength:e}){const[t]=(0,h.DF)();return(0,x.useEffect)(()=>{let r=null;return t.registerNodeTransform(v.haT,()=>{const n=(0,v.vJq)();if(!(0,v.I2P)(n)||!n.isCollapsed())return;const s=t.getEditorState(),o=s.read(()=>W(s)),l=W(s);if(o!==l){const i=l-e,a=n.anchor;i>0&&(o===e&&r!==s?(r=s,(0,y.Xq)(t,s)):(0,G._A)(t,a,i))}})},[t,e]),null}function U(e){}const q=(0,x.forwardRef)(({defaultValue:e="",placeholder:t="Press @ to view variable suggestions",onChange:r,size:f="md",autoFocus:g=!1,options:h,by:b="name",trigger:y="@",menuComponent:v,menuItemComponent:w,className:j,wrapperClassName:N,disabled:k=!1,autoSpaceAfterMention:C=!1,style:S,maxLength:A},z)=>{const E={namespace:"Editor",editorTheme:V,onError:U,nodes:[D],editorState:e||'{\n "root": {\n "children": [\n {\n "children": [],\n "direction": null,\n "format": "",\n "indent": 0,\n "type": "paragraph",\n "version": 1,\n "textFormat": 0,\n "textStyle": ""\n }\n ],\n "direction": null,\n "format": "",\n "indent": 0,\n "type": "root",\n "version": 1\n }\n}',editable:!k};let I,M;return(0,x.isValidElement)(v)&&(I=v),(0,x.isValidElement)(w)&&(M=w),(0,n.jsx)("div",{className:(0,m.cn)("relative w-full","focus-within:ring-2 focus-within:ring-offset-2 hover:outline-border-strong hover:focus-within:outline-focus-border focus-within:outline-focus-border focus-within:ring-focus transition-[color,outline,box-shadow] duration-150 ease-in-out outline outline-1 outline-field-border",p[f],k&&"bg-field-secondary-background outline-field-border-disabled hover:outline-field-border-disabled [&_p]:text-badge-color-disabled cursor-not-allowed",N),children:(0,n.jsxs)(o.n,{initialConfig:E,children:[(0,n.jsx)("div",{className:"relative w-full [&_p]:m-0",children:(0,n.jsx)(l.h,{contentEditable:(0,n.jsx)(i.a,{"aria-label":t||"Text editor",className:(0,m.cn)("editor-content focus-visible:outline-none outline-none","w-full [&>p]:w-full [&>p]:m-0",j)}),placeholder:(0,n.jsx)(K,{content:t}),ErrorBoundary:d.R})}),(0,n.jsx)(a.G,{}),(0,n.jsx)($,{menuComponent:I,menuItemComponent:M,size:f,by:b,optionsArray:h,trigger:y,autoSpace:C}),(0,n.jsx)(c.D,{onChange:(e,t)=>{"function"==typeof r&&r(e,t)},ignoreSelectionChange:!0}),z&&(0,n.jsx)(u.G,{editorRef:z}),g&&(0,n.jsx)(s.x,{}),(0,n.jsx)(H,{style:S}),A&&(0,n.jsx)(Y,{maxLength:A})]})})});q.displayName="EditorInput"},9655(e,t,r){r.d(t,{d:()=>d});var n=r(10790),s=r(56877),o=r(6077),l=r(91090),i=r(96745);const a={sm:{image:"w-8 h-8",name:"text-xs",fileIcon:"h-8",uploadText:"text-xs"},md:{image:"w-10 h-10",name:"text-sm",fileIcon:"h-10",uploadText:"text-xs"},lg:{image:"w-10 h-10",name:"text-sm",fileIcon:"h-10",uploadText:"text-xs"}},d=({file:e,onRemove:t,error:r,disabled:d,size:c="sm"})=>(0,n.jsx)("div",{className:(0,s.cn)("w-full flex items-start justify-between rounded mt-2 bg-field-primary-background p-2 gap-3",r&&"border-alert-border-danger bg-alert-background-danger"),children:(0,n.jsxs)("div",{className:"flex items-center gap-3 w-full",children:[e.type.startsWith("image")?(0,n.jsx)("div",{className:(0,s.cn)("rounded-sm flex items-center justify-center shrink-0",r&&"bg-gray-200"),children:r?(0,n.jsx)(l.A,{className:"size-6 text-field-helper"}):(0,n.jsx)("img",{src:"url"in e?e.url:URL.createObjectURL(e),alt:"Preview",className:(0,s.cn)("w-full object-contain rounded-sm",a[c].image)})}):(0,n.jsx)("span",{className:(0,s.cn)("inline-flex self-start p-0.5",a[c].fileIcon),children:(0,n.jsx)(o.A,{className:"size-5 text-icon-primary"})}),(0,n.jsxs)("div",{className:"text-left flex flex-col gap-0 w-[calc(100%_-_5.5rem)]",children:[(0,n.jsx)("span",{className:(0,s.cn)(a[c].name,"font-medium text-field-label truncate"),children:e.name}),e.size&&e.size>0&&(0,n.jsx)("span",{className:(0,s.cn)(a[c].uploadText,"text-xs text-field-helper",r&&"text-support-error"),children:(0,s.v7)(e.size)})]}),!d&&(0,n.jsx)("button",{onClick:()=>t(e),className:"inline-flex cursor-pointer bg-transparent border-0 p-1 my-0 ml-auto mr-0 focus:outline-none focus-visible:ring-2 focus-visible:ring-support-error focus-visible:ring-offset-1 rounded self-start shadow-none","aria-label":"Remove file",children:(0,n.jsx)(i.A,{className:"size-4 text-support-error"})})]})})},62214(e,t,r){r.d(t,{Rt:()=>v});var n=r(10790),s=r(56877),o=r(92451),l=r(11869),i=r(51609),a=r(88029);const d=(0,i.createContext)({}),c=d.Provider,u=()=>(0,i.useContext)(d),m=(e,t,r)=>{if(!e||!t)return{open:()=>({}),closed:()=>({})};const n=e?.getBoundingClientRect(),s=t?.getBoundingClientRect(),o=r?n?.x-s?.x+n?.width/2:s?.width-(s?.right-n?.x)+n?.width/2,l=n?.y-s?.y+n?.height/2;return{open:(e=1e3)=>({clipPath:`circle(${2*e+200}px at ${o}px ${l}px)`,background:"rgb(255, 255, 255, 1)",transition:{type:"spring",stiffness:20,restDelta:2,background:{duration:0}}}),closed:{clipPath:`circle(${n?.width/2}px at ${o}px ${l}px)`,background:"rgb(255, 255, 255, 0)",transition:{delay:.5,type:"spring",stiffness:400,damping:40,background:{duration:0,delay:1e3}}}}},p=e=>(0,n.jsx)(o.P.path,{className:"stroke-icon-primary",fill:"transparent",strokeWidth:"3",strokeLinecap:"round",...e}),f=({className:e})=>{const{toggleOpen:t,setTriggerRef:r,isOpen:l}=u();return(0,n.jsx)(a.A,{ref:r,className:(0,s.cn)("relative z-[1] rounded-full hover:shadow-sm focus:[box-shadow:none] pointer-events-auto bg-background-primary",e),variant:"ghost",size:"xs",onClick:t,"aria-label":"Toggle menu","aria-expanded":l,icon:(0,n.jsxs)(o.P.svg,{className:"shrink-0 stroke-icon-primary",width:"23",height:"23",variants:{open:{viewBox:"0 0 20 20"},closed:{viewBox:"0 0 23 18"}},children:[(0,n.jsx)(p,{variants:{closed:{d:"M 2 2.5 L 20 2.5"},open:{d:"M 3 16.5 L 17 2.5"}}}),(0,n.jsx)(p,{d:"M 2 9.423 L 20 9.423",variants:{closed:{opacity:1},open:{opacity:0}},transition:{duration:.1}}),(0,n.jsx)(p,{variants:{closed:{d:"M 2 16.346 L 20 16.346"},open:{d:"M 3 2.5 L 17 16.346"}}})]})})},g={open:{transition:{staggerChildren:.07,delayChildren:.2}},closed:{transition:{staggerChildren:.05,staggerDirection:-1}}},x=({tag:e="a",active:t,icon:r,iconPosition:o="left",className:l,children:a,...d})=>{let c=null,u=null;const m=r&&(0,i.isValidElement)(r)?(0,i.cloneElement)(r,{key:"left-icon",className:(0,s.cn)("size-5",t?"text-brand-800":"text-icon-secondary",r.props?.className??"")}):null;switch(o){case"left":c=m;break;case"right":u=m;break;default:c=null,u=null}return(0,n.jsx)(b,{children:(0,n.jsxs)(e,{className:(0,s.cn)("w-full no-underline hover:no-underline text-text-primary text-lg font-medium flex items-center gap-2 px-2.5 py-1.5 rounded-md hover:bg-background-secondary hover:text-text-primary focus:outline-none focus:shadow-none transition ease-in-out duration-150",t?"text-text-primary bg-background-secondary":"text-text-secondary",l),...d,children:[!!c&&c,(0,n.jsx)("span",{className:"contents",children:a}),!!u&&u]})})},h={open:{y:0,opacity:1,transition:{y:{stiffness:1e3,velocity:-100}}},closed:{y:50,opacity:0,transition:{y:{stiffness:1e3}}}},b=({children:e})=>(0,n.jsx)(o.P.li,{className:"m-0 p-0 flex items-center justify-start w-full",variants:h,whileHover:{scale:1.05},whileTap:{scale:.95},children:e}),y=({children:e,className:t})=>{const{triggerRef:r,triggerOnRight:l,triggerOnLeft:a}=u(),[d,c]=(0,i.useState)(null);return r?(0,n.jsxs)(o.P.div,{ref:c,className:(0,s.cn)("absolute top-0 bottom-0 w-80 h-screen",l?"right-0":"left-0",t),children:[d&&(0,n.jsx)(o.P.div,{className:(0,s.cn)("bg-background-primary shadow-lg absolute top-0 bottom-0 w-80 border-y-0 border-l-0 border-r border-solid border-border-subtle",l?"right-0":"left-0"),variants:m(r,d,a??!1)}),(0,n.jsx)(o.P.ul,{variants:g,className:(0,s.cn)("relative mt-14 mb-0 w-full px-5 pb-5 pt-2 flex flex-col items-start justify-start gap-0.5",t),children:e})]}):null},v=({className:e,children:t})=>{const[r,a]=(0,l.Y)(!1,!0),[d,u]=(0,i.useState)(null),m=(0,i.useRef)(null),{height:p}=(e=>{const t=(0,i.useRef)({width:0,height:0});return(0,i.useEffect)(()=>{e.current&&(t.current.width=e.current.offsetWidth,t.current.height=e.current.offsetHeight)},[]),t.current})(m),{isRight:f=!1,isLeft:g=!0}=(e=>{if(!e)return{error:"Element not found."};const t=e.getBoundingClientRect(),r=window.innerWidth,n=r/2,s=t.right<n,o=t.left>n;return{isLeft:s,isRight:o,isCenter:!s&&!o,elementRect:{left:t.left,right:t.right,width:t.width},viewport:{width:r,center:n}}})(d);return(0,n.jsx)(c,{value:{isOpen:r,toggleOpen:a,setTriggerRef:e=>{(0,i.startTransition)(()=>{u(e)})},triggerRef:d,triggerOnRight:f,triggerOnLeft:g},children:(0,n.jsx)("div",{className:(0,s.cn)("size-6 z-[1]",e),children:(0,n.jsx)(o.P.nav,{className:"h-full",initial:!1,animate:r?"open":"closed",custom:p,variants:{open:{pointerEvents:"auto"},closed:{pointerEvents:"none"}},ref:m,children:t})})})};v.displayName="HamburgerMenu",f.displayName="HamburgerMenu.Toggle",y.displayName="HamburgerMenu.Options",x.displayName="HamburgerMenu.Option",v.Options=y,v.Option=x,v.Toggle=f},62163(e,t,r){r.d(t,{A:()=>u});var n=r(10790),s=r(51609),o=r(44329),l=r(56877),i=r(59110),a=r(96307),d=r(39756),c=r(71087);const u=(0,s.forwardRef)(({id:e,type:t="text",defaultValue:r="",value:u,size:m="sm",className:p="",disabled:f=!1,onChange:g=()=>{},error:x=!1,onError:h=()=>{},prefix:b=null,suffix:y=null,label:v="",...w},j)=>{const N=(0,s.useRef)(null),k=(0,s.useMemo)(()=>e||`input-${t}-${(0,o.Ak)()}`,[e]),C=(0,s.useMemo)(()=>typeof u<"u",[u]),[S,A]=(0,s.useState)(r),[z,E]=(0,s.useState)(null),D=(0,s.useCallback)(()=>C?u:S,[C,u,S]),I=e=>{if(f)return;let r;"file"===t?(r=e.target.files,E(r&&r.length>0?r[0].name:null)):r=e.target.value,!C&&"file"!==t&&A(r),"function"==typeof g&&g(r)},M=()=>{E(null),N.current&&(N.current.value=""),g(null)},P="bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary w-full outline outline-1 outline-border-subtle border-none transition-[color,box-shadow,outline] duration-200",R={xs:"px-2 py-1 rounded",sm:"p-3 py-2 rounded",md:"p-3.5 py-2.5 rounded-md",lg:"p-4 py-3 rounded-lg"},F={xs:"text-xs font-medium",sm:"text-sm font-medium",md:"text-sm font-medium",lg:"text-base font-medium"},T={xs:"text-xs",sm:"text-xs",md:"text-sm",lg:"text-base"},O={sm:b?"pl-8":"",md:b?"pl-9":"",lg:b?"pl-10":""},L={sm:y?"pr-8":"",md:y?"pr-9":"",lg:y?"pr-10":""},_=f?"hover:outline-border-disabled":"hover:outline-border-strong",B="focus:outline-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",$=x?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",V=x?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",K=f?"outline-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"",H=f?"outline-border-disabled cursor-not-allowed text-text-disabled file:text-text-tertiary":"",G="font-normal placeholder-text-tertiary text-text-primary pointer-events-none absolute inset-y-0 flex flex-1 items-center [&>svg]:h-4 [&>svg]:w-4",W=f?"font-normal placeholder-text-tertiary text-icon-disabled pointer-events-none absolute inset-y-0 flex flex-1 items-center":"font-normal placeholder-text-tertiary text-field-placeholder pointer-events-none absolute inset-y-0 flex flex-1 items-center",Y={xs:"[&>svg]:size-4",sm:"[&>svg]:size-4",md:"[&>svg]:size-5",lg:"[&>svg]:size-6"},U=(0,s.useMemo)(()=>v?(0,n.jsx)(c.A,{className:(0,l.cn)(F[m]),htmlFor:k,...w?.required&&{required:!0},children:v}):null,[v,m,k]),q=z?"file:border-0 file:bg-transparent pr-10":"text-text-tertiary file:border-0 file:bg-transparent pr-10";return(0,n.jsxs)("div","file"===t?{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[U,(0,n.jsxs)("div",{className:(0,l.cn)("w-full relative flex focus-within:z-10",p),children:[(0,n.jsx)("input",{ref:(0,d.Px)(N,j),id:k,type:"file",className:(0,l.cn)(P,H,R[m],T[m],B,_,V,q),disabled:f,onChange:I,onInvalid:h,...x&&{"aria-invalid":!0},...w}),(0,n.jsx)("div",{className:(0,l.cn)(W,"right-0 pr-3",Y[m]),"aria-hidden":"true",children:(0,n.jsx)(i.A,{})})]})]}:{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[U,(0,n.jsxs)("div",{className:(0,l.cn)("w-full relative flex focus-within:z-10",p),children:[b?(0,n.jsx)("div",{className:(0,l.cn)(G,"left-0 pl-3",T[m]),children:b}):null,(0,n.jsx)("input",{ref:(0,d.Px)(N,j),id:k,type:t,className:(0,l.cn)(P,K,R[m],T[m],O[m],L[m],B,_,$),disabled:f,onChange:I,onInvalid:h,value:D(),...x&&{"aria-invalid":!0},...w}),"file"===t?(0,n.jsx)("div",z?{className:(0,l.cn)(W,"right-0 pr-3 cursor-pointer z-20 pointer-events-auto",Y[m]),onClick:M,role:"button",tabIndex:0,"aria-label":"Remove file",onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&M()},children:(0,n.jsx)(a.A,{"aria-hidden":"true"})}:{className:(0,l.cn)(W,"right-0 pr-3",Y[m]),"aria-hidden":"true",children:(0,n.jsx)(i.A,{})}):y?(0,n.jsx)("div",{className:(0,l.cn)(G,"right-0 pr-3",T[m]),children:y}):null]})]})});u.displayName="Input"},71087(e,t,r){r.d(t,{A:()=>o});var n=r(10790),s=r(56877);const o=(0,r(51609).forwardRef)(({children:e=null,tag:t="label",size:r="sm",className:o="",variant:l="neutral",required:i=!1,...a},d)=>{if(!e)return null;let c="";return i&&(c="after:content-['*'] after:text-field-required after:ml-0.5"),(0,n.jsx)(t,{ref:d,className:(0,s.cn)("font-medium text-field-label flex items-center gap-0.5",{xs:"text-xs [&>*]:text-xs [&>svg]:h-3 [&>svg]:w-3",sm:"text-sm [&>*]:text-sm [&>svg]:h-4 [&>svg]:w-4",md:"text-base [&>*]:text-base [&>svg]:h-5 [&>svg]:w-5"}[r],{neutral:"text-field-label [&>*]:text-field-label",help:"text-field-helper [&>*]:text-field-helper",error:"text-support-error [&>*]:text-support-error",disabled:"text-field-color-disabled disabled cursor-not-allowed [&>*]:text-field-color-disabled"}[l],c,{neutral:"",help:"font-normal",error:"font-normal",disabled:""}?.[l],o),...a,children:e})});o.displayName="Label"},30071(e,t,r){r.d(t,{A:()=>h});var n=r(10790),s=r(44653),o=r(17829),l=r(69107),i=r(77984),a=r(23495),d=r(35683),c=r(86279),u=r(51609),m=r(56877);const p=u.forwardRef(({active:e,payload:t,className:r,indicator:s="dot",hideLabel:o=!1,hideIndicator:l=!1,label:i,labelFormatter:a,labelClassName:d,formatter:c,color:u,nameKey:p="name",labelKey:f},g)=>{if(!e||!t?.length)return null;const x=1===t.length&&"dot"!==s;return(0,n.jsxs)("div",{ref:g,className:(0,m.cn)("grid min-w-[8rem] items-start gap-1.5 rounded-lg border bg-tooltip-background-light px-3 py-2 text-xs shadow-xl",r),children:[x?null:(()=>{if(o||!t?.length)return null;const[e]=t,r=a?a(i||""):e[f]||i;return r?(0,n.jsx)("div",{className:(0,m.cn)("font-medium",d),children:r}):null})(),(0,n.jsx)("div",{className:"grid gap-1.5",children:t.map((e,t)=>{const r=u||e.color||"#000";return(0,n.jsxs)("div",{className:(0,m.cn)("flex w-full items-stretch gap-2","dot"===s&&"items-center"),children:[!l&&(0,n.jsx)("div",{className:(0,m.cn)({"size-2.5 ":"dot"===s,"w-1 h-full":"line"===s,"w-0 border-[0.5px] border-dashed":"dashed"===s}),style:{backgroundColor:"dot"===s||"line"===s?r:"",borderColor:"dashed"===s?r:""}}),(0,n.jsxs)("div",{className:"flex-1 flex justify-between items-center gap-2",children:[(0,n.jsx)("span",{children:e[p]||e.dataKey}),(0,n.jsx)("span",{className:"font-mono font-medium",children:c?c(e.value??""):e.value??""})]})]},e.dataKey||t)})})]})});p.displayName="ChartTooltipContent";var f=r(71087);const g="#6B7280",x=[{stroke:"#2563EB"},{stroke:"#38BDF8"}],h=({data:e,dataKeys:t=[],seriesLabels:r,colors:u=[],showXAxis:m=!1,showYAxis:h=!1,showTooltip:b=!0,tooltipIndicator:y="dot",tooltipLabelKey:v,showCartesianGrid:w=!0,xAxisTickFormatter:j,yAxisTickFormatter:N,tickFormatter:k,xAxisDataKey:C,yAxisDataKey:S,xAxisFontSize:A="sm",xAxisFontColor:z=g,yAxisFontColor:E=g,chartWidth:D=350,chartHeight:I=200,withDots:M=!1,lineChartWrapperProps:P,strokeDasharray:R="3 3",gridColor:F="#E5E7EB",biaxial:T=!1,noDataComponent:O})=>{const L=u.length>0?u:x,_={sm:"12px",md:"14px",lg:"16px"},B=_[A]||_.sm,$=(e=0)=>Array.isArray(E)?E[e]||E[0]||g:E;return e&&0!==e.length?(0,n.jsx)("div",{role:"img","aria-label":"Line chart",children:(0,n.jsx)(s.u,{width:D,height:I,children:(0,n.jsxs)(o.b,{...P,data:e,children:[w&&(0,n.jsx)(l.d,{strokeDasharray:R,horizontal:!1,stroke:F}),(0,n.jsx)(i.W,{dataKey:C,tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:j||k,tick:{fontSize:B,fill:z},hide:!m,interval:"equidistantPreserveStart"}),(0,n.jsx)(a.h,{yAxisId:"left",dataKey:T?t[0]:S,tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:N,tick:{fontSize:B,fill:$(0)},hide:!h,orientation:"left"}),T&&t.length>1&&(0,n.jsx)(a.h,{yAxisId:"right",dataKey:t[1],tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:N,tick:{fontSize:B,fill:$(1)},orientation:"right",hide:!h}),b&&(0,n.jsx)(d.m,{content:(0,n.jsx)(p,{indicator:y,labelKey:v})}),t.map((e,t)=>{let s="left";return T&&t>0&&(s="right"),(0,n.jsx)(c.N,{type:"monotone",dataKey:e,name:r?.[e],stroke:L[t].stroke,fill:L[t].stroke,strokeWidth:2,dot:M,yAxisId:s},e)})]})})}):O||(0,n.jsx)(f.A,{size:"sm",variant:"help",children:"No data available"})}},3535(e,t,r){r.d(t,{a:()=>l});var n=r(10790),s=r(56877),o=r(88553);const l=({variant:e="primary",size:t="md",icon:r=null,className:l=""})=>(0,n.jsx)("span",{role:"status","aria-label":"Loading",className:(0,s.cn)("flex",{sm:"[&>svg]:size-4",md:"[&>svg]:size-5",lg:"[&>svg]:size-6",xl:"[&>svg]:size-8"}[t],{primary:"text-brand-primary-600",secondary:"text-background-primary"}[e],l),children:r||(0,n.jsx)(o.A,{className:"animate-spin shrink-0","aria-hidden":"true"})})},56466(e,t,r){r.d(t,{dK:()=>p});var n=r(10790),s=r(51609),o=r(56877),l=r(53232),i=r(69011);const a={xs:{general:"text-xs min-w-6 h-6",ellipse:"text-xs min-w-6",icon:"size-4"},sm:{general:"text-xs min-w-8 h-8",ellipse:"text-xs min-w-8",icon:"size-4"},md:{general:"text-sm min-w-10 h-10",ellipse:"text-sm min-w-10",icon:"size-5"},lg:{general:"text-base min-w-12 h-12",ellipse:"text-base min-w-12",icon:"size-6"}},d="group disabled:border-field-border-disabled opacity-50";var c=r(88029);const u=(0,s.createContext)({size:"sm",disabled:!1}),m=()=>(0,s.useContext)(u),p=({size:e="sm",disabled:t=!1,ariaLabel:r="Pagination",children:s,className:l,...i})=>(0,n.jsx)(u.Provider,{value:{size:e,disabled:t},children:(0,n.jsx)("nav",{"aria-label":r,className:(0,o.cn)("flex w-full justify-center box-border m-0",l),...i,children:s})});p.displayName="Pagination";const f=(0,s.forwardRef)(({className:e,...t},r)=>(0,n.jsx)("ul",{ref:r,className:(0,o.cn)("m-0 p-0 w-full flex justify-center flex-row items-center gap-1","list-none",e),...t}));f.displayName="Pagination.Content";const g=(0,s.forwardRef)(({isActive:e=!1,ariaLabel:t,className:r,children:s,...l},i)=>{const{disabled:a}=m();return(0,n.jsx)("li",{ref:i,className:(0,o.cn)("flex",a&&d),children:(0,n.jsx)(x,{isActive:e,disabled:a,"aria-label":t,className:r,...l,children:s})})});g.displayName="Pagination.Item";const x=({isActive:e=!1,tag:t="button",children:r,className:s,...l})=>{const{size:i,disabled:u}=m(),p=e=>e.preventDefault();return(0,n.jsx)(c.A,{tag:t,size:i,variant:"ghost",className:(0,o.cn)("no-underline bg-transparent p-0 m-0 border-none","flex justify-center items-center rounded text-button-secondary","focus:outline focus:outline-1 focus:outline-border-subtle focus:bg-button-tertiary-hover",a[i].general,!u&&e&&"text-button-primary active:text-button-primary bg-brand-background-50",u&&[d,"group-disabled:text-field-color-disabled","focus:ring-transparent cursor-not-allowed"],s),disabled:u,...l,"aria-current":e?"page":void 0,onClick:e=>(0,o.OK)(l.onClick||(()=>{}),u?p:()=>{})(e),children:(0,n.jsx)("span",{className:"px-1 flex",children:r})})},h=e=>{const{size:t,disabled:r}=m();return(0,n.jsx)("li",{className:(0,o.cn)("flex",r&&d),children:(0,n.jsx)(x,{"aria-label":"Go to previous page",className:(0,o.cn)("[&>span]:flex [&>span]:items-center"),...e,children:(0,n.jsx)(l.A,{className:(0,o.cn)(a[t].icon)})})})};h.displayName="Pagination.Previous";const b=e=>{const{size:t,disabled:r}=m();return(0,n.jsx)("li",{className:(0,o.cn)("flex",r&&d),children:(0,n.jsx)(x,{"aria-label":"Go to next page",className:(0,o.cn)("[&>span]:flex [&>span]:items-center"),...e,children:(0,n.jsx)(i.A,{className:(0,o.cn)(a[t].icon)})})})};b.displayName="Pagination.Next";const y=e=>{const{size:t,disabled:r}=m();return(0,n.jsxs)("li",{className:(0,o.cn)("flex",r&&d),children:[(0,n.jsx)("span",{className:(0,o.cn)("flex justify-center",a[t].ellipse,r&&d),"aria-hidden":"true",...e,children:"\u2022\u2022\u2022"}),(0,n.jsx)("span",{className:"sr-only",children:"More pages"})]})};y.displayName="Pagination.Ellipsis",p.Content=f,p.Item=g,p.Previous=h,p.Next=b,p.Ellipsis=y},56231(e,t,r){r.d(t,{z:()=>o});var n=r(10790),s=r(56877);const o=({progress:e=0,speed:t=200,className:r=""})=>{let o=e;e<0&&(o=0),e>100&&(o=100);const l=`translateX(-${100-o}%)`,i=`h-2 rounded-full bg-background-brand absolute left-0 top-0 w-full bottom-0 origin-left transition-transform duration-${t} ease-linear`;return(0,n.jsx)("div",{className:(0,s.cn)("h-2 rounded-full bg-misc-progress-background overflow-hidden relative",r),role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Progress Bar",children:(0,n.jsx)("div",{className:i,style:{transform:l}})})}},66893(e,t,r){r.d(t,{Jc:()=>c});var n=r(10790),s=r(51609),o=r(56877),l=r(89667),i=r(50603);const a=(e,t)=>(0,o.cn)("rounded-full text-brand-primary-600 transition-colors duration-300",e[t].dot,e[t].ring),d={sm:{dot:"size-2.5",ring:"size-5",numberIcon:"size-5 text-tiny",icon:"size-5",label:"text-xs"},md:{dot:"size-3",ring:"size-6",numberIcon:"size-6 text-sm",icon:"size-6",label:"text-sm"},lg:{dot:"size-3.5",ring:"size-7",numberIcon:"size-7 text-md",icon:"size-7",label:"text-sm"}},c=({variant:e="dot",size:t="sm",type:r="inline",currentStep:i=1,children:a,className:c,lineClassName:u="min-w-10",completedVariant:m="icon",completedIcon:p=(0,n.jsx)(l.A,{}),...f})=>{const g=s.Children.count(a);-1===i&&(i=g+1);const x=s.Children.map(a,(o,l)=>{const a={isCompleted:l+1<i,isCurrent:l+1===i,sizeClasses:d,size:t,variant:e,type:r,isLast:l+1===g,index:l,lineClassName:u,completedVariant:m,completedIcon:p};return(0,n.jsx)(s.Fragment,{children:s.isValidElement(o)?s.cloneElement(o,a):o},l)});return(0,n.jsx)("div",{className:(0,o.cn)("flex w-full",c,"inline"===r?"items-center justify-between":""),...f,children:x})},u=({labelText:e="",icon:t=(0,n.jsx)(i.A,{}),isCurrent:r,isCompleted:s,className:a,type:d,variant:c,sizeClasses:u,size:p,isLast:f,index:g,lineClassName:x,completedVariant:h="icon",completedIcon:b=(0,n.jsx)(l.A,{}),...y})=>{const v=m(c,s,r,u,p,t,g,h,b),w={lg:"left-[calc(50%+14px)] right-[calc(-50%+14px)]",md:"left-[calc(50%+12px)] right-[calc(-50%+12px)]",sm:"left-[calc(50%+10px)] right-[calc(-50%+10px)]"},j={lg:"top-3.5",md:"top-3",sm:"top-2.5"},N=()=>{if(e){const t=(0,o.cn)(u[p].label,"text-text-tertiary",r?"text-brand-primary-600":"","break-word","stack"===d?"mt-2 transform max-w-xs":"mx-2 max-w-32");return(0,n.jsx)("span",{className:t,children:e})}return null},k=()=>{if(!f){const t=(0,o.cn)("block",s?"border-brand-primary-600":"border-border-subtle",x);return(0,n.jsx)("div","stack"===d?{className:(0,o.cn)("relative","flex","border-solid","border-y","absolute",s?"border-brand-primary-600":"border-border-subtle",j[p],w[p]),children:(0,n.jsx)("span",{className:"block"})}:{className:"flex-1",children:(0,n.jsx)("span",{className:(0,o.cn)("mr-2 border-y border-solid",!e&&"ml-2",t)})})}return null};return"stack"===d?(0,n.jsxs)("div",{className:"relative flex-1 justify-center",children:[(0,n.jsxs)("div",{className:(0,o.cn)("flex items-center flex-col",a),...y,children:[v,N()]}),k()]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:(0,o.cn)("flex items-center",a),...y,children:[v,N()]}),k()]})};u.displayName="ProgressSteps.Step";const m=(e,t,r,s,i,d,c,u="icon",m=(0,n.jsx)(l.A,{}))=>{if(t)return(0,n.jsx)("span","number"===u?{className:(0,o.cn)(a(s,i),"flex items-center justify-center bg-brand-primary-600 text-text-on-color rounded-full"),children:c+1}:{className:a(s,i),children:m});const p=((e,t,r)=>(0,o.cn)("relative flex items-center rounded-full justify-center transition-colors z-10 duration-500 ring-1",e?"ring-brand-primary-600":"ring-border-subtle",t[r].ring))(!!r,s,i),f=((e,t,r,n)=>{const s=`absolute rounded-full transition-colors duration-500 ${r[n].dot}`;return"dot"===e?(0,o.cn)(s,r[n].dot,t?"bg-brand-primary-600":"bg-text-tertiary"):"number"===e?(0,o.cn)(s,r[n].dot,t?"text-brand-primary-600":"text-text-tertiary","flex items-center justify-center"):"icon"===e?(0,o.cn)(s,t?"text-brand-primary-600":"text-text-tertiary","flex items-center justify-center"):""})(e,r,s,i);let g=null;return"number"===e?g=c+1:"icon"===e&&d&&(g=d),(0,n.jsx)("span",{className:p,children:(0,n.jsx)("span",{className:f,children:g})})};c.Step=u},16162(e,t,r){r.d(t,{Ay:()=>v});var n=r(10790),s=r(51609),o=r(44329),l=r(99455),i=r(89667),a=r(56877);const d={primary:{checkbox:"border-border-strong hover:border-border-interactive checked:border-border-interactive bg-white checked:bg-toggle-on checked:hover:bg-toggle-on-hover checked:hover:border-toggle-on-hover focus:ring-2 focus:ring-offset-2 focus:ring-focus",icon:"text-white"}},c={sm:"text-sm leading-5",md:"text-base leading-6"},u={sm:{checkbox:"size-4",icon:"size-1.5",info:"size-4"},md:{checkbox:"size-5",icon:"size-2",info:"size-5"}},m={xs:"py-1 px-1 text-sm gap-0.5 [&>svg]:size-4",sm:"py-1 px-1.5 text-base gap-1 [&>svg]:size-4",md:"py-2 px-2.5 text-base gap-1 [&>svg]:size-5",lg:"py-2.5 px-3 text-base gap-1 [&>svg]:size-6"};var p=r(99019),f=r(19781);const g=(0,s.createContext)({}),x=()=>(0,s.useContext)(g),h=({children:e,name:t,style:r="simple",size:l="md",value:i,defaultValue:d,by:c="id",as:u="div",onChange:m,className:p,disableGroup:f=!1,vertical:x=!1,columns:h=4,multiSelection:b=!1,gapClassName:y="gap-2"})=>{const v=(0,s.useMemo)(()=>typeof i<"u",[i]),w=(0,s.useMemo)(()=>t||`radio-button-group-${(0,o.Ak)()}`,[t]);let j;j=v?i:b?d??[]:d;const[N,k]=(0,s.useState)(j),C=(0,s.useCallback)(e=>{if(b)k(t=>{let r;return r=Array.isArray(t)&&"string"==typeof e&&t.includes(e)?t.filter(t=>t!==e):[...Array.isArray(t)?t:[],..."string"==typeof e?[e]:[]],"function"==typeof m&&m(r),r});else{if(v||k(e),"function"!=typeof m)return;m(e)}},[m]);p=(0,a.cn)("grid grid-cols-4",a.pi[h],y,"tile"===r&&"gap-0",x&&"grid-cols-1",p);const S=(0,a.cn)("tile"===r?"border border-border-subtle border-solid rounded-md shadow-sm":"gap-6",p),A=()=>(0,n.jsx)(g.Provider,{value:{name:w,value:v?i:N,by:c,onChange:C,isControlled:v,disableAll:f,style:r,columns:h,multiSelection:b,size:l},children:s.Children.map(e,e=>(0,s.isValidElement)(e)?e:null)});return(0,n.jsx)(n.Fragment,{children:"tile"===r?(0,n.jsx)("div",{className:S,children:A()}):(0,n.jsx)(u,{...u===s.Fragment?{}:{className:p},children:A()})})};h.displayName="RadioButton.Group";const b=(0,s.forwardRef)(({id:e,label:t,value:r,children:m,disabled:g,icon:h=null,inlineIcon:b=!1,hideSelection:v=!1,reversePosition:w=!1,borderOn:j=!1,borderOnActive:N=!0,badgeItem:k=null,useSwitch:C=!1,info:S,minWidth:A=!0,...z},E)=>{const{buttonWrapperClasses:D,...I}=z,M=x(),{name:P,value:R,by:F,onChange:T,disableAll:O,checked:L,multiSelection:_,size:B="md"}=M,$="primary",V=(0,s.useMemo)(()=>e||`radio-button-${(0,o.Ak)()}`,[e]),K=(0,s.useMemo)(()=>O||g,[O,g]),H=(0,s.useMemo)(()=>_?Array.isArray(R)&&R.includes(r):typeof L<"u"?L:typeof R==typeof r&&("string"==typeof R?R===r:Array.isArray(R)?R.includes(r):R[F]===r[F]),[R,r,L]),G=(0,s.useCallback)(()=>(0,s.isValidElement)(t)?t:t?.heading?(0,n.jsxs)("div",{className:(0,a.cn)(!b&&{"space-y-3":"sm"===B,"space-y-4":"md"===B},w&&(C?"ml-10":"ml-4"),b&&"flex gap-2",b&&!t.description&&"items-center"),children:[h&&(0,n.jsx)(n.Fragment,{children:h}),(0,n.jsxs)("div",{className:(0,a.cn)(!h||!C||h&&k?{"space-y-0.5":"sm"===B,"space-y-1":"md"===B}:"space-y-0.5"),children:[(0,n.jsx)("p",{className:(0,a.cn)("text-text-primary font-medium m-0",c[B],g&&"text-text-disabled cursor-not-allowed"),children:t.heading}),t.description&&(0,n.jsx)("p",{className:"text-text-tertiary text-sm font-normal leading-5 m-0",children:t.description})]})]}):null,[t]);if("tile"===M.style)return(0,n.jsx)(y,{id:e,label:t,value:r,disabled:g,size:B,children:m});const W=()=>{K||(_?C&&T(r,!H):T(r))};return(0,n.jsxs)("label",{className:(0,a.cn)("inline-flex items-center relative cursor-pointer transition-all duration-300",!!t&&"items-start justify-between",A&&"min-w-[180px]",j&&"outline outline-field-border outline-1 rounded-md shadow-sm hover:outline-border-interactive",N&&j&&H&&"outline-border-interactive",{"pl-3.5 pr-2.5 py-2.5":"sm"===B&&!(h&&C),"p-3":"sm"===B&&(h&&C||h&&k),"pl-4 pr-3 py-3":"md"===B&&!(h&&C),"p-4":"md"===B&&(h&&C||h&&k)},"pr-12",K&&"cursor-not-allowed opacity-40",D),htmlFor:V,onClick:W,children:[!!t&&(0,n.jsx)("label",{className:(0,a.cn)("cursor-pointer",K&&"cursor-not-allowed"),htmlFor:V,children:G()}),!!S&&(0,n.jsx)("div",{className:"absolute mr-0.5 bottom-1.5 right-3",children:(0,n.jsx)(p.m,{title:S?.heading,content:S?.description,children:(0,n.jsx)(l.A,{className:(0,a.cn)("text-text-primary",u[B]?.info)})})}),(0,n.jsxs)("label",{className:(0,a.cn)("absolute mr-0.5 right-3 flex items-center cursor-pointer rounded-full gap-2",w&&"left-0",K&&"cursor-not-allowed",b&&"mr-3"),onClick:W,children:[!!k&&k,!v&&(C?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(f.Ay,{defaultValue:!1,size:B,onChange:()=>{_?T(r,!H):T(r)},checked:H,...I,"aria-label":t?.heading??"Switch"})}):(0,n.jsxs)("span",{className:"relative p-0.5",children:[(0,n.jsx)("input",{ref:E,id:V,type:_?"checkbox":"radio",className:(0,a.cn)("peer flex relative cursor-pointer appearance-none transition-all m-0 before:content-[''] checked:before:content-[''] checked:before:hidden before:hidden !border-1.5 border-solid focus-within:outline-none",!_&&"rounded-full",d[$].checkbox,u[B].checkbox,K&&"disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled cursor-not-allowed"),name:P,value:r,onChange:e=>T(e.target.value),checked:H,disabled:K,...I}),(0,n.jsx)("span",{className:(0,a.cn)("inline-flex items-center absolute top-2/4 not-rtl:left-2/4 rtl:right-2/4 -translate-y-2/4 -translate-x-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",d[$].icon,K&&"peer-disabled:text-border-disabled cursor-not-allowed"),children:_?(0,n.jsx)(i.A,{className:"sm"===B?"size-3":"size-4"}):(0,n.jsx)("div",{className:(0,a.cn)("rounded-full bg-current",u[B]?.icon)})})]}))]})]})});b.displayName="RadioButton.Button";const y=({id:e,children:t,value:r,disabled:l,size:i="md",...d})=>{const c=x(),{name:u,value:p,by:f,onChange:g,disableAll:h,checked:b}=c||{},y=(0,s.useMemo)(()=>e||`radio-button-${(0,o.Ak)()}`,[e]),v=(0,s.useMemo)(()=>h||l,[h,l]),w=(0,s.useMemo)(()=>typeof b<"u"?b:typeof p==typeof r&&("string"==typeof p?p===r:Array.isArray(p)?p.includes(r):!(!p||!f)&&p[f]===r[f]),[p,r,b,f]),j=(0,a.cn)("bg-background-primary text-primary cursor-pointer flex items-center justify-center","hover:bg-button-tertiary-hover","focus:outline-none",v?"text-text-disabled cursor-not-allowed":"",m[i],"border-0 border-r border-border-subtle border-solid");return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("button",{type:"button",id:y,"aria-label":"Radio Button",className:(0,a.cn)(j,"first:rounded-tl first:rounded-bl first:border-0 first:border-r first:border-border-subtle last:rounded-tr last:rounded-br last:border-0",w&&"bg-button-disabled"),onClick:()=>{g&&g(r)},disabled:v,...d,children:[(0,n.jsx)("input",{type:"hidden",value:r,name:u,checked:w,onChange:e=>g?.(e.target.value)}),t]})})},v=Object.assign(b,{Group:h,Button:b})},53778(e,t,r){r.d(t,{Gd:()=>b});var n=r(10790),s=r(51609),o=r(56877),l=r(38463);const i={sm:"text-xs [&>svg]:size-4 rounded",md:"text-sm [&>svg]:size-5 rounded-md",lg:"text-base [&>svg]:size-6 rounded-md"},a={input:{sm:"py-1.5 px-2 rounded",md:"p-2.5 rounded-md",lg:"p-3 rounded-md"},content:{sm:"p-1.5",md:"p-1.5",lg:"p-2"},title:{sm:"p-2 text-xs",md:"p-2 text-sm",lg:"p-2 text-sm"},item:{sm:"text-sm text-text-secondary rounded",md:"text-base text-text-secondary rounded-md",lg:"text-base text-text-secondary rounded-md"},icon:{sm:"p-1 text-sm [&>svg]:size-4 text-icon-secondary",md:"p-2 text-base [&>svg]:size-5 text-icon-secondary",lg:"p-2 text-base [&>svg]:size-5 text-icon-secondary"},dialog:{sm:"mt-1 rounded-md",md:"mt-1.5 rounded-lg",lg:"mt-1.5 rounded-lg"}},d={primary:"bg-field-primary-background outline outline-1 outline-field-border hover:outline-border-strong focus-within:outline-focus-border focus-within:hover:outline-focus-border",secondary:"bg-field-secondary-background outline outline-1 outline-field-border hover:outline-border-strong focus-within:outline-focus-border focus-within:hover:outline-focus-border",ghost:"bg-field-secondary-background outline outline-1 outline-transparent focus-within:outline-focus-border"},c={ghost:"cursor-not-allowed text-text-disabled placeholder:text-text-disabled",primary:"outline-border-disabled hover:outline-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled placeholder:text-text-disabled",secondary:"outline-border-disabled hover:outline-border-disabled cursor-not-allowed text-text-disabled placeholder:text-text-disabled"};var u=r(83505),m=r(46885),p=r(34743),f=r(87835),g=r(3535);const x=(0,s.createContext)({}),h=()=>(0,s.useContext)(x),b=(0,s.forwardRef)(({className:e,size:t="sm",open:r=!1,setOpen:l,onOpenChange:i,loading:a=!1,clearAfterSelect:d=!0,closeAfterSelect:c=!0,variant:f="primary",filter:g=!0,...h},b)=>{const[y,v]=(0,s.useState)(""),[w,j]=(0,s.useState)(a??!1),[N,k]=(0,s.useState)(null),C=s.useRef([]),S=(0,s.useMemo)(()=>"function"==typeof l?l:i,[l,i]),{refs:A,floatingStyles:z,context:E}=(0,u.we)({open:r,onOpenChange:S,placement:"bottom-start",whileElementsMounted:m.ll,middleware:[(0,p.cY)(2),(0,p.UU)({padding:10}),(0,p.Ej)({apply({rects:e,elements:t,availableHeight:r}){t.floating.style.maxHeight=`${r}px`,t.floating.style.width=`${e.reference.width}px`,t.floating.style.fontFamily=window.getComputedStyle(t.reference).fontFamily}})]}),D=(0,u.C1)(E,{listRef:C,activeIndex:N,onNavigate:k,loop:!0,openOnArrowKeyDown:!1}),I=(0,u.s9)(E),{getReferenceProps:M,getFloatingProps:P,getItemProps:R}=(0,u.bv)([I,D]);return(0,s.useEffect)(()=>{const e=(0,o.DC)(),t=t=>{if("/"===t.key&&("Mac OS"===e?t.metaKey:t.ctrlKey)&&(t.preventDefault(),A.reference&&A.reference.current)){const e=A.reference.current instanceof HTMLElement?A.reference.current.querySelector("input"):null;e&&e.focus()}};return window.addEventListener("keydown",t),()=>{window.removeEventListener("keydown",t)}},[A.reference]),(0,s.useEffect)(()=>{r||k(null)},[r]),(0,n.jsx)(x.Provider,{value:{size:t,open:r,onOpenChange:S,refs:A,floatingStyles:z,context:E,getReferenceProps:M,getFloatingProps:P,getItemProps:R,activeIndex:N,setActiveIndex:k,listRef:C,searchTerm:y,setSearchTerm:v,isLoading:w,setIsLoading:j,clearAfterSelect:d,closeAfterSelect:c,variant:f,filter:g},children:(0,n.jsx)("div",{className:(0,o.cn)("searchbox-wrapper box-border relative w-full",e),...h,ref:b})})});b.displayName="SearchBox";const y=(0,s.forwardRef)(({className:e,type:t="text",placeholder:r="Search...",disabled:s=!1,onChange:u=()=>{},...m},p)=>{const{size:g,refs:x,getReferenceProps:b,searchTerm:y,setSearchTerm:v,open:w,setActiveIndex:j,listRef:N,onOpenChange:k,variant:C}=h(),S="lg"===g?"sm":"xs";return(0,n.jsxs)("div",{ref:x.setReference,className:(0,o.cn)("w-full group relative flex justify-center items-center gap-1.5 focus-within:z-10 transition-all ease-in-out duration-200",d[C],a.input[g],s?c[C]:"focus-within:ring-2 focus-within:ring-focus focus-within:ring-offset-2 focus-within:border-focus-border focus-within:hover:border-focus-border",e),...b(),children:[(0,n.jsx)("span",{className:(0,o.cn)(i[g],s?"text-icon-disabled":"text-icon-secondary group-hover:text-icon-primary group-focus-within:text-icon-primary","flex justify-center items-center"),children:(0,n.jsx)(l.A,{})}),(0,n.jsx)("input",{type:t,ref:p,className:(0,o.cn)(i[g],"flex-grow font-medium bg-transparent border-none outline-none border-transparent focus:ring-0 p-0 min-h-fit",s&&"text-field-placeholder focus-within:text-field-input group-hover:text-field-input placeholder:text-field-placeholder"),disabled:s,value:y,onChange:e=>{const t=e.target.value;v(t),u(t),"function"==typeof k&&(t.trim()?k(!0):k(!1))},onFocus:()=>{s||"function"!=typeof k||y?.trim()&&k(!0)},onKeyDown:e=>{if(!s){if("ArrowDown"===e.key||"ArrowUp"===e.key)return void(w&&(e.preventDefault(),"ArrowDown"===e.key?j(e=>null===e?0:e):"ArrowUp"===e.key&&j(e=>{const t=N?.current?.length||0;return null===e&&t>0?t-1:e})));"Escape"===e.key&&k(!1)}},placeholder:r,...(0,o.cJ)(m,["size","open","onOpenChange","loading"])}),(0,n.jsx)(f.A,{label:"Mac OS"===(0,o.DC)()?"\u2318/":"Ctrl /",size:S,type:"rounded",variant:"neutral",className:"bg-background-primary"})]})});y.displayName="SearchBox.Input";const v=({className:e,children:t,...r})=>{const{size:s,open:l,refs:i,floatingStyles:d,getFloatingProps:c,context:m}=h();return l?(0,n.jsx)(u.s3,{context:m,initialFocus:-1,returnFocus:!0,children:(0,n.jsx)("div",{ref:i.setFloating,style:{...d},className:(0,o.cn)("bg-background-primary rounded-md border border-solid border-border-subtle shadow-soft-shadow-lg overflow-y-auto text-wrap focus:outline-none",a.dialog[s],e),...c(),...r,children:t})}):null};v.displayName="SearchBox.Content";const w=({children:e,id:t,root:r})=>(0,n.jsx)(u.XF,{id:t,root:r,children:e});w.displayName="SearchBox.Portal";const j=({children:e,className:t})=>{const{searchTerm:r,isLoading:o,listRef:l,filter:i=!0}=h();if(!i)return(0,n.jsx)(u.ph,{elementsRef:l,children:(0,n.jsx)("div",{className:t,children:e})});const a=s.Children.toArray(e).map(e=>{if(s.isValidElement(e)&&e.type===k){const t=s.Children.toArray(e.props.children).filter(e=>s.isValidElement(e)&&"string"==typeof e.props.children&&e.props.children.toLowerCase().includes(r.toLowerCase()));return t.length>0?(0,s.cloneElement)(e,{children:t}):null}return e}).filter(Boolean);return o?(0,n.jsx)(S,{}):(0,n.jsx)(u.ph,{elementsRef:l,children:(0,n.jsx)("div",{className:t,children:a.some(e=>s.isValidElement(e)&&e.type!==A)?a:(0,n.jsx)(N,{})})})};j.displayName="SearchBox.List";const N=({children:e="No results found.",className:t})=>{const{size:r}=h();return(0,n.jsx)("div",{className:(0,o.cn)("flex justify-center items-center",a.item[r],"text-text-tertiary p-4",t),children:e})};N.displayName="SearchBox.Empty";const k=({heading:e,children:t})=>{const{size:r}=h();return(0,n.jsxs)("div",{className:(0,o.cn)(a.content[r],a.item[r]),children:[e&&(0,n.jsx)("div",{className:(0,o.cn)(a.title[r],"text-text-tertiary"),children:e}),t]})};k.displayName="SearchBox.Group";const C=(0,s.forwardRef)(({className:e,icon:t,children:r,onClick:s,...l},i)=>{const{size:d,setSearchTerm:c,clearAfterSelect:m,getItemProps:p,activeIndex:f,onOpenChange:g,closeAfterSelect:x}=h(),{ref:b,index:y}=(0,u.rm)(),v=f===y;return(0,n.jsxs)("button",{type:"button",ref:e=>{"function"==typeof i?i(e):i&&(i.current=e),b(e)},className:(0,o.cn)("flex w-full items-center justify-start gap-1 p-1 cursor-pointer border-none bg-transparent text-left focus:outline-none",v&&"bg-background-secondary",!v&&"hover:bg-background-secondary focus:bg-background-secondary",a.item[d],e),...p?.({role:"option","aria-selected":v,onClick:()=>{"function"==typeof s&&s(),m&&c(""),x&&g(!1)},...l}),children:[t&&(0,n.jsx)("span",{className:(0,o.cn)(a.icon[d],"flex items-center justify-center"),children:t}),(0,n.jsx)("span",{className:(0,o.cn)("flex-grow py-0.5 px-1 font-normal",a.item[d]),children:r})]})});C.displayName="SearchBox.Item";const S=({loadingIcon:e=(0,n.jsx)(g.a,{})})=>{const{size:t}=h(),r=s.isValidElement(e)?(0,s.cloneElement)(e,{size:t}):e;return(0,n.jsx)("div",{className:(0,o.cn)("flex justify-center p-4",i[t],a.item[t]),children:r})};S.displayName="SearchBox.Loading";const A=(0,s.forwardRef)(({className:e,...t},r)=>(0,n.jsx)("hr",{ref:r,className:(0,o.cn)("border-0 border-t border-border-subtle border-solid m-0",e),...t}));A.displayName="SearchBox.Separator",b.Input=y,b.Loading=S,b.Separator=A,b.Content=v,b.List=j,b.Empty=N,b.Group=k,b.Item=C,b.Portal=w},25572(e,t,r){r.d(t,{Ay:()=>I});var n=r(10790),s=r(51609),o=r(56877),l=r(30730),i=r(97073),a=r(38463),d=r(89667),c=r(83505),u=r(46885),m=r(34743),p=r(44329),f=r(39756);const g={sm:{icon:"[&>svg]:size-4",searchIcon:"[&>svg]:size-4",selectButton:"px-2.5 py-2 rounded text-xs font-medium leading-4 min-h-[2rem]",multiSelect:"pl-2 pr-2 py-1.5",displaySelected:"text-xs font-normal",dropdown:"rounded-md",dropdownItemsWrapper:"p-1.5",searchbarWrapper:"p-3 flex items-center gap-0.5",searchbar:"font-medium text-sm",searchbarIcon:"size-4",label:"text-sm font-medium"},md:{icon:"[&>svg]:size-5",searchIcon:"[&>svg]:size-5",selectButton:"px-3.5 py-2.5 rounded-md text-sm font-medium leading-4 min-h-[2.5rem]",multiSelect:"pl-2 pr-2.5 py-2",displaySelected:"text-sm font-normal",dropdown:"rounded-lg",dropdownItemsWrapper:"p-2",searchbarWrapper:"p-2.5 flex items-center gap-1",searchbar:"font-medium text-sm",searchbarIcon:"size-5",label:"text-sm font-medium"},lg:{icon:"[&>svg]:size-6",searchIcon:"[&>svg]:size-5",selectButton:"px-4 py-3 rounded-lg text-sm font-medium leading-5 min-h-[3rem]",multiSelect:"pl-2.5 pr-3 py-2.5",displaySelected:"text-base font-normal",dropdown:"rounded-lg",dropdownItemsWrapper:"p-2",searchbarWrapper:"p-2.5 flex items-center gap-1",searchbar:"font-medium text-sm",searchbarIcon:"size-5",label:"text-base font-medium"}},x="group-disabled:text-field-color-disabled",h={sm:"w-[calc(100%+0.75rem)] translate-x-[-0.375rem]",md:"w-[calc(100%+1rem)] translate-x-[-0.5rem]",lg:"w-[calc(100%+1rem)] translate-x-[-0.5rem]"},b={sm:"py-1.5 px-2 text-xs font-normal",md:"p-2 text-sm font-normal",lg:"p-2 text-base font-normal"},y=e=>null===e||"boolean"==typeof e?"":"string"==typeof e||"number"==typeof e?e.toString():Array.isArray(e)?e.map(y).join(" ").trim():(0,s.isValidElement)(e)?e.props&&e.props.children?y(e.props.children):"":"object"==typeof e&&"textContent"in e?e.textContent?.toString().toLowerCase()||"":"object"==typeof e&&"children"in e?y(e.children):"";var v=r(26502),w=r(3535),j=r(87835);const N=(0,s.createContext)({}),k=()=>(0,s.useContext)(N),C=(0,s.forwardRef)(({children:e,icon:t=null,placeholder:r="Select an option",optionIcon:a=null,render:d,label:c,className:u,...m},p)=>{const{sizeValue:h,getReferenceProps:b,getValues:y,selectId:v,refs:w,isOpen:N,multiple:C,combobox:S,setSelected:A,onChange:z,isControlled:E,disabled:D,by:I}=k(),M={sm:"xs",md:"sm",lg:"md"}[h],P=(0,s.useCallback)(()=>t||(0,n.jsx)(S?l.A:i.A,{className:"text-field-placeholder group-disabled:text-icon-disabled"}),[t]),R=(0,s.useCallback)(()=>{const t=y();if(!t)return null;if(C)return t.map((e,t)=>(0,n.jsx)(j.A,{className:"cursor-default",icon:a,type:"rounded",size:M,onMouseDown:F(e),label:"function"==typeof d?d(e):e.toString(),closable:!0,disabled:D},t));let r="string"==typeof t?t:"";if("function"==typeof d&&(r=d(t)),"function"==typeof e&&"function"!=typeof d){const n={value:t,...C?{onClose:F(t)}:{}};r=e(n)}return((0,s.isValidElement)(e)||"string"==typeof e)&&"function"!=typeof d&&(r=e),(0,n.jsx)("span",{className:(0,o.cn)("truncate",g[h].displaySelected,x),children:r})},[y,D]),F=e=>t=>{t?.preventDefault(),t?.stopPropagation();const r=[...y()??[]],n=r.findIndex(t=>null!==t&&null!==e&&"object"==typeof t?t[I]===e[I]:t===e);-1!==n&&(r.splice(n,1),E||A(r),"function"==typeof z&&z(r))};return(0,n.jsxs)("div",{className:"w-full flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[!!c&&(0,n.jsx)("label",{className:(0,o.cn)(g[h]?.label,"text-field-label"),htmlFor:v,children:c}),(0,n.jsxs)("button",{id:v,ref:(0,f.Px)(w.setReference,p),className:(0,o.cn)("flex items-center justify-between w-full box-border transition-[outline,background-color,color,box-shadow] duration-200 bg-white","outline outline-1 outline-field-border border-none cursor-pointer",!N&&"focus:ring-2 focus:ring-offset-2 focus:outline-focus-border focus:ring-focus [&:hover:not(:focus):not(:disabled)]:outline-border-strong",g[h].selectButton,C&&g[h].multiSelect,"group disabled:outline-field-border-disabled [&:hover:has(:disabled)]:outline-field-border-disabled disabled:cursor-default",u),tabIndex:0,disabled:D,...m,...b(),children:[(0,n.jsxs)("div",{className:(0,o.cn)("flex-1 grid items-center justify-start gap-1.5 overflow-hidden",y()&&"flex flex-wrap"),children:[R(),(C?!y()?.length:!y())&&(0,n.jsx)("div",{className:(0,o.cn)("[grid-area:1/1/2/3] text-field-input px-1",g[h].displaySelected,x),children:r})]}),(0,n.jsx)("div",{className:(0,o.cn)("flex items-center [&>svg]:shrink-0",g[h].icon),children:P()})]})]})});function S({label:e,children:t,className:r,...l}){const{index:i,totalGroups:a}=l,{sizeValue:d}=k();return(0,n.jsxs)(s.Fragment,{children:[(0,n.jsxs)("div",{className:"flex flex-col",role:"group","aria-label":e,children:[(0,n.jsx)("div",{className:(0,o.cn)("p-2 font-normal text-text-tertiary",{sm:"text-xs",md:"text-xs",lg:"text-sm"}[d],r),id:`group-${e?.toLowerCase().replace(/\s+/g,"-")}`,children:e}),(0,n.jsx)("div",{className:"flex flex-col",role:"presentation","aria-labelledby":`group-${e?.toLowerCase().replace(/\s+/g,"-")}`,children:t})]}),i<a&&!!(t&&s.Children.count(t)>0)&&(0,n.jsx)("hr",{className:(0,o.cn)("h-px my-2 w-full border-border-subtle border-b border-t-0 border-solid",h[d])})]})}function A({children:e,className:t}){const{isOpen:r,context:l,refs:i,combobox:d,floatingStyles:u,getFloatingProps:m,sizeValue:p,setSearchKeyword:f,setActiveIndex:x,setSelectedIndex:h,value:j,selected:N,getValues:C,searchKeyword:A,listContentRef:z,by:E,searchPlaceholder:D,activeIndex:I,searchFn:M,debounceDelay:P}=k(),R=(0,s.useMemo)(()=>{const t=C();let r=-1;if(t){let n=s.Children.toArray(e);n.length>0&&(0,s.isValidElement)(n[0])&&n[0].type===S&&(n=s.Children.toArray(e).map(e=>(0,s.isValidElement)(e)?s.Children.toArray(e.props.children):[]).flat()),r=n.findIndex(e=>{if(!(0,s.isValidElement)(e))return!1;const r=e.props.value;return"object"==typeof r&&"object"==typeof t?r[E]===t[E]:r===t})}return r},[j,N,e,E]);(0,s.useLayoutEffect)(()=>{r||(x(R),h(R))},[R,r]),(0,s.useLayoutEffect)(()=>{r&&(d&&[-1,null].includes(I)||x(-1))},[A,r]);const F=(0,s.useMemo)(()=>{let t=0,r=0;s.Children.forEach(e,e=>{if((0,s.isValidElement)(e)&&e.type===S){let r=!1;if(A&&!M){const t=A.toLowerCase(),n=(e.props.label?.toLowerCase()||"").includes(t),o=s.Children.toArray(e.props.children).some(e=>!!(0,s.isValidElement)(e)&&(y(e.props.children)?.toLowerCase()).includes(t));r=n||o}else r=!0;r&&t++}}),r=Math.max(0,t-1);let n=0,o=0;return s.Children.map(e,e=>{if(!(0,s.isValidElement)(e))return null;if(e.type===S){let t=!1;if(A&&!M){const r=A.toLowerCase();t=(e.props.label?.toLowerCase()||"").includes(r)}const l=s.Children.map(e.props.children,e=>{if(!(0,s.isValidElement)(e))return null;if(t){const t={...e.props,index:n++};return(0,s.cloneElement)(e,t)}if(A&&!M){const t=y(e.props.children)?.toLowerCase(),r=A.toLowerCase();if(!t?.includes(r))return null}const r={...e.props,index:n++};return(0,s.cloneElement)(e,r)});if(!l?.some(e=>null!==e))return null;const i={...e.props,children:l,index:o,totalGroups:r};return o++,(0,s.cloneElement)(e,i)}if(A&&!M){const t=y(e.props?.children)?.toLowerCase(),r=A.toLowerCase();if(!t?.includes(r))return null}return(0,s.cloneElement)(e,{...e.props,index:n++})})},[A,j,N,e,M]),T=s.Children.count(F);(0,s.useEffect)(()=>{z.current=[];let t=s.Children.toArray(e);t&&(0,s.isValidElement)(t[0])&&t[0].type===S&&(t=s.Children.toArray(t).map(e=>(0,s.isValidElement)(e)?e.props.children:null).filter(Boolean)),s.Children.forEach(t,e=>{if(!(0,s.isValidElement)(e))return;const t=y(e.props?.children)?.toLowerCase();if(A&&!M){const e=A.toLowerCase();if(!t?.includes(e))return}z.current.push(t)})},[A,M]);const[O,L]=(0,s.useState)(!1),_=(0,s.useCallback)(async()=>{if(M&&"function"==typeof M&&!O){L(!0);try{await M(A)}catch(b){}finally{L(!1)}}},[A]),B=(0,v.Y)(_,P);return(0,s.useEffect)(()=>{"function"==typeof M&&B()},[B]),(0,n.jsx)(n.Fragment,{children:r&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(c.s3,{context:l,modal:!1,visuallyHiddenDismiss:!0,children:(0,n.jsxs)("div",{ref:i.setFloating,className:(0,o.cn)("box-border [&_*]:box-border w-full bg-white outline-none shadow-lg outline outline-1 outline-border-subtle",d&&"grid grid-cols-1 grid-rows-[auto_1fr] divide-y divide-x-0 divide-solid divide-border-subtle",g[p].dropdown,!d&&"h-auto",d?"overflow-hidden":"overflow-y-auto overflow-x-hidden",t),style:{...u,zIndex:1},...m(),children:[d&&(0,n.jsxs)("div",{className:(0,o.cn)(g[p].searchbarWrapper),children:[O?(0,n.jsx)(w.a,{className:g[p].searchbarIcon}):(0,n.jsx)(a.A,{className:(0,o.cn)("text-icon-secondary shrink-0",g[p].searchbarIcon)}),(0,n.jsx)("input",{className:(0,o.cn)("px-1 w-full placeholder:text-field-placeholder border-0 focus:outline-none focus:shadow-none",g[p].searchbar),type:"search",name:"keyword","aria-label":"Search options",placeholder:D,onChange:e=>f(e.target.value),value:A,autoComplete:"off"})]}),(0,n.jsxs)("div",{className:(0,o.cn)("overflow-y-auto overflow-x-hidden",!d&&"w-full h-full",g[p].dropdownItemsWrapper),children:[!!T&&F,!T&&(0,n.jsx)("div",{className:(0,o.cn)("p-2 text-center font-medium text-field-placeholder",b[p]),children:"No items found"})]})]})})})})}function z({children:e,root:t,id:r}){return(0,n.jsx)(c.XF,{id:r,root:t,children:e})}function E({value:e,selected:t,children:r,className:l,...i}){const{sizeValue:a,getItemProps:c,onKeyDownItem:u,onClickItem:m,activeIndex:p,selectedIndex:f,updateListRef:g,getValues:x,by:h,multiple:y}=k(),{index:v}=i,w=(0,s.useRef)(v),j=(0,s.useMemo)(()=>{if(!y)return!1;const t=x();return!!t&&t.some(t=>null!==t&&null!==e&&"object"==typeof t?t[h]===e[h]:t===e)},[e,x]),N=(0,s.useMemo)(()=>"boolean"==typeof t?t:y?j:v===f,[j,f,t]);return(0,n.jsxs)("div",{className:(0,o.cn)("w-full flex items-center justify-between text-text-primary hover:bg-button-tertiary-hover rounded-md transition-all duration-150 cursor-pointer focus:outline-none focus-within:outline-none outline-none",b[a],v===p&&"bg-button-tertiary-hover",l),ref:e=>{g(v,e)},role:"option",tabIndex:v===p?0:-1,"aria-selected":N&&v===p,...c({onClick(){m(w.current,e)},onKeyDown(t){u(t,w.current,e)}}),children:[(0,n.jsx)("span",{className:"w-full truncate",children:r}),N&&(0,n.jsx)(d.A,{className:(0,o.cn)("text-icon-on-color-disabled",{sm:"size-4",md:"size-4",lg:"size-5"}[a])})]})}const D=({id:e,size:t="md",value:r,defaultValue:o,onChange:l,by:i="id",children:a,multiple:d=!1,combobox:f=!1,disabled:g=!1,searchPlaceholder:x="Search...",searchFn:h,debounceDelay:b=500})=>{const y=(0,s.useMemo)(()=>e||`select-${(0,p.Ak)()}`,[e]),v=(0,s.useMemo)(()=>typeof r<"u",[r]),[w,j]=(0,s.useState)(o),[k,C]=(0,s.useState)(""),S=(0,s.useCallback)(()=>v?r:w,[v,r,w]),[A,z]=(0,s.useState)(!1),[E,D]=(0,s.useState)(null),[I,M]=(0,s.useState)(null),P={sm:f?256:172,md:f?256:216,lg:f?256:216},{refs:R,floatingStyles:F,context:T}=(0,c.we)({strategy:"fixed",placement:"bottom-start",open:A,onOpenChange:z,whileElementsMounted:u.ll,middleware:[(0,m.cY)(5),(0,m.UU)({padding:10}),(0,m.Ej)({apply({rects:e,elements:r,availableHeight:n}){Object.assign(r.floating.style,{maxHeight:`min(${n}px, ${P[t]}px)`,maxWidth:`${e.reference.width}px`})},padding:10})]}),O=(0,s.useRef)([]),L=(0,s.useRef)([]),_=(0,s.useRef)(!1),B=(0,c.kp)(T,{event:"mousedown"}),$=(0,c.s9)(T),V=(0,c.It)(T,{role:"listbox"}),K=(0,c.C1)(T,{listRef:O,activeIndex:E,selectedIndex:I,onNavigate:D,loop:!0}),H=(0,c.lY)(T,{listRef:L,activeIndex:E,selectedIndex:I,onMatch:A?D:M,onTypingChange(e){_.current=e}}),{getReferenceProps:G,getFloatingProps:W,getItemProps:Y}=(0,c.bv)([$,V,K,B,...f?[]:[H]]),U=(e,t)=>{if(d)return((e,t)=>{const r=[...S()??[]];-1===r.findIndex(e=>null!==e&&null!==t&&"object"==typeof e?e[i]===t[i]:e===t)&&(r.push(t),v||j(r),M(e),R.reference.current.focus(),z(!1),C(""),"function"==typeof l&&l(r))})(e,t);M(e),v||j(t),R.reference.current.focus(),z(!1),C(""),"function"==typeof l&&l(t)},q=(0,s.useCallback)((e,t)=>{O.current[e]=t},[]);return(0,n.jsx)(N.Provider,{value:{selectedIndex:I,setSelectedIndex:M,activeIndex:E,setActiveIndex:D,selected:w,setSelected:j,handleSelect:U,combobox:f,sizeValue:t,multiple:d,onChange:l,isTypingRef:_,getItemProps:Y,onClickItem:(e,t)=>{U(e,t)},onKeyDownItem:(e,t,r)=>{"Enter"===e.key&&(e.preventDefault(),U(t,r))," "===e.key&&!_.current&&(e.preventDefault(),U(t,r))},getValues:S,selectId:y,getReferenceProps:G,isOpen:A,value:r,updateListRef:q,refs:R,listContentRef:L,by:i,getFloatingProps:W,floatingStyles:F,context:T,searchKeyword:k,setSearchKeyword:C,disabled:g,isControlled:v,searchPlaceholder:x,searchFn:h,debounceDelay:b},children:a})};D.displayName="Select";const I=Object.assign(D,{Portal:z,Button:C,Options:A,Option:E,OptionGroup:S});z.displayName="Select.Portal",C.displayName="Select.Button",A.displayName="Select.Options",E.displayName="Select.Option",S.displayName="Select.OptionGroup"},43663(e,t,r){r.d(t,{Ay:()=>g});var n=r(10790),s=r(51609),o=r(56877),l=r(14070),i=r(46944),a=r(99019);const d=(0,s.createContext)({isCollapsed:!1,setIsCollapsed:()=>{},collapsible:!0}),c=({children:e,className:t,onCollapseChange:r,collapsible:l=!0,borderOn:i=!0,collapsed:a=!1,...c})=>{const u=(0,s.useRef)(null),[m,p]=(0,s.useState)(()=>!l&&a?a:o.Ar.get("sidebar-collapsed")||window.innerWidth<1280);return(0,s.useEffect)(()=>{"function"==typeof r&&r(m)},[m,r]),(0,s.useEffect)(()=>{if(!l&&a)return;const e=()=>{const e=window.innerWidth<1280;if(l)if(e)p(!0),o.Ar.set("sidebar-collapsed",!0);else{const e=o.Ar.get("sidebar-collapsed");p(e||!1)}else p(!1),o.Ar.remove("sidebar-collapsed")};return window.addEventListener("resize",e),e(),()=>{window.removeEventListener("resize",e)}},[l]),(0,n.jsx)(d.Provider,{value:{isCollapsed:m,setIsCollapsed:p,collapsible:l},children:(0,n.jsx)("nav",{ref:u,"aria-label":"Sidebar",className:(0,o.cn)("h-full overflow-auto w-72 px-4 py-4 gap-4 flex flex-col bg-background-primary",i&&"border-0 border-r border-solid border-border-subtle","transition-all duration-200",m&&"w-16 px-2",t),...c,children:e})})};c.displayName="Sidebar";const u=({children:e})=>(0,n.jsx)("div",{className:"space-y-2",children:e});u.displayName="Sidebar.Header";const m=({children:e})=>(0,n.jsx)("div",{className:(0,o.cn)("space-y-4 grow items-start"),children:e});m.displayName="Sidebar.Body";const p=({children:e})=>{const{isCollapsed:t,setIsCollapsed:r,collapsible:c}=(0,s.useContext)(d);return(0,n.jsxs)("div",{className:"space-y-4",children:[e,c&&(0,n.jsx)("button",{className:(0,o.cn)("bg-transparent w-full border-0 p-0 m-0 flex items-center gap-2 text-base cursor-pointer",t&&"justify-center"),onClick:()=>{r(!t),o.Ar.set("sidebar-collapsed",!t)},"aria-label":t?"Expand sidebar":"Collapse sidebar",children:t?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(a.m,{title:"Expand",children:(0,n.jsx)(i.A,{className:"size-5"})})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.A,{className:"size-5"})," Collapse"]})})]})};p.displayName="Sidebar.Footer";const f=({children:e,className:t})=>(0,n.jsx)("div",{className:(0,o.cn)("w-full",t),children:e});f.displayName="Sidebar.Item";const g=Object.assign(c,{Header:u,Body:m,Footer:p,Item:f})},29767(e,t,r){r.d(t,{A:()=>o});var n=r(10790),s=r(56877);const o=({variant:e="rectangular",className:t,...r})=>(0,n.jsx)("div",{role:"status","aria-label":"Loading",className:(0,s.cn)({circular:"rounded-full bg-gray-200 ",rectangular:"rounded-md bg-gray-200"}[e],"animate-pulse",{circular:"size-10",rectangular:"w-96 h-3"}[e],t),...r})},19781(e,t,r){r.d(t,{Ay:()=>d});var n=r(10790),s=r(51609),o=r(44329),l=r(56877),i=r(71087);const a=({label:e,switchId:t,disabled:r=!1,children:o,size:a})=>{const d={xs:"text-xs leading-4 font-medium",sm:"text-sm leading-5 font-medium",md:"text-base leading-6 font-medium"},c={xs:"text-xs leading-4 font-normal",sm:"text-sm leading-5 font-normal",md:"text-sm leading-5 font-normal"},u={xs:"space-y-0.5",sm:"space-y-0.5",md:"space-y-1"};return(0,s.isValidElement)(e)?(0,n.jsxs)("div",{className:(0,l.cn)("inline-flex items-center gap-3","items-start"),children:[o,e]}):e?.heading||e?.description?(0,n.jsxs)("div",{className:(0,l.cn)("inline-flex",e?.heading&&e?.description?"items-start":"items-center","gap-3"),children:[o,(()=>{const{heading:s="",description:o=""}=e||{};return(0,n.jsxs)("div",{className:(0,l.cn)("space-y-0.5",u[a]),children:[s&&(0,n.jsx)(i.A,{htmlFor:t,className:(0,l.cn)("m-0",d[a]),...r&&{variant:"disabled"},children:s}),o&&(0,n.jsx)(i.A,{tag:"p",variant:"help",className:(0,l.cn)("text-sm font-normal leading-5 m-0",c[a]),...r&&{variant:"disabled"},children:o})]})})()]}):o},d=(0,s.forwardRef)(({id:e,onChange:t,value:r,defaultValue:i=!1,size:d="sm",disabled:c=!1,label:u={heading:"",description:""},name:m,className:p,...f},g)=>{const x="lg"===d?"md":d,h=(0,s.useMemo)(()=>typeof r<"u",[r]),b=(0,s.useMemo)(()=>e||`switch-${(0,o.Ak)()}`,[]),[y,v]=(0,s.useState)(i),w="primary",j=(0,s.useCallback)(()=>h?r:y,[h,r,y]),N={primary:{input:"bg-toggle-off checked:bg-toggle-on focus:ring focus:ring-toggle-on focus:ring-offset-2 border border-solid border-toggle-off-border checked:border-toggle-on-border shadow-toggleContainer focus:outline-none checked:focus:border-toggle-on-border focus:border-toggle-off-border",toggleDial:"bg-toggle-dial-background shadow-toggleDial"}},k={md:{container:"w-11 h-6",toggleDial:"size-4 peer-checked:translate-x-5"},sm:{container:"w-10 h-5",toggleDial:"size-3 peer-checked:translate-x-5"},xs:{container:"w-8 h-4",toggleDial:"size-2.5 peer-checked:translate-x-3.75"}};return(0,n.jsx)(a,{label:u,switchId:b,disabled:c,size:x,children:(0,n.jsxs)("div",{className:(0,l.cn)("relative group/switch inline-block cursor-pointer rounded-full shrink-0",k[x].container,p),children:[(0,n.jsx)("input",{ref:g,id:b,type:"checkbox",role:"switch",className:(0,l.cn)("peer appearance-none absolute rounded-full cursor-pointer transition-colors duration-300 h-full w-full before:content-[''] checked:before:content-[''] m-0 checked:[background-image:none]",N[w].input,c&&"bg-toggle-off-disabled disabled:border-transparent disabled:cursor-not-allowed checked:disabled:bg-toggle-on-disabled disabled:shadow-toggle-disabled",!c&&{primary:{input:"group-hover/switch:bg-toggle-off-hover checked:group-hover/switch:bg-toggle-on-hover checked:group-hover/switch:border-toggle-on-border"}}[w].input),checked:j(),onChange:e=>{if(c)return;const r=e.target.checked;h||v(r),"function"==typeof t&&t(r)},disabled:c,name:m,...f}),(0,n.jsx)("span",{"aria-hidden":"true",className:(0,l.cn)("peer/toggle-dial bg-white border rounded-full absolute cursor-pointer shadow-md before:content[''] before:transition-opacity before:opacity-0 hover:before:opacity-10 before:hidden border-none transition-all duration-300 top-2/4 not-rtl:left-1 rtl:right-1 -translate-y-2/4 before:w-10 before:h-10 before:rounded-full before:absolute before:top-2/4 not-rtl:before:left-2/4 rtl:before:right-2/4 before:-translate-y-2/4 before:-translate-x-2/4",k[x].toggleDial,N[w].toggleDial,c&&"peer-disabled:cursor-not-allowed",!c&&{md:"group-hover/switch:size-5 group-focus-within/switch:size-5 not-rtl:group-focus-within/switch:left-0.5 rtl:group-focus-within/switch:right-0.5 not-rtl:group-hover/switch:left-0.5 rtl:group-hover/switch:right-0.5",sm:"group-hover/switch:size-4 group-focus-within/switch:size-4 not-rtl:group-focus-within/switch:left-0.5 rtl:group-focus-within/switch:right-0.5 not-rtl:group-hover/switch:left-0.5 rtl:group-hover/switch:right-0.5",xs:"group-hover/switch:size-3.25 group-focus-within/switch:size-3.25 not-rtl:group-focus-within/switch:left-0.5 rtl:group-focus-within/switch:right-0.5 not-rtl:group-hover/switch:left-0.5 rtl:group-hover/switch:right-0.5"}[x])})]})})});d.displayName="Switch"},6903(e,t,r){r.d(t,{XI:()=>d});var n=r(10790),s=r(56877),o=r(51609),l=r(74443);const i=(0,o.createContext)(void 0),a=()=>{const e=(0,o.useContext)(i);if(!e)throw new Error("Table components must be used within Table component");return e},d=({children:e,className:t,checkboxSelection:r=!1,...l})=>{const a={checkboxSelection:r},d=o.Children.toArray(e).find(e=>o.isValidElement(e)&&e.type===g),c=o.Children.toArray(e).filter(e=>o.isValidElement(e)&&e.type!==g);return(0,n.jsx)(i.Provider,{value:a,children:(0,n.jsxs)("div",{className:"flow-root border-0.5 border-solid border-border-subtle rounded-md divide-y-0.5 divide-x-0 divide-solid divide-border-subtle overflow-hidden",children:[(0,n.jsx)("div",{className:"overflow-x-auto w-full",children:(0,n.jsx)("div",{className:"relative",children:(0,n.jsx)("table",{className:(0,s.cn)("table-fixed min-w-full border-collapse border-spacing-0",t),...l,children:c})})}),d]})})},c=({children:e,className:t,selected:r,onChangeSelection:o,indeterminate:i,disabled:d,...c})=>{const{checkboxSelection:u}=a();return(0,n.jsx)("thead",{className:(0,s.cn)("bg-background-secondary border-x-0 border-t-0 border-b-0.5 border-solid border-border-subtle",t),...c,children:(0,n.jsxs)("tr",{children:[u&&(0,n.jsx)("th",{scope:"col",className:"relative px-5.5 w-11 overflow-hidden",children:(0,n.jsx)("div",{className:"absolute inset-0 grid grid-cols-1 place-content-center",children:(0,n.jsx)(l.A,{size:"sm",checked:r,indeterminate:i,disabled:d,onChange:e=>{"function"==typeof o&&o(e)},"aria-label":r?"Deselect all":"Select all"})})}),e]})})},u=({children:e,className:t,...r})=>(0,n.jsx)("th",{scope:"col",className:(0,s.cn)("p-3 text-left text-sm font-medium leading-5 text-text-primary",t),...r,children:e}),m=({children:e,className:t,...r})=>(0,n.jsx)("tbody",{className:(0,s.cn)("bg-background-primary divide-y-0.5 divide-x-0 divide-solid divide-border-subtle",t),...r,children:e}),p=({children:e,selected:t,value:r,className:o,onChangeSelection:i,...d})=>{const{checkboxSelection:c}=a();return(0,n.jsxs)("tr",{className:(0,s.cn)("hover:bg-background-secondary",t&&"bg-background-secondary",o),...d,children:[c&&(0,n.jsx)("td",{className:"relative px-5.5 w-11 overflow-hidden",children:(0,n.jsx)("div",{className:"absolute inset-0 grid grid-cols-1 place-content-center",children:(0,n.jsx)(l.A,{size:"sm",checked:t,onChange:e=>{"function"==typeof i&&i(e,r)},"aria-label":"Select row"})})}),e]})},f=({children:e,className:t,...r})=>(0,n.jsx)("td",{className:(0,s.cn)("px-3 py-3.5 text-sm font-normal leading-5 text-text-secondary",t),...r,children:e}),g=({children:e,className:t,...r})=>{const{checkboxSelection:o}=a();return(0,n.jsx)("div",{className:(0,s.cn)("px-3 py-3",o&&"px-4",t),...r,children:e})};d.displayName="Table",c.displayName="Table.Head",u.displayName="Table.HeadCell",m.displayName="Table.Body",p.displayName="Table.Row",f.displayName="Table.Cell",g.displayName="Table.Footer",d.Head=c,d.HeadCell=u,d.Body=m,d.Row=p,d.Cell=f,d.Footer=g},54429(e,t,r){r.d(t,{Ay:()=>f});var n=r(10790),s=r(51609),o=r(56877),l=r(47917),i=r(92451),a=r(44329);const d=(0,s.createContext)({}),c=()=>(0,s.useContext)(d),u=(0,s.createContext)(null),m=({children:e,activeItem:t=null,onChange:r,className:i,size:d="sm",orientation:m="horizontal",variant:p="pill",iconPosition:f="left",width:g="full","aria-label":x})=>{const h=(0,s.useMemo)(()=>(0,a.Ak)(),[]),b=c(),y="activeItem"in b,v=b?.activeItem||t,w=(0,s.useCallback)((e,t)=>{r&&r({event:e,value:t})},[r]);let j,N="rounded-full",k="p-1",C="ring-1 ring-tab-border";"vertical"===m?j="gap-0.5":("rounded"===p||"pill"===p)&&("xs"===d||"sm"===d?j="gap-0.5":("md"===d||"lg"===d)&&(j="gap-1")),"rounded"===p||"vertical"===m?N="rounded-md":"underline"===p&&(N="rounded-none",k="p-0",C="border-t-0 border-r-0 border-l-0 border-b border-solid border-tab-border","xs"===d?j="gap-0":"sm"===d?j="gap-2.5":("md"===d||"lg"===d)&&(j="gap-3"));const S=(0,o.cn)(`box-border [&>*]:box-border flex items-center ${"full"===g?"w-full":""} ${"vertical"===m?"flex-col":""}`,N,k,j,C,"underline"!==p?"bg-tab-background":"",i);return(0,n.jsx)("div",{className:S,role:"tablist","aria-orientation":m,...x&&{"aria-label":x},onKeyDown:e=>{const t=Array.from(e.currentTarget.querySelectorAll('[role="tab"]:not([disabled])')),r=t.findIndex(t=>t===e.currentTarget.ownerDocument.activeElement);if(-1===r)return;const n="vertical"!==m,s=n?"ArrowLeft"===e.key:"ArrowUp"===e.key,o=n?"ArrowRight"===e.key:"ArrowDown"===e.key;if(!s&&!o&&"Home"!==e.key&&"End"!==e.key)return;e.preventDefault();let l=r;s?l=r<=0?t.length-1:r-1:o?l=r>=t.length-1?0:r+1:"Home"===e.key?l=0:"End"===e.key&&(l=t.length-1),t[l].focus()},children:(0,n.jsx)(u.Provider,{value:{activeItem:v,onChange:w,size:d,variant:p,orientation:m,iconPosition:f,width:g,hasPanels:y},children:(0,n.jsx)(l.o,{id:h,children:s.Children.map(e,e=>(0,s.isValidElement)(e)?s.cloneElement(e):null)})})})};m.displayName="Tabs.Group";const p=(0,s.forwardRef)(({slug:e,text:t,icon:r,className:l,disabled:a=!1,badge:d=null,...c},m)=>{const p=(0,s.useContext)(u);if(!p)throw new Error("Tab should be used inside Tabs Group");const{activeItem:f,onChange:g,size:x,variant:h,orientation:b,iconPosition:y,width:v,hasPanels:w}=p,j={xs:"px-1.5 py-0.5 text-xs [&_svg]:size-3",sm:"underline"===h?"py-1.5 text-sm [&_svg]:size-4":"px-3 py-1.5 text-sm [&_svg]:size-4",md:"underline"===h?"py-2 text-base [&_svg]:size-5":"px-3.5 py-1.5 text-base [&_svg]:size-5",lg:"underline"===h?"p-2.5 text-lg [&_svg]:size-6":"px-3.5 py-1.5 text-lg [&_svg]:size-6"}[x],N=(0,o.cn)("relative border-none bg-transparent text-text-secondary cursor-pointer flex items-center justify-center transition-[box-shadow,color,background-color] duration-200","full"===v?"flex-1":"","vertical"===b?"w-full justify-between":"");let k="rounded-full";"rounded"===h?k="rounded-md":"underline"===h&&(k="rounded-none");const C=(0,o.cn)(N,"border-none",k,"hover:text-text-primary","focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-border-strong",j,f===e?"bg-background-primary text-text-primary shadow-sm":"",a?"text-text-disabled cursor-not-allowed hover:text-text-disabled":"",l),S=(0,o.cn)("flex items-center gap-1");return(0,n.jsxs)(i.P.button,{ref:m,className:C,disabled:a,onClick:r=>{g(r,{slug:e,text:t})},layoutRoot:!0,role:"tab","aria-selected":f===e,...w&&{"aria-controls":`panel-${e}`},id:`tab-${e}`,tabIndex:f===e?0:-1,...c,children:[f===e&&"underline"===h&&(0,n.jsx)(i.P.span,{layoutId:"underline",layoutDependency:f,className:"absolute right-0 left-0 -bottom-px h-px bg-border-interactive"}),(0,n.jsxs)("span",{className:S,children:["left"===y&&r&&(0,n.jsx)("span",{className:"mr-1 contents center-center transition duration-150",children:r}),t,"right"===y&&r&&(0,n.jsx)("span",{className:"ml-1 contents center-center transition duration-150",children:r})]}),d&&(0,s.isValidElement)(d)&&d]})});p.displayName="Tabs.Tab";const f=({activeItem:e,children:t})=>(0,n.jsx)(d.Provider,{value:{activeItem:e},children:t}),g=({slug:e,children:t})=>{const r=c();if(!r)throw new Error("TabPanel should be used inside Tabs");return e!==r.activeItem?null:(0,n.jsx)("div",{role:"tabpanel",id:`panel-${e}`,"aria-labelledby":`tab-${e}`,tabIndex:0,children:t})};g.displayName="Tabs.Panel",f.Group=m,f.Tab=p,f.Panel=g},30732(e,t,r){r.d(t,{E:()=>c});var n=r(10790),s=r(56877);const o={400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold"},l={36:"text-4xl",30:"text-3xl",24:"text-2xl",20:"text-xl",18:"text-lg",16:"text-base",14:"text-sm",12:"text-xs"},i={44:"leading-11",38:"leading-9.5",32:"leading-8",30:"leading-7.5",28:"leading-7",24:"leading-6",20:"leading-5",16:"leading-4"},a={2:"tracking-2"},d={brand600:"text-brand-primary-600",link:"text-link-primary",primary:"text-text-primary",secondary:"text-text-secondary",tertiary:"text-text-tertiary",disabled:"text-text-disabled",help:"text-field-helper",label:"text-field-label",info:"text-support-info",success:"text-support-success",warning:"text-support-warning",error:"text-support-error",inverse:"text-text-on-color"},c=(0,r(51609).forwardRef)(function({as:e,children:t,weight:r,size:c,lineHeight:u,letterSpacing:m,color:p="primary",className:f,...g},x){return(0,n.jsx)(e||"p",{ref:x,className:(0,s.cn)("m-0 p-0",r?o[r]:"",c?l[c]:"",u?i[u]:"",m?a[m]:"",p?d[p]:"",f),...g,children:t})})},16145(e,t,r){r.d(t,{A:()=>d});var n=r(10790),s=r(51609),o=r(44329),l=r(56877),i=r(39756);const a=e=>"number"==typeof e?`${e}px`:e,d=(0,s.forwardRef)(({id:e,defaultValue:t="",value:r,size:d="sm",className:c="",disabled:u=!1,onChange:m=()=>{},error:p=!1,onError:f=()=>{},autoResize:g=!1,minHeight:x,maxHeight:h=160,style:b,...y},v)=>{const w=(0,s.useRef)(null),j=(0,s.useMemo)(()=>e||`input-textarea-${(0,o.Ak)()}`,[e]),N=(0,s.useMemo)(()=>typeof r<"u",[r]),[k,C]=(0,s.useState)(t),S=(0,s.useCallback)(()=>N?r:k,[N,r,k]);(0,s.useLayoutEffect)(()=>{if(!g)return;const e=w.current;e&&(e.style.height="auto",e.style.height=`${e.scrollHeight}px`)},[g,S(),x,h]);const A=u?"hover:border-border-disabled":"hover:border-border-strong",z=p?"focus:border-focus-error-border focus:ring-field-color-error border-focus-error-border":"",E=u?"border-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"",D={...b??{},minHeight:a(x),maxHeight:a(h),...g&&{resize:"none",overflow:null!==h?"auto":"hidden"}};return(0,n.jsx)("textarea",{ref:(0,i.Px)(w,v),id:j,className:(0,l.cn)("py-2 rounded border border-solid border-border-subtle bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary focus:outline-none focus-visible:outline-none transition ease-in-out duration-200",E,{sm:"px-3 rounded text-xs",md:"px-3 rounded-md text-sm",lg:"px-4 rounded-lg text-base"}[d],"focus:border-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",A,z,c),disabled:u,onChange:e=>{if(u)return;const t=e.target.value;N||C(t),"function"==typeof m&&m(t)},onInvalid:f,value:S(),style:D,...p&&{"aria-invalid":!0},...y})});d.displayName="TextArea"},15415(e,t,r){r.d(t,{h:()=>o});var n=r(10790),s=r(56877);const o=({title:e="",description:t="",icon:r=null,iconPosition:o="right",tag:l="h2",size:i="sm",className:a=""})=>{const d={xs:"gap-1 [&>svg]:size-3.5",sm:"gap-1 [&>svg]:size-4",md:"gap-1.5 [&>svg]:size-5",lg:"gap-1.5 [&>svg]:size-5"};if(!e)return null;const c=()=>(0,n.jsx)(l,{className:(0,s.cn)("font-semibold p-0 m-0",{xs:"text-base [&>*]:text-base gap-1",sm:"text-lg [&>*]:text-lg gap-1",md:"text-xl [&>*]:text-xl gap-1.5",lg:"text-2xl [&>*]:text-2xl gap-1.5"}[i]),children:e});return(0,n.jsxs)("div",t?{className:a,children:[(0,n.jsxs)("div",{children:[r&&"left"===o&&(0,n.jsxs)("div",{className:(0,s.cn)("flex items-center",d[i]),children:[r,c()]}),r&&"right"===o&&(0,n.jsxs)("div",{className:(0,s.cn)("flex items-center",d[i]),children:[c(),r]}),!r&&c()]}),(0,n.jsx)("p",{className:(0,s.cn)("text-text-secondary font-normal my-0",{xs:"text-sm",sm:"text-sm",md:"text-base",lg:"text-base"}[i]),children:t})]}:{className:a,children:[r&&"left"===o&&(0,n.jsxs)("div",{className:(0,s.cn)("flex items-center",d[i]),children:[r,c()]}),r&&"right"===o&&(0,n.jsxs)("div",{className:(0,s.cn)("flex items-center",d[i]),children:[c(),r]}),!r&&c()]})}},60443(e,t,r){r.d(t,{$:()=>s,o:()=>o});let n=1;const s=new class{#e;#t;constructor(){this.#e=[],this.#t=[]}subscribe(e){return this.#t.push(e),()=>{this.#t=this.#t.filter(t=>t!==e)}}publish(e){this.#t.forEach(t=>t(e))}add(e){this.#e.push(e),this.publish(e)}remove(e){return this.#e=this.#e.filter(t=>t.id!==e),e}create(e){const{id:t,message:r="",jsx:s,...o}=e;if(!r&&"function"!=typeof s)return;const l="number"==typeof t?t:n++;return this.#e.find(e=>e.id===l)&&(this.#e=this.#e.map(e=>e.id===l?(this.publish({...e,title:r,jsx:s,...o}),{...e,title:r,jsx:s,...o}):e)),this.add({id:l,title:r,jsx:s,...o}),l}update(e,t){const{render:r}=t;let n=t;switch(typeof r){case"function":n={jsx:r,...t};break;case"string":n={title:r,...t}}this.#e=this.#e.map(t=>t.id===e?(this.publish({...t,...n}),{...t,...n}):t)}dismiss(e){return e||this.#e.forEach(e=>this.#t.forEach(t=>t({id:e.id,dismiss:!0}))),this.#t.forEach(t=>t({id:e,dismiss:!0})),e}history(){return this.#e}default(e="",t={}){return this.create({message:e,type:"neutral",...t})}success(e="",t={}){return this.create({message:e,type:"success",...t})}error(e="",t={}){return this.create({message:e,type:"error",...t})}warning(e="",t={}){return this.create({message:e,type:"warning",...t})}info(e="",t={}){return this.create({message:e,type:"info",...t})}custom(e,t={}){return this.create({jsx:e,type:"custom",...t})}},o=Object.seal(Object.assign((e,t)=>s.default(e,t),{success:s.success.bind(s),error:s.error.bind(s),warning:s.warning.bind(s),info:s.info.bind(s),custom:s.custom.bind(s),dismiss:s.dismiss.bind(s),update:s.update.bind(s)},{getHistory:s.history.bind(s)}))},50839(e,t,r){r.d(t,{Ay:()=>b});var n=r(10790),s=r(51609),o=r(96307),l=r(60443),i=r(56877),a=r(39756);const d={"top-left":"top-0 bottom-0 start-0 justify-start items-start","top-right":"top-0 bottom-0 end-0 justify-start items-end","bottom-left":"top-0 bottom-0 start-0 justify-end items-start","bottom-right":"top-0 bottom-0 end-0 justify-end items-end"},c={neutral:"border-alert-border-neutral bg-alert-background-neutral",custom:"border-alert-border-neutral bg-alert-background-neutral",info:"border-alert-border-info bg-alert-background-info",success:"border-alert-border-green bg-alert-background-green",warning:"border-alert-border-warning bg-alert-background-warning",error:"border-alert-border-danger bg-alert-background-danger"},u="bg-background-inverse border-background-inverse",m={light:"text-icon-secondary",dark:"text-icon-inverse"};var p=r(75795),f=r(25164),g=r(92451),x=r(68995);const h=({toastItem:e,title:t="",content:r="",autoDismiss:l=!0,dismissAfter:d=5e3,theme:p="light",design:f="stack",icon:g,variant:x="neutral",removeToast:h})=>{const b=(0,s.useRef)(0),y=(0,s.useRef)(0),v=(0,s.useRef)(),w=(e,t=d)=>{if(l&&!(d<0))return b.current=(new Date).getTime(),setTimeout(()=>{"function"==typeof h&&h(e.id)},t)};(0,s.useEffect)(()=>(v.current=w(e,d),()=>{clearTimeout(v.current)}),[]),(0,s.useEffect)(()=>{!e?.dismiss||"function"!=typeof h||h(e.id)},[e]);const j=()=>{"function"==typeof h&&e?.action?.onClick?.(()=>h(e.id))};let N=null;return"stack"===f&&(N=(0,n.jsx)("div",{className:(0,i.cn)("flex items-center justify-start p-4 gap-2 relative border border-solid rounded-md shadow-lg","dark"===p?u:c?.[x],"w-[22.5rem]"),onMouseEnter:()=>{clearTimeout(v.current),y.current=(new Date).getTime()},onMouseLeave:()=>{v.current=w(e,d-(y.current-b.current))},children:"custom"!==e.type?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:(0,a.sW)({variant:x,icon:g,theme:p})}),(0,n.jsxs)("div",{className:"flex flex-col items-start justify-start gap-0.5 me-6",children:[(0,a.LK)({title:t,theme:p}),(0,a._A)({content:r,theme:p}),e?.action?.label&&"function"==typeof e?.action?.onClick&&(0,n.jsx)("div",{className:"mt-2.5",children:(0,a.Th)({actionLabel:e?.action?.label,actionType:e?.action?.type??"button",onAction:j,theme:p})})]}),(0,n.jsx)("div",{className:"absolute end-4 top-4 [&_svg]:size-5",children:(0,n.jsx)("button",{className:(0,i.cn)("inline-flex bg-transparent m-0 p-0 border-none focus:outline-none focus-visible:ring-2 focus-visible:ring-toggle-on focus-visible:ring-offset-2 active:outline-none cursor-pointer rounded",m[p]??m.light),"aria-label":"Dismiss notification",onClick:t=>{t.preventDefault(),t.stopPropagation(),"function"==typeof h&&h(e.id)},children:(0,n.jsx)(o.A,{"aria-hidden":"true"})})})]}):e?.jsx?.({close:()=>h(e.id),action:e?.action?{...e?.action,onClick:j}:null})})),"inline"===f&&(N=(0,n.jsxs)("div",{className:(0,i.cn)("flex items-center justify-start p-3 gap-2 relative border border-solid rounded-md shadow-lg","dark"===p?u:c?.[x],"lg:w-[47.5rem] w-full"),children:[(0,n.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:(0,a.sW)({variant:x,icon:g,theme:p})}),(0,n.jsxs)("div",{className:"flex items-start justify-start gap-1 me-10 [&>span:first-child]:shrink-0",children:[(0,a.LK)({title:t,theme:p}),(0,a._A)({content:r,theme:p})]}),(0,n.jsx)("div",{className:"absolute end-3 top-3 [&_svg]:size-5",children:(0,n.jsx)("button",{className:(0,i.cn)("bg-transparent m-0 p-0 border-none focus:outline-none focus-visible:ring-2 focus-visible:ring-toggle-on focus-visible:ring-offset-2 active:outline-none cursor-pointer rounded",m[p]??m.light),"aria-label":"Dismiss notification",onClick:()=>h(e.id),children:(0,n.jsx)(o.A,{"aria-hidden":"true"})})})]})),N},b=(0,x.A)(({position:e="top-right",design:t="stack",theme:r="light",className:o="",autoDismiss:a=!0,dismissAfter:c=5e3})=>{const[u,m]=(0,s.useState)([]);(0,s.useEffect)(()=>{l.$.subscribe(e=>{e?.dismiss?m(t=>t.map(t=>t.id===e.id?{...t,dismiss:!0}:t)):setTimeout(()=>{(0,p.flushSync)(()=>m(t=>-1!==t.findIndex(t=>t.id===e.id)?t.map(t=>t.id===e.id?{...t,...e}:t):[...t,e]))})})},[]);const x=e=>{m(t=>t.filter(t=>t.id!==e))};return(0,n.jsx)("ul",{"aria-live":"polite","aria-label":"Notifications",className:(0,i.cn)("fui-toast-container fixed flex flex-col list-none z-20 p-10 pointer-events-none [&>li]:pointer-events-auto gap-3",d[e]??d["top-right"],o),children:(0,n.jsx)(f.N,{initial:!1,children:u.map(e=>(0,n.jsx)(g.P.li,{initial:{opacity:0,y:50,scale:.7},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.6,transition:{duration:.15}},layoutId:`toast-${e.id}`,children:(0,n.jsx)(h,{toastItem:e,title:e.title,content:e?.description,icon:e?.icon??void 0,design:e?.design??t,autoDismiss:e?.autoDismiss??a,dismissAfter:e?.dismissAfter??c,removeToast:x,variant:e.type,theme:e?.theme??r})},e.id))})})})},39756(e,t,r){r.d(t,{LK:()=>g,Px:()=>h,Th:()=>f,_A:()=>x,sW:()=>p});var n=r(10790),s=r(51609),o=r(89667),l=r(99455),i=r(60306),a=r(9400),d=r(56877),c=r(88029);const u="light",m="neutral",p=({icon:e,theme:t=u,variant:r=m})=>{const c="[&>svg]:h-5 [&>svg]:w-5",p=(({theme:e=u,variant:t=m})=>{let r="light"===e?"text-icon-secondary":"text-icon-inverse";return r={info:"light"===e?"text-support-info":"text-support-info-inverse",success:"light"===e?"text-support-success":"text-support-success-inverse",warning:"light"===e?"text-support-warning":"text-support-warning-inverse",error:"light"===e?"text-support-error":"text-support-error-inverse"}[t]||r,r})({theme:t,variant:r});if(e&&(0,s.isValidElement)(e))return(0,s.cloneElement)(e,{className:(0,d.cn)(c,p,e?.props?.className??"")});const f={neutral:(0,n.jsx)(l.A,{className:(0,d.cn)(c,p)}),info:(0,n.jsx)(l.A,{className:(0,d.cn)(c,p)}),success:(0,n.jsx)(o.A,{className:(0,d.cn)(c,p)}),warning:(0,n.jsx)(a.A,{className:(0,d.cn)(c,p)}),error:(0,n.jsx)(i.A,{className:(0,d.cn)(c,p)})};return f[r]||f.neutral},f=({actionType:e="button",onAction:t=()=>{},actionLabel:r="",theme:s=u})=>{const o="focus:ring-0 focus:ring-offset-0 ring-offset-0 focus:outline-none";let l="text-button-primary border-button-primary hover:border-button-primary hover:text-button-primary-hover";switch("dark"===s&&(l="text-text-inverse border-text-inverse hover:border-text-inverse hover:text-text-inverse"),e){case"button":return(0,n.jsx)(c.A,{variant:"outline",size:"xs",onClick:t,className:(0,d.cn)("rounded",o,l,"dark"===s?"bg-transparent hover:bg-transparent":"bg-white hover:bg-white"),children:r});case"link":return(0,n.jsx)(c.A,{variant:"link",size:"xs",onClick:t,className:(0,d.cn)(o,l),children:r});default:return null}},g=({theme:e=u,title:t="",inline:r=!1})=>t?(0,n.jsx)("span",{className:(0,d.cn)("block",{light:"text-text-primary",dark:"text-text-inverse"}[e],"text-sm leading-5 font-semibold",r?"inline":"block"),children:t}):null,x=({theme:e=u,content:t="",inline:r=!1})=>t?(0,n.jsx)("span",{className:(0,d.cn)({light:"text-text-primary",dark:"text-text-inverse"}[e],"block text-sm [&_*]:text-sm leading-5 [&_*]:leading-5 font-normal [word-break:break-word]",r?"inline":"block"),children:t}):null,h=(...e)=>t=>{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})}},99019(e,t,r){r.d(t,{m:()=>c});var n=r(10790),s=r(51609),o=r(83505),l=r(46885),i=r(34743),a=r(56877),d=r(39756);const c=({variant:e="dark",placement:t="bottom",title:r="",content:c,arrow:u=!1,open:m,setOpen:p,children:f,className:g,tooltipPortalRoot:x,tooltipPortalId:h,boundary:b="clippingAncestors",strategy:y="fixed",offset:v=8,triggers:w=["hover","focus"],interactive:j=!1})=>{const N=(0,s.useMemo)(()=>"boolean"==typeof m&&"function"==typeof p,[m,p]),[k,C]=(0,s.useState)(!1),S=(0,s.useRef)(null),{refs:A,floatingStyles:z,context:E}=(0,o.we)({open:N?m:k,onOpenChange:N?p:C,placement:t,strategy:y,middleware:[(0,i.cY)(v),(0,i.UU)({boundary:b}),(0,i.BN)({boundary:b}),(0,i.UE)({element:S})],whileElementsMounted:l.ll}),D=(0,o.kp)(E,{enabled:!N&&w.includes("click")}),I=(0,o.Mk)(E,{move:!1,enabled:!N&&w.includes("hover"),...j&&{handleClose:(0,o.iB)()}}),M=(0,o.iQ)(E,{enabled:!N&&w.includes("focus")}),P=(0,o.s9)(E),R=(0,o.It)(E,{role:"tooltip"}),{getReferenceProps:F,getFloatingProps:T}=(0,o.bv)([D,I,M,P,R]),{isMounted:O,styles:L}=(0,o.DL)(E,{duration:150,initial:{opacity:0},open:{opacity:1},close:{opacity:0}}),_={light:"bg-tooltip-background-light text-text-primary",dark:"bg-tooltip-background-dark text-text-on-color"}[e],B="dark"===e?"text-tooltip-background-dark":"text-tooltip-background-light";return(0,n.jsxs)(s.Fragment,{children:[(0,s.isValidElement)(f)&&(0,n.jsx)(s.Fragment,{children:(0,s.cloneElement)(f,{ref:(0,d.Px)(f.ref,A.setReference),className:(0,a.cn)(f.props.className),...F()})},"tooltip-reference"),(0,n.jsx)(o.XF,{id:h,root:x,children:O&&(0,n.jsxs)("div",{className:(0,a.cn)("absolute z-20 py-2 px-3 rounded-md text-xs leading-4 shadow-soft-shadow-lg",_,"max-w-80 w-fit",g),ref:A.setFloating,style:{...z,...L},...T(),children:[(0,n.jsxs)("div",{children:[!!r&&(0,n.jsx)("span",{className:"font-semibold",children:r},"tooltip-title"),!!c&&(0,n.jsx)("div",{className:"font-normal",children:c},"tooltip-content")]}),u&&(0,n.jsx)(o.ie,{ref:S,context:E,className:(0,a.cn)("fill-current",B)})]})})]})};c.displayName="Tooltip"},59909(e,t,r){r.d(t,{bx:()=>o});var n=r(10790),s=r(56877);const o=({children:e,gap:t="lg",className:r,...o})=>(0,n.jsx)("header",{className:(0,s.cn)("w-full box-border flex items-center justify-between bg-background-primary p-5 min-h-16",(0,s.HK)(t),r),...o,children:e});o.displayName="Topbar";const l=({gap:e="sm",children:t,className:r})=>(0,n.jsx)("div",{className:(0,s.cn)("flex items-center",(0,s.HK)(e),r),children:t});l.displayName="Topbar.Left";const i=({gap:e="md",children:t,align:r="center",className:o})=>{const l={left:"justify-start",center:"justify-center",right:"justify-end"}[r];return(0,n.jsx)("div",{className:(0,s.cn)("flex items-center grow",(0,s.HK)(e),l,o),children:t})};i.displayName="Topbar.Middle";const a=({gap:e="sm",children:t,className:r})=>(0,n.jsx)("div",{className:(0,s.cn)("flex items-center",(0,s.HK)(e),r),children:t});a.displayName="Topbar.Right";const d=({children:e,className:t})=>(0,n.jsx)("div",{className:(0,s.cn)("flex items-center [&>svg]:block h-full",t),children:e});d.displayName="Topbar.Item",o.Left=l,o.Middle=i,o.Right=a,o.Item=d}}]);
Nama
Tipe
Ukuran
Diubah
Aksi
🐘 index.asset.php
php
131 B
2026-06-21 06:40
📜 index.js
js
138.3 KB
2026-06-21 06:40