@npm-questionpro/wick-ui-lib 1.17.4-next.0 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/base/ui/sheet.d.ts +4 -1
- package/dist/src/components/combobox/WuCombobox.d.ts +3 -1
- package/dist/src/components/drawer/WuDrawer.d.ts +2 -0
- package/dist/src/components/editor/WuEditor.d.ts +9 -0
- package/dist/src/components/editor/WuEditor.test.d.ts +1 -0
- package/dist/src/components/editor/index.d.ts +2 -0
- package/dist/src/components/editor/partials/ImageModal.d.ts +1 -0
- package/dist/src/components/editor/partials/LinkModal.d.ts +9 -0
- package/dist/src/components/editor/partials/Menubar.d.ts +1 -0
- package/dist/src/components/editor/partials/TablePopover.d.ts +1 -0
- package/dist/src/components/editor/partials/config.d.ts +2 -0
- package/dist/src/components/editor/partials/fontFamily.d.ts +1 -0
- package/dist/src/components/editor/partials/helper.d.ts +3 -0
- package/dist/src/components/editor/partials/toolbarItems.d.ts +20 -0
- package/dist/src/components/editor/partials/wuEditorContext.d.ts +13 -0
- package/dist/src/components/listbox/index.d.ts +1 -0
- package/dist/src/components/table/utils/data.d.ts +2 -7
- package/dist/src/components/typography/WuTypography.d.ts +2 -3
- package/dist/src/index.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/wick-ui-lib/es/index.js +2900 -2206
- package/dist/wick-ui-lib/umd/index.js +6 -6
- package/package.json +72 -56
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
(function(N,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("react/jsx-runtime"),require("@radix-ui/react-accordion"),require("react"),require("clsx"),require("tailwind-merge"),require("@radix-ui/react-avatar"),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("@radix-ui/react-dialog"),require("@radix-ui/react-scroll-area"),require("@radix-ui/react-radio-group"),require("@radix-ui/react-separator"),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"),require("@radix-ui/react-switch"),require("react-transition-group")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@radix-ui/react-accordion","react","clsx","tailwind-merge","@radix-ui/react-avatar","@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","@radix-ui/react-dialog","@radix-ui/react-scroll-area","@radix-ui/react-radio-group","@radix-ui/react-separator","react-dom","@radix-ui/react-toggle-group","@radix-ui/react-toggle","@radix-ui/react-tabs","@tanstack/react-table","@radix-ui/react-toast","@radix-ui/react-switch","react-transition-group"],a):(N=typeof globalThis<"u"?globalThis:N||self,a(N["wick-ui-lib"]={},N["react/jsx-runtime"],N.RadixUIAccordion,N.React,N.clsx,N.tailwindMerge,N.RadixUIAvatar,N.RadixUISlot,N.ClassVarianceAuthority,N.RadixUILabel,N.RadixUITooltip,N.dateFns,N.RadixUIPopover,N.ReactDayPicker,N.RadixUICheckbox,N.cmdk,N.ReactVirtuoso,N.RadixUIDropdownMenu,N.RadixUIDialog,N.RadixUIScrollArea,N.RadixUIRadioGroup,N.RadixUISeparator,N.ReactDOM,N.RadixUIToggleGroup,N.RadixUIToggle,N.RadixUITabs,N.TanstackReactTable,N.RadixUIToast,N.RadixUISwitch,N.ReactTransitionGroup))})(this,function(N,a,Je,f,Xu,Zu,Qu,Xe,Ce,Ru,aa,H,lt,rr,eo,we,to,ao,sr,ro,so,uo,oo,no,lo,io,De,co,wo,kt){"use strict";var kc=Object.defineProperty;var Dc=(N,a,Je)=>a in N?kc(N,a,{enumerable:!0,configurable:!0,writable:!0,value:Je}):N[a]=Je;var It=(N,a,Je)=>Dc(N,typeof a!="symbol"?a+"":a,Je);function ue(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const qe=ue(Je),g=ue(f),Ze=ue(Qu),ur=ue(Ru),it=ue(aa),ct=ue(lt),ra=ue(eo),X=ue(ao),Y=ue(sr),Ve=ue(ro),wt=ue(so),or=ue(uo),fo=ue(oo),Dt=ue(no),nr=ue(lo),ze=ue(io),pe=ue(co),sa=ue(wo),po=Zu.extendTailwindMerge({prefix:"wu-"});function c(...e){return po(Xu.clsx(e))}const ua=e=>{window.open(e,"_blank","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600")};function Mt(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}function dt(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 bo=e=>e?/\S+@questionpro\.com/.test(e):!1,lr=qe.Root,oa=g.forwardRef(({className:e,...t},r)=>a.jsx(qe.Item,{ref:r,className:c("wu-border-b",e),...t}));oa.displayName="AccordionItem";const na=g.forwardRef(({className:e,children:t,...r},s)=>a.jsx(qe.Header,{className:"wu-flex",children:a.jsxs(qe.Trigger,{ref:s,className:c("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),...r,children:[t,a.jsx("span",{className:"wu-arrow-icon wm-keyboard-arrow-down wu-transition-transform wu-duration-200"})]})}));na.displayName=qe.Trigger.displayName;const la=g.forwardRef(({className:e,children:t,...r},s)=>a.jsx(qe.Content,{ref:s,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",...r,children:a.jsx("div",{className:c("wu-pb-4 wu-pt-0",e),children:t})}));la.displayName=qe.Content.displayName;const go=e=>{const{items:t,className:r,dir:s="ltr"}=e;if(e.type==="multiple"){const{defaultValue:u=[],value:o,onValueChange:n}=e;return a.jsx(lr,{type:"multiple",className:"wu-w-full wu-accordion-container",defaultValue:u,value:o,onValueChange:n,dir:s,children:t.map(({value:i,Summary:l,Details:w,className:d})=>a.jsxs(oa,{value:i,dir:s,className:c(r,d),children:[a.jsx(na,{dir:s,className:"wu-accordion-summary",children:l}),a.jsx(la,{dir:s,className:"wu-accordion-details",children:w})]},i))})}else{const{defaultValue:u,value:o,onValueChange:n}=e;return a.jsx(lr,{type:"single",className:"wu-w-full wu-accordion-container",defaultValue:u,value:o,onValueChange:n,dir:s,collapsible:!0,children:t.map(({value:i,Summary:l,Details:w,className:d})=>a.jsxs(oa,{value:i,dir:s,className:c(r,d),children:[a.jsx(na,{dir:s,className:"wu-accordion-summary",children:l}),a.jsx(la,{dir:s,className:"wu-accordion-details",children:w})]},i))})}},ir=g.forwardRef(({className:e,...t},r)=>a.jsx(Ze.Root,{ref:r,className:c("wu-relative wu-flex wu-h-10 wu-w-10 wu-shrink-0 wu-overflow-hidden wu-rounded-full",e),...t}));ir.displayName=Ze.Root.displayName;const cr=g.forwardRef(({className:e,...t},r)=>a.jsx(Ze.Image,{ref:r,className:c("wu-aspect-square wu-h-full wu-w-full",e),...t}));cr.displayName=Ze.Image.displayName;const wr=g.forwardRef(({className:e,...t},r)=>a.jsx(Ze.Fallback,{ref:r,className:c("wu-flex wu-h-full wu-w-full wu-items-center wu-justify-center wu-rounded-full wu-bg-muted",e),...t}));wr.displayName=Ze.Fallback.displayName;function ia(e,t){f.useEffect(()=>{const r=s=>{Array.isArray(e)&&e.some(u=>!u.current||u.current.contains(s.target))||!Array.isArray(e)&&(!e.current||e.current.contains(s.target))||t(s)};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r)}},[e,t])}const ca={dropdownContainer:"_dropdownContainer_vvlo9_1",open:"_open_vvlo9_1",dropdownMenu:"_dropdownMenu_vvlo9_1"},dr=({dir:e,Trigger:t,triggerClassName:r,DropdownContent:s})=>{const[u,o]=f.useState(!1),n=f.useRef(null),i=f.useRef(null);ia([n,i],()=>o(!1));const l=()=>{o(!u)};return a.jsx(a.Fragment,{children:a.jsx("div",{className:ca.dropdownContainer,children:a.jsx("ul",{children:a.jsxs("li",{className:c("wu-flex wu-relative",u&&ca.open),children:[a.jsx("button",{className:c("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",r),onClick:w=>{w.preventDefault(),l()},ref:i,"aria-label":"dropdown-trigger",children:t}),a.jsx("div",{className:c(ca.dropdownMenu,{open:u},e==="rtl"?"wu-left-[-10px] wu-top-[38px]":"wu-right-[-7px] wu-top-[38px]"),dir:e,ref:n,"aria-label":"user-menu",children:s})]})})})})},wa=Ce.cva(["wu-inline-flex wu-items-center wu-justify-center wu-rounded-sm","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"],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:[]}),Qe=g.forwardRef(({className:e,variant:t,size:r,color:s,asChild:u=!1,...o},n)=>{const i=u?Xe.Slot:"button";return a.jsx(i,{className:c(wa({size:r,color:s,variant:t,className:e})),ref:n,...o})});Qe.displayName="Button";const Re=f.forwardRef((e,t)=>ho(e,t)),ho=(e,t)=>{const{size:r="md",color:s="#1B87E6",variant:u="dots",...o}=e,n=c("wu-w-[4em] wu-h-[1em] wu-inline-block wu-text-xs wu-relative wu-loader-dot-container");let i="7px";r==="sm"?i="7px":r==="md"?i="12px":r==="lg"?i="18px":typeof r=="string"&&(i=r);const l={backgroundColor:s,width:i,height:i},w=a.jsxs("div",{...o,ref:t,className:c("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:i,height:i,borderTopColor:s}}),e.message&&a.jsx("p",{className:"wu-inline-block wu-loader-message",children:e.message})]}),d=a.jsxs("div",{...o,ref:t,className:c("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:n,style:{fontSize:i},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:u==="spinner"?w:d})};Re.displayName="WuLoader";const me=f.forwardRef(({disabled:e,loading:t,variant:r="primary",size:s="md",Icon:u,iconPosition:o="left",children:n,floating:i,className:l,color:w="primary",selected:d,...p},b)=>{const x={primary:"#1986e688",upgrade:"#f5830088",error:"#ef444488"};return a.jsxs(Qe,{...p,disabled:e,variant:r,size:s,className:c(i&&"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",w==="error"&&"hover:wu-text-maroon",l),color:w,style:{backgroundColor:t?x[w]:"",...p.style},ref:b,children:[!t&&u&&a.jsx(a.Fragment,{children:u}),t&&a.jsx(Re,{color:"#fff",size:"sm"}),!t&&n]})});me.displayName="WuButton";const mo=({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(me,{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"})]}),xo=({user:e,dir:t})=>{const r=[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:r.map(({title:s,url:u,icon:o,node:n},i)=>a.jsx("li",{className:i<r.length-1?"wu-border-b wu-border-gray-subtle":"",children:a.jsxs("a",{href:u,className:c("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:c(o,"wu-w-12 wu-text-center")}),a.jsx("span",{children:s})]}),n]})},i))}),a.jsx("hr",{className:"wu-border-gray-subtle"})]})},yo=({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:c("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(r=>a.jsx("li",{tabIndex:-1,dir:t,children:a.jsx("a",{href:r.url,className:c("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:r.title})},r.title))})]}),a.jsx("hr",{className:"wu-border-gray-subtle"})]}),vo=({user:e,dir:t})=>{var r,s,u,o,n,i,l,w,d;return a.jsxs("section",{className:c("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:c("wu-flex wu-flex-col wu-gap-1",t==="rtl"&&"wu-text-right"),children:[a.jsx("p",{children:(r=e==null?void 0:e.profile)==null?void 0:r.title}),a.jsxs("a",{href:(s=e==null?void 0:e.license)==null?void 0:s.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:(u=e==null?void 0:e.profile)==null?void 0:u.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:(n=e==null?void 0:e.license)==null?void 0:n.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:(i=e==null?void 0:e.license)==null?void 0:i.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:(w=e==null?void 0:e.license)==null?void 0:w.expiryDatePostFixString}),a.jsx("p",{children:(d=e==null?void 0:e.license)==null?void 0:d.expiryDate})]})]})]})]})},fr=({user:e,onLogout:t,dir:r,DataCenter:s})=>{var u,o;return e?a.jsx(dr,{Trigger:a.jsxs(ir,{className:c("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:(u=e==null?void 0:e.profile)==null?void 0:u.profilePicture,alt:"User"}),a.jsx(wr,{children:(o=e==null?void 0:e.profile)==null?void 0:o.initials})]}),dir:r,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:c("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:r,children:[a.jsx(vo,{user:e,dir:r}),(e==null?void 0:e.settings)&&e.settings.length>0&&a.jsx(yo,{settings:e.settings,dir:r}),a.jsx(xo,{user:e,dir:r}),a.jsx(mo,{onLogout:t,DataCenter:s})]})}):null},pr=({menuList:e,dir:t})=>{const r=[{icon:"wm-info",title:"Help Center",subTitle:"Knowledge Base",link:"https://www.questionpro.com/help/"},{icon:"wm-calendar-month",title:"Free Online 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-chat",title:"Live Chat",subTitle:"Support",link:"https://www.questionpro.com/a/liveperson.do?mode=launch&pageMode=quickChat",target:"window"}];return a.jsx(dr,{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-gray-switcher wu-app-header-help",DropdownContent:a.jsx("ul",{children:(e||r).map((s,u)=>a.jsx("li",{className:"wu-p-0 wu-w-[191px] hover:wu-bg-[#ededed]",dir:t,children:s.target==="window"?a.jsx("a",{tabIndex:0,rel:"noopener noreferrer",onClick:()=>ua(s.link),onKeyDown:o=>{o.key==="Enter"&&ua(s.link)},className:"wu-block wu-w-full wu-h-full wu-px-4 wu-py-2 hover:wu-bg-gray-20 focus-visible:wu-border-none focus-visible:wu-bg-gray-20 focus-visible:wu-ring-0 focus-visible:wu-outline-none focus-visible:wu-ring-offset-0 wu-cursor-pointer",children:a.jsx(br,{item:s,dir:t})}):a.jsx("a",{href:s.link,target:"_blank",className:"wu-block wu-w-full wu-h-full wu-px-4 wu-py-2 hover:wu-bg-gray-20 focus-visible:wu-border-none focus-visible:wu-bg-gray-20 focus-visible:wu-ring-0 focus-visible:wu-outline-none focus-visible:wu-ring-offset-0",rel:"noreferrer",children:a.jsx(br,{item:s,dir:t})})},u))})})},br=({item:e,dir:t})=>a.jsxs("div",{className:"wu-flex wu-items-start wu-gap-3",children:[a.jsx("span",{className:`${e.icon} wu-text-xl wu-text-gray-subtle`}),a.jsxs("div",{className:c("wu-flex wu-flex-col wu-gap-[2px]",t==="rtl"&&"wu-text-right"),children:[a.jsx("span",{className:"wu-text-xs wu-text-gray-subtle",children:e.subTitle}),a.jsx("p",{className:"wu-text-sm wu-text-blue-q",children:e.title})]})]}),No=e=>{const[t,r]=f.useState(()=>window.innerWidth<=e);return f.useEffect(()=>{const s=()=>{r(window.innerWidth<=e)};return window.addEventListener("resize",s),()=>{window.removeEventListener("resize",s)}},[e]),t};function Co({productCategories:e,openCategory:t,setOpenCategory:r}){const s=(i,l)=>{const w=l[i];if(w){w.focus();const d=e[i]||null;r(d)}},u=(i,l,w,d)=>{i.preventDefault();const p=w==="down"?l+1:l-1;s(p,d)},o=(i,l,w,d)=>{t!=null&&t.products&&t.products[t.products.length-1].name===d&&(i.preventDefault(),s(l+1,w))},n=(i,l)=>{i.preventDefault();const w=e[l]===t?null:e[l];r(w)};return function(l,w,d){const p=document.querySelectorAll("[data-product-category]"),{key:b}=l;switch(b){case"ArrowDown":u(l,w,"down",p);break;case"ArrowUp":u(l,w,"up",p);break;case"Tab":o(l,w,p,d);break;case"Enter":case" ":n(l,w);break}}}const So=e=>{const{size:t="lg",className:r,children:s,...u}=e,o={sm:"wu-text-body-3",md:"wu-text-body-2",lg:"wu-text-body-1"},n=e.as||"div";return a.jsx(n,{...u,className:c(o[t],r),children:s})},Eo=e=>{const{size:t="xl",className:r,children:s,...u}=e,o={sm:"h4",md:"h3",lg:"h2",xl:"h1"},n={sm:"wu-text-heading-4",md:"wu-text-heading-3",lg:"wu-text-heading-2",xl:"wu-text-heading-1"},i=o[t];return a.jsx(i,{...u,className:c(n[t],r),children:s})},To=e=>{const{size:t="lg",className:r,children:s,...u}=e,o={sm:"wu-text-sub-3",md:"wu-text-sub-2",lg:"wu-text-sub-1"},n=e.as||"div";return a.jsx(n,{...u,className:c(o[t],r),children:s})},Io=e=>{const{size:t="lg",className:r,children:s,...u}=e,o={md:"wu-text-display-2",lg:"wu-text-display-1"},n=e.as||"h1";return a.jsx(n,{...u,className:c(o[t],r),children:s})},Le=e=>{const{icon:t,className:r,...s}=e;return a.jsx("span",{...s,className:c(t,r),role:"presentation","aria-label":t})},ko=({buttonRef:e,handleDropdownToggle:t,handleKeyDown:r,isDropdownOpen:s,activeProductName:u,dir:o="ltr",homeLink:n="/"})=>a.jsxs("button",{ref:e,type:"button",className:c("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:i=>{s&&i.key==="ArrowDown"&&r(i,-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:n,children:a.jsx(Le,{icon:"wc-logo",className:"wu-text-xl wu-leading-4 wu-relative wu-top-1"})}),u,a.jsx("span",{className:c("wm-arrow-drop-down wu-text-2xl wu-transition-transform wu-duration-300",s&&"wu-rotate-180",o==="rtl"?"wu-mr-auto":"wu-ml-auto")})]}),R={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"},Do=({category:e,dir:t="ltr",openCategory:r})=>{const s=e.active?"#c5cce0":"#f0c36a",u=(r==null?void 0:r.name)===e.name,o=c("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",u&&"wu-hidden","wu-relative wu-top-[5px]"),n=c("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",u&&"wu-hidden","wu-relative wu-top-1");return a.jsxs("div",{className:c("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:R.productCategoryBorderTop,style:{backgroundColor:s}}),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:n})]})},Mo={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"},_o=({product:e,currentProduct:t,activeProductName:r,dir:s,focusItem:u,setFocusItem:o})=>{const[n,i]=f.useState(e.name===t),l=e.name===r,w=e.name===t,d=!e.active,p="#1b3380",b="#c5cce0",x="#ffcf70",h=c("wu-font-normal wu-text-xs wu-text-gray-lead wu-text-center",w&&"wu-text-blue-q wu-font-normal",!e.active&&"wu-text-gray-subtle",n&&"wu-font-normal",e.active&&n&&"wu-text-blue-q"),m=c("wu-text-blue-p wu-text-base",w&&"wu-text-blue-q",!e.active&&"wu-text-gray-subtle",e.active&&n&&"wu-text-blue-q"),C=n||u===e.name||l?p:b;return a.jsxs("li",{className:c(R.productListItem,"focus-visible:wu-outline-none focus:wu-outline-none wu-sub-product-list-item",(l||n)&&R.activeProduct,e.name.length>15&&window.innerWidth>768&&"wu-w-[130px] wu-min-w-[130px]",u===e.name&&R.activeProduct,"wu-product-item"),onMouseOver:()=>i(!0),onMouseOut:()=>i(!1),"aria-label":e.name,"aria-disabled":d,dir:s,onKeyDown:E=>{if(E.key==="Enter"){E.preventDefault();const y=E.currentTarget.querySelector("a");y&&y.click()}},onFocus:()=>{o(e.name)},onBlur:()=>o(""),children:[a.jsx("div",{className:c(R.topBorder,s==="rtl"&&R.topBorderRtl),style:{backgroundColor:d?x:C}}),a.jsxs("a",{className:c(R.productLink,"focus:wu-outline-none focus-visible:wu-outline-none"),href:e.link||"#",tabIndex:0,children:[a.jsx("span",{className:c(m,Mo[e.icon||""]),"aria-hidden":!0}),a.jsx("span",{className:c(h),children:e.name})]})]},e.name)},Ao=({category:e,currentProduct:t,activeProductName:r,dir:s="ltr",focusItem:u,setFocusItem:o,borderColorLocked:n="#f5a300"})=>{const{products:i=[],active:l}=e,w=f.useMemo(()=>i.filter(h=>h.active).sort((h,m)=>(h.order||100)-(m.order||100)),[i]),d=f.useMemo(()=>i.filter(h=>!h.active),[i]),[p,b]=f.useState(n),x=h=>h.map((m,C)=>a.jsx(_o,{product:m,currentProduct:t,activeProductName:r,dir:s,focusItem:u,setFocusItem:o},C));return l?a.jsxs(a.Fragment,{children:[x(w),d.length>0&&a.jsxs("li",{className:c(R.productListItem,"focus:wu-outline-none focus-visible:wu-outline-none !wu-bg-[#f5f5f5] hover:!wu-bg-[#eeeeee] wu-group"),onMouseOver:()=>b("#f5a300"),onMouseOut:()=>b(n),"aria-label":"Upgrade to unlock",children:[a.jsx("div",{className:c(R.topBorder,s==="rtl"&&R.topBorderRtl),style:{backgroundColor:p},"aria-label":"top-border"}),a.jsxs("a",{href:"https://www.questionpro.com/a/showUpgradeUser.do",className:c(R.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"]})]})]}),x(d)]}):a.jsxs("li",{className:c(R.productListItem,R.learnMore,"focus:wu-outline-none focus-visible:wu-outline-none wu-product-item-inactive !wu-bg-[#f5f5f5] hover:!wu-bg-[#eeeeee]",u==="learn"&&"activeProduct"),tabIndex:0,onFocus:()=>o("learn"),onBlur:()=>o(""),"aria-label":"Learn More",children:[a.jsx("div",{className:c(R.topBorder,s==="rtl"&&R.topBorderRtl),style:{backgroundColor:n}}),a.jsx("a",{className:R.productLink,href:"https://www.questionpro.com/a/showUpgradeUser.do",tabIndex:-1,children:a.jsx("span",{className:"wu-text-[#f99e03]",children:"Learn More"})})]})},gr=({dropdownRef:e,dir:t,isDropdownOpen:r,productCategories:s,openCategory:u,setOpenCategory:o,handleKeyDown:n,expandAll:i,activeProductName:l,focusItem:w,setFocusItem:d})=>{const p="#ffcf70",[b,x]=f.useState(window.innerWidth>768);return f.useEffect(()=>{const h=()=>{x(window.innerWidth>375)};return window.addEventListener("resize",h),()=>window.removeEventListener("resize",h)},[]),a.jsx("ul",{className:c(R.productDropdownMenu,r&&R.productDropdownMenuOpen,t==="rtl"&&R.rtlDropdownMenu,"wu-switcher-container"),ref:e,dir:t,"aria-label":"product-dropdown-menu","data-state":r?"open":"closed",children:s.map((h,m)=>a.jsxs("li",{className:c(R.productCategory,"focus:wu-outline-none focus-visible:wu-outline-none wu-h-16 wu-category-item",u===h&&R.open,i&&R.open),onMouseEnter:()=>b&&o(h),onMouseLeave:()=>b&&o(null),"aria-label":h.name,dir:t,onKeyDown:C=>n(C,m),tabIndex:0,"data-product-category":!0,children:[a.jsx(Do,{category:h,dir:t,openCategory:u}),a.jsx("ul",{className:c(R.productList,t==="rtl"&&R.rtlProductList),dir:t,children:a.jsx(Ao,{category:h,dir:t,activeProductName:l,currentProduct:h.name,focusItem:w,setFocusItem:d,borderColorLocked:p})})]},h.name))})},Wo=({isProductButtonShow:e,isDropdownOpen:t,activeProductColor:r,activeProductBgColor:s,activeProductName:u,dir:o,smallScreenButtonRef:n,handleDropdownToggle:i,handleKeyDown:l})=>a.jsx("div",{className:c("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?r.hover:s},children:a.jsxs("button",{ref:n,type:"button",className:c("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:i,onKeyDown:w=>{t&&w.key==="ArrowDown"&&l(w,-1)},"aria-label":"small-screen-product-btn",children:[u,a.jsx("span",{className:c("wm-arrow-drop-down wu-text-2xl wu-transition-transform wu-duration-300",t&&"wu-rotate-180")})]})}),Po=({dir:e,isProductButtonShow:t,smallScreenToggleButtonRef:r,setIsProductButtonShow:s,setDropdownOpen:u})=>{const o=()=>{s(n=>!n),t&&u(!1)};return a.jsxs("button",{className:c("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:r,"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"}`})]})},hr=({productCategories:e,activeProductName:t,activeProductColor:r={base:"#1b87e6",hover:"#54A5EC"},dir:s,homeLink:u,expandAll:o})=>{const n=f.useRef(null),i=f.useRef(null),l=f.useRef(null),w=f.useRef(null),[d,p]=f.useState(!1),[b,x]=f.useState(null),[h,m]=f.useState(r.base),[C,E]=f.useState(""),[y,S]=f.useState(!1),v=No(768);ia([i,n],()=>{p(!1),x(null)}),ia([l,w,i],()=>{S(!1),p(!1),x(null)}),f.useEffect(()=>{const T=_=>{_.key==="Escape"&&p(!1)};return document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T)}},[d]),f.useEffect(()=>m(r.base),[r.base]);const k=T=>{T.preventDefault(),T.stopPropagation(),p(_=>{const M=!_;return M||x(null),M})},D=(T,_)=>{Co({productCategories:e,openCategory:b,setOpenCategory:x})(T,_,C)};return a.jsx("div",{className:c("wu-inline-flex wu-items-center wu-justify-between wu-relative wu-z-auto wu-h-12 wu-text-white"),children:v?a.jsxs("div",{className:"wu-relative wu-flex",children:[a.jsx(Po,{dir:s,isProductButtonShow:y,smallScreenToggleButtonRef:w,setDropdownOpen:p,setIsProductButtonShow:S}),a.jsx(Wo,{isProductButtonShow:y,isDropdownOpen:d,activeProductColor:r,activeProductBgColor:h,activeProductName:t,handleDropdownToggle:k,smallScreenButtonRef:l,handleKeyDown:D,dir:s}),a.jsx("div",{className:c("wu-absolute wu-top-[92px] wu-left-0 wu-text-[18px]",s==="rtl"&&"wu-right-[256px] wu-left-auto"),children:a.jsx(gr,{activeProductName:t,focusItem:C,setFocusItem:E,handleKeyDown:D,isDropdownOpen:d,openCategory:b,productCategories:e,setOpenCategory:x,dropdownRef:i,expandAll:o,dir:s})})]}):a.jsxs("div",{className:"wu-relative wu-flex wu-items-center wu-justify-start wu-h-full wu-w-[256px]",dir:s,style:{backgroundColor:d?r.hover:h},onMouseOver:()=>m(r.hover),onMouseOut:()=>m(r.base),children:[a.jsx(ko,{activeProductName:t,dir:s,homeLink:u,buttonRef:n,handleDropdownToggle:k,handleKeyDown:D,isDropdownOpen:d}),a.jsx(gr,{activeProductName:t,focusItem:C,setFocusItem:E,handleKeyDown:D,isDropdownOpen:d,openCategory:b,productCategories:e,setOpenCategory:x,dropdownRef:i,expandAll:o,dir:s})]})})},mr=({children:e,dir:t,className:r})=>a.jsx("section",{className:c("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",r),children:a.jsx("div",{className:"wu-grow",children:e})}),da=g.forwardRef(({className:e,type:t,...r},s)=>a.jsx("input",{type:t,className:c("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:s,...r}));da.displayName="Input";const Lo=e=>{const{message:t,className:r,...s}=e;return a.jsx("p",{...s,className:c("wu-text-sub-3 wu-break-words wu-font-light",r),style:{color:"rgb(var(--wu-red-deep))",...s.style},children:t})},Oo=e=>{var i,l;const{inputRef:t,maxLength:r=50,className:s,...u}=e,[o,n]=f.useState(!1);return f.useEffect(()=>{var w;(((w=t==null?void 0:t.current)==null?void 0:w.value.length)||0)>.75*r?n(!0):n(!1)},[(i=t==null?void 0:t.current)==null?void 0:i.value,r]),a.jsx("p",{...u,className:c("wu-text-sub-3 wu-font-light",s),style:{color:"rgb(var(--wu-gray-subtle))",...u.style},children:o&&`${(l=t==null?void 0:t.current)==null?void 0:l.value.length}/${r}`})},Fo=Ce.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"),_t=g.forwardRef(({className:e,...t},r)=>a.jsx(ur.Root,{ref:r,className:c(Fo(),e),...t}));_t.displayName=ur.Root.displayName;const be=e=>a.jsx(_t,{...e,className:c("wu-text-gray-lead wu-leading-6",e.className)}),Bo=({Label:e,Error:t,Hint:r,Input:s,labelPosition:u="top",dir:o="ltr",className:n,...i})=>{const w=c("wu-flex",u==="top"?"wu-flex-col wu-gap-1":"wu-flex-row wu-items-center wu-gap-2",n),d=c("wu-flex wu-flex-col wu-gap-1 wu-relative wu-flex-1 wu-form-group-wrapper"),p=c("wu-absolute -wu-bottom-5",o==="ltr"?"wu-right-0":"wu-left-0","wu-form-group-hint"),b=c("wu-absolute -wu-bottom-5",o==="ltr"?"wu-left-0":"wu-right-0","wu-form-group-error");return a.jsxs("div",{className:w,dir:o,...i,children:[e,a.jsxs("div",{className:d,children:[s,r&&a.jsx("div",{className:p,children:r}),t&&a.jsx("div",{className:b,children:t})]})]})},He=f.forwardRef((e,t)=>{const{Label:r,labelPosition:s="top",Icon:u,iconPosition:o,type:n,value:i,variant:l="flat",readonly:w,id:d=Mt(),...p}=e,b=dt(s),x=u?o!=="right"?"wu-pl-8":"wu-pr-8":"",[h,m]=f.useState(!1),C=()=>{m(y=>!y)},E=y=>{p.onChange&&p.onChange(y)};return a.jsx(a.Fragment,{children:n==="submit"?a.jsx(me,{type:"submit",className:p.className,id:d,children:r||"Submit"}):a.jsx("div",{className:c("wu-flex wu-flex-col wu-gap-2 wu-input-container"),dir:p.dir,children:a.jsxs("div",{className:c("wu-flex wu-gap-1 wu-relative",b,(s==="right"||s==="left")&&"wu-items-center","wu-input-wrapper"),children:[u&&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:u}),a.jsx(da,{...p,className:c("wu-peer wu-text-xs wu-rounded-t-sm",l==="outlined"?"wu-border wu-border-gray-subtle":"",x,p.className),type:h?"text":n,ref:t,readOnly:w,onChange:p.onChange&&E,value:i,id:d}),u&&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:u}),n==="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:C,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:h?a.jsx("span",{className:"wm-visibility wu-text-gray-subtle"}):a.jsx("span",{className:"wm-visibility-off wu-text-gray-subtle"})})}),r&&a.jsx(be,{htmlFor:d,className:"wu-flex-none wu-w-fit wu-input-label",children:r})]})})})});He.displayName="WuInput";const qo=({className:e,placeholder:t="Search surveys, folders or tools",defaultCollapsed:r=!0,onSearch:s,...u})=>{const[o,n]=f.useState(r);return f.useEffect(()=>{n(r)},[r]),a.jsx(He,{...u,placeholder:t,onChange:i=>s(i.target.value),className:c("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(Le,{"data-testid":"search-icon",icon:"wm-search",className:c("wu-text-gray-lead wu-cursor-pointer",o&&"wu-text-white"),onClick:()=>n(i=>!i)})})},xr=it.Provider,yr=it.Root,vr=it.Trigger,fa=g.forwardRef(({className:e,sideOffset:t=4,...r},s)=>a.jsx(it.Content,{ref:s,sideOffset:t,className:c("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),...r}));fa.displayName=it.Content.displayName;const At=f.forwardRef(({content:e,position:t,positionOffset:r,duration:s,children:u,className:o,showArrow:n=!1,open:i,onOpenChange:l,...w},d)=>a.jsx(xr,{delayDuration:s||200,children:a.jsxs(yr,{open:i,onOpenChange:l,children:[a.jsx(vr,{asChild:!0,children:a.jsx("span",{ref:d,children:u})}),a.jsx(aa.Portal,{children:e&&a.jsxs(fa,{...w,side:t||"top",sideOffset:r||0,className:c("wu-max-w-sm wu-max-h-96 wu-overflow-y-auto",o),children:[e,n&&a.jsx(aa.Arrow,{className:"wu-fill-gray-notification wu-tooltip-arrow"})]})})]})}));At.displayName="WuTooltip";const Vo=({label:e,className:t})=>{const r=f.useRef(null),[s,u]=f.useState(!1);return f.useEffect(()=>{const o=r.current;if(o){const n=o.clientWidth,i=o.scrollWidth,l=i/e.length,w=e.length*l;u(w>n||i>n)}},[e]),a.jsx("p",{ref:r,className:c("wu-w-full wu-truncate",t),children:s?a.jsx(At,{content:e,positionOffset:8,children:e}):e})},zo=e=>{var p;const{productName:t,categories:r=[],user:s,children:u,onLogout:o,homeLink:n=window.location.origin,brandColor:i,dir:l="ltr",expandAll:w,DataCenter:d}=e;return a.jsx("div",{className:"wu-sticky wu-top-0 wu-z-50 wu-w-full",children:a.jsxs("header",{className:c("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:[bo((p=s==null?void 0:s.profile)==null?void 0:p.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(hr,{productCategories:r,activeProductName:t,activeProductColor:i,dir:l,homeLink:n,expandAll:w})}),a.jsx(mr,{dir:l,children:u}),a.jsxs("section",{className:c("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(pr,{dir:l}),(s==null?void 0:s.profile)&&Object.keys(s.profile).length>0&&a.jsx(fr,{user:s,onLogout:o,dir:l,DataCenter:d})]})]})})},Me=ct.Root,$e=ct.Trigger,Se=g.forwardRef(({className:e,align:t="center",sideOffset:r=4,...s},u)=>a.jsx(ct.Portal,{children:a.jsx(ct.Content,{ref:u,align:t,sideOffset:r,className:c("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),...s})}));Se.displayName=ct.Content.displayName;function Nr({className:e,classNames:t,dir:r="ltr",...s}){const u=rr.getDefaultClassNames();return a.jsx(rr.DayPicker,{showOutsideDays:s.showOutsideDays||!1,className:c("wu-p-3",e),classNames:{root:c(u.root,"wu-relative wu-rounded-none wu-bg-white dark:wu-bg-gray-switcher"),caption_label:c("wu-text-xs",s.captionLayout==="dropdown"?"wu-hidden":""),month_caption:c(u.month_caption,"wu-mb-5"),months:c(u.months,"wu-flex wu-flex-col sm:wu-flex-row wu-gap-4"),dropdowns:c(u.dropdowns,"wu-flex wu-items-center wu-justify-start wu-gap-2",(s.mode==="range","")),dropdown:c(u.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:c(u.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:c(u.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:c(u.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:c(u.selected,"wu-bg-blue-p [&:not(.rm)]:wu-text-white hover:wu-bg-blue-pHover"),range_middle:c("rm",u.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:c(u.range_end,"wu-rounded-none"),range_start:c(u.range_start,"wu-rounded-none wu-bg-blue-p hover:wu-bg-blue-pHover"),month_grid:c(u.month_grid,"[&>thead>tr>th]:wu-pb-2 wu-border-collapse wu-space-y-1"),button_next:c(u.button_next,wa({variant:"iconOnly"}),"wu-h-6 wu-w-6 wu-text-gray-lead"),button_previous:c(u.button_previous,wa({variant:"iconOnly"}),"wu-h-6 wu-w-6 wu-rotate-180 wu-text-gray-lead"),nav:c(u.nav,"wu-absolute wu-top-4 wu-right-3 wu-flex",r==="rtl"&&"wu-right-auto wu-left-3 wu-flex-row-reverse"),chevron:c(u.chevron,"!wu-text-red-500"),outside:c(u.outside,"wu-invisible"),disabled:c(u.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"})},...s})}Nr.displayName="Calendar";const pa=e=>a.jsx(Nr,{...e}),Cr=e=>{const{handleDateChange:t,disabled:r,onReset:s,showResetButton:u}=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:[u&&a.jsx(me,{variant:"secondary",onClick:s,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(lt.PopoverClose,{asChild:!0,children:a.jsx(me,{onClick:t,disabled:r,className:"wu-date-picker-apply",children:"Apply"})})]})},ba=({formattedString:e,dir:t,placeholder:r="Select Date",className:s,variant:u="primary",color:o,CustomTrigger:n,...i})=>a.jsx(lt.PopoverTrigger,{asChild:!n,dir:t,children:n?a.jsx(a.Fragment,{children:n(e)}):a.jsx(me,{...i,className:c("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",u==="outlined"&&"wu-border wu-border-subtle wu-bg-transparent",s),Icon:a.jsx("span",{className:"wm-calendar-month wu-text-sm"}),iconPosition:"right",children:e||r})}),Sr=(e,t,r,s)=>{const u=H.startOfDay(e).getTime();return!!(t||r&&u<H.startOfDay(r).getTime()||s&&u>H.startOfDay(s).getTime())},Wt=e=>e?typeof e=="string"?new Date(e):e:new Date,ga="\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])",Ho=[{label:"Last 7 days",value:7},{label:"Last 30 days",value:30},{label:"Last 90 days",value:90},{label:"Last 365 days",value:365}],$o=({formatString:e="yyyy-MM-dd",value:t,onChange:r,disabled:s,minDate:u=H.sub(new Date,{years:5}),maxDate:o=H.add(new Date,{years:1}),dir:n="ltr",Label:i,labelPosition:l="top",onReset:w,showResetButton:d=!1,placeholder:p="Select Date",CustomTrigger:b,...x})=>{const[h,m]=f.useState(),[C,E]=f.useState(""),y=f.useCallback(()=>{const v=Wt(h);E(H.format(v,e)),r&&r(h)},[h,e,r]),S=f.useCallback(()=>{w?w():(m(void 0),E(""),r&&r(void 0))},[r,w]);return f.useEffect(()=>{const v=Wt(t);m(v),E(H.format(v,e))},[t,e]),a.jsxs(be,{className:c("wu-flex wu-gap-1",l==="left"?"wu-items-center":"wu-flex-col wu-items-start","wu-date-picker-label"),dir:n,children:[i,a.jsxs(Me,{children:[a.jsx(ba,{formattedString:C,dir:n,placeholder:p,CustomTrigger:b,...x}),a.jsx(Se,{className:"wu-p-0 wu-w-fit wu-date-picker-content",align:"start",sideOffset:-.5,dir:n,children:a.jsx(pa,{dir:n,mode:"single",captionLayout:"dropdown",selected:h,onSelect:m,disabled:v=>Sr(v,s,u,o),startMonth:u,endMonth:o,required:!0,autoFocus:!0,defaultMonth:h,className:c("wu-border wu-border-blue-p wu-date-picker"),footer:a.jsx(Cr,{handleDateChange:y,disabled:s,onReset:S,showResetButton:d})})})]})]})},Er="yyyy-MM-dd",Uo=[{label:"Day",value:1},{label:"Week",value:7},{label:"Month",value:30},{label:"Quarter",value:90},{label:"Year",value:365}],jo=({current:e,onSelect:t,presetRanges:r=Ho})=>{const[s,u]=f.useState(),[o,n]=f.useState(!1),[i,l]=f.useState(""),[w,d]=f.useState(""),[p,b]=f.useState(!1),x=f.useMemo(()=>r.map(y=>y.value),[r]),h=c("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"),m=f.useCallback(y=>{if(y===void 0){u(void 0),n(!0);return}const S=Number(y)-1;u(S),n(!1),t({from:H.sub(new Date,{days:S}),to:new Date})},[t]),C=f.useCallback((y,S)=>{if(!y||!(e!=null&&e.to)||!(e!=null&&e.from)||!new RegExp(ga).test(y))return!1;const k=new Date(S==="start"?y:e.from),D=new Date(S==="end"?y:e.to);return H.isBefore(D,k)?(b(!0),!1):(b(!1),!(H.isSameDay(k,e.from)&&H.isSameDay(D,e.to)))},[e]),E=f.useCallback((y,S)=>{if((S==="start"?l:d)(y),C(y,S)){const k={from:e==null?void 0:e.from,to:e==null?void 0:e.to};S==="start"&&(k.from=new Date(y)),S==="end"&&(k.to=new Date(y)),t(k)}},[e,t,C]);return f.useEffect(()=>{if(e!=null&&e.to&&(e!=null&&e.from)&&H.isValid(e.to)&&H.isValid(e.from)){l(H.format(e.from,Er)),d(H.format(e.to,Er));const y=H.differenceInCalendarDays(e.to,e.from);H.isToday(e.to)&&x.includes(y+1)?(u(y),n(!1)):(u(void 0),n(!0))}},[e,x]),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:Uo.map(({label:y,value:S})=>a.jsx(Qe,{variant:"secondary",className:"wu-px-1 wu-py-1 wu-text-xs wu-h-fit wu-min-w-fit disabled:wu-bg-white",disabled:S!==1,children:y},S))}),a.jsxs("ul",{className:"wu-flex wu-flex-col wu-gap-1 wu-date-picker-ranges",children:[r.map(({label:y,value:S})=>a.jsx("li",{children:a.jsx("button",{className:c(h,s===S-1&&"wu-bg-blue-p/10"),onClick:()=>m(S),children:y})},S)),a.jsx("li",{children:a.jsx("button",{className:c(h,o&&"wu-bg-blue-p/10"),onClick:()=>m(),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(He,{placeholder:"Start Date",pattern:ga,value:i,onChange:y=>E(y.target.value,"start"),"aria-label":"Start Date"}),a.jsx(He,{placeholder:"End Date",pattern:ga,value:w,onChange:y=>E(y.target.value,"end"),"aria-label":"End Date"}),p?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"})]})]})},Go=({formatString:e="yyyy/MM/dd",value:t,onChange:r,disabled:s,minDate:u=H.sub(new Date,{years:5}),maxDate:o=H.add(new Date,{years:1}),dir:n="ltr",minDateToSelect:i,maxDateToSelect:l,presetRanges:w,Label:d,labelPosition:p="top",onReset:b,showResetButton:x=!0,placeholder:h="Select Date Range",CustomTrigger:m,...C})=>{const[E,y]=f.useState(t),[S,v]=f.useState(t),[k,D]=f.useState(""),T=f.useCallback(()=>{if(S){const L=S.from,P=S.to;y({from:L,to:P}),D(`${H.format(L,e)} - ${H.format(P,e)}`),r&&r({from:L,to:P})}},[S,e,r]),_=f.useCallback(()=>{v(E)},[E]),M=f.useCallback(()=>{b?b():(y(void 0),v(void 0),D(""),r&&r(void 0))},[b,r]);return f.useEffect(()=>{if(t!=null&&t.from&&(t!=null&&t.to)){const L=Wt(t.from),P=Wt(t.to);y(t),v(t),D(`${H.format(L,e)} - ${H.format(P,e)}`)}else y(void 0),v({to:new Date,from:new Date})},[t,e]),a.jsxs(be,{className:c("wu-flex wu-gap-1",p==="left"?"wu-items-center":"wu-flex-col wu-items-start","wu-date-picker-label"),dir:n,children:[d,a.jsxs(Me,{onOpenChange:L=>!L&&_(),children:[a.jsx(ba,{formattedString:k,dir:n,placeholder:h,CustomTrigger:m,...C}),a.jsxs(Se,{className:"wu-flex wu-p-0 wu-border wu-w-fit wu-border-blue-p",align:"start",sideOffset:-.5,dir:n,children:[a.jsx(jo,{current:S,onSelect:v,presetRanges:w}),a.jsx(pa,{dir:n,numberOfMonths:2,mode:"range",captionLayout:"dropdown",selected:S,onSelect:v,disabled:L=>Sr(L,s,u,o),startMonth:u,endMonth:o,required:!0,autoFocus:!0,defaultMonth:E==null?void 0:E.from,className:c("wu-shadow-none wu-date-range-picker"),min:i,max:l,footer:a.jsx(Cr,{handleDateChange:T,disabled:s,onReset:M,showResetButton:x})})]})]})]})},Tr=f.forwardRef((e,t)=>{const{className:r,rounded:s,...u}=e;return a.jsx("div",{className:c("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",s?"wu-rounded-lg":"wu-rounded-sm",r),ref:t,...u})});Tr.displayName="WuCard";const Yo=f.forwardRef((e,t)=>{const{className:r,...s}=e;return a.jsx("div",{ref:t,...s,className:c("wu-p-2 wu-mb-2 wu-border-b wu-border-gray-40 min-h-12 wu-card-header",r)})});Yo.displayName="WuCardHeader";const Ko=f.forwardRef((e,t)=>{const{className:r,...s}=e;return a.jsx("div",{ref:t,...s,className:c("wu-p-2 wu-mt-2 wu-border-t wu-border-gray-40 min-h-12 wu-card-footer",r)})});Ko.displayName="WuCardHeader";const Ir=g.forwardRef(({className:e,partial:t,...r},s)=>a.jsx(ra.Root,{ref:s,className:c("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),...r,children:a.jsxs(ra.Indicator,{className:c("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"})]})}));Ir.displayName=ra.Root.displayName;const Ee=f.forwardRef((e,t)=>{const{disabled:r,checked:s,Label:u,labelPosition:o="right",className:n,id:i=Mt(),partial:l,onChange:w,required:d,readonly:p,...b}=e;return f.useEffect(()=>{b.defaultChecked!==void 0&&s!==void 0&&console.error("WuCheckbox: Both `checked` and `defaultChecked` cannot be used together. Use only one of them.")},[b.defaultChecked,s]),a.jsxs("div",{className:Jo({labelPosition:o,className:"wu-checkbox-container"}),dir:b.dir,children:[a.jsx(Ir,{id:i,...b,partial:l,checked:s,disabled:r||p,onCheckedChange:w,className:c("wu-peer wu-checkbox",n),required:d,ref:t}),u&&a.jsx(be,{htmlFor:i,className:"wu-w-full wu-checkbox-label",children:u})]})}),Jo=Ce.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"}}});Ee.displayName="WuCheckbox";const Xo=e=>{const{className:t,children:r,...s}=e;return a.jsx("span",{...s,className:c("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:r})},ha=g.forwardRef(({className:e,...t},r)=>a.jsx(we.Command,{ref:r,className:c("wu-flex wu-h-full wu-w-full wu-flex-col wu-overflow-hidden wu-rounded-md",e),...t}));ha.displayName=we.Command.displayName;const kr=g.forwardRef(({className:e,...t},r)=>a.jsx("div",{className:"wu-flex wu-items-center wu-border-b wu-px-3",children:a.jsx(we.Command.Input,{ref:r,className:c("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})}));kr.displayName=we.Command.Input.displayName;const ma=g.forwardRef(({className:e,...t},r)=>a.jsx(we.Command.List,{ref:r,className:c("",e),...t}));ma.displayName=we.Command.List.displayName;const xa=g.forwardRef((e,t)=>a.jsx(we.Command.Empty,{ref:t,className:"wu-text-center wu-p-2 wu-pb-2.5 wu-text-xs",...e}));xa.displayName=we.Command.Empty.displayName;const ft=g.forwardRef(({className:e,...t},r)=>a.jsx(we.Command.Group,{ref:r,className:c("",e),...t}));ft.displayName=we.Command.Group.displayName;const Dr=g.forwardRef(({className:e,...t},r)=>a.jsx(we.Command.Separator,{ref:r,className:c("wu-mx-1 wu-my-1 wu-h-px wu-bg-gray-20",e),...t}));Dr.displayName=we.Command.Separator.displayName;const pt=g.forwardRef(({className:e,...t},r)=>a.jsx(we.Command.Item,{ref:r,className:c("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}));pt.displayName=we.Command.Item.displayName;const et=f.forwardRef(({containerHeight:e=400,list:t,callback:r,dir:s,className:u,style:o},n)=>a.jsx(to.Virtuoso,{ref:n,dir:s,className:u,style:{height:e,scrollbarWidth:"thin",scrollbarColor:"#d4d4d4 #f1f1f1",overflowX:"hidden",...o},data:t,itemContent:(i,l)=>r(i,l)}));et.displayName="WuVirtualScroll";const Zo=({tags:e,triggerRef:t})=>{const[r,s]=f.useState([]),[u,o]=f.useState([]),n=f.useMemo(()=>a.jsx("ul",{className:"wu-flex wu-flex-col wu-items-start wu-justify-center wu-list-none",children:u.map((l,w)=>a.jsx("li",{className:"wu-py-1 wu-text-xs wu-text-left",children:l},w))}),[u]),i=l=>{const w=document.createElement("div");Object.assign(w.style,{display:"inline-block",visibility:"hidden",position:"absolute",whiteSpace:"nowrap"}),w.textContent=l,document.body.appendChild(w);const d=w.offsetWidth;return document.body.removeChild(w),d+8};return f.useEffect(()=>{const l=()=>{if(t.current){const b=t.current.offsetWidth-20-36;let x=0;const h=[],m=[];e.forEach(C=>{const E=i(C);x+E+8<b?(h.push(C),x+=E+8):m.push(C)}),s(h),o(m)}};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:[r.map((l,w)=>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},w)),u.length>0&&a.jsx(At,{content:n,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:["+",u.length]})})]})},Qo=({placeholder:e="Select...",isEllipse:t=!1,selectedOptions:r,variant:s="flat",dir:u="ltr",accessorKey:o,multiple:n,id:i,disabled:l,selectAll:w,isCheckedAll:d,className:p,...b})=>{const[x,h]=f.useState([]),m=f.useRef(null);f.useEffect(()=>{if(!r||Array.isArray(r)&&r.length===0){h([]);return}if(n){const E=r;h(E==null?void 0:E.map(y=>y[o.label]));return}else h([r[o.label]])},[r]);const C=()=>{var E;return x.length?d&&(w!=null&&w.enable)&&(w!=null&&w.triggerText)?a.jsx("span",{className:"wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap",children:w.triggerText}):t?a.jsx("span",{className:"wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap",style:{width:`${(((E=m.current)==null?void 0:E.offsetWidth)||0)-32}px`},children:x.join(", ")}):a.jsx(Zo,{tags:x,triggerRef:m}):a.jsx("p",{className:"wu-text-xs wu-opacity-70",children:e})};return a.jsx($e,{dir:u,asChild:!0,id:i,disabled:l,children:a.jsxs("button",{...b,ref:m,disabled:l,className:c("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",s==="outlined"&&"wu-border wu-border-gray-subtle","disabled:wu-cursor-not-allowed disabled:hover:wu-border-gray-subtle disabled:wu-bg-gray-10",p),children:[C(),a.jsx("span",{className:"wm-arrow-drop-down group-data-[state=open]:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base"})]})})},Mr=X.Root,_r=X.Trigger,Ar=X.Group,Ro=X.Portal,en=X.Sub,tn=X.RadioGroup,Wr=g.forwardRef(({className:e,inset:t,children:r,position:s,...u},o)=>a.jsxs(X.SubTrigger,{ref:o,className:c("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),...u,children:[s==="left"&&a.jsx("span",{className:c("wm-chevron-right",u.dir==="rtl"&&"ml-2")}),r,s!=="left"&&a.jsx("span",{className:c("wu-text-base wu-leading-4",u.dir==="rtl"&&"wu-mr-auto wm-chevron-left",u.dir!=="rtl"&&"wu-ml-auto wm-chevron-right")})]}));Wr.displayName=X.SubTrigger.displayName;const Pr=g.forwardRef(({className:e,...t},r)=>a.jsx(X.SubContent,{ref:r,className:c("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}));Pr.displayName=X.SubContent.displayName;const ya=g.forwardRef(({className:e,sideOffset:t=4,...r},s)=>a.jsx(X.Portal,{children:a.jsx(X.Content,{ref:s,sideOffset:t,className:c("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),...r})}));ya.displayName=X.Content.displayName;const Pt=g.forwardRef(({className:e,inset:t,...r},s)=>a.jsx(X.Item,{ref:s,className:c("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),...r}));Pt.displayName=X.Item.displayName;const Lr=g.forwardRef(({className:e,children:t,checked:r,dir:s,...u},o)=>a.jsxs(X.CheckboxItem,{ref:o,className:c("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",s==="rtl"&&"wu-pr-8 wu-pl-2",s!=="rtl"&&"wu-pl-8 wu-pr-2",e),checked:r,...u,children:[a.jsx("span",{className:c("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",s==="rtl"&&"wu-right-2",s!=="rtl"&&"wu-left-2"),children:a.jsx(X.ItemIndicator,{children:a.jsx("span",{className:"wm-check wu-text-base wu-text-white"})})}),t]}));Lr.displayName=X.CheckboxItem.displayName;const Or=g.forwardRef(({className:e,children:t,...r},s)=>a.jsxs(X.RadioItem,{ref:s,className:c("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),...r,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(X.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]}));Or.displayName=X.RadioItem.displayName;const bt=g.forwardRef(({className:e,inset:t,...r},s)=>a.jsx(X.Label,{ref:s,className:c("wu-p-2 wu-font-medium wu-text-xs",t&&"wu-pl-8",e),...r}));bt.displayName=X.Label.displayName;const Lt=g.forwardRef(({className:e,...t},r)=>a.jsx(X.Separator,{ref:r,className:c("-wu-mx-1 wu-my-1 wu-h-px wu-bg-gray-20",e),...t}));Lt.displayName=X.Separator.displayName;const Fr=({option:e,value:t,multiple:r=!1,onSelect:s,accessorKey:u,dir:o})=>{const[n,i]=f.useState(r?[]:"");f.useEffect(()=>{t&&i(r?t.map(p=>JSON.stringify(p[u.value])):JSON.stringify(t[u.value]))},[t,u.value,r]);const l=r?n.includes(JSON.stringify(e[u.value])):n===JSON.stringify(e[u.value]),w=()=>{e.disabled||s(e)};return a.jsxs(pt,{onSelect:w,disabled:e.disabled,className:c("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:[r&&a.jsx(Ee,{checked:l}),a.jsx(an,{option:e,accessorKey:u})]})},an=({option:e,accessorKey:t})=>{const r=e[t.label];return a.jsxs("div",{className:"wu-flex wu-items-center wu-w-full wu-gap-1",children:[e.icon&&e.icon,r,e.isAdmin&&a.jsx("span",{className:"wu-ml-auto wu-text-sm wm-lock wu-text-orange-deep"})]})},Br=e=>{const{option:t,selectAll:r,handleSelectAll:s,isCheckedAll:u,isPartialSelected:o,...n}=e;switch("type"in t?t.type:"option"){case"all":return a.jsx(pt,{onSelect:s,className:c("wu-cursor-pointer wu-text-xs wu-leading-4 wu-py-2 wu-combobox-item"),dir:n.dir,children:a.jsx(Ee,{checked:u||o,partial:o,"data-partial":o,Label:(r==null?void 0:r.label)||"Select All"})});case"group":return a.jsxs(ft,{children:[a.jsx(bt,{children:t.label}),t.options.map((l,w)=>f.createElement(Fr,{...n,option:l,key:w}))]});case"divider":return a.jsx(Dr,{className:"wu-mx-4"});default:return a.jsx(Fr,{...n,option:t})}},rn=e=>{const t=[],r=[],s=[],u=[];return e.forEach(o=>{o.type==="group"?(t.push(o),s.push(...o.options),u.push(...o.options.filter(n=>!n.disabled))):o.type==="divider"?r.push(o):s.push(o),o!=null&&o.disabled||u.push(o)}),{groups:t,dividers:r,allOptions:s,enabledOptions:u}},sn=f.memo(He),un=({data:e,accessorKey:t,value:r,defaultValue:s,Header:u,virtualizedThreshold:o=100,isEllipse:n,placeholder:i,variant:l,dir:w,onSelect:d,Label:p,maxHeight:b=420,multiple:x=!1,hasGroup:h=!1,selectAll:m,id:C,disabled:E,labelPosition:y="top",className:S,onScroll:v,maxContentWidth:k,...D})=>{const[T,_]=f.useState(""),[M,L]=f.useState(),[P,O]=f.useState(!1),[A,F]=f.useState(!1),[q,W]=f.useState(!1),U=f.useRef(null),{allOptions:z,groups:Z,dividers:ae,enabledOptions:le}=f.useMemo(()=>h||m&&!m.includeDisabled?rn(e):{allOptions:e,groups:[],dividers:[],enabledOptions:[]},[e,h]),ee=f.useMemo(()=>{if(!T)return e;const I=T.toLowerCase();return z.filter(V=>V[t.label].toLowerCase().includes(I))},[T,z,e,t.label]),B=f.useMemo(()=>x&&m!=null&&m.enable&&!T&&ee.length>0?[{type:"all"},...ee]:ee,[ee,T,x]),K=f.useMemo(()=>{const I=32*B.length+ae.length*9+Z.length*48;return Math.min(b,I)},[b,B,ae,Z]),Q=f.useCallback(I=>{const V=I[t.value];x?L(ne=>{const $=ne||[],te=$.some(de=>de[t.value]===V)?$.filter(de=>de[t.value]!==V):[...$,I];return d==null||d(te),te}):(O(!1),L(I),d==null||d(I))},[x,t.value,d]),j=f.useCallback(I=>_(I.target.value),[]),Te=f.useCallback(()=>_(""),[]);f.useEffect(()=>{if(r!==void 0&&s!==void 0){console.error("defaultValue and value cannot be used simultaneously");return}else r!==void 0?L(r):s!==void 0&&L(s)},[r,s]),f.useEffect(()=>{if(!x)return;const I=m!=null&&m.includeDisabled?(M==null?void 0:M.length)===z.length:(M==null?void 0:M.length)===le.length;F(I);const V=(M==null?void 0:M.length)>0&&!I;W(V)},[M,m]);const Ie=f.useCallback(()=>{const I=A?[]:m!=null&&m.includeDisabled?z:le;L(I),d==null||d(I)},[A,x,z,le,d,m]),ye=dt(y);return a.jsxs("div",{className:c(ye,"wu-flex wu-combobox-container"),ref:U,children:[a.jsxs(Me,{onOpenChange:I=>{I&&Te(),O(I)},open:P,modal:!0,children:[a.jsx(Qo,{...D,selectedOptions:M,accessorKey:t,isEllipse:n,placeholder:i,variant:l,dir:w,multiple:x,disabled:E,selectAll:m,isCheckedAll:A,className:S,id:C}),a.jsx(Se,{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:k},children:a.jsxs(ha,{id:C,children:[a.jsx("div",{className:"wu-m-2",children:a.jsx(sn,{placeholder:"Search...",Icon:a.jsx("span",{className:"wm-search"}),className:"wu-text-xs wu-combobox-search",onChange:j,name:"Search","aria-label":"Search",dir:w,iconPosition:w==="rtl"?"right":"left"})}),u,a.jsxs(ma,{children:[a.jsx(xa,{children:"No results found."}),B.length>=o?a.jsx(et,{className:"wu-combobox-list",containerHeight:b,list:B,callback:(I,V)=>a.jsx(Br,{option:V,value:M,onSelect:Q,multiple:x,accessorKey:t,dir:w,selectAll:m,handleSelectAll:Ie,isCheckedAll:A,isPartialSelected:q},I),dir:w}):a.jsx("div",{style:{maxHeight:K,height:"fit-content",overflow:"auto"},className:"wu-combobox-list",onScroll:v,children:B.map((I,V)=>a.jsx(Br,{option:I,value:M,onSelect:Q,multiple:x,accessorKey:t,dir:w,selectAll:m,handleSelectAll:Ie,isCheckedAll:A,isPartialSelected:q},V))})]})]})})]}),p&&a.jsx(be,{htmlFor:C,className:"wu-combobox-label",children:p})]})},on=e=>{const{textToCopy:t,notificationText:r,...s}=e,[u,o]=f.useState(!1),n=async()=>{if(t)try{await navigator.clipboard.writeText(t),o(!0),setTimeout(()=>o(!1),2e3)}catch(i){console.error("Failed to copy:",i)}};return a.jsxs(me,{...s,onClick:n,variant:"iconOnly",className:c("wu-relative",e.className),"aria-label":"Copy to clipboard",children:[r&&a.jsx("span",{className:c("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",u?"wu-block":"wu-hidden"),children:r}),a.jsx(Le,{icon:"wm-content-copy",className:"wu-text-lg"})]})},qr=Y.Root,nn=Y.Trigger,ln=Y.Close,cn=Y.Portal,Vr=g.forwardRef(({className:e,...t},r)=>a.jsx(Y.Overlay,{className:c("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",e,"wu-drawer-overlay"),...t,ref:r}));Vr.displayName=Y.Overlay.displayName;const wn=Ce.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"}}),va=g.forwardRef(({side:e="right",className:t,children:r,hideCloseButton:s,...u},o)=>a.jsxs(cn,{children:[a.jsx(Vr,{}),a.jsxs(Y.Content,{ref:o,className:c(wn({side:e}),t),...u,children:[r,!s&&a.jsx(Y.Close,{"aria-label":"close",asChild:!0,children:a.jsxs(Qe,{variant:"iconOnly",className:"wu-absolute wu-right-4 wu-top-4",children:[a.jsx("span",{className:"wm-close"}),a.jsx("span",{className:"wu-sr-only",children:"Close"})]})})]})]}));va.displayName=Y.Content.displayName;const zr=g.forwardRef(({className:e,...t},r)=>a.jsx(Y.Title,{ref:r,className:c("wu-text-lg wu-font-semibold",e),...t}));zr.displayName=Y.Title.displayName;const dn=g.forwardRef(({className:e,...t},r)=>a.jsx(Y.Description,{ref:r,className:c("wu-text-sm",e),...t}));dn.displayName=Y.Description.displayName;const fn=e=>t=>{e&&t.preventDefault()},pn=e=>{const{Trigger:t,children:r,hideCloseButton:s,className:u,side:o="left",open:n,onOpenChange:i,preventClickOutside:l,...w}=e;return a.jsxs(qr,{open:n,onOpenChange:i,children:[a.jsx(nn,{asChild:!0,children:t}),a.jsxs(va,{...w,onInteractOutside:fn(l),side:o,className:c("wu-bg-white wu-text-gray-lead wu-px-0",u),hideCloseButton:s,children:[a.jsx("div",{className:"wu-hidden",children:a.jsx(zr,{})}),r]})]})},bn=({children:e,...t})=>a.jsx(ln,{...t,children:e}),Hr=({className:e,isLoading:t,loadingText:r,children:s,...u})=>a.jsxs("footer",{className:c("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),...u,children:[a.jsx("div",{className:"wu-flex-1",children:s}),t&&a.jsx(Re,{size:"16px",variant:"spinner",color:"#a3a3a3",message:r})]});Hr.displayName="WuFooter";const $r=f.forwardRef((e,t)=>{const{size:r="sm",idOrSlugOrUrl:s,variant:u="primary",...o}=e,n=r==="sm"?16:18,i=s.includes("http")?s:`/help/${s}.html`,l=u==="primary"?"wu-text-blue-p":"wu-text-gray-lead";return a.jsx("button",{...o,ref:t,onClick:()=>ua(i),children:a.jsx("span",{className:c("wm-help wu-text-gray-subtle",`wu-text-[${n}px]`,l,o.disabled&&"wu-text-neutral-300","wu-help-button-icon")})})});$r.displayName="WuHelpButton";const Fe=(e,t)=>`wu-listbox-${e}`;function gn(e){const{option:t,accessorKey:r,onSelect:s,multiple:u,dir:o,GroupLabel:n,Item:i,isSelected:l,...w}=e,d=r.group&&Array.isArray(t[r.group]),p=({item:b,className:x})=>f.createElement(pt,{...w,key:JSON.stringify(b),onSelect:()=>s==null?void 0:s(b),value:t[r.value],className:c("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(b))&&!u&&"wu-bg-blue-p/10",o==="rtl"&&"wu-justify-end",x,Fe("item")),disabled:b.disabled},u&&a.jsx(Ee,{checked:l==null?void 0:l(b)}),i?i({value:b,isSelected:l==null?void 0:l(b)}):a.jsx(a.Fragment,{children:b[r.label]}));if(d){const b=t[r.group],x=typeof n=="string"?t[n]:n==null?void 0:n(t);return a.jsx(ft,{heading:x,children:b==null?void 0:b.map(h=>a.jsx(p,{item:h,className:"wu-pl-6"},JSON.stringify(h)))})}return a.jsx(p,{item:t})}const hn=f.memo(gn),mn=e=>{const{className:t,...r}=e;return a.jsxs("div",{className:"wu-relative",children:[a.jsx(Le,{icon:"wm-search",className:"wu-absolute wu-top-[14px] wu-left-5"}),a.jsx(kr,{...r,"aria-label":"Search",className:c("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;",Fe("input"),t)})]})},xn=e=>{const{label:t,onSelectAll:r,data:s,value:u}=e,[o,n]=f.useState(!1),[i,l]=f.useState(!1);return f.useEffect(()=>{!u||!s||(n(u.length>0),l(u.length>0&&u.length<s.length))},[s,u]),a.jsxs(pt,{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:()=>r==null?void 0:r(!o),children:[a.jsx(Ee,{checked:o,partial:i}),t||"Select All"]})},yn=e=>{const{CustomTrigger:t,disabled:r,value:s,placeholder:u,accessorKey:o,Chip:n,handleUnselect:i,variant:l,dir:w,className:d,...p}=e,[b,x]=f.useState(),h=f.useRef(null);return f.useEffect(()=>{if(!s){x(null);return}x(Array.isArray(s)?n?s.map((C,E)=>n({value:C,unselect:i,key:E})):s.map(C=>C[o.label]).join(", "):n?n({value:s,unselect:i}):s[o.label])},[s,n,o.label,x]),a.jsx($e,{asChild:!0,id:e.id,disabled:r,ref:h,children:(t==null?void 0:t(s))||a.jsxs("button",{...p,className:c("wu-group 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,Fe("trigger")),children:[a.jsx("div",{className:c("wu-truncate",n&&"wu-flex wu-items-center wu-gap-1 wu-flex-wrap",!b&&"wu-font-light"),children:b||u}),a.jsx(Le,{icon:"wm-arrow-drop-down",className:c("wu-absolute wu-top-1 wm-arrow-drop-down group-data-[state=open]:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base",w==="rtl"?"wu-left-1":"wu-right-1",Fe("drop-icon"))})]})})},Ur=(e,t,r)=>{const s=String(e[r.label]??"").toLowerCase(),u=String(e[r.value]??"").toLowerCase();return s.includes(t)||u.includes(t)},vn=(e,t,r)=>{const s=t.trim();if(s==="")return e;const u=s.toLowerCase(),o=[];for(const n of e){const i=r.group,l=i?n[i]:void 0;if(Array.isArray(l)){const w=l.filter(d=>Ur(d,u,r));w.length>0&&o.push({...n,[i]:w})}else Ur(n,u,r)&&o.push(n)}return o},Nn=e=>{const{data:t,accessorKey:r,value:s,Item:u,Label:o,GroupLabel:n,CustomHeader:i,CustomTrigger:l,NoDataContent:w,Chip:d,onSelect:p,onScroll:b,disabled:x,multiple:h,searchable:m,selectAll:C,virtualizedThreshold:E=100,id:y,dir:S,className:v,listClass:k,placeholder:D="Select items...",variant:T,labelPosition:_="top",maxContentWidth:M,maxContentHeight:L}=e,[P,O]=f.useState(!1),[A,F]=f.useState(""),[q,W]=f.useState(s),U=f.useMemo(()=>r,[r]),z=f.useMemo(()=>{if(!m||!A)return t;const B=A.toLowerCase().trim();return vn(t,B,r)},[t,A,r.label,m]),Z=B=>{h?W(K=>{const Q=B[r.value],j=Array.isArray(K)?K:[],Ie=j.some(ye=>ye[r.value]===Q)?j.filter(ye=>ye[r.value]!==Q):[...j,B];return p&&p(Ie),Ie}):(W(B),p&&p(B),O(!1))},ae=f.useCallback(B=>{const K=B?t:[];W(K),C!=null&&C.onSelectAll&&C.onSelectAll(B),p&&p(K)},[t,C,p]),le=B=>Array.isArray(q)?q.some(K=>K[r.value]===B[r.value]):(q==null?void 0:q[r.value])===B[r.value];f.useEffect(()=>{W(s)},[s]);const ee=B=>{const K=Q=>a.jsx(hn,{option:Q,accessorKey:U,multiple:h,onSelect:j=>Z(j),dir:S,GroupLabel:n,Item:u,isSelected:j=>le(j)},JSON.stringify(Q));return B.length>E?a.jsx(et,{list:B,callback:(Q,j)=>K(j),dir:S}):B.map(K)};return a.jsxs("div",{className:c("wu-flex wu-text-sm wu-gap-2",_==="top"&&"wu-flex-col wu-gap-1",_==="left"&&"wu-flex-row",_==="right"&&"wu-flex-row-reverse",Fe("container")),dir:S,children:[o&&a.jsx(be,{htmlFor:y,className:Fe("label"),children:o}),a.jsxs(Me,{open:P,onOpenChange:B=>{O(B),B||setTimeout(()=>{F("")},100)},children:[a.jsx(yn,{CustomTrigger:l,disabled:x,value:q,accessorKey:r,placeholder:D,Chip:d,className:v,handleUnselect:Z,variant:T,id:y,dir:S}),a.jsx(Se,{className:c("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",Fe("content")),align:"start",sideOffset:-1,style:{maxWidth:M},children:a.jsxs(ha,{id:e.id,shouldFilter:!1,children:[m&&a.jsx(mn,{value:A,onValueChange:F}),i,a.jsxs(ma,{className:c("wu-overflow-y-auto",Fe("list"),k),onScroll:b,style:{maxHeight:L||"420px"},children:[a.jsx(xa,{children:w||"No results found."}),a.jsx(ft,{children:h&&(C==null?void 0:C.enabled)&&!A&&a.jsx(xn,{data:t,value:q,onSelectAll:ae,label:C.label})}),a.jsx(ft,{children:ee(z)})]})]})})]})]})},Cn=e=>{const{checked:t,onSelect:r,children:s,disabled:u,preventCloseOnSelect:o}=e;return a.jsx(Lr,{disabled:u,checked:t,onCheckedChange:r,onSelect:n=>o&&n.preventDefault(),children:s})},Na=e=>{const{children:t,className:r,Icon:s,iconPosition:u="left",disabled:o,onSelect:n,preventCloseOnSelect:i}=e,l=c("wu-flex wu-items-center wu-gap-2",s&&(u==="left"?"":"wu-justify-between wu-flex-row-reverse"),r),w=d=>{n&&n(d),i&&d.preventDefault()};return a.jsxs(Pt,{onSelect:w,disabled:o,className:l,children:[s&&a.jsx("div",{className:"wu-text-base",children:s}),t]})},Sn=e=>{const{children:t,Label:r,...s}=e;return a.jsxs(Ar,{...s,children:[a.jsx(bt,{children:r||e.label}),t]})},En=e=>{const{options:t,value:r,onSelect:s}=e;return a.jsx(tn,{value:r,onValueChange:s,children:t.map(u=>a.jsx(Or,{value:u.value,disabled:u.disabled,children:u.Label||u.label},u.value))})},Tn=e=>{const{className:t,...r}=e,s=c("wu-w-11/12 wu-mx-auto wu-border-gray-40",t);return a.jsx(Lt,{...r,className:s})},tt=g.forwardRef(({className:e,children:t,thumbColor:r,railColor:s,...u},o)=>a.jsxs(Ve.Root,{ref:o,className:c("wu-relative wu-overflow-hidden",e),children:[a.jsx(Ve.Viewport,{className:"wu-h-full wu-w-full wu-rounded-[inherit]",...u,children:t}),a.jsx(Ca,{thumbColor:r,railColor:s}),a.jsx(Ve.Corner,{})]}));tt.displayName=Ve.Root.displayName;const Ca=g.forwardRef(({className:e,orientation:t="vertical",thumbColor:r="#d4d4d4",railColor:s="#eeeeee",...u},o)=>a.jsx(Ve.ScrollAreaScrollbar,{ref:o,orientation:t,className:c("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:s},...u,children:a.jsx(Ve.ScrollAreaThumb,{className:"wu-relative wu-flex-1 wu-rounded-full",style:{background:r}})}));Ca.displayName=Ve.ScrollAreaScrollbar.displayName;const In=e=>{const{children:t,label:r,Label:s,open:u,onOpenChange:o,height:n,dir:i,...l}=e;return a.jsxs(en,{...l,open:u,onOpenChange:o,children:[a.jsx(Wr,{dir:i,children:s||r}),a.jsx(Ro,{children:a.jsx(Pr,{onInteractOutside:w=>w.preventDefault(),children:a.jsx(tt,{className:"wu-h-fit",style:{height:n},dir:i,children:t})})})]})},kn="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",jr=e=>{const{children:t,menuTitle:r,MenuTitle:s,variant:u="flat",name:o,open:n,onOpenChange:i,height:l,preventCloseOnClickOutside:w,dir:d,Trigger:p,align:b="start",sideOffset:x=0,side:h="bottom",alignOffset:m,className:C,disabled:E,...y}=e;return a.jsxs(Mr,{...y,open:n,onOpenChange:i,dir:d,children:[a.jsx(_r,{asChild:!0,dir:d,disabled:E,className:c("disabled:wu-text-zinc-300 disabled:wu-bg-white disabled:wu-cursor-not-allowed disabled:hover:wu-bg-transparent"),children:p??Dn(u,o,E)}),a.jsx(ya,{className:c("wu-w-56 wu-border wu-border-blue-p disabled:wu-border-gray-40",C,"wu-menu-content"),align:b,sideOffset:x,side:h,alignOffset:m,onInteractOutside:S=>w&&S.preventDefault(),children:a.jsxs(tt,{className:"h-fit",style:{height:l},dir:d,children:[(r||s)&&a.jsxs(a.Fragment,{children:[a.jsx(bt,{dir:d,className:"wu-menu-title",children:s||r}),a.jsx(Lt,{className:"wu-mt-0 wu-menu-separator",dir:d})]}),t??a.jsx("p",{children:"Menu Is Empty"})]})})]})},Dn=(e,t,r)=>{const s=c(kn,"wu-flex wu-items-center wu-justify-between wu-gap-2 wu-h-8 wu-text-xs wu-group",e==="outlined"?"wu-border":"wu-border-b","wu-trigger-btn");return a.jsxs("button",{className:s,"aria-label":"menu-trigger",children:[a.jsx("span",{children:t??"Menu"}),a.jsx("span",{className:c("wm-arrow-drop-down wu-text-gray-lead wu-text-base wu-rotate-180 group-data-[state=closed]:wu-rotate-0 wu-transition-transform wu-duration-300 group-hover:wu-text-blue-q",r&&"wu-text-zinc-300 group-hover:wu-text-zinc-300")})]})},Sa=f.forwardRef(({showMenu:e=!1,className:t,color:r="#1B3380",...s},u)=>{const o=c("wu-w-full wu-border wu-transition-all wu-duration-300");return a.jsxs("div",{...s,className:c("wu-flex wu-flex-col wu-w-[18px] wu-justify-between wu-aspect-[3/2] wu-transition-all wu-duration-300",t),ref:u,"aria-label":"menu-icon",children:[a.jsx("div",{className:`${o} wu-origin-center ${e?"wu-rotate-45 wu-translate-y-[5px]":""}`,style:{borderColor:r}}),a.jsx("div",{className:`${o} ${e?"wu-opacity-0":""}`,style:{borderColor:r}}),a.jsx("div",{className:`${o} wu-origin-center ${e?"-wu-rotate-45 -wu-translate-y-[5px]":""}`,style:{borderColor:r}})]})});Sa.displayName="WuMenuIcon";const Gr={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%]"},Yr=Y.Root,Kr=Y.Trigger,Mn=Y.Portal,_n=Y.Close,Jr=f.forwardRef(({className:e,...t},r)=>a.jsx(Y.Overlay,{ref:r,className:c("wu-fixed wu-inset-0 wu-z-50 wu-bg-black/30",Gr.overlay,e),...t}));Jr.displayName=Y.Overlay.displayName;const Ea=f.forwardRef(({className:e,children:t,hideCloseButton:r,isStackedCard:s,...u},o)=>a.jsxs(Mn,{children:[a.jsx(Jr,{className:s?"wu-bg-transparent":""}),a.jsxs(Y.Content,{ref:o,className:c("wu-fixed wu-left-[50%] wu-top-[50%] wu-z-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",Gr.content,e),...u,children:[t,!r&&a.jsx(Y.Close,{"aria-label":"close",asChild:!0,children:a.jsxs(Qe,{variant:"iconOnly",className:c("wu-absolute wu-right-2 wu-top-1 hover:wu-bg-black hover:wu-bg-opacity-[0.04]","wuexp:wu-top-3 wuexp:wu-right-4 wuexp:wu-p-1.5","wuexp:group-data-[variant=action]:wu-text-blue-q","wuexp:group-data-[variant=upgrade]:wu-text-yellow-deep","wuexp:group-data-[variant=critical]:wu-text-red-deep"),children:[a.jsx("span",{className:"wu-text-lg wm-close wuexp:wu-text-xl wuexp:wu-leading-5"}),a.jsx("span",{className:"wu-sr-only",children:"Close"})]})})]})]}));Ea.displayName=Y.Content.displayName;const Ta=({className:e,...t})=>a.jsx("div",{className:c("wu-text-center wu-bg-gray-20 wu-w-full",e),...t});Ta.displayName="DialogHeader";const Xr=({className:e,...t})=>a.jsx("div",{className:c("wu-flex wu-flex-col-reverse sm:wu-flex-row sm:wu-justify-end sm:wu-space-x-2 wu-p-4",e),...t});Xr.displayName="DialogFooter";const Zr=f.forwardRef(({className:e,...t},r)=>a.jsx(Y.Title,{ref:r,className:c("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}));Zr.displayName=Y.Title.displayName;const An=f.forwardRef(({className:e,...t},r)=>a.jsx(Y.Description,{ref:r,className:c("wu-text-sm wu-text-muted-foreground",e),...t}));An.displayName=Y.Description.displayName;const Wn={gradientBackground:"_gradientBackground_1bbet_1"},Qr=e=>{const{colors:t,size:r=.55,children:s,className:u,strokeWidth:o,centerOffset:n={x:0,y:0},...i}=e,l=f.useRef(null);return f.useEffect(()=>{const w=l.current;if(w){w.style.setProperty("--width",`${w.offsetWidth*r}px`),w.style.setProperty("--height",`${w.offsetHeight*r}px`),w.style.setProperty("--colors",t.join(",")),w.style.setProperty("--stroke-width",`-${o||2}px`),w.style.setProperty("--spotlight-background","radial-gradient(100% var(--height) ellipse at 25% 70%, var(--colors))");let p;const b=x=>{p&&cancelAnimationFrame(p),p=requestAnimationFrame(()=>{const h=w.getBoundingClientRect();let m=x.clientX-h.left,C=x.clientY-h.top;m=Math.max(0,Math.min(m+n.x,h.width)),C=Math.max(0,Math.min(C+n.y,h.height));const E=`radial-gradient(
|
|
1
|
+
(function(N,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("react/jsx-runtime"),require("@radix-ui/react-accordion"),require("react"),require("clsx"),require("tailwind-merge"),require("@radix-ui/react-avatar"),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("@radix-ui/react-dialog"),require("@radix-ui/react-scroll-area"),require("@radix-ui/react-radio-group"),require("@radix-ui/react-separator"),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"),require("@radix-ui/react-switch"),require("react-transition-group"),require("@tiptap/react"),require("@tiptap/extension-subscript"),require("@tiptap/starter-kit"),require("@tiptap/extension-superscript"),require("@tiptap/extension-text-style"),require("@tiptap/extension-image"),require("@tiptap/extension-text-align"),require("@tiptap/extension-list"),require("@tiptap/extension-table")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@radix-ui/react-accordion","react","clsx","tailwind-merge","@radix-ui/react-avatar","@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","@radix-ui/react-dialog","@radix-ui/react-scroll-area","@radix-ui/react-radio-group","@radix-ui/react-separator","react-dom","@radix-ui/react-toggle-group","@radix-ui/react-toggle","@radix-ui/react-tabs","@tanstack/react-table","@radix-ui/react-toast","@radix-ui/react-switch","react-transition-group","@tiptap/react","@tiptap/extension-subscript","@tiptap/starter-kit","@tiptap/extension-superscript","@tiptap/extension-text-style","@tiptap/extension-image","@tiptap/extension-text-align","@tiptap/extension-list","@tiptap/extension-table"],a):(N=typeof globalThis<"u"?globalThis:N||self,a(N["wick-ui-lib"]={},N["react/jsx-runtime"],N.RadixUIAccordion,N.React,N.clsx,N.tailwindMerge,N.RadixUIAvatar,N.RadixUISlot,N.ClassVarianceAuthority,N.RadixUILabel,N.RadixUITooltip,N.dateFns,N.RadixUIPopover,N.ReactDayPicker,N.RadixUICheckbox,N.cmdk,N.ReactVirtuoso,N.RadixUIDropdownMenu,N.RadixUIDialog,N.RadixUIScrollArea,N.RadixUIRadioGroup,N.RadixUISeparator,N.ReactDOM,N.RadixUIToggleGroup,N.RadixUIToggle,N.RadixUITabs,N.TanstackReactTable,N.RadixUIToast,N.RadixUISwitch,N.ReactTransitionGroup,N.TipTapReact,N.TipTapExtensionSubscript,N.TipTapStarterKit,N.TipTapExtensionSuperscript,N.TipTapExtensionTextStyle,N.TipTapExtensionImage,N.TipTapExtensionTextAlign,N.TipTapExtensionList,N.TipTapExtensionTable))})(this,(function(N,a,Je,f,wn,dn,fn,Xe,Se,pn,na,H,it,wr,hn,pe,bn,dr,fr,gn,mn,xn,yn,vn,Nn,Cn,De,Sn,En,Mt,pr,kn,Tn,In,Ze,Dn,Mn,hr,_n){"use strict";var Rc=Object.defineProperty;var ew=(N,a,Je)=>a in N?Rc(N,a,{enumerable:!0,configurable:!0,writable:!0,value:Je}):N[a]=Je;var Dt=(N,a,Je)=>ew(N,typeof a!="symbol"?a+"":a,Je);function ue(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Ve=ue(Je),x=ue(f),Qe=ue(fn),br=ue(pn),ct=ue(na),wt=ue(it),ua=ue(hn),Q=ue(dr),G=ue(fr),ze=ue(gn),dt=ue(mn),gr=ue(xn),An=ue(yn),_t=ue(vn),mr=ue(Nn),He=ue(Cn),be=ue(Sn),la=ue(En),Ln=dn.extendTailwindMerge({prefix:"wu-"});function c(...e){return Ln(wn.clsx(e))}const ia=e=>{window.open(e,"_blank","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600")};function At(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}function ft(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 Wn=e=>e?/\S+@questionpro\.com/.test(e):!1,xr=Ve.Root,ca=x.forwardRef(({className:e,...t},r)=>a.jsx(Ve.Item,{ref:r,className:c("wu-border-b",e),...t}));ca.displayName="AccordionItem";const wa=x.forwardRef(({className:e,children:t,...r},s)=>a.jsx(Ve.Header,{className:"wu-flex",children:a.jsxs(Ve.Trigger,{ref:s,className:c("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),...r,children:[t,a.jsx("span",{className:"wu-arrow-icon wm-keyboard-arrow-down wu-transition-transform wu-duration-200"})]})}));wa.displayName=Ve.Trigger.displayName;const da=x.forwardRef(({className:e,children:t,...r},s)=>a.jsx(Ve.Content,{ref:s,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",...r,children:a.jsx("div",{className:c("wu-pb-4 wu-pt-0",e),children:t})}));da.displayName=Ve.Content.displayName;const Pn=e=>{const{items:t,className:r,dir:s="ltr"}=e;if(e.type==="multiple"){const{defaultValue:o=[],value:n,onValueChange:u}=e;return a.jsx(xr,{type:"multiple",className:"wu-w-full wu-accordion-container",defaultValue:o,value:n,onValueChange:u,dir:s,children:t.map(({value:i,Summary:l,Details:w,className:d})=>a.jsxs(ca,{value:i,dir:s,className:c(r,d),children:[a.jsx(wa,{dir:s,className:"wu-accordion-summary",children:l}),a.jsx(da,{dir:s,className:"wu-accordion-details",children:w})]},i))})}else{const{defaultValue:o,value:n,onValueChange:u}=e;return a.jsx(xr,{type:"single",className:"wu-w-full wu-accordion-container",defaultValue:o,value:n,onValueChange:u,dir:s,collapsible:!0,children:t.map(({value:i,Summary:l,Details:w,className:d})=>a.jsxs(ca,{value:i,dir:s,className:c(r,d),children:[a.jsx(wa,{dir:s,className:"wu-accordion-summary",children:l}),a.jsx(da,{dir:s,className:"wu-accordion-details",children:w})]},i))})}},yr=x.forwardRef(({className:e,...t},r)=>a.jsx(Qe.Root,{ref:r,className:c("wu-relative wu-flex wu-h-10 wu-w-10 wu-shrink-0 wu-overflow-hidden wu-rounded-full",e),...t}));yr.displayName=Qe.Root.displayName;const vr=x.forwardRef(({className:e,...t},r)=>a.jsx(Qe.Image,{ref:r,className:c("wu-aspect-square wu-h-full wu-w-full",e),...t}));vr.displayName=Qe.Image.displayName;const Nr=x.forwardRef(({className:e,...t},r)=>a.jsx(Qe.Fallback,{ref:r,className:c("wu-flex wu-h-full wu-w-full wu-items-center wu-justify-center wu-rounded-full wu-bg-muted",e),...t}));Nr.displayName=Qe.Fallback.displayName;function fa(e,t){f.useEffect(()=>{const r=s=>{Array.isArray(e)&&e.some(o=>!o.current||o.current.contains(s.target))||!Array.isArray(e)&&(!e.current||e.current.contains(s.target))||t(s)};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r)}},[e,t])}const pa={dropdownContainer:"_dropdownContainer_vvlo9_1",open:"_open_vvlo9_1",dropdownMenu:"_dropdownMenu_vvlo9_1"},Cr=({dir:e,Trigger:t,triggerClassName:r,DropdownContent:s})=>{const[o,n]=f.useState(!1),u=f.useRef(null),i=f.useRef(null);fa([u,i],()=>n(!1));const l=()=>{n(!o)};return a.jsx(a.Fragment,{children:a.jsx("div",{className:pa.dropdownContainer,children:a.jsx("ul",{children:a.jsxs("li",{className:c("wu-flex wu-relative",o&&pa.open),children:[a.jsx("button",{className:c("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",r),onClick:w=>{w.preventDefault(),l()},ref:i,"aria-label":"dropdown-trigger",children:t}),a.jsx("div",{className:c(pa.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:s})]})})})})},ha=Se.cva(["wu-inline-flex wu-items-center wu-justify-center wu-rounded-sm","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"],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:[]}),Re=x.forwardRef(({className:e,variant:t,size:r,color:s,asChild:o=!1,...n},u)=>{const i=o?Xe.Slot:"button";return a.jsx(i,{className:c(ha({size:r,color:s,variant:t,className:e})),ref:u,...n})});Re.displayName="Button";const et=f.forwardRef((e,t)=>Fn(e,t)),Fn=(e,t)=>{const{size:r="md",color:s="#1B87E6",variant:o="dots",...n}=e,u=c("wu-w-[4em] wu-h-[1em] wu-inline-block wu-text-xs wu-relative wu-loader-dot-container");let i="7px";r==="sm"?i="7px":r==="md"?i="12px":r==="lg"?i="18px":typeof r=="string"&&(i=r);const l={backgroundColor:s,width:i,height:i},w=a.jsxs("div",{...n,ref:t,className:c("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:i,height:i,borderTopColor:s}}),e.message&&a.jsx("p",{className:"wu-inline-block wu-loader-message",children:e.message})]}),d=a.jsxs("div",{...n,ref:t,className:c("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:u,style:{fontSize:i},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:o==="spinner"?w:d})};et.displayName="WuLoader";const de=f.forwardRef(({disabled:e,loading:t,variant:r="primary",size:s="md",Icon:o,iconPosition:n="left",children:u,floating:i,className:l,color:w="primary",selected:d,...p},h)=>{const b={primary:"#1986e688",upgrade:"#f5830088",error:"#ef444488"};return a.jsxs(Re,{...p,disabled:e,variant:r,size:s,className:c(i&&"wu-shadow-qp","wu-flex wu-items-center wu-justify-center wu-gap-2",n==="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",w==="error"&&"hover:wu-text-maroon",l),color:w,style:{backgroundColor:t?b[w]:"",...p.style},ref:h,children:[!t&&o&&a.jsx(a.Fragment,{children:o}),t&&a.jsx(et,{color:"#fff",size:"sm"}),!t&&u]})});de.displayName="WuButton";const On=({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(de,{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"})]}),Bn=({user:e,dir:t})=>{const r=[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:r.map(({title:s,url:o,icon:n,node:u},i)=>a.jsx("li",{className:i<r.length-1?"wu-border-b wu-border-gray-subtle":"",children:a.jsxs("a",{href:o,className:c("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:c(n,"wu-w-12 wu-text-center")}),a.jsx("span",{children:s})]}),u]})},i))}),a.jsx("hr",{className:"wu-border-gray-subtle"})]})},qn=({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:c("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(r=>a.jsx("li",{tabIndex:-1,dir:t,children:a.jsx("a",{href:r.url,className:c("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:r.title})},r.title))})]}),a.jsx("hr",{className:"wu-border-gray-subtle"})]}),Vn=({user:e,dir:t})=>{var r,s,o,n,u,i,l,w,d;return a.jsxs("section",{className:c("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:c("wu-flex wu-flex-col wu-gap-1",t==="rtl"&&"wu-text-right"),children:[a.jsx("p",{children:(r=e==null?void 0:e.profile)==null?void 0:r.title}),a.jsxs("a",{href:(s=e==null?void 0:e.license)==null?void 0:s.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:(o=e==null?void 0:e.profile)==null?void 0:o.subtitle}),a.jsx("p",{className:"wu-font-light",children:(n=e==null?void 0:e.profile)==null?void 0:n.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:(u=e==null?void 0:e.license)==null?void 0:u.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:(i=e==null?void 0:e.license)==null?void 0:i.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:(w=e==null?void 0:e.license)==null?void 0:w.expiryDatePostFixString}),a.jsx("p",{children:(d=e==null?void 0:e.license)==null?void 0:d.expiryDate})]})]})]})]})},Sr=({user:e,onLogout:t,dir:r,DataCenter:s})=>{var o,n;return e?a.jsx(Cr,{Trigger:a.jsxs(yr,{className:c("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(vr,{className:"hover:wu-opacity-80",src:(o=e==null?void 0:e.profile)==null?void 0:o.profilePicture,alt:"User"}),a.jsx(Nr,{children:(n=e==null?void 0:e.profile)==null?void 0:n.initials})]}),dir:r,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:c("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:r,children:[a.jsx(Vn,{user:e,dir:r}),(e==null?void 0:e.settings)&&e.settings.length>0&&a.jsx(qn,{settings:e.settings,dir:r}),a.jsx(Bn,{user:e,dir:r}),a.jsx(On,{onLogout:t,DataCenter:s})]})}):null},Er=({menuList:e,dir:t})=>{const r=[{icon:"wm-info",title:"Help Center",subTitle:"Knowledge Base",link:"https://www.questionpro.com/help/"},{icon:"wm-calendar-month",title:"Free Online 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-chat",title:"Live Chat",subTitle:"Support",link:"https://www.questionpro.com/a/liveperson.do?mode=launch&pageMode=quickChat",target:"window"}];return a.jsx(Cr,{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-gray-switcher wu-app-header-help",DropdownContent:a.jsx("ul",{children:(e||r).map((s,o)=>a.jsx("li",{className:"wu-p-0 wu-w-[191px] hover:wu-bg-[#ededed]",dir:t,children:s.target==="window"?a.jsx("a",{tabIndex:0,rel:"noopener noreferrer",onClick:()=>ia(s.link),onKeyDown:n=>{n.key==="Enter"&&ia(s.link)},className:"wu-block wu-w-full wu-h-full wu-px-4 wu-py-2 hover:wu-bg-gray-20 focus-visible:wu-border-none focus-visible:wu-bg-gray-20 focus-visible:wu-ring-0 focus-visible:wu-outline-none focus-visible:wu-ring-offset-0 wu-cursor-pointer",children:a.jsx(kr,{item:s,dir:t})}):a.jsx("a",{href:s.link,target:"_blank",className:"wu-block wu-w-full wu-h-full wu-px-4 wu-py-2 hover:wu-bg-gray-20 focus-visible:wu-border-none focus-visible:wu-bg-gray-20 focus-visible:wu-ring-0 focus-visible:wu-outline-none focus-visible:wu-ring-offset-0",rel:"noreferrer",children:a.jsx(kr,{item:s,dir:t})})},o))})})},kr=({item:e,dir:t})=>a.jsxs("div",{className:"wu-flex wu-items-start wu-gap-3",children:[a.jsx("span",{className:`${e.icon} wu-text-xl wu-text-gray-subtle`}),a.jsxs("div",{className:c("wu-flex wu-flex-col wu-gap-[2px]",t==="rtl"&&"wu-text-right"),children:[a.jsx("span",{className:"wu-text-xs wu-text-gray-subtle",children:e.subTitle}),a.jsx("p",{className:"wu-text-sm wu-text-blue-q",children:e.title})]})]}),zn=e=>{const[t,r]=f.useState(()=>window.innerWidth<=e);return f.useEffect(()=>{const s=()=>{r(window.innerWidth<=e)};return window.addEventListener("resize",s),()=>{window.removeEventListener("resize",s)}},[e]),t};function Hn({productCategories:e,openCategory:t,setOpenCategory:r}){const s=(i,l)=>{const w=l[i];if(w){w.focus();const d=e[i]||null;r(d)}},o=(i,l,w,d)=>{i.preventDefault();const p=w==="down"?l+1:l-1;s(p,d)},n=(i,l,w,d)=>{t!=null&&t.products&&t.products[t.products.length-1].name===d&&(i.preventDefault(),s(l+1,w))},u=(i,l)=>{i.preventDefault();const w=e[l]===t?null:e[l];r(w)};return function(l,w,d){const p=document.querySelectorAll("[data-product-category]"),{key:h}=l;switch(h){case"ArrowDown":o(l,w,"down",p);break;case"ArrowUp":o(l,w,"up",p);break;case"Tab":n(l,w,p,d);break;case"Enter":case" ":u(l,w);break}}}const $n=e=>{const{size:t="lg",className:r,children:s,...o}=e,n={sm:"wu-text-body-3",md:"wu-text-body-2",lg:"wu-text-body-1"},u=e.as||"div";return a.jsx(u,{...o,className:c(n[t],r),children:s})},Un=e=>{const{size:t="xl",className:r,children:s,...o}=e,n={sm:"h4",md:"h3",lg:"h2",xl:"h1"},u={sm:"wu-text-heading-4",md:"wu-text-heading-3",lg:"wu-text-heading-2",xl:"wu-text-heading-1"},i=n[t];return a.jsx(i,{...o,className:c(u[t],r),children:s})},jn=e=>{const{size:t="lg",className:r,children:s,...o}=e,n={sm:"wu-text-sub-3",md:"wu-text-sub-2",lg:"wu-text-sub-1"},u=e.as||"div";return a.jsx(u,{...o,className:c(n[t],r),children:s})},Gn=e=>{const{size:t="lg",className:r,children:s,...o}=e,n={md:"wu-text-display-2",lg:"wu-text-display-1"},u=e.as||"h1";return a.jsx(u,{...o,className:c(n[t],r),children:s})},we=e=>{const{icon:t,className:r,...s}=e;return a.jsx("span",{...s,className:c(t,r),role:"presentation","aria-label":t})},Yn=({buttonRef:e,handleDropdownToggle:t,handleKeyDown:r,isDropdownOpen:s,activeProductName:o,dir:n="ltr",homeLink:u="/"})=>a.jsxs("button",{ref:e,type:"button",className:c("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:i=>{s&&i.key==="ArrowDown"&&r(i,-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:u,children:a.jsx(we,{icon:"wc-logo",className:"wu-text-xl wu-leading-4 wu-relative wu-top-1"})}),o,a.jsx("span",{className:c("wm-arrow-drop-down wu-text-2xl wu-transition-transform wu-duration-300",s&&"wu-rotate-180",n==="rtl"?"wu-mr-auto":"wu-ml-auto")})]}),ee={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"},Kn=({category:e,dir:t="ltr",openCategory:r})=>{const s=e.active?"#c5cce0":"#f0c36a",o=(r==null?void 0:r.name)===e.name,n=c("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",o&&"wu-hidden","wu-relative wu-top-[5px]"),u=c("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",o&&"wu-hidden","wu-relative wu-top-1");return a.jsxs("div",{className:c("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:ee.productCategoryBorderTop,style:{backgroundColor:s}}),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:n}):a.jsx("span",{className:u})]})},Jn={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"},Xn=({product:e,currentProduct:t,activeProductName:r,dir:s,focusItem:o,setFocusItem:n})=>{const[u,i]=f.useState(e.name===t),l=e.name===r,w=e.name===t,d=!e.active,p="#1b3380",h="#c5cce0",b="#ffcf70",g=c("wu-font-normal wu-text-xs wu-text-gray-lead wu-text-center",w&&"wu-text-blue-q wu-font-normal",!e.active&&"wu-text-gray-subtle",u&&"wu-font-normal",e.active&&u&&"wu-text-blue-q"),m=c("wu-text-blue-p wu-text-base",w&&"wu-text-blue-q",!e.active&&"wu-text-gray-subtle",e.active&&u&&"wu-text-blue-q"),C=u||o===e.name||l?p:h;return a.jsxs("li",{className:c(ee.productListItem,"focus-visible:wu-outline-none focus:wu-outline-none wu-sub-product-list-item",(l||u)&&ee.activeProduct,e.name.length>15&&window.innerWidth>768&&"wu-w-[130px] wu-min-w-[130px]",o===e.name&&ee.activeProduct,"wu-product-item"),onMouseOver:()=>i(!0),onMouseOut:()=>i(!1),"aria-label":e.name,"aria-disabled":d,dir:s,onKeyDown:E=>{if(E.key==="Enter"){E.preventDefault();const y=E.currentTarget.querySelector("a");y&&y.click()}},onFocus:()=>{n(e.name)},onBlur:()=>n(""),children:[a.jsx("div",{className:c(ee.topBorder,s==="rtl"&&ee.topBorderRtl),style:{backgroundColor:d?b:C}}),a.jsxs("a",{className:c(ee.productLink,"focus:wu-outline-none focus-visible:wu-outline-none"),href:e.link||"#",tabIndex:0,children:[a.jsx("span",{className:c(m,Jn[e.icon||""]),"aria-hidden":!0}),a.jsx("span",{className:c(g),children:e.name})]})]},e.name)},Zn=({category:e,currentProduct:t,activeProductName:r,dir:s="ltr",focusItem:o,setFocusItem:n,borderColorLocked:u="#f5a300"})=>{const{products:i=[],active:l}=e,w=f.useMemo(()=>i.filter(g=>g.active).sort((g,m)=>(g.order||100)-(m.order||100)),[i]),d=f.useMemo(()=>i.filter(g=>!g.active),[i]),[p,h]=f.useState(u),b=g=>g.map((m,C)=>a.jsx(Xn,{product:m,currentProduct:t,activeProductName:r,dir:s,focusItem:o,setFocusItem:n},C));return l?a.jsxs(a.Fragment,{children:[b(w),d.length>0&&a.jsxs("li",{className:c(ee.productListItem,"focus:wu-outline-none focus-visible:wu-outline-none !wu-bg-[#f5f5f5] hover:!wu-bg-[#eeeeee] wu-group"),onMouseOver:()=>h("#f5a300"),onMouseOut:()=>h(u),"aria-label":"Upgrade to unlock",children:[a.jsx("div",{className:c(ee.topBorder,s==="rtl"&&ee.topBorderRtl),style:{backgroundColor:p},"aria-label":"top-border"}),a.jsxs("a",{href:"https://www.questionpro.com/a/showUpgradeUser.do",className:c(ee.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"]})]})]}),b(d)]}):a.jsxs("li",{className:c(ee.productListItem,ee.learnMore,"focus:wu-outline-none focus-visible:wu-outline-none wu-product-item-inactive !wu-bg-[#f5f5f5] hover:!wu-bg-[#eeeeee]",o==="learn"&&"activeProduct"),tabIndex:0,onFocus:()=>n("learn"),onBlur:()=>n(""),"aria-label":"Learn More",children:[a.jsx("div",{className:c(ee.topBorder,s==="rtl"&&ee.topBorderRtl),style:{backgroundColor:u}}),a.jsx("a",{className:ee.productLink,href:"https://www.questionpro.com/a/showUpgradeUser.do",tabIndex:-1,children:a.jsx("span",{className:"wu-text-[#f99e03]",children:"Learn More"})})]})},Tr=({dropdownRef:e,dir:t,isDropdownOpen:r,productCategories:s,openCategory:o,setOpenCategory:n,handleKeyDown:u,expandAll:i,activeProductName:l,focusItem:w,setFocusItem:d})=>{const p="#ffcf70",[h,b]=f.useState(window.innerWidth>768);return f.useEffect(()=>{const g=()=>{b(window.innerWidth>375)};return window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[]),a.jsx("ul",{className:c(ee.productDropdownMenu,r&&ee.productDropdownMenuOpen,t==="rtl"&&ee.rtlDropdownMenu,"wu-switcher-container"),ref:e,dir:t,"aria-label":"product-dropdown-menu","data-state":r?"open":"closed",children:s.map((g,m)=>a.jsxs("li",{className:c(ee.productCategory,"focus:wu-outline-none focus-visible:wu-outline-none wu-h-16 wu-category-item",o===g&&ee.open,i&&ee.open),onMouseEnter:()=>h&&n(g),onMouseLeave:()=>h&&n(null),"aria-label":g.name,dir:t,onKeyDown:C=>u(C,m),tabIndex:0,"data-product-category":!0,children:[a.jsx(Kn,{category:g,dir:t,openCategory:o}),a.jsx("ul",{className:c(ee.productList,t==="rtl"&&ee.rtlProductList),dir:t,children:a.jsx(Zn,{category:g,dir:t,activeProductName:l,currentProduct:g.name,focusItem:w,setFocusItem:d,borderColorLocked:p})})]},g.name))})},Qn=({isProductButtonShow:e,isDropdownOpen:t,activeProductColor:r,activeProductBgColor:s,activeProductName:o,dir:n,smallScreenButtonRef:u,handleDropdownToggle:i,handleKeyDown:l})=>a.jsx("div",{className:c("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?n==="rtl"?"wu-right-0 wu-overflow-hidden":"wu-translate-x-0 wu-left-0":n==="rtl"?"wu-right-0 wu-w-0":"wu--translate-x-full"),style:{backgroundColor:t?r.hover:s},children:a.jsxs("button",{ref:u,type:"button",className:c("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":n==="rtl"?"wu-hidden":"wu-flex"),onClick:i,onKeyDown:w=>{t&&w.key==="ArrowDown"&&l(w,-1)},"aria-label":"small-screen-product-btn",children:[o,a.jsx("span",{className:c("wm-arrow-drop-down wu-text-2xl wu-transition-transform wu-duration-300",t&&"wu-rotate-180")})]})}),Rn=({dir:e,isProductButtonShow:t,smallScreenToggleButtonRef:r,setIsProductButtonShow:s,setDropdownOpen:o})=>{const n=()=>{s(u=>!u),t&&o(!1)};return a.jsxs("button",{className:c("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:n,ref:r,"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"}`})]})},Ir=({productCategories:e,activeProductName:t,activeProductColor:r={base:"#1b87e6",hover:"#54A5EC"},dir:s,homeLink:o,expandAll:n})=>{const u=f.useRef(null),i=f.useRef(null),l=f.useRef(null),w=f.useRef(null),[d,p]=f.useState(!1),[h,b]=f.useState(null),[g,m]=f.useState(r.base),[C,E]=f.useState(""),[y,S]=f.useState(!1),v=zn(768);fa([i,u],()=>{p(!1),b(null)}),fa([l,w,i],()=>{S(!1),p(!1),b(null)}),f.useEffect(()=>{const k=M=>{M.key==="Escape"&&p(!1)};return document.addEventListener("keydown",k),()=>{document.removeEventListener("keydown",k)}},[d]),f.useEffect(()=>m(r.base),[r.base]);const T=k=>{k.preventDefault(),k.stopPropagation(),p(M=>{const A=!M;return A||b(null),A})},I=(k,M)=>{Hn({productCategories:e,openCategory:h,setOpenCategory:b})(k,M,C)};return a.jsx("div",{className:c("wu-inline-flex wu-items-center wu-justify-between wu-relative wu-z-auto wu-h-12 wu-text-white"),children:v?a.jsxs("div",{className:"wu-relative wu-flex",children:[a.jsx(Rn,{dir:s,isProductButtonShow:y,smallScreenToggleButtonRef:w,setDropdownOpen:p,setIsProductButtonShow:S}),a.jsx(Qn,{isProductButtonShow:y,isDropdownOpen:d,activeProductColor:r,activeProductBgColor:g,activeProductName:t,handleDropdownToggle:T,smallScreenButtonRef:l,handleKeyDown:I,dir:s}),a.jsx("div",{className:c("wu-absolute wu-top-[92px] wu-left-0 wu-text-[18px]",s==="rtl"&&"wu-right-[256px] wu-left-auto"),children:a.jsx(Tr,{activeProductName:t,focusItem:C,setFocusItem:E,handleKeyDown:I,isDropdownOpen:d,openCategory:h,productCategories:e,setOpenCategory:b,dropdownRef:i,expandAll:n,dir:s})})]}):a.jsxs("div",{className:"wu-relative wu-flex wu-items-center wu-justify-start wu-h-full wu-w-[256px]",dir:s,style:{backgroundColor:d?r.hover:g},onMouseOver:()=>m(r.hover),onMouseOut:()=>m(r.base),children:[a.jsx(Yn,{activeProductName:t,dir:s,homeLink:o,buttonRef:u,handleDropdownToggle:T,handleKeyDown:I,isDropdownOpen:d}),a.jsx(Tr,{activeProductName:t,focusItem:C,setFocusItem:E,handleKeyDown:I,isDropdownOpen:d,openCategory:h,productCategories:e,setOpenCategory:b,dropdownRef:i,expandAll:n,dir:s})]})})},Dr=({children:e,dir:t,className:r})=>a.jsx("section",{className:c("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",r),children:a.jsx("div",{className:"wu-grow",children:e})}),ba=x.forwardRef(({className:e,type:t,...r},s)=>a.jsx("input",{type:t,className:c("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:s,...r}));ba.displayName="Input";const eu=e=>{const{message:t,className:r,...s}=e;return a.jsx("p",{...s,className:c("wu-text-sub-3 wu-break-words wu-font-light",r),style:{color:"rgb(var(--wu-red-deep))",...s.style},children:t})},tu=e=>{var i,l;const{inputRef:t,maxLength:r=50,className:s,...o}=e,[n,u]=f.useState(!1);return f.useEffect(()=>{var w;(((w=t==null?void 0:t.current)==null?void 0:w.value.length)||0)>.75*r?u(!0):u(!1)},[(i=t==null?void 0:t.current)==null?void 0:i.value,r]),a.jsx("p",{...o,className:c("wu-text-sub-3 wu-font-light",s),style:{color:"rgb(var(--wu-gray-subtle))",...o.style},children:n&&`${(l=t==null?void 0:t.current)==null?void 0:l.value.length}/${r}`})},au=Se.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"),Lt=x.forwardRef(({className:e,...t},r)=>a.jsx(br.Root,{ref:r,className:c(au(),e),...t}));Lt.displayName=br.Root.displayName;const ge=e=>a.jsx(Lt,{...e,className:c("wu-text-gray-lead wu-leading-6",e.className)}),ru=({Label:e,Error:t,Hint:r,Input:s,labelPosition:o="top",dir:n="ltr",className:u,...i})=>{const w=c("wu-flex",o==="top"?"wu-flex-col wu-gap-1":"wu-flex-row wu-items-center wu-gap-2",u),d=c("wu-flex wu-flex-col wu-gap-1 wu-relative wu-flex-1 wu-form-group-wrapper"),p=c("wu-absolute -wu-bottom-5",n==="ltr"?"wu-right-0":"wu-left-0","wu-form-group-hint"),h=c("wu-absolute -wu-bottom-5",n==="ltr"?"wu-left-0":"wu-right-0","wu-form-group-error");return a.jsxs("div",{className:w,dir:n,...i,children:[e,a.jsxs("div",{className:d,children:[s,r&&a.jsx("div",{className:p,children:r}),t&&a.jsx("div",{className:h,children:t})]})]})},Me=f.forwardRef((e,t)=>{const{Label:r,labelPosition:s="top",Icon:o,iconPosition:n,type:u,value:i,variant:l="flat",readonly:w,id:d=At(),...p}=e,h=ft(s),b=o?n!=="right"?"wu-pl-8":"wu-pr-8":"",[g,m]=f.useState(!1),C=()=>{m(y=>!y)},E=y=>{p.onChange&&p.onChange(y)};return a.jsx(a.Fragment,{children:u==="submit"?a.jsx(de,{type:"submit",className:p.className,id:d,children:r||"Submit"}):a.jsx("div",{className:c("wu-flex wu-flex-col wu-gap-2 wu-input-container"),dir:p.dir,children:a.jsxs("div",{className:c("wu-flex wu-gap-1 wu-relative",h,(s==="right"||s==="left")&&"wu-items-center","wu-input-wrapper"),children:[o&&n!=="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:o}),a.jsx(ba,{...p,className:c("wu-peer wu-text-xs wu-rounded-t-sm",l==="outlined"?"wu-border wu-border-gray-subtle":"",b,p.className),type:g?"text":u,ref:t,readOnly:w,onChange:p.onChange&&E,value:i,id:d}),o&&n==="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:o}),u==="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:C,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:g?a.jsx("span",{className:"wm-visibility wu-text-gray-subtle"}):a.jsx("span",{className:"wm-visibility-off wu-text-gray-subtle"})})}),r&&a.jsx(ge,{htmlFor:d,className:"wu-flex-none wu-w-fit wu-input-label",children:r})]})})})});Me.displayName="WuInput";const su=({className:e,placeholder:t="Search surveys, folders or tools",defaultCollapsed:r=!0,onSearch:s,...o})=>{const[n,u]=f.useState(r);return f.useEffect(()=>{u(r)},[r]),a.jsx(Me,{...o,placeholder:t,onChange:i=>s(i.target.value),className:c("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",n?"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(we,{"data-testid":"search-icon",icon:"wm-search",className:c("wu-text-gray-lead wu-cursor-pointer",n&&"wu-text-white"),onClick:()=>u(i=>!i)})})},Mr=ct.Provider,_r=ct.Root,Ar=ct.Trigger,ga=x.forwardRef(({className:e,sideOffset:t=4,...r},s)=>a.jsx(ct.Content,{ref:s,sideOffset:t,className:c("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),...r}));ga.displayName=ct.Content.displayName;const Wt=f.forwardRef(({content:e,position:t,positionOffset:r,duration:s,children:o,className:n,showArrow:u=!1,open:i,onOpenChange:l,...w},d)=>a.jsx(Mr,{delayDuration:s||200,children:a.jsxs(_r,{open:i,onOpenChange:l,children:[a.jsx(Ar,{asChild:!0,children:a.jsx("span",{ref:d,children:o})}),a.jsx(na.Portal,{children:e&&a.jsxs(ga,{...w,side:t||"top",sideOffset:r||0,className:c("wu-max-w-sm wu-max-h-96 wu-overflow-y-auto",n),children:[e,u&&a.jsx(na.Arrow,{className:"wu-fill-gray-notification wu-tooltip-arrow"})]})})]})}));Wt.displayName="WuTooltip";const ou=({label:e,className:t})=>{const r=f.useRef(null),[s,o]=f.useState(!1);return f.useEffect(()=>{const n=r.current;if(n){const u=n.clientWidth,i=n.scrollWidth,l=i/e.length,w=e.length*l;o(w>u||i>u)}},[e]),a.jsx("p",{ref:r,className:c("wu-w-full wu-truncate",t),children:s?a.jsx(Wt,{content:e,positionOffset:8,children:e}):e})},nu=e=>{var p;const{productName:t,categories:r=[],user:s,children:o,onLogout:n,homeLink:u=window.location.origin,brandColor:i,dir:l="ltr",expandAll:w,DataCenter:d}=e;return a.jsx("div",{className:"wu-sticky wu-top-0 wu-z-50 wu-w-full",children:a.jsxs("header",{className:c("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:[Wn((p=s==null?void 0:s.profile)==null?void 0:p.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(Ir,{productCategories:r,activeProductName:t,activeProductColor:i,dir:l,homeLink:u,expandAll:w})}),a.jsx(Dr,{dir:l,children:o}),a.jsxs("section",{className:c("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(Er,{dir:l}),(s==null?void 0:s.profile)&&Object.keys(s.profile).length>0&&a.jsx(Sr,{user:s,onLogout:n,dir:l,DataCenter:d})]})]})})},Ee=wt.Root,Oe=wt.Trigger,ye=x.forwardRef(({className:e,align:t="center",sideOffset:r=4,...s},o)=>a.jsx(wt.Portal,{children:a.jsx(wt.Content,{ref:o,align:t,sideOffset:r,className:c("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),...s})}));ye.displayName=wt.Content.displayName;function Lr({className:e,classNames:t,dir:r="ltr",...s}){const o=wr.getDefaultClassNames();return a.jsx(wr.DayPicker,{showOutsideDays:s.showOutsideDays||!1,className:c("wu-p-3",e),classNames:{root:c(o.root,"wu-relative wu-rounded-none wu-bg-white dark:wu-bg-gray-switcher"),caption_label:c("wu-text-xs",s.captionLayout==="dropdown"?"wu-hidden":""),month_caption:c(o.month_caption,"wu-mb-5"),months:c(o.months,"wu-flex wu-flex-col sm:wu-flex-row wu-gap-4"),dropdowns:c(o.dropdowns,"wu-flex wu-items-center wu-justify-start wu-gap-2",(s.mode==="range","")),dropdown:c(o.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:c(o.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:c(o.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:c(o.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:c(o.selected,"wu-bg-blue-p [&:not(.rm)]:wu-text-white hover:wu-bg-blue-pHover"),range_middle:c("rm",o.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:c(o.range_end,"wu-rounded-none"),range_start:c(o.range_start,"wu-rounded-none wu-bg-blue-p hover:wu-bg-blue-pHover"),month_grid:c(o.month_grid,"[&>thead>tr>th]:wu-pb-2 wu-border-collapse wu-space-y-1"),button_next:c(o.button_next,ha({variant:"iconOnly"}),"wu-h-6 wu-w-6 wu-text-gray-lead"),button_previous:c(o.button_previous,ha({variant:"iconOnly"}),"wu-h-6 wu-w-6 wu-rotate-180 wu-text-gray-lead"),nav:c(o.nav,"wu-absolute wu-top-4 wu-right-3 wu-flex",r==="rtl"&&"wu-right-auto wu-left-3 wu-flex-row-reverse"),chevron:c(o.chevron,"!wu-text-red-500"),outside:c(o.outside,"wu-invisible"),disabled:c(o.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"})},...s})}Lr.displayName="Calendar";const ma=e=>a.jsx(Lr,{...e}),Wr=e=>{const{handleDateChange:t,disabled:r,onReset:s,showResetButton:o}=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:[o&&a.jsx(de,{variant:"secondary",onClick:s,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(it.PopoverClose,{asChild:!0,children:a.jsx(de,{onClick:t,disabled:r,className:"wu-date-picker-apply",children:"Apply"})})]})},xa=({formattedString:e,dir:t,placeholder:r="Select Date",className:s,variant:o="primary",color:n,CustomTrigger:u,...i})=>a.jsx(it.PopoverTrigger,{asChild:!u,dir:t,children:u?a.jsx(a.Fragment,{children:u(e)}):a.jsx(de,{...i,className:c("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",o==="outlined"&&"wu-border wu-border-subtle wu-bg-transparent",s),Icon:a.jsx("span",{className:"wm-calendar-month wu-text-sm"}),iconPosition:"right",children:e||r})}),Pr=(e,t,r,s)=>{const o=H.startOfDay(e).getTime();return!!(t||r&&o<H.startOfDay(r).getTime()||s&&o>H.startOfDay(s).getTime())},Pt=e=>e?typeof e=="string"?new Date(e):e:new Date,ya="\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])",uu=[{label:"Last 7 days",value:7},{label:"Last 30 days",value:30},{label:"Last 90 days",value:90},{label:"Last 365 days",value:365}],lu=({formatString:e="yyyy-MM-dd",value:t,onChange:r,disabled:s,minDate:o=H.sub(new Date,{years:5}),maxDate:n=H.add(new Date,{years:1}),dir:u="ltr",Label:i,labelPosition:l="top",onReset:w,showResetButton:d=!1,placeholder:p="Select Date",CustomTrigger:h,...b})=>{const[g,m]=f.useState(),[C,E]=f.useState(""),y=f.useCallback(()=>{const v=Pt(g);E(H.format(v,e)),r&&r(g)},[g,e,r]),S=f.useCallback(()=>{w?w():(m(void 0),E(""),r&&r(void 0))},[r,w]);return f.useEffect(()=>{const v=Pt(t);m(v),E(H.format(v,e))},[t,e]),a.jsxs(ge,{className:c("wu-flex wu-gap-1",l==="left"?"wu-items-center":"wu-flex-col wu-items-start","wu-date-picker-label"),dir:u,children:[i,a.jsxs(Ee,{children:[a.jsx(xa,{formattedString:C,dir:u,placeholder:p,CustomTrigger:h,...b}),a.jsx(ye,{className:"wu-p-0 wu-w-fit wu-date-picker-content",align:"start",sideOffset:-.5,dir:u,children:a.jsx(ma,{dir:u,mode:"single",captionLayout:"dropdown",selected:g,onSelect:m,disabled:v=>Pr(v,s,o,n),startMonth:o,endMonth:n,required:!0,autoFocus:!0,defaultMonth:g,className:c("wu-border wu-border-blue-p wu-date-picker"),footer:a.jsx(Wr,{handleDateChange:y,disabled:s,onReset:S,showResetButton:d})})})]})]})},Fr="yyyy-MM-dd",iu=[{label:"Day",value:1},{label:"Week",value:7},{label:"Month",value:30},{label:"Quarter",value:90},{label:"Year",value:365}],cu=({current:e,onSelect:t,presetRanges:r=uu})=>{const[s,o]=f.useState(),[n,u]=f.useState(!1),[i,l]=f.useState(""),[w,d]=f.useState(""),[p,h]=f.useState(!1),b=f.useMemo(()=>r.map(y=>y.value),[r]),g=c("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"),m=f.useCallback(y=>{if(y===void 0){o(void 0),u(!0);return}const S=Number(y)-1;o(S),u(!1),t({from:H.sub(new Date,{days:S}),to:new Date})},[t]),C=f.useCallback((y,S)=>{if(!y||!(e!=null&&e.to)||!(e!=null&&e.from)||!new RegExp(ya).test(y))return!1;const T=new Date(S==="start"?y:e.from),I=new Date(S==="end"?y:e.to);return H.isBefore(I,T)?(h(!0),!1):(h(!1),!(H.isSameDay(T,e.from)&&H.isSameDay(I,e.to)))},[e]),E=f.useCallback((y,S)=>{if((S==="start"?l:d)(y),C(y,S)){const T={from:e==null?void 0:e.from,to:e==null?void 0:e.to};S==="start"&&(T.from=new Date(y)),S==="end"&&(T.to=new Date(y)),t(T)}},[e,t,C]);return f.useEffect(()=>{if(e!=null&&e.to&&(e!=null&&e.from)&&H.isValid(e.to)&&H.isValid(e.from)){l(H.format(e.from,Fr)),d(H.format(e.to,Fr));const y=H.differenceInCalendarDays(e.to,e.from);H.isToday(e.to)&&b.includes(y+1)?(o(y),u(!1)):(o(void 0),u(!0))}},[e,b]),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:iu.map(({label:y,value:S})=>a.jsx(Re,{variant:"secondary",className:"wu-px-1 wu-py-1 wu-text-xs wu-h-fit wu-min-w-fit disabled:wu-bg-white",disabled:S!==1,children:y},S))}),a.jsxs("ul",{className:"wu-flex wu-flex-col wu-gap-1 wu-date-picker-ranges",children:[r.map(({label:y,value:S})=>a.jsx("li",{children:a.jsx("button",{className:c(g,s===S-1&&"wu-bg-blue-p/10"),onClick:()=>m(S),children:y})},S)),a.jsx("li",{children:a.jsx("button",{className:c(g,n&&"wu-bg-blue-p/10"),onClick:()=>m(),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(Me,{placeholder:"Start Date",pattern:ya,value:i,onChange:y=>E(y.target.value,"start"),"aria-label":"Start Date"}),a.jsx(Me,{placeholder:"End Date",pattern:ya,value:w,onChange:y=>E(y.target.value,"end"),"aria-label":"End Date"}),p?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"})]})]})},wu=({formatString:e="yyyy/MM/dd",value:t,onChange:r,disabled:s,minDate:o=H.sub(new Date,{years:5}),maxDate:n=H.add(new Date,{years:1}),dir:u="ltr",minDateToSelect:i,maxDateToSelect:l,presetRanges:w,Label:d,labelPosition:p="top",onReset:h,showResetButton:b=!0,placeholder:g="Select Date Range",CustomTrigger:m,...C})=>{const[E,y]=f.useState(t),[S,v]=f.useState(t),[T,I]=f.useState(""),k=f.useCallback(()=>{if(S){const O=S.from,_=S.to;y({from:O,to:_}),I(`${H.format(O,e)} - ${H.format(_,e)}`),r&&r({from:O,to:_})}},[S,e,r]),M=f.useCallback(()=>{v(E)},[E]),A=f.useCallback(()=>{h?h():(y(void 0),v(void 0),I(""),r&&r(void 0))},[h,r]);return f.useEffect(()=>{if(t!=null&&t.from&&(t!=null&&t.to)){const O=Pt(t.from),_=Pt(t.to);y(t),v(t),I(`${H.format(O,e)} - ${H.format(_,e)}`)}else y(void 0),v({to:new Date,from:new Date})},[t,e]),a.jsxs(ge,{className:c("wu-flex wu-gap-1",p==="left"?"wu-items-center":"wu-flex-col wu-items-start","wu-date-picker-label"),dir:u,children:[d,a.jsxs(Ee,{onOpenChange:O=>!O&&M(),children:[a.jsx(xa,{formattedString:T,dir:u,placeholder:g,CustomTrigger:m,...C}),a.jsxs(ye,{className:"wu-flex wu-p-0 wu-border wu-w-fit wu-border-blue-p",align:"start",sideOffset:-.5,dir:u,children:[a.jsx(cu,{current:S,onSelect:v,presetRanges:w}),a.jsx(ma,{dir:u,numberOfMonths:2,mode:"range",captionLayout:"dropdown",selected:S,onSelect:v,disabled:O=>Pr(O,s,o,n),startMonth:o,endMonth:n,required:!0,autoFocus:!0,defaultMonth:E==null?void 0:E.from,className:c("wu-shadow-none wu-date-range-picker"),min:i,max:l,footer:a.jsx(Wr,{handleDateChange:k,disabled:s,onReset:A,showResetButton:b})})]})]})]})},Or=f.forwardRef((e,t)=>{const{className:r,rounded:s,...o}=e;return a.jsx("div",{className:c("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",s?"wu-rounded-lg":"wu-rounded-sm",r),ref:t,...o})});Or.displayName="WuCard";const du=f.forwardRef((e,t)=>{const{className:r,...s}=e;return a.jsx("div",{ref:t,...s,className:c("wu-p-2 wu-mb-2 wu-border-b wu-border-gray-40 min-h-12 wu-card-header",r)})});du.displayName="WuCardHeader";const fu=f.forwardRef((e,t)=>{const{className:r,...s}=e;return a.jsx("div",{ref:t,...s,className:c("wu-p-2 wu-mt-2 wu-border-t wu-border-gray-40 min-h-12 wu-card-footer",r)})});fu.displayName="WuCardHeader";const Br=x.forwardRef(({className:e,partial:t,...r},s)=>a.jsx(ua.Root,{ref:s,className:c("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),...r,children:a.jsxs(ua.Indicator,{className:c("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"})]})}));Br.displayName=ua.Root.displayName;const ke=f.forwardRef((e,t)=>{const{disabled:r,checked:s,Label:o,labelPosition:n="right",className:u,id:i=At(),partial:l,onChange:w,required:d,readonly:p,...h}=e;return f.useEffect(()=>{h.defaultChecked!==void 0&&s!==void 0&&console.error("WuCheckbox: Both `checked` and `defaultChecked` cannot be used together. Use only one of them.")},[h.defaultChecked,s]),a.jsxs("div",{className:pu({labelPosition:n,className:"wu-checkbox-container"}),dir:h.dir,children:[a.jsx(Br,{id:i,...h,partial:l,checked:s,disabled:r||p,onCheckedChange:w,className:c("wu-peer wu-checkbox",u),required:d,ref:t}),o&&a.jsx(ge,{htmlFor:i,className:"wu-w-full wu-checkbox-label",children:o})]})}),pu=Se.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"}}});ke.displayName="WuCheckbox";const hu=e=>{const{className:t,children:r,...s}=e;return a.jsx("span",{...s,className:c("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:r})},va=x.forwardRef(({className:e,...t},r)=>a.jsx(pe.Command,{ref:r,className:c("wu-flex wu-h-full wu-w-full wu-flex-col wu-overflow-hidden wu-rounded-md",e),...t}));va.displayName=pe.Command.displayName;const qr=x.forwardRef(({className:e,...t},r)=>a.jsx("div",{className:"wu-flex wu-items-center wu-border-b wu-px-3",children:a.jsx(pe.Command.Input,{ref:r,className:c("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})}));qr.displayName=pe.Command.Input.displayName;const Na=x.forwardRef(({className:e,...t},r)=>a.jsx(pe.Command.List,{ref:r,className:c("",e),...t}));Na.displayName=pe.Command.List.displayName;const Ca=x.forwardRef((e,t)=>a.jsx(pe.Command.Empty,{ref:t,className:"wu-text-center wu-p-2 wu-pb-2.5 wu-text-xs",...e}));Ca.displayName=pe.Command.Empty.displayName;const pt=x.forwardRef(({className:e,...t},r)=>a.jsx(pe.Command.Group,{ref:r,className:c("",e),...t}));pt.displayName=pe.Command.Group.displayName;const Vr=x.forwardRef(({className:e,...t},r)=>a.jsx(pe.Command.Separator,{ref:r,className:c("wu-mx-1 wu-my-1 wu-h-px wu-bg-gray-20",e),...t}));Vr.displayName=pe.Command.Separator.displayName;const ht=x.forwardRef(({className:e,...t},r)=>a.jsx(pe.Command.Item,{ref:r,className:c("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}));ht.displayName=pe.Command.Item.displayName;const tt=f.forwardRef(({containerHeight:e=400,list:t,callback:r,dir:s,className:o,style:n},u)=>a.jsx(bn.Virtuoso,{ref:u,dir:s,className:o,style:{height:e,scrollbarWidth:"thin",scrollbarColor:"#d4d4d4 #f1f1f1",overflowX:"hidden",...n},data:t,itemContent:(i,l)=>r(i,l)}));tt.displayName="WuVirtualScroll";const bu=({tags:e,triggerRef:t})=>{const[r,s]=f.useState([]),[o,n]=f.useState([]),u=f.useMemo(()=>a.jsx("ul",{className:"wu-flex wu-flex-col wu-items-start wu-justify-center wu-list-none",children:o.map((l,w)=>a.jsx("li",{className:"wu-py-1 wu-text-xs wu-text-left",children:l},w))}),[o]),i=l=>{const w=document.createElement("div");Object.assign(w.style,{display:"inline-block",visibility:"hidden",position:"absolute",whiteSpace:"nowrap"}),w.textContent=l,document.body.appendChild(w);const d=w.offsetWidth;return document.body.removeChild(w),d+8};return f.useEffect(()=>{const l=()=>{if(t.current){const h=t.current.offsetWidth-20-36;let b=0;const g=[],m=[];e.forEach(C=>{const E=i(C);b+E+8<h?(g.push(C),b+=E+8):m.push(C)}),s(g),n(m)}};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:[r.map((l,w)=>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},w)),o.length>0&&a.jsx(Wt,{content:u,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:["+",o.length]})})]})},gu=({placeholder:e="Select...",isEllipse:t=!1,selectedOptions:r,variant:s="flat",dir:o="ltr",accessorKey:n,multiple:u,id:i,disabled:l,selectAll:w,isCheckedAll:d,className:p,...h})=>{const[b,g]=f.useState([]),m=f.useRef(null);f.useEffect(()=>{if(!r||Array.isArray(r)&&r.length===0){g([]);return}if(u){const E=r;g(E==null?void 0:E.map(y=>y[n.label]));return}else g([r[n.label]])},[r]);const C=()=>{var E;return b.length?d&&(w!=null&&w.enable)&&(w!=null&&w.triggerText)?a.jsx("span",{className:"wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap",children:w.triggerText}):t?a.jsx("span",{className:"wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap",style:{width:`${(((E=m.current)==null?void 0:E.offsetWidth)||0)-32}px`},children:b.join(", ")}):a.jsx(bu,{tags:b,triggerRef:m}):a.jsx("p",{className:"wu-text-xs wu-opacity-70",children:e})};return a.jsx(Oe,{dir:o,asChild:!0,id:i,disabled:l,children:a.jsxs("button",{...h,ref:m,disabled:l,className:c("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",s==="outlined"&&"wu-border wu-border-gray-subtle","disabled:wu-cursor-not-allowed disabled:hover:wu-border-gray-subtle disabled:wu-bg-gray-10",p),children:[C(),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"})]})})},Sa=Q.Root,Ea=Q.Trigger,zr=Q.Group,mu=Q.Portal,xu=Q.Sub,yu=Q.RadioGroup,Hr=x.forwardRef(({className:e,inset:t,children:r,position:s,...o},n)=>a.jsxs(Q.SubTrigger,{ref:n,className:c("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),...o,children:[s==="left"&&a.jsx("span",{className:c("wm-chevron-right",o.dir==="rtl"&&"ml-2")}),r,s!=="left"&&a.jsx("span",{className:c("wu-text-base wu-leading-4",o.dir==="rtl"&&"wu-mr-auto wm-chevron-left",o.dir!=="rtl"&&"wu-ml-auto wm-chevron-right")})]}));Hr.displayName=Q.SubTrigger.displayName;const $r=x.forwardRef(({className:e,...t},r)=>a.jsx(Q.SubContent,{ref:r,className:c("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}));$r.displayName=Q.SubContent.displayName;const Ft=x.forwardRef(({className:e,sideOffset:t=4,...r},s)=>a.jsx(Q.Portal,{children:a.jsx(Q.Content,{ref:s,sideOffset:t,className:c("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),...r})}));Ft.displayName=Q.Content.displayName;const Ot=x.forwardRef(({className:e,inset:t,...r},s)=>a.jsx(Q.Item,{ref:s,className:c("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),...r}));Ot.displayName=Q.Item.displayName;const Ur=x.forwardRef(({className:e,children:t,checked:r,dir:s,...o},n)=>a.jsxs(Q.CheckboxItem,{ref:n,className:c("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",s==="rtl"&&"wu-pr-8 wu-pl-2",s!=="rtl"&&"wu-pl-8 wu-pr-2",e),checked:r,...o,children:[a.jsx("span",{className:c("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",s==="rtl"&&"wu-right-2",s!=="rtl"&&"wu-left-2"),children:a.jsx(Q.ItemIndicator,{children:a.jsx("span",{className:"wm-check wu-text-base wu-text-white"})})}),t]}));Ur.displayName=Q.CheckboxItem.displayName;const jr=x.forwardRef(({className:e,children:t,...r},s)=>a.jsxs(Q.RadioItem,{ref:s,className:c("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),...r,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(Q.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]}));jr.displayName=Q.RadioItem.displayName;const bt=x.forwardRef(({className:e,inset:t,...r},s)=>a.jsx(Q.Label,{ref:s,className:c("wu-p-2 wu-font-medium wu-text-xs",t&&"wu-pl-8",e),...r}));bt.displayName=Q.Label.displayName;const Bt=x.forwardRef(({className:e,...t},r)=>a.jsx(Q.Separator,{ref:r,className:c("-wu-mx-1 wu-my-1 wu-h-px wu-bg-gray-20",e),...t}));Bt.displayName=Q.Separator.displayName;const Gr=({option:e,value:t,multiple:r=!1,onSelect:s,accessorKey:o,dir:n})=>{const[u,i]=f.useState(r?[]:"");f.useEffect(()=>{t&&i(r?t.map(p=>JSON.stringify(p[o.value])):JSON.stringify(t[o.value]))},[t,o.value,r]);const l=r?u.includes(JSON.stringify(e[o.value])):u===JSON.stringify(e[o.value]),w=()=>{e.disabled||s(e)};return a.jsxs(ht,{onSelect:w,disabled:e.disabled,className:c("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:n,children:[r&&a.jsx(ke,{checked:l}),a.jsx(vu,{option:e,accessorKey:o})]})},vu=({option:e,accessorKey:t})=>{const r=e[t.label];return a.jsxs("div",{className:"wu-flex wu-items-center wu-w-full wu-gap-1",children:[e.icon&&e.icon,r,e.isAdmin&&a.jsx("span",{className:"wu-ml-auto wu-text-sm wm-lock wu-text-orange-deep"})]})},Yr=e=>{const{option:t,selectAll:r,handleSelectAll:s,isCheckedAll:o,isPartialSelected:n,...u}=e;switch("type"in t?t.type:"option"){case"all":return a.jsxs(ht,{onSelect:s,className:c("wu-cursor-pointer wu-text-xs wu-leading-4 wu-py-2 wu-combobox-item"),dir:u.dir,children:[a.jsx(ke,{checked:o||n,partial:n,"data-partial":n,"aria-label":(r==null?void 0:r.label)||"Select All"}),a.jsx("span",{"aria-hidden":!0,children:(r==null?void 0:r.label)||"Select All"})]});case"group":return a.jsxs(pt,{children:[a.jsx(bt,{children:t.label}),t.options.map((l,w)=>f.createElement(Gr,{...u,option:l,key:w}))]});case"divider":return a.jsx(Vr,{className:"wu-mx-4"});default:return a.jsx(Gr,{...u,option:t})}},Nu=e=>{const t=[],r=[],s=[],o=[];return e.forEach(n=>{n.type==="group"?(t.push(n),s.push(...n.options),o.push(...n.options.filter(u=>!u.disabled))):n.type==="divider"?r.push(n):s.push(n),n!=null&&n.disabled||o.push(n)}),{groups:t,dividers:r,allOptions:s,enabledOptions:o}},Cu=f.memo(Me),Su=({data:e,accessorKey:t,value:r,defaultValue:s,Header:o,virtualizedThreshold:n=100,isEllipse:u,placeholder:i,variant:l,dir:w,onSelect:d,Label:p,maxHeight:h=420,multiple:b=!1,hasGroup:g=!1,selectAll:m,id:C,disabled:E,labelPosition:y="top",className:S,onScroll:v,maxContentWidth:T,enableSearch:I=!0,noDataContent:k,...M})=>{const[A,O]=f.useState(""),[_,P]=f.useState(),[L,F]=f.useState(!1),[B,W]=f.useState(!1),[U,Y]=f.useState(!1),q=f.useRef(null),{allOptions:V,enabledOptions:ie}=f.useMemo(()=>g||m&&!m.includeDisabled?Nu(e):{allOptions:e,groups:[],dividers:[],enabledOptions:[]},[e,g]),K=f.useMemo(()=>{if(!A)return e;const $=A.toLowerCase();return V.filter(D=>D[t.label].toLowerCase().includes($))},[A,V,e,t.label]),z=f.useMemo(()=>b&&m!=null&&m.enable&&!A&&K.length>0?[{type:"all"},...K]:K,[K,A,b]),se=f.useCallback($=>{const D=$[t.value];b?P(J=>{const ne=J||[],ce=ne.some(R=>R[t.value]===D)?ne.filter(R=>R[t.value]!==D):[...ne,$];return d==null||d(ce),ce}):(F(!1),P($),d==null||d($))},[b,t.value,d]),te=f.useCallback($=>O($.target.value),[]),ae=f.useCallback(()=>O(""),[]);f.useEffect(()=>{if(r!==void 0&&s!==void 0){console.error("defaultValue and value cannot be used simultaneously");return}else r!==void 0?P(r):s!==void 0&&P(s)},[r,s]),f.useEffect(()=>{if(!b)return;const $=m!=null&&m.includeDisabled?(_==null?void 0:_.length)===V.length:(_==null?void 0:_.length)===ie.length;W($);const D=(_==null?void 0:_.length)>0&&!$;Y(D)},[_,m]);const Te=f.useCallback(()=>{const $=B?[]:m!=null&&m.includeDisabled?V:ie;P($),d==null||d($)},[B,b,V,ie,d,m]),je=ft(y);return a.jsxs("div",{className:c(je,"wu-flex wu-combobox-container"),ref:q,children:[a.jsxs(Ee,{onOpenChange:$=>{$&&ae(),F($)},open:L,modal:!0,children:[a.jsx(gu,{selectedOptions:_,accessorKey:t,isEllipse:u,placeholder:i,variant:l,dir:w,multiple:b,disabled:E,selectAll:m,isCheckedAll:B,className:S,id:C,...M}),a.jsx(ye,{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:T},children:a.jsxs(va,{id:C,children:[I&&a.jsx("div",{className:"wu-m-2",children:a.jsx(Cu,{placeholder:"Search...",Icon:a.jsx("span",{className:"wm-search"}),className:"wu-text-xs wu-combobox-search",onChange:te,name:"Search","aria-label":"Search",dir:w,iconPosition:w==="rtl"?"right":"left"})}),o,a.jsxs(Na,{children:[a.jsx(Ca,{children:k||"No results found."}),z.length>=n?a.jsx(tt,{className:"wu-combobox-list",containerHeight:h,list:z,callback:($,D)=>a.jsx(Yr,{option:D,value:_,onSelect:se,multiple:b,accessorKey:t,dir:w,selectAll:m,handleSelectAll:Te,isCheckedAll:B,isPartialSelected:U},$),dir:w}):a.jsx("div",{style:{height:"fit-content",maxHeight:h,overflow:"auto"},className:"wu-combobox-list",onScroll:v,children:z.map(($,D)=>a.jsx(Yr,{option:$,value:_,onSelect:se,multiple:b,accessorKey:t,dir:w,selectAll:m,handleSelectAll:Te,isCheckedAll:B,isPartialSelected:U},D))})]})]})})]}),p&&a.jsx(ge,{htmlFor:C,className:"wu-combobox-label",children:p})]})},Eu=e=>{const{textToCopy:t,notificationText:r,...s}=e,[o,n]=f.useState(!1),u=async()=>{if(t)try{await navigator.clipboard.writeText(t),n(!0),setTimeout(()=>n(!1),2e3)}catch(i){console.error("Failed to copy:",i)}};return a.jsxs(de,{...s,onClick:u,variant:"iconOnly",className:c("wu-relative",e.className),"aria-label":"Copy to clipboard",children:[r&&a.jsx("span",{className:c("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",o?"wu-block":"wu-hidden"),children:r}),a.jsx(we,{icon:"wm-content-copy",className:"wu-text-lg"})]})},Kr=G.Root,ku=G.Trigger,Tu=G.Close,Iu=G.Portal,Jr=x.forwardRef(({className:e,...t},r)=>a.jsx(G.Overlay,{className:c("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:r}));Jr.displayName=G.Overlay.displayName;const Du=Se.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"}}),ka=x.forwardRef(({side:e="right",className:t,children:r,hideCloseButton:s,overlayClassName:o,closeButtonClassName:n,...u},i)=>a.jsxs(Iu,{children:[a.jsx(Jr,{className:o}),a.jsxs(G.Content,{ref:i,className:c(Du({side:e}),t),...u,children:[r,!s&&a.jsx(G.Close,{"aria-label":"close",asChild:!0,children:a.jsxs(Re,{variant:"iconOnly",className:c("wu-absolute wu-right-4 wu-top-4",n),children:[a.jsx("span",{className:"wm-close"}),a.jsx("span",{className:"wu-sr-only",children:"Close"})]})})]})]}));ka.displayName=G.Content.displayName;const Xr=x.forwardRef(({className:e,...t},r)=>a.jsx(G.Title,{ref:r,className:c("wu-text-lg wu-font-semibold",e),...t}));Xr.displayName=G.Title.displayName;const Mu=x.forwardRef(({className:e,...t},r)=>a.jsx(G.Description,{ref:r,className:c("wu-text-sm",e),...t}));Mu.displayName=G.Description.displayName;const _u=e=>t=>{e&&t.preventDefault()},Au=e=>{const{Trigger:t,children:r,hideCloseButton:s,className:o,side:n="left",open:u,onOpenChange:i,preventClickOutside:l,overlayClassName:w,closeButtonClassName:d,...p}=e;return a.jsxs(Kr,{open:u,onOpenChange:i,children:[a.jsx(ku,{asChild:!0,children:t}),a.jsxs(ka,{onInteractOutside:_u(l),side:n,className:c("wu-bg-white wu-text-gray-lead wu-px-0",o),hideCloseButton:s,overlayClassName:w,closeButtonClassName:d,...p,children:[a.jsx("div",{className:"wu-hidden",children:a.jsx(Xr,{})}),r]})]})},Lu=({children:e,...t})=>a.jsx(Tu,{...t,children:e}),Zr=({className:e,isLoading:t,loadingText:r,children:s,...o})=>a.jsxs("footer",{className:c("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),...o,children:[a.jsx("div",{className:"wu-flex-1",children:s}),t&&a.jsx(et,{size:"16px",variant:"spinner",color:"#a3a3a3",message:r})]});Zr.displayName="WuFooter";const Qr=f.forwardRef((e,t)=>{const{size:r="sm",idOrSlugOrUrl:s,variant:o="primary",...n}=e,u=r==="sm"?16:18,i=s.includes("http")?s:`/help/${s}.html`,l=o==="primary"?"wu-text-blue-p":"wu-text-gray-lead";return a.jsx("button",{...n,ref:t,onClick:()=>ia(i),children:a.jsx("span",{className:c("wm-help wu-text-gray-subtle",`wu-text-[${u}px]`,l,n.disabled&&"wu-text-neutral-300","wu-help-button-icon")})})});Qr.displayName="WuHelpButton";const Be=(e,t)=>`wu-listbox-${e}`;function Wu(e){const{option:t,accessorKey:r,onSelect:s,multiple:o,dir:n,GroupLabel:u,Item:i,isSelected:l,...w}=e,d=r.group&&Array.isArray(t[r.group]),p=({item:h,className:b})=>f.createElement(ht,{...w,key:JSON.stringify(h),onSelect:()=>s==null?void 0:s(h),value:t[r.value],className:c("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))&&!o&&"wu-bg-blue-p/10",n==="rtl"&&"wu-justify-end",b,Be("item")),disabled:h.disabled},o&&a.jsx(ke,{checked:l==null?void 0:l(h)}),i?i({value:h,isSelected:l==null?void 0:l(h)}):a.jsx(a.Fragment,{children:h[r.label]}));if(d){const h=t[r.group],b=typeof u=="string"?t[u]:u==null?void 0:u(t);return a.jsx(pt,{heading:b,children:h==null?void 0:h.map(g=>a.jsx(p,{item:g,className:"wu-pl-6"},JSON.stringify(g)))})}return a.jsx(p,{item:t})}const Pu=f.memo(Wu),Fu=e=>{const{className:t,...r}=e;return a.jsxs("div",{className:"wu-relative",children:[a.jsx(we,{icon:"wm-search",className:"wu-absolute wu-top-[14px] wu-left-5"}),a.jsx(qr,{...r,"aria-label":"Search",className:c("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;",Be("input"),t)})]})},Ou=e=>{const{label:t,onSelectAll:r,data:s,value:o}=e,[n,u]=f.useState(!1),[i,l]=f.useState(!1);return f.useEffect(()=>{!o||!s||(u(o.length>0),l(o.length>0&&o.length<s.length))},[s,o]),a.jsxs(ht,{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:()=>r==null?void 0:r(!n),children:[a.jsx(ke,{checked:n,partial:i}),t||"Select All"]})},Bu=e=>{const{CustomTrigger:t,disabled:r,value:s,placeholder:o,accessorKey:n,Chip:u,handleUnselect:i,variant:l,dir:w,className:d,...p}=e,[h,b]=f.useState(),g=f.useRef(null);return f.useEffect(()=>{if(!s){b(null);return}b(Array.isArray(s)?u?s.map((C,E)=>u({value:C,unselect:i,key:E})):s.map(C=>C[n.label]).join(", "):u?u({value:s,unselect:i}):s[n.label])},[s,u,n.label,b]),a.jsx(Oe,{asChild:!0,id:e.id,disabled:r,ref:g,children:(t==null?void 0:t(s))||a.jsxs("button",{...p,className:c("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,Be("trigger")),children:[a.jsx("div",{className:c("wu-truncate",u&&"wu-flex wu-items-center wu-gap-1 wu-flex-wrap",!h&&"wu-font-light"),children:h||o}),a.jsx(we,{icon:"wm-arrow-drop-down",className:c("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",w==="rtl"?"wu-left-1":"wu-right-1",Be("drop-icon"))})]})})},Rr=(e,t,r)=>{const s=String(e[r.label]??"").toLowerCase(),o=String(e[r.value]??"").toLowerCase();return s.includes(t)||o.includes(t)},qu=(e,t,r)=>{const s=t.trim();if(s==="")return e;const o=s.toLowerCase(),n=[];for(const u of e){const i=r.group,l=i?u[i]:void 0;if(Array.isArray(l)){const w=l.filter(d=>Rr(d,o,r));w.length>0&&n.push({...u,[i]:w})}else Rr(u,o,r)&&n.push(u)}return n},es=e=>{const{data:t,accessorKey:r,value:s,Item:o,Label:n,GroupLabel:u,CustomHeader:i,CustomTrigger:l,NoDataContent:w,Chip:d,onSelect:p,onScroll:h,disabled:b,multiple:g,searchable:m,selectAll:C,virtualizedThreshold:E=100,id:y,dir:S,className:v,listClass:T,placeholder:I="Select items...",variant:k,labelPosition:M="top",maxContentWidth:A,maxContentHeight:O}=e,[_,P]=f.useState(!1),[L,F]=f.useState(""),[B,W]=f.useState(s),U=f.useMemo(()=>r,[r]),Y=f.useMemo(()=>{if(!m||!L)return t;const z=L.toLowerCase().trim();return qu(t,z,r)},[t,L,r.label,m]),q=z=>{g?W(se=>{const te=z[r.value],ae=Array.isArray(se)?se:[],je=ae.some($=>$[r.value]===te)?ae.filter($=>$[r.value]!==te):[...ae,z];return p&&p(je),je}):(W(z),p&&p(z),P(!1))},V=f.useCallback(z=>{const se=z?t:[];W(se),C!=null&&C.onSelectAll&&C.onSelectAll(z),p&&p(se)},[t,C,p]),ie=z=>Array.isArray(B)?B.some(se=>se[r.value]===z[r.value]):(B==null?void 0:B[r.value])===z[r.value];f.useEffect(()=>{W(s)},[s]);const K=z=>{const se=te=>a.jsx(Pu,{option:te,accessorKey:U,multiple:g,onSelect:ae=>q(ae),dir:S,GroupLabel:u,Item:o,isSelected:ae=>ie(ae)},JSON.stringify(te));return z.length>E?a.jsx(tt,{list:z,callback:(te,ae)=>se(ae),dir:S}):z.map(se)};return a.jsxs("div",{className:c("wu-flex wu-text-sm wu-gap-2",M==="top"&&"wu-flex-col wu-gap-1",M==="left"&&"wu-flex-row",M==="right"&&"wu-flex-row-reverse",Be("container")),dir:S,children:[n&&a.jsx(ge,{htmlFor:y,className:Be("label"),children:n}),a.jsxs(Ee,{open:_,onOpenChange:z=>{P(z),z||setTimeout(()=>{F("")},100)},children:[a.jsx(Bu,{CustomTrigger:l,disabled:b,value:B,accessorKey:r,placeholder:I,Chip:d,className:v,handleUnselect:q,variant:k,id:y,dir:S}),a.jsx(ye,{className:c("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",Be("content")),align:"start",sideOffset:-1,style:{maxWidth:A},children:a.jsxs(va,{id:e.id,shouldFilter:!1,children:[m&&a.jsx(Fu,{value:L,onValueChange:F}),i,a.jsxs(Na,{className:c("wu-overflow-y-auto",Be("list"),T),onScroll:h,style:{maxHeight:O||"420px"},children:[a.jsx(Ca,{children:w||"No results found."}),a.jsx(pt,{children:g&&(C==null?void 0:C.enabled)&&!L&&a.jsx(Ou,{data:t,value:B,onSelectAll:V,label:C.label})}),a.jsx(pt,{children:K(Y)})]})]})})]})]})},Vu=e=>{const{checked:t,onSelect:r,children:s,disabled:o,preventCloseOnSelect:n}=e;return a.jsx(Ur,{disabled:o,checked:t,onCheckedChange:r,onSelect:u=>n&&u.preventDefault(),children:s})},Ta=e=>{const{children:t,className:r,Icon:s,iconPosition:o="left",disabled:n,onSelect:u,preventCloseOnSelect:i}=e,l=c("wu-flex wu-items-center wu-gap-2",s&&(o==="left"?"":"wu-justify-between wu-flex-row-reverse"),r),w=d=>{u&&u(d),i&&d.preventDefault()};return a.jsxs(Ot,{onSelect:w,disabled:n,className:l,children:[s&&a.jsx("div",{className:"wu-text-base",children:s}),t]})},zu=e=>{const{children:t,Label:r,...s}=e;return a.jsxs(zr,{...s,children:[a.jsx(bt,{children:r||e.label}),t]})},Hu=e=>{const{options:t,value:r,onSelect:s}=e;return a.jsx(yu,{value:r,onValueChange:s,children:t.map(o=>a.jsx(jr,{value:o.value,disabled:o.disabled,children:o.Label||o.label},o.value))})},$u=e=>{const{className:t,...r}=e,s=c("wu-w-11/12 wu-mx-auto wu-border-gray-40",t);return a.jsx(Bt,{...r,className:s})},at=x.forwardRef(({className:e,children:t,thumbColor:r,railColor:s,...o},n)=>a.jsxs(ze.Root,{ref:n,className:c("wu-relative wu-overflow-hidden",e),children:[a.jsx(ze.Viewport,{className:"wu-h-full wu-w-full wu-rounded-[inherit]",...o,children:t}),a.jsx(Ia,{thumbColor:r,railColor:s}),a.jsx(ze.Corner,{})]}));at.displayName=ze.Root.displayName;const Ia=x.forwardRef(({className:e,orientation:t="vertical",thumbColor:r="#d4d4d4",railColor:s="#eeeeee",...o},n)=>a.jsx(ze.ScrollAreaScrollbar,{ref:n,orientation:t,className:c("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:s},...o,children:a.jsx(ze.ScrollAreaThumb,{className:"wu-relative wu-flex-1 wu-rounded-full",style:{background:r}})}));Ia.displayName=ze.ScrollAreaScrollbar.displayName;const Uu=e=>{const{children:t,label:r,Label:s,open:o,onOpenChange:n,height:u,dir:i,...l}=e;return a.jsxs(xu,{...l,open:o,onOpenChange:n,children:[a.jsx(Hr,{dir:i,children:s||r}),a.jsx(mu,{children:a.jsx($r,{onInteractOutside:w=>w.preventDefault(),children:a.jsx(at,{className:"wu-h-fit",style:{height:u},dir:i,children:t})})})]})},ju="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",ts=e=>{const{children:t,menuTitle:r,MenuTitle:s,variant:o="flat",name:n,open:u,onOpenChange:i,height:l,preventCloseOnClickOutside:w,dir:d,Trigger:p,align:h="start",sideOffset:b=0,side:g="bottom",alignOffset:m,className:C,disabled:E,...y}=e;return a.jsxs(Sa,{...y,open:u,onOpenChange:i,dir:d,children:[a.jsx(Ea,{asChild:!0,dir:d,disabled:E,className:c("disabled:wu-text-zinc-300 disabled:wu-bg-white disabled:wu-cursor-not-allowed disabled:hover:wu-bg-transparent"),children:p??Gu(o,n,E)}),a.jsx(Ft,{className:c("wu-w-56 wu-border wu-border-blue-p disabled:wu-border-gray-40",C,"wu-menu-content"),align:h,sideOffset:b,side:g,alignOffset:m,onInteractOutside:S=>w&&S.preventDefault(),children:a.jsxs(at,{className:"h-fit",style:{height:l},dir:d,children:[(r||s)&&a.jsxs(a.Fragment,{children:[a.jsx(bt,{dir:d,className:"wu-menu-title",children:s||r}),a.jsx(Bt,{className:"wu-mt-0 wu-menu-separator",dir:d})]}),t??a.jsx("p",{children:"Menu Is Empty"})]})})]})},Gu=(e,t,r)=>{const s=c(ju,"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:s,"aria-label":"menu-trigger",children:[a.jsx("span",{children:t??"Menu"}),a.jsx("span",{className:c("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",r&&"wu-text-zinc-300 group-hover:wu-text-zinc-300")})]})},Da=f.forwardRef(({showMenu:e=!1,className:t,color:r="#1B3380",...s},o)=>{const n=c("wu-w-full wu-border wu-transition-all wu-duration-300");return a.jsxs("div",{...s,className:c("wu-flex wu-flex-col wu-w-[18px] wu-justify-between wu-aspect-[3/2] wu-transition-all wu-duration-300",t),ref:o,"aria-label":"menu-icon",children:[a.jsx("div",{className:`${n} wu-origin-center ${e?"wu-rotate-45 wu-translate-y-[5px]":""}`,style:{borderColor:r}}),a.jsx("div",{className:`${n} ${e?"wu-opacity-0":""}`,style:{borderColor:r}}),a.jsx("div",{className:`${n} wu-origin-center ${e?"-wu-rotate-45 -wu-translate-y-[5px]":""}`,style:{borderColor:r}})]})});Da.displayName="WuMenuIcon";const as={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%]"},rs=G.Root,ss=G.Trigger,Yu=G.Portal,Ku=G.Close,os=f.forwardRef(({className:e,...t},r)=>a.jsx(G.Overlay,{ref:r,className:c("wu-fixed wu-inset-0 wu-z-50 wu-bg-black/30",as.overlay,e),...t}));os.displayName=G.Overlay.displayName;const Ma=f.forwardRef(({className:e,children:t,hideCloseButton:r,isStackedCard:s,...o},n)=>a.jsxs(Yu,{children:[a.jsx(os,{className:s?"wu-bg-transparent":""}),a.jsxs(G.Content,{ref:n,className:c("wu-fixed wu-left-[50%] wu-top-[50%] wu-z-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",as.content,e),...o,children:[t,!r&&a.jsx(G.Close,{"aria-label":"close",asChild:!0,children:a.jsxs(Re,{variant:"iconOnly",className:c("wu-absolute wu-right-2 wu-top-1 hover:wu-bg-black hover:wu-bg-opacity-[0.04]","wuexp:wu-top-3 wuexp:wu-right-4 wuexp:wu-p-1.5","wuexp:group-data-[variant=action]:wu-text-blue-q","wuexp:group-data-[variant=upgrade]:wu-text-yellow-deep","wuexp:group-data-[variant=critical]:wu-text-red-deep"),children:[a.jsx("span",{className:"wu-text-lg wm-close wuexp:wu-text-xl wuexp:wu-leading-5"}),a.jsx("span",{className:"wu-sr-only",children:"Close"})]})})]})]}));Ma.displayName=G.Content.displayName;const _a=({className:e,...t})=>a.jsx("div",{className:c("wu-text-center wu-bg-gray-20 wu-w-full",e),...t});_a.displayName="DialogHeader";const ns=({className:e,...t})=>a.jsx("div",{className:c("wu-flex wu-flex-col-reverse sm:wu-flex-row sm:wu-justify-end sm:wu-space-x-2 wu-p-4",e),...t});ns.displayName="DialogFooter";const us=f.forwardRef(({className:e,...t},r)=>a.jsx(G.Title,{ref:r,className:c("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}));us.displayName=G.Title.displayName;const Ju=f.forwardRef(({className:e,...t},r)=>a.jsx(G.Description,{ref:r,className:c("wu-text-sm wu-text-muted-foreground",e),...t}));Ju.displayName=G.Description.displayName;const Xu={gradientBackground:"_gradientBackground_1bbet_1"},ls=e=>{const{colors:t,size:r=.55,children:s,className:o,strokeWidth:n,centerOffset:u={x:0,y:0},...i}=e,l=f.useRef(null);return f.useEffect(()=>{const w=l.current;if(w){w.style.setProperty("--width",`${w.offsetWidth*r}px`),w.style.setProperty("--height",`${w.offsetHeight*r}px`),w.style.setProperty("--colors",t.join(",")),w.style.setProperty("--stroke-width",`-${n||2}px`),w.style.setProperty("--spotlight-background","radial-gradient(100% var(--height) ellipse at 25% 70%, var(--colors))");let p;const h=b=>{p&&cancelAnimationFrame(p),p=requestAnimationFrame(()=>{const g=w.getBoundingClientRect();let m=b.clientX-g.left,C=b.clientY-g.top;m=Math.max(0,Math.min(m+u.x,g.width)),C=Math.max(0,Math.min(C+u.y,g.height));const E=`radial-gradient(
|
|
2
2
|
var(--width) var(--height) ellipse at ${m}px ${C}px,
|
|
3
3
|
var(--colors)
|
|
4
|
-
)`;w.style.setProperty("--spotlight-background",E)})};return window.addEventListener("mousemove",b),()=>{window.removeEventListener("mousemove",b),p&&cancelAnimationFrame(p)}}},[t,r,o,n]),a.jsx("div",{ref:l,className:c(Wn.gradientBackground,"wu-transform-gpu",u),...i,children:s})},Rr="calc(100vh - 64px)",Pn={sm:"400px",md:"600px",lg:"1200px"},Ln=({Trigger:e,children:t,size:r="md",hideCloseButton:s,preventClickOutside:u,onOpenChange:o,open:n,dir:i,maxWidth:l,maxHeight:w,className:d,style:p,variant:b="action",...x})=>{const h={action:["#EEF3FBcc 32%","#1D50F4cc"],upgrade:["#FDEDCCcc 32%","#FF9F00cc"],critical:["#FFB6B6cc 32%","#CC0000cc"]};return a.jsxs(Yr,{modal:!0,onOpenChange:o,open:n,children:[e&&a.jsx(Kr,{asChild:!0,children:e}),a.jsxs(Ea,{style:{width:"calc(100% - 64px)",maxWidth:l||Pn[r],maxHeight:w||Rr,...p},hideCloseButton:s,onInteractOutside:m=>u&&m.preventDefault(),dir:i,"aria-describedby":void 0,"data-variant":b,className:c("wu-group wuexp:wu-rounded-[1.1rem]",d),...x,children:["data-theme"in x&&a.jsx(Qr,{colors:h[b],strokeWidth:4,className:c("wuexp:wu-rounded-[1.1rem] wu-transform-gpu wu-flex wu-flex-col",d),style:{maxHeight:w||Rr},children:t}),!("data-theme"in x)&&t]})]})},On=({children:e,className:t,...r})=>a.jsx("div",{className:c("wu-flex wu-flex-col wu-gap-4 wu-p-4 rtl:wu-text-right wu-overflow-auto wu-bg-white","wuexp:wu-p-8 wuexp:wu-text-gray-lead",t),...r,children:e}),Fn=({children:e,className:t,...r})=>a.jsx(Ta,{...r,"data-variant":"action",className:c("wu-text-lg wu-text-gray-lead wu-font-medium","wuexp:wu-rounded-t-xl wuexp:wu-px-4","wuexp:group-data-[variant=action]:wu-bg-blue-sidebar wuexp:group-data-[variant=action]:wu-text-blue-q","wuexp:group-data-[variant=critical]:wu-bg-[#F9E0E0] wuexp:group-data-[variant=critical]:wu-text-red-deep","wuexp:group-data-[variant=upgrade]:wu-bg-[#FEF1D9] wuexp:group-data-[variant=upgrade]:wu-text-yellow-deep",t),children:a.jsx(Zr,{className:"wuexp:wu-font-normal wuexp:wu-justify-start wuexp:wu-text-2xl wuexp:wu-h-14",children:e})}),Bn=({children:e,className:t,...r})=>a.jsx(Xr,{...r,className:c("wu-border-t wu-border-gray-40 wu-bg-white wu-min-h-16 wu-mx-4 wu-px-0","wuexp:wu-mx-0 wuexp:wu-rounded-b-xl wuexp:wu-min-h-16 wuexp:wu-p-4","wuexp:group-data-[variant=upgrade]:wu-border-[#EED6A8]","wuexp:group-data-[variant=action]:wu-border-[#BAC9F8]","wuexp:group-data-[variant=critical]:wu-border-[#F0B3B3]",t),children:e}),qn=({children:e,className:t,...r})=>{const s=f.useRef(null);return a.jsx(_n,{asChild:!0,children:a.jsx(me,{className:t,ref:s,...r,children:e})})},Vn=({placeholder:e="Select...",value:t,multiple:r=!1,accessorKey:s,variant:u="flat",dir:o="ltr",customTriggerChildren:n,id:i,disabled:l,selectAll:w,isCheckedAll:d,width:p,...b})=>{const[x,h]=f.useState(""),[m,C]=f.useState(e);f.useEffect(()=>{if(!t||Array.isArray(t)&&t.length===0){C(e),h("");return}const y=s.label;if(r&&Array.isArray(t)){const S=t.map(v=>v[y]).join(", ");h(S)}else!r&&!Array.isArray(t)&&h(t[y])},[t,s.label,r,e]);const E=()=>e&&!x?a.jsx("p",{className:"wu-text-xs wu-opacity-70",children:m}):a.jsx("span",{className:c("wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap"),style:{width:`${(p||0)-32}px`},children:d?(w==null?void 0:w.triggerText)??x:x});return a.jsx(_r,{asChild:!0,dir:o,id:i,disabled:l,children:a.jsxs("button",{...b,disabled:l,className:c("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",u==="outlined"&&"wu-border wu-border-gray-subtle","wu-group wu-select-trigger",b.className),children:[n??E(),a.jsx("span",{className:"wm-arrow-drop-down group-data-[state=open]:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base"})]})})},es=({option:e,value:t,multiple:r=!1,onSelect:s,accessorKey:u,dir:o="ltr"})=>{const[n,i]=f.useState(r?[]:"");f.useEffect(()=>{t&&i(r?t.map(p=>JSON.stringify(p[u.value])):JSON.stringify(t[u.value]))},[t,u.value,r]);const l=r?n.includes(JSON.stringify(e[u.value])):n===JSON.stringify(e[u.value]),w=d=>{e.disabled||(s(e),r&&d.preventDefault())};return a.jsxs(Pt,{onClick:w,disabled:e.disabled,className:c("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:[r&&a.jsx(Ee,{checked:l}),a.jsx(ts,{option:e,accessorKey:u})]})},ts=({option:e,accessorKey:t})=>{const r=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,r,e.isAdmin&&a.jsx("span",{className:"wu-ml-auto wm-lock wu-text-sm wu-text-orange-deep"})]})},as=e=>{const{option:t,handleSelectAll:r,isCheckedAll:s,isPartialSelected:u,...o}=e;switch("type"in t?t.type:"option"){case"all":return a.jsxs(Pt,{onSelect:i=>{i.stopPropagation(),i.preventDefault(),r==null||r()},className:c("wu-cursor-pointer wu-text-xs wu-py-2 wu-leading-4 wu-select-item"),dir:o.dir,children:[a.jsx(Ee,{"data-partial":u,checked:s||u,partial:u}),a.jsx(ts,{option:t,accessorKey:o.accessorKey})]});case"group":return a.jsxs(Ar,{dir:o.dir,children:[a.jsx(bt,{className:"wu-text-xs",children:t.label}),t.options.map((i,l)=>f.createElement(es,{...o,option:i,key:l}))]});case"divider":return a.jsx(Lt,{className:"wu-mx-4"});default:return a.jsx(es,{...o,option:t})}},zn=e=>{let t=0,r=0;const s=[],u=[],o=n=>{n.type==="divider"?t++:n.type==="group"?(r++,n.options.forEach(i=>{o(i)})):(s.push(n),n.disabled||u.push(n))};return e.forEach(n=>{o(n)}),{separators:t,groups:r,enabledOptions:u,totalData:s.length,cleanData:s}},Hn=100,$n=400,Un=32,jn=9,Gn=32,rs=({data:e,onSelect:t,multiple:r=!1,defaultValue:s,value:u,accessorKey:o,variant:n="flat",dir:i="ltr",placeholder:l,Label:w,virtualizedThreshold:d=Hn,maxHeight:p=$n,hasGroup:b=!1,Header:x,CustomTrigger:h,selectAll:m,disabled:C,labelPosition:E="top",onScroll:y,maxContentWidth:S,...v})=>{const[k,D]=f.useState(),T=f.useRef(null),[_,M]=f.useState(!1),[L,P]=f.useState(!1),{cleanData:O,totalData:A,separators:F,groups:q,enabledOptions:W}=b||m!=null&&m.enable?zn(e):{cleanData:e,totalData:e.length,separators:0,groups:0,enabledOptions:[]},U=f.useMemo(()=>r&&m!=null&&m.enable&&e.length>0?[{type:"all",[o.label]:m.label||"Select All"},...e]:e,[e,m,r]),z=f.useCallback(B=>{const K=B[o.value];if(r)D((Q=[])=>{const j=Q,Ie=j.some(ye=>ye[o.value]===K)?j.filter(ye=>ye[o.value]!==K):[...j,B];return t==null||t(Ie),Ie});else{const Q=B;D(Q),t==null||t(Q)}},[r,o.value,t]);f.useEffect(()=>{if(s&&u){console.error("defaultValue and value cannot be used simultaneously");return}!s&&!u&&D(void 0),s!==void 0&&D(s),u!==void 0&&D(u)},[s,u]);const Z=f.useMemo(()=>Math.min(p,A*Un+F*jn+q*Gn),[p,A,F,q]),ae=U.length>d;f.useEffect(()=>{if(!r)return;const B=m!=null&&m.includeDisabled?(k==null?void 0:k.length)===e.length:(k==null?void 0:k.length)===W.length;M(B);const K=(k==null?void 0:k.length)>0&&!B;P(K)},[k,m]);const le=f.useCallback(()=>{const B=_?[]:m!=null&&m.includeDisabled?b?O:e:W;D(B),t==null||t(B)},[_,r,e,W,t,m]),ee=dt(E);return a.jsxs("div",{className:c(ee,"wu-flex wu-select-container"),ref:T,dir:i,children:[a.jsxs(Mr,{children:[a.jsx(Vn,{...v,value:k,multiple:r,variant:n,dir:i,placeholder:l,accessorKey:o,customTriggerChildren:h,id:v.id,disabled:C,selectAll:m,isCheckedAll:_}),a.jsxs(ya,{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:v.id,style:{maxWidth:S},children:[x,ae?a.jsx(et,{list:U,containerHeight:p,callback:(B,K)=>a.jsx(as,{option:K,accessorKey:o,multiple:r,onSelect:z,value:k,dir:i,handleSelectAll:le,isCheckedAll:_,isPartialSelected:L}),dir:i}):a.jsx("div",{onScroll:y,style:{maxHeight:Z,height:"fit-content",overflow:"auto"},className:"wu-select-list",children:U.map((B,K)=>a.jsx(as,{option:B,accessorKey:o,multiple:r,onSelect:z,value:k,handleSelectAll:le,isCheckedAll:_,dir:i,isPartialSelected:L},`${K}`))})]})]}),w&&a.jsx(be,{htmlFor:v.id,className:"wu-select-label",children:w})]})},Ot=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Yn=({value:e,onChange:t,min:r=H.sub(new Date,{years:5}),max:s=H.add(new Date,{years:1}),placeholder:u="Select a month",Label:o,labelPosition:n="top",disabled:i,id:l,readonly:w,disabledMonths:d=[],...p})=>{const[b,x]=f.useState(null),[h,m]=f.useState(""),[C,E]=f.useState({value:Math.min(new Date().getFullYear(),new Date(s).getFullYear()),label:Math.min(new Date().getFullYear(),new Date(s).getFullYear())}),y=f.useMemo(()=>{const v=new Date(r).getFullYear(),k=new Date(s).getFullYear();return Array.from({length:k-v+1},(D,T)=>({value:k-T,label:k-T}))},[r,s]);f.useEffect(()=>{if(e){const v=new Date(e),k=v.getFullYear(),D=v.getMonth();x({year:k,month:D}),m(`${Ot[D]} ${k}`),E({value:k,label:k})}},[e]);const S=()=>{b&&t&&(t(new Date(b.year,b.month,15)),m(`${Ot[b.month]} ${b.year}`))};return a.jsxs("div",{className:c("wu-flex wu-flex-col wu-items-center",dt(n),n==="top"&&"wu-items-start"),children:[a.jsxs(Me,{children:[a.jsx(ba,{...p,disabled:i||w,id:l,dir:"ltr",placeholder:u,formattedString:h}),a.jsxs(Se,{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(rs,{data:y,accessorKey:{value:"value",label:"label"},value:C,onSelect:v=>E(v),multiple:!1,maxHeight:7*32})}),a.jsx(Kn,{year:C==null?void 0:C.value,selectedMonth:b==null?void 0:b.month,selectedYear:b==null?void 0:b.year,onClick:(v,k)=>x({year:k,month:v}),disabledMonths:d}),a.jsx("div",{className:"wu-flex wu-justify-end wu-px-0.5",children:a.jsx(lt.PopoverClose,{asChild:!0,children:a.jsx(me,{onClick:S,children:"Apply"})})})]})]}),o&&a.jsx(be,{className:"wu-truncate wu-max-w-[120px] wu-min-w-fit wu-select-label",children:o})]})},Kn=({year:e,selectedMonth:t,selectedYear:r,onClick:s,disabledMonths:u=[]})=>{const o=new Date,n=o.getFullYear(),i=o.getMonth(),l=f.useMemo(()=>{const w=new Set;return u.forEach(d=>{const p=typeof d=="string"?new Date(d):d;w.add(`${p.getFullYear()}-${p.getMonth()}`)}),w},[u]);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:Ot.map((w,d)=>{const p=e===n&&d===i,b=t===d&&r===e;return a.jsx("button",{disabled:l.has(`${e}-${d}`),onClick:()=>s(d,e),className:c("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",p&&"wu-border wu-border-blue-p",b&&"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":`${Ot[d]} ${e}`,"data-month":d,"data-year":e,children:w},w)})})},ss=(e,t,r,s=96)=>{if(e.length===0||s<=0)return[[],[]];const[o,n]=f.useState([]),[i,l]=f.useState([]);return f.useEffect(()=>{const w=()=>{var h,m;const d=((h=t.current)==null?void 0:h.clientWidth)||0,p=((m=r.current)==null?void 0:m.clientWidth)||0,b=d-p,x=Math.floor(b/s);n(e.slice(0,x)),l(e.slice(x))};return w(),window.addEventListener("resize",w),()=>{window.removeEventListener("resize",w)}},[e,s]),[o,i]},us={wuPrimaryLink:"_wuPrimaryLink_1sy3v_1",wuPrimaryPopoverContent:"_wuPrimaryPopoverContent_1sy3v_8"},Jn=e=>{const{Links:t,children:r,className:s,...u}=e,o=f.useMemo(()=>t.map((d,p)=>f.cloneElement(d,{className:c(us.wuPrimaryLink,d.props.className,"wu-primary-nav-link"),key:p})),[t]),n=f.useRef(null),i=f.useRef(null),[l,w]=ss(o,n,i);return a.jsx(a.Fragment,{children:a.jsxs("header",{className:c("wu-flex wu-items-center wu-justify-between wu-gap-4 wu-px-2 wu-py-1 wu-bg-white wu-border-b",s),...u,ref:n,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}),w.length>0&&a.jsxs(Me,{children:[a.jsx($e,{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(Se,{className:c(us.wuPrimaryPopoverContent,"wu-primary-nav-popover-left"),align:"start",sideOffset:12,children:w})]})]}),r&&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:i,children:r}),a.jsxs(Me,{children:[a.jsx($e,{className:"sm:wu-hidden",children:a.jsx("span",{className:"wu-text-lg wm-menu"})}),a.jsx(Se,{className:"wu-bg-white wu-border wu-border-blue-p wu-w-fit wu-primary-nav-popover-right",align:"end",sideOffset:4,children:r})]})]})]})})},Ia={wuSecondaryLink:"_wuSecondaryLink_1edl1_1",wuSecondaryNav:"_wuSecondaryNav_1edl1_6"},Xn=e=>{const{Links:t,children:r,className:s,...u}=e,o=f.useMemo(()=>t.map((p,b)=>f.cloneElement(p.link,{key:b,className:c(Ia.wuSecondaryLink,p.link.props.className,"wu-secondary-nav-link-container"),children:a.jsxs(a.Fragment,{children:[f.cloneElement(p.imgOrIcon,{className:c("wu-w-5 wu-h-5 wu-flex wu-items-center wu-justify-center wu-text-lg wu-leading-5",p.imgOrIcon.props.className)}),a.jsx("div",{className:"wu-secondary-nav-link",children:p.link.props.children})]})})),[t]),n=f.useRef(null),i=f.useRef(null),l=f.useRef(null),[w,d]=ss(o,n,l);return a.jsx(a.Fragment,{children:a.jsxs("header",{className:c("wu-flex wu-items-center wu-justify-between wu-gap-4 wu-border-y wu-border-gray-25 wu-h-[50px]",s),...u,ref:n,children:[a.jsxs("div",{className:"wu-flex wu-items-center wu-justify-start wu-gap-2",children:[a.jsx("nav",{className:c(Ia.wuSecondaryNav,"wu-flex wu-items-center wu-justify-start wu-w-full wu-h-full wu-secondary-nav-left"),ref:i,children:w}),d.length>0&&a.jsxs(Me,{children:[a.jsx($e,{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(Se,{className:c(Ia.wuSecondaryNavPopover,"wu-secondary-nav-popover-left"),align:"start",sideOffset:12,children:d})]})]}),r&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"wu-items-center wu-justify-end wu-hidden sm:wu-flex",ref:l,children:r}),a.jsxs(Me,{children:[a.jsx($e,{className:"sm:wu-hidden",children:a.jsx("span",{className:"wu-text-lg wm-menu"})}),a.jsx(Se,{className:"wu-bg-white wu-border wu-border-blue-p wu-w-fit wu-secondary-nav-popover-right",align:"end",sideOffset:12,children:r})]})]})]})})},os=f.forwardRef(({totalRows:e,initialPage:t=0,initialPageSize:r=100,onPageChange:s,className:u,disabled:o=!1,...n},i)=>{const[l,w]=f.useState(t),[d,p]=f.useState(r);f.useEffect(()=>{w(t),p(r)},[t,r]);const b=Math.ceil(e/d),x=l*d+1,h=Math.min((l+1)*d,e),m=Array.from({length:b},(y,S)=>S),C=f.useCallback(y=>{y>=0&&y<b&&(w(y),s==null||s(y))},[b,s]),E=7*32;return a.jsxs("div",{className:c("wu-flex wu-items-center wu-gap-[2px]",u,"wu-pagination"),...n,role:"navigation",children:[a.jsx(ns,{label:"Previous page",onClick:()=>C(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(jr,{name:`${x} - ${h}`,className:"wu-w-[96px] wu-min-w-[96px] wu-pagination-menu",align:"end",disabled:o,children:a.jsx(tt,{style:{maxHeight:E+"px"},dir:n.dir,children:m.length>100?a.jsx(et,{className:"wu-pagination-list",containerHeight:E,list:m,callback:(y,S)=>a.jsxs(Na,{onSelect:()=>C(S),className:c("wu-py-2",S===l&&"wu-bg-gray-20","wu-pagination-item"),children:[S*d+1," -"," ",Math.min((S+1)*d,e)]},y)}):m.map(y=>a.jsxs(Na,{onSelect:()=>C(y),className:c(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(ns,{label:"Next page",onClick:()=>C(l+1),disabled:l===b-1||o,icon:"wm-arrow-forward-ios",className:"hover:wu-bg-gray-20 rtl:wu-rotate-180 wu-next-btn"})]})});os.displayName="WuPagination";const ns=({label:e,onClick:t,disabled:r,icon:s,className:u})=>a.jsx(me,{variant:"iconOnly",onClick:t,disabled:r,className:c("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",u),"aria-label":e,children:a.jsx("span",{className:c("wu-text-sm",s)})}),Zn=({Trigger:e,children:t,className:r,dir:s,open:u,onOpenChange:o,modal:n,...i})=>a.jsxs(Me,{open:u,onOpenChange:o,modal:n,children:[a.jsx($e,{asChild:!0,dir:s,children:e}),a.jsx(Se,{className:c("wu-w-80 wu-p-0 wu-border-blue-p wu-bg-white wu-dark:border-gray-switcher",r),dir:s,...i,children:t})]}),Qn=e=>a.jsx(lt.PopoverClose,{asChild:!0,children:a.jsx(me,{...e})}),ls=g.forwardRef(({className:e,...t},r)=>a.jsx(wt.Root,{className:c("wu-grid wu-gap-2",e),...t,ref:r}));ls.displayName=wt.Root.displayName;const is=g.forwardRef(({className:e,...t},r)=>a.jsx(wt.Item,{ref:r,className:c("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(wt.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"})})}));is.displayName=wt.Item.displayName;const cs=f.forwardRef((e,t)=>{const{options:r,defaultValue:s,onChange:u,label:o,dir:n,...i}=e;return a.jsxs(ls,{defaultValue:s,required:i.required,disabled:i.disabled,onValueChange:u,id:i.id,dir:n,name:i.name,className:c("w-fit",i.className),ref:t,style:i.style,children:[a.jsx(_t,{htmlFor:i.id,className:"wu-text-sm wu-font-normal wu-text-gray-lead wu-leading-6 wu-radio-group-label",children:o}),r.map(l=>a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2 wu-radio-item-container",children:[a.jsx(is,{value:l.value,id:l.value,disabled:l.disabled,required:l.required,"aria-label":l.value,className:"wu-peer wu-radio-item"}),a.jsx(_t,{htmlFor:l.value,className:c(l.required&&"after:wu-content-['*'] after:wu-mx-[2px] after:wu-text-rose-500","wu-radio-item-label"),children:l.label})]},l.value))]})});cs.displayName="WuRadioGroup";const Rn=e=>{const{children:t,...r}=e;return a.jsxs(tt,{...r,role:"complementary","aria-label":"ScrollArea",children:[t,a.jsx(Ca,{orientation:"horizontal"})]})},ws=g.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...s},u)=>a.jsx(or.Root,{ref:u,decorative:r,orientation:t,className:c("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...s}));ws.displayName=or.Root.displayName;function ds({className:e,...t}){return a.jsx("div",{className:c("animate-pulse rounded-md bg-muted",e),...t})}const ka=768;function el(){const[e,t]=g.useState(void 0);return g.useEffect(()=>{const r=window.matchMedia(`(max-width: ${ka-1}px)`),s=()=>{t(window.innerWidth<ka)};return r.addEventListener("change",s),t(window.innerWidth<ka),()=>r.removeEventListener("change",s)},[]),!!e}const tl="sidebar_state",al=60*60*24*7,rl="256px",sl="256px",ul="3rem",ol="b",fs=g.createContext(null);function Ue(){const e=g.useContext(fs);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const ps=g.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:r,className:s,style:u,children:o,...n},i)=>{const l=el(),[w,d]=g.useState(!1),[p,b]=g.useState(l?!0:e),x=t??p,h=g.useCallback(y=>{const S=typeof y=="function"?y(x):y;r?r(S):b(S),document.cookie=`${tl}=${S}; path=/; max-age=${al}`},[r,x]),m=g.useCallback(()=>l?d(y=>!y):h(y=>!y),[l,h,d]);g.useEffect(()=>{const y=S=>{S.key===ol&&(S.metaKey||S.ctrlKey)&&(S.preventDefault(),m())};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[m]);const C=x?"expanded":"collapsed",E=g.useMemo(()=>({state:C,open:x,setOpen:h,isMobile:l,openMobile:w,setOpenMobile:d,toggleSidebar:m}),[C,x,h,l,w,d,m]);return a.jsx(fs.Provider,{value:E,children:a.jsx(xr,{delayDuration:0,children:a.jsx("div",{style:{"--sidebar-width":rl,"--sidebar-width-icon":ul,...u},className:c("wu-group/sidebar-wrapper wu-flex wu-min-h-[calc(100svh-48px)] wu-w-full",s),ref:i,...n,children:o})})})});ps.displayName="SidebarProvider";const bs=g.forwardRef(({side:e="left",variant:t="sidebar",collapsible:r="offcanvas",className:s,children:u,...o},n)=>{const{isMobile:i,state:l,openMobile:w,setOpenMobile:d}=Ue();return r==="none"?a.jsx("div",{className:c("wu-flex wu-h-full wu-w-[--sidebar-width] wu-flex-col",s),ref:n,...o,children:u}):i?a.jsx(qr,{open:w,onOpenChange:d,...o,children:a.jsx(va,{"data-sidebar":"sidebar","data-mobile":"true",className:"wu-w-[--sidebar-width] wu-bg-blue-sidebar wu-p-0 [&>button]:wu-hidden",style:{"--sidebar-width":sl},side:e,children:a.jsx("div",{className:"wu-flex wu-flex-col wu-w-full wu-h-full",children:u})})}):a.jsxs("div",{ref:n,className:"wu-hidden wu-group wu-peer md:wu-block","data-state":l,"data-collapsible":l==="collapsed"?r:"","data-variant":t,"data-side":e,children:[a.jsx("div",{className:c("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:c("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",s),...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:u})})]})});bs.displayName="Sidebar";const gs=g.forwardRef(({className:e,onClick:t,children:r,...s},u)=>{const{toggleSidebar:o}=Ue();return a.jsxs(Qe,{ref:u,"data-sidebar":"trigger",variant:"secondary",className:c("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:n=>{t==null||t(n),o()},...s,children:[r,a.jsx("span",{className:"wu-sr-only",children:"Toggle Sidebar"})]})});gs.displayName="SidebarTrigger";const nl=g.forwardRef(({className:e,...t},r)=>{const{toggleSidebar:s}=Ue();return a.jsx("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:s,title:"Toggle Sidebar",className:c("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})});nl.displayName="SidebarRail";const hs=g.forwardRef(({className:e,...t},r)=>a.jsx("main",{ref:r,className:c("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}));hs.displayName="SidebarInset";const ll=g.forwardRef(({className:e,...t},r)=>a.jsx(da,{ref:r,"data-sidebar":"input",className:c("wu-h-8 wu-w-full wu-shadow-none focus-visible:wu-ring-2",e),...t}));ll.displayName="SidebarInput";const ms=g.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,"data-sidebar":"header",className:c("wu-flex wu-flex-col wu-gap-2 wu-p-2",e),...t}));ms.displayName="SidebarHeader";const xs=g.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,"data-sidebar":"footer",className:c("wu-flex wu-flex-col wu-gap-2 wu-pb-2",e),...t}));xs.displayName="SidebarFooter";const il=g.forwardRef(({className:e,...t},r)=>a.jsx(ws,{ref:r,"data-sidebar":"separator",className:c("wu-mx-2 wu-w-auto",e),...t}));il.displayName="SidebarSeparator";const ys=g.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,"data-sidebar":"content",className:c("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}));ys.displayName="SidebarContent";const vs=g.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,"data-sidebar":"group",className:c("wu-relative wu-flex wu-w-full wu-min-w-0 wu-flex-col wu-p-2",e),...t}));vs.displayName="SidebarGroup";const Ns=g.forwardRef(({className:e,asChild:t=!1,...r},s)=>{const u=t?Xe.Slot:"div";return a.jsx(u,{ref:s,"data-sidebar":"group-label",className:c("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),...r})});Ns.displayName="SidebarGroupLabel";const cl=g.forwardRef(({className:e,asChild:t=!1,...r},s)=>{const u=t?Xe.Slot:"button";return a.jsx(u,{ref:s,"data-sidebar":"group-action",className:c("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),...r})});cl.displayName="SidebarGroupAction";const Cs=g.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,"data-sidebar":"group-content",className:c("wu-w-full wu-text-sm",e),...t}));Cs.displayName="SidebarGroupContent";const Da=g.forwardRef(({className:e,...t},r)=>a.jsx("ul",{ref:r,"data-sidebar":"menu",className:c("wu-flex wu-w-full wu-min-w-0 wu-flex-col wu-gap-1",e),...t}));Da.displayName="SidebarMenu";const Ss=g.forwardRef(({className:e,...t},r)=>a.jsx("li",{ref:r,"data-sidebar":"menu-item",className:c("wu-group/menu-item wu-relative",e),...t}));Ss.displayName="SidebarMenuItem";const wl=Ce.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"}}),Es=g.forwardRef(({asChild:e=!1,isActive:t=!1,variant:r="default",size:s="default",tooltip:u,className:o,...n},i)=>{const l=e?Xe.Slot:"button",{isMobile:w,state:d}=Ue(),p=a.jsx(l,{ref:i,"data-sidebar":"menu-button","data-size":s,"data-active":t,className:c(wl({variant:r,size:s}),o),...n});return u?(typeof u=="string"&&(u={children:u}),a.jsxs(yr,{children:[a.jsx(vr,{asChild:!0,children:p}),a.jsx(fa,{side:"right",align:"center",hidden:d!=="collapsed"||w,...u})]})):p});Es.displayName="SidebarMenuButton";const dl=g.forwardRef(({className:e,asChild:t=!1,showOnHover:r=!1,...s},u)=>{const o=t?Xe.Slot:"button";return a.jsx(o,{ref:u,"data-sidebar":"menu-action",className:c("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",r&&"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),...s})});dl.displayName="SidebarMenuAction";const fl=g.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,"data-sidebar":"menu-badge",className:c("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}));fl.displayName="SidebarMenuBadge";const pl=g.forwardRef(({className:e,showIcon:t=!1,...r},s)=>{const u=g.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return a.jsxs("div",{ref:s,"data-sidebar":"menu-skeleton",className:c("wu-flex wu-h-8 wu-items-center wu-gap-2 wu-rounded-md wu-px-2",e),...r,children:[t&&a.jsx(ds,{className:"wu-rounded-md wu-size-4","data-sidebar":"menu-skeleton-icon"}),a.jsx(ds,{className:"wu-h-4 wu-max-w-[--skeleton-width] wu-flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":u}})]})});pl.displayName="SidebarMenuSkeleton";const bl=g.forwardRef(({className:e,...t},r)=>a.jsx("ul",{ref:r,"data-sidebar":"menu-sub",className:c("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}));bl.displayName="SidebarMenuSub";const gl=g.forwardRef(({...e},t)=>a.jsx("li",{ref:t,...e}));gl.displayName="SidebarMenuSubItem";const hl=g.forwardRef(({asChild:e=!1,size:t="md",isActive:r,className:s,...u},o)=>{const n=e?Xe.Slot:"a";return a.jsx(n,{ref:o,"data-sidebar":"menu-sub-button","data-size":t,"data-active":r,className:c("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",s),...u})});hl.displayName="SidebarMenuSubButton";const ml=({children:e,Sidebar:t,className:r,defaultOpen:s=!0,open:u,onOpenChange:o,style:n})=>a.jsxs(ps,{defaultOpen:s,open:u,onOpenChange:o,children:[a.jsxs(bs,{variant:"sidebar",collapsible:"icon",className:c("wu-top-12 wu-h-[calc(100%-48px)] wu-shadow-sidebar wu-border-none",r),style:n,role:"complementary",children:[a.jsx(ms,{className:"wu-py-2",children:a.jsx(Ts,{})}),t]}),a.jsx(hs,{className:"wu-contain-inline-size",children:e})]}),Ts=e=>{const{state:t,isMobile:r,openMobile:s}=Ue();return a.jsx(gs,{...e,children:a.jsx(Sa,{showMenu:r?s:t==="expanded"})})},xl=({className:e,children:t,...r})=>{const s=f.useRef(null),u=f.useRef(null),o=({currentTarget:i})=>{const{scrollTop:l,clientHeight:w,scrollHeight:d}=i;s.current&&s.current.classList.toggle("wu-border-[#1b338014]",l!==0),u.current&&u.current.classList.toggle("wu-border-[#1b338014]",l+w!==d)},n="wu-w-[calc(100%-16px)] wu-mx-auto wu-border-transparent";return a.jsxs(ys,{...r,className:c("wu-overflow-hidden wu-gap-0",e),children:[a.jsx("hr",{className:n,ref:s}),a.jsx(tt,{onScroll:o,className:"wu-gap-2",thumbColor:"#b9c3dc",railColor:"#00000000","data-testid":"scroll-area",children:t}),a.jsx("hr",{className:n,ref:u})]})},yl=e=>a.jsx(xs,{...e,children:e.children}),vl=({label:e,children:t,...r})=>a.jsxs(vs,{...r,className:"wu-p-0",children:[a.jsx("div",{className:"wu-h-8",children:a.jsx(Ns,{className:"wu-items-end wu-px-4 wu-text-xs wu-font-normal wu-leading-4 wu-text-blue-q",children:e})}),a.jsx(Cs,{children:a.jsx(Da,{children:t})})]}),Nl=e=>a.jsx(Da,{...e}),Cl=({Icon:e,children:t,className:r,isActive:s,...u})=>{const{state:o}=Ue(),[n,i]=f.useState(),l=t&&f.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:c("wu-text-sm wu-leading-4 wu-transition-opacity wu-duration-150",o==="collapsed"&&"wu-opacity-0"),children:t.props.children})]})}),w=f.useRef(null);return f.useEffect(()=>{var d;i(((d=w.current)==null?void 0:d.textContent)||"")},[]),a.jsx(Ss,{...u,className:"wu-flex wu-items-center wu-gap-2 wu-px-2",children:a.jsx(Es,{className:c("wu-flex wu-items-center wu-text-blue-q hover:wu-bg-blue-sidebarHover wu-cursor-pointer wu-h-8 wu-rounded-sm",r,s&&"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:s,tooltip:n,asChild:!0,ref:w,children:l})})},Sl=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"}]]),Ma=(e,t,r=1)=>{const s=e.match(/hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*([\d.]+)\s*)?\)/);if(!s)throw new Error("Invalid HSL color format");const u=parseFloat(s[1]),o=parseFloat(s[2]),n=Math.max(0,parseFloat(s[3])+t);return`hsl(${u} ${o}% ${n}% / ${r})`},El=({index:e,viewIndex:t,length:r,itemHeight:s})=>{const u=(e-t+r)%r;let o;u===0?o=0:u===r-1&&r>=2?o=-1:u===r-2&&r>=3?o=-2:u===1?o=1:u===2?o=2:u===r-3&&r>=4?o=-3:o=3;const n=Sl.get(o)||{},i=o>0?s+28+(o-1)*20:n.top;return{position:o,styles:{...n,...o>0&&{top:`${i}px`},height:o>0?"40px":s}}},at={LIGHTNESS_STEP:8,BORDER_LIGHTNESS:10,CONTENT_LIGHTNESS:45,CONTENT_HEIGHT:"calc(100% - 2rem)",FONT_SIZE_ACTIVE:"14px",FONT_SIZE_INACTIVE:"12px"},Tl=({children:e,className:t,header:r,baseColor:s,position:u=0,style:o,...n})=>{const i=u===0,l=u<=0,w={border:i?`4px solid ${Ma(s,at.BORDER_LIGHTNESS)}`:"",...o},d={backgroundColor:Ma(s,u*at.LIGHTNESS_STEP),fontSize:i?at.FONT_SIZE_ACTIVE:at.FONT_SIZE_INACTIVE,transition:"all 0.3s ease"},p={backgroundColor:Ma(s,at.CONTENT_LIGHTNESS),height:at.CONTENT_HEIGHT};return a.jsxs("div",{className:c("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:w,...n,children:[a.jsx("div",{style:d,className:"wu-p-2 wu-text-white",children:r}),l&&a.jsx("div",{className:"wu-p-2 wu-overflow-y-auto wu-text-sm",style:p,children:e})]})},Il=({children:e,Trigger:t,Header:r,styles:s={},classNames:u={},open:o,onOpenChange:n,itemHeight:i})=>{const l={height:i,...s.Trigger};return a.jsxs(Yr,{open:o,onOpenChange:n,children:[a.jsx(Kr,{className:c("wu-bg-gray-25 wu-z-0 wu-w-full wu-rounded-lg wu-rounded-tl-none wu-relative",u.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(Ea,{className:c("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",u.Content),hideCloseButton:!0,isStackedCard:!0,style:s.Content,children:[a.jsx(sr.DialogClose,{className:c("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",u.CloseButton),style:s.CloseButton,"aria-label":"Close dialog",children:a.jsx(Le,{icon:"wm-close",className:"wu-text-lg wu-m-4 wu-cursor-pointer"})}),r&&a.jsx(Ta,{className:c("wu-h-12 wu-p-2 wu-pl-4 wu-bg-white/25 wu-backdrop-blur-[24px]",u.Header),style:s.Header,children:r}),e]})]})};function kl({controlled:e,default:t,name:r,state:s="value"}){const{current:u}=g.useRef(e!==void 0),[o,n]=g.useState(t),i=u?e:o;if(process.env.NODE_ENV!=="production"){g.useEffect(()=>{u!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${u?"":"un"}controlled ${s} state of ${r} to be ${u?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${r} 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(`
|
|
5
|
-
`))},[s,r,e]);const{current:w}=
|
|
6
|
-
`))},[JSON.stringify(t)])}const l=g.useCallback(w=>{u||n(w)},[]);return[i,l]}const Is={};function rt(e,t){const r=g.useRef(Is);return r.current===Is&&(r.current=e(t)),r}const _a=g[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Dl=_a&&_a!==g.useLayoutEffect?_a:e=>e();function xe(e){const t=rt(Ml).current;return t.next=e,Dl(t.effect),t.trampoline}function Ml(){const e={next:void 0,callback:_l,trampoline:(...t)=>{var r;return(r=e.callback)==null?void 0:r.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function _l(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const Al=[];function ks(e){g.useEffect(e,Al)}const gt=0;class Ft{constructor(){It(this,"currentId",gt);It(this,"clear",()=>{this.currentId!==gt&&(clearTimeout(this.currentId),this.currentId=gt)});It(this,"disposeEffect",()=>this.clear)}static create(){return new Ft}start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=gt,r()},t)}isStarted(){return this.currentId!==gt}}function Aa(){const e=rt(Ft.create).current;return ks(e.disposeEffect),e}const Ds=0;class Wa extends Ft{constructor(){super(...arguments);It(this,"clear",()=>{this.currentId!==Ds&&(clearInterval(this.currentId),this.currentId=Ds)})}static create(){return new Wa}start(r,s){this.clear(),this.currentId=setInterval(()=>{s()},r)}}function Wl(){const e=rt(Wa.create).current;return ks(e.disposeEffect),e}const ge=typeof document<"u"?g.useLayoutEffect:()=>{};function Pa(e){const t=rt(Pl,e).current;return t.next=e,ge(t.effect),t}function Pl(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function Ll(){const[,e]=g.useState({});return g.useCallback(()=>{e({})},[])}function Ol(){return typeof window<"u"}function Ms(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Fl(e){return Ol()?e instanceof HTMLElement||e instanceof Ms(e).HTMLElement:!1}function Bl(e){return(e==null?void 0:e.ownerDocument)||document}const Bt=typeof navigator<"u",La=Hl(),ql=Ul(),Vl=$l();typeof CSS>"u"||!CSS.supports||CSS.supports("-webkit-backdrop-filter:none");const zl=La.platform==="MacIntel"&&La.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(La.platform);Bt&&ql.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints,Vl.includes("jsdom/");function Hl(){if(!Bt)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 $l(){if(!Bt)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:r})=>`${t}/${r}`).join(" "):navigator.userAgent}function Ul(){if(!Bt)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}const Oa=g.createContext(void 0);process.env.NODE_ENV!=="production"&&(Oa.displayName="NumberFieldRootContext");function qt(){const e=g.useContext(Oa);if(e===void 0)throw new Error("Base UI: NumberFieldRootContext is missing. NumberField parts must be placed within <NumberField.Root>.");return e}function _e(){}const Be=Object.freeze({});let _s=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 Fa={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},jl={valid(e){return e===null?null:e?{[_s.valid]:""}:{[_s.invalid]:""}}},As=g.createContext({invalid:void 0,controlId:void 0,setControlId:_e,labelId:void 0,setLabelId:_e,messageIds:[],setMessageIds:_e,name:void 0,validityData:{state:Fa,errors:[],error:"",value:"",initialValue:null},setValidityData:_e,disabled:void 0,touched:!1,setTouched:_e,dirty:!1,setDirty:_e,filled:!1,setFilled:_e,focused:!1,setFocused:_e,validate:()=>null,validationMode:"onBlur",validationDebounceTime:0,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1}});process.env.NODE_ENV!=="production"&&(As.displayName="FieldRootContext");function Vt(e=!0){const t=g.useContext(As);if(t.setControlId===_e&&!e)throw new Error("Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.");return t}const ht={inputValue:()=>null,value:()=>null};function Ws(e,t,r,s){const u=rt(Ps).current;return Yl(u,e,t,r,s)&&Ls(u,[e,t,r,s]),u.callback}function Gl(e){const t=rt(Ps).current;return Kl(t,e)&&Ls(t,e),t.callback}function Ps(){return{callback:null,cleanup:null,refs:[]}}function Yl(e,t,r,s,u){return e.refs[0]!==t||e.refs[1]!==r||e.refs[2]!==s||e.refs[3]!==u}function Kl(e,t){return e.refs.length!==t.length||e.refs.some((r,s)=>r!==t[s])}function Ls(e,t){if(e.refs=t,t.every(r=>r==null)){e.callback=null;return}e.callback=r=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),r!=null){const s=Array(t.length).fill(null);for(let u=0;u<t.length;u+=1){const o=t[u];if(o!=null)switch(typeof o){case"function":{const n=o(r);typeof n=="function"&&(s[u]=n);break}case"object":{o.current=r;break}}}e.cleanup=()=>{for(let u=0;u<t.length;u+=1){const o=t[u];if(o!=null)switch(typeof o){case"function":{const n=s[u];typeof n=="function"?n():o(null);break}case"object":{o.current=null;break}}}}}}}const Jl=parseInt(g.version,10);function Xl(e){return Jl>=e}function Os(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Zl(e,t){const r={};for(const s in e){const u=e[s];if(t!=null&&t.hasOwnProperty(s)){const o=t[s](u);o!=null&&Object.assign(r,o);continue}u===!0?r[`data-${s.toLowerCase()}`]="":u&&(r[`data-${s.toLowerCase()}`]=u.toString())}return r}function Ql(e,t){return typeof e=="function"?e(t):e}const mt={};function zt(e,t,r,s,u){let o={...Ba(e,mt)};return t&&(o=Ht(o,t)),r&&(o=Ht(o,r)),s&&(o=Ht(o,s)),o}function Rl(e){if(e.length===0)return mt;if(e.length===1)return Ba(e[0],mt);let t={...Ba(e[0],mt)};for(let r=1;r<e.length;r+=1)t=Ht(t,e[r]);return t}function Ht(e,t){return Fs(t)?t(e):ei(e,t)}function ei(e,t){if(!t)return e;for(const r in t){const s=t[r];switch(r){case"style":{e[r]=Os(e.style,s);break}case"className":{e[r]=Bs(e.className,s);break}default:ti(r,s)?e[r]=ai(e[r],s):e[r]=s}}return e}function ti(e,t){const r=e.charCodeAt(0),s=e.charCodeAt(1),u=e.charCodeAt(2);return r===111&&s===110&&u>=65&&u<=90&&(typeof t=="function"||typeof t>"u")}function Fs(e){return typeof e=="function"}function Ba(e,t){return Fs(e)?e(t):e??mt}function ai(e,t){return t?e?r=>{if(ri(r)){const u=r;qa(u);const o=t(u);return u.baseUIHandlerPrevented||e==null||e(u),o}const s=t(r);return e==null||e(r),s}:t:e}function qa(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Bs(e,t){return t?e?t+" "+e:t:e}function ri(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function xt(e,t,r={}){const s=t.render,u=si(t,r);if(r.enabled===!1)return null;const o=r.state??Be;return ui(e,s,u,o)}function si(e,t={}){const{className:r,render:s}=e,{state:u=Be,ref:o,props:n,stateAttributesMapping:i,enabled:l=!0}=t,w=l?Ql(r,u):void 0,d=l?Zl(u,i):Be,p=l?Os(d,Array.isArray(n)?Rl(n):n)??Be:Be;return typeof document<"u"&&(l?Array.isArray(o)?p.ref=Gl([p.ref,qs(s),...o]):p.ref=Ws(p.ref,qs(s),o):Ws(null,null)),l?(w!==void 0&&(p.className=Bs(p.className,w)),p):Be}function ui(e,t,r,s){if(t){if(typeof t=="function")return t(r,s);const u=zt(r,t.props);return u.ref=r.ref,g.cloneElement(t,u)}if(e&&typeof e=="string")return oi(e,r);throw new Error("Base UI: Render element or function are not defined.")}function oi(e,t){return e==="button"?a.jsx("button",{type:"button",...t}):e==="img"?a.jsx("img",{alt:"",...t}):g.createElement(e,t)}function qs(e){return e&&typeof e!="function"?Xl(19)?e.props.ref:e.ref:null}const Vs=new Map;function yt(e,t){const r=JSON.stringify({locale:e,options:t}),s=Vs.get(r);if(s)return s;const u=new Intl.NumberFormat(e,t);return Vs.set(r,u),u}function st(e,t,r){return e==null?"":yt(t,r).format(e)}function zs(e,t,r){return st(e,t,{...r,maximumFractionDigits:20})}const ni=["零","〇","一","二","三","四","五","六","七","八","九"],li={零:"0","〇":"0",一:"1",二:"2",三:"3",四:"4",五:"5",六:"6",七:"7",八:"8",九:"9"},Hs=["٠","١","٢","٣","٤","٥","٦","٧","٨","٩"],$s=["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"],Va=["0","1","2","3","4","5","6","7","8","9"],Us=["%","٪","%","﹪"],js=["‰","؉"],Gs=["−","-","‒","–","—","﹣"],Ys=["+","﹢"],ii=".",ci=",",wi=new RegExp(`[${Hs.join("")}]`,"g"),di=new RegExp(`[${$s.join("")}]`,"g"),fi=new RegExp(`[${Va.join("")}]`,"g"),pi=new RegExp(`[${ni.join("")}]`,"g"),bi=new RegExp(`[${Us.join("")}]`),gi=new RegExp(`[${js.join("")}]`),za=/[٠١٢٣٤٥٦٧٨٩]/,Ks=/[۰۱۲۳۴۵۶۷۸۹]/,Ha=/[零〇一二三四五六七八九]/,Js=new RegExp(`[${Va.join("")}]`),hi=[".",",",ii,ci,"٫","٬"],mi=new RegExp("\\p{Zs}","u"),xi=["+",...Ys],yi=["-",...Gs],$t=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),vi=e=>e.replace(/[-\\\]^]/g,t=>`\\${t}`),Xs=e=>`[${e.map(vi).join("")}]`,Zs=Xs(["-"].concat(Gs)),Qs=Xs(["+"].concat(Ys)),Rs=new RegExp(Zs,"gu"),eu=new RegExp(Qs,"gu"),vt=new RegExp(Zs),Ut=new RegExp(Qs);function $a(e,t){const r=yt(e,t).formatToParts(11111.1),s={};return r.forEach(u=>{s[u.type]=u.value}),yt(e).formatToParts(.1).forEach(u=>{u.type==="decimal"&&(s[u.type]=u.value)}),s}function ut(e,t,r){if(e==null)return null;let s=String(e).replace(new RegExp("\\p{Cf}","gu"),"").trim();s=s.replace(Rs,"-").replace(eu,"+");let u=!1;const o=s.match(/([+-])\s*$/);o&&(o[1]==="-"&&(u=!0),s=s.replace(/([+-])\s*$/,""));const n=s.match(/^\s*([+-])/);n&&(n[1]==="-"&&(u=!0),s=s.replace(/^\s*[+-]/,""));let i=t;i===void 0&&(za.test(s)||Ks.test(s)?i="ar":Ha.test(s)&&(i="zh"));const{group:l,decimal:w,currency:d}=$a(i,r),p=yt(i,r).formatToParts(1).filter(T=>T.type==="unit").map(T=>$t(T.value)),b=p.length?new RegExp(p.join("|"),"g"):null;let x=null;l&&(x=new RegExp("\\p{Zs}","u").test(l)?new RegExp("\\p{Zs}","gu"):new RegExp($t(l),"g"));let m=[{regex:l?x:null,replacement:""},{regex:w?new RegExp($t(w),"g"):null,replacement:"."},{regex:/./g,replacement:"."},{regex:/,/g,replacement:""},{regex:/٫/g,replacement:"."},{regex:/٬/g,replacement:""},{regex:d?new RegExp($t(d),"g"):null,replacement:""},{regex:b,replacement:""},{regex:wi,replacement:T=>String(Hs.indexOf(T))},{regex:di,replacement:T=>String($s.indexOf(T))},{regex:fi,replacement:T=>String(Va.indexOf(T))},{regex:pi,replacement:T=>li[T]}].reduce((T,{regex:_,replacement:M})=>_?T.replace(_,M):T,s);const C=m.lastIndexOf(".");if(C!==-1&&(m=`${m.slice(0,C).replace(/\./g,"")}.${m.slice(C+1).replace(/\./g,"")}`),/^[-+]?Infinity$/i.test(s)||/[∞]/.test(s))return null;const E=(u?"-":"")+m;let y=parseFloat(E);const S=r==null?void 0:r.style,v=S==="unit"&&(r==null?void 0:r.unit)==="percent",k=bi.test(e)||S==="percent";return gi.test(e)?y/=1e3:!v&&k&&(y/=100),Number.isNaN(y)?null:y}const Ni={...g};let tu=0;function Ci(e,t="mui"){const[r,s]=g.useState(e),u=e||r;return g.useEffect(()=>{r==null&&(tu+=1,s(`${t}-${tu}`))},[r,t]),u}const au=Ni.useId;function Si(e,t){if(au!==void 0){const r=au();return e??`${t}-${r}`}return Ci(e,t)}function Ei(e){return Si(e,"base-ui")}const Ti=60,Ii=400,ki=50,Di=3,Mi=8,jt=1;function _i(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function Gt(e,t={}){return parseFloat(yt("en-US",{maximumFractionDigits:t.maximumFractionDigits,minimumFractionDigits:t.minimumFractionDigits,useGrouping:!1}).format(e))}function Ai(e,{step:t,minWithDefault:r,maxWithDefault:s,minWithZeroDefault:u,format:o,snapOnStep:n,small:i}){if(e===null)return e;const l=_i(e,r,s);if(t!=null&&n){if(i){const d=(l-u)/t,p=Math.round(d),b=u+p*t;return Gt(b,o)}const w=r!==Number.MIN_SAFE_INTEGER?r:u;if(t>0){const d=l-t,p=Math.floor((d-w)/t);return Gt(w+p*t+t,o)}if(t<0){const d=Math.abs(t),p=l-t,b=Math.ceil((p-w)/d);return Gt(w+b*d+t,o)}}return Gt(l,o)}function ru(e,t,r){let s=!1,u=!1;const o=Be;return{reason:e,event:t??new Event("base-ui"),cancel(){s=!0},allowPropagation(){u=!0},get isCanceled(){return s},get isPropagationAllowed(){return u},...o}}function Yt(e,t,r){const s=Be;return{reason:e,event:t??new Event("base-ui"),...s}}function Wi(e){e.preventDefault(),e.stopPropagation()}function Pi(e){return"nativeEvent"in e}const su=g.forwardRef(function(t,r){const{id:s,min:u,max:o,smallStep:n=.1,step:i=1,largeStep:l=10,required:w=!1,disabled:d=!1,readOnly:p=!1,name:b,defaultValue:x,value:h,onValueChange:m,onValueCommitted:C,allowWheelScrub:E=!1,snapOnStep:y=!1,format:S,locale:v,render:k,className:D,inputRef:T,..._}=t,{setControlId:M,setDirty:L,validityData:P,setValidityData:O,disabled:A,setFilled:F,invalid:q,name:W,state:U}=Vt(),z=A||d,Z=W??b,[ae,le]=g.useState(!1),ee=u??Number.MIN_SAFE_INTEGER,B=o??Number.MAX_SAFE_INTEGER,K=u??0,Q=S==null?void 0:S.style,j=g.useRef(null),Te=Ei(s);ge(()=>(M(Te),()=>{M(void 0)}),[Te,M]);const[Ie,ye]=kl({controlled:h,default:x,name:"NumberField",state:"value"}),I=Ie??null,V=Pa(I);ge(()=>{F(I!==null)},[F,I]);const ne=Ll(),$=Pa(S),ie=xe(m),te=g.useRef(!1),de=xe((re,G)=>{te.current=!1,C==null||C(re,G)}),fe=Aa(),Ae=Wl(),ve=Aa(),We=g.useRef(!1),Pe=g.useRef(0),Oe=g.useRef(!0),Ge=g.useRef(null),ta=g.useRef(()=>{});ge(()=>{P.initialValue===null&&I!==P.initialValue&&O(re=>({...re,initialValue:I}))},[O,P.initialValue,I]);const[Ye,Ke]=g.useState(()=>h!==void 0?uu(I,v,S):st(I,v,S)),[St,ot]=g.useState("numeric"),se=xe(()=>{const{decimal:re,group:G,currency:ce}=$a(v,S),J=new Set;hi.forEach(oe=>J.add(oe)),re&&J.add(re),G&&(J.add(G),mi.test(G)&&J.add(" "));const ke=Q==="percent"||Q==="unit"&&(S==null?void 0:S.unit)==="percent",Ne=Q==="percent"||Q==="unit"&&(S==null?void 0:S.unit)==="permille";return ke&&Us.forEach(oe=>J.add(oe)),Ne&&js.forEach(oe=>J.add(oe)),Q==="currency"&&ce&&J.add(ce),xi.forEach(oe=>J.add(oe)),ee<0&&yi.forEach(oe=>J.add(oe)),J}),he=xe(re=>re!=null&&re.altKey?n:re!=null&&re.shiftKey?l:i),Et=xe((re,G,ce)=>{const J=G,ke=G&&Pi(G)?G.nativeEvent:G,Ne=ru("none",ke),oe=Ai(re,{step:ce?he(J)*ce:void 0,format:$.current,minWithDefault:ee,maxWithDefault:B,minWithZeroDefault:K,snapOnStep:y,small:(J==null?void 0:J.altKey)??!1});if(oe!==I||re!==I||Oe.current===!1){if(Ge.current=oe,ie==null||ie(oe,Ne),Ne.isCanceled)return;ye(oe),L(oe!==P.initialValue),te.current=!0}Oe.current&&Ke(st(oe,v,S)),ne()}),Tt=xe((re,G,ce,J)=>{const ke=ce??V.current,Ne=typeof ke=="number"?ke+re*G:Math.max(0,u??0);Et(Ne,J,G)}),nt=xe(()=>{ve.clear(),fe.clear(),Ae.clear(),ta.current(),Pe.current=0}),Ju=xe((re,G)=>{if(nt(),!j.current)return;const ce=Ms(j.current);function J(Ne){Ne.preventDefault()}ce.addEventListener("contextmenu",J),ta.current=()=>{ce.removeEventListener("contextmenu",J)},ce.addEventListener("pointerup",Ne=>{We.current=!1,nt();const oe=Ge.current??V.current;de(oe,Yt("none",Ne))},{once:!0});function ke(){const Ne=he(G)??jt;Tt(Ne,re?1:-1,void 0,G)}ke(),fe.start(Ii,()=>{Ae.start(Ti,ke)})});ge(function(){if(!Oe.current)return;const G=h!==void 0?uu(I,v,S):st(I,v,S);G!==Ye&&Ke(G)}),ge(function(){if(!zl)return;let G="text";ee>=0&&(G="decimal"),ot(G)},[ee,Q]),g.useEffect(()=>()=>nt(),[nt]),g.useEffect(function(){const G=j.current;if(z||p||!E||!G)return;function ce(J){if(J.ctrlKey||Bl(j.current).activeElement!==j.current)return;J.preventDefault();const ke=he(J)??jt;Tt(ke,J.deltaY>0?-1:1,void 0,J)}return G.addEventListener("wheel",ce),()=>{G.removeEventListener("wheel",ce)}},[E,Tt,z,p,l,i,he]);const ar=g.useMemo(()=>({...U,disabled:z,readOnly:p,required:w,value:I,inputValue:Ye,scrubbing:ae}),[U,z,p,w,I,Ye,ae]),Tc=g.useMemo(()=>({inputRef:j,inputValue:Ye,value:I,startAutoChange:Ju,stopAutoChange:nt,minWithDefault:ee,maxWithDefault:B,disabled:z,readOnly:p,id:Te,setValue:Et,incrementValue:Tt,getStepAmount:he,allowInputSyncRef:Oe,formatOptionsRef:$,valueRef:V,lastChangedValueRef:Ge,hasPendingCommitRef:te,isPressedRef:We,intentionalTouchCheckTimeout:ve,movesAfterTouchRef:Pe,name:Z,required:w,invalid:q,inputMode:St,getAllowedNonNumericKeys:se,min:u,max:o,setInputValue:Ke,locale:v,isScrubbing:ae,setIsScrubbing:le,state:ar,onValueCommitted:de}),[j,Ye,I,Ju,nt,ee,B,z,p,Te,Et,Tt,he,Oe,$,V,Ge,te,We,ve,Pe,Z,w,q,St,se,u,o,Ke,v,ae,ar,de]),Ic=xt("div",t,{ref:r,state:ar,props:_,stateAttributesMapping:ht});return a.jsxs(Oa.Provider,{value:Tc,children:[Ic,Z&&a.jsx("input",{type:"hidden",name:Z,ref:T,value:I??"",disabled:z,required:w})]})});process.env.NODE_ENV!=="production"&&(su.displayName="NumberFieldRoot");function uu(e,t,r){return(r==null?void 0:r.maximumFractionDigits)!=null||(r==null?void 0:r.minimumFractionDigits)!=null?st(e,t,r):zs(e,t,r)}const ou=g.forwardRef(function(t,r){const{render:s,className:u,...o}=t,{state:n}=qt();return xt("div",t,{ref:r,state:n,props:[{role:"group"},o],stateAttributesMapping:ht})});process.env.NODE_ENV!=="production"&&(ou.displayName="NumberFieldGroup");let Ua;process.env.NODE_ENV!=="production"&&(Ua=new Set);function nu(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");Ua.has(t)||(Ua.add(t),console.error(`Base UI: ${t}`))}}const lu=g.createContext(void 0);process.env.NODE_ENV!=="production"&&(lu.displayName="CompositeRootContext");function Li(e=!1){const t=g.useContext(lu);if(t===void 0&&!e)throw new Error("Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.");return t}function Oi(e){const{focusableWhenDisabled:t,disabled:r,composite:s=!1,tabIndex:u=0,isNativeButton:o}=e,n=s&&t!==!1,i=s&&t===!1;return{props:g.useMemo(()=>{const w={onKeyDown(d){r&&t&&d.key!=="Tab"&&d.preventDefault()}};return s||(w.tabIndex=u,!o&&r&&(w.tabIndex=t?u:-1)),(o&&(t||n)||!o&&r)&&(w["aria-disabled"]=r),o&&(!t||i)&&(w.disabled=r),w},[s,r,t,n,i,o,u])}}function iu(e={}){const{disabled:t=!1,focusableWhenDisabled:r,tabIndex:s=0,native:u=!0}=e,o=g.useRef(null),n=Li(!0)!==void 0,i=xe(()=>{const b=o.current;return!!((b==null?void 0:b.tagName)==="A"&&(b!=null&&b.href))}),{props:l}=Oi({focusableWhenDisabled:r,disabled:t,composite:n,tabIndex:s,isNativeButton:u});process.env.NODE_ENV!=="production"&&g.useEffect(()=>{if(!o.current)return;const b=o.current.tagName==="BUTTON";u?b||nu("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`."):b&&nu("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`.")},[u]);const w=g.useCallback(()=>{const b=o.current;Fi(b)&&n&&t&&l.disabled===void 0&&b.disabled&&(b.disabled=!1)},[t,l.disabled,n]);ge(w,[w]);const d=g.useCallback((b={})=>{const{onClick:x,onMouseDown:h,onKeyUp:m,onKeyDown:C,onPointerDown:E,...y}=b;return zt({type:u?"button":void 0,onClick(v){if(t){v.preventDefault();return}x==null||x(v)},onMouseDown(v){t||h==null||h(v)},onKeyDown(v){if(t||(qa(v),C==null||C(v)),v.baseUIHandlerPrevented)return;const k=v.target===v.currentTarget&&!u&&!i()&&!t,D=v.key==="Enter",T=v.key===" ";k&&((T||D)&&v.preventDefault(),D&&(x==null||x(v)))},onKeyUp(v){t||(qa(v),m==null||m(v)),!v.baseUIHandlerPrevented&&v.target===v.currentTarget&&!u&&!t&&v.key===" "&&(x==null||x(v))},onPointerDown(v){if(t){v.preventDefault();return}E==null||E(v)}},u?void 0:{role:"button"},l,y)},[t,l,u,i]),p=xe(b=>{o.current=b,w()});return{getButtonProps:d,buttonRef:p}}function Fi(e){return Fl(e)&&e.tagName==="BUTTON"}function cu(e){const{allowInputSyncRef:t,disabled:r,formatOptionsRef:s,getStepAmount:u,id:o,incrementValue:n,inputRef:i,inputValue:l,intentionalTouchCheckTimeout:w,isIncrement:d,isPressedRef:p,locale:b,maxWithDefault:x,minWithDefault:h,movesAfterTouchRef:m,readOnly:C,setValue:E,startAutoChange:y,stopAutoChange:S,value:v,valueRef:k,lastChangedValueRef:D,onValueCommitted:T}=e,_=g.useRef({x:0,y:0}),M=g.useRef(!1),L=g.useRef(!1),P=g.useRef(""),O=v!=null&&v<=h,A=v!=null&&v>=x,F=xe(W=>{t.current=!0;const U=ut(l,b,s.current);U!==null&&(k.current=U,E(U,W))}),q=g.useMemo(()=>({disabled:r||(d?A:O),"aria-readonly":C||void 0,"aria-label":d?"Increase":"Decrease","aria-controls":o,tabIndex:-1,style:{WebkitUserSelect:"none",userSelect:"none"},onTouchStart(){M.current=!0},onTouchEnd(){M.current=!1},onClick(W){const U=r||C||(d?A:O);if(W.defaultPrevented||U||(P.current==="touch"?L.current:W.detail!==0))return;F(W.nativeEvent);const z=u(W)??jt,Z=k.current;n(z,d?1:-1,void 0,W.nativeEvent);const ae=D.current??k.current;ae!==Z&&T(ae,Yt("none",W.nativeEvent))},onPointerDown(W){var Z;const U=!W.button||W.button===0,z=r||(d?A:O);W.defaultPrevented||C||!U||z||(P.current=W.pointerType,L.current=!1,p.current=!0,_.current={x:W.clientX,y:W.clientY},F(W.nativeEvent),W.pointerType!=="touch"?(W.preventDefault(),(Z=i.current)==null||Z.focus(),y(d,W)):w.start(ki,()=>{const ae=m.current;m.current=0,p.current&&ae!=null&&ae<Di?(y(d,W),L.current=!0):(L.current=!1,S())}))},onPointerUp(W){W.pointerType==="touch"&&(p.current=!1)},onPointerMove(W){if(r||C||(d?A:O)||W.pointerType!=="touch"||!p.current)return;m.current!=null&&(m.current+=1);const{x:z,y:Z}=_.current,ae=z-W.clientX,le=Z-W.clientY;ae**2+le**2>Mi**2&&S()},onMouseEnter(W){const U=r||C||(d?A:O);W.defaultPrevented||U||!p.current||M.current||P.current==="touch"||y(d,W)},onMouseLeave(){M.current||S()},onMouseUp(){M.current||S()}}),[r,d,A,O,C,o,F,u,k,n,D,T,p,i,y,w,m,S]);return g.useMemo(()=>({props:q}),[q])}const wu=g.forwardRef(function(t,r){const{render:s,className:u,disabled:o=!1,nativeButton:n=!0,...i}=t,{allowInputSyncRef:l,disabled:w,formatOptionsRef:d,getStepAmount:p,id:b,incrementValue:x,inputRef:h,inputValue:m,intentionalTouchCheckTimeout:C,isPressedRef:E,locale:y,maxWithDefault:S,minWithDefault:v,movesAfterTouchRef:k,readOnly:D,setValue:T,startAutoChange:_,state:M,stopAutoChange:L,value:P,valueRef:O,lastChangedValueRef:A,onValueCommitted:F}=qt(),q=o||w,{props:W}=cu({isIncrement:!0,inputRef:h,startAutoChange:_,stopAutoChange:L,minWithDefault:v,maxWithDefault:S,value:P,inputValue:m,disabled:q,readOnly:D,id:b,setValue:T,getStepAmount:p,incrementValue:x,allowInputSyncRef:l,formatOptionsRef:d,valueRef:O,isPressedRef:E,intentionalTouchCheckTimeout:C,movesAfterTouchRef:k,locale:y,lastChangedValueRef:A,onValueCommitted:F}),{getButtonProps:U,buttonRef:z}=iu({disabled:q,native:n}),Z=g.useMemo(()=>({...M,disabled:q}),[M,q]);return xt("button",t,{ref:[r,z],state:Z,props:[W,i,U],stateAttributesMapping:ht})});process.env.NODE_ENV!=="production"&&(wu.displayName="NumberFieldIncrement");const du=g.forwardRef(function(t,r){const{render:s,className:u,disabled:o=!1,nativeButton:n=!0,...i}=t,{allowInputSyncRef:l,disabled:w,formatOptionsRef:d,getStepAmount:p,id:b,incrementValue:x,inputRef:h,inputValue:m,intentionalTouchCheckTimeout:C,isPressedRef:E,maxWithDefault:y,minWithDefault:S,movesAfterTouchRef:v,readOnly:k,setValue:D,startAutoChange:T,state:_,stopAutoChange:M,value:L,valueRef:P,locale:O,lastChangedValueRef:A,onValueCommitted:F}=qt(),q=o||w,{props:W}=cu({isIncrement:!1,inputRef:h,startAutoChange:T,stopAutoChange:M,minWithDefault:S,maxWithDefault:y,value:L,inputValue:m,disabled:q,readOnly:k,id:b,setValue:D,getStepAmount:p,incrementValue:x,allowInputSyncRef:l,formatOptionsRef:d,valueRef:P,isPressedRef:E,intentionalTouchCheckTimeout:C,movesAfterTouchRef:v,locale:O,lastChangedValueRef:A,onValueCommitted:F}),{getButtonProps:U,buttonRef:z}=iu({disabled:q,native:n}),Z=g.useMemo(()=>({..._,disabled:q}),[_,q]);return xt("button",t,{ref:[r,z],state:Z,props:[W,i,U],stateAttributesMapping:ht})});process.env.NODE_ENV!=="production"&&(du.displayName="NumberFieldDecrement");const fu=g.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:_e});process.env.NODE_ENV!=="production"&&(fu.displayName="FormContext");function ja(){return g.useContext(fu)}function Ga(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const Kt=Object.keys(Fa);function Bi(e){if(!e||e.valid||!e.valueMissing)return!1;let t=!1;for(const r of Kt)r!=="valid"&&(r==="valueMissing"&&(t=e[r]),e[r]&&(t=!1));return t}function qi(){const{setValidityData:e,validate:t,messageIds:r,validityData:s,validationMode:u,validationDebounceTime:o,invalid:n,markedDirtyRef:i,controlId:l,state:w,name:d}=Vt(),{formRef:p,clearErrors:b}=ja(),x=Aa(),h=g.useRef(null),m=xe(async(y,S=!1)=>{const v=h.current;if(!v)return;if(S){if(w.valid!==!1)return;const P=v.validity;if(!P.valueMissing){const A={value:y,state:{...Fa,valid:!0},error:"",errors:[],initialValue:s.initialValue};if(v.setCustomValidity(""),l){const F=p.current.fields.get(l);F&&p.current.fields.set(l,{...F,...Ga(A,!1)})}e(A);return}const O=Kt.reduce((A,F)=>(A[F]=P[F],A),{});if(!O.valid&&!Bi(O))return}function k(P){const O=Kt.reduce((F,q)=>(F[q]=P.validity[q],F),{});let A=!1;for(const F of Kt)if(F!=="valid"){if(F==="valueMissing"&&O[F])A=!0;else if(O[F])return O}return A&&!i.current&&(O.valid=!0,O.valueMissing=!1),O}x.clear();let D=null,T=[];const _=k(v);let M;if(v.validationMessage)M=v.validationMessage,T=[v.validationMessage];else{const P=Array.from(p.current.fields.values()).reduce((A,F)=>{var q,W;return F.name&&F.getValueRef&&(A[F.name]=(W=(q=F.getValueRef).current)==null?void 0:W.call(q)),A},{}),O=t(y,P);typeof O=="object"&&O!==null&&"then"in O?D=await O:D=O,D!==null&&(_.valid=!1,_.customError=!0,Array.isArray(D)?(T=D,v.setCustomValidity(D.join(`
|
|
7
|
-
`))):D&&(T=[D],v.setCustomValidity(D)))}const L={value:y,state:_,error:M??(Array.isArray(D)?D[0]:D??""),errors:T,initialValue:s.initialValue};if(l){const P=p.current.fields.get(l);P&&p.current.fields.set(l,{...P,...Ga(L,n)})}e(L)}),C=g.useCallback((y={})=>zt({...r.length&&{"aria-describedby":r.join(" ")},...w.valid===!1&&{"aria-invalid":!0}},y),[r,w.valid]),E=g.useCallback((y={})=>zt({onChange(S){if(S.nativeEvent.defaultPrevented)return;if(b(d),u!=="onChange"){m(S.currentTarget.value,!0);return}if(n)return;const v=S.currentTarget;if(v.value===""){m(v.value);return}x.clear(),o?x.start(o,()=>{m(v.value)}):m(v.value)}},C(y)),[C,b,d,x,m,n,u,o]);return g.useMemo(()=>({getValidationProps:C,getInputValidationProps:E,inputRef:h,commitValidation:m}),[C,E,m])}function Vi(e){const{formRef:t}=ja(),{invalid:r,markedDirtyRef:s,validityData:u,setValidityData:o}=Vt(),{enabled:n=!0,value:i,id:l,name:w,controlRef:d,commitValidation:p}=e,b=Pa(e.getValue);ge(()=>{var h;if(!n)return;let x=i;x===void 0&&(x=(h=b.current)==null?void 0:h.call(b)),u.initialValue===null&&x!==u.initialValue&&o(m=>({...m,initialValue:x}))},[n,o,i,u.initialValue,b]),ge(()=>{n&&l&&t.current.fields.set(l,{controlRef:d,validityData:Ga(u,r),validate(){var h;let x=i;x===void 0&&(x=(h=b.current)==null?void 0:h.call(b)),s.current=!0,fo.flushSync(()=>p(x))},getValueRef:b,name:w})},[p,d,n,t,b,l,r,s,w,u,i]),ge(()=>{const x=t.current.fields;return()=>{l&&x.delete(l)}},[t,l])}const zi={...jl,...ht},Hi=new Set(["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Enter","Escape"]),pu=g.forwardRef(function(t,r){const{render:s,className:u,...o}=t,{allowInputSyncRef:n,disabled:i,formatOptionsRef:l,getAllowedNonNumericKeys:w,getStepAmount:d,id:p,incrementValue:b,inputMode:x,inputValue:h,max:m,min:C,name:E,readOnly:y,required:S,setValue:v,state:k,setInputValue:D,locale:T,inputRef:_,value:M,onValueCommitted:L,lastChangedValueRef:P,hasPendingCommitRef:O,valueRef:A}=qt(),{clearErrors:F}=ja(),{labelId:q,validationMode:W,setTouched:U,setFocused:z,invalid:Z}=Vt(),{getInputValidationProps:ae,getValidationProps:le,commitValidation:ee,inputRef:B}=qi(),K=g.useRef(!1),Q=g.useRef(!1);Vi({id:p,commitValidation:ee,value:M,controlRef:_,name:E,getValue:()=>M??null});const j=g.useRef(M),Te=g.useRef(h);return ge(()=>{j.current===M&&Te.current===h||(F(E),W==="onChange"&&ee(M))},[M,h,E,F,W,ee]),ge(()=>{if(!(j.current===M||W==="onChange")){if(Q.current){Q.current=!1;return}ee(M,!0)}},[ee,W,M]),ge(()=>{j.current=M,Te.current=h},[M,h]),xt("input",t,{ref:[r,_,B],state:k,props:[{id:p,required:S,disabled:i,readOnly:y,inputMode:x,value:h,type:"text",autoComplete:"off",autoCorrect:"off",spellCheck:"false","aria-roledescription":"Number field","aria-invalid":Z||void 0,"aria-labelledby":q,suppressHydrationWarning:!0,onFocus(I){if(I.defaultPrevented||y||i||K.current)return;K.current=!0,z(!0);const V=I.currentTarget,ne=V.value.length;V.setSelectionRange(ne,ne)},onBlur(I){if(I.defaultPrevented||y||i)return;U(!0),z(!1);const V=!n.current,ne=O.current;if(n.current=!0,h.trim()===""){v(null),W==="onBlur"&&ee(null),L(null,Yt("none",I.nativeEvent));return}const $=l.current,ie=ut(h,T,$);if(ie===null)return;Q.current=!0;const te=($==null?void 0:$.maximumFractionDigits)!=null||($==null?void 0:$.minimumFractionDigits)!=null,de=$==null?void 0:$.maximumFractionDigits,fe=te&&typeof de=="number"?Number(ie.toFixed(de)):ie,Ae=Yt("none",I.nativeEvent),ve=M!==fe,We=V||ve||ne;W==="onBlur"&&ee(fe),ve&&v(fe,I.nativeEvent),We&&L(fe,Ae);const Pe=st(fe,T,$),Oe=zs(ie,T,$);!(!te&&ie===M&&h===Oe)&&h!==Pe&&D(Pe)},onChange(I){if(I.nativeEvent.defaultPrevented)return;n.current=!1;const V=I.target.value;if(V.trim()===""){D(V),v(null,I.nativeEvent);return}const ne=w();if(!Array.from(V).every(te=>{const de=te>="0"&&te<="9",fe=za.test(te),Ae=Ha.test(te),ve=Ks.test(te),We=Js.test(te),Pe=vt.test(te);return de||fe||Ae||ve||We||Pe||ne.has(te)}))return;if(I.isTrusted){D(V);const te=ut(V,T,l.current);te!==null&&v(te,I.nativeEvent);return}const ie=ut(V,T,l.current);ie!==null&&(D(V),v(ie,I.nativeEvent))},onKeyDown(I){if(I.defaultPrevented||y||i)return;const V=I.nativeEvent;n.current=!0;const ne=w();let $=ne.has(I.key);const{decimal:ie,currency:te,percentSign:de}=$a(T,l.current),fe=I.currentTarget.selectionStart,Ae=I.currentTarget.selectionEnd,ve=fe===0&&Ae===h.length,We=se=>fe===se&&Ae===se+1;if(vt.test(I.key)&&Array.from(ne).some(se=>vt.test(se||""))){const se=h.search(Rs),he=se!=null&&se!==-1&&We(se);$=!(vt.test(h)||Ut.test(h))||ve||he}if(Ut.test(I.key)&&Array.from(ne).some(se=>Ut.test(se||""))){const se=h.search(eu),he=se!=null&&se!==-1&&We(se);$=!(vt.test(h)||Ut.test(h))||ve||he}[ie,te,de].forEach(se=>{if(I.key===se){const he=h.indexOf(se),Et=fe===he&&Ae===he+1;$=!h.includes(se)||ve||Et}});const Pe=I.key>="0"&&I.key<="9",Oe=za.test(I.key),Ge=Ha.test(I.key),ta=Js.test(I.key),Ye=Hi.has(I.key);if(I.which===229||I.altKey||I.ctrlKey||I.metaKey||$||Pe||Oe||ta||Ge||Ye)return;const Ke=ut(h,T,l.current),St=d(I)??jt;Wi(I);const ot=ru("none",V);I.key==="ArrowUp"?(b(St,1,Ke,V),L(P.current??A.current,ot)):I.key==="ArrowDown"?(b(St,-1,Ke,V),L(P.current??A.current,ot)):I.key==="Home"&&C!=null?(v(C,V),L(P.current??A.current,ot)):I.key==="End"&&m!=null&&(v(m,V),L(P.current??A.current,ot))},onPaste(I){if(I.defaultPrevented||y||i)return;I.preventDefault();const ne=(I.clipboardData||window.Clipboard).getData("text/plain"),$=ut(ne,T,l.current);$!==null&&(n.current=!1,v($,I.nativeEvent),D(ne))}},ae(),le(),o],stateAttributesMapping:zi})});process.env.NODE_ENV!=="production"&&(pu.displayName="NumberFieldInput");const $i={wuStepper:"_wuStepper_apbnq_1"},Ui=({onChange:e,Label:t,defaultValue:r=0,readonly:s,dir:u,step:o=1,min:n,max:i,value:l,className:w,labelPosition:d="left",disabled:p,resetInvalidValueOnBlur:b=!0,...x})=>{const h=g.useId(),[m,C]=g.useState(l!==void 0?Number(l):r||0);g.useEffect(()=>{l!==void 0&&C(Number(l))},[l]);const E=T=>{C(T),e==null||e(T)},y=T=>{const _=Number(T.target.value);Number.isNaN(_)||C(_)},S=()=>{b&&(n!==void 0&&m<n?(C(n),e==null||e(n)):i!==void 0&&m>i&&(C(i),e==null||e(i)))};g.useEffect(()=>{l&&r&&console.warn("As both value and defaultValue are passed, value will be used")},[l,r]);const v={inc:s||i!==void 0&&m>=i||p,dec:s||n!==void 0&&m<=n||p},k=n!==void 0&&m<n||i!==void 0&&m>i,D=c("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(su,{id:h,value:m,step:o,readOnly:s,onValueChange:T=>typeof T=="number"&&E(T),dir:u,className:c("wu-flex wu-stepper",u==="rtl"&&d!=="top"&&"wu-gap-2",$i.wuStepper,ji({labelPosition:d}),w),children:[t&&a.jsx(be,{htmlFor:h,className:"wu-input-label",children:t}),a.jsxs(ou,{className:"wu-flex wu-max-w-[97px] wu-relative",children:[a.jsx(du,{"aria-label":"decrement",className:c(D,u==="rtl"?"wu-right-0":"wu-left-0","wu-stepper-button"),disabled:v.dec,children:a.jsx("span",{className:"wu-text-base wm-minimize"})}),a.jsx(pu,{"aria-label":"stepper",role:"spinbutton",type:"text","aria-invalid":k||void 0,dir:u,className:c("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",k&&"wu-border-red-deep focus:wu-border-red-deep","wu-stepper-input"),readOnly:s,onChange:y,onBlur:S,disabled:p,min:n,max:i,step:o,...x}),a.jsx(wu,{"aria-label":"increment",className:c(D,u==="rtl"?"wu-left-0":"wu-right-0","wu-stepper-button"),disabled:v.inc,children:a.jsx("span",{className:"wu-text-base wm-add"})})]})]})},ji=Ce.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"}}}),bu=Ce.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"}}),Gi=g.forwardRef(({className:e,variant:t,size:r,...s},u)=>a.jsx(nr.Root,{ref:u,className:c(bu({variant:t,size:r,className:e})),...s}));Gi.displayName=nr.Root.displayName;const gu=g.createContext({size:"default",variant:"default"}),Jt=g.forwardRef(({className:e,variant:t,size:r,children:s,...u},o)=>a.jsx(Dt.Root,{ref:o,className:c("wu-flex wu-items-center wu-justify-center wu-gap-1",e),...u,children:a.jsx(gu.Provider,{value:{variant:t,size:r},children:s})}));Jt.displayName=Dt.Root.displayName;const je=g.forwardRef(({className:e,children:t,variant:r,size:s,...u},o)=>{const n=g.useContext(gu);return a.jsx(Dt.Item,{ref:o,className:c(bu({variant:n.variant||r,size:n.size||s}),e),...u,children:t})});je.displayName=Dt.Item.displayName;const hu=f.forwardRef((e,t)=>{const{options:r,value:s,disabled:u,dir:o,onChange:n}=e,i=l=>c("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",u&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-lead",l===s&&"wu-text-white",u&&s===l&&"wu-text-gray-lead","wu-switcher-icon-tab-item");return a.jsx(a.Fragment,{children:a.jsxs(Jt,{ref:t,type:"single",value:s,onValueChange:n,disabled:u,dir:o,className:c("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",u&&"wu-cursor-not-allowed","wu-switcher-icon-tab-group"),children:[a.jsx("div",{role:"slider",className:c("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",s==="opt1"&&"",s==="opt2"&&o!=="rtl"&&"wu-translate-x-full",s==="opt2"&&o==="rtl"&&"-wu-translate-x-full",u&&"wu-bg-gray-40","wu-switcher-icon-tab-slider")}),a.jsx(je,{value:"opt1",className:i("opt1"),children:r[0].label}),a.jsx(je,{value:"opt2",className:i("opt2"),children:r[1].label})]})})});hu.displayName="_IconTab";const mu=f.forwardRef((e,t)=>{const{options:r,value:s,disabled:u,dir:o,size:n="md",onChange:i}=e,l=w=>c("wu-w-1/2 wu-text-xs wu-rounded-full wu-text-gray-lead wu-relative wu-z-10 wu-font-normal",u&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-lead",n==="sm"&&"wu-h-6 wu-min-w-20",n==="md"&&"wu-h-8 wu-min-w-28",n==="lg"&&"wu-h-10 wu-min-w-36",w===s&&"wu-text-white wu-font-medium",u&&s===w&&"wu-text-gray-lead","wu-switcher-tab-item");return a.jsx(a.Fragment,{children:a.jsxs(Jt,{ref:t,type:"single",value:s,onValueChange:i,disabled:u,dir:o,className:c("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",u&&"wu-cursor-not-allowed","wu-switcher-tab-group"),children:[a.jsx("div",{role:"slider",className:c("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 ",n==="sm"&&"wu-h-6 wu-min-w-20",n==="md"&&"wu-h-8 wu-min-w-28",n==="lg"&&"wu-h-10 wu-min-w-36",s==="opt1"&&"",s==="opt2"&&o!=="rtl"&&"wu-translate-x-full",s==="opt2"&&o==="rtl"&&"-wu-translate-x-full",u&&"wu-bg-gray-40","wu-switcher-tab-slider")}),a.jsx(je,{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:r[0].label})}),a.jsx(je,{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:r[1].label})})]})})});mu.displayName="_Tab";const xu=f.forwardRef((e,t)=>{const{options:r,value:s,disabled:u,dir:o,onChange:n}=e,i=p=>c("wu-p-0 wu-w-fit wu-text-xs wu-text-gray-lead wu-h-fit wu-font-normal",u&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-subtle wu-text-gray-subtle",p===s&&"wu-text-primary wu-font-medium",u&&s===p&&"wu-text-gray-lead","wu-switcher-toggle-item"),l=c("wu-w-fit wu-gap-2",u&&"wu-cursor-not-allowed","wu-switcher-toggle-group"),w=c("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",u&&"wu-border-gray-subtle wu-cursor-not-allowed","wu-switcher-toggle-button"),d=c("wu-w-2 wu-h-2 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out",s==="opt1"&&o!=="rtl"&&"-wu-translate-x-[10px]",s==="opt1"&&o==="rtl"&&"wu-translate-x-[10px]",s==="opt2"&&o!=="rtl"&&"wu-translate-x-[10px]",s==="opt2"&&o==="rtl"&&"-wu-translate-x-[10px]",u&&"wu-hidden","wu-switcher-toggle-knob");return a.jsx(a.Fragment,{children:a.jsxs(Jt,{ref:t,type:"single",value:s,disabled:u,dir:o,className:l,onValueChange:n,children:[a.jsx(je,{value:"opt1",className:i("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:r[0].label})}),a.jsx("button",{onClick:()=>n(s==="opt1"?"opt2":"opt1"),className:w,disabled:u,"aria-label":"knob",dir:o,children:a.jsx("div",{className:d,role:"knob",dir:o})}),a.jsx(je,{value:"opt2",className:i("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:r[1].label})})]})})});xu.displayName="_Toggle";const yu=f.forwardRef((e,t)=>{const{type:r,options:s,value:u,disabled:o,dir:n,size:i,onChange:l,toggle:w=!0,...d}=e,[p,b]=f.useState(),x=h=>{let m=p;h!==""?m=h:w&&(m=p==="opt1"?"opt2":"opt1");const C=m==="opt1"?s[0].value:s[1].value;l&&l(C),b(m)};if(f.useEffect(()=>{if(!Array.isArray(s)||s.length<2)throw new Error("Options are not sufficient");b(u===s[0].value?"opt1":"opt2")},[s,u]),!Array.isArray(s)||s.length<2)return a.jsx(a.Fragment,{});switch(r){case"toggle":return a.jsx(xu,{...d,ref:t,options:s,value:p||"opt1",onChange:x,disabled:o,dir:n});case"iconTab":return a.jsx(hu,{ref:t,options:s,value:p||"opt1",onChange:x,disabled:o,dir:n});default:return a.jsx(mu,{ref:t,options:s,value:p||"opt1",onChange:x,disabled:o,dir:n,size:i})}});yu.displayName="WuSwitcher";const vu=ze.Root,Ya=g.forwardRef(({className:e,children:t,...r},s)=>a.jsx(ze.List,{className:c("wu-relative wu-flex",e),...r,ref:s,children:t}));Ya.displayName=ze.List.displayName;const Ka=g.forwardRef(({className:e,...t},r)=>a.jsx(ze.Trigger,{ref:r,className:c("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}));Ka.displayName=ze.Trigger.displayName;const Nu=g.forwardRef(({className:e,...t},r)=>a.jsx(ze.Content,{ref:r,className:e,...t}));Nu.displayName=ze.Content.displayName;const Cu=({items:e,enableAnimation:t})=>{const r="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:c("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(s=>a.jsx(Nu,{value:s.value,forceMount:t||void 0,className:c("wu-w-full wu-h-full wu-overflow-y-auto",t&&r,"wu-tab-content"),children:s.Content},s.value))})},Yi=e=>{const[t,r]=f.useState(!1),[s,u]=f.useState(!1),o=()=>{const i=e.current;i&&(r(i.scrollLeft>0),u(i.scrollLeft+i.clientWidth<i.scrollWidth))};return f.useEffect(()=>{const i=e.current;return o(),i&&i.addEventListener("scroll",o),window.addEventListener("resize",o),()=>{i&&i.removeEventListener("scroll",o),window.removeEventListener("resize",o)}},[e]),{showLeftArrow:t,showRightArrow:s,scrollByTab:i=>{const l=e.current;if(l){const w=(i==="right"?l.clientWidth:-l.clientWidth)*.8;l.scrollBy({left:w,behavior:"smooth"})}}}},Su=(e,t)=>{const[r,s]=f.useState({width:0,left:0,height:0,top:0}),u=t==="vertical";return f.useEffect(()=>{const o=e.current;if(o){const n=()=>{const l=o.querySelector('[data-state="active"]');if(l){const w={width:u?2:l.offsetWidth,left:u?0:l.offsetLeft,height:u?l.offsetHeight:1,top:u?l.offsetTop:0};s(w)}},i=new MutationObserver(n);return i.observe(o,{attributes:!0,subtree:!0}),n(),()=>{i.disconnect()}}},[e,u]),r},Ki=({items:e,value:t,defaultValue:r,onValueChange:s,enableAnimation:u=!1,className:o,dir:n="ltr",position:i="top"})=>{var S;const l=f.useRef(null),w=Su(l,"horizontal"),{showLeftArrow:d,showRightArrow:p,scrollByTab:b}=Yi(l),[x,h]=f.useState(!1),m=()=>b("left"),C=()=>b("right"),E=v=>a.jsx("div",{"data-testid":`gradient-overlay-${v}`,className:c("wu-absolute wu-top-0 wu-h-full wu-w-20 wu-z-10 wu-pointer-events-none",v==="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=(v,k,D)=>{const T=k==="left";return a.jsx("button",{onClick:v,className:c("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",T?"wu-left-0":"wu-right-0",D&&"wu-translate-x-0 wu-opacity-100",!D&&[T?"-wu-translate-x-full":"wu-translate-x-full","wu-opacity-0"]),"aria-label":T?"scroll-left":"scroll-right",children:a.jsx("span",{className:c("wu-text-blue-p wu-text-lg",T?"wm-keyboard-arrow-left":"wm-keyboard-arrow-right")})})};return a.jsxs(vu,{defaultValue:r||((S=e[0])==null?void 0:S.value),value:t,onValueChange:s,orientation:"horizontal",dir:n,className:c("wu-relative wu-flex wu-flex-col wu-w-full wu-h-full",i==="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:()=>h(!0),onMouseLeave:()=>h(!1),"aria-label":"tablistWrapper",children:[d&&x&&E("left"),y(m,"left",d&&x),a.jsxs(Ya,{ref:l,className:c("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(v=>a.jsx(Ka,{value:v.value,children:v.Trigger},v.value)),a.jsx("span",{className:"wu-absolute wu-bg-blue-p wu-transition-all wu-duration-300 wu-indicator wu-bottom-0",style:{width:w.width,left:w.left,height:1.25,bottom:i==="bottom"?void 0:0,top:i==="bottom"?0:void 0}})]}),p&&x&&E("right"),y(C,"right",p&&x)]}),a.jsx(Cu,{items:e,enableAnimation:u})]})},Ji=e=>{const[t,r]=f.useState(!1),[s,u]=f.useState(!1),o=()=>{const i=e.current;i&&(r(i.scrollTop>0),u(i.scrollTop+i.clientHeight<i.scrollHeight))};return f.useEffect(()=>{const i=e.current;if(i)return o(),i.addEventListener("scroll",o),window.addEventListener("resize",o),()=>{i.removeEventListener("scroll",o),window.removeEventListener("resize",o)}},[e]),{showTopArrow:t,showBottomArrow:s,scrollByTab:i=>{const l=e.current;if(l){const w=(i==="down"?l.clientHeight:-l.clientHeight)*.8;l.scrollBy({top:w,behavior:"smooth"})}}}},Xi=({items:e,value:t,defaultValue:r,onValueChange:s,enableAnimation:u=!1,className:o,dir:n="ltr",position:i="left"})=>{var S;const l=f.useRef(null),w=Su(l,"vertical"),{showTopArrow:d,showBottomArrow:p,scrollByTab:b}=Ji(l),[x,h]=f.useState(!1),m=()=>b("up"),C=()=>b("down"),E=v=>a.jsx("div",{className:c("wu-absolute wu-left-0 wu-w-full wu-h-12 wu-z-10 wu-pointer-events-none",v==="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=(v,k,D)=>{const T=k==="up";return a.jsx("button",{onClick:v,className:c("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",T?"-wu-top-1":"-wu-bottom-1",D&&"wu-translate-y-0 wu-opacity-100",!D&&[T?"-wu-translate-y-full":"wu-translate-y-full","wu-opacity-0"]),"aria-label":T?"scroll-up":"scroll-down",children:a.jsx("span",{className:c("wu-text-blue-p wu-text-lg",T?"wm-keyboard-arrow-up":"wm-keyboard-arrow-down")})})};return a.jsxs(vu,{defaultValue:r||((S=e[0])==null?void 0:S.value),value:t,onValueChange:s,orientation:"vertical",dir:n,className:c("wu-relative wu-h-full wu-w-full wu-flex",i==="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:()=>h(!0),onMouseLeave:()=>h(!1),"aria-label":"tablistWrapper",children:[d&&x&&E("top"),y(m,"up",d&&x),a.jsxs(Ya,{ref:l,className:c("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(v=>a.jsx(Ka,{value:v.value,children:v.Trigger},v.value)),a.jsx("span",{className:"wu-absolute wu-bg-blue-p wu-transition-all wu-duration-300 wu-indicator",style:{width:2,left:i==="left"?0:void 0,right:i==="right"?0:void 0,height:w.height,top:w.top}})]}),p&&x&&E("bottom"),y(C,"down",p&&x)]}),a.jsx(Cu,{items:e,enableAnimation:u})]})},Zi=({...e})=>e.orientation==="vertical"?a.jsx(Xi,{...e}):a.jsx(Ki,{...e}),Ja=g.forwardRef(({className:e,...t},r)=>a.jsx("table",{ref:r,className:c("wu-w-full wu-caption-bottom wu-text-sm",e),...t}));Ja.displayName="Table";const Eu=g.forwardRef(({className:e,...t},r)=>a.jsx("thead",{ref:r,className:c("[&_tr]:wu-border-b",e),...t}));Eu.displayName="TableHeader";const Tu=g.forwardRef(({className:e,...t},r)=>a.jsx("tbody",{ref:r,className:c("",e),...t}));Tu.displayName="TableBody";const Qi=g.forwardRef(({className:e,...t},r)=>a.jsx("tfoot",{ref:r,className:c("wu-border-t wu-bg-muted/50 wu-font-medium [&>tr]:last:wu-border-b-0",e),...t}));Qi.displayName="TableFooter";const Nt=g.forwardRef(({className:e,...t},r)=>a.jsx("tr",{ref:r,className:c("wu-border-b wu-transition-colors wu-hover:wu-bg-muted/50 data-[state=selected]:wu-bg-muted",e),...t}));Nt.displayName="TableRow";const Xa=g.forwardRef(({className:e,...t},r)=>a.jsx("th",{ref:r,className:c("wu-px-4 wu-text-left wu-align-middle wu-font-medium wu-text-muted-foreground [&:has([role=checkbox])]:wu-pr-0",e),...t}));Xa.displayName="TableHead";const Xt=g.forwardRef(({className:e,...t},r)=>a.jsx("td",{ref:r,className:c("wu-p-4 wu-align-middle [&:has([role=checkbox])]:wu-pr-0",e),...t}));Xt.displayName="TableCell";const Za=g.forwardRef(({className:e,...t},r)=>a.jsx("caption",{ref:r,className:c("wu-mt-4 wu-text-sm wu-text-gray-subtle wu-font-normal",e),...t}));Za.displayName="TableCaption";const Ri=({columns:e,rowSelection:t})=>{const r=(t==null?void 0:t.isEnabled)??!1,s=(t==null?void 0:t.size)??48,{onRowSelect:u,rowUniqueKey:o}=t||{},n=f.useCallback(l=>w=>{u(()=>w?l:[])},[u]);return{finalColumns:f.useMemo(()=>r?[{id:"select",header:({table:l})=>{const w=l.getRowModel().rows.map(p=>p.original),d=n(w);return a.jsx(Ee,{checked:l.getIsSomeRowsSelected()||l.getIsAllRowsSelected(),partial:l.getIsSomeRowsSelected()&&!l.getIsAllRowsSelected(),onChange:p=>{l.toggleAllRowsSelected(!!p),d(!!p)},"aria-label":"Select all","data-testid":l.getIsSomeRowsSelected()&&!l.getIsAllRowsSelected()?"select-partial":"select-all"})},cell:({row:l})=>a.jsx(Ee,{checked:l.getIsSelected(),onChange:w=>{l.toggleSelected(!!w)},"aria-label":String(l.original[o])}),enableSorting:!1,filterable:!1,accessorKey:"select",size:s},...e]:e,[e,r,n])}};function Iu({data:e,columns:t,rowSelection:r}){const{finalColumns:s}=Ri({columns:t,rowSelection:r}),u=f.useMemo(()=>{if(!(r!=null&&r.isEnabled))return{};const o={};for(const n of r.selectedRows){const i=e.findIndex(l=>l[r.rowUniqueKey]===n[r.rowUniqueKey]);i!==-1&&(o[i]=!0)}return o},[e,r]);return{finalColumns:s,rowSelectionState:u}}const ku=({table:e,size:t,NoDataContent:r,isLoading:s,CustomLoader:u})=>{var i;const[o,n]=f.useState(null);return a.jsx(Tu,{children:s?a.jsx(Nt,{children:a.jsx(Xt,{colSpan:e.getAllColumns().length,className:"wu-text-center wu-h-[35vh] wu-loader-container",children:u||a.jsx(Re,{className:"wu-w-full"})})}):(i=e.getRowModel().rows)!=null&&i.length?e.getRowModel().rows.map((l,w)=>a.jsx(Nt,{"data-state":l.getIsSelected()&&"selected",onMouseOver:()=>n(l.id),onMouseOut:()=>n(null),className:c("wu-transition-colors wu-border-b wu-border-black/[12%]",l.getIsSelected()?o===l.id?"wu-bg-blue-p/[16%]":"wu-bg-blue-p/[8%]":"hover:wu-bg-black/[2%]"),children:l.getVisibleCells().map((d,p)=>a.jsx(Xt,{className:c("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-100":"",o===l.id&&d.column.id==="actions"?"wu-opacity-100 wu-visible":""),children:De.flexRender(d.column.columnDef.cell,d.getContext())},`${d.id}-${p}`))},`${l.id}-${w}`)):a.jsx(Nt,{children:a.jsx(Xt,{colSpan:e.getAllColumns().length,children:r})})})},Du=({table:e,sortableColumns:t,manual:r=!1,onSort:s,size:u,isRowSelected:o,HeaderAction:n,isStickyHeader:i})=>{const l=u==="compact"?"wu-h-8":"wu-h-10",w=d=>{const{id:p,columnDef:b,getIsSorted:x,toggleSorting:h}=d,{header:m}=b;if(!t.includes(p))return m;const C=x(),E=C==="asc",y=C==="desc",S=()=>{r?(h(!y),s==null||s({id:p,desc:y})):h(d.getIsSorted()==="asc")};return a.jsxs("button",{onClick:S,"aria-label":`Sort by ${m}`,className:"wu-flex wu-items-center wu-gap-4",children:[m,a.jsxs("div",{className:"wu-relative",children:[a.jsx("span",{className:c("wu-absolute -wu-top-[15px] wm-arrow-drop-down wu-text-xl",E&&"wu-hidden",!C&&"-wu-top-[11px]")}),a.jsx("span",{className:c("wu-absolute -wu-bottom-[13px] wm-arrow-drop-up wu-text-xl",y&&"wu-hidden",!C&&"-wu-bottom-[10px]")})]})]})};return a.jsxs(Eu,{className:c("wu-border-t wu-border-black/[12%] wu-bg-gray-20 wu-relative",i&&"wu-sticky wu-top-[-.5px] wu-z-10",l),children:[e.getHeaderGroups().map(d=>a.jsx(Nt,{className:"wu-relative",children:d.headers.map(p=>p.column.id==="actions"?a.jsx(Xa,{colSpan:p.colSpan,className:"wu-text-xs wu-font-medium",style:{width:`${p.getSize()}px`}},p.id):a.jsx(Xa,{colSpan:p.colSpan,className:c("wu-text-xs wu-font-medium wu-bg-[#EEEEEE]","wu-relative wu-z-0"),style:{width:`${p.getSize()}px`},children:De.flexRender(w(p.column),p.getContext())},p.id))},d.id)),o&&n&&a.jsxs("div",{className:c("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(Ee,{checked:e.getIsSomeRowsSelected()||e.getIsAllRowsSelected(),partial:e.getIsSomeRowsSelected()&&!e.getIsAllRowsSelected(),onChange:d=>{e.toggleAllRowsSelected(!!d)},"aria-label":"Select all"})}),a.jsx("div",{className:"wu-flex-1 wu-flex wu-pr-4",children:n})]})]})},Mu=Ce.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"}}}),ec=({data:e,columns:t,isLoading:r=!1,variant:s="unstyled",sort:u,size:o,rowSelection:n,HeaderAction:i,NoDataContent:l,stickyHeader:w=!1,CustomLoader:d,caption:p,...b})=>{var S;const{finalColumns:x,rowSelectionState:h}=Iu({data:e,columns:t,rowSelection:n}),m=f.useMemo(()=>x.filter(v=>v.enableSorting).map(v=>v.accessorKey),[x]),C=((S=n==null?void 0:n.selectedRows)==null?void 0:S.length)??0,E=v=>{if(typeof v=="function"){const k=v(h),D=Object.keys(k).filter(T=>k[Number(T)]).map(T=>e[Number(T)]);n==null||n.onRowSelect(D)}},y=De.useReactTable({data:e,columns:x,getCoreRowModel:De.getCoreRowModel(),getPaginationRowModel:De.getPaginationRowModel(),manualPagination:!0,manualSorting:!0,manualFiltering:!0,enableRowSelection:n==null?void 0:n.isEnabled,state:{...n!=null&&n.isEnabled?{rowSelection:h}:{}},onRowSelectionChange:E});return a.jsxs("div",{className:c("wu-text-gray-lead wu-table-container wu-relative"),children:[p&&a.jsx(Za,{className:"wu-font-light",children:p}),a.jsxs(Ja,{...b,className:c(Mu({variant:s}),b.className),children:[a.jsx(Du,{table:y,sortableColumns:m,manual:!0,onSort:u==null?void 0:u.onSort,size:o,HeaderAction:i,isRowSelected:C>0,isStickyHeader:w}),!r&&a.jsx(ku,{table:y,size:o,NoDataContent:l,CustomLoader:d})]}),r&&a.jsx("div",{className:"wu-flex wu-items-center wu-justify-center wu-h-96",children:a.jsx(Re,{})})]})},tc=({data:e,columns:t,variant:r="unstyled",size:s="default",sort:u,filterText:o,pagination:n,stickyHeader:i,HeaderAction:l,CustomLoader:w,NoDataContent:d,isLoading:p,caption:b,rowSelection:x,...h})=>{var O;const[m,C]=f.useState((u==null?void 0:u.initial)||[]),[E,y]=f.useState([]),[S,v]=f.useState((n==null?void 0:n.pageIndex)??0),{finalColumns:k,rowSelectionState:D}=Iu({data:e,columns:t,rowSelection:x}),T=f.useMemo(()=>k.filter(A=>A.enableSorting).map(A=>A.accessorKey),[k]),_=f.useMemo(()=>k.filter(A=>A.filterable).map(A=>A.accessorKey),[k]),M=((O=x==null?void 0:x.selectedRows)==null?void 0:O.length)??0,L=A=>{const F=typeof A=="function"?A(D):A,q=Object.keys(F).filter(W=>F[Number(W)]).map(W=>e[Number(W)]);x==null||x.onRowSelect(q)},P=De.useReactTable({data:e,columns:k,getCoreRowModel:De.getCoreRowModel(),getFilteredRowModel:De.getFilteredRowModel(),getSortedRowModel:De.getSortedRowModel(),getPaginationRowModel:n?De.getPaginationRowModel():void 0,state:{sorting:m,columnFilters:E,...n?{pagination:n}:{},...x!=null&&x.isEnabled?{rowSelection:D}:{}},onSortingChange:C,onColumnFiltersChange:y,onRowSelectionChange:L});return f.useEffect(()=>{_.forEach(A=>{var F;(F=P.getColumn(A))==null||F.setFilterValue(o)})},[o,_,P]),f.useEffect(()=>{n&&(n==null?void 0:n.pageIndex)!==S&&(x==null||x.onRowSelect(()=>[]),P.resetRowSelection(),v(n.pageIndex))},[n==null?void 0:n.pageIndex]),a.jsx("div",{className:"wu-text-gray-lead wu-table-container wu-relative",children:a.jsxs(Ja,{...h,className:c("wu-overflow-x-auto wu-w-full",Mu({variant:r}),"wu-table-fixed",h.className),children:[b&&a.jsx(Za,{children:b}),a.jsx(Du,{table:P,sortableColumns:T,size:s,HeaderAction:l,isRowSelected:M>0,isStickyHeader:i}),a.jsx(ku,{table:P,size:s,NoDataContent:d,CustomLoader:w,isLoading:p})]})})},_u=g.forwardRef(({className:e,...t},r)=>a.jsx("textarea",{className:c("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:r,...t}));_u.displayName="Textarea";const Au=f.forwardRef((e,t)=>{const{Label:r,id:s=Mt(),variant:u="flat",readonly:o,maxLength:n,labelPosition:i="top",...l}=e,w=p=>{l.onChange&&l.onChange(p)},d=dt(i);return a.jsxs("div",{className:c(d,"wu-flex wu-textarea-container"),dir:l.dir,children:[a.jsx(_u,{...l,ref:t,id:s,className:c("wu-peer wu-rounded-t-sm",u==="outlined"?"wu-border wu-border-gray-subtle":"",l.className),onChange:w,readOnly:o,maxLength:n}),r&&a.jsx(be,{htmlFor:s,className:"wu-textarea-label",children:r})]})});Au.displayName="WuTextarea";function ac(e){if(typeof e=="string"&&e.includes("T")){const t=H.parseISO(e);return H.format(t,"HH:mm")}if(typeof e=="string"&&/^\d{2}:\d{2}:\d{2}$/.test(e)){const t=H.parse(e,"HH:mm:ss",new Date);return H.format(t,"HH:mm")}return typeof e=="string"&&/^\d{2}:\d{2}$/.test(e)?e:"00:00"}const Wu=["12",...Array.from({length:11},(e,t)=>String(t+1).padStart(2,"0"))],Pu=Array.from({length:60},(e,t)=>String(t).padStart(2,"0")),Lu=["am","pm"],Zt=50;function rc(e){return Array(Zt).fill(e).flat()}function Qa(e,t){const r=e.indexOf(t);return[...e.slice(r),...e.slice(0,r)]}function sc(e,t){let r=Number(e);return t==="pm"&&r<12&&(r+=12),t==="am"&&r===12&&(r=0),String(r).padStart(2,"0")}function Ou(e){const t=Number(e),r=t>=12?"pm":"am",s=t%12===0?12:t%12;return{hour:String(s),meridiem:r}}const uc=({value:e,isSelected:t,onClick:r})=>a.jsx("div",{onClick:r,className:c("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}),Ra=({values:e,selectedValue:t,scrollRef:r,onSelect:s,repeatItems:u=!0,className:o})=>a.jsx("div",{ref:r,className:c("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:(u?rc(e):e).map((n,i)=>a.jsx(uc,{value:n,isSelected:n===t,onClick:()=>s(n)},`${n}-${i}`))});function oc(e,t,r,s){const u=f.useMemo(()=>e?Qa(Wu,t.padStart(2,"0")):Wu,[e]),o=f.useMemo(()=>e?Qa(Pu,r.padStart(2,"0")):Pu,[e]),n=f.useMemo(()=>e?Qa(Lu,s):Lu,[e]);return{rotatedHours:u,rotatedMinutes:o,rotatedMeridiem:n}}function nc(e,t,r){f.useEffect(()=>{function s(n){if(n){const i=n.scrollHeight/Zt,l=Math.floor(Zt/2);n.scrollTop=l*i;const w=()=>{const{scrollTop:d}=n,p=Math.round(d/i);(p<=1||p>=Zt-2)&&(n.scrollTop=l*i)};return n.addEventListener("scroll",w),()=>{n.removeEventListener("scroll",w)}}}if(!e)return;const u=s(t.current),o=s(r.current);return()=>{u==null||u(),o==null||o()}},[e,t,r])}const Fu=({className:e,time:t,Label:r,labelPosition:s,dir:u,...o})=>{const[n,i]=f.useState(!1),[l,w]=f.useState(""),d=f.useRef(null),p=f.useRef(null),b=f.useRef(null),x=f.useRef(null),[h,m]=f.useState("12"),[C,E]=f.useState("00"),[y,S]=f.useState("am");f.useEffect(()=>{if(!t){w(""),m("12"),E("00"),S("am"),d.current&&(d.current.value="");return}const _=ac(t);w(_);const[M,L]=_.split(":"),{hour:P,meridiem:O}=Ou(M);m(P),E(L),S(O),d.current&&(d.current.value=_)},[t]),f.useEffect(()=>{const _=M=>{p.current&&!p.current.contains(M.target)&&i(!1)};return document.addEventListener("mousedown",_),()=>{document.removeEventListener("mousedown",_)}},[]),nc(n,b,x);const{rotatedHours:v,rotatedMinutes:k,rotatedMeridiem:D}=oc(n,h,C,y),T=f.useCallback((_,M,L)=>{const P=_??h,O=M??C,A=L??y;m(P),E(O),S(A);const F=`${sc(P,A)}:${O}`;w(F)},[h,C,y]);return a.jsxs("div",{className:c("wu-flex wu-gap-1 wu-relative wu-w-fit wu-flex-col",(s==="right"||s==="left")&&"wu-items-center",s==="left"&&"wu-flex-row",s==="right"&&"wu-flex-row-reverse","wu-input-wrapper"),dir:u,children:[r&&a.jsx(be,{htmlFor:"time-picker",className:"wu-timepicker-label",children:r}),a.jsxs("div",{className:c("relative inline-block"),ref:p,dir:u,children:[a.jsx(He,{ref:d,type:"time",value:l,variant:"flat",role:"textbox",onChange:_=>{w(_.target.value);const[M,L]=_.target.value.split(":"),{hour:P,meridiem:O}=Ou(M);m(P),E(L),S(O)},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(Le,{icon:"wm-schedule",className:"wu-text-base",onClick:()=>i(_=>!_),"data-testid":"wu-timepicker-icon"}),iconPosition:"right",dir:u,...o}),a.jsx("style",{children:`
|
|
4
|
+
)`;w.style.setProperty("--spotlight-background",E)})};return window.addEventListener("mousemove",h),()=>{window.removeEventListener("mousemove",h),p&&cancelAnimationFrame(p)}}},[t,r,n,u]),a.jsx("div",{ref:l,className:c(Xu.gradientBackground,"wu-transform-gpu",o),...i,children:s})},is="calc(100vh - 64px)",Zu={sm:"400px",md:"600px",lg:"1200px"},Aa=({Trigger:e,children:t,size:r="md",hideCloseButton:s,preventClickOutside:o,onOpenChange:n,open:u,dir:i,maxWidth:l,maxHeight:w,className:d,style:p,variant:h="action",...b})=>{const g={action:["#EEF3FBcc 32%","#1D50F4cc"],upgrade:["#FDEDCCcc 32%","#FF9F00cc"],critical:["#FFB6B6cc 32%","#CC0000cc"]};return a.jsxs(rs,{modal:!0,onOpenChange:n,open:u,children:[e&&a.jsx(ss,{asChild:!0,children:e}),a.jsxs(Ma,{style:{width:"calc(100% - 64px)",maxWidth:l||Zu[r],maxHeight:w||is,...p},hideCloseButton:s,onInteractOutside:m=>o&&m.preventDefault(),dir:i,"aria-describedby":void 0,"data-variant":h,className:c("wu-group wuexp:wu-rounded-[1.1rem]",d),...b,children:["data-theme"in b&&a.jsx(ls,{colors:g[h],strokeWidth:4,className:c("wuexp:wu-rounded-[1.1rem] wu-transform-gpu wu-flex wu-flex-col",d),style:{maxHeight:w||is},children:t}),!("data-theme"in b)&&t]})]})},La=({children:e,className:t,...r})=>a.jsx("div",{className:c("wu-flex wu-flex-col wu-gap-4 wu-p-4 rtl:wu-text-right wu-overflow-auto wu-bg-white","wuexp:wu-p-8 wuexp:wu-text-gray-lead",t),...r,children:e}),Qu=({children:e,className:t,...r})=>a.jsx(_a,{...r,"data-variant":"action",className:c("wu-text-lg wu-text-gray-lead wu-font-medium","wuexp:wu-rounded-t-xl wuexp:wu-px-4","wuexp:group-data-[variant=action]:wu-bg-blue-sidebar wuexp:group-data-[variant=action]:wu-text-blue-q","wuexp:group-data-[variant=critical]:wu-bg-[#F9E0E0] wuexp:group-data-[variant=critical]:wu-text-red-deep","wuexp:group-data-[variant=upgrade]:wu-bg-[#FEF1D9] wuexp:group-data-[variant=upgrade]:wu-text-yellow-deep",t),children:a.jsx(us,{className:"wuexp:wu-font-normal wuexp:wu-justify-start wuexp:wu-text-2xl wuexp:wu-h-14",children:e})}),Wa=({children:e,className:t,...r})=>a.jsx(ns,{...r,className:c("wu-border-t wu-border-gray-40 wu-bg-white wu-min-h-16 wu-mx-4 wu-px-0","wuexp:wu-mx-0 wuexp:wu-rounded-b-xl wuexp:wu-min-h-16 wuexp:wu-p-4","wuexp:group-data-[variant=upgrade]:wu-border-[#EED6A8]","wuexp:group-data-[variant=action]:wu-border-[#BAC9F8]","wuexp:group-data-[variant=critical]:wu-border-[#F0B3B3]",t),children:e}),qt=({children:e,className:t,...r})=>{const s=f.useRef(null);return a.jsx(Ku,{asChild:!0,children:a.jsx(de,{className:t,ref:s,...r,children:e})})},Ru=({placeholder:e="Select...",value:t,multiple:r=!1,accessorKey:s,variant:o="flat",dir:n="ltr",customTriggerChildren:u,id:i,disabled:l,selectAll:w,isCheckedAll:d,width:p,...h})=>{const[b,g]=f.useState(""),[m,C]=f.useState(e);f.useEffect(()=>{if(!t||Array.isArray(t)&&t.length===0){C(e),g("");return}const y=s.label;if(r&&Array.isArray(t)){const S=t.map(v=>v[y]).join(", ");g(S)}else!r&&!Array.isArray(t)&&g(t[y])},[t,s.label,r,e]);const E=()=>e&&!b?a.jsx("p",{className:"wu-text-xs wu-opacity-70",children:m}):a.jsx("span",{className:c("wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap"),style:{width:`${(p||0)-32}px`},children:d?(w==null?void 0:w.triggerText)??b:b});return a.jsx(Ea,{asChild:!0,dir:n,id:i,disabled:l,children:a.jsxs("button",{...h,disabled:l,className:c("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",o==="outlined"&&"wu-border wu-border-gray-subtle","wu-group/wuSelect wu-select-trigger",h.className),children:[u??E(),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"})]})})},cs=({option:e,value:t,multiple:r=!1,onSelect:s,accessorKey:o,dir:n="ltr"})=>{const[u,i]=f.useState(r?[]:"");f.useEffect(()=>{t&&i(r?t.map(p=>JSON.stringify(p[o.value])):JSON.stringify(t[o.value]))},[t,o.value,r]);const l=r?u.includes(JSON.stringify(e[o.value])):u===JSON.stringify(e[o.value]),w=d=>{e.disabled||(s(e),r&&d.preventDefault())};return a.jsxs(Ot,{onClick:w,disabled:e.disabled,className:c("wu-cursor-pointer wu-text-xs wu-py-2 wu-leading-4 wu-select-item wu-items-start",l&&"wu-bg-gray-10"),dir:n,children:[r&&a.jsx(ke,{checked:l}),a.jsx(ws,{option:e,accessorKey:o})]})},ws=({option:e,accessorKey:t})=>{const r=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,r,e.isAdmin&&a.jsx("span",{className:"wu-ml-auto wm-lock wu-text-sm wu-text-orange-deep"})]})},ds=e=>{const{option:t,handleSelectAll:r,isCheckedAll:s,isPartialSelected:o,...n}=e;switch("type"in t?t.type:"option"){case"all":return a.jsxs(Ot,{onSelect:i=>{i.stopPropagation(),i.preventDefault(),r==null||r()},className:c("wu-cursor-pointer wu-text-xs wu-py-2 wu-leading-4 wu-select-item"),dir:n.dir,children:[a.jsx(ke,{"data-partial":o,checked:s||o,partial:o}),a.jsx(ws,{option:t,accessorKey:n.accessorKey})]});case"group":return a.jsxs(zr,{dir:n.dir,children:[a.jsx(bt,{className:"wu-text-xs",children:t.label}),t.options.map((i,l)=>f.createElement(cs,{...n,option:i,key:l}))]});case"divider":return a.jsx(Bt,{className:"wu-mx-4"});default:return a.jsx(cs,{...n,option:t})}},el=e=>{let t=0,r=0;const s=[],o=[],n=u=>{u.type==="divider"?t++:u.type==="group"?(r++,u.options.forEach(i=>{n(i)})):(s.push(u),u.disabled||o.push(u))};return e.forEach(u=>{n(u)}),{separators:t,groups:r,enabledOptions:o,totalData:s.length,cleanData:s}},tl=100,al=400,fs=({data:e,onSelect:t,multiple:r=!1,defaultValue:s,value:o,accessorKey:n,variant:u="flat",dir:i="ltr",placeholder:l,Label:w,virtualizedThreshold:d=tl,maxHeight:p=al,hasGroup:h=!1,Header:b,CustomTrigger:g,selectAll:m,disabled:C,labelPosition:E="top",onScroll:y,maxContentWidth:S,...v})=>{const[T,I]=f.useState(),k=f.useRef(null),[M,A]=f.useState(!1),[O,_]=f.useState(!1),{cleanData:P,enabledOptions:L}=h||m!=null&&m.enable?el(e):{cleanData:e,enabledOptions:[]},F=f.useMemo(()=>r&&m!=null&&m.enable&&e.length>0?[{type:"all",[n.label]:m.label||"Select All"},...e]:e,[e,m,r]),B=f.useCallback(q=>{const V=q[n.value];if(r)I((ie=[])=>{const K=ie,se=K.some(te=>te[n.value]===V)?K.filter(te=>te[n.value]!==V):[...K,q];return t==null||t(se),se});else{const ie=q;I(ie),t==null||t(ie)}},[r,n.value,t]);f.useEffect(()=>{if(s&&o){console.error("defaultValue and value cannot be used simultaneously");return}!s&&!o&&I(void 0),s!==void 0&&I(s),o!==void 0&&I(o)},[s,o]);const W=F.length>d;f.useEffect(()=>{if(!r)return;const q=m!=null&&m.includeDisabled?(T==null?void 0:T.length)===e.length:(T==null?void 0:T.length)===L.length;A(q);const V=(T==null?void 0:T.length)>0&&!q;_(V)},[T,m]);const U=f.useCallback(()=>{const q=M?[]:m!=null&&m.includeDisabled?h?P:e:L;I(q),t==null||t(q)},[M,r,e,L,t,m]),Y=ft(E);return a.jsxs("div",{className:c(Y,"wu-flex wu-select-container"),ref:k,dir:i,children:[a.jsxs(Sa,{children:[a.jsx(Ru,{...v,value:T,multiple:r,variant:u,dir:i,placeholder:l,accessorKey:n,customTriggerChildren:g,id:v.id,disabled:C,selectAll:m,isCheckedAll:M}),a.jsxs(Ft,{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:v.id,style:{maxWidth:S},children:[b,W?a.jsx(tt,{list:F,containerHeight:p,callback:(q,V)=>a.jsx(ds,{option:V,accessorKey:n,multiple:r,onSelect:B,value:T,dir:i,handleSelectAll:U,isCheckedAll:M,isPartialSelected:O}),dir:i}):a.jsx("div",{onScroll:y,style:{maxHeight:p,height:"fit-content",overflow:"auto"},className:"wu-select-list",children:F.map((q,V)=>a.jsx(ds,{option:q,accessorKey:n,multiple:r,onSelect:B,value:T,handleSelectAll:U,isCheckedAll:M,dir:i,isPartialSelected:O},`${V}`))})]})]}),w&&a.jsx(ge,{htmlFor:v.id,className:"wu-select-label",children:w})]})},Vt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],rl=({value:e,onChange:t,min:r=H.sub(new Date,{years:5}),max:s=H.add(new Date,{years:1}),placeholder:o="Select a month",Label:n,labelPosition:u="top",disabled:i,id:l,readonly:w,disabledMonths:d=[],...p})=>{const[h,b]=f.useState(null),[g,m]=f.useState(""),[C,E]=f.useState({value:Math.min(new Date().getFullYear(),new Date(s).getFullYear()),label:Math.min(new Date().getFullYear(),new Date(s).getFullYear())}),y=f.useMemo(()=>{const v=new Date(r).getFullYear(),T=new Date(s).getFullYear();return Array.from({length:T-v+1},(I,k)=>({value:T-k,label:T-k}))},[r,s]);f.useEffect(()=>{if(e){const v=new Date(e),T=v.getFullYear(),I=v.getMonth();b({year:T,month:I}),m(`${Vt[I]} ${T}`),E({value:T,label:T})}},[e]);const S=()=>{h&&t&&(t(new Date(h.year,h.month,15)),m(`${Vt[h.month]} ${h.year}`))};return a.jsxs("div",{className:c("wu-flex wu-flex-col wu-items-center",ft(u),u==="top"&&"wu-items-start"),children:[a.jsxs(Ee,{children:[a.jsx(xa,{...p,disabled:i||w,id:l,dir:"ltr",placeholder:o,formattedString:g}),a.jsxs(ye,{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(fs,{data:y,accessorKey:{value:"value",label:"label"},value:C,onSelect:v=>E(v),multiple:!1,maxHeight:224})}),a.jsx(sl,{year:C==null?void 0:C.value,selectedMonth:h==null?void 0:h.month,selectedYear:h==null?void 0:h.year,onClick:(v,T)=>b({year:T,month:v}),disabledMonths:d}),a.jsx("div",{className:"wu-flex wu-justify-end wu-px-0.5",children:a.jsx(it.PopoverClose,{asChild:!0,children:a.jsx(de,{onClick:S,children:"Apply"})})})]})]}),n&&a.jsx(ge,{className:"wu-truncate wu-max-w-[120px] wu-min-w-fit wu-select-label",children:n})]})},sl=({year:e,selectedMonth:t,selectedYear:r,onClick:s,disabledMonths:o=[]})=>{const n=new Date,u=n.getFullYear(),i=n.getMonth(),l=f.useMemo(()=>{const w=new Set;return o.forEach(d=>{const p=typeof d=="string"?new Date(d):d;w.add(`${p.getFullYear()}-${p.getMonth()}`)}),w},[o]);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:Vt.map((w,d)=>{const p=e===u&&d===i,h=t===d&&r===e;return a.jsx("button",{disabled:l.has(`${e}-${d}`),onClick:()=>s(d,e),className:c("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",p&&"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":`${Vt[d]} ${e}`,"data-month":d,"data-year":e,children:w},w)})})},ps=(e,t,r,s=96)=>{if(e.length===0||s<=0)return[[],[]];const[n,u]=f.useState([]),[i,l]=f.useState([]);return f.useEffect(()=>{const w=()=>{var g,m;const d=((g=t.current)==null?void 0:g.clientWidth)||0,p=((m=r.current)==null?void 0:m.clientWidth)||0,h=d-p,b=Math.floor(h/s);u(e.slice(0,b)),l(e.slice(b))};return w(),window.addEventListener("resize",w),()=>{window.removeEventListener("resize",w)}},[e,s]),[n,i]},hs={wuPrimaryLink:"_wuPrimaryLink_1sy3v_1",wuPrimaryPopoverContent:"_wuPrimaryPopoverContent_1sy3v_8"},ol=e=>{const{Links:t,children:r,className:s,...o}=e,n=f.useMemo(()=>t.map((d,p)=>f.cloneElement(d,{className:c(hs.wuPrimaryLink,d.props.className,"wu-primary-nav-link"),key:p})),[t]),u=f.useRef(null),i=f.useRef(null),[l,w]=ps(n,u,i);return a.jsx(a.Fragment,{children:a.jsxs("header",{className:c("wu-flex wu-items-center wu-justify-between wu-gap-4 wu-px-2 wu-py-1 wu-bg-white wu-border-b",s),...o,ref:u,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}),w.length>0&&a.jsxs(Ee,{children:[a.jsx(Oe,{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(ye,{className:c(hs.wuPrimaryPopoverContent,"wu-primary-nav-popover-left"),align:"start",sideOffset:12,children:w})]})]}),r&&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:i,children:r}),a.jsxs(Ee,{children:[a.jsx(Oe,{className:"sm:wu-hidden",children:a.jsx("span",{className:"wu-text-lg wm-menu"})}),a.jsx(ye,{className:"wu-bg-white wu-border wu-border-blue-p wu-w-fit wu-primary-nav-popover-right",align:"end",sideOffset:4,children:r})]})]})]})})},Pa={wuSecondaryLink:"_wuSecondaryLink_1edl1_1",wuSecondaryNav:"_wuSecondaryNav_1edl1_6"},nl=e=>{const{Links:t,children:r,className:s,...o}=e,n=f.useMemo(()=>t.map((p,h)=>f.cloneElement(p.link,{key:h,className:c(Pa.wuSecondaryLink,p.link.props.className,"wu-secondary-nav-link-container"),children:a.jsxs(a.Fragment,{children:[f.cloneElement(p.imgOrIcon,{className:c("wu-w-5 wu-h-5 wu-flex wu-items-center wu-justify-center wu-text-lg wu-leading-5",p.imgOrIcon.props.className)}),a.jsx("div",{className:"wu-secondary-nav-link",children:p.link.props.children})]})})),[t]),u=f.useRef(null),i=f.useRef(null),l=f.useRef(null),[w,d]=ps(n,u,l);return a.jsx(a.Fragment,{children:a.jsxs("header",{className:c("wu-flex wu-items-center wu-justify-between wu-gap-4 wu-border-y wu-border-gray-25 wu-h-[50px]",s),...o,ref:u,children:[a.jsxs("div",{className:"wu-flex wu-items-center wu-justify-start wu-gap-2",children:[a.jsx("nav",{className:c(Pa.wuSecondaryNav,"wu-flex wu-items-center wu-justify-start wu-w-full wu-h-full wu-secondary-nav-left"),ref:i,children:w}),d.length>0&&a.jsxs(Ee,{children:[a.jsx(Oe,{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(ye,{className:c(Pa.wuSecondaryNavPopover,"wu-secondary-nav-popover-left"),align:"start",sideOffset:12,children:d})]})]}),r&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"wu-items-center wu-justify-end wu-hidden sm:wu-flex",ref:l,children:r}),a.jsxs(Ee,{children:[a.jsx(Oe,{className:"sm:wu-hidden",children:a.jsx("span",{className:"wu-text-lg wm-menu"})}),a.jsx(ye,{className:"wu-bg-white wu-border wu-border-blue-p wu-w-fit wu-secondary-nav-popover-right",align:"end",sideOffset:12,children:r})]})]})]})})},bs=f.forwardRef(({totalRows:e,initialPage:t=0,initialPageSize:r=100,onPageChange:s,className:o,disabled:n=!1,...u},i)=>{const[l,w]=f.useState(t),[d,p]=f.useState(r);f.useEffect(()=>{w(t),p(r)},[t,r]);const h=Math.ceil(e/d),b=l*d+1,g=Math.min((l+1)*d,e),m=Array.from({length:h},(y,S)=>S),C=f.useCallback(y=>{y>=0&&y<h&&(w(y),s==null||s(y))},[h,s]),E=224;return a.jsxs("div",{className:c("wu-flex wu-items-center wu-gap-[2px]",o,"wu-pagination"),...u,role:"navigation",children:[a.jsx(gs,{label:"Previous page",onClick:()=>C(l-1),disabled:l===0||n,icon:"wm-arrow-back-ios-new",className:"hover:wu-bg-gray-20 rtl:wu-rotate-180 wu-prev-btn"}),a.jsx(ts,{name:`${b} - ${g}`,className:"wu-w-[96px] wu-min-w-[96px] wu-pagination-menu",align:"end",disabled:n,children:a.jsx(at,{style:{maxHeight:E+"px"},dir:u.dir,children:m.length>100?a.jsx(tt,{className:"wu-pagination-list",containerHeight:E,list:m,callback:(y,S)=>a.jsxs(Ta,{onSelect:()=>C(S),className:c("wu-py-2",S===l&&"wu-bg-gray-20","wu-pagination-item"),children:[S*d+1," -"," ",Math.min((S+1)*d,e)]},y)}):m.map(y=>a.jsxs(Ta,{onSelect:()=>C(y),className:c(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(gs,{label:"Next page",onClick:()=>C(l+1),disabled:l===h-1||n,icon:"wm-arrow-forward-ios",className:"hover:wu-bg-gray-20 rtl:wu-rotate-180 wu-next-btn"})]})});bs.displayName="WuPagination";const gs=({label:e,onClick:t,disabled:r,icon:s,className:o})=>a.jsx(de,{variant:"iconOnly",onClick:t,disabled:r,className:c("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",o),"aria-label":e,children:a.jsx("span",{className:c("wu-text-sm",s)})}),ul=({Trigger:e,children:t,className:r,dir:s,open:o,onOpenChange:n,modal:u,...i})=>a.jsxs(Ee,{open:o,onOpenChange:n,modal:u,children:[a.jsx(Oe,{asChild:!0,dir:s,children:e}),a.jsx(ye,{className:c("wu-w-80 wu-p-0 wu-border-blue-p wu-bg-white wu-dark:border-gray-switcher",r),dir:s,...i,children:t})]}),ll=e=>a.jsx(it.PopoverClose,{asChild:!0,children:a.jsx(de,{...e})}),ms=x.forwardRef(({className:e,...t},r)=>a.jsx(dt.Root,{className:c("wu-grid wu-gap-2",e),...t,ref:r}));ms.displayName=dt.Root.displayName;const xs=x.forwardRef(({className:e,...t},r)=>a.jsx(dt.Item,{ref:r,className:c("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(dt.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"})})}));xs.displayName=dt.Item.displayName;const ys=f.forwardRef((e,t)=>{const{options:r,defaultValue:s,onChange:o,label:n,dir:u,...i}=e;return a.jsxs(ms,{defaultValue:s,required:i.required,disabled:i.disabled,onValueChange:o,id:i.id,dir:u,name:i.name,className:c("w-fit",i.className),ref:t,style:i.style,children:[a.jsx(Lt,{htmlFor:i.id,className:"wu-text-sm wu-font-normal wu-text-gray-lead wu-leading-6 wu-radio-group-label",children:n}),r.map(l=>a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2 wu-radio-item-container",children:[a.jsx(xs,{value:l.value,id:l.value,disabled:l.disabled,required:l.required,"aria-label":l.value,className:"wu-peer wu-radio-item"}),a.jsx(Lt,{htmlFor:l.value,className:c(l.required&&"after:wu-content-['*'] after:wu-mx-[2px] after:wu-text-rose-500","wu-radio-item-label"),children:l.label})]},l.value))]})});ys.displayName="WuRadioGroup";const il=e=>{const{children:t,...r}=e;return a.jsxs(at,{...r,role:"complementary","aria-label":"ScrollArea",children:[t,a.jsx(Ia,{orientation:"horizontal"})]})},vs=x.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...s},o)=>a.jsx(gr.Root,{ref:o,decorative:r,orientation:t,className:c("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...s}));vs.displayName=gr.Root.displayName;function Ns({className:e,...t}){return a.jsx("div",{className:c("animate-pulse rounded-md bg-muted",e),...t})}const Fa=768;function cl(){const[e,t]=x.useState(void 0);return x.useEffect(()=>{const r=window.matchMedia(`(max-width: ${Fa-1}px)`),s=()=>{t(window.innerWidth<Fa)};return r.addEventListener("change",s),t(window.innerWidth<Fa),()=>r.removeEventListener("change",s)},[]),!!e}const wl="sidebar_state",dl=3600*24*7,fl="256px",pl="256px",hl="3rem",bl="b",Cs=x.createContext(null);function $e(){const e=x.useContext(Cs);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Ss=x.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:r,className:s,style:o,children:n,...u},i)=>{const l=cl(),[w,d]=x.useState(!1),[p,h]=x.useState(l?!0:e),b=t??p,g=x.useCallback(y=>{const S=typeof y=="function"?y(b):y;r?r(S):h(S),document.cookie=`${wl}=${S}; path=/; max-age=${dl}`},[r,b]),m=x.useCallback(()=>l?d(y=>!y):g(y=>!y),[l,g,d]);x.useEffect(()=>{const y=S=>{S.key===bl&&(S.metaKey||S.ctrlKey)&&(S.preventDefault(),m())};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[m]);const C=b?"expanded":"collapsed",E=x.useMemo(()=>({state:C,open:b,setOpen:g,isMobile:l,openMobile:w,setOpenMobile:d,toggleSidebar:m}),[C,b,g,l,w,d,m]);return a.jsx(Cs.Provider,{value:E,children:a.jsx(Mr,{delayDuration:0,children:a.jsx("div",{style:{"--sidebar-width":fl,"--sidebar-width-icon":hl,...o},className:c("wu-group/sidebar-wrapper wu-flex wu-min-h-[calc(100svh-48px)] wu-w-full",s),ref:i,...u,children:n})})})});Ss.displayName="SidebarProvider";const Es=x.forwardRef(({side:e="left",variant:t="sidebar",collapsible:r="offcanvas",className:s,children:o,...n},u)=>{const{isMobile:i,state:l,openMobile:w,setOpenMobile:d}=$e();return r==="none"?a.jsx("div",{className:c("wu-flex wu-h-full wu-w-[--sidebar-width] wu-flex-col",s),ref:u,...n,children:o}):i?a.jsx(Kr,{open:w,onOpenChange:d,...n,children:a.jsx(ka,{"data-sidebar":"sidebar","data-mobile":"true",className:"wu-w-[--sidebar-width] wu-bg-blue-sidebar wu-p-0 [&>button]:wu-hidden",style:{"--sidebar-width":pl},side:e,children:a.jsx("div",{className:"wu-flex wu-flex-col wu-w-full wu-h-full",children:o})})}):a.jsxs("div",{ref:u,className:"wu-hidden wu-group wu-peer md:wu-block","data-state":l,"data-collapsible":l==="collapsed"?r:"","data-variant":t,"data-side":e,children:[a.jsx("div",{className:c("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:c("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",s),...n,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:o})})]})});Es.displayName="Sidebar";const ks=x.forwardRef(({className:e,onClick:t,children:r,...s},o)=>{const{toggleSidebar:n}=$e();return a.jsxs(Re,{ref:o,"data-sidebar":"trigger",variant:"secondary",className:c("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:u=>{t==null||t(u),n()},...s,children:[r,a.jsx("span",{className:"wu-sr-only",children:"Toggle Sidebar"})]})});ks.displayName="SidebarTrigger";const gl=x.forwardRef(({className:e,...t},r)=>{const{toggleSidebar:s}=$e();return a.jsx("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:s,title:"Toggle Sidebar",className:c("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})});gl.displayName="SidebarRail";const Ts=x.forwardRef(({className:e,...t},r)=>a.jsx("main",{ref:r,className:c("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}));Ts.displayName="SidebarInset";const ml=x.forwardRef(({className:e,...t},r)=>a.jsx(ba,{ref:r,"data-sidebar":"input",className:c("wu-h-8 wu-w-full wu-shadow-none focus-visible:wu-ring-2",e),...t}));ml.displayName="SidebarInput";const Is=x.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,"data-sidebar":"header",className:c("wu-flex wu-flex-col wu-gap-2 wu-p-2",e),...t}));Is.displayName="SidebarHeader";const Ds=x.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,"data-sidebar":"footer",className:c("wu-flex wu-flex-col wu-gap-2 wu-pb-2",e),...t}));Ds.displayName="SidebarFooter";const xl=x.forwardRef(({className:e,...t},r)=>a.jsx(vs,{ref:r,"data-sidebar":"separator",className:c("wu-mx-2 wu-w-auto",e),...t}));xl.displayName="SidebarSeparator";const Ms=x.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,"data-sidebar":"content",className:c("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}));Ms.displayName="SidebarContent";const _s=x.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,"data-sidebar":"group",className:c("wu-relative wu-flex wu-w-full wu-min-w-0 wu-flex-col wu-p-2",e),...t}));_s.displayName="SidebarGroup";const As=x.forwardRef(({className:e,asChild:t=!1,...r},s)=>{const o=t?Xe.Slot:"div";return a.jsx(o,{ref:s,"data-sidebar":"group-label",className:c("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),...r})});As.displayName="SidebarGroupLabel";const yl=x.forwardRef(({className:e,asChild:t=!1,...r},s)=>{const o=t?Xe.Slot:"button";return a.jsx(o,{ref:s,"data-sidebar":"group-action",className:c("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),...r})});yl.displayName="SidebarGroupAction";const Ls=x.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,"data-sidebar":"group-content",className:c("wu-w-full wu-text-sm",e),...t}));Ls.displayName="SidebarGroupContent";const Oa=x.forwardRef(({className:e,...t},r)=>a.jsx("ul",{ref:r,"data-sidebar":"menu",className:c("wu-flex wu-w-full wu-min-w-0 wu-flex-col wu-gap-1",e),...t}));Oa.displayName="SidebarMenu";const Ws=x.forwardRef(({className:e,...t},r)=>a.jsx("li",{ref:r,"data-sidebar":"menu-item",className:c("wu-group/menu-item wu-relative",e),...t}));Ws.displayName="SidebarMenuItem";const vl=Se.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"}}),Ps=x.forwardRef(({asChild:e=!1,isActive:t=!1,variant:r="default",size:s="default",tooltip:o,className:n,...u},i)=>{const l=e?Xe.Slot:"button",{isMobile:w,state:d}=$e(),p=a.jsx(l,{ref:i,"data-sidebar":"menu-button","data-size":s,"data-active":t,className:c(vl({variant:r,size:s}),n),...u});return o?(typeof o=="string"&&(o={children:o}),a.jsxs(_r,{children:[a.jsx(Ar,{asChild:!0,children:p}),a.jsx(ga,{side:"right",align:"center",hidden:d!=="collapsed"||w,...o})]})):p});Ps.displayName="SidebarMenuButton";const Nl=x.forwardRef(({className:e,asChild:t=!1,showOnHover:r=!1,...s},o)=>{const n=t?Xe.Slot:"button";return a.jsx(n,{ref:o,"data-sidebar":"menu-action",className:c("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",r&&"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),...s})});Nl.displayName="SidebarMenuAction";const Cl=x.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,"data-sidebar":"menu-badge",className:c("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}));Cl.displayName="SidebarMenuBadge";const Sl=x.forwardRef(({className:e,showIcon:t=!1,...r},s)=>{const o=x.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return a.jsxs("div",{ref:s,"data-sidebar":"menu-skeleton",className:c("wu-flex wu-h-8 wu-items-center wu-gap-2 wu-rounded-md wu-px-2",e),...r,children:[t&&a.jsx(Ns,{className:"wu-rounded-md wu-size-4","data-sidebar":"menu-skeleton-icon"}),a.jsx(Ns,{className:"wu-h-4 wu-max-w-[--skeleton-width] wu-flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})});Sl.displayName="SidebarMenuSkeleton";const El=x.forwardRef(({className:e,...t},r)=>a.jsx("ul",{ref:r,"data-sidebar":"menu-sub",className:c("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}));El.displayName="SidebarMenuSub";const kl=x.forwardRef(({...e},t)=>a.jsx("li",{ref:t,...e}));kl.displayName="SidebarMenuSubItem";const Tl=x.forwardRef(({asChild:e=!1,size:t="md",isActive:r,className:s,...o},n)=>{const u=e?Xe.Slot:"a";return a.jsx(u,{ref:n,"data-sidebar":"menu-sub-button","data-size":t,"data-active":r,className:c("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",s),...o})});Tl.displayName="SidebarMenuSubButton";const Il=({children:e,Sidebar:t,className:r,defaultOpen:s=!0,open:o,onOpenChange:n,style:u})=>a.jsxs(Ss,{defaultOpen:s,open:o,onOpenChange:n,children:[a.jsxs(Es,{variant:"sidebar",collapsible:"icon",className:c("wu-top-12 wu-h-[calc(100%-48px)] wu-shadow-sidebar wu-border-none",r),style:u,role:"complementary",children:[a.jsx(Is,{className:"wu-py-2",children:a.jsx(Fs,{})}),t]}),a.jsx(Ts,{className:"wu-contain-inline-size",children:e})]}),Fs=e=>{const{state:t,isMobile:r,openMobile:s}=$e();return a.jsx(ks,{...e,children:a.jsx(Da,{showMenu:r?s:t==="expanded"})})},Dl=({className:e,children:t,...r})=>{const s=f.useRef(null),o=f.useRef(null),n=({currentTarget:i})=>{const{scrollTop:l,clientHeight:w,scrollHeight:d}=i;s.current&&s.current.classList.toggle("wu-border-[#1b338014]",l!==0),o.current&&o.current.classList.toggle("wu-border-[#1b338014]",l+w!==d)},u="wu-w-[calc(100%-16px)] wu-mx-auto wu-border-transparent";return a.jsxs(Ms,{...r,className:c("wu-overflow-hidden wu-gap-0",e),children:[a.jsx("hr",{className:u,ref:s}),a.jsx(at,{onScroll:n,className:"wu-gap-2",thumbColor:"#b9c3dc",railColor:"#00000000","data-testid":"scroll-area",children:t}),a.jsx("hr",{className:u,ref:o})]})},Ml=e=>a.jsx(Ds,{...e,children:e.children}),_l=({label:e,children:t,...r})=>a.jsxs(_s,{...r,className:"wu-p-0",children:[a.jsx("div",{className:"wu-h-8",children:a.jsx(As,{className:"wu-items-end wu-px-4 wu-text-xs wu-font-normal wu-leading-4 wu-text-blue-q",children:e})}),a.jsx(Ls,{children:a.jsx(Oa,{children:t})})]}),Al=e=>a.jsx(Oa,{...e}),Ll=({Icon:e,children:t,className:r,isActive:s,...o})=>{const{state:n}=$e(),[u,i]=f.useState(),l=t&&f.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:c("wu-text-sm wu-leading-4 wu-transition-opacity wu-duration-150",n==="collapsed"&&"wu-opacity-0"),children:t.props.children})]})}),w=f.useRef(null);return f.useEffect(()=>{var d;i(((d=w.current)==null?void 0:d.textContent)||"")},[]),a.jsx(Ws,{...o,className:"wu-flex wu-items-center wu-gap-2 wu-px-2",children:a.jsx(Ps,{className:c("wu-flex wu-items-center wu-text-blue-q hover:wu-bg-blue-sidebarHover wu-cursor-pointer wu-h-8 wu-rounded-sm",r,s&&"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:s,tooltip:u,asChild:!0,ref:w,children:l})})},Wl=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"}]]),Ba=(e,t,r=1)=>{const s=e.match(/hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*([\d.]+)\s*)?\)/);if(!s)throw new Error("Invalid HSL color format");const o=parseFloat(s[1]),n=parseFloat(s[2]),u=Math.max(0,parseFloat(s[3])+t);return`hsl(${o} ${n}% ${u}% / ${r})`},Pl=({index:e,viewIndex:t,length:r,itemHeight:s})=>{const o=(e-t+r)%r;let n;o===0?n=0:o===r-1&&r>=2?n=-1:o===r-2&&r>=3?n=-2:o===1?n=1:o===2?n=2:o===r-3&&r>=4?n=-3:n=3;const u=Wl.get(n)||{},i=n>0?s+28+(n-1)*20:u.top;return{position:n,styles:{...u,...n>0&&{top:`${i}px`},height:n>0?"40px":s}}},rt={LIGHTNESS_STEP:8,BORDER_LIGHTNESS:10,CONTENT_LIGHTNESS:45,CONTENT_HEIGHT:"calc(100% - 2rem)",FONT_SIZE_ACTIVE:"14px",FONT_SIZE_INACTIVE:"12px"},Fl=({children:e,className:t,header:r,baseColor:s,position:o=0,style:n,...u})=>{const i=o===0,l=o<=0,w={border:i?`4px solid ${Ba(s,rt.BORDER_LIGHTNESS)}`:"",...n},d={backgroundColor:Ba(s,o*rt.LIGHTNESS_STEP),fontSize:i?rt.FONT_SIZE_ACTIVE:rt.FONT_SIZE_INACTIVE,transition:"all 0.3s ease"},p={backgroundColor:Ba(s,rt.CONTENT_LIGHTNESS),height:rt.CONTENT_HEIGHT};return a.jsxs("div",{className:c("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:w,...u,children:[a.jsx("div",{style:d,className:"wu-p-2 wu-text-white",children:r}),l&&a.jsx("div",{className:"wu-p-2 wu-overflow-y-auto wu-text-sm",style:p,children:e})]})},Ol=({children:e,Trigger:t,Header:r,styles:s={},classNames:o={},open:n,onOpenChange:u,itemHeight:i})=>{const l={height:i,...s.Trigger};return a.jsxs(rs,{open:n,onOpenChange:u,children:[a.jsx(ss,{className:c("wu-bg-gray-25 wu-z-0 wu-w-full wu-rounded-lg wu-rounded-tl-none wu-relative",o.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(Ma,{className:c("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",o.Content),hideCloseButton:!0,isStackedCard:!0,style:s.Content,children:[a.jsx(fr.DialogClose,{className:c("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",o.CloseButton),style:s.CloseButton,"aria-label":"Close dialog",children:a.jsx(we,{icon:"wm-close",className:"wu-text-lg wu-m-4 wu-cursor-pointer"})}),r&&a.jsx(_a,{className:c("wu-h-12 wu-p-2 wu-pl-4 wu-bg-white/25 wu-backdrop-blur-[24px]",o.Header),style:s.Header,children:r}),e]})]})};function Bl({controlled:e,default:t,name:r,state:s="value"}){const{current:o}=x.useRef(e!==void 0),[n,u]=x.useState(t),i=o?e:n;if(process.env.NODE_ENV!=="production"){x.useEffect(()=>{o!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${o?"":"un"}controlled ${s} state of ${r} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${r} 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(`
|
|
5
|
+
`))},[s,r,e]);const{current:w}=x.useRef(t);x.useEffect(()=>{!o&&JSON.stringify(w)!==JSON.stringify(t)&&console.error([`Base UI: A component is changing the default ${s} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join(`
|
|
6
|
+
`))},[JSON.stringify(t)])}const l=x.useCallback(w=>{o||u(w)},[]);return[i,l]}const Os={};function st(e,t){const r=x.useRef(Os);return r.current===Os&&(r.current=e(t)),r}const qa=x[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],ql=qa&&qa!==x.useLayoutEffect?qa:e=>e();function ve(e){const t=st(Vl).current;return t.next=e,ql(t.effect),t.trampoline}function Vl(){const e={next:void 0,callback:zl,trampoline:(...t)=>{var r;return(r=e.callback)==null?void 0:r.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function zl(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const Hl=[];function Bs(e){x.useEffect(e,Hl)}const gt=0;class zt{constructor(){Dt(this,"currentId",gt);Dt(this,"clear",()=>{this.currentId!==gt&&(clearTimeout(this.currentId),this.currentId=gt)});Dt(this,"disposeEffect",()=>this.clear)}static create(){return new zt}start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=gt,r()},t)}isStarted(){return this.currentId!==gt}}function Va(){const e=st(zt.create).current;return Bs(e.disposeEffect),e}const qs=0;class za extends zt{constructor(){super(...arguments);Dt(this,"clear",()=>{this.currentId!==qs&&(clearInterval(this.currentId),this.currentId=qs)})}static create(){return new za}start(r,s){this.clear(),this.currentId=setInterval(()=>{s()},r)}}function $l(){const e=st(za.create).current;return Bs(e.disposeEffect),e}const me=typeof document<"u"?x.useLayoutEffect:()=>{};function Ha(e){const t=st(Ul,e).current;return t.next=e,me(t.effect),t}function Ul(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function jl(){const[,e]=x.useState({});return x.useCallback(()=>{e({})},[])}function Gl(){return typeof window<"u"}function Vs(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Yl(e){return Gl()?e instanceof HTMLElement||e instanceof Vs(e).HTMLElement:!1}function Kl(e){return(e==null?void 0:e.ownerDocument)||document}const Ht=typeof navigator<"u",$a=Ql(),Jl=ei(),Xl=Rl();typeof CSS>"u"||!CSS.supports||CSS.supports("-webkit-backdrop-filter:none");const Zl=$a.platform==="MacIntel"&&$a.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test($a.platform);Ht&&Jl.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints,Xl.includes("jsdom/");function Ql(){if(!Ht)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 Rl(){if(!Ht)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:r})=>`${t}/${r}`).join(" "):navigator.userAgent}function ei(){if(!Ht)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}const Ua=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ua.displayName="NumberFieldRootContext");function $t(){const e=x.useContext(Ua);if(e===void 0)throw new Error("Base UI: NumberFieldRootContext is missing. NumberField parts must be placed within <NumberField.Root>.");return e}function _e(){}const qe=Object.freeze({});let zs=(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 ja={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},ti={valid(e){return e===null?null:e?{[zs.valid]:""}:{[zs.invalid]:""}}},Hs=x.createContext({invalid:void 0,controlId:void 0,setControlId:_e,labelId:void 0,setLabelId:_e,messageIds:[],setMessageIds:_e,name:void 0,validityData:{state:ja,errors:[],error:"",value:"",initialValue:null},setValidityData:_e,disabled:void 0,touched:!1,setTouched:_e,dirty:!1,setDirty:_e,filled:!1,setFilled:_e,focused:!1,setFocused:_e,validate:()=>null,validationMode:"onBlur",validationDebounceTime:0,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1}});process.env.NODE_ENV!=="production"&&(Hs.displayName="FieldRootContext");function Ut(e=!0){const t=x.useContext(Hs);if(t.setControlId===_e&&!e)throw new Error("Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.");return t}const mt={inputValue:()=>null,value:()=>null};function $s(e,t,r,s){const o=st(Us).current;return ri(o,e,t,r,s)&&js(o,[e,t,r,s]),o.callback}function ai(e){const t=st(Us).current;return si(t,e)&&js(t,e),t.callback}function Us(){return{callback:null,cleanup:null,refs:[]}}function ri(e,t,r,s,o){return e.refs[0]!==t||e.refs[1]!==r||e.refs[2]!==s||e.refs[3]!==o}function si(e,t){return e.refs.length!==t.length||e.refs.some((r,s)=>r!==t[s])}function js(e,t){if(e.refs=t,t.every(r=>r==null)){e.callback=null;return}e.callback=r=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),r!=null){const s=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const n=t[o];if(n!=null)switch(typeof n){case"function":{const u=n(r);typeof u=="function"&&(s[o]=u);break}case"object":{n.current=r;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const n=t[o];if(n!=null)switch(typeof n){case"function":{const u=s[o];typeof u=="function"?u():n(null);break}case"object":{n.current=null;break}}}}}}}const oi=parseInt(x.version,10);function ni(e){return oi>=e}function Gs(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function ui(e,t){const r={};for(const s in e){const o=e[s];if(t!=null&&t.hasOwnProperty(s)){const n=t[s](o);n!=null&&Object.assign(r,n);continue}o===!0?r[`data-${s.toLowerCase()}`]="":o&&(r[`data-${s.toLowerCase()}`]=o.toString())}return r}function li(e,t){return typeof e=="function"?e(t):e}const xt={};function jt(e,t,r,s,o){let n={...Ga(e,xt)};return t&&(n=Gt(n,t)),r&&(n=Gt(n,r)),s&&(n=Gt(n,s)),n}function ii(e){if(e.length===0)return xt;if(e.length===1)return Ga(e[0],xt);let t={...Ga(e[0],xt)};for(let r=1;r<e.length;r+=1)t=Gt(t,e[r]);return t}function Gt(e,t){return Ys(t)?t(e):ci(e,t)}function ci(e,t){if(!t)return e;for(const r in t){const s=t[r];switch(r){case"style":{e[r]=Gs(e.style,s);break}case"className":{e[r]=Ks(e.className,s);break}default:wi(r,s)?e[r]=di(e[r],s):e[r]=s}}return e}function wi(e,t){const r=e.charCodeAt(0),s=e.charCodeAt(1),o=e.charCodeAt(2);return r===111&&s===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function Ys(e){return typeof e=="function"}function Ga(e,t){return Ys(e)?e(t):e??xt}function di(e,t){return t?e?r=>{if(fi(r)){const o=r;Ya(o);const n=t(o);return o.baseUIHandlerPrevented||e==null||e(o),n}const s=t(r);return e==null||e(r),s}:t:e}function Ya(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Ks(e,t){return t?e?t+" "+e:t:e}function fi(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function yt(e,t,r={}){const s=t.render,o=pi(t,r);if(r.enabled===!1)return null;const n=r.state??qe;return hi(e,s,o,n)}function pi(e,t={}){const{className:r,render:s}=e,{state:o=qe,ref:n,props:u,stateAttributesMapping:i,enabled:l=!0}=t,w=l?li(r,o):void 0,d=l?ui(o,i):qe,p=l?Gs(d,Array.isArray(u)?ii(u):u)??qe:qe;return typeof document<"u"&&(l?Array.isArray(n)?p.ref=ai([p.ref,Js(s),...n]):p.ref=$s(p.ref,Js(s),n):$s(null,null)),l?(w!==void 0&&(p.className=Ks(p.className,w)),p):qe}function hi(e,t,r,s){if(t){if(typeof t=="function")return t(r,s);const o=jt(r,t.props);return o.ref=r.ref,x.cloneElement(t,o)}if(e&&typeof e=="string")return bi(e,r);throw new Error("Base UI: Render element or function are not defined.")}function bi(e,t){return e==="button"?a.jsx("button",{type:"button",...t}):e==="img"?a.jsx("img",{alt:"",...t}):x.createElement(e,t)}function Js(e){return e&&typeof e!="function"?ni(19)?e.props.ref:e.ref:null}const Xs=new Map;function vt(e,t){const r=JSON.stringify({locale:e,options:t}),s=Xs.get(r);if(s)return s;const o=new Intl.NumberFormat(e,t);return Xs.set(r,o),o}function ot(e,t,r){return e==null?"":vt(t,r).format(e)}function Zs(e,t,r){return ot(e,t,{...r,maximumFractionDigits:20})}const gi=["零","〇","一","二","三","四","五","六","七","八","九"],mi={零:"0","〇":"0",一:"1",二:"2",三:"3",四:"4",五:"5",六:"6",七:"7",八:"8",九:"9"},Qs=["٠","١","٢","٣","٤","٥","٦","٧","٨","٩"],Rs=["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"],Ka=["0","1","2","3","4","5","6","7","8","9"],eo=["%","٪","%","﹪"],to=["‰","؉"],ao=["−","-","‒","–","—","﹣"],ro=["+","﹢"],xi=".",yi=",",vi=new RegExp(`[${Qs.join("")}]`,"g"),Ni=new RegExp(`[${Rs.join("")}]`,"g"),Ci=new RegExp(`[${Ka.join("")}]`,"g"),Si=new RegExp(`[${gi.join("")}]`,"g"),Ei=new RegExp(`[${eo.join("")}]`),ki=new RegExp(`[${to.join("")}]`),Ja=/[٠١٢٣٤٥٦٧٨٩]/,so=/[۰۱۲۳۴۵۶۷۸۹]/,Xa=/[零〇一二三四五六七八九]/,oo=new RegExp(`[${Ka.join("")}]`),Ti=[".",",",xi,yi,"٫","٬"],Ii=new RegExp("\\p{Zs}","u"),Di=["+",...ro],Mi=["-",...ao],Yt=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),_i=e=>e.replace(/[-\\\]^]/g,t=>`\\${t}`),no=e=>`[${e.map(_i).join("")}]`,uo=no(["-"].concat(ao)),lo=no(["+"].concat(ro)),io=new RegExp(uo,"gu"),co=new RegExp(lo,"gu"),Nt=new RegExp(uo),Kt=new RegExp(lo);function Za(e,t){const r=vt(e,t).formatToParts(11111.1),s={};return r.forEach(o=>{s[o.type]=o.value}),vt(e).formatToParts(.1).forEach(o=>{o.type==="decimal"&&(s[o.type]=o.value)}),s}function nt(e,t,r){if(e==null)return null;let s=String(e).replace(new RegExp("\\p{Cf}","gu"),"").trim();s=s.replace(io,"-").replace(co,"+");let o=!1;const n=s.match(/([+-])\s*$/);n&&(n[1]==="-"&&(o=!0),s=s.replace(/([+-])\s*$/,""));const u=s.match(/^\s*([+-])/);u&&(u[1]==="-"&&(o=!0),s=s.replace(/^\s*[+-]/,""));let i=t;i===void 0&&(Ja.test(s)||so.test(s)?i="ar":Xa.test(s)&&(i="zh"));const{group:l,decimal:w,currency:d}=Za(i,r),p=vt(i,r).formatToParts(1).filter(k=>k.type==="unit").map(k=>Yt(k.value)),h=p.length?new RegExp(p.join("|"),"g"):null;let b=null;l&&(b=new RegExp("\\p{Zs}","u").test(l)?new RegExp("\\p{Zs}","gu"):new RegExp(Yt(l),"g"));let m=[{regex:l?b:null,replacement:""},{regex:w?new RegExp(Yt(w),"g"):null,replacement:"."},{regex:/./g,replacement:"."},{regex:/,/g,replacement:""},{regex:/٫/g,replacement:"."},{regex:/٬/g,replacement:""},{regex:d?new RegExp(Yt(d),"g"):null,replacement:""},{regex:h,replacement:""},{regex:vi,replacement:k=>String(Qs.indexOf(k))},{regex:Ni,replacement:k=>String(Rs.indexOf(k))},{regex:Ci,replacement:k=>String(Ka.indexOf(k))},{regex:Si,replacement:k=>mi[k]}].reduce((k,{regex:M,replacement:A})=>M?k.replace(M,A):k,s);const C=m.lastIndexOf(".");if(C!==-1&&(m=`${m.slice(0,C).replace(/\./g,"")}.${m.slice(C+1).replace(/\./g,"")}`),/^[-+]?Infinity$/i.test(s)||/[∞]/.test(s))return null;const E=(o?"-":"")+m;let y=parseFloat(E);const S=r==null?void 0:r.style,v=S==="unit"&&(r==null?void 0:r.unit)==="percent",T=Ei.test(e)||S==="percent";return ki.test(e)?y/=1e3:!v&&T&&(y/=100),Number.isNaN(y)?null:y}const Ai={...x};let wo=0;function Li(e,t="mui"){const[r,s]=x.useState(e),o=e||r;return x.useEffect(()=>{r==null&&(wo+=1,s(`${t}-${wo}`))},[r,t]),o}const fo=Ai.useId;function Wi(e,t){if(fo!==void 0){const r=fo();return e??`${t}-${r}`}return Li(e,t)}function Pi(e){return Wi(e,"base-ui")}const Fi=60,Oi=400,Bi=50,qi=3,Vi=8,Jt=1;function zi(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function Xt(e,t={}){return parseFloat(vt("en-US",{maximumFractionDigits:t.maximumFractionDigits,minimumFractionDigits:t.minimumFractionDigits,useGrouping:!1}).format(e))}function Hi(e,{step:t,minWithDefault:r,maxWithDefault:s,minWithZeroDefault:o,format:n,snapOnStep:u,small:i}){if(e===null)return e;const l=zi(e,r,s);if(t!=null&&u){if(i){const d=(l-o)/t,p=Math.round(d),h=o+p*t;return Xt(h,n)}const w=r!==Number.MIN_SAFE_INTEGER?r:o;if(t>0){const d=l-t,p=Math.floor((d-w)/t);return Xt(w+p*t+t,n)}if(t<0){const d=Math.abs(t),p=l-t,h=Math.ceil((p-w)/d);return Xt(w+h*d+t,n)}}return Xt(l,n)}function po(e,t,r){let s=!1,o=!1;const n=qe;return{reason:e,event:t??new Event("base-ui"),cancel(){s=!0},allowPropagation(){o=!0},get isCanceled(){return s},get isPropagationAllowed(){return o},...n}}function Zt(e,t,r){const s=qe;return{reason:e,event:t??new Event("base-ui"),...s}}function $i(e){e.preventDefault(),e.stopPropagation()}function Ui(e){return"nativeEvent"in e}const ho=x.forwardRef(function(t,r){const{id:s,min:o,max:n,smallStep:u=.1,step:i=1,largeStep:l=10,required:w=!1,disabled:d=!1,readOnly:p=!1,name:h,defaultValue:b,value:g,onValueChange:m,onValueCommitted:C,allowWheelScrub:E=!1,snapOnStep:y=!1,format:S,locale:v,render:T,className:I,inputRef:k,...M}=t,{setControlId:A,setDirty:O,validityData:_,setValidityData:P,disabled:L,setFilled:F,invalid:B,name:W,state:U}=Ut(),Y=L||d,q=W??h,[V,ie]=x.useState(!1),K=o??Number.MIN_SAFE_INTEGER,z=n??Number.MAX_SAFE_INTEGER,se=o??0,te=S==null?void 0:S.style,ae=x.useRef(null),Te=Pi(s);me(()=>(A(Te),()=>{A(void 0)}),[Te,A]);const[je,$]=Bl({controlled:g,default:b,name:"NumberField",state:"value"}),D=je??null,J=Ha(D);me(()=>{F(D!==null)},[F,D]);const ne=jl(),X=Ha(S),ce=ve(m),R=x.useRef(!1),Ae=ve((re,j)=>{R.current=!1,C==null||C(re,j)}),he=Va(),Le=$l(),Ne=Va(),We=x.useRef(!1),Pe=x.useRef(0),Fe=x.useRef(!0),Ge=x.useRef(null),oa=x.useRef(()=>{});me(()=>{_.initialValue===null&&D!==_.initialValue&&P(re=>({...re,initialValue:D}))},[P,_.initialValue,D]);const[Ye,Ke]=x.useState(()=>g!==void 0?bo(D,v,S):ot(D,v,S)),[kt,ut]=x.useState("numeric"),oe=ve(()=>{const{decimal:re,group:j,currency:fe}=Za(v,S),Z=new Set;Ti.forEach(le=>Z.add(le)),re&&Z.add(re),j&&(Z.add(j),Ii.test(j)&&Z.add(" "));const Ie=te==="percent"||te==="unit"&&(S==null?void 0:S.unit)==="percent",Ce=te==="percent"||te==="unit"&&(S==null?void 0:S.unit)==="permille";return Ie&&eo.forEach(le=>Z.add(le)),Ce&&to.forEach(le=>Z.add(le)),te==="currency"&&fe&&Z.add(fe),Di.forEach(le=>Z.add(le)),K<0&&Mi.forEach(le=>Z.add(le)),Z}),xe=ve(re=>re!=null&&re.altKey?u:re!=null&&re.shiftKey?l:i),Tt=ve((re,j,fe)=>{const Z=j,Ie=j&&Ui(j)?j.nativeEvent:j,Ce=po("none",Ie),le=Hi(re,{step:fe?xe(Z)*fe:void 0,format:X.current,minWithDefault:K,maxWithDefault:z,minWithZeroDefault:se,snapOnStep:y,small:(Z==null?void 0:Z.altKey)??!1});if(le!==D||re!==D||Fe.current===!1){if(Ge.current=le,ce==null||ce(le,Ce),Ce.isCanceled)return;$(le),O(le!==_.initialValue),R.current=!0}Fe.current&&Ke(ot(le,v,S)),ne()}),It=ve((re,j,fe,Z)=>{const Ie=fe??J.current,Ce=typeof Ie=="number"?Ie+re*j:Math.max(0,o??0);Tt(Ce,Z,j)}),lt=ve(()=>{Ne.clear(),he.clear(),Le.clear(),oa.current(),Pe.current=0}),cn=ve((re,j)=>{if(lt(),!ae.current)return;const fe=Vs(ae.current);function Z(Ce){Ce.preventDefault()}fe.addEventListener("contextmenu",Z),oa.current=()=>{fe.removeEventListener("contextmenu",Z)},fe.addEventListener("pointerup",Ce=>{We.current=!1,lt();const le=Ge.current??J.current;Ae(le,Zt("none",Ce))},{once:!0});function Ie(){const Ce=xe(j)??Jt;It(Ce,re?1:-1,void 0,j)}Ie(),he.start(Oi,()=>{Le.start(Fi,Ie)})});me(function(){if(!Fe.current)return;const j=g!==void 0?bo(D,v,S):ot(D,v,S);j!==Ye&&Ke(j)}),me(function(){if(!Zl)return;let j="text";K>=0&&(j="decimal"),ut(j)},[K,te]),x.useEffect(()=>()=>lt(),[lt]),x.useEffect(function(){const j=ae.current;if(Y||p||!E||!j)return;function fe(Z){if(Z.ctrlKey||Kl(ae.current).activeElement!==ae.current)return;Z.preventDefault();const Ie=xe(Z)??Jt;It(Ie,Z.deltaY>0?-1:1,void 0,Z)}return j.addEventListener("wheel",fe),()=>{j.removeEventListener("wheel",fe)}},[E,It,Y,p,l,i,xe]);const cr=x.useMemo(()=>({...U,disabled:Y,readOnly:p,required:w,value:D,inputValue:Ye,scrubbing:V}),[U,Y,p,w,D,Ye,V]),Zc=x.useMemo(()=>({inputRef:ae,inputValue:Ye,value:D,startAutoChange:cn,stopAutoChange:lt,minWithDefault:K,maxWithDefault:z,disabled:Y,readOnly:p,id:Te,setValue:Tt,incrementValue:It,getStepAmount:xe,allowInputSyncRef:Fe,formatOptionsRef:X,valueRef:J,lastChangedValueRef:Ge,hasPendingCommitRef:R,isPressedRef:We,intentionalTouchCheckTimeout:Ne,movesAfterTouchRef:Pe,name:q,required:w,invalid:B,inputMode:kt,getAllowedNonNumericKeys:oe,min:o,max:n,setInputValue:Ke,locale:v,isScrubbing:V,setIsScrubbing:ie,state:cr,onValueCommitted:Ae}),[ae,Ye,D,cn,lt,K,z,Y,p,Te,Tt,It,xe,Fe,X,J,Ge,R,We,Ne,Pe,q,w,B,kt,oe,o,n,Ke,v,V,cr,Ae]),Qc=yt("div",t,{ref:r,state:cr,props:M,stateAttributesMapping:mt});return a.jsxs(Ua.Provider,{value:Zc,children:[Qc,q&&a.jsx("input",{type:"hidden",name:q,ref:k,value:D??"",disabled:Y,required:w})]})});process.env.NODE_ENV!=="production"&&(ho.displayName="NumberFieldRoot");function bo(e,t,r){return(r==null?void 0:r.maximumFractionDigits)!=null||(r==null?void 0:r.minimumFractionDigits)!=null?ot(e,t,r):Zs(e,t,r)}const go=x.forwardRef(function(t,r){const{render:s,className:o,...n}=t,{state:u}=$t();return yt("div",t,{ref:r,state:u,props:[{role:"group"},n],stateAttributesMapping:mt})});process.env.NODE_ENV!=="production"&&(go.displayName="NumberFieldGroup");let Qa;process.env.NODE_ENV!=="production"&&(Qa=new Set);function mo(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");Qa.has(t)||(Qa.add(t),console.error(`Base UI: ${t}`))}}const xo=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(xo.displayName="CompositeRootContext");function ji(e=!1){const t=x.useContext(xo);if(t===void 0&&!e)throw new Error("Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.");return t}function Gi(e){const{focusableWhenDisabled:t,disabled:r,composite:s=!1,tabIndex:o=0,isNativeButton:n}=e,u=s&&t!==!1,i=s&&t===!1;return{props:x.useMemo(()=>{const w={onKeyDown(d){r&&t&&d.key!=="Tab"&&d.preventDefault()}};return s||(w.tabIndex=o,!n&&r&&(w.tabIndex=t?o:-1)),(n&&(t||u)||!n&&r)&&(w["aria-disabled"]=r),n&&(!t||i)&&(w.disabled=r),w},[s,r,t,u,i,n,o])}}function yo(e={}){const{disabled:t=!1,focusableWhenDisabled:r,tabIndex:s=0,native:o=!0}=e,n=x.useRef(null),u=ji(!0)!==void 0,i=ve(()=>{const h=n.current;return!!((h==null?void 0:h.tagName)==="A"&&(h!=null&&h.href))}),{props:l}=Gi({focusableWhenDisabled:r,disabled:t,composite:u,tabIndex:s,isNativeButton:o});process.env.NODE_ENV!=="production"&&x.useEffect(()=>{if(!n.current)return;const h=n.current.tagName==="BUTTON";o?h||mo("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&&mo("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`.")},[o]);const w=x.useCallback(()=>{const h=n.current;Yi(h)&&u&&t&&l.disabled===void 0&&h.disabled&&(h.disabled=!1)},[t,l.disabled,u]);me(w,[w]);const d=x.useCallback((h={})=>{const{onClick:b,onMouseDown:g,onKeyUp:m,onKeyDown:C,onPointerDown:E,...y}=h;return jt({type:o?"button":void 0,onClick(v){if(t){v.preventDefault();return}b==null||b(v)},onMouseDown(v){t||g==null||g(v)},onKeyDown(v){if(t||(Ya(v),C==null||C(v)),v.baseUIHandlerPrevented)return;const T=v.target===v.currentTarget&&!o&&!i()&&!t,I=v.key==="Enter",k=v.key===" ";T&&((k||I)&&v.preventDefault(),I&&(b==null||b(v)))},onKeyUp(v){t||(Ya(v),m==null||m(v)),!v.baseUIHandlerPrevented&&v.target===v.currentTarget&&!o&&!t&&v.key===" "&&(b==null||b(v))},onPointerDown(v){if(t){v.preventDefault();return}E==null||E(v)}},o?void 0:{role:"button"},l,y)},[t,l,o,i]),p=ve(h=>{n.current=h,w()});return{getButtonProps:d,buttonRef:p}}function Yi(e){return Yl(e)&&e.tagName==="BUTTON"}function vo(e){const{allowInputSyncRef:t,disabled:r,formatOptionsRef:s,getStepAmount:o,id:n,incrementValue:u,inputRef:i,inputValue:l,intentionalTouchCheckTimeout:w,isIncrement:d,isPressedRef:p,locale:h,maxWithDefault:b,minWithDefault:g,movesAfterTouchRef:m,readOnly:C,setValue:E,startAutoChange:y,stopAutoChange:S,value:v,valueRef:T,lastChangedValueRef:I,onValueCommitted:k}=e,M=x.useRef({x:0,y:0}),A=x.useRef(!1),O=x.useRef(!1),_=x.useRef(""),P=v!=null&&v<=g,L=v!=null&&v>=b,F=ve(W=>{t.current=!0;const U=nt(l,h,s.current);U!==null&&(T.current=U,E(U,W))}),B=x.useMemo(()=>({disabled:r||(d?L:P),"aria-readonly":C||void 0,"aria-label":d?"Increase":"Decrease","aria-controls":n,tabIndex:-1,style:{WebkitUserSelect:"none",userSelect:"none"},onTouchStart(){A.current=!0},onTouchEnd(){A.current=!1},onClick(W){const U=r||C||(d?L:P);if(W.defaultPrevented||U||(_.current==="touch"?O.current:W.detail!==0))return;F(W.nativeEvent);const Y=o(W)??Jt,q=T.current;u(Y,d?1:-1,void 0,W.nativeEvent);const V=I.current??T.current;V!==q&&k(V,Zt("none",W.nativeEvent))},onPointerDown(W){var q;const U=!W.button||W.button===0,Y=r||(d?L:P);W.defaultPrevented||C||!U||Y||(_.current=W.pointerType,O.current=!1,p.current=!0,M.current={x:W.clientX,y:W.clientY},F(W.nativeEvent),W.pointerType!=="touch"?(W.preventDefault(),(q=i.current)==null||q.focus(),y(d,W)):w.start(Bi,()=>{const V=m.current;m.current=0,p.current&&V!=null&&V<qi?(y(d,W),O.current=!0):(O.current=!1,S())}))},onPointerUp(W){W.pointerType==="touch"&&(p.current=!1)},onPointerMove(W){if(r||C||(d?L:P)||W.pointerType!=="touch"||!p.current)return;m.current!=null&&(m.current+=1);const{x:Y,y:q}=M.current,V=Y-W.clientX,ie=q-W.clientY;V**2+ie**2>Vi**2&&S()},onMouseEnter(W){const U=r||C||(d?L:P);W.defaultPrevented||U||!p.current||A.current||_.current==="touch"||y(d,W)},onMouseLeave(){A.current||S()},onMouseUp(){A.current||S()}}),[r,d,L,P,C,n,F,o,T,u,I,k,p,i,y,w,m,S]);return x.useMemo(()=>({props:B}),[B])}const No=x.forwardRef(function(t,r){const{render:s,className:o,disabled:n=!1,nativeButton:u=!0,...i}=t,{allowInputSyncRef:l,disabled:w,formatOptionsRef:d,getStepAmount:p,id:h,incrementValue:b,inputRef:g,inputValue:m,intentionalTouchCheckTimeout:C,isPressedRef:E,locale:y,maxWithDefault:S,minWithDefault:v,movesAfterTouchRef:T,readOnly:I,setValue:k,startAutoChange:M,state:A,stopAutoChange:O,value:_,valueRef:P,lastChangedValueRef:L,onValueCommitted:F}=$t(),B=n||w,{props:W}=vo({isIncrement:!0,inputRef:g,startAutoChange:M,stopAutoChange:O,minWithDefault:v,maxWithDefault:S,value:_,inputValue:m,disabled:B,readOnly:I,id:h,setValue:k,getStepAmount:p,incrementValue:b,allowInputSyncRef:l,formatOptionsRef:d,valueRef:P,isPressedRef:E,intentionalTouchCheckTimeout:C,movesAfterTouchRef:T,locale:y,lastChangedValueRef:L,onValueCommitted:F}),{getButtonProps:U,buttonRef:Y}=yo({disabled:B,native:u}),q=x.useMemo(()=>({...A,disabled:B}),[A,B]);return yt("button",t,{ref:[r,Y],state:q,props:[W,i,U],stateAttributesMapping:mt})});process.env.NODE_ENV!=="production"&&(No.displayName="NumberFieldIncrement");const Co=x.forwardRef(function(t,r){const{render:s,className:o,disabled:n=!1,nativeButton:u=!0,...i}=t,{allowInputSyncRef:l,disabled:w,formatOptionsRef:d,getStepAmount:p,id:h,incrementValue:b,inputRef:g,inputValue:m,intentionalTouchCheckTimeout:C,isPressedRef:E,maxWithDefault:y,minWithDefault:S,movesAfterTouchRef:v,readOnly:T,setValue:I,startAutoChange:k,state:M,stopAutoChange:A,value:O,valueRef:_,locale:P,lastChangedValueRef:L,onValueCommitted:F}=$t(),B=n||w,{props:W}=vo({isIncrement:!1,inputRef:g,startAutoChange:k,stopAutoChange:A,minWithDefault:S,maxWithDefault:y,value:O,inputValue:m,disabled:B,readOnly:T,id:h,setValue:I,getStepAmount:p,incrementValue:b,allowInputSyncRef:l,formatOptionsRef:d,valueRef:_,isPressedRef:E,intentionalTouchCheckTimeout:C,movesAfterTouchRef:v,locale:P,lastChangedValueRef:L,onValueCommitted:F}),{getButtonProps:U,buttonRef:Y}=yo({disabled:B,native:u}),q=x.useMemo(()=>({...M,disabled:B}),[M,B]);return yt("button",t,{ref:[r,Y],state:q,props:[W,i,U],stateAttributesMapping:mt})});process.env.NODE_ENV!=="production"&&(Co.displayName="NumberFieldDecrement");const So=x.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:_e});process.env.NODE_ENV!=="production"&&(So.displayName="FormContext");function Ra(){return x.useContext(So)}function er(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const Qt=Object.keys(ja);function Ki(e){if(!e||e.valid||!e.valueMissing)return!1;let t=!1;for(const r of Qt)r!=="valid"&&(r==="valueMissing"&&(t=e[r]),e[r]&&(t=!1));return t}function Ji(){const{setValidityData:e,validate:t,messageIds:r,validityData:s,validationMode:o,validationDebounceTime:n,invalid:u,markedDirtyRef:i,controlId:l,state:w,name:d}=Ut(),{formRef:p,clearErrors:h}=Ra(),b=Va(),g=x.useRef(null),m=ve(async(y,S=!1)=>{const v=g.current;if(!v)return;if(S){if(w.valid!==!1)return;const _=v.validity;if(!_.valueMissing){const L={value:y,state:{...ja,valid:!0},error:"",errors:[],initialValue:s.initialValue};if(v.setCustomValidity(""),l){const F=p.current.fields.get(l);F&&p.current.fields.set(l,{...F,...er(L,!1)})}e(L);return}const P=Qt.reduce((L,F)=>(L[F]=_[F],L),{});if(!P.valid&&!Ki(P))return}function T(_){const P=Qt.reduce((F,B)=>(F[B]=_.validity[B],F),{});let L=!1;for(const F of Qt)if(F!=="valid"){if(F==="valueMissing"&&P[F])L=!0;else if(P[F])return P}return L&&!i.current&&(P.valid=!0,P.valueMissing=!1),P}b.clear();let I=null,k=[];const M=T(v);let A;if(v.validationMessage)A=v.validationMessage,k=[v.validationMessage];else{const _=Array.from(p.current.fields.values()).reduce((L,F)=>{var B,W;return F.name&&F.getValueRef&&(L[F.name]=(W=(B=F.getValueRef).current)==null?void 0:W.call(B)),L},{}),P=t(y,_);typeof P=="object"&&P!==null&&"then"in P?I=await P:I=P,I!==null&&(M.valid=!1,M.customError=!0,Array.isArray(I)?(k=I,v.setCustomValidity(I.join(`
|
|
7
|
+
`))):I&&(k=[I],v.setCustomValidity(I)))}const O={value:y,state:M,error:A??(Array.isArray(I)?I[0]:I??""),errors:k,initialValue:s.initialValue};if(l){const _=p.current.fields.get(l);_&&p.current.fields.set(l,{..._,...er(O,u)})}e(O)}),C=x.useCallback((y={})=>jt({...r.length&&{"aria-describedby":r.join(" ")},...w.valid===!1&&{"aria-invalid":!0}},y),[r,w.valid]),E=x.useCallback((y={})=>jt({onChange(S){if(S.nativeEvent.defaultPrevented)return;if(h(d),o!=="onChange"){m(S.currentTarget.value,!0);return}if(u)return;const v=S.currentTarget;if(v.value===""){m(v.value);return}b.clear(),n?b.start(n,()=>{m(v.value)}):m(v.value)}},C(y)),[C,h,d,b,m,u,o,n]);return x.useMemo(()=>({getValidationProps:C,getInputValidationProps:E,inputRef:g,commitValidation:m}),[C,E,m])}function Xi(e){const{formRef:t}=Ra(),{invalid:r,markedDirtyRef:s,validityData:o,setValidityData:n}=Ut(),{enabled:u=!0,value:i,id:l,name:w,controlRef:d,commitValidation:p}=e,h=Ha(e.getValue);me(()=>{var g;if(!u)return;let b=i;b===void 0&&(b=(g=h.current)==null?void 0:g.call(h)),o.initialValue===null&&b!==o.initialValue&&n(m=>({...m,initialValue:b}))},[u,n,i,o.initialValue,h]),me(()=>{u&&l&&t.current.fields.set(l,{controlRef:d,validityData:er(o,r),validate(){var g;let b=i;b===void 0&&(b=(g=h.current)==null?void 0:g.call(h)),s.current=!0,An.flushSync(()=>p(b))},getValueRef:h,name:w})},[p,d,u,t,h,l,r,s,w,o,i]),me(()=>{const b=t.current.fields;return()=>{l&&b.delete(l)}},[t,l])}const Zi={...ti,...mt},Qi=new Set(["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Enter","Escape"]),Eo=x.forwardRef(function(t,r){const{render:s,className:o,...n}=t,{allowInputSyncRef:u,disabled:i,formatOptionsRef:l,getAllowedNonNumericKeys:w,getStepAmount:d,id:p,incrementValue:h,inputMode:b,inputValue:g,max:m,min:C,name:E,readOnly:y,required:S,setValue:v,state:T,setInputValue:I,locale:k,inputRef:M,value:A,onValueCommitted:O,lastChangedValueRef:_,hasPendingCommitRef:P,valueRef:L}=$t(),{clearErrors:F}=Ra(),{labelId:B,validationMode:W,setTouched:U,setFocused:Y,invalid:q}=Ut(),{getInputValidationProps:V,getValidationProps:ie,commitValidation:K,inputRef:z}=Ji(),se=x.useRef(!1),te=x.useRef(!1);Xi({id:p,commitValidation:K,value:A,controlRef:M,name:E,getValue:()=>A??null});const ae=x.useRef(A),Te=x.useRef(g);return me(()=>{ae.current===A&&Te.current===g||(F(E),W==="onChange"&&K(A))},[A,g,E,F,W,K]),me(()=>{if(!(ae.current===A||W==="onChange")){if(te.current){te.current=!1;return}K(A,!0)}},[K,W,A]),me(()=>{ae.current=A,Te.current=g},[A,g]),yt("input",t,{ref:[r,M,z],state:T,props:[{id:p,required:S,disabled:i,readOnly:y,inputMode:b,value:g,type:"text",autoComplete:"off",autoCorrect:"off",spellCheck:"false","aria-roledescription":"Number field","aria-invalid":q||void 0,"aria-labelledby":B,suppressHydrationWarning:!0,onFocus(D){if(D.defaultPrevented||y||i||se.current)return;se.current=!0,Y(!0);const J=D.currentTarget,ne=J.value.length;J.setSelectionRange(ne,ne)},onBlur(D){if(D.defaultPrevented||y||i)return;U(!0),Y(!1);const J=!u.current,ne=P.current;if(u.current=!0,g.trim()===""){v(null),W==="onBlur"&&K(null),O(null,Zt("none",D.nativeEvent));return}const X=l.current,ce=nt(g,k,X);if(ce===null)return;te.current=!0;const R=(X==null?void 0:X.maximumFractionDigits)!=null||(X==null?void 0:X.minimumFractionDigits)!=null,Ae=X==null?void 0:X.maximumFractionDigits,he=R&&typeof Ae=="number"?Number(ce.toFixed(Ae)):ce,Le=Zt("none",D.nativeEvent),Ne=A!==he,We=J||Ne||ne;W==="onBlur"&&K(he),Ne&&v(he,D.nativeEvent),We&&O(he,Le);const Pe=ot(he,k,X),Fe=Zs(ce,k,X);!(!R&&ce===A&&g===Fe)&&g!==Pe&&I(Pe)},onChange(D){if(D.nativeEvent.defaultPrevented)return;u.current=!1;const J=D.target.value;if(J.trim()===""){I(J),v(null,D.nativeEvent);return}const ne=w();if(!Array.from(J).every(R=>{const Ae=R>="0"&&R<="9",he=Ja.test(R),Le=Xa.test(R),Ne=so.test(R),We=oo.test(R),Pe=Nt.test(R);return Ae||he||Le||Ne||We||Pe||ne.has(R)}))return;if(D.isTrusted){I(J);const R=nt(J,k,l.current);R!==null&&v(R,D.nativeEvent);return}const ce=nt(J,k,l.current);ce!==null&&(I(J),v(ce,D.nativeEvent))},onKeyDown(D){if(D.defaultPrevented||y||i)return;const J=D.nativeEvent;u.current=!0;const ne=w();let X=ne.has(D.key);const{decimal:ce,currency:R,percentSign:Ae}=Za(k,l.current),he=D.currentTarget.selectionStart,Le=D.currentTarget.selectionEnd,Ne=he===0&&Le===g.length,We=oe=>he===oe&&Le===oe+1;if(Nt.test(D.key)&&Array.from(ne).some(oe=>Nt.test(oe||""))){const oe=g.search(io),xe=oe!=null&&oe!==-1&&We(oe);X=!(Nt.test(g)||Kt.test(g))||Ne||xe}if(Kt.test(D.key)&&Array.from(ne).some(oe=>Kt.test(oe||""))){const oe=g.search(co),xe=oe!=null&&oe!==-1&&We(oe);X=!(Nt.test(g)||Kt.test(g))||Ne||xe}[ce,R,Ae].forEach(oe=>{if(D.key===oe){const xe=g.indexOf(oe),Tt=he===xe&&Le===xe+1;X=!g.includes(oe)||Ne||Tt}});const Pe=D.key>="0"&&D.key<="9",Fe=Ja.test(D.key),Ge=Xa.test(D.key),oa=oo.test(D.key),Ye=Qi.has(D.key);if(D.which===229||D.altKey||D.ctrlKey||D.metaKey||X||Pe||Fe||oa||Ge||Ye)return;const Ke=nt(g,k,l.current),kt=d(D)??Jt;$i(D);const ut=po("none",J);D.key==="ArrowUp"?(h(kt,1,Ke,J),O(_.current??L.current,ut)):D.key==="ArrowDown"?(h(kt,-1,Ke,J),O(_.current??L.current,ut)):D.key==="Home"&&C!=null?(v(C,J),O(_.current??L.current,ut)):D.key==="End"&&m!=null&&(v(m,J),O(_.current??L.current,ut))},onPaste(D){if(D.defaultPrevented||y||i)return;D.preventDefault();const ne=(D.clipboardData||window.Clipboard).getData("text/plain"),X=nt(ne,k,l.current);X!==null&&(u.current=!1,v(X,D.nativeEvent),I(ne))}},V(),ie(),n],stateAttributesMapping:Zi})});process.env.NODE_ENV!=="production"&&(Eo.displayName="NumberFieldInput");const Ri={wuStepper:"_wuStepper_apbnq_1"},ko=({onChange:e,Label:t,defaultValue:r=0,readonly:s,dir:o,step:n=1,min:u,max:i,value:l,className:w,labelPosition:d="left",disabled:p,resetInvalidValueOnBlur:h=!0,...b})=>{const g=x.useId(),[m,C]=x.useState(l!==void 0?Number(l):r||0);x.useEffect(()=>{l!==void 0&&C(Number(l))},[l]);const E=k=>{C(k),e==null||e(k)},y=k=>{const M=Number(k.target.value);Number.isNaN(M)||C(M)},S=()=>{h&&(u!==void 0&&m<u?(C(u),e==null||e(u)):i!==void 0&&m>i&&(C(i),e==null||e(i)))};x.useEffect(()=>{l&&r&&console.warn("As both value and defaultValue are passed, value will be used")},[l,r]);const v={inc:s||i!==void 0&&m>=i||p,dec:s||u!==void 0&&m<=u||p},T=u!==void 0&&m<u||i!==void 0&&m>i,I=c("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(ho,{id:g,value:m,step:n,readOnly:s,onValueChange:k=>typeof k=="number"&&E(k),dir:o,className:c("wu-flex wu-stepper",o==="rtl"&&d!=="top"&&"wu-gap-2",Ri.wuStepper,ec({labelPosition:d}),w),children:[t&&a.jsx(ge,{htmlFor:g,className:"wu-input-label",children:t}),a.jsxs(go,{className:"wu-flex wu-max-w-[97px] wu-relative",children:[a.jsx(Co,{"aria-label":"decrement",className:c(I,o==="rtl"?"wu-right-0":"wu-left-0","wu-stepper-button"),disabled:v.dec,children:a.jsx("span",{className:"wu-text-base wm-minimize"})}),a.jsx(Eo,{"aria-label":"stepper",role:"spinbutton",type:"text","aria-invalid":T||void 0,dir:o,className:c("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",T&&"wu-border-red-deep focus:wu-border-red-deep","wu-stepper-input"),readOnly:s,onChange:y,onBlur:S,disabled:p,min:u,max:i,step:n,value:m,...b}),a.jsx(No,{"aria-label":"increment",className:c(I,o==="rtl"?"wu-left-0":"wu-right-0","wu-stepper-button"),disabled:v.inc,children:a.jsx("span",{className:"wu-text-base wm-add"})})]})]})},ec=Se.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"}}}),To=Se.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"}}),tc=x.forwardRef(({className:e,variant:t,size:r,...s},o)=>a.jsx(mr.Root,{ref:o,className:c(To({variant:t,size:r,className:e})),...s}));tc.displayName=mr.Root.displayName;const Io=x.createContext({size:"default",variant:"default"}),Rt=x.forwardRef(({className:e,variant:t,size:r,children:s,...o},n)=>a.jsx(_t.Root,{ref:n,className:c("wu-flex wu-items-center wu-justify-center wu-gap-1",e),...o,children:a.jsx(Io.Provider,{value:{variant:t,size:r},children:s})}));Rt.displayName=_t.Root.displayName;const Ue=x.forwardRef(({className:e,children:t,variant:r,size:s,...o},n)=>{const u=x.useContext(Io);return a.jsx(_t.Item,{ref:n,className:c(To({variant:u.variant||r,size:u.size||s}),e),...o,children:t})});Ue.displayName=_t.Item.displayName;const Do=f.forwardRef((e,t)=>{const{options:r,value:s,disabled:o,dir:n,onChange:u}=e,i=l=>c("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",o&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-lead",l===s&&"wu-text-white",o&&s===l&&"wu-text-gray-lead","wu-switcher-icon-tab-item");return a.jsx(a.Fragment,{children:a.jsxs(Rt,{ref:t,type:"single",value:s,onValueChange:u,disabled:o,dir:n,className:c("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",o&&"wu-cursor-not-allowed","wu-switcher-icon-tab-group"),children:[a.jsx("div",{role:"slider",className:c("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",s==="opt1"&&"",s==="opt2"&&n!=="rtl"&&"wu-translate-x-full",s==="opt2"&&n==="rtl"&&"-wu-translate-x-full",o&&"wu-bg-gray-40","wu-switcher-icon-tab-slider")}),a.jsx(Ue,{value:"opt1",className:i("opt1"),children:r[0].label}),a.jsx(Ue,{value:"opt2",className:i("opt2"),children:r[1].label})]})})});Do.displayName="_IconTab";const Mo=f.forwardRef((e,t)=>{const{options:r,value:s,disabled:o,dir:n,size:u="md",onChange:i}=e,l=w=>c("wu-w-1/2 wu-text-xs wu-rounded-full wu-text-gray-lead wu-relative wu-z-10 wu-font-normal",o&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-lead",u==="sm"&&"wu-h-6 wu-min-w-20",u==="md"&&"wu-h-8 wu-min-w-28",u==="lg"&&"wu-h-10 wu-min-w-36",w===s&&"wu-text-white wu-font-medium",o&&s===w&&"wu-text-gray-lead","wu-switcher-tab-item");return a.jsx(a.Fragment,{children:a.jsxs(Rt,{ref:t,type:"single",value:s,onValueChange:i,disabled:o,dir:n,className:c("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",o&&"wu-cursor-not-allowed","wu-switcher-tab-group"),children:[a.jsx("div",{role:"slider",className:c("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 ",u==="sm"&&"wu-h-6 wu-min-w-20",u==="md"&&"wu-h-8 wu-min-w-28",u==="lg"&&"wu-h-10 wu-min-w-36",s==="opt1"&&"",s==="opt2"&&n!=="rtl"&&"wu-translate-x-full",s==="opt2"&&n==="rtl"&&"-wu-translate-x-full",o&&"wu-bg-gray-40","wu-switcher-tab-slider")}),a.jsx(Ue,{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:r[0].label})}),a.jsx(Ue,{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:r[1].label})})]})})});Mo.displayName="_Tab";const _o=f.forwardRef((e,t)=>{const{options:r,value:s,disabled:o,dir:n,onChange:u}=e,i=p=>c("wu-p-0 wu-w-fit wu-text-xs wu-text-gray-lead wu-h-fit wu-font-normal",o&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-subtle wu-text-gray-subtle",p===s&&"wu-text-primary wu-font-medium",o&&s===p&&"wu-text-gray-lead","wu-switcher-toggle-item"),l=c("wu-w-fit wu-gap-2",o&&"wu-cursor-not-allowed","wu-switcher-toggle-group"),w=c("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",o&&"wu-border-gray-subtle wu-cursor-not-allowed","wu-switcher-toggle-button"),d=c("wu-w-2 wu-h-2 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out",s==="opt1"&&n!=="rtl"&&"-wu-translate-x-[10px]",s==="opt1"&&n==="rtl"&&"wu-translate-x-[10px]",s==="opt2"&&n!=="rtl"&&"wu-translate-x-[10px]",s==="opt2"&&n==="rtl"&&"-wu-translate-x-[10px]",o&&"wu-hidden","wu-switcher-toggle-knob");return a.jsx(a.Fragment,{children:a.jsxs(Rt,{ref:t,type:"single",value:s,disabled:o,dir:n,className:l,onValueChange:u,children:[a.jsx(Ue,{value:"opt1",className:i("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:r[0].label})}),a.jsx("button",{onClick:()=>u(s==="opt1"?"opt2":"opt1"),className:w,disabled:o,"aria-label":"knob",dir:n,children:a.jsx("div",{className:d,role:"knob",dir:n})}),a.jsx(Ue,{value:"opt2",className:i("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:r[1].label})})]})})});_o.displayName="_Toggle";const Ao=f.forwardRef((e,t)=>{const{type:r,options:s,value:o,disabled:n,dir:u,size:i,onChange:l,toggle:w=!0,...d}=e,[p,h]=f.useState(),b=g=>{let m=p;g!==""?m=g:w&&(m=p==="opt1"?"opt2":"opt1");const C=m==="opt1"?s[0].value:s[1].value;l&&l(C),h(m)};if(f.useEffect(()=>{if(!Array.isArray(s)||s.length<2)throw new Error("Options are not sufficient");h(o===s[0].value?"opt1":"opt2")},[s,o]),!Array.isArray(s)||s.length<2)return a.jsx(a.Fragment,{});switch(r){case"toggle":return a.jsx(_o,{...d,ref:t,options:s,value:p||"opt1",onChange:b,disabled:n,dir:u});case"iconTab":return a.jsx(Do,{ref:t,options:s,value:p||"opt1",onChange:b,disabled:n,dir:u});default:return a.jsx(Mo,{ref:t,options:s,value:p||"opt1",onChange:b,disabled:n,dir:u,size:i})}});Ao.displayName="WuSwitcher";const Lo=He.Root,tr=x.forwardRef(({className:e,children:t,...r},s)=>a.jsx(He.List,{className:c("wu-relative wu-flex",e),...r,ref:s,children:t}));tr.displayName=He.List.displayName;const ar=x.forwardRef(({className:e,...t},r)=>a.jsx(He.Trigger,{ref:r,className:c("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}));ar.displayName=He.Trigger.displayName;const Wo=x.forwardRef(({className:e,...t},r)=>a.jsx(He.Content,{ref:r,className:e,...t}));Wo.displayName=He.Content.displayName;const Po=({items:e,enableAnimation:t})=>{const r="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:c("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(s=>a.jsx(Wo,{value:s.value,forceMount:t||void 0,className:c("wu-w-full wu-h-full wu-overflow-y-auto",t&&r,"wu-tab-content"),children:s.Content},s.value))})},ac=e=>{const[t,r]=f.useState(!1),[s,o]=f.useState(!1),n=()=>{const i=e.current;i&&(r(i.scrollLeft>0),o(i.scrollLeft+i.clientWidth<i.scrollWidth))};return f.useEffect(()=>{const i=e.current;return n(),i&&i.addEventListener("scroll",n),window.addEventListener("resize",n),()=>{i&&i.removeEventListener("scroll",n),window.removeEventListener("resize",n)}},[e]),{showLeftArrow:t,showRightArrow:s,scrollByTab:i=>{const l=e.current;if(l){const w=(i==="right"?l.clientWidth:-l.clientWidth)*.8;l.scrollBy({left:w,behavior:"smooth"})}}}},Fo=(e,t)=>{const[r,s]=f.useState({width:0,left:0,height:0,top:0}),o=t==="vertical";return f.useEffect(()=>{const n=e.current;if(n){const u=()=>{const l=n.querySelector('[data-state="active"]');if(l){const w={width:o?2:l.offsetWidth,left:o?0:l.offsetLeft,height:o?l.offsetHeight:1,top:o?l.offsetTop:0};s(w)}},i=new MutationObserver(u);return i.observe(n,{attributes:!0,subtree:!0}),u(),()=>{i.disconnect()}}},[e,o]),r},rc=({items:e,value:t,defaultValue:r,onValueChange:s,enableAnimation:o=!1,className:n,dir:u="ltr",position:i="top"})=>{var S;const l=f.useRef(null),w=Fo(l,"horizontal"),{showLeftArrow:d,showRightArrow:p,scrollByTab:h}=ac(l),[b,g]=f.useState(!1),m=()=>h("left"),C=()=>h("right"),E=v=>a.jsx("div",{"data-testid":`gradient-overlay-${v}`,className:c("wu-absolute wu-top-0 wu-h-full wu-w-20 wu-z-10 wu-pointer-events-none",v==="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=(v,T,I)=>{const k=T==="left";return a.jsx("button",{onClick:v,className:c("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",k?"wu-left-0":"wu-right-0",I&&"wu-translate-x-0 wu-opacity-100",!I&&[k?"-wu-translate-x-full":"wu-translate-x-full","wu-opacity-0"]),"aria-label":k?"scroll-left":"scroll-right",children:a.jsx("span",{className:c("wu-text-blue-p wu-text-lg",k?"wm-keyboard-arrow-left":"wm-keyboard-arrow-right")})})};return a.jsxs(Lo,{defaultValue:r||((S=e[0])==null?void 0:S.value),value:t,onValueChange:s,orientation:"horizontal",dir:u,className:c("wu-relative wu-flex wu-flex-col wu-w-full wu-h-full",i==="bottom"?"wu-flex-col-reverse":"wu-flex-col",n),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:()=>g(!0),onMouseLeave:()=>g(!1),"aria-label":"tablistWrapper",children:[d&&b&&E("left"),y(m,"left",d&&b),a.jsxs(tr,{ref:l,className:c("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(v=>a.jsx(ar,{value:v.value,children:v.Trigger},v.value)),a.jsx("span",{className:"wu-absolute wu-bg-blue-p wu-transition-all wu-duration-300 wu-indicator wu-bottom-0",style:{width:w.width,left:w.left,height:1.25,bottom:i==="bottom"?void 0:0,top:i==="bottom"?0:void 0}})]}),p&&b&&E("right"),y(C,"right",p&&b)]}),a.jsx(Po,{items:e,enableAnimation:o})]})},sc=e=>{const[t,r]=f.useState(!1),[s,o]=f.useState(!1),n=()=>{const i=e.current;i&&(r(i.scrollTop>0),o(i.scrollTop+i.clientHeight<i.scrollHeight))};return f.useEffect(()=>{const i=e.current;if(i)return n(),i.addEventListener("scroll",n),window.addEventListener("resize",n),()=>{i.removeEventListener("scroll",n),window.removeEventListener("resize",n)}},[e]),{showTopArrow:t,showBottomArrow:s,scrollByTab:i=>{const l=e.current;if(l){const w=(i==="down"?l.clientHeight:-l.clientHeight)*.8;l.scrollBy({top:w,behavior:"smooth"})}}}},oc=({items:e,value:t,defaultValue:r,onValueChange:s,enableAnimation:o=!1,className:n,dir:u="ltr",position:i="left"})=>{var S;const l=f.useRef(null),w=Fo(l,"vertical"),{showTopArrow:d,showBottomArrow:p,scrollByTab:h}=sc(l),[b,g]=f.useState(!1),m=()=>h("up"),C=()=>h("down"),E=v=>a.jsx("div",{className:c("wu-absolute wu-left-0 wu-w-full wu-h-12 wu-z-10 wu-pointer-events-none",v==="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=(v,T,I)=>{const k=T==="up";return a.jsx("button",{onClick:v,className:c("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",k?"-wu-top-1":"-wu-bottom-1",I&&"wu-translate-y-0 wu-opacity-100",!I&&[k?"-wu-translate-y-full":"wu-translate-y-full","wu-opacity-0"]),"aria-label":k?"scroll-up":"scroll-down",children:a.jsx("span",{className:c("wu-text-blue-p wu-text-lg",k?"wm-keyboard-arrow-up":"wm-keyboard-arrow-down")})})};return a.jsxs(Lo,{defaultValue:r||((S=e[0])==null?void 0:S.value),value:t,onValueChange:s,orientation:"vertical",dir:u,className:c("wu-relative wu-h-full wu-w-full wu-flex",i==="left"?"wu-flex-row":"wu-flex-row-reverse",n),role:"tabs",children:[a.jsxs("div",{className:"wu-relative wu-flex wu-overflow-hidden wu-shrink-0",onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),"aria-label":"tablistWrapper",children:[d&&b&&E("top"),y(m,"up",d&&b),a.jsxs(tr,{ref:l,className:c("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(v=>a.jsx(ar,{value:v.value,children:v.Trigger},v.value)),a.jsx("span",{className:"wu-absolute wu-bg-blue-p wu-transition-all wu-duration-300 wu-indicator",style:{width:2,left:i==="left"?0:void 0,right:i==="right"?0:void 0,height:w.height,top:w.top}})]}),p&&b&&E("bottom"),y(C,"down",p&&b)]}),a.jsx(Po,{items:e,enableAnimation:o})]})},nc=({...e})=>e.orientation==="vertical"?a.jsx(oc,{...e}):a.jsx(rc,{...e}),rr=x.forwardRef(({className:e,...t},r)=>a.jsx("table",{ref:r,className:c("wu-w-full wu-caption-bottom wu-text-sm",e),...t}));rr.displayName="Table";const Oo=x.forwardRef(({className:e,...t},r)=>a.jsx("thead",{ref:r,className:c("[&_tr]:wu-border-b",e),...t}));Oo.displayName="TableHeader";const Bo=x.forwardRef(({className:e,...t},r)=>a.jsx("tbody",{ref:r,className:c("",e),...t}));Bo.displayName="TableBody";const uc=x.forwardRef(({className:e,...t},r)=>a.jsx("tfoot",{ref:r,className:c("wu-border-t wu-bg-muted/50 wu-font-medium [&>tr]:last:wu-border-b-0",e),...t}));uc.displayName="TableFooter";const Ct=x.forwardRef(({className:e,...t},r)=>a.jsx("tr",{ref:r,className:c("wu-border-b wu-transition-colors wu-hover:wu-bg-muted/50 data-[state=selected]:wu-bg-muted",e),...t}));Ct.displayName="TableRow";const sr=x.forwardRef(({className:e,...t},r)=>a.jsx("th",{ref:r,className:c("wu-px-4 wu-text-left wu-align-middle wu-font-medium wu-text-muted-foreground [&:has([role=checkbox])]:wu-pr-0",e),...t}));sr.displayName="TableHead";const ea=x.forwardRef(({className:e,...t},r)=>a.jsx("td",{ref:r,className:c("wu-p-4 wu-align-middle [&:has([role=checkbox])]:wu-pr-0",e),...t}));ea.displayName="TableCell";const or=x.forwardRef(({className:e,...t},r)=>a.jsx("caption",{ref:r,className:c("wu-mt-4 wu-text-sm wu-text-gray-subtle wu-font-normal",e),...t}));or.displayName="TableCaption";const lc=({columns:e,rowSelection:t})=>{const r=(t==null?void 0:t.isEnabled)??!1,s=(t==null?void 0:t.size)??48,{onRowSelect:o,rowUniqueKey:n}=t||{},u=f.useCallback(l=>w=>{o(()=>w?l:[])},[o]);return{finalColumns:f.useMemo(()=>r?[{id:"select",header:({table:l})=>{const w=l.getRowModel().rows.map(p=>p.original),d=u(w);return a.jsx(ke,{checked:l.getIsSomeRowsSelected()||l.getIsAllRowsSelected(),partial:l.getIsSomeRowsSelected()&&!l.getIsAllRowsSelected(),onChange:p=>{l.toggleAllRowsSelected(!!p),d(!!p)},"aria-label":"Select all","data-testid":l.getIsSomeRowsSelected()&&!l.getIsAllRowsSelected()?"select-partial":"select-all"})},cell:({row:l})=>a.jsx(ke,{checked:l.getIsSelected(),onChange:w=>{l.toggleSelected(!!w)},"aria-label":String(l.original[n])}),enableSorting:!1,filterable:!1,accessorKey:"select",size:s},...e]:e,[e,r,u])}};function qo({data:e,columns:t,rowSelection:r}){const{finalColumns:s}=lc({columns:t,rowSelection:r}),o=f.useMemo(()=>{if(!(r!=null&&r.isEnabled))return{};const n={};for(const u of r.selectedRows){const i=e.findIndex(l=>l[r.rowUniqueKey]===u[r.rowUniqueKey]);i!==-1&&(n[i]=!0)}return n},[e,r]);return{finalColumns:s,rowSelectionState:o}}const Vo=({table:e,size:t,NoDataContent:r,isLoading:s,CustomLoader:o})=>{var i;const[n,u]=f.useState(null);return a.jsx(Bo,{children:s?a.jsx(Ct,{children:a.jsx(ea,{colSpan:e.getAllColumns().length,className:"wu-text-center wu-h-[35vh] wu-loader-container",children:o||a.jsx(et,{className:"wu-w-full"})})}):(i=e.getRowModel().rows)!=null&&i.length?e.getRowModel().rows.map((l,w)=>a.jsx(Ct,{"data-state":l.getIsSelected()&&"selected",onMouseOver:()=>u(l.id),onMouseOut:()=>u(null),className:c("wu-transition-colors wu-border-b wu-border-black/[12%]",l.getIsSelected()?n===l.id?"wu-bg-blue-p/[16%]":"wu-bg-blue-p/[8%]":"hover:wu-bg-black/[2%]"),children:l.getVisibleCells().map((d,p)=>a.jsx(ea,{className:c("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-100":"",n===l.id&&d.column.id==="actions"?"wu-opacity-100 wu-visible":""),children:De.flexRender(d.column.columnDef.cell,d.getContext())},`${d.id}-${p}`))},`${l.id}-${w}`)):a.jsx(Ct,{children:a.jsx(ea,{colSpan:e.getAllColumns().length,children:r})})})},zo=({table:e,sortableColumns:t,manual:r=!1,onSort:s,size:o,isRowSelected:n,HeaderAction:u,isStickyHeader:i})=>{const l=o==="compact"?"wu-h-8":"wu-h-10",w=d=>{const{id:p,columnDef:h,getIsSorted:b,toggleSorting:g}=d,{header:m}=h;if(!t.includes(p))return m;const C=b(),E=C==="asc",y=C==="desc",S=()=>{r?(g(!y),s==null||s({id:p,desc:y})):g(d.getIsSorted()==="asc")};return a.jsxs("button",{onClick:S,"aria-label":`Sort by ${m}`,className:"wu-flex wu-items-center wu-gap-4",children:[m,a.jsxs("div",{className:"wu-relative",children:[a.jsx("span",{className:c("wu-absolute -wu-top-[15px] wm-arrow-drop-down wu-text-xl",E&&"wu-hidden",!C&&"-wu-top-[11px]")}),a.jsx("span",{className:c("wu-absolute -wu-bottom-[13px] wm-arrow-drop-up wu-text-xl",y&&"wu-hidden",!C&&"-wu-bottom-[10px]")})]})]})};return a.jsxs(Oo,{className:c("wu-border-t wu-border-black/[12%] wu-bg-gray-20 wu-relative",i&&"wu-sticky wu-top-[-.5px] wu-z-10",l),children:[e.getHeaderGroups().map(d=>a.jsx(Ct,{className:"wu-relative",children:d.headers.map(p=>p.column.id==="actions"?a.jsx(sr,{colSpan:p.colSpan,className:"wu-text-xs wu-font-medium",style:{width:`${p.getSize()}px`}},p.id):a.jsx(sr,{colSpan:p.colSpan,className:c("wu-text-xs wu-font-medium wu-bg-[#EEEEEE]","wu-relative wu-z-0"),style:{width:`${p.getSize()}px`},children:De.flexRender(w(p.column),p.getContext())},p.id))},d.id)),n&&u&&a.jsxs("div",{className:c("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(ke,{checked:e.getIsSomeRowsSelected()||e.getIsAllRowsSelected(),partial:e.getIsSomeRowsSelected()&&!e.getIsAllRowsSelected(),onChange:d=>{e.toggleAllRowsSelected(!!d)},"aria-label":"Select all"})}),a.jsx("div",{className:"wu-flex-1 wu-flex wu-pr-4",children:u})]})]})},Ho=Se.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"}}}),ic=({data:e,columns:t,isLoading:r=!1,variant:s="unstyled",sort:o,size:n,rowSelection:u,HeaderAction:i,NoDataContent:l,stickyHeader:w=!1,CustomLoader:d,caption:p,...h})=>{var S;const{finalColumns:b,rowSelectionState:g}=qo({data:e,columns:t,rowSelection:u}),m=f.useMemo(()=>b.filter(v=>v.enableSorting).map(v=>v.accessorKey),[b]),C=((S=u==null?void 0:u.selectedRows)==null?void 0:S.length)??0,E=v=>{if(typeof v=="function"){const T=v(g),I=Object.keys(T).filter(k=>T[Number(k)]).map(k=>e[Number(k)]);u==null||u.onRowSelect(I)}},y=De.useReactTable({data:e,columns:b,getCoreRowModel:De.getCoreRowModel(),getPaginationRowModel:De.getPaginationRowModel(),manualPagination:!0,manualSorting:!0,manualFiltering:!0,enableRowSelection:u==null?void 0:u.isEnabled,state:{...u!=null&&u.isEnabled?{rowSelection:g}:{}},onRowSelectionChange:E});return a.jsxs("div",{className:c("wu-text-gray-lead wu-table-container wu-relative"),children:[p&&a.jsx(or,{className:"wu-font-light",children:p}),a.jsxs(rr,{...h,className:c(Ho({variant:s}),h.className),children:[a.jsx(zo,{table:y,sortableColumns:m,manual:!0,onSort:o==null?void 0:o.onSort,size:n,HeaderAction:i,isRowSelected:C>0,isStickyHeader:w}),!r&&a.jsx(Vo,{table:y,size:n,NoDataContent:l,CustomLoader:d})]}),r&&a.jsx("div",{className:"wu-flex wu-items-center wu-justify-center wu-h-96",children:a.jsx(et,{})})]})},cc=({data:e,columns:t,variant:r="unstyled",size:s="default",sort:o,filterText:n,pagination:u,stickyHeader:i,HeaderAction:l,CustomLoader:w,NoDataContent:d,isLoading:p,caption:h,rowSelection:b,...g})=>{var P;const[m,C]=f.useState((o==null?void 0:o.initial)||[]),[E,y]=f.useState([]),[S,v]=f.useState((u==null?void 0:u.pageIndex)??0),{finalColumns:T,rowSelectionState:I}=qo({data:e,columns:t,rowSelection:b}),k=f.useMemo(()=>T.filter(L=>L.enableSorting).map(L=>L.accessorKey),[T]),M=f.useMemo(()=>T.filter(L=>L.filterable).map(L=>L.accessorKey),[T]),A=((P=b==null?void 0:b.selectedRows)==null?void 0:P.length)??0,O=L=>{const F=typeof L=="function"?L(I):L,B=Object.keys(F).filter(W=>F[Number(W)]).map(W=>e[Number(W)]);b==null||b.onRowSelect(B)},_=De.useReactTable({data:e,columns:T,getCoreRowModel:De.getCoreRowModel(),getFilteredRowModel:De.getFilteredRowModel(),getSortedRowModel:De.getSortedRowModel(),getPaginationRowModel:u?De.getPaginationRowModel():void 0,state:{sorting:m,columnFilters:E,...u?{pagination:u}:{},...b!=null&&b.isEnabled?{rowSelection:I}:{}},onSortingChange:C,onColumnFiltersChange:y,onRowSelectionChange:O});return f.useEffect(()=>{M.forEach(L=>{var F;(F=_.getColumn(L))==null||F.setFilterValue(n)})},[n,M,_]),f.useEffect(()=>{u&&(u==null?void 0:u.pageIndex)!==S&&(b==null||b.onRowSelect(()=>[]),_.resetRowSelection(),v(u.pageIndex))},[u==null?void 0:u.pageIndex]),a.jsx("div",{className:"wu-text-gray-lead wu-table-container wu-relative",children:a.jsxs(rr,{...g,className:c("wu-overflow-x-auto wu-w-full",Ho({variant:r}),"wu-table-fixed",g.className),children:[h&&a.jsx(or,{children:h}),a.jsx(zo,{table:_,sortableColumns:k,size:s,HeaderAction:l,isRowSelected:A>0,isStickyHeader:i}),a.jsx(Vo,{table:_,size:s,NoDataContent:d,CustomLoader:w,isLoading:p})]})})},$o=x.forwardRef(({className:e,...t},r)=>a.jsx("textarea",{className:c("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:r,...t}));$o.displayName="Textarea";const Uo=f.forwardRef((e,t)=>{const{Label:r,id:s=At(),variant:o="flat",readonly:n,maxLength:u,labelPosition:i="top",...l}=e,w=p=>{l.onChange&&l.onChange(p)},d=ft(i);return a.jsxs("div",{className:c(d,"wu-flex wu-textarea-container"),dir:l.dir,children:[a.jsx($o,{...l,ref:t,id:s,className:c("wu-peer wu-rounded-t-sm",o==="outlined"?"wu-border wu-border-gray-subtle":"",l.className),onChange:w,readOnly:n,maxLength:u}),r&&a.jsx(ge,{htmlFor:s,className:"wu-textarea-label",children:r})]})});Uo.displayName="WuTextarea";function wc(e){if(typeof e=="string"&&e.includes("T")){const t=H.parseISO(e);return H.format(t,"HH:mm")}if(typeof e=="string"&&/^\d{2}:\d{2}:\d{2}$/.test(e)){const t=H.parse(e,"HH:mm:ss",new Date);return H.format(t,"HH:mm")}return typeof e=="string"&&/^\d{2}:\d{2}$/.test(e)?e:"00:00"}const jo=["12",...Array.from({length:11},(e,t)=>String(t+1).padStart(2,"0"))],Go=Array.from({length:60},(e,t)=>String(t).padStart(2,"0")),Yo=["am","pm"],ta=50;function dc(e){return Array(ta).fill(e).flat()}function nr(e,t){const r=e.indexOf(t);return[...e.slice(r),...e.slice(0,r)]}function fc(e,t){let r=Number(e);return t==="pm"&&r<12&&(r+=12),t==="am"&&r===12&&(r=0),String(r).padStart(2,"0")}function Ko(e){const t=Number(e),r=t>=12?"pm":"am",s=t%12===0?12:t%12;return{hour:String(s),meridiem:r}}const pc=({value:e,isSelected:t,onClick:r})=>a.jsx("div",{onClick:r,className:c("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}),ur=({values:e,selectedValue:t,scrollRef:r,onSelect:s,repeatItems:o=!0,className:n})=>a.jsx("div",{ref:r,className:c("wu-overflow-y-scroll wu-w-8 wu-snap-y wu-snap-mandatory [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",n),role:"presentation",children:(o?dc(e):e).map((u,i)=>a.jsx(pc,{value:u,isSelected:u===t,onClick:()=>s(u)},`${u}-${i}`))});function hc(e,t,r,s){const o=f.useMemo(()=>e?nr(jo,t.padStart(2,"0")):jo,[e]),n=f.useMemo(()=>e?nr(Go,r.padStart(2,"0")):Go,[e]),u=f.useMemo(()=>e?nr(Yo,s):Yo,[e]);return{rotatedHours:o,rotatedMinutes:n,rotatedMeridiem:u}}function bc(e,t,r){f.useEffect(()=>{function s(u){if(u){const i=u.scrollHeight/ta,l=Math.floor(ta/2);u.scrollTop=l*i;const w=()=>{const{scrollTop:d}=u,p=Math.round(d/i);(p<=1||p>=ta-2)&&(u.scrollTop=l*i)};return u.addEventListener("scroll",w),()=>{u.removeEventListener("scroll",w)}}}if(!e)return;const o=s(t.current),n=s(r.current);return()=>{o==null||o(),n==null||n()}},[e,t,r])}const Jo=({className:e,time:t,Label:r,labelPosition:s,dir:o,...n})=>{const[u,i]=f.useState(!1),[l,w]=f.useState(""),d=f.useRef(null),p=f.useRef(null),h=f.useRef(null),b=f.useRef(null),[g,m]=f.useState("12"),[C,E]=f.useState("00"),[y,S]=f.useState("am");f.useEffect(()=>{if(!t){w(""),m("12"),E("00"),S("am"),d.current&&(d.current.value="");return}const M=wc(t);w(M);const[A,O]=M.split(":"),{hour:_,meridiem:P}=Ko(A);m(_),E(O),S(P),d.current&&(d.current.value=M)},[t]),f.useEffect(()=>{const M=A=>{p.current&&!p.current.contains(A.target)&&i(!1)};return document.addEventListener("mousedown",M),()=>{document.removeEventListener("mousedown",M)}},[]),bc(u,h,b);const{rotatedHours:v,rotatedMinutes:T,rotatedMeridiem:I}=hc(u,g,C,y),k=f.useCallback((M,A,O)=>{const _=M??g,P=A??C,L=O??y;m(_),E(P),S(L);const F=`${fc(_,L)}:${P}`;w(F)},[g,C,y]);return a.jsxs("div",{className:c("wu-flex wu-gap-1 wu-relative wu-w-fit wu-flex-col",(s==="right"||s==="left")&&"wu-items-center",s==="left"&&"wu-flex-row",s==="right"&&"wu-flex-row-reverse","wu-input-wrapper"),dir:o,children:[r&&a.jsx(ge,{htmlFor:"time-picker",className:"wu-timepicker-label",children:r}),a.jsxs("div",{className:c("relative inline-block"),ref:p,dir:o,children:[a.jsx(Me,{ref:d,type:"time",value:l,variant:"flat",role:"textbox",onChange:M=>{w(M.target.value);const[A,O]=M.target.value.split(":"),{hour:_,meridiem:P}=Ko(A);m(_),E(O),S(P)},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(we,{icon:"wm-schedule",className:c("wu-text-base",n.disabled&&"wu-text-lead/50 wu-pointer-events-none wu-opacity-50"),onClick:()=>i(M=>!M),"data-testid":"wu-timepicker-icon"}),iconPosition:"right",dir:o,...n}),a.jsx("style",{children:`
|
|
8
8
|
input[type="time"]::-webkit-calendar-picker-indicator { display: none; }
|
|
9
|
-
`}),n&&a.jsxs("div",{className:c("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(Ra,{values:v,selectedValue:h.padStart(2,"0"),scrollRef:b,onSelect:_=>T(_,C),className:"wu-time-hour-picker"}),a.jsx(Ra,{values:k,selectedValue:C.padStart(2,"0"),scrollRef:x,onSelect:_=>T(h,_),className:"wu-time-minute-picker"}),a.jsx(Ra,{values:D,selectedValue:y,onSelect:_=>T(void 0,void 0,_),className:"wu-time-meridiem-picker",repeatItems:!1})]})]})]})};Fu.displayName="WuTimePicker";const lc=1,ic=1e6;let er=0;function cc(){return er=(er+1)%Number.MAX_SAFE_INTEGER,er.toString()}const tr=new Map,Bu=e=>{if(tr.has(e))return;const t=setTimeout(()=>{tr.delete(e),Ct({type:"REMOVE_TOAST",toastId:e})},ic);tr.set(e,t)},wc=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,lc)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?Bu(r):e.toasts.forEach(s=>{Bu(s.id)}),{...e,toasts:e.toasts.map(s=>s.id===r||r===void 0?{...s,open:!1}:s)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},Qt=[];let Rt={toasts:[]};function Ct(e){Rt=wc(Rt,e),Qt.forEach(t=>{t(Rt)})}function qu({...e}){const t=cc(),r=u=>Ct({type:"UPDATE_TOAST",toast:{...u,id:t}}),s=()=>Ct({type:"DISMISS_TOAST",toastId:t});return Ct({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:u=>{u||s()}}}),{id:t,dismiss:s,update:r}}function dc(){const[e,t]=f.useState(Rt);return f.useEffect(()=>(Qt.push(t),()=>{const r=Qt.indexOf(t);r>-1&&Qt.splice(r,1)}),[e]),{...e,toast:qu,dismiss:r=>Ct({type:"DISMISS_TOAST",toastId:r})}}const fc=()=>({showToast:({message:t,variant:r,duration:s,position:u})=>qu({description:t,variant:r,duration:s,position:u})}),pc=pe.Provider,bc=Ce.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"}}),Vu=g.forwardRef(({className:e,position:t,...r},s)=>a.jsx(pe.Viewport,{ref:s,className:c(bc({position:t}),e),...r}));Vu.displayName=pe.Viewport.displayName;const gc=Ce.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"}}),zu=g.forwardRef(({className:e,variant:t,position:r,...s},u)=>a.jsx(pe.Root,{ref:u,className:c(gc({variant:t,position:r}),e),...s}));zu.displayName=pe.Root.displayName;const hc=g.forwardRef(({className:e,...t},r)=>a.jsx(pe.Action,{ref:r,className:c("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}));hc.displayName=pe.Action.displayName;const Hu=g.forwardRef(({className:e,...t},r)=>a.jsx(pe.Close,{ref:r,className:c("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"})}));Hu.displayName=pe.Close.displayName;const $u=g.forwardRef(({className:e,...t},r)=>a.jsx(pe.Title,{ref:r,className:c("wu-text-sm wu-font-semibold",e),...t}));$u.displayName=pe.Title.displayName;const Uu=g.forwardRef(({className:e,...t},r)=>a.jsx(pe.Description,{ref:r,className:c("wu-text-sm wu-opacity-90",e),...t}));Uu.displayName=pe.Description.displayName;function mc(){const{toasts:e}=dc(),t=e.reduce((r,s)=>{const u=s.position||"top";return r[u]||(r[u]=[]),r[u].push(s),r},{});return a.jsx(pc,{children:Object.entries(t).map(([r,s])=>a.jsx(Vu,{position:r,children:s.map(function({id:u,title:o,description:n,action:i,variant:l,position:w,...d}){const p={success:"wm-check-circle",info:"wm-info",warning:"wm-error",error:"wm-cancel"};return a.jsxs(zu,{variant:l||"success",position:w,...d,children:[a.jsxs("div",{className:"wu-grid wu-gap-1",children:[o&&a.jsx($u,{children:o}),n&&a.jsxs(Uu,{className:"wu-flex wu-items-center wu-gap-3 wu-pr-6",children:[a.jsx(Le,{icon:p[l||"success"],className:"wu-text-xl"}),n]})]}),i,a.jsx(Hu,{})]},u)})},r))})}const xc=()=>a.jsx(mc,{}),ju=g.forwardRef(({className:e,dir:t,...r},s)=>a.jsx(sa.Root,{className:c("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),...r,ref:s,children:a.jsx(sa.Thumb,{className:c("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")})}));ju.displayName=sa.Root.displayName;const Gu=f.forwardRef((e,t)=>{const{Label:r,labelPosition:s="right",onChange:u,className:o,dir:n,disabled:i,id:l=Mt(),...w}=e;return f.useEffect(()=>{const{checked:d,defaultChecked:p}=w;d!==void 0&&p!==void 0&&console.error("WuToggle: Both `checked` and `defaultChecked` props are set. Use only one of them.")},[w.checked,w.defaultChecked]),a.jsxs("div",{className:c(yc({labelPosition:s}),"wu-toggle-container"),dir:n,children:[a.jsx(ju,{...w,id:l,disabled:i,ref:t,onCheckedChange:u,className:c("wu-peer",o),dir:n}),a.jsx(be,{htmlFor:l,className:"wu-toggle-label",children:r})]})});Gu.displayName="WuToggle";const yc=Ce.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"}}}),ea=f.createContext(null),vc=()=>{const e=f.useContext(ea);if(!e)throw new Error("useTranslation must be used within a WuTranslationProvider");return e.useTranslation()},Nc=()=>{const e=f.useContext(ea);if(!e)throw new Error("useLoadTranslationsFunction must be used within a WuTranslationProvider");return e},Cc=({children:e})=>{const[t,r]=f.useState({}),[s,u]=f.useState({}),o=f.useCallback(async(w,d)=>{try{const b=await(await fetch(w)).json();r(b)}catch(p){console.error("Failed to load translations:",p),d&&r(d)}d&&u(d)},[]),n=f.useCallback(w=>{u(w)},[]),i=f.useCallback(()=>({t:(d,p)=>t[d]?t[d]:s[d]?s[d]:p||d}),[t,s]),l={loadTranslations:o,setFallbackTranslations:n,useTranslation:i};return a.jsx(ea.Provider,{value:l,children:e})},Sc={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"}},Yu={main:"_main_1uzld_1",container:"_container_1uzld_5"},Ku=f.forwardRef(({className:e,children:t,isOpen:r=!1,contentOffset:s=48,contentOffsetFactor:u=4,header:o,contentAnimation:n="wu-fade-zoom",headerAnimation:i="wu-slide-up-down",dir:l="ltr"},w)=>{const[d,p]=f.useState(`${n}-view-in`),[b,x]=f.useState(`${i}-header-in`),h=f.useRef(null),m=f.useRef(null),[C,E]=f.useState(!1),[y,S]=f.useState(!1),v=()=>{E(!0)},k=()=>{S(!0)};return f.useEffect(()=>{C&&y&&(d.includes("in")?(p(`${n}-view-out`),x(`${i}-header-out`)):(p(`${n}-view-in`),x(`${i}-header-in`)),E(!1),S(!1))},[C,y]),a.jsxs("div",{className:c(Yu.main),ref:w,children:[a.jsx(kt.SwitchTransition,{mode:"out-in",children:a.jsx(kt.CSSTransition,{nodeRef:m,addEndListener:D=>{h.current&&h.current.addEventListener("transitionend",D,!0)},classNames:b,unmountOnExit:!0,children:o?o(m):null},r?"header-visible":"header-hidden")}),a.jsx(kt.SwitchTransition,{mode:"out-in",children:a.jsx(kt.CSSTransition,{nodeRef:h,classNames:d,addEndListener:D=>{h.current&&h.current.addEventListener("transitionend",D,!0)},onExited:v,onEntered:k,unmountOnExit:!0,children:a.jsx("div",{ref:h,className:c(Yu.container,e),style:{padding:r?Ec(s,u,l):"0px"},children:t})},r?"details":"card")})]})});Ku.displayName="WuDrilldown";function Ec(e,t,r){return typeof e=="number"?r==="rtl"?`${e}px ${e/2}px ${e/t}px ${e/t}px`:`${e}px ${e/t}px ${e/t}px ${e/2}px`:e}window.wickUiVersion="1.16.1",Object.defineProperty(N,"useContext",{enumerable:!0,get:()=>f.useContext}),N.CHART_COLOR_SYSTEM=Sc,N.WuAccordion=go,N.WuAppHeader=zo,N.WuAppHeaderAccount=fr,N.WuAppHeaderBar=mr,N.WuAppHeaderHelp=pr,N.WuAppHeaderMenu=hr,N.WuAppHeaderSearch=qo,N.WuButton=me,N.WuCalender=pa,N.WuCard=Tr,N.WuCheckbox=Ee,N.WuChip=Xo,N.WuCombobox=un,N.WuCopyToClipboard=on,N.WuDataTable=ec,N.WuDatePicker=$o,N.WuDateRangePicker=Go,N.WuDisplay=Io,N.WuDrawer=pn,N.WuDrawerClose=bn,N.WuDrilldown=Ku,N.WuFooter=Hr,N.WuFormGroup=Bo,N.WuHeading=Eo,N.WuHelpButton=$r,N.WuIcon=Le,N.WuInput=He,N.WuInputError=Lo,N.WuInputHint=Oo,N.WuLabel=be,N.WuListbox=Nn,N.WuLoader=Re,N.WuMenu=jr,N.WuMenuCheckboxItem=Cn,N.WuMenuIcon=Sa,N.WuMenuItem=Na,N.WuMenuItemGroup=Sn,N.WuMenuRadioItem=En,N.WuMenuSeparatorItem=Tn,N.WuModal=Ln,N.WuModalClose=qn,N.WuModalContent=On,N.WuModalFooter=Bn,N.WuModalHeader=Fn,N.WuMonthPicker=Yn,N.WuPagination=os,N.WuPopover=Zn,N.WuPopoverClose=Qn,N.WuPrimaryNavbar=Jn,N.WuRadioGroup=cs,N.WuScrollArea=Rn,N.WuSecondaryNavbar=Xn,N.WuSelect=rs,N.WuSidebar=ml,N.WuSidebarContent=xl,N.WuSidebarFooter=yl,N.WuSidebarGroup=vl,N.WuSidebarItem=Cl,N.WuSidebarMenu=Nl,N.WuSidebarTrigger=Ts,N.WuSpotlight=Qr,N.WuStackedCard=Tl,N.WuStackedCardOverlay=Il,N.WuStepper=Ui,N.WuSubMenu=In,N.WuSubtext=To,N.WuSwitcher=yu,N.WuTab=Zi,N.WuTable=tc,N.WuText=So,N.WuTextarea=Au,N.WuTimePicker=Fu,N.WuToast=xc,N.WuToggle=Gu,N.WuTooltip=At,N.WuTranslationContext=ea,N.WuTranslationProvider=Cc,N.WuTruncatedLabel=Vo,N.WuVirtualScroll=et,N.calculatePosition=El,N.useTranslation=vc,N.useTranslationsContext=Nc,N.useWuShowToast=fc,N.useWuSidebar=Ue,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})});
|
|
9
|
+
`}),u&&a.jsxs("div",{className:c("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(ur,{values:v,selectedValue:g.padStart(2,"0"),scrollRef:h,onSelect:M=>k(M,C),className:"wu-time-hour-picker"}),a.jsx(ur,{values:T,selectedValue:C.padStart(2,"0"),scrollRef:b,onSelect:M=>k(g,M),className:"wu-time-minute-picker"}),a.jsx(ur,{values:I,selectedValue:y,onSelect:M=>k(void 0,void 0,M),className:"wu-time-meridiem-picker",repeatItems:!1})]})]})]})};Jo.displayName="WuTimePicker";const gc=1,mc=1e6;let lr=0;function xc(){return lr=(lr+1)%Number.MAX_SAFE_INTEGER,lr.toString()}const ir=new Map,Xo=e=>{if(ir.has(e))return;const t=setTimeout(()=>{ir.delete(e),St({type:"REMOVE_TOAST",toastId:e})},mc);ir.set(e,t)},yc=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,gc)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?Xo(r):e.toasts.forEach(s=>{Xo(s.id)}),{...e,toasts:e.toasts.map(s=>s.id===r||r===void 0?{...s,open:!1}:s)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},aa=[];let ra={toasts:[]};function St(e){ra=yc(ra,e),aa.forEach(t=>{t(ra)})}function Zo({...e}){const t=xc(),r=o=>St({type:"UPDATE_TOAST",toast:{...o,id:t}}),s=()=>St({type:"DISMISS_TOAST",toastId:t});return St({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||s()}}}),{id:t,dismiss:s,update:r}}function vc(){const[e,t]=f.useState(ra);return f.useEffect(()=>(aa.push(t),()=>{const r=aa.indexOf(t);r>-1&&aa.splice(r,1)}),[e]),{...e,toast:Zo,dismiss:r=>St({type:"DISMISS_TOAST",toastId:r})}}const Nc=()=>({showToast:({message:t,variant:r,duration:s,position:o})=>Zo({description:t,variant:r,duration:s,position:o})}),Cc=be.Provider,Sc=Se.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"}}),Qo=x.forwardRef(({className:e,position:t,...r},s)=>a.jsx(be.Viewport,{ref:s,className:c(Sc({position:t}),e),...r}));Qo.displayName=be.Viewport.displayName;const Ec=Se.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"}}),Ro=x.forwardRef(({className:e,variant:t,position:r,...s},o)=>a.jsx(be.Root,{ref:o,className:c(Ec({variant:t,position:r}),e),...s}));Ro.displayName=be.Root.displayName;const kc=x.forwardRef(({className:e,...t},r)=>a.jsx(be.Action,{ref:r,className:c("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}));kc.displayName=be.Action.displayName;const en=x.forwardRef(({className:e,...t},r)=>a.jsx(be.Close,{ref:r,className:c("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"})}));en.displayName=be.Close.displayName;const tn=x.forwardRef(({className:e,...t},r)=>a.jsx(be.Title,{ref:r,className:c("wu-text-sm wu-font-semibold",e),...t}));tn.displayName=be.Title.displayName;const an=x.forwardRef(({className:e,...t},r)=>a.jsx(be.Description,{ref:r,className:c("wu-text-sm wu-opacity-90",e),...t}));an.displayName=be.Description.displayName;function Tc(){const{toasts:e}=vc(),t=e.reduce((r,s)=>{const o=s.position||"top";return r[o]||(r[o]=[]),r[o].push(s),r},{});return a.jsx(Cc,{children:Object.entries(t).map(([r,s])=>a.jsx(Qo,{position:r,children:s.map(function({id:o,title:n,description:u,action:i,variant:l,position:w,...d}){const p={success:"wm-check-circle",info:"wm-info",warning:"wm-error",error:"wm-cancel"};return a.jsxs(Ro,{variant:l||"success",position:w,...d,children:[a.jsxs("div",{className:"wu-grid wu-gap-1",children:[n&&a.jsx(tn,{children:n}),u&&a.jsxs(an,{className:"wu-flex wu-items-center wu-gap-3 wu-pr-6",children:[a.jsx(we,{icon:p[l||"success"],className:"wu-text-xl"}),u]})]}),i,a.jsx(en,{})]},o)})},r))})}const Ic=()=>a.jsx(Tc,{}),rn=x.forwardRef(({className:e,dir:t,...r},s)=>a.jsx(la.Root,{className:c("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),...r,ref:s,children:a.jsx(la.Thumb,{className:c("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")})}));rn.displayName=la.Root.displayName;const sn=f.forwardRef((e,t)=>{const{Label:r,labelPosition:s="right",onChange:o,className:n,dir:u,disabled:i,id:l=At(),...w}=e;return f.useEffect(()=>{const{checked:d,defaultChecked:p}=w;d!==void 0&&p!==void 0&&console.error("WuToggle: Both `checked` and `defaultChecked` props are set. Use only one of them.")},[w.checked,w.defaultChecked]),a.jsxs("div",{className:c(Dc({labelPosition:s}),"wu-toggle-container"),dir:u,children:[a.jsx(rn,{...w,id:l,disabled:i,ref:t,onCheckedChange:o,className:c("wu-peer",n),dir:u}),a.jsx(ge,{htmlFor:l,className:"wu-toggle-label",children:r})]})});sn.displayName="WuToggle";const Dc=Se.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"}}}),sa=f.createContext(null),Mc=()=>{const e=f.useContext(sa);if(!e)throw new Error("useTranslation must be used within a WuTranslationProvider");return e.useTranslation()},_c=()=>{const e=f.useContext(sa);if(!e)throw new Error("useLoadTranslationsFunction must be used within a WuTranslationProvider");return e},Ac=({children:e})=>{const[t,r]=f.useState({}),[s,o]=f.useState({}),n=f.useCallback(async(w,d)=>{try{const h=await(await fetch(w)).json();r(h)}catch(p){console.error("Failed to load translations:",p),d&&r(d)}d&&o(d)},[]),u=f.useCallback(w=>{o(w)},[]),i=f.useCallback(()=>({t:(d,p)=>t[d]?t[d]:s[d]?s[d]:p||d}),[t,s]),l={loadTranslations:n,setFallbackTranslations:u,useTranslation:i};return a.jsx(sa.Provider,{value:l,children:e})},Lc={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"}},on={main:"_main_1uzld_1",container:"_container_1uzld_5"},nn=f.forwardRef(({className:e,children:t,isOpen:r=!1,contentOffset:s=48,contentOffsetFactor:o=4,header:n,contentAnimation:u="wu-fade-zoom",headerAnimation:i="wu-slide-up-down",dir:l="ltr"},w)=>{const[d,p]=f.useState(`${u}-view-in`),[h,b]=f.useState(`${i}-header-in`),g=f.useRef(null),m=f.useRef(null),[C,E]=f.useState(!1),[y,S]=f.useState(!1),v=()=>{E(!0)},T=()=>{S(!0)};return f.useEffect(()=>{C&&y&&(d.includes("in")?(p(`${u}-view-out`),b(`${i}-header-out`)):(p(`${u}-view-in`),b(`${i}-header-in`)),E(!1),S(!1))},[C,y]),a.jsxs("div",{className:c(on.main),ref:w,children:[a.jsx(Mt.SwitchTransition,{mode:"out-in",children:a.jsx(Mt.CSSTransition,{nodeRef:m,addEndListener:I=>{g.current&&g.current.addEventListener("transitionend",I,!0)},classNames:h,unmountOnExit:!0,children:n?n(m):null},r?"header-visible":"header-hidden")}),a.jsx(Mt.SwitchTransition,{mode:"out-in",children:a.jsx(Mt.CSSTransition,{nodeRef:g,classNames:d,addEndListener:I=>{g.current&&g.current.addEventListener("transitionend",I,!0)},onExited:v,onEntered:T,unmountOnExit:!0,children:a.jsx("div",{ref:g,className:c(on.container,e),style:{padding:r?Wc(s,o,l):"0px"},children:t})},r?"details":"card")})]})});nn.displayName="WuDrilldown";function Wc(e,t,r){return typeof e=="number"?r==="rtl"?`${e}px ${e/2}px ${e/t}px ${e/t}px`:`${e}px ${e/t}px ${e/t}px ${e/2}px`:e}const Pc={WuEditor:"_WuEditor_88p35_2"},Fc={link:{openOnClick:!1,autolink:!0,defaultProtocol:"https",protocols:["http","https"],isAllowedUri:(e,t)=>{try{const r=e.includes(":")?new URL(e):new URL(`${t.defaultProtocol}://${e}`);if(!t.defaultValidate(r.href))return!1;const s=["ftp","file","mailto"],o=r.protocol.replace(":","");if(s.includes(o)||!t.protocols.map(l=>typeof l=="string"?l:l.scheme).includes(o))return!1;const u=["example-phishing.com","malicious-site.net"],i=r.hostname;return!u.includes(i)}catch{return!1}},shouldAutoLink:e=>{try{const t=e.includes(":")?new URL(e):new URL(`https://${e}`),r=["example-no-autolink.com","another-no-autolink.com"],s=t.hostname;return!r.includes(s)}catch{return!1}}}},Oc=(e,t)=>{if(e.isActive("link")){const{from:u,to:i}=e.state.selection;let l=e.state.doc.textBetween(u,i);e.state.selection.empty,e.chain().extendMarkRange("link").run();const{from:w,to:d}=e.state.selection,p=e.getAttributes("link");return l=e.state.doc.textBetween(w,d),t((h,b)=>{if(h===null){e.chain().focus().extendMarkRange("link").unsetLink().run();return}h&&(b&&b!==l?e.chain().focus().extendMarkRange("link").insertContent({type:"text",text:b,marks:[{type:"link",attrs:{href:h}}]}).run():e.chain().focus().extendMarkRange("link").setLink({href:h}).run())},l,p.href),!0}const{from:r,to:s,empty:o}=e.state.selection;let n=e.state.doc.textBetween(r,s);if(o){const{$from:u}=e.state.selection,i=u.parent.textContent,l=u.parentOffset;let w=l,d=l;for(;w>0&&!/\s/.test(i[w-1]);)w--;for(;d<i.length&&!/\s/.test(i[d]);)d++;if(w<d&&i.slice(w,d).trim()){const p=u.start(),h=p+w,b=p+d;return n=i.slice(w,d),e.commands.setTextSelection({from:h,to:b}),t((g,m)=>{g&&(m&&m!==n?e.chain().focus().insertContent({type:"text",text:m,marks:[{type:"link",attrs:{href:g}}]}).run():e.chain().focus().setLink({href:g}).run())},n),!0}else return t((p,h)=>{p&&h&&e.chain().focus().insertContent({type:"text",text:h,marks:[{type:"link",attrs:{href:p}}]}).run()}),!0}return n?(t((u,i)=>{u&&(i&&i!==n?e.chain().focus().insertContent({type:"text",text:i,marks:[{type:"link",attrs:{href:u}}]}).run():e.chain().focus().setLink({href:u}).run())},n),!0):!1},Bc=({open:e,onOpenChange:t,onSubmit:r,initialText:s,initialUrl:o})=>{const[n,u]=f.useState(""),[i,l]=f.useState("");f.useEffect(()=>{e&&(l(s||""),u(o||""))},[e,s,o]);const w=()=>{if(n){const p=n.startsWith("http")?n:`https://${n}`;r(p,i),t(!1)}},d=()=>{r(null),t(!1)};return a.jsxs(Aa,{open:e,onOpenChange:t,size:"sm",children:[a.jsx(La,{children:a.jsxs("div",{className:"wu-flex wu-flex-col wu-gap-4",children:[a.jsx(Me,{Label:"Text to display",value:i,onChange:p=>l(p.target.value),placeholder:"Enter text",autoFocus:!1}),a.jsx(Me,{Label:"URL",value:n,onChange:p=>u(p.target.value),placeholder:"https://example.com",onKeyDown:p=>{p.key==="Enter"&&w()}})]})}),a.jsx(Wa,{children:a.jsxs("div",{className:"wu-flex wu-w-full wu-justify-between",children:[o&&a.jsx(de,{color:"error",onClick:d,children:"Remove Link"}),a.jsxs("div",{className:"wu-flex wu-gap-2 wu-ml-auto",children:[a.jsx(qt,{variant:"secondary",children:"Cancel"}),a.jsx(de,{onClick:w,children:"Save"})]})]})})]})},un=f.createContext(null),Et=()=>{const e=f.useContext(un);if(!e)throw new Error("useWuEditor must be used within a WuEditorProvider");return e},qc=({editor:e,children:t})=>{const[r,s]=f.useState(!1),[o,n]=f.useState(null),[u,i]=f.useState(""),[l,w]=f.useState(""),d=f.useCallback((h,b,g)=>{i(b||""),w(g||""),n(()=>h),s(!0)},[]),p=(h,b)=>{o&&o(h,b),n(null)};return a.jsxs(un.Provider,{value:{editor:e,openLinkModal:d},children:[t,a.jsx(Bc,{open:r,onOpenChange:s,initialText:u,initialUrl:l,onSubmit:p})]})},Vc=()=>{const{editor:e}=Et(),t=[{label:"Fira Sans",id:"Fira Sans"},{label:"Inter",id:"Inter"},{label:"Poppins",id:"Poppins"},{label:"JetBrains Mono",id:"JetBrains Mono"},{label:"Montserrat",id:"Montserrat"}];return a.jsx(es,{accessorKey:{label:"label",value:"id"},data:t,className:"wu-w-32",onSelect:r=>e==null?void 0:e.chain().focus().setFontFamily(r.id).run(),Item:({value:r})=>a.jsx("span",{style:{fontFamily:r.id},children:r.label})})},zc=()=>{const{editor:e}=Et(),[t,r]=f.useState("");return a.jsxs(Aa,{Trigger:a.jsx("button",{children:a.jsx(we,{icon:"wm-image"})}),size:"sm",children:[a.jsx(La,{children:a.jsx(Me,{type:"url",Label:"Insert image link",onChange:s=>r(s.target.value)})}),a.jsxs(Wa,{children:[a.jsx(qt,{variant:"secondary",children:"Cancel"}),a.jsx(qt,{onClick:()=>e==null?void 0:e.chain().focus().setImage({src:t}).run(),children:"Save"})]})]})},Hc=()=>{const[e,t]=f.useState(0),[r,s]=f.useState(0),{editor:o}=Et();return a.jsxs(Ee,{children:[a.jsx(Oe,{asChild:!0,children:a.jsx("button",{children:a.jsx(we,{icon:"wm-table-chart"})})}),a.jsxs(ye,{className:"wu-p-2 wu-rounded-md wu-shadow-md wu-bg-white wu-w-max wu-flex wu-flex-col wu-gap-2 wu-items-center wu-justify-center",children:[a.jsx("div",{className:"wu-grid wu-grid-cols-10 wu-gap-1 wu-w-fit",children:Array.from({length:10}).map((n,u)=>Array.from({length:10}).map((i,l)=>a.jsx("button",{onMouseEnter:()=>{t(l+1),s(u+1),console.log(`Insert table: ${l+1} x ${u+1}`)},onClick:()=>o==null?void 0:o.chain().focus().insertTable({rows:r,cols:e,withHeaderRow:!0}).run(),className:"wu-w-3 wu-h-3 wu-bg-gray-20 wu-rounded-sm",style:{backgroundColor:l<e&&u<r?"rgba(var(--wu-blue-p) / 0.6)":"rgba(var(--wu-gray-20))"}},l+u)))}),a.jsxs("div",{className:"wu-text-xs",children:["Insert Table: ",e," x ",r]})]})]})},$c=(e,t)=>[{id:"styles",icon:"wm-format-paragraph",tooltip:"Text Styles",event:()=>!1,enabled:!1,className:"wu-relative wu-top-[1px]",type:"dropdown",items:[{id:"paragraph",icon:"wm-format-paragraph",event:()=>e.chain().focus().setParagraph().run()},{id:"h1",icon:"wm-format-h1",event:()=>e.chain().focus().setHeading({level:1}).run()},{id:"h2",icon:"wm-format-h2",event:()=>e.chain().focus().setHeading({level:2}).run()},{id:"h3",icon:"wm-format-h3",event:()=>e.chain().focus().setHeading({level:3}).run()},{id:"h4",icon:"wm-format-h4",event:()=>e.chain().focus().setHeading({level:4}).run()}]},{id:"fontFamily",icon:"wm-serif",tooltip:"Font Family",event:()=>!1,enabled:!1,className:"wu-relative wu-top-[1px]",type:"custom",customComponent:a.jsx(Vc,{})},{id:"fontSize",icon:"wm-format-size",event:()=>e.chain().focus().setFontSize("16px").run(),enabled:!1,break:!0,type:"custom",customComponent:a.jsx(ko,{defaultValue:16,onChange:r=>e.chain().focus().setFontSize(r+"px").run(),min:8,max:72})},{id:"bold",icon:"wm-format-bold",tooltip:"Bold",event:()=>e.chain().focus().toggleBold().run(),enabled:e.isActive("bold"),className:""},{id:"underline",icon:"wm-format-underlined",tooltip:"Underline",event:()=>e.chain().focus().toggleUnderline().run(),enabled:e.isActive("underline"),className:"wu-relative wu-top-[1px]"},{id:"italic",icon:"wm-format-italic",tooltip:"Italic",event:()=>e.chain().focus().toggleItalic().run(),enabled:e.isActive("italic"),className:""},{id:"strikethrough",icon:"wm-format-strikethrough",tooltip:"Strikethrough",event:()=>e.chain().focus().toggleStrike().run(),enabled:e.isActive("strike"),className:"",break:!0},{id:"textColor",icon:"wm-format-color-text",tooltip:"Text Color",event:r=>e.chain().focus().setColor(r).run(),enabled:!1,className:"wu-text-lg",type:"color"},{id:"backgroundColor",icon:"wm-border-color",tooltip:"Background Color",event:r=>e.chain().focus().setBackgroundColor(r).run(),enabled:!1,className:"wu-text-base",type:"color",break:!0},{id:"alignText",icon:"wm-format-align-left",tooltip:"Align Text",event:()=>!1,enabled:!1,className:"wu-text-lg",type:"dropdown",items:[{id:"alignLeft",icon:"wm-format-align-left",event:()=>e.chain().focus().setTextAlign("left").run()},{id:"alignCenter",icon:"wm-format-align-center",event:()=>e.chain().focus().setTextAlign("center").run()},{id:"alignRight",icon:"wm-format-align-right",event:()=>e.chain().focus().setTextAlign("right").run()},{id:"alignJustify",icon:"wm-format-align-justify",event:()=>e.chain().focus().setTextAlign("justify").run()}]},{id:"lineSpace",icon:"wm-format-line-spacing",tooltip:"Line Spacing",event:()=>!1,enabled:!1,className:"wu-text-lg wu-relative wu-bottom-[1px]",type:"dropdown",items:[{id:"compact",icon:"wm-line-style",event:()=>e.chain().focus().setLineHeight("1").run()},{id:"normal",icon:"wm-format-list-bulleted",event:()=>e.chain().focus().setLineHeight("2").run()},{id:"wide",icon:"wm-format-list-bulleted",event:()=>e.chain().focus().setLineHeight("3").run()}]},{id:"formatList",icon:"wm-format-list-bulleted",tooltip:"Format List",event:()=>e.chain().focus().toggleBulletList().run(),enabled:!1,className:"wu-text-lg",type:"dropdown",items:[{id:"bulletlist",icon:"wm-format-list-bulleted",event:()=>e.chain().focus().toggleBulletList().run()},{id:"checklist",icon:"wm-checklist",event:()=>e.chain().focus().toggleTaskList().run()},{id:"orderedlist",icon:"wm-format-list-numbered",event:()=>e.chain().focus().toggleOrderedList().run()}],break:!0},{id:"link",icon:"wm-link",tooltip:"Insert Link",event:()=>t?Oc(e,t):!1,enabled:!1},{id:"image",icon:"wm-image",tooltip:"Insert Image",event:()=>e.chain().focus().setImage({src:"https://picsum.photos/200/300"}).run(),enabled:!1,type:"custom",customComponent:a.jsx(zc,{})},{id:"blockquote",icon:"wm-format-quote",tooltip:" Blockquote",event:()=>e.chain().focus().toggleBlockquote().run(),enabled:e.isActive("blockquote"),className:""},{id:"table",icon:"wm-table-chart",tooltip:"Insert Table",event:()=>!1,enabled:!1,break:!0,type:"custom",customComponent:a.jsx(Hc,{})},{id:"code",icon:"wm-code",tooltip:"Code",event:()=>e.chain().focus().toggleCode().run(),enabled:e.isActive("code"),className:""},{id:"superscript",icon:"wm-superscript",tooltip:"Superscript",event:()=>e.chain().focus().toggleSuperscript().run(),enabled:e.isActive("superscript"),className:""},{id:"subscript",icon:"wm-subscript",tooltip:"Subscript",event:()=>e.chain().focus().toggleSubscript().run(),enabled:e.isActive("subscript"),className:"wu-relative wu-top-[1px]",break:!0},{id:"clearFormat",icon:"wm-format-clear",tooltip:"Clear Formatting",event:()=>e.chain().focus().clearNodes().run(),enabled:!1,className:"wu-text-red-500"}],ln="wu-w-6 wu-h-6 wu-text-xl hover:wu-bg-gray-10 wu-rounded-sm wu-flex wu-items-center wu-justify-center",Uc=()=>{const{editor:e,openLinkModal:t}=Et();if(!e)return null;const r=$c(e,t);return a.jsx("div",{className:"wu-flex wu-border-b wu-items-center wu-justify-start wu-gap-2 wu-p-2",children:r.map(s=>a.jsxs(a.Fragment,{children:[a.jsx(jc,{act:s}),s.break&&a.jsx("div",{className:"wu-border-l wu-mx-1 wu-h-6 wu-border-gray-25"})]},s.id))})},jc=({act:e})=>{switch(e.type){case"color":return a.jsx(Kc,{act:e});case"dropdown":return a.jsx(Yc,{act:e});case"custom":return e.customComponent||null;default:return a.jsx(Gc,{act:e})}},Gc=({act:e})=>a.jsx("button",{onClick:e.event,"data-active":e.enabled,className:ln,title:e.tooltip,children:a.jsx(we,{icon:e.icon,className:e.className})}),Yc=({act:e})=>{var t;return a.jsxs(Sa,{children:[a.jsxs(Ea,{className:e.className,children:[a.jsx(we,{icon:e.icon}),a.jsx(we,{icon:"wm-arrow-drop-down"})]}),a.jsx(Ft,{className:"wu-flex wu-min-w-0 wu-p-1 wu-gap-[6px]",align:"start",children:(t=e.items)==null?void 0:t.map(r=>a.jsx(dr.DropdownMenuItem,{onClick:r.event,children:a.jsx(de,{variant:"iconOnly",className:"wu-w-6 wu-h-6 wu-text-lg",children:a.jsx(we,{icon:r.icon})})},r.id))})]})},Kc=({act:e})=>a.jsxs(a.Fragment,{children:[a.jsx("label",{"data-active":e.enabled,className:`${ln} wu-cursor-pointer`,title:e.tooltip,htmlFor:e.id,children:a.jsx(we,{icon:e.icon,className:e.className})}),a.jsx("input",{id:e.id,type:"color",className:"wu-h-0 wu-w-0 wu-absolute wu-opacity-0",onInput:t=>e.event(t.currentTarget.value)})]}),Jc=e=>{const{className:t,onChange:r,content:s}=e,o=pr.useEditor({extensions:[Tn.configure(Fc),Mn.configure({types:["heading","paragraph"]}),In,kn,Ze.TextStyle,Ze.Color,Ze.BackgroundColor,hr.TaskList,hr.TaskItem,Ze.LineHeight,Ze.FontSize,Ze.FontFamily,Dn.configure({resize:{enabled:!0,alwaysPreserveAspectRatio:!0},inline:!0}),_n.TableKit.configure({table:{resizable:!0}})],content:s,onUpdate:({editor:n})=>{r&&r(n.getHTML())}});return a.jsx("div",{className:Pc.WuEditor+" "+t,children:a.jsxs(qc,{editor:o,children:[a.jsx(Uc,{}),a.jsx(Xc,{})]})})},Xc=()=>{const{editor:e,openLinkModal:t}=Et(),r=s=>{const o=s.target;if(o.tagName==="A"&&o instanceof HTMLAnchorElement){s.preventDefault();const n=o.getAttribute("href"),u=o.textContent||"";t((i,l)=>{i===null?e==null||e.chain().focus().extendMarkRange("link").unsetLink().run():i&&(l&&l!==u?e==null||e.chain().focus().extendMarkRange("link").insertContent({type:"text",text:l,marks:[{type:"link",attrs:{href:i}}]}).run():e==null||e.chain().focus().extendMarkRange("link").setLink({href:i}).run())},u,n||"")}};return a.jsx(pr.EditorContent,{onClick:r,editor:e,className:"wu-p-2 wu-prose prose-p:wu-my-0 wu-min-h-40"})};window.wickUiVersion="1.20.0",Object.defineProperty(N,"useContext",{enumerable:!0,get:()=>f.useContext}),N.CHART_COLOR_SYSTEM=Lc,N.WuAccordion=Pn,N.WuAppHeader=nu,N.WuAppHeaderAccount=Sr,N.WuAppHeaderBar=Dr,N.WuAppHeaderHelp=Er,N.WuAppHeaderMenu=Ir,N.WuAppHeaderSearch=su,N.WuButton=de,N.WuCalender=ma,N.WuCard=Or,N.WuCheckbox=ke,N.WuChip=hu,N.WuCombobox=Su,N.WuCopyToClipboard=Eu,N.WuDataTable=ic,N.WuDatePicker=lu,N.WuDateRangePicker=wu,N.WuDisplay=Gn,N.WuDrawer=Au,N.WuDrawerClose=Lu,N.WuDrilldown=nn,N.WuEditor=Jc,N.WuFooter=Zr,N.WuFormGroup=ru,N.WuHeading=Un,N.WuHelpButton=Qr,N.WuIcon=we,N.WuInput=Me,N.WuInputError=eu,N.WuInputHint=tu,N.WuLabel=ge,N.WuListbox=es,N.WuLoader=et,N.WuMenu=ts,N.WuMenuCheckboxItem=Vu,N.WuMenuIcon=Da,N.WuMenuItem=Ta,N.WuMenuItemGroup=zu,N.WuMenuRadioItem=Hu,N.WuMenuSeparatorItem=$u,N.WuModal=Aa,N.WuModalClose=qt,N.WuModalContent=La,N.WuModalFooter=Wa,N.WuModalHeader=Qu,N.WuMonthPicker=rl,N.WuPagination=bs,N.WuPopover=ul,N.WuPopoverClose=ll,N.WuPrimaryNavbar=ol,N.WuRadioGroup=ys,N.WuScrollArea=il,N.WuSecondaryNavbar=nl,N.WuSelect=fs,N.WuSidebar=Il,N.WuSidebarContent=Dl,N.WuSidebarFooter=Ml,N.WuSidebarGroup=_l,N.WuSidebarItem=Ll,N.WuSidebarMenu=Al,N.WuSidebarTrigger=Fs,N.WuSpotlight=ls,N.WuStackedCard=Fl,N.WuStackedCardOverlay=Ol,N.WuStepper=ko,N.WuSubMenu=Uu,N.WuSubtext=jn,N.WuSwitcher=Ao,N.WuTab=nc,N.WuTable=cc,N.WuText=$n,N.WuTextarea=Uo,N.WuTimePicker=Jo,N.WuToast=Ic,N.WuToggle=sn,N.WuTooltip=Wt,N.WuTranslationContext=sa,N.WuTranslationProvider=Ac,N.WuTruncatedLabel=ou,N.WuVirtualScroll=tt,N.calculatePosition=Pl,N.useTranslation=Mc,N.useTranslationsContext=_c,N.useWuShowToast=Nc,N.useWuSidebar=$e,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})}));
|
|
10
10
|
//# sourceMappingURL=index.js.map
|