@npm-questionpro/wick-ui-lib 1.25.0 → 1.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
(function(T,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("react/jsx-runtime"),require("@radix-ui/react-avatar"),require("react"),require("clsx"),require("tailwind-merge"),require("@radix-ui/react-accordion"),require("@radix-ui/react-slot"),require("class-variance-authority"),require("@radix-ui/react-label"),require("@radix-ui/react-tooltip"),require("date-fns"),require("@radix-ui/react-popover"),require("react-day-picker"),require("@radix-ui/react-checkbox"),require("cmdk"),require("react-virtuoso"),require("@radix-ui/react-dropdown-menu"),require("@tiptap/react"),require("@tiptap/extension-list"),require("@tiptap/extension-subscript"),require("@tiptap/extension-superscript"),require("@tiptap/extension-table"),require("@tiptap/extension-text-align"),require("@tiptap/extension-text-style"),require("@tiptap/starter-kit"),require("@tiptap/extension-image"),require("@radix-ui/react-separator"),require("@radix-ui/react-dialog"),require("@radix-ui/react-switch"),require("@radix-ui/react-scroll-area"),require("@radix-ui/react-radio-group"),require("react-dom"),require("@radix-ui/react-toggle-group"),require("@radix-ui/react-toggle"),require("@radix-ui/react-tabs"),require("@tanstack/react-table"),require("@radix-ui/react-toast")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@radix-ui/react-avatar","react","clsx","tailwind-merge","@radix-ui/react-accordion","@radix-ui/react-slot","class-variance-authority","@radix-ui/react-label","@radix-ui/react-tooltip","date-fns","@radix-ui/react-popover","react-day-picker","@radix-ui/react-checkbox","cmdk","react-virtuoso","@radix-ui/react-dropdown-menu","@tiptap/react","@tiptap/extension-list","@tiptap/extension-subscript","@tiptap/extension-superscript","@tiptap/extension-table","@tiptap/extension-text-align","@tiptap/extension-text-style","@tiptap/starter-kit","@tiptap/extension-image","@radix-ui/react-separator","@radix-ui/react-dialog","@radix-ui/react-switch","@radix-ui/react-scroll-area","@radix-ui/react-radio-group","react-dom","@radix-ui/react-toggle-group","@radix-ui/react-toggle","@radix-ui/react-tabs","@tanstack/react-table","@radix-ui/react-toast"],a):(T=typeof globalThis<"u"?globalThis:T||self,a(T["wick-ui-lib"]={},T["react/jsx-runtime"],T.RadixUIAvatar,T.React,T.clsx,T.tailwindMerge,T.RadixUIAccordion,T.RadixUISlot,T.ClassVarianceAuthority,T.RadixUILabel,T.RadixUITooltip,T.dateFns,T.RadixUIPopover,T.ReactDayPicker,T.RadixUICheckbox,T.cmdk,T.ReactVirtuoso,T.RadixUIDropdownMenu,T.TipTapReact,T.TipTapExtensionList,T.TipTapExtensionSubscript,T.TipTapExtensionSuperscript,T.TipTapExtensionTable,T.TipTapExtensionTextAlign,T.TipTapExtensionTextStyle,T.TipTapStarterKit,T.TipTapExtensionImage,T.RadixUISeparator,T.RadixUIDialog,T.RadixUISwitch,T.RadixUIScrollArea,T.RadixUIRadioGroup,T.ReactDOM,T.RadixUIToggleGroup,T.RadixUIToggle,T.RadixUITabs,T.TanstackReactTable,T.RadixUIToast))})(this,(function(T,a,ft,p,pc,hc,mc,pt,ke,gc,fr,Y,qt,xa,bc,ye,yc,zt,de,va,xc,vc,Nc,Cc,ht,Sc,Tc,Ec,pr,Ac,kc,Ic,Mc,Dc,Pc,_c,qe,Fc){"use strict";var my=Object.defineProperty;var gy=(T,a,ft)=>a in T?my(T,a,{enumerable:!0,configurable:!0,writable:!0,value:ft}):T[a]=ft;var vn=(T,a,ft)=>gy(T,typeof a!="symbol"?a+"":a,ft);function pe(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const mt=pe(ft),v=pe(p),Qe=pe(mc),Na=pe(gc),$t=pe(fr),Ht=pe(qt),hr=pe(bc),ne=pe(zt),Ca=pe(Ec),Q=pe(pr),mr=pe(Ac),Re=pe(kc),Ut=pe(Ic),Vc=pe(Mc),Nn=pe(Dc),Sa=pe(Pc),et=pe(_c),Se=pe(Fc),Lc=hc.extendTailwindMerge({prefix:"wu-"});function f(...e){return Lc(pc.clsx(e))}const gr=e=>{window.open(e,"_blank","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600")};function Cn(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}function jt(e){switch(e){case"top":return"wu-flex-col-reverse";case"left":return"wu-flex-row-reverse wu-gap-2";case"right":return"wu-flex-row wu-gap-2";default:return""}}const Oc=e=>e?/\S+@questionpro\.com/.test(e):!1,Ta=Qe.Root,br=v.forwardRef(({className:e,...t},n)=>a.jsx(Qe.Item,{ref:n,className:f("wu-border-b",e),...t}));br.displayName="AccordionItem";const yr=v.forwardRef(({className:e,children:t,...n},r)=>a.jsx(Qe.Header,{className:"wu-flex",children:a.jsxs(Qe.Trigger,{ref:r,className:f("wu-flex wu-flex-1 wu-text-xs wu-items-center wu-justify-between wu-p-2 wu-transition-all","[&[data-state=open]>.wu-arrow-icon]:wu-rotate-180",e),...n,children:[t,a.jsx("span",{className:"wu-arrow-icon wm-keyboard-arrow-down wu-transition-transform wu-duration-200"})]})}));yr.displayName=Qe.Trigger.displayName;const xr=v.forwardRef(({className:e,children:t,...n},r)=>a.jsx(Qe.Content,{ref:r,className:"wu-overflow-hidden wu-text-xs wu-px-2 wu-font-light wu-transition-all data-[state=closed]:wu-animate-accordion-up data-[state=open]:wu-animate-accordion-down",...n,children:a.jsx("div",{className:f("wu-pb-4 wu-pt-0",e),children:t})}));xr.displayName=Qe.Content.displayName;const Wc=e=>{const{items:t,className:n,dir:r="ltr"}=e;if(e.type==="multiple"){const{defaultValue:s=[],value:o,onValueChange:i}=e;return a.jsx(Ta,{type:"multiple",className:"wu-w-full wu-accordion-container",defaultValue:s,value:o,onValueChange:i,dir:r,children:t.map(({value:u,Summary:l,Details:c,className:d})=>a.jsxs(br,{value:u,dir:r,className:f(n,d),children:[a.jsx(yr,{dir:r,className:"wu-accordion-summary",children:l}),a.jsx(xr,{dir:r,className:"wu-accordion-details",children:c})]},u))})}else{const{defaultValue:s,value:o,onValueChange:i}=e;return a.jsx(Ta,{type:"single",className:"wu-w-full wu-accordion-container",defaultValue:s,value:o,onValueChange:i,dir:r,collapsible:!0,children:t.map(({value:u,Summary:l,Details:c,className:d})=>a.jsxs(br,{value:u,dir:r,className:f(n,d),children:[a.jsx(yr,{dir:r,className:"wu-accordion-summary",children:l}),a.jsx(xr,{dir:r,className:"wu-accordion-details",children:c})]},u))})}},vr=v.forwardRef(({className:e,...t},n)=>a.jsx(mt.Root,{ref:n,className:f("wu-relative wu-flex wu-h-10 wu-w-10 wu-shrink-0 wu-overflow-hidden wu-rounded-full",e),...t}));vr.displayName=mt.Root.displayName;const Nr=v.forwardRef(({className:e,...t},n)=>a.jsx(mt.Image,{ref:n,className:f("wu-aspect-square wu-h-full wu-w-full",e),...t}));Nr.displayName=mt.Image.displayName;const Cr=v.forwardRef(({className:e,...t},n)=>a.jsx(mt.Fallback,{ref:n,className:f("wu-flex wu-h-full wu-w-full wu-items-center wu-justify-center wu-rounded-full wu-bg-muted",e),...t}));Cr.displayName=mt.Fallback.displayName;const we={timelineContainer:"_timelineContainer_1rtax_1",mainVerticalLine:"_mainVerticalLine_1rtax_5",dateGroup:"_dateGroup_1rtax_9",dateHeader:"_dateHeader_1rtax_13",dateDot:"_dateDot_1rtax_17",dateText:"_dateText_1rtax_21",logList:"_logList_1rtax_25",logItem:"_logItem_1rtax_29",timelineDotSmall:"_timelineDotSmall_1rtax_33",content:"_content_1rtax_37",time:"_time_1rtax_1",tags:"_tags_1rtax_45",tag:"_tag_1rtax_45",tagPrimary:"_tagPrimary_1rtax_53",tagSecondary:"_tagSecondary_1rtax_57",userActionRow:"_userActionRow_1rtax_61",avatar:"_avatar_1rtax_65",actionText:"_actionText_1rtax_69",userName:"_userName_1rtax_73"},Ye=(e,t)=>t.includes(".")?t.split(".").reduce((n,r)=>n==null?void 0:n[r],e):e==null?void 0:e[t],Bc=({log:e,accessorKey:t})=>{const n=Ye(e,t.time),r=Ye(e,t.userName),s=Ye(e,t.userInitials),o=Ye(e,t.userImage??""),i=Ye(e,t.tags??""),u=Ye(e,t.description);return a.jsxs("div",{className:we.logItem,"data-slot":"log-item",children:[a.jsx("div",{className:we.timelineDotSmall,"data-slot":"timeline-dot-small"}),a.jsxs("div",{className:we.content,"data-slot":"content",children:[a.jsx("div",{className:we.time,"data-slot":"time",children:n}),(i==null?void 0:i.length)>0&&a.jsx("div",{className:we.tags,"data-slot":"tags",children:i.map((l,c)=>a.jsx("span",{className:f(we.tag,c===0?we.tagPrimary:we.tagSecondary),"data-slot":"tag",children:l},l))}),a.jsxs("div",{className:we.userActionRow,"data-slot":"user-action-row",children:[a.jsxs(vr,{className:we.avatar,"data-slot":"avatar",children:[a.jsx(Nr,{src:o,alt:r,"data-slot":"log-user-avatar-image"}),a.jsx(Cr,{className:"wu-text-[10px] wu-bg-slate-400 wu-text-white","data-slot":"log-user-avatar-fallback",children:s})]}),a.jsxs("p",{className:we.actionText,"data-slot":"action-text",children:[a.jsx("span",{className:we.userName,"data-slot":"log-username",children:r})," ",u]})]})]})]})},qc=p.memo(Bc),zc=({logs:e,accessorKey:t,className:n,...r})=>{const s=p.useMemo(()=>e.reduce((o,i)=>{const u=Ye(i,t.date);return u&&(o[u]=o[u]||[],o[u].push(i)),o},{}),[e,t.date]);return a.jsxs("div",{className:f(we.timelineContainer,n),"data-slot":"timeline-container",...r,children:[a.jsx("div",{className:we.mainVerticalLine,"data-slot":"main-vertical-line"}),Object.entries(s).map(([o,i])=>a.jsxs("div",{className:we.dateGroup,"data-slot":"date-group",children:[a.jsxs("div",{className:we.dateHeader,"data-slot":"date-header",children:[a.jsx("div",{className:we.dateDot,"data-slot":"date-dot"}),a.jsx("span",{className:we.dateText,"data-slot":"date-text",children:o})]}),a.jsx("div",{className:we.logList,"data-slot":"log-list",children:i.map(u=>{const l=Ye(u,t.id);return a.jsx(qc,{log:u,accessorKey:t},l)})})]},o))]})};function Sr(e,t){p.useEffect(()=>{const n=r=>{Array.isArray(e)&&e.some(s=>!s.current||s.current.contains(r.target))||!Array.isArray(e)&&(!e.current||e.current.contains(r.target))||t(r)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}},[e,t])}const Tr={dropdownContainer:"_dropdownContainer_vvlo9_1",open:"_open_vvlo9_1",dropdownMenu:"_dropdownMenu_vvlo9_1"},Ea=({dir:e,Trigger:t,triggerClassName:n,DropdownContent:r,isAllowActiveStyle:s})=>{const[o,i]=p.useState(!1),u=p.useRef(null),l=p.useRef(null);Sr([u,l],()=>i(!1));const c=()=>{i(!o)};return a.jsx(a.Fragment,{children:a.jsx("div",{className:Tr.dropdownContainer,children:a.jsx("ul",{children:a.jsxs("li",{className:f("wu-flex wu-relative",o&&Tr.open),children:[a.jsx("button",{className:f("wu-w-8 wu-h-8 wu-rounded-full focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2 focus-visible:wu-ring-offset-gray-switcher",n,s&&o&&"wu-bg-white wu-text-blue-switcher"),onClick:d=>{d.preventDefault(),c()},ref:l,"aria-label":"dropdown-trigger",children:t}),a.jsx("div",{className:f(Tr.dropdownMenu,{open:o},e==="rtl"?"wu-left-[-10px] wu-top-[38px]":"wu-right-[-7px] wu-top-[38px]"),dir:e,ref:u,"aria-label":"user-menu",children:r})]})})})})},Er=ke.cva(["wu-inline-flex wu-items-center wu-justify-center wu-rounded","wu-whitespace-nowrap wu-leading-4 wu-text-sm wu-font-normal","wu-transition-colors wu-duration-300","focus:wu-outline-none focus-visible:wu-outline-2 focus-visible:wu-outline-offset-2","disabled:wu-cursor-not-allowed disabled:wu-bg-black/10 disabled:wu-text-gray-subtle disabled:wu-outline-gray-subtle"],{variants:{size:{md:["wu-p-2 wu-h-8 wu-min-w-[104px]","wu-text-sm"],sm:["wu-p-1 wu-h-6 wu-min-w-[90px]","wu-text-xs"],mobile:["wu-p-4 wu-h-10 wu-min-w-[104px]","wu-text-base"]},color:{primary:["wu-bg-blue-p hover:wu-bg-blue-pHoverDeep","wu-text-blue-p hover:wu-text-blue-q","wu-ring-1 wu-ring-blue-p hover:wu-ring-blue-pHoverDeep","focus-visible:wu-outline-blue-p/50"],upgrade:["wu-bg-orange-soft hover:wu-bg-orange-deep","wu-text-orange-deep hover:wu-text-orange-deep","wu-ring-1 wu-ring-orange-soft hover:wu-ring-orange-deep","focus-visible:wu-outline-orange-deep/50"],error:["wu-bg-red-deep hover:wu-bg-red-soft","wu-text-red-deep hover:wu-text-red-deep","wu-ring-1 wu-ring-red-deep hover:wu-ring-red-soft","focus-visible:wu-outline-red-deep/50"]},variant:{primary:["wu-text-white hover:wu-text-white","wu-ring-0"],secondary:["wu-bg-transparent hover:wu-bg-black hover:wu-bg-opacity-[0.04]","wu-ring-0"],outline:["wu-bg-white hover:wu-text-white","disabled:wu-bg-transparent disabled:wu-ring-gray-subtle"],rounded:["wu-text-white hover:wu-text-white","wu-ring-0 wu-rounded-full"],link:["wu-bg-transparent hover:wu-bg-transparent","disabled:wu-bg-transparent","hover:wu-underline wu-underline-offset-2","wu-min-w-[auto] wu-px-2","wu-ring-0","focus-visible:wu-outline-offset-0"],iconOnly:["wu-aspect-square","wu-p-2 wu-h-8 wu-w-8 wu-min-w-[auto]","wu-text-xl wu-leading-5","wu-bg-transparent wu-text-gray-lead","hover:wu-bg-black hover:wu-bg-opacity-[0.04]","focus-visible:wu-bg-black focus-visible:wu-bg-opacity-[0.04]","wu-ring-0","disabled:wu-grayscale disabled:wu-opacity-80"]}},defaultVariants:{variant:"primary",size:"md",color:"primary"},compoundVariants:[]}),gt=v.forwardRef(({className:e,variant:t,size:n,color:r,asChild:s=!1,...o},i)=>{const u=s?pt.Slot:"button";return a.jsx(u,{className:f(Er({size:n,color:r,variant:t,className:e})),ref:i,...o})});gt.displayName="Button";const bt=p.forwardRef((e,t)=>$c(e,t)),$c=(e,t)=>{const{size:n="md",color:r="#1B87E6",variant:s="dots",...o}=e,i=f("wu-w-[4em] wu-h-[1em] wu-inline-block wu-text-xs wu-relative wu-loader-dot-container");let u="7px";n==="sm"?u="7px":n==="md"?u="12px":n==="lg"?u="18px":typeof n=="string"&&(u=n);const l={backgroundColor:r,width:u,height:u},c=a.jsxs("div",{...o,ref:t,className:f("wu-flex wu-items-center wu-justify-center wu-gap-2 wu-w-fit",e.className),role:"status","aria-busy":"true",children:[a.jsx("div",{className:"wu-w-12 wu-h-12 wu-border-2 wu-rounded-full wu-animate-spin",style:{width:u,height:u,borderTopColor:r}}),e.message&&a.jsx("p",{className:"wu-inline-block wu-loader-message",children:e.message})]}),d=a.jsxs("div",{...o,ref:t,className:f("wu-flex wu-items-center wu-justify-center wu-gap-2 wu-w-fit",e.className),role:"alert","aria-busy":"true",children:[a.jsxs("ul",{className:i,style:{fontSize:u},role:"loader",children:[a.jsx("li",{className:"wu-dot wu-loader-dot",style:l}),a.jsx("li",{className:"wu-dot wu-loader-dot",style:l}),a.jsx("li",{className:"wu-dot wu-loader-dot",style:l}),a.jsx("li",{className:"wu-dot wu-loader-dot",style:l})]}),e.message&&a.jsx("p",{className:"wu-inline-block wu-loader-message",children:e.message})]});return a.jsx(a.Fragment,{children:s==="spinner"?c:d})};bt.displayName="WuLoader";const xe=p.forwardRef(({disabled:e,loading:t,variant:n="primary",size:r="md",Icon:s,iconPosition:o="left",children:i,floating:u,className:l,color:c="primary",selected:d,...w},h)=>{const m={primary:"#1986e688",upgrade:"#F5A300",error:"#ef444488"};return a.jsxs(gt,{...w,disabled:e,variant:n,size:r,className:f(u&&"wu-shadow-qp","wu-flex wu-items-center wu-justify-center wu-gap-2",o==="right"&&"wu-flex-row-reverse",t?"wu-cursor-not-allowed wu-ring-0":"",d&&"wu-bg-blue-p wu-bg-opacity-15 wu-text-blue-pHoverDeep wu-ring-0",c==="error"&&"hover:wu-text-maroon",l),color:c,style:{backgroundColor:t?m[c]:"",...w.style},ref:h,children:[!t&&s&&a.jsx(a.Fragment,{children:s}),t&&a.jsx(bt,{color:"#fff",size:"sm"}),!t&&i]})});xe.displayName="WuButton";const Hc=({onLogout:e,DataCenter:t})=>a.jsxs("section",{className:"wu-flex wu-justify-between wu-px-4 wu-py-4 wu-text-white wu-bg-gray-lead",children:[a.jsx("div",{className:"wu-flex-1 wu-flex wu-items-start",children:t}),a.jsx(xe,{variant:"outline",size:"sm",Icon:a.jsx("span",{className:"wm-logout"}),className:"wu-text-white wu-bg-transparent wu-ring-white hover:wu-bg-gray-10 hover:wu-text-gray-lead hover:wu-ring-gray-lead",onClick:e,"aria-label":"logout",children:"LOGOUT"})]}),Uc=({user:e,dir:t})=>{const n=[e!=null&&e.usage&&Object.keys(e.usage).length>0?{title:e.usage.title,url:e.usage.url,icon:"wm-bar-chart wu-text-base",node:a.jsxs("div",{className:"wu-flex wu-flex-col wu-items-center wu-w-20",children:[a.jsx("code",{className:"wu-font-medium",children:e.usage.collectedResponseCount||"0"}),a.jsx("span",{className:"wu-text-xs wu-font-normal",children:"Responses"})]})}:null,e!=null&&e.invoice&&Object.keys(e.invoice).length>0?{title:e.invoice.title,url:e.invoice.url,icon:"wm-attach-money wu-text-base wu-font-semibold",node:a.jsx("div",{className:"wu-flex wu-justify-center wu-items-center wu-w-20",children:a.jsx("code",{children:e.invoice.size})})}:null].filter(Boolean);return a.jsxs(a.Fragment,{children:[a.jsx("ul",{children:n.map(({title:r,url:s,icon:o,node:i},u)=>a.jsx("li",{className:u<n.length-1?"wu-border-b wu-border-gray-subtle":"",children:a.jsxs("a",{href:s,className:f("wu-flex items-center wu-justify-between wu-py-2 hover:wu-bg-gray-20 focus-within:wu-bg-gray-20 focus:wu-outline-none",t==="rtl"?"wu-pl-4":"wu-pr-4"),children:[a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2",children:[a.jsx("span",{className:f(o,"wu-w-12 wu-text-center")}),a.jsx("span",{children:r})]}),i]})},u))}),a.jsx("hr",{className:"wu-border-gray-subtle"})]})},jc=({settings:e,dir:t})=>a.jsxs(a.Fragment,{children:[a.jsx("hr",{className:"wu-border-gray-subtle"}),a.jsxs("section",{className:"wu-relative wu-flex wu-items-center wu-justify-start wu-gap-2",children:[a.jsx("span",{className:f("wu-absolute wm-settings wu-text-base",t==="rtl"?"wu-right-4":"wu-left-4")}),a.jsx("ul",{className:"wu-w-full",dir:t,children:e==null?void 0:e.map(n=>a.jsx("li",{tabIndex:-1,dir:t,children:a.jsx("a",{href:n.url,className:f("wu-inline-block wu-w-full wu-py-2 hover:wu-bg-gray-20 focus-within:wu-bg-gray-20 focus:wu-outline-none",t==="rtl"?"wu-pr-14 wu-text-right":"wu-pl-14"),children:n.title})},n.title))})]}),a.jsx("hr",{className:"wu-border-gray-subtle"})]}),Gc=({user:e,dir:t})=>{var n,r,s,o,i,u,l,c,d;return a.jsxs("section",{className:f("wu-flex wu-gap-2 wu-p-4 wu-w-full",t==="rtl"?"wu-pr-0":"wu-pl-0"),children:[a.jsx("div",{className:"wu-flex wu-items-center wu-justify-center wu-w-12",children:a.jsx("span",{className:"wu-text-base wm-person"})}),a.jsxs("div",{className:f("wu-flex wu-flex-col wu-gap-1",t==="rtl"&&"wu-text-right"),children:[a.jsx("p",{children:(n=e==null?void 0:e.profile)==null?void 0:n.title}),a.jsxs("a",{href:(r=e==null?void 0:e.license)==null?void 0:r.url,className:"hover:wu-text-blue-p wu-group/license focus:wu-outline-none focus:wu-text-blue-p",dir:t,children:[a.jsx("p",{children:(s=e==null?void 0:e.profile)==null?void 0:s.subtitle}),a.jsx("p",{className:"wu-font-light",children:(o=e==null?void 0:e.profile)==null?void 0:o.companyName})]}),(e==null?void 0:e.license)&&Object.keys(e.license).length>0&&a.jsxs("div",{className:"wu-flex wu-items-center wu-justify-between wu-gap-6 wu-mt-3",dir:t,children:[a.jsx("a",{href:(i=e==null?void 0:e.license)==null?void 0:i.url,className:"hover:wu-text-blue-p wu-group/license focus:wu-outline-none focus:wu-text-blue-p",children:a.jsxs("div",{className:"wu-flex wu-flex-col wu-items-start wu-gap-1",children:[a.jsx("p",{className:"wu-font-normal",children:(u=e==null?void 0:e.license)==null?void 0:u.subtitle}),a.jsx("button",{tabIndex:-1,className:"wu-px-3 wu-py-1 wu-border wu-rounded-sm wu-border-gray-subtle group-hover/license:wu-border-blue-p",children:(l=e==null?void 0:e.license)==null?void 0:l.title})]})}),a.jsxs("div",{className:"wu-flex wu-flex-col wu-items-start wu-gap-1",dir:t,children:[a.jsx("p",{className:"wu-font-normal",children:(c=e==null?void 0:e.license)==null?void 0:c.expiryDatePostFixString}),a.jsx("p",{children:(d=e==null?void 0:e.license)==null?void 0:d.expiryDate})]})]})]})]})},Aa=({user:e,onLogout:t,dir:n,DataCenter:r})=>{var s,o;return e?a.jsx(Ea,{Trigger:a.jsxs(vr,{className:f("wu-group wu-border wu-border-white wu-text-sm wu-font-medium wu-bg-transparent wu-w-8 wu-h-8 wu-ring-white wu-leading-[33px] wu-text-white wu-transition-colors hover:wu-bg-white hover:wu-text-gray-switcher wu-header-user-avatar"),children:[a.jsx(Nr,{className:"hover:wu-opacity-80",src:(s=e==null?void 0:e.profile)==null?void 0:s.profilePicture,alt:"User"}),a.jsx(Cr,{children:(o=e==null?void 0:e.profile)==null?void 0:o.initials})]}),dir:n,triggerClassName:"wu-rounded-full focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2 focus-visible:wu-ring-offset-gray-switcher wu-w-8 wu-h-8 wu-app-user-button",DropdownContent:a.jsxs("div",{className:f("wu-p-0 wu-text-xs wu-font-medium wu-border wu-rounded-none wu-min-w-72 wu-w-max wu-max-w-96 wu-border-gray-subtle wu-text-gray-lead wu-overflow-hidden wu-bg-white"),dir:n,children:[a.jsx(Gc,{user:e,dir:n}),(e==null?void 0:e.settings)&&e.settings.length>0&&a.jsx(jc,{settings:e.settings,dir:n}),a.jsx(Uc,{user:e,dir:n}),a.jsx(Hc,{onLogout:t,DataCenter:r})]})}):null},ka=({menuList:e,dir:t})=>{const n=[{icon:"wm-help",title:"Help center",subTitle:"Knowledge Base",link:"https://www.questionpro.com/help/"},{icon:"wm-live-tv",title:"Free training",subTitle:"Webinar",link:"https://www.questionpro.com/training"},{icon:"wm-local-fire-department",title:"Updates",subTitle:"What's new!",link:"https://www.questionpro.com/updates/"},{icon:"wm-support-agent",title:"Live support",subTitle:"Support",link:"https://www.questionpro.com/a/liveperson.do?mode=launch&pageMode=quickChat",target:"window"},{icon:"wm-book-2",title:"Org wiki",subTitle:"wiki",link:"https://www.questionpro.com/a/liveperson.do?mode=launch&pageMode=quickChat",target:"window"}];return a.jsx(Ea,{dir:t,Trigger:a.jsx("span",{className:"wm-question-mark wu-text-base"}),triggerClassName:"wu-w-8 wu-h-8 wu-flex wu-items-center wu-justify-center wu-rounded-full wu-border wu-border-white focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2 focus-visible:wu-ring-offset-gray-switcher wu-text-white wu-transition-colors hover:wu-bg-white hover:wu-text-blue-switcher wu-app-header-help",isAllowActiveStyle:!0,DropdownContent:a.jsx("ul",{children:(e||n).map((r,s)=>a.jsx("li",{className:"wu-p-0 wu-w-[136px]",dir:t,children:r.target==="window"?a.jsx("a",{tabIndex:0,rel:"noopener noreferrer",onClick:()=>gr(r.link),onKeyDown:o=>{o.key==="Enter"&&gr(r.link)},className:`wu-block wu-w-full wu-h-full wu-px-3 wu-py-2 hover:wu-bg-black hover:wu-bg-opacity-[.04] focus-visible:wu-border-none focus-visible:wu-bg-black
|
|
2
|
-
focus-visible:wu-bg-opacity-[.04] focus-visible:wu-ring-0 focus-visible:wu-outline-none focus-visible:wu-ring-offset-0 wu-cursor-pointer`,children:a.jsx(
|
|
1
|
+
(function(T,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("react/jsx-runtime"),require("@radix-ui/react-avatar"),require("react"),require("clsx"),require("tailwind-merge"),require("@radix-ui/react-accordion"),require("@radix-ui/react-slot"),require("class-variance-authority"),require("@radix-ui/react-label"),require("@radix-ui/react-tooltip"),require("date-fns"),require("@radix-ui/react-popover"),require("react-day-picker"),require("@radix-ui/react-checkbox"),require("cmdk"),require("react-virtuoso"),require("@radix-ui/react-dropdown-menu"),require("@tiptap/react"),require("@tiptap/extension-list"),require("@tiptap/extension-subscript"),require("@tiptap/extension-superscript"),require("@tiptap/extension-table"),require("@tiptap/extension-text-align"),require("@tiptap/extension-text-style"),require("@tiptap/starter-kit"),require("@tiptap/extension-image"),require("@radix-ui/react-separator"),require("@radix-ui/react-dialog"),require("@radix-ui/react-switch"),require("@radix-ui/react-scroll-area"),require("@radix-ui/react-radio-group"),require("react-dom"),require("@radix-ui/react-toggle-group"),require("@radix-ui/react-toggle"),require("@radix-ui/react-tabs"),require("@tanstack/react-table"),require("@radix-ui/react-toast")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@radix-ui/react-avatar","react","clsx","tailwind-merge","@radix-ui/react-accordion","@radix-ui/react-slot","class-variance-authority","@radix-ui/react-label","@radix-ui/react-tooltip","date-fns","@radix-ui/react-popover","react-day-picker","@radix-ui/react-checkbox","cmdk","react-virtuoso","@radix-ui/react-dropdown-menu","@tiptap/react","@tiptap/extension-list","@tiptap/extension-subscript","@tiptap/extension-superscript","@tiptap/extension-table","@tiptap/extension-text-align","@tiptap/extension-text-style","@tiptap/starter-kit","@tiptap/extension-image","@radix-ui/react-separator","@radix-ui/react-dialog","@radix-ui/react-switch","@radix-ui/react-scroll-area","@radix-ui/react-radio-group","react-dom","@radix-ui/react-toggle-group","@radix-ui/react-toggle","@radix-ui/react-tabs","@tanstack/react-table","@radix-ui/react-toast"],a):(T=typeof globalThis<"u"?globalThis:T||self,a(T["wick-ui-lib"]={},T["react/jsx-runtime"],T.RadixUIAvatar,T.React,T.clsx,T.tailwindMerge,T.RadixUIAccordion,T.RadixUISlot,T.ClassVarianceAuthority,T.RadixUILabel,T.RadixUITooltip,T.dateFns,T.RadixUIPopover,T.ReactDayPicker,T.RadixUICheckbox,T.cmdk,T.ReactVirtuoso,T.RadixUIDropdownMenu,T.TipTapReact,T.TipTapExtensionList,T.TipTapExtensionSubscript,T.TipTapExtensionSuperscript,T.TipTapExtensionTable,T.TipTapExtensionTextAlign,T.TipTapExtensionTextStyle,T.TipTapStarterKit,T.TipTapExtensionImage,T.RadixUISeparator,T.RadixUIDialog,T.RadixUISwitch,T.RadixUIScrollArea,T.RadixUIRadioGroup,T.ReactDOM,T.RadixUIToggleGroup,T.RadixUIToggle,T.RadixUITabs,T.TanstackReactTable,T.RadixUIToast))})(this,(function(T,a,ft,p,hc,mc,gc,pt,ke,bc,pr,Y,qt,va,yc,ye,xc,zt,de,Na,vc,Nc,Cc,Sc,ht,Tc,Ec,Ac,hr,kc,Ic,Mc,Dc,Pc,_c,Fc,qe,Vc){"use strict";var gy=Object.defineProperty;var by=(T,a,ft)=>a in T?gy(T,a,{enumerable:!0,configurable:!0,writable:!0,value:ft}):T[a]=ft;var vn=(T,a,ft)=>by(T,typeof a!="symbol"?a+"":a,ft);function pe(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const mt=pe(ft),v=pe(p),Qe=pe(gc),Ca=pe(bc),$t=pe(pr),Ht=pe(qt),mr=pe(yc),ne=pe(zt),Sa=pe(Ac),Q=pe(hr),gr=pe(kc),Re=pe(Ic),Ut=pe(Mc),Lc=pe(Dc),Nn=pe(Pc),Ta=pe(_c),et=pe(Fc),Se=pe(Vc),Oc=mc.extendTailwindMerge({prefix:"wu-"});function f(...e){return Oc(hc.clsx(e))}const br=e=>{window.open(e,"_blank","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600")};function Cn(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}function jt(e){switch(e){case"top":return"wu-flex-col-reverse";case"left":return"wu-flex-row-reverse wu-gap-2";case"right":return"wu-flex-row wu-gap-2";default:return""}}const Wc=e=>e?/\S+@questionpro\.com/.test(e):!1,Ea=Qe.Root,yr=v.forwardRef(({className:e,...t},n)=>a.jsx(Qe.Item,{ref:n,className:f("wu-border-b",e),...t}));yr.displayName="AccordionItem";const xr=v.forwardRef(({className:e,children:t,...n},r)=>a.jsx(Qe.Header,{className:"wu-flex",children:a.jsxs(Qe.Trigger,{ref:r,className:f("wu-flex wu-flex-1 wu-text-xs wu-items-center wu-justify-between wu-p-2 wu-transition-all","[&[data-state=open]>.wu-arrow-icon]:wu-rotate-180",e),...n,children:[t,a.jsx("span",{className:"wu-arrow-icon wm-keyboard-arrow-down wu-transition-transform wu-duration-200"})]})}));xr.displayName=Qe.Trigger.displayName;const vr=v.forwardRef(({className:e,children:t,...n},r)=>a.jsx(Qe.Content,{ref:r,className:"wu-overflow-hidden wu-text-xs wu-px-2 wu-font-light wu-transition-all data-[state=closed]:wu-animate-accordion-up data-[state=open]:wu-animate-accordion-down",...n,children:a.jsx("div",{className:f("wu-pb-4 wu-pt-0",e),children:t})}));vr.displayName=Qe.Content.displayName;const Bc=e=>{const{items:t,className:n,dir:r="ltr"}=e;if(e.type==="multiple"){const{defaultValue:s=[],value:o,onValueChange:i}=e;return a.jsx(Ea,{type:"multiple",className:"wu-w-full wu-accordion-container",defaultValue:s,value:o,onValueChange:i,dir:r,children:t.map(({value:u,Summary:l,Details:c,className:d})=>a.jsxs(yr,{value:u,dir:r,className:f(n,d),children:[a.jsx(xr,{dir:r,className:"wu-accordion-summary",children:l}),a.jsx(vr,{dir:r,className:"wu-accordion-details",children:c})]},u))})}else{const{defaultValue:s,value:o,onValueChange:i}=e;return a.jsx(Ea,{type:"single",className:"wu-w-full wu-accordion-container",defaultValue:s,value:o,onValueChange:i,dir:r,collapsible:!0,children:t.map(({value:u,Summary:l,Details:c,className:d})=>a.jsxs(yr,{value:u,dir:r,className:f(n,d),children:[a.jsx(xr,{dir:r,className:"wu-accordion-summary",children:l}),a.jsx(vr,{dir:r,className:"wu-accordion-details",children:c})]},u))})}},Nr=v.forwardRef(({className:e,...t},n)=>a.jsx(mt.Root,{ref:n,className:f("wu-relative wu-flex wu-h-10 wu-w-10 wu-shrink-0 wu-overflow-hidden wu-rounded-full",e),...t}));Nr.displayName=mt.Root.displayName;const Cr=v.forwardRef(({className:e,...t},n)=>a.jsx(mt.Image,{ref:n,className:f("wu-aspect-square wu-h-full wu-w-full",e),...t}));Cr.displayName=mt.Image.displayName;const Sr=v.forwardRef(({className:e,...t},n)=>a.jsx(mt.Fallback,{ref:n,className:f("wu-flex wu-h-full wu-w-full wu-items-center wu-justify-center wu-rounded-full wu-bg-muted",e),...t}));Sr.displayName=mt.Fallback.displayName;const we={timelineContainer:"_timelineContainer_1rtax_1",mainVerticalLine:"_mainVerticalLine_1rtax_5",dateGroup:"_dateGroup_1rtax_9",dateHeader:"_dateHeader_1rtax_13",dateDot:"_dateDot_1rtax_17",dateText:"_dateText_1rtax_21",logList:"_logList_1rtax_25",logItem:"_logItem_1rtax_29",timelineDotSmall:"_timelineDotSmall_1rtax_33",content:"_content_1rtax_37",time:"_time_1rtax_1",tags:"_tags_1rtax_45",tag:"_tag_1rtax_45",tagPrimary:"_tagPrimary_1rtax_53",tagSecondary:"_tagSecondary_1rtax_57",userActionRow:"_userActionRow_1rtax_61",avatar:"_avatar_1rtax_65",actionText:"_actionText_1rtax_69",userName:"_userName_1rtax_73"},Ye=(e,t)=>t.includes(".")?t.split(".").reduce((n,r)=>n==null?void 0:n[r],e):e==null?void 0:e[t],qc=({log:e,accessorKey:t})=>{const n=Ye(e,t.time),r=Ye(e,t.userName),s=Ye(e,t.userInitials),o=Ye(e,t.userImage??""),i=Ye(e,t.tags??""),u=Ye(e,t.description);return a.jsxs("div",{className:we.logItem,"data-slot":"log-item",children:[a.jsx("div",{className:we.timelineDotSmall,"data-slot":"timeline-dot-small"}),a.jsxs("div",{className:we.content,"data-slot":"content",children:[a.jsx("div",{className:we.time,"data-slot":"time",children:n}),(i==null?void 0:i.length)>0&&a.jsx("div",{className:we.tags,"data-slot":"tags",children:i.map((l,c)=>a.jsx("span",{className:f(we.tag,c===0?we.tagPrimary:we.tagSecondary),"data-slot":"tag",children:l},l))}),a.jsxs("div",{className:we.userActionRow,"data-slot":"user-action-row",children:[a.jsxs(Nr,{className:we.avatar,"data-slot":"avatar",children:[a.jsx(Cr,{src:o,alt:r,"data-slot":"log-user-avatar-image"}),a.jsx(Sr,{className:"wu-text-[10px] wu-bg-slate-400 wu-text-white","data-slot":"log-user-avatar-fallback",children:s})]}),a.jsxs("p",{className:we.actionText,"data-slot":"action-text",children:[a.jsx("span",{className:we.userName,"data-slot":"log-username",children:r})," ",u]})]})]})]})},zc=p.memo(qc),$c=({logs:e,accessorKey:t,className:n,...r})=>{const s=p.useMemo(()=>e.reduce((o,i)=>{const u=Ye(i,t.date);return u&&(o[u]=o[u]||[],o[u].push(i)),o},{}),[e,t.date]);return a.jsxs("div",{className:f(we.timelineContainer,n),"data-slot":"timeline-container",...r,children:[a.jsx("div",{className:we.mainVerticalLine,"data-slot":"main-vertical-line"}),Object.entries(s).map(([o,i])=>a.jsxs("div",{className:we.dateGroup,"data-slot":"date-group",children:[a.jsxs("div",{className:we.dateHeader,"data-slot":"date-header",children:[a.jsx("div",{className:we.dateDot,"data-slot":"date-dot"}),a.jsx("span",{className:we.dateText,"data-slot":"date-text",children:o})]}),a.jsx("div",{className:we.logList,"data-slot":"log-list",children:i.map(u=>{const l=Ye(u,t.id);return a.jsx(zc,{log:u,accessorKey:t},l)})})]},o))]})};function Tr(e,t){p.useEffect(()=>{const n=r=>{Array.isArray(e)&&e.some(s=>!s.current||s.current.contains(r.target))||!Array.isArray(e)&&(!e.current||e.current.contains(r.target))||t(r)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}},[e,t])}const Er={dropdownContainer:"_dropdownContainer_vvlo9_1",open:"_open_vvlo9_1",dropdownMenu:"_dropdownMenu_vvlo9_1"},Aa=({dir:e,Trigger:t,triggerClassName:n,DropdownContent:r,isAllowActiveStyle:s})=>{const[o,i]=p.useState(!1),u=p.useRef(null),l=p.useRef(null);Tr([u,l],()=>i(!1));const c=()=>{i(!o)};return a.jsx(a.Fragment,{children:a.jsx("div",{className:Er.dropdownContainer,children:a.jsx("ul",{children:a.jsxs("li",{className:f("wu-flex wu-relative",o&&Er.open),children:[a.jsx("button",{className:f("wu-w-8 wu-h-8 wu-rounded-full focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2 focus-visible:wu-ring-offset-gray-switcher",n,s&&o&&"wu-bg-white wu-text-blue-switcher"),onClick:d=>{d.preventDefault(),c()},ref:l,"aria-label":"dropdown-trigger",children:t}),a.jsx("div",{className:f(Er.dropdownMenu,{open:o},e==="rtl"?"wu-left-[-10px] wu-top-[38px]":"wu-right-[-7px] wu-top-[38px]"),dir:e,ref:u,"aria-label":"user-menu",children:r})]})})})})},Ar=ke.cva(["wu-inline-flex wu-items-center wu-justify-center wu-rounded","wu-whitespace-nowrap wu-text-sm wu-leading-normal wu-font-normal","wu-transition-colors wu-duration-300","focus:wu-outline-none focus-visible:wu-outline-2 focus-visible:wu-outline-offset-2","disabled:wu-cursor-not-allowed disabled:wu-bg-black/10 disabled:wu-text-gray-subtle disabled:wu-outline-gray-subtle"],{variants:{size:{md:["wu-p-2 wu-h-8 wu-min-w-[104px]","wu-text-sm wu-leading-normal"],sm:["wu-p-1 wu-h-6 wu-min-w-[90px]","wu-text-xs"],mobile:["wu-p-4 wu-h-10 wu-min-w-[104px] wu-rounded-lg","wu-text-base"]},color:{primary:["wu-bg-blue-p hover:wu-bg-blue-pHoverDeep","wu-text-blue-p hover:wu-text-blue-q","wu-ring-1 wu-ring-blue-p hover:wu-ring-blue-pHoverDeep","focus-visible:wu-outline-blue-p/50"],upgrade:["wu-bg-orange-soft hover:wu-bg-orange-deep","wu-text-orange-deep hover:wu-text-orange-deep","wu-ring-1 wu-ring-orange-soft hover:wu-ring-orange-deep","focus-visible:wu-outline-orange-deep/50"],error:["wu-bg-red-deep hover:wu-bg-red-soft","wu-text-red-deep hover:wu-text-red-deep","wu-ring-1 wu-ring-red-deep hover:wu-ring-red-soft","focus-visible:wu-outline-red-deep/50"]},variant:{primary:["wu-text-white hover:wu-text-white","wu-ring-0"],secondary:["wu-bg-transparent hover:wu-bg-black hover:wu-bg-opacity-[0.04]","wu-ring-0"],outline:["wu-bg-white hover:wu-text-white","disabled:wu-bg-transparent disabled:wu-ring-gray-subtle"],rounded:["wu-text-white hover:wu-text-white","wu-ring-0 wu-rounded-full"],link:["wu-bg-transparent hover:wu-bg-transparent","disabled:wu-bg-transparent","hover:wu-underline wu-underline-offset-2","wu-min-w-[auto] wu-px-2","wu-ring-0","focus-visible:wu-outline-offset-0"],iconOnly:["wu-aspect-square","wu-p-2 wu-h-8 wu-w-8 wu-min-w-[auto]","wu-text-xl wu-leading-5","wu-bg-transparent wu-text-gray-lead","hover:wu-bg-black hover:wu-bg-opacity-[0.04]","focus-visible:wu-bg-black focus-visible:wu-bg-opacity-[0.04]","wu-ring-0","disabled:wu-grayscale disabled:wu-opacity-80"]}},defaultVariants:{variant:"primary",size:"md",color:"primary"},compoundVariants:[]}),gt=v.forwardRef(({className:e,variant:t,size:n,color:r,asChild:s=!1,...o},i)=>{const u=s?pt.Slot:"button";return a.jsx(u,{className:f(Ar({size:n,color:r,variant:t,className:e})),ref:i,...o})});gt.displayName="Button";const bt=p.forwardRef((e,t)=>Hc(e,t)),Hc=(e,t)=>{const{size:n="md",color:r="#1B87E6",variant:s="dots",...o}=e,i=f("wu-w-[4em] wu-h-[1em] wu-inline-block wu-text-xs wu-relative wu-loader-dot-container");let u="7px";n==="sm"?u="7px":n==="md"?u="12px":n==="lg"?u="18px":typeof n=="string"&&(u=n);const l={backgroundColor:r,width:u,height:u},c=a.jsxs("div",{...o,ref:t,className:f("wu-flex wu-items-center wu-justify-center wu-gap-2 wu-w-fit",e.className),role:"status","aria-busy":"true",children:[a.jsx("div",{className:"wu-w-12 wu-h-12 wu-border-2 wu-rounded-full wu-animate-spin",style:{width:u,height:u,borderTopColor:r}}),e.message&&a.jsx("p",{className:"wu-inline-block wu-loader-message",children:e.message})]}),d=a.jsxs("div",{...o,ref:t,className:f("wu-flex wu-items-center wu-justify-center wu-gap-2 wu-w-fit",e.className),role:"alert","aria-busy":"true",children:[a.jsxs("ul",{className:i,style:{fontSize:u},role:"loader",children:[a.jsx("li",{className:"wu-dot wu-loader-dot",style:l}),a.jsx("li",{className:"wu-dot wu-loader-dot",style:l}),a.jsx("li",{className:"wu-dot wu-loader-dot",style:l}),a.jsx("li",{className:"wu-dot wu-loader-dot",style:l})]}),e.message&&a.jsx("p",{className:"wu-inline-block wu-loader-message",children:e.message})]});return a.jsx(a.Fragment,{children:s==="spinner"?c:d})};bt.displayName="WuLoader";const xe=p.forwardRef(({disabled:e,loading:t,variant:n="primary",size:r="md",Icon:s,iconPosition:o="left",children:i,floating:u,className:l,color:c="primary",selected:d,...w},h)=>{const m={primary:"#1986e688",upgrade:"#F5A300",error:"#ef444488"};return a.jsxs(gt,{...w,disabled:e,variant:n,size:r,className:f(u&&"wu-shadow-qp","wu-flex wu-items-center wu-justify-center wu-gap-2",o==="right"&&"wu-flex-row-reverse",t?"wu-cursor-not-allowed wu-ring-0":"",d&&"wu-bg-blue-p wu-bg-opacity-15 wu-text-blue-pHoverDeep wu-ring-0",c==="error"&&"hover:wu-text-maroon",l),color:c,style:{backgroundColor:t?m[c]:"",...w.style},ref:h,children:[!t&&s&&a.jsx(a.Fragment,{children:s}),t&&a.jsx(bt,{color:"#fff",size:"sm"}),!t&&i]})});xe.displayName="WuButton";const Uc=({onLogout:e,DataCenter:t})=>a.jsxs("section",{className:"wu-flex wu-justify-between wu-px-4 wu-py-4 wu-text-white wu-bg-gray-lead",children:[a.jsx("div",{className:"wu-flex-1 wu-flex wu-items-start",children:t}),a.jsx(xe,{variant:"outline",size:"sm",Icon:a.jsx("span",{className:"wm-logout"}),className:"wu-text-white wu-bg-transparent wu-ring-white hover:wu-bg-gray-10 hover:wu-text-gray-lead hover:wu-ring-gray-lead",onClick:e,"aria-label":"logout",children:"LOGOUT"})]}),jc=({user:e,dir:t})=>{const n=[e!=null&&e.usage&&Object.keys(e.usage).length>0?{title:e.usage.title,url:e.usage.url,icon:"wm-bar-chart wu-text-base",node:a.jsxs("div",{className:"wu-flex wu-flex-col wu-items-center wu-w-20",children:[a.jsx("code",{className:"wu-font-medium",children:e.usage.collectedResponseCount||"0"}),a.jsx("span",{className:"wu-text-xs wu-font-normal",children:"Responses"})]})}:null,e!=null&&e.invoice&&Object.keys(e.invoice).length>0?{title:e.invoice.title,url:e.invoice.url,icon:"wm-attach-money wu-text-base wu-font-semibold",node:a.jsx("div",{className:"wu-flex wu-justify-center wu-items-center wu-w-20",children:a.jsx("code",{children:e.invoice.size})})}:null].filter(Boolean);return a.jsxs(a.Fragment,{children:[a.jsx("ul",{children:n.map(({title:r,url:s,icon:o,node:i},u)=>a.jsx("li",{className:u<n.length-1?"wu-border-b wu-border-gray-subtle":"",children:a.jsxs("a",{href:s,className:f("wu-flex items-center wu-justify-between wu-py-2 hover:wu-bg-gray-20 focus-within:wu-bg-gray-20 focus:wu-outline-none",t==="rtl"?"wu-pl-4":"wu-pr-4"),children:[a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2",children:[a.jsx("span",{className:f(o,"wu-w-12 wu-text-center")}),a.jsx("span",{children:r})]}),i]})},u))}),a.jsx("hr",{className:"wu-border-gray-subtle"})]})},Gc=({settings:e,dir:t})=>a.jsxs(a.Fragment,{children:[a.jsx("hr",{className:"wu-border-gray-subtle"}),a.jsxs("section",{className:"wu-relative wu-flex wu-items-center wu-justify-start wu-gap-2",children:[a.jsx("span",{className:f("wu-absolute wm-settings wu-text-base",t==="rtl"?"wu-right-4":"wu-left-4")}),a.jsx("ul",{className:"wu-w-full",dir:t,children:e==null?void 0:e.map(n=>a.jsx("li",{tabIndex:-1,dir:t,children:a.jsx("a",{href:n.url,className:f("wu-inline-block wu-w-full wu-py-2 hover:wu-bg-gray-20 focus-within:wu-bg-gray-20 focus:wu-outline-none",t==="rtl"?"wu-pr-14 wu-text-right":"wu-pl-14"),children:n.title})},n.title))})]}),a.jsx("hr",{className:"wu-border-gray-subtle"})]}),Kc=({user:e,dir:t})=>{var n,r,s,o,i,u,l,c,d;return a.jsxs("section",{className:f("wu-flex wu-gap-2 wu-p-4 wu-w-full",t==="rtl"?"wu-pr-0":"wu-pl-0"),children:[a.jsx("div",{className:"wu-flex wu-items-center wu-justify-center wu-w-12",children:a.jsx("span",{className:"wu-text-base wm-person"})}),a.jsxs("div",{className:f("wu-flex wu-flex-col wu-gap-1",t==="rtl"&&"wu-text-right"),children:[a.jsx("p",{children:(n=e==null?void 0:e.profile)==null?void 0:n.title}),a.jsxs("a",{href:(r=e==null?void 0:e.license)==null?void 0:r.url,className:"hover:wu-text-blue-p wu-group/license focus:wu-outline-none focus:wu-text-blue-p",dir:t,children:[a.jsx("p",{children:(s=e==null?void 0:e.profile)==null?void 0:s.subtitle}),a.jsx("p",{className:"wu-font-light",children:(o=e==null?void 0:e.profile)==null?void 0:o.companyName})]}),(e==null?void 0:e.license)&&Object.keys(e.license).length>0&&a.jsxs("div",{className:"wu-flex wu-items-center wu-justify-between wu-gap-6 wu-mt-3",dir:t,children:[a.jsx("a",{href:(i=e==null?void 0:e.license)==null?void 0:i.url,className:"hover:wu-text-blue-p wu-group/license focus:wu-outline-none focus:wu-text-blue-p",children:a.jsxs("div",{className:"wu-flex wu-flex-col wu-items-start wu-gap-1",children:[a.jsx("p",{className:"wu-font-normal",children:(u=e==null?void 0:e.license)==null?void 0:u.subtitle}),a.jsx("button",{tabIndex:-1,className:"wu-px-3 wu-py-1 wu-border wu-rounded-sm wu-border-gray-subtle group-hover/license:wu-border-blue-p",children:(l=e==null?void 0:e.license)==null?void 0:l.title})]})}),a.jsxs("div",{className:"wu-flex wu-flex-col wu-items-start wu-gap-1",dir:t,children:[a.jsx("p",{className:"wu-font-normal",children:(c=e==null?void 0:e.license)==null?void 0:c.expiryDatePostFixString}),a.jsx("p",{children:(d=e==null?void 0:e.license)==null?void 0:d.expiryDate})]})]})]})]})},ka=({user:e,onLogout:t,dir:n,DataCenter:r})=>{var s,o;return e?a.jsx(Aa,{Trigger:a.jsxs(Nr,{className:f("wu-group wu-border wu-border-white wu-text-sm wu-font-medium wu-bg-transparent wu-w-8 wu-h-8 wu-ring-white wu-leading-[33px] wu-text-white wu-transition-colors hover:wu-bg-white hover:wu-text-gray-switcher wu-header-user-avatar"),children:[a.jsx(Cr,{className:"hover:wu-opacity-80",src:(s=e==null?void 0:e.profile)==null?void 0:s.profilePicture,alt:"User"}),a.jsx(Sr,{children:(o=e==null?void 0:e.profile)==null?void 0:o.initials})]}),dir:n,triggerClassName:"wu-rounded-full focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2 focus-visible:wu-ring-offset-gray-switcher wu-w-8 wu-h-8 wu-app-user-button",DropdownContent:a.jsxs("div",{className:f("wu-p-0 wu-text-xs wu-font-medium wu-border wu-rounded-none wu-min-w-72 wu-w-max wu-max-w-96 wu-border-gray-subtle wu-text-gray-lead wu-overflow-hidden wu-bg-white"),dir:n,children:[a.jsx(Kc,{user:e,dir:n}),(e==null?void 0:e.settings)&&e.settings.length>0&&a.jsx(Gc,{settings:e.settings,dir:n}),a.jsx(jc,{user:e,dir:n}),a.jsx(Uc,{onLogout:t,DataCenter:r})]})}):null},Ia=({menuList:e,dir:t})=>{const n=[{icon:"wm-help",title:"Help center",subTitle:"Knowledge Base",link:"https://www.questionpro.com/help/"},{icon:"wm-live-tv",title:"Free training",subTitle:"Webinar",link:"https://www.questionpro.com/training"},{icon:"wm-local-fire-department",title:"Updates",subTitle:"What's new!",link:"https://www.questionpro.com/updates/"},{icon:"wm-support-agent",title:"Live support",subTitle:"Support",link:"https://www.questionpro.com/a/liveperson.do?mode=launch&pageMode=quickChat",target:"window"},{icon:"wm-book-2",title:"Org wiki",subTitle:"wiki",link:"https://www.questionpro.com/a/liveperson.do?mode=launch&pageMode=quickChat",target:"window"}];return a.jsx(Aa,{dir:t,Trigger:a.jsx("span",{className:"wm-question-mark wu-text-base"}),triggerClassName:"wu-w-8 wu-h-8 wu-flex wu-items-center wu-justify-center wu-rounded-full wu-border wu-border-white focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2 focus-visible:wu-ring-offset-gray-switcher wu-text-white wu-transition-colors hover:wu-bg-white hover:wu-text-blue-switcher wu-app-header-help",isAllowActiveStyle:!0,DropdownContent:a.jsx("ul",{children:(e||n).map((r,s)=>a.jsx("li",{className:"wu-p-0 wu-w-[136px]",dir:t,children:r.target==="window"?a.jsx("a",{tabIndex:0,rel:"noopener noreferrer",onClick:()=>br(r.link),onKeyDown:o=>{o.key==="Enter"&&br(r.link)},className:`wu-block wu-w-full wu-h-full wu-px-3 wu-py-2 hover:wu-bg-black hover:wu-bg-opacity-[.04] focus-visible:wu-border-none focus-visible:wu-bg-black
|
|
2
|
+
focus-visible:wu-bg-opacity-[.04] focus-visible:wu-ring-0 focus-visible:wu-outline-none focus-visible:wu-ring-offset-0 wu-cursor-pointer`,children:a.jsx(Ma,{item:r,dir:t})}):a.jsx("a",{href:r.link,target:"_blank",className:`wu-block wu-w-full wu-h-full wu-px-3 wu-py-2 hover:wu-bg-black hover:wu-bg-opacity-[0.04] focus-visible:wu-border-none
|
|
3
3
|
focus-visible:wu-bg-black
|
|
4
|
-
focus-visible:wu-bg-opacity-[.04] focus-visible:wu-ring-0 focus-visible:wu-outline-none focus-visible:wu-ring-offset-0`,rel:"noreferrer",children:a.jsx(Ia,{item:r,dir:t})})},s))})})},Ia=({item:e,dir:t})=>a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-[5px]",dir:t,children:[a.jsx("div",{className:"wu-flex wu-items-center wu-justify-center wu-w-6 wu-h-6",children:a.jsx("span",{className:f("wu-text-xl wu-text-gray-lead",e.icon)})}),a.jsx("p",{className:"wu-text-sm wu-text-gray-lead",children:e.title})]}),Kc=e=>{const[t,n]=p.useState(()=>window.innerWidth<=e);return p.useEffect(()=>{const r=()=>{n(window.innerWidth<=e)};return window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}},[e]),t};function Yc({productCategories:e,openCategory:t,setOpenCategory:n}){const r=(u,l)=>{const c=l[u];if(c){c.focus();const d=e[u]||null;n(d)}},s=(u,l,c,d)=>{u.preventDefault();const w=c==="down"?l+1:l-1;r(w,d)},o=(u,l,c,d)=>{t!=null&&t.products&&t.products[t.products.length-1].name===d&&(u.preventDefault(),r(l+1,c))},i=(u,l)=>{u.preventDefault();const c=e[l]===t?null:e[l];n(c)};return function(l,c,d){const w=document.querySelectorAll("[data-product-category]"),{key:h}=l;switch(h){case"ArrowDown":s(l,c,"down",w);break;case"ArrowUp":s(l,c,"up",w);break;case"Tab":o(l,c,w,d);break;case"Enter":case" ":i(l,c);break}}}const Xc=e=>{const{size:t="lg",className:n,children:r,...s}=e,o={sm:"wu-text-body-3",md:"wu-text-body-2",lg:"wu-text-body-1"},i=e.as||"div";return a.jsx(i,{...s,className:f(o[t],n),children:r})},Zc=e=>{const{size:t="xl",className:n,children:r,...s}=e,o={sm:"h4",md:"h3",lg:"h2",xl:"h1"},i={sm:"wu-text-heading-4",md:"wu-text-heading-3",lg:"wu-text-heading-2",xl:"wu-text-heading-1"},u=o[t];return a.jsx(u,{...s,className:f(i[t],n),children:r})},Jc=e=>{const{size:t="lg",className:n,children:r,...s}=e,o={sm:"wu-text-sub-3",md:"wu-text-sub-2",lg:"wu-text-sub-1"},i=e.as||"div";return a.jsx(i,{...s,className:f(o[t],n),children:r})},Qc=e=>{const{size:t="lg",className:n,children:r,...s}=e,o={md:"wu-text-display-2",lg:"wu-text-display-1"},i=e.as||"h1";return a.jsx(i,{...s,className:f(o[t],n),children:r})},R=e=>{const{icon:t,className:n,...r}=e;return a.jsx("span",{...r,className:f(t,n),role:"presentation","aria-label":t})},Rc=({buttonRef:e,handleDropdownToggle:t,handleKeyDown:n,isDropdownOpen:r,activeProductName:s,dir:o="ltr",homeLink:i="/"})=>a.jsxs("button",{ref:e,type:"button",className:f("wu-text-base wu-font-normal wu-flex wu-items-center wu-justify-between wu-px-2 wu-gap-2 wu-w-full focus:wu-outline-none focus-visible:wu-bg-white/10 wu-switcher-trigger"),onClick:t,onKeyDown:u=>{r&&u.key==="ArrowDown"&&n(u,-1)},"aria-label":"product-switcher",children:[a.jsx("a",{className:"wu-pl-2 wu-pr-0 wu-aspect-auto focus:wu-outline-none focus-visible:wu-bg-white/10 wu-switcher-logo",tabIndex:-1,href:i,children:a.jsx(R,{icon:"wc-logo",className:"wu-text-xl wu-leading-4 wu-relative wu-top-1"})}),s,a.jsx("span",{className:f("wm-arrow-drop-down wu-text-2xl wu-transition-transform wu-duration-300",r&&"wu-rotate-180",o==="rtl"?"wu-mr-auto":"wu-ml-auto")})]}),se={productDropdownMenu:"_productDropdownMenu_amyba_1",productDropdownMenuOpen:"_productDropdownMenuOpen_amyba_38",rtlDropdownMenu:"_rtlDropdownMenu_amyba_51",productCategory:"_productCategory_amyba_55",open:"_open_amyba_61",productCategoryBorderTop:"_productCategoryBorderTop_amyba_66",productList:"_productList_amyba_93",rtlProductList:"_rtlProductList_amyba_114",productListItem:"_productListItem_amyba_137",productLink:"_productLink_amyba_162",activeProduct:"_activeProduct_amyba_164",topBorder:"_topBorder_amyba_169",topBorderRtl:"_topBorderRtl_amyba_190"},ed=({category:e,dir:t="ltr",openCategory:n})=>{const r=e.active?"#c5cce0":"#f0c36a",s=(n==null?void 0:n.name)===e.name,o=f("wm-arrow-forward-ios wu-text-xs wu-tracking-widest wu-text-muted-foreground wu-mr-2.5 group-hover:wu-hidden wu-text-blue-q",t==="rtl"&&"wu-rotate-180 wu-ml-2.5 wu-text-blue-q group-hover:wu-hidden",s&&"wu-hidden","wu-relative wu-top-[5px]"),i=f("wm-lock wu-text-orange-soft wu-text-base wu-mr-2.5 group-hover:wu-hidden",t==="rtl"&&"wu-ml-2.5 group-hover:wu-hidden",s&&"wu-hidden","wu-relative wu-top-1");return a.jsxs("div",{className:f("group focus:wu-outline-none focus-visible:wu-outline-none wu-flex wu-items-center wu-w-full wu-bg-white wu-relative wu-justify-between"),dir:t,children:[a.jsx("div",{className:se.productCategoryBorderTop,style:{backgroundColor:r}}),a.jsxs("div",{className:"wu-flex wu-items-center wu-px-1 wu-relative wu-top-1",children:[a.jsx("div",{className:"wu-w-[56px] wu-h-[56px] wu-flex wu-items-center wu-justify-center",children:a.jsx("img",{src:e.logo,alt:e.name,width:"32px",height:"32px"})}),a.jsx("span",{className:"wu-text-sm wu-leading-5 wu-text-blue-q wu-relative wu-top-[1px]",children:e.name})]}),e.active?a.jsx("span",{className:o}):a.jsx("span",{className:i})]})},td={e309:"wp-audience",e381:"wp-bi",e329:"wp-closed-loop",e314:"wp-communities",e313:"wp-cx",e352:"wp-digsite",e324:"wp-empower",e317:"wp-insightshub",e380:"wp-instant-answers",e378:"wp-intercept",e311:"wp-livepolls",e316:"wp-reputation",e379:"wp-suite-cx",e382:"wp-suite-cx",e308:"wp-surveys",e315:"wp-workforce"},nd=({product:e,currentProduct:t,activeProductName:n,dir:r,focusItem:s,setFocusItem:o})=>{const[i,u]=p.useState(e.name===t),l=e.name===n,c=e.name===t,d=!e.active,w="#1b3380",h="#c5cce0",m="#ffcf70",b=f("wu-font-normal wu-text-xs wu-text-gray-lead wu-text-center",c&&"wu-text-blue-q wu-font-normal",!e.active&&"wu-text-gray-subtle",i&&"wu-font-normal",e.active&&i&&"wu-text-blue-q"),g=f("wu-text-blue-p wu-text-base",c&&"wu-text-blue-q",!e.active&&"wu-text-gray-subtle",e.active&&i&&"wu-text-blue-q"),x=i||s===e.name||l?w:h;return a.jsxs("li",{className:f(se.productListItem,"focus-visible:wu-outline-none focus:wu-outline-none wu-sub-product-list-item",(l||i)&&se.activeProduct,e.name.length>15&&window.innerWidth>768&&"wu-w-[130px] wu-min-w-[130px]",s===e.name&&se.activeProduct,"wu-product-item"),onMouseOver:()=>u(!0),onMouseOut:()=>u(!1),"aria-label":e.name,"aria-disabled":d,dir:r,onKeyDown:C=>{if(C.key==="Enter"){C.preventDefault();const y=C.currentTarget.querySelector("a");y&&y.click()}},onFocus:()=>{o(e.name)},onBlur:()=>o(""),children:[a.jsx("div",{className:f(se.topBorder,r==="rtl"&&se.topBorderRtl),style:{backgroundColor:d?m:x}}),a.jsxs("a",{className:f(se.productLink,"focus:wu-outline-none focus-visible:wu-outline-none"),href:e.link||"#",tabIndex:0,children:[a.jsx("span",{className:f(g,td[e.icon||""]),"aria-hidden":!0}),a.jsx("span",{className:f(b),children:e.name})]})]},e.name)},rd=({category:e,currentProduct:t,activeProductName:n,dir:r="ltr",focusItem:s,setFocusItem:o,borderColorLocked:i="#f5a300"})=>{const{products:u=[],active:l}=e,c=p.useMemo(()=>u.filter(b=>b.active).sort((b,g)=>(b.order||100)-(g.order||100)),[u]),d=p.useMemo(()=>u.filter(b=>!b.active),[u]),[w,h]=p.useState(i),m=b=>b.map((g,x)=>a.jsx(nd,{product:g,currentProduct:t,activeProductName:n,dir:r,focusItem:s,setFocusItem:o},x));return l?a.jsxs(a.Fragment,{children:[m(c),d.length>0&&a.jsxs("li",{className:f(se.productListItem,"focus:wu-outline-none focus-visible:wu-outline-none !wu-bg-[#f5f5f5] hover:!wu-bg-[#eeeeee] wu-group"),onMouseOver:()=>h("#f5a300"),onMouseOut:()=>h(i),"aria-label":"Upgrade to unlock",children:[a.jsx("div",{className:f(se.topBorder,r==="rtl"&&se.topBorderRtl),style:{backgroundColor:w},"aria-label":"top-border"}),a.jsxs("a",{href:"https://www.questionpro.com/a/showUpgradeUser.do",className:f(se.productLink,"wu-flex wu-flex-col wu-items-center wu-justify-center wu-py-2 wu-min-w-[88px]"),children:[a.jsx("span",{className:"wu-text-base wu-transition-colors wm-lock !wu-text-orange-soft group-hover:wu-text-orange-deep"}),a.jsxs("span",{className:"wu-text-[10px] wu-leading-[10px] wu-text-center wu-pt-1 !wu-text-orange-deep",children:["Upgrade to ",a.jsx("br",{})," unlock"]})]})]}),m(d)]}):a.jsxs("li",{className:f(se.productListItem,se.learnMore,"focus:wu-outline-none focus-visible:wu-outline-none wu-product-item-inactive !wu-bg-[#f5f5f5] hover:!wu-bg-[#eeeeee]",s==="learn"&&"activeProduct"),tabIndex:0,onFocus:()=>o("learn"),onBlur:()=>o(""),"aria-label":"Learn More",children:[a.jsx("div",{className:f(se.topBorder,r==="rtl"&&se.topBorderRtl),style:{backgroundColor:i}}),a.jsx("a",{className:se.productLink,href:"https://www.questionpro.com/a/showUpgradeUser.do",tabIndex:-1,children:a.jsx("span",{className:"wu-text-[#f99e03]",children:"Learn More"})})]})},Ma=({dropdownRef:e,dir:t,isDropdownOpen:n,productCategories:r,openCategory:s,setOpenCategory:o,handleKeyDown:i,expandAll:u,activeProductName:l,focusItem:c,setFocusItem:d})=>{const w="#ffcf70",[h,m]=p.useState(window.innerWidth>768);return p.useEffect(()=>{const b=()=>{m(window.innerWidth>375)};return window.addEventListener("resize",b),()=>window.removeEventListener("resize",b)},[]),a.jsx("ul",{className:f(se.productDropdownMenu,n&&se.productDropdownMenuOpen,t==="rtl"&&se.rtlDropdownMenu,"wu-switcher-container"),ref:e,dir:t,"aria-label":"product-dropdown-menu","data-state":n?"open":"closed",children:r.map((b,g)=>a.jsxs("li",{className:f(se.productCategory,"focus:wu-outline-none focus-visible:wu-outline-none wu-h-16 wu-category-item",s===b&&se.open,u&&se.open),onMouseEnter:()=>h&&o(b),onMouseLeave:()=>h&&o(null),"aria-label":b.name,dir:t,onKeyDown:x=>i(x,g),tabIndex:0,"data-product-category":!0,children:[a.jsx(ed,{category:b,dir:t,openCategory:s}),a.jsx("ul",{className:f(se.productList,t==="rtl"&&se.rtlProductList),dir:t,children:a.jsx(rd,{category:b,dir:t,activeProductName:l,currentProduct:b.name,focusItem:c,setFocusItem:d,borderColorLocked:w})})]},b.name))})},sd=({isProductButtonShow:e,isDropdownOpen:t,activeProductColor:n,activeProductBgColor:r,activeProductName:s,dir:o,smallScreenButtonRef:i,handleDropdownToggle:u,handleKeyDown:l})=>a.jsx("div",{className:f("wu-absolute wu-top-11 wu-transition-all wu-duration-300 wu-ease-in-out wu-transform wu-opacity-100 wu-w-[256px] wu-z-10",e?o==="rtl"?"wu-right-0 wu-overflow-hidden":"wu-translate-x-0 wu-left-0":o==="rtl"?"wu-right-0 wu-w-0":"wu--translate-x-full"),style:{backgroundColor:t?n.hover:r},children:a.jsxs("button",{ref:i,type:"button",className:f("wu-text-base wu-leading-[48px] wu-flex wu-items-center wu-justify-center wu-px-2 wu-gap-2 wu-w-full focus:wu-outline-none focus-visible:wu-bg-white/10 wu-switcher-trigger",e?"wu-flex":o==="rtl"?"wu-hidden":"wu-flex"),onClick:u,onKeyDown:c=>{t&&c.key==="ArrowDown"&&l(c,-1)},"aria-label":"small-screen-product-btn",children:[s,a.jsx("span",{className:f("wm-arrow-drop-down wu-text-2xl wu-transition-transform wu-duration-300",t&&"wu-rotate-180")})]})}),ad=({dir:e,isProductButtonShow:t,smallScreenToggleButtonRef:n,setIsProductButtonShow:r,setDropdownOpen:s})=>{const o=()=>{r(i=>!i),t&&s(!1)};return a.jsxs("button",{className:f("wu-relative wu-w-10 wu-h-10 wu-flex wu-flex-col wu-justify-center wu-items-center",e==="rtl"?"wu-mr-4":"wu-ml-4"),onClick:o,ref:n,"aria-label":"menu-toggle-btn",children:[a.jsx("span",{className:`wu-absolute wu-w-6 wu-h-[3px] wu-bg-white wu-transition-transform wu-duration-300 ${t?"wu-rotate-45 wu-translate-y-0":"-wu-translate-y-2.5"}`}),a.jsx("span",{className:`wu-absolute wu-w-6 wu-h-[3px] wu-bg-white wu-transition-opacity wu-duration-300 ${t?"wu-opacity-0":"wu-opacity-100"}`}),a.jsx("span",{className:`wu-absolute wu-w-6 wu-h-[3px] wu-bg-white wu-transition-transform wu-duration-300 ${t?"-wu-rotate-45 wu-translate-y-0":"wu-translate-y-2.5"}`})]})},Da=({productCategories:e,activeProductName:t,activeProductColor:n={base:"#1b87e6",hover:"#54A5EC"},dir:r,homeLink:s,expandAll:o})=>{const i=p.useRef(null),u=p.useRef(null),l=p.useRef(null),c=p.useRef(null),[d,w]=p.useState(!1),[h,m]=p.useState(null),[b,g]=p.useState(n.base),[x,C]=p.useState(""),[y,N]=p.useState(!1),S=Kc(768);Sr([u,i],()=>{w(!1),m(null)}),Sr([l,c,u],()=>{N(!1),w(!1),m(null)}),p.useEffect(()=>{const A=k=>{k.key==="Escape"&&w(!1)};return document.addEventListener("keydown",A),()=>{document.removeEventListener("keydown",A)}},[d]),p.useEffect(()=>g(n.base),[n.base]);const E=A=>{A.preventDefault(),A.stopPropagation(),w(k=>{const D=!k;return D||m(null),D})},I=(A,k)=>{Yc({productCategories:e,openCategory:h,setOpenCategory:m})(A,k,x)};return a.jsx("div",{className:f("wu-inline-flex wu-items-center wu-justify-between wu-relative wu-z-auto wu-h-12 wu-text-white"),children:S?a.jsxs("div",{className:"wu-relative wu-flex",children:[a.jsx(ad,{dir:r,isProductButtonShow:y,smallScreenToggleButtonRef:c,setDropdownOpen:w,setIsProductButtonShow:N}),a.jsx(sd,{isProductButtonShow:y,isDropdownOpen:d,activeProductColor:n,activeProductBgColor:b,activeProductName:t,handleDropdownToggle:E,smallScreenButtonRef:l,handleKeyDown:I,dir:r}),a.jsx("div",{className:f("wu-absolute wu-top-[92px] wu-left-0 wu-text-[18px]",r==="rtl"&&"wu-right-[256px] wu-left-auto"),children:a.jsx(Ma,{activeProductName:t,focusItem:x,setFocusItem:C,handleKeyDown:I,isDropdownOpen:d,openCategory:h,productCategories:e,setOpenCategory:m,dropdownRef:u,expandAll:o,dir:r})})]}):a.jsxs("div",{className:"wu-relative wu-flex wu-items-center wu-justify-start wu-h-full wu-w-[256px]",dir:r,style:{backgroundColor:d?n.hover:b},onMouseOver:()=>g(n.hover),onMouseOut:()=>g(n.base),children:[a.jsx(Rc,{activeProductName:t,dir:r,homeLink:s,buttonRef:i,handleDropdownToggle:E,handleKeyDown:I,isDropdownOpen:d}),a.jsx(Ma,{activeProductName:t,focusItem:x,setFocusItem:C,handleKeyDown:I,isDropdownOpen:d,openCategory:h,productCategories:e,setOpenCategory:m,dropdownRef:u,expandAll:o,dir:r})]})})},Pa=({children:e,dir:t,className:n})=>a.jsx("section",{className:f("wu-flex wu-items-center wu-flex-1 wu-min-w-0 wu-h-12 wu-gap-2 wu-px-2",t==="rtl"&&"wu-flex-row-reverse",n),children:a.jsx("div",{className:"wu-grow",children:e})}),Ar=v.forwardRef(({className:e,type:t,...n},r)=>a.jsx("input",{type:t,className:f("wu-flex wu-h-8 wu-w-full wu-border-b wu-border-gray-subtle wu-bg-gray-10 wu-p-2 wu-text-sm wu-font-normal wu-text-gray-lead","file:wu-border-0 file:wu-bg-gray-40 file:wu-text-gray-notification file:wu-text-sm file:wu-font-normal file:wu-relative file:wu-bottom-[3px]","wu-placeholder:wu-text-gray-subtle wu-placeholder:wu-font-light","disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle","read-only:wu-cursor-not-allowed read-only:wu-bg-gray-20 read-only:wu-border-gray-40 read-only:wu-text-gray-subtle","focus:wu-border-blue-p focus-visible:wu-outline-none wu-transition-colors hover:wu-border-gray-40",e),ref:r,...n}));Ar.displayName="Input";const od=e=>{const{message:t,className:n,...r}=e;return a.jsx("p",{...r,className:f("wu-text-sub-3 wu-break-words wu-font-light",n),style:{color:"rgb(var(--wu-red-deep))",...r.style},children:t})},id=e=>{var u,l;const{inputRef:t,maxLength:n=50,className:r,...s}=e,[o,i]=p.useState(!1);return p.useEffect(()=>{var c;(((c=t==null?void 0:t.current)==null?void 0:c.value.length)||0)>.75*n?i(!0):i(!1)},[(u=t==null?void 0:t.current)==null?void 0:u.value,n]),a.jsx("p",{...s,className:f("wu-text-sub-3 wu-font-light",r),style:{color:"rgb(var(--wu-gray-subtle))",...s.style},children:o&&`${(l=t==null?void 0:t.current)==null?void 0:l.value.length}/${n}`})},ud=ke.cva("wu-text-xs wu-font-normal wu-leading-none peer-disabled:wu-cursor-not-allowed peer-disabled:wu-text-gray-subtle peer-readonly:wu-text-gray-subtle peer-required:after:wu-content-['*'] peer-required:after:wu-ml-[2px] peer-required:after:wu-text-red-deep peer-aria-[required]:after:wu-content-['*'] peer-aria-[required]:after:wu-ml-[2px] peer-aria-[required]:after:wu-text-red-deep"),Sn=v.forwardRef(({className:e,...t},n)=>a.jsx(Na.Root,{ref:n,className:f(ud(),e),...t}));Sn.displayName=Na.Root.displayName;const Te=e=>a.jsx(Sn,{...e,className:f("wu-text-gray-lead wu-leading-6",e.className)}),ld=({Label:e,Error:t,Hint:n,Input:r,labelPosition:s="top",dir:o="ltr",className:i,...u})=>{const c=f("wu-flex",s==="top"?"wu-flex-col wu-gap-1":"wu-flex-row wu-items-center wu-gap-2",i),d=f("wu-flex wu-flex-col wu-gap-1 wu-relative wu-flex-1 wu-form-group-wrapper"),w=f("wu-absolute -wu-bottom-5",o==="ltr"?"wu-right-0":"wu-left-0","wu-form-group-hint"),h=f("wu-absolute -wu-bottom-5",o==="ltr"?"wu-left-0":"wu-right-0","wu-form-group-error");return a.jsxs("div",{className:c,dir:o,...u,children:[e,a.jsxs("div",{className:d,children:[r,n&&a.jsx("div",{className:w,children:n}),t&&a.jsx("div",{className:h,children:t})]})]})},Ie=p.forwardRef((e,t)=>{const{Label:n,labelPosition:r="top",Icon:s,iconPosition:o,type:i,value:u,variant:l="flat",readonly:c,id:d=Cn(),...w}=e,h=jt(r),m=s?o!=="right"?"wu-pl-8":"wu-pr-8":"",[b,g]=p.useState(!1),x=()=>{g(y=>!y)},C=y=>{w.onChange&&w.onChange(y)};return a.jsx(a.Fragment,{children:i==="submit"?a.jsx(xe,{type:"submit",className:w.className,id:d,children:n||"Submit"}):a.jsx("div",{className:f("wu-flex wu-flex-col wu-gap-2 wu-input-container"),dir:w.dir,children:a.jsxs("div",{className:f("wu-flex wu-gap-1 wu-relative",h,(r==="right"||r==="left")&&"wu-items-center","wu-input-wrapper"),children:[s&&o!=="right"&&a.jsx("div",{className:"wu-absolute wu-flex wu-items-center wu-justify-center wu-w-8 wu-h-8 wu-input-icon-container",children:s}),a.jsx(Ar,{...w,className:f("wu-peer wu-text-xs wu-rounded-t-sm",l==="outlined"?"wu-border wu-border-gray-subtle":"",m,w.className),type:b?"text":i,ref:t,readOnly:c,onChange:w.onChange&&C,value:u,id:d}),s&&o==="right"&&a.jsx("div",{className:"wu-absolute wu-right-0 wu-flex wu-items-center wu-justify-center wu-w-8 wu-h-8 wu-input-icon-container",children:s}),i==="password"&&a.jsx("div",{className:"wu-absolute wu-right-0 wu-flex wu-items-center wu-justify-center wu-w-8 wu-h-8 wu-cursor-pointer",onClick:x,children:a.jsx("button",{type:"button",className:"wu-flex wu-items-center wu-justify-center wu-w-6 wu-h-6 wu-rounded-sm focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft","aria-label":"show-password",children:b?a.jsx("span",{className:"wm-visibility wu-text-gray-subtle"}):a.jsx("span",{className:"wm-visibility-off wu-text-gray-subtle"})})}),n&&a.jsx(Te,{htmlFor:d,className:"wu-flex-none wu-w-fit wu-input-label",children:n})]})})})});Ie.displayName="WuInput";const cd=({className:e,placeholder:t="Search surveys, folders or tools",defaultCollapsed:n=!0,onSearch:r,...s})=>{const[o,i]=p.useState(n);return p.useEffect(()=>{i(n)},[n]),a.jsx(Ie,{...s,placeholder:t,onChange:u=>r(u.target.value),className:f("wu-rounded-full focus-visible:wu-outline-2 focus-visible:wu-outline-blue-focus -wu-outline-offset-2 wu-bg-white","wu-transition-all wu-duration-300 wu-ease-in-out",o?"wu-w-8 wu-px-2 wu-text-lg wu-rounded-full wu-h-8 wu-border wu-border-white wu-bg-transparent":"wu-w-40 sm:wu-w-60",e),type:"search",Icon:a.jsx(R,{"data-testid":"search-icon",icon:"wm-search",className:f("wu-text-gray-lead wu-cursor-pointer",o&&"wu-text-white"),onClick:()=>i(u=>!u)})})},_a=$t.Provider,Fa=$t.Root,Va=$t.Trigger,kr=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx($t.Content,{ref:r,sideOffset:t,className:f("wu-z-50 wu-overflow-hidden wu-bg-gray-notification wu-text-white wu-px-3 wu-py-1.5 wu-text-sm wu-shadow-md",e),...n}));kr.displayName=$t.Content.displayName;const Tn=p.forwardRef(({content:e,position:t,positionOffset:n,duration:r,children:s,className:o,showArrow:i=!1,open:u,onOpenChange:l,...c},d)=>a.jsx(_a,{delayDuration:r||200,children:a.jsxs(Fa,{open:u,onOpenChange:l,children:[a.jsx(Va,{asChild:!0,children:a.jsx("span",{ref:d,children:s})}),a.jsx(fr.Portal,{children:e&&a.jsxs(kr,{...c,side:t||"top",sideOffset:n||0,className:f("wu-max-w-sm wu-max-h-96 wu-overflow-y-auto",o),children:[e,i&&a.jsx(fr.Arrow,{className:"wu-fill-gray-notification wu-tooltip-arrow"})]})})]})}));Tn.displayName="WuTooltip";const dd=({label:e,className:t})=>{const n=p.useRef(null),[r,s]=p.useState(!1);return p.useEffect(()=>{const o=n.current;if(o){const i=o.clientWidth,u=o.scrollWidth,l=u/e.length,c=e.length*l;s(c>i||u>i)}},[e]),a.jsx("p",{ref:n,className:f("wu-w-full wu-truncate",t),children:r?a.jsx(Tn,{content:e,positionOffset:8,children:e}):e})},wd=e=>{var w;const{productName:t,categories:n=[],user:r,children:s,onLogout:o,homeLink:i=window.location.origin,brandColor:u,dir:l="ltr",expandAll:c,DataCenter:d}=e;return a.jsx("div",{className:"wu-sticky wu-top-0 wu-z-50 wu-w-full",children:a.jsxs("header",{className:f("wu-h-12 wu-flex wu-items-center wu-justify-between wu-relative wu-bg-blue-switcher wu-text-white",l==="rtl"&&"wu-flex-row-reverse",e.className),style:e.style,children:[Oc((w=r==null?void 0:r.profile)==null?void 0:w.subtitle)&&window.wickUiVersion&&a.jsxs("p",{className:"wu-text-[10px] wu-text-gray-subtle wu-font-normal wu-absolute wu-top-11 wu-right-1 wu-z-[-1] wu-invisible","aria-label":"wickUiVersion",children:["Wick UI: v",window.wickUiVersion]}),a.jsx("section",{className:"wu-flex wu-items-center wu-gap-2 wu-shrink-0",children:a.jsx(Da,{productCategories:n,activeProductName:t,activeProductColor:u,dir:l,homeLink:i,expandAll:c})}),a.jsx(Pa,{dir:l,children:s}),a.jsxs("section",{className:f("wu-flex wu-items-center wu-justify-end wu-shrink-0 wu-gap-2",l==="rtl"?"wu-flex-row-reverse wu-pl-4":"wu-flex-row wu-pr-4"),children:[a.jsx(ka,{dir:l}),(r==null?void 0:r.profile)&&Object.keys(r.profile).length>0&&a.jsx(Aa,{user:r,onLogout:o,dir:l,DataCenter:d})]})]})})},ze=Ht.Root,tt=Ht.Trigger,Me=v.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},s)=>a.jsx(Ht.Portal,{children:a.jsx(Ht.Content,{ref:s,align:t,sideOffset:n,className:f("wu-z-50 wu-w-72 wu-border wu-bg-popover wu-p-4 wu-text-popover-foreground wu-shadow-md wu-outline-none data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[side=bottom]:wu-slide-in-from-top-2 data-[side=left]:wu-slide-in-from-right-2 data-[side=right]:wu-slide-in-from-left-2 data-[side=top]:wu-slide-in-from-bottom-2",e),...r})}));Me.displayName=Ht.Content.displayName;function La({className:e,classNames:t,dir:n="ltr",...r}){const s=xa.getDefaultClassNames();return a.jsx(xa.DayPicker,{showOutsideDays:r.showOutsideDays||!1,className:f("wu-p-3",e),classNames:{root:f(s.root,"wu-relative wu-rounded-none wu-bg-white dark:wu-bg-gray-switcher"),caption_label:f("wu-text-xs",r.captionLayout==="dropdown"?"wu-hidden":""),month_caption:f(s.month_caption,"wu-mb-5"),months:f(s.months,"wu-flex wu-flex-col sm:wu-flex-row wu-gap-4"),dropdowns:f(s.dropdowns,"wu-flex wu-items-center wu-justify-start wu-gap-2",(r.mode==="range","")),dropdown:f(s.dropdown,"wu-px-2 wu-py-1 wu-text-sm wu-text-gray-lead wu-font-medium focus:wu-outline-none wu-bg-white wu-border-b wu-border-gray-subtle focus-visible:wu-border-blue-p"),weekday:f(s.weekday,"wu-text-gray-lead wu-rounded-none wu-w-9 wu-font-normal wu-text-xs wu-bg-gray-10 wu-py-2"),day_button:f(s.day_button,"wu-w-full wu-h-full focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-pHover focus-visible:wu-ring-offset-2"),day:f(s.day,"wu-text-gray-lead wu-transition-colors wu-duration-300 [&:not([aria-selected])]:hover:wu-bg-gray-25 wu-text-sm wu-w-9 wu-h-9 wu-min-w-0 wu-text-center wu-p-0 wu-rounded-none data-[today=true]:[&:not([aria-selected])]:wu-border data-[today=true]:[&:not([aria-selected])]:wu-border-blue-p data-[today=true]:[&:not([aria-selected])]:wu-text-gray-lead"),selected:f(s.selected,"wu-bg-blue-p [&:not(.rm)]:wu-text-white hover:wu-bg-blue-pHover"),range_middle:f("rm",s.range_middle,"wu-bg-blue-p/10 wu-rounded-none hover:wu-bg-blue-p/20 wu-text-gray-lead hover:wu-text-white data-[today=true]:wu-bg-blue-p/20 hover:data-[today=true]:wu-bg-blue-pHover"),range_end:f(s.range_end,"wu-rounded-none"),range_start:f(s.range_start,"wu-rounded-none wu-bg-blue-p hover:wu-bg-blue-pHover"),month_grid:f(s.month_grid,"[&>thead>tr>th]:wu-pb-2 wu-border-collapse wu-space-y-1"),button_next:f(s.button_next,Er({variant:"iconOnly"}),"wu-h-6 wu-w-6 wu-text-gray-lead"),button_previous:f(s.button_previous,Er({variant:"iconOnly"}),"wu-h-6 wu-w-6 wu-rotate-180 wu-text-gray-lead"),nav:f(s.nav,"wu-absolute wu-top-4 wu-right-3 wu-flex",n==="rtl"&&"wu-right-auto wu-left-3 wu-flex-row-reverse"),chevron:f(s.chevron,"!wu-text-red-500"),outside:f(s.outside,"wu-invisible"),disabled:f(s.disabled,"hover:wu-bg-white wu-text-gray-subtle"),...t},components:{Chevron:()=>a.jsx("span",{className:"wm-chevron-right wu-text-lg wu-leading-5"})},...r})}La.displayName="Calendar";const Ir=e=>a.jsx(La,{...e}),Oa=e=>{const{handleDateChange:t,disabled:n,onReset:r,showResetButton:s}=e;return a.jsxs("div",{className:"wu-flex wu-items-center wu-justify-end wu-gap-2 wu-mt-2 wu-date-picker-footer",children:[s&&a.jsx(xe,{variant:"secondary",onClick:r,Icon:a.jsx("span",{className:"wu-text-[20px] wu-leading-5 -wu-mt-[1px] wm-refresh"}),className:"wu-date-picker-footer-reset",children:"Reset"}),a.jsx(qt.PopoverClose,{asChild:!0,children:a.jsx(xe,{onClick:t,disabled:n,className:"wu-date-picker-apply",children:"Apply"})})]})},Mr=({formattedString:e,dir:t,placeholder:n="Select Date",className:r,variant:s="primary",color:o,CustomTrigger:i,...u})=>a.jsx(qt.PopoverTrigger,{asChild:!i,dir:t,children:i?a.jsx(a.Fragment,{children:i(e)}):a.jsx(xe,{...u,className:f("wu-justify-between wu-w-full wu-gap-2 wu-text-xs wu-border-b wu-rounded-none wu-rounded-t-sm wu-min-w-48 wu-border-gray-subtle wu-text-gray-lead wu-placeholder:wu-text-gray-subtle wu-placeholder:wu-font-light wu-bg-gray-10 hover disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-subtle hover:wu-text-gray-lead hover:wu-bg-gray-10 hover:wu-border-gray-40 wu-datepicker-trigger",s==="outlined"&&"wu-border wu-border-subtle wu-bg-transparent",r),Icon:a.jsx("span",{className:"wm-calendar-month wu-text-sm"}),iconPosition:"right",children:e||n})}),Wa=(e,t,n,r)=>{const s=Y.startOfDay(e).getTime();return!!(t||n&&s<Y.startOfDay(n).getTime()||r&&s>Y.startOfDay(r).getTime())},En=e=>e?typeof e=="string"?new Date(e):e:new Date,Dr="\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])",fd=[{label:"Last 7 days",value:7},{label:"Last 30 days",value:30},{label:"Last 90 days",value:90},{label:"Last 365 days",value:365}],pd=({formatString:e="yyyy-MM-dd",value:t,onChange:n,disabled:r,minDate:s=Y.sub(new Date,{years:5}),maxDate:o=Y.add(new Date,{years:1}),dir:i="ltr",Label:u,labelPosition:l="top",onReset:c,showResetButton:d=!1,placeholder:w="Select Date",CustomTrigger:h,...m})=>{const[b,g]=p.useState(),[x,C]=p.useState(""),y=p.useCallback(()=>{const S=En(b);C(Y.format(S,e)),n&&n(b)},[b,e,n]),N=p.useCallback(()=>{c?c():(g(void 0),C(""),n&&n(void 0))},[n,c]);return p.useEffect(()=>{const S=En(t);g(S),C(Y.format(S,e))},[t,e]),a.jsxs(Te,{className:f("wu-flex wu-gap-1",l==="left"?"wu-items-center":"wu-flex-col wu-items-start","wu-date-picker-label"),dir:i,children:[u,a.jsxs(ze,{children:[a.jsx(Mr,{formattedString:x,dir:i,placeholder:w,CustomTrigger:h,...m}),a.jsx(Me,{className:"wu-p-0 wu-w-fit wu-date-picker-content",align:"start",sideOffset:-.5,dir:i,children:a.jsx(Ir,{dir:i,mode:"single",captionLayout:"dropdown",selected:b,onSelect:g,disabled:S=>Wa(S,r,s,o),startMonth:s,endMonth:o,required:!0,autoFocus:!0,defaultMonth:b,className:f("wu-border wu-border-blue-p wu-date-picker"),footer:a.jsx(Oa,{handleDateChange:y,disabled:r,onReset:N,showResetButton:d})})})]})]})},Ba="yyyy-MM-dd",hd=[{label:"Day",value:1},{label:"Week",value:7},{label:"Month",value:30},{label:"Quarter",value:90},{label:"Year",value:365}],md=({current:e,onSelect:t,presetRanges:n=fd})=>{const[r,s]=p.useState(),[o,i]=p.useState(!1),[u,l]=p.useState(""),[c,d]=p.useState(""),[w,h]=p.useState(!1),m=p.useMemo(()=>n.map(y=>y.value),[n]),b=f("wu-flex wu-w-full wu-gap-2 wu-px-4 wu-py-2 wu-text-sm wu-text-gray-lead wu-transition-colors","wu-rounded-none hover:wu-bg-gray-10 focus:wu-outline-none focus-visible:wu-ring-2","focus-visible:wu-ring-blue-pHover focus-visible:wu-ring-offset-1 wu-text-start"),g=p.useCallback(y=>{if(y===void 0){s(void 0),i(!0);return}const N=Number(y)-1;s(N),i(!1),t({from:Y.sub(new Date,{days:N}),to:new Date})},[t]),x=p.useCallback((y,N)=>{if(!y||!(e!=null&&e.to)||!(e!=null&&e.from)||!new RegExp(Dr).test(y))return!1;const E=new Date(N==="start"?y:e.from),I=new Date(N==="end"?y:e.to);return Y.isBefore(I,E)?(h(!0),!1):(h(!1),!(Y.isSameDay(E,e.from)&&Y.isSameDay(I,e.to)))},[e]),C=p.useCallback((y,N)=>{if((N==="start"?l:d)(y),x(y,N)){const E={from:e==null?void 0:e.from,to:e==null?void 0:e.to};N==="start"&&(E.from=new Date(y)),N==="end"&&(E.to=new Date(y)),t(E)}},[e,t,x]);return p.useEffect(()=>{if(e!=null&&e.to&&(e!=null&&e.from)&&Y.isValid(e.to)&&Y.isValid(e.from)){l(Y.format(e.from,Ba)),d(Y.format(e.to,Ba));const y=Y.differenceInCalendarDays(e.to,e.from);Y.isToday(e.to)&&m.includes(y+1)?(s(y),i(!1)):(s(void 0),i(!0))}},[e,m]),a.jsxs("div",{className:"wu-flex wu-flex-col wu-gap-1 wu-p-2 wu-bg-white wu-w-60 wu-date-picker-sidebar",children:[a.jsx("ul",{className:"wu-flex wu-gap-1 wu-py-2 wu-date-picker-batch-list",children:hd.map(({label:y,value:N})=>a.jsx(gt,{variant:"secondary",className:"wu-px-1 wu-py-1 wu-text-xs wu-h-fit wu-min-w-fit disabled:wu-bg-white",disabled:N!==1,children:y},N))}),a.jsxs("ul",{className:"wu-flex wu-flex-col wu-gap-1 wu-date-picker-ranges",children:[n.map(({label:y,value:N})=>a.jsx("li",{children:a.jsx("button",{className:f(b,r===N-1&&"wu-bg-blue-p/10"),onClick:()=>g(N),children:y})},N)),a.jsx("li",{children:a.jsx("button",{className:f(b,o&&"wu-bg-blue-p/10"),onClick:()=>g(),children:"Custom Range"})})]}),a.jsxs("div",{className:"wu-relative wu-flex wu-gap-3 wu-pt-2 wu-date-picker-range-footer",children:[a.jsx(Ie,{placeholder:"Start Date",pattern:Dr,value:u,onChange:y=>C(y.target.value,"start"),"aria-label":"Start Date"}),a.jsx(Ie,{placeholder:"End Date",pattern:Dr,value:c,onChange:y=>C(y.target.value,"end"),"aria-label":"End Date"}),w?a.jsx("small",{className:"wu-absolute wu-text-[10px] wu-leading-[14px] wu-text-red-deep wu-left-0 -wu-bottom-4 wu-text-start",children:"End date must be after start date"}):a.jsx("small",{className:"wu-absolute wu-right-0 wu-leading-[14px] -wu-bottom-4 wu-text-gray-subtle wu-text-end",children:"yyyy-mm-dd"})]})]})},gd=({formatString:e="yyyy/MM/dd",value:t,onChange:n,disabled:r,minDate:s=Y.sub(new Date,{years:5}),maxDate:o=Y.add(new Date,{years:1}),dir:i="ltr",minDateToSelect:u,maxDateToSelect:l,presetRanges:c,Label:d,labelPosition:w="top",onReset:h,showResetButton:m=!0,placeholder:b="Select Date Range",CustomTrigger:g,...x})=>{const[C,y]=p.useState(t),[N,S]=p.useState(t),[E,I]=p.useState(""),A=p.useCallback(()=>{if(N){const _=N.from,F=N.to;y({from:_,to:F}),I(`${Y.format(_,e)} - ${Y.format(F,e)}`),n&&n({from:_,to:F})}},[N,e,n]),k=p.useCallback(()=>{S(C)},[C]),D=p.useCallback(()=>{h?h():(y(void 0),S(void 0),I(""),n&&n(void 0))},[h,n]);return p.useEffect(()=>{if(t!=null&&t.from&&(t!=null&&t.to)){const _=En(t.from),F=En(t.to);y(t),S(t),I(`${Y.format(_,e)} - ${Y.format(F,e)}`)}else y(void 0),S({to:new Date,from:new Date})},[t,e]),a.jsxs(Te,{className:f("wu-flex wu-gap-1",w==="left"?"wu-items-center":"wu-flex-col wu-items-start","wu-date-picker-label"),dir:i,children:[d,a.jsxs(ze,{onOpenChange:_=>!_&&k(),children:[a.jsx(Mr,{formattedString:E,dir:i,placeholder:b,CustomTrigger:g,...x}),a.jsxs(Me,{className:"wu-flex wu-p-0 wu-border wu-w-fit wu-border-blue-p",align:"start",sideOffset:-.5,dir:i,children:[a.jsx(md,{current:N,onSelect:S,presetRanges:c}),a.jsx(Ir,{dir:i,numberOfMonths:2,mode:"range",captionLayout:"dropdown",selected:N,onSelect:S,disabled:_=>Wa(_,r,s,o),startMonth:s,endMonth:o,required:!0,autoFocus:!0,defaultMonth:C==null?void 0:C.from,className:f("wu-shadow-none wu-date-range-picker"),min:u,max:l,footer:a.jsx(Oa,{handleDateChange:A,disabled:r,onReset:D,showResetButton:m})})]})]})]})},qa=p.forwardRef((e,t)=>{const{className:n,rounded:r,...s}=e;return a.jsx("div",{className:f("wu-card wu-p-2 wu-pt-1 hover:wu-shadow-card wu-border wu-border-black/20 hover:wu-border-black/30 wu-transition-colors wu-duration-300",r?"wu-rounded-lg":"wu-rounded-sm",n),ref:t,...s})});qa.displayName="WuCard";const za=p.forwardRef((e,t)=>{const{className:n,...r}=e;return a.jsx("div",{ref:t,...r,className:f("wu-p-2 wu-mb-2 wu-border-b wu-border-gray-40 min-h-12 wu-card-header",n)})});za.displayName="WuCardHeader";const $a=p.forwardRef((e,t)=>{const{className:n,...r}=e;return a.jsx("div",{ref:t,...r,className:f("wu-p-2 wu-mt-2 wu-border-t wu-border-gray-40 min-h-12 wu-card-footer",n)})});$a.displayName="WuCardHeader";const Ha=v.forwardRef(({className:e,partial:t,...n},r)=>a.jsx(hr.Root,{ref:r,className:f("wu-h-4 wu-w-4 wu-shrink-0 wu-rounded-[2px] wu-bg-white wu-border wu-border-gray-subtle wu-ring-offset-background focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-[1px] data-[state=checked]:wu-bg-blue-p data-[state=checked]:wu-text-white data-[state=checked]:wu-border-none data-[state=checked]:hover:wu-bg-blue-q hover:wu-bg-gray-20 hover:wu-border-blue-p wu-transition-all data-[state=checked]:disabled:wu-bg-gray-20","disabled:wu-cursor-not-allowed disabled:wu-opacity-50 disabled:data-[state=unchecked]:wu-bg-gray-20 disabled:hover:wu-border-gray-subtle disabled:wu-border-gray-subtle",e),...n,children:a.jsxs(hr.Indicator,{className:f("wu-flex wu-items-center wu-justify-center wu-text-current"),children:[!t&&a.jsx("span",{className:"wm-check wu-text-base wu-leading-4"}),t&&a.jsx("span",{className:"wm-check-indeterminate-small wu-text-base wu-leading-4"})]})}));Ha.displayName=hr.Root.displayName;const De=p.forwardRef((e,t)=>{const{disabled:n,checked:r,Label:s,labelPosition:o="right",className:i,id:u=Cn(),partial:l,onChange:c,required:d,readonly:w,...h}=e;return p.useEffect(()=>{h.defaultChecked!==void 0&&r!==void 0&&console.error("WuCheckbox: Both `checked` and `defaultChecked` cannot be used together. Use only one of them.")},[h.defaultChecked,r]),a.jsxs("div",{className:bd({labelPosition:o,className:"wu-checkbox-container"}),dir:h.dir,children:[a.jsx(Ha,{id:u,...h,partial:l,checked:r,disabled:n||w,onCheckedChange:c,className:f("wu-peer wu-checkbox",i),required:d,ref:t}),s&&a.jsx(Te,{htmlFor:u,className:"wu-w-full wu-checkbox-label",children:s})]})}),bd=ke.cva("wu-flex wu-items-center wu-gap-2 wu-w-fit",{variants:{labelPosition:{left:"wu-flex-row-reverse wu-text-right",right:"wu-flex-row"}}});De.displayName="WuCheckbox";const yd=e=>{const{className:t,children:n,...r}=e;return a.jsx("span",{...r,className:f("wu-flex wu-items-center wu-justify-center wu-truncate wu-max-w-28 wu-w-fit wu-px-2 wu-py-1 wu-text-xs wu-bg-gray-20 wu-rounded-sm hover:wu-bg-gray-40 hover:wu-text-blue-q",t),children:n})},Pr=v.forwardRef(({className:e,...t},n)=>a.jsx(ye.Command,{ref:n,className:f("wu-flex wu-h-full wu-w-full wu-flex-col wu-overflow-hidden wu-rounded-md",e),...t}));Pr.displayName=ye.Command.displayName;const Ua=v.forwardRef(({className:e,...t},n)=>a.jsx("div",{className:"wu-flex wu-items-center wu-border-b wu-px-3",children:a.jsx(ye.Command.Input,{ref:n,className:f("wu-flex wu-h-11 wu-w-full wu-rounded-md wu-bg-transparent wu-py-3 wu-text-sm wu-outline-none wu-placeholder:wu-text-muted-foreground disabled:wu-cursor-not-allowed disabled:wu-opacity-50",e),...t})}));Ua.displayName=ye.Command.Input.displayName;const _r=v.forwardRef(({className:e,...t},n)=>a.jsx(ye.Command.List,{ref:n,className:f("",e),...t}));_r.displayName=ye.Command.List.displayName;const Fr=v.forwardRef((e,t)=>a.jsx(ye.Command.Empty,{ref:t,className:"wu-text-center wu-p-2 wu-pb-2.5 wu-text-xs",...e}));Fr.displayName=ye.Command.Empty.displayName;const Gt=v.forwardRef(({className:e,...t},n)=>a.jsx(ye.Command.Group,{ref:n,className:f("",e),...t}));Gt.displayName=ye.Command.Group.displayName;const ja=v.forwardRef(({className:e,...t},n)=>a.jsx(ye.Command.Separator,{ref:n,className:f("wu-mx-1 wu-my-1 wu-h-px wu-bg-gray-20",e),...t}));ja.displayName=ye.Command.Separator.displayName;const Kt=v.forwardRef(({className:e,...t},n)=>a.jsx(ye.Command.Item,{ref:n,className:f("wu-relative wu-flex wu-cursor-default wu-gap-2 wu-select-none wu-items-center wu-rounded-sm wu-px-2 wu-py-3 wu-text-sm wu-outline-none data-[disabled=true]:wu-pointer-events-none data-[disabled=true]:wu-opacity-50 [&_svg]:wu-pointer-events-none [&_svg]:wu-size-4 [&_svg]:wu-shrink-0",e),...t}));Kt.displayName=ye.Command.Item.displayName;const yt=p.forwardRef(({containerHeight:e=400,list:t,callback:n,dir:r,className:s,style:o},i)=>a.jsx(yc.Virtuoso,{ref:i,dir:r,className:s,style:{height:e,scrollbarWidth:"thin",scrollbarColor:"#d4d4d4 #f1f1f1",overflowX:"hidden",...o},data:t,itemContent:(u,l)=>n(u,l)}));yt.displayName="WuVirtualScroll";const xd=({tags:e,triggerRef:t})=>{const[n,r]=p.useState([]),[s,o]=p.useState([]),i=p.useMemo(()=>a.jsx("ul",{className:"wu-flex wu-flex-col wu-items-start wu-justify-center wu-list-none",children:s.map((l,c)=>a.jsx("li",{className:"wu-py-1 wu-text-xs wu-text-left",children:l},c))}),[s]),u=l=>{const c=document.createElement("div");Object.assign(c.style,{display:"inline-block",visibility:"hidden",position:"absolute",whiteSpace:"nowrap"}),c.textContent=l,document.body.appendChild(c);const d=c.offsetWidth;return document.body.removeChild(c),d+8};return p.useEffect(()=>{const l=()=>{if(t.current){const h=t.current.offsetWidth-20-36;let m=0;const b=[],g=[];e.forEach(x=>{const C=u(x);m+C+8<h?(b.push(x),m+=C+8):g.push(x)}),r(b),o(g)}};return l(),window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l)}},[e,t]),a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2 wu-text-xs",children:[n.map((l,c)=>a.jsx("span",{className:"wu-px-1 wu-py-0.5 wu-text-xs wu-rounded-sm wu-bg-gray-10 wu-combobox-tag",children:l},c)),s.length>0&&a.jsx(Tn,{content:i,className:"wu-z-[51] wu-text-left",children:a.jsxs("span",{className:"wu-px-1 wu-py-0.5 wu-text-xs wu-rounded-sm wu-bg-gray-10 wu-combobox-tag",children:["+",s.length]})})]})},vd=({placeholder:e="Select...",isEllipse:t=!1,selectedOptions:n,variant:r="flat",dir:s="ltr",accessorKey:o,multiple:i,id:u,disabled:l,selectAll:c,isCheckedAll:d,className:w,...h})=>{const[m,b]=p.useState([]),g=p.useRef(null);p.useEffect(()=>{if(!n||Array.isArray(n)&&n.length===0){b([]);return}if(i){const C=n;b(C==null?void 0:C.map(y=>y[o.label]));return}else b([n[o.label]])},[n]);const x=()=>{var C;return m.length?d&&(c!=null&&c.enable)&&(c!=null&&c.triggerText)?a.jsx("span",{className:"wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap",children:c.triggerText}):t?a.jsx("span",{className:"wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap",style:{width:`${(((C=g.current)==null?void 0:C.offsetWidth)||0)-32}px`},children:m.join(", ")}):a.jsx(xd,{tags:m,triggerRef:g}):a.jsx("p",{className:"wu-text-xs wu-opacity-70",children:e})};return a.jsx(tt,{dir:s,asChild:!0,id:u,disabled:l,children:a.jsxs("button",{...h,ref:g,disabled:l,className:f("focus-visible:wu-ring-2 focus-visible:wu-ring-blue-pHover wu-bg-white focus-visible:wu-ring-offset-2 wu-flex wu-w-full wu-items-center wu-justify-between wu-border-b wu-border-gray-subtle wu-py-1.5 wu-px-2 placeholder:wu-text-gray-40 focus:wu-outline-none disabled:wu-cursor-not-allowed disabled:wu-opacity-50 hover:wu-bg-gray-10 hover:wu-border-blue-p wu-transition-colors focus-visible:wu-bg-gray-20 focus-visible:wu-border-blue-p wu-cursor-pointer wu-text-xs wu-rounded-t-sm wu-gap-2 wu-h-8 wu-group/wuCombobox wu-combobox-trigger",r==="outlined"&&"wu-border wu-border-gray-subtle","disabled:wu-cursor-not-allowed disabled:hover:wu-border-gray-subtle disabled:wu-bg-gray-10",w),children:[x(),a.jsx("span",{className:"wm-arrow-drop-down group-data-[state=open]/wuCombobox:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base"})]})})},Vr=ne.Root,Lr=ne.Trigger,Ga=ne.Group,Nd=ne.Portal,Cd=ne.Sub,Sd=ne.RadioGroup,Ka=v.forwardRef(({className:e,inset:t,children:n,position:r,...s},o)=>a.jsxs(ne.SubTrigger,{ref:o,className:f("wu-flex wu-cursor-default wu-select-none wu-text-xs wu-items-center wu-p-2 wu-outline-none focus:wu-bg-gray-20 data-[state=open]:wu-bg-gray-20",t&&"wu-pl-8",e),...s,children:[r==="left"&&a.jsx("span",{className:f("wm-chevron-right",s.dir==="rtl"&&"ml-2")}),n,r!=="left"&&a.jsx("span",{className:f("wu-text-base wu-leading-4",s.dir==="rtl"&&"wu-mr-auto wm-chevron-left",s.dir!=="rtl"&&"wu-ml-auto wm-chevron-right")})]}));Ka.displayName=ne.SubTrigger.displayName;const Ya=v.forwardRef(({className:e,...t},n)=>a.jsx(ne.SubContent,{ref:n,className:f("wu-z-50 wu-min-w-[8rem] wu-overflow-hidden wu-border wu-text-xs wu-bg-white wu-text-gray-lead wu-shadow-lg data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[side=bottom]:wu-slide-in-from-top-2 data-[side=left]:wu-slide-in-from-right-2 data-[side=right]:wu-slide-in-from-left-2 data-[side=top]:wu-slide-in-from-bottom-2",e),...t}));Ya.displayName=ne.SubContent.displayName;const An=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx(ne.Portal,{children:a.jsx(ne.Content,{ref:r,sideOffset:t,className:f("wu-z-50 wu-min-w-[8rem] wu-overflow-hidden wu-border wu-text-xs wu-bg-white wu-text-gray-lead wu-shadow-md data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[side=bottom]:wu-slide-in-from-top-2 data-[side=left]:wu-slide-in-from-right-2 data-[side=right]:wu-slide-in-from-left-2 data-[side=top]:wu-slide-in-from-bottom-2",e),...n})}));An.displayName=ne.Content.displayName;const Yt=v.forwardRef(({className:e,inset:t,...n},r)=>a.jsx(ne.Item,{ref:r,className:f("wu-relative wu-flex wu-cursor-default wu-select-none wu-items-center wu-text-xs wu-p-2 wu-outline-none wu-transition-colors focus:wu-bg-gray-20 data-[disabled]:wu-cursor-not-allowed data-[disabled]:wu-opacity-50",t&&"wu-pl-8",e),...n}));Yt.displayName=ne.Item.displayName;const Xa=v.forwardRef(({className:e,children:t,checked:n,dir:r,...s},o)=>a.jsxs(ne.CheckboxItem,{ref:o,className:f("wu-group wu-relative wu-flex wu-cursor-default wu-select-none wu-items-center wu-text-xs wu-py-3 wu-outline-none wu-transition-colors focus:wu-bg-gray-20 data-[disabled]:wu-cursor-not-allowed data-[disabled]:wu-opacity-50",r==="rtl"&&"wu-pr-8 wu-pl-2",r!=="rtl"&&"wu-pl-8 wu-pr-2",e),checked:n,...s,children:[a.jsx("span",{className:f("wu-absolute wu-flex wu-items-center wu-justify-center wu-w-4 wu-h-4 wu-rounded-sm wu-ring-1 wu-ring-gray-subtle group-disabled:wu-bg-gray-20 group-data-[state=checked]:wu-bg-blue-p group-hover:wu-bg-gray-20 group-hover:wu-ring-blue-p wu-transition-all group-data-[state=checked]:wu-ring-blue-p",r==="rtl"&&"wu-right-2",r!=="rtl"&&"wu-left-2"),children:a.jsx(ne.ItemIndicator,{children:a.jsx("span",{className:"wm-check wu-text-base wu-text-white"})})}),t]}));Xa.displayName=ne.CheckboxItem.displayName;const Za=v.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(ne.RadioItem,{ref:r,className:f("wu-group wu-relative wu-flex wu-cursor-default wu-select-none wu-items-center wu-text-xs wu-py-3 wu-pl-8 wu-pr-2 wu-outline-none wu-transition-colors focus:wu-bg-gray-20 focus:wu-text-accent-foreground data-[disabled]:wu-cursor-not-allowed data-[disabled]:wu-opacity-50",e),...n,children:[a.jsx("span",{className:"wu-absolute wu-rounded-full wu-left-2 wu-flex wu-h-4 wu-w-4 wu-items-center wu-justify-center wu-ring-1 wu-ring-gray-subtle group-disabled:wu-bg-gray-20 group-data-[state=checked]:wu-bg-white group-hover:wu-bg-gray-20 group-hover:wu-ring-blue-p wu-transition-all group-data-[state=checked]:wu-ring-blue-p group-hover:group-data-[state=checked]:wu-ring-blue-q",children:a.jsx(ne.ItemIndicator,{className:"wu-w-4 wu-h-4 wu-flex wu-items-center wu-justify-center",children:a.jsx("span",{className:"wm-circle wu-text-blue-p group-hover:group-data-[state=checked]:wu-text-blue-q wu-text-xs"})})}),t]}));Za.displayName=ne.RadioItem.displayName;const Xt=v.forwardRef(({className:e,inset:t,...n},r)=>a.jsx(ne.Label,{ref:r,className:f("wu-p-2 wu-font-medium wu-text-xs",t&&"wu-pl-8",e),...n}));Xt.displayName=ne.Label.displayName;const kn=v.forwardRef(({className:e,...t},n)=>a.jsx(ne.Separator,{ref:n,className:f("-wu-mx-1 wu-my-1 wu-h-px wu-bg-gray-20",e),...t}));kn.displayName=ne.Separator.displayName;const Ja=({option:e,value:t,multiple:n=!1,onSelect:r,accessorKey:s,dir:o})=>{const[i,u]=p.useState(n?[]:"");p.useEffect(()=>{t&&u(n?t.map(w=>JSON.stringify(w[s.value])):JSON.stringify(t[s.value]))},[t,s.value,n]);const l=n?i.includes(JSON.stringify(e[s.value])):i===JSON.stringify(e[s.value]),c=()=>{e.disabled||r(e)};return a.jsxs(Kt,{onSelect:c,disabled:e.disabled,className:f("wu-cursor-pointer wu-text-xs wu-items-start wu-leading-4 wu-py-2 wu-combobox-item hover:wu-bg-gray-100",l&&"wu-bg-gray-10"),dir:o,children:[n&&a.jsx(De,{checked:l}),a.jsx(Td,{option:e,accessorKey:s})]})},Td=({option:e,accessorKey:t})=>{const n=e[t.label];return a.jsxs("div",{className:"wu-flex wu-items-center wu-w-full wu-gap-1",children:[e.icon&&e.icon,n,e.isAdmin&&a.jsx("span",{className:"wu-ml-auto wu-text-sm wm-lock wu-text-orange-deep"})]})},Qa=e=>{const{option:t,selectAll:n,handleSelectAll:r,isCheckedAll:s,isPartialSelected:o,...i}=e;switch("type"in t?t.type:"option"){case"all":return a.jsxs(Kt,{onSelect:r,className:f("wu-cursor-pointer wu-text-xs wu-leading-4 wu-py-2 wu-combobox-item"),dir:i.dir,children:[a.jsx(De,{checked:s||o,partial:o,"data-partial":o,"aria-label":(n==null?void 0:n.label)||"Select All"}),a.jsx("span",{"aria-hidden":!0,children:(n==null?void 0:n.label)||"Select All"})]});case"group":return a.jsxs(Gt,{children:[a.jsx(Xt,{children:t.label}),t.options.map((l,c)=>p.createElement(Ja,{...i,option:l,key:c}))]});case"divider":return a.jsx(ja,{className:"wu-mx-4"});default:return a.jsx(Ja,{...i,option:t})}},Ed=e=>{const t=[],n=[],r=[],s=[];return e.forEach(o=>{o.type==="group"?(t.push(o),r.push(...o.options),s.push(...o.options.filter(i=>!i.disabled))):o.type==="divider"?n.push(o):r.push(o),o!=null&&o.disabled||s.push(o)}),{groups:t,dividers:n,allOptions:r,enabledOptions:s}},Ad=p.memo(Ie),kd=({data:e,accessorKey:t,value:n,defaultValue:r,Header:s,virtualizedThreshold:o=100,isEllipse:i,placeholder:u,variant:l,dir:c,onSelect:d,Label:w,maxHeight:h=420,multiple:m=!1,hasGroup:b=!1,selectAll:g,id:x,disabled:C,labelPosition:y="top",className:N,onScroll:S,maxContentWidth:E,enableSearch:I=!0,noDataContent:A,...k})=>{const[D,_]=p.useState(""),[F,$]=p.useState(),[O,G]=p.useState(!1),[z,ue]=p.useState(!1),[M,V]=p.useState(!1),q=p.useRef(null),{allOptions:B,enabledOptions:re}=p.useMemo(()=>b||g&&!g.includeDisabled?Ed(e):{allOptions:e,groups:[],dividers:[],enabledOptions:[]},[e,b]),ae=p.useMemo(()=>{if(!D)return e;const W=D.toLowerCase();return B.filter(ee=>ee[t.label].toLowerCase().includes(W))},[D,B,e,t.label]),ve=p.useMemo(()=>m&&g!=null&&g.enable&&!D&&ae.length>0?[{type:"all"},...ae]:ae,[ae,D,m]),Ue=p.useCallback(W=>{const ee=W[t.value];m?$(H=>{const be=H||[],Ce=be.some(me=>me[t.value]===ee)?be.filter(me=>me[t.value]!==ee):[...be,W];return d==null||d(Ce),Ce}):(G(!1),$(W),d==null||d(W))},[m,t.value,d]),j=p.useCallback(W=>_(W.target.value),[]),P=p.useCallback(()=>_(""),[]);p.useEffect(()=>{if(n!==void 0&&r!==void 0){console.error("defaultValue and value cannot be used simultaneously");return}else n!==void 0?$(n):r!==void 0&&$(r)},[n,r]),p.useEffect(()=>{if(!m)return;const W=g!=null&&g.includeDisabled?(F==null?void 0:F.length)===B.length:(F==null?void 0:F.length)===re.length;ue(W);const ee=(F==null?void 0:F.length)>0&&!W;V(ee)},[F,g]);const U=p.useCallback(()=>{const W=z?[]:g!=null&&g.includeDisabled?B:re;$(W),d==null||d(W)},[z,m,B,re,d,g]),Z=jt(y);return a.jsxs("div",{className:f(Z,"wu-flex wu-combobox-container"),ref:q,children:[a.jsxs(ze,{onOpenChange:W=>{W&&P(),G(W)},open:O,modal:!0,children:[a.jsx(vd,{selectedOptions:F,accessorKey:t,isEllipse:i,placeholder:u,variant:l,dir:c,multiple:m,disabled:C,selectAll:g,isCheckedAll:z,className:N,id:x,...k}),a.jsx(Me,{className:"wu-min-w-[--radix-popover-trigger-width] wu-max-w-[calc(100vw-32px)] wu-p-0 wu-bg-white wu-border wu-border-blue-p wu-combobox-content",align:"start",sideOffset:-1,style:{maxWidth:E},children:a.jsxs(Pr,{id:x,children:[I&&a.jsx("div",{className:"wu-m-2",children:a.jsx(Ad,{placeholder:"Search...",Icon:a.jsx("span",{className:"wm-search"}),className:"wu-text-xs wu-combobox-search",onChange:j,name:"Search","aria-label":"Search",dir:c,iconPosition:c==="rtl"?"right":"left"})}),s,a.jsxs(_r,{children:[a.jsx(Fr,{children:A||"No results found."}),ve.length>=o?a.jsx(yt,{className:"wu-combobox-list",containerHeight:h,list:ve,callback:(W,ee)=>a.jsx(Qa,{option:ee,value:F,onSelect:Ue,multiple:m,accessorKey:t,dir:c,selectAll:g,handleSelectAll:U,isCheckedAll:z,isPartialSelected:M},W),dir:c}):a.jsx("div",{style:{height:"fit-content",maxHeight:h,overflow:"auto"},className:"wu-combobox-list",onScroll:S,children:ve.map((W,ee)=>a.jsx(Qa,{option:W,value:F,onSelect:Ue,multiple:m,accessorKey:t,dir:c,selectAll:g,handleSelectAll:U,isCheckedAll:z,isPartialSelected:M},ee))})]})]})})]}),w&&a.jsx(Te,{htmlFor:x,className:"wu-combobox-label",children:w})]})},K={WuContentEditor:"_WuContentEditor_ylyja_8",EditorAction:"_EditorAction_ylyja_70",EditorActionActive:"_EditorActionActive_ylyja_73"},Id=[Sc.configure({link:{openOnClick:!1,autolink:!0,defaultProtocol:"https",protocols:["http","https"],isAllowedUri:(e,t)=>{try{const n=e.includes(":")?new URL(e):new URL(`${t.defaultProtocol}://${e}`);if(!t.defaultValidate(n.href))return!1;const r=["ftp","file","mailto"],s=n.protocol.replace(":","");if(r.includes(s)||!t.protocols.map(l=>typeof l=="string"?l:l.scheme).includes(s))return!1;const i=["example-phishing.com","malicious-site.net"],u=n.hostname;return!i.includes(u)}catch{return!1}},shouldAutoLink:e=>{try{const t=e.includes(":")?new URL(e):new URL(`https://${e}`),n=["example-no-autolink.com","another-no-autolink.com"],r=t.hostname;return!n.includes(r)}catch{return!1}}}}),Cc.configure({types:["heading","paragraph"]}),vc,xc,ht.TextStyle,ht.Color,ht.BackgroundColor,va.TaskList,va.TaskItem,ht.LineHeight,ht.FontSize,ht.FontFamily,Tc.configure({resize:{enabled:!0,alwaysPreserveAspectRatio:!0},inline:!0}),Nc.TableKit.configure({table:{resizable:!0}})],Ra=p.createContext(null),Md=({editor:e,children:t,customFonts:n})=>a.jsx(Ra.Provider,{value:{editor:e,customFonts:n},children:t}),he=()=>{const e=p.useContext(Ra);if(!e)throw new Error("useToolbar must be used within a ToolbarProvider");return e},Or=v.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>a.jsx(Ca.Root,{ref:s,decorative:n,orientation:t,className:f("wu-shrink-0 wu-bg-gray-40",t==="horizontal"?"wu-h-[1px] wu-w-full":"wu-h-full wu-w-[1px]",e),...r}));Or.displayName=Ca.Root.displayName;const Wr=({action:e,defaultValue:t})=>{var s;const[n,r]=p.useState();return p.useEffect(()=>{r(t||e.items.find(o=>o.active)||e.items[0])},[e,t]),a.jsxs(zt.DropdownMenu,{children:[a.jsx(zt.DropdownMenuTrigger,{className:f(K.EditorAction,e.active&&"wu-bg-blue-p/5 wu-text-blue-p"),children:a.jsx(R,{icon:n==null?void 0:n.icon})}),a.jsx(zt.DropdownMenuContent,{className:"wu-flex wu-min-w-0 wu-p-1 wu-gap-[6px] wu-border wu-border-blue-p wu-rounded wu-bg-white",align:"start",onCloseAutoFocus:o=>o.preventDefault(),children:(s=e.items)==null?void 0:s.map(o=>a.jsx(zt.DropdownMenuItem,{onClick:()=>{o.event(),r(o)},title:o.tooltip,children:a.jsx("button",{className:f(K.EditorAction,o.active&&"wu-bg-blue-p/5 wu-text-blue-p"),children:a.jsx(R,{icon:o.icon})})},o.id))})]})},Dd=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:r=>{var s,o,i,u,l,c;return{isParagraph:(s=r.editor)==null?void 0:s.isActive("paragraph"),isH1:(o=r.editor)==null?void 0:o.isActive("heading",{level:1}),isH2:(i=r.editor)==null?void 0:i.isActive("heading",{level:2}),isH3:(u=r.editor)==null?void 0:u.isActive("heading",{level:3}),isH4:(l=r.editor)==null?void 0:l.isActive("heading",{level:4}),isStyle:(c=r.editor)==null?void 0:c.isActive("heading")}}}),n=[{id:"paragraph",icon:"wm-format-paragraph",event:()=>e.chain().focus().setParagraph().run(),active:t.isParagraph},{id:"h1",icon:"wm-format-h1",event:()=>e.chain().focus().setHeading({level:1}).run(),active:t.isH1},{id:"h2",icon:"wm-format-h2",event:()=>e.chain().focus().setHeading({level:2}).run(),active:t.isH2},{id:"h3",icon:"wm-format-h3",event:()=>e.chain().focus().setHeading({level:3}).run(),active:t.isH3},{id:"h4",icon:"wm-format-h4",event:()=>e.chain().focus().setHeading({level:4}).run(),active:t.isH4}];return a.jsx(Wr,{action:{id:"style",active:t.isStyle,icon:"wm-format-paragraph",items:n},defaultValue:n.find(r=>r.active)})},Pd=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:({editor:n})=>({textColor:n.getAttributes("textStyle").color})});return a.jsxs("label",{className:K.EditorAction,htmlFor:"text-color",title:"Text Color",children:[a.jsx(R,{icon:"wm-format-color-text",className:"wu-cursor-pointer",style:{color:t.textColor}}),a.jsx("input",{type:"color",className:"wu-opacity-0 wu-w-0 wu-h-0",id:"text-color",defaultValue:"#545E6B",onChange:n=>e.chain().focus().setColor(n.target.value).run()})]})},_d=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:r=>{var s,o,i,u,l,c;return{isUl:(s=r.editor)==null?void 0:s.isActive("bulletList"),isOl:(o=r.editor)==null?void 0:o.isActive("orderedList"),isTodo:(i=r.editor)==null?void 0:i.isActive("taskList"),isList:((u=r.editor)==null?void 0:u.isActive("bulletList"))||((l=r.editor)==null?void 0:l.isActive("orderedList"))||((c=r.editor)==null?void 0:c.isActive("taskList"))}}}),n=[{id:"ul",icon:"wm-format-list-bulleted",event:()=>e.chain().focus().toggleBulletList().run(),active:t.isUl,tooltip:"Bulleted List"},{id:"ol",icon:"wm-format-list-numbered",event:()=>e.chain().focus().toggleOrderedList().run(),active:t.isOl,tooltip:"Numbered List"},{id:"todo",icon:"wm-checklist",event:()=>e.chain().focus().toggleTaskList().run(),active:t.isTodo,tooltip:"To-Do List"}];return a.jsx(Wr,{action:{id:"style",active:t.isList,icon:"wm-format-paragraph",items:n}})},Fd=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:r=>{var s,o,i,u,l,c,d;return{isLeft:(s=r.editor)==null?void 0:s.isActive({textAlign:"left"}),isCenter:(o=r.editor)==null?void 0:o.isActive({textAlign:"center"}),isRight:(i=r.editor)==null?void 0:i.isActive({textAlign:"right"}),isJustify:(u=r.editor)==null?void 0:u.isActive({textAlign:"justify"}),isAligned:((l=r.editor)==null?void 0:l.isActive({textAlign:"center"}))||((c=r.editor)==null?void 0:c.isActive({textAlign:"right"}))||((d=r.editor)==null?void 0:d.isActive({textAlign:"justify"}))}}}),n=[{id:"left",icon:"wm-format-align-left",event:()=>e.chain().focus().setTextAlign("left").run(),tooltip:"Align Left",active:t.isLeft},{id:"center",icon:"wm-format-align-center",event:()=>e.chain().focus().setTextAlign("center").run(),tooltip:"Align Center",active:t.isCenter},{id:"right",icon:"wm-format-align-right",event:()=>e.chain().focus().setTextAlign("right").run(),tooltip:"Align Right",active:t.isRight},{id:"justify",icon:"wm-format-align-justify",event:()=>e.chain().focus().setTextAlign("justify").run(),tooltip:"Justify",active:t.isJustify}];return a.jsx(Wr,{action:{id:"style",active:t.isAligned,icon:"wm-format-paragraph",items:n}})},Vd=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:n=>({code:n.editor.isActive("code")})});return a.jsx("button",{title:"Code line",className:f(K.EditorAction,(t==null?void 0:t.code)&&"wu-bg-blue-p/5 wu-text-blue-p"),onClick:e.chain().focus().toggleCode().run,children:a.jsx(R,{icon:"wm-code"})})},Ld=()=>{const{editor:e}=he(),t=[{id:"clear",icon:"wm-format-clear",event:()=>e.chain().focus().clearNodes().unsetAllMarks().run(),tooltip:"Clear Formatting"}];return a.jsx(a.Fragment,{children:t.map(n=>a.jsx("button",{title:n.tooltip,className:f(K.EditorAction),onClick:n.event,children:a.jsx(R,{icon:n.icon})},n.id))})},Od=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:n=>{var r;return{blockquote:(r=n.editor)==null?void 0:r.isActive("blockquote")}}});return a.jsx("button",{title:"quote",className:f(K.EditorAction,(t==null?void 0:t.quote)&&"wu-bg-blue-p/5 wu-text-blue-p"),onClick:e.chain().focus().toggleBlockquote().run,children:a.jsx(R,{icon:"wm-format-quote"})})},Wd=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:n=>{var r;return{superscript:(r=n.editor)==null?void 0:r.isActive("superscript")}}});return a.jsx("button",{title:"Superscript",className:f(K.EditorAction,(t==null?void 0:t.superscript)&&"wu-bg-blue-p/5 wu-text-blue-p"),onClick:e.chain().focus().toggleSuperscript().run,children:a.jsx(R,{icon:"wm-superscript"})})},Bd=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:n=>{var r;return{subscript:(r=n.editor)==null?void 0:r.isActive("subscript")}}});return a.jsx("button",{title:"Subscript",className:f(K.EditorAction,(t==null?void 0:t.superscript)&&"wu-bg-blue-p/5 wu-text-blue-p"),onClick:e.chain().focus().toggleSubscript().run,children:a.jsx(R,{icon:"wm-subscript"})})},qd=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:n=>{var r;return{bold:(r=n.editor)==null?void 0:r.isActive("bold")}}});return a.jsx("button",{title:"Bold",className:f(K.EditorAction,(t==null?void 0:t.bold)&&K.EditorActionActive),onClick:e.chain().focus().toggleBold().run,children:a.jsx(R,{icon:"wm-format-bold"})})},zd=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:n=>{var r;return{italic:(r=n.editor)==null?void 0:r.isActive("italic")}}});return a.jsx("button",{title:"Italic",className:f(K.EditorAction,(t==null?void 0:t.italic)&&K.EditorActionActive),onClick:e.chain().focus().toggleItalic().run,children:a.jsx(R,{icon:"wm-format-italic"})})},$d=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:n=>{var r;return{underline:(r=n.editor)==null?void 0:r.isActive("underline")}}});return a.jsx("button",{title:"Bold",className:f(K.EditorAction,(t==null?void 0:t.bold)&&K.EditorActionActive),onClick:e.chain().focus().toggleUnderline().run,children:a.jsx(R,{icon:"wm-format-underlined"})})},Hd=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:n=>{var r;return{strikethrough:(r=n.editor)==null?void 0:r.isActive("strike")}}});return a.jsx("button",{title:"strikethrough",className:f(K.EditorAction,(t==null?void 0:t.strikethrough)&&K.EditorActionActive),onClick:e.chain().focus().toggleStrike().run,children:a.jsx(R,{icon:"wm-format-strikethrough"})})},eo={overlay:"data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0",content:"data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[state=closed]:wu-slide-out-to-left-1/2 data-[state=closed]:wu-slide-out-to-top-[48%] data-[state=open]:wu-slide-in-from-left-1/2 data-[state=open]:wu-slide-in-from-top-[48%]"},to=Q.Root,no=Q.Trigger,Ud=Q.Portal,jd=Q.Close,ro=p.forwardRef(({className:e,...t},n)=>a.jsx(Q.Overlay,{ref:n,className:f("wu-fixed wu-inset-0 wu-z-50 wu-bg-black/30",eo.overlay,e),...t}));ro.displayName=Q.Overlay.displayName;const Br=p.forwardRef(({className:e,children:t,hideCloseButton:n,isStackedCard:r,...s},o)=>a.jsxs(Ud,{children:[a.jsx(ro,{className:r?"wu-bg-transparent":""}),a.jsxs(Q.Content,{ref:o,className:f("wu-fixed wu-left-[50%] wu-z-50 wu-top-[50%] wu-flex wu-flex-col wu-w-full wu-max-w-lg wu-translate-x-[-50%] wu-translate-y-[-50%] wu-bg-white wu-shadow-lg wu-duration-200",eo.content,e),...s,children:[t,!n&&a.jsx(Q.Close,{"aria-label":"close",asChild:!0,children:a.jsxs(gt,{variant:"iconOnly",className:f("wu-absolute wu-right-2 wu-top-1 hover:wu-bg-black hover:wu-bg-opacity-[0.04]","wu-top-3 wu-right-4 wu-p-1.5","group-data-[variant=action]:wu-text-blue-q","group-data-[variant=upgrade]:wu-text-yellow-deep","group-data-[variant=critical]:wu-text-red-deep"),children:[a.jsx("span",{className:"wm-close wu-text-xl wu-leading-5"}),a.jsx("span",{className:"wu-sr-only",children:"Close"})]})})]})]}));Br.displayName=Q.Content.displayName;const qr=({className:e,...t})=>a.jsx("div",{className:f("wu-text-center wu-bg-gray-20 wu-w-full",e),...t});qr.displayName="DialogHeader";const so=({className:e,...t})=>a.jsx("div",{className:f("wu-flex wu-flex-col-reverse sm:wu-flex-row sm:wu-justify-end sm:wu-space-x-2 wu-p-4",e),...t});so.displayName="DialogFooter";const Zt=p.forwardRef(({className:e,...t},n)=>a.jsx(Q.Title,{ref:n,className:f("wu-text-lg wu-font-medium wu-flex wu-items-center wu-justify-center wu-gap-1 wu-h-10 wu-leading-none wu-tracking-tight",e),...t}));Zt.displayName=Q.Title.displayName;const Gd=p.forwardRef(({className:e,...t},n)=>a.jsx(Q.Description,{ref:n,className:f("wu-text-sm wu-text-muted-foreground",e),...t}));Gd.displayName=Q.Description.displayName;const Kd={gradientBackground:"_gradientBackground_1uc4j_1"},ao=e=>{const{colors:t,size:n=.55,children:r,className:s,strokeWidth:o,centerOffset:i={x:0,y:0},...u}=e,l=p.useRef(null);return p.useEffect(()=>{const c=l.current;if(c){c.style.setProperty("--width",`${c.offsetWidth*n}px`),c.style.setProperty("--height",`${c.offsetHeight*n}px`),c.style.setProperty("--colors",t.join(",")),c.style.setProperty("--stroke-width",`-${o||2}px`),c.style.setProperty("--spotlight-background","radial-gradient(100% var(--height) ellipse at 25% 70%, var(--colors))");let w;const h=m=>{w&&cancelAnimationFrame(w),w=requestAnimationFrame(()=>{const b=c.getBoundingClientRect();let g=m.clientX-b.left,x=m.clientY-b.top;g=Math.max(0,Math.min(g+i.x,b.width)),x=Math.max(0,Math.min(x+i.y,b.height));const C=`radial-gradient(
|
|
4
|
+
focus-visible:wu-bg-opacity-[.04] focus-visible:wu-ring-0 focus-visible:wu-outline-none focus-visible:wu-ring-offset-0`,rel:"noreferrer",children:a.jsx(Ma,{item:r,dir:t})})},s))})})},Ma=({item:e,dir:t})=>a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-[5px]",dir:t,children:[a.jsx("div",{className:"wu-flex wu-items-center wu-justify-center wu-w-6 wu-h-6",children:a.jsx("span",{className:f("wu-text-xl wu-text-gray-lead",e.icon)})}),a.jsx("p",{className:"wu-text-sm wu-text-gray-lead",children:e.title})]}),Yc=e=>{const[t,n]=p.useState(()=>window.innerWidth<=e);return p.useEffect(()=>{const r=()=>{n(window.innerWidth<=e)};return window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}},[e]),t};function Xc({productCategories:e,openCategory:t,setOpenCategory:n}){const r=(u,l)=>{const c=l[u];if(c){c.focus();const d=e[u]||null;n(d)}},s=(u,l,c,d)=>{u.preventDefault();const w=c==="down"?l+1:l-1;r(w,d)},o=(u,l,c,d)=>{t!=null&&t.products&&t.products[t.products.length-1].name===d&&(u.preventDefault(),r(l+1,c))},i=(u,l)=>{u.preventDefault();const c=e[l]===t?null:e[l];n(c)};return function(l,c,d){const w=document.querySelectorAll("[data-product-category]"),{key:h}=l;switch(h){case"ArrowDown":s(l,c,"down",w);break;case"ArrowUp":s(l,c,"up",w);break;case"Tab":o(l,c,w,d);break;case"Enter":case" ":i(l,c);break}}}const Zc=e=>{const{size:t="lg",className:n,children:r,...s}=e,o={sm:"wu-text-body-3",md:"wu-text-body-2",lg:"wu-text-body-1"},i=e.as||"div";return a.jsx(i,{...s,className:f(o[t],n),children:r})},Jc=e=>{const{size:t="xl",className:n,children:r,...s}=e,o={sm:"h4",md:"h3",lg:"h2",xl:"h1"},i={sm:"wu-text-heading-4",md:"wu-text-heading-3",lg:"wu-text-heading-2",xl:"wu-text-heading-1"},u=o[t];return a.jsx(u,{...s,className:f(i[t],n),children:r})},Qc=e=>{const{size:t="lg",className:n,children:r,...s}=e,o={sm:"wu-text-sub-3",md:"wu-text-sub-2",lg:"wu-text-sub-1"},i=e.as||"div";return a.jsx(i,{...s,className:f(o[t],n),children:r})},Rc=e=>{const{size:t="lg",className:n,children:r,...s}=e,o={md:"wu-text-display-2",lg:"wu-text-display-1"},i=e.as||"h1";return a.jsx(i,{...s,className:f(o[t],n),children:r})},R=e=>{const{icon:t,className:n,...r}=e;return a.jsx("span",{...r,className:f(t,n),role:"presentation","aria-label":t})},ed=({buttonRef:e,handleDropdownToggle:t,handleKeyDown:n,isDropdownOpen:r,activeProductName:s,dir:o="ltr",homeLink:i="/"})=>a.jsxs("button",{ref:e,type:"button",className:f("wu-text-base wu-font-normal wu-flex wu-items-center wu-justify-between wu-px-2 wu-gap-2 wu-w-full focus:wu-outline-none focus-visible:wu-bg-white/10 wu-switcher-trigger"),onClick:t,onKeyDown:u=>{r&&u.key==="ArrowDown"&&n(u,-1)},"aria-label":"product-switcher",children:[a.jsx("a",{className:"wu-pl-2 wu-pr-0 wu-aspect-auto focus:wu-outline-none focus-visible:wu-bg-white/10 wu-switcher-logo",tabIndex:-1,href:i,children:a.jsx(R,{icon:"wc-logo",className:"wu-text-xl wu-leading-4 wu-relative wu-top-1"})}),s,a.jsx("span",{className:f("wm-arrow-drop-down wu-text-2xl wu-transition-transform wu-duration-300",r&&"wu-rotate-180",o==="rtl"?"wu-mr-auto":"wu-ml-auto")})]}),se={productDropdownMenu:"_productDropdownMenu_amyba_1",productDropdownMenuOpen:"_productDropdownMenuOpen_amyba_38",rtlDropdownMenu:"_rtlDropdownMenu_amyba_51",productCategory:"_productCategory_amyba_55",open:"_open_amyba_61",productCategoryBorderTop:"_productCategoryBorderTop_amyba_66",productList:"_productList_amyba_93",rtlProductList:"_rtlProductList_amyba_114",productListItem:"_productListItem_amyba_137",productLink:"_productLink_amyba_162",activeProduct:"_activeProduct_amyba_164",topBorder:"_topBorder_amyba_169",topBorderRtl:"_topBorderRtl_amyba_190"},td=({category:e,dir:t="ltr",openCategory:n})=>{const r=e.active?"#c5cce0":"#f0c36a",s=(n==null?void 0:n.name)===e.name,o=f("wm-arrow-forward-ios wu-text-xs wu-tracking-widest wu-text-muted-foreground wu-mr-2.5 group-hover:wu-hidden wu-text-blue-q",t==="rtl"&&"wu-rotate-180 wu-ml-2.5 wu-text-blue-q group-hover:wu-hidden",s&&"wu-hidden","wu-relative wu-top-[5px]"),i=f("wm-lock wu-text-orange-soft wu-text-base wu-mr-2.5 group-hover:wu-hidden",t==="rtl"&&"wu-ml-2.5 group-hover:wu-hidden",s&&"wu-hidden","wu-relative wu-top-1");return a.jsxs("div",{className:f("group focus:wu-outline-none focus-visible:wu-outline-none wu-flex wu-items-center wu-w-full wu-bg-white wu-relative wu-justify-between"),dir:t,children:[a.jsx("div",{className:se.productCategoryBorderTop,style:{backgroundColor:r}}),a.jsxs("div",{className:"wu-flex wu-items-center wu-px-1 wu-relative wu-top-1",children:[a.jsx("div",{className:"wu-w-[56px] wu-h-[56px] wu-flex wu-items-center wu-justify-center",children:a.jsx("img",{src:e.logo,alt:e.name,width:"32px",height:"32px"})}),a.jsx("span",{className:"wu-text-sm wu-leading-5 wu-text-blue-q wu-relative wu-top-[1px]",children:e.name})]}),e.active?a.jsx("span",{className:o}):a.jsx("span",{className:i})]})},nd={e309:"wp-audience",e381:"wp-bi",e329:"wp-closed-loop",e314:"wp-communities",e313:"wp-cx",e352:"wp-digsite",e324:"wp-empower",e317:"wp-insightshub",e380:"wp-instant-answers",e378:"wp-intercept",e311:"wp-livepolls",e316:"wp-reputation",e379:"wp-suite-cx",e382:"wp-suite-cx",e308:"wp-surveys",e315:"wp-workforce"},rd=({product:e,currentProduct:t,activeProductName:n,dir:r,focusItem:s,setFocusItem:o})=>{const[i,u]=p.useState(e.name===t),l=e.name===n,c=e.name===t,d=!e.active,w="#1b3380",h="#c5cce0",m="#ffcf70",b=f("wu-font-normal wu-text-xs wu-text-gray-lead wu-text-center",c&&"wu-text-blue-q wu-font-normal",!e.active&&"wu-text-gray-subtle",i&&"wu-font-normal",e.active&&i&&"wu-text-blue-q"),g=f("wu-text-blue-p wu-text-base",c&&"wu-text-blue-q",!e.active&&"wu-text-gray-subtle",e.active&&i&&"wu-text-blue-q"),x=i||s===e.name||l?w:h;return a.jsxs("li",{className:f(se.productListItem,"focus-visible:wu-outline-none focus:wu-outline-none wu-sub-product-list-item",(l||i)&&se.activeProduct,e.name.length>15&&window.innerWidth>768&&"wu-w-[130px] wu-min-w-[130px]",s===e.name&&se.activeProduct,"wu-product-item"),onMouseOver:()=>u(!0),onMouseOut:()=>u(!1),"aria-label":e.name,"aria-disabled":d,dir:r,onKeyDown:C=>{if(C.key==="Enter"){C.preventDefault();const y=C.currentTarget.querySelector("a");y&&y.click()}},onFocus:()=>{o(e.name)},onBlur:()=>o(""),children:[a.jsx("div",{className:f(se.topBorder,r==="rtl"&&se.topBorderRtl),style:{backgroundColor:d?m:x}}),a.jsxs("a",{className:f(se.productLink,"focus:wu-outline-none focus-visible:wu-outline-none"),href:e.link||"#",tabIndex:0,children:[a.jsx("span",{className:f(g,nd[e.icon||""]),"aria-hidden":!0}),a.jsx("span",{className:f(b),children:e.name})]})]},e.name)},sd=({category:e,currentProduct:t,activeProductName:n,dir:r="ltr",focusItem:s,setFocusItem:o,borderColorLocked:i="#f5a300"})=>{const{products:u=[],active:l}=e,c=p.useMemo(()=>u.filter(b=>b.active).sort((b,g)=>(b.order||100)-(g.order||100)),[u]),d=p.useMemo(()=>u.filter(b=>!b.active),[u]),[w,h]=p.useState(i),m=b=>b.map((g,x)=>a.jsx(rd,{product:g,currentProduct:t,activeProductName:n,dir:r,focusItem:s,setFocusItem:o},x));return l?a.jsxs(a.Fragment,{children:[m(c),d.length>0&&a.jsxs("li",{className:f(se.productListItem,"focus:wu-outline-none focus-visible:wu-outline-none !wu-bg-[#f5f5f5] hover:!wu-bg-[#eeeeee] wu-group"),onMouseOver:()=>h("#f5a300"),onMouseOut:()=>h(i),"aria-label":"Upgrade to unlock",children:[a.jsx("div",{className:f(se.topBorder,r==="rtl"&&se.topBorderRtl),style:{backgroundColor:w},"aria-label":"top-border"}),a.jsxs("a",{href:"https://www.questionpro.com/a/showUpgradeUser.do",className:f(se.productLink,"wu-flex wu-flex-col wu-items-center wu-justify-center wu-py-2 wu-min-w-[88px]"),children:[a.jsx("span",{className:"wu-text-base wu-transition-colors wm-lock !wu-text-orange-soft group-hover:wu-text-orange-deep"}),a.jsxs("span",{className:"wu-text-[10px] wu-leading-[10px] wu-text-center wu-pt-1 !wu-text-orange-deep",children:["Upgrade to ",a.jsx("br",{})," unlock"]})]})]}),m(d)]}):a.jsxs("li",{className:f(se.productListItem,se.learnMore,"focus:wu-outline-none focus-visible:wu-outline-none wu-product-item-inactive !wu-bg-[#f5f5f5] hover:!wu-bg-[#eeeeee]",s==="learn"&&"activeProduct"),tabIndex:0,onFocus:()=>o("learn"),onBlur:()=>o(""),"aria-label":"Learn More",children:[a.jsx("div",{className:f(se.topBorder,r==="rtl"&&se.topBorderRtl),style:{backgroundColor:i}}),a.jsx("a",{className:se.productLink,href:"https://www.questionpro.com/a/showUpgradeUser.do",tabIndex:-1,children:a.jsx("span",{className:"wu-text-[#f99e03]",children:"Learn More"})})]})},Da=({dropdownRef:e,dir:t,isDropdownOpen:n,productCategories:r,openCategory:s,setOpenCategory:o,handleKeyDown:i,expandAll:u,activeProductName:l,focusItem:c,setFocusItem:d})=>{const w="#ffcf70",[h,m]=p.useState(window.innerWidth>768);return p.useEffect(()=>{const b=()=>{m(window.innerWidth>375)};return window.addEventListener("resize",b),()=>window.removeEventListener("resize",b)},[]),a.jsx("ul",{className:f(se.productDropdownMenu,n&&se.productDropdownMenuOpen,t==="rtl"&&se.rtlDropdownMenu,"wu-switcher-container"),ref:e,dir:t,"aria-label":"product-dropdown-menu","data-state":n?"open":"closed",children:r.map((b,g)=>a.jsxs("li",{className:f(se.productCategory,"focus:wu-outline-none focus-visible:wu-outline-none wu-h-16 wu-category-item",s===b&&se.open,u&&se.open),onMouseEnter:()=>h&&o(b),onMouseLeave:()=>h&&o(null),"aria-label":b.name,dir:t,onKeyDown:x=>i(x,g),tabIndex:0,"data-product-category":!0,children:[a.jsx(td,{category:b,dir:t,openCategory:s}),a.jsx("ul",{className:f(se.productList,t==="rtl"&&se.rtlProductList),dir:t,children:a.jsx(sd,{category:b,dir:t,activeProductName:l,currentProduct:b.name,focusItem:c,setFocusItem:d,borderColorLocked:w})})]},b.name))})},ad=({isProductButtonShow:e,isDropdownOpen:t,activeProductColor:n,activeProductBgColor:r,activeProductName:s,dir:o,smallScreenButtonRef:i,handleDropdownToggle:u,handleKeyDown:l})=>a.jsx("div",{className:f("wu-absolute wu-top-11 wu-transition-all wu-duration-300 wu-ease-in-out wu-transform wu-opacity-100 wu-w-[256px] wu-z-10",e?o==="rtl"?"wu-right-0 wu-overflow-hidden":"wu-translate-x-0 wu-left-0":o==="rtl"?"wu-right-0 wu-w-0":"wu--translate-x-full"),style:{backgroundColor:t?n.hover:r},children:a.jsxs("button",{ref:i,type:"button",className:f("wu-text-base wu-leading-[48px] wu-flex wu-items-center wu-justify-center wu-px-2 wu-gap-2 wu-w-full focus:wu-outline-none focus-visible:wu-bg-white/10 wu-switcher-trigger",e?"wu-flex":o==="rtl"?"wu-hidden":"wu-flex"),onClick:u,onKeyDown:c=>{t&&c.key==="ArrowDown"&&l(c,-1)},"aria-label":"small-screen-product-btn",children:[s,a.jsx("span",{className:f("wm-arrow-drop-down wu-text-2xl wu-transition-transform wu-duration-300",t&&"wu-rotate-180")})]})}),od=({dir:e,isProductButtonShow:t,smallScreenToggleButtonRef:n,setIsProductButtonShow:r,setDropdownOpen:s})=>{const o=()=>{r(i=>!i),t&&s(!1)};return a.jsxs("button",{className:f("wu-relative wu-w-10 wu-h-10 wu-flex wu-flex-col wu-justify-center wu-items-center",e==="rtl"?"wu-mr-4":"wu-ml-4"),onClick:o,ref:n,"aria-label":"menu-toggle-btn",children:[a.jsx("span",{className:`wu-absolute wu-w-6 wu-h-[3px] wu-bg-white wu-transition-transform wu-duration-300 ${t?"wu-rotate-45 wu-translate-y-0":"-wu-translate-y-2.5"}`}),a.jsx("span",{className:`wu-absolute wu-w-6 wu-h-[3px] wu-bg-white wu-transition-opacity wu-duration-300 ${t?"wu-opacity-0":"wu-opacity-100"}`}),a.jsx("span",{className:`wu-absolute wu-w-6 wu-h-[3px] wu-bg-white wu-transition-transform wu-duration-300 ${t?"-wu-rotate-45 wu-translate-y-0":"wu-translate-y-2.5"}`})]})},Pa=({productCategories:e,activeProductName:t,activeProductColor:n={base:"#1b87e6",hover:"#54A5EC"},dir:r,homeLink:s,expandAll:o})=>{const i=p.useRef(null),u=p.useRef(null),l=p.useRef(null),c=p.useRef(null),[d,w]=p.useState(!1),[h,m]=p.useState(null),[b,g]=p.useState(n.base),[x,C]=p.useState(""),[y,N]=p.useState(!1),S=Yc(768);Tr([u,i],()=>{w(!1),m(null)}),Tr([l,c,u],()=>{N(!1),w(!1),m(null)}),p.useEffect(()=>{const A=k=>{k.key==="Escape"&&w(!1)};return document.addEventListener("keydown",A),()=>{document.removeEventListener("keydown",A)}},[d]),p.useEffect(()=>g(n.base),[n.base]);const E=A=>{A.preventDefault(),A.stopPropagation(),w(k=>{const D=!k;return D||m(null),D})},I=(A,k)=>{Xc({productCategories:e,openCategory:h,setOpenCategory:m})(A,k,x)};return a.jsx("div",{className:f("wu-inline-flex wu-items-center wu-justify-between wu-relative wu-z-auto wu-h-12 wu-text-white"),children:S?a.jsxs("div",{className:"wu-relative wu-flex",children:[a.jsx(od,{dir:r,isProductButtonShow:y,smallScreenToggleButtonRef:c,setDropdownOpen:w,setIsProductButtonShow:N}),a.jsx(ad,{isProductButtonShow:y,isDropdownOpen:d,activeProductColor:n,activeProductBgColor:b,activeProductName:t,handleDropdownToggle:E,smallScreenButtonRef:l,handleKeyDown:I,dir:r}),a.jsx("div",{className:f("wu-absolute wu-top-[92px] wu-left-0 wu-text-[18px]",r==="rtl"&&"wu-right-[256px] wu-left-auto"),children:a.jsx(Da,{activeProductName:t,focusItem:x,setFocusItem:C,handleKeyDown:I,isDropdownOpen:d,openCategory:h,productCategories:e,setOpenCategory:m,dropdownRef:u,expandAll:o,dir:r})})]}):a.jsxs("div",{className:"wu-relative wu-flex wu-items-center wu-justify-start wu-h-full wu-w-[256px]",dir:r,style:{backgroundColor:d?n.hover:b},onMouseOver:()=>g(n.hover),onMouseOut:()=>g(n.base),children:[a.jsx(ed,{activeProductName:t,dir:r,homeLink:s,buttonRef:i,handleDropdownToggle:E,handleKeyDown:I,isDropdownOpen:d}),a.jsx(Da,{activeProductName:t,focusItem:x,setFocusItem:C,handleKeyDown:I,isDropdownOpen:d,openCategory:h,productCategories:e,setOpenCategory:m,dropdownRef:u,expandAll:o,dir:r})]})})},_a=({children:e,dir:t,className:n})=>a.jsx("section",{className:f("wu-flex wu-items-center wu-flex-1 wu-min-w-0 wu-h-12 wu-gap-2 wu-px-2",t==="rtl"&&"wu-flex-row-reverse",n),children:a.jsx("div",{className:"wu-grow",children:e})}),kr=v.forwardRef(({className:e,type:t,...n},r)=>a.jsx("input",{type:t,className:f("wu-flex wu-h-8 wu-w-full wu-border-b wu-border-gray-subtle wu-bg-gray-10 wu-p-2 wu-text-sm wu-font-normal wu-text-gray-lead","file:wu-border-0 file:wu-bg-gray-40 file:wu-text-gray-notification file:wu-text-sm file:wu-font-normal file:wu-relative file:wu-bottom-[3px]","wu-placeholder:wu-text-gray-subtle wu-placeholder:wu-font-light","disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle","read-only:wu-cursor-not-allowed read-only:wu-bg-gray-20 read-only:wu-border-gray-40 read-only:wu-text-gray-subtle","focus:wu-border-blue-p focus-visible:wu-outline-none wu-transition-colors hover:wu-border-gray-40",e),ref:r,...n}));kr.displayName="Input";const id=e=>{const{message:t,className:n,...r}=e;return a.jsx("p",{...r,className:f("wu-text-sub-3 wu-break-words wu-font-light",n),style:{color:"rgb(var(--wu-red-deep))",...r.style},children:t})},ud=e=>{var u,l;const{inputRef:t,maxLength:n=50,className:r,...s}=e,[o,i]=p.useState(!1);return p.useEffect(()=>{var c;(((c=t==null?void 0:t.current)==null?void 0:c.value.length)||0)>.75*n?i(!0):i(!1)},[(u=t==null?void 0:t.current)==null?void 0:u.value,n]),a.jsx("p",{...s,className:f("wu-text-sub-3 wu-font-light",r),style:{color:"rgb(var(--wu-gray-subtle))",...s.style},children:o&&`${(l=t==null?void 0:t.current)==null?void 0:l.value.length}/${n}`})},ld=ke.cva("wu-text-xs wu-font-normal wu-leading-none peer-disabled:wu-cursor-not-allowed peer-disabled:wu-text-gray-subtle peer-readonly:wu-text-gray-subtle peer-required:after:wu-content-['*'] peer-required:after:wu-ml-[2px] peer-required:after:wu-text-red-deep peer-aria-[required]:after:wu-content-['*'] peer-aria-[required]:after:wu-ml-[2px] peer-aria-[required]:after:wu-text-red-deep"),Sn=v.forwardRef(({className:e,...t},n)=>a.jsx(Ca.Root,{ref:n,className:f(ld(),e),...t}));Sn.displayName=Ca.Root.displayName;const Te=e=>a.jsx(Sn,{...e,className:f("wu-text-gray-lead wu-leading-6",e.className)}),cd=({Label:e,Error:t,Hint:n,Input:r,labelPosition:s="top",dir:o="ltr",className:i,...u})=>{const c=f("wu-flex",s==="top"?"wu-flex-col wu-gap-1":"wu-flex-row wu-items-center wu-gap-2",i),d=f("wu-flex wu-flex-col wu-gap-1 wu-relative wu-flex-1 wu-form-group-wrapper"),w=f("wu-absolute -wu-bottom-5",o==="ltr"?"wu-right-0":"wu-left-0","wu-form-group-hint"),h=f("wu-absolute -wu-bottom-5",o==="ltr"?"wu-left-0":"wu-right-0","wu-form-group-error");return a.jsxs("div",{className:c,dir:o,...u,children:[e,a.jsxs("div",{className:d,children:[r,n&&a.jsx("div",{className:w,children:n}),t&&a.jsx("div",{className:h,children:t})]})]})},Ie=p.forwardRef((e,t)=>{const{Label:n,labelPosition:r="top",Icon:s,iconPosition:o,type:i,value:u,variant:l="flat",readonly:c,id:d=Cn(),...w}=e,h=jt(r),m=s?o!=="right"?"wu-pl-8":"wu-pr-8":"",[b,g]=p.useState(!1),x=()=>{g(y=>!y)},C=y=>{w.onChange&&w.onChange(y)};return a.jsx(a.Fragment,{children:i==="submit"?a.jsx(xe,{type:"submit",className:w.className,id:d,children:n||"Submit"}):a.jsx("div",{className:f("wu-flex wu-flex-col wu-gap-2 wu-input-container"),dir:w.dir,children:a.jsxs("div",{className:f("wu-flex wu-gap-1 wu-relative",h,(r==="right"||r==="left")&&"wu-items-center","wu-input-wrapper"),children:[s&&o!=="right"&&a.jsx("div",{className:"wu-absolute wu-flex wu-items-center wu-justify-center wu-w-8 wu-h-8 wu-input-icon-container",children:s}),a.jsx(kr,{...w,className:f("wu-peer wu-text-xs wu-rounded-t-sm",l==="outlined"?"wu-border wu-border-gray-subtle":"",m,w.className),type:b?"text":i,ref:t,readOnly:c,onChange:w.onChange&&C,value:u,id:d}),s&&o==="right"&&a.jsx("div",{className:"wu-absolute wu-right-0 wu-flex wu-items-center wu-justify-center wu-w-8 wu-h-8 wu-input-icon-container",children:s}),i==="password"&&a.jsx("div",{className:"wu-absolute wu-right-0 wu-flex wu-items-center wu-justify-center wu-w-8 wu-h-8 wu-cursor-pointer",onClick:x,children:a.jsx("button",{type:"button",className:"wu-flex wu-items-center wu-justify-center wu-w-6 wu-h-6 wu-rounded-sm focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft","aria-label":"show-password",children:b?a.jsx("span",{className:"wm-visibility wu-text-gray-subtle"}):a.jsx("span",{className:"wm-visibility-off wu-text-gray-subtle"})})}),n&&a.jsx(Te,{htmlFor:d,className:"wu-flex-none wu-w-fit wu-input-label",children:n})]})})})});Ie.displayName="WuInput";const dd=({className:e,placeholder:t="Search surveys, folders or tools",defaultCollapsed:n=!0,onSearch:r,...s})=>{const[o,i]=p.useState(n);return p.useEffect(()=>{i(n)},[n]),a.jsx(Ie,{...s,placeholder:t,onChange:u=>r(u.target.value),className:f("wu-rounded-full focus-visible:wu-outline-2 focus-visible:wu-outline-blue-focus -wu-outline-offset-2 wu-bg-white","wu-transition-all wu-duration-300 wu-ease-in-out",o?"wu-w-8 wu-px-2 wu-text-lg wu-rounded-full wu-h-8 wu-border wu-border-white wu-bg-transparent":"wu-w-40 sm:wu-w-60",e),type:"search",Icon:a.jsx(R,{"data-testid":"search-icon",icon:"wm-search",className:f("wu-text-gray-lead wu-cursor-pointer",o&&"wu-text-white"),onClick:()=>i(u=>!u)})})},Fa=$t.Provider,Va=$t.Root,La=$t.Trigger,Ir=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx($t.Content,{ref:r,sideOffset:t,className:f("wu-z-50 wu-overflow-hidden wu-bg-gray-notification wu-text-white wu-px-3 wu-py-1.5 wu-text-sm wu-shadow-md",e),...n}));Ir.displayName=$t.Content.displayName;const Tn=p.forwardRef(({content:e,position:t,positionOffset:n,duration:r,children:s,className:o,showArrow:i=!1,open:u,onOpenChange:l,...c},d)=>a.jsx(Fa,{delayDuration:r||200,children:a.jsxs(Va,{open:u,onOpenChange:l,children:[a.jsx(La,{asChild:!0,children:a.jsx("span",{ref:d,children:s})}),a.jsx(pr.Portal,{children:e&&a.jsxs(Ir,{...c,side:t||"top",sideOffset:n||0,className:f("wu-max-w-sm wu-max-h-96 wu-overflow-y-auto",o),children:[e,i&&a.jsx(pr.Arrow,{className:"wu-fill-gray-notification wu-tooltip-arrow"})]})})]})}));Tn.displayName="WuTooltip";const wd=({label:e,className:t})=>{const n=p.useRef(null),[r,s]=p.useState(!1);return p.useEffect(()=>{const o=n.current;if(o){const i=o.clientWidth,u=o.scrollWidth,l=u/e.length,c=e.length*l;s(c>i||u>i)}},[e]),a.jsx("p",{ref:n,className:f("wu-w-full wu-truncate",t),children:r?a.jsx(Tn,{content:e,positionOffset:8,children:e}):e})},fd=e=>{var w;const{productName:t,categories:n=[],user:r,children:s,onLogout:o,homeLink:i=window.location.origin,brandColor:u,dir:l="ltr",expandAll:c,DataCenter:d}=e;return a.jsx("div",{className:"wu-sticky wu-top-0 wu-z-50 wu-w-full",children:a.jsxs("header",{className:f("wu-h-12 wu-flex wu-items-center wu-justify-between wu-relative wu-bg-blue-switcher wu-text-white",l==="rtl"&&"wu-flex-row-reverse",e.className),style:e.style,children:[Wc((w=r==null?void 0:r.profile)==null?void 0:w.subtitle)&&window.wickUiVersion&&a.jsxs("p",{className:"wu-text-[10px] wu-text-gray-subtle wu-font-normal wu-absolute wu-top-11 wu-right-1 wu-z-[-1] wu-invisible","aria-label":"wickUiVersion",children:["Wick UI: v",window.wickUiVersion]}),a.jsx("section",{className:"wu-flex wu-items-center wu-gap-2 wu-shrink-0",children:a.jsx(Pa,{productCategories:n,activeProductName:t,activeProductColor:u,dir:l,homeLink:i,expandAll:c})}),a.jsx(_a,{dir:l,children:s}),a.jsxs("section",{className:f("wu-flex wu-items-center wu-justify-end wu-shrink-0 wu-gap-2",l==="rtl"?"wu-flex-row-reverse wu-pl-4":"wu-flex-row wu-pr-4"),children:[a.jsx(Ia,{dir:l}),(r==null?void 0:r.profile)&&Object.keys(r.profile).length>0&&a.jsx(ka,{user:r,onLogout:o,dir:l,DataCenter:d})]})]})})},ze=Ht.Root,tt=Ht.Trigger,Me=v.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},s)=>a.jsx(Ht.Portal,{children:a.jsx(Ht.Content,{ref:s,align:t,sideOffset:n,className:f("wu-z-50 wu-w-72 wu-border wu-bg-popover wu-p-4 wu-text-popover-foreground wu-shadow-md wu-outline-none data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[side=bottom]:wu-slide-in-from-top-2 data-[side=left]:wu-slide-in-from-right-2 data-[side=right]:wu-slide-in-from-left-2 data-[side=top]:wu-slide-in-from-bottom-2",e),...r})}));Me.displayName=Ht.Content.displayName;function Oa({className:e,classNames:t,dir:n="ltr",...r}){const s=va.getDefaultClassNames();return a.jsx(va.DayPicker,{showOutsideDays:r.showOutsideDays||!1,className:f("wu-p-3",e),classNames:{root:f(s.root,"wu-relative wu-rounded-none wu-bg-white dark:wu-bg-gray-switcher"),caption_label:f("wu-text-xs",r.captionLayout==="dropdown"?"wu-hidden":""),month_caption:f(s.month_caption,"wu-mb-5"),months:f(s.months,"wu-flex wu-flex-col sm:wu-flex-row wu-gap-4"),dropdowns:f(s.dropdowns,"wu-flex wu-items-center wu-justify-start wu-gap-2",(r.mode==="range","")),dropdown:f(s.dropdown,"wu-px-2 wu-py-1 wu-text-sm wu-text-gray-lead wu-font-medium focus:wu-outline-none wu-bg-white wu-border-b wu-border-gray-subtle focus-visible:wu-border-blue-p"),weekday:f(s.weekday,"wu-text-gray-lead wu-rounded-none wu-w-9 wu-font-normal wu-text-xs wu-bg-gray-10 wu-py-2"),day_button:f(s.day_button,"wu-w-full wu-h-full focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-pHover focus-visible:wu-ring-offset-2"),day:f(s.day,"wu-text-gray-lead wu-transition-colors wu-duration-300 [&:not([aria-selected])]:hover:wu-bg-gray-25 wu-text-sm wu-w-9 wu-h-9 wu-min-w-0 wu-text-center wu-p-0 wu-rounded-none data-[today=true]:[&:not([aria-selected])]:wu-border data-[today=true]:[&:not([aria-selected])]:wu-border-blue-p data-[today=true]:[&:not([aria-selected])]:wu-text-gray-lead"),selected:f(s.selected,"wu-bg-blue-p [&:not(.rm)]:wu-text-white hover:wu-bg-blue-pHover"),range_middle:f("rm",s.range_middle,"wu-bg-blue-p/10 wu-rounded-none hover:wu-bg-blue-p/20 wu-text-gray-lead hover:wu-text-white data-[today=true]:wu-bg-blue-p/20 hover:data-[today=true]:wu-bg-blue-pHover"),range_end:f(s.range_end,"wu-rounded-none"),range_start:f(s.range_start,"wu-rounded-none wu-bg-blue-p hover:wu-bg-blue-pHover"),month_grid:f(s.month_grid,"[&>thead>tr>th]:wu-pb-2 wu-border-collapse wu-space-y-1"),button_next:f(s.button_next,Ar({variant:"iconOnly"}),"wu-h-6 wu-w-6 wu-text-gray-lead"),button_previous:f(s.button_previous,Ar({variant:"iconOnly"}),"wu-h-6 wu-w-6 wu-rotate-180 wu-text-gray-lead"),nav:f(s.nav,"wu-absolute wu-top-4 wu-right-3 wu-flex",n==="rtl"&&"wu-right-auto wu-left-3 wu-flex-row-reverse"),chevron:f(s.chevron,"!wu-text-red-500"),outside:f(s.outside,"wu-invisible"),disabled:f(s.disabled,"hover:wu-bg-white wu-text-gray-subtle"),...t},components:{Chevron:()=>a.jsx("span",{className:"wm-chevron-right wu-text-lg wu-leading-5"})},...r})}Oa.displayName="Calendar";const Mr=e=>a.jsx(Oa,{...e}),Wa=e=>{const{handleDateChange:t,disabled:n,onReset:r,showResetButton:s}=e;return a.jsxs("div",{className:"wu-flex wu-items-center wu-justify-end wu-gap-2 wu-mt-2 wu-date-picker-footer",children:[s&&a.jsx(xe,{variant:"secondary",onClick:r,Icon:a.jsx("span",{className:"wu-text-[20px] wu-leading-5 -wu-mt-[1px] wm-refresh"}),className:"wu-date-picker-footer-reset",children:"Reset"}),a.jsx(qt.PopoverClose,{asChild:!0,children:a.jsx(xe,{onClick:t,disabled:n,className:"wu-date-picker-apply",children:"Apply"})})]})},Dr=({formattedString:e,dir:t,placeholder:n="Select Date",className:r,variant:s="primary",color:o,CustomTrigger:i,...u})=>a.jsx(qt.PopoverTrigger,{asChild:!i,dir:t,children:i?a.jsx(a.Fragment,{children:i(e)}):a.jsx(xe,{...u,className:f("wu-justify-between wu-w-full wu-gap-2 wu-text-xs wu-border-b wu-rounded-none wu-rounded-t-sm wu-min-w-48 wu-border-gray-subtle wu-text-gray-lead wu-placeholder:wu-text-gray-subtle wu-placeholder:wu-font-light wu-bg-gray-10 hover disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-subtle hover:wu-text-gray-lead hover:wu-bg-gray-10 hover:wu-border-gray-40 wu-datepicker-trigger",s==="outlined"&&"wu-border wu-border-subtle wu-bg-transparent",r),Icon:a.jsx("span",{className:"wm-calendar-month wu-text-sm"}),iconPosition:"right",children:e||n})}),Ba=(e,t,n,r)=>{const s=Y.startOfDay(e).getTime();return!!(t||n&&s<Y.startOfDay(n).getTime()||r&&s>Y.startOfDay(r).getTime())},En=e=>e?typeof e=="string"?new Date(e):e:new Date,Pr="\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])",pd=[{label:"Last 7 days",value:7},{label:"Last 30 days",value:30},{label:"Last 90 days",value:90},{label:"Last 365 days",value:365}],hd=({formatString:e="yyyy-MM-dd",value:t,onChange:n,disabled:r,minDate:s=Y.sub(new Date,{years:5}),maxDate:o=Y.add(new Date,{years:1}),dir:i="ltr",Label:u,labelPosition:l="top",onReset:c,showResetButton:d=!1,placeholder:w="Select Date",CustomTrigger:h,...m})=>{const[b,g]=p.useState(),[x,C]=p.useState(""),y=p.useCallback(()=>{const S=En(b);C(Y.format(S,e)),n&&n(b)},[b,e,n]),N=p.useCallback(()=>{c?c():(g(void 0),C(""),n&&n(void 0))},[n,c]);return p.useEffect(()=>{const S=En(t);g(S),C(Y.format(S,e))},[t,e]),a.jsxs(Te,{className:f("wu-flex wu-gap-1",l==="left"?"wu-items-center":"wu-flex-col wu-items-start","wu-date-picker-label"),dir:i,children:[u,a.jsxs(ze,{children:[a.jsx(Dr,{formattedString:x,dir:i,placeholder:w,CustomTrigger:h,...m}),a.jsx(Me,{className:"wu-p-0 wu-w-fit wu-date-picker-content",align:"start",sideOffset:-.5,dir:i,children:a.jsx(Mr,{dir:i,mode:"single",captionLayout:"dropdown",selected:b,onSelect:g,disabled:S=>Ba(S,r,s,o),startMonth:s,endMonth:o,required:!0,autoFocus:!0,defaultMonth:b,className:f("wu-border wu-border-blue-p wu-date-picker"),footer:a.jsx(Wa,{handleDateChange:y,disabled:r,onReset:N,showResetButton:d})})})]})]})},qa="yyyy-MM-dd",md=[{label:"Day",value:1},{label:"Week",value:7},{label:"Month",value:30},{label:"Quarter",value:90},{label:"Year",value:365}],gd=({current:e,onSelect:t,presetRanges:n=pd})=>{const[r,s]=p.useState(),[o,i]=p.useState(!1),[u,l]=p.useState(""),[c,d]=p.useState(""),[w,h]=p.useState(!1),m=p.useMemo(()=>n.map(y=>y.value),[n]),b=f("wu-flex wu-w-full wu-gap-2 wu-px-4 wu-py-2 wu-text-sm wu-text-gray-lead wu-transition-colors","wu-rounded-none hover:wu-bg-gray-10 focus:wu-outline-none focus-visible:wu-ring-2","focus-visible:wu-ring-blue-pHover focus-visible:wu-ring-offset-1 wu-text-start"),g=p.useCallback(y=>{if(y===void 0){s(void 0),i(!0);return}const N=Number(y)-1;s(N),i(!1),t({from:Y.sub(new Date,{days:N}),to:new Date})},[t]),x=p.useCallback((y,N)=>{if(!y||!(e!=null&&e.to)||!(e!=null&&e.from)||!new RegExp(Pr).test(y))return!1;const E=new Date(N==="start"?y:e.from),I=new Date(N==="end"?y:e.to);return Y.isBefore(I,E)?(h(!0),!1):(h(!1),!(Y.isSameDay(E,e.from)&&Y.isSameDay(I,e.to)))},[e]),C=p.useCallback((y,N)=>{if((N==="start"?l:d)(y),x(y,N)){const E={from:e==null?void 0:e.from,to:e==null?void 0:e.to};N==="start"&&(E.from=new Date(y)),N==="end"&&(E.to=new Date(y)),t(E)}},[e,t,x]);return p.useEffect(()=>{if(e!=null&&e.to&&(e!=null&&e.from)&&Y.isValid(e.to)&&Y.isValid(e.from)){l(Y.format(e.from,qa)),d(Y.format(e.to,qa));const y=Y.differenceInCalendarDays(e.to,e.from);Y.isToday(e.to)&&m.includes(y+1)?(s(y),i(!1)):(s(void 0),i(!0))}},[e,m]),a.jsxs("div",{className:"wu-flex wu-flex-col wu-gap-1 wu-p-2 wu-bg-white wu-w-60 wu-date-picker-sidebar",children:[a.jsx("ul",{className:"wu-flex wu-gap-1 wu-py-2 wu-date-picker-batch-list",children:md.map(({label:y,value:N})=>a.jsx(gt,{variant:"secondary",className:"wu-px-1 wu-py-1 wu-text-xs wu-h-fit wu-min-w-fit disabled:wu-bg-white",disabled:N!==1,children:y},N))}),a.jsxs("ul",{className:"wu-flex wu-flex-col wu-gap-1 wu-date-picker-ranges",children:[n.map(({label:y,value:N})=>a.jsx("li",{children:a.jsx("button",{className:f(b,r===N-1&&"wu-bg-blue-p/10"),onClick:()=>g(N),children:y})},N)),a.jsx("li",{children:a.jsx("button",{className:f(b,o&&"wu-bg-blue-p/10"),onClick:()=>g(),children:"Custom Range"})})]}),a.jsxs("div",{className:"wu-relative wu-flex wu-gap-3 wu-pt-2 wu-date-picker-range-footer",children:[a.jsx(Ie,{placeholder:"Start Date",pattern:Pr,value:u,onChange:y=>C(y.target.value,"start"),"aria-label":"Start Date"}),a.jsx(Ie,{placeholder:"End Date",pattern:Pr,value:c,onChange:y=>C(y.target.value,"end"),"aria-label":"End Date"}),w?a.jsx("small",{className:"wu-absolute wu-text-[10px] wu-leading-[14px] wu-text-red-deep wu-left-0 -wu-bottom-4 wu-text-start",children:"End date must be after start date"}):a.jsx("small",{className:"wu-absolute wu-right-0 wu-leading-[14px] -wu-bottom-4 wu-text-gray-subtle wu-text-end",children:"yyyy-mm-dd"})]})]})},bd=({formatString:e="yyyy/MM/dd",value:t,onChange:n,disabled:r,minDate:s=Y.sub(new Date,{years:5}),maxDate:o=Y.add(new Date,{years:1}),dir:i="ltr",minDateToSelect:u,maxDateToSelect:l,presetRanges:c,Label:d,labelPosition:w="top",onReset:h,showResetButton:m=!0,placeholder:b="Select Date Range",CustomTrigger:g,...x})=>{const[C,y]=p.useState(t),[N,S]=p.useState(t),[E,I]=p.useState(""),A=p.useCallback(()=>{if(N){const _=N.from,F=N.to;y({from:_,to:F}),I(`${Y.format(_,e)} - ${Y.format(F,e)}`),n&&n({from:_,to:F})}},[N,e,n]),k=p.useCallback(()=>{S(C)},[C]),D=p.useCallback(()=>{h?h():(y(void 0),S(void 0),I(""),n&&n(void 0))},[h,n]);return p.useEffect(()=>{if(t!=null&&t.from&&(t!=null&&t.to)){const _=En(t.from),F=En(t.to);y(t),S(t),I(`${Y.format(_,e)} - ${Y.format(F,e)}`)}else y(void 0),S({to:new Date,from:new Date})},[t,e]),a.jsxs(Te,{className:f("wu-flex wu-gap-1",w==="left"?"wu-items-center":"wu-flex-col wu-items-start","wu-date-picker-label"),dir:i,children:[d,a.jsxs(ze,{onOpenChange:_=>!_&&k(),children:[a.jsx(Dr,{formattedString:E,dir:i,placeholder:b,CustomTrigger:g,...x}),a.jsxs(Me,{className:"wu-flex wu-p-0 wu-border wu-w-fit wu-border-blue-p",align:"start",sideOffset:-.5,dir:i,children:[a.jsx(gd,{current:N,onSelect:S,presetRanges:c}),a.jsx(Mr,{dir:i,numberOfMonths:2,mode:"range",captionLayout:"dropdown",selected:N,onSelect:S,disabled:_=>Ba(_,r,s,o),startMonth:s,endMonth:o,required:!0,autoFocus:!0,defaultMonth:C==null?void 0:C.from,className:f("wu-shadow-none wu-date-range-picker"),min:u,max:l,footer:a.jsx(Wa,{handleDateChange:A,disabled:r,onReset:D,showResetButton:m})})]})]})]})},za=p.forwardRef((e,t)=>{const{className:n,rounded:r,...s}=e;return a.jsx("div",{className:f("wu-card wu-p-2 wu-pt-1 hover:wu-shadow-card wu-border wu-border-black/20 hover:wu-border-black/30 wu-transition-colors wu-duration-300",r?"wu-rounded-lg":"wu-rounded-sm",n),ref:t,...s})});za.displayName="WuCard";const $a=p.forwardRef((e,t)=>{const{className:n,...r}=e;return a.jsx("div",{ref:t,...r,className:f("wu-p-2 wu-mb-2 wu-border-b wu-border-gray-40 min-h-12 wu-card-header",n)})});$a.displayName="WuCardHeader";const Ha=p.forwardRef((e,t)=>{const{className:n,...r}=e;return a.jsx("div",{ref:t,...r,className:f("wu-p-2 wu-mt-2 wu-border-t wu-border-gray-40 min-h-12 wu-card-footer",n)})});Ha.displayName="WuCardHeader";const Ua=v.forwardRef(({className:e,partial:t,...n},r)=>a.jsx(mr.Root,{ref:r,className:f("wu-h-4 wu-w-4 wu-shrink-0 wu-rounded-[2px] wu-bg-white wu-border wu-border-gray-subtle wu-ring-offset-background focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-[1px] data-[state=checked]:wu-bg-blue-p data-[state=checked]:wu-text-white data-[state=checked]:wu-border-none data-[state=checked]:hover:wu-bg-blue-q hover:wu-bg-gray-20 hover:wu-border-blue-p wu-transition-all data-[state=checked]:disabled:wu-bg-gray-20","disabled:wu-cursor-not-allowed disabled:wu-opacity-50 disabled:data-[state=unchecked]:wu-bg-gray-20 disabled:hover:wu-border-gray-subtle disabled:wu-border-gray-subtle",e),...n,children:a.jsxs(mr.Indicator,{className:f("wu-flex wu-items-center wu-justify-center wu-text-current"),children:[!t&&a.jsx("span",{className:"wm-check wu-text-base wu-leading-4"}),t&&a.jsx("span",{className:"wm-check-indeterminate-small wu-text-base wu-leading-4"})]})}));Ua.displayName=mr.Root.displayName;const De=p.forwardRef((e,t)=>{const{disabled:n,checked:r,Label:s,labelPosition:o="right",className:i,id:u=Cn(),partial:l,onChange:c,required:d,readonly:w,...h}=e;return p.useEffect(()=>{h.defaultChecked!==void 0&&r!==void 0&&console.error("WuCheckbox: Both `checked` and `defaultChecked` cannot be used together. Use only one of them.")},[h.defaultChecked,r]),a.jsxs("div",{className:yd({labelPosition:o,className:"wu-checkbox-container"}),dir:h.dir,children:[a.jsx(Ua,{id:u,...h,partial:l,checked:r,disabled:n||w,onCheckedChange:c,className:f("wu-peer wu-checkbox",i),required:d,ref:t}),s&&a.jsx(Te,{htmlFor:u,className:"wu-w-full wu-checkbox-label",children:s})]})}),yd=ke.cva("wu-flex wu-items-center wu-gap-2 wu-w-fit",{variants:{labelPosition:{left:"wu-flex-row-reverse wu-text-right",right:"wu-flex-row"}}});De.displayName="WuCheckbox";const xd=e=>{const{className:t,children:n,...r}=e;return a.jsx("span",{...r,className:f("wu-flex wu-items-center wu-justify-center wu-truncate wu-max-w-28 wu-w-fit wu-px-2 wu-py-1 wu-text-xs wu-bg-gray-20 wu-rounded-sm hover:wu-bg-gray-40 hover:wu-text-blue-q",t),children:n})},_r=v.forwardRef(({className:e,...t},n)=>a.jsx(ye.Command,{ref:n,className:f("wu-flex wu-h-full wu-w-full wu-flex-col wu-overflow-hidden wu-rounded-md",e),...t}));_r.displayName=ye.Command.displayName;const ja=v.forwardRef(({className:e,...t},n)=>a.jsx("div",{className:"wu-flex wu-items-center wu-border-b wu-px-3",children:a.jsx(ye.Command.Input,{ref:n,className:f("wu-flex wu-h-11 wu-w-full wu-rounded-md wu-bg-transparent wu-py-3 wu-text-sm wu-outline-none wu-placeholder:wu-text-muted-foreground disabled:wu-cursor-not-allowed disabled:wu-opacity-50",e),...t})}));ja.displayName=ye.Command.Input.displayName;const Fr=v.forwardRef(({className:e,...t},n)=>a.jsx(ye.Command.List,{ref:n,className:f("",e),...t}));Fr.displayName=ye.Command.List.displayName;const Vr=v.forwardRef((e,t)=>a.jsx(ye.Command.Empty,{ref:t,className:"wu-text-center wu-p-2 wu-pb-2.5 wu-text-xs",...e}));Vr.displayName=ye.Command.Empty.displayName;const Gt=v.forwardRef(({className:e,...t},n)=>a.jsx(ye.Command.Group,{ref:n,className:f("",e),...t}));Gt.displayName=ye.Command.Group.displayName;const Ga=v.forwardRef(({className:e,...t},n)=>a.jsx(ye.Command.Separator,{ref:n,className:f("wu-mx-1 wu-my-1 wu-h-px wu-bg-gray-20",e),...t}));Ga.displayName=ye.Command.Separator.displayName;const Kt=v.forwardRef(({className:e,...t},n)=>a.jsx(ye.Command.Item,{ref:n,className:f("wu-relative wu-flex wu-cursor-default wu-gap-2 wu-select-none wu-items-center wu-rounded-sm wu-px-2 wu-py-3 wu-text-sm wu-outline-none data-[disabled=true]:wu-pointer-events-none data-[disabled=true]:wu-opacity-50 [&_svg]:wu-pointer-events-none [&_svg]:wu-size-4 [&_svg]:wu-shrink-0",e),...t}));Kt.displayName=ye.Command.Item.displayName;const yt=p.forwardRef(({containerHeight:e=400,list:t,callback:n,dir:r,className:s,style:o},i)=>a.jsx(xc.Virtuoso,{ref:i,dir:r,className:s,style:{height:e,scrollbarWidth:"thin",scrollbarColor:"#d4d4d4 #f1f1f1",overflowX:"hidden",...o},data:t,itemContent:(u,l)=>n(u,l)}));yt.displayName="WuVirtualScroll";const vd=({tags:e,triggerRef:t})=>{const[n,r]=p.useState([]),[s,o]=p.useState([]),i=p.useMemo(()=>a.jsx("ul",{className:"wu-flex wu-flex-col wu-items-start wu-justify-center wu-list-none",children:s.map((l,c)=>a.jsx("li",{className:"wu-py-1 wu-text-xs wu-text-left",children:l},c))}),[s]),u=l=>{const c=document.createElement("div");Object.assign(c.style,{display:"inline-block",visibility:"hidden",position:"absolute",whiteSpace:"nowrap"}),c.textContent=l,document.body.appendChild(c);const d=c.offsetWidth;return document.body.removeChild(c),d+8};return p.useEffect(()=>{const l=()=>{if(t.current){const h=t.current.offsetWidth-20-36;let m=0;const b=[],g=[];e.forEach(x=>{const C=u(x);m+C+8<h?(b.push(x),m+=C+8):g.push(x)}),r(b),o(g)}};return l(),window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l)}},[e,t]),a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2 wu-text-xs",children:[n.map((l,c)=>a.jsx("span",{className:"wu-px-1 wu-py-0.5 wu-text-xs wu-rounded-sm wu-bg-gray-10 wu-combobox-tag",children:l},c)),s.length>0&&a.jsx(Tn,{content:i,className:"wu-z-[51] wu-text-left",children:a.jsxs("span",{className:"wu-px-1 wu-py-0.5 wu-text-xs wu-rounded-sm wu-bg-gray-10 wu-combobox-tag",children:["+",s.length]})})]})},Nd=({placeholder:e="Select...",isEllipse:t=!1,selectedOptions:n,variant:r="flat",dir:s="ltr",accessorKey:o,multiple:i,id:u,disabled:l,selectAll:c,isCheckedAll:d,className:w,...h})=>{const[m,b]=p.useState([]),g=p.useRef(null);p.useEffect(()=>{if(!n||Array.isArray(n)&&n.length===0){b([]);return}if(i){const C=n;b(C==null?void 0:C.map(y=>y[o.label]));return}else b([n[o.label]])},[n]);const x=()=>{var C;return m.length?d&&(c!=null&&c.enable)&&(c!=null&&c.triggerText)?a.jsx("span",{className:"wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap",children:c.triggerText}):t?a.jsx("span",{className:"wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap",style:{width:`${(((C=g.current)==null?void 0:C.offsetWidth)||0)-32}px`},children:m.join(", ")}):a.jsx(vd,{tags:m,triggerRef:g}):a.jsx("p",{className:"wu-text-xs wu-opacity-70",children:e})};return a.jsx(tt,{dir:s,asChild:!0,id:u,disabled:l,children:a.jsxs("button",{...h,ref:g,disabled:l,className:f("focus-visible:wu-ring-2 focus-visible:wu-ring-blue-pHover wu-bg-white focus-visible:wu-ring-offset-2 wu-flex wu-w-full wu-items-center wu-justify-between wu-border-b wu-border-gray-subtle wu-py-1.5 wu-px-2 placeholder:wu-text-gray-40 focus:wu-outline-none disabled:wu-cursor-not-allowed disabled:wu-opacity-50 hover:wu-bg-gray-10 hover:wu-border-blue-p wu-transition-colors focus-visible:wu-bg-gray-20 focus-visible:wu-border-blue-p wu-cursor-pointer wu-text-xs wu-rounded-t-sm wu-gap-2 wu-h-8 wu-group/wuCombobox wu-combobox-trigger",r==="outlined"&&"wu-border wu-border-gray-subtle","disabled:wu-cursor-not-allowed disabled:hover:wu-border-gray-subtle disabled:wu-bg-gray-10",w),children:[x(),a.jsx("span",{className:"wm-arrow-drop-down group-data-[state=open]/wuCombobox:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base"})]})})},Lr=ne.Root,Or=ne.Trigger,Ka=ne.Group,Cd=ne.Portal,Sd=ne.Sub,Td=ne.RadioGroup,Ya=v.forwardRef(({className:e,inset:t,children:n,position:r,...s},o)=>a.jsxs(ne.SubTrigger,{ref:o,className:f("wu-flex wu-cursor-default wu-select-none wu-text-xs wu-items-center wu-p-2 wu-outline-none focus:wu-bg-gray-20 data-[state=open]:wu-bg-gray-20",t&&"wu-pl-8",e),...s,children:[r==="left"&&a.jsx("span",{className:f("wm-chevron-right",s.dir==="rtl"&&"ml-2")}),n,r!=="left"&&a.jsx("span",{className:f("wu-text-base wu-leading-4",s.dir==="rtl"&&"wu-mr-auto wm-chevron-left",s.dir!=="rtl"&&"wu-ml-auto wm-chevron-right")})]}));Ya.displayName=ne.SubTrigger.displayName;const Xa=v.forwardRef(({className:e,...t},n)=>a.jsx(ne.SubContent,{ref:n,className:f("wu-z-50 wu-min-w-[8rem] wu-overflow-hidden wu-border wu-text-xs wu-bg-white wu-text-gray-lead wu-shadow-lg data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[side=bottom]:wu-slide-in-from-top-2 data-[side=left]:wu-slide-in-from-right-2 data-[side=right]:wu-slide-in-from-left-2 data-[side=top]:wu-slide-in-from-bottom-2",e),...t}));Xa.displayName=ne.SubContent.displayName;const An=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx(ne.Portal,{children:a.jsx(ne.Content,{ref:r,sideOffset:t,className:f("wu-z-50 wu-min-w-[8rem] wu-overflow-hidden wu-border wu-text-xs wu-bg-white wu-text-gray-lead wu-shadow-md data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[side=bottom]:wu-slide-in-from-top-2 data-[side=left]:wu-slide-in-from-right-2 data-[side=right]:wu-slide-in-from-left-2 data-[side=top]:wu-slide-in-from-bottom-2",e),...n})}));An.displayName=ne.Content.displayName;const Yt=v.forwardRef(({className:e,inset:t,...n},r)=>a.jsx(ne.Item,{ref:r,className:f("wu-relative wu-flex wu-cursor-default wu-select-none wu-items-center wu-text-xs wu-p-2 wu-outline-none wu-transition-colors focus:wu-bg-gray-20 data-[disabled]:wu-cursor-not-allowed data-[disabled]:wu-opacity-50",t&&"wu-pl-8",e),...n}));Yt.displayName=ne.Item.displayName;const Za=v.forwardRef(({className:e,children:t,checked:n,dir:r,...s},o)=>a.jsxs(ne.CheckboxItem,{ref:o,className:f("wu-group wu-relative wu-flex wu-cursor-default wu-select-none wu-items-center wu-text-xs wu-py-3 wu-outline-none wu-transition-colors focus:wu-bg-gray-20 data-[disabled]:wu-cursor-not-allowed data-[disabled]:wu-opacity-50",r==="rtl"&&"wu-pr-8 wu-pl-2",r!=="rtl"&&"wu-pl-8 wu-pr-2",e),checked:n,...s,children:[a.jsx("span",{className:f("wu-absolute wu-flex wu-items-center wu-justify-center wu-w-4 wu-h-4 wu-rounded-sm wu-ring-1 wu-ring-gray-subtle group-disabled:wu-bg-gray-20 group-data-[state=checked]:wu-bg-blue-p group-hover:wu-bg-gray-20 group-hover:wu-ring-blue-p wu-transition-all group-data-[state=checked]:wu-ring-blue-p",r==="rtl"&&"wu-right-2",r!=="rtl"&&"wu-left-2"),children:a.jsx(ne.ItemIndicator,{children:a.jsx("span",{className:"wm-check wu-text-base wu-text-white"})})}),t]}));Za.displayName=ne.CheckboxItem.displayName;const Ja=v.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(ne.RadioItem,{ref:r,className:f("wu-group wu-relative wu-flex wu-cursor-default wu-select-none wu-items-center wu-text-xs wu-py-3 wu-pl-8 wu-pr-2 wu-outline-none wu-transition-colors focus:wu-bg-gray-20 focus:wu-text-accent-foreground data-[disabled]:wu-cursor-not-allowed data-[disabled]:wu-opacity-50",e),...n,children:[a.jsx("span",{className:"wu-absolute wu-rounded-full wu-left-2 wu-flex wu-h-4 wu-w-4 wu-items-center wu-justify-center wu-ring-1 wu-ring-gray-subtle group-disabled:wu-bg-gray-20 group-data-[state=checked]:wu-bg-white group-hover:wu-bg-gray-20 group-hover:wu-ring-blue-p wu-transition-all group-data-[state=checked]:wu-ring-blue-p group-hover:group-data-[state=checked]:wu-ring-blue-q",children:a.jsx(ne.ItemIndicator,{className:"wu-w-4 wu-h-4 wu-flex wu-items-center wu-justify-center",children:a.jsx("span",{className:"wm-circle wu-text-blue-p group-hover:group-data-[state=checked]:wu-text-blue-q wu-text-xs"})})}),t]}));Ja.displayName=ne.RadioItem.displayName;const Xt=v.forwardRef(({className:e,inset:t,...n},r)=>a.jsx(ne.Label,{ref:r,className:f("wu-p-2 wu-font-medium wu-text-xs",t&&"wu-pl-8",e),...n}));Xt.displayName=ne.Label.displayName;const kn=v.forwardRef(({className:e,...t},n)=>a.jsx(ne.Separator,{ref:n,className:f("-wu-mx-1 wu-my-1 wu-h-px wu-bg-gray-20",e),...t}));kn.displayName=ne.Separator.displayName;const Qa=({option:e,value:t,multiple:n=!1,onSelect:r,accessorKey:s,dir:o})=>{const[i,u]=p.useState(n?[]:"");p.useEffect(()=>{t&&u(n?t.map(w=>JSON.stringify(w[s.value])):JSON.stringify(t[s.value]))},[t,s.value,n]);const l=n?i.includes(JSON.stringify(e[s.value])):i===JSON.stringify(e[s.value]),c=()=>{e.disabled||r(e)};return a.jsxs(Kt,{onSelect:c,disabled:e.disabled,className:f("wu-cursor-pointer wu-text-xs wu-items-start wu-leading-4 wu-py-2 wu-combobox-item hover:wu-bg-gray-100",l&&"wu-bg-gray-10"),dir:o,children:[n&&a.jsx(De,{checked:l}),a.jsx(Ed,{option:e,accessorKey:s})]})},Ed=({option:e,accessorKey:t})=>{const n=e[t.label];return a.jsxs("div",{className:"wu-flex wu-items-center wu-w-full wu-gap-1",children:[e.icon&&e.icon,n,e.isAdmin&&a.jsx("span",{className:"wu-ml-auto wu-text-sm wm-lock wu-text-orange-deep"})]})},Ra=e=>{const{option:t,selectAll:n,handleSelectAll:r,isCheckedAll:s,isPartialSelected:o,...i}=e;switch("type"in t?t.type:"option"){case"all":return a.jsxs(Kt,{onSelect:r,className:f("wu-cursor-pointer wu-text-xs wu-leading-4 wu-py-2 wu-combobox-item"),dir:i.dir,children:[a.jsx(De,{checked:s||o,partial:o,"data-partial":o,"aria-label":(n==null?void 0:n.label)||"Select All"}),a.jsx("span",{"aria-hidden":!0,children:(n==null?void 0:n.label)||"Select All"})]});case"group":return a.jsxs(Gt,{children:[a.jsx(Xt,{children:t.label}),t.options.map((l,c)=>p.createElement(Qa,{...i,option:l,key:c}))]});case"divider":return a.jsx(Ga,{className:"wu-mx-4"});default:return a.jsx(Qa,{...i,option:t})}},Ad=e=>{const t=[],n=[],r=[],s=[];return e.forEach(o=>{o.type==="group"?(t.push(o),r.push(...o.options),s.push(...o.options.filter(i=>!i.disabled))):o.type==="divider"?n.push(o):r.push(o),o!=null&&o.disabled||s.push(o)}),{groups:t,dividers:n,allOptions:r,enabledOptions:s}},kd=p.memo(Ie),Id=({data:e,accessorKey:t,value:n,defaultValue:r,Header:s,virtualizedThreshold:o=100,isEllipse:i,placeholder:u,variant:l,dir:c,onSelect:d,Label:w,maxHeight:h=420,multiple:m=!1,hasGroup:b=!1,selectAll:g,id:x,disabled:C,labelPosition:y="top",className:N,onScroll:S,maxContentWidth:E,enableSearch:I=!0,noDataContent:A,...k})=>{const[D,_]=p.useState(""),[F,$]=p.useState(),[O,G]=p.useState(!1),[z,ue]=p.useState(!1),[M,V]=p.useState(!1),q=p.useRef(null),{allOptions:B,enabledOptions:re}=p.useMemo(()=>b||g&&!g.includeDisabled?Ad(e):{allOptions:e,groups:[],dividers:[],enabledOptions:[]},[e,b]),ae=p.useMemo(()=>{if(!D)return e;const W=D.toLowerCase();return B.filter(ee=>ee[t.label].toLowerCase().includes(W))},[D,B,e,t.label]),ve=p.useMemo(()=>m&&g!=null&&g.enable&&!D&&ae.length>0?[{type:"all"},...ae]:ae,[ae,D,m]),Ue=p.useCallback(W=>{const ee=W[t.value];m?$(H=>{const be=H||[],Ce=be.some(me=>me[t.value]===ee)?be.filter(me=>me[t.value]!==ee):[...be,W];return d==null||d(Ce),Ce}):(G(!1),$(W),d==null||d(W))},[m,t.value,d]),j=p.useCallback(W=>_(W.target.value),[]),P=p.useCallback(()=>_(""),[]);p.useEffect(()=>{if(n!==void 0&&r!==void 0){console.error("defaultValue and value cannot be used simultaneously");return}else n!==void 0?$(n):r!==void 0&&$(r)},[n,r]),p.useEffect(()=>{if(!m)return;const W=g!=null&&g.includeDisabled?(F==null?void 0:F.length)===B.length:(F==null?void 0:F.length)===re.length;ue(W);const ee=(F==null?void 0:F.length)>0&&!W;V(ee)},[F,g]);const U=p.useCallback(()=>{const W=z?[]:g!=null&&g.includeDisabled?B:re;$(W),d==null||d(W)},[z,m,B,re,d,g]),Z=jt(y);return a.jsxs("div",{className:f(Z,"wu-flex wu-combobox-container"),ref:q,children:[a.jsxs(ze,{onOpenChange:W=>{W&&P(),G(W)},open:O,modal:!0,children:[a.jsx(Nd,{selectedOptions:F,accessorKey:t,isEllipse:i,placeholder:u,variant:l,dir:c,multiple:m,disabled:C,selectAll:g,isCheckedAll:z,className:N,id:x,...k}),a.jsx(Me,{className:"wu-min-w-[--radix-popover-trigger-width] wu-max-w-[calc(100vw-32px)] wu-p-0 wu-bg-white wu-border wu-border-blue-p wu-combobox-content",align:"start",sideOffset:-1,style:{maxWidth:E},children:a.jsxs(_r,{id:x,children:[I&&a.jsx("div",{className:"wu-m-2",children:a.jsx(kd,{placeholder:"Search...",Icon:a.jsx("span",{className:"wm-search"}),className:"wu-text-xs wu-combobox-search",onChange:j,name:"Search","aria-label":"Search",dir:c,iconPosition:c==="rtl"?"right":"left"})}),s,a.jsxs(Fr,{children:[a.jsx(Vr,{children:A||"No results found."}),ve.length>=o?a.jsx(yt,{className:"wu-combobox-list",containerHeight:h,list:ve,callback:(W,ee)=>a.jsx(Ra,{option:ee,value:F,onSelect:Ue,multiple:m,accessorKey:t,dir:c,selectAll:g,handleSelectAll:U,isCheckedAll:z,isPartialSelected:M},W),dir:c}):a.jsx("div",{style:{height:"fit-content",maxHeight:h,overflow:"auto"},className:"wu-combobox-list",onScroll:S,children:ve.map((W,ee)=>a.jsx(Ra,{option:W,value:F,onSelect:Ue,multiple:m,accessorKey:t,dir:c,selectAll:g,handleSelectAll:U,isCheckedAll:z,isPartialSelected:M},ee))})]})]})})]}),w&&a.jsx(Te,{htmlFor:x,className:"wu-combobox-label",children:w})]})},K={WuContentEditor:"_WuContentEditor_ylyja_8",EditorAction:"_EditorAction_ylyja_70",EditorActionActive:"_EditorActionActive_ylyja_73"},Md=[Tc.configure({link:{openOnClick:!1,autolink:!0,defaultProtocol:"https",protocols:["http","https"],isAllowedUri:(e,t)=>{try{const n=e.includes(":")?new URL(e):new URL(`${t.defaultProtocol}://${e}`);if(!t.defaultValidate(n.href))return!1;const r=["ftp","file","mailto"],s=n.protocol.replace(":","");if(r.includes(s)||!t.protocols.map(l=>typeof l=="string"?l:l.scheme).includes(s))return!1;const i=["example-phishing.com","malicious-site.net"],u=n.hostname;return!i.includes(u)}catch{return!1}},shouldAutoLink:e=>{try{const t=e.includes(":")?new URL(e):new URL(`https://${e}`),n=["example-no-autolink.com","another-no-autolink.com"],r=t.hostname;return!n.includes(r)}catch{return!1}}}}),Sc.configure({types:["heading","paragraph"]}),Nc,vc,ht.TextStyle,ht.Color,ht.BackgroundColor,Na.TaskList,Na.TaskItem,ht.LineHeight,ht.FontSize,ht.FontFamily,Ec.configure({resize:{enabled:!0,alwaysPreserveAspectRatio:!0},inline:!0}),Cc.TableKit.configure({table:{resizable:!0}})],eo=p.createContext(null),Dd=({editor:e,children:t,customFonts:n})=>a.jsx(eo.Provider,{value:{editor:e,customFonts:n},children:t}),he=()=>{const e=p.useContext(eo);if(!e)throw new Error("useToolbar must be used within a ToolbarProvider");return e},Wr=v.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>a.jsx(Sa.Root,{ref:s,decorative:n,orientation:t,className:f("wu-shrink-0 wu-bg-gray-40",t==="horizontal"?"wu-h-[1px] wu-w-full":"wu-h-full wu-w-[1px]",e),...r}));Wr.displayName=Sa.Root.displayName;const Br=({action:e,defaultValue:t})=>{var s;const[n,r]=p.useState();return p.useEffect(()=>{r(t||e.items.find(o=>o.active)||e.items[0])},[e,t]),a.jsxs(zt.DropdownMenu,{children:[a.jsx(zt.DropdownMenuTrigger,{className:f(K.EditorAction,e.active&&"wu-bg-blue-p/5 wu-text-blue-p"),children:a.jsx(R,{icon:n==null?void 0:n.icon})}),a.jsx(zt.DropdownMenuContent,{className:"wu-flex wu-min-w-0 wu-p-1 wu-gap-[6px] wu-border wu-border-blue-p wu-rounded wu-bg-white",align:"start",onCloseAutoFocus:o=>o.preventDefault(),children:(s=e.items)==null?void 0:s.map(o=>a.jsx(zt.DropdownMenuItem,{onClick:()=>{o.event(),r(o)},title:o.tooltip,children:a.jsx("button",{className:f(K.EditorAction,o.active&&"wu-bg-blue-p/5 wu-text-blue-p"),children:a.jsx(R,{icon:o.icon})})},o.id))})]})},Pd=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:r=>{var s,o,i,u,l,c;return{isParagraph:(s=r.editor)==null?void 0:s.isActive("paragraph"),isH1:(o=r.editor)==null?void 0:o.isActive("heading",{level:1}),isH2:(i=r.editor)==null?void 0:i.isActive("heading",{level:2}),isH3:(u=r.editor)==null?void 0:u.isActive("heading",{level:3}),isH4:(l=r.editor)==null?void 0:l.isActive("heading",{level:4}),isStyle:(c=r.editor)==null?void 0:c.isActive("heading")}}}),n=[{id:"paragraph",icon:"wm-format-paragraph",event:()=>e.chain().focus().setParagraph().run(),active:t.isParagraph},{id:"h1",icon:"wm-format-h1",event:()=>e.chain().focus().setHeading({level:1}).run(),active:t.isH1},{id:"h2",icon:"wm-format-h2",event:()=>e.chain().focus().setHeading({level:2}).run(),active:t.isH2},{id:"h3",icon:"wm-format-h3",event:()=>e.chain().focus().setHeading({level:3}).run(),active:t.isH3},{id:"h4",icon:"wm-format-h4",event:()=>e.chain().focus().setHeading({level:4}).run(),active:t.isH4}];return a.jsx(Br,{action:{id:"style",active:t.isStyle,icon:"wm-format-paragraph",items:n},defaultValue:n.find(r=>r.active)})},_d=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:({editor:n})=>({textColor:n.getAttributes("textStyle").color})});return a.jsxs("label",{className:K.EditorAction,htmlFor:"text-color",title:"Text Color",children:[a.jsx(R,{icon:"wm-format-color-text",className:"wu-cursor-pointer",style:{color:t.textColor}}),a.jsx("input",{type:"color",className:"wu-opacity-0 wu-w-0 wu-h-0",id:"text-color",defaultValue:"#545E6B",onChange:n=>e.chain().focus().setColor(n.target.value).run()})]})},Fd=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:r=>{var s,o,i,u,l,c;return{isUl:(s=r.editor)==null?void 0:s.isActive("bulletList"),isOl:(o=r.editor)==null?void 0:o.isActive("orderedList"),isTodo:(i=r.editor)==null?void 0:i.isActive("taskList"),isList:((u=r.editor)==null?void 0:u.isActive("bulletList"))||((l=r.editor)==null?void 0:l.isActive("orderedList"))||((c=r.editor)==null?void 0:c.isActive("taskList"))}}}),n=[{id:"ul",icon:"wm-format-list-bulleted",event:()=>e.chain().focus().toggleBulletList().run(),active:t.isUl,tooltip:"Bulleted List"},{id:"ol",icon:"wm-format-list-numbered",event:()=>e.chain().focus().toggleOrderedList().run(),active:t.isOl,tooltip:"Numbered List"},{id:"todo",icon:"wm-checklist",event:()=>e.chain().focus().toggleTaskList().run(),active:t.isTodo,tooltip:"To-Do List"}];return a.jsx(Br,{action:{id:"style",active:t.isList,icon:"wm-format-paragraph",items:n}})},Vd=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:r=>{var s,o,i,u,l,c,d;return{isLeft:(s=r.editor)==null?void 0:s.isActive({textAlign:"left"}),isCenter:(o=r.editor)==null?void 0:o.isActive({textAlign:"center"}),isRight:(i=r.editor)==null?void 0:i.isActive({textAlign:"right"}),isJustify:(u=r.editor)==null?void 0:u.isActive({textAlign:"justify"}),isAligned:((l=r.editor)==null?void 0:l.isActive({textAlign:"center"}))||((c=r.editor)==null?void 0:c.isActive({textAlign:"right"}))||((d=r.editor)==null?void 0:d.isActive({textAlign:"justify"}))}}}),n=[{id:"left",icon:"wm-format-align-left",event:()=>e.chain().focus().setTextAlign("left").run(),tooltip:"Align Left",active:t.isLeft},{id:"center",icon:"wm-format-align-center",event:()=>e.chain().focus().setTextAlign("center").run(),tooltip:"Align Center",active:t.isCenter},{id:"right",icon:"wm-format-align-right",event:()=>e.chain().focus().setTextAlign("right").run(),tooltip:"Align Right",active:t.isRight},{id:"justify",icon:"wm-format-align-justify",event:()=>e.chain().focus().setTextAlign("justify").run(),tooltip:"Justify",active:t.isJustify}];return a.jsx(Br,{action:{id:"style",active:t.isAligned,icon:"wm-format-paragraph",items:n}})},Ld=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:n=>({code:n.editor.isActive("code")})});return a.jsx("button",{title:"Code line",className:f(K.EditorAction,(t==null?void 0:t.code)&&"wu-bg-blue-p/5 wu-text-blue-p"),onClick:e.chain().focus().toggleCode().run,children:a.jsx(R,{icon:"wm-code"})})},Od=()=>{const{editor:e}=he(),t=[{id:"clear",icon:"wm-format-clear",event:()=>e.chain().focus().clearNodes().unsetAllMarks().run(),tooltip:"Clear Formatting"}];return a.jsx(a.Fragment,{children:t.map(n=>a.jsx("button",{title:n.tooltip,className:f(K.EditorAction),onClick:n.event,children:a.jsx(R,{icon:n.icon})},n.id))})},Wd=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:n=>{var r;return{blockquote:(r=n.editor)==null?void 0:r.isActive("blockquote")}}});return a.jsx("button",{title:"quote",className:f(K.EditorAction,(t==null?void 0:t.quote)&&"wu-bg-blue-p/5 wu-text-blue-p"),onClick:e.chain().focus().toggleBlockquote().run,children:a.jsx(R,{icon:"wm-format-quote"})})},Bd=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:n=>{var r;return{superscript:(r=n.editor)==null?void 0:r.isActive("superscript")}}});return a.jsx("button",{title:"Superscript",className:f(K.EditorAction,(t==null?void 0:t.superscript)&&"wu-bg-blue-p/5 wu-text-blue-p"),onClick:e.chain().focus().toggleSuperscript().run,children:a.jsx(R,{icon:"wm-superscript"})})},qd=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:n=>{var r;return{subscript:(r=n.editor)==null?void 0:r.isActive("subscript")}}});return a.jsx("button",{title:"Subscript",className:f(K.EditorAction,(t==null?void 0:t.superscript)&&"wu-bg-blue-p/5 wu-text-blue-p"),onClick:e.chain().focus().toggleSubscript().run,children:a.jsx(R,{icon:"wm-subscript"})})},zd=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:n=>{var r;return{bold:(r=n.editor)==null?void 0:r.isActive("bold")}}});return a.jsx("button",{title:"Bold",className:f(K.EditorAction,(t==null?void 0:t.bold)&&K.EditorActionActive),onClick:e.chain().focus().toggleBold().run,children:a.jsx(R,{icon:"wm-format-bold"})})},$d=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:n=>{var r;return{italic:(r=n.editor)==null?void 0:r.isActive("italic")}}});return a.jsx("button",{title:"Italic",className:f(K.EditorAction,(t==null?void 0:t.italic)&&K.EditorActionActive),onClick:e.chain().focus().toggleItalic().run,children:a.jsx(R,{icon:"wm-format-italic"})})},Hd=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:n=>{var r;return{underline:(r=n.editor)==null?void 0:r.isActive("underline")}}});return a.jsx("button",{title:"Bold",className:f(K.EditorAction,(t==null?void 0:t.bold)&&K.EditorActionActive),onClick:e.chain().focus().toggleUnderline().run,children:a.jsx(R,{icon:"wm-format-underlined"})})},Ud=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:n=>{var r;return{strikethrough:(r=n.editor)==null?void 0:r.isActive("strike")}}});return a.jsx("button",{title:"strikethrough",className:f(K.EditorAction,(t==null?void 0:t.strikethrough)&&K.EditorActionActive),onClick:e.chain().focus().toggleStrike().run,children:a.jsx(R,{icon:"wm-format-strikethrough"})})},to={overlay:"data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0",content:"data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[state=closed]:wu-slide-out-to-left-1/2 data-[state=closed]:wu-slide-out-to-top-[48%] data-[state=open]:wu-slide-in-from-left-1/2 data-[state=open]:wu-slide-in-from-top-[48%]"},no=Q.Root,ro=Q.Trigger,jd=Q.Portal,Gd=Q.Close,so=p.forwardRef(({className:e,...t},n)=>a.jsx(Q.Overlay,{ref:n,className:f("wu-fixed wu-inset-0 wu-z-50 wu-bg-black/30",to.overlay,e),...t}));so.displayName=Q.Overlay.displayName;const qr=p.forwardRef(({className:e,children:t,hideCloseButton:n,isStackedCard:r,...s},o)=>a.jsxs(jd,{children:[a.jsx(so,{className:r?"wu-bg-transparent":""}),a.jsxs(Q.Content,{ref:o,className:f("wu-fixed wu-left-[50%] wu-z-50 wu-top-[50%] wu-flex wu-flex-col wu-w-full wu-max-w-lg wu-translate-x-[-50%] wu-translate-y-[-50%] wu-bg-white wu-shadow-lg wu-duration-200",to.content,e),...s,children:[t,!n&&a.jsx(Q.Close,{"aria-label":"close",asChild:!0,children:a.jsxs(gt,{variant:"iconOnly",className:f("wu-absolute wu-right-2 wu-top-1 hover:wu-bg-black hover:wu-bg-opacity-[0.04]","wu-top-3 wu-right-4 wu-p-1.5","group-data-[variant=action]:wu-text-blue-q","group-data-[variant=upgrade]:wu-text-yellow-deep","group-data-[variant=critical]:wu-text-red-deep"),children:[a.jsx("span",{className:"wm-close wu-text-xl wu-leading-5"}),a.jsx("span",{className:"wu-sr-only",children:"Close"})]})})]})]}));qr.displayName=Q.Content.displayName;const zr=({className:e,...t})=>a.jsx("div",{className:f("wu-text-center wu-bg-gray-20 wu-w-full",e),...t});zr.displayName="DialogHeader";const ao=({className:e,...t})=>a.jsx("div",{className:f("wu-flex wu-flex-col-reverse sm:wu-flex-row sm:wu-justify-end sm:wu-space-x-2 wu-p-4",e),...t});ao.displayName="DialogFooter";const Zt=p.forwardRef(({className:e,...t},n)=>a.jsx(Q.Title,{ref:n,className:f("wu-text-lg wu-font-medium wu-flex wu-items-center wu-justify-center wu-gap-1 wu-h-10 wu-leading-none wu-tracking-tight",e),...t}));Zt.displayName=Q.Title.displayName;const Kd=p.forwardRef(({className:e,...t},n)=>a.jsx(Q.Description,{ref:n,className:f("wu-text-sm wu-text-muted-foreground",e),...t}));Kd.displayName=Q.Description.displayName;const Yd={gradientBackground:"_gradientBackground_1uc4j_1"},oo=e=>{const{colors:t,size:n=.55,children:r,className:s,strokeWidth:o,centerOffset:i={x:0,y:0},...u}=e,l=p.useRef(null);return p.useEffect(()=>{const c=l.current;if(c){c.style.setProperty("--width",`${c.offsetWidth*n}px`),c.style.setProperty("--height",`${c.offsetHeight*n}px`),c.style.setProperty("--colors",t.join(",")),c.style.setProperty("--stroke-width",`-${o||2}px`),c.style.setProperty("--spotlight-background","radial-gradient(100% var(--height) ellipse at 25% 70%, var(--colors))");let w;const h=m=>{w&&cancelAnimationFrame(w),w=requestAnimationFrame(()=>{const b=c.getBoundingClientRect();let g=m.clientX-b.left,x=m.clientY-b.top;g=Math.max(0,Math.min(g+i.x,b.width)),x=Math.max(0,Math.min(x+i.y,b.height));const C=`radial-gradient(
|
|
5
5
|
var(--width) var(--height) ellipse at ${g}px ${x}px,
|
|
6
6
|
var(--colors)
|
|
7
|
-
)`;c.style.setProperty("--spotlight-background",C)})};return window.addEventListener("mousemove",h),()=>{window.removeEventListener("mousemove",h),w&&cancelAnimationFrame(w)}}},[t,n,o,i]),a.jsx("div",{ref:l,className:f(Kd.gradientBackground,"wu-transform-gpu",s),...u,children:r})},oo="calc(100vh - 64px)",Yd={sm:"400px",md:"600px",lg:"1200px"},In=({Trigger:e,children:t,size:n="md",hideCloseButton:r,preventClickOutside:s,onOpenChange:o,open:i,dir:u,maxWidth:l,maxHeight:c,className:d,style:w,variant:h="action",...m})=>{const b={action:["#EEF3FBcc 32%","#1D50F4cc"],upgrade:["#FDEDCCcc 32%","#FF9F00cc"],critical:["#FFB6B6cc 32%","#CC0000cc"]};return a.jsxs(to,{modal:!0,onOpenChange:o,open:i,children:[e&&a.jsx(no,{asChild:!0,children:e}),a.jsx(Br,{style:{width:"calc(100% - 64px)",maxWidth:l||Yd[n],maxHeight:c||oo,...w},hideCloseButton:r,onInteractOutside:g=>s&&g.preventDefault(),dir:u,"aria-describedby":void 0,"data-variant":h,className:f("wu-group wu-rounded-[1.1rem]",d),...m,children:a.jsx(ao,{colors:b[h],strokeWidth:4,className:f("wu-rounded-[1.1rem] wu-transform-gpu wu-flex wu-flex-col",d),style:{maxHeight:c||oo},children:t})})]})},Mn=({children:e,className:t,...n})=>a.jsx("div",{className:f("wu-flex wu-flex-col wu-gap-4 wu-p-4 rtl:wu-text-right wu-overflow-auto wu-bg-white","wu-p-8 wu-text-gray-lead",t),...n,children:e}),Xd=({children:e,className:t,...n})=>a.jsx(qr,{...n,"data-variant":"action",className:f("wu-text-lg wu-text-gray-lead wu-font-medium","wu-rounded-t-xl wu-px-4","group-data-[variant=action]:wu-bg-blue-sidebar group-data-[variant=action]:wu-text-blue-q","group-data-[variant=critical]:wu-bg-[#F9E0E0] group-data-[variant=critical]:wu-text-red-deep","group-data-[variant=upgrade]:wu-bg-[#FEF1D9] group-data-[variant=upgrade]:wu-text-yellow-deep",t),children:a.jsx(Zt,{className:"wu-font-normal wu-justify-start wu-text-2xl wu-h-14",children:e})}),Zd=({children:e,className:t,...n})=>a.jsx(so,{...n,className:f("wu-border-t wu-border-gray-40 wu-bg-white wu-min-h-16 wu-mx-4 wu-px-0","wu-mx-0 wu-rounded-b-xl wu-min-h-16 wu-p-4","group-data-[variant=upgrade]:wu-border-[#EED6A8]","group-data-[variant=action]:wu-border-[#BAC9F8]","group-data-[variant=critical]:wu-border-[#F0B3B3]",t),children:e}),xt=({children:e,className:t,...n})=>{const r=p.useRef(null);return a.jsx(jd,{asChild:!0,children:a.jsx(xe,{className:t,ref:r,...n,children:e})})},io=v.forwardRef(({className:e,dir:t,...n},r)=>a.jsx(mr.Root,{className:f("wu-bg-gray-40 wu-inline-flex wu-h-2 wu-w-8 wu-shrink-0 wu-cursor-pointer wu-items-center wu-rounded-full wu-transition-colors focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-[5px] focus-visible:wu-ring-offset-background disabled:wu-cursor-not-allowed disabled:wu-opacity-50 data-[state=unchecked]:wu-bg-gray-25 wu-group","hover:wu-bg-gray-subtle hover:data-[state=unchecked]:wu-bg-gray-subtle",e),...n,ref:r,children:a.jsx(mr.Thumb,{className:f("wu-block wu-h-4 wu-w-4 wu-rounded-full wu-bg-gray-subtle wu-shadow-lg wu-ring-0 wu-transition-all data-[state=checked]:wu-bg-blue-p","group-hover:data-[state=unchecked]:wu-bg-gray-lead",t==="rtl"&&"-wu-translate-x-4 data-[state=unchecked]:wu-translate-x-0",t!=="rtl"&&"wu-translate-x-4 data-[state=unchecked]:wu-translate-x-0","wu-toggle-thumb")})}));io.displayName=mr.Root.displayName;const zr=p.forwardRef((e,t)=>{const{Label:n,labelPosition:r="right",onChange:s,className:o,dir:i,disabled:u,id:l=Cn(),...c}=e;return p.useEffect(()=>{const{checked:d,defaultChecked:w}=c;d!==void 0&&w!==void 0&&console.error("WuToggle: Both `checked` and `defaultChecked` props are set. Use only one of them.")},[c.checked,c.defaultChecked]),a.jsxs("div",{className:f(Jd({labelPosition:r}),"wu-toggle-container"),dir:i,children:[a.jsx(io,{...c,id:l,disabled:u,ref:t,onCheckedChange:s,className:f("wu-peer",o),dir:i}),a.jsx(Te,{htmlFor:l,className:"wu-toggle-label",children:n})]})});zr.displayName="WuToggle";const Jd=ke.cva("wu-flex wu-items-center wu-gap-3 wu-w-fit",{variants:{labelPosition:{right:"wu-flex-row",left:"wu-flex-row-reverse",top:"wu-flex-col-reverse wu-items-baseline"}}}),Qd=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:l=>({isTable:l.editor.isActive("table"),tableAttrs:l.editor.getAttributes("table")})}),[n,r]=p.useState(!1),s=p.useRef(null),o=p.useCallback(()=>{s.current=setTimeout(()=>{e.chain().focus().insertTable({rows:2,cols:4,withHeaderRow:n}).run()},100)},[e,n]),i=p.useCallback(()=>{r(l=>!l),s.current=setTimeout(()=>{e.chain().focus().toggleHeaderRow().run()},100)},[e]),u=[{text:"Column left",icon:"wm-add",event:()=>e.chain().focus().addColumnBefore().run()},{text:"Row above",icon:"wm-add",event:()=>e.chain().focus().addRowBefore().run()},{text:"Column right",icon:"wm-add",event:()=>e.chain().focus().addColumnAfter().run()},{text:"Row below",icon:"wm-add",event:()=>e.chain().focus().addRowAfter().run()},{text:"Delete Column",icon:"wm-delete",event:()=>e.chain().focus().deleteColumn().run()},{text:"Delete Row",icon:"wm-delete",event:()=>e.chain().focus().deleteRow().run()}];return t.isTable?a.jsx(In,{Trigger:a.jsx("button",{className:`${K.EditorAction} ${t.isTable&&K.EditorActionActive}`,children:a.jsx(R,{icon:"wm-table"})}),hideCloseButton:!0,maxWidth:"320px",children:a.jsxs(Mn,{children:[a.jsx(pr.DialogTitle,{className:"wu-hidden"}),a.jsx(zr,{checked:n,onClick:i,Label:"Title Row",labelPosition:"left"}),a.jsx("div",{className:"wu-space-y-4 wu-mt-2",children:a.jsx("div",{className:"wu-grid wu-grid-cols-2 wu-gap-x-6 wu-gap-y-3",children:u.map(({text:l,icon:c,event:d})=>a.jsx(xe,{onClick:d,variant:"secondary",Icon:a.jsx(R,{icon:c}),className:"wu-text-xs wu-justify-start",children:l},l))})}),a.jsx("div",{className:"wu-flex wu-justify-end wu-gap-2 wu-mt-4",children:a.jsx(xt,{onClick:()=>e.chain().focus().deleteTable().run(),variant:"outline",color:"error",Icon:a.jsx("span",{className:"wm-delete"}),iconPosition:"left",className:"wu-text-xs",children:"Delete Table"})})]})}):a.jsx("button",{onClick:o,className:`${K.EditorAction} ${t.isTable&&K.EditorActionActive}`,children:a.jsx(R,{icon:"wm-table"})})},Rd=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:u=>{var l,c;return{isImage:(l=u.editor)==null?void 0:l.isActive("image"),imageAttrs:(c=u.editor)==null?void 0:c.getAttributes("image")}}}),[n,r]=p.useState(t.imageAttrs.src||""),[s,o]=p.useState(t.imageAttrs.alt||""),i=()=>{e.chain().focus().setImage({src:n,alt:s}).run()};return a.jsx(In,{hideCloseButton:!0,Trigger:a.jsx("button",{className:`${K.EditorAction} ${t.isImage&&K.EditorActionActive}`,children:a.jsx(R,{icon:"wm-image"})}),maxWidth:"400px",children:a.jsxs(Mn,{children:[a.jsx(Zt,{className:"wu-hidden"}),a.jsx(Ie,{Label:"Image URL",type:"url",value:n,onChange:u=>r(u.target.value),required:!0}),a.jsx(Ie,{Label:"Alt Text",type:"text",value:s,onChange:u=>o(u.target.value)}),a.jsxs("div",{className:"wu-flex wu-justify-end wu-gap-2",children:[a.jsx(xt,{variant:"secondary",children:"Cancel"}),a.jsx(xt,{onClick:i,disabled:!n,children:"Save"})]})]})})},ew=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:l=>{var c,d;return{isLink:(c=l.editor)==null?void 0:c.isActive("link"),linkAttrs:(d=l.editor)==null?void 0:d.getAttributes("link")}}}),[n,r]=p.useState(t.linkAttrs.href||""),[s,o]=p.useState(t.linkAttrs.alt||""),i=()=>{e.chain().focus().insertContent({type:"text",text:s||n,marks:[{type:"link",attrs:{href:n}}]}).run()},u=()=>{const{$from:l}=e.state.selection,c=l.parent.textContent,d=l.parentOffset;let w=d,h=d;for(;w>0&&!/\s/.test(c[w-1]);)w--;for(;h<c.length&&!/\s/.test(c[h]);)h++;const m=l.start(),b=m+w,g=m+h,x=c.slice(w,h);e.commands.setTextSelection({from:b,to:g}),r(t.linkAttrs.href||""),o(x||t.linkAttrs.alt||"")};return a.jsx(In,{Trigger:a.jsx("button",{className:`${K.EditorAction} ${t.isLink&&K.EditorActionActive}`,children:a.jsx(R,{icon:"wm-link"})}),maxWidth:"400px",onOpenChange:l=>l&&u(),children:a.jsxs(Mn,{children:[a.jsx(Zt,{className:"wu-hidden"}),a.jsx(Ie,{Label:"Link",type:"url",value:n,onChange:l=>r(l.target.value),required:!0}),a.jsx(Ie,{Label:"Text to display",type:"text",value:s,onChange:l=>o(l.target.value)}),a.jsxs("div",{className:"wu-flex wu-justify-end wu-gap-2",children:[t.isLink&&a.jsx(xt,{color:"error",onClick:()=>e.chain().focus().unsetLink().run(),variant:"secondary",children:"Remove"}),a.jsx(xt,{onClick:i,disabled:!n,children:"Save"})]})]})})},tw=["e","E","+","-"],nw="wu-border wu-rounded wu-w-10 wu-h-6 wu-text-center [appearance:textfield] [&::-webkit-outer-spin-button]:wu-appearance-none [&::-webkit-inner-spin-button]:wu-appearance-none focus:wu-border-blue-p",uo=1,rw=()=>{const{editor:e}=he(),[t,n]=p.useState(16),r=de.useEditorState({editor:e,selector:u=>({fontSize:u.editor.getAttributes("textStyle").fontSize})}),s=u=>{e.chain().focus().setFontSize(u+"px").run()},o=u=>{const l=Math.max(uo,u);n(l),s(l)},i=u=>{tw.includes(u.key)?u.preventDefault():u.key==="Enter"&&s(t)};return p.useEffect(()=>{var u;n(Number((u=r.fontSize)==null?void 0:u.replace("px",""))||16)},[r.fontSize]),a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-1",children:[a.jsx("button",{className:K.EditorAction,onClick:()=>o(t-1),disabled:t<=uo,children:"−"}),a.jsx("input",{type:"number",inputMode:"numeric",pattern:"[0-9]*",className:nw,value:t,onKeyDown:i,onChange:u=>n(u.target.valueAsNumber),onBlur:()=>s(t)}),a.jsx("button",{className:K.EditorAction,onClick:()=>o(t+1),disabled:t>=128,children:"+"})]})},sw=()=>{const{editor:e,customFonts:t}=he(),n=de.useEditorState({editor:e,selector:i=>({currentFontFamily:i.editor.getAttributes("textStyle").fontFamily||""})}),r=["Fira Sans","Inter","Poppins","JetBrains Mono","Montserrat",...t||[]],[s,o]=p.useState(n.currentFontFamily||r[0]);return p.useEffect(()=>{var i;o(((i=n.currentFontFamily)==null?void 0:i.replace(/"/g,""))||r[0])},[n.currentFontFamily]),a.jsxs(Vr,{children:[a.jsx(Lr,{className:K.EditorAction+" wu-transition-colors "+(s!=="Fira Sans"&&K.EditorActionActive),style:{fontFamily:s},title:s||"Font Family",children:s==null?void 0:s[0]}),a.jsx(An,{align:"start",className:"wu-border-blue-p wu-rounded",onCloseAutoFocus:i=>i.preventDefault(),children:r.map(i=>a.jsx(Yt,{title:i,onSelect:()=>{e.chain().focus().setFontFamily(i).run(),o(i)},className:s===i?K.EditorActionActive:"",children:i},i))})]})},aw={block:a.jsx(Dd,{}),fontFamily:a.jsx(sw,{}),fontSize:a.jsx(rw,{}),bold:a.jsx(qd,{}),italic:a.jsx(zd,{}),underline:a.jsx($d,{}),strike:a.jsx(Hd,{}),color:a.jsx(Pd,{}),list:a.jsx(_d,{}),alignment:a.jsx(Fd,{}),image:a.jsx(Rd,{}),link:a.jsx(ew,{}),table:a.jsx(Qd,{}),blockquote:a.jsx(Od,{}),superscript:a.jsx(Wd,{}),subscript:a.jsx(Bd,{}),codeline:a.jsx(Vd,{}),clear:a.jsx(Ld,{}),"|":a.jsx(Or,{orientation:"vertical",className:"wu-h-5"})},ow=["block","fontFamily","|","fontSize","|","bold","italic","underline","strike","|","color","|","list","alignment","|","image","link","|","blockquote","superscript","subscript","codeline","|","clear"],iw=e=>{const{editor:t,customFonts:n,children:r,items:s=ow,...o}=e;return a.jsx("div",{...o,children:a.jsx(Md,{editor:t,customFonts:n,children:a.jsxs("div",{className:"wu-flex wu-gap-1 wu-p-2 wu-items-center wu-justify-start wu-border-gray-40",children:[s.map((i,u)=>a.jsx(a.Fragment,{children:aw[i]},i+u)),r]})})})},uw=e=>{const{defaultValue:t,onUpdate:n,className:r,readonly:s,toolbarPosition:o="top",classNames:i={},customToolbarChildren:u,toolbarItems:l,hideToolbar:c,...d}=e,w=de.useEditor({editable:!s,extensions:Id,content:t,onUpdate:({editor:h})=>{n&&n(h.getHTML())}});return a.jsxs("div",{className:f(K.WuContentEditor,r,o==="top"?"wu-flex-col":"wu-flex-col-reverse"),onClick:()=>w==null?void 0:w.chain().focus().run(),...d,children:[!c&&a.jsx(iw,{editor:w,customFonts:e.customFonts,className:f("wu-sticky wu-z-10 wu-bg-white",i.toolbar,o==="top"?"wu-top-0 wu-border-b":"wu-bottom-0 wu-border-t"),items:l,children:u}),a.jsx(de.EditorContent,{editor:w,className:f("wu-p-4 wu-flex-grow",i.editor)})]})},lw=e=>{const{textToCopy:t,notificationText:n,...r}=e,[s,o]=p.useState(!1),i=async()=>{if(t)try{await navigator.clipboard.writeText(t),o(!0),setTimeout(()=>o(!1),2e3)}catch(u){console.error("Failed to copy:",u)}};return a.jsxs(xe,{...r,onClick:i,variant:"iconOnly",className:f("wu-relative",e.className),"aria-label":"Copy to clipboard",children:[n&&a.jsx("span",{className:f("wu-absolute wu-text-[6px] wu-leading-3 -wu-top-4 wu-right-0 wu-bg-gray-notification wu-text-white wu-rounded-sm wu-shadow-md wu-px-1 wu-animate-ping-once",s?"wu-block":"wu-hidden"),children:n}),a.jsx(R,{icon:"wm-content-copy",className:"wu-text-lg"})]})},lo=Q.Root,cw=Q.Trigger,dw=Q.Close,ww=Q.Portal,co=v.forwardRef(({className:e,...t},n)=>a.jsx(Q.Overlay,{className:f("wu-fixed wu-inset-0 wu-z-50 wu-bg-black/30 data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0","wu-drawer-overlay",e),...t,ref:n}));co.displayName=Q.Overlay.displayName;const fw=ke.cva("wu-fixed wu-z-50 wu-gap-4 wu-p-6 wu-shadow-lg wu-transition wu-ease-in-out data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-duration-500 data-[state=open]:wu-duration-500",{variants:{side:{top:"wu-inset-x-0 wu-top-0 wu-border-b data-[state=closed]:wu-slide-out-to-top data-[state=open]:wu-slide-in-from-top",bottom:"wu-inset-x-0 wu-bottom-0 wu-border-t data-[state=closed]:wu-slide-out-to-bottom data-[state=open]:wu-slide-in-from-bottom",left:"wu-inset-y-0 wu-left-0 wu-h-full wu-w-3/4 wu-border-r data-[state=closed]:wu-slide-out-to-left data-[state=open]:wu-slide-in-from-left sm:wu-max-w-sm",right:"wu-inset-y-0 wu-right-0 wu-h-full wu-w-3/4 wu-border-l data-[state=closed]:wu-slide-out-to-right data-[state=open]:wu-slide-in-from-right sm:wu-max-w-sm"}},defaultVariants:{side:"right"}}),$r=v.forwardRef(({side:e="right",className:t,children:n,hideCloseButton:r,overlayClassName:s,closeButtonClassName:o,...i},u)=>a.jsxs(ww,{children:[a.jsx(co,{className:s}),a.jsxs(Q.Content,{ref:u,className:f(fw({side:e}),t),...i,children:[n,!r&&a.jsx(Q.Close,{"aria-label":"close",asChild:!0,children:a.jsxs(gt,{variant:"iconOnly",className:f("wu-absolute wu-right-4 wu-top-4",o),children:[a.jsx("span",{className:"wm-close"}),a.jsx("span",{className:"wu-sr-only",children:"Close"})]})})]})]}));$r.displayName=Q.Content.displayName;const wo=v.forwardRef(({className:e,...t},n)=>a.jsx(Q.Title,{ref:n,className:f("wu-text-lg wu-font-semibold",e),...t}));wo.displayName=Q.Title.displayName;const pw=v.forwardRef(({className:e,...t},n)=>a.jsx(Q.Description,{ref:n,className:f("wu-text-sm",e),...t}));pw.displayName=Q.Description.displayName;const hw=e=>t=>{e&&t.preventDefault()},mw=e=>{const{Trigger:t,children:n,hideCloseButton:r,className:s,side:o="left",open:i,onOpenChange:u,preventClickOutside:l,overlayClassName:c,closeButtonClassName:d,...w}=e;return a.jsxs(lo,{open:i,onOpenChange:u,children:[a.jsx(cw,{asChild:!0,children:t}),a.jsxs($r,{onInteractOutside:hw(l),side:o,className:f("wu-bg-white wu-text-gray-lead wu-px-0",s),hideCloseButton:r,overlayClassName:c,closeButtonClassName:d,...w,children:[a.jsx("div",{className:"wu-hidden",children:a.jsx(wo,{})}),n]})]})},gw=({children:e,...t})=>a.jsx(dw,{...t,children:e}),fo=p.createContext({});function Hr(e){const t=p.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ur=typeof window<"u",po=Ur?p.useLayoutEffect:p.useEffect,Dn=p.createContext(null);function bw(e,t){e.indexOf(t)===-1&&e.push(t)}function yw(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const nt=(e,t,n)=>n>t?t:n<e?e:n;function jr(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Jt=()=>{},rt=()=>{};process.env.NODE_ENV!=="production"&&(Jt=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(jr(t,n))},rt=(e,t,n)=>{if(!e)throw new Error(jr(t,n))});const Ge={},ho=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function xw(e){return typeof e=="object"&&e!==null}const mo=e=>/^0[^.\s]+$/u.test(e);function Gr(e){let t;return()=>(t===void 0&&(t=e()),t)}const vt=e=>e,vw=(e,t)=>n=>t(e(n)),Pn=(...e)=>e.reduce(vw),go=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class bo{constructor(){this.subscriptions=[]}add(t){return bw(this.subscriptions,t),()=>yw(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let o=0;o<s;o++){const i=this.subscriptions[o];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const $e=e=>e*1e3,Pe=e=>e/1e3;function yo(e,t){return t?e*(1e3/t):0}const xo=new Set;function vo(e,t,n){e||xo.has(t)||(console.warn(jr(t,n)),xo.add(t))}const No=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Nw=1e-7,Cw=12;function Sw(e,t,n,r,s){let o,i,u=0;do i=t+(n-t)/2,o=No(i,r,s)-e,o>0?n=i:t=i;while(Math.abs(o)>Nw&&++u<Cw);return i}function Qt(e,t,n,r){if(e===t&&n===r)return vt;const s=o=>Sw(o,0,1,e,n);return o=>o===0||o===1?o:No(s(o),t,r)}const Co=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,So=e=>t=>1-e(1-t),To=Qt(.33,1.53,.69,.99),Kr=So(To),Eo=Co(Kr),Ao=e=>(e*=2)<1?.5*Kr(e):.5*(2-Math.pow(2,-10*(e-1))),Yr=e=>1-Math.sin(Math.acos(e)),Tw=So(Yr),ko=Co(Yr),Ew=Qt(.42,0,1,1),Aw=Qt(0,0,.58,1),Io=Qt(.42,0,.58,1),kw=e=>Array.isArray(e)&&typeof e[0]!="number",Mo=e=>Array.isArray(e)&&typeof e[0]=="number",Do={linear:vt,easeIn:Ew,easeInOut:Io,easeOut:Aw,circIn:Yr,circInOut:ko,circOut:Tw,backIn:Kr,backInOut:Eo,backOut:To,anticipate:Ao},Iw=e=>typeof e=="string",Po=e=>{if(Mo(e)){rt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,s]=e;return Qt(t,n,r,s)}else if(Iw(e))return rt(Do[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Do[e];return e},_n=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Mw(e,t){let n=new Set,r=new Set,s=!1,o=!1;const i=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function l(d){i.has(d)&&(c.schedule(d),e()),d(u)}const c={schedule:(d,w=!1,h=!1)=>{const b=h&&s?n:r;return w&&i.add(d),b.has(d)||b.add(d),d},cancel:d=>{r.delete(d),i.delete(d)},process:d=>{if(u=d,s){o=!0;return}s=!0,[n,r]=[r,n],n.forEach(l),n.clear(),s=!1,o&&(o=!1,c.process(d))}};return c}const Dw=40;function _o(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=_n.reduce((N,S)=>(N[S]=Mw(o),N),{}),{setup:u,read:l,resolveKeyframes:c,preUpdate:d,update:w,preRender:h,render:m,postRender:b}=i,g=()=>{const N=Ge.useManualTiming?s.timestamp:performance.now();n=!1,Ge.useManualTiming||(s.delta=r?1e3/60:Math.max(Math.min(N-s.timestamp,Dw),1)),s.timestamp=N,s.isProcessing=!0,u.process(s),l.process(s),c.process(s),d.process(s),w.process(s),h.process(s),m.process(s),b.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(g))},x=()=>{n=!0,r=!0,s.isProcessing||e(g)};return{schedule:_n.reduce((N,S)=>{const E=i[S];return N[S]=(I,A=!1,k=!1)=>(n||x(),E.schedule(I,A,k)),N},{}),cancel:N=>{for(let S=0;S<_n.length;S++)i[_n[S]].cancel(N)},state:s,steps:i}}const{schedule:_e,cancel:Xr,state:Fn}=_o(typeof requestAnimationFrame<"u"?requestAnimationFrame:vt,!0);let Vn;function Pw(){Vn=void 0}const Ae={now:()=>(Vn===void 0&&Ae.set(Fn.isProcessing||Ge.useManualTiming?Fn.timestamp:performance.now()),Vn),set:e=>{Vn=e,queueMicrotask(Pw)}},Fo=e=>t=>typeof t=="string"&&t.startsWith(e),Vo=Fo("--"),_w=Fo("var(--"),Zr=e=>_w(e)?Fw.test(e.split("/*")[0].trim()):!1,Fw=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Nt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Rt={...Nt,transform:e=>nt(0,1,e)},Ln={...Nt,default:1},en=e=>Math.round(e*1e5)/1e5,Jr=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Vw(e){return e==null}const Lw=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Qr=(e,t)=>n=>!!(typeof n=="string"&&Lw.test(n)&&n.startsWith(e)||t&&!Vw(n)&&Object.prototype.hasOwnProperty.call(n,t)),Lo=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,o,i,u]=r.match(Jr);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(i),alpha:u!==void 0?parseFloat(u):1}},Ow=e=>nt(0,255,e),Rr={...Nt,transform:e=>Math.round(Ow(e))},st={test:Qr("rgb","red"),parse:Lo("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Rr.transform(e)+", "+Rr.transform(t)+", "+Rr.transform(n)+", "+en(Rt.transform(r))+")"};function Ww(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const es={test:Qr("#"),parse:Ww,transform:st.transform},tn=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Xe=tn("deg"),Ct=tn("%"),L=tn("px"),Bw=tn("vh"),qw=tn("vw"),Oo={...Ct,parse:e=>Ct.parse(e)/100,transform:e=>Ct.transform(e*100)},St={test:Qr("hsl","hue"),parse:Lo("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Ct.transform(en(t))+", "+Ct.transform(en(n))+", "+en(Rt.transform(r))+")"},ce={test:e=>st.test(e)||es.test(e)||St.test(e),parse:e=>st.test(e)?st.parse(e):St.test(e)?St.parse(e):es.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?st.transform(e):St.transform(e),getAnimatableNone:e=>{const t=ce.parse(e);return t.alpha=0,ce.transform(t)}},zw=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function $w(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Jr))==null?void 0:t.length)||0)+(((n=e.match(zw))==null?void 0:n.length)||0)>0}const Wo="number",Bo="color",Hw="var",Uw="var(",qo="${}",jw=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function nn(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const u=t.replace(jw,l=>(ce.test(l)?(r.color.push(o),s.push(Bo),n.push(ce.parse(l))):l.startsWith(Uw)?(r.var.push(o),s.push(Hw),n.push(l)):(r.number.push(o),s.push(Wo),n.push(parseFloat(l))),++o,qo)).split(qo);return{values:n,split:u,indexes:r,types:s}}function zo(e){return nn(e).values}function $o(e){const{split:t,types:n}=nn(e),r=t.length;return s=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],s[i]!==void 0){const u=n[i];u===Wo?o+=en(s[i]):u===Bo?o+=ce.transform(s[i]):o+=s[i]}return o}}const Gw=e=>typeof e=="number"?0:ce.test(e)?ce.getAnimatableNone(e):e;function Kw(e){const t=zo(e);return $o(e)(t.map(Gw))}const Ze={test:$w,parse:zo,createTransformer:$o,getAnimatableNone:Kw};function ts(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Yw({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,o=0,i=0;if(!t)s=o=i=n;else{const u=n<.5?n*(1+t):n+t-n*t,l=2*n-u;s=ts(l,u,e+1/3),o=ts(l,u,e),i=ts(l,u,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:r}}function On(e,t){return n=>n>0?t:e}const rn=(e,t,n)=>e+(t-e)*n,ns=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},Xw=[es,st,St],Zw=e=>Xw.find(t=>t.test(e));function Ho(e){const t=Zw(e);if(Jt(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===St&&(n=Yw(n)),n}const Uo=(e,t)=>{const n=Ho(e),r=Ho(t);if(!n||!r)return On(e,t);const s={...n};return o=>(s.red=ns(n.red,r.red,o),s.green=ns(n.green,r.green,o),s.blue=ns(n.blue,r.blue,o),s.alpha=rn(n.alpha,r.alpha,o),st.transform(s))},rs=new Set(["none","hidden"]);function Jw(e,t){return rs.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Qw(e,t){return n=>rn(e,t,n)}function ss(e){return typeof e=="number"?Qw:typeof e=="string"?Zr(e)?On:ce.test(e)?Uo:tf:Array.isArray(e)?jo:typeof e=="object"?ce.test(e)?Uo:Rw:On}function jo(e,t){const n=[...e],r=n.length,s=e.map((o,i)=>ss(o)(o,t[i]));return o=>{for(let i=0;i<r;i++)n[i]=s[i](o);return n}}function Rw(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=ss(e[s])(e[s],t[s]));return s=>{for(const o in r)n[o]=r[o](s);return n}}function ef(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],i=e.indexes[o][r[o]],u=e.values[i]??0;n[s]=u,r[o]++}return n}const tf=(e,t)=>{const n=Ze.createTransformer(t),r=nn(e),s=nn(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?rs.has(e)&&!s.values.length||rs.has(t)&&!r.values.length?Jw(e,t):Pn(jo(ef(r,s),s.values),n):(Jt(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),On(e,t))};function Go(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?rn(e,t,n):ss(e)(e,t)}const nf=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>_e.update(t,n),stop:()=>Xr(t),now:()=>Fn.isProcessing?Fn.timestamp:Ae.now()}},Ko=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)r+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Wn=2e4;function as(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Wn;)t+=n,r=e.next(t);return t>=Wn?1/0:t}function rf(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(as(r),Wn);return{type:"keyframes",ease:o=>r.next(s*o).value/t,duration:Pe(s)}}const sf=5;function Yo(e,t,n){const r=Math.max(t-sf,0);return yo(n-e(r),t-r)}const ie={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},os=.001;function af({duration:e=ie.duration,bounce:t=ie.bounce,velocity:n=ie.velocity,mass:r=ie.mass}){let s,o;Jt(e<=$e(ie.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=nt(ie.minDamping,ie.maxDamping,i),e=nt(ie.minDuration,ie.maxDuration,Pe(e)),i<1?(s=c=>{const d=c*i,w=d*e,h=d-n,m=is(c,i),b=Math.exp(-w);return os-h/m*b},o=c=>{const w=c*i*e,h=w*n+n,m=Math.pow(i,2)*Math.pow(c,2)*e,b=Math.exp(-w),g=is(Math.pow(c,2),i);return(-s(c)+os>0?-1:1)*((h-m)*b)/g}):(s=c=>{const d=Math.exp(-c*e),w=(c-n)*e+1;return-os+d*w},o=c=>{const d=Math.exp(-c*e),w=(n-c)*(e*e);return d*w});const u=5/e,l=uf(s,o,u);if(e=$e(e),isNaN(l))return{stiffness:ie.stiffness,damping:ie.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const of=12;function uf(e,t,n){let r=n;for(let s=1;s<of;s++)r=r-e(r)/t(r);return r}function is(e,t){return e*Math.sqrt(1-t*t)}const lf=["duration","bounce"],cf=["stiffness","damping","mass"];function Xo(e,t){return t.some(n=>e[n]!==void 0)}function df(e){let t={velocity:ie.velocity,stiffness:ie.stiffness,damping:ie.damping,mass:ie.mass,isResolvedFromDuration:!1,...e};if(!Xo(e,cf)&&Xo(e,lf))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,o=2*nt(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:ie.mass,stiffness:s,damping:o}}else{const n=af(e);t={...t,...n,mass:ie.mass},t.isResolvedFromDuration=!0}return t}function Bn(e=ie.visualDuration,t=ie.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const o=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],u={done:!1,value:o},{stiffness:l,damping:c,mass:d,duration:w,velocity:h,isResolvedFromDuration:m}=df({...n,velocity:-Pe(n.velocity||0)}),b=h||0,g=c/(2*Math.sqrt(l*d)),x=i-o,C=Pe(Math.sqrt(l/d)),y=Math.abs(x)<5;r||(r=y?ie.restSpeed.granular:ie.restSpeed.default),s||(s=y?ie.restDelta.granular:ie.restDelta.default);let N;if(g<1){const E=is(C,g);N=I=>{const A=Math.exp(-g*C*I);return i-A*((b+g*C*x)/E*Math.sin(E*I)+x*Math.cos(E*I))}}else if(g===1)N=E=>i-Math.exp(-C*E)*(x+(b+C*x)*E);else{const E=C*Math.sqrt(g*g-1);N=I=>{const A=Math.exp(-g*C*I),k=Math.min(E*I,300);return i-A*((b+g*C*x)*Math.sinh(k)+E*x*Math.cosh(k))/E}}const S={calculatedDuration:m&&w||null,next:E=>{const I=N(E);if(m)u.done=E>=w;else{let A=E===0?b:0;g<1&&(A=E===0?$e(b):Yo(N,E,I));const k=Math.abs(A)<=r,D=Math.abs(i-I)<=s;u.done=k&&D}return u.value=u.done?i:I,u},toString:()=>{const E=Math.min(as(S),Wn),I=Ko(A=>S.next(E*A).value,E,30);return E+"ms "+I},toTransition:()=>{}};return S}Bn.applyToOptions=e=>{const t=rf(e,100,Bn);return e.ease=t.ease,e.duration=$e(t.duration),e.type="keyframes",e};function us({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:i,min:u,max:l,restDelta:c=.5,restSpeed:d}){const w=e[0],h={done:!1,value:w},m=k=>u!==void 0&&k<u||l!==void 0&&k>l,b=k=>u===void 0?l:l===void 0||Math.abs(u-k)<Math.abs(l-k)?u:l;let g=n*t;const x=w+g,C=i===void 0?x:i(x);C!==x&&(g=C-w);const y=k=>-g*Math.exp(-k/r),N=k=>C+y(k),S=k=>{const D=y(k),_=N(k);h.done=Math.abs(D)<=c,h.value=h.done?C:_};let E,I;const A=k=>{m(h.value)&&(E=k,I=Bn({keyframes:[h.value,b(h.value)],velocity:Yo(N,k,h.value),damping:s,stiffness:o,restDelta:c,restSpeed:d}))};return A(0),{calculatedDuration:null,next:k=>{let D=!1;return!I&&E===void 0&&(D=!0,S(k),A(k)),E!==void 0&&k>=E?I.next(k-E):(!D&&S(k),h)}}}function wf(e,t,n){const r=[],s=n||Ge.mix||Go,o=e.length-1;for(let i=0;i<o;i++){let u=s(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||vt:t;u=Pn(l,u)}r.push(u)}return r}function ff(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const o=e.length;if(rt(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const u=wf(t,r,s),l=u.length,c=d=>{if(i&&d<e[0])return t[0];let w=0;if(l>1)for(;w<e.length-2&&!(d<e[w+1]);w++);const h=go(e[w],e[w+1],d);return u[w](h)};return n?d=>c(nt(e[0],e[o-1],d)):c}function pf(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=go(0,t,r);e.push(rn(n,1,s))}}function hf(e){const t=[0];return pf(t,e.length-1),t}function mf(e,t){return e.map(n=>n*t)}function gf(e,t){return e.map(()=>t||Io).splice(0,e.length-1)}function Tt({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=kw(r)?r.map(Po):Po(r),o={done:!1,value:t[0]},i=mf(n&&n.length===t.length?n:hf(t),e),u=ff(i,t,{ease:Array.isArray(s)?s:gf(t,s)});return{calculatedDuration:e,next:l=>(o.value=u(l),o.done=l>=e,o)}}const bf=e=>e!==null;function ls(e,{repeat:t,repeatType:n="loop"},r,s=1){const o=e.filter(bf),u=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!u||r===void 0?o[u]:r}const yf={decay:us,inertia:us,tween:Tt,keyframes:Tt,spring:Bn};function Zo(e){typeof e.type=="string"&&(e.type=yf[e.type])}class cs{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const xf=e=>e/100;class ds extends cs{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==Ae.now()&&this.tick(Ae.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Zo(t);const{type:n=Tt,repeat:r=0,repeatDelay:s=0,repeatType:o,velocity:i=0}=t;let{keyframes:u}=t;const l=n||Tt;process.env.NODE_ENV!=="production"&&l!==Tt&&rt(u.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${u}`,"spring-two-frames"),l!==Tt&&typeof u[0]!="number"&&(this.mixKeyframes=Pn(xf,Go(u[0],u[1])),u=[0,100]);const c=l({...t,keyframes:u});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...u].reverse(),velocity:-i})),c.calculatedDuration===null&&(c.calculatedDuration=as(c));const{calculatedDuration:d}=c;this.calculatedDuration=d,this.resolvedDuration=d+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:o,mirroredGenerator:i,resolvedDuration:u,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:d,repeat:w,repeatType:h,repeatDelay:m,type:b,onUpdate:g,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const C=this.currentTime-c*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?C<0:C>s;this.currentTime=Math.max(C,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let N=this.currentTime,S=r;if(w){const k=Math.min(this.currentTime,s)/u;let D=Math.floor(k),_=k%1;!_&&k>=1&&(_=1),_===1&&D--,D=Math.min(D,w+1),!!(D%2)&&(h==="reverse"?(_=1-_,m&&(_-=m/u)):h==="mirror"&&(S=i)),N=nt(0,1,_)*u}const E=y?{done:!1,value:d[0]}:S.next(N);o&&(E.value=o(E.value));let{done:I}=E;!y&&l!==null&&(I=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return A&&b!==us&&(E.value=ls(d,this.options,x,this.speed)),g&&g(E.value),A&&this.finish(),E}then(t,n){return this.finished.then(t,n)}get duration(){return Pe(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Pe(t)}get time(){return Pe(this.currentTime)}set time(t){var n;t=$e(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ae.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Pe(this.currentTime))}play(){var s,o;if(this.isStopped)return;const{driver:t=nf,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),(o=(s=this.options).onPlay)==null||o.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ae.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function vf(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const at=e=>e*180/Math.PI,ws=e=>{const t=at(Math.atan2(e[1],e[0]));return fs(t)},Nf={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ws,rotateZ:ws,skewX:e=>at(Math.atan(e[1])),skewY:e=>at(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},fs=e=>(e=e%360,e<0&&(e+=360),e),Jo=ws,Qo=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ro=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Cf={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Qo,scaleY:Ro,scale:e=>(Qo(e)+Ro(e))/2,rotateX:e=>fs(at(Math.atan2(e[6],e[5]))),rotateY:e=>fs(at(Math.atan2(-e[2],e[0]))),rotateZ:Jo,rotate:Jo,skewX:e=>at(Math.atan(e[4])),skewY:e=>at(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ps(e){return e.includes("scale")?1:0}function hs(e,t){if(!e||e==="none")return ps(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=Cf,s=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Nf,s=u}if(!s)return ps(t);const o=r[t],i=s[1].split(",").map(Tf);return typeof o=="function"?o(i):i[o]}const Sf=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return hs(n,t)};function Tf(e){return parseFloat(e.trim())}const Et=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],At=new Set(Et),ei=e=>e===Nt||e===L,Ef=new Set(["x","y","z"]),Af=Et.filter(e=>!Ef.has(e));function kf(e){const t=[];return Af.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ot={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>hs(t,"x"),y:(e,{transform:t})=>hs(t,"y")};ot.translateX=ot.x,ot.translateY=ot.y;const it=new Set;let ms=!1,gs=!1,bs=!1;function ti(){if(gs){const e=Array.from(it).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=kf(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([o,i])=>{var u;(u=r.getValue(o))==null||u.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}gs=!1,ms=!1,it.forEach(e=>e.complete(bs)),it.clear()}function ni(){it.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(gs=!0)})}function If(){bs=!0,ni(),ti(),bs=!1}class ys{constructor(t,n,r,s,o,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=o,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(it.add(this),ms||(ms=!0,_e.read(ni),_e.resolveKeyframes(ti))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const o=s==null?void 0:s.get(),i=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const u=r.readValue(n,i);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=i),s&&o===void 0&&s.set(t[0])}vf(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),it.delete(this)}cancel(){this.state==="scheduled"&&(it.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Mf=e=>e.startsWith("--");function Df(e,t,n){Mf(t)?e.style.setProperty(t,n):e.style[t]=n}const Pf=Gr(()=>window.ScrollTimeline!==void 0),_f={};function Ff(e,t){const n=Gr(e);return()=>_f[t]??n()}const ri=Ff(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),sn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,si={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:sn([0,.65,.55,1]),circOut:sn([.55,0,1,.45]),backIn:sn([.31,.01,.66,-.59]),backOut:sn([.33,1.53,.69,.99])};function ai(e,t){if(e)return typeof e=="function"?ri()?Ko(e,t):"ease-out":Mo(e)?sn(e):Array.isArray(e)?e.map(n=>ai(n,t)||si.easeOut):si[e]}function Vf(e,t,n,{delay:r=0,duration:s=300,repeat:o=0,repeatType:i="loop",ease:u="easeOut",times:l}={},c=void 0){const d={[t]:n};l&&(d.offset=l);const w=ai(u,s);Array.isArray(w)&&(d.easing=w);const h={delay:r,duration:s,easing:Array.isArray(w)?"linear":w,fill:"both",iterations:o+1,direction:i==="reverse"?"alternate":"normal"};return c&&(h.pseudoElement=c),e.animate(d,h)}function oi(e){return typeof e=="function"&&"applyToOptions"in e}function Lf({type:e,...t}){return oi(e)&&ri()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Of extends cs{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:o,allowFlatten:i=!1,finalKeyframe:u,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=i,this.options=t,rt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=Lf(t);this.animation=Vf(n,r,s,c,o),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const d=ls(s,this.options,u,this.speed);this.updateMotionValue?this.updateMotionValue(d):Df(n,r,d),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Pe(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Pe(t)}get time(){return Pe(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=$e(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Pf()?(this.animation.timeline=t,vt):n(this)}}const ii={anticipate:Ao,backInOut:Eo,circInOut:ko};function Wf(e){return e in ii}function Bf(e){typeof e.ease=="string"&&Wf(e.ease)&&(e.ease=ii[e.ease])}const ui=10;class qf extends Of{constructor(t){Bf(t),Zo(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:o,...i}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const u=new ds({...i,autoplay:!1}),l=$e(this.finishedTime??this.time);n.setWithVelocity(u.sample(l-ui).value,u.sample(l).value,ui),u.stop()}}const li=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ze.test(e)||e==="0")&&!e.startsWith("url("));function zf(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function $f(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],i=li(s,t),u=li(o,t);return Jt(i===u,`You are trying to animate ${t} from "${s}" to "${o}". "${i?o:s}" is not an animatable value.`,"value-not-animatable"),!i||!u?!1:zf(e)||(n==="spring"||oi(n))&&r}function xs(e){e.duration=0,e.type="keyframes"}const Hf=new Set(["opacity","clipPath","filter","transform"]),Uf=Gr(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function jf(e){var d;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:o,type:i}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return Uf()&&n&&Hf.has(n)&&(n!=="transform"||!c)&&!l&&!r&&s!=="mirror"&&o!==0&&i!=="inertia"}const Gf=40;class Kf extends cs{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:i="loop",keyframes:u,name:l,motionValue:c,element:d,...w}){var b;super(),this.stop=()=>{var g,x;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=Ae.now();const h={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:o,repeatType:i,name:l,motionValue:c,element:d,...w},m=(d==null?void 0:d.KeyframeResolver)||ys;this.keyframeResolver=new m(u,(g,x,C)=>this.onKeyframesResolved(g,x,h,!C),l,c,d),(b=this.keyframeResolver)==null||b.scheduleResolve()}onKeyframesResolved(t,n,r,s){this.keyframeResolver=void 0;const{name:o,type:i,velocity:u,delay:l,isHandoff:c,onUpdate:d}=r;this.resolvedAt=Ae.now(),$f(t,o,i,u)||((Ge.instantAnimations||!l)&&(d==null||d(ls(t,r,n))),t[0]=t[t.length-1],xs(r),r.repeat=0);const h={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Gf?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},m=!c&&jf(h)?new qf({...h,element:h.motionValue.owner.current}):new ds(h);m.finished.then(()=>this.notifyFinished()).catch(vt),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),If()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const Yf=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Xf(e){const t=Yf.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const Zf=4;function ci(e,t,n=1){rt(n<=Zf,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=Xf(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const i=o.trim();return ho(i)?parseFloat(i):i}return Zr(s)?ci(s,t,n+1):s}function di(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const wi=new Set(["width","height","top","left","right","bottom",...Et]),Jf={test:e=>e==="auto",parse:e=>e},fi=e=>t=>t.test(e),pi=[Nt,L,Ct,Xe,qw,Bw,Jf],hi=e=>pi.find(fi(e));function Qf(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||mo(e):!0}const Rf=new Set(["brightness","contrast","saturate","opacity"]);function ep(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Jr)||[];if(!r)return e;const s=n.replace(r,"");let o=Rf.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+s+")"}const tp=/\b([a-z-]*)\(.*?\)/gu,vs={...Ze,getAnimatableNone:e=>{const t=e.match(tp);return t?t.map(ep).join(" "):e}},mi={...Nt,transform:Math.round},Ns={borderWidth:L,borderTopWidth:L,borderRightWidth:L,borderBottomWidth:L,borderLeftWidth:L,borderRadius:L,radius:L,borderTopLeftRadius:L,borderTopRightRadius:L,borderBottomRightRadius:L,borderBottomLeftRadius:L,width:L,maxWidth:L,height:L,maxHeight:L,top:L,right:L,bottom:L,left:L,padding:L,paddingTop:L,paddingRight:L,paddingBottom:L,paddingLeft:L,margin:L,marginTop:L,marginRight:L,marginBottom:L,marginLeft:L,backgroundPositionX:L,backgroundPositionY:L,...{rotate:Xe,rotateX:Xe,rotateY:Xe,rotateZ:Xe,scale:Ln,scaleX:Ln,scaleY:Ln,scaleZ:Ln,skew:Xe,skewX:Xe,skewY:Xe,distance:L,translateX:L,translateY:L,translateZ:L,x:L,y:L,z:L,perspective:L,transformPerspective:L,opacity:Rt,originX:Oo,originY:Oo,originZ:L},zIndex:mi,fillOpacity:Rt,strokeOpacity:Rt,numOctaves:mi},np={...Ns,color:ce,backgroundColor:ce,outlineColor:ce,fill:ce,stroke:ce,borderColor:ce,borderTopColor:ce,borderRightColor:ce,borderBottomColor:ce,borderLeftColor:ce,filter:vs,WebkitFilter:vs},gi=e=>np[e];function bi(e,t){let n=gi(e);return n!==vs&&(n=Ze),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const rp=new Set(["auto","none","0"]);function sp(e,t,n){let r=0,s;for(;r<e.length&&!s;){const o=e[r];typeof o=="string"&&!rp.has(o)&&nn(o).values.length&&(s=e[r]),r++}if(s&&n)for(const o of t)e[o]=bi(n,s)}class ap extends ys{constructor(t,n,r,s,o){super(t,n,r,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Zr(c))){const d=ci(c,n.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!wi.has(r)||t.length!==2)return;const[s,o]=t,i=hi(s),u=hi(o);if(i!==u)if(ei(i)&&ei(u))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else ot[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||Qf(t[s]))&&r.push(s);r.length&&sp(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ot[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var u;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=r.length-1,i=r[o];r[o]=ot[n](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),(u=this.removedTransforms)!=null&&u.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function op(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const s=(n==null?void 0:n[e])??r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}const yi=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function xi(e){return xw(e)&&"offsetHeight"in e}const vi=30,ip=e=>!isNaN(parseFloat(e));class up{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const s=Ae.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ae.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=ip(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&vo(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new bo);const r=this.events[t].add(n);return t==="change"?()=>{r(),_e.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ae.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>vi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,vi);return yo(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function qn(e,t){return new up(e,t)}const{schedule:lp}=_o(queueMicrotask,!1),cp={y:!1};function dp(){return cp.y}function Ni(e,t){const n=op(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function Ci(e){return!(e.pointerType==="touch"||dp())}function wp(e,t,n={}){const[r,s,o]=Ni(e,n),i=u=>{if(!Ci(u))return;const{target:l}=u,c=t(l,u);if(typeof c!="function"||!l)return;const d=w=>{Ci(w)&&(c(w),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,s)};return r.forEach(u=>{u.addEventListener("pointerenter",i,s)}),o}const Si=(e,t)=>t?e===t?!0:Si(e,t.parentElement):!1,fp=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,pp=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function hp(e){return pp.has(e.tagName)||e.tabIndex!==-1}const zn=new WeakSet;function Ti(e){return t=>{t.key==="Enter"&&e(t)}}function Cs(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const mp=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Ti(()=>{if(zn.has(n))return;Cs(n,"down");const s=Ti(()=>{Cs(n,"up")}),o=()=>Cs(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Ei(e){return fp(e)&&!0}function gp(e,t,n={}){const[r,s,o]=Ni(e,n),i=u=>{const l=u.currentTarget;if(!Ei(u))return;zn.add(l);const c=t(l,u),d=(m,b)=>{window.removeEventListener("pointerup",w),window.removeEventListener("pointercancel",h),zn.has(l)&&zn.delete(l),Ei(m)&&typeof c=="function"&&c(m,{success:b})},w=m=>{d(m,l===window||l===document||n.useGlobalTarget||Si(l,m.target))},h=m=>{d(m,!1)};window.addEventListener("pointerup",w,s),window.addEventListener("pointercancel",h,s)};return r.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",i,s),xi(u)&&(u.addEventListener("focus",c=>mp(c,s)),!hp(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),o}const ge=e=>!!(e&&e.getVelocity),bp=[...pi,ce,Ze],yp=e=>bp.find(fi(e)),Ss=p.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Ai(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function xp(...e){return t=>{let n=!1;const r=e.map(s=>{const o=Ai(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():Ai(e[s],null)}}}}function vp(...e){return v.useCallback(xp(...e),e)}class Np extends v.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,s=xi(r)&&r.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=s-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Cp({children:e,isPresent:t,anchorX:n,root:r}){const s=p.useId(),o=p.useRef(null),i=p.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:u}=p.useContext(Ss),l=vp(o,e==null?void 0:e.ref);return p.useInsertionEffect(()=>{const{width:c,height:d,top:w,left:h,right:m}=i.current;if(t||!o.current||!c||!d)return;const b=n==="left"?`left: ${h}`:`right: ${m}`;o.current.dataset.motionPopId=s;const g=document.createElement("style");u&&(g.nonce=u);const x=r??document.head;return x.appendChild(g),g.sheet&&g.sheet.insertRule(`
|
|
7
|
+
)`;c.style.setProperty("--spotlight-background",C)})};return window.addEventListener("mousemove",h),()=>{window.removeEventListener("mousemove",h),w&&cancelAnimationFrame(w)}}},[t,n,o,i]),a.jsx("div",{ref:l,className:f(Yd.gradientBackground,"wu-transform-gpu",s),...u,children:r})},In={wuModalBodyWrapper:"_wuModalBodyWrapper_10o33_1","wu-modal-footer":"_wu-modal-footer_10o33_5","wu-modal-content":"_wu-modal-content_10o33_5","wu-modal-header":"_wu-modal-header_10o33_9"},io="calc(100vh - 64px)",Xd={sm:"400px",md:"600px",lg:"1200px"},Mn=({Trigger:e,children:t,size:n="md",hideCloseButton:r,preventClickOutside:s,onOpenChange:o,open:i,dir:u,maxWidth:l,maxHeight:c,className:d,style:w,variant:h="action",...m})=>{const b={action:["#EEF3FBcc 32%","#1D50F4cc"],upgrade:["#FDEDCCcc 32%","#FF9F00cc"],critical:["#FFB6B6cc 32%","#CC0000cc"]};return a.jsxs(no,{modal:!0,onOpenChange:o,open:i,children:[e&&a.jsx(ro,{asChild:!0,children:e}),a.jsx(qr,{style:{width:"calc(100% - 64px)",maxWidth:l||Xd[n],maxHeight:c||io,...w},hideCloseButton:r,onInteractOutside:g=>s&&g.preventDefault(),dir:u,"aria-describedby":void 0,"data-variant":h,className:f("wu-group wu-rounded-[1.1rem]",In.wuModalBodyWrapper,d),...m,children:a.jsx(oo,{colors:b[h],strokeWidth:4,className:f("wu-rounded-[1.1rem] wu-transform-gpu wu-flex wu-flex-col",d),style:{maxHeight:c||io},children:t})})]})},Dn=({children:e,className:t,...n})=>a.jsx("div",{className:f("wu-flex wu-flex-col wu-gap-4 wu-p-4 rtl:wu-text-right wu-overflow-auto wu-bg-white","wu-p-8 wu-text-gray-lead",In["wu-modal-content"],t),...n,children:e}),Zd=({children:e,className:t,...n})=>a.jsx(zr,{...n,"data-variant":"action",className:f("wu-text-lg wu-text-gray-lead wu-font-medium","wu-rounded-t-xl wu-px-4","group-data-[variant=action]:wu-bg-blue-sidebar group-data-[variant=action]:wu-text-blue-q","group-data-[variant=critical]:wu-bg-[#F9E0E0] group-data-[variant=critical]:wu-text-red-deep","group-data-[variant=upgrade]:wu-bg-[#FEF1D9] group-data-[variant=upgrade]:wu-text-yellow-deep",In["wu-modal-header"],t),children:a.jsx(Zt,{className:"wu-font-normal wu-justify-start wu-text-2xl wu-h-14",children:e})}),Jd=({children:e,className:t,...n})=>a.jsx(ao,{...n,className:f("wu-border-t wu-border-gray-40 wu-bg-white wu-min-h-16 wu-mx-4 wu-px-0","wu-mx-0 wu-rounded-b-xl wu-min-h-16 wu-p-4","group-data-[variant=upgrade]:wu-border-[#EED6A8]","group-data-[variant=action]:wu-border-[#BAC9F8]","group-data-[variant=critical]:wu-border-[#F0B3B3]",In["wu-modal-footer"],t),children:e}),xt=({children:e,className:t,...n})=>{const r=p.useRef(null);return a.jsx(Gd,{asChild:!0,children:a.jsx(xe,{className:t,ref:r,...n,children:e})})},uo=v.forwardRef(({className:e,dir:t,...n},r)=>a.jsx(gr.Root,{className:f("wu-bg-gray-40 wu-inline-flex wu-h-2 wu-w-8 wu-shrink-0 wu-cursor-pointer wu-items-center wu-rounded-full wu-transition-colors focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-[5px] focus-visible:wu-ring-offset-background disabled:wu-cursor-not-allowed disabled:wu-opacity-50 data-[state=unchecked]:wu-bg-gray-25 wu-group","hover:wu-bg-gray-subtle hover:data-[state=unchecked]:wu-bg-gray-subtle",e),...n,ref:r,children:a.jsx(gr.Thumb,{className:f("wu-block wu-h-4 wu-w-4 wu-rounded-full wu-bg-gray-subtle wu-shadow-lg wu-ring-0 wu-transition-all data-[state=checked]:wu-bg-blue-p","group-hover:data-[state=unchecked]:wu-bg-gray-lead",t==="rtl"&&"-wu-translate-x-4 data-[state=unchecked]:wu-translate-x-0",t!=="rtl"&&"wu-translate-x-4 data-[state=unchecked]:wu-translate-x-0","wu-toggle-thumb")})}));uo.displayName=gr.Root.displayName;const $r=p.forwardRef((e,t)=>{const{Label:n,labelPosition:r="right",onChange:s,className:o,dir:i,disabled:u,id:l=Cn(),...c}=e;return p.useEffect(()=>{const{checked:d,defaultChecked:w}=c;d!==void 0&&w!==void 0&&console.error("WuToggle: Both `checked` and `defaultChecked` props are set. Use only one of them.")},[c.checked,c.defaultChecked]),a.jsxs("div",{className:f(Qd({labelPosition:r}),"wu-toggle-container"),dir:i,children:[a.jsx(uo,{...c,id:l,disabled:u,ref:t,onCheckedChange:s,className:f("wu-peer",o),dir:i}),a.jsx(Te,{htmlFor:l,className:"wu-toggle-label",children:n})]})});$r.displayName="WuToggle";const Qd=ke.cva("wu-flex wu-items-center wu-gap-3 wu-w-fit",{variants:{labelPosition:{right:"wu-flex-row",left:"wu-flex-row-reverse",top:"wu-flex-col-reverse wu-items-baseline"}}}),Rd=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:l=>({isTable:l.editor.isActive("table"),tableAttrs:l.editor.getAttributes("table")})}),[n,r]=p.useState(!1),s=p.useRef(null),o=p.useCallback(()=>{s.current=setTimeout(()=>{e.chain().focus().insertTable({rows:2,cols:4,withHeaderRow:n}).run()},100)},[e,n]),i=p.useCallback(()=>{r(l=>!l),s.current=setTimeout(()=>{e.chain().focus().toggleHeaderRow().run()},100)},[e]),u=[{text:"Column left",icon:"wm-add",event:()=>e.chain().focus().addColumnBefore().run()},{text:"Row above",icon:"wm-add",event:()=>e.chain().focus().addRowBefore().run()},{text:"Column right",icon:"wm-add",event:()=>e.chain().focus().addColumnAfter().run()},{text:"Row below",icon:"wm-add",event:()=>e.chain().focus().addRowAfter().run()},{text:"Delete Column",icon:"wm-delete",event:()=>e.chain().focus().deleteColumn().run()},{text:"Delete Row",icon:"wm-delete",event:()=>e.chain().focus().deleteRow().run()}];return t.isTable?a.jsx(Mn,{Trigger:a.jsx("button",{className:`${K.EditorAction} ${t.isTable&&K.EditorActionActive}`,children:a.jsx(R,{icon:"wm-table"})}),hideCloseButton:!0,maxWidth:"320px",children:a.jsxs(Dn,{children:[a.jsx(hr.DialogTitle,{className:"wu-hidden"}),a.jsx($r,{checked:n,onClick:i,Label:"Title Row",labelPosition:"left"}),a.jsx("div",{className:"wu-space-y-4 wu-mt-2",children:a.jsx("div",{className:"wu-grid wu-grid-cols-2 wu-gap-x-6 wu-gap-y-3",children:u.map(({text:l,icon:c,event:d})=>a.jsx(xe,{onClick:d,variant:"secondary",Icon:a.jsx(R,{icon:c}),className:"wu-text-xs wu-justify-start",children:l},l))})}),a.jsx("div",{className:"wu-flex wu-justify-end wu-gap-2 wu-mt-4",children:a.jsx(xt,{onClick:()=>e.chain().focus().deleteTable().run(),variant:"outline",color:"error",Icon:a.jsx("span",{className:"wm-delete"}),iconPosition:"left",className:"wu-text-xs",children:"Delete Table"})})]})}):a.jsx("button",{onClick:o,className:`${K.EditorAction} ${t.isTable&&K.EditorActionActive}`,children:a.jsx(R,{icon:"wm-table"})})},ew=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:u=>{var l,c;return{isImage:(l=u.editor)==null?void 0:l.isActive("image"),imageAttrs:(c=u.editor)==null?void 0:c.getAttributes("image")}}}),[n,r]=p.useState(t.imageAttrs.src||""),[s,o]=p.useState(t.imageAttrs.alt||""),i=()=>{e.chain().focus().setImage({src:n,alt:s}).run()};return a.jsx(Mn,{hideCloseButton:!0,Trigger:a.jsx("button",{className:`${K.EditorAction} ${t.isImage&&K.EditorActionActive}`,children:a.jsx(R,{icon:"wm-image"})}),maxWidth:"400px",children:a.jsxs(Dn,{children:[a.jsx(Zt,{className:"wu-hidden"}),a.jsx(Ie,{Label:"Image URL",type:"url",value:n,onChange:u=>r(u.target.value),required:!0}),a.jsx(Ie,{Label:"Alt Text",type:"text",value:s,onChange:u=>o(u.target.value)}),a.jsxs("div",{className:"wu-flex wu-justify-end wu-gap-2",children:[a.jsx(xt,{variant:"secondary",children:"Cancel"}),a.jsx(xt,{onClick:i,disabled:!n,children:"Save"})]})]})})},tw=()=>{const{editor:e}=he(),t=de.useEditorState({editor:e,selector:l=>{var c,d;return{isLink:(c=l.editor)==null?void 0:c.isActive("link"),linkAttrs:(d=l.editor)==null?void 0:d.getAttributes("link")}}}),[n,r]=p.useState(t.linkAttrs.href||""),[s,o]=p.useState(t.linkAttrs.alt||""),i=()=>{e.chain().focus().insertContent({type:"text",text:s||n,marks:[{type:"link",attrs:{href:n}}]}).run()},u=()=>{const{$from:l}=e.state.selection,c=l.parent.textContent,d=l.parentOffset;let w=d,h=d;for(;w>0&&!/\s/.test(c[w-1]);)w--;for(;h<c.length&&!/\s/.test(c[h]);)h++;const m=l.start(),b=m+w,g=m+h,x=c.slice(w,h);e.commands.setTextSelection({from:b,to:g}),r(t.linkAttrs.href||""),o(x||t.linkAttrs.alt||"")};return a.jsx(Mn,{Trigger:a.jsx("button",{className:`${K.EditorAction} ${t.isLink&&K.EditorActionActive}`,children:a.jsx(R,{icon:"wm-link"})}),maxWidth:"400px",onOpenChange:l=>l&&u(),children:a.jsxs(Dn,{children:[a.jsx(Zt,{className:"wu-hidden"}),a.jsx(Ie,{Label:"Link",type:"url",value:n,onChange:l=>r(l.target.value),required:!0}),a.jsx(Ie,{Label:"Text to display",type:"text",value:s,onChange:l=>o(l.target.value)}),a.jsxs("div",{className:"wu-flex wu-justify-end wu-gap-2",children:[t.isLink&&a.jsx(xt,{color:"error",onClick:()=>e.chain().focus().unsetLink().run(),variant:"secondary",children:"Remove"}),a.jsx(xt,{onClick:i,disabled:!n,children:"Save"})]})]})})},nw=["e","E","+","-"],rw="wu-border wu-rounded wu-w-10 wu-h-6 wu-text-center [appearance:textfield] [&::-webkit-outer-spin-button]:wu-appearance-none [&::-webkit-inner-spin-button]:wu-appearance-none focus:wu-border-blue-p",lo=1,sw=()=>{const{editor:e}=he(),[t,n]=p.useState(16),r=de.useEditorState({editor:e,selector:u=>({fontSize:u.editor.getAttributes("textStyle").fontSize})}),s=u=>{e.chain().focus().setFontSize(u+"px").run()},o=u=>{const l=Math.max(lo,u);n(l),s(l)},i=u=>{nw.includes(u.key)?u.preventDefault():u.key==="Enter"&&s(t)};return p.useEffect(()=>{var u;n(Number((u=r.fontSize)==null?void 0:u.replace("px",""))||16)},[r.fontSize]),a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-1",children:[a.jsx("button",{className:K.EditorAction,onClick:()=>o(t-1),disabled:t<=lo,children:"−"}),a.jsx("input",{type:"number",inputMode:"numeric",pattern:"[0-9]*",className:rw,value:t,onKeyDown:i,onChange:u=>n(u.target.valueAsNumber),onBlur:()=>s(t)}),a.jsx("button",{className:K.EditorAction,onClick:()=>o(t+1),disabled:t>=128,children:"+"})]})},aw=()=>{const{editor:e,customFonts:t}=he(),n=de.useEditorState({editor:e,selector:i=>({currentFontFamily:i.editor.getAttributes("textStyle").fontFamily||""})}),r=["Fira Sans","Inter","Poppins","JetBrains Mono","Montserrat",...t||[]],[s,o]=p.useState(n.currentFontFamily||r[0]);return p.useEffect(()=>{var i;o(((i=n.currentFontFamily)==null?void 0:i.replace(/"/g,""))||r[0])},[n.currentFontFamily]),a.jsxs(Lr,{children:[a.jsx(Or,{className:K.EditorAction+" wu-transition-colors "+(s!=="Fira Sans"&&K.EditorActionActive),style:{fontFamily:s},title:s||"Font Family",children:s==null?void 0:s[0]}),a.jsx(An,{align:"start",className:"wu-border-blue-p wu-rounded",onCloseAutoFocus:i=>i.preventDefault(),children:r.map(i=>a.jsx(Yt,{title:i,onSelect:()=>{e.chain().focus().setFontFamily(i).run(),o(i)},className:s===i?K.EditorActionActive:"",children:i},i))})]})},ow={block:a.jsx(Pd,{}),fontFamily:a.jsx(aw,{}),fontSize:a.jsx(sw,{}),bold:a.jsx(zd,{}),italic:a.jsx($d,{}),underline:a.jsx(Hd,{}),strike:a.jsx(Ud,{}),color:a.jsx(_d,{}),list:a.jsx(Fd,{}),alignment:a.jsx(Vd,{}),image:a.jsx(ew,{}),link:a.jsx(tw,{}),table:a.jsx(Rd,{}),blockquote:a.jsx(Wd,{}),superscript:a.jsx(Bd,{}),subscript:a.jsx(qd,{}),codeline:a.jsx(Ld,{}),clear:a.jsx(Od,{}),"|":a.jsx(Wr,{orientation:"vertical",className:"wu-h-5"})},iw=["block","fontFamily","|","fontSize","|","bold","italic","underline","strike","|","color","|","list","alignment","|","image","link","|","blockquote","superscript","subscript","codeline","|","clear"],uw=e=>{const{editor:t,customFonts:n,children:r,items:s=iw,...o}=e;return a.jsx("div",{...o,children:a.jsx(Dd,{editor:t,customFonts:n,children:a.jsxs("div",{className:"wu-flex wu-gap-1 wu-p-2 wu-items-center wu-justify-start wu-border-gray-40",children:[s.map((i,u)=>a.jsx(a.Fragment,{children:ow[i]},i+u)),r]})})})},lw=e=>{const{defaultValue:t,onUpdate:n,className:r,readonly:s,toolbarPosition:o="top",classNames:i={},customToolbarChildren:u,toolbarItems:l,hideToolbar:c,...d}=e,w=de.useEditor({editable:!s,extensions:Md,content:t,onUpdate:({editor:h})=>{n&&n(h.getHTML())}});return a.jsxs("div",{className:f(K.WuContentEditor,r,o==="top"?"wu-flex-col":"wu-flex-col-reverse"),onClick:()=>w==null?void 0:w.chain().focus().run(),...d,children:[!c&&a.jsx(uw,{editor:w,customFonts:e.customFonts,className:f("wu-sticky wu-z-10 wu-bg-white",i.toolbar,o==="top"?"wu-top-0 wu-border-b":"wu-bottom-0 wu-border-t"),items:l,children:u}),a.jsx(de.EditorContent,{editor:w,className:f("wu-p-4 wu-flex-grow",i.editor)})]})},cw=e=>{const{textToCopy:t,notificationText:n,...r}=e,[s,o]=p.useState(!1),i=async()=>{if(t)try{await navigator.clipboard.writeText(t),o(!0),setTimeout(()=>o(!1),2e3)}catch(u){console.error("Failed to copy:",u)}};return a.jsxs(xe,{...r,onClick:i,variant:"iconOnly",className:f("wu-relative",e.className),"aria-label":"Copy to clipboard",children:[n&&a.jsx("span",{className:f("wu-absolute wu-text-[6px] wu-leading-3 -wu-top-4 wu-right-0 wu-bg-gray-notification wu-text-white wu-rounded-sm wu-shadow-md wu-px-1 wu-animate-ping-once",s?"wu-block":"wu-hidden"),children:n}),a.jsx(R,{icon:"wm-content-copy",className:"wu-text-lg"})]})},co=Q.Root,dw=Q.Trigger,ww=Q.Close,fw=Q.Portal,wo=v.forwardRef(({className:e,...t},n)=>a.jsx(Q.Overlay,{className:f("wu-fixed wu-inset-0 wu-z-50 wu-bg-black/30 data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0","wu-drawer-overlay",e),...t,ref:n}));wo.displayName=Q.Overlay.displayName;const pw=ke.cva("wu-fixed wu-z-50 wu-gap-4 wu-p-6 wu-shadow-lg wu-transition wu-ease-in-out data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-duration-500 data-[state=open]:wu-duration-500",{variants:{side:{top:"wu-inset-x-0 wu-top-0 wu-border-b data-[state=closed]:wu-slide-out-to-top data-[state=open]:wu-slide-in-from-top",bottom:"wu-inset-x-0 wu-bottom-0 wu-border-t data-[state=closed]:wu-slide-out-to-bottom data-[state=open]:wu-slide-in-from-bottom",left:"wu-inset-y-0 wu-left-0 wu-h-full wu-w-3/4 wu-border-r data-[state=closed]:wu-slide-out-to-left data-[state=open]:wu-slide-in-from-left sm:wu-max-w-sm",right:"wu-inset-y-0 wu-right-0 wu-h-full wu-w-3/4 wu-border-l data-[state=closed]:wu-slide-out-to-right data-[state=open]:wu-slide-in-from-right sm:wu-max-w-sm"}},defaultVariants:{side:"right"}}),Hr=v.forwardRef(({side:e="right",className:t,children:n,hideCloseButton:r,overlayClassName:s,closeButtonClassName:o,...i},u)=>a.jsxs(fw,{children:[a.jsx(wo,{className:s}),a.jsxs(Q.Content,{ref:u,className:f(pw({side:e}),t),...i,children:[n,!r&&a.jsx(Q.Close,{"aria-label":"close",asChild:!0,children:a.jsxs(gt,{variant:"iconOnly",className:f("wu-absolute wu-right-4 wu-top-4",o),children:[a.jsx("span",{className:"wm-close"}),a.jsx("span",{className:"wu-sr-only",children:"Close"})]})})]})]}));Hr.displayName=Q.Content.displayName;const fo=v.forwardRef(({className:e,...t},n)=>a.jsx(Q.Title,{ref:n,className:f("wu-text-lg wu-font-semibold",e),...t}));fo.displayName=Q.Title.displayName;const hw=v.forwardRef(({className:e,...t},n)=>a.jsx(Q.Description,{ref:n,className:f("wu-text-sm",e),...t}));hw.displayName=Q.Description.displayName;const mw=e=>t=>{e&&t.preventDefault()},gw=e=>{const{Trigger:t,children:n,hideCloseButton:r,className:s,side:o="left",open:i,onOpenChange:u,preventClickOutside:l,overlayClassName:c,closeButtonClassName:d,...w}=e;return a.jsxs(co,{open:i,onOpenChange:u,children:[a.jsx(dw,{asChild:!0,children:t}),a.jsxs(Hr,{onInteractOutside:mw(l),side:o,className:f("wu-bg-white wu-text-gray-lead wu-px-0",s),hideCloseButton:r,overlayClassName:c,closeButtonClassName:d,...w,children:[a.jsx("div",{className:"wu-hidden",children:a.jsx(fo,{})}),n]})]})},bw=({children:e,...t})=>a.jsx(ww,{...t,children:e}),po=p.createContext({});function Ur(e){const t=p.useRef(null);return t.current===null&&(t.current=e()),t.current}const jr=typeof window<"u",ho=jr?p.useLayoutEffect:p.useEffect,Pn=p.createContext(null);function yw(e,t){e.indexOf(t)===-1&&e.push(t)}function xw(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const nt=(e,t,n)=>n>t?t:n<e?e:n;function Gr(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Jt=()=>{},rt=()=>{};process.env.NODE_ENV!=="production"&&(Jt=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Gr(t,n))},rt=(e,t,n)=>{if(!e)throw new Error(Gr(t,n))});const Ge={},mo=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function vw(e){return typeof e=="object"&&e!==null}const go=e=>/^0[^.\s]+$/u.test(e);function Kr(e){let t;return()=>(t===void 0&&(t=e()),t)}const vt=e=>e,Nw=(e,t)=>n=>t(e(n)),_n=(...e)=>e.reduce(Nw),bo=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class yo{constructor(){this.subscriptions=[]}add(t){return yw(this.subscriptions,t),()=>xw(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let o=0;o<s;o++){const i=this.subscriptions[o];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const $e=e=>e*1e3,Pe=e=>e/1e3;function xo(e,t){return t?e*(1e3/t):0}const vo=new Set;function No(e,t,n){e||vo.has(t)||(console.warn(Gr(t,n)),vo.add(t))}const Co=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Cw=1e-7,Sw=12;function Tw(e,t,n,r,s){let o,i,u=0;do i=t+(n-t)/2,o=Co(i,r,s)-e,o>0?n=i:t=i;while(Math.abs(o)>Cw&&++u<Sw);return i}function Qt(e,t,n,r){if(e===t&&n===r)return vt;const s=o=>Tw(o,0,1,e,n);return o=>o===0||o===1?o:Co(s(o),t,r)}const So=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,To=e=>t=>1-e(1-t),Eo=Qt(.33,1.53,.69,.99),Yr=To(Eo),Ao=So(Yr),ko=e=>(e*=2)<1?.5*Yr(e):.5*(2-Math.pow(2,-10*(e-1))),Xr=e=>1-Math.sin(Math.acos(e)),Ew=To(Xr),Io=So(Xr),Aw=Qt(.42,0,1,1),kw=Qt(0,0,.58,1),Mo=Qt(.42,0,.58,1),Iw=e=>Array.isArray(e)&&typeof e[0]!="number",Do=e=>Array.isArray(e)&&typeof e[0]=="number",Po={linear:vt,easeIn:Aw,easeInOut:Mo,easeOut:kw,circIn:Xr,circInOut:Io,circOut:Ew,backIn:Yr,backInOut:Ao,backOut:Eo,anticipate:ko},Mw=e=>typeof e=="string",_o=e=>{if(Do(e)){rt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,s]=e;return Qt(t,n,r,s)}else if(Mw(e))return rt(Po[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Po[e];return e},Fn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Dw(e,t){let n=new Set,r=new Set,s=!1,o=!1;const i=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function l(d){i.has(d)&&(c.schedule(d),e()),d(u)}const c={schedule:(d,w=!1,h=!1)=>{const b=h&&s?n:r;return w&&i.add(d),b.has(d)||b.add(d),d},cancel:d=>{r.delete(d),i.delete(d)},process:d=>{if(u=d,s){o=!0;return}s=!0,[n,r]=[r,n],n.forEach(l),n.clear(),s=!1,o&&(o=!1,c.process(d))}};return c}const Pw=40;function Fo(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=Fn.reduce((N,S)=>(N[S]=Dw(o),N),{}),{setup:u,read:l,resolveKeyframes:c,preUpdate:d,update:w,preRender:h,render:m,postRender:b}=i,g=()=>{const N=Ge.useManualTiming?s.timestamp:performance.now();n=!1,Ge.useManualTiming||(s.delta=r?1e3/60:Math.max(Math.min(N-s.timestamp,Pw),1)),s.timestamp=N,s.isProcessing=!0,u.process(s),l.process(s),c.process(s),d.process(s),w.process(s),h.process(s),m.process(s),b.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(g))},x=()=>{n=!0,r=!0,s.isProcessing||e(g)};return{schedule:Fn.reduce((N,S)=>{const E=i[S];return N[S]=(I,A=!1,k=!1)=>(n||x(),E.schedule(I,A,k)),N},{}),cancel:N=>{for(let S=0;S<Fn.length;S++)i[Fn[S]].cancel(N)},state:s,steps:i}}const{schedule:_e,cancel:Zr,state:Vn}=Fo(typeof requestAnimationFrame<"u"?requestAnimationFrame:vt,!0);let Ln;function _w(){Ln=void 0}const Ae={now:()=>(Ln===void 0&&Ae.set(Vn.isProcessing||Ge.useManualTiming?Vn.timestamp:performance.now()),Ln),set:e=>{Ln=e,queueMicrotask(_w)}},Vo=e=>t=>typeof t=="string"&&t.startsWith(e),Lo=Vo("--"),Fw=Vo("var(--"),Jr=e=>Fw(e)?Vw.test(e.split("/*")[0].trim()):!1,Vw=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Nt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Rt={...Nt,transform:e=>nt(0,1,e)},On={...Nt,default:1},en=e=>Math.round(e*1e5)/1e5,Qr=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Lw(e){return e==null}const Ow=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Rr=(e,t)=>n=>!!(typeof n=="string"&&Ow.test(n)&&n.startsWith(e)||t&&!Lw(n)&&Object.prototype.hasOwnProperty.call(n,t)),Oo=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,o,i,u]=r.match(Qr);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(i),alpha:u!==void 0?parseFloat(u):1}},Ww=e=>nt(0,255,e),es={...Nt,transform:e=>Math.round(Ww(e))},st={test:Rr("rgb","red"),parse:Oo("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+es.transform(e)+", "+es.transform(t)+", "+es.transform(n)+", "+en(Rt.transform(r))+")"};function Bw(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const ts={test:Rr("#"),parse:Bw,transform:st.transform},tn=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Xe=tn("deg"),Ct=tn("%"),L=tn("px"),qw=tn("vh"),zw=tn("vw"),Wo={...Ct,parse:e=>Ct.parse(e)/100,transform:e=>Ct.transform(e*100)},St={test:Rr("hsl","hue"),parse:Oo("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Ct.transform(en(t))+", "+Ct.transform(en(n))+", "+en(Rt.transform(r))+")"},ce={test:e=>st.test(e)||ts.test(e)||St.test(e),parse:e=>st.test(e)?st.parse(e):St.test(e)?St.parse(e):ts.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?st.transform(e):St.transform(e),getAnimatableNone:e=>{const t=ce.parse(e);return t.alpha=0,ce.transform(t)}},$w=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Hw(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Qr))==null?void 0:t.length)||0)+(((n=e.match($w))==null?void 0:n.length)||0)>0}const Bo="number",qo="color",Uw="var",jw="var(",zo="${}",Gw=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function nn(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const u=t.replace(Gw,l=>(ce.test(l)?(r.color.push(o),s.push(qo),n.push(ce.parse(l))):l.startsWith(jw)?(r.var.push(o),s.push(Uw),n.push(l)):(r.number.push(o),s.push(Bo),n.push(parseFloat(l))),++o,zo)).split(zo);return{values:n,split:u,indexes:r,types:s}}function $o(e){return nn(e).values}function Ho(e){const{split:t,types:n}=nn(e),r=t.length;return s=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],s[i]!==void 0){const u=n[i];u===Bo?o+=en(s[i]):u===qo?o+=ce.transform(s[i]):o+=s[i]}return o}}const Kw=e=>typeof e=="number"?0:ce.test(e)?ce.getAnimatableNone(e):e;function Yw(e){const t=$o(e);return Ho(e)(t.map(Kw))}const Ze={test:Hw,parse:$o,createTransformer:Ho,getAnimatableNone:Yw};function ns(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Xw({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,o=0,i=0;if(!t)s=o=i=n;else{const u=n<.5?n*(1+t):n+t-n*t,l=2*n-u;s=ns(l,u,e+1/3),o=ns(l,u,e),i=ns(l,u,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:r}}function Wn(e,t){return n=>n>0?t:e}const rn=(e,t,n)=>e+(t-e)*n,rs=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},Zw=[ts,st,St],Jw=e=>Zw.find(t=>t.test(e));function Uo(e){const t=Jw(e);if(Jt(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===St&&(n=Xw(n)),n}const jo=(e,t)=>{const n=Uo(e),r=Uo(t);if(!n||!r)return Wn(e,t);const s={...n};return o=>(s.red=rs(n.red,r.red,o),s.green=rs(n.green,r.green,o),s.blue=rs(n.blue,r.blue,o),s.alpha=rn(n.alpha,r.alpha,o),st.transform(s))},ss=new Set(["none","hidden"]);function Qw(e,t){return ss.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Rw(e,t){return n=>rn(e,t,n)}function as(e){return typeof e=="number"?Rw:typeof e=="string"?Jr(e)?Wn:ce.test(e)?jo:nf:Array.isArray(e)?Go:typeof e=="object"?ce.test(e)?jo:ef:Wn}function Go(e,t){const n=[...e],r=n.length,s=e.map((o,i)=>as(o)(o,t[i]));return o=>{for(let i=0;i<r;i++)n[i]=s[i](o);return n}}function ef(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=as(e[s])(e[s],t[s]));return s=>{for(const o in r)n[o]=r[o](s);return n}}function tf(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],i=e.indexes[o][r[o]],u=e.values[i]??0;n[s]=u,r[o]++}return n}const nf=(e,t)=>{const n=Ze.createTransformer(t),r=nn(e),s=nn(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?ss.has(e)&&!s.values.length||ss.has(t)&&!r.values.length?Qw(e,t):_n(Go(tf(r,s),s.values),n):(Jt(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Wn(e,t))};function Ko(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?rn(e,t,n):as(e)(e,t)}const rf=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>_e.update(t,n),stop:()=>Zr(t),now:()=>Vn.isProcessing?Vn.timestamp:Ae.now()}},Yo=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)r+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Bn=2e4;function os(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Bn;)t+=n,r=e.next(t);return t>=Bn?1/0:t}function sf(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(os(r),Bn);return{type:"keyframes",ease:o=>r.next(s*o).value/t,duration:Pe(s)}}const af=5;function Xo(e,t,n){const r=Math.max(t-af,0);return xo(n-e(r),t-r)}const ie={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},is=.001;function of({duration:e=ie.duration,bounce:t=ie.bounce,velocity:n=ie.velocity,mass:r=ie.mass}){let s,o;Jt(e<=$e(ie.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=nt(ie.minDamping,ie.maxDamping,i),e=nt(ie.minDuration,ie.maxDuration,Pe(e)),i<1?(s=c=>{const d=c*i,w=d*e,h=d-n,m=us(c,i),b=Math.exp(-w);return is-h/m*b},o=c=>{const w=c*i*e,h=w*n+n,m=Math.pow(i,2)*Math.pow(c,2)*e,b=Math.exp(-w),g=us(Math.pow(c,2),i);return(-s(c)+is>0?-1:1)*((h-m)*b)/g}):(s=c=>{const d=Math.exp(-c*e),w=(c-n)*e+1;return-is+d*w},o=c=>{const d=Math.exp(-c*e),w=(n-c)*(e*e);return d*w});const u=5/e,l=lf(s,o,u);if(e=$e(e),isNaN(l))return{stiffness:ie.stiffness,damping:ie.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const uf=12;function lf(e,t,n){let r=n;for(let s=1;s<uf;s++)r=r-e(r)/t(r);return r}function us(e,t){return e*Math.sqrt(1-t*t)}const cf=["duration","bounce"],df=["stiffness","damping","mass"];function Zo(e,t){return t.some(n=>e[n]!==void 0)}function wf(e){let t={velocity:ie.velocity,stiffness:ie.stiffness,damping:ie.damping,mass:ie.mass,isResolvedFromDuration:!1,...e};if(!Zo(e,df)&&Zo(e,cf))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,o=2*nt(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:ie.mass,stiffness:s,damping:o}}else{const n=of(e);t={...t,...n,mass:ie.mass},t.isResolvedFromDuration=!0}return t}function qn(e=ie.visualDuration,t=ie.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const o=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],u={done:!1,value:o},{stiffness:l,damping:c,mass:d,duration:w,velocity:h,isResolvedFromDuration:m}=wf({...n,velocity:-Pe(n.velocity||0)}),b=h||0,g=c/(2*Math.sqrt(l*d)),x=i-o,C=Pe(Math.sqrt(l/d)),y=Math.abs(x)<5;r||(r=y?ie.restSpeed.granular:ie.restSpeed.default),s||(s=y?ie.restDelta.granular:ie.restDelta.default);let N;if(g<1){const E=us(C,g);N=I=>{const A=Math.exp(-g*C*I);return i-A*((b+g*C*x)/E*Math.sin(E*I)+x*Math.cos(E*I))}}else if(g===1)N=E=>i-Math.exp(-C*E)*(x+(b+C*x)*E);else{const E=C*Math.sqrt(g*g-1);N=I=>{const A=Math.exp(-g*C*I),k=Math.min(E*I,300);return i-A*((b+g*C*x)*Math.sinh(k)+E*x*Math.cosh(k))/E}}const S={calculatedDuration:m&&w||null,next:E=>{const I=N(E);if(m)u.done=E>=w;else{let A=E===0?b:0;g<1&&(A=E===0?$e(b):Xo(N,E,I));const k=Math.abs(A)<=r,D=Math.abs(i-I)<=s;u.done=k&&D}return u.value=u.done?i:I,u},toString:()=>{const E=Math.min(os(S),Bn),I=Yo(A=>S.next(E*A).value,E,30);return E+"ms "+I},toTransition:()=>{}};return S}qn.applyToOptions=e=>{const t=sf(e,100,qn);return e.ease=t.ease,e.duration=$e(t.duration),e.type="keyframes",e};function ls({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:i,min:u,max:l,restDelta:c=.5,restSpeed:d}){const w=e[0],h={done:!1,value:w},m=k=>u!==void 0&&k<u||l!==void 0&&k>l,b=k=>u===void 0?l:l===void 0||Math.abs(u-k)<Math.abs(l-k)?u:l;let g=n*t;const x=w+g,C=i===void 0?x:i(x);C!==x&&(g=C-w);const y=k=>-g*Math.exp(-k/r),N=k=>C+y(k),S=k=>{const D=y(k),_=N(k);h.done=Math.abs(D)<=c,h.value=h.done?C:_};let E,I;const A=k=>{m(h.value)&&(E=k,I=qn({keyframes:[h.value,b(h.value)],velocity:Xo(N,k,h.value),damping:s,stiffness:o,restDelta:c,restSpeed:d}))};return A(0),{calculatedDuration:null,next:k=>{let D=!1;return!I&&E===void 0&&(D=!0,S(k),A(k)),E!==void 0&&k>=E?I.next(k-E):(!D&&S(k),h)}}}function ff(e,t,n){const r=[],s=n||Ge.mix||Ko,o=e.length-1;for(let i=0;i<o;i++){let u=s(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||vt:t;u=_n(l,u)}r.push(u)}return r}function pf(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const o=e.length;if(rt(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const u=ff(t,r,s),l=u.length,c=d=>{if(i&&d<e[0])return t[0];let w=0;if(l>1)for(;w<e.length-2&&!(d<e[w+1]);w++);const h=bo(e[w],e[w+1],d);return u[w](h)};return n?d=>c(nt(e[0],e[o-1],d)):c}function hf(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=bo(0,t,r);e.push(rn(n,1,s))}}function mf(e){const t=[0];return hf(t,e.length-1),t}function gf(e,t){return e.map(n=>n*t)}function bf(e,t){return e.map(()=>t||Mo).splice(0,e.length-1)}function Tt({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=Iw(r)?r.map(_o):_o(r),o={done:!1,value:t[0]},i=gf(n&&n.length===t.length?n:mf(t),e),u=pf(i,t,{ease:Array.isArray(s)?s:bf(t,s)});return{calculatedDuration:e,next:l=>(o.value=u(l),o.done=l>=e,o)}}const yf=e=>e!==null;function cs(e,{repeat:t,repeatType:n="loop"},r,s=1){const o=e.filter(yf),u=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!u||r===void 0?o[u]:r}const xf={decay:ls,inertia:ls,tween:Tt,keyframes:Tt,spring:qn};function Jo(e){typeof e.type=="string"&&(e.type=xf[e.type])}class ds{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const vf=e=>e/100;class ws extends ds{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==Ae.now()&&this.tick(Ae.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Jo(t);const{type:n=Tt,repeat:r=0,repeatDelay:s=0,repeatType:o,velocity:i=0}=t;let{keyframes:u}=t;const l=n||Tt;process.env.NODE_ENV!=="production"&&l!==Tt&&rt(u.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${u}`,"spring-two-frames"),l!==Tt&&typeof u[0]!="number"&&(this.mixKeyframes=_n(vf,Ko(u[0],u[1])),u=[0,100]);const c=l({...t,keyframes:u});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...u].reverse(),velocity:-i})),c.calculatedDuration===null&&(c.calculatedDuration=os(c));const{calculatedDuration:d}=c;this.calculatedDuration=d,this.resolvedDuration=d+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:o,mirroredGenerator:i,resolvedDuration:u,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:d,repeat:w,repeatType:h,repeatDelay:m,type:b,onUpdate:g,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const C=this.currentTime-c*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?C<0:C>s;this.currentTime=Math.max(C,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let N=this.currentTime,S=r;if(w){const k=Math.min(this.currentTime,s)/u;let D=Math.floor(k),_=k%1;!_&&k>=1&&(_=1),_===1&&D--,D=Math.min(D,w+1),!!(D%2)&&(h==="reverse"?(_=1-_,m&&(_-=m/u)):h==="mirror"&&(S=i)),N=nt(0,1,_)*u}const E=y?{done:!1,value:d[0]}:S.next(N);o&&(E.value=o(E.value));let{done:I}=E;!y&&l!==null&&(I=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return A&&b!==ls&&(E.value=cs(d,this.options,x,this.speed)),g&&g(E.value),A&&this.finish(),E}then(t,n){return this.finished.then(t,n)}get duration(){return Pe(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Pe(t)}get time(){return Pe(this.currentTime)}set time(t){var n;t=$e(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ae.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Pe(this.currentTime))}play(){var s,o;if(this.isStopped)return;const{driver:t=rf,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),(o=(s=this.options).onPlay)==null||o.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ae.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function Nf(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const at=e=>e*180/Math.PI,fs=e=>{const t=at(Math.atan2(e[1],e[0]));return ps(t)},Cf={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:fs,rotateZ:fs,skewX:e=>at(Math.atan(e[1])),skewY:e=>at(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ps=e=>(e=e%360,e<0&&(e+=360),e),Qo=fs,Ro=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ei=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Sf={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ro,scaleY:ei,scale:e=>(Ro(e)+ei(e))/2,rotateX:e=>ps(at(Math.atan2(e[6],e[5]))),rotateY:e=>ps(at(Math.atan2(-e[2],e[0]))),rotateZ:Qo,rotate:Qo,skewX:e=>at(Math.atan(e[4])),skewY:e=>at(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function hs(e){return e.includes("scale")?1:0}function ms(e,t){if(!e||e==="none")return hs(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=Sf,s=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Cf,s=u}if(!s)return hs(t);const o=r[t],i=s[1].split(",").map(Ef);return typeof o=="function"?o(i):i[o]}const Tf=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ms(n,t)};function Ef(e){return parseFloat(e.trim())}const Et=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],At=new Set(Et),ti=e=>e===Nt||e===L,Af=new Set(["x","y","z"]),kf=Et.filter(e=>!Af.has(e));function If(e){const t=[];return kf.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ot={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ms(t,"x"),y:(e,{transform:t})=>ms(t,"y")};ot.translateX=ot.x,ot.translateY=ot.y;const it=new Set;let gs=!1,bs=!1,ys=!1;function ni(){if(bs){const e=Array.from(it).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=If(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([o,i])=>{var u;(u=r.getValue(o))==null||u.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}bs=!1,gs=!1,it.forEach(e=>e.complete(ys)),it.clear()}function ri(){it.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(bs=!0)})}function Mf(){ys=!0,ri(),ni(),ys=!1}class xs{constructor(t,n,r,s,o,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=o,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(it.add(this),gs||(gs=!0,_e.read(ri),_e.resolveKeyframes(ni))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const o=s==null?void 0:s.get(),i=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const u=r.readValue(n,i);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=i),s&&o===void 0&&s.set(t[0])}Nf(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),it.delete(this)}cancel(){this.state==="scheduled"&&(it.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Df=e=>e.startsWith("--");function Pf(e,t,n){Df(t)?e.style.setProperty(t,n):e.style[t]=n}const _f=Kr(()=>window.ScrollTimeline!==void 0),Ff={};function Vf(e,t){const n=Kr(e);return()=>Ff[t]??n()}const si=Vf(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),sn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ai={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:sn([0,.65,.55,1]),circOut:sn([.55,0,1,.45]),backIn:sn([.31,.01,.66,-.59]),backOut:sn([.33,1.53,.69,.99])};function oi(e,t){if(e)return typeof e=="function"?si()?Yo(e,t):"ease-out":Do(e)?sn(e):Array.isArray(e)?e.map(n=>oi(n,t)||ai.easeOut):ai[e]}function Lf(e,t,n,{delay:r=0,duration:s=300,repeat:o=0,repeatType:i="loop",ease:u="easeOut",times:l}={},c=void 0){const d={[t]:n};l&&(d.offset=l);const w=oi(u,s);Array.isArray(w)&&(d.easing=w);const h={delay:r,duration:s,easing:Array.isArray(w)?"linear":w,fill:"both",iterations:o+1,direction:i==="reverse"?"alternate":"normal"};return c&&(h.pseudoElement=c),e.animate(d,h)}function ii(e){return typeof e=="function"&&"applyToOptions"in e}function Of({type:e,...t}){return ii(e)&&si()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Wf extends ds{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:o,allowFlatten:i=!1,finalKeyframe:u,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=i,this.options=t,rt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=Of(t);this.animation=Lf(n,r,s,c,o),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const d=cs(s,this.options,u,this.speed);this.updateMotionValue?this.updateMotionValue(d):Pf(n,r,d),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Pe(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Pe(t)}get time(){return Pe(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=$e(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&_f()?(this.animation.timeline=t,vt):n(this)}}const ui={anticipate:ko,backInOut:Ao,circInOut:Io};function Bf(e){return e in ui}function qf(e){typeof e.ease=="string"&&Bf(e.ease)&&(e.ease=ui[e.ease])}const li=10;class zf extends Wf{constructor(t){qf(t),Jo(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:o,...i}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const u=new ws({...i,autoplay:!1}),l=$e(this.finishedTime??this.time);n.setWithVelocity(u.sample(l-li).value,u.sample(l).value,li),u.stop()}}const ci=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ze.test(e)||e==="0")&&!e.startsWith("url("));function $f(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Hf(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],i=ci(s,t),u=ci(o,t);return Jt(i===u,`You are trying to animate ${t} from "${s}" to "${o}". "${i?o:s}" is not an animatable value.`,"value-not-animatable"),!i||!u?!1:$f(e)||(n==="spring"||ii(n))&&r}function vs(e){e.duration=0,e.type="keyframes"}const Uf=new Set(["opacity","clipPath","filter","transform"]),jf=Kr(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Gf(e){var d;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:o,type:i}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return jf()&&n&&Uf.has(n)&&(n!=="transform"||!c)&&!l&&!r&&s!=="mirror"&&o!==0&&i!=="inertia"}const Kf=40;class Yf extends ds{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:i="loop",keyframes:u,name:l,motionValue:c,element:d,...w}){var b;super(),this.stop=()=>{var g,x;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=Ae.now();const h={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:o,repeatType:i,name:l,motionValue:c,element:d,...w},m=(d==null?void 0:d.KeyframeResolver)||xs;this.keyframeResolver=new m(u,(g,x,C)=>this.onKeyframesResolved(g,x,h,!C),l,c,d),(b=this.keyframeResolver)==null||b.scheduleResolve()}onKeyframesResolved(t,n,r,s){this.keyframeResolver=void 0;const{name:o,type:i,velocity:u,delay:l,isHandoff:c,onUpdate:d}=r;this.resolvedAt=Ae.now(),Hf(t,o,i,u)||((Ge.instantAnimations||!l)&&(d==null||d(cs(t,r,n))),t[0]=t[t.length-1],vs(r),r.repeat=0);const h={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Kf?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},m=!c&&Gf(h)?new zf({...h,element:h.motionValue.owner.current}):new ws(h);m.finished.then(()=>this.notifyFinished()).catch(vt),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Mf()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const Xf=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Zf(e){const t=Xf.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const Jf=4;function di(e,t,n=1){rt(n<=Jf,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=Zf(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const i=o.trim();return mo(i)?parseFloat(i):i}return Jr(s)?di(s,t,n+1):s}function wi(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const fi=new Set(["width","height","top","left","right","bottom",...Et]),Qf={test:e=>e==="auto",parse:e=>e},pi=e=>t=>t.test(e),hi=[Nt,L,Ct,Xe,zw,qw,Qf],mi=e=>hi.find(pi(e));function Rf(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||go(e):!0}const ep=new Set(["brightness","contrast","saturate","opacity"]);function tp(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Qr)||[];if(!r)return e;const s=n.replace(r,"");let o=ep.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+s+")"}const np=/\b([a-z-]*)\(.*?\)/gu,Ns={...Ze,getAnimatableNone:e=>{const t=e.match(np);return t?t.map(tp).join(" "):e}},gi={...Nt,transform:Math.round},Cs={borderWidth:L,borderTopWidth:L,borderRightWidth:L,borderBottomWidth:L,borderLeftWidth:L,borderRadius:L,radius:L,borderTopLeftRadius:L,borderTopRightRadius:L,borderBottomRightRadius:L,borderBottomLeftRadius:L,width:L,maxWidth:L,height:L,maxHeight:L,top:L,right:L,bottom:L,left:L,padding:L,paddingTop:L,paddingRight:L,paddingBottom:L,paddingLeft:L,margin:L,marginTop:L,marginRight:L,marginBottom:L,marginLeft:L,backgroundPositionX:L,backgroundPositionY:L,...{rotate:Xe,rotateX:Xe,rotateY:Xe,rotateZ:Xe,scale:On,scaleX:On,scaleY:On,scaleZ:On,skew:Xe,skewX:Xe,skewY:Xe,distance:L,translateX:L,translateY:L,translateZ:L,x:L,y:L,z:L,perspective:L,transformPerspective:L,opacity:Rt,originX:Wo,originY:Wo,originZ:L},zIndex:gi,fillOpacity:Rt,strokeOpacity:Rt,numOctaves:gi},rp={...Cs,color:ce,backgroundColor:ce,outlineColor:ce,fill:ce,stroke:ce,borderColor:ce,borderTopColor:ce,borderRightColor:ce,borderBottomColor:ce,borderLeftColor:ce,filter:Ns,WebkitFilter:Ns},bi=e=>rp[e];function yi(e,t){let n=bi(e);return n!==Ns&&(n=Ze),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const sp=new Set(["auto","none","0"]);function ap(e,t,n){let r=0,s;for(;r<e.length&&!s;){const o=e[r];typeof o=="string"&&!sp.has(o)&&nn(o).values.length&&(s=e[r]),r++}if(s&&n)for(const o of t)e[o]=yi(n,s)}class op extends xs{constructor(t,n,r,s,o){super(t,n,r,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Jr(c))){const d=di(c,n.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!fi.has(r)||t.length!==2)return;const[s,o]=t,i=mi(s),u=mi(o);if(i!==u)if(ti(i)&&ti(u))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else ot[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||Rf(t[s]))&&r.push(s);r.length&&ap(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ot[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var u;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=r.length-1,i=r[o];r[o]=ot[n](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),(u=this.removedTransforms)!=null&&u.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function ip(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const s=(n==null?void 0:n[e])??r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}const xi=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function vi(e){return vw(e)&&"offsetHeight"in e}const Ni=30,up=e=>!isNaN(parseFloat(e));class lp{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const s=Ae.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ae.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=up(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&No(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new yo);const r=this.events[t].add(n);return t==="change"?()=>{r(),_e.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ae.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Ni)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Ni);return xo(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function zn(e,t){return new lp(e,t)}const{schedule:cp}=Fo(queueMicrotask,!1),dp={y:!1};function wp(){return dp.y}function Ci(e,t){const n=ip(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function Si(e){return!(e.pointerType==="touch"||wp())}function fp(e,t,n={}){const[r,s,o]=Ci(e,n),i=u=>{if(!Si(u))return;const{target:l}=u,c=t(l,u);if(typeof c!="function"||!l)return;const d=w=>{Si(w)&&(c(w),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,s)};return r.forEach(u=>{u.addEventListener("pointerenter",i,s)}),o}const Ti=(e,t)=>t?e===t?!0:Ti(e,t.parentElement):!1,pp=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,hp=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function mp(e){return hp.has(e.tagName)||e.tabIndex!==-1}const $n=new WeakSet;function Ei(e){return t=>{t.key==="Enter"&&e(t)}}function Ss(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const gp=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Ei(()=>{if($n.has(n))return;Ss(n,"down");const s=Ei(()=>{Ss(n,"up")}),o=()=>Ss(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Ai(e){return pp(e)&&!0}function bp(e,t,n={}){const[r,s,o]=Ci(e,n),i=u=>{const l=u.currentTarget;if(!Ai(u))return;$n.add(l);const c=t(l,u),d=(m,b)=>{window.removeEventListener("pointerup",w),window.removeEventListener("pointercancel",h),$n.has(l)&&$n.delete(l),Ai(m)&&typeof c=="function"&&c(m,{success:b})},w=m=>{d(m,l===window||l===document||n.useGlobalTarget||Ti(l,m.target))},h=m=>{d(m,!1)};window.addEventListener("pointerup",w,s),window.addEventListener("pointercancel",h,s)};return r.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",i,s),vi(u)&&(u.addEventListener("focus",c=>gp(c,s)),!mp(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),o}const ge=e=>!!(e&&e.getVelocity),yp=[...hi,ce,Ze],xp=e=>yp.find(pi(e)),Ts=p.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function ki(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function vp(...e){return t=>{let n=!1;const r=e.map(s=>{const o=ki(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():ki(e[s],null)}}}}function Np(...e){return v.useCallback(vp(...e),e)}class Cp extends v.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,s=vi(r)&&r.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=s-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Sp({children:e,isPresent:t,anchorX:n,root:r}){const s=p.useId(),o=p.useRef(null),i=p.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:u}=p.useContext(Ts),l=Np(o,e==null?void 0:e.ref);return p.useInsertionEffect(()=>{const{width:c,height:d,top:w,left:h,right:m}=i.current;if(t||!o.current||!c||!d)return;const b=n==="left"?`left: ${h}`:`right: ${m}`;o.current.dataset.motionPopId=s;const g=document.createElement("style");u&&(g.nonce=u);const x=r??document.head;return x.appendChild(g),g.sheet&&g.sheet.insertRule(`
|
|
8
8
|
[data-motion-pop-id="${s}"] {
|
|
9
9
|
position: absolute !important;
|
|
10
10
|
width: ${c}px !important;
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
${b}px !important;
|
|
13
13
|
top: ${w}px !important;
|
|
14
14
|
}
|
|
15
|
-
`),()=>{x.contains(g)&&x.removeChild(g)}},[t]),a.jsx(Np,{isPresent:t,childRef:o,sizeRef:i,children:v.cloneElement(e,{ref:l})})}const Sp=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:o,mode:i,anchorX:u,root:l})=>{const c=Hr(Tp),d=p.useId();let w=!0,h=p.useMemo(()=>(w=!1,{id:d,initial:t,isPresent:n,custom:s,onExitComplete:m=>{c.set(m,!0);for(const b of c.values())if(!b)return;r&&r()},register:m=>(c.set(m,!1),()=>c.delete(m))}),[n,c,r]);return o&&w&&(h={...h}),p.useMemo(()=>{c.forEach((m,b)=>c.set(b,!1))},[n]),v.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),i==="popLayout"&&(e=a.jsx(Cp,{isPresent:n,anchorX:u,root:l,children:e})),a.jsx(Dn.Provider,{value:h,children:e})};function Tp(){return new Map}function Ep(e=!0){const t=p.useContext(Dn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=p.useId();p.useEffect(()=>{if(e)return s(o)},[e]);const i=p.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,i]:[!0]}const $n=e=>e.key||"";function ki(e){const t=[];return p.Children.forEach(e,n=>{p.isValidElement(n)&&t.push(n)}),t}const Ii=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:o="sync",propagate:i=!1,anchorX:u="left",root:l})=>{const[c,d]=Ep(i),w=p.useMemo(()=>ki(e),[e]),h=i&&!c?[]:w.map($n),m=p.useRef(!0),b=p.useRef(w),g=Hr(()=>new Map),[x,C]=p.useState(w),[y,N]=p.useState(w);po(()=>{m.current=!1,b.current=w;for(let I=0;I<y.length;I++){const A=$n(y[I]);h.includes(A)?g.delete(A):g.get(A)!==!0&&g.set(A,!1)}},[y,h.length,h.join("-")]);const S=[];if(w!==x){let I=[...w];for(let A=0;A<y.length;A++){const k=y[A],D=$n(k);h.includes(D)||(I.splice(A,0,k),S.push(k))}return o==="wait"&&S.length&&(I=S),N(ki(I)),C(w),null}process.env.NODE_ENV!=="production"&&o==="wait"&&y.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:E}=p.useContext(fo);return a.jsx(a.Fragment,{children:y.map(I=>{const A=$n(I),k=i&&!c?!1:w===y||h.includes(A),D=()=>{if(g.has(A))g.set(A,!0);else return;let _=!0;g.forEach(F=>{F||(_=!1)}),_&&(E==null||E(),N(b.current),i&&(d==null||d()),r&&r())};return a.jsx(Sp,{isPresent:k,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:l,onExitComplete:k?void 0:D,anchorX:u,children:I},A)})})},Ts=p.createContext({strict:!1}),Mi={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},kt={};for(const e in Mi)kt[e]={isEnabled:t=>Mi[e].some(n=>!!t[n])};function Di(e){for(const t in e)kt[t]={...kt[t],...e[t]}}function Pi({children:e,features:t,strict:n=!1}){const[,r]=p.useState(!Es(t)),s=p.useRef(void 0);if(!Es(t)){const{renderer:o,...i}=t;s.current=o,Di(i)}return p.useEffect(()=>{Es(t)&&t().then(({renderer:o,...i})=>{Di(i),s.current=o,r(!0)})},[]),a.jsx(Ts.Provider,{value:{renderer:s.current,strict:n},children:e})}function Es(e){return typeof e=="function"}const Ap=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Hn(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Ap.has(e)}let _i=e=>!Hn(e);function kp(e){typeof e=="function"&&(_i=t=>t.startsWith("on")?!Hn(t):e(t))}try{kp(require("@emotion/is-prop-valid").default)}catch{}function Ip(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(_i(s)||n===!0&&Hn(s)||!t&&!Hn(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const Un=p.createContext({});function jn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function an(e){return typeof e=="string"||Array.isArray(e)}const As=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ks=["initial",...As];function Gn(e){return jn(e.animate)||ks.some(t=>an(e[t]))}function Fi(e){return!!(Gn(e)||e.variants)}function Mp(e,t){if(Gn(e)){const{initial:n,animate:r}=e;return{initial:n===!1||an(n)?n:void 0,animate:an(r)?r:void 0}}return e.inherit!==!1?t:{}}function Dp(e){const{initial:t,animate:n}=Mp(e,p.useContext(Un));return p.useMemo(()=>({initial:t,animate:n}),[Vi(t),Vi(n)])}function Vi(e){return Array.isArray(e)?e.join(" "):e}function Li(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const on={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(L.test(e))e=parseFloat(e);else return e;const n=Li(e,t.target.x),r=Li(e,t.target.y);return`${n}% ${r}%`}},Pp={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Ze.parse(e);if(s.length>5)return r;const o=Ze.createTransformer(e),i=typeof s[0]!="number"?1:0,u=n.x.scale*t.x,l=n.y.scale*t.y;s[0+i]/=u,s[1+i]/=l;const c=rn(u,l,.5);return typeof s[2+i]=="number"&&(s[2+i]/=c),typeof s[3+i]=="number"&&(s[3+i]/=c),o(s)}},_p={borderRadius:{...on,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:on,borderTopRightRadius:on,borderBottomLeftRadius:on,borderBottomRightRadius:on,boxShadow:Pp};function Oi(e,{layout:t,layoutId:n}){return At.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!_p[e]||e==="opacity")}const Fp={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Vp=Et.length;function Lp(e,t,n){let r="",s=!0;for(let o=0;o<Vp;o++){const i=Et[o],u=e[i];if(u===void 0)continue;let l=!0;if(typeof u=="number"?l=u===(i.startsWith("scale")?1:0):l=parseFloat(u)===0,!l||n){const c=yi(u,Ns[i]);if(!l){s=!1;const d=Fp[i]||i;r+=`${d}(${c}) `}n&&(t[i]=c)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function Is(e,t,n){const{style:r,vars:s,transformOrigin:o}=e;let i=!1,u=!1;for(const l in t){const c=t[l];if(At.has(l)){i=!0;continue}else if(Vo(l)){s[l]=c;continue}else{const d=yi(c,Ns[l]);l.startsWith("origin")?(u=!0,o[l]=d):r[l]=d}}if(t.transform||(i||n?r.transform=Lp(t,e.transform,n):r.transform&&(r.transform="none")),u){const{originX:l="50%",originY:c="50%",originZ:d=0}=o;r.transformOrigin=`${l} ${c} ${d}`}}const Ms=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Wi(e,t,n){for(const r in t)!ge(t[r])&&!Oi(r,n)&&(e[r]=t[r])}function Op({transformTemplate:e},t){return p.useMemo(()=>{const n=Ms();return Is(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Wp(e,t){const n=e.style||{},r={};return Wi(r,n,e),Object.assign(r,Op(e,t)),r}function Bp(e,t){const n={},r=Wp(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const qp={offset:"stroke-dashoffset",array:"stroke-dasharray"},zp={offset:"strokeDashoffset",array:"strokeDasharray"};function $p(e,t,n=1,r=0,s=!0){e.pathLength=1;const o=s?qp:zp;e[o.offset]=L.transform(-r);const i=L.transform(t),u=L.transform(n);e[o.array]=`${i} ${u}`}function Bi(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:o=1,pathOffset:i=0,...u},l,c,d){if(Is(e,u,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:w,style:h}=e;w.transform&&(h.transform=w.transform,delete w.transform),(h.transform||w.transformOrigin)&&(h.transformOrigin=w.transformOrigin??"50% 50%",delete w.transformOrigin),h.transform&&(h.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete w.transformBox),t!==void 0&&(w.x=t),n!==void 0&&(w.y=n),r!==void 0&&(w.scale=r),s!==void 0&&$p(w,s,o,i,!1)}const qi=()=>({...Ms(),attrs:{}}),zi=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Hp(e,t,n,r){const s=p.useMemo(()=>{const o=qi();return Bi(o,t,zi(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Wi(o,e.style,e),s.style={...o,...s.style}}return s}const Up=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ds(e){return typeof e!="string"||e.includes("-")?!1:!!(Up.indexOf(e)>-1||/[A-Z]/u.test(e))}function jp(e,t,n,{latestValues:r},s,o=!1){const u=(Ds(e)?Hp:Bp)(t,r,s,e),l=Ip(t,typeof e=="string",o),c=e!==p.Fragment?{...l,...u,ref:n}:{},{children:d}=t,w=p.useMemo(()=>ge(d)?d.get():d,[d]);return p.createElement(e,{...c,children:w})}function $i(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Ps(e,t,n,r){if(typeof t=="function"){const[s,o]=$i(r);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=$i(r);t=t(n!==void 0?n:e.custom,s,o)}return t}function Gp(e){return ge(e)?e.get():e}function Kp({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:Yp(n,r,s,e),renderState:t()}}function Yp(e,t,n,r){const s={},o=r(e,{});for(const h in o)s[h]=Gp(o[h]);let{initial:i,animate:u}=e;const l=Gn(e),c=Fi(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),u===void 0&&(u=t.animate));let d=n?n.initial===!1:!1;d=d||i===!1;const w=d?u:i;if(w&&typeof w!="boolean"&&!jn(w)){const h=Array.isArray(w)?w:[w];for(let m=0;m<h.length;m++){const b=Ps(e,h[m]);if(b){const{transitionEnd:g,transition:x,...C}=b;for(const y in C){let N=C[y];if(Array.isArray(N)){const S=d?N.length-1:0;N=N[S]}N!==null&&(s[y]=N)}for(const y in g)s[y]=g[y]}}}return s}const Hi=e=>(t,n)=>{const r=p.useContext(Un),s=p.useContext(Dn),o=()=>Kp(e,t,r,s);return n?o():Hr(o)};function _s(e,t,n){var o;const{style:r}=e,s={};for(const i in r)(ge(r[i])||t.style&&ge(t.style[i])||Oi(i,e)||((o=n==null?void 0:n.getValue(i))==null?void 0:o.liveStyle)!==void 0)&&(s[i]=r[i]);return s}const Xp=Hi({scrapeMotionValuesFromProps:_s,createRenderState:Ms});function Ui(e,t,n){const r=_s(e,t,n);for(const s in e)if(ge(e[s])||ge(t[s])){const o=Et.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[o]=e[s]}return r}const Zp=Hi({scrapeMotionValuesFromProps:Ui,createRenderState:qi}),Jp=Symbol.for("motionComponentSymbol");function ji(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Qp(e,t,n){return p.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ji(n)&&(n.current=r))},[t])}const Fs=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Gi="data-"+Fs("framerAppearId"),Rp=p.createContext({});function eh(e,t,n,r,s){var g,x;const{visualElement:o}=p.useContext(Un),i=p.useContext(Ts),u=p.useContext(Dn),l=p.useContext(Ss).reducedMotion,c=p.useRef(null);r=r||i.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:o,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:l}));const d=c.current,w=p.useContext(Rp);d&&!d.projection&&s&&(d.type==="html"||d.type==="svg")&&th(c.current,n,s,w);const h=p.useRef(!1);p.useInsertionEffect(()=>{d&&h.current&&d.update(n,u)});const m=n[Gi],b=p.useRef(!!m&&!((g=window.MotionHandoffIsComplete)!=null&&g.call(window,m))&&((x=window.MotionHasOptimisedAnimation)==null?void 0:x.call(window,m)));return po(()=>{d&&(h.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),b.current&&d.animationState&&d.animationState.animateChanges())}),p.useEffect(()=>{d&&(!b.current&&d.animationState&&d.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var C;(C=window.MotionHandoffMarkAsComplete)==null||C.call(window,m)}),b.current=!1),d.enteringChildren=void 0)}),d}function th(e,t,n,r){const{layoutId:s,layout:o,drag:i,dragConstraints:u,layoutScroll:l,layoutRoot:c,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ki(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!i||u&&ji(u),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:c})}function Ki(e){if(e)return e.options.allowProjection!==!1?e.projection:Ki(e.parent)}function nh(e,{forwardMotionProps:t=!1}={},n,r){const s=Ds(e)?Zp:Xp;function o(u,l){let c;const d={...p.useContext(Ss),...u,layoutId:rh(u)},{isStatic:w}=d,h=Dp(u),m=s(u,w);if(!w&&Ur){sh(d,n);const b=ah(d);c=b.MeasureLayout,h.visualElement=eh(e,m,d,r,b.ProjectionNode)}return a.jsxs(Un.Provider,{value:h,children:[c&&h.visualElement?a.jsx(c,{visualElement:h.visualElement,...d}):null,jp(e,u,Qp(m,h.visualElement,l),m,w,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const i=p.forwardRef(o);return i[Jp]=e,i}function rh({layoutId:e}){const t=p.useContext(fo).id;return t&&e!==void 0?t+"-"+e:e}function sh(e,t){p.useContext(Ts).strict,process.env.NODE_ENV}function ah(e){const{drag:t,layout:n}=kt;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function oh({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function ih(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function uh(e,t){return oh(ih(e.getBoundingClientRect(),t))}const Yi=()=>({min:0,max:0}),Xi=()=>({x:Yi(),y:Yi()}),Vs={current:null},Zi={current:!1};function lh(){if(Zi.current=!0,!!Ur)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Vs.current=e.matches;e.addEventListener("change",t),t()}else Vs.current=!1}const ch=new WeakMap;function dh(e,t,n){for(const r in t){const s=t[r],o=n[r];if(ge(s))e.addValue(r,s);else if(ge(o))e.addValue(r,qn(s,{owner:e}));else if(o!==s)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(s):i.hasAnimated||i.set(s)}else{const i=e.getStaticValue(r);e.addValue(r,qn(i!==void 0?i:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Ji=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class wh{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:o,visualState:i},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ys,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=Ae.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,_e.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=u,this.blockInitialAnimation=!!o,this.isControllingVariants=Gn(n),this.isVariantNode=Fi(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...w}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in w){const m=w[h];l[h]!==void 0&&ge(m)&&m.set(l[h])}}mount(t){var n;this.current=t,ch.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,s)=>this.bindToMotionValue(s,r)),Zi.current||lh(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Vs.current,process.env.NODE_ENV!=="production"&&vo(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),Xr(this.notifyUpdate),Xr(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=At.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&_e.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in kt){const n=kt[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Xi()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Ji.length;r++){const s=Ji[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,i=t[o];i&&(this.propEventSubscriptions[s]=this.on(s,i))}this.prevMotionValues=dh(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=qn(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(ho(r)||mo(r))?r=parseFloat(r):!yp(r)&&Ze.test(n)&&(r=bi(t,n)),this.setBaseTarget(t,ge(r)?r.get():r)),ge(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=Ps(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!ge(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new bo),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){lp.render(this.render)}}class Qi extends wh{constructor(){super(...arguments),this.KeyframeResolver=ap}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ge(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Ri(e,{style:t,vars:n},r,s){const o=e.style;let i;for(i in t)o[i]=t[i];s==null||s.applyProjectionStyles(o,r);for(i in n)o.setProperty(i,n[i])}function fh(e){return window.getComputedStyle(e)}class ph extends Qi{constructor(){super(...arguments),this.type="html",this.renderInstance=Ri}readValueFromInstance(t,n){var r;if(At.has(n))return(r=this.projection)!=null&&r.isProjecting?ps(n):Sf(t,n);{const s=fh(t),o=(Vo(n)?s.getPropertyValue(n):s[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return uh(t,n)}build(t,n,r){Is(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return _s(t,n,r)}}const eu=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function hh(e,t,n,r){Ri(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(eu.has(s)?s:Fs(s),t.attrs[s])}class mh extends Qi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Xi}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(At.has(n)){const r=gi(n);return r&&r.default||0}return n=eu.has(n)?n:Fs(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Ui(t,n,r)}build(t,n,r){Bi(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){hh(t,n,r,s)}mount(t){this.isSVGTag=zi(t.tagName),super.mount(t)}}const gh=(e,t)=>Ds(e)?new mh(t):new ph(t,{allowProjection:e!==p.Fragment});function It(e,t,n){const r=e.getProps();return Ps(r,t,n!==void 0?n:r.custom,e)}const Ls=e=>Array.isArray(e);function bh(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,qn(n))}function yh(e){return Ls(e)?e[e.length-1]||0:e}function xh(e,t){const n=It(e,t);let{transitionEnd:r={},transition:s={},...o}=n||{};o={...o,...r};for(const i in o){const u=yh(o[i]);bh(e,i,u)}}function vh(e){return!!(ge(e)&&e.add)}function Nh(e,t){const n=e.getValue("willChange");if(vh(n))return n.add(t);if(!n&&Ge.WillChange){const r=new Ge.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Ch(e){return e.props[Gi]}const Sh=e=>e!==null;function Th(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(Sh),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return s[o]}const Eh={type:"spring",stiffness:500,damping:25,restSpeed:10},Ah=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),kh={type:"keyframes",duration:.8},Ih={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Mh=(e,{keyframes:t})=>t.length>2?kh:At.has(e)?e.startsWith("scale")?Ah(t[1]):Eh:Ih;function Dh({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:o,repeatType:i,repeatDelay:u,from:l,elapsed:c,...d}){return!!Object.keys(d).length}const Ph=(e,t,n,r={},s,o)=>i=>{const u=di(r,e)||{},l=u.delay||r.delay||0;let{elapsed:c=0}=r;c=c-$e(l);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-c,onUpdate:h=>{t.set(h),u.onUpdate&&u.onUpdate(h)},onComplete:()=>{i(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:o?void 0:s};Dh(u)||Object.assign(d,Mh(e,d)),d.duration&&(d.duration=$e(d.duration)),d.repeatDelay&&(d.repeatDelay=$e(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let w=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(xs(d),d.delay===0&&(w=!0)),(Ge.instantAnimations||Ge.skipAnimations)&&(w=!0,xs(d),d.delay=0),d.allowFlatten=!u.type&&!u.ease,w&&!o&&t.get()!==void 0){const h=Th(d.keyframes,u);if(h!==void 0){_e.update(()=>{d.onUpdate(h),d.onComplete()});return}}return u.isSync?new ds(d):new Kf(d)};function _h({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function tu(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:i,...u}=t;r&&(o=r);const l=[],c=s&&e.animationState&&e.animationState.getState()[s];for(const d in u){const w=e.getValue(d,e.latestValues[d]??null),h=u[d];if(h===void 0||c&&_h(c,d))continue;const m={delay:n,...di(o||{},d)},b=w.get();if(b!==void 0&&!w.isAnimating&&!Array.isArray(h)&&h===b&&!m.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const C=Ch(e);if(C){const y=window.MotionHandoffAnimation(C,d,_e);y!==null&&(m.startTime=y,g=!0)}}Nh(e,d),w.start(Ph(d,w,h,e.shouldReduceMotion&&wi.has(d)?{type:!1}:m,e,g));const x=w.animation;x&&l.push(x)}return i&&Promise.all(l).then(()=>{_e.update(()=>{i&&xh(e,i)})}),l}function nu(e,t,n,r=0,s=1){const o=Array.from(e).sort((c,d)=>c.sortNodePosition(d)).indexOf(t),i=e.size,u=(i-1)*r;return typeof n=="function"?n(o,i):s===1?o*r:u-o*r}function Os(e,t,n={}){var l;const r=It(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const o=r?()=>Promise.all(tu(e,r,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:w,staggerDirection:h}=s;return Fh(e,t,c,d,w,h,n)}:()=>Promise.resolve(),{when:u}=s;if(u){const[c,d]=u==="beforeChildren"?[o,i]:[i,o];return c().then(()=>d())}else return Promise.all([o(),i(n.delay)])}function Fh(e,t,n=0,r=0,s=0,o=1,i){const u=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),u.push(Os(l,t,{...i,delay:n+(typeof r=="function"?0:r)+nu(e.variantChildren,l,r,s,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(u)}function Vh(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(o=>Os(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=Os(e,t,n);else{const s=typeof t=="function"?It(e,t,n.custom):t;r=Promise.all(tu(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function ru(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Lh=ks.length;function su(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?su(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Lh;n++){const r=ks[n],s=e.props[r];(an(s)||s===!1)&&(t[r]=s)}return t}const Oh=[...As].reverse(),Wh=As.length;function Bh(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Vh(e,n,r)))}function qh(e){let t=Bh(e),n=au(),r=!0;const s=l=>(c,d)=>{var h;const w=It(e,d,l==="exit"?(h=e.presenceContext)==null?void 0:h.custom:void 0);if(w){const{transition:m,transitionEnd:b,...g}=w;c={...c,...g,...b}}return c};function o(l){t=l(e)}function i(l){const{props:c}=e,d=su(e.parent)||{},w=[],h=new Set;let m={},b=1/0;for(let x=0;x<Wh;x++){const C=Oh[x],y=n[C],N=c[C]!==void 0?c[C]:d[C],S=an(N),E=C===l?y.isActive:null;E===!1&&(b=x);let I=N===d[C]&&N!==c[C]&&S;if(I&&r&&e.manuallyAnimateOnMount&&(I=!1),y.protectedKeys={...m},!y.isActive&&E===null||!N&&!y.prevProp||jn(N)||typeof N=="boolean")continue;const A=zh(y.prevProp,N);let k=A||C===l&&y.isActive&&!I&&S||x>b&&S,D=!1;const _=Array.isArray(N)?N:[N];let F=_.reduce(s(C),{});E===!1&&(F={});const{prevResolvedValues:$={}}=y,O={...$,...F},G=M=>{k=!0,h.has(M)&&(D=!0,h.delete(M)),y.needsAnimating[M]=!0;const V=e.getValue(M);V&&(V.liveStyle=!1)};for(const M in O){const V=F[M],q=$[M];if(m.hasOwnProperty(M))continue;let B=!1;Ls(V)&&Ls(q)?B=!ru(V,q):B=V!==q,B?V!=null?G(M):h.add(M):V!==void 0&&h.has(M)?G(M):y.protectedKeys[M]=!0}y.prevProp=N,y.prevResolvedValues=F,y.isActive&&(m={...m,...F}),r&&e.blockInitialAnimation&&(k=!1);const z=I&&A;k&&(!z||D)&&w.push(..._.map(M=>{const V={type:C};if(typeof M=="string"&&r&&!z&&e.manuallyAnimateOnMount&&e.parent){const{parent:q}=e,B=It(q,M);if(q.enteringChildren&&B){const{delayChildren:re}=B.transition||{};V.delay=nu(q.enteringChildren,e,re)}}return{animation:M,options:V}}))}if(h.size){const x={};if(typeof c.initial!="boolean"){const C=It(e,Array.isArray(c.initial)?c.initial[0]:c.initial);C&&C.transition&&(x.transition=C.transition)}h.forEach(C=>{const y=e.getBaseTarget(C),N=e.getValue(C);N&&(N.liveStyle=!0),x[C]=y??null}),w.push({animation:x})}let g=!!w.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(w):Promise.resolve()}function u(l,c){var w;if(n[l].isActive===c)return Promise.resolve();(w=e.variantChildren)==null||w.forEach(h=>{var m;return(m=h.animationState)==null?void 0:m.setActive(l,c)}),n[l].isActive=c;const d=i(l);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:i,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=au()}}}function zh(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ru(t,e):!1}function ut(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function au(){return{animate:ut(!0),whileInView:ut(),whileHover:ut(),whileTap:ut(),whileDrag:ut(),whileFocus:ut(),exit:ut()}}class Mt{constructor(t){this.isMounted=!1,this.node=t}update(){}}class $h extends Mt{constructor(t){super(t),t.animationState||(t.animationState=qh(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();jn(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let Hh=0;class Uh extends Mt{constructor(){super(...arguments),this.id=Hh++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const jh={animation:{Feature:$h},exit:{Feature:Uh}};function ou(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function iu(e){return{point:{x:e.pageX,y:e.pageY}}}function uu(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=r[s];o&&_e.postRender(()=>o(t,iu(t)))}class Gh extends Mt{mount(){const{current:t}=this.node;t&&(this.unmount=wp(t,(n,r)=>(uu(this.node,r,"Start"),s=>uu(this.node,s,"End"))))}unmount(){}}class Kh extends Mt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Pn(ou(this.node.current,"focus",()=>this.onFocus()),ou(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function lu(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=r[s];o&&_e.postRender(()=>o(t,iu(t)))}class Yh extends Mt{mount(){const{current:t}=this.node;t&&(this.unmount=gp(t,(n,r)=>(lu(this.node,r,"Start"),(s,{success:o})=>lu(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ws=new WeakMap,Bs=new WeakMap,Xh=e=>{const t=Ws.get(e.target);t&&t(e)},Zh=e=>{e.forEach(Xh)};function Jh({root:e,...t}){const n=e||document;Bs.has(n)||Bs.set(n,{});const r=Bs.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(Zh,{root:e,...t})),r[s]}function Qh(e,t,n){const r=Jh(t);return Ws.set(e,n),r.observe(e),()=>{Ws.delete(e),r.unobserve(e)}}const Rh={some:0,all:1};class em extends Mt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:o}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:Rh[s]},u=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:d,onViewportLeave:w}=this.node.getProps(),h=c?d:w;h&&h(l)};return Qh(this.node.current,i,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(tm(t,n))&&this.startObserver()}unmount(){}}function tm({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const cu={renderer:gh,...jh,...{inView:{Feature:em},tap:{Feature:Yh},focus:{Feature:Kh},hover:{Feature:Gh}}};function nm(e,t){return nh(e,t)}const du=nm("div"),rm=e=>{const{checked:t,onSelect:n,children:r,disabled:s,preventCloseOnSelect:o}=e;return a.jsx(Xa,{disabled:s,checked:t,onCheckedChange:n,onSelect:i=>o&&i.preventDefault(),children:r})},Kn=e=>{const{children:t,className:n,Icon:r,iconPosition:s="left",disabled:o,onSelect:i,preventCloseOnSelect:u}=e,l=f("wu-flex wu-items-center wu-gap-2",r&&(s==="left"?"":"wu-justify-between wu-flex-row-reverse"),n),c=d=>{i&&i(d),u&&d.preventDefault()};return a.jsxs(Yt,{onSelect:c,disabled:o,className:l,children:[r&&a.jsx("div",{className:"wu-text-base",children:r}),t]})},sm=e=>{const{children:t,Label:n,...r}=e;return a.jsxs(Ga,{...r,children:[a.jsx(Xt,{children:n||e.label}),t]})},am=e=>{const{options:t,value:n,onSelect:r}=e;return a.jsx(Sd,{value:n,onValueChange:r,children:t.map(s=>a.jsx(Za,{value:s.value,disabled:s.disabled,children:s.Label||s.label},s.value))})},om=e=>{const{className:t,...n}=e,r=f("wu-w-11/12 wu-mx-auto wu-border-gray-40",t);return a.jsx(kn,{...n,className:r})},Dt=v.forwardRef(({className:e,children:t,thumbColor:n,railColor:r,...s},o)=>a.jsxs(Re.Root,{ref:o,className:f("wu-relative wu-overflow-hidden",e),children:[a.jsx(Re.Viewport,{className:"wu-h-full wu-w-full wu-rounded-[inherit]",...s,children:t}),a.jsx(qs,{thumbColor:n,railColor:r}),a.jsx(Re.Corner,{})]}));Dt.displayName=Re.Root.displayName;const qs=v.forwardRef(({className:e,orientation:t="vertical",thumbColor:n="#d4d4d4",railColor:r="#eeeeee",...s},o)=>a.jsx(Re.ScrollAreaScrollbar,{ref:o,orientation:t,className:f("wu-flex wu-touch-none wu-select-none wu-transition-colors",t==="vertical"&&"wu-h-full wu-w-2 wu-border-l wu-border-l-transparent wu-p-[1px]",t==="horizontal"&&"wu-h-2 wu-flex-col wu-border-t wu-border-t-transparent wu-p-[1px]",e),style:{background:r},...s,children:a.jsx(Re.ScrollAreaThumb,{className:"wu-relative wu-flex-1 wu-rounded-full",style:{background:n}})}));qs.displayName=Re.ScrollAreaScrollbar.displayName;const im=e=>{const{children:t,label:n,Label:r,open:s,onOpenChange:o,height:i,dir:u,...l}=e;return a.jsxs(Cd,{...l,open:s,onOpenChange:o,children:[a.jsx(Ka,{dir:u,children:r||n}),a.jsx(Nd,{children:a.jsx(Ya,{onInteractOutside:c=>c.preventDefault(),children:a.jsx(Dt,{className:"wu-h-fit",style:{height:i},dir:u,children:t})})})]})},um="wu-p-1.5 wu-cursor-pointer hover:wu-bg-gray-20 wu-border-gray-40 wu-transition wu-duration-300 focus:wu-outline-2 focus:wu-outline-offset focus:wu-outline-blue-p/80 focus:wu-bg-gray-20 hover:wu-bg-gray-20 wu-rounded-t-sm",zs=e=>{const{children:t,menuTitle:n,MenuTitle:r,variant:s="flat",name:o,open:i,onOpenChange:u,height:l,preventCloseOnClickOutside:c,dir:d,Trigger:w,align:h="start",sideOffset:m=0,side:b="bottom",alignOffset:g,className:x,disabled:C,...y}=e;return a.jsxs(Vr,{...y,open:i,onOpenChange:u,dir:d,children:[a.jsx(Lr,{asChild:!0,dir:d,disabled:C,className:f("disabled:wu-text-zinc-300 disabled:wu-bg-white disabled:wu-cursor-not-allowed disabled:hover:wu-bg-transparent"),children:w??lm(s,o,C)}),a.jsx(An,{className:f("wu-w-56 wu-border wu-border-blue-p disabled:wu-border-gray-40",x,"wu-menu-content"),align:h,sideOffset:m,side:b,alignOffset:g,onInteractOutside:N=>c&&N.preventDefault(),children:a.jsxs(Dt,{className:"h-fit",style:{height:l},dir:d,children:[(n||r)&&a.jsxs(a.Fragment,{children:[a.jsx(Xt,{dir:d,className:"wu-menu-title",children:r||n}),a.jsx(kn,{className:"wu-mt-0 wu-menu-separator",dir:d})]}),t??a.jsx("p",{children:"Menu Is Empty"})]})})]})},lm=(e,t,n)=>{const r=f(um,"wu-flex wu-items-center wu-justify-between wu-gap-2 wu-h-8 wu-text-xs wu-group/wuMenu",e==="outlined"?"wu-border":"wu-border-b","wu-trigger-btn");return a.jsxs("button",{className:r,"aria-label":"menu-trigger",children:[a.jsx("span",{children:t??"Menu"}),a.jsx("span",{className:f("wm-arrow-drop-down wu-text-gray-lead wu-text-base wu-rotate-180 group-data-[state=closed]/wuMenu:wu-rotate-0 wu-transition-transform wu-duration-300 group-hover:wu-text-blue-q",n&&"wu-text-zinc-300 group-hover:wu-text-zinc-300")})]})},cm=({titles:e,currentLevel:t,initial:n,handleTitleClick:r,headerClasses:s,offsetHeight:o})=>a.jsxs("div",{className:f("wu-absolute wu-top-0 wu-left-0 wu-flex wu-gap-x-1 wu-px-4 wu-transform wu-items-center wu-origin-left wu-w-full wu-transition-[height_opacity] wu-duration-300",t!==n?"wu-opacity-100 wu-delay-200 wu-z-50 ":"wu-opacity-0 wu-delay-0 -wu-z-10",s),style:{height:t!==n?`${o}px`:"0px"},children:[a.jsx(zs,{Trigger:a.jsx(xe,{variant:"iconOnly",className:"wu-w-6 wu-h-6 wu-shrink-0 wu-p-0",Icon:a.jsx("span",{className:"wm-arrow-drop-down wu-w-5 wu-h-5"})}),children:e.map(i=>a.jsx(Kn,{onSelect:u=>r(u,i.id),children:i.title},i.id))}),a.jsx("div",{className:"wu-relative wu-h-full wu-flex wu-items-center wu-flex-nowrap wu-whitespace-nowrap wu-text-nowrap wu-gap-1 wu-overflow-x-auto wu-no-scrollbar wu-snap-x wu-snap-mandatory wu-scroll-smooth",children:a.jsx(Pi,{features:cu,children:a.jsxs(Ii,{initial:!1,mode:"popLayout",children:[dm(e).map((i,u)=>a.jsx(du,{initial:{y:8,opacity:0,zIndex:0},animate:{y:0,opacity:1,zIndex:50},exit:{y:-8,opacity:0,zIndex:0},transition:{duration:.3},children:a.jsxs("h6",{"data-id":i.id,onClick:r,className:f("wu-flex wu-text-sm wu-font-normal wu-items-center wu-gap-1",u===2||u===1||i.id==="LEVEL_DOTS"?"wu-cursor-default wu-text-gray-600":"wu-cursor-pointer wu-text-[#1B87E6] wu-hover:text-[#145DBF]/70",i.id==="LEVEL_DOTS"&&"wu-text-[#1B87E6]"),children:[u!==0&&a.jsx("span",{className:"wm-chevron-right wu-text-lg"}),i.title]})},i.id)),"``"]})})})]}),dm=e=>{const t=e.length;if(t>2){const n=e[0],r=e[t-1];return[n,{id:"LEVEL_DOTS",title:"..."},r]}return e},wm=({items:e,initial:t,baseTitle:n,mode:r="popLayout",headerClasses:s="",offsetHeight:o=40,variant:i="default"})=>{const[u,l]=p.useState(n?[n]:[]),[[c,d],w]=p.useState([t,1]),h=(x,C)=>{C&&l([...u,C]),w([x,1])},m=x=>{const C=u.findIndex(y=>y.id===x);if(C!==-1){const y=u.slice(0,C+1);l(y)}w([x,-1])},b=(x,C)=>{const y=C||x.currentTarget.getAttribute("data-id")||"";if(y&&y!==c){const N=u.findIndex(S=>S.id===y);N!==-1&&(l(u.slice(0,N+1)),m(y))}},g=()=>{const x=e[c]?e[c]:null;if(!x)return a.jsx("div",{className:"wu-absolute wu-inset-0 wu-w-full wu-h-full wu-flex wu-items-center wu-justify-center",children:a.jsx("p",{className:"wu-text-gray-500",children:"No content available."})});const C=typeof x.component=="function"?x.component({goNext:h,goBack:m}):x.component;return a.jsx(du,{custom:d,variants:fm(i),initial:"enter",animate:"center",exit:"exit",transition:{opacity:{duration:.325,ease:"easeInOut"},scale:{duration:.275,ease:"easeInOut"}},className:"wu-w-full wu-h-full",style:{paddingTop:c!==t?`${o}px`:"0px"},children:C},c)};return a.jsxs("div",{className:"wu-h-full wu-relative wu-overflow-hidden wu-w-full wu-flex wu-flex-col",children:[a.jsx(cm,{titles:u,currentLevel:c,initial:t,handleTitleClick:b,headerClasses:s,offsetHeight:o}),a.jsx(Pi,{features:cu,children:a.jsx(Ii,{initial:!1,custom:d,mode:r,children:g()})})]})},fm=e=>{switch(e){case"slideRight":return hm;case"slideLeft":return mm;case"fadeZoom":return gm;case"default":default:return pm}},pm={enter:e=>({scale:e>0?.825:1.1,opacity:0,zIndex:0}),center:{scale:1,opacity:1,zIndex:1},exit:e=>({scale:e>0?1.1:.825,opacity:0,zIndex:0})},hm={enter:e=>({x:e>0?-15:15,opacity:0,zIndex:0}),center:{x:0,opacity:1,zIndex:1},exit:e=>({x:e>0?15:-15,opacity:0,zIndex:0})},mm={enter:e=>({x:e>0?15:-15,opacity:0,zIndex:0}),center:{x:0,opacity:1,zIndex:1},exit:e=>({x:e>0?-15:15,opacity:0,zIndex:0})},gm={enter:e=>({opacity:0,zIndex:0,scale:e>0?.925:1.1}),center:{opacity:1,zIndex:1,scale:1},exit:{opacity:0,zIndex:0,scale:1}},wu=({className:e,isLoading:t,loadingText:n,children:r,...s})=>a.jsxs("footer",{className:f("wu-flex wu-items-center wu-justify-between wu-gap-2 wu-border-t wu-border-gray-10 wu-py-3 wu-px-4 wu-bg-white/80 wu-backdrop-blur-sm wu-text-xs wu-font-normal wu-text-gray-footer wu-sticky wu-bottom-0",e),...s,children:[a.jsx("div",{className:"wu-flex-1",children:r}),t&&a.jsx(bt,{size:"16px",variant:"spinner",color:"#a3a3a3",message:n})]});wu.displayName="WuFooter";const fu=p.forwardRef((e,t)=>{const{size:n="sm",idOrSlugOrUrl:r,variant:s="primary",...o}=e,i=n==="sm"?16:18,u=r.includes("http")?r:`/help/${r}.html`,l=s==="primary"?"wu-text-blue-p":"wu-text-gray-lead";return a.jsx("button",{...o,ref:t,onClick:()=>gr(u),children:a.jsx("span",{className:f("wm-help wu-text-gray-subtle",`wu-text-[${i}px]`,l,o.disabled&&"wu-text-neutral-300","wu-help-button-icon")})})});fu.displayName="WuHelpButton";const Je=(e,t)=>`wu-listbox-${e}`;function bm(e){const{option:t,accessorKey:n,onSelect:r,multiple:s,dir:o,GroupLabel:i,Item:u,isSelected:l,...c}=e,d=n.group&&Array.isArray(t[n.group]),w=({item:h,className:m})=>p.createElement(Kt,{...c,key:JSON.stringify(h),onSelect:()=>r==null?void 0:r(h),value:t[n.value],className:f("data-[selected='true']:wu-bg-gray-100 wu-cursor-pointer wu-text-xs wu-min-h-8 wu-py-0 hover:wu-bg-gray-100",!!(l!=null&&l(h))&&!s&&"wu-bg-blue-p/10",o==="rtl"&&"wu-justify-end",m,Je("item")),disabled:h.disabled},s&&a.jsx(De,{checked:l==null?void 0:l(h)}),u?u({value:h,isSelected:l==null?void 0:l(h)}):a.jsx(a.Fragment,{children:h[n.label]}));if(d){const h=t[n.group],m=typeof i=="string"?t[i]:i==null?void 0:i(t);return a.jsx(Gt,{heading:m,children:h==null?void 0:h.map(b=>a.jsx(w,{item:b,className:"wu-pl-6"},JSON.stringify(b)))})}return a.jsx(w,{item:t})}const ym=p.memo(bm),xm=e=>{const{className:t,...n}=e;return a.jsxs("div",{className:"wu-relative",children:[a.jsx(R,{icon:"wm-search",className:"wu-absolute wu-top-[14px] wu-left-5"}),a.jsx(Ua,{...n,"aria-label":"Search",className:f("wu-bg-gray-10 wu-border-b wu-border-gray-subtle wu-rounded-none wu-rounded-t-sm wu-h-8 wu-my-2 wu-pl-8","focus:wu-border-blue-p focus-visible:wu-outline-none;",Je("input"),t)})]})},vm=e=>{const{label:t,onSelectAll:n,data:r,value:s}=e,[o,i]=p.useState(!1),[u,l]=p.useState(!1);return p.useEffect(()=>{!s||!r||(i(s.length>0),l(s.length>0&&s.length<r.length))},[r,s]),a.jsxs(Kt,{className:"data-[selected='true']:wu-bg-gray-100 wu-cursor-pointer wu-text-xs wu-min-h-8 wu-py-0 hover:wu-bg-gray-100",onSelect:()=>n==null?void 0:n(!o),children:[a.jsx(De,{checked:o,partial:u}),t||"Select All"]})},Nm=e=>{const{CustomTrigger:t,disabled:n,value:r,placeholder:s,accessorKey:o,Chip:i,handleUnselect:u,variant:l,dir:c,className:d,...w}=e,[h,m]=p.useState(),b=p.useRef(null);return p.useEffect(()=>{if(!r){m(null);return}m(Array.isArray(r)?i?r.map((x,C)=>i({value:x,unselect:u,key:C})):r.map(x=>x[o.label]).join(", "):i?i({value:r,unselect:u}):r[o.label])},[r,i,o.label,m]),a.jsx(tt,{asChild:!0,id:e.id,disabled:n,ref:b,children:(t==null?void 0:t(r))||a.jsxs("button",{...w,className:f("wu-group/wuListbox wu-relative wu-min-h-8 wu-text-xs wu-border-gray-subtle wu-bg-gray-10 wu-p-1 wu-pl-2 rtl:wu-pr-2 wu-border-b wu-w-full wu-text-left wu-pr-5 rtl:wu-pl-5","hover:wu-border-blue-p","disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle","rtl:wu-text-right",l==="outlined"&&"wu-border wu-border-gray-subtle wu-bg-white",d,Je("trigger")),children:[a.jsx("div",{className:f("wu-truncate",i&&"wu-flex wu-items-center wu-gap-1 wu-flex-wrap",!h&&"wu-font-light"),children:h||s}),a.jsx(R,{icon:"wm-arrow-drop-down",className:f("wu-absolute wu-top-1 wm-arrow-drop-down group-data-[state=open]/wuListbox:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base",c==="rtl"?"wu-left-1":"wu-right-1",Je("drop-icon"))})]})})},pu=(e,t,n)=>{const r=String(e[n.label]??"").toLowerCase(),s=String(e[n.value]??"").toLowerCase();return r.includes(t)||s.includes(t)},Cm=(e,t,n)=>{const r=t.trim();if(r==="")return e;const s=r.toLowerCase(),o=[];for(const i of e){const u=n.group,l=u?i[u]:void 0;if(Array.isArray(l)){const c=l.filter(d=>pu(d,s,n));c.length>0&&o.push({...i,[u]:c})}else pu(i,s,n)&&o.push(i)}return o},Sm=e=>{const{data:t,accessorKey:n,value:r,Item:s,Label:o,GroupLabel:i,CustomHeader:u,CustomTrigger:l,NoDataContent:c,Chip:d,onSelect:w,onScroll:h,disabled:m,multiple:b,searchable:g,selectAll:x,virtualizedThreshold:C=100,id:y,dir:N,className:S,listClass:E,placeholder:I="Select items...",variant:A,labelPosition:k="top",maxContentWidth:D,maxContentHeight:_,modal:F,...$}=e,[O,G]=p.useState(!1),[z,ue]=p.useState(""),[M,V]=p.useState(r),q=p.useMemo(()=>n,[n]),B=p.useMemo(()=>{if(!g||!z)return t;const j=z.toLowerCase().trim();return Cm(t,j,n)},[t,z,n.label,g]),re=j=>{b?V(P=>{const U=j[n.value],Z=Array.isArray(P)?P:[],ee=Z.some(H=>H[n.value]===U)?Z.filter(H=>H[n.value]!==U):[...Z,j];return w&&w(ee),ee}):(V(j),w&&w(j),G(!1))},ae=p.useCallback(j=>{const P=j?t:[];V(P),x!=null&&x.onSelectAll&&x.onSelectAll(j),w&&w(P)},[t,x,w]),ve=j=>Array.isArray(M)?M.some(P=>P[n.value]===j[n.value]):(M==null?void 0:M[n.value])===j[n.value];p.useEffect(()=>{V(r)},[r]);const Ue=j=>{const P=U=>a.jsx(ym,{option:U,accessorKey:q,multiple:b,onSelect:Z=>re(Z),dir:N,GroupLabel:i,Item:s,isSelected:Z=>ve(Z)},JSON.stringify(U));return j.length>C?a.jsx(yt,{list:j,callback:(U,Z)=>P(Z),dir:N}):j.map(P)};return a.jsxs("div",{className:f("wu-flex wu-text-sm wu-gap-2",k==="top"&&"wu-flex-col wu-gap-1",k==="left"&&"wu-flex-row",k==="right"&&"wu-flex-row-reverse",Je("container")),dir:N,children:[o&&a.jsx(Te,{htmlFor:y,className:Je("label"),children:o}),a.jsxs(ze,{open:O,onOpenChange:j=>{G(j),j||setTimeout(()=>{ue("")},100)},modal:F,children:[a.jsx(Nm,{CustomTrigger:l,disabled:m,value:M,accessorKey:n,placeholder:I,Chip:d,className:S,handleUnselect:re,variant:A,id:y,dir:N,...$}),a.jsx(Me,{className:f("wu-min-w-[--radix-popover-trigger-width] wu-max-w-[calc(100vw-32px)] wu-w-auto wu-p-0 wu-bg-white wu-border wu-border-blue-p",Je("content")),align:"start",sideOffset:-1,style:{maxWidth:D},children:a.jsxs(Pr,{id:e.id,shouldFilter:!1,children:[g&&a.jsx(xm,{value:z,onValueChange:ue}),u,a.jsxs(_r,{className:f("wu-overflow-y-auto",Je("list"),E),onScroll:h,style:{maxHeight:_||"420px"},children:[a.jsx(Fr,{children:c||"No results found."}),a.jsx(Gt,{children:b&&(x==null?void 0:x.enabled)&&!z&&a.jsx(vm,{data:t,value:M,onSelectAll:ae,label:x.label})}),a.jsx(Gt,{children:Ue(B)})]})]})})]})]})},$s=p.forwardRef(({showMenu:e=!1,className:t,color:n="#1B3380",...r},s)=>{const o=f("wu-w-full wu-border wu-transition-all wu-duration-300");return a.jsxs("div",{...r,className:f("wu-flex wu-flex-col wu-w-[18px] wu-justify-between wu-aspect-[3/2] wu-transition-all wu-duration-300",t),ref:s,"aria-label":"menu-icon",children:[a.jsx("div",{className:`${o} wu-origin-center ${e?"wu-rotate-45 wu-translate-y-[5px]":""}`,style:{borderColor:n}}),a.jsx("div",{className:`${o} ${e?"wu-opacity-0":""}`,style:{borderColor:n}}),a.jsx("div",{className:`${o} wu-origin-center ${e?"-wu-rotate-45 -wu-translate-y-[5px]":""}`,style:{borderColor:n}})]})});$s.displayName="WuMenuIcon";const Tm=({placeholder:e="Select...",value:t,multiple:n=!1,accessorKey:r,variant:s="flat",dir:o="ltr",customTriggerChildren:i,id:u,disabled:l,selectAll:c,isCheckedAll:d,width:w,...h})=>{const[m,b]=p.useState(""),[g,x]=p.useState(e);p.useEffect(()=>{if(!t||Array.isArray(t)&&t.length===0){x(e),b("");return}const y=r.label;if(n&&Array.isArray(t)){const N=t.map(S=>S[y]).join(", ");b(N)}else!n&&!Array.isArray(t)&&b(t[y])},[t,r.label,n,e]);const C=()=>e&&!m?a.jsx("p",{className:"wu-text-xs wu-opacity-70",children:g}):a.jsx("span",{className:f("wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap"),style:{width:`${(w||0)-32}px`},children:d?(c==null?void 0:c.triggerText)??m:m});return a.jsx(Lr,{asChild:!0,dir:o,id:u,disabled:l,children:a.jsxs("button",{...h,disabled:l,className:f("wu-flex wu-gap-2 wu-w-full wu-items-center wu-justify-between wu-py-1.5 wu-px-2 wu-text-xs wu-transition-colors wu-cursor-pointer wu-border-b wu-bg-white wu-border-gray-subtle wu-h-8","focus:wu-outline-none focus-visible:wu-border-blue-p/80 wu-rounded-t-sm","disabled:wu-cursor-not-allowed disabled:hover:wu-border-gray-subtle disabled:wu-bg-gray-10 disabled:wu-opacity-50","hover:wu-bg-gray-10 hover:wu-border-blue-p",s==="outlined"&&"wu-border wu-border-gray-subtle","wu-group/wuSelect wu-select-trigger",h.className),children:[i??C(),a.jsx("span",{className:"wm-arrow-drop-down group-data-[state=open]/wuSelect:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base"})]})})},hu=({option:e,value:t,multiple:n=!1,onSelect:r,accessorKey:s,dir:o="ltr"})=>{const[i,u]=p.useState(n?[]:"");p.useEffect(()=>{t&&u(n?t.map(w=>JSON.stringify(w[s.value])):JSON.stringify(t[s.value]))},[t,s.value,n]);const l=n?i.includes(JSON.stringify(e[s.value])):i===JSON.stringify(e[s.value]),c=d=>{e.disabled||(r(e),n&&d.preventDefault())};return a.jsxs(Yt,{onClick:c,disabled:e.disabled,className:f("wu-cursor-pointer wu-text-xs wu-py-2 wu-leading-4 wu-select-item wu-items-start",l&&"wu-bg-gray-10"),dir:o,children:[n&&a.jsx(De,{checked:l}),a.jsx(mu,{option:e,accessorKey:s})]})},mu=({option:e,accessorKey:t})=>{const n=String(e[t.label]);return a.jsxs("div",{className:"wu-flex wu-items-center wu-w-full wu-gap-1 wu-text-xs wu-pl-2",children:[e.icon,n,e.isAdmin&&a.jsx("span",{className:"wu-ml-auto wm-lock wu-text-sm wu-text-orange-deep"})]})},gu=e=>{const{option:t,handleSelectAll:n,isCheckedAll:r,isPartialSelected:s,...o}=e;switch("type"in t?t.type:"option"){case"all":return a.jsxs(Yt,{onSelect:u=>{u.stopPropagation(),u.preventDefault(),n==null||n()},className:f("wu-cursor-pointer wu-text-xs wu-py-2 wu-leading-4 wu-select-item"),dir:o.dir,children:[a.jsx(De,{"data-partial":s,checked:r||s,partial:s}),a.jsx(mu,{option:t,accessorKey:o.accessorKey})]});case"group":return a.jsxs(Ga,{dir:o.dir,children:[a.jsx(Xt,{className:"wu-text-xs",children:t.label}),t.options.map((u,l)=>p.createElement(hu,{...o,option:u,key:l}))]});case"divider":return a.jsx(kn,{className:"wu-mx-4"});default:return a.jsx(hu,{...o,option:t})}},Em=e=>{let t=0,n=0;const r=[],s=[],o=i=>{i.type==="divider"?t++:i.type==="group"?(n++,i.options.forEach(u=>{o(u)})):(r.push(i),i.disabled||s.push(i))};return e.forEach(i=>{o(i)}),{separators:t,groups:n,enabledOptions:s,totalData:r.length,cleanData:r}},Am=100,km=400,bu=({data:e,onSelect:t,multiple:n=!1,defaultValue:r,value:s,accessorKey:o,variant:i="flat",dir:u="ltr",placeholder:l,Label:c,virtualizedThreshold:d=Am,maxHeight:w=km,hasGroup:h=!1,Header:m,CustomTrigger:b,selectAll:g,disabled:x,labelPosition:C="top",onScroll:y,maxContentWidth:N,...S})=>{const[E,I]=p.useState(),A=p.useRef(null),[k,D]=p.useState(!1),[_,F]=p.useState(!1),{cleanData:$,enabledOptions:O}=h||g!=null&&g.enable?Em(e):{cleanData:e,enabledOptions:[]},G=p.useMemo(()=>n&&g!=null&&g.enable&&e.length>0?[{type:"all",[o.label]:g.label||"Select All"},...e]:e,[e,g,n]),z=p.useCallback(q=>{const B=q[o.value];if(n)I((re=[])=>{const ae=re,Ue=ae.some(j=>j[o.value]===B)?ae.filter(j=>j[o.value]!==B):[...ae,q];return t==null||t(Ue),Ue});else{const re=q;I(re),t==null||t(re)}},[n,o.value,t]);p.useEffect(()=>{if(r&&s){console.error("defaultValue and value cannot be used simultaneously");return}!r&&!s&&I(void 0),r!==void 0&&I(r),s!==void 0&&I(s)},[r,s]);const ue=G.length>d;p.useEffect(()=>{if(!n)return;const q=g!=null&&g.includeDisabled?(E==null?void 0:E.length)===e.length:(E==null?void 0:E.length)===O.length;D(q);const B=(E==null?void 0:E.length)>0&&!q;F(B)},[E,g]);const M=p.useCallback(()=>{const q=k?[]:g!=null&&g.includeDisabled?h?$:e:O;I(q),t==null||t(q)},[k,n,e,O,t,g]),V=jt(C);return a.jsxs("div",{className:f(V,"wu-flex wu-select-container"),ref:A,dir:u,children:[a.jsxs(Vr,{children:[a.jsx(Tm,{...S,value:E,multiple:n,variant:i,dir:u,placeholder:l,accessorKey:o,customTriggerChildren:b,id:S.id,disabled:x,selectAll:g,isCheckedAll:k}),a.jsxs(An,{className:"wu-min-w-[--radix-dropdown-menu-trigger-width] wu-max-w-[calc(100vw-32px)] wu-border-blue-p wu-select-content",role:"listbox",sideOffset:-1,align:"start",id:S.id,style:{maxWidth:N},children:[m,ue?a.jsx(yt,{list:G,containerHeight:w,callback:(q,B)=>a.jsx(gu,{option:B,accessorKey:o,multiple:n,onSelect:z,value:E,dir:u,handleSelectAll:M,isCheckedAll:k,isPartialSelected:_}),dir:u}):a.jsx("div",{onScroll:y,style:{maxHeight:w,height:"fit-content",overflow:"auto"},className:"wu-select-list",children:G.map((q,B)=>a.jsx(gu,{option:q,accessorKey:o,multiple:n,onSelect:z,value:E,handleSelectAll:M,isCheckedAll:k,dir:u,isPartialSelected:_},`${B}`))})]})]}),c&&a.jsx(Te,{htmlFor:S.id,className:"wu-select-label",children:c})]})},Yn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Im=({value:e,onChange:t,min:n=Y.sub(new Date,{years:5}),max:r=Y.add(new Date,{years:1}),placeholder:s="Select a month",Label:o,labelPosition:i="top",disabled:u,id:l,readonly:c,disabledMonths:d=[],...w})=>{const[h,m]=p.useState(null),[b,g]=p.useState(""),[x,C]=p.useState({value:Math.min(new Date().getFullYear(),new Date(r).getFullYear()),label:Math.min(new Date().getFullYear(),new Date(r).getFullYear())}),y=p.useMemo(()=>{const S=new Date(n).getFullYear(),E=new Date(r).getFullYear();return Array.from({length:E-S+1},(I,A)=>({value:E-A,label:E-A}))},[n,r]);p.useEffect(()=>{if(e){const S=new Date(e),E=S.getFullYear(),I=S.getMonth();m({year:E,month:I}),g(`${Yn[I]} ${E}`),C({value:E,label:E})}},[e]);const N=()=>{h&&t&&(t(new Date(h.year,h.month,15)),g(`${Yn[h.month]} ${h.year}`))};return a.jsxs("div",{className:f("wu-flex wu-flex-col wu-items-center",jt(i),i==="top"&&"wu-items-start"),children:[a.jsxs(ze,{children:[a.jsx(Mr,{...w,disabled:u||c,id:l,dir:"ltr",placeholder:s,formattedString:b}),a.jsxs(Me,{className:"wu-flex wu-flex-col wu-gap-4 wu-p-4 wu-bg-white wu-border-blue-p wu-month-picker-content",align:"start",sideOffset:-1,children:[a.jsx("div",{className:"wu-px-1 wu-mx-auto wu-w-full",children:a.jsx(bu,{data:y,accessorKey:{value:"value",label:"label"},value:x,onSelect:S=>C(S),multiple:!1,maxHeight:224})}),a.jsx(Mm,{year:x==null?void 0:x.value,selectedMonth:h==null?void 0:h.month,selectedYear:h==null?void 0:h.year,onClick:(S,E)=>m({year:E,month:S}),disabledMonths:d}),a.jsx("div",{className:"wu-flex wu-justify-end wu-px-0.5",children:a.jsx(qt.PopoverClose,{asChild:!0,children:a.jsx(xe,{onClick:N,children:"Apply"})})})]})]}),o&&a.jsx(Te,{className:"wu-truncate wu-max-w-[120px] wu-min-w-fit wu-select-label",children:o})]})},Mm=({year:e,selectedMonth:t,selectedYear:n,onClick:r,disabledMonths:s=[]})=>{const o=new Date,i=o.getFullYear(),u=o.getMonth(),l=p.useMemo(()=>{const c=new Set;return s.forEach(d=>{const w=typeof d=="string"?new Date(d):d;c.add(`${w.getFullYear()}-${w.getMonth()}`)}),c},[s]);return a.jsx("div",{className:"wu-grid wu-grid-cols-3 wu-grid-rows-4 wu-w-fit wu-gap-[1px] wu-bg-[#d9d9d9] wu-border wu-border-[#d9d9d9] wu-month-picker-grid",children:Yn.map((c,d)=>{const w=e===i&&d===u,h=t===d&&n===e;return a.jsx("button",{disabled:l.has(`${e}-${d}`),onClick:()=>r(d,e),className:f("wu-bg-white wu-flex wu-items-center wu-justify-center wu-w-[83px] wu-h-[53px] wu-text-xs wu-transition-colors","hover:wu-bg-gray-25 hover:wu-text-blue-q hover:wu-font-medium","focus:wu-outline-none focus-visible:wu-border focus-visible:wu-border-blue-p/50",w&&"wu-border wu-border-blue-p",h&&"wu-bg-blue-p wu-text-white hover:wu-bg-blue-p/80 hover:wu-text-white wu-font-medium","disabled:wu-bg-gray-20 disabled:wu-text-gray-subtle disabled:hover:wu-bg-gray-20 disabled:hover:wu-text-gray-subtle disabled:hover:wu-font-normal","wu-month-picker-month"),"data-value":`${Yn[d]} ${e}`,"data-month":d,"data-year":e,children:c},c)})})},yu=(e,t,n,r=96)=>{if(e.length===0||r<=0)return[[],[]];const[o,i]=p.useState([]),[u,l]=p.useState([]);return p.useEffect(()=>{const c=()=>{var b,g;const d=((b=t.current)==null?void 0:b.clientWidth)||0,w=((g=n.current)==null?void 0:g.clientWidth)||0,h=d-w,m=Math.floor(h/r);i(e.slice(0,m)),l(e.slice(m))};return c(),window.addEventListener("resize",c),()=>{window.removeEventListener("resize",c)}},[e,r]),[o,u]},xu={wuPrimaryLink:"_wuPrimaryLink_1sy3v_1",wuPrimaryPopoverContent:"_wuPrimaryPopoverContent_1sy3v_8"},Dm=e=>{const{Links:t,children:n,className:r,...s}=e,o=p.useMemo(()=>t.map((d,w)=>p.cloneElement(d,{className:f(xu.wuPrimaryLink,d.props.className,"wu-primary-nav-link"),key:w})),[t]),i=p.useRef(null),u=p.useRef(null),[l,c]=yu(o,i,u);return a.jsx(a.Fragment,{children:a.jsxs("header",{className:f("wu-flex wu-items-center wu-justify-between wu-gap-4 wu-px-2 wu-py-1 wu-bg-white wu-border-b",r),...s,ref:i,children:[a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2",children:[a.jsx("nav",{className:"wu-flex wu-items-center wu-justify-start wu-gap-4 wu-primary-nav-left",children:l}),c.length>0&&a.jsxs(ze,{children:[a.jsx(tt,{className:"wu-p-1 wu-pb-0 wu-rounded-sm focus:wu-outline-none focus:wu-bg-gray-25","aria-label":"more",children:a.jsx("span",{className:"wm-more-vert"})}),a.jsx(Me,{className:f(xu.wuPrimaryPopoverContent,"wu-primary-nav-popover-left"),align:"start",sideOffset:12,children:c})]})]}),n&&a.jsxs(a.Fragment,{children:[a.jsx("section",{className:"wu-items-center wu-justify-end wu-hidden wu-gap-4 sm:wu-flex wu-primary-nav-right",ref:u,children:n}),a.jsxs(ze,{children:[a.jsx(tt,{className:"sm:wu-hidden",children:a.jsx("span",{className:"wu-text-lg wm-menu"})}),a.jsx(Me,{className:"wu-bg-white wu-border wu-border-blue-p wu-w-fit wu-primary-nav-popover-right",align:"end",sideOffset:4,children:n})]})]})]})})},Hs={wuSecondaryLink:"_wuSecondaryLink_1edl1_1",wuSecondaryNav:"_wuSecondaryNav_1edl1_6"},Pm=e=>{const{Links:t,children:n,className:r,...s}=e,o=p.useMemo(()=>t.map((w,h)=>p.cloneElement(w.link,{key:h,className:f(Hs.wuSecondaryLink,w.link.props.className,"wu-secondary-nav-link-container"),children:a.jsxs(a.Fragment,{children:[p.cloneElement(w.imgOrIcon,{className:f("wu-w-5 wu-h-5 wu-flex wu-items-center wu-justify-center wu-text-lg wu-leading-5",w.imgOrIcon.props.className)}),a.jsx("div",{className:"wu-secondary-nav-link",children:w.link.props.children})]})})),[t]),i=p.useRef(null),u=p.useRef(null),l=p.useRef(null),[c,d]=yu(o,i,l);return a.jsx(a.Fragment,{children:a.jsxs("header",{className:f("wu-flex wu-items-center wu-justify-between wu-gap-4 wu-border-y wu-border-gray-25 wu-h-[50px]",r),...s,ref:i,children:[a.jsxs("div",{className:"wu-flex wu-items-center wu-justify-start wu-gap-2",children:[a.jsx("nav",{className:f(Hs.wuSecondaryNav,"wu-flex wu-items-center wu-justify-start wu-w-full wu-h-full wu-secondary-nav-left"),ref:u,children:c}),d.length>0&&a.jsxs(ze,{children:[a.jsx(tt,{className:"wu-p-1 wu-pb-0 wu-rounded-sm focus:wu-outline-none focus:wu-bg-gray-25","aria-label":"more",children:a.jsx("span",{className:"wm-more-vert"})}),a.jsx(Me,{className:f(Hs.wuSecondaryNavPopover,"wu-secondary-nav-popover-left"),align:"start",sideOffset:12,children:d})]})]}),n&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"wu-items-center wu-justify-end wu-hidden sm:wu-flex",ref:l,children:n}),a.jsxs(ze,{children:[a.jsx(tt,{className:"sm:wu-hidden",children:a.jsx("span",{className:"wu-text-lg wm-menu"})}),a.jsx(Me,{className:"wu-bg-white wu-border wu-border-blue-p wu-w-fit wu-secondary-nav-popover-right",align:"end",sideOffset:12,children:n})]})]})]})})},vu=p.forwardRef(({totalRows:e,initialPage:t=0,initialPageSize:n=100,onPageChange:r,className:s,disabled:o=!1,...i},u)=>{const[l,c]=p.useState(t),[d,w]=p.useState(n);p.useEffect(()=>{c(t),w(n)},[t,n]);const h=Math.ceil(e/d),m=l*d+1,b=Math.min((l+1)*d,e),g=Array.from({length:h},(y,N)=>N),x=p.useCallback(y=>{y>=0&&y<h&&(c(y),r==null||r(y))},[h,r]),C=224;return a.jsxs("div",{className:f("wu-flex wu-items-center wu-gap-[2px]",s,"wu-pagination"),...i,role:"navigation",children:[a.jsx(Nu,{label:"Previous page",onClick:()=>x(l-1),disabled:l===0||o,icon:"wm-arrow-back-ios-new",className:"hover:wu-bg-gray-20 rtl:wu-rotate-180 wu-prev-btn"}),a.jsx(zs,{name:`${m} - ${b}`,className:"wu-w-[96px] wu-min-w-[96px] wu-pagination-menu",align:"end",disabled:o,children:a.jsx(Dt,{style:{maxHeight:C+"px"},dir:i.dir,children:g.length>100?a.jsx(yt,{className:"wu-pagination-list",containerHeight:C,list:g,callback:(y,N)=>a.jsxs(Kn,{onSelect:()=>x(N),className:f("wu-py-2",N===l&&"wu-bg-gray-20","wu-pagination-item"),children:[N*d+1," -"," ",Math.min((N+1)*d,e)]},y)}):g.map(y=>a.jsxs(Kn,{onSelect:()=>x(y),className:f(y===l&&"wu-bg-gray-20","wu-py-2 hover:wu-bg-gray-20","wu-pagination-item"),children:[y*d+1," -"," ",Math.min((y+1)*d,e)]},y))})}),a.jsx(Nu,{label:"Next page",onClick:()=>x(l+1),disabled:l===h-1||o,icon:"wm-arrow-forward-ios",className:"hover:wu-bg-gray-20 rtl:wu-rotate-180 wu-next-btn"})]})});vu.displayName="WuPagination";const Nu=({label:e,onClick:t,disabled:n,icon:r,className:s})=>a.jsx(xe,{variant:"iconOnly",onClick:t,disabled:n,className:f("wu-w-8 wu-h-8 wu-rounded-xs wu-group disabled:wu-text-zinc-300 disabled:wu-bg-white wu-text-gray-lead focus:wu-bg-color-none",s),"aria-label":e,children:a.jsx("span",{className:f("wu-text-sm",r)})}),_m=({Trigger:e,children:t,className:n,dir:r,open:s,onOpenChange:o,modal:i,...u})=>a.jsxs(ze,{open:s,onOpenChange:o,modal:i,children:[a.jsx(tt,{asChild:!0,dir:r,children:e}),a.jsx(Me,{className:f("wu-w-80 wu-p-0 wu-border-blue-p wu-bg-white wu-dark:border-gray-switcher",n),dir:r,...u,children:t})]}),Fm=e=>a.jsx(qt.PopoverClose,{asChild:!0,children:a.jsx(xe,{...e})}),Cu=v.forwardRef(({className:e,...t},n)=>a.jsx(Ut.Root,{className:f("wu-grid wu-gap-2",e),...t,ref:n}));Cu.displayName=Ut.Root.displayName;const Su=v.forwardRef(({className:e,...t},n)=>a.jsx(Ut.Item,{ref:n,className:f("wu-group wu-aspect-square wu-h-4 wu-w-4 wu-rounded-full wu-border wu-border-gray-subtle wu-text-blue-p wu-ring-offset-white disabled:wu-cursor-not-allowed disabled:wu-opacity-50 hover:wu-border-blue-p hover:wu-bg-gray-20 data-[state=checked]:wu-border-blue-p hover:data-[state=checked]:wu-border-blue-q hover:data-[state=checked]:wu-bg-inherit focus:wu-outline-2 focus:wu-outline-offset-4 focus:wu-outline-blue-soft disabled:hover:wu-border-gray-subtle disabled:wu-hover:bg-gray-20 disabled:wu-bg-gray-20",e),...t,children:a.jsx(Ut.Indicator,{className:"wu-flex wu-items-center wu-justify-center",children:a.jsx("div",{className:"wu-w-2 wu-h-2 wu-rounded-full wu-bg-blue-p group-hover:group-data-[state=checked]:wu-bg-blue-q"})})}));Su.displayName=Ut.Item.displayName;const Tu=p.forwardRef((e,t)=>{const{options:n,defaultValue:r,onChange:s,label:o,dir:i,...u}=e;return a.jsxs(Cu,{defaultValue:r,required:u.required,disabled:u.disabled,onValueChange:s,id:u.id,dir:i,name:u.name,className:f("w-fit",u.className),ref:t,style:u.style,children:[a.jsx(Sn,{htmlFor:u.id,className:"wu-text-sm wu-font-normal wu-text-gray-lead wu-leading-6 wu-radio-group-label",children:o}),n.map(l=>a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2 wu-radio-item-container",children:[a.jsx(Su,{value:l.value,id:l.value,disabled:l.disabled,required:l.required,"aria-label":l.value,className:"wu-peer wu-radio-item"}),a.jsx(Sn,{htmlFor:l.value,className:f(l.required&&"after:wu-content-['*'] after:wu-mx-[2px] after:wu-text-rose-500","wu-radio-item-label"),children:l.label})]},l.value))]})});Tu.displayName="WuRadioGroup";const Vm=e=>{const{children:t,...n}=e;return a.jsxs(Dt,{...n,role:"complementary","aria-label":"ScrollArea",children:[t,a.jsx(qs,{orientation:"horizontal"})]})};function Eu({className:e,...t}){return a.jsx("div",{className:f("animate-pulse rounded-md bg-muted",e),...t})}const Us=768;function Au(){const[e,t]=v.useState(void 0);return v.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Us-1}px)`),r=()=>{t(window.innerWidth<Us)};return n.addEventListener("change",r),t(window.innerWidth<Us),()=>n.removeEventListener("change",r)},[]),!!e}const Lm="sidebar_state",Om=3600*24*7,Wm="256px",Bm="256px",qm="3rem",zm="b",ku=v.createContext(null);function lt(){const e=v.useContext(ku);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Iu=v.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:s,children:o,...i},u)=>{const l=Au(),[c,d]=v.useState(!1),[w,h]=v.useState(l?!0:e),m=t??w,b=v.useCallback(y=>{const N=typeof y=="function"?y(m):y;n?n(N):h(N),document.cookie=`${Lm}=${N}; path=/; max-age=${Om}`},[n,m]),g=v.useCallback(()=>l?d(y=>!y):b(y=>!y),[l,b,d]);v.useEffect(()=>{const y=N=>{N.key===zm&&(N.metaKey||N.ctrlKey)&&(N.preventDefault(),g())};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[g]);const x=m?"expanded":"collapsed",C=v.useMemo(()=>({state:x,open:m,setOpen:b,isMobile:l,openMobile:c,setOpenMobile:d,toggleSidebar:g}),[x,m,b,l,c,d,g]);return a.jsx(ku.Provider,{value:C,children:a.jsx(_a,{delayDuration:0,children:a.jsx("div",{style:{"--sidebar-width":Wm,"--sidebar-width-icon":qm,...s},className:f("wu-group/sidebar-wrapper wu-flex wu-min-h-[calc(100svh-48px)] wu-w-full",r),ref:u,...i,children:o})})})});Iu.displayName="SidebarProvider";const Mu=v.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:s,...o},i)=>{const{isMobile:u,state:l,openMobile:c,setOpenMobile:d}=lt();return n==="none"?a.jsx("div",{className:f("wu-flex wu-h-full wu-w-[--sidebar-width] wu-flex-col",r),ref:i,...o,children:s}):u?a.jsx(lo,{open:c,onOpenChange:d,...o,children:a.jsx($r,{"data-sidebar":"sidebar","data-mobile":"true",className:"wu-w-[--sidebar-width] wu-bg-blue-sidebar wu-p-0 [&>button]:wu-hidden",style:{"--sidebar-width":Bm},side:e,children:a.jsx("div",{className:"wu-flex wu-flex-col wu-w-full wu-h-full",children:s})})}):a.jsxs("div",{ref:i,className:"wu-hidden wu-group wu-peer md:wu-block","data-state":l,"data-collapsible":l==="collapsed"?n:"","data-variant":t,"data-side":e,children:[a.jsx("div",{className:f("wu-relative wu-w-[--sidebar-width] wu-bg-transparent wu-transition-[width] wu-duration-150 wu-ease-linear","group-data-[collapsible=offcanvas]:wu-w-0","group-data-[side=right]:wu-rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:wu-w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:wu-w-[--sidebar-width-icon]")}),a.jsx("div",{className:f("wu-fixed wu-inset-y-0 wu-z-20 wu-hidden wu-h-svh wu-w-[--sidebar-width] wu-transition-[left,right,width] wu-duration-150 wu-ease-linear md:wu-flex",e==="left"?"wu-left-0 group-data-[collapsible=offcanvas]:wu-left-[calc(var(--sidebar-width)*-1)]":"wu-right-0 group-data-[collapsible=offcanvas]:wu-right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"wu-p-2 group-data-[collapsible=icon]:wu-w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:wu-w-[--sidebar-width-icon] group-data-[side=left]:wu-border-r group-data-[side=right]:wu-border-l",r),...o,children:a.jsx("div",{"data-sidebar":"sidebar",className:"wu-flex wu-h-full wu-w-full wu-flex-col wu-bg-[#eef3fb] group-data-[variant=floating]:wu-rounded-lg group-data-[variant=floating]:wu-border group-data-[variant=floating]:wu-border-sidebar-border group-data-[variant=floating]:wu-shadow",children:s})})]})});Mu.displayName="Sidebar";const Du=v.forwardRef(({className:e,onClick:t,children:n,...r},s)=>{const{toggleSidebar:o}=lt();return a.jsxs(gt,{ref:s,"data-sidebar":"trigger",variant:"secondary",className:f("wu-h-8 wu-w-8 wu-min-w-0 wu-p-0 wu-text-2xl wu-font-light hover:wu-bg-blue-sidebarHover wu-text-blue-q",e),onClick:i=>{t==null||t(i),o()},...r,children:[n,a.jsx("span",{className:"wu-sr-only",children:"Toggle Sidebar"})]})});Du.displayName="SidebarTrigger";const $m=v.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:r}=lt();return a.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:f("wu-absolute wu-inset-y-0 wu-z-20 wu-hidden wu-w-4 wu-translate-x-1/2 wu-transition-all wu-ease-linear after:wu-absolute after:wu-inset-y-0 after:wu-left-1/2 after:wu-w-[2px] group-data-[side=left]:wu-right-4 group-data-[side=right]:wu-left-0 sm:wu-flex","[[data-side=left]_&]:wu-cursor-w-resize [[data-side=right]_&]:wu-cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:wu-cursor-e-resize [[data-side=right][data-state=collapsed]_&]:wu-cursor-w-resize","group-data-[collapsible=offcanvas]:wu-translate-x-0 group-data-[collapsible=offcanvas]:after:wu-left-full","[[data-side=left][data-collapsible=offcanvas]_&]:wu-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:wu-left-2",e),...t})});$m.displayName="SidebarRail";const Pu=v.forwardRef(({className:e,...t},n)=>a.jsx("main",{ref:n,className:f("wu-relative wu-flex wu-w-full wu-flex-1 wu-flex-col","md:peer-data-[variant=inset]:wu-m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:wu-ml-2 md:peer-data-[variant=inset]:wu-ml-0 md:peer-data-[variant=inset]:wu-rounded-xl md:peer-data-[variant=inset]:wu-shadow",e),...t}));Pu.displayName="SidebarInset";const Hm=v.forwardRef(({className:e,...t},n)=>a.jsx(Ar,{ref:n,"data-sidebar":"input",className:f("wu-h-8 wu-w-full wu-shadow-none focus-visible:wu-ring-2",e),...t}));Hm.displayName="SidebarInput";const _u=v.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"header",className:f("wu-flex wu-flex-col wu-gap-2 wu-p-2",e),...t}));_u.displayName="SidebarHeader";const Fu=v.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"footer",className:f("wu-flex wu-flex-col wu-gap-2 wu-pb-2",e),...t}));Fu.displayName="SidebarFooter";const Um=v.forwardRef(({className:e,...t},n)=>a.jsx(Or,{ref:n,"data-sidebar":"separator",className:f("wu-mx-2 wu-w-auto",e),...t}));Um.displayName="SidebarSeparator";const Vu=v.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"content",className:f("wu-flex wu-min-h-0 wu-flex-1 wu-flex-col wu-gap-2 wu-overflow-auto group-data-[collapsible=icon]:wu-overflow-hidden",e),...t}));Vu.displayName="SidebarContent";const Lu=v.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"group",className:f("wu-relative wu-flex wu-w-full wu-min-w-0 wu-flex-col wu-p-2",e),...t}));Lu.displayName="SidebarGroup";const Ou=v.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const s=t?pt.Slot:"div";return a.jsx(s,{ref:r,"data-sidebar":"group-label",className:f("wu-flex wu-h-8 wu-shrink-0 wu-items-center wu-rounded-md wu-px-2 wu-text-xs wu-font-medium wu-outline-none wu-transition-[margin,opacity] wu-duration-150 wu-ease-linear focus-visible:wu-ring-2 [&>svg]:wu-size-4 [&>svg]:wu-shrink-0","group-data-[collapsible=icon]:wu-opacity-0",e),...n})});Ou.displayName="SidebarGroupLabel";const jm=v.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const s=t?pt.Slot:"button";return a.jsx(s,{ref:r,"data-sidebar":"group-action",className:f("wu-absolute wu-right-3 wu-top-3.5 wu-flex wu-aspect-square wu-w-5 wu-items-center wu-justify-center wu-rounded-md wu-p-0 wu-outline-none wu-transition-transform focus-visible:wu-ring-2 [&>svg]:wu-size-4 [&>svg]:wu-shrink-0","after:wu-absolute after:wu-inset-2 after:md:wu-hidden","group-data-[collapsible=icon]:wu-hidden",e),...n})});jm.displayName="SidebarGroupAction";const Wu=v.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"group-content",className:f("wu-w-full wu-text-sm",e),...t}));Wu.displayName="SidebarGroupContent";const js=v.forwardRef(({className:e,...t},n)=>a.jsx("ul",{ref:n,"data-sidebar":"menu",className:f("wu-flex wu-w-full wu-min-w-0 wu-flex-col wu-gap-1",e),...t}));js.displayName="SidebarMenu";const Bu=v.forwardRef(({className:e,...t},n)=>a.jsx("li",{ref:n,"data-sidebar":"menu-item",className:f("wu-group/menu-item wu-relative",e),...t}));Bu.displayName="SidebarMenuItem";const Gm=ke.cva("wu-peer/menu-button wu-flex wu-w-full wu-items-center wu-gap-2 wu-overflow-hidden wu-rounded-md wu-p-2 wu-text-left wu-text-sm wu-outline-none wu-transition-[width,height,padding] focus-visible:wu-ring-2 disabled:wu-pointer-events-none disabled:wu-opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:wu-pr-8 aria-disabled:wu-pointer-events-none aria-disabled:wu-opacity-50 data-[active=true]:wu-font-medium group-data-[collapsible=icon]:!wu-size-8 group-data-[collapsible=icon]:!wu-p-2 [&>span:last-child]:wu-truncate [&>svg]:wu-size-4 [&>svg]:wu-shrink-0",{variants:{variant:{default:"",outline:""},size:{default:"wu-h-8 wu-text-sm",sm:"wu-h-7 wu-text-xs",lg:"wu-h-12 wu-text-sm group-data-[collapsible=icon]:!wu-p-0"}},defaultVariants:{variant:"default",size:"default"}}),qu=v.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:s,className:o,...i},u)=>{const l=e?pt.Slot:"button",{isMobile:c,state:d}=lt(),w=a.jsx(l,{ref:u,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:f(Gm({variant:n,size:r}),o),...i});return s?(typeof s=="string"&&(s={children:s}),a.jsxs(Fa,{children:[a.jsx(Va,{asChild:!0,children:w}),a.jsx(kr,{side:"right",align:"center",hidden:d!=="collapsed"||c,...s})]})):w});qu.displayName="SidebarMenuButton";const Km=v.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},s)=>{const o=t?pt.Slot:"button";return a.jsx(o,{ref:s,"data-sidebar":"menu-action",className:f("wu-absolute wu-right-1 wu-top-1.5 wu-flex wu-aspect-square wu-w-5 wu-items-center wu-justify-center wu-rounded-md wu-p-0 wu-outline-none wu-transition-transform focus-visible:wu-ring-2 [&>svg]:wu-size-4 [&>svg]:wu-shrink-0","after:wu-absolute after:wu-inset-2 after:md:wu-hidden","peer-data-[size=sm]/menu-button:wu-top-1","peer-data-[size=default]/menu-button:wu-top-1.5","peer-data-[size=lg]/menu-button:wu-top-2.5","group-data-[collapsible=icon]:wu-hidden",n&&"group-focus-within/menu-item:wu-opacity-100 group-hover/menu-item:wu-opacity-100 data-[state=open]:wu-opacity-100 md:wu-opacity-0",e),...r})});Km.displayName="SidebarMenuAction";const Ym=v.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:f("wu-pointer-events-none wu-absolute wu-right-1 wu-flex wu-h-5 wu-min-w-5 wu-select-none wu-items-center wu-justify-center wu-rounded-md wu-px-1 wu-text-xs wu-font-medium wu-tabular-nums","","peer-data-[size=sm]/menu-button:wu-top-1","peer-data-[size=default]/menu-button:wu-top-1.5","peer-data-[size=lg]/menu-button:wu-top-2.5","group-data-[collapsible=icon]:wu-hidden",e),...t}));Ym.displayName="SidebarMenuBadge";const Xm=v.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{const s=v.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return a.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:f("wu-flex wu-h-8 wu-items-center wu-gap-2 wu-rounded-md wu-px-2",e),...n,children:[t&&a.jsx(Eu,{className:"wu-rounded-md wu-size-4","data-sidebar":"menu-skeleton-icon"}),a.jsx(Eu,{className:"wu-h-4 wu-max-w-[--skeleton-width] wu-flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})});Xm.displayName="SidebarMenuSkeleton";const Zm=v.forwardRef(({className:e,...t},n)=>a.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:f("wu-mx-3.5 wu-flex wu-min-w-0 wu-translate-x-px wu-flex-col wu-gap-1 wu-border-l wu-px-2.5 wu-py-0.5","group-data-[collapsible=icon]:wu-hidden",e),...t}));Zm.displayName="SidebarMenuSub";const Jm=v.forwardRef(({...e},t)=>a.jsx("li",{ref:t,...e}));Jm.displayName="SidebarMenuSubItem";const Qm=v.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:r,...s},o)=>{const i=e?pt.Slot:"a";return a.jsx(i,{ref:o,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:f("wu-flex wu-h-7 wu-min-w-0 wu-translate-x-px wu-items-center wu-gap-2 wu-overflow-hidden wu-rounded-md wu-px-2 wu-outline-none focus-visible:wu-ring-2 disabled:wu-pointer-events-none disabled:wu-opacity-50 aria-disabled:wu-pointer-events-none aria-disabled:wu-opacity-50 [&>span:last-child]:wu-truncate [&>svg]:wu-size-4 [&>svg]:wu-shrink-0","data-[active=true]:wu-bg-sidebar-accent data-[active=true]:wu-text-sidebar-accent-foreground",t==="sm"&&"wu-text-xs",t==="md"&&"wu-text-sm","group-data-[collapsible=icon]:wu-hidden",r),...s})});Qm.displayName="SidebarMenuSubButton";const Rm=({children:e,Sidebar:t,className:n,defaultOpen:r=!0,open:s,onOpenChange:o,style:i})=>a.jsxs(Iu,{defaultOpen:r,open:s,onOpenChange:o,children:[a.jsxs(Mu,{variant:"sidebar",collapsible:"icon",className:f("wu-top-12 wu-h-[calc(100%-48px)] wu-shadow-sidebar wu-border-none",n),style:i,role:"complementary",children:[a.jsx(_u,{className:"wu-py-2",children:a.jsx(zu,{})}),t]}),a.jsx(Pu,{className:"wu-contain-inline-size",children:e})]}),zu=e=>{const{state:t,isMobile:n,openMobile:r}=lt();return a.jsx(Du,{...e,children:a.jsx($s,{showMenu:n?r:t==="expanded"})})},eg=({className:e,children:t,...n})=>{const r=p.useRef(null),s=p.useRef(null),o=({currentTarget:u})=>{const{scrollTop:l,clientHeight:c,scrollHeight:d}=u;r.current&&r.current.classList.toggle("wu-border-[#1b338014]",l!==0),s.current&&s.current.classList.toggle("wu-border-[#1b338014]",l+c!==d)},i="wu-w-[calc(100%-16px)] wu-mx-auto wu-border-transparent";return a.jsxs(Vu,{...n,className:f("wu-overflow-hidden wu-gap-0",e),children:[a.jsx("hr",{className:i,ref:r}),a.jsx(Dt,{onScroll:o,className:"wu-gap-2",thumbColor:"#b9c3dc",railColor:"#00000000","data-testid":"scroll-area",children:t}),a.jsx("hr",{className:i,ref:s})]})},tg=e=>a.jsx(Fu,{...e,children:e.children}),ng=({label:e,children:t,...n})=>a.jsxs(Lu,{...n,className:"wu-p-0",children:[a.jsx("div",{className:"wu-h-8",children:a.jsx(Ou,{className:"wu-items-end wu-px-4 wu-text-xs wu-font-normal wu-leading-4 wu-text-blue-q",children:e})}),a.jsx(Wu,{children:a.jsx(js,{children:t})})]}),rg=e=>a.jsx(js,{...e}),sg=({Icon:e,children:t,className:n,isActive:r,...s})=>{const{state:o}=lt(),[i,u]=p.useState(),l=Au(),c=t&&p.cloneElement(t,{children:a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2 wu-overflow-hidden wu-text-base wu-truncate wu-text-ellipsis",children:[e,a.jsx("span",{className:f("wu-text-sm wu-leading-4 wu-transition-opacity wu-duration-150",o==="collapsed"&&!l&&"wu-opacity-0"),children:t.props.children})]})}),d=p.useRef(null);return p.useEffect(()=>{var w;u(((w=d.current)==null?void 0:w.textContent)||"")},[]),a.jsx(Bu,{...s,className:"wu-flex wu-items-center wu-gap-2 wu-px-2",children:a.jsx(qu,{className:f("wu-flex wu-items-center wu-text-blue-q hover:wu-bg-blue-sidebarHover wu-cursor-pointer wu-h-8 wu-rounded-sm",n,r&&"wu-bg-white wu-shadow-[4px_4px_16px_0_#1B338014] wu-font-medium wu-text-blue-p hover:wu-bg-white wu-cursor-default"),isActive:r,tooltip:i,asChild:!0,ref:d,children:c})})},ag=new Map([[-3,{top:-20,left:-4,zIndex:-1,opacity:0,transition:"all 0.3s ease-in-out, z-index 0s",position:"absolute"}],[-2,{top:0,left:0,zIndex:1,opacity:1,transition:"all 0.3s ease-in-out, z-index 0s",position:"absolute"}],[-1,{top:20,left:4,zIndex:2,opacity:1,transition:"all 0.3s ease-in-out, z-index 0s",position:"absolute"}],[0,{top:40,left:8,zIndex:3,opacity:1,transition:"all 0.3s ease-in-out, z-index 0.10s",position:"absolute"}],[1,{left:12,zIndex:4,opacity:1,transition:"all 0.3s ease-in-out, z-index 0.3s 0.10s",position:"absolute"}],[2,{left:16,zIndex:5,opacity:1,transition:"all 0.3s ease-in-out, z-index 0.3s 0.10s",position:"absolute"}],[3,{left:20,zIndex:-1,opacity:0,transition:"all 0.3s ease-in-out, z-index 0.3s 0.10s",position:"absolute"}]]),Gs=(e,t,n=1)=>{const r=e.match(/hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*([\d.]+)\s*)?\)/);if(!r)throw new Error("Invalid HSL color format");const s=parseFloat(r[1]),o=parseFloat(r[2]),i=Math.max(0,parseFloat(r[3])+t);return`hsl(${s} ${o}% ${i}% / ${n})`},og=({index:e,viewIndex:t,length:n,itemHeight:r})=>{const s=(e-t+n)%n;let o;s===0?o=0:s===n-1&&n>=2?o=-1:s===n-2&&n>=3?o=-2:s===1?o=1:s===2?o=2:s===n-3&&n>=4?o=-3:o=3;const i=ag.get(o)||{},u=o>0?r+28+(o-1)*20:i.top;return{position:o,styles:{...i,...o>0&&{top:`${u}px`},height:o>0?"32px":r}}},un={LIGHTNESS_STEP:8,BORDER_LIGHTNESS:10,CONTENT_HEIGHT:"calc(100% - 2rem)",FONT_SIZE_ACTIVE:"14px",FONT_SIZE_INACTIVE:"12px"},ig=({children:e,className:t,header:n,baseColor:r,position:s=0,style:o,...i})=>{const u=s<=0,l=s===0,c={border:l?`4px solid ${Gs(r,un.BORDER_LIGHTNESS)}`:"",...o},d={backgroundColor:Gs(r,s*un.LIGHTNESS_STEP),fontSize:l?un.FONT_SIZE_ACTIVE:un.FONT_SIZE_INACTIVE,transition:"all 0.3s ease",position:"relative",bottom:s<0?"4px":"0px",height:"32px",padding:"4px 8px"},w={backgroundColor:Gs(r,45+s*6),height:un.CONTENT_HEIGHT,position:"relative",bottom:s<0?"4px":"0px"};return a.jsxs("div",{className:f("wu-font-normal wu-transition-all wu-rounded-lg wu-overflow-hidden wu-w-full wu-cursor-pointer hover:-wu-translate-y-2",t),style:c,...i,children:[a.jsx("div",{style:d,className:"wu-text-white",children:n}),u&&a.jsx("div",{className:"wu-p-2 wu-overflow-y-auto wu-text-sm",style:w,children:e})]})},ug=({children:e,Trigger:t,Header:n,styles:r={},classNames:s={},open:o,onOpenChange:i,itemHeight:u})=>{const l={height:u,...r.Trigger};return a.jsxs(to,{open:o,onOpenChange:i,children:[a.jsx(no,{className:f("wu-bg-gray-25 wu-z-0 wu-w-full wu-rounded-lg wu-rounded-tl-none wu-relative",s.Trigger),style:l,children:a.jsx("span",{className:"wu-absolute wu-text-xs wu-font-medium wu-bg-gray-25 -wu-top-6 wu-left-0 wu-p-1 wu-rounded-t-lg",children:t})}),a.jsxs(Br,{className:f("wu-top-[50%] wu-left-[50%] wu-bg-black/75 wu-backdrop-blur-[4px] wu-min-h-full wu-overflow-auto wu-shadow-none wu-max-w-none wu-border-none wu-text-white",s.Content),hideCloseButton:!0,isStackedCard:!0,style:r.Content,children:[a.jsx(Zt,{}),a.jsx(pr.DialogClose,{className:f("wu-absolute wu-right-2 wu-top-2 wu-w-8 wu-h-8 wu-flex wu-items-center wu-justify-center wu-z-10",s.CloseButton),style:r.CloseButton,"aria-label":"Close dialog",children:a.jsx(R,{icon:"wm-close",className:"wu-text-lg wu-m-4 wu-cursor-pointer"})}),n&&a.jsx(qr,{className:f("wu-h-12 wu-p-2 wu-pl-4 wu-bg-white/25 wu-backdrop-blur-[24px]",s.Header),style:r.Header,children:n}),e]})]})};function lg({controlled:e,default:t,name:n,state:r="value"}){const{current:s}=v.useRef(e!==void 0),[o,i]=v.useState(t),u=s?e:o;if(process.env.NODE_ENV!=="production"){v.useEffect(()=>{s!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${s?"":"un"}controlled ${r} state of ${n} to be ${s?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
15
|
+
`),()=>{x.contains(g)&&x.removeChild(g)}},[t]),a.jsx(Cp,{isPresent:t,childRef:o,sizeRef:i,children:v.cloneElement(e,{ref:l})})}const Tp=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:o,mode:i,anchorX:u,root:l})=>{const c=Ur(Ep),d=p.useId();let w=!0,h=p.useMemo(()=>(w=!1,{id:d,initial:t,isPresent:n,custom:s,onExitComplete:m=>{c.set(m,!0);for(const b of c.values())if(!b)return;r&&r()},register:m=>(c.set(m,!1),()=>c.delete(m))}),[n,c,r]);return o&&w&&(h={...h}),p.useMemo(()=>{c.forEach((m,b)=>c.set(b,!1))},[n]),v.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),i==="popLayout"&&(e=a.jsx(Sp,{isPresent:n,anchorX:u,root:l,children:e})),a.jsx(Pn.Provider,{value:h,children:e})};function Ep(){return new Map}function Ap(e=!0){const t=p.useContext(Pn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=p.useId();p.useEffect(()=>{if(e)return s(o)},[e]);const i=p.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,i]:[!0]}const Hn=e=>e.key||"";function Ii(e){const t=[];return p.Children.forEach(e,n=>{p.isValidElement(n)&&t.push(n)}),t}const Mi=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:o="sync",propagate:i=!1,anchorX:u="left",root:l})=>{const[c,d]=Ap(i),w=p.useMemo(()=>Ii(e),[e]),h=i&&!c?[]:w.map(Hn),m=p.useRef(!0),b=p.useRef(w),g=Ur(()=>new Map),[x,C]=p.useState(w),[y,N]=p.useState(w);ho(()=>{m.current=!1,b.current=w;for(let I=0;I<y.length;I++){const A=Hn(y[I]);h.includes(A)?g.delete(A):g.get(A)!==!0&&g.set(A,!1)}},[y,h.length,h.join("-")]);const S=[];if(w!==x){let I=[...w];for(let A=0;A<y.length;A++){const k=y[A],D=Hn(k);h.includes(D)||(I.splice(A,0,k),S.push(k))}return o==="wait"&&S.length&&(I=S),N(Ii(I)),C(w),null}process.env.NODE_ENV!=="production"&&o==="wait"&&y.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:E}=p.useContext(po);return a.jsx(a.Fragment,{children:y.map(I=>{const A=Hn(I),k=i&&!c?!1:w===y||h.includes(A),D=()=>{if(g.has(A))g.set(A,!0);else return;let _=!0;g.forEach(F=>{F||(_=!1)}),_&&(E==null||E(),N(b.current),i&&(d==null||d()),r&&r())};return a.jsx(Tp,{isPresent:k,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:l,onExitComplete:k?void 0:D,anchorX:u,children:I},A)})})},Es=p.createContext({strict:!1}),Di={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},kt={};for(const e in Di)kt[e]={isEnabled:t=>Di[e].some(n=>!!t[n])};function Pi(e){for(const t in e)kt[t]={...kt[t],...e[t]}}function _i({children:e,features:t,strict:n=!1}){const[,r]=p.useState(!As(t)),s=p.useRef(void 0);if(!As(t)){const{renderer:o,...i}=t;s.current=o,Pi(i)}return p.useEffect(()=>{As(t)&&t().then(({renderer:o,...i})=>{Pi(i),s.current=o,r(!0)})},[]),a.jsx(Es.Provider,{value:{renderer:s.current,strict:n},children:e})}function As(e){return typeof e=="function"}const kp=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Un(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||kp.has(e)}let Fi=e=>!Un(e);function Ip(e){typeof e=="function"&&(Fi=t=>t.startsWith("on")?!Un(t):e(t))}try{Ip(require("@emotion/is-prop-valid").default)}catch{}function Mp(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(Fi(s)||n===!0&&Un(s)||!t&&!Un(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const jn=p.createContext({});function Gn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function an(e){return typeof e=="string"||Array.isArray(e)}const ks=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Is=["initial",...ks];function Kn(e){return Gn(e.animate)||Is.some(t=>an(e[t]))}function Vi(e){return!!(Kn(e)||e.variants)}function Dp(e,t){if(Kn(e)){const{initial:n,animate:r}=e;return{initial:n===!1||an(n)?n:void 0,animate:an(r)?r:void 0}}return e.inherit!==!1?t:{}}function Pp(e){const{initial:t,animate:n}=Dp(e,p.useContext(jn));return p.useMemo(()=>({initial:t,animate:n}),[Li(t),Li(n)])}function Li(e){return Array.isArray(e)?e.join(" "):e}function Oi(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const on={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(L.test(e))e=parseFloat(e);else return e;const n=Oi(e,t.target.x),r=Oi(e,t.target.y);return`${n}% ${r}%`}},_p={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Ze.parse(e);if(s.length>5)return r;const o=Ze.createTransformer(e),i=typeof s[0]!="number"?1:0,u=n.x.scale*t.x,l=n.y.scale*t.y;s[0+i]/=u,s[1+i]/=l;const c=rn(u,l,.5);return typeof s[2+i]=="number"&&(s[2+i]/=c),typeof s[3+i]=="number"&&(s[3+i]/=c),o(s)}},Fp={borderRadius:{...on,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:on,borderTopRightRadius:on,borderBottomLeftRadius:on,borderBottomRightRadius:on,boxShadow:_p};function Wi(e,{layout:t,layoutId:n}){return At.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Fp[e]||e==="opacity")}const Vp={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Lp=Et.length;function Op(e,t,n){let r="",s=!0;for(let o=0;o<Lp;o++){const i=Et[o],u=e[i];if(u===void 0)continue;let l=!0;if(typeof u=="number"?l=u===(i.startsWith("scale")?1:0):l=parseFloat(u)===0,!l||n){const c=xi(u,Cs[i]);if(!l){s=!1;const d=Vp[i]||i;r+=`${d}(${c}) `}n&&(t[i]=c)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function Ms(e,t,n){const{style:r,vars:s,transformOrigin:o}=e;let i=!1,u=!1;for(const l in t){const c=t[l];if(At.has(l)){i=!0;continue}else if(Lo(l)){s[l]=c;continue}else{const d=xi(c,Cs[l]);l.startsWith("origin")?(u=!0,o[l]=d):r[l]=d}}if(t.transform||(i||n?r.transform=Op(t,e.transform,n):r.transform&&(r.transform="none")),u){const{originX:l="50%",originY:c="50%",originZ:d=0}=o;r.transformOrigin=`${l} ${c} ${d}`}}const Ds=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Bi(e,t,n){for(const r in t)!ge(t[r])&&!Wi(r,n)&&(e[r]=t[r])}function Wp({transformTemplate:e},t){return p.useMemo(()=>{const n=Ds();return Ms(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Bp(e,t){const n=e.style||{},r={};return Bi(r,n,e),Object.assign(r,Wp(e,t)),r}function qp(e,t){const n={},r=Bp(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const zp={offset:"stroke-dashoffset",array:"stroke-dasharray"},$p={offset:"strokeDashoffset",array:"strokeDasharray"};function Hp(e,t,n=1,r=0,s=!0){e.pathLength=1;const o=s?zp:$p;e[o.offset]=L.transform(-r);const i=L.transform(t),u=L.transform(n);e[o.array]=`${i} ${u}`}function qi(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:o=1,pathOffset:i=0,...u},l,c,d){if(Ms(e,u,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:w,style:h}=e;w.transform&&(h.transform=w.transform,delete w.transform),(h.transform||w.transformOrigin)&&(h.transformOrigin=w.transformOrigin??"50% 50%",delete w.transformOrigin),h.transform&&(h.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete w.transformBox),t!==void 0&&(w.x=t),n!==void 0&&(w.y=n),r!==void 0&&(w.scale=r),s!==void 0&&Hp(w,s,o,i,!1)}const zi=()=>({...Ds(),attrs:{}}),$i=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Up(e,t,n,r){const s=p.useMemo(()=>{const o=zi();return qi(o,t,$i(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Bi(o,e.style,e),s.style={...o,...s.style}}return s}const jp=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ps(e){return typeof e!="string"||e.includes("-")?!1:!!(jp.indexOf(e)>-1||/[A-Z]/u.test(e))}function Gp(e,t,n,{latestValues:r},s,o=!1){const u=(Ps(e)?Up:qp)(t,r,s,e),l=Mp(t,typeof e=="string",o),c=e!==p.Fragment?{...l,...u,ref:n}:{},{children:d}=t,w=p.useMemo(()=>ge(d)?d.get():d,[d]);return p.createElement(e,{...c,children:w})}function Hi(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function _s(e,t,n,r){if(typeof t=="function"){const[s,o]=Hi(r);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=Hi(r);t=t(n!==void 0?n:e.custom,s,o)}return t}function Kp(e){return ge(e)?e.get():e}function Yp({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:Xp(n,r,s,e),renderState:t()}}function Xp(e,t,n,r){const s={},o=r(e,{});for(const h in o)s[h]=Kp(o[h]);let{initial:i,animate:u}=e;const l=Kn(e),c=Vi(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),u===void 0&&(u=t.animate));let d=n?n.initial===!1:!1;d=d||i===!1;const w=d?u:i;if(w&&typeof w!="boolean"&&!Gn(w)){const h=Array.isArray(w)?w:[w];for(let m=0;m<h.length;m++){const b=_s(e,h[m]);if(b){const{transitionEnd:g,transition:x,...C}=b;for(const y in C){let N=C[y];if(Array.isArray(N)){const S=d?N.length-1:0;N=N[S]}N!==null&&(s[y]=N)}for(const y in g)s[y]=g[y]}}}return s}const Ui=e=>(t,n)=>{const r=p.useContext(jn),s=p.useContext(Pn),o=()=>Yp(e,t,r,s);return n?o():Ur(o)};function Fs(e,t,n){var o;const{style:r}=e,s={};for(const i in r)(ge(r[i])||t.style&&ge(t.style[i])||Wi(i,e)||((o=n==null?void 0:n.getValue(i))==null?void 0:o.liveStyle)!==void 0)&&(s[i]=r[i]);return s}const Zp=Ui({scrapeMotionValuesFromProps:Fs,createRenderState:Ds});function ji(e,t,n){const r=Fs(e,t,n);for(const s in e)if(ge(e[s])||ge(t[s])){const o=Et.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[o]=e[s]}return r}const Jp=Ui({scrapeMotionValuesFromProps:ji,createRenderState:zi}),Qp=Symbol.for("motionComponentSymbol");function Gi(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Rp(e,t,n){return p.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Gi(n)&&(n.current=r))},[t])}const Vs=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ki="data-"+Vs("framerAppearId"),eh=p.createContext({});function th(e,t,n,r,s){var g,x;const{visualElement:o}=p.useContext(jn),i=p.useContext(Es),u=p.useContext(Pn),l=p.useContext(Ts).reducedMotion,c=p.useRef(null);r=r||i.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:o,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:l}));const d=c.current,w=p.useContext(eh);d&&!d.projection&&s&&(d.type==="html"||d.type==="svg")&&nh(c.current,n,s,w);const h=p.useRef(!1);p.useInsertionEffect(()=>{d&&h.current&&d.update(n,u)});const m=n[Ki],b=p.useRef(!!m&&!((g=window.MotionHandoffIsComplete)!=null&&g.call(window,m))&&((x=window.MotionHasOptimisedAnimation)==null?void 0:x.call(window,m)));return ho(()=>{d&&(h.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),b.current&&d.animationState&&d.animationState.animateChanges())}),p.useEffect(()=>{d&&(!b.current&&d.animationState&&d.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var C;(C=window.MotionHandoffMarkAsComplete)==null||C.call(window,m)}),b.current=!1),d.enteringChildren=void 0)}),d}function nh(e,t,n,r){const{layoutId:s,layout:o,drag:i,dragConstraints:u,layoutScroll:l,layoutRoot:c,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Yi(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!i||u&&Gi(u),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:c})}function Yi(e){if(e)return e.options.allowProjection!==!1?e.projection:Yi(e.parent)}function rh(e,{forwardMotionProps:t=!1}={},n,r){const s=Ps(e)?Jp:Zp;function o(u,l){let c;const d={...p.useContext(Ts),...u,layoutId:sh(u)},{isStatic:w}=d,h=Pp(u),m=s(u,w);if(!w&&jr){ah(d,n);const b=oh(d);c=b.MeasureLayout,h.visualElement=th(e,m,d,r,b.ProjectionNode)}return a.jsxs(jn.Provider,{value:h,children:[c&&h.visualElement?a.jsx(c,{visualElement:h.visualElement,...d}):null,Gp(e,u,Rp(m,h.visualElement,l),m,w,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const i=p.forwardRef(o);return i[Qp]=e,i}function sh({layoutId:e}){const t=p.useContext(po).id;return t&&e!==void 0?t+"-"+e:e}function ah(e,t){p.useContext(Es).strict,process.env.NODE_ENV}function oh(e){const{drag:t,layout:n}=kt;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function ih({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function uh(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function lh(e,t){return ih(uh(e.getBoundingClientRect(),t))}const Xi=()=>({min:0,max:0}),Zi=()=>({x:Xi(),y:Xi()}),Ls={current:null},Ji={current:!1};function ch(){if(Ji.current=!0,!!jr)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ls.current=e.matches;e.addEventListener("change",t),t()}else Ls.current=!1}const dh=new WeakMap;function wh(e,t,n){for(const r in t){const s=t[r],o=n[r];if(ge(s))e.addValue(r,s);else if(ge(o))e.addValue(r,zn(s,{owner:e}));else if(o!==s)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(s):i.hasAnimated||i.set(s)}else{const i=e.getStaticValue(r);e.addValue(r,zn(i!==void 0?i:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Qi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class fh{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:o,visualState:i},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=xs,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=Ae.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,_e.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=u,this.blockInitialAnimation=!!o,this.isControllingVariants=Kn(n),this.isVariantNode=Vi(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...w}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in w){const m=w[h];l[h]!==void 0&&ge(m)&&m.set(l[h])}}mount(t){var n;this.current=t,dh.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,s)=>this.bindToMotionValue(s,r)),Ji.current||ch(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ls.current,process.env.NODE_ENV!=="production"&&No(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),Zr(this.notifyUpdate),Zr(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=At.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&_e.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in kt){const n=kt[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Zi()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Qi.length;r++){const s=Qi[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,i=t[o];i&&(this.propEventSubscriptions[s]=this.on(s,i))}this.prevMotionValues=wh(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=zn(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(mo(r)||go(r))?r=parseFloat(r):!xp(r)&&Ze.test(n)&&(r=yi(t,n)),this.setBaseTarget(t,ge(r)?r.get():r)),ge(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=_s(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!ge(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new yo),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){cp.render(this.render)}}class Ri extends fh{constructor(){super(...arguments),this.KeyframeResolver=op}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ge(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function eu(e,{style:t,vars:n},r,s){const o=e.style;let i;for(i in t)o[i]=t[i];s==null||s.applyProjectionStyles(o,r);for(i in n)o.setProperty(i,n[i])}function ph(e){return window.getComputedStyle(e)}class hh extends Ri{constructor(){super(...arguments),this.type="html",this.renderInstance=eu}readValueFromInstance(t,n){var r;if(At.has(n))return(r=this.projection)!=null&&r.isProjecting?hs(n):Tf(t,n);{const s=ph(t),o=(Lo(n)?s.getPropertyValue(n):s[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return lh(t,n)}build(t,n,r){Ms(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Fs(t,n,r)}}const tu=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function mh(e,t,n,r){eu(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(tu.has(s)?s:Vs(s),t.attrs[s])}class gh extends Ri{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Zi}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(At.has(n)){const r=bi(n);return r&&r.default||0}return n=tu.has(n)?n:Vs(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return ji(t,n,r)}build(t,n,r){qi(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){mh(t,n,r,s)}mount(t){this.isSVGTag=$i(t.tagName),super.mount(t)}}const bh=(e,t)=>Ps(e)?new gh(t):new hh(t,{allowProjection:e!==p.Fragment});function It(e,t,n){const r=e.getProps();return _s(r,t,n!==void 0?n:r.custom,e)}const Os=e=>Array.isArray(e);function yh(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,zn(n))}function xh(e){return Os(e)?e[e.length-1]||0:e}function vh(e,t){const n=It(e,t);let{transitionEnd:r={},transition:s={},...o}=n||{};o={...o,...r};for(const i in o){const u=xh(o[i]);yh(e,i,u)}}function Nh(e){return!!(ge(e)&&e.add)}function Ch(e,t){const n=e.getValue("willChange");if(Nh(n))return n.add(t);if(!n&&Ge.WillChange){const r=new Ge.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Sh(e){return e.props[Ki]}const Th=e=>e!==null;function Eh(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(Th),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return s[o]}const Ah={type:"spring",stiffness:500,damping:25,restSpeed:10},kh=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Ih={type:"keyframes",duration:.8},Mh={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Dh=(e,{keyframes:t})=>t.length>2?Ih:At.has(e)?e.startsWith("scale")?kh(t[1]):Ah:Mh;function Ph({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:o,repeatType:i,repeatDelay:u,from:l,elapsed:c,...d}){return!!Object.keys(d).length}const _h=(e,t,n,r={},s,o)=>i=>{const u=wi(r,e)||{},l=u.delay||r.delay||0;let{elapsed:c=0}=r;c=c-$e(l);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-c,onUpdate:h=>{t.set(h),u.onUpdate&&u.onUpdate(h)},onComplete:()=>{i(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:o?void 0:s};Ph(u)||Object.assign(d,Dh(e,d)),d.duration&&(d.duration=$e(d.duration)),d.repeatDelay&&(d.repeatDelay=$e(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let w=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(vs(d),d.delay===0&&(w=!0)),(Ge.instantAnimations||Ge.skipAnimations)&&(w=!0,vs(d),d.delay=0),d.allowFlatten=!u.type&&!u.ease,w&&!o&&t.get()!==void 0){const h=Eh(d.keyframes,u);if(h!==void 0){_e.update(()=>{d.onUpdate(h),d.onComplete()});return}}return u.isSync?new ws(d):new Yf(d)};function Fh({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function nu(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:i,...u}=t;r&&(o=r);const l=[],c=s&&e.animationState&&e.animationState.getState()[s];for(const d in u){const w=e.getValue(d,e.latestValues[d]??null),h=u[d];if(h===void 0||c&&Fh(c,d))continue;const m={delay:n,...wi(o||{},d)},b=w.get();if(b!==void 0&&!w.isAnimating&&!Array.isArray(h)&&h===b&&!m.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const C=Sh(e);if(C){const y=window.MotionHandoffAnimation(C,d,_e);y!==null&&(m.startTime=y,g=!0)}}Ch(e,d),w.start(_h(d,w,h,e.shouldReduceMotion&&fi.has(d)?{type:!1}:m,e,g));const x=w.animation;x&&l.push(x)}return i&&Promise.all(l).then(()=>{_e.update(()=>{i&&vh(e,i)})}),l}function ru(e,t,n,r=0,s=1){const o=Array.from(e).sort((c,d)=>c.sortNodePosition(d)).indexOf(t),i=e.size,u=(i-1)*r;return typeof n=="function"?n(o,i):s===1?o*r:u-o*r}function Ws(e,t,n={}){var l;const r=It(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const o=r?()=>Promise.all(nu(e,r,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:w,staggerDirection:h}=s;return Vh(e,t,c,d,w,h,n)}:()=>Promise.resolve(),{when:u}=s;if(u){const[c,d]=u==="beforeChildren"?[o,i]:[i,o];return c().then(()=>d())}else return Promise.all([o(),i(n.delay)])}function Vh(e,t,n=0,r=0,s=0,o=1,i){const u=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),u.push(Ws(l,t,{...i,delay:n+(typeof r=="function"?0:r)+ru(e.variantChildren,l,r,s,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(u)}function Lh(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(o=>Ws(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=Ws(e,t,n);else{const s=typeof t=="function"?It(e,t,n.custom):t;r=Promise.all(nu(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function su(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Oh=Is.length;function au(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?au(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Oh;n++){const r=Is[n],s=e.props[r];(an(s)||s===!1)&&(t[r]=s)}return t}const Wh=[...ks].reverse(),Bh=ks.length;function qh(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Lh(e,n,r)))}function zh(e){let t=qh(e),n=ou(),r=!0;const s=l=>(c,d)=>{var h;const w=It(e,d,l==="exit"?(h=e.presenceContext)==null?void 0:h.custom:void 0);if(w){const{transition:m,transitionEnd:b,...g}=w;c={...c,...g,...b}}return c};function o(l){t=l(e)}function i(l){const{props:c}=e,d=au(e.parent)||{},w=[],h=new Set;let m={},b=1/0;for(let x=0;x<Bh;x++){const C=Wh[x],y=n[C],N=c[C]!==void 0?c[C]:d[C],S=an(N),E=C===l?y.isActive:null;E===!1&&(b=x);let I=N===d[C]&&N!==c[C]&&S;if(I&&r&&e.manuallyAnimateOnMount&&(I=!1),y.protectedKeys={...m},!y.isActive&&E===null||!N&&!y.prevProp||Gn(N)||typeof N=="boolean")continue;const A=$h(y.prevProp,N);let k=A||C===l&&y.isActive&&!I&&S||x>b&&S,D=!1;const _=Array.isArray(N)?N:[N];let F=_.reduce(s(C),{});E===!1&&(F={});const{prevResolvedValues:$={}}=y,O={...$,...F},G=M=>{k=!0,h.has(M)&&(D=!0,h.delete(M)),y.needsAnimating[M]=!0;const V=e.getValue(M);V&&(V.liveStyle=!1)};for(const M in O){const V=F[M],q=$[M];if(m.hasOwnProperty(M))continue;let B=!1;Os(V)&&Os(q)?B=!su(V,q):B=V!==q,B?V!=null?G(M):h.add(M):V!==void 0&&h.has(M)?G(M):y.protectedKeys[M]=!0}y.prevProp=N,y.prevResolvedValues=F,y.isActive&&(m={...m,...F}),r&&e.blockInitialAnimation&&(k=!1);const z=I&&A;k&&(!z||D)&&w.push(..._.map(M=>{const V={type:C};if(typeof M=="string"&&r&&!z&&e.manuallyAnimateOnMount&&e.parent){const{parent:q}=e,B=It(q,M);if(q.enteringChildren&&B){const{delayChildren:re}=B.transition||{};V.delay=ru(q.enteringChildren,e,re)}}return{animation:M,options:V}}))}if(h.size){const x={};if(typeof c.initial!="boolean"){const C=It(e,Array.isArray(c.initial)?c.initial[0]:c.initial);C&&C.transition&&(x.transition=C.transition)}h.forEach(C=>{const y=e.getBaseTarget(C),N=e.getValue(C);N&&(N.liveStyle=!0),x[C]=y??null}),w.push({animation:x})}let g=!!w.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(w):Promise.resolve()}function u(l,c){var w;if(n[l].isActive===c)return Promise.resolve();(w=e.variantChildren)==null||w.forEach(h=>{var m;return(m=h.animationState)==null?void 0:m.setActive(l,c)}),n[l].isActive=c;const d=i(l);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:i,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=ou()}}}function $h(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!su(t,e):!1}function ut(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ou(){return{animate:ut(!0),whileInView:ut(),whileHover:ut(),whileTap:ut(),whileDrag:ut(),whileFocus:ut(),exit:ut()}}class Mt{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Hh extends Mt{constructor(t){super(t),t.animationState||(t.animationState=zh(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Gn(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let Uh=0;class jh extends Mt{constructor(){super(...arguments),this.id=Uh++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Gh={animation:{Feature:Hh},exit:{Feature:jh}};function iu(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function uu(e){return{point:{x:e.pageX,y:e.pageY}}}function lu(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=r[s];o&&_e.postRender(()=>o(t,uu(t)))}class Kh extends Mt{mount(){const{current:t}=this.node;t&&(this.unmount=fp(t,(n,r)=>(lu(this.node,r,"Start"),s=>lu(this.node,s,"End"))))}unmount(){}}class Yh extends Mt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=_n(iu(this.node.current,"focus",()=>this.onFocus()),iu(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function cu(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=r[s];o&&_e.postRender(()=>o(t,uu(t)))}class Xh extends Mt{mount(){const{current:t}=this.node;t&&(this.unmount=bp(t,(n,r)=>(cu(this.node,r,"Start"),(s,{success:o})=>cu(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Bs=new WeakMap,qs=new WeakMap,Zh=e=>{const t=Bs.get(e.target);t&&t(e)},Jh=e=>{e.forEach(Zh)};function Qh({root:e,...t}){const n=e||document;qs.has(n)||qs.set(n,{});const r=qs.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(Jh,{root:e,...t})),r[s]}function Rh(e,t,n){const r=Qh(t);return Bs.set(e,n),r.observe(e),()=>{Bs.delete(e),r.unobserve(e)}}const em={some:0,all:1};class tm extends Mt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:o}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:em[s]},u=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:d,onViewportLeave:w}=this.node.getProps(),h=c?d:w;h&&h(l)};return Rh(this.node.current,i,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(nm(t,n))&&this.startObserver()}unmount(){}}function nm({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const du={renderer:bh,...Gh,...{inView:{Feature:tm},tap:{Feature:Xh},focus:{Feature:Yh},hover:{Feature:Kh}}};function rm(e,t){return rh(e,t)}const wu=rm("div"),sm=e=>{const{checked:t,onSelect:n,children:r,disabled:s,preventCloseOnSelect:o}=e;return a.jsx(Za,{disabled:s,checked:t,onCheckedChange:n,onSelect:i=>o&&i.preventDefault(),children:r})},Yn=e=>{const{children:t,className:n,Icon:r,iconPosition:s="left",disabled:o,onSelect:i,preventCloseOnSelect:u}=e,l=f("wu-flex wu-items-center wu-gap-2",r&&(s==="left"?"":"wu-justify-between wu-flex-row-reverse"),n),c=d=>{i&&i(d),u&&d.preventDefault()};return a.jsxs(Yt,{onSelect:c,disabled:o,className:l,children:[r&&a.jsx("div",{className:"wu-text-base",children:r}),t]})},am=e=>{const{children:t,Label:n,...r}=e;return a.jsxs(Ka,{...r,children:[a.jsx(Xt,{children:n||e.label}),t]})},om=e=>{const{options:t,value:n,onSelect:r}=e;return a.jsx(Td,{value:n,onValueChange:r,children:t.map(s=>a.jsx(Ja,{value:s.value,disabled:s.disabled,children:s.Label||s.label},s.value))})},im=e=>{const{className:t,...n}=e,r=f("wu-w-11/12 wu-mx-auto wu-border-gray-40",t);return a.jsx(kn,{...n,className:r})},Dt=v.forwardRef(({className:e,children:t,thumbColor:n,railColor:r,...s},o)=>a.jsxs(Re.Root,{ref:o,className:f("wu-relative wu-overflow-hidden",e),children:[a.jsx(Re.Viewport,{className:"wu-h-full wu-w-full wu-rounded-[inherit]",...s,children:t}),a.jsx(zs,{thumbColor:n,railColor:r}),a.jsx(Re.Corner,{})]}));Dt.displayName=Re.Root.displayName;const zs=v.forwardRef(({className:e,orientation:t="vertical",thumbColor:n="#d4d4d4",railColor:r="#eeeeee",...s},o)=>a.jsx(Re.ScrollAreaScrollbar,{ref:o,orientation:t,className:f("wu-flex wu-touch-none wu-select-none wu-transition-colors",t==="vertical"&&"wu-h-full wu-w-2 wu-border-l wu-border-l-transparent wu-p-[1px]",t==="horizontal"&&"wu-h-2 wu-flex-col wu-border-t wu-border-t-transparent wu-p-[1px]",e),style:{background:r},...s,children:a.jsx(Re.ScrollAreaThumb,{className:"wu-relative wu-flex-1 wu-rounded-full",style:{background:n}})}));zs.displayName=Re.ScrollAreaScrollbar.displayName;const um=e=>{const{children:t,label:n,Label:r,open:s,onOpenChange:o,height:i,dir:u,...l}=e;return a.jsxs(Sd,{...l,open:s,onOpenChange:o,children:[a.jsx(Ya,{dir:u,children:r||n}),a.jsx(Cd,{children:a.jsx(Xa,{onInteractOutside:c=>c.preventDefault(),children:a.jsx(Dt,{className:"wu-h-fit",style:{height:i},dir:u,children:t})})})]})},lm="wu-p-1.5 wu-cursor-pointer hover:wu-bg-gray-20 wu-border-gray-40 wu-transition wu-duration-300 focus:wu-outline-2 focus:wu-outline-offset focus:wu-outline-blue-p/80 focus:wu-bg-gray-20 hover:wu-bg-gray-20 wu-rounded-t-sm",$s=e=>{const{children:t,menuTitle:n,MenuTitle:r,variant:s="flat",name:o,open:i,onOpenChange:u,height:l,preventCloseOnClickOutside:c,dir:d,Trigger:w,align:h="start",sideOffset:m=0,side:b="bottom",alignOffset:g,className:x,disabled:C,...y}=e;return a.jsxs(Lr,{...y,open:i,onOpenChange:u,dir:d,children:[a.jsx(Or,{asChild:!0,dir:d,disabled:C,className:f("disabled:wu-text-zinc-300 disabled:wu-bg-white disabled:wu-cursor-not-allowed disabled:hover:wu-bg-transparent"),children:w??cm(s,o,C)}),a.jsx(An,{className:f("wu-w-56 wu-border wu-border-blue-p disabled:wu-border-gray-40",x,"wu-menu-content"),align:h,sideOffset:m,side:b,alignOffset:g,onInteractOutside:N=>c&&N.preventDefault(),children:a.jsxs(Dt,{className:"h-fit",style:{height:l},dir:d,children:[(n||r)&&a.jsxs(a.Fragment,{children:[a.jsx(Xt,{dir:d,className:"wu-menu-title",children:r||n}),a.jsx(kn,{className:"wu-mt-0 wu-menu-separator",dir:d})]}),t??a.jsx("p",{children:"Menu Is Empty"})]})})]})},cm=(e,t,n)=>{const r=f(lm,"wu-flex wu-items-center wu-justify-between wu-gap-2 wu-h-8 wu-text-xs wu-group/wuMenu",e==="outlined"?"wu-border":"wu-border-b","wu-trigger-btn");return a.jsxs("button",{className:r,"aria-label":"menu-trigger",children:[a.jsx("span",{children:t??"Menu"}),a.jsx("span",{className:f("wm-arrow-drop-down wu-text-gray-lead wu-text-base wu-rotate-180 group-data-[state=closed]/wuMenu:wu-rotate-0 wu-transition-transform wu-duration-300 group-hover:wu-text-blue-q",n&&"wu-text-zinc-300 group-hover:wu-text-zinc-300")})]})},dm=({titles:e,currentLevel:t,initial:n,handleTitleClick:r,headerClasses:s,offsetHeight:o})=>a.jsxs("div",{className:f("wu-absolute wu-top-0 wu-left-0 wu-flex wu-gap-x-1 wu-px-4 wu-transform wu-items-center wu-origin-left wu-w-full wu-transition-[height_opacity] wu-duration-300",t!==n?"wu-opacity-100 wu-delay-200 wu-z-50 ":"wu-opacity-0 wu-delay-0 -wu-z-10",s),style:{height:t!==n?`${o}px`:"0px"},children:[a.jsx($s,{Trigger:a.jsx(xe,{variant:"iconOnly",className:"wu-w-6 wu-h-6 wu-shrink-0 wu-p-0",Icon:a.jsx("span",{className:"wm-arrow-drop-down wu-w-5 wu-h-5"})}),children:e.map(i=>a.jsx(Yn,{onSelect:u=>r(u,i.id),children:i.title},i.id))}),a.jsx("div",{className:"wu-relative wu-h-full wu-flex wu-items-center wu-flex-nowrap wu-whitespace-nowrap wu-text-nowrap wu-gap-1 wu-overflow-x-auto wu-no-scrollbar wu-snap-x wu-snap-mandatory wu-scroll-smooth",children:a.jsx(_i,{features:du,children:a.jsxs(Mi,{initial:!1,mode:"popLayout",children:[wm(e).map((i,u)=>a.jsx(wu,{initial:{y:8,opacity:0,zIndex:0},animate:{y:0,opacity:1,zIndex:50},exit:{y:-8,opacity:0,zIndex:0},transition:{duration:.3},children:a.jsxs("h6",{"data-id":i.id,onClick:r,className:f("wu-flex wu-text-sm wu-font-normal wu-items-center wu-gap-1",u===2||u===1||i.id==="LEVEL_DOTS"?"wu-cursor-default wu-text-gray-600":"wu-cursor-pointer wu-text-[#1B87E6] wu-hover:text-[#145DBF]/70",i.id==="LEVEL_DOTS"&&"wu-text-[#1B87E6]"),children:[u!==0&&a.jsx("span",{className:"wm-chevron-right wu-text-lg"}),i.title]})},i.id)),"``"]})})})]}),wm=e=>{const t=e.length;if(t>2){const n=e[0],r=e[t-1];return[n,{id:"LEVEL_DOTS",title:"..."},r]}return e},fm=({items:e,initial:t,baseTitle:n,mode:r="popLayout",headerClasses:s="",offsetHeight:o=40,variant:i="default"})=>{const[u,l]=p.useState(n?[n]:[]),[[c,d],w]=p.useState([t,1]),h=(x,C)=>{C&&l([...u,C]),w([x,1])},m=x=>{const C=u.findIndex(y=>y.id===x);if(C!==-1){const y=u.slice(0,C+1);l(y)}w([x,-1])},b=(x,C)=>{const y=C||x.currentTarget.getAttribute("data-id")||"";if(y&&y!==c){const N=u.findIndex(S=>S.id===y);N!==-1&&(l(u.slice(0,N+1)),m(y))}},g=()=>{const x=e[c]?e[c]:null;if(!x)return a.jsx("div",{className:"wu-absolute wu-inset-0 wu-w-full wu-h-full wu-flex wu-items-center wu-justify-center",children:a.jsx("p",{className:"wu-text-gray-500",children:"No content available."})});const C=typeof x.component=="function"?x.component({goNext:h,goBack:m}):x.component;return a.jsx(wu,{custom:d,variants:pm(i),initial:"enter",animate:"center",exit:"exit",transition:{opacity:{duration:.325,ease:"easeInOut"},scale:{duration:.275,ease:"easeInOut"}},className:"wu-w-full wu-h-full",style:{paddingTop:c!==t?`${o}px`:"0px"},children:C},c)};return a.jsxs("div",{className:"wu-h-full wu-relative wu-overflow-hidden wu-w-full wu-flex wu-flex-col",children:[a.jsx(dm,{titles:u,currentLevel:c,initial:t,handleTitleClick:b,headerClasses:s,offsetHeight:o}),a.jsx(_i,{features:du,children:a.jsx(Mi,{initial:!1,custom:d,mode:r,children:g()})})]})},pm=e=>{switch(e){case"slideRight":return mm;case"slideLeft":return gm;case"fadeZoom":return bm;case"default":default:return hm}},hm={enter:e=>({scale:e>0?.825:1.1,opacity:0,zIndex:0}),center:{scale:1,opacity:1,zIndex:1},exit:e=>({scale:e>0?1.1:.825,opacity:0,zIndex:0})},mm={enter:e=>({x:e>0?-15:15,opacity:0,zIndex:0}),center:{x:0,opacity:1,zIndex:1},exit:e=>({x:e>0?15:-15,opacity:0,zIndex:0})},gm={enter:e=>({x:e>0?15:-15,opacity:0,zIndex:0}),center:{x:0,opacity:1,zIndex:1},exit:e=>({x:e>0?-15:15,opacity:0,zIndex:0})},bm={enter:e=>({opacity:0,zIndex:0,scale:e>0?.925:1.1}),center:{opacity:1,zIndex:1,scale:1},exit:{opacity:0,zIndex:0,scale:1}},fu=({className:e,isLoading:t,loadingText:n,children:r,...s})=>a.jsxs("footer",{className:f("wu-flex wu-items-center wu-justify-between wu-gap-2 wu-border-t wu-border-gray-10 wu-py-3 wu-px-4 wu-bg-white/80 wu-backdrop-blur-sm wu-text-xs wu-font-normal wu-text-gray-footer wu-sticky wu-bottom-0",e),...s,children:[a.jsx("div",{className:"wu-flex-1",children:r}),t&&a.jsx(bt,{size:"16px",variant:"spinner",color:"#a3a3a3",message:n})]});fu.displayName="WuFooter";const pu=p.forwardRef((e,t)=>{const{size:n="sm",idOrSlugOrUrl:r,variant:s="primary",...o}=e,i=n==="sm"?16:18,u=r.includes("http")?r:`/help/${r}.html`,l=s==="primary"?"wu-text-blue-p":"wu-text-gray-lead";return a.jsx("button",{...o,ref:t,onClick:()=>br(u),children:a.jsx("span",{className:f("wm-help wu-text-gray-subtle",`wu-text-[${i}px]`,l,o.disabled&&"wu-text-neutral-300","wu-help-button-icon")})})});pu.displayName="WuHelpButton";const Je=(e,t)=>`wu-listbox-${e}`;function ym(e){const{option:t,accessorKey:n,onSelect:r,multiple:s,dir:o,GroupLabel:i,Item:u,isSelected:l,...c}=e,d=n.group&&Array.isArray(t[n.group]),w=({item:h,className:m})=>p.createElement(Kt,{...c,key:JSON.stringify(h),onSelect:()=>r==null?void 0:r(h),value:t[n.value],className:f("data-[selected='true']:wu-bg-gray-100 wu-cursor-pointer wu-text-xs wu-min-h-8 wu-py-0 hover:wu-bg-gray-100",!!(l!=null&&l(h))&&!s&&"wu-bg-blue-p/10",o==="rtl"&&"wu-justify-end",m,Je("item")),disabled:h.disabled},s&&a.jsx(De,{checked:l==null?void 0:l(h)}),u?u({value:h,isSelected:l==null?void 0:l(h)}):a.jsx(a.Fragment,{children:h[n.label]}));if(d){const h=t[n.group],m=typeof i=="string"?t[i]:i==null?void 0:i(t);return a.jsx(Gt,{heading:m,children:h==null?void 0:h.map(b=>a.jsx(w,{item:b,className:"wu-pl-6"},JSON.stringify(b)))})}return a.jsx(w,{item:t})}const xm=p.memo(ym),vm=e=>{const{className:t,...n}=e;return a.jsxs("div",{className:"wu-relative",children:[a.jsx(R,{icon:"wm-search",className:"wu-absolute wu-top-[14px] wu-left-5"}),a.jsx(ja,{...n,"aria-label":"Search",className:f("wu-bg-gray-10 wu-border-b wu-border-gray-subtle wu-rounded-none wu-rounded-t-sm wu-h-8 wu-my-2 wu-pl-8","focus:wu-border-blue-p focus-visible:wu-outline-none;",Je("input"),t)})]})},Nm=e=>{const{label:t,onSelectAll:n,data:r,value:s}=e,[o,i]=p.useState(!1),[u,l]=p.useState(!1);return p.useEffect(()=>{!s||!r||(i(s.length>0),l(s.length>0&&s.length<r.length))},[r,s]),a.jsxs(Kt,{className:"data-[selected='true']:wu-bg-gray-100 wu-cursor-pointer wu-text-xs wu-min-h-8 wu-py-0 hover:wu-bg-gray-100",onSelect:()=>n==null?void 0:n(!o),children:[a.jsx(De,{checked:o,partial:u}),t||"Select All"]})},Cm=e=>{const{CustomTrigger:t,disabled:n,value:r,placeholder:s,accessorKey:o,Chip:i,handleUnselect:u,variant:l,dir:c,className:d,...w}=e,[h,m]=p.useState(),b=p.useRef(null);return p.useEffect(()=>{if(!r){m(null);return}m(Array.isArray(r)?i?r.map((x,C)=>i({value:x,unselect:u,key:C})):r.map(x=>x[o.label]).join(", "):i?i({value:r,unselect:u}):r[o.label])},[r,i,o.label,m]),a.jsx(tt,{asChild:!0,id:e.id,disabled:n,ref:b,children:(t==null?void 0:t(r))||a.jsxs("button",{...w,className:f("wu-group/wuListbox wu-relative wu-min-h-8 wu-text-xs wu-border-gray-subtle wu-bg-gray-10 wu-p-1 wu-pl-2 rtl:wu-pr-2 wu-border-b wu-w-full wu-text-left wu-pr-5 rtl:wu-pl-5","hover:wu-border-blue-p","disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle","rtl:wu-text-right",l==="outlined"&&"wu-border wu-border-gray-subtle wu-bg-white",d,Je("trigger")),children:[a.jsx("div",{className:f("wu-truncate",i&&"wu-flex wu-items-center wu-gap-1 wu-flex-wrap",!h&&"wu-font-light"),children:h||s}),a.jsx(R,{icon:"wm-arrow-drop-down",className:f("wu-absolute wu-top-1 wm-arrow-drop-down group-data-[state=open]/wuListbox:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base",c==="rtl"?"wu-left-1":"wu-right-1",Je("drop-icon"))})]})})},hu=(e,t,n)=>{const r=String(e[n.label]??"").toLowerCase(),s=String(e[n.value]??"").toLowerCase();return r.includes(t)||s.includes(t)},Sm=(e,t,n)=>{const r=t.trim();if(r==="")return e;const s=r.toLowerCase(),o=[];for(const i of e){const u=n.group,l=u?i[u]:void 0;if(Array.isArray(l)){const c=l.filter(d=>hu(d,s,n));c.length>0&&o.push({...i,[u]:c})}else hu(i,s,n)&&o.push(i)}return o},Tm=e=>{const{data:t,accessorKey:n,value:r,Item:s,Label:o,GroupLabel:i,CustomHeader:u,CustomTrigger:l,NoDataContent:c,Chip:d,onSelect:w,onScroll:h,disabled:m,multiple:b,searchable:g,selectAll:x,virtualizedThreshold:C=100,id:y,dir:N,className:S,listClass:E,placeholder:I="Select items...",variant:A,labelPosition:k="top",maxContentWidth:D,maxContentHeight:_,modal:F,...$}=e,[O,G]=p.useState(!1),[z,ue]=p.useState(""),[M,V]=p.useState(r),q=p.useMemo(()=>n,[n]),B=p.useMemo(()=>{if(!g||!z)return t;const j=z.toLowerCase().trim();return Sm(t,j,n)},[t,z,n.label,g]),re=j=>{b?V(P=>{const U=j[n.value],Z=Array.isArray(P)?P:[],ee=Z.some(H=>H[n.value]===U)?Z.filter(H=>H[n.value]!==U):[...Z,j];return w&&w(ee),ee}):(V(j),w&&w(j),G(!1))},ae=p.useCallback(j=>{const P=j?t:[];V(P),x!=null&&x.onSelectAll&&x.onSelectAll(j),w&&w(P)},[t,x,w]),ve=j=>Array.isArray(M)?M.some(P=>P[n.value]===j[n.value]):(M==null?void 0:M[n.value])===j[n.value];p.useEffect(()=>{V(r)},[r]);const Ue=j=>{const P=U=>a.jsx(xm,{option:U,accessorKey:q,multiple:b,onSelect:Z=>re(Z),dir:N,GroupLabel:i,Item:s,isSelected:Z=>ve(Z)},JSON.stringify(U));return j.length>C?a.jsx(yt,{list:j,callback:(U,Z)=>P(Z),dir:N}):j.map(P)};return a.jsxs("div",{className:f("wu-flex wu-text-sm wu-gap-2",k==="top"&&"wu-flex-col wu-gap-1",k==="left"&&"wu-flex-row",k==="right"&&"wu-flex-row-reverse",Je("container")),dir:N,children:[o&&a.jsx(Te,{htmlFor:y,className:Je("label"),children:o}),a.jsxs(ze,{open:O,onOpenChange:j=>{G(j),j||setTimeout(()=>{ue("")},100)},modal:F,children:[a.jsx(Cm,{CustomTrigger:l,disabled:m,value:M,accessorKey:n,placeholder:I,Chip:d,className:S,handleUnselect:re,variant:A,id:y,dir:N,...$}),a.jsx(Me,{className:f("wu-min-w-[--radix-popover-trigger-width] wu-max-w-[calc(100vw-32px)] wu-w-auto wu-p-0 wu-bg-white wu-border wu-border-blue-p",Je("content")),align:"start",sideOffset:-1,style:{maxWidth:D},children:a.jsxs(_r,{id:e.id,shouldFilter:!1,children:[g&&a.jsx(vm,{value:z,onValueChange:ue}),u,a.jsxs(Fr,{className:f("wu-overflow-y-auto",Je("list"),E),onScroll:h,style:{maxHeight:_||"420px"},children:[a.jsx(Vr,{children:c||"No results found."}),a.jsx(Gt,{children:b&&(x==null?void 0:x.enabled)&&!z&&a.jsx(Nm,{data:t,value:M,onSelectAll:ae,label:x.label})}),a.jsx(Gt,{children:Ue(B)})]})]})})]})]})},Hs=p.forwardRef(({showMenu:e=!1,className:t,color:n="#1B3380",...r},s)=>{const o=f("wu-w-full wu-border wu-transition-all wu-duration-300");return a.jsxs("div",{...r,className:f("wu-flex wu-flex-col wu-w-[18px] wu-justify-between wu-aspect-[3/2] wu-transition-all wu-duration-300",t),ref:s,"aria-label":"menu-icon",children:[a.jsx("div",{className:`${o} wu-origin-center ${e?"wu-rotate-45 wu-translate-y-[5px]":""}`,style:{borderColor:n}}),a.jsx("div",{className:`${o} ${e?"wu-opacity-0":""}`,style:{borderColor:n}}),a.jsx("div",{className:`${o} wu-origin-center ${e?"-wu-rotate-45 -wu-translate-y-[5px]":""}`,style:{borderColor:n}})]})});Hs.displayName="WuMenuIcon";const Em=({placeholder:e="Select...",value:t,multiple:n=!1,accessorKey:r,variant:s="flat",dir:o="ltr",customTriggerChildren:i,id:u,disabled:l,selectAll:c,isCheckedAll:d,width:w,...h})=>{const[m,b]=p.useState(""),[g,x]=p.useState(e);p.useEffect(()=>{if(!t||Array.isArray(t)&&t.length===0){x(e),b("");return}const y=r.label;if(n&&Array.isArray(t)){const N=t.map(S=>S[y]).join(", ");b(N)}else!n&&!Array.isArray(t)&&b(t[y])},[t,r.label,n,e]);const C=()=>e&&!m?a.jsx("p",{className:"wu-text-xs wu-opacity-70",children:g}):a.jsx("span",{className:f("wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap"),style:{width:`${(w||0)-32}px`},children:d?(c==null?void 0:c.triggerText)??m:m});return a.jsx(Or,{asChild:!0,dir:o,id:u,disabled:l,children:a.jsxs("button",{...h,disabled:l,className:f("wu-flex wu-gap-2 wu-w-full wu-items-center wu-justify-between wu-py-1.5 wu-px-2 wu-text-xs wu-transition-colors wu-cursor-pointer wu-border-b wu-bg-white wu-border-gray-subtle wu-h-8","focus:wu-outline-none focus-visible:wu-border-blue-p/80 wu-rounded-t-sm","disabled:wu-cursor-not-allowed disabled:hover:wu-border-gray-subtle disabled:wu-bg-gray-10 disabled:wu-opacity-50","hover:wu-bg-gray-10 hover:wu-border-blue-p",s==="outlined"&&"wu-border wu-border-gray-subtle","wu-group/wuSelect wu-select-trigger",h.className),children:[i??C(),a.jsx("span",{className:"wm-arrow-drop-down group-data-[state=open]/wuSelect:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base"})]})})},mu=({option:e,value:t,multiple:n=!1,onSelect:r,accessorKey:s,dir:o="ltr"})=>{const[i,u]=p.useState(n?[]:"");p.useEffect(()=>{t&&u(n?t.map(w=>JSON.stringify(w[s.value])):JSON.stringify(t[s.value]))},[t,s.value,n]);const l=n?i.includes(JSON.stringify(e[s.value])):i===JSON.stringify(e[s.value]),c=d=>{e.disabled||(r(e),n&&d.preventDefault())};return a.jsxs(Yt,{onClick:c,disabled:e.disabled,className:f("wu-cursor-pointer wu-text-xs wu-py-2 wu-leading-4 wu-select-item wu-items-start",l&&"wu-bg-gray-10"),dir:o,children:[n&&a.jsx(De,{checked:l}),a.jsx(gu,{option:e,accessorKey:s})]})},gu=({option:e,accessorKey:t})=>{const n=String(e[t.label]);return a.jsxs("div",{className:"wu-flex wu-items-center wu-w-full wu-gap-1 wu-text-xs wu-pl-2",children:[e.icon,n,e.isAdmin&&a.jsx("span",{className:"wu-ml-auto wm-lock wu-text-sm wu-text-orange-deep"})]})},bu=e=>{const{option:t,handleSelectAll:n,isCheckedAll:r,isPartialSelected:s,...o}=e;switch("type"in t?t.type:"option"){case"all":return a.jsxs(Yt,{onSelect:u=>{u.stopPropagation(),u.preventDefault(),n==null||n()},className:f("wu-cursor-pointer wu-text-xs wu-py-2 wu-leading-4 wu-select-item"),dir:o.dir,children:[a.jsx(De,{"data-partial":s,checked:r||s,partial:s}),a.jsx(gu,{option:t,accessorKey:o.accessorKey})]});case"group":return a.jsxs(Ka,{dir:o.dir,children:[a.jsx(Xt,{className:"wu-text-xs",children:t.label}),t.options.map((u,l)=>p.createElement(mu,{...o,option:u,key:l}))]});case"divider":return a.jsx(kn,{className:"wu-mx-4"});default:return a.jsx(mu,{...o,option:t})}},Am=e=>{let t=0,n=0;const r=[],s=[],o=i=>{i.type==="divider"?t++:i.type==="group"?(n++,i.options.forEach(u=>{o(u)})):(r.push(i),i.disabled||s.push(i))};return e.forEach(i=>{o(i)}),{separators:t,groups:n,enabledOptions:s,totalData:r.length,cleanData:r}},km=100,Im=400,yu=({data:e,onSelect:t,multiple:n=!1,defaultValue:r,value:s,accessorKey:o,variant:i="flat",dir:u="ltr",placeholder:l,Label:c,virtualizedThreshold:d=km,maxHeight:w=Im,hasGroup:h=!1,Header:m,CustomTrigger:b,selectAll:g,disabled:x,labelPosition:C="top",onScroll:y,maxContentWidth:N,...S})=>{const[E,I]=p.useState(),A=p.useRef(null),[k,D]=p.useState(!1),[_,F]=p.useState(!1),{cleanData:$,enabledOptions:O}=h||g!=null&&g.enable?Am(e):{cleanData:e,enabledOptions:[]},G=p.useMemo(()=>n&&g!=null&&g.enable&&e.length>0?[{type:"all",[o.label]:g.label||"Select All"},...e]:e,[e,g,n]),z=p.useCallback(q=>{const B=q[o.value];if(n)I((re=[])=>{const ae=re,Ue=ae.some(j=>j[o.value]===B)?ae.filter(j=>j[o.value]!==B):[...ae,q];return t==null||t(Ue),Ue});else{const re=q;I(re),t==null||t(re)}},[n,o.value,t]);p.useEffect(()=>{if(r&&s){console.error("defaultValue and value cannot be used simultaneously");return}!r&&!s&&I(void 0),r!==void 0&&I(r),s!==void 0&&I(s)},[r,s]);const ue=G.length>d;p.useEffect(()=>{if(!n)return;const q=g!=null&&g.includeDisabled?(E==null?void 0:E.length)===e.length:(E==null?void 0:E.length)===O.length;D(q);const B=(E==null?void 0:E.length)>0&&!q;F(B)},[E,g]);const M=p.useCallback(()=>{const q=k?[]:g!=null&&g.includeDisabled?h?$:e:O;I(q),t==null||t(q)},[k,n,e,O,t,g]),V=jt(C);return a.jsxs("div",{className:f(V,"wu-flex wu-select-container"),ref:A,dir:u,children:[a.jsxs(Lr,{children:[a.jsx(Em,{...S,value:E,multiple:n,variant:i,dir:u,placeholder:l,accessorKey:o,customTriggerChildren:b,id:S.id,disabled:x,selectAll:g,isCheckedAll:k}),a.jsxs(An,{className:"wu-min-w-[--radix-dropdown-menu-trigger-width] wu-max-w-[calc(100vw-32px)] wu-border-blue-p wu-select-content",role:"listbox",sideOffset:-1,align:"start",id:S.id,style:{maxWidth:N},children:[m,ue?a.jsx(yt,{list:G,containerHeight:w,callback:(q,B)=>a.jsx(bu,{option:B,accessorKey:o,multiple:n,onSelect:z,value:E,dir:u,handleSelectAll:M,isCheckedAll:k,isPartialSelected:_}),dir:u}):a.jsx("div",{onScroll:y,style:{maxHeight:w,height:"fit-content",overflow:"auto"},className:"wu-select-list",children:G.map((q,B)=>a.jsx(bu,{option:q,accessorKey:o,multiple:n,onSelect:z,value:E,handleSelectAll:M,isCheckedAll:k,dir:u,isPartialSelected:_},`${B}`))})]})]}),c&&a.jsx(Te,{htmlFor:S.id,className:"wu-select-label",children:c})]})},Xn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Mm=({value:e,onChange:t,min:n=Y.sub(new Date,{years:5}),max:r=Y.add(new Date,{years:1}),placeholder:s="Select a month",Label:o,labelPosition:i="top",disabled:u,id:l,readonly:c,disabledMonths:d=[],...w})=>{const[h,m]=p.useState(null),[b,g]=p.useState(""),[x,C]=p.useState({value:Math.min(new Date().getFullYear(),new Date(r).getFullYear()),label:Math.min(new Date().getFullYear(),new Date(r).getFullYear())}),y=p.useMemo(()=>{const S=new Date(n).getFullYear(),E=new Date(r).getFullYear();return Array.from({length:E-S+1},(I,A)=>({value:E-A,label:E-A}))},[n,r]);p.useEffect(()=>{if(e){const S=new Date(e),E=S.getFullYear(),I=S.getMonth();m({year:E,month:I}),g(`${Xn[I]} ${E}`),C({value:E,label:E})}},[e]);const N=()=>{h&&t&&(t(new Date(h.year,h.month,15)),g(`${Xn[h.month]} ${h.year}`))};return a.jsxs("div",{className:f("wu-flex wu-flex-col wu-items-center",jt(i),i==="top"&&"wu-items-start"),children:[a.jsxs(ze,{children:[a.jsx(Dr,{...w,disabled:u||c,id:l,dir:"ltr",placeholder:s,formattedString:b}),a.jsxs(Me,{className:"wu-flex wu-flex-col wu-gap-4 wu-p-4 wu-bg-white wu-border-blue-p wu-month-picker-content",align:"start",sideOffset:-1,children:[a.jsx("div",{className:"wu-px-1 wu-mx-auto wu-w-full",children:a.jsx(yu,{data:y,accessorKey:{value:"value",label:"label"},value:x,onSelect:S=>C(S),multiple:!1,maxHeight:224})}),a.jsx(Dm,{year:x==null?void 0:x.value,selectedMonth:h==null?void 0:h.month,selectedYear:h==null?void 0:h.year,onClick:(S,E)=>m({year:E,month:S}),disabledMonths:d}),a.jsx("div",{className:"wu-flex wu-justify-end wu-px-0.5",children:a.jsx(qt.PopoverClose,{asChild:!0,children:a.jsx(xe,{onClick:N,children:"Apply"})})})]})]}),o&&a.jsx(Te,{className:"wu-truncate wu-max-w-[120px] wu-min-w-fit wu-select-label",children:o})]})},Dm=({year:e,selectedMonth:t,selectedYear:n,onClick:r,disabledMonths:s=[]})=>{const o=new Date,i=o.getFullYear(),u=o.getMonth(),l=p.useMemo(()=>{const c=new Set;return s.forEach(d=>{const w=typeof d=="string"?new Date(d):d;c.add(`${w.getFullYear()}-${w.getMonth()}`)}),c},[s]);return a.jsx("div",{className:"wu-grid wu-grid-cols-3 wu-grid-rows-4 wu-w-fit wu-gap-[1px] wu-bg-[#d9d9d9] wu-border wu-border-[#d9d9d9] wu-month-picker-grid",children:Xn.map((c,d)=>{const w=e===i&&d===u,h=t===d&&n===e;return a.jsx("button",{disabled:l.has(`${e}-${d}`),onClick:()=>r(d,e),className:f("wu-bg-white wu-flex wu-items-center wu-justify-center wu-w-[83px] wu-h-[53px] wu-text-xs wu-transition-colors","hover:wu-bg-gray-25 hover:wu-text-blue-q hover:wu-font-medium","focus:wu-outline-none focus-visible:wu-border focus-visible:wu-border-blue-p/50",w&&"wu-border wu-border-blue-p",h&&"wu-bg-blue-p wu-text-white hover:wu-bg-blue-p/80 hover:wu-text-white wu-font-medium","disabled:wu-bg-gray-20 disabled:wu-text-gray-subtle disabled:hover:wu-bg-gray-20 disabled:hover:wu-text-gray-subtle disabled:hover:wu-font-normal","wu-month-picker-month"),"data-value":`${Xn[d]} ${e}`,"data-month":d,"data-year":e,children:c},c)})})},xu=(e,t,n,r=96)=>{if(e.length===0||r<=0)return[[],[]];const[o,i]=p.useState([]),[u,l]=p.useState([]);return p.useEffect(()=>{const c=()=>{var b,g;const d=((b=t.current)==null?void 0:b.clientWidth)||0,w=((g=n.current)==null?void 0:g.clientWidth)||0,h=d-w,m=Math.floor(h/r);i(e.slice(0,m)),l(e.slice(m))};return c(),window.addEventListener("resize",c),()=>{window.removeEventListener("resize",c)}},[e,r]),[o,u]},vu={wuPrimaryLink:"_wuPrimaryLink_1sy3v_1",wuPrimaryPopoverContent:"_wuPrimaryPopoverContent_1sy3v_8"},Pm=e=>{const{Links:t,children:n,className:r,...s}=e,o=p.useMemo(()=>t.map((d,w)=>p.cloneElement(d,{className:f(vu.wuPrimaryLink,d.props.className,"wu-primary-nav-link"),key:w})),[t]),i=p.useRef(null),u=p.useRef(null),[l,c]=xu(o,i,u);return a.jsx(a.Fragment,{children:a.jsxs("header",{className:f("wu-flex wu-items-center wu-justify-between wu-gap-4 wu-px-2 wu-py-1 wu-bg-white wu-border-b",r),...s,ref:i,children:[a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2",children:[a.jsx("nav",{className:"wu-flex wu-items-center wu-justify-start wu-gap-4 wu-primary-nav-left",children:l}),c.length>0&&a.jsxs(ze,{children:[a.jsx(tt,{className:"wu-p-1 wu-pb-0 wu-rounded-sm focus:wu-outline-none focus:wu-bg-gray-25","aria-label":"more",children:a.jsx("span",{className:"wm-more-vert"})}),a.jsx(Me,{className:f(vu.wuPrimaryPopoverContent,"wu-primary-nav-popover-left"),align:"start",sideOffset:12,children:c})]})]}),n&&a.jsxs(a.Fragment,{children:[a.jsx("section",{className:"wu-items-center wu-justify-end wu-hidden wu-gap-4 sm:wu-flex wu-primary-nav-right",ref:u,children:n}),a.jsxs(ze,{children:[a.jsx(tt,{className:"sm:wu-hidden",children:a.jsx("span",{className:"wu-text-lg wm-menu"})}),a.jsx(Me,{className:"wu-bg-white wu-border wu-border-blue-p wu-w-fit wu-primary-nav-popover-right",align:"end",sideOffset:4,children:n})]})]})]})})},Us={wuSecondaryLink:"_wuSecondaryLink_1edl1_1",wuSecondaryNav:"_wuSecondaryNav_1edl1_6"},_m=e=>{const{Links:t,children:n,className:r,...s}=e,o=p.useMemo(()=>t.map((w,h)=>p.cloneElement(w.link,{key:h,className:f(Us.wuSecondaryLink,w.link.props.className,"wu-secondary-nav-link-container"),children:a.jsxs(a.Fragment,{children:[p.cloneElement(w.imgOrIcon,{className:f("wu-w-5 wu-h-5 wu-flex wu-items-center wu-justify-center wu-text-lg wu-leading-5",w.imgOrIcon.props.className)}),a.jsx("div",{className:"wu-secondary-nav-link",children:w.link.props.children})]})})),[t]),i=p.useRef(null),u=p.useRef(null),l=p.useRef(null),[c,d]=xu(o,i,l);return a.jsx(a.Fragment,{children:a.jsxs("header",{className:f("wu-flex wu-items-center wu-justify-between wu-gap-4 wu-border-y wu-border-gray-25 wu-h-[50px]",r),...s,ref:i,children:[a.jsxs("div",{className:"wu-flex wu-items-center wu-justify-start wu-gap-2",children:[a.jsx("nav",{className:f(Us.wuSecondaryNav,"wu-flex wu-items-center wu-justify-start wu-w-full wu-h-full wu-secondary-nav-left"),ref:u,children:c}),d.length>0&&a.jsxs(ze,{children:[a.jsx(tt,{className:"wu-p-1 wu-pb-0 wu-rounded-sm focus:wu-outline-none focus:wu-bg-gray-25","aria-label":"more",children:a.jsx("span",{className:"wm-more-vert"})}),a.jsx(Me,{className:f(Us.wuSecondaryNavPopover,"wu-secondary-nav-popover-left"),align:"start",sideOffset:12,children:d})]})]}),n&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"wu-items-center wu-justify-end wu-hidden sm:wu-flex",ref:l,children:n}),a.jsxs(ze,{children:[a.jsx(tt,{className:"sm:wu-hidden",children:a.jsx("span",{className:"wu-text-lg wm-menu"})}),a.jsx(Me,{className:"wu-bg-white wu-border wu-border-blue-p wu-w-fit wu-secondary-nav-popover-right",align:"end",sideOffset:12,children:n})]})]})]})})},Nu=p.forwardRef(({totalRows:e,initialPage:t=0,initialPageSize:n=100,onPageChange:r,className:s,disabled:o=!1,...i},u)=>{const[l,c]=p.useState(t),[d,w]=p.useState(n);p.useEffect(()=>{c(t),w(n)},[t,n]);const h=Math.ceil(e/d),m=l*d+1,b=Math.min((l+1)*d,e),g=Array.from({length:h},(y,N)=>N),x=p.useCallback(y=>{y>=0&&y<h&&(c(y),r==null||r(y))},[h,r]),C=224;return a.jsxs("div",{className:f("wu-flex wu-items-center wu-gap-[2px]",s,"wu-pagination"),...i,role:"navigation",children:[a.jsx(Cu,{label:"Previous page",onClick:()=>x(l-1),disabled:l===0||o,icon:"wm-arrow-back-ios-new",className:"hover:wu-bg-gray-20 rtl:wu-rotate-180 wu-prev-btn"}),a.jsx($s,{name:`${m} - ${b}`,className:"wu-w-[96px] wu-min-w-[96px] wu-pagination-menu",align:"end",disabled:o,children:a.jsx(Dt,{style:{maxHeight:C+"px"},dir:i.dir,children:g.length>100?a.jsx(yt,{className:"wu-pagination-list",containerHeight:C,list:g,callback:(y,N)=>a.jsxs(Yn,{onSelect:()=>x(N),className:f("wu-py-2",N===l&&"wu-bg-gray-20","wu-pagination-item"),children:[N*d+1," -"," ",Math.min((N+1)*d,e)]},y)}):g.map(y=>a.jsxs(Yn,{onSelect:()=>x(y),className:f(y===l&&"wu-bg-gray-20","wu-py-2 hover:wu-bg-gray-20","wu-pagination-item"),children:[y*d+1," -"," ",Math.min((y+1)*d,e)]},y))})}),a.jsx(Cu,{label:"Next page",onClick:()=>x(l+1),disabled:l===h-1||o,icon:"wm-arrow-forward-ios",className:"hover:wu-bg-gray-20 rtl:wu-rotate-180 wu-next-btn"})]})});Nu.displayName="WuPagination";const Cu=({label:e,onClick:t,disabled:n,icon:r,className:s})=>a.jsx(xe,{variant:"iconOnly",onClick:t,disabled:n,className:f("wu-w-8 wu-h-8 wu-rounded-xs wu-group disabled:wu-text-zinc-300 disabled:wu-bg-white wu-text-gray-lead focus:wu-bg-color-none",s),"aria-label":e,children:a.jsx("span",{className:f("wu-text-sm",r)})}),Fm=({Trigger:e,children:t,className:n,dir:r,open:s,onOpenChange:o,modal:i,...u})=>a.jsxs(ze,{open:s,onOpenChange:o,modal:i,children:[a.jsx(tt,{asChild:!0,dir:r,children:e}),a.jsx(Me,{className:f("wu-w-80 wu-p-0 wu-border-blue-p wu-bg-white wu-dark:border-gray-switcher",n),dir:r,...u,children:t})]}),Vm=e=>a.jsx(qt.PopoverClose,{asChild:!0,children:a.jsx(xe,{...e})}),Su=v.forwardRef(({className:e,...t},n)=>a.jsx(Ut.Root,{className:f("wu-grid wu-gap-2",e),...t,ref:n}));Su.displayName=Ut.Root.displayName;const Tu=v.forwardRef(({className:e,...t},n)=>a.jsx(Ut.Item,{ref:n,className:f("wu-group wu-aspect-square wu-h-4 wu-w-4 wu-rounded-full wu-border wu-border-gray-subtle wu-text-blue-p wu-ring-offset-white disabled:wu-cursor-not-allowed disabled:wu-opacity-50 hover:wu-border-blue-p hover:wu-bg-gray-20 data-[state=checked]:wu-border-blue-p hover:data-[state=checked]:wu-border-blue-q hover:data-[state=checked]:wu-bg-inherit focus:wu-outline-2 focus:wu-outline-offset-4 focus:wu-outline-blue-soft disabled:hover:wu-border-gray-subtle disabled:wu-hover:bg-gray-20 disabled:wu-bg-gray-20",e),...t,children:a.jsx(Ut.Indicator,{className:"wu-flex wu-items-center wu-justify-center",children:a.jsx("div",{className:"wu-w-2 wu-h-2 wu-rounded-full wu-bg-blue-p group-hover:group-data-[state=checked]:wu-bg-blue-q"})})}));Tu.displayName=Ut.Item.displayName;const Eu=p.forwardRef((e,t)=>{const{options:n,defaultValue:r,onChange:s,label:o,dir:i,...u}=e;return a.jsxs(Su,{defaultValue:r,required:u.required,disabled:u.disabled,onValueChange:s,id:u.id,dir:i,name:u.name,className:f("w-fit",u.className),ref:t,style:u.style,children:[a.jsx(Sn,{htmlFor:u.id,className:"wu-text-sm wu-font-normal wu-text-gray-lead wu-leading-6 wu-radio-group-label",children:o}),n.map(l=>a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2 wu-radio-item-container",children:[a.jsx(Tu,{value:l.value,id:l.value,disabled:l.disabled,required:l.required,"aria-label":l.value,className:"wu-peer wu-radio-item"}),a.jsx(Sn,{htmlFor:l.value,className:f(l.required&&"after:wu-content-['*'] after:wu-mx-[2px] after:wu-text-rose-500","wu-radio-item-label"),children:l.label})]},l.value))]})});Eu.displayName="WuRadioGroup";const Lm=e=>{const{children:t,...n}=e;return a.jsxs(Dt,{...n,role:"complementary","aria-label":"ScrollArea",children:[t,a.jsx(zs,{orientation:"horizontal"})]})};function Au({className:e,...t}){return a.jsx("div",{className:f("animate-pulse rounded-md bg-muted",e),...t})}const js=768;function ku(){const[e,t]=v.useState(void 0);return v.useEffect(()=>{const n=window.matchMedia(`(max-width: ${js-1}px)`),r=()=>{t(window.innerWidth<js)};return n.addEventListener("change",r),t(window.innerWidth<js),()=>n.removeEventListener("change",r)},[]),!!e}const Om="sidebar_state",Wm=3600*24*7,Bm="256px",qm="256px",zm="3rem",$m="b",Iu=v.createContext(null);function lt(){const e=v.useContext(Iu);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Mu=v.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:s,children:o,...i},u)=>{const l=ku(),[c,d]=v.useState(!1),[w,h]=v.useState(l?!0:e),m=t??w,b=v.useCallback(y=>{const N=typeof y=="function"?y(m):y;n?n(N):h(N),document.cookie=`${Om}=${N}; path=/; max-age=${Wm}`},[n,m]),g=v.useCallback(()=>l?d(y=>!y):b(y=>!y),[l,b,d]);v.useEffect(()=>{const y=N=>{N.key===$m&&(N.metaKey||N.ctrlKey)&&(N.preventDefault(),g())};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[g]);const x=m?"expanded":"collapsed",C=v.useMemo(()=>({state:x,open:m,setOpen:b,isMobile:l,openMobile:c,setOpenMobile:d,toggleSidebar:g}),[x,m,b,l,c,d,g]);return a.jsx(Iu.Provider,{value:C,children:a.jsx(Fa,{delayDuration:0,children:a.jsx("div",{style:{"--sidebar-width":Bm,"--sidebar-width-icon":zm,...s},className:f("wu-group/sidebar-wrapper wu-flex wu-min-h-[calc(100svh-48px)] wu-w-full",r),ref:u,...i,children:o})})})});Mu.displayName="SidebarProvider";const Du=v.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:s,...o},i)=>{const{isMobile:u,state:l,openMobile:c,setOpenMobile:d}=lt();return n==="none"?a.jsx("div",{className:f("wu-flex wu-h-full wu-w-[--sidebar-width] wu-flex-col",r),ref:i,...o,children:s}):u?a.jsx(co,{open:c,onOpenChange:d,...o,children:a.jsx(Hr,{"data-sidebar":"sidebar","data-mobile":"true",className:"wu-w-[--sidebar-width] wu-bg-blue-sidebar wu-p-0 [&>button]:wu-hidden",style:{"--sidebar-width":qm},side:e,children:a.jsx("div",{className:"wu-flex wu-flex-col wu-w-full wu-h-full",children:s})})}):a.jsxs("div",{ref:i,className:"wu-hidden wu-group wu-peer md:wu-block","data-state":l,"data-collapsible":l==="collapsed"?n:"","data-variant":t,"data-side":e,children:[a.jsx("div",{className:f("wu-relative wu-w-[--sidebar-width] wu-bg-transparent wu-transition-[width] wu-duration-150 wu-ease-linear","group-data-[collapsible=offcanvas]:wu-w-0","group-data-[side=right]:wu-rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:wu-w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:wu-w-[--sidebar-width-icon]")}),a.jsx("div",{className:f("wu-fixed wu-inset-y-0 wu-z-20 wu-hidden wu-h-svh wu-w-[--sidebar-width] wu-transition-[left,right,width] wu-duration-150 wu-ease-linear md:wu-flex",e==="left"?"wu-left-0 group-data-[collapsible=offcanvas]:wu-left-[calc(var(--sidebar-width)*-1)]":"wu-right-0 group-data-[collapsible=offcanvas]:wu-right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"wu-p-2 group-data-[collapsible=icon]:wu-w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:wu-w-[--sidebar-width-icon] group-data-[side=left]:wu-border-r group-data-[side=right]:wu-border-l",r),...o,children:a.jsx("div",{"data-sidebar":"sidebar",className:"wu-flex wu-h-full wu-w-full wu-flex-col wu-bg-[#eef3fb] group-data-[variant=floating]:wu-rounded-lg group-data-[variant=floating]:wu-border group-data-[variant=floating]:wu-border-sidebar-border group-data-[variant=floating]:wu-shadow",children:s})})]})});Du.displayName="Sidebar";const Pu=v.forwardRef(({className:e,onClick:t,children:n,...r},s)=>{const{toggleSidebar:o}=lt();return a.jsxs(gt,{ref:s,"data-sidebar":"trigger",variant:"secondary",className:f("wu-h-8 wu-w-8 wu-min-w-0 wu-p-0 wu-text-2xl wu-font-light hover:wu-bg-blue-sidebarHover wu-text-blue-q",e),onClick:i=>{t==null||t(i),o()},...r,children:[n,a.jsx("span",{className:"wu-sr-only",children:"Toggle Sidebar"})]})});Pu.displayName="SidebarTrigger";const Hm=v.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:r}=lt();return a.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:f("wu-absolute wu-inset-y-0 wu-z-20 wu-hidden wu-w-4 wu-translate-x-1/2 wu-transition-all wu-ease-linear after:wu-absolute after:wu-inset-y-0 after:wu-left-1/2 after:wu-w-[2px] group-data-[side=left]:wu-right-4 group-data-[side=right]:wu-left-0 sm:wu-flex","[[data-side=left]_&]:wu-cursor-w-resize [[data-side=right]_&]:wu-cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:wu-cursor-e-resize [[data-side=right][data-state=collapsed]_&]:wu-cursor-w-resize","group-data-[collapsible=offcanvas]:wu-translate-x-0 group-data-[collapsible=offcanvas]:after:wu-left-full","[[data-side=left][data-collapsible=offcanvas]_&]:wu-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:wu-left-2",e),...t})});Hm.displayName="SidebarRail";const _u=v.forwardRef(({className:e,...t},n)=>a.jsx("main",{ref:n,className:f("wu-relative wu-flex wu-w-full wu-flex-1 wu-flex-col","md:peer-data-[variant=inset]:wu-m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:wu-ml-2 md:peer-data-[variant=inset]:wu-ml-0 md:peer-data-[variant=inset]:wu-rounded-xl md:peer-data-[variant=inset]:wu-shadow",e),...t}));_u.displayName="SidebarInset";const Um=v.forwardRef(({className:e,...t},n)=>a.jsx(kr,{ref:n,"data-sidebar":"input",className:f("wu-h-8 wu-w-full wu-shadow-none focus-visible:wu-ring-2",e),...t}));Um.displayName="SidebarInput";const Fu=v.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"header",className:f("wu-flex wu-flex-col wu-gap-2 wu-p-2",e),...t}));Fu.displayName="SidebarHeader";const Vu=v.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"footer",className:f("wu-flex wu-flex-col wu-gap-2 wu-pb-2",e),...t}));Vu.displayName="SidebarFooter";const jm=v.forwardRef(({className:e,...t},n)=>a.jsx(Wr,{ref:n,"data-sidebar":"separator",className:f("wu-mx-2 wu-w-auto",e),...t}));jm.displayName="SidebarSeparator";const Lu=v.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"content",className:f("wu-flex wu-min-h-0 wu-flex-1 wu-flex-col wu-gap-2 wu-overflow-auto group-data-[collapsible=icon]:wu-overflow-hidden",e),...t}));Lu.displayName="SidebarContent";const Ou=v.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"group",className:f("wu-relative wu-flex wu-w-full wu-min-w-0 wu-flex-col wu-p-2",e),...t}));Ou.displayName="SidebarGroup";const Wu=v.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const s=t?pt.Slot:"div";return a.jsx(s,{ref:r,"data-sidebar":"group-label",className:f("wu-flex wu-h-8 wu-shrink-0 wu-items-center wu-rounded-md wu-px-2 wu-text-xs wu-font-medium wu-outline-none wu-transition-[margin,opacity] wu-duration-150 wu-ease-linear focus-visible:wu-ring-2 [&>svg]:wu-size-4 [&>svg]:wu-shrink-0","group-data-[collapsible=icon]:wu-opacity-0",e),...n})});Wu.displayName="SidebarGroupLabel";const Gm=v.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const s=t?pt.Slot:"button";return a.jsx(s,{ref:r,"data-sidebar":"group-action",className:f("wu-absolute wu-right-3 wu-top-3.5 wu-flex wu-aspect-square wu-w-5 wu-items-center wu-justify-center wu-rounded-md wu-p-0 wu-outline-none wu-transition-transform focus-visible:wu-ring-2 [&>svg]:wu-size-4 [&>svg]:wu-shrink-0","after:wu-absolute after:wu-inset-2 after:md:wu-hidden","group-data-[collapsible=icon]:wu-hidden",e),...n})});Gm.displayName="SidebarGroupAction";const Bu=v.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"group-content",className:f("wu-w-full wu-text-sm",e),...t}));Bu.displayName="SidebarGroupContent";const Gs=v.forwardRef(({className:e,...t},n)=>a.jsx("ul",{ref:n,"data-sidebar":"menu",className:f("wu-flex wu-w-full wu-min-w-0 wu-flex-col wu-gap-1",e),...t}));Gs.displayName="SidebarMenu";const qu=v.forwardRef(({className:e,...t},n)=>a.jsx("li",{ref:n,"data-sidebar":"menu-item",className:f("wu-group/menu-item wu-relative",e),...t}));qu.displayName="SidebarMenuItem";const Km=ke.cva("wu-peer/menu-button wu-flex wu-w-full wu-items-center wu-gap-2 wu-overflow-hidden wu-rounded-md wu-p-2 wu-text-left wu-text-sm wu-outline-none wu-transition-[width,height,padding] focus-visible:wu-ring-2 disabled:wu-pointer-events-none disabled:wu-opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:wu-pr-8 aria-disabled:wu-pointer-events-none aria-disabled:wu-opacity-50 data-[active=true]:wu-font-medium group-data-[collapsible=icon]:!wu-size-8 group-data-[collapsible=icon]:!wu-p-2 [&>span:last-child]:wu-truncate [&>svg]:wu-size-4 [&>svg]:wu-shrink-0",{variants:{variant:{default:"",outline:""},size:{default:"wu-h-8 wu-text-sm",sm:"wu-h-7 wu-text-xs",lg:"wu-h-12 wu-text-sm group-data-[collapsible=icon]:!wu-p-0"}},defaultVariants:{variant:"default",size:"default"}}),zu=v.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:s,className:o,...i},u)=>{const l=e?pt.Slot:"button",{isMobile:c,state:d}=lt(),w=a.jsx(l,{ref:u,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:f(Km({variant:n,size:r}),o),...i});return s?(typeof s=="string"&&(s={children:s}),a.jsxs(Va,{children:[a.jsx(La,{asChild:!0,children:w}),a.jsx(Ir,{side:"right",align:"center",hidden:d!=="collapsed"||c,...s})]})):w});zu.displayName="SidebarMenuButton";const Ym=v.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},s)=>{const o=t?pt.Slot:"button";return a.jsx(o,{ref:s,"data-sidebar":"menu-action",className:f("wu-absolute wu-right-1 wu-top-1.5 wu-flex wu-aspect-square wu-w-5 wu-items-center wu-justify-center wu-rounded-md wu-p-0 wu-outline-none wu-transition-transform focus-visible:wu-ring-2 [&>svg]:wu-size-4 [&>svg]:wu-shrink-0","after:wu-absolute after:wu-inset-2 after:md:wu-hidden","peer-data-[size=sm]/menu-button:wu-top-1","peer-data-[size=default]/menu-button:wu-top-1.5","peer-data-[size=lg]/menu-button:wu-top-2.5","group-data-[collapsible=icon]:wu-hidden",n&&"group-focus-within/menu-item:wu-opacity-100 group-hover/menu-item:wu-opacity-100 data-[state=open]:wu-opacity-100 md:wu-opacity-0",e),...r})});Ym.displayName="SidebarMenuAction";const Xm=v.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:f("wu-pointer-events-none wu-absolute wu-right-1 wu-flex wu-h-5 wu-min-w-5 wu-select-none wu-items-center wu-justify-center wu-rounded-md wu-px-1 wu-text-xs wu-font-medium wu-tabular-nums","","peer-data-[size=sm]/menu-button:wu-top-1","peer-data-[size=default]/menu-button:wu-top-1.5","peer-data-[size=lg]/menu-button:wu-top-2.5","group-data-[collapsible=icon]:wu-hidden",e),...t}));Xm.displayName="SidebarMenuBadge";const Zm=v.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{const s=v.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return a.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:f("wu-flex wu-h-8 wu-items-center wu-gap-2 wu-rounded-md wu-px-2",e),...n,children:[t&&a.jsx(Au,{className:"wu-rounded-md wu-size-4","data-sidebar":"menu-skeleton-icon"}),a.jsx(Au,{className:"wu-h-4 wu-max-w-[--skeleton-width] wu-flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})});Zm.displayName="SidebarMenuSkeleton";const Jm=v.forwardRef(({className:e,...t},n)=>a.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:f("wu-mx-3.5 wu-flex wu-min-w-0 wu-translate-x-px wu-flex-col wu-gap-1 wu-border-l wu-px-2.5 wu-py-0.5","group-data-[collapsible=icon]:wu-hidden",e),...t}));Jm.displayName="SidebarMenuSub";const Qm=v.forwardRef(({...e},t)=>a.jsx("li",{ref:t,...e}));Qm.displayName="SidebarMenuSubItem";const Rm=v.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:r,...s},o)=>{const i=e?pt.Slot:"a";return a.jsx(i,{ref:o,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:f("wu-flex wu-h-7 wu-min-w-0 wu-translate-x-px wu-items-center wu-gap-2 wu-overflow-hidden wu-rounded-md wu-px-2 wu-outline-none focus-visible:wu-ring-2 disabled:wu-pointer-events-none disabled:wu-opacity-50 aria-disabled:wu-pointer-events-none aria-disabled:wu-opacity-50 [&>span:last-child]:wu-truncate [&>svg]:wu-size-4 [&>svg]:wu-shrink-0","data-[active=true]:wu-bg-sidebar-accent data-[active=true]:wu-text-sidebar-accent-foreground",t==="sm"&&"wu-text-xs",t==="md"&&"wu-text-sm","group-data-[collapsible=icon]:wu-hidden",r),...s})});Rm.displayName="SidebarMenuSubButton";const eg=({children:e,Sidebar:t,className:n,defaultOpen:r=!0,open:s,onOpenChange:o,style:i})=>a.jsxs(Mu,{defaultOpen:r,open:s,onOpenChange:o,children:[a.jsxs(Du,{variant:"sidebar",collapsible:"icon",className:f("wu-top-12 wu-h-[calc(100%-48px)] wu-shadow-sidebar wu-border-none",n),style:i,role:"complementary",children:[a.jsx(Fu,{className:"wu-py-2",children:a.jsx($u,{})}),t]}),a.jsx(_u,{className:"wu-contain-inline-size",children:e})]}),$u=e=>{const{state:t,isMobile:n,openMobile:r}=lt();return a.jsx(Pu,{...e,children:a.jsx(Hs,{showMenu:n?r:t==="expanded"})})},tg=({className:e,children:t,...n})=>{const r=p.useRef(null),s=p.useRef(null),o=({currentTarget:u})=>{const{scrollTop:l,clientHeight:c,scrollHeight:d}=u;r.current&&r.current.classList.toggle("wu-border-[#1b338014]",l!==0),s.current&&s.current.classList.toggle("wu-border-[#1b338014]",l+c!==d)},i="wu-w-[calc(100%-16px)] wu-mx-auto wu-border-transparent";return a.jsxs(Lu,{...n,className:f("wu-overflow-hidden wu-gap-0",e),children:[a.jsx("hr",{className:i,ref:r}),a.jsx(Dt,{onScroll:o,className:"wu-gap-2",thumbColor:"#b9c3dc",railColor:"#00000000","data-testid":"scroll-area",children:t}),a.jsx("hr",{className:i,ref:s})]})},ng=e=>a.jsx(Vu,{...e,children:e.children}),rg=({label:e,children:t,...n})=>a.jsxs(Ou,{...n,className:"wu-p-0",children:[a.jsx("div",{className:"wu-h-8",children:a.jsx(Wu,{className:"wu-items-end wu-px-4 wu-text-xs wu-font-normal wu-leading-4 wu-text-blue-q",children:e})}),a.jsx(Bu,{children:a.jsx(Gs,{children:t})})]}),sg=e=>a.jsx(Gs,{...e}),ag=({Icon:e,children:t,className:n,isActive:r,...s})=>{const{state:o}=lt(),[i,u]=p.useState(),l=ku(),c=t&&p.cloneElement(t,{children:a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2 wu-overflow-hidden wu-text-base wu-truncate wu-text-ellipsis",children:[e,a.jsx("span",{className:f("wu-text-sm wu-leading-4 wu-transition-opacity wu-duration-150",o==="collapsed"&&!l&&"wu-opacity-0"),children:t.props.children})]})}),d=p.useRef(null);return p.useEffect(()=>{var w;u(((w=d.current)==null?void 0:w.textContent)||"")},[]),a.jsx(qu,{...s,className:"wu-flex wu-items-center wu-gap-2 wu-px-2",children:a.jsx(zu,{className:f("wu-flex wu-items-center wu-text-blue-q hover:wu-bg-blue-sidebarHover wu-cursor-pointer wu-h-8 wu-rounded-sm",n,r&&"wu-bg-white wu-shadow-[4px_4px_16px_0_#1B338014] wu-font-medium wu-text-blue-p hover:wu-bg-white wu-cursor-default"),isActive:r,tooltip:i,asChild:!0,ref:d,children:c})})},og=new Map([[-3,{top:-20,left:-4,zIndex:-1,opacity:0,transition:"all 0.3s ease-in-out, z-index 0s",position:"absolute"}],[-2,{top:0,left:0,zIndex:1,opacity:1,transition:"all 0.3s ease-in-out, z-index 0s",position:"absolute"}],[-1,{top:20,left:4,zIndex:2,opacity:1,transition:"all 0.3s ease-in-out, z-index 0s",position:"absolute"}],[0,{top:40,left:8,zIndex:3,opacity:1,transition:"all 0.3s ease-in-out, z-index 0.10s",position:"absolute"}],[1,{left:12,zIndex:4,opacity:1,transition:"all 0.3s ease-in-out, z-index 0.3s 0.10s",position:"absolute"}],[2,{left:16,zIndex:5,opacity:1,transition:"all 0.3s ease-in-out, z-index 0.3s 0.10s",position:"absolute"}],[3,{left:20,zIndex:-1,opacity:0,transition:"all 0.3s ease-in-out, z-index 0.3s 0.10s",position:"absolute"}]]),Ks=(e,t,n=1)=>{const r=e.match(/hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*([\d.]+)\s*)?\)/);if(!r)throw new Error("Invalid HSL color format");const s=parseFloat(r[1]),o=parseFloat(r[2]),i=Math.max(0,parseFloat(r[3])+t);return`hsl(${s} ${o}% ${i}% / ${n})`},ig=({index:e,viewIndex:t,length:n,itemHeight:r})=>{const s=(e-t+n)%n;let o;s===0?o=0:s===n-1&&n>=2?o=-1:s===n-2&&n>=3?o=-2:s===1?o=1:s===2?o=2:s===n-3&&n>=4?o=-3:o=3;const i=og.get(o)||{},u=o>0?r+28+(o-1)*20:i.top;return{position:o,styles:{...i,...o>0&&{top:`${u}px`},height:o>0?"32px":r}}},un={LIGHTNESS_STEP:8,BORDER_LIGHTNESS:10,CONTENT_HEIGHT:"calc(100% - 2rem)",FONT_SIZE_ACTIVE:"14px",FONT_SIZE_INACTIVE:"12px"},ug=({children:e,className:t,header:n,baseColor:r,position:s=0,style:o,...i})=>{const u=s<=0,l=s===0,c={border:l?`4px solid ${Ks(r,un.BORDER_LIGHTNESS)}`:"",...o},d={backgroundColor:Ks(r,s*un.LIGHTNESS_STEP),fontSize:l?un.FONT_SIZE_ACTIVE:un.FONT_SIZE_INACTIVE,transition:"all 0.3s ease",position:"relative",bottom:s<0?"4px":"0px",height:"32px",padding:"4px 8px"},w={backgroundColor:Ks(r,45+s*6),height:un.CONTENT_HEIGHT,position:"relative",bottom:s<0?"4px":"0px"};return a.jsxs("div",{className:f("wu-font-normal wu-transition-all wu-rounded-lg wu-overflow-hidden wu-w-full wu-cursor-pointer hover:-wu-translate-y-2",t),style:c,...i,children:[a.jsx("div",{style:d,className:"wu-text-white",children:n}),u&&a.jsx("div",{className:"wu-p-2 wu-overflow-y-auto wu-text-sm",style:w,children:e})]})},lg=({children:e,Trigger:t,Header:n,styles:r={},classNames:s={},open:o,onOpenChange:i,itemHeight:u})=>{const l={height:u,...r.Trigger};return a.jsxs(no,{open:o,onOpenChange:i,children:[a.jsx(ro,{className:f("wu-bg-gray-25 wu-z-0 wu-w-full wu-rounded-lg wu-rounded-tl-none wu-relative",s.Trigger),style:l,children:a.jsx("span",{className:"wu-absolute wu-text-xs wu-font-medium wu-bg-gray-25 -wu-top-6 wu-left-0 wu-p-1 wu-rounded-t-lg",children:t})}),a.jsxs(qr,{className:f("wu-top-[50%] wu-left-[50%] wu-bg-black/75 wu-backdrop-blur-[4px] wu-min-h-full wu-overflow-auto wu-shadow-none wu-max-w-none wu-border-none wu-text-white",s.Content),hideCloseButton:!0,isStackedCard:!0,style:r.Content,children:[a.jsx(Zt,{}),a.jsx(hr.DialogClose,{className:f("wu-absolute wu-right-2 wu-top-2 wu-w-8 wu-h-8 wu-flex wu-items-center wu-justify-center wu-z-10",s.CloseButton),style:r.CloseButton,"aria-label":"Close dialog",children:a.jsx(R,{icon:"wm-close",className:"wu-text-lg wu-m-4 wu-cursor-pointer"})}),n&&a.jsx(zr,{className:f("wu-h-12 wu-p-2 wu-pl-4 wu-bg-white/25 wu-backdrop-blur-[24px]",s.Header),style:r.Header,children:n}),e]})]})};function cg({controlled:e,default:t,name:n,state:r="value"}){const{current:s}=v.useRef(e!==void 0),[o,i]=v.useState(t),u=s?e:o;if(process.env.NODE_ENV!=="production"){v.useEffect(()=>{s!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${s?"":"un"}controlled ${r} state of ${n} to be ${s?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
16
16
|
`))},[r,n,e]);const{current:c}=v.useRef(t);v.useEffect(()=>{!s&&JSON.stringify(c)!==JSON.stringify(t)&&console.error([`Base UI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
|
|
17
|
-
`))},[JSON.stringify(t)])}const l=v.useCallback(c=>{s||i(c)},[]);return[u,l]}const $u={};function Pt(e,t){const n=v.useRef($u);return n.current===$u&&(n.current=e(t)),n}const Ks=v[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],cg=Ks&&Ks!==v.useLayoutEffect?Ks:e=>e();function Fe(e){const t=Pt(dg).current;return t.next=e,cg(t.effect),t.trampoline}function dg(){const e={next:void 0,callback:wg,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function wg(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const fg=[];function Hu(e){v.useEffect(e,fg)}const ln=0;class Xn{constructor(){vn(this,"currentId",ln);vn(this,"clear",()=>{this.currentId!==ln&&(clearTimeout(this.currentId),this.currentId=ln)});vn(this,"disposeEffect",()=>this.clear)}static create(){return new Xn}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=ln,n()},t)}isStarted(){return this.currentId!==ln}}function Uu(){const e=Pt(Xn.create).current;return Hu(e.disposeEffect),e}const ju=0;class Ys extends Xn{constructor(){super(...arguments);vn(this,"clear",()=>{this.currentId!==ju&&(clearInterval(this.currentId),this.currentId=ju)})}static create(){return new Ys}start(n,r){this.clear(),this.currentId=setInterval(()=>{r()},n)}}function pg(){const e=Pt(Ys.create).current;return Hu(e.disposeEffect),e}const Ve=typeof document<"u"?v.useLayoutEffect:()=>{};function Gu(e){const t=Pt(hg,e).current;return t.next=e,Ve(t.effect),t}function hg(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function mg(){const[,e]=v.useState({});return v.useCallback(()=>{e({})},[])}function Xs(e,t,n,r){const s=Pt(Ku).current;return bg(s,e,t,n,r)&&Yu(s,[e,t,n,r]),s.callback}function gg(e){const t=Pt(Ku).current;return yg(t,e)&&Yu(t,e),t.callback}function Ku(){return{callback:null,cleanup:null,refs:[]}}function bg(e,t,n,r,s){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==s}function yg(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function Yu(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let s=0;s<t.length;s+=1){const o=t[s];if(o!=null)switch(typeof o){case"function":{const i=o(n);typeof i=="function"&&(r[s]=i);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let s=0;s<t.length;s+=1){const o=t[s];if(o!=null)switch(typeof o){case"function":{const i=r[s];typeof i=="function"?i():o(null);break}case"object":{o.current=null;break}}}}}}}const xg={clip:"rect(0 0 0 0)",overflow:"hidden",whiteSpace:"nowrap",position:"fixed",top:0,left:0,border:0,padding:0,width:1,height:1,margin:-1};function Xu(){return typeof window<"u"}function Zs(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function vg(e){return Xu()?e instanceof Element||e instanceof Zs(e).Element:!1}function Ng(e){return Xu()?e instanceof HTMLElement||e instanceof Zs(e).HTMLElement:!1}function Cg(e){return(e==null?void 0:e.ownerDocument)||document}const Zn=typeof navigator<"u",Js=Ag(),Sg=Ig(),Tg=kg();typeof CSS>"u"||!CSS.supports||CSS.supports("-webkit-backdrop-filter:none");const Eg=Js.platform==="MacIntel"&&Js.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Js.platform);Zn&&Sg.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints,Tg.includes("jsdom/");function Ag(){if(!Zn)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e!=null&&e.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function kg(){if(!Zn)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function Ig(){if(!Zn)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}function Jn(e,...t){const n=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const Qs=v.createContext(void 0);process.env.NODE_ENV!=="production"&&(Qs.displayName="NumberFieldRootContext");function Qn(){const e=v.useContext(Qs);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: NumberFieldRootContext is missing. NumberField parts must be placed within <NumberField.Root>.":Jn(43));return e}function Le(){}const He=Object.freeze({});let Zu=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const Mg={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Dg={valid(e){return e===null?null:e?{[Zu.valid]:""}:{[Zu.invalid]:""}}},Ju=v.createContext({invalid:void 0,name:void 0,validityData:{state:Mg,errors:[],error:"",value:"",initialValue:null},setValidityData:Le,disabled:void 0,touched:!1,setTouched:Le,dirty:!1,setDirty:Le,filled:!1,setFilled:Le,focused:!1,setFocused:Le,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=He)=>e,getInputValidationProps:(e=He)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(Ju.displayName="FieldRootContext");function Rs(e=!0){const t=v.useContext(Ju);if(t.setValidityData===Le&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":Jn(28));return t}const Pg={...v};let Qu=0;function _g(e,t="mui"){const[n,r]=v.useState(e),s=e||n;return v.useEffect(()=>{n==null&&(Qu+=1,r(`${t}-${Qu}`))},[n,t]),s}const Ru=Pg.useId;function Fg(e,t){if(Ru!==void 0){const n=Ru();return e??(t?`${t}-${n}`:n)}return _g(e,t)}function Vg(e){return Fg(e,"base-ui")}const el=v.createContext({controlId:void 0,setControlId:Le,labelId:void 0,setLabelId:Le,messageIds:[],setMessageIds:Le,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(el.displayName="LabelableContext");function tl(){return v.useContext(el)}function Lg(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:s,setControlId:o}=tl(),i=Vg(t);return Ve(()=>{if(!(!n&&!t||o===Le)){if(n){const u=r==null?void 0:r.current;vg(u)&&u.closest("label")!=null?o(t??null):o(s??i)}else t&&o(t);return()=>{t&&o(void 0)}}},[t,r,s,o,n,i]),s??i}const cn={inputValue:()=>null,value:()=>null},Og=parseInt(v.version,10);function Wg(e){return Og>=e}function nl(e){if(!v.isValidElement(e))return null;const t=e,n=t.props;return(Wg(19)?n==null?void 0:n.ref:t.ref)??null}function ea(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Bg(e,t){const n={};for(const r in e){const s=e[r];if(t!=null&&t.hasOwnProperty(r)){const o=t[r](s);o!=null&&Object.assign(n,o);continue}s===!0?n[`data-${r.toLowerCase()}`]="":s&&(n[`data-${r.toLowerCase()}`]=s.toString())}return n}function qg(e,t){return typeof e=="function"?e(t):e}function zg(e,t){return typeof e=="function"?e(t):e}const dn={};function rl(e,t,n,r,s){let o={...ta(e,dn)};return t&&(o=Rn(o,t)),n&&(o=Rn(o,n)),r&&(o=Rn(o,r)),o}function $g(e){if(e.length===0)return dn;if(e.length===1)return ta(e[0],dn);let t={...ta(e[0],dn)};for(let n=1;n<e.length;n+=1)t=Rn(t,e[n]);return t}function Rn(e,t){return sl(t)?t(e):Hg(e,t)}function Hg(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=ea(e.style,r);break}case"className":{e[n]=al(e.className,r);break}default:Ug(n,r)?e[n]=jg(e[n],r):e[n]=r}}return e}function Ug(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),s=e.charCodeAt(2);return n===111&&r===110&&s>=65&&s<=90&&(typeof t=="function"||typeof t>"u")}function sl(e){return typeof e=="function"}function ta(e,t){return sl(e)?e(t):e??dn}function jg(e,t){return t?e?n=>{if(Gg(n)){const s=n;na(s);const o=t(s);return s.baseUIHandlerPrevented||e==null||e(s),o}const r=t(n);return e==null||e(n),r}:t:e}function na(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function al(e,t){return t?e?t+" "+e:t:e}function Gg(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function wn(e,t,n={}){const r=t.render,s=Kg(t,n);if(n.enabled===!1)return null;const o=n.state??He;return Yg(e,r,s,o)}function Kg(e,t={}){const{className:n,style:r,render:s}=e,{state:o=He,ref:i,props:u,stateAttributesMapping:l,enabled:c=!0}=t,d=c?qg(n,o):void 0,w=c?zg(r,o):void 0,h=c?Bg(o,l):He,m=c?ea(h,Array.isArray(u)?$g(u):u)??He:He;return typeof document<"u"&&(c?Array.isArray(i)?m.ref=gg([m.ref,nl(s),...i]):m.ref=Xs(m.ref,nl(s),i):Xs(null,null)),c?(d!==void 0&&(m.className=al(m.className,d)),w!==void 0&&(m.style=ea(m.style,w)),m):He}function Yg(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const s=rl(n,t.props);return s.ref=n.ref,v.cloneElement(t,s)}if(e&&typeof e=="string")return Xg(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":Jn(8))}function Xg(e,t){return e==="button"?p.createElement("button",{type:"button",...t,key:t.key}):e==="img"?p.createElement("img",{alt:"",...t,key:t.key}):v.createElement(e,t)}const ol=new Map;function fn(e,t){const n=JSON.stringify({locale:e,options:t}),r=ol.get(n);if(r)return r;const s=new Intl.NumberFormat(e,t);return ol.set(n,s),s}function _t(e,t,n){return e==null?"":fn(t,n).format(e)}function il(e,t,n){return _t(e,t,{...n,maximumFractionDigits:20})}const Zg=["零","〇","一","二","三","四","五","六","七","八","九"],Jg={零:"0","〇":"0",一:"1",二:"2",三:"3",四:"4",五:"5",六:"6",七:"7",八:"8",九:"9"},ul=["٠","١","٢","٣","٤","٥","٦","٧","٨","٩"],ll=["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"],ra=["0","1","2","3","4","5","6","7","8","9"],cl=["%","٪","%","﹪"],dl=["‰","؉"],wl=["−","-","‒","–","—","﹣"],fl=["+","﹢"],Qg=".",Rg=",",eb=new RegExp(`[${ul.join("")}]`,"g"),tb=new RegExp(`[${ll.join("")}]`,"g"),nb=new RegExp(`[${ra.join("")}]`,"g"),rb=new RegExp(`[${Zg.join("")}]`,"g"),sb=new RegExp(`[${cl.join("")}]`),ab=new RegExp(`[${dl.join("")}]`),sa=/[٠١٢٣٤٥٦٧٨٩]/,pl=/[۰۱۲۳۴۵۶۷۸۹]/,aa=/[零〇一二三四五六七八九]/,hl=new RegExp(`[${ra.join("")}]`),ob=[".",",",Qg,Rg,"٫","٬"],ml=new RegExp("\\p{Zs}","u"),ib=["+",...fl],ub=["-",...wl],er=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),lb=e=>e.replace(/[-\\\]^]/g,t=>`\\${t}`),gl=e=>`[${e.map(lb).join("")}]`,bl=gl(["-"].concat(wl)),yl=gl(["+"].concat(fl)),xl=new RegExp(bl,"gu"),vl=new RegExp(yl,"gu"),pn=new RegExp(bl),tr=new RegExp(yl);function oa(e,t){const n=fn(e,t).formatToParts(11111.1),r={};return n.forEach(s=>{r[s.type]=s.value}),fn(e).formatToParts(.1).forEach(s=>{s.type==="decimal"&&(r[s.type]=s.value)}),r}function Ft(e,t,n){if(e==null)return null;let r=String(e).replace(new RegExp("\\p{Cf}","gu"),"").trim();r=r.replace(xl,"-").replace(vl,"+");let s=!1;const o=r.match(/([+-])\s*$/);o&&(o[1]==="-"&&(s=!0),r=r.replace(/([+-])\s*$/,""));const i=r.match(/^\s*([+-])/);i&&(i[1]==="-"&&(s=!0),r=r.replace(/^\s*[+-]/,""));let u=t;u===void 0&&(sa.test(r)||pl.test(r)?u="ar":aa.test(r)&&(u="zh"));const{group:l,decimal:c,currency:d}=oa(u,n),w=fn(u,n).formatToParts(1).filter(A=>A.type==="unit").map(A=>er(A.value)),h=w.length?new RegExp(w.join("|"),"g"):null;let m=null;l&&(new RegExp("\\p{Zs}","u").test(l)?m=new RegExp("\\p{Zs}","gu"):l==="'"||l==="’"?m=/['’]/g:m=new RegExp(er(l),"g"));let g=[{regex:l?m:null,replacement:""},{regex:c?new RegExp(er(c),"g"):null,replacement:"."},{regex:/./g,replacement:"."},{regex:/,/g,replacement:""},{regex:/٫/g,replacement:"."},{regex:/٬/g,replacement:""},{regex:d?new RegExp(er(d),"g"):null,replacement:""},{regex:h,replacement:""},{regex:eb,replacement:A=>String(ul.indexOf(A))},{regex:tb,replacement:A=>String(ll.indexOf(A))},{regex:nb,replacement:A=>String(ra.indexOf(A))},{regex:rb,replacement:A=>Jg[A]}].reduce((A,{regex:k,replacement:D})=>k?A.replace(k,D):A,r);const x=g.lastIndexOf(".");if(x!==-1&&(g=`${g.slice(0,x).replace(/\./g,"")}.${g.slice(x+1).replace(/\./g,"")}`),/^[-+]?Infinity$/i.test(r)||/[∞]/.test(r))return null;const C=(s?"-":"")+g;let y=parseFloat(C);const N=n==null?void 0:n.style,S=N==="unit"&&(n==null?void 0:n.unit)==="percent",E=sb.test(e)||N==="percent";return ab.test(e)?y/=1e3:!S&&E&&(y/=100),Number.isNaN(y)?null:y}const cb=60,db=400,wb=50,fb=3,pb=8,nr=1;function hb(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const mb=1e-10;function gb(e){const t=fn("en-US").resolvedOptions(),n=(e==null?void 0:e.minimumFractionDigits)??t.minimumFractionDigits??0;return{maximumFractionDigits:Math.max((e==null?void 0:e.maximumFractionDigits)??t.maximumFractionDigits??20,n),minimumFractionDigits:n}}function bb(e,t){if(!Number.isFinite(e))return e;const n=Math.min(Math.max(t,0),20);return Number(e.toFixed(n))}function ia(e,t){const{maximumFractionDigits:n}=gb(t);return bb(e,n)}function yb(e,t,n,r="directional"){if(n===0)return e;const s=Math.abs(n),o=Math.sign(n),i=s*mb*o,u=r==="nearest"?n:s,l=(e-t+i)/u;let c;return r==="nearest"?c=Math.round(l):o>0?c=Math.floor(l):c=Math.ceil(l),t+c*(r==="nearest"?n:s)}function xb(e,{step:t,minWithDefault:n,maxWithDefault:r,minWithZeroDefault:s,format:o,snapOnStep:i,small:u}){if(e===null)return e;const l=hb(e,n,r);if(t!=null&&i){if(t===0)return ia(l,o);let c=s;!u&&n!==Number.MIN_SAFE_INTEGER&&(c=n);const d=yb(l,c,t,u?"nearest":"directional");return ia(d,o)}return ia(l,o)}const vb="none",Nl="input-change",ua="input-clear",Cl="input-blur",Nb="input-paste",hn="keyboard";function Oe(e,t,n,r){let s=!1,o=!1;const i=r??He;return{reason:e,event:t??new Event("base-ui"),cancel(){s=!0},allowPropagation(){o=!0},get isCanceled(){return s},get isPropagationAllowed(){return o},trigger:n,...i}}function mn(e,t,n){const r=He;return{reason:e,event:t??new Event("base-ui"),...r}}const Sl=v.forwardRef(function(t,n){const{id:r,min:s,max:o,smallStep:i=.1,step:u=1,largeStep:l=10,required:c=!1,disabled:d=!1,readOnly:w=!1,name:h,defaultValue:m,value:b,onValueChange:g,onValueCommitted:x,allowWheelScrub:C=!1,snapOnStep:y=!1,format:N,locale:S,render:E,className:I,inputRef:A,...k}=t,{setDirty:D,validityData:_,disabled:F,setFilled:$,invalid:O,name:G,state:z,validation:ue,shouldValidateOnChange:M}=Rs(),V=F||d,q=G??h,[B,re]=v.useState(!1),ae=s??Number.MIN_SAFE_INTEGER,ve=o??Number.MAX_SAFE_INTEGER,Ue=s??0,j=N==null?void 0:N.style,P=v.useRef(null),U=Xs(A,ue.inputRef),Z=Lg({id:r}),[W,ee]=lg({controlled:b,default:m,name:"NumberField",state:"value"}),H=W??null,be=Gu(H);Ve(()=>{$(H!==null)},[$,H]);const Ne=mg(),Ce=Gu(N),me=v.useRef(!1),We=Fe((J,X)=>{me.current=!1,x==null||x(J,X)}),Ke=Uu(),Vt=pg(),Lt=Uu(),lr=v.useRef(!1),cr=v.useRef(0),dt=v.useRef(!0),Ot=v.useRef(null),wt=v.useRef(()=>{}),[oe,je]=v.useState(()=>b!==void 0?Tl(H,S,N):_t(H,S,N)),[dr,fy]=v.useState("numeric"),wc=Fe(()=>{const{decimal:J,group:X,currency:le,literal:fe}=oa(S,N),te=new Set;ob.forEach(Ee=>te.add(Ee)),J&&te.add(J),X&&(te.add(X),ml.test(X)&&te.add(" "));const Be=j==="percent"||j==="unit"&&(N==null?void 0:N.unit)==="percent",xn=j==="percent"||j==="unit"&&(N==null?void 0:N.unit)==="permille";return Be&&cl.forEach(Ee=>te.add(Ee)),xn&&dl.forEach(Ee=>te.add(Ee)),j==="currency"&&le&&te.add(le),fe&&(Array.from(fe).forEach(Ee=>te.add(Ee)),ml.test(fe)&&te.add(" ")),ib.forEach(Ee=>te.add(Ee)),ae<0&&ub.forEach(Ee=>te.add(Ee)),te}),Wt=Fe(J=>J!=null&&J.altKey?i:J!=null&&J.shiftKey?l:u),wr=Fe((J,X)=>{const le=X.event,fe=X.direction,te=xb(J,{step:fe?Wt(le)*fe:void 0,format:Ce.current,minWithDefault:ae,maxWithDefault:ve,minWithZeroDefault:Ue,snapOnStep:y,small:(le==null?void 0:le.altKey)??!1});if(te!==H||J!==H||dt.current===!1){if(Ot.current=te,g==null||g(te,X),X.isCanceled)return;ee(te),D(te!==_.initialValue),me.current=!0}dt.current&&je(_t(te,S,N)),Ne()}),yn=Fe((J,{direction:X,currentValue:le,event:fe,reason:te})=>{const Be=le??be.current,xn=typeof Be=="number"?Be+J*X:Math.max(0,s??0);wr(xn,Oe(te,fe,void 0,{direction:X}))}),Bt=Fe(()=>{Lt.clear(),Ke.clear(),Vt.clear(),wt.current(),cr.current=0}),fc=Fe((J,X)=>{if(Bt(),!P.current)return;const le=Zs(P.current);function fe(Be){Be.preventDefault()}le.addEventListener("contextmenu",fe),wt.current=()=>{le.removeEventListener("contextmenu",fe)},le.addEventListener("pointerup",Be=>{lr.current=!1,Bt();const xn=Ot.current??be.current;We(xn,mn(J?"increment":"decrement",Be))},{once:!0});function te(){const Be=Wt(X)??nr;yn(Be,{direction:J?1:-1,event:X,reason:J?"increment-press":"decrement-press"})}te(),Ke.start(db,()=>{Vt.start(cb,te)})});Ve(function(){if(!dt.current)return;const X=b!==void 0?Tl(H,S,N):_t(H,S,N);X!==oe&&je(X)}),Ve(function(){if(!Eg)return;let X="text";ae>=0&&(X="decimal"),fy(X)},[ae,j]),v.useEffect(()=>()=>Bt(),[Bt]),v.useEffect(function(){const X=P.current;if(V||w||!C||!X)return;function le(fe){if(fe.ctrlKey||Cg(P.current).activeElement!==P.current)return;fe.preventDefault();const te=Wt(fe)??nr;yn(te,{direction:fe.deltaY>0?-1:1,event:fe,reason:"wheel"})}return X.addEventListener("wheel",le),()=>{X.removeEventListener("wheel",le)}},[C,yn,V,w,l,u,Wt]);const ya=v.useMemo(()=>({...z,disabled:V,readOnly:w,required:c,value:H,inputValue:oe,scrubbing:B}),[z,V,w,c,H,oe,B]),py=v.useMemo(()=>({inputRef:P,inputValue:oe,value:H,startAutoChange:fc,stopAutoChange:Bt,minWithDefault:ae,maxWithDefault:ve,disabled:V,readOnly:w,id:Z,setValue:wr,incrementValue:yn,getStepAmount:Wt,allowInputSyncRef:dt,formatOptionsRef:Ce,valueRef:be,lastChangedValueRef:Ot,hasPendingCommitRef:me,isPressedRef:lr,intentionalTouchCheckTimeout:Lt,movesAfterTouchRef:cr,name:q,required:c,invalid:O,inputMode:dr,getAllowedNonNumericKeys:wc,min:s,max:o,setInputValue:je,locale:S,isScrubbing:B,setIsScrubbing:re,state:ya,onValueCommitted:We}),[P,oe,H,fc,Bt,ae,ve,V,w,Z,wr,yn,Wt,Ce,be,Lt,q,c,O,dr,wc,s,o,je,S,B,ya,We]),hy=wn("div",t,{ref:n,state:ya,props:k,stateAttributesMapping:cn});return a.jsxs(Qs.Provider,{value:py,children:[hy,a.jsx("input",{...ue.getInputValidationProps({onChange(J){if(J.nativeEvent.defaultPrevented)return;const X=J.currentTarget.valueAsNumber,le=Number.isNaN(X)?null:X,fe=Oe(vb,J.nativeEvent);D(le!==_.initialValue),wr(le,fe),M()&&ue.commit(le)}}),ref:U,type:"number",name:q,value:H??"",min:s,max:o,step:u,disabled:V,required:c,"aria-hidden":!0,tabIndex:-1,style:xg})]})});process.env.NODE_ENV!=="production"&&(Sl.displayName="NumberFieldRoot");function Tl(e,t,n){return(n==null?void 0:n.maximumFractionDigits)!=null||(n==null?void 0:n.minimumFractionDigits)!=null?_t(e,t,n):il(e,t,n)}const El=v.forwardRef(function(t,n){const{render:r,className:s,...o}=t,{state:i}=Qn();return wn("div",t,{ref:n,state:i,props:[{role:"group"},o],stateAttributesMapping:cn})});process.env.NODE_ENV!=="production"&&(El.displayName="NumberFieldGroup");let la;process.env.NODE_ENV!=="production"&&(la=new Set);function Al(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");la.has(t)||(la.add(t),console.error(`Base UI: ${t}`))}}const kl=v.createContext(void 0);process.env.NODE_ENV!=="production"&&(kl.displayName="CompositeRootContext");function Cb(e=!1){const t=v.useContext(kl);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":Jn(16));return t}function Sb(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:s=0,isNativeButton:o}=e,i=r&&t!==!1,u=r&&t===!1;return{props:v.useMemo(()=>{const c={onKeyDown(d){n&&t&&d.key!=="Tab"&&d.preventDefault()}};return r||(c.tabIndex=s,!o&&n&&(c.tabIndex=t?s:-1)),(o&&(t||i)||!o&&n)&&(c["aria-disabled"]=n),o&&(!t||u)&&(c.disabled=n),c},[r,n,t,i,u,o,s])}}function Il(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:s=!0}=e,o=v.useRef(null),i=Cb(!0)!==void 0,u=Fe(()=>{const h=o.current;return!!((h==null?void 0:h.tagName)==="A"&&(h!=null&&h.href))}),{props:l}=Sb({focusableWhenDisabled:n,disabled:t,composite:i,tabIndex:r,isNativeButton:s});process.env.NODE_ENV!=="production"&&v.useEffect(()=>{if(!o.current)return;const h=o.current.tagName==="BUTTON";s?h||Al("A component that acts as a button was not rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is a real <button>, or set the `nativeButton` prop on the component to `false`."):h&&Al("A component that acts as a button was rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is not a real <button>, or set the `nativeButton` prop on the component to `true`.")},[s]);const c=v.useCallback(()=>{const h=o.current;Tb(h)&&i&&t&&l.disabled===void 0&&h.disabled&&(h.disabled=!1)},[t,l.disabled,i]);Ve(c,[c]);const d=v.useCallback((h={})=>{const{onClick:m,onMouseDown:b,onKeyUp:g,onKeyDown:x,onPointerDown:C,...y}=h;return rl({type:s?"button":void 0,onClick(S){if(t){S.preventDefault();return}m==null||m(S)},onMouseDown(S){t||b==null||b(S)},onKeyDown(S){if(t||(na(S),x==null||x(S)),S.baseUIHandlerPrevented)return;const E=S.target===S.currentTarget&&!s&&!u()&&!t,I=S.key==="Enter",A=S.key===" ";E&&((A||I)&&S.preventDefault(),I&&(m==null||m(S)))},onKeyUp(S){t||(na(S),g==null||g(S)),!S.baseUIHandlerPrevented&&S.target===S.currentTarget&&!s&&!t&&S.key===" "&&(m==null||m(S))},onPointerDown(S){if(t){S.preventDefault();return}C==null||C(S)}},s?void 0:{role:"button"},l,y)},[t,l,s,u]),w=Fe(h=>{o.current=h,c()});return{getButtonProps:d,buttonRef:w}}function Tb(e){return Ng(e)&&e.tagName==="BUTTON"}function Ml(e){const{allowInputSyncRef:t,disabled:n,formatOptionsRef:r,getStepAmount:s,id:o,incrementValue:i,inputRef:u,inputValue:l,intentionalTouchCheckTimeout:c,isIncrement:d,isPressedRef:w,locale:h,maxWithDefault:m,minWithDefault:b,movesAfterTouchRef:g,readOnly:x,setValue:C,startAutoChange:y,stopAutoChange:N,value:S,valueRef:E,lastChangedValueRef:I,onValueCommitted:A}=e,k=v.useRef({x:0,y:0}),D=v.useRef(!1),_=v.useRef(!1),F=v.useRef(""),$=S!=null&&S<=b,O=S!=null&&S>=m,G=d?"increment-press":"decrement-press";function z(M){t.current=!0;const V=Ft(l,h,r.current);V!==null&&(E.current=V,C(V,Oe(G,M,void 0,{direction:d?1:-1})))}return{disabled:n||(d?O:$),"aria-readonly":x||void 0,"aria-label":d?"Increase":"Decrease","aria-controls":o,tabIndex:-1,style:{WebkitUserSelect:"none",userSelect:"none"},onTouchStart(){D.current=!0},onTouchEnd(){D.current=!1},onClick(M){const V=n||x||(d?O:$);if(M.defaultPrevented||V||(F.current==="touch"?_.current:M.detail!==0))return;z(M.nativeEvent);const q=s(M)??nr,B=E.current;i(q,{direction:d?1:-1,event:M.nativeEvent,reason:G});const re=I.current??E.current;re!==B&&A(re,mn(G,M.nativeEvent))},onPointerDown(M){var B;const V=!M.button||M.button===0,q=n||(d?O:$);M.defaultPrevented||x||!V||q||(F.current=M.pointerType,_.current=!1,w.current=!0,k.current={x:M.clientX,y:M.clientY},z(M.nativeEvent),M.pointerType!=="touch"?(M.preventDefault(),(B=u.current)==null||B.focus(),y(d,M)):c.start(wb,()=>{const re=g.current;g.current=0,w.current&&re!=null&&re<fb?(y(d,M),_.current=!0):(_.current=!1,N())}))},onPointerUp(M){M.pointerType==="touch"&&(w.current=!1)},onPointerMove(M){if(n||x||(d?O:$)||M.pointerType!=="touch"||!w.current)return;g.current!=null&&(g.current+=1);const{x:q,y:B}=k.current,re=q-M.clientX,ae=B-M.clientY;re**2+ae**2>pb**2&&N()},onMouseEnter(M){const V=n||x||(d?O:$);M.defaultPrevented||V||!w.current||D.current||F.current==="touch"||y(d,M)},onMouseLeave(){D.current||N()},onMouseUp(){D.current||N()}}}const Dl=v.forwardRef(function(t,n){const{render:r,className:s,disabled:o=!1,nativeButton:i=!0,...u}=t,{allowInputSyncRef:l,disabled:c,formatOptionsRef:d,getStepAmount:w,id:h,incrementValue:m,inputRef:b,inputValue:g,intentionalTouchCheckTimeout:x,isPressedRef:C,locale:y,maxWithDefault:N,minWithDefault:S,movesAfterTouchRef:E,readOnly:I,setValue:A,startAutoChange:k,state:D,stopAutoChange:_,value:F,valueRef:$,lastChangedValueRef:O,onValueCommitted:G}=Qn(),z=o||c,ue=Ml({isIncrement:!0,inputRef:b,startAutoChange:k,stopAutoChange:_,minWithDefault:S,maxWithDefault:N,value:F,inputValue:g,disabled:z,readOnly:I,id:h,setValue:A,getStepAmount:w,incrementValue:m,allowInputSyncRef:l,formatOptionsRef:d,valueRef:$,isPressedRef:C,intentionalTouchCheckTimeout:x,movesAfterTouchRef:E,locale:y,lastChangedValueRef:O,onValueCommitted:G}),{getButtonProps:M,buttonRef:V}=Il({disabled:z,native:i}),q=v.useMemo(()=>({...D,disabled:z}),[D,z]);return wn("button",t,{ref:[n,V],state:q,props:[ue,u,M],stateAttributesMapping:cn})});process.env.NODE_ENV!=="production"&&(Dl.displayName="NumberFieldIncrement");const Pl=v.forwardRef(function(t,n){const{render:r,className:s,disabled:o=!1,nativeButton:i=!0,...u}=t,{allowInputSyncRef:l,disabled:c,formatOptionsRef:d,getStepAmount:w,id:h,incrementValue:m,inputRef:b,inputValue:g,intentionalTouchCheckTimeout:x,isPressedRef:C,maxWithDefault:y,minWithDefault:N,movesAfterTouchRef:S,readOnly:E,setValue:I,startAutoChange:A,state:k,stopAutoChange:D,value:_,valueRef:F,locale:$,lastChangedValueRef:O,onValueCommitted:G}=Qn(),z=o||c,ue=Ml({isIncrement:!1,inputRef:b,startAutoChange:A,stopAutoChange:D,minWithDefault:N,maxWithDefault:y,value:_,inputValue:g,disabled:z,readOnly:E,id:h,setValue:I,getStepAmount:w,incrementValue:m,allowInputSyncRef:l,formatOptionsRef:d,valueRef:F,isPressedRef:C,intentionalTouchCheckTimeout:x,movesAfterTouchRef:S,locale:$,lastChangedValueRef:O,onValueCommitted:G}),{getButtonProps:M,buttonRef:V}=Il({disabled:z,native:i}),q=v.useMemo(()=>({...k,disabled:z}),[k,z]);return wn("button",t,{ref:[n,V],state:q,props:[ue,u,M],stateAttributesMapping:cn})});process.env.NODE_ENV!=="production"&&(Pl.displayName="NumberFieldDecrement");function Eb(e){e.preventDefault(),e.stopPropagation()}function Ab(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const _l=v.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Le,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(_l.displayName="FormContext");function Fl(){return v.useContext(_l)}function kb(e){const{enabled:t=!0,value:n,id:r,name:s,controlRef:o,commit:i}=e,{formRef:u}=Fl(),{invalid:l,markedDirtyRef:c,validityData:d,setValidityData:w}=Rs(),h=Fe(e.getValue);Ve(()=>{if(!t)return;let m=n;m===void 0&&(m=h()),d.initialValue===null&&m!==null&&w(b=>({...b,initialValue:m}))},[t,w,n,d.initialValue,h]),Ve(()=>{!t||!r||u.current.fields.set(r,{getValue:h,name:s,controlRef:o,validityData:Ab(d,l),validate(){let m=n;m===void 0&&(m=h()),c.current=!0,Vc.flushSync(()=>i(m))}})},[i,o,t,u,h,r,l,c,s,d,n]),Ve(()=>{const m=u.current.fields;return()=>{r&&m.delete(r)}},[u,r])}function Ib(e,t){const n=v.useRef(e),r=Fe(t);Ve(()=>{n.current!==e&&r(n.current)},[e,r]),Ve(()=>{n.current=e},[e])}const Mb={...Dg,...cn},Db=new Set(["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Enter","Escape"]),Vl=v.forwardRef(function(t,n){const{render:r,className:s,...o}=t,{allowInputSyncRef:i,disabled:u,formatOptionsRef:l,getAllowedNonNumericKeys:c,getStepAmount:d,id:w,incrementValue:h,inputMode:m,inputValue:b,max:g,min:x,name:C,readOnly:y,required:N,setValue:S,state:E,setInputValue:I,locale:A,inputRef:k,value:D,onValueCommitted:_,lastChangedValueRef:F,hasPendingCommitRef:$,valueRef:O}=Qn(),{clearErrors:G}=Fl(),{validationMode:z,setTouched:ue,setFocused:M,invalid:V,shouldValidateOnChange:q,validation:B}=Rs(),{labelId:re}=tl(),ae=v.useRef(!1),ve=v.useRef(!1);return kb({id:w,commit:B.commit,value:D,controlRef:k,name:C,getValue:()=>D??null}),Ib(D,P=>{const U=q();if(G(C),U&&B.commit(D),!(P===D||U)){if(ve.current){ve.current=!1;return}B.commit(D,!0)}}),wn("input",t,{ref:[n,k],state:E,props:[{id:w,required:N,disabled:u,readOnly:y,inputMode:m,value:b,type:"text",autoComplete:"off",autoCorrect:"off",spellCheck:"false","aria-roledescription":"Number field","aria-invalid":V||void 0,"aria-labelledby":re,suppressHydrationWarning:!0,onFocus(P){if(P.defaultPrevented||y||u||ae.current)return;ae.current=!0,M(!0);const U=P.currentTarget,Z=U.value.length;U.setSelectionRange(Z,Z)},onBlur(P){if(P.defaultPrevented||y||u)return;ue(!0),M(!1);const U=!i.current,Z=$.current;if(i.current=!0,b.trim()===""){S(null,Oe(ua,P.nativeEvent)),z==="onBlur"&&B.commit(null),_(null,mn(ua,P.nativeEvent));return}const W=l.current,ee=Ft(b,A,W);if(ee===null)return;const H=(W==null?void 0:W.maximumFractionDigits)!=null||(W==null?void 0:W.minimumFractionDigits)!=null,be=W==null?void 0:W.maximumFractionDigits,Ne=H&&typeof be=="number"?Number(ee.toFixed(be)):ee,Ce=mn(Cl,P.nativeEvent),me=D!==Ne,We=U||me||Z;z==="onBlur"&&B.commit(Ne),me&&(ve.current=!0,S(Ne,Oe(Cl,P.nativeEvent))),We&&_(Ne,Ce);const Ke=_t(Ne,A,W),Vt=il(ee,A,W);!(!H&&ee===D&&b===Vt)&&b!==Ke&&I(Ke)},onChange(P){if(P.nativeEvent.defaultPrevented)return;i.current=!1;const U=P.target.value;if(U.trim()===""){I(U),S(null,Oe(ua,P.nativeEvent));return}const Z=c();if(!Array.from(U).every(H=>{const be=H>="0"&&H<="9",Ne=sa.test(H),Ce=aa.test(H),me=pl.test(H),We=hl.test(H),Ke=pn.test(H);return be||Ne||Ce||me||We||Ke||Z.has(H)}))return;if(P.isTrusted){I(U);const H=Ft(U,A,l.current);H!==null&&S(H,Oe(Nl,P.nativeEvent));return}const ee=Ft(U,A,l.current);ee!==null&&(I(U),S(ee,Oe(Nl,P.nativeEvent)))},onKeyDown(P){if(P.defaultPrevented||y||u)return;const U=P.nativeEvent;i.current=!0;const Z=c();let W=Z.has(P.key);const{decimal:ee,currency:H,percentSign:be}=oa(A,l.current),Ne=P.currentTarget.selectionStart,Ce=P.currentTarget.selectionEnd,me=Ne===0&&Ce===b.length,We=oe=>Ne!=null&&Ce!=null&&oe>=Ne&&oe<Ce;if(pn.test(P.key)&&Array.from(Z).some(oe=>pn.test(oe||""))){const oe=b.search(xl),je=oe!=null&&oe!==-1&&We(oe);W=!(pn.test(b)||tr.test(b))||me||je}if(tr.test(P.key)&&Array.from(Z).some(oe=>tr.test(oe||""))){const oe=b.search(vl),je=oe!=null&&oe!==-1&&We(oe);W=!(pn.test(b)||tr.test(b))||me||je}[ee,H,be].forEach(oe=>{if(P.key===oe){const je=b.indexOf(oe),dr=We(je);W=!b.includes(oe)||me||dr}});const Ke=P.key>="0"&&P.key<="9",Vt=sa.test(P.key),Lt=aa.test(P.key),lr=hl.test(P.key),cr=Db.has(P.key);if(P.which===229||P.altKey||P.ctrlKey||P.metaKey||W||Ke||Vt||lr||Lt||cr)return;const dt=Ft(b,A,l.current),Ot=d(P)??nr;Eb(P);const wt=mn(hn,U);P.key==="ArrowUp"?(h(Ot,{direction:1,currentValue:dt,event:U,reason:hn}),_(F.current??O.current,wt)):P.key==="ArrowDown"?(h(Ot,{direction:-1,currentValue:dt,event:U,reason:hn}),_(F.current??O.current,wt)):P.key==="Home"&&x!=null?(S(x,Oe(hn,U)),_(F.current??O.current,wt)):P.key==="End"&&g!=null&&(S(g,Oe(hn,U)),_(F.current??O.current,wt))},onPaste(P){if(P.defaultPrevented||y||u)return;P.preventDefault();const Z=(P.clipboardData||window.Clipboard).getData("text/plain"),W=Ft(Z,A,l.current);W!==null&&(i.current=!1,S(W,Oe(Nb,P.nativeEvent)),I(Z))}},B.getValidationProps(),o],stateAttributesMapping:Mb})});process.env.NODE_ENV!=="production"&&(Vl.displayName="NumberFieldInput");const Pb={wuStepper:"_wuStepper_apbnq_1"},_b=({onChange:e,Label:t,defaultValue:n=0,readonly:r,dir:s,step:o=1,min:i,max:u,value:l,className:c,labelPosition:d="left",disabled:w,resetInvalidValueOnBlur:h=!0,...m})=>{const b=v.useId(),[g,x]=v.useState(l!==void 0?Number(l):n||0);v.useEffect(()=>{l!==void 0&&x(Number(l))},[l]);const C=A=>{x(A),e==null||e(A)},y=A=>{const k=Number(A.target.value);Number.isNaN(k)||x(k)},N=()=>{h&&(i!==void 0&&g<i?(x(i),e==null||e(i)):u!==void 0&&g>u&&(x(u),e==null||e(u)))};v.useEffect(()=>{l&&n&&console.warn("As both value and defaultValue are passed, value will be used")},[l,n]);const S={inc:r||u!==void 0&&g>=u||w,dec:r||i!==void 0&&g<=i||w},E=i!==void 0&&g<i||u!==void 0&&g>u,I=f("wu-flex wu-items-center wu-justify-center wu-rounded-none wu-bg-gray-10 wu-w-8 wu-h-8 wu-text-blue-q wu-p-2 wu-absolute wu-top-0 hover:wu-bg-gray-20","disabled:wu-cursor-not-allowed disabled:wu-bg-black/10 disabled:wu-text-gray-subtle disabled:wu-outline-gray-subtle");return a.jsxs(Sl,{id:b,value:g,step:o,readOnly:r,onValueChange:A=>typeof A=="number"&&C(A),dir:s,className:f("wu-flex wu-stepper",s==="rtl"&&d!=="top"&&"wu-gap-2",Pb.wuStepper,Fb({labelPosition:d}),c),children:[t&&a.jsx(Te,{htmlFor:b,className:"wu-input-label",children:t}),a.jsxs(El,{className:"wu-flex wu-max-w-[97px] wu-relative",children:[a.jsx(Pl,{"aria-label":"decrement",className:f(I,s==="rtl"?"wu-right-0":"wu-left-0","wu-stepper-button"),disabled:S.dec,children:a.jsx("span",{className:"wu-text-base wm-minimize"})}),a.jsx(Vl,{"aria-label":"stepper",role:"spinbutton",type:"text","aria-invalid":E||void 0,dir:s,className:f("wu-flex wu-w-[97px] wu-h-8 wu-border-b wu-border-gray-subtle wu-bg-gray-10 wu-p-2 wu-text-sm wu-font-normal wu-text-gray-lead","wu-h-[33px] wu-text-center wu-text-blue-q wu-text-xs wu-rounded-t-sm ","focus:wu-border-blue-p focus-visible:wu-outline-none wu-transition-colors hover:wu-border-gray-40","disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle","read-only:wu-cursor-not-allowed read-only:wu-bg-gray-20 read-only:wu-border-gray-40 read-only:wu-text-gray-subtle",E&&"wu-border-red-deep focus:wu-border-red-deep","wu-stepper-input"),readOnly:r,onChange:y,onBlur:N,disabled:w,min:i,max:u,step:o,value:g,...m}),a.jsx(Dl,{"aria-label":"increment",className:f(I,s==="rtl"?"wu-left-0":"wu-right-0","wu-stepper-button"),disabled:S.inc,children:a.jsx("span",{className:"wu-text-base wm-add"})})]})]})},Fb=ke.cva("wu-flex wu-w-fit",{variants:{labelPosition:{left:"wu-flex-row wu-text-right wu-gap-2 wu-items-center",top:"wu-flex-col"}}}),Ll=ke.cva("wu-inline-flex wu-items-center wu-justify-center wu-text-sm wu-font-medium wu-ring-offset-background wu-transition-colors hover:wu-bg-muted hover:wu-text-muted-foreground focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-2 disabled:wu-cursor-not-allowed disabled:wu-opacity-80",{variants:{variant:{default:"wu-bg-transparent",outline:"wu-border wu-border-input wu-bg-transparent hover:wu-bg-accent hover:wu-text-accent-foreground"},size:{default:"wu-h-10 wu-px-3",sm:"wu-h-9 wu-px-2.5",lg:"wu-h-11 wu-px-5"}},defaultVariants:{variant:"default",size:"default"}}),Vb=v.forwardRef(({className:e,variant:t,size:n,...r},s)=>a.jsx(Sa.Root,{ref:s,className:f(Ll({variant:t,size:n,className:e})),...r}));Vb.displayName=Sa.Root.displayName;const Ol=v.createContext({size:"default",variant:"default"}),rr=v.forwardRef(({className:e,variant:t,size:n,children:r,...s},o)=>a.jsx(Nn.Root,{ref:o,className:f("wu-flex wu-items-center wu-justify-center wu-gap-1",e),...s,children:a.jsx(Ol.Provider,{value:{variant:t,size:n},children:r})}));rr.displayName=Nn.Root.displayName;const ct=v.forwardRef(({className:e,children:t,variant:n,size:r,...s},o)=>{const i=v.useContext(Ol);return a.jsx(Nn.Item,{ref:o,className:f(Ll({variant:i.variant||n,size:i.size||r}),e),...s,children:t})});ct.displayName=Nn.Item.displayName;const Wl=p.forwardRef((e,t)=>{const{options:n,value:r,disabled:s,dir:o,onChange:i}=e,u=l=>f("wu-w-8 wu-h-8 wu-text-xl wu-leading-5 wu-rounded-full wu-text-gray-lead wu-relative wu-z-10 wu-p-0 wu-flex wu-items-center wu-justify-center",s&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-lead",l===r&&"wu-text-white",s&&r===l&&"wu-text-gray-lead","wu-switcher-icon-tab-item");return a.jsx(a.Fragment,{children:a.jsxs(rr,{ref:t,type:"single",value:r,onValueChange:i,disabled:s,dir:o,className:f("wu-relative wu-group wu-flex wu-flex-row wu-items-start wu-justify-start wu-gap-0 wu-w-16 wu-bg-gray-25 wu-rounded-full",s&&"wu-cursor-not-allowed","wu-switcher-icon-tab-group"),children:[a.jsx("div",{role:"slider",className:f("wu-absolute wu-z-0 wu-w-8 wu-h-8 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out",r==="opt1"&&"",r==="opt2"&&o!=="rtl"&&"wu-translate-x-full",r==="opt2"&&o==="rtl"&&"-wu-translate-x-full",s&&"wu-bg-gray-40","wu-switcher-icon-tab-slider")}),a.jsx(ct,{value:"opt1",className:u("opt1"),children:n[0].label}),a.jsx(ct,{value:"opt2",className:u("opt2"),children:n[1].label})]})})});Wl.displayName="_IconTab";const Bl=p.forwardRef((e,t)=>{const{options:n,value:r,disabled:s,dir:o,size:i="md",onChange:u}=e,l=c=>f("wu-w-1/2 wu-text-xs wu-rounded-full wu-text-gray-lead wu-relative wu-z-10 wu-font-normal",s&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-lead",i==="sm"&&"wu-h-6 wu-min-w-20",i==="md"&&"wu-h-8 wu-min-w-28",i==="lg"&&"wu-h-10 wu-min-w-36",c===r&&"wu-text-white wu-font-medium",s&&r===c&&"wu-text-gray-lead","wu-switcher-tab-item");return a.jsx(a.Fragment,{children:a.jsxs(rr,{ref:t,type:"single",value:r,onValueChange:u,disabled:s,dir:o,className:f("wu-relative group wu-flex wu-flex-row wu-items-start wu-justify-start wu-gap-0 wu-w-fit wu-bg-gray-25 wu-rounded-full",s&&"wu-cursor-not-allowed","wu-switcher-tab-group"),children:[a.jsx("div",{role:"slider",className:f("wu-absolute wu-z-0 wu-w-1/2 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out ",i==="sm"&&"wu-h-6 wu-min-w-20",i==="md"&&"wu-h-8 wu-min-w-28",i==="lg"&&"wu-h-10 wu-min-w-36",r==="opt1"&&"",r==="opt2"&&o!=="rtl"&&"wu-translate-x-full",r==="opt2"&&o==="rtl"&&"-wu-translate-x-full",s&&"wu-bg-gray-40","wu-switcher-tab-slider")}),a.jsx(ct,{value:"opt1",className:l("opt1"),children:a.jsx("div",{className:"wu-min-w-16 wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap",children:n[0].label})}),a.jsx(ct,{value:"opt2",className:l("opt2"),children:a.jsx("div",{className:"wu-min-w-16 wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap",children:n[1].label})})]})})});Bl.displayName="_Tab";const ql=p.forwardRef((e,t)=>{const{options:n,value:r,disabled:s,dir:o,onChange:i}=e,u=w=>f("wu-p-0 wu-w-fit wu-text-xs wu-text-gray-lead wu-h-fit wu-font-normal",s&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-subtle wu-text-gray-subtle",w===r&&"wu-text-primary wu-font-medium",s&&r===w&&"wu-text-gray-lead","wu-switcher-toggle-item"),l=f("wu-w-fit wu-gap-2",s&&"wu-cursor-not-allowed","wu-switcher-toggle-group"),c=f("wu-flex wu-items-center wu-justify-center wu-w-8 wu-h-3 wu-p-0 wu-border wu-rounded-full wu-cursor-pointer wu-border-blue-p focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2",s&&"wu-border-gray-subtle wu-cursor-not-allowed","wu-switcher-toggle-button"),d=f("wu-w-2 wu-h-2 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out",r==="opt1"&&o!=="rtl"&&"-wu-translate-x-[10px]",r==="opt1"&&o==="rtl"&&"wu-translate-x-[10px]",r==="opt2"&&o!=="rtl"&&"wu-translate-x-[10px]",r==="opt2"&&o==="rtl"&&"-wu-translate-x-[10px]",s&&"wu-hidden","wu-switcher-toggle-knob");return a.jsx(a.Fragment,{children:a.jsxs(rr,{ref:t,type:"single",value:r,disabled:s,dir:o,className:l,onValueChange:i,children:[a.jsx(ct,{value:"opt1",className:u("opt1"),children:a.jsx("div",{className:"wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap wu-text-right wu-switcher-toggle-item-label",children:n[0].label})}),a.jsx("button",{onClick:()=>i(r==="opt1"?"opt2":"opt1"),className:c,disabled:s,"aria-label":"knob",dir:o,children:a.jsx("div",{className:d,role:"knob",dir:o})}),a.jsx(ct,{value:"opt2",className:u("opt2"),children:a.jsx("div",{className:"wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap wu-switcher-toggle-item-label",children:n[1].label})})]})})});ql.displayName="_Toggle";const zl=p.forwardRef((e,t)=>{const{type:n,options:r,value:s,disabled:o,dir:i,size:u,onChange:l,toggle:c=!0,...d}=e,[w,h]=p.useState(),m=b=>{let g=w;b!==""?g=b:c&&(g=w==="opt1"?"opt2":"opt1");const x=g==="opt1"?r[0].value:r[1].value;l&&l(x),h(g)};if(p.useEffect(()=>{if(!Array.isArray(r)||r.length<2)throw new Error("Options are not sufficient");h(s===r[0].value?"opt1":"opt2")},[r,s]),!Array.isArray(r)||r.length<2)return a.jsx(a.Fragment,{});switch(n){case"toggle":return a.jsx(ql,{...d,ref:t,options:r,value:w||"opt1",onChange:m,disabled:o,dir:i});case"iconTab":return a.jsx(Wl,{ref:t,options:r,value:w||"opt1",onChange:m,disabled:o,dir:i});default:return a.jsx(Bl,{ref:t,options:r,value:w||"opt1",onChange:m,disabled:o,dir:i,size:u})}});zl.displayName="WuSwitcher";const $l=et.Root,ca=v.forwardRef(({className:e,children:t,...n},r)=>a.jsx(et.List,{className:f("wu-relative wu-flex",e),...n,ref:r,children:t}));ca.displayName=et.List.displayName;const da=v.forwardRef(({className:e,...t},n)=>a.jsx(et.Trigger,{ref:n,className:f("wu-relative wu-inline-flex wu-items-center wu-whitespace-nowrap wu-text-xs wu-px-4 wu-py-2 wu-text-gray-600 wu-transition-colors wu-duration-200 data-[state=active]:wu-text-blue-p","data-[orientation=horizontal]:wu-justify-center",e),...t}));da.displayName=et.Trigger.displayName;const Hl=v.forwardRef(({className:e,...t},n)=>a.jsx(et.Content,{ref:n,className:e,...t}));Hl.displayName=et.Content.displayName;const Ul=({items:e,enableAnimation:t})=>{const n="wu-duration-700 wu-ease-in-out wu-transition-all data-[state=inactive]:wu-absolute data-[state=inactive]:wu-inset-0 data-[state=inactive]:wu-opacity-0 data-[state=inactive]:wu-z-0 data-[state=active]:wu-relative data-[state=active]:wu-opacity-100 data-[state=active]:wu-z-10";return a.jsx("div",{className:f("wu-w-full wu-h-full wu-flex-1 wu-overflow-auto",t&&"wu-relative wu-overflow-hidden","wu-tab-content-container"),children:e.map(r=>a.jsx(Hl,{value:r.value,forceMount:t||void 0,className:f("wu-w-full wu-h-full wu-overflow-y-auto",t&&n,"wu-tab-content"),children:r.Content},r.value))})},Lb=e=>{const[t,n]=p.useState(!1),[r,s]=p.useState(!1),o=()=>{const u=e.current;u&&(n(u.scrollLeft>0),s(u.scrollLeft+u.clientWidth<u.scrollWidth))};return p.useEffect(()=>{const u=e.current;return o(),u&&u.addEventListener("scroll",o),window.addEventListener("resize",o),()=>{u&&u.removeEventListener("scroll",o),window.removeEventListener("resize",o)}},[e]),{showLeftArrow:t,showRightArrow:r,scrollByTab:u=>{const l=e.current;if(l){const c=(u==="right"?l.clientWidth:-l.clientWidth)*.8;l.scrollBy({left:c,behavior:"smooth"})}}}},jl=(e,t)=>{const[n,r]=p.useState({width:0,left:0,height:0,top:0}),s=t==="vertical";return p.useEffect(()=>{const o=e.current;if(o){const i=()=>{const l=o.querySelector('[data-state="active"]');if(l){const c={width:s?2:l.offsetWidth,left:s?0:l.offsetLeft,height:s?l.offsetHeight:1,top:s?l.offsetTop:0};r(c)}},u=new MutationObserver(i);return u.observe(o,{attributes:!0,subtree:!0}),i(),()=>{u.disconnect()}}},[e,s]),n},Ob=({items:e,value:t,defaultValue:n,onValueChange:r,enableAnimation:s=!1,className:o,dir:i="ltr",position:u="top"})=>{var N;const l=p.useRef(null),c=jl(l,"horizontal"),{showLeftArrow:d,showRightArrow:w,scrollByTab:h}=Lb(l),[m,b]=p.useState(!1),g=()=>h("left"),x=()=>h("right"),C=S=>a.jsx("div",{"data-testid":`gradient-overlay-${S}`,className:f("wu-absolute wu-top-0 wu-h-full wu-w-20 wu-z-10 wu-pointer-events-none",S==="left"?"wu-left-0 wu-bg-gradient-to-r wu-from-white wu-to-transparent":"wu-right-0 wu-bg-gradient-to-l wu-from-white wu-to-transparent")}),y=(S,E,I)=>{const A=E==="left";return a.jsx("button",{onClick:S,className:f("wu-absolute wu-z-20 wu-flex wu-items-center wu-justify-center wu-px-1 wu-py-1 wu-transition-all wu-duration-300 wu-h-8",A?"wu-left-0":"wu-right-0",I&&"wu-translate-x-0 wu-opacity-100",!I&&[A?"-wu-translate-x-full":"wu-translate-x-full","wu-opacity-0"]),"aria-label":A?"scroll-left":"scroll-right",children:a.jsx("span",{className:f("wu-text-blue-p wu-text-lg",A?"wm-keyboard-arrow-left":"wm-keyboard-arrow-right")})})};return a.jsxs($l,{defaultValue:n||((N=e[0])==null?void 0:N.value),value:t,onValueChange:r,orientation:"horizontal",dir:i,className:f("wu-relative wu-flex wu-flex-col wu-w-full wu-h-full",u==="bottom"?"wu-flex-col-reverse":"wu-flex-col",o),role:"tabs",children:[a.jsxs("div",{className:"wu-relative wu-flex wu-overflow-hidden wu-shrink-0 wu-border-b wu-border-gray-200",onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),"aria-label":"tablistWrapper",children:[d&&m&&C("left"),y(g,"left",d&&m),a.jsxs(ca,{ref:l,className:f("wu-relative wu-flex wu-w-full wu-overflow-x-auto wu-flex-row","[&::-webkit-scrollbar]:wu-hidden [-ms-overflow-style:none] [scrollbar-width:none]","wu-tablist"),children:[e.map(S=>a.jsx(da,{value:S.value,children:S.Trigger},S.value)),a.jsx("span",{className:"wu-absolute wu-bg-blue-p wu-transition-all wu-duration-300 wu-indicator wu-bottom-0",style:{width:c.width,left:c.left,height:1.25,bottom:u==="bottom"?void 0:0,top:u==="bottom"?0:void 0}})]}),w&&m&&C("right"),y(x,"right",w&&m)]}),a.jsx(Ul,{items:e,enableAnimation:s})]})},Wb=e=>{const[t,n]=p.useState(!1),[r,s]=p.useState(!1),o=()=>{const u=e.current;u&&(n(u.scrollTop>0),s(u.scrollTop+u.clientHeight<u.scrollHeight))};return p.useEffect(()=>{const u=e.current;if(u)return o(),u.addEventListener("scroll",o),window.addEventListener("resize",o),()=>{u.removeEventListener("scroll",o),window.removeEventListener("resize",o)}},[e]),{showTopArrow:t,showBottomArrow:r,scrollByTab:u=>{const l=e.current;if(l){const c=(u==="down"?l.clientHeight:-l.clientHeight)*.8;l.scrollBy({top:c,behavior:"smooth"})}}}},Bb=({items:e,value:t,defaultValue:n,onValueChange:r,enableAnimation:s=!1,className:o,dir:i="ltr",position:u="left"})=>{var N;const l=p.useRef(null),c=jl(l,"vertical"),{showTopArrow:d,showBottomArrow:w,scrollByTab:h}=Wb(l),[m,b]=p.useState(!1),g=()=>h("up"),x=()=>h("down"),C=S=>a.jsx("div",{className:f("wu-absolute wu-left-0 wu-w-full wu-h-12 wu-z-10 wu-pointer-events-none",S==="top"?"wu-top-0 wu-bg-gradient-to-b wu-from-white wu-to-transparent":"wu-bottom-0 wu-bg-gradient-to-t wu-from-white wu-to-transparent")}),y=(S,E,I)=>{const A=E==="up";return a.jsx("button",{onClick:S,className:f("wu-absolute wu-z-20 wu-flex wu-items-center wu-justify-center wu-px-1 wu-py-1 wu-transition-all wu-duration-300 wu-w-full",A?"-wu-top-1":"-wu-bottom-1",I&&"wu-translate-y-0 wu-opacity-100",!I&&[A?"-wu-translate-y-full":"wu-translate-y-full","wu-opacity-0"]),"aria-label":A?"scroll-up":"scroll-down",children:a.jsx("span",{className:f("wu-text-blue-p wu-text-lg",A?"wm-keyboard-arrow-up":"wm-keyboard-arrow-down")})})};return a.jsxs($l,{defaultValue:n||((N=e[0])==null?void 0:N.value),value:t,onValueChange:r,orientation:"vertical",dir:i,className:f("wu-relative wu-h-full wu-w-full wu-flex",u==="left"?"wu-flex-row":"wu-flex-row-reverse",o),role:"tabs",children:[a.jsxs("div",{className:"wu-relative wu-flex wu-overflow-hidden wu-shrink-0",onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),"aria-label":"tablistWrapper",children:[d&&m&&C("top"),y(g,"up",d&&m),a.jsxs(ca,{ref:l,className:f("wu-relative wu-flex wu-h-full wu-overflow-y-auto wu-flex-col","[&::-webkit-scrollbar]:wu-hidden [-ms-overflow-style:none] [scrollbar-width:none]","wu-tablist"),children:[e.map(S=>a.jsx(da,{value:S.value,children:S.Trigger},S.value)),a.jsx("span",{className:"wu-absolute wu-bg-blue-p wu-transition-all wu-duration-300 wu-indicator",style:{width:2,left:u==="left"?0:void 0,right:u==="right"?0:void 0,height:c.height,top:c.top}})]}),w&&m&&C("bottom"),y(x,"down",w&&m)]}),a.jsx(Ul,{items:e,enableAnimation:s})]})},qb=({...e})=>e.orientation==="vertical"?a.jsx(Bb,{...e}):a.jsx(Ob,{...e}),wa=v.forwardRef(({className:e,...t},n)=>a.jsx("table",{ref:n,className:f("wu-w-full wu-caption-bottom wu-text-sm",e),...t}));wa.displayName="Table";const Gl=v.forwardRef(({className:e,...t},n)=>a.jsx("thead",{ref:n,className:f("[&_tr]:wu-border-b",e),...t}));Gl.displayName="TableHeader";const Kl=v.forwardRef(({className:e,...t},n)=>a.jsx("tbody",{ref:n,className:f("",e),...t}));Kl.displayName="TableBody";const zb=v.forwardRef(({className:e,...t},n)=>a.jsx("tfoot",{ref:n,className:f("wu-border-t wu-bg-muted/50 wu-font-medium [&>tr]:last:wu-border-b-0",e),...t}));zb.displayName="TableFooter";const gn=v.forwardRef(({className:e,...t},n)=>a.jsx("tr",{ref:n,className:f("wu-border-b wu-transition-colors wu-hover:wu-bg-muted/50 data-[state=selected]:wu-bg-muted",e),...t}));gn.displayName="TableRow";const fa=v.forwardRef(({className:e,...t},n)=>a.jsx("th",{ref:n,className:f("wu-px-4 wu-text-left wu-align-middle wu-font-medium wu-text-muted-foreground [&:has([role=checkbox])]:wu-pr-0",e),...t}));fa.displayName="TableHead";const sr=v.forwardRef(({className:e,...t},n)=>a.jsx("td",{ref:n,className:f("wu-p-4 wu-align-middle [&:has([role=checkbox])]:wu-pr-0",e),...t}));sr.displayName="TableCell";const pa=v.forwardRef(({className:e,...t},n)=>a.jsx("caption",{ref:n,className:f("wu-mt-4 wu-text-sm wu-text-gray-subtle wu-font-normal",e),...t}));pa.displayName="TableCaption";const $b=({columns:e,rowSelection:t})=>{const n=(t==null?void 0:t.isEnabled)??!1,r=(t==null?void 0:t.size)??48,{onRowSelect:s,rowUniqueKey:o,isRowDisabled:i,hideSelectAll:u}=t||{},l=p.useCallback(d=>w=>{s==null||s(w?d:[])},[s]);return{finalColumns:p.useMemo(()=>n?[{id:"select",header:({table:d})=>{const w=d.getRowModel().rows.map(m=>m.original).filter(m=>!(i!=null&&i(m))),h=l(w);return u?a.jsx("div",{}):a.jsx(De,{checked:d.getIsSomeRowsSelected()||d.getIsAllRowsSelected(),partial:d.getIsSomeRowsSelected()&&!d.getIsAllRowsSelected(),onChange:m=>{d.toggleAllRowsSelected(!!m),h(!!m)},"aria-label":"Select all","data-testid":d.getIsSomeRowsSelected()&&!d.getIsAllRowsSelected()?"select-partial":"select-all"})},cell:({row:d})=>{const w=(i==null?void 0:i(d.original))??!1;return a.jsx(De,{checked:d.getIsSelected(),disabled:w,onChange:h=>{w||d.toggleSelected(!!h)},"aria-label":String(d.original[o])})},filterable:!1,accessorKey:"select",size:r},...e]:e,[e,n,l,i,u])}};function Yl({data:e,columns:t,rowSelection:n}){const{finalColumns:r}=$b({columns:t,rowSelection:n}),s=p.useMemo(()=>{if(!(n!=null&&n.isEnabled))return{};const o={};for(const i of n.selectedRows){const u=e.findIndex(l=>l[n.rowUniqueKey]===i[n.rowUniqueKey]);u!==-1&&(o[u]=!0)}return o},[e,n]);return{finalColumns:r,rowSelectionState:s}}const Xl=({table:e,size:t,NoDataContent:n,isLoading:r,CustomLoader:s,isRowDisabled:o})=>{var i;return a.jsx(Kl,{children:r?a.jsx(gn,{children:a.jsx(sr,{colSpan:e.getAllColumns().length,className:"wu-text-center wu-h-[35vh] wu-loader-container",children:s||a.jsx(bt,{className:"wu-w-full"})})}):(i=e.getRowModel().rows)!=null&&i.length?e.getRowModel().rows.map((u,l)=>{const c=(o==null?void 0:o(u.original))??!1;return a.jsx(gn,{"data-disabled":c,"data-state":u.getIsSelected()&&"selected",className:f("wu-group wu-transition-colors wu-border-b wu-border-black/[12%]",u.getIsSelected()&&"wu-bg-blue-p/[8%]",!c&&(u.getIsSelected()?"hover:wu-bg-blue-p/[16%]":"hover:wu-bg-black/[2%]")),children:u.getVisibleCells().map((d,w)=>a.jsx(sr,{className:f("wu-py-0 wu-font-light wu-text-xs",t==="compact"?"wu-h-8":"wu-h-10",d.column.id==="actions"?"wu-opacity-0 wu-transition-opacity wu-duration-150 wu-ease-in-out group-hover:wu-opacity-100":"",d.column.columnDef.cellAlign==="right"&&"wu-text-right",d.column.columnDef.cellAlign==="center"&&"wu-text-center",d.column.columnDef.cellAlign==="left"&&"wu-text-left"),children:qe.flexRender(d.column.columnDef.cell,d.getContext())},`${d.id}-${w}`))},`${u.id}-${l}`)}):a.jsx(gn,{children:a.jsx(sr,{colSpan:e.getAllColumns().length,children:n})})})},Zl=({table:e,sortableColumns:t,manual:n=!1,onSort:r,size:s,isRowSelected:o,HeaderAction:i,isStickyHeader:u})=>{const l=s==="compact"?"wu-h-8":"wu-h-10",c=d=>{const{id:w,columnDef:h,getIsSorted:m,toggleSorting:b}=d,{header:g}=h;if(!t.includes(w))return g;const x=m(),C=x==="asc",y=x==="desc",N=()=>{n?(b(!y),r==null||r({id:w,desc:y})):b(d.getIsSorted()==="asc")};return a.jsxs("button",{onClick:N,"aria-label":`Sort by ${g}`,className:"wu-flex wu-items-center wu-gap-4",children:[g,a.jsxs("div",{className:"wu-relative",children:[a.jsx("span",{className:f("wu-absolute -wu-top-[15px] wm-arrow-drop-down wu-text-xl",C&&"wu-hidden",!x&&"-wu-top-[11px]")}),a.jsx("span",{className:f("wu-absolute -wu-bottom-[13px] wm-arrow-drop-up wu-text-xl",y&&"wu-hidden",!x&&"-wu-bottom-[10px]")})]})]})};return a.jsxs(Gl,{className:f("wu-border-t wu-border-black/[12%] wu-bg-gray-20 wu-relative",u&&"wu-sticky wu-top-[-.5px] wu-z-10",l),children:[e.getHeaderGroups().map(d=>a.jsx(gn,{className:"wu-relative",children:d.headers.map(w=>w.column.id==="actions"?a.jsx(fa,{colSpan:w.colSpan,className:"wu-text-xs wu-font-medium",style:{width:`${w.getSize()}px`}},w.id):a.jsx(fa,{colSpan:w.colSpan,className:f("wu-text-xs wu-font-medium wu-bg-[#EEEEEE]","wu-relative wu-z-0",w.column.columnDef.headerAlign==="right"&&"wu-text-right",w.column.columnDef.headerAlign==="center"&&"wu-text-center",w.column.columnDef.headerAlign==="left"&&"wu-text-left"),style:{width:`${w.getSize()}px`},children:qe.flexRender(c(w.column),w.getContext())},w.id))},d.id)),o&&i&&a.jsxs("div",{className:f("wu-absolute wu-top-[-1px] wu-left-0 wu-right-0 wu-flex wu-items-center wu-border-b wu-border-t wu-bg-gray-20 wu-z-10",l),children:[a.jsx("div",{className:"wu-flex wu-items-center wu-px-4",style:{width:e.getVisibleLeafColumns()[0].getSize()},children:a.jsx(De,{checked:e.getIsSomeRowsSelected()||e.getIsAllRowsSelected(),partial:e.getIsSomeRowsSelected()&&!e.getIsAllRowsSelected(),onChange:d=>{e.toggleAllRowsSelected(!!d)},"aria-label":"Select all","data-testid":"select-all-header-checkbox"})}),a.jsx("div",{className:"wu-flex-1 wu-flex wu-pr-4",children:i})]})]})},Jl=ke.cva("",{variants:{variant:{striped:"[&_tr:nth-child(even)]:wu-bg-zinc-50",unstyled:"",bordered:"wu-border-collapse wu-border [&_th]:wu-border [&_td]:wu-border"}}}),Hb=({data:e,columns:t,isLoading:n=!1,variant:r="unstyled",sort:s,size:o,rowSelection:i,HeaderAction:u,NoDataContent:l,stickyHeader:c=!1,CustomLoader:d,caption:w,...h})=>{var N;const{finalColumns:m,rowSelectionState:b}=Yl({data:e,columns:t,rowSelection:i}),g=p.useMemo(()=>m.filter(S=>S.enableSorting).map(S=>S.accessorKey),[m]),x=((N=i==null?void 0:i.selectedRows)==null?void 0:N.length)??0,C=S=>{if(typeof S=="function"){const E=S(b),I=Object.keys(E).filter(A=>E[Number(A)]).map(A=>e[Number(A)]);i==null||i.onRowSelect(I)}},y=qe.useReactTable({data:e,columns:m,getCoreRowModel:qe.getCoreRowModel(),getPaginationRowModel:qe.getPaginationRowModel(),manualPagination:!0,manualSorting:!0,manualFiltering:!0,enableRowSelection:i==null?void 0:i.isEnabled,state:{...i!=null&&i.isEnabled?{rowSelection:b}:{}},onRowSelectionChange:C});return a.jsxs("div",{className:f("wu-text-gray-lead wu-table-container wu-relative"),children:[w&&a.jsx(pa,{className:"wu-font-light",children:w}),a.jsxs(wa,{...h,className:f(Jl({variant:r}),h.className),children:[a.jsx(Zl,{table:y,sortableColumns:g,manual:!0,onSort:s==null?void 0:s.onSort,size:o,HeaderAction:u,isRowSelected:x>0,isStickyHeader:c}),!n&&a.jsx(Xl,{table:y,size:o,NoDataContent:l,CustomLoader:d})]}),n&&a.jsx("div",{className:"wu-flex wu-items-center wu-justify-center wu-h-96",children:a.jsx(bt,{})})]})},Ub=({data:e,columns:t,variant:n="unstyled",size:r="default",sort:s,filterText:o,pagination:i,stickyHeader:u,HeaderAction:l,CustomLoader:c,NoDataContent:d,isLoading:w,caption:h,rowSelection:m,...b})=>{var $;const[g,x]=p.useState((s==null?void 0:s.initial)||[]),[C,y]=p.useState([]),[N,S]=p.useState((i==null?void 0:i.pageIndex)??0),{finalColumns:E,rowSelectionState:I}=Yl({data:e,columns:t,rowSelection:m}),A=p.useMemo(()=>E.filter(O=>O.enableSorting).map(O=>O.accessorKey),[E]),k=p.useMemo(()=>E.filter(O=>O.filterable).map(O=>O.accessorKey),[E]),D=(($=m==null?void 0:m.selectedRows)==null?void 0:$.length)??0,_=O=>{const G=typeof O=="function"?O(I):O,z=[],ue=m==null?void 0:m.isRowDisabled;for(const M in G){if(!G[M])continue;const V=e[Number(M)];V&&(ue!=null&&ue(V)||z.push(V))}m==null||m.onRowSelect(z)},F=qe.useReactTable({data:e,columns:E,getCoreRowModel:qe.getCoreRowModel(),getFilteredRowModel:qe.getFilteredRowModel(),getSortedRowModel:qe.getSortedRowModel(),getPaginationRowModel:i?qe.getPaginationRowModel():void 0,enableRowSelection:m!=null&&m.isRowDisabled?O=>!m.isRowDisabled(O.original):!0,state:{sorting:g,columnFilters:C,...i?{pagination:i}:{},...m!=null&&m.isEnabled?{rowSelection:I}:{}},onSortingChange:x,onColumnFiltersChange:y,onRowSelectionChange:_});return p.useEffect(()=>{k.forEach(O=>{var G;(G=F.getColumn(O))==null||G.setFilterValue(o)})},[o,k,F]),p.useEffect(()=>{i&&(i==null?void 0:i.pageIndex)!==N&&(m==null||m.onRowSelect(()=>[]),F.resetRowSelection(),S(i.pageIndex))},[i==null?void 0:i.pageIndex]),a.jsx("div",{className:"wu-text-gray-lead wu-table-container wu-relative",children:a.jsxs(wa,{...b,className:f("wu-overflow-x-auto wu-w-full",Jl({variant:n}),"wu-table-fixed",b.className),children:[h&&a.jsx(pa,{children:h}),a.jsx(Zl,{table:F,sortableColumns:A,size:r,HeaderAction:l,isRowSelected:D>0,isStickyHeader:u}),a.jsx(Xl,{table:F,size:r,NoDataContent:d,CustomLoader:c,isLoading:w,isRowDisabled:m==null?void 0:m.isRowDisabled})]})})},Ql=v.forwardRef(({className:e,...t},n)=>a.jsx("textarea",{className:f("wu-flex wu-w-full wu-border-b wu-border-gray-subtle wu-bg-gray-10 wu-text-gray-lead wu-p-2 wu-text-sm wu-font-normal wu-placeholder:wu-text-gray-subtle wu-placeholder:wu-font-light focus-visible:wu-outline-none disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle read-only:wu-cursor-not-allowed read-only:wu-bg-gray-20 read-only:wu-border-gray-40 read-only:wu-text-gray-subtle focus:wu-border-blue-p wu-transition-colors hover:wu-border-gray-40 ",e),ref:n,...t}));Ql.displayName="Textarea";const Rl=p.forwardRef((e,t)=>{const{Label:n,id:r=Cn(),variant:s="flat",readonly:o,maxLength:i,labelPosition:u="top",...l}=e,c=w=>{l.onChange&&l.onChange(w)},d=jt(u);return a.jsxs("div",{className:f(d,"wu-flex wu-textarea-container"),dir:l.dir,children:[a.jsx(Ql,{...l,ref:t,id:r,className:f("wu-peer wu-rounded-t-sm",s==="outlined"?"wu-border wu-border-gray-subtle":"",l.className),onChange:c,readOnly:o,maxLength:i}),n&&a.jsx(Te,{htmlFor:r,className:"wu-textarea-label",children:n})]})});Rl.displayName="WuTextarea";function jb(e){if(typeof e=="string"&&e.includes("T")){const t=Y.parseISO(e);return Y.format(t,"HH:mm")}if(typeof e=="string"&&/^\d{2}:\d{2}:\d{2}$/.test(e)){const t=Y.parse(e,"HH:mm:ss",new Date);return Y.format(t,"HH:mm")}return typeof e=="string"&&/^\d{2}:\d{2}$/.test(e)?e:"00:00"}const ec=["12",...Array.from({length:11},(e,t)=>String(t+1).padStart(2,"0"))],tc=Array.from({length:60},(e,t)=>String(t).padStart(2,"0")),nc=["am","pm"],ar=50;function Gb(e){return Array(ar).fill(e).flat()}function ha(e,t){const n=e.indexOf(t);return[...e.slice(n),...e.slice(0,n)]}function Kb(e,t){let n=Number(e);return t==="pm"&&n<12&&(n+=12),t==="am"&&n===12&&(n=0),String(n).padStart(2,"0")}function rc(e){const t=Number(e),n=t>=12?"pm":"am",r=t%12===0?12:t%12;return{hour:String(r),meridiem:n}}const Yb=({value:e,isSelected:t,onClick:n})=>a.jsx("div",{onClick:n,className:f("wu-w-8 wu-h-8 wu-flex wu-items-center wu-justify-center wu-text-center wu-snap-start wu-rounded-[2px] wu-cursor-pointer hover:wu-bg-blue-p hover:wu-text-white",t&&"wu-bg-blue-p/15 wu-text-blue-p"),children:e}),ma=({values:e,selectedValue:t,scrollRef:n,onSelect:r,repeatItems:s=!0,className:o})=>a.jsx("div",{ref:n,className:f("wu-overflow-y-scroll wu-w-8 wu-snap-y wu-snap-mandatory [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",o),role:"presentation",children:(s?Gb(e):e).map((i,u)=>a.jsx(Yb,{value:i,isSelected:i===t,onClick:()=>r(i)},`${i}-${u}`))});function Xb(e,t,n,r){const s=p.useMemo(()=>e?ha(ec,t.padStart(2,"0")):ec,[e]),o=p.useMemo(()=>e?ha(tc,n.padStart(2,"0")):tc,[e]),i=p.useMemo(()=>e?ha(nc,r):nc,[e]);return{rotatedHours:s,rotatedMinutes:o,rotatedMeridiem:i}}function Zb(e,t,n){p.useEffect(()=>{function r(i){if(i){const u=i.scrollHeight/ar,l=Math.floor(ar/2);i.scrollTop=l*u;const c=()=>{const{scrollTop:d}=i,w=Math.round(d/u);(w<=1||w>=ar-2)&&(i.scrollTop=l*u)};return i.addEventListener("scroll",c),()=>{i.removeEventListener("scroll",c)}}}if(!e)return;const s=r(t.current),o=r(n.current);return()=>{s==null||s(),o==null||o()}},[e,t,n])}const sc=({className:e,time:t,Label:n,labelPosition:r,dir:s,...o})=>{const[i,u]=p.useState(!1),[l,c]=p.useState(""),d=p.useRef(null),w=p.useRef(null),h=p.useRef(null),m=p.useRef(null),[b,g]=p.useState("12"),[x,C]=p.useState("00"),[y,N]=p.useState("am");p.useEffect(()=>{if(!t){c(""),g("12"),C("00"),N("am"),d.current&&(d.current.value="");return}const k=jb(t);c(k);const[D,_]=k.split(":"),{hour:F,meridiem:$}=rc(D);g(F),C(_),N($),d.current&&(d.current.value=k)},[t]),p.useEffect(()=>{const k=D=>{w.current&&!w.current.contains(D.target)&&u(!1)};return document.addEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k)}},[]),Zb(i,h,m);const{rotatedHours:S,rotatedMinutes:E,rotatedMeridiem:I}=Xb(i,b,x,y),A=p.useCallback((k,D,_)=>{const F=k??b,$=D??x,O=_??y;g(F),C($),N(O);const G=`${Kb(F,O)}:${$}`;c(G)},[b,x,y]);return a.jsxs("div",{className:f("wu-flex wu-gap-1 wu-relative wu-w-fit wu-flex-col",(r==="right"||r==="left")&&"wu-items-center",r==="left"&&"wu-flex-row",r==="right"&&"wu-flex-row-reverse","wu-input-wrapper"),dir:s,children:[n&&a.jsx(Te,{htmlFor:"time-picker",className:"wu-timepicker-label",children:n}),a.jsxs("div",{className:f("relative inline-block"),ref:w,dir:s,children:[a.jsx(Ie,{ref:d,type:"time",value:l,variant:"flat",role:"textbox",onChange:k=>{c(k.target.value);const[D,_]=k.target.value.split(":"),{hour:F,meridiem:$}=rc(D);g(F),C(_),N($)},className:"wu-w-[136px] wu-h-8 wu-pr-6 wu-border wu-border-lead/40 wu-text-gray-lead wu-timepicker-input",style:{WebkitAppearance:"none",MozAppearance:"textfield"},Icon:a.jsx(R,{icon:"wm-schedule",className:f("wu-text-base",o.disabled&&"wu-text-lead/50 wu-pointer-events-none wu-opacity-50"),onClick:()=>u(k=>!k),"data-testid":"wu-timepicker-icon"}),iconPosition:"right",dir:s,...o}),a.jsx("style",{children:`
|
|
17
|
+
`))},[JSON.stringify(t)])}const l=v.useCallback(c=>{s||i(c)},[]);return[u,l]}const Hu={};function Pt(e,t){const n=v.useRef(Hu);return n.current===Hu&&(n.current=e(t)),n}const Ys=v[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],dg=Ys&&Ys!==v.useLayoutEffect?Ys:e=>e();function Fe(e){const t=Pt(wg).current;return t.next=e,dg(t.effect),t.trampoline}function wg(){const e={next:void 0,callback:fg,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function fg(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const pg=[];function Uu(e){v.useEffect(e,pg)}const ln=0;class Zn{constructor(){vn(this,"currentId",ln);vn(this,"clear",()=>{this.currentId!==ln&&(clearTimeout(this.currentId),this.currentId=ln)});vn(this,"disposeEffect",()=>this.clear)}static create(){return new Zn}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=ln,n()},t)}isStarted(){return this.currentId!==ln}}function ju(){const e=Pt(Zn.create).current;return Uu(e.disposeEffect),e}const Gu=0;class Xs extends Zn{constructor(){super(...arguments);vn(this,"clear",()=>{this.currentId!==Gu&&(clearInterval(this.currentId),this.currentId=Gu)})}static create(){return new Xs}start(n,r){this.clear(),this.currentId=setInterval(()=>{r()},n)}}function hg(){const e=Pt(Xs.create).current;return Uu(e.disposeEffect),e}const Ve=typeof document<"u"?v.useLayoutEffect:()=>{};function Ku(e){const t=Pt(mg,e).current;return t.next=e,Ve(t.effect),t}function mg(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function gg(){const[,e]=v.useState({});return v.useCallback(()=>{e({})},[])}function Zs(e,t,n,r){const s=Pt(Yu).current;return yg(s,e,t,n,r)&&Xu(s,[e,t,n,r]),s.callback}function bg(e){const t=Pt(Yu).current;return xg(t,e)&&Xu(t,e),t.callback}function Yu(){return{callback:null,cleanup:null,refs:[]}}function yg(e,t,n,r,s){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==s}function xg(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function Xu(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let s=0;s<t.length;s+=1){const o=t[s];if(o!=null)switch(typeof o){case"function":{const i=o(n);typeof i=="function"&&(r[s]=i);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let s=0;s<t.length;s+=1){const o=t[s];if(o!=null)switch(typeof o){case"function":{const i=r[s];typeof i=="function"?i():o(null);break}case"object":{o.current=null;break}}}}}}}const vg={clip:"rect(0 0 0 0)",overflow:"hidden",whiteSpace:"nowrap",position:"fixed",top:0,left:0,border:0,padding:0,width:1,height:1,margin:-1};function Zu(){return typeof window<"u"}function Js(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ng(e){return Zu()?e instanceof Element||e instanceof Js(e).Element:!1}function Cg(e){return Zu()?e instanceof HTMLElement||e instanceof Js(e).HTMLElement:!1}function Sg(e){return(e==null?void 0:e.ownerDocument)||document}const Jn=typeof navigator<"u",Qs=kg(),Tg=Mg(),Eg=Ig();typeof CSS>"u"||!CSS.supports||CSS.supports("-webkit-backdrop-filter:none");const Ag=Qs.platform==="MacIntel"&&Qs.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Qs.platform);Jn&&Tg.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints,Eg.includes("jsdom/");function kg(){if(!Jn)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e!=null&&e.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function Ig(){if(!Jn)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function Mg(){if(!Jn)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}function Qn(e,...t){const n=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const Rs=v.createContext(void 0);process.env.NODE_ENV!=="production"&&(Rs.displayName="NumberFieldRootContext");function Rn(){const e=v.useContext(Rs);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: NumberFieldRootContext is missing. NumberField parts must be placed within <NumberField.Root>.":Qn(43));return e}function Le(){}const He=Object.freeze({});let Ju=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const Dg={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Pg={valid(e){return e===null?null:e?{[Ju.valid]:""}:{[Ju.invalid]:""}}},Qu=v.createContext({invalid:void 0,name:void 0,validityData:{state:Dg,errors:[],error:"",value:"",initialValue:null},setValidityData:Le,disabled:void 0,touched:!1,setTouched:Le,dirty:!1,setDirty:Le,filled:!1,setFilled:Le,focused:!1,setFocused:Le,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=He)=>e,getInputValidationProps:(e=He)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(Qu.displayName="FieldRootContext");function ea(e=!0){const t=v.useContext(Qu);if(t.setValidityData===Le&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":Qn(28));return t}const _g={...v};let Ru=0;function Fg(e,t="mui"){const[n,r]=v.useState(e),s=e||n;return v.useEffect(()=>{n==null&&(Ru+=1,r(`${t}-${Ru}`))},[n,t]),s}const el=_g.useId;function Vg(e,t){if(el!==void 0){const n=el();return e??(t?`${t}-${n}`:n)}return Fg(e,t)}function Lg(e){return Vg(e,"base-ui")}const tl=v.createContext({controlId:void 0,setControlId:Le,labelId:void 0,setLabelId:Le,messageIds:[],setMessageIds:Le,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(tl.displayName="LabelableContext");function nl(){return v.useContext(tl)}function Og(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:s,setControlId:o}=nl(),i=Lg(t);return Ve(()=>{if(!(!n&&!t||o===Le)){if(n){const u=r==null?void 0:r.current;Ng(u)&&u.closest("label")!=null?o(t??null):o(s??i)}else t&&o(t);return()=>{t&&o(void 0)}}},[t,r,s,o,n,i]),s??i}const cn={inputValue:()=>null,value:()=>null},Wg=parseInt(v.version,10);function Bg(e){return Wg>=e}function rl(e){if(!v.isValidElement(e))return null;const t=e,n=t.props;return(Bg(19)?n==null?void 0:n.ref:t.ref)??null}function ta(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function qg(e,t){const n={};for(const r in e){const s=e[r];if(t!=null&&t.hasOwnProperty(r)){const o=t[r](s);o!=null&&Object.assign(n,o);continue}s===!0?n[`data-${r.toLowerCase()}`]="":s&&(n[`data-${r.toLowerCase()}`]=s.toString())}return n}function zg(e,t){return typeof e=="function"?e(t):e}function $g(e,t){return typeof e=="function"?e(t):e}const dn={};function sl(e,t,n,r,s){let o={...na(e,dn)};return t&&(o=er(o,t)),n&&(o=er(o,n)),r&&(o=er(o,r)),o}function Hg(e){if(e.length===0)return dn;if(e.length===1)return na(e[0],dn);let t={...na(e[0],dn)};for(let n=1;n<e.length;n+=1)t=er(t,e[n]);return t}function er(e,t){return al(t)?t(e):Ug(e,t)}function Ug(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=ta(e.style,r);break}case"className":{e[n]=ol(e.className,r);break}default:jg(n,r)?e[n]=Gg(e[n],r):e[n]=r}}return e}function jg(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),s=e.charCodeAt(2);return n===111&&r===110&&s>=65&&s<=90&&(typeof t=="function"||typeof t>"u")}function al(e){return typeof e=="function"}function na(e,t){return al(e)?e(t):e??dn}function Gg(e,t){return t?e?n=>{if(Kg(n)){const s=n;ra(s);const o=t(s);return s.baseUIHandlerPrevented||e==null||e(s),o}const r=t(n);return e==null||e(n),r}:t:e}function ra(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function ol(e,t){return t?e?t+" "+e:t:e}function Kg(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function wn(e,t,n={}){const r=t.render,s=Yg(t,n);if(n.enabled===!1)return null;const o=n.state??He;return Xg(e,r,s,o)}function Yg(e,t={}){const{className:n,style:r,render:s}=e,{state:o=He,ref:i,props:u,stateAttributesMapping:l,enabled:c=!0}=t,d=c?zg(n,o):void 0,w=c?$g(r,o):void 0,h=c?qg(o,l):He,m=c?ta(h,Array.isArray(u)?Hg(u):u)??He:He;return typeof document<"u"&&(c?Array.isArray(i)?m.ref=bg([m.ref,rl(s),...i]):m.ref=Zs(m.ref,rl(s),i):Zs(null,null)),c?(d!==void 0&&(m.className=ol(m.className,d)),w!==void 0&&(m.style=ta(m.style,w)),m):He}function Xg(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const s=sl(n,t.props);return s.ref=n.ref,v.cloneElement(t,s)}if(e&&typeof e=="string")return Zg(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":Qn(8))}function Zg(e,t){return e==="button"?p.createElement("button",{type:"button",...t,key:t.key}):e==="img"?p.createElement("img",{alt:"",...t,key:t.key}):v.createElement(e,t)}const il=new Map;function fn(e,t){const n=JSON.stringify({locale:e,options:t}),r=il.get(n);if(r)return r;const s=new Intl.NumberFormat(e,t);return il.set(n,s),s}function _t(e,t,n){return e==null?"":fn(t,n).format(e)}function ul(e,t,n){return _t(e,t,{...n,maximumFractionDigits:20})}const Jg=["零","〇","一","二","三","四","五","六","七","八","九"],Qg={零:"0","〇":"0",一:"1",二:"2",三:"3",四:"4",五:"5",六:"6",七:"7",八:"8",九:"9"},ll=["٠","١","٢","٣","٤","٥","٦","٧","٨","٩"],cl=["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"],sa=["0","1","2","3","4","5","6","7","8","9"],dl=["%","٪","%","﹪"],wl=["‰","؉"],fl=["−","-","‒","–","—","﹣"],pl=["+","﹢"],Rg=".",eb=",",tb=new RegExp(`[${ll.join("")}]`,"g"),nb=new RegExp(`[${cl.join("")}]`,"g"),rb=new RegExp(`[${sa.join("")}]`,"g"),sb=new RegExp(`[${Jg.join("")}]`,"g"),ab=new RegExp(`[${dl.join("")}]`),ob=new RegExp(`[${wl.join("")}]`),aa=/[٠١٢٣٤٥٦٧٨٩]/,hl=/[۰۱۲۳۴۵۶۷۸۹]/,oa=/[零〇一二三四五六七八九]/,ml=new RegExp(`[${sa.join("")}]`),ib=[".",",",Rg,eb,"٫","٬"],gl=new RegExp("\\p{Zs}","u"),ub=["+",...pl],lb=["-",...fl],tr=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),cb=e=>e.replace(/[-\\\]^]/g,t=>`\\${t}`),bl=e=>`[${e.map(cb).join("")}]`,yl=bl(["-"].concat(fl)),xl=bl(["+"].concat(pl)),vl=new RegExp(yl,"gu"),Nl=new RegExp(xl,"gu"),pn=new RegExp(yl),nr=new RegExp(xl);function ia(e,t){const n=fn(e,t).formatToParts(11111.1),r={};return n.forEach(s=>{r[s.type]=s.value}),fn(e).formatToParts(.1).forEach(s=>{s.type==="decimal"&&(r[s.type]=s.value)}),r}function Ft(e,t,n){if(e==null)return null;let r=String(e).replace(new RegExp("\\p{Cf}","gu"),"").trim();r=r.replace(vl,"-").replace(Nl,"+");let s=!1;const o=r.match(/([+-])\s*$/);o&&(o[1]==="-"&&(s=!0),r=r.replace(/([+-])\s*$/,""));const i=r.match(/^\s*([+-])/);i&&(i[1]==="-"&&(s=!0),r=r.replace(/^\s*[+-]/,""));let u=t;u===void 0&&(aa.test(r)||hl.test(r)?u="ar":oa.test(r)&&(u="zh"));const{group:l,decimal:c,currency:d}=ia(u,n),w=fn(u,n).formatToParts(1).filter(A=>A.type==="unit").map(A=>tr(A.value)),h=w.length?new RegExp(w.join("|"),"g"):null;let m=null;l&&(new RegExp("\\p{Zs}","u").test(l)?m=new RegExp("\\p{Zs}","gu"):l==="'"||l==="’"?m=/['’]/g:m=new RegExp(tr(l),"g"));let g=[{regex:l?m:null,replacement:""},{regex:c?new RegExp(tr(c),"g"):null,replacement:"."},{regex:/./g,replacement:"."},{regex:/,/g,replacement:""},{regex:/٫/g,replacement:"."},{regex:/٬/g,replacement:""},{regex:d?new RegExp(tr(d),"g"):null,replacement:""},{regex:h,replacement:""},{regex:tb,replacement:A=>String(ll.indexOf(A))},{regex:nb,replacement:A=>String(cl.indexOf(A))},{regex:rb,replacement:A=>String(sa.indexOf(A))},{regex:sb,replacement:A=>Qg[A]}].reduce((A,{regex:k,replacement:D})=>k?A.replace(k,D):A,r);const x=g.lastIndexOf(".");if(x!==-1&&(g=`${g.slice(0,x).replace(/\./g,"")}.${g.slice(x+1).replace(/\./g,"")}`),/^[-+]?Infinity$/i.test(r)||/[∞]/.test(r))return null;const C=(s?"-":"")+g;let y=parseFloat(C);const N=n==null?void 0:n.style,S=N==="unit"&&(n==null?void 0:n.unit)==="percent",E=ab.test(e)||N==="percent";return ob.test(e)?y/=1e3:!S&&E&&(y/=100),Number.isNaN(y)?null:y}const db=60,wb=400,fb=50,pb=3,hb=8,rr=1;function mb(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const gb=1e-10;function bb(e){const t=fn("en-US").resolvedOptions(),n=(e==null?void 0:e.minimumFractionDigits)??t.minimumFractionDigits??0;return{maximumFractionDigits:Math.max((e==null?void 0:e.maximumFractionDigits)??t.maximumFractionDigits??20,n),minimumFractionDigits:n}}function yb(e,t){if(!Number.isFinite(e))return e;const n=Math.min(Math.max(t,0),20);return Number(e.toFixed(n))}function ua(e,t){const{maximumFractionDigits:n}=bb(t);return yb(e,n)}function xb(e,t,n,r="directional"){if(n===0)return e;const s=Math.abs(n),o=Math.sign(n),i=s*gb*o,u=r==="nearest"?n:s,l=(e-t+i)/u;let c;return r==="nearest"?c=Math.round(l):o>0?c=Math.floor(l):c=Math.ceil(l),t+c*(r==="nearest"?n:s)}function vb(e,{step:t,minWithDefault:n,maxWithDefault:r,minWithZeroDefault:s,format:o,snapOnStep:i,small:u}){if(e===null)return e;const l=mb(e,n,r);if(t!=null&&i){if(t===0)return ua(l,o);let c=s;!u&&n!==Number.MIN_SAFE_INTEGER&&(c=n);const d=xb(l,c,t,u?"nearest":"directional");return ua(d,o)}return ua(l,o)}const Nb="none",Cl="input-change",la="input-clear",Sl="input-blur",Cb="input-paste",hn="keyboard";function Oe(e,t,n,r){let s=!1,o=!1;const i=r??He;return{reason:e,event:t??new Event("base-ui"),cancel(){s=!0},allowPropagation(){o=!0},get isCanceled(){return s},get isPropagationAllowed(){return o},trigger:n,...i}}function mn(e,t,n){const r=He;return{reason:e,event:t??new Event("base-ui"),...r}}const Tl=v.forwardRef(function(t,n){const{id:r,min:s,max:o,smallStep:i=.1,step:u=1,largeStep:l=10,required:c=!1,disabled:d=!1,readOnly:w=!1,name:h,defaultValue:m,value:b,onValueChange:g,onValueCommitted:x,allowWheelScrub:C=!1,snapOnStep:y=!1,format:N,locale:S,render:E,className:I,inputRef:A,...k}=t,{setDirty:D,validityData:_,disabled:F,setFilled:$,invalid:O,name:G,state:z,validation:ue,shouldValidateOnChange:M}=ea(),V=F||d,q=G??h,[B,re]=v.useState(!1),ae=s??Number.MIN_SAFE_INTEGER,ve=o??Number.MAX_SAFE_INTEGER,Ue=s??0,j=N==null?void 0:N.style,P=v.useRef(null),U=Zs(A,ue.inputRef),Z=Og({id:r}),[W,ee]=cg({controlled:b,default:m,name:"NumberField",state:"value"}),H=W??null,be=Ku(H);Ve(()=>{$(H!==null)},[$,H]);const Ne=gg(),Ce=Ku(N),me=v.useRef(!1),We=Fe((J,X)=>{me.current=!1,x==null||x(J,X)}),Ke=ju(),Vt=hg(),Lt=ju(),cr=v.useRef(!1),dr=v.useRef(0),dt=v.useRef(!0),Ot=v.useRef(null),wt=v.useRef(()=>{}),[oe,je]=v.useState(()=>b!==void 0?El(H,S,N):_t(H,S,N)),[wr,py]=v.useState("numeric"),fc=Fe(()=>{const{decimal:J,group:X,currency:le,literal:fe}=ia(S,N),te=new Set;ib.forEach(Ee=>te.add(Ee)),J&&te.add(J),X&&(te.add(X),gl.test(X)&&te.add(" "));const Be=j==="percent"||j==="unit"&&(N==null?void 0:N.unit)==="percent",xn=j==="percent"||j==="unit"&&(N==null?void 0:N.unit)==="permille";return Be&&dl.forEach(Ee=>te.add(Ee)),xn&&wl.forEach(Ee=>te.add(Ee)),j==="currency"&&le&&te.add(le),fe&&(Array.from(fe).forEach(Ee=>te.add(Ee)),gl.test(fe)&&te.add(" ")),ub.forEach(Ee=>te.add(Ee)),ae<0&&lb.forEach(Ee=>te.add(Ee)),te}),Wt=Fe(J=>J!=null&&J.altKey?i:J!=null&&J.shiftKey?l:u),fr=Fe((J,X)=>{const le=X.event,fe=X.direction,te=vb(J,{step:fe?Wt(le)*fe:void 0,format:Ce.current,minWithDefault:ae,maxWithDefault:ve,minWithZeroDefault:Ue,snapOnStep:y,small:(le==null?void 0:le.altKey)??!1});if(te!==H||J!==H||dt.current===!1){if(Ot.current=te,g==null||g(te,X),X.isCanceled)return;ee(te),D(te!==_.initialValue),me.current=!0}dt.current&&je(_t(te,S,N)),Ne()}),yn=Fe((J,{direction:X,currentValue:le,event:fe,reason:te})=>{const Be=le??be.current,xn=typeof Be=="number"?Be+J*X:Math.max(0,s??0);fr(xn,Oe(te,fe,void 0,{direction:X}))}),Bt=Fe(()=>{Lt.clear(),Ke.clear(),Vt.clear(),wt.current(),dr.current=0}),pc=Fe((J,X)=>{if(Bt(),!P.current)return;const le=Js(P.current);function fe(Be){Be.preventDefault()}le.addEventListener("contextmenu",fe),wt.current=()=>{le.removeEventListener("contextmenu",fe)},le.addEventListener("pointerup",Be=>{cr.current=!1,Bt();const xn=Ot.current??be.current;We(xn,mn(J?"increment":"decrement",Be))},{once:!0});function te(){const Be=Wt(X)??rr;yn(Be,{direction:J?1:-1,event:X,reason:J?"increment-press":"decrement-press"})}te(),Ke.start(wb,()=>{Vt.start(db,te)})});Ve(function(){if(!dt.current)return;const X=b!==void 0?El(H,S,N):_t(H,S,N);X!==oe&&je(X)}),Ve(function(){if(!Ag)return;let X="text";ae>=0&&(X="decimal"),py(X)},[ae,j]),v.useEffect(()=>()=>Bt(),[Bt]),v.useEffect(function(){const X=P.current;if(V||w||!C||!X)return;function le(fe){if(fe.ctrlKey||Sg(P.current).activeElement!==P.current)return;fe.preventDefault();const te=Wt(fe)??rr;yn(te,{direction:fe.deltaY>0?-1:1,event:fe,reason:"wheel"})}return X.addEventListener("wheel",le),()=>{X.removeEventListener("wheel",le)}},[C,yn,V,w,l,u,Wt]);const xa=v.useMemo(()=>({...z,disabled:V,readOnly:w,required:c,value:H,inputValue:oe,scrubbing:B}),[z,V,w,c,H,oe,B]),hy=v.useMemo(()=>({inputRef:P,inputValue:oe,value:H,startAutoChange:pc,stopAutoChange:Bt,minWithDefault:ae,maxWithDefault:ve,disabled:V,readOnly:w,id:Z,setValue:fr,incrementValue:yn,getStepAmount:Wt,allowInputSyncRef:dt,formatOptionsRef:Ce,valueRef:be,lastChangedValueRef:Ot,hasPendingCommitRef:me,isPressedRef:cr,intentionalTouchCheckTimeout:Lt,movesAfterTouchRef:dr,name:q,required:c,invalid:O,inputMode:wr,getAllowedNonNumericKeys:fc,min:s,max:o,setInputValue:je,locale:S,isScrubbing:B,setIsScrubbing:re,state:xa,onValueCommitted:We}),[P,oe,H,pc,Bt,ae,ve,V,w,Z,fr,yn,Wt,Ce,be,Lt,q,c,O,wr,fc,s,o,je,S,B,xa,We]),my=wn("div",t,{ref:n,state:xa,props:k,stateAttributesMapping:cn});return a.jsxs(Rs.Provider,{value:hy,children:[my,a.jsx("input",{...ue.getInputValidationProps({onChange(J){if(J.nativeEvent.defaultPrevented)return;const X=J.currentTarget.valueAsNumber,le=Number.isNaN(X)?null:X,fe=Oe(Nb,J.nativeEvent);D(le!==_.initialValue),fr(le,fe),M()&&ue.commit(le)}}),ref:U,type:"number",name:q,value:H??"",min:s,max:o,step:u,disabled:V,required:c,"aria-hidden":!0,tabIndex:-1,style:vg})]})});process.env.NODE_ENV!=="production"&&(Tl.displayName="NumberFieldRoot");function El(e,t,n){return(n==null?void 0:n.maximumFractionDigits)!=null||(n==null?void 0:n.minimumFractionDigits)!=null?_t(e,t,n):ul(e,t,n)}const Al=v.forwardRef(function(t,n){const{render:r,className:s,...o}=t,{state:i}=Rn();return wn("div",t,{ref:n,state:i,props:[{role:"group"},o],stateAttributesMapping:cn})});process.env.NODE_ENV!=="production"&&(Al.displayName="NumberFieldGroup");let ca;process.env.NODE_ENV!=="production"&&(ca=new Set);function kl(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");ca.has(t)||(ca.add(t),console.error(`Base UI: ${t}`))}}const Il=v.createContext(void 0);process.env.NODE_ENV!=="production"&&(Il.displayName="CompositeRootContext");function Sb(e=!1){const t=v.useContext(Il);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":Qn(16));return t}function Tb(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:s=0,isNativeButton:o}=e,i=r&&t!==!1,u=r&&t===!1;return{props:v.useMemo(()=>{const c={onKeyDown(d){n&&t&&d.key!=="Tab"&&d.preventDefault()}};return r||(c.tabIndex=s,!o&&n&&(c.tabIndex=t?s:-1)),(o&&(t||i)||!o&&n)&&(c["aria-disabled"]=n),o&&(!t||u)&&(c.disabled=n),c},[r,n,t,i,u,o,s])}}function Ml(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:s=!0}=e,o=v.useRef(null),i=Sb(!0)!==void 0,u=Fe(()=>{const h=o.current;return!!((h==null?void 0:h.tagName)==="A"&&(h!=null&&h.href))}),{props:l}=Tb({focusableWhenDisabled:n,disabled:t,composite:i,tabIndex:r,isNativeButton:s});process.env.NODE_ENV!=="production"&&v.useEffect(()=>{if(!o.current)return;const h=o.current.tagName==="BUTTON";s?h||kl("A component that acts as a button was not rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is a real <button>, or set the `nativeButton` prop on the component to `false`."):h&&kl("A component that acts as a button was rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is not a real <button>, or set the `nativeButton` prop on the component to `true`.")},[s]);const c=v.useCallback(()=>{const h=o.current;Eb(h)&&i&&t&&l.disabled===void 0&&h.disabled&&(h.disabled=!1)},[t,l.disabled,i]);Ve(c,[c]);const d=v.useCallback((h={})=>{const{onClick:m,onMouseDown:b,onKeyUp:g,onKeyDown:x,onPointerDown:C,...y}=h;return sl({type:s?"button":void 0,onClick(S){if(t){S.preventDefault();return}m==null||m(S)},onMouseDown(S){t||b==null||b(S)},onKeyDown(S){if(t||(ra(S),x==null||x(S)),S.baseUIHandlerPrevented)return;const E=S.target===S.currentTarget&&!s&&!u()&&!t,I=S.key==="Enter",A=S.key===" ";E&&((A||I)&&S.preventDefault(),I&&(m==null||m(S)))},onKeyUp(S){t||(ra(S),g==null||g(S)),!S.baseUIHandlerPrevented&&S.target===S.currentTarget&&!s&&!t&&S.key===" "&&(m==null||m(S))},onPointerDown(S){if(t){S.preventDefault();return}C==null||C(S)}},s?void 0:{role:"button"},l,y)},[t,l,s,u]),w=Fe(h=>{o.current=h,c()});return{getButtonProps:d,buttonRef:w}}function Eb(e){return Cg(e)&&e.tagName==="BUTTON"}function Dl(e){const{allowInputSyncRef:t,disabled:n,formatOptionsRef:r,getStepAmount:s,id:o,incrementValue:i,inputRef:u,inputValue:l,intentionalTouchCheckTimeout:c,isIncrement:d,isPressedRef:w,locale:h,maxWithDefault:m,minWithDefault:b,movesAfterTouchRef:g,readOnly:x,setValue:C,startAutoChange:y,stopAutoChange:N,value:S,valueRef:E,lastChangedValueRef:I,onValueCommitted:A}=e,k=v.useRef({x:0,y:0}),D=v.useRef(!1),_=v.useRef(!1),F=v.useRef(""),$=S!=null&&S<=b,O=S!=null&&S>=m,G=d?"increment-press":"decrement-press";function z(M){t.current=!0;const V=Ft(l,h,r.current);V!==null&&(E.current=V,C(V,Oe(G,M,void 0,{direction:d?1:-1})))}return{disabled:n||(d?O:$),"aria-readonly":x||void 0,"aria-label":d?"Increase":"Decrease","aria-controls":o,tabIndex:-1,style:{WebkitUserSelect:"none",userSelect:"none"},onTouchStart(){D.current=!0},onTouchEnd(){D.current=!1},onClick(M){const V=n||x||(d?O:$);if(M.defaultPrevented||V||(F.current==="touch"?_.current:M.detail!==0))return;z(M.nativeEvent);const q=s(M)??rr,B=E.current;i(q,{direction:d?1:-1,event:M.nativeEvent,reason:G});const re=I.current??E.current;re!==B&&A(re,mn(G,M.nativeEvent))},onPointerDown(M){var B;const V=!M.button||M.button===0,q=n||(d?O:$);M.defaultPrevented||x||!V||q||(F.current=M.pointerType,_.current=!1,w.current=!0,k.current={x:M.clientX,y:M.clientY},z(M.nativeEvent),M.pointerType!=="touch"?(M.preventDefault(),(B=u.current)==null||B.focus(),y(d,M)):c.start(fb,()=>{const re=g.current;g.current=0,w.current&&re!=null&&re<pb?(y(d,M),_.current=!0):(_.current=!1,N())}))},onPointerUp(M){M.pointerType==="touch"&&(w.current=!1)},onPointerMove(M){if(n||x||(d?O:$)||M.pointerType!=="touch"||!w.current)return;g.current!=null&&(g.current+=1);const{x:q,y:B}=k.current,re=q-M.clientX,ae=B-M.clientY;re**2+ae**2>hb**2&&N()},onMouseEnter(M){const V=n||x||(d?O:$);M.defaultPrevented||V||!w.current||D.current||F.current==="touch"||y(d,M)},onMouseLeave(){D.current||N()},onMouseUp(){D.current||N()}}}const Pl=v.forwardRef(function(t,n){const{render:r,className:s,disabled:o=!1,nativeButton:i=!0,...u}=t,{allowInputSyncRef:l,disabled:c,formatOptionsRef:d,getStepAmount:w,id:h,incrementValue:m,inputRef:b,inputValue:g,intentionalTouchCheckTimeout:x,isPressedRef:C,locale:y,maxWithDefault:N,minWithDefault:S,movesAfterTouchRef:E,readOnly:I,setValue:A,startAutoChange:k,state:D,stopAutoChange:_,value:F,valueRef:$,lastChangedValueRef:O,onValueCommitted:G}=Rn(),z=o||c,ue=Dl({isIncrement:!0,inputRef:b,startAutoChange:k,stopAutoChange:_,minWithDefault:S,maxWithDefault:N,value:F,inputValue:g,disabled:z,readOnly:I,id:h,setValue:A,getStepAmount:w,incrementValue:m,allowInputSyncRef:l,formatOptionsRef:d,valueRef:$,isPressedRef:C,intentionalTouchCheckTimeout:x,movesAfterTouchRef:E,locale:y,lastChangedValueRef:O,onValueCommitted:G}),{getButtonProps:M,buttonRef:V}=Ml({disabled:z,native:i}),q=v.useMemo(()=>({...D,disabled:z}),[D,z]);return wn("button",t,{ref:[n,V],state:q,props:[ue,u,M],stateAttributesMapping:cn})});process.env.NODE_ENV!=="production"&&(Pl.displayName="NumberFieldIncrement");const _l=v.forwardRef(function(t,n){const{render:r,className:s,disabled:o=!1,nativeButton:i=!0,...u}=t,{allowInputSyncRef:l,disabled:c,formatOptionsRef:d,getStepAmount:w,id:h,incrementValue:m,inputRef:b,inputValue:g,intentionalTouchCheckTimeout:x,isPressedRef:C,maxWithDefault:y,minWithDefault:N,movesAfterTouchRef:S,readOnly:E,setValue:I,startAutoChange:A,state:k,stopAutoChange:D,value:_,valueRef:F,locale:$,lastChangedValueRef:O,onValueCommitted:G}=Rn(),z=o||c,ue=Dl({isIncrement:!1,inputRef:b,startAutoChange:A,stopAutoChange:D,minWithDefault:N,maxWithDefault:y,value:_,inputValue:g,disabled:z,readOnly:E,id:h,setValue:I,getStepAmount:w,incrementValue:m,allowInputSyncRef:l,formatOptionsRef:d,valueRef:F,isPressedRef:C,intentionalTouchCheckTimeout:x,movesAfterTouchRef:S,locale:$,lastChangedValueRef:O,onValueCommitted:G}),{getButtonProps:M,buttonRef:V}=Ml({disabled:z,native:i}),q=v.useMemo(()=>({...k,disabled:z}),[k,z]);return wn("button",t,{ref:[n,V],state:q,props:[ue,u,M],stateAttributesMapping:cn})});process.env.NODE_ENV!=="production"&&(_l.displayName="NumberFieldDecrement");function Ab(e){e.preventDefault(),e.stopPropagation()}function kb(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const Fl=v.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Le,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(Fl.displayName="FormContext");function Vl(){return v.useContext(Fl)}function Ib(e){const{enabled:t=!0,value:n,id:r,name:s,controlRef:o,commit:i}=e,{formRef:u}=Vl(),{invalid:l,markedDirtyRef:c,validityData:d,setValidityData:w}=ea(),h=Fe(e.getValue);Ve(()=>{if(!t)return;let m=n;m===void 0&&(m=h()),d.initialValue===null&&m!==null&&w(b=>({...b,initialValue:m}))},[t,w,n,d.initialValue,h]),Ve(()=>{!t||!r||u.current.fields.set(r,{getValue:h,name:s,controlRef:o,validityData:kb(d,l),validate(){let m=n;m===void 0&&(m=h()),c.current=!0,Lc.flushSync(()=>i(m))}})},[i,o,t,u,h,r,l,c,s,d,n]),Ve(()=>{const m=u.current.fields;return()=>{r&&m.delete(r)}},[u,r])}function Mb(e,t){const n=v.useRef(e),r=Fe(t);Ve(()=>{n.current!==e&&r(n.current)},[e,r]),Ve(()=>{n.current=e},[e])}const Db={...Pg,...cn},Pb=new Set(["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Enter","Escape"]),Ll=v.forwardRef(function(t,n){const{render:r,className:s,...o}=t,{allowInputSyncRef:i,disabled:u,formatOptionsRef:l,getAllowedNonNumericKeys:c,getStepAmount:d,id:w,incrementValue:h,inputMode:m,inputValue:b,max:g,min:x,name:C,readOnly:y,required:N,setValue:S,state:E,setInputValue:I,locale:A,inputRef:k,value:D,onValueCommitted:_,lastChangedValueRef:F,hasPendingCommitRef:$,valueRef:O}=Rn(),{clearErrors:G}=Vl(),{validationMode:z,setTouched:ue,setFocused:M,invalid:V,shouldValidateOnChange:q,validation:B}=ea(),{labelId:re}=nl(),ae=v.useRef(!1),ve=v.useRef(!1);return Ib({id:w,commit:B.commit,value:D,controlRef:k,name:C,getValue:()=>D??null}),Mb(D,P=>{const U=q();if(G(C),U&&B.commit(D),!(P===D||U)){if(ve.current){ve.current=!1;return}B.commit(D,!0)}}),wn("input",t,{ref:[n,k],state:E,props:[{id:w,required:N,disabled:u,readOnly:y,inputMode:m,value:b,type:"text",autoComplete:"off",autoCorrect:"off",spellCheck:"false","aria-roledescription":"Number field","aria-invalid":V||void 0,"aria-labelledby":re,suppressHydrationWarning:!0,onFocus(P){if(P.defaultPrevented||y||u||ae.current)return;ae.current=!0,M(!0);const U=P.currentTarget,Z=U.value.length;U.setSelectionRange(Z,Z)},onBlur(P){if(P.defaultPrevented||y||u)return;ue(!0),M(!1);const U=!i.current,Z=$.current;if(i.current=!0,b.trim()===""){S(null,Oe(la,P.nativeEvent)),z==="onBlur"&&B.commit(null),_(null,mn(la,P.nativeEvent));return}const W=l.current,ee=Ft(b,A,W);if(ee===null)return;const H=(W==null?void 0:W.maximumFractionDigits)!=null||(W==null?void 0:W.minimumFractionDigits)!=null,be=W==null?void 0:W.maximumFractionDigits,Ne=H&&typeof be=="number"?Number(ee.toFixed(be)):ee,Ce=mn(Sl,P.nativeEvent),me=D!==Ne,We=U||me||Z;z==="onBlur"&&B.commit(Ne),me&&(ve.current=!0,S(Ne,Oe(Sl,P.nativeEvent))),We&&_(Ne,Ce);const Ke=_t(Ne,A,W),Vt=ul(ee,A,W);!(!H&&ee===D&&b===Vt)&&b!==Ke&&I(Ke)},onChange(P){if(P.nativeEvent.defaultPrevented)return;i.current=!1;const U=P.target.value;if(U.trim()===""){I(U),S(null,Oe(la,P.nativeEvent));return}const Z=c();if(!Array.from(U).every(H=>{const be=H>="0"&&H<="9",Ne=aa.test(H),Ce=oa.test(H),me=hl.test(H),We=ml.test(H),Ke=pn.test(H);return be||Ne||Ce||me||We||Ke||Z.has(H)}))return;if(P.isTrusted){I(U);const H=Ft(U,A,l.current);H!==null&&S(H,Oe(Cl,P.nativeEvent));return}const ee=Ft(U,A,l.current);ee!==null&&(I(U),S(ee,Oe(Cl,P.nativeEvent)))},onKeyDown(P){if(P.defaultPrevented||y||u)return;const U=P.nativeEvent;i.current=!0;const Z=c();let W=Z.has(P.key);const{decimal:ee,currency:H,percentSign:be}=ia(A,l.current),Ne=P.currentTarget.selectionStart,Ce=P.currentTarget.selectionEnd,me=Ne===0&&Ce===b.length,We=oe=>Ne!=null&&Ce!=null&&oe>=Ne&&oe<Ce;if(pn.test(P.key)&&Array.from(Z).some(oe=>pn.test(oe||""))){const oe=b.search(vl),je=oe!=null&&oe!==-1&&We(oe);W=!(pn.test(b)||nr.test(b))||me||je}if(nr.test(P.key)&&Array.from(Z).some(oe=>nr.test(oe||""))){const oe=b.search(Nl),je=oe!=null&&oe!==-1&&We(oe);W=!(pn.test(b)||nr.test(b))||me||je}[ee,H,be].forEach(oe=>{if(P.key===oe){const je=b.indexOf(oe),wr=We(je);W=!b.includes(oe)||me||wr}});const Ke=P.key>="0"&&P.key<="9",Vt=aa.test(P.key),Lt=oa.test(P.key),cr=ml.test(P.key),dr=Pb.has(P.key);if(P.which===229||P.altKey||P.ctrlKey||P.metaKey||W||Ke||Vt||cr||Lt||dr)return;const dt=Ft(b,A,l.current),Ot=d(P)??rr;Ab(P);const wt=mn(hn,U);P.key==="ArrowUp"?(h(Ot,{direction:1,currentValue:dt,event:U,reason:hn}),_(F.current??O.current,wt)):P.key==="ArrowDown"?(h(Ot,{direction:-1,currentValue:dt,event:U,reason:hn}),_(F.current??O.current,wt)):P.key==="Home"&&x!=null?(S(x,Oe(hn,U)),_(F.current??O.current,wt)):P.key==="End"&&g!=null&&(S(g,Oe(hn,U)),_(F.current??O.current,wt))},onPaste(P){if(P.defaultPrevented||y||u)return;P.preventDefault();const Z=(P.clipboardData||window.Clipboard).getData("text/plain"),W=Ft(Z,A,l.current);W!==null&&(i.current=!1,S(W,Oe(Cb,P.nativeEvent)),I(Z))}},B.getValidationProps(),o],stateAttributesMapping:Db})});process.env.NODE_ENV!=="production"&&(Ll.displayName="NumberFieldInput");const _b={wuStepper:"_wuStepper_apbnq_1"},Fb=({onChange:e,Label:t,defaultValue:n=0,readonly:r,dir:s,step:o=1,min:i,max:u,value:l,className:c,labelPosition:d="left",disabled:w,resetInvalidValueOnBlur:h=!0,...m})=>{const b=v.useId(),[g,x]=v.useState(l!==void 0?Number(l):n||0);v.useEffect(()=>{l!==void 0&&x(Number(l))},[l]);const C=A=>{x(A),e==null||e(A)},y=A=>{const k=Number(A.target.value);Number.isNaN(k)||x(k)},N=()=>{h&&(i!==void 0&&g<i?(x(i),e==null||e(i)):u!==void 0&&g>u&&(x(u),e==null||e(u)))};v.useEffect(()=>{l&&n&&console.warn("As both value and defaultValue are passed, value will be used")},[l,n]);const S={inc:r||u!==void 0&&g>=u||w,dec:r||i!==void 0&&g<=i||w},E=i!==void 0&&g<i||u!==void 0&&g>u,I=f("wu-flex wu-items-center wu-justify-center wu-rounded-none wu-bg-gray-10 wu-w-8 wu-h-8 wu-text-blue-q wu-p-2 wu-absolute wu-top-0 hover:wu-bg-gray-20","disabled:wu-cursor-not-allowed disabled:wu-bg-black/10 disabled:wu-text-gray-subtle disabled:wu-outline-gray-subtle");return a.jsxs(Tl,{id:b,value:g,step:o,readOnly:r,onValueChange:A=>typeof A=="number"&&C(A),dir:s,className:f("wu-flex wu-stepper",s==="rtl"&&d!=="top"&&"wu-gap-2",_b.wuStepper,Vb({labelPosition:d}),c),children:[t&&a.jsx(Te,{htmlFor:b,className:"wu-input-label",children:t}),a.jsxs(Al,{className:"wu-flex wu-max-w-[97px] wu-relative",children:[a.jsx(_l,{"aria-label":"decrement",className:f(I,s==="rtl"?"wu-right-0":"wu-left-0","wu-stepper-button"),disabled:S.dec,children:a.jsx("span",{className:"wu-text-base wm-minimize"})}),a.jsx(Ll,{"aria-label":"stepper",role:"spinbutton",type:"text","aria-invalid":E||void 0,dir:s,className:f("wu-flex wu-w-[97px] wu-h-8 wu-border-b wu-border-gray-subtle wu-bg-gray-10 wu-p-2 wu-text-sm wu-font-normal wu-text-gray-lead","wu-h-[33px] wu-text-center wu-text-blue-q wu-text-xs wu-rounded-t-sm ","focus:wu-border-blue-p focus-visible:wu-outline-none wu-transition-colors hover:wu-border-gray-40","disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle","read-only:wu-cursor-not-allowed read-only:wu-bg-gray-20 read-only:wu-border-gray-40 read-only:wu-text-gray-subtle",E&&"wu-border-red-deep focus:wu-border-red-deep","wu-stepper-input"),readOnly:r,onChange:y,onBlur:N,disabled:w,min:i,max:u,step:o,value:g,...m}),a.jsx(Pl,{"aria-label":"increment",className:f(I,s==="rtl"?"wu-left-0":"wu-right-0","wu-stepper-button"),disabled:S.inc,children:a.jsx("span",{className:"wu-text-base wm-add"})})]})]})},Vb=ke.cva("wu-flex wu-w-fit",{variants:{labelPosition:{left:"wu-flex-row wu-text-right wu-gap-2 wu-items-center",top:"wu-flex-col"}}}),Ol=ke.cva("wu-inline-flex wu-items-center wu-justify-center wu-text-sm wu-font-medium wu-ring-offset-background wu-transition-colors hover:wu-bg-muted hover:wu-text-muted-foreground focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-2 disabled:wu-cursor-not-allowed disabled:wu-opacity-80",{variants:{variant:{default:"wu-bg-transparent",outline:"wu-border wu-border-input wu-bg-transparent hover:wu-bg-accent hover:wu-text-accent-foreground"},size:{default:"wu-h-10 wu-px-3",sm:"wu-h-9 wu-px-2.5",lg:"wu-h-11 wu-px-5"}},defaultVariants:{variant:"default",size:"default"}}),Lb=v.forwardRef(({className:e,variant:t,size:n,...r},s)=>a.jsx(Ta.Root,{ref:s,className:f(Ol({variant:t,size:n,className:e})),...r}));Lb.displayName=Ta.Root.displayName;const Wl=v.createContext({size:"default",variant:"default"}),sr=v.forwardRef(({className:e,variant:t,size:n,children:r,...s},o)=>a.jsx(Nn.Root,{ref:o,className:f("wu-flex wu-items-center wu-justify-center wu-gap-1",e),...s,children:a.jsx(Wl.Provider,{value:{variant:t,size:n},children:r})}));sr.displayName=Nn.Root.displayName;const ct=v.forwardRef(({className:e,children:t,variant:n,size:r,...s},o)=>{const i=v.useContext(Wl);return a.jsx(Nn.Item,{ref:o,className:f(Ol({variant:i.variant||n,size:i.size||r}),e),...s,children:t})});ct.displayName=Nn.Item.displayName;const Bl=p.forwardRef((e,t)=>{const{options:n,value:r,disabled:s,dir:o,onChange:i}=e,u=l=>f("wu-w-8 wu-h-8 wu-text-xl wu-leading-5 wu-rounded-full wu-text-gray-lead wu-relative wu-z-10 wu-p-0 wu-flex wu-items-center wu-justify-center",s&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-lead",l===r&&"wu-text-white",s&&r===l&&"wu-text-gray-lead","wu-switcher-icon-tab-item");return a.jsx(a.Fragment,{children:a.jsxs(sr,{ref:t,type:"single",value:r,onValueChange:i,disabled:s,dir:o,className:f("wu-relative wu-group wu-flex wu-flex-row wu-items-start wu-justify-start wu-gap-0 wu-w-16 wu-bg-gray-25 wu-rounded-full",s&&"wu-cursor-not-allowed","wu-switcher-icon-tab-group"),children:[a.jsx("div",{role:"slider",className:f("wu-absolute wu-z-0 wu-w-8 wu-h-8 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out",r==="opt1"&&"",r==="opt2"&&o!=="rtl"&&"wu-translate-x-full",r==="opt2"&&o==="rtl"&&"-wu-translate-x-full",s&&"wu-bg-gray-40","wu-switcher-icon-tab-slider")}),a.jsx(ct,{value:"opt1",className:u("opt1"),children:n[0].label}),a.jsx(ct,{value:"opt2",className:u("opt2"),children:n[1].label})]})})});Bl.displayName="_IconTab";const ql=p.forwardRef((e,t)=>{const{options:n,value:r,disabled:s,dir:o,size:i="md",onChange:u}=e,l=c=>f("wu-w-1/2 wu-text-xs wu-rounded-full wu-text-gray-lead wu-relative wu-z-10 wu-font-normal",s&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-lead",i==="sm"&&"wu-h-6 wu-min-w-20",i==="md"&&"wu-h-8 wu-min-w-28",i==="lg"&&"wu-h-10 wu-min-w-36",c===r&&"wu-text-white wu-font-medium",s&&r===c&&"wu-text-gray-lead","wu-switcher-tab-item");return a.jsx(a.Fragment,{children:a.jsxs(sr,{ref:t,type:"single",value:r,onValueChange:u,disabled:s,dir:o,className:f("wu-relative group wu-flex wu-flex-row wu-items-start wu-justify-start wu-gap-0 wu-w-fit wu-bg-gray-25 wu-rounded-full",s&&"wu-cursor-not-allowed","wu-switcher-tab-group"),children:[a.jsx("div",{role:"slider",className:f("wu-absolute wu-z-0 wu-w-1/2 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out ",i==="sm"&&"wu-h-6 wu-min-w-20",i==="md"&&"wu-h-8 wu-min-w-28",i==="lg"&&"wu-h-10 wu-min-w-36",r==="opt1"&&"",r==="opt2"&&o!=="rtl"&&"wu-translate-x-full",r==="opt2"&&o==="rtl"&&"-wu-translate-x-full",s&&"wu-bg-gray-40","wu-switcher-tab-slider")}),a.jsx(ct,{value:"opt1",className:l("opt1"),children:a.jsx("div",{className:"wu-min-w-16 wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap",children:n[0].label})}),a.jsx(ct,{value:"opt2",className:l("opt2"),children:a.jsx("div",{className:"wu-min-w-16 wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap",children:n[1].label})})]})})});ql.displayName="_Tab";const zl=p.forwardRef((e,t)=>{const{options:n,value:r,disabled:s,dir:o,onChange:i}=e,u=w=>f("wu-p-0 wu-w-fit wu-text-xs wu-text-gray-lead wu-h-fit wu-font-normal",s&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-subtle wu-text-gray-subtle",w===r&&"wu-text-primary wu-font-medium",s&&r===w&&"wu-text-gray-lead","wu-switcher-toggle-item"),l=f("wu-w-fit wu-gap-2",s&&"wu-cursor-not-allowed","wu-switcher-toggle-group"),c=f("wu-flex wu-items-center wu-justify-center wu-w-8 wu-h-3 wu-p-0 wu-border wu-rounded-full wu-cursor-pointer wu-border-blue-p focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2",s&&"wu-border-gray-subtle wu-cursor-not-allowed","wu-switcher-toggle-button"),d=f("wu-w-2 wu-h-2 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out",r==="opt1"&&o!=="rtl"&&"-wu-translate-x-[10px]",r==="opt1"&&o==="rtl"&&"wu-translate-x-[10px]",r==="opt2"&&o!=="rtl"&&"wu-translate-x-[10px]",r==="opt2"&&o==="rtl"&&"-wu-translate-x-[10px]",s&&"wu-hidden","wu-switcher-toggle-knob");return a.jsx(a.Fragment,{children:a.jsxs(sr,{ref:t,type:"single",value:r,disabled:s,dir:o,className:l,onValueChange:i,children:[a.jsx(ct,{value:"opt1",className:u("opt1"),children:a.jsx("div",{className:"wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap wu-text-right wu-switcher-toggle-item-label",children:n[0].label})}),a.jsx("button",{onClick:()=>i(r==="opt1"?"opt2":"opt1"),className:c,disabled:s,"aria-label":"knob",dir:o,children:a.jsx("div",{className:d,role:"knob",dir:o})}),a.jsx(ct,{value:"opt2",className:u("opt2"),children:a.jsx("div",{className:"wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap wu-switcher-toggle-item-label",children:n[1].label})})]})})});zl.displayName="_Toggle";const $l=p.forwardRef((e,t)=>{const{type:n,options:r,value:s,disabled:o,dir:i,size:u,onChange:l,toggle:c=!0,...d}=e,[w,h]=p.useState(),m=b=>{let g=w;b!==""?g=b:c&&(g=w==="opt1"?"opt2":"opt1");const x=g==="opt1"?r[0].value:r[1].value;l&&l(x),h(g)};if(p.useEffect(()=>{if(!Array.isArray(r)||r.length<2)throw new Error("Options are not sufficient");h(s===r[0].value?"opt1":"opt2")},[r,s]),!Array.isArray(r)||r.length<2)return a.jsx(a.Fragment,{});switch(n){case"toggle":return a.jsx(zl,{...d,ref:t,options:r,value:w||"opt1",onChange:m,disabled:o,dir:i});case"iconTab":return a.jsx(Bl,{ref:t,options:r,value:w||"opt1",onChange:m,disabled:o,dir:i});default:return a.jsx(ql,{ref:t,options:r,value:w||"opt1",onChange:m,disabled:o,dir:i,size:u})}});$l.displayName="WuSwitcher";const Hl=et.Root,da=v.forwardRef(({className:e,children:t,...n},r)=>a.jsx(et.List,{className:f("wu-relative wu-flex",e),...n,ref:r,children:t}));da.displayName=et.List.displayName;const wa=v.forwardRef(({className:e,...t},n)=>a.jsx(et.Trigger,{ref:n,className:f("wu-relative wu-inline-flex wu-items-center wu-whitespace-nowrap wu-text-xs wu-px-4 wu-py-2 wu-text-gray-600 wu-transition-colors wu-duration-200 data-[state=active]:wu-text-blue-p","data-[orientation=horizontal]:wu-justify-center",e),...t}));wa.displayName=et.Trigger.displayName;const Ul=v.forwardRef(({className:e,...t},n)=>a.jsx(et.Content,{ref:n,className:e,...t}));Ul.displayName=et.Content.displayName;const jl=({items:e,enableAnimation:t})=>{const n="wu-duration-700 wu-ease-in-out wu-transition-all data-[state=inactive]:wu-absolute data-[state=inactive]:wu-inset-0 data-[state=inactive]:wu-opacity-0 data-[state=inactive]:wu-z-0 data-[state=active]:wu-relative data-[state=active]:wu-opacity-100 data-[state=active]:wu-z-10";return a.jsx("div",{className:f("wu-w-full wu-h-full wu-flex-1 wu-overflow-auto",t&&"wu-relative wu-overflow-hidden","wu-tab-content-container"),children:e.map(r=>a.jsx(Ul,{value:r.value,forceMount:t||void 0,className:f("wu-w-full wu-h-full wu-overflow-y-auto",t&&n,"wu-tab-content"),children:r.Content},r.value))})},Ob=e=>{const[t,n]=p.useState(!1),[r,s]=p.useState(!1),o=()=>{const u=e.current;u&&(n(u.scrollLeft>0),s(u.scrollLeft+u.clientWidth<u.scrollWidth))};return p.useEffect(()=>{const u=e.current;return o(),u&&u.addEventListener("scroll",o),window.addEventListener("resize",o),()=>{u&&u.removeEventListener("scroll",o),window.removeEventListener("resize",o)}},[e]),{showLeftArrow:t,showRightArrow:r,scrollByTab:u=>{const l=e.current;if(l){const c=(u==="right"?l.clientWidth:-l.clientWidth)*.8;l.scrollBy({left:c,behavior:"smooth"})}}}},Gl=(e,t)=>{const[n,r]=p.useState({width:0,left:0,height:0,top:0}),s=t==="vertical";return p.useEffect(()=>{const o=e.current;if(o){const i=()=>{const l=o.querySelector('[data-state="active"]');if(l){const c={width:s?2:l.offsetWidth,left:s?0:l.offsetLeft,height:s?l.offsetHeight:1,top:s?l.offsetTop:0};r(c)}},u=new MutationObserver(i);return u.observe(o,{attributes:!0,subtree:!0}),i(),()=>{u.disconnect()}}},[e,s]),n},Wb=({items:e,value:t,defaultValue:n,onValueChange:r,enableAnimation:s=!1,className:o,dir:i="ltr",position:u="top"})=>{var N;const l=p.useRef(null),c=Gl(l,"horizontal"),{showLeftArrow:d,showRightArrow:w,scrollByTab:h}=Ob(l),[m,b]=p.useState(!1),g=()=>h("left"),x=()=>h("right"),C=S=>a.jsx("div",{"data-testid":`gradient-overlay-${S}`,className:f("wu-absolute wu-top-0 wu-h-full wu-w-20 wu-z-10 wu-pointer-events-none",S==="left"?"wu-left-0 wu-bg-gradient-to-r wu-from-white wu-to-transparent":"wu-right-0 wu-bg-gradient-to-l wu-from-white wu-to-transparent")}),y=(S,E,I)=>{const A=E==="left";return a.jsx("button",{onClick:S,className:f("wu-absolute wu-z-20 wu-flex wu-items-center wu-justify-center wu-px-1 wu-py-1 wu-transition-all wu-duration-300 wu-h-8",A?"wu-left-0":"wu-right-0",I&&"wu-translate-x-0 wu-opacity-100",!I&&[A?"-wu-translate-x-full":"wu-translate-x-full","wu-opacity-0"]),"aria-label":A?"scroll-left":"scroll-right",children:a.jsx("span",{className:f("wu-text-blue-p wu-text-lg",A?"wm-keyboard-arrow-left":"wm-keyboard-arrow-right")})})};return a.jsxs(Hl,{defaultValue:n||((N=e[0])==null?void 0:N.value),value:t,onValueChange:r,orientation:"horizontal",dir:i,className:f("wu-relative wu-flex wu-flex-col wu-w-full wu-h-full",u==="bottom"?"wu-flex-col-reverse":"wu-flex-col",o),role:"tabs",children:[a.jsxs("div",{className:"wu-relative wu-flex wu-overflow-hidden wu-shrink-0 wu-border-b wu-border-gray-200",onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),"aria-label":"tablistWrapper",children:[d&&m&&C("left"),y(g,"left",d&&m),a.jsxs(da,{ref:l,className:f("wu-relative wu-flex wu-w-full wu-overflow-x-auto wu-flex-row","[&::-webkit-scrollbar]:wu-hidden [-ms-overflow-style:none] [scrollbar-width:none]","wu-tablist"),children:[e.map(S=>a.jsx(wa,{value:S.value,children:S.Trigger},S.value)),a.jsx("span",{className:"wu-absolute wu-bg-blue-p wu-transition-all wu-duration-300 wu-indicator wu-bottom-0",style:{width:c.width,left:c.left,height:1.25,bottom:u==="bottom"?void 0:0,top:u==="bottom"?0:void 0}})]}),w&&m&&C("right"),y(x,"right",w&&m)]}),a.jsx(jl,{items:e,enableAnimation:s})]})},Bb=e=>{const[t,n]=p.useState(!1),[r,s]=p.useState(!1),o=()=>{const u=e.current;u&&(n(u.scrollTop>0),s(u.scrollTop+u.clientHeight<u.scrollHeight))};return p.useEffect(()=>{const u=e.current;if(u)return o(),u.addEventListener("scroll",o),window.addEventListener("resize",o),()=>{u.removeEventListener("scroll",o),window.removeEventListener("resize",o)}},[e]),{showTopArrow:t,showBottomArrow:r,scrollByTab:u=>{const l=e.current;if(l){const c=(u==="down"?l.clientHeight:-l.clientHeight)*.8;l.scrollBy({top:c,behavior:"smooth"})}}}},qb=({items:e,value:t,defaultValue:n,onValueChange:r,enableAnimation:s=!1,className:o,dir:i="ltr",position:u="left"})=>{var N;const l=p.useRef(null),c=Gl(l,"vertical"),{showTopArrow:d,showBottomArrow:w,scrollByTab:h}=Bb(l),[m,b]=p.useState(!1),g=()=>h("up"),x=()=>h("down"),C=S=>a.jsx("div",{className:f("wu-absolute wu-left-0 wu-w-full wu-h-12 wu-z-10 wu-pointer-events-none",S==="top"?"wu-top-0 wu-bg-gradient-to-b wu-from-white wu-to-transparent":"wu-bottom-0 wu-bg-gradient-to-t wu-from-white wu-to-transparent")}),y=(S,E,I)=>{const A=E==="up";return a.jsx("button",{onClick:S,className:f("wu-absolute wu-z-20 wu-flex wu-items-center wu-justify-center wu-px-1 wu-py-1 wu-transition-all wu-duration-300 wu-w-full",A?"-wu-top-1":"-wu-bottom-1",I&&"wu-translate-y-0 wu-opacity-100",!I&&[A?"-wu-translate-y-full":"wu-translate-y-full","wu-opacity-0"]),"aria-label":A?"scroll-up":"scroll-down",children:a.jsx("span",{className:f("wu-text-blue-p wu-text-lg",A?"wm-keyboard-arrow-up":"wm-keyboard-arrow-down")})})};return a.jsxs(Hl,{defaultValue:n||((N=e[0])==null?void 0:N.value),value:t,onValueChange:r,orientation:"vertical",dir:i,className:f("wu-relative wu-h-full wu-w-full wu-flex",u==="left"?"wu-flex-row":"wu-flex-row-reverse",o),role:"tabs",children:[a.jsxs("div",{className:"wu-relative wu-flex wu-overflow-hidden wu-shrink-0",onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),"aria-label":"tablistWrapper",children:[d&&m&&C("top"),y(g,"up",d&&m),a.jsxs(da,{ref:l,className:f("wu-relative wu-flex wu-h-full wu-overflow-y-auto wu-flex-col","[&::-webkit-scrollbar]:wu-hidden [-ms-overflow-style:none] [scrollbar-width:none]","wu-tablist"),children:[e.map(S=>a.jsx(wa,{value:S.value,children:S.Trigger},S.value)),a.jsx("span",{className:"wu-absolute wu-bg-blue-p wu-transition-all wu-duration-300 wu-indicator",style:{width:2,left:u==="left"?0:void 0,right:u==="right"?0:void 0,height:c.height,top:c.top}})]}),w&&m&&C("bottom"),y(x,"down",w&&m)]}),a.jsx(jl,{items:e,enableAnimation:s})]})},zb=({...e})=>e.orientation==="vertical"?a.jsx(qb,{...e}):a.jsx(Wb,{...e}),fa=v.forwardRef(({className:e,...t},n)=>a.jsx("table",{ref:n,className:f("wu-w-full wu-caption-bottom wu-text-sm",e),...t}));fa.displayName="Table";const Kl=v.forwardRef(({className:e,...t},n)=>a.jsx("thead",{ref:n,className:f("[&_tr]:wu-border-b",e),...t}));Kl.displayName="TableHeader";const Yl=v.forwardRef(({className:e,...t},n)=>a.jsx("tbody",{ref:n,className:f("",e),...t}));Yl.displayName="TableBody";const $b=v.forwardRef(({className:e,...t},n)=>a.jsx("tfoot",{ref:n,className:f("wu-border-t wu-bg-muted/50 wu-font-medium [&>tr]:last:wu-border-b-0",e),...t}));$b.displayName="TableFooter";const gn=v.forwardRef(({className:e,...t},n)=>a.jsx("tr",{ref:n,className:f("wu-border-b wu-transition-colors wu-hover:wu-bg-muted/50 data-[state=selected]:wu-bg-muted",e),...t}));gn.displayName="TableRow";const pa=v.forwardRef(({className:e,...t},n)=>a.jsx("th",{ref:n,className:f("wu-px-4 wu-text-left wu-align-middle wu-font-medium wu-text-muted-foreground [&:has([role=checkbox])]:wu-pr-0",e),...t}));pa.displayName="TableHead";const ar=v.forwardRef(({className:e,...t},n)=>a.jsx("td",{ref:n,className:f("wu-p-4 wu-align-middle [&:has([role=checkbox])]:wu-pr-0",e),...t}));ar.displayName="TableCell";const ha=v.forwardRef(({className:e,...t},n)=>a.jsx("caption",{ref:n,className:f("wu-mt-4 wu-text-sm wu-text-gray-subtle wu-font-normal",e),...t}));ha.displayName="TableCaption";const Hb=({columns:e,rowSelection:t})=>{const n=(t==null?void 0:t.isEnabled)??!1,r=(t==null?void 0:t.size)??48,{onRowSelect:s,rowUniqueKey:o,isRowDisabled:i,hideSelectAll:u}=t||{},l=p.useCallback(d=>w=>{s==null||s(w?d:[])},[s]);return{finalColumns:p.useMemo(()=>n?[{id:"select",header:({table:d})=>{const w=d.getRowModel().rows.map(m=>m.original).filter(m=>!(i!=null&&i(m))),h=l(w);return u?a.jsx("div",{}):a.jsx(De,{checked:d.getIsSomeRowsSelected()||d.getIsAllRowsSelected(),partial:d.getIsSomeRowsSelected()&&!d.getIsAllRowsSelected(),onChange:m=>{d.toggleAllRowsSelected(!!m),h(!!m)},"aria-label":"Select all","data-testid":d.getIsSomeRowsSelected()&&!d.getIsAllRowsSelected()?"select-partial":"select-all"})},cell:({row:d})=>{const w=(i==null?void 0:i(d.original))??!1;return a.jsx(De,{checked:d.getIsSelected(),disabled:w,onChange:h=>{w||d.toggleSelected(!!h)},"aria-label":String(d.original[o])})},filterable:!1,accessorKey:"select",size:r},...e]:e,[e,n,l,i,u])}};function Xl({data:e,columns:t,rowSelection:n}){const{finalColumns:r}=Hb({columns:t,rowSelection:n}),s=p.useMemo(()=>{if(!(n!=null&&n.isEnabled))return{};const o={};for(const i of n.selectedRows){const u=e.findIndex(l=>l[n.rowUniqueKey]===i[n.rowUniqueKey]);u!==-1&&(o[u]=!0)}return o},[e,n]);return{finalColumns:r,rowSelectionState:s}}const Zl=({table:e,size:t,NoDataContent:n,isLoading:r,CustomLoader:s,isRowDisabled:o})=>{var i;return a.jsx(Yl,{children:r?a.jsx(gn,{children:a.jsx(ar,{colSpan:e.getAllColumns().length,className:"wu-text-center wu-h-[35vh] wu-loader-container",children:s||a.jsx(bt,{className:"wu-w-full"})})}):(i=e.getRowModel().rows)!=null&&i.length?e.getRowModel().rows.map((u,l)=>{const c=(o==null?void 0:o(u.original))??!1;return a.jsx(gn,{"data-disabled":c,"data-state":u.getIsSelected()&&"selected",className:f("wu-group wu-transition-colors wu-border-b wu-border-black/[12%]",u.getIsSelected()&&"wu-bg-blue-p/[8%]",!c&&(u.getIsSelected()?"hover:wu-bg-blue-p/[16%]":"hover:wu-bg-black/[2%]")),children:u.getVisibleCells().map((d,w)=>a.jsx(ar,{className:f("wu-py-0 wu-font-light wu-text-xs",t==="compact"?"wu-h-8":"wu-h-10",d.column.id==="actions"?"wu-opacity-0 wu-transition-opacity wu-duration-150 wu-ease-in-out group-hover:wu-opacity-100":"",d.column.columnDef.cellAlign==="right"&&"wu-text-right",d.column.columnDef.cellAlign==="center"&&"wu-text-center",d.column.columnDef.cellAlign==="left"&&"wu-text-left"),children:qe.flexRender(d.column.columnDef.cell,d.getContext())},`${d.id}-${w}`))},`${u.id}-${l}`)}):a.jsx(gn,{children:a.jsx(ar,{colSpan:e.getAllColumns().length,children:n})})})},Jl=({table:e,sortableColumns:t,manual:n=!1,onSort:r,size:s,isRowSelected:o,HeaderAction:i,isStickyHeader:u})=>{const l=s==="compact"?"wu-h-8":"wu-h-10",c=d=>{const{id:w,columnDef:h,getIsSorted:m,toggleSorting:b}=d,{header:g}=h;if(!t.includes(w))return g;const x=m(),C=x==="asc",y=x==="desc",N=()=>{n?(b(!y),r==null||r({id:w,desc:y})):b(d.getIsSorted()==="asc")};return a.jsxs("button",{onClick:N,"aria-label":`Sort by ${g}`,className:"wu-flex wu-items-center wu-gap-4",children:[g,a.jsxs("div",{className:"wu-relative",children:[a.jsx("span",{className:f("wu-absolute -wu-top-[15px] wm-arrow-drop-down wu-text-xl",C&&"wu-hidden",!x&&"-wu-top-[11px]")}),a.jsx("span",{className:f("wu-absolute -wu-bottom-[13px] wm-arrow-drop-up wu-text-xl",y&&"wu-hidden",!x&&"-wu-bottom-[10px]")})]})]})};return a.jsxs(Kl,{className:f("wu-border-t wu-border-black/[12%] wu-bg-gray-20 wu-relative",u&&"wu-sticky wu-top-[-.5px] wu-z-10",l),children:[e.getHeaderGroups().map(d=>a.jsx(gn,{className:"wu-relative",children:d.headers.map(w=>w.column.id==="actions"?a.jsx(pa,{colSpan:w.colSpan,className:"wu-text-xs wu-font-medium",style:{width:`${w.getSize()}px`}},w.id):a.jsx(pa,{colSpan:w.colSpan,className:f("wu-text-xs wu-font-medium wu-bg-[#EEEEEE]","wu-relative wu-z-0",w.column.columnDef.headerAlign==="right"&&"wu-text-right",w.column.columnDef.headerAlign==="center"&&"wu-text-center",w.column.columnDef.headerAlign==="left"&&"wu-text-left"),style:{width:`${w.getSize()}px`},children:qe.flexRender(c(w.column),w.getContext())},w.id))},d.id)),o&&i&&a.jsxs("div",{className:f("wu-absolute wu-top-[-1px] wu-left-0 wu-right-0 wu-flex wu-items-center wu-border-b wu-border-t wu-bg-gray-20 wu-z-10",l),children:[a.jsx("div",{className:"wu-flex wu-items-center wu-px-4",style:{width:e.getVisibleLeafColumns()[0].getSize()},children:a.jsx(De,{checked:e.getIsSomeRowsSelected()||e.getIsAllRowsSelected(),partial:e.getIsSomeRowsSelected()&&!e.getIsAllRowsSelected(),onChange:d=>{e.toggleAllRowsSelected(!!d)},"aria-label":"Select all","data-testid":"select-all-header-checkbox"})}),a.jsx("div",{className:"wu-flex-1 wu-flex wu-pr-4",children:i})]})]})},Ql=ke.cva("",{variants:{variant:{striped:"[&_tr:nth-child(even)]:wu-bg-zinc-50",unstyled:"",bordered:"wu-border-collapse wu-border [&_th]:wu-border [&_td]:wu-border"}}}),Ub=({data:e,columns:t,isLoading:n=!1,variant:r="unstyled",sort:s,size:o,rowSelection:i,HeaderAction:u,NoDataContent:l,stickyHeader:c=!1,CustomLoader:d,caption:w,...h})=>{var N;const{finalColumns:m,rowSelectionState:b}=Xl({data:e,columns:t,rowSelection:i}),g=p.useMemo(()=>m.filter(S=>S.enableSorting).map(S=>S.accessorKey),[m]),x=((N=i==null?void 0:i.selectedRows)==null?void 0:N.length)??0,C=S=>{if(typeof S=="function"){const E=S(b),I=Object.keys(E).filter(A=>E[Number(A)]).map(A=>e[Number(A)]);i==null||i.onRowSelect(I)}},y=qe.useReactTable({data:e,columns:m,getCoreRowModel:qe.getCoreRowModel(),getPaginationRowModel:qe.getPaginationRowModel(),manualPagination:!0,manualSorting:!0,manualFiltering:!0,enableRowSelection:i==null?void 0:i.isEnabled,state:{...i!=null&&i.isEnabled?{rowSelection:b}:{}},onRowSelectionChange:C});return a.jsxs("div",{className:f("wu-text-gray-lead wu-table-container wu-relative"),children:[w&&a.jsx(ha,{className:"wu-font-light",children:w}),a.jsxs(fa,{...h,className:f(Ql({variant:r}),h.className),children:[a.jsx(Jl,{table:y,sortableColumns:g,manual:!0,onSort:s==null?void 0:s.onSort,size:o,HeaderAction:u,isRowSelected:x>0,isStickyHeader:c}),!n&&a.jsx(Zl,{table:y,size:o,NoDataContent:l,CustomLoader:d})]}),n&&a.jsx("div",{className:"wu-flex wu-items-center wu-justify-center wu-h-96",children:a.jsx(bt,{})})]})},jb=({data:e,columns:t,variant:n="unstyled",size:r="default",sort:s,filterText:o,pagination:i,stickyHeader:u,HeaderAction:l,CustomLoader:c,NoDataContent:d,isLoading:w,caption:h,rowSelection:m,...b})=>{var $;const[g,x]=p.useState((s==null?void 0:s.initial)||[]),[C,y]=p.useState([]),[N,S]=p.useState((i==null?void 0:i.pageIndex)??0),{finalColumns:E,rowSelectionState:I}=Xl({data:e,columns:t,rowSelection:m}),A=p.useMemo(()=>E.filter(O=>O.enableSorting).map(O=>O.accessorKey),[E]),k=p.useMemo(()=>E.filter(O=>O.filterable).map(O=>O.accessorKey),[E]),D=(($=m==null?void 0:m.selectedRows)==null?void 0:$.length)??0,_=O=>{const G=typeof O=="function"?O(I):O,z=[],ue=m==null?void 0:m.isRowDisabled;for(const M in G){if(!G[M])continue;const V=e[Number(M)];V&&(ue!=null&&ue(V)||z.push(V))}m==null||m.onRowSelect(z)},F=qe.useReactTable({data:e,columns:E,getCoreRowModel:qe.getCoreRowModel(),getFilteredRowModel:qe.getFilteredRowModel(),getSortedRowModel:qe.getSortedRowModel(),getPaginationRowModel:i?qe.getPaginationRowModel():void 0,enableRowSelection:m!=null&&m.isRowDisabled?O=>!m.isRowDisabled(O.original):!0,state:{sorting:g,columnFilters:C,...i?{pagination:i}:{},...m!=null&&m.isEnabled?{rowSelection:I}:{}},onSortingChange:x,onColumnFiltersChange:y,onRowSelectionChange:_});return p.useEffect(()=>{k.forEach(O=>{var G;(G=F.getColumn(O))==null||G.setFilterValue(o)})},[o,k,F]),p.useEffect(()=>{i&&(i==null?void 0:i.pageIndex)!==N&&(m==null||m.onRowSelect(()=>[]),F.resetRowSelection(),S(i.pageIndex))},[i==null?void 0:i.pageIndex]),a.jsx("div",{className:"wu-text-gray-lead wu-table-container wu-relative",children:a.jsxs(fa,{...b,className:f("wu-overflow-x-auto wu-w-full",Ql({variant:n}),"wu-table-fixed",b.className),children:[h&&a.jsx(ha,{children:h}),a.jsx(Jl,{table:F,sortableColumns:A,size:r,HeaderAction:l,isRowSelected:D>0,isStickyHeader:u}),a.jsx(Zl,{table:F,size:r,NoDataContent:d,CustomLoader:c,isLoading:w,isRowDisabled:m==null?void 0:m.isRowDisabled})]})})},Rl=v.forwardRef(({className:e,...t},n)=>a.jsx("textarea",{className:f("wu-flex wu-w-full wu-border-b wu-border-gray-subtle wu-bg-gray-10 wu-text-gray-lead wu-p-2 wu-text-sm wu-font-normal wu-placeholder:wu-text-gray-subtle wu-placeholder:wu-font-light focus-visible:wu-outline-none disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle read-only:wu-cursor-not-allowed read-only:wu-bg-gray-20 read-only:wu-border-gray-40 read-only:wu-text-gray-subtle focus:wu-border-blue-p wu-transition-colors hover:wu-border-gray-40 ",e),ref:n,...t}));Rl.displayName="Textarea";const ec=p.forwardRef((e,t)=>{const{Label:n,id:r=Cn(),variant:s="flat",readonly:o,maxLength:i,labelPosition:u="top",...l}=e,c=w=>{l.onChange&&l.onChange(w)},d=jt(u);return a.jsxs("div",{className:f(d,"wu-flex wu-textarea-container"),dir:l.dir,children:[a.jsx(Rl,{...l,ref:t,id:r,className:f("wu-peer wu-rounded-t-sm",s==="outlined"?"wu-border wu-border-gray-subtle":"",l.className),onChange:c,readOnly:o,maxLength:i}),n&&a.jsx(Te,{htmlFor:r,className:"wu-textarea-label",children:n})]})});ec.displayName="WuTextarea";function Gb(e){if(typeof e=="string"&&e.includes("T")){const t=Y.parseISO(e);return Y.format(t,"HH:mm")}if(typeof e=="string"&&/^\d{2}:\d{2}:\d{2}$/.test(e)){const t=Y.parse(e,"HH:mm:ss",new Date);return Y.format(t,"HH:mm")}return typeof e=="string"&&/^\d{2}:\d{2}$/.test(e)?e:"00:00"}const tc=["12",...Array.from({length:11},(e,t)=>String(t+1).padStart(2,"0"))],nc=Array.from({length:60},(e,t)=>String(t).padStart(2,"0")),rc=["am","pm"],or=50;function Kb(e){return Array(or).fill(e).flat()}function ma(e,t){const n=e.indexOf(t);return[...e.slice(n),...e.slice(0,n)]}function Yb(e,t){let n=Number(e);return t==="pm"&&n<12&&(n+=12),t==="am"&&n===12&&(n=0),String(n).padStart(2,"0")}function sc(e){const t=Number(e),n=t>=12?"pm":"am",r=t%12===0?12:t%12;return{hour:String(r),meridiem:n}}const Xb=({value:e,isSelected:t,onClick:n})=>a.jsx("div",{onClick:n,className:f("wu-w-8 wu-h-8 wu-flex wu-items-center wu-justify-center wu-text-center wu-snap-start wu-rounded-[2px] wu-cursor-pointer hover:wu-bg-blue-p hover:wu-text-white",t&&"wu-bg-blue-p/15 wu-text-blue-p"),children:e}),ga=({values:e,selectedValue:t,scrollRef:n,onSelect:r,repeatItems:s=!0,className:o})=>a.jsx("div",{ref:n,className:f("wu-overflow-y-scroll wu-w-8 wu-snap-y wu-snap-mandatory [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",o),role:"presentation",children:(s?Kb(e):e).map((i,u)=>a.jsx(Xb,{value:i,isSelected:i===t,onClick:()=>r(i)},`${i}-${u}`))});function Zb(e,t,n,r){const s=p.useMemo(()=>e?ma(tc,t.padStart(2,"0")):tc,[e]),o=p.useMemo(()=>e?ma(nc,n.padStart(2,"0")):nc,[e]),i=p.useMemo(()=>e?ma(rc,r):rc,[e]);return{rotatedHours:s,rotatedMinutes:o,rotatedMeridiem:i}}function Jb(e,t,n){p.useEffect(()=>{function r(i){if(i){const u=i.scrollHeight/or,l=Math.floor(or/2);i.scrollTop=l*u;const c=()=>{const{scrollTop:d}=i,w=Math.round(d/u);(w<=1||w>=or-2)&&(i.scrollTop=l*u)};return i.addEventListener("scroll",c),()=>{i.removeEventListener("scroll",c)}}}if(!e)return;const s=r(t.current),o=r(n.current);return()=>{s==null||s(),o==null||o()}},[e,t,n])}const ac=({className:e,time:t,Label:n,labelPosition:r,dir:s,...o})=>{const[i,u]=p.useState(!1),[l,c]=p.useState(""),d=p.useRef(null),w=p.useRef(null),h=p.useRef(null),m=p.useRef(null),[b,g]=p.useState("12"),[x,C]=p.useState("00"),[y,N]=p.useState("am");p.useEffect(()=>{if(!t){c(""),g("12"),C("00"),N("am"),d.current&&(d.current.value="");return}const k=Gb(t);c(k);const[D,_]=k.split(":"),{hour:F,meridiem:$}=sc(D);g(F),C(_),N($),d.current&&(d.current.value=k)},[t]),p.useEffect(()=>{const k=D=>{w.current&&!w.current.contains(D.target)&&u(!1)};return document.addEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k)}},[]),Jb(i,h,m);const{rotatedHours:S,rotatedMinutes:E,rotatedMeridiem:I}=Zb(i,b,x,y),A=p.useCallback((k,D,_)=>{const F=k??b,$=D??x,O=_??y;g(F),C($),N(O);const G=`${Yb(F,O)}:${$}`;c(G)},[b,x,y]);return a.jsxs("div",{className:f("wu-flex wu-gap-1 wu-relative wu-w-fit wu-flex-col",(r==="right"||r==="left")&&"wu-items-center",r==="left"&&"wu-flex-row",r==="right"&&"wu-flex-row-reverse","wu-input-wrapper"),dir:s,children:[n&&a.jsx(Te,{htmlFor:"time-picker",className:"wu-timepicker-label",children:n}),a.jsxs("div",{className:f("relative inline-block"),ref:w,dir:s,children:[a.jsx(Ie,{ref:d,type:"time",value:l,variant:"flat",role:"textbox",onChange:k=>{c(k.target.value);const[D,_]=k.target.value.split(":"),{hour:F,meridiem:$}=sc(D);g(F),C(_),N($)},className:"wu-w-[136px] wu-h-8 wu-pr-6 wu-border wu-border-lead/40 wu-text-gray-lead wu-timepicker-input",style:{WebkitAppearance:"none",MozAppearance:"textfield"},Icon:a.jsx(R,{icon:"wm-schedule",className:f("wu-text-base",o.disabled&&"wu-text-lead/50 wu-pointer-events-none wu-opacity-50"),onClick:()=>u(k=>!k),"data-testid":"wu-timepicker-icon"}),iconPosition:"right",dir:s,...o}),a.jsx("style",{children:`
|
|
18
18
|
input[type="time"]::-webkit-calendar-picker-indicator { display: none; }
|
|
19
|
-
`}),i&&a.jsxs("div",{className:f("wu-absolute wu-w-[136px] wu-h-[228px] wu-flex wu-bg-white wu-border wu-shadow wu-z-50 wu-text-xs wu-gap-1 wu-p-1 wu-border-blue-p wu-text-lead",e),children:[a.jsx(ma,{values:S,selectedValue:b.padStart(2,"0"),scrollRef:h,onSelect:k=>A(k,x),className:"wu-time-hour-picker"}),a.jsx(ma,{values:E,selectedValue:x.padStart(2,"0"),scrollRef:m,onSelect:k=>A(b,k),className:"wu-time-minute-picker"}),a.jsx(ma,{values:I,selectedValue:y,onSelect:k=>A(void 0,void 0,k),className:"wu-time-meridiem-picker",repeatItems:!1})]})]})]})};sc.displayName="WuTimePicker";const Jb=1,Qb=1e6;let ga=0;function Rb(){return ga=(ga+1)%Number.MAX_SAFE_INTEGER,ga.toString()}const ba=new Map,ac=e=>{if(ba.has(e))return;const t=setTimeout(()=>{ba.delete(e),bn({type:"REMOVE_TOAST",toastId:e})},Qb);ba.set(e,t)},ey=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Jb)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?ac(n):e.toasts.forEach(r=>{ac(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},or=[];let ir={toasts:[]};function bn(e){ir=ey(ir,e),or.forEach(t=>{t(ir)})}function oc({...e}){const t=Rb(),n=s=>bn({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>bn({type:"DISMISS_TOAST",toastId:t});return bn({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function ty(){const[e,t]=p.useState(ir);return p.useEffect(()=>(or.push(t),()=>{const n=or.indexOf(t);n>-1&&or.splice(n,1)}),[e]),{...e,toast:oc,dismiss:n=>bn({type:"DISMISS_TOAST",toastId:n})}}const ny=()=>({showToast:({message:t,variant:n,duration:r,position:s})=>oc({description:t,variant:n,duration:r,position:s})}),ry=Se.Provider,sy=ke.cva("wu-fixed wu-z-[100] wu-flex wu-max-h-screen wu-w-full wu-flex-col-reverse wu-px-4 wu-py-2 sm:wu-flex-col md:wu-max-w-[720px] wu-w-fit wu-toast-container",{variants:{position:{topRight:"wu-right-0 wu-top-0",top:"wu-top-0 wu-left-1/2 wu--translate-x-1/2",topLeft:"wu-left-0 wu-top-0",bottom:"wu-bottom-0 wu-left-1/2 wu--translate-x-1/2",bottomRight:"wu-right-0 wu-bottom-0",bottomLeft:"wu-left-0 wu-bottom-0"}},defaultVariants:{position:"top"}}),ic=v.forwardRef(({className:e,position:t,...n},r)=>a.jsx(Se.Viewport,{ref:r,className:f(sy({position:t}),e),...n}));ic.displayName=Se.Viewport.displayName;const ay=ke.cva("group wu-pointer-events-auto wu-text-xs wu-font-normal wu-relative wu-flex wu-w-full wu-min-h-12 wu-items-center wu-justify-between wu-overflow-hidden wu-px-4 wu-pr-0 wu-py-2 wu-shadow-sm wu-transition-all data-[swipe=cancel]:wu-translate-y-0 data-[swipe=end]:wu-translate-y-[var(--radix-toast-swipe-end-y)] data-[swipe=move]:wu-translate-y-[var(--radix-toast-swipe-move-y)] data-[swipe=move]:wu-transition-none data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[swipe=end]:wu-animate-out data-[state=closed]:wu-fade-out-80",{variants:{variant:{default:"wu-border wu-bg-white wu-text-text",success:"wu-text-green-deep wu-bg-green-soft",error:"wu-text-red-deep wu-bg-red-soft",warning:"wu-text-yellow-deep wu-bg-yellow-soft",info:"wu-text-blue-deep wu-bg-blue-soft"},position:{topRight:"data-[state=closed]:wu-slide-out-to-top-full data-[state=open]:wu-slide-in-from-top-full",top:"data-[state=closed]:wu-slide-out-to-top-full data-[state=open]:wu-slide-in-from-top-full",topLeft:"data-[state=closed]:wu-slide-out-to-top-full data-[state=open]:wu-slide-in-from-top-full",bottom:"data-[state=closed]:wu-slide-out-to-bottom-full data-[state=open]:wu-slide-in-from-bottom-full",bottomRight:"data-[state=closed]:wu-slide-out-to-bottom-full data-[state=open]:wu-slide-in-from-bottom-full",bottomLeft:"data-[state=closed]:wu-slide-out-to-bottom-full data-[state=open]:wu-slide-in-from-bottom-full"}},defaultVariants:{variant:"success",position:"top"}}),uc=v.forwardRef(({className:e,variant:t,position:n,...r},s)=>a.jsx(Se.Root,{ref:s,className:f(ay({variant:t,position:n}),e),...r}));uc.displayName=Se.Root.displayName;const oy=v.forwardRef(({className:e,...t},n)=>a.jsx(Se.Action,{ref:n,className:f("wu-inline-flex wu-h-8 wu-shrink-0 wu-items-center wu-justify-center wu-border wu-bg-transparent wu-px-3 wu-text-sm wu-font-medium wu-ring-offset-background wu-transition-colors hover:wu-bg-secondary focus:wu-outline-none focus:wu-ring-2 focus:wu-ring-ring focus:wu-ring-offset-2 disabled:wu-cursor-not-allowed disabled:wu-opacity-50 group-[.destructive]:wu-border-muted/40 group-[.destructive]:hover:wu-border-destructive/30 group-[.destructive]:hover:wu-bg-destructive group-[.destructive]:hover:wu-text-destructive-foreground group-[.destructive]:focus:wu-ring-destructive",e),...t}));oy.displayName=Se.Action.displayName;const lc=v.forwardRef(({className:e,...t},n)=>a.jsx(Se.Close,{ref:n,className:f("wu-relative wu-right-4 wu-bottom-2 wu-rounded-sm wu-w-4 wu-h-4 wu-p-1 wu-text-foreground/50 wu-opacity-100 wu-transition-opacity hover:wu-text-foreground focus:wu-opacity-100 focus:wu-outline-none group-hover:wu-opacity-100 group-[.destructive]:wu-text-red-300 group-[.destructive]:hover:wu-text-red-50 group-[.destructive]:focus:wu-ring-red-400 group-[.destructive]:focus:wu-ring-offset-red-600",e),"toast-close":"","aria-label":"Close toast",...t,children:a.jsx("span",{className:"wm-close wu-text-base"})}));lc.displayName=Se.Close.displayName;const cc=v.forwardRef(({className:e,...t},n)=>a.jsx(Se.Title,{ref:n,className:f("wu-text-sm wu-font-semibold",e),...t}));cc.displayName=Se.Title.displayName;const dc=v.forwardRef(({className:e,...t},n)=>a.jsx(Se.Description,{ref:n,className:f("wu-text-sm wu-opacity-90",e),...t}));dc.displayName=Se.Description.displayName;function iy(){const{toasts:e}=ty(),t=e.reduce((n,r)=>{const s=r.position||"top";return n[s]||(n[s]=[]),n[s].push(r),n},{});return a.jsx(ry,{children:Object.entries(t).map(([n,r])=>a.jsx(ic,{position:n,children:r.map(function({id:s,title:o,description:i,action:u,variant:l,position:c,...d}){const w={success:"wm-check-circle",info:"wm-info",warning:"wm-error",error:"wm-cancel"};return a.jsxs(uc,{variant:l||"success",position:c,...d,children:[a.jsxs("div",{className:"wu-grid wu-gap-1",children:[o&&a.jsx(cc,{children:o}),i&&a.jsxs(dc,{className:"wu-flex wu-items-center wu-gap-3 wu-pr-6",children:[a.jsx(R,{icon:w[l||"success"],className:"wu-text-xl"}),i]})]}),u,a.jsx(lc,{})]},s)})},n))})}const uy=()=>a.jsx(iy,{}),ur=p.createContext(null),ly=()=>{const e=p.useContext(ur);if(!e)throw new Error("useTranslation must be used within a WuTranslationProvider");return e.useTranslation()},cy=()=>{const e=p.useContext(ur);if(!e)throw new Error("useLoadTranslationsFunction must be used within a WuTranslationProvider");return e},dy=({children:e})=>{const[t,n]=p.useState({}),[r,s]=p.useState({}),o=p.useCallback(async(c,d)=>{try{const h=await(await fetch(c)).json();n(h)}catch(w){console.error("Failed to load translations:",w),d&&n(d)}d&&s(d)},[]),i=p.useCallback(c=>{s(c)},[]),u=p.useCallback(()=>({t:(d,w)=>t[d]?t[d]:r[d]?r[d]:w||d}),[t,r]),l={loadTranslations:o,setFallbackTranslations:i,useTranslation:u};return a.jsx(ur.Provider,{value:l,children:e})},wy={qualitative:{"--wu-qualitative-1":"#4C5B94","--wu-qualitative-2":"#5B7AAE","--wu-qualitative-3":"#409EB5","--wu-qualitative-4":"#40B59E","--wu-qualitative-5":"#60C790","--wu-qualitative-6":"#9AD69A","--wu-qualitative-7":"#B3BD56","--wu-qualitative-8":"#DD8F40","--wu-qualitative-9":"#CE6550","--wu-qualitative-10":"#AE4C3D","--wu-qualitative-11":"#8F3328","--wu-qualitative-12":"#985D75","--wu-qualitative-13":"#B181A8","--wu-qualitative-14":"#C5A0C2","--wu-qualitative-15":"#DAC2E0","--wu-qualitative-16":"#E3D9E8"},blueSequential:{"--wu-blue-sequential-1":"#EBF8FF","--wu-blue-sequential-2":"#D7EFFF","--wu-blue-sequential-3":"#C2DEFF","--wu-blue-sequential-4":"#AAD0FF","--wu-blue-sequential-5":"#94C1F3","--wu-blue-sequential-6":"#7DB2E7","--wu-blue-sequential-7":"#67A3DB","--wu-blue-sequential-8":"#5194CF","--wu-blue-sequential-9":"#3B85C3","--wu-blue-sequential-10":"#2576B7","--wu-blue-sequential-11":"#256CAC","--wu-blue-sequential-12":"#1A60A6","--wu-blue-sequential-13":"#184994","--wu-blue-sequential-14":"#1C337F","--wu-blue-sequential-15":"#0D2163","--wu-blue-sequential-16":"#00083D"},greenSequential:{"--wu-green-sequential-1":"#E0F9ED","--wu-green-sequential-2":"#C4F3DC","--wu-green-sequential-3":"#A8ECCC","--wu-green-sequential-4":"#8DE5BD","--wu-green-sequential-5":"#78DDB1","--wu-green-sequential-6":"#62D3A3","--wu-green-sequential-7":"#4CC996","--wu-green-sequential-8":"#3ABF8A","--wu-green-sequential-9":"#35AF7F","--wu-green-sequential-10":"#329D75","--wu-green-sequential-11":"#308A6A","--wu-green-sequential-12":"#2D7A60","--wu-green-sequential-13":"#286A55","--wu-green-sequential-14":"#255C4B","--wu-green-sequential-15":"#1F4B3E","--wu-green-sequential-16":"#1B3D34"},redSequential:{"--wu-red-sequential-1":"#FEE9EC","--wu-red-sequential-2":"#FFD2D8","--wu-red-sequential-3":"#FFBBC4","--wu-red-sequential-4":"#FFA6B3","--wu-red-sequential-5":"#FB97A5","--wu-red-sequential-6":"#F78998","--wu-red-sequential-7":"#F37C8C","--wu-red-sequential-8":"#EE6F80","--wu-red-sequential-9":"#E76172","--wu-red-sequential-10":"#E15466","--wu-red-sequential-11":"#DA465B","--wu-red-sequential-12":"#D33B50","--wu-red-sequential-13":"#BC3548","--wu-red-sequential-14":"#A73343","--wu-red-sequential-15":"#91313E","--wu-red-sequential-16":"#7D2D38"},orangeSequential:{"--wu-orange-sequential-1":"#FDEDE5","--wu-orange-sequential-2":"#FCDFCF","--wu-orange-sequential-3":"#FBCFBA","--wu-orange-sequential-4":"#FAC5AB","--wu-orange-sequential-5":"#F7B694","--wu-orange-sequential-6":"#F6AB85","--wu-orange-sequential-7":"#F79D70","--wu-orange-sequential-8":"#F6915F","--wu-orange-sequential-9":"#EF8450","--wu-orange-sequential-10":"#E37944","--wu-orange-sequential-11":"#DB713C","--wu-orange-sequential-12":"#D06530","--wu-orange-sequential-13":"#C95E29","--wu-orange-sequential-14":"#BD521C","--wu-orange-sequential-15":"#B24610","--wu-orange-sequential-16":"#AA3F08"},divergent:{"--wu-red-divergent-1":"#661200","--wu-red-divergent-2":"#A11C00","--wu-red-divergent-3":"#D2300E","--wu-red-divergent-4":"#DF4828","--wu-red-divergent-5":"#EB6A4A","--wu-red-divergent-6":"#F4896C","--wu-red-divergent-7":"#FFC4B3","--wu-red-divergent-8":"#FFE2D9","--wu-divergent-neutral":"#F5F5F5","--wu-blue-divergent-1":"#DBD9E9","--wu-blue-divergent-2":"#B7B5D4","--wu-blue-divergent-3":"#9392BF","--wu-blue-divergent-4":"#7070AA","--wu-blue-divergent-5":"#4A5195","--wu-blue-divergent-6":"#1B3380","--wu-blue-divergent-7":"#182D72","--wu-blue-divergent-8":"#122254"},nps:{"--wu-nps-detractor":"#F85271","--wu-nps-passive":"#F1DA7E","--wu-nps-promoter":"#42BD84"},sentiment:{"--wu-sentiment-negative":"#F85271","--wu-sentiment-slightly-negative":"#F69A79","--wu-sentiment-neutral":"#F1DA7E","--wu-sentiment-slightly-positive":"#94D08B","--wu-sentiment-positive":"#42BD84","--wu-sentiment-no-sentiment":"#E0E0E0"}};window.wickUiVersion="1.25.0",Object.defineProperty(T,"useContext",{enumerable:!0,get:()=>p.useContext}),T.CHART_COLOR_SYSTEM=wy,T.WuAccordion=Wc,T.WuActivityLog=zc,T.WuAppHeader=wd,T.WuAppHeaderAccount=Aa,T.WuAppHeaderBar=Pa,T.WuAppHeaderHelp=ka,T.WuAppHeaderMenu=Da,T.WuAppHeaderSearch=cd,T.WuButton=xe,T.WuCalender=Ir,T.WuCard=qa,T.WuCardFooter=$a,T.WuCardHeader=za,T.WuCheckbox=De,T.WuChip=yd,T.WuCombobox=kd,T.WuContentEditor=uw,T.WuCopyToClipboard=lw,T.WuDataTable=Hb,T.WuDatePicker=pd,T.WuDateRangePicker=gd,T.WuDisplay=Qc,T.WuDrawer=mw,T.WuDrawerClose=gw,T.WuDrilldown=wm,T.WuFooter=wu,T.WuFormGroup=ld,T.WuHeading=Zc,T.WuHelpButton=fu,T.WuIcon=R,T.WuInput=Ie,T.WuInputError=od,T.WuInputHint=id,T.WuLabel=Te,T.WuListbox=Sm,T.WuLoader=bt,T.WuMenu=zs,T.WuMenuCheckboxItem=rm,T.WuMenuIcon=$s,T.WuMenuItem=Kn,T.WuMenuItemGroup=sm,T.WuMenuRadioItem=am,T.WuMenuSeparatorItem=om,T.WuModal=In,T.WuModalClose=xt,T.WuModalContent=Mn,T.WuModalFooter=Zd,T.WuModalHeader=Xd,T.WuMonthPicker=Im,T.WuPagination=vu,T.WuPopover=_m,T.WuPopoverClose=Fm,T.WuPrimaryNavbar=Dm,T.WuRadioGroup=Tu,T.WuScrollArea=Vm,T.WuSecondaryNavbar=Pm,T.WuSelect=bu,T.WuSidebar=Rm,T.WuSidebarContent=eg,T.WuSidebarFooter=tg,T.WuSidebarGroup=ng,T.WuSidebarItem=sg,T.WuSidebarMenu=rg,T.WuSidebarTrigger=zu,T.WuSpotlight=ao,T.WuStackedCard=ig,T.WuStackedCardOverlay=ug,T.WuStepper=_b,T.WuSubMenu=im,T.WuSubtext=Jc,T.WuSwitcher=zl,T.WuTab=qb,T.WuTable=Ub,T.WuText=Xc,T.WuTextarea=Rl,T.WuTimePicker=sc,T.WuToast=uy,T.WuToggle=zr,T.WuTooltip=Tn,T.WuTranslationContext=ur,T.WuTranslationProvider=dy,T.WuTruncatedLabel=dd,T.WuVirtualScroll=yt,T.calculatePosition=og,T.useTranslation=ly,T.useTranslationsContext=cy,T.useWuShowToast=ny,T.useWuSidebar=lt,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})}));
|
|
19
|
+
`}),i&&a.jsxs("div",{className:f("wu-absolute wu-w-[136px] wu-h-[228px] wu-flex wu-bg-white wu-border wu-shadow wu-z-50 wu-text-xs wu-gap-1 wu-p-1 wu-border-blue-p wu-text-lead",e),children:[a.jsx(ga,{values:S,selectedValue:b.padStart(2,"0"),scrollRef:h,onSelect:k=>A(k,x),className:"wu-time-hour-picker"}),a.jsx(ga,{values:E,selectedValue:x.padStart(2,"0"),scrollRef:m,onSelect:k=>A(b,k),className:"wu-time-minute-picker"}),a.jsx(ga,{values:I,selectedValue:y,onSelect:k=>A(void 0,void 0,k),className:"wu-time-meridiem-picker",repeatItems:!1})]})]})]})};ac.displayName="WuTimePicker";const Qb=1,Rb=1e6;let ba=0;function ey(){return ba=(ba+1)%Number.MAX_SAFE_INTEGER,ba.toString()}const ya=new Map,oc=e=>{if(ya.has(e))return;const t=setTimeout(()=>{ya.delete(e),bn({type:"REMOVE_TOAST",toastId:e})},Rb);ya.set(e,t)},ty=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Qb)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?oc(n):e.toasts.forEach(r=>{oc(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},ir=[];let ur={toasts:[]};function bn(e){ur=ty(ur,e),ir.forEach(t=>{t(ur)})}function ic({...e}){const t=ey(),n=s=>bn({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>bn({type:"DISMISS_TOAST",toastId:t});return bn({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function ny(){const[e,t]=p.useState(ur);return p.useEffect(()=>(ir.push(t),()=>{const n=ir.indexOf(t);n>-1&&ir.splice(n,1)}),[e]),{...e,toast:ic,dismiss:n=>bn({type:"DISMISS_TOAST",toastId:n})}}const ry=()=>({showToast:({message:t,variant:n,duration:r,position:s})=>ic({description:t,variant:n,duration:r,position:s})}),sy=Se.Provider,ay=ke.cva("wu-fixed wu-z-[100] wu-flex wu-max-h-screen wu-w-full wu-flex-col-reverse wu-px-4 wu-py-2 sm:wu-flex-col md:wu-max-w-[720px] wu-w-fit wu-toast-container",{variants:{position:{topRight:"wu-right-0 wu-top-0",top:"wu-top-0 wu-left-1/2 wu--translate-x-1/2",topLeft:"wu-left-0 wu-top-0",bottom:"wu-bottom-0 wu-left-1/2 wu--translate-x-1/2",bottomRight:"wu-right-0 wu-bottom-0",bottomLeft:"wu-left-0 wu-bottom-0"}},defaultVariants:{position:"top"}}),uc=v.forwardRef(({className:e,position:t,...n},r)=>a.jsx(Se.Viewport,{ref:r,className:f(ay({position:t}),e),...n}));uc.displayName=Se.Viewport.displayName;const oy=ke.cva("group wu-pointer-events-auto wu-text-xs wu-font-normal wu-relative wu-flex wu-w-full wu-min-h-12 wu-items-center wu-justify-between wu-overflow-hidden wu-px-4 wu-pr-0 wu-py-2 wu-shadow-sm wu-transition-all data-[swipe=cancel]:wu-translate-y-0 data-[swipe=end]:wu-translate-y-[var(--radix-toast-swipe-end-y)] data-[swipe=move]:wu-translate-y-[var(--radix-toast-swipe-move-y)] data-[swipe=move]:wu-transition-none data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[swipe=end]:wu-animate-out data-[state=closed]:wu-fade-out-80",{variants:{variant:{default:"wu-border wu-bg-white wu-text-text",success:"wu-text-green-deep wu-bg-green-soft",error:"wu-text-red-deep wu-bg-red-soft",warning:"wu-text-yellow-deep wu-bg-yellow-soft",info:"wu-text-blue-deep wu-bg-blue-soft"},position:{topRight:"data-[state=closed]:wu-slide-out-to-top-full data-[state=open]:wu-slide-in-from-top-full",top:"data-[state=closed]:wu-slide-out-to-top-full data-[state=open]:wu-slide-in-from-top-full",topLeft:"data-[state=closed]:wu-slide-out-to-top-full data-[state=open]:wu-slide-in-from-top-full",bottom:"data-[state=closed]:wu-slide-out-to-bottom-full data-[state=open]:wu-slide-in-from-bottom-full",bottomRight:"data-[state=closed]:wu-slide-out-to-bottom-full data-[state=open]:wu-slide-in-from-bottom-full",bottomLeft:"data-[state=closed]:wu-slide-out-to-bottom-full data-[state=open]:wu-slide-in-from-bottom-full"}},defaultVariants:{variant:"success",position:"top"}}),lc=v.forwardRef(({className:e,variant:t,position:n,...r},s)=>a.jsx(Se.Root,{ref:s,className:f(oy({variant:t,position:n}),e),...r}));lc.displayName=Se.Root.displayName;const iy=v.forwardRef(({className:e,...t},n)=>a.jsx(Se.Action,{ref:n,className:f("wu-inline-flex wu-h-8 wu-shrink-0 wu-items-center wu-justify-center wu-border wu-bg-transparent wu-px-3 wu-text-sm wu-font-medium wu-ring-offset-background wu-transition-colors hover:wu-bg-secondary focus:wu-outline-none focus:wu-ring-2 focus:wu-ring-ring focus:wu-ring-offset-2 disabled:wu-cursor-not-allowed disabled:wu-opacity-50 group-[.destructive]:wu-border-muted/40 group-[.destructive]:hover:wu-border-destructive/30 group-[.destructive]:hover:wu-bg-destructive group-[.destructive]:hover:wu-text-destructive-foreground group-[.destructive]:focus:wu-ring-destructive",e),...t}));iy.displayName=Se.Action.displayName;const cc=v.forwardRef(({className:e,...t},n)=>a.jsx(Se.Close,{ref:n,className:f("wu-relative wu-right-4 wu-bottom-2 wu-rounded-sm wu-w-4 wu-h-4 wu-p-1 wu-text-foreground/50 wu-opacity-100 wu-transition-opacity hover:wu-text-foreground focus:wu-opacity-100 focus:wu-outline-none group-hover:wu-opacity-100 group-[.destructive]:wu-text-red-300 group-[.destructive]:hover:wu-text-red-50 group-[.destructive]:focus:wu-ring-red-400 group-[.destructive]:focus:wu-ring-offset-red-600",e),"toast-close":"","aria-label":"Close toast",...t,children:a.jsx("span",{className:"wm-close wu-text-base"})}));cc.displayName=Se.Close.displayName;const dc=v.forwardRef(({className:e,...t},n)=>a.jsx(Se.Title,{ref:n,className:f("wu-text-sm wu-font-semibold",e),...t}));dc.displayName=Se.Title.displayName;const wc=v.forwardRef(({className:e,...t},n)=>a.jsx(Se.Description,{ref:n,className:f("wu-text-sm wu-opacity-90",e),...t}));wc.displayName=Se.Description.displayName;function uy(){const{toasts:e}=ny(),t=e.reduce((n,r)=>{const s=r.position||"top";return n[s]||(n[s]=[]),n[s].push(r),n},{});return a.jsx(sy,{children:Object.entries(t).map(([n,r])=>a.jsx(uc,{position:n,children:r.map(function({id:s,title:o,description:i,action:u,variant:l,position:c,...d}){const w={success:"wm-check-circle",info:"wm-info",warning:"wm-error",error:"wm-cancel"};return a.jsxs(lc,{variant:l||"success",position:c,...d,children:[a.jsxs("div",{className:"wu-grid wu-gap-1",children:[o&&a.jsx(dc,{children:o}),i&&a.jsxs(wc,{className:"wu-flex wu-items-center wu-gap-3 wu-pr-6",children:[a.jsx(R,{icon:w[l||"success"],className:"wu-text-xl"}),i]})]}),u,a.jsx(cc,{})]},s)})},n))})}const ly=()=>a.jsx(uy,{}),lr=p.createContext(null),cy=()=>{const e=p.useContext(lr);if(!e)throw new Error("useTranslation must be used within a WuTranslationProvider");return e.useTranslation()},dy=()=>{const e=p.useContext(lr);if(!e)throw new Error("useLoadTranslationsFunction must be used within a WuTranslationProvider");return e},wy=({children:e})=>{const[t,n]=p.useState({}),[r,s]=p.useState({}),o=p.useCallback(async(c,d)=>{try{const h=await(await fetch(c)).json();n(h)}catch(w){console.error("Failed to load translations:",w),d&&n(d)}d&&s(d)},[]),i=p.useCallback(c=>{s(c)},[]),u=p.useCallback(()=>({t:(d,w)=>t[d]?t[d]:r[d]?r[d]:w||d}),[t,r]),l={loadTranslations:o,setFallbackTranslations:i,useTranslation:u};return a.jsx(lr.Provider,{value:l,children:e})},fy={qualitative:{"--wu-qualitative-1":"#4C5B94","--wu-qualitative-2":"#5B7AAE","--wu-qualitative-3":"#409EB5","--wu-qualitative-4":"#40B59E","--wu-qualitative-5":"#60C790","--wu-qualitative-6":"#9AD69A","--wu-qualitative-7":"#B3BD56","--wu-qualitative-8":"#DD8F40","--wu-qualitative-9":"#CE6550","--wu-qualitative-10":"#AE4C3D","--wu-qualitative-11":"#8F3328","--wu-qualitative-12":"#985D75","--wu-qualitative-13":"#B181A8","--wu-qualitative-14":"#C5A0C2","--wu-qualitative-15":"#DAC2E0","--wu-qualitative-16":"#E3D9E8"},blueSequential:{"--wu-blue-sequential-1":"#EBF8FF","--wu-blue-sequential-2":"#D7EFFF","--wu-blue-sequential-3":"#C2DEFF","--wu-blue-sequential-4":"#AAD0FF","--wu-blue-sequential-5":"#94C1F3","--wu-blue-sequential-6":"#7DB2E7","--wu-blue-sequential-7":"#67A3DB","--wu-blue-sequential-8":"#5194CF","--wu-blue-sequential-9":"#3B85C3","--wu-blue-sequential-10":"#2576B7","--wu-blue-sequential-11":"#256CAC","--wu-blue-sequential-12":"#1A60A6","--wu-blue-sequential-13":"#184994","--wu-blue-sequential-14":"#1C337F","--wu-blue-sequential-15":"#0D2163","--wu-blue-sequential-16":"#00083D"},greenSequential:{"--wu-green-sequential-1":"#E0F9ED","--wu-green-sequential-2":"#C4F3DC","--wu-green-sequential-3":"#A8ECCC","--wu-green-sequential-4":"#8DE5BD","--wu-green-sequential-5":"#78DDB1","--wu-green-sequential-6":"#62D3A3","--wu-green-sequential-7":"#4CC996","--wu-green-sequential-8":"#3ABF8A","--wu-green-sequential-9":"#35AF7F","--wu-green-sequential-10":"#329D75","--wu-green-sequential-11":"#308A6A","--wu-green-sequential-12":"#2D7A60","--wu-green-sequential-13":"#286A55","--wu-green-sequential-14":"#255C4B","--wu-green-sequential-15":"#1F4B3E","--wu-green-sequential-16":"#1B3D34"},redSequential:{"--wu-red-sequential-1":"#FEE9EC","--wu-red-sequential-2":"#FFD2D8","--wu-red-sequential-3":"#FFBBC4","--wu-red-sequential-4":"#FFA6B3","--wu-red-sequential-5":"#FB97A5","--wu-red-sequential-6":"#F78998","--wu-red-sequential-7":"#F37C8C","--wu-red-sequential-8":"#EE6F80","--wu-red-sequential-9":"#E76172","--wu-red-sequential-10":"#E15466","--wu-red-sequential-11":"#DA465B","--wu-red-sequential-12":"#D33B50","--wu-red-sequential-13":"#BC3548","--wu-red-sequential-14":"#A73343","--wu-red-sequential-15":"#91313E","--wu-red-sequential-16":"#7D2D38"},orangeSequential:{"--wu-orange-sequential-1":"#FDEDE5","--wu-orange-sequential-2":"#FCDFCF","--wu-orange-sequential-3":"#FBCFBA","--wu-orange-sequential-4":"#FAC5AB","--wu-orange-sequential-5":"#F7B694","--wu-orange-sequential-6":"#F6AB85","--wu-orange-sequential-7":"#F79D70","--wu-orange-sequential-8":"#F6915F","--wu-orange-sequential-9":"#EF8450","--wu-orange-sequential-10":"#E37944","--wu-orange-sequential-11":"#DB713C","--wu-orange-sequential-12":"#D06530","--wu-orange-sequential-13":"#C95E29","--wu-orange-sequential-14":"#BD521C","--wu-orange-sequential-15":"#B24610","--wu-orange-sequential-16":"#AA3F08"},divergent:{"--wu-red-divergent-1":"#661200","--wu-red-divergent-2":"#A11C00","--wu-red-divergent-3":"#D2300E","--wu-red-divergent-4":"#DF4828","--wu-red-divergent-5":"#EB6A4A","--wu-red-divergent-6":"#F4896C","--wu-red-divergent-7":"#FFC4B3","--wu-red-divergent-8":"#FFE2D9","--wu-divergent-neutral":"#F5F5F5","--wu-blue-divergent-1":"#DBD9E9","--wu-blue-divergent-2":"#B7B5D4","--wu-blue-divergent-3":"#9392BF","--wu-blue-divergent-4":"#7070AA","--wu-blue-divergent-5":"#4A5195","--wu-blue-divergent-6":"#1B3380","--wu-blue-divergent-7":"#182D72","--wu-blue-divergent-8":"#122254"},nps:{"--wu-nps-detractor":"#F85271","--wu-nps-passive":"#F1DA7E","--wu-nps-promoter":"#42BD84"},sentiment:{"--wu-sentiment-negative":"#F85271","--wu-sentiment-slightly-negative":"#F69A79","--wu-sentiment-neutral":"#F1DA7E","--wu-sentiment-slightly-positive":"#94D08B","--wu-sentiment-positive":"#42BD84","--wu-sentiment-no-sentiment":"#E0E0E0"}};window.wickUiVersion="1.26.0",Object.defineProperty(T,"useContext",{enumerable:!0,get:()=>p.useContext}),T.CHART_COLOR_SYSTEM=fy,T.WuAccordion=Bc,T.WuActivityLog=$c,T.WuAppHeader=fd,T.WuAppHeaderAccount=ka,T.WuAppHeaderBar=_a,T.WuAppHeaderHelp=Ia,T.WuAppHeaderMenu=Pa,T.WuAppHeaderSearch=dd,T.WuButton=xe,T.WuCalender=Mr,T.WuCard=za,T.WuCardFooter=Ha,T.WuCardHeader=$a,T.WuCheckbox=De,T.WuChip=xd,T.WuCombobox=Id,T.WuContentEditor=lw,T.WuCopyToClipboard=cw,T.WuDataTable=Ub,T.WuDatePicker=hd,T.WuDateRangePicker=bd,T.WuDisplay=Rc,T.WuDrawer=gw,T.WuDrawerClose=bw,T.WuDrilldown=fm,T.WuFooter=fu,T.WuFormGroup=cd,T.WuHeading=Jc,T.WuHelpButton=pu,T.WuIcon=R,T.WuInput=Ie,T.WuInputError=id,T.WuInputHint=ud,T.WuLabel=Te,T.WuListbox=Tm,T.WuLoader=bt,T.WuMenu=$s,T.WuMenuCheckboxItem=sm,T.WuMenuIcon=Hs,T.WuMenuItem=Yn,T.WuMenuItemGroup=am,T.WuMenuRadioItem=om,T.WuMenuSeparatorItem=im,T.WuModal=Mn,T.WuModalClose=xt,T.WuModalContent=Dn,T.WuModalFooter=Jd,T.WuModalHeader=Zd,T.WuMonthPicker=Mm,T.WuPagination=Nu,T.WuPopover=Fm,T.WuPopoverClose=Vm,T.WuPrimaryNavbar=Pm,T.WuRadioGroup=Eu,T.WuScrollArea=Lm,T.WuSecondaryNavbar=_m,T.WuSelect=yu,T.WuSidebar=eg,T.WuSidebarContent=tg,T.WuSidebarFooter=ng,T.WuSidebarGroup=rg,T.WuSidebarItem=ag,T.WuSidebarMenu=sg,T.WuSidebarTrigger=$u,T.WuSpotlight=oo,T.WuStackedCard=ug,T.WuStackedCardOverlay=lg,T.WuStepper=Fb,T.WuSubMenu=um,T.WuSubtext=Qc,T.WuSwitcher=$l,T.WuTab=zb,T.WuTable=jb,T.WuText=Zc,T.WuTextarea=ec,T.WuTimePicker=ac,T.WuToast=ly,T.WuToggle=$r,T.WuTooltip=Tn,T.WuTranslationContext=lr,T.WuTranslationProvider=wy,T.WuTruncatedLabel=wd,T.WuVirtualScroll=yt,T.calculatePosition=ig,T.useTranslation=cy,T.useTranslationsContext=dy,T.useWuShowToast=ry,T.useWuSidebar=lt,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})}));
|
|
20
20
|
//# sourceMappingURL=index.js.map
|