@texturehq/edges 0.0.15 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +71 -57
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +341 -264
- package/dist/index.d.ts +341 -264
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/styles.css +639 -413
- package/dist/theme.css +88 -3
- package/package.json +9 -3
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {Link,Button,TextField,ListBox,useSlottedContext,PopoverContext,Popover,composeRenderProps,OverlayArrow,Select,SelectValue,NumberField,Group,Input,TimeField,DateInput,DateSegment,DateField,ToggleButton,TooltipTrigger,Tooltip,Switch,ProgressBar,Calendar,CalendarGrid,CalendarGridBody,CalendarCell,Text,useLocale,Heading,CalendarGridHeader,CalendarHeaderCell,RangeCalendar,ComboBox,ListBoxItem,Form,Dialog,DateRangePicker,Checkbox}from'react-aria-components';import U,{memo,useState,useContext,useRef,useId,useEffect,useCallback,useMemo,useReducer}from'react';import {WaveSine,X,Wind,WebhooksLogo,WarningCircle,Warning,UsersFour,Users,UserPlus,UserCircle,User,TreeEvergreen,Trash,ThermometerSimple,ThermometerHot,ThermometerCold,Terminal,Sun,Stack,SquaresFour,Square,SolarPanel,Snowflake,SlidersHorizontal,Sliders,SlackLogo,SignOut,ShieldCheck,ShareNetwork,Rocket,Repeat,Question,Pulse,Power,Plus,PlugsConnected,Plugs,PencilSimple,PaperclipHorizontal,PaperPlaneTilt,PaperPlaneRight,Moon,MaskHappy,MapPinArea,MapPin,MagnifyingGlass,Lock,ListNumbers,ListBullets,List,LightningSlash,Lightning,IntersectSquare,Info,Handshake,HandPointing,GearSix,Gauge,Flag,FireSimple,Export,EyeSlash,EyeClosed,Eye,EnvelopeSimple,DownloadSimple,DotsThree,DotsSix,Database,Cursor,Copy,Columns,Code,CloudSun,CloudSnow,CloudRain,CloudLightning,CloudFog,CloudArrowDown,Cloud,ClockCountdown,ClipboardText,CircleNotch,CircleDashed,Circle,CheckSquare,CheckCircle,Check,ChartLineUp,ChartLine,ChartBar,ChargingStation,CarSimple,CaretUp,CaretRight,CaretLeft,CaretDown,CalendarBlank,Buildings,Broadcast,BracketsCurly,BookmarkSimple,BookOpen,BatteryWarning,BatteryMedium,BatteryLow,BatteryHigh,BatteryFull,BatteryEmpty,BatteryCharging,ArrowsClockwise,ArrowUp,ArrowSquareOut,ArrowRight,ArrowLineLeft,ArrowLeft,ArrowDown,ArrowCircleUp,AppWindow}from'@phosphor-icons/react';import {twMerge}from'tailwind-merge';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import'luxon';import {CalendarIcon,Minus,Check as Check$1}from'lucide-react';var nn=()=>jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),an=()=>jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),We={AppWindow:AppWindow,ArrowCircleUp:ArrowCircleUp,ArrowDown:ArrowDown,ArrowLeft:ArrowLeft,ArrowLineLeft:ArrowLineLeft,ArrowRight:ArrowRight,ArrowSquareOut:ArrowSquareOut,ArrowUp:ArrowUp,ArrowsClockwise:ArrowsClockwise,BatteryCharging:BatteryCharging,BatteryEmpty:BatteryEmpty,BatteryFull:BatteryFull,BatteryHigh:BatteryHigh,BatteryLow:BatteryLow,BatteryMedium:BatteryMedium,BatteryWarning:BatteryWarning,BookOpen:BookOpen,BookmarkSimple:BookmarkSimple,BracketsCurly:BracketsCurly,Broadcast:Broadcast,Buildings:Buildings,CalendarBlank:CalendarBlank,CaretDown:CaretDown,CaretLeft:CaretLeft,CaretRight:CaretRight,CaretUp:CaretUp,CarSimple:CarSimple,ChargingStation:ChargingStation,ChartBar:ChartBar,ChartLine:ChartLine,ChartLineUp:ChartLineUp,Check:Check,CheckCircle:CheckCircle,CheckSquare:CheckSquare,Circle:Circle,CircleDashed:CircleDashed,CircleNotch:CircleNotch,ClipboardText:ClipboardText,ClockCountdown:ClockCountdown,Cloud:Cloud,CloudArrowDown:CloudArrowDown,CloudFog:CloudFog,CloudLightning:CloudLightning,CloudRain:CloudRain,CloudSnow:CloudSnow,CloudSun:CloudSun,Code:Code,Columns:Columns,Copy:Copy,Cursor:Cursor,Database:Database,DotsSix:DotsSix,DotsThree:DotsThree,DownloadSimple:DownloadSimple,EnvelopeSimple:EnvelopeSimple,Eye:Eye,EyeClosed:EyeClosed,EyeSlash:EyeSlash,Export:Export,FireSimple:FireSimple,Flag:Flag,Gauge:Gauge,GearSix:GearSix,HandPointing:HandPointing,Handshake:Handshake,Info:Info,IntersectSquare:IntersectSquare,Lightning:Lightning,LightningSlash:LightningSlash,List:List,ListBullets:ListBullets,ListNumbers:ListNumbers,Lock:Lock,MagnifyingGlass:MagnifyingGlass,MapPin:MapPin,MapPinArea:MapPinArea,MaskHappy:MaskHappy,Moon:Moon,PaperPlaneRight:PaperPlaneRight,PaperPlaneTilt:PaperPlaneTilt,PaperclipHorizontal:PaperclipHorizontal,PencilSimple:PencilSimple,Plugs:Plugs,PlugsConnected:PlugsConnected,Plus:Plus,Power:Power,Pulse:Pulse,Question:Question,Repeat:Repeat,Rocket:Rocket,ShareNetwork:ShareNetwork,ShieldCheck:ShieldCheck,SignOut:SignOut,SlackLogo:SlackLogo,Sliders:Sliders,SlidersHorizontal:SlidersHorizontal,Snowflake:Snowflake,SolarPanel:SolarPanel,Square:Square,SquaresFour:SquaresFour,Stack:Stack,Sun:Sun,Terminal:Terminal,ThermometerCold:ThermometerCold,ThermometerHot:ThermometerHot,ThermometerSimple:ThermometerSimple,Trash:Trash,TreeEvergreen:TreeEvergreen,User:User,UserCircle:UserCircle,UserPlus:UserPlus,Users:Users,UsersFour:UsersFour,Warning:Warning,WarningCircle:WarningCircle,WebhooksLogo:WebhooksLogo,Wind:Wind,X:X,TextureMenuLight:nn,TextureMenuDark:an,WaveSine:WaveSine},x=memo(({name:e,size:t=24,color:r,weight:o="regular",className:a,title:n,ariaLabel:s,grow:i,variant:l="default",rounded:c=false,bgColor:d,...u})=>{if(!e)return null;let m=We[e];if(!m)return process.env.NODE_ENV==="development"&&console.error(`Icon with name "${e}" does not exist.`),null;let f=e==="TextureMenuLight"||e==="TextureMenuDark",p=s||n||`${e} icon`,g=l==="container"?"bg-[#F3F4F6":l==="brand"?"bg-gray-light":"",h=twMerge("inline-flex items-center justify-center w-12 h-12 p-3 rounded-xl bg-brand-light",d,c?"rounded-md":"",i?"w-full h-full":"",a),b=["inline-flex items-center justify-center",d||g,c?"rounded-md":"",i?"w-full h-full":`w-[${t}px] h-[${t}px]`].filter(Boolean).join(" "),y=jsx(m,{size:i?void 0:t,color:l==="brand"&&!f?void 0:r,className:l==="brand"&&!f?"text-brand-dark w-6 h-6":a||"",weight:o,"aria-label":p,"data-testid":`${e}-icon`,...u});return l==="brand"?jsx("div",{className:h,children:y}):l==="default"?y:jsx("div",{className:b,children:y})});x.displayName="Icon";function V(e=false){return `${e?"outline outline-1 outline-border-input focus:outline-2 focus:outline-border-focus focus:outline-offset-0 invalid:outline-2 invalid:outline-feedback-error-border group-invalid:outline-2 group-invalid:outline-feedback-error-border forced-colors:focus:outline-[Highlight] forced-colors:focus:outline-2 forced-colors:focus:outline-offset-2":"outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-border-focus focus-visible:outline-offset-0 invalid:outline-2 invalid:outline-feedback-error-border group-invalid:outline-2 group-invalid:outline-feedback-error-border forced-colors:focus:outline-[Highlight] forced-colors:focus:outline-2 forced-colors:focus:outline-offset-2"}`}function T(e,t){return composeRenderProps(e,r=>twMerge(t,r))}var P={sm:{text:"text-[length:var(--control-text-sm)]",height:"h-[var(--control-sm-height)]",padding:"px-[var(--control-padding-sm)]",gap:"gap-[var(--control-gap-sm)]"},md:{text:"text-[length:var(--control-text-md)]",height:"h-[var(--control-md-height)]",padding:"px-[var(--control-padding-md)]",gap:"gap-[var(--control-gap-md)]"},lg:{text:"text-[length:var(--control-text-lg)]",height:"h-[var(--control-lg-height)]",padding:"px-[var(--control-padding-lg)]",gap:"gap-[var(--control-gap-lg)]"},xl:{text:"text-[length:var(--control-text-xl)]",height:"h-[var(--control-xl-height)]",padding:"px-[var(--control-padding-xl)]",gap:"gap-[var(--control-gap-xl)]"}};var un="flex font-medium justify-center items-center gap-2 text-center transition rounded-sm whitespace-nowrap box-border",pn={default:"bg-text-body text-neutral-white hover:brightness-90 forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent",primary:"bg-action-primary text-neutral-white hover:brightness-90 forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent",secondary:"bg-transparent text-text-body border-2 border-border-muted hover:bg-text-body/5 forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText]",ghost:"border-none text-text-body hover:bg-text-body/5 forced-colors:text-[ButtonText] forced-colors:hover:bg-[ButtonFace]",destructive:"bg-transparent text-action-destructive border-2 border-border-muted hover:bg-action-destructive/5 forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[Mark]",link:"!text-action-primary hover:text-action-primary/90 hover:underline hover:decoration-2 hover:underline-offset-4",icon:"border-none text-text-body hover:bg-text-body/5 forced-colors:text-[ButtonText] forced-colors:hover:bg-[ButtonFace] p-2 flex-shrink-0",unstyled:"bg-transparent"},Ue={full:"w-full",default:"w-fit"},mn="opacity-control-hover cursor-not-allowed pointer-events-none grayscale",fn="opacity-100 cursor-pointer",gn={"top-right":"-right-2 -top-2","top-left":"-left-2 -top-2","bottom-right":"-right-2 -bottom-2","bottom-left":"-left-2 -bottom-2"},bn={primary:"bg-action-primary text-white",destructive:"bg-action-destructive text-white"};function xn(e){let{variant:t="default",size:r="md",isDisabled:o,fullWidth:a=false,isLoading:n=false}=e,s=t==="unstyled"?"":`${un} ${pn[t]}`;return t!=="unstyled"&&(s+=` ${P[r].text} ${P[r].height} ${P[r].padding} ${P[r].gap}`),o||n?s+=` ${mn}`:s+=` ${fn}`,a?s+=` ${Ue.full}`:s+=` ${Ue.default}`,`${s} ${V()}`}function A(e){let{icon:t,children:r,isLoading:o=false,loadingText:a,loadingIndicator:n,size:s="md",iconPosition:i="left",iconWeight:l,href:c,className:d,badgeNumber:u,badgeVariant:m="primary",badgePosition:f="top-right",style:p,...g}=e,h=t?jsx(x,{name:t,className:`icon-[--control-icon-size-${s}]`,weight:l}):null,b=jsxs(Fragment,{children:[i==="left"&&h,typeof r=="function"?null:r,i==="right"&&h]}),v=jsxs("div",{className:"relative inline-flex items-center justify-center",children:[jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:n||jsx(x,{name:"CircleNotch",className:`animate-spin icon-[--control-icon-size-${s}]`,"aria-hidden":"true"})}),jsx("div",{className:"invisible","aria-hidden":"true",children:b}),a&&jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:a})]}),S=[xn(e),d,o?"aria-busy":""].filter(Boolean).join(" "),$=c?jsx(Link,{href:c,...g,style:p,className:S,children:o?v:typeof r=="function"?function(y){return jsxs(Fragment,{children:[i==="left"&&h,r(y),i==="right"&&h]})}:b}):jsx(Button,{...g,style:p,className:S,children:o?v:typeof r=="function"?function(y){return jsxs(Fragment,{children:[i==="left"&&h,r(y),i==="right"&&h]})}:b});return u&&u>0?jsxs("div",{className:"relative",children:[$,jsx("span",{className:`absolute ${gn[f]} flex h-5 w-5 items-center justify-center rounded-full ${bn[m]} text-xs`,"aria-label":`${u} items`,children:u})]}):$}function J(){let[e,t]=U.useState(false),r=U.useCallback((a,n)=>{t(true),n?.(a);},[]),o=U.useCallback((a,n)=>{t(false),n?.(a);},[]);return {isFocused:e,handleFocus:r,handleBlur:o}}function Y({children:e,className:t}){return jsx("div",{className:twMerge("relative w-full",t),children:e})}function Qe({onClick:e,size:t="md",className:r}){return jsx("button",{type:"button",onClick:o=>{o.preventDefault(),o.stopPropagation(),e();},className:twMerge("absolute right-2 top-1/2 -translate-y-1/2 transform text-text-muted hover:text-text-body",r),"aria-label":"Clear input",onMouseDown:o=>{o.preventDefault(),o.stopPropagation();},children:jsx(x,{name:"X",size:t==="sm"?16:20})})}function _(e){let{isInvalid:t,isDisabled:r,isFocused:o}=e,a="border rounded-[var(--control-border-radius)] ";return r?`${a} border-border-muted focus:outline-none`:t&&o?`${a} border-feedback-error-border outline-[1.5px] outline-[var(--control-focus-ring-color-error)]`:t?`${a} border-feedback-error-border`:o?`${a} !outline-[1.5px] !outline-[var(--control-focus-ring-color)] ![--tw-outline-style:solid]`:`${a}`}function Te(e){return e.isDisabled?"bg-background-muted":e.transparent?"bg-transparent":"bg-background-input"}function q(e){let{isInvalid:t,isDisabled:r,isFocused:o,transparent:a,size:n="md",className:s}=e;return twMerge("w-full",_({isInvalid:t,isDisabled:r,isFocused:o}),Te({transparent:a,isDisabled:r}),P[n].text,P[n].height,P[n].padding,s)}function $e(e){let{size:t="md",isFocusWithin:r,isInvalid:o,isDisabled:a,transparent:n,className:s}=e;return twMerge("group flex items-center rounded-sm overflow-hidden",!n&&"bg-background-input",n&&"bg-transparent",P[t].height,_({isFocused:r,isInvalid:o,isDisabled:a}),s)}function L({children:e,size:t="md",tooltip:r,isRequired:o,className:a,htmlFor:n}){return jsxs("label",{htmlFor:n,className:twMerge(P[t].text,"!text-text-caption flex items-center gap-1",a),children:[e,o&&jsx("span",{className:"text-feedback-error-text",children:"*"}),r&&jsx("span",{className:"text-text-muted",children:jsx(x,{name:"Info",size:t==="sm"?16:20})})]})}function I({size:e="md",className:t,children:r,...o}){return jsx("div",{...o,className:twMerge("leading-[2.25] text-text-muted",P[e].text,t),children:r})}function k({children:e,size:t="md",className:r}){return jsx("div",{role:"alert",className:twMerge(P[t].text,"text-feedback-error-text",r),children:e})}function Xe({size:e="md",isInvalid:t,isDisabled:r,isFocused:o,transparent:a,className:n,...s}){return jsx("input",{className:q({isInvalid:t,isDisabled:r,isFocused:o,transparent:a,size:e,className:n}),...s})}function Je(e){let{children:t,...r}=e;return jsx("div",{...r,className:$e(e),children:typeof t=="function"?t(e):t})}var Sn=e=>{let t=q({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused,transparent:e.transparent,size:e.size}),r=[e.showSearchIcon?"pl-8":"pl-3",e.isClearable&&e.hasValue||e.isPassword?"pr-8":"pr-3"].join(" ");return twMerge(t,r,e.className)};function _e({label:e,description:t,errorMessage:r,size:o="md",tooltip:a,isRequired:n,transparent:s,showSearchIcon:i,isClearable:l,onClear:c,type:d,validationResult:u,...m}){let[f,p]=U.useState(false),{isFocused:g,handleFocus:h,handleBlur:b}=J(),v=d==="password";return jsx(TextField,{...m,isRequired:n,type:v?f?"text":"password":d,className:T(m.className,"group flex flex-col"),children:({isDisabled:S,isInvalid:$})=>jsxs("div",{className:"flex flex-col",children:[e&&jsx(L,{size:o,tooltip:a,isRequired:n,children:e}),jsxs(Y,{children:[i&&jsx("div",{className:"pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 transform",children:jsx(x,{name:"MagnifyingGlass",className:"h-4 w-4 text-text-muted"})}),jsx(Xe,{size:o,disabled:S,onFocus:y=>h(y,m.onFocus),onBlur:y=>b(y,m.onBlur),onChange:y=>m.onChange?.(y.target.value),className:Sn({isInvalid:$,isDisabled:S,isFocused:g,size:o,transparent:s,showSearchIcon:i,isClearable:l,hasValue:!!m.value,isPassword:v,className:typeof m.className=="string"?m.className:void 0})}),l&&m.value&&!S&&jsx(Qe,{onClick:()=>{c?c():m.onChange&&m.onChange("");},size:o}),v&&!S&&jsx("button",{type:"button",onClick:()=>p(!f),className:"absolute right-3 top-1/2 -translate-y-1/2 transform text-text-muted hover:text-text-body","aria-label":f?"Hide password":"Show password",onMouseDown:y=>{y.preventDefault(),y.stopPropagation();},children:jsx(x,{name:f?"EyeSlash":"Eye",size:o==="sm"?16:20,className:"text-text-body"})})]}),t&&jsx(I,{size:o,className:"mt-3",children:t}),typeof r=="string"&&jsx(k,{size:o,className:"mt-1",children:r}),typeof r=="function"&&u&&jsx(k,{size:o,className:"mt-1",children:r(u)})]})})}var Rn=e=>{let t=q({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused,transparent:e.transparent,size:e.size});return twMerge(t,"min-h-[100px] resize-y py-2",e.className)};function et({label:e,description:t,errorMessage:r,size:o="md",tooltip:a,required:n,transparent:s,isInvalid:i,className:l,validationResult:c,...d}){let{isFocused:u,handleFocus:m,handleBlur:f}=J();return jsx("div",{className:"group flex flex-col",children:jsxs("div",{className:"flex flex-col",children:[e&&jsx(L,{size:o,tooltip:a,isRequired:n,children:e}),jsx(Y,{children:jsx("textarea",{...d,required:n,onFocus:p=>{d.onFocus&&d.onFocus(p),m(p);},onBlur:p=>{d.onBlur&&d.onBlur(p),f(p);},className:Rn({isInvalid:i,isDisabled:d.disabled,isFocused:u,size:o,transparent:s,className:l})})}),t&&jsx(I,{size:o,className:"mt-3",children:t}),typeof r=="string"&&jsx(k,{size:o,className:"mt-1",children:r}),typeof r=="function"&&c&&jsx(k,{size:o,className:"mt-1",children:r(c)})]})})}function $n({children:e,...t}){return jsx(ListBox,{...t,className:T(t.className,"border border-gray-300 outline-0 dark:border-zinc-600"),children:e})}function Dn({isEntering:e,isExiting:t,className:r=""}){let o=["bg-white","dark:bg-zinc-900/70","dark:backdrop-blur-2xl","dark:backdrop-saturate-200","forced-colors:bg-[Canvas]","shadow-2xl","rounded-sm","bg-clip-padding","border","border-gray-300","dark:border-white/[15%]","dark:text-zinc-300"].join(" "),a=e?["animate-in","fade-in","placement-bottom:slide-in-from-top-1","placement-top:slide-in-from-bottom-1","placement-left:slide-in-from-right-1","placement-right:slide-in-from-left-1","ease-out","duration-200"].join(" "):"",n=t?["animate-out","fade-out","placement-bottom:slide-out-to-top-1","placement-top:slide-out-to-bottom-1","placement-left:slide-out-to-right-1","placement-right:slide-out-to-left-1","ease-in","duration-150"].join(" "):"";return [o,a,n,r].filter(Boolean).join(" ")}function ie({children:e,showArrow:t,className:r,...o}){let n=useSlottedContext(PopoverContext)?.trigger==="SubmenuTrigger",s=t?12:8;return s=n?s-6:s,jsxs(Popover,{offset:s,...o,className:composeRenderProps(r,(i,l)=>Dn({...l,className:i})),children:[t&&jsx(OverlayArrow,{className:"group",children:jsx("svg",{width:12,height:12,viewBox:"0 0 12 12",className:"block fill-white stroke-black/10 stroke-1 group-placement-left:-rotate-90 group-placement-right:rotate-90 group-placement-bottom:rotate-180 dark:fill-[#1f1f21] dark:stroke-zinc-600 forced-colors:fill-[Canvas] forced-colors:stroke-[ButtonBorder]",children:jsx("path",{d:"M0 0 L6 6 L12 0"})})}),e]})}function Gn(e="md"){return `flex-1 text-start data-[placeholder]:text-text-placeholder ${P[e].text}`}function Kn(){let e=U.useCallback((r,o)=>{o?.(r);},[]),t=U.useCallback((r,o)=>{o?.(r);},[]);return {handleFocus:e,handleBlur:t}}function nt({label:e,description:t,errorMessage:r,children:o,items:a,size:n="md",selectedKey:s,defaultSelectedKey:i,onSelectionChange:l,placeholder:c,showErrors:d=false,tooltip:u,isRequired:m,transparent:f,...p}){let[g,h]=useState(null),b=s??g??i,{handleFocus:v,handleBlur:S}=Kn(),$=D=>{l?l(D):h(D);},y=useRef(null);return jsx(Select,{...p,selectedKey:b,defaultSelectedKey:i,onSelectionChange:$,placeholder:c,className:T(p.className,"group flex w-full flex-col"),ref:y,onOpenChange:D=>{D||y.current?.blur();},children:({isDisabled:D,isInvalid:ne,isOpen:R})=>jsxs("div",{className:"flex flex-col",children:[e&&jsx(L,{size:n,tooltip:u,isRequired:m,className:"mb-2",children:e}),jsx(Y,{children:jsxs(A,{variant:"unstyled",className:twMerge(q({isInvalid:ne||d&&!!r,isDisabled:D,isFocused:R,transparent:f,size:n}),"flex items-center text-start gap-4 cursor-pointer min-w-[200px] max-w-[400px]"),onFocus:N=>v(N,p.onFocus),onBlur:N=>S(N,p.onBlur),"data-open":R,children:[jsx(SelectValue,{className:Gn(n)}),jsx(x,{name:"CaretDown","aria-hidden":true,className:twMerge("h-4 w-4 text-text-body group-disabled:text-gray-200 forced-colors:text-[ButtonText] transition-transform",R&&"rotate-180")})]})}),t&&jsx(I,{size:n,className:"mt-3",children:t}),d&&jsx(k,{size:n,className:"mt-3 text-feedback-error-text",children:typeof r=="function"&&p.validationResult?r(p.validationResult):typeof r=="string"?r:null}),jsx(ie,{className:"min-w-[var(--trigger-width)] max-w-[400px] bg-background-input",children:jsx(ListBox,{items:a,className:"w-full max-h-inherit overflow-auto bg-background-input p-1 outline-0 [clip-path:inset(0_0_0_0_round_.75rem)]",children:o})})]})})}var Un=e=>twMerge(_({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused}),e.transparent?"bg-transparent":"bg-background-input","pr-9","[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",e.className);function st({label:e,description:t,errorMessage:r,size:o,tooltip:a,isRequired:n,transparent:s,validationResult:i,...l}){let c=useId();return jsx(NumberField,{...l,id:c,isRequired:n,className:T(l.className,"group flex flex-col gap-1"),step:l.step??1,onChange:d=>{typeof d=="number"&&(l.maxValue!=null&&d>l.maxValue?l.onChange?.(l.maxValue):l.minValue!=null&&d<l.minValue?l.onChange?.(l.minValue):l.onChange?.(d));},isInvalid:!!r||typeof l.value=="number"&&(l.maxValue!=null&&l.value>l.maxValue||l.minValue!=null&&l.value<l.minValue),children:({isDisabled:d,isInvalid:u})=>jsxs("div",{className:"flex flex-col",children:[e&&jsx(L,{size:o,tooltip:a,isRequired:n,htmlFor:c,children:e}),jsx("div",{className:"relative",children:jsxs(Group,{className:"relative",children:[jsx(Input,{className:Un({isInvalid:u||!!r,isDisabled:d,transparent:s,className:typeof l.className=="string"?l.className:void 0})}),jsxs("div",{className:"absolute inset-y-[1px] right-[1px] flex flex-col divide-y border-l overflow-hidden rounded-r-[calc(var(--control-border-radius)-1px)]",children:[jsx(Button,{slot:"increment",isDisabled:d,className:"flex h-1/2 w-7 items-center justify-center bg-background-input hover:bg-background-input-hover active:bg-background-input-active disabled:cursor-not-allowed disabled:opacity-50",children:jsx(x,{name:"CaretUp",size:14})}),jsx(Button,{slot:"decrement",isDisabled:d,className:"flex h-1/2 w-7 items-center justify-center bg-background-input hover:bg-background-input-hover active:bg-background-input-active disabled:cursor-not-allowed disabled:opacity-50",children:jsx(x,{name:"CaretDown",size:14})})]})]})}),t&&jsx(I,{size:o,className:"mt-3",children:t}),r&&jsx(k,{size:o,className:"mt-3",children:typeof r=="function"?r(i):r})]})})}var ta=e=>twMerge("w-full",_({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused}),Te({transparent:e.transparent,isDisabled:e.isDisabled}),P[e.size||"md"].text,P[e.size||"md"].height,P[e.size||"md"].padding,"flex items-center gap-0.5",e.className),ra=({isPlaceholder:e,isDisabled:t,isFocused:r,size:o="md"})=>twMerge("outline-none rounded transition-colors box-content tabular-nums text-center",e?"text-text-muted italic":"text-text-body",t?"text-text-disabled cursor-not-allowed":"cursor-default",P[o].text,"px-0.5 -my-0.5",r&&"!outline-[1.5px] !outline-[var(--control-focus-ring-color)] ![--tw-outline-style:solid]",!t&&!r&&"hover:bg-text-body/[0.05]");function lt({label:e,description:t,errorMessage:r,size:o="md",tooltip:a,isRequired:n,transparent:s,validationResult:i,...l}){let{isFocused:c}=J(),[d,u]=useState(null),m=useRef(null);return useEffect(()=>{let f=h=>{let b=h.target;b.hasAttribute("data-type")&&u(b.getAttribute("data-type"));},p=()=>{u(null);},g=m.current;return g&&(g.addEventListener("focusin",f),g.addEventListener("focusout",p)),()=>{g&&(g.removeEventListener("focusin",f),g.removeEventListener("focusout",p));}},[]),jsx(TimeField,{...l,children:({isDisabled:f,isInvalid:p})=>jsxs(Fragment,{children:[e&&jsx(L,{isRequired:n,tooltip:a,children:e}),jsx(DateInput,{ref:m,className:ta({size:o,transparent:s,isDisabled:f,isInvalid:p,isFocused:c}),children:g=>jsx(DateSegment,{segment:g,className:ra({isPlaceholder:g.isPlaceholder,isDisabled:g.isEditable,isFocused:d===g.type,size:o})})}),t&&jsx(I,{children:t}),typeof r=="string"?jsx(k,{children:r}):null]})})}function dt({label:e,description:t,errorMessage:r,...o}){return jsxs(DateField,{...o,className:T(o.className,"flex flex-col gap-1"),children:[e&&jsx(L,{children:e}),jsx(le,{}),t&&jsx(I,{children:t}),typeof r=="string"?jsx(k,{children:r}):null]})}function la({isPlaceholder:e,isDisabled:t,isFocused:r}){return ["inline p-0.5 type-literal:px-0 rounded outline outline-0 forced-color-adjust-none caret-transparent text-gray-800 dark:text-zinc-200 forced-colors:text-[ButtonText]",e&&"text-gray-600 dark:text-zinc-400 italic",t&&"text-gray-200 dark:text-zinc-600 forced-colors:text-[GrayText]",r&&"bg-blue-600 text-white dark:text-white forced-colors:bg-[Highlight] forced-colors:text-[HighlightText]"].filter(Boolean).join(" ")}function le(e){return jsx(DateInput,{className:t=>$e({...t,className:"block min-w-[150px] px-2 py-1.5 text-sm"}),...e,children:t=>jsx(DateSegment,{segment:t,className:la({isPlaceholder:t.isPlaceholder,isDisabled:t.isEditable})})})}var ua="flex font-medium justify-center items-center gap-2 text-center transition whitespace-nowrap box-border",ct={default:{selected:"bg-text-body text-white hover:brightness-[var(--control-hover-opacity)] forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent",unselected:"bg-transparent text-text-body border-2 border-border-muted hover:bg-text-body/[0.05] forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText]"},primary:{selected:"bg-action-primary text-white hover:brightness-[var(--control-hover-opacity)] forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent",unselected:"bg-transparent text-text-body border-2 border-border-muted hover:bg-text-body/[0.05] forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText]"}},pa="opacity-[--control-hover-opacity] cursor-not-allowed pointer-events-none grayscale",ma="opacity-100 cursor-pointer",fa={"top-right":"-right-2 -top-2","top-left":"-left-2 -top-2","bottom-right":"-right-2 -bottom-2","bottom-left":"-left-2 -bottom-2"},ga={primary:"bg-action-primary text-white",destructive:"bg-action-destructive text-white"};function ba(e){let{variant:t="default",size:r="md",isDisabled:o,isSelected:a,borderRadius:n,borderRight:s,borderLeft:i}=e,l=`${ua} ${a?ct[t].selected:ct[t].unselected}`;return l+=` ${P[r].text} ${P[r].height} ${P[r].padding} ${P[r].gap}`,l+=` ${o?pa:ma}`,n==="left"&&(l+=" rounded-l-sm"),n==="right"&&(l+=" rounded-r-sm"),s&&(l+=" border-r"),i&&(l+=" border-l"),l+=` ${V()}`,twMerge(l)}function pt(e){let{className:t,children:r,onPress:o,icon:a,iconPosition:n="left",iconWeight:s,isLoading:i=false,loadingText:l,loadingIndicator:c,size:d="md",badgeNumber:u,badgeVariant:m="primary",badgePosition:f="top-right",...p}=e,g=a?jsx(x,{name:a,className:`icon-[--control-icon-size-${d}]`,weight:s}):null,h=()=>{let v=jsxs(Fragment,{children:[n==="left"&&g,r,n==="right"&&g]});return i?jsxs("div",{className:"relative inline-flex items-center justify-center",children:[jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:c||jsx(x,{name:"CircleNotch",className:`animate-spin icon-[--control-icon-size-${d}]`,"aria-hidden":"true"})}),jsx("div",{className:"invisible","aria-hidden":"true",children:v}),l&&jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:l})]}):v},b=jsx(ToggleButton,{onPress:o,...p,className:twMerge(ba(e),t),"aria-busy":i,children:h()});return u&&u>0?jsxs("div",{className:"relative",children:[b,jsx("span",{className:`absolute ${fa[f]} flex h-5 w-5 items-center justify-center rounded-full ${ga[m]} text-xs`,"aria-label":`${u} items`,children:u})]}):b}var Sa=({isEntering:e,isExiting:t,className:r})=>["max-w-[200px] group bg-slate-700 dark:bg-slate-600 border border-slate-800 dark:border-white/10 shadow-[inset_0_1px_0_0_theme(colors.gray.600)] dark:shadow-none text-white text-sm rounded-lg drop-shadow-lg will-change-transform px-3 py-1",e?"animate-in fade-in placement-bottom:slide-in-from-top-0.5 placement-top:slide-in-from-bottom-0.5 placement-left:slide-in-from-right-0.5 placement-right:slide-in-from-left-0.5 ease-out duration-200":"",t?"animate-out fade-out placement-bottom:slide-out-to-top-0.5 placement-top:slide-out-to-bottom-0.5 placement-left:slide-out-to-right-0.5 placement-right:slide-out-to-left-0.5 ease-in duration-150":"",r].filter(Boolean).join(" ");function Ie({children:e,content:t,...r}){return jsxs(TooltipTrigger,{delay:200,children:[e,jsxs(Tooltip,{...r,offset:10,className:composeRenderProps(r.className,(o,a)=>Sa({...a,className:o})),children:[jsx(OverlayArrow,{children:jsx("svg",{width:8,height:8,viewBox:"0 0 8 8",className:"fill-slate-700 stroke-gray-800 group-placement-left:-rotate-90 group-placement-right:rotate-90 group-placement-bottom:rotate-180 dark:fill-slate-600 dark:stroke-white/10 forced-colors:fill-[Canvas] forced-colors:stroke-[ButtonBorder]",children:jsx("path",{d:"M0 0 L4 4 L8 0"})})}),t]})]})}var Pa=({href:e,children:t,className:r="",external:o=false,title:a,variant:n="default",onClick:s,asButton:i=false,onPress:l,showArrow:c=false})=>{let d=o?{target:"_blank",rel:"noopener noreferrer"}:{},f=`hover:underline hover:decoration-1 hover:underline-offset-4 cursor-pointer ${{default:"text-text-link-default hover:text-text-link-hover visited:text-text-link-default",primary:"text-action-primary hover:text-action-primary-hover visited:text-action-primary",muted:"text-text-muted hover:text-text-muted visited:text-text-muted"}[n]} ${r}`,p=jsxs(Fragment,{children:[t,c&&jsxs("span",{children:["\xA0","\u2192"]})]});return i?jsx("button",{type:"button",className:f,onClick:l,title:a,children:p}):jsx("a",{href:e||"#",className:f,...d,title:a,onClick:s,children:p})};var $a=({width:e,height:t,variant:r="rect",animation:o="pulse",gradient:a=false,flex:n=false,stack:s,responsive:i,delay:l=0,adjustAnimationSpeedBasedOnWidth:c=false,ariaLabel:d,className:u,"data-testid":m})=>{let[f,p]=useState(l===0);if(useEffect(()=>{if(l>0){let y=setTimeout(()=>p(true),l);return ()=>clearTimeout(y)}},[l]),!f)return null;let g=a?"bg-gradient-to-r from-[var(--skeleton-base)] via-[var(--skeleton-highlight)] to-[var(--skeleton-base)]":"bg-[var(--skeleton-base)]",h=c&&e?(()=>{let y=typeof e=="number"?e:parseFloat(String(e));return isNaN(y)?"":`animation-duration-[${Math.max(.8,y/100)}s]`})():"",b=o==="pulse"?`animate-pulse ${h}`:o==="wave"?`relative overflow-hidden before:absolute before:inset-0 before:bg-gradient-to-r before:from-transparent before:via-[var(--skeleton-wave)] before:to-transparent before:animate-wave ${h}`:"",v="rounded-sm";r==="circle"&&(v="rounded-full"),r==="text"&&(v="h-4 w-full rounded-sm");let S=n?"flex-1 min-w-0":"",$=i?Object.entries(i).map(([y,D])=>`${y}:w-[${D}]`).join(" "):"";return s?jsx("div",{className:"space-y-2","data-testid":m,children:s.map((y,D)=>jsx("div",{className:twMerge(g,b,v,S,$,u),style:{width:y,height:t}},D))}):jsx("div",{className:twMerge(g,b,v,S,$,u),style:{width:e,height:t},role:"presentation","aria-hidden":!d,"aria-label":d??void 0,"data-testid":m})};var xt=({className:e,showWordmark:t=true})=>{let r=e||"fill-[#333333]";return t?jsxs("svg",{width:"270",height:"80",viewBox:"0 0 270 80",xmlns:"http://www.w3.org/2000/svg",className:r,children:[jsxs("g",{clipPath:"url(#clip0_796_283)",children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.223654 20.2934C0.417233 19.8234 0.873598 19.517 1.37984 19.517H20.5909C21.282 19.517 21.8422 20.0798 21.8422 20.774V40.049C21.8422 40.5572 21.5375 41.0155 21.0702 41.2102C20.6028 41.405 20.0647 41.2977 19.7067 40.9385L0.495628 21.6635C0.137428 21.3041 0.030075 20.7633 0.223654 20.2934ZM4.40349 22.0311L19.3396 37.017V22.0311H4.40349Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 20.2934C38.8394 19.8234 39.2958 19.517 39.802 19.517H59.013C59.7041 19.517 60.2642 20.0798 60.2642 20.774V40.049C60.2642 40.5572 59.9597 41.0155 59.4923 41.2102C59.025 41.405 58.4867 41.2977 58.1289 40.9385L38.9178 21.6635C38.5595 21.3041 38.4522 20.7633 38.6458 20.2934ZM42.8255 22.0311L57.7618 37.017V22.0311H42.8255Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.4347 58.8447C19.6283 58.3747 20.0847 58.0685 20.5909 58.0685H39.802C40.493 58.0685 41.0532 58.6312 41.0532 59.3255V78.6005C41.0532 79.1087 40.7486 79.567 40.2813 79.7617C39.8139 79.9562 39.2757 79.849 38.9178 79.49L19.7067 60.215C19.3485 59.8555 19.2411 59.3147 19.4347 58.8447ZM23.6146 60.5825L38.5508 75.5682V60.5825H23.6146Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 58.1643C39.79 57.9695 40.3283 58.0768 40.6861 58.436L59.8972 77.711C60.2555 78.0703 60.3628 78.6113 60.1692 79.081C59.9756 79.551 59.5192 79.8575 59.013 79.8575H39.802C39.1109 79.8575 38.5508 79.2948 38.5508 78.6005V59.3255C38.5508 58.8173 38.8554 58.359 39.3227 58.1643ZM41.0532 62.3575V77.3433H55.9893L41.0532 62.3575Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 19.6129C39.79 19.4182 40.3283 19.5254 40.6861 19.8846L59.8972 39.1595C60.2555 39.519 60.3628 40.0598 60.1692 40.5298C59.9756 40.9995 59.5192 41.306 59.013 41.306H39.802C39.1109 41.306 38.5508 40.7433 38.5508 40.049V20.7741C38.5508 20.2658 38.8554 19.8075 39.3227 19.6129ZM41.0532 23.8061V38.792H55.9893L41.0532 23.8061Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 38.8885C39.79 38.694 40.3283 38.8012 40.6861 39.1602L59.8972 58.4352C60.2555 58.7945 60.3628 59.3355 60.1692 59.8055C59.9756 60.2752 59.5192 60.5817 59.013 60.5817H39.802C39.1109 60.5817 38.5508 60.019 38.5508 59.3247V40.0497C38.5508 39.5415 38.8554 39.0832 39.3227 38.8885ZM41.0532 43.0817V58.0675H55.9893L41.0532 43.0817Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 39.569C38.8394 39.0992 39.2958 38.7927 39.802 38.7927H59.013C59.7041 38.7927 60.2642 39.3555 60.2642 40.0497V59.3247C60.2642 59.833 59.9597 60.2912 59.4923 60.486C59.025 60.6805 58.4867 60.5732 58.1289 60.2142L38.9178 40.9392C38.5595 40.5797 38.4522 40.039 38.6458 39.569ZM42.8255 41.3067L57.7618 56.2927V41.3067H42.8255Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 58.8447C38.8394 58.3747 39.2958 58.0685 39.802 58.0685H59.013C59.7041 58.0685 60.2642 58.6312 60.2642 59.3255V78.6005C60.2642 79.1087 59.9597 79.567 59.4923 79.7617C59.025 79.9562 58.4867 79.849 58.1289 79.49L38.9178 60.215C38.5595 59.8555 38.4522 59.3147 38.6458 58.8447ZM42.8255 60.5825L57.7618 75.5682V60.5825H42.8255Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 19.6129C59.0011 19.4182 59.5394 19.5254 59.8972 19.8846L79.1083 39.1595C79.4666 39.519 79.5739 40.0598 79.3803 40.5298C79.1867 40.9995 78.7303 41.306 78.2241 41.306H59.013C58.322 41.306 57.7618 40.7433 57.7618 40.049V20.7741C57.7618 20.2658 58.0664 19.8075 58.5338 19.6129ZM60.2643 23.8061V38.792H75.2006L60.2643 23.8061Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 0.338803C59.0011 0.144135 59.5394 0.251385 59.8972 0.610565L79.1083 19.8855C79.4666 20.2449 79.5739 20.7857 79.3803 21.2556C79.1867 21.7256 78.7303 22.032 78.2241 22.032H59.013C58.322 22.032 57.7618 21.4692 57.7618 20.775V1.50003C57.7618 0.99174 58.0664 0.533468 58.5338 0.338803ZM60.2643 4.53208V19.5179H75.2006L60.2643 4.53208Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M57.8569 20.2934C58.0505 19.8234 58.5069 19.517 59.013 19.517H78.2241C78.9151 19.517 79.4753 20.0798 79.4753 20.774V40.049C79.4753 40.5572 79.1707 41.0155 78.7034 41.2102C78.236 41.405 77.6978 41.2977 77.3399 40.9385L58.1289 21.6635C57.7705 21.3041 57.6633 20.7633 57.8569 20.2934ZM62.0365 22.0311L76.9729 37.017V22.0311H62.0365Z"}),jsx("path",{d:"M269.838 49.4457H249.005C249.266 51.801 250.162 53.6985 251.695 55.1377C253.225 56.577 255.134 57.2967 257.416 57.2967C259.307 57.2967 260.887 56.8715 262.159 56.021C263.463 55.1377 264.408 53.9927 264.996 52.5862H269.251C268.502 54.9415 267.084 56.937 264.996 58.5725C262.943 60.208 260.414 61.026 257.416 61.026C255.069 61.026 252.917 60.4697 250.961 59.3575C249.037 58.2127 247.504 56.6587 246.363 54.696C245.255 52.7332 244.7 50.558 244.7 48.17C244.7 45.782 245.255 43.6067 246.363 41.644C247.504 39.6812 249.037 38.1437 250.961 37.0315C252.917 35.8867 255.069 35.3142 257.416 35.3142C259.73 35.3142 261.833 35.8702 263.724 36.9825C265.615 38.0947 267.098 39.6485 268.176 41.644C269.283 43.6395 269.838 45.913 269.838 48.4645V49.4457ZM257.416 39.0432C255.263 39.0432 253.439 39.6812 251.939 40.957C250.47 42.2327 249.542 43.9337 249.152 46.06H265.583C265.192 43.9992 264.262 42.3145 262.796 41.006C261.36 39.6975 259.568 39.0432 257.416 39.0432Z"}),jsx("path",{d:"M228.356 60.5352V35.8049H232.219V39.7794H232.464C233.05 38.5689 233.963 37.5712 235.202 36.7862C236.474 35.9684 237.974 35.5594 239.701 35.5594H243.125V39.4359H239.701C237.517 39.4359 235.757 40.1554 234.42 41.5949C233.083 43.0342 232.414 44.9152 232.414 47.2377V60.5352H228.356Z"}),jsx("path",{d:"M208.607 61.0259C205.64 61.0259 203.326 60.1262 201.663 58.3272C200 56.4952 199.169 53.8947 199.169 50.5252V35.8047H203.228V49.8874C203.228 52.2427 203.766 54.0744 204.842 55.3829C205.95 56.6587 207.532 57.2967 209.586 57.2967C211.02 57.2967 212.308 56.9694 213.449 56.3152C214.623 55.6284 215.536 54.6959 216.188 53.5184C216.84 52.3407 217.166 50.9997 217.166 49.4949V35.8047H221.225V60.5352H217.313V56.5607H217.068C216.286 57.9019 215.161 58.9814 213.694 59.7992C212.226 60.6169 210.531 61.0259 208.607 61.0259Z"}),jsx("path",{d:"M186.736 39.534V56.806H194.756V60.5352H182.677V39.534H177.199V35.8047H182.677V29.5732H186.736V35.8047H193.24V39.534H186.736Z"}),jsx("path",{d:"M156.585 60.5352H151.988L158.394 48.0227L152.33 35.8047H156.976L162.062 46.0599H165.388L170.474 35.8047H175.022L168.958 48.0227L175.365 60.5352H170.67L165.29 49.7892H162.013L156.585 60.5352Z"}),jsx("path",{d:"M150.138 49.1315H129.304C129.565 51.4867 130.461 53.3842 131.994 54.8235C133.526 56.2627 135.433 56.9825 137.715 56.9825C139.606 56.9825 141.188 56.5572 142.459 55.7067C143.763 54.8235 144.709 53.6785 145.296 52.272H149.551C148.801 54.6272 147.382 56.6227 145.296 58.2582C143.242 59.8937 140.715 60.7118 137.715 60.7118C135.368 60.7118 133.216 60.1555 131.26 59.0432C129.336 57.8985 127.804 56.3445 126.663 54.3817C125.554 52.419 125 50.2437 125 47.8557C125 45.4677 125.554 43.2925 126.663 41.3298C127.804 39.367 129.336 37.8295 131.26 36.7173C133.216 35.5725 135.368 35 137.715 35C140.03 35 142.133 35.556 144.024 36.6682C145.915 37.7805 147.399 39.3342 148.475 41.3298C149.583 43.3252 150.138 45.5987 150.138 48.1502V49.1315ZM137.715 38.729C135.564 38.729 133.738 39.367 132.238 40.6427C130.771 41.9185 129.842 43.6195 129.45 45.7458H145.883C145.491 43.685 144.562 42.0002 143.095 40.6917C141.661 39.3832 139.867 38.729 137.715 38.729Z"}),jsx("path",{d:"M116.961 60.5353H112.559V30.4072H101.164V26.1875H128.307V30.4072H116.961V60.5353Z"})]}),jsx("defs",{children:jsx("clipPath",{id:"clip0_796_283",children:jsx("rect",{width:"270",height:"80",fill:"white"})})})]}):jsxs("svg",{width:"80",height:"80",viewBox:"0 0 80 80",xmlns:"http://www.w3.org/2000/svg",className:r,children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.223654 20.2934C0.417233 19.8234 0.873598 19.517 1.37984 19.517H20.5909C21.282 19.517 21.8422 20.0798 21.8422 20.774V40.049C21.8422 40.5572 21.5375 41.0155 21.0702 41.2102C20.6028 41.405 20.0647 41.2977 19.7067 40.9385L0.495628 21.6635C0.137428 21.3041 0.030075 20.7633 0.223654 20.2934ZM4.40349 22.0311L19.3396 37.017V22.0311H4.40349Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 20.2934C38.8394 19.8234 39.2958 19.517 39.802 19.517H59.013C59.7041 19.517 60.2642 20.0798 60.2642 20.774V40.049C60.2642 40.5572 59.9597 41.0155 59.4923 41.2102C59.025 41.405 58.4867 41.2977 58.1289 40.9385L38.9178 21.6635C38.5595 21.3041 38.4522 20.7633 38.6458 20.2934ZM42.8255 22.0311L57.7618 37.017V22.0311H42.8255Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.4347 58.8447C19.6283 58.3747 20.0847 58.0685 20.5909 58.0685H39.802C40.493 58.0685 41.0532 58.6312 41.0532 59.3255V78.6005C41.0532 79.1087 40.7486 79.567 40.2813 79.7617C39.8139 79.9562 39.2757 79.849 38.9178 79.49L19.7067 60.215C19.3485 59.8555 19.2411 59.3147 19.4347 58.8447ZM23.6146 60.5825L38.5508 75.5682V60.5825H23.6146Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 58.1643C39.79 57.9695 40.3283 58.0768 40.6861 58.436L59.8972 77.711C60.2555 78.0703 60.3628 78.6113 60.1692 79.081C59.9756 79.551 59.5192 79.8575 59.013 79.8575H39.802C39.1109 79.8575 38.5508 79.2948 38.5508 78.6005V59.3255C38.5508 58.8173 38.8554 58.359 39.3227 58.1643ZM41.0532 62.3575V77.3433H55.9893L41.0532 62.3575Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 19.6129C39.79 19.4182 40.3283 19.5254 40.6861 19.8846L59.8972 39.1595C60.2555 39.519 60.3628 40.0598 60.1692 40.5298C59.9756 40.9995 59.5192 41.306 59.013 41.306H39.802C39.1109 41.306 38.5508 40.7433 38.5508 40.049V20.7741C38.5508 20.2658 38.8554 19.8075 39.3227 19.6129ZM41.0532 23.8061V38.792H55.9893L41.0532 23.8061Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 38.8885C39.79 38.694 40.3283 38.8012 40.6861 39.1602L59.8972 58.4352C60.2555 58.7945 60.3628 59.3355 60.1692 59.8055C59.9756 60.2752 59.5192 60.5817 59.013 60.5817H39.802C39.1109 60.5817 38.5508 60.019 38.5508 59.3247V40.0497C38.5508 39.5415 38.8554 39.0832 39.3227 38.8885ZM41.0532 43.0817V58.0675H55.9893L41.0532 43.0817Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 39.569C38.8394 39.0992 39.2958 38.7927 39.802 38.7927H59.013C59.7041 38.7927 60.2642 39.3555 60.2642 40.0497V59.3247C60.2642 59.833 59.9597 60.2912 59.4923 60.486C59.025 60.6805 58.4867 60.5732 58.1289 60.2142L38.9178 40.9392C38.5595 40.5797 38.4522 40.039 38.6458 39.569ZM42.8255 41.3067L57.7618 56.2927V41.3067H42.8255Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 58.8447C38.8394 58.3747 39.2958 58.0685 39.802 58.0685H59.013C59.7041 58.0685 60.2642 58.6312 60.2642 59.3255V78.6005C60.2642 79.1087 59.9597 79.567 59.4923 79.7617C59.025 79.9562 58.4867 79.849 58.1289 79.49L38.9178 60.215C38.5595 59.8555 38.4522 59.3147 38.6458 58.8447ZM42.8255 60.5825L57.7618 75.5682V60.5825H42.8255Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 19.6129C59.0011 19.4182 59.5394 19.5254 59.8972 19.8846L79.1083 39.1595C79.4666 39.519 79.5739 40.0598 79.3803 40.5298C79.1867 40.9995 78.7303 41.306 78.2241 41.306H59.013C58.322 41.306 57.7618 40.7433 57.7618 40.049V20.7741C57.7618 20.2658 58.0664 19.8075 58.5338 19.6129ZM60.2643 23.8061V38.792H75.2006L60.2643 23.8061Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 0.338803C59.0011 0.144135 59.5394 0.251385 59.8972 0.610565L79.1083 19.8855C79.4666 20.2449 79.5739 20.7857 79.3803 21.2556C79.1867 21.7256 78.7303 22.032 78.2241 22.032H59.013C58.322 22.032 57.7618 21.4692 57.7618 20.775V1.50003C57.7618 0.99174 58.0664 0.533468 58.5338 0.338803ZM60.2643 4.53208V19.5179H75.2006L60.2643 4.53208Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M57.8569 20.2934C58.0505 19.8234 58.5069 19.517 59.013 19.517H78.2241C78.9151 19.517 79.4753 20.0798 79.4753 20.774V40.049C79.4753 40.5572 79.1707 41.0155 78.7034 41.2102C78.236 41.405 77.6978 41.2977 77.3399 40.9385L58.1289 21.6635C57.7705 21.3041 57.6633 20.7633 57.8569 20.2934ZM62.0365 22.0311L76.9729 37.017V22.0311H62.0365Z"})]})};var vt=({className:e,size:t=24,color:r="text-action-primary"})=>jsx("div",{className:twMerge("inline-block animate-spin rounded-full border-2 border-solid border-current border-r-transparent",r,e),style:{width:t,height:t},role:"status","aria-label":"loading",children:jsx("span",{className:"sr-only",children:"Loading..."})});var ka={xs:"text-lg font-semibold",sm:"text-xl font-semibold",md:"text-2xl font-semibold",lg:"text-3xl font-semibold",xl:"text-4xl font-semibold"},Fa={page:"h-16 leading-[62px]"};function yt({tag:e="h1",size:t="lg",height:r,className:o="",children:a}){let n=ka[t],s=r?Fa[r]:"";return jsx(e,{className:twMerge(n,s,o),children:a})}function Ma({value:e,children:t,className:r,size:o="sm"}){let[a,n]=useState(false),l=jsx(A,{variant:"icon",size:o,onPress:()=>{let c=e||(typeof t=="string"?t:"");navigator.clipboard.writeText(c),n(true),setTimeout(()=>{n(false);},2e3);},className:"!px-2",children:jsx(x,{name:"Copy",size:o==="sm"?14:16})});return jsxs("div",{className:twMerge("flex items-center gap-1",r),children:[t,a?jsx(Ie,{content:"Copied!",children:l}):l]})}function Ha({isSelected:e,isDisabled:t}){return ["flex h-4 w-7 px-px items-center shrink-0 cursor-default rounded-full transition duration-200 ease-in-out shadow-inner border border-transparent",V,e?"bg-gray-700 dark:bg-zinc-300 forced-colors:!bg-[Highlight] group-pressed:bg-gray-800 dark:group-pressed:bg-zinc-200":"bg-gray-400 dark:bg-zinc-400 group-pressed:bg-gray-500 dark:group-pressed:bg-zinc-300",t?"bg-gray-200 dark:bg-zinc-700 forced-colors:group-selected:!bg-[GrayText] forced-colors:border-[GrayText]":""].filter(Boolean).join(" ")}function za({isSelected:e,isDisabled:t}){return ["h-3 w-3 transform rounded-full bg-white dark:bg-zinc-900 outline outline-1 -outline-offset-1 outline-transparent shadow transition duration-200 ease-in-out",e?"translate-x-[100%]":"translate-x-0",t?"forced-colors:outline-[GrayText]":""].filter(Boolean).join(" ")}function Ct({children:e,...t}){return jsx(Switch,{...t,className:T(t.className,"group flex items-center gap-2 text-sm text-gray-800 transition disabled:text-gray-300 dark:text-zinc-200 dark:disabled:text-zinc-600 forced-colors:disabled:text-[GrayText]"),children:r=>jsxs(Fragment,{children:[jsx("div",{className:Ha(r),children:jsx("span",{className:za(r)})}),e]})})}function Pt({label:e,rightLabel:t,progressWidth:r=64,hideLabels:o=false,...a}){return jsx(ProgressBar,{...a,className:T(a.className,"flex flex-col gap-1"),children:({percentage:n,valueText:s,isIndeterminate:i})=>jsxs(Fragment,{children:[!o&&jsxs("div",{className:"flex items-center justify-between gap-2",children:[jsx("span",{className:"text-sm text-text-heading",children:e}),jsx("span",{className:"text-sm text-text-heading",children:t||s})]}),jsx("div",{className:`relative h-2 w-${r} overflow-hidden rounded-full bg-background-muted outline outline-1 -outline-offset-1 outline-transparent`,children:jsx("div",{className:`absolute top-0 h-full rounded-full bg-blue-600 dark:bg-blue-500 forced-colors:bg-[Highlight] ${i?"left-full duration-1000 ease-out animate-in slide-out-to-right-full repeat-infinite [--tw-enter-translate-x:calc(-16rem-100%)]":"left-0"}`,style:{width:(i?40:n)+"%"}})})]})})}function _a({isSelected:e,isDisabled:t}){let r=[V,"w-9 h-9 text-base cursor-default rounded-full flex items-center justify-center forced-color-adjust-none"];return t?r.push("text-gray-300 dark:text-zinc-600 forced-colors:text-[GrayText]"):e?r.push("bg-blue-600 invalid:bg-red-600 text-white forced-colors:bg-[Highlight] forced-colors:invalid:bg-[Mark] forced-colors:text-[HighlightText]"):r.push("text-zinc-900 dark:text-zinc-200 hover:bg-gray-100 dark:hover:bg-zinc-700 pressed:bg-gray-200 dark:pressed:bg-zinc-600"),r.join(" ")}function Rt({errorMessage:e,...t}){return jsxs(Calendar,{...t,children:[jsx(fe,{}),jsxs(CalendarGrid,{children:[jsx(ge,{}),jsx(CalendarGridBody,{children:r=>jsx(CalendarCell,{date:r,className:({isSelected:o,isDisabled:a})=>_a({isSelected:o,isDisabled:a})})})]}),e&&jsx(Text,{slot:"errorMessage",className:"text-sm text-red-600",children:e})]})}function fe(){let{direction:e}=useLocale(),t=18;return jsxs("header",{className:"flex w-full items-center gap-1 px-1 pb-4",children:[jsx(A,{variant:"icon",slot:"previous",className:"pl-0",children:e==="rtl"?jsx(x,{name:"CaretRight","aria-hidden":true,size:t}):jsx(x,{name:"CaretLeft","aria-hidden":true,size:t})}),jsx(Heading,{className:"text-md mx-2 flex-1 text-center font-semibold text-zinc-900 dark:text-zinc-200"}),jsx(A,{variant:"icon",slot:"next",className:"pr-0",children:e==="rtl"?jsx(x,{name:"CaretLeft","aria-hidden":true,size:t}):jsx(x,{name:"CaretRight","aria-hidden":true,size:t})})]})}function ge(){return jsx(CalendarGridHeader,{children:e=>jsx(CalendarHeaderCell,{className:"text-xs font-semibold text-text-caption",children:e})})}function as({selectionState:e,isDisabled:t}){let r=`${V} w-full h-full flex items-center justify-center rounded-sm forced-color-adjust-none font-semibold`,o={none:"text-text-body group-hover:bg-gray-200 group-pressed:bg-gray-200",middle:["group-hover:bg-gray-300 forced-colors:group-hover:bg-[Highlight]","group-invalid:group-hover:bg-red-200 forced-colors:group-invalid:group-hover:bg-[Mark]","group-pressed:bg-blue-300 forced-colors:group-pressed:bg-[Highlight] forced-colors:text-[HighlightText]","group-invalid:group-pressed:bg-red-300 forced-colors:group-invalid:group-pressed:bg-[Mark]"].join(" "),cap:" group-invalid:bg-red-600 forced-colors:bg-[Highlight] forced-colors:group-invalid:bg-[Mark] text-white forced-colors:text-white !bg-neutral-black"},a=t?"text-textFaint dark:text-zinc-600 forced-colors:text-textFaint font-light":"";return [r,o[e],a].filter(Boolean).join(" ")}function be({errorMessage:e,...t}){return jsxs(RangeCalendar,{...t,children:[jsx(fe,{}),jsxs(CalendarGrid,{className:"w-full [&_td]:px-0",children:[jsx(ge,{}),jsx(CalendarGridBody,{children:r=>jsx(CalendarCell,{date:r,className:"selection-start:rounded-s-end selection-end:rounded-e-end [td:last-child_&]:rounded-e-end group h-9 w-9 cursor-default text-sm outline outline-0 outside-month:text-gray-300 selected:bg-background-selected invalid:selected:bg-red-100 forced-colors:selected:bg-[Highlight] forced-colors:selected:text-white forced-colors:invalid:selected:bg-[Mark] [td:first-child_&]:rounded-s-full",children:({formattedDate:o,isSelected:a,isSelectionStart:n,isSelectionEnd:s,isFocusVisible:i,isDisabled:l})=>jsx("span",{className:as({selectionState:a&&(n||s)?"cap":a?"middle":"none",isDisabled:l}),children:o})})})]}),e&&jsx(Text,{slot:"errorMessage",className:"text-sm text-red-600",children:e})]})}var xe={prefix:String(Math.round(Math.random()*1e10)),current:0},Tt=U.createContext(xe),ls=U.createContext(false);var ds=!!(typeof window<"u"&&window.document&&window.document.createElement),He=new WeakMap;function cs(e=false){let t=useContext(Tt),r=useRef(null);if(r.current===null&&!e){var o,a;let n=(a=U.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||a===void 0||(o=a.ReactCurrentOwner)===null||o===void 0?void 0:o.current;if(n){let s=He.get(n);s==null?He.set(n,{id:t.current,state:n.memoizedState}):n.memoizedState!==s.state&&(t.current=s.id,He.delete(n));}r.current=++t.current;}return r.current}function us(e){let t=useContext(Tt);t===xe&&!ds&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let r=cs(!!e),o=t===xe&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${o}-${r}`}function ps(e){let t=U.useId(),[r]=useState(he()),o=r||process.env.NODE_ENV==="test"?"react-aria":`react-aria${xe.prefix}`;return e||`${o}-${t}`}typeof U.useId=="function"?ps:us;function fs(){return false}function gs(){return true}function bs(e){return ()=>{}}function he(){return typeof U.useSyncExternalStore=="function"?U.useSyncExternalStore(bs,fs,gs):useContext(ls)}var xs=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),hs=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function $t(e){if(Intl.Locale){let r=new Intl.Locale(e).maximize(),o=typeof r.getTextInfo=="function"?r.getTextInfo():r.textInfo;if(o)return o.direction==="rtl";if(r.script)return xs.has(r.script)}let t=e.split("-")[0];return hs.has(t)}var Cs=Symbol.for("react-aria.i18n.locale");function Lt(){let e=typeof window<"u"&&window[Cs]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e]);}catch{e="en-US";}return {locale:e,direction:$t(e)?"rtl":"ltr"}}var Ee=Lt(),ce=new Set;function Nt(){Ee=Lt();for(let e of ce)e(Ee);}function kt(){let e=he(),[t,r]=useState(Ee);return useEffect(()=>(ce.size===0&&window.addEventListener("languagechange",Nt),ce.add(r),()=>{ce.delete(r),ce.size===0&&window.removeEventListener("languagechange",Nt);}),[]),e?{locale:"en-US",direction:"ltr"}:t}var Rs=U.createContext(null);function Ge(){let e=kt();return useContext(Rs)||e}var Ke=new Map;function Oe(e){let{locale:t}=Ge(),r=t+(e?Object.entries(e).sort((a,n)=>a[0]<n[0]?-1:1).join():"");if(Ke.has(r))return Ke.get(r);let o=new Intl.Collator(t,e);return Ke.set(r,o),o}function ve(e){let t=Oe({usage:"search",...e}),r=useCallback((n,s)=>s.length===0?true:(n=n.normalize("NFC"),s=s.normalize("NFC"),t.compare(n.slice(0,s.length),s)===0),[t]),o=useCallback((n,s)=>s.length===0?true:(n=n.normalize("NFC"),s=s.normalize("NFC"),t.compare(n.slice(-s.length),s)===0),[t]),a=useCallback((n,s)=>{if(s.length===0)return true;n=n.normalize("NFC"),s=s.normalize("NFC");let i=0,l=s.length;for(;i+l<=n.length;i++){let c=n.slice(i,i+l);if(t.compare(s,c)===0)return true}return false},[t]);return useMemo(()=>({startsWith:r,endsWith:o,contains:a}),[r,o,a])}function It(e,t){let{cursor:r,getKey:o}=e;return {setSelectedKeys(a){t(n=>({...n,selectedKeys:a}));},setFilterText(a){t(n=>({...n,filterText:a}));},insert(a,...n){t(s=>ue(s,a,...n));},insertBefore(a,...n){t(s=>{let i=s.items.findIndex(l=>o?.(l)===a);if(i===-1)if(s.items.length===0)i=0;else return s;return ue(s,i,...n)});},insertAfter(a,...n){t(s=>{let i=s.items.findIndex(l=>o?.(l)===a);if(i===-1)if(s.items.length===0)i=0;else return s;return ue(s,i+1,...n)});},prepend(...a){t(n=>ue(n,0,...a));},append(...a){t(n=>ue(n,n.items.length,...a));},remove(...a){t(n=>{let s=new Set(a),i=n.items.filter(c=>!s.has(o(c))),l="all";if(n.selectedKeys!=="all"){l=new Set(n.selectedKeys);for(let c of a)l.delete(c);}return r==null&&i.length===0&&(l=new Set),{...n,items:i,selectedKeys:l}});},removeSelectedItems(){t(a=>{if(a.selectedKeys==="all")return {...a,items:[],selectedKeys:new Set};let n=a.selectedKeys,s=a.items.filter(i=>!n.has(o(i)));return {...a,items:s,selectedKeys:new Set}});},move(a,n){t(s=>{let i=s.items.findIndex(d=>o(d)===a);if(i===-1)return s;let l=s.items.slice(),[c]=l.splice(i,1);return l.splice(n,0,c),{...s,items:l}});},moveBefore(a,n){t(s=>{let i=s.items.findIndex(d=>o(d)===a);if(i===-1)return s;let c=(Array.isArray(n)?n:[...n]).map(d=>s.items.findIndex(u=>o(u)===d)).sort((d,u)=>d-u);return Ft(s,c,i)});},moveAfter(a,n){t(s=>{let i=s.items.findIndex(d=>o(d)===a);if(i===-1)return s;let c=(Array.isArray(n)?n:[...n]).map(d=>s.items.findIndex(u=>o(u)===d)).sort((d,u)=>d-u);return Ft(s,c,i+1)});},update(a,n){t(s=>{let i=s.items.findIndex(l=>o(l)===a);return i===-1?s:{...s,items:[...s.items.slice(0,i),n,...s.items.slice(i+1)]}});}}}function ue(e,t,...r){return {...e,items:[...e.items.slice(0,t),...r,...e.items.slice(t)]}}function Ft(e,t,r){r-=t.filter(n=>n<r).length;let o=t.map(n=>({from:n,to:r++}));for(let n=0;n<o.length;n++){let s=o[n].from;for(let i=n;i<o.length;i++)o[i].from>s&&o[i].from--;}for(let n=0;n<o.length;n++){let s=o[n];for(let i=o.length-1;i>n;i--){let l=o[i];l.from<s.to?s.to++:l.from++;}}let a=e.items.slice();for(let n of o){let[s]=a.splice(n.from,1);a.splice(n.to,0,s);}return {...e,items:a}}function Ls(e,t){let r;switch(e.state){case "idle":case "error":switch(t.type){case "loading":case "loadingMore":case "sorting":case "filtering":var o,a;return {...e,filterText:(o=t.filterText)!==null&&o!==void 0?o:e.filterText,state:t.type,items:t.type==="loading"?[]:e.items,sortDescriptor:(a=t.sortDescriptor)!==null&&a!==void 0?a:e.sortDescriptor,abortController:t.abortController};case "update":var n;return {...e,...(n=t.updater)===null||n===void 0?void 0:n.call(t,e)};case "success":case "error":return e;default:throw new Error(`Invalid action "${t.type}" in state "${e.state}"`)}case "loading":case "sorting":case "filtering":switch(t.type){case "success":if(t.abortController!==e.abortController)return e;var s;r=(s=t.selectedKeys)!==null&&s!==void 0?s:e.selectedKeys;var i,l,c;return {...e,filterText:(i=t.filterText)!==null&&i!==void 0?i:e.filterText,state:"idle",items:[...(l=t.items)!==null&&l!==void 0?l:[]],selectedKeys:r==="all"?"all":new Set(r),sortDescriptor:(c=t.sortDescriptor)!==null&&c!==void 0?c:e.sortDescriptor,abortController:void 0,cursor:t.cursor};case "error":return t.abortController!==e.abortController?e:{...e,state:"error",error:t.error,abortController:void 0};case "loading":case "loadingMore":case "sorting":case "filtering":var d;(d=e.abortController)===null||d===void 0||d.abort();var u;return {...e,filterText:(u=t.filterText)!==null&&u!==void 0?u:e.filterText,state:t.type,items:t.type==="loading"?[]:e.items,abortController:t.abortController};case "update":var m;return {...e,...(m=t.updater)===null||m===void 0?void 0:m.call(t,e)};default:throw new Error(`Invalid action "${t.type}" in state "${e.state}"`)}case "loadingMore":switch(t.type){case "success":var f;r=e.selectedKeys==="all"||t.selectedKeys==="all"?"all":new Set([...e.selectedKeys,...(f=t.selectedKeys)!==null&&f!==void 0?f:[]]);var p,g;return {...e,state:"idle",items:[...e.items,...(p=t.items)!==null&&p!==void 0?p:[]],selectedKeys:r,sortDescriptor:(g=t.sortDescriptor)!==null&&g!==void 0?g:e.sortDescriptor,abortController:void 0,cursor:t.cursor};case "error":return t.abortController!==e.abortController?e:{...e,state:"error",error:t.error};case "loading":case "sorting":case "filtering":var h;(h=e.abortController)===null||h===void 0||h.abort();var b;return {...e,filterText:(b=t.filterText)!==null&&b!==void 0?b:e.filterText,state:t.type,items:t.type==="loading"?[]:e.items,abortController:t.abortController};case "loadingMore":var v;return (v=t.abortController)===null||v===void 0||v.abort(),e;case "update":var S;return {...e,...(S=t.updater)===null||S===void 0?void 0:S.call(t,e)};default:throw new Error(`Invalid action "${t.type}" in state "${e.state}"`)}default:throw new Error(`Invalid state "${e.state}"`)}}function ye(e){let{load:t,sort:r,initialSelectedKeys:o,initialSortDescriptor:a,getKey:n=u=>u.id||u.key,initialFilterText:s=""}=e,[i,l]=useReducer(Ls,{state:"idle",error:void 0,items:[],selectedKeys:o==="all"?"all":new Set(o),sortDescriptor:a,filterText:s}),c=async(u,m)=>{let f=new AbortController;try{l({...u,abortController:f});var p;let b=(p=u.filterText)!==null&&p!==void 0?p:i.filterText;var g;let v=await m({items:i.items.slice(),selectedKeys:i.selectedKeys,sortDescriptor:(g=u.sortDescriptor)!==null&&g!==void 0?g:i.sortDescriptor,signal:f.signal,cursor:u.type==="loadingMore"?i.cursor:void 0,filterText:b});var h;let S=(h=v.filterText)!==null&&h!==void 0?h:b;l({type:"success",...v,abortController:f}),S&&S!==b&&!f.signal.aborted&&c({type:"filtering",filterText:S},t);}catch(b){l({type:"error",error:b,abortController:f});}},d=useRef(false);return useEffect(()=>{d.current||(c({type:"loading"},t),d.current=true);},[]),{items:i.items,selectedKeys:i.selectedKeys,sortDescriptor:i.sortDescriptor,isLoading:i.state==="loading"||i.state==="loadingMore"||i.state==="sorting"||i.state==="filtering",loadingState:i.state,error:i.error,filterText:i.filterText,getItem(u){return i.items.find(m=>n(m)===u)},reload(){c({type:"loading"},t);},loadMore(){i.state==="loadingMore"||i.state==="filtering"||i.cursor==null||c({type:"loadingMore"},t);},sort(u){c({type:"sorting",sortDescriptor:u},r||t);},...It({...e,getKey:n,cursor:i.cursor},u=>{l({type:"update",updater:u});}),setFilterText(u){c({type:"filtering",filterText:u},t);}}}var Bt={sm:"min-h-[theme(controlElementSize.sm)] max-h-[theme(controlElementSize.sm)] text-controlElementSm",md:"min-h-[theme(controlElementSize.md)] max-h-[theme(controlElementSize.md)] text-controlElementMd",lg:"min-h-[theme(controlElementSize.lg)] max-h-[theme(controlElementSize.lg)] text-controlElementLg",xl:"min-h-[theme(controlElementSize.xl)] max-h-[theme(controlElementSize.xl)] text-controlElementXl"},Ds={sm:"text-controlElementSm",md:"text-controlElementMd",lg:"text-controlElementLg",xl:"text-controlElementXl"},Dt={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-7 w-7"};function Ms(e){let t=["flex w-full cursor-pointer items-center rounded-sm transition outline outline-2"],r=e.size?Bt[e.size]:Bt.md,o=e.isDisabled?"opacity-50 cursor-not-allowed outline-border-input forced-colors:outline-[GrayText]":e.isInvalid?"outline-feedback-error-border group-invalid:outline-feedback-error-border forced-colors:group-invalid:outline-[Mark]":e.isOpen||e.isFocused?"outline-border-focus dark:outline-zinc-300 forced-colors:outline-[Highlight]":"outline-border-input";return [...t,r,o].filter(Boolean).join(" ")}function Vs(e,t=300){let[r,o]=useState(e);return useEffect(()=>{let a=setTimeout(()=>{o(e);},t);return ()=>{clearTimeout(a);}},[e,t]),r}async function As(e,t,r){try{let o=e.url.replace("{q}",t),a=new URLSearchParams;e.extraParams&&Object.entries(e.extraParams).forEach(([l,c])=>{a.append(l,c.toString());});let n=`${o}${a.toString()?"?"+a.toString():""}`,s=await fetch(n,{method:"GET",headers:e.headers,signal:r});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);let i=await s.json();return {items:e.transformResponse(i)}}catch(o){return {items:[],error:o instanceof Error?o.message:"Unknown error occurred"}}}async function Hs(e,t,r){try{let o=e.graphqlQuery.replace(`$${e.variableKey||"filter"}`,`"${t}"`),a=await fetch(e.url,{method:"POST",headers:{"Content-Type":"application/json",...e.headers},body:JSON.stringify({query:o}),signal:r});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);let n=await a.json();if(n.errors)throw new Error(n.errors[0]?.message||"GraphQL error occurred");return e.responsePath&&(n=e.responsePath.split(".").reduce((s,i)=>s?.[i],n)),{items:e.transformResponse(n)}}catch(o){return {items:[],error:o instanceof Error?o.message:"Unknown error occurred"}}}function je({label:e,staticItems:t=[],sections:r,selectedKey:o,defaultSelectedKey:a,onSelectionChange:n,requestConfig:s,defaultFilter:i,errorMessage:l,size:c="md",tooltip:d,isRequired:u,isDisabled:m,renderLeftIcon:f,autoFocus:p=false,onLoadError:g}){let[h,b]=useState(""),[v,S]=useState(false),$=Vs(h),{contains:y}=ve({sensitivity:"base"}),[D,ne]=useState(),[R,N]=useState(false),F=Ds[c],w=null;useEffect(()=>{p&&S(true);},[p]),useEffect(()=>{w&&w.setFilterText($);},[$,w]),s&&(w=ye({async load({signal:M,filterText:Pe=""}){if(!s.url||s.shouldLoad&&!s.shouldLoad(Pe))return {items:[]};N(true);try{let X;return s.requestType==="GraphQL"?X=await Hs(s,Pe,M):X=await As(s,Pe,M),ne(X.error),N(!1),{items:X.items}}catch(X){return me(X),{items:[]}}},initialFilterText:""})),$===""&&(w=null);let me=async M=>{g?.(M),N(false);};return jsx(ComboBox,{onSelectionChange:n,selectedKey:o||void 0,defaultSelectedKey:a||void 0,defaultItems:r?r.flatMap(M=>M.items):t,items:w?w.items:void 0,className:T("group flex flex-col","w-full"),menuTrigger:"focus",isDisabled:m,isInvalid:!!l,inputValue:h,onInputChange:M=>{b(M);},autoFocus:p,defaultFilter:i||y,children:M=>jsxs(Fragment,{children:[e&&jsx(L,{size:c,tooltip:d,isRequired:u,children:e}),jsxs(Group,{className:Ms({isInvalid:!!l,isDisabled:m,size:c,isOpen:M.isOpen,isFocused:v}),style:{position:"relative"},children:[f?jsx("div",{className:"absolute left-3",children:f(R)}):jsx(x,{name:R?"CircleNotch":"MagnifyingGlass",className:`${Dt[c]} absolute left-3 text-inherit ${R?"animate-spin":""}`}),jsx(Input,{className:`h-full w-full rounded-sm bg-transparent pl-10 pr-3 outline-none ${F}`,onFocus:()=>S(true),onBlur:()=>S(false)}),jsx(Button,{className:"absolute right-3",children:jsx(x,{name:M.isOpen?"CaretUp":"CaretDown",className:`${Dt[c]} text-inherit`})})]})]})})}function Es(e){return typeof e=="object"&&e!==null&&"features"in e&&Array.isArray(e.features)&&"type"in e&&typeof e.type=="string"}var Gs=process.env.NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN||"";function Ht({label:e="Search for a place",selectedKey:t,defaultSelectedKey:r,onSelectionChange:o,placeholder:a="Enter a location...",errorMessage:n,description:s,size:i="md",tooltip:l,isRequired:c,isDisabled:d,showErrors:u=true,autoFocus:m=false,onSelect:f,searchTypes:p=["place","address"],defaultFilter:g,validationResult:h,countryRestrictions:b,proximity:v="ip"}){let S=useRef(new WeakMap),$=useRef([]),y={requestType:"REST",method:"GET",url:"https://api.mapbox.com/geocoding/v5/mapbox.places/{q}.json",extraParams:{access_token:Gs,types:p.join(","),limit:"5",...b?.length?{country:b.join(",").toLowerCase()}:{},...v?{proximity:v==="ip"?"ip":v.join(",")}:{}},shouldLoad:R=>R.length>0,transformResponse:R=>{if(!Es(R))return [];let N=R.features.map(F=>{let w={id:F.id,name:F.place_name};return S.current.set(w,{type:F.place_type[0],center:F.center}),w});return N.length>0&&($.current=N),N}},D=R=>{let N=S.current.get(R),F=R.name.split(", "),w=F[0],me=F.slice(1).join(", ");return jsxs("div",{className:"flex items-center gap-3 py-0.5",children:[jsx(x,{name:N?.type==="address"?"MapPin":N?.type==="place"?"Buildings":N?.type==="region"?"MapPinArea":N?.type==="country"?"Flag":"Circle",className:"h-5 w-5 flex-shrink-0 text-text-muted"}),jsxs("div",{className:"flex min-w-0 flex-col",children:[jsx("span",{className:"truncate font-medium text-text-body",children:w}),me&&jsx("span",{className:"truncate text-sm text-text-muted",children:me})]})]})},ne=R=>R?jsx(x,{name:"CircleNotch",className:"h-4 w-4 animate-spin text-text-muted"}):jsx(x,{name:"MagnifyingGlass",className:"h-4 w-4 text-text-muted"});return jsx(je,{"data-testid":"autocomplete","data-config":JSON.stringify({types:p.join(","),country:b?.join(",").toLowerCase(),proximity:v==="ip"?"ip":v?.join(",")}),label:e,selectedKey:t,defaultSelectedKey:r,onSelectionChange:R=>{if(o?.(R),R){let F=$.current.find(w=>w.id===R);if(F){let w=S.current.get(F);w&&f({id:F.id,place_name:F.name,place_type:[w.type],center:w.center});}}},requestConfig:y,placeholder:a,errorMessage:n,description:s,size:i,tooltip:l,isRequired:c,isDisabled:d,showErrors:u,autoFocus:m,renderItem:D,renderLeftIcon:ne,defaultFilter:g,validationResult:h})}var Zs={sm:"py-1",md:"py-2",lg:"py-3",xl:"py-4"},qs={sm:"text-controlElementSm",md:"text-controlElementMd",lg:"text-controlElementLg",xl:"text-controlElementXl"};function zt({size:e="md",className:t,...r}){return jsx(ListBoxItem,{...r,className:twMerge("flex cursor-default items-center gap-2 rounded-sm px-3 text-text-body outline-none data-[focused]:bg-background-hover data-[selected]:bg-background-hover",Zs[e],qs[e],t)})}function Et(e){return jsx(Form,{...e,className:twMerge("flex flex-col gap-4",e.className)})}function Ce(e){return jsx(Dialog,{...e,className:twMerge("relative h-auto max-h-[inherit] overflow-auto outline outline-0 [[data-placement]>&]:p-4",e.className),role:"dialog"})}function Kt({label:e,description:t,errorMessage:r,...o}){return jsxs(DateRangePicker,{...o,className:T(o.className,"group flex flex-col gap-1"),children:[e&&jsx(L,{children:e}),jsxs(Je,{className:"w-auto min-w-[208px]",children:[jsx(le,{slot:"start",className:"px-2 py-1.5 text-sm"}),jsx("span",{"aria-hidden":"true",className:"text-gray-800 group-disabled:text-gray-200 dark:text-zinc-200 group-disabled:dark:text-zinc-600 forced-colors:text-[ButtonText] group-disabled:forced-colors:text-[GrayText]",children:"\u2013"}),jsx(le,{slot:"end",className:"flex-1 px-2 py-1.5 text-sm"}),jsx(A,{variant:"icon",className:"mr-1 w-6 rounded outline-offset-0",children:jsx(CalendarIcon,{"aria-hidden":true,className:"h-4 w-4"})})]}),t&&jsx(I,{children:t}),typeof r=="string"?jsx(k,{children:r}):null,jsx(ie,{children:jsx(Ce,{children:jsx(be,{})})})]})}function ai({isDisabled:e}){return `flex gap-2 items-center group text-sm transition ${e?"text-text-disabled":"text-text-caption"}`}function si({isSelected:e,isInvalid:t,isDisabled:r,isIndeterminate:o}){let a="w-5 h-5 flex-shrink-0 rounded flex items-center justify-center border-2 transition ring-offset-2 focus:ring-2 focus:ring-border-focus",n="";return r?n="border-border-muted bg-background-muted":t?n="border-feedback-error-border bg-feedback-error-background":e||o?n="bg-action-primary border-action-primary hover:bg-action-primary-hover hover:border-action-primary-hover":n="bg-background-input border-border-input hover:border-border-focus",`${a} ${n}`}var Ot="w-4 h-4 text-text-onPrimary group-disabled:text-text-disabled";function ii(e){let{children:t,...r}=e;return jsx(Checkbox,{...r,className:composeRenderProps(e.className,(o,a)=>`${ai(a)} ${o||""}`),children:o=>{let{isSelected:a,isIndeterminate:n,...s}=o,i=jsx("div",{className:si({isSelected:a,isIndeterminate:n,...s}),children:n?jsx(Minus,{"aria-hidden":true,className:Ot}):a?jsx(Check$1,{"aria-hidden":true,className:Ot}):null});return jsxs(Fragment,{children:[i,typeof t=="function"?t(o):t]})}})}
|
|
2
|
-
export{
|
|
1
|
+
import q,{memo,useState,useContext,useRef,useEffect,Component,useId,useCallback,useMemo,useReducer}from'react';import {ComboBox,Group,Input,Button,Link,Calendar,CalendarGrid,CalendarGridBody,CalendarCell,Text,useLocale,Heading,CalendarGridHeader,CalendarHeaderCell,Checkbox,composeRenderProps,TooltipTrigger,Tooltip,OverlayArrow,DateField,DateInput,DateSegment,Dialog,useSlottedContext,PopoverContext,Popover,RangeCalendar,DateRangePicker,ModalOverlay,Modal,Form,ListBox,ListBoxItem,NumberField,ProgressBar,Select,SelectValue,Switch,Tabs,TabList,Tab,TabPanel,TextField,TimeField,ToggleButton}from'react-aria-components';import {WaveSine,X,Wind,WebhooksLogo,WarningCircle,Warning,UsersFour,Users,UserPlus,UserCircle,User,TreeEvergreen,Trash,ThermometerSimple,ThermometerHot,ThermometerCold,Terminal,Sun,Stack,SquaresFour,Square,SolarPanel,Snowflake,SlidersHorizontal,Sliders,SlackLogo,SignOut,ShieldCheck,ShareNetwork,Rocket,Repeat,Question,Pulse,Power,Plus,PlugsConnected,Plugs,PencilSimple,PaperclipHorizontal,PaperPlaneTilt,PaperPlaneRight,Moon,MaskHappy,MapPinArea,MapPin,MagnifyingGlass,Lock,ListNumbers,ListBullets,List,LightningSlash,Lightning,IntersectSquare,Info,Handshake,HandPointing,GearSix,Gauge,Flag,FireSimple,Export,EyeSlash,EyeClosed,Eye,EnvelopeSimple,DownloadSimple,DotsThree,DotsSix,Database,Cursor,Copy,Columns,Code,CloudSun,CloudSnow,CloudRain,CloudLightning,CloudFog,CloudArrowDown,Cloud,ClockCountdown,ClipboardText,CircleNotch,CircleDashed,Circle,CheckSquare,CheckCircle,Check,ChartLineUp,ChartLine,ChartBar,ChargingStation,CarSimple,CaretUp,CaretRight,CaretLeft,CaretDown,CalendarBlank,Buildings,Broadcast,BracketsCurly,BookmarkSimple,BookOpen,BatteryWarning,BatteryMedium,BatteryLow,BatteryHigh,BatteryFull,BatteryEmpty,BatteryCharging,ArrowsClockwise,ArrowUp,ArrowSquareOut,ArrowRight,ArrowLineLeft,ArrowLeft,ArrowDown,ArrowCircleUp,AppWindow}from'@phosphor-icons/react';import {twMerge}from'tailwind-merge';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import'luxon';import {Minus,Check as Check$1,CalendarIcon}from'lucide-react';var dr=Object.defineProperty;var cr=(e,t,r)=>t in e?dr(e,t,{enumerable:true,configurable:true,writable:true,value:r}):e[t]=r;var Ie=(e,t,r)=>cr(e,typeof t!="symbol"?t+"":t,r);var Ce={prefix:String(Math.round(Math.random()*1e10)),current:0},it=q.createContext(Ce),mr=q.createContext(false);var fr=!!(typeof window<"u"&&window.document&&window.document.createElement),Be=new WeakMap;function gr(e=false){let t=useContext(it),r=useRef(null);if(r.current===null&&!e){var o,s;let a=(s=q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||s===void 0||(o=s.ReactCurrentOwner)===null||o===void 0?void 0:o.current;if(a){let n=Be.get(a);n==null?Be.set(a,{id:t.current,state:a.memoizedState}):a.memoizedState!==n.state&&(t.current=n.id,Be.delete(a));}r.current=++t.current;}return r.current}function br(e){let t=useContext(it);t===Ce&&!fr&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let r=gr(!!e),o=t===Ce&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${o}-${r}`}function xr(e){let t=q.useId(),[r]=useState(Se()),o=r||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Ce.prefix}`;return e||`${o}-${t}`}typeof q.useId=="function"?xr:br;function vr(){return false}function yr(){return true}function Cr(e){return ()=>{}}function Se(){return typeof q.useSyncExternalStore=="function"?q.useSyncExternalStore(Cr,vr,yr):useContext(mr)}var Sr=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Pr=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function lt(e){if(Intl.Locale){let r=new Intl.Locale(e).maximize(),o=typeof r.getTextInfo=="function"?r.getTextInfo():r.textInfo;if(o)return o.direction==="rtl";if(r.script)return Sr.has(r.script)}let t=e.split("-")[0];return Pr.has(t)}var Tr=Symbol.for("react-aria.i18n.locale");function ct(){let e=typeof window<"u"&&window[Tr]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e]);}catch{e="en-US";}return {locale:e,direction:lt(e)?"rtl":"ltr"}}var He=ct(),ce=new Set;function dt(){He=ct();for(let e of ce)e(He);}function ut(){let e=Se(),[t,r]=useState(He);return useEffect(()=>(ce.size===0&&window.addEventListener("languagechange",dt),ce.add(r),()=>{ce.delete(r),ce.size===0&&window.removeEventListener("languagechange",dt);}),[]),e?{locale:"en-US",direction:"ltr"}:t}var Lr=q.createContext(null);function Ae(){let e=ut();return useContext(Lr)||e}var Ve=new Map;function ze(e){let{locale:t}=Ae(),r=t+(e?Object.entries(e).sort((s,a)=>s[0]<a[0]?-1:1).join():"");if(Ve.has(r))return Ve.get(r);let o=new Intl.Collator(t,e);return Ve.set(r,o),o}function Pe(e){let t=ze({usage:"search",...e}),r=useCallback((a,n)=>n.length===0?true:(a=a.normalize("NFC"),n=n.normalize("NFC"),t.compare(a.slice(0,n.length),n)===0),[t]),o=useCallback((a,n)=>n.length===0?true:(a=a.normalize("NFC"),n=n.normalize("NFC"),t.compare(a.slice(-n.length),n)===0),[t]),s=useCallback((a,n)=>{if(n.length===0)return true;a=a.normalize("NFC"),n=n.normalize("NFC");let i=0,l=n.length;for(;i+l<=a.length;i++){let d=a.slice(i,i+l);if(t.compare(n,d)===0)return true}return false},[t]);return useMemo(()=>({startsWith:r,endsWith:o,contains:s}),[r,o,s])}function mt(e,t){let{cursor:r,getKey:o}=e;return {setSelectedKeys(s){t(a=>({...a,selectedKeys:s}));},setFilterText(s){t(a=>({...a,filterText:s}));},insert(s,...a){t(n=>ue(n,s,...a));},insertBefore(s,...a){t(n=>{let i=n.items.findIndex(l=>o?.(l)===s);if(i===-1)if(n.items.length===0)i=0;else return n;return ue(n,i,...a)});},insertAfter(s,...a){t(n=>{let i=n.items.findIndex(l=>o?.(l)===s);if(i===-1)if(n.items.length===0)i=0;else return n;return ue(n,i+1,...a)});},prepend(...s){t(a=>ue(a,0,...s));},append(...s){t(a=>ue(a,a.items.length,...s));},remove(...s){t(a=>{let n=new Set(s),i=a.items.filter(d=>!n.has(o(d))),l="all";if(a.selectedKeys!=="all"){l=new Set(a.selectedKeys);for(let d of s)l.delete(d);}return r==null&&i.length===0&&(l=new Set),{...a,items:i,selectedKeys:l}});},removeSelectedItems(){t(s=>{if(s.selectedKeys==="all")return {...s,items:[],selectedKeys:new Set};let a=s.selectedKeys,n=s.items.filter(i=>!a.has(o(i)));return {...s,items:n,selectedKeys:new Set}});},move(s,a){t(n=>{let i=n.items.findIndex(c=>o(c)===s);if(i===-1)return n;let l=n.items.slice(),[d]=l.splice(i,1);return l.splice(a,0,d),{...n,items:l}});},moveBefore(s,a){t(n=>{let i=n.items.findIndex(c=>o(c)===s);if(i===-1)return n;let d=(Array.isArray(a)?a:[...a]).map(c=>n.items.findIndex(u=>o(u)===c)).sort((c,u)=>c-u);return pt(n,d,i)});},moveAfter(s,a){t(n=>{let i=n.items.findIndex(c=>o(c)===s);if(i===-1)return n;let d=(Array.isArray(a)?a:[...a]).map(c=>n.items.findIndex(u=>o(u)===c)).sort((c,u)=>c-u);return pt(n,d,i+1)});},update(s,a){t(n=>{let i=n.items.findIndex(l=>o(l)===s);return i===-1?n:{...n,items:[...n.items.slice(0,i),a,...n.items.slice(i+1)]}});}}}function ue(e,t,...r){return {...e,items:[...e.items.slice(0,t),...r,...e.items.slice(t)]}}function pt(e,t,r){r-=t.filter(a=>a<r).length;let o=t.map(a=>({from:a,to:r++}));for(let a=0;a<o.length;a++){let n=o[a].from;for(let i=a;i<o.length;i++)o[i].from>n&&o[i].from--;}for(let a=0;a<o.length;a++){let n=o[a];for(let i=o.length-1;i>a;i--){let l=o[i];l.from<n.to?n.to++:l.from++;}}let s=e.items.slice();for(let a of o){let[n]=s.splice(a.from,1);s.splice(a.to,0,n);}return {...e,items:s}}function Br(e,t){let r;switch(e.state){case "idle":case "error":switch(t.type){case "loading":case "loadingMore":case "sorting":case "filtering":var o,s;return {...e,filterText:(o=t.filterText)!==null&&o!==void 0?o:e.filterText,state:t.type,items:t.type==="loading"?[]:e.items,sortDescriptor:(s=t.sortDescriptor)!==null&&s!==void 0?s:e.sortDescriptor,abortController:t.abortController};case "update":var a;return {...e,...(a=t.updater)===null||a===void 0?void 0:a.call(t,e)};case "success":case "error":return e;default:throw new Error(`Invalid action "${t.type}" in state "${e.state}"`)}case "loading":case "sorting":case "filtering":switch(t.type){case "success":if(t.abortController!==e.abortController)return e;var n;r=(n=t.selectedKeys)!==null&&n!==void 0?n:e.selectedKeys;var i,l,d;return {...e,filterText:(i=t.filterText)!==null&&i!==void 0?i:e.filterText,state:"idle",items:[...(l=t.items)!==null&&l!==void 0?l:[]],selectedKeys:r==="all"?"all":new Set(r),sortDescriptor:(d=t.sortDescriptor)!==null&&d!==void 0?d:e.sortDescriptor,abortController:void 0,cursor:t.cursor};case "error":return t.abortController!==e.abortController?e:{...e,state:"error",error:t.error,abortController:void 0};case "loading":case "loadingMore":case "sorting":case "filtering":var c;(c=e.abortController)===null||c===void 0||c.abort();var u;return {...e,filterText:(u=t.filterText)!==null&&u!==void 0?u:e.filterText,state:t.type,items:t.type==="loading"?[]:e.items,abortController:t.abortController};case "update":var m;return {...e,...(m=t.updater)===null||m===void 0?void 0:m.call(t,e)};default:throw new Error(`Invalid action "${t.type}" in state "${e.state}"`)}case "loadingMore":switch(t.type){case "success":var f;r=e.selectedKeys==="all"||t.selectedKeys==="all"?"all":new Set([...e.selectedKeys,...(f=t.selectedKeys)!==null&&f!==void 0?f:[]]);var p,g;return {...e,state:"idle",items:[...e.items,...(p=t.items)!==null&&p!==void 0?p:[]],selectedKeys:r,sortDescriptor:(g=t.sortDescriptor)!==null&&g!==void 0?g:e.sortDescriptor,abortController:void 0,cursor:t.cursor};case "error":return t.abortController!==e.abortController?e:{...e,state:"error",error:t.error};case "loading":case "sorting":case "filtering":var h;(h=e.abortController)===null||h===void 0||h.abort();var x;return {...e,filterText:(x=t.filterText)!==null&&x!==void 0?x:e.filterText,state:t.type,items:t.type==="loading"?[]:e.items,abortController:t.abortController};case "loadingMore":var v;return (v=t.abortController)===null||v===void 0||v.abort(),e;case "update":var S;return {...e,...(S=t.updater)===null||S===void 0?void 0:S.call(t,e)};default:throw new Error(`Invalid action "${t.type}" in state "${e.state}"`)}default:throw new Error(`Invalid state "${e.state}"`)}}function Re(e){let{load:t,sort:r,initialSelectedKeys:o,initialSortDescriptor:s,getKey:a=u=>u.id||u.key,initialFilterText:n=""}=e,[i,l]=useReducer(Br,{state:"idle",error:void 0,items:[],selectedKeys:o==="all"?"all":new Set(o),sortDescriptor:s,filterText:n}),d=async(u,m)=>{let f=new AbortController;try{l({...u,abortController:f});var p;let x=(p=u.filterText)!==null&&p!==void 0?p:i.filterText;var g;let v=await m({items:i.items.slice(),selectedKeys:i.selectedKeys,sortDescriptor:(g=u.sortDescriptor)!==null&&g!==void 0?g:i.sortDescriptor,signal:f.signal,cursor:u.type==="loadingMore"?i.cursor:void 0,filterText:x});var h;let S=(h=v.filterText)!==null&&h!==void 0?h:x;l({type:"success",...v,abortController:f}),S&&S!==x&&!f.signal.aborted&&d({type:"filtering",filterText:S},t);}catch(x){l({type:"error",error:x,abortController:f});}},c=useRef(false);return useEffect(()=>{c.current||(d({type:"loading"},t),c.current=true);},[]),{items:i.items,selectedKeys:i.selectedKeys,sortDescriptor:i.sortDescriptor,isLoading:i.state==="loading"||i.state==="loadingMore"||i.state==="sorting"||i.state==="filtering",loadingState:i.state,error:i.error,filterText:i.filterText,getItem(u){return i.items.find(m=>a(m)===u)},reload(){d({type:"loading"},t);},loadMore(){i.state==="loadingMore"||i.state==="filtering"||i.cursor==null||d({type:"loadingMore"},t);},sort(u){d({type:"sorting",sortDescriptor:u},r||t);},...mt({...e,getKey:a,cursor:i.cursor},u=>{l({type:"update",updater:u});}),setFilterText(u){d({type:"filtering",filterText:u},t);}}}var Qa=()=>jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),Xa=()=>jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),ft={AppWindow:AppWindow,ArrowCircleUp:ArrowCircleUp,ArrowDown:ArrowDown,ArrowLeft:ArrowLeft,ArrowLineLeft:ArrowLineLeft,ArrowRight:ArrowRight,ArrowSquareOut:ArrowSquareOut,ArrowUp:ArrowUp,ArrowsClockwise:ArrowsClockwise,BatteryCharging:BatteryCharging,BatteryEmpty:BatteryEmpty,BatteryFull:BatteryFull,BatteryHigh:BatteryHigh,BatteryLow:BatteryLow,BatteryMedium:BatteryMedium,BatteryWarning:BatteryWarning,BookOpen:BookOpen,BookmarkSimple:BookmarkSimple,BracketsCurly:BracketsCurly,Broadcast:Broadcast,Buildings:Buildings,CalendarBlank:CalendarBlank,CaretDown:CaretDown,CaretLeft:CaretLeft,CaretRight:CaretRight,CaretUp:CaretUp,CarSimple:CarSimple,ChargingStation:ChargingStation,ChartBar:ChartBar,ChartLine:ChartLine,ChartLineUp:ChartLineUp,Check:Check,CheckCircle:CheckCircle,CheckSquare:CheckSquare,Circle:Circle,CircleDashed:CircleDashed,CircleNotch:CircleNotch,ClipboardText:ClipboardText,ClockCountdown:ClockCountdown,Cloud:Cloud,CloudArrowDown:CloudArrowDown,CloudFog:CloudFog,CloudLightning:CloudLightning,CloudRain:CloudRain,CloudSnow:CloudSnow,CloudSun:CloudSun,Code:Code,Columns:Columns,Copy:Copy,Cursor:Cursor,Database:Database,DotsSix:DotsSix,DotsThree:DotsThree,DownloadSimple:DownloadSimple,EnvelopeSimple:EnvelopeSimple,Eye:Eye,EyeClosed:EyeClosed,EyeSlash:EyeSlash,Export:Export,FireSimple:FireSimple,Flag:Flag,Gauge:Gauge,GearSix:GearSix,HandPointing:HandPointing,Handshake:Handshake,Info:Info,IntersectSquare:IntersectSquare,Lightning:Lightning,LightningSlash:LightningSlash,List:List,ListBullets:ListBullets,ListNumbers:ListNumbers,Lock:Lock,MagnifyingGlass:MagnifyingGlass,MapPin:MapPin,MapPinArea:MapPinArea,MaskHappy:MaskHappy,Moon:Moon,PaperPlaneRight:PaperPlaneRight,PaperPlaneTilt:PaperPlaneTilt,PaperclipHorizontal:PaperclipHorizontal,PencilSimple:PencilSimple,Plugs:Plugs,PlugsConnected:PlugsConnected,Plus:Plus,Power:Power,Pulse:Pulse,Question:Question,Repeat:Repeat,Rocket:Rocket,ShareNetwork:ShareNetwork,ShieldCheck:ShieldCheck,SignOut:SignOut,SlackLogo:SlackLogo,Sliders:Sliders,SlidersHorizontal:SlidersHorizontal,Snowflake:Snowflake,SolarPanel:SolarPanel,Square:Square,SquaresFour:SquaresFour,Stack:Stack,Sun:Sun,Terminal:Terminal,ThermometerCold:ThermometerCold,ThermometerHot:ThermometerHot,ThermometerSimple:ThermometerSimple,Trash:Trash,TreeEvergreen:TreeEvergreen,User:User,UserCircle:UserCircle,UserPlus:UserPlus,Users:Users,UsersFour:UsersFour,Warning:Warning,WarningCircle:WarningCircle,WebhooksLogo:WebhooksLogo,Wind:Wind,X:X,TextureMenuLight:Qa,TextureMenuDark:Xa,WaveSine:WaveSine},b=memo(({name:e,size:t=24,color:r,weight:o="regular",className:s,title:a,ariaLabel:n,grow:i,variant:l="default",rounded:d=false,bgColor:c,...u})=>{if(!e)return null;let m=ft[e];if(!m)return process.env.NODE_ENV==="development"&&console.error(`Icon with name "${e}" does not exist.`),null;let f=e==="TextureMenuLight"||e==="TextureMenuDark",p=n||a||`${e} icon`,g=l==="container"?"bg-[#F3F4F6":l==="brand"?"bg-gray-light":"",h=twMerge("inline-flex items-center justify-center w-12 h-12 p-3 rounded-xl bg-brand-light",c,d?"rounded-md":"",i?"w-full h-full":"",s),x=["inline-flex items-center justify-center",c||g,d?"rounded-md":"",i?"w-full h-full":`w-[${t}px] h-[${t}px]`].filter(Boolean).join(" "),y=jsx(m,{size:i?void 0:t,color:l==="brand"&&!f?void 0:r,className:l==="brand"&&!f?"text-brand-dark w-6 h-6":s||"",weight:o,"aria-label":p,"data-testid":`${e}-icon`,...u});return l==="brand"?jsx("div",{className:h,children:y}):l==="default"?y:jsx("div",{className:x,children:y})});b.displayName="Icon";var P={sm:{text:"text-[length:var(--control-text-sm)]",height:"h-[var(--control-sm-height)]",padding:"px-[var(--control-padding-sm)]",gap:"gap-[var(--control-gap-sm)]"},md:{text:"text-[length:var(--control-text-md)]",height:"h-[var(--control-md-height)]",padding:"px-[var(--control-padding-md)]",gap:"gap-[var(--control-gap-md)]"},lg:{text:"text-[length:var(--control-text-lg)]",height:"h-[var(--control-lg-height)]",padding:"px-[var(--control-padding-lg)]",gap:"gap-[var(--control-gap-lg)]"},xl:{text:"text-[length:var(--control-text-xl)]",height:"h-[var(--control-xl-height)]",padding:"px-[var(--control-padding-xl)]",gap:"gap-[var(--control-gap-xl)]"}};function Y(){let[e,t]=q.useState(false),r=q.useCallback((s,a)=>{t(true),a?.(s);},[]),o=q.useCallback((s,a)=>{t(false),a?.(s);},[]);return {isFocused:e,handleFocus:r,handleBlur:o}}function _({children:e,className:t}){return jsx("div",{className:twMerge("relative w-full",t),children:e})}function gt({onClick:e,size:t="md",className:r}){return jsx("button",{type:"button",onClick:o=>{o.preventDefault(),o.stopPropagation(),e();},className:twMerge("absolute right-2 top-1/2 -translate-y-1/2 transform text-text-muted hover:text-text-body",r),"aria-label":"Clear input",onMouseDown:o=>{o.preventDefault(),o.stopPropagation();},children:jsx(b,{name:"X",size:t==="sm"?16:20})})}function ee(e){let{isInvalid:t,isDisabled:r,isFocused:o}=e,s="border rounded-[var(--control-border-radius)] ";return r?`${s} border-border-muted focus:outline-none`:t&&o?`${s} border-feedback-error-border outline-[1.5px] outline-[var(--control-focus-ring-color-error)]`:t?`${s} border-feedback-error-border`:o?`${s} !outline-[1.5px] !outline-[var(--control-focus-ring-color)] ![--tw-outline-style:solid]`:`${s}`}function Ke(e){return e.isDisabled?"bg-background-muted":e.transparent?"bg-transparent":"bg-background-input"}function j(e){let{isInvalid:t,isDisabled:r,isFocused:o,transparent:s,size:a="md",className:n}=e;return twMerge("w-full",ee({isInvalid:t,isDisabled:r,isFocused:o}),Ke({transparent:s,isDisabled:r}),P[a].text,P[a].height,P[a].padding,n)}function Oe(e){let{size:t="md",isFocusWithin:r,isInvalid:o,isDisabled:s,transparent:a,className:n}=e;return twMerge("group flex items-center rounded-sm overflow-hidden",!a&&"bg-background-input",a&&"bg-transparent",P[t].height,ee({isFocused:r,isInvalid:o,isDisabled:s}),n)}function k({children:e,size:t="md",tooltip:r,isRequired:o,className:s,htmlFor:a}){return jsxs("label",{htmlFor:a,className:twMerge(P[t].text,"!text-text-caption flex items-center gap-1",s),children:[e,o&&jsx("span",{className:"text-feedback-error-text",children:"*"}),r&&jsx("span",{className:"text-text-muted",children:jsx(b,{name:"Info",size:t==="sm"?16:20})})]})}function I({size:e="md",className:t,children:r,...o}){return jsx("div",{...o,className:twMerge("leading-[2.25] text-text-muted",P[e].text,t),children:r})}function F({children:e,size:t="md",className:r}){return jsx("div",{role:"alert",className:twMerge(P[t].text,"text-feedback-error-text",r),children:e})}function bt({size:e="md",isInvalid:t,isDisabled:r,isFocused:o,transparent:s,className:a,...n}){return jsx("input",{className:j({isInvalid:t,isDisabled:r,isFocused:o,transparent:s,size:e,className:a}),...n})}function xt(e){let{children:t,...r}=e;return jsx("div",{...r,className:Oe(e),children:typeof t=="function"?t(e):t})}function B(e=false){return `${e?"outline outline-1 outline-border-input focus:outline-2 focus:outline-border-focus focus:outline-offset-0 invalid:outline-2 invalid:outline-feedback-error-border group-invalid:outline-2 group-invalid:outline-feedback-error-border forced-colors:focus:outline-[Highlight] forced-colors:focus:outline-2 forced-colors:focus:outline-offset-2":"outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-border-focus focus-visible:outline-offset-0 invalid:outline-2 invalid:outline-feedback-error-border group-invalid:outline-2 group-invalid:outline-feedback-error-border forced-colors:focus:outline-[Highlight] forced-colors:focus:outline-2 forced-colors:focus:outline-offset-2"}`}function T(e,t){return composeRenderProps(e,r=>twMerge(t,r))}var ht={sm:"min-h-[theme(controlElementSize.sm)] max-h-[theme(controlElementSize.sm)] text-controlElementSm",md:"min-h-[theme(controlElementSize.md)] max-h-[theme(controlElementSize.md)] text-controlElementMd",lg:"min-h-[theme(controlElementSize.lg)] max-h-[theme(controlElementSize.lg)] text-controlElementLg",xl:"min-h-[theme(controlElementSize.xl)] max-h-[theme(controlElementSize.xl)] text-controlElementXl"},as={sm:"text-controlElementSm",md:"text-controlElementMd",lg:"text-controlElementLg",xl:"text-controlElementXl"},vt={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-7 w-7"};function ss(e){let t=["flex w-full cursor-pointer items-center rounded-sm transition outline outline-2"],r=e.size?ht[e.size]:ht.md,o=e.isDisabled?"opacity-50 cursor-not-allowed outline-border-input forced-colors:outline-[GrayText]":e.isInvalid?"outline-feedback-error-border group-invalid:outline-feedback-error-border forced-colors:group-invalid:outline-[Mark]":e.isOpen||e.isFocused?"outline-border-focus dark:outline-zinc-300 forced-colors:outline-[Highlight]":"outline-border-input";return [...t,r,o].filter(Boolean).join(" ")}function ns(e,t=300){let[r,o]=useState(e);return useEffect(()=>{let s=setTimeout(()=>{o(e);},t);return ()=>{clearTimeout(s);}},[e,t]),r}async function is(e,t,r){try{let o=e.url.replace("{q}",t),s=new URLSearchParams;e.extraParams&&Object.entries(e.extraParams).forEach(([l,d])=>{s.append(l,d.toString());});let a=`${o}${s.toString()?"?"+s.toString():""}`,n=await fetch(a,{method:"GET",headers:e.headers,signal:r});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);let i=await n.json();return {items:e.transformResponse(i)}}catch(o){return {items:[],error:o instanceof Error?o.message:"Unknown error occurred"}}}async function ls(e,t,r){try{let o=e.graphqlQuery.replace(`$${e.variableKey||"filter"}`,`"${t}"`),s=await fetch(e.url,{method:"POST",headers:{"Content-Type":"application/json",...e.headers},body:JSON.stringify({query:o}),signal:r});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);let a=await s.json();if(a.errors)throw new Error(a.errors[0]?.message||"GraphQL error occurred");return e.responsePath&&(a=e.responsePath.split(".").reduce((n,i)=>n?.[i],a)),{items:e.transformResponse(a)}}catch(o){return {items:[],error:o instanceof Error?o.message:"Unknown error occurred"}}}function qe({label:e,staticItems:t=[],sections:r,selectedKey:o,defaultSelectedKey:s,onSelectionChange:a,requestConfig:n,defaultFilter:i,errorMessage:l,size:d="md",tooltip:c,isRequired:u,isDisabled:m,renderLeftIcon:f,autoFocus:p=false,onLoadError:g}){let[h,x]=useState(""),[v,S]=useState(false),N=ns(h),{contains:y}=Pe({sensitivity:"base"}),[H,de]=useState(),[R,$]=useState(false),D=as[d],w=null;useEffect(()=>{p&&S(true);},[p]),useEffect(()=>{w&&w.setFilterText(N);},[N,w]),n&&(w=Re({async load({signal:A,filterText:De=""}){if(!n.url||n.shouldLoad&&!n.shouldLoad(De))return {items:[]};$(true);try{let J;return n.requestType==="GraphQL"?J=await ls(n,De,A):J=await is(n,De,A),de(J.error),$(!1),{items:J.items}}catch(J){return ye(J),{items:[]}}},initialFilterText:""})),N===""&&(w=null);let ye=async A=>{g?.(A),$(false);};return jsx(ComboBox,{onSelectionChange:a,selectedKey:o||void 0,defaultSelectedKey:s||void 0,defaultItems:r?r.flatMap(A=>A.items):t,items:w?w.items:void 0,className:T("group flex flex-col","w-full"),menuTrigger:"focus",isDisabled:m,isInvalid:!!l,inputValue:h,onInputChange:A=>{x(A);},autoFocus:p,defaultFilter:i||y,children:A=>jsxs(Fragment,{children:[e&&jsx(k,{size:d,tooltip:c,isRequired:u,children:e}),jsxs(Group,{className:ss({isInvalid:!!l,isDisabled:m,size:d,isOpen:A.isOpen,isFocused:v}),style:{position:"relative"},children:[f?jsx("div",{className:"absolute left-3",children:f(R)}):jsx(b,{name:R?"CircleNotch":"MagnifyingGlass",className:`${vt[d]} absolute left-3 text-inherit ${R?"animate-spin":""}`}),jsx(Input,{className:`h-full w-full rounded-sm bg-transparent pl-10 pr-3 outline-none ${D}`,onFocus:()=>S(true),onBlur:()=>S(false)}),jsx(Button,{className:"absolute right-3",children:jsx(b,{name:A.isOpen?"CaretUp":"CaretDown",className:`${vt[d]} text-inherit`})})]})]})})}var ps="flex font-medium justify-center items-center gap-2 text-center transition rounded-sm whitespace-nowrap box-border",ms={default:"bg-neutral-black text-neutral-white hover:brightness-90 forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent",primary:"bg-action-primary text-neutral-white hover:brightness-90 forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent",secondary:"bg-transparent text-text-body border-2 border-border-muted hover:bg-text-body/5 forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText]",ghost:"border-none text-text-body hover:bg-text-body/5 forced-colors:text-[ButtonText] forced-colors:hover:bg-[ButtonFace]",destructive:"bg-transparent text-action-destructive border-2 border-border-muted hover:bg-action-destructive/5 forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[Mark]",link:"!text-action-primary hover:text-action-primary/90 hover:underline hover:decoration-2 hover:underline-offset-4",icon:"border-none text-text-body hover:bg-text-body/5 forced-colors:text-[ButtonText] forced-colors:hover:bg-[ButtonFace] p-2 flex-shrink-0",unstyled:"bg-transparent"},Ct={full:"w-full",default:"w-fit"},fs="opacity-control-hover cursor-not-allowed pointer-events-none grayscale",gs="opacity-100 cursor-pointer",bs={"top-right":"-right-2 -top-2","top-left":"-left-2 -top-2","bottom-right":"-right-2 -bottom-2","bottom-left":"-left-2 -bottom-2"},xs={primary:"bg-action-primary text-white",destructive:"bg-action-destructive text-white"};function hs(e){let{variant:t="default",size:r="md",isDisabled:o,fullWidth:s=false,isLoading:a=false}=e,n=t==="unstyled"?"":`${ps} ${ms[t]}`;return t!=="unstyled"&&(n+=` ${P[r].text} ${P[r].height} ${P[r].padding} ${P[r].gap}`),o||a?n+=` ${fs}`:n+=` ${gs}`,s?n+=` ${Ct.full}`:n+=` ${Ct.default}`,`${n} ${B()}`}function L(e){let{icon:t,children:r,isLoading:o=false,loadingText:s,loadingIndicator:a,size:n="md",iconPosition:i="left",iconWeight:l,href:d,className:c,badgeNumber:u,badgeVariant:m="primary",badgePosition:f="top-right",style:p,...g}=e,h=t?jsx(b,{name:t,className:`icon-[--control-icon-size-${n}]`,weight:l}):null,x=jsxs(Fragment,{children:[i==="left"&&h,typeof r=="function"?null:r,i==="right"&&h]}),v=jsxs("div",{className:"relative inline-flex items-center justify-center",children:[jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:a||jsx(b,{name:"CircleNotch",className:`animate-spin icon-[--control-icon-size-${n}]`,"aria-hidden":"true"})}),jsx("div",{className:"invisible","aria-hidden":"true",children:x}),s&&jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:s})]}),S=[hs(e),c,o?"aria-busy":""].filter(Boolean).join(" "),N=d?jsx(Link,{href:d,...g,style:p,className:S,children:o?v:typeof r=="function"?function(y){return jsxs(Fragment,{children:[i==="left"&&h,r(y),i==="right"&&h]})}:x}):jsx(Button,{...g,style:p,className:S,children:o?v:typeof r=="function"?function(y){return jsxs(Fragment,{children:[i==="left"&&h,r(y),i==="right"&&h]})}:x});return u&&u>0?jsxs("div",{className:"relative",children:[N,jsx("span",{className:`absolute ${bs[f]} flex h-5 w-5 items-center justify-center rounded-full ${xs[m]} text-xs`,"aria-label":`${u} items`,children:u})]}):N}function $s({isSelected:e,isDisabled:t}){let r=[B,"w-9 h-9 text-base cursor-default rounded-full flex items-center justify-center forced-color-adjust-none"];return t?r.push("text-gray-300 dark:text-zinc-600 forced-colors:text-[GrayText]"):e?r.push("bg-blue-600 invalid:bg-red-600 text-white forced-colors:bg-[Highlight] forced-colors:invalid:bg-[Mark] forced-colors:text-[HighlightText]"):r.push("text-zinc-900 dark:text-zinc-200 hover:bg-gray-100 dark:hover:bg-zinc-700 pressed:bg-gray-200 dark:pressed:bg-zinc-600"),r.join(" ")}function St({errorMessage:e,...t}){return jsxs(Calendar,{...t,children:[jsx(we,{}),jsxs(CalendarGrid,{children:[jsx(Te,{}),jsx(CalendarGridBody,{children:r=>jsx(CalendarCell,{date:r,className:({isSelected:o,isDisabled:s})=>$s({isSelected:o,isDisabled:s})})})]}),e&&jsx(Text,{slot:"errorMessage",className:"text-sm text-red-600",children:e})]})}function we(){let{direction:e}=useLocale(),t=18;return jsxs("header",{className:"flex w-full items-center gap-1 px-1 pb-4",children:[jsx(L,{variant:"icon",slot:"previous",className:"pl-0",children:e==="rtl"?jsx(b,{name:"CaretRight","aria-hidden":true,size:t}):jsx(b,{name:"CaretLeft","aria-hidden":true,size:t})}),jsx(Heading,{className:"text-md mx-2 flex-1 text-center font-semibold text-zinc-900 dark:text-zinc-200"}),jsx(L,{variant:"icon",slot:"next",className:"pr-0",children:e==="rtl"?jsx(b,{name:"CaretLeft","aria-hidden":true,size:t}):jsx(b,{name:"CaretRight","aria-hidden":true,size:t})})]})}function Te(){return jsx(CalendarGridHeader,{children:e=>jsx(CalendarHeaderCell,{className:"text-xs font-semibold text-text-caption",children:e})})}var ks={xs:"text-lg font-semibold",sm:"text-xl font-semibold",md:"text-2xl font-semibold",lg:"text-3xl font-semibold",xl:"text-4xl font-semibold"},Fs={page:"h-16 leading-[62px]"};function te({tag:e="h1",size:t="lg",height:r,className:o="",children:s}){let a=ks[t],n=r?Fs[r]:"";return jsx(e,{className:twMerge(a,n,o),children:s})}var Qe=({width:e,height:t,variant:r="rect",animation:o="pulse",gradient:s=false,flex:a=false,stack:n,responsive:i,delay:l=0,adjustAnimationSpeedBasedOnWidth:d=false,ariaLabel:c,className:u,"data-testid":m})=>{let[f,p]=useState(l===0);if(useEffect(()=>{if(l>0){let y=setTimeout(()=>p(true),l);return ()=>clearTimeout(y)}},[l]),!f)return null;let g=s?"bg-gradient-to-r from-[var(--skeleton-base)] via-[var(--skeleton-highlight)] to-[var(--skeleton-base)]":"bg-[var(--skeleton-base)]",h=d&&e?(()=>{let y=typeof e=="number"?e:parseFloat(String(e));return isNaN(y)?"":`animation-duration-[${Math.max(.8,y/100)}s]`})():"",x=o==="pulse"?`animate-pulse ${h}`:o==="wave"?`relative overflow-hidden before:absolute before:inset-0 before:bg-gradient-to-r before:from-transparent before:via-[var(--skeleton-wave)] before:to-transparent before:animate-wave ${h}`:"",v="rounded-sm";r==="circle"&&(v="rounded-full"),r==="text"&&(v="h-4 w-full rounded-sm");let S=a?"flex-1 min-w-0":"",N=i?Object.entries(i).map(([y,H])=>`${y}:w-[${H}]`).join(" "):"";return n?jsx("div",{className:"space-y-2","data-testid":m,children:n.map((y,H)=>jsx("div",{className:twMerge(g,x,v,S,N,u),style:{width:y,height:t}},H))}):jsx("div",{className:twMerge(g,x,v,S,N,u),style:{width:e,height:t},role:"presentation","aria-hidden":!c,"aria-label":c??void 0,"data-testid":m})};var Ne=({heading:e,upperRightText:t,withPadding:r=true,isGhost:o=false,children:s,className:a="",isLoading:n})=>{let c=`w-full rounded md:border-x border-y bg-background-surface ${r?"p-6":""} ${o?"md:border-x-0 border-y-0 shadow-none p-0":"shadow-sm"} ${a}`.trim();return jsx("div",{className:c,"data-testid":"card",children:jsxs(Fragment,{children:[e&&jsx("div",{className:"mb-4 h-[28px] min-h-[28px]",children:n?jsx(Qe,{width:100,height:16,"data-testid":"skeleton"}):jsxs("div",{className:"flex justify-between",children:[jsx("div",{className:"flex items-center gap-2",children:typeof e=="string"?jsx(te,{size:"xs",children:e}):e}),t&&jsx("span",{className:"text-sm text-textFaint",children:t})]})}),s]})})};function Es({isDisabled:e}){return `flex gap-2 items-center group text-sm transition ${e?"text-text-disabled":"text-text-caption"}`}function Gs({isSelected:e,isInvalid:t,isDisabled:r,isIndeterminate:o}){let s="w-5 h-5 flex-shrink-0 rounded flex items-center justify-center border-2 transition ring-offset-2 focus:ring-2 focus:ring-border-focus",a="";return r?a="border-border-muted bg-background-muted":t?a="border-feedback-error-border bg-feedback-error-background":e||o?a="bg-action-primary border-action-primary hover:bg-action-primary-hover hover:border-action-primary-hover":a="bg-background-input border-border-input hover:border-border-focus",`${s} ${a}`}var wt="w-4 h-4 text-text-onPrimary group-disabled:text-text-disabled";function Ks(e){let{children:t,...r}=e;return jsx(Checkbox,{...r,className:composeRenderProps(e.className,(o,s)=>`${Es(s)} ${o||""}`),children:o=>{let{isSelected:s,isIndeterminate:a,...n}=o,i=jsx("div",{className:Gs({isSelected:s,isIndeterminate:a,...n}),children:a?jsx(Minus,{"aria-hidden":true,className:wt}):s?jsx(Check$1,{"aria-hidden":true,className:wt}):null});return jsxs(Fragment,{children:[i,typeof t=="function"?t(o):t]})}})}var Qs=({isEntering:e,isExiting:t,className:r})=>["max-w-[200px] group bg-slate-700 dark:bg-slate-600 border border-slate-800 dark:border-white/10 shadow-[inset_0_1px_0_0_theme(colors.gray.600)] dark:shadow-none text-white text-sm rounded-lg drop-shadow-lg will-change-transform px-3 py-1",e?"animate-in fade-in placement-bottom:slide-in-from-top-0.5 placement-top:slide-in-from-bottom-0.5 placement-left:slide-in-from-right-0.5 placement-right:slide-in-from-left-0.5 ease-out duration-200":"",t?"animate-out fade-out placement-bottom:slide-out-to-top-0.5 placement-top:slide-out-to-bottom-0.5 placement-left:slide-out-to-right-0.5 placement-right:slide-out-to-left-0.5 ease-in duration-150":"",r].filter(Boolean).join(" ");function Je({children:e,content:t,...r}){return jsxs(TooltipTrigger,{delay:200,children:[e,jsxs(Tooltip,{...r,offset:10,className:composeRenderProps(r.className,(o,s)=>Qs({...s,className:o})),children:[jsx(OverlayArrow,{children:jsx("svg",{width:8,height:8,viewBox:"0 0 8 8",className:"fill-slate-700 stroke-gray-800 group-placement-left:-rotate-90 group-placement-right:rotate-90 group-placement-bottom:rotate-180 dark:fill-slate-600 dark:stroke-white/10 forced-colors:fill-[Canvas] forced-colors:stroke-[ButtonBorder]",children:jsx("path",{d:"M0 0 L4 4 L8 0"})})}),t]})]})}function Ys({value:e,children:t,className:r,size:o="sm"}){let[s,a]=useState(false),l=jsx(L,{variant:"icon",size:o,onPress:()=>{let d=e||(typeof t=="string"?t:"");navigator.clipboard.writeText(d),a(true),setTimeout(()=>{a(false);},2e3);},className:"!px-2",children:jsx(b,{name:"Copy",size:o==="sm"?14:16})});return jsxs("div",{className:twMerge("flex items-center gap-1",r),children:[t,s?jsx(Je,{content:"Copied!",children:l}):l]})}function Nt({label:e,description:t,errorMessage:r,...o}){return jsxs(DateField,{...o,className:T(o.className,"flex flex-col gap-1"),children:[e&&jsx(k,{children:e}),jsx(ge,{}),t&&jsx(I,{children:t}),typeof r=="string"?jsx(F,{children:r}):null]})}function on({isPlaceholder:e,isDisabled:t,isFocused:r}){return ["inline p-0.5 type-literal:px-0 rounded outline outline-0 forced-color-adjust-none caret-transparent text-gray-800 dark:text-zinc-200 forced-colors:text-[ButtonText]",e&&"text-gray-600 dark:text-zinc-400 italic",t&&"text-gray-200 dark:text-zinc-600 forced-colors:text-[GrayText]",r&&"bg-blue-600 text-white dark:text-white forced-colors:bg-[Highlight] forced-colors:text-[HighlightText]"].filter(Boolean).join(" ")}function ge(e){return jsx(DateInput,{className:t=>Oe({...t,className:"block min-w-[150px] px-2 py-1.5 text-sm"}),...e,children:t=>jsx(DateSegment,{segment:t,className:on({isPlaceholder:t.isPlaceholder,isDisabled:t.isEditable})})})}function ae(e){return jsx(Dialog,{...e,className:twMerge("relative h-auto max-h-[inherit] overflow-auto outline outline-0 [[data-placement]>&]:p-4",e.className),role:"dialog"})}function fn({isEntering:e,isExiting:t,className:r=""}){let o=["bg-white","dark:bg-zinc-900/70","dark:backdrop-blur-2xl","dark:backdrop-saturate-200","forced-colors:bg-[Canvas]","shadow-2xl","rounded-sm","bg-clip-padding","border","border-gray-300","dark:border-white/[15%]","dark:text-zinc-300"].join(" "),s=e?["animate-in","fade-in","placement-bottom:slide-in-from-top-1","placement-top:slide-in-from-bottom-1","placement-left:slide-in-from-right-1","placement-right:slide-in-from-left-1","ease-out","duration-200"].join(" "):"",a=t?["animate-out","fade-out","placement-bottom:slide-out-to-top-1","placement-top:slide-out-to-bottom-1","placement-left:slide-out-to-right-1","placement-right:slide-out-to-left-1","ease-in","duration-150"].join(" "):"";return [o,s,a,r].filter(Boolean).join(" ")}function be({children:e,showArrow:t,className:r,...o}){let a=useSlottedContext(PopoverContext)?.trigger==="SubmenuTrigger",n=t?12:8;return n=a?n-6:n,jsxs(Popover,{offset:n,...o,className:composeRenderProps(r,(i,l)=>fn({...l,className:i})),children:[t&&jsx(OverlayArrow,{className:"group",children:jsx("svg",{width:12,height:12,viewBox:"0 0 12 12",className:"block fill-white stroke-black/10 stroke-1 group-placement-left:-rotate-90 group-placement-right:rotate-90 group-placement-bottom:rotate-180 dark:fill-[#1f1f21] dark:stroke-zinc-600 forced-colors:fill-[Canvas] forced-colors:stroke-[ButtonBorder]",children:jsx("path",{d:"M0 0 L6 6 L12 0"})})}),e]})}function Cn({selectionState:e,isDisabled:t}){let r=`${B} w-full h-full flex items-center justify-center rounded-sm forced-color-adjust-none font-semibold`,o={none:"text-text-body group-hover:bg-gray-200 group-pressed:bg-gray-200",middle:["group-hover:bg-gray-300 forced-colors:group-hover:bg-[Highlight]","group-invalid:group-hover:bg-red-200 forced-colors:group-invalid:group-hover:bg-[Mark]","group-pressed:bg-blue-300 forced-colors:group-pressed:bg-[Highlight] forced-colors:text-[HighlightText]","group-invalid:group-pressed:bg-red-300 forced-colors:group-invalid:group-pressed:bg-[Mark]"].join(" "),cap:" group-invalid:bg-red-600 forced-colors:bg-[Highlight] forced-colors:group-invalid:bg-[Mark] text-white forced-colors:text-white !bg-neutral-black"},s=t?"text-textFaint dark:text-zinc-600 forced-colors:text-textFaint font-light":"";return [r,o[e],s].filter(Boolean).join(" ")}function Le({errorMessage:e,...t}){return jsxs(RangeCalendar,{...t,children:[jsx(we,{}),jsxs(CalendarGrid,{className:"w-full [&_td]:px-0",children:[jsx(Te,{}),jsx(CalendarGridBody,{children:r=>jsx(CalendarCell,{date:r,className:"selection-start:rounded-s-end selection-end:rounded-e-end [td:last-child_&]:rounded-e-end group h-9 w-9 cursor-default text-sm outline outline-0 outside-month:text-gray-300 selected:bg-background-selected invalid:selected:bg-red-100 forced-colors:selected:bg-[Highlight] forced-colors:selected:text-white forced-colors:invalid:selected:bg-[Mark] [td:first-child_&]:rounded-s-full",children:({formattedDate:o,isSelected:s,isSelectionStart:a,isSelectionEnd:n,isFocusVisible:i,isDisabled:l})=>jsx("span",{className:Cn({selectionState:s&&(a||n)?"cap":s?"middle":"none",isDisabled:l}),children:o})})})]}),e&&jsx(Text,{slot:"errorMessage",className:"text-sm text-red-600",children:e})]})}function kt({label:e,description:t,errorMessage:r,...o}){return jsxs(DateRangePicker,{...o,className:T(o.className,"group flex flex-col gap-1"),children:[e&&jsx(k,{children:e}),jsxs(xt,{className:"w-auto min-w-[208px]",children:[jsx(ge,{slot:"start",className:"px-2 py-1.5 text-sm"}),jsx("span",{"aria-hidden":"true",className:"text-gray-800 group-disabled:text-gray-200 dark:text-zinc-200 group-disabled:dark:text-zinc-600 forced-colors:text-[ButtonText] group-disabled:forced-colors:text-[GrayText]",children:"\u2013"}),jsx(ge,{slot:"end",className:"flex-1 px-2 py-1.5 text-sm"}),jsx(L,{variant:"icon",className:"mr-1 w-6 rounded outline-offset-0",children:jsx(CalendarIcon,{"aria-hidden":true,className:"h-4 w-4"})})]}),t&&jsx(I,{children:t}),typeof r=="string"?jsx(F,{children:r}):null,jsx(be,{children:jsx(ae,{children:jsx(Le,{})})})]})}var ke=({title:e,onClose:t,titleAlign:r="left",hasBackArrow:o=false,onBack:s,headerContent:a})=>jsxs("div",{className:twMerge("relative flex h-16 w-full items-center justify-between border-b px-4",e&&"border-b",r==="center"?"justify-center":""),children:[o&&jsx(L,{variant:"unstyled",onPress:s,className:"absolute left-4",children:jsx(b,{name:"CaretLeft","data-testid":"back-arrow"})}),a||jsxs(Fragment,{children:[e&&jsx(te,{size:"xs",children:e}),t&&jsx(L,{variant:"unstyled",onPress:t,"aria-label":"Close dialog",children:jsx(b,{name:"X","data-testid":"close-button"})})]})]});var ne=class extends Component{constructor(){super(...arguments);Ie(this,"state",{hasError:false});Ie(this,"handleRetry",()=>{this.setState({hasError:false,error:void 0}),typeof window<"u"&&window.location.reload();});}static getDerivedStateFromError(r){return {hasError:true,error:r}}componentDidCatch(r,o){console.error("Error Boundary caught an error:",r,o);}render(){return this.state.hasError?this.props.fallback?this.props.fallback:jsx(Ne,{heading:this.props.title,children:jsxs("div",{className:"flex flex-col items-center justify-center gap-4 p-6","data-testid":"error-boundary",children:[jsx("p",{className:"text-red-500",children:this.state.error?.message||"Something went wrong"}),jsx("button",{className:"rounded bg-blue-500 px-4 py-2 text-white hover:bg-blue-600",onClick:this.handleRetry,children:"Retry"})]})}):this.props.children}};var rt=({children:e,title:t,headerContent:r,isOpen:o,slideInFrom:s="right",transparentOverlay:a=false,onClose:n,className:i,primaryAction:l,secondaryAction:d,footerContent:c})=>{let[u,m]=useState(false);if(useEffect(()=>{if(o){let g=setTimeout(()=>m(true),10);return ()=>clearTimeout(g)}else m(false);},[o]),!o)return null;let f=l||d,p=f||c;return jsx(ne,{children:jsx(ModalOverlay,{isOpen:o,onOpenChange:n,isDismissable:true,className:`fixed inset-0 z-50 ${a?"bg-transparent":"bg-black/50"}`,children:jsx(Modal,{className:"flex justify-end",isDismissable:true,children:jsxs(ae,{className:`fixed bottom-0 top-0 z-50 flex max-w-[400px] w-full flex-col bg-background-surface shadow-xl duration-300 h-full dark:bg-gray-800 ${u?s==="right"?"animate-in slide-in-from-right":"animate-in slide-in-from-left":""} ${i||""}`,style:{[s==="right"?"right":"left"]:0,transform:u?void 0:s==="right"?"translateX(100%)":"translateX(-100%)"},children:[(t||r)&&jsx(ke,{title:t,headerContent:r,onClose:n||(()=>{})}),jsx("div",{className:"flex-1 overflow-y-auto p-6",children:e}),p&&jsxs("div",{className:"flex h-28 w-full flex-col items-center justify-center border-t p-4",children:[c&&jsx("div",{className:"flex h-10 justify-center",children:c}),f&&jsxs("div",{className:"flex h-full w-full items-center justify-between gap-4",children:[d&&jsx(L,{size:d.size||"lg",fullWidth:true,variant:d.variant||"secondary",onPress:d.onPress,isLoading:d.isLoading,isDisabled:d.isDisabled,children:d.label}),l&&jsx(L,{size:l.size||"lg",fullWidth:true,onPress:l.onPress,isLoading:l.isLoading,isDisabled:l.isDisabled,children:l.label})]})]})]})})})})};rt.displayName="Drawer";function Dt(e){return jsx(Form,{...e,className:twMerge("flex flex-col gap-4",e.className)})}function Hn({children:e,...t}){return jsx(ListBox,{...t,className:T(t.className,"border border-gray-300 outline-0 dark:border-zinc-600"),children:e})}var En={sm:"py-1",md:"py-2",lg:"py-3",xl:"py-4"},Gn={sm:"text-controlElementSm",md:"text-controlElementMd",lg:"text-controlElementLg",xl:"text-controlElementXl"};function It({size:e="md",className:t,...r}){return jsx(ListBoxItem,{...r,className:twMerge("flex cursor-default items-center gap-2 rounded-sm px-3 text-text-body outline-none data-[focused]:bg-background-hover data-[selected]:bg-background-hover",En[e],Gn[e],t)})}var Mt=({className:e,size:t=24,color:r="text-action-primary"})=>jsx("div",{className:twMerge("inline-block animate-spin rounded-full border-2 border-solid border-current border-r-transparent",r,e),style:{width:t,height:t},role:"status","aria-label":"loading",children:jsx("span",{className:"sr-only",children:"Loading..."})});var Ht=({className:e,showWordmark:t=true})=>{let r=e||"fill-[#333333]";return t?jsxs("svg",{width:"270",height:"80",viewBox:"0 0 270 80",xmlns:"http://www.w3.org/2000/svg",className:r,children:[jsxs("g",{clipPath:"url(#clip0_796_283)",children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.223654 20.2934C0.417233 19.8234 0.873598 19.517 1.37984 19.517H20.5909C21.282 19.517 21.8422 20.0798 21.8422 20.774V40.049C21.8422 40.5572 21.5375 41.0155 21.0702 41.2102C20.6028 41.405 20.0647 41.2977 19.7067 40.9385L0.495628 21.6635C0.137428 21.3041 0.030075 20.7633 0.223654 20.2934ZM4.40349 22.0311L19.3396 37.017V22.0311H4.40349Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 20.2934C38.8394 19.8234 39.2958 19.517 39.802 19.517H59.013C59.7041 19.517 60.2642 20.0798 60.2642 20.774V40.049C60.2642 40.5572 59.9597 41.0155 59.4923 41.2102C59.025 41.405 58.4867 41.2977 58.1289 40.9385L38.9178 21.6635C38.5595 21.3041 38.4522 20.7633 38.6458 20.2934ZM42.8255 22.0311L57.7618 37.017V22.0311H42.8255Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.4347 58.8447C19.6283 58.3747 20.0847 58.0685 20.5909 58.0685H39.802C40.493 58.0685 41.0532 58.6312 41.0532 59.3255V78.6005C41.0532 79.1087 40.7486 79.567 40.2813 79.7617C39.8139 79.9562 39.2757 79.849 38.9178 79.49L19.7067 60.215C19.3485 59.8555 19.2411 59.3147 19.4347 58.8447ZM23.6146 60.5825L38.5508 75.5682V60.5825H23.6146Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 58.1643C39.79 57.9695 40.3283 58.0768 40.6861 58.436L59.8972 77.711C60.2555 78.0703 60.3628 78.6113 60.1692 79.081C59.9756 79.551 59.5192 79.8575 59.013 79.8575H39.802C39.1109 79.8575 38.5508 79.2948 38.5508 78.6005V59.3255C38.5508 58.8173 38.8554 58.359 39.3227 58.1643ZM41.0532 62.3575V77.3433H55.9893L41.0532 62.3575Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 19.6129C39.79 19.4182 40.3283 19.5254 40.6861 19.8846L59.8972 39.1595C60.2555 39.519 60.3628 40.0598 60.1692 40.5298C59.9756 40.9995 59.5192 41.306 59.013 41.306H39.802C39.1109 41.306 38.5508 40.7433 38.5508 40.049V20.7741C38.5508 20.2658 38.8554 19.8075 39.3227 19.6129ZM41.0532 23.8061V38.792H55.9893L41.0532 23.8061Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 38.8885C39.79 38.694 40.3283 38.8012 40.6861 39.1602L59.8972 58.4352C60.2555 58.7945 60.3628 59.3355 60.1692 59.8055C59.9756 60.2752 59.5192 60.5817 59.013 60.5817H39.802C39.1109 60.5817 38.5508 60.019 38.5508 59.3247V40.0497C38.5508 39.5415 38.8554 39.0832 39.3227 38.8885ZM41.0532 43.0817V58.0675H55.9893L41.0532 43.0817Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 39.569C38.8394 39.0992 39.2958 38.7927 39.802 38.7927H59.013C59.7041 38.7927 60.2642 39.3555 60.2642 40.0497V59.3247C60.2642 59.833 59.9597 60.2912 59.4923 60.486C59.025 60.6805 58.4867 60.5732 58.1289 60.2142L38.9178 40.9392C38.5595 40.5797 38.4522 40.039 38.6458 39.569ZM42.8255 41.3067L57.7618 56.2927V41.3067H42.8255Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 58.8447C38.8394 58.3747 39.2958 58.0685 39.802 58.0685H59.013C59.7041 58.0685 60.2642 58.6312 60.2642 59.3255V78.6005C60.2642 79.1087 59.9597 79.567 59.4923 79.7617C59.025 79.9562 58.4867 79.849 58.1289 79.49L38.9178 60.215C38.5595 59.8555 38.4522 59.3147 38.6458 58.8447ZM42.8255 60.5825L57.7618 75.5682V60.5825H42.8255Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 19.6129C59.0011 19.4182 59.5394 19.5254 59.8972 19.8846L79.1083 39.1595C79.4666 39.519 79.5739 40.0598 79.3803 40.5298C79.1867 40.9995 78.7303 41.306 78.2241 41.306H59.013C58.322 41.306 57.7618 40.7433 57.7618 40.049V20.7741C57.7618 20.2658 58.0664 19.8075 58.5338 19.6129ZM60.2643 23.8061V38.792H75.2006L60.2643 23.8061Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 0.338803C59.0011 0.144135 59.5394 0.251385 59.8972 0.610565L79.1083 19.8855C79.4666 20.2449 79.5739 20.7857 79.3803 21.2556C79.1867 21.7256 78.7303 22.032 78.2241 22.032H59.013C58.322 22.032 57.7618 21.4692 57.7618 20.775V1.50003C57.7618 0.99174 58.0664 0.533468 58.5338 0.338803ZM60.2643 4.53208V19.5179H75.2006L60.2643 4.53208Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M57.8569 20.2934C58.0505 19.8234 58.5069 19.517 59.013 19.517H78.2241C78.9151 19.517 79.4753 20.0798 79.4753 20.774V40.049C79.4753 40.5572 79.1707 41.0155 78.7034 41.2102C78.236 41.405 77.6978 41.2977 77.3399 40.9385L58.1289 21.6635C57.7705 21.3041 57.6633 20.7633 57.8569 20.2934ZM62.0365 22.0311L76.9729 37.017V22.0311H62.0365Z"}),jsx("path",{d:"M269.838 49.4457H249.005C249.266 51.801 250.162 53.6985 251.695 55.1377C253.225 56.577 255.134 57.2967 257.416 57.2967C259.307 57.2967 260.887 56.8715 262.159 56.021C263.463 55.1377 264.408 53.9927 264.996 52.5862H269.251C268.502 54.9415 267.084 56.937 264.996 58.5725C262.943 60.208 260.414 61.026 257.416 61.026C255.069 61.026 252.917 60.4697 250.961 59.3575C249.037 58.2127 247.504 56.6587 246.363 54.696C245.255 52.7332 244.7 50.558 244.7 48.17C244.7 45.782 245.255 43.6067 246.363 41.644C247.504 39.6812 249.037 38.1437 250.961 37.0315C252.917 35.8867 255.069 35.3142 257.416 35.3142C259.73 35.3142 261.833 35.8702 263.724 36.9825C265.615 38.0947 267.098 39.6485 268.176 41.644C269.283 43.6395 269.838 45.913 269.838 48.4645V49.4457ZM257.416 39.0432C255.263 39.0432 253.439 39.6812 251.939 40.957C250.47 42.2327 249.542 43.9337 249.152 46.06H265.583C265.192 43.9992 264.262 42.3145 262.796 41.006C261.36 39.6975 259.568 39.0432 257.416 39.0432Z"}),jsx("path",{d:"M228.356 60.5352V35.8049H232.219V39.7794H232.464C233.05 38.5689 233.963 37.5712 235.202 36.7862C236.474 35.9684 237.974 35.5594 239.701 35.5594H243.125V39.4359H239.701C237.517 39.4359 235.757 40.1554 234.42 41.5949C233.083 43.0342 232.414 44.9152 232.414 47.2377V60.5352H228.356Z"}),jsx("path",{d:"M208.607 61.0259C205.64 61.0259 203.326 60.1262 201.663 58.3272C200 56.4952 199.169 53.8947 199.169 50.5252V35.8047H203.228V49.8874C203.228 52.2427 203.766 54.0744 204.842 55.3829C205.95 56.6587 207.532 57.2967 209.586 57.2967C211.02 57.2967 212.308 56.9694 213.449 56.3152C214.623 55.6284 215.536 54.6959 216.188 53.5184C216.84 52.3407 217.166 50.9997 217.166 49.4949V35.8047H221.225V60.5352H217.313V56.5607H217.068C216.286 57.9019 215.161 58.9814 213.694 59.7992C212.226 60.6169 210.531 61.0259 208.607 61.0259Z"}),jsx("path",{d:"M186.736 39.534V56.806H194.756V60.5352H182.677V39.534H177.199V35.8047H182.677V29.5732H186.736V35.8047H193.24V39.534H186.736Z"}),jsx("path",{d:"M156.585 60.5352H151.988L158.394 48.0227L152.33 35.8047H156.976L162.062 46.0599H165.388L170.474 35.8047H175.022L168.958 48.0227L175.365 60.5352H170.67L165.29 49.7892H162.013L156.585 60.5352Z"}),jsx("path",{d:"M150.138 49.1315H129.304C129.565 51.4867 130.461 53.3842 131.994 54.8235C133.526 56.2627 135.433 56.9825 137.715 56.9825C139.606 56.9825 141.188 56.5572 142.459 55.7067C143.763 54.8235 144.709 53.6785 145.296 52.272H149.551C148.801 54.6272 147.382 56.6227 145.296 58.2582C143.242 59.8937 140.715 60.7118 137.715 60.7118C135.368 60.7118 133.216 60.1555 131.26 59.0432C129.336 57.8985 127.804 56.3445 126.663 54.3817C125.554 52.419 125 50.2437 125 47.8557C125 45.4677 125.554 43.2925 126.663 41.3298C127.804 39.367 129.336 37.8295 131.26 36.7173C133.216 35.5725 135.368 35 137.715 35C140.03 35 142.133 35.556 144.024 36.6682C145.915 37.7805 147.399 39.3342 148.475 41.3298C149.583 43.3252 150.138 45.5987 150.138 48.1502V49.1315ZM137.715 38.729C135.564 38.729 133.738 39.367 132.238 40.6427C130.771 41.9185 129.842 43.6195 129.45 45.7458H145.883C145.491 43.685 144.562 42.0002 143.095 40.6917C141.661 39.3832 139.867 38.729 137.715 38.729Z"}),jsx("path",{d:"M116.961 60.5353H112.559V30.4072H101.164V26.1875H128.307V30.4072H116.961V60.5353Z"})]}),jsx("defs",{children:jsx("clipPath",{id:"clip0_796_283",children:jsx("rect",{width:"270",height:"80",fill:"white"})})})]}):jsxs("svg",{width:"80",height:"80",viewBox:"0 0 80 80",xmlns:"http://www.w3.org/2000/svg",className:r,children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.223654 20.2934C0.417233 19.8234 0.873598 19.517 1.37984 19.517H20.5909C21.282 19.517 21.8422 20.0798 21.8422 20.774V40.049C21.8422 40.5572 21.5375 41.0155 21.0702 41.2102C20.6028 41.405 20.0647 41.2977 19.7067 40.9385L0.495628 21.6635C0.137428 21.3041 0.030075 20.7633 0.223654 20.2934ZM4.40349 22.0311L19.3396 37.017V22.0311H4.40349Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 20.2934C38.8394 19.8234 39.2958 19.517 39.802 19.517H59.013C59.7041 19.517 60.2642 20.0798 60.2642 20.774V40.049C60.2642 40.5572 59.9597 41.0155 59.4923 41.2102C59.025 41.405 58.4867 41.2977 58.1289 40.9385L38.9178 21.6635C38.5595 21.3041 38.4522 20.7633 38.6458 20.2934ZM42.8255 22.0311L57.7618 37.017V22.0311H42.8255Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.4347 58.8447C19.6283 58.3747 20.0847 58.0685 20.5909 58.0685H39.802C40.493 58.0685 41.0532 58.6312 41.0532 59.3255V78.6005C41.0532 79.1087 40.7486 79.567 40.2813 79.7617C39.8139 79.9562 39.2757 79.849 38.9178 79.49L19.7067 60.215C19.3485 59.8555 19.2411 59.3147 19.4347 58.8447ZM23.6146 60.5825L38.5508 75.5682V60.5825H23.6146Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 58.1643C39.79 57.9695 40.3283 58.0768 40.6861 58.436L59.8972 77.711C60.2555 78.0703 60.3628 78.6113 60.1692 79.081C59.9756 79.551 59.5192 79.8575 59.013 79.8575H39.802C39.1109 79.8575 38.5508 79.2948 38.5508 78.6005V59.3255C38.5508 58.8173 38.8554 58.359 39.3227 58.1643ZM41.0532 62.3575V77.3433H55.9893L41.0532 62.3575Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 19.6129C39.79 19.4182 40.3283 19.5254 40.6861 19.8846L59.8972 39.1595C60.2555 39.519 60.3628 40.0598 60.1692 40.5298C59.9756 40.9995 59.5192 41.306 59.013 41.306H39.802C39.1109 41.306 38.5508 40.7433 38.5508 40.049V20.7741C38.5508 20.2658 38.8554 19.8075 39.3227 19.6129ZM41.0532 23.8061V38.792H55.9893L41.0532 23.8061Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 38.8885C39.79 38.694 40.3283 38.8012 40.6861 39.1602L59.8972 58.4352C60.2555 58.7945 60.3628 59.3355 60.1692 59.8055C59.9756 60.2752 59.5192 60.5817 59.013 60.5817H39.802C39.1109 60.5817 38.5508 60.019 38.5508 59.3247V40.0497C38.5508 39.5415 38.8554 39.0832 39.3227 38.8885ZM41.0532 43.0817V58.0675H55.9893L41.0532 43.0817Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 39.569C38.8394 39.0992 39.2958 38.7927 39.802 38.7927H59.013C59.7041 38.7927 60.2642 39.3555 60.2642 40.0497V59.3247C60.2642 59.833 59.9597 60.2912 59.4923 60.486C59.025 60.6805 58.4867 60.5732 58.1289 60.2142L38.9178 40.9392C38.5595 40.5797 38.4522 40.039 38.6458 39.569ZM42.8255 41.3067L57.7618 56.2927V41.3067H42.8255Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 58.8447C38.8394 58.3747 39.2958 58.0685 39.802 58.0685H59.013C59.7041 58.0685 60.2642 58.6312 60.2642 59.3255V78.6005C60.2642 79.1087 59.9597 79.567 59.4923 79.7617C59.025 79.9562 58.4867 79.849 58.1289 79.49L38.9178 60.215C38.5595 59.8555 38.4522 59.3147 38.6458 58.8447ZM42.8255 60.5825L57.7618 75.5682V60.5825H42.8255Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 19.6129C59.0011 19.4182 59.5394 19.5254 59.8972 19.8846L79.1083 39.1595C79.4666 39.519 79.5739 40.0598 79.3803 40.5298C79.1867 40.9995 78.7303 41.306 78.2241 41.306H59.013C58.322 41.306 57.7618 40.7433 57.7618 40.049V20.7741C57.7618 20.2658 58.0664 19.8075 58.5338 19.6129ZM60.2643 23.8061V38.792H75.2006L60.2643 23.8061Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 0.338803C59.0011 0.144135 59.5394 0.251385 59.8972 0.610565L79.1083 19.8855C79.4666 20.2449 79.5739 20.7857 79.3803 21.2556C79.1867 21.7256 78.7303 22.032 78.2241 22.032H59.013C58.322 22.032 57.7618 21.4692 57.7618 20.775V1.50003C57.7618 0.99174 58.0664 0.533468 58.5338 0.338803ZM60.2643 4.53208V19.5179H75.2006L60.2643 4.53208Z"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M57.8569 20.2934C58.0505 19.8234 58.5069 19.517 59.013 19.517H78.2241C78.9151 19.517 79.4753 20.0798 79.4753 20.774V40.049C79.4753 40.5572 79.1707 41.0155 78.7034 41.2102C78.236 41.405 77.6978 41.2977 77.3399 40.9385L58.1289 21.6635C57.7705 21.3041 57.6633 20.7633 57.8569 20.2934ZM62.0365 22.0311L76.9729 37.017V22.0311H62.0365Z"})]})};var Qn=e=>twMerge(ee({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused}),e.transparent?"bg-transparent":"bg-background-input","pr-9","[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",e.className);function Vt({label:e,description:t,errorMessage:r,size:o,tooltip:s,isRequired:a,transparent:n,validationResult:i,...l}){let d=useId();return jsx(NumberField,{...l,id:d,isRequired:a,className:T(l.className,"group flex flex-col gap-1"),step:l.step??1,onChange:c=>{typeof c=="number"&&(l.maxValue!=null&&c>l.maxValue?l.onChange?.(l.maxValue):l.minValue!=null&&c<l.minValue?l.onChange?.(l.minValue):l.onChange?.(c));},isInvalid:!!r||typeof l.value=="number"&&(l.maxValue!=null&&l.value>l.maxValue||l.minValue!=null&&l.value<l.minValue),children:({isDisabled:c,isInvalid:u})=>jsxs("div",{className:"flex flex-col",children:[e&&jsx(k,{size:o,tooltip:s,isRequired:a,htmlFor:d,children:e}),jsx("div",{className:"relative",children:jsxs(Group,{className:"relative",children:[jsx(Input,{className:Qn({isInvalid:u||!!r,isDisabled:c,transparent:n,className:typeof l.className=="string"?l.className:void 0})}),jsxs("div",{className:"absolute inset-y-[1px] right-[1px] flex flex-col divide-y border-l overflow-hidden rounded-r-[calc(var(--control-border-radius)-1px)]",children:[jsx(Button,{slot:"increment",isDisabled:c,className:"flex h-1/2 w-7 items-center justify-center bg-background-input hover:bg-background-input-hover active:bg-background-input-active disabled:cursor-not-allowed disabled:opacity-50",children:jsx(b,{name:"CaretUp",size:14})}),jsx(Button,{slot:"decrement",isDisabled:c,className:"flex h-1/2 w-7 items-center justify-center bg-background-input hover:bg-background-input-hover active:bg-background-input-active disabled:cursor-not-allowed disabled:opacity-50",children:jsx(b,{name:"CaretDown",size:14})})]})]})}),t&&jsx(I,{size:o,className:"mt-3",children:t}),r&&jsx(F,{size:o,className:"mt-3",children:typeof r=="function"?r(i):r})]})})}function Xn(e){return typeof e=="object"&&e!==null&&"features"in e&&Array.isArray(e.features)&&"type"in e&&typeof e.type=="string"}var Jn=process.env.NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN||"";function Gt({label:e="Search for a place",selectedKey:t,defaultSelectedKey:r,onSelectionChange:o,placeholder:s="Enter a location...",errorMessage:a,description:n,size:i="md",tooltip:l,isRequired:d,isDisabled:c,showErrors:u=true,autoFocus:m=false,onSelect:f,searchTypes:p=["place","address"],defaultFilter:g,validationResult:h,countryRestrictions:x,proximity:v="ip"}){let S=useRef(new WeakMap),N=useRef([]),y={requestType:"REST",method:"GET",url:"https://api.mapbox.com/geocoding/v5/mapbox.places/{q}.json",extraParams:{access_token:Jn,types:p.join(","),limit:"5",...x?.length?{country:x.join(",").toLowerCase()}:{},...v?{proximity:v==="ip"?"ip":v.join(",")}:{}},shouldLoad:R=>R.length>0,transformResponse:R=>{if(!Xn(R))return [];let $=R.features.map(D=>{let w={id:D.id,name:D.place_name};return S.current.set(w,{type:D.place_type[0],center:D.center}),w});return $.length>0&&(N.current=$),$}},H=R=>{let $=S.current.get(R),D=R.name.split(", "),w=D[0],ye=D.slice(1).join(", ");return jsxs("div",{className:"flex items-center gap-3 py-0.5",children:[jsx(b,{name:$?.type==="address"?"MapPin":$?.type==="place"?"Buildings":$?.type==="region"?"MapPinArea":$?.type==="country"?"Flag":"Circle",className:"h-5 w-5 flex-shrink-0 text-text-muted"}),jsxs("div",{className:"flex min-w-0 flex-col",children:[jsx("span",{className:"truncate font-medium text-text-body",children:w}),ye&&jsx("span",{className:"truncate text-sm text-text-muted",children:ye})]})]})},de=R=>R?jsx(b,{name:"CircleNotch",className:"h-4 w-4 animate-spin text-text-muted"}):jsx(b,{name:"MagnifyingGlass",className:"h-4 w-4 text-text-muted"});return jsx(qe,{"data-testid":"autocomplete","data-config":JSON.stringify({types:p.join(","),country:x?.join(",").toLowerCase(),proximity:v==="ip"?"ip":v?.join(",")}),label:e,selectedKey:t,defaultSelectedKey:r,onSelectionChange:R=>{if(o?.(R),R){let D=N.current.find(w=>w.id===R);if(D){let w=S.current.get(D);w&&f({id:D.id,place_name:D.name,place_type:[w.type],center:w.center});}}},requestConfig:y,placeholder:s,errorMessage:a,description:n,size:i,tooltip:l,isRequired:d,isDisabled:c,showErrors:u,autoFocus:m,renderItem:H,renderLeftIcon:de,defaultFilter:g,validationResult:h})}function Ot({label:e,rightLabel:t,progressWidth:r=64,hideLabels:o=false,...s}){return jsx(ProgressBar,{...s,className:T(s.className,"flex flex-col gap-1"),children:({percentage:a,valueText:n,isIndeterminate:i})=>jsxs(Fragment,{children:[!o&&jsxs("div",{className:"flex items-center justify-between gap-2",children:[jsx("span",{className:"text-sm text-text-heading",children:e}),jsx("span",{className:"text-sm text-text-heading",children:t||n})]}),jsx("div",{className:`relative h-2 w-${r} overflow-hidden rounded-full bg-background-muted outline outline-1 -outline-offset-1 outline-transparent`,children:jsx("div",{className:`absolute top-0 h-full rounded-full bg-blue-600 dark:bg-blue-500 forced-colors:bg-[Highlight] ${i?"left-full duration-1000 ease-out animate-in slide-out-to-right-full repeat-infinite [--tw-enter-translate-x:calc(-16rem-100%)]":"left-0"}`,style:{width:(i?40:a)+"%"}})})]})})}function si(e="md"){return `flex-1 text-start data-[placeholder]:text-text-placeholder ${P[e].text}`}function ni(){let e=q.useCallback((r,o)=>{o?.(r);},[]),t=q.useCallback((r,o)=>{o?.(r);},[]);return {handleFocus:e,handleBlur:t}}function jt({label:e,description:t,errorMessage:r,children:o,items:s,size:a="md",selectedKey:n,defaultSelectedKey:i,onSelectionChange:l,placeholder:d,showErrors:c=false,tooltip:u,isRequired:m,transparent:f,...p}){let[g,h]=useState(null),x=n??g??i,{handleFocus:v,handleBlur:S}=ni(),N=H=>{l?l(H):h(H);},y=useRef(null);return jsx(Select,{...p,selectedKey:x,defaultSelectedKey:i,onSelectionChange:N,placeholder:d,className:T(p.className,"group flex w-full flex-col"),ref:y,onOpenChange:H=>{H||y.current?.blur();},children:({isDisabled:H,isInvalid:de,isOpen:R})=>jsxs("div",{className:"flex flex-col",children:[e&&jsx(k,{size:a,tooltip:u,isRequired:m,className:"mb-2",children:e}),jsx(_,{children:jsxs(L,{variant:"unstyled",className:twMerge(j({isInvalid:de||c&&!!r,isDisabled:H,isFocused:R,transparent:f,size:a}),"flex items-center text-start gap-4 cursor-pointer min-w-[200px] max-w-[400px]"),onFocus:$=>v($,p.onFocus),onBlur:$=>S($,p.onBlur),"data-open":R,children:[jsx(SelectValue,{className:si(a)}),jsx(b,{name:"CaretDown","aria-hidden":true,className:twMerge("h-4 w-4 text-text-body group-disabled:text-gray-200 forced-colors:text-[ButtonText] transition-transform",R&&"rotate-180")})]})}),t&&jsx(I,{size:a,className:"mt-3",children:t}),c&&jsx(F,{size:a,className:"mt-3 text-feedback-error-text",children:typeof r=="function"&&p.validationResult?r(p.validationResult):typeof r=="string"?r:null}),jsx(be,{className:"min-w-[var(--trigger-width)] max-w-[400px] bg-background-input",children:jsx(ListBox,{items:s,className:"w-full max-h-inherit overflow-auto bg-background-input p-1 outline-0 [clip-path:inset(0_0_0_0_round_.75rem)]",children:o})})]})})}function li({isSelected:e,isDisabled:t}){return ["flex h-4 w-7 px-px items-center shrink-0 cursor-default rounded-full transition duration-200 ease-in-out shadow-inner border border-transparent",B,e?"bg-gray-700 dark:bg-zinc-300 forced-colors:!bg-[Highlight] group-pressed:bg-gray-800 dark:group-pressed:bg-zinc-200":"bg-gray-400 dark:bg-zinc-400 group-pressed:bg-gray-500 dark:group-pressed:bg-zinc-300",t?"bg-gray-200 dark:bg-zinc-700 forced-colors:group-selected:!bg-[GrayText] forced-colors:border-[GrayText]":""].filter(Boolean).join(" ")}function di({isSelected:e,isDisabled:t}){return ["h-3 w-3 transform rounded-full bg-white dark:bg-zinc-900 outline outline-1 -outline-offset-1 outline-transparent shadow transition duration-200 ease-in-out",e?"translate-x-[100%]":"translate-x-0",t?"forced-colors:outline-[GrayText]":""].filter(Boolean).join(" ")}function Ut({children:e,...t}){return jsx(Switch,{...t,className:T(t.className,"group flex items-center gap-2 text-sm text-gray-800 transition disabled:text-gray-300 dark:text-zinc-200 dark:disabled:text-zinc-600 forced-colors:disabled:text-[GrayText]"),children:r=>jsxs(Fragment,{children:[jsx("div",{className:li(r),children:jsx("span",{className:di(r)})}),e]})})}function bi({orientation:e,className:t=""}){return `flex flex-col w-full ${{horizontal:"",vertical:"flex-row"}[e]||""} ${t}`.trim()}function Qt(e){return jsx("div",{className:"w-full",children:jsx(Tabs,{...e,className:composeRenderProps(e.className,(t,r)=>bi({...r,className:t}))})})}function xi({orientation:e,className:t=""}){return `flex gap-10 relative after:absolute after:bottom-0 after:left-0 after:right-0 after:h-[2px] after:bg-border-default ${{horizontal:"flex-row w-full",vertical:"flex-col items-start"}[e]||""} ${t}`.trim()}function Xt(e){return jsx(TabList,{...e,className:composeRenderProps(e.className,(t,r)=>xi({...r,className:t||""}))})}function hi({isSelected:e,isDisabled:t,className:r=""}){let o="flex items-center cursor-default px-1 py-2 font-medium transition hover:cursor-pointer relative",s=B(),a="";return t?a="text-gray-200 forced-colors:text-[GrayText] selected:text-gray-300 forced-colors:selected:text-[HighlightText] selected:bg-gray-200 forced-colors:selected:bg-[GrayText]":e?a="text-action-primary border-b-2 border-action-primary z-10 forced-colors:bg-[Highlight]":a="text-text-muted hover:text-text-body",`${o} ${s} ${a} ${r}`.trim()}function Jt(e){return jsx(Tab,{...e,"data-testid":e.id?`tab-${e.id}`:void 0,className:composeRenderProps(e.className,(t,r)=>hi({...r,className:t,isSelected:r.isSelected}))})}function vi({className:e=""}){let t="block w-full mt-4 text-text-body",r=B();return `${t} ${r} ${e}`.trim()}function Yt(e){return jsx(TabPanel,{...e,className:composeRenderProps(e.className,(t,r)=>vi({...r,className:t||""}))})}var Ci=e=>{let t=j({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused,transparent:e.transparent,size:e.size});return twMerge(t,"min-h-[100px] resize-y py-2",e.className)};function _t({label:e,description:t,errorMessage:r,size:o="md",tooltip:s,required:a,transparent:n,isInvalid:i,className:l,validationResult:d,...c}){let{isFocused:u,handleFocus:m,handleBlur:f}=Y();return jsx("div",{className:"group flex flex-col",children:jsxs("div",{className:"flex flex-col",children:[e&&jsx(k,{size:o,tooltip:s,isRequired:a,children:e}),jsx(_,{children:jsx("textarea",{...c,required:a,onFocus:p=>{c.onFocus&&c.onFocus(p),m(p);},onBlur:p=>{c.onBlur&&c.onBlur(p),f(p);},className:Ci({isInvalid:i,isDisabled:c.disabled,isFocused:u,size:o,transparent:n,className:l})})}),t&&jsx(I,{size:o,className:"mt-3",children:t}),typeof r=="string"&&jsx(F,{size:o,className:"mt-1",children:r}),typeof r=="function"&&d&&jsx(F,{size:o,className:"mt-1",children:r(d)})]})})}var Ti=e=>{let t=j({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused,transparent:e.transparent,size:e.size}),r=[e.showSearchIcon?"pl-8":"pl-3",e.isClearable&&e.hasValue||e.isPassword?"pr-8":"pr-3"].join(" ");return twMerge(t,r,e.className)};function tr({label:e,description:t,errorMessage:r,size:o="md",tooltip:s,isRequired:a,transparent:n,showSearchIcon:i,isClearable:l,onClear:d,type:c,validationResult:u,...m}){let[f,p]=q.useState(false),{isFocused:g,handleFocus:h,handleBlur:x}=Y(),v=c==="password";return jsx(TextField,{...m,isRequired:a,type:v?f?"text":"password":c,className:T(m.className,"group flex flex-col"),children:({isDisabled:S,isInvalid:N})=>jsxs("div",{className:"flex flex-col",children:[e&&jsx(k,{size:o,tooltip:s,isRequired:a,children:e}),jsxs(_,{children:[i&&jsx("div",{className:"pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 transform",children:jsx(b,{name:"MagnifyingGlass",className:"h-4 w-4 text-text-muted"})}),jsx(bt,{size:o,disabled:S,onFocus:y=>h(y,m.onFocus),onBlur:y=>x(y,m.onBlur),onChange:y=>m.onChange?.(y.target.value),className:Ti({isInvalid:N,isDisabled:S,isFocused:g,size:o,transparent:n,showSearchIcon:i,isClearable:l,hasValue:!!m.value,isPassword:v,className:typeof m.className=="string"?m.className:void 0})}),l&&m.value&&!S&&jsx(gt,{onClick:()=>{d?d():m.onChange&&m.onChange("");},size:o}),v&&!S&&jsx("button",{type:"button",onClick:()=>p(!f),className:"absolute right-3 top-1/2 -translate-y-1/2 transform text-text-muted hover:text-text-body","aria-label":f?"Hide password":"Show password",onMouseDown:y=>{y.preventDefault(),y.stopPropagation();},children:jsx(b,{name:f?"EyeSlash":"Eye",size:o==="sm"?16:20,className:"text-text-body"})})]}),t&&jsx(I,{size:o,className:"mt-3",children:t}),typeof r=="string"&&jsx(F,{size:o,className:"mt-1",children:r}),typeof r=="function"&&u&&jsx(F,{size:o,className:"mt-1",children:r(u)})]})})}var Ni=({href:e,children:t,className:r="",external:o=false,title:s,variant:a="default",onClick:n,asButton:i=false,onPress:l,showArrow:d=false})=>{let c=o?{target:"_blank",rel:"noopener noreferrer"}:{},f=`hover:underline hover:decoration-1 hover:underline-offset-4 cursor-pointer ${{default:"text-text-link-default hover:text-text-link-hover visited:text-text-link-default",primary:"text-action-primary hover:text-action-primary-hover visited:text-action-primary",muted:"text-text-muted hover:text-text-muted visited:text-text-muted"}[a]} ${r}`,p=jsxs(Fragment,{children:[t,d&&jsxs("span",{children:["\xA0","\u2192"]})]});return i?jsx("button",{type:"button",className:f,onClick:l,title:s,children:p}):jsx("a",{href:e||"#",className:f,...c,title:s,onClick:n,children:p})};var Mi=e=>twMerge("w-full",ee({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused}),Ke({transparent:e.transparent,isDisabled:e.isDisabled}),P[e.size||"md"].text,P[e.size||"md"].height,P[e.size||"md"].padding,"flex items-center gap-0.5",e.className),Hi=({isPlaceholder:e,isDisabled:t,isFocused:r,size:o="md"})=>twMerge("outline-none rounded transition-colors box-content tabular-nums text-center",e?"text-text-muted italic":"text-text-body",t?"text-text-disabled cursor-not-allowed":"cursor-default",P[o].text,"px-0.5 -my-0.5",r&&"!outline-[1.5px] !outline-[var(--control-focus-ring-color)] ![--tw-outline-style:solid]",!t&&!r&&"hover:bg-text-body/[0.05]");function sr({label:e,description:t,errorMessage:r,size:o="md",tooltip:s,isRequired:a,transparent:n,validationResult:i,...l}){let{isFocused:d}=Y(),[c,u]=useState(null),m=useRef(null);return useEffect(()=>{let f=h=>{let x=h.target;x.hasAttribute("data-type")&&u(x.getAttribute("data-type"));},p=()=>{u(null);},g=m.current;return g&&(g.addEventListener("focusin",f),g.addEventListener("focusout",p)),()=>{g&&(g.removeEventListener("focusin",f),g.removeEventListener("focusout",p));}},[]),jsx(TimeField,{...l,children:({isDisabled:f,isInvalid:p})=>jsxs(Fragment,{children:[e&&jsx(k,{isRequired:a,tooltip:s,children:e}),jsx(DateInput,{ref:m,className:Mi({size:o,transparent:n,isDisabled:f,isInvalid:p,isFocused:d}),children:g=>jsx(DateSegment,{segment:g,className:Hi({isPlaceholder:g.isPlaceholder,isDisabled:g.isEditable,isFocused:c===g.type,size:o})})}),t&&jsx(I,{children:t}),typeof r=="string"?jsx(F,{children:r}):null]})})}var Ei="flex font-medium justify-center items-center gap-2 text-center transition whitespace-nowrap box-border",nr={default:{selected:"bg-text-body text-white hover:brightness-[var(--control-hover-opacity)] forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent",unselected:"bg-transparent text-text-body border-2 border-border-muted hover:bg-text-body/[0.05] forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText]"},primary:{selected:"bg-action-primary text-white hover:brightness-[var(--control-hover-opacity)] forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent",unselected:"bg-transparent text-text-body border-2 border-border-muted hover:bg-text-body/[0.05] forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText]"}},Gi="opacity-[--control-hover-opacity] cursor-not-allowed pointer-events-none grayscale",Ki="opacity-100 cursor-pointer",Oi={"top-right":"-right-2 -top-2","top-left":"-left-2 -top-2","bottom-right":"-right-2 -bottom-2","bottom-left":"-left-2 -bottom-2"},Zi={primary:"bg-action-primary text-white",destructive:"bg-action-destructive text-white"};function qi(e){let{variant:t="default",size:r="md",isDisabled:o,isSelected:s,borderRadius:a,borderRight:n,borderLeft:i}=e,l=`${Ei} ${s?nr[t].selected:nr[t].unselected}`;return l+=` ${P[r].text} ${P[r].height} ${P[r].padding} ${P[r].gap}`,l+=` ${o?Gi:Ki}`,a==="left"&&(l+=" rounded-l-sm"),a==="right"&&(l+=" rounded-r-sm"),n&&(l+=" border-r"),i&&(l+=" border-l"),l+=` ${B()}`,twMerge(l)}function lr(e){let{className:t,children:r,onPress:o,icon:s,iconPosition:a="left",iconWeight:n,isLoading:i=false,loadingText:l,loadingIndicator:d,size:c="md",badgeNumber:u,badgeVariant:m="primary",badgePosition:f="top-right",...p}=e,g=s?jsx(b,{name:s,className:`icon-[--control-icon-size-${c}]`,weight:n}):null,h=()=>{let v=jsxs(Fragment,{children:[a==="left"&&g,r,a==="right"&&g]});return i?jsxs("div",{className:"relative inline-flex items-center justify-center",children:[jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:d||jsx(b,{name:"CircleNotch",className:`animate-spin icon-[--control-icon-size-${c}]`,"aria-hidden":"true"})}),jsx("div",{className:"invisible","aria-hidden":"true",children:v}),l&&jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:l})]}):v},x=jsx(ToggleButton,{onPress:o,...p,className:twMerge(qi(e),t),"aria-busy":i,children:h()});return u&&u>0?jsxs("div",{className:"relative",children:[x,jsx("span",{className:`absolute ${Oi[f]} flex h-5 w-5 items-center justify-center rounded-full ${Zi[m]} text-xs`,"aria-label":`${u} items`,children:u})]}):x}
|
|
2
|
+
export{qe as Autocomplete,L as Button,St as Calendar,Ne as Card,Ks as Checkbox,gt as ClearButton,Ys as CopyToClipboard,Nt as DateField,kt as DateRangePicker,I as Description,ae as Dialog,ke as DialogHeader,rt as Drawer,ne as ErrorBoundary,F as FieldError,xt as FieldGroup,Dt as Form,te as Heading,b as Icon,bt as Input,_ as InputWrapper,k as Label,Hn as ListBox,It as ListBoxItem,Mt as Loader,Ht as Logo,Vt as NumberField,Gt as PlaceSearch,be as Popover,Ot as ProgressBar,Le as RangeCalendar,jt as Select,Qe as Skeleton,Ut as Switch,Jt as Tab,Xt as TabList,Yt as TabPanel,Qt as Tabs,_t as TextArea,tr as TextField,Ni as TextLink,sr as TimeField,lr as ToggleButton,Je as Tooltip,Oe as getFieldGroupStyles,Ke as getInputBackgroundStyles,j as getInputBaseStyles,ee as getInputStateStyles,Y as useInputFocus};//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|