@juanitte/inoui 1.0.0 → 1.0.2
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/ino-ui.cjs +24 -24
- package/dist/ino-ui.cjs.map +1 -1
- package/dist/ino-ui.mjs +3792 -3798
- package/dist/ino-ui.mjs.map +1 -1
- package/package.json +1 -1
package/dist/ino-ui.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("react"),or=require("react-dom");function $i(e){const r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(!r)return[0,0,50];let o=parseInt(r[1],16)/255,s=parseInt(r[2],16)/255,l=parseInt(r[3],16)/255;const a=Math.max(o,s,l),c=Math.min(o,s,l);let u=0,f=0;const d=(a+c)/2;if(a!==c){const h=a-c;switch(f=d>.5?h/(2-a-c):h/(a+c),a){case o:u=((s-l)/h+(s<l?6:0))/6;break;case s:u=((l-o)/h+2)/6;break;case l:u=((o-s)/h+4)/6;break}}return[Math.round(u*360),Math.round(f*100),Math.round(d*100)]}function Qt(e,r,o){r/=100,o/=100;const s=r*Math.min(o,1-o),l=a=>{const c=(a+e/30)%12,u=o-s*Math.max(Math.min(c-3,9-c,1),-1);return Math.round(255*u).toString(16).padStart(2,"0")};return`#${l(0)}${l(8)}${l(4)}`}function Pi(e){const[r,o,s]=$i(e),l={50:Math.min(97,s+45),100:Math.min(94,s+38),200:Math.min(90,s+30),300:Math.min(82,s+20),400:Math.min(70,s+10),500:s,600:Math.max(30,s-10),700:Math.max(24,s-18),800:Math.max(18,s-26),900:Math.max(12,s-34)};return{50:Qt(r,Math.max(o-30,10),l[50]),100:Qt(r,Math.max(o-20,15),l[100]),200:Qt(r,Math.max(o-10,20),l[200]),300:Qt(r,o,l[300]),400:Qt(r,o,l[400]),500:Qt(r,o,l[500]),600:Qt(r,o,l[600]),700:Qt(r,o,l[700]),800:Qt(r,Math.min(o+5,100),l[800]),900:Qt(r,Math.min(o+10,100),l[900])}}const No=i.createContext(null),Di={primary:"#8c75d1",secondary:"#78808bff",success:"#79bc58",warning:"#d5ac59",error:"#d7595b",info:"#6591c7"},zi={bg:"#ffffff",bgSubtle:"#f8fafc",bgMuted:"#f1f5f9",border:"#e2e8f0",borderHover:"#cbd5e1",text:"#0f172a",textMuted:"#868686",textSubtle:"#686868",shadowSm:"0 1px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.15)",shadowMd:"0 4px 8px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.15)",shadowLg:"0 8px 16px rgba(0,0,0,0.25), 0 4px 8px rgba(0,0,0,0.15)"},Wi={bg:"#282828",bgSubtle:"#232323",bgMuted:"#1f1f1f",border:"#404040",borderHover:"#505050",text:"#f8fafc",textMuted:"#8f8f8f",textSubtle:"#b4b4b4",shadowSm:"0 1px 3px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05)",shadowMd:"0 4px 8px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05)",shadowLg:"0 8px 16px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05)"};function Hi(e,r){const o={...Di,...e.colors},s=r==="light"?zi:Wi;let l="";for(const[a,c]of Object.entries(o)){const u=Pi(c);for(const[f,d]of Object.entries(u))l+=`--j-${a}-${f}: ${d};`;l+=`--j-${a}: ${u[500]};`,l+=`--j-${a}-light: ${u[100]};`,l+=`--j-${a}-dark: ${u[900]};`,l+=`--j-${a}-hover: ${r==="light"?u[600]:u[400]};`,l+=`--j-${a}-border: ${r==="light"?u[700]:u[300]};`,l+=`--j-${a}-contrast: #ffffff;`}for(const[a,c]of Object.entries(s))l+=`--j-${a}: ${c};`;return l}function Fi({children:e,config:r={}}){const[o,s]=i.useState(()=>{if(r.defaultMode)return r.defaultMode;if(typeof window<"u"){const c=localStorage.getItem("ino-ui-theme");if(c==="light"||c==="dark")return c;if(window.matchMedia("(prefers-color-scheme: dark)").matches)return"dark"}return"light"}),l=()=>s(c=>c==="light"?"dark":"light");i.useEffect(()=>{localStorage.setItem("ino-ui-theme",o)},[o]),i.useLayoutEffect(()=>{const c=Hi(r,o),u="ino-ui-theme-vars";let f=document.getElementById(u);f||(f=document.createElement("style"),f.id=u,document.head.appendChild(f)),f.textContent=`:root { ${c} }`},[r,o]);const a=i.useMemo(()=>({mode:o,setMode:s,toggleMode:l}),[o]);return t.jsx(No.Provider,{value:a,children:e})}function Ai(){const e=i.useContext(No);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}function co(){return i.useContext(No)?.mode??null}const Oi={colorPrimary:"var(--j-primary)",colorPrimaryHover:"var(--j-primary-hover)",colorPrimaryLight:"var(--j-primary-light)",colorPrimaryDark:"var(--j-primary-dark)",colorPrimaryBg:"var(--j-primary-dark)",colorPrimaryBorder:"var(--j-primary-border)",colorPrimaryContrast:"var(--j-primary-contrast)",colorPrimary50:"var(--j-primary-50)",colorPrimary100:"var(--j-primary-100)",colorPrimary200:"var(--j-primary-200)",colorPrimary300:"var(--j-primary-300)",colorPrimary400:"var(--j-primary-400)",colorPrimary500:"var(--j-primary-500)",colorPrimary600:"var(--j-primary-600)",colorPrimary700:"var(--j-primary-700)",colorPrimary800:"var(--j-primary-800)",colorPrimary900:"var(--j-primary-900)",colorSecondary:"var(--j-secondary)",colorSecondaryHover:"var(--j-secondary-hover)",colorSecondaryLight:"var(--j-secondary-light)",colorSecondaryDark:"var(--j-secondary-dark)",colorSecondaryBg:"var(--j-secondary-dark)",colorSecondaryBorder:"var(--j-secondary-border)",colorSecondaryContrast:"var(--j-secondary-contrast)",colorSecondary50:"var(--j-secondary-50)",colorSecondary100:"var(--j-secondary-100)",colorSecondary200:"var(--j-secondary-200)",colorSecondary300:"var(--j-secondary-300)",colorSecondary400:"var(--j-secondary-400)",colorSecondary500:"var(--j-secondary-500)",colorSecondary600:"var(--j-secondary-600)",colorSecondary700:"var(--j-secondary-700)",colorSecondary800:"var(--j-secondary-800)",colorSecondary900:"var(--j-secondary-900)",colorSuccess:"var(--j-success)",colorSuccessHover:"var(--j-success-hover)",colorSuccessLight:"var(--j-success-light)",colorSuccessDark:"var(--j-success-dark)",colorSuccessBg:"var(--j-success-dark)",colorSuccessBorder:"var(--j-success-border)",colorSuccessContrast:"var(--j-success-contrast)",colorSuccess50:"var(--j-success-50)",colorSuccess100:"var(--j-success-100)",colorSuccess200:"var(--j-success-200)",colorSuccess300:"var(--j-success-300)",colorSuccess400:"var(--j-success-400)",colorSuccess500:"var(--j-success-500)",colorSuccess600:"var(--j-success-600)",colorSuccess700:"var(--j-success-700)",colorSuccess800:"var(--j-success-800)",colorSuccess900:"var(--j-success-900)",colorWarning:"var(--j-warning)",colorWarningHover:"var(--j-warning-hover)",colorWarningLight:"var(--j-warning-light)",colorWarningDark:"var(--j-warning-dark)",colorWarningBg:"var(--j-warning-dark)",colorWarningBorder:"var(--j-warning-border)",colorWarningContrast:"var(--j-warning-contrast)",colorWarning50:"var(--j-warning-50)",colorWarning100:"var(--j-warning-100)",colorWarning200:"var(--j-warning-200)",colorWarning300:"var(--j-warning-300)",colorWarning400:"var(--j-warning-400)",colorWarning500:"var(--j-warning-500)",colorWarning600:"var(--j-warning-600)",colorWarning700:"var(--j-warning-700)",colorWarning800:"var(--j-warning-800)",colorWarning900:"var(--j-warning-900)",colorError:"var(--j-error)",colorErrorHover:"var(--j-error-hover)",colorErrorLight:"var(--j-error-light)",colorErrorDark:"var(--j-error-dark)",colorErrorBg:"var(--j-error-dark)",colorErrorBorder:"var(--j-error-border)",colorErrorContrast:"var(--j-error-contrast)",colorError50:"var(--j-error-50)",colorError100:"var(--j-error-100)",colorError200:"var(--j-error-200)",colorError300:"var(--j-error-300)",colorError400:"var(--j-error-400)",colorError500:"var(--j-error-500)",colorError600:"var(--j-error-600)",colorError700:"var(--j-error-700)",colorError800:"var(--j-error-800)",colorError900:"var(--j-error-900)",colorInfo:"var(--j-info)",colorInfoHover:"var(--j-info-hover)",colorInfoLight:"var(--j-info-light)",colorInfoDark:"var(--j-info-dark)",colorInfoBg:"var(--j-info-dark)",colorInfoBorder:"var(--j-info-border)",colorInfoContrast:"var(--j-info-contrast)",colorInfo50:"var(--j-info-50)",colorInfo100:"var(--j-info-100)",colorInfo200:"var(--j-info-200)",colorInfo300:"var(--j-info-300)",colorInfo400:"var(--j-info-400)",colorInfo500:"var(--j-info-500)",colorInfo600:"var(--j-info-600)",colorInfo700:"var(--j-info-700)",colorInfo800:"var(--j-info-800)",colorInfo900:"var(--j-info-900)"},Ni={colorBg:"var(--j-bg)",colorBgSubtle:"var(--j-bgSubtle)",colorBgMuted:"var(--j-bgMuted)",colorBorder:"var(--j-border)",colorBorderHover:"var(--j-borderHover)",colorText:"var(--j-text)",colorTextMuted:"var(--j-textMuted)",colorTextSubtle:"var(--j-textSubtle)"},Vi={shadowSm:"var(--j-shadowSm)",shadowMd:"var(--j-shadowMd)",shadowLg:"var(--j-shadowLg)"},n={...Oi,...Ni,...Vi};let Vr;function Yi(e){if(typeof window>"u")return 0;if(!e&&Vr!==void 0)return Vr;const r=document.createElement("div");return r.style.cssText="width:100px;height:100px;overflow:scroll;position:absolute;top:-9999px;visibility:hidden;",document.body.appendChild(r),Vr=r.offsetWidth-r.clientWidth,document.body.removeChild(r),Vr}function Ki(e){return e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2}function _i(e){return e===window?window.scrollY??window.pageYOffset:e.scrollTop}function Xi(e,r){e===window?window.scrollTo(0,r):e.scrollTop=r}function Gi(e,r={}){const{container:o=window,duration:s=450,callback:l}=r,a=_i(o),c=e-a;if(c===0){l?.();return}const u=performance.now();function f(d){const h=d-u,g=Math.min(h/s,1),m=Ki(g);Xi(o,a+c*m),g<1?requestAnimationFrame(f):l?.()}requestAnimationFrame(f)}function Ui(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function qi(e,r){const o={...e};for(const s of r)delete o[s];return o}function Xn(...e){const r=[];for(const o of e)if(o){if(typeof o=="string"||typeof o=="number")r.push(String(o));else if(Array.isArray(o)){const s=Xn(...o);s&&r.push(s)}else if(typeof o=="object")for(const[s,l]of Object.entries(o))l&&r.push(s)}return r.join(" ")}const ir={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1600},Gn=["xxl","xl","lg","md","sm","xs"];function Qi(e,r){if(typeof e!="object"||e===null)return e;const o=e;for(const s of Gn)if(r>=ir[s]&&o[s]!==void 0)return o[s]}function Zi(e){const r=i.useRef(e);return i.useLayoutEffect(()=>{r.current=e}),i.useCallback((...o)=>r.current(...o),[])}function Ji(e,r={}){const{value:o,onChange:s,postState:l}=r,[a,c]=i.useState(e),u=o!==void 0,f=u?o:a,d=l?l(f):f,h=i.useRef(f);h.current=f;const g=i.useCallback(m=>{const x=h.current;u||c(m),s?.(m,x)},[u,s]);return[d,g]}function Un(){const[e,r]=i.useState(()=>typeof window<"u"?window.innerWidth:1200);return i.useEffect(()=>{const o=()=>r(window.innerWidth);return window.addEventListener("resize",o,{passive:!0}),()=>window.removeEventListener("resize",o)},[]),e}function el(){const e=Un();return{xs:e>=ir.xs,sm:e>=ir.sm,md:e>=ir.md,lg:e>=ir.lg,xl:e>=ir.xl,xxl:e>=ir.xxl}}function Ve(e,r){if(!(!e&&!r))return[e,r].filter(Boolean).join(" ")}function V(e,r,o){return!r&&!o?e:{...e,...r,...o}}function tl({offsetTop:e,offsetBottom:r,target:o,onChange:s,children:l,className:a,style:c,classNames:u,styles:f}){const d=i.useRef(null),h=i.useRef(null),[g,m]=i.useState(null),x=i.useCallback(()=>{if(!d.current||!h.current)return;const p=o?.()??window,b=d.current.getBoundingClientRect();let v,j;if(p===window)v=0,j=window.innerHeight;else{const k=p.getBoundingClientRect();v=k.top,j=k.bottom}const C=e??(r===void 0?0:void 0),w=C!==void 0&&b.top-v<=C,y=!w&&r!==void 0&&j-b.bottom<=r;if(w){const k={position:"top",top:v+C,left:b.left,width:b.width,height:b.height};m(B=>(B||s?.(!0),k))}else if(y){const k={position:"bottom",bottom:window.innerHeight-j+r,left:b.left,width:b.width,height:b.height};m(B=>(B||s?.(!0),k))}else m(k=>(k&&s?.(!1),null))},[o,e,r,s]);return i.useEffect(()=>{const p=o?.()??window;return p.addEventListener("scroll",x,{passive:!0}),window.addEventListener("resize",x),p!==window&&window.addEventListener("scroll",x,{passive:!0}),x(),()=>{p.removeEventListener("scroll",x),window.removeEventListener("resize",x),p!==window&&window.removeEventListener("scroll",x)}},[x,o]),t.jsx("div",{ref:d,className:Ve(a,u?.root),style:V(g?{height:g.height}:{},f?.root,c),children:t.jsx("div",{ref:h,className:u?.affix,style:V(g?{position:"fixed",top:g.top,bottom:g.bottom,left:g.left,width:g.width,zIndex:10}:{},f?.affix),children:l})})}function rl(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function ol(){return t.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",style:{animation:"j-modal-spin 0.75s linear infinite"},children:[t.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeOpacity:"0.25"}),t.jsx("path",{d:"M12 2a10 10 0 0 1 10 10",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]})}function nl(){return t.jsx("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:t.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})})}function sl(){return t.jsx("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:t.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})})}function sn(){return t.jsx("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:t.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})})}function il(){return t.jsx("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:t.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"})})}const ll={confirm:t.jsx(sn,{}),info:t.jsx(sl,{}),success:t.jsx(nl,{}),warning:t.jsx(sn,{}),error:t.jsx(il,{})},al={confirm:n.colorWarning,info:n.colorInfo,success:n.colorSuccess,warning:n.colorWarning,error:n.colorError};function cl(){return t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1rem",padding:"0.25rem 0"},children:[t.jsx("style",{children:"@keyframes j-modal-pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }"}),t.jsx("div",{style:{height:"1rem",width:"60%",borderRadius:"0.25rem",backgroundColor:n.colorBgMuted,animation:"j-modal-pulse 1.5s ease-in-out infinite"}}),t.jsx("div",{style:{height:"1rem",width:"100%",borderRadius:"0.25rem",backgroundColor:n.colorBgMuted,animation:"j-modal-pulse 1.5s ease-in-out infinite 0.1s"}}),t.jsx("div",{style:{height:"1rem",width:"80%",borderRadius:"0.25rem",backgroundColor:n.colorBgMuted,animation:"j-modal-pulse 1.5s ease-in-out infinite 0.2s"}})]})}function qn({open:e=!1,onClose:r,onOk:o,afterOpenChange:s,title:l,footer:a,children:c,closable:u=!0,closeIcon:f,maskClosable:d=!0,keyboard:h=!0,width:g="32rem",centered:m=!1,okText:x="OK",cancelText:p="Cancel",okButtonProps:b,cancelButtonProps:v,confirmLoading:j=!1,loading:C=!1,destroyOnClose:w=!1,mask:y=!0,zIndex:k=1e3,modalRender:B,className:R,style:S,classNames:L,styles:$}){const I=y!==!1,P=typeof y=="object"?y.blur??!1:!1,[E,H]=i.useState(!1),[z,A]=i.useState(!1),M=i.useRef(null),W=i.useRef(""),F=i.useRef(!1);e&&(F.current=!0),i.useEffect(()=>{e?(H(!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{A(!0)})})):A(!1)},[e]);const D=i.useCallback(Ie=>{Ie.target===M.current&&(e?s?.(!0):(H(!1),s?.(!1)))},[e,s]);i.useEffect(()=>(E?(W.current=document.body.style.overflow,document.body.style.overflow="hidden"):document.body.style.overflow=W.current,()=>{document.body.style.overflow=W.current}),[E]),i.useEffect(()=>{if(!E||!h)return;const Ie=De=>{De.key==="Escape"&&r?.(De)};return document.addEventListener("keydown",Ie),()=>document.removeEventListener("keydown",Ie)},[E,h,r]);const T=i.useCallback(Ie=>{d&&r?.(Ie)},[d,r]);if(!E&&!F.current||!E&&w)return null;const O={position:"fixed",inset:0,zIndex:k,overflow:"auto",display:E?void 0:"none",pointerEvents:E?"auto":"none"},Y={position:"fixed",inset:0,backgroundColor:P?"rgba(0, 0, 0, 0.25)":"rgba(0, 0, 0, 0.45)",opacity:z?1:0,transition:"opacity 0.3s ease",...P?{backdropFilter:"blur(6px)",WebkitBackdropFilter:"blur(6px)"}:{},...$?.mask},X={display:"flex",justifyContent:"center",alignItems:m?"center":"flex-start",minHeight:"100%",padding:m?"1rem":"6rem 1rem 1.5rem"},_={position:"relative",width:g,maxWidth:"calc(100vw - 2rem)",backgroundColor:n.colorBg,color:n.colorText,borderRadius:"0.5rem",boxShadow:n.shadowLg,display:"flex",flexDirection:"column",maxHeight:m?"calc(100vh - 2rem)":void 0,transform:z?"scale(1)":"scale(0.85)",opacity:z?1:0,transition:"transform 0.25s ease, opacity 0.25s ease",...$?.content,...$?.root,...S},G={display:"flex",alignItems:"center",padding:"1rem 1.5rem",borderBottom:`1px solid ${n.colorBorder}`,flexShrink:0,...$?.header},Q={flex:1,padding:"1.5rem",overflowY:"auto",...$?.body},N={display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"0.5rem",padding:"0.75rem 1rem",borderTop:`1px solid ${n.colorBorder}`,flexShrink:0,...$?.footer},le={position:"absolute",top:"0.75rem",right:"0.75rem",display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"0.25rem",border:"none",background:"none",cursor:"pointer",color:n.colorTextSubtle,borderRadius:"0.25rem",transition:"color 0.15s",zIndex:1,...$?.closeBtn},oe={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.375rem",padding:"0.375rem 1rem",fontSize:"0.875rem",fontWeight:500,borderRadius:"0.375rem",cursor:"pointer",transition:"filter 0.15s, border-color 0.15s, opacity 0.15s",lineHeight:1.5},{style:q,...K}=v??{},{style:re,...Te}=b??{},Ce=()=>t.jsx("button",{type:"button",style:{...oe,backgroundColor:n.colorBg,color:n.colorText,border:`1px solid ${n.colorBorder}`,...q},onClick:Ie=>r?.(Ie),onMouseEnter:Ie=>{Ie.currentTarget.style.borderColor=n.colorBorderHover},onMouseLeave:Ie=>{Ie.currentTarget.style.borderColor=n.colorBorder},...K,children:p}),Le=()=>t.jsxs("button",{type:"button",style:{...oe,backgroundColor:n.colorPrimary,color:n.colorPrimaryContrast,border:`1px solid ${n.colorPrimary}`,opacity:j?.7:1,pointerEvents:j?"none":"auto",...re},onClick:Ie=>o?.(Ie),disabled:j,onMouseEnter:Ie=>{j||(Ie.currentTarget.style.filter="brightness(1.15)")},onMouseLeave:Ie=>{Ie.currentTarget.style.filter=""},...Te,children:[j&&t.jsx(ol,{}),x]});let ue=null;a===null?ue=null:a===void 0?ue=t.jsxs(t.Fragment,{children:[t.jsx(Ce,{}),t.jsx(Le,{})]}):typeof a=="function"?ue=a({OkBtn:Le,CancelBtn:Ce}):ue=a;const ze=!w||E;let xe=t.jsxs("div",{ref:M,role:"dialog","aria-modal":"true",className:Ve(R,L?.root),style:_,onTransitionEnd:D,children:[u&&t.jsx("button",{type:"button",className:L?.closeBtn,style:le,onClick:Ie=>r?.(Ie),onMouseEnter:Ie=>{Ie.currentTarget.style.color=n.colorText},onMouseLeave:Ie=>{Ie.currentTarget.style.color=n.colorTextSubtle},children:f??t.jsx(rl,{})}),l!=null&&t.jsx("div",{className:L?.header,style:G,children:t.jsx("div",{style:{flex:1,fontSize:"1rem",fontWeight:600,color:n.colorText,minWidth:0,paddingRight:u?"2rem":0},children:l})}),ze&&t.jsx("div",{className:L?.body,style:Q,children:C?t.jsx(cl,{}):c}),ue!=null&&t.jsx("div",{className:L?.footer,style:N,children:ue})]});return B&&(xe=B(xe)),or.createPortal(t.jsxs("div",{style:O,children:[t.jsx("style",{children:"@keyframes j-modal-spin { to { transform: rotate(360deg); } }"}),I&&t.jsx("div",{className:L?.mask,style:Y,onClick:T}),t.jsx("div",{style:X,onClick:Ie=>{Ie.target===Ie.currentTarget&&d&&r?.(Ie)},children:xe})]}),document.body)}let dl=0;function Qn(){const e=i.useRef([]),[,r]=i.useState(0),o=i.useCallback(()=>{r(h=>h+1)},[]),s=i.useCallback(h=>{const g=e.current.find(m=>m.key===h);g&&(g.open=!1,g.loading=!1,o())},[o]),l=i.useCallback(h=>{e.current=e.current.filter(g=>g.key!==h),o()},[o]),a=i.useCallback(h=>{const g=e.current.find(x=>x.key===h);if(!g)return;const m=g.config.onOk?.();m&&typeof m.then=="function"?(g.loading=!0,o(),m.then(()=>s(h),()=>{g.loading=!1,o()})):s(h)},[o,s]),c=i.useCallback(h=>{e.current.find(m=>m.key===h)?.config.onCancel?.(),s(h)},[s]),u=i.useCallback((h,g)=>{const m=`j-modal-confirm-${++dl}`,x={key:m,type:h,config:g,open:!0,loading:!1};return e.current=[...e.current,x],o(),{destroy:()=>s(m),update:p=>{const b=e.current.find(v=>v.key===m);b&&(b.config={...b.config,...p},o())}}},[o,s]),f=i.useMemo(()=>({confirm:h=>u("confirm",h),info:h=>u("info",h),success:h=>u("success",h),warning:h=>u("warning",h),error:h=>u("error",h),destroyAll:()=>{e.current.forEach(h=>{h.open=!1,h.loading=!1}),o()}}),[u,o]),d=t.jsx(t.Fragment,{children:e.current.map(h=>{const{type:g,config:m}=h,x=al[g],p=m.icon??ll[g],b=g==="confirm",v=m.bordered!==!1&&g!=="confirm";return t.jsx(qn,{open:h.open,onClose:()=>c(h.key),onOk:()=>a(h.key),confirmLoading:h.loading,closable:m.closable??!1,maskClosable:m.maskClosable??!1,keyboard:m.keyboard??!0,centered:m.centered,width:m.width??"26rem",zIndex:m.zIndex??1e3,okText:m.okText??"OK",cancelText:m.cancelText??"Cancel",okButtonProps:v?{style:{backgroundColor:x,borderColor:x}}:void 0,footer:b?void 0:({OkBtn:j})=>t.jsx(j,{}),afterOpenChange:j=>{j||l(h.key)},styles:{content:v?{border:`1px solid ${x}`}:void 0,body:{padding:"2rem 2rem 1.5rem"},footer:{borderTop:"none"}},className:m.className,style:m.style,children:t.jsxs("div",{style:{display:"flex",gap:"1rem"},children:[t.jsx("span",{style:{color:x,flexShrink:0,marginTop:"0.0625rem"},children:p}),t.jsxs("div",{children:[m.title!=null&&t.jsx("div",{style:{fontWeight:600,fontSize:"1rem",marginBottom:m.content!=null?"0.5rem":0},children:m.title}),m.content!=null&&t.jsx("div",{style:{color:n.colorTextMuted,fontSize:"0.875rem"},children:m.content})]})]})},h.key)})});return[f,d]}function ul({size:e=16}){return t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:t.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})})}function fl({size:e=16}){return t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:t.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})})}function hl({size:e=16}){return t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:t.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})})}function pl({size:e=16}){return t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:t.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"})})}function gl({size:e=16}){return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",children:[t.jsx("circle",{cx:"12",cy:"12",r:"10",strokeOpacity:"0.25"}),t.jsx("path",{d:"M12 2a10 10 0 0 1 10 10",style:{animation:"j-popalert-spin 0.75s linear infinite",transformOrigin:"center"}})]})}function ml(){return t.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}const xl={success:e=>t.jsx(ul,{size:e}),info:e=>t.jsx(fl,{size:e}),warning:e=>t.jsx(hl,{size:e}),error:e=>t.jsx(pl,{size:e}),loading:e=>t.jsx(gl,{size:e})},yl={success:n.colorSuccess,info:n.colorInfo,warning:n.colorWarning,error:n.colorError,loading:n.colorInfo};function bl(e,r){const o=yl[e];return r?{bg:`color-mix(in srgb, ${o} 18%, ${n.colorBg})`,border:`color-mix(in srgb, ${o} 30%, ${n.colorBorder})`,icon:o}:{bg:`color-mix(in srgb, ${o} 15%, white)`,border:`color-mix(in srgb, ${o} 40%, ${n.colorBorder})`,icon:o}}const vl={sm:{fontSize:"0.75rem",padding:"0.375rem 0.625rem",gap:"0.375rem",iconSize:14},md:{fontSize:"0.875rem",padding:"0.5rem 0.875rem",gap:"0.5rem",iconSize:16},lg:{fontSize:"1rem",padding:"0.625rem 1rem",gap:"0.625rem",iconSize:20}};function Cl(e,r){const o={position:"fixed",zIndex:1010,display:"flex",flexDirection:"column",pointerEvents:"none",padding:"0 1rem"};switch(e){case"top":return{...o,top:r,left:0,right:0,alignItems:"center"};case"topLeft":return{...o,top:r,left:0,alignItems:"flex-start"};case"topRight":return{...o,top:r,right:0,alignItems:"flex-end"};case"bottom":return{...o,bottom:r,left:0,right:0,alignItems:"center",flexDirection:"column-reverse"};case"bottomLeft":return{...o,bottom:r,left:0,alignItems:"flex-start",flexDirection:"column-reverse"};case"bottomRight":return{...o,bottom:r,right:0,alignItems:"flex-end",flexDirection:"column-reverse"};case"left":return{...o,top:0,bottom:0,left:r,alignItems:"flex-start",justifyContent:"center"};case"right":return{...o,top:0,bottom:0,right:r,alignItems:"flex-end",justifyContent:"center"}}}function kl(e){switch(e){case"top":case"topLeft":case"topRight":return"translateY(-100%)";case"bottom":case"bottomLeft":case"bottomRight":return"translateY(100%)";case"left":return"translateX(-100%)";case"right":return"translateX(100%)"}}function wl(e){switch(e){case"top":case"topLeft":case"topRight":return"translateY(-50%)";case"bottom":case"bottomLeft":case"bottomRight":return"translateY(50%)";case"left":return"translateX(-50%)";case"right":return"translateX(50%)"}}function jl({instance:e,placement:r,onRequestClose:o,onRemoved:s}){const[l,a]=i.useState("entering"),c=i.useRef(null),u=i.useRef(0),f=i.useRef(Date.now()),d=i.useRef(null),h=i.useRef(null),g=i.useRef(null),x=co()==="dark",p=bl(e.type,x);i.useEffect(()=>{const S=requestAnimationFrame(()=>{requestAnimationFrame(()=>{a("visible")})});return()=>cancelAnimationFrame(S)},[]),i.useEffect(()=>{e.phase==="exiting"&&a("exiting")},[e.phase]),i.useEffect(()=>{e.version!==0&&(u.current=0,f.current=Date.now(),requestAnimationFrame(()=>{g.current&&(g.current.style.animation="none",g.current.offsetHeight,g.current.style.animation="j-popalert-update 0.3s ease"),h.current&&(h.current.style.animation="none",h.current.offsetHeight,h.current.style.animation=`j-popalert-progress ${e.duration}s linear forwards`)}))},[e.version]),i.useEffect(()=>{if(e.duration===0||l!=="visible")return;const S=e.duration*1e3-u.current;if(S<=0){o(e.key);return}return f.current=Date.now(),c.current=setTimeout(()=>{o(e.key)},S),()=>{c.current&&clearTimeout(c.current)}},[l,e.duration,e.key,e.version,o]);const b=i.useCallback(()=>{!e.pauseOnHover||e.duration===0||(u.current+=Date.now()-f.current,c.current&&(clearTimeout(c.current),c.current=null),h.current&&(h.current.style.animationPlayState="paused"))},[e.pauseOnHover,e.duration]),v=i.useCallback(()=>{if(!e.pauseOnHover||e.duration===0||l!=="visible")return;h.current&&(h.current.style.animationPlayState="running");const S=e.duration*1e3-u.current;if(S<=0){o(e.key);return}f.current=Date.now(),c.current=setTimeout(()=>{o(e.key)},S)},[e.pauseOnHover,e.duration,e.key,o,l]),j=i.useCallback(S=>{S.target===d.current&&l==="exiting"&&(e.onClose?.(),s(e.key))},[l,e,s]),C=l==="entering",w=l==="exiting",y=vl[e.size],k={maxHeight:C||w?0:"9.375rem",opacity:C||w?0:1,transform:C?kl(r):w?wl(r):"translate(0, 0)",transition:"max-height 0.3s ease, opacity 0.3s ease, transform 0.3s ease, margin 0.3s ease",overflow:"hidden",borderRadius:"0.5rem",marginBottom:w?0:"0.5rem",pointerEvents:"all"},B=e.showProgress&&!!e.duration&&!w,R={position:"relative",display:"inline-flex",alignItems:"center",gap:y.gap,padding:y.padding,backgroundColor:p.bg,border:`1px solid ${p.border}`,borderRadius:"0.5rem",boxShadow:n.shadowMd,fontSize:y.fontSize,lineHeight:1.5,color:n.colorText,overflow:"hidden",transition:"background-color 0.3s ease, border-color 0.3s ease"};return t.jsx("div",{ref:d,style:k,onTransitionEnd:j,onMouseEnter:b,onMouseLeave:v,children:t.jsxs("div",{ref:g,className:Ve(e.className,e.classNames?.root),style:V(R,e.styles?.root,e.style),children:[t.jsx("span",{className:e.classNames?.icon,style:{display:"inline-flex",alignItems:"center",flexShrink:0,color:p.icon,transition:"color 0.3s ease",...e.styles?.icon},children:e.icon??xl[e.type](y.iconSize)}),t.jsxs("div",{style:{flex:1,minWidth:0},children:[t.jsx("span",{className:e.classNames?.content,style:{display:"block",...e.styles?.content},children:e.content}),e.description!=null&&t.jsx("span",{className:e.classNames?.description,style:{display:"block",color:n.colorTextMuted,fontSize:"0.8125em",marginTop:"0.125rem",...e.styles?.description},children:e.description})]}),e.closable&&t.jsx("button",{type:"button",onClick:()=>o(e.key),style:{display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"0.125rem",border:"none",background:"none",cursor:"pointer",color:n.colorTextSubtle,flexShrink:0,borderRadius:"0.25rem",transition:"color 0.15s",marginLeft:"0.25rem"},onMouseEnter:S=>{S.currentTarget.style.color=n.colorText},onMouseLeave:S=>{S.currentTarget.style.color=n.colorTextSubtle},children:t.jsx(ml,{})}),B&&t.jsx("div",{ref:h,style:{position:"absolute",bottom:0,left:0,right:0,height:2,backgroundColor:p.icon,opacity:.6,borderRadius:0,transformOrigin:"left",animation:`j-popalert-progress ${e.duration}s linear forwards`}})]})})}function Sl({instances:e,placement:r,offset:o,onRequestClose:s,onRemoved:l}){if(typeof document>"u"||e.length===0)return null;const a=Cl(r,o);return or.createPortal(t.jsxs(t.Fragment,{children:[t.jsx("style",{children:`@keyframes j-popalert-spin { to { transform: rotate(360deg); } }
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("react"),or=require("react-dom");function $i(e){const r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(!r)return[0,0,50];let o=parseInt(r[1],16)/255,s=parseInt(r[2],16)/255,l=parseInt(r[3],16)/255;const a=Math.max(o,s,l),c=Math.min(o,s,l);let u=0,f=0;const d=(a+c)/2;if(a!==c){const h=a-c;switch(f=d>.5?h/(2-a-c):h/(a+c),a){case o:u=((s-l)/h+(s<l?6:0))/6;break;case s:u=((l-o)/h+2)/6;break;case l:u=((o-s)/h+4)/6;break}}return[Math.round(u*360),Math.round(f*100),Math.round(d*100)]}function Qt(e,r,o){r/=100,o/=100;const s=r*Math.min(o,1-o),l=a=>{const c=(a+e/30)%12,u=o-s*Math.max(Math.min(c-3,9-c,1),-1);return Math.round(255*u).toString(16).padStart(2,"0")};return`#${l(0)}${l(8)}${l(4)}`}function Pi(e){const[r,o,s]=$i(e),l={50:Math.min(97,s+45),100:Math.min(94,s+38),200:Math.min(90,s+30),300:Math.min(82,s+20),400:Math.min(70,s+10),500:s,600:Math.max(30,s-10),700:Math.max(24,s-18),800:Math.max(18,s-26),900:Math.max(12,s-34)};return{50:Qt(r,Math.max(o-30,10),l[50]),100:Qt(r,Math.max(o-20,15),l[100]),200:Qt(r,Math.max(o-10,20),l[200]),300:Qt(r,o,l[300]),400:Qt(r,o,l[400]),500:Qt(r,o,l[500]),600:Qt(r,o,l[600]),700:Qt(r,o,l[700]),800:Qt(r,Math.min(o+5,100),l[800]),900:Qt(r,Math.min(o+10,100),l[900])}}const No=i.createContext(null),Di={primary:"#8c75d1",secondary:"#78808bff",success:"#79bc58",warning:"#d5ac59",error:"#d7595b",info:"#6591c7"},zi={bg:"#ffffff",bgSubtle:"#f8fafc",bgMuted:"#f1f5f9",border:"#e2e8f0",borderHover:"#cbd5e1",text:"#0f172a",textMuted:"#868686",textSubtle:"#686868",shadowSm:"0 1px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.15)",shadowMd:"0 4px 8px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.15)",shadowLg:"0 8px 16px rgba(0,0,0,0.25), 0 4px 8px rgba(0,0,0,0.15)"},Wi={bg:"#282828",bgSubtle:"#232323",bgMuted:"#1f1f1f",border:"#404040",borderHover:"#505050",text:"#f8fafc",textMuted:"#8f8f8f",textSubtle:"#b4b4b4",shadowSm:"0 1px 3px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05)",shadowMd:"0 4px 8px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05)",shadowLg:"0 8px 16px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05)"};function Hi(e,r){const o={...Di,...e.colors},s=r==="light"?zi:Wi;let l="";for(const[a,c]of Object.entries(o)){const u=Pi(c);for(const[f,d]of Object.entries(u))l+=`--j-${a}-${f}: ${d};`;l+=`--j-${a}: ${u[500]};`,l+=`--j-${a}-light: ${u[100]};`,l+=`--j-${a}-dark: ${u[900]};`,l+=`--j-${a}-hover: ${r==="light"?u[600]:u[400]};`,l+=`--j-${a}-border: ${r==="light"?u[700]:u[300]};`,l+=`--j-${a}-contrast: #ffffff;`}for(const[a,c]of Object.entries(s))l+=`--j-${a}: ${c};`;return l}function Fi({children:e,config:r={}}){const[o,s]=i.useState(()=>{if(r.defaultMode)return r.defaultMode;if(typeof window<"u"){const c=localStorage.getItem("ino-ui-theme");if(c==="light"||c==="dark")return c;if(window.matchMedia("(prefers-color-scheme: dark)").matches)return"dark"}return"light"}),l=()=>s(c=>c==="light"?"dark":"light");i.useEffect(()=>{localStorage.setItem("ino-ui-theme",o)},[o]),i.useLayoutEffect(()=>{const c=Hi(r,o),u="ino-ui-theme-vars";let f=document.getElementById(u);f||(f=document.createElement("style"),f.id=u,document.head.appendChild(f)),f.textContent=`:root { ${c} }`},[r,o]);const a=i.useMemo(()=>({mode:o,setMode:s,toggleMode:l}),[o]);return t.jsx(No.Provider,{value:a,children:e})}function Ai(){const e=i.useContext(No);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}function co(){return i.useContext(No)?.mode??null}const Oi={colorPrimary:"var(--j-primary)",colorPrimaryHover:"var(--j-primary-hover)",colorPrimaryLight:"var(--j-primary-light)",colorPrimaryDark:"var(--j-primary-dark)",colorPrimaryBg:"var(--j-primary-dark)",colorPrimaryBorder:"var(--j-primary-border)",colorPrimaryContrast:"var(--j-primary-contrast)",colorPrimary50:"var(--j-primary-50)",colorPrimary100:"var(--j-primary-100)",colorPrimary200:"var(--j-primary-200)",colorPrimary300:"var(--j-primary-300)",colorPrimary400:"var(--j-primary-400)",colorPrimary500:"var(--j-primary-500)",colorPrimary600:"var(--j-primary-600)",colorPrimary700:"var(--j-primary-700)",colorPrimary800:"var(--j-primary-800)",colorPrimary900:"var(--j-primary-900)",colorSecondary:"var(--j-secondary)",colorSecondaryHover:"var(--j-secondary-hover)",colorSecondaryLight:"var(--j-secondary-light)",colorSecondaryDark:"var(--j-secondary-dark)",colorSecondaryBg:"var(--j-secondary-dark)",colorSecondaryBorder:"var(--j-secondary-border)",colorSecondaryContrast:"var(--j-secondary-contrast)",colorSecondary50:"var(--j-secondary-50)",colorSecondary100:"var(--j-secondary-100)",colorSecondary200:"var(--j-secondary-200)",colorSecondary300:"var(--j-secondary-300)",colorSecondary400:"var(--j-secondary-400)",colorSecondary500:"var(--j-secondary-500)",colorSecondary600:"var(--j-secondary-600)",colorSecondary700:"var(--j-secondary-700)",colorSecondary800:"var(--j-secondary-800)",colorSecondary900:"var(--j-secondary-900)",colorSuccess:"var(--j-success)",colorSuccessHover:"var(--j-success-hover)",colorSuccessLight:"var(--j-success-light)",colorSuccessDark:"var(--j-success-dark)",colorSuccessBg:"var(--j-success-dark)",colorSuccessBorder:"var(--j-success-border)",colorSuccessContrast:"var(--j-success-contrast)",colorSuccess50:"var(--j-success-50)",colorSuccess100:"var(--j-success-100)",colorSuccess200:"var(--j-success-200)",colorSuccess300:"var(--j-success-300)",colorSuccess400:"var(--j-success-400)",colorSuccess500:"var(--j-success-500)",colorSuccess600:"var(--j-success-600)",colorSuccess700:"var(--j-success-700)",colorSuccess800:"var(--j-success-800)",colorSuccess900:"var(--j-success-900)",colorWarning:"var(--j-warning)",colorWarningHover:"var(--j-warning-hover)",colorWarningLight:"var(--j-warning-light)",colorWarningDark:"var(--j-warning-dark)",colorWarningBg:"var(--j-warning-dark)",colorWarningBorder:"var(--j-warning-border)",colorWarningContrast:"var(--j-warning-contrast)",colorWarning50:"var(--j-warning-50)",colorWarning100:"var(--j-warning-100)",colorWarning200:"var(--j-warning-200)",colorWarning300:"var(--j-warning-300)",colorWarning400:"var(--j-warning-400)",colorWarning500:"var(--j-warning-500)",colorWarning600:"var(--j-warning-600)",colorWarning700:"var(--j-warning-700)",colorWarning800:"var(--j-warning-800)",colorWarning900:"var(--j-warning-900)",colorError:"var(--j-error)",colorErrorHover:"var(--j-error-hover)",colorErrorLight:"var(--j-error-light)",colorErrorDark:"var(--j-error-dark)",colorErrorBg:"var(--j-error-dark)",colorErrorBorder:"var(--j-error-border)",colorErrorContrast:"var(--j-error-contrast)",colorError50:"var(--j-error-50)",colorError100:"var(--j-error-100)",colorError200:"var(--j-error-200)",colorError300:"var(--j-error-300)",colorError400:"var(--j-error-400)",colorError500:"var(--j-error-500)",colorError600:"var(--j-error-600)",colorError700:"var(--j-error-700)",colorError800:"var(--j-error-800)",colorError900:"var(--j-error-900)",colorInfo:"var(--j-info)",colorInfoHover:"var(--j-info-hover)",colorInfoLight:"var(--j-info-light)",colorInfoDark:"var(--j-info-dark)",colorInfoBg:"var(--j-info-dark)",colorInfoBorder:"var(--j-info-border)",colorInfoContrast:"var(--j-info-contrast)",colorInfo50:"var(--j-info-50)",colorInfo100:"var(--j-info-100)",colorInfo200:"var(--j-info-200)",colorInfo300:"var(--j-info-300)",colorInfo400:"var(--j-info-400)",colorInfo500:"var(--j-info-500)",colorInfo600:"var(--j-info-600)",colorInfo700:"var(--j-info-700)",colorInfo800:"var(--j-info-800)",colorInfo900:"var(--j-info-900)"},Ni={colorBg:"var(--j-bg)",colorBgSubtle:"var(--j-bgSubtle)",colorBgMuted:"var(--j-bgMuted)",colorBorder:"var(--j-border)",colorBorderHover:"var(--j-borderHover)",colorText:"var(--j-text)",colorTextMuted:"var(--j-textMuted)",colorTextSubtle:"var(--j-textSubtle)"},Vi={shadowSm:"var(--j-shadowSm)",shadowMd:"var(--j-shadowMd)",shadowLg:"var(--j-shadowLg)"},n={...Oi,...Ni,...Vi};let Vr;function Yi(e){if(typeof window>"u")return 0;if(!e&&Vr!==void 0)return Vr;const r=document.createElement("div");return r.style.cssText="width:100px;height:100px;overflow:scroll;position:absolute;top:-9999px;visibility:hidden;",document.body.appendChild(r),Vr=r.offsetWidth-r.clientWidth,document.body.removeChild(r),Vr}function Ki(e){return e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2}function _i(e){return e===window?window.scrollY??window.pageYOffset:e.scrollTop}function Xi(e,r){e===window?window.scrollTo(0,r):e.scrollTop=r}function Gi(e,r={}){const{container:o=window,duration:s=450,callback:l}=r,a=_i(o),c=e-a;if(c===0){l?.();return}const u=performance.now();function f(d){const h=d-u,g=Math.min(h/s,1),m=Ki(g);Xi(o,a+c*m),g<1?requestAnimationFrame(f):l?.()}requestAnimationFrame(f)}function Ui(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function qi(e,r){const o={...e};for(const s of r)delete o[s];return o}function Xn(...e){const r=[];for(const o of e)if(o){if(typeof o=="string"||typeof o=="number")r.push(String(o));else if(Array.isArray(o)){const s=Xn(...o);s&&r.push(s)}else if(typeof o=="object")for(const[s,l]of Object.entries(o))l&&r.push(s)}return r.join(" ")}const ir={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1600},Gn=["xxl","xl","lg","md","sm","xs"];function Qi(e,r){if(typeof e!="object"||e===null)return e;const o=e;for(const s of Gn)if(r>=ir[s]&&o[s]!==void 0)return o[s]}function Zi(e){const r=i.useRef(e);return i.useLayoutEffect(()=>{r.current=e}),i.useCallback((...o)=>r.current(...o),[])}function Ji(e,r={}){const{value:o,onChange:s,postState:l}=r,[a,c]=i.useState(e),u=o!==void 0,f=u?o:a,d=l?l(f):f,h=i.useRef(f);h.current=f;const g=i.useCallback(m=>{const x=h.current;u||c(m),s?.(m,x)},[u,s]);return[d,g]}function Un(){const[e,r]=i.useState(()=>typeof window<"u"?window.innerWidth:1200);return i.useEffect(()=>{const o=()=>r(window.innerWidth);return window.addEventListener("resize",o,{passive:!0}),()=>window.removeEventListener("resize",o)},[]),e}function el(){const e=Un();return{xs:e>=ir.xs,sm:e>=ir.sm,md:e>=ir.md,lg:e>=ir.lg,xl:e>=ir.xl,xxl:e>=ir.xxl}}function Ye(e,r){if(!(!e&&!r))return[e,r].filter(Boolean).join(" ")}function V(e,r,o){return!r&&!o?e:{...e,...r,...o}}function tl({offsetTop:e,offsetBottom:r,target:o,onChange:s,children:l,className:a,style:c,classNames:u,styles:f}){const d=i.useRef(null),h=i.useRef(null),[g,m]=i.useState(null),x=i.useCallback(()=>{if(!d.current||!h.current)return;const p=o?.()??window,b=d.current.getBoundingClientRect();let v,j;if(p===window)v=0,j=window.innerHeight;else{const k=p.getBoundingClientRect();v=k.top,j=k.bottom}const C=e??(r===void 0?0:void 0),w=C!==void 0&&b.top-v<=C,y=!w&&r!==void 0&&j-b.bottom<=r;if(w){const k={position:"top",top:v+C,left:b.left,width:b.width,height:b.height};m(B=>(B||s?.(!0),k))}else if(y){const k={position:"bottom",bottom:window.innerHeight-j+r,left:b.left,width:b.width,height:b.height};m(B=>(B||s?.(!0),k))}else m(k=>(k&&s?.(!1),null))},[o,e,r,s]);return i.useEffect(()=>{const p=o?.()??window;return p.addEventListener("scroll",x,{passive:!0}),window.addEventListener("resize",x),p!==window&&window.addEventListener("scroll",x,{passive:!0}),x(),()=>{p.removeEventListener("scroll",x),window.removeEventListener("resize",x),p!==window&&window.removeEventListener("scroll",x)}},[x,o]),t.jsx("div",{ref:d,className:Ye(a,u?.root),style:V(g?{height:g.height}:{},f?.root,c),children:t.jsx("div",{ref:h,className:u?.affix,style:V(g?{position:"fixed",top:g.top,bottom:g.bottom,left:g.left,width:g.width,zIndex:10}:{},f?.affix),children:l})})}function rl(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function ol(){return t.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",style:{animation:"j-modal-spin 0.75s linear infinite"},children:[t.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeOpacity:"0.25"}),t.jsx("path",{d:"M12 2a10 10 0 0 1 10 10",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]})}function nl(){return t.jsx("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:t.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})})}function sl(){return t.jsx("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:t.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})})}function sn(){return t.jsx("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:t.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})})}function il(){return t.jsx("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:t.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"})})}const ll={confirm:t.jsx(sn,{}),info:t.jsx(sl,{}),success:t.jsx(nl,{}),warning:t.jsx(sn,{}),error:t.jsx(il,{})},al={confirm:n.colorWarning,info:n.colorInfo,success:n.colorSuccess,warning:n.colorWarning,error:n.colorError};function cl(){return t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1rem",padding:"0.25rem 0"},children:[t.jsx("style",{children:"@keyframes j-modal-pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }"}),t.jsx("div",{style:{height:"1rem",width:"60%",borderRadius:"0.25rem",backgroundColor:n.colorBgMuted,animation:"j-modal-pulse 1.5s ease-in-out infinite"}}),t.jsx("div",{style:{height:"1rem",width:"100%",borderRadius:"0.25rem",backgroundColor:n.colorBgMuted,animation:"j-modal-pulse 1.5s ease-in-out infinite 0.1s"}}),t.jsx("div",{style:{height:"1rem",width:"80%",borderRadius:"0.25rem",backgroundColor:n.colorBgMuted,animation:"j-modal-pulse 1.5s ease-in-out infinite 0.2s"}})]})}function qn({open:e=!1,onClose:r,onOk:o,afterOpenChange:s,title:l,footer:a,children:c,closable:u=!0,closeIcon:f,maskClosable:d=!0,keyboard:h=!0,width:g="32rem",centered:m=!1,okText:x="OK",cancelText:p="Cancel",okButtonProps:b,cancelButtonProps:v,confirmLoading:j=!1,loading:C=!1,destroyOnClose:w=!1,mask:y=!0,zIndex:k=1e3,modalRender:B,className:R,style:S,classNames:E,styles:$}){const I=y!==!1,L=typeof y=="object"?y.blur??!1:!1,[P,H]=i.useState(!1),[z,F]=i.useState(!1),M=i.useRef(null),W=i.useRef(""),A=i.useRef(!1);e&&(A.current=!0),i.useEffect(()=>{e?(H(!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{F(!0)})})):F(!1)},[e]);const D=i.useCallback(Le=>{Le.target===M.current&&(e?s?.(!0):(H(!1),s?.(!1)))},[e,s]);i.useEffect(()=>(P?(W.current=document.body.style.overflow,document.body.style.overflow="hidden"):document.body.style.overflow=W.current,()=>{document.body.style.overflow=W.current}),[P]),i.useEffect(()=>{if(!P||!h)return;const Le=De=>{De.key==="Escape"&&r?.(De)};return document.addEventListener("keydown",Le),()=>document.removeEventListener("keydown",Le)},[P,h,r]);const T=i.useCallback(Le=>{d&&r?.(Le)},[d,r]);if(!P&&!A.current||!P&&w)return null;const O={position:"fixed",inset:0,zIndex:k,overflow:"auto",display:P?void 0:"none",pointerEvents:P?"auto":"none"},Y={position:"fixed",inset:0,backgroundColor:L?"rgba(0, 0, 0, 0.25)":"rgba(0, 0, 0, 0.45)",opacity:z?1:0,transition:"opacity 0.3s ease",...L?{backdropFilter:"blur(6px)",WebkitBackdropFilter:"blur(6px)"}:{},...$?.mask},X={display:"flex",justifyContent:"center",alignItems:m?"center":"flex-start",minHeight:"100%",padding:m?"1rem":"6rem 1rem 1.5rem"},K={position:"relative",width:g,maxWidth:"calc(100vw - 2rem)",backgroundColor:n.colorBg,color:n.colorText,borderRadius:"0.5rem",boxShadow:n.shadowLg,display:"flex",flexDirection:"column",maxHeight:m?"calc(100vh - 2rem)":void 0,transform:z?"scale(1)":"scale(0.85)",opacity:z?1:0,transition:"transform 0.25s ease, opacity 0.25s ease",...$?.content,...$?.root,...S},G={display:"flex",alignItems:"center",padding:"1rem 1.5rem",borderBottom:`1px solid ${n.colorBorder}`,flexShrink:0,...$?.header},Q={flex:1,padding:"1.5rem",overflowY:"auto",...$?.body},N={display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"0.5rem",padding:"0.75rem 1rem",borderTop:`1px solid ${n.colorBorder}`,flexShrink:0,...$?.footer},le={position:"absolute",top:"0.75rem",right:"0.75rem",display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"0.25rem",border:"none",background:"none",cursor:"pointer",color:n.colorTextSubtle,borderRadius:"0.25rem",transition:"color 0.15s",zIndex:1,...$?.closeBtn},re={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.375rem",padding:"0.375rem 1rem",fontSize:"0.875rem",fontWeight:500,borderRadius:"0.375rem",cursor:"pointer",transition:"filter 0.15s, border-color 0.15s, opacity 0.15s",lineHeight:1.5},{style:q,..._}=v??{},{style:J,...Te}=b??{},ke=()=>t.jsx("button",{type:"button",style:{...re,backgroundColor:n.colorBg,color:n.colorText,border:`1px solid ${n.colorBorder}`,...q},onClick:Le=>r?.(Le),onMouseEnter:Le=>{Le.currentTarget.style.borderColor=n.colorBorderHover},onMouseLeave:Le=>{Le.currentTarget.style.borderColor=n.colorBorder},..._,children:p}),Ie=()=>t.jsxs("button",{type:"button",style:{...re,backgroundColor:n.colorPrimary,color:n.colorPrimaryContrast,border:`1px solid ${n.colorPrimary}`,opacity:j?.7:1,pointerEvents:j?"none":"auto",...J},onClick:Le=>o?.(Le),disabled:j,onMouseEnter:Le=>{j||(Le.currentTarget.style.filter="brightness(1.15)")},onMouseLeave:Le=>{Le.currentTarget.style.filter=""},...Te,children:[j&&t.jsx(ol,{}),x]});let fe=null;a===null?fe=null:a===void 0?fe=t.jsxs(t.Fragment,{children:[t.jsx(ke,{}),t.jsx(Ie,{})]}):typeof a=="function"?fe=a({OkBtn:Ie,CancelBtn:ke}):fe=a;const ze=!w||P;let me=t.jsxs("div",{ref:M,role:"dialog","aria-modal":"true",className:Ye(R,E?.root),style:K,onTransitionEnd:D,children:[u&&t.jsx("button",{type:"button",className:E?.closeBtn,style:le,onClick:Le=>r?.(Le),onMouseEnter:Le=>{Le.currentTarget.style.color=n.colorText},onMouseLeave:Le=>{Le.currentTarget.style.color=n.colorTextSubtle},children:f??t.jsx(rl,{})}),l!=null&&t.jsx("div",{className:E?.header,style:G,children:t.jsx("div",{style:{flex:1,fontSize:"1rem",fontWeight:600,color:n.colorText,minWidth:0,paddingRight:u?"2rem":0},children:l})}),ze&&t.jsx("div",{className:E?.body,style:Q,children:C?t.jsx(cl,{}):c}),fe!=null&&t.jsx("div",{className:E?.footer,style:N,children:fe})]});return B&&(me=B(me)),or.createPortal(t.jsxs("div",{style:O,children:[t.jsx("style",{children:"@keyframes j-modal-spin { to { transform: rotate(360deg); } }"}),I&&t.jsx("div",{className:E?.mask,style:Y,onClick:T}),t.jsx("div",{style:X,onClick:Le=>{Le.target===Le.currentTarget&&d&&r?.(Le)},children:me})]}),document.body)}let dl=0;function Qn(){const e=i.useRef([]),[,r]=i.useState(0),o=i.useCallback(()=>{r(h=>h+1)},[]),s=i.useCallback(h=>{const g=e.current.find(m=>m.key===h);g&&(g.open=!1,g.loading=!1,o())},[o]),l=i.useCallback(h=>{e.current=e.current.filter(g=>g.key!==h),o()},[o]),a=i.useCallback(h=>{const g=e.current.find(x=>x.key===h);if(!g)return;const m=g.config.onOk?.();m&&typeof m.then=="function"?(g.loading=!0,o(),m.then(()=>s(h),()=>{g.loading=!1,o()})):s(h)},[o,s]),c=i.useCallback(h=>{e.current.find(m=>m.key===h)?.config.onCancel?.(),s(h)},[s]),u=i.useCallback((h,g)=>{const m=`j-modal-confirm-${++dl}`,x={key:m,type:h,config:g,open:!0,loading:!1};return e.current=[...e.current,x],o(),{destroy:()=>s(m),update:p=>{const b=e.current.find(v=>v.key===m);b&&(b.config={...b.config,...p},o())}}},[o,s]),f=i.useMemo(()=>({confirm:h=>u("confirm",h),info:h=>u("info",h),success:h=>u("success",h),warning:h=>u("warning",h),error:h=>u("error",h),destroyAll:()=>{e.current.forEach(h=>{h.open=!1,h.loading=!1}),o()}}),[u,o]),d=t.jsx(t.Fragment,{children:e.current.map(h=>{const{type:g,config:m}=h,x=al[g],p=m.icon??ll[g],b=g==="confirm",v=m.bordered!==!1&&g!=="confirm";return t.jsx(qn,{open:h.open,onClose:()=>c(h.key),onOk:()=>a(h.key),confirmLoading:h.loading,closable:m.closable??!1,maskClosable:m.maskClosable??!1,keyboard:m.keyboard??!0,centered:m.centered,width:m.width??"26rem",zIndex:m.zIndex??1e3,okText:m.okText??"OK",cancelText:m.cancelText??"Cancel",okButtonProps:v?{style:{backgroundColor:x,borderColor:x}}:void 0,footer:b?void 0:({OkBtn:j})=>t.jsx(j,{}),afterOpenChange:j=>{j||l(h.key)},styles:{content:v?{border:`1px solid ${x}`}:void 0,body:{padding:"2rem 2rem 1.5rem"},footer:{borderTop:"none"}},className:m.className,style:m.style,children:t.jsxs("div",{style:{display:"flex",gap:"1rem"},children:[t.jsx("span",{style:{color:x,flexShrink:0,marginTop:"0.0625rem"},children:p}),t.jsxs("div",{children:[m.title!=null&&t.jsx("div",{style:{fontWeight:600,fontSize:"1rem",marginBottom:m.content!=null?"0.5rem":0},children:m.title}),m.content!=null&&t.jsx("div",{style:{color:n.colorTextMuted,fontSize:"0.875rem"},children:m.content})]})]})},h.key)})});return[f,d]}function ul({size:e=16}){return t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:t.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})})}function fl({size:e=16}){return t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:t.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})})}function hl({size:e=16}){return t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:t.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})})}function pl({size:e=16}){return t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:t.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"})})}function gl({size:e=16}){return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",children:[t.jsx("circle",{cx:"12",cy:"12",r:"10",strokeOpacity:"0.25"}),t.jsx("path",{d:"M12 2a10 10 0 0 1 10 10",style:{animation:"j-popalert-spin 0.75s linear infinite",transformOrigin:"center"}})]})}function ml(){return t.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}const xl={success:e=>t.jsx(ul,{size:e}),info:e=>t.jsx(fl,{size:e}),warning:e=>t.jsx(hl,{size:e}),error:e=>t.jsx(pl,{size:e}),loading:e=>t.jsx(gl,{size:e})},yl={success:n.colorSuccess,info:n.colorInfo,warning:n.colorWarning,error:n.colorError,loading:n.colorInfo};function bl(e,r){const o=yl[e];return r?{bg:`color-mix(in srgb, ${o} 18%, ${n.colorBg})`,border:`color-mix(in srgb, ${o} 30%, ${n.colorBorder})`,icon:o}:{bg:`color-mix(in srgb, ${o} 15%, white)`,border:`color-mix(in srgb, ${o} 40%, ${n.colorBorder})`,icon:o}}const vl={sm:{fontSize:"0.75rem",padding:"0.375rem 0.625rem",gap:"0.375rem",iconSize:14},md:{fontSize:"0.875rem",padding:"0.5rem 0.875rem",gap:"0.5rem",iconSize:16},lg:{fontSize:"1rem",padding:"0.625rem 1rem",gap:"0.625rem",iconSize:20}};function Cl(e,r){const o={position:"fixed",zIndex:1010,display:"flex",flexDirection:"column",pointerEvents:"none",padding:"0 1rem"};switch(e){case"top":return{...o,top:r,left:0,right:0,alignItems:"center"};case"topLeft":return{...o,top:r,left:0,alignItems:"flex-start"};case"topRight":return{...o,top:r,right:0,alignItems:"flex-end"};case"bottom":return{...o,bottom:r,left:0,right:0,alignItems:"center",flexDirection:"column-reverse"};case"bottomLeft":return{...o,bottom:r,left:0,alignItems:"flex-start",flexDirection:"column-reverse"};case"bottomRight":return{...o,bottom:r,right:0,alignItems:"flex-end",flexDirection:"column-reverse"};case"left":return{...o,top:0,bottom:0,left:r,alignItems:"flex-start",justifyContent:"center"};case"right":return{...o,top:0,bottom:0,right:r,alignItems:"flex-end",justifyContent:"center"}}}function kl(e){switch(e){case"top":case"topLeft":case"topRight":return"translateY(-100%)";case"bottom":case"bottomLeft":case"bottomRight":return"translateY(100%)";case"left":return"translateX(-100%)";case"right":return"translateX(100%)"}}function wl(e){switch(e){case"top":case"topLeft":case"topRight":return"translateY(-50%)";case"bottom":case"bottomLeft":case"bottomRight":return"translateY(50%)";case"left":return"translateX(-50%)";case"right":return"translateX(50%)"}}function jl({instance:e,placement:r,onRequestClose:o,onRemoved:s}){const[l,a]=i.useState("entering"),c=i.useRef(null),u=i.useRef(0),f=i.useRef(Date.now()),d=i.useRef(null),h=i.useRef(null),g=i.useRef(null),x=co()==="dark",p=bl(e.type,x);i.useEffect(()=>{const S=requestAnimationFrame(()=>{requestAnimationFrame(()=>{a("visible")})});return()=>cancelAnimationFrame(S)},[]),i.useEffect(()=>{e.phase==="exiting"&&a("exiting")},[e.phase]),i.useEffect(()=>{e.version!==0&&(u.current=0,f.current=Date.now(),requestAnimationFrame(()=>{g.current&&(g.current.style.animation="none",g.current.offsetHeight,g.current.style.animation="j-popalert-update 0.3s ease"),h.current&&(h.current.style.animation="none",h.current.offsetHeight,h.current.style.animation=`j-popalert-progress ${e.duration}s linear forwards`)}))},[e.version]),i.useEffect(()=>{if(e.duration===0||l!=="visible")return;const S=e.duration*1e3-u.current;if(S<=0){o(e.key);return}return f.current=Date.now(),c.current=setTimeout(()=>{o(e.key)},S),()=>{c.current&&clearTimeout(c.current)}},[l,e.duration,e.key,e.version,o]);const b=i.useCallback(()=>{!e.pauseOnHover||e.duration===0||(u.current+=Date.now()-f.current,c.current&&(clearTimeout(c.current),c.current=null),h.current&&(h.current.style.animationPlayState="paused"))},[e.pauseOnHover,e.duration]),v=i.useCallback(()=>{if(!e.pauseOnHover||e.duration===0||l!=="visible")return;h.current&&(h.current.style.animationPlayState="running");const S=e.duration*1e3-u.current;if(S<=0){o(e.key);return}f.current=Date.now(),c.current=setTimeout(()=>{o(e.key)},S)},[e.pauseOnHover,e.duration,e.key,o,l]),j=i.useCallback(S=>{S.target===d.current&&l==="exiting"&&(e.onClose?.(),s(e.key))},[l,e,s]),C=l==="entering",w=l==="exiting",y=vl[e.size],k={maxHeight:C||w?0:"9.375rem",opacity:C||w?0:1,transform:C?kl(r):w?wl(r):"translate(0, 0)",transition:"max-height 0.3s ease, opacity 0.3s ease, transform 0.3s ease, margin 0.3s ease",overflow:"hidden",borderRadius:"0.5rem",marginBottom:w?0:"0.5rem",pointerEvents:"all"},B=e.showProgress&&!!e.duration&&!w,R={position:"relative",display:"inline-flex",alignItems:"center",gap:y.gap,padding:y.padding,backgroundColor:p.bg,border:`1px solid ${p.border}`,borderRadius:"0.5rem",boxShadow:n.shadowMd,fontSize:y.fontSize,lineHeight:1.5,color:n.colorText,overflow:"hidden",transition:"background-color 0.3s ease, border-color 0.3s ease"};return t.jsx("div",{ref:d,style:k,onTransitionEnd:j,onMouseEnter:b,onMouseLeave:v,children:t.jsxs("div",{ref:g,className:Ye(e.className,e.classNames?.root),style:V(R,e.styles?.root,e.style),children:[t.jsx("span",{className:e.classNames?.icon,style:{display:"inline-flex",alignItems:"center",flexShrink:0,color:p.icon,transition:"color 0.3s ease",...e.styles?.icon},children:e.icon??xl[e.type](y.iconSize)}),t.jsxs("div",{style:{flex:1,minWidth:0},children:[t.jsx("span",{className:e.classNames?.content,style:{display:"block",...e.styles?.content},children:e.content}),e.description!=null&&t.jsx("span",{className:e.classNames?.description,style:{display:"block",color:n.colorTextMuted,fontSize:"0.8125em",marginTop:"0.125rem",...e.styles?.description},children:e.description})]}),e.closable&&t.jsx("button",{type:"button",onClick:()=>o(e.key),style:{display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"0.125rem",border:"none",background:"none",cursor:"pointer",color:n.colorTextSubtle,flexShrink:0,borderRadius:"0.25rem",transition:"color 0.15s",marginLeft:"0.25rem"},onMouseEnter:S=>{S.currentTarget.style.color=n.colorText},onMouseLeave:S=>{S.currentTarget.style.color=n.colorTextSubtle},children:t.jsx(ml,{})}),B&&t.jsx("div",{ref:h,style:{position:"absolute",bottom:0,left:0,right:0,height:2,backgroundColor:p.icon,opacity:.6,borderRadius:0,transformOrigin:"left",animation:`j-popalert-progress ${e.duration}s linear forwards`}})]})})}function Sl({instances:e,placement:r,offset:o,onRequestClose:s,onRemoved:l}){if(typeof document>"u"||e.length===0)return null;const a=Cl(r,o);return or.createPortal(t.jsxs(t.Fragment,{children:[t.jsx("style",{children:`@keyframes j-popalert-spin { to { transform: rotate(360deg); } }
|
|
2
2
|
@keyframes j-popalert-progress { from { transform: scaleX(1); } to { transform: scaleX(0); } }
|
|
3
|
-
@keyframes j-popalert-update { 0% { transform: scale(0.94); opacity: 0.6; } 100% { transform: scale(1); opacity: 1; } }`}),t.jsx("div",{style:a,children:e.map(c=>t.jsx(jl,{instance:c,placement:r,onRequestClose:s,onRemoved:l},c.key))})]}),document.body)}let Ml=0;function Zn(e){const r=i.useRef([]),[,o]=i.useState(0),s=e?.duration??3,l=e?.maxCount??1/0,a=e?.placement??"top",c=e?.offset??"0.5rem",u=e?.size??"md",f=i.useCallback(()=>{o(p=>p+1)},[]),d=i.useCallback(p=>{const b=p.key??`j-popalert-${++Ml}`,v=p.duration??s,j=p.pauseOnHover??!0,C=p.closable??!1,w=p.showProgress??!1,y=p.size??u,k=r.current.find(S=>S.key===b);if(k){k.content=p.content,k.description=p.description,k.type=p.type,k.size=y,k.duration=v,k.icon=p.icon,k.onClose=p.onClose,k.closable=C,k.showProgress=w,k.pauseOnHover=j,k.classNames=p.classNames,k.styles=p.styles,k.className=p.className,k.style=p.style,k.version+=1,f();return}const B=r.current.filter(S=>S.phase!=="exiting");if(B.length>=l){const S=B[0];S&&(S.phase="exiting")}const R={key:b,content:p.content,description:p.description,type:p.type,size:y,duration:v,icon:p.icon,onClose:p.onClose,closable:C,showProgress:w,pauseOnHover:j,classNames:p.classNames,styles:p.styles,className:p.className,style:p.style,phase:"entering",version:0};r.current=[...r.current,R],f()},[s,u,l,f]),h=i.useCallback(p=>{const b=r.current.find(v=>v.key===p);b&&b.phase!=="exiting"&&(b.phase="exiting",f())},[f]),g=i.useCallback(p=>{r.current=r.current.filter(b=>b.key!==p),f()},[f]),m=i.useMemo(()=>({success:(p,b)=>d({content:p,type:"success",duration:b}),error:(p,b)=>d({content:p,type:"error",duration:b}),info:(p,b)=>d({content:p,type:"info",duration:b}),warning:(p,b)=>d({content:p,type:"warning",duration:b}),loading:(p,b)=>d({content:p,type:"loading",duration:b}),open:p=>d(p),destroy:p=>{p?h(p):(r.current.forEach(b=>{b.phase="exiting"}),f())}}),[d,h,f]),x=t.jsx(Sl,{instances:r.current,placement:a,offset:c,onRequestClose:h,onRemoved:g});return[m,x]}const Jn=i.createContext(null);function es(){const e=i.useContext(Jn);if(!e)throw new Error("useApp must be used within an <App> component");return e}function Bl({notification:e,children:r,className:o,style:s}){const[l,a]=Qn(),[c,u]=Zn(e),f=i.useMemo(()=>({modal:l,notification:c}),[l,c]);return t.jsxs(Jn.Provider,{value:f,children:[a,u,t.jsx("div",{className:o,style:s,children:r})]})}const Rl=Object.assign(Bl,{useApp:es}),Vo={locale:"en_US",DatePicker:{placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",dateTimePlaceholder:"Select date and time",rangeStartPlaceholder:"Start date",rangeEndPlaceholder:"End date",rangeStartTimePlaceholder:"Start date time",rangeEndTimePlaceholder:"End date time",today:"Today",now:"Now",ok:"OK"},Pagination:{itemsPerPage:"/ page",jumpTo:"Go to"},Form:{defaultRequiredMessage:"This field is required",defaultPatternMessage:"Does not match the required pattern"}},Tl={locale:"es_ES",DatePicker:{placeholder:"Seleccionar fecha",yearPlaceholder:"Seleccionar año",quarterPlaceholder:"Seleccionar trimestre",monthPlaceholder:"Seleccionar mes",weekPlaceholder:"Seleccionar semana",dateTimePlaceholder:"Seleccionar fecha y hora",rangeStartPlaceholder:"Fecha inicio",rangeEndPlaceholder:"Fecha fin",rangeStartTimePlaceholder:"Fecha y hora inicio",rangeEndTimePlaceholder:"Fecha y hora fin",today:"Hoy",now:"Ahora",ok:"Aceptar"},Pagination:{itemsPerPage:"/ pág.",jumpTo:"Ir a"},Form:{defaultRequiredMessage:"Este campo es obligatorio",defaultPatternMessage:"No coincide con el patrón requerido"}},Ro=i.createContext(null),ts={locale:Vo};function Gt(){return i.useContext(Ro)??ts}function Il({componentSize:e,componentDisabled:r,locale:o,children:s}){const l=i.useContext(Ro),a=i.useMemo(()=>({componentSize:e??l?.componentSize,componentDisabled:r??l?.componentDisabled,locale:o??l?.locale??Vo}),[e,r,o,l]);return t.jsx(Ro.Provider,{value:a,children:s})}const Ll=Object.assign(Il,{useConfig:Gt}),zr={primary:{base:n.colorPrimary,hover:n.colorPrimaryHover,light:n.colorPrimaryLight,dark:n.colorPrimaryDark,contrast:n.colorPrimaryContrast,border:n.colorPrimaryBorder,200:n.colorPrimary200,300:n.colorPrimary300,400:n.colorPrimary400,600:n.colorPrimary600},secondary:{base:n.colorSecondary,hover:n.colorSecondaryHover,light:n.colorSecondaryLight,dark:n.colorSecondaryDark,contrast:n.colorSecondaryContrast,border:n.colorSecondaryBorder,200:n.colorSecondary200,300:n.colorSecondary300,400:n.colorSecondary400,600:n.colorSecondary600},success:{base:n.colorSuccess,hover:n.colorSuccessHover,light:n.colorSuccessLight,dark:n.colorSuccessDark,contrast:n.colorSuccessContrast,border:n.colorSuccessBorder,200:n.colorSuccess200,300:n.colorSuccess300,400:n.colorSuccess400,600:n.colorSuccess600},warning:{base:n.colorWarning,hover:n.colorWarningHover,light:n.colorWarningLight,dark:n.colorWarningDark,contrast:n.colorWarningContrast,border:n.colorWarningBorder,200:n.colorWarning200,300:n.colorWarning300,400:n.colorWarning400,600:n.colorWarning600},error:{base:n.colorError,hover:n.colorErrorHover,light:n.colorErrorLight,dark:n.colorErrorDark,contrast:n.colorErrorContrast,border:n.colorErrorBorder,200:n.colorError200,300:n.colorError300,400:n.colorError400,600:n.colorError600},info:{base:n.colorInfo,hover:n.colorInfoHover,light:n.colorInfoLight,dark:n.colorInfoDark,contrast:n.colorInfoContrast,border:n.colorInfoBorder,200:n.colorInfo200,300:n.colorInfo300,400:n.colorInfo400,600:n.colorInfo600}},El={small:"sm",middle:"md",large:"lg"};function Wr({variant:e="primary",size:r,color:o="primary",loading:s=!1,shadow:l=!1,bordered:a=!1,icon:c,iconPlacement:u="start",clickAnimation:f,hoverAnimation:d,gradient:h,gradientAngle:g=135,gradientCss:m,block:x=!1,disabled:p,children:b,className:v,style:j,classNames:C,styles:w,onMouseEnter:y,onMouseLeave:k,onClick:B,...R}){const{componentSize:S,componentDisabled:
|
|
3
|
+
@keyframes j-popalert-update { 0% { transform: scale(0.94); opacity: 0.6; } 100% { transform: scale(1); opacity: 1; } }`}),t.jsx("div",{style:a,children:e.map(c=>t.jsx(jl,{instance:c,placement:r,onRequestClose:s,onRemoved:l},c.key))})]}),document.body)}let Ml=0;function Zn(e){const r=i.useRef([]),[,o]=i.useState(0),s=e?.duration??3,l=e?.maxCount??1/0,a=e?.placement??"top",c=e?.offset??"0.5rem",u=e?.size??"md",f=i.useCallback(()=>{o(p=>p+1)},[]),d=i.useCallback(p=>{const b=p.key??`j-popalert-${++Ml}`,v=p.duration??s,j=p.pauseOnHover??!0,C=p.closable??!1,w=p.showProgress??!1,y=p.size??u,k=r.current.find(S=>S.key===b);if(k){k.content=p.content,k.description=p.description,k.type=p.type,k.size=y,k.duration=v,k.icon=p.icon,k.onClose=p.onClose,k.closable=C,k.showProgress=w,k.pauseOnHover=j,k.classNames=p.classNames,k.styles=p.styles,k.className=p.className,k.style=p.style,k.version+=1,f();return}const B=r.current.filter(S=>S.phase!=="exiting");if(B.length>=l){const S=B[0];S&&(S.phase="exiting")}const R={key:b,content:p.content,description:p.description,type:p.type,size:y,duration:v,icon:p.icon,onClose:p.onClose,closable:C,showProgress:w,pauseOnHover:j,classNames:p.classNames,styles:p.styles,className:p.className,style:p.style,phase:"entering",version:0};r.current=[...r.current,R],f()},[s,u,l,f]),h=i.useCallback(p=>{const b=r.current.find(v=>v.key===p);b&&b.phase!=="exiting"&&(b.phase="exiting",f())},[f]),g=i.useCallback(p=>{r.current=r.current.filter(b=>b.key!==p),f()},[f]),m=i.useMemo(()=>({success:(p,b)=>d({content:p,type:"success",duration:b}),error:(p,b)=>d({content:p,type:"error",duration:b}),info:(p,b)=>d({content:p,type:"info",duration:b}),warning:(p,b)=>d({content:p,type:"warning",duration:b}),loading:(p,b)=>d({content:p,type:"loading",duration:b}),open:p=>d(p),destroy:p=>{p?h(p):(r.current.forEach(b=>{b.phase="exiting"}),f())}}),[d,h,f]),x=t.jsx(Sl,{instances:r.current,placement:a,offset:c,onRequestClose:h,onRemoved:g});return[m,x]}const Jn=i.createContext(null);function es(){const e=i.useContext(Jn);if(!e)throw new Error("useApp must be used within an <App> component");return e}function Bl({notification:e,children:r,className:o,style:s}){const[l,a]=Qn(),[c,u]=Zn(e),f=i.useMemo(()=>({modal:l,notification:c}),[l,c]);return t.jsxs(Jn.Provider,{value:f,children:[a,u,t.jsx("div",{className:o,style:s,children:r})]})}const Rl=Object.assign(Bl,{useApp:es}),Vo={locale:"en_US",DatePicker:{placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",dateTimePlaceholder:"Select date and time",rangeStartPlaceholder:"Start date",rangeEndPlaceholder:"End date",rangeStartTimePlaceholder:"Start date time",rangeEndTimePlaceholder:"End date time",today:"Today",now:"Now",ok:"OK"},Pagination:{itemsPerPage:"/ page",jumpTo:"Go to"},Form:{defaultRequiredMessage:"This field is required",defaultPatternMessage:"Does not match the required pattern"}},Tl={locale:"es_ES",DatePicker:{placeholder:"Seleccionar fecha",yearPlaceholder:"Seleccionar año",quarterPlaceholder:"Seleccionar trimestre",monthPlaceholder:"Seleccionar mes",weekPlaceholder:"Seleccionar semana",dateTimePlaceholder:"Seleccionar fecha y hora",rangeStartPlaceholder:"Fecha inicio",rangeEndPlaceholder:"Fecha fin",rangeStartTimePlaceholder:"Fecha y hora inicio",rangeEndTimePlaceholder:"Fecha y hora fin",today:"Hoy",now:"Ahora",ok:"Aceptar"},Pagination:{itemsPerPage:"/ pág.",jumpTo:"Ir a"},Form:{defaultRequiredMessage:"Este campo es obligatorio",defaultPatternMessage:"No coincide con el patrón requerido"}},Ro=i.createContext(null),ts={locale:Vo};function Gt(){return i.useContext(Ro)??ts}function Il({componentSize:e,componentDisabled:r,locale:o,children:s}){const l=i.useContext(Ro),a=i.useMemo(()=>({componentSize:e??l?.componentSize,componentDisabled:r??l?.componentDisabled,locale:o??l?.locale??Vo}),[e,r,o,l]);return t.jsx(Ro.Provider,{value:a,children:s})}const Ll=Object.assign(Il,{useConfig:Gt}),zr={primary:{base:n.colorPrimary,hover:n.colorPrimaryHover,light:n.colorPrimaryLight,dark:n.colorPrimaryDark,contrast:n.colorPrimaryContrast,border:n.colorPrimaryBorder,200:n.colorPrimary200,300:n.colorPrimary300,400:n.colorPrimary400,600:n.colorPrimary600},secondary:{base:n.colorSecondary,hover:n.colorSecondaryHover,light:n.colorSecondaryLight,dark:n.colorSecondaryDark,contrast:n.colorSecondaryContrast,border:n.colorSecondaryBorder,200:n.colorSecondary200,300:n.colorSecondary300,400:n.colorSecondary400,600:n.colorSecondary600},success:{base:n.colorSuccess,hover:n.colorSuccessHover,light:n.colorSuccessLight,dark:n.colorSuccessDark,contrast:n.colorSuccessContrast,border:n.colorSuccessBorder,200:n.colorSuccess200,300:n.colorSuccess300,400:n.colorSuccess400,600:n.colorSuccess600},warning:{base:n.colorWarning,hover:n.colorWarningHover,light:n.colorWarningLight,dark:n.colorWarningDark,contrast:n.colorWarningContrast,border:n.colorWarningBorder,200:n.colorWarning200,300:n.colorWarning300,400:n.colorWarning400,600:n.colorWarning600},error:{base:n.colorError,hover:n.colorErrorHover,light:n.colorErrorLight,dark:n.colorErrorDark,contrast:n.colorErrorContrast,border:n.colorErrorBorder,200:n.colorError200,300:n.colorError300,400:n.colorError400,600:n.colorError600},info:{base:n.colorInfo,hover:n.colorInfoHover,light:n.colorInfoLight,dark:n.colorInfoDark,contrast:n.colorInfoContrast,border:n.colorInfoBorder,200:n.colorInfo200,300:n.colorInfo300,400:n.colorInfo400,600:n.colorInfo600}},El={small:"sm",middle:"md",large:"lg"};function Wr({variant:e="primary",size:r,color:o="primary",loading:s=!1,shadow:l=!1,bordered:a=!1,icon:c,iconPlacement:u="start",clickAnimation:f,hoverAnimation:d,gradient:h,gradientAngle:g=135,gradientCss:m,block:x=!1,disabled:p,children:b,className:v,style:j,classNames:C,styles:w,onMouseEnter:y,onMouseLeave:k,onClick:B,...R}){const{componentSize:S,componentDisabled:E}=Gt(),$=r??(S?El[S]:void 0)??"md",I=p??E,L=i.useRef(null),P=I||s,z={position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.5rem",borderRadius:"0.5rem",fontWeight:500,cursor:P?"not-allowed":"pointer",opacity:P?.6:1,transition:"all 0.15s ease",border:"none",outline:"none",fontFamily:"inherit",overflow:"hidden",boxShadow:(()=>{if(l){if(l===!0||l==="md")return n.shadowMd;if(l==="sm")return n.shadowSm;if(l==="lg")return n.shadowLg}})()},F={sm:{minHeight:"2rem",padding:"0.25rem 0.75rem",fontSize:"0.8125rem"},md:{minHeight:"2.5rem",padding:"0.5rem 1rem",fontSize:"0.875rem"},lg:{minHeight:"3rem",padding:"0.75rem 1.5rem",fontSize:"1rem"}},M=zr[o],W={primary:{backgroundColor:M.base,color:M.contrast},secondary:{backgroundColor:M.light,color:M.dark},outline:{backgroundColor:"transparent",color:M.base,border:`1px solid ${M.base}`},dashed:{backgroundColor:"transparent",color:M.base,border:`1px dashed ${M.base}`},ghost:{backgroundColor:"transparent",color:M.base},link:{backgroundColor:"transparent",color:M.base,padding:0}},A={primary:{backgroundColor:M.hover},secondary:{backgroundColor:M[200]},outline:{backgroundColor:M.light},dashed:{backgroundColor:M.light},ghost:{backgroundColor:M.light},link:{color:M.hover}},D=a&&e!=="outline"?{border:`1px solid ${M.border}`}:{},T=!!(h||m),O=!!(j?.backgroundColor||w?.root?.backgroundColor),X=(()=>{if(m)return{background:m,backgroundColor:"transparent",color:"#ffffff"};if(h){const re=zr[h];return{background:`linear-gradient(${g}deg, ${re[400]}, ${re[600]})`,backgroundColor:"transparent",color:"#ffffff"}}return null})(),K=V({...z,...F[$],...W[e],...D,...X,...x&&{width:"100%"}},w?.root,j),G=(re,q)=>{if(!L.current)return;const _=L.current,J=_.getBoundingClientRect(),Te=q.clientX-J.left,ke=q.clientY-J.top;switch(re){case"ripple":$l(_,Te,ke);break;case"pulse":Pl(_,o);break;case"shake":Dl(_);break;case"firecracker":Wl(_,o);break;case"confetti":zl(_,Te,ke,o);break}},Q=re=>{P||(T||O?re.currentTarget.style.filter="brightness(1.15)":Object.assign(re.currentTarget.style,A[e]),d&&G(d,re)),y?.(re)},N=re=>{T||O?re.currentTarget.style.filter="":Object.assign(re.currentTarget.style,W[e]),k?.(re)},le=re=>{P||(f&&G(f,re),B?.(re))};return t.jsxs(t.Fragment,{children:[t.jsx("style",{children:`
|
|
4
4
|
@keyframes j-spin { to { transform: rotate(360deg); } }
|
|
5
5
|
@keyframes j-ripple { to { transform: scale(4); opacity: 0; } }
|
|
6
6
|
@keyframes j-pulse-wave {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
0% { transform: translate(0, 0) scale(1); opacity: 1; }
|
|
17
17
|
100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
|
|
18
18
|
}
|
|
19
|
-
`}),t.jsxs("button",{ref:
|
|
19
|
+
`}),t.jsxs("button",{ref:L,disabled:P,style:K,className:Ye(v,C?.root),onMouseEnter:Q,onMouseLeave:N,onClick:le,...R,children:[s&&t.jsx("span",{className:C?.spinner,style:w?.spinner,children:t.jsx(Hl,{})}),!s&&c&&u==="start"&&t.jsx("span",{style:{display:"inline-flex",fontSize:"1.1em",...w?.icon},className:C?.icon,children:c}),C?.content||w?.content?t.jsx("span",{className:C?.content,style:w?.content,children:b}):b,!s&&c&&u==="end"&&t.jsx("span",{style:{display:"inline-flex",fontSize:"1.1em",...w?.icon},className:C?.icon,children:c})]})]})}function $l(e,r,o){const s=document.createElement("span");s.style.cssText=`
|
|
20
20
|
position: absolute;
|
|
21
21
|
border-radius: 50%;
|
|
22
22
|
background: currentColor;
|
|
@@ -95,37 +95,37 @@
|
|
|
95
95
|
--ty: ${j}px;
|
|
96
96
|
animation: j-particle 0.6s ease-out ${w}s forwards;
|
|
97
97
|
pointer-events: none;
|
|
98
|
-
`,c.appendChild(f)}document.body.appendChild(c),setTimeout(()=>c.remove(),700)}function Hl(){return t.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",style:{animation:"j-spin 1s linear infinite"},children:t.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"12"})})}const Fl={pink:"#eb2f96",magenta:"#eb2f96",red:"#f5222d",volcano:"#fa541c",orange:"#fa8c16",gold:"#faad14",yellow:"#fadb14",lime:"#a0d911",green:"#52c41a",cyan:"#13c2c2",blue:"#1677ff",geekblue:"#2f54eb",purple:"#722ed1"};function Al(e){if(e)return Fl[e]??e}const Yt=8;function mo(e,r){const o=e.left+e.width/2,s=e.top+e.height/2;switch(r){case"top":return{top:e.top-Yt,left:o};case"topLeft":return{top:e.top-Yt,left:e.left};case"topRight":return{top:e.top-Yt,left:e.right};case"bottom":return{top:e.bottom+Yt,left:o};case"bottomLeft":return{top:e.bottom+Yt,left:e.left};case"bottomRight":return{top:e.bottom+Yt,left:e.right};case"left":return{top:s,left:e.left-Yt};case"leftTop":return{top:e.top,left:e.left-Yt};case"leftBottom":return{top:e.bottom,left:e.left-Yt};case"right":return{top:s,left:e.right+Yt};case"rightTop":return{top:e.top,left:e.right+Yt};case"rightBottom":return{top:e.bottom,left:e.right+Yt}}}function Ol(e,r){const o=r?0:6;switch(e){case"top":return`translateX(-50%) translateY(-100%) translateY(${o}px)`;case"topLeft":return`translateY(-100%) translateY(${o}px)`;case"topRight":return`translateX(-100%) translateY(-100%) translateY(${o}px)`;case"bottom":return`translateX(-50%) translateY(${-o}px)`;case"bottomLeft":return`translateY(${-o}px)`;case"bottomRight":return`translateX(-100%) translateY(${-o}px)`;case"left":return`translateX(-100%) translateY(-50%) translateX(${o}px)`;case"leftTop":return`translateX(-100%) translateX(${o}px)`;case"leftBottom":return`translateX(-100%) translateY(-100%) translateX(${o}px)`;case"right":return`translateY(-50%) translateX(${-o}px)`;case"rightTop":return`translateX(${-o}px)`;case"rightBottom":return`translateY(-100%) translateX(${-o}px)`}}function Nl(e){switch(e){case"topLeft":case"topRight":return"top";case"bottomLeft":case"bottomRight":return"bottom";case"leftTop":case"leftBottom":return"left";case"rightTop":case"rightBottom":return"right";default:return e}}function Vl(e,r,o,s){const l={position:"absolute",width:"0.5rem",height:"0.5rem",backgroundColor:r},a=o!=="transparent"?`1px solid ${o}`:"none";switch(s?Nl(e):e){case"top":return{...l,bottom:"-0.25rem",left:"50%",transform:"translateX(-50%) rotate(45deg)",borderRight:a,borderBottom:a};case"topLeft":return{...l,bottom:"-0.25rem",left:"1rem",transform:"rotate(45deg)",borderRight:a,borderBottom:a};case"topRight":return{...l,bottom:"-0.25rem",right:"1rem",transform:"rotate(45deg)",borderRight:a,borderBottom:a};case"bottom":return{...l,top:"-0.25rem",left:"50%",transform:"translateX(-50%) rotate(-135deg)",borderRight:a,borderBottom:a};case"bottomLeft":return{...l,top:"-0.25rem",left:"1rem",transform:"rotate(-135deg)",borderRight:a,borderBottom:a};case"bottomRight":return{...l,top:"-0.25rem",right:"1rem",transform:"rotate(-135deg)",borderRight:a,borderBottom:a};case"left":return{...l,right:"-0.25rem",top:"50%",transform:"translateY(-50%) rotate(-45deg)",borderRight:a,borderBottom:a};case"leftTop":return{...l,right:"-0.25rem",top:"0.75rem",transform:"rotate(-45deg)",borderRight:a,borderBottom:a};case"leftBottom":return{...l,right:"-0.25rem",bottom:"0.75rem",transform:"rotate(-45deg)",borderRight:a,borderBottom:a};case"right":return{...l,left:"-0.25rem",top:"50%",transform:"translateY(-50%) rotate(135deg)",borderRight:a,borderBottom:a};case"rightTop":return{...l,left:"-0.25rem",top:"0.75rem",transform:"rotate(135deg)",borderRight:a,borderBottom:a};case"rightBottom":return{...l,left:"-0.25rem",bottom:"0.75rem",transform:"rotate(135deg)",borderRight:a,borderBottom:a}}}function Yl(e){return e==="top"?"bottom":e==="topLeft"?"bottomLeft":e==="topRight"?"bottomRight":e==="bottom"?"top":e==="bottomLeft"?"topLeft":e==="bottomRight"?"topRight":e==="left"?"right":e==="leftTop"?"rightTop":e==="leftBottom"?"rightBottom":e==="right"?"left":e==="rightTop"?"leftTop":e==="rightBottom"?"leftBottom":e}function Wt({content:e,children:r,placement:o,position:s,arrow:l=!0,color:a,autoAdjustOverflow:c=!0,delay:u=200,disabled:f=!1,className:d,style:h,classNames:g,styles:m}){const x=o??s??"top",[p,b]=i.useState(!1),[v,j]=i.useState(!1),[C,w]=i.useState({top:0,left:0}),[y,k]=i.useState(x),B=i.useRef(null),R=i.useRef(null),S=i.useRef(null),L=i.useRef(null),$=i.useRef(!1),I=i.useRef(!0),P=i.useRef(p);P.current=p,i.useEffect(()=>{k(x)},[x]);const E=i.useCallback(()=>{if(!S.current)return;const Q=S.current.getBoundingClientRect();w(mo(Q,y))},[y]),H=i.useCallback(()=>{if(!f){if(R.current&&(clearTimeout(R.current),R.current=null),B.current&&clearTimeout(B.current),P.current){j(!0);return}$.current=!1,I.current=!0,B.current=window.setTimeout(()=>{k(x),S.current&&w(mo(S.current.getBoundingClientRect(),x)),b(!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{I.current=!1,j(!0)})})},u)}},[f,u,x]),z=i.useCallback(()=>{B.current&&(clearTimeout(B.current),B.current=null),j(!1),R.current=window.setTimeout(()=>b(!1),150)},[]);i.useEffect(()=>()=>{B.current&&clearTimeout(B.current),R.current&&clearTimeout(R.current)},[]),i.useEffect(()=>{if(!p)return;const Q=()=>E();return window.addEventListener("scroll",Q,!0),window.addEventListener("resize",Q),()=>{window.removeEventListener("scroll",Q,!0),window.removeEventListener("resize",Q)}},[p,E]),i.useLayoutEffect(()=>{if(!c||!p||$.current||!L.current||!S.current)return;$.current=!0;const Q=L.current.getBoundingClientRect(),N=S.current.getBoundingClientRect(),le=y.startsWith("top"),oe=y.startsWith("bottom"),q=y.startsWith("left"),K=y.startsWith("right");let re=!1;if(le&&Q.top<0?window.innerHeight-N.bottom>N.top&&(re=!0):oe&&Q.bottom>window.innerHeight?N.top>window.innerHeight-N.bottom&&(re=!0):q&&Q.left<0?window.innerWidth-N.right>N.left&&(re=!0):K&&Q.right>window.innerWidth&&N.left>window.innerWidth-N.right&&(re=!0),re){const Te=Yl(y);k(Te),w(mo(N,Te))}});const A=Al(a),M=!!A,W=M?A:n.colorBgMuted,F=M?"#fff":n.colorText,D=M?"transparent":n.colorBorder,T=l!==!1,O=typeof l=="object"&&l.pointAtCenter,Y={position:"fixed",zIndex:9999,top:C.top,left:C.left,padding:"0.5rem 0.75rem",borderRadius:"0.375rem",backgroundColor:W,color:F,fontSize:"0.8125rem",fontWeight:500,whiteSpace:"nowrap",boxShadow:n.shadowMd,border:M?"none":`1px solid ${D}`,opacity:v?1:0,transform:Ol(y,v),transition:I.current?"none":"opacity 0.15s ease-out, transform 0.15s ease-out",pointerEvents:"none",...m?.popup},X={...Vl(y,W,D,O),...m?.arrow},_=V({display:"inline-flex"},m?.root,h),G=p&&typeof document<"u"?or.createPortal(t.jsxs("div",{ref:L,style:Y,className:g?.popup,role:"tooltip",children:[e,T&&t.jsx("div",{style:X,className:g?.arrow})]}),document.body):null;return t.jsxs("div",{ref:S,style:_,className:Ve(d,g?.root),onMouseEnter:H,onMouseLeave:z,onFocus:H,onBlur:z,children:[r,G]})}const Kt=8;function xo(e,r){const o=e.left+e.width/2,s=e.top+e.height/2;switch(r){case"top":return{top:e.top-Kt,left:o};case"topLeft":return{top:e.top-Kt,left:e.left};case"topRight":return{top:e.top-Kt,left:e.right};case"bottom":return{top:e.bottom+Kt,left:o};case"bottomLeft":return{top:e.bottom+Kt,left:e.left};case"bottomRight":return{top:e.bottom+Kt,left:e.right};case"left":return{top:s,left:e.left-Kt};case"leftTop":return{top:e.top,left:e.left-Kt};case"leftBottom":return{top:e.bottom,left:e.left-Kt};case"right":return{top:s,left:e.right+Kt};case"rightTop":return{top:e.top,left:e.right+Kt};case"rightBottom":return{top:e.bottom,left:e.right+Kt}}}function Kl(e,r){const o=r?0:6;switch(e){case"top":return`translateX(-50%) translateY(-100%) translateY(${o}px)`;case"topLeft":return`translateY(-100%) translateY(${o}px)`;case"topRight":return`translateX(-100%) translateY(-100%) translateY(${o}px)`;case"bottom":return`translateX(-50%) translateY(${-o}px)`;case"bottomLeft":return`translateY(${-o}px)`;case"bottomRight":return`translateX(-100%) translateY(${-o}px)`;case"left":return`translateX(-100%) translateY(-50%) translateX(${o}px)`;case"leftTop":return`translateX(-100%) translateX(${o}px)`;case"leftBottom":return`translateX(-100%) translateY(-100%) translateX(${o}px)`;case"right":return`translateY(-50%) translateX(${-o}px)`;case"rightTop":return`translateX(${-o}px)`;case"rightBottom":return`translateY(-100%) translateX(${-o}px)`}}function _l(e){const r={position:"absolute",width:"0.5rem",height:"0.5rem",backgroundColor:n.colorBg},o=`1px solid ${n.colorBorder}`;switch(e){case"top":return{...r,bottom:"-0.25rem",left:"50%",transform:"translateX(-50%) rotate(45deg)",borderRight:o,borderBottom:o};case"topLeft":return{...r,bottom:"-0.25rem",left:"1rem",transform:"rotate(45deg)",borderRight:o,borderBottom:o};case"topRight":return{...r,bottom:"-0.25rem",right:"1rem",transform:"rotate(45deg)",borderRight:o,borderBottom:o};case"bottom":return{...r,top:"-0.25rem",left:"50%",transform:"translateX(-50%) rotate(-135deg)",borderRight:o,borderBottom:o};case"bottomLeft":return{...r,top:"-0.25rem",left:"1rem",transform:"rotate(-135deg)",borderRight:o,borderBottom:o};case"bottomRight":return{...r,top:"-0.25rem",right:"1rem",transform:"rotate(-135deg)",borderRight:o,borderBottom:o};case"left":return{...r,right:"-0.25rem",top:"50%",transform:"translateY(-50%) rotate(-45deg)",borderRight:o,borderBottom:o};case"leftTop":return{...r,right:"-0.25rem",top:"0.75rem",transform:"rotate(-45deg)",borderRight:o,borderBottom:o};case"leftBottom":return{...r,right:"-0.25rem",bottom:"0.75rem",transform:"rotate(-45deg)",borderRight:o,borderBottom:o};case"right":return{...r,left:"-0.25rem",top:"50%",transform:"translateY(-50%) rotate(135deg)",borderRight:o,borderBottom:o};case"rightTop":return{...r,left:"-0.25rem",top:"0.75rem",transform:"rotate(135deg)",borderRight:o,borderBottom:o};case"rightBottom":return{...r,left:"-0.25rem",bottom:"0.75rem",transform:"rotate(135deg)",borderRight:o,borderBottom:o}}}function Xl(e){return e==="top"?"bottom":e==="topLeft"?"bottomLeft":e==="topRight"?"bottomRight":e==="bottom"?"top":e==="bottomLeft"?"topLeft":e==="bottomRight"?"topRight":e==="left"?"right":e==="leftTop"?"rightTop":e==="leftBottom"?"rightBottom":e==="right"?"left":e==="rightTop"?"leftTop":e==="rightBottom"?"leftBottom":e}function rs({title:e,content:r,children:o,placement:s="top",trigger:l="hover",open:a,onOpenChange:c,arrow:u=!0,mouseEnterDelay:f=100,mouseLeaveDelay:d=100,disabled:h=!1,className:g,style:m,classNames:x,styles:p}){const[b,v]=i.useState(!1),[j,C]=i.useState(!1),[w,y]=i.useState(!1),[k,B]=i.useState({top:0,left:0}),[R,S]=i.useState(s),L=i.useRef(null),$=i.useRef(null),I=i.useRef(null),P=i.useRef(null),E=i.useRef(null),H=i.useRef(null),z=i.useRef(!1),A=i.useRef(!0),M=a!==void 0,W=M?a:b,F=i.useRef(W);F.current=W;const D=i.useRef(W);D.current!==W&&(D.current=W,!W&&j&&!w&&y(!0),W&&w&&y(!1));const T=Array.isArray(l)?l:[l];i.useEffect(()=>{S(s)},[s]);const O=i.useCallback(Re=>{h||Re===F.current||(M||v(Re),c?.(Re))},[h,M,c]),Y=i.useCallback(()=>{if(!E.current)return;const Re=E.current.getBoundingClientRect();B(xo(Re,R))},[R]),X=i.useCallback(()=>{if($.current&&(clearTimeout($.current),$.current=null),I.current&&(clearTimeout(I.current),I.current=null),L.current&&clearTimeout(L.current),F.current){C(!0);return}z.current=!1,A.current=!0;const Re=T.includes("hover")?f:0;L.current=window.setTimeout(()=>{S(s),E.current&&B(xo(E.current.getBoundingClientRect(),s)),O(!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{A.current=!1,C(!0)})})},Re)},[f,T,s,O]),_=i.useCallback(()=>{L.current&&(clearTimeout(L.current),L.current=null),$.current&&clearTimeout($.current);const Re=T.includes("hover")?d:0;$.current=window.setTimeout(()=>{C(!1),I.current=window.setTimeout(()=>O(!1),150)},Re)},[d,T,O]),G=i.useCallback(()=>{W?_():X()},[W,X,_]);i.useEffect(()=>{if(w)return C(!1),P.current=window.setTimeout(()=>{y(!1),P.current=null},150),()=>{P.current&&(clearTimeout(P.current),P.current=null)}},[w]),i.useEffect(()=>()=>{L.current&&clearTimeout(L.current),$.current&&clearTimeout($.current),I.current&&clearTimeout(I.current),P.current&&clearTimeout(P.current)},[]),i.useEffect(()=>{if(!W)return;const Re=()=>Y();return window.addEventListener("scroll",Re,!0),window.addEventListener("resize",Re),()=>{window.removeEventListener("scroll",Re,!0),window.removeEventListener("resize",Re)}},[W,Y]),i.useLayoutEffect(()=>{if(!W||z.current||!H.current||!E.current)return;z.current=!0;const Re=H.current.getBoundingClientRect(),ke=E.current.getBoundingClientRect(),ee=R.startsWith("top"),ae=R.startsWith("bottom"),se=R.startsWith("left"),we=R.startsWith("right");let ie=!1;if(ee&&Re.top<0?window.innerHeight-ke.bottom>ke.top&&(ie=!0):ae&&Re.bottom>window.innerHeight?ke.top>window.innerHeight-ke.bottom&&(ie=!0):se&&Re.left<0?window.innerWidth-ke.right>ke.left&&(ie=!0):we&&Re.right>window.innerWidth&&ke.left>window.innerWidth-ke.right&&(ie=!0),ie){const ce=Xl(R);S(ce),B(xo(ke,ce))}}),i.useEffect(()=>{if(!W||!T.includes("click"))return;const Re=ke=>{const ee=ke.target;E.current&&!E.current.contains(ee)&&H.current&&!H.current.contains(ee)&&_()};return document.addEventListener("mousedown",Re),()=>document.removeEventListener("mousedown",Re)},[W,T,_]);const Q=i.useCallback(()=>{T.includes("hover")&&X()},[T,X]),N=i.useCallback(()=>{T.includes("hover")&&_()},[T,_]),le=i.useCallback(()=>{T.includes("click")&&G()},[T,G]),oe=i.useCallback(()=>{T.includes("focus")&&X()},[T,X]),q=i.useCallback(()=>{T.includes("focus")&&_()},[T,_]),K=i.useCallback(Re=>{T.includes("contextMenu")&&(Re.preventDefault(),G())},[T,G]),re=i.useCallback(Re=>{Re.stopPropagation(),T.includes("hover")&&$.current&&(clearTimeout($.current),$.current=null)},[T]),Te=i.useCallback(Re=>{Re.stopPropagation(),T.includes("hover")&&_()},[T,_]),Ce=typeof e=="function"?e():e,Le=typeof r=="function"?r():r,ue=V({display:"inline-flex"},p?.root,m),ze={position:"fixed",zIndex:9999,top:k.top,left:k.left,opacity:j?1:0,transform:Kl(R,j),transition:A.current?"none":"opacity 0.15s ease-out, transform 0.15s ease-out",pointerEvents:j?"auto":"none"},xe={backgroundColor:n.colorBg,border:`1px solid ${n.colorBorder}`,borderRadius:"0.5rem",boxShadow:n.shadowLg,minWidth:"12rem",maxWidth:"20rem",...p?.popup},ge={padding:"0.5rem 0.75rem",fontWeight:600,fontSize:"0.875rem",color:n.colorText,borderBottom:Le?`1px solid ${n.colorBorder}`:void 0,...p?.title},Ie={padding:"0.5rem 0.75rem",fontSize:"0.875rem",color:n.colorText,...p?.content},De={..._l(R),...p?.arrow},Ae=(W||w)&&typeof document<"u"?or.createPortal(t.jsxs("div",{ref:H,style:ze,onMouseEnter:re,onMouseLeave:Te,children:[t.jsxs("div",{style:xe,className:x?.popup,children:[Ce!=null&&t.jsx("div",{style:ge,className:x?.title,children:Ce}),Le!=null&&t.jsx("div",{style:Ie,className:x?.content,children:Le})]}),u&&t.jsx("div",{style:De,className:x?.arrow})]}),document.body):null;return t.jsxs("div",{ref:E,style:ue,className:Ve(g,x?.root),onMouseEnter:Q,onMouseLeave:N,onClick:le,onFocus:oe,onBlur:q,onContextMenu:K,children:[o,Ae]})}const ln={success:n.colorSuccess,processing:n.colorPrimary,default:n.colorBorder,error:n.colorError,warning:n.colorWarning},Gl={pink:"#eb2f96",magenta:"#eb2f96",red:"#f5222d",volcano:"#fa541c",orange:"#fa8c16",gold:"#faad14",yellow:"#fadb14",lime:"#a0d911",green:"#52c41a",cyan:"#13c2c2",blue:"#1677ff",geekblue:"#2f54eb",purple:"#722ed1"};function To(e){return Gl[e]??e}const Ul=`
|
|
98
|
+
`,c.appendChild(f)}document.body.appendChild(c),setTimeout(()=>c.remove(),700)}function Hl(){return t.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",style:{animation:"j-spin 1s linear infinite"},children:t.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"12"})})}const Fl={pink:"#eb2f96",magenta:"#eb2f96",red:"#f5222d",volcano:"#fa541c",orange:"#fa8c16",gold:"#faad14",yellow:"#fadb14",lime:"#a0d911",green:"#52c41a",cyan:"#13c2c2",blue:"#1677ff",geekblue:"#2f54eb",purple:"#722ed1"};function Al(e){if(e)return Fl[e]??e}const Yt=8;function mo(e,r){const o=e.left+e.width/2,s=e.top+e.height/2;switch(r){case"top":return{top:e.top-Yt,left:o};case"topLeft":return{top:e.top-Yt,left:e.left};case"topRight":return{top:e.top-Yt,left:e.right};case"bottom":return{top:e.bottom+Yt,left:o};case"bottomLeft":return{top:e.bottom+Yt,left:e.left};case"bottomRight":return{top:e.bottom+Yt,left:e.right};case"left":return{top:s,left:e.left-Yt};case"leftTop":return{top:e.top,left:e.left-Yt};case"leftBottom":return{top:e.bottom,left:e.left-Yt};case"right":return{top:s,left:e.right+Yt};case"rightTop":return{top:e.top,left:e.right+Yt};case"rightBottom":return{top:e.bottom,left:e.right+Yt}}}function Ol(e,r){const o=r?0:6;switch(e){case"top":return`translateX(-50%) translateY(-100%) translateY(${o}px)`;case"topLeft":return`translateY(-100%) translateY(${o}px)`;case"topRight":return`translateX(-100%) translateY(-100%) translateY(${o}px)`;case"bottom":return`translateX(-50%) translateY(${-o}px)`;case"bottomLeft":return`translateY(${-o}px)`;case"bottomRight":return`translateX(-100%) translateY(${-o}px)`;case"left":return`translateX(-100%) translateY(-50%) translateX(${o}px)`;case"leftTop":return`translateX(-100%) translateX(${o}px)`;case"leftBottom":return`translateX(-100%) translateY(-100%) translateX(${o}px)`;case"right":return`translateY(-50%) translateX(${-o}px)`;case"rightTop":return`translateX(${-o}px)`;case"rightBottom":return`translateY(-100%) translateX(${-o}px)`}}function Nl(e){switch(e){case"topLeft":case"topRight":return"top";case"bottomLeft":case"bottomRight":return"bottom";case"leftTop":case"leftBottom":return"left";case"rightTop":case"rightBottom":return"right";default:return e}}function Vl(e,r,o,s){const l={position:"absolute",width:"0.5rem",height:"0.5rem",backgroundColor:r},a=o!=="transparent"?`1px solid ${o}`:"none";switch(s?Nl(e):e){case"top":return{...l,bottom:"-0.25rem",left:"50%",transform:"translateX(-50%) rotate(45deg)",borderRight:a,borderBottom:a};case"topLeft":return{...l,bottom:"-0.25rem",left:"1rem",transform:"rotate(45deg)",borderRight:a,borderBottom:a};case"topRight":return{...l,bottom:"-0.25rem",right:"1rem",transform:"rotate(45deg)",borderRight:a,borderBottom:a};case"bottom":return{...l,top:"-0.25rem",left:"50%",transform:"translateX(-50%) rotate(-135deg)",borderRight:a,borderBottom:a};case"bottomLeft":return{...l,top:"-0.25rem",left:"1rem",transform:"rotate(-135deg)",borderRight:a,borderBottom:a};case"bottomRight":return{...l,top:"-0.25rem",right:"1rem",transform:"rotate(-135deg)",borderRight:a,borderBottom:a};case"left":return{...l,right:"-0.25rem",top:"50%",transform:"translateY(-50%) rotate(-45deg)",borderRight:a,borderBottom:a};case"leftTop":return{...l,right:"-0.25rem",top:"0.75rem",transform:"rotate(-45deg)",borderRight:a,borderBottom:a};case"leftBottom":return{...l,right:"-0.25rem",bottom:"0.75rem",transform:"rotate(-45deg)",borderRight:a,borderBottom:a};case"right":return{...l,left:"-0.25rem",top:"50%",transform:"translateY(-50%) rotate(135deg)",borderRight:a,borderBottom:a};case"rightTop":return{...l,left:"-0.25rem",top:"0.75rem",transform:"rotate(135deg)",borderRight:a,borderBottom:a};case"rightBottom":return{...l,left:"-0.25rem",bottom:"0.75rem",transform:"rotate(135deg)",borderRight:a,borderBottom:a}}}function Yl(e){return e==="top"?"bottom":e==="topLeft"?"bottomLeft":e==="topRight"?"bottomRight":e==="bottom"?"top":e==="bottomLeft"?"topLeft":e==="bottomRight"?"topRight":e==="left"?"right":e==="leftTop"?"rightTop":e==="leftBottom"?"rightBottom":e==="right"?"left":e==="rightTop"?"leftTop":e==="rightBottom"?"leftBottom":e}function Wt({content:e,children:r,placement:o,position:s,arrow:l=!0,color:a,autoAdjustOverflow:c=!0,delay:u=200,disabled:f=!1,className:d,style:h,classNames:g,styles:m}){const x=o??s??"top",[p,b]=i.useState(!1),[v,j]=i.useState(!1),[C,w]=i.useState({top:0,left:0}),[y,k]=i.useState(x),B=i.useRef(null),R=i.useRef(null),S=i.useRef(null),E=i.useRef(null),$=i.useRef(!1),I=i.useRef(!0),L=i.useRef(p);L.current=p,i.useEffect(()=>{k(x)},[x]);const P=i.useCallback(()=>{if(!S.current)return;const Q=S.current.getBoundingClientRect();w(mo(Q,y))},[y]),H=i.useCallback(()=>{if(!f){if(R.current&&(clearTimeout(R.current),R.current=null),B.current&&clearTimeout(B.current),L.current){j(!0);return}$.current=!1,I.current=!0,B.current=window.setTimeout(()=>{k(x),S.current&&w(mo(S.current.getBoundingClientRect(),x)),b(!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{I.current=!1,j(!0)})})},u)}},[f,u,x]),z=i.useCallback(()=>{B.current&&(clearTimeout(B.current),B.current=null),j(!1),R.current=window.setTimeout(()=>b(!1),150)},[]);i.useEffect(()=>()=>{B.current&&clearTimeout(B.current),R.current&&clearTimeout(R.current)},[]),i.useEffect(()=>{if(!p)return;const Q=()=>P();return window.addEventListener("scroll",Q,!0),window.addEventListener("resize",Q),()=>{window.removeEventListener("scroll",Q,!0),window.removeEventListener("resize",Q)}},[p,P]),i.useLayoutEffect(()=>{if(!c||!p||$.current||!E.current||!S.current)return;$.current=!0;const Q=E.current.getBoundingClientRect(),N=S.current.getBoundingClientRect(),le=y.startsWith("top"),re=y.startsWith("bottom"),q=y.startsWith("left"),_=y.startsWith("right");let J=!1;if(le&&Q.top<0?window.innerHeight-N.bottom>N.top&&(J=!0):re&&Q.bottom>window.innerHeight?N.top>window.innerHeight-N.bottom&&(J=!0):q&&Q.left<0?window.innerWidth-N.right>N.left&&(J=!0):_&&Q.right>window.innerWidth&&N.left>window.innerWidth-N.right&&(J=!0),J){const Te=Yl(y);k(Te),w(mo(N,Te))}});const F=Al(a),M=!!F,W=M?F:n.colorBgMuted,A=M?"#fff":n.colorText,D=M?"transparent":n.colorBorder,T=l!==!1,O=typeof l=="object"&&l.pointAtCenter,Y={position:"fixed",zIndex:9999,top:C.top,left:C.left,padding:"0.5rem 0.75rem",borderRadius:"0.375rem",backgroundColor:W,color:A,fontSize:"0.8125rem",fontWeight:500,whiteSpace:"nowrap",boxShadow:n.shadowMd,border:M?"none":`1px solid ${D}`,opacity:v?1:0,transform:Ol(y,v),transition:I.current?"none":"opacity 0.15s ease-out, transform 0.15s ease-out",pointerEvents:"none",...m?.popup},X={...Vl(y,W,D,O),...m?.arrow},K=V({display:"inline-flex"},m?.root,h),G=p&&typeof document<"u"?or.createPortal(t.jsxs("div",{ref:E,style:Y,className:g?.popup,role:"tooltip",children:[e,T&&t.jsx("div",{style:X,className:g?.arrow})]}),document.body):null;return t.jsxs("div",{ref:S,style:K,className:Ye(d,g?.root),onMouseEnter:H,onMouseLeave:z,onFocus:H,onBlur:z,children:[r,G]})}const Kt=8;function xo(e,r){const o=e.left+e.width/2,s=e.top+e.height/2;switch(r){case"top":return{top:e.top-Kt,left:o};case"topLeft":return{top:e.top-Kt,left:e.left};case"topRight":return{top:e.top-Kt,left:e.right};case"bottom":return{top:e.bottom+Kt,left:o};case"bottomLeft":return{top:e.bottom+Kt,left:e.left};case"bottomRight":return{top:e.bottom+Kt,left:e.right};case"left":return{top:s,left:e.left-Kt};case"leftTop":return{top:e.top,left:e.left-Kt};case"leftBottom":return{top:e.bottom,left:e.left-Kt};case"right":return{top:s,left:e.right+Kt};case"rightTop":return{top:e.top,left:e.right+Kt};case"rightBottom":return{top:e.bottom,left:e.right+Kt}}}function Kl(e,r){const o=r?0:6;switch(e){case"top":return`translateX(-50%) translateY(-100%) translateY(${o}px)`;case"topLeft":return`translateY(-100%) translateY(${o}px)`;case"topRight":return`translateX(-100%) translateY(-100%) translateY(${o}px)`;case"bottom":return`translateX(-50%) translateY(${-o}px)`;case"bottomLeft":return`translateY(${-o}px)`;case"bottomRight":return`translateX(-100%) translateY(${-o}px)`;case"left":return`translateX(-100%) translateY(-50%) translateX(${o}px)`;case"leftTop":return`translateX(-100%) translateX(${o}px)`;case"leftBottom":return`translateX(-100%) translateY(-100%) translateX(${o}px)`;case"right":return`translateY(-50%) translateX(${-o}px)`;case"rightTop":return`translateX(${-o}px)`;case"rightBottom":return`translateY(-100%) translateX(${-o}px)`}}function _l(e){const r={position:"absolute",width:"0.5rem",height:"0.5rem",backgroundColor:n.colorBg},o=`1px solid ${n.colorBorder}`;switch(e){case"top":return{...r,bottom:"-0.25rem",left:"50%",transform:"translateX(-50%) rotate(45deg)",borderRight:o,borderBottom:o};case"topLeft":return{...r,bottom:"-0.25rem",left:"1rem",transform:"rotate(45deg)",borderRight:o,borderBottom:o};case"topRight":return{...r,bottom:"-0.25rem",right:"1rem",transform:"rotate(45deg)",borderRight:o,borderBottom:o};case"bottom":return{...r,top:"-0.25rem",left:"50%",transform:"translateX(-50%) rotate(-135deg)",borderRight:o,borderBottom:o};case"bottomLeft":return{...r,top:"-0.25rem",left:"1rem",transform:"rotate(-135deg)",borderRight:o,borderBottom:o};case"bottomRight":return{...r,top:"-0.25rem",right:"1rem",transform:"rotate(-135deg)",borderRight:o,borderBottom:o};case"left":return{...r,right:"-0.25rem",top:"50%",transform:"translateY(-50%) rotate(-45deg)",borderRight:o,borderBottom:o};case"leftTop":return{...r,right:"-0.25rem",top:"0.75rem",transform:"rotate(-45deg)",borderRight:o,borderBottom:o};case"leftBottom":return{...r,right:"-0.25rem",bottom:"0.75rem",transform:"rotate(-45deg)",borderRight:o,borderBottom:o};case"right":return{...r,left:"-0.25rem",top:"50%",transform:"translateY(-50%) rotate(135deg)",borderRight:o,borderBottom:o};case"rightTop":return{...r,left:"-0.25rem",top:"0.75rem",transform:"rotate(135deg)",borderRight:o,borderBottom:o};case"rightBottom":return{...r,left:"-0.25rem",bottom:"0.75rem",transform:"rotate(135deg)",borderRight:o,borderBottom:o}}}function Xl(e){return e==="top"?"bottom":e==="topLeft"?"bottomLeft":e==="topRight"?"bottomRight":e==="bottom"?"top":e==="bottomLeft"?"topLeft":e==="bottomRight"?"topRight":e==="left"?"right":e==="leftTop"?"rightTop":e==="leftBottom"?"rightBottom":e==="right"?"left":e==="rightTop"?"leftTop":e==="rightBottom"?"leftBottom":e}function rs({title:e,content:r,children:o,placement:s="top",trigger:l="hover",open:a,onOpenChange:c,arrow:u=!0,mouseEnterDelay:f=100,mouseLeaveDelay:d=100,disabled:h=!1,className:g,style:m,classNames:x,styles:p}){const[b,v]=i.useState(!1),[j,C]=i.useState(!1),[w,y]=i.useState(!1),[k,B]=i.useState({top:0,left:0}),[R,S]=i.useState(s),E=i.useRef(null),$=i.useRef(null),I=i.useRef(null),L=i.useRef(null),P=i.useRef(null),H=i.useRef(null),z=i.useRef(!1),F=i.useRef(!0),M=a!==void 0,W=M?a:b,A=i.useRef(W);A.current=W;const D=i.useRef(W);D.current!==W&&(D.current=W,!W&&j&&!w&&y(!0),W&&w&&y(!1));const T=Array.isArray(l)?l:[l];i.useEffect(()=>{S(s)},[s]);const O=i.useCallback(Be=>{h||Be===A.current||(M||v(Be),c?.(Be))},[h,M,c]),Y=i.useCallback(()=>{if(!P.current)return;const Be=P.current.getBoundingClientRect();B(xo(Be,R))},[R]),X=i.useCallback(()=>{if($.current&&(clearTimeout($.current),$.current=null),I.current&&(clearTimeout(I.current),I.current=null),E.current&&clearTimeout(E.current),A.current){C(!0);return}z.current=!1,F.current=!0;const Be=T.includes("hover")?f:0;E.current=window.setTimeout(()=>{S(s),P.current&&B(xo(P.current.getBoundingClientRect(),s)),O(!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{F.current=!1,C(!0)})})},Be)},[f,T,s,O]),K=i.useCallback(()=>{E.current&&(clearTimeout(E.current),E.current=null),$.current&&clearTimeout($.current);const Be=T.includes("hover")?d:0;$.current=window.setTimeout(()=>{C(!1),I.current=window.setTimeout(()=>O(!1),150)},Be)},[d,T,O]),G=i.useCallback(()=>{W?K():X()},[W,X,K]);i.useEffect(()=>{if(w)return C(!1),L.current=window.setTimeout(()=>{y(!1),L.current=null},150),()=>{L.current&&(clearTimeout(L.current),L.current=null)}},[w]),i.useEffect(()=>()=>{E.current&&clearTimeout(E.current),$.current&&clearTimeout($.current),I.current&&clearTimeout(I.current),L.current&&clearTimeout(L.current)},[]),i.useEffect(()=>{if(!W)return;const Be=()=>Y();return window.addEventListener("scroll",Be,!0),window.addEventListener("resize",Be),()=>{window.removeEventListener("scroll",Be,!0),window.removeEventListener("resize",Be)}},[W,Y]),i.useLayoutEffect(()=>{if(!W||z.current||!H.current||!P.current)return;z.current=!0;const Be=H.current.getBoundingClientRect(),we=P.current.getBoundingClientRect(),ee=R.startsWith("top"),ae=R.startsWith("bottom"),se=R.startsWith("left"),Se=R.startsWith("right");let ie=!1;if(ee&&Be.top<0?window.innerHeight-we.bottom>we.top&&(ie=!0):ae&&Be.bottom>window.innerHeight?we.top>window.innerHeight-we.bottom&&(ie=!0):se&&Be.left<0?window.innerWidth-we.right>we.left&&(ie=!0):Se&&Be.right>window.innerWidth&&we.left>window.innerWidth-we.right&&(ie=!0),ie){const ce=Xl(R);S(ce),B(xo(we,ce))}}),i.useEffect(()=>{if(!W||!T.includes("click"))return;const Be=we=>{const ee=we.target;P.current&&!P.current.contains(ee)&&H.current&&!H.current.contains(ee)&&K()};return document.addEventListener("mousedown",Be),()=>document.removeEventListener("mousedown",Be)},[W,T,K]);const Q=i.useCallback(()=>{T.includes("hover")&&X()},[T,X]),N=i.useCallback(()=>{T.includes("hover")&&K()},[T,K]),le=i.useCallback(()=>{T.includes("click")&&G()},[T,G]),re=i.useCallback(()=>{T.includes("focus")&&X()},[T,X]),q=i.useCallback(()=>{T.includes("focus")&&K()},[T,K]),_=i.useCallback(Be=>{T.includes("contextMenu")&&(Be.preventDefault(),G())},[T,G]),J=i.useCallback(Be=>{Be.stopPropagation(),T.includes("hover")&&$.current&&(clearTimeout($.current),$.current=null)},[T]),Te=i.useCallback(Be=>{Be.stopPropagation(),T.includes("hover")&&K()},[T,K]),ke=typeof e=="function"?e():e,Ie=typeof r=="function"?r():r,fe=V({display:"inline-flex"},p?.root,m),ze={position:"fixed",zIndex:9999,top:k.top,left:k.left,opacity:j?1:0,transform:Kl(R,j),transition:F.current?"none":"opacity 0.15s ease-out, transform 0.15s ease-out",pointerEvents:j?"auto":"none"},me={backgroundColor:n.colorBg,border:`1px solid ${n.colorBorder}`,borderRadius:"0.5rem",boxShadow:n.shadowLg,minWidth:"12rem",maxWidth:"20rem",...p?.popup},he={padding:"0.5rem 0.75rem",fontWeight:600,fontSize:"0.875rem",color:n.colorText,borderBottom:Ie?`1px solid ${n.colorBorder}`:void 0,...p?.title},Le={padding:"0.5rem 0.75rem",fontSize:"0.875rem",color:n.colorText,...p?.content},De={..._l(R),...p?.arrow},Oe=(W||w)&&typeof document<"u"?or.createPortal(t.jsxs("div",{ref:H,style:ze,onMouseEnter:J,onMouseLeave:Te,children:[t.jsxs("div",{style:me,className:x?.popup,children:[ke!=null&&t.jsx("div",{style:he,className:x?.title,children:ke}),Ie!=null&&t.jsx("div",{style:Le,className:x?.content,children:Ie})]}),u&&t.jsx("div",{style:De,className:x?.arrow})]}),document.body):null;return t.jsxs("div",{ref:P,style:fe,className:Ye(g,x?.root),onMouseEnter:Q,onMouseLeave:N,onClick:le,onFocus:re,onBlur:q,onContextMenu:_,children:[o,Oe]})}const ln={success:n.colorSuccess,processing:n.colorPrimary,default:n.colorBorder,error:n.colorError,warning:n.colorWarning},Gl={pink:"#eb2f96",magenta:"#eb2f96",red:"#f5222d",volcano:"#fa541c",orange:"#fa8c16",gold:"#faad14",yellow:"#fadb14",lime:"#a0d911",green:"#52c41a",cyan:"#13c2c2",blue:"#1677ff",geekblue:"#2f54eb",purple:"#722ed1"};function To(e){return Gl[e]??e}const Ul=`
|
|
99
99
|
@keyframes j-badge-processing {
|
|
100
100
|
0% { transform: scale(0.8); opacity: 0.6; }
|
|
101
101
|
100% { transform: scale(2.4); opacity: 0; }
|
|
102
|
-
}`;let an=!1;function ql(){if(an||typeof document>"u")return;const e=document.createElement("style");e.textContent=Ul,document.head.appendChild(e),an=!0}function Ql({children:e,count:r,overflowCount:o=99,dot:s=!1,showZero:l=!1,size:a="default",status:c,text:u,color:f,offset:d,title:h,className:g,style:m,classNames:x,styles:p}){ql();const b=a==="small",v=e!=null&&e!=="",j=c!==void 0,w=s?(typeof r=="number"?r:void 0)!==0||l:r!=null?typeof r=="number"?r>0||l:!0:!1,y=s?null:typeof r=="number"?r>o?`${o}+`:`${r}`:r,k=h??(typeof r=="number"?`${r}`:void 0);if(!v&&j){const P=f?To(f):ln[c];return t.jsxs("span",{className:Ve(g,x?.root),style:V({display:"inline-flex",alignItems:"center",gap:"0.5rem",lineHeight:1},p?.root,m),children:[t.jsx("span",{style:V({position:"relative",display:"inline-block",width:"0.375rem",height:"0.375rem",borderRadius:"50%",backgroundColor:P},p?.indicator),className:x?.indicator,children:c==="processing"&&t.jsx("span",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",borderRadius:"50%",backgroundColor:P,animation:"j-badge-processing 1.2s ease-in-out infinite"}})}),u!=null&&t.jsx("span",{style:{color:n.colorText,fontSize:"0.875rem",lineHeight:1.5},children:u})]})}const B=f?To(f):j?ln[c]:n.colorError,R=d?-d[0]:0,S=d?d[1]:0,L=v?`translate(50%, -50%) translate(${R}px, ${S}px)`:void 0,$=s?{...v?{position:"absolute",top:0,right:0,transform:L,zIndex:1}:{},display:"inline-block",width:b?"0.375rem":"0.5rem",height:b?"0.375rem":"0.5rem",borderRadius:"50%",backgroundColor:B,...v?{boxShadow:`0 0 0 1px ${n.colorBg}`}:{}}:{...v?{position:"absolute",top:0,right:0,transform:L,zIndex:1}:{},display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:b?"1rem":"1.25rem",height:b?"1rem":"1.25rem",padding:"0 0.375rem",borderRadius:"0.625rem",backgroundColor:B,color:"#fff",fontSize:b?"0.625rem":"0.75rem",fontWeight:600,fontFamily:"tabular-nums",lineHeight:1,whiteSpace:"nowrap",...v?{boxShadow:`0 0 0 1px ${n.colorBg}`}:{}},I=V($,p?.indicator);return v?t.jsxs("span",{className:Ve(g,x?.root),style:V({position:"relative",display:"inline-flex",verticalAlign:"middle",lineHeight:1},p?.root,m),children:[e,w&&t.jsx(Wt,{content:k,disabled:!k,children:t.jsx("sup",{className:x?.indicator,style:I,children:y})})]}):w?t.jsx("span",{className:Ve(g,x?.root),style:V({display:"inline-flex"},p?.root,m),children:t.jsx(Wt,{content:k,disabled:!k,children:t.jsx("sup",{className:x?.indicator,style:I,children:y})})}):null}function Zl({children:e,text:r,color:o=n.colorPrimary,placement:s="end",className:l,style:a,classNames:c,styles:u}){const f=s==="end",d=To(o),h=V({position:"relative"},u?.wrapper,a),g=V({position:"absolute",top:"0.5rem",...f?{right:"-0.5rem"}:{left:"-0.5rem"},padding:"0 0.5rem",height:"1.375rem",lineHeight:"1.375rem",backgroundColor:d,color:"#fff",fontSize:"0.875rem",borderRadius:f?"0.25rem 0.25rem 0 0.25rem":"0.25rem 0.25rem 0.25rem 0",whiteSpace:"nowrap",zIndex:1},u?.ribbon),m=V({},u?.content),x=V({position:"absolute",top:"100%",...f?{right:0}:{left:0},width:"0.5rem",height:"0.375rem",backgroundColor:d,clipPath:f?"polygon(0 0, 100% 0, 0 100%)":"polygon(0 0, 100% 0, 100% 100%)",filter:"brightness(0.75)"},u?.corner);return t.jsxs("div",{className:Ve(l,c?.wrapper),style:h,children:[e,t.jsxs("div",{className:c?.ribbon,style:g,children:[t.jsx("span",{className:c?.content,style:m,children:r}),t.jsx("div",{className:c?.corner,style:x})]})]})}const Jl=Object.assign(Ql,{Ribbon:Zl}),ea={primary:{base:n.colorPrimary,contrast:n.colorPrimaryContrast},secondary:{base:n.colorSecondary,contrast:n.colorSecondaryContrast},success:{base:n.colorSuccess,contrast:n.colorSuccessContrast},warning:{base:n.colorWarning,contrast:n.colorWarningContrast},error:{base:n.colorError,contrast:n.colorErrorContrast},info:{base:n.colorInfo,contrast:n.colorInfoContrast}};function ta({icon:e,description:r,position:o="bottom-right",shape:s="circle",size:l="md",color:a="primary",tooltip:c,tooltipPosition:u,offsetX:f=24,offsetY:d=24,shadow:h="lg",bordered:g=!0,onBackToTop:m,visibleOnScroll:x,disabled:p,className:b,style:v,onClick:j,_inGroup:C,classNames:w,styles:y,...k}){const[B,R]=i.useState(!1),[S,L]=i.useState(x===void 0),$=i.useRef(null);i.useEffect(()=>{if(x===void 0)return;const _=()=>{L(window.scrollY>=x)};return window.addEventListener("scroll",_),_(),()=>window.removeEventListener("scroll",_)},[x]);const I=()=>{if(h){if(h===!0||h==="lg")return n.shadowLg;if(h==="sm")return n.shadowSm;if(h==="md")return n.shadowMd}},P={sm:{size:40,fontSize:"0.75rem",iconSize:16},md:{size:48,fontSize:"0.875rem",iconSize:20},lg:{size:56,fontSize:"1rem",iconSize:24}},E={"top-left":{top:d,left:f},"top-right":{top:d,right:f},"bottom-left":{bottom:d,left:f},"bottom-right":{bottom:d,right:f}},H=()=>u||(o.includes("right")?"left":o.includes("left")?"right":"left"),z=!v?.position||v.position==="fixed"||v.position==="absolute",A=()=>C?{filter:B&&!p?"brightness(1.15)":"brightness(1)"}:{transform:B&&!p?"scale(1.1)":"scale(1)"},M=ea[a],W={position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",width:P[l].size,height:P[l].size,borderRadius:s==="circle"?"50%":"0.5rem",backgroundColor:M.base,color:M.contrast,border:g?`1px solid ${n.colorBorder}`:"none",outline:"none",cursor:p?"not-allowed":"pointer",opacity:p?.6:1,boxShadow:I(),transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",...A(),zIndex:B?1002:z?1e3:void 0,fontFamily:"inherit",fontSize:P[l].fontSize,...z&&E[o]},F=_=>{p||(m&&(window.scrollTo({top:0,behavior:"smooth"}),m()),j?.(_))};if(!S)return null;const D=H(),T={top:{bottom:"100%",left:"50%",marginBottom:"0.5rem",transform:`translateX(-50%) translateY(${B?0:6}px)`},bottom:{top:"100%",left:"50%",marginTop:"0.5rem",transform:`translateX(-50%) translateY(${B?0:-6}px)`},left:{right:"100%",top:"50%",marginRight:"0.5rem",transform:`translateY(-50%) translateX(${B?0:6}px)`},right:{left:"100%",top:"50%",marginLeft:"0.5rem",transform:`translateY(-50%) translateX(${B?0:-6}px)`}},O={top:{bottom:"-0.25rem",left:"50%",transform:"translateX(-50%) rotate(45deg)",borderRight:`1px solid ${n.colorBorder}`,borderBottom:`1px solid ${n.colorBorder}`},bottom:{top:"-0.25rem",left:"50%",transform:"translateX(-50%) rotate(-135deg)",borderRight:`1px solid ${n.colorBorder}`,borderBottom:`1px solid ${n.colorBorder}`},left:{right:"-0.25rem",top:"50%",transform:"translateY(-50%) rotate(-45deg)",borderRight:`1px solid ${n.colorBorder}`,borderBottom:`1px solid ${n.colorBorder}`},right:{left:"-0.25rem",top:"50%",transform:"translateY(-50%) rotate(135deg)",borderRight:`1px solid ${n.colorBorder}`,borderBottom:`1px solid ${n.colorBorder}`}},Y={position:"absolute",zIndex:1001,padding:"0.5rem 0.75rem",borderRadius:"0.375rem",backgroundColor:n.colorBgMuted,color:n.colorText,fontSize:"0.8125rem",fontWeight:500,whiteSpace:"nowrap",boxShadow:n.shadowMd,border:`1px solid ${n.colorBorder}`,opacity:B?1:0,transition:"opacity 0.15s ease-out, transform 0.15s ease-out",pointerEvents:"none",...T[D]},X={position:"absolute",width:"0.5rem",height:"0.5rem",backgroundColor:n.colorBgMuted,...O[D]};return t.jsxs("button",{ref:$,disabled:p,style:V(W,y?.root,v),className:Ve(b,w?.root),onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),onClick:F,...k,children:[e?t.jsx("span",{style:{display:"flex",fontSize:P[l].iconSize,...y?.icon},className:w?.icon,children:e}):r?t.jsx("span",{style:y?.icon,className:w?.icon,children:r}):t.jsx(Lr,{size:P[l].iconSize}),c&&t.jsxs("div",{style:{...Y,...y?.tooltip},className:w?.tooltip,role:"tooltip",children:[c,t.jsx("div",{style:{...X,...y?.tooltipArrow},className:w?.tooltipArrow})]})]})}function ra({children:e,position:r="bottom-right",direction:o="top",size:s="md",offsetX:l=24,offsetY:a=24,shadow:c="lg",style:u,className:f}){const d={"top-left":{top:a,left:l},"top-right":{top:a,right:l},"bottom-left":{bottom:a,left:l},"bottom-right":{bottom:a,right:l}},h=o==="top"||o==="bottom",g=()=>{if(c){if(c===!0||c==="lg")return n.shadowLg;if(c==="sm")return n.shadowSm;if(c==="md")return n.shadowMd}},x={position:"fixed",display:"flex",flexDirection:(()=>{switch(o){case"top":return"column-reverse";case"bottom":return"column";case"left":return"row-reverse";case"right":return"row"}})(),boxShadow:g(),zIndex:1e3,...d[r],...u},b=i.Children.toArray(e).filter(i.isValidElement),v=b.length,j="0.5rem",C=w=>{const y=w===0,k=w===v-1;if(v===1)return j;if(h){const R=o==="top"?k:y,S=o==="top"?y:k;if(R)return`${j} ${j} 0 0`;if(S)return`0 0 ${j} ${j}`}else{const R=o==="right"?k:y,S=o==="right"?y:k;if(R)return`${j} 0 0 ${j}`;if(S)return`0 ${j} ${j} 0`}return"0"};return t.jsx("div",{style:x,className:f,children:b.map((w,y)=>i.isValidElement(w)?i.cloneElement(w,{key:y,style:{position:"relative",borderRadius:C(y),...w.props.style},size:w.props.size||s,shape:"square",shadow:!1,_inGroup:!0}):null)})}function oa({children:e,position:r="bottom-right",direction:o="top",trigger:s="click",icon:l,openIcon:a,shape:c="circle",size:u="md",color:f="primary",offsetX:d=24,offsetY:h=24,shadow:g="lg",tooltip:m,defaultOpen:x=!1,open:p,onOpenChange:b,gap:v=12,style:j,className:C,classNames:w,styles:y}){const[k,B]=i.useState(x),R=p!==void 0,S=R?p:k,L=X=>{R||B(X),b?.(X)},$=()=>{s==="click"&&L(!S)},I=()=>{s==="hover"&&L(!0)},P=()=>{s==="hover"&&L(!1)},E={sm:40,md:48,lg:56},H=E[u]===40?16:E[u]===48?20:24,z={"top-left":{top:h,left:d},"top-right":{top:h,right:d},"bottom-left":{bottom:h,left:d},"bottom-right":{bottom:h,right:d}},A=o==="top"||o==="bottom",M=()=>{switch(o){case"top":return"column-reverse";case"bottom":return"column";case"left":return"row-reverse";case"right":return"row"}},W=j?.position==="relative"||j?.position==="static",D=i.Children.toArray(e).filter(i.isValidElement),T=()=>{if(S)return 0;switch(o){case"top":return 20;case"bottom":return-20;case"left":return 20;case"right":return-20}},O=()=>{const X=v;switch(o){case"top":return{bottom:"100%",left:"50%",transform:"translateX(-50%)",paddingBottom:X};case"bottom":return{top:"100%",left:"50%",transform:"translateX(-50%)",paddingTop:X};case"left":return{right:"100%",top:"50%",transform:"translateY(-50%)",paddingRight:X};case"right":return{left:"100%",top:"50%",transform:"translateY(-50%)",paddingLeft:X}}};if(W)return t.jsxs("div",{style:V({position:"relative",display:"inline-flex"},y?.root,j),className:Ve(C,w?.root),onMouseEnter:I,onMouseLeave:P,children:[t.jsx(Hr,{icon:a?S?a:l||t.jsx(Lr,{size:H}):l||t.jsx(Lr,{size:H}),shape:c,size:u,color:f,shadow:g,tooltip:S?void 0:m,onClick:$,_inGroup:!0,className:w?.trigger,style:{position:"relative",transform:!a&&S?"rotate(45deg)":"rotate(0deg)",transition:"transform 0.3s cubic-bezier(0.4, 0, 0.2, 1)",...y?.trigger}}),t.jsx("div",{style:{position:"absolute",display:"flex",flexDirection:M(),alignItems:"center",gap:v,zIndex:1e3,pointerEvents:S?"auto":"none",...O(),...y?.menu},className:w?.menu,children:D.map((X,_)=>{if(!i.isValidElement(X))return null;const G=_*.05,Q=T(),N=A?"Y":"X";return i.cloneElement(X,{key:_,style:{position:"relative",opacity:S?1:0,transform:`translate${N}(${Q}px)`,transition:`opacity 0.2s ease-out ${G}s, transform 0.2s ease-out ${G}s`,pointerEvents:S?"auto":"none",...X.props.style},size:X.props.size||u,shape:X.props.shape||c,shadow:X.props.shadow!==void 0?X.props.shadow:g})})})]});const Y=V({display:"flex",flexDirection:M(),alignItems:"center",gap:v,position:j?.position==="absolute"?void 0:"fixed",zIndex:1e3,...z[r]},y?.root,j);return t.jsxs("div",{style:Y,className:Ve(C,w?.root),onMouseEnter:I,onMouseLeave:P,children:[t.jsx(Hr,{icon:a?S?a:l||t.jsx(Lr,{size:H}):l||t.jsx(Lr,{size:H}),shape:c,size:u,color:f,shadow:g,tooltip:S?void 0:m,onClick:$,_inGroup:!0,className:w?.trigger,style:{position:"relative",transform:!a&&S?"rotate(45deg)":"rotate(0deg)",transition:"transform 0.3s cubic-bezier(0.4, 0, 0.2, 1)",...y?.trigger}}),D.map((X,_)=>{if(!i.isValidElement(X))return null;const G=_*.05,Q=T(),N=A?"Y":"X";return i.cloneElement(X,{key:_,style:{position:"relative",opacity:S?1:0,transform:`translate${N}(${Q}px)`,transition:`opacity 0.2s ease-out ${G}s, transform 0.2s ease-out ${G}s`,pointerEvents:S?"auto":"none",...X.props.style},size:X.props.size||u,shape:X.props.shape||c,shadow:X.props.shadow!==void 0?X.props.shadow:g})})]})}const Hr=ta;Hr.Group=ra;Hr.Menu=oa;function Lr({size:e}){return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),t.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}function na({size:e=20}){return t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"18 15 12 9 6 15"})})}function sa({size:e=20}){return t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function ia({size:e=20}){return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),t.jsx("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"})]})}function la({size:e=20}){return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function aa({children:e,type:r="default",size:o="md",disabled:s=!1,mark:l=!1,code:a=!1,keyboard:c=!1,underline:u=!1,delete:f=!1,weight:d,lineHeight:h,italic:g=!1,copyable:m=!1,ellipsis:x=!1,className:p,style:b,classNames:v,styles:j}){const[C,w]=i.useState(!1),[y,k]=i.useState(!1),B={xs:"0.625rem",sm:"0.8125rem",md:"1rem",lg:"1.5rem",xl:"2.25rem"},R={default:n.colorText,secondary:n.colorTextMuted,success:n.colorSuccess,warning:n.colorWarning,error:n.colorError,info:n.colorInfo},S={thin:100,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},L={none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2},$=x?typeof x=="object"?x:{rows:1}:null,I=$?.expandable??!1,P=$?.rows??1,E=async()=>{const O=typeof m=="object"&&m.text?m.text:typeof e=="string"?e:"";if(O)try{await navigator.clipboard.writeText(O),w(!0),typeof m=="object"&&m.onCopy&&m.onCopy(),setTimeout(()=>w(!1),2e3)}catch(Y){console.error("Failed to copy text:",Y)}},H=()=>{const O=!y;k(O),$?.onExpand?.(O)},z=()=>!$||y?{}:P===1?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"inline-block",maxWidth:"100%",verticalAlign:"bottom"}:{overflow:"hidden",display:"-webkit-box",WebkitLineClamp:P,WebkitBoxOrient:"vertical"},A=V({fontSize:B[o],color:s?n.colorTextSubtle:R[r],cursor:s?"not-allowed":void 0,opacity:s?.6:1,fontWeight:d?S[d]:void 0,lineHeight:h?L[h]:void 0,fontStyle:g?"italic":void 0,textDecoration:u?"underline":f?"line-through":void 0,...z()},j?.root,b),M=Ve(p,v?.root);let W=e;l&&(W=t.jsx("mark",{style:{backgroundColor:n.colorWarning200,color:n.colorWarning900,padding:"0 0.125rem",borderRadius:"0.125rem"},children:W})),a&&(W=t.jsx("code",{style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:"0.9em",backgroundColor:n.colorBgMuted,border:`1px solid ${n.colorBorder}`,borderRadius:"0.25rem",padding:"0.125rem 0.375rem"},children:W})),c&&(W=t.jsx("kbd",{style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:"0.9em",backgroundColor:n.colorBgMuted,border:`1px solid ${n.colorBorder}`,borderBottom:`2px solid ${n.colorBorder}`,borderRadius:"0.25rem",padding:"0.125rem 0.375rem",boxShadow:`inset 0 -1px 0 ${n.colorBorder}`},children:W}));const F=m&&t.jsx(Wt,{content:C?"Copiado!":"Copiar",delay:100,children:t.jsx("button",{onClick:E,disabled:s,className:v?.copyButton,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",marginLeft:"0.25rem",padding:"0.125rem",border:"none",background:"none",cursor:s?"not-allowed":"pointer",color:C?n.colorSuccess:n.colorTextMuted,opacity:s?.5:1,transition:"color 0.2s",verticalAlign:"middle",...j?.copyButton},children:C?t.jsx(da,{size:14}):t.jsx(ca,{size:14})})}),D=I&&t.jsx("button",{onClick:H,className:v?.expandButton,style:{display:"inline",marginLeft:"0.25rem",padding:0,border:"none",background:"none",cursor:"pointer",color:n.colorPrimary,fontSize:"inherit",fontFamily:"inherit",...j?.expandButton},children:y?"menos":"más"}),T={fontSize:B[o],color:s?n.colorTextSubtle:R[r],cursor:s?"not-allowed":void 0,opacity:s?.6:1,fontWeight:d?S[d]:void 0,lineHeight:h?L[h]:void 0,fontStyle:g?"italic":void 0,textDecoration:u?"underline":f?"line-through":void 0};if(I){const O=z();return P>1?t.jsxs("div",{style:V(T,j?.root,b),className:M,children:[t.jsx("div",{style:{...O,...j?.content},className:v?.content,children:W}),D,F]}):t.jsxs("span",{style:V({...T,display:"inline-flex",alignItems:"baseline",maxWidth:"100%"},j?.root,b),className:M,children:[t.jsx("span",{style:{...O,flex:"0 1 auto",minWidth:0,...j?.content},className:v?.content,children:W}),D,F]})}return $&&P>1?t.jsxs("div",{style:A,className:M,children:[v?.content||j?.content?t.jsx("span",{className:v?.content,style:j?.content,children:W}):W,F]}):t.jsxs("span",{style:A,className:M,children:[v?.content||j?.content?t.jsx("span",{className:v?.content,style:j?.content,children:W}):W,F]})}function ca({size:e=16}){return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),t.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}function da({size:e=16}){return t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"20 6 9 17 4 12"})})}const ua={default:{line:n.colorBorder,text:n.colorText},primary:{line:n.colorPrimary,text:n.colorPrimary},secondary:{line:n.colorSecondary,text:n.colorSecondary},success:{line:n.colorSuccess,text:n.colorSuccess},warning:{line:n.colorWarning,text:n.colorWarning},error:{line:n.colorError,text:n.colorError},info:{line:n.colorInfo,text:n.colorInfo}},fa={thin:1,normal:1,medium:2,thick:3};function ha({type:e="horizontal",dashed:r=!1,orientation:o="center",orientationMargin:s,plain:l=!1,color:a="default",thickness:c="normal",children:u,className:f,style:d,classNames:h,styles:g}){const m=r?"dashed":"solid",x=ua[a],p=x.line,b=typeof c=="number"?c:fa[c];if(e==="vertical"){const R=V({display:"inline-block",height:"0.9em",margin:"0 0.5rem",verticalAlign:"middle",borderTop:0,borderInlineStart:`${b}px ${m} ${p}`},g?.root,d);return t.jsx("span",{style:R,className:Ve(f,h?.root),role:"separator"})}if(!u){const R=V({display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:"1.5rem 0",borderBlockStart:`${b}px ${m} ${p}`},g?.root,d);return t.jsx("div",{style:R,className:Ve(f,h?.root),role:"separator"})}const j=(()=>{const R=s!==void 0?typeof s=="number"?`${s}px`:s:null;switch(o){case"left":return{before:R||"5%",after:"95%"};case"right":return{before:"95%",after:R||"5%"};default:return{before:"50%",after:"50%"}}})(),C=V({display:"flex",alignItems:"center",clear:"both",width:"100%",minWidth:"100%",margin:"1.5rem 0"},g?.root,d),w={borderBlockStart:`${b}px ${m} ${p}`,flexGrow:0,flexShrink:0},y={...w,width:j.before},k={...w,width:j.after};s!==void 0&&o!=="center"?o==="left"?(y.width=typeof s=="number"?`${s}px`:s,y.flexGrow=0,k.width="auto",k.flexGrow=1):(y.width="auto",y.flexGrow=1,k.width=typeof s=="number"?`${s}px`:s,k.flexGrow=0):o==="center"?(y.flexGrow=1,k.flexGrow=1,y.width="auto",k.width="auto"):o==="left"?(k.flexGrow=1,k.width="auto"):(y.flexGrow=1,y.width="auto");const B={display:"inline-block",padding:"0 1rem",fontSize:l?"0.875rem":"1rem",fontWeight:l?400:500,color:x.text,whiteSpace:"nowrap",...g?.text};return t.jsxs("div",{style:C,className:Ve(f,h?.root),role:"separator",children:[t.jsx("span",{style:{...y,...g?.line},className:h?.line}),t.jsx("span",{style:B,className:h?.text,children:u}),t.jsx("span",{style:{...k,...g?.line},className:h?.line})]})}const pa={small:"0.5rem",middle:"1rem",large:"1.5rem"};function ga({children:e,vertical:r=!1,wrap:o="nowrap",justify:s="normal",align:l="normal",gap:a,flex:c,component:u="div",className:f,style:d}){const m={display:"flex",flexDirection:r?"column":"row",flexWrap:typeof o=="boolean"?o?"wrap":"nowrap":o,justifyContent:s,alignItems:l,gap:(()=>{if(a!==void 0)return typeof a=="number"?a:typeof a=="string"?pa[a]:`${a[1]}px ${a[0]}px`})(),flex:c,...d};return t.jsx(u,{style:m,className:f,children:e})}const Yr=24,os={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1600},ma=["xxl","xl","lg","md","sm","xs"],ns=i.createContext({gutter:[0,0]});function yo(e,r){if(typeof e!="object"||e===null)return e;const o=e;for(const s of ma)if(r>=os[s]&&o[s]!==void 0)return o[s]}function ss(){return typeof window>"u"?1200:window.innerWidth}function is({children:e,gutter:r=0,align:o="top",justify:s="start",wrap:l=!0,className:a,style:c}){const u=ss(),f=()=>{if(typeof r=="number")return[r,0];if(Array.isArray(r)){const p=typeof r[0]=="number"?r[0]:yo(r[0],u)??0,b=typeof r[1]=="number"?r[1]:yo(r[1],u)??0;return[p,b]}return[yo(r,u)??0,0]},[d,h]=f(),g={top:"flex-start",middle:"center",bottom:"flex-end",stretch:"stretch"},m={start:"flex-start",end:"flex-end",center:"center","space-around":"space-around","space-between":"space-between","space-evenly":"space-evenly"},x={display:"flex",flexFlow:l?"row wrap":"row nowrap",alignItems:g[o],justifyContent:m[s],marginLeft:d?-(d/2):void 0,marginRight:d?-(d/2):void 0,rowGap:h||void 0,...c};return t.jsx(ns.Provider,{value:{gutter:[d,h]},children:t.jsx("div",{style:x,className:a,children:e})})}function ls({children:e,span:r,offset:o,push:s,pull:l,order:a,flex:c,xs:u,sm:f,md:d,lg:h,xl:g,xxl:m,className:x,style:p}){const{gutter:b}=i.useContext(ns),v=ss(),C=(()=>{const H=[{bp:"xxl",value:m},{bp:"xl",value:g},{bp:"lg",value:h},{bp:"md",value:d},{bp:"sm",value:f},{bp:"xs",value:u}];for(const{bp:z,value:A}of H)if(A!==void 0&&v>=os[z])return typeof A=="number"?{span:A}:A;return{span:r,offset:o,push:s,pull:l,order:a,flex:c}})(),w=C.span??r,y=C.offset??o??0,k=C.push??s??0,B=C.pull??l??0,R=C.order??a,S=C.flex??c,L=()=>{if(!S&&w!==void 0)return w===0?"none":`${w/Yr*100}%`},$=()=>{if(y!==0)return`${y/Yr*100}%`},I=()=>k===0&&B===0?{}:{position:"relative",left:k?`${k/Yr*100}%`:void 0,right:B?`${B/Yr*100}%`:void 0},P=L(),E={boxSizing:"border-box",paddingLeft:b[0]?b[0]/2:void 0,paddingRight:b[0]?b[0]/2:void 0,flex:S??(P?`0 0 ${P}`:void 0),maxWidth:P==="none"?void 0:P,display:P==="none"?"none":void 0,marginLeft:$(),order:R,...I(),...p};return t.jsx("div",{style:E,className:x,children:e})}const xa={Row:is,Col:ls},ya={xs:480,sm:576,md:768,lg:992,xl:1200,xxl:1600},as=i.createContext({siderCollapsed:!1});function ba({children:e,hasSider:r,className:o,style:s}){const l={display:"flex",flex:"auto",flexDirection:r?"row":"column",minHeight:0,backgroundColor:n.colorBgSubtle,...s};return t.jsx("div",{style:l,className:o,children:e})}function cs({children:e,className:r,style:o}){const s={flex:"0 0 auto",height:"4rem",padding:"0 1.5rem",backgroundColor:n.colorBgMuted,display:"flex",alignItems:"center",...o};return t.jsx("header",{style:s,className:r,children:e})}function ds({children:e,className:r,style:o}){const s={flex:"0 0 auto",padding:"1.5rem 3.125rem",backgroundColor:n.colorBgMuted,...o};return t.jsx("footer",{style:s,className:r,children:e})}function us({children:e,className:r,style:o}){const s={flex:"auto",minHeight:0,padding:"1.5rem",...o};return t.jsx("main",{style:s,className:r,children:e})}function fs({children:e,width:r=200,collapsedWidth:o=80,collapsible:s=!1,collapsed:l,defaultCollapsed:a=!1,reverseArrow:c=!1,breakpoint:u,theme:f="dark",trigger:d,onCollapse:h,onBreakpoint:g,className:m,style:x,classNames:p,styles:b}){const[v,j]=i.useState(a),[C,w]=i.useState(!1),y=l!==void 0,k=y?l:v;i.useEffect(()=>{if(!u||typeof window>"u")return;const I=()=>{const P=window.innerWidth<ya[u];P!==C&&(w(P),g?.(P),P&&!k?(y||j(!0),h?.(!0,"responsive")):!P&&k&&C&&(y||j(!1),h?.(!1,"responsive")))};return I(),window.addEventListener("resize",I),()=>window.removeEventListener("resize",I)},[u,C,k,y,g,h]);const B=()=>{const I=!k;y||j(I),h?.(I,"clickTrigger")},R=k?o:typeof r=="number"?r:parseInt(r),S=V({flex:`0 0 ${R}px`,maxWidth:R,minWidth:R,width:R,backgroundColor:f==="dark"?"#1f1f1f":n.colorBg,color:f==="dark"?"rgba(255, 255, 255, 0.85)":n.colorText,transition:"all 0.2s ease",position:"relative",display:"flex",flexDirection:"column"},b?.root,x),L={flex:1,overflow:"hidden",...b?.content},$=()=>{if(!s||d===null)return null;const I={position:"absolute",bottom:0,left:0,right:0,height:"3rem",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",backgroundColor:f==="dark"?"rgba(0, 0, 0, 0.25)":n.colorBgMuted,transition:"background-color 0.2s"};if(o===0&&k){const P={position:"absolute",bottom:"3rem",right:"-2.25rem",width:"2.25rem",height:"2.625rem",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",backgroundColor:f==="dark"?"#2a2a2a":n.colorBgMuted,borderRadius:"0 0.25rem 0.25rem 0",boxShadow:n.shadowMd};return t.jsx("div",{style:{...P,...b?.trigger},className:p?.trigger,onClick:B,children:d||t.jsx(cn,{collapsed:k,reverseArrow:c})})}return t.jsx("div",{style:{...I,...b?.trigger},className:p?.trigger,onClick:B,children:d||t.jsx(cn,{collapsed:k,reverseArrow:c})})};return t.jsx(as.Provider,{value:{siderCollapsed:k},children:t.jsxs("aside",{style:S,className:Ve(m,p?.root),children:[t.jsx("div",{style:L,className:p?.content,children:e}),$()]})})}function cn({collapsed:e,reverseArrow:r}){const o=r?e:!e;return t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:o?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s"},children:t.jsx("polyline",{points:"15 18 9 12 15 6"})})}function va(){return i.useContext(as)}const Ca=Object.assign(ba,{Header:cs,Footer:ds,Content:us,Sider:fs}),Io=i.createContext(null);function ka(){return i.useContext(Io)}const wa={small:"0.5rem",middle:"1rem",large:"1.5rem"},nr="0.5rem";function Kr(e){return typeof e=="number"?e:wa[e]}function bo(e){return typeof e=="number"?`${e}px`:e}function ja({children:e,size:r="small",direction:o="horizontal",align:s,wrap:l=!1,split:a,className:c,style:u,classNames:f,styles:d}){const h=i.Children.toArray(e);if(h.length===0)return null;const[g,m]=Array.isArray(r)?[Kr(r[0]),Kr(r[1])]:[Kr(r),Kr(r)],x=s??(o==="horizontal"?"center":void 0),b=V({display:"inline-flex",flexDirection:o==="vertical"?"column":"row",flexWrap:l?"wrap":"nowrap",alignItems:x?{start:"flex-start",end:"flex-end",center:"center",baseline:"baseline"}[x]:void 0,gap:a?void 0:g===m?bo(g):`${bo(m)} ${bo(g)}`},d?.root,u),v=Ve(c,f?.root);if(!a)return t.jsx("div",{style:b,className:v,children:f?.item||d?.item?h.map((C,w)=>t.jsx("div",{className:f?.item,style:d?.item,children:C},w)):h});const j=o==="vertical";return t.jsx("div",{style:b,className:v,children:h.map((C,w)=>t.jsxs(i.Fragment,{children:[f?.item||d?.item?t.jsx("div",{className:f?.item,style:d?.item,children:C}):C,w<h.length-1&&t.jsx("span",{style:{display:"inline-flex",alignSelf:"center",margin:j?typeof m=="number"?`${m/2}px 0`:`calc(${m} / 2) 0`:typeof g=="number"?`0 ${g/2}px`:`0 calc(${g} / 2)`,...d?.separator},className:f?.separator,children:a})]},w))})}function Sa({children:e,direction:r="horizontal",block:o=!1,className:s,style:l}){const a=i.Children.toArray(e);if(a.length===0)return null;const c=r==="vertical",u={display:o?"flex":"inline-flex",flexDirection:c?"column":"row",...l};return t.jsx("div",{style:u,className:s,children:a.map((f,d)=>{const h=d===0,g=d===a.length-1,m={};c?(h?m.borderRadius=`${nr} ${nr} 0 0`:g?m.borderRadius=`0 0 ${nr} ${nr}`:m.borderRadius=0,h||(m.marginTop=-1)):(h?m.borderRadius=`${nr} 0 0 ${nr}`:g?m.borderRadius=`0 ${nr} ${nr} 0`:m.borderRadius=0,h||(m.marginLeft=-1));const x={isFirstItem:h,isLastItem:g,direction:r};return i.isValidElement(f)?t.jsx(Io.Provider,{value:x,children:i.cloneElement(f,{style:{...f.props.style||{},...m}})},d):t.jsx(Io.Provider,{value:x,children:f},d)})})}const Ma=Object.assign(ja,{Compact:Sa}),Ba={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1600},Ra=["xxl","xl","lg","md","sm","xs"];function _r(e,r,o){if(e===void 0)return o;if(typeof e!="object"||e===null)return e;const s=e;for(const l of Ra)if(r>=Ba[l]&&s[l]!==void 0)return s[l];return o}function Ta(){const[e,r]=i.useState(()=>typeof window>"u"?1200:window.innerWidth);return i.useEffect(()=>{if(typeof window>"u")return;const o=()=>r(window.innerWidth);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),e}function Ia({item:e,index:r,column:o,columnWidth:s,horizontalGutter:l,verticalGutter:a,itemRender:c,onResize:u,fresh:f,itemClassName:d,itemStyle:h}){const g=i.useRef(null);i.useEffect(()=>{if(!f||!u||!g.current)return;const p=new ResizeObserver(b=>{for(const v of b)u(e.key,v.contentRect.height)});return p.observe(g.current),()=>p.disconnect()},[f,e.key,u]),i.useEffect(()=>{g.current&&u&&u(e.key,g.current.offsetHeight)},[e.key,u]);const m=e.children??c?.({...e,index:r,assignedColumn:o}),x={width:s,marginBottom:a,boxSizing:"border-box",paddingLeft:l/2,paddingRight:l/2,...h};return t.jsx("div",{ref:g,style:x,className:d,children:m})}function La({items:e=[],columns:r=3,gutter:o=0,itemRender:s,fresh:l=!1,onLayoutChange:a,className:c,style:u,classNames:f,styles:d},h){const g=i.useRef(null),[m,x]=i.useState(new Map),p=Ta();i.useEffect(()=>{h&&(typeof h=="function"?h({nativeElement:g.current}):h.current={nativeElement:g.current})},[h]);const b=_r(r,p,3),[v,j]=i.useMemo(()=>{if(typeof o=="number")return[o,o];if(Array.isArray(o)){const $=_r(o[0],p,0),I=_r(o[1],p,0);return[$,I]}const L=_r(o,p,0);return[L,L]},[o,p]),C=`${100/b}%`,w=i.useCallback((L,$)=>{x(I=>{const P=new Map(I);return P.set(L,$),P})},[]),{columnItems:y,layoutInfo:k}=i.useMemo(()=>{const L=Array.from({length:b},()=>[]),$=Array(b).fill(0),I=[];for(let P=0;P<e.length;P++){const E=e[P];let H;if(E.column!==void 0&&E.column>=0&&E.column<b)H=E.column;else{H=0;let A=$[0];for(let M=1;M<b;M++)$[M]<A&&(A=$[M],H=M)}L[H].push(E);const z=E.height??m.get(E.key)??0;$[H]+=z+j,I.push({key:E.key,column:H})}return{columnItems:L,layoutInfo:I}},[e,b,m,j]),B=i.useRef("");i.useEffect(()=>{const L=JSON.stringify(k);L!==B.current&&(B.current=L,a?.(k))},[k,a]);const R=V({display:"flex",flexDirection:"row",marginLeft:v?-(v/2):void 0,marginRight:v?-(v/2):void 0},d?.root,u),S={display:"flex",flexDirection:"column",width:C,...d?.column};return t.jsx("div",{ref:g,style:R,className:Ve(c,f?.root),children:y.map((L,$)=>t.jsx("div",{style:S,className:f?.column,children:L.map(I=>t.jsx(Ia,{item:I,index:e.findIndex(P=>P.key===I.key),column:$,columnWidth:"100%",horizontalGutter:v,verticalGutter:j,itemRender:s,onResize:w,fresh:l,itemClassName:f?.item,itemStyle:d?.item},I.key))},$))})}const Ea=i.forwardRef(La);function dn(e,r){if(e!==void 0)return typeof e=="number"?e:e.endsWith("%")?parseFloat(e)/100*r:parseFloat(e)}function hs(e){return null}function $a({isVertical:e,onMouseDown:r,collapsibleStart:o,collapsibleEnd:s,onCollapseStart:l,onCollapseEnd:a,isStartCollapsed:c,isEndCollapsed:u,barClassName:f,barStyle:d,collapseButtonClassName:h,collapseButtonStyle:g}){const[m,x]=i.useState(!1),p={position:"relative",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",[e?"height":"width"]:"0.75rem",[e?"width":"height"]:"100%",cursor:e?"row-resize":"col-resize",userSelect:"none",zIndex:1},b={[e?"width":"height"]:"100%",[e?"height":"width"]:m?3:2,backgroundColor:m?n.colorPrimary:n.colorBorder,borderRadius:1,transition:"background-color 0.15s ease, height 0.15s ease, width 0.15s ease"},v=C=>{const y=C==="start"?"-0.875rem":"0.875rem",k={position:"absolute",width:"1.25rem",height:"1.25rem",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",border:`1px solid ${n.colorBorder}`,backgroundColor:n.colorBg,cursor:"pointer",fontSize:"0.625rem",color:n.colorTextMuted,opacity:m?1:0,transition:"opacity 0.15s ease",zIndex:2};return e?{...k,top:"50%",left:"50%",transform:`translate(calc(-50% + ${y}), -50%)`}:{...k,top:"50%",left:"50%",transform:`translate(-50%, calc(-50% + ${y}))`}},j=C=>{const w=C==="start",y=w?c:u;return e?y?w?"▼":"▲":w?"▲":"▼":y?w?"▶":"◀":w?"◀":"▶"};return t.jsxs("div",{style:{...p,...d},className:f,onMouseDown:r,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),children:[t.jsx("div",{style:b}),o&&t.jsx("button",{style:{...v("start"),...g},className:h,onClick:C=>{C.stopPropagation(),l()},onMouseDown:C=>C.stopPropagation(),children:j("start")}),s&&t.jsx("button",{style:{...v("end"),...g},className:h,onClick:C=>{C.stopPropagation(),a()},onMouseDown:C=>C.stopPropagation(),children:j("end")})]})}function Pa({children:e,orientation:r="horizontal",lazy:o=!1,onResize:s,onResizeStart:l,onResizeEnd:a,className:c,style:u,classNames:f,styles:d}){const h=i.useRef(null),g=r==="vertical",m=[];i.Children.forEach(e,H=>{i.isValidElement(H)&&H.type===hs&&m.push({defaultSize:H.props.defaultSize,size:H.props.size,min:H.props.min,max:H.props.max,resizable:H.props.resizable??!0,collapsible:H.props.collapsible??!1,children:H.props.children,style:H.props.style,className:H.props.className})});const x=m.length,[p,b]=i.useState(()=>{const H=[];let z=0;for(const W of m)if(W.defaultSize!==void 0||W.size!==void 0){const F=W.size??W.defaultSize;if(typeof F=="string"&&F.endsWith("%")){const D=parseFloat(F);H.push(D),z+=D}else H.push(-(typeof F=="number"?F:parseFloat(F)))}else H.push(0);const A=100-z,M=H.filter(W=>W===0).length;if(M>0){const W=A/M;return H.map(F=>F===0?W:F<0?-F:F)}return H.map(W=>W<0?-W:W)}),[v,j]=i.useState(()=>Array(x).fill(!1)),C=i.useRef([]),w=i.useRef(null),[y,k]=i.useState(!1),B=i.useRef(null),R=i.useRef(null);i.useEffect(()=>{if(!m.some(W=>W.size!==void 0))return;const z=h.current?g?h.current.offsetHeight:h.current.offsetWidth:0,A=m.map((W,F)=>{if(W.size===void 0)return p[F]??100/x;const D=W.size;if(typeof D=="string"&&D.endsWith("%"))return parseFloat(D);const T=typeof D=="number"?D:parseFloat(D);return z>0?T/z*100:T});A.some((W,F)=>Math.abs(W-(p[F]??0))>.01)&&b(A)}),i.useEffect(()=>{if(!h.current)return;const H=g?h.current.offsetHeight:h.current.offsetWidth;if(H===0)return;let z=!1;const A=p.map((M,W)=>{const F=m[W];if(F&&F.size===void 0&&F.defaultSize!==void 0){const D=F.defaultSize;if(typeof D=="number"&&D>100)return z=!0,D/H*100}return M});z&&b(A)},[]);const S=i.useCallback(H=>{if(!h.current)return H;const z=g?h.current.offsetHeight:h.current.offsetWidth;return H.map((A,M)=>{const W=m[M];if(!W)return A;const F=dn(W.min,z),D=dn(W.max,z),T=F!==void 0?F/z*100:0,O=D!==void 0?D/z*100:100;return Math.min(Math.max(A,T),O)})},[g,m]),L=i.useCallback(H=>z=>{if(z.preventDefault(),!h.current||!m[H]?.resizable||!m[H+1]?.resizable)return;const A=g?h.current.offsetHeight:h.current.offsetWidth,M=g?z.clientY:z.clientX;w.current={barIndex:H,startPos:M,startSizes:[...p],containerSize:A},k(!0),l?.(p),o&&(B.current=[...p])},[g,m,p,l,o]);i.useEffect(()=>{if(!y)return;const H=A=>{if(!w.current)return;const{barIndex:M,startPos:W,startSizes:F,containerSize:D}=w.current,Y=((g?A.clientY:A.clientX)-W)/D*100,X=[...F];X[M]=F[M]+Y,X[M+1]=F[M+1]-Y;const _=[...X],G=F[M]+F[M+1],Q=S(_);_[M]=Q[M],_[M+1]=G-_[M];const N=S(_);if(_[M+1]=N[M+1],_[M]=G-_[M+1],o){if(B.current=_,R.current&&w.current){const le=m.length-1,oe=w.current.containerSize-le*12,K=_.slice(0,w.current.barIndex+1).reduce((re,Te)=>re+Te,0)/100*oe+w.current.barIndex*12+6;g?(R.current.style.top=`${K}px`,R.current.style.left="0"):(R.current.style.left=`${K}px`,R.current.style.top="0"),R.current.style.display="block"}}else b(_),s?.(_)},z=()=>{R.current&&(R.current.style.display="none"),o&&B.current&&(b(B.current),s?.(B.current),B.current=null),k(!1),w.current=null,a?.(p)};return document.addEventListener("mousemove",H),document.addEventListener("mouseup",z),()=>{document.removeEventListener("mousemove",H),document.removeEventListener("mouseup",z)}},[y,g,S,o,p,s,a]);const $=i.useCallback(H=>{j(z=>{const A=[...z];if(A[H]){const M=C.current[H]||100/x;b(W=>{const F=[...W],D=H===0?1:H-1;return F[D]-=M-F[H],F[H]=M,s?.(F),F}),A[H]=!1}else C.current[H]=p[H],b(M=>{const W=[...M],F=H===0?1:H-1;return W[F]+=W[H],W[H]=0,s?.(W),W}),A[H]=!0;return A})},[x,p,s]),I=p,P=V({display:"flex",flexDirection:g?"column":"row",width:"100%",height:"100%",overflow:"hidden",position:"relative"},d?.root,u),E={position:"fixed",inset:0,zIndex:9999,cursor:g?"row-resize":"col-resize"};return t.jsxs("div",{ref:h,style:P,className:Ve(c,f?.root),children:[y&&t.jsx("div",{style:E}),o&&t.jsx("div",{ref:R,style:{display:"none",position:"absolute",...g?{left:0,right:0,height:2}:{top:0,bottom:0,width:2},backgroundColor:n.colorBorder,zIndex:10,pointerEvents:"none",transform:g?"translateY(-50%)":"translateX(-50%)"}}),m.map((H,z)=>{const A={flexGrow:0,flexShrink:1,flexBasis:`${I[z]}%`,minWidth:0,minHeight:0,overflow:"auto",transition:y?"none":"flex-basis 0.15s ease",...d?.panel,...H.style},M=(W,F)=>{const D=W==="start"?F:F+1,T=m[D];return T?typeof T.collapsible=="boolean"?T.collapsible:typeof T.collapsible=="object"?W==="start"?!!T.collapsible.start:!!T.collapsible.end:!1:!1};return t.jsxs("div",{style:{display:"contents"},children:[t.jsx("div",{style:A,className:Ve(H.className,f?.panel),children:H.children}),z<x-1&&t.jsx($a,{isVertical:g,onMouseDown:L(z),collapsibleStart:M("end",z)||typeof m[z]?.collapsible=="boolean"&&!!m[z]?.collapsible,collapsibleEnd:M("start",z)||typeof m[z+1]?.collapsible=="boolean"&&!!m[z+1]?.collapsible,onCollapseStart:()=>$(z),onCollapseEnd:()=>$(z+1),isStartCollapsed:v[z],isEndCollapsed:v[z+1],barClassName:f?.bar,barStyle:d?.bar,collapseButtonClassName:f?.collapseButton,collapseButtonStyle:d?.collapseButton})]},z)})]})}const Da=Object.assign(Pa,{Panel:hs});function za(){return window}function Wa(e){return e===window?window.scrollY||document.documentElement.scrollTop:e.scrollTop}function un(e,r){if(r===window)return e.getBoundingClientRect().top+window.scrollY;const o=r,s=o.getBoundingClientRect();return e.getBoundingClientRect().top-s.top+o.scrollTop}function ps(e){const r=[];for(const o of e)r.push(o),o.children&&r.push(...ps(o.children));return r}function Ha({items:e=[],direction:r="vertical",offsetTop:o=0,targetOffset:s,bounds:l=5,getContainer:a=za,getCurrentAnchor:c,onChange:u,onClick:f,replace:d=!1,className:h,style:g,classNames:m,styles:x}){const[p,b]=i.useState(""),v=i.useRef(null),j=i.useRef(null),C=i.useRef(new Map),w=i.useRef(!1),y=i.useRef(p);y.current=p;const k=r==="vertical",B=ps(e),R=s??o,S=i.useCallback((z,A)=>{A?C.current.set(z,A):C.current.delete(z)},[]),L=i.useCallback(()=>{if(w.current)return;if(c){const W=c(y.current);W!==y.current&&(b(W),u?.(W));return}const z=a(),A=Wa(z)+o+l;let M="";for(const W of B){if(!W.href.startsWith("#"))continue;const F=W.href.slice(1),D=document.getElementById(F);if(!D)continue;un(D,z)<=A&&(M=W.href)}!M&&B.length>0&&(M=B[0].href),M!==y.current&&(b(M),u?.(M))},[B,l,a,c,o,u]);i.useEffect(()=>{const z=a(),A=()=>{L()};return z.addEventListener("scroll",A,{passive:!0}),L(),()=>{z.removeEventListener("scroll",A)}},[L,a]),i.useEffect(()=>{if(!v.current||!j.current)return;const z=C.current.get(p);if(!z){v.current.style.opacity="0";return}const A=j.current.getBoundingClientRect(),M=z.getBoundingClientRect();k?(v.current.style.top=`${M.top-A.top}px`,v.current.style.height=`${M.height}px`):(v.current.style.left=`${M.left-A.left}px`,v.current.style.width=`${M.width}px`),v.current.style.opacity="1",k||z.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},[p,k]);const $=i.useCallback((z,A,M)=>{if(f?.(z,{title:M,href:A}),!A.startsWith("#"))return;z.preventDefault();const W=A.slice(1),F=document.getElementById(W);if(!F)return;w.current=!0;const D=a(),O=un(F,D)-R;D===window?window.scrollTo({top:O,behavior:"smooth"}):D.scrollTo({top:O,behavior:"smooth"}),b(A),u?.(A),d?window.history.replaceState(null,"",A):window.history.pushState(null,"",A),setTimeout(()=>{w.current=!1},500)},[a,f,u,d,R]),I=(z,A=0)=>z.map(M=>{const W=p===M.href,F=k?{display:"flex",alignItems:"center",minHeight:"2.75rem",padding:`0.25rem 0 0.25rem ${A+1}rem`,color:W?n.colorPrimary:n.colorTextMuted,textDecoration:"none",fontSize:"0.875rem",lineHeight:"1.375rem",transition:"color 0.15s ease",cursor:"pointer",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}:{display:"inline-flex",alignItems:"center",minHeight:"2.75rem",padding:"0.25rem 1rem",color:W?n.colorPrimary:n.colorTextMuted,textDecoration:"none",fontSize:"0.875rem",lineHeight:"1.375rem",transition:"color 0.15s ease",cursor:"pointer",whiteSpace:"nowrap"},D=t.jsx("a",{ref:T=>S(M.href,T),href:M.href,style:{...F,...x?.link},className:m?.link,onClick:T=>$(T,M.href,M.title),children:M.title});return t.jsxs("div",{style:k?{}:{display:"inline-block"},children:[typeof M.title=="string"?t.jsx(Wt,{content:M.title,delay:600,children:D}):D,k&&M.children&&M.children.length>0&&t.jsx("div",{children:I(M.children,A+1)})]},M.key)}),P=V(k?{position:"relative",paddingLeft:2,overflow:"hidden"}:{position:"relative",display:"flex",flexWrap:"wrap",paddingBottom:2,overflow:"hidden"},x?.root,g),E=k?{position:"absolute",left:0,top:0,bottom:0,width:2,backgroundColor:n.colorBorder,borderRadius:1}:{position:"absolute",bottom:0,left:0,right:0,height:2,backgroundColor:n.colorBorder,borderRadius:1},H=k?{position:"absolute",left:0,width:2,backgroundColor:n.colorPrimary,borderRadius:1,transition:"top 0.15s ease, height 0.15s ease, opacity 0.15s ease",opacity:0,zIndex:1}:{position:"absolute",bottom:0,height:2,backgroundColor:n.colorPrimary,borderRadius:1,transition:"left 0.15s ease, width 0.15s ease, opacity 0.15s ease",opacity:0,zIndex:1};return t.jsxs("div",{ref:j,style:P,className:Ve(h,m?.root),children:[t.jsx("div",{style:{...E,...x?.track},className:m?.track}),t.jsx("div",{ref:v,style:{...H,...x?.indicator},className:m?.indicator}),I(e)]})}const Fa=Ha;function Aa(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{marginLeft:"0.125rem"},children:t.jsx("polyline",{points:"6 9 12 15 18 9"})})}function Oa({items:e,style:r,className:o}){const s={position:"absolute",top:"100%",left:0,marginTop:"0.25rem",minWidth:"7.5rem",backgroundColor:n.colorBg,border:`1px solid ${n.colorBorder}`,borderRadius:"0.375rem",boxShadow:n.shadowMd,padding:"0.25rem 0",zIndex:1050,maxHeight:"min(16rem, 40vh)",overflowY:"auto",overscrollBehavior:"contain",...r},l={display:"flex",alignItems:"center",gap:"0.375rem",padding:"0.625rem 0.75rem",minHeight:"2.75rem",fontSize:"0.875rem",color:n.colorText,textDecoration:"none",cursor:"pointer",border:"none",backgroundColor:"transparent",width:"100%",textAlign:"left"};return t.jsx("div",{style:s,className:o,children:e.map(a=>{const c=t.jsxs(t.Fragment,{children:[a.icon&&t.jsx("span",{style:{display:"inline-flex",fontSize:"0.875rem"},children:a.icon}),a.title]});return a.href?t.jsx("a",{href:a.href,style:l,onClick:a.onClick,onMouseEnter:u=>{u.currentTarget.style.backgroundColor=n.colorBgMuted},onMouseLeave:u=>{u.currentTarget.style.backgroundColor="transparent"},children:c},a.key):t.jsx("span",{style:l,onClick:a.onClick,onMouseEnter:u=>{u.currentTarget.style.backgroundColor=n.colorBgMuted},onMouseLeave:u=>{u.currentTarget.style.backgroundColor="transparent"},children:c},a.key)})})}function Na({items:e=[],separator:r="/",itemRender:o,params:s,className:l,style:a,classNames:c,styles:u}){const[f,d]=i.useState(null),h=[];e.forEach(p=>{p.path?h.push((h.length>0?h[h.length-1]+"/":"")+p.path):h.push(h.length>0?h[h.length-1]:"")});const g=V({fontSize:"0.875rem",color:n.colorTextMuted},u?.root,a),m={display:"flex",flexWrap:"wrap",alignItems:"center",margin:0,padding:0,listStyle:"none",...u?.list},x=(p,b)=>{const v=b===e.length-1;if(o)return o(p,s,e,h);const j=t.jsxs(t.Fragment,{children:[p.icon&&t.jsx("span",{style:{display:"inline-flex",marginRight:p.title?"0.25rem":0,fontSize:"0.875rem"},children:p.icon}),p.title,p.menu&&t.jsx(Aa,{})]}),C={display:"inline-flex",alignItems:"center",textDecoration:"none",transition:"color 0.2s ease"},w=u?.link?.color,y=w??n.colorTextMuted,k=w??n.colorPrimary,B=w??n.colorText;return v?t.jsx("span",{style:{...C,color:B,fontWeight:500,...u?.link,...p.style},className:Ve(p.className,c?.link),children:j}):p.href?t.jsx("a",{href:p.href,style:{...C,color:y,cursor:"pointer",...u?.link,...p.style},className:Ve(p.className,c?.link),onClick:p.onClick,onMouseEnter:R=>{R.currentTarget.style.color=k},onMouseLeave:R=>{R.currentTarget.style.color=y},children:j}):p.onClick?t.jsx("span",{style:{...C,color:y,cursor:"pointer",...u?.link,...p.style},className:Ve(p.className,c?.link),onClick:p.onClick,onMouseEnter:R=>{R.currentTarget.style.color=k},onMouseLeave:R=>{R.currentTarget.style.color=y},children:j}):t.jsx("span",{style:{...C,color:y,...u?.link,...p.style},className:Ve(p.className,c?.link),children:j})};return t.jsx("nav",{"aria-label":"breadcrumb",style:g,className:Ve(l,c?.root),children:t.jsx("ol",{style:m,className:c?.list,children:e.map((p,b)=>{const v=b===e.length-1,j=p.menu&&p.menu.items.length>0;return t.jsxs(i.Fragment,{children:[t.jsxs("li",{style:{display:"inline-flex",alignItems:"center",position:j?"relative":void 0,...u?.item},className:c?.item,"aria-current":v?"page":void 0,onMouseEnter:j?()=>d(b):void 0,onMouseLeave:j?()=>d(null):void 0,children:[x(p,b),j&&f===b&&t.jsx(Oa,{items:p.menu.items,style:u?.overlay,className:c?.overlay})]}),!v&&t.jsx("li",{"aria-hidden":"true",style:{margin:"0 0.5rem",color:n.colorTextSubtle,userSelect:"none",...u?.separator},className:c?.separator,children:r})]},b)})})})}const Va={bottom:{top:"100%",left:"50%",transform:"translateX(-50%)",paddingTop:"0.25rem"},bottomLeft:{top:"100%",left:0,paddingTop:"0.25rem"},bottomRight:{top:"100%",right:0,paddingTop:"0.25rem"},top:{bottom:"100%",left:"50%",transform:"translateX(-50%)",paddingBottom:"0.25rem"},topLeft:{bottom:"100%",left:0,paddingBottom:"0.25rem"},topRight:{bottom:"100%",right:0,paddingBottom:"0.25rem"}},Ya={bottom:{top:-4,left:"50%",transform:"translateX(-50%) rotate(-135deg)"},bottomLeft:{top:-4,left:16,transform:"rotate(-135deg)"},bottomRight:{top:-4,right:16,transform:"rotate(-135deg)"},top:{bottom:-4,left:"50%",transform:"translateX(-50%) rotate(45deg)"},topLeft:{bottom:-4,left:16,transform:"rotate(45deg)"},topRight:{bottom:-4,right:16,transform:"rotate(45deg)"}};function Ka(e,r){const o=r?0:6,s=e.startsWith("top");return`${e==="bottom"||e==="top"?"translateX(-50%) ":""}translateY(${s?o:-o}px)`}function _a(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"6 9 12 15 18 9"})})}function Xa(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"9 18 15 12 9 6"})})}function gs({items:e,globalOnClick:r,onCloseDropdown:o,classNames:s,styles:l,isSubmenu:a=!1}){const[c,u]=i.useState(null),f={minWidth:a?"8.75rem":"10rem",backgroundColor:n.colorBg,border:`1px solid ${n.colorBorder}`,borderRadius:"0.5rem",boxShadow:n.shadowMd,padding:"0.25rem 0",...a?{}:l?.overlay},d=(h,g)=>{h.disabled||(h.onClick?.({key:h.key,domEvent:g}),r?.({key:h.key,domEvent:g}),o())};return t.jsx("div",{style:f,className:a?void 0:s?.overlay,children:e.map(h=>h.type==="divider"?t.jsx("div",{style:{height:1,margin:"0.25rem 0",backgroundColor:n.colorBorder}},h.key):h.type==="group"?t.jsxs("div",{children:[t.jsx("div",{style:{padding:"0.3125rem 0.75rem",fontSize:"0.75rem",color:n.colorTextSubtle,fontWeight:600},children:h.title}),h.children?.map(g=>t.jsx(fn,{item:g,globalOnClick:r,onCloseDropdown:o,onItemClick:d,hoveredSubmenu:c,setHoveredSubmenu:u,classNames:s,styles:l},g.key))]},h.key):t.jsx(fn,{item:h,globalOnClick:r,onCloseDropdown:o,onItemClick:d,hoveredSubmenu:c,setHoveredSubmenu:u,classNames:s,styles:l},h.key))})}function fn({item:e,globalOnClick:r,onCloseDropdown:o,onItemClick:s,hoveredSubmenu:l,setHoveredSubmenu:a,classNames:c,styles:u}){const f=e.children&&e.children.length>0,d={display:"flex",alignItems:"center",gap:"0.5rem",padding:"0.375rem 0.75rem",fontSize:"0.875rem",minHeight:"2.75rem",cursor:e.disabled?"not-allowed":"pointer",color:e.danger?n.colorError:e.disabled?n.colorTextSubtle:n.colorText,opacity:e.disabled?.5:1,transition:"background-color 0.15s ease",position:f?"relative":void 0,...u?.item};return t.jsxs("div",{style:d,className:c?.item,onClick:!e.disabled&&!f?h=>s(e,h):void 0,onMouseEnter:h=>{e.disabled||(h.currentTarget.style.backgroundColor=e.danger?n.colorErrorBg:n.colorBgMuted),f&&a(e.key)},onMouseLeave:h=>{h.currentTarget.style.backgroundColor="transparent",f&&a(null)},children:[e.icon&&t.jsx("span",{style:{display:"inline-flex",fontSize:"0.875rem"},children:e.icon}),t.jsx("span",{style:{flex:1},children:e.label}),f&&t.jsx("span",{style:{display:"inline-flex",marginLeft:"0.25rem"},children:t.jsx(Xa,{})}),f&&l===e.key&&t.jsx("div",{style:{position:"absolute",left:"100%",top:-4,paddingLeft:"0.25rem"},children:t.jsx(gs,{items:e.children,globalOnClick:r,onCloseDropdown:o,classNames:c,styles:u,isSubmenu:!0})})]})}function ms({children:e,menu:r,trigger:o=["hover"],placement:s="bottomLeft",arrow:l=!1,open:a,onOpenChange:c,disabled:u=!1,dropdownRender:f,className:d,style:h,classNames:g,styles:m}){const[x,p]=i.useState(!1),[b,v]=i.useState(!1),[j,C]=i.useState(s),w=i.useRef(null),y=i.useRef(null),k=i.useRef(null),B=a!==void 0,R=B?a:x,S=T=>{u||(B||p(T),c?.(T))},L=()=>{w.current&&(clearTimeout(w.current),w.current=null),C(s),w.current=window.setTimeout(()=>{S(!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{v(!0)})})},100)},$=()=>{w.current&&(clearTimeout(w.current),w.current=null),v(!1),w.current=window.setTimeout(()=>{S(!1)},150)},I=()=>{R?$():L()};i.useLayoutEffect(()=>{if(!R||!k.current||!y.current)return;const T=k.current.getBoundingClientRect(),O=y.current.getBoundingClientRect(),Y=O.top,X=window.innerHeight-O.bottom,_=j.startsWith("top");!_&&T.bottom>window.innerHeight?Y>X&&C(G=>G.replace("bottom","top").replace("Bottom","Top")):_&&T.top<0&&X>Y&&C(G=>G.replace("top","bottom").replace("Top","Bottom"))}),i.useEffect(()=>{C(s)},[s]),i.useEffect(()=>()=>{w.current&&clearTimeout(w.current)},[]),i.useEffect(()=>{if(!R||!o.includes("click"))return;const T=O=>{y.current&&!y.current.contains(O.target)&&$()};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[R,o]);const P=T=>{o.includes("contextMenu")&&(T.preventDefault(),I())},E=()=>{o.includes("hover")&&L()},H=()=>{o.includes("hover")&&$()},z=()=>{o.includes("click")&&I()},A=r?t.jsx(gs,{items:r.items,globalOnClick:r.onClick,onCloseDropdown:$,classNames:g,styles:m}):null,M=f?f(A):A,W={position:"absolute",zIndex:1050,...Va[j],opacity:b?1:0,transform:Ka(j,b),transition:"opacity 0.15s ease-out, transform 0.15s ease-out"},F={position:"absolute",width:8,height:8,backgroundColor:n.colorBg,borderRight:`1px solid ${n.colorBorder}`,borderBottom:`1px solid ${n.colorBorder}`,...Ya[j],...m?.arrow},D=V({position:"relative",display:"inline-flex"},m?.root,h);return t.jsxs("div",{ref:y,style:D,className:Ve(d,g?.root),onMouseEnter:E,onMouseLeave:H,onContextMenu:P,children:[t.jsx("span",{onClick:z,style:{display:"inline-flex"},children:e}),R&&t.jsxs("div",{ref:k,style:W,children:[l&&t.jsx("div",{style:F,className:g?.arrow}),M]})]})}function Ga({children:e,menu:r,placement:o="bottomRight",trigger:s=["hover"],onClick:l,icon:a,disabled:c=!1,loading:u=!1,variant:f="primary",color:d,size:h="md",className:g,style:m,classNames:x,styles:p}){return t.jsxs("div",{style:V({display:"inline-flex",...m},p?.root),className:Ve(g,x?.root),children:[t.jsx(Wr,{variant:f,color:d,size:h,disabled:c,loading:u,onClick:l,style:{borderTopRightRadius:0,borderBottomRightRadius:0},children:e}),t.jsx(ms,{menu:r,trigger:s,placement:o,disabled:c,classNames:x,styles:p,children:t.jsx(Wr,{variant:f,color:d,size:h,disabled:c,icon:a||t.jsx(_a,{}),style:{borderTopLeftRadius:0,borderBottomLeftRadius:0,borderLeft:"1px solid rgba(255,255,255,0.2)",minWidth:"auto",paddingLeft:"0.5rem",paddingRight:"0.5rem"}})})]})}const Ua=Object.assign(ms,{Button:Ga});function uo(e){return"type"in e&&e.type==="divider"}function Fr(e){return"type"in e&&e.type==="group"}function xs(e){return!uo(e)&&!Fr(e)&&"children"in e&&Array.isArray(e.children)}function qa(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"9 18 15 12 9 6"})})}function hn(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"6 9 12 15 18 9"})})}function Qa({item:e,ctx:r}){const o={margin:"0.25rem 0",padding:0,listStyle:"none",borderTop:e.dashed?`1px dashed ${n.colorBorder}`:`1px solid ${n.colorBorder}`,...r.styles?.divider};return t.jsx("li",{role:"separator",style:o,className:r.classNames?.divider})}function Za({item:e,ctx:r,level:o}){const s={padding:"0.5rem 1rem",fontSize:"0.75rem",fontWeight:600,color:n.colorTextSubtle,lineHeight:"1.5",...r.styles?.groupTitle};return r.mode==="inline"&&!r.inlineCollapsed&&(s.paddingLeft=16+r.inlineIndent*o),t.jsxs("li",{role:"presentation",style:{listStyle:"none",...r.styles?.group},className:r.classNames?.group,children:[t.jsx("div",{style:s,className:r.classNames?.groupTitle,children:e.label}),t.jsx("ul",{role:"group",style:{listStyle:"none",margin:0,padding:0},children:e.children.map(l=>t.jsx(oo,{item:l,ctx:r,level:o,keyPath:[]},ro(l)))})]})}function Ja({item:e,ctx:r,level:o,keyPath:s}){const l=r.selectedKeys.includes(e.key),a=r.mode==="horizontal",c=r.mode==="vertical",u=r.mode==="inline",f=u&&r.inlineCollapsed,d=[e.key,...s],h=r.styles?.item?.color,g=r.styles?.item?.backgroundColor,{backgroundColor:m,...x}=r.styles?.item??{},p={display:"flex",alignItems:"center",gap:"0.5rem",padding:a?"0 1.25rem":"0.5rem 1rem",lineHeight:a?"2.875rem":"1.375rem",cursor:e.disabled?"not-allowed":"pointer",color:e.danger?n.colorError:l?h??n.colorPrimary:h??n.colorText,backgroundColor:l&&!a?g??n.colorPrimaryLight:"transparent",opacity:e.disabled?.5:1,transition:"color 0.2s, background-color 0.2s",listStyle:"none",position:"relative",whiteSpace:"nowrap",...x};u&&!f&&(p.paddingLeft=16+r.inlineIndent*o),f&&(p.justifyContent="center",p.padding="0.5rem 0"),l&&c&&(p.borderRight=`3px solid ${h??n.colorPrimary}`),l&&a&&(p.borderBottom=`2px solid ${h??n.colorPrimary}`);const b=w=>{if(e.disabled)return;const y=w.currentTarget;(!l||a)&&(y.style.backgroundColor=e.danger?n.colorErrorBg:n.colorBgMuted),a&&!l&&(y.style.color=e.danger?n.colorError:h??n.colorPrimary)},v=w=>{const y=w.currentTarget;l&&!a?y.style.backgroundColor=g??n.colorPrimaryLight:y.style.backgroundColor="transparent",a&&!l&&(y.style.color=e.danger?n.colorError:h??n.colorText)},j=w=>{e.disabled||r.onItemClick(e,d,w)},C=t.jsxs(t.Fragment,{children:[e.icon&&t.jsx("span",{style:{display:"inline-flex",flexShrink:0,fontSize:"0.875rem"},children:e.icon}),(!f||!e.icon)&&t.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:e.label})]});return t.jsx("li",{role:"menuitem",style:p,className:r.classNames?.item,title:f?void 0:e.title,onClick:j,onMouseEnter:b,onMouseLeave:v,children:f&&e.title?t.jsx(Wt,{content:e.title,position:"right",delay:100,children:C}):C})}function ec({item:e,ctx:r,level:o,keyPath:s}){const l=i.useRef(null),a=r.openKeys.includes(e.key),c=r.mode==="horizontal",u=r.mode==="inline",f=r.mode==="vertical",d=u&&r.inlineCollapsed,h=c||f||d,g=[e.key,...s],m=Lo(e.children,r.selectedKeys),x={display:"flex",alignItems:"center",gap:"0.5rem",padding:c?"0 1.25rem":"0.5rem 1rem",lineHeight:c?"2.875rem":"1.375rem",cursor:e.disabled?"not-allowed":"pointer",color:m?n.colorPrimary:n.colorText,opacity:e.disabled?.5:1,transition:"color 0.2s, background-color 0.2s",listStyle:"none",position:"relative",whiteSpace:"nowrap",...r.styles?.item};u&&!d&&(x.paddingLeft=16+r.inlineIndent*o),d&&(x.justifyContent="center",x.padding="0.5rem 0"),m&&c&&(x.borderBottom=`2px solid ${n.colorPrimary}`);const p=R=>{e.disabled||(R.currentTarget.style.backgroundColor=n.colorBgMuted,c&&(R.currentTarget.style.color=n.colorPrimary))},b=R=>{R.currentTarget.style.backgroundColor="transparent",c&&!m&&(R.currentTarget.style.color=n.colorText)},v=R=>{e.disabled||(R.stopPropagation(),(r.triggerSubMenuAction==="click"||u)&&r.onSubMenuToggle(e.key))},j=()=>{e.disabled||!h||r.triggerSubMenuAction==="hover"&&r.onSubMenuMouseEnter(e.key)},C=()=>{h&&r.triggerSubMenuAction==="hover"&&r.onSubMenuMouseLeave(e.key)},w=r.expandIcon??(h?c?t.jsx(hn,{}):t.jsx(qa,{}):t.jsx(hn,{})),y={display:"inline-flex",marginLeft:"auto",transition:"transform 0.2s",transform:a&&!h?"rotate(180deg)":"rotate(0deg)"},k={position:"absolute",zIndex:1050,listStyle:"none",margin:0,padding:"0.25rem 0",minWidth:"10rem",backgroundColor:n.colorBg,border:`1px solid ${n.colorBorder}`,borderRadius:"0.5rem",boxShadow:n.shadowMd,...c?{top:"100%",left:0,marginTop:"0.25rem"}:{left:"100%",top:0,marginLeft:"0.25rem"},...r.styles?.submenu},B={listStyle:"none",margin:0,padding:0,overflow:"hidden",transition:"max-height 0.2s ease, opacity 0.2s ease",maxHeight:a?1e3:0,opacity:a?1:0,...r.styles?.submenu};return t.jsxs("li",{role:"none",style:{listStyle:"none",position:h?"relative":void 0},onMouseEnter:j,onMouseLeave:C,children:[t.jsxs("div",{role:"menuitem","aria-expanded":a,style:x,className:r.classNames?.item,onClick:v,onMouseEnter:p,onMouseLeave:b,children:[e.icon&&t.jsx("span",{style:{display:"inline-flex",flexShrink:0,fontSize:"0.875rem"},children:e.icon}),(!d||!e.icon)&&t.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:e.label}),(!d||!e.icon)&&t.jsx("span",{style:y,children:w})]}),h&&a&&t.jsx("ul",{ref:l,role:"menu",style:k,className:r.classNames?.submenu,children:e.children.map(R=>t.jsx(oo,{item:R,ctx:r,level:0,keyPath:g},ro(R)))}),!h&&t.jsx("ul",{role:"menu",style:B,className:r.classNames?.submenu,children:e.children.map(R=>t.jsx(oo,{item:R,ctx:r,level:o+1,keyPath:g},ro(R)))})]})}function ro(e){return"key"in e&&e.key!=null?String(e.key):uo(e)?`divider-${Math.random()}`:Fr(e)?`group-${Math.random()}`:`item-${Math.random()}`}function Lo(e,r){for(const o of e)if(!uo(o)&&!Fr(o)&&"key"in o&&r.includes(o.key)||xs(o)&&Lo(o.children,r)||Fr(o)&&Lo(o.children,r))return!0;return!1}function oo({item:e,ctx:r,level:o,keyPath:s}){return uo(e)?t.jsx(Qa,{item:e,ctx:r}):Fr(e)?t.jsx(Za,{item:e,ctx:r,level:o}):xs(e)?t.jsx(ec,{item:e,ctx:r,level:o,keyPath:s}):t.jsx(Ja,{item:e,ctx:r,level:o,keyPath:s})}function tc({items:e=[],mode:r="vertical",selectedKeys:o,defaultSelectedKeys:s=[],openKeys:l,defaultOpenKeys:a=[],multiple:c=!1,selectable:u=!0,inlineCollapsed:f=!1,inlineIndent:d=24,triggerSubMenuAction:h="hover",onClick:g,onSelect:m,onDeselect:x,onOpenChange:p,expandIcon:b,className:v,style:j,classNames:C,styles:w}){const[y,k]=i.useState(s),B=o??y,[R,S]=i.useState(a),L=l??R,$=i.useRef(new Map);i.useEffect(()=>()=>{$.current.forEach(O=>clearTimeout(O))},[]);const I=i.useRef(L);I.current=L;const P=O=>{l===void 0&&S(O),p?.(O)},M={mode:r,selectedKeys:B,openKeys:L,inlineCollapsed:f,inlineIndent:d,triggerSubMenuAction:h,expandIcon:b,selectable:u,multiple:c,classNames:C,styles:w,onItemClick:(O,Y,X)=>{const _={key:O.key,keyPath:Y,domEvent:X};if(O.onClick?.(_),g?.(_),u){const G=B.includes(O.key);let Q;c?G?(Q=B.filter(N=>N!==O.key),x?.({..._,selectedKeys:Q})):(Q=[...B,O.key],m?.({..._,selectedKeys:Q})):(Q=[O.key],G||m?.({..._,selectedKeys:Q})),o===void 0&&k(Q)}},onSubMenuToggle:O=>{const Y=I.current,X=Y.includes(O);P(X?Y.filter(_=>_!==O):[...Y,O])},onSubMenuMouseEnter:O=>{const Y=new Set;$.current.forEach((G,Q)=>{clearTimeout(G),Y.add(Q)}),$.current.clear();let _=I.current.filter(G=>!Y.has(G));_.includes(O)||(_=[..._,O]),P(_)},onSubMenuMouseLeave:O=>{const Y=window.setTimeout(()=>{const X=I.current;P(X.filter(_=>_!==O)),$.current.delete(O)},150);$.current.set(O,Y)}},W=r==="horizontal",F=r==="inline",D={listStyle:"none",margin:0,padding:W?0:"0.25rem 0",backgroundColor:n.colorBg,color:n.colorText,fontSize:"0.875rem",overflow:"hidden",...W?{display:"flex",alignItems:"center",borderBottom:`1px solid ${n.colorBorder}`}:{borderRight:`1px solid ${n.colorBorder}`},...F&&f?{width:"3rem",overflow:"hidden"}:{}},T=V(D,w?.root,j);return t.jsx("ul",{role:W?"menubar":"menu",style:T,className:Ve(v,C?.root),children:e.map(O=>t.jsx(oo,{item:O,ctx:M,level:0,keyPath:[]},ro(O)))})}function pn(e,r,o){return Math.max(r,Math.min(o,e))}function rc(e,r,o){if(r<=0)return[];const s=o?2:3,l=[];if(r<=s*2+3){for(let u=1;u<=r;u++)l.push(u);return l}l.push(1);const a=Math.max(2,e-s),c=Math.min(r-1,e+s);a>2&&l.push("jump-prev");for(let u=a;u<=c;u++)l.push(u);return c<r-1&&l.push("jump-next"),r>1&&l.push(r),l}function mr({page:e,type:r,isActive:o,disabled:s,size:l,showTitle:a,itemRender:c,itemStyle:u,itemClassName:f,onClick:d}){const h=l==="small",g=r==="jump-prev"||r==="jump-next",m=h?"1.5rem":"2rem",x=h?"0.75rem":"0.875rem",p=h?12:14,b={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:m,height:m,fontSize:x,lineHeight:1,padding:"0 0.25rem",border:g?"none":"1px solid",borderColor:g?"transparent":o?n.colorPrimary:n.colorBorder,borderRadius:"0.375rem",backgroundColor:g?"transparent":o?n.colorPrimary:n.colorBg,color:g?n.colorTextMuted:o?n.colorPrimaryContrast:n.colorText,fontWeight:o?600:400,cursor:s?"not-allowed":"pointer",opacity:s?.5:1,transition:"all 0.2s",userSelect:"none",...u};let v;a&&(r==="prev"?v="Previous Page":r==="next"?v="Next Page":r==="jump-prev"?v="Previous 5 Pages":r==="jump-next"?v="Next 5 Pages":v=String(e));let j;r==="prev"?j=t.jsx("svg",{width:p,height:p,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"15 18 9 12 15 6"})}):r==="next"?j=t.jsx("svg",{width:p,height:p,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"9 6 15 12 9 18"})}):g?j=t.jsx("span",{style:{letterSpacing:"0.125rem",fontWeight:700},children:"•••"}):j=e;const C=r==="prev"||r==="next"||r==="jump-prev"||r==="jump-next",w=t.jsx("button",{type:"button",disabled:s,"aria-label":r==="prev"?"Previous":r==="next"?"Next":void 0,"aria-current":o?"page":void 0,style:b,className:f,onMouseEnter:k=>{if(s||o)return;const B=k.currentTarget;g||(B.style.borderColor=n.colorPrimary),B.style.color=n.colorPrimary},onMouseLeave:k=>{if(s||o)return;const B=k.currentTarget;g?B.style.color=n.colorTextMuted:(B.style.borderColor=n.colorBorder,B.style.color=n.colorText)},children:j}),y=c?c(e,r,w):w;return t.jsx("li",{style:{listStyle:"none",cursor:s?"not-allowed":"pointer"},onClick:s?void 0:d,children:v&&C?t.jsx(Wt,{content:v,delay:300,children:y}):y})}function oc({value:e,options:r,disabled:o,size:s,onChange:l,itemsPerPage:a="/ page"}){const[c,u]=i.useState(!1),f=i.useRef(null),d=s==="small",h=d?"1.5rem":"2rem",g=d?"0.75rem":"0.875rem";i.useEffect(()=>{if(!c)return;const b=v=>{f.current&&!f.current.contains(v.target)&&u(!1)};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[c]);const m={display:"inline-flex",alignItems:"center",gap:"0.375rem",height:h,border:"1px solid",borderColor:c?n.colorPrimary:n.colorBorder,borderRadius:"0.375rem",backgroundColor:n.colorBg,color:n.colorText,fontSize:g,padding:d?"0 0.5rem":"0 0.75rem",cursor:o?"not-allowed":"pointer",opacity:o?.5:1,transition:"border-color 0.2s",userSelect:"none",whiteSpace:"nowrap"},x={position:"absolute",top:"100%",left:0,marginTop:"0.25rem",minWidth:"100%",backgroundColor:n.colorBg,border:`1px solid ${n.colorBorder}`,borderRadius:"0.5rem",boxShadow:n.shadowMd,padding:"0.25rem 0",zIndex:1050},p=b=>{l(b),u(!1)};return t.jsxs("div",{ref:f,style:{position:"relative"},children:[t.jsxs("div",{role:"button",tabIndex:o?-1:0,style:m,onClick:()=>{o||u(!c)},onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),o||u(!c))},onMouseEnter:b=>{o||c||(b.currentTarget.style.borderColor=n.colorPrimary)},onMouseLeave:b=>{o||c||(b.currentTarget.style.borderColor=n.colorBorder)},children:[t.jsxs("span",{children:[e," ",a]}),t.jsx("svg",{width:10,height:10,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{transition:"transform 0.2s",transform:c?"rotate(180deg)":"rotate(0deg)",opacity:.6},children:t.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),c&&t.jsx("div",{style:x,children:r.map(b=>t.jsxs("div",{style:{padding:"0.375rem 0.75rem",fontSize:g,cursor:"pointer",color:b===e?n.colorPrimary:n.colorText,fontWeight:b===e?600:400,transition:"background-color 0.15s ease",whiteSpace:"nowrap"},onClick:()=>p(b),onMouseEnter:v=>{v.currentTarget.style.backgroundColor=n.colorBgMuted},onMouseLeave:v=>{v.currentTarget.style.backgroundColor="transparent"},children:[b," ",a]},b))})]})}function ys({total:e=0,current:r,defaultCurrent:o=1,pageSize:s,defaultPageSize:l=10,pageSizeOptions:a=[10,20,50,100],showSizeChanger:c,showQuickJumper:u=!1,showTotal:f,simple:d=!1,size:h="default",disabled:g=!1,hideOnSinglePage:m=!1,showLessItems:x=!1,showTitle:p=!0,itemRender:b,onChange:v,onShowSizeChange:j,className:C,style:w,classNames:y,styles:k}){const{locale:B}=Gt(),R=B.Pagination,[S,L]=i.useState(o),[$,I]=i.useState(l),P=r??S,E=s??$,H=Math.max(1,Math.ceil(e/E)),z=pn(P,1,H),A=c??e>50,M=xe=>{const ge=pn(xe,1,H);ge!==z&&(r===void 0&&L(ge),v?.(ge,E))},W=xe=>{s===void 0&&I(xe);const ge=Math.max(1,Math.ceil(e/xe)),Ie=Math.min(z,ge);r===void 0&&L(Ie),j?.(Ie,xe),v?.(Ie,xe)},[F,D]=i.useState(""),T=xe=>{if(xe.key==="Enter"){const ge=parseInt(F,10);isNaN(ge)||M(ge),D("")}},[O,Y]=i.useState(String(z));d&&O!==String(z)&&document.activeElement?.tagName!=="INPUT"&&Y(String(z));const X=xe=>{if(xe.key==="Enter"){const ge=parseInt(O,10);isNaN(ge)||M(ge)}},_=()=>{const xe=parseInt(O,10);isNaN(xe)||M(xe),Y(String(z))};if(m&&H<=1)return null;const G=h==="small",Q=G?"1.5rem":"2rem",N=G?"0.75rem":"0.875rem",le=G?"0.25rem":"0.5rem",oe={display:"flex",alignItems:"center",gap:le,color:n.colorText,fontSize:N},q=V(oe,k?.root,w),K={width:"3.125rem",height:Q,border:`1px solid ${n.colorBorder}`,borderRadius:"0.375rem",textAlign:"center",backgroundColor:n.colorBg,color:n.colorText,fontSize:N,outline:"none",transition:"border-color 0.2s"},re=xe=>{xe.currentTarget.style.borderColor=n.colorPrimary},Te=xe=>{xe.currentTarget.style.borderColor=n.colorBorder};if(d)return t.jsx("nav",{"aria-label":"pagination",style:q,className:Ve(C,y?.root),children:t.jsxs("ul",{style:{display:"flex",alignItems:"center",gap:le,listStyle:"none",margin:0,padding:0},children:[t.jsx(mr,{page:z-1,type:"prev",isActive:!1,disabled:g||z<=1,size:h,showTitle:p,itemRender:b,itemStyle:k?.item,itemClassName:y?.item,onClick:()=>M(z-1)}),t.jsxs("li",{style:{display:"flex",alignItems:"center",gap:"0.25rem",listStyle:"none"},children:[t.jsx("input",{type:"text",value:O,disabled:g,style:{...K,...g?{opacity:.5,cursor:"not-allowed"}:{}},onChange:xe=>Y(xe.target.value),onKeyDown:X,onBlur:_,onFocus:re}),t.jsx("span",{style:{color:n.colorTextMuted},children:"/"}),t.jsx("span",{style:{color:n.colorTextMuted},children:H})]}),t.jsx(mr,{page:z+1,type:"next",isActive:!1,disabled:g||z>=H,size:h,showTitle:p,itemRender:b,itemStyle:k?.item,itemClassName:y?.item,onClick:()=>M(z+1)})]})});const Ce=rc(z,H,x),Le=5,ue=e===0?0:(z-1)*E+1,ze=Math.min(z*E,e);return t.jsxs("nav",{"aria-label":"pagination",style:q,className:Ve(C,y?.root),children:[f&&t.jsx("span",{style:{color:n.colorTextMuted,fontSize:N,marginRight:"0.25rem"},children:f(e,[ue,ze])}),t.jsxs("ul",{style:{display:"flex",alignItems:"center",gap:le,listStyle:"none",margin:0,padding:0},children:[t.jsx(mr,{page:z-1,type:"prev",isActive:!1,disabled:g||z<=1,size:h,showTitle:p,itemRender:b,itemStyle:k?.item,itemClassName:y?.item,onClick:()=>M(z-1)}),Ce.map((xe,ge)=>xe==="jump-prev"||xe==="jump-next"?t.jsx(mr,{page:xe==="jump-prev"?Math.max(1,z-Le):Math.min(H,z+Le),type:xe,isActive:!1,disabled:g,size:h,showTitle:p,itemRender:b,itemStyle:k?.item,itemClassName:y?.item,onClick:()=>{M(xe==="jump-prev"?Math.max(1,z-Le):Math.min(H,z+Le))}},`${xe}-${ge}`):t.jsx(mr,{page:xe,type:"page",isActive:xe===z,disabled:g,size:h,showTitle:p,itemRender:b,itemStyle:k?.item,itemClassName:y?.item,onClick:()=>M(xe)},xe)),t.jsx(mr,{page:z+1,type:"next",isActive:!1,disabled:g||z>=H,size:h,showTitle:p,itemRender:b,itemStyle:k?.item,itemClassName:y?.item,onClick:()=>M(z+1)})]}),(A||u)&&t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:le,...k?.options},className:y?.options,children:[A&&t.jsx(oc,{value:E,options:a,disabled:g,size:h,onChange:W,itemsPerPage:R?.itemsPerPage}),u&&t.jsxs("span",{style:{display:"flex",alignItems:"center",gap:"0.25rem",color:n.colorText,fontSize:N},children:[R?.jumpTo??"Go to",t.jsx("input",{type:"text",value:F,disabled:g,style:{...K,...g?{opacity:.5,cursor:"not-allowed"}:{}},onChange:xe=>D(xe.target.value),onKeyDown:T,onFocus:re,onBlur:xe=>{Te(xe)}})]})]})]})}const nc=({size:e})=>t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"20 6 9 17 4 12"})}),sc=({size:e})=>t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]});function ic({percent:e,ringSize:r,iconSize:o}){const l=(r-3)/2,a=2*Math.PI*l,c=a-e/100*a,f=o/2-2-r/2;return t.jsxs("svg",{width:r,height:r,style:{position:"absolute",top:f,left:f,transform:"rotate(-90deg)"},children:[t.jsx("circle",{cx:r/2,cy:r/2,r:l,fill:"none",stroke:n.colorBorder,strokeWidth:3}),t.jsx("circle",{cx:r/2,cy:r/2,r:l,fill:"none",stroke:n.colorPrimary,strokeWidth:3,strokeDasharray:a,strokeDashoffset:c,strokeLinecap:"round",style:{transition:"stroke-dashoffset 0.3s"}})]})}function lc(e){switch(e){case"finish":return n.colorPrimary;case"error":return n.colorError;default:return n.colorBorder}}function ac({item:e,index:r,stepStatus:o,isFirst:s,isLast:l,isClickable:a,isVertical:c,isNavigation:u,isDot:f,progressDotRender:d,showPercent:h,percent:g,size:m,labelVertical:x,prevTailColor:p,classNames:b,styles:v,onClick:j}){const C=m==="small",w=C?"1.5rem":"2rem",y=C?24:32,k=C?"0.75rem":"0.875rem",B=C?12:14,R=C?"0.875rem":"1rem",S=C?"0.75rem":"0.875rem",L="0.5rem",$=8,P={wait:{iconBg:n.colorBg,iconBorder:n.colorBorder,iconColor:n.colorTextMuted,titleColor:n.colorTextMuted,descColor:n.colorTextMuted,tailColor:n.colorBorder},process:{iconBg:n.colorPrimary,iconBorder:n.colorPrimary,iconColor:n.colorPrimaryContrast,titleColor:n.colorText,descColor:n.colorTextMuted,tailColor:n.colorBorder},finish:{iconBg:n.colorBg,iconBorder:n.colorPrimary,iconColor:n.colorPrimary,titleColor:n.colorText,descColor:n.colorTextMuted,tailColor:n.colorPrimary},error:{iconBg:n.colorBg,iconBorder:n.colorError,iconColor:n.colorError,titleColor:n.colorError,descColor:n.colorError,tailColor:n.colorError}}[o],E=a&&!e.disabled?j:void 0,H=a&&!e.disabled?"pointer":e.disabled?"not-allowed":"default";let z;if(f){const T={width:L,height:L,borderRadius:"50%",backgroundColor:o==="wait"?n.colorBorder:P.iconBorder,transition:"all 0.3s"},O=t.jsx("span",{style:T});typeof d=="function"?z=d(O,{index:r,status:o,title:e.title,description:e.description}):z=O}else e.icon?z=e.icon:o==="finish"?z=t.jsx(nc,{size:B}):o==="error"?z=t.jsx(sc,{size:B}):z=r+1;const A=f?{display:"flex",alignItems:"center",justifyContent:"center",width:L,height:L,position:"relative",flexShrink:0,...v?.icon}:{display:"flex",alignItems:"center",justifyContent:"center",width:w,height:w,borderRadius:"50%",border:`2px solid ${P.iconBorder}`,backgroundColor:P.iconBg,color:P.iconColor,fontSize:k,fontWeight:600,flexShrink:0,transition:"all 0.3s",position:"relative",...v?.icon},M=t.jsxs("div",{style:A,className:b?.icon,children:[z,h&&!f&&t.jsx(ic,{percent:g,ringSize:y+10,iconSize:y})]}),W={fontSize:R,fontWeight:o==="process"?600:400,color:P.titleColor,lineHeight:1.5,whiteSpace:"nowrap"},F=T=>t.jsxs("div",{style:{...T,...v?.content},className:b?.content,children:[t.jsxs("div",{style:W,children:[e.title,e.subTitle&&t.jsx("span",{style:{fontSize:S,color:n.colorTextMuted,marginLeft:"0.5rem",fontWeight:400},children:e.subTitle})]}),e.description&&t.jsx("div",{style:{fontSize:S,color:P.descColor,marginTop:"0.125rem",lineHeight:1.5},children:e.description})]}),D=T=>t.jsx("div",{style:{flex:1,height:1,backgroundColor:T,transition:"background-color 0.3s",...v?.tail},className:b?.tail});if(u){const T=C?16:20;return t.jsxs("div",{style:{flex:1,display:"flex",alignItems:"center",position:"relative",padding:C?"0.5rem 1rem":"0.75rem 1.5rem",backgroundColor:o==="process"?n.colorBgMuted:"transparent",cursor:H,opacity:e.disabled?.5:1,transition:"background-color 0.2s",...v?.step},className:b?.step,onClick:E,onMouseEnter:O=>{!a||e.disabled||o==="process"||(O.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:O=>{!a||e.disabled||o==="process"||(O.currentTarget.style.backgroundColor="transparent")},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1},children:[t.jsx("span",{style:{fontSize:R,fontWeight:o==="process"?600:400,color:P.titleColor},children:e.title}),e.description&&t.jsx("span",{style:{fontSize:S,color:P.descColor,marginTop:"0.125rem"},children:e.description})]}),o==="process"&&t.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,height:2,backgroundColor:n.colorPrimary}}),!l&&t.jsx("div",{style:{position:"absolute",right:0,top:"50%",transform:"translateY(-50%) translateX(50%)",zIndex:1,width:0,height:0,borderTop:`${T/2}px solid transparent`,borderBottom:`${T/2}px solid transparent`,borderLeft:`${T/2}px solid ${n.colorBorder}`}})]})}if(!c&&x){const T=f?"0.25rem":"0.5rem";return t.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",cursor:H,opacity:e.disabled?.5:1,...v?.step},className:b?.step,onClick:E,children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",width:"100%"},children:[t.jsx("div",{style:{flex:1,display:"flex",alignItems:"center",paddingRight:T},children:!s&&p&&D(p)}),M,t.jsx("div",{style:{flex:1,display:"flex",alignItems:"center",paddingLeft:T},children:!l&&D(P.tailColor)})]}),F({display:"flex",flexDirection:"column",alignItems:"center",marginTop:f?"0.25rem":"0.5rem"})]})}return c?t.jsxs("div",{style:{display:"flex",alignItems:"flex-start",position:"relative",paddingBottom:l?0:"1.5rem",cursor:H,opacity:e.disabled?.5:1,...v?.step},className:b?.step,onClick:E,children:[M,F({display:"flex",flexDirection:"column",marginLeft:f?"0.75rem":"0.5rem"}),!l&&t.jsx("div",{style:{position:"absolute",left:f?$/2:y/2,top:f?$+4:y+4,bottom:0,width:1,backgroundColor:P.tailColor,transition:"background-color 0.3s",...v?.tail},className:b?.tail})]}):t.jsxs("div",{style:{flex:l?"none":1,display:"flex",alignItems:"flex-start",cursor:H,opacity:e.disabled?.5:1,...v?.step},className:b?.step,onClick:E,children:[M,F({display:"flex",flexDirection:"column",marginLeft:"0.5rem"}),!l&&t.jsx("div",{style:{flex:1,display:"flex",alignItems:"center",height:w,minWidth:"1.5rem",padding:"0 0.5rem"},children:D(P.tailColor)})]})}function cc({items:e=[],current:r=0,direction:o="horizontal",size:s="default",status:l="process",type:a="default",labelPlacement:c="horizontal",progressDot:u=!1,percent:f,initial:d=0,onChange:h,className:g,style:m,classNames:x,styles:p}){const b=o==="vertical",v=a==="navigation",j=!!u&&!v,C=!!h,w=j||c==="vertical",y=typeof u=="function"?u:void 0,k=(S,L)=>L.status?L.status:S<r?"finish":S===r?l:"wait",B={display:"flex",flexDirection:b?"column":"row",width:"100%"};v&&(B.borderBottom=`1px solid ${n.colorBorder}`);const R=V(B,p?.root,m);return t.jsx("div",{role:"navigation","aria-label":"Steps",style:R,className:Ve(g,x?.root),children:e.map((S,L)=>{const $=k(L,S),I=L===e.length-1,P=f!==void 0&&L===r&&$==="process";let E;if(L>0){const H=k(L-1,e[L-1]);E=lc(H)}return t.jsx(ac,{item:S,index:L+d,stepStatus:$,isFirst:L===0,isLast:I,isClickable:C,isVertical:b,isNavigation:v,isDot:j,progressDotRender:y,showPercent:P,percent:f??0,size:s,labelVertical:w,prevTailColor:E,classNames:x,styles:p,onClick:()=>h?.(L)},L)})})}const gn=200,dc={large:{paddingH:"1.25rem 1rem",paddingV:"0.75rem 1.5rem",fontSize:"1rem",cardHeight:"2.75rem"},middle:{paddingH:"0.75rem 1rem",paddingV:"0.75rem 1.5rem",fontSize:"0.875rem",cardHeight:"2.5rem"},small:{paddingH:"0.5rem 0.75rem",paddingV:"0.5rem 1rem",fontSize:"0.875rem",cardHeight:"2.25rem"}};function uc(){return t.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function fc(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),t.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}function hc(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"15 18 9 12 15 6"})})}function pc(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"9 18 15 12 9 6"})})}function gc(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"18 15 12 9 6 15"})})}function mc(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"6 9 12 15 18 9"})})}function bs({items:e=[],activeKey:r,defaultActiveKey:o,type:s="line",size:l="middle",tabPosition:a="top",centered:c=!1,animated:u={inkBar:!0,tabPane:!1},tabBarGutter:f,tabBarStyle:d,tabBarExtraContent:h,indicator:g,addIcon:m,removeIcon:x,hideAdd:p=!1,destroyOnHidden:b=!1,onChange:v,onEdit:j,onTabClick:C,className:w,style:y,classNames:k,styles:B}){const R=r!==void 0,[S,L]=i.useState(o??e[0]?.key??""),$=R?r:S,I=i.useRef($);I.current=$;const P=i.useCallback(Z=>{R||L(Z),v?.(Z)},[R,v]),E=a==="left"||a==="right",H=s==="card"||s==="editable-card",z=s==="editable-card",A=typeof u=="boolean"?u:u.inkBar,M=typeof u=="boolean"?u:u.tabPane,W=dc[l],F=i.useRef(new Map),D=i.useRef(null),T=i.useRef(null),[O,Y]=i.useState({}),[X,_]=i.useState(!1),[G,Q]=i.useState(!1),[N,le]=i.useState(!1),oe=i.useRef(new Set);$&&oe.current.add($);const q=i.useCallback(()=>{if(H||!D.current)return;const Z=F.current.get($);if(!Z){Y({opacity:0});return}const Be=D.current;let Oe,Qe;E?(Oe=Z.offsetTop-Be.offsetTop,Qe=Z.offsetHeight):(Oe=Z.offsetLeft-Be.offsetLeft,Qe=Z.offsetWidth);let _e=Qe,et=0;if(g?.size!=null){_e=typeof g.size=="function"?g.size(Qe):g.size;const je=g.align??"center";je==="center"?et=(Qe-_e)/2:je==="end"&&(et=Qe-_e)}if(E){const je={position:"absolute",width:2,height:_e,top:Oe+et,backgroundColor:n.colorPrimary,borderRadius:1,transition:A?"all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)":"none",...a==="left"?{right:0}:{left:0}};Y(je)}else{const je={position:"absolute",height:2,width:_e,left:Oe+et,bottom:0,backgroundColor:n.colorPrimary,borderRadius:1,transition:A?"all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)":"none"};Y(je)}},[$,H,E,a,A,g]),K=i.useCallback(()=>{const Z=D.current;if(Z)if(E){const Be=Z.scrollHeight>Z.clientHeight+1;_(Be),Q(Z.scrollTop>0),le(Z.scrollTop+Z.clientHeight<Z.scrollHeight-1)}else{const Be=Z.scrollWidth>Z.clientWidth+1;_(Be),Q(Z.scrollLeft>0),le(Z.scrollLeft+Z.clientWidth<Z.scrollWidth-1)}},[E]),re=i.useCallback(()=>{const Z=D.current,Be=F.current.get($);if(!(!Z||!Be))if(E){const Oe=Be.offsetTop-Z.offsetTop,Qe=Oe+Be.offsetHeight;Oe<Z.scrollTop?Z.scrollTo({top:Oe,behavior:"smooth"}):Qe>Z.scrollTop+Z.clientHeight&&Z.scrollTo({top:Qe-Z.clientHeight,behavior:"smooth"})}else{const Oe=Be.offsetLeft-Z.offsetLeft,Qe=Oe+Be.offsetWidth;Oe<Z.scrollLeft?Z.scrollTo({left:Oe,behavior:"smooth"}):Qe>Z.scrollLeft+Z.clientWidth&&Z.scrollTo({left:Qe-Z.clientWidth,behavior:"smooth"})}},[$,E]);i.useEffect(()=>{q(),re()},[q,re]),i.useEffect(()=>{K()},[K,e]),i.useEffect(()=>{const Z=D.current;if(!Z)return;const Be=new ResizeObserver(()=>{q(),K()});return Be.observe(Z),F.current.forEach(Oe=>Be.observe(Oe)),()=>Be.disconnect()},[q,K,e]),i.useEffect(()=>{const Z=D.current;if(!Z)return;const Be=()=>K();Z.addEventListener("scroll",Be,{passive:!0});const Oe=Qe=>{E||Qe.deltaX===0&&(Math.abs(Qe.deltaY)<1||(Qe.preventDefault(),Z.scrollLeft+=Qe.deltaY))};return Z.addEventListener("wheel",Oe,{passive:!1}),()=>{Z.removeEventListener("scroll",Be),Z.removeEventListener("wheel",Oe)}},[K,E]);const Te=Z=>{const Be=D.current;Be&&(E?Be.scrollBy({top:Z,behavior:"smooth"}):Be.scrollBy({left:Z,behavior:"smooth"}))},Ce=(Z,Be)=>{Z.disabled||(C?.(Z.key,Be),Z.key!==$&&P(Z.key))},Le=(Z,Be)=>{Be.stopPropagation(),j?.(Z.key,"remove")},ue=Z=>{j?.(Z,"add")};let ze=null,xe=null;if(h)if(typeof h=="object"&&h!==null&&"left"in h){const Z=h;ze=Z.left??null,xe=Z.right??null}else xe=h;const Ie=V({display:"flex",flexDirection:a==="bottom"?"column-reverse":a==="right"?"row-reverse":a==="left"?"row":"column",width:"100%",minWidth:0},B?.root,y),De=H?{}:a==="top"?{borderBottom:`1px solid ${n.colorBorder}`}:a==="bottom"?{borderTop:`1px solid ${n.colorBorder}`}:a==="left"?{borderRight:`1px solid ${n.colorBorder}`}:{borderLeft:`1px solid ${n.colorBorder}`},Ae={display:"flex",flexDirection:E?"column":"row",alignItems:E?"stretch":"center",position:"relative",flexShrink:0,...De,...d},Re=V(Ae,B?.tabBar),ke={flex:1,minWidth:0,minHeight:0,overflow:"hidden",position:"relative"},ee={display:"flex",flexDirection:E?"column":"row",position:"relative",overflowX:E?"hidden":"auto",overflowY:E?"auto":"hidden",scrollbarWidth:"none",justifyContent:c&&!X?"center":void 0},ae={display:"flex",alignItems:"center",justifyContent:"center",width:E?"100%":"2rem",height:E?"2rem":"100%",border:"none",background:"none",color:n.colorTextMuted,cursor:"pointer",flexShrink:0,padding:0},se={flex:1,...H?{border:`1px solid ${n.colorBorder}`,...a==="top"?{borderTop:"none",borderRadius:"0 0 0.5rem 0.5rem"}:a==="bottom"?{borderBottom:"none",borderRadius:"0.5rem 0.5rem 0 0"}:a==="left"?{borderLeft:"none",borderRadius:"0 0.5rem 0.5rem 0"}:{borderRight:"none",borderRadius:"0.5rem 0 0 0.5rem"}}:{}},we=V(se,B?.content),ie=(Z,Be)=>{const Oe=f??(E?0:H?2:0),_e={display:"flex",alignItems:"center",gap:"0.5rem",padding:E?W.paddingV:W.paddingH,fontSize:W.fontSize,cursor:Z.disabled?"not-allowed":"pointer",color:Z.disabled?n.colorTextSubtle:Be?H?n.colorText:n.colorPrimary:n.colorText,fontWeight:Be?600:400,opacity:Z.disabled?.5:1,whiteSpace:"nowrap",outline:"none",transition:"color 0.2s, background-color 0.2s",flexShrink:0,position:"relative",userSelect:"none",...E?{marginBottom:Oe}:{marginRight:Oe}};if(H){const et=a==="top",je=a==="bottom",Se=a==="left",me="0.5rem",U={top:`${me} ${me} 0 0`,bottom:`0 0 ${me} ${me}`,left:`${me} 0 0 ${me}`,right:`0 ${me} ${me} 0`};Object.assign(_e,{backgroundColor:Be?n.colorBg:n.colorBgSubtle,border:`1px solid ${n.colorBorder}`,borderRadius:U[a],height:W.cardHeight,...et?{borderBottomColor:Be?n.colorBg:n.colorBorder}:{},...je?{borderTopColor:Be?n.colorBg:n.colorBorder}:{},...Se?{borderRightColor:Be?n.colorBg:n.colorBorder}:{},...!et&&!je&&!Se?{borderLeftColor:Be?n.colorBg:n.colorBorder}:{}})}return _e},ce={display:"inline-flex",alignItems:"center",justifyContent:"center",marginLeft:"0.25rem",padding:"0.125rem",border:"none",background:"none",color:n.colorTextMuted,cursor:"pointer",borderRadius:"0.25rem",transition:"color 0.2s, background-color 0.2s",lineHeight:0},He={display:"flex",alignItems:"center",justifyContent:"center",width:W.cardHeight,height:W.cardHeight,border:`1px dashed ${n.colorBorder}`,borderRadius:"0.5rem",background:"none",color:n.colorTextMuted,cursor:"pointer",flexShrink:0,marginLeft:E?0:"0.25rem",marginTop:E?"0.25rem":0,transition:"color 0.2s, border-color 0.2s"},Pe=()=>e.map(Z=>{const Be=Z.key===$,Oe=(Z.destroyOnHidden??b)&&!Be,Qe=oe.current.has(Z.key);if(!(Be||Z.forceRender||Qe&&!Oe))return null;const et={...Be?{}:{display:"none"},padding:"1rem"};return M&&Be&&Object.assign(et,{animation:"j-tabs-fadein 0.3s ease"}),t.jsx("div",{role:"tabpanel","aria-hidden":!Be,style:et,children:Z.children},Z.key)}),Ge=Z=>Be=>{Be?F.current.set(Z,Be):F.current.delete(Z)};return t.jsxs("div",{style:Ie,className:Ve(w,k?.root),children:[t.jsx("style",{children:`
|
|
102
|
+
}`;let an=!1;function ql(){if(an||typeof document>"u")return;const e=document.createElement("style");e.textContent=Ul,document.head.appendChild(e),an=!0}function Ql({children:e,count:r,overflowCount:o=99,dot:s=!1,showZero:l=!1,size:a="default",status:c,text:u,color:f,offset:d,title:h,className:g,style:m,classNames:x,styles:p}){ql();const b=a==="small",v=e!=null&&e!=="",j=c!==void 0,w=s?(typeof r=="number"?r:void 0)!==0||l:r!=null?typeof r=="number"?r>0||l:!0:!1,y=s?null:typeof r=="number"?r>o?`${o}+`:`${r}`:r,k=h??(typeof r=="number"?`${r}`:void 0);if(!v&&j){const L=f?To(f):ln[c];return t.jsxs("span",{className:Ye(g,x?.root),style:V({display:"inline-flex",alignItems:"center",gap:"0.5rem",lineHeight:1},p?.root,m),children:[t.jsx("span",{style:V({position:"relative",display:"inline-block",width:"0.375rem",height:"0.375rem",borderRadius:"50%",backgroundColor:L},p?.indicator),className:x?.indicator,children:c==="processing"&&t.jsx("span",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",borderRadius:"50%",backgroundColor:L,animation:"j-badge-processing 1.2s ease-in-out infinite"}})}),u!=null&&t.jsx("span",{style:{color:n.colorText,fontSize:"0.875rem",lineHeight:1.5},children:u})]})}const B=f?To(f):j?ln[c]:n.colorError,R=d?-d[0]:0,S=d?d[1]:0,E=v?`translate(50%, -50%) translate(${R}px, ${S}px)`:void 0,$=s?{...v?{position:"absolute",top:0,right:0,transform:E,zIndex:1}:{},display:"inline-block",width:b?"0.375rem":"0.5rem",height:b?"0.375rem":"0.5rem",borderRadius:"50%",backgroundColor:B,...v?{boxShadow:`0 0 0 1px ${n.colorBg}`}:{}}:{...v?{position:"absolute",top:0,right:0,transform:E,zIndex:1}:{},display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:b?"1rem":"1.25rem",height:b?"1rem":"1.25rem",padding:"0 0.375rem",borderRadius:"0.625rem",backgroundColor:B,color:"#fff",fontSize:b?"0.625rem":"0.75rem",fontWeight:600,fontFamily:"tabular-nums",lineHeight:1,whiteSpace:"nowrap",...v?{boxShadow:`0 0 0 1px ${n.colorBg}`}:{}},I=V($,p?.indicator);return v?t.jsxs("span",{className:Ye(g,x?.root),style:V({position:"relative",display:"inline-flex",verticalAlign:"middle",lineHeight:1},p?.root,m),children:[e,w&&t.jsx(Wt,{content:k,disabled:!k,children:t.jsx("sup",{className:x?.indicator,style:I,children:y})})]}):w?t.jsx("span",{className:Ye(g,x?.root),style:V({display:"inline-flex"},p?.root,m),children:t.jsx(Wt,{content:k,disabled:!k,children:t.jsx("sup",{className:x?.indicator,style:I,children:y})})}):null}function Zl({children:e,text:r,color:o=n.colorPrimary,placement:s="end",className:l,style:a,classNames:c,styles:u}){const f=s==="end",d=To(o),h=V({position:"relative"},u?.wrapper,a),g=V({position:"absolute",top:"0.5rem",...f?{right:"-0.5rem"}:{left:"-0.5rem"},padding:"0 0.5rem",height:"1.375rem",lineHeight:"1.375rem",backgroundColor:d,color:"#fff",fontSize:"0.875rem",borderRadius:f?"0.25rem 0.25rem 0 0.25rem":"0.25rem 0.25rem 0.25rem 0",whiteSpace:"nowrap",zIndex:1},u?.ribbon),m=V({},u?.content),x=V({position:"absolute",top:"100%",...f?{right:0}:{left:0},width:"0.5rem",height:"0.375rem",backgroundColor:d,clipPath:f?"polygon(0 0, 100% 0, 0 100%)":"polygon(0 0, 100% 0, 100% 100%)",filter:"brightness(0.75)"},u?.corner);return t.jsxs("div",{className:Ye(l,c?.wrapper),style:h,children:[e,t.jsxs("div",{className:c?.ribbon,style:g,children:[t.jsx("span",{className:c?.content,style:m,children:r}),t.jsx("div",{className:c?.corner,style:x})]})]})}const Jl=Object.assign(Ql,{Ribbon:Zl}),ea={primary:{base:n.colorPrimary,contrast:n.colorPrimaryContrast},secondary:{base:n.colorSecondary,contrast:n.colorSecondaryContrast},success:{base:n.colorSuccess,contrast:n.colorSuccessContrast},warning:{base:n.colorWarning,contrast:n.colorWarningContrast},error:{base:n.colorError,contrast:n.colorErrorContrast},info:{base:n.colorInfo,contrast:n.colorInfoContrast}};function ta({icon:e,description:r,position:o="bottom-right",shape:s="circle",size:l="md",color:a="primary",tooltip:c,tooltipPosition:u,offsetX:f=24,offsetY:d=24,shadow:h="lg",bordered:g=!0,onBackToTop:m,visibleOnScroll:x,disabled:p,className:b,style:v,onClick:j,_inGroup:C,classNames:w,styles:y,...k}){const[B,R]=i.useState(!1),[S,E]=i.useState(x===void 0),$=i.useRef(null);i.useEffect(()=>{if(x===void 0)return;const K=()=>{E(window.scrollY>=x)};return window.addEventListener("scroll",K),K(),()=>window.removeEventListener("scroll",K)},[x]);const I=()=>{if(h){if(h===!0||h==="lg")return n.shadowLg;if(h==="sm")return n.shadowSm;if(h==="md")return n.shadowMd}},L={sm:{size:40,fontSize:"0.75rem",iconSize:16},md:{size:48,fontSize:"0.875rem",iconSize:20},lg:{size:56,fontSize:"1rem",iconSize:24}},P={"top-left":{top:d,left:f},"top-right":{top:d,right:f},"bottom-left":{bottom:d,left:f},"bottom-right":{bottom:d,right:f}},H=()=>u||(o.includes("right")?"left":o.includes("left")?"right":"left"),z=!v?.position||v.position==="fixed"||v.position==="absolute",F=()=>C?{filter:B&&!p?"brightness(1.15)":"brightness(1)"}:{transform:B&&!p?"scale(1.1)":"scale(1)"},M=ea[a],W={position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",width:L[l].size,height:L[l].size,borderRadius:s==="circle"?"50%":"0.5rem",backgroundColor:M.base,color:M.contrast,border:g?`1px solid ${n.colorBorder}`:"none",outline:"none",cursor:p?"not-allowed":"pointer",opacity:p?.6:1,boxShadow:I(),transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",...F(),zIndex:B?1002:z?1e3:void 0,fontFamily:"inherit",fontSize:L[l].fontSize,...z&&P[o]},A=K=>{p||(m&&(window.scrollTo({top:0,behavior:"smooth"}),m()),j?.(K))};if(!S)return null;const D=H(),T={top:{bottom:"100%",left:"50%",marginBottom:"0.5rem",transform:`translateX(-50%) translateY(${B?0:6}px)`},bottom:{top:"100%",left:"50%",marginTop:"0.5rem",transform:`translateX(-50%) translateY(${B?0:-6}px)`},left:{right:"100%",top:"50%",marginRight:"0.5rem",transform:`translateY(-50%) translateX(${B?0:6}px)`},right:{left:"100%",top:"50%",marginLeft:"0.5rem",transform:`translateY(-50%) translateX(${B?0:-6}px)`}},O={top:{bottom:"-0.25rem",left:"50%",transform:"translateX(-50%) rotate(45deg)",borderRight:`1px solid ${n.colorBorder}`,borderBottom:`1px solid ${n.colorBorder}`},bottom:{top:"-0.25rem",left:"50%",transform:"translateX(-50%) rotate(-135deg)",borderRight:`1px solid ${n.colorBorder}`,borderBottom:`1px solid ${n.colorBorder}`},left:{right:"-0.25rem",top:"50%",transform:"translateY(-50%) rotate(-45deg)",borderRight:`1px solid ${n.colorBorder}`,borderBottom:`1px solid ${n.colorBorder}`},right:{left:"-0.25rem",top:"50%",transform:"translateY(-50%) rotate(135deg)",borderRight:`1px solid ${n.colorBorder}`,borderBottom:`1px solid ${n.colorBorder}`}},Y={position:"absolute",zIndex:1001,padding:"0.5rem 0.75rem",borderRadius:"0.375rem",backgroundColor:n.colorBgMuted,color:n.colorText,fontSize:"0.8125rem",fontWeight:500,whiteSpace:"nowrap",boxShadow:n.shadowMd,border:`1px solid ${n.colorBorder}`,opacity:B?1:0,transition:"opacity 0.15s ease-out, transform 0.15s ease-out",pointerEvents:"none",...T[D]},X={position:"absolute",width:"0.5rem",height:"0.5rem",backgroundColor:n.colorBgMuted,...O[D]};return t.jsxs("button",{ref:$,disabled:p,style:V(W,y?.root,v),className:Ye(b,w?.root),onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),onClick:A,...k,children:[e?t.jsx("span",{style:{display:"flex",fontSize:L[l].iconSize,...y?.icon},className:w?.icon,children:e}):r?t.jsx("span",{style:y?.icon,className:w?.icon,children:r}):t.jsx(Lr,{size:L[l].iconSize}),c&&t.jsxs("div",{style:{...Y,...y?.tooltip},className:w?.tooltip,role:"tooltip",children:[c,t.jsx("div",{style:{...X,...y?.tooltipArrow},className:w?.tooltipArrow})]})]})}function ra({children:e,position:r="bottom-right",direction:o="top",size:s="md",offsetX:l=24,offsetY:a=24,shadow:c="lg",style:u,className:f}){const d={"top-left":{top:a,left:l},"top-right":{top:a,right:l},"bottom-left":{bottom:a,left:l},"bottom-right":{bottom:a,right:l}},h=o==="top"||o==="bottom",g=()=>{if(c){if(c===!0||c==="lg")return n.shadowLg;if(c==="sm")return n.shadowSm;if(c==="md")return n.shadowMd}},x={position:"fixed",display:"flex",flexDirection:(()=>{switch(o){case"top":return"column-reverse";case"bottom":return"column";case"left":return"row-reverse";case"right":return"row"}})(),boxShadow:g(),zIndex:1e3,...d[r],...u},b=i.Children.toArray(e).filter(i.isValidElement),v=b.length,j="0.5rem",C=w=>{const y=w===0,k=w===v-1;if(v===1)return j;if(h){const R=o==="top"?k:y,S=o==="top"?y:k;if(R)return`${j} ${j} 0 0`;if(S)return`0 0 ${j} ${j}`}else{const R=o==="right"?k:y,S=o==="right"?y:k;if(R)return`${j} 0 0 ${j}`;if(S)return`0 ${j} ${j} 0`}return"0"};return t.jsx("div",{style:x,className:f,children:b.map((w,y)=>i.isValidElement(w)?i.cloneElement(w,{key:y,style:{position:"relative",borderRadius:C(y),...w.props.style},size:w.props.size||s,shape:"square",shadow:!1,_inGroup:!0}):null)})}function oa({children:e,position:r="bottom-right",direction:o="top",trigger:s="click",icon:l,openIcon:a,shape:c="circle",size:u="md",color:f="primary",offsetX:d=24,offsetY:h=24,shadow:g="lg",tooltip:m,defaultOpen:x=!1,open:p,onOpenChange:b,gap:v=12,style:j,className:C,classNames:w,styles:y}){const[k,B]=i.useState(x),R=p!==void 0,S=R?p:k,E=X=>{R||B(X),b?.(X)},$=()=>{s==="click"&&E(!S)},I=()=>{s==="hover"&&E(!0)},L=()=>{s==="hover"&&E(!1)},P={sm:40,md:48,lg:56},H=P[u]===40?16:P[u]===48?20:24,z={"top-left":{top:h,left:d},"top-right":{top:h,right:d},"bottom-left":{bottom:h,left:d},"bottom-right":{bottom:h,right:d}},F=o==="top"||o==="bottom",M=()=>{switch(o){case"top":return"column-reverse";case"bottom":return"column";case"left":return"row-reverse";case"right":return"row"}},W=j?.position==="relative"||j?.position==="static",D=i.Children.toArray(e).filter(i.isValidElement),T=()=>{if(S)return 0;switch(o){case"top":return 20;case"bottom":return-20;case"left":return 20;case"right":return-20}},O=()=>{const X=v;switch(o){case"top":return{bottom:"100%",left:"50%",transform:"translateX(-50%)",paddingBottom:X};case"bottom":return{top:"100%",left:"50%",transform:"translateX(-50%)",paddingTop:X};case"left":return{right:"100%",top:"50%",transform:"translateY(-50%)",paddingRight:X};case"right":return{left:"100%",top:"50%",transform:"translateY(-50%)",paddingLeft:X}}};if(W)return t.jsxs("div",{style:V({position:"relative",display:"inline-flex"},y?.root,j),className:Ye(C,w?.root),onMouseEnter:I,onMouseLeave:L,children:[t.jsx(Hr,{icon:a?S?a:l||t.jsx(Lr,{size:H}):l||t.jsx(Lr,{size:H}),shape:c,size:u,color:f,shadow:g,tooltip:S?void 0:m,onClick:$,_inGroup:!0,className:w?.trigger,style:{position:"relative",transform:!a&&S?"rotate(45deg)":"rotate(0deg)",transition:"transform 0.3s cubic-bezier(0.4, 0, 0.2, 1)",...y?.trigger}}),t.jsx("div",{style:{position:"absolute",display:"flex",flexDirection:M(),alignItems:"center",gap:v,zIndex:1e3,pointerEvents:S?"auto":"none",...O(),...y?.menu},className:w?.menu,children:D.map((X,K)=>{if(!i.isValidElement(X))return null;const G=K*.05,Q=T(),N=F?"Y":"X";return i.cloneElement(X,{key:K,style:{position:"relative",opacity:S?1:0,transform:`translate${N}(${Q}px)`,transition:`opacity 0.2s ease-out ${G}s, transform 0.2s ease-out ${G}s`,pointerEvents:S?"auto":"none",...X.props.style},size:X.props.size||u,shape:X.props.shape||c,shadow:X.props.shadow!==void 0?X.props.shadow:g})})})]});const Y=V({display:"flex",flexDirection:M(),alignItems:"center",gap:v,position:j?.position==="absolute"?void 0:"fixed",zIndex:1e3,...z[r]},y?.root,j);return t.jsxs("div",{style:Y,className:Ye(C,w?.root),onMouseEnter:I,onMouseLeave:L,children:[t.jsx(Hr,{icon:a?S?a:l||t.jsx(Lr,{size:H}):l||t.jsx(Lr,{size:H}),shape:c,size:u,color:f,shadow:g,tooltip:S?void 0:m,onClick:$,_inGroup:!0,className:w?.trigger,style:{position:"relative",transform:!a&&S?"rotate(45deg)":"rotate(0deg)",transition:"transform 0.3s cubic-bezier(0.4, 0, 0.2, 1)",...y?.trigger}}),D.map((X,K)=>{if(!i.isValidElement(X))return null;const G=K*.05,Q=T(),N=F?"Y":"X";return i.cloneElement(X,{key:K,style:{position:"relative",opacity:S?1:0,transform:`translate${N}(${Q}px)`,transition:`opacity 0.2s ease-out ${G}s, transform 0.2s ease-out ${G}s`,pointerEvents:S?"auto":"none",...X.props.style},size:X.props.size||u,shape:X.props.shape||c,shadow:X.props.shadow!==void 0?X.props.shadow:g})})]})}const Hr=ta;Hr.Group=ra;Hr.Menu=oa;function Lr({size:e}){return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),t.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}function na({size:e=20}){return t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"18 15 12 9 6 15"})})}function sa({size:e=20}){return t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function ia({size:e=20}){return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),t.jsx("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"})]})}function la({size:e=20}){return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function aa({children:e,type:r="default",size:o="md",disabled:s=!1,mark:l=!1,code:a=!1,keyboard:c=!1,underline:u=!1,delete:f=!1,weight:d,lineHeight:h,italic:g=!1,copyable:m=!1,ellipsis:x=!1,className:p,style:b,classNames:v,styles:j}){const[C,w]=i.useState(!1),[y,k]=i.useState(!1),B={xs:"0.625rem",sm:"0.8125rem",md:"1rem",lg:"1.5rem",xl:"2.25rem"},R={default:n.colorText,secondary:n.colorTextMuted,success:n.colorSuccess,warning:n.colorWarning,error:n.colorError,info:n.colorInfo},S={thin:100,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},E={none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2},$=x?typeof x=="object"?x:{rows:1}:null,I=$?.expandable??!1,L=$?.rows??1,P=async()=>{const O=typeof m=="object"&&m.text?m.text:typeof e=="string"?e:"";if(O)try{await navigator.clipboard.writeText(O),w(!0),typeof m=="object"&&m.onCopy&&m.onCopy(),setTimeout(()=>w(!1),2e3)}catch(Y){console.error("Failed to copy text:",Y)}},H=()=>{const O=!y;k(O),$?.onExpand?.(O)},z=()=>!$||y?{}:L===1?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"inline-block",maxWidth:"100%",verticalAlign:"bottom"}:{overflow:"hidden",display:"-webkit-box",WebkitLineClamp:L,WebkitBoxOrient:"vertical"},F=V({fontSize:B[o],color:s?n.colorTextSubtle:R[r],cursor:s?"not-allowed":void 0,opacity:s?.6:1,fontWeight:d?S[d]:void 0,lineHeight:h?E[h]:void 0,fontStyle:g?"italic":void 0,textDecoration:u?"underline":f?"line-through":void 0,...z()},j?.root,b),M=Ye(p,v?.root);let W=e;l&&(W=t.jsx("mark",{style:{backgroundColor:n.colorWarning200,color:n.colorWarning900,padding:"0 0.125rem",borderRadius:"0.125rem"},children:W})),a&&(W=t.jsx("code",{style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:"0.9em",backgroundColor:n.colorBgMuted,border:`1px solid ${n.colorBorder}`,borderRadius:"0.25rem",padding:"0.125rem 0.375rem"},children:W})),c&&(W=t.jsx("kbd",{style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:"0.9em",backgroundColor:n.colorBgMuted,border:`1px solid ${n.colorBorder}`,borderBottom:`2px solid ${n.colorBorder}`,borderRadius:"0.25rem",padding:"0.125rem 0.375rem",boxShadow:`inset 0 -1px 0 ${n.colorBorder}`},children:W}));const A=m&&t.jsx(Wt,{content:C?"Copiado!":"Copiar",delay:100,children:t.jsx("button",{onClick:P,disabled:s,className:v?.copyButton,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",marginLeft:"0.25rem",padding:"0.125rem",border:"none",background:"none",cursor:s?"not-allowed":"pointer",color:C?n.colorSuccess:n.colorTextMuted,opacity:s?.5:1,transition:"color 0.2s",verticalAlign:"middle",...j?.copyButton},children:C?t.jsx(da,{size:14}):t.jsx(ca,{size:14})})}),D=I&&t.jsx("button",{onClick:H,className:v?.expandButton,style:{display:"inline",marginLeft:"0.25rem",padding:0,border:"none",background:"none",cursor:"pointer",color:n.colorPrimary,fontSize:"inherit",fontFamily:"inherit",...j?.expandButton},children:y?"menos":"más"}),T={fontSize:B[o],color:s?n.colorTextSubtle:R[r],cursor:s?"not-allowed":void 0,opacity:s?.6:1,fontWeight:d?S[d]:void 0,lineHeight:h?E[h]:void 0,fontStyle:g?"italic":void 0,textDecoration:u?"underline":f?"line-through":void 0};if(I){const O=z();return L>1?t.jsxs("div",{style:V(T,j?.root,b),className:M,children:[t.jsx("div",{style:{...O,...j?.content},className:v?.content,children:W}),D,A]}):t.jsxs("span",{style:V({...T,display:"inline-flex",alignItems:"baseline",maxWidth:"100%"},j?.root,b),className:M,children:[t.jsx("span",{style:{...O,flex:"0 1 auto",minWidth:0,...j?.content},className:v?.content,children:W}),D,A]})}return $&&L>1?t.jsxs("div",{style:F,className:M,children:[v?.content||j?.content?t.jsx("span",{className:v?.content,style:j?.content,children:W}):W,A]}):t.jsxs("span",{style:F,className:M,children:[v?.content||j?.content?t.jsx("span",{className:v?.content,style:j?.content,children:W}):W,A]})}function ca({size:e=16}){return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),t.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}function da({size:e=16}){return t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"20 6 9 17 4 12"})})}const ua={default:{line:n.colorBorder,text:n.colorText},primary:{line:n.colorPrimary,text:n.colorPrimary},secondary:{line:n.colorSecondary,text:n.colorSecondary},success:{line:n.colorSuccess,text:n.colorSuccess},warning:{line:n.colorWarning,text:n.colorWarning},error:{line:n.colorError,text:n.colorError},info:{line:n.colorInfo,text:n.colorInfo}},fa={thin:1,normal:1,medium:2,thick:3};function ha({type:e="horizontal",dashed:r=!1,orientation:o="center",orientationMargin:s,plain:l=!1,color:a="default",thickness:c="normal",children:u,className:f,style:d,classNames:h,styles:g}){const m=r?"dashed":"solid",x=ua[a],p=x.line,b=typeof c=="number"?c:fa[c];if(e==="vertical"){const R=V({display:"inline-block",height:"0.9em",margin:"0 0.5rem",verticalAlign:"middle",borderTop:0,borderInlineStart:`${b}px ${m} ${p}`},g?.root,d);return t.jsx("span",{style:R,className:Ye(f,h?.root),role:"separator"})}if(!u){const R=V({display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:"1.5rem 0",borderBlockStart:`${b}px ${m} ${p}`},g?.root,d);return t.jsx("div",{style:R,className:Ye(f,h?.root),role:"separator"})}const j=(()=>{const R=s!==void 0?typeof s=="number"?`${s}px`:s:null;switch(o){case"left":return{before:R||"5%",after:"95%"};case"right":return{before:"95%",after:R||"5%"};default:return{before:"50%",after:"50%"}}})(),C=V({display:"flex",alignItems:"center",clear:"both",width:"100%",minWidth:"100%",margin:"1.5rem 0"},g?.root,d),w={borderBlockStart:`${b}px ${m} ${p}`,flexGrow:0,flexShrink:0},y={...w,width:j.before},k={...w,width:j.after};s!==void 0&&o!=="center"?o==="left"?(y.width=typeof s=="number"?`${s}px`:s,y.flexGrow=0,k.width="auto",k.flexGrow=1):(y.width="auto",y.flexGrow=1,k.width=typeof s=="number"?`${s}px`:s,k.flexGrow=0):o==="center"?(y.flexGrow=1,k.flexGrow=1,y.width="auto",k.width="auto"):o==="left"?(k.flexGrow=1,k.width="auto"):(y.flexGrow=1,y.width="auto");const B={display:"inline-block",padding:"0 1rem",fontSize:l?"0.875rem":"1rem",fontWeight:l?400:500,color:x.text,whiteSpace:"nowrap",...g?.text};return t.jsxs("div",{style:C,className:Ye(f,h?.root),role:"separator",children:[t.jsx("span",{style:{...y,...g?.line},className:h?.line}),t.jsx("span",{style:B,className:h?.text,children:u}),t.jsx("span",{style:{...k,...g?.line},className:h?.line})]})}const pa={small:"0.5rem",middle:"1rem",large:"1.5rem"};function ga({children:e,vertical:r=!1,wrap:o="nowrap",justify:s="normal",align:l="normal",gap:a,flex:c,component:u="div",className:f,style:d}){const m={display:"flex",flexDirection:r?"column":"row",flexWrap:typeof o=="boolean"?o?"wrap":"nowrap":o,justifyContent:s,alignItems:l,gap:(()=>{if(a!==void 0)return typeof a=="number"?a:typeof a=="string"?pa[a]:`${a[1]}px ${a[0]}px`})(),flex:c,...d};return t.jsx(u,{style:m,className:f,children:e})}const Yr=24,os={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1600},ma=["xxl","xl","lg","md","sm","xs"],ns=i.createContext({gutter:[0,0]});function yo(e,r){if(typeof e!="object"||e===null)return e;const o=e;for(const s of ma)if(r>=os[s]&&o[s]!==void 0)return o[s]}function ss(){return typeof window>"u"?1200:window.innerWidth}function is({children:e,gutter:r=0,align:o="top",justify:s="start",wrap:l=!0,className:a,style:c}){const u=ss(),f=()=>{if(typeof r=="number")return[r,0];if(Array.isArray(r)){const p=typeof r[0]=="number"?r[0]:yo(r[0],u)??0,b=typeof r[1]=="number"?r[1]:yo(r[1],u)??0;return[p,b]}return[yo(r,u)??0,0]},[d,h]=f(),g={top:"flex-start",middle:"center",bottom:"flex-end",stretch:"stretch"},m={start:"flex-start",end:"flex-end",center:"center","space-around":"space-around","space-between":"space-between","space-evenly":"space-evenly"},x={display:"flex",flexFlow:l?"row wrap":"row nowrap",alignItems:g[o],justifyContent:m[s],marginLeft:d?-(d/2):void 0,marginRight:d?-(d/2):void 0,rowGap:h||void 0,...c};return t.jsx(ns.Provider,{value:{gutter:[d,h]},children:t.jsx("div",{style:x,className:a,children:e})})}function ls({children:e,span:r,offset:o,push:s,pull:l,order:a,flex:c,xs:u,sm:f,md:d,lg:h,xl:g,xxl:m,className:x,style:p}){const{gutter:b}=i.useContext(ns),v=ss(),C=(()=>{const H=[{bp:"xxl",value:m},{bp:"xl",value:g},{bp:"lg",value:h},{bp:"md",value:d},{bp:"sm",value:f},{bp:"xs",value:u}];for(const{bp:z,value:F}of H)if(F!==void 0&&v>=os[z])return typeof F=="number"?{span:F}:F;return{span:r,offset:o,push:s,pull:l,order:a,flex:c}})(),w=C.span??r,y=C.offset??o??0,k=C.push??s??0,B=C.pull??l??0,R=C.order??a,S=C.flex??c,E=()=>{if(!S&&w!==void 0)return w===0?"none":`${w/Yr*100}%`},$=()=>{if(y!==0)return`${y/Yr*100}%`},I=()=>k===0&&B===0?{}:{position:"relative",left:k?`${k/Yr*100}%`:void 0,right:B?`${B/Yr*100}%`:void 0},L=E(),P={boxSizing:"border-box",paddingLeft:b[0]?b[0]/2:void 0,paddingRight:b[0]?b[0]/2:void 0,flex:S??(L?`0 0 ${L}`:void 0),maxWidth:L==="none"?void 0:L,display:L==="none"?"none":void 0,marginLeft:$(),order:R,...I(),...p};return t.jsx("div",{style:P,className:x,children:e})}const xa={Row:is,Col:ls},ya={xs:480,sm:576,md:768,lg:992,xl:1200,xxl:1600},as=i.createContext({siderCollapsed:!1});function ba({children:e,hasSider:r,className:o,style:s}){const l={display:"flex",flex:"auto",flexDirection:r?"row":"column",minHeight:0,backgroundColor:n.colorBgSubtle,...s};return t.jsx("div",{style:l,className:o,children:e})}function cs({children:e,className:r,style:o}){const s={flex:"0 0 auto",height:"4rem",padding:"0 1.5rem",backgroundColor:n.colorBgMuted,display:"flex",alignItems:"center",...o};return t.jsx("header",{style:s,className:r,children:e})}function ds({children:e,className:r,style:o}){const s={flex:"0 0 auto",padding:"1.5rem 3.125rem",backgroundColor:n.colorBgMuted,...o};return t.jsx("footer",{style:s,className:r,children:e})}function us({children:e,className:r,style:o}){const s={flex:"auto",minHeight:0,padding:"1.5rem",...o};return t.jsx("main",{style:s,className:r,children:e})}function fs({children:e,width:r=200,collapsedWidth:o=80,collapsible:s=!1,collapsed:l,defaultCollapsed:a=!1,reverseArrow:c=!1,breakpoint:u,theme:f="dark",trigger:d,onCollapse:h,onBreakpoint:g,className:m,style:x,classNames:p,styles:b}){const[v,j]=i.useState(a),[C,w]=i.useState(!1),y=l!==void 0,k=y?l:v;i.useEffect(()=>{if(!u||typeof window>"u")return;const I=()=>{const L=window.innerWidth<ya[u];L!==C&&(w(L),g?.(L),L&&!k?(y||j(!0),h?.(!0,"responsive")):!L&&k&&C&&(y||j(!1),h?.(!1,"responsive")))};return I(),window.addEventListener("resize",I),()=>window.removeEventListener("resize",I)},[u,C,k,y,g,h]);const B=()=>{const I=!k;y||j(I),h?.(I,"clickTrigger")},R=k?o:typeof r=="number"?r:parseInt(r),S=V({flex:`0 0 ${R}px`,maxWidth:R,minWidth:R,width:R,backgroundColor:f==="dark"?"#1f1f1f":n.colorBg,color:f==="dark"?"rgba(255, 255, 255, 0.85)":n.colorText,transition:"all 0.2s ease",position:"relative",display:"flex",flexDirection:"column"},b?.root,x),E={flex:1,overflow:"hidden",...b?.content},$=()=>{if(!s||d===null)return null;const I={position:"absolute",bottom:0,left:0,right:0,height:"3rem",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",backgroundColor:f==="dark"?"rgba(0, 0, 0, 0.25)":n.colorBgMuted,transition:"background-color 0.2s"};if(o===0&&k){const L={position:"absolute",bottom:"3rem",right:"-2.25rem",width:"2.25rem",height:"2.625rem",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",backgroundColor:f==="dark"?"#2a2a2a":n.colorBgMuted,borderRadius:"0 0.25rem 0.25rem 0",boxShadow:n.shadowMd};return t.jsx("div",{style:{...L,...b?.trigger},className:p?.trigger,onClick:B,children:d||t.jsx(cn,{collapsed:k,reverseArrow:c})})}return t.jsx("div",{style:{...I,...b?.trigger},className:p?.trigger,onClick:B,children:d||t.jsx(cn,{collapsed:k,reverseArrow:c})})};return t.jsx(as.Provider,{value:{siderCollapsed:k},children:t.jsxs("aside",{style:S,className:Ye(m,p?.root),children:[t.jsx("div",{style:E,className:p?.content,children:e}),$()]})})}function cn({collapsed:e,reverseArrow:r}){const o=r?e:!e;return t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:o?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s"},children:t.jsx("polyline",{points:"15 18 9 12 15 6"})})}function va(){return i.useContext(as)}const Ca=Object.assign(ba,{Header:cs,Footer:ds,Content:us,Sider:fs}),Io=i.createContext(null);function ka(){return i.useContext(Io)}const wa={small:"0.5rem",middle:"1rem",large:"1.5rem"},nr="0.5rem";function Kr(e){return typeof e=="number"?e:wa[e]}function bo(e){return typeof e=="number"?`${e}px`:e}function ja({children:e,size:r="small",direction:o="horizontal",align:s,wrap:l=!1,split:a,className:c,style:u,classNames:f,styles:d}){const h=i.Children.toArray(e);if(h.length===0)return null;const[g,m]=Array.isArray(r)?[Kr(r[0]),Kr(r[1])]:[Kr(r),Kr(r)],x=s??(o==="horizontal"?"center":void 0),b=V({display:"inline-flex",flexDirection:o==="vertical"?"column":"row",flexWrap:l?"wrap":"nowrap",alignItems:x?{start:"flex-start",end:"flex-end",center:"center",baseline:"baseline"}[x]:void 0,gap:a?void 0:g===m?bo(g):`${bo(m)} ${bo(g)}`},d?.root,u),v=Ye(c,f?.root);if(!a)return t.jsx("div",{style:b,className:v,children:f?.item||d?.item?h.map((C,w)=>t.jsx("div",{className:f?.item,style:d?.item,children:C},w)):h});const j=o==="vertical";return t.jsx("div",{style:b,className:v,children:h.map((C,w)=>t.jsxs(i.Fragment,{children:[f?.item||d?.item?t.jsx("div",{className:f?.item,style:d?.item,children:C}):C,w<h.length-1&&t.jsx("span",{style:{display:"inline-flex",alignSelf:"center",margin:j?typeof m=="number"?`${m/2}px 0`:`calc(${m} / 2) 0`:typeof g=="number"?`0 ${g/2}px`:`0 calc(${g} / 2)`,...d?.separator},className:f?.separator,children:a})]},w))})}function Sa({children:e,direction:r="horizontal",block:o=!1,className:s,style:l}){const a=i.Children.toArray(e);if(a.length===0)return null;const c=r==="vertical",u={display:o?"flex":"inline-flex",flexDirection:c?"column":"row",...l};return t.jsx("div",{style:u,className:s,children:a.map((f,d)=>{const h=d===0,g=d===a.length-1,m={};c?(h?m.borderRadius=`${nr} ${nr} 0 0`:g?m.borderRadius=`0 0 ${nr} ${nr}`:m.borderRadius=0,h||(m.marginTop=-1)):(h?m.borderRadius=`${nr} 0 0 ${nr}`:g?m.borderRadius=`0 ${nr} ${nr} 0`:m.borderRadius=0,h||(m.marginLeft=-1));const x={isFirstItem:h,isLastItem:g,direction:r};return i.isValidElement(f)?t.jsx(Io.Provider,{value:x,children:i.cloneElement(f,{style:{...f.props.style||{},...m}})},d):t.jsx(Io.Provider,{value:x,children:f},d)})})}const Ma=Object.assign(ja,{Compact:Sa}),Ba={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1600},Ra=["xxl","xl","lg","md","sm","xs"];function _r(e,r,o){if(e===void 0)return o;if(typeof e!="object"||e===null)return e;const s=e;for(const l of Ra)if(r>=Ba[l]&&s[l]!==void 0)return s[l];return o}function Ta(){const[e,r]=i.useState(()=>typeof window>"u"?1200:window.innerWidth);return i.useEffect(()=>{if(typeof window>"u")return;const o=()=>r(window.innerWidth);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),e}function Ia({item:e,index:r,column:o,columnWidth:s,horizontalGutter:l,verticalGutter:a,itemRender:c,onResize:u,fresh:f,itemClassName:d,itemStyle:h}){const g=i.useRef(null);i.useEffect(()=>{if(!f||!u||!g.current)return;const p=new ResizeObserver(b=>{for(const v of b)u(e.key,v.contentRect.height)});return p.observe(g.current),()=>p.disconnect()},[f,e.key,u]),i.useEffect(()=>{g.current&&u&&u(e.key,g.current.offsetHeight)},[e.key,u]);const m=e.children??c?.({...e,index:r,assignedColumn:o}),x={width:s,marginBottom:a,boxSizing:"border-box",paddingLeft:l/2,paddingRight:l/2,...h};return t.jsx("div",{ref:g,style:x,className:d,children:m})}function La({items:e=[],columns:r=3,gutter:o=0,itemRender:s,fresh:l=!1,onLayoutChange:a,className:c,style:u,classNames:f,styles:d},h){const g=i.useRef(null),[m,x]=i.useState(new Map),p=Ta();i.useEffect(()=>{h&&(typeof h=="function"?h({nativeElement:g.current}):h.current={nativeElement:g.current})},[h]);const b=_r(r,p,3),[v,j]=i.useMemo(()=>{if(typeof o=="number")return[o,o];if(Array.isArray(o)){const $=_r(o[0],p,0),I=_r(o[1],p,0);return[$,I]}const E=_r(o,p,0);return[E,E]},[o,p]),C=`${100/b}%`,w=i.useCallback((E,$)=>{x(I=>{const L=new Map(I);return L.set(E,$),L})},[]),{columnItems:y,layoutInfo:k}=i.useMemo(()=>{const E=Array.from({length:b},()=>[]),$=Array(b).fill(0),I=[];for(let L=0;L<e.length;L++){const P=e[L];let H;if(P.column!==void 0&&P.column>=0&&P.column<b)H=P.column;else{H=0;let F=$[0];for(let M=1;M<b;M++)$[M]<F&&(F=$[M],H=M)}E[H].push(P);const z=P.height??m.get(P.key)??0;$[H]+=z+j,I.push({key:P.key,column:H})}return{columnItems:E,layoutInfo:I}},[e,b,m,j]),B=i.useRef("");i.useEffect(()=>{const E=JSON.stringify(k);E!==B.current&&(B.current=E,a?.(k))},[k,a]);const R=V({display:"flex",flexDirection:"row",marginLeft:v?-(v/2):void 0,marginRight:v?-(v/2):void 0},d?.root,u),S={display:"flex",flexDirection:"column",width:C,...d?.column};return t.jsx("div",{ref:g,style:R,className:Ye(c,f?.root),children:y.map((E,$)=>t.jsx("div",{style:S,className:f?.column,children:E.map(I=>t.jsx(Ia,{item:I,index:e.findIndex(L=>L.key===I.key),column:$,columnWidth:"100%",horizontalGutter:v,verticalGutter:j,itemRender:s,onResize:w,fresh:l,itemClassName:f?.item,itemStyle:d?.item},I.key))},$))})}const Ea=i.forwardRef(La);function dn(e,r){if(e!==void 0)return typeof e=="number"?e:e.endsWith("%")?parseFloat(e)/100*r:parseFloat(e)}function hs(e){return null}function $a({isVertical:e,onMouseDown:r,collapsibleStart:o,collapsibleEnd:s,onCollapseStart:l,onCollapseEnd:a,isStartCollapsed:c,isEndCollapsed:u,barClassName:f,barStyle:d,collapseButtonClassName:h,collapseButtonStyle:g}){const[m,x]=i.useState(!1),p={position:"relative",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",[e?"height":"width"]:"0.75rem",[e?"width":"height"]:"100%",cursor:e?"row-resize":"col-resize",userSelect:"none",zIndex:1},b={[e?"width":"height"]:"100%",[e?"height":"width"]:m?3:2,backgroundColor:m?n.colorPrimary:n.colorBorder,borderRadius:1,transition:"background-color 0.15s ease, height 0.15s ease, width 0.15s ease"},v=C=>{const y=C==="start"?"-0.875rem":"0.875rem",k={position:"absolute",width:"1.25rem",height:"1.25rem",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",border:`1px solid ${n.colorBorder}`,backgroundColor:n.colorBg,cursor:"pointer",fontSize:"0.625rem",color:n.colorTextMuted,opacity:m?1:0,transition:"opacity 0.15s ease",zIndex:2};return e?{...k,top:"50%",left:"50%",transform:`translate(calc(-50% + ${y}), -50%)`}:{...k,top:"50%",left:"50%",transform:`translate(-50%, calc(-50% + ${y}))`}},j=C=>{const w=C==="start",y=w?c:u;return e?y?w?"▼":"▲":w?"▲":"▼":y?w?"▶":"◀":w?"◀":"▶"};return t.jsxs("div",{style:{...p,...d},className:f,onMouseDown:r,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),children:[t.jsx("div",{style:b}),o&&t.jsx("button",{style:{...v("start"),...g},className:h,onClick:C=>{C.stopPropagation(),l()},onMouseDown:C=>C.stopPropagation(),children:j("start")}),s&&t.jsx("button",{style:{...v("end"),...g},className:h,onClick:C=>{C.stopPropagation(),a()},onMouseDown:C=>C.stopPropagation(),children:j("end")})]})}function Pa({children:e,orientation:r="horizontal",lazy:o=!1,onResize:s,onResizeStart:l,onResizeEnd:a,className:c,style:u,classNames:f,styles:d}){const h=i.useRef(null),g=r==="vertical",m=[];i.Children.forEach(e,H=>{i.isValidElement(H)&&H.type===hs&&m.push({defaultSize:H.props.defaultSize,size:H.props.size,min:H.props.min,max:H.props.max,resizable:H.props.resizable??!0,collapsible:H.props.collapsible??!1,children:H.props.children,style:H.props.style,className:H.props.className})});const x=m.length,[p,b]=i.useState(()=>{const H=[];let z=0;for(const W of m)if(W.defaultSize!==void 0||W.size!==void 0){const A=W.size??W.defaultSize;if(typeof A=="string"&&A.endsWith("%")){const D=parseFloat(A);H.push(D),z+=D}else H.push(-(typeof A=="number"?A:parseFloat(A)))}else H.push(0);const F=100-z,M=H.filter(W=>W===0).length;if(M>0){const W=F/M;return H.map(A=>A===0?W:A<0?-A:A)}return H.map(W=>W<0?-W:W)}),[v,j]=i.useState(()=>Array(x).fill(!1)),C=i.useRef([]),w=i.useRef(null),[y,k]=i.useState(!1),B=i.useRef(null),R=i.useRef(null);i.useEffect(()=>{if(!m.some(W=>W.size!==void 0))return;const z=h.current?g?h.current.offsetHeight:h.current.offsetWidth:0,F=m.map((W,A)=>{if(W.size===void 0)return p[A]??100/x;const D=W.size;if(typeof D=="string"&&D.endsWith("%"))return parseFloat(D);const T=typeof D=="number"?D:parseFloat(D);return z>0?T/z*100:T});F.some((W,A)=>Math.abs(W-(p[A]??0))>.01)&&b(F)}),i.useEffect(()=>{if(!h.current)return;const H=g?h.current.offsetHeight:h.current.offsetWidth;if(H===0)return;let z=!1;const F=p.map((M,W)=>{const A=m[W];if(A&&A.size===void 0&&A.defaultSize!==void 0){const D=A.defaultSize;if(typeof D=="number"&&D>100)return z=!0,D/H*100}return M});z&&b(F)},[]);const S=i.useCallback(H=>{if(!h.current)return H;const z=g?h.current.offsetHeight:h.current.offsetWidth;return H.map((F,M)=>{const W=m[M];if(!W)return F;const A=dn(W.min,z),D=dn(W.max,z),T=A!==void 0?A/z*100:0,O=D!==void 0?D/z*100:100;return Math.min(Math.max(F,T),O)})},[g,m]),E=i.useCallback(H=>z=>{if(z.preventDefault(),!h.current||!m[H]?.resizable||!m[H+1]?.resizable)return;const F=g?h.current.offsetHeight:h.current.offsetWidth,M=g?z.clientY:z.clientX;w.current={barIndex:H,startPos:M,startSizes:[...p],containerSize:F},k(!0),l?.(p),o&&(B.current=[...p])},[g,m,p,l,o]);i.useEffect(()=>{if(!y)return;const H=F=>{if(!w.current)return;const{barIndex:M,startPos:W,startSizes:A,containerSize:D}=w.current,Y=((g?F.clientY:F.clientX)-W)/D*100,X=[...A];X[M]=A[M]+Y,X[M+1]=A[M+1]-Y;const K=[...X],G=A[M]+A[M+1],Q=S(K);K[M]=Q[M],K[M+1]=G-K[M];const N=S(K);if(K[M+1]=N[M+1],K[M]=G-K[M+1],o){if(B.current=K,R.current&&w.current){const le=m.length-1,re=w.current.containerSize-le*12,_=K.slice(0,w.current.barIndex+1).reduce((J,Te)=>J+Te,0)/100*re+w.current.barIndex*12+6;g?(R.current.style.top=`${_}px`,R.current.style.left="0"):(R.current.style.left=`${_}px`,R.current.style.top="0"),R.current.style.display="block"}}else b(K),s?.(K)},z=()=>{R.current&&(R.current.style.display="none"),o&&B.current&&(b(B.current),s?.(B.current),B.current=null),k(!1),w.current=null,a?.(p)};return document.addEventListener("mousemove",H),document.addEventListener("mouseup",z),()=>{document.removeEventListener("mousemove",H),document.removeEventListener("mouseup",z)}},[y,g,S,o,p,s,a]);const $=i.useCallback(H=>{j(z=>{const F=[...z];if(F[H]){const M=C.current[H]||100/x;b(W=>{const A=[...W],D=H===0?1:H-1;return A[D]-=M-A[H],A[H]=M,s?.(A),A}),F[H]=!1}else C.current[H]=p[H],b(M=>{const W=[...M],A=H===0?1:H-1;return W[A]+=W[H],W[H]=0,s?.(W),W}),F[H]=!0;return F})},[x,p,s]),I=p,L=V({display:"flex",flexDirection:g?"column":"row",width:"100%",height:"100%",overflow:"hidden",position:"relative"},d?.root,u),P={position:"fixed",inset:0,zIndex:9999,cursor:g?"row-resize":"col-resize"};return t.jsxs("div",{ref:h,style:L,className:Ye(c,f?.root),children:[y&&t.jsx("div",{style:P}),o&&t.jsx("div",{ref:R,style:{display:"none",position:"absolute",...g?{left:0,right:0,height:2}:{top:0,bottom:0,width:2},backgroundColor:n.colorBorder,zIndex:10,pointerEvents:"none",transform:g?"translateY(-50%)":"translateX(-50%)"}}),m.map((H,z)=>{const F={flexGrow:0,flexShrink:1,flexBasis:`${I[z]}%`,minWidth:0,minHeight:0,overflow:"auto",transition:y?"none":"flex-basis 0.15s ease",...d?.panel,...H.style},M=(W,A)=>{const D=W==="start"?A:A+1,T=m[D];return T?typeof T.collapsible=="boolean"?T.collapsible:typeof T.collapsible=="object"?W==="start"?!!T.collapsible.start:!!T.collapsible.end:!1:!1};return t.jsxs("div",{style:{display:"contents"},children:[t.jsx("div",{style:F,className:Ye(H.className,f?.panel),children:H.children}),z<x-1&&t.jsx($a,{isVertical:g,onMouseDown:E(z),collapsibleStart:M("end",z)||typeof m[z]?.collapsible=="boolean"&&!!m[z]?.collapsible,collapsibleEnd:M("start",z)||typeof m[z+1]?.collapsible=="boolean"&&!!m[z+1]?.collapsible,onCollapseStart:()=>$(z),onCollapseEnd:()=>$(z+1),isStartCollapsed:v[z],isEndCollapsed:v[z+1],barClassName:f?.bar,barStyle:d?.bar,collapseButtonClassName:f?.collapseButton,collapseButtonStyle:d?.collapseButton})]},z)})]})}const Da=Object.assign(Pa,{Panel:hs});function za(){return window}function Wa(e){return e===window?window.scrollY||document.documentElement.scrollTop:e.scrollTop}function un(e,r){if(r===window)return e.getBoundingClientRect().top+window.scrollY;const o=r,s=o.getBoundingClientRect();return e.getBoundingClientRect().top-s.top+o.scrollTop}function ps(e){const r=[];for(const o of e)r.push(o),o.children&&r.push(...ps(o.children));return r}function Ha({items:e=[],direction:r="vertical",offsetTop:o=0,targetOffset:s,bounds:l=5,getContainer:a=za,getCurrentAnchor:c,onChange:u,onClick:f,replace:d=!1,className:h,style:g,classNames:m,styles:x}){const[p,b]=i.useState(""),v=i.useRef(null),j=i.useRef(null),C=i.useRef(new Map),w=i.useRef(!1),y=i.useRef(p);y.current=p;const k=r==="vertical",B=ps(e),R=s??o,S=i.useCallback((z,F)=>{F?C.current.set(z,F):C.current.delete(z)},[]),E=i.useCallback(()=>{if(w.current)return;if(c){const W=c(y.current);W!==y.current&&(b(W),u?.(W));return}const z=a(),F=Wa(z)+o+l;let M="";for(const W of B){if(!W.href.startsWith("#"))continue;const A=W.href.slice(1),D=document.getElementById(A);if(!D)continue;un(D,z)<=F&&(M=W.href)}!M&&B.length>0&&(M=B[0].href),M!==y.current&&(b(M),u?.(M))},[B,l,a,c,o,u]);i.useEffect(()=>{const z=a(),F=()=>{E()};return z.addEventListener("scroll",F,{passive:!0}),E(),()=>{z.removeEventListener("scroll",F)}},[E,a]),i.useEffect(()=>{if(!v.current||!j.current)return;const z=C.current.get(p);if(!z){v.current.style.opacity="0";return}const F=j.current.getBoundingClientRect(),M=z.getBoundingClientRect();k?(v.current.style.top=`${M.top-F.top}px`,v.current.style.height=`${M.height}px`):(v.current.style.left=`${M.left-F.left}px`,v.current.style.width=`${M.width}px`),v.current.style.opacity="1",k||z.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},[p,k]);const $=i.useCallback((z,F,M)=>{if(f?.(z,{title:M,href:F}),!F.startsWith("#"))return;z.preventDefault();const W=F.slice(1),A=document.getElementById(W);if(!A)return;w.current=!0;const D=a(),O=un(A,D)-R;D===window?window.scrollTo({top:O,behavior:"smooth"}):D.scrollTo({top:O,behavior:"smooth"}),b(F),u?.(F),d?window.history.replaceState(null,"",F):window.history.pushState(null,"",F),setTimeout(()=>{w.current=!1},500)},[a,f,u,d,R]),I=(z,F=0)=>z.map(M=>{const W=p===M.href,A=k?{display:"flex",alignItems:"center",minHeight:"2.75rem",padding:`0.25rem 0 0.25rem ${F+1}rem`,color:W?n.colorPrimary:n.colorTextMuted,textDecoration:"none",fontSize:"0.875rem",lineHeight:"1.375rem",transition:"color 0.15s ease",cursor:"pointer",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}:{display:"inline-flex",alignItems:"center",minHeight:"2.75rem",padding:"0.25rem 1rem",color:W?n.colorPrimary:n.colorTextMuted,textDecoration:"none",fontSize:"0.875rem",lineHeight:"1.375rem",transition:"color 0.15s ease",cursor:"pointer",whiteSpace:"nowrap"},D=t.jsx("a",{ref:T=>S(M.href,T),href:M.href,style:{...A,...x?.link},className:m?.link,onClick:T=>$(T,M.href,M.title),children:M.title});return t.jsxs("div",{style:k?{}:{display:"inline-block"},children:[typeof M.title=="string"?t.jsx(Wt,{content:M.title,delay:600,children:D}):D,k&&M.children&&M.children.length>0&&t.jsx("div",{children:I(M.children,F+1)})]},M.key)}),L=V(k?{position:"relative",paddingLeft:2,overflow:"hidden"}:{position:"relative",display:"flex",flexWrap:"wrap",paddingBottom:2,overflow:"hidden"},x?.root,g),P=k?{position:"absolute",left:0,top:0,bottom:0,width:2,backgroundColor:n.colorBorder,borderRadius:1}:{position:"absolute",bottom:0,left:0,right:0,height:2,backgroundColor:n.colorBorder,borderRadius:1},H=k?{position:"absolute",left:0,width:2,backgroundColor:n.colorPrimary,borderRadius:1,transition:"top 0.15s ease, height 0.15s ease, opacity 0.15s ease",opacity:0,zIndex:1}:{position:"absolute",bottom:0,height:2,backgroundColor:n.colorPrimary,borderRadius:1,transition:"left 0.15s ease, width 0.15s ease, opacity 0.15s ease",opacity:0,zIndex:1};return t.jsxs("div",{ref:j,style:L,className:Ye(h,m?.root),children:[t.jsx("div",{style:{...P,...x?.track},className:m?.track}),t.jsx("div",{ref:v,style:{...H,...x?.indicator},className:m?.indicator}),I(e)]})}const Fa=Ha;function Aa(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{marginLeft:"0.125rem"},children:t.jsx("polyline",{points:"6 9 12 15 18 9"})})}function Oa({items:e,style:r,className:o}){const s={position:"absolute",top:"100%",left:0,marginTop:"0.25rem",minWidth:"7.5rem",backgroundColor:n.colorBg,border:`1px solid ${n.colorBorder}`,borderRadius:"0.375rem",boxShadow:n.shadowMd,padding:"0.25rem 0",zIndex:1050,maxHeight:"min(16rem, 40vh)",overflowY:"auto",overscrollBehavior:"contain",...r},l={display:"flex",alignItems:"center",gap:"0.375rem",padding:"0.625rem 0.75rem",minHeight:"2.75rem",fontSize:"0.875rem",color:n.colorText,textDecoration:"none",cursor:"pointer",border:"none",backgroundColor:"transparent",width:"100%",textAlign:"left"};return t.jsx("div",{style:s,className:o,children:e.map(a=>{const c=t.jsxs(t.Fragment,{children:[a.icon&&t.jsx("span",{style:{display:"inline-flex",fontSize:"0.875rem"},children:a.icon}),a.title]});return a.href?t.jsx("a",{href:a.href,style:l,onClick:a.onClick,onMouseEnter:u=>{u.currentTarget.style.backgroundColor=n.colorBgMuted},onMouseLeave:u=>{u.currentTarget.style.backgroundColor="transparent"},children:c},a.key):t.jsx("span",{style:l,onClick:a.onClick,onMouseEnter:u=>{u.currentTarget.style.backgroundColor=n.colorBgMuted},onMouseLeave:u=>{u.currentTarget.style.backgroundColor="transparent"},children:c},a.key)})})}function Na({items:e=[],separator:r="/",itemRender:o,params:s,className:l,style:a,classNames:c,styles:u}){const[f,d]=i.useState(null),h=[];e.forEach(p=>{p.path?h.push((h.length>0?h[h.length-1]+"/":"")+p.path):h.push(h.length>0?h[h.length-1]:"")});const g=V({fontSize:"0.875rem",color:n.colorTextMuted},u?.root,a),m={display:"flex",flexWrap:"wrap",alignItems:"center",margin:0,padding:0,listStyle:"none",...u?.list},x=(p,b)=>{const v=b===e.length-1;if(o)return o(p,s,e,h);const j=t.jsxs(t.Fragment,{children:[p.icon&&t.jsx("span",{style:{display:"inline-flex",marginRight:p.title?"0.25rem":0,fontSize:"0.875rem"},children:p.icon}),p.title,p.menu&&t.jsx(Aa,{})]}),C={display:"inline-flex",alignItems:"center",textDecoration:"none",transition:"color 0.2s ease"},w=u?.link?.color,y=w??n.colorTextMuted,k=w??n.colorPrimary,B=w??n.colorText;return v?t.jsx("span",{style:{...C,color:B,fontWeight:500,...u?.link,...p.style},className:Ye(p.className,c?.link),children:j}):p.href?t.jsx("a",{href:p.href,style:{...C,color:y,cursor:"pointer",...u?.link,...p.style},className:Ye(p.className,c?.link),onClick:p.onClick,onMouseEnter:R=>{R.currentTarget.style.color=k},onMouseLeave:R=>{R.currentTarget.style.color=y},children:j}):p.onClick?t.jsx("span",{style:{...C,color:y,cursor:"pointer",...u?.link,...p.style},className:Ye(p.className,c?.link),onClick:p.onClick,onMouseEnter:R=>{R.currentTarget.style.color=k},onMouseLeave:R=>{R.currentTarget.style.color=y},children:j}):t.jsx("span",{style:{...C,color:y,...u?.link,...p.style},className:Ye(p.className,c?.link),children:j})};return t.jsx("nav",{"aria-label":"breadcrumb",style:g,className:Ye(l,c?.root),children:t.jsx("ol",{style:m,className:c?.list,children:e.map((p,b)=>{const v=b===e.length-1,j=p.menu&&p.menu.items.length>0;return t.jsxs(i.Fragment,{children:[t.jsxs("li",{style:{display:"inline-flex",alignItems:"center",position:j?"relative":void 0,...u?.item},className:c?.item,"aria-current":v?"page":void 0,onMouseEnter:j?()=>d(b):void 0,onMouseLeave:j?()=>d(null):void 0,children:[x(p,b),j&&f===b&&t.jsx(Oa,{items:p.menu.items,style:u?.overlay,className:c?.overlay})]}),!v&&t.jsx("li",{"aria-hidden":"true",style:{margin:"0 0.5rem",color:n.colorTextSubtle,userSelect:"none",...u?.separator},className:c?.separator,children:r})]},b)})})})}const Va={bottom:{top:"100%",left:"50%",transform:"translateX(-50%)",paddingTop:"0.25rem"},bottomLeft:{top:"100%",left:0,paddingTop:"0.25rem"},bottomRight:{top:"100%",right:0,paddingTop:"0.25rem"},top:{bottom:"100%",left:"50%",transform:"translateX(-50%)",paddingBottom:"0.25rem"},topLeft:{bottom:"100%",left:0,paddingBottom:"0.25rem"},topRight:{bottom:"100%",right:0,paddingBottom:"0.25rem"}},Ya={bottom:{top:-4,left:"50%",transform:"translateX(-50%) rotate(-135deg)"},bottomLeft:{top:-4,left:16,transform:"rotate(-135deg)"},bottomRight:{top:-4,right:16,transform:"rotate(-135deg)"},top:{bottom:-4,left:"50%",transform:"translateX(-50%) rotate(45deg)"},topLeft:{bottom:-4,left:16,transform:"rotate(45deg)"},topRight:{bottom:-4,right:16,transform:"rotate(45deg)"}};function Ka(e,r){const o=r?0:6,s=e.startsWith("top");return`${e==="bottom"||e==="top"?"translateX(-50%) ":""}translateY(${s?o:-o}px)`}function _a(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"6 9 12 15 18 9"})})}function Xa(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"9 18 15 12 9 6"})})}function gs({items:e,globalOnClick:r,onCloseDropdown:o,classNames:s,styles:l,isSubmenu:a=!1}){const[c,u]=i.useState(null),f={minWidth:a?"8.75rem":"10rem",backgroundColor:n.colorBg,border:`1px solid ${n.colorBorder}`,borderRadius:"0.5rem",boxShadow:n.shadowMd,padding:"0.25rem 0",...a?{}:l?.overlay},d=(h,g)=>{h.disabled||(h.onClick?.({key:h.key,domEvent:g}),r?.({key:h.key,domEvent:g}),o())};return t.jsx("div",{style:f,className:a?void 0:s?.overlay,children:e.map(h=>h.type==="divider"?t.jsx("div",{style:{height:1,margin:"0.25rem 0",backgroundColor:n.colorBorder}},h.key):h.type==="group"?t.jsxs("div",{children:[t.jsx("div",{style:{padding:"0.3125rem 0.75rem",fontSize:"0.75rem",color:n.colorTextSubtle,fontWeight:600},children:h.title}),h.children?.map(g=>t.jsx(fn,{item:g,globalOnClick:r,onCloseDropdown:o,onItemClick:d,hoveredSubmenu:c,setHoveredSubmenu:u,classNames:s,styles:l},g.key))]},h.key):t.jsx(fn,{item:h,globalOnClick:r,onCloseDropdown:o,onItemClick:d,hoveredSubmenu:c,setHoveredSubmenu:u,classNames:s,styles:l},h.key))})}function fn({item:e,globalOnClick:r,onCloseDropdown:o,onItemClick:s,hoveredSubmenu:l,setHoveredSubmenu:a,classNames:c,styles:u}){const f=e.children&&e.children.length>0,d={display:"flex",alignItems:"center",gap:"0.5rem",padding:"0.375rem 0.75rem",fontSize:"0.875rem",minHeight:"2.75rem",cursor:e.disabled?"not-allowed":"pointer",color:e.danger?n.colorError:e.disabled?n.colorTextSubtle:n.colorText,opacity:e.disabled?.5:1,transition:"background-color 0.15s ease",position:f?"relative":void 0,...u?.item};return t.jsxs("div",{style:d,className:c?.item,onClick:!e.disabled&&!f?h=>s(e,h):void 0,onMouseEnter:h=>{e.disabled||(h.currentTarget.style.backgroundColor=e.danger?n.colorErrorBg:n.colorBgMuted),f&&a(e.key)},onMouseLeave:h=>{h.currentTarget.style.backgroundColor="transparent",f&&a(null)},children:[e.icon&&t.jsx("span",{style:{display:"inline-flex",fontSize:"0.875rem"},children:e.icon}),t.jsx("span",{style:{flex:1},children:e.label}),f&&t.jsx("span",{style:{display:"inline-flex",marginLeft:"0.25rem"},children:t.jsx(Xa,{})}),f&&l===e.key&&t.jsx("div",{style:{position:"absolute",left:"100%",top:-4,paddingLeft:"0.25rem"},children:t.jsx(gs,{items:e.children,globalOnClick:r,onCloseDropdown:o,classNames:c,styles:u,isSubmenu:!0})})]})}function ms({children:e,menu:r,trigger:o=["hover"],placement:s="bottomLeft",arrow:l=!1,open:a,onOpenChange:c,disabled:u=!1,dropdownRender:f,className:d,style:h,classNames:g,styles:m}){const[x,p]=i.useState(!1),[b,v]=i.useState(!1),[j,C]=i.useState(s),w=i.useRef(null),y=i.useRef(null),k=i.useRef(null),B=a!==void 0,R=B?a:x,S=T=>{u||(B||p(T),c?.(T))},E=()=>{w.current&&(clearTimeout(w.current),w.current=null),C(s),w.current=window.setTimeout(()=>{S(!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{v(!0)})})},100)},$=()=>{w.current&&(clearTimeout(w.current),w.current=null),v(!1),w.current=window.setTimeout(()=>{S(!1)},150)},I=()=>{R?$():E()};i.useLayoutEffect(()=>{if(!R||!k.current||!y.current)return;const T=k.current.getBoundingClientRect(),O=y.current.getBoundingClientRect(),Y=O.top,X=window.innerHeight-O.bottom,K=j.startsWith("top");!K&&T.bottom>window.innerHeight?Y>X&&C(G=>G.replace("bottom","top").replace("Bottom","Top")):K&&T.top<0&&X>Y&&C(G=>G.replace("top","bottom").replace("Top","Bottom"))}),i.useEffect(()=>{C(s)},[s]),i.useEffect(()=>()=>{w.current&&clearTimeout(w.current)},[]),i.useEffect(()=>{if(!R||!o.includes("click"))return;const T=O=>{y.current&&!y.current.contains(O.target)&&$()};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[R,o]);const L=T=>{o.includes("contextMenu")&&(T.preventDefault(),I())},P=()=>{o.includes("hover")&&E()},H=()=>{o.includes("hover")&&$()},z=()=>{o.includes("click")&&I()},F=r?t.jsx(gs,{items:r.items,globalOnClick:r.onClick,onCloseDropdown:$,classNames:g,styles:m}):null,M=f?f(F):F,W={position:"absolute",zIndex:1050,...Va[j],opacity:b?1:0,transform:Ka(j,b),transition:"opacity 0.15s ease-out, transform 0.15s ease-out"},A={position:"absolute",width:8,height:8,backgroundColor:n.colorBg,borderRight:`1px solid ${n.colorBorder}`,borderBottom:`1px solid ${n.colorBorder}`,...Ya[j],...m?.arrow},D=V({position:"relative",display:"inline-flex"},m?.root,h);return t.jsxs("div",{ref:y,style:D,className:Ye(d,g?.root),onMouseEnter:P,onMouseLeave:H,onContextMenu:L,children:[t.jsx("span",{onClick:z,style:{display:"inline-flex"},children:e}),R&&t.jsxs("div",{ref:k,style:W,children:[l&&t.jsx("div",{style:A,className:g?.arrow}),M]})]})}function Ga({children:e,menu:r,placement:o="bottomRight",trigger:s=["hover"],onClick:l,icon:a,disabled:c=!1,loading:u=!1,variant:f="primary",color:d,size:h="md",className:g,style:m,classNames:x,styles:p}){return t.jsxs("div",{style:V({display:"inline-flex",...m},p?.root),className:Ye(g,x?.root),children:[t.jsx(Wr,{variant:f,color:d,size:h,disabled:c,loading:u,onClick:l,style:{borderTopRightRadius:0,borderBottomRightRadius:0},children:e}),t.jsx(ms,{menu:r,trigger:s,placement:o,disabled:c,classNames:x,styles:p,children:t.jsx(Wr,{variant:f,color:d,size:h,disabled:c,icon:a||t.jsx(_a,{}),style:{borderTopLeftRadius:0,borderBottomLeftRadius:0,borderLeft:"1px solid rgba(255,255,255,0.2)",minWidth:"auto",paddingLeft:"0.5rem",paddingRight:"0.5rem"}})})]})}const Ua=Object.assign(ms,{Button:Ga});function uo(e){return"type"in e&&e.type==="divider"}function Fr(e){return"type"in e&&e.type==="group"}function xs(e){return!uo(e)&&!Fr(e)&&"children"in e&&Array.isArray(e.children)}function qa(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"9 18 15 12 9 6"})})}function hn(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"6 9 12 15 18 9"})})}function Qa({item:e,ctx:r}){const o={margin:"0.25rem 0",padding:0,listStyle:"none",borderTop:e.dashed?`1px dashed ${n.colorBorder}`:`1px solid ${n.colorBorder}`,...r.styles?.divider};return t.jsx("li",{role:"separator",style:o,className:r.classNames?.divider})}function Za({item:e,ctx:r,level:o}){const s={padding:"0.5rem 1rem",fontSize:"0.75rem",fontWeight:600,color:n.colorTextSubtle,lineHeight:"1.5",...r.styles?.groupTitle};return r.mode==="inline"&&!r.inlineCollapsed&&(s.paddingLeft=16+r.inlineIndent*o),t.jsxs("li",{role:"presentation",style:{listStyle:"none",...r.styles?.group},className:r.classNames?.group,children:[t.jsx("div",{style:s,className:r.classNames?.groupTitle,children:e.label}),t.jsx("ul",{role:"group",style:{listStyle:"none",margin:0,padding:0},children:e.children.map(l=>t.jsx(oo,{item:l,ctx:r,level:o,keyPath:[]},ro(l)))})]})}function Ja({item:e,ctx:r,level:o,keyPath:s}){const l=r.selectedKeys.includes(e.key),a=r.mode==="horizontal",c=r.mode==="vertical",u=r.mode==="inline",f=u&&r.inlineCollapsed,d=[e.key,...s],h=r.styles?.item?.color,g=r.styles?.item?.backgroundColor,{backgroundColor:m,...x}=r.styles?.item??{},p={display:"flex",alignItems:"center",gap:"0.5rem",padding:a?"0 1.25rem":"0.5rem 1rem",lineHeight:a?"2.875rem":"1.375rem",cursor:e.disabled?"not-allowed":"pointer",color:e.danger?n.colorError:l?h??n.colorPrimary:h??n.colorText,backgroundColor:l&&!a?g??n.colorPrimaryLight:"transparent",opacity:e.disabled?.5:1,transition:"color 0.2s, background-color 0.2s",listStyle:"none",position:"relative",whiteSpace:"nowrap",...x};u&&!f&&(p.paddingLeft=16+r.inlineIndent*o),f&&(p.justifyContent="center",p.padding="0.5rem 0"),l&&c&&(p.borderRight=`3px solid ${h??n.colorPrimary}`),l&&a&&(p.borderBottom=`2px solid ${h??n.colorPrimary}`);const b=w=>{if(e.disabled)return;const y=w.currentTarget;(!l||a)&&(y.style.backgroundColor=e.danger?n.colorErrorBg:n.colorBgMuted),a&&!l&&(y.style.color=e.danger?n.colorError:h??n.colorPrimary)},v=w=>{const y=w.currentTarget;l&&!a?y.style.backgroundColor=g??n.colorPrimaryLight:y.style.backgroundColor="transparent",a&&!l&&(y.style.color=e.danger?n.colorError:h??n.colorText)},j=w=>{e.disabled||r.onItemClick(e,d,w)},C=t.jsxs(t.Fragment,{children:[e.icon&&t.jsx("span",{style:{display:"inline-flex",flexShrink:0,fontSize:"0.875rem"},children:e.icon}),(!f||!e.icon)&&t.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:e.label})]});return t.jsx("li",{role:"menuitem",style:p,className:r.classNames?.item,title:f?void 0:e.title,onClick:j,onMouseEnter:b,onMouseLeave:v,children:f&&e.title?t.jsx(Wt,{content:e.title,position:"right",delay:100,children:C}):C})}function ec({item:e,ctx:r,level:o,keyPath:s}){const l=i.useRef(null),a=r.openKeys.includes(e.key),c=r.mode==="horizontal",u=r.mode==="inline",f=r.mode==="vertical",d=u&&r.inlineCollapsed,h=c||f||d,g=[e.key,...s],m=Lo(e.children,r.selectedKeys),x={display:"flex",alignItems:"center",gap:"0.5rem",padding:c?"0 1.25rem":"0.5rem 1rem",lineHeight:c?"2.875rem":"1.375rem",cursor:e.disabled?"not-allowed":"pointer",color:m?n.colorPrimary:n.colorText,opacity:e.disabled?.5:1,transition:"color 0.2s, background-color 0.2s",listStyle:"none",position:"relative",whiteSpace:"nowrap",...r.styles?.item};u&&!d&&(x.paddingLeft=16+r.inlineIndent*o),d&&(x.justifyContent="center",x.padding="0.5rem 0"),m&&c&&(x.borderBottom=`2px solid ${n.colorPrimary}`);const p=R=>{e.disabled||(R.currentTarget.style.backgroundColor=n.colorBgMuted,c&&(R.currentTarget.style.color=n.colorPrimary))},b=R=>{R.currentTarget.style.backgroundColor="transparent",c&&!m&&(R.currentTarget.style.color=n.colorText)},v=R=>{e.disabled||(R.stopPropagation(),(r.triggerSubMenuAction==="click"||u)&&r.onSubMenuToggle(e.key))},j=()=>{e.disabled||!h||r.triggerSubMenuAction==="hover"&&r.onSubMenuMouseEnter(e.key)},C=()=>{h&&r.triggerSubMenuAction==="hover"&&r.onSubMenuMouseLeave(e.key)},w=r.expandIcon??(h?c?t.jsx(hn,{}):t.jsx(qa,{}):t.jsx(hn,{})),y={display:"inline-flex",marginLeft:"auto",transition:"transform 0.2s",transform:a&&!h?"rotate(180deg)":"rotate(0deg)"},k={position:"absolute",zIndex:1050,listStyle:"none",margin:0,padding:"0.25rem 0",minWidth:"10rem",backgroundColor:n.colorBg,border:`1px solid ${n.colorBorder}`,borderRadius:"0.5rem",boxShadow:n.shadowMd,...c?{top:"100%",left:0,marginTop:"0.25rem"}:{left:"100%",top:0,marginLeft:"0.25rem"},...r.styles?.submenu},B={listStyle:"none",margin:0,padding:0,overflow:"hidden",transition:"max-height 0.2s ease, opacity 0.2s ease",maxHeight:a?1e3:0,opacity:a?1:0,...r.styles?.submenu};return t.jsxs("li",{role:"none",style:{listStyle:"none",position:h?"relative":void 0},onMouseEnter:j,onMouseLeave:C,children:[t.jsxs("div",{role:"menuitem","aria-expanded":a,style:x,className:r.classNames?.item,onClick:v,onMouseEnter:p,onMouseLeave:b,children:[e.icon&&t.jsx("span",{style:{display:"inline-flex",flexShrink:0,fontSize:"0.875rem"},children:e.icon}),(!d||!e.icon)&&t.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:e.label}),(!d||!e.icon)&&t.jsx("span",{style:y,children:w})]}),h&&a&&t.jsx("ul",{ref:l,role:"menu",style:k,className:r.classNames?.submenu,children:e.children.map(R=>t.jsx(oo,{item:R,ctx:r,level:0,keyPath:g},ro(R)))}),!h&&t.jsx("ul",{role:"menu",style:B,className:r.classNames?.submenu,children:e.children.map(R=>t.jsx(oo,{item:R,ctx:r,level:o+1,keyPath:g},ro(R)))})]})}function ro(e){return"key"in e&&e.key!=null?String(e.key):uo(e)?`divider-${Math.random()}`:Fr(e)?`group-${Math.random()}`:`item-${Math.random()}`}function Lo(e,r){for(const o of e)if(!uo(o)&&!Fr(o)&&"key"in o&&r.includes(o.key)||xs(o)&&Lo(o.children,r)||Fr(o)&&Lo(o.children,r))return!0;return!1}function oo({item:e,ctx:r,level:o,keyPath:s}){return uo(e)?t.jsx(Qa,{item:e,ctx:r}):Fr(e)?t.jsx(Za,{item:e,ctx:r,level:o}):xs(e)?t.jsx(ec,{item:e,ctx:r,level:o,keyPath:s}):t.jsx(Ja,{item:e,ctx:r,level:o,keyPath:s})}function tc({items:e=[],mode:r="vertical",selectedKeys:o,defaultSelectedKeys:s=[],openKeys:l,defaultOpenKeys:a=[],multiple:c=!1,selectable:u=!0,inlineCollapsed:f=!1,inlineIndent:d=24,triggerSubMenuAction:h="hover",onClick:g,onSelect:m,onDeselect:x,onOpenChange:p,expandIcon:b,className:v,style:j,classNames:C,styles:w}){const[y,k]=i.useState(s),B=o??y,[R,S]=i.useState(a),E=l??R,$=i.useRef(new Map);i.useEffect(()=>()=>{$.current.forEach(O=>clearTimeout(O))},[]);const I=i.useRef(E);I.current=E;const L=O=>{l===void 0&&S(O),p?.(O)},M={mode:r,selectedKeys:B,openKeys:E,inlineCollapsed:f,inlineIndent:d,triggerSubMenuAction:h,expandIcon:b,selectable:u,multiple:c,classNames:C,styles:w,onItemClick:(O,Y,X)=>{const K={key:O.key,keyPath:Y,domEvent:X};if(O.onClick?.(K),g?.(K),u){const G=B.includes(O.key);let Q;c?G?(Q=B.filter(N=>N!==O.key),x?.({...K,selectedKeys:Q})):(Q=[...B,O.key],m?.({...K,selectedKeys:Q})):(Q=[O.key],G||m?.({...K,selectedKeys:Q})),o===void 0&&k(Q)}},onSubMenuToggle:O=>{const Y=I.current,X=Y.includes(O);L(X?Y.filter(K=>K!==O):[...Y,O])},onSubMenuMouseEnter:O=>{const Y=new Set;$.current.forEach((G,Q)=>{clearTimeout(G),Y.add(Q)}),$.current.clear();let K=I.current.filter(G=>!Y.has(G));K.includes(O)||(K=[...K,O]),L(K)},onSubMenuMouseLeave:O=>{const Y=window.setTimeout(()=>{const X=I.current;L(X.filter(K=>K!==O)),$.current.delete(O)},150);$.current.set(O,Y)}},W=r==="horizontal",A=r==="inline",D={listStyle:"none",margin:0,padding:W?0:"0.25rem 0",backgroundColor:n.colorBg,color:n.colorText,fontSize:"0.875rem",overflow:"hidden",...W?{display:"flex",alignItems:"center",borderBottom:`1px solid ${n.colorBorder}`}:{borderRight:`1px solid ${n.colorBorder}`},...A&&f?{width:"3rem",overflow:"hidden"}:{}},T=V(D,w?.root,j);return t.jsx("ul",{role:W?"menubar":"menu",style:T,className:Ye(v,C?.root),children:e.map(O=>t.jsx(oo,{item:O,ctx:M,level:0,keyPath:[]},ro(O)))})}function pn(e,r,o){return Math.max(r,Math.min(o,e))}function rc(e,r,o){if(r<=0)return[];const s=o?2:3,l=[];if(r<=s*2+3){for(let u=1;u<=r;u++)l.push(u);return l}l.push(1);const a=Math.max(2,e-s),c=Math.min(r-1,e+s);a>2&&l.push("jump-prev");for(let u=a;u<=c;u++)l.push(u);return c<r-1&&l.push("jump-next"),r>1&&l.push(r),l}function mr({page:e,type:r,isActive:o,disabled:s,size:l,showTitle:a,itemRender:c,itemStyle:u,itemClassName:f,onClick:d}){const h=l==="small",g=r==="jump-prev"||r==="jump-next",m=h?"1.5rem":"2rem",x=h?"0.75rem":"0.875rem",p=h?12:14,b={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:m,height:m,fontSize:x,lineHeight:1,padding:"0 0.25rem",border:g?"none":"1px solid",borderColor:g?"transparent":o?n.colorPrimary:n.colorBorder,borderRadius:"0.375rem",backgroundColor:g?"transparent":o?n.colorPrimary:n.colorBg,color:g?n.colorTextMuted:o?n.colorPrimaryContrast:n.colorText,fontWeight:o?600:400,cursor:s?"not-allowed":"pointer",opacity:s?.5:1,transition:"all 0.2s",userSelect:"none",...u};let v;a&&(r==="prev"?v="Previous Page":r==="next"?v="Next Page":r==="jump-prev"?v="Previous 5 Pages":r==="jump-next"?v="Next 5 Pages":v=String(e));let j;r==="prev"?j=t.jsx("svg",{width:p,height:p,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"15 18 9 12 15 6"})}):r==="next"?j=t.jsx("svg",{width:p,height:p,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"9 6 15 12 9 18"})}):g?j=t.jsx("span",{style:{letterSpacing:"0.125rem",fontWeight:700},children:"•••"}):j=e;const C=r==="prev"||r==="next"||r==="jump-prev"||r==="jump-next",w=t.jsx("button",{type:"button",disabled:s,"aria-label":r==="prev"?"Previous":r==="next"?"Next":void 0,"aria-current":o?"page":void 0,style:b,className:f,onMouseEnter:k=>{if(s||o)return;const B=k.currentTarget;g||(B.style.borderColor=n.colorPrimary),B.style.color=n.colorPrimary},onMouseLeave:k=>{if(s||o)return;const B=k.currentTarget;g?B.style.color=n.colorTextMuted:(B.style.borderColor=n.colorBorder,B.style.color=n.colorText)},children:j}),y=c?c(e,r,w):w;return t.jsx("li",{style:{listStyle:"none",cursor:s?"not-allowed":"pointer"},onClick:s?void 0:d,children:v&&C?t.jsx(Wt,{content:v,delay:300,children:y}):y})}function oc({value:e,options:r,disabled:o,size:s,onChange:l,itemsPerPage:a="/ page"}){const[c,u]=i.useState(!1),f=i.useRef(null),d=s==="small",h=d?"1.5rem":"2rem",g=d?"0.75rem":"0.875rem";i.useEffect(()=>{if(!c)return;const b=v=>{f.current&&!f.current.contains(v.target)&&u(!1)};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[c]);const m={display:"inline-flex",alignItems:"center",gap:"0.375rem",height:h,border:"1px solid",borderColor:c?n.colorPrimary:n.colorBorder,borderRadius:"0.375rem",backgroundColor:n.colorBg,color:n.colorText,fontSize:g,padding:d?"0 0.5rem":"0 0.75rem",cursor:o?"not-allowed":"pointer",opacity:o?.5:1,transition:"border-color 0.2s",userSelect:"none",whiteSpace:"nowrap"},x={position:"absolute",top:"100%",left:0,marginTop:"0.25rem",minWidth:"100%",backgroundColor:n.colorBg,border:`1px solid ${n.colorBorder}`,borderRadius:"0.5rem",boxShadow:n.shadowMd,padding:"0.25rem 0",zIndex:1050},p=b=>{l(b),u(!1)};return t.jsxs("div",{ref:f,style:{position:"relative"},children:[t.jsxs("div",{role:"button",tabIndex:o?-1:0,style:m,onClick:()=>{o||u(!c)},onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),o||u(!c))},onMouseEnter:b=>{o||c||(b.currentTarget.style.borderColor=n.colorPrimary)},onMouseLeave:b=>{o||c||(b.currentTarget.style.borderColor=n.colorBorder)},children:[t.jsxs("span",{children:[e," ",a]}),t.jsx("svg",{width:10,height:10,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{transition:"transform 0.2s",transform:c?"rotate(180deg)":"rotate(0deg)",opacity:.6},children:t.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),c&&t.jsx("div",{style:x,children:r.map(b=>t.jsxs("div",{style:{padding:"0.375rem 0.75rem",fontSize:g,cursor:"pointer",color:b===e?n.colorPrimary:n.colorText,fontWeight:b===e?600:400,transition:"background-color 0.15s ease",whiteSpace:"nowrap"},onClick:()=>p(b),onMouseEnter:v=>{v.currentTarget.style.backgroundColor=n.colorBgMuted},onMouseLeave:v=>{v.currentTarget.style.backgroundColor="transparent"},children:[b," ",a]},b))})]})}function ys({total:e=0,current:r,defaultCurrent:o=1,pageSize:s,defaultPageSize:l=10,pageSizeOptions:a=[10,20,50,100],showSizeChanger:c,showQuickJumper:u=!1,showTotal:f,simple:d=!1,size:h="default",disabled:g=!1,hideOnSinglePage:m=!1,showLessItems:x=!1,showTitle:p=!0,itemRender:b,onChange:v,onShowSizeChange:j,className:C,style:w,classNames:y,styles:k}){const{locale:B}=Gt(),R=B.Pagination,[S,E]=i.useState(o),[$,I]=i.useState(l),L=r??S,P=s??$,H=Math.max(1,Math.ceil(e/P)),z=pn(L,1,H),F=c??e>50,M=me=>{const he=pn(me,1,H);he!==z&&(r===void 0&&E(he),v?.(he,P))},W=me=>{s===void 0&&I(me);const he=Math.max(1,Math.ceil(e/me)),Le=Math.min(z,he);r===void 0&&E(Le),j?.(Le,me),v?.(Le,me)},[A,D]=i.useState(""),T=me=>{if(me.key==="Enter"){const he=parseInt(A,10);isNaN(he)||M(he),D("")}},[O,Y]=i.useState(String(z));d&&O!==String(z)&&document.activeElement?.tagName!=="INPUT"&&Y(String(z));const X=me=>{if(me.key==="Enter"){const he=parseInt(O,10);isNaN(he)||M(he)}},K=()=>{const me=parseInt(O,10);isNaN(me)||M(me),Y(String(z))};if(m&&H<=1)return null;const G=h==="small",Q=G?"1.5rem":"2rem",N=G?"0.75rem":"0.875rem",le=G?"0.25rem":"0.5rem",re={display:"flex",alignItems:"center",gap:le,color:n.colorText,fontSize:N},q=V(re,k?.root,w),_={width:"3.125rem",height:Q,border:`1px solid ${n.colorBorder}`,borderRadius:"0.375rem",textAlign:"center",backgroundColor:n.colorBg,color:n.colorText,fontSize:N,outline:"none",transition:"border-color 0.2s"},J=me=>{me.currentTarget.style.borderColor=n.colorPrimary},Te=me=>{me.currentTarget.style.borderColor=n.colorBorder};if(d)return t.jsx("nav",{"aria-label":"pagination",style:q,className:Ye(C,y?.root),children:t.jsxs("ul",{style:{display:"flex",alignItems:"center",gap:le,listStyle:"none",margin:0,padding:0},children:[t.jsx(mr,{page:z-1,type:"prev",isActive:!1,disabled:g||z<=1,size:h,showTitle:p,itemRender:b,itemStyle:k?.item,itemClassName:y?.item,onClick:()=>M(z-1)}),t.jsxs("li",{style:{display:"flex",alignItems:"center",gap:"0.25rem",listStyle:"none"},children:[t.jsx("input",{type:"text",value:O,disabled:g,style:{..._,...g?{opacity:.5,cursor:"not-allowed"}:{}},onChange:me=>Y(me.target.value),onKeyDown:X,onBlur:K,onFocus:J}),t.jsx("span",{style:{color:n.colorTextMuted},children:"/"}),t.jsx("span",{style:{color:n.colorTextMuted},children:H})]}),t.jsx(mr,{page:z+1,type:"next",isActive:!1,disabled:g||z>=H,size:h,showTitle:p,itemRender:b,itemStyle:k?.item,itemClassName:y?.item,onClick:()=>M(z+1)})]})});const ke=rc(z,H,x),Ie=5,fe=e===0?0:(z-1)*P+1,ze=Math.min(z*P,e);return t.jsxs("nav",{"aria-label":"pagination",style:q,className:Ye(C,y?.root),children:[f&&t.jsx("span",{style:{color:n.colorTextMuted,fontSize:N,marginRight:"0.25rem"},children:f(e,[fe,ze])}),t.jsxs("ul",{style:{display:"flex",alignItems:"center",gap:le,listStyle:"none",margin:0,padding:0},children:[t.jsx(mr,{page:z-1,type:"prev",isActive:!1,disabled:g||z<=1,size:h,showTitle:p,itemRender:b,itemStyle:k?.item,itemClassName:y?.item,onClick:()=>M(z-1)}),ke.map((me,he)=>me==="jump-prev"||me==="jump-next"?t.jsx(mr,{page:me==="jump-prev"?Math.max(1,z-Ie):Math.min(H,z+Ie),type:me,isActive:!1,disabled:g,size:h,showTitle:p,itemRender:b,itemStyle:k?.item,itemClassName:y?.item,onClick:()=>{M(me==="jump-prev"?Math.max(1,z-Ie):Math.min(H,z+Ie))}},`${me}-${he}`):t.jsx(mr,{page:me,type:"page",isActive:me===z,disabled:g,size:h,showTitle:p,itemRender:b,itemStyle:k?.item,itemClassName:y?.item,onClick:()=>M(me)},me)),t.jsx(mr,{page:z+1,type:"next",isActive:!1,disabled:g||z>=H,size:h,showTitle:p,itemRender:b,itemStyle:k?.item,itemClassName:y?.item,onClick:()=>M(z+1)})]}),(F||u)&&t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:le,...k?.options},className:y?.options,children:[F&&t.jsx(oc,{value:P,options:a,disabled:g,size:h,onChange:W,itemsPerPage:R?.itemsPerPage}),u&&t.jsxs("span",{style:{display:"flex",alignItems:"center",gap:"0.25rem",color:n.colorText,fontSize:N},children:[R?.jumpTo??"Go to",t.jsx("input",{type:"text",value:A,disabled:g,style:{..._,...g?{opacity:.5,cursor:"not-allowed"}:{}},onChange:me=>D(me.target.value),onKeyDown:T,onFocus:J,onBlur:me=>{Te(me)}})]})]})]})}const nc=({size:e})=>t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"20 6 9 17 4 12"})}),sc=({size:e})=>t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]});function ic({percent:e,ringSize:r,iconSize:o}){const l=(r-3)/2,a=2*Math.PI*l,c=a-e/100*a,f=o/2-2-r/2;return t.jsxs("svg",{width:r,height:r,style:{position:"absolute",top:f,left:f,transform:"rotate(-90deg)"},children:[t.jsx("circle",{cx:r/2,cy:r/2,r:l,fill:"none",stroke:n.colorBorder,strokeWidth:3}),t.jsx("circle",{cx:r/2,cy:r/2,r:l,fill:"none",stroke:n.colorPrimary,strokeWidth:3,strokeDasharray:a,strokeDashoffset:c,strokeLinecap:"round",style:{transition:"stroke-dashoffset 0.3s"}})]})}function lc(e){switch(e){case"finish":return n.colorPrimary;case"error":return n.colorError;default:return n.colorBorder}}function ac({item:e,index:r,stepStatus:o,isFirst:s,isLast:l,isClickable:a,isVertical:c,isNavigation:u,isDot:f,progressDotRender:d,showPercent:h,percent:g,size:m,labelVertical:x,prevTailColor:p,classNames:b,styles:v,onClick:j}){const C=m==="small",w=C?"1.5rem":"2rem",y=C?24:32,k=C?"0.75rem":"0.875rem",B=C?12:14,R=C?"0.875rem":"1rem",S=C?"0.75rem":"0.875rem",E="0.5rem",$=8,L={wait:{iconBg:n.colorBg,iconBorder:n.colorBorder,iconColor:n.colorTextMuted,titleColor:n.colorTextMuted,descColor:n.colorTextMuted,tailColor:n.colorBorder},process:{iconBg:n.colorPrimary,iconBorder:n.colorPrimary,iconColor:n.colorPrimaryContrast,titleColor:n.colorText,descColor:n.colorTextMuted,tailColor:n.colorBorder},finish:{iconBg:n.colorBg,iconBorder:n.colorPrimary,iconColor:n.colorPrimary,titleColor:n.colorText,descColor:n.colorTextMuted,tailColor:n.colorPrimary},error:{iconBg:n.colorBg,iconBorder:n.colorError,iconColor:n.colorError,titleColor:n.colorError,descColor:n.colorError,tailColor:n.colorError}}[o],P=a&&!e.disabled?j:void 0,H=a&&!e.disabled?"pointer":e.disabled?"not-allowed":"default";let z;if(f){const T={width:E,height:E,borderRadius:"50%",backgroundColor:o==="wait"?n.colorBorder:L.iconBorder,transition:"all 0.3s"},O=t.jsx("span",{style:T});typeof d=="function"?z=d(O,{index:r,status:o,title:e.title,description:e.description}):z=O}else e.icon?z=e.icon:o==="finish"?z=t.jsx(nc,{size:B}):o==="error"?z=t.jsx(sc,{size:B}):z=r+1;const F=f?{display:"flex",alignItems:"center",justifyContent:"center",width:E,height:E,position:"relative",flexShrink:0,...v?.icon}:{display:"flex",alignItems:"center",justifyContent:"center",width:w,height:w,borderRadius:"50%",border:`2px solid ${L.iconBorder}`,backgroundColor:L.iconBg,color:L.iconColor,fontSize:k,fontWeight:600,flexShrink:0,transition:"all 0.3s",position:"relative",...v?.icon},M=t.jsxs("div",{style:F,className:b?.icon,children:[z,h&&!f&&t.jsx(ic,{percent:g,ringSize:y+10,iconSize:y})]}),W={fontSize:R,fontWeight:o==="process"?600:400,color:L.titleColor,lineHeight:1.5,whiteSpace:"nowrap"},A=T=>t.jsxs("div",{style:{...T,...v?.content},className:b?.content,children:[t.jsxs("div",{style:W,children:[e.title,e.subTitle&&t.jsx("span",{style:{fontSize:S,color:n.colorTextMuted,marginLeft:"0.5rem",fontWeight:400},children:e.subTitle})]}),e.description&&t.jsx("div",{style:{fontSize:S,color:L.descColor,marginTop:"0.125rem",lineHeight:1.5},children:e.description})]}),D=T=>t.jsx("div",{style:{flex:1,height:1,backgroundColor:T,transition:"background-color 0.3s",...v?.tail},className:b?.tail});if(u){const T=C?16:20;return t.jsxs("div",{style:{flex:1,display:"flex",alignItems:"center",position:"relative",padding:C?"0.5rem 1rem":"0.75rem 1.5rem",backgroundColor:o==="process"?n.colorBgMuted:"transparent",cursor:H,opacity:e.disabled?.5:1,transition:"background-color 0.2s",...v?.step},className:b?.step,onClick:P,onMouseEnter:O=>{!a||e.disabled||o==="process"||(O.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:O=>{!a||e.disabled||o==="process"||(O.currentTarget.style.backgroundColor="transparent")},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1},children:[t.jsx("span",{style:{fontSize:R,fontWeight:o==="process"?600:400,color:L.titleColor},children:e.title}),e.description&&t.jsx("span",{style:{fontSize:S,color:L.descColor,marginTop:"0.125rem"},children:e.description})]}),o==="process"&&t.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,height:2,backgroundColor:n.colorPrimary}}),!l&&t.jsx("div",{style:{position:"absolute",right:0,top:"50%",transform:"translateY(-50%) translateX(50%)",zIndex:1,width:0,height:0,borderTop:`${T/2}px solid transparent`,borderBottom:`${T/2}px solid transparent`,borderLeft:`${T/2}px solid ${n.colorBorder}`}})]})}if(!c&&x){const T=f?"0.25rem":"0.5rem";return t.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",cursor:H,opacity:e.disabled?.5:1,...v?.step},className:b?.step,onClick:P,children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",width:"100%"},children:[t.jsx("div",{style:{flex:1,display:"flex",alignItems:"center",paddingRight:T},children:!s&&p&&D(p)}),M,t.jsx("div",{style:{flex:1,display:"flex",alignItems:"center",paddingLeft:T},children:!l&&D(L.tailColor)})]}),A({display:"flex",flexDirection:"column",alignItems:"center",marginTop:f?"0.25rem":"0.5rem"})]})}return c?t.jsxs("div",{style:{display:"flex",alignItems:"flex-start",position:"relative",paddingBottom:l?0:"1.5rem",cursor:H,opacity:e.disabled?.5:1,...v?.step},className:b?.step,onClick:P,children:[M,A({display:"flex",flexDirection:"column",marginLeft:f?"0.75rem":"0.5rem"}),!l&&t.jsx("div",{style:{position:"absolute",left:f?$/2:y/2,top:f?$+4:y+4,bottom:0,width:1,backgroundColor:L.tailColor,transition:"background-color 0.3s",...v?.tail},className:b?.tail})]}):t.jsxs("div",{style:{flex:l?"none":1,display:"flex",alignItems:"flex-start",cursor:H,opacity:e.disabled?.5:1,...v?.step},className:b?.step,onClick:P,children:[M,A({display:"flex",flexDirection:"column",marginLeft:"0.5rem"}),!l&&t.jsx("div",{style:{flex:1,display:"flex",alignItems:"center",height:w,minWidth:"1.5rem",padding:"0 0.5rem"},children:D(L.tailColor)})]})}function cc({items:e=[],current:r=0,direction:o="horizontal",size:s="default",status:l="process",type:a="default",labelPlacement:c="horizontal",progressDot:u=!1,percent:f,initial:d=0,onChange:h,className:g,style:m,classNames:x,styles:p}){const b=o==="vertical",v=a==="navigation",j=!!u&&!v,C=!!h,w=j||c==="vertical",y=typeof u=="function"?u:void 0,k=(S,E)=>E.status?E.status:S<r?"finish":S===r?l:"wait",B={display:"flex",flexDirection:b?"column":"row",width:"100%"};v&&(B.borderBottom=`1px solid ${n.colorBorder}`);const R=V(B,p?.root,m);return t.jsx("div",{role:"navigation","aria-label":"Steps",style:R,className:Ye(g,x?.root),children:e.map((S,E)=>{const $=k(E,S),I=E===e.length-1,L=f!==void 0&&E===r&&$==="process";let P;if(E>0){const H=k(E-1,e[E-1]);P=lc(H)}return t.jsx(ac,{item:S,index:E+d,stepStatus:$,isFirst:E===0,isLast:I,isClickable:C,isVertical:b,isNavigation:v,isDot:j,progressDotRender:y,showPercent:L,percent:f??0,size:s,labelVertical:w,prevTailColor:P,classNames:x,styles:p,onClick:()=>h?.(E)},E)})})}const gn=200,dc={large:{paddingH:"1.25rem 1rem",paddingV:"0.75rem 1.5rem",fontSize:"1rem",cardHeight:"2.75rem"},middle:{paddingH:"0.75rem 1rem",paddingV:"0.75rem 1.5rem",fontSize:"0.875rem",cardHeight:"2.5rem"},small:{paddingH:"0.5rem 0.75rem",paddingV:"0.5rem 1rem",fontSize:"0.875rem",cardHeight:"2.25rem"}};function uc(){return t.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function fc(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),t.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}function hc(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"15 18 9 12 15 6"})})}function pc(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"9 18 15 12 9 6"})})}function gc(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"18 15 12 9 6 15"})})}function mc(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"6 9 12 15 18 9"})})}function bs({items:e=[],activeKey:r,defaultActiveKey:o,type:s="line",size:l="middle",tabPosition:a="top",centered:c=!1,animated:u={inkBar:!0,tabPane:!1},tabBarGutter:f,tabBarStyle:d,tabBarExtraContent:h,indicator:g,addIcon:m,removeIcon:x,hideAdd:p=!1,destroyOnHidden:b=!1,onChange:v,onEdit:j,onTabClick:C,className:w,style:y,classNames:k,styles:B}){const R=r!==void 0,[S,E]=i.useState(o??e[0]?.key??""),$=R?r:S,I=i.useCallback(oe=>{R||E(oe),v?.(oe)},[R,v]),L=a==="left"||a==="right",P=s==="card"||s==="editable-card",H=s==="editable-card",z=typeof u=="boolean"?u:u.inkBar,F=typeof u=="boolean"?u:u.tabPane,M=dc[l],[W,A]=i.useState(null),D=i.useRef(new Map),T=i.useRef(null),O=i.useRef(null),[Y,X]=i.useState({}),[K,G]=i.useState(!1),[Q,N]=i.useState(!1),[le,re]=i.useState(!1),q=i.useRef(new Set);$&&q.current.add($);const _=i.useCallback(()=>{if(P||!T.current)return;const oe=D.current.get($);if(!oe){X({opacity:0});return}const Re=T.current;let Ze,Fe;L?(Ze=oe.offsetTop-Re.offsetTop,Fe=oe.offsetHeight):(Ze=oe.offsetLeft-Re.offsetLeft,Fe=oe.offsetWidth);let et=Fe,je=0;if(g?.size!=null){et=typeof g.size=="function"?g.size(Fe):g.size;const ve=g.align??"center";ve==="center"?je=(Fe-et)/2:ve==="end"&&(je=Fe-et)}if(L){const ve={position:"absolute",width:2,height:et,top:Ze+je,backgroundColor:n.colorPrimary,borderRadius:1,transition:z?"all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)":"none",...a==="left"?{right:0}:{left:0}};X(ve)}else{const ve={position:"absolute",height:2,width:et,left:Ze+je,bottom:0,backgroundColor:n.colorPrimary,borderRadius:1,transition:z?"all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)":"none"};X(ve)}},[$,P,L,a,z,g]),J=i.useCallback(()=>{const oe=T.current;if(oe)if(L){const Re=oe.scrollHeight>oe.clientHeight+1;G(Re),N(oe.scrollTop>0),re(oe.scrollTop+oe.clientHeight<oe.scrollHeight-1)}else{const Re=oe.scrollWidth>oe.clientWidth+1;G(Re),N(oe.scrollLeft>0),re(oe.scrollLeft+oe.clientWidth<oe.scrollWidth-1)}},[L]),Te=i.useCallback(()=>{const oe=T.current,Re=D.current.get($);if(!(!oe||!Re))if(L){const Ze=Re.offsetTop-oe.offsetTop,Fe=Ze+Re.offsetHeight;Ze<oe.scrollTop?oe.scrollTo({top:Ze,behavior:"smooth"}):Fe>oe.scrollTop+oe.clientHeight&&oe.scrollTo({top:Fe-oe.clientHeight,behavior:"smooth"})}else{const Ze=Re.offsetLeft-oe.offsetLeft,Fe=Ze+Re.offsetWidth;Ze<oe.scrollLeft?oe.scrollTo({left:Ze,behavior:"smooth"}):Fe>oe.scrollLeft+oe.clientWidth&&oe.scrollTo({left:Fe-oe.clientWidth,behavior:"smooth"})}},[$,L]);i.useEffect(()=>{_(),Te()},[_,Te]),i.useEffect(()=>{J()},[J,e]),i.useEffect(()=>{const oe=T.current;if(!oe)return;const Re=new ResizeObserver(()=>{_(),J()});return Re.observe(oe),D.current.forEach(Ze=>Re.observe(Ze)),()=>Re.disconnect()},[_,J,e]),i.useEffect(()=>{const oe=T.current;if(!oe)return;const Re=()=>J();oe.addEventListener("scroll",Re,{passive:!0});const Ze=Fe=>{L||Fe.deltaX===0&&(Math.abs(Fe.deltaY)<1||(Fe.preventDefault(),oe.scrollLeft+=Fe.deltaY))};return oe.addEventListener("wheel",Ze,{passive:!1}),()=>{oe.removeEventListener("scroll",Re),oe.removeEventListener("wheel",Ze)}},[J,L]);const ke=oe=>{const Re=T.current;Re&&(L?Re.scrollBy({top:oe,behavior:"smooth"}):Re.scrollBy({left:oe,behavior:"smooth"}))},Ie=(oe,Re)=>{oe.disabled||(C?.(oe.key,Re),oe.key!==$&&I(oe.key))},fe=(oe,Re)=>{Re.stopPropagation(),j?.(oe.key,"remove")},ze=oe=>{j?.(oe,"add")};let me=null,he=null;if(h)if(typeof h=="object"&&h!==null&&"left"in h){const oe=h;me=oe.left??null,he=oe.right??null}else he=h;const De=V({display:"flex",flexDirection:a==="bottom"?"column-reverse":a==="right"?"row-reverse":a==="left"?"row":"column",width:"100%",minWidth:0},B?.root,y),Oe=P?{}:a==="top"?{borderBottom:`1px solid ${n.colorBorder}`}:a==="bottom"?{borderTop:`1px solid ${n.colorBorder}`}:a==="left"?{borderRight:`1px solid ${n.colorBorder}`}:{borderLeft:`1px solid ${n.colorBorder}`},Be={display:"flex",flexDirection:L?"column":"row",alignItems:L?"stretch":"center",position:"relative",flexShrink:0,...Oe,...d},we=V(Be,B?.tabBar),ee={flex:1,minWidth:0,minHeight:0,overflow:"hidden",position:"relative"},ae={display:"flex",flexDirection:L?"column":"row",position:"relative",overflowX:L?"hidden":"auto",overflowY:L?"auto":"hidden",scrollbarWidth:"none",justifyContent:c&&!K?"center":void 0},se={display:"flex",alignItems:"center",justifyContent:"center",width:L?"100%":"2rem",height:L?"2rem":"100%",border:"none",background:"none",color:n.colorTextMuted,cursor:"pointer",flexShrink:0,padding:0},Se={flex:1,...P?{border:`1px solid ${n.colorBorder}`,...a==="top"?{borderTop:"none",borderRadius:"0 0 0.5rem 0.5rem"}:a==="bottom"?{borderBottom:"none",borderRadius:"0.5rem 0.5rem 0 0"}:a==="left"?{borderLeft:"none",borderRadius:"0 0.5rem 0.5rem 0"}:{borderRight:"none",borderRadius:"0.5rem 0 0 0.5rem"}}:{}},ie=V(Se,B?.content),ce=(oe,Re)=>{const Ze=f??(L?0:P?2:0),Fe=L?M.paddingV:M.paddingH,et=W===oe.key&&!oe.disabled&&!Re,je={display:"flex",alignItems:"center",gap:"0.5rem",padding:Fe,fontSize:M.fontSize,cursor:oe.disabled?"not-allowed":"pointer",color:oe.disabled?n.colorTextSubtle:et?P?n.colorPrimary:n.colorPrimaryHover:Re?P?n.colorText:n.colorPrimary:n.colorText,fontWeight:Re?600:400,opacity:oe.disabled?.5:1,whiteSpace:"nowrap",outline:"none",transition:"color 0.2s, background-color 0.2s",flexShrink:0,position:"relative",userSelect:"none",...L?{marginBottom:Ze}:{marginRight:Ze}};if(P){const ve=a==="top",xe=a==="bottom",U=a==="left",de="0.5rem",ue={top:`${de} ${de} 0 0`,bottom:`0 0 ${de} ${de}`,left:`${de} 0 0 ${de}`,right:`0 ${de} ${de} 0`};Object.assign(je,{backgroundColor:Re||et?n.colorBg:n.colorBgSubtle,border:`1px solid ${n.colorBorder}`,borderRadius:ue[a],height:M.cardHeight,...ve?{borderBottomColor:Re?n.colorBg:n.colorBorder}:{},...xe?{borderTopColor:Re?n.colorBg:n.colorBorder}:{},...U?{borderRightColor:Re?n.colorBg:n.colorBorder}:{},...!ve&&!xe&&!U?{borderLeftColor:Re?n.colorBg:n.colorBorder}:{}})}return je},He={display:"inline-flex",alignItems:"center",justifyContent:"center",marginLeft:"0.25rem",padding:"0.125rem",border:"none",background:"none",color:n.colorTextMuted,cursor:"pointer",borderRadius:"0.25rem",transition:"color 0.2s, background-color 0.2s",lineHeight:0},Pe={display:"flex",alignItems:"center",justifyContent:"center",width:M.cardHeight,height:M.cardHeight,border:`1px dashed ${n.colorBorder}`,borderRadius:"0.5rem",background:"none",color:n.colorTextMuted,cursor:"pointer",flexShrink:0,marginLeft:L?0:"0.25rem",marginTop:L?"0.25rem":0,transition:"color 0.2s, border-color 0.2s"},Ge=()=>e.map(oe=>{const Re=oe.key===$,Ze=(oe.destroyOnHidden??b)&&!Re,Fe=q.current.has(oe.key);if(!(Re||oe.forceRender||Fe&&!Ze))return null;const je={...Re?{}:{display:"none"},padding:"1rem"};return F&&Re&&Object.assign(je,{animation:"j-tabs-fadein 0.3s ease"}),t.jsx("div",{role:"tabpanel","aria-hidden":!Re,style:je,children:oe.children},oe.key)}),Ne=oe=>Re=>{Re?D.current.set(oe,Re):D.current.delete(oe)};return t.jsxs("div",{style:De,className:Ye(w,k?.root),children:[t.jsx("style",{children:`
|
|
103
103
|
@keyframes j-tabs-fadein {
|
|
104
104
|
from { opacity: 0; }
|
|
105
105
|
to { opacity: 1; }
|
|
106
106
|
}
|
|
107
|
-
`}),t.jsxs("div",{style:Re,className:k?.tabBar,children:[ze&&t.jsx("div",{style:{display:"flex",alignItems:"center",flexShrink:0},children:ze}),X&&t.jsx("button",{style:{...ae,opacity:G?1:.3,pointerEvents:G?"auto":"none"},onClick:()=>Te(-gn),tabIndex:-1,"aria-label":"Scroll tabs back",children:E?t.jsx(gc,{}):t.jsx(hc,{})}),t.jsx("div",{ref:T,style:ke,children:t.jsxs("div",{ref:D,style:ee,role:"tablist",children:[e.map(Z=>{const Be=Z.key===$,Oe=ie(Z,Be);return t.jsxs("div",{ref:Ge(Z.key),role:"tab","aria-selected":Be,"aria-disabled":Z.disabled,tabIndex:Be?0:-1,style:{...Oe,...B?.tab},className:k?.tab,onClick:Qe=>Ce(Z,Qe),onMouseEnter:Qe=>{if(Z.disabled)return;const _e=Qe.currentTarget;I.current===Z.key||(_e.style.color=H?n.colorPrimary:n.colorPrimaryHover)},onMouseLeave:Qe=>{if(Z.disabled)return;const _e=Qe.currentTarget,et=I.current===Z.key;et||(_e.style.color=n.colorText),H&&!et&&(_e.style.backgroundColor=n.colorBgSubtle)},children:[Z.icon&&t.jsx("span",{style:{display:"inline-flex",lineHeight:0},children:Z.icon}),Z.label&&t.jsx("span",{children:Z.label}),z&&Z.closable!==!1&&t.jsx("button",{style:ce,onClick:Qe=>Le(Z,Qe),onMouseEnter:Qe=>{const _e=Qe.currentTarget;_e.style.backgroundColor=n.colorBgMuted,_e.style.color=n.colorText},onMouseLeave:Qe=>{const _e=Qe.currentTarget;_e.style.backgroundColor="transparent",_e.style.color=n.colorTextMuted},tabIndex:-1,"aria-label":`Close ${Z.label??Z.key}`,children:Z.closeIcon??x??t.jsx(uc,{})})]},Z.key)}),!H&&t.jsx("div",{style:{...O,...B?.inkBar},className:k?.inkBar})]})}),X&&t.jsx("button",{style:{...ae,opacity:N?1:.3,pointerEvents:N?"auto":"none"},onClick:()=>Te(gn),tabIndex:-1,"aria-label":"Scroll tabs forward",children:E?t.jsx(mc,{}):t.jsx(pc,{})}),xe&&t.jsx("div",{style:{display:"flex",alignItems:"center",flexShrink:0},children:xe}),z&&!p&&t.jsx("button",{style:He,onClick:ue,onMouseEnter:Z=>{const Be=Z.currentTarget;Be.style.color=n.colorPrimary,Be.style.borderColor=n.colorPrimary},onMouseLeave:Z=>{const Be=Z.currentTarget;Be.style.color=n.colorTextMuted,Be.style.borderColor=n.colorBorder},tabIndex:-1,"aria-label":"Add tab",children:m??t.jsx(fc,{})})]}),t.jsx("div",{style:we,className:k?.content,children:Pe()})]})}function xc(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function yc(e){const r=[];for(const o of e)o.options?r.push(...o.options):r.push(o);return r}function bc(e,r){const o=e.toLowerCase();return!!(r.value.toLowerCase().includes(o)||typeof r.label=="string"&&r.label.toLowerCase().includes(o))}function vc({options:e=[],value:r,defaultValue:o="",placeholder:s,open:l,defaultOpen:a=!1,disabled:c=!1,allowClear:u=!1,autoFocus:f=!1,backfill:d=!1,defaultActiveFirstOption:h=!0,variant:g="outlined",status:m,filterOption:x=!0,notFoundContent:p=null,popupMatchSelectWidth:b=!0,onChange:v,onSearch:j,onSelect:C,onFocus:w,onBlur:y,onDropdownVisibleChange:k,onClear:B,prefix:R,suffix:S,className:L,style:$,classNames:I,styles:P}){const E=r!==void 0,[H,z]=i.useState(o),A=E?r:H,M=l!==void 0,[W,F]=i.useState(a),D=M?l:W,[T,O]=i.useState(-1),[Y,X]=i.useState(!1),[_,G]=i.useState(!1),[Q,N]=i.useState(!1),le=i.useRef(null),oe=i.useRef(null),q=i.useRef(null),K=i.useRef(null),re=i.useCallback(je=>{E||z(je),v?.(je)},[E,v]),Te=i.useCallback(je=>{M||F(je),k?.(je),je?(G(!1),requestAnimationFrame(()=>{requestAnimationFrame(()=>{N(!0)})})):N(!1)},[M,k]),Ce=i.useMemo(()=>{if(x===!1)return e;const je=typeof x=="function"?x:bc;return e.map(Se=>{if(Se.options){const me=Se.options.filter(U=>je(A,U));return me.length===0?null:{...Se,options:me}}return je(A,Se)?Se:null}).filter(Boolean)},[e,A,x]),Le=i.useMemo(()=>yc(Ce),[Ce]),ue=Le.length>0||p!==null,ze=D&&ue&&!c;i.useEffect(()=>{if(h&&Le.length>0){const je=Le.findIndex(Se=>!Se.disabled);O(je>=0?je:-1)}else O(-1)},[Le,h]),i.useEffect(()=>{f&&oe.current&&oe.current.focus()},[f]),i.useEffect(()=>{if(!D)return;const je=Se=>{le.current&&!le.current.contains(Se.target)&&Te(!1)};return document.addEventListener("mousedown",je),()=>document.removeEventListener("mousedown",je)},[D,Te]),i.useLayoutEffect(()=>{if(!D||!q.current||!le.current)return;const je=q.current.getBoundingClientRect(),Se=le.current.getBoundingClientRect(),me=Se.top,U=window.innerHeight-Se.bottom;!_&&je.bottom>window.innerHeight?me>U&&G(!0):_&&je.top<0&&U>me&&G(!1)}),i.useEffect(()=>{if(!ze||T<0)return;const je=q.current;if(!je)return;const Se=je.querySelector(`[data-option-index="${T}"]`);if(Se){const me=Se.offsetTop,U=me+Se.offsetHeight;me<je.scrollTop?je.scrollTop=me:U>je.scrollTop+je.clientHeight&&(je.scrollTop=U-je.clientHeight)}},[T,ze]);const xe=je=>{const Se=je.target.value;K.current=null,re(Se),j?.(Se),D||Te(!0)},ge=je=>{je.disabled||(K.current=null,re(je.value),C?.(je.value,je),Te(!1),oe.current?.focus())},Ie=je=>{X(!0),w?.(je),!D&&ue&&Te(!0)},De=je=>{const Se=je.relatedTarget;le.current&&Se&&le.current.contains(Se)||(X(!1),y?.(je),K.current!==null&&(re(K.current),K.current=null),Te(!1))},Ae=je=>{je.stopPropagation(),K.current=null,re(""),B?.(),oe.current?.focus()},Re=je=>{if(Le.length===0)return;let Se=T;for(let me=0;me<Le.length&&(Se=(Se+je+Le.length)%Le.length,!!Le[Se].disabled);me++);O(Se),d&&Le[Se]&&(K.current=Le[Se].value,E||z(Le[Se].value),v?.(Le[Se].value))},ke=je=>{switch(je.key){case"ArrowDown":je.preventDefault(),D?Re(1):Te(!0);break;case"ArrowUp":je.preventDefault(),D&&Re(-1);break;case"Enter":D&&T>=0&&Le[T]&&!Le[T].disabled&&(je.preventDefault(),ge(Le[T]));break;case"Escape":D&&(je.preventDefault(),Te(!1));break}},ee=V({position:"relative",display:"inline-block",width:"100%"},P?.root,$),ae={outlined:{border:`1px solid ${n.colorBorder}`,backgroundColor:n.colorBg},filled:{border:"1px solid transparent",backgroundColor:n.colorBgMuted},borderless:{border:"1px solid transparent",backgroundColor:"transparent"}},se=m==="error"?n.colorError:m==="warning"?n.colorWarning:void 0,we=m==="error"?n.colorErrorBg:m==="warning"?n.colorWarningBg:n.colorPrimaryLight,ie={width:"100%",minHeight:"2.75rem",padding:"0.375rem 0.75rem",paddingLeft:R?"2rem":"0.75rem",paddingRight:u&&A?S?"3.5rem":"2.25rem":S?"2rem":"0.75rem",fontSize:"1rem",fontFamily:"inherit",lineHeight:"1.5",borderRadius:"0.375rem",outline:"none",color:c?n.colorTextSubtle:se||n.colorText,cursor:c?"not-allowed":void 0,transition:"border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",...ae[g],...se?{borderColor:se}:{},...Y&&!c?{borderColor:se||n.colorPrimary,boxShadow:`0 0 0 2px ${we}`}:{},...c?{opacity:.6}:{}},ce=V(ie,P?.input),Pe={position:"absolute",left:0,zIndex:1050,width:(typeof b=="number"?b:void 0)||(b===!0?"100%":void 0),minWidth:b===!1?120:void 0,maxHeight:"min(16rem, 40vh)",overflowY:"auto",overscrollBehavior:"contain",backgroundColor:n.colorBg,border:`1px solid ${n.colorBorder}`,borderRadius:"0.5rem",boxShadow:n.shadowMd,padding:"0.25rem 0",opacity:Q?1:0,transition:"opacity 0.15s ease-out, transform 0.15s ease-out",..._?{bottom:"100%",marginBottom:"0.25rem",transform:Q?"translateY(0)":"translateY(6px)"}:{top:"100%",marginTop:"0.25rem",transform:Q?"translateY(0)":"translateY(-6px)"}},Ge=V(Pe,P?.dropdown),Z={padding:"0.625rem 0.75rem",minHeight:"2.75rem",fontSize:"0.875rem",cursor:"pointer",transition:"background-color 0.15s ease",display:"flex",alignItems:"center",lineHeight:"1.375rem",boxSizing:"border-box"},Be={position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:4,pointerEvents:"none"},Oe={display:"flex",alignItems:"center",justifyContent:"center",width:28,height:28,margin:-4,borderRadius:"50%",border:"none",backgroundColor:"transparent",color:n.colorTextMuted,cursor:"pointer",padding:0,pointerEvents:"auto",transition:"color 0.15s ease"};let Qe=0;const _e=je=>{const Se=Qe++,me=Se===T,U={...Z,backgroundColor:me?n.colorBgMuted:void 0,color:je.disabled?n.colorTextSubtle:n.colorText,cursor:je.disabled?"not-allowed":"pointer",opacity:je.disabled?.5:1,...P?.option};return t.jsx("div",{role:"option","aria-selected":me,"aria-disabled":je.disabled,"data-option-index":Se,style:U,className:I?.option,onClick:()=>ge(je),onMouseEnter:he=>{je.disabled||(O(Se),he.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:he=>{!je.disabled&&!me&&(he.currentTarget.style.backgroundColor="transparent")},children:je.label??je.value},je.value)},et=()=>(Qe=0,Le.length===0?p===null?null:t.jsx("div",{style:{padding:"0.5rem 0.75rem",fontSize:"0.875rem",color:n.colorTextSubtle,textAlign:"center"},children:p}):Ce.map(je=>je.options?t.jsxs("div",{children:[t.jsx("div",{style:{padding:"0.3125rem 0.75rem",fontSize:"0.75rem",color:n.colorTextSubtle,fontWeight:600,userSelect:"none"},children:je.label??je.value}),je.options.map(_e)]},`group-${je.value}`):_e(je)));return t.jsxs("div",{ref:le,style:ee,className:Ve(L,I?.root),children:[t.jsx("input",{ref:oe,type:"text",role:"combobox","aria-expanded":ze,"aria-haspopup":"listbox","aria-autocomplete":"list",autoComplete:"off",value:A,placeholder:s,disabled:c,style:ce,className:I?.input,onChange:xe,onFocus:Ie,onBlur:De,onKeyDown:ke}),R&&t.jsx("span",{style:{position:"absolute",left:10,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",color:n.colorTextMuted,pointerEvents:"none"},children:R}),(S||u&&A&&!c)&&t.jsxs("span",{style:Be,children:[u&&A&&!c&&t.jsx("button",{type:"button",style:Oe,onMouseDown:je=>je.preventDefault(),onClick:Ae,onMouseEnter:je=>{je.currentTarget.style.color=n.colorText,je.currentTarget.style.backgroundColor=n.colorBgMuted},onMouseLeave:je=>{je.currentTarget.style.color=n.colorTextMuted,je.currentTarget.style.backgroundColor="transparent"},tabIndex:-1,"aria-label":"Clear",children:t.jsx(xc,{})}),S&&t.jsx("span",{style:{display:"flex",color:n.colorTextMuted},children:S})]}),ze&&t.jsx("div",{ref:q,role:"listbox",style:Ge,className:I?.dropdown,onMouseDown:je=>je.preventDefault(),children:et()})]})}function Cc(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"6 9 12 15 18 9"})})}function vs(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"9 18 15 12 9 6"})})}function kc(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function Cs(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"20 6 9 17 4 12"})})}function ks(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})})}function wc(){return t.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function jc(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{animation:"j-nested-spin 1s linear infinite"},children:t.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})}function Pt(e,r){return r.value?e[r.value]:e.value}function Cr(e,r){return(r.label?e[r.label]:e.label)??Pt(e,r)}function $t(e,r){return r.children?e[r.children]:e.children}function vo(e,r){if(e.isLeaf===!0)return!1;const o=$t(e,r);return!!o&&o.length>0}function Xr(e,r,o){if(e.isLeaf===!0)return!1;const s=$t(e,r);return s&&s.length>0?!0:o}function Jr(e){return typeof e=="string"?e:typeof e=="number"?String(e):""}function tr(e,r,o){return e.find(s=>Pt(s,o)===r)}function Zt(e,r,o){const s=[];let l=e;for(const a of r){const c=tr(l,a,o);if(!c)break;s.push(c);const u=$t(c,o);if(u)l=u;else break}return s}function ws(e,r,o=[]){const s=[];for(const l of e){const a=[...o,l],c=$t(l,r);c&&c.length>0?s.push(...ws(c,r,a)):s.push(a)}return s}function Sc(e,r,o){const s=e.toLowerCase();return r.some(l=>Jr(Cr(l,o)).toLowerCase().includes(s))}function hr(e,r){return e.length===r.length&&e.every((o,s)=>o===r[s])}function pr(e,r){return r.some(o=>hr(o,e))}function wr(e,r,o=[]){const s=Pt(e,r),l=[...o,s],a=$t(e,r);if(a&&a.length>0){const c=[];for(const u of a)c.push(...wr(u,r,l));return c}return[l]}function Yo(e,r,o,s){const l=[];let a=e;for(let c=0;c<s;c++){const u=r[c];if(u===void 0)break;l.push(u);const f=tr(a,u,o);if(f){const d=$t(f,o);d&&(a=d)}}return l}function no(e,r,o,s,l,a){const c=Yo(a,o,l,r),u=$t(e,l);if(!u||u.length===0){const h=Pt(e,l);return pr([...c,h],s)?"checked":"unchecked"}const f=wr(e,l,c),d=f.filter(h=>pr(h,s)).length;return d===0?"unchecked":d===f.length?"checked":"indeterminate"}function Mc(e,r,o){const s=[],l=new Set;function a(c,u){for(const f of c){const d=Pt(f,o),h=[...u,d],g=$t(f,o);if(g&&g.length>0){const m=wr(f,o,u);m.length>0&&m.every(p=>pr(p,e))?(s.push(h),m.forEach(p=>{const b=e.findIndex(v=>hr(v,p));b>=0&&l.add(b)})):a(g,h)}}}return a(r,[]),e.forEach((c,u)=>{l.has(u)||s.push(c)}),s}function Bc({options:e=[],value:r,defaultValue:o,placeholder:s="Seleccionar",open:l,disabled:a=!1,allowClear:c=!0,expandTrigger:u="click",changeOnSelect:f=!1,showSearch:d=!1,variant:h="outlined",status:g,size:m="middle",suffixIcon:x,expandIcon:p,notFoundContent:b="Sin resultados",displayRender:v,fieldNames:j,placement:C="bottomLeft",multiple:w=!1,showCheckedStrategy:y="SHOW_CHILD",maxTagCount:k,maxTagPlaceholder:B,tagRender:R,loadData:S,prefix:L,popupRender:$,onChange:I,onDropdownVisibleChange:P,className:E,style:H,classNames:z,styles:A}){const M={label:j?.label??"label",value:j?.value??"value",children:j?.children??"children"},W=!!S,F=w?[]:o??[],D=r!==void 0,[T,O]=i.useState(F),Y=w?[]:D?r:T,X=w?o??[]:[],[_,G]=i.useState(X),Q=w?D?r:_:[],N=l!==void 0,[le,oe]=i.useState(!1),q=N?l:le,[K,re]=i.useState([]),[Te,Ce]=i.useState(0),[Le,ue]=i.useState([]),[ze,xe]=i.useState(""),[ge,Ie]=i.useState(0),[De,Ae]=i.useState(!1),Re=i.useRef(!1),ke=i.useRef("keyboard"),[ee,ae]=i.useState(!1),[se,we]=i.useState(!1),ie=i.useRef(null),ce=i.useRef(null),He=i.useRef(null),Pe=i.useRef(null),Ge=i.useRef(null),Z=!!d&&ze.length>0,Be=i.useCallback((Me,Xe)=>{D||O(Me),I?.(Me,Xe)},[D,I]),Oe=i.useCallback((Me,Xe)=>{D||G(Me),I?.(Me,Xe)},[D,I]),Qe=C.startsWith("top"),_e=i.useCallback(Me=>{N||oe(Me),P?.(Me),Me?(ae(Qe),requestAnimationFrame(()=>{requestAnimationFrame(()=>we(!0))}),!w&&Y.length>0?re([...Y]):w&&Q.length>0?re([...Q[0]]):re([]),xe(""),Ce(0),ue([])):we(!1)},[N,P,Y,Q,w,Qe]);i.useLayoutEffect(()=>{if(!q||!ce.current||!ie.current)return;const Me=ce.current.getBoundingClientRect(),Xe=ie.current.getBoundingClientRect(),at=Xe.top,it=window.innerHeight-Xe.bottom;!ee&&Me.bottom>window.innerHeight?at>it&&ae(!0):ee&&Me.top<0&&it>at&&ae(!1)});const et=i.useMemo(()=>w?[]:Zt(e,Y,M),[e,Y,M.label,M.value,M.children,w]),je=i.useMemo(()=>et.map(Me=>Jr(Cr(Me,M))),[et,M.label]),Se=i.useMemo(()=>w||Y.length===0?null:v?v(je,et):je.join(" / "),[w,Y,je,et,v]),me=i.useMemo(()=>!w||Q.length===0?[]:y==="SHOW_PARENT"?Mc(Q,e,M):Q,[w,Q,y,e,M.label,M.value,M.children]),U=i.useMemo(()=>{const Me=[e];let Xe=e;for(const at of K){const it=tr(Xe,at,M);if(it){const ut=$t(it,M);if(ut&&ut.length>0)Me.push(ut),Xe=ut;else break}else break}return Me},[e,K,M.value,M.children]),he=typeof d=="object"?d:{},de=i.useMemo(()=>{if(!Z)return[];const Me=ws(e,M),Xe=he.filter?ut=>he.filter(ze,ut):ut=>Sc(ze,ut,M),at=Me.filter(Xe),it=he.limit!==void 0?he.limit:50;return it===!1?at:at.slice(0,it)},[Z,ze,e,M.label,M.value,M.children,he.filter,he.limit]);i.useEffect(()=>{if(!q)return;const Me=Xe=>{ie.current&&!ie.current.contains(Xe.target)&&_e(!1)};return document.addEventListener("mousedown",Me),()=>document.removeEventListener("mousedown",Me)},[q,_e]),i.useEffect(()=>{q&&d&&Pe.current&&setTimeout(()=>Pe.current?.focus(),50)},[q,d]),i.useEffect(()=>()=>{Ge.current&&clearTimeout(Ge.current)},[]);const We=()=>{a||_e(!q)},$e=Me=>{a||(Me.key==="Enter"||Me.key===" "?(Me.preventDefault(),_e(!q)):Me.key==="Escape"&&q?(Me.preventDefault(),_e(!1)):q&&!Z&&Ct(Me))},ne=(Me,Xe)=>{const at=Pt(Xe,M);if(re(it=>{const ut=it.slice(0,Me);return ut[Me]=at,ut}),S){const it=$t(Xe,M);if(!it||it.length===0){const ut=[];let ht=e;for(let bt=0;bt<Me;bt++){const Bt=tr(ht,K[bt],M);if(Bt){ut.push(Bt);const It=$t(Bt,M);It&&(ht=It)}}ut.push(Xe),S(ut)}}},be=Me=>{const Xe=Me.map(at=>Pt(at,M));Be(Xe,Me),_e(!1),He.current?.focus()},Ye=i.useCallback((Me,Xe)=>{if(Xe.disabled||Xe.disableCheckbox)return;const at=Yo(e,K,M,Me),it=Pt(Xe,M),ut=$t(Xe,M);let ht;ut&&ut.length>0?ht=wr(Xe,M,at).filter(Et=>{const ye=Zt(e,Et,M),Je=ye[ye.length-1];return Je&&!Je.disabled&&!Je.disableCheckbox}):ht=[[...at,it]];const bt=no(Xe,Me,K,Q,M,e);let Bt;if(bt==="checked")Bt=Q.filter(Et=>!ht.some(ye=>hr(Et,ye)));else{const Et=ht.filter(ye=>!pr(ye,Q));Bt=[...Q,...Et]}const It=Bt.map(Et=>Zt(e,Et,M));Oe(Bt,It)},[e,K,M,Q,Oe]),Ze=(Me,Xe)=>{if(Xe.disabled)return;const at=Xr(Xe,M,W);if(w){at&&ne(Me,Xe),Xe.disableCheckbox||Ye(Me,Xe);return}if(at){if(ne(Me,Xe),f){const it=[];let ut=e;for(let bt=0;bt<Me;bt++){const Bt=tr(ut,K[bt],M);if(Bt){it.push(Bt);const It=$t(Bt,M);It&&(ut=It)}}it.push(Xe);const ht=it.map(bt=>Pt(bt,M));Be(ht,it)}}else{const it=[];let ut=e;for(let ht=0;ht<Me;ht++){const bt=tr(ut,K[ht],M);if(bt){it.push(bt);const Bt=$t(bt,M);Bt&&(ut=Bt)}}it.push(Xe),be(it)}},tt=(Me,Xe)=>{u!=="hover"||Xe.disabled||(Ge.current&&clearTimeout(Ge.current),Ge.current=window.setTimeout(()=>{Xr(Xe,M,W)&&ne(Me,Xe)},150))},dt=Me=>{if(w){const Xe=Me.map(ht=>Pt(ht,M)),at=pr(Xe,Q);let it;at?it=Q.filter(ht=>!hr(ht,Xe)):it=[...Q,Xe];const ut=it.map(ht=>Zt(e,ht,M));Oe(it,ut)}else be(Me)},ft=Me=>{Me.stopPropagation(),w?Oe([],[]):Be([],[]),re([]),He.current?.focus()},gt=Me=>{const Xe=Zt(e,Me,M),at=Xe[Xe.length-1];if(at){const ht=$t(at,M);if(ht&&ht.length>0){const bt=Me.slice(0,-1),Bt=wr(at,M,bt),It=Q.filter(ye=>!Bt.some(Je=>hr(ye,Je))),Et=It.map(ye=>Zt(e,ye,M));Oe(It,Et);return}}const it=Q.filter(ht=>!hr(ht,Me)),ut=it.map(ht=>Zt(e,ht,M));Oe(it,ut)},Ct=Me=>{const Xe=Te,at=U[Xe];if(!at)return;const it=Le[Xe]??-1;switch(Me.key){case"ArrowDown":{Me.preventDefault();let ut=it;for(let ht=0;ht<at.length&&(ut=(ut+1)%at.length,!!at[ut].disabled);ht++);ue(ht=>{const bt=[...ht];return bt[Xe]=ut,bt});break}case"ArrowUp":{Me.preventDefault();let ut=it<0?at.length:it;for(let ht=0;ht<at.length&&(ut=(ut-1+at.length)%at.length,!!at[ut].disabled);ht++);ue(ht=>{const bt=[...ht];return bt[Xe]=ut,bt});break}case"ArrowRight":{if(Me.preventDefault(),it>=0&&it<at.length){const ut=at[it];Xr(ut,M,W)&&!ut.disabled&&(ne(Xe,ut),Ce(Xe+1),ue(ht=>{const bt=[...ht];return bt[Xe+1]=0,bt}))}break}case"ArrowLeft":{Me.preventDefault(),Xe>0&&Ce(Xe-1);break}case"Enter":{Me.preventDefault(),it>=0&&it<at.length&&Ze(Xe,at[it]);break}}},jt=Me=>{if(Me.key==="Escape"){Me.preventDefault(),_e(!1),He.current?.focus();return}if(!(!Z||de.length===0))switch(Me.key){case"ArrowDown":Me.preventDefault(),Ie(Xe=>Math.min(Xe+1,de.length-1));break;case"ArrowUp":Me.preventDefault(),Ie(Xe=>Math.max(Xe-1,0));break;case"Enter":Me.preventDefault(),de[ge]&&dt(de[ge]);break}};i.useEffect(()=>{Ie(0)},[de.length]);const pe={large:{height:"2.5rem",fontSize:"1rem",padding:"0.5rem 0.75rem",tagLineHeight:"1.75rem"},middle:{height:"2.25rem",fontSize:"0.875rem",padding:"0.375rem 0.75rem",tagLineHeight:"1.5rem"},small:{height:"1.75rem",fontSize:"0.875rem",padding:"0.125rem 0.5rem",tagLineHeight:"1rem"}}[m],Ke=V({position:"relative",display:"inline-block",width:"100%"},A?.root,H),qe={outlined:{border:`1px solid ${n.colorBorder}`,backgroundColor:n.colorBg},filled:{border:"1px solid transparent",backgroundColor:n.colorBgMuted},borderless:{border:"1px solid transparent",backgroundColor:"transparent"}},st=g==="error"?n.colorError:g==="warning"?n.colorWarning:void 0,rt=g==="error"?n.colorErrorBg:g==="warning"?n.colorWarningBg:n.colorPrimaryLight,xt=w?Q.length>0:Y.length>0,Rt={display:"flex",alignItems:w?"flex-start":"center",flexWrap:w?"wrap":void 0,width:"100%",height:w?"auto":pe.height,minHeight:w?pe.height:void 0,padding:pe.padding,paddingRight:"2rem",fontSize:pe.fontSize,fontFamily:"inherit",borderRadius:"0.375rem",cursor:a?"not-allowed":"pointer",userSelect:"none",outline:"none",transition:"border-color 0.2s ease, box-shadow 0.2s ease",color:a?n.colorTextSubtle:st||n.colorText,...qe[h],borderColor:De&&!a?st||n.colorPrimary:st||(h==="outlined"?n.colorBorder:"transparent"),boxShadow:De&&!a&&ke.current==="keyboard"?`0 0 0 2px ${rt}`:"none",...a?{opacity:.6}:{}},Lt=V(Rt,A?.selector),fe=C.endsWith("Right"),J={position:"absolute",zIndex:1050,left:fe?void 0:0,right:fe?0:void 0,opacity:se?1:0,transition:"opacity 0.15s ease-out, transform 0.15s ease-out",backgroundColor:n.colorBg,border:`1px solid ${n.colorBorder}`,borderRadius:"0.5rem",boxShadow:n.shadowMd,overflow:"hidden",...ee?{bottom:"100%",marginBottom:"0.25rem",transform:se?"translateY(0)":"translateY(6px)"}:{top:"100%",marginTop:"0.25rem",transform:se?"translateY(0)":"translateY(-6px)"}},te=V(J,A?.dropdown),Ee={minWidth:"7.5rem",maxHeight:"16rem",overflowY:"auto",padding:"0.25rem 0"},Ne={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0.375rem 0.75rem",fontSize:"0.875rem",cursor:"pointer",transition:"background-color 0.15s ease",lineHeight:"1.375rem",whiteSpace:"nowrap"},Ue={position:"absolute",right:"0.5rem",top:w?"0.625rem":"50%",transform:w?void 0:"translateY(-50%)",display:"flex",alignItems:"center",gap:"0.25rem",pointerEvents:"none"},nt={display:"flex",alignItems:"center",justifyContent:"center",width:"1.25rem",height:"1.25rem",borderRadius:"50%",border:"none",backgroundColor:"transparent",color:n.colorTextMuted,cursor:"pointer",padding:0,pointerEvents:"auto",transition:"color 0.15s ease, background-color 0.15s ease"},mt={width:"100%",padding:"0.375rem 0.75rem",fontSize:"0.875rem",fontFamily:"inherit",border:"none",borderBottom:`1px solid ${n.colorBorder}`,outline:"none",backgroundColor:"transparent",color:n.colorText},Tt={display:"inline-flex",alignItems:"center",padding:"1px 0.5rem",fontSize:"0.75rem",lineHeight:"1.25rem",backgroundColor:n.colorBgMuted,borderRadius:"0.25rem",maxWidth:"12.5rem",border:`1px solid ${n.colorBorder}`},Fe=(Me,Xe)=>{const at={display:"inline-flex",alignItems:"center",justifyContent:"center",width:"1rem",height:"1rem",borderRadius:"0.1875rem",border:`1.5px solid ${Me!=="unchecked"?n.colorPrimary:n.colorBorder}`,backgroundColor:Me!=="unchecked"?n.colorPrimary:"transparent",color:"#fff",marginRight:"0.5rem",flexShrink:0,transition:"all 0.15s ease",cursor:Xe?"not-allowed":"pointer",opacity:Xe?.5:1};return t.jsxs("span",{style:at,children:[Me==="checked"&&t.jsx(Cs,{}),Me==="indeterminate"&&t.jsx(ks,{})]})},ve=()=>{if(me.length===0)return t.jsx("span",{style:{color:n.colorTextSubtle,flex:1,lineHeight:pe.tagLineHeight},children:s});const Me=k!==void 0?Math.min(k,me.length):me.length,Xe=me.slice(0,Me),at=me.slice(Me);return t.jsxs("span",{style:{display:"flex",flexWrap:"wrap",gap:"0.25rem",flex:1,overflow:"hidden",alignItems:"center"},children:[Xe.map((it,ut)=>{const Bt=Zt(e,it,M).map(ye=>Jr(Cr(ye,M))).join(" / "),It=!a,Et=()=>gt(it);return R?t.jsx("span",{children:R({label:Bt,value:it,closable:It,onClose:Et})},ut):t.jsxs("span",{style:Tt,children:[t.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:Bt}),It&&t.jsx("span",{style:{display:"inline-flex",cursor:"pointer",marginLeft:"0.25rem",color:n.colorTextMuted},onClick:ye=>{ye.stopPropagation(),Et()},onMouseDown:ye=>ye.preventDefault(),children:t.jsx(wc,{})})]},ut)}),at.length>0&&t.jsx("span",{style:Tt,children:typeof B=="function"?B(at):B??`+${at.length}`})]})},ot=(Me,Xe,at)=>{const it=Pt(Me,M),ut=Cr(Me,M),ht=Xr(Me,M,W),bt=!w&&Y[Xe]===it,Bt=Te===Xe&&Le[Xe]===at,It={...Ne,backgroundColor:Bt?n.colorBgMuted:bt?n.colorPrimaryBg:void 0,color:Me.disabled?n.colorTextSubtle:bt?n.colorPrimary:n.colorText,fontWeight:bt?600:void 0,cursor:Me.disabled?"not-allowed":"pointer",opacity:Me.disabled?.5:1,...A?.option};return t.jsxs("div",{role:"option","aria-selected":bt,"aria-disabled":Me.disabled,style:It,className:z?.option,onClick:()=>Ze(Xe,Me),onMouseEnter:Et=>{Me.disabled||(!bt&&!Bt&&(Et.currentTarget.style.backgroundColor=n.colorBgMuted),tt(Xe,Me))},onMouseLeave:Et=>{!Me.disabled&&!bt&&!Bt&&(Et.currentTarget.style.backgroundColor="transparent")},children:[w&&Fe(no(Me,Xe,K,Q,M,e),!!Me.disabled||!!Me.disableCheckbox),t.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:ut}),ht&&t.jsx("span",{style:{display:"flex",marginLeft:"0.5rem",color:n.colorTextMuted,flexShrink:0},children:Me.loading?t.jsx(jc,{}):p??t.jsx(vs,{})})]},String(it))},pt=Z?de.length===0?t.jsx("div",{style:{padding:"0.5rem 0.75rem",fontSize:"0.875rem",color:n.colorTextSubtle,textAlign:"center"},children:b}):t.jsx("div",{style:{...Ee,...A?.menu},className:z?.menu,children:de.map((Me,Xe)=>{const at=Xe===ge,it=Me.map(It=>Jr(Cr(It,M))),ut=he.render?he.render(ze,Me):Ic(it.join(" / "),ze),ht=Me.map(It=>Pt(It,M)),bt=w&&pr(ht,Q),Bt={...Ne,backgroundColor:at?n.colorBgMuted:void 0,...A?.option};return t.jsxs("div",{role:"option","aria-selected":at,style:Bt,className:z?.option,onClick:()=>dt(Me),onMouseEnter:It=>{Ie(Xe),at||(It.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:It=>{at||(It.currentTarget.style.backgroundColor="transparent")},children:[w&&Fe(bt?"checked":"unchecked",!1),t.jsx("span",{style:{flex:1},children:ut})]},Xe)})}):t.jsx("div",{style:{display:"flex"},children:U.map((Me,Xe)=>{const at=Xe===U.length-1,it={...Ee,borderRight:at?void 0:`1px solid ${n.colorBorder}`,...A?.menu};return t.jsx("div",{style:it,className:z?.menu,children:Me.map((ut,ht)=>ot(ut,Xe,ht))},Xe)})});return t.jsxs("div",{ref:ie,style:Ke,className:Ve(E,z?.root),children:[t.jsx("style",{children:"@keyframes j-nested-spin { to { transform: rotate(360deg); } }"}),t.jsxs("div",{ref:He,role:"combobox","aria-expanded":q,"aria-haspopup":"listbox",tabIndex:a?-1:0,style:Lt,className:z?.selector,onClick:We,onKeyDown:$e,onMouseDown:()=>{Re.current=!0},onFocus:()=>{ke.current=Re.current?"mouse":"keyboard",Re.current=!1,Ae(!0)},onBlur:()=>Ae(!1),children:[L&&t.jsx("span",{style:{display:"flex",alignItems:"center",marginRight:"0.5rem",flexShrink:0},children:L}),w?ve():Se?t.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},children:Se}):t.jsx("span",{style:{color:n.colorTextSubtle,flex:1},children:s})]}),t.jsxs("span",{style:Ue,children:[c&&xt&&!a&&t.jsx("button",{type:"button",style:nt,onMouseDown:Me=>Me.preventDefault(),onClick:ft,onMouseEnter:Me=>{Me.currentTarget.style.color=n.colorText,Me.currentTarget.style.backgroundColor=n.colorBgMuted},onMouseLeave:Me=>{Me.currentTarget.style.color=n.colorTextMuted,Me.currentTarget.style.backgroundColor="transparent"},tabIndex:-1,"aria-label":"Clear",children:t.jsx(kc,{})}),t.jsx("span",{style:{display:"flex",color:n.colorTextMuted,pointerEvents:"none"},children:x??t.jsx(Cc,{})})]}),q&&t.jsxs("div",{ref:ce,style:te,className:z?.dropdown,onMouseDown:Me=>Me.preventDefault(),children:[d&&t.jsx("input",{ref:Pe,type:"text",placeholder:"Buscar...",value:ze,onChange:Me=>xe(Me.target.value),onKeyDown:jt,style:mt,autoComplete:"off"}),$?$(pt):pt]})]})}function Rc({options:e=[],value:r,defaultValue:o,onChange:s,multiple:l=!1,expandTrigger:a="click",changeOnSelect:c=!1,fieldNames:u,expandIcon:f,disabled:d=!1,className:h,style:g,classNames:m,styles:x}){const p={label:u?.label??"label",value:u?.value??"value",children:u?.children??"children"},b=r!==void 0,v=l?[]:o??[],[j,C]=i.useState(v),w=l?[]:b?r:j,y=l?o??[]:[],[k,B]=i.useState(y),R=l?b?r:k:[],[S,L]=i.useState(!l&&w.length>0?[...w]:[]),$=-1,I=[],P=i.useRef(null);i.useEffect(()=>()=>{P.current&&clearTimeout(P.current)},[]);const E=i.useMemo(()=>{const _=[e];let G=e;for(const Q of S){const N=tr(G,Q,p);if(N){const le=$t(N,p);if(le&&le.length>0)_.push(le),G=le;else break}else break}return _},[e,S,p.value,p.children]),H=i.useCallback((_,G)=>{b||C(_),s?.(_,G)},[b,s]),z=i.useCallback((_,G)=>{b||B(_),s?.(_,G)},[b,s]),A=(_,G)=>{const Q=Pt(G,p);L(N=>{const le=N.slice(0,_);return le[_]=Q,le})},M=i.useCallback((_,G)=>{if(G.disabled||G.disableCheckbox)return;const Q=Yo(e,S,p,_),N=Pt(G,p),le=$t(G,p);let oe;le&&le.length>0?oe=wr(G,p,Q).filter(Te=>{const Ce=Zt(e,Te,p),Le=Ce[Ce.length-1];return Le&&!Le.disabled&&!Le.disableCheckbox}):oe=[[...Q,N]];const q=no(G,_,S,R,p,e);let K;if(q==="checked")K=R.filter(Te=>!oe.some(Ce=>hr(Te,Ce)));else{const Te=oe.filter(Ce=>!pr(Ce,R));K=[...R,...Te]}const re=K.map(Te=>Zt(e,Te,p));z(K,re)},[e,S,p,R,z]),W=(_,G)=>{if(d||G.disabled)return;const Q=vo(G,p);if(l){Q&&A(_,G),G.disableCheckbox||M(_,G);return}if(Q){if(A(_,G),c){const N=[];let le=e;for(let q=0;q<_;q++){const K=tr(le,S[q],p);if(K){N.push(K);const re=$t(K,p);re&&(le=re)}}N.push(G);const oe=N.map(q=>Pt(q,p));H(oe,N)}}else{const N=[];let le=e;for(let q=0;q<_;q++){const K=tr(le,S[q],p);if(K){N.push(K);const re=$t(K,p);re&&(le=re)}}N.push(G);const oe=N.map(q=>Pt(q,p));H(oe,N)}},F=(_,G)=>{a!=="hover"||d||G.disabled||(P.current&&clearTimeout(P.current),P.current=window.setTimeout(()=>{vo(G,p)&&A(_,G)},150))},D=(_,G)=>{const Q={display:"inline-flex",alignItems:"center",justifyContent:"center",width:"1rem",height:"1rem",borderRadius:"0.1875rem",border:`1.5px solid ${_!=="unchecked"?n.colorPrimary:n.colorBorder}`,backgroundColor:_!=="unchecked"?n.colorPrimary:"transparent",color:"#fff",marginRight:"0.5rem",flexShrink:0,transition:"all 0.15s ease",cursor:G?"not-allowed":"pointer",opacity:G?.5:1};return t.jsxs("span",{style:Q,children:[_==="checked"&&t.jsx(Cs,{}),_==="indeterminate"&&t.jsx(ks,{})]})},T={minWidth:"7.5rem",maxHeight:"16rem",overflowY:"auto",padding:"0.25rem 0"},O={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0.375rem 0.75rem",fontSize:"0.875rem",cursor:d?"not-allowed":"pointer",transition:"background-color 0.15s ease",lineHeight:"1.375rem",whiteSpace:"nowrap"},Y={display:"inline-flex",backgroundColor:n.colorBg,border:`1px solid ${n.colorBorder}`,borderRadius:"0.5rem",overflow:"hidden",...g},X=(_,G,Q)=>{const N=Pt(_,p),le=Cr(_,p),oe=vo(_,p),q=!l&&w[G]===N,K=$===G&&I[G]===Q,re=d||!!_.disabled,Te={...O,backgroundColor:K?n.colorBgMuted:q?n.colorPrimaryBg:void 0,color:re?n.colorTextSubtle:q?n.colorPrimary:n.colorText,fontWeight:q?600:void 0,cursor:re?"not-allowed":"pointer",opacity:re?.5:1,...x?.option};return t.jsxs("div",{role:"option","aria-selected":q,"aria-disabled":re,style:Te,className:m?.option,onClick:()=>W(G,_),onMouseEnter:Ce=>{re||(!q&&!K&&(Ce.currentTarget.style.backgroundColor=n.colorBgMuted),F(G,_))},onMouseLeave:Ce=>{!re&&!q&&!K&&(Ce.currentTarget.style.backgroundColor="transparent")},children:[l&&D(no(_,G,S,R,p,e),re||!!_.disableCheckbox),t.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:le}),oe&&t.jsx("span",{style:{display:"flex",marginLeft:"0.5rem",color:n.colorTextMuted,flexShrink:0},children:f??t.jsx(vs,{})})]},String(N))};return t.jsx("div",{style:V(Y,x?.root),className:Ve(h,m?.root),children:E.map((_,G)=>{const Q=G===E.length-1,N={...T,borderRight:Q?void 0:`1px solid ${n.colorBorder}`,...x?.menu};return t.jsx("div",{style:N,className:m?.menu,children:_.map((le,oe)=>X(le,G,oe))},G)})})}const Tc=Object.assign(Bc,{Panel:Rc,SHOW_PARENT:"SHOW_PARENT",SHOW_CHILD:"SHOW_CHILD"});function Ic(e,r){if(!r)return e;const o=e.toLowerCase().indexOf(r.toLowerCase());return o===-1?e:t.jsxs(t.Fragment,{children:[e.slice(0,o),t.jsx("strong",{style:{color:n.colorPrimary},children:e.slice(o,o+r.length)}),e.slice(o+r.length)]})}function Lc(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"2 5.5 4 7.5 8 3"})})}function Ec(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("line",{x1:"2.5",y1:"5",x2:"7.5",y2:"5"})})}const js=i.createContext(null);function Ss({checked:e,defaultChecked:r=!1,disabled:o=!1,indeterminate:s=!1,autoFocus:l=!1,onChange:a,value:c,children:u,id:f,name:d,tabIndex:h,className:g,style:m,classNames:x,styles:p}){const b=i.useRef(null),v=i.useRef(null),j=i.useRef(!1),C=i.useRef("keyboard"),w=i.useContext(js),y=w!==null,k=e!==void 0,[B,R]=i.useState(r);let S,L,$;y?(S=c!==void 0&&w.value.includes(c),L=o||w.disabled,$=w.name||d):(S=k?e:B,L=o,$=d);const[I,P]=i.useState(!1);i.useEffect(()=>{b.current&&(b.current.indeterminate=s)},[s]),i.useEffect(()=>{l&&b.current&&b.current.focus()},[]);const E=O=>{if(!L)if(y&&c!==void 0)w.toggleValue(c);else{const Y=O.target.checked;k||R(Y),a?.({target:{checked:Y,value:c},nativeEvent:O.nativeEvent})}},H=!!(p?.checkbox&&("backgroundColor"in p.checkbox||"borderColor"in p.checkbox||"border"in p.checkbox)),z=()=>{L||!v.current||(H?v.current.style.filter="brightness(1.15)":S||s?(v.current.style.backgroundColor=n.colorPrimaryHover,v.current.style.borderColor=n.colorPrimaryHover):v.current.style.borderColor=n.colorPrimary)},A=()=>{L||!v.current||(H?v.current.style.filter="":S||s?(v.current.style.backgroundColor=n.colorPrimary,v.current.style.borderColor=n.colorPrimary):v.current.style.borderColor=n.colorBorder)},M=S||s,W={display:"inline-flex",alignItems:"center",gap:"0.5rem",minHeight:"2.75rem",cursor:L?"not-allowed":"pointer",userSelect:"none",lineHeight:1,...L?{opacity:.5}:{}},F={position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:"1rem",height:"1rem",borderRadius:"0.25rem",border:`2px solid ${M||I?n.colorPrimary:n.colorBorder}`,backgroundColor:M?n.colorPrimary:"transparent",color:"#fff",transition:"border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease",flexShrink:0,boxShadow:I&&!L&&C.current==="keyboard"?`0 0 0 2px ${n.colorPrimaryLight}`:"none"},D={position:"absolute",opacity:0,width:0,height:0,margin:0,padding:0,overflow:"hidden"},T={fontSize:"0.875rem",lineHeight:"1.375rem",color:L?n.colorTextSubtle:n.colorText};return t.jsxs("label",{className:Ve(g,x?.root),style:V(W,p?.root,m),onMouseDown:()=>{j.current=!0},onMouseEnter:z,onMouseLeave:A,children:[t.jsxs("span",{ref:v,className:x?.checkbox,style:V(F,p?.checkbox),children:[t.jsx("input",{ref:b,type:"checkbox",id:f,name:$,checked:S,disabled:L,tabIndex:h,onChange:E,onFocus:()=>{C.current=j.current?"mouse":"keyboard",j.current=!1,P(!0)},onBlur:()=>P(!1),style:D,value:c!==void 0?String(c):void 0}),M&&t.jsx("span",{className:x?.indicator,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",...p?.indicator},children:s?t.jsx(Ec,{}):t.jsx(Lc,{})})]}),u!=null&&t.jsx("span",{className:x?.label,style:V(T,p?.label),children:u})]})}function $c({options:e,value:r,defaultValue:o=[],disabled:s=!1,name:l,onChange:a,children:c,className:u,style:f,classNames:d,styles:h}){const g=r!==void 0,[m,x]=i.useState(o),p=g?r:m,b=i.useCallback(C=>{const w=p.includes(C)?p.filter(y=>y!==C):[...p,C];g||x(w),a?.(w)},[p,g,a]),v={value:p,disabled:s,name:l,toggleValue:b},j=e?.map(C=>typeof C=="string"||typeof C=="number"?{label:String(C),value:C}:C);return t.jsx(js.Provider,{value:v,children:t.jsx("div",{role:"group",className:Ve(u,d?.root),style:V({display:"inline-flex",flexWrap:"wrap",gap:"0.5rem",alignItems:"center"},h?.root,f),children:j?j.map(C=>t.jsx(Ss,{value:C.value,disabled:C.disabled,className:C.className,style:C.style,children:C.label},String(C.value))):c})})}const Er=Object.assign(Ss,{Group:$c});function Ms(){return t.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[t.jsx("line",{x1:"3",y1:"3",x2:"9",y2:"9"}),t.jsx("line",{x1:"9",y1:"3",x2:"3",y2:"9"})]})}function At(e,r,o){return Math.max(r,Math.min(o,e))}function gr(e,r,o){const s=r/100,l=o/100,a=u=>(u+e/60)%6,c=u=>l*(1-s*Math.max(0,Math.min(a(u),4-a(u),1)));return{r:Math.round(c(5)*255),g:Math.round(c(3)*255),b:Math.round(c(1)*255)}}function $r(e,r,o){const s=e/255,l=r/255,a=o/255,c=Math.max(s,l,a),u=Math.min(s,l,a),f=c-u;let d=0;if(f!==0)switch(c){case s:d=((l-a)/f+(l<a?6:0))*60;break;case l:d=((a-s)/f+2)*60;break;case a:d=((s-l)/f+4)*60;break}return{h:Math.round(d),s:Math.round(c===0?0:f/c*100),b:Math.round(c*100)}}function Eo(e){let r=e.replace("#","");return r.length===3&&(r=r[0]+r[0]+r[1]+r[1]+r[2]+r[2]),r.length===4&&(r=r[0]+r[0]+r[1]+r[1]+r[2]+r[2]+r[3]+r[3]),{r:parseInt(r.slice(0,2),16)||0,g:parseInt(r.slice(2,4),16)||0,b:parseInt(r.slice(4,6),16)||0,a:r.length===8?Math.round(parseInt(r.slice(6,8),16)/255*100)/100:1}}function cr(e){const{r,g:o,b:s}=gr(e.h,e.s,e.b),l="#"+[r,o,s].map(a=>a.toString(16).padStart(2,"0")).join("");return e.a<1?l+Math.round(e.a*255).toString(16).padStart(2,"0"):l}function Pc(e){const{r,g:o,b:s}=gr(e.h,e.s,e.b);return e.a<1?`rgba(${r}, ${o}, ${s}, ${Math.round(e.a*100)/100})`:`rgb(${r}, ${o}, ${s})`}function Dc(e){return e.a<1?`hsba(${Math.round(e.h)}, ${Math.round(e.s)}%, ${Math.round(e.b)}%, ${Math.round(e.a*100)/100})`:`hsb(${Math.round(e.h)}, ${Math.round(e.s)}%, ${Math.round(e.b)}%)`}function Gr(e){return{h:e.h,s:e.s,b:e.b,a:e.a,toHexString(){return cr(this)},toRgbString(){return Pc(this)},toHsbString(){return Dc(this)},toRgb(){return{...gr(this.h,this.s,this.b),a:this.a}},toHsb(){return{h:this.h,s:this.s,b:this.b,a:this.a}}}}function lr(e){if(!e)return{h:0,s:100,b:100,a:1};if(typeof e=="object"&&"h"in e)return{h:e.h,s:e.s,b:e.b,a:e.a};const r=String(e).trim();if(r.startsWith("#")){const l=Eo(r);return{...$r(l.r,l.g,l.b),a:l.a}}const o=r.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/);if(o)return{...$r(+o[1],+o[2],+o[3]),a:o[4]!==void 0?parseFloat(o[4]):1};const s=r.match(/hsba?\(\s*(\d+)\s*,\s*(\d+)%?\s*,\s*(\d+)%?\s*(?:,\s*([\d.]+))?\s*\)/);return s?{h:+s[1],s:+s[2],b:+s[3],a:s[4]!==void 0?parseFloat(s[4]):1}:/^[0-9a-f]{3,8}$/i.test(r)?lr("#"+r):{h:0,s:100,b:100,a:1}}function zc(e,r){return e.h===r.h&&e.s===r.s&&e.b===r.b&&e.a===r.a}function Co(e){return Array.isArray(e)&&e.length>0&&typeof e[0]=="object"&&e[0]!==null&&"percent"in e[0]}function mn(e){return e.map(r=>({color:lr(r.color),percent:r.percent}))}function ur(e,r){const s=[...e].sort((l,a)=>l.percent-a.percent).map(l=>`${cr(l.color)} ${l.percent}%`).join(", ");return`linear-gradient(${r}deg, ${s})`}function xr(e){return e.map(r=>({color:cr(r.color),percent:r.percent}))}function Wc(e,r){const o=[...e].sort((c,u)=>c.percent-u.percent);if(o.length===0)return{h:0,s:100,b:100,a:1};if(r<=o[0].percent)return{...o[0].color};if(r>=o[o.length-1].percent)return{...o[o.length-1].color};let s=o[0],l=o[o.length-1];for(let c=0;c<o.length-1;c++)if(r>=o[c].percent&&r<=o[c+1].percent){s=o[c],l=o[c+1];break}const a=l.percent===s.percent?0:(r-s.percent)/(l.percent-s.percent);return{h:Math.round(s.color.h+(l.color.h-s.color.h)*a),s:Math.round(s.color.s+(l.color.s-s.color.s)*a),b:Math.round(s.color.b+(l.color.b-s.color.b)*a),a:Math.round((s.color.a+(l.color.a-s.color.a)*a)*100)/100}}function Ko(e,r,o){const s=i.useRef(r),l=i.useRef(o);s.current=r,l.current=o;const a=i.useRef(!1);return i.useEffect(()=>{const c=f=>{if(!a.current||!e.current)return;f.preventDefault();const d=e.current.getBoundingClientRect();s.current(At((f.clientX-d.left)/d.width,0,1),At((f.clientY-d.top)/d.height,0,1))},u=()=>{a.current&&(a.current=!1,l.current())};return document.addEventListener("mousemove",c),document.addEventListener("mouseup",u),()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u)}},[e]),c=>{if(c.preventDefault(),a.current=!0,!e.current)return;const u=e.current.getBoundingClientRect();s.current(At((c.clientX-u.left)/u.width,0,1),At((c.clientY-u.top)/u.height,0,1))}}function Hc({hue:e,saturation:r,brightness:o,onChange:s,onDragEnd:l}){const a=i.useRef(null),c=Ko(a,(f,d)=>s(Math.round(f*100),Math.round((1-d)*100)),l),u=`hsl(${e}, 100%, 50%)`;return t.jsx("div",{ref:a,onMouseDown:c,style:{position:"relative",width:"100%",height:150,borderRadius:4,cursor:"crosshair",overflow:"hidden",background:`linear-gradient(to bottom, transparent 0%, #000 100%), linear-gradient(to right, #fff 0%, ${u} 100%)`},children:t.jsx("div",{style:{position:"absolute",left:`${r}%`,top:`${100-o}%`,width:12,height:12,borderRadius:"50%",border:"2px solid #fff",boxShadow:"0 0 2px rgba(0,0,0,0.4)",transform:"translate(-50%, -50%)",pointerEvents:"none"}})})}function Fc({hue:e,onChange:r,onDragEnd:o}){const s=i.useRef(null),l=Ko(s,a=>r(Math.round(a*360)),o);return t.jsx("div",{ref:s,onMouseDown:l,style:{position:"relative",width:"100%",height:10,borderRadius:5,cursor:"pointer",background:"linear-gradient(to right, hsl(0,100%,50%), hsl(60,100%,50%), hsl(120,100%,50%), hsl(180,100%,50%), hsl(240,100%,50%), hsl(300,100%,50%), hsl(360,100%,50%))"},children:t.jsx("div",{style:{position:"absolute",left:`${e/360*100}%`,top:"50%",width:12,height:12,borderRadius:"50%",border:"2px solid #fff",boxShadow:"0 0 2px rgba(0,0,0,0.3)",transform:"translate(-50%, -50%)",pointerEvents:"none",backgroundColor:`hsl(${e}, 100%, 50%)`}})})}function Ac({color:e,alpha:r,onChange:o,onDragEnd:s}){const l=i.useRef(null),a=Ko(l,g=>o(Math.round(g*100)/100),s),{r:c,g:u,b:f}=gr(e.h,e.s,e.b),d=`rgb(${c}, ${u}, ${f})`,h=["linear-gradient(45deg, #ccc 25%, transparent 25%)","linear-gradient(-45deg, #ccc 25%, transparent 25%)","linear-gradient(45deg, transparent 75%, #ccc 75%)","linear-gradient(-45deg, transparent 75%, #ccc 75%)"].join(", ");return t.jsxs("div",{style:{position:"relative",width:"100%",height:10,borderRadius:5},children:[t.jsx("div",{style:{position:"absolute",inset:0,borderRadius:5,backgroundImage:h,backgroundSize:"8px 8px",backgroundPosition:"0 0, 0 4px, 4px -4px, -4px 0"}}),t.jsx("div",{ref:l,onMouseDown:a,style:{position:"absolute",inset:0,borderRadius:5,cursor:"pointer",background:`linear-gradient(to right, transparent 0%, ${d} 100%)`},children:t.jsx("div",{style:{position:"absolute",left:`${r*100}%`,top:"50%",width:12,height:12,borderRadius:"50%",border:"2px solid #fff",boxShadow:"0 0 2px rgba(0,0,0,0.3)",transform:"translate(-50%, -50%)",pointerEvents:"none",backgroundColor:d}})})]})}function Oc({color:e,format:r,disabledAlpha:o,onColorChange:s,onFormatChange:l}){const[a,c]=i.useState(cr(e).toUpperCase()),u=i.useRef(e);zc(u.current,e)||(u.current=e,c(cr(e).toUpperCase()));const f=["hex","rgb","hsb"],d=()=>{let y=a.startsWith("#")?a:"#"+a;if(/^#[0-9a-f]{6}$/i.test(y)){const k=Eo(y),B=$r(k.r,k.g,k.b);s({...B,a:e.a})}else if(/^#[0-9a-f]{8}$/i.test(y)){const k=Eo(y),B=$r(k.r,k.g,k.b);s({...B,a:k.a})}else c(cr(e).toUpperCase())},{r:h,g,b:m}=gr(e.h,e.s,e.b),x=(y,k)=>{if(isNaN(k))return;const B=y==="r"?At(k,0,255):h,R=y==="g"?At(k,0,255):g,S=y==="b"?At(k,0,255):m,L=$r(B,R,S);s({...L,a:e.a})},p=(y,k)=>{isNaN(k)||s({h:y==="h"?At(k,0,360):e.h,s:y==="s"?At(k,0,100):e.s,b:y==="b"?At(k,0,100):e.b,a:e.a})},b=y=>{isNaN(y)||s({...e,a:At(y,0,100)/100})},[v,j]=i.useState(!1),C=i.useRef(null);i.useEffect(()=>{if(!v)return;const y=k=>{C.current&&!C.current.contains(k.target)&&j(!1)};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[v]);const w={height:"1.5rem",border:`1px solid ${n.colorBorder}`,borderRadius:"0.25rem",padding:"0 0.25rem",fontSize:"0.75rem",fontFamily:"monospace",textAlign:"center",outline:"none",color:n.colorText,backgroundColor:"transparent",flex:1,minWidth:0};return t.jsxs("div",{style:{display:"flex",gap:"0.25rem",alignItems:"center"},children:[t.jsxs("div",{ref:C,style:{position:"relative",flexShrink:0},children:[t.jsxs("button",{type:"button",onClick:()=>j(!v),style:{height:"1.5rem",padding:"0 0.25rem 0 0.375rem",border:`1px solid ${n.colorBorder}`,borderRadius:"0.25rem",backgroundColor:"transparent",color:n.colorText,cursor:"pointer",fontSize:"0.6875rem",fontWeight:600,display:"flex",alignItems:"center",gap:"0.125rem",fontFamily:"inherit",outline:"none",transition:"border-color 0.15s ease"},onMouseEnter:y=>{y.currentTarget.style.borderColor=n.colorBorderHover},onMouseLeave:y=>{y.currentTarget.style.borderColor=n.colorBorder},children:[r.toUpperCase(),t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:v?"rotate(180deg)":void 0,transition:"transform 0.15s ease"},children:t.jsx("polyline",{points:"3 4 5 6 7 4"})})]}),v&&t.jsx("div",{style:{position:"absolute",top:"100%",left:0,marginTop:"0.125rem",zIndex:10,minWidth:"100%",padding:"0.125rem",borderRadius:"0.375rem",border:`1px solid ${n.colorBorder}`,backgroundColor:n.colorBg,boxShadow:"0 2px 8px rgba(0,0,0,0.15)"},children:f.map(y=>t.jsx("button",{type:"button",onClick:()=>{l(y),j(!1)},onMouseEnter:k=>{k.currentTarget.style.backgroundColor=n.colorBgMuted},onMouseLeave:k=>{k.currentTarget.style.backgroundColor="transparent"},style:{display:"block",width:"100%",padding:"0.25rem 0.5rem",border:"none",borderRadius:"0.25rem",backgroundColor:"transparent",color:y===r?n.colorPrimary:n.colorText,cursor:"pointer",fontSize:"0.6875rem",fontWeight:y===r?700:500,fontFamily:"inherit",textAlign:"left",transition:"background-color 0.1s ease"},children:y.toUpperCase()},y))})]}),r==="hex"&&t.jsx("input",{style:{...w,fontFamily:"monospace"},value:a,onChange:y=>c(y.target.value),onBlur:d,onKeyDown:y=>{y.key==="Enter"&&d()}}),r==="rgb"&&t.jsxs(t.Fragment,{children:[t.jsx("input",{style:w,inputMode:"numeric",value:h,onChange:y=>{const k=y.target.value;/^\d*$/.test(k)&&x("r",k===""?0:Math.min(+k,255))}}),t.jsx("input",{style:w,inputMode:"numeric",value:g,onChange:y=>{const k=y.target.value;/^\d*$/.test(k)&&x("g",k===""?0:Math.min(+k,255))}}),t.jsx("input",{style:w,inputMode:"numeric",value:m,onChange:y=>{const k=y.target.value;/^\d*$/.test(k)&&x("b",k===""?0:Math.min(+k,255))}})]}),r==="hsb"&&t.jsxs(t.Fragment,{children:[t.jsx("input",{style:w,inputMode:"numeric",value:Math.round(e.h),onChange:y=>{const k=y.target.value;/^\d*$/.test(k)&&p("h",k===""?0:Math.min(+k,360))}}),t.jsx("input",{style:w,inputMode:"numeric",value:Math.round(e.s),onChange:y=>{const k=y.target.value;/^\d*$/.test(k)&&p("s",k===""?0:Math.min(+k,100))}}),t.jsx("input",{style:w,inputMode:"numeric",value:Math.round(e.b),onChange:y=>{const k=y.target.value;/^\d*$/.test(k)&&p("b",k===""?0:Math.min(+k,100))}})]}),!o&&t.jsxs(t.Fragment,{children:[t.jsx("input",{style:{...w,width:"2.25rem",flex:"none"},inputMode:"numeric",value:Math.round(e.a*100),onChange:y=>{const k=y.target.value;/^\d*$/.test(k)&&b(k===""?0:Math.min(+k,100))}}),t.jsx("span",{style:{fontSize:"0.6875rem",color:n.colorTextMuted,flexShrink:0},children:"%"})]})]})}function Nc({presets:e,onSelect:r}){return t.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"0.5rem"},children:e.map((o,s)=>t.jsxs("div",{children:[o.label&&t.jsx("div",{style:{fontSize:"0.75rem",color:n.colorTextMuted,marginBottom:"0.25rem",fontWeight:500},children:o.label}),t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"0.25rem"},children:o.colors.map((l,a)=>t.jsx("button",{type:"button",onClick:()=>r(l),style:{width:"1.25rem",height:"1.25rem",borderRadius:"0.25rem",padding:0,cursor:"pointer",border:`1px solid ${n.colorBorder}`,backgroundColor:l}},a))})]},s))})}function Vc({stops:e,activeIndex:r,angle:o,onSelectStop:s,onMoveStop:l,onAddStop:a,onRemoveStop:c,onAngleChange:u,onDragEnd:f}){const d=i.useRef(null),h=i.useRef(null),g=i.useRef(l);g.current=l;const m=i.useRef(f);m.current=f,i.useEffect(()=>{const C=y=>{if(h.current===null||!d.current)return;y.preventDefault();const k=d.current.getBoundingClientRect(),B=At((y.clientX-k.left)/k.width*100,0,100);g.current(h.current,Math.round(B))},w=()=>{h.current!==null&&(h.current=null,m.current())};return document.addEventListener("mousemove",C),document.addEventListener("mouseup",w),()=>{document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",w)}},[]);const x=C=>{if(!d.current)return;const w=d.current.getBoundingClientRect(),y=At((C.clientX-w.left)/w.width*100,0,100);a(Math.round(y))},p=(C,w)=>{C.stopPropagation(),C.preventDefault(),h.current=w,s(w)},v=[...e].sort((C,w)=>C.percent-w.percent).map(C=>`${cr(C.color)} ${C.percent}%`).join(", "),j=["linear-gradient(45deg, #ccc 25%, transparent 25%)","linear-gradient(-45deg, #ccc 25%, transparent 25%)","linear-gradient(45deg, transparent 75%, #ccc 75%)","linear-gradient(-45deg, transparent 75%, #ccc 75%)"].join(", ");return t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0.5rem"},children:[t.jsxs("div",{ref:d,onMouseDown:x,style:{position:"relative",height:12,borderRadius:6,cursor:"pointer",marginTop:"0.25rem",marginBottom:"0.25rem"},children:[t.jsx("div",{style:{position:"absolute",inset:0,borderRadius:6,backgroundImage:j,backgroundSize:"8px 8px",backgroundPosition:"0 0, 0 4px, 4px -4px, -4px 0"}}),t.jsx("div",{style:{position:"absolute",inset:0,borderRadius:6,background:`linear-gradient(to right, ${v})`}}),e.map((C,w)=>t.jsx("div",{onMouseDown:y=>p(y,w),style:{position:"absolute",left:`${C.percent}%`,top:"50%",transform:"translate(-50%, -50%)",width:14,height:14,borderRadius:"50%",border:w===r?`2px solid ${n.colorPrimary}`:"2px solid #fff",boxShadow:"0 0 3px rgba(0,0,0,0.3)",backgroundColor:cr(C.color),cursor:"grab",zIndex:w===r?2:1}},w))]}),t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.25rem"},children:[t.jsx("span",{style:{fontSize:"0.6875rem",color:n.colorTextMuted,flexShrink:0},children:"Angle"}),t.jsx("input",{type:"number",min:0,max:360,value:o,onChange:C=>u(At(+C.target.value,0,360)),style:{height:"1.5rem",width:"3rem",border:`1px solid ${n.colorBorder}`,borderRadius:"0.25rem",padding:"0 0.25rem",fontSize:"0.75rem",fontFamily:"monospace",textAlign:"center",outline:"none",color:n.colorText,backgroundColor:"transparent"}}),t.jsx("span",{style:{fontSize:"0.6875rem",color:n.colorTextMuted},children:"°"}),t.jsx("div",{style:{flex:1}}),e.length>2&&t.jsx("button",{type:"button",onClick:()=>c(r),style:{display:"flex",alignItems:"center",justifyContent:"center",width:"1.5rem",height:"1.5rem",padding:0,border:`1px solid ${n.colorBorder}`,borderRadius:"0.25rem",backgroundColor:"transparent",cursor:"pointer",color:n.colorTextMuted},onMouseEnter:C=>{C.currentTarget.style.color="#ff4d4f"},onMouseLeave:C=>{C.currentTarget.style.color=n.colorTextMuted},children:t.jsx(Ms,{})})]})]})}function Yc({modes:e,activeMode:r,onModeChange:o}){return t.jsx("div",{style:{display:"flex",borderRadius:"0.25rem",overflow:"hidden",border:`1px solid ${n.colorBorder}`},children:e.map(s=>t.jsx("button",{type:"button",onClick:()=>o(s),style:{flex:1,padding:"0.25rem 0",border:"none",backgroundColor:s===r?n.colorPrimary:"transparent",color:s===r?"#fff":n.colorText,cursor:"pointer",fontSize:"0.6875rem",fontWeight:600,fontFamily:"inherit",transition:"background-color 0.15s ease, color 0.15s ease"},children:s==="single"?"Single":"Gradient"},s))})}const Kc={sm:{height:"1.5rem",swatch:16,radius:"0.25rem",fontSize:"0.75rem",paddingText:"0 0.6rem 0 0.375rem",paddingIcon:"0.1875rem"},md:{height:"2rem",swatch:20,radius:"0.375rem",fontSize:"0.8125rem",paddingText:"0 0.8rem 0 0.5rem",paddingIcon:"0.3125rem"},lg:{height:"2.5rem",swatch:28,radius:"0.5rem",fontSize:"0.875rem",paddingText:"0 1rem 0 0.625rem",paddingIcon:"0.3125rem"}};function _c({value:e,defaultValue:r="#1677ff",mode:o,onModeChange:s,format:l,defaultFormat:a="hex",disabled:c=!1,disabledAlpha:u=!1,allowClear:f=!1,showText:d,trigger:h="click",placement:g="bottomLeft",size:m="md",open:x,presets:p,panelRender:b,onChange:v,onChangeComplete:j,onGradientChange:C,onFormatChange:w,onOpenChange:y,onClear:k,children:B,className:R,style:S,classNames:L,styles:$}){const I=o?typeof o=="string"?o==="gradient"?["single","gradient"]:["single"]:o:["single"],P=I.length>1,E=typeof o=="string"&&o==="gradient"?"gradient":I[0],[H,z]=i.useState(E),A=I.includes(H)?H:I[0],M=A==="gradient",W=e!==void 0,F=x!==void 0,D=l!==void 0,T=e??r,[O,Y]=i.useState(()=>Co(T)?{h:217,s:91,b:100,a:1}:lr(T)),[X,_]=i.useState(!1),[G,Q]=i.useState(l??a),[N,le]=i.useState(!1),[oe,q]=i.useState(!1),K=Co(e),re=W&&K,Te=W&&!K?lr(e):O,Ce=F?x:X,Le=D?l:G,[ue,ze]=i.useState(()=>Co(T)?mn(T):[{color:{...lr(T)},percent:0},{color:{h:0,s:0,b:100,a:1},percent:100}]),[xe,ge]=i.useState(90),[Ie,De]=i.useState(0),Ae=i.useRef(null),Re=re?mn(e):ue,ke=Math.min(Ie,Re.length-1),ee=M?Re[ke]?.color??{h:0,s:100,b:100,a:1}:Te,ae=i.useRef(Re);ae.current=Re;const se=i.useRef(xe);se.current=xe;const we=i.useRef(ke);we.current=ke;const[ie,ce]=i.useState(g),He=i.useRef(null),Pe=i.useRef(null),Ge=i.useRef(null);i.useEffect(()=>{Ce&&(le(!1),requestAnimationFrame(()=>{requestAnimationFrame(()=>le(!0))}))},[Ce]),i.useEffect(()=>{if(!Ce)return;const te=Ee=>{He.current?.contains(Ee.target)||Pe.current?.contains(Ee.target)||Z(!1)};return document.addEventListener("mousedown",te),()=>document.removeEventListener("mousedown",te)},[Ce]),i.useEffect(()=>()=>{Ge.current&&clearTimeout(Ge.current)},[]),i.useLayoutEffect(()=>{if(!Ce||!Pe.current||!He.current)return;const te=Pe.current.getBoundingClientRect(),Ee=He.current.getBoundingClientRect(),Ne=Ee.top,Ue=window.innerHeight-Ee.bottom,nt=ie.startsWith("top");!nt&&te.bottom>window.innerHeight?Ne>Ue&&ce(mt=>mt.replace("bottom","top")):nt&&te.top<0&&Ue>Ne&&ce(mt=>mt.replace("top","bottom"))});const Z=i.useCallback(te=>{c||(te&&ce(g),F||_(te),y?.(te))},[c,F,y,g]),Be=i.useCallback(te=>{if(q(!1),M){const Ne=ae.current,Ue=we.current,nt=Ne.map((mt,Tt)=>Tt===Ue?{...mt,color:te}:mt);re||ze(nt),C?.(xr(nt),ur(nt,se.current));return}W||Y(te);const Ee=Gr(te);v?.(Ee,Ee.toHexString())},[M,re,W,v,C]),Oe=i.useCallback(()=>{if(M){const Ne=ae.current;C?.(xr(Ne),ur(Ne,se.current));return}const te=W?lr(e):O,Ee=Gr(te);j?.(Ee,Ee.toHexString())},[M,W,e,O,j,C]),Qe=i.useCallback(te=>{D||Q(te),w?.(te)},[D,w]),_e=i.useCallback(te=>{Be(lr(te)),Oe()},[Be,Oe]),et=i.useCallback(()=>{q(!0),k?.()},[k]),je=i.useCallback(te=>{if(te!==A){if(te==="gradient"){if(Ae.current)ze(Ae.current);else{const Ee=W&&!K?lr(e):O;ze([{color:{...Ee},percent:0},{color:{h:0,s:0,b:100,a:1},percent:100}])}De(0)}else{Ae.current=[...ue];const Ee=ue[0]?.color??{h:0,s:100,b:100,a:1};W||Y(Ee)}z(te),s?.(te)}},[A,W,K,e,O,ue,s]),Se=i.useCallback(te=>{De(te)},[]),me=i.useCallback((te,Ee)=>{const Ue=ae.current.map((nt,mt)=>mt===te?{...nt,percent:Ee}:nt);re||ze(Ue),C?.(xr(Ue),ur(Ue,se.current))},[re,C]),U=i.useCallback(te=>{const Ee=ae.current,Ne=Wc(Ee,te),Ue=[...Ee,{color:Ne,percent:te}];re||ze(Ue),De(Ue.length-1),C?.(xr(Ue),ur(Ue,se.current))},[re,C]),he=i.useCallback(te=>{const Ee=ae.current;if(Ee.length<=2)return;const Ne=Ee.filter((Ue,nt)=>nt!==te);re||ze(Ne),De(Ue=>Math.min(Ue,Ne.length-1)),C?.(xr(Ne),ur(Ne,se.current))},[re,C]),de=i.useCallback(te=>{ge(te);const Ee=ae.current;C?.(xr(Ee),ur(Ee,te))},[C]),We=()=>{h==="click"&&Z(!Ce)},$e=()=>{h!=="hover"||c||(Ge.current&&clearTimeout(Ge.current),Z(!0))},ne=()=>{h==="hover"&&(Ge.current=window.setTimeout(()=>Z(!1),200))},be=ie.startsWith("top"),Ye=ie.endsWith("Right"),Ze={position:"absolute",zIndex:1050,...be?{bottom:"100%",marginBottom:"0.25rem"}:{top:"100%",marginTop:"0.25rem"},...Ye?{right:0}:{left:0}},tt=Kc[m],{r:dt,g:ft,b:gt}=gr(Te.h,Te.s,Te.b),Ct=`rgba(${dt}, ${ft}, ${gt}, ${Te.a})`,jt=Gr(Te),{r:Mt,g:pe,b:Ke}=gr(ee.h,ee.s,ee.b),qe=`rgba(${Mt}, ${pe}, ${Ke}, ${ee.a})`,st=M?ur(Re,xe):"";let rt=null;if(d)if(M)typeof d=="function"?rt=d(Gr(ee)):rt=`${xe}°`;else if(typeof d=="function")rt=d(jt);else switch(Le){case"hex":rt=jt.toHexString().toUpperCase();break;case"rgb":rt=jt.toRgbString();break;case"hsb":rt=jt.toHsbString();break}const xt=t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[P&&t.jsx(Yc,{modes:I,activeMode:A,onModeChange:je}),M&&t.jsx(Vc,{stops:Re,activeIndex:ke,angle:xe,onSelectStop:Se,onMoveStop:me,onAddStop:U,onRemoveStop:he,onAngleChange:de,onDragEnd:Oe}),t.jsx(Hc,{hue:ee.h,saturation:ee.s,brightness:ee.b,onChange:(te,Ee)=>Be({...ee,s:te,b:Ee}),onDragEnd:Oe}),t.jsxs("div",{style:{display:"flex",gap:"0.75rem",alignItems:"center"},children:[t.jsx("div",{style:{width:"1.75rem",height:"1.75rem",borderRadius:"50%",flexShrink:0,border:`1px solid ${n.colorBorder}`,backgroundColor:qe}}),t.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:"0.375rem"},children:[t.jsx(Fc,{hue:ee.h,onChange:te=>Be({...ee,h:te}),onDragEnd:Oe}),!u&&t.jsx(Ac,{color:ee,alpha:ee.a,onChange:te=>Be({...ee,a:te}),onDragEnd:Oe})]})]}),t.jsx(Oc,{color:ee,format:Le,disabledAlpha:u,onColorChange:te=>{Be(te),Oe()},onFormatChange:Qe}),p&&p.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("div",{style:{height:1,backgroundColor:n.colorBorder}}),t.jsx(Nc,{presets:p,onSelect:_e})]}),f&&t.jsxs(t.Fragment,{children:[t.jsx("div",{style:{height:1,backgroundColor:n.colorBorder}}),t.jsxs("button",{type:"button",onClick:et,style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"0.25rem",padding:"0.25rem 0",border:"none",backgroundColor:"transparent",color:n.colorTextMuted,cursor:"pointer",fontSize:"0.75rem",fontFamily:"inherit"},onMouseEnter:te=>{te.currentTarget.style.color=n.colorText},onMouseLeave:te=>{te.currentTarget.style.color=n.colorTextMuted},children:[t.jsx(Ms,{})," Clear"]})]})]}),Rt=b?b(xt):xt,Lt=["linear-gradient(45deg, #ccc 25%, transparent 25%)","linear-gradient(-45deg, #ccc 25%, transparent 25%)","linear-gradient(45deg, transparent 75%, #ccc 75%)","linear-gradient(-45deg, transparent 75%, #ccc 75%)"].join(", "),fe=i.useRef(null),J=B||t.jsxs("button",{ref:fe,type:"button",disabled:c,onClick:We,className:L?.trigger,style:V({display:"inline-flex",alignItems:"center",gap:"0.5rem",height:tt.height,padding:d?tt.paddingText:tt.paddingIcon,border:`1px solid ${n.colorBorder}`,borderRadius:tt.radius,backgroundColor:n.colorBg,cursor:c?"not-allowed":"pointer",opacity:c?.5:1,transition:"border-color 0.2s ease"},$?.trigger),onMouseEnter:te=>{c||(te.currentTarget.style.borderColor=n.colorBorderHover)},onMouseLeave:te=>{c||(te.currentTarget.style.borderColor=n.colorBorder)},children:[t.jsxs("span",{style:{position:"relative",width:tt.swatch,height:tt.swatch,borderRadius:3,overflow:"hidden",boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"},children:[t.jsx("span",{style:{position:"absolute",inset:0,backgroundImage:Lt,backgroundSize:"8px 8px",backgroundPosition:"0 0, 0 4px, 4px -4px, -4px 0"}}),M&&!oe?t.jsx("span",{style:{position:"absolute",inset:0,background:st}}):t.jsx("span",{style:{position:"absolute",inset:0,backgroundColor:oe?"transparent":Ct}}),oe&&t.jsx("span",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:t.jsx("svg",{width:tt.swatch,height:tt.swatch,viewBox:"0 0 16 16",fill:"none",stroke:"#ff4d4f",strokeWidth:"1.5",children:t.jsx("line",{x1:"3",y1:"3",x2:"13",y2:"13"})})})]}),d&&rt!==null&&t.jsx("span",{style:{fontSize:tt.fontSize,color:n.colorText,whiteSpace:"nowrap"},children:rt})]});return t.jsxs("div",{ref:He,className:Ve(R,L?.root),style:V({position:"relative",display:"inline-block"},$?.root,S),onMouseEnter:$e,onMouseLeave:ne,children:[B?t.jsx("div",{onClick:We,style:{cursor:c?"not-allowed":"pointer"},children:J}):J,Ce&&t.jsx("div",{ref:Pe,className:L?.panel,style:V({...Ze,width:"17.5rem",padding:"0.75rem",borderRadius:"0.5rem",border:`1px solid ${n.colorBorder}`,boxShadow:n.shadowMd,backgroundColor:n.colorBg,opacity:N?1:0,transform:N?"translateY(0)":`translateY(${be?4:-4}px)`,transition:"opacity 0.2s ease, transform 0.2s ease"},$?.panel),onMouseEnter:$e,onMouseLeave:ne,children:Rt})]})}function yr(e,r=2){return String(e).padStart(r,"0")}function Ot(e){return new Date(e.getTime())}function xn(e){const r=Ot(e);r.setHours(0,0,0,0),r.setDate(r.getDate()+4-(r.getDay()||7));const o=new Date(r.getFullYear(),0,1);return Math.ceil(((r.getTime()-o.getTime())/864e5+1)/7)}function Xc(e){const r=["th","st","nd","rd"],o=e%100;return e+(r[(o-20)%10]||r[o]||r[0])}const Gc=/\[([^\]]*)\]|YYYY|YY|MM|M|DD|D|HH|H|hh|h|mm|m|ss|s|A|a|ddd|dd|wo|Wo|QQ|Q/g;class _o{locale;constructor(r){this.locale=r??(typeof navigator<"u"?navigator.language:"en-US")}today(){const r=new Date;return r.setHours(0,0,0,0),r}create(r){return r==null?new Date(NaN):r instanceof Date?Ot(r):new Date(r)}clone(r){return Ot(r)}isValid(r){return r instanceof Date&&!isNaN(r.getTime())}getYear(r){return r.getFullYear()}getMonth(r){return r.getMonth()}getDate(r){return r.getDate()}getDay(r){return r.getDay()}getHour(r){return r.getHours()}getMinute(r){return r.getMinutes()}getSecond(r){return r.getSeconds()}setYear(r,o){const s=Ot(r);return s.setFullYear(o),s}setMonth(r,o){const s=Ot(r),l=s.getDate();s.setDate(1),s.setMonth(o);const a=new Date(s.getFullYear(),o+1,0).getDate();return s.setDate(Math.min(l,a)),s}setDate(r,o){const s=Ot(r);return s.setDate(o),s}setHour(r,o){const s=Ot(r);return s.setHours(o),s}setMinute(r,o){const s=Ot(r);return s.setMinutes(o),s}setSecond(r,o){const s=Ot(r);return s.setSeconds(o),s}addDays(r,o){const s=Ot(r);return s.setDate(s.getDate()+o),s}addMonths(r,o){const s=Ot(r),l=s.getDate();s.setDate(1),s.setMonth(s.getMonth()+o);const a=new Date(s.getFullYear(),s.getMonth()+1,0).getDate();return s.setDate(Math.min(l,a)),s}addYears(r,o){const s=Ot(r),l=s.getDate();s.setDate(1),s.setFullYear(s.getFullYear()+o);const a=new Date(s.getFullYear(),s.getMonth()+1,0).getDate();return s.setDate(Math.min(l,a)),s}isSameDay(r,o){return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()&&r.getDate()===o.getDate()}isSameMonth(r,o){return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}isSameYear(r,o){return r.getFullYear()===o.getFullYear()}isBefore(r,o){return r.getTime()<o.getTime()}isAfter(r,o){return r.getTime()>o.getTime()}startOfWeek(r,o=1){const s=Ot(r);s.setHours(0,0,0,0);const a=(s.getDay()-o+7)%7;return s.setDate(s.getDate()-a),s}endOfWeek(r,o=1){const s=this.startOfWeek(r,o);return s.setDate(s.getDate()+6),s.setHours(23,59,59,999),s}startOfMonth(r){return new Date(r.getFullYear(),r.getMonth(),1)}endOfMonth(r){return new Date(r.getFullYear(),r.getMonth()+1,0,23,59,59,999)}getDaysInMonth(r){return new Date(r.getFullYear(),r.getMonth()+1,0).getDate()}getWeekNumber(r){return xn(r)}format(r,o){const s=r.getFullYear(),l=r.getMonth(),a=r.getDate(),c=r.getHours(),u=r.getMinutes(),f=r.getSeconds(),d=r.getDay(),h=c%12||12,g=Math.floor(l/3)+1,m=xn(r),x=this.getDayNames("short"),p=this.getDayNames("narrow");return o.replace(Gc,(b,v)=>{if(v!==void 0)return v;switch(b){case"YYYY":return String(s);case"YY":return String(s).slice(-2);case"MM":return yr(l+1);case"M":return String(l+1);case"DD":return yr(a);case"D":return String(a);case"HH":return yr(c);case"H":return String(c);case"hh":return yr(h);case"h":return String(h);case"mm":return yr(u);case"m":return String(u);case"ss":return yr(f);case"s":return String(f);case"A":return c<12?"AM":"PM";case"a":return c<12?"am":"pm";case"ddd":return x[d];case"dd":return p[d];case"wo":case"Wo":return Xc(m);case"QQ":return"Q"+g;case"Q":return String(g);default:return b}})}parse(r,o){let s="";const l=[];let a=0;const c=o;for(;a<c.length;){if(c[a]==="["){const C=c.indexOf("]",a);if(C!==-1){s+=yn(c.substring(a+1,C)),a=C+1;continue}}let j=!1;for(const C of["YYYY","YY","MM","DD","HH","hh","mm","ss","QQ","wo","Wo","ddd","dd","M","D","H","h","m","s","A","a","Q"])if(c.startsWith(C,a)){l.push(C),s+=`(${Uc(C)})`,a+=C.length,j=!0;break}j||(s+=yn(c[a]),a++)}const u=new RegExp(`^${s}$`),f=r.match(u);if(!f)return null;let d=new Date().getFullYear(),h=0,g=1,m=0,x=0,p=0,b=!1;for(let j=0;j<l.length;j++){const C=f[j+1];switch(l[j]){case"YYYY":d=parseInt(C,10);break;case"YY":d=2e3+parseInt(C,10);break;case"MM":case"M":h=parseInt(C,10)-1;break;case"DD":case"D":g=parseInt(C,10);break;case"HH":case"H":m=parseInt(C,10);break;case"hh":case"h":m=parseInt(C,10);break;case"mm":case"m":x=parseInt(C,10);break;case"ss":case"s":p=parseInt(C,10);break;case"A":case"a":b=C.toLowerCase()==="pm";break;case"Q":case"QQ":h=(parseInt(C.replace("Q",""),10)-1)*3;break}}b&&m<12&&(m+=12),!b&&m===12&&l.some(j=>j==="A"||j==="a")&&(m=0);const v=new Date(d,h,g,m,x,p);return isNaN(v.getTime())?null:v}getMonthNames(r="long"){const o=new Intl.DateTimeFormat(this.locale,{month:r});return Array.from({length:12},(s,l)=>{const a=o.format(new Date(2026,l,1));return a.charAt(0).toUpperCase()+a.slice(1)})}getDayNames(r="short"){const o=new Intl.DateTimeFormat(this.locale,{weekday:r});return Array.from({length:7},(s,l)=>{const a=o.format(new Date(2026,0,4+l));return a.charAt(0).toUpperCase()+a.slice(1)})}getQuarterLabel(r){return`Q${r}`}}function yn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Uc(e){switch(e){case"YYYY":return"\\d{4}";case"YY":return"\\d{2}";case"MM":return"\\d{2}";case"M":return"\\d{1,2}";case"DD":return"\\d{2}";case"D":return"\\d{1,2}";case"HH":return"\\d{2}";case"H":return"\\d{1,2}";case"hh":return"\\d{2}";case"h":return"\\d{1,2}";case"mm":return"\\d{2}";case"m":return"\\d{1,2}";case"ss":return"\\d{2}";case"s":return"\\d{1,2}";case"A":return"[AP]M";case"a":return"[ap]m";case"QQ":return"Q[1-4]";case"Q":return"[1-4]";case"wo":case"Wo":return"\\d{1,2}(?:st|nd|rd|th)";case"ddd":return"[A-Za-z]+";case"dd":return"[A-Za-z]+";default:return".+"}}const qc=new _o,Bs=i.createContext(null);function Qc({adapter:e,children:r}){return t.jsx(Bs.Provider,{value:e,children:r})}function Rs(e){const r=i.useContext(Bs);return e??r??qc}function Ts(){return t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("rect",{x:"2",y:"3",width:"12",height:"11",rx:"1.5"}),t.jsx("line",{x1:"5",y1:"1.5",x2:"5",y2:"4"}),t.jsx("line",{x1:"11",y1:"1.5",x2:"11",y2:"4"}),t.jsx("line",{x1:"2",y1:"7",x2:"14",y2:"7"})]})}function Zc(){return t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("circle",{cx:"8",cy:"8",r:"6"}),t.jsx("polyline",{points:"8 4.5 8 8 10.5 9.5"})]})}function Jc(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"8.5 3 4.5 7 8.5 11"})})}function ed(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"5.5 3 9.5 7 5.5 11"})})}function td(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("polyline",{points:"7.5 3 3.5 7 7.5 11"}),t.jsx("polyline",{points:"11 3 7 7 11 11"})]})}function rd(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("polyline",{points:"3 3 7 7 3 11"}),t.jsx("polyline",{points:"6.5 3 10.5 7 6.5 11"})]})}function $o(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[t.jsx("circle",{cx:"7",cy:"7",r:"5.5",fill:"currentColor",opacity:"0.08"}),t.jsx("line",{x1:"5",y1:"5",x2:"9",y2:"9"}),t.jsx("line",{x1:"9",y1:"5",x2:"5",y2:"9"})]})}function od(){return t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"4",y1:"8",x2:"12",y2:"8"}),t.jsx("polyline",{points:"9 5 12 8 9 11"})]})}const Is={sm:{height:"1.75rem",fontSize:"0.75rem",iconSize:14,radius:"0.25rem",paddingH:"0.5rem",inputFontSize:"1rem",tagFontSize:"0.625rem"},md:{height:"2.25rem",fontSize:"0.875rem",iconSize:16,radius:"0.375rem",paddingH:"0.75rem",inputFontSize:"1rem",tagFontSize:"0.75rem"},lg:{height:"2.75rem",fontSize:"1rem",iconSize:18,radius:"0.5rem",paddingH:"0.875rem",inputFontSize:"1rem",tagFontSize:"0.875rem"}};function bn(e){return{bottomLeft:"topLeft",bottomRight:"topRight",topLeft:"bottomLeft",topRight:"bottomRight"}[e]}function Ls(e,r,o=360){if(!r)return e;const s=r.getBoundingClientRect(),l=window.innerHeight;if(e.startsWith("bottom")){if(l-s.bottom<o&&s.top>l-s.bottom)return bn(e)}else if(s.top<o&&l-s.bottom>s.top)return bn(e);return e}function Es(e,r){return e==="year"?"YYYY":e==="quarter"?"YYYY-[Q]Q":e==="month"?"YYYY-MM":e==="week"?"YYYY-wo":r?`YYYY-MM-DD ${typeof r=="object"&&r.format?r.format:"HH:mm:ss"}`:"YYYY-MM-DD"}function nd(e,r,o){return e==="year"?o?.yearPlaceholder??"Select year":e==="quarter"?o?.quarterPlaceholder??"Select quarter":e==="month"?o?.monthPlaceholder??"Select month":e==="week"?o?.weekPlaceholder??"Select week":r?o?.dateTimePlaceholder??"Select date and time":o?.placeholder??"Select date"}function $s(e,r,o,s=1){const l=e.setDate(e.setMonth(e.setYear(e.today(),r),o),1),a=e.startOfWeek(l,s),c=[];let u=a;for(let f=0;f<6;f++){const d=[];for(let h=0;h<7;h++)d.push(e.clone(u)),u=e.addDays(u,1);c.push(d)}return c}function fo(e,r,o,s,l){return!!(o?.(r)||s&&e.isValid(s)&&e.isBefore(r,e.setHour(e.setMinute(e.setSecond(e.clone(s),0),0),0))||l&&e.isValid(l)&&e.isAfter(r,e.setHour(e.setMinute(e.setSecond(e.clone(l),23),59),59)))}function sd(e){const r=[],o=/YYYY|MM|DD|HH|hh|mm|ss|A/g;let s=0,l;for(;(l=o.exec(e))!==null;)l.index>s&&r.push({type:"separator",separator:e.slice(s,l.index),length:0}),r.push({type:"token",token:l[0],length:l[0].length}),s=l.index+l[0].length;return s<e.length&&r.push({type:"separator",separator:e.slice(s),length:0}),r}function id({format:e,value:r,onComplete:o,placeholder:s,fontSize:l,color:a,disabled:c,readOnly:u,onFocus:f}){const d=i.useMemo(()=>sd(e),[e]),h=i.useMemo(()=>d.filter(k=>k.type==="token"),[d]),[g,m]=i.useState(()=>{if(r){const k=[];let B=0;for(const R of d)R.type==="separator"?B+=R.separator?.length??0:(k.push(r.slice(B,B+R.length)),B+=R.length);return k}return h.map(()=>"")}),[x,p]=i.useState(-1),b=i.useRef(null);i.useEffect(()=>{if(r&&x===-1){const k=[];let B=0;for(const R of d)R.type==="separator"?B+=R.separator?.length??0:(k.push(r.slice(B,B+R.length)),B+=R.length);m(k)}},[r]);const v=i.useMemo(()=>{let k=0;return d.map(B=>{if(B.type==="separator")return B.separator;const R=g[k]??"",S=(B.token??"").replace(/./g,"_");return k++,R+S.slice(R.length)}).join("")},[d,g]),j=k=>{if(c||u)return;const B=x>=0?x:0;if(k.key==="ArrowLeft")k.preventDefault(),p(Math.max(0,B-1));else if(k.key==="ArrowRight"||k.key==="Tab"){if(k.key==="Tab"&&B>=h.length-1)return;k.preventDefault(),p(Math.min(h.length-1,B+1))}else if(k.key==="ArrowUp"||k.key==="ArrowDown"){k.preventDefault();const R=k.key==="ArrowUp"?1:-1;m(S=>{const L=[...S],$=h[B],I=parseInt(L[B])||0,P=$.token==="YYYY"?9999:$.token==="MM"?12:$.token==="DD"?31:$.token==="HH"?23:$.token==="hh"?12:$.token==="mm"||$.token==="ss"?59:99,E=$.token==="MM"||$.token==="DD"||$.token==="hh"?1:0,H=Math.min(P,Math.max(E,I+R));return L[B]=String(H).padStart($.length,"0"),L})}else if(k.key==="Backspace")k.preventDefault(),m(R=>{const S=[...R];return S[B].length>0?S[B]=S[B].slice(0,-1):B>0&&p(B-1),S});else if(/^\d$/.test(k.key))k.preventDefault(),m(R=>{const S=[...R],L=h[B];return S[B].length>=L.length&&(S[B]=""),S[B]+=k.key,S[B].length>=L.length&&B<h.length-1&&p(B+1),S});else if(k.key==="Enter"){if(g.every((S,L)=>S.length===h[L].length)){let S=0;const L=d.map($=>$.type==="separator"?$.separator:g[S++]).join("");o(L),p(-1)}}else k.key==="Escape"&&(p(-1),b.current?.blur())},C=()=>{if(g.every((B,R)=>B.length===h[R].length)){let B=0;const R=d.map(S=>S.type==="separator"?S.separator:g[B++]).join("");o(R)}p(-1)},w=k=>{let B=0,R=0;for(const S of d)if(S.type==="separator")B+=S.separator?.length??0;else{if(R===k)return{start:B,length:S.length};B+=S.length,R++}return{start:0,length:0}};i.useEffect(()=>{if(x>=0&&b.current){const{start:k,length:B}=w(x);b.current.setSelectionRange(k,k+B)}},[x,v]);const y=g.every(k=>k==="");return t.jsx("input",{ref:b,value:y&&x===-1?"":v,placeholder:s??e.replace(/[YMDHhms]/g,"_"),readOnly:!0,disabled:c,onKeyDown:j,onFocus:()=>{p(0),f?.()},onBlur:C,style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",fontSize:l,fontFamily:"inherit",color:a,caretColor:"transparent",cursor:c?"not-allowed":"text",padding:0}})}function Po({title:e,onPrevYear:r,onNextYear:o,onPrevMonth:s,onNextMonth:l,onTitleClick:a,showMonthNav:c=!0,styles:u,classNames:f}){const d={display:"inline-flex",alignItems:"center",justifyContent:"center",width:"1.75rem",height:"1.75rem",padding:0,border:"none",borderRadius:"0.25rem",backgroundColor:"transparent",cursor:"pointer",color:n.colorTextMuted,transition:"background-color 0.15s ease, color 0.15s ease"},h=m=>{m.currentTarget.style.backgroundColor=n.colorBgMuted,m.currentTarget.style.color=n.colorText},g=m=>{m.currentTarget.style.backgroundColor="transparent",m.currentTarget.style.color=n.colorTextMuted};return t.jsxs("div",{className:f?.header,style:V({display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0.5rem 0.5rem 0.25rem",userSelect:"none"},u?.header),children:[t.jsxs("div",{style:{display:"flex",gap:"0.125rem"},children:[t.jsx("button",{type:"button",style:d,onClick:r,onMouseEnter:h,onMouseLeave:g,children:t.jsx(td,{})}),c&&s&&t.jsx("button",{type:"button",style:d,onClick:s,onMouseEnter:h,onMouseLeave:g,children:t.jsx(Jc,{})})]}),t.jsx("button",{type:"button",onClick:a,style:{border:"none",backgroundColor:"transparent",cursor:a?"pointer":"default",fontSize:"0.875rem",fontWeight:600,fontFamily:"inherit",color:n.colorText,padding:"0.125rem 0.5rem",borderRadius:"0.25rem",transition:"background-color 0.15s ease"},onMouseEnter:m=>{a&&(m.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:m=>{m.currentTarget.style.backgroundColor="transparent"},children:e}),t.jsxs("div",{style:{display:"flex",gap:"0.125rem"},children:[c&&l&&t.jsx("button",{type:"button",style:d,onClick:l,onMouseEnter:h,onMouseLeave:g,children:t.jsx(ed,{})}),t.jsx("button",{type:"button",style:d,onClick:o,onMouseEnter:h,onMouseLeave:g,children:t.jsx(rd,{})})]})]})}function Ps({adapter:e,viewDate:r,value:o,selectedDates:s,onSelect:l,onHover:a,disabledDate:c,minDate:u,maxDate:f,cellRender:d,rangeInfo:h,hideOutOfMonth:g,styles:m,classNames:x}){const p=e.getYear(r),b=e.getMonth(r),v=e.today(),j=$s(e,p,b,1),C=e.getDayNames("narrow"),w=[...C.slice(1),C[0]],y="2rem",k="1.75rem";return t.jsx("div",{className:x?.body,style:V({padding:"0 0.5rem 0.5rem"},m?.body),children:t.jsxs("div",{style:{display:"grid",gridTemplateColumns:`repeat(7, ${y})`,gridAutoRows:y,placeItems:"center"},children:[w.map((B,R)=>t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:y,height:y,fontSize:"0.75rem",fontWeight:600,color:n.colorTextMuted},children:B},`h-${R}`)),j.map((B,R)=>B.map((S,L)=>{const $=e.isSameMonth(S,r);if(g&&!$)return t.jsx("div",{},`${R}-${L}`);const I=e.isSameDay(S,v),P=o&&e.isValid(o)&&e.isSameDay(S,o)||(s?.some(D=>e.isSameDay(D,S))??!1),E=fo(e,S,c,u,f);let H=!1,z=!1,A=!1;if(h){const{start:D,end:T,hoverDate:O}=h,Y=T??O;if(D&&Y){const[X,_]=e.isBefore(D,Y)?[D,Y]:[Y,D];z=e.isSameDay(S,X),A=e.isSameDay(S,_),H=(e.isAfter(S,X)||e.isSameDay(S,X))&&(e.isBefore(S,_)||e.isSameDay(S,_))}}const M={display:"grid",placeContent:"center",width:k,height:k,fontSize:"0.8125rem",borderRadius:"50%",cursor:E?"not-allowed":"pointer",color:P?"#fff":E?n.colorTextSubtle:$?n.colorText:n.colorTextSubtle,backgroundColor:P?n.colorPrimary:H&&!z&&!A?n.colorPrimaryBg:"transparent",fontWeight:I?700:400,boxShadow:I&&!P?`inset 0 0 0 1.5px ${n.colorPrimary}`:"none",transition:"background-color 0.1s ease, color 0.1s ease, box-shadow 0.1s ease",opacity:E?.4:1};(z||A)&&(M.backgroundColor=n.colorPrimary,M.color="#fff");const W=t.jsx("span",{style:{lineHeight:0},children:e.getDate(S)}),F=d?d(S,{type:"date",originNode:W,today:I,inView:$,inRange:H,rangeStart:z,rangeEnd:A}):W;return t.jsx("div",{style:M,className:x?.cell,onClick:()=>{E||l(S)},onMouseEnter:D=>{E||(a?.(S),!P&&!z&&!A&&(D.currentTarget.style.backgroundColor=H?n.colorPrimaryBg:n.colorBgMuted))},onMouseLeave:D=>{!E&&!P&&!z&&!A&&(D.currentTarget.style.backgroundColor=H?n.colorPrimaryBg:"transparent"),a?.(null)},children:F},`${R}-${L}`)}))]})})}function ld({adapter:e,viewDate:r,value:o,onSelect:s,disabledDate:l,minDate:a,maxDate:c,styles:u,classNames:f}){const d=e.getYear(r),h=e.getMonth(r),g=e.today(),m=$s(e,d,h,1),x=e.getDayNames("narrow"),p=[...x.slice(1),x[0]],b="2rem",v="1.75rem",j=o&&e.isValid(o)?e.startOfWeek(o,1):null;return t.jsxs("div",{className:f?.body,style:V({padding:"0 0.5rem 0.5rem"},u?.body),children:[t.jsx("div",{style:{display:"grid",gridTemplateColumns:`repeat(7, ${b})`,gridAutoRows:b,placeItems:"center"},children:p.map((C,w)=>t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:b,height:b,fontSize:"0.75rem",fontWeight:600,color:n.colorTextMuted},children:C},w))}),m.map((C,w)=>{const y=e.startOfWeek(C[0],1),k=j&&e.isSameDay(y,j);return t.jsx("div",{style:{display:"grid",gridTemplateColumns:`repeat(7, ${b})`,gridAutoRows:b,placeItems:"center",borderRadius:"0.25rem",cursor:"pointer",backgroundColor:k?n.colorPrimaryBg:"transparent",transition:"background-color 0.1s ease"},onClick:()=>s(y),onMouseEnter:B=>{k||(B.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:B=>{k||(B.currentTarget.style.backgroundColor="transparent")},children:C.map((B,R)=>{const S=e.isSameMonth(B,r),L=e.isSameDay(B,g);return t.jsx("div",{style:{display:"grid",placeContent:"center",width:v,height:v,fontSize:"0.8125rem",color:S?k?n.colorPrimary:n.colorText:n.colorTextSubtle,fontWeight:L?700:400,boxShadow:L?`inset 0 0 0 1.5px ${n.colorPrimary}`:"none",borderRadius:"50%"},children:e.getDate(B)},R)})},w)})]})}function Ds({adapter:e,viewDate:r,value:o,onSelect:s,disabledDate:l,minDate:a,maxDate:c,cellRender:u,styles:f,classNames:d}){const h=e.getMonthNames("short"),g=e.today(),m=e.getYear(r);return t.jsx("div",{className:d?.body,style:V({padding:"0.5rem",display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"0.5rem"},f?.body),children:h.map((x,p)=>{const b=e.setMonth(e.setDate(e.setYear(e.today(),m),1),p),v=e.isSameMonth(b,g),j=o&&e.isValid(o)&&e.isSameMonth(b,o)&&e.isSameYear(b,o),C=fo(e,b,l,a,c),w=t.jsx("span",{children:x}),y=u?u(b,{type:"month",originNode:w,today:v,inView:!0}):w;return t.jsx("button",{type:"button",disabled:C,onClick:()=>s(b),className:d?.cell,style:{height:"2.5rem",border:v&&!j?`1px solid ${n.colorPrimary}`:"1px solid transparent",borderRadius:"0.375rem",cursor:C?"not-allowed":"pointer",backgroundColor:j?n.colorPrimary:"transparent",color:j?"#fff":C?n.colorTextSubtle:n.colorText,fontSize:"0.8125rem",fontWeight:v?600:400,fontFamily:"inherit",transition:"background-color 0.1s ease",opacity:C?.4:1},onMouseEnter:k=>{!C&&!j&&(k.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:k=>{!C&&!j&&(k.currentTarget.style.backgroundColor="transparent")},children:y},p)})})}function zs({adapter:e,viewDate:r,value:o,onSelect:s,disabledDate:l,minDate:a,maxDate:c,cellRender:u,styles:f,classNames:d}){const h=e.getYear(r),g=Math.floor(h/10)*10,m=e.today(),x=e.getYear(m),p=Array.from({length:12},(b,v)=>g-1+v);return t.jsx("div",{className:d?.body,style:V({padding:"0.5rem",display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"0.5rem"},f?.body),children:p.map(b=>{const v=e.setYear(e.today(),b),j=b>=g&&b<g+10,C=b===x,w=o&&e.isValid(o)&&e.getYear(o)===b,y=fo(e,v,l,a,c),k=t.jsx("span",{children:b}),B=u?u(v,{type:"year",originNode:k,today:C,inView:j}):k;return t.jsx("button",{type:"button",disabled:y,onClick:()=>s(v),className:d?.cell,style:{height:"2.5rem",border:C&&!w?`1px solid ${n.colorPrimary}`:"1px solid transparent",borderRadius:"0.375rem",cursor:y?"not-allowed":"pointer",backgroundColor:w?n.colorPrimary:"transparent",color:w?"#fff":j?y?n.colorTextSubtle:n.colorText:n.colorTextSubtle,fontSize:"0.8125rem",fontWeight:C?600:400,fontFamily:"inherit",transition:"background-color 0.1s ease",opacity:y?.4:1},onMouseEnter:R=>{!y&&!w&&(R.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:R=>{!y&&!w&&(R.currentTarget.style.backgroundColor="transparent")},children:B},b)})})}function Ws({adapter:e,viewDate:r,value:o,onSelect:s,disabledDate:l,minDate:a,maxDate:c,cellRender:u,styles:f,classNames:d}){const h=e.today(),g=e.getYear(r),m=Math.floor(e.getMonth(h)/3)+1,x=e.getYear(h);return t.jsx("div",{className:d?.body,style:V({padding:"0.5rem",display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"0.5rem"},f?.body),children:[1,2,3,4].map(p=>{const b=(p-1)*3,v=e.setMonth(e.setDate(e.setYear(e.today(),g),1),b),j=p===m&&g===x,C=o&&e.isValid(o)&&Math.floor(e.getMonth(o)/3)+1===p&&e.getYear(o)===g,w=fo(e,v,l,a,c),y=e.getQuarterLabel(p),k=t.jsx("span",{children:y}),B=u?u(v,{type:"quarter",originNode:k,today:j,inView:!0}):k;return t.jsx("button",{type:"button",disabled:w,onClick:()=>s(v),className:d?.cell,style:{height:"3rem",border:j&&!C?`1px solid ${n.colorPrimary}`:"1px solid transparent",borderRadius:"0.375rem",cursor:w?"not-allowed":"pointer",backgroundColor:C?n.colorPrimary:"transparent",color:C?"#fff":w?n.colorTextSubtle:n.colorText,fontSize:"0.875rem",fontWeight:j?600:400,fontFamily:"inherit",transition:"background-color 0.1s ease",opacity:w?.4:1},onMouseEnter:R=>{!w&&!C&&(R.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:R=>{!w&&!C&&(R.currentTarget.style.backgroundColor="transparent")},children:B},p)})})}function ad({adapter:e,value:r,onChange:o,config:s,disabledTime:l}){const a=s?.hourStep??1,c=s?.minuteStep??1,u=s?.secondStep??1,f=s?.showHour!==!1,d=s?.showMinute!==!1,h=s?.showSecond===!0,g=s?.use12Hours??!1,m=e.getHour(r),x=e.getMinute(r),p=e.getSecond(r),b=l?.disabledHours?.()??[],v=l?.disabledMinutes?.(m)??[],j=l?.disabledSeconds?.(m,x)??[],C=Array.from({length:Math.ceil((g?12:24)/a)},(I,P)=>{const E=g?P*a+1:P*a;return E}).filter(I=>g?I<=12:I<24),w=Array.from({length:Math.ceil(60/c)},(I,P)=>P*c).filter(I=>I<60),y=Array.from({length:Math.ceil(60/u)},(I,P)=>P*u).filter(I=>I<60),k="13.5rem",B="j-dp-time-col",R={display:"flex",flexDirection:"column",alignItems:"center",height:k,overflowY:"auto",width:"3.25rem",scrollbarWidth:"thin",scrollbarColor:`${n.colorBorderHover} transparent`,borderRight:`1px solid ${n.colorBorder}`},S=(I,P,E,H)=>t.jsx("div",{className:B,style:R,children:I.map(z=>{const A=z===P,M=E.includes(z);return t.jsx("button",{type:"button",disabled:M,onClick:()=>{M||H(z)},style:{width:"2.75rem",height:"1.75rem",flexShrink:0,border:"none",borderRadius:"0.25rem",backgroundColor:A?n.colorPrimaryBg:"transparent",color:A?n.colorPrimary:M?n.colorTextSubtle:n.colorText,cursor:M?"not-allowed":"pointer",fontSize:"0.8125rem",fontWeight:A?600:400,fontFamily:"monospace",transition:"background-color 0.1s ease",opacity:M?.4:1},onMouseEnter:W=>{!M&&!A&&(W.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:W=>{!M&&!A&&(W.currentTarget.style.backgroundColor="transparent")},children:String(z).padStart(2,"0")},z)})}),L=g?m%12||12:m,$=m>=12;return t.jsxs("div",{style:{display:"flex",borderLeft:`1px solid ${n.colorBorder}`,padding:"0.5rem 0"},children:[t.jsx("style",{children:`
|
|
107
|
+
`}),t.jsxs("div",{style:we,className:k?.tabBar,children:[me&&t.jsx("div",{style:{display:"flex",alignItems:"center",flexShrink:0},children:me}),K&&t.jsx("button",{style:{...se,opacity:Q?1:.3,pointerEvents:Q?"auto":"none"},onClick:()=>ke(-gn),tabIndex:-1,"aria-label":"Scroll tabs back",children:L?t.jsx(gc,{}):t.jsx(hc,{})}),t.jsx("div",{ref:O,style:ee,children:t.jsxs("div",{ref:T,style:ae,role:"tablist",children:[e.map(oe=>{const Re=oe.key===$,Ze=ce(oe,Re);return t.jsxs("div",{ref:Ne(oe.key),role:"tab","aria-selected":Re,"aria-disabled":oe.disabled,tabIndex:Re?0:-1,style:{...Ze,...B?.tab},className:k?.tab,onClick:Fe=>Ie(oe,Fe),onMouseEnter:()=>{oe.disabled||A(oe.key)},onMouseLeave:()=>{A(Fe=>Fe===oe.key?null:Fe)},children:[oe.icon&&t.jsx("span",{style:{display:"inline-flex",lineHeight:0},children:oe.icon}),oe.label&&t.jsx("span",{children:oe.label}),H&&oe.closable!==!1&&t.jsx("button",{style:He,onClick:Fe=>fe(oe,Fe),onMouseEnter:Fe=>{const et=Fe.currentTarget;et.style.backgroundColor=n.colorBgMuted,et.style.color=n.colorText},onMouseLeave:Fe=>{const et=Fe.currentTarget;et.style.backgroundColor="transparent",et.style.color=n.colorTextMuted},tabIndex:-1,"aria-label":`Close ${oe.label??oe.key}`,children:oe.closeIcon??x??t.jsx(uc,{})})]},oe.key)}),!P&&t.jsx("div",{style:{...Y,...B?.inkBar},className:k?.inkBar})]})}),K&&t.jsx("button",{style:{...se,opacity:le?1:.3,pointerEvents:le?"auto":"none"},onClick:()=>ke(gn),tabIndex:-1,"aria-label":"Scroll tabs forward",children:L?t.jsx(mc,{}):t.jsx(pc,{})}),he&&t.jsx("div",{style:{display:"flex",alignItems:"center",flexShrink:0},children:he}),H&&!p&&t.jsx("button",{style:Pe,onClick:ze,onMouseEnter:oe=>{const Re=oe.currentTarget;Re.style.color=n.colorPrimary,Re.style.borderColor=n.colorPrimary},onMouseLeave:oe=>{const Re=oe.currentTarget;Re.style.color=n.colorTextMuted,Re.style.borderColor=n.colorBorder},tabIndex:-1,"aria-label":"Add tab",children:m??t.jsx(fc,{})})]}),t.jsx("div",{style:ie,className:k?.content,children:Ge()})]})}function xc(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function yc(e){const r=[];for(const o of e)o.options?r.push(...o.options):r.push(o);return r}function bc(e,r){const o=e.toLowerCase();return!!(r.value.toLowerCase().includes(o)||typeof r.label=="string"&&r.label.toLowerCase().includes(o))}function vc({options:e=[],value:r,defaultValue:o="",placeholder:s,open:l,defaultOpen:a=!1,disabled:c=!1,allowClear:u=!1,autoFocus:f=!1,backfill:d=!1,defaultActiveFirstOption:h=!0,variant:g="outlined",status:m,filterOption:x=!0,notFoundContent:p=null,popupMatchSelectWidth:b=!0,onChange:v,onSearch:j,onSelect:C,onFocus:w,onBlur:y,onDropdownVisibleChange:k,onClear:B,prefix:R,suffix:S,className:E,style:$,classNames:I,styles:L}){const P=r!==void 0,[H,z]=i.useState(o),F=P?r:H,M=l!==void 0,[W,A]=i.useState(a),D=M?l:W,[T,O]=i.useState(-1),[Y,X]=i.useState(!1),[K,G]=i.useState(!1),[Q,N]=i.useState(!1),le=i.useRef(null),re=i.useRef(null),q=i.useRef(null),_=i.useRef(null),J=i.useCallback(je=>{P||z(je),v?.(je)},[P,v]),Te=i.useCallback(je=>{M||A(je),k?.(je),je?(G(!1),requestAnimationFrame(()=>{requestAnimationFrame(()=>{N(!0)})})):N(!1)},[M,k]),ke=i.useMemo(()=>{if(x===!1)return e;const je=typeof x=="function"?x:bc;return e.map(ve=>{if(ve.options){const xe=ve.options.filter(U=>je(F,U));return xe.length===0?null:{...ve,options:xe}}return je(F,ve)?ve:null}).filter(Boolean)},[e,F,x]),Ie=i.useMemo(()=>yc(ke),[ke]),fe=Ie.length>0||p!==null,ze=D&&fe&&!c;i.useEffect(()=>{if(h&&Ie.length>0){const je=Ie.findIndex(ve=>!ve.disabled);O(je>=0?je:-1)}else O(-1)},[Ie,h]),i.useEffect(()=>{f&&re.current&&re.current.focus()},[f]),i.useEffect(()=>{if(!D)return;const je=ve=>{le.current&&!le.current.contains(ve.target)&&Te(!1)};return document.addEventListener("mousedown",je),()=>document.removeEventListener("mousedown",je)},[D,Te]),i.useLayoutEffect(()=>{if(!D||!q.current||!le.current)return;const je=q.current.getBoundingClientRect(),ve=le.current.getBoundingClientRect(),xe=ve.top,U=window.innerHeight-ve.bottom;!K&&je.bottom>window.innerHeight?xe>U&&G(!0):K&&je.top<0&&U>xe&&G(!1)}),i.useEffect(()=>{if(!ze||T<0)return;const je=q.current;if(!je)return;const ve=je.querySelector(`[data-option-index="${T}"]`);if(ve){const xe=ve.offsetTop,U=xe+ve.offsetHeight;xe<je.scrollTop?je.scrollTop=xe:U>je.scrollTop+je.clientHeight&&(je.scrollTop=U-je.clientHeight)}},[T,ze]);const me=je=>{const ve=je.target.value;_.current=null,J(ve),j?.(ve),D||Te(!0)},he=je=>{je.disabled||(_.current=null,J(je.value),C?.(je.value,je),Te(!1),re.current?.focus())},Le=je=>{X(!0),w?.(je),!D&&fe&&Te(!0)},De=je=>{const ve=je.relatedTarget;le.current&&ve&&le.current.contains(ve)||(X(!1),y?.(je),_.current!==null&&(J(_.current),_.current=null),Te(!1))},Oe=je=>{je.stopPropagation(),_.current=null,J(""),B?.(),re.current?.focus()},Be=je=>{if(Ie.length===0)return;let ve=T;for(let xe=0;xe<Ie.length&&(ve=(ve+je+Ie.length)%Ie.length,!!Ie[ve].disabled);xe++);O(ve),d&&Ie[ve]&&(_.current=Ie[ve].value,P||z(Ie[ve].value),v?.(Ie[ve].value))},we=je=>{switch(je.key){case"ArrowDown":je.preventDefault(),D?Be(1):Te(!0);break;case"ArrowUp":je.preventDefault(),D&&Be(-1);break;case"Enter":D&&T>=0&&Ie[T]&&!Ie[T].disabled&&(je.preventDefault(),he(Ie[T]));break;case"Escape":D&&(je.preventDefault(),Te(!1));break}},ee=V({position:"relative",display:"inline-block",width:"100%"},L?.root,$),ae={outlined:{border:`1px solid ${n.colorBorder}`,backgroundColor:n.colorBg},filled:{border:"1px solid transparent",backgroundColor:n.colorBgMuted},borderless:{border:"1px solid transparent",backgroundColor:"transparent"}},se=m==="error"?n.colorError:m==="warning"?n.colorWarning:void 0,Se=m==="error"?n.colorErrorBg:m==="warning"?n.colorWarningBg:n.colorPrimaryLight,ie={width:"100%",minHeight:"2.75rem",padding:"0.375rem 0.75rem",paddingLeft:R?"2rem":"0.75rem",paddingRight:u&&F?S?"3.5rem":"2.25rem":S?"2rem":"0.75rem",fontSize:"1rem",fontFamily:"inherit",lineHeight:"1.5",borderRadius:"0.375rem",outline:"none",color:c?n.colorTextSubtle:se||n.colorText,cursor:c?"not-allowed":void 0,transition:"border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",...ae[g],...se?{borderColor:se}:{},...Y&&!c?{borderColor:se||n.colorPrimary,boxShadow:`0 0 0 2px ${Se}`}:{},...c?{opacity:.6}:{}},ce=V(ie,L?.input),Pe={position:"absolute",left:0,zIndex:1050,width:(typeof b=="number"?b:void 0)||(b===!0?"100%":void 0),minWidth:b===!1?120:void 0,maxHeight:"min(16rem, 40vh)",overflowY:"auto",overscrollBehavior:"contain",backgroundColor:n.colorBg,border:`1px solid ${n.colorBorder}`,borderRadius:"0.5rem",boxShadow:n.shadowMd,padding:"0.25rem 0",opacity:Q?1:0,transition:"opacity 0.15s ease-out, transform 0.15s ease-out",...K?{bottom:"100%",marginBottom:"0.25rem",transform:Q?"translateY(0)":"translateY(6px)"}:{top:"100%",marginTop:"0.25rem",transform:Q?"translateY(0)":"translateY(-6px)"}},Ge=V(Pe,L?.dropdown),Ne={padding:"0.625rem 0.75rem",minHeight:"2.75rem",fontSize:"0.875rem",cursor:"pointer",transition:"background-color 0.15s ease",display:"flex",alignItems:"center",lineHeight:"1.375rem",boxSizing:"border-box"},oe={position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:4,pointerEvents:"none"},Re={display:"flex",alignItems:"center",justifyContent:"center",width:28,height:28,margin:-4,borderRadius:"50%",border:"none",backgroundColor:"transparent",color:n.colorTextMuted,cursor:"pointer",padding:0,pointerEvents:"auto",transition:"color 0.15s ease"};let Ze=0;const Fe=je=>{const ve=Ze++,xe=ve===T,U={...Ne,backgroundColor:xe?n.colorBgMuted:void 0,color:je.disabled?n.colorTextSubtle:n.colorText,cursor:je.disabled?"not-allowed":"pointer",opacity:je.disabled?.5:1,...L?.option};return t.jsx("div",{role:"option","aria-selected":xe,"aria-disabled":je.disabled,"data-option-index":ve,style:U,className:I?.option,onClick:()=>he(je),onMouseEnter:de=>{je.disabled||(O(ve),de.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:de=>{!je.disabled&&!xe&&(de.currentTarget.style.backgroundColor="transparent")},children:je.label??je.value},je.value)},et=()=>(Ze=0,Ie.length===0?p===null?null:t.jsx("div",{style:{padding:"0.5rem 0.75rem",fontSize:"0.875rem",color:n.colorTextSubtle,textAlign:"center"},children:p}):ke.map(je=>je.options?t.jsxs("div",{children:[t.jsx("div",{style:{padding:"0.3125rem 0.75rem",fontSize:"0.75rem",color:n.colorTextSubtle,fontWeight:600,userSelect:"none"},children:je.label??je.value}),je.options.map(Fe)]},`group-${je.value}`):Fe(je)));return t.jsxs("div",{ref:le,style:ee,className:Ye(E,I?.root),children:[t.jsx("input",{ref:re,type:"text",role:"combobox","aria-expanded":ze,"aria-haspopup":"listbox","aria-autocomplete":"list",autoComplete:"off",value:F,placeholder:s,disabled:c,style:ce,className:I?.input,onChange:me,onFocus:Le,onBlur:De,onKeyDown:we}),R&&t.jsx("span",{style:{position:"absolute",left:10,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",color:n.colorTextMuted,pointerEvents:"none"},children:R}),(S||u&&F&&!c)&&t.jsxs("span",{style:oe,children:[u&&F&&!c&&t.jsx("button",{type:"button",style:Re,onMouseDown:je=>je.preventDefault(),onClick:Oe,onMouseEnter:je=>{je.currentTarget.style.color=n.colorText,je.currentTarget.style.backgroundColor=n.colorBgMuted},onMouseLeave:je=>{je.currentTarget.style.color=n.colorTextMuted,je.currentTarget.style.backgroundColor="transparent"},tabIndex:-1,"aria-label":"Clear",children:t.jsx(xc,{})}),S&&t.jsx("span",{style:{display:"flex",color:n.colorTextMuted},children:S})]}),ze&&t.jsx("div",{ref:q,role:"listbox",style:Ge,className:I?.dropdown,onMouseDown:je=>je.preventDefault(),children:et()})]})}function Cc(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"6 9 12 15 18 9"})})}function vs(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"9 18 15 12 9 6"})})}function kc(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function Cs(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"20 6 9 17 4 12"})})}function ks(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})})}function wc(){return t.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function jc(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{animation:"j-nested-spin 1s linear infinite"},children:t.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})}function Pt(e,r){return r.value?e[r.value]:e.value}function Cr(e,r){return(r.label?e[r.label]:e.label)??Pt(e,r)}function $t(e,r){return r.children?e[r.children]:e.children}function vo(e,r){if(e.isLeaf===!0)return!1;const o=$t(e,r);return!!o&&o.length>0}function Xr(e,r,o){if(e.isLeaf===!0)return!1;const s=$t(e,r);return s&&s.length>0?!0:o}function Jr(e){return typeof e=="string"?e:typeof e=="number"?String(e):""}function tr(e,r,o){return e.find(s=>Pt(s,o)===r)}function Zt(e,r,o){const s=[];let l=e;for(const a of r){const c=tr(l,a,o);if(!c)break;s.push(c);const u=$t(c,o);if(u)l=u;else break}return s}function ws(e,r,o=[]){const s=[];for(const l of e){const a=[...o,l],c=$t(l,r);c&&c.length>0?s.push(...ws(c,r,a)):s.push(a)}return s}function Sc(e,r,o){const s=e.toLowerCase();return r.some(l=>Jr(Cr(l,o)).toLowerCase().includes(s))}function hr(e,r){return e.length===r.length&&e.every((o,s)=>o===r[s])}function pr(e,r){return r.some(o=>hr(o,e))}function wr(e,r,o=[]){const s=Pt(e,r),l=[...o,s],a=$t(e,r);if(a&&a.length>0){const c=[];for(const u of a)c.push(...wr(u,r,l));return c}return[l]}function Yo(e,r,o,s){const l=[];let a=e;for(let c=0;c<s;c++){const u=r[c];if(u===void 0)break;l.push(u);const f=tr(a,u,o);if(f){const d=$t(f,o);d&&(a=d)}}return l}function no(e,r,o,s,l,a){const c=Yo(a,o,l,r),u=$t(e,l);if(!u||u.length===0){const h=Pt(e,l);return pr([...c,h],s)?"checked":"unchecked"}const f=wr(e,l,c),d=f.filter(h=>pr(h,s)).length;return d===0?"unchecked":d===f.length?"checked":"indeterminate"}function Mc(e,r,o){const s=[],l=new Set;function a(c,u){for(const f of c){const d=Pt(f,o),h=[...u,d],g=$t(f,o);if(g&&g.length>0){const m=wr(f,o,u);m.length>0&&m.every(p=>pr(p,e))?(s.push(h),m.forEach(p=>{const b=e.findIndex(v=>hr(v,p));b>=0&&l.add(b)})):a(g,h)}}}return a(r,[]),e.forEach((c,u)=>{l.has(u)||s.push(c)}),s}function Bc({options:e=[],value:r,defaultValue:o,placeholder:s="Seleccionar",open:l,disabled:a=!1,allowClear:c=!0,expandTrigger:u="click",changeOnSelect:f=!1,showSearch:d=!1,variant:h="outlined",status:g,size:m="middle",suffixIcon:x,expandIcon:p,notFoundContent:b="Sin resultados",displayRender:v,fieldNames:j,placement:C="bottomLeft",multiple:w=!1,showCheckedStrategy:y="SHOW_CHILD",maxTagCount:k,maxTagPlaceholder:B,tagRender:R,loadData:S,prefix:E,popupRender:$,onChange:I,onDropdownVisibleChange:L,className:P,style:H,classNames:z,styles:F}){const M={label:j?.label??"label",value:j?.value??"value",children:j?.children??"children"},W=!!S,A=w?[]:o??[],D=r!==void 0,[T,O]=i.useState(A),Y=w?[]:D?r:T,X=w?o??[]:[],[K,G]=i.useState(X),Q=w?D?r:K:[],N=l!==void 0,[le,re]=i.useState(!1),q=N?l:le,[_,J]=i.useState([]),[Te,ke]=i.useState(0),[Ie,fe]=i.useState([]),[ze,me]=i.useState(""),[he,Le]=i.useState(0),[De,Oe]=i.useState(!1),Be=i.useRef(!1),we=i.useRef("keyboard"),[ee,ae]=i.useState(!1),[se,Se]=i.useState(!1),ie=i.useRef(null),ce=i.useRef(null),He=i.useRef(null),Pe=i.useRef(null),Ge=i.useRef(null),Ne=!!d&&ze.length>0,oe=i.useCallback((Me,Xe)=>{D||O(Me),I?.(Me,Xe)},[D,I]),Re=i.useCallback((Me,Xe)=>{D||G(Me),I?.(Me,Xe)},[D,I]),Ze=C.startsWith("top"),Fe=i.useCallback(Me=>{N||re(Me),L?.(Me),Me?(ae(Ze),requestAnimationFrame(()=>{requestAnimationFrame(()=>Se(!0))}),!w&&Y.length>0?J([...Y]):w&&Q.length>0?J([...Q[0]]):J([]),me(""),ke(0),fe([])):Se(!1)},[N,L,Y,Q,w,Ze]);i.useLayoutEffect(()=>{if(!q||!ce.current||!ie.current)return;const Me=ce.current.getBoundingClientRect(),Xe=ie.current.getBoundingClientRect(),at=Xe.top,it=window.innerHeight-Xe.bottom;!ee&&Me.bottom>window.innerHeight?at>it&&ae(!0):ee&&Me.top<0&&it>at&&ae(!1)});const et=i.useMemo(()=>w?[]:Zt(e,Y,M),[e,Y,M.label,M.value,M.children,w]),je=i.useMemo(()=>et.map(Me=>Jr(Cr(Me,M))),[et,M.label]),ve=i.useMemo(()=>w||Y.length===0?null:v?v(je,et):je.join(" / "),[w,Y,je,et,v]),xe=i.useMemo(()=>!w||Q.length===0?[]:y==="SHOW_PARENT"?Mc(Q,e,M):Q,[w,Q,y,e,M.label,M.value,M.children]),U=i.useMemo(()=>{const Me=[e];let Xe=e;for(const at of _){const it=tr(Xe,at,M);if(it){const ut=$t(it,M);if(ut&&ut.length>0)Me.push(ut),Xe=ut;else break}else break}return Me},[e,_,M.value,M.children]),de=typeof d=="object"?d:{},ue=i.useMemo(()=>{if(!Ne)return[];const Me=ws(e,M),Xe=de.filter?ut=>de.filter(ze,ut):ut=>Sc(ze,ut,M),at=Me.filter(Xe),it=de.limit!==void 0?de.limit:50;return it===!1?at:at.slice(0,it)},[Ne,ze,e,M.label,M.value,M.children,de.filter,de.limit]);i.useEffect(()=>{if(!q)return;const Me=Xe=>{ie.current&&!ie.current.contains(Xe.target)&&Fe(!1)};return document.addEventListener("mousedown",Me),()=>document.removeEventListener("mousedown",Me)},[q,Fe]),i.useEffect(()=>{q&&d&&Pe.current&&setTimeout(()=>Pe.current?.focus(),50)},[q,d]),i.useEffect(()=>()=>{Ge.current&&clearTimeout(Ge.current)},[]);const We=()=>{a||Fe(!q)},$e=Me=>{a||(Me.key==="Enter"||Me.key===" "?(Me.preventDefault(),Fe(!q)):Me.key==="Escape"&&q?(Me.preventDefault(),Fe(!1)):q&&!Ne&&Ct(Me))},ne=(Me,Xe)=>{const at=Pt(Xe,M);if(J(it=>{const ut=it.slice(0,Me);return ut[Me]=at,ut}),S){const it=$t(Xe,M);if(!it||it.length===0){const ut=[];let ht=e;for(let bt=0;bt<Me;bt++){const Bt=tr(ht,_[bt],M);if(Bt){ut.push(Bt);const It=$t(Bt,M);It&&(ht=It)}}ut.push(Xe),S(ut)}}},be=Me=>{const Xe=Me.map(at=>Pt(at,M));oe(Xe,Me),Fe(!1),He.current?.focus()},Ke=i.useCallback((Me,Xe)=>{if(Xe.disabled||Xe.disableCheckbox)return;const at=Yo(e,_,M,Me),it=Pt(Xe,M),ut=$t(Xe,M);let ht;ut&&ut.length>0?ht=wr(Xe,M,at).filter(Et=>{const ye=Zt(e,Et,M),Je=ye[ye.length-1];return Je&&!Je.disabled&&!Je.disableCheckbox}):ht=[[...at,it]];const bt=no(Xe,Me,_,Q,M,e);let Bt;if(bt==="checked")Bt=Q.filter(Et=>!ht.some(ye=>hr(Et,ye)));else{const Et=ht.filter(ye=>!pr(ye,Q));Bt=[...Q,...Et]}const It=Bt.map(Et=>Zt(e,Et,M));Re(Bt,It)},[e,_,M,Q,Re]),Qe=(Me,Xe)=>{if(Xe.disabled)return;const at=Xr(Xe,M,W);if(w){at&&ne(Me,Xe),Xe.disableCheckbox||Ke(Me,Xe);return}if(at){if(ne(Me,Xe),f){const it=[];let ut=e;for(let bt=0;bt<Me;bt++){const Bt=tr(ut,_[bt],M);if(Bt){it.push(Bt);const It=$t(Bt,M);It&&(ut=It)}}it.push(Xe);const ht=it.map(bt=>Pt(bt,M));oe(ht,it)}}else{const it=[];let ut=e;for(let ht=0;ht<Me;ht++){const bt=tr(ut,_[ht],M);if(bt){it.push(bt);const Bt=$t(bt,M);Bt&&(ut=Bt)}}it.push(Xe),be(it)}},tt=(Me,Xe)=>{u!=="hover"||Xe.disabled||(Ge.current&&clearTimeout(Ge.current),Ge.current=window.setTimeout(()=>{Xr(Xe,M,W)&&ne(Me,Xe)},150))},dt=Me=>{if(w){const Xe=Me.map(ht=>Pt(ht,M)),at=pr(Xe,Q);let it;at?it=Q.filter(ht=>!hr(ht,Xe)):it=[...Q,Xe];const ut=it.map(ht=>Zt(e,ht,M));Re(it,ut)}else be(Me)},ft=Me=>{Me.stopPropagation(),w?Re([],[]):oe([],[]),J([]),He.current?.focus()},gt=Me=>{const Xe=Zt(e,Me,M),at=Xe[Xe.length-1];if(at){const ht=$t(at,M);if(ht&&ht.length>0){const bt=Me.slice(0,-1),Bt=wr(at,M,bt),It=Q.filter(ye=>!Bt.some(Je=>hr(ye,Je))),Et=It.map(ye=>Zt(e,ye,M));Re(It,Et);return}}const it=Q.filter(ht=>!hr(ht,Me)),ut=it.map(ht=>Zt(e,ht,M));Re(it,ut)},Ct=Me=>{const Xe=Te,at=U[Xe];if(!at)return;const it=Ie[Xe]??-1;switch(Me.key){case"ArrowDown":{Me.preventDefault();let ut=it;for(let ht=0;ht<at.length&&(ut=(ut+1)%at.length,!!at[ut].disabled);ht++);fe(ht=>{const bt=[...ht];return bt[Xe]=ut,bt});break}case"ArrowUp":{Me.preventDefault();let ut=it<0?at.length:it;for(let ht=0;ht<at.length&&(ut=(ut-1+at.length)%at.length,!!at[ut].disabled);ht++);fe(ht=>{const bt=[...ht];return bt[Xe]=ut,bt});break}case"ArrowRight":{if(Me.preventDefault(),it>=0&&it<at.length){const ut=at[it];Xr(ut,M,W)&&!ut.disabled&&(ne(Xe,ut),ke(Xe+1),fe(ht=>{const bt=[...ht];return bt[Xe+1]=0,bt}))}break}case"ArrowLeft":{Me.preventDefault(),Xe>0&&ke(Xe-1);break}case"Enter":{Me.preventDefault(),it>=0&&it<at.length&&Qe(Xe,at[it]);break}}},jt=Me=>{if(Me.key==="Escape"){Me.preventDefault(),Fe(!1),He.current?.focus();return}if(!(!Ne||ue.length===0))switch(Me.key){case"ArrowDown":Me.preventDefault(),Le(Xe=>Math.min(Xe+1,ue.length-1));break;case"ArrowUp":Me.preventDefault(),Le(Xe=>Math.max(Xe-1,0));break;case"Enter":Me.preventDefault(),ue[he]&&dt(ue[he]);break}};i.useEffect(()=>{Le(0)},[ue.length]);const ge={large:{height:"2.5rem",fontSize:"1rem",padding:"0.5rem 0.75rem",tagLineHeight:"1.75rem"},middle:{height:"2.25rem",fontSize:"0.875rem",padding:"0.375rem 0.75rem",tagLineHeight:"1.5rem"},small:{height:"1.75rem",fontSize:"0.875rem",padding:"0.125rem 0.5rem",tagLineHeight:"1rem"}}[m],_e=V({position:"relative",display:"inline-block",width:"100%"},F?.root,H),qe={outlined:{border:`1px solid ${n.colorBorder}`,backgroundColor:n.colorBg},filled:{border:"1px solid transparent",backgroundColor:n.colorBgMuted},borderless:{border:"1px solid transparent",backgroundColor:"transparent"}},st=g==="error"?n.colorError:g==="warning"?n.colorWarning:void 0,rt=g==="error"?n.colorErrorBg:g==="warning"?n.colorWarningBg:n.colorPrimaryLight,xt=w?Q.length>0:Y.length>0,Rt={display:"flex",alignItems:w?"flex-start":"center",flexWrap:w?"wrap":void 0,width:"100%",height:w?"auto":ge.height,minHeight:w?ge.height:void 0,padding:ge.padding,paddingRight:"2rem",fontSize:ge.fontSize,fontFamily:"inherit",borderRadius:"0.375rem",cursor:a?"not-allowed":"pointer",userSelect:"none",outline:"none",transition:"border-color 0.2s ease, box-shadow 0.2s ease",color:a?n.colorTextSubtle:st||n.colorText,...qe[h],borderColor:De&&!a?st||n.colorPrimary:st||(h==="outlined"?n.colorBorder:"transparent"),boxShadow:De&&!a&&we.current==="keyboard"?`0 0 0 2px ${rt}`:"none",...a?{opacity:.6}:{}},Lt=V(Rt,F?.selector),pe=C.endsWith("Right"),Z={position:"absolute",zIndex:1050,left:pe?void 0:0,right:pe?0:void 0,opacity:se?1:0,transition:"opacity 0.15s ease-out, transform 0.15s ease-out",backgroundColor:n.colorBg,border:`1px solid ${n.colorBorder}`,borderRadius:"0.5rem",boxShadow:n.shadowMd,overflow:"hidden",...ee?{bottom:"100%",marginBottom:"0.25rem",transform:se?"translateY(0)":"translateY(6px)"}:{top:"100%",marginTop:"0.25rem",transform:se?"translateY(0)":"translateY(-6px)"}},te=V(Z,F?.dropdown),Ee={minWidth:"7.5rem",maxHeight:"16rem",overflowY:"auto",padding:"0.25rem 0"},Ve={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0.375rem 0.75rem",fontSize:"0.875rem",cursor:"pointer",transition:"background-color 0.15s ease",lineHeight:"1.375rem",whiteSpace:"nowrap"},Ue={position:"absolute",right:"0.5rem",top:w?"0.625rem":"50%",transform:w?void 0:"translateY(-50%)",display:"flex",alignItems:"center",gap:"0.25rem",pointerEvents:"none"},nt={display:"flex",alignItems:"center",justifyContent:"center",width:"1.25rem",height:"1.25rem",borderRadius:"50%",border:"none",backgroundColor:"transparent",color:n.colorTextMuted,cursor:"pointer",padding:0,pointerEvents:"auto",transition:"color 0.15s ease, background-color 0.15s ease"},mt={width:"100%",padding:"0.375rem 0.75rem",fontSize:"0.875rem",fontFamily:"inherit",border:"none",borderBottom:`1px solid ${n.colorBorder}`,outline:"none",backgroundColor:"transparent",color:n.colorText},Tt={display:"inline-flex",alignItems:"center",padding:"1px 0.5rem",fontSize:"0.75rem",lineHeight:"1.25rem",backgroundColor:n.colorBgMuted,borderRadius:"0.25rem",maxWidth:"12.5rem",border:`1px solid ${n.colorBorder}`},Ae=(Me,Xe)=>{const at={display:"inline-flex",alignItems:"center",justifyContent:"center",width:"1rem",height:"1rem",borderRadius:"0.1875rem",border:`1.5px solid ${Me!=="unchecked"?n.colorPrimary:n.colorBorder}`,backgroundColor:Me!=="unchecked"?n.colorPrimary:"transparent",color:"#fff",marginRight:"0.5rem",flexShrink:0,transition:"all 0.15s ease",cursor:Xe?"not-allowed":"pointer",opacity:Xe?.5:1};return t.jsxs("span",{style:at,children:[Me==="checked"&&t.jsx(Cs,{}),Me==="indeterminate"&&t.jsx(ks,{})]})},Ce=()=>{if(xe.length===0)return t.jsx("span",{style:{color:n.colorTextSubtle,flex:1,lineHeight:ge.tagLineHeight},children:s});const Me=k!==void 0?Math.min(k,xe.length):xe.length,Xe=xe.slice(0,Me),at=xe.slice(Me);return t.jsxs("span",{style:{display:"flex",flexWrap:"wrap",gap:"0.25rem",flex:1,overflow:"hidden",alignItems:"center"},children:[Xe.map((it,ut)=>{const Bt=Zt(e,it,M).map(ye=>Jr(Cr(ye,M))).join(" / "),It=!a,Et=()=>gt(it);return R?t.jsx("span",{children:R({label:Bt,value:it,closable:It,onClose:Et})},ut):t.jsxs("span",{style:Tt,children:[t.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:Bt}),It&&t.jsx("span",{style:{display:"inline-flex",cursor:"pointer",marginLeft:"0.25rem",color:n.colorTextMuted},onClick:ye=>{ye.stopPropagation(),Et()},onMouseDown:ye=>ye.preventDefault(),children:t.jsx(wc,{})})]},ut)}),at.length>0&&t.jsx("span",{style:Tt,children:typeof B=="function"?B(at):B??`+${at.length}`})]})},ot=(Me,Xe,at)=>{const it=Pt(Me,M),ut=Cr(Me,M),ht=Xr(Me,M,W),bt=!w&&Y[Xe]===it,Bt=Te===Xe&&Ie[Xe]===at,It={...Ve,backgroundColor:Bt?n.colorBgMuted:bt?n.colorPrimaryBg:void 0,color:Me.disabled?n.colorTextSubtle:bt?n.colorPrimary:n.colorText,fontWeight:bt?600:void 0,cursor:Me.disabled?"not-allowed":"pointer",opacity:Me.disabled?.5:1,...F?.option};return t.jsxs("div",{role:"option","aria-selected":bt,"aria-disabled":Me.disabled,style:It,className:z?.option,onClick:()=>Qe(Xe,Me),onMouseEnter:Et=>{Me.disabled||(!bt&&!Bt&&(Et.currentTarget.style.backgroundColor=n.colorBgMuted),tt(Xe,Me))},onMouseLeave:Et=>{!Me.disabled&&!bt&&!Bt&&(Et.currentTarget.style.backgroundColor="transparent")},children:[w&&Ae(no(Me,Xe,_,Q,M,e),!!Me.disabled||!!Me.disableCheckbox),t.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:ut}),ht&&t.jsx("span",{style:{display:"flex",marginLeft:"0.5rem",color:n.colorTextMuted,flexShrink:0},children:Me.loading?t.jsx(jc,{}):p??t.jsx(vs,{})})]},String(it))},pt=Ne?ue.length===0?t.jsx("div",{style:{padding:"0.5rem 0.75rem",fontSize:"0.875rem",color:n.colorTextSubtle,textAlign:"center"},children:b}):t.jsx("div",{style:{...Ee,...F?.menu},className:z?.menu,children:ue.map((Me,Xe)=>{const at=Xe===he,it=Me.map(It=>Jr(Cr(It,M))),ut=de.render?de.render(ze,Me):Ic(it.join(" / "),ze),ht=Me.map(It=>Pt(It,M)),bt=w&&pr(ht,Q),Bt={...Ve,backgroundColor:at?n.colorBgMuted:void 0,...F?.option};return t.jsxs("div",{role:"option","aria-selected":at,style:Bt,className:z?.option,onClick:()=>dt(Me),onMouseEnter:It=>{Le(Xe),at||(It.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:It=>{at||(It.currentTarget.style.backgroundColor="transparent")},children:[w&&Ae(bt?"checked":"unchecked",!1),t.jsx("span",{style:{flex:1},children:ut})]},Xe)})}):t.jsx("div",{style:{display:"flex"},children:U.map((Me,Xe)=>{const at=Xe===U.length-1,it={...Ee,borderRight:at?void 0:`1px solid ${n.colorBorder}`,...F?.menu};return t.jsx("div",{style:it,className:z?.menu,children:Me.map((ut,ht)=>ot(ut,Xe,ht))},Xe)})});return t.jsxs("div",{ref:ie,style:_e,className:Ye(P,z?.root),children:[t.jsx("style",{children:"@keyframes j-nested-spin { to { transform: rotate(360deg); } }"}),t.jsxs("div",{ref:He,role:"combobox","aria-expanded":q,"aria-haspopup":"listbox",tabIndex:a?-1:0,style:Lt,className:z?.selector,onClick:We,onKeyDown:$e,onMouseDown:()=>{Be.current=!0},onFocus:()=>{we.current=Be.current?"mouse":"keyboard",Be.current=!1,Oe(!0)},onBlur:()=>Oe(!1),children:[E&&t.jsx("span",{style:{display:"flex",alignItems:"center",marginRight:"0.5rem",flexShrink:0},children:E}),w?Ce():ve?t.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},children:ve}):t.jsx("span",{style:{color:n.colorTextSubtle,flex:1},children:s})]}),t.jsxs("span",{style:Ue,children:[c&&xt&&!a&&t.jsx("button",{type:"button",style:nt,onMouseDown:Me=>Me.preventDefault(),onClick:ft,onMouseEnter:Me=>{Me.currentTarget.style.color=n.colorText,Me.currentTarget.style.backgroundColor=n.colorBgMuted},onMouseLeave:Me=>{Me.currentTarget.style.color=n.colorTextMuted,Me.currentTarget.style.backgroundColor="transparent"},tabIndex:-1,"aria-label":"Clear",children:t.jsx(kc,{})}),t.jsx("span",{style:{display:"flex",color:n.colorTextMuted,pointerEvents:"none"},children:x??t.jsx(Cc,{})})]}),q&&t.jsxs("div",{ref:ce,style:te,className:z?.dropdown,onMouseDown:Me=>Me.preventDefault(),children:[d&&t.jsx("input",{ref:Pe,type:"text",placeholder:"Buscar...",value:ze,onChange:Me=>me(Me.target.value),onKeyDown:jt,style:mt,autoComplete:"off"}),$?$(pt):pt]})]})}function Rc({options:e=[],value:r,defaultValue:o,onChange:s,multiple:l=!1,expandTrigger:a="click",changeOnSelect:c=!1,fieldNames:u,expandIcon:f,disabled:d=!1,className:h,style:g,classNames:m,styles:x}){const p={label:u?.label??"label",value:u?.value??"value",children:u?.children??"children"},b=r!==void 0,v=l?[]:o??[],[j,C]=i.useState(v),w=l?[]:b?r:j,y=l?o??[]:[],[k,B]=i.useState(y),R=l?b?r:k:[],[S,E]=i.useState(!l&&w.length>0?[...w]:[]),$=-1,I=[],L=i.useRef(null);i.useEffect(()=>()=>{L.current&&clearTimeout(L.current)},[]);const P=i.useMemo(()=>{const K=[e];let G=e;for(const Q of S){const N=tr(G,Q,p);if(N){const le=$t(N,p);if(le&&le.length>0)K.push(le),G=le;else break}else break}return K},[e,S,p.value,p.children]),H=i.useCallback((K,G)=>{b||C(K),s?.(K,G)},[b,s]),z=i.useCallback((K,G)=>{b||B(K),s?.(K,G)},[b,s]),F=(K,G)=>{const Q=Pt(G,p);E(N=>{const le=N.slice(0,K);return le[K]=Q,le})},M=i.useCallback((K,G)=>{if(G.disabled||G.disableCheckbox)return;const Q=Yo(e,S,p,K),N=Pt(G,p),le=$t(G,p);let re;le&&le.length>0?re=wr(G,p,Q).filter(Te=>{const ke=Zt(e,Te,p),Ie=ke[ke.length-1];return Ie&&!Ie.disabled&&!Ie.disableCheckbox}):re=[[...Q,N]];const q=no(G,K,S,R,p,e);let _;if(q==="checked")_=R.filter(Te=>!re.some(ke=>hr(Te,ke)));else{const Te=re.filter(ke=>!pr(ke,R));_=[...R,...Te]}const J=_.map(Te=>Zt(e,Te,p));z(_,J)},[e,S,p,R,z]),W=(K,G)=>{if(d||G.disabled)return;const Q=vo(G,p);if(l){Q&&F(K,G),G.disableCheckbox||M(K,G);return}if(Q){if(F(K,G),c){const N=[];let le=e;for(let q=0;q<K;q++){const _=tr(le,S[q],p);if(_){N.push(_);const J=$t(_,p);J&&(le=J)}}N.push(G);const re=N.map(q=>Pt(q,p));H(re,N)}}else{const N=[];let le=e;for(let q=0;q<K;q++){const _=tr(le,S[q],p);if(_){N.push(_);const J=$t(_,p);J&&(le=J)}}N.push(G);const re=N.map(q=>Pt(q,p));H(re,N)}},A=(K,G)=>{a!=="hover"||d||G.disabled||(L.current&&clearTimeout(L.current),L.current=window.setTimeout(()=>{vo(G,p)&&F(K,G)},150))},D=(K,G)=>{const Q={display:"inline-flex",alignItems:"center",justifyContent:"center",width:"1rem",height:"1rem",borderRadius:"0.1875rem",border:`1.5px solid ${K!=="unchecked"?n.colorPrimary:n.colorBorder}`,backgroundColor:K!=="unchecked"?n.colorPrimary:"transparent",color:"#fff",marginRight:"0.5rem",flexShrink:0,transition:"all 0.15s ease",cursor:G?"not-allowed":"pointer",opacity:G?.5:1};return t.jsxs("span",{style:Q,children:[K==="checked"&&t.jsx(Cs,{}),K==="indeterminate"&&t.jsx(ks,{})]})},T={minWidth:"7.5rem",maxHeight:"16rem",overflowY:"auto",padding:"0.25rem 0"},O={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0.375rem 0.75rem",fontSize:"0.875rem",cursor:d?"not-allowed":"pointer",transition:"background-color 0.15s ease",lineHeight:"1.375rem",whiteSpace:"nowrap"},Y={display:"inline-flex",backgroundColor:n.colorBg,border:`1px solid ${n.colorBorder}`,borderRadius:"0.5rem",overflow:"hidden",...g},X=(K,G,Q)=>{const N=Pt(K,p),le=Cr(K,p),re=vo(K,p),q=!l&&w[G]===N,_=$===G&&I[G]===Q,J=d||!!K.disabled,Te={...O,backgroundColor:_?n.colorBgMuted:q?n.colorPrimaryBg:void 0,color:J?n.colorTextSubtle:q?n.colorPrimary:n.colorText,fontWeight:q?600:void 0,cursor:J?"not-allowed":"pointer",opacity:J?.5:1,...x?.option};return t.jsxs("div",{role:"option","aria-selected":q,"aria-disabled":J,style:Te,className:m?.option,onClick:()=>W(G,K),onMouseEnter:ke=>{J||(!q&&!_&&(ke.currentTarget.style.backgroundColor=n.colorBgMuted),A(G,K))},onMouseLeave:ke=>{!J&&!q&&!_&&(ke.currentTarget.style.backgroundColor="transparent")},children:[l&&D(no(K,G,S,R,p,e),J||!!K.disableCheckbox),t.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:le}),re&&t.jsx("span",{style:{display:"flex",marginLeft:"0.5rem",color:n.colorTextMuted,flexShrink:0},children:f??t.jsx(vs,{})})]},String(N))};return t.jsx("div",{style:V(Y,x?.root),className:Ye(h,m?.root),children:P.map((K,G)=>{const Q=G===P.length-1,N={...T,borderRight:Q?void 0:`1px solid ${n.colorBorder}`,...x?.menu};return t.jsx("div",{style:N,className:m?.menu,children:K.map((le,re)=>X(le,G,re))},G)})})}const Tc=Object.assign(Bc,{Panel:Rc,SHOW_PARENT:"SHOW_PARENT",SHOW_CHILD:"SHOW_CHILD"});function Ic(e,r){if(!r)return e;const o=e.toLowerCase().indexOf(r.toLowerCase());return o===-1?e:t.jsxs(t.Fragment,{children:[e.slice(0,o),t.jsx("strong",{style:{color:n.colorPrimary},children:e.slice(o,o+r.length)}),e.slice(o+r.length)]})}function Lc(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"2 5.5 4 7.5 8 3"})})}function Ec(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("line",{x1:"2.5",y1:"5",x2:"7.5",y2:"5"})})}const js=i.createContext(null);function Ss({checked:e,defaultChecked:r=!1,disabled:o=!1,indeterminate:s=!1,autoFocus:l=!1,onChange:a,value:c,children:u,id:f,name:d,tabIndex:h,className:g,style:m,classNames:x,styles:p}){const b=i.useRef(null),v=i.useRef(null),j=i.useRef(!1),C=i.useRef("keyboard"),w=i.useContext(js),y=w!==null,k=e!==void 0,[B,R]=i.useState(r);let S,E,$;y?(S=c!==void 0&&w.value.includes(c),E=o||w.disabled,$=w.name||d):(S=k?e:B,E=o,$=d);const[I,L]=i.useState(!1);i.useEffect(()=>{b.current&&(b.current.indeterminate=s)},[s]),i.useEffect(()=>{l&&b.current&&b.current.focus()},[]);const P=O=>{if(!E)if(y&&c!==void 0)w.toggleValue(c);else{const Y=O.target.checked;k||R(Y),a?.({target:{checked:Y,value:c},nativeEvent:O.nativeEvent})}},H=!!(p?.checkbox&&("backgroundColor"in p.checkbox||"borderColor"in p.checkbox||"border"in p.checkbox)),z=()=>{E||!v.current||(H?v.current.style.filter="brightness(1.15)":S||s?(v.current.style.backgroundColor=n.colorPrimaryHover,v.current.style.borderColor=n.colorPrimaryHover):v.current.style.borderColor=n.colorPrimary)},F=()=>{E||!v.current||(H?v.current.style.filter="":S||s?(v.current.style.backgroundColor=n.colorPrimary,v.current.style.borderColor=n.colorPrimary):v.current.style.borderColor=n.colorBorder)},M=S||s,W={display:"inline-flex",alignItems:"center",gap:"0.5rem",minHeight:"2.75rem",cursor:E?"not-allowed":"pointer",userSelect:"none",lineHeight:1,...E?{opacity:.5}:{}},A={position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:"1rem",height:"1rem",borderRadius:"0.25rem",border:`2px solid ${M||I?n.colorPrimary:n.colorBorder}`,backgroundColor:M?n.colorPrimary:"transparent",color:"#fff",transition:"border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease",flexShrink:0,boxShadow:I&&!E&&C.current==="keyboard"?`0 0 0 2px ${n.colorPrimaryLight}`:"none"},D={position:"absolute",opacity:0,width:0,height:0,margin:0,padding:0,overflow:"hidden"},T={fontSize:"0.875rem",lineHeight:"1.375rem",color:E?n.colorTextSubtle:n.colorText};return t.jsxs("label",{className:Ye(g,x?.root),style:V(W,p?.root,m),onMouseDown:()=>{j.current=!0},onMouseEnter:z,onMouseLeave:F,children:[t.jsxs("span",{ref:v,className:x?.checkbox,style:V(A,p?.checkbox),children:[t.jsx("input",{ref:b,type:"checkbox",id:f,name:$,checked:S,disabled:E,tabIndex:h,onChange:P,onFocus:()=>{C.current=j.current?"mouse":"keyboard",j.current=!1,L(!0)},onBlur:()=>L(!1),style:D,value:c!==void 0?String(c):void 0}),M&&t.jsx("span",{className:x?.indicator,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",...p?.indicator},children:s?t.jsx(Ec,{}):t.jsx(Lc,{})})]}),u!=null&&t.jsx("span",{className:x?.label,style:V(T,p?.label),children:u})]})}function $c({options:e,value:r,defaultValue:o=[],disabled:s=!1,name:l,onChange:a,children:c,className:u,style:f,classNames:d,styles:h}){const g=r!==void 0,[m,x]=i.useState(o),p=g?r:m,b=i.useCallback(C=>{const w=p.includes(C)?p.filter(y=>y!==C):[...p,C];g||x(w),a?.(w)},[p,g,a]),v={value:p,disabled:s,name:l,toggleValue:b},j=e?.map(C=>typeof C=="string"||typeof C=="number"?{label:String(C),value:C}:C);return t.jsx(js.Provider,{value:v,children:t.jsx("div",{role:"group",className:Ye(u,d?.root),style:V({display:"inline-flex",flexWrap:"wrap",gap:"0.5rem",alignItems:"center"},h?.root,f),children:j?j.map(C=>t.jsx(Ss,{value:C.value,disabled:C.disabled,className:C.className,style:C.style,children:C.label},String(C.value))):c})})}const Er=Object.assign(Ss,{Group:$c});function Ms(){return t.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[t.jsx("line",{x1:"3",y1:"3",x2:"9",y2:"9"}),t.jsx("line",{x1:"9",y1:"3",x2:"3",y2:"9"})]})}function At(e,r,o){return Math.max(r,Math.min(o,e))}function gr(e,r,o){const s=r/100,l=o/100,a=u=>(u+e/60)%6,c=u=>l*(1-s*Math.max(0,Math.min(a(u),4-a(u),1)));return{r:Math.round(c(5)*255),g:Math.round(c(3)*255),b:Math.round(c(1)*255)}}function $r(e,r,o){const s=e/255,l=r/255,a=o/255,c=Math.max(s,l,a),u=Math.min(s,l,a),f=c-u;let d=0;if(f!==0)switch(c){case s:d=((l-a)/f+(l<a?6:0))*60;break;case l:d=((a-s)/f+2)*60;break;case a:d=((s-l)/f+4)*60;break}return{h:Math.round(d),s:Math.round(c===0?0:f/c*100),b:Math.round(c*100)}}function Eo(e){let r=e.replace("#","");return r.length===3&&(r=r[0]+r[0]+r[1]+r[1]+r[2]+r[2]),r.length===4&&(r=r[0]+r[0]+r[1]+r[1]+r[2]+r[2]+r[3]+r[3]),{r:parseInt(r.slice(0,2),16)||0,g:parseInt(r.slice(2,4),16)||0,b:parseInt(r.slice(4,6),16)||0,a:r.length===8?Math.round(parseInt(r.slice(6,8),16)/255*100)/100:1}}function cr(e){const{r,g:o,b:s}=gr(e.h,e.s,e.b),l="#"+[r,o,s].map(a=>a.toString(16).padStart(2,"0")).join("");return e.a<1?l+Math.round(e.a*255).toString(16).padStart(2,"0"):l}function Pc(e){const{r,g:o,b:s}=gr(e.h,e.s,e.b);return e.a<1?`rgba(${r}, ${o}, ${s}, ${Math.round(e.a*100)/100})`:`rgb(${r}, ${o}, ${s})`}function Dc(e){return e.a<1?`hsba(${Math.round(e.h)}, ${Math.round(e.s)}%, ${Math.round(e.b)}%, ${Math.round(e.a*100)/100})`:`hsb(${Math.round(e.h)}, ${Math.round(e.s)}%, ${Math.round(e.b)}%)`}function Gr(e){return{h:e.h,s:e.s,b:e.b,a:e.a,toHexString(){return cr(this)},toRgbString(){return Pc(this)},toHsbString(){return Dc(this)},toRgb(){return{...gr(this.h,this.s,this.b),a:this.a}},toHsb(){return{h:this.h,s:this.s,b:this.b,a:this.a}}}}function lr(e){if(!e)return{h:0,s:100,b:100,a:1};if(typeof e=="object"&&"h"in e)return{h:e.h,s:e.s,b:e.b,a:e.a};const r=String(e).trim();if(r.startsWith("#")){const l=Eo(r);return{...$r(l.r,l.g,l.b),a:l.a}}const o=r.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/);if(o)return{...$r(+o[1],+o[2],+o[3]),a:o[4]!==void 0?parseFloat(o[4]):1};const s=r.match(/hsba?\(\s*(\d+)\s*,\s*(\d+)%?\s*,\s*(\d+)%?\s*(?:,\s*([\d.]+))?\s*\)/);return s?{h:+s[1],s:+s[2],b:+s[3],a:s[4]!==void 0?parseFloat(s[4]):1}:/^[0-9a-f]{3,8}$/i.test(r)?lr("#"+r):{h:0,s:100,b:100,a:1}}function zc(e,r){return e.h===r.h&&e.s===r.s&&e.b===r.b&&e.a===r.a}function Co(e){return Array.isArray(e)&&e.length>0&&typeof e[0]=="object"&&e[0]!==null&&"percent"in e[0]}function mn(e){return e.map(r=>({color:lr(r.color),percent:r.percent}))}function ur(e,r){const s=[...e].sort((l,a)=>l.percent-a.percent).map(l=>`${cr(l.color)} ${l.percent}%`).join(", ");return`linear-gradient(${r}deg, ${s})`}function xr(e){return e.map(r=>({color:cr(r.color),percent:r.percent}))}function Wc(e,r){const o=[...e].sort((c,u)=>c.percent-u.percent);if(o.length===0)return{h:0,s:100,b:100,a:1};if(r<=o[0].percent)return{...o[0].color};if(r>=o[o.length-1].percent)return{...o[o.length-1].color};let s=o[0],l=o[o.length-1];for(let c=0;c<o.length-1;c++)if(r>=o[c].percent&&r<=o[c+1].percent){s=o[c],l=o[c+1];break}const a=l.percent===s.percent?0:(r-s.percent)/(l.percent-s.percent);return{h:Math.round(s.color.h+(l.color.h-s.color.h)*a),s:Math.round(s.color.s+(l.color.s-s.color.s)*a),b:Math.round(s.color.b+(l.color.b-s.color.b)*a),a:Math.round((s.color.a+(l.color.a-s.color.a)*a)*100)/100}}function Ko(e,r,o){const s=i.useRef(r),l=i.useRef(o);s.current=r,l.current=o;const a=i.useRef(!1);return i.useEffect(()=>{const c=f=>{if(!a.current||!e.current)return;f.preventDefault();const d=e.current.getBoundingClientRect();s.current(At((f.clientX-d.left)/d.width,0,1),At((f.clientY-d.top)/d.height,0,1))},u=()=>{a.current&&(a.current=!1,l.current())};return document.addEventListener("mousemove",c),document.addEventListener("mouseup",u),()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u)}},[e]),c=>{if(c.preventDefault(),a.current=!0,!e.current)return;const u=e.current.getBoundingClientRect();s.current(At((c.clientX-u.left)/u.width,0,1),At((c.clientY-u.top)/u.height,0,1))}}function Hc({hue:e,saturation:r,brightness:o,onChange:s,onDragEnd:l}){const a=i.useRef(null),c=Ko(a,(f,d)=>s(Math.round(f*100),Math.round((1-d)*100)),l),u=`hsl(${e}, 100%, 50%)`;return t.jsx("div",{ref:a,onMouseDown:c,style:{position:"relative",width:"100%",height:150,borderRadius:4,cursor:"crosshair",overflow:"hidden",background:`linear-gradient(to bottom, transparent 0%, #000 100%), linear-gradient(to right, #fff 0%, ${u} 100%)`},children:t.jsx("div",{style:{position:"absolute",left:`${r}%`,top:`${100-o}%`,width:12,height:12,borderRadius:"50%",border:"2px solid #fff",boxShadow:"0 0 2px rgba(0,0,0,0.4)",transform:"translate(-50%, -50%)",pointerEvents:"none"}})})}function Fc({hue:e,onChange:r,onDragEnd:o}){const s=i.useRef(null),l=Ko(s,a=>r(Math.round(a*360)),o);return t.jsx("div",{ref:s,onMouseDown:l,style:{position:"relative",width:"100%",height:10,borderRadius:5,cursor:"pointer",background:"linear-gradient(to right, hsl(0,100%,50%), hsl(60,100%,50%), hsl(120,100%,50%), hsl(180,100%,50%), hsl(240,100%,50%), hsl(300,100%,50%), hsl(360,100%,50%))"},children:t.jsx("div",{style:{position:"absolute",left:`${e/360*100}%`,top:"50%",width:12,height:12,borderRadius:"50%",border:"2px solid #fff",boxShadow:"0 0 2px rgba(0,0,0,0.3)",transform:"translate(-50%, -50%)",pointerEvents:"none",backgroundColor:`hsl(${e}, 100%, 50%)`}})})}function Ac({color:e,alpha:r,onChange:o,onDragEnd:s}){const l=i.useRef(null),a=Ko(l,g=>o(Math.round(g*100)/100),s),{r:c,g:u,b:f}=gr(e.h,e.s,e.b),d=`rgb(${c}, ${u}, ${f})`,h=["linear-gradient(45deg, #ccc 25%, transparent 25%)","linear-gradient(-45deg, #ccc 25%, transparent 25%)","linear-gradient(45deg, transparent 75%, #ccc 75%)","linear-gradient(-45deg, transparent 75%, #ccc 75%)"].join(", ");return t.jsxs("div",{style:{position:"relative",width:"100%",height:10,borderRadius:5},children:[t.jsx("div",{style:{position:"absolute",inset:0,borderRadius:5,backgroundImage:h,backgroundSize:"8px 8px",backgroundPosition:"0 0, 0 4px, 4px -4px, -4px 0"}}),t.jsx("div",{ref:l,onMouseDown:a,style:{position:"absolute",inset:0,borderRadius:5,cursor:"pointer",background:`linear-gradient(to right, transparent 0%, ${d} 100%)`},children:t.jsx("div",{style:{position:"absolute",left:`${r*100}%`,top:"50%",width:12,height:12,borderRadius:"50%",border:"2px solid #fff",boxShadow:"0 0 2px rgba(0,0,0,0.3)",transform:"translate(-50%, -50%)",pointerEvents:"none",backgroundColor:d}})})]})}function Oc({color:e,format:r,disabledAlpha:o,onColorChange:s,onFormatChange:l}){const[a,c]=i.useState(cr(e).toUpperCase()),u=i.useRef(e);zc(u.current,e)||(u.current=e,c(cr(e).toUpperCase()));const f=["hex","rgb","hsb"],d=()=>{let y=a.startsWith("#")?a:"#"+a;if(/^#[0-9a-f]{6}$/i.test(y)){const k=Eo(y),B=$r(k.r,k.g,k.b);s({...B,a:e.a})}else if(/^#[0-9a-f]{8}$/i.test(y)){const k=Eo(y),B=$r(k.r,k.g,k.b);s({...B,a:k.a})}else c(cr(e).toUpperCase())},{r:h,g,b:m}=gr(e.h,e.s,e.b),x=(y,k)=>{if(isNaN(k))return;const B=y==="r"?At(k,0,255):h,R=y==="g"?At(k,0,255):g,S=y==="b"?At(k,0,255):m,E=$r(B,R,S);s({...E,a:e.a})},p=(y,k)=>{isNaN(k)||s({h:y==="h"?At(k,0,360):e.h,s:y==="s"?At(k,0,100):e.s,b:y==="b"?At(k,0,100):e.b,a:e.a})},b=y=>{isNaN(y)||s({...e,a:At(y,0,100)/100})},[v,j]=i.useState(!1),C=i.useRef(null);i.useEffect(()=>{if(!v)return;const y=k=>{C.current&&!C.current.contains(k.target)&&j(!1)};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[v]);const w={height:"1.5rem",border:`1px solid ${n.colorBorder}`,borderRadius:"0.25rem",padding:"0 0.25rem",fontSize:"0.75rem",fontFamily:"monospace",textAlign:"center",outline:"none",color:n.colorText,backgroundColor:"transparent",flex:1,minWidth:0};return t.jsxs("div",{style:{display:"flex",gap:"0.25rem",alignItems:"center"},children:[t.jsxs("div",{ref:C,style:{position:"relative",flexShrink:0},children:[t.jsxs("button",{type:"button",onClick:()=>j(!v),style:{height:"1.5rem",padding:"0 0.25rem 0 0.375rem",border:`1px solid ${n.colorBorder}`,borderRadius:"0.25rem",backgroundColor:"transparent",color:n.colorText,cursor:"pointer",fontSize:"0.6875rem",fontWeight:600,display:"flex",alignItems:"center",gap:"0.125rem",fontFamily:"inherit",outline:"none",transition:"border-color 0.15s ease"},onMouseEnter:y=>{y.currentTarget.style.borderColor=n.colorBorderHover},onMouseLeave:y=>{y.currentTarget.style.borderColor=n.colorBorder},children:[r.toUpperCase(),t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:v?"rotate(180deg)":void 0,transition:"transform 0.15s ease"},children:t.jsx("polyline",{points:"3 4 5 6 7 4"})})]}),v&&t.jsx("div",{style:{position:"absolute",top:"100%",left:0,marginTop:"0.125rem",zIndex:10,minWidth:"100%",padding:"0.125rem",borderRadius:"0.375rem",border:`1px solid ${n.colorBorder}`,backgroundColor:n.colorBg,boxShadow:"0 2px 8px rgba(0,0,0,0.15)"},children:f.map(y=>t.jsx("button",{type:"button",onClick:()=>{l(y),j(!1)},onMouseEnter:k=>{k.currentTarget.style.backgroundColor=n.colorBgMuted},onMouseLeave:k=>{k.currentTarget.style.backgroundColor="transparent"},style:{display:"block",width:"100%",padding:"0.25rem 0.5rem",border:"none",borderRadius:"0.25rem",backgroundColor:"transparent",color:y===r?n.colorPrimary:n.colorText,cursor:"pointer",fontSize:"0.6875rem",fontWeight:y===r?700:500,fontFamily:"inherit",textAlign:"left",transition:"background-color 0.1s ease"},children:y.toUpperCase()},y))})]}),r==="hex"&&t.jsx("input",{style:{...w,fontFamily:"monospace"},value:a,onChange:y=>c(y.target.value),onBlur:d,onKeyDown:y=>{y.key==="Enter"&&d()}}),r==="rgb"&&t.jsxs(t.Fragment,{children:[t.jsx("input",{style:w,inputMode:"numeric",value:h,onChange:y=>{const k=y.target.value;/^\d*$/.test(k)&&x("r",k===""?0:Math.min(+k,255))}}),t.jsx("input",{style:w,inputMode:"numeric",value:g,onChange:y=>{const k=y.target.value;/^\d*$/.test(k)&&x("g",k===""?0:Math.min(+k,255))}}),t.jsx("input",{style:w,inputMode:"numeric",value:m,onChange:y=>{const k=y.target.value;/^\d*$/.test(k)&&x("b",k===""?0:Math.min(+k,255))}})]}),r==="hsb"&&t.jsxs(t.Fragment,{children:[t.jsx("input",{style:w,inputMode:"numeric",value:Math.round(e.h),onChange:y=>{const k=y.target.value;/^\d*$/.test(k)&&p("h",k===""?0:Math.min(+k,360))}}),t.jsx("input",{style:w,inputMode:"numeric",value:Math.round(e.s),onChange:y=>{const k=y.target.value;/^\d*$/.test(k)&&p("s",k===""?0:Math.min(+k,100))}}),t.jsx("input",{style:w,inputMode:"numeric",value:Math.round(e.b),onChange:y=>{const k=y.target.value;/^\d*$/.test(k)&&p("b",k===""?0:Math.min(+k,100))}})]}),!o&&t.jsxs(t.Fragment,{children:[t.jsx("input",{style:{...w,width:"2.25rem",flex:"none"},inputMode:"numeric",value:Math.round(e.a*100),onChange:y=>{const k=y.target.value;/^\d*$/.test(k)&&b(k===""?0:Math.min(+k,100))}}),t.jsx("span",{style:{fontSize:"0.6875rem",color:n.colorTextMuted,flexShrink:0},children:"%"})]})]})}function Nc({presets:e,onSelect:r}){return t.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"0.5rem"},children:e.map((o,s)=>t.jsxs("div",{children:[o.label&&t.jsx("div",{style:{fontSize:"0.75rem",color:n.colorTextMuted,marginBottom:"0.25rem",fontWeight:500},children:o.label}),t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"0.25rem"},children:o.colors.map((l,a)=>t.jsx("button",{type:"button",onClick:()=>r(l),style:{width:"1.25rem",height:"1.25rem",borderRadius:"0.25rem",padding:0,cursor:"pointer",border:`1px solid ${n.colorBorder}`,backgroundColor:l}},a))})]},s))})}function Vc({stops:e,activeIndex:r,angle:o,onSelectStop:s,onMoveStop:l,onAddStop:a,onRemoveStop:c,onAngleChange:u,onDragEnd:f}){const d=i.useRef(null),h=i.useRef(null),g=i.useRef(l);g.current=l;const m=i.useRef(f);m.current=f,i.useEffect(()=>{const C=y=>{if(h.current===null||!d.current)return;y.preventDefault();const k=d.current.getBoundingClientRect(),B=At((y.clientX-k.left)/k.width*100,0,100);g.current(h.current,Math.round(B))},w=()=>{h.current!==null&&(h.current=null,m.current())};return document.addEventListener("mousemove",C),document.addEventListener("mouseup",w),()=>{document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",w)}},[]);const x=C=>{if(!d.current)return;const w=d.current.getBoundingClientRect(),y=At((C.clientX-w.left)/w.width*100,0,100);a(Math.round(y))},p=(C,w)=>{C.stopPropagation(),C.preventDefault(),h.current=w,s(w)},v=[...e].sort((C,w)=>C.percent-w.percent).map(C=>`${cr(C.color)} ${C.percent}%`).join(", "),j=["linear-gradient(45deg, #ccc 25%, transparent 25%)","linear-gradient(-45deg, #ccc 25%, transparent 25%)","linear-gradient(45deg, transparent 75%, #ccc 75%)","linear-gradient(-45deg, transparent 75%, #ccc 75%)"].join(", ");return t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0.5rem"},children:[t.jsxs("div",{ref:d,onMouseDown:x,style:{position:"relative",height:12,borderRadius:6,cursor:"pointer",marginTop:"0.25rem",marginBottom:"0.25rem"},children:[t.jsx("div",{style:{position:"absolute",inset:0,borderRadius:6,backgroundImage:j,backgroundSize:"8px 8px",backgroundPosition:"0 0, 0 4px, 4px -4px, -4px 0"}}),t.jsx("div",{style:{position:"absolute",inset:0,borderRadius:6,background:`linear-gradient(to right, ${v})`}}),e.map((C,w)=>t.jsx("div",{onMouseDown:y=>p(y,w),style:{position:"absolute",left:`${C.percent}%`,top:"50%",transform:"translate(-50%, -50%)",width:14,height:14,borderRadius:"50%",border:w===r?`2px solid ${n.colorPrimary}`:"2px solid #fff",boxShadow:"0 0 3px rgba(0,0,0,0.3)",backgroundColor:cr(C.color),cursor:"grab",zIndex:w===r?2:1}},w))]}),t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.25rem"},children:[t.jsx("span",{style:{fontSize:"0.6875rem",color:n.colorTextMuted,flexShrink:0},children:"Angle"}),t.jsx("input",{type:"number",min:0,max:360,value:o,onChange:C=>u(At(+C.target.value,0,360)),style:{height:"1.5rem",width:"3rem",border:`1px solid ${n.colorBorder}`,borderRadius:"0.25rem",padding:"0 0.25rem",fontSize:"0.75rem",fontFamily:"monospace",textAlign:"center",outline:"none",color:n.colorText,backgroundColor:"transparent"}}),t.jsx("span",{style:{fontSize:"0.6875rem",color:n.colorTextMuted},children:"°"}),t.jsx("div",{style:{flex:1}}),e.length>2&&t.jsx("button",{type:"button",onClick:()=>c(r),style:{display:"flex",alignItems:"center",justifyContent:"center",width:"1.5rem",height:"1.5rem",padding:0,border:`1px solid ${n.colorBorder}`,borderRadius:"0.25rem",backgroundColor:"transparent",cursor:"pointer",color:n.colorTextMuted},onMouseEnter:C=>{C.currentTarget.style.color="#ff4d4f"},onMouseLeave:C=>{C.currentTarget.style.color=n.colorTextMuted},children:t.jsx(Ms,{})})]})]})}function Yc({modes:e,activeMode:r,onModeChange:o}){return t.jsx("div",{style:{display:"flex",borderRadius:"0.25rem",overflow:"hidden",border:`1px solid ${n.colorBorder}`},children:e.map(s=>t.jsx("button",{type:"button",onClick:()=>o(s),style:{flex:1,padding:"0.25rem 0",border:"none",backgroundColor:s===r?n.colorPrimary:"transparent",color:s===r?"#fff":n.colorText,cursor:"pointer",fontSize:"0.6875rem",fontWeight:600,fontFamily:"inherit",transition:"background-color 0.15s ease, color 0.15s ease"},children:s==="single"?"Single":"Gradient"},s))})}const Kc={sm:{height:"1.5rem",swatch:16,radius:"0.25rem",fontSize:"0.75rem",paddingText:"0 0.6rem 0 0.375rem",paddingIcon:"0.1875rem"},md:{height:"2rem",swatch:20,radius:"0.375rem",fontSize:"0.8125rem",paddingText:"0 0.8rem 0 0.5rem",paddingIcon:"0.3125rem"},lg:{height:"2.5rem",swatch:28,radius:"0.5rem",fontSize:"0.875rem",paddingText:"0 1rem 0 0.625rem",paddingIcon:"0.3125rem"}};function _c({value:e,defaultValue:r="#1677ff",mode:o,onModeChange:s,format:l,defaultFormat:a="hex",disabled:c=!1,disabledAlpha:u=!1,allowClear:f=!1,showText:d,trigger:h="click",placement:g="bottomLeft",size:m="md",open:x,presets:p,panelRender:b,onChange:v,onChangeComplete:j,onGradientChange:C,onFormatChange:w,onOpenChange:y,onClear:k,children:B,className:R,style:S,classNames:E,styles:$}){const I=o?typeof o=="string"?o==="gradient"?["single","gradient"]:["single"]:o:["single"],L=I.length>1,P=typeof o=="string"&&o==="gradient"?"gradient":I[0],[H,z]=i.useState(P),F=I.includes(H)?H:I[0],M=F==="gradient",W=e!==void 0,A=x!==void 0,D=l!==void 0,T=e??r,[O,Y]=i.useState(()=>Co(T)?{h:217,s:91,b:100,a:1}:lr(T)),[X,K]=i.useState(!1),[G,Q]=i.useState(l??a),[N,le]=i.useState(!1),[re,q]=i.useState(!1),_=Co(e),J=W&&_,Te=W&&!_?lr(e):O,ke=A?x:X,Ie=D?l:G,[fe,ze]=i.useState(()=>Co(T)?mn(T):[{color:{...lr(T)},percent:0},{color:{h:0,s:0,b:100,a:1},percent:100}]),[me,he]=i.useState(90),[Le,De]=i.useState(0),Oe=i.useRef(null),Be=J?mn(e):fe,we=Math.min(Le,Be.length-1),ee=M?Be[we]?.color??{h:0,s:100,b:100,a:1}:Te,ae=i.useRef(Be);ae.current=Be;const se=i.useRef(me);se.current=me;const Se=i.useRef(we);Se.current=we;const[ie,ce]=i.useState(g),He=i.useRef(null),Pe=i.useRef(null),Ge=i.useRef(null);i.useEffect(()=>{ke&&(le(!1),requestAnimationFrame(()=>{requestAnimationFrame(()=>le(!0))}))},[ke]),i.useEffect(()=>{if(!ke)return;const te=Ee=>{He.current?.contains(Ee.target)||Pe.current?.contains(Ee.target)||Ne(!1)};return document.addEventListener("mousedown",te),()=>document.removeEventListener("mousedown",te)},[ke]),i.useEffect(()=>()=>{Ge.current&&clearTimeout(Ge.current)},[]),i.useLayoutEffect(()=>{if(!ke||!Pe.current||!He.current)return;const te=Pe.current.getBoundingClientRect(),Ee=He.current.getBoundingClientRect(),Ve=Ee.top,Ue=window.innerHeight-Ee.bottom,nt=ie.startsWith("top");!nt&&te.bottom>window.innerHeight?Ve>Ue&&ce(mt=>mt.replace("bottom","top")):nt&&te.top<0&&Ue>Ve&&ce(mt=>mt.replace("top","bottom"))});const Ne=i.useCallback(te=>{c||(te&&ce(g),A||K(te),y?.(te))},[c,A,y,g]),oe=i.useCallback(te=>{if(q(!1),M){const Ve=ae.current,Ue=Se.current,nt=Ve.map((mt,Tt)=>Tt===Ue?{...mt,color:te}:mt);J||ze(nt),C?.(xr(nt),ur(nt,se.current));return}W||Y(te);const Ee=Gr(te);v?.(Ee,Ee.toHexString())},[M,J,W,v,C]),Re=i.useCallback(()=>{if(M){const Ve=ae.current;C?.(xr(Ve),ur(Ve,se.current));return}const te=W?lr(e):O,Ee=Gr(te);j?.(Ee,Ee.toHexString())},[M,W,e,O,j,C]),Ze=i.useCallback(te=>{D||Q(te),w?.(te)},[D,w]),Fe=i.useCallback(te=>{oe(lr(te)),Re()},[oe,Re]),et=i.useCallback(()=>{q(!0),k?.()},[k]),je=i.useCallback(te=>{if(te!==F){if(te==="gradient"){if(Oe.current)ze(Oe.current);else{const Ee=W&&!_?lr(e):O;ze([{color:{...Ee},percent:0},{color:{h:0,s:0,b:100,a:1},percent:100}])}De(0)}else{Oe.current=[...fe];const Ee=fe[0]?.color??{h:0,s:100,b:100,a:1};W||Y(Ee)}z(te),s?.(te)}},[F,W,_,e,O,fe,s]),ve=i.useCallback(te=>{De(te)},[]),xe=i.useCallback((te,Ee)=>{const Ue=ae.current.map((nt,mt)=>mt===te?{...nt,percent:Ee}:nt);J||ze(Ue),C?.(xr(Ue),ur(Ue,se.current))},[J,C]),U=i.useCallback(te=>{const Ee=ae.current,Ve=Wc(Ee,te),Ue=[...Ee,{color:Ve,percent:te}];J||ze(Ue),De(Ue.length-1),C?.(xr(Ue),ur(Ue,se.current))},[J,C]),de=i.useCallback(te=>{const Ee=ae.current;if(Ee.length<=2)return;const Ve=Ee.filter((Ue,nt)=>nt!==te);J||ze(Ve),De(Ue=>Math.min(Ue,Ve.length-1)),C?.(xr(Ve),ur(Ve,se.current))},[J,C]),ue=i.useCallback(te=>{he(te);const Ee=ae.current;C?.(xr(Ee),ur(Ee,te))},[C]),We=()=>{h==="click"&&Ne(!ke)},$e=()=>{h!=="hover"||c||(Ge.current&&clearTimeout(Ge.current),Ne(!0))},ne=()=>{h==="hover"&&(Ge.current=window.setTimeout(()=>Ne(!1),200))},be=ie.startsWith("top"),Ke=ie.endsWith("Right"),Qe={position:"absolute",zIndex:1050,...be?{bottom:"100%",marginBottom:"0.25rem"}:{top:"100%",marginTop:"0.25rem"},...Ke?{right:0}:{left:0}},tt=Kc[m],{r:dt,g:ft,b:gt}=gr(Te.h,Te.s,Te.b),Ct=`rgba(${dt}, ${ft}, ${gt}, ${Te.a})`,jt=Gr(Te),{r:Mt,g:ge,b:_e}=gr(ee.h,ee.s,ee.b),qe=`rgba(${Mt}, ${ge}, ${_e}, ${ee.a})`,st=M?ur(Be,me):"";let rt=null;if(d)if(M)typeof d=="function"?rt=d(Gr(ee)):rt=`${me}°`;else if(typeof d=="function")rt=d(jt);else switch(Ie){case"hex":rt=jt.toHexString().toUpperCase();break;case"rgb":rt=jt.toRgbString();break;case"hsb":rt=jt.toHsbString();break}const xt=t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[L&&t.jsx(Yc,{modes:I,activeMode:F,onModeChange:je}),M&&t.jsx(Vc,{stops:Be,activeIndex:we,angle:me,onSelectStop:ve,onMoveStop:xe,onAddStop:U,onRemoveStop:de,onAngleChange:ue,onDragEnd:Re}),t.jsx(Hc,{hue:ee.h,saturation:ee.s,brightness:ee.b,onChange:(te,Ee)=>oe({...ee,s:te,b:Ee}),onDragEnd:Re}),t.jsxs("div",{style:{display:"flex",gap:"0.75rem",alignItems:"center"},children:[t.jsx("div",{style:{width:"1.75rem",height:"1.75rem",borderRadius:"50%",flexShrink:0,border:`1px solid ${n.colorBorder}`,backgroundColor:qe}}),t.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:"0.375rem"},children:[t.jsx(Fc,{hue:ee.h,onChange:te=>oe({...ee,h:te}),onDragEnd:Re}),!u&&t.jsx(Ac,{color:ee,alpha:ee.a,onChange:te=>oe({...ee,a:te}),onDragEnd:Re})]})]}),t.jsx(Oc,{color:ee,format:Ie,disabledAlpha:u,onColorChange:te=>{oe(te),Re()},onFormatChange:Ze}),p&&p.length>0&&t.jsxs(t.Fragment,{children:[t.jsx("div",{style:{height:1,backgroundColor:n.colorBorder}}),t.jsx(Nc,{presets:p,onSelect:Fe})]}),f&&t.jsxs(t.Fragment,{children:[t.jsx("div",{style:{height:1,backgroundColor:n.colorBorder}}),t.jsxs("button",{type:"button",onClick:et,style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"0.25rem",padding:"0.25rem 0",border:"none",backgroundColor:"transparent",color:n.colorTextMuted,cursor:"pointer",fontSize:"0.75rem",fontFamily:"inherit"},onMouseEnter:te=>{te.currentTarget.style.color=n.colorText},onMouseLeave:te=>{te.currentTarget.style.color=n.colorTextMuted},children:[t.jsx(Ms,{})," Clear"]})]})]}),Rt=b?b(xt):xt,Lt=["linear-gradient(45deg, #ccc 25%, transparent 25%)","linear-gradient(-45deg, #ccc 25%, transparent 25%)","linear-gradient(45deg, transparent 75%, #ccc 75%)","linear-gradient(-45deg, transparent 75%, #ccc 75%)"].join(", "),pe=i.useRef(null),Z=B||t.jsxs("button",{ref:pe,type:"button",disabled:c,onClick:We,className:E?.trigger,style:V({display:"inline-flex",alignItems:"center",gap:"0.5rem",height:tt.height,padding:d?tt.paddingText:tt.paddingIcon,border:`1px solid ${n.colorBorder}`,borderRadius:tt.radius,backgroundColor:n.colorBg,cursor:c?"not-allowed":"pointer",opacity:c?.5:1,transition:"border-color 0.2s ease"},$?.trigger),onMouseEnter:te=>{c||(te.currentTarget.style.borderColor=n.colorBorderHover)},onMouseLeave:te=>{c||(te.currentTarget.style.borderColor=n.colorBorder)},children:[t.jsxs("span",{style:{position:"relative",width:tt.swatch,height:tt.swatch,borderRadius:3,overflow:"hidden",boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"},children:[t.jsx("span",{style:{position:"absolute",inset:0,backgroundImage:Lt,backgroundSize:"8px 8px",backgroundPosition:"0 0, 0 4px, 4px -4px, -4px 0"}}),M&&!re?t.jsx("span",{style:{position:"absolute",inset:0,background:st}}):t.jsx("span",{style:{position:"absolute",inset:0,backgroundColor:re?"transparent":Ct}}),re&&t.jsx("span",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:t.jsx("svg",{width:tt.swatch,height:tt.swatch,viewBox:"0 0 16 16",fill:"none",stroke:"#ff4d4f",strokeWidth:"1.5",children:t.jsx("line",{x1:"3",y1:"3",x2:"13",y2:"13"})})})]}),d&&rt!==null&&t.jsx("span",{style:{fontSize:tt.fontSize,color:n.colorText,whiteSpace:"nowrap"},children:rt})]});return t.jsxs("div",{ref:He,className:Ye(R,E?.root),style:V({position:"relative",display:"inline-block"},$?.root,S),onMouseEnter:$e,onMouseLeave:ne,children:[B?t.jsx("div",{onClick:We,style:{cursor:c?"not-allowed":"pointer"},children:Z}):Z,ke&&t.jsx("div",{ref:Pe,className:E?.panel,style:V({...Qe,width:"17.5rem",padding:"0.75rem",borderRadius:"0.5rem",border:`1px solid ${n.colorBorder}`,boxShadow:n.shadowMd,backgroundColor:n.colorBg,opacity:N?1:0,transform:N?"translateY(0)":`translateY(${be?4:-4}px)`,transition:"opacity 0.2s ease, transform 0.2s ease"},$?.panel),onMouseEnter:$e,onMouseLeave:ne,children:Rt})]})}function yr(e,r=2){return String(e).padStart(r,"0")}function Ot(e){return new Date(e.getTime())}function xn(e){const r=Ot(e);r.setHours(0,0,0,0),r.setDate(r.getDate()+4-(r.getDay()||7));const o=new Date(r.getFullYear(),0,1);return Math.ceil(((r.getTime()-o.getTime())/864e5+1)/7)}function Xc(e){const r=["th","st","nd","rd"],o=e%100;return e+(r[(o-20)%10]||r[o]||r[0])}const Gc=/\[([^\]]*)\]|YYYY|YY|MM|M|DD|D|HH|H|hh|h|mm|m|ss|s|A|a|ddd|dd|wo|Wo|QQ|Q/g;class _o{locale;constructor(r){this.locale=r??(typeof navigator<"u"?navigator.language:"en-US")}today(){const r=new Date;return r.setHours(0,0,0,0),r}create(r){return r==null?new Date(NaN):r instanceof Date?Ot(r):new Date(r)}clone(r){return Ot(r)}isValid(r){return r instanceof Date&&!isNaN(r.getTime())}getYear(r){return r.getFullYear()}getMonth(r){return r.getMonth()}getDate(r){return r.getDate()}getDay(r){return r.getDay()}getHour(r){return r.getHours()}getMinute(r){return r.getMinutes()}getSecond(r){return r.getSeconds()}setYear(r,o){const s=Ot(r);return s.setFullYear(o),s}setMonth(r,o){const s=Ot(r),l=s.getDate();s.setDate(1),s.setMonth(o);const a=new Date(s.getFullYear(),o+1,0).getDate();return s.setDate(Math.min(l,a)),s}setDate(r,o){const s=Ot(r);return s.setDate(o),s}setHour(r,o){const s=Ot(r);return s.setHours(o),s}setMinute(r,o){const s=Ot(r);return s.setMinutes(o),s}setSecond(r,o){const s=Ot(r);return s.setSeconds(o),s}addDays(r,o){const s=Ot(r);return s.setDate(s.getDate()+o),s}addMonths(r,o){const s=Ot(r),l=s.getDate();s.setDate(1),s.setMonth(s.getMonth()+o);const a=new Date(s.getFullYear(),s.getMonth()+1,0).getDate();return s.setDate(Math.min(l,a)),s}addYears(r,o){const s=Ot(r),l=s.getDate();s.setDate(1),s.setFullYear(s.getFullYear()+o);const a=new Date(s.getFullYear(),s.getMonth()+1,0).getDate();return s.setDate(Math.min(l,a)),s}isSameDay(r,o){return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()&&r.getDate()===o.getDate()}isSameMonth(r,o){return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}isSameYear(r,o){return r.getFullYear()===o.getFullYear()}isBefore(r,o){return r.getTime()<o.getTime()}isAfter(r,o){return r.getTime()>o.getTime()}startOfWeek(r,o=1){const s=Ot(r);s.setHours(0,0,0,0);const a=(s.getDay()-o+7)%7;return s.setDate(s.getDate()-a),s}endOfWeek(r,o=1){const s=this.startOfWeek(r,o);return s.setDate(s.getDate()+6),s.setHours(23,59,59,999),s}startOfMonth(r){return new Date(r.getFullYear(),r.getMonth(),1)}endOfMonth(r){return new Date(r.getFullYear(),r.getMonth()+1,0,23,59,59,999)}getDaysInMonth(r){return new Date(r.getFullYear(),r.getMonth()+1,0).getDate()}getWeekNumber(r){return xn(r)}format(r,o){const s=r.getFullYear(),l=r.getMonth(),a=r.getDate(),c=r.getHours(),u=r.getMinutes(),f=r.getSeconds(),d=r.getDay(),h=c%12||12,g=Math.floor(l/3)+1,m=xn(r),x=this.getDayNames("short"),p=this.getDayNames("narrow");return o.replace(Gc,(b,v)=>{if(v!==void 0)return v;switch(b){case"YYYY":return String(s);case"YY":return String(s).slice(-2);case"MM":return yr(l+1);case"M":return String(l+1);case"DD":return yr(a);case"D":return String(a);case"HH":return yr(c);case"H":return String(c);case"hh":return yr(h);case"h":return String(h);case"mm":return yr(u);case"m":return String(u);case"ss":return yr(f);case"s":return String(f);case"A":return c<12?"AM":"PM";case"a":return c<12?"am":"pm";case"ddd":return x[d];case"dd":return p[d];case"wo":case"Wo":return Xc(m);case"QQ":return"Q"+g;case"Q":return String(g);default:return b}})}parse(r,o){let s="";const l=[];let a=0;const c=o;for(;a<c.length;){if(c[a]==="["){const C=c.indexOf("]",a);if(C!==-1){s+=yn(c.substring(a+1,C)),a=C+1;continue}}let j=!1;for(const C of["YYYY","YY","MM","DD","HH","hh","mm","ss","QQ","wo","Wo","ddd","dd","M","D","H","h","m","s","A","a","Q"])if(c.startsWith(C,a)){l.push(C),s+=`(${Uc(C)})`,a+=C.length,j=!0;break}j||(s+=yn(c[a]),a++)}const u=new RegExp(`^${s}$`),f=r.match(u);if(!f)return null;let d=new Date().getFullYear(),h=0,g=1,m=0,x=0,p=0,b=!1;for(let j=0;j<l.length;j++){const C=f[j+1];switch(l[j]){case"YYYY":d=parseInt(C,10);break;case"YY":d=2e3+parseInt(C,10);break;case"MM":case"M":h=parseInt(C,10)-1;break;case"DD":case"D":g=parseInt(C,10);break;case"HH":case"H":m=parseInt(C,10);break;case"hh":case"h":m=parseInt(C,10);break;case"mm":case"m":x=parseInt(C,10);break;case"ss":case"s":p=parseInt(C,10);break;case"A":case"a":b=C.toLowerCase()==="pm";break;case"Q":case"QQ":h=(parseInt(C.replace("Q",""),10)-1)*3;break}}b&&m<12&&(m+=12),!b&&m===12&&l.some(j=>j==="A"||j==="a")&&(m=0);const v=new Date(d,h,g,m,x,p);return isNaN(v.getTime())?null:v}getMonthNames(r="long"){const o=new Intl.DateTimeFormat(this.locale,{month:r});return Array.from({length:12},(s,l)=>{const a=o.format(new Date(2026,l,1));return a.charAt(0).toUpperCase()+a.slice(1)})}getDayNames(r="short"){const o=new Intl.DateTimeFormat(this.locale,{weekday:r});return Array.from({length:7},(s,l)=>{const a=o.format(new Date(2026,0,4+l));return a.charAt(0).toUpperCase()+a.slice(1)})}getQuarterLabel(r){return`Q${r}`}}function yn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Uc(e){switch(e){case"YYYY":return"\\d{4}";case"YY":return"\\d{2}";case"MM":return"\\d{2}";case"M":return"\\d{1,2}";case"DD":return"\\d{2}";case"D":return"\\d{1,2}";case"HH":return"\\d{2}";case"H":return"\\d{1,2}";case"hh":return"\\d{2}";case"h":return"\\d{1,2}";case"mm":return"\\d{2}";case"m":return"\\d{1,2}";case"ss":return"\\d{2}";case"s":return"\\d{1,2}";case"A":return"[AP]M";case"a":return"[ap]m";case"QQ":return"Q[1-4]";case"Q":return"[1-4]";case"wo":case"Wo":return"\\d{1,2}(?:st|nd|rd|th)";case"ddd":return"[A-Za-z]+";case"dd":return"[A-Za-z]+";default:return".+"}}const qc=new _o,Bs=i.createContext(null);function Qc({adapter:e,children:r}){return t.jsx(Bs.Provider,{value:e,children:r})}function Rs(e){const r=i.useContext(Bs);return e??r??qc}function Ts(){return t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("rect",{x:"2",y:"3",width:"12",height:"11",rx:"1.5"}),t.jsx("line",{x1:"5",y1:"1.5",x2:"5",y2:"4"}),t.jsx("line",{x1:"11",y1:"1.5",x2:"11",y2:"4"}),t.jsx("line",{x1:"2",y1:"7",x2:"14",y2:"7"})]})}function Zc(){return t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("circle",{cx:"8",cy:"8",r:"6"}),t.jsx("polyline",{points:"8 4.5 8 8 10.5 9.5"})]})}function Jc(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"8.5 3 4.5 7 8.5 11"})})}function ed(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"5.5 3 9.5 7 5.5 11"})})}function td(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("polyline",{points:"7.5 3 3.5 7 7.5 11"}),t.jsx("polyline",{points:"11 3 7 7 11 11"})]})}function rd(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("polyline",{points:"3 3 7 7 3 11"}),t.jsx("polyline",{points:"6.5 3 10.5 7 6.5 11"})]})}function $o(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[t.jsx("circle",{cx:"7",cy:"7",r:"5.5",fill:"currentColor",opacity:"0.08"}),t.jsx("line",{x1:"5",y1:"5",x2:"9",y2:"9"}),t.jsx("line",{x1:"9",y1:"5",x2:"5",y2:"9"})]})}function od(){return t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"4",y1:"8",x2:"12",y2:"8"}),t.jsx("polyline",{points:"9 5 12 8 9 11"})]})}const Is={sm:{height:"1.75rem",fontSize:"0.75rem",iconSize:14,radius:"0.25rem",paddingH:"0.5rem",inputFontSize:"1rem",tagFontSize:"0.625rem"},md:{height:"2.25rem",fontSize:"0.875rem",iconSize:16,radius:"0.375rem",paddingH:"0.75rem",inputFontSize:"1rem",tagFontSize:"0.75rem"},lg:{height:"2.75rem",fontSize:"1rem",iconSize:18,radius:"0.5rem",paddingH:"0.875rem",inputFontSize:"1rem",tagFontSize:"0.875rem"}};function bn(e){return{bottomLeft:"topLeft",bottomRight:"topRight",topLeft:"bottomLeft",topRight:"bottomRight"}[e]}function Ls(e,r,o=360){if(!r)return e;const s=r.getBoundingClientRect(),l=window.innerHeight;if(e.startsWith("bottom")){if(l-s.bottom<o&&s.top>l-s.bottom)return bn(e)}else if(s.top<o&&l-s.bottom>s.top)return bn(e);return e}function Es(e,r){return e==="year"?"YYYY":e==="quarter"?"YYYY-[Q]Q":e==="month"?"YYYY-MM":e==="week"?"YYYY-wo":r?`YYYY-MM-DD ${typeof r=="object"&&r.format?r.format:"HH:mm:ss"}`:"YYYY-MM-DD"}function nd(e,r,o){return e==="year"?o?.yearPlaceholder??"Select year":e==="quarter"?o?.quarterPlaceholder??"Select quarter":e==="month"?o?.monthPlaceholder??"Select month":e==="week"?o?.weekPlaceholder??"Select week":r?o?.dateTimePlaceholder??"Select date and time":o?.placeholder??"Select date"}function $s(e,r,o,s=1){const l=e.setDate(e.setMonth(e.setYear(e.today(),r),o),1),a=e.startOfWeek(l,s),c=[];let u=a;for(let f=0;f<6;f++){const d=[];for(let h=0;h<7;h++)d.push(e.clone(u)),u=e.addDays(u,1);c.push(d)}return c}function fo(e,r,o,s,l){return!!(o?.(r)||s&&e.isValid(s)&&e.isBefore(r,e.setHour(e.setMinute(e.setSecond(e.clone(s),0),0),0))||l&&e.isValid(l)&&e.isAfter(r,e.setHour(e.setMinute(e.setSecond(e.clone(l),23),59),59)))}function sd(e){const r=[],o=/YYYY|MM|DD|HH|hh|mm|ss|A/g;let s=0,l;for(;(l=o.exec(e))!==null;)l.index>s&&r.push({type:"separator",separator:e.slice(s,l.index),length:0}),r.push({type:"token",token:l[0],length:l[0].length}),s=l.index+l[0].length;return s<e.length&&r.push({type:"separator",separator:e.slice(s),length:0}),r}function id({format:e,value:r,onComplete:o,placeholder:s,fontSize:l,color:a,disabled:c,readOnly:u,onFocus:f}){const d=i.useMemo(()=>sd(e),[e]),h=i.useMemo(()=>d.filter(k=>k.type==="token"),[d]),[g,m]=i.useState(()=>{if(r){const k=[];let B=0;for(const R of d)R.type==="separator"?B+=R.separator?.length??0:(k.push(r.slice(B,B+R.length)),B+=R.length);return k}return h.map(()=>"")}),[x,p]=i.useState(-1),b=i.useRef(null);i.useEffect(()=>{if(r&&x===-1){const k=[];let B=0;for(const R of d)R.type==="separator"?B+=R.separator?.length??0:(k.push(r.slice(B,B+R.length)),B+=R.length);m(k)}},[r]);const v=i.useMemo(()=>{let k=0;return d.map(B=>{if(B.type==="separator")return B.separator;const R=g[k]??"",S=(B.token??"").replace(/./g,"_");return k++,R+S.slice(R.length)}).join("")},[d,g]),j=k=>{if(c||u)return;const B=x>=0?x:0;if(k.key==="ArrowLeft")k.preventDefault(),p(Math.max(0,B-1));else if(k.key==="ArrowRight"||k.key==="Tab"){if(k.key==="Tab"&&B>=h.length-1)return;k.preventDefault(),p(Math.min(h.length-1,B+1))}else if(k.key==="ArrowUp"||k.key==="ArrowDown"){k.preventDefault();const R=k.key==="ArrowUp"?1:-1;m(S=>{const E=[...S],$=h[B],I=parseInt(E[B])||0,L=$.token==="YYYY"?9999:$.token==="MM"?12:$.token==="DD"?31:$.token==="HH"?23:$.token==="hh"?12:$.token==="mm"||$.token==="ss"?59:99,P=$.token==="MM"||$.token==="DD"||$.token==="hh"?1:0,H=Math.min(L,Math.max(P,I+R));return E[B]=String(H).padStart($.length,"0"),E})}else if(k.key==="Backspace")k.preventDefault(),m(R=>{const S=[...R];return S[B].length>0?S[B]=S[B].slice(0,-1):B>0&&p(B-1),S});else if(/^\d$/.test(k.key))k.preventDefault(),m(R=>{const S=[...R],E=h[B];return S[B].length>=E.length&&(S[B]=""),S[B]+=k.key,S[B].length>=E.length&&B<h.length-1&&p(B+1),S});else if(k.key==="Enter"){if(g.every((S,E)=>S.length===h[E].length)){let S=0;const E=d.map($=>$.type==="separator"?$.separator:g[S++]).join("");o(E),p(-1)}}else k.key==="Escape"&&(p(-1),b.current?.blur())},C=()=>{if(g.every((B,R)=>B.length===h[R].length)){let B=0;const R=d.map(S=>S.type==="separator"?S.separator:g[B++]).join("");o(R)}p(-1)},w=k=>{let B=0,R=0;for(const S of d)if(S.type==="separator")B+=S.separator?.length??0;else{if(R===k)return{start:B,length:S.length};B+=S.length,R++}return{start:0,length:0}};i.useEffect(()=>{if(x>=0&&b.current){const{start:k,length:B}=w(x);b.current.setSelectionRange(k,k+B)}},[x,v]);const y=g.every(k=>k==="");return t.jsx("input",{ref:b,value:y&&x===-1?"":v,placeholder:s??e.replace(/[YMDHhms]/g,"_"),readOnly:!0,disabled:c,onKeyDown:j,onFocus:()=>{p(0),f?.()},onBlur:C,style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",fontSize:l,fontFamily:"inherit",color:a,caretColor:"transparent",cursor:c?"not-allowed":"text",padding:0}})}function Po({title:e,onPrevYear:r,onNextYear:o,onPrevMonth:s,onNextMonth:l,onTitleClick:a,showMonthNav:c=!0,styles:u,classNames:f}){const d={display:"inline-flex",alignItems:"center",justifyContent:"center",width:"1.75rem",height:"1.75rem",padding:0,border:"none",borderRadius:"0.25rem",backgroundColor:"transparent",cursor:"pointer",color:n.colorTextMuted,transition:"background-color 0.15s ease, color 0.15s ease"},h=m=>{m.currentTarget.style.backgroundColor=n.colorBgMuted,m.currentTarget.style.color=n.colorText},g=m=>{m.currentTarget.style.backgroundColor="transparent",m.currentTarget.style.color=n.colorTextMuted};return t.jsxs("div",{className:f?.header,style:V({display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0.5rem 0.5rem 0.25rem",userSelect:"none"},u?.header),children:[t.jsxs("div",{style:{display:"flex",gap:"0.125rem"},children:[t.jsx("button",{type:"button",style:d,onClick:r,onMouseEnter:h,onMouseLeave:g,children:t.jsx(td,{})}),c&&s&&t.jsx("button",{type:"button",style:d,onClick:s,onMouseEnter:h,onMouseLeave:g,children:t.jsx(Jc,{})})]}),t.jsx("button",{type:"button",onClick:a,style:{border:"none",backgroundColor:"transparent",cursor:a?"pointer":"default",fontSize:"0.875rem",fontWeight:600,fontFamily:"inherit",color:n.colorText,padding:"0.125rem 0.5rem",borderRadius:"0.25rem",transition:"background-color 0.15s ease"},onMouseEnter:m=>{a&&(m.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:m=>{m.currentTarget.style.backgroundColor="transparent"},children:e}),t.jsxs("div",{style:{display:"flex",gap:"0.125rem"},children:[c&&l&&t.jsx("button",{type:"button",style:d,onClick:l,onMouseEnter:h,onMouseLeave:g,children:t.jsx(ed,{})}),t.jsx("button",{type:"button",style:d,onClick:o,onMouseEnter:h,onMouseLeave:g,children:t.jsx(rd,{})})]})]})}function Ps({adapter:e,viewDate:r,value:o,selectedDates:s,onSelect:l,onHover:a,disabledDate:c,minDate:u,maxDate:f,cellRender:d,rangeInfo:h,hideOutOfMonth:g,styles:m,classNames:x}){const p=e.getYear(r),b=e.getMonth(r),v=e.today(),j=$s(e,p,b,1),C=e.getDayNames("narrow"),w=[...C.slice(1),C[0]],y="2rem",k="1.75rem";return t.jsx("div",{className:x?.body,style:V({padding:"0 0.5rem 0.5rem"},m?.body),children:t.jsxs("div",{style:{display:"grid",gridTemplateColumns:`repeat(7, ${y})`,gridAutoRows:y,placeItems:"center"},children:[w.map((B,R)=>t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:y,height:y,fontSize:"0.75rem",fontWeight:600,color:n.colorTextMuted},children:B},`h-${R}`)),j.map((B,R)=>B.map((S,E)=>{const $=e.isSameMonth(S,r);if(g&&!$)return t.jsx("div",{},`${R}-${E}`);const I=e.isSameDay(S,v),L=o&&e.isValid(o)&&e.isSameDay(S,o)||(s?.some(D=>e.isSameDay(D,S))??!1),P=fo(e,S,c,u,f);let H=!1,z=!1,F=!1;if(h){const{start:D,end:T,hoverDate:O}=h,Y=T??O;if(D&&Y){const[X,K]=e.isBefore(D,Y)?[D,Y]:[Y,D];z=e.isSameDay(S,X),F=e.isSameDay(S,K),H=(e.isAfter(S,X)||e.isSameDay(S,X))&&(e.isBefore(S,K)||e.isSameDay(S,K))}}const M={display:"grid",placeContent:"center",width:k,height:k,fontSize:"0.8125rem",borderRadius:"50%",cursor:P?"not-allowed":"pointer",color:L?"#fff":P?n.colorTextSubtle:$?n.colorText:n.colorTextSubtle,backgroundColor:L?n.colorPrimary:H&&!z&&!F?n.colorPrimaryBg:"transparent",fontWeight:I?700:400,boxShadow:I&&!L?`inset 0 0 0 1.5px ${n.colorPrimary}`:"none",transition:"background-color 0.1s ease, color 0.1s ease, box-shadow 0.1s ease",opacity:P?.4:1};(z||F)&&(M.backgroundColor=n.colorPrimary,M.color="#fff");const W=t.jsx("span",{style:{lineHeight:0},children:e.getDate(S)}),A=d?d(S,{type:"date",originNode:W,today:I,inView:$,inRange:H,rangeStart:z,rangeEnd:F}):W;return t.jsx("div",{style:M,className:x?.cell,onClick:()=>{P||l(S)},onMouseEnter:D=>{P||(a?.(S),!L&&!z&&!F&&(D.currentTarget.style.backgroundColor=H?n.colorPrimaryBg:n.colorBgMuted))},onMouseLeave:D=>{!P&&!L&&!z&&!F&&(D.currentTarget.style.backgroundColor=H?n.colorPrimaryBg:"transparent"),a?.(null)},children:A},`${R}-${E}`)}))]})})}function ld({adapter:e,viewDate:r,value:o,onSelect:s,disabledDate:l,minDate:a,maxDate:c,styles:u,classNames:f}){const d=e.getYear(r),h=e.getMonth(r),g=e.today(),m=$s(e,d,h,1),x=e.getDayNames("narrow"),p=[...x.slice(1),x[0]],b="2rem",v="1.75rem",j=o&&e.isValid(o)?e.startOfWeek(o,1):null;return t.jsxs("div",{className:f?.body,style:V({padding:"0 0.5rem 0.5rem"},u?.body),children:[t.jsx("div",{style:{display:"grid",gridTemplateColumns:`repeat(7, ${b})`,gridAutoRows:b,placeItems:"center"},children:p.map((C,w)=>t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:b,height:b,fontSize:"0.75rem",fontWeight:600,color:n.colorTextMuted},children:C},w))}),m.map((C,w)=>{const y=e.startOfWeek(C[0],1),k=j&&e.isSameDay(y,j);return t.jsx("div",{style:{display:"grid",gridTemplateColumns:`repeat(7, ${b})`,gridAutoRows:b,placeItems:"center",borderRadius:"0.25rem",cursor:"pointer",backgroundColor:k?n.colorPrimaryBg:"transparent",transition:"background-color 0.1s ease"},onClick:()=>s(y),onMouseEnter:B=>{k||(B.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:B=>{k||(B.currentTarget.style.backgroundColor="transparent")},children:C.map((B,R)=>{const S=e.isSameMonth(B,r),E=e.isSameDay(B,g);return t.jsx("div",{style:{display:"grid",placeContent:"center",width:v,height:v,fontSize:"0.8125rem",color:S?k?n.colorPrimary:n.colorText:n.colorTextSubtle,fontWeight:E?700:400,boxShadow:E?`inset 0 0 0 1.5px ${n.colorPrimary}`:"none",borderRadius:"50%"},children:e.getDate(B)},R)})},w)})]})}function Ds({adapter:e,viewDate:r,value:o,onSelect:s,disabledDate:l,minDate:a,maxDate:c,cellRender:u,styles:f,classNames:d}){const h=e.getMonthNames("short"),g=e.today(),m=e.getYear(r);return t.jsx("div",{className:d?.body,style:V({padding:"0.5rem",display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"0.5rem"},f?.body),children:h.map((x,p)=>{const b=e.setMonth(e.setDate(e.setYear(e.today(),m),1),p),v=e.isSameMonth(b,g),j=o&&e.isValid(o)&&e.isSameMonth(b,o)&&e.isSameYear(b,o),C=fo(e,b,l,a,c),w=t.jsx("span",{children:x}),y=u?u(b,{type:"month",originNode:w,today:v,inView:!0}):w;return t.jsx("button",{type:"button",disabled:C,onClick:()=>s(b),className:d?.cell,style:{height:"2.5rem",border:v&&!j?`1px solid ${n.colorPrimary}`:"1px solid transparent",borderRadius:"0.375rem",cursor:C?"not-allowed":"pointer",backgroundColor:j?n.colorPrimary:"transparent",color:j?"#fff":C?n.colorTextSubtle:n.colorText,fontSize:"0.8125rem",fontWeight:v?600:400,fontFamily:"inherit",transition:"background-color 0.1s ease",opacity:C?.4:1},onMouseEnter:k=>{!C&&!j&&(k.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:k=>{!C&&!j&&(k.currentTarget.style.backgroundColor="transparent")},children:y},p)})})}function zs({adapter:e,viewDate:r,value:o,onSelect:s,disabledDate:l,minDate:a,maxDate:c,cellRender:u,styles:f,classNames:d}){const h=e.getYear(r),g=Math.floor(h/10)*10,m=e.today(),x=e.getYear(m),p=Array.from({length:12},(b,v)=>g-1+v);return t.jsx("div",{className:d?.body,style:V({padding:"0.5rem",display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"0.5rem"},f?.body),children:p.map(b=>{const v=e.setYear(e.today(),b),j=b>=g&&b<g+10,C=b===x,w=o&&e.isValid(o)&&e.getYear(o)===b,y=fo(e,v,l,a,c),k=t.jsx("span",{children:b}),B=u?u(v,{type:"year",originNode:k,today:C,inView:j}):k;return t.jsx("button",{type:"button",disabled:y,onClick:()=>s(v),className:d?.cell,style:{height:"2.5rem",border:C&&!w?`1px solid ${n.colorPrimary}`:"1px solid transparent",borderRadius:"0.375rem",cursor:y?"not-allowed":"pointer",backgroundColor:w?n.colorPrimary:"transparent",color:w?"#fff":j?y?n.colorTextSubtle:n.colorText:n.colorTextSubtle,fontSize:"0.8125rem",fontWeight:C?600:400,fontFamily:"inherit",transition:"background-color 0.1s ease",opacity:y?.4:1},onMouseEnter:R=>{!y&&!w&&(R.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:R=>{!y&&!w&&(R.currentTarget.style.backgroundColor="transparent")},children:B},b)})})}function Ws({adapter:e,viewDate:r,value:o,onSelect:s,disabledDate:l,minDate:a,maxDate:c,cellRender:u,styles:f,classNames:d}){const h=e.today(),g=e.getYear(r),m=Math.floor(e.getMonth(h)/3)+1,x=e.getYear(h);return t.jsx("div",{className:d?.body,style:V({padding:"0.5rem",display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"0.5rem"},f?.body),children:[1,2,3,4].map(p=>{const b=(p-1)*3,v=e.setMonth(e.setDate(e.setYear(e.today(),g),1),b),j=p===m&&g===x,C=o&&e.isValid(o)&&Math.floor(e.getMonth(o)/3)+1===p&&e.getYear(o)===g,w=fo(e,v,l,a,c),y=e.getQuarterLabel(p),k=t.jsx("span",{children:y}),B=u?u(v,{type:"quarter",originNode:k,today:j,inView:!0}):k;return t.jsx("button",{type:"button",disabled:w,onClick:()=>s(v),className:d?.cell,style:{height:"3rem",border:j&&!C?`1px solid ${n.colorPrimary}`:"1px solid transparent",borderRadius:"0.375rem",cursor:w?"not-allowed":"pointer",backgroundColor:C?n.colorPrimary:"transparent",color:C?"#fff":w?n.colorTextSubtle:n.colorText,fontSize:"0.875rem",fontWeight:j?600:400,fontFamily:"inherit",transition:"background-color 0.1s ease",opacity:w?.4:1},onMouseEnter:R=>{!w&&!C&&(R.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:R=>{!w&&!C&&(R.currentTarget.style.backgroundColor="transparent")},children:B},p)})})}function ad({adapter:e,value:r,onChange:o,config:s,disabledTime:l}){const a=s?.hourStep??1,c=s?.minuteStep??1,u=s?.secondStep??1,f=s?.showHour!==!1,d=s?.showMinute!==!1,h=s?.showSecond===!0,g=s?.use12Hours??!1,m=e.getHour(r),x=e.getMinute(r),p=e.getSecond(r),b=l?.disabledHours?.()??[],v=l?.disabledMinutes?.(m)??[],j=l?.disabledSeconds?.(m,x)??[],C=Array.from({length:Math.ceil((g?12:24)/a)},(I,L)=>{const P=g?L*a+1:L*a;return P}).filter(I=>g?I<=12:I<24),w=Array.from({length:Math.ceil(60/c)},(I,L)=>L*c).filter(I=>I<60),y=Array.from({length:Math.ceil(60/u)},(I,L)=>L*u).filter(I=>I<60),k="13.5rem",B="j-dp-time-col",R={display:"flex",flexDirection:"column",alignItems:"center",height:k,overflowY:"auto",width:"3.25rem",scrollbarWidth:"thin",scrollbarColor:`${n.colorBorderHover} transparent`,borderRight:`1px solid ${n.colorBorder}`},S=(I,L,P,H)=>t.jsx("div",{className:B,style:R,children:I.map(z=>{const F=z===L,M=P.includes(z);return t.jsx("button",{type:"button",disabled:M,onClick:()=>{M||H(z)},style:{width:"2.75rem",height:"1.75rem",flexShrink:0,border:"none",borderRadius:"0.25rem",backgroundColor:F?n.colorPrimaryBg:"transparent",color:F?n.colorPrimary:M?n.colorTextSubtle:n.colorText,cursor:M?"not-allowed":"pointer",fontSize:"0.8125rem",fontWeight:F?600:400,fontFamily:"monospace",transition:"background-color 0.1s ease",opacity:M?.4:1},onMouseEnter:W=>{!M&&!F&&(W.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:W=>{!M&&!F&&(W.currentTarget.style.backgroundColor="transparent")},children:String(z).padStart(2,"0")},z)})}),E=g?m%12||12:m,$=m>=12;return t.jsxs("div",{style:{display:"flex",borderLeft:`1px solid ${n.colorBorder}`,padding:"0.5rem 0"},children:[t.jsx("style",{children:`
|
|
108
108
|
.${B}::-webkit-scrollbar { width: 4px; }
|
|
109
109
|
.${B}::-webkit-scrollbar-track { background: transparent; }
|
|
110
110
|
.${B}::-webkit-scrollbar-thumb { background: ${n.colorBorderHover}; border-radius: 4px; }
|
|
111
111
|
.${B}::-webkit-scrollbar-thumb:hover { background: ${n.colorTextSubtle}; }
|
|
112
|
-
`}),f&&S(C,L,b,I=>{let P=I;g&&(P=$?I===12?12:I+12:I===12?0:I),o(e.setHour(r,P))}),d&&S(w,x,v,I=>o(e.setMinute(r,I))),h&&S(y,p,j,I=>o(e.setSecond(r,I))),g&&t.jsx("div",{style:{...R,borderRight:"none"},children:["AM","PM"].map(I=>{const P=I==="AM"?!$:$;return t.jsx("button",{type:"button",onClick:()=>{const E=I==="AM"?m>=12?m-12:m:m<12?m+12:m;o(e.setHour(r,E))},style:{width:"2.75rem",height:"1.75rem",flexShrink:0,border:"none",borderRadius:"0.25rem",backgroundColor:P?n.colorPrimaryBg:"transparent",color:P?n.colorPrimary:n.colorText,cursor:"pointer",fontSize:"0.75rem",fontWeight:P?600:400,fontFamily:"inherit",transition:"background-color 0.1s ease"},onMouseEnter:E=>{P||(E.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:E=>{P||(E.currentTarget.style.backgroundColor="transparent")},children:I},I)})})]})}function Hs({showToday:e,showNow:r,showOk:o,presets:s,renderExtraFooter:l,onToday:a,onNow:c,onOk:u,onPresetSelect:f,styles:d,classNames:h,todayText:g,nowText:m,okText:x}){const p=s&&s.length>0,b=e||r||o,v=l;if(!p&&!b&&!v)return null;const j={border:"none",backgroundColor:"transparent",cursor:"pointer",color:n.colorPrimary,fontSize:"0.8125rem",fontWeight:500,fontFamily:"inherit",padding:"0.25rem 0"};return t.jsxs("div",{className:h?.footer,style:V({borderTop:`1px solid ${n.colorBorder}`,padding:"0.5rem 0.75rem",display:"flex",flexDirection:"column",gap:"0.375rem"},d?.footer),children:[v&&t.jsx("div",{children:l()}),p&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"0.375rem"},children:s.map((C,w)=>{const y=()=>typeof C.value=="function"?C.value():C.value;return t.jsx("button",{type:"button",onClick:()=>f?.(y()),style:{padding:"0.125rem 0.625rem",border:`1px solid ${n.colorBorder}`,borderRadius:"0.25rem",backgroundColor:"transparent",cursor:"pointer",fontSize:"0.75rem",fontFamily:"inherit",color:n.colorText,transition:"border-color 0.15s ease, background-color 0.15s ease"},onMouseEnter:k=>{k.currentTarget.style.borderColor=n.colorPrimary,k.currentTarget.style.color=n.colorPrimary},onMouseLeave:k=>{k.currentTarget.style.borderColor=n.colorBorder,k.currentTarget.style.color=n.colorText},children:C.label},w)})}),b&&t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[t.jsxs("div",{children:[e&&t.jsx("button",{type:"button",style:j,onClick:a,children:g??"Today"}),r&&t.jsx("button",{type:"button",style:j,onClick:c,children:m??"Now"})]}),o&&t.jsx("button",{type:"button",onClick:u,style:{padding:"0.1875rem 0.75rem",border:"none",borderRadius:"0.25rem",backgroundColor:n.colorPrimary,color:"#fff",cursor:"pointer",fontSize:"0.8125rem",fontWeight:500,fontFamily:"inherit",transition:"filter 0.15s ease"},onMouseEnter:C=>{C.currentTarget.style.filter="brightness(1.1)"},onMouseLeave:C=>{C.currentTarget.style.filter="none"},children:x??"OK"})]})]})}function cd({value:e,defaultValue:r,onChange:o,picker:s="date",format:l,placeholder:a,size:c,variant:u="outlined",status:f,placement:d="bottomLeft",disabled:h,inputReadOnly:g=!1,allowClear:m=!0,prefix:x,suffix:p,needConfirm:b,multiple:v=!1,mask:j=!1,disabledDate:C,minDate:w,maxDate:y,showTime:k,showNow:B,showToday:R=!0,presets:S,open:L,defaultOpen:$=!1,onOpenChange:I,panelRender:P,cellRender:E,onPanelChange:H,renderExtraFooter:z,disabledTime:A,adapter:M,className:W,style:F,classNames:D,styles:T}){const{componentSize:O,componentDisabled:Y,locale:X}=Gt(),_=X.DatePicker,G=c??(O==="small"?"sm":O==="large"?"lg":O==="middle"?"md":void 0)??"md",Q=h??Y??!1,N=Rs(M),le=b??!!k,oe=e!==void 0,[q,K]=i.useState(r??null),re=oe?e??null:q,[Te,Ce]=i.useState(()=>v&&r&&N.isValid(r)?[r]:[]),Le=L!==void 0,[ue,ze]=i.useState($),xe=Le?L:ue,[ge,Ie]=i.useState(()=>re&&N.isValid(re)?N.clone(re):N.today()),[De,Ae]=i.useState(s),[Re,ke]=i.useState(""),[ee,ae]=i.useState(!1),[se,we]=i.useState(null),[ie,ce]=i.useState(!1),[He,Pe]=i.useState(d),Ge=i.useRef(null),Z=i.useRef(null),Be=i.useRef(null),Oe=i.useRef(null),Qe=typeof l=="string"?l:Es(s,k),_e=i.useCallback(Fe=>!Fe||!N.isValid(Fe)?"":typeof l=="function"?l(Fe):N.format(Fe,Qe),[N,l,Qe]),et=a??nd(s,k,_);i.useEffect(()=>{re&&N.isValid(re)&&Ie(N.clone(re))},[re,N]),i.useEffect(()=>{Ae(s)},[s]),i.useEffect(()=>{xe&&(ce(!1),requestAnimationFrame(()=>{requestAnimationFrame(()=>ce(!0))}),we(re&&N.isValid(re)?N.clone(re):null),Ae(s))},[xe]),i.useEffect(()=>{if(!xe)return;const Fe=ve=>{Ge.current?.contains(ve.target)||Z.current?.contains(ve.target)||Se(!1)};return document.addEventListener("mousedown",Fe),()=>document.removeEventListener("mousedown",Fe)},[xe]);const je=f==="error"?n.colorError:f==="warning"?n.colorWarning:void 0,Se=i.useCallback(Fe=>{Q||(Fe&&Pe(Ls(d,Ge.current)),Le||ze(Fe),I?.(Fe),Fe||(ae(!1),Oe.current&&u!=="borderless"&&(Oe.current.style.borderColor=je??n.colorBorder)))},[Q,Le,I,d,u,je]),me=i.useCallback(Fe=>{if(v&&Fe){Ce(ot=>{const yt=ot.findIndex(Me=>N.isSameDay(Me,Fe)),St=yt>=0?ot.filter((Me,Xe)=>Xe!==yt):[...ot,Fe],pt=St.map(Me=>_e(Me)).join(", ");return o?.(Fe,pt),St});return}oe||K(Fe);const ve=_e(Fe);o?.(Fe,ve),le||Se(!1)},[v,oe,_e,o,le,Se,N]),U=i.useCallback(Fe=>{const ve=s;if(De!==ve){Ie(Fe),De==="year"?(Ae(ve==="year"?"year":ve==="quarter"?"quarter":"month"),ve==="year"&&me(Fe)):De==="month"&&(Ae(ve==="month"?"month":"date"),ve==="month"&&me(Fe)),H?.(Fe,De);return}if(le&&ve==="date"){const ot=se&&N.isValid(se)?se:N.today(),yt=k?N.setSecond(N.setMinute(N.setHour(N.setDate(N.setMonth(N.setYear(N.clone(ot),N.getYear(Fe)),N.getMonth(Fe)),N.getDate(Fe)),N.getHour(ot)),N.getMinute(ot)),N.getSecond(ot)):Fe;we(yt),Ie(Fe)}else me(Fe)},[s,De,le,k,se,N,me,H]),he=i.useCallback(Fe=>{we(Fe)},[]),de=i.useCallback(()=>{me(se),Se(!1)},[se,me,Se]),We=i.useCallback(()=>{const Fe=N.today();le?(we(Fe),Ie(Fe)):me(Fe)},[N,le,me]),$e=i.useCallback(()=>{const Fe=N.create(new Date);le?(we(Fe),Ie(Fe)):me(Fe)},[N,le,me]),ne=i.useCallback(Fe=>{me(Fe),le&&Se(!1)},[me,le,Se]),be=i.useCallback(Fe=>{Fe.stopPropagation(),v?(Ce([]),o?.(null,"")):me(null)},[v,me,o]),Ye=i.useCallback(()=>{De==="date"||De==="week"?Ae("month"):(De==="month"||De==="quarter")&&Ae("year")},[De]),Ze=i.useCallback(Fe=>{ke(Fe.target.value),ae(!0)},[]),tt=i.useCallback(()=>{if(ee&&Re){const Fe=N.parse(Re,Qe);Fe&&N.isValid(Fe)&&me(Fe)}ae(!1)},[ee,Re,N,Qe,me]),dt=i.useCallback(Fe=>{if(Fe.key==="Enter"){if(ee&&Re){const ve=N.parse(Re,Qe);ve&&N.isValid(ve)&&me(ve)}ae(!1)}else Fe.key==="Escape"&&Se(!1)},[ee,Re,N,Qe,me,Se]),ft=i.useCallback(()=>{xe||Se(!0)},[xe,Se]),gt=i.useCallback(Fe=>{Ie(ve=>N.addMonths(ve,Fe))},[N]),Ct=i.useCallback(Fe=>{Ie(ve=>N.addYears(ve,Fe))},[N]),jt=i.useCallback(Fe=>{Ie(ve=>N.addYears(ve,Fe*10))},[N]),Mt=Is[G],pe=ee?Re:_e(re),Ke=He.startsWith("top"),qe=He.endsWith("Right"),st={position:"absolute",zIndex:1050,...Ke?{bottom:"100%",marginBottom:"0.25rem"}:{top:"100%",marginTop:"0.25rem"},...qe?{right:0}:{left:0}},rt=f==="error"?n.colorErrorBg:f==="warning"?n.colorWarningBg:n.colorPrimaryLight,xt=u==="borderless"?"none":`1px solid ${je??n.colorBorder}`,Rt=u==="filled"?n.colorBgMuted:"transparent",Lt=N.getMonthNames("long"),fe=(()=>{const Fe=N.getYear(ge);if(De==="year"){const ve=Math.floor(Fe/10)*10;return`${ve} - ${ve+9}`}return De==="month"||De==="quarter"?String(Fe):`${Lt[N.getMonth(ge)]} ${Fe}`})(),J=()=>{const Fe={adapter:N,disabledDate:C,minDate:w,maxDate:y,cellRender:E,styles:T,classNames:D},ve=le?se:re;switch(De){case"year":return t.jsx(zs,{...Fe,viewDate:ge,value:ve,onSelect:U});case"month":return t.jsx(Ds,{...Fe,viewDate:ge,value:ve,onSelect:U});case"quarter":return t.jsx(Ws,{...Fe,viewDate:ge,value:ve,onSelect:U});case"week":return t.jsx(ld,{adapter:N,viewDate:ge,value:ve,onSelect:U,disabledDate:C,minDate:w,maxDate:y,styles:T,classNames:D});default:return t.jsx(Ps,{...Fe,viewDate:ge,value:ve,selectedDates:v?Te:void 0,onSelect:U})}},te=!!k&&De==="date",Ee=typeof k=="object"?k:void 0,Ne=se&&N.isValid(se)?se:N.today(),Ue=A&&se&&N.isValid(se)?A(se):void 0,nt=t.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[t.jsx(Po,{title:fe,onPrevYear:()=>De==="year"?jt(-1):Ct(-1),onNextYear:()=>De==="year"?jt(1):Ct(1),onPrevMonth:De==="date"||De==="week"?()=>gt(-1):void 0,onNextMonth:De==="date"||De==="week"?()=>gt(1):void 0,showMonthNav:De==="date"||De==="week",onTitleClick:De!=="year"?Ye:void 0,styles:T,classNames:D}),t.jsxs("div",{style:{display:"flex"},children:[J(),te&&t.jsx(ad,{adapter:N,value:Ne,onChange:he,config:Ee,disabledTime:Ue})]}),t.jsx(Hs,{showToday:R&&!le&&De===s,showNow:!!(B??k)&&De===s,showOk:le&&De===s,presets:De===s?S:void 0,renderExtraFooter:De===s?z:void 0,onToday:We,onNow:$e,onOk:de,onPresetSelect:ne,styles:T,classNames:D,todayText:_?.today,nowText:_?.now,okText:_?.ok})]}),mt=P?P(nt):nt,Tt=p!==void 0?p:t.jsx("span",{style:{color:n.colorTextMuted,display:"flex"},children:te?t.jsx(Zc,{}):t.jsx(Ts,{})});return t.jsxs("div",{ref:Ge,className:Ve(W,D?.root),style:V({position:"relative",display:"inline-block"},T?.root,F),children:[t.jsxs("div",{ref:Oe,className:D?.input,onClick:()=>{Q||(xe||Se(!0),Be.current?.focus())},style:V({display:"flex",alignItems:"center",gap:"0.5rem",minHeight:Mt.height,height:v?"auto":Mt.height,padding:v?`0.25rem ${Mt.paddingH}`:`0 ${Mt.paddingH}`,border:xt,borderRadius:Mt.radius,backgroundColor:Rt,cursor:Q?"not-allowed":"pointer",opacity:Q?.5:1,boxShadow:xe&&u!=="borderless"?`0 0 0 2px ${rt}`:void 0,transition:"border-color 0.2s ease, box-shadow 0.2s ease",flexWrap:v?"wrap":void 0},T?.input),onMouseEnter:Fe=>{!Q&&u!=="borderless"&&(Fe.currentTarget.style.borderColor=je??n.colorPrimary)},onMouseLeave:Fe=>{!Q&&u!=="borderless"&&!xe&&(Fe.currentTarget.style.borderColor=je??n.colorBorder)},children:[x&&t.jsx("span",{style:{display:"flex",color:n.colorTextMuted,flexShrink:0},children:x}),v?t.jsxs(t.Fragment,{children:[Te.map((Fe,ve)=>t.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"0.25rem",padding:"0.125rem 0.5rem",borderRadius:"0.25rem",backgroundColor:n.colorBgMuted,fontSize:Mt.tagFontSize,color:n.colorText,lineHeight:1.4,whiteSpace:"nowrap"},children:[_e(Fe),!Q&&t.jsx("span",{onClick:ot=>{ot.stopPropagation(),Ce(yt=>{const St=yt.filter((pt,Me)=>Me!==ve);return o?.(null,St.map(pt=>_e(pt)).join(", ")),St})},style:{display:"inline-flex",cursor:"pointer",color:n.colorTextMuted,borderRadius:"50%",transition:"color 0.15s ease"},onMouseEnter:ot=>{ot.currentTarget.style.color=n.colorText},onMouseLeave:ot=>{ot.currentTarget.style.color=n.colorTextMuted},children:t.jsx($o,{})})]},ve)),Te.length===0&&t.jsx("span",{style:{fontSize:Mt.fontSize,color:n.colorTextSubtle},children:et})]}):j?t.jsx(id,{format:Qe,value:_e(re),onComplete:Fe=>{const ve=N.parse(Fe,Qe);ve&&N.isValid(ve)&&me(ve)},placeholder:et,fontSize:Mt.inputFontSize,color:je??n.colorText,disabled:Q,readOnly:g,onFocus:()=>{xe||Se(!0)}}):t.jsx("input",{ref:Be,value:pe,placeholder:et,readOnly:g,disabled:Q,onChange:Ze,onFocus:ft,onBlur:tt,onKeyDown:dt,style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",fontSize:Mt.inputFontSize,fontFamily:"inherit",color:je??n.colorText,cursor:Q?"not-allowed":void 0,padding:0}}),m&&(v&&Te.length>0||!v&&re&&N.isValid(re))&&!Q&&t.jsx("span",{onClick:be,style:{display:"flex",cursor:"pointer",color:n.colorTextMuted,flexShrink:0,transition:"color 0.15s ease",marginLeft:"auto"},onMouseEnter:Fe=>{Fe.currentTarget.style.color=n.colorText},onMouseLeave:Fe=>{Fe.currentTarget.style.color=n.colorTextMuted},children:t.jsx($o,{})}),Tt]}),xe&&t.jsx("div",{ref:Z,className:D?.popup,style:V({...st,borderRadius:"0.5rem",border:`1px solid ${n.colorBorder}`,boxShadow:n.shadowMd,backgroundColor:n.colorBg,opacity:ie?1:0,transform:ie?"translateY(0)":`translateY(${Ke?4:-4}px)`,transition:"opacity 0.2s ease, transform 0.2s ease",overflow:"hidden"},T?.popup),onMouseDown:Fe=>Fe.preventDefault(),children:mt})]})}function dd({value:e,defaultValue:r,onChange:o,onCalendarChange:s,picker:l="date",format:a,placeholder:c,separator:u,allowEmpty:f,disabled:d,size:h,variant:g="outlined",status:m,placement:x="bottomLeft",inputReadOnly:p=!1,allowClear:b=!0,prefix:v,suffix:j,disabledDate:C,minDate:w,maxDate:y,showTime:k,showNow:B,presets:R,open:S,defaultOpen:L=!1,onOpenChange:$,panelRender:I,cellRender:P,onPanelChange:E,renderExtraFooter:H,disabledTime:z,linkedPanels:A=!0,adapter:M,className:W,style:F,classNames:D,styles:T}){const{componentSize:O,componentDisabled:Y,locale:X}=Gt(),_=X.DatePicker,G=h??(O==="small"?"sm":O==="large"?"lg":O==="middle"?"md":void 0)??"md",Q=d??Y??!1,N=Rs(M),le=typeof Q=="boolean"?Q:Q[0],oe=typeof Q=="boolean"?Q:Q[1],q=le&&oe,K=e!==void 0,[re,Te]=i.useState(r??[null,null]),Ce=K?e??[null,null]:re,Le=S!==void 0,[ue,ze]=i.useState(L),xe=Le?S:ue,[ge,Ie]=i.useState("start"),[De,Ae]=i.useState(null),[Re,ke]=i.useState(null),[ee,ae]=i.useState(()=>Ce[0]&&N.isValid(Ce[0])?N.clone(Ce[0]):N.today()),[se,we]=i.useState(()=>N.addMonths(ee,1)),ie=A,ce=i.useCallback(J=>{ae(te=>{const Ee=J(te);return ie&&we(N.addMonths(Ee,1)),Ee})},[N,ie]),He=i.useCallback(J=>{we(te=>{const Ee=J(te);return ie&&ae(N.addMonths(Ee,-1)),Ee})},[N,ie]),[Pe,Ge]=i.useState(l),[Z,Be]=i.useState(!1),[Oe,Qe]=i.useState(x),_e=i.useRef(null),et=i.useRef(null),je=i.useRef(null),Se=i.useRef(null),me=i.useRef(null),U=typeof a=="string"?a:Es(l,k),he=i.useCallback(J=>!J||!N.isValid(J)?"":typeof a=="function"?a(J):N.format(J,U),[N,a,U]),de=c??[k?_?.rangeStartTimePlaceholder??"Start date time":_?.rangeStartPlaceholder??"Start date",k?_?.rangeEndTimePlaceholder??"End date time":_?.rangeEndPlaceholder??"End date"];i.useEffect(()=>{if(xe&&(Be(!1),requestAnimationFrame(()=>{requestAnimationFrame(()=>Be(!0))}),ke(null),Ge(l),Ce[0]&&N.isValid(Ce[0]))){const J=N.clone(Ce[0]);ae(J),we(N.addMonths(J,1))}},[xe]),i.useEffect(()=>{if(!xe)return;const J=te=>{if(!_e.current?.contains(te.target)&&!et.current?.contains(te.target)){if(Re&&f?.[1]){const Ee=[Re,null];K||Te(Ee),o?.(Ee,[he(Re),""]),ke(null),Ie("start")}else ke(null),Ie("start");$e(!1)}};return document.addEventListener("mousedown",J),()=>document.removeEventListener("mousedown",J)},[xe,Re,f]);const We=m==="error"?n.colorError:m==="warning"?n.colorWarning:void 0,$e=i.useCallback(J=>{q||(J&&Qe(Ls(x,_e.current)),Le||ze(J),$?.(J),!J&&je.current&&g!=="borderless"&&(je.current.style.borderColor=We??n.colorBorder))},[q,Le,$,x,g,We]),ne=i.useCallback(J=>{if(Pe!==l){ae(J),we(N.addMonths(J,1)),Pe==="year"?Ge(l==="year"?"year":l==="quarter"?"quarter":"month"):Pe==="month"&&Ge(l==="month"?"month":"date");return}if(ge==="start"||!Re){ke(J),Ie("end");const te=he(J);s?.([J,Ce[1]],[te,he(Ce[1])],{range:"start"})}else{let te=Re,Ee=J;if(N.isAfter(te,Ee)){const nt=te;te=Ee,Ee=nt}const Ne=[te,Ee];K||Te(Ne);const Ue=[he(te),he(Ee)];s?.(Ne,Ue,{range:"end"}),o?.(Ne,Ue),ke(null),Ie("start"),k||$e(!1)}},[ge,Re,N,l,Pe,Ce,K,he,o,s,k,$e]),be=i.useCallback(J=>{K||Te(J),o?.(J,[he(J[0]),he(J[1])]),$e(!1)},[K,he,o,$e]),Ye=i.useCallback(J=>{J.stopPropagation(),K||Te([null,null]),o?.(null,["",""])},[K,o]),Ze=i.useCallback(()=>{Pe==="date"||Pe==="week"?Ge("month"):(Pe==="month"||Pe==="quarter")&&Ge("year")},[Pe]),tt=Is[G],dt=Oe.startsWith("top"),ft=Oe.endsWith("Right"),gt={position:"absolute",zIndex:1050,...dt?{bottom:"100%",marginBottom:"0.25rem"}:{top:"100%",marginTop:"0.25rem"},...ft?{right:0}:{left:0}},Ct=m==="error"?n.colorErrorBg:m==="warning"?n.colorWarningBg:n.colorPrimaryLight,jt=g==="borderless"?"none":`1px solid ${We??n.colorBorder}`,Mt=g==="filled"?n.colorBgMuted:"transparent",pe=Ce[0]&&N.isValid(Ce[0])||Ce[1]&&N.isValid(Ce[1]),Ke={start:Re??Ce[0],end:Re?null:Ce[1],hoverDate:Re?De:null},qe=N.getMonthNames("long"),st=J=>{const te=N.getYear(J);if(Pe==="year"){const Ee=Math.floor(te/10)*10;return`${Ee} - ${Ee+9}`}return Pe==="month"||Pe==="quarter"?String(te):`${qe[N.getMonth(J)]} ${te}`},rt=(J,te)=>{const Ee={adapter:N,disabledDate:C,minDate:w,maxDate:y,cellRender:P,styles:T,classNames:D};switch(Pe){case"year":return t.jsx(zs,{...Ee,viewDate:J,value:null,onSelect:ne});case"month":return t.jsx(Ds,{...Ee,viewDate:J,value:null,onSelect:ne});case"quarter":return t.jsx(Ws,{...Ee,viewDate:J,value:null,onSelect:ne});default:return t.jsx(Ps,{...Ee,viewDate:J,value:null,onSelect:ne,onHover:Ae,rangeInfo:Ke,hideOutOfMonth:!0})}},xt=t.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[t.jsxs("div",{style:{display:"flex"},children:[t.jsxs("div",{children:[t.jsx(Po,{title:st(ee),onPrevYear:()=>ce(J=>Pe==="year"?N.addYears(J,-10):N.addYears(J,-1)),onNextYear:()=>ce(J=>Pe==="year"?N.addYears(J,10):N.addYears(J,1)),onPrevMonth:Pe==="date"?()=>ce(J=>N.addMonths(J,-1)):void 0,onNextMonth:Pe==="date"?()=>ce(J=>N.addMonths(J,1)):void 0,showMonthNav:Pe==="date",onTitleClick:Pe!=="year"?Ze:void 0,styles:T,classNames:D}),rt(ee)]}),t.jsxs("div",{children:[t.jsx(Po,{title:st(se),onPrevYear:()=>He(J=>Pe==="year"?N.addYears(J,-10):N.addYears(J,-1)),onNextYear:()=>He(J=>Pe==="year"?N.addYears(J,10):N.addYears(J,1)),onPrevMonth:Pe==="date"?()=>He(J=>N.addMonths(J,-1)):void 0,onNextMonth:Pe==="date"?()=>He(J=>N.addMonths(J,1)):void 0,showMonthNav:Pe==="date",onTitleClick:Pe!=="year"?Ze:void 0,styles:T,classNames:D}),rt(se)]})]}),t.jsx(Hs,{showToday:!1,showNow:!1,showOk:!1,presets:Pe===l?R:void 0,renderExtraFooter:Pe===l?H:void 0,onPresetSelect:J=>be(J),styles:T,classNames:D})]}),Rt=I?I(xt):xt,Lt=j!==void 0?j:t.jsx("span",{style:{color:n.colorTextMuted,display:"flex"},children:t.jsx(Ts,{})}),fe={flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",fontSize:tt.inputFontSize,fontFamily:"inherit",color:We??n.colorText,cursor:q?"not-allowed":void 0,padding:0,textAlign:"center"};return t.jsxs("div",{ref:_e,className:Ve(W,D?.root),style:V({position:"relative",display:"inline-block"},T?.root,F),children:[t.jsxs("div",{ref:je,className:D?.input,onClick:()=>{!q&&!xe&&($e(!0),Ie("start"))},style:V({display:"flex",alignItems:"center",gap:"0.25rem",height:tt.height,padding:`0 ${tt.paddingH}`,border:jt,borderRadius:tt.radius,backgroundColor:Mt,cursor:q?"not-allowed":"pointer",opacity:q?.5:1,boxShadow:xe&&g!=="borderless"?`0 0 0 2px ${Ct}`:void 0,transition:"border-color 0.2s ease, box-shadow 0.2s ease"},T?.input),onMouseEnter:J=>{!q&&g!=="borderless"&&(J.currentTarget.style.borderColor=We??n.colorPrimary)},onMouseLeave:J=>{!q&&g!=="borderless"&&!xe&&(J.currentTarget.style.borderColor=We??n.colorBorder)},children:[v&&t.jsx("span",{style:{display:"flex",color:n.colorTextMuted,flexShrink:0},children:v}),t.jsx("input",{ref:Se,value:he(Ce[0]),placeholder:de[0],readOnly:p,disabled:le,onFocus:()=>{Ie("start"),xe||$e(!0)},style:{...fe,fontWeight:xe&&ge==="start"?600:400},onChange:()=>{}}),t.jsx("span",{style:{display:"flex",color:n.colorTextMuted,flexShrink:0},children:u??t.jsx(od,{})}),t.jsx("input",{ref:me,value:he(Ce[1]),placeholder:de[1],readOnly:p,disabled:oe,onFocus:()=>{Ie("end"),xe||$e(!0)},style:{...fe,fontWeight:xe&&ge==="end"?600:400},onChange:()=>{}}),b&&pe&&!q&&t.jsx("span",{onClick:Ye,style:{display:"flex",cursor:"pointer",color:n.colorTextMuted,flexShrink:0,transition:"color 0.15s ease"},onMouseEnter:J=>{J.currentTarget.style.color=n.colorText},onMouseLeave:J=>{J.currentTarget.style.color=n.colorTextMuted},children:t.jsx($o,{})}),Lt]}),xe&&t.jsx("div",{ref:et,className:D?.popup,style:V({...gt,borderRadius:"0.5rem",border:`1px solid ${n.colorBorder}`,boxShadow:n.shadowMd,backgroundColor:n.colorBg,opacity:Z?1:0,transform:Z?"translateY(0)":`translateY(${dt?4:-4}px)`,transition:"opacity 0.2s ease, transform 0.2s ease",overflow:"hidden"},T?.popup),onMouseDown:J=>J.preventDefault(),children:Rt})]})}const ud=Object.assign(cd,{RangePicker:dd});let fr=null;function fd(){if(fr)return fr;try{fr=require("dayjs");const e=require("dayjs/plugin/weekOfYear"),r=require("dayjs/plugin/customParseFormat"),o=require("dayjs/plugin/quarterOfYear");fr.extend(e),fr.extend(r),fr.extend(o)}catch{throw new Error("DayjsAdapter requires dayjs to be installed. Run: npm install dayjs")}return fr}class hd{dayjs;constructor(r){this.dayjs=r??fd()}today(){return this.dayjs().startOf("day")}create(r){return r==null?this.dayjs(null):this.dayjs(r)}clone(r){return r.clone()}isValid(r){return r?r.isValid():!1}getYear(r){return r.year()}getMonth(r){return r.month()}getDate(r){return r.date()}getDay(r){return r.day()}getHour(r){return r.hour()}getMinute(r){return r.minute()}getSecond(r){return r.second()}setYear(r,o){return r.year(o)}setMonth(r,o){return r.month(o)}setDate(r,o){return r.date(o)}setHour(r,o){return r.hour(o)}setMinute(r,o){return r.minute(o)}setSecond(r,o){return r.second(o)}addDays(r,o){return r.add(o,"day")}addMonths(r,o){return r.add(o,"month")}addYears(r,o){return r.add(o,"year")}isSameDay(r,o){return r.isSame(o,"day")}isSameMonth(r,o){return r.isSame(o,"month")}isSameYear(r,o){return r.isSame(o,"year")}isBefore(r,o){return r.isBefore(o)}isAfter(r,o){return r.isAfter(o)}startOfWeek(r,o=1){const l=(r.day()-o+7)%7;return r.subtract(l,"day").startOf("day")}endOfWeek(r,o=1){return this.startOfWeek(r,o).add(6,"day").endOf("day")}startOfMonth(r){return r.startOf("month")}endOfMonth(r){return r.endOf("month")}getDaysInMonth(r){return r.daysInMonth()}getWeekNumber(r){return r.week()}format(r,o){return r.format(o)}parse(r,o){const s=this.dayjs(r,o,!0);return s.isValid()?s:null}getMonthNames(r="long"){const o=r==="short"?"MMM":"MMMM";return Array.from({length:12},(s,l)=>this.dayjs().month(l).format(o))}getDayNames(r="short"){const o=r==="narrow"?"dd":r==="short"?"ddd":"dddd";return Array.from({length:7},(s,l)=>this.dayjs().day(l).format(o))}getQuarterLabel(r){return`Q${r}`}}const pd=new _o,Fs=i.createContext(null);function gd({adapter:e,children:r}){return t.jsx(Fs.Provider,{value:e,children:r})}function md(e){const r=i.useContext(Fs);return e??r??pd}function vn(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"2 3.5 5 6.5 8 3.5"})})}function As(e,r,o,s=1){const l=e.setDate(e.setMonth(e.setYear(e.today(),r),o),1),a=e.startOfWeek(l,s),c=[];let u=a;for(let f=0;f<6;f++){const d=[];for(let h=0;h<7;h++)d.push(e.clone(u)),u=e.addDays(u,1);c.push(d)}return c}function xd(e,r,o,s){if(s?.(r))return!0;if(o){const[l,a]=o;if(e.isBefore(r,l)||e.isAfter(r,a))return!0}return!1}function so(e,r,o){if(!o)return r;const[s,l]=o;return e.isBefore(r,s)?e.clone(s):e.isAfter(r,l)?e.clone(l):r}function yd({adapter:e,value:r,mode:o,onValueChange:s,onModeChange:l,validRange:a,fullscreen:c,styles:u,classNames:f}){const d=e.getYear(r),h=e.getMonth(r),g=a?e.getYear(a[0]):d-10,m=a?e.getYear(a[1]):d+10,x=[];for(let y=g;y<=m;y++)x.push(y);const p=[],b=e.getMonthNames("long");for(let y=0;y<12;y++){if(a){const k=e.getYear(a[0]),B=e.getYear(a[1]),R=e.getMonth(a[0]),S=e.getMonth(a[1]);if(d===k&&y<R||d===B&&y>S)continue}p.push(y)}const v={position:"relative",display:"inline-flex",alignItems:"center"},j={appearance:"none",border:`1px solid ${n.colorBorder}`,borderRadius:"0.375rem",backgroundColor:n.colorBg,color:n.colorText,fontSize:c?"0.875rem":"0.8125rem",fontFamily:"inherit",fontWeight:500,padding:c?"0.25rem 1.75rem 0.25rem 0.5rem":"0.125rem 1.5rem 0.125rem 0.375rem",cursor:"pointer",outline:"none",transition:"border-color 0.15s ease"},C={position:"absolute",right:"0.375rem",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",color:n.colorTextMuted,display:"flex",alignItems:"center"},w={border:`1px solid ${n.colorBorder}`,padding:c?"0.25rem 0.75rem":"0.125rem 0.5rem",fontSize:c?"0.8125rem":"0.75rem",fontFamily:"inherit",cursor:"pointer",transition:"all 0.15s ease",lineHeight:1.4};return t.jsxs("div",{className:f?.header,style:V({display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"0.5rem",padding:c?"0.75rem 1rem":"0.5rem 0.75rem",borderBottom:`1px solid ${n.colorBorder}`},u?.header),children:[t.jsxs("div",{style:v,children:[t.jsx("select",{style:j,value:d,onChange:y=>{const k=Number(y.target.value);let B=e.setYear(e.clone(r),k);B=so(e,B,a),s(B)},onFocus:y=>{y.currentTarget.style.borderColor=n.colorPrimary},onBlur:y=>{y.currentTarget.style.borderColor=n.colorBorder},children:x.map(y=>t.jsx("option",{value:y,children:y},y))}),t.jsx("span",{style:C,children:t.jsx(vn,{})})]}),o==="month"&&t.jsxs("div",{style:v,children:[t.jsx("select",{style:j,value:h,onChange:y=>{const k=Number(y.target.value);let B=e.setMonth(e.clone(r),k);B=so(e,B,a),s(B)},onFocus:y=>{y.currentTarget.style.borderColor=n.colorPrimary},onBlur:y=>{y.currentTarget.style.borderColor=n.colorBorder},children:p.map(y=>t.jsx("option",{value:y,children:b[y]},y))}),t.jsx("span",{style:C,children:t.jsx(vn,{})})]}),t.jsxs("div",{style:{display:"inline-flex"},children:[t.jsx("button",{type:"button",onClick:()=>l("month"),style:{...w,borderRadius:"0.375rem 0 0 0.375rem",borderRight:"none",backgroundColor:o==="month"?n.colorPrimary:n.colorBg,color:o==="month"?"#fff":n.colorText,borderColor:o==="month"?n.colorPrimary:n.colorBorder},onMouseEnter:y=>{o!=="month"&&(y.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:y=>{o!=="month"&&(y.currentTarget.style.backgroundColor=n.colorBg)},children:"Month"}),t.jsx("button",{type:"button",onClick:()=>l("year"),style:{...w,borderRadius:"0 0.375rem 0.375rem 0",backgroundColor:o==="year"?n.colorPrimary:n.colorBg,color:o==="year"?"#fff":n.colorText,borderColor:o==="year"?n.colorPrimary:n.colorBorder},onMouseEnter:y=>{o!=="year"&&(y.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:y=>{o!=="year"&&(y.currentTarget.style.backgroundColor=n.colorBg)},children:"Year"})]})]})}function bd({adapter:e,viewDate:r,value:o,onSelect:s,disabledDate:l,cellRender:a,showWeek:c,styles:u,classNames:f}){const d=e.getYear(r),h=e.getMonth(r),g=e.today(),m=As(e,d,h,1),x=e.getDayNames("narrow"),p=[...x.slice(1),x[0]],b="2rem",v="1.75rem",j=c?`1.5rem repeat(7, ${b})`:`repeat(7, ${b})`;return t.jsx("div",{className:f?.body,style:V({padding:"0 0.5rem 0.5rem",display:"flex",justifyContent:"center",flex:1},u?.body),children:t.jsxs("div",{style:{display:"grid",gridTemplateColumns:j,gridAutoRows:b,placeItems:"center"},children:[c&&t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:"0.625rem",fontWeight:600,color:n.colorTextSubtle},children:"Wk"}),p.map((C,w)=>t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:b,height:b,fontSize:"0.75rem",fontWeight:600,color:n.colorTextMuted},children:C},`h-${w}`)),m.map((C,w)=>{const y=[];if(c){const k=e.getWeekNumber(C[0]);y.push(t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:"0.625rem",color:n.colorTextSubtle},children:k},`wk-${w}`))}return C.forEach((k,B)=>{const R=e.isSameMonth(k,r),S=e.isSameDay(k,g),L=o&&e.isValid(o)&&e.isSameDay(k,o),$=l?.(k)??!1,I={display:"grid",placeContent:"center",width:v,height:v,fontSize:"0.8125rem",borderRadius:"50%",cursor:$?"not-allowed":"pointer",color:L?"#fff":$?n.colorTextSubtle:R?n.colorText:n.colorTextSubtle,backgroundColor:L?n.colorPrimary:"transparent",fontWeight:S?700:400,boxShadow:S&&!L?`inset 0 0 0 1.5px ${n.colorPrimary}`:"none",transition:"background-color 0.1s ease, color 0.1s ease",opacity:$?.4:1},P=t.jsx("span",{style:{lineHeight:0},children:e.getDate(k)}),E=a?a(k,{type:"date",originNode:P,today:S}):P;y.push(t.jsx("div",{style:I,className:f?.cell,onClick:()=>{$||s(k)},onMouseEnter:H=>{!$&&!L&&(H.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:H=>{!$&&!L&&(H.currentTarget.style.backgroundColor="transparent")},children:E},`${w}-${B}`))}),y})]})})}function vd({adapter:e,viewDate:r,value:o,onSelect:s,disabledDate:l,cellRender:a,styles:c,classNames:u}){const f=e.getMonthNames("short"),d=e.today(),h=e.getYear(r);return t.jsx("div",{className:u?.body,style:V({padding:"0.5rem",display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"0.5rem",flex:1,alignContent:"center"},c?.body),children:f.map((g,m)=>{const x=e.setMonth(e.setDate(e.setYear(e.today(),h),1),m),p=e.isSameMonth(x,d),b=o&&e.isValid(o)&&e.isSameMonth(x,o)&&e.isSameYear(x,o),v=l?.(x)??!1,j=t.jsx("span",{children:g}),C=a?a(x,{type:"month",originNode:j,today:p}):j;return t.jsx("button",{type:"button",disabled:v,onClick:()=>s(x),className:u?.cell,style:{height:"2.5rem",border:p&&!b?`1px solid ${n.colorPrimary}`:"1px solid transparent",borderRadius:"0.375rem",cursor:v?"not-allowed":"pointer",backgroundColor:b?n.colorPrimary:"transparent",color:b?"#fff":v?n.colorTextSubtle:n.colorText,fontSize:"0.8125rem",fontWeight:p?600:400,fontFamily:"inherit",transition:"background-color 0.1s ease",opacity:v?.4:1},onMouseEnter:w=>{!v&&!b&&(w.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:w=>{!v&&!b&&(w.currentTarget.style.backgroundColor="transparent")},children:C},m)})})}function Cd({adapter:e,viewDate:r,value:o,onSelect:s,disabledDate:l,cellRender:a,fullCellRender:c,showWeek:u,styles:f,classNames:d}){const h=e.getYear(r),g=e.getMonth(r),m=e.today(),x=As(e,h,g,1),p=e.getDayNames("short"),b=[...p.slice(1),p[0]],v=u?"2.5rem repeat(7, 1fr)":"repeat(7, 1fr)";return t.jsxs("div",{className:d?.body,style:V({overflow:"hidden"},f?.body),children:[t.jsxs("div",{style:{display:"grid",gridTemplateColumns:v,borderBottom:`1px solid ${n.colorBorder}`},children:[u&&t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"0.5rem 0",fontSize:"0.75rem",fontWeight:600,color:n.colorTextSubtle,borderRight:`1px solid ${n.colorBorder}`},children:"Wk"}),b.map((j,C)=>t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"0.5rem 0.75rem",fontSize:"0.875rem",fontWeight:600,color:n.colorTextMuted,borderRight:C<b.length-1?`1px solid ${n.colorBorder}`:"none"},children:j},`h-${C}`))]}),x.map((j,C)=>t.jsxs("div",{style:{display:"grid",gridTemplateColumns:v,borderBottom:C<x.length-1?`1px solid ${n.colorBorder}`:"none"},children:[u&&t.jsx("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"center",padding:"0.5rem 0",fontSize:"0.75rem",color:n.colorTextSubtle,borderRight:`1px solid ${n.colorBorder}`},children:e.getWeekNumber(j[0])}),j.map((w,y)=>{const k=e.isSameMonth(w,r),B=e.isSameDay(w,m),R=o&&e.isValid(o)&&e.isSameDay(w,o),S=l?.(w)??!1,L=e.getDate(w),I={type:"date",originNode:t.jsx("span",{children:L}),today:B};if(c)return t.jsx("div",{className:d?.cell,style:{minHeight:"5rem",borderRight:y<6?`1px solid ${n.colorBorder}`:"none",cursor:S?"not-allowed":"pointer",opacity:S?.4:1},onClick:()=>{S||s(w)},children:c(w,I)},`${C}-${y}`);const P={display:"inline-flex",alignItems:"center",justifyContent:"center",width:"1.5rem",height:"1.5rem",borderRadius:"50%",fontSize:"0.875rem",fontWeight:B?700:400,backgroundColor:R?n.colorPrimary:"transparent",color:R?"#fff":k?n.colorText:n.colorTextSubtle,boxShadow:B&&!R?`inset 0 0 0 1.5px ${n.colorPrimary}`:"none",transition:"background-color 0.1s ease"},E=a?a(w,I):null;return t.jsxs("div",{className:d?.cell,style:{minHeight:"5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",borderRight:y<6?`1px solid ${n.colorBorder}`:"none",cursor:S?"not-allowed":"pointer",transition:"background-color 0.15s ease",opacity:S?.4:1,backgroundColor:R?n.colorPrimaryBg:"transparent",overflow:"hidden"},onClick:()=>{S||s(w)},onMouseEnter:H=>{!S&&!R&&(H.currentTarget.style.backgroundColor=n.colorBgSubtle)},onMouseLeave:H=>{S||(H.currentTarget.style.backgroundColor=R?n.colorPrimaryBg:"transparent")},children:[t.jsx("div",{style:{display:"flex",justifyContent:"flex-end",padding:"0 0.5rem",marginBottom:"0.25rem"},children:t.jsx("span",{style:P,children:L})}),E&&t.jsx("div",{style:{fontSize:"0.75rem"},children:E})]},`${C}-${y}`)})]},`row-${C}`))]})}function kd({adapter:e,viewDate:r,value:o,onSelect:s,disabledDate:l,cellRender:a,fullCellRender:c,styles:u,classNames:f}){const d=e.getMonthNames("long"),h=e.today(),g=e.getYear(r);return t.jsx("div",{className:f?.body,style:V({display:"grid",gridTemplateColumns:"repeat(3, 1fr)",overflow:"hidden"},u?.body),children:d.map((m,x)=>{const p=e.setMonth(e.setDate(e.setYear(e.today(),g),1),x),b=e.isSameMonth(p,h),v=o&&e.isValid(o)&&e.isSameMonth(p,o)&&e.isSameYear(p,o),j=l?.(p)??!1,w={type:"month",originNode:t.jsx("span",{children:m}),today:b};if(c)return t.jsx("div",{className:f?.cell,style:{minHeight:"5rem",borderRight:x%3<2?`1px solid ${n.colorBorder}`:"none",borderBottom:x<9?`1px solid ${n.colorBorder}`:"none",cursor:j?"not-allowed":"pointer",opacity:j?.4:1},onClick:()=>{j||s(p)},children:c(p,w)},x);const y={display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"0.125rem 0.5rem",borderRadius:"0.375rem",fontSize:"0.875rem",fontWeight:b?600:400,backgroundColor:v?n.colorPrimary:"transparent",color:v?"#fff":n.colorText,boxShadow:b&&!v?`inset 0 0 0 1.5px ${n.colorPrimary}`:"none",transition:"background-color 0.1s ease"},k=a?a(p,w):null;return t.jsxs("div",{className:f?.cell,style:{minHeight:"5rem",padding:"0.5rem 0.75rem",borderRight:x%3<2?`1px solid ${n.colorBorder}`:"none",borderBottom:x<9?`1px solid ${n.colorBorder}`:"none",cursor:j?"not-allowed":"pointer",transition:"background-color 0.15s ease",opacity:j?.4:1},onClick:()=>{j||s(p)},onMouseEnter:B=>{j||(B.currentTarget.style.backgroundColor=n.colorBgSubtle)},onMouseLeave:B=>{j||(B.currentTarget.style.backgroundColor="transparent")},children:[t.jsx("div",{style:{marginBottom:"0.25rem"},children:t.jsx("span",{style:y,children:m})}),k&&t.jsx("div",{style:{fontSize:"0.75rem"},children:k})]},x)})})}function wd({value:e,defaultValue:r,fullscreen:o=!0,mode:s,defaultMode:l="month",showWeek:a=!1,headerRender:c,cellRender:u,fullCellRender:f,validRange:d,disabledDate:h,onChange:g,onPanelChange:m,onSelect:x,adapter:p,className:b,style:v,classNames:j,styles:C}){const w=md(p),[y,k]=i.useState(()=>{const F=e??r??w.today();return d?so(w,F,d):F}),B=e!==void 0?e:y,[R,S]=i.useState(s??l),L=s!==void 0?s:R,[$,I]=i.useState(B);i.useEffect(()=>{e!==void 0&&I(e)},[e]);const P=i.useMemo(()=>{if(!(!h&&!d))return F=>xd(w,F,d,h)},[w,h,d]),E=i.useCallback((F,D)=>{const T=d?so(w,F,d):F;e===void 0&&k(T),I(T),g?.(T),x?.(T,{source:D})},[w,g,x,e,d]),H=i.useCallback(F=>{s===void 0&&S(F),m?.(B,F)},[B,m,s]),z=i.useCallback(F=>{I(F),e===void 0&&k(F),g?.(F);const D=w.getMonth(F)!==w.getMonth(B)?"month":"year";x?.(F,{source:D})},[w,B,g,x,e]),A=V({display:"flex",flexDirection:"column",backgroundColor:n.colorBg,border:`1px solid ${n.colorBorder}`,borderRadius:o?"0.5rem":"0.375rem",overflow:"hidden",fontFamily:"inherit",...o?{width:"100%"}:{width:"18.75rem"}},C?.root,v),M=c?c({value:B,type:L,onChange:z,onTypeChange:H}):t.jsx(yd,{adapter:w,value:$,mode:L,onValueChange:z,onModeChange:H,validRange:d,fullscreen:o,styles:C,classNames:j});let W;return L==="month"?W=o?t.jsx(Cd,{adapter:w,viewDate:$,value:B,onSelect:F=>E(F,"date"),disabledDate:P,cellRender:u,fullCellRender:f,showWeek:a,styles:C,classNames:j}):t.jsx(bd,{adapter:w,viewDate:$,value:B,onSelect:F=>E(F,"date"),disabledDate:P,cellRender:u,showWeek:a,styles:C,classNames:j}):W=o?t.jsx(kd,{adapter:w,viewDate:$,value:B,onSelect:F=>E(F,"month"),disabledDate:P,cellRender:u,fullCellRender:f,styles:C,classNames:j}):t.jsx(vd,{adapter:w,viewDate:$,value:B,onSelect:F=>E(F,"month"),disabledDate:P,cellRender:u,styles:C,classNames:j}),t.jsxs("div",{className:Ve(b,j?.root),style:A,children:[M,W]})}const jd=wd,Sd=`
|
|
112
|
+
`}),f&&S(C,E,b,I=>{let L=I;g&&(L=$?I===12?12:I+12:I===12?0:I),o(e.setHour(r,L))}),d&&S(w,x,v,I=>o(e.setMinute(r,I))),h&&S(y,p,j,I=>o(e.setSecond(r,I))),g&&t.jsx("div",{style:{...R,borderRight:"none"},children:["AM","PM"].map(I=>{const L=I==="AM"?!$:$;return t.jsx("button",{type:"button",onClick:()=>{const P=I==="AM"?m>=12?m-12:m:m<12?m+12:m;o(e.setHour(r,P))},style:{width:"2.75rem",height:"1.75rem",flexShrink:0,border:"none",borderRadius:"0.25rem",backgroundColor:L?n.colorPrimaryBg:"transparent",color:L?n.colorPrimary:n.colorText,cursor:"pointer",fontSize:"0.75rem",fontWeight:L?600:400,fontFamily:"inherit",transition:"background-color 0.1s ease"},onMouseEnter:P=>{L||(P.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:P=>{L||(P.currentTarget.style.backgroundColor="transparent")},children:I},I)})})]})}function Hs({showToday:e,showNow:r,showOk:o,presets:s,renderExtraFooter:l,onToday:a,onNow:c,onOk:u,onPresetSelect:f,styles:d,classNames:h,todayText:g,nowText:m,okText:x}){const p=s&&s.length>0,b=e||r||o,v=l;if(!p&&!b&&!v)return null;const j={border:"none",backgroundColor:"transparent",cursor:"pointer",color:n.colorPrimary,fontSize:"0.8125rem",fontWeight:500,fontFamily:"inherit",padding:"0.25rem 0"};return t.jsxs("div",{className:h?.footer,style:V({borderTop:`1px solid ${n.colorBorder}`,padding:"0.5rem 0.75rem",display:"flex",flexDirection:"column",gap:"0.375rem"},d?.footer),children:[v&&t.jsx("div",{children:l()}),p&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"0.375rem"},children:s.map((C,w)=>{const y=()=>typeof C.value=="function"?C.value():C.value;return t.jsx("button",{type:"button",onClick:()=>f?.(y()),style:{padding:"0.125rem 0.625rem",border:`1px solid ${n.colorBorder}`,borderRadius:"0.25rem",backgroundColor:"transparent",cursor:"pointer",fontSize:"0.75rem",fontFamily:"inherit",color:n.colorText,transition:"border-color 0.15s ease, background-color 0.15s ease"},onMouseEnter:k=>{k.currentTarget.style.borderColor=n.colorPrimary,k.currentTarget.style.color=n.colorPrimary},onMouseLeave:k=>{k.currentTarget.style.borderColor=n.colorBorder,k.currentTarget.style.color=n.colorText},children:C.label},w)})}),b&&t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[t.jsxs("div",{children:[e&&t.jsx("button",{type:"button",style:j,onClick:a,children:g??"Today"}),r&&t.jsx("button",{type:"button",style:j,onClick:c,children:m??"Now"})]}),o&&t.jsx("button",{type:"button",onClick:u,style:{padding:"0.1875rem 0.75rem",border:"none",borderRadius:"0.25rem",backgroundColor:n.colorPrimary,color:"#fff",cursor:"pointer",fontSize:"0.8125rem",fontWeight:500,fontFamily:"inherit",transition:"filter 0.15s ease"},onMouseEnter:C=>{C.currentTarget.style.filter="brightness(1.1)"},onMouseLeave:C=>{C.currentTarget.style.filter="none"},children:x??"OK"})]})]})}function cd({value:e,defaultValue:r,onChange:o,picker:s="date",format:l,placeholder:a,size:c,variant:u="outlined",status:f,placement:d="bottomLeft",disabled:h,inputReadOnly:g=!1,allowClear:m=!0,prefix:x,suffix:p,needConfirm:b,multiple:v=!1,mask:j=!1,disabledDate:C,minDate:w,maxDate:y,showTime:k,showNow:B,showToday:R=!0,presets:S,open:E,defaultOpen:$=!1,onOpenChange:I,panelRender:L,cellRender:P,onPanelChange:H,renderExtraFooter:z,disabledTime:F,adapter:M,className:W,style:A,classNames:D,styles:T}){const{componentSize:O,componentDisabled:Y,locale:X}=Gt(),K=X.DatePicker,G=c??(O==="small"?"sm":O==="large"?"lg":O==="middle"?"md":void 0)??"md",Q=h??Y??!1,N=Rs(M),le=b??!!k,re=e!==void 0,[q,_]=i.useState(r??null),J=re?e??null:q,[Te,ke]=i.useState(()=>v&&r&&N.isValid(r)?[r]:[]),Ie=E!==void 0,[fe,ze]=i.useState($),me=Ie?E:fe,[he,Le]=i.useState(()=>J&&N.isValid(J)?N.clone(J):N.today()),[De,Oe]=i.useState(s),[Be,we]=i.useState(""),[ee,ae]=i.useState(!1),[se,Se]=i.useState(null),[ie,ce]=i.useState(!1),[He,Pe]=i.useState(d),Ge=i.useRef(null),Ne=i.useRef(null),oe=i.useRef(null),Re=i.useRef(null),Ze=typeof l=="string"?l:Es(s,k),Fe=i.useCallback(Ae=>!Ae||!N.isValid(Ae)?"":typeof l=="function"?l(Ae):N.format(Ae,Ze),[N,l,Ze]),et=a??nd(s,k,K);i.useEffect(()=>{J&&N.isValid(J)&&Le(N.clone(J))},[J,N]),i.useEffect(()=>{Oe(s)},[s]),i.useEffect(()=>{me&&(ce(!1),requestAnimationFrame(()=>{requestAnimationFrame(()=>ce(!0))}),Se(J&&N.isValid(J)?N.clone(J):null),Oe(s))},[me]),i.useEffect(()=>{if(!me)return;const Ae=Ce=>{Ge.current?.contains(Ce.target)||Ne.current?.contains(Ce.target)||ve(!1)};return document.addEventListener("mousedown",Ae),()=>document.removeEventListener("mousedown",Ae)},[me]);const je=f==="error"?n.colorError:f==="warning"?n.colorWarning:void 0,ve=i.useCallback(Ae=>{Q||(Ae&&Pe(Ls(d,Ge.current)),Ie||ze(Ae),I?.(Ae),Ae||(ae(!1),Re.current&&u!=="borderless"&&(Re.current.style.borderColor=je??n.colorBorder)))},[Q,Ie,I,d,u,je]),xe=i.useCallback(Ae=>{if(v&&Ae){ke(ot=>{const yt=ot.findIndex(Me=>N.isSameDay(Me,Ae)),St=yt>=0?ot.filter((Me,Xe)=>Xe!==yt):[...ot,Ae],pt=St.map(Me=>Fe(Me)).join(", ");return o?.(Ae,pt),St});return}re||_(Ae);const Ce=Fe(Ae);o?.(Ae,Ce),le||ve(!1)},[v,re,Fe,o,le,ve,N]),U=i.useCallback(Ae=>{const Ce=s;if(De!==Ce){Le(Ae),De==="year"?(Oe(Ce==="year"?"year":Ce==="quarter"?"quarter":"month"),Ce==="year"&&xe(Ae)):De==="month"&&(Oe(Ce==="month"?"month":"date"),Ce==="month"&&xe(Ae)),H?.(Ae,De);return}if(le&&Ce==="date"){const ot=se&&N.isValid(se)?se:N.today(),yt=k?N.setSecond(N.setMinute(N.setHour(N.setDate(N.setMonth(N.setYear(N.clone(ot),N.getYear(Ae)),N.getMonth(Ae)),N.getDate(Ae)),N.getHour(ot)),N.getMinute(ot)),N.getSecond(ot)):Ae;Se(yt),Le(Ae)}else xe(Ae)},[s,De,le,k,se,N,xe,H]),de=i.useCallback(Ae=>{Se(Ae)},[]),ue=i.useCallback(()=>{xe(se),ve(!1)},[se,xe,ve]),We=i.useCallback(()=>{const Ae=N.today();le?(Se(Ae),Le(Ae)):xe(Ae)},[N,le,xe]),$e=i.useCallback(()=>{const Ae=N.create(new Date);le?(Se(Ae),Le(Ae)):xe(Ae)},[N,le,xe]),ne=i.useCallback(Ae=>{xe(Ae),le&&ve(!1)},[xe,le,ve]),be=i.useCallback(Ae=>{Ae.stopPropagation(),v?(ke([]),o?.(null,"")):xe(null)},[v,xe,o]),Ke=i.useCallback(()=>{De==="date"||De==="week"?Oe("month"):(De==="month"||De==="quarter")&&Oe("year")},[De]),Qe=i.useCallback(Ae=>{we(Ae.target.value),ae(!0)},[]),tt=i.useCallback(()=>{if(ee&&Be){const Ae=N.parse(Be,Ze);Ae&&N.isValid(Ae)&&xe(Ae)}ae(!1)},[ee,Be,N,Ze,xe]),dt=i.useCallback(Ae=>{if(Ae.key==="Enter"){if(ee&&Be){const Ce=N.parse(Be,Ze);Ce&&N.isValid(Ce)&&xe(Ce)}ae(!1)}else Ae.key==="Escape"&&ve(!1)},[ee,Be,N,Ze,xe,ve]),ft=i.useCallback(()=>{me||ve(!0)},[me,ve]),gt=i.useCallback(Ae=>{Le(Ce=>N.addMonths(Ce,Ae))},[N]),Ct=i.useCallback(Ae=>{Le(Ce=>N.addYears(Ce,Ae))},[N]),jt=i.useCallback(Ae=>{Le(Ce=>N.addYears(Ce,Ae*10))},[N]),Mt=Is[G],ge=ee?Be:Fe(J),_e=He.startsWith("top"),qe=He.endsWith("Right"),st={position:"absolute",zIndex:1050,..._e?{bottom:"100%",marginBottom:"0.25rem"}:{top:"100%",marginTop:"0.25rem"},...qe?{right:0}:{left:0}},rt=f==="error"?n.colorErrorBg:f==="warning"?n.colorWarningBg:n.colorPrimaryLight,xt=u==="borderless"?"none":`1px solid ${je??n.colorBorder}`,Rt=u==="filled"?n.colorBgMuted:"transparent",Lt=N.getMonthNames("long"),pe=(()=>{const Ae=N.getYear(he);if(De==="year"){const Ce=Math.floor(Ae/10)*10;return`${Ce} - ${Ce+9}`}return De==="month"||De==="quarter"?String(Ae):`${Lt[N.getMonth(he)]} ${Ae}`})(),Z=()=>{const Ae={adapter:N,disabledDate:C,minDate:w,maxDate:y,cellRender:P,styles:T,classNames:D},Ce=le?se:J;switch(De){case"year":return t.jsx(zs,{...Ae,viewDate:he,value:Ce,onSelect:U});case"month":return t.jsx(Ds,{...Ae,viewDate:he,value:Ce,onSelect:U});case"quarter":return t.jsx(Ws,{...Ae,viewDate:he,value:Ce,onSelect:U});case"week":return t.jsx(ld,{adapter:N,viewDate:he,value:Ce,onSelect:U,disabledDate:C,minDate:w,maxDate:y,styles:T,classNames:D});default:return t.jsx(Ps,{...Ae,viewDate:he,value:Ce,selectedDates:v?Te:void 0,onSelect:U})}},te=!!k&&De==="date",Ee=typeof k=="object"?k:void 0,Ve=se&&N.isValid(se)?se:N.today(),Ue=F&&se&&N.isValid(se)?F(se):void 0,nt=t.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[t.jsx(Po,{title:pe,onPrevYear:()=>De==="year"?jt(-1):Ct(-1),onNextYear:()=>De==="year"?jt(1):Ct(1),onPrevMonth:De==="date"||De==="week"?()=>gt(-1):void 0,onNextMonth:De==="date"||De==="week"?()=>gt(1):void 0,showMonthNav:De==="date"||De==="week",onTitleClick:De!=="year"?Ke:void 0,styles:T,classNames:D}),t.jsxs("div",{style:{display:"flex"},children:[Z(),te&&t.jsx(ad,{adapter:N,value:Ve,onChange:de,config:Ee,disabledTime:Ue})]}),t.jsx(Hs,{showToday:R&&!le&&De===s,showNow:!!(B??k)&&De===s,showOk:le&&De===s,presets:De===s?S:void 0,renderExtraFooter:De===s?z:void 0,onToday:We,onNow:$e,onOk:ue,onPresetSelect:ne,styles:T,classNames:D,todayText:K?.today,nowText:K?.now,okText:K?.ok})]}),mt=L?L(nt):nt,Tt=p!==void 0?p:t.jsx("span",{style:{color:n.colorTextMuted,display:"flex"},children:te?t.jsx(Zc,{}):t.jsx(Ts,{})});return t.jsxs("div",{ref:Ge,className:Ye(W,D?.root),style:V({position:"relative",display:"inline-block"},T?.root,A),children:[t.jsxs("div",{ref:Re,className:D?.input,onClick:()=>{Q||(me||ve(!0),oe.current?.focus())},style:V({display:"flex",alignItems:"center",gap:"0.5rem",minHeight:Mt.height,height:v?"auto":Mt.height,padding:v?`0.25rem ${Mt.paddingH}`:`0 ${Mt.paddingH}`,border:xt,borderRadius:Mt.radius,backgroundColor:Rt,cursor:Q?"not-allowed":"pointer",opacity:Q?.5:1,boxShadow:me&&u!=="borderless"?`0 0 0 2px ${rt}`:void 0,transition:"border-color 0.2s ease, box-shadow 0.2s ease",flexWrap:v?"wrap":void 0},T?.input),onMouseEnter:Ae=>{!Q&&u!=="borderless"&&(Ae.currentTarget.style.borderColor=je??n.colorPrimary)},onMouseLeave:Ae=>{!Q&&u!=="borderless"&&!me&&(Ae.currentTarget.style.borderColor=je??n.colorBorder)},children:[x&&t.jsx("span",{style:{display:"flex",color:n.colorTextMuted,flexShrink:0},children:x}),v?t.jsxs(t.Fragment,{children:[Te.map((Ae,Ce)=>t.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"0.25rem",padding:"0.125rem 0.5rem",borderRadius:"0.25rem",backgroundColor:n.colorBgMuted,fontSize:Mt.tagFontSize,color:n.colorText,lineHeight:1.4,whiteSpace:"nowrap"},children:[Fe(Ae),!Q&&t.jsx("span",{onClick:ot=>{ot.stopPropagation(),ke(yt=>{const St=yt.filter((pt,Me)=>Me!==Ce);return o?.(null,St.map(pt=>Fe(pt)).join(", ")),St})},style:{display:"inline-flex",cursor:"pointer",color:n.colorTextMuted,borderRadius:"50%",transition:"color 0.15s ease"},onMouseEnter:ot=>{ot.currentTarget.style.color=n.colorText},onMouseLeave:ot=>{ot.currentTarget.style.color=n.colorTextMuted},children:t.jsx($o,{})})]},Ce)),Te.length===0&&t.jsx("span",{style:{fontSize:Mt.fontSize,color:n.colorTextSubtle},children:et})]}):j?t.jsx(id,{format:Ze,value:Fe(J),onComplete:Ae=>{const Ce=N.parse(Ae,Ze);Ce&&N.isValid(Ce)&&xe(Ce)},placeholder:et,fontSize:Mt.inputFontSize,color:je??n.colorText,disabled:Q,readOnly:g,onFocus:()=>{me||ve(!0)}}):t.jsx("input",{ref:oe,value:ge,placeholder:et,readOnly:g,disabled:Q,onChange:Qe,onFocus:ft,onBlur:tt,onKeyDown:dt,style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",fontSize:Mt.inputFontSize,fontFamily:"inherit",color:je??n.colorText,cursor:Q?"not-allowed":void 0,padding:0}}),m&&(v&&Te.length>0||!v&&J&&N.isValid(J))&&!Q&&t.jsx("span",{onClick:be,style:{display:"flex",cursor:"pointer",color:n.colorTextMuted,flexShrink:0,transition:"color 0.15s ease",marginLeft:"auto"},onMouseEnter:Ae=>{Ae.currentTarget.style.color=n.colorText},onMouseLeave:Ae=>{Ae.currentTarget.style.color=n.colorTextMuted},children:t.jsx($o,{})}),Tt]}),me&&t.jsx("div",{ref:Ne,className:D?.popup,style:V({...st,borderRadius:"0.5rem",border:`1px solid ${n.colorBorder}`,boxShadow:n.shadowMd,backgroundColor:n.colorBg,opacity:ie?1:0,transform:ie?"translateY(0)":`translateY(${_e?4:-4}px)`,transition:"opacity 0.2s ease, transform 0.2s ease",overflow:"hidden"},T?.popup),onMouseDown:Ae=>Ae.preventDefault(),children:mt})]})}function dd({value:e,defaultValue:r,onChange:o,onCalendarChange:s,picker:l="date",format:a,placeholder:c,separator:u,allowEmpty:f,disabled:d,size:h,variant:g="outlined",status:m,placement:x="bottomLeft",inputReadOnly:p=!1,allowClear:b=!0,prefix:v,suffix:j,disabledDate:C,minDate:w,maxDate:y,showTime:k,showNow:B,presets:R,open:S,defaultOpen:E=!1,onOpenChange:$,panelRender:I,cellRender:L,onPanelChange:P,renderExtraFooter:H,disabledTime:z,linkedPanels:F=!0,adapter:M,className:W,style:A,classNames:D,styles:T}){const{componentSize:O,componentDisabled:Y,locale:X}=Gt(),K=X.DatePicker,G=h??(O==="small"?"sm":O==="large"?"lg":O==="middle"?"md":void 0)??"md",Q=d??Y??!1,N=Rs(M),le=typeof Q=="boolean"?Q:Q[0],re=typeof Q=="boolean"?Q:Q[1],q=le&&re,_=e!==void 0,[J,Te]=i.useState(r??[null,null]),ke=_?e??[null,null]:J,Ie=S!==void 0,[fe,ze]=i.useState(E),me=Ie?S:fe,[he,Le]=i.useState("start"),[De,Oe]=i.useState(null),[Be,we]=i.useState(null),[ee,ae]=i.useState(()=>ke[0]&&N.isValid(ke[0])?N.clone(ke[0]):N.today()),[se,Se]=i.useState(()=>N.addMonths(ee,1)),ie=F,ce=i.useCallback(Z=>{ae(te=>{const Ee=Z(te);return ie&&Se(N.addMonths(Ee,1)),Ee})},[N,ie]),He=i.useCallback(Z=>{Se(te=>{const Ee=Z(te);return ie&&ae(N.addMonths(Ee,-1)),Ee})},[N,ie]),[Pe,Ge]=i.useState(l),[Ne,oe]=i.useState(!1),[Re,Ze]=i.useState(x),Fe=i.useRef(null),et=i.useRef(null),je=i.useRef(null),ve=i.useRef(null),xe=i.useRef(null),U=typeof a=="string"?a:Es(l,k),de=i.useCallback(Z=>!Z||!N.isValid(Z)?"":typeof a=="function"?a(Z):N.format(Z,U),[N,a,U]),ue=c??[k?K?.rangeStartTimePlaceholder??"Start date time":K?.rangeStartPlaceholder??"Start date",k?K?.rangeEndTimePlaceholder??"End date time":K?.rangeEndPlaceholder??"End date"];i.useEffect(()=>{if(me&&(oe(!1),requestAnimationFrame(()=>{requestAnimationFrame(()=>oe(!0))}),we(null),Ge(l),ke[0]&&N.isValid(ke[0]))){const Z=N.clone(ke[0]);ae(Z),Se(N.addMonths(Z,1))}},[me]),i.useEffect(()=>{if(!me)return;const Z=te=>{if(!Fe.current?.contains(te.target)&&!et.current?.contains(te.target)){if(Be&&f?.[1]){const Ee=[Be,null];_||Te(Ee),o?.(Ee,[de(Be),""]),we(null),Le("start")}else we(null),Le("start");$e(!1)}};return document.addEventListener("mousedown",Z),()=>document.removeEventListener("mousedown",Z)},[me,Be,f]);const We=m==="error"?n.colorError:m==="warning"?n.colorWarning:void 0,$e=i.useCallback(Z=>{q||(Z&&Ze(Ls(x,Fe.current)),Ie||ze(Z),$?.(Z),!Z&&je.current&&g!=="borderless"&&(je.current.style.borderColor=We??n.colorBorder))},[q,Ie,$,x,g,We]),ne=i.useCallback(Z=>{if(Pe!==l){ae(Z),Se(N.addMonths(Z,1)),Pe==="year"?Ge(l==="year"?"year":l==="quarter"?"quarter":"month"):Pe==="month"&&Ge(l==="month"?"month":"date");return}if(he==="start"||!Be){we(Z),Le("end");const te=de(Z);s?.([Z,ke[1]],[te,de(ke[1])],{range:"start"})}else{let te=Be,Ee=Z;if(N.isAfter(te,Ee)){const nt=te;te=Ee,Ee=nt}const Ve=[te,Ee];_||Te(Ve);const Ue=[de(te),de(Ee)];s?.(Ve,Ue,{range:"end"}),o?.(Ve,Ue),we(null),Le("start"),k||$e(!1)}},[he,Be,N,l,Pe,ke,_,de,o,s,k,$e]),be=i.useCallback(Z=>{_||Te(Z),o?.(Z,[de(Z[0]),de(Z[1])]),$e(!1)},[_,de,o,$e]),Ke=i.useCallback(Z=>{Z.stopPropagation(),_||Te([null,null]),o?.(null,["",""])},[_,o]),Qe=i.useCallback(()=>{Pe==="date"||Pe==="week"?Ge("month"):(Pe==="month"||Pe==="quarter")&&Ge("year")},[Pe]),tt=Is[G],dt=Re.startsWith("top"),ft=Re.endsWith("Right"),gt={position:"absolute",zIndex:1050,...dt?{bottom:"100%",marginBottom:"0.25rem"}:{top:"100%",marginTop:"0.25rem"},...ft?{right:0}:{left:0}},Ct=m==="error"?n.colorErrorBg:m==="warning"?n.colorWarningBg:n.colorPrimaryLight,jt=g==="borderless"?"none":`1px solid ${We??n.colorBorder}`,Mt=g==="filled"?n.colorBgMuted:"transparent",ge=ke[0]&&N.isValid(ke[0])||ke[1]&&N.isValid(ke[1]),_e={start:Be??ke[0],end:Be?null:ke[1],hoverDate:Be?De:null},qe=N.getMonthNames("long"),st=Z=>{const te=N.getYear(Z);if(Pe==="year"){const Ee=Math.floor(te/10)*10;return`${Ee} - ${Ee+9}`}return Pe==="month"||Pe==="quarter"?String(te):`${qe[N.getMonth(Z)]} ${te}`},rt=(Z,te)=>{const Ee={adapter:N,disabledDate:C,minDate:w,maxDate:y,cellRender:L,styles:T,classNames:D};switch(Pe){case"year":return t.jsx(zs,{...Ee,viewDate:Z,value:null,onSelect:ne});case"month":return t.jsx(Ds,{...Ee,viewDate:Z,value:null,onSelect:ne});case"quarter":return t.jsx(Ws,{...Ee,viewDate:Z,value:null,onSelect:ne});default:return t.jsx(Ps,{...Ee,viewDate:Z,value:null,onSelect:ne,onHover:Oe,rangeInfo:_e,hideOutOfMonth:!0})}},xt=t.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[t.jsxs("div",{style:{display:"flex"},children:[t.jsxs("div",{children:[t.jsx(Po,{title:st(ee),onPrevYear:()=>ce(Z=>Pe==="year"?N.addYears(Z,-10):N.addYears(Z,-1)),onNextYear:()=>ce(Z=>Pe==="year"?N.addYears(Z,10):N.addYears(Z,1)),onPrevMonth:Pe==="date"?()=>ce(Z=>N.addMonths(Z,-1)):void 0,onNextMonth:Pe==="date"?()=>ce(Z=>N.addMonths(Z,1)):void 0,showMonthNav:Pe==="date",onTitleClick:Pe!=="year"?Qe:void 0,styles:T,classNames:D}),rt(ee)]}),t.jsxs("div",{children:[t.jsx(Po,{title:st(se),onPrevYear:()=>He(Z=>Pe==="year"?N.addYears(Z,-10):N.addYears(Z,-1)),onNextYear:()=>He(Z=>Pe==="year"?N.addYears(Z,10):N.addYears(Z,1)),onPrevMonth:Pe==="date"?()=>He(Z=>N.addMonths(Z,-1)):void 0,onNextMonth:Pe==="date"?()=>He(Z=>N.addMonths(Z,1)):void 0,showMonthNav:Pe==="date",onTitleClick:Pe!=="year"?Qe:void 0,styles:T,classNames:D}),rt(se)]})]}),t.jsx(Hs,{showToday:!1,showNow:!1,showOk:!1,presets:Pe===l?R:void 0,renderExtraFooter:Pe===l?H:void 0,onPresetSelect:Z=>be(Z),styles:T,classNames:D})]}),Rt=I?I(xt):xt,Lt=j!==void 0?j:t.jsx("span",{style:{color:n.colorTextMuted,display:"flex"},children:t.jsx(Ts,{})}),pe={flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",fontSize:tt.inputFontSize,fontFamily:"inherit",color:We??n.colorText,cursor:q?"not-allowed":void 0,padding:0,textAlign:"center"};return t.jsxs("div",{ref:Fe,className:Ye(W,D?.root),style:V({position:"relative",display:"inline-block"},T?.root,A),children:[t.jsxs("div",{ref:je,className:D?.input,onClick:()=>{!q&&!me&&($e(!0),Le("start"))},style:V({display:"flex",alignItems:"center",gap:"0.25rem",height:tt.height,padding:`0 ${tt.paddingH}`,border:jt,borderRadius:tt.radius,backgroundColor:Mt,cursor:q?"not-allowed":"pointer",opacity:q?.5:1,boxShadow:me&&g!=="borderless"?`0 0 0 2px ${Ct}`:void 0,transition:"border-color 0.2s ease, box-shadow 0.2s ease"},T?.input),onMouseEnter:Z=>{!q&&g!=="borderless"&&(Z.currentTarget.style.borderColor=We??n.colorPrimary)},onMouseLeave:Z=>{!q&&g!=="borderless"&&!me&&(Z.currentTarget.style.borderColor=We??n.colorBorder)},children:[v&&t.jsx("span",{style:{display:"flex",color:n.colorTextMuted,flexShrink:0},children:v}),t.jsx("input",{ref:ve,value:de(ke[0]),placeholder:ue[0],readOnly:p,disabled:le,onFocus:()=>{Le("start"),me||$e(!0)},style:{...pe,fontWeight:me&&he==="start"?600:400},onChange:()=>{}}),t.jsx("span",{style:{display:"flex",color:n.colorTextMuted,flexShrink:0},children:u??t.jsx(od,{})}),t.jsx("input",{ref:xe,value:de(ke[1]),placeholder:ue[1],readOnly:p,disabled:re,onFocus:()=>{Le("end"),me||$e(!0)},style:{...pe,fontWeight:me&&he==="end"?600:400},onChange:()=>{}}),b&&ge&&!q&&t.jsx("span",{onClick:Ke,style:{display:"flex",cursor:"pointer",color:n.colorTextMuted,flexShrink:0,transition:"color 0.15s ease"},onMouseEnter:Z=>{Z.currentTarget.style.color=n.colorText},onMouseLeave:Z=>{Z.currentTarget.style.color=n.colorTextMuted},children:t.jsx($o,{})}),Lt]}),me&&t.jsx("div",{ref:et,className:D?.popup,style:V({...gt,borderRadius:"0.5rem",border:`1px solid ${n.colorBorder}`,boxShadow:n.shadowMd,backgroundColor:n.colorBg,opacity:Ne?1:0,transform:Ne?"translateY(0)":`translateY(${dt?4:-4}px)`,transition:"opacity 0.2s ease, transform 0.2s ease",overflow:"hidden"},T?.popup),onMouseDown:Z=>Z.preventDefault(),children:Rt})]})}const ud=Object.assign(cd,{RangePicker:dd});let fr=null;function fd(){if(fr)return fr;try{fr=require("dayjs");const e=require("dayjs/plugin/weekOfYear"),r=require("dayjs/plugin/customParseFormat"),o=require("dayjs/plugin/quarterOfYear");fr.extend(e),fr.extend(r),fr.extend(o)}catch{throw new Error("DayjsAdapter requires dayjs to be installed. Run: npm install dayjs")}return fr}class hd{dayjs;constructor(r){this.dayjs=r??fd()}today(){return this.dayjs().startOf("day")}create(r){return r==null?this.dayjs(null):this.dayjs(r)}clone(r){return r.clone()}isValid(r){return r?r.isValid():!1}getYear(r){return r.year()}getMonth(r){return r.month()}getDate(r){return r.date()}getDay(r){return r.day()}getHour(r){return r.hour()}getMinute(r){return r.minute()}getSecond(r){return r.second()}setYear(r,o){return r.year(o)}setMonth(r,o){return r.month(o)}setDate(r,o){return r.date(o)}setHour(r,o){return r.hour(o)}setMinute(r,o){return r.minute(o)}setSecond(r,o){return r.second(o)}addDays(r,o){return r.add(o,"day")}addMonths(r,o){return r.add(o,"month")}addYears(r,o){return r.add(o,"year")}isSameDay(r,o){return r.isSame(o,"day")}isSameMonth(r,o){return r.isSame(o,"month")}isSameYear(r,o){return r.isSame(o,"year")}isBefore(r,o){return r.isBefore(o)}isAfter(r,o){return r.isAfter(o)}startOfWeek(r,o=1){const l=(r.day()-o+7)%7;return r.subtract(l,"day").startOf("day")}endOfWeek(r,o=1){return this.startOfWeek(r,o).add(6,"day").endOf("day")}startOfMonth(r){return r.startOf("month")}endOfMonth(r){return r.endOf("month")}getDaysInMonth(r){return r.daysInMonth()}getWeekNumber(r){return r.week()}format(r,o){return r.format(o)}parse(r,o){const s=this.dayjs(r,o,!0);return s.isValid()?s:null}getMonthNames(r="long"){const o=r==="short"?"MMM":"MMMM";return Array.from({length:12},(s,l)=>this.dayjs().month(l).format(o))}getDayNames(r="short"){const o=r==="narrow"?"dd":r==="short"?"ddd":"dddd";return Array.from({length:7},(s,l)=>this.dayjs().day(l).format(o))}getQuarterLabel(r){return`Q${r}`}}const pd=new _o,Fs=i.createContext(null);function gd({adapter:e,children:r}){return t.jsx(Fs.Provider,{value:e,children:r})}function md(e){const r=i.useContext(Fs);return e??r??pd}function vn(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"2 3.5 5 6.5 8 3.5"})})}function As(e,r,o,s=1){const l=e.setDate(e.setMonth(e.setYear(e.today(),r),o),1),a=e.startOfWeek(l,s),c=[];let u=a;for(let f=0;f<6;f++){const d=[];for(let h=0;h<7;h++)d.push(e.clone(u)),u=e.addDays(u,1);c.push(d)}return c}function xd(e,r,o,s){if(s?.(r))return!0;if(o){const[l,a]=o;if(e.isBefore(r,l)||e.isAfter(r,a))return!0}return!1}function so(e,r,o){if(!o)return r;const[s,l]=o;return e.isBefore(r,s)?e.clone(s):e.isAfter(r,l)?e.clone(l):r}function yd({adapter:e,value:r,mode:o,onValueChange:s,onModeChange:l,validRange:a,fullscreen:c,styles:u,classNames:f}){const d=e.getYear(r),h=e.getMonth(r),g=a?e.getYear(a[0]):d-10,m=a?e.getYear(a[1]):d+10,x=[];for(let y=g;y<=m;y++)x.push(y);const p=[],b=e.getMonthNames("long");for(let y=0;y<12;y++){if(a){const k=e.getYear(a[0]),B=e.getYear(a[1]),R=e.getMonth(a[0]),S=e.getMonth(a[1]);if(d===k&&y<R||d===B&&y>S)continue}p.push(y)}const v={position:"relative",display:"inline-flex",alignItems:"center"},j={appearance:"none",border:`1px solid ${n.colorBorder}`,borderRadius:"0.375rem",backgroundColor:n.colorBg,color:n.colorText,fontSize:c?"0.875rem":"0.8125rem",fontFamily:"inherit",fontWeight:500,padding:c?"0.25rem 1.75rem 0.25rem 0.5rem":"0.125rem 1.5rem 0.125rem 0.375rem",cursor:"pointer",outline:"none",transition:"border-color 0.15s ease"},C={position:"absolute",right:"0.375rem",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",color:n.colorTextMuted,display:"flex",alignItems:"center"},w={border:`1px solid ${n.colorBorder}`,padding:c?"0.25rem 0.75rem":"0.125rem 0.5rem",fontSize:c?"0.8125rem":"0.75rem",fontFamily:"inherit",cursor:"pointer",transition:"all 0.15s ease",lineHeight:1.4};return t.jsxs("div",{className:f?.header,style:V({display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"0.5rem",padding:c?"0.75rem 1rem":"0.5rem 0.75rem",borderBottom:`1px solid ${n.colorBorder}`},u?.header),children:[t.jsxs("div",{style:v,children:[t.jsx("select",{style:j,value:d,onChange:y=>{const k=Number(y.target.value);let B=e.setYear(e.clone(r),k);B=so(e,B,a),s(B)},onFocus:y=>{y.currentTarget.style.borderColor=n.colorPrimary},onBlur:y=>{y.currentTarget.style.borderColor=n.colorBorder},children:x.map(y=>t.jsx("option",{value:y,children:y},y))}),t.jsx("span",{style:C,children:t.jsx(vn,{})})]}),o==="month"&&t.jsxs("div",{style:v,children:[t.jsx("select",{style:j,value:h,onChange:y=>{const k=Number(y.target.value);let B=e.setMonth(e.clone(r),k);B=so(e,B,a),s(B)},onFocus:y=>{y.currentTarget.style.borderColor=n.colorPrimary},onBlur:y=>{y.currentTarget.style.borderColor=n.colorBorder},children:p.map(y=>t.jsx("option",{value:y,children:b[y]},y))}),t.jsx("span",{style:C,children:t.jsx(vn,{})})]}),t.jsxs("div",{style:{display:"inline-flex"},children:[t.jsx("button",{type:"button",onClick:()=>l("month"),style:{...w,borderRadius:"0.375rem 0 0 0.375rem",borderRight:"none",backgroundColor:o==="month"?n.colorPrimary:n.colorBg,color:o==="month"?"#fff":n.colorText,borderColor:o==="month"?n.colorPrimary:n.colorBorder},onMouseEnter:y=>{o!=="month"&&(y.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:y=>{o!=="month"&&(y.currentTarget.style.backgroundColor=n.colorBg)},children:"Month"}),t.jsx("button",{type:"button",onClick:()=>l("year"),style:{...w,borderRadius:"0 0.375rem 0.375rem 0",backgroundColor:o==="year"?n.colorPrimary:n.colorBg,color:o==="year"?"#fff":n.colorText,borderColor:o==="year"?n.colorPrimary:n.colorBorder},onMouseEnter:y=>{o!=="year"&&(y.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:y=>{o!=="year"&&(y.currentTarget.style.backgroundColor=n.colorBg)},children:"Year"})]})]})}function bd({adapter:e,viewDate:r,value:o,onSelect:s,disabledDate:l,cellRender:a,showWeek:c,styles:u,classNames:f}){const d=e.getYear(r),h=e.getMonth(r),g=e.today(),m=As(e,d,h,1),x=e.getDayNames("narrow"),p=[...x.slice(1),x[0]],b="2rem",v="1.75rem",j=c?`1.5rem repeat(7, ${b})`:`repeat(7, ${b})`;return t.jsx("div",{className:f?.body,style:V({padding:"0 0.5rem 0.5rem",display:"flex",justifyContent:"center",flex:1},u?.body),children:t.jsxs("div",{style:{display:"grid",gridTemplateColumns:j,gridAutoRows:b,placeItems:"center"},children:[c&&t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:"0.625rem",fontWeight:600,color:n.colorTextSubtle},children:"Wk"}),p.map((C,w)=>t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:b,height:b,fontSize:"0.75rem",fontWeight:600,color:n.colorTextMuted},children:C},`h-${w}`)),m.map((C,w)=>{const y=[];if(c){const k=e.getWeekNumber(C[0]);y.push(t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:"0.625rem",color:n.colorTextSubtle},children:k},`wk-${w}`))}return C.forEach((k,B)=>{const R=e.isSameMonth(k,r),S=e.isSameDay(k,g),E=o&&e.isValid(o)&&e.isSameDay(k,o),$=l?.(k)??!1,I={display:"grid",placeContent:"center",width:v,height:v,fontSize:"0.8125rem",borderRadius:"50%",cursor:$?"not-allowed":"pointer",color:E?"#fff":$?n.colorTextSubtle:R?n.colorText:n.colorTextSubtle,backgroundColor:E?n.colorPrimary:"transparent",fontWeight:S?700:400,boxShadow:S&&!E?`inset 0 0 0 1.5px ${n.colorPrimary}`:"none",transition:"background-color 0.1s ease, color 0.1s ease",opacity:$?.4:1},L=t.jsx("span",{style:{lineHeight:0},children:e.getDate(k)}),P=a?a(k,{type:"date",originNode:L,today:S}):L;y.push(t.jsx("div",{style:I,className:f?.cell,onClick:()=>{$||s(k)},onMouseEnter:H=>{!$&&!E&&(H.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:H=>{!$&&!E&&(H.currentTarget.style.backgroundColor="transparent")},children:P},`${w}-${B}`))}),y})]})})}function vd({adapter:e,viewDate:r,value:o,onSelect:s,disabledDate:l,cellRender:a,styles:c,classNames:u}){const f=e.getMonthNames("short"),d=e.today(),h=e.getYear(r);return t.jsx("div",{className:u?.body,style:V({padding:"0.5rem",display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"0.5rem",flex:1,alignContent:"center"},c?.body),children:f.map((g,m)=>{const x=e.setMonth(e.setDate(e.setYear(e.today(),h),1),m),p=e.isSameMonth(x,d),b=o&&e.isValid(o)&&e.isSameMonth(x,o)&&e.isSameYear(x,o),v=l?.(x)??!1,j=t.jsx("span",{children:g}),C=a?a(x,{type:"month",originNode:j,today:p}):j;return t.jsx("button",{type:"button",disabled:v,onClick:()=>s(x),className:u?.cell,style:{height:"2.5rem",border:p&&!b?`1px solid ${n.colorPrimary}`:"1px solid transparent",borderRadius:"0.375rem",cursor:v?"not-allowed":"pointer",backgroundColor:b?n.colorPrimary:"transparent",color:b?"#fff":v?n.colorTextSubtle:n.colorText,fontSize:"0.8125rem",fontWeight:p?600:400,fontFamily:"inherit",transition:"background-color 0.1s ease",opacity:v?.4:1},onMouseEnter:w=>{!v&&!b&&(w.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:w=>{!v&&!b&&(w.currentTarget.style.backgroundColor="transparent")},children:C},m)})})}function Cd({adapter:e,viewDate:r,value:o,onSelect:s,disabledDate:l,cellRender:a,fullCellRender:c,showWeek:u,styles:f,classNames:d}){const h=e.getYear(r),g=e.getMonth(r),m=e.today(),x=As(e,h,g,1),p=e.getDayNames("short"),b=[...p.slice(1),p[0]],v=u?"2.5rem repeat(7, 1fr)":"repeat(7, 1fr)";return t.jsxs("div",{className:d?.body,style:V({overflow:"hidden"},f?.body),children:[t.jsxs("div",{style:{display:"grid",gridTemplateColumns:v,borderBottom:`1px solid ${n.colorBorder}`},children:[u&&t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"0.5rem 0",fontSize:"0.75rem",fontWeight:600,color:n.colorTextSubtle,borderRight:`1px solid ${n.colorBorder}`},children:"Wk"}),b.map((j,C)=>t.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"0.5rem 0.75rem",fontSize:"0.875rem",fontWeight:600,color:n.colorTextMuted,borderRight:C<b.length-1?`1px solid ${n.colorBorder}`:"none"},children:j},`h-${C}`))]}),x.map((j,C)=>t.jsxs("div",{style:{display:"grid",gridTemplateColumns:v,borderBottom:C<x.length-1?`1px solid ${n.colorBorder}`:"none"},children:[u&&t.jsx("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"center",padding:"0.5rem 0",fontSize:"0.75rem",color:n.colorTextSubtle,borderRight:`1px solid ${n.colorBorder}`},children:e.getWeekNumber(j[0])}),j.map((w,y)=>{const k=e.isSameMonth(w,r),B=e.isSameDay(w,m),R=o&&e.isValid(o)&&e.isSameDay(w,o),S=l?.(w)??!1,E=e.getDate(w),I={type:"date",originNode:t.jsx("span",{children:E}),today:B};if(c)return t.jsx("div",{className:d?.cell,style:{minHeight:"5rem",borderRight:y<6?`1px solid ${n.colorBorder}`:"none",cursor:S?"not-allowed":"pointer",opacity:S?.4:1},onClick:()=>{S||s(w)},children:c(w,I)},`${C}-${y}`);const L={display:"inline-flex",alignItems:"center",justifyContent:"center",width:"1.5rem",height:"1.5rem",borderRadius:"50%",fontSize:"0.875rem",fontWeight:B?700:400,backgroundColor:R?n.colorPrimary:"transparent",color:R?"#fff":k?n.colorText:n.colorTextSubtle,boxShadow:B&&!R?`inset 0 0 0 1.5px ${n.colorPrimary}`:"none",transition:"background-color 0.1s ease"},P=a?a(w,I):null;return t.jsxs("div",{className:d?.cell,style:{minHeight:"5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",borderRight:y<6?`1px solid ${n.colorBorder}`:"none",cursor:S?"not-allowed":"pointer",transition:"background-color 0.15s ease",opacity:S?.4:1,backgroundColor:R?n.colorPrimaryBg:"transparent",overflow:"hidden"},onClick:()=>{S||s(w)},onMouseEnter:H=>{!S&&!R&&(H.currentTarget.style.backgroundColor=n.colorBgSubtle)},onMouseLeave:H=>{S||(H.currentTarget.style.backgroundColor=R?n.colorPrimaryBg:"transparent")},children:[t.jsx("div",{style:{display:"flex",justifyContent:"flex-end",padding:"0 0.5rem",marginBottom:"0.25rem"},children:t.jsx("span",{style:L,children:E})}),P&&t.jsx("div",{style:{fontSize:"0.75rem"},children:P})]},`${C}-${y}`)})]},`row-${C}`))]})}function kd({adapter:e,viewDate:r,value:o,onSelect:s,disabledDate:l,cellRender:a,fullCellRender:c,styles:u,classNames:f}){const d=e.getMonthNames("long"),h=e.today(),g=e.getYear(r);return t.jsx("div",{className:f?.body,style:V({display:"grid",gridTemplateColumns:"repeat(3, 1fr)",overflow:"hidden"},u?.body),children:d.map((m,x)=>{const p=e.setMonth(e.setDate(e.setYear(e.today(),g),1),x),b=e.isSameMonth(p,h),v=o&&e.isValid(o)&&e.isSameMonth(p,o)&&e.isSameYear(p,o),j=l?.(p)??!1,w={type:"month",originNode:t.jsx("span",{children:m}),today:b};if(c)return t.jsx("div",{className:f?.cell,style:{minHeight:"5rem",borderRight:x%3<2?`1px solid ${n.colorBorder}`:"none",borderBottom:x<9?`1px solid ${n.colorBorder}`:"none",cursor:j?"not-allowed":"pointer",opacity:j?.4:1},onClick:()=>{j||s(p)},children:c(p,w)},x);const y={display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"0.125rem 0.5rem",borderRadius:"0.375rem",fontSize:"0.875rem",fontWeight:b?600:400,backgroundColor:v?n.colorPrimary:"transparent",color:v?"#fff":n.colorText,boxShadow:b&&!v?`inset 0 0 0 1.5px ${n.colorPrimary}`:"none",transition:"background-color 0.1s ease"},k=a?a(p,w):null;return t.jsxs("div",{className:f?.cell,style:{minHeight:"5rem",padding:"0.5rem 0.75rem",borderRight:x%3<2?`1px solid ${n.colorBorder}`:"none",borderBottom:x<9?`1px solid ${n.colorBorder}`:"none",cursor:j?"not-allowed":"pointer",transition:"background-color 0.15s ease",opacity:j?.4:1},onClick:()=>{j||s(p)},onMouseEnter:B=>{j||(B.currentTarget.style.backgroundColor=n.colorBgSubtle)},onMouseLeave:B=>{j||(B.currentTarget.style.backgroundColor="transparent")},children:[t.jsx("div",{style:{marginBottom:"0.25rem"},children:t.jsx("span",{style:y,children:m})}),k&&t.jsx("div",{style:{fontSize:"0.75rem"},children:k})]},x)})})}function wd({value:e,defaultValue:r,fullscreen:o=!0,mode:s,defaultMode:l="month",showWeek:a=!1,headerRender:c,cellRender:u,fullCellRender:f,validRange:d,disabledDate:h,onChange:g,onPanelChange:m,onSelect:x,adapter:p,className:b,style:v,classNames:j,styles:C}){const w=md(p),[y,k]=i.useState(()=>{const A=e??r??w.today();return d?so(w,A,d):A}),B=e!==void 0?e:y,[R,S]=i.useState(s??l),E=s!==void 0?s:R,[$,I]=i.useState(B);i.useEffect(()=>{e!==void 0&&I(e)},[e]);const L=i.useMemo(()=>{if(!(!h&&!d))return A=>xd(w,A,d,h)},[w,h,d]),P=i.useCallback((A,D)=>{const T=d?so(w,A,d):A;e===void 0&&k(T),I(T),g?.(T),x?.(T,{source:D})},[w,g,x,e,d]),H=i.useCallback(A=>{s===void 0&&S(A),m?.(B,A)},[B,m,s]),z=i.useCallback(A=>{I(A),e===void 0&&k(A),g?.(A);const D=w.getMonth(A)!==w.getMonth(B)?"month":"year";x?.(A,{source:D})},[w,B,g,x,e]),F=V({display:"flex",flexDirection:"column",backgroundColor:n.colorBg,border:`1px solid ${n.colorBorder}`,borderRadius:o?"0.5rem":"0.375rem",overflow:"hidden",fontFamily:"inherit",...o?{width:"100%"}:{width:"18.75rem"}},C?.root,v),M=c?c({value:B,type:E,onChange:z,onTypeChange:H}):t.jsx(yd,{adapter:w,value:$,mode:E,onValueChange:z,onModeChange:H,validRange:d,fullscreen:o,styles:C,classNames:j});let W;return E==="month"?W=o?t.jsx(Cd,{adapter:w,viewDate:$,value:B,onSelect:A=>P(A,"date"),disabledDate:L,cellRender:u,fullCellRender:f,showWeek:a,styles:C,classNames:j}):t.jsx(bd,{adapter:w,viewDate:$,value:B,onSelect:A=>P(A,"date"),disabledDate:L,cellRender:u,showWeek:a,styles:C,classNames:j}):W=o?t.jsx(kd,{adapter:w,viewDate:$,value:B,onSelect:A=>P(A,"month"),disabledDate:L,cellRender:u,fullCellRender:f,styles:C,classNames:j}):t.jsx(vd,{adapter:w,viewDate:$,value:B,onSelect:A=>P(A,"month"),disabledDate:L,cellRender:u,styles:C,classNames:j}),t.jsxs("div",{className:Ye(b,j?.root),style:F,children:[M,W]})}const jd=wd,Sd=`
|
|
113
113
|
@keyframes j-card-loading {
|
|
114
114
|
0%, 100% { opacity: 0.4; }
|
|
115
115
|
50% { opacity: 1; }
|
|
116
|
-
}`,Md=["100%","75%","90%","60%"];function Bd(){return t.jsxs(t.Fragment,{children:[t.jsx("style",{children:Sd}),t.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:Md.map((e,r)=>t.jsx("div",{style:{height:"1rem",width:e,backgroundColor:n.colorBgMuted,borderRadius:"0.25rem",animation:"j-card-loading 1.5s ease-in-out infinite",animationDelay:`${r*.15}s`}},r))})]})}function Rd({avatar:e,title:r,description:o,className:s,style:l}){return t.jsxs("div",{className:s,style:{display:"flex",alignItems:"flex-start",gap:"1rem",...l},children:[e&&t.jsx("div",{style:{flexShrink:0},children:e}),(r||o)&&t.jsxs("div",{style:{flex:1,minWidth:0},children:[r&&t.jsx("div",{style:{fontSize:"1rem",fontWeight:600,color:n.colorText,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r}),o&&t.jsx("div",{style:{fontSize:"0.875rem",color:n.colorTextMuted,marginTop:r?"0.25rem":0},children:o})]})]})}Os._isCardGrid=!0;function Os({hoverable:e=!0,children:r,className:o,style:s}){const l=i.useRef(null);return t.jsx("div",{ref:l,className:o,style:{width:"33.33%",padding:"1.5rem",borderRight:`1px solid ${n.colorBorder}`,borderBottom:`1px solid ${n.colorBorder}`,transition:"box-shadow 0.2s ease",cursor:e?"pointer":void 0,...s},onMouseEnter:()=>{e&&l.current&&(l.current.style.boxShadow=n.shadowMd,l.current.style.position="relative",l.current.style.zIndex="1")},onMouseLeave:()=>{e&&l.current&&(l.current.style.boxShadow="",l.current.style.position="",l.current.style.zIndex="")},children:r})}function Td({title:e,extra:r,cover:o,actions:s,loading:l=!1,hoverable:a=!1,size:c="default",variant:u="outlined",type:f,tabList:d,activeTabKey:h,defaultActiveTabKey:g,tabProps:m,onTabChange:x,children:p,className:b,style:v,classNames:j,styles:C}){const w=i.useRef(null),y=c==="small",k=f==="inner",B=y?"0.75rem":"1.5rem",R=y?"0.75rem":"1.5rem",S=i.Children.toArray(p).some(E=>i.isValidElement(E)&&E.type?._isCardGrid===!0),L=e||r||d,$=V({backgroundColor:n.colorBg,borderRadius:"0.5rem",overflow:"hidden",fontFamily:"inherit",transition:"box-shadow 0.2s ease, transform 0.2s ease",...u==="outlined"?{border:`1px solid ${n.colorBorder}`}:{border:"none"}},C?.root,v),I=()=>{a&&w.current&&(w.current.style.boxShadow=n.shadowLg,w.current.style.transform="translateY(-1px)")},P=()=>{a&&w.current&&(w.current.style.boxShadow="",w.current.style.transform="")};return t.jsxs("div",{ref:w,className:Ve(b,j?.root),style:$,onMouseEnter:I,onMouseLeave:P,children:[o&&t.jsx("div",{className:j?.cover,style:V({overflow:"hidden"},C?.cover),children:o}),L&&t.jsxs("div",{className:j?.header,style:V({padding:`${R} ${R} ${d?"0":R}`,borderBottom:`1px solid ${n.colorBorder}`,...k?{backgroundColor:n.colorBgSubtle}:{}},C?.header),children:[(e||r)&&t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"1rem",marginBottom:d?"0.75rem":0},children:[e&&t.jsx("div",{className:j?.title,style:V({flex:1,minWidth:0,fontSize:y?"0.875rem":"1rem",fontWeight:600,color:n.colorText,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},C?.title),children:e}),r&&t.jsx("div",{className:j?.extra,style:V({flexShrink:0,fontSize:"0.875rem",color:n.colorPrimary},C?.extra),children:r})]}),d&&t.jsx(bs,{items:d.map(E=>({key:E.key,label:E.label,disabled:E.disabled})),activeKey:h,defaultActiveKey:g,size:y?"small":"large",type:"line",onChange:x,...m,styles:{root:{marginBottom:"-1px"},...m?.styles}})]}),t.jsx("div",{className:j?.body,style:V({padding:S?0:B,...S?{display:"flex",flexWrap:"wrap"}:{}},C?.body),children:l?t.jsx(Bd,{}):p}),s&&s.length>0&&t.jsx("ul",{className:j?.actions,style:V({display:"flex",margin:0,padding:0,listStyle:"none",borderTop:`1px solid ${n.colorBorder}`},C?.actions),children:s.map((E,H)=>t.jsx("li",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.75rem 0",color:n.colorTextMuted,cursor:"pointer",borderRight:H<s.length-1?`1px solid ${n.colorBorder}`:"none",transition:"color 0.15s ease"},onMouseEnter:z=>{z.currentTarget.style.color=n.colorPrimary},onMouseLeave:z=>{z.currentTarget.style.color=n.colorTextMuted},children:t.jsx("span",{children:E})},H))})]})}const Id=Object.assign(Td,{Meta:Rd,Grid:Os});function Ld(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"9 3 5 7 9 11"})})}function Ed(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"5 3 9 7 5 11"})})}function $d(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"3 9 7 5 11 9"})})}function Pd(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"3 5 7 9 11 5"})})}const Dd=i.forwardRef(function({autoplay:r=!1,autoplaySpeed:o=3e3,arrows:s=!1,dots:l=!0,dotPlacement:a="bottom",effect:c="scrollx",speed:u=500,easing:f="ease",infinite:d=!0,draggable:h=!1,dragClamp:g=!1,dotProgress:m=!1,initialSlide:x=0,waitForAnimate:p=!1,beforeChange:b,afterChange:v,children:j,className:C,style:w,classNames:y,styles:k},B){const R=i.Children.toArray(j),S=R.length,L=a==="left"||a==="right",$=c==="fade",[I,P]=i.useState(x),[E,H]=i.useState(!1),[z,A]=i.useState(!0),[M,W]=i.useState(!1),[F,D]=i.useState(0),T=!$&&d&&S>1,O=i.useRef(null),Y=i.useRef(null),X=i.useRef(null),_=i.useRef({startX:0,startY:0,deltaX:0,deltaY:0,dragging:!1}),G=i.useRef(v);G.current=v;const Q=i.useCallback((se,we=!0)=>{if(S===0||p&&E)return;const ie=(se%S+S)%S;if(b?.(I,ie),!we){A(!1),P(ie),H(!1),requestAnimationFrame(()=>{A(!0),G.current?.(ie)});return}if($){H(!0),P(ie),setTimeout(()=>{H(!1),G.current?.(ie)},u);return}T?(H(!0),se<0?(A(!0),P(-1),setTimeout(()=>{A(!1),P(S-1),requestAnimationFrame(()=>{A(!0),H(!1),G.current?.(S-1)})},u)):se>=S?(A(!0),P(S),setTimeout(()=>{A(!1),P(0),requestAnimationFrame(()=>{A(!0),H(!1),G.current?.(0)})},u)):(A(!0),P(ie),setTimeout(()=>{H(!1),G.current?.(ie)},u))):(H(!0),P(ie),setTimeout(()=>{H(!1),G.current?.(ie)},u))},[S,I,E,p,b,u,$,T]),N=i.useCallback(()=>{S<=1||(d?Q(I+1>=S?S:I+1):I<S-1&&Q(I+1))},[S,I,d,Q]),le=i.useCallback(()=>{S<=1||(d?Q(I-1<0?-1:I-1):I>0&&Q(I-1))},[S,I,d,Q]);i.useImperativeHandle(B,()=>({goTo:Q,next:N,prev:le}),[Q,N,le]);const oe=i.useCallback(()=>{!r||S<=1||(X.current&&clearInterval(X.current),X.current=setInterval(()=>N(),o))},[r,o,S,N]),q=i.useCallback(()=>{X.current&&(clearInterval(X.current),X.current=null)},[]);i.useEffect(()=>(oe(),q),[oe,q]);const K=i.useCallback(()=>{r&&(q(),W(!0))},[r,q]),re=i.useCallback(()=>{r&&(oe(),W(!1),D(se=>se+1))},[r,oe]),Te=i.useCallback(se=>{h&&(_.current={startX:se.clientX,startY:se.clientY,deltaX:0,deltaY:0,dragging:!0},se.currentTarget.setPointerCapture(se.pointerId))},[h]),Ce=i.useCallback(se=>{const we=_.current;if(we.dragging&&(we.deltaX=se.clientX-we.startX,we.deltaY=se.clientY-we.startY,Y.current&&!$)){let ie=L?we.deltaY:we.deltaX;const ce=L?O.current?.clientHeight??1:O.current?.clientWidth??1;g&&(ie=Math.max(-ce,Math.min(ce,ie)));const He=-(T?I+1:I)*100,Pe=ie/ce*100;Y.current.style.transition="none",Y.current.style.transform=L?`translateY(${He+Pe}%)`:`translateX(${He+Pe}%)`}},[I,T,$,L,g]),Le=i.useCallback(()=>{const se=_.current;if(!se.dragging||(se.dragging=!1,$||!Y.current))return;const we=L?se.deltaY:se.deltaX,ie=L?O.current?.clientHeight??1:O.current?.clientWidth??1,ce=T?I+1:I,He=-ce*100,Pe=we/ie*100,Ge=He+Pe;let Z=Math.round(-Ge/100);if(T?Z=Math.max(0,Math.min(S+1,Z)):Z=Math.max(0,Math.min(S-1,Z)),g&&(Z=Math.max(ce-1,Math.min(ce+1,Z))),Y.current.style.transition=`transform ${u}ms ${f}`,Z===ce){const Be=-ce*100,Oe=L?`translateY(${Be}%)`:`translateX(${Be}%)`;Y.current.style.transform=Oe,setTimeout(()=>{Y.current&&(Y.current.style.transition=`transform ${u}ms ${f}`,Y.current.style.transform=Oe)},u)}else{const Be=-Z*100;Y.current.style.transform=L?`translateY(${Be}%)`:`translateX(${Be}%)`;let Oe;T&&Z===0?Oe=S-1:T&&Z===S+1?Oe=0:Oe=T?Z-1:Z,b?.(I,Oe),H(!0),setTimeout(()=>{Y.current&&(Y.current.style.transition="",Y.current.style.transform=""),A(!1),P(Oe),requestAnimationFrame(()=>{A(!0),H(!1),G.current?.(Oe)})},u)}r&&oe()},[I,S,d,L,T,$,u,f,r,g,b,oe]),ue=()=>{if($)return R.map((ie,ce)=>t.jsx("div",{className:y?.slide,style:V({position:ce===0?"relative":"absolute",...ce!==0?{inset:0}:{},width:"100%",flexShrink:0,opacity:ce===I?1:0,zIndex:ce===I?1:0,transition:z?`opacity ${u}ms ${f}`:"none"},k?.slide),children:ie},ce));const se=[],we={width:"100%",flexShrink:0,...L?{height:"100%"}:{}};return T&&se.push(t.jsx("div",{className:y?.slide,style:V(we,k?.slide),children:R[S-1]},"clone-last")),R.forEach((ie,ce)=>{se.push(t.jsx("div",{className:y?.slide,style:V(we,k?.slide),children:ie},ce))}),T&&se.push(t.jsx("div",{className:y?.slide,style:V(we,k?.slide),children:R[0]},"clone-first")),se},ze=()=>{if($)return"none";const se=-(T?I+1:I)*100;return L?`translateY(${se}%)`:`translateX(${se}%)`},xe=(I%S+S)%S,ge=l!==!1&&S>1,Ie=typeof l=="object"?l.className:void 0,De=()=>{if(!ge)return null;const se=a==="top"||a==="bottom";return t.jsx("div",{className:Ie?`${Ie} ${y?.dots??""}`.trim():y?.dots,style:V({display:"flex",flexDirection:se?"row":"column",gap:"0.375rem",justifyContent:"center",alignItems:"center",padding:se?"0.75rem 0":"0 0.75rem"},k?.dots),children:R.map((we,ie)=>{const ce=ie===xe;return t.jsx("button",{type:"button",onClick:()=>Q(ie),style:{position:"relative",overflow:"hidden",width:se?ce?"1.5rem":"1rem":"0.1875rem",height:se?"0.1875rem":ce?"1.5rem":"1rem",borderRadius:"1rem",border:"none",padding:0,cursor:"pointer",backgroundColor:ce&&!(r&&m)?n.colorPrimary:n.colorTextSubtle,opacity:ce&&!(r&&m)?1:.4,transition:"all 0.3s ease"},"aria-label":`Go to slide ${ie+1}`,children:ce&&r&&m&&t.jsx("div",{style:{position:"absolute",inset:0,backgroundColor:n.colorPrimary,borderRadius:"inherit",transformOrigin:se?"left center":"center top",animationName:se?"j-carousel-fill-h":"j-carousel-fill-v",animationDuration:`${o}ms`,animationTimingFunction:"linear",animationFillMode:"forwards",animationPlayState:M?"paused":"running"}},`progress-${xe}-${F}`)},ie)})})},Ae=()=>{if(!s||S<=1)return null;const se=L?$d:Ld,we=L?Pd:Ed,ie={position:"absolute",zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",width:"2rem",height:"2rem",borderRadius:"50%",border:"none",backgroundColor:"rgba(0,0,0,0.25)",color:"#fff",cursor:"pointer",transition:"background-color 0.2s ease",padding:0},ce=L?{top:"0.5rem",left:"50%",transform:"translateX(-50%)"}:{left:"0.5rem",top:"50%",transform:"translateY(-50%)"},He=L?{bottom:"0.5rem",left:"50%",transform:"translateX(-50%)"}:{right:"0.5rem",top:"50%",transform:"translateY(-50%)"};return t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",className:y?.arrow,style:V({...ie,...ce},k?.arrow),onClick:le,onMouseEnter:Pe=>{Pe.currentTarget.style.backgroundColor="rgba(0,0,0,0.5)"},onMouseLeave:Pe=>{Pe.currentTarget.style.backgroundColor="rgba(0,0,0,0.25)"},"aria-label":"Previous slide",children:t.jsx(se,{})}),t.jsx("button",{type:"button",className:y?.arrow,style:V({...ie,...He},k?.arrow),onClick:N,onMouseEnter:Pe=>{Pe.currentTarget.style.backgroundColor="rgba(0,0,0,0.5)"},onMouseLeave:Pe=>{Pe.currentTarget.style.backgroundColor="rgba(0,0,0,0.25)"},"aria-label":"Next slide",children:t.jsx(we,{})})]})},Re=a==="top"||a==="left",ee=V({position:"relative",display:"flex",flexDirection:L?"row":"column",overflow:"hidden",fontFamily:"inherit"},k?.root,w),ae=V({display:"flex",flexDirection:$?"row":L?"column":"row",position:"relative",...L&&!$?{height:"100%"}:{},...$?{}:{transform:ze(),transition:z?`transform ${u}ms ${f}`:"none"},...h?{touchAction:L?"pan-x":"pan-y"}:{}},k?.track);return S===0?null:t.jsxs("div",{ref:O,className:Ve(C,y?.root),style:ee,onMouseEnter:K,onMouseLeave:re,children:[r&&m&&ge&&t.jsx("style",{children:`
|
|
116
|
+
}`,Md=["100%","75%","90%","60%"];function Bd(){return t.jsxs(t.Fragment,{children:[t.jsx("style",{children:Sd}),t.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:Md.map((e,r)=>t.jsx("div",{style:{height:"1rem",width:e,backgroundColor:n.colorBgMuted,borderRadius:"0.25rem",animation:"j-card-loading 1.5s ease-in-out infinite",animationDelay:`${r*.15}s`}},r))})]})}function Rd({avatar:e,title:r,description:o,className:s,style:l}){return t.jsxs("div",{className:s,style:{display:"flex",alignItems:"flex-start",gap:"1rem",...l},children:[e&&t.jsx("div",{style:{flexShrink:0},children:e}),(r||o)&&t.jsxs("div",{style:{flex:1,minWidth:0},children:[r&&t.jsx("div",{style:{fontSize:"1rem",fontWeight:600,color:n.colorText,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r}),o&&t.jsx("div",{style:{fontSize:"0.875rem",color:n.colorTextMuted,marginTop:r?"0.25rem":0},children:o})]})]})}Os._isCardGrid=!0;function Os({hoverable:e=!0,children:r,className:o,style:s}){const l=i.useRef(null);return t.jsx("div",{ref:l,className:o,style:{width:"33.33%",padding:"1.5rem",borderRight:`1px solid ${n.colorBorder}`,borderBottom:`1px solid ${n.colorBorder}`,transition:"box-shadow 0.2s ease",cursor:e?"pointer":void 0,...s},onMouseEnter:()=>{e&&l.current&&(l.current.style.boxShadow=n.shadowMd,l.current.style.position="relative",l.current.style.zIndex="1")},onMouseLeave:()=>{e&&l.current&&(l.current.style.boxShadow="",l.current.style.position="",l.current.style.zIndex="")},children:r})}function Td({title:e,extra:r,cover:o,actions:s,loading:l=!1,hoverable:a=!1,size:c="default",variant:u="outlined",type:f,tabList:d,activeTabKey:h,defaultActiveTabKey:g,tabProps:m,onTabChange:x,children:p,className:b,style:v,classNames:j,styles:C}){const w=i.useRef(null),y=c==="small",k=f==="inner",B=y?"0.75rem":"1.5rem",R=y?"0.75rem":"1.5rem",S=i.Children.toArray(p).some(P=>i.isValidElement(P)&&P.type?._isCardGrid===!0),E=e||r||d,$=V({backgroundColor:n.colorBg,borderRadius:"0.5rem",overflow:"hidden",fontFamily:"inherit",transition:"box-shadow 0.2s ease, transform 0.2s ease",...u==="outlined"?{border:`1px solid ${n.colorBorder}`}:{border:"none"}},C?.root,v),I=()=>{a&&w.current&&(w.current.style.boxShadow=n.shadowLg,w.current.style.transform="translateY(-1px)")},L=()=>{a&&w.current&&(w.current.style.boxShadow="",w.current.style.transform="")};return t.jsxs("div",{ref:w,className:Ye(b,j?.root),style:$,onMouseEnter:I,onMouseLeave:L,children:[o&&t.jsx("div",{className:j?.cover,style:V({overflow:"hidden"},C?.cover),children:o}),E&&t.jsxs("div",{className:j?.header,style:V({padding:`${R} ${R} ${d?"0":R}`,borderBottom:`1px solid ${n.colorBorder}`,...k?{backgroundColor:n.colorBgSubtle}:{}},C?.header),children:[(e||r)&&t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"1rem",marginBottom:d?"0.75rem":0},children:[e&&t.jsx("div",{className:j?.title,style:V({flex:1,minWidth:0,fontSize:y?"0.875rem":"1rem",fontWeight:600,color:n.colorText,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},C?.title),children:e}),r&&t.jsx("div",{className:j?.extra,style:V({flexShrink:0,fontSize:"0.875rem",color:n.colorPrimary},C?.extra),children:r})]}),d&&t.jsx(bs,{items:d.map(P=>({key:P.key,label:P.label,disabled:P.disabled})),activeKey:h,defaultActiveKey:g,size:y?"small":"large",type:"line",onChange:x,...m,styles:{root:{marginBottom:"-1px"},...m?.styles}})]}),t.jsx("div",{className:j?.body,style:V({padding:S?0:B,...S?{display:"flex",flexWrap:"wrap"}:{}},C?.body),children:l?t.jsx(Bd,{}):p}),s&&s.length>0&&t.jsx("ul",{className:j?.actions,style:V({display:"flex",margin:0,padding:0,listStyle:"none",borderTop:`1px solid ${n.colorBorder}`},C?.actions),children:s.map((P,H)=>t.jsx("li",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.75rem 0",color:n.colorTextMuted,cursor:"pointer",borderRight:H<s.length-1?`1px solid ${n.colorBorder}`:"none",transition:"color 0.15s ease"},onMouseEnter:z=>{z.currentTarget.style.color=n.colorPrimary},onMouseLeave:z=>{z.currentTarget.style.color=n.colorTextMuted},children:t.jsx("span",{children:P})},H))})]})}const Id=Object.assign(Td,{Meta:Rd,Grid:Os});function Ld(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"9 3 5 7 9 11"})})}function Ed(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"5 3 9 7 5 11"})})}function $d(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"3 9 7 5 11 9"})})}function Pd(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"3 5 7 9 11 5"})})}const Dd=i.forwardRef(function({autoplay:r=!1,autoplaySpeed:o=3e3,arrows:s=!1,dots:l=!0,dotPlacement:a="bottom",effect:c="scrollx",speed:u=500,easing:f="ease",infinite:d=!0,draggable:h=!1,dragClamp:g=!1,dotProgress:m=!1,initialSlide:x=0,waitForAnimate:p=!1,beforeChange:b,afterChange:v,children:j,className:C,style:w,classNames:y,styles:k},B){const R=i.Children.toArray(j),S=R.length,E=a==="left"||a==="right",$=c==="fade",[I,L]=i.useState(x),[P,H]=i.useState(!1),[z,F]=i.useState(!0),[M,W]=i.useState(!1),[A,D]=i.useState(0),T=!$&&d&&S>1,O=i.useRef(null),Y=i.useRef(null),X=i.useRef(null),K=i.useRef({startX:0,startY:0,deltaX:0,deltaY:0,dragging:!1}),G=i.useRef(v);G.current=v;const Q=i.useCallback((se,Se=!0)=>{if(S===0||p&&P)return;const ie=(se%S+S)%S;if(b?.(I,ie),!Se){F(!1),L(ie),H(!1),requestAnimationFrame(()=>{F(!0),G.current?.(ie)});return}if($){H(!0),L(ie),setTimeout(()=>{H(!1),G.current?.(ie)},u);return}T?(H(!0),se<0?(F(!0),L(-1),setTimeout(()=>{F(!1),L(S-1),requestAnimationFrame(()=>{F(!0),H(!1),G.current?.(S-1)})},u)):se>=S?(F(!0),L(S),setTimeout(()=>{F(!1),L(0),requestAnimationFrame(()=>{F(!0),H(!1),G.current?.(0)})},u)):(F(!0),L(ie),setTimeout(()=>{H(!1),G.current?.(ie)},u))):(H(!0),L(ie),setTimeout(()=>{H(!1),G.current?.(ie)},u))},[S,I,P,p,b,u,$,T]),N=i.useCallback(()=>{S<=1||(d?Q(I+1>=S?S:I+1):I<S-1&&Q(I+1))},[S,I,d,Q]),le=i.useCallback(()=>{S<=1||(d?Q(I-1<0?-1:I-1):I>0&&Q(I-1))},[S,I,d,Q]);i.useImperativeHandle(B,()=>({goTo:Q,next:N,prev:le}),[Q,N,le]);const re=i.useCallback(()=>{!r||S<=1||(X.current&&clearInterval(X.current),X.current=setInterval(()=>N(),o))},[r,o,S,N]),q=i.useCallback(()=>{X.current&&(clearInterval(X.current),X.current=null)},[]);i.useEffect(()=>(re(),q),[re,q]);const _=i.useCallback(()=>{r&&(q(),W(!0))},[r,q]),J=i.useCallback(()=>{r&&(re(),W(!1),D(se=>se+1))},[r,re]),Te=i.useCallback(se=>{h&&(K.current={startX:se.clientX,startY:se.clientY,deltaX:0,deltaY:0,dragging:!0},se.currentTarget.setPointerCapture(se.pointerId))},[h]),ke=i.useCallback(se=>{const Se=K.current;if(Se.dragging&&(Se.deltaX=se.clientX-Se.startX,Se.deltaY=se.clientY-Se.startY,Y.current&&!$)){let ie=E?Se.deltaY:Se.deltaX;const ce=E?O.current?.clientHeight??1:O.current?.clientWidth??1;g&&(ie=Math.max(-ce,Math.min(ce,ie)));const He=-(T?I+1:I)*100,Pe=ie/ce*100;Y.current.style.transition="none",Y.current.style.transform=E?`translateY(${He+Pe}%)`:`translateX(${He+Pe}%)`}},[I,T,$,E,g]),Ie=i.useCallback(()=>{const se=K.current;if(!se.dragging||(se.dragging=!1,$||!Y.current))return;const Se=E?se.deltaY:se.deltaX,ie=E?O.current?.clientHeight??1:O.current?.clientWidth??1,ce=T?I+1:I,He=-ce*100,Pe=Se/ie*100,Ge=He+Pe;let Ne=Math.round(-Ge/100);if(T?Ne=Math.max(0,Math.min(S+1,Ne)):Ne=Math.max(0,Math.min(S-1,Ne)),g&&(Ne=Math.max(ce-1,Math.min(ce+1,Ne))),Y.current.style.transition=`transform ${u}ms ${f}`,Ne===ce){const oe=-ce*100,Re=E?`translateY(${oe}%)`:`translateX(${oe}%)`;Y.current.style.transform=Re,setTimeout(()=>{Y.current&&(Y.current.style.transition=`transform ${u}ms ${f}`,Y.current.style.transform=Re)},u)}else{const oe=-Ne*100;Y.current.style.transform=E?`translateY(${oe}%)`:`translateX(${oe}%)`;let Re;T&&Ne===0?Re=S-1:T&&Ne===S+1?Re=0:Re=T?Ne-1:Ne,b?.(I,Re),H(!0),setTimeout(()=>{Y.current&&(Y.current.style.transition="",Y.current.style.transform=""),F(!1),L(Re),requestAnimationFrame(()=>{F(!0),H(!1),G.current?.(Re)})},u)}r&&re()},[I,S,d,E,T,$,u,f,r,g,b,re]),fe=()=>{if($)return R.map((ie,ce)=>t.jsx("div",{className:y?.slide,style:V({position:ce===0?"relative":"absolute",...ce!==0?{inset:0}:{},width:"100%",flexShrink:0,opacity:ce===I?1:0,zIndex:ce===I?1:0,transition:z?`opacity ${u}ms ${f}`:"none"},k?.slide),children:ie},ce));const se=[],Se={width:"100%",flexShrink:0,...E?{height:"100%"}:{}};return T&&se.push(t.jsx("div",{className:y?.slide,style:V(Se,k?.slide),children:R[S-1]},"clone-last")),R.forEach((ie,ce)=>{se.push(t.jsx("div",{className:y?.slide,style:V(Se,k?.slide),children:ie},ce))}),T&&se.push(t.jsx("div",{className:y?.slide,style:V(Se,k?.slide),children:R[0]},"clone-first")),se},ze=()=>{if($)return"none";const se=-(T?I+1:I)*100;return E?`translateY(${se}%)`:`translateX(${se}%)`},me=(I%S+S)%S,he=l!==!1&&S>1,Le=typeof l=="object"?l.className:void 0,De=()=>{if(!he)return null;const se=a==="top"||a==="bottom";return t.jsx("div",{className:Le?`${Le} ${y?.dots??""}`.trim():y?.dots,style:V({display:"flex",flexDirection:se?"row":"column",gap:"0.375rem",justifyContent:"center",alignItems:"center",padding:se?"0.75rem 0":"0 0.75rem"},k?.dots),children:R.map((Se,ie)=>{const ce=ie===me;return t.jsx("button",{type:"button",onClick:()=>Q(ie),style:{position:"relative",overflow:"hidden",width:se?ce?"1.5rem":"1rem":"0.1875rem",height:se?"0.1875rem":ce?"1.5rem":"1rem",borderRadius:"1rem",border:"none",padding:0,cursor:"pointer",backgroundColor:ce&&!(r&&m)?n.colorPrimary:n.colorTextSubtle,opacity:ce&&!(r&&m)?1:.4,transition:"all 0.3s ease"},"aria-label":`Go to slide ${ie+1}`,children:ce&&r&&m&&t.jsx("div",{style:{position:"absolute",inset:0,backgroundColor:n.colorPrimary,borderRadius:"inherit",transformOrigin:se?"left center":"center top",animationName:se?"j-carousel-fill-h":"j-carousel-fill-v",animationDuration:`${o}ms`,animationTimingFunction:"linear",animationFillMode:"forwards",animationPlayState:M?"paused":"running"}},`progress-${me}-${A}`)},ie)})})},Oe=()=>{if(!s||S<=1)return null;const se=E?$d:Ld,Se=E?Pd:Ed,ie={position:"absolute",zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",width:"2rem",height:"2rem",borderRadius:"50%",border:"none",backgroundColor:"rgba(0,0,0,0.25)",color:"#fff",cursor:"pointer",transition:"background-color 0.2s ease",padding:0},ce=E?{top:"0.5rem",left:"50%",transform:"translateX(-50%)"}:{left:"0.5rem",top:"50%",transform:"translateY(-50%)"},He=E?{bottom:"0.5rem",left:"50%",transform:"translateX(-50%)"}:{right:"0.5rem",top:"50%",transform:"translateY(-50%)"};return t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",className:y?.arrow,style:V({...ie,...ce},k?.arrow),onClick:le,onMouseEnter:Pe=>{Pe.currentTarget.style.backgroundColor="rgba(0,0,0,0.5)"},onMouseLeave:Pe=>{Pe.currentTarget.style.backgroundColor="rgba(0,0,0,0.25)"},"aria-label":"Previous slide",children:t.jsx(se,{})}),t.jsx("button",{type:"button",className:y?.arrow,style:V({...ie,...He},k?.arrow),onClick:N,onMouseEnter:Pe=>{Pe.currentTarget.style.backgroundColor="rgba(0,0,0,0.5)"},onMouseLeave:Pe=>{Pe.currentTarget.style.backgroundColor="rgba(0,0,0,0.25)"},"aria-label":"Next slide",children:t.jsx(Se,{})})]})},Be=a==="top"||a==="left",ee=V({position:"relative",display:"flex",flexDirection:E?"row":"column",overflow:"hidden",fontFamily:"inherit"},k?.root,w),ae=V({display:"flex",flexDirection:$?"row":E?"column":"row",position:"relative",...E&&!$?{height:"100%"}:{},...$?{}:{transform:ze(),transition:z?`transform ${u}ms ${f}`:"none"},...h?{touchAction:E?"pan-x":"pan-y"}:{}},k?.track);return S===0?null:t.jsxs("div",{ref:O,className:Ye(C,y?.root),style:ee,onMouseEnter:_,onMouseLeave:J,children:[r&&m&&he&&t.jsx("style",{children:`
|
|
117
117
|
@keyframes j-carousel-fill-h { from { transform: scaleX(0); } to { transform: scaleX(1); } }
|
|
118
118
|
@keyframes j-carousel-fill-v { from { transform: scaleY(0); } to { transform: scaleY(1); } }
|
|
119
|
-
`}),Re&&De(),t.jsxs("div",{style:{position:"relative",overflow:"hidden",flex:1,...L?{height:"100%"}:{}},children:[Ae(),t.jsx("div",{ref:Y,className:y?.track,style:ae,onPointerDown:Te,onPointerMove:Ce,onPointerUp:Le,onPointerCancel:Le,children:ue()})]}),!Re&&De()]})}),zd=Dd,Wd={small:{headerPadding:"0.375rem 0.75rem",contentPadding:"0.75rem",fontSize:"0.8125rem"},middle:{headerPadding:"0.75rem 1rem",contentPadding:"1rem",fontSize:"0.875rem"},large:{headerPadding:"1rem 1.25rem",contentPadding:"1.25rem",fontSize:"1rem"}};function Hd(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("path",{d:"M4.5 2.5L8 6L4.5 9.5"})})}function Fd({panelKey:e,label:r,children:o,extra:s,showArrow:l,isActive:a,collapsible:c,expandIcon:u,expandIconPlacement:f,destroyOnHidden:d,forceRender:h,size:g,ghost:m,isFirst:x,panelClassName:p,panelStyle:b,onToggle:v,classNames:j,styles:C}){const w=i.useRef(null),y=i.useRef(null),k=i.useRef(null),B=i.useRef(null),[R,S]=i.useState(a||h),L=i.useRef(!1),$=i.useRef(!1),I=Wd[g];i.useEffect(()=>{a&&!R&&S(!0)},[a,R]),i.useLayoutEffect(()=>{const G=w.current;if(G){if(!$.current){$.current=!0,a?(G.style.maxHeight="none",G.style.opacity="1"):(G.style.maxHeight="0px",G.style.opacity="0");return}if(a){L.current=!0;const Q=y.current;if(Q){const N=Q.scrollHeight;G.style.transition="none",G.style.maxHeight="0px",G.style.opacity="0",G.offsetHeight,G.style.transition="max-height 300ms ease, opacity 200ms ease",G.style.maxHeight=N+"px",G.style.opacity="1"}}else{const Q=y.current;if(Q){const N=Q.scrollHeight;G.style.transition="none",G.style.maxHeight=N+"px",G.offsetHeight,G.style.transition="max-height 300ms ease, opacity 200ms ease",G.style.maxHeight="0px",G.style.opacity="0"}}}},[a]);const P=i.useCallback(G=>{if(G.propertyName!=="max-height")return;const Q=w.current;Q&&(a&&(Q.style.maxHeight="none"),L.current=!1)},[a]),E=c==="disabled",H=c==="icon",z=i.useCallback(()=>{E||H||v(e)},[E,H,v,e]),A=i.useCallback(G=>{E||H&&(G.stopPropagation(),v(e))},[E,H,v,e]),M=i.useCallback(()=>{E||!k.current||(m?k.current.style.backgroundColor=n.colorBgSubtle:k.current.style.filter="brightness(0.97)")},[E,m]),W=i.useCallback(()=>{k.current&&(m?k.current.style.backgroundColor="":k.current.style.filter="")},[m]),F=l?t.jsx("span",{ref:B,onClick:H?A:void 0,className:j?.arrow,style:V({display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:"1.25rem",height:"1.25rem",color:E?n.colorTextSubtle:n.colorTextMuted,transform:a?"rotate(90deg)":"rotate(0deg)",transition:"transform 200ms ease",cursor:H&&!E?"pointer":"inherit"},C?.arrow),children:u?u({isActive:a}):t.jsx(Hd,{})}):null,D=E?"not-allowed":H?"default":"pointer",T=V({display:"flex",alignItems:"center",gap:"0.5rem",padding:I.headerPadding,fontSize:I.fontSize,fontWeight:600,color:E?n.colorTextSubtle:n.colorText,backgroundColor:m?"transparent":n.colorBgSubtle,cursor:D,userSelect:"none",borderTop:x?"none":`1px solid ${n.colorBorder}`,transition:"filter 0.15s ease, background-color 0.15s ease"},C?.header),O={overflow:"hidden",maxHeight:a?void 0:0,opacity:a?1:0},Y=V({padding:I.contentPadding,fontSize:I.fontSize,color:n.colorText,borderTop:`1px solid ${n.colorBorder}`},C?.content),X=a||R||h,_=d&&!a&&!L.current;return t.jsxs("div",{className:p,style:b,children:[t.jsxs("div",{ref:k,onClick:z,onMouseEnter:M,onMouseLeave:W,className:j?.header,style:T,children:[f==="start"&&F,t.jsx("span",{style:{flex:1,minWidth:0},children:r}),s&&t.jsx("span",{style:{flexShrink:0,marginLeft:"auto"},children:s}),f==="end"&&F]}),t.jsx("div",{ref:w,style:O,onTransitionEnd:P,children:X&&!_&&t.jsx("div",{ref:y,className:j?.content,style:Y,children:o})})]})}function Ad(e){return null}function Cn(e){return e===void 0?[]:Array.isArray(e)?e:[e]}function Od({items:e,accordion:r=!1,activeKey:o,defaultActiveKey:s,bordered:l=!0,ghost:a=!1,size:c="middle",collapsible:u,expandIcon:f,expandIconPlacement:d="start",destroyOnHidden:h=!1,onChange:g,children:m,className:x,style:p,classNames:b,styles:v}){const j=e??(()=>{const S=[];return i.Children.forEach(m,L=>{if(!i.isValidElement(L))return;const $=L.props;$.panelKey!==void 0&&S.push({key:$.panelKey,label:$.header,children:$.children,extra:$.extra,showArrow:$.showArrow,collapsible:$.collapsible,forceRender:$.forceRender,className:$.className,style:$.style})}),S})(),C=o!==void 0,[w,y]=i.useState(()=>Cn(s)),k=C?Cn(o):w,B=i.useCallback(S=>{let L;r?L=k.includes(S)?[]:[S]:L=k.includes(S)?k.filter($=>$!==S):[...k,S],C||y(L),g?.(r?L[0]??"":L)},[r,k,C,g]),R=V({border:a?"none":l?`1px solid ${n.colorBorder}`:"none",borderRadius:a?0:"0.5rem",overflow:"hidden",backgroundColor:a?"transparent":n.colorBg},v?.root,p);return t.jsx("div",{className:Ve(x,b?.root),style:R,children:j.map((S,L)=>t.jsx(Fd,{panelKey:S.key,label:S.label,extra:S.extra,showArrow:S.showArrow??!0,isActive:k.includes(S.key),collapsible:S.collapsible??u,expandIcon:f,expandIconPlacement:d,destroyOnHidden:h,forceRender:S.forceRender??!1,size:c,ghost:a,isFirst:L===0,panelClassName:S.className,panelStyle:S.style,onToggle:B,classNames:b,styles:v,children:S.children},S.key))})}const Nd=Object.assign(Od,{Panel:Ad});function Ns({color:e}){const r=e??n.colorBorder;return t.jsx("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg",children:t.jsxs("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd",children:[t.jsx("ellipse",{fill:n.colorBgMuted,cx:"32",cy:"33",rx:"32",ry:"7"}),t.jsxs("g",{fillRule:"nonzero",stroke:r,children:[t.jsx("path",{d:"M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"}),t.jsx("path",{d:"M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3",fill:n.colorBgSubtle})]})]})})}function Vd({color:e}){return t.jsx("svg",{width:"40",height:"40",viewBox:"0 0 2048 2048",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{fill:e??n.colorTextSubtle,d:"M 884.867 254.368 C 902.348 244.713 979.774 206.55 995.803 210.785 C 1000.12 211.901 1003.77 214.791 1005.84 218.741 C 1012.2 231.022 1005.67 242.254 993.26 246.461 C 974.693 252.754 955.911 260.015 938.012 268.036 C 982.579 283.684 1013.87 298.123 1055.55 319.769 C 1065.49 317.104 1075.23 314.626 1085.31 312.495 C 1206.36 286.89 1343.6 332.944 1416.49 435.528 C 1441.98 442.939 1476.64 451.383 1499.81 463.038 C 1453.03 403.622 1400.11 356.764 1337.29 314.5 C 1323.93 305.504 1310.13 297.167 1295.95 289.519 C 1284.45 283.214 1258.64 272.134 1255.34 259.475 C 1254.83 257.515 1254.69 255.477 1254.95 253.468 C 1259.33 220.111 1300.31 250.338 1314.2 258.305 C 1402.05 308.685 1482.4 376.306 1541.77 458.743 C 1546.9 465.872 1563.79 492.887 1568.31 495.921 C 1597.12 515.292 1624.82 535.896 1651.24 558.398 C 1625.32 472.017 1590.36 398.728 1533.32 328.822 C 1523.41 316.683 1495 291.43 1527.24 279.317 C 1538.6 275.05 1546.73 286.856 1552.85 294.288 C 1619.69 376.16 1668.92 469.083 1691.92 572.662 C 1694.09 582.448 1695.74 597.478 1699.86 607.081 C 1725.42 641.622 1753.97 674.24 1774.1 712.836 C 1774.09 665.812 1767.63 617.476 1758.16 571.444 C 1753.97 550.892 1746.54 530.746 1742.65 510.197 C 1738.96 490.722 1761.48 482.252 1773.06 494.521 C 1778.77 500.574 1783.43 523.708 1785.77 532.806 C 1808.72 620.086 1816.18 710.715 1807.82 800.573 C 1805.75 823.802 1802.17 851.182 1797.23 874.028 C 1818.4 910.957 1833.8 951.992 1845.38 992.851 C 1850.89 1012.32 1860.01 1033.15 1831.58 1037.58 C 1829 1073.33 1813.74 1130.29 1799.53 1163.1 C 1803.16 1179.94 1806.01 1196.95 1808.07 1214.06 C 1815.59 1196.7 1823.1 1179.33 1829.61 1161.56 C 1834.36 1148.59 1837.8 1132.11 1844.72 1120.33 C 1846.55 1117.22 1849.53 1114.62 1852.91 1113.3 C 1857.13 1111.65 1862.46 1112.04 1866.56 1113.89 C 1870.63 1115.73 1873.38 1119.05 1874.64 1123.31 C 1880.57 1143.33 1841.92 1227.34 1831.71 1248.15 C 1826.25 1259.27 1817.74 1270.59 1813.94 1282.22 C 1810.11 1293.93 1810.82 1326.59 1809.7 1340.88 C 1806.26 1384.79 1795.73 1428.4 1781.79 1470.07 C 1778.91 1478.65 1776.36 1488.15 1771.88 1496.05 C 1769.09 1500.98 1765.21 1504.16 1759.68 1505.72 C 1756.09 1506.73 1752.24 1506.43 1749.1 1504.31 C 1744.61 1501.27 1741.84 1495.75 1740.93 1490.52 C 1740.17 1486.07 1740.62 1481.52 1741.66 1477.15 C 1743.08 1471.11 1746.19 1465.46 1748.29 1459.62 C 1752.82 1447.01 1756.74 1433.98 1760.09 1421 C 1766.77 1395.09 1770.83 1369.06 1774.11 1342.53 C 1738.8 1394.4 1686.22 1448.63 1638.61 1488.8 C 1628.86 1497.02 1618.79 1504.86 1608.43 1512.3 C 1578.55 1534.03 1585.52 1531.06 1566.88 1561.7 C 1559.58 1573.56 1551.78 1585.11 1543.51 1596.31 C 1499 1656.22 1436.6 1707.43 1371 1742.53 C 1358.17 1749.39 1332.91 1768.34 1319.58 1758.13 C 1315.89 1755.34 1313.48 1751.17 1312.9 1746.58 C 1312.35 1741.86 1313.74 1737.11 1316.76 1733.43 C 1321.18 1728.05 1373.58 1700.73 1385.31 1693.49 C 1399.29 1684.77 1412.82 1675.33 1425.84 1665.22 C 1456.11 1641.96 1484.19 1612.79 1508.23 1583.19 C 1512.03 1578.51 1515.45 1573.72 1519.48 1569.2 C 1514.23 1572.82 1508.9 1576.47 1502.95 1578.81 C 1475.4 1589.63 1455.44 1612.01 1432.1 1630.38 C 1398.58 1656.54 1362.7 1679.53 1324.93 1699.05 C 1301.61 1711.2 1277.69 1722.17 1253.28 1731.93 C 1228.19 1741.72 1210.78 1745.07 1187.77 1759.41 C 1287.99 1774.72 1384.11 1775.93 1482.14 1748.23 C 1496.14 1744.28 1522.68 1731.69 1531.66 1745.37 C 1536.76 1753.14 1535.69 1765.19 1527.08 1770.48 C 1511.1 1779.26 1490.3 1782.4 1472.77 1787.55 C 1357.81 1814.81 1251.39 1811.67 1137.4 1785.07 L 1133.62 1784.18 C 1105.48 1796.83 1033.57 1822.13 1004.21 1820.94 C 1001.46 1818.78 998.535 1816.57 995.853 1814.36 C 878.282 1815.69 787.644 1765.7 704.027 1685.62 C 690.293 1672.47 679.964 1659.41 667.899 1644.82 C 662.796 1638.66 655.624 1629.11 650.416 1623.81 C 623.376 1616.71 603.222 1614.39 573.928 1604.95 C 582.499 1614.99 591.366 1625.8 600.57 1635.17 C 659.094 1699.26 730.561 1750.18 810.243 1784.58 C 822.809 1789.97 835.585 1795.12 848.591 1799.35 C 860.251 1803.15 873.669 1806.04 884.537 1811.74 C 887.209 1813.14 889.562 1817.74 890.465 1820.52 C 891.874 1824.86 891.744 1829.67 889.601 1833.74 C 887.426 1837.88 883.54 1840.8 879.072 1842.05 C 857.449 1848.14 767.156 1805 744.664 1792.59 C 672.561 1752.8 609.769 1699.69 555.2 1638.24 C 545.093 1626.8 535.421 1614.97 526.204 1602.8 C 522.035 1597.38 511.814 1582.71 507.29 1579.32 C 487.902 1564.76 464.234 1552.58 444.736 1537.9 C 386.866 1494.46 338.018 1440.15 300.923 1378.03 C 295.077 1368.36 282.848 1347.44 279.864 1337.07 L 279.665 1332.26 C 280.528 1329.17 282.116 1324.82 284.386 1322.64 C 305.224 1303.52 315.466 1330 323.83 1345.45 C 360.824 1413.78 408.82 1463.44 468.89 1511.45 C 463.238 1502.08 458.934 1492.85 454.081 1483.07 C 445.252 1465.29 428.487 1452.27 415.998 1437 C 395.407 1411.81 375.242 1385.58 357.941 1357.99 C 343.524 1334.92 330.49 1311.01 318.909 1286.4 C 304.123 1255.36 301.854 1242.45 281.255 1215.01 C 276.126 1255.72 276.707 1288.61 278.109 1329.03 C 278.046 1332.59 277.863 1333.62 278.885 1337.11 C 280.592 1386.43 292.17 1437.86 304.486 1485.48 C 308.967 1502.81 317.172 1519.58 321.853 1537.16 C 326.591 1554.95 300.447 1564.24 291.244 1552.02 C 284.212 1542.68 280.059 1523.81 275.59 1512.7 C 246.464 1421.3 234.03 1315.75 244.596 1220.36 C 246.636 1202.56 248.927 1184.78 251.466 1167.04 C 237.83 1146.06 192.915 1042.32 197.699 1020.14 C 198.808 1015.16 201.911 1010.86 206.283 1008.23 C 209.533 1006.29 212.785 1005.93 216.45 1005.57 C 222.538 959.737 231.54 919.144 248.756 875.828 C 245.967 861.182 242.777 845.733 240.698 831.053 C 231.651 850.223 223.593 869.843 216.556 889.838 C 212.469 901.571 209.504 916.33 203.546 927.049 C 201.477 930.771 197.726 933.619 193.691 934.92 C 189.876 936.15 185.817 936.013 182.243 934.119 C 177.259 931.476 172.603 926.644 171.296 921.035 C 167.777 905.941 205.012 822.585 214.106 804.419 C 221.256 790.135 232.461 774.892 236.758 759.703 C 240.074 747.985 237.581 722.337 238.938 708.537 C 244.259 657.941 255.972 608.223 273.795 560.572 C 277.525 550.526 284.432 526.023 296.166 524.252 C 311.178 521.986 316.171 527.69 319.234 541.44 C 316.51 552.001 311.258 563.367 307.067 573.641 C 290.53 614.189 282.512 656.043 276.295 699.27 C 321.165 628.666 390.035 564.598 455.779 513.489 C 474.152 499.206 497.089 486.175 515.399 472.327 C 526.458 463.963 538.49 438.824 549.499 428.363 C 579.835 392.124 614.104 359.92 651.558 331.135 C 659.372 325.13 672.674 313.779 681.9 311.403 C 686.172 310.315 690.705 311.155 694.303 313.7 C 702.501 319.4 705.435 332.577 697.991 340.37 C 687.587 351.262 673.191 358.188 661.993 368.337 C 634.958 390.187 615.219 409.504 591.686 434.522 C 632.457 421.552 653.743 414.479 696.024 408.177 C 734.432 356.065 782.596 315.247 837.609 281.302 C 751.426 269.196 674.31 268.168 589.154 288.938 C 569.577 293.713 537.445 307.075 539.001 274.074 C 539.909 258.184 582.949 252.998 595.361 250.499 C 687.449 231.959 786.181 230.604 877.771 252.602 C 880.141 253.171 882.507 253.76 884.867 254.368 z M 1048.03 754.312 C 1063.31 759.433 1123.24 775.651 1086.69 802.518 C 1078.88 808.261 1047.83 791.541 1038.8 789.44 C 1028.04 785.788 1013.92 781.22 1003.93 776.909 C 926.916 819.296 855.529 860.351 789.953 920.172 C 772.733 935.881 755.886 953.408 739.755 970.267 C 744.518 980.322 749.367 991.193 755.012 1000.71 C 757.918 992.912 761.125 984.087 763.589 975.951 C 768.158 960.867 774.652 943.47 794.075 952.302 C 800.6 955.269 802.751 959.719 804.944 966.406 L 805.322 967.594 C 798.325 992.181 784.986 1018.03 777.925 1045.47 C 822.468 1131.69 869.734 1213.36 941.028 1280.64 C 945.381 1284.75 967.217 1308.45 972.28 1306.77 C 981.435 1302.07 989.713 1297.86 999.165 1293.69 C 986.402 1289.04 949.675 1279.04 949.23 1263.11 C 948.772 1246.71 964.026 1241.28 978.081 1246.9 C 999.894 1255.63 1021.97 1263.02 1043.83 1270.66 C 1112.52 1230.78 1173.95 1199.57 1235.98 1146.56 C 1265.64 1121.22 1281.22 1103.26 1308.06 1076.62 C 1302.8 1067.2 1297.72 1057.69 1292.83 1048.07 C 1287.39 1064.92 1278.82 1106.06 1254.84 1097.13 C 1233.98 1089.36 1250.08 1058.58 1255.28 1044.79 C 1260.44 1031.04 1265.42 1017.24 1270.23 1003.37 C 1228 927.952 1187.58 856.152 1128.58 792.197 C 1121.43 784.455 1081.85 742.31 1075.5 740.769 L 1048.03 754.312 z M 689.509 1429.09 C 719.988 1480 752.606 1523.77 796.786 1563.88 C 803.367 1569.85 813.599 1580 820.103 1585.03 L 843.219 1580.2 C 874.568 1572.49 903.663 1565.16 933.915 1553.52 C 943.84 1549.7 956.565 1545.64 966.048 1541.02 C 922.01 1518.21 863.006 1465.67 828.385 1429.96 C 824.395 1425.85 810.484 1407.44 807.216 1408.03 C 774.935 1418.38 723.587 1427.12 689.509 1429.09 z M 523.705 1003.74 C 543.343 1045.94 562.375 1079.31 590.128 1117.3 C 593.637 1122.06 597.205 1126.77 600.831 1131.44 C 619.011 1078.4 661.44 1008.92 697.707 966.597 C 682.815 934.282 668.843 901.551 655.807 868.443 C 654.521 865.17 650.013 851.553 647.977 850.602 C 606.465 888.555 574.357 924.177 543.665 971.86 C 537.458 981.503 529.016 993.683 523.705 1003.74 z M 847.422 1396.75 C 886.189 1439.91 927.948 1475.81 977.531 1505.97 C 984.667 1510.31 998.317 1519.81 1005.53 1522.59 L 1007.43 1521.67 C 1044.97 1500.51 1091.54 1474.78 1124.45 1446.48 C 1076.09 1426.72 1030.37 1401.04 988.317 1370.04 C 985.181 1367.71 964.635 1351.49 962.849 1350.98 C 936.15 1364.72 876.207 1388.31 847.422 1396.75 z M 1350.33 1081.92 C 1368.11 1118.11 1386.73 1156.91 1400.13 1194.82 L 1414.15 1181.37 C 1466.91 1129.39 1483.54 1102.99 1522.34 1042.44 C 1503.1 1006.7 1484.79 972.678 1460.55 939.921 C 1457.42 935.699 1448.63 923.495 1445.35 920.534 C 1423.43 970.899 1398.98 1017.83 1365.44 1061.61 C 1360.45 1068.12 1355 1075.2 1350.33 1081.92 z M 1562.85 1042.81 C 1584.26 1090.6 1603.18 1137.34 1613.1 1189.19 C 1619.81 1180.95 1626.41 1172.62 1632.9 1164.2 C 1665.32 1120.98 1692.61 1074.13 1714.21 1024.61 C 1696.88 994.443 1645.94 912.783 1619.55 893.488 C 1607.83 941.272 1587.72 1000.07 1562.85 1042.81 z M 925.575 595.756 C 981.998 622.443 1034.58 656.581 1081.92 697.258 C 1095.03 692.419 1115.72 681.854 1129.23 675.772 C 1151.91 665.554 1170.86 658.132 1194 649.571 C 1164.51 612.521 1105.72 567.568 1067.03 540.434 C 1062.99 537.604 1044.56 524.92 1040.85 523.894 C 995.029 548.992 968.062 565.185 925.575 595.756 z M 1233.79 464.224 C 1269.9 508.339 1309.56 564.26 1333.74 616.353 C 1350.53 612.705 1388.31 610.937 1405.75 611.949 C 1422.89 612.255 1439.45 612.882 1456.42 615.405 C 1445.78 562.302 1430.54 513.177 1397.94 468.944 C 1359.48 461.683 1320.32 457.651 1281.15 459.55 C 1264.2 460.641 1250.63 461.923 1233.79 464.224 z M 765.391 581.038 C 744.506 612.706 719.899 651.619 705.237 686.805 C 713.664 685.204 719.347 684.218 727.845 683.502 C 733.228 686.075 737.987 688.358 740.043 694.304 C 743.293 703.706 739.051 716.894 728.451 719.286 C 704.521 724.685 680.969 728.032 657.708 736.571 C 660.92 754.079 664.007 770.78 668.755 787.961 C 677.769 782.055 685.61 777.038 694.994 771.643 C 707.187 764.293 719.696 757.482 732.487 751.229 C 760.705 707.04 788.419 672.314 825.948 635.195 C 835.545 625.704 846.113 614.748 856.458 606.212 C 836.301 599.523 817.171 593.048 796.545 587.714 C 785.66 584.898 775.985 583.467 765.391 581.038 z M 1043.64 1543.16 C 1076.23 1555.51 1103.75 1570.44 1139.22 1578.8 C 1146.49 1580.7 1153.96 1582.77 1161.29 1584.32 C 1191.59 1560.72 1228.94 1515.55 1251.96 1485.39 C 1218.12 1477.82 1195.62 1471.2 1162.91 1461.7 C 1126.55 1492.72 1084.53 1518.63 1043.64 1543.16 z M 1540.72 1080.9 C 1508.4 1134.09 1461.12 1193.22 1412.42 1232.64 C 1420.69 1263.39 1428.94 1297.61 1432.23 1329.34 L 1447.42 1321.37 C 1492.84 1296.53 1534.59 1269.3 1571.28 1232.41 C 1574.96 1228.7 1579.52 1223.96 1583.52 1220.68 C 1573.63 1177.91 1560.22 1120.59 1540.72 1080.9 z M 1424.55 1485.21 C 1415.49 1519.97 1401.41 1553.24 1382.77 1583.96 L 1383.47 1584.92 C 1446.76 1567.12 1500.74 1543.53 1555.85 1506.77 C 1568.28 1477.55 1576.95 1455.88 1582.89 1424.08 L 1582.1 1423.15 C 1529.94 1453 1484.7 1474.44 1424.55 1485.21 z M 318.455 1060.72 C 305.324 1098.07 297.574 1122.72 289.123 1161.77 C 292.826 1169.2 300.35 1179.98 305.049 1187.16 C 333.166 1230.11 363.069 1262.78 400.677 1297.17 C 404.785 1300.77 408.971 1304.28 413.231 1307.7 C 411.593 1262.98 412.95 1233.64 419.83 1189.31 C 383.766 1153.91 349.482 1114.7 324.147 1070.61 C 322.42 1067.61 320.374 1063.49 318.455 1060.72 z M 1099.28 346.676 C 1131.7 369.401 1174.72 403.306 1201.92 431.479 C 1249.64 425.164 1273.89 422.525 1322.55 423.054 C 1335.25 423.982 1349.02 424.725 1361.61 425.976 C 1296.59 367.825 1231.53 339.918 1142.04 341.843 C 1140.43 341.878 1136.48 342.147 1135.09 342.4 C 1122.22 343.347 1111.49 345.446 1099.28 346.676 z M 1308.58 998.14 C 1316.58 1013.71 1324.83 1029.16 1333.31 1044.48 C 1342.03 1032.53 1353.25 1017.55 1360.73 1004.78 C 1386.26 965.455 1402.07 931.221 1419.64 888.484 C 1395.47 859.758 1348.34 812.285 1316.92 790.633 C 1336.53 850.565 1328.77 938.829 1308.58 998.14 z M 671.955 1590.41 C 709.225 1592.14 733.812 1593.28 771.116 1590.85 L 772.521 1590.21 C 768.389 1585.16 762.765 1581.17 757.998 1576.55 C 750.718 1569.5 743.803 1562.09 736.973 1554.6 C 702.465 1517.16 673.023 1475.35 649.404 1430.24 C 637.724 1429.74 612.931 1429.14 602.631 1427.07 C 616.471 1494.5 634.574 1533.44 671.955 1590.41 z M 1733.49 1068.79 C 1696.94 1140.43 1673.81 1173.6 1621.3 1234.35 C 1628.21 1273.61 1629.45 1302.53 1629.06 1342.07 L 1642.37 1330.09 C 1681 1292.77 1709.27 1257.18 1736.24 1210.27 C 1745.81 1193.63 1753.81 1174.82 1762.61 1159.44 C 1754.55 1127.87 1744.65 1099.27 1733.49 1068.79 z M 1302.14 1596.91 C 1311.96 1596.27 1321.83 1595.76 1331.6 1594.5 C 1352.57 1570.37 1377.04 1521.79 1384.93 1491.23 C 1347.26 1493.79 1329.41 1493.06 1291.86 1490.75 C 1267.74 1529.81 1237.48 1560.16 1206.02 1592.71 C 1246.65 1597.13 1261.16 1597.86 1302.14 1596.91 z M 1494.06 622.619 C 1528.36 630.117 1561.22 643.131 1591.35 661.155 C 1580.82 622.333 1572.39 585.421 1553.81 549.254 C 1547.22 536.428 1542.7 523.737 1528.57 517.138 C 1502.64 502.322 1476.68 492.186 1448.73 482.178 C 1479.03 535.022 1481.88 566.988 1494.06 622.619 z M 1596.34 820.215 C 1601.3 774.222 1600.91 752.651 1597.86 706.528 C 1561.53 682.701 1537.77 672.947 1497 660.328 C 1498.28 699.36 1497.06 710.58 1493.08 748.105 C 1529.35 769.372 1563.88 793.485 1596.34 820.215 z M 565.737 1255.81 C 567.607 1231.78 578.727 1193.94 585.672 1170.67 C 550.421 1124.7 529.814 1095.58 503.184 1043.67 C 481.973 1085.85 466.94 1130.85 458.547 1177.3 C 489.642 1204.35 513.664 1223.59 548.991 1245.84 L 565.737 1255.81 z M 716.025 441.23 C 693.071 475.108 678.2 501.153 666.088 541.203 C 695.802 538.572 719.305 540.185 748.542 543.588 C 751.377 540.306 753.312 537.648 755.863 534.123 C 776.815 504.749 811.105 468.466 838.069 444.302 C 809.753 440.996 784.267 437.515 755.553 438.698 C 751.129 438.881 740.585 438.754 736.688 439.411 C 730.228 440.037 722.389 440.999 716.025 441.23 z M 498.784 588.116 C 540.02 565.124 581.06 553.975 626.889 544.902 C 638.874 504.309 645.506 489.004 665.291 451.925 L 664.591 450.895 L 662.567 451.069 C 625.04 460.527 579.106 476.738 546.279 497.139 C 535.223 504.01 498.276 575.018 496.728 588.625 L 498.784 588.116 z M 560.604 1294.99 C 520.248 1272.13 487.448 1248.53 451.261 1219.39 C 448.339 1236.98 444.371 1319.2 452.505 1335.11 C 456.166 1342.27 515.348 1368.27 526.501 1372.27 C 532.723 1374.5 553.182 1380.41 560.249 1383.35 C 557.702 1355.41 557.493 1322.92 560.604 1294.99 z M 1486.57 786.375 C 1480.13 819.872 1473.9 849.807 1461.36 881.774 C 1485.25 911.453 1525.88 969.98 1542.63 1003.81 L 1549.92 987.605 C 1564.32 954.629 1584.13 899.496 1589.86 863.772 C 1561.55 839.207 1519.75 804.263 1486.57 786.375 z M 1624.6 1392.4 C 1622.74 1409.83 1620.17 1424.31 1616.28 1441.47 C 1615.02 1447.06 1610.97 1460.42 1610.82 1464.42 C 1612.72 1464 1611.92 1464.43 1613.27 1463.17 C 1683.21 1408.86 1730.51 1346.96 1777.18 1273.27 C 1776.07 1253.48 1775.18 1240.65 1771.75 1221.13 C 1739.62 1275.03 1711.86 1314.8 1665.42 1358.46 C 1650.97 1372.03 1638.55 1380.44 1624.6 1392.4 z M 915.302 1695.11 C 884.217 1676.56 854.922 1657.43 826.043 1635.43 C 822.017 1632.36 812.091 1622.52 808.384 1623.35 C 781.463 1627.03 728.696 1631.96 702.279 1628.8 C 738.051 1651.71 782.151 1674.45 823.779 1684.11 C 859.029 1693.49 879.093 1695.46 915.302 1695.11 z M 275.686 816.506 C 286.073 798.875 294.133 783.188 305.584 765.808 C 343.633 708.866 391.623 659.24 447.257 619.304 C 456.577 593.381 461.974 571.244 474.634 546.073 L 473.987 544.994 C 456.242 559.883 438.044 572.532 420.555 588.347 C 367.731 636.113 307.443 706.009 273.121 768.68 C 273.44 782.066 274.157 803.493 275.686 816.506 z M 1194.9 1433.91 C 1204.58 1437.2 1212.77 1439.29 1222.63 1441.79 C 1240.38 1445.85 1258.22 1449.47 1276.15 1452.65 C 1280.16 1443.28 1295 1419.7 1300.72 1410.14 C 1290.59 1405.14 1282.54 1395.27 1289.67 1384.11 C 1296.13 1374 1309.31 1371.77 1320.22 1369.65 C 1328.88 1352.72 1352.26 1292.69 1355.38 1274.71 L 1354.54 1273.99 C 1349.19 1277.04 1318.36 1293.64 1316.25 1295.93 C 1303.67 1309.61 1289.29 1330.93 1277.02 1346.14 C 1252.04 1377.55 1224.58 1406.9 1194.9 1433.91 z M 439.612 868.791 C 404.433 903.919 354.519 971.911 335.998 1018.39 C 359.974 1061.4 374.213 1084.45 405.627 1122.08 C 413.123 1130.48 420.681 1138.82 428.299 1147.11 C 434.865 1103.78 462.255 1041.27 483.601 1003.19 C 467.013 966.022 452.251 928.261 444.511 888.022 C 443.937 885.039 441.114 870.434 439.612 868.791 z M 1297.07 732.84 C 1351.87 767.236 1390.21 803.793 1433.82 850.026 L 1438.85 833.011 C 1444.25 812.634 1450.76 788.461 1453.44 767.552 C 1414.15 746.743 1372.94 729.763 1330.39 716.846 C 1314.18 712.051 1294.25 708.228 1279.84 703.779 C 1285.18 712.856 1291.46 724.141 1297.07 732.84 z M 1074.97 1767.57 C 1070.1 1765.34 1064.43 1763.22 1059.33 1761.48 C 1029.47 1751.27 1001.42 1737.93 972.642 1725.15 C 908.346 1734.71 870.522 1733.42 807.543 1717.67 L 791.322 1711.54 C 796.59 1714.97 802.981 1719.38 808.315 1722.47 C 810.503 1724.08 812.204 1725.18 814.477 1726.63 C 879.152 1767.91 950.648 1785.5 1027.05 1776.77 C 1044.56 1774.77 1057.95 1771.45 1074.97 1767.57 z M 951.293 764.327 C 924.525 757.55 889.897 754.432 862.648 755.419 C 793.192 759.716 735.195 784.484 679.015 824.893 C 687.289 850.394 710.296 912.256 723.957 935.458 C 730.003 928.042 738.996 918.935 746.076 912.298 C 808.254 851.461 875.35 806.052 951.293 764.327 z M 599.267 1275 C 643.621 1298.47 703.897 1321.3 752.769 1333.08 C 757.481 1334.26 758.201 1334.35 762.385 1336.63 C 760.31 1332.16 758.321 1327.29 754.254 1324.41 C 717.857 1298.59 681.673 1273.1 649.93 1241.4 C 637.679 1229.17 625.603 1216.75 613.624 1204.05 C 606.599 1227.38 602.359 1250.85 599.267 1275 z M 1346.65 1399.55 C 1340.15 1411.88 1333.73 1424.24 1327.37 1436.64 C 1324 1443.07 1319.95 1448.42 1317.37 1455.16 L 1317.91 1456.49 L 1319.25 1456.32 C 1344.34 1457.84 1369.51 1457.11 1394.46 1454.12 C 1396.13 1442.75 1403.14 1391.42 1399.57 1382.19 L 1398.4 1381.9 C 1383.2 1388.63 1362.6 1394.63 1346.65 1399.55 z M 714.113 1002.81 C 676.499 1051.77 646.904 1106.39 626.436 1164.64 C 651.251 1191.75 667.901 1210.33 696.172 1234.67 L 732.569 1264.79 C 709.726 1191.34 718.82 1121.77 738.76 1049.43 C 735.447 1042.95 716.984 1005.49 714.113 1002.81 z M 1348.95 650.435 C 1353.65 663.544 1358.18 676.684 1363.61 689.505 C 1393.35 699.995 1417.41 709.889 1446.31 722.584 L 1459.64 729.348 C 1461.67 696.642 1461.13 684.424 1460.13 652.64 C 1430.79 648.288 1401.09 646.901 1371.47 648.5 C 1363.96 649.055 1356.45 649.7 1348.95 650.435 z M 649.889 1337.48 C 656.37 1357.64 663.143 1373.5 671.548 1393.09 C 708.113 1392 732.398 1388 768.231 1380.97 L 782.905 1377.45 C 747.017 1368.77 711.648 1359.73 676.746 1347.5 C 671.809 1345.76 653.949 1339.76 649.889 1337.48 z M 632.615 1393.15 C 622.405 1373.82 611.451 1341.37 609.238 1319.6 C 604.527 1317.65 599.881 1315.55 595.307 1313.3 C 594.453 1337.03 593.801 1366.08 596.145 1389.86 C 608.384 1390.82 620.417 1391.72 632.615 1393.15 z M 1783.32 1100.76 C 1794.05 1060.64 1802.89 1013.31 1799.57 971.226 C 1798.83 961.902 1789.59 938.72 1785 930.518 C 1777.88 956.174 1765.18 999.728 1753.28 1023.61 C 1761.76 1040.98 1774.32 1072.87 1780.04 1091.78 L 1783.32 1100.76 z M 894.569 620.988 C 865.288 644.661 809.872 700.062 789.825 731.321 C 842.738 716.569 890.857 715.029 944.796 725.331 C 962.659 729.027 980.32 733.635 997.711 739.138 C 1012.13 730.959 1030.86 720.98 1046.19 714.512 C 1005.39 683.4 965.453 655.234 919.047 632.77 C 914.742 630.686 898.495 622.243 894.569 620.988 z M 384 1330.55 C 391.024 1341.86 414.644 1380.45 423.168 1387.31 C 420.851 1378.82 417.536 1363.46 416.357 1354.65 C 409.882 1349.92 389.009 1333.36 384 1330.55 z M 1774.19 727.545 C 1768.53 734.506 1755.34 743.328 1746.83 735.202 C 1739.77 728.464 1733.58 715.591 1727.94 707.071 C 1720.82 696.476 1713.47 686.033 1705.91 675.75 C 1705.91 697.682 1706.8 726.465 1705.63 747.896 C 1726.59 773.935 1749.13 799.038 1768.34 826.651 L 1769.73 813.23 C 1773.19 781.478 1774.24 759.233 1774.19 727.545 z M 1026.18 1709.93 C 1066.72 1725.59 1091.64 1735.18 1133.33 1746.74 C 1139.14 1744.03 1144.93 1741.26 1150.7 1738.45 C 1209.05 1707.97 1253.25 1681.15 1299.5 1632.95 C 1246.98 1634.16 1222.99 1632.81 1171.62 1623.25 C 1128.57 1660.4 1079.35 1689.74 1026.18 1709.93 z M 1352.14 1627.74 C 1349.35 1631.37 1327.82 1657.01 1327.81 1657.37 L 1328.44 1657.13 C 1347.47 1645.33 1364.95 1634.51 1383.66 1622.03 L 1383.47 1621.17 L 1382.22 1621.15 C 1371.86 1623.78 1362.59 1625.69 1352.14 1627.74 z M 1320.97 677.081 C 1319.15 672.765 1313.82 658.952 1311.35 655.992 L 1309.09 656.166 C 1294.06 659.46 1281.9 662.305 1267.12 666.472 C 1275.07 667.217 1280.83 668.149 1288.71 669.6 C 1299.69 671.999 1310.11 674.588 1320.97 677.081 z M 1388.31 1290.54 C 1385.62 1300.62 1370.63 1346.69 1365.75 1353.18 L 1365.94 1355.77 C 1369.01 1354.96 1369.7 1354.65 1372.5 1353.42 C 1380.92 1350.32 1389.96 1346.84 1398.41 1344.04 C 1397.09 1335.84 1390.84 1296.04 1388.31 1290.54 z M 670.966 675.089 C 684.765 645.573 699.067 616.494 717.217 589.406 C 719.899 585.403 722.576 581.39 724.825 577.124 C 710.256 576.363 691.576 575.038 677.205 576.571 C 670.404 576.865 662.927 577.032 656.198 577.539 C 652.287 600.734 644.097 679.737 653.728 698.634 L 656.009 700.175 C 664.954 698.049 667.273 683.079 670.966 675.089 z M 1144.76 1291.84 C 1229.98 1297.3 1303.35 1270.16 1370.49 1218.71 C 1359.8 1188.61 1347.83 1160.29 1334.09 1131.45 C 1332.65 1128.42 1326.09 1113.89 1324.54 1111.97 C 1246.46 1192.4 1191.46 1228.12 1095.38 1283.58 C 1112.1 1287.57 1127.56 1290.41 1144.76 1291.84 z M 296.154 1019.73 C 286.195 997.979 276.913 976.77 269.522 954.013 C 268.469 950.771 266.36 944.073 264.81 941.425 C 254.973 980.011 245.243 1033.3 248.917 1073.93 C 249.549 1080.92 259.903 1104.62 263.4 1111.44 L 266.773 1099.75 C 275.676 1071.27 283.647 1047.04 296.154 1019.73 z M 467.565 795.85 C 510.442 763.526 566.08 729.796 617.21 712.553 C 611.677 683.498 613.867 635.296 615.878 605.407 C 616.168 601.094 618.971 585.078 617.591 583.199 C 558.641 597.262 532.057 609.212 479.777 639.644 C 468.689 677.722 459.294 757.349 466.202 795.417 L 467.565 795.85 z M 1599.8 562.804 C 1619.67 610.216 1622.78 637.25 1632.49 685.474 C 1645.59 694.656 1658.14 704.589 1670.09 715.222 C 1669.02 678.419 1668.09 658.154 1662.71 621.541 C 1650.34 607.894 1615.17 571.072 1599.8 562.804 z M 898.642 1339.42 L 933.841 1324.54 C 881.074 1277.58 834.103 1215.24 796.879 1155.64 C 789.176 1143.3 782.474 1130.87 775.555 1118.15 C 773.249 1113.91 766.164 1100 763.907 1097.48 C 744.29 1179.75 759.07 1266.46 804.833 1337.58 C 810.048 1345.86 820.1 1358.69 823.954 1366.56 C 849.411 1357.93 873.683 1349.53 898.642 1339.42 z M 858.242 1613.98 C 873.583 1625.07 966.024 1688.78 980.492 1686.59 C 1029.93 1671.68 1087.47 1646.36 1126.93 1612.26 C 1100.9 1607.82 1027.5 1577.35 1004.38 1563.16 C 957.289 1584.58 908.816 1602.64 858.242 1613.98 z M 881.353 453.651 C 845.073 486.615 820.783 510.565 789.642 549.438 C 813.637 553.267 865.813 569.671 888.414 579.669 C 893.366 575.729 899.337 570.722 904.391 567.12 C 939.899 539.128 966.421 525.822 1003.14 502.828 C 964.522 481.912 923.668 465.415 881.353 453.651 z M 458.264 1381.39 C 469.405 1431.05 488.621 1478.54 515.146 1521.98 C 520.528 1530.87 529.421 1546.58 538.053 1551.18 C 560.706 1563.26 598.346 1576.54 623.193 1581.47 C 599.792 1540.81 568.592 1467.93 564.655 1420.67 C 527.582 1412.44 491.794 1399.23 458.264 1381.39 z M 434.958 673.993 C 382.385 717.673 339.291 771.635 308.322 832.567 C 300.086 848.579 293.388 864.93 285.919 881.227 C 292.512 909.023 298.626 929.451 308.695 956.247 C 311.458 962.975 314.263 969.687 317.108 976.381 C 342.669 926.479 389.376 862.256 432.506 825.897 C 428.17 785.364 427.438 744.975 431.03 704.286 C 431.685 696.862 435.391 680.307 434.958 673.993 z M 1048.05 358.959 C 1011.25 372.438 981.84 385.215 948.405 406.213 C 937.875 412.827 925.849 419.472 916.33 427.489 C 954.556 437.693 1001.21 459.288 1035.6 478.76 L 1043.03 483.204 C 1066.14 473.262 1088.69 463.611 1112.52 455.473 C 1128.33 450.073 1143.88 445.978 1159.82 441.26 C 1143.56 426.828 1063.03 359.21 1048.05 358.959 z M 1435.36 1367.17 C 1436.79 1383.43 1435.69 1401.68 1434.78 1417.96 C 1434.48 1423.33 1431.46 1444.51 1432.4 1446.76 L 1434.22 1446.84 C 1491.11 1432.57 1544.67 1407.34 1591.91 1372.57 C 1593.93 1332.6 1593.45 1305.4 1589.84 1265.91 C 1532.16 1314.63 1503.11 1334.27 1435.36 1367.17 z M 1048 1308.68 C 1031.31 1318.88 1014.12 1324.92 1000.34 1333.26 C 1053.54 1372.82 1094.03 1397.09 1156.29 1420.43 C 1167.29 1409.79 1178.96 1399.33 1189.79 1388.66 C 1212.74 1366.17 1234.48 1342.47 1254.91 1317.67 C 1193.97 1334.13 1144.91 1330.91 1083.83 1318.2 C 1073.98 1316.15 1055.37 1309.91 1048 1308.68 z M 864.621 413.108 L 872.958 415.294 C 909.646 386.787 962.756 351.231 1006.63 335.759 C 981.829 323.256 956.178 312.507 929.869 303.593 C 916.746 299.211 902.995 295.741 890.224 291.316 C 842.064 319.695 796.152 349.581 757.558 390.676 C 753.731 394.75 749.64 399.127 745.667 403.044 C 787.92 401.519 823.134 403.875 864.621 413.108 z M 1635.3 733.47 C 1637.77 770.64 1634.67 813.464 1628.21 850.118 C 1663.43 882.906 1706.59 939.23 1731.26 980.782 L 1736.44 965.679 C 1743.08 947.223 1756.87 900.617 1760.04 881.399 C 1729.78 833.25 1700.97 792.577 1658.49 753.582 C 1653.4 748.911 1640.71 737.08 1635.3 733.47 z M 1188.79 472.256 C 1164.12 477.52 1139.8 484.341 1115.99 492.678 C 1103.95 496.894 1092.21 501.924 1080.29 506.102 C 1123.34 532.032 1175.49 577.108 1210.64 613.195 C 1218.12 620.999 1225.4 628.996 1232.46 637.177 C 1253.36 631.479 1274.38 626.254 1295.52 621.505 C 1270.51 574.629 1229.52 509.151 1190.98 472.075 L 1188.79 472.256 z M 1248.77 892.51 C 1260.87 911.721 1272.46 931.254 1283.51 951.089 C 1304.58 866.952 1288.7 789.744 1244.73 716.121 C 1240.92 709.73 1223.98 681.45 1218.63 679.898 C 1182.56 692.971 1147.08 707.601 1112.29 723.746 C 1160.58 768.651 1214.89 836.328 1248.77 892.51 z M 621.987 749.876 C 566.88 770.597 515.878 800.913 471.343 839.419 C 477.028 877.04 486.639 913.962 500.018 949.581 C 502.01 954.573 504.024 959.94 506.25 964.801 C 509.507 957.369 520.161 941.836 525.165 934.856 C 554.119 894.469 597.954 842.819 637.455 812.522 C 635.687 806.197 621.782 749.6 621.987 749.876 z"})})}function Yd({tumbleweedColor:e,windColor:r,shadowColor:o}){const s=i.useRef(null),l=i.useRef(null),a=i.useRef(null),c=i.useRef([]),u=i.useRef(0),f=i.useRef(0);return i.useEffect(()=>{const d=s.current,h=l.current,g=a.current,m=c.current;if(!d||!h||!g)return;const x=4e3,p=40,b=[.18,.24,.3],v=.35,j=C=>{f.current||(f.current=C);const y=(C-f.current)%x/x,B=d.offsetWidth+p*2,R=-p+y*B,S=y*Math.PI*4,L=Math.abs(Math.sin(S))*12,$=y*720;h.style.transform=`translateX(${R}px) translateY(${-L}px) rotate(${$}deg)`;const I=1-L/20;g.style.transform=`translateX(${R+p/2-10}px) scaleX(${.5+I*.5}) scaleY(1)`,g.style.opacity=`${.25+I*.25}`;for(let P=0;P<m.length;P++){const E=m[P];if(!E)continue;const H=b[P],z=(y-H)/v;z>=0&&z<=1?z<=.3?E.style.strokeDashoffset=`${1-z/.3}`:z<=.7?E.style.strokeDashoffset="0":E.style.strokeDashoffset=`${-((z-.7)/.3)}`:E.style.strokeDashoffset="1"}u.current=requestAnimationFrame(j)};return u.current=requestAnimationFrame(j),()=>cancelAnimationFrame(u.current)},[]),t.jsxs("div",{ref:s,style:{position:"relative",width:"100%",height:"3.75rem",overflow:"hidden",pointerEvents:"none"},children:[t.jsx("svg",{width:"30",height:"12",viewBox:"0 0 40 12",fill:"none",style:{position:"absolute",left:4,bottom:30,opacity:.4,transform:"rotate(-3deg)"},children:t.jsx("path",{ref:d=>{c.current[0]=d},d:"M0 9 Q10 2 24 5 Q32 7 40 3",stroke:r??n.colorTextSubtle,strokeWidth:"1.5",strokeLinecap:"round",pathLength:1,strokeDasharray:1,strokeDashoffset:1})}),t.jsx("svg",{width:"30",height:"12",viewBox:"0 0 40 12",fill:"none",style:{position:"absolute",left:4,bottom:21,opacity:.4,transform:"rotate(4deg)"},children:t.jsx("path",{ref:d=>{c.current[1]=d},d:"M0 6 Q8 0 20 4 Q30 7 38 2",stroke:r??n.colorTextSubtle,strokeWidth:"1.5",strokeLinecap:"round",pathLength:1,strokeDasharray:1,strokeDashoffset:1})}),t.jsx("svg",{width:"30",height:"12",viewBox:"0 0 40 12",fill:"none",style:{position:"absolute",left:4,bottom:13,opacity:.4,transform:"rotate(-6deg)"},children:t.jsx("path",{ref:d=>{c.current[2]=d},d:"M0 7 Q12 11 26 5 Q34 2 40 6",stroke:r??n.colorTextSubtle,strokeWidth:"1.5",strokeLinecap:"round",pathLength:1,strokeDasharray:1,strokeDashoffset:1})}),t.jsx("div",{ref:a,style:{position:"absolute",bottom:0,left:0,width:"1.25rem",height:"0.375rem",borderRadius:"50%",backgroundColor:o??n.colorTextSubtle,opacity:.3}}),t.jsx("div",{ref:l,style:{position:"absolute",bottom:"0.25rem",left:0,width:40,height:40},children:t.jsx(Vd,{color:e})})]})}const Kd=t.jsx(Ns,{});function _d({image:e,imageStyle:r,description:o,tumbleweed:s=!1,iconColor:l,tumbleweedColor:a,windColor:c,shadowColor:u,children:f,className:d,style:h,classNames:g,styles:m}){const x=V({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"2rem 0"},m?.root,h),p=V({marginBottom:o!==!1?"0.5rem":void 0,lineHeight:1},m?.image,r),b=V({color:n.colorTextSubtle,fontSize:"0.875rem",lineHeight:1.6},m?.description),v=V({marginTop:"1rem"},m?.footer),j=typeof e=="string"?t.jsx("img",{src:e,alt:"empty",style:{maxWidth:"100%",height:"auto"}}):e??t.jsx(Ns,{color:l});return t.jsxs("div",{className:Ve(d,g?.root),style:x,children:[s?t.jsx("div",{className:g?.image,style:{...p,position:"relative",width:"100%",minHeight:"5rem"},children:t.jsx(Yd,{tumbleweedColor:a,windColor:c,shadowColor:u})}):t.jsx("div",{className:g?.image,style:p,children:j}),o!==!1&&t.jsx("div",{className:g?.description,style:b,children:o??"No data"}),f&&t.jsx("div",{className:g?.footer,style:v,children:f})]})}const Vs=Object.assign(_d,{PRESENTED_IMAGE_SIMPLE:Kd});function Xd(){return t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),t.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function Gd(){return t.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("circle",{cx:"11",cy:"11",r:"8"}),t.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}),t.jsx("line",{x1:"11",y1:"8",x2:"11",y2:"14"}),t.jsx("line",{x1:"8",y1:"11",x2:"14",y2:"11"})]})}function Ud(){return t.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("circle",{cx:"11",cy:"11",r:"8"}),t.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}),t.jsx("line",{x1:"8",y1:"11",x2:"14",y2:"11"})]})}function qd(){return t.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("polyline",{points:"1 4 1 10 7 10"}),t.jsx("path",{d:"M3.51 15a9 9 0 1 0 2.13-9.36L1 10"})]})}function Qd(){return t.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("polyline",{points:"23 4 23 10 17 10"}),t.jsx("path",{d:"M20.49 15a9 9 0 1 1-2.13-9.36L23 10"})]})}function Zd(){return t.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3"}),t.jsx("path",{d:"M16 3h3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-3"}),t.jsx("line",{x1:"12",y1:"20",x2:"12",y2:"4"}),t.jsx("polyline",{points:"6 12 3 12"}),t.jsx("polyline",{points:"21 12 18 12"})]})}function Jd(){return t.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M3 8V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v3"}),t.jsx("path",{d:"M3 16v3a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-3"}),t.jsx("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),t.jsx("polyline",{points:"12 6 12 3"}),t.jsx("polyline",{points:"12 21 12 18"})]})}function eu(){return t.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),t.jsx("path",{d:"M3 3v5h5"})]})}function tu(){return t.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function ru(){return t.jsx("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"15 18 9 12 15 6"})})}function ou(){return t.jsx("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"9 6 15 12 9 18"})})}function nu(){return t.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:n.colorTextSubtle,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),t.jsx("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),t.jsx("polyline",{points:"21 15 16 10 5 21"}),t.jsx("line",{x1:"2",y1:"2",x2:"22",y2:"22"})]})}const Ur={scale:1,rotate:0,flipX:!1,flipY:!1,x:0,y:0};function su(e){return`translate3d(${e.x}px, ${e.y}px, 0) scale(${e.scale}) rotate(${e.rotate}deg) scaleX(${e.flipX?-1:1}) scaleY(${e.flipY?-1:1})`}const Ys=i.createContext({isGroup:!1,register:()=>()=>{},open:()=>{},previewDisabled:!1});function Ks({open:e,src:r,alt:o,onClose:s,minScale:l,maxScale:a,scaleStep:c,isGroup:u,current:f=0,total:d=1,onPrev:h,onNext:g,countRender:m}){const[x,p]=i.useState(Ur),[b,v]=i.useState(!1),[j,C]=i.useState(!1),w=i.useRef({x:0,y:0,tx:0,ty:0}),y=i.useRef(null),k=i.useRef(r);i.useEffect(()=>{r!==k.current&&(p(Ur),k.current=r)},[r]),i.useEffect(()=>{e&&(p(Ur),v(!1),requestAnimationFrame(()=>{requestAnimationFrame(()=>{v(!0)})}))},[e]),i.useEffect(()=>{if(!e)return;const T=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=T}},[e]),i.useEffect(()=>{e&&y.current&&y.current.focus()},[e]);const B=i.useCallback(()=>{p(T=>{const O=T.scale*(1+c);return{...T,scale:Math.min(O,a)}})},[c,a]),R=i.useCallback(()=>{p(T=>{const O=T.scale/(1+c);return O<=l?{...T,scale:l,x:0,y:0}:{...T,scale:O}})},[c,l]),S=i.useCallback(()=>{p(T=>({...T,rotate:T.rotate-90}))},[]),L=i.useCallback(()=>{p(T=>({...T,rotate:T.rotate+90}))},[]),$=i.useCallback(()=>{p(T=>({...T,flipX:!T.flipX}))},[]),I=i.useCallback(()=>{p(T=>({...T,flipY:!T.flipY}))},[]),P=i.useCallback(()=>{p(Ur)},[]),E=i.useCallback(T=>{switch(T.key){case"Escape":T.preventDefault(),s();break;case"ArrowLeft":u&&h&&(T.preventDefault(),h());break;case"ArrowRight":u&&g&&(T.preventDefault(),g());break;case"+":case"=":T.preventDefault(),B();break;case"-":T.preventDefault(),R();break}},[s,u,h,g,B,R]),H=i.useCallback(T=>{T.preventDefault(),T.deltaY<0?B():R()},[B,R]),z=i.useCallback(T=>{x.scale<=1||(T.preventDefault(),C(!0),w.current={x:T.clientX,y:T.clientY,tx:x.x,ty:x.y})},[x.scale,x.x,x.y]);i.useEffect(()=>{if(!j)return;const T=Y=>{const X=Y.clientX-w.current.x,_=Y.clientY-w.current.y;p(G=>({...G,x:w.current.tx+X,y:w.current.ty+_}))},O=()=>{C(!1)};return document.addEventListener("mousemove",T),document.addEventListener("mouseup",O),()=>{document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",O)}},[j]);const A=i.useCallback(T=>{T.target===T.currentTarget&&s()},[s]);if(!e||typeof document>"u")return null;const M={display:"inline-flex",alignItems:"center",justifyContent:"center",width:"2.75rem",height:"2.75rem",border:"none",background:"none",color:"rgba(255,255,255,0.75)",cursor:"pointer",borderRadius:"0.375rem",transition:"color 0.15s, background-color 0.15s",padding:0},W={position:"absolute",top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",justifyContent:"center",width:"2.75rem",height:"2.75rem",borderRadius:"50%",border:"none",backgroundColor:"rgba(0,0,0,0.35)",color:"rgba(255,255,255,0.85)",cursor:"pointer",transition:"background-color 0.2s",padding:0,zIndex:2},F=u&&d>1?t.jsx("div",{style:{position:"absolute",top:"1rem",left:"50%",transform:"translateX(-50%)",color:"rgba(255,255,255,0.85)",fontSize:"0.875rem",fontWeight:500,userSelect:"none"},children:m?m(f+1,d):`${f+1} / ${d}`}):null,D=t.jsxs("div",{ref:y,tabIndex:-1,onKeyDown:E,style:{position:"fixed",inset:0,zIndex:1050,outline:"none",opacity:b?1:0,transition:"opacity 0.2s ease"},children:[t.jsx("div",{style:{position:"absolute",inset:0,backgroundColor:"rgba(0,0,0,0.72)"},onClick:A}),F,t.jsx("button",{type:"button",style:{position:"absolute",top:"1rem",right:"1rem",display:"flex",alignItems:"center",justifyContent:"center",width:"2.5rem",height:"2.5rem",borderRadius:"50%",border:"none",backgroundColor:"rgba(0,0,0,0.35)",color:"rgba(255,255,255,0.85)",cursor:"pointer",transition:"background-color 0.2s",padding:0,zIndex:2},onClick:s,onMouseEnter:T=>{T.currentTarget.style.backgroundColor="rgba(0,0,0,0.55)"},onMouseLeave:T=>{T.currentTarget.style.backgroundColor="rgba(0,0,0,0.35)"},children:t.jsx(tu,{})}),u&&d>1&&t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",style:{...W,left:"1rem"},onClick:h,onMouseEnter:T=>{T.currentTarget.style.backgroundColor="rgba(0,0,0,0.55)"},onMouseLeave:T=>{T.currentTarget.style.backgroundColor="rgba(0,0,0,0.35)"},children:t.jsx(ru,{})}),t.jsx("button",{type:"button",style:{...W,right:"1rem"},onClick:g,onMouseEnter:T=>{T.currentTarget.style.backgroundColor="rgba(0,0,0,0.55)"},onMouseLeave:T=>{T.currentTarget.style.backgroundColor="rgba(0,0,0,0.35)"},children:t.jsx(ou,{})})]}),t.jsx("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"},onWheel:H,children:t.jsx("img",{src:r,alt:o,draggable:!1,style:{maxWidth:"80vw",maxHeight:"80vh",objectFit:"contain",transform:su(x),transition:j?"none":"transform 0.2s ease",cursor:x.scale>1?j?"grabbing":"grab":"default",pointerEvents:"auto",userSelect:"none"},onMouseDown:z})}),t.jsx("div",{style:{position:"absolute",bottom:"1.5rem",left:"50%",transform:"translateX(-50%)",display:"flex",alignItems:"center",gap:"0.125rem",backgroundColor:"rgba(0,0,0,0.45)",borderRadius:"2rem",padding:"0.25rem 0.5rem",zIndex:2},children:[{icon:t.jsx(Ud,{}),action:R,title:"Zoom out"},{icon:t.jsx(Gd,{}),action:B,title:"Zoom in"},{icon:t.jsx(qd,{}),action:S,title:"Rotate left"},{icon:t.jsx(Qd,{}),action:L,title:"Rotate right"},{icon:t.jsx(Zd,{}),action:$,title:"Flip horizontal"},{icon:t.jsx(Jd,{}),action:I,title:"Flip vertical"},{icon:t.jsx(eu,{}),action:P,title:"Reset"}].map(T=>t.jsx("button",{type:"button",title:T.title,style:M,onClick:T.action,onMouseEnter:O=>{O.currentTarget.style.backgroundColor="rgba(255,255,255,0.12)"},onMouseLeave:O=>{O.currentTarget.style.backgroundColor="transparent"},children:T.icon},T.title))})]});return or.createPortal(D,document.body)}let iu=0;function _s({src:e,alt:r,width:o,height:s,fallback:l,placeholder:a,preview:c=!0,onError:u,className:f,style:d,classNames:h,styles:g}){const[m,x]=i.useState("loading"),[p,b]=i.useState(!1),[v,j]=i.useState(!1),C=i.useRef(null),w=i.useRef(null),y=i.useContext(Ys),{isGroup:k,register:B}=y,R=i.useRef(++iu),S=c!==!1&&!y.previewDisabled,L=typeof c=="object"?c:{},$=L.open!==void 0,I=$?L.open:p,P=L.src??(v&&l?l:e);i.useEffect(()=>{if(!k||!e)return;const Y=R.current;return B(Y,{src:e,alt:r,previewSrc:L.src})},[k,B,e,r,L.src]),i.useEffect(()=>{x("loading"),j(!1)},[e]);const E=i.useCallback(()=>{x("loaded")},[]),H=i.useCallback(Y=>{u?.(Y),l&&!v?j(!0):x("error")},[l,v,u]),z=i.useCallback(()=>{S&&(k?y.open(R.current):$?L.onOpenChange?.(!0):b(!0))},[S,k,y.open,$,L]),A=i.useCallback(()=>{$?L.onOpenChange?.(!1):b(!1)},[$,L]),M=i.useCallback(()=>{!S||!C.current||(C.current.style.opacity="1")},[S]),W=i.useCallback(()=>{C.current&&(C.current.style.opacity="0")},[]),F=v&&l?l:e,D=V({position:"relative",display:"inline-block",overflow:"hidden",width:o,height:s},g?.root,d),T={display:"block",width:"100%",height:"100%",objectFit:"cover",...g?.image},O=m==="loading"&&a;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:Ve(f,h?.root),style:D,onMouseEnter:M,onMouseLeave:W,onClick:z,children:[O&&t.jsx("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:n.colorBgSubtle},children:a===!0?t.jsx("div",{style:{width:"100%",height:"100%",background:`linear-gradient(90deg, ${n.colorBgSubtle} 25%, ${n.colorBgMuted} 50%, ${n.colorBgSubtle} 75%)`,backgroundSize:"200% 100%",animation:"j-image-shimmer 1.5s infinite"}}):a}),m==="error"&&t.jsx("div",{style:{position:"absolute",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"0.5rem",backgroundColor:n.colorBgSubtle,color:n.colorTextSubtle,fontSize:"0.75rem"},children:t.jsx(nu,{})}),m!=="error"&&t.jsx("img",{ref:w,src:F,alt:r,className:h?.image,style:{...T,opacity:m==="loaded"?1:0,transition:"opacity 0.3s"},onLoad:E,onError:H}),S&&m==="loaded"&&t.jsxs("div",{ref:C,className:h?.mask,style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",gap:"0.375rem",backgroundColor:"rgba(0,0,0,0.4)",color:"#fff",fontSize:"0.875rem",cursor:"pointer",opacity:0,transition:"opacity 0.2s",...g?.mask},children:[t.jsx(Xd,{}),"Preview"]})]}),O&&a===!0&&t.jsx("style",{children:"@keyframes j-image-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }"}),S&&!y.isGroup&&t.jsx(Ks,{open:I,src:P??"",alt:r,onClose:A,minScale:L.minScale??1,maxScale:L.maxScale??50,scaleStep:L.scaleStep??.5})]})}function lu({items:e,preview:r=!0,children:o}){const[s,l]=i.useState(new Map),[a,c]=i.useState(-1),[u,f]=i.useState(!1),d=r===!1,h=typeof r=="object"?r:{},m=h.open!==void 0?h.open:u,x=i.useRef(h);x.current=h;const p=i.useRef(e);p.current=e;const b=i.useRef(s);b.current=s;const v=i.useMemo(()=>e?e.map((P,E)=>({id:E,src:typeof P=="string"?P:P.src,alt:typeof P=="string"?void 0:P.alt,previewSrc:void 0})):Array.from(s.entries()).sort((P,E)=>P[0]-E[0]).map(([P,E])=>({id:P,...E})),[e,s]),j=i.useMemo(()=>{const I=h.current;return I!==void 0?I:Math.max(0,v.findIndex(P=>P.id===a))},[v,a,h.current]),C=v[j],w=i.useRef(j);w.current=j;const y=i.useRef(v);y.current=v;const k=i.useCallback((I,P)=>(l(E=>{const H=new Map(E);return H.set(I,P),H}),()=>{l(E=>{const H=new Map(E);return H.delete(I),H})}),[]),B=i.useCallback(I=>{const P=p.current;if(P){const E=b.current.get(I);if(E){const H=P.findIndex(z=>{const A=typeof z=="string"?z:z.src;return A===E.src||A===E.previewSrc});c(H>=0?H:0)}else c(0)}else c(I);x.current.open!==void 0?x.current.onOpenChange?.(!0):f(!0)},[]),R=i.useCallback(()=>{x.current.open!==void 0?x.current.onOpenChange?.(!1):f(!1)},[]),S=i.useCallback(()=>{const I=y.current,P=w.current,E=(P-1+I.length)%I.length,H=I[E];H&&(c(H.id),x.current.onChange?.(E,P))},[]),L=i.useCallback(()=>{const I=y.current,P=w.current,E=(P+1)%I.length,H=I[E];H&&(c(H.id),x.current.onChange?.(E,P))},[]),$=i.useMemo(()=>({isGroup:!0,register:k,open:B,previewDisabled:d}),[k,B,d]);return t.jsxs(Ys.Provider,{value:$,children:[e&&!o?e.map((I,P)=>{const E=typeof I=="string"?I:I.src,H=typeof I=="string"?void 0:I.alt;return t.jsx(_s,{src:E,alt:H,width:"7.5rem",height:"5rem"},P)}):o,!d&&t.jsx(Ks,{open:m,src:C?.previewSrc??C?.src??"",alt:C?.alt,onClose:R,minScale:h.minScale??1,maxScale:h.maxScale??50,scaleStep:h.scaleStep??.5,isGroup:!0,current:j,total:v.length,onPrev:S,onNext:L,countRender:h.countRender})]})}const au=Object.assign(_s,{PreviewGroup:lu}),cu={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1600},du=["xxl","xl","lg","md","sm","xs"];function Xs(e,r){if(typeof e!="object"||e===null)return e;const o=e;for(const s of du)if(r>=cu[s]&&o[s]!==void 0)return o[s]}function uu(){const[e,r]=i.useState(()=>typeof window<"u"?window.innerWidth:1200);return i.useEffect(()=>{if(typeof window>"u")return;const o=()=>r(window.innerWidth);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),e}const fu={small:{headerPadding:"0.5rem 0",cellPadding:"0.375rem 0.75rem",fontSize:"0.8125rem",headerFontSize:"0.875rem"},middle:{headerPadding:"0.75rem 0",cellPadding:"0.75rem 1rem",fontSize:"0.875rem",headerFontSize:"1rem"},large:{headerPadding:"1rem 0",cellPadding:"1rem 1.5rem",fontSize:"1rem",headerFontSize:"1.125rem"}};function hu(e,r,o){const s=[];let l=[],a=0;for(let c=0;c<e.length;c++){const u=e[c],f=typeof u.span=="object"&&u.span!==null?Xs(u.span,o)??1:u.span??1,d=Math.min(f,r);if(a+d>r&&l.length>0){const h=r-a;h>0&&l.length>0&&(l[l.length-1].resolvedSpan+=h),s.push(l),l=[],a=0}l.push({...u,resolvedSpan:d}),a+=d}if(l.length>0){const c=r-a;c>0&&(l[l.length-1].resolvedSpan+=c),s.push(l)}return s}function pu(e){return null}function gu({items:e,title:r,extra:o,bordered:s=!1,column:l=3,layout:a="horizontal",colon:c=!0,size:u="middle",labelStyle:f,contentStyle:d,children:h,className:g,style:m,classNames:x,styles:p}){const b=uu(),v=fu[u],j=a==="vertical",C=typeof l=="object"&&l!==null?Xs(l,b)??3:l,w=e??(()=>{const W=[];return i.Children.forEach(h,F=>{if(!i.isValidElement(F))return;const D=F.props;D.itemKey!==void 0&&W.push({key:D.itemKey,label:D.label,children:D.children,span:D.span,labelStyle:D.labelStyle,contentStyle:D.contentStyle})}),W})(),y=hu(w,C,b),k=V({width:"100%",overflowX:"auto"},p?.root,m),B=r||o,R=V({display:"flex",alignItems:"center",justifyContent:"space-between",gap:"1rem",padding:v.headerPadding,marginBottom:"0.75rem"},p?.header),S=V({flex:1,minWidth:0,fontSize:v.headerFontSize,fontWeight:600,color:n.colorText,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},p?.title),L=V({flexShrink:0,fontSize:v.fontSize,color:n.colorTextMuted},p?.extra),$="0.5rem",I=V({width:"100%",minWidth:s?`${C*200}px`:`${C*150}px`,fontSize:v.fontSize,...s?{borderCollapse:"separate",borderSpacing:0,borderTop:`1px solid ${n.colorBorder}`,borderLeft:`1px solid ${n.colorBorder}`,borderRight:"none",borderBottom:"none",borderRadius:$}:{borderCollapse:"collapse"}},p?.table),P={padding:v.cellPadding,color:n.colorTextMuted,fontWeight:500,textAlign:"left",verticalAlign:"top",...s?{backgroundColor:n.colorBgSubtle,borderBottom:`1px solid ${n.colorBorder}`,borderRight:`1px solid ${n.colorBorder}`}:{},...!s&&!j?{whiteSpace:"nowrap",paddingRight:"0.5rem"}:{}},E={padding:v.cellPadding,color:n.colorText,verticalAlign:"top",...s?{borderBottom:`1px solid ${n.colorBorder}`,borderRight:`1px solid ${n.colorBorder}`}:{}},H={},z=j?C:C*2,A=(W,F,D)=>{const T=s&&F===0,O=s&&F===D-1;return t.jsx("tr",{className:x?.row,style:V(H,p?.row),children:W.map((Y,X)=>{const _=X===0,G=X===W.length-1,Q={...T&&_?{borderTopLeftRadius:$}:{},...O&&_?{borderBottomLeftRadius:$}:{}},N={...T&&G?{borderTopRightRadius:$}:{},...O&&G?{borderBottomRightRadius:$}:{}},le={...P,...f,...Y.labelStyle,...Q},oe={...E,...d,...Y.contentStyle,...N},q=Y.resolvedSpan>1?Y.resolvedSpan*2-1:1;return[t.jsxs("th",{className:Ve(x?.label,void 0),style:V(le,p?.label),children:[Y.label,c&&Y.label?":":""]},`${Y.key}-label`),t.jsx("td",{colSpan:q>1?q:void 0,className:Ve(x?.content,void 0),style:V(oe,p?.content),children:Y.children},`${Y.key}-content`)]})},F)},M=(W,F,D)=>{const T=s&&F===0,O=s&&F===D-1;return t.jsxs(t.Fragment,{children:[t.jsx("tr",{className:x?.row,style:V(H,p?.row),children:W.map((Y,X)=>{const _=X===0,G=X===W.length-1,Q={...T&&_?{borderTopLeftRadius:$}:{},...T&&G?{borderTopRightRadius:$}:{}},N={...P,...f,...Y.labelStyle,...Q};return t.jsxs("th",{colSpan:Y.resolvedSpan>1?Y.resolvedSpan:void 0,className:Ve(x?.label,void 0),style:V(N,p?.label),children:[Y.label,c&&Y.label?":":""]},`${Y.key}-label`)})},`${F}-labels`),t.jsx("tr",{className:x?.row,style:V(H,p?.row),children:W.map((Y,X)=>{const _=X===0,G=X===W.length-1,Q={...O&&_?{borderBottomLeftRadius:$}:{},...O&&G?{borderBottomRightRadius:$}:{}},N={...E,...d,...Y.contentStyle,...Q};return t.jsx("td",{colSpan:Y.resolvedSpan>1?Y.resolvedSpan:void 0,className:Ve(x?.content,void 0),style:V(N,p?.content),children:Y.children},`${Y.key}-content`)})},`${F}-values`)]})};return t.jsxs("div",{className:Ve(g,x?.root),style:k,children:[B&&t.jsxs("div",{className:x?.header,style:R,children:[r&&t.jsx("div",{className:x?.title,style:S,children:r}),o&&t.jsx("div",{className:x?.extra,style:L,children:o})]}),t.jsxs("table",{className:x?.table,style:I,children:[t.jsx("colgroup",{children:j?Array.from({length:C},(W,F)=>t.jsx("col",{style:{width:`${100/C}%`}},F)):Array.from({length:z},(W,F)=>t.jsx("col",{},F))}),t.jsx("tbody",{children:y.map((W,F)=>j?M(W,F,y.length):A(W,F,y.length))})]})]})}const mu=Object.assign(gu,{Item:pu});function xu(e){return e?Array.isArray(e)?e:[e]:["onChange"]}function zt(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e.source,e.flags);if(Array.isArray(e))return e.map(zt);const r={};for(const o of Object.keys(e))r[o]=zt(e[o]);return r}function yu({color:e}){const r=i.useRef(null);return i.useEffect(()=>{const o=r.current;if(!o)return;let s=0,l;const a=()=>{s=(s+4)%360,o.style.transform=`rotate(${s}deg)`,l=requestAnimationFrame(a)};return l=requestAnimationFrame(a),()=>cancelAnimationFrame(l)},[]),t.jsx("svg",{ref:r,viewBox:"0 0 1024 1024",width:"14",height:"14",fill:e,style:{flexShrink:0},children:t.jsx("path",{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.3 199.3 0 19.9-16.1 36-36 36z"})})}function bu({status:e}){return e==="success"?t.jsx("svg",{viewBox:"64 64 896 896",width:"14",height:"14",fill:n.colorSuccess,style:{flexShrink:0},children:t.jsx("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})}):e==="error"?t.jsx("svg",{viewBox:"64 64 896 896",width:"14",height:"14",fill:n.colorError,style:{flexShrink:0},children:t.jsx("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"})}):e==="warning"?t.jsx("svg",{viewBox:"64 64 896 896",width:"14",height:"14",fill:n.colorWarning,style:{flexShrink:0},children:t.jsx("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"})}):e==="validating"?t.jsx(yu,{color:n.colorPrimary}):null}class wt{values={};initialValues={};subscribers=new Map;globalSubscribers=new Set;touchedFields=new Set;fieldErrors=new Map;fieldWarnings=new Map;validatingFields=new Set;rules=new Map;onValuesChange;onFieldsChange;localeMessages;static toPathArray(r){return Array.isArray(r)?r:typeof r=="number"?[r]:String(r).split(".")}static toPathKey(r){return wt.toPathArray(r).join(".")}static getNestedValue(r,o){let s=r;for(const l of o){if(s==null)return;s=s[l]}return s}static setNestedValue(r,o,s){if(o.length===0)return s;const l=Array.isArray(r)?[...r]:{...r},[a,...c]=o;return c.length===0?l[a]=s:l[a]=wt.setNestedValue(l[a]??(typeof c[0]=="number"?[]:{}),c,s),l}setInitialValues(r,o){this.initialValues=zt(r),o&&(this.values=zt(r))}setOnValuesChange(r){this.onValuesChange=r}setOnFieldsChange(r){this.onFieldsChange=r}getFieldValue(r){const o=wt.toPathArray(r);return wt.getNestedValue(this.values,o)}getFieldsValue(r){if(!r||r===!0)return zt(this.values);const o={};for(const s of r){const l=wt.toPathKey(s);o[l]=this.getFieldValue(s)}return o}setFieldValue(r,o){const s=wt.toPathArray(r);if(this.values=wt.setNestedValue(this.values,s,o),this.notify(r),this.notifyGlobal(),this.onValuesChange){const l={};l[wt.toPathKey(r)]=o,this.onValuesChange(l,zt(this.values))}if(this.onFieldsChange){const l=wt.toPathKey(r),a={name:s,value:o,touched:this.touchedFields.has(l),validating:this.validatingFields.has(l),errors:this.fieldErrors.get(l)||[],warnings:this.fieldWarnings.get(l)||[]};this.onFieldsChange([a],this.getFieldsData())}}setFieldsValue(r){const o=(s,l)=>{if(l===null||typeof l!="object"||Array.isArray(l))return l;const a={...s};for(const c of Object.keys(l))a[c]=o(a[c],l[c]);return a};this.values=o(this.values,r),this.notifyAll(),this.onValuesChange&&this.onValuesChange(zt(r),zt(this.values)),this.onFieldsChange&&this.onFieldsChange(this.getFieldsData(),this.getFieldsData())}setFields(r){for(const o of r){const s=o.name,l=wt.toPathKey(s);o.value!==void 0&&(this.values=wt.setNestedValue(this.values,s,o.value)),o.touched!==void 0&&(o.touched?this.touchedFields.add(l):this.touchedFields.delete(l)),o.errors&&this.fieldErrors.set(l,o.errors),o.warnings&&this.fieldWarnings.set(l,o.warnings),this.notify(s)}this.notifyGlobal()}getFieldsData(){const r=[];for(const o of this.rules.keys()){const s=o.split(".");r.push({name:s,value:this.getFieldValue(s),touched:this.touchedFields.has(o),validating:this.validatingFields.has(o),errors:this.fieldErrors.get(o)||[],warnings:this.fieldWarnings.get(o)||[]})}return r}subscribe(r,o){const s=wt.toPathKey(r);return this.subscribers.has(s)||this.subscribers.set(s,new Set),this.subscribers.get(s).add(o),()=>{this.subscribers.get(s)?.delete(o)}}subscribeAll(r){return this.globalSubscribers.add(r),()=>{this.globalSubscribers.delete(r)}}notify(r){const o=wt.toPathKey(r);this.subscribers.get(o)?.forEach(s=>s())}notifyAll(){this.subscribers.forEach(r=>r.forEach(o=>o())),this.notifyGlobal()}notifyGlobal(){this.globalSubscribers.forEach(r=>r())}touchField(r){this.touchedFields.add(wt.toPathKey(r))}isFieldTouched(r){return this.touchedFields.has(wt.toPathKey(r))}isFieldsTouched(r,o=!1){if(!r)return this.touchedFields.size>0;const s=r.map(l=>wt.toPathKey(l));return o?s.every(l=>this.touchedFields.has(l)):s.some(l=>this.touchedFields.has(l))}getFieldError(r){return this.fieldErrors.get(wt.toPathKey(r))||[]}getFieldWarning(r){return this.fieldWarnings.get(wt.toPathKey(r))||[]}getFieldsError(r){return(r?r.map(s=>wt.toPathKey(s)):Array.from(this.rules.keys())).map(s=>({name:s.split("."),errors:this.fieldErrors.get(s)||[],warnings:this.fieldWarnings.get(s)||[]}))}isFieldValidating(r){return this.validatingFields.has(wt.toPathKey(r))}registerRules(r,o){this.rules.set(wt.toPathKey(r),o)}unregisterField(r){const o=wt.toPathKey(r);this.rules.delete(o),this.fieldErrors.delete(o),this.fieldWarnings.delete(o),this.validatingFields.delete(o),this.touchedFields.delete(o)}async validateField(r,o){const s=wt.toPathKey(r),l=this.rules.get(s)||[];if(l.length===0)return this.fieldErrors.delete(s),this.fieldWarnings.delete(s),this.notify(r),[];let a=this.getFieldValue(r);this.validatingFields.add(s),this.notify(r);const c=[],u=[];for(const f of l)try{let d=a;if(f.transform&&(d=f.transform(d)),f.required&&(d==null||d===""||Array.isArray(d)&&d.length===0))throw new Error(typeof f.message=="string"?f.message:this.localeMessages?.defaultRequiredMessage??"This field is required");if(d==null||d==="")continue;if(f.type==="email"&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(d)))throw new Error(typeof f.message=="string"?f.message:"Not a valid email");if(f.type==="url")try{new URL(String(d))}catch{throw new Error(typeof f.message=="string"?f.message:"Not a valid URL")}if(f.type==="number"&&typeof d!="number")throw new Error(typeof f.message=="string"?f.message:"Must be a number");if(f.type==="integer"&&(typeof d!="number"||!Number.isInteger(d)))throw new Error(typeof f.message=="string"?f.message:"Must be an integer");if(f.type==="float"&&typeof d!="number")throw new Error(typeof f.message=="string"?f.message:"Must be a number");if(f.type==="boolean"&&typeof d!="boolean")throw new Error(typeof f.message=="string"?f.message:"Must be a boolean");if(f.min!==void 0){if(typeof d=="string"&&d.length<f.min)throw new Error(typeof f.message=="string"?f.message:`Must be at least ${f.min} characters`);if(typeof d=="number"&&d<f.min)throw new Error(typeof f.message=="string"?f.message:`Must be at least ${f.min}`);if(Array.isArray(d)&&d.length<f.min)throw new Error(typeof f.message=="string"?f.message:`Must have at least ${f.min} items`)}if(f.max!==void 0){if(typeof d=="string"&&d.length>f.max)throw new Error(typeof f.message=="string"?f.message:`Must be at most ${f.max} characters`);if(typeof d=="number"&&d>f.max)throw new Error(typeof f.message=="string"?f.message:`Must be at most ${f.max}`);if(Array.isArray(d)&&d.length>f.max)throw new Error(typeof f.message=="string"?f.message:`Must have at most ${f.max} items`)}if(f.len!==void 0&&(typeof d=="string"||Array.isArray(d)?d.length:0)!==f.len)throw new Error(typeof f.message=="string"?f.message:`Must be exactly ${f.len} characters`);if(f.pattern&&!f.pattern.test(String(d)))throw new Error(typeof f.message=="string"?f.message:this.localeMessages?.defaultPatternMessage??"Does not match the required pattern");if(f.whitespace&&typeof d=="string"&&!d.trim())throw new Error(typeof f.message=="string"?f.message:"Cannot be only whitespace");if(f.enum&&!f.enum.includes(d))throw new Error(typeof f.message=="string"?f.message:`Must be one of: ${f.enum.join(", ")}`);f.validator&&await f.validator(f,d)}catch(d){const h=d?.message||String(d);if(f.warningOnly)u.push(h);else if(c.push(h),o?.validateFirst)break}return this.fieldErrors.set(s,c),this.fieldWarnings.set(s,u),this.validatingFields.delete(s),this.notify(r),c}async validateFields(r,o){const s=r?r.map(a=>wt.toPathKey(a)):Array.from(this.rules.keys()),l=[];for(const a of s){const c=a.split("."),u=await this.validateField(c);u.length>0&&l.push({name:c,errors:u,warnings:this.fieldWarnings.get(a)||[]})}if(o?.validateOnly){if(l.length>0)throw{values:zt(this.values),errorFields:l};return zt(this.values)}if(l.length>0)throw{values:zt(this.values),errorFields:l};return zt(this.values)}resetFields(r){if(!r)this.values=zt(this.initialValues),this.touchedFields.clear(),this.fieldErrors.clear(),this.fieldWarnings.clear(),this.validatingFields.clear(),this.notifyAll();else for(const o of r){const s=wt.toPathArray(o),l=wt.toPathKey(o),a=wt.getNestedValue(this.initialValues,s);this.values=wt.setNestedValue(this.values,s,a!==void 0?zt(a):void 0),this.touchedFields.delete(l),this.fieldErrors.delete(l),this.fieldWarnings.delete(l),this.validatingFields.delete(l),this.notify(o)}}scrollToField(r,o){const s=wt.toPathKey(r),l=document.querySelector(`[data-field-name="${s}"]`);l&&l.scrollIntoView({behavior:"smooth",block:"nearest",...o})}}const Ar=i.createContext(null),Do=i.createContext(null),Gs=i.createContext(null);function Xo(e){const r=i.useRef(null);r.current||(r.current=new wt);const o=i.useMemo(()=>{const s=r.current;return{getFieldValue:l=>s.getFieldValue(l),getFieldsValue:l=>s.getFieldsValue(l),setFieldValue:(l,a)=>s.setFieldValue(l,a),setFieldsValue:l=>s.setFieldsValue(l),validateFields:(l,a)=>s.validateFields(l,a),resetFields:l=>s.resetFields(l),isFieldTouched:l=>s.isFieldTouched(l),isFieldsTouched:(l,a)=>s.isFieldsTouched(l,a),getFieldError:l=>s.getFieldError(l),getFieldsError:l=>s.getFieldsError(l),submit:()=>{},scrollToField:(l,a)=>s.scrollToField(l,a),isFieldValidating:l=>s.isFieldValidating(l),getFieldsData:()=>s.getFieldsData(),_getStore:()=>s}},[]);return e?[e]:[o]}function Us(e,r){const o=i.useContext(Ar),s=r||o?.form,[l,a]=i.useState(()=>s?.getFieldValue(e));return i.useEffect(()=>{if(!s)return;const c=s._getStore();return a(c.getFieldValue(e)),c.subscribe(e,()=>{a(c.getFieldValue(e))})},[s,wt.toPathKey(e)]),l}function qs(){const e=i.useContext(Ar);if(!e)throw new Error("useFormInstance must be used within a <Form>");return e.form}function vu({onFormFinish:e,onFormChange:r,children:o}){const s=i.useRef({}),l=i.useMemo(()=>({registerForm:(a,c)=>{s.current[a]=c},unregisterForm:a=>{delete s.current[a]},onFormFinish:e,onFormChange:r}),[e,r]);return t.jsx(Gs.Provider,{value:l,children:o})}function Cu({form:e,name:r,layout:o="horizontal",variant:s="outlined",size:l,initialValues:a,onFinish:c,onFinishFailed:u,onValuesChange:f,onFieldsChange:d,fields:h,validateTrigger:g="onChange",colon:m=!0,labelAlign:x="left",labelWrap:p=!1,requiredMark:b=!0,disabled:v,scrollToFirstError:j=!1,children:C,className:w,style:y,classNames:k,styles:B}){const{componentSize:R,componentDisabled:S,locale:L}=Gt(),$=l??R??"middle",I=v??S??!1,[P]=Xo(e),E=P._getStore(),H=i.useContext(Gs);E.localeMessages=L.Form;const z=i.useRef(!1);!z.current&&a&&(E.setInitialValues(a,!0),z.current=!0),i.useEffect(()=>{if(r&&H)return H.registerForm(r,P),()=>H.unregisterForm(r)},[r,H,P]),i.useEffect(()=>(E.setOnValuesChange(f),()=>E.setOnValuesChange(void 0)),[f,E]),i.useEffect(()=>{const F=d?(D,T)=>{d(D,T),r&&H?.onFormChange&&H.onFormChange(r,{changedFields:D,forms:{}})}:void 0;return E.setOnFieldsChange(F),()=>E.setOnFieldsChange(void 0)},[d,E,r,H]),i.useEffect(()=>{h&&E.setFields(h)},[h,E]);const A=i.useCallback(async F=>{F?.preventDefault();try{const D=await E.validateFields();c?.(D),r&&H?.onFormFinish&&H.onFormFinish(r,{values:D,forms:{}})}catch(D){if(u?.(D),j&&D.errorFields?.length>0){const T=D.errorFields[0];E.scrollToField(T.name,typeof j=="object"?j:void 0)}}},[E,c,u,j,r,H]);i.useEffect(()=>{P.submit=()=>A()},[P,A]);const M=i.useMemo(()=>({form:P,layout:o,variant:s,size:$,colon:m,labelAlign:x,labelWrap:p,requiredMark:b,disabled:I,validateTrigger:g}),[P,o,s,$,m,x,p,b,I,g]),W={...o==="inline"?{display:"flex",flexWrap:"wrap",gap:"1rem",alignItems:"flex-start"}:{}};return t.jsx(Ar.Provider,{value:M,children:t.jsx("form",{name:r,onSubmit:A,className:Ve(w,k?.root),style:V(W,B?.root,y),children:C})})}function ku({name:e,label:r,layout:o,rules:s,dependencies:l,validateTrigger:a,validateFirst:c=!1,validateDebounce:u,valuePropName:f="value",trigger:d="onChange",getValueFromEvent:h,getValueProps:g,normalize:m,shouldUpdate:x,noStyle:p=!1,hidden:b=!1,required:v,colon:j,labelAlign:C,hasFeedback:w=!1,help:y,extra:k,validateStatus:B,initialValue:R,children:S,className:L,style:$,classNames:I,styles:P}){const E=i.useContext(Ar),H=i.useContext(Do),z=E.form._getStore(),A=i.useMemo(()=>{if(e===void 0)return;const ie=wt.toPathArray(e);return H?[...H.prefixPath,...ie]:ie},[e,H]),M=A?wt.toPathKey(A):void 0,[,W]=i.useState(0),F=i.useCallback(()=>W(ie=>ie+1),[]),D=i.useRef(null);i.useEffect(()=>{if(!A)return;s&&z.registerRules(A,s),R!==void 0&&z.getFieldValue(A)===void 0&&z.setFieldValue(A,R);const ie=z.subscribe(A,F);return()=>{ie(),z.unregisterField(A),D.current&&clearTimeout(D.current)}},[M]),i.useEffect(()=>{A&&s&&z.registerRules(A,s)},[s]),i.useEffect(()=>{if(!l||l.length===0)return;const ie=l.map(ce=>z.subscribe(ce,()=>{A&&z.validateField(A,{validateFirst:c}),F()}));return()=>ie.forEach(ce=>ce())},[l,z,A,F,c]),i.useEffect(()=>{if(x){if(x===!0)return z.subscribeAll(F);if(typeof x=="function"){let ie=zt(z.getFieldsValue());return z.subscribeAll(()=>{const ce=z.getFieldsValue();x(ie,ce)&&F(),ie=zt(ce)})}}},[x,z,F]);const T=A?z.getFieldValue(A):void 0,O=A?z.getFieldError(A):[],Y=A?z.getFieldWarning(A):[],X=A?z.isFieldTouched(A):!1,_=A?z.isFieldValidating(A):!1,G=B??(_?"validating":O.length>0?"error":Y.length>0?"warning":X?"success":""),Q=G==="error"?"error":G==="warning"?"warning":void 0,N=v??s?.some(ie=>ie.required)??!1,le=j??E.colon,oe=o??E.layout,q=xu(a??E.validateTrigger),K=i.useCallback(ie=>{u&&u>0?(D.current&&clearTimeout(D.current),D.current=setTimeout(()=>{z.validateField(ie,{validateFirst:c})},u)):z.validateField(ie,{validateFirst:c})},[z,u,c]),re=i.useCallback(()=>{if(!A)return{};let ie=T;ie===void 0&&(ie=f==="checked"?!1:"");const ce=g?g(ie):{[f]:ie};ce[d]=(...He)=>{let Pe;if(h)Pe=h(...He);else{const Ge=He[0];Ge&&typeof Ge=="object"&&Ge.target?Pe=f==="checked"?Ge.target.checked:Ge.target.value:Pe=Ge}m&&(Pe=m(Pe,T,z.getFieldsValue())),z.setFieldValue(A,Pe),z.touchField(A),q.includes(d)&&K(A)};for(const He of q)if(He!==d){const Pe=ce[He];ce[He]=(...Ge)=>{Pe?.(...Ge),A&&K(A)}}return E.disabled&&(ce.disabled=!0),Q&&(ce.status=Q),E.variant!=="outlined"&&(ce.variant=E.variant),E.size!=="middle"&&(ce.size=E.size),ce},[A,T,f,d,h,g,m,q,E.disabled,E.variant,E.size,Q,z,K]),Te=()=>{if(typeof S=="function"){const ce={value:T,[d]:re()[d]};return S(ce,{touched:X,validating:_,errors:O,warnings:Y,name:A||[]},E.form)}if(!A)return S;const ie=i.Children.only(S);return i.cloneElement(ie,re())};if(p)return t.jsx(t.Fragment,{children:Te()});if(b)return null;const Ce=oe==="horizontal",Le={marginBottom:oe==="inline"?0:"1.5rem",...Ce?{display:"flex",flexDirection:"row",alignItems:"flex-start"}:{display:"flex",flexDirection:"column"}},ue=E.requiredMark,ze=typeof ue=="function",xe={fontSize:"0.875rem",lineHeight:"2rem",color:n.colorText,...Ce?{display:"flex",alignItems:"baseline",gap:"0.125rem",flexShrink:0,paddingRight:"0.75rem",boxSizing:"border-box",maxWidth:"50%"}:{marginBottom:"0.25rem"}},ge=Ce?E.labelWrap?{whiteSpace:"normal",wordBreak:"break-word"}:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:{},Ie={flex:1,minWidth:0},De=y!==void 0?[y]:O.length>0?O:Y.length>0?Y:[],Re={fontSize:"0.75rem",lineHeight:"1.25rem",color:G==="error"?n.colorError:G==="warning"?n.colorWarning:n.colorTextMuted,marginTop:"0.25rem",transition:"color 0.2s ease"},ke={fontSize:"0.75rem",lineHeight:"1.25rem",color:n.colorTextMuted,marginTop:"0.25rem"},ee=typeof ue=="object"&&"position"in ue&&ue.position==="prefix",ae=()=>ue===!1?null:ue==="optional"&&!N?t.jsx("span",{style:{color:n.colorTextMuted,fontSize:"0.75rem",fontWeight:400},children:"(optional)"}):N?t.jsx("span",{style:{color:n.colorError},children:"*"}):null,se=le&&r?":":"",we=r!==void 0?ae():null;return t.jsxs("div",{className:Ve(L,I?.root),style:V(Le,P?.root,$),"data-field-name":M,children:[r!==void 0&&t.jsx("label",{className:I?.label,style:V(xe,P?.label),children:ze?t.jsx("span",{style:ge,children:ue(t.jsxs(t.Fragment,{children:[r,se]}),{required:N})}):Ce?t.jsxs(t.Fragment,{children:[ee&&we&&t.jsx("span",{style:{flexShrink:0},children:we}),t.jsxs("span",{style:ge,children:[r,se]}),!ee&&we&&t.jsx("span",{style:{flexShrink:0},children:we})]}):t.jsxs(t.Fragment,{children:[ee&&we&&t.jsx("span",{style:{marginRight:"0.25rem"},children:we}),r,se,!ee&&we&&t.jsx("span",{style:{marginLeft:"0.25rem"},children:we})]})}),t.jsxs("div",{className:I?.control,style:V(Ie,P?.control),children:[w&&G?t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[t.jsx("div",{style:{flex:1,minWidth:0},children:Te()}),t.jsx(bu,{status:G})]}):Te(),De.length>0&&t.jsx("div",{className:I?.help,style:V(Re,P?.help),children:De.map((ie,ce)=>t.jsx("div",{children:ie},ce))}),k&&t.jsx("div",{className:I?.extra,style:V(ke,P?.extra),children:k})]})]})}function wu({name:e,children:r,initialValue:o}){const s=i.useContext(Ar),l=i.useContext(Do),a=s.form._getStore(),c=i.useMemo(()=>{const p=wt.toPathArray(e);return l?[...l.prefixPath,...p]:p},[e,l]),[,u]=i.useState(0),f=i.useRef(0),d=i.useRef([]),h=i.useRef(!1);h.current||(h.current=!0,o!==void 0&&a.getFieldValue(c)===void 0&&(a.setFieldValue(c,o),d.current=o.map(()=>f.current++))),i.useEffect(()=>a.subscribe(c,()=>u(b=>b+1)),[]);const g=a.getFieldValue(c)||[];for(;d.current.length<g.length;)d.current.push(f.current++);d.current.length>g.length&&(d.current.length=g.length);const m=g.map((p,b)=>({name:b,key:d.current[b]})),x=i.useMemo(()=>({add:(p,b)=>{const j=[...a.getFieldValue(c)||[]],C=b??j.length;j.splice(C,0,p??void 0),d.current.splice(C,0,f.current++),a.setFieldValue(c,j)},remove:p=>{const b=a.getFieldValue(c)||[],v=Array.isArray(p)?p:[p],j=b.filter((C,w)=>!v.includes(w));d.current=d.current.filter((C,w)=>!v.includes(w)),a.setFieldValue(c,j)},move:(p,b)=>{const j=[...a.getFieldValue(c)||[]],[C]=j.splice(p,1);j.splice(b,0,C);const[w]=d.current.splice(p,1);d.current.splice(b,0,w),a.setFieldValue(c,j)}}),[a,c]);return t.jsx(Do.Provider,{value:{prefixPath:c},children:r(m,x,{errors:[]})})}function ju({errors:e,className:r,style:o}){return!e||e.length===0?null:t.jsx("div",{className:r,style:{color:n.colorError,fontSize:"0.75rem",lineHeight:"1.25rem",...o},children:e.map((s,l)=>t.jsx("div",{children:s},l))})}const Su=Object.assign(Cu,{Item:ku,List:wu,ErrorList:ju,Provider:vu,useForm:Xo,useWatch:Us,useFormInstance:qs});function Qs(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{display:"block"},children:[t.jsx("path",{d:"M18 6L6 18"}),t.jsx("path",{d:"M6 6l12 12"})]})}function kn(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("circle",{cx:"11",cy:"11",r:"8"}),t.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}function Mu(){return t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),t.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function Bu(){return t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94"}),t.jsx("path",{d:"M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19"}),t.jsx("path",{d:"M14.12 14.12a3 3 0 11-4.24-4.24"}),t.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]})}function wn(){const e=i.useRef(null);return i.useEffect(()=>{const r=e.current;if(!r)return;let o=0,s;const l=()=>{o=(o+4)%360,r.style.transform=`rotate(${o}deg)`,s=requestAnimationFrame(l)};return s=requestAnimationFrame(l),()=>cancelAnimationFrame(s)},[]),t.jsx("svg",{ref:e,viewBox:"0 0 1024 1024",width:"14",height:"14",fill:"currentColor",style:{flexShrink:0},children:t.jsx("path",{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.3 199.3 0 19.9-16.1 36-36 36z"})})}const ho={small:{height:"1.5rem",fontSize:"0.75rem",paddingH:"0.5rem",paddingV:"0.25rem",radius:"0.25rem"},middle:{height:"2rem",fontSize:"0.875rem",paddingH:"0.75rem",paddingV:"0.5rem",radius:"0.375rem"},large:{height:"2.5rem",fontSize:"1rem",paddingH:"0.75rem",paddingV:"0.5rem",radius:"0.5rem"}};function Go(e,r){switch(e){case"outlined":return{border:`1px solid ${n.colorBorder}`,backgroundColor:n.colorBg,borderRadius:r};case"filled":return{border:"1px solid transparent",backgroundColor:n.colorBgMuted,borderRadius:r};case"borderless":return{border:"1px solid transparent",backgroundColor:"transparent",borderRadius:r};case"underlined":return{border:"none",borderBottom:`1px solid ${n.colorBorder}`,borderRadius:0,backgroundColor:"transparent"}}}function Xt(e){if(e==="error")return n.colorError;if(e==="warning")return n.colorWarning}function Uo(e){return e==="error"?n.colorErrorBg:e==="warning"?n.colorWarningBg:n.colorPrimaryLight}function qo(e){return e==="error"?n.colorError:e==="warning"?n.colorWarning:n.colorPrimary}function Zs(e,r,o){const s=e?.strategy||(f=>f.length),l=e?.max??o,a=e?.exceedFormatter;let c=!1,u;return e?.show===!0?c=!0:typeof e?.show=="function"?(c=!0,u=e.show):r===!0?c=!0:typeof r=="object"&&r.formatter&&(c=!0,u=r.formatter),{show:c,max:l,strategy:s,formatter:u,exceedFormatter:a}}const io=i.forwardRef(function(r,o){const{value:s,defaultValue:l="",placeholder:a,type:c="text",disabled:u,readOnly:f=!1,id:d,autoFocus:h=!1,name:g,autoComplete:m,tabIndex:x,size:p,variant:b="outlined",status:v,prefix:j,suffix:C,addonBefore:w,addonAfter:y,allowClear:k=!1,showCount:B,count:R,maxLength:S,onChange:L,onPressEnter:$,onFocus:I,onBlur:P,onKeyDown:E,className:H,style:z,classNames:A,styles:M}=r,{componentSize:W,componentDisabled:F}=Gt(),D=p??W??"middle",T=u??F??!1,O=s!==void 0,[Y,X]=i.useState(l),_=O?s:Y,[G,Q]=i.useState(!1),N=i.useRef(null),le=i.useRef(null),oe=i.useRef(!1),q=i.useRef("keyboard");i.useImperativeHandle(o,()=>({focus:U=>{if(N.current?.focus({preventScroll:U?.preventScroll}),U?.cursor&&N.current){const he=N.current.value.length;switch(U.cursor){case"start":N.current.setSelectionRange(0,0);break;case"end":N.current.setSelectionRange(he,he);break;case"all":N.current.setSelectionRange(0,he);break}}},blur:()=>N.current?.blur(),input:N.current}));const K=Zs(R,B,S),re=i.useCallback(U=>{let he=U.target.value;K.exceedFormatter&&K.max!==void 0&&K.strategy(he)>K.max&&(he=K.exceedFormatter(he,{max:K.max}),U.target.value=he),O||X(he),L?.(U)},[O,L,K]),Te=i.useCallback(U=>{q.current=oe.current?"mouse":"keyboard",oe.current=!1,Q(!0),I?.(U)},[I]),Ce=i.useCallback(U=>{Q(!1),P?.(U)},[P]),Le=i.useCallback(U=>{U.key==="Enter"&&$?.(U),E?.(U)},[$,E]),ue=i.useCallback(()=>{if(N.current){Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value")?.set?.call(N.current,"");const de=new Event("input",{bubbles:!0});N.current.dispatchEvent(de)}O||X(""),L?.({target:{value:""},currentTarget:{value:""}}),N.current?.focus()},[O,L]),ze=i.useCallback(()=>{if(T||G)return;const U=le.current;U&&b!=="borderless"&&(b==="underlined"?U.style.borderBottomColor=Xt(v)||n.colorBorderHover:U.style.borderColor=Xt(v)||n.colorBorderHover)},[T,G,b,v]),xe=i.useCallback(()=>{if(T||G)return;const U=le.current;U&&b!=="borderless"&&(b==="underlined"?U.style.borderBottomColor=Xt(v)||n.colorBorder:U.style.borderColor=Xt(v)||(b==="filled"?"transparent":n.colorBorder))},[T,G,b,v]),ge=ho[D],Ie=!!j,De=!!C||k&&!!_&&!T&&!f,Ae=Xt(v),Re=Uo(v),ke=qo(v),ee={display:"inline-flex",alignItems:"center",width:"100%",height:ge.height,fontSize:ge.fontSize,fontFamily:"inherit",lineHeight:ge.height,transition:"border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",boxSizing:"border-box",...Go(b,ge.radius),...b==="underlined"?{borderBottomColor:G&&!T?ke:Ae||n.colorBorder}:{borderColor:G&&!T&&b!=="borderless"?ke:Ae||(b==="borderless"||b==="filled"?"transparent":n.colorBorder)},boxShadow:G&&!T&&q.current==="keyboard"?b==="underlined"?`0 1px 0 0 ${ke}`:`0 0 0 2px ${Re}`:"none",...T?{opacity:.6,cursor:"not-allowed"}:{}},ae={flex:1,minWidth:0,width:"100%",height:"100%",padding:0,paddingLeft:Ie?0:ge.paddingH,paddingRight:De?0:ge.paddingH,fontSize:"inherit",fontFamily:"inherit",lineHeight:"inherit",border:"none",outline:"none",backgroundColor:"transparent",color:T?n.colorTextSubtle:n.colorText,cursor:T?"not-allowed":void 0,boxSizing:"border-box"},se={display:"inline-flex",alignItems:"center",paddingLeft:ge.paddingH,paddingRight:"0.25rem",color:n.colorTextMuted,flexShrink:0},we={display:"inline-flex",alignItems:"center",paddingRight:ge.paddingH,paddingLeft:"0.25rem",color:n.colorTextMuted,flexShrink:0,gap:"0.25rem"},ie={display:"flex",alignItems:"center",justifyContent:"center",width:"1.75rem",height:"1.75rem",margin:"-0.25rem",borderRadius:"50%",cursor:"pointer",color:n.colorTextMuted,transition:"color 0.15s ease",padding:0,border:"none",background:"none",lineHeight:1},ce=K.strategy(_),He=K.max!==void 0&&(ce>K.max||!!K.exceedFormatter&&ce>=K.max),Pe=()=>{if(!K.show)return null;let U;K.formatter?U=K.formatter({value:_,count:ce,maxLength:K.max}):K.max!==void 0?U=`${ce} / ${K.max}`:U=`${ce}`;const he={fontSize:"0.75rem",lineHeight:"1.25rem",color:He?n.colorError:n.colorTextMuted,whiteSpace:"nowrap",marginLeft:"0.25rem",flexShrink:0};return t.jsx("span",{className:A?.count,style:V(he,M?.count),children:U})},Ge=k&&!!_&&!T&&!f,Z=typeof k=="object"?k.clearIcon:t.jsx(Qs,{}),Be=!!w||!!y,Oe={display:"inline-flex",alignItems:"center",padding:`0 ${ge.paddingH}`,height:ge.height,fontSize:ge.fontSize,fontFamily:"inherit",backgroundColor:n.colorBgMuted,border:`1px solid ${Ae||n.colorBorder}`,color:n.colorText,whiteSpace:"nowrap",boxSizing:"border-box"},Qe={...Oe,borderRight:"none",borderRadius:`${ge.radius} 0 0 ${ge.radius}`},_e={...Oe,borderLeft:"none",borderRadius:`0 ${ge.radius} ${ge.radius} 0`},et=Be?{borderRadius:0,...w&&!y?{borderRadius:`0 ${ge.radius} ${ge.radius} 0`}:{},...!w&&y?{borderRadius:`${ge.radius} 0 0 ${ge.radius}`}:{}}:{},je={...ee,...et},Se=t.jsxs("span",{ref:le,className:A?.input,style:V(je,M?.input),onMouseDown:()=>{oe.current=!0},onMouseEnter:ze,onMouseLeave:xe,children:[Ie&&t.jsx("span",{className:A?.prefix,style:V(se,M?.prefix),children:j}),t.jsx("input",{ref:N,id:d,type:c,name:g,autoComplete:m,tabIndex:x,value:_,placeholder:a,disabled:T,readOnly:f,autoFocus:h,maxLength:S,onChange:re,onFocus:Te,onBlur:Ce,onKeyDown:Le,style:ae}),(De||C||K.show)&&t.jsxs("span",{className:A?.suffix,style:V(we,M?.suffix),children:[Ge&&t.jsx("button",{type:"button",tabIndex:-1,onClick:ue,style:ie,"aria-label":"Clear",children:Z}),C,!Be&&Pe()]})]});if(Be){const U={display:"inline-flex",width:"100%",alignItems:"stretch"};return t.jsxs("div",{className:Ve(H,A?.root),style:V(U,M?.root,z),children:[w&&t.jsx("span",{className:A?.addon,style:V(Qe,M?.addon),children:w}),Se,y&&t.jsx("span",{className:A?.addon,style:V(_e,M?.addon),children:y}),Pe()]})}const me={display:"inline-flex",flexDirection:"column",width:"100%"};return t.jsx("span",{className:Ve(H,A?.root),style:V(me,M?.root,z),children:Se})}),Ru=i.forwardRef(function(r,o){const{value:s,defaultValue:l="",placeholder:a,disabled:c,readOnly:u=!1,id:f,autoFocus:d=!1,name:h,tabIndex:g,rows:m,size:x,variant:p="outlined",status:b,autoSize:v=!1,allowClear:j=!1,showCount:C,count:w,maxLength:y,onChange:k,onPressEnter:B,onFocus:R,onBlur:S,onResize:L,className:$,style:I,classNames:P,styles:E}=r,{componentSize:H,componentDisabled:z}=Gt(),A=x??H??"middle",M=c??z??!1,W=s!==void 0,[F,D]=i.useState(l),T=W?s:F,[O,Y]=i.useState(!1),X=i.useRef(null),_=i.useRef(null),G=i.useRef(!1),Q=i.useRef("keyboard");i.useImperativeHandle(o,()=>({focus:ae=>{if(X.current?.focus({preventScroll:ae?.preventScroll}),ae?.cursor&&X.current){const se=X.current.value.length;switch(ae.cursor){case"start":X.current.setSelectionRange(0,0);break;case"end":X.current.setSelectionRange(se,se);break;case"all":X.current.setSelectionRange(0,se);break}}},blur:()=>X.current?.blur(),input:X.current}));const N=Zs(w,C,y),le=i.useCallback(()=>{const ae=X.current;if(!ae||v===!1)return;const se=window.getComputedStyle(ae),we=parseFloat(se.lineHeight)||20,ie=parseFloat(se.paddingTop)||0,ce=parseFloat(se.paddingBottom)||0,He=parseFloat(se.borderTopWidth)||0,Pe=parseFloat(se.borderBottomWidth)||0;ae.style.minHeight="0",ae.style.height="0",ae.style.overflow="hidden";const Ge=ae.scrollHeight;let Z=0,Be=1/0;typeof v=="object"&&(v.minRows&&(Z=v.minRows*we+ie+ce+He+Pe),v.maxRows&&(Be=v.maxRows*we+ie+ce+He+Pe));const Oe=Math.max(Z,Math.min(Ge,Be));ae.style.height=`${Oe}px`,ae.style.minHeight=Z>0?`${Z}px`:"",ae.style.maxHeight=Be!==1/0?`${Be}px`:"",ae.style.overflow=Oe<Ge?"auto":"hidden",L?.({width:ae.offsetWidth,height:Oe})},[v,L]);i.useLayoutEffect(()=>{le()},[T,le]);const oe=i.useCallback(ae=>{let se=ae.target.value;N.exceedFormatter&&N.max!==void 0&&N.strategy(se)>N.max&&(se=N.exceedFormatter(se,{max:N.max}),ae.target.value=se),W||D(se),k?.(ae)},[W,k,N]),q=i.useCallback(ae=>{Q.current=G.current?"mouse":"keyboard",G.current=!1,Y(!0),R?.(ae)},[R]),K=i.useCallback(ae=>{Y(!1),S?.(ae)},[S]),re=i.useCallback(ae=>{ae.key==="Enter"&&!ae.shiftKey&&B?.(ae)},[B]),Te=i.useCallback(()=>{W||D(""),k?.({target:{value:""},currentTarget:{value:""}}),X.current?.focus()},[W,k]),Ce=i.useCallback(()=>{if(M||O)return;const ae=_.current;ae&&p!=="borderless"&&(p==="underlined"?ae.style.borderBottomColor=Xt(b)||n.colorBorderHover:ae.style.borderColor=Xt(b)||n.colorBorderHover)},[M,O,p,b]),Le=i.useCallback(()=>{if(M||O)return;const ae=_.current;ae&&p!=="borderless"&&(p==="underlined"?ae.style.borderBottomColor=Xt(b)||n.colorBorder:ae.style.borderColor=Xt(b)||(p==="filled"?"transparent":n.colorBorder))},[M,O,p,b]),ue=ho[A],ze=Xt(b),xe=Uo(b),ge=qo(b),Ie={position:"relative",display:"flex",flexDirection:"column",width:"100%",transition:"border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",boxSizing:"border-box",...Go(p,ue.radius),...p==="underlined"?{borderBottomColor:O&&!M?ge:ze||n.colorBorder}:{borderColor:O&&!M&&p!=="borderless"?ge:ze||(p==="borderless"||p==="filled"?"transparent":n.colorBorder)},boxShadow:O&&!M&&Q.current==="keyboard"?p==="underlined"?`0 1px 0 0 ${ge}`:`0 0 0 2px ${xe}`:"none",...M?{opacity:.6,cursor:"not-allowed"}:{}},De={width:"100%",padding:`${ue.paddingV} ${ue.paddingH}`,fontSize:ue.fontSize,fontFamily:"inherit",lineHeight:"1.375rem",border:"none",outline:"none",backgroundColor:"transparent",color:M?n.colorTextSubtle:n.colorText,cursor:M?"not-allowed":void 0,resize:v?"none":"vertical",boxSizing:"border-box"},Ae=N.strategy(T),Re=N.max!==void 0&&(Ae>N.max||!!N.exceedFormatter&&Ae>=N.max),ke=j&&!!T&&!M&&!u,ee=()=>{if(!N.show)return null;let ae;N.formatter?ae=N.formatter({value:T,count:Ae,maxLength:N.max}):N.max!==void 0?ae=`${Ae} / ${N.max}`:ae=`${Ae}`;const se={position:"absolute",bottom:"0.25rem",right:ue.paddingH,fontSize:"0.75rem",lineHeight:"1.25rem",color:Re?n.colorError:n.colorTextMuted,pointerEvents:"none"};return t.jsx("span",{className:P?.count,style:V(se,E?.count),children:ae})};return t.jsxs("div",{className:Ve($,P?.root),style:V({position:"relative",width:"100%"},E?.root,I),children:[t.jsxs("div",{ref:_,style:Ie,onMouseDown:()=>{G.current=!0},onMouseEnter:Ce,onMouseLeave:Le,children:[t.jsx("textarea",{ref:X,id:f,name:h,tabIndex:g,value:T,placeholder:a,disabled:M,readOnly:u,autoFocus:d,maxLength:y,rows:v?1:m,onChange:oe,onFocus:q,onBlur:K,onKeyDown:re,className:P?.textarea,style:V(De,E?.textarea)}),ee()]}),ke&&t.jsx("button",{type:"button",tabIndex:-1,onClick:Te,"aria-label":"Clear",style:{position:"absolute",top:"0.5rem",right:ue.paddingH,display:"flex",alignItems:"center",justifyContent:"center",width:"1.75rem",height:"1.75rem",margin:"-0.25rem",borderRadius:"50%",cursor:"pointer",color:n.colorTextMuted,transition:"color 0.15s ease",padding:0,border:"none",background:"none",lineHeight:1},children:typeof j=="object"?j.clearIcon:t.jsx(Qs,{})})]})}),Tu=i.forwardRef(function(r,o){const{enterButton:s=!1,loading:l=!1,onSearch:a,onPressEnter:c,onChange:u,value:f,defaultValue:d="",suffix:h,styles:g,...m}=r,x=f!==void 0,[p,b]=i.useState(d),v=x?f:p,j=i.useRef(null);i.useImperativeHandle(o,()=>({focus:R=>j.current?.focus(R),blur:()=>j.current?.blur(),input:j.current?.input}));const C=i.useCallback(R=>{x||b(R.target.value),u?.(R)},[x,u]),w=i.useCallback(R=>{a?.(v,R)},[v,a]),y=i.useCallback(R=>{w(R),c?.(R)},[w,c]),k=ho[m.size||"middle"];if(s){const{className:R,style:S,...L}=m,$=s===!0?l?t.jsx(wn,{}):t.jsx(kn,{}):s,I={display:"inline-flex",alignItems:"center",justifyContent:"center",padding:`0 ${k.paddingH}`,border:"none",backgroundColor:n.colorPrimary,color:n.colorPrimaryContrast,cursor:l?"default":"pointer",fontSize:k.fontSize,fontFamily:"inherit",borderRadius:`0 ${k.radius} ${k.radius} 0`,transition:"background-color 0.2s ease",opacity:l?.7:1,gap:"0.25rem",whiteSpace:"nowrap",flexShrink:0};return t.jsxs("div",{className:R,style:{display:"inline-flex",width:"100%",alignItems:"stretch",...S},children:[t.jsx(io,{ref:j,...L,type:"text",value:f,defaultValue:d,onChange:C,onPressEnter:y,suffix:h,styles:{...g,root:{flex:1,minWidth:0,...g?.root},input:{borderRight:"none",borderRadius:`${k.radius} 0 0 ${k.radius}`,...g?.input}}}),t.jsx("button",{type:"button",onClick:P=>!l&&w(P),style:I,onMouseEnter:P=>{l||(P.currentTarget.style.backgroundColor=n.colorPrimaryHover)},onMouseLeave:P=>{P.currentTarget.style.backgroundColor=n.colorPrimary},children:$})]})}const B=t.jsxs("span",{style:{display:"inline-flex",gap:"0.25rem",alignItems:"center"},children:[h,t.jsx("span",{style:{cursor:l?"default":"pointer",display:"inline-flex",alignItems:"center"},onClick:R=>!l&&w(R),children:l?t.jsx(wn,{}):t.jsx(kn,{})})]});return t.jsx(io,{ref:j,...m,type:"text",value:f,defaultValue:d,onChange:C,onPressEnter:y,suffix:B,styles:g})}),Iu=i.forwardRef(function(r,o){const{visibilityToggle:s=!0,iconRender:l,...a}=r,c=typeof s=="object"&&s.visible!==void 0,[u,f]=i.useState(!1),d=c?s.visible:u,h=i.useCallback(()=>{c?s.onVisibleChange(!d):f(p=>!p)},[c,s,d]),g=s!==!1,m=l?l(d):d?t.jsx(Mu,{}):t.jsx(Bu,{}),x=g?t.jsx("span",{onClick:h,style:{cursor:"pointer",display:"inline-flex",alignItems:"center"},children:m}):void 0;return t.jsx(io,{ref:o,...a,type:d?"text":"password",suffix:x})}),Lu=i.forwardRef(function(r,o){const{value:s,defaultValue:l="",onChange:a,length:c=6,disabled:u,size:f,variant:d="outlined",status:h,formatter:g,mask:m,autoFocus:x=!1,className:p,style:b}=r,{componentSize:v,componentDisabled:j}=Gt(),C=f??v??"middle",w=u??j??!1,y=s!==void 0,[k,B]=i.useState(l),R=y?s:k,S=i.useRef([]);i.useImperativeHandle(o,()=>({focus:()=>S.current[0]?.focus(),blur:()=>{S.current.forEach(D=>D?.blur())},input:S.current[0]}));const L=i.useCallback(D=>{y||B(D),a?.(D)},[y,a]),$=Array.from({length:c},(D,T)=>R[T]??""),I=i.useCallback((D,T)=>{let O=T;if(g&&(O=g(O)),!O)return;const Y=[...$];Y[D]=O[0];const X=Y.join("").replace(/\s+$/g,"");L(X),D<c-1&&S.current[D+1]?.focus()},[$,c,g,L]),P=i.useCallback((D,T)=>{if(T.key==="Backspace"){T.preventDefault();const O=[...$];$[D]?(O[D]="",L(O.join("").replace(/\s+$/g,""))):D>0&&(O[D-1]="",L(O.join("").replace(/\s+$/g,"")),S.current[D-1]?.focus())}else T.key==="ArrowLeft"&&D>0?S.current[D-1]?.focus():T.key==="ArrowRight"&&D<c-1&&S.current[D+1]?.focus()},[$,c,L]),E=i.useCallback(D=>{D.preventDefault();let T=D.clipboardData.getData("text");g&&(T=T.split("").map(G=>g(G)).join(""));const O=[...$];for(let G=0;G<T.length&&G<c;G++)O[G]=T[G];const Y=O.join("").replace(/\s+$/g,"");L(Y);const X=O.findIndex(G=>!G),_=X===-1?c-1:Math.min(X,c-1);S.current[_]?.focus()},[$,c,g,L]),H=ho[C],z=Xt(h),A={width:H.height,height:H.height,textAlign:"center",fontSize:H.fontSize,fontFamily:"inherit",outline:"none",transition:"border-color 0.2s ease, box-shadow 0.2s ease",boxSizing:"border-box",color:w?n.colorTextSubtle:n.colorText,...Go(d,H.radius),...z?d==="underlined"?{borderBottomColor:z}:{borderColor:z}:{},...w?{opacity:.6,cursor:"not-allowed"}:{},...m?{WebkitTextSecurity:m===!0?"disc":void 0,fontFamily:m!==!0?"monospace":"inherit"}:{}},M=D=>{const T=qo(h),O=Uo(h);d==="underlined"?(D.currentTarget.style.borderBottomColor=T,D.currentTarget.style.boxShadow=`0 1px 0 0 ${T}`):(D.currentTarget.style.borderColor=T,D.currentTarget.style.boxShadow=`0 0 0 2px ${O}`)},W=D=>{d==="underlined"?(D.currentTarget.style.borderBottomColor=z||n.colorBorder,D.currentTarget.style.boxShadow="none"):(D.currentTarget.style.borderColor=z||(d==="filled"?"transparent":n.colorBorder),D.currentTarget.style.boxShadow="none")},F=D=>!m||!D?D:m===!0?"•":typeof m=="string"?m:D;return t.jsx("div",{className:p,style:{display:"inline-flex",gap:"0.5rem",...b},children:Array.from({length:c},(D,T)=>t.jsx("input",{ref:O=>{S.current[T]=O},type:"text",inputMode:"numeric",maxLength:1,disabled:w,autoFocus:x&&T===0,value:m?F($[T]):$[T],onChange:O=>I(T,O.target.value),onKeyDown:O=>P(T,O),onPaste:T===0?E:void 0,onFocus:O=>{M(O),O.target.select()},onBlur:W,style:A},T))})}),Eu=Object.assign(io,{TextArea:Ru,Search:Tu,Password:Iu,OTP:Lu});function $u(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"18 15 12 9 6 15"})})}function Pu(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"6 9 12 15 18 9"})})}const Du={small:{height:"1.5rem",fontSize:"0.75rem",paddingH:"0.5rem",paddingV:"0.25rem",radius:"0.25rem"},middle:{height:"2rem",fontSize:"0.875rem",paddingH:"0.75rem",paddingV:"0.5rem",radius:"0.375rem"},large:{height:"2.5rem",fontSize:"1rem",paddingH:"0.75rem",paddingV:"0.5rem",radius:"0.5rem"}};function zu(e,r){switch(e){case"outlined":return{border:`1px solid ${n.colorBorder}`,backgroundColor:n.colorBg,borderRadius:r};case"filled":return{border:"1px solid transparent",backgroundColor:n.colorBgMuted,borderRadius:r};case"borderless":return{border:"1px solid transparent",backgroundColor:"transparent",borderRadius:r};case"underlined":return{border:"none",borderBottom:`1px solid ${n.colorBorder}`,borderRadius:0,backgroundColor:"transparent"}}}function Mr(e){if(e==="error")return n.colorError;if(e==="warning")return n.colorWarning}function Wu(e){return e==="error"?n.colorErrorBg:e==="warning"?n.colorWarningBg:n.colorPrimaryLight}function Hu(e){return e==="error"?n.colorError:e==="warning"?n.colorWarning:n.colorPrimary}function Fu(e){const r=String(e),o=r.indexOf(".");return o>=0?r.length-o-1:0}function eo(e,r){const o=Math.pow(10,r);return Math.round(e*o)/o}function Au(e,r,o){return eo(e+r,o)}const Ou=i.forwardRef(function(r,o){const{value:s,defaultValue:l,onChange:a,onStep:c,onPressEnter:u,onFocus:f,onBlur:d,min:h=-1/0,max:g=1/0,step:m=1,precision:x,formatter:p,parser:b,controls:v=!0,keyboard:j=!0,changeOnWheel:C=!1,changeOnBlur:w=!0,stringMode:y=!1,decimalSeparator:k,placeholder:B,disabled:R=!1,readOnly:S=!1,id:L,autoFocus:$=!1,name:I,tabIndex:P,size:E="middle",variant:H="outlined",status:z,prefix:A,suffix:M,addonBefore:W,addonAfter:F,className:D,style:T,classNames:O,styles:Y}=r,X=i.useRef(null),_=i.useRef(null),G=i.useRef(null),Q=i.useRef(null),N=i.useRef(null),le=i.useRef(null),oe=i.useRef(!1),q=s!==void 0,[K,re]=i.useState(!1),Te=i.useRef(!1),Ce=i.useRef("keyboard"),Le=x??Fu(m),ue=i.useCallback(pe=>{if(pe==null||pe==="")return null;const Ke=typeof pe=="string"?parseFloat(pe):pe;return isNaN(Ke)?null:Ke},[]),ze=i.useCallback((pe,Ke=!1)=>{if(pe==null||pe==="")return"";let qe=typeof pe=="number"?String(pe):pe;if(x!==void 0&&!Ke){const rt=typeof pe=="number"?pe:parseFloat(pe);isNaN(rt)||(qe=rt.toFixed(x))}if(p)return p(pe,{userTyping:Ke,input:qe});let st=qe;return k&&typeof st=="string"&&(st=st.replace(".",k)),st},[p,k,x]),xe=i.useCallback(pe=>{if(b)return b(pe);let Ke=pe;return k&&(Ke=Ke.replace(new RegExp(`\\${k}`,"g"),".")),Ke=Ke.replace(/[^\d.\-e]/gi,""),Ke},[b,k]),ge=ue(q?s:void 0),[Ie,De]=i.useState(()=>ze(q?s:l));i.useEffect(()=>{q&&!oe.current&&De(ze(s))},[s,q,ze]),i.useImperativeHandle(o,()=>({focus:pe=>{if(X.current?.focus(pe),pe?.cursor&&X.current){const Ke=X.current.value.length;switch(pe.cursor){case"start":X.current.setSelectionRange(0,0);break;case"end":X.current.setSelectionRange(Ke,Ke);break;case"all":X.current.setSelectionRange(0,Ke);break}}},blur:()=>X.current?.blur(),input:X.current,nativeElement:G.current}));const Ae=i.useCallback(pe=>{if(pe===""||pe==="-"){De(q?ze(s):""),a?.(null);return}const Ke=xe(pe);let qe=typeof Ke=="string"?parseFloat(Ke):Ke;if(isNaN(qe)){q&&De(ze(s));return}qe=Math.max(h,Math.min(g,qe)),qe=eo(qe,Le);const st=y?qe.toFixed(Le):qe;a?.(st),q||De(ze(qe))},[xe,h,g,Le,y,a,q,s,ze]),Re=i.useCallback(pe=>{if(R||S)return;const Ke=(()=>{const xt=xe(Ie),Rt=typeof xt=="string"?parseFloat(xt):xt;return isNaN(Rt)?ge!==null?ge:0:Rt})(),qe=pe==="up"?m:-m;let st=Au(Ke,qe,Le);st=Math.max(h,Math.min(g,st)),st=eo(st,Le);const rt=y?st.toFixed(Le):st;a?.(rt),c?.(st,{offset:Math.abs(m),type:pe}),q||De(ze(st)),oe.current=!1},[R,S,xe,Ie,ge,m,Le,h,g,y,a,c,q,ze]),ke=i.useCallback(pe=>{oe.current=!0;const Ke=pe.target.value;if(De(Ke),!w){const qe=xe(Ke),st=typeof qe=="string"?parseFloat(qe):qe;if(!isNaN(st)){const rt=Math.max(h,Math.min(g,st)),xt=eo(rt,Le),Rt=y?xt.toFixed(Le):xt;a?.(Rt)}}},[w,xe,h,g,Le,y,a]),ee=i.useCallback(pe=>{Ce.current=Te.current?"mouse":"keyboard",Te.current=!1,re(!0),oe.current=!1,f?.(pe)},[f]),ae=i.useCallback(pe=>{re(!1),oe.current=!1,w&&Ae(Ie),d?.(pe)},[w,Ae,Ie,d]),se=i.useCallback(pe=>{pe.key==="Enter"&&(oe.current=!1,Ae(Ie),u?.(pe)),j&&!R&&!S&&(pe.key==="ArrowUp"?(pe.preventDefault(),Re("up")):pe.key==="ArrowDown"&&(pe.preventDefault(),Re("down")))},[Ae,Ie,u,j,R,S,Re]);i.useEffect(()=>{if(!C||!K||R||S)return;const pe=X.current;if(!pe)return;const Ke=qe=>{qe.preventDefault(),qe.deltaY<0?Re("up"):qe.deltaY>0&&Re("down")};return pe.addEventListener("wheel",Ke,{passive:!1}),()=>pe.removeEventListener("wheel",Ke)},[C,K,R,S,Re]);const we=i.useCallback(pe=>{Re(pe),N.current=setTimeout(()=>{le.current=setInterval(()=>Re(pe),80)},400)},[Re]),ie=i.useCallback(()=>{N.current&&(clearTimeout(N.current),N.current=null),le.current&&(clearInterval(le.current),le.current=null)},[]);i.useEffect(()=>()=>ie(),[ie]);const ce=i.useCallback(()=>{if(R||K)return;const pe=_.current;pe&&H!=="borderless"&&(H==="underlined"?pe.style.borderBottomColor=Mr(z)||n.colorBorderHover:pe.style.borderColor=Mr(z)||n.colorBorderHover)},[R,K,H,z]),He=i.useCallback(()=>{if(R||K)return;const pe=_.current;pe&&H!=="borderless"&&(H==="underlined"?pe.style.borderBottomColor=Mr(z)||n.colorBorder:pe.style.borderColor=Mr(z)||(H==="filled"?"transparent":n.colorBorder))},[R,K,H,z]),Pe=i.useCallback(()=>{ce(),Q.current&&!R&&!S&&(Q.current.style.opacity="1")},[ce,R,S]),Ge=i.useCallback(()=>{He(),Q.current&&!K&&(Q.current.style.opacity="0")},[He,K]);i.useEffect(()=>{Q.current&&(Q.current.style.opacity=K?"1":"0")},[K]);const Z=Du[E],Be=Mr(z),Oe=Hu(z),Qe=Wu(z),_e=v!==!1&&!S,et=ge!==null&&ge>=g,je=ge!==null&&ge<=h,Se=typeof v=="object"?v.upIcon:void 0,me=typeof v=="object"?v.downIcon:void 0,U=!!W||!!F,he={display:"inline-flex",alignItems:"center",width:"100%",height:Z.height,fontSize:Z.fontSize,fontFamily:"inherit",lineHeight:Z.height,transition:"border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",boxSizing:"border-box",...zu(H,Z.radius),...H==="underlined"?{borderBottomColor:K&&!R?Oe:Be||n.colorBorder}:{borderColor:K&&!R&&H!=="borderless"?Oe:Be||(H==="borderless"||H==="filled"?"transparent":n.colorBorder)},boxShadow:K&&!R&&Ce.current==="keyboard"?H==="underlined"?`0 1px 0 0 ${Oe}`:`0 0 0 2px ${Qe}`:"none",...R?{opacity:.6,cursor:"not-allowed"}:{}},de=U?{borderRadius:0,...W&&!F?{borderRadius:`0 ${Z.radius} ${Z.radius} 0`}:{},...!W&&F?{borderRadius:`${Z.radius} 0 0 ${Z.radius}`}:{}}:{},We={...he,...de},$e={flex:1,minWidth:0,width:"100%",height:"100%",padding:`0 ${Z.paddingH}`,fontSize:"inherit",fontFamily:"inherit",color:R?n.colorTextSubtle:n.colorText,background:"none",border:"none",outline:"none",cursor:R?"not-allowed":void 0,textAlign:"left",boxSizing:"border-box"},ne={display:"inline-flex",alignItems:"center",paddingLeft:Z.paddingH,color:n.colorTextMuted,flexShrink:0},be={display:"inline-flex",alignItems:"center",paddingRight:_e?"0":Z.paddingH,color:n.colorTextMuted,flexShrink:0},Ye={display:"flex",flexDirection:"column",alignSelf:"stretch",borderLeft:`1px solid ${n.colorBorder}`,opacity:0,transition:"opacity 0.15s ease",flexShrink:0},Ze={display:"flex",alignItems:"center",justifyContent:"center",flex:1,padding:0,border:"none",backgroundColor:"transparent",color:n.colorTextMuted,cursor:"pointer",fontSize:"0.5rem",lineHeight:0,width:"1.25rem",transition:"color 0.15s ease, background-color 0.15s ease"},tt={...Ze,borderBottom:`1px solid ${n.colorBorder}`,borderRadius:`0 ${U&&F?"0":Z.radius} 0 0`},dt={...Ze,borderRadius:`0 0 ${U&&F?"0":Z.radius} 0`},ft={display:"inline-flex",alignItems:"center",padding:`0 ${Z.paddingH}`,height:Z.height,fontSize:Z.fontSize,fontFamily:"inherit",backgroundColor:n.colorBgMuted,border:`1px solid ${Be||n.colorBorder}`,color:n.colorText,whiteSpace:"nowrap",boxSizing:"border-box"},gt={...ft,borderRight:"none",borderRadius:`${Z.radius} 0 0 ${Z.radius}`},Ct={...ft,borderLeft:"none",borderRadius:`0 ${Z.radius} ${Z.radius} 0`},jt=t.jsxs("div",{ref:_,className:O?.input,style:V(We,Y?.input),onMouseDown:()=>{Te.current=!0},onMouseEnter:Pe,onMouseLeave:Ge,children:[A&&t.jsx("span",{className:O?.prefix,style:V(ne,Y?.prefix),children:A}),t.jsx("input",{ref:X,id:L,name:I,type:"text",inputMode:"decimal",autoComplete:"off",tabIndex:P,value:Ie,placeholder:B,disabled:R,readOnly:S,autoFocus:$,onChange:ke,onFocus:ee,onBlur:ae,onKeyDown:se,style:$e,"aria-valuemin":h!==-1/0?h:void 0,"aria-valuemax":g!==1/0?g:void 0,"aria-valuenow":ge??void 0,role:"spinbutton"}),M&&t.jsx("span",{className:O?.suffix,style:V(be,Y?.suffix),children:M}),_e&&t.jsxs("div",{ref:Q,className:O?.handler,style:V(Ye,Y?.handler),children:[t.jsx("span",{className:O?.handlerUp,style:V(tt,Y?.handlerUp,et||R?{cursor:"not-allowed",color:n.colorTextSubtle}:void 0),onMouseDown:pe=>{pe.preventDefault(),!et&&!R&&we("up")},onMouseUp:ie,onMouseEnter:pe=>{if(!et&&!R){const Ke=pe.currentTarget;Ke.style.backgroundColor=n.colorBgMuted,Ke.style.color=n.colorPrimary}},onMouseLeave:pe=>{ie();const Ke=pe.currentTarget;Ke.style.backgroundColor="transparent",Ke.style.color=et||R?n.colorTextSubtle:n.colorTextMuted},children:Se||t.jsx($u,{})}),t.jsx("span",{className:O?.handlerDown,style:V(dt,Y?.handlerDown,je||R?{cursor:"not-allowed",color:n.colorTextSubtle}:void 0),onMouseDown:pe=>{pe.preventDefault(),!je&&!R&&we("down")},onMouseUp:ie,onMouseEnter:pe=>{if(!je&&!R){const Ke=pe.currentTarget;Ke.style.backgroundColor=n.colorBgMuted,Ke.style.color=n.colorPrimary}},onMouseLeave:pe=>{ie();const Ke=pe.currentTarget;Ke.style.backgroundColor="transparent",Ke.style.color=je||R?n.colorTextSubtle:n.colorTextMuted},children:me||t.jsx(Pu,{})})]})]});if(U){const pe={display:"inline-flex",width:"100%",alignItems:"stretch"};return t.jsxs("div",{ref:G,className:Ve(D,O?.root),style:V(pe,Y?.root,T),children:[W&&t.jsx("span",{className:O?.addon,style:V(gt,Y?.addon),children:W}),jt,F&&t.jsx("span",{className:O?.addon,style:V(Ct,Y?.addon),children:F})]})}const Mt={display:"inline-flex",flexDirection:"column",width:"100%"};return t.jsx("span",{ref:G,className:Ve(D,O?.root),style:V(Mt,Y?.root,T),children:jt})});function Nu(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}const Vu={small:{height:"1.5rem",fontSize:"0.75rem",lineHeight:"1.125rem",paddingH:"0.5rem",paddingV:"0.25rem",radius:"0.25rem"},middle:{height:"2rem",fontSize:"0.875rem",lineHeight:"1.375rem",paddingH:"0.75rem",paddingV:"0.375rem",radius:"0.375rem"},large:{height:"2.5rem",fontSize:"1rem",lineHeight:"1.5rem",paddingH:"0.75rem",paddingV:"0.625rem",radius:"0.5rem"}};function Yu(e,r){switch(e){case"outlined":return{border:`1px solid ${n.colorBorder}`,backgroundColor:n.colorBg,borderRadius:r};case"filled":return{border:"1px solid transparent",backgroundColor:n.colorBgMuted,borderRadius:r};case"borderless":return{border:"1px solid transparent",backgroundColor:"transparent",borderRadius:r};case"underlined":return{border:"none",borderBottom:`1px solid ${n.colorBorder}`,borderRadius:0,backgroundColor:"transparent"}}}function Br(e){if(e==="error")return n.colorError;if(e==="warning")return n.colorWarning}function Ku(e){return e==="error"?n.colorErrorBg:e==="warning"?n.colorWarningBg:n.colorPrimaryLight}function _u(e){return e==="error"?n.colorError:e==="warning"?n.colorWarning:n.colorPrimary}function Xu(e,r){const o=e.toLowerCase();return!!(r.value.toLowerCase().includes(o)||typeof r.label=="string"&&r.label.toLowerCase().includes(o))}function Gu(e,r,o,s){const l=e.slice(0,r),a=[...o].sort((c,u)=>u.length-c.length);for(const c of a){let u=l.length;for(;u>0;){const f=l.lastIndexOf(c,u-1);if(f<0)break;u=f;const d=f>0?l[f-1]:"";if(!(f===0||d===" "||d===`
|
|
119
|
+
`}),Be&&De(),t.jsxs("div",{style:{position:"relative",overflow:"hidden",flex:1,...E?{height:"100%"}:{}},children:[Oe(),t.jsx("div",{ref:Y,className:y?.track,style:ae,onPointerDown:Te,onPointerMove:ke,onPointerUp:Ie,onPointerCancel:Ie,children:fe()})]}),!Be&&De()]})}),zd=Dd,Wd={small:{headerPadding:"0.375rem 0.75rem",contentPadding:"0.75rem",fontSize:"0.8125rem"},middle:{headerPadding:"0.75rem 1rem",contentPadding:"1rem",fontSize:"0.875rem"},large:{headerPadding:"1rem 1.25rem",contentPadding:"1.25rem",fontSize:"1rem"}};function Hd(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("path",{d:"M4.5 2.5L8 6L4.5 9.5"})})}function Fd({panelKey:e,label:r,children:o,extra:s,showArrow:l,isActive:a,collapsible:c,expandIcon:u,expandIconPlacement:f,destroyOnHidden:d,forceRender:h,size:g,ghost:m,isFirst:x,panelClassName:p,panelStyle:b,onToggle:v,classNames:j,styles:C}){const w=i.useRef(null),y=i.useRef(null),k=i.useRef(null),B=i.useRef(null),[R,S]=i.useState(a||h),E=i.useRef(!1),$=i.useRef(!1),I=Wd[g];i.useEffect(()=>{a&&!R&&S(!0)},[a,R]),i.useLayoutEffect(()=>{const G=w.current;if(G){if(!$.current){$.current=!0,a?(G.style.maxHeight="none",G.style.opacity="1"):(G.style.maxHeight="0px",G.style.opacity="0");return}if(a){E.current=!0;const Q=y.current;if(Q){const N=Q.scrollHeight;G.style.transition="none",G.style.maxHeight="0px",G.style.opacity="0",G.offsetHeight,G.style.transition="max-height 300ms ease, opacity 200ms ease",G.style.maxHeight=N+"px",G.style.opacity="1"}}else{const Q=y.current;if(Q){const N=Q.scrollHeight;G.style.transition="none",G.style.maxHeight=N+"px",G.offsetHeight,G.style.transition="max-height 300ms ease, opacity 200ms ease",G.style.maxHeight="0px",G.style.opacity="0"}}}},[a]);const L=i.useCallback(G=>{if(G.propertyName!=="max-height")return;const Q=w.current;Q&&(a&&(Q.style.maxHeight="none"),E.current=!1)},[a]),P=c==="disabled",H=c==="icon",z=i.useCallback(()=>{P||H||v(e)},[P,H,v,e]),F=i.useCallback(G=>{P||H&&(G.stopPropagation(),v(e))},[P,H,v,e]),M=i.useCallback(()=>{P||!k.current||(m?k.current.style.backgroundColor=n.colorBgSubtle:k.current.style.filter="brightness(0.97)")},[P,m]),W=i.useCallback(()=>{k.current&&(m?k.current.style.backgroundColor="":k.current.style.filter="")},[m]),A=l?t.jsx("span",{ref:B,onClick:H?F:void 0,className:j?.arrow,style:V({display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:"1.25rem",height:"1.25rem",color:P?n.colorTextSubtle:n.colorTextMuted,transform:a?"rotate(90deg)":"rotate(0deg)",transition:"transform 200ms ease",cursor:H&&!P?"pointer":"inherit"},C?.arrow),children:u?u({isActive:a}):t.jsx(Hd,{})}):null,D=P?"not-allowed":H?"default":"pointer",T=V({display:"flex",alignItems:"center",gap:"0.5rem",padding:I.headerPadding,fontSize:I.fontSize,fontWeight:600,color:P?n.colorTextSubtle:n.colorText,backgroundColor:m?"transparent":n.colorBgSubtle,cursor:D,userSelect:"none",borderTop:x?"none":`1px solid ${n.colorBorder}`,transition:"filter 0.15s ease, background-color 0.15s ease"},C?.header),O={overflow:"hidden",maxHeight:a?void 0:0,opacity:a?1:0},Y=V({padding:I.contentPadding,fontSize:I.fontSize,color:n.colorText,borderTop:`1px solid ${n.colorBorder}`},C?.content),X=a||R||h,K=d&&!a&&!E.current;return t.jsxs("div",{className:p,style:b,children:[t.jsxs("div",{ref:k,onClick:z,onMouseEnter:M,onMouseLeave:W,className:j?.header,style:T,children:[f==="start"&&A,t.jsx("span",{style:{flex:1,minWidth:0},children:r}),s&&t.jsx("span",{style:{flexShrink:0,marginLeft:"auto"},children:s}),f==="end"&&A]}),t.jsx("div",{ref:w,style:O,onTransitionEnd:L,children:X&&!K&&t.jsx("div",{ref:y,className:j?.content,style:Y,children:o})})]})}function Ad(e){return null}function Cn(e){return e===void 0?[]:Array.isArray(e)?e:[e]}function Od({items:e,accordion:r=!1,activeKey:o,defaultActiveKey:s,bordered:l=!0,ghost:a=!1,size:c="middle",collapsible:u,expandIcon:f,expandIconPlacement:d="start",destroyOnHidden:h=!1,onChange:g,children:m,className:x,style:p,classNames:b,styles:v}){const j=e??(()=>{const S=[];return i.Children.forEach(m,E=>{if(!i.isValidElement(E))return;const $=E.props;$.panelKey!==void 0&&S.push({key:$.panelKey,label:$.header,children:$.children,extra:$.extra,showArrow:$.showArrow,collapsible:$.collapsible,forceRender:$.forceRender,className:$.className,style:$.style})}),S})(),C=o!==void 0,[w,y]=i.useState(()=>Cn(s)),k=C?Cn(o):w,B=i.useCallback(S=>{let E;r?E=k.includes(S)?[]:[S]:E=k.includes(S)?k.filter($=>$!==S):[...k,S],C||y(E),g?.(r?E[0]??"":E)},[r,k,C,g]),R=V({border:a?"none":l?`1px solid ${n.colorBorder}`:"none",borderRadius:a?0:"0.5rem",overflow:"hidden",backgroundColor:a?"transparent":n.colorBg},v?.root,p);return t.jsx("div",{className:Ye(x,b?.root),style:R,children:j.map((S,E)=>t.jsx(Fd,{panelKey:S.key,label:S.label,extra:S.extra,showArrow:S.showArrow??!0,isActive:k.includes(S.key),collapsible:S.collapsible??u,expandIcon:f,expandIconPlacement:d,destroyOnHidden:h,forceRender:S.forceRender??!1,size:c,ghost:a,isFirst:E===0,panelClassName:S.className,panelStyle:S.style,onToggle:B,classNames:b,styles:v,children:S.children},S.key))})}const Nd=Object.assign(Od,{Panel:Ad});function Ns({color:e}){const r=e??n.colorBorder;return t.jsx("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg",children:t.jsxs("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd",children:[t.jsx("ellipse",{fill:n.colorBgMuted,cx:"32",cy:"33",rx:"32",ry:"7"}),t.jsxs("g",{fillRule:"nonzero",stroke:r,children:[t.jsx("path",{d:"M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"}),t.jsx("path",{d:"M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3",fill:n.colorBgSubtle})]})]})})}function Vd({color:e}){return t.jsx("svg",{width:"40",height:"40",viewBox:"0 0 2048 2048",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{fill:e??n.colorTextSubtle,d:"M 884.867 254.368 C 902.348 244.713 979.774 206.55 995.803 210.785 C 1000.12 211.901 1003.77 214.791 1005.84 218.741 C 1012.2 231.022 1005.67 242.254 993.26 246.461 C 974.693 252.754 955.911 260.015 938.012 268.036 C 982.579 283.684 1013.87 298.123 1055.55 319.769 C 1065.49 317.104 1075.23 314.626 1085.31 312.495 C 1206.36 286.89 1343.6 332.944 1416.49 435.528 C 1441.98 442.939 1476.64 451.383 1499.81 463.038 C 1453.03 403.622 1400.11 356.764 1337.29 314.5 C 1323.93 305.504 1310.13 297.167 1295.95 289.519 C 1284.45 283.214 1258.64 272.134 1255.34 259.475 C 1254.83 257.515 1254.69 255.477 1254.95 253.468 C 1259.33 220.111 1300.31 250.338 1314.2 258.305 C 1402.05 308.685 1482.4 376.306 1541.77 458.743 C 1546.9 465.872 1563.79 492.887 1568.31 495.921 C 1597.12 515.292 1624.82 535.896 1651.24 558.398 C 1625.32 472.017 1590.36 398.728 1533.32 328.822 C 1523.41 316.683 1495 291.43 1527.24 279.317 C 1538.6 275.05 1546.73 286.856 1552.85 294.288 C 1619.69 376.16 1668.92 469.083 1691.92 572.662 C 1694.09 582.448 1695.74 597.478 1699.86 607.081 C 1725.42 641.622 1753.97 674.24 1774.1 712.836 C 1774.09 665.812 1767.63 617.476 1758.16 571.444 C 1753.97 550.892 1746.54 530.746 1742.65 510.197 C 1738.96 490.722 1761.48 482.252 1773.06 494.521 C 1778.77 500.574 1783.43 523.708 1785.77 532.806 C 1808.72 620.086 1816.18 710.715 1807.82 800.573 C 1805.75 823.802 1802.17 851.182 1797.23 874.028 C 1818.4 910.957 1833.8 951.992 1845.38 992.851 C 1850.89 1012.32 1860.01 1033.15 1831.58 1037.58 C 1829 1073.33 1813.74 1130.29 1799.53 1163.1 C 1803.16 1179.94 1806.01 1196.95 1808.07 1214.06 C 1815.59 1196.7 1823.1 1179.33 1829.61 1161.56 C 1834.36 1148.59 1837.8 1132.11 1844.72 1120.33 C 1846.55 1117.22 1849.53 1114.62 1852.91 1113.3 C 1857.13 1111.65 1862.46 1112.04 1866.56 1113.89 C 1870.63 1115.73 1873.38 1119.05 1874.64 1123.31 C 1880.57 1143.33 1841.92 1227.34 1831.71 1248.15 C 1826.25 1259.27 1817.74 1270.59 1813.94 1282.22 C 1810.11 1293.93 1810.82 1326.59 1809.7 1340.88 C 1806.26 1384.79 1795.73 1428.4 1781.79 1470.07 C 1778.91 1478.65 1776.36 1488.15 1771.88 1496.05 C 1769.09 1500.98 1765.21 1504.16 1759.68 1505.72 C 1756.09 1506.73 1752.24 1506.43 1749.1 1504.31 C 1744.61 1501.27 1741.84 1495.75 1740.93 1490.52 C 1740.17 1486.07 1740.62 1481.52 1741.66 1477.15 C 1743.08 1471.11 1746.19 1465.46 1748.29 1459.62 C 1752.82 1447.01 1756.74 1433.98 1760.09 1421 C 1766.77 1395.09 1770.83 1369.06 1774.11 1342.53 C 1738.8 1394.4 1686.22 1448.63 1638.61 1488.8 C 1628.86 1497.02 1618.79 1504.86 1608.43 1512.3 C 1578.55 1534.03 1585.52 1531.06 1566.88 1561.7 C 1559.58 1573.56 1551.78 1585.11 1543.51 1596.31 C 1499 1656.22 1436.6 1707.43 1371 1742.53 C 1358.17 1749.39 1332.91 1768.34 1319.58 1758.13 C 1315.89 1755.34 1313.48 1751.17 1312.9 1746.58 C 1312.35 1741.86 1313.74 1737.11 1316.76 1733.43 C 1321.18 1728.05 1373.58 1700.73 1385.31 1693.49 C 1399.29 1684.77 1412.82 1675.33 1425.84 1665.22 C 1456.11 1641.96 1484.19 1612.79 1508.23 1583.19 C 1512.03 1578.51 1515.45 1573.72 1519.48 1569.2 C 1514.23 1572.82 1508.9 1576.47 1502.95 1578.81 C 1475.4 1589.63 1455.44 1612.01 1432.1 1630.38 C 1398.58 1656.54 1362.7 1679.53 1324.93 1699.05 C 1301.61 1711.2 1277.69 1722.17 1253.28 1731.93 C 1228.19 1741.72 1210.78 1745.07 1187.77 1759.41 C 1287.99 1774.72 1384.11 1775.93 1482.14 1748.23 C 1496.14 1744.28 1522.68 1731.69 1531.66 1745.37 C 1536.76 1753.14 1535.69 1765.19 1527.08 1770.48 C 1511.1 1779.26 1490.3 1782.4 1472.77 1787.55 C 1357.81 1814.81 1251.39 1811.67 1137.4 1785.07 L 1133.62 1784.18 C 1105.48 1796.83 1033.57 1822.13 1004.21 1820.94 C 1001.46 1818.78 998.535 1816.57 995.853 1814.36 C 878.282 1815.69 787.644 1765.7 704.027 1685.62 C 690.293 1672.47 679.964 1659.41 667.899 1644.82 C 662.796 1638.66 655.624 1629.11 650.416 1623.81 C 623.376 1616.71 603.222 1614.39 573.928 1604.95 C 582.499 1614.99 591.366 1625.8 600.57 1635.17 C 659.094 1699.26 730.561 1750.18 810.243 1784.58 C 822.809 1789.97 835.585 1795.12 848.591 1799.35 C 860.251 1803.15 873.669 1806.04 884.537 1811.74 C 887.209 1813.14 889.562 1817.74 890.465 1820.52 C 891.874 1824.86 891.744 1829.67 889.601 1833.74 C 887.426 1837.88 883.54 1840.8 879.072 1842.05 C 857.449 1848.14 767.156 1805 744.664 1792.59 C 672.561 1752.8 609.769 1699.69 555.2 1638.24 C 545.093 1626.8 535.421 1614.97 526.204 1602.8 C 522.035 1597.38 511.814 1582.71 507.29 1579.32 C 487.902 1564.76 464.234 1552.58 444.736 1537.9 C 386.866 1494.46 338.018 1440.15 300.923 1378.03 C 295.077 1368.36 282.848 1347.44 279.864 1337.07 L 279.665 1332.26 C 280.528 1329.17 282.116 1324.82 284.386 1322.64 C 305.224 1303.52 315.466 1330 323.83 1345.45 C 360.824 1413.78 408.82 1463.44 468.89 1511.45 C 463.238 1502.08 458.934 1492.85 454.081 1483.07 C 445.252 1465.29 428.487 1452.27 415.998 1437 C 395.407 1411.81 375.242 1385.58 357.941 1357.99 C 343.524 1334.92 330.49 1311.01 318.909 1286.4 C 304.123 1255.36 301.854 1242.45 281.255 1215.01 C 276.126 1255.72 276.707 1288.61 278.109 1329.03 C 278.046 1332.59 277.863 1333.62 278.885 1337.11 C 280.592 1386.43 292.17 1437.86 304.486 1485.48 C 308.967 1502.81 317.172 1519.58 321.853 1537.16 C 326.591 1554.95 300.447 1564.24 291.244 1552.02 C 284.212 1542.68 280.059 1523.81 275.59 1512.7 C 246.464 1421.3 234.03 1315.75 244.596 1220.36 C 246.636 1202.56 248.927 1184.78 251.466 1167.04 C 237.83 1146.06 192.915 1042.32 197.699 1020.14 C 198.808 1015.16 201.911 1010.86 206.283 1008.23 C 209.533 1006.29 212.785 1005.93 216.45 1005.57 C 222.538 959.737 231.54 919.144 248.756 875.828 C 245.967 861.182 242.777 845.733 240.698 831.053 C 231.651 850.223 223.593 869.843 216.556 889.838 C 212.469 901.571 209.504 916.33 203.546 927.049 C 201.477 930.771 197.726 933.619 193.691 934.92 C 189.876 936.15 185.817 936.013 182.243 934.119 C 177.259 931.476 172.603 926.644 171.296 921.035 C 167.777 905.941 205.012 822.585 214.106 804.419 C 221.256 790.135 232.461 774.892 236.758 759.703 C 240.074 747.985 237.581 722.337 238.938 708.537 C 244.259 657.941 255.972 608.223 273.795 560.572 C 277.525 550.526 284.432 526.023 296.166 524.252 C 311.178 521.986 316.171 527.69 319.234 541.44 C 316.51 552.001 311.258 563.367 307.067 573.641 C 290.53 614.189 282.512 656.043 276.295 699.27 C 321.165 628.666 390.035 564.598 455.779 513.489 C 474.152 499.206 497.089 486.175 515.399 472.327 C 526.458 463.963 538.49 438.824 549.499 428.363 C 579.835 392.124 614.104 359.92 651.558 331.135 C 659.372 325.13 672.674 313.779 681.9 311.403 C 686.172 310.315 690.705 311.155 694.303 313.7 C 702.501 319.4 705.435 332.577 697.991 340.37 C 687.587 351.262 673.191 358.188 661.993 368.337 C 634.958 390.187 615.219 409.504 591.686 434.522 C 632.457 421.552 653.743 414.479 696.024 408.177 C 734.432 356.065 782.596 315.247 837.609 281.302 C 751.426 269.196 674.31 268.168 589.154 288.938 C 569.577 293.713 537.445 307.075 539.001 274.074 C 539.909 258.184 582.949 252.998 595.361 250.499 C 687.449 231.959 786.181 230.604 877.771 252.602 C 880.141 253.171 882.507 253.76 884.867 254.368 z M 1048.03 754.312 C 1063.31 759.433 1123.24 775.651 1086.69 802.518 C 1078.88 808.261 1047.83 791.541 1038.8 789.44 C 1028.04 785.788 1013.92 781.22 1003.93 776.909 C 926.916 819.296 855.529 860.351 789.953 920.172 C 772.733 935.881 755.886 953.408 739.755 970.267 C 744.518 980.322 749.367 991.193 755.012 1000.71 C 757.918 992.912 761.125 984.087 763.589 975.951 C 768.158 960.867 774.652 943.47 794.075 952.302 C 800.6 955.269 802.751 959.719 804.944 966.406 L 805.322 967.594 C 798.325 992.181 784.986 1018.03 777.925 1045.47 C 822.468 1131.69 869.734 1213.36 941.028 1280.64 C 945.381 1284.75 967.217 1308.45 972.28 1306.77 C 981.435 1302.07 989.713 1297.86 999.165 1293.69 C 986.402 1289.04 949.675 1279.04 949.23 1263.11 C 948.772 1246.71 964.026 1241.28 978.081 1246.9 C 999.894 1255.63 1021.97 1263.02 1043.83 1270.66 C 1112.52 1230.78 1173.95 1199.57 1235.98 1146.56 C 1265.64 1121.22 1281.22 1103.26 1308.06 1076.62 C 1302.8 1067.2 1297.72 1057.69 1292.83 1048.07 C 1287.39 1064.92 1278.82 1106.06 1254.84 1097.13 C 1233.98 1089.36 1250.08 1058.58 1255.28 1044.79 C 1260.44 1031.04 1265.42 1017.24 1270.23 1003.37 C 1228 927.952 1187.58 856.152 1128.58 792.197 C 1121.43 784.455 1081.85 742.31 1075.5 740.769 L 1048.03 754.312 z M 689.509 1429.09 C 719.988 1480 752.606 1523.77 796.786 1563.88 C 803.367 1569.85 813.599 1580 820.103 1585.03 L 843.219 1580.2 C 874.568 1572.49 903.663 1565.16 933.915 1553.52 C 943.84 1549.7 956.565 1545.64 966.048 1541.02 C 922.01 1518.21 863.006 1465.67 828.385 1429.96 C 824.395 1425.85 810.484 1407.44 807.216 1408.03 C 774.935 1418.38 723.587 1427.12 689.509 1429.09 z M 523.705 1003.74 C 543.343 1045.94 562.375 1079.31 590.128 1117.3 C 593.637 1122.06 597.205 1126.77 600.831 1131.44 C 619.011 1078.4 661.44 1008.92 697.707 966.597 C 682.815 934.282 668.843 901.551 655.807 868.443 C 654.521 865.17 650.013 851.553 647.977 850.602 C 606.465 888.555 574.357 924.177 543.665 971.86 C 537.458 981.503 529.016 993.683 523.705 1003.74 z M 847.422 1396.75 C 886.189 1439.91 927.948 1475.81 977.531 1505.97 C 984.667 1510.31 998.317 1519.81 1005.53 1522.59 L 1007.43 1521.67 C 1044.97 1500.51 1091.54 1474.78 1124.45 1446.48 C 1076.09 1426.72 1030.37 1401.04 988.317 1370.04 C 985.181 1367.71 964.635 1351.49 962.849 1350.98 C 936.15 1364.72 876.207 1388.31 847.422 1396.75 z M 1350.33 1081.92 C 1368.11 1118.11 1386.73 1156.91 1400.13 1194.82 L 1414.15 1181.37 C 1466.91 1129.39 1483.54 1102.99 1522.34 1042.44 C 1503.1 1006.7 1484.79 972.678 1460.55 939.921 C 1457.42 935.699 1448.63 923.495 1445.35 920.534 C 1423.43 970.899 1398.98 1017.83 1365.44 1061.61 C 1360.45 1068.12 1355 1075.2 1350.33 1081.92 z M 1562.85 1042.81 C 1584.26 1090.6 1603.18 1137.34 1613.1 1189.19 C 1619.81 1180.95 1626.41 1172.62 1632.9 1164.2 C 1665.32 1120.98 1692.61 1074.13 1714.21 1024.61 C 1696.88 994.443 1645.94 912.783 1619.55 893.488 C 1607.83 941.272 1587.72 1000.07 1562.85 1042.81 z M 925.575 595.756 C 981.998 622.443 1034.58 656.581 1081.92 697.258 C 1095.03 692.419 1115.72 681.854 1129.23 675.772 C 1151.91 665.554 1170.86 658.132 1194 649.571 C 1164.51 612.521 1105.72 567.568 1067.03 540.434 C 1062.99 537.604 1044.56 524.92 1040.85 523.894 C 995.029 548.992 968.062 565.185 925.575 595.756 z M 1233.79 464.224 C 1269.9 508.339 1309.56 564.26 1333.74 616.353 C 1350.53 612.705 1388.31 610.937 1405.75 611.949 C 1422.89 612.255 1439.45 612.882 1456.42 615.405 C 1445.78 562.302 1430.54 513.177 1397.94 468.944 C 1359.48 461.683 1320.32 457.651 1281.15 459.55 C 1264.2 460.641 1250.63 461.923 1233.79 464.224 z M 765.391 581.038 C 744.506 612.706 719.899 651.619 705.237 686.805 C 713.664 685.204 719.347 684.218 727.845 683.502 C 733.228 686.075 737.987 688.358 740.043 694.304 C 743.293 703.706 739.051 716.894 728.451 719.286 C 704.521 724.685 680.969 728.032 657.708 736.571 C 660.92 754.079 664.007 770.78 668.755 787.961 C 677.769 782.055 685.61 777.038 694.994 771.643 C 707.187 764.293 719.696 757.482 732.487 751.229 C 760.705 707.04 788.419 672.314 825.948 635.195 C 835.545 625.704 846.113 614.748 856.458 606.212 C 836.301 599.523 817.171 593.048 796.545 587.714 C 785.66 584.898 775.985 583.467 765.391 581.038 z M 1043.64 1543.16 C 1076.23 1555.51 1103.75 1570.44 1139.22 1578.8 C 1146.49 1580.7 1153.96 1582.77 1161.29 1584.32 C 1191.59 1560.72 1228.94 1515.55 1251.96 1485.39 C 1218.12 1477.82 1195.62 1471.2 1162.91 1461.7 C 1126.55 1492.72 1084.53 1518.63 1043.64 1543.16 z M 1540.72 1080.9 C 1508.4 1134.09 1461.12 1193.22 1412.42 1232.64 C 1420.69 1263.39 1428.94 1297.61 1432.23 1329.34 L 1447.42 1321.37 C 1492.84 1296.53 1534.59 1269.3 1571.28 1232.41 C 1574.96 1228.7 1579.52 1223.96 1583.52 1220.68 C 1573.63 1177.91 1560.22 1120.59 1540.72 1080.9 z M 1424.55 1485.21 C 1415.49 1519.97 1401.41 1553.24 1382.77 1583.96 L 1383.47 1584.92 C 1446.76 1567.12 1500.74 1543.53 1555.85 1506.77 C 1568.28 1477.55 1576.95 1455.88 1582.89 1424.08 L 1582.1 1423.15 C 1529.94 1453 1484.7 1474.44 1424.55 1485.21 z M 318.455 1060.72 C 305.324 1098.07 297.574 1122.72 289.123 1161.77 C 292.826 1169.2 300.35 1179.98 305.049 1187.16 C 333.166 1230.11 363.069 1262.78 400.677 1297.17 C 404.785 1300.77 408.971 1304.28 413.231 1307.7 C 411.593 1262.98 412.95 1233.64 419.83 1189.31 C 383.766 1153.91 349.482 1114.7 324.147 1070.61 C 322.42 1067.61 320.374 1063.49 318.455 1060.72 z M 1099.28 346.676 C 1131.7 369.401 1174.72 403.306 1201.92 431.479 C 1249.64 425.164 1273.89 422.525 1322.55 423.054 C 1335.25 423.982 1349.02 424.725 1361.61 425.976 C 1296.59 367.825 1231.53 339.918 1142.04 341.843 C 1140.43 341.878 1136.48 342.147 1135.09 342.4 C 1122.22 343.347 1111.49 345.446 1099.28 346.676 z M 1308.58 998.14 C 1316.58 1013.71 1324.83 1029.16 1333.31 1044.48 C 1342.03 1032.53 1353.25 1017.55 1360.73 1004.78 C 1386.26 965.455 1402.07 931.221 1419.64 888.484 C 1395.47 859.758 1348.34 812.285 1316.92 790.633 C 1336.53 850.565 1328.77 938.829 1308.58 998.14 z M 671.955 1590.41 C 709.225 1592.14 733.812 1593.28 771.116 1590.85 L 772.521 1590.21 C 768.389 1585.16 762.765 1581.17 757.998 1576.55 C 750.718 1569.5 743.803 1562.09 736.973 1554.6 C 702.465 1517.16 673.023 1475.35 649.404 1430.24 C 637.724 1429.74 612.931 1429.14 602.631 1427.07 C 616.471 1494.5 634.574 1533.44 671.955 1590.41 z M 1733.49 1068.79 C 1696.94 1140.43 1673.81 1173.6 1621.3 1234.35 C 1628.21 1273.61 1629.45 1302.53 1629.06 1342.07 L 1642.37 1330.09 C 1681 1292.77 1709.27 1257.18 1736.24 1210.27 C 1745.81 1193.63 1753.81 1174.82 1762.61 1159.44 C 1754.55 1127.87 1744.65 1099.27 1733.49 1068.79 z M 1302.14 1596.91 C 1311.96 1596.27 1321.83 1595.76 1331.6 1594.5 C 1352.57 1570.37 1377.04 1521.79 1384.93 1491.23 C 1347.26 1493.79 1329.41 1493.06 1291.86 1490.75 C 1267.74 1529.81 1237.48 1560.16 1206.02 1592.71 C 1246.65 1597.13 1261.16 1597.86 1302.14 1596.91 z M 1494.06 622.619 C 1528.36 630.117 1561.22 643.131 1591.35 661.155 C 1580.82 622.333 1572.39 585.421 1553.81 549.254 C 1547.22 536.428 1542.7 523.737 1528.57 517.138 C 1502.64 502.322 1476.68 492.186 1448.73 482.178 C 1479.03 535.022 1481.88 566.988 1494.06 622.619 z M 1596.34 820.215 C 1601.3 774.222 1600.91 752.651 1597.86 706.528 C 1561.53 682.701 1537.77 672.947 1497 660.328 C 1498.28 699.36 1497.06 710.58 1493.08 748.105 C 1529.35 769.372 1563.88 793.485 1596.34 820.215 z M 565.737 1255.81 C 567.607 1231.78 578.727 1193.94 585.672 1170.67 C 550.421 1124.7 529.814 1095.58 503.184 1043.67 C 481.973 1085.85 466.94 1130.85 458.547 1177.3 C 489.642 1204.35 513.664 1223.59 548.991 1245.84 L 565.737 1255.81 z M 716.025 441.23 C 693.071 475.108 678.2 501.153 666.088 541.203 C 695.802 538.572 719.305 540.185 748.542 543.588 C 751.377 540.306 753.312 537.648 755.863 534.123 C 776.815 504.749 811.105 468.466 838.069 444.302 C 809.753 440.996 784.267 437.515 755.553 438.698 C 751.129 438.881 740.585 438.754 736.688 439.411 C 730.228 440.037 722.389 440.999 716.025 441.23 z M 498.784 588.116 C 540.02 565.124 581.06 553.975 626.889 544.902 C 638.874 504.309 645.506 489.004 665.291 451.925 L 664.591 450.895 L 662.567 451.069 C 625.04 460.527 579.106 476.738 546.279 497.139 C 535.223 504.01 498.276 575.018 496.728 588.625 L 498.784 588.116 z M 560.604 1294.99 C 520.248 1272.13 487.448 1248.53 451.261 1219.39 C 448.339 1236.98 444.371 1319.2 452.505 1335.11 C 456.166 1342.27 515.348 1368.27 526.501 1372.27 C 532.723 1374.5 553.182 1380.41 560.249 1383.35 C 557.702 1355.41 557.493 1322.92 560.604 1294.99 z M 1486.57 786.375 C 1480.13 819.872 1473.9 849.807 1461.36 881.774 C 1485.25 911.453 1525.88 969.98 1542.63 1003.81 L 1549.92 987.605 C 1564.32 954.629 1584.13 899.496 1589.86 863.772 C 1561.55 839.207 1519.75 804.263 1486.57 786.375 z M 1624.6 1392.4 C 1622.74 1409.83 1620.17 1424.31 1616.28 1441.47 C 1615.02 1447.06 1610.97 1460.42 1610.82 1464.42 C 1612.72 1464 1611.92 1464.43 1613.27 1463.17 C 1683.21 1408.86 1730.51 1346.96 1777.18 1273.27 C 1776.07 1253.48 1775.18 1240.65 1771.75 1221.13 C 1739.62 1275.03 1711.86 1314.8 1665.42 1358.46 C 1650.97 1372.03 1638.55 1380.44 1624.6 1392.4 z M 915.302 1695.11 C 884.217 1676.56 854.922 1657.43 826.043 1635.43 C 822.017 1632.36 812.091 1622.52 808.384 1623.35 C 781.463 1627.03 728.696 1631.96 702.279 1628.8 C 738.051 1651.71 782.151 1674.45 823.779 1684.11 C 859.029 1693.49 879.093 1695.46 915.302 1695.11 z M 275.686 816.506 C 286.073 798.875 294.133 783.188 305.584 765.808 C 343.633 708.866 391.623 659.24 447.257 619.304 C 456.577 593.381 461.974 571.244 474.634 546.073 L 473.987 544.994 C 456.242 559.883 438.044 572.532 420.555 588.347 C 367.731 636.113 307.443 706.009 273.121 768.68 C 273.44 782.066 274.157 803.493 275.686 816.506 z M 1194.9 1433.91 C 1204.58 1437.2 1212.77 1439.29 1222.63 1441.79 C 1240.38 1445.85 1258.22 1449.47 1276.15 1452.65 C 1280.16 1443.28 1295 1419.7 1300.72 1410.14 C 1290.59 1405.14 1282.54 1395.27 1289.67 1384.11 C 1296.13 1374 1309.31 1371.77 1320.22 1369.65 C 1328.88 1352.72 1352.26 1292.69 1355.38 1274.71 L 1354.54 1273.99 C 1349.19 1277.04 1318.36 1293.64 1316.25 1295.93 C 1303.67 1309.61 1289.29 1330.93 1277.02 1346.14 C 1252.04 1377.55 1224.58 1406.9 1194.9 1433.91 z M 439.612 868.791 C 404.433 903.919 354.519 971.911 335.998 1018.39 C 359.974 1061.4 374.213 1084.45 405.627 1122.08 C 413.123 1130.48 420.681 1138.82 428.299 1147.11 C 434.865 1103.78 462.255 1041.27 483.601 1003.19 C 467.013 966.022 452.251 928.261 444.511 888.022 C 443.937 885.039 441.114 870.434 439.612 868.791 z M 1297.07 732.84 C 1351.87 767.236 1390.21 803.793 1433.82 850.026 L 1438.85 833.011 C 1444.25 812.634 1450.76 788.461 1453.44 767.552 C 1414.15 746.743 1372.94 729.763 1330.39 716.846 C 1314.18 712.051 1294.25 708.228 1279.84 703.779 C 1285.18 712.856 1291.46 724.141 1297.07 732.84 z M 1074.97 1767.57 C 1070.1 1765.34 1064.43 1763.22 1059.33 1761.48 C 1029.47 1751.27 1001.42 1737.93 972.642 1725.15 C 908.346 1734.71 870.522 1733.42 807.543 1717.67 L 791.322 1711.54 C 796.59 1714.97 802.981 1719.38 808.315 1722.47 C 810.503 1724.08 812.204 1725.18 814.477 1726.63 C 879.152 1767.91 950.648 1785.5 1027.05 1776.77 C 1044.56 1774.77 1057.95 1771.45 1074.97 1767.57 z M 951.293 764.327 C 924.525 757.55 889.897 754.432 862.648 755.419 C 793.192 759.716 735.195 784.484 679.015 824.893 C 687.289 850.394 710.296 912.256 723.957 935.458 C 730.003 928.042 738.996 918.935 746.076 912.298 C 808.254 851.461 875.35 806.052 951.293 764.327 z M 599.267 1275 C 643.621 1298.47 703.897 1321.3 752.769 1333.08 C 757.481 1334.26 758.201 1334.35 762.385 1336.63 C 760.31 1332.16 758.321 1327.29 754.254 1324.41 C 717.857 1298.59 681.673 1273.1 649.93 1241.4 C 637.679 1229.17 625.603 1216.75 613.624 1204.05 C 606.599 1227.38 602.359 1250.85 599.267 1275 z M 1346.65 1399.55 C 1340.15 1411.88 1333.73 1424.24 1327.37 1436.64 C 1324 1443.07 1319.95 1448.42 1317.37 1455.16 L 1317.91 1456.49 L 1319.25 1456.32 C 1344.34 1457.84 1369.51 1457.11 1394.46 1454.12 C 1396.13 1442.75 1403.14 1391.42 1399.57 1382.19 L 1398.4 1381.9 C 1383.2 1388.63 1362.6 1394.63 1346.65 1399.55 z M 714.113 1002.81 C 676.499 1051.77 646.904 1106.39 626.436 1164.64 C 651.251 1191.75 667.901 1210.33 696.172 1234.67 L 732.569 1264.79 C 709.726 1191.34 718.82 1121.77 738.76 1049.43 C 735.447 1042.95 716.984 1005.49 714.113 1002.81 z M 1348.95 650.435 C 1353.65 663.544 1358.18 676.684 1363.61 689.505 C 1393.35 699.995 1417.41 709.889 1446.31 722.584 L 1459.64 729.348 C 1461.67 696.642 1461.13 684.424 1460.13 652.64 C 1430.79 648.288 1401.09 646.901 1371.47 648.5 C 1363.96 649.055 1356.45 649.7 1348.95 650.435 z M 649.889 1337.48 C 656.37 1357.64 663.143 1373.5 671.548 1393.09 C 708.113 1392 732.398 1388 768.231 1380.97 L 782.905 1377.45 C 747.017 1368.77 711.648 1359.73 676.746 1347.5 C 671.809 1345.76 653.949 1339.76 649.889 1337.48 z M 632.615 1393.15 C 622.405 1373.82 611.451 1341.37 609.238 1319.6 C 604.527 1317.65 599.881 1315.55 595.307 1313.3 C 594.453 1337.03 593.801 1366.08 596.145 1389.86 C 608.384 1390.82 620.417 1391.72 632.615 1393.15 z M 1783.32 1100.76 C 1794.05 1060.64 1802.89 1013.31 1799.57 971.226 C 1798.83 961.902 1789.59 938.72 1785 930.518 C 1777.88 956.174 1765.18 999.728 1753.28 1023.61 C 1761.76 1040.98 1774.32 1072.87 1780.04 1091.78 L 1783.32 1100.76 z M 894.569 620.988 C 865.288 644.661 809.872 700.062 789.825 731.321 C 842.738 716.569 890.857 715.029 944.796 725.331 C 962.659 729.027 980.32 733.635 997.711 739.138 C 1012.13 730.959 1030.86 720.98 1046.19 714.512 C 1005.39 683.4 965.453 655.234 919.047 632.77 C 914.742 630.686 898.495 622.243 894.569 620.988 z M 384 1330.55 C 391.024 1341.86 414.644 1380.45 423.168 1387.31 C 420.851 1378.82 417.536 1363.46 416.357 1354.65 C 409.882 1349.92 389.009 1333.36 384 1330.55 z M 1774.19 727.545 C 1768.53 734.506 1755.34 743.328 1746.83 735.202 C 1739.77 728.464 1733.58 715.591 1727.94 707.071 C 1720.82 696.476 1713.47 686.033 1705.91 675.75 C 1705.91 697.682 1706.8 726.465 1705.63 747.896 C 1726.59 773.935 1749.13 799.038 1768.34 826.651 L 1769.73 813.23 C 1773.19 781.478 1774.24 759.233 1774.19 727.545 z M 1026.18 1709.93 C 1066.72 1725.59 1091.64 1735.18 1133.33 1746.74 C 1139.14 1744.03 1144.93 1741.26 1150.7 1738.45 C 1209.05 1707.97 1253.25 1681.15 1299.5 1632.95 C 1246.98 1634.16 1222.99 1632.81 1171.62 1623.25 C 1128.57 1660.4 1079.35 1689.74 1026.18 1709.93 z M 1352.14 1627.74 C 1349.35 1631.37 1327.82 1657.01 1327.81 1657.37 L 1328.44 1657.13 C 1347.47 1645.33 1364.95 1634.51 1383.66 1622.03 L 1383.47 1621.17 L 1382.22 1621.15 C 1371.86 1623.78 1362.59 1625.69 1352.14 1627.74 z M 1320.97 677.081 C 1319.15 672.765 1313.82 658.952 1311.35 655.992 L 1309.09 656.166 C 1294.06 659.46 1281.9 662.305 1267.12 666.472 C 1275.07 667.217 1280.83 668.149 1288.71 669.6 C 1299.69 671.999 1310.11 674.588 1320.97 677.081 z M 1388.31 1290.54 C 1385.62 1300.62 1370.63 1346.69 1365.75 1353.18 L 1365.94 1355.77 C 1369.01 1354.96 1369.7 1354.65 1372.5 1353.42 C 1380.92 1350.32 1389.96 1346.84 1398.41 1344.04 C 1397.09 1335.84 1390.84 1296.04 1388.31 1290.54 z M 670.966 675.089 C 684.765 645.573 699.067 616.494 717.217 589.406 C 719.899 585.403 722.576 581.39 724.825 577.124 C 710.256 576.363 691.576 575.038 677.205 576.571 C 670.404 576.865 662.927 577.032 656.198 577.539 C 652.287 600.734 644.097 679.737 653.728 698.634 L 656.009 700.175 C 664.954 698.049 667.273 683.079 670.966 675.089 z M 1144.76 1291.84 C 1229.98 1297.3 1303.35 1270.16 1370.49 1218.71 C 1359.8 1188.61 1347.83 1160.29 1334.09 1131.45 C 1332.65 1128.42 1326.09 1113.89 1324.54 1111.97 C 1246.46 1192.4 1191.46 1228.12 1095.38 1283.58 C 1112.1 1287.57 1127.56 1290.41 1144.76 1291.84 z M 296.154 1019.73 C 286.195 997.979 276.913 976.77 269.522 954.013 C 268.469 950.771 266.36 944.073 264.81 941.425 C 254.973 980.011 245.243 1033.3 248.917 1073.93 C 249.549 1080.92 259.903 1104.62 263.4 1111.44 L 266.773 1099.75 C 275.676 1071.27 283.647 1047.04 296.154 1019.73 z M 467.565 795.85 C 510.442 763.526 566.08 729.796 617.21 712.553 C 611.677 683.498 613.867 635.296 615.878 605.407 C 616.168 601.094 618.971 585.078 617.591 583.199 C 558.641 597.262 532.057 609.212 479.777 639.644 C 468.689 677.722 459.294 757.349 466.202 795.417 L 467.565 795.85 z M 1599.8 562.804 C 1619.67 610.216 1622.78 637.25 1632.49 685.474 C 1645.59 694.656 1658.14 704.589 1670.09 715.222 C 1669.02 678.419 1668.09 658.154 1662.71 621.541 C 1650.34 607.894 1615.17 571.072 1599.8 562.804 z M 898.642 1339.42 L 933.841 1324.54 C 881.074 1277.58 834.103 1215.24 796.879 1155.64 C 789.176 1143.3 782.474 1130.87 775.555 1118.15 C 773.249 1113.91 766.164 1100 763.907 1097.48 C 744.29 1179.75 759.07 1266.46 804.833 1337.58 C 810.048 1345.86 820.1 1358.69 823.954 1366.56 C 849.411 1357.93 873.683 1349.53 898.642 1339.42 z M 858.242 1613.98 C 873.583 1625.07 966.024 1688.78 980.492 1686.59 C 1029.93 1671.68 1087.47 1646.36 1126.93 1612.26 C 1100.9 1607.82 1027.5 1577.35 1004.38 1563.16 C 957.289 1584.58 908.816 1602.64 858.242 1613.98 z M 881.353 453.651 C 845.073 486.615 820.783 510.565 789.642 549.438 C 813.637 553.267 865.813 569.671 888.414 579.669 C 893.366 575.729 899.337 570.722 904.391 567.12 C 939.899 539.128 966.421 525.822 1003.14 502.828 C 964.522 481.912 923.668 465.415 881.353 453.651 z M 458.264 1381.39 C 469.405 1431.05 488.621 1478.54 515.146 1521.98 C 520.528 1530.87 529.421 1546.58 538.053 1551.18 C 560.706 1563.26 598.346 1576.54 623.193 1581.47 C 599.792 1540.81 568.592 1467.93 564.655 1420.67 C 527.582 1412.44 491.794 1399.23 458.264 1381.39 z M 434.958 673.993 C 382.385 717.673 339.291 771.635 308.322 832.567 C 300.086 848.579 293.388 864.93 285.919 881.227 C 292.512 909.023 298.626 929.451 308.695 956.247 C 311.458 962.975 314.263 969.687 317.108 976.381 C 342.669 926.479 389.376 862.256 432.506 825.897 C 428.17 785.364 427.438 744.975 431.03 704.286 C 431.685 696.862 435.391 680.307 434.958 673.993 z M 1048.05 358.959 C 1011.25 372.438 981.84 385.215 948.405 406.213 C 937.875 412.827 925.849 419.472 916.33 427.489 C 954.556 437.693 1001.21 459.288 1035.6 478.76 L 1043.03 483.204 C 1066.14 473.262 1088.69 463.611 1112.52 455.473 C 1128.33 450.073 1143.88 445.978 1159.82 441.26 C 1143.56 426.828 1063.03 359.21 1048.05 358.959 z M 1435.36 1367.17 C 1436.79 1383.43 1435.69 1401.68 1434.78 1417.96 C 1434.48 1423.33 1431.46 1444.51 1432.4 1446.76 L 1434.22 1446.84 C 1491.11 1432.57 1544.67 1407.34 1591.91 1372.57 C 1593.93 1332.6 1593.45 1305.4 1589.84 1265.91 C 1532.16 1314.63 1503.11 1334.27 1435.36 1367.17 z M 1048 1308.68 C 1031.31 1318.88 1014.12 1324.92 1000.34 1333.26 C 1053.54 1372.82 1094.03 1397.09 1156.29 1420.43 C 1167.29 1409.79 1178.96 1399.33 1189.79 1388.66 C 1212.74 1366.17 1234.48 1342.47 1254.91 1317.67 C 1193.97 1334.13 1144.91 1330.91 1083.83 1318.2 C 1073.98 1316.15 1055.37 1309.91 1048 1308.68 z M 864.621 413.108 L 872.958 415.294 C 909.646 386.787 962.756 351.231 1006.63 335.759 C 981.829 323.256 956.178 312.507 929.869 303.593 C 916.746 299.211 902.995 295.741 890.224 291.316 C 842.064 319.695 796.152 349.581 757.558 390.676 C 753.731 394.75 749.64 399.127 745.667 403.044 C 787.92 401.519 823.134 403.875 864.621 413.108 z M 1635.3 733.47 C 1637.77 770.64 1634.67 813.464 1628.21 850.118 C 1663.43 882.906 1706.59 939.23 1731.26 980.782 L 1736.44 965.679 C 1743.08 947.223 1756.87 900.617 1760.04 881.399 C 1729.78 833.25 1700.97 792.577 1658.49 753.582 C 1653.4 748.911 1640.71 737.08 1635.3 733.47 z M 1188.79 472.256 C 1164.12 477.52 1139.8 484.341 1115.99 492.678 C 1103.95 496.894 1092.21 501.924 1080.29 506.102 C 1123.34 532.032 1175.49 577.108 1210.64 613.195 C 1218.12 620.999 1225.4 628.996 1232.46 637.177 C 1253.36 631.479 1274.38 626.254 1295.52 621.505 C 1270.51 574.629 1229.52 509.151 1190.98 472.075 L 1188.79 472.256 z M 1248.77 892.51 C 1260.87 911.721 1272.46 931.254 1283.51 951.089 C 1304.58 866.952 1288.7 789.744 1244.73 716.121 C 1240.92 709.73 1223.98 681.45 1218.63 679.898 C 1182.56 692.971 1147.08 707.601 1112.29 723.746 C 1160.58 768.651 1214.89 836.328 1248.77 892.51 z M 621.987 749.876 C 566.88 770.597 515.878 800.913 471.343 839.419 C 477.028 877.04 486.639 913.962 500.018 949.581 C 502.01 954.573 504.024 959.94 506.25 964.801 C 509.507 957.369 520.161 941.836 525.165 934.856 C 554.119 894.469 597.954 842.819 637.455 812.522 C 635.687 806.197 621.782 749.6 621.987 749.876 z"})})}function Yd({tumbleweedColor:e,windColor:r,shadowColor:o}){const s=i.useRef(null),l=i.useRef(null),a=i.useRef(null),c=i.useRef([]),u=i.useRef(0),f=i.useRef(0);return i.useEffect(()=>{const d=s.current,h=l.current,g=a.current,m=c.current;if(!d||!h||!g)return;const x=4e3,p=40,b=[.18,.24,.3],v=.35,j=C=>{f.current||(f.current=C);const y=(C-f.current)%x/x,B=d.offsetWidth+p*2,R=-p+y*B,S=y*Math.PI*4,E=Math.abs(Math.sin(S))*12,$=y*720;h.style.transform=`translateX(${R}px) translateY(${-E}px) rotate(${$}deg)`;const I=1-E/20;g.style.transform=`translateX(${R+p/2-10}px) scaleX(${.5+I*.5}) scaleY(1)`,g.style.opacity=`${.25+I*.25}`;for(let L=0;L<m.length;L++){const P=m[L];if(!P)continue;const H=b[L],z=(y-H)/v;z>=0&&z<=1?z<=.3?P.style.strokeDashoffset=`${1-z/.3}`:z<=.7?P.style.strokeDashoffset="0":P.style.strokeDashoffset=`${-((z-.7)/.3)}`:P.style.strokeDashoffset="1"}u.current=requestAnimationFrame(j)};return u.current=requestAnimationFrame(j),()=>cancelAnimationFrame(u.current)},[]),t.jsxs("div",{ref:s,style:{position:"relative",width:"100%",height:"3.75rem",overflow:"hidden",pointerEvents:"none"},children:[t.jsx("svg",{width:"30",height:"12",viewBox:"0 0 40 12",fill:"none",style:{position:"absolute",left:4,bottom:30,opacity:.4,transform:"rotate(-3deg)"},children:t.jsx("path",{ref:d=>{c.current[0]=d},d:"M0 9 Q10 2 24 5 Q32 7 40 3",stroke:r??n.colorTextSubtle,strokeWidth:"1.5",strokeLinecap:"round",pathLength:1,strokeDasharray:1,strokeDashoffset:1})}),t.jsx("svg",{width:"30",height:"12",viewBox:"0 0 40 12",fill:"none",style:{position:"absolute",left:4,bottom:21,opacity:.4,transform:"rotate(4deg)"},children:t.jsx("path",{ref:d=>{c.current[1]=d},d:"M0 6 Q8 0 20 4 Q30 7 38 2",stroke:r??n.colorTextSubtle,strokeWidth:"1.5",strokeLinecap:"round",pathLength:1,strokeDasharray:1,strokeDashoffset:1})}),t.jsx("svg",{width:"30",height:"12",viewBox:"0 0 40 12",fill:"none",style:{position:"absolute",left:4,bottom:13,opacity:.4,transform:"rotate(-6deg)"},children:t.jsx("path",{ref:d=>{c.current[2]=d},d:"M0 7 Q12 11 26 5 Q34 2 40 6",stroke:r??n.colorTextSubtle,strokeWidth:"1.5",strokeLinecap:"round",pathLength:1,strokeDasharray:1,strokeDashoffset:1})}),t.jsx("div",{ref:a,style:{position:"absolute",bottom:0,left:0,width:"1.25rem",height:"0.375rem",borderRadius:"50%",backgroundColor:o??n.colorTextSubtle,opacity:.3}}),t.jsx("div",{ref:l,style:{position:"absolute",bottom:"0.25rem",left:0,width:40,height:40},children:t.jsx(Vd,{color:e})})]})}const Kd=t.jsx(Ns,{});function _d({image:e,imageStyle:r,description:o,tumbleweed:s=!1,iconColor:l,tumbleweedColor:a,windColor:c,shadowColor:u,children:f,className:d,style:h,classNames:g,styles:m}){const x=V({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"2rem 0"},m?.root,h),p=V({marginBottom:o!==!1?"0.5rem":void 0,lineHeight:1},m?.image,r),b=V({color:n.colorTextSubtle,fontSize:"0.875rem",lineHeight:1.6},m?.description),v=V({marginTop:"1rem"},m?.footer),j=typeof e=="string"?t.jsx("img",{src:e,alt:"empty",style:{maxWidth:"100%",height:"auto"}}):e??t.jsx(Ns,{color:l});return t.jsxs("div",{className:Ye(d,g?.root),style:x,children:[s?t.jsx("div",{className:g?.image,style:{...p,position:"relative",width:"100%",minHeight:"5rem"},children:t.jsx(Yd,{tumbleweedColor:a,windColor:c,shadowColor:u})}):t.jsx("div",{className:g?.image,style:p,children:j}),o!==!1&&t.jsx("div",{className:g?.description,style:b,children:o??"No data"}),f&&t.jsx("div",{className:g?.footer,style:v,children:f})]})}const Vs=Object.assign(_d,{PRESENTED_IMAGE_SIMPLE:Kd});function Xd(){return t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),t.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function Gd(){return t.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("circle",{cx:"11",cy:"11",r:"8"}),t.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}),t.jsx("line",{x1:"11",y1:"8",x2:"11",y2:"14"}),t.jsx("line",{x1:"8",y1:"11",x2:"14",y2:"11"})]})}function Ud(){return t.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("circle",{cx:"11",cy:"11",r:"8"}),t.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}),t.jsx("line",{x1:"8",y1:"11",x2:"14",y2:"11"})]})}function qd(){return t.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("polyline",{points:"1 4 1 10 7 10"}),t.jsx("path",{d:"M3.51 15a9 9 0 1 0 2.13-9.36L1 10"})]})}function Qd(){return t.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("polyline",{points:"23 4 23 10 17 10"}),t.jsx("path",{d:"M20.49 15a9 9 0 1 1-2.13-9.36L23 10"})]})}function Zd(){return t.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3"}),t.jsx("path",{d:"M16 3h3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-3"}),t.jsx("line",{x1:"12",y1:"20",x2:"12",y2:"4"}),t.jsx("polyline",{points:"6 12 3 12"}),t.jsx("polyline",{points:"21 12 18 12"})]})}function Jd(){return t.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M3 8V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v3"}),t.jsx("path",{d:"M3 16v3a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-3"}),t.jsx("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),t.jsx("polyline",{points:"12 6 12 3"}),t.jsx("polyline",{points:"12 21 12 18"})]})}function eu(){return t.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),t.jsx("path",{d:"M3 3v5h5"})]})}function tu(){return t.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function ru(){return t.jsx("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"15 18 9 12 15 6"})})}function ou(){return t.jsx("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"9 6 15 12 9 18"})})}function nu(){return t.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:n.colorTextSubtle,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),t.jsx("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),t.jsx("polyline",{points:"21 15 16 10 5 21"}),t.jsx("line",{x1:"2",y1:"2",x2:"22",y2:"22"})]})}const Ur={scale:1,rotate:0,flipX:!1,flipY:!1,x:0,y:0};function su(e){return`translate3d(${e.x}px, ${e.y}px, 0) scale(${e.scale}) rotate(${e.rotate}deg) scaleX(${e.flipX?-1:1}) scaleY(${e.flipY?-1:1})`}const Ys=i.createContext({isGroup:!1,register:()=>()=>{},open:()=>{},previewDisabled:!1});function Ks({open:e,src:r,alt:o,onClose:s,minScale:l,maxScale:a,scaleStep:c,isGroup:u,current:f=0,total:d=1,onPrev:h,onNext:g,countRender:m}){const[x,p]=i.useState(Ur),[b,v]=i.useState(!1),[j,C]=i.useState(!1),w=i.useRef({x:0,y:0,tx:0,ty:0}),y=i.useRef(null),k=i.useRef(r);i.useEffect(()=>{r!==k.current&&(p(Ur),k.current=r)},[r]),i.useEffect(()=>{e&&(p(Ur),v(!1),requestAnimationFrame(()=>{requestAnimationFrame(()=>{v(!0)})}))},[e]),i.useEffect(()=>{if(!e)return;const T=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=T}},[e]),i.useEffect(()=>{e&&y.current&&y.current.focus()},[e]);const B=i.useCallback(()=>{p(T=>{const O=T.scale*(1+c);return{...T,scale:Math.min(O,a)}})},[c,a]),R=i.useCallback(()=>{p(T=>{const O=T.scale/(1+c);return O<=l?{...T,scale:l,x:0,y:0}:{...T,scale:O}})},[c,l]),S=i.useCallback(()=>{p(T=>({...T,rotate:T.rotate-90}))},[]),E=i.useCallback(()=>{p(T=>({...T,rotate:T.rotate+90}))},[]),$=i.useCallback(()=>{p(T=>({...T,flipX:!T.flipX}))},[]),I=i.useCallback(()=>{p(T=>({...T,flipY:!T.flipY}))},[]),L=i.useCallback(()=>{p(Ur)},[]),P=i.useCallback(T=>{switch(T.key){case"Escape":T.preventDefault(),s();break;case"ArrowLeft":u&&h&&(T.preventDefault(),h());break;case"ArrowRight":u&&g&&(T.preventDefault(),g());break;case"+":case"=":T.preventDefault(),B();break;case"-":T.preventDefault(),R();break}},[s,u,h,g,B,R]),H=i.useCallback(T=>{T.preventDefault(),T.deltaY<0?B():R()},[B,R]),z=i.useCallback(T=>{x.scale<=1||(T.preventDefault(),C(!0),w.current={x:T.clientX,y:T.clientY,tx:x.x,ty:x.y})},[x.scale,x.x,x.y]);i.useEffect(()=>{if(!j)return;const T=Y=>{const X=Y.clientX-w.current.x,K=Y.clientY-w.current.y;p(G=>({...G,x:w.current.tx+X,y:w.current.ty+K}))},O=()=>{C(!1)};return document.addEventListener("mousemove",T),document.addEventListener("mouseup",O),()=>{document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",O)}},[j]);const F=i.useCallback(T=>{T.target===T.currentTarget&&s()},[s]);if(!e||typeof document>"u")return null;const M={display:"inline-flex",alignItems:"center",justifyContent:"center",width:"2.75rem",height:"2.75rem",border:"none",background:"none",color:"rgba(255,255,255,0.75)",cursor:"pointer",borderRadius:"0.375rem",transition:"color 0.15s, background-color 0.15s",padding:0},W={position:"absolute",top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",justifyContent:"center",width:"2.75rem",height:"2.75rem",borderRadius:"50%",border:"none",backgroundColor:"rgba(0,0,0,0.35)",color:"rgba(255,255,255,0.85)",cursor:"pointer",transition:"background-color 0.2s",padding:0,zIndex:2},A=u&&d>1?t.jsx("div",{style:{position:"absolute",top:"1rem",left:"50%",transform:"translateX(-50%)",color:"rgba(255,255,255,0.85)",fontSize:"0.875rem",fontWeight:500,userSelect:"none"},children:m?m(f+1,d):`${f+1} / ${d}`}):null,D=t.jsxs("div",{ref:y,tabIndex:-1,onKeyDown:P,style:{position:"fixed",inset:0,zIndex:1050,outline:"none",opacity:b?1:0,transition:"opacity 0.2s ease"},children:[t.jsx("div",{style:{position:"absolute",inset:0,backgroundColor:"rgba(0,0,0,0.72)"},onClick:F}),A,t.jsx("button",{type:"button",style:{position:"absolute",top:"1rem",right:"1rem",display:"flex",alignItems:"center",justifyContent:"center",width:"2.5rem",height:"2.5rem",borderRadius:"50%",border:"none",backgroundColor:"rgba(0,0,0,0.35)",color:"rgba(255,255,255,0.85)",cursor:"pointer",transition:"background-color 0.2s",padding:0,zIndex:2},onClick:s,onMouseEnter:T=>{T.currentTarget.style.backgroundColor="rgba(0,0,0,0.55)"},onMouseLeave:T=>{T.currentTarget.style.backgroundColor="rgba(0,0,0,0.35)"},children:t.jsx(tu,{})}),u&&d>1&&t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",style:{...W,left:"1rem"},onClick:h,onMouseEnter:T=>{T.currentTarget.style.backgroundColor="rgba(0,0,0,0.55)"},onMouseLeave:T=>{T.currentTarget.style.backgroundColor="rgba(0,0,0,0.35)"},children:t.jsx(ru,{})}),t.jsx("button",{type:"button",style:{...W,right:"1rem"},onClick:g,onMouseEnter:T=>{T.currentTarget.style.backgroundColor="rgba(0,0,0,0.55)"},onMouseLeave:T=>{T.currentTarget.style.backgroundColor="rgba(0,0,0,0.35)"},children:t.jsx(ou,{})})]}),t.jsx("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"},onWheel:H,children:t.jsx("img",{src:r,alt:o,draggable:!1,style:{maxWidth:"80vw",maxHeight:"80vh",objectFit:"contain",transform:su(x),transition:j?"none":"transform 0.2s ease",cursor:x.scale>1?j?"grabbing":"grab":"default",pointerEvents:"auto",userSelect:"none"},onMouseDown:z})}),t.jsx("div",{style:{position:"absolute",bottom:"1.5rem",left:"50%",transform:"translateX(-50%)",display:"flex",alignItems:"center",gap:"0.125rem",backgroundColor:"rgba(0,0,0,0.45)",borderRadius:"2rem",padding:"0.25rem 0.5rem",zIndex:2},children:[{icon:t.jsx(Ud,{}),action:R,title:"Zoom out"},{icon:t.jsx(Gd,{}),action:B,title:"Zoom in"},{icon:t.jsx(qd,{}),action:S,title:"Rotate left"},{icon:t.jsx(Qd,{}),action:E,title:"Rotate right"},{icon:t.jsx(Zd,{}),action:$,title:"Flip horizontal"},{icon:t.jsx(Jd,{}),action:I,title:"Flip vertical"},{icon:t.jsx(eu,{}),action:L,title:"Reset"}].map(T=>t.jsx("button",{type:"button",title:T.title,style:M,onClick:T.action,onMouseEnter:O=>{O.currentTarget.style.backgroundColor="rgba(255,255,255,0.12)"},onMouseLeave:O=>{O.currentTarget.style.backgroundColor="transparent"},children:T.icon},T.title))})]});return or.createPortal(D,document.body)}let iu=0;function _s({src:e,alt:r,width:o,height:s,fallback:l,placeholder:a,preview:c=!0,onError:u,className:f,style:d,classNames:h,styles:g}){const[m,x]=i.useState("loading"),[p,b]=i.useState(!1),[v,j]=i.useState(!1),C=i.useRef(null),w=i.useRef(null),y=i.useContext(Ys),{isGroup:k,register:B}=y,R=i.useRef(++iu),S=c!==!1&&!y.previewDisabled,E=typeof c=="object"?c:{},$=E.open!==void 0,I=$?E.open:p,L=E.src??(v&&l?l:e);i.useEffect(()=>{if(!k||!e)return;const Y=R.current;return B(Y,{src:e,alt:r,previewSrc:E.src})},[k,B,e,r,E.src]),i.useEffect(()=>{x("loading"),j(!1)},[e]);const P=i.useCallback(()=>{x("loaded")},[]),H=i.useCallback(Y=>{u?.(Y),l&&!v?j(!0):x("error")},[l,v,u]),z=i.useCallback(()=>{S&&(k?y.open(R.current):$?E.onOpenChange?.(!0):b(!0))},[S,k,y.open,$,E]),F=i.useCallback(()=>{$?E.onOpenChange?.(!1):b(!1)},[$,E]),M=i.useCallback(()=>{!S||!C.current||(C.current.style.opacity="1")},[S]),W=i.useCallback(()=>{C.current&&(C.current.style.opacity="0")},[]),A=v&&l?l:e,D=V({position:"relative",display:"inline-block",overflow:"hidden",width:o,height:s},g?.root,d),T={display:"block",width:"100%",height:"100%",objectFit:"cover",...g?.image},O=m==="loading"&&a;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:Ye(f,h?.root),style:D,onMouseEnter:M,onMouseLeave:W,onClick:z,children:[O&&t.jsx("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:n.colorBgSubtle},children:a===!0?t.jsx("div",{style:{width:"100%",height:"100%",background:`linear-gradient(90deg, ${n.colorBgSubtle} 25%, ${n.colorBgMuted} 50%, ${n.colorBgSubtle} 75%)`,backgroundSize:"200% 100%",animation:"j-image-shimmer 1.5s infinite"}}):a}),m==="error"&&t.jsx("div",{style:{position:"absolute",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"0.5rem",backgroundColor:n.colorBgSubtle,color:n.colorTextSubtle,fontSize:"0.75rem"},children:t.jsx(nu,{})}),m!=="error"&&t.jsx("img",{ref:w,src:A,alt:r,className:h?.image,style:{...T,opacity:m==="loaded"?1:0,transition:"opacity 0.3s"},onLoad:P,onError:H}),S&&m==="loaded"&&t.jsxs("div",{ref:C,className:h?.mask,style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",gap:"0.375rem",backgroundColor:"rgba(0,0,0,0.4)",color:"#fff",fontSize:"0.875rem",cursor:"pointer",opacity:0,transition:"opacity 0.2s",...g?.mask},children:[t.jsx(Xd,{}),"Preview"]})]}),O&&a===!0&&t.jsx("style",{children:"@keyframes j-image-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }"}),S&&!y.isGroup&&t.jsx(Ks,{open:I,src:L??"",alt:r,onClose:F,minScale:E.minScale??1,maxScale:E.maxScale??50,scaleStep:E.scaleStep??.5})]})}function lu({items:e,preview:r=!0,children:o}){const[s,l]=i.useState(new Map),[a,c]=i.useState(-1),[u,f]=i.useState(!1),d=r===!1,h=typeof r=="object"?r:{},m=h.open!==void 0?h.open:u,x=i.useRef(h);x.current=h;const p=i.useRef(e);p.current=e;const b=i.useRef(s);b.current=s;const v=i.useMemo(()=>e?e.map((L,P)=>({id:P,src:typeof L=="string"?L:L.src,alt:typeof L=="string"?void 0:L.alt,previewSrc:void 0})):Array.from(s.entries()).sort((L,P)=>L[0]-P[0]).map(([L,P])=>({id:L,...P})),[e,s]),j=i.useMemo(()=>{const I=h.current;return I!==void 0?I:Math.max(0,v.findIndex(L=>L.id===a))},[v,a,h.current]),C=v[j],w=i.useRef(j);w.current=j;const y=i.useRef(v);y.current=v;const k=i.useCallback((I,L)=>(l(P=>{const H=new Map(P);return H.set(I,L),H}),()=>{l(P=>{const H=new Map(P);return H.delete(I),H})}),[]),B=i.useCallback(I=>{const L=p.current;if(L){const P=b.current.get(I);if(P){const H=L.findIndex(z=>{const F=typeof z=="string"?z:z.src;return F===P.src||F===P.previewSrc});c(H>=0?H:0)}else c(0)}else c(I);x.current.open!==void 0?x.current.onOpenChange?.(!0):f(!0)},[]),R=i.useCallback(()=>{x.current.open!==void 0?x.current.onOpenChange?.(!1):f(!1)},[]),S=i.useCallback(()=>{const I=y.current,L=w.current,P=(L-1+I.length)%I.length,H=I[P];H&&(c(H.id),x.current.onChange?.(P,L))},[]),E=i.useCallback(()=>{const I=y.current,L=w.current,P=(L+1)%I.length,H=I[P];H&&(c(H.id),x.current.onChange?.(P,L))},[]),$=i.useMemo(()=>({isGroup:!0,register:k,open:B,previewDisabled:d}),[k,B,d]);return t.jsxs(Ys.Provider,{value:$,children:[e&&!o?e.map((I,L)=>{const P=typeof I=="string"?I:I.src,H=typeof I=="string"?void 0:I.alt;return t.jsx(_s,{src:P,alt:H,width:"7.5rem",height:"5rem"},L)}):o,!d&&t.jsx(Ks,{open:m,src:C?.previewSrc??C?.src??"",alt:C?.alt,onClose:R,minScale:h.minScale??1,maxScale:h.maxScale??50,scaleStep:h.scaleStep??.5,isGroup:!0,current:j,total:v.length,onPrev:S,onNext:E,countRender:h.countRender})]})}const au=Object.assign(_s,{PreviewGroup:lu}),cu={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1600},du=["xxl","xl","lg","md","sm","xs"];function Xs(e,r){if(typeof e!="object"||e===null)return e;const o=e;for(const s of du)if(r>=cu[s]&&o[s]!==void 0)return o[s]}function uu(){const[e,r]=i.useState(()=>typeof window<"u"?window.innerWidth:1200);return i.useEffect(()=>{if(typeof window>"u")return;const o=()=>r(window.innerWidth);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),e}const fu={small:{headerPadding:"0.5rem 0",cellPadding:"0.375rem 0.75rem",fontSize:"0.8125rem",headerFontSize:"0.875rem"},middle:{headerPadding:"0.75rem 0",cellPadding:"0.75rem 1rem",fontSize:"0.875rem",headerFontSize:"1rem"},large:{headerPadding:"1rem 0",cellPadding:"1rem 1.5rem",fontSize:"1rem",headerFontSize:"1.125rem"}};function hu(e,r,o){const s=[];let l=[],a=0;for(let c=0;c<e.length;c++){const u=e[c],f=typeof u.span=="object"&&u.span!==null?Xs(u.span,o)??1:u.span??1,d=Math.min(f,r);if(a+d>r&&l.length>0){const h=r-a;h>0&&l.length>0&&(l[l.length-1].resolvedSpan+=h),s.push(l),l=[],a=0}l.push({...u,resolvedSpan:d}),a+=d}if(l.length>0){const c=r-a;c>0&&(l[l.length-1].resolvedSpan+=c),s.push(l)}return s}function pu(e){return null}function gu({items:e,title:r,extra:o,bordered:s=!1,column:l=3,layout:a="horizontal",colon:c=!0,size:u="middle",labelStyle:f,contentStyle:d,children:h,className:g,style:m,classNames:x,styles:p}){const b=uu(),v=fu[u],j=a==="vertical",C=typeof l=="object"&&l!==null?Xs(l,b)??3:l,w=e??(()=>{const W=[];return i.Children.forEach(h,A=>{if(!i.isValidElement(A))return;const D=A.props;D.itemKey!==void 0&&W.push({key:D.itemKey,label:D.label,children:D.children,span:D.span,labelStyle:D.labelStyle,contentStyle:D.contentStyle})}),W})(),y=hu(w,C,b),k=V({width:"100%",overflowX:"auto"},p?.root,m),B=r||o,R=V({display:"flex",alignItems:"center",justifyContent:"space-between",gap:"1rem",padding:v.headerPadding,marginBottom:"0.75rem"},p?.header),S=V({flex:1,minWidth:0,fontSize:v.headerFontSize,fontWeight:600,color:n.colorText,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},p?.title),E=V({flexShrink:0,fontSize:v.fontSize,color:n.colorTextMuted},p?.extra),$="0.5rem",I=V({width:"100%",minWidth:s?`${C*200}px`:`${C*150}px`,fontSize:v.fontSize,...s?{borderCollapse:"separate",borderSpacing:0,borderTop:`1px solid ${n.colorBorder}`,borderLeft:`1px solid ${n.colorBorder}`,borderRight:"none",borderBottom:"none",borderRadius:$}:{borderCollapse:"collapse"}},p?.table),L={padding:v.cellPadding,color:n.colorTextMuted,fontWeight:500,textAlign:"left",verticalAlign:"top",...s?{backgroundColor:n.colorBgSubtle,borderBottom:`1px solid ${n.colorBorder}`,borderRight:`1px solid ${n.colorBorder}`}:{},...!s&&!j?{whiteSpace:"nowrap",paddingRight:"0.5rem"}:{}},P={padding:v.cellPadding,color:n.colorText,verticalAlign:"top",...s?{borderBottom:`1px solid ${n.colorBorder}`,borderRight:`1px solid ${n.colorBorder}`}:{}},H={},z=j?C:C*2,F=(W,A,D)=>{const T=s&&A===0,O=s&&A===D-1;return t.jsx("tr",{className:x?.row,style:V(H,p?.row),children:W.map((Y,X)=>{const K=X===0,G=X===W.length-1,Q={...T&&K?{borderTopLeftRadius:$}:{},...O&&K?{borderBottomLeftRadius:$}:{}},N={...T&&G?{borderTopRightRadius:$}:{},...O&&G?{borderBottomRightRadius:$}:{}},le={...L,...f,...Y.labelStyle,...Q},re={...P,...d,...Y.contentStyle,...N},q=Y.resolvedSpan>1?Y.resolvedSpan*2-1:1;return[t.jsxs("th",{className:Ye(x?.label,void 0),style:V(le,p?.label),children:[Y.label,c&&Y.label?":":""]},`${Y.key}-label`),t.jsx("td",{colSpan:q>1?q:void 0,className:Ye(x?.content,void 0),style:V(re,p?.content),children:Y.children},`${Y.key}-content`)]})},A)},M=(W,A,D)=>{const T=s&&A===0,O=s&&A===D-1;return t.jsxs(t.Fragment,{children:[t.jsx("tr",{className:x?.row,style:V(H,p?.row),children:W.map((Y,X)=>{const K=X===0,G=X===W.length-1,Q={...T&&K?{borderTopLeftRadius:$}:{},...T&&G?{borderTopRightRadius:$}:{}},N={...L,...f,...Y.labelStyle,...Q};return t.jsxs("th",{colSpan:Y.resolvedSpan>1?Y.resolvedSpan:void 0,className:Ye(x?.label,void 0),style:V(N,p?.label),children:[Y.label,c&&Y.label?":":""]},`${Y.key}-label`)})},`${A}-labels`),t.jsx("tr",{className:x?.row,style:V(H,p?.row),children:W.map((Y,X)=>{const K=X===0,G=X===W.length-1,Q={...O&&K?{borderBottomLeftRadius:$}:{},...O&&G?{borderBottomRightRadius:$}:{}},N={...P,...d,...Y.contentStyle,...Q};return t.jsx("td",{colSpan:Y.resolvedSpan>1?Y.resolvedSpan:void 0,className:Ye(x?.content,void 0),style:V(N,p?.content),children:Y.children},`${Y.key}-content`)})},`${A}-values`)]})};return t.jsxs("div",{className:Ye(g,x?.root),style:k,children:[B&&t.jsxs("div",{className:x?.header,style:R,children:[r&&t.jsx("div",{className:x?.title,style:S,children:r}),o&&t.jsx("div",{className:x?.extra,style:E,children:o})]}),t.jsxs("table",{className:x?.table,style:I,children:[t.jsx("colgroup",{children:j?Array.from({length:C},(W,A)=>t.jsx("col",{style:{width:`${100/C}%`}},A)):Array.from({length:z},(W,A)=>t.jsx("col",{},A))}),t.jsx("tbody",{children:y.map((W,A)=>j?M(W,A,y.length):F(W,A,y.length))})]})]})}const mu=Object.assign(gu,{Item:pu});function xu(e){return e?Array.isArray(e)?e:[e]:["onChange"]}function zt(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e.source,e.flags);if(Array.isArray(e))return e.map(zt);const r={};for(const o of Object.keys(e))r[o]=zt(e[o]);return r}function yu({color:e}){const r=i.useRef(null);return i.useEffect(()=>{const o=r.current;if(!o)return;let s=0,l;const a=()=>{s=(s+4)%360,o.style.transform=`rotate(${s}deg)`,l=requestAnimationFrame(a)};return l=requestAnimationFrame(a),()=>cancelAnimationFrame(l)},[]),t.jsx("svg",{ref:r,viewBox:"0 0 1024 1024",width:"14",height:"14",fill:e,style:{flexShrink:0},children:t.jsx("path",{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.3 199.3 0 19.9-16.1 36-36 36z"})})}function bu({status:e}){return e==="success"?t.jsx("svg",{viewBox:"64 64 896 896",width:"14",height:"14",fill:n.colorSuccess,style:{flexShrink:0},children:t.jsx("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})}):e==="error"?t.jsx("svg",{viewBox:"64 64 896 896",width:"14",height:"14",fill:n.colorError,style:{flexShrink:0},children:t.jsx("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"})}):e==="warning"?t.jsx("svg",{viewBox:"64 64 896 896",width:"14",height:"14",fill:n.colorWarning,style:{flexShrink:0},children:t.jsx("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"})}):e==="validating"?t.jsx(yu,{color:n.colorPrimary}):null}class wt{values={};initialValues={};subscribers=new Map;globalSubscribers=new Set;touchedFields=new Set;fieldErrors=new Map;fieldWarnings=new Map;validatingFields=new Set;rules=new Map;onValuesChange;onFieldsChange;localeMessages;static toPathArray(r){return Array.isArray(r)?r:typeof r=="number"?[r]:String(r).split(".")}static toPathKey(r){return wt.toPathArray(r).join(".")}static getNestedValue(r,o){let s=r;for(const l of o){if(s==null)return;s=s[l]}return s}static setNestedValue(r,o,s){if(o.length===0)return s;const l=Array.isArray(r)?[...r]:{...r},[a,...c]=o;return c.length===0?l[a]=s:l[a]=wt.setNestedValue(l[a]??(typeof c[0]=="number"?[]:{}),c,s),l}setInitialValues(r,o){this.initialValues=zt(r),o&&(this.values=zt(r))}setOnValuesChange(r){this.onValuesChange=r}setOnFieldsChange(r){this.onFieldsChange=r}getFieldValue(r){const o=wt.toPathArray(r);return wt.getNestedValue(this.values,o)}getFieldsValue(r){if(!r||r===!0)return zt(this.values);const o={};for(const s of r){const l=wt.toPathKey(s);o[l]=this.getFieldValue(s)}return o}setFieldValue(r,o){const s=wt.toPathArray(r);if(this.values=wt.setNestedValue(this.values,s,o),this.notify(r),this.notifyGlobal(),this.onValuesChange){const l={};l[wt.toPathKey(r)]=o,this.onValuesChange(l,zt(this.values))}if(this.onFieldsChange){const l=wt.toPathKey(r),a={name:s,value:o,touched:this.touchedFields.has(l),validating:this.validatingFields.has(l),errors:this.fieldErrors.get(l)||[],warnings:this.fieldWarnings.get(l)||[]};this.onFieldsChange([a],this.getFieldsData())}}setFieldsValue(r){const o=(s,l)=>{if(l===null||typeof l!="object"||Array.isArray(l))return l;const a={...s};for(const c of Object.keys(l))a[c]=o(a[c],l[c]);return a};this.values=o(this.values,r),this.notifyAll(),this.onValuesChange&&this.onValuesChange(zt(r),zt(this.values)),this.onFieldsChange&&this.onFieldsChange(this.getFieldsData(),this.getFieldsData())}setFields(r){for(const o of r){const s=o.name,l=wt.toPathKey(s);o.value!==void 0&&(this.values=wt.setNestedValue(this.values,s,o.value)),o.touched!==void 0&&(o.touched?this.touchedFields.add(l):this.touchedFields.delete(l)),o.errors&&this.fieldErrors.set(l,o.errors),o.warnings&&this.fieldWarnings.set(l,o.warnings),this.notify(s)}this.notifyGlobal()}getFieldsData(){const r=[];for(const o of this.rules.keys()){const s=o.split(".");r.push({name:s,value:this.getFieldValue(s),touched:this.touchedFields.has(o),validating:this.validatingFields.has(o),errors:this.fieldErrors.get(o)||[],warnings:this.fieldWarnings.get(o)||[]})}return r}subscribe(r,o){const s=wt.toPathKey(r);return this.subscribers.has(s)||this.subscribers.set(s,new Set),this.subscribers.get(s).add(o),()=>{this.subscribers.get(s)?.delete(o)}}subscribeAll(r){return this.globalSubscribers.add(r),()=>{this.globalSubscribers.delete(r)}}notify(r){const o=wt.toPathKey(r);this.subscribers.get(o)?.forEach(s=>s())}notifyAll(){this.subscribers.forEach(r=>r.forEach(o=>o())),this.notifyGlobal()}notifyGlobal(){this.globalSubscribers.forEach(r=>r())}touchField(r){this.touchedFields.add(wt.toPathKey(r))}isFieldTouched(r){return this.touchedFields.has(wt.toPathKey(r))}isFieldsTouched(r,o=!1){if(!r)return this.touchedFields.size>0;const s=r.map(l=>wt.toPathKey(l));return o?s.every(l=>this.touchedFields.has(l)):s.some(l=>this.touchedFields.has(l))}getFieldError(r){return this.fieldErrors.get(wt.toPathKey(r))||[]}getFieldWarning(r){return this.fieldWarnings.get(wt.toPathKey(r))||[]}getFieldsError(r){return(r?r.map(s=>wt.toPathKey(s)):Array.from(this.rules.keys())).map(s=>({name:s.split("."),errors:this.fieldErrors.get(s)||[],warnings:this.fieldWarnings.get(s)||[]}))}isFieldValidating(r){return this.validatingFields.has(wt.toPathKey(r))}registerRules(r,o){this.rules.set(wt.toPathKey(r),o)}unregisterField(r){const o=wt.toPathKey(r);this.rules.delete(o),this.fieldErrors.delete(o),this.fieldWarnings.delete(o),this.validatingFields.delete(o),this.touchedFields.delete(o)}async validateField(r,o){const s=wt.toPathKey(r),l=this.rules.get(s)||[];if(l.length===0)return this.fieldErrors.delete(s),this.fieldWarnings.delete(s),this.notify(r),[];let a=this.getFieldValue(r);this.validatingFields.add(s),this.notify(r);const c=[],u=[];for(const f of l)try{let d=a;if(f.transform&&(d=f.transform(d)),f.required&&(d==null||d===""||Array.isArray(d)&&d.length===0))throw new Error(typeof f.message=="string"?f.message:this.localeMessages?.defaultRequiredMessage??"This field is required");if(d==null||d==="")continue;if(f.type==="email"&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(d)))throw new Error(typeof f.message=="string"?f.message:"Not a valid email");if(f.type==="url")try{new URL(String(d))}catch{throw new Error(typeof f.message=="string"?f.message:"Not a valid URL")}if(f.type==="number"&&typeof d!="number")throw new Error(typeof f.message=="string"?f.message:"Must be a number");if(f.type==="integer"&&(typeof d!="number"||!Number.isInteger(d)))throw new Error(typeof f.message=="string"?f.message:"Must be an integer");if(f.type==="float"&&typeof d!="number")throw new Error(typeof f.message=="string"?f.message:"Must be a number");if(f.type==="boolean"&&typeof d!="boolean")throw new Error(typeof f.message=="string"?f.message:"Must be a boolean");if(f.min!==void 0){if(typeof d=="string"&&d.length<f.min)throw new Error(typeof f.message=="string"?f.message:`Must be at least ${f.min} characters`);if(typeof d=="number"&&d<f.min)throw new Error(typeof f.message=="string"?f.message:`Must be at least ${f.min}`);if(Array.isArray(d)&&d.length<f.min)throw new Error(typeof f.message=="string"?f.message:`Must have at least ${f.min} items`)}if(f.max!==void 0){if(typeof d=="string"&&d.length>f.max)throw new Error(typeof f.message=="string"?f.message:`Must be at most ${f.max} characters`);if(typeof d=="number"&&d>f.max)throw new Error(typeof f.message=="string"?f.message:`Must be at most ${f.max}`);if(Array.isArray(d)&&d.length>f.max)throw new Error(typeof f.message=="string"?f.message:`Must have at most ${f.max} items`)}if(f.len!==void 0&&(typeof d=="string"||Array.isArray(d)?d.length:0)!==f.len)throw new Error(typeof f.message=="string"?f.message:`Must be exactly ${f.len} characters`);if(f.pattern&&!f.pattern.test(String(d)))throw new Error(typeof f.message=="string"?f.message:this.localeMessages?.defaultPatternMessage??"Does not match the required pattern");if(f.whitespace&&typeof d=="string"&&!d.trim())throw new Error(typeof f.message=="string"?f.message:"Cannot be only whitespace");if(f.enum&&!f.enum.includes(d))throw new Error(typeof f.message=="string"?f.message:`Must be one of: ${f.enum.join(", ")}`);f.validator&&await f.validator(f,d)}catch(d){const h=d?.message||String(d);if(f.warningOnly)u.push(h);else if(c.push(h),o?.validateFirst)break}return this.fieldErrors.set(s,c),this.fieldWarnings.set(s,u),this.validatingFields.delete(s),this.notify(r),c}async validateFields(r,o){const s=r?r.map(a=>wt.toPathKey(a)):Array.from(this.rules.keys()),l=[];for(const a of s){const c=a.split("."),u=await this.validateField(c);u.length>0&&l.push({name:c,errors:u,warnings:this.fieldWarnings.get(a)||[]})}if(o?.validateOnly){if(l.length>0)throw{values:zt(this.values),errorFields:l};return zt(this.values)}if(l.length>0)throw{values:zt(this.values),errorFields:l};return zt(this.values)}resetFields(r){if(!r)this.values=zt(this.initialValues),this.touchedFields.clear(),this.fieldErrors.clear(),this.fieldWarnings.clear(),this.validatingFields.clear(),this.notifyAll();else for(const o of r){const s=wt.toPathArray(o),l=wt.toPathKey(o),a=wt.getNestedValue(this.initialValues,s);this.values=wt.setNestedValue(this.values,s,a!==void 0?zt(a):void 0),this.touchedFields.delete(l),this.fieldErrors.delete(l),this.fieldWarnings.delete(l),this.validatingFields.delete(l),this.notify(o)}}scrollToField(r,o){const s=wt.toPathKey(r),l=document.querySelector(`[data-field-name="${s}"]`);l&&l.scrollIntoView({behavior:"smooth",block:"nearest",...o})}}const Ar=i.createContext(null),Do=i.createContext(null),Gs=i.createContext(null);function Xo(e){const r=i.useRef(null);r.current||(r.current=new wt);const o=i.useMemo(()=>{const s=r.current;return{getFieldValue:l=>s.getFieldValue(l),getFieldsValue:l=>s.getFieldsValue(l),setFieldValue:(l,a)=>s.setFieldValue(l,a),setFieldsValue:l=>s.setFieldsValue(l),validateFields:(l,a)=>s.validateFields(l,a),resetFields:l=>s.resetFields(l),isFieldTouched:l=>s.isFieldTouched(l),isFieldsTouched:(l,a)=>s.isFieldsTouched(l,a),getFieldError:l=>s.getFieldError(l),getFieldsError:l=>s.getFieldsError(l),submit:()=>{},scrollToField:(l,a)=>s.scrollToField(l,a),isFieldValidating:l=>s.isFieldValidating(l),getFieldsData:()=>s.getFieldsData(),_getStore:()=>s}},[]);return e?[e]:[o]}function Us(e,r){const o=i.useContext(Ar),s=r||o?.form,[l,a]=i.useState(()=>s?.getFieldValue(e));return i.useEffect(()=>{if(!s)return;const c=s._getStore();return a(c.getFieldValue(e)),c.subscribe(e,()=>{a(c.getFieldValue(e))})},[s,wt.toPathKey(e)]),l}function qs(){const e=i.useContext(Ar);if(!e)throw new Error("useFormInstance must be used within a <Form>");return e.form}function vu({onFormFinish:e,onFormChange:r,children:o}){const s=i.useRef({}),l=i.useMemo(()=>({registerForm:(a,c)=>{s.current[a]=c},unregisterForm:a=>{delete s.current[a]},onFormFinish:e,onFormChange:r}),[e,r]);return t.jsx(Gs.Provider,{value:l,children:o})}function Cu({form:e,name:r,layout:o="horizontal",variant:s="outlined",size:l,initialValues:a,onFinish:c,onFinishFailed:u,onValuesChange:f,onFieldsChange:d,fields:h,validateTrigger:g="onChange",colon:m=!0,labelAlign:x="left",labelWrap:p=!1,requiredMark:b=!0,disabled:v,scrollToFirstError:j=!1,children:C,className:w,style:y,classNames:k,styles:B}){const{componentSize:R,componentDisabled:S,locale:E}=Gt(),$=l??R??"middle",I=v??S??!1,[L]=Xo(e),P=L._getStore(),H=i.useContext(Gs);P.localeMessages=E.Form;const z=i.useRef(!1);!z.current&&a&&(P.setInitialValues(a,!0),z.current=!0),i.useEffect(()=>{if(r&&H)return H.registerForm(r,L),()=>H.unregisterForm(r)},[r,H,L]),i.useEffect(()=>(P.setOnValuesChange(f),()=>P.setOnValuesChange(void 0)),[f,P]),i.useEffect(()=>{const A=d?(D,T)=>{d(D,T),r&&H?.onFormChange&&H.onFormChange(r,{changedFields:D,forms:{}})}:void 0;return P.setOnFieldsChange(A),()=>P.setOnFieldsChange(void 0)},[d,P,r,H]),i.useEffect(()=>{h&&P.setFields(h)},[h,P]);const F=i.useCallback(async A=>{A?.preventDefault();try{const D=await P.validateFields();c?.(D),r&&H?.onFormFinish&&H.onFormFinish(r,{values:D,forms:{}})}catch(D){if(u?.(D),j&&D.errorFields?.length>0){const T=D.errorFields[0];P.scrollToField(T.name,typeof j=="object"?j:void 0)}}},[P,c,u,j,r,H]);i.useEffect(()=>{L.submit=()=>F()},[L,F]);const M=i.useMemo(()=>({form:L,layout:o,variant:s,size:$,colon:m,labelAlign:x,labelWrap:p,requiredMark:b,disabled:I,validateTrigger:g}),[L,o,s,$,m,x,p,b,I,g]),W={...o==="inline"?{display:"flex",flexWrap:"wrap",gap:"1rem",alignItems:"flex-start"}:{}};return t.jsx(Ar.Provider,{value:M,children:t.jsx("form",{name:r,onSubmit:F,className:Ye(w,k?.root),style:V(W,B?.root,y),children:C})})}function ku({name:e,label:r,layout:o,rules:s,dependencies:l,validateTrigger:a,validateFirst:c=!1,validateDebounce:u,valuePropName:f="value",trigger:d="onChange",getValueFromEvent:h,getValueProps:g,normalize:m,shouldUpdate:x,noStyle:p=!1,hidden:b=!1,required:v,colon:j,labelAlign:C,hasFeedback:w=!1,help:y,extra:k,validateStatus:B,initialValue:R,children:S,className:E,style:$,classNames:I,styles:L}){const P=i.useContext(Ar),H=i.useContext(Do),z=P.form._getStore(),F=i.useMemo(()=>{if(e===void 0)return;const ie=wt.toPathArray(e);return H?[...H.prefixPath,...ie]:ie},[e,H]),M=F?wt.toPathKey(F):void 0,[,W]=i.useState(0),A=i.useCallback(()=>W(ie=>ie+1),[]),D=i.useRef(null);i.useEffect(()=>{if(!F)return;s&&z.registerRules(F,s),R!==void 0&&z.getFieldValue(F)===void 0&&z.setFieldValue(F,R);const ie=z.subscribe(F,A);return()=>{ie(),z.unregisterField(F),D.current&&clearTimeout(D.current)}},[M]),i.useEffect(()=>{F&&s&&z.registerRules(F,s)},[s]),i.useEffect(()=>{if(!l||l.length===0)return;const ie=l.map(ce=>z.subscribe(ce,()=>{F&&z.validateField(F,{validateFirst:c}),A()}));return()=>ie.forEach(ce=>ce())},[l,z,F,A,c]),i.useEffect(()=>{if(x){if(x===!0)return z.subscribeAll(A);if(typeof x=="function"){let ie=zt(z.getFieldsValue());return z.subscribeAll(()=>{const ce=z.getFieldsValue();x(ie,ce)&&A(),ie=zt(ce)})}}},[x,z,A]);const T=F?z.getFieldValue(F):void 0,O=F?z.getFieldError(F):[],Y=F?z.getFieldWarning(F):[],X=F?z.isFieldTouched(F):!1,K=F?z.isFieldValidating(F):!1,G=B??(K?"validating":O.length>0?"error":Y.length>0?"warning":X?"success":""),Q=G==="error"?"error":G==="warning"?"warning":void 0,N=v??s?.some(ie=>ie.required)??!1,le=j??P.colon,re=o??P.layout,q=xu(a??P.validateTrigger),_=i.useCallback(ie=>{u&&u>0?(D.current&&clearTimeout(D.current),D.current=setTimeout(()=>{z.validateField(ie,{validateFirst:c})},u)):z.validateField(ie,{validateFirst:c})},[z,u,c]),J=i.useCallback(()=>{if(!F)return{};let ie=T;ie===void 0&&(ie=f==="checked"?!1:"");const ce=g?g(ie):{[f]:ie};ce[d]=(...He)=>{let Pe;if(h)Pe=h(...He);else{const Ge=He[0];Ge&&typeof Ge=="object"&&Ge.target?Pe=f==="checked"?Ge.target.checked:Ge.target.value:Pe=Ge}m&&(Pe=m(Pe,T,z.getFieldsValue())),z.setFieldValue(F,Pe),z.touchField(F),q.includes(d)&&_(F)};for(const He of q)if(He!==d){const Pe=ce[He];ce[He]=(...Ge)=>{Pe?.(...Ge),F&&_(F)}}return P.disabled&&(ce.disabled=!0),Q&&(ce.status=Q),P.variant!=="outlined"&&(ce.variant=P.variant),P.size!=="middle"&&(ce.size=P.size),ce},[F,T,f,d,h,g,m,q,P.disabled,P.variant,P.size,Q,z,_]),Te=()=>{if(typeof S=="function"){const ce={value:T,[d]:J()[d]};return S(ce,{touched:X,validating:K,errors:O,warnings:Y,name:F||[]},P.form)}if(!F)return S;const ie=i.Children.only(S);return i.cloneElement(ie,J())};if(p)return t.jsx(t.Fragment,{children:Te()});if(b)return null;const ke=re==="horizontal",Ie={marginBottom:re==="inline"?0:"1.5rem",...ke?{display:"flex",flexDirection:"row",alignItems:"flex-start"}:{display:"flex",flexDirection:"column"}},fe=P.requiredMark,ze=typeof fe=="function",me={fontSize:"0.875rem",lineHeight:"2rem",color:n.colorText,...ke?{display:"flex",alignItems:"baseline",gap:"0.125rem",flexShrink:0,paddingRight:"0.75rem",boxSizing:"border-box",maxWidth:"50%"}:{marginBottom:"0.25rem"}},he=ke?P.labelWrap?{whiteSpace:"normal",wordBreak:"break-word"}:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:{},Le={flex:1,minWidth:0},De=y!==void 0?[y]:O.length>0?O:Y.length>0?Y:[],Be={fontSize:"0.75rem",lineHeight:"1.25rem",color:G==="error"?n.colorError:G==="warning"?n.colorWarning:n.colorTextMuted,marginTop:"0.25rem",transition:"color 0.2s ease"},we={fontSize:"0.75rem",lineHeight:"1.25rem",color:n.colorTextMuted,marginTop:"0.25rem"},ee=typeof fe=="object"&&"position"in fe&&fe.position==="prefix",ae=()=>fe===!1?null:fe==="optional"&&!N?t.jsx("span",{style:{color:n.colorTextMuted,fontSize:"0.75rem",fontWeight:400},children:"(optional)"}):N?t.jsx("span",{style:{color:n.colorError},children:"*"}):null,se=le&&r?":":"",Se=r!==void 0?ae():null;return t.jsxs("div",{className:Ye(E,I?.root),style:V(Ie,L?.root,$),"data-field-name":M,children:[r!==void 0&&t.jsx("label",{className:I?.label,style:V(me,L?.label),children:ze?t.jsx("span",{style:he,children:fe(t.jsxs(t.Fragment,{children:[r,se]}),{required:N})}):ke?t.jsxs(t.Fragment,{children:[ee&&Se&&t.jsx("span",{style:{flexShrink:0},children:Se}),t.jsxs("span",{style:he,children:[r,se]}),!ee&&Se&&t.jsx("span",{style:{flexShrink:0},children:Se})]}):t.jsxs(t.Fragment,{children:[ee&&Se&&t.jsx("span",{style:{marginRight:"0.25rem"},children:Se}),r,se,!ee&&Se&&t.jsx("span",{style:{marginLeft:"0.25rem"},children:Se})]})}),t.jsxs("div",{className:I?.control,style:V(Le,L?.control),children:[w&&G?t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[t.jsx("div",{style:{flex:1,minWidth:0},children:Te()}),t.jsx(bu,{status:G})]}):Te(),De.length>0&&t.jsx("div",{className:I?.help,style:V(Be,L?.help),children:De.map((ie,ce)=>t.jsx("div",{children:ie},ce))}),k&&t.jsx("div",{className:I?.extra,style:V(we,L?.extra),children:k})]})]})}function wu({name:e,children:r,initialValue:o}){const s=i.useContext(Ar),l=i.useContext(Do),a=s.form._getStore(),c=i.useMemo(()=>{const p=wt.toPathArray(e);return l?[...l.prefixPath,...p]:p},[e,l]),[,u]=i.useState(0),f=i.useRef(0),d=i.useRef([]),h=i.useRef(!1);h.current||(h.current=!0,o!==void 0&&a.getFieldValue(c)===void 0&&(a.setFieldValue(c,o),d.current=o.map(()=>f.current++))),i.useEffect(()=>a.subscribe(c,()=>u(b=>b+1)),[]);const g=a.getFieldValue(c)||[];for(;d.current.length<g.length;)d.current.push(f.current++);d.current.length>g.length&&(d.current.length=g.length);const m=g.map((p,b)=>({name:b,key:d.current[b]})),x=i.useMemo(()=>({add:(p,b)=>{const j=[...a.getFieldValue(c)||[]],C=b??j.length;j.splice(C,0,p??void 0),d.current.splice(C,0,f.current++),a.setFieldValue(c,j)},remove:p=>{const b=a.getFieldValue(c)||[],v=Array.isArray(p)?p:[p],j=b.filter((C,w)=>!v.includes(w));d.current=d.current.filter((C,w)=>!v.includes(w)),a.setFieldValue(c,j)},move:(p,b)=>{const j=[...a.getFieldValue(c)||[]],[C]=j.splice(p,1);j.splice(b,0,C);const[w]=d.current.splice(p,1);d.current.splice(b,0,w),a.setFieldValue(c,j)}}),[a,c]);return t.jsx(Do.Provider,{value:{prefixPath:c},children:r(m,x,{errors:[]})})}function ju({errors:e,className:r,style:o}){return!e||e.length===0?null:t.jsx("div",{className:r,style:{color:n.colorError,fontSize:"0.75rem",lineHeight:"1.25rem",...o},children:e.map((s,l)=>t.jsx("div",{children:s},l))})}const Su=Object.assign(Cu,{Item:ku,List:wu,ErrorList:ju,Provider:vu,useForm:Xo,useWatch:Us,useFormInstance:qs});function Qs(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{display:"block"},children:[t.jsx("path",{d:"M18 6L6 18"}),t.jsx("path",{d:"M6 6l12 12"})]})}function kn(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("circle",{cx:"11",cy:"11",r:"8"}),t.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}function Mu(){return t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),t.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function Bu(){return t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94"}),t.jsx("path",{d:"M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19"}),t.jsx("path",{d:"M14.12 14.12a3 3 0 11-4.24-4.24"}),t.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]})}function wn(){const e=i.useRef(null);return i.useEffect(()=>{const r=e.current;if(!r)return;let o=0,s;const l=()=>{o=(o+4)%360,r.style.transform=`rotate(${o}deg)`,s=requestAnimationFrame(l)};return s=requestAnimationFrame(l),()=>cancelAnimationFrame(s)},[]),t.jsx("svg",{ref:e,viewBox:"0 0 1024 1024",width:"14",height:"14",fill:"currentColor",style:{flexShrink:0},children:t.jsx("path",{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.3 199.3 0 19.9-16.1 36-36 36z"})})}const ho={small:{height:"1.5rem",fontSize:"0.75rem",paddingH:"0.5rem",paddingV:"0.25rem",radius:"0.25rem"},middle:{height:"2rem",fontSize:"0.875rem",paddingH:"0.75rem",paddingV:"0.5rem",radius:"0.375rem"},large:{height:"2.5rem",fontSize:"1rem",paddingH:"0.75rem",paddingV:"0.5rem",radius:"0.5rem"}};function Go(e,r){switch(e){case"outlined":return{border:`1px solid ${n.colorBorder}`,backgroundColor:n.colorBg,borderRadius:r};case"filled":return{border:"1px solid transparent",backgroundColor:n.colorBgMuted,borderRadius:r};case"borderless":return{border:"1px solid transparent",backgroundColor:"transparent",borderRadius:r};case"underlined":return{border:"none",borderBottom:`1px solid ${n.colorBorder}`,borderRadius:0,backgroundColor:"transparent"}}}function Xt(e){if(e==="error")return n.colorError;if(e==="warning")return n.colorWarning}function Uo(e){return e==="error"?n.colorErrorBg:e==="warning"?n.colorWarningBg:n.colorPrimaryLight}function qo(e){return e==="error"?n.colorError:e==="warning"?n.colorWarning:n.colorPrimary}function Zs(e,r,o){const s=e?.strategy||(f=>f.length),l=e?.max??o,a=e?.exceedFormatter;let c=!1,u;return e?.show===!0?c=!0:typeof e?.show=="function"?(c=!0,u=e.show):r===!0?c=!0:typeof r=="object"&&r.formatter&&(c=!0,u=r.formatter),{show:c,max:l,strategy:s,formatter:u,exceedFormatter:a}}const io=i.forwardRef(function(r,o){const{value:s,defaultValue:l="",placeholder:a,type:c="text",disabled:u,readOnly:f=!1,id:d,autoFocus:h=!1,name:g,autoComplete:m,tabIndex:x,size:p,variant:b="outlined",status:v,prefix:j,suffix:C,addonBefore:w,addonAfter:y,allowClear:k=!1,showCount:B,count:R,maxLength:S,onChange:E,onPressEnter:$,onFocus:I,onBlur:L,onKeyDown:P,className:H,style:z,classNames:F,styles:M}=r,{componentSize:W,componentDisabled:A}=Gt(),D=p??W??"middle",T=u??A??!1,O=s!==void 0,[Y,X]=i.useState(l),K=O?s:Y,[G,Q]=i.useState(!1),N=i.useRef(null),le=i.useRef(null),re=i.useRef(!1),q=i.useRef("keyboard");i.useImperativeHandle(o,()=>({focus:U=>{if(N.current?.focus({preventScroll:U?.preventScroll}),U?.cursor&&N.current){const de=N.current.value.length;switch(U.cursor){case"start":N.current.setSelectionRange(0,0);break;case"end":N.current.setSelectionRange(de,de);break;case"all":N.current.setSelectionRange(0,de);break}}},blur:()=>N.current?.blur(),input:N.current}));const _=Zs(R,B,S),J=i.useCallback(U=>{let de=U.target.value;_.exceedFormatter&&_.max!==void 0&&_.strategy(de)>_.max&&(de=_.exceedFormatter(de,{max:_.max}),U.target.value=de),O||X(de),E?.(U)},[O,E,_]),Te=i.useCallback(U=>{q.current=re.current?"mouse":"keyboard",re.current=!1,Q(!0),I?.(U)},[I]),ke=i.useCallback(U=>{Q(!1),L?.(U)},[L]),Ie=i.useCallback(U=>{U.key==="Enter"&&$?.(U),P?.(U)},[$,P]),fe=i.useCallback(()=>{if(N.current){Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value")?.set?.call(N.current,"");const ue=new Event("input",{bubbles:!0});N.current.dispatchEvent(ue)}O||X(""),E?.({target:{value:""},currentTarget:{value:""}}),N.current?.focus()},[O,E]),ze=i.useCallback(()=>{if(T||G)return;const U=le.current;U&&b!=="borderless"&&(b==="underlined"?U.style.borderBottomColor=Xt(v)||n.colorBorderHover:U.style.borderColor=Xt(v)||n.colorBorderHover)},[T,G,b,v]),me=i.useCallback(()=>{if(T||G)return;const U=le.current;U&&b!=="borderless"&&(b==="underlined"?U.style.borderBottomColor=Xt(v)||n.colorBorder:U.style.borderColor=Xt(v)||(b==="filled"?"transparent":n.colorBorder))},[T,G,b,v]),he=ho[D],Le=!!j,De=!!C||k&&!!K&&!T&&!f,Oe=Xt(v),Be=Uo(v),we=qo(v),ee={display:"inline-flex",alignItems:"center",width:"100%",height:he.height,fontSize:he.fontSize,fontFamily:"inherit",lineHeight:he.height,transition:"border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",boxSizing:"border-box",...Go(b,he.radius),...b==="underlined"?{borderBottomColor:G&&!T?we:Oe||n.colorBorder}:{borderColor:G&&!T&&b!=="borderless"?we:Oe||(b==="borderless"||b==="filled"?"transparent":n.colorBorder)},boxShadow:G&&!T&&q.current==="keyboard"?b==="underlined"?`0 1px 0 0 ${we}`:`0 0 0 2px ${Be}`:"none",...T?{opacity:.6,cursor:"not-allowed"}:{}},ae={flex:1,minWidth:0,width:"100%",height:"100%",padding:0,paddingLeft:Le?0:he.paddingH,paddingRight:De?0:he.paddingH,fontSize:"inherit",fontFamily:"inherit",lineHeight:"inherit",border:"none",outline:"none",backgroundColor:"transparent",color:T?n.colorTextSubtle:n.colorText,cursor:T?"not-allowed":void 0,boxSizing:"border-box"},se={display:"inline-flex",alignItems:"center",paddingLeft:he.paddingH,paddingRight:"0.25rem",color:n.colorTextMuted,flexShrink:0},Se={display:"inline-flex",alignItems:"center",paddingRight:he.paddingH,paddingLeft:"0.25rem",color:n.colorTextMuted,flexShrink:0,gap:"0.25rem"},ie={display:"flex",alignItems:"center",justifyContent:"center",width:"1.75rem",height:"1.75rem",margin:"-0.25rem",borderRadius:"50%",cursor:"pointer",color:n.colorTextMuted,transition:"color 0.15s ease",padding:0,border:"none",background:"none",lineHeight:1},ce=_.strategy(K),He=_.max!==void 0&&(ce>_.max||!!_.exceedFormatter&&ce>=_.max),Pe=()=>{if(!_.show)return null;let U;_.formatter?U=_.formatter({value:K,count:ce,maxLength:_.max}):_.max!==void 0?U=`${ce} / ${_.max}`:U=`${ce}`;const de={fontSize:"0.75rem",lineHeight:"1.25rem",color:He?n.colorError:n.colorTextMuted,whiteSpace:"nowrap",marginLeft:"0.25rem",flexShrink:0};return t.jsx("span",{className:F?.count,style:V(de,M?.count),children:U})},Ge=k&&!!K&&!T&&!f,Ne=typeof k=="object"?k.clearIcon:t.jsx(Qs,{}),oe=!!w||!!y,Re={display:"inline-flex",alignItems:"center",padding:`0 ${he.paddingH}`,height:he.height,fontSize:he.fontSize,fontFamily:"inherit",backgroundColor:n.colorBgMuted,border:`1px solid ${Oe||n.colorBorder}`,color:n.colorText,whiteSpace:"nowrap",boxSizing:"border-box"},Ze={...Re,borderRight:"none",borderRadius:`${he.radius} 0 0 ${he.radius}`},Fe={...Re,borderLeft:"none",borderRadius:`0 ${he.radius} ${he.radius} 0`},et=oe?{borderRadius:0,...w&&!y?{borderRadius:`0 ${he.radius} ${he.radius} 0`}:{},...!w&&y?{borderRadius:`${he.radius} 0 0 ${he.radius}`}:{}}:{},je={...ee,...et},ve=t.jsxs("span",{ref:le,className:F?.input,style:V(je,M?.input),onMouseDown:()=>{re.current=!0},onMouseEnter:ze,onMouseLeave:me,children:[Le&&t.jsx("span",{className:F?.prefix,style:V(se,M?.prefix),children:j}),t.jsx("input",{ref:N,id:d,type:c,name:g,autoComplete:m,tabIndex:x,value:K,placeholder:a,disabled:T,readOnly:f,autoFocus:h,maxLength:S,onChange:J,onFocus:Te,onBlur:ke,onKeyDown:Ie,style:ae}),(De||C||_.show)&&t.jsxs("span",{className:F?.suffix,style:V(Se,M?.suffix),children:[Ge&&t.jsx("button",{type:"button",tabIndex:-1,onClick:fe,style:ie,"aria-label":"Clear",children:Ne}),C,!oe&&Pe()]})]});if(oe){const U={display:"inline-flex",width:"100%",alignItems:"stretch"};return t.jsxs("div",{className:Ye(H,F?.root),style:V(U,M?.root,z),children:[w&&t.jsx("span",{className:F?.addon,style:V(Ze,M?.addon),children:w}),ve,y&&t.jsx("span",{className:F?.addon,style:V(Fe,M?.addon),children:y}),Pe()]})}const xe={display:"inline-flex",flexDirection:"column",width:"100%"};return t.jsx("span",{className:Ye(H,F?.root),style:V(xe,M?.root,z),children:ve})}),Ru=i.forwardRef(function(r,o){const{value:s,defaultValue:l="",placeholder:a,disabled:c,readOnly:u=!1,id:f,autoFocus:d=!1,name:h,tabIndex:g,rows:m,size:x,variant:p="outlined",status:b,autoSize:v=!1,allowClear:j=!1,showCount:C,count:w,maxLength:y,onChange:k,onPressEnter:B,onFocus:R,onBlur:S,onResize:E,className:$,style:I,classNames:L,styles:P}=r,{componentSize:H,componentDisabled:z}=Gt(),F=x??H??"middle",M=c??z??!1,W=s!==void 0,[A,D]=i.useState(l),T=W?s:A,[O,Y]=i.useState(!1),X=i.useRef(null),K=i.useRef(null),G=i.useRef(!1),Q=i.useRef("keyboard");i.useImperativeHandle(o,()=>({focus:ae=>{if(X.current?.focus({preventScroll:ae?.preventScroll}),ae?.cursor&&X.current){const se=X.current.value.length;switch(ae.cursor){case"start":X.current.setSelectionRange(0,0);break;case"end":X.current.setSelectionRange(se,se);break;case"all":X.current.setSelectionRange(0,se);break}}},blur:()=>X.current?.blur(),input:X.current}));const N=Zs(w,C,y),le=i.useCallback(()=>{const ae=X.current;if(!ae||v===!1)return;const se=window.getComputedStyle(ae),Se=parseFloat(se.lineHeight)||20,ie=parseFloat(se.paddingTop)||0,ce=parseFloat(se.paddingBottom)||0,He=parseFloat(se.borderTopWidth)||0,Pe=parseFloat(se.borderBottomWidth)||0;ae.style.minHeight="0",ae.style.height="0",ae.style.overflow="hidden";const Ge=ae.scrollHeight;let Ne=0,oe=1/0;typeof v=="object"&&(v.minRows&&(Ne=v.minRows*Se+ie+ce+He+Pe),v.maxRows&&(oe=v.maxRows*Se+ie+ce+He+Pe));const Re=Math.max(Ne,Math.min(Ge,oe));ae.style.height=`${Re}px`,ae.style.minHeight=Ne>0?`${Ne}px`:"",ae.style.maxHeight=oe!==1/0?`${oe}px`:"",ae.style.overflow=Re<Ge?"auto":"hidden",E?.({width:ae.offsetWidth,height:Re})},[v,E]);i.useLayoutEffect(()=>{le()},[T,le]);const re=i.useCallback(ae=>{let se=ae.target.value;N.exceedFormatter&&N.max!==void 0&&N.strategy(se)>N.max&&(se=N.exceedFormatter(se,{max:N.max}),ae.target.value=se),W||D(se),k?.(ae)},[W,k,N]),q=i.useCallback(ae=>{Q.current=G.current?"mouse":"keyboard",G.current=!1,Y(!0),R?.(ae)},[R]),_=i.useCallback(ae=>{Y(!1),S?.(ae)},[S]),J=i.useCallback(ae=>{ae.key==="Enter"&&!ae.shiftKey&&B?.(ae)},[B]),Te=i.useCallback(()=>{W||D(""),k?.({target:{value:""},currentTarget:{value:""}}),X.current?.focus()},[W,k]),ke=i.useCallback(()=>{if(M||O)return;const ae=K.current;ae&&p!=="borderless"&&(p==="underlined"?ae.style.borderBottomColor=Xt(b)||n.colorBorderHover:ae.style.borderColor=Xt(b)||n.colorBorderHover)},[M,O,p,b]),Ie=i.useCallback(()=>{if(M||O)return;const ae=K.current;ae&&p!=="borderless"&&(p==="underlined"?ae.style.borderBottomColor=Xt(b)||n.colorBorder:ae.style.borderColor=Xt(b)||(p==="filled"?"transparent":n.colorBorder))},[M,O,p,b]),fe=ho[F],ze=Xt(b),me=Uo(b),he=qo(b),Le={position:"relative",display:"flex",flexDirection:"column",width:"100%",transition:"border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",boxSizing:"border-box",...Go(p,fe.radius),...p==="underlined"?{borderBottomColor:O&&!M?he:ze||n.colorBorder}:{borderColor:O&&!M&&p!=="borderless"?he:ze||(p==="borderless"||p==="filled"?"transparent":n.colorBorder)},boxShadow:O&&!M&&Q.current==="keyboard"?p==="underlined"?`0 1px 0 0 ${he}`:`0 0 0 2px ${me}`:"none",...M?{opacity:.6,cursor:"not-allowed"}:{}},De={width:"100%",padding:`${fe.paddingV} ${fe.paddingH}`,fontSize:fe.fontSize,fontFamily:"inherit",lineHeight:"1.375rem",border:"none",outline:"none",backgroundColor:"transparent",color:M?n.colorTextSubtle:n.colorText,cursor:M?"not-allowed":void 0,resize:v?"none":"vertical",boxSizing:"border-box"},Oe=N.strategy(T),Be=N.max!==void 0&&(Oe>N.max||!!N.exceedFormatter&&Oe>=N.max),we=j&&!!T&&!M&&!u,ee=()=>{if(!N.show)return null;let ae;N.formatter?ae=N.formatter({value:T,count:Oe,maxLength:N.max}):N.max!==void 0?ae=`${Oe} / ${N.max}`:ae=`${Oe}`;const se={position:"absolute",bottom:"0.25rem",right:fe.paddingH,fontSize:"0.75rem",lineHeight:"1.25rem",color:Be?n.colorError:n.colorTextMuted,pointerEvents:"none"};return t.jsx("span",{className:L?.count,style:V(se,P?.count),children:ae})};return t.jsxs("div",{className:Ye($,L?.root),style:V({position:"relative",width:"100%"},P?.root,I),children:[t.jsxs("div",{ref:K,style:Le,onMouseDown:()=>{G.current=!0},onMouseEnter:ke,onMouseLeave:Ie,children:[t.jsx("textarea",{ref:X,id:f,name:h,tabIndex:g,value:T,placeholder:a,disabled:M,readOnly:u,autoFocus:d,maxLength:y,rows:v?1:m,onChange:re,onFocus:q,onBlur:_,onKeyDown:J,className:L?.textarea,style:V(De,P?.textarea)}),ee()]}),we&&t.jsx("button",{type:"button",tabIndex:-1,onClick:Te,"aria-label":"Clear",style:{position:"absolute",top:"0.5rem",right:fe.paddingH,display:"flex",alignItems:"center",justifyContent:"center",width:"1.75rem",height:"1.75rem",margin:"-0.25rem",borderRadius:"50%",cursor:"pointer",color:n.colorTextMuted,transition:"color 0.15s ease",padding:0,border:"none",background:"none",lineHeight:1},children:typeof j=="object"?j.clearIcon:t.jsx(Qs,{})})]})}),Tu=i.forwardRef(function(r,o){const{enterButton:s=!1,loading:l=!1,onSearch:a,onPressEnter:c,onChange:u,value:f,defaultValue:d="",suffix:h,styles:g,...m}=r,x=f!==void 0,[p,b]=i.useState(d),v=x?f:p,j=i.useRef(null);i.useImperativeHandle(o,()=>({focus:R=>j.current?.focus(R),blur:()=>j.current?.blur(),input:j.current?.input}));const C=i.useCallback(R=>{x||b(R.target.value),u?.(R)},[x,u]),w=i.useCallback(R=>{a?.(v,R)},[v,a]),y=i.useCallback(R=>{w(R),c?.(R)},[w,c]),k=ho[m.size||"middle"];if(s){const{className:R,style:S,...E}=m,$=s===!0?l?t.jsx(wn,{}):t.jsx(kn,{}):s,I={display:"inline-flex",alignItems:"center",justifyContent:"center",padding:`0 ${k.paddingH}`,border:"none",backgroundColor:n.colorPrimary,color:n.colorPrimaryContrast,cursor:l?"default":"pointer",fontSize:k.fontSize,fontFamily:"inherit",borderRadius:`0 ${k.radius} ${k.radius} 0`,transition:"background-color 0.2s ease",opacity:l?.7:1,gap:"0.25rem",whiteSpace:"nowrap",flexShrink:0};return t.jsxs("div",{className:R,style:{display:"inline-flex",width:"100%",alignItems:"stretch",...S},children:[t.jsx(io,{ref:j,...E,type:"text",value:f,defaultValue:d,onChange:C,onPressEnter:y,suffix:h,styles:{...g,root:{flex:1,minWidth:0,...g?.root},input:{borderRight:"none",borderRadius:`${k.radius} 0 0 ${k.radius}`,...g?.input}}}),t.jsx("button",{type:"button",onClick:L=>!l&&w(L),style:I,onMouseEnter:L=>{l||(L.currentTarget.style.backgroundColor=n.colorPrimaryHover)},onMouseLeave:L=>{L.currentTarget.style.backgroundColor=n.colorPrimary},children:$})]})}const B=t.jsxs("span",{style:{display:"inline-flex",gap:"0.25rem",alignItems:"center"},children:[h,t.jsx("span",{style:{cursor:l?"default":"pointer",display:"inline-flex",alignItems:"center"},onClick:R=>!l&&w(R),children:l?t.jsx(wn,{}):t.jsx(kn,{})})]});return t.jsx(io,{ref:j,...m,type:"text",value:f,defaultValue:d,onChange:C,onPressEnter:y,suffix:B,styles:g})}),Iu=i.forwardRef(function(r,o){const{visibilityToggle:s=!0,iconRender:l,...a}=r,c=typeof s=="object"&&s.visible!==void 0,[u,f]=i.useState(!1),d=c?s.visible:u,h=i.useCallback(()=>{c?s.onVisibleChange(!d):f(p=>!p)},[c,s,d]),g=s!==!1,m=l?l(d):d?t.jsx(Mu,{}):t.jsx(Bu,{}),x=g?t.jsx("span",{onClick:h,style:{cursor:"pointer",display:"inline-flex",alignItems:"center"},children:m}):void 0;return t.jsx(io,{ref:o,...a,type:d?"text":"password",suffix:x})}),Lu=i.forwardRef(function(r,o){const{value:s,defaultValue:l="",onChange:a,length:c=6,disabled:u,size:f,variant:d="outlined",status:h,formatter:g,mask:m,autoFocus:x=!1,className:p,style:b}=r,{componentSize:v,componentDisabled:j}=Gt(),C=f??v??"middle",w=u??j??!1,y=s!==void 0,[k,B]=i.useState(l),R=y?s:k,S=i.useRef([]);i.useImperativeHandle(o,()=>({focus:()=>S.current[0]?.focus(),blur:()=>{S.current.forEach(D=>D?.blur())},input:S.current[0]}));const E=i.useCallback(D=>{y||B(D),a?.(D)},[y,a]),$=Array.from({length:c},(D,T)=>R[T]??""),I=i.useCallback((D,T)=>{let O=T;if(g&&(O=g(O)),!O)return;const Y=[...$];Y[D]=O[0];const X=Y.join("").replace(/\s+$/g,"");E(X),D<c-1&&S.current[D+1]?.focus()},[$,c,g,E]),L=i.useCallback((D,T)=>{if(T.key==="Backspace"){T.preventDefault();const O=[...$];$[D]?(O[D]="",E(O.join("").replace(/\s+$/g,""))):D>0&&(O[D-1]="",E(O.join("").replace(/\s+$/g,"")),S.current[D-1]?.focus())}else T.key==="ArrowLeft"&&D>0?S.current[D-1]?.focus():T.key==="ArrowRight"&&D<c-1&&S.current[D+1]?.focus()},[$,c,E]),P=i.useCallback(D=>{D.preventDefault();let T=D.clipboardData.getData("text");g&&(T=T.split("").map(G=>g(G)).join(""));const O=[...$];for(let G=0;G<T.length&&G<c;G++)O[G]=T[G];const Y=O.join("").replace(/\s+$/g,"");E(Y);const X=O.findIndex(G=>!G),K=X===-1?c-1:Math.min(X,c-1);S.current[K]?.focus()},[$,c,g,E]),H=ho[C],z=Xt(h),F={width:H.height,height:H.height,textAlign:"center",fontSize:H.fontSize,fontFamily:"inherit",outline:"none",transition:"border-color 0.2s ease, box-shadow 0.2s ease",boxSizing:"border-box",color:w?n.colorTextSubtle:n.colorText,...Go(d,H.radius),...z?d==="underlined"?{borderBottomColor:z}:{borderColor:z}:{},...w?{opacity:.6,cursor:"not-allowed"}:{},...m?{WebkitTextSecurity:m===!0?"disc":void 0,fontFamily:m!==!0?"monospace":"inherit"}:{}},M=D=>{const T=qo(h),O=Uo(h);d==="underlined"?(D.currentTarget.style.borderBottomColor=T,D.currentTarget.style.boxShadow=`0 1px 0 0 ${T}`):(D.currentTarget.style.borderColor=T,D.currentTarget.style.boxShadow=`0 0 0 2px ${O}`)},W=D=>{d==="underlined"?(D.currentTarget.style.borderBottomColor=z||n.colorBorder,D.currentTarget.style.boxShadow="none"):(D.currentTarget.style.borderColor=z||(d==="filled"?"transparent":n.colorBorder),D.currentTarget.style.boxShadow="none")},A=D=>!m||!D?D:m===!0?"•":typeof m=="string"?m:D;return t.jsx("div",{className:p,style:{display:"inline-flex",gap:"0.5rem",...b},children:Array.from({length:c},(D,T)=>t.jsx("input",{ref:O=>{S.current[T]=O},type:"text",inputMode:"numeric",maxLength:1,disabled:w,autoFocus:x&&T===0,value:m?A($[T]):$[T],onChange:O=>I(T,O.target.value),onKeyDown:O=>L(T,O),onPaste:T===0?P:void 0,onFocus:O=>{M(O),O.target.select()},onBlur:W,style:F},T))})}),Eu=Object.assign(io,{TextArea:Ru,Search:Tu,Password:Iu,OTP:Lu});function $u(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"18 15 12 9 6 15"})})}function Pu(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"6 9 12 15 18 9"})})}const Du={small:{height:"1.5rem",fontSize:"0.75rem",paddingH:"0.5rem",paddingV:"0.25rem",radius:"0.25rem"},middle:{height:"2rem",fontSize:"0.875rem",paddingH:"0.75rem",paddingV:"0.5rem",radius:"0.375rem"},large:{height:"2.5rem",fontSize:"1rem",paddingH:"0.75rem",paddingV:"0.5rem",radius:"0.5rem"}};function zu(e,r){switch(e){case"outlined":return{border:`1px solid ${n.colorBorder}`,backgroundColor:n.colorBg,borderRadius:r};case"filled":return{border:"1px solid transparent",backgroundColor:n.colorBgMuted,borderRadius:r};case"borderless":return{border:"1px solid transparent",backgroundColor:"transparent",borderRadius:r};case"underlined":return{border:"none",borderBottom:`1px solid ${n.colorBorder}`,borderRadius:0,backgroundColor:"transparent"}}}function Mr(e){if(e==="error")return n.colorError;if(e==="warning")return n.colorWarning}function Wu(e){return e==="error"?n.colorErrorBg:e==="warning"?n.colorWarningBg:n.colorPrimaryLight}function Hu(e){return e==="error"?n.colorError:e==="warning"?n.colorWarning:n.colorPrimary}function Fu(e){const r=String(e),o=r.indexOf(".");return o>=0?r.length-o-1:0}function eo(e,r){const o=Math.pow(10,r);return Math.round(e*o)/o}function Au(e,r,o){return eo(e+r,o)}const Ou=i.forwardRef(function(r,o){const{value:s,defaultValue:l,onChange:a,onStep:c,onPressEnter:u,onFocus:f,onBlur:d,min:h=-1/0,max:g=1/0,step:m=1,precision:x,formatter:p,parser:b,controls:v=!0,keyboard:j=!0,changeOnWheel:C=!1,changeOnBlur:w=!0,stringMode:y=!1,decimalSeparator:k,placeholder:B,disabled:R=!1,readOnly:S=!1,id:E,autoFocus:$=!1,name:I,tabIndex:L,size:P="middle",variant:H="outlined",status:z,prefix:F,suffix:M,addonBefore:W,addonAfter:A,className:D,style:T,classNames:O,styles:Y}=r,X=i.useRef(null),K=i.useRef(null),G=i.useRef(null),Q=i.useRef(null),N=i.useRef(null),le=i.useRef(null),re=i.useRef(!1),q=s!==void 0,[_,J]=i.useState(!1),Te=i.useRef(!1),ke=i.useRef("keyboard"),Ie=x??Fu(m),fe=i.useCallback(ge=>{if(ge==null||ge==="")return null;const _e=typeof ge=="string"?parseFloat(ge):ge;return isNaN(_e)?null:_e},[]),ze=i.useCallback((ge,_e=!1)=>{if(ge==null||ge==="")return"";let qe=typeof ge=="number"?String(ge):ge;if(x!==void 0&&!_e){const rt=typeof ge=="number"?ge:parseFloat(ge);isNaN(rt)||(qe=rt.toFixed(x))}if(p)return p(ge,{userTyping:_e,input:qe});let st=qe;return k&&typeof st=="string"&&(st=st.replace(".",k)),st},[p,k,x]),me=i.useCallback(ge=>{if(b)return b(ge);let _e=ge;return k&&(_e=_e.replace(new RegExp(`\\${k}`,"g"),".")),_e=_e.replace(/[^\d.\-e]/gi,""),_e},[b,k]),he=fe(q?s:void 0),[Le,De]=i.useState(()=>ze(q?s:l));i.useEffect(()=>{q&&!re.current&&De(ze(s))},[s,q,ze]),i.useImperativeHandle(o,()=>({focus:ge=>{if(X.current?.focus(ge),ge?.cursor&&X.current){const _e=X.current.value.length;switch(ge.cursor){case"start":X.current.setSelectionRange(0,0);break;case"end":X.current.setSelectionRange(_e,_e);break;case"all":X.current.setSelectionRange(0,_e);break}}},blur:()=>X.current?.blur(),input:X.current,nativeElement:G.current}));const Oe=i.useCallback(ge=>{if(ge===""||ge==="-"){De(q?ze(s):""),a?.(null);return}const _e=me(ge);let qe=typeof _e=="string"?parseFloat(_e):_e;if(isNaN(qe)){q&&De(ze(s));return}qe=Math.max(h,Math.min(g,qe)),qe=eo(qe,Ie);const st=y?qe.toFixed(Ie):qe;a?.(st),q||De(ze(qe))},[me,h,g,Ie,y,a,q,s,ze]),Be=i.useCallback(ge=>{if(R||S)return;const _e=(()=>{const xt=me(Le),Rt=typeof xt=="string"?parseFloat(xt):xt;return isNaN(Rt)?he!==null?he:0:Rt})(),qe=ge==="up"?m:-m;let st=Au(_e,qe,Ie);st=Math.max(h,Math.min(g,st)),st=eo(st,Ie);const rt=y?st.toFixed(Ie):st;a?.(rt),c?.(st,{offset:Math.abs(m),type:ge}),q||De(ze(st)),re.current=!1},[R,S,me,Le,he,m,Ie,h,g,y,a,c,q,ze]),we=i.useCallback(ge=>{re.current=!0;const _e=ge.target.value;if(De(_e),!w){const qe=me(_e),st=typeof qe=="string"?parseFloat(qe):qe;if(!isNaN(st)){const rt=Math.max(h,Math.min(g,st)),xt=eo(rt,Ie),Rt=y?xt.toFixed(Ie):xt;a?.(Rt)}}},[w,me,h,g,Ie,y,a]),ee=i.useCallback(ge=>{ke.current=Te.current?"mouse":"keyboard",Te.current=!1,J(!0),re.current=!1,f?.(ge)},[f]),ae=i.useCallback(ge=>{J(!1),re.current=!1,w&&Oe(Le),d?.(ge)},[w,Oe,Le,d]),se=i.useCallback(ge=>{ge.key==="Enter"&&(re.current=!1,Oe(Le),u?.(ge)),j&&!R&&!S&&(ge.key==="ArrowUp"?(ge.preventDefault(),Be("up")):ge.key==="ArrowDown"&&(ge.preventDefault(),Be("down")))},[Oe,Le,u,j,R,S,Be]);i.useEffect(()=>{if(!C||!_||R||S)return;const ge=X.current;if(!ge)return;const _e=qe=>{qe.preventDefault(),qe.deltaY<0?Be("up"):qe.deltaY>0&&Be("down")};return ge.addEventListener("wheel",_e,{passive:!1}),()=>ge.removeEventListener("wheel",_e)},[C,_,R,S,Be]);const Se=i.useCallback(ge=>{Be(ge),N.current=setTimeout(()=>{le.current=setInterval(()=>Be(ge),80)},400)},[Be]),ie=i.useCallback(()=>{N.current&&(clearTimeout(N.current),N.current=null),le.current&&(clearInterval(le.current),le.current=null)},[]);i.useEffect(()=>()=>ie(),[ie]);const ce=i.useCallback(()=>{if(R||_)return;const ge=K.current;ge&&H!=="borderless"&&(H==="underlined"?ge.style.borderBottomColor=Mr(z)||n.colorBorderHover:ge.style.borderColor=Mr(z)||n.colorBorderHover)},[R,_,H,z]),He=i.useCallback(()=>{if(R||_)return;const ge=K.current;ge&&H!=="borderless"&&(H==="underlined"?ge.style.borderBottomColor=Mr(z)||n.colorBorder:ge.style.borderColor=Mr(z)||(H==="filled"?"transparent":n.colorBorder))},[R,_,H,z]),Pe=i.useCallback(()=>{ce(),Q.current&&!R&&!S&&(Q.current.style.opacity="1")},[ce,R,S]),Ge=i.useCallback(()=>{He(),Q.current&&!_&&(Q.current.style.opacity="0")},[He,_]);i.useEffect(()=>{Q.current&&(Q.current.style.opacity=_?"1":"0")},[_]);const Ne=Du[P],oe=Mr(z),Re=Hu(z),Ze=Wu(z),Fe=v!==!1&&!S,et=he!==null&&he>=g,je=he!==null&&he<=h,ve=typeof v=="object"?v.upIcon:void 0,xe=typeof v=="object"?v.downIcon:void 0,U=!!W||!!A,de={display:"inline-flex",alignItems:"center",width:"100%",height:Ne.height,fontSize:Ne.fontSize,fontFamily:"inherit",lineHeight:Ne.height,transition:"border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",boxSizing:"border-box",...zu(H,Ne.radius),...H==="underlined"?{borderBottomColor:_&&!R?Re:oe||n.colorBorder}:{borderColor:_&&!R&&H!=="borderless"?Re:oe||(H==="borderless"||H==="filled"?"transparent":n.colorBorder)},boxShadow:_&&!R&&ke.current==="keyboard"?H==="underlined"?`0 1px 0 0 ${Re}`:`0 0 0 2px ${Ze}`:"none",...R?{opacity:.6,cursor:"not-allowed"}:{}},ue=U?{borderRadius:0,...W&&!A?{borderRadius:`0 ${Ne.radius} ${Ne.radius} 0`}:{},...!W&&A?{borderRadius:`${Ne.radius} 0 0 ${Ne.radius}`}:{}}:{},We={...de,...ue},$e={flex:1,minWidth:0,width:"100%",height:"100%",padding:`0 ${Ne.paddingH}`,fontSize:"inherit",fontFamily:"inherit",color:R?n.colorTextSubtle:n.colorText,background:"none",border:"none",outline:"none",cursor:R?"not-allowed":void 0,textAlign:"left",boxSizing:"border-box"},ne={display:"inline-flex",alignItems:"center",paddingLeft:Ne.paddingH,color:n.colorTextMuted,flexShrink:0},be={display:"inline-flex",alignItems:"center",paddingRight:Fe?"0":Ne.paddingH,color:n.colorTextMuted,flexShrink:0},Ke={display:"flex",flexDirection:"column",alignSelf:"stretch",borderLeft:`1px solid ${n.colorBorder}`,opacity:0,transition:"opacity 0.15s ease",flexShrink:0},Qe={display:"flex",alignItems:"center",justifyContent:"center",flex:1,padding:0,border:"none",backgroundColor:"transparent",color:n.colorTextMuted,cursor:"pointer",fontSize:"0.5rem",lineHeight:0,width:"1.25rem",transition:"color 0.15s ease, background-color 0.15s ease"},tt={...Qe,borderBottom:`1px solid ${n.colorBorder}`,borderRadius:`0 ${U&&A?"0":Ne.radius} 0 0`},dt={...Qe,borderRadius:`0 0 ${U&&A?"0":Ne.radius} 0`},ft={display:"inline-flex",alignItems:"center",padding:`0 ${Ne.paddingH}`,height:Ne.height,fontSize:Ne.fontSize,fontFamily:"inherit",backgroundColor:n.colorBgMuted,border:`1px solid ${oe||n.colorBorder}`,color:n.colorText,whiteSpace:"nowrap",boxSizing:"border-box"},gt={...ft,borderRight:"none",borderRadius:`${Ne.radius} 0 0 ${Ne.radius}`},Ct={...ft,borderLeft:"none",borderRadius:`0 ${Ne.radius} ${Ne.radius} 0`},jt=t.jsxs("div",{ref:K,className:O?.input,style:V(We,Y?.input),onMouseDown:()=>{Te.current=!0},onMouseEnter:Pe,onMouseLeave:Ge,children:[F&&t.jsx("span",{className:O?.prefix,style:V(ne,Y?.prefix),children:F}),t.jsx("input",{ref:X,id:E,name:I,type:"text",inputMode:"decimal",autoComplete:"off",tabIndex:L,value:Le,placeholder:B,disabled:R,readOnly:S,autoFocus:$,onChange:we,onFocus:ee,onBlur:ae,onKeyDown:se,style:$e,"aria-valuemin":h!==-1/0?h:void 0,"aria-valuemax":g!==1/0?g:void 0,"aria-valuenow":he??void 0,role:"spinbutton"}),M&&t.jsx("span",{className:O?.suffix,style:V(be,Y?.suffix),children:M}),Fe&&t.jsxs("div",{ref:Q,className:O?.handler,style:V(Ke,Y?.handler),children:[t.jsx("span",{className:O?.handlerUp,style:V(tt,Y?.handlerUp,et||R?{cursor:"not-allowed",color:n.colorTextSubtle}:void 0),onMouseDown:ge=>{ge.preventDefault(),!et&&!R&&Se("up")},onMouseUp:ie,onMouseEnter:ge=>{if(!et&&!R){const _e=ge.currentTarget;_e.style.backgroundColor=n.colorBgMuted,_e.style.color=n.colorPrimary}},onMouseLeave:ge=>{ie();const _e=ge.currentTarget;_e.style.backgroundColor="transparent",_e.style.color=et||R?n.colorTextSubtle:n.colorTextMuted},children:ve||t.jsx($u,{})}),t.jsx("span",{className:O?.handlerDown,style:V(dt,Y?.handlerDown,je||R?{cursor:"not-allowed",color:n.colorTextSubtle}:void 0),onMouseDown:ge=>{ge.preventDefault(),!je&&!R&&Se("down")},onMouseUp:ie,onMouseEnter:ge=>{if(!je&&!R){const _e=ge.currentTarget;_e.style.backgroundColor=n.colorBgMuted,_e.style.color=n.colorPrimary}},onMouseLeave:ge=>{ie();const _e=ge.currentTarget;_e.style.backgroundColor="transparent",_e.style.color=je||R?n.colorTextSubtle:n.colorTextMuted},children:xe||t.jsx(Pu,{})})]})]});if(U){const ge={display:"inline-flex",width:"100%",alignItems:"stretch"};return t.jsxs("div",{ref:G,className:Ye(D,O?.root),style:V(ge,Y?.root,T),children:[W&&t.jsx("span",{className:O?.addon,style:V(gt,Y?.addon),children:W}),jt,A&&t.jsx("span",{className:O?.addon,style:V(Ct,Y?.addon),children:A})]})}const Mt={display:"inline-flex",flexDirection:"column",width:"100%"};return t.jsx("span",{ref:G,className:Ye(D,O?.root),style:V(Mt,Y?.root,T),children:jt})});function Nu(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}const Vu={small:{height:"1.5rem",fontSize:"0.75rem",lineHeight:"1.125rem",paddingH:"0.5rem",paddingV:"0.25rem",radius:"0.25rem"},middle:{height:"2rem",fontSize:"0.875rem",lineHeight:"1.375rem",paddingH:"0.75rem",paddingV:"0.375rem",radius:"0.375rem"},large:{height:"2.5rem",fontSize:"1rem",lineHeight:"1.5rem",paddingH:"0.75rem",paddingV:"0.625rem",radius:"0.5rem"}};function Yu(e,r){switch(e){case"outlined":return{border:`1px solid ${n.colorBorder}`,backgroundColor:n.colorBg,borderRadius:r};case"filled":return{border:"1px solid transparent",backgroundColor:n.colorBgMuted,borderRadius:r};case"borderless":return{border:"1px solid transparent",backgroundColor:"transparent",borderRadius:r};case"underlined":return{border:"none",borderBottom:`1px solid ${n.colorBorder}`,borderRadius:0,backgroundColor:"transparent"}}}function Br(e){if(e==="error")return n.colorError;if(e==="warning")return n.colorWarning}function Ku(e){return e==="error"?n.colorErrorBg:e==="warning"?n.colorWarningBg:n.colorPrimaryLight}function _u(e){return e==="error"?n.colorError:e==="warning"?n.colorWarning:n.colorPrimary}function Xu(e,r){const o=e.toLowerCase();return!!(r.value.toLowerCase().includes(o)||typeof r.label=="string"&&r.label.toLowerCase().includes(o))}function Gu(e,r,o,s){const l=e.slice(0,r),a=[...o].sort((c,u)=>u.length-c.length);for(const c of a){let u=l.length;for(;u>0;){const f=l.lastIndexOf(c,u-1);if(f<0)break;u=f;const d=f>0?l[f-1]:"";if(!(f===0||d===" "||d===`
|
|
120
120
|
`||d===s))continue;const g=l.slice(f+c.length);if(!(g.includes(`
|
|
121
|
-
`)||s!==" "&&g.includes(s))&&!(s===" "&&g.includes(" ")))return{prefix:c,searchText:g,startPos:f}}}return null}const Uu=i.forwardRef(function(r,o){const{value:s,defaultValue:l="",onChange:a,onSelect:c,onSearch:u,onFocus:f,onBlur:d,onPopupScroll:h,options:g=[],prefix:m="@",split:x=" ",filterOption:p=!0,validateSearch:b,notFoundContent:v="No matches",placement:j="bottom",allowClear:C=!1,placeholder:w,disabled:y=!1,readOnly:k=!1,id:B,autoFocus:R=!1,rows:S=1,autoSize:L=!1,resize:$=!1,size:I="middle",variant:P="outlined",status:E,className:H,style:z,classNames:A,styles:M}=r,W=i.useMemo(()=>Array.isArray(m)?m:[m],[m]),F=i.useRef(null),D=i.useRef(null),T=i.useRef(null),O=i.useRef(null),Y=i.useRef(null),X=s!==void 0,[_,G]=i.useState(l),Q=X?s:_,[N,le]=i.useState(!1),oe=i.useRef(!1),q=i.useRef("keyboard"),[K,re]=i.useState(!1),[Te,Ce]=i.useState(-1),[Le,ue]=i.useState(!1),[ze,xe]=i.useState(!1),[ge,Ie]=i.useState("");i.useImperativeHandle(o,()=>({focus:ne=>{if(F.current?.focus({preventScroll:ne?.preventScroll}),ne?.cursor&&F.current){const be=F.current.value.length;switch(ne.cursor){case"start":F.current.setSelectionRange(0,0);break;case"end":F.current.setSelectionRange(be,be);break;case"all":F.current.setSelectionRange(0,be);break}}},blur:()=>F.current?.blur(),textarea:F.current,nativeElement:T.current}));const De=i.useCallback(ne=>{re(ne),ne?(ue(j==="top"),requestAnimationFrame(()=>{requestAnimationFrame(()=>{xe(!0)})})):xe(!1)},[j]),Ae=i.useMemo(()=>{if(p===!1)return g;const ne=typeof p=="function"?p:Xu;return g.filter(be=>ne(ge,be))},[g,ge,p]),Re=Ae.length>0||v!==null,ke=K&&Re&&!y&&!k;i.useEffect(()=>{if(Ae.length>0){const ne=Ae.findIndex(be=>!be.disabled);Ce(ne>=0?ne:-1)}else Ce(-1)},[Ae]),i.useEffect(()=>{R&&F.current&&F.current.focus()},[R]),i.useEffect(()=>{if(!K)return;const ne=be=>{T.current&&!T.current.contains(be.target)&&De(!1)};return document.addEventListener("mousedown",ne),()=>document.removeEventListener("mousedown",ne)},[K,De]),i.useEffect(()=>{if(!ke||Te<0)return;const ne=O.current;if(!ne)return;const be=ne.querySelector(`[data-option-index="${Te}"]`);if(be){const Ye=be.offsetTop,Ze=Ye+be.offsetHeight;Ye<ne.scrollTop?ne.scrollTop=Ye:Ze>ne.scrollTop+ne.clientHeight&&(ne.scrollTop=Ze-ne.clientHeight)}},[Te,ke]);const ee=i.useCallback(()=>{const ne=F.current;if(!ne||L===!1)return;const be=window.getComputedStyle(ne),Ye=parseFloat(be.lineHeight)||20,Ze=parseFloat(be.paddingTop)||0,tt=parseFloat(be.paddingBottom)||0,dt=parseFloat(be.borderTopWidth)||0,ft=parseFloat(be.borderBottomWidth)||0;ne.style.minHeight="0",ne.style.height="0",ne.style.overflow="hidden";const gt=ne.scrollHeight;let Ct=0,jt=1/0;typeof L=="object"&&(L.minRows&&(Ct=L.minRows*Ye+Ze+tt+dt+ft),L.maxRows&&(jt=L.maxRows*Ye+Ze+tt+dt+ft));const Mt=Math.max(Ct,Math.min(gt,jt));ne.style.height=`${Mt}px`,ne.style.minHeight=Ct>0?`${Ct}px`:"",ne.style.maxHeight=jt!==1/0?`${jt}px`:"",ne.style.overflow=Mt<gt?"auto":"hidden"},[L]);i.useLayoutEffect(()=>{ee()},[Q,ee]),i.useLayoutEffect(()=>{if(!K||!O.current||!T.current)return;const ne=O.current.getBoundingClientRect(),be=T.current.getBoundingClientRect(),Ye=be.top,Ze=window.innerHeight-be.bottom;!Le&&ne.bottom>window.innerHeight?Ye>Ze&&ue(!0):Le&&ne.top<0&&Ze>Ye&&ue(!1)});const ae=i.useCallback((ne,be)=>{const Ye=Gu(ne,be,W,x);if(Y.current=Ye,Ye){if(b&&!b(Ye.searchText,r)){De(!1);return}Ie(Ye.searchText),u?.(Ye.searchText,Ye.prefix),K||De(!0)}else De(!1)},[W,x,b,r,u,K,De]),se=i.useCallback(ne=>{if(ne.disabled)return;const be=Y.current;if(!be)return;const Ye=Q.slice(0,be.startPos),Ze=Q.slice(be.startPos+be.prefix.length+be.searchText.length),tt=be.prefix+ne.value+x,dt=Ye+tt+Ze,ft=Ye.length+tt.length;X||G(dt),a?.(dt),c?.(ne,be.prefix),De(!1),Y.current=null,requestAnimationFrame(()=>{F.current&&(F.current.focus(),F.current.setSelectionRange(ft,ft))})},[Q,X,a,c,x,De]),we=i.useCallback(ne=>{const be=ne.target.value;X||G(be),a?.(be);const Ye=ne.target.selectionStart??be.length;ae(be,Ye)},[X,a,ae]),ie=i.useCallback(ne=>{q.current=oe.current?"mouse":"keyboard",oe.current=!1,le(!0),f?.(ne)},[f]),ce=i.useCallback(ne=>{const be=ne.relatedTarget;T.current&&be&&T.current.contains(be)||(le(!1),d?.(ne),De(!1))},[d,De]),He=i.useCallback(ne=>{if(K)switch(ne.key){case"ArrowDown":ne.preventDefault(),Ae.length>0&&Ce(be=>{let Ye=be;for(let Ze=0;Ze<Ae.length;Ze++)if(Ye=(Ye+1)%Ae.length,!Ae[Ye].disabled)return Ye;return be});break;case"ArrowUp":ne.preventDefault(),Ae.length>0&&Ce(be=>{let Ye=be;for(let Ze=0;Ze<Ae.length;Ze++)if(Ye=(Ye-1+Ae.length)%Ae.length,!Ae[Ye].disabled)return Ye;return be});break;case"Enter":Te>=0&&Ae[Te]&&!Ae[Te].disabled&&(ne.preventDefault(),se(Ae[Te]));break;case"Escape":ne.preventDefault(),De(!1);break}},[K,Ae,Te,se,De]),Pe=i.useCallback(()=>{if(F.current){const ne=F.current.selectionStart??0;ae(Q,ne)}},[Q,ae]),Ge=i.useCallback(()=>{X||G(""),a?.(""),De(!1),F.current?.focus()},[X,a,De]),Z=i.useCallback(()=>{if(y||N)return;const ne=D.current;ne&&P!=="borderless"&&(P==="underlined"?ne.style.borderBottomColor=Br(E)||n.colorBorderHover:ne.style.borderColor=Br(E)||n.colorBorderHover)},[y,N,P,E]),Be=i.useCallback(()=>{if(y||N)return;const ne=D.current;ne&&P!=="borderless"&&(P==="underlined"?ne.style.borderBottomColor=Br(E)||n.colorBorder:ne.style.borderColor=Br(E)||(P==="filled"?"transparent":n.colorBorder))},[y,N,P,E]),Oe=Vu[I],Qe=Br(E),_e=Ku(E),et=_u(E),je={position:"relative",display:"flex",flexDirection:"column",width:"100%",transition:"border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",boxSizing:"border-box",...Yu(P,Oe.radius),...P==="underlined"?{borderBottomColor:N&&!y?et:Qe||n.colorBorder}:{borderColor:N&&!y&&P!=="borderless"?et:Qe||(P==="borderless"||P==="filled"?"transparent":n.colorBorder)},boxShadow:N&&!y&&q.current==="keyboard"?P==="underlined"?`0 1px 0 0 ${et}`:`0 0 0 2px ${_e}`:"none",...y?{opacity:.6,cursor:"not-allowed"}:{}},Se={width:"100%",padding:`${Oe.paddingV} ${Oe.paddingH}`,fontSize:Oe.fontSize,fontFamily:"inherit",lineHeight:Oe.lineHeight,border:"none",outline:"none",backgroundColor:"transparent",color:y?n.colorTextSubtle:n.colorText,cursor:y?"not-allowed":void 0,resize:$&&!L?"vertical":"none",boxSizing:"border-box"},me={position:"absolute",left:0,zIndex:1050,width:"100%",maxHeight:"min(16rem, 40vh)",overflowY:"auto",overscrollBehavior:"contain",backgroundColor:n.colorBg,border:`1px solid ${n.colorBorder}`,borderRadius:"0.5rem",boxShadow:n.shadowMd,padding:"0.25rem 0",opacity:ze?1:0,transition:"opacity 0.15s ease-out, transform 0.15s ease-out",...Le?{bottom:"100%",marginBottom:"0.25rem",transform:ze?"translateY(0)":"translateY(6px)"}:{top:"100%",marginTop:"0.25rem",transform:ze?"translateY(0)":"translateY(-6px)"}},U={padding:"0.625rem 0.75rem",minHeight:"2.75rem",fontSize:"0.875rem",cursor:"pointer",transition:"background-color 0.15s ease",display:"flex",alignItems:"center",lineHeight:"1.375rem",boxSizing:"border-box"},he={display:"flex",alignItems:"center",justifyContent:"center",width:"1.75rem",height:"1.75rem",padding:0,border:"none",borderRadius:"50%",backgroundColor:"transparent",color:n.colorTextMuted,cursor:"pointer",transition:"color 0.15s ease, background-color 0.15s ease"},de=C&&!!Q&&!y&&!k,We=()=>Ae.length===0?v===null?null:t.jsx("div",{style:{padding:"0.5rem 0.75rem",fontSize:"0.875rem",color:n.colorTextSubtle,textAlign:"center"},children:v}):Ae.map((ne,be)=>{const Ye=be===Te,Ze={...U,backgroundColor:Ye?n.colorBgMuted:void 0,color:ne.disabled?n.colorTextSubtle:n.colorText,cursor:ne.disabled?"not-allowed":"pointer",opacity:ne.disabled?.5:1,...M?.option};return t.jsx("div",{role:"option","aria-selected":Ye,"aria-disabled":ne.disabled,"data-option-index":be,style:Ze,className:A?.option,onClick:()=>se(ne),onMouseEnter:tt=>{ne.disabled||(Ce(be),tt.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:tt=>{!ne.disabled&&!Ye&&(tt.currentTarget.style.backgroundColor="transparent")},children:ne.label??ne.value},ne.value)}),$e={position:"relative",display:"inline-flex",flexDirection:"column",width:"100%"};return t.jsxs("div",{ref:T,className:Ve(H,A?.root),style:V($e,M?.root,z),children:[t.jsxs("div",{ref:D,style:je,onMouseDown:()=>{oe.current=!0},onMouseEnter:Z,onMouseLeave:Be,children:[t.jsx("textarea",{ref:F,id:B,rows:L?1:S,value:Q,placeholder:w,disabled:y,readOnly:k,autoFocus:R,onChange:we,onFocus:ie,onBlur:ce,onKeyDown:He,onClick:Pe,className:A?.textarea,style:V(Se,M?.textarea),role:"textbox","aria-haspopup":"listbox","aria-expanded":ke,"aria-autocomplete":"list",autoComplete:"off"}),de&&t.jsx("button",{type:"button",style:{...he,position:"absolute",right:"0.25rem",top:"0.25rem"},onMouseDown:ne=>ne.preventDefault(),onClick:Ge,onMouseEnter:ne=>{ne.currentTarget.style.color=n.colorText,ne.currentTarget.style.backgroundColor=n.colorBgMuted},onMouseLeave:ne=>{ne.currentTarget.style.color=n.colorTextMuted,ne.currentTarget.style.backgroundColor="transparent"},tabIndex:-1,"aria-label":"Clear",children:t.jsx(Nu,{})})]}),ke&&t.jsx("div",{ref:O,role:"listbox",style:V(me,M?.dropdown),className:A?.dropdown,onMouseDown:ne=>ne.preventDefault(),onScroll:h,children:We()})]})}),qu={small:{height:"1.5rem",fontSize:"0.75rem",paddingH:"0.5rem",radius:"0.25rem"},middle:{height:"2rem",fontSize:"0.875rem",paddingH:"0.75rem",radius:"0.375rem"},large:{height:"2.5rem",fontSize:"1rem",paddingH:"1rem",radius:"0.5rem"}},Qo=i.createContext(null);function Js({checked:e,defaultChecked:r=!1,disabled:o=!1,autoFocus:s=!1,onChange:l,value:a,children:c,id:u,name:f,tabIndex:d,className:h,style:g,classNames:m,styles:x}){const p=i.useRef(null),b=i.useRef(null),v=i.useRef(!1),j=i.useRef("keyboard"),C=i.useContext(Qo),w=C!==null,y=e!==void 0,[k,B]=i.useState(r);let R,S,L;w?(R=a!==void 0&&C.value===a,S=o||C.disabled,L=C.name||f):(R=y?e:k,S=o,L=f);const[$,I]=i.useState(!1);i.useEffect(()=>{s&&p.current&&p.current.focus()},[]);const P=T=>{if(S)return;const O={target:{checked:T.target.checked,value:a},nativeEvent:T.nativeEvent};w?C.onChange(O):(y||B(T.target.checked),l?.(O))},E=!!(x?.radio&&("backgroundColor"in x.radio||"borderColor"in x.radio||"border"in x.radio)),H=()=>{S||!b.current||(E?b.current.style.filter="brightness(1.15)":R?(b.current.style.backgroundColor=n.colorPrimaryHover,b.current.style.borderColor=n.colorPrimaryHover):b.current.style.borderColor=n.colorPrimary)},z=()=>{S||!b.current||(E?b.current.style.filter="":R?(b.current.style.backgroundColor=n.colorPrimary,b.current.style.borderColor=n.colorPrimary):b.current.style.borderColor=n.colorBorder)},A={display:"inline-flex",alignItems:"center",gap:"0.5rem",minHeight:"2.75rem",cursor:S?"not-allowed":"pointer",userSelect:"none",lineHeight:1,...S?{opacity:.5}:{}},M={position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:"1rem",height:"1rem",borderRadius:"50%",border:`2px solid ${R||$?n.colorPrimary:n.colorBorder}`,backgroundColor:R?n.colorPrimary:"transparent",transition:"border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease",flexShrink:0,boxShadow:$&&!S&&j.current==="keyboard"?`0 0 0 2px ${n.colorPrimaryLight}`:"none"},W={position:"absolute",opacity:0,width:0,height:0,margin:0,padding:0,overflow:"hidden"},F={width:"0.375rem",height:"0.375rem",borderRadius:"50%",backgroundColor:"#fff"},D={fontSize:"0.875rem",lineHeight:"1.375rem",color:S?n.colorTextSubtle:n.colorText};return t.jsxs("label",{className:Ve(h,m?.root),style:V(A,x?.root,g),onMouseDown:()=>{v.current=!0},onMouseEnter:H,onMouseLeave:z,children:[t.jsxs("span",{ref:b,className:m?.radio,style:V(M,x?.radio),children:[t.jsx("input",{ref:p,type:"radio",id:u,name:L,checked:R,disabled:S,tabIndex:d,onChange:P,onFocus:()=>{j.current=v.current?"mouse":"keyboard",v.current=!1,I(!0)},onBlur:()=>I(!1),style:W,value:a!==void 0?String(a):void 0}),R&&t.jsx("span",{className:m?.indicator,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",...F,...x?.indicator}})]}),c!=null&&t.jsx("span",{className:m?.label,style:V(D,x?.label),children:c})]})}function ei({checked:e,defaultChecked:r=!1,disabled:o=!1,autoFocus:s=!1,onChange:l,value:a,children:c,id:u,name:f,tabIndex:d,className:h,style:g,classNames:m,styles:x,_position:p}){const b=i.useRef(null),v=i.useRef(null),j=i.useRef(!1),C=i.useRef("keyboard"),w=i.useContext(Qo),y=w!==null,k=e!==void 0,[B,R]=i.useState(r);let S,L,$;const I=y?w.buttonStyle:"outline",P=y?w.size:"middle";y?(S=a!==void 0&&w.value===a,L=o||w.disabled,$=w.name||f):(S=k?e:B,L=o,$=f);const[E,H]=i.useState(!1);i.useEffect(()=>{s&&b.current&&b.current.focus()},[]);const z=Y=>{if(L)return;const X={target:{checked:Y.target.checked,value:a},nativeEvent:Y.nativeEvent};y?w.onChange(X):(k||R(Y.target.checked),l?.(X))},A=!!(x?.root&&("backgroundColor"in x.root||"borderColor"in x.root||"border"in x.root)),M=()=>{L||!v.current||(A?v.current.style.filter="brightness(1.15)":S?I==="solid"?v.current.style.backgroundColor=n.colorPrimaryHover:(v.current.style.color=n.colorPrimaryHover,v.current.style.borderColor=n.colorPrimaryHover):(v.current.style.color=n.colorPrimary,v.current.style.borderColor=n.colorPrimary))},W=()=>{L||!v.current||(A?v.current.style.filter="":S?I==="solid"?v.current.style.backgroundColor=n.colorPrimary:(v.current.style.color=n.colorPrimary,v.current.style.borderColor=n.colorPrimary):(v.current.style.color=n.colorText,v.current.style.borderColor=n.colorBorder))},F=qu[P];let D;p==="first"?D=`${F.radius} 0 0 ${F.radius}`:p==="last"?D=`0 ${F.radius} ${F.radius} 0`:p==="middle"?D="0":D=F.radius;const T={position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",height:F.height,padding:`0 ${F.paddingH}`,fontSize:F.fontSize,fontFamily:"inherit",lineHeight:1,border:`1px solid ${n.colorBorder}`,borderRadius:D,cursor:L?"not-allowed":"pointer",userSelect:"none",transition:"color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease",boxSizing:"border-box",...L?{opacity:.5}:{}};p&&p!=="first"&&p!=="only"&&(T.marginLeft="-1px"),S?I==="solid"?(T.backgroundColor=n.colorPrimary,T.borderColor=n.colorPrimary,T.color=n.colorPrimaryContrast):(T.backgroundColor=n.colorBg,T.borderColor=n.colorPrimary,T.color=n.colorPrimary):(T.backgroundColor=n.colorBg,T.borderColor=E?n.colorPrimary:n.colorBorder,T.color=E?n.colorPrimary:n.colorText),T.boxShadow=E&&!L&&C.current==="keyboard"?`0 0 0 2px ${n.colorPrimaryLight}`:"none",(S||E)&&(T.zIndex=1);const O={position:"absolute",opacity:0,width:0,height:0,margin:0,padding:0,overflow:"hidden"};return t.jsxs("label",{ref:v,className:Ve(h,m?.root),style:V(T,x?.root,g),onMouseDown:()=>{j.current=!0},onMouseEnter:M,onMouseLeave:W,children:[t.jsx("input",{ref:b,type:"radio",id:u,name:$,checked:S,disabled:L,tabIndex:d,onChange:z,onFocus:()=>{C.current=j.current?"mouse":"keyboard",j.current=!1,H(!0)},onBlur:()=>H(!1),style:O,value:a!==void 0?String(a):void 0}),t.jsx("span",{className:m?.label,style:V({whiteSpace:"nowrap"},x?.label),children:c})]})}function Qu({value:e,defaultValue:r,onChange:o,disabled:s=!1,name:l,options:a,optionType:c="default",buttonStyle:u="outline",size:f="middle",children:d,className:h,style:g,classNames:m,styles:x}){const p=e!==void 0,[b,v]=i.useState(r),j=p?e:b,C=i.useCallback(S=>{p||v(S.target.value),o?.(S)},[p,o]),w={value:j,disabled:s,name:l,onChange:C,optionType:c,buttonStyle:u,size:f},y=a?.map(S=>typeof S=="string"||typeof S=="number"?{label:String(S),value:S}:S),k=c==="button"?ei:Js,B=(S,L)=>L===1?"only":S===0?"first":S===L-1?"last":"middle";let R;if(y)R=y.map((S,L)=>t.jsx(k,{value:S.value,disabled:S.disabled,className:S.className,style:S.style,...c==="button"?{_position:B(L,y.length)}:{},children:S.label},String(S.value)));else if(c==="button"&&d){const S=i.Children.toArray(d).filter(i.isValidElement);R=S.map((L,$)=>i.cloneElement(L,{_position:B($,S.length)}))}else R=d;return t.jsx(Qo.Provider,{value:w,children:t.jsx("div",{role:"radiogroup",className:Ve(h,m?.root),style:V({display:"inline-flex",flexWrap:"wrap",gap:c==="button"?0:"0.5rem",alignItems:"center"},x?.root,g),children:R})})}const Zo=Object.assign(Js,{Group:Qu,Button:ei});function Zu(){return t.jsx("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"currentColor",style:{display:"block"},children:t.jsx("path",{d:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"})})}const Ju={small:{fontSize:"0.875rem",gap:"0.25rem"},middle:{fontSize:"1.25rem",gap:"0.5rem"},large:{fontSize:"2rem",gap:"0.625rem"}};function ef({allowClear:e=!0,allowHalf:r=!1,autoFocus:o=!1,character:s,count:l=5,defaultValue:a=0,disabled:c=!1,size:u="middle",tooltips:f,value:d,style:h,className:g,classNames:m,styles:x,onBlur:p,onChange:b,onFocus:v,onHoverChange:j,onKeyDown:C},w){const y=i.useRef(null),k=i.useRef([]),B=i.useRef(!1),R=i.useRef("keyboard"),S=d!==void 0,[L,$]=i.useState(a),I=S?d:L,[P,E]=i.useState(0),[H,z]=i.useState(!1),A=P>0?P:I;i.useImperativeHandle(w,()=>({focus:()=>y.current?.focus(),blur:()=>y.current?.blur()})),i.useEffect(()=>{o&&y.current&&y.current.focus()},[]);const M=oe=>typeof s=="function"?s(oe):s||t.jsx(Zu,{}),W=oe=>A>=oe+1,F=oe=>r&&A>=oe+.5&&A<oe+1,D=!!(x?.character&&"color"in x.character||x?.star&&("color"in x.star||"backgroundColor"in x.star)),T=x?.character?.color,O=T?void 0:n.colorBorder,Y=oe=>{if(c)return;let q=oe;e&&oe===I&&(q=0),S||$(q),b?.(q)},X=(oe,q)=>{if(c)return;E(q),j?.(q);const K=k.current[oe];K&&D&&(K.style.filter="brightness(1.15)")},_=oe=>{if(c)return;const q=k.current[oe];q&&D&&(q.style.filter="")},G=()=>{c||(E(0),j?.(0))},Q=oe=>{if(c)return;C?.(oe);const q=r?.5:1;switch(oe.key){case"ArrowRight":case"ArrowUp":{oe.preventDefault();const K=Math.min(I+q,l);S||$(K),b?.(K);break}case"ArrowLeft":case"ArrowDown":{oe.preventDefault();const K=Math.max(I-q,0);S||$(K),b?.(K);break}}},N=Ju[u],le={display:"inline-flex",alignItems:"center",gap:N.gap,cursor:c?"default":"pointer",userSelect:"none",outline:"none",lineHeight:1,fontSize:N.fontSize,...c?{opacity:.5}:{},boxShadow:H&&!c&&R.current==="keyboard"?`0 0 0 2px ${n.colorPrimaryLight}`:"none",borderRadius:"0.25rem",padding:"0.125rem"};return t.jsx("div",{ref:y,role:"radiogroup",tabIndex:c?-1:0,className:Ve(g,m?.root),style:V(le,x?.root,h),onMouseLeave:G,onMouseDown:()=>{B.current=!0},onFocus:()=>{R.current=B.current?"mouse":"keyboard",B.current=!1,z(!0),v?.()},onBlur:()=>{z(!1),p?.()},onKeyDown:Q,"aria-valuenow":I,"aria-valuemin":0,"aria-valuemax":l,children:Array.from({length:l},(oe,q)=>{const K=W(q),re=F(q),Te=P>0&&Math.ceil(P)===q+1,Ce=q+1,Le={position:"relative",display:"inline-flex",cursor:c?"default":"pointer",transition:"transform 0.15s ease",transform:Te&&!c?"scale(1.15)":"scale(1)"},ue={display:"inline-flex",color:O,transition:"color 0.2s ease",...T&&!K&&!re?{color:T,opacity:.25}:{}},ze={position:"absolute",top:0,left:0,width:"100%",height:"100%",color:T||n.colorWarning,clipPath:K?"inset(0 0% 0 0)":re?"inset(0 50% 0 0)":"inset(0 100% 0 0)",transition:"color 0.2s ease, clip-path 0.15s ease",pointerEvents:"none"},xe={position:"absolute",top:0,height:"100%",zIndex:1,cursor:"inherit"},ge=f?.[q],Ie=t.jsxs("div",{ref:De=>{k.current[q]=De},className:m?.star,style:V(Le,x?.star),role:"radio","aria-checked":A>=Ce,"aria-label":ge??`${Ce} star${Ce>1?"s":""}`,children:[t.jsx("span",{className:m?.character,style:V(ue,x?.character),children:M(q)}),t.jsx("span",{className:m?.character,style:V(ze,x?.character),children:M(q)}),r?t.jsxs(t.Fragment,{children:[t.jsx("div",{style:{...xe,left:0,width:"50%"},onMouseEnter:()=>X(q,Ce-.5),onMouseLeave:()=>_(q),onClick:()=>Y(Ce-.5)}),t.jsx("div",{style:{...xe,right:0,width:"50%"},onMouseEnter:()=>X(q,Ce),onMouseLeave:()=>_(q),onClick:()=>Y(Ce)})]}):t.jsx("div",{style:{...xe,left:0,width:"100%"},onMouseEnter:()=>X(q,Ce),onMouseLeave:()=>_(q),onClick:()=>Y(Ce)})]});return ge?t.jsx(Wt,{content:ge,children:Ie},q):t.jsx("span",{children:Ie},q)})})}const tf=i.forwardRef(ef);function rf(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"6 9 12 15 18 9"})})}function of(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function nf(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"20 6 9 17 4 12"})})}function sf(){return t.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function lf(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{animation:"j-select-spin 1s linear infinite"},children:t.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})}function af({content:e,children:r}){const[o,s]=i.useState(!1),[l,a]=i.useState(!1),[c,u]=i.useState({top:0,left:0}),f=i.useRef(null),d=()=>{if(!f.current)return;const g=f.current.getBoundingClientRect();u({top:g.top-4,left:g.left+g.width/2}),s(!0),requestAnimationFrame(()=>requestAnimationFrame(()=>a(!0)))},h=()=>{a(!1),setTimeout(()=>s(!1),150)};return t.jsxs("span",{ref:f,onMouseEnter:d,onMouseLeave:h,style:{display:"inline-flex"},children:[r,o&&t.jsxs("div",{style:{position:"fixed",zIndex:9999,top:c.top,left:c.left,transform:`translate(-50%, -100%)${l?"":" translateY(4px)"}`,padding:"0.375rem 0.625rem",borderRadius:"0.375rem",backgroundColor:n.colorBgMuted,color:n.colorText,fontSize:"0.8125rem",fontWeight:500,whiteSpace:"pre-line",boxShadow:n.shadowMd,border:`1px solid ${n.colorBorder}`,opacity:l?1:0,transition:"opacity 0.15s ease-out, transform 0.15s ease-out",pointerEvents:"none"},role:"tooltip",children:[e,t.jsx("div",{style:{position:"absolute",bottom:"-0.25rem",left:"50%",transform:"translateX(-50%) rotate(45deg)",width:"0.5rem",height:"0.5rem",backgroundColor:n.colorBgMuted,borderRight:`1px solid ${n.colorBorder}`,borderBottom:`1px solid ${n.colorBorder}`}})]})]})}function to(e){return"options"in e&&Array.isArray(e.options)}function kr(e,r){return r.value!=="value"?e[r.value]:e.value}function er(e,r){return(r.label!=="label"?e[r.label]:e.label)??kr(e,r)}function ti(e,r){if(e.title)return e.title;const o=er(e,r);return typeof o=="string"?o:String(typeof o=="number"?o:kr(e,r))}function jn(e,r){const o=[];for(const s of e)if(to(s)){const l=r.options!=="options"?s[r.options]:s.options;l&&o.push(...l)}else o.push(s);return o}function cf(e,r,o,s){const l=e.toLowerCase();if(s){const c=r[s];return String(c??"").toLowerCase().includes(l)}return ti(r,o).toLowerCase().includes(l)}const Jt=32,df=32,Sn=5;function uf(e,r){if(!r)return e;const o=e.toLowerCase().indexOf(r.toLowerCase());return o<0?e:t.jsxs(t.Fragment,{children:[e.slice(0,o),t.jsx("span",{style:{fontWeight:700,color:n.colorPrimary},children:e.slice(o,o+r.length)}),e.slice(o+r.length)]})}const ff={large:{height:"2.5rem",fontSize:"1rem",padding:"0.5rem 0.75rem",tagLineHeight:"1.75rem"},middle:{height:"2.25rem",fontSize:"0.875rem",padding:"0.375rem 0.75rem",tagLineHeight:"1.5rem"},small:{height:"1.75rem",fontSize:"0.875rem",padding:"0.125rem 0.5rem",tagLineHeight:"1rem"}};function hf({options:e=[],fieldNames:r,value:o,defaultValue:s,mode:l,labelInValue:a=!1,placeholder:c="Select...",showSearch:u,size:f,variant:d="outlined",status:h,placement:g="bottomLeft",allowClear:m=!1,disabled:x,loading:p=!1,autoFocus:b=!1,virtual:v=!0,popupMatchSelectWidth:j=!0,maxTagCount:C,maxTagPlaceholder:w,maxCount:y,defaultActiveFirstOption:k=!0,optionFilterProp:B,filterOption:R=!0,filterSort:S,tokenSeparators:L,open:$,dropdownRender:I,tagRender:P,labelRender:E,notFoundContent:H,suffix:z,removeIcon:A,clearIcon:M,prefix:W,optionRender:F,onChange:D,onSelect:T,onDeselect:O,onSearch:Y,onClear:X,onFocus:_,onBlur:G,onDropdownVisibleChange:Q,onKeyDown:N,className:le,style:oe,classNames:q,styles:K}){const{componentSize:re,componentDisabled:Te}=Gt(),Ce=f??re??"middle",Le=x??Te??!1,ue={label:r?.label??"label",value:r?.value??"value",options:r?.options??"options"},ze=l==="multiple"||l==="tags",xe=u??(l==="tags"||!1),ge=o!==void 0,[Ie,De]=i.useState(()=>{if(!ze)return s??void 0}),[Ae,Re]=i.useState(()=>ze?Array.isArray(s)?s:s!==void 0?[s]:[]:[]),ke=ze?void 0:ge?o:Ie,ee=ze?ge?Array.isArray(o)?o.filter(ye=>ye!==""&&ye!==null&&ye!==void 0):o!==void 0&&o!==""&&o!==null?[o]:[]:Ae:[],ae=$!==void 0,[se,we]=i.useState(!1),ie=ae?$:se,[ce,He]=i.useState(""),[Pe,Ge]=i.useState(-1),[Z,Be]=i.useState(!1),[Oe,Qe]=i.useState(!1),[_e,et]=i.useState(!1),je=i.useRef(null),Se=i.useRef(null),me=i.useRef(null),U=i.useRef(null),he=i.useRef(!1),de=i.useRef("keyboard"),We=i.useRef(null),$e=i.useMemo(()=>jn(e,ue),[e,ue.label,ue.value,ue.options]),ne=i.useMemo(()=>{if(!ce||R===!1)return e;const ye=typeof R=="function"?R:(ct,lt)=>cf(ct,lt,ue,B);return e.map(ct=>{if(to(ct)){const vt=((ue.options!=="options"?ct[ue.options]:ct.options)??[]).filter(kt=>ye(ce,kt));return vt.length===0?null:{...ct,options:vt}}return ye(ce,ct)?ct:null}).filter(Boolean)},[e,ce,R,ue.label,ue.value,ue.options]),be=i.useMemo(()=>{let ye=jn(ne,ue);return S&&ce&&(ye=[...ye].sort(S)),ye},[ne,S,ce,ue.label,ue.value,ue.options]),Ye=i.useMemo(()=>{let ye=0;const Je=[];for(const ct of ne)if(to(ct)){const lt=(ue.options!=="options"?ct[ue.options]:ct.options)??[];Je.push({type:"group-header",label:ct.label,key:`group-${Je.length}`});for(const vt of lt)Je.push({type:"option",option:vt,globalIndex:ye++})}else Je.push({type:"option",option:ct,globalIndex:ye++});return Je},[ne,ue.options]),Ze=v&&Ye.length>df,[tt,dt]=i.useState(0),ft=i.useCallback(ye=>$e.find(Je=>kr(Je,ue)===ye),[$e,ue.value]),gt=i.useCallback(ye=>{ae||we(ye),Q?.(ye),ye?(Qe(g.startsWith("top")),requestAnimationFrame(()=>{requestAnimationFrame(()=>{et(!0)})})):et(!1)},[ae,Q]),Ct=i.useCallback(ye=>{const Je=kr(ye,ue);ge||De(Je);const ct=a?{value:Je,label:er(ye,ue)}:Je;D?.(ct,ye),T?.(Je,ye),He(""),gt(!1),Se.current?.focus()},[ue,ge,a,D,T,gt]),jt=i.useCallback(ye=>{const Je=kr(ye,ue),ct=ee.includes(Je);let lt;if(ct)lt=ee.filter(vt=>vt!==Je),O?.(Je,ye);else{if(y!==void 0&&ee.length>=y)return;lt=[...ee,Je],T?.(Je,ye)}if(ge||Re(lt),a){const vt=lt.map(kt=>{const qt=ft(kt);return{value:kt,label:qt?er(qt,ue):kt}});D?.(vt,lt.map(kt=>ft(kt)??{value:kt}))}else D?.(lt,lt.map(vt=>ft(vt)??{value:vt}));He("")},[ue,ee,ge,a,y,D,T,O,ft]),Mt=i.useCallback(ye=>{ye.disabled||(ze?jt(ye):Ct(ye))},[ze,Ct,jt]),pe=i.useCallback(ye=>{ye.stopPropagation(),ze?(ge||Re([]),a?D?.([],[]):D?.([],[])):(ge||De(void 0),D?.(void 0,void 0)),He(""),X?.(),Se.current?.focus()},[ze,ge,a,D,X]),Ke=i.useCallback(ye=>{const Je=ft(ye),ct=ee.filter(lt=>lt!==ye);if(ge||Re(ct),Je&&O?.(ye,Je),a){const lt=ct.map(vt=>{const kt=ft(vt);return{value:vt,label:kt?er(kt,ue):vt}});D?.(lt,ct.map(vt=>ft(vt)??{value:vt}))}else D?.(ct,ct.map(lt=>ft(lt)??{value:lt}))},[ee,ge,a,ue,D,O,ft]),qe=i.useCallback(()=>{if(l!=="tags"||!ce.trim())return;const ye=ce.trim();if(ee.includes(ye)){He("");return}if(y!==void 0&&ee.length>=y)return;const Je=[...ee,ye];if(ge||Re(Je),T?.(ye,{value:ye,label:ye}),a){const lt=Je.map(vt=>{const kt=ft(vt);return{value:vt,label:kt?er(kt,ue):vt}});D?.(lt,Je.map(vt=>ft(vt)??{value:vt}))}else D?.(Je,Je.map(lt=>ft(lt)??{value:lt}));He("")},[l,ce,ee,ge,a,ue,D,T,ft]),st=()=>{Le||(ie?xe||gt(!1):gt(!0),xe&&setTimeout(()=>me.current?.focus(),0))},rt=ye=>{const Je=ye.target.value;if(l==="tags"&&L&&L.length>0){const ct=Je.split(new RegExp(`[${L.map(lt=>lt.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("")}]`));if(ct.length>1){let lt=[...ee];for(const vt of ct){const kt=vt.trim();if(!(!kt||lt.includes(kt))){if(y!==void 0&<.length>=y)break;lt.push(kt),T?.(kt,{value:kt,label:kt})}}lt.length!==ee.length&&(ge||Re(lt),D?.(lt,lt.map(vt=>ft(vt)??{value:vt}))),He(""),Y?.("");return}}He(Je),Y?.(Je),ie||gt(!0)},xt=i.useCallback(ye=>{if(be.length===0)return;let Je=Pe;for(let ct=0;ct<be.length&&(Je=(Je+ye+be.length)%be.length,!!be[Je].disabled);ct++);Ge(Je)},[be,Pe]),Rt=ye=>{if(!Le)switch(N?.(ye),ye.key){case"ArrowDown":ye.preventDefault(),ie?xt(1):gt(!0);break;case"ArrowUp":ye.preventDefault(),ie&&xt(-1);break;case"Enter":ie&&Pe>=0&&be[Pe]&&!be[Pe].disabled?(ye.preventDefault(),Mt(be[Pe])):l==="tags"&&ce.trim()&&(ye.preventDefault(),qe());break;case"Escape":ie&&(ye.preventDefault(),gt(!1),Se.current?.focus());break;case"Backspace":if(ze&&!ce&&ee.length>0){const Je=ee[ee.length-1];Ke(Je)}break}};i.useEffect(()=>{if(k&&be.length>0){const ye=be.findIndex(Je=>!Je.disabled);Ge(ye>=0?ye:-1)}else Ge(-1)},[be,k]),i.useEffect(()=>{if(!ie&&!Z)return;const ye=Je=>{je.current&&!je.current.contains(Je.target)&&(ie&&(gt(!1),He("")),Be(!1))};return document.addEventListener("mousedown",ye),()=>document.removeEventListener("mousedown",ye)},[ie,Z,gt]),i.useEffect(()=>{if(!ie||Pe<0)return;const ye=U.current;if(ye)if(Ze){const Je=Ye.findIndex(vt=>vt.type==="option"&&vt.globalIndex===Pe);if(Je<0)return;const ct=Je*Jt,lt=ct+Jt;ct<ye.scrollTop?ye.scrollTop=ct:lt>ye.scrollTop+ye.clientHeight&&(ye.scrollTop=lt-ye.clientHeight)}else{const Je=ye.querySelector(`[data-option-index="${Pe}"]`);if(Je){const ct=Je.offsetTop,lt=ct+Je.offsetHeight;ct<ye.scrollTop?ye.scrollTop=ct:lt>ye.scrollTop+ye.clientHeight&&(ye.scrollTop=lt-ye.clientHeight)}}},[Pe,ie,Ze,Ye]),i.useLayoutEffect(()=>{if(!ie||!U.current||!je.current)return;const ye=U.current.getBoundingClientRect(),Je=je.current.getBoundingClientRect(),ct=Je.top,lt=window.innerHeight-Je.bottom;!Oe&&ye.bottom>window.innerHeight?ct>lt&&Qe(!0):Oe&&ye.top<0&<>ct&&Qe(!1)}),i.useEffect(()=>{b&&Se.current&&Se.current.focus()},[b]),i.useEffect(()=>{ie&&xe&&setTimeout(()=>me.current?.focus(),0),ie||He("")},[ie,xe]);const Lt=ff[Ce],fe=V({position:"relative",display:"inline-block",width:"100%"},K?.root,oe),J={outlined:{border:`1px solid ${n.colorBorder}`,backgroundColor:n.colorBg},filled:{border:"1px solid transparent",backgroundColor:n.colorBgMuted},borderless:{border:"1px solid transparent",backgroundColor:"transparent"}},te=h==="error"?n.colorError:h==="warning"?n.colorWarning:void 0,Ee=h==="error"?n.colorErrorBg:h==="warning"?n.colorWarningBg:n.colorPrimaryLight,Ne=ze?ee.length>0:ke!==void 0,Ue={display:"flex",alignItems:ze?"flex-start":"center",flexWrap:ze?"wrap":void 0,width:"100%",height:ze?"auto":Lt.height,minHeight:ze?Lt.height:void 0,padding:Lt.padding,paddingRight:"2.25rem",fontSize:Lt.fontSize,fontFamily:"inherit",borderRadius:"0.375rem",cursor:Le?"not-allowed":"pointer",userSelect:"none",outline:"none",transition:"border-color 0.2s ease, box-shadow 0.2s ease",color:Le?n.colorTextSubtle:n.colorText,...J[d],borderColor:Z&&!Le?te||n.colorPrimary:te||(d==="outlined"?n.colorBorder:"transparent"),boxShadow:Z&&!Le&&de.current==="keyboard"?`0 0 0 2px ${Ee}`:"none",...Le?{opacity:.6}:{},boxSizing:"border-box"},nt=V(Ue,K?.selector),mt=g.endsWith("Right"),Fe={position:"absolute",zIndex:1050,left:mt?void 0:0,right:mt?0:void 0,width:(typeof j=="number"?j:void 0)||(j===!0?"100%":void 0),minWidth:j===!1?"7.5rem":void 0,maxHeight:"min(16rem, 40vh)",overflowY:"auto",overscrollBehavior:"contain",scrollbarWidth:"thin",scrollbarColor:`${n.colorBorderHover} transparent`,backgroundColor:n.colorBg,border:`1px solid ${n.colorBorder}`,borderRadius:"0.5rem",boxShadow:n.shadowMd,padding:"0.25rem 0",opacity:_e?1:0,transition:"opacity 0.15s ease-out, transform 0.15s ease-out",...Oe?{bottom:"100%",marginBottom:"0.25rem",transform:_e?"translateY(0)":"translateY(6px)"}:{top:"100%",marginTop:"0.25rem",transform:_e?"translateY(0)":"translateY(-6px)"}},ve=V(Fe,K?.dropdown),ot={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0.375rem 0.75rem",fontSize:"0.875rem",cursor:"pointer",transition:"background-color 0.15s ease",lineHeight:"1.375rem",whiteSpace:"nowrap",...Ze?{height:Jt,boxSizing:"border-box"}:{}},yt={position:"absolute",right:"0.5rem",top:ze?"0.625rem":"50%",transform:ze?void 0:"translateY(-50%)",display:"flex",alignItems:"center",gap:"0.25rem",pointerEvents:"none"},St={display:"flex",alignItems:"center",justifyContent:"center",width:"1.25rem",height:"1.25rem",borderRadius:"50%",border:"none",backgroundColor:"transparent",color:n.colorTextMuted,cursor:"pointer",padding:0,pointerEvents:"auto",transition:"color 0.15s ease, background-color 0.15s ease"},pt={display:"inline-flex",alignItems:"center",padding:"0.0625rem 0.5rem",fontSize:"0.75rem",lineHeight:"1.25rem",backgroundColor:n.colorBgMuted,borderRadius:"0.25rem",maxWidth:"12.5rem",border:`1px solid ${n.colorBorder}`},Me={border:"none",outline:"none",backgroundColor:"transparent",color:n.colorText,fontFamily:"inherit",fontSize:Lt.fontSize,padding:0,margin:0,lineHeight:Lt.tagLineHeight},Xe=i.useCallback(()=>{if(Le||Z)return;const ye=Se.current;ye&&d==="outlined"&&(ye.style.borderColor=te||n.colorBorderHover)},[Le,Z,d,te]),at=i.useCallback(()=>{if(Le||Z)return;const ye=Se.current;ye&&d==="outlined"&&(ye.style.borderColor=te||n.colorBorder)},[Le,Z,d,te]),it=i.useMemo(()=>{if(ze||ke===void 0)return null;const ye=ft(ke),Je=ye?er(ye,ue):String(ke);return E?E({label:Je,value:ke}):Je},[ze,ke,ft,ue,E]),ut=()=>{if(ee.length===0&&!ce&&!xe)return t.jsx("span",{style:{color:n.colorTextSubtle,flex:1,lineHeight:Lt.tagLineHeight},children:c});const ye=C!==void 0?Math.min(C,ee.length):ee.length,Je=ee.slice(0,ye),ct=ee.slice(ye);return t.jsxs("span",{style:{display:"flex",flexWrap:"wrap",gap:"0.25rem",flex:1,overflow:"hidden",alignItems:"center"},children:[Je.map(lt=>{const vt=ft(lt),kt=vt?er(vt,ue):String(lt),qt=E?E({label:kt,value:lt}):kt,Ft=!Le;return P?t.jsx("span",{children:P({label:qt,value:lt,closable:Ft,onClose:()=>Ke(lt)})},String(lt)):t.jsxs("span",{style:V(pt,K?.tag),className:q?.tag,children:[t.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:qt}),Ft&&t.jsx("span",{style:{display:"inline-flex",cursor:"pointer",marginLeft:"0.25rem",color:n.colorTextMuted},onClick:Sr=>{Sr.stopPropagation(),Ke(lt)},onMouseDown:Sr=>Sr.preventDefault(),children:A??t.jsx(sf,{})})]},String(lt))}),ct.length>0&&t.jsx(af,{content:ct.map(lt=>{const vt=ft(lt);return String(vt?er(vt,ue):lt)}).join(`
|
|
122
|
-
`),children:t.jsx("span",{style:V(pt,
|
|
121
|
+
`)||s!==" "&&g.includes(s))&&!(s===" "&&g.includes(" ")))return{prefix:c,searchText:g,startPos:f}}}return null}const Uu=i.forwardRef(function(r,o){const{value:s,defaultValue:l="",onChange:a,onSelect:c,onSearch:u,onFocus:f,onBlur:d,onPopupScroll:h,options:g=[],prefix:m="@",split:x=" ",filterOption:p=!0,validateSearch:b,notFoundContent:v="No matches",placement:j="bottom",allowClear:C=!1,placeholder:w,disabled:y=!1,readOnly:k=!1,id:B,autoFocus:R=!1,rows:S=1,autoSize:E=!1,resize:$=!1,size:I="middle",variant:L="outlined",status:P,className:H,style:z,classNames:F,styles:M}=r,W=i.useMemo(()=>Array.isArray(m)?m:[m],[m]),A=i.useRef(null),D=i.useRef(null),T=i.useRef(null),O=i.useRef(null),Y=i.useRef(null),X=s!==void 0,[K,G]=i.useState(l),Q=X?s:K,[N,le]=i.useState(!1),re=i.useRef(!1),q=i.useRef("keyboard"),[_,J]=i.useState(!1),[Te,ke]=i.useState(-1),[Ie,fe]=i.useState(!1),[ze,me]=i.useState(!1),[he,Le]=i.useState("");i.useImperativeHandle(o,()=>({focus:ne=>{if(A.current?.focus({preventScroll:ne?.preventScroll}),ne?.cursor&&A.current){const be=A.current.value.length;switch(ne.cursor){case"start":A.current.setSelectionRange(0,0);break;case"end":A.current.setSelectionRange(be,be);break;case"all":A.current.setSelectionRange(0,be);break}}},blur:()=>A.current?.blur(),textarea:A.current,nativeElement:T.current}));const De=i.useCallback(ne=>{J(ne),ne?(fe(j==="top"),requestAnimationFrame(()=>{requestAnimationFrame(()=>{me(!0)})})):me(!1)},[j]),Oe=i.useMemo(()=>{if(p===!1)return g;const ne=typeof p=="function"?p:Xu;return g.filter(be=>ne(he,be))},[g,he,p]),Be=Oe.length>0||v!==null,we=_&&Be&&!y&&!k;i.useEffect(()=>{if(Oe.length>0){const ne=Oe.findIndex(be=>!be.disabled);ke(ne>=0?ne:-1)}else ke(-1)},[Oe]),i.useEffect(()=>{R&&A.current&&A.current.focus()},[R]),i.useEffect(()=>{if(!_)return;const ne=be=>{T.current&&!T.current.contains(be.target)&&De(!1)};return document.addEventListener("mousedown",ne),()=>document.removeEventListener("mousedown",ne)},[_,De]),i.useEffect(()=>{if(!we||Te<0)return;const ne=O.current;if(!ne)return;const be=ne.querySelector(`[data-option-index="${Te}"]`);if(be){const Ke=be.offsetTop,Qe=Ke+be.offsetHeight;Ke<ne.scrollTop?ne.scrollTop=Ke:Qe>ne.scrollTop+ne.clientHeight&&(ne.scrollTop=Qe-ne.clientHeight)}},[Te,we]);const ee=i.useCallback(()=>{const ne=A.current;if(!ne||E===!1)return;const be=window.getComputedStyle(ne),Ke=parseFloat(be.lineHeight)||20,Qe=parseFloat(be.paddingTop)||0,tt=parseFloat(be.paddingBottom)||0,dt=parseFloat(be.borderTopWidth)||0,ft=parseFloat(be.borderBottomWidth)||0;ne.style.minHeight="0",ne.style.height="0",ne.style.overflow="hidden";const gt=ne.scrollHeight;let Ct=0,jt=1/0;typeof E=="object"&&(E.minRows&&(Ct=E.minRows*Ke+Qe+tt+dt+ft),E.maxRows&&(jt=E.maxRows*Ke+Qe+tt+dt+ft));const Mt=Math.max(Ct,Math.min(gt,jt));ne.style.height=`${Mt}px`,ne.style.minHeight=Ct>0?`${Ct}px`:"",ne.style.maxHeight=jt!==1/0?`${jt}px`:"",ne.style.overflow=Mt<gt?"auto":"hidden"},[E]);i.useLayoutEffect(()=>{ee()},[Q,ee]),i.useLayoutEffect(()=>{if(!_||!O.current||!T.current)return;const ne=O.current.getBoundingClientRect(),be=T.current.getBoundingClientRect(),Ke=be.top,Qe=window.innerHeight-be.bottom;!Ie&&ne.bottom>window.innerHeight?Ke>Qe&&fe(!0):Ie&&ne.top<0&&Qe>Ke&&fe(!1)});const ae=i.useCallback((ne,be)=>{const Ke=Gu(ne,be,W,x);if(Y.current=Ke,Ke){if(b&&!b(Ke.searchText,r)){De(!1);return}Le(Ke.searchText),u?.(Ke.searchText,Ke.prefix),_||De(!0)}else De(!1)},[W,x,b,r,u,_,De]),se=i.useCallback(ne=>{if(ne.disabled)return;const be=Y.current;if(!be)return;const Ke=Q.slice(0,be.startPos),Qe=Q.slice(be.startPos+be.prefix.length+be.searchText.length),tt=be.prefix+ne.value+x,dt=Ke+tt+Qe,ft=Ke.length+tt.length;X||G(dt),a?.(dt),c?.(ne,be.prefix),De(!1),Y.current=null,requestAnimationFrame(()=>{A.current&&(A.current.focus(),A.current.setSelectionRange(ft,ft))})},[Q,X,a,c,x,De]),Se=i.useCallback(ne=>{const be=ne.target.value;X||G(be),a?.(be);const Ke=ne.target.selectionStart??be.length;ae(be,Ke)},[X,a,ae]),ie=i.useCallback(ne=>{q.current=re.current?"mouse":"keyboard",re.current=!1,le(!0),f?.(ne)},[f]),ce=i.useCallback(ne=>{const be=ne.relatedTarget;T.current&&be&&T.current.contains(be)||(le(!1),d?.(ne),De(!1))},[d,De]),He=i.useCallback(ne=>{if(_)switch(ne.key){case"ArrowDown":ne.preventDefault(),Oe.length>0&&ke(be=>{let Ke=be;for(let Qe=0;Qe<Oe.length;Qe++)if(Ke=(Ke+1)%Oe.length,!Oe[Ke].disabled)return Ke;return be});break;case"ArrowUp":ne.preventDefault(),Oe.length>0&&ke(be=>{let Ke=be;for(let Qe=0;Qe<Oe.length;Qe++)if(Ke=(Ke-1+Oe.length)%Oe.length,!Oe[Ke].disabled)return Ke;return be});break;case"Enter":Te>=0&&Oe[Te]&&!Oe[Te].disabled&&(ne.preventDefault(),se(Oe[Te]));break;case"Escape":ne.preventDefault(),De(!1);break}},[_,Oe,Te,se,De]),Pe=i.useCallback(()=>{if(A.current){const ne=A.current.selectionStart??0;ae(Q,ne)}},[Q,ae]),Ge=i.useCallback(()=>{X||G(""),a?.(""),De(!1),A.current?.focus()},[X,a,De]),Ne=i.useCallback(()=>{if(y||N)return;const ne=D.current;ne&&L!=="borderless"&&(L==="underlined"?ne.style.borderBottomColor=Br(P)||n.colorBorderHover:ne.style.borderColor=Br(P)||n.colorBorderHover)},[y,N,L,P]),oe=i.useCallback(()=>{if(y||N)return;const ne=D.current;ne&&L!=="borderless"&&(L==="underlined"?ne.style.borderBottomColor=Br(P)||n.colorBorder:ne.style.borderColor=Br(P)||(L==="filled"?"transparent":n.colorBorder))},[y,N,L,P]),Re=Vu[I],Ze=Br(P),Fe=Ku(P),et=_u(P),je={position:"relative",display:"flex",flexDirection:"column",width:"100%",transition:"border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",boxSizing:"border-box",...Yu(L,Re.radius),...L==="underlined"?{borderBottomColor:N&&!y?et:Ze||n.colorBorder}:{borderColor:N&&!y&&L!=="borderless"?et:Ze||(L==="borderless"||L==="filled"?"transparent":n.colorBorder)},boxShadow:N&&!y&&q.current==="keyboard"?L==="underlined"?`0 1px 0 0 ${et}`:`0 0 0 2px ${Fe}`:"none",...y?{opacity:.6,cursor:"not-allowed"}:{}},ve={width:"100%",padding:`${Re.paddingV} ${Re.paddingH}`,fontSize:Re.fontSize,fontFamily:"inherit",lineHeight:Re.lineHeight,border:"none",outline:"none",backgroundColor:"transparent",color:y?n.colorTextSubtle:n.colorText,cursor:y?"not-allowed":void 0,resize:$&&!E?"vertical":"none",boxSizing:"border-box"},xe={position:"absolute",left:0,zIndex:1050,width:"100%",maxHeight:"min(16rem, 40vh)",overflowY:"auto",overscrollBehavior:"contain",backgroundColor:n.colorBg,border:`1px solid ${n.colorBorder}`,borderRadius:"0.5rem",boxShadow:n.shadowMd,padding:"0.25rem 0",opacity:ze?1:0,transition:"opacity 0.15s ease-out, transform 0.15s ease-out",...Ie?{bottom:"100%",marginBottom:"0.25rem",transform:ze?"translateY(0)":"translateY(6px)"}:{top:"100%",marginTop:"0.25rem",transform:ze?"translateY(0)":"translateY(-6px)"}},U={padding:"0.625rem 0.75rem",minHeight:"2.75rem",fontSize:"0.875rem",cursor:"pointer",transition:"background-color 0.15s ease",display:"flex",alignItems:"center",lineHeight:"1.375rem",boxSizing:"border-box"},de={display:"flex",alignItems:"center",justifyContent:"center",width:"1.75rem",height:"1.75rem",padding:0,border:"none",borderRadius:"50%",backgroundColor:"transparent",color:n.colorTextMuted,cursor:"pointer",transition:"color 0.15s ease, background-color 0.15s ease"},ue=C&&!!Q&&!y&&!k,We=()=>Oe.length===0?v===null?null:t.jsx("div",{style:{padding:"0.5rem 0.75rem",fontSize:"0.875rem",color:n.colorTextSubtle,textAlign:"center"},children:v}):Oe.map((ne,be)=>{const Ke=be===Te,Qe={...U,backgroundColor:Ke?n.colorBgMuted:void 0,color:ne.disabled?n.colorTextSubtle:n.colorText,cursor:ne.disabled?"not-allowed":"pointer",opacity:ne.disabled?.5:1,...M?.option};return t.jsx("div",{role:"option","aria-selected":Ke,"aria-disabled":ne.disabled,"data-option-index":be,style:Qe,className:F?.option,onClick:()=>se(ne),onMouseEnter:tt=>{ne.disabled||(ke(be),tt.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:tt=>{!ne.disabled&&!Ke&&(tt.currentTarget.style.backgroundColor="transparent")},children:ne.label??ne.value},ne.value)}),$e={position:"relative",display:"inline-flex",flexDirection:"column",width:"100%"};return t.jsxs("div",{ref:T,className:Ye(H,F?.root),style:V($e,M?.root,z),children:[t.jsxs("div",{ref:D,style:je,onMouseDown:()=>{re.current=!0},onMouseEnter:Ne,onMouseLeave:oe,children:[t.jsx("textarea",{ref:A,id:B,rows:E?1:S,value:Q,placeholder:w,disabled:y,readOnly:k,autoFocus:R,onChange:Se,onFocus:ie,onBlur:ce,onKeyDown:He,onClick:Pe,className:F?.textarea,style:V(ve,M?.textarea),role:"textbox","aria-haspopup":"listbox","aria-expanded":we,"aria-autocomplete":"list",autoComplete:"off"}),ue&&t.jsx("button",{type:"button",style:{...de,position:"absolute",right:"0.25rem",top:"0.25rem"},onMouseDown:ne=>ne.preventDefault(),onClick:Ge,onMouseEnter:ne=>{ne.currentTarget.style.color=n.colorText,ne.currentTarget.style.backgroundColor=n.colorBgMuted},onMouseLeave:ne=>{ne.currentTarget.style.color=n.colorTextMuted,ne.currentTarget.style.backgroundColor="transparent"},tabIndex:-1,"aria-label":"Clear",children:t.jsx(Nu,{})})]}),we&&t.jsx("div",{ref:O,role:"listbox",style:V(xe,M?.dropdown),className:F?.dropdown,onMouseDown:ne=>ne.preventDefault(),onScroll:h,children:We()})]})}),qu={small:{height:"1.5rem",fontSize:"0.75rem",paddingH:"0.5rem",radius:"0.25rem"},middle:{height:"2rem",fontSize:"0.875rem",paddingH:"0.75rem",radius:"0.375rem"},large:{height:"2.5rem",fontSize:"1rem",paddingH:"1rem",radius:"0.5rem"}},Qo=i.createContext(null);function Js({checked:e,defaultChecked:r=!1,disabled:o=!1,autoFocus:s=!1,onChange:l,value:a,children:c,id:u,name:f,tabIndex:d,className:h,style:g,classNames:m,styles:x}){const p=i.useRef(null),b=i.useRef(null),v=i.useRef(!1),j=i.useRef("keyboard"),C=i.useContext(Qo),w=C!==null,y=e!==void 0,[k,B]=i.useState(r);let R,S,E;w?(R=a!==void 0&&C.value===a,S=o||C.disabled,E=C.name||f):(R=y?e:k,S=o,E=f);const[$,I]=i.useState(!1);i.useEffect(()=>{s&&p.current&&p.current.focus()},[]);const L=T=>{if(S)return;const O={target:{checked:T.target.checked,value:a},nativeEvent:T.nativeEvent};w?C.onChange(O):(y||B(T.target.checked),l?.(O))},P=!!(x?.radio&&("backgroundColor"in x.radio||"borderColor"in x.radio||"border"in x.radio)),H=()=>{S||!b.current||(P?b.current.style.filter="brightness(1.15)":R?(b.current.style.backgroundColor=n.colorPrimaryHover,b.current.style.borderColor=n.colorPrimaryHover):b.current.style.borderColor=n.colorPrimary)},z=()=>{S||!b.current||(P?b.current.style.filter="":R?(b.current.style.backgroundColor=n.colorPrimary,b.current.style.borderColor=n.colorPrimary):b.current.style.borderColor=n.colorBorder)},F={display:"inline-flex",alignItems:"center",gap:"0.5rem",minHeight:"2.75rem",cursor:S?"not-allowed":"pointer",userSelect:"none",lineHeight:1,...S?{opacity:.5}:{}},M={position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:"1rem",height:"1rem",borderRadius:"50%",border:`2px solid ${R||$?n.colorPrimary:n.colorBorder}`,backgroundColor:R?n.colorPrimary:"transparent",transition:"border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease",flexShrink:0,boxShadow:$&&!S&&j.current==="keyboard"?`0 0 0 2px ${n.colorPrimaryLight}`:"none"},W={position:"absolute",opacity:0,width:0,height:0,margin:0,padding:0,overflow:"hidden"},A={width:"0.375rem",height:"0.375rem",borderRadius:"50%",backgroundColor:"#fff"},D={fontSize:"0.875rem",lineHeight:"1.375rem",color:S?n.colorTextSubtle:n.colorText};return t.jsxs("label",{className:Ye(h,m?.root),style:V(F,x?.root,g),onMouseDown:()=>{v.current=!0},onMouseEnter:H,onMouseLeave:z,children:[t.jsxs("span",{ref:b,className:m?.radio,style:V(M,x?.radio),children:[t.jsx("input",{ref:p,type:"radio",id:u,name:E,checked:R,disabled:S,tabIndex:d,onChange:L,onFocus:()=>{j.current=v.current?"mouse":"keyboard",v.current=!1,I(!0)},onBlur:()=>I(!1),style:W,value:a!==void 0?String(a):void 0}),R&&t.jsx("span",{className:m?.indicator,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",...A,...x?.indicator}})]}),c!=null&&t.jsx("span",{className:m?.label,style:V(D,x?.label),children:c})]})}function ei({checked:e,defaultChecked:r=!1,disabled:o=!1,autoFocus:s=!1,onChange:l,value:a,children:c,id:u,name:f,tabIndex:d,className:h,style:g,classNames:m,styles:x,_position:p}){const b=i.useRef(null),v=i.useRef(null),j=i.useRef(!1),C=i.useRef("keyboard"),w=i.useContext(Qo),y=w!==null,k=e!==void 0,[B,R]=i.useState(r);let S,E,$;const I=y?w.buttonStyle:"outline",L=y?w.size:"middle";y?(S=a!==void 0&&w.value===a,E=o||w.disabled,$=w.name||f):(S=k?e:B,E=o,$=f);const[P,H]=i.useState(!1);i.useEffect(()=>{s&&b.current&&b.current.focus()},[]);const z=Y=>{if(E)return;const X={target:{checked:Y.target.checked,value:a},nativeEvent:Y.nativeEvent};y?w.onChange(X):(k||R(Y.target.checked),l?.(X))},F=!!(x?.root&&("backgroundColor"in x.root||"borderColor"in x.root||"border"in x.root)),M=()=>{E||!v.current||(F?v.current.style.filter="brightness(1.15)":S?I==="solid"?v.current.style.backgroundColor=n.colorPrimaryHover:(v.current.style.color=n.colorPrimaryHover,v.current.style.borderColor=n.colorPrimaryHover):(v.current.style.color=n.colorPrimary,v.current.style.borderColor=n.colorPrimary))},W=()=>{E||!v.current||(F?v.current.style.filter="":S?I==="solid"?v.current.style.backgroundColor=n.colorPrimary:(v.current.style.color=n.colorPrimary,v.current.style.borderColor=n.colorPrimary):(v.current.style.color=n.colorText,v.current.style.borderColor=n.colorBorder))},A=qu[L];let D;p==="first"?D=`${A.radius} 0 0 ${A.radius}`:p==="last"?D=`0 ${A.radius} ${A.radius} 0`:p==="middle"?D="0":D=A.radius;const T={position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",height:A.height,padding:`0 ${A.paddingH}`,fontSize:A.fontSize,fontFamily:"inherit",lineHeight:1,border:`1px solid ${n.colorBorder}`,borderRadius:D,cursor:E?"not-allowed":"pointer",userSelect:"none",transition:"color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease",boxSizing:"border-box",...E?{opacity:.5}:{}};p&&p!=="first"&&p!=="only"&&(T.marginLeft="-1px"),S?I==="solid"?(T.backgroundColor=n.colorPrimary,T.borderColor=n.colorPrimary,T.color=n.colorPrimaryContrast):(T.backgroundColor=n.colorBg,T.borderColor=n.colorPrimary,T.color=n.colorPrimary):(T.backgroundColor=n.colorBg,T.borderColor=P?n.colorPrimary:n.colorBorder,T.color=P?n.colorPrimary:n.colorText),T.boxShadow=P&&!E&&C.current==="keyboard"?`0 0 0 2px ${n.colorPrimaryLight}`:"none",(S||P)&&(T.zIndex=1);const O={position:"absolute",opacity:0,width:0,height:0,margin:0,padding:0,overflow:"hidden"};return t.jsxs("label",{ref:v,className:Ye(h,m?.root),style:V(T,x?.root,g),onMouseDown:()=>{j.current=!0},onMouseEnter:M,onMouseLeave:W,children:[t.jsx("input",{ref:b,type:"radio",id:u,name:$,checked:S,disabled:E,tabIndex:d,onChange:z,onFocus:()=>{C.current=j.current?"mouse":"keyboard",j.current=!1,H(!0)},onBlur:()=>H(!1),style:O,value:a!==void 0?String(a):void 0}),t.jsx("span",{className:m?.label,style:V({whiteSpace:"nowrap"},x?.label),children:c})]})}function Qu({value:e,defaultValue:r,onChange:o,disabled:s=!1,name:l,options:a,optionType:c="default",buttonStyle:u="outline",size:f="middle",children:d,className:h,style:g,classNames:m,styles:x}){const p=e!==void 0,[b,v]=i.useState(r),j=p?e:b,C=i.useCallback(S=>{p||v(S.target.value),o?.(S)},[p,o]),w={value:j,disabled:s,name:l,onChange:C,optionType:c,buttonStyle:u,size:f},y=a?.map(S=>typeof S=="string"||typeof S=="number"?{label:String(S),value:S}:S),k=c==="button"?ei:Js,B=(S,E)=>E===1?"only":S===0?"first":S===E-1?"last":"middle";let R;if(y)R=y.map((S,E)=>t.jsx(k,{value:S.value,disabled:S.disabled,className:S.className,style:S.style,...c==="button"?{_position:B(E,y.length)}:{},children:S.label},String(S.value)));else if(c==="button"&&d){const S=i.Children.toArray(d).filter(i.isValidElement);R=S.map((E,$)=>i.cloneElement(E,{_position:B($,S.length)}))}else R=d;return t.jsx(Qo.Provider,{value:w,children:t.jsx("div",{role:"radiogroup",className:Ye(h,m?.root),style:V({display:"inline-flex",flexWrap:"wrap",gap:c==="button"?0:"0.5rem",alignItems:"center"},x?.root,g),children:R})})}const Zo=Object.assign(Js,{Group:Qu,Button:ei});function Zu(){return t.jsx("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"currentColor",style:{display:"block"},children:t.jsx("path",{d:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"})})}const Ju={small:{fontSize:"0.875rem",gap:"0.25rem"},middle:{fontSize:"1.25rem",gap:"0.5rem"},large:{fontSize:"2rem",gap:"0.625rem"}};function ef({allowClear:e=!0,allowHalf:r=!1,autoFocus:o=!1,character:s,count:l=5,defaultValue:a=0,disabled:c=!1,size:u="middle",tooltips:f,value:d,style:h,className:g,classNames:m,styles:x,onBlur:p,onChange:b,onFocus:v,onHoverChange:j,onKeyDown:C},w){const y=i.useRef(null),k=i.useRef([]),B=i.useRef(!1),R=i.useRef("keyboard"),S=d!==void 0,[E,$]=i.useState(a),I=S?d:E,[L,P]=i.useState(0),[H,z]=i.useState(!1),F=L>0?L:I;i.useImperativeHandle(w,()=>({focus:()=>y.current?.focus(),blur:()=>y.current?.blur()})),i.useEffect(()=>{o&&y.current&&y.current.focus()},[]);const M=re=>typeof s=="function"?s(re):s||t.jsx(Zu,{}),W=re=>F>=re+1,A=re=>r&&F>=re+.5&&F<re+1,D=!!(x?.character&&"color"in x.character||x?.star&&("color"in x.star||"backgroundColor"in x.star)),T=x?.character?.color,O=T?void 0:n.colorBorder,Y=re=>{if(c)return;let q=re;e&&re===I&&(q=0),S||$(q),b?.(q)},X=(re,q)=>{if(c)return;P(q),j?.(q);const _=k.current[re];_&&D&&(_.style.filter="brightness(1.15)")},K=re=>{if(c)return;const q=k.current[re];q&&D&&(q.style.filter="")},G=()=>{c||(P(0),j?.(0))},Q=re=>{if(c)return;C?.(re);const q=r?.5:1;switch(re.key){case"ArrowRight":case"ArrowUp":{re.preventDefault();const _=Math.min(I+q,l);S||$(_),b?.(_);break}case"ArrowLeft":case"ArrowDown":{re.preventDefault();const _=Math.max(I-q,0);S||$(_),b?.(_);break}}},N=Ju[u],le={display:"inline-flex",alignItems:"center",gap:N.gap,cursor:c?"default":"pointer",userSelect:"none",outline:"none",lineHeight:1,fontSize:N.fontSize,...c?{opacity:.5}:{},boxShadow:H&&!c&&R.current==="keyboard"?`0 0 0 2px ${n.colorPrimaryLight}`:"none",borderRadius:"0.25rem",padding:"0.125rem"};return t.jsx("div",{ref:y,role:"radiogroup",tabIndex:c?-1:0,className:Ye(g,m?.root),style:V(le,x?.root,h),onMouseLeave:G,onMouseDown:()=>{B.current=!0},onFocus:()=>{R.current=B.current?"mouse":"keyboard",B.current=!1,z(!0),v?.()},onBlur:()=>{z(!1),p?.()},onKeyDown:Q,"aria-valuenow":I,"aria-valuemin":0,"aria-valuemax":l,children:Array.from({length:l},(re,q)=>{const _=W(q),J=A(q),Te=L>0&&Math.ceil(L)===q+1,ke=q+1,Ie={position:"relative",display:"inline-flex",cursor:c?"default":"pointer",transition:"transform 0.15s ease",transform:Te&&!c?"scale(1.15)":"scale(1)"},fe={display:"inline-flex",color:O,transition:"color 0.2s ease",...T&&!_&&!J?{color:T,opacity:.25}:{}},ze={position:"absolute",top:0,left:0,width:"100%",height:"100%",color:T||n.colorWarning,clipPath:_?"inset(0 0% 0 0)":J?"inset(0 50% 0 0)":"inset(0 100% 0 0)",transition:"color 0.2s ease, clip-path 0.15s ease",pointerEvents:"none"},me={position:"absolute",top:0,height:"100%",zIndex:1,cursor:"inherit"},he=f?.[q],Le=t.jsxs("div",{ref:De=>{k.current[q]=De},className:m?.star,style:V(Ie,x?.star),role:"radio","aria-checked":F>=ke,"aria-label":he??`${ke} star${ke>1?"s":""}`,children:[t.jsx("span",{className:m?.character,style:V(fe,x?.character),children:M(q)}),t.jsx("span",{className:m?.character,style:V(ze,x?.character),children:M(q)}),r?t.jsxs(t.Fragment,{children:[t.jsx("div",{style:{...me,left:0,width:"50%"},onMouseEnter:()=>X(q,ke-.5),onMouseLeave:()=>K(q),onClick:()=>Y(ke-.5)}),t.jsx("div",{style:{...me,right:0,width:"50%"},onMouseEnter:()=>X(q,ke),onMouseLeave:()=>K(q),onClick:()=>Y(ke)})]}):t.jsx("div",{style:{...me,left:0,width:"100%"},onMouseEnter:()=>X(q,ke),onMouseLeave:()=>K(q),onClick:()=>Y(ke)})]});return he?t.jsx(Wt,{content:he,children:Le},q):t.jsx("span",{children:Le},q)})})}const tf=i.forwardRef(ef);function rf(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"6 9 12 15 18 9"})})}function of(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function nf(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"20 6 9 17 4 12"})})}function sf(){return t.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function lf(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{animation:"j-select-spin 1s linear infinite"},children:t.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})}function af({content:e,children:r}){const[o,s]=i.useState(!1),[l,a]=i.useState(!1),[c,u]=i.useState({top:0,left:0}),f=i.useRef(null),d=()=>{if(!f.current)return;const g=f.current.getBoundingClientRect();u({top:g.top-4,left:g.left+g.width/2}),s(!0),requestAnimationFrame(()=>requestAnimationFrame(()=>a(!0)))},h=()=>{a(!1),setTimeout(()=>s(!1),150)};return t.jsxs("span",{ref:f,onMouseEnter:d,onMouseLeave:h,style:{display:"inline-flex"},children:[r,o&&t.jsxs("div",{style:{position:"fixed",zIndex:9999,top:c.top,left:c.left,transform:`translate(-50%, -100%)${l?"":" translateY(4px)"}`,padding:"0.375rem 0.625rem",borderRadius:"0.375rem",backgroundColor:n.colorBgMuted,color:n.colorText,fontSize:"0.8125rem",fontWeight:500,whiteSpace:"pre-line",boxShadow:n.shadowMd,border:`1px solid ${n.colorBorder}`,opacity:l?1:0,transition:"opacity 0.15s ease-out, transform 0.15s ease-out",pointerEvents:"none"},role:"tooltip",children:[e,t.jsx("div",{style:{position:"absolute",bottom:"-0.25rem",left:"50%",transform:"translateX(-50%) rotate(45deg)",width:"0.5rem",height:"0.5rem",backgroundColor:n.colorBgMuted,borderRight:`1px solid ${n.colorBorder}`,borderBottom:`1px solid ${n.colorBorder}`}})]})]})}function to(e){return"options"in e&&Array.isArray(e.options)}function kr(e,r){return r.value!=="value"?e[r.value]:e.value}function er(e,r){return(r.label!=="label"?e[r.label]:e.label)??kr(e,r)}function ti(e,r){if(e.title)return e.title;const o=er(e,r);return typeof o=="string"?o:String(typeof o=="number"?o:kr(e,r))}function jn(e,r){const o=[];for(const s of e)if(to(s)){const l=r.options!=="options"?s[r.options]:s.options;l&&o.push(...l)}else o.push(s);return o}function cf(e,r,o,s){const l=e.toLowerCase();if(s){const c=r[s];return String(c??"").toLowerCase().includes(l)}return ti(r,o).toLowerCase().includes(l)}const Jt=32,df=32,Sn=5;function uf(e,r){if(!r)return e;const o=e.toLowerCase().indexOf(r.toLowerCase());return o<0?e:t.jsxs(t.Fragment,{children:[e.slice(0,o),t.jsx("span",{style:{fontWeight:700,color:n.colorPrimary},children:e.slice(o,o+r.length)}),e.slice(o+r.length)]})}const ff={large:{height:"2.5rem",fontSize:"1rem",padding:"0.5rem 0.75rem",tagLineHeight:"1.75rem"},middle:{height:"2.25rem",fontSize:"0.875rem",padding:"0.375rem 0.75rem",tagLineHeight:"1.5rem"},small:{height:"1.75rem",fontSize:"0.875rem",padding:"0.125rem 0.5rem",tagLineHeight:"1rem"}};function hf({options:e=[],fieldNames:r,value:o,defaultValue:s,mode:l,labelInValue:a=!1,placeholder:c="Select...",showSearch:u,size:f,variant:d="outlined",status:h,placement:g="bottomLeft",allowClear:m=!1,disabled:x,loading:p=!1,autoFocus:b=!1,virtual:v=!0,popupMatchSelectWidth:j=!0,maxTagCount:C,maxTagPlaceholder:w,maxCount:y,defaultActiveFirstOption:k=!0,optionFilterProp:B,filterOption:R=!0,filterSort:S,tokenSeparators:E,open:$,dropdownRender:I,tagRender:L,labelRender:P,notFoundContent:H,suffix:z,removeIcon:F,clearIcon:M,prefix:W,optionRender:A,onChange:D,onSelect:T,onDeselect:O,onSearch:Y,onClear:X,onFocus:K,onBlur:G,onDropdownVisibleChange:Q,onKeyDown:N,className:le,style:re,classNames:q,styles:_}){const{componentSize:J,componentDisabled:Te}=Gt(),ke=f??J??"middle",Ie=x??Te??!1,fe={label:r?.label??"label",value:r?.value??"value",options:r?.options??"options"},ze=l==="multiple"||l==="tags",me=u??(l==="tags"||!1),he=o!==void 0,[Le,De]=i.useState(()=>{if(!ze)return s??void 0}),[Oe,Be]=i.useState(()=>ze?Array.isArray(s)?s:s!==void 0?[s]:[]:[]),we=ze?void 0:he?o:Le,ee=ze?he?Array.isArray(o)?o.filter(ye=>ye!==""&&ye!==null&&ye!==void 0):o!==void 0&&o!==""&&o!==null?[o]:[]:Oe:[],ae=$!==void 0,[se,Se]=i.useState(!1),ie=ae?$:se,[ce,He]=i.useState(""),[Pe,Ge]=i.useState(-1),[Ne,oe]=i.useState(!1),[Re,Ze]=i.useState(!1),[Fe,et]=i.useState(!1),je=i.useRef(null),ve=i.useRef(null),xe=i.useRef(null),U=i.useRef(null),de=i.useRef(!1),ue=i.useRef("keyboard"),We=i.useRef(null),$e=i.useMemo(()=>jn(e,fe),[e,fe.label,fe.value,fe.options]),ne=i.useMemo(()=>{if(!ce||R===!1)return e;const ye=typeof R=="function"?R:(ct,lt)=>cf(ct,lt,fe,B);return e.map(ct=>{if(to(ct)){const vt=((fe.options!=="options"?ct[fe.options]:ct.options)??[]).filter(kt=>ye(ce,kt));return vt.length===0?null:{...ct,options:vt}}return ye(ce,ct)?ct:null}).filter(Boolean)},[e,ce,R,fe.label,fe.value,fe.options]),be=i.useMemo(()=>{let ye=jn(ne,fe);return S&&ce&&(ye=[...ye].sort(S)),ye},[ne,S,ce,fe.label,fe.value,fe.options]),Ke=i.useMemo(()=>{let ye=0;const Je=[];for(const ct of ne)if(to(ct)){const lt=(fe.options!=="options"?ct[fe.options]:ct.options)??[];Je.push({type:"group-header",label:ct.label,key:`group-${Je.length}`});for(const vt of lt)Je.push({type:"option",option:vt,globalIndex:ye++})}else Je.push({type:"option",option:ct,globalIndex:ye++});return Je},[ne,fe.options]),Qe=v&&Ke.length>df,[tt,dt]=i.useState(0),ft=i.useCallback(ye=>$e.find(Je=>kr(Je,fe)===ye),[$e,fe.value]),gt=i.useCallback(ye=>{ae||Se(ye),Q?.(ye),ye?(Ze(g.startsWith("top")),requestAnimationFrame(()=>{requestAnimationFrame(()=>{et(!0)})})):et(!1)},[ae,Q]),Ct=i.useCallback(ye=>{const Je=kr(ye,fe);he||De(Je);const ct=a?{value:Je,label:er(ye,fe)}:Je;D?.(ct,ye),T?.(Je,ye),He(""),gt(!1),ve.current?.focus()},[fe,he,a,D,T,gt]),jt=i.useCallback(ye=>{const Je=kr(ye,fe),ct=ee.includes(Je);let lt;if(ct)lt=ee.filter(vt=>vt!==Je),O?.(Je,ye);else{if(y!==void 0&&ee.length>=y)return;lt=[...ee,Je],T?.(Je,ye)}if(he||Be(lt),a){const vt=lt.map(kt=>{const qt=ft(kt);return{value:kt,label:qt?er(qt,fe):kt}});D?.(vt,lt.map(kt=>ft(kt)??{value:kt}))}else D?.(lt,lt.map(vt=>ft(vt)??{value:vt}));He("")},[fe,ee,he,a,y,D,T,O,ft]),Mt=i.useCallback(ye=>{ye.disabled||(ze?jt(ye):Ct(ye))},[ze,Ct,jt]),ge=i.useCallback(ye=>{ye.stopPropagation(),ze?(he||Be([]),a?D?.([],[]):D?.([],[])):(he||De(void 0),D?.(void 0,void 0)),He(""),X?.(),ve.current?.focus()},[ze,he,a,D,X]),_e=i.useCallback(ye=>{const Je=ft(ye),ct=ee.filter(lt=>lt!==ye);if(he||Be(ct),Je&&O?.(ye,Je),a){const lt=ct.map(vt=>{const kt=ft(vt);return{value:vt,label:kt?er(kt,fe):vt}});D?.(lt,ct.map(vt=>ft(vt)??{value:vt}))}else D?.(ct,ct.map(lt=>ft(lt)??{value:lt}))},[ee,he,a,fe,D,O,ft]),qe=i.useCallback(()=>{if(l!=="tags"||!ce.trim())return;const ye=ce.trim();if(ee.includes(ye)){He("");return}if(y!==void 0&&ee.length>=y)return;const Je=[...ee,ye];if(he||Be(Je),T?.(ye,{value:ye,label:ye}),a){const lt=Je.map(vt=>{const kt=ft(vt);return{value:vt,label:kt?er(kt,fe):vt}});D?.(lt,Je.map(vt=>ft(vt)??{value:vt}))}else D?.(Je,Je.map(lt=>ft(lt)??{value:lt}));He("")},[l,ce,ee,he,a,fe,D,T,ft]),st=()=>{Ie||(ie?me||gt(!1):gt(!0),me&&setTimeout(()=>xe.current?.focus(),0))},rt=ye=>{const Je=ye.target.value;if(l==="tags"&&E&&E.length>0){const ct=Je.split(new RegExp(`[${E.map(lt=>lt.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("")}]`));if(ct.length>1){let lt=[...ee];for(const vt of ct){const kt=vt.trim();if(!(!kt||lt.includes(kt))){if(y!==void 0&<.length>=y)break;lt.push(kt),T?.(kt,{value:kt,label:kt})}}lt.length!==ee.length&&(he||Be(lt),D?.(lt,lt.map(vt=>ft(vt)??{value:vt}))),He(""),Y?.("");return}}He(Je),Y?.(Je),ie||gt(!0)},xt=i.useCallback(ye=>{if(be.length===0)return;let Je=Pe;for(let ct=0;ct<be.length&&(Je=(Je+ye+be.length)%be.length,!!be[Je].disabled);ct++);Ge(Je)},[be,Pe]),Rt=ye=>{if(!Ie)switch(N?.(ye),ye.key){case"ArrowDown":ye.preventDefault(),ie?xt(1):gt(!0);break;case"ArrowUp":ye.preventDefault(),ie&&xt(-1);break;case"Enter":ie&&Pe>=0&&be[Pe]&&!be[Pe].disabled?(ye.preventDefault(),Mt(be[Pe])):l==="tags"&&ce.trim()&&(ye.preventDefault(),qe());break;case"Escape":ie&&(ye.preventDefault(),gt(!1),ve.current?.focus());break;case"Backspace":if(ze&&!ce&&ee.length>0){const Je=ee[ee.length-1];_e(Je)}break}};i.useEffect(()=>{if(k&&be.length>0){const ye=be.findIndex(Je=>!Je.disabled);Ge(ye>=0?ye:-1)}else Ge(-1)},[be,k]),i.useEffect(()=>{if(!ie&&!Ne)return;const ye=Je=>{je.current&&!je.current.contains(Je.target)&&(ie&&(gt(!1),He("")),oe(!1))};return document.addEventListener("mousedown",ye),()=>document.removeEventListener("mousedown",ye)},[ie,Ne,gt]),i.useEffect(()=>{if(!ie||Pe<0)return;const ye=U.current;if(ye)if(Qe){const Je=Ke.findIndex(vt=>vt.type==="option"&&vt.globalIndex===Pe);if(Je<0)return;const ct=Je*Jt,lt=ct+Jt;ct<ye.scrollTop?ye.scrollTop=ct:lt>ye.scrollTop+ye.clientHeight&&(ye.scrollTop=lt-ye.clientHeight)}else{const Je=ye.querySelector(`[data-option-index="${Pe}"]`);if(Je){const ct=Je.offsetTop,lt=ct+Je.offsetHeight;ct<ye.scrollTop?ye.scrollTop=ct:lt>ye.scrollTop+ye.clientHeight&&(ye.scrollTop=lt-ye.clientHeight)}}},[Pe,ie,Qe,Ke]),i.useLayoutEffect(()=>{if(!ie||!U.current||!je.current)return;const ye=U.current.getBoundingClientRect(),Je=je.current.getBoundingClientRect(),ct=Je.top,lt=window.innerHeight-Je.bottom;!Re&&ye.bottom>window.innerHeight?ct>lt&&Ze(!0):Re&&ye.top<0&<>ct&&Ze(!1)}),i.useEffect(()=>{b&&ve.current&&ve.current.focus()},[b]),i.useEffect(()=>{ie&&me&&setTimeout(()=>xe.current?.focus(),0),ie||He("")},[ie,me]);const Lt=ff[ke],pe=V({position:"relative",display:"inline-block",width:"100%"},_?.root,re),Z={outlined:{border:`1px solid ${n.colorBorder}`,backgroundColor:n.colorBg},filled:{border:"1px solid transparent",backgroundColor:n.colorBgMuted},borderless:{border:"1px solid transparent",backgroundColor:"transparent"}},te=h==="error"?n.colorError:h==="warning"?n.colorWarning:void 0,Ee=h==="error"?n.colorErrorBg:h==="warning"?n.colorWarningBg:n.colorPrimaryLight,Ve=ze?ee.length>0:we!==void 0,Ue={display:"flex",alignItems:ze?"flex-start":"center",flexWrap:ze?"wrap":void 0,width:"100%",height:ze?"auto":Lt.height,minHeight:ze?Lt.height:void 0,padding:Lt.padding,paddingRight:"2.25rem",fontSize:Lt.fontSize,fontFamily:"inherit",borderRadius:"0.375rem",cursor:Ie?"not-allowed":"pointer",userSelect:"none",outline:"none",transition:"border-color 0.2s ease, box-shadow 0.2s ease",color:Ie?n.colorTextSubtle:n.colorText,...Z[d],borderColor:Ne&&!Ie?te||n.colorPrimary:te||(d==="outlined"?n.colorBorder:"transparent"),boxShadow:Ne&&!Ie&&ue.current==="keyboard"?`0 0 0 2px ${Ee}`:"none",...Ie?{opacity:.6}:{},boxSizing:"border-box"},nt=V(Ue,_?.selector),mt=g.endsWith("Right"),Ae={position:"absolute",zIndex:1050,left:mt?void 0:0,right:mt?0:void 0,width:(typeof j=="number"?j:void 0)||(j===!0?"100%":void 0),minWidth:j===!1?"7.5rem":void 0,maxHeight:"min(16rem, 40vh)",overflowY:"auto",overscrollBehavior:"contain",scrollbarWidth:"thin",scrollbarColor:`${n.colorBorderHover} transparent`,backgroundColor:n.colorBg,border:`1px solid ${n.colorBorder}`,borderRadius:"0.5rem",boxShadow:n.shadowMd,padding:"0.25rem 0",opacity:Fe?1:0,transition:"opacity 0.15s ease-out, transform 0.15s ease-out",...Re?{bottom:"100%",marginBottom:"0.25rem",transform:Fe?"translateY(0)":"translateY(6px)"}:{top:"100%",marginTop:"0.25rem",transform:Fe?"translateY(0)":"translateY(-6px)"}},Ce=V(Ae,_?.dropdown),ot={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0.375rem 0.75rem",fontSize:"0.875rem",cursor:"pointer",transition:"background-color 0.15s ease",lineHeight:"1.375rem",whiteSpace:"nowrap",...Qe?{height:Jt,boxSizing:"border-box"}:{}},yt={position:"absolute",right:"0.5rem",top:ze?"0.625rem":"50%",transform:ze?void 0:"translateY(-50%)",display:"flex",alignItems:"center",gap:"0.25rem",pointerEvents:"none"},St={display:"flex",alignItems:"center",justifyContent:"center",width:"1.25rem",height:"1.25rem",borderRadius:"50%",border:"none",backgroundColor:"transparent",color:n.colorTextMuted,cursor:"pointer",padding:0,pointerEvents:"auto",transition:"color 0.15s ease, background-color 0.15s ease"},pt={display:"inline-flex",alignItems:"center",padding:"0.0625rem 0.5rem",fontSize:"0.75rem",lineHeight:"1.25rem",backgroundColor:n.colorBgMuted,borderRadius:"0.25rem",maxWidth:"12.5rem",border:`1px solid ${n.colorBorder}`},Me={border:"none",outline:"none",backgroundColor:"transparent",color:n.colorText,fontFamily:"inherit",fontSize:Lt.fontSize,padding:0,margin:0,lineHeight:Lt.tagLineHeight},Xe=i.useCallback(()=>{if(Ie||Ne)return;const ye=ve.current;ye&&d==="outlined"&&(ye.style.borderColor=te||n.colorBorderHover)},[Ie,Ne,d,te]),at=i.useCallback(()=>{if(Ie||Ne)return;const ye=ve.current;ye&&d==="outlined"&&(ye.style.borderColor=te||n.colorBorder)},[Ie,Ne,d,te]),it=i.useMemo(()=>{if(ze||we===void 0)return null;const ye=ft(we),Je=ye?er(ye,fe):String(we);return P?P({label:Je,value:we}):Je},[ze,we,ft,fe,P]),ut=()=>{if(ee.length===0&&!ce&&!me)return t.jsx("span",{style:{color:n.colorTextSubtle,flex:1,lineHeight:Lt.tagLineHeight},children:c});const ye=C!==void 0?Math.min(C,ee.length):ee.length,Je=ee.slice(0,ye),ct=ee.slice(ye);return t.jsxs("span",{style:{display:"flex",flexWrap:"wrap",gap:"0.25rem",flex:1,overflow:"hidden",alignItems:"center"},children:[Je.map(lt=>{const vt=ft(lt),kt=vt?er(vt,fe):String(lt),qt=P?P({label:kt,value:lt}):kt,Ft=!Ie;return L?t.jsx("span",{children:L({label:qt,value:lt,closable:Ft,onClose:()=>_e(lt)})},String(lt)):t.jsxs("span",{style:V(pt,_?.tag),className:q?.tag,children:[t.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:qt}),Ft&&t.jsx("span",{style:{display:"inline-flex",cursor:"pointer",marginLeft:"0.25rem",color:n.colorTextMuted},onClick:Sr=>{Sr.stopPropagation(),_e(lt)},onMouseDown:Sr=>Sr.preventDefault(),children:F??t.jsx(sf,{})})]},String(lt))}),ct.length>0&&t.jsx(af,{content:ct.map(lt=>{const vt=ft(lt);return String(vt?er(vt,fe):lt)}).join(`
|
|
122
|
+
`),children:t.jsx("span",{style:V(pt,_?.tag),className:q?.tag,children:typeof w=="function"?w(ct):w??`+${ct.length}`})}),me&&t.jsxs(t.Fragment,{children:[t.jsx("input",{ref:xe,type:"text",value:ce,onChange:rt,onKeyDown:Rt,onMouseDown:()=>{de.current=!0},onFocus:()=>{Ne||(ue.current=de.current?"mouse":"keyboard",de.current=!1),oe(!0)},style:{...Me,width:`${Math.max(.25,(ce.length+1)*.5)}rem`,minWidth:ee.length===0&&!ce?"100%":"0.25rem",..._?.search},className:q?.search,autoComplete:"off",placeholder:ee.length===0?c:void 0}),t.jsx("span",{ref:We,style:{position:"absolute",visibility:"hidden",whiteSpace:"pre",fontSize:Lt.fontSize,fontFamily:"inherit"},children:ce||" "})]})]})};let ht=0;const bt=ye=>{const Je=ht++,ct=kr(ye,fe),lt=er(ye,fe),vt=Je===Pe,kt=ze?ee.includes(ct):we===ct,qt=ze&&!kt&&y!==void 0&&ee.length>=y,Ft=ye.disabled||qt,Sr={...ot,backgroundColor:vt?n.colorBgMuted:kt&&!ze?n.colorPrimaryBg:void 0,color:Ft?n.colorTextSubtle:kt&&!ze?n.colorPrimary:n.colorText,fontWeight:kt?600:void 0,cursor:Ft?"not-allowed":"pointer",opacity:Ft?.5:1,..._?.option},Ei=A?A(ye,{index:Je}):me&&ce?uf(ti(ye,fe),ce):lt;return t.jsxs("div",{role:"option","aria-selected":kt,"aria-disabled":Ft,"data-option-index":Je,style:Sr,className:q?.option,onClick:()=>!qt&&Mt(ye),onMouseEnter:Nr=>{Ft||(Ge(Je),(!kt||ze)&&(Nr.currentTarget.style.backgroundColor=n.colorBgMuted))},onMouseLeave:Nr=>{!Ft&&!vt&&(kt&&!ze?Nr.currentTarget.style.backgroundColor=n.colorPrimaryBg:Nr.currentTarget.style.backgroundColor="transparent")},children:[t.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:Ei}),ze&&kt&&t.jsx("span",{style:{display:"flex",marginLeft:"0.5rem",color:n.colorPrimary,flexShrink:0},children:t.jsx(nf,{})})]},String(ct))},Bt=()=>{if(ht=0,be.length===0){const ye=H!==void 0?H:"No data";return ye===null?null:t.jsx("div",{style:{padding:"0.5rem 0.75rem",fontSize:"0.875rem",color:n.colorTextSubtle,textAlign:"center"},children:ye})}if(Qe){const ye=Ke.length*Jt,Je=Math.ceil(256/Jt),ct=Math.max(0,Math.floor(tt/Jt)-Sn),lt=Math.min(Ke.length,ct+Je+2*Sn),vt=ct*Jt,kt=Math.max(0,(Ke.length-lt)*Jt),qt=Ke.slice(ct,lt);return t.jsxs("div",{style:{height:ye,position:"relative"},children:[t.jsx("div",{style:{height:vt}}),qt.map(Ft=>Ft.type==="group-header"?t.jsx("div",{style:{height:Jt,display:"flex",alignItems:"center",padding:"0 0.75rem",fontSize:"0.75rem",color:n.colorTextSubtle,fontWeight:600,userSelect:"none",boxSizing:"border-box"},children:Ft.label},Ft.key):(ht=Ft.globalIndex,bt(Ft.option))),t.jsx("div",{style:{height:kt}})]})}return ne.map((ye,Je)=>{if(to(ye)){const ct=(fe.options!=="options"?ye[fe.options]:ye.options)??[];return t.jsxs("div",{children:[t.jsx("div",{style:{padding:"0.3125rem 0.75rem",fontSize:"0.75rem",color:n.colorTextSubtle,fontWeight:600,userSelect:"none"},children:ye.label}),ct.map(bt)]},`group-${Je}`)}return bt(ye)})},It=be.length>0||H!=null,Et=ie&&!Ie&&(It||p);return t.jsxs("div",{ref:je,style:pe,className:Ye(le,q?.root),children:[t.jsx("style",{children:`
|
|
123
123
|
@keyframes j-select-spin { to { transform: rotate(360deg); } }
|
|
124
124
|
.j-select-dropdown::-webkit-scrollbar { width: 4px; }
|
|
125
125
|
.j-select-dropdown::-webkit-scrollbar-track { background: transparent; }
|
|
126
126
|
.j-select-dropdown::-webkit-scrollbar-thumb { background: ${n.colorBorderHover}; border-radius: 4px; }
|
|
127
127
|
.j-select-dropdown::-webkit-scrollbar-thumb:hover { background: ${n.colorTextSubtle}; }
|
|
128
|
-
`}),t.jsxs("div",{ref:Se,role:"combobox","aria-expanded":ie,"aria-haspopup":"listbox",tabIndex:Le?-1:0,style:nt,className:q?.selector,onClick:st,onKeyDown:ze&&xe?void 0:Rt,onMouseDown:()=>{he.current=!0},onMouseEnter:Xe,onMouseLeave:at,onFocus:ye=>{ye.target===ye.currentTarget&&(de.current=he.current?"mouse":"keyboard",he.current=!1),Be(!0),_?.()},onBlur:ye=>{const Je=ye.relatedTarget;je.current&&Je&&je.current.contains(Je)||(Be(!1),G?.(),ae||(gt(!1),He("")))},children:[W&&t.jsx("span",{style:{display:"flex",alignItems:"center",marginRight:"0.5rem",flexShrink:0},children:W}),ze?ut():t.jsx(t.Fragment,{children:xe&&ie?t.jsx("input",{ref:me,type:"text",value:ce,onChange:rt,onKeyDown:Rt,onMouseDown:()=>{he.current=!0},onFocus:()=>{Z||(de.current=he.current?"mouse":"keyboard",he.current=!1),Be(!0)},style:{...Me,width:"100%",lineHeight:Lt.height,...K?.search},className:q?.search,autoComplete:"off",placeholder:it?String(it):c}):it!==null?t.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},children:it}):t.jsx("span",{style:{color:n.colorTextSubtle,flex:1},children:c})})]}),t.jsxs("span",{style:yt,children:[m&&Ne&&!Le&&t.jsx("button",{type:"button",style:St,onMouseDown:ye=>ye.preventDefault(),onClick:pe,onMouseEnter:ye=>{ye.currentTarget.style.color=n.colorText,ye.currentTarget.style.backgroundColor=n.colorBgMuted},onMouseLeave:ye=>{ye.currentTarget.style.color=n.colorTextMuted,ye.currentTarget.style.backgroundColor="transparent"},tabIndex:-1,"aria-label":"Clear",children:M??t.jsx(of,{})}),t.jsx("span",{style:{display:"flex",color:n.colorTextMuted,pointerEvents:"none",transition:z?void 0:"transform 0.2s ease",transform:z?void 0:ie?"rotate(180deg)":"rotate(0deg)"},children:z??(p?t.jsx(lf,{}):t.jsx(rf,{}))})]}),Et&&t.jsx("div",{ref:U,role:"listbox",style:ve,className:`j-select-dropdown${q?.dropdown?` ${q.dropdown}`:""}`,onMouseDown:ye=>ye.preventDefault(),onScroll:Ze?ye=>dt(ye.currentTarget.scrollTop):void 0,children:I?I(t.jsx(t.Fragment,{children:Bt()})):Bt()})]})}function pf(e){return null}const gf=Object.assign(hf,{Option:pf});function ar(e,r,o){return Math.max(r,Math.min(o,e))}function mf(e,r,o){return o===r?0:(e-r)/(o-r)*100}function Rr(e,r,o,s,l){if(s===null){if(!l)return ar(e,r,o);const c=Object.keys(l).map(Number);return c.length===0?ar(e,r,o):c.reduce((u,f)=>Math.abs(f-e)<Math.abs(u-e)?f:u,c[0])}const a=Math.round((e-r)/s)*s+r;return ar(parseFloat(a.toFixed(10)),r,o)}function xf(e){return typeof e=="object"&&e!==null&&"label"in e}function yf({defaultValue:e,value:r,min:o=0,max:s=100,step:l=1,marks:a,dots:c=!1,included:u=!0,range:f=!1,vertical:d=!1,reverse:h=!1,disabled:g=!1,keyboard:m=!0,tooltip:x,draggableTrack:p=!1,onChange:b,onChangeComplete:v,style:j,className:C,classNames:w,styles:y},k){const B=(()=>{if(f===!0)return{enabled:!0,editable:!1,minCount:2,maxCount:1/0,draggableTrack:!!p};if(typeof f=="object"&&f!==null){const U=!!f.editable;return{enabled:!0,editable:U,minCount:f.minCount??(U?1:2),maxCount:f.maxCount??1/0,draggableTrack:f.draggableTrack??!!p}}return{enabled:!1,editable:!1,minCount:1,maxCount:1,draggableTrack:!1}})(),R=r!==void 0,[S,L]=i.useState(()=>e!==void 0?e:B.enabled?[o,o]:o),$=R?r:S,I=(()=>{if(B.enabled){const U=Array.isArray($)?[...$]:[$];return U.sort((he,de)=>he-de),U}return[typeof $=="number"?$:$[0]??o]})(),P=I,E=P.length,H=i.useRef(null),z=i.useRef(null),A=i.useRef([]);A.current.length!==E&&(A.current=Array.from({length:E},(U,he)=>A.current[he]??null));const M=i.useRef(null),W=i.useRef($);W.current=$;const[F,D]=i.useState(!1),[T,O]=i.useState(null),[Y,X]=i.useState(0),[_,G]=i.useState(!1),[Q,N]=i.useState("keyboard"),le=i.useRef(!1),[oe,q]=i.useState(null),K=i.useRef(null);K.current=oe,i.useImperativeHandle(k,()=>({focus:()=>H.current?.focus(),blur:()=>H.current?.blur()}));const re=i.useCallback(U=>{R||L(U),b?.(U)},[R,b]),Te=i.useCallback(U=>{const he=z.current;if(!he)return null;const de=he.getBoundingClientRect();let We;d?We=(de.bottom-U.clientY)/de.height*100:We=(U.clientX-de.left)/de.width*100,h&&(We=100-We),We=ar(We,0,100);const $e=o+We/100*(s-o);return Rr($e,o,s,l,a)},[d,h,o,s,l,a]),Ce=i.useCallback(U=>he=>{if(g)return;he.preventDefault(),he.stopPropagation();const de=z.current?.getBoundingClientRect();de&&(M.current={handleIndex:U,containerRect:de,isDraggingTrack:!1},D(!0),X(U),le.current=!0,N("mouse"),H.current?.focus())},[g]),Le=i.useCallback(U=>{if(g||!B.enabled||!B.draggableTrack)return;U.preventDefault(),U.stopPropagation();const he=z.current?.getBoundingClientRect();if(!he)return;let de;d?de=(he.bottom-U.clientY)/he.height*100:de=(U.clientX-he.left)/he.width*100,h&&(de=100-de),M.current={handleIndex:-1,containerRect:he,isDraggingTrack:!0,trackStartValues:[...I],trackStartPercent:de},D(!0),le.current=!0,N("mouse"),H.current?.focus()},[g,B.enabled,B.draggableTrack,d,h,I]),ue=i.useCallback(U=>{if(g||F)return;const he=z.current;if(!he)return;const de=he.getBoundingClientRect();let We;d?We=(de.bottom-U.clientY)/de.height*100:We=(U.clientX-de.left)/de.width*100,h&&(We=100-We),We=ar(We,0,100);const $e=o+We/100*(s-o),ne=Rr($e,o,s,l,a);if(B.editable&&E<B.maxCount){const be=[...I,ne];be.sort((Ze,tt)=>Ze-tt);const Ye=be.indexOf(ne);X(Ye),re(be),v?.(be)}else if(B.enabled){const be=[...I];let Ye=0,Ze=1/0;for(let tt=0;tt<be.length;tt++){const dt=Math.abs(be[tt]-ne);dt<Ze&&(Ze=dt,Ye=tt)}be[Ye]=ne,be.sort((tt,dt)=>tt-dt),re(be),X(Ye),v?.(be)}else re(ne),v?.(ne)},[g,F,d,h,o,s,l,a,B,I,E,re,v]);i.useEffect(()=>{if(!F)return;const U=de=>{const We=M.current;if(!We)return;if(We.isDraggingTrack&&We.trackStartValues&&We.trackStartPercent!==void 0){const ne=z.current;if(!ne)return;const be=ne.getBoundingClientRect();let Ye;d?Ye=(be.bottom-de.clientY)/be.height*100:Ye=(de.clientX-be.left)/be.width*100,h&&(Ye=100-Ye);const Ze=(Ye-We.trackStartPercent)/100*(s-o);let tt=We.trackStartValues.map(gt=>gt+Ze);const dt=Math.min(...tt);dt<o&&(tt=tt.map(gt=>gt+(o-dt)));const ft=Math.max(...tt);ft>s&&(tt=tt.map(gt=>gt-(ft-s))),tt=tt.map(gt=>Rr(ar(gt,o,s),o,s,l,a)),re(tt);return}const $e=Te(de);if($e!==null){if(B.enabled){const ne=[...Array.isArray(W.current)?W.current:[W.current]];ne[We.handleIndex]=$e,ne.sort((be,Ye)=>be-Ye),re(ne)}else re($e);if(B.editable&&!We.isDraggingTrack&&(Array.isArray(W.current)?W.current.length:1)>B.minCount){const be=z.current;if(be){const Ye=be.getBoundingClientRect();let Ze;if(d){const dt=Ye.left+Ye.width/2;Ze=Math.abs(de.clientX-dt)}else{const dt=Ye.top+Ye.height/2;Ze=Math.abs(de.clientY-dt)}Ze>60?q(We.handleIndex):q(null)}}}},he=()=>{const de=K.current;if(de!==null&&B.editable){const We=[...Array.isArray(W.current)?W.current:[W.current]];if(We.length>B.minCount){We.splice(de,1),We.sort((ne,be)=>ne-be);const $e=Math.min(Y,We.length-1);X($e),re(We),v?.(We)}else v?.(W.current)}else v?.(W.current);q(null),D(!1),M.current=null};return document.addEventListener("mousemove",U),document.addEventListener("mouseup",he),()=>{document.removeEventListener("mousemove",U),document.removeEventListener("mouseup",he)}},[F]);const ze=i.useCallback(U=>{if(g||!m)return;const he=l??1;let de=!0;const We=ne=>{if(B.enabled){const be=[...I];be[Y]=ar(be[Y]+ne,o,s),be[Y]=Rr(be[Y],o,s,l,a),be.sort((Ye,Ze)=>Ye-Ze),re(be),v?.(be)}else{const be=Rr(ar(W.current+ne,o,s),o,s,l,a);re(be),v?.(be)}},$e=ne=>{if(B.enabled){const be=[...I];be[Y]=ne,be.sort((Ye,Ze)=>Ye-Ze),re(be),v?.(be)}else re(ne),v?.(ne)};switch(U.key){case"ArrowRight":case"ArrowUp":We(h?-he:he);break;case"ArrowLeft":case"ArrowDown":We(h?he:-he);break;case"Home":$e(o);break;case"End":$e(s);break;case"Tab":B.enabled&&E>1?U.shiftKey?Y>0?(U.preventDefault(),X(Y-1)):de=!1:Y<E-1?(U.preventDefault(),X(Y+1)):de=!1:de=!1;break;case"Delete":case"Backspace":if(B.editable&&E>B.minCount){const ne=[...I];ne.splice(Y,1);const be=Math.min(Y,ne.length-1);X(be),re(ne),v?.(ne)}else de=!1;break;default:de=!1}de&&U.preventDefault()},[g,m,l,a,B,I,E,Y,o,s,h,re,v]),xe=i.useCallback(U=>()=>{g||O(U)},[g]),ge=i.useCallback(()=>{O(null)},[]),Ie=i.useCallback(U=>{if(!g)if(B.enabled){const he=[...I];let de=0,We=1/0;for(let $e=0;$e<he.length;$e++){const ne=Math.abs(he[$e]-U);ne<We&&(We=ne,de=$e)}he[de]=U,he.sort(($e,ne)=>$e-ne),re(he),v?.(he)}else re(U),v?.(U)},[g,B.enabled,I,re,v]),De=x?.open,Ae=x?.formatter===null,Re=x?.placement??(d?"right":"top"),ke=x?.formatter??(U=>U),ee=U=>Ae?!1:De===!0?!0:De===!1?!1:T===U||F&&M.current?.handleIndex===U||F&&M.current?.isDraggingTrack===!0,ae=U=>{const he=mf(U,o,s);return h?100-he:he},se=[];if(B.enabled&&u&&E>=2)for(let U=0;U<E-1;U++){const he=ae(I[U]),de=ae(I[U+1]),We=Math.min(he,de),$e=Math.abs(de-he);se.push({start:We,size:$e})}else if(!B.enabled&&u){const U=ae(o),he=ae(I[0]),de=Math.min(U,he),We=Math.abs(he-U);se.push({start:de,size:We})}const we=[];if(c&&l!==null&&l>0)for(let U=o;U<=s;U=parseFloat((U+l).toFixed(10)))we.push(U);const ie=a?Object.entries(a).map(([U,he])=>[Number(U),he]):[],ce={position:"relative",display:"flex",alignItems:"center",...d?{flexDirection:"column",height:"100%",width:"1.875rem",padding:"0 0.375rem"}:{width:"100%",height:"1.875rem",padding:"0.375rem 0"},cursor:g?"default":"pointer",...g?{opacity:.5}:{},outline:"none",boxShadow:_&&!g&&Q==="keyboard"?`0 0 0 2px ${n.colorPrimaryLight}`:"none",borderRadius:"0.25rem",userSelect:"none",touchAction:"none"},He={position:"relative",...d?{width:"0.25rem",height:"100%",borderRadius:"0.125rem"}:{width:"100%",height:"0.25rem",borderRadius:"0.125rem"},backgroundColor:n.colorBgMuted},Pe={position:"absolute",width:"0.875rem",height:"0.875rem",borderRadius:"50%",backgroundColor:n.colorBg,border:`2px solid ${g?n.colorBorder:n.colorPrimary}`,cursor:g?"default":"grab",transition:F?"none":"left 0.15s ease, bottom 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease",zIndex:1,...d?{left:"50%",transform:"translate(-50%, 50%)"}:{top:"50%",transform:"translate(-50%, -50%)"}},Ge={position:"absolute",width:"0.5rem",height:"0.5rem",borderRadius:"50%",backgroundColor:n.colorBg,transition:"border-color 0.15s ease",...d?{left:"50%",transform:"translate(-50%, 50%)"}:{top:"50%",transform:"translate(-50%, -50%)"}},Z={position:"absolute",fontSize:"0.75rem",whiteSpace:"nowrap",cursor:g?"default":"pointer",transition:"color 0.15s ease",...d?{left:"100%",marginLeft:"0.5rem",transform:"translateY(50%)"}:{top:"100%",marginTop:"0.5rem",transform:"translateX(-50%)"}},Be={position:"absolute",zIndex:1050,padding:"0.25rem 0.5rem",borderRadius:"0.25rem",fontSize:"0.75rem",fontWeight:500,whiteSpace:"nowrap",backgroundColor:n.colorBgMuted,color:n.colorText,border:`1px solid ${n.colorBorder}`,boxShadow:n.shadowMd,pointerEvents:"none",...Re==="top"?{bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"0.375rem"}:{},...Re==="bottom"?{top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"0.375rem"}:{},...Re==="left"?{right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"0.375rem"}:{},...Re==="right"?{left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"0.375rem"}:{}},Oe=U=>{if(!u)return!1;if(B.enabled){for(let he=0;he<I.length-1;he++)if(U>=I[he]&&U<=I[he+1])return!0;return!1}return U>=o&&U<=I[0]},Qe=!!(y?.handle&&("backgroundColor"in y.handle||"borderColor"in y.handle||"border"in y.handle)),_e=(U,he)=>{const de=ae(U),We=d?{bottom:`${de}%`}:{left:`${de}%`},$e=ke?ke(U):U;return t.jsx("div",{ref:ne=>{A.current[he]=ne},role:"slider","aria-valuemin":o,"aria-valuemax":s,"aria-valuenow":U,"aria-label":E>1?`Handle ${he+1} of ${E}`:void 0,style:V({...Pe,...We},y?.handle),className:Ve("j-slider-handle",w?.handle),"data-disabled":g||void 0,"data-custom-colors":Qe||void 0,"data-active":Y===he||void 0,"data-removing":oe===he||void 0,onMouseDown:Ce(he),onMouseEnter:xe(he),onMouseLeave:ge,children:ee(he)&&t.jsx("div",{style:V(Be,y?.tooltip),className:w?.tooltip,role:"tooltip",children:$e})},he)},et=new Set;we.forEach(U=>et.add(U)),ie.forEach(([U])=>et.add(U));const je=U=>{const he=ae(U),de=Oe(U),We=d?{bottom:`${he}%`}:{left:`${he}%`};return t.jsx("div",{style:V({...Ge,...We,border:`2px solid ${de?n.colorPrimary:n.colorBorder}`},y?.dot),className:w?.dot},`dot-${U}`)},Se=([U,he])=>{const de=ae(U),We=Oe(U),$e=d?{bottom:`${de}%`}:{left:`${de}%`},ne={...Z,...$e,color:We?n.colorText:n.colorTextSubtle};return xf(he)?t.jsx("div",{style:V({...ne,...he.style},y?.mark),className:w?.mark,onClick:()=>Ie(U),children:he.label},`mark-${U}`):t.jsx("div",{style:V(ne,y?.mark),className:w?.mark,onClick:()=>Ie(U),children:he},`mark-${U}`)},me=B.enabled&&E>1;return t.jsxs("div",{ref:H,role:me?"group":"slider",tabIndex:g?-1:0,"aria-valuemin":me?void 0:o,"aria-valuemax":me?void 0:s,"aria-valuenow":me?void 0:I[0],"aria-valuetext":me?I.join(" - "):void 0,"aria-label":me?"Slider range":void 0,"aria-disabled":g,"aria-orientation":d?"vertical":"horizontal",style:V(ce,y?.root,j),className:Ve(C,w?.root),onKeyDown:ze,onMouseDown:()=>{le.current=!0,N("mouse")},onFocus:()=>{N(le.current?"mouse":"keyboard"),le.current=!1,G(!0)},onBlur:()=>G(!1),children:[t.jsx("style",{children:`
|
|
128
|
+
`}),t.jsxs("div",{ref:ve,role:"combobox","aria-expanded":ie,"aria-haspopup":"listbox",tabIndex:Ie?-1:0,style:nt,className:q?.selector,onClick:st,onKeyDown:ze&&me?void 0:Rt,onMouseDown:()=>{de.current=!0},onMouseEnter:Xe,onMouseLeave:at,onFocus:ye=>{ye.target===ye.currentTarget&&(ue.current=de.current?"mouse":"keyboard",de.current=!1),oe(!0),K?.()},onBlur:ye=>{const Je=ye.relatedTarget;je.current&&Je&&je.current.contains(Je)||(oe(!1),G?.(),ae||(gt(!1),He("")))},children:[W&&t.jsx("span",{style:{display:"flex",alignItems:"center",marginRight:"0.5rem",flexShrink:0},children:W}),ze?ut():t.jsx(t.Fragment,{children:me&&ie?t.jsx("input",{ref:xe,type:"text",value:ce,onChange:rt,onKeyDown:Rt,onMouseDown:()=>{de.current=!0},onFocus:()=>{Ne||(ue.current=de.current?"mouse":"keyboard",de.current=!1),oe(!0)},style:{...Me,width:"100%",lineHeight:Lt.height,..._?.search},className:q?.search,autoComplete:"off",placeholder:it?String(it):c}):it!==null?t.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},children:it}):t.jsx("span",{style:{color:n.colorTextSubtle,flex:1},children:c})})]}),t.jsxs("span",{style:yt,children:[m&&Ve&&!Ie&&t.jsx("button",{type:"button",style:St,onMouseDown:ye=>ye.preventDefault(),onClick:ge,onMouseEnter:ye=>{ye.currentTarget.style.color=n.colorText,ye.currentTarget.style.backgroundColor=n.colorBgMuted},onMouseLeave:ye=>{ye.currentTarget.style.color=n.colorTextMuted,ye.currentTarget.style.backgroundColor="transparent"},tabIndex:-1,"aria-label":"Clear",children:M??t.jsx(of,{})}),t.jsx("span",{style:{display:"flex",color:n.colorTextMuted,pointerEvents:"none",transition:z?void 0:"transform 0.2s ease",transform:z?void 0:ie?"rotate(180deg)":"rotate(0deg)"},children:z??(p?t.jsx(lf,{}):t.jsx(rf,{}))})]}),Et&&t.jsx("div",{ref:U,role:"listbox",style:Ce,className:`j-select-dropdown${q?.dropdown?` ${q.dropdown}`:""}`,onMouseDown:ye=>ye.preventDefault(),onScroll:Qe?ye=>dt(ye.currentTarget.scrollTop):void 0,children:I?I(t.jsx(t.Fragment,{children:Bt()})):Bt()})]})}function pf(e){return null}const gf=Object.assign(hf,{Option:pf});function ar(e,r,o){return Math.max(r,Math.min(o,e))}function mf(e,r,o){return o===r?0:(e-r)/(o-r)*100}function Rr(e,r,o,s,l){if(s===null){if(!l)return ar(e,r,o);const c=Object.keys(l).map(Number);return c.length===0?ar(e,r,o):c.reduce((u,f)=>Math.abs(f-e)<Math.abs(u-e)?f:u,c[0])}const a=Math.round((e-r)/s)*s+r;return ar(parseFloat(a.toFixed(10)),r,o)}function xf(e){return typeof e=="object"&&e!==null&&"label"in e}function yf({defaultValue:e,value:r,min:o=0,max:s=100,step:l=1,marks:a,dots:c=!1,included:u=!0,range:f=!1,vertical:d=!1,reverse:h=!1,disabled:g=!1,keyboard:m=!0,tooltip:x,draggableTrack:p=!1,onChange:b,onChangeComplete:v,style:j,className:C,classNames:w,styles:y},k){const B=(()=>{if(f===!0)return{enabled:!0,editable:!1,minCount:2,maxCount:1/0,draggableTrack:!!p};if(typeof f=="object"&&f!==null){const U=!!f.editable;return{enabled:!0,editable:U,minCount:f.minCount??(U?1:2),maxCount:f.maxCount??1/0,draggableTrack:f.draggableTrack??!!p}}return{enabled:!1,editable:!1,minCount:1,maxCount:1,draggableTrack:!1}})(),R=r!==void 0,[S,E]=i.useState(()=>e!==void 0?e:B.enabled?[o,o]:o),$=R?r:S,I=(()=>{if(B.enabled){const U=Array.isArray($)?[...$]:[$];return U.sort((de,ue)=>de-ue),U}return[typeof $=="number"?$:$[0]??o]})(),L=I,P=L.length,H=i.useRef(null),z=i.useRef(null),F=i.useRef([]);F.current.length!==P&&(F.current=Array.from({length:P},(U,de)=>F.current[de]??null));const M=i.useRef(null),W=i.useRef($);W.current=$;const[A,D]=i.useState(!1),[T,O]=i.useState(null),[Y,X]=i.useState(0),[K,G]=i.useState(!1),[Q,N]=i.useState("keyboard"),le=i.useRef(!1),[re,q]=i.useState(null),_=i.useRef(null);_.current=re,i.useImperativeHandle(k,()=>({focus:()=>H.current?.focus(),blur:()=>H.current?.blur()}));const J=i.useCallback(U=>{R||E(U),b?.(U)},[R,b]),Te=i.useCallback(U=>{const de=z.current;if(!de)return null;const ue=de.getBoundingClientRect();let We;d?We=(ue.bottom-U.clientY)/ue.height*100:We=(U.clientX-ue.left)/ue.width*100,h&&(We=100-We),We=ar(We,0,100);const $e=o+We/100*(s-o);return Rr($e,o,s,l,a)},[d,h,o,s,l,a]),ke=i.useCallback(U=>de=>{if(g)return;de.preventDefault(),de.stopPropagation();const ue=z.current?.getBoundingClientRect();ue&&(M.current={handleIndex:U,containerRect:ue,isDraggingTrack:!1},D(!0),X(U),le.current=!0,N("mouse"),H.current?.focus())},[g]),Ie=i.useCallback(U=>{if(g||!B.enabled||!B.draggableTrack)return;U.preventDefault(),U.stopPropagation();const de=z.current?.getBoundingClientRect();if(!de)return;let ue;d?ue=(de.bottom-U.clientY)/de.height*100:ue=(U.clientX-de.left)/de.width*100,h&&(ue=100-ue),M.current={handleIndex:-1,containerRect:de,isDraggingTrack:!0,trackStartValues:[...I],trackStartPercent:ue},D(!0),le.current=!0,N("mouse"),H.current?.focus()},[g,B.enabled,B.draggableTrack,d,h,I]),fe=i.useCallback(U=>{if(g||A)return;const de=z.current;if(!de)return;const ue=de.getBoundingClientRect();let We;d?We=(ue.bottom-U.clientY)/ue.height*100:We=(U.clientX-ue.left)/ue.width*100,h&&(We=100-We),We=ar(We,0,100);const $e=o+We/100*(s-o),ne=Rr($e,o,s,l,a);if(B.editable&&P<B.maxCount){const be=[...I,ne];be.sort((Qe,tt)=>Qe-tt);const Ke=be.indexOf(ne);X(Ke),J(be),v?.(be)}else if(B.enabled){const be=[...I];let Ke=0,Qe=1/0;for(let tt=0;tt<be.length;tt++){const dt=Math.abs(be[tt]-ne);dt<Qe&&(Qe=dt,Ke=tt)}be[Ke]=ne,be.sort((tt,dt)=>tt-dt),J(be),X(Ke),v?.(be)}else J(ne),v?.(ne)},[g,A,d,h,o,s,l,a,B,I,P,J,v]);i.useEffect(()=>{if(!A)return;const U=ue=>{const We=M.current;if(!We)return;if(We.isDraggingTrack&&We.trackStartValues&&We.trackStartPercent!==void 0){const ne=z.current;if(!ne)return;const be=ne.getBoundingClientRect();let Ke;d?Ke=(be.bottom-ue.clientY)/be.height*100:Ke=(ue.clientX-be.left)/be.width*100,h&&(Ke=100-Ke);const Qe=(Ke-We.trackStartPercent)/100*(s-o);let tt=We.trackStartValues.map(gt=>gt+Qe);const dt=Math.min(...tt);dt<o&&(tt=tt.map(gt=>gt+(o-dt)));const ft=Math.max(...tt);ft>s&&(tt=tt.map(gt=>gt-(ft-s))),tt=tt.map(gt=>Rr(ar(gt,o,s),o,s,l,a)),J(tt);return}const $e=Te(ue);if($e!==null){if(B.enabled){const ne=[...Array.isArray(W.current)?W.current:[W.current]];ne[We.handleIndex]=$e,ne.sort((be,Ke)=>be-Ke),J(ne)}else J($e);if(B.editable&&!We.isDraggingTrack&&(Array.isArray(W.current)?W.current.length:1)>B.minCount){const be=z.current;if(be){const Ke=be.getBoundingClientRect();let Qe;if(d){const dt=Ke.left+Ke.width/2;Qe=Math.abs(ue.clientX-dt)}else{const dt=Ke.top+Ke.height/2;Qe=Math.abs(ue.clientY-dt)}Qe>60?q(We.handleIndex):q(null)}}}},de=()=>{const ue=_.current;if(ue!==null&&B.editable){const We=[...Array.isArray(W.current)?W.current:[W.current]];if(We.length>B.minCount){We.splice(ue,1),We.sort((ne,be)=>ne-be);const $e=Math.min(Y,We.length-1);X($e),J(We),v?.(We)}else v?.(W.current)}else v?.(W.current);q(null),D(!1),M.current=null};return document.addEventListener("mousemove",U),document.addEventListener("mouseup",de),()=>{document.removeEventListener("mousemove",U),document.removeEventListener("mouseup",de)}},[A]);const ze=i.useCallback(U=>{if(g||!m)return;const de=l??1;let ue=!0;const We=ne=>{if(B.enabled){const be=[...I];be[Y]=ar(be[Y]+ne,o,s),be[Y]=Rr(be[Y],o,s,l,a),be.sort((Ke,Qe)=>Ke-Qe),J(be),v?.(be)}else{const be=Rr(ar(W.current+ne,o,s),o,s,l,a);J(be),v?.(be)}},$e=ne=>{if(B.enabled){const be=[...I];be[Y]=ne,be.sort((Ke,Qe)=>Ke-Qe),J(be),v?.(be)}else J(ne),v?.(ne)};switch(U.key){case"ArrowRight":case"ArrowUp":We(h?-de:de);break;case"ArrowLeft":case"ArrowDown":We(h?de:-de);break;case"Home":$e(o);break;case"End":$e(s);break;case"Tab":B.enabled&&P>1?U.shiftKey?Y>0?(U.preventDefault(),X(Y-1)):ue=!1:Y<P-1?(U.preventDefault(),X(Y+1)):ue=!1:ue=!1;break;case"Delete":case"Backspace":if(B.editable&&P>B.minCount){const ne=[...I];ne.splice(Y,1);const be=Math.min(Y,ne.length-1);X(be),J(ne),v?.(ne)}else ue=!1;break;default:ue=!1}ue&&U.preventDefault()},[g,m,l,a,B,I,P,Y,o,s,h,J,v]),me=i.useCallback(U=>()=>{g||O(U)},[g]),he=i.useCallback(()=>{O(null)},[]),Le=i.useCallback(U=>{if(!g)if(B.enabled){const de=[...I];let ue=0,We=1/0;for(let $e=0;$e<de.length;$e++){const ne=Math.abs(de[$e]-U);ne<We&&(We=ne,ue=$e)}de[ue]=U,de.sort(($e,ne)=>$e-ne),J(de),v?.(de)}else J(U),v?.(U)},[g,B.enabled,I,J,v]),De=x?.open,Oe=x?.formatter===null,Be=x?.placement??(d?"right":"top"),we=x?.formatter??(U=>U),ee=U=>Oe?!1:De===!0?!0:De===!1?!1:T===U||A&&M.current?.handleIndex===U||A&&M.current?.isDraggingTrack===!0,ae=U=>{const de=mf(U,o,s);return h?100-de:de},se=[];if(B.enabled&&u&&P>=2)for(let U=0;U<P-1;U++){const de=ae(I[U]),ue=ae(I[U+1]),We=Math.min(de,ue),$e=Math.abs(ue-de);se.push({start:We,size:$e})}else if(!B.enabled&&u){const U=ae(o),de=ae(I[0]),ue=Math.min(U,de),We=Math.abs(de-U);se.push({start:ue,size:We})}const Se=[];if(c&&l!==null&&l>0)for(let U=o;U<=s;U=parseFloat((U+l).toFixed(10)))Se.push(U);const ie=a?Object.entries(a).map(([U,de])=>[Number(U),de]):[],ce={position:"relative",display:"flex",alignItems:"center",...d?{flexDirection:"column",height:"100%",width:"1.875rem",padding:"0 0.375rem"}:{width:"100%",height:"1.875rem",padding:"0.375rem 0"},cursor:g?"default":"pointer",...g?{opacity:.5}:{},outline:"none",boxShadow:K&&!g&&Q==="keyboard"?`0 0 0 2px ${n.colorPrimaryLight}`:"none",borderRadius:"0.25rem",userSelect:"none",touchAction:"none"},He={position:"relative",...d?{width:"0.25rem",height:"100%",borderRadius:"0.125rem"}:{width:"100%",height:"0.25rem",borderRadius:"0.125rem"},backgroundColor:n.colorBgMuted},Pe={position:"absolute",width:"0.875rem",height:"0.875rem",borderRadius:"50%",backgroundColor:n.colorBg,border:`2px solid ${g?n.colorBorder:n.colorPrimary}`,cursor:g?"default":"grab",transition:A?"none":"left 0.15s ease, bottom 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease",zIndex:1,...d?{left:"50%",transform:"translate(-50%, 50%)"}:{top:"50%",transform:"translate(-50%, -50%)"}},Ge={position:"absolute",width:"0.5rem",height:"0.5rem",borderRadius:"50%",backgroundColor:n.colorBg,transition:"border-color 0.15s ease",...d?{left:"50%",transform:"translate(-50%, 50%)"}:{top:"50%",transform:"translate(-50%, -50%)"}},Ne={position:"absolute",fontSize:"0.75rem",whiteSpace:"nowrap",cursor:g?"default":"pointer",transition:"color 0.15s ease",...d?{left:"100%",marginLeft:"0.5rem",transform:"translateY(50%)"}:{top:"100%",marginTop:"0.5rem",transform:"translateX(-50%)"}},oe={position:"absolute",zIndex:1050,padding:"0.25rem 0.5rem",borderRadius:"0.25rem",fontSize:"0.75rem",fontWeight:500,whiteSpace:"nowrap",backgroundColor:n.colorBgMuted,color:n.colorText,border:`1px solid ${n.colorBorder}`,boxShadow:n.shadowMd,pointerEvents:"none",...Be==="top"?{bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"0.375rem"}:{},...Be==="bottom"?{top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"0.375rem"}:{},...Be==="left"?{right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"0.375rem"}:{},...Be==="right"?{left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"0.375rem"}:{}},Re=U=>{if(!u)return!1;if(B.enabled){for(let de=0;de<I.length-1;de++)if(U>=I[de]&&U<=I[de+1])return!0;return!1}return U>=o&&U<=I[0]},Ze=!!(y?.handle&&("backgroundColor"in y.handle||"borderColor"in y.handle||"border"in y.handle)),Fe=(U,de)=>{const ue=ae(U),We=d?{bottom:`${ue}%`}:{left:`${ue}%`},$e=we?we(U):U;return t.jsx("div",{ref:ne=>{F.current[de]=ne},role:"slider","aria-valuemin":o,"aria-valuemax":s,"aria-valuenow":U,"aria-label":P>1?`Handle ${de+1} of ${P}`:void 0,style:V({...Pe,...We},y?.handle),className:Ye("j-slider-handle",w?.handle),"data-disabled":g||void 0,"data-custom-colors":Ze||void 0,"data-active":Y===de||void 0,"data-removing":re===de||void 0,onMouseDown:ke(de),onMouseEnter:me(de),onMouseLeave:he,children:ee(de)&&t.jsx("div",{style:V(oe,y?.tooltip),className:w?.tooltip,role:"tooltip",children:$e})},de)},et=new Set;Se.forEach(U=>et.add(U)),ie.forEach(([U])=>et.add(U));const je=U=>{const de=ae(U),ue=Re(U),We=d?{bottom:`${de}%`}:{left:`${de}%`};return t.jsx("div",{style:V({...Ge,...We,border:`2px solid ${ue?n.colorPrimary:n.colorBorder}`},y?.dot),className:w?.dot},`dot-${U}`)},ve=([U,de])=>{const ue=ae(U),We=Re(U),$e=d?{bottom:`${ue}%`}:{left:`${ue}%`},ne={...Ne,...$e,color:We?n.colorText:n.colorTextSubtle};return xf(de)?t.jsx("div",{style:V({...ne,...de.style},y?.mark),className:w?.mark,onClick:()=>Le(U),children:de.label},`mark-${U}`):t.jsx("div",{style:V(ne,y?.mark),className:w?.mark,onClick:()=>Le(U),children:de},`mark-${U}`)},xe=B.enabled&&P>1;return t.jsxs("div",{ref:H,role:xe?"group":"slider",tabIndex:g?-1:0,"aria-valuemin":xe?void 0:o,"aria-valuemax":xe?void 0:s,"aria-valuenow":xe?void 0:I[0],"aria-valuetext":xe?I.join(" - "):void 0,"aria-label":xe?"Slider range":void 0,"aria-disabled":g,"aria-orientation":d?"vertical":"horizontal",style:V(ce,y?.root,j),className:Ye(C,w?.root),onKeyDown:ze,onMouseDown:()=>{le.current=!0,N("mouse")},onFocus:()=>{N(le.current?"mouse":"keyboard"),le.current=!1,G(!0)},onBlur:()=>G(!1),children:[t.jsx("style",{children:`
|
|
129
129
|
.j-slider-handle:not([data-disabled]):not([data-custom-colors]):hover {
|
|
130
130
|
border-color: ${n.colorPrimaryHover} !important;
|
|
131
131
|
box-shadow: 0 0 0 4px ${n.colorPrimaryLight} !important;
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
filter: none !important;
|
|
142
142
|
box-shadow: none !important;
|
|
143
143
|
}
|
|
144
|
-
`}),
|
|
144
|
+
`}),A&&t.jsx("div",{style:{position:"fixed",inset:0,zIndex:9999,cursor:"grabbing"}}),t.jsxs("div",{ref:z,style:V(He,y?.rail),className:w?.rail,onClick:fe,children:[se.map((U,de)=>{const ue={position:"absolute",borderRadius:"0.125rem",backgroundColor:g?n.colorBorder:n.colorPrimary,transition:A?"none":"all 0.15s ease",...d?{width:"100%",bottom:`${U.start}%`,height:`${U.size}%`,left:0}:{height:"100%",left:`${U.start}%`,width:`${U.size}%`,top:0},...B.draggableTrack&&B.enabled&&!g?{cursor:"grab"}:{}};return t.jsx("div",{style:V(ue,y?.track),className:w?.track,onMouseDown:B.draggableTrack&&B.enabled?Ie:void 0},`track-${de}`)}),(c||ie.length>0)&&Array.from(et).map(U=>je(U)),L.map((U,de)=>Fe(U,de))]}),ie.length>0&&ie.map(ve)]})}const bf=i.forwardRef(yf),ko=`
|
|
145
145
|
@keyframes j-spinner-rotate { to { transform: rotate(360deg); } }
|
|
146
146
|
@keyframes j-spinner-dash {
|
|
147
147
|
0% { stroke-dasharray: 1, 200; stroke-dashoffset: 0; }
|
|
@@ -164,23 +164,23 @@
|
|
|
164
164
|
0% { transform: scale(0.6); opacity: 0.3; }
|
|
165
165
|
50% { transform: scale(1); opacity: 1; }
|
|
166
166
|
100% { transform: scale(0.6); opacity: 0.3; }
|
|
167
|
-
}`,vf={small:{diameter:"1rem",diameterPx:16,strokeWidth:3,gradientStrokeWidth:4.5,tipFontSize:"0.75rem"},default:{diameter:"1.5rem",diameterPx:24,strokeWidth:3,gradientStrokeWidth:4.5,tipFontSize:"0.875rem"},large:{diameter:"2.5rem",diameterPx:40,strokeWidth:3,gradientStrokeWidth:5,tipFontSize:"1rem"}},wo=8;function Or({diameter:e,children:r,speed:o="0.8s"}){return t.jsx("div",{style:{width:e,height:e,animation:`j-spinner-rotate ${o} linear infinite`,lineHeight:0},children:r})}function Cf({diameter:e,strokeWidth:r}){const o=`calc(${e} * ${r/50})`;return t.jsx(Or,{diameter:e,children:t.jsxs("div",{style:{width:"100%",height:"100%",position:"relative"},children:[t.jsx("div",{style:{position:"absolute",inset:0,borderRadius:"50%",border:`${o} solid ${n.colorBgMuted}`,boxSizing:"border-box"}}),t.jsx("div",{style:{position:"absolute",inset:0,borderRadius:"50%",background:`conic-gradient(from 0deg, transparent 0%, ${n.colorPrimary} 30%, transparent 30.5%)`,mask:`radial-gradient(farthest-side, transparent calc(100% - ${o}), #000 calc(100% - ${o}))`,WebkitMask:`radial-gradient(farthest-side, transparent calc(100% - ${o}), #000 calc(100% - ${o}))`}})]})})}function kf({diameter:e,strokeWidth:r}){const s=2*Math.PI*20;return t.jsx(Or,{diameter:e,children:t.jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 50 50",fill:"none",children:[t.jsx("circle",{cx:"25",cy:"25",r:20,stroke:n.colorBgMuted,strokeWidth:r}),t.jsx("circle",{cx:"25",cy:"25",r:20,stroke:n.colorPrimary,strokeWidth:r,strokeLinecap:"round",strokeDasharray:`${s*.25} ${s*.75}`})]})})}function wf({diameter:e}){const r=`calc(${e} * 0.36)`,o="10%";return t.jsx(Or,{diameter:e,speed:"1.2s",children:t.jsx("div",{style:{width:"100%",height:"100%",position:"relative"},children:[0,1,2,3].map(s=>{const l=[{top:o,left:o},{top:o,right:o},{bottom:o,right:o},{bottom:o,left:o}];return t.jsx("div",{style:{position:"absolute",width:r,height:r,borderRadius:"50%",backgroundColor:n.colorPrimary,animation:`j-spinner-classic-dot 1s ease-in-out ${s*.15}s infinite`,...l[s]}},s)})})})}function jf({diameter:e}){const r=`calc(${e} * 0.28)`;return t.jsx("div",{style:{width:e,height:e,display:"flex",alignItems:"center",justifyContent:"center",gap:`calc(${e} * 0.08)`},children:[0,1,2].map(o=>t.jsx("div",{style:{width:r,height:r,borderRadius:"50%",backgroundColor:n.colorPrimary,animation:`j-spinner-bounce 1s ease-in-out ${o*.16}s infinite`}},o))})}function Sf({diameter:e}){const r=Array.from({length:wo},(o,s)=>s);return t.jsx("div",{style:{width:e,height:e,position:"relative"},children:r.map(o=>{const s=360/wo*o;return t.jsx("div",{style:{position:"absolute",top:"50%",left:"50%",width:"8%",height:"28%",borderRadius:"999px",backgroundColor:n.colorPrimary,transformOrigin:"center 0",transform:`translate(-50%, 0) rotate(${s}deg) translateY(-170%)`,animation:`j-spinner-bar-fade 0.8s linear ${(o/wo).toFixed(2)}s infinite`}},o)})})}function Mf(e){return null}function Bf({diameter:e,strokeWidth:r}){return t.jsx(Or,{diameter:e,speed:"2s",children:t.jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 50 50",fill:"none",children:[t.jsx("circle",{cx:"25",cy:"25",r:20,stroke:n.colorBgMuted,strokeWidth:r}),t.jsx("circle",{cx:"25",cy:"25",r:20,stroke:n.colorPrimary,strokeWidth:r,strokeLinecap:"round",style:{animation:"j-spinner-dash 1.4s ease-in-out infinite"}})]})})}const Rf={gradient:Cf,ring:kf,classic:wf,dots:jf,bars:Sf,pulse:Mf,dash:Bf};function Tf({diameter:e,strokeWidth:r,percent:o}){const l=2*Math.PI*20;if(o==="auto")return t.jsx(Or,{diameter:e,children:t.jsx("svg",{width:"100%",height:"100%",viewBox:"0 0 50 50",fill:"none",children:t.jsx("circle",{cx:"25",cy:"25",r:20,stroke:n.colorPrimary,strokeWidth:r,strokeLinecap:"round",strokeDasharray:`${l*.75} ${l*.25}`,strokeDashoffset:l*.125})})});const a=Math.max(0,Math.min(100,o)),c=l-a/100*l;return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 50 50",fill:"none",style:{transform:"rotate(-90deg)"},children:[t.jsx("circle",{cx:"25",cy:"25",r:20,stroke:n.colorBgMuted,strokeWidth:r}),t.jsx("circle",{cx:"25",cy:"25",r:20,stroke:a>=100?n.colorSuccess:n.colorPrimary,strokeWidth:r,strokeLinecap:"round",strokeDasharray:l,strokeDashoffset:c,style:{transition:"stroke-dashoffset 0.3s ease, stroke 0.3s ease"}})]})}function If({spinning:e=!0,type:r="gradient",size:o="default",delay:s,indicator:l,tip:a,fullscreen:c=!1,percent:u,children:f,className:d,style:h,classNames:g,styles:m}){const[x,p]=i.useState(()=>e&&!s);i.useEffect(()=>{if(!e){p(!1);return}if(!s){p(!0);return}const w=setTimeout(()=>p(!0),s);return()=>clearTimeout(w)},[e,s]);const b=vf[o],v=r==="pulse"&&l==null&&u==null;let j;if(l!=null)j=l;else if(u!=null)j=t.jsx(Tf,{diameter:b.diameter,strokeWidth:b.strokeWidth,percent:u});else if(v)j=t.jsx("div",{style:{fontSize:b.tipFontSize,fontWeight:600,color:n.colorPrimary,animation:"j-spinner-pulse-text 1.5s ease-in-out infinite",whiteSpace:"nowrap"},children:a??"Loading..."});else{const w=Rf[r],y=r==="gradient"?b.gradientStrokeWidth:b.strokeWidth;j=t.jsx(w,{diameter:b.diameter,strokeWidth:y})}const C=t.jsxs("div",{className:g?.indicator,style:V({display:"flex",flexDirection:"column",alignItems:"center",gap:"0.5rem"},m?.indicator),children:[j,a!=null&&!v&&t.jsx("div",{className:g?.tip,style:V({fontSize:b.tipFontSize,color:n.colorPrimary,whiteSpace:"nowrap"},m?.tip),children:a})]});return c?x?t.jsxs(t.Fragment,{children:[t.jsx("style",{children:ko}),t.jsx("div",{className:Ve(d,g?.root),style:V({position:"fixed",inset:0,zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.45)"},m?.root,h),children:C})]}):null:f!=null?t.jsxs(t.Fragment,{children:[t.jsx("style",{children:ko}),t.jsxs("div",{className:Ve(d,g?.root),style:V({position:"relative"},m?.root,h),children:[t.jsx("div",{className:g?.content,style:V({transition:"opacity 0.3s ease, filter 0.3s ease",...x&&{opacity:.5,filter:"blur(1px)",pointerEvents:"none",userSelect:"none"}},m?.content),children:f}),x&&t.jsx("div",{className:g?.overlay,style:V({position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",zIndex:10},m?.overlay),children:C})]})]}):x?t.jsxs(t.Fragment,{children:[t.jsx("style",{children:ko}),t.jsx("div",{className:Ve(d,g?.root),style:V({display:"inline-flex",alignItems:"center",justifyContent:"center"},m?.root,h),children:C})]}):null}function Lf({size:e}){const r=e==="small"?8:12;return t.jsx("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",style:{animation:"j-spin 1s linear infinite"},children:t.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:n.colorPrimary,strokeWidth:"3",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"12"})})}function Ef({autoFocus:e=!1,checked:r,checkedChildren:o,defaultChecked:s=!1,defaultValue:l,disabled:a=!1,loading:c=!1,size:u="default",unCheckedChildren:f,value:d,onChange:h,onClick:g,className:m,style:x,classNames:p,styles:b,tabIndex:v,id:j},C){const w=d??r,y=l??s,k=w!==void 0,[B,R]=i.useState(y),S=k?w:B,L=a||c,$=i.useRef(null),I=i.useRef(null),P=i.useRef(!1),[E,H]=i.useState(!1),[z,A]=i.useState("keyboard");i.useEffect(()=>{e&&$.current&&$.current.focus()},[]),i.useImperativeHandle(C,()=>({focus:()=>$.current?.focus(),blur:()=>$.current?.blur()}));const M=K=>{if(L)return;const re=!S;k||R(re),h?.(re,K),g?.(re,K)},W=!!(b?.track&&("backgroundColor"in b.track||"borderColor"in b.track||"border"in b.track)),F=()=>{L||!I.current||(W?I.current.style.filter="brightness(1.15)":S?I.current.style.backgroundColor=n.colorPrimaryHover:I.current.style.backgroundColor=n.colorSecondary)},D=()=>{L||!I.current||(W?I.current.style.filter="":S?I.current.style.backgroundColor=n.colorPrimary:I.current.style.backgroundColor=n.colorSecondary)},T=u==="small",O=T?1:1.375,Y=T?1.75:2.75,X=T?.75:1.125,_=.125,G=o!==void 0||f!==void 0,Q={position:"relative",display:"inline-flex",alignItems:"center",padding:0,margin:0,border:"none",background:"none",cursor:L?"not-allowed":"pointer",outline:"none",fontFamily:"inherit",lineHeight:1,...L?{opacity:.5}:{}},N={position:"relative",display:"inline-flex",alignItems:"center",...G?{minWidth:`${Y}rem`,height:`${O}rem`}:{width:`${Y}rem`,height:`${O}rem`},borderRadius:`${O/2}rem`,backgroundColor:S?n.colorPrimary:n.colorSecondary,transition:"background-color 0.2s ease, box-shadow 0.2s ease",boxShadow:E&&!L&&z==="keyboard"?`0 0 0 2px ${n.colorPrimaryLight}`:"none"},le={position:"absolute",top:`${_}rem`,left:S?`calc(100% - ${X+_}rem)`:`${_}rem`,width:`${X}rem`,height:`${X}rem`,borderRadius:"50%",backgroundColor:n.colorBg,boxShadow:"0 1px 3px rgba(0, 0, 0, 0.2)",transition:"left 0.2s ease",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1},oe=X+_*2,q={display:"block",overflow:"hidden",fontSize:T?"0.5625rem":"0.75rem",color:"#fff",paddingLeft:`${S?T?.375:.5:oe+(T?.125:.25)}rem`,paddingRight:`${S?oe+(T?.125:.25):T?.375:.5}rem`,transition:"padding 0.2s ease",lineHeight:`${O}rem`,whiteSpace:"nowrap"};return t.jsxs(t.Fragment,{children:[t.jsx("style",{children:"@keyframes j-spin { to { transform: rotate(360deg); } }"}),t.jsx("button",{ref:$,id:j,type:"button",role:"switch","aria-checked":S,disabled:L,tabIndex:v,className:Ve(m,p?.root),style:V(Q,b?.root,x),onClick:M,onMouseDown:()=>{P.current=!0,A("mouse")},onMouseEnter:F,onMouseLeave:D,onFocus:()=>{A(P.current?"mouse":"keyboard"),P.current=!1,H(!0)},onBlur:()=>H(!1),children:t.jsxs("span",{ref:I,className:p?.track,style:V(N,b?.track),children:[G&&t.jsx("span",{className:p?.inner,style:V(q,b?.inner),children:S?o:f}),t.jsx("span",{className:p?.thumb,style:V(le,b?.thumb),children:c&&t.jsx(Lf,{size:u})})]})})]})}const $f=i.forwardRef(Ef),Pf={small:{height:"1.5rem",fontSize:"0.75rem",paddingH:"0.4375rem",radius:"0.375rem",thumbRadius:"0.25rem",thumbPadding:"0.125rem"},middle:{height:"2rem",fontSize:"0.875rem",paddingH:"0.6875rem",radius:"0.5rem",thumbRadius:"0.375rem",thumbPadding:"0.125rem"},large:{height:"2.5rem",fontSize:"1rem",paddingH:"0.75rem",radius:"0.5rem",thumbRadius:"0.375rem",thumbPadding:"0.125rem"}};function Df({options:e,value:r,defaultValue:o,onChange:s,disabled:l=!1,block:a=!1,vertical:c=!1,size:u="middle",name:f,className:d,style:h,classNames:g,styles:m}){const x=Pf[u],p=e.map(M=>typeof M=="string"||typeof M=="number"?{value:M,label:String(M)}:{...M,label:M.label??(M.icon?void 0:String(M.value))}),b=r!==void 0,[v,j]=i.useState(o??p[0]?.value),C=b?r:v,w=i.useCallback(M=>{b||j(M),s?.(M)},[b,s]),y=i.useRef(null),k=i.useRef(new Map),B=i.useRef(!0),R=i.useCallback(M=>W=>{W?k.current.set(M,W):k.current.delete(M)},[]),[S,L]=i.useState({opacity:0}),$=i.useCallback(()=>{if(!y.current)return;const W=C!==void 0?k.current.get(C):void 0;if(!W){L(X=>X.opacity===0?X:{opacity:0});return}const F=W.offsetLeft,D=W.offsetTop,T=W.offsetWidth,O=W.offsetHeight,Y=c?"top 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), height 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)":"left 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), width 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)";L({position:"absolute",top:c?D:x.thumbPadding,left:c?x.thumbPadding:F,width:c?`calc(100% - 2 * ${x.thumbPadding})`:T,height:c?O:`calc(100% - 2 * ${x.thumbPadding})`,borderRadius:x.thumbRadius,backgroundColor:n.colorBg,boxShadow:"0 1px 2px 0 rgba(0,0,0,0.03), 0 1px 6px -1px rgba(0,0,0,0.02), 0 2px 4px 0 rgba(0,0,0,0.02)",transition:B.current?"none":Y,zIndex:0,pointerEvents:"none",opacity:1}),B.current&&requestAnimationFrame(()=>{B.current=!1})},[C,x.thumbPadding,x.thumbRadius,c]);i.useLayoutEffect(()=>{$()},[$]),i.useEffect(()=>{const M=y.current;if(!M)return;const W=new ResizeObserver(()=>$());return W.observe(M),()=>W.disconnect()},[$]);const I=i.useCallback((M,W)=>{if(M.key==="Enter"||M.key===" "){M.preventDefault();const X=p.find(_=>_.value===W);X&&!X.disabled&&W!==C&&w(W);return}const F=c?["ArrowUp"]:["ArrowLeft"],D=c?["ArrowDown"]:["ArrowRight"];if(!F.includes(M.key)&&!D.includes(M.key))return;M.preventDefault();const T=p.findIndex(X=>X.value===W),O=D.includes(M.key)?1:-1,Y=p.length;for(let X=1;X<Y;X++){const _=(T+O*X+Y)%Y,G=p[_];if(!G.disabled){w(G.value),k.current.get(G.value)?.focus();return}}},[p,C,w,c]),P=!!(m?.item&&("backgroundColor"in m.item||"borderColor"in m.item||"border"in m.item||"color"in m.item)),E=(M,W,F)=>{if(F||W)return;const D=M.currentTarget;P?D.style.filter="brightness(1.15)":D.style.color=n.colorText},H=(M,W,F)=>{if(F||W)return;const D=M.currentTarget;P?D.style.filter="":D.style.color=n.colorTextMuted},z={position:"relative",display:a||c?"flex":"inline-flex",flexDirection:c?"column":"row",width:a||c?"100%":void 0,alignItems:c?"stretch":"center",backgroundColor:n.colorBgMuted,borderRadius:x.radius,padding:x.thumbPadding,boxSizing:"border-box",...l?{opacity:.5,cursor:"not-allowed"}:{}},A=(M,W)=>({position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.375rem",height:c?void 0:`calc(${x.height} - 2 * ${x.thumbPadding})`,padding:c?`${x.paddingH} ${x.paddingH}`:`0 ${x.paddingH}`,fontSize:x.fontSize,fontFamily:"inherit",color:M?n.colorText:n.colorTextMuted,fontWeight:M?600:400,cursor:W?"not-allowed":"pointer",userSelect:"none",whiteSpace:"nowrap",borderRadius:x.thumbRadius,transition:"color 0.2s ease, font-weight 0.2s ease",zIndex:1,flex:a&&!c?1:void 0,...W&&!l?{opacity:.5}:{}});return t.jsxs("div",{ref:y,role:"radiogroup",className:Ve(d,g?.root),style:V(z,m?.root,h),children:[t.jsx("div",{className:g?.thumb,style:V(S,m?.thumb)}),p.map(M=>{const W=M.value===C,F=!!(M.disabled||l);return t.jsxs("div",{ref:R(M.value),role:"radio","aria-checked":W,"aria-disabled":F||void 0,tabIndex:W?0:-1,className:Ve(M.className,g?.item),style:V(A(W,F),m?.item),onClick:()=>{!F&&M.value!==C&&w(M.value)},onMouseEnter:D=>E(D,W,F),onMouseLeave:D=>H(D,W,F),onKeyDown:D=>I(D,M.value),children:[f&&t.jsx("input",{type:"radio",name:f,value:String(M.value),checked:W,disabled:F,onChange:()=>w(M.value),style:{position:"absolute",opacity:0,width:0,height:0,pointerEvents:"none"}}),M.icon&&t.jsx("span",{style:{display:"inline-flex",lineHeight:0},children:M.icon}),M.label&&t.jsx("span",{children:M.label})]},String(M.value))})]})}function ri(){return t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("circle",{cx:"8",cy:"8",r:"6"}),t.jsx("polyline",{points:"8 4.5 8 8 10.5 9.5"})]})}function oi(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[t.jsx("circle",{cx:"7",cy:"7",r:"5.5",fill:"currentColor",opacity:"0.08"}),t.jsx("line",{x1:"5",y1:"5",x2:"9",y2:"9"}),t.jsx("line",{x1:"9",y1:"5",x2:"5",y2:"9"})]})}function zf(){return t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"4",y1:"8",x2:"12",y2:"8"}),t.jsx("polyline",{points:"9 5 12 8 9 11"})]})}const ni={sm:{height:"1.75rem",fontSize:"0.75rem",radius:"0.25rem",paddingH:"0.5rem",inputFontSize:"1rem"},md:{height:"2.25rem",fontSize:"0.875rem",radius:"0.375rem",paddingH:"0.75rem",inputFontSize:"1rem"},lg:{height:"2.75rem",fontSize:"1rem",radius:"0.5rem",paddingH:"0.875rem",inputFontSize:"1rem"}};function Jo(e){return{showHour:/[Hh]/.test(e),showMinute:/m/.test(e),showSecond:/s/.test(e),use12Hours:/h/.test(e)||/[Aa]/.test(e)}}function si(e){return e?"hh:mm A":"HH:mm"}function ii(e,r){if(!e)return"";const o=e.getHours(),s=o%12||12,l=e.getMinutes(),a=e.getSeconds(),c=o>=12?"PM":"AM";return r.replace(/HH/g,String(o).padStart(2,"0")).replace(/H/g,String(o)).replace(/hh/g,String(s).padStart(2,"0")).replace(/h/g,String(s)).replace(/mm/g,String(l).padStart(2,"0")).replace(/m/g,String(l)).replace(/ss/g,String(a).padStart(2,"0")).replace(/s/g,String(a)).replace(/A/g,c).replace(/a/g,c.toLowerCase())}function Mn(e,r){if(!e.trim())return null;let o=0,s=0,l=0,a=!1,c=!1;const u=e.match(/\b(AM|PM|am|pm)\b/i);u&&(c=!0,a=u[1].toUpperCase()==="PM");const f=e.match(/\d+/g);if(!f)return null;const d=Jo(r);let h=0;if(d.showHour&&h<f.length&&(o=parseInt(f[h++],10),c&&(o===12?o=a?12:0:a&&(o+=12))),d.showMinute&&h<f.length&&(s=parseInt(f[h++],10)),d.showSecond&&h<f.length&&(l=parseInt(f[h++],10)),o<0||o>23||s<0||s>59||l<0||l>59)return null;const g=new Date;return g.setHours(o,s,l,0),g}const li="3.5rem",Wf="14rem",jo=28;function qr({type:e,value:r,options:o,onChange:s,columnStyle:l,columnClassName:a,isLast:c,changeOnScroll:u}){const f=i.useRef(null),d=i.useRef(null),h=i.useRef(!1);i.useEffect(()=>{if(!f.current)return;const m=o.findIndex(x=>x.value===r);if(m>=0){const x=m*jo;f.current.scrollTo({top:x,behavior:"smooth"})}},[r,o]),i.useEffect(()=>{if(!u||!f.current)return;const m=f.current,x=()=>{h.current=!0,d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{if(!h.current)return;h.current=!1;const p=m.scrollTop,b=Math.round(p/jo),v=Math.max(0,Math.min(b,o.length-1)),j=o[v];j&&!j.disabled&&j.value!==r&&s(j.value),m.scrollTo({top:v*jo,behavior:"smooth"})},120)};return m.addEventListener("scroll",x,{passive:!0}),()=>{m.removeEventListener("scroll",x),d.current&&clearTimeout(d.current)}},[u,o,r,s]);const g={display:"flex",flexDirection:"column",alignItems:"center",height:Wf,overflowY:"auto",overflowX:"hidden",minWidth:li,flex:1,scrollbarWidth:"thin",scrollbarColor:`${n.colorBorderHover} transparent`,borderRight:c?"none":`1px solid ${n.colorBorder}`,...l};return t.jsx("div",{ref:f,className:`j-tp-col${a?` ${a}`:""}`,style:g,children:o.map(m=>{const x=m.value===r,p=!!m.disabled;return t.jsx("button",{type:"button",disabled:p,onClick:()=>{p||s(m.value)},style:{width:"3rem",height:"1.75rem",flexShrink:0,border:"none",borderRadius:"0.25rem",backgroundColor:x?n.colorPrimaryBg:"transparent",color:x?n.colorPrimary:p?n.colorTextSubtle:n.colorText,cursor:p?"not-allowed":"pointer",fontSize:"0.8125rem",fontWeight:x?600:400,fontFamily:e==="ampm"?"inherit":"monospace",transition:"background-color 0.1s ease",opacity:p?.4:1,padding:0},onMouseEnter:b=>{!p&&!x&&(b.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:b=>{!p&&!x&&(b.currentTarget.style.backgroundColor="transparent")},children:m.label},String(m.value))})})}const br=220,sr=br/2,Tr=85,Qr=55,Ir=32;function Hf({hours:e,minutes:r,seconds:o,onChange:s,use12Hours:l,showSecond:a,disabledTimeConfig:c,minuteStep:u,secondStep:f}){const[d,h]=i.useState("hour"),g=i.useRef(null),m=i.useRef(!1),x=e>=12,p=l?e%12||12:e,b=d==="hour"?e%12/12*360:d==="minute"?r/60*360:o/60*360,v=d==="hour"&&!l&&(e===0||e>12)?Qr:Tr,j=sr+Math.sin(b*Math.PI/180)*v,C=sr-Math.cos(b*Math.PI/180)*v,w=i.useCallback((I,P)=>{if(!g.current)return;const E=g.current.getBoundingClientRect(),H=I-(E.left+E.width/2),z=P-(E.top+E.height/2);let A=Math.atan2(H,-z)*180/Math.PI;if(A<0&&(A+=360),d==="hour"){const M=c?.disabledHours?.()??[],W=Math.round(A/30)%12;if(l){const F=W===0?12:W,D=x?F===12?12:F+12:F===12?0:F;M.includes(D)||s("hour",F)}else{const F=Math.sqrt(H*H+z*z),D=E.width/br,T=(Tr+Qr)/2*D;let O;F<T?O=W===0?0:W+12:O=W===0?12:W,M.includes(O)||s("hour",O)}}else{const M=d==="minute"?u:f;let W=Math.round(A/6)%60;W=Math.round(W/M)*M,W>=60&&(W=0),(d==="minute"?c?.disabledMinutes?.(e)??[]:c?.disabledSeconds?.(e,r)??[]).includes(W)||s(d,W)}},[d,l,x,e,r,s,u,f,c]),y=i.useCallback(I=>{I.preventDefault(),m.current=!0,w(I.clientX,I.clientY)},[w]);i.useEffect(()=>{if(!m.current)return;const I=E=>{m.current&&w(E.clientX,E.clientY)},P=E=>{m.current&&(m.current=!1,w(E.clientX,E.clientY),d==="hour"?h("minute"):d==="minute"&&a&&h("second"))};return document.addEventListener("mousemove",I),document.addEventListener("mouseup",P),()=>{document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",P)}});const k=i.useMemo(()=>{if(d==="hour"){const P=c?.disabledHours?.()??[];if(l)return Array.from({length:12},(z,A)=>{const M=A===0?12:A,W=x?M===12?12:M+12:M===12?0:M;return{value:M,label:String(M),angle:A/12*360,radius:Tr,disabled:P.includes(W)}});const E=Array.from({length:12},(z,A)=>{const M=A===0?12:A;return{value:M,label:String(M),angle:A/12*360,radius:Tr,disabled:P.includes(M)}}),H=Array.from({length:12},(z,A)=>{const M=A===0?0:A+12;return{value:M,label:String(M).padStart(2,"0"),angle:A/12*360,radius:Qr,disabled:P.includes(M)}});return[...E,...H]}const I=d==="minute"?c?.disabledMinutes?.(e)??[]:c?.disabledSeconds?.(e,r)??[];return Array.from({length:12},(P,E)=>{const H=E*5;return{value:H,label:String(H).padStart(2,"0"),angle:E/12*360,radius:Tr,disabled:I.includes(H)}})},[d,l,x,e,r,c]),B=l?String(p).padStart(2,"0"):String(e).padStart(2,"0"),R=String(r).padStart(2,"0"),S=String(o).padStart(2,"0"),L=I=>({border:"none",background:"none",cursor:"pointer",fontFamily:"monospace",fontSize:"1.5rem",fontWeight:I?700:400,color:I?n.colorPrimary:n.colorTextMuted,padding:"0.125rem 0.25rem",borderRadius:"0.25rem",transition:"color 0.15s ease"}),$=I=>({border:"none",background:"none",cursor:"pointer",fontFamily:"inherit",fontSize:"0.6875rem",fontWeight:I?700:400,color:I?n.colorPrimary:n.colorTextMuted,padding:"0 0.25rem",lineHeight:1.2});return t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",padding:"0.75rem"},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",marginBottom:"0.75rem"},children:[t.jsx("button",{type:"button",onClick:()=>h("hour"),style:L(d==="hour"),children:B}),t.jsx("span",{style:{fontSize:"1.5rem",color:n.colorTextMuted,fontFamily:"monospace"},children:":"}),t.jsx("button",{type:"button",onClick:()=>h("minute"),style:L(d==="minute"),children:R}),a&&t.jsxs(t.Fragment,{children:[t.jsx("span",{style:{fontSize:"1.5rem",color:n.colorTextMuted,fontFamily:"monospace"},children:":"}),t.jsx("button",{type:"button",onClick:()=>h("second"),style:L(d==="second"),children:S})]}),l&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",marginLeft:"0.5rem",gap:"0.125rem"},children:[t.jsx("button",{type:"button",onClick:()=>{x&&s("ampm","AM")},style:$(!x),children:"AM"}),t.jsx("button",{type:"button",onClick:()=>{x||s("ampm","PM")},style:$(x),children:"PM"})]})]}),t.jsxs("div",{ref:g,onMouseDown:y,style:{position:"relative",width:br,height:br,borderRadius:"50%",backgroundColor:n.colorBgMuted,cursor:"pointer",touchAction:"none",userSelect:"none"},children:[t.jsxs("svg",{width:br,height:br,style:{position:"absolute",inset:0,pointerEvents:"none"},children:[t.jsx("line",{x1:sr,y1:sr,x2:j,y2:C,stroke:n.colorPrimary,strokeWidth:2}),t.jsx("circle",{cx:sr,cy:sr,r:3,fill:n.colorPrimary}),t.jsx("circle",{cx:j,cy:C,r:Ir/2,fill:n.colorPrimary,opacity:.12})]}),k.map(I=>{const P=I.angle*Math.PI/180,E=sr+Math.sin(P)*I.radius-Ir/2,H=sr-Math.cos(P)*I.radius-Ir/2,z=d==="hour"?I.value===(l?p:e):d==="minute"?I.value===r:I.value===o,A=I.radius===Qr;return t.jsx("div",{style:{position:"absolute",left:E,top:H,width:Ir,height:Ir,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",fontSize:A?"0.6875rem":"0.8125rem",fontWeight:z?600:400,color:z?"#fff":I.disabled?n.colorTextSubtle:n.colorText,backgroundColor:z?n.colorPrimary:"transparent",opacity:I.disabled?.4:1,pointerEvents:"none",zIndex:1,transition:"background-color 0.15s ease, color 0.15s ease"},children:I.label},`${I.value}-${I.radius}`)})]})]})}function zo({pendingValue:e,onChange:r,onOk:o,onNow:s,formatConfig:l,hourStep:a,minuteStep:c,secondStep:u,disabledTimeConfig:f,showNow:d,needConfirm:h,addon:g,changeOnScroll:m,showAnalog:x,styles:p,classNames:b}){const v=e?e.getHours():0,j=e?e.getMinutes():0,C=e?e.getSeconds():0,w=l.use12Hours,y=w?v%12||12:v,k=v>=12,B=f?.disabledHours?.()??[],R=f?.disabledMinutes?.(v)??[],S=f?.disabledSeconds?.(v,j)??[],L=i.useMemo(()=>{const W=w?12:23,F=w?1:0,D=[];for(let T=F;T<=W;T+=a){let O=T;w&&(O=k?T===12?12:T+12:T===12?0:T),D.push({value:T,label:String(T).padStart(2,"0"),disabled:B.includes(O)})}return D},[w,a,B,k]),$=i.useMemo(()=>{const W=[];for(let F=0;F<=59;F+=c)W.push({value:F,label:String(F).padStart(2,"0"),disabled:R.includes(F)});return W},[c,R]),I=i.useMemo(()=>{const W=[];for(let F=0;F<=59;F+=u)W.push({value:F,label:String(F).padStart(2,"0"),disabled:S.includes(F)});return W},[u,S]),P=[{value:"AM",label:"AM"},{value:"PM",label:"PM"}],E={hour:"Horas",minute:"Minutos",second:"Segundos",ampm:"AM/PM"},z=[{type:"hour",show:l.showHour},{type:"minute",show:l.showMinute},{type:"second",show:l.showSecond},{type:"ampm",show:l.use12Hours}].filter(W=>W.show),A={fontSize:"0.6875rem",fontWeight:600,color:n.colorTextMuted,textAlign:"center",padding:"0.375rem 0",minWidth:li,flex:1},M={border:"none",backgroundColor:"transparent",cursor:"pointer",color:n.colorPrimary,fontSize:"0.8125rem",fontWeight:500,fontFamily:"inherit",padding:"0.25rem 0"};return t.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[x?t.jsx(Hf,{hours:v,minutes:j,seconds:C,onChange:r,use12Hours:w,showSecond:l.showSecond,minuteStep:c,secondStep:u,disabledTimeConfig:f}):t.jsxs(t.Fragment,{children:[t.jsx("div",{style:{display:"flex",borderBottom:`1px solid ${n.colorBorder}`},children:z.map((W,F)=>t.jsx("div",{style:{...A,borderRight:F<z.length-1?`1px solid ${n.colorBorder}`:"none"},children:E[W.type]},W.type))}),t.jsx("div",{style:{display:"flex",padding:"0.5rem 0"},children:z.map((W,F)=>{const D=F===z.length-1;return W.type==="hour"?t.jsx(qr,{type:"hour",value:y,options:L,onChange:T=>r("hour",T),columnStyle:p?.column,columnClassName:b?.column,isLast:D,changeOnScroll:m},"hour"):W.type==="minute"?t.jsx(qr,{type:"minute",value:j,options:$,onChange:T=>r("minute",T),columnStyle:p?.column,columnClassName:b?.column,isLast:D,changeOnScroll:m},"minute"):W.type==="second"?t.jsx(qr,{type:"second",value:C,options:I,onChange:T=>r("second",T),columnStyle:p?.column,columnClassName:b?.column,isLast:D,changeOnScroll:m},"second"):W.type==="ampm"?t.jsx(qr,{type:"ampm",value:k?"PM":"AM",options:P,onChange:T=>r("ampm",T),columnStyle:p?.column,columnClassName:b?.column,isLast:D,changeOnScroll:m},"ampm"):null})})]}),g!=null&&t.jsx("div",{style:{borderTop:`1px solid ${n.colorBorder}`,padding:"0.5rem 0.75rem"},children:g}),(d||h)&&t.jsxs("div",{className:b?.footer,style:V({borderTop:`1px solid ${n.colorBorder}`,padding:"0.5rem 0.75rem",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"1rem"},p?.footer),children:[t.jsx("div",{style:{flex:1},children:d&&t.jsx("button",{type:"button",style:M,onClick:s,children:"Now"})}),h&&t.jsx("button",{type:"button",onClick:o,style:{padding:"0.1875rem 0.75rem",border:"none",borderRadius:"0.25rem",backgroundColor:n.colorPrimary,color:"#fff",cursor:"pointer",fontSize:"0.8125rem",fontWeight:500,fontFamily:"inherit",transition:"filter 0.15s ease"},onMouseEnter:W=>{W.currentTarget.style.filter="brightness(1.1)"},onMouseLeave:W=>{W.currentTarget.style.filter="none"},children:"OK"})]})]})}function Ff({value:e,defaultValue:r,onChange:o,onCalendarChange:s,onOpenChange:l,open:a,defaultOpen:c=!1,format:u,use12Hours:f,hourStep:d=1,minuteStep:h=1,secondStep:g=1,disabled:m=!1,allowClear:x=!0,placeholder:p,placement:b="bottomLeft",size:v="md",variant:j="outlined",status:C,needConfirm:w=!0,showNow:y=!0,prefix:k,suffix:B,addon:R,changeOnScroll:S=!1,showAnalog:L=!1,inputReadOnly:$=!1,disabledTime:I,className:P,style:E,classNames:H,styles:z,id:A,autoFocus:M}){const W=u??si(f),F=i.useMemo(()=>Jo(W),[W]),D=e!==void 0,[T,O]=i.useState(r??null),Y=D?e??null:T,X=a!==void 0,[_,G]=i.useState(c),Q=X?a:_,[N,le]=i.useState(null),[oe,q]=i.useState(!1),[K,re]=i.useState(b),[Te,Ce]=i.useState(""),[Le,ue]=i.useState(!1),ze=i.useRef(null),xe=i.useRef(null),ge=i.useRef(null),Ie=i.useRef(null),De=C==="error"?n.colorError:C==="warning"?n.colorWarning:void 0,Ae=C==="error"?n.colorErrorBg:C==="warning"?n.colorWarningBg:n.colorPrimaryLight,Re=i.useCallback(me=>ii(me,W),[W]),ke=i.useCallback(me=>{m||(me&&re(b),X||G(me),l?.(me),me||(ue(!1),Ie.current&&j!=="borderless"&&(Ie.current.style.borderColor=De??n.colorBorder)))},[m,X,l,b,j,De]);i.useEffect(()=>{re(b)},[b]),i.useLayoutEffect(()=>{if(!Q||!xe.current||!ze.current)return;const me=xe.current.getBoundingClientRect(),U=ze.current.getBoundingClientRect(),he=U.top,de=window.innerHeight-U.bottom,We=K.startsWith("top");!We&&me.bottom>window.innerHeight?he>de&&re($e=>$e.replace("bottom","top")):We&&me.top<0&&de>he&&re($e=>$e.replace("top","bottom"))}),i.useEffect(()=>{Q&&(q(!1),requestAnimationFrame(()=>{requestAnimationFrame(()=>q(!0))}),le(Y?new Date(Y.getTime()):null))},[Q]),i.useEffect(()=>{if(!Q)return;const me=U=>{ze.current?.contains(U.target)||xe.current?.contains(U.target)||ke(!1)};return document.addEventListener("mousedown",me),()=>document.removeEventListener("mousedown",me)},[Q]),i.useEffect(()=>{M&&ge.current&&ge.current.focus()},[]);const ee=i.useCallback(me=>{D||O(me);const U=Re(me);o?.(me,U)},[D,Re,o]),ae=i.useCallback((me,U)=>{const he=N??Y??(()=>{const We=new Date;return We.setHours(0,0,0,0),We})(),de=new Date(he.getTime());if(me==="hour"){let We=U;F.use12Hours&&(We=de.getHours()>=12?We===12?12:We+12:We===12?0:We),de.setHours(We)}else if(me==="minute")de.setMinutes(U);else if(me==="second")de.setSeconds(U);else if(me==="ampm"){const We=de.getHours();U==="AM"&&We>=12&&de.setHours(We-12),U==="PM"&&We<12&&de.setHours(We+12)}w?(le(de),s?.(de,Re(de))):(le(de),ee(de))},[N,Y,F.use12Hours,w,ee,Re,s]),se=i.useCallback(()=>{const me=new Date;w?(le(me),s?.(me,Re(me))):ee(me)},[w,ee,Re,s]),we=i.useCallback(()=>{N&&(D||O(N),o?.(N,Re(N))),ke(!1)},[N,D,o,Re,ke]),ie=i.useCallback(me=>{me.stopPropagation(),D||O(null),o?.(null,"")},[D,o]),ce=i.useCallback(me=>{$||(ue(!0),Ce(me.target.value))},[$]),He=i.useCallback(()=>{if(Le&&Te){const me=Mn(Te,W);me&&ee(me)}ue(!1)},[Le,Te,W,ee]),Pe=i.useCallback(me=>{if(me.key==="Enter"){if(Le&&Te){const U=Mn(Te,W);U&&ee(U)}ue(!1)}else me.key==="Escape"&&ke(!1)},[Le,Te,W,ee,ke]),Ge=ni[v],Z=Le?Te:Re(Y),Be=K.startsWith("top"),Oe=K.endsWith("Right"),Qe={position:"absolute",zIndex:1050,...Be?{bottom:"100%",marginBottom:"0.25rem"}:{top:"100%",marginTop:"0.25rem"},...Oe?{right:0}:{left:0}},_e=j==="borderless"?"none":`1px solid ${De??n.colorBorder}`,et=j==="filled"?n.colorBgMuted:"transparent",je=B!==void 0?B:t.jsx("span",{style:{color:n.colorTextMuted,display:"flex"},children:t.jsx(ri,{})}),Se=I?.();return t.jsxs("div",{ref:ze,className:Ve(P,H?.root),style:V({position:"relative",display:"inline-block"},z?.root,E),id:A,children:[t.jsxs("div",{ref:Ie,className:H?.input,onClick:()=>{m||(Q||ke(!0),ge.current?.focus())},style:V({display:"flex",alignItems:"center",gap:"0.5rem",height:Ge.height,padding:`0 ${Ge.paddingH}`,border:_e,borderRadius:Ge.radius,backgroundColor:et,cursor:m?"not-allowed":"pointer",opacity:m?.5:1,boxShadow:Q&&j!=="borderless"?`0 0 0 2px ${Ae}`:void 0,transition:"border-color 0.2s ease, box-shadow 0.2s ease"},z?.input),onMouseEnter:me=>{!m&&j!=="borderless"&&(me.currentTarget.style.borderColor=De??n.colorPrimary)},onMouseLeave:me=>{!m&&j!=="borderless"&&!Q&&(me.currentTarget.style.borderColor=De??n.colorBorder)},children:[k!=null&&t.jsx("span",{style:{display:"flex",flexShrink:0,color:n.colorTextMuted},children:k}),t.jsx("input",{ref:ge,value:Z,placeholder:p??"Select time",readOnly:$,disabled:m,onChange:ce,onFocus:()=>{Q||ke(!0)},onBlur:He,onKeyDown:Pe,autoFocus:M,style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",fontSize:Ge.inputFontSize,fontFamily:"inherit",color:De??n.colorText,cursor:m?"not-allowed":void 0,padding:0}}),x&&Y&&!m&&t.jsx("span",{onClick:ie,style:{display:"flex",cursor:"pointer",color:n.colorTextMuted,flexShrink:0,transition:"color 0.15s ease"},onMouseEnter:me=>{me.currentTarget.style.color=n.colorText},onMouseLeave:me=>{me.currentTarget.style.color=n.colorTextMuted},children:t.jsx(oi,{})}),je]}),Q&&t.jsxs("div",{ref:xe,className:H?.popup,style:V({...Qe,borderRadius:"0.5rem",border:`1px solid ${n.colorBorder}`,boxShadow:n.shadowMd,backgroundColor:n.colorBg,opacity:oe?1:0,transform:oe?"translateY(0)":`translateY(${Be?4:-4}px)`,transition:"opacity 0.2s ease, transform 0.2s ease",overflow:"hidden"},z?.popup),onMouseDown:me=>me.preventDefault(),children:[t.jsx("style",{children:`
|
|
167
|
+
}`,vf={small:{diameter:"1rem",diameterPx:16,strokeWidth:3,gradientStrokeWidth:4.5,tipFontSize:"0.75rem"},default:{diameter:"1.5rem",diameterPx:24,strokeWidth:3,gradientStrokeWidth:4.5,tipFontSize:"0.875rem"},large:{diameter:"2.5rem",diameterPx:40,strokeWidth:3,gradientStrokeWidth:5,tipFontSize:"1rem"}},wo=8;function Or({diameter:e,children:r,speed:o="0.8s"}){return t.jsx("div",{style:{width:e,height:e,animation:`j-spinner-rotate ${o} linear infinite`,lineHeight:0},children:r})}function Cf({diameter:e,strokeWidth:r}){const o=`calc(${e} * ${r/50})`;return t.jsx(Or,{diameter:e,children:t.jsxs("div",{style:{width:"100%",height:"100%",position:"relative"},children:[t.jsx("div",{style:{position:"absolute",inset:0,borderRadius:"50%",border:`${o} solid ${n.colorBgMuted}`,boxSizing:"border-box"}}),t.jsx("div",{style:{position:"absolute",inset:0,borderRadius:"50%",background:`conic-gradient(from 0deg, transparent 0%, ${n.colorPrimary} 30%, transparent 30.5%)`,mask:`radial-gradient(farthest-side, transparent calc(100% - ${o}), #000 calc(100% - ${o}))`,WebkitMask:`radial-gradient(farthest-side, transparent calc(100% - ${o}), #000 calc(100% - ${o}))`}})]})})}function kf({diameter:e,strokeWidth:r}){const s=2*Math.PI*20;return t.jsx(Or,{diameter:e,children:t.jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 50 50",fill:"none",children:[t.jsx("circle",{cx:"25",cy:"25",r:20,stroke:n.colorBgMuted,strokeWidth:r}),t.jsx("circle",{cx:"25",cy:"25",r:20,stroke:n.colorPrimary,strokeWidth:r,strokeLinecap:"round",strokeDasharray:`${s*.25} ${s*.75}`})]})})}function wf({diameter:e}){const r=`calc(${e} * 0.36)`,o="10%";return t.jsx(Or,{diameter:e,speed:"1.2s",children:t.jsx("div",{style:{width:"100%",height:"100%",position:"relative"},children:[0,1,2,3].map(s=>{const l=[{top:o,left:o},{top:o,right:o},{bottom:o,right:o},{bottom:o,left:o}];return t.jsx("div",{style:{position:"absolute",width:r,height:r,borderRadius:"50%",backgroundColor:n.colorPrimary,animation:`j-spinner-classic-dot 1s ease-in-out ${s*.15}s infinite`,...l[s]}},s)})})})}function jf({diameter:e}){const r=`calc(${e} * 0.28)`;return t.jsx("div",{style:{width:e,height:e,display:"flex",alignItems:"center",justifyContent:"center",gap:`calc(${e} * 0.08)`},children:[0,1,2].map(o=>t.jsx("div",{style:{width:r,height:r,borderRadius:"50%",backgroundColor:n.colorPrimary,animation:`j-spinner-bounce 1s ease-in-out ${o*.16}s infinite`}},o))})}function Sf({diameter:e}){const r=Array.from({length:wo},(o,s)=>s);return t.jsx("div",{style:{width:e,height:e,position:"relative"},children:r.map(o=>{const s=360/wo*o;return t.jsx("div",{style:{position:"absolute",top:"50%",left:"50%",width:"8%",height:"28%",borderRadius:"999px",backgroundColor:n.colorPrimary,transformOrigin:"center 0",transform:`translate(-50%, 0) rotate(${s}deg) translateY(-170%)`,animation:`j-spinner-bar-fade 0.8s linear ${(o/wo).toFixed(2)}s infinite`}},o)})})}function Mf(e){return null}function Bf({diameter:e,strokeWidth:r}){return t.jsx(Or,{diameter:e,speed:"2s",children:t.jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 50 50",fill:"none",children:[t.jsx("circle",{cx:"25",cy:"25",r:20,stroke:n.colorBgMuted,strokeWidth:r}),t.jsx("circle",{cx:"25",cy:"25",r:20,stroke:n.colorPrimary,strokeWidth:r,strokeLinecap:"round",style:{animation:"j-spinner-dash 1.4s ease-in-out infinite"}})]})})}const Rf={gradient:Cf,ring:kf,classic:wf,dots:jf,bars:Sf,pulse:Mf,dash:Bf};function Tf({diameter:e,strokeWidth:r,percent:o}){const l=2*Math.PI*20;if(o==="auto")return t.jsx(Or,{diameter:e,children:t.jsx("svg",{width:"100%",height:"100%",viewBox:"0 0 50 50",fill:"none",children:t.jsx("circle",{cx:"25",cy:"25",r:20,stroke:n.colorPrimary,strokeWidth:r,strokeLinecap:"round",strokeDasharray:`${l*.75} ${l*.25}`,strokeDashoffset:l*.125})})});const a=Math.max(0,Math.min(100,o)),c=l-a/100*l;return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 50 50",fill:"none",style:{transform:"rotate(-90deg)"},children:[t.jsx("circle",{cx:"25",cy:"25",r:20,stroke:n.colorBgMuted,strokeWidth:r}),t.jsx("circle",{cx:"25",cy:"25",r:20,stroke:a>=100?n.colorSuccess:n.colorPrimary,strokeWidth:r,strokeLinecap:"round",strokeDasharray:l,strokeDashoffset:c,style:{transition:"stroke-dashoffset 0.3s ease, stroke 0.3s ease"}})]})}function If({spinning:e=!0,type:r="gradient",size:o="default",delay:s,indicator:l,tip:a,fullscreen:c=!1,percent:u,children:f,className:d,style:h,classNames:g,styles:m}){const[x,p]=i.useState(()=>e&&!s);i.useEffect(()=>{if(!e){p(!1);return}if(!s){p(!0);return}const w=setTimeout(()=>p(!0),s);return()=>clearTimeout(w)},[e,s]);const b=vf[o],v=r==="pulse"&&l==null&&u==null;let j;if(l!=null)j=l;else if(u!=null)j=t.jsx(Tf,{diameter:b.diameter,strokeWidth:b.strokeWidth,percent:u});else if(v)j=t.jsx("div",{style:{fontSize:b.tipFontSize,fontWeight:600,color:n.colorPrimary,animation:"j-spinner-pulse-text 1.5s ease-in-out infinite",whiteSpace:"nowrap"},children:a??"Loading..."});else{const w=Rf[r],y=r==="gradient"?b.gradientStrokeWidth:b.strokeWidth;j=t.jsx(w,{diameter:b.diameter,strokeWidth:y})}const C=t.jsxs("div",{className:g?.indicator,style:V({display:"flex",flexDirection:"column",alignItems:"center",gap:"0.5rem"},m?.indicator),children:[j,a!=null&&!v&&t.jsx("div",{className:g?.tip,style:V({fontSize:b.tipFontSize,color:n.colorPrimary,whiteSpace:"nowrap"},m?.tip),children:a})]});return c?x?t.jsxs(t.Fragment,{children:[t.jsx("style",{children:ko}),t.jsx("div",{className:Ye(d,g?.root),style:V({position:"fixed",inset:0,zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.45)"},m?.root,h),children:C})]}):null:f!=null?t.jsxs(t.Fragment,{children:[t.jsx("style",{children:ko}),t.jsxs("div",{className:Ye(d,g?.root),style:V({position:"relative"},m?.root,h),children:[t.jsx("div",{className:g?.content,style:V({transition:"opacity 0.3s ease, filter 0.3s ease",...x&&{opacity:.5,filter:"blur(1px)",pointerEvents:"none",userSelect:"none"}},m?.content),children:f}),x&&t.jsx("div",{className:g?.overlay,style:V({position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",zIndex:10},m?.overlay),children:C})]})]}):x?t.jsxs(t.Fragment,{children:[t.jsx("style",{children:ko}),t.jsx("div",{className:Ye(d,g?.root),style:V({display:"inline-flex",alignItems:"center",justifyContent:"center"},m?.root,h),children:C})]}):null}function Lf({size:e}){const r=e==="small"?8:12;return t.jsx("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",style:{animation:"j-spin 1s linear infinite"},children:t.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:n.colorPrimary,strokeWidth:"3",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"12"})})}function Ef({autoFocus:e=!1,checked:r,checkedChildren:o,defaultChecked:s=!1,defaultValue:l,disabled:a=!1,loading:c=!1,size:u="default",unCheckedChildren:f,value:d,onChange:h,onClick:g,className:m,style:x,classNames:p,styles:b,tabIndex:v,id:j},C){const w=d??r,y=l??s,k=w!==void 0,[B,R]=i.useState(y),S=k?w:B,E=a||c,$=i.useRef(null),I=i.useRef(null),L=i.useRef(!1),[P,H]=i.useState(!1),[z,F]=i.useState("keyboard");i.useEffect(()=>{e&&$.current&&$.current.focus()},[]),i.useImperativeHandle(C,()=>({focus:()=>$.current?.focus(),blur:()=>$.current?.blur()}));const M=_=>{if(E)return;const J=!S;k||R(J),h?.(J,_),g?.(J,_)},W=!!(b?.track&&("backgroundColor"in b.track||"borderColor"in b.track||"border"in b.track)),A=()=>{E||!I.current||(W?I.current.style.filter="brightness(1.15)":S?I.current.style.backgroundColor=n.colorPrimaryHover:I.current.style.backgroundColor=n.colorSecondary)},D=()=>{E||!I.current||(W?I.current.style.filter="":S?I.current.style.backgroundColor=n.colorPrimary:I.current.style.backgroundColor=n.colorSecondary)},T=u==="small",O=T?1:1.375,Y=T?1.75:2.75,X=T?.75:1.125,K=.125,G=o!==void 0||f!==void 0,Q={position:"relative",display:"inline-flex",alignItems:"center",padding:0,margin:0,border:"none",background:"none",cursor:E?"not-allowed":"pointer",outline:"none",fontFamily:"inherit",lineHeight:1,...E?{opacity:.5}:{}},N={position:"relative",display:"inline-flex",alignItems:"center",...G?{minWidth:`${Y}rem`,height:`${O}rem`}:{width:`${Y}rem`,height:`${O}rem`},borderRadius:`${O/2}rem`,backgroundColor:S?n.colorPrimary:n.colorSecondary,transition:"background-color 0.2s ease, box-shadow 0.2s ease",boxShadow:P&&!E&&z==="keyboard"?`0 0 0 2px ${n.colorPrimaryLight}`:"none"},le={position:"absolute",top:`${K}rem`,left:S?`calc(100% - ${X+K}rem)`:`${K}rem`,width:`${X}rem`,height:`${X}rem`,borderRadius:"50%",backgroundColor:n.colorBg,boxShadow:"0 1px 3px rgba(0, 0, 0, 0.2)",transition:"left 0.2s ease",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1},re=X+K*2,q={display:"block",overflow:"hidden",fontSize:T?"0.5625rem":"0.75rem",color:"#fff",paddingLeft:`${S?T?.375:.5:re+(T?.125:.25)}rem`,paddingRight:`${S?re+(T?.125:.25):T?.375:.5}rem`,transition:"padding 0.2s ease",lineHeight:`${O}rem`,whiteSpace:"nowrap"};return t.jsxs(t.Fragment,{children:[t.jsx("style",{children:"@keyframes j-spin { to { transform: rotate(360deg); } }"}),t.jsx("button",{ref:$,id:j,type:"button",role:"switch","aria-checked":S,disabled:E,tabIndex:v,className:Ye(m,p?.root),style:V(Q,b?.root,x),onClick:M,onMouseDown:()=>{L.current=!0,F("mouse")},onMouseEnter:A,onMouseLeave:D,onFocus:()=>{F(L.current?"mouse":"keyboard"),L.current=!1,H(!0)},onBlur:()=>H(!1),children:t.jsxs("span",{ref:I,className:p?.track,style:V(N,b?.track),children:[G&&t.jsx("span",{className:p?.inner,style:V(q,b?.inner),children:S?o:f}),t.jsx("span",{className:p?.thumb,style:V(le,b?.thumb),children:c&&t.jsx(Lf,{size:u})})]})})]})}const $f=i.forwardRef(Ef),Pf={small:{height:"1.5rem",fontSize:"0.75rem",paddingH:"0.4375rem",radius:"0.375rem",thumbRadius:"0.25rem",thumbPadding:"0.125rem"},middle:{height:"2rem",fontSize:"0.875rem",paddingH:"0.6875rem",radius:"0.5rem",thumbRadius:"0.375rem",thumbPadding:"0.125rem"},large:{height:"2.5rem",fontSize:"1rem",paddingH:"0.75rem",radius:"0.5rem",thumbRadius:"0.375rem",thumbPadding:"0.125rem"}};function Df({options:e,value:r,defaultValue:o,onChange:s,disabled:l=!1,block:a=!1,vertical:c=!1,size:u="middle",name:f,className:d,style:h,classNames:g,styles:m}){const x=Pf[u],p=e.map(M=>typeof M=="string"||typeof M=="number"?{value:M,label:String(M)}:{...M,label:M.label??(M.icon?void 0:String(M.value))}),b=r!==void 0,[v,j]=i.useState(o??p[0]?.value),C=b?r:v,w=i.useCallback(M=>{b||j(M),s?.(M)},[b,s]),y=i.useRef(null),k=i.useRef(new Map),B=i.useRef(!0),R=i.useCallback(M=>W=>{W?k.current.set(M,W):k.current.delete(M)},[]),[S,E]=i.useState({opacity:0}),$=i.useCallback(()=>{if(!y.current)return;const W=C!==void 0?k.current.get(C):void 0;if(!W){E(X=>X.opacity===0?X:{opacity:0});return}const A=W.offsetLeft,D=W.offsetTop,T=W.offsetWidth,O=W.offsetHeight,Y=c?"top 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), height 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)":"left 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), width 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)";E({position:"absolute",top:c?D:x.thumbPadding,left:c?x.thumbPadding:A,width:c?`calc(100% - 2 * ${x.thumbPadding})`:T,height:c?O:`calc(100% - 2 * ${x.thumbPadding})`,borderRadius:x.thumbRadius,backgroundColor:n.colorBg,boxShadow:"0 1px 2px 0 rgba(0,0,0,0.03), 0 1px 6px -1px rgba(0,0,0,0.02), 0 2px 4px 0 rgba(0,0,0,0.02)",transition:B.current?"none":Y,zIndex:0,pointerEvents:"none",opacity:1}),B.current&&requestAnimationFrame(()=>{B.current=!1})},[C,x.thumbPadding,x.thumbRadius,c]);i.useLayoutEffect(()=>{$()},[$]),i.useEffect(()=>{const M=y.current;if(!M)return;const W=new ResizeObserver(()=>$());return W.observe(M),()=>W.disconnect()},[$]);const I=i.useCallback((M,W)=>{if(M.key==="Enter"||M.key===" "){M.preventDefault();const X=p.find(K=>K.value===W);X&&!X.disabled&&W!==C&&w(W);return}const A=c?["ArrowUp"]:["ArrowLeft"],D=c?["ArrowDown"]:["ArrowRight"];if(!A.includes(M.key)&&!D.includes(M.key))return;M.preventDefault();const T=p.findIndex(X=>X.value===W),O=D.includes(M.key)?1:-1,Y=p.length;for(let X=1;X<Y;X++){const K=(T+O*X+Y)%Y,G=p[K];if(!G.disabled){w(G.value),k.current.get(G.value)?.focus();return}}},[p,C,w,c]),L=!!(m?.item&&("backgroundColor"in m.item||"borderColor"in m.item||"border"in m.item||"color"in m.item)),P=(M,W,A)=>{if(A||W)return;const D=M.currentTarget;L?D.style.filter="brightness(1.15)":D.style.color=n.colorText},H=(M,W,A)=>{if(A||W)return;const D=M.currentTarget;L?D.style.filter="":D.style.color=n.colorTextMuted},z={position:"relative",display:a||c?"flex":"inline-flex",flexDirection:c?"column":"row",width:a||c?"100%":void 0,alignItems:c?"stretch":"center",backgroundColor:n.colorBgMuted,borderRadius:x.radius,padding:x.thumbPadding,boxSizing:"border-box",...l?{opacity:.5,cursor:"not-allowed"}:{}},F=(M,W)=>({position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.375rem",height:c?void 0:`calc(${x.height} - 2 * ${x.thumbPadding})`,padding:c?`${x.paddingH} ${x.paddingH}`:`0 ${x.paddingH}`,fontSize:x.fontSize,fontFamily:"inherit",color:M?n.colorText:n.colorTextMuted,fontWeight:M?600:400,cursor:W?"not-allowed":"pointer",userSelect:"none",whiteSpace:"nowrap",borderRadius:x.thumbRadius,transition:"color 0.2s ease, font-weight 0.2s ease",zIndex:1,flex:a&&!c?1:void 0,...W&&!l?{opacity:.5}:{}});return t.jsxs("div",{ref:y,role:"radiogroup",className:Ye(d,g?.root),style:V(z,m?.root,h),children:[t.jsx("div",{className:g?.thumb,style:V(S,m?.thumb)}),p.map(M=>{const W=M.value===C,A=!!(M.disabled||l);return t.jsxs("div",{ref:R(M.value),role:"radio","aria-checked":W,"aria-disabled":A||void 0,tabIndex:W?0:-1,className:Ye(M.className,g?.item),style:V(F(W,A),m?.item),onClick:()=>{!A&&M.value!==C&&w(M.value)},onMouseEnter:D=>P(D,W,A),onMouseLeave:D=>H(D,W,A),onKeyDown:D=>I(D,M.value),children:[f&&t.jsx("input",{type:"radio",name:f,value:String(M.value),checked:W,disabled:A,onChange:()=>w(M.value),style:{position:"absolute",opacity:0,width:0,height:0,pointerEvents:"none"}}),M.icon&&t.jsx("span",{style:{display:"inline-flex",lineHeight:0},children:M.icon}),M.label&&t.jsx("span",{children:M.label})]},String(M.value))})]})}function ri(){return t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("circle",{cx:"8",cy:"8",r:"6"}),t.jsx("polyline",{points:"8 4.5 8 8 10.5 9.5"})]})}function oi(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[t.jsx("circle",{cx:"7",cy:"7",r:"5.5",fill:"currentColor",opacity:"0.08"}),t.jsx("line",{x1:"5",y1:"5",x2:"9",y2:"9"}),t.jsx("line",{x1:"9",y1:"5",x2:"5",y2:"9"})]})}function zf(){return t.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"4",y1:"8",x2:"12",y2:"8"}),t.jsx("polyline",{points:"9 5 12 8 9 11"})]})}const ni={sm:{height:"1.75rem",fontSize:"0.75rem",radius:"0.25rem",paddingH:"0.5rem",inputFontSize:"1rem"},md:{height:"2.25rem",fontSize:"0.875rem",radius:"0.375rem",paddingH:"0.75rem",inputFontSize:"1rem"},lg:{height:"2.75rem",fontSize:"1rem",radius:"0.5rem",paddingH:"0.875rem",inputFontSize:"1rem"}};function Jo(e){return{showHour:/[Hh]/.test(e),showMinute:/m/.test(e),showSecond:/s/.test(e),use12Hours:/h/.test(e)||/[Aa]/.test(e)}}function si(e){return e?"hh:mm A":"HH:mm"}function ii(e,r){if(!e)return"";const o=e.getHours(),s=o%12||12,l=e.getMinutes(),a=e.getSeconds(),c=o>=12?"PM":"AM";return r.replace(/HH/g,String(o).padStart(2,"0")).replace(/H/g,String(o)).replace(/hh/g,String(s).padStart(2,"0")).replace(/h/g,String(s)).replace(/mm/g,String(l).padStart(2,"0")).replace(/m/g,String(l)).replace(/ss/g,String(a).padStart(2,"0")).replace(/s/g,String(a)).replace(/A/g,c).replace(/a/g,c.toLowerCase())}function Mn(e,r){if(!e.trim())return null;let o=0,s=0,l=0,a=!1,c=!1;const u=e.match(/\b(AM|PM|am|pm)\b/i);u&&(c=!0,a=u[1].toUpperCase()==="PM");const f=e.match(/\d+/g);if(!f)return null;const d=Jo(r);let h=0;if(d.showHour&&h<f.length&&(o=parseInt(f[h++],10),c&&(o===12?o=a?12:0:a&&(o+=12))),d.showMinute&&h<f.length&&(s=parseInt(f[h++],10)),d.showSecond&&h<f.length&&(l=parseInt(f[h++],10)),o<0||o>23||s<0||s>59||l<0||l>59)return null;const g=new Date;return g.setHours(o,s,l,0),g}const li="3.5rem",Wf="14rem",jo=28;function qr({type:e,value:r,options:o,onChange:s,columnStyle:l,columnClassName:a,isLast:c,changeOnScroll:u}){const f=i.useRef(null),d=i.useRef(null),h=i.useRef(!1);i.useEffect(()=>{if(!f.current)return;const m=o.findIndex(x=>x.value===r);if(m>=0){const x=m*jo;f.current.scrollTo({top:x,behavior:"smooth"})}},[r,o]),i.useEffect(()=>{if(!u||!f.current)return;const m=f.current,x=()=>{h.current=!0,d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{if(!h.current)return;h.current=!1;const p=m.scrollTop,b=Math.round(p/jo),v=Math.max(0,Math.min(b,o.length-1)),j=o[v];j&&!j.disabled&&j.value!==r&&s(j.value),m.scrollTo({top:v*jo,behavior:"smooth"})},120)};return m.addEventListener("scroll",x,{passive:!0}),()=>{m.removeEventListener("scroll",x),d.current&&clearTimeout(d.current)}},[u,o,r,s]);const g={display:"flex",flexDirection:"column",alignItems:"center",height:Wf,overflowY:"auto",overflowX:"hidden",minWidth:li,flex:1,scrollbarWidth:"thin",scrollbarColor:`${n.colorBorderHover} transparent`,borderRight:c?"none":`1px solid ${n.colorBorder}`,...l};return t.jsx("div",{ref:f,className:`j-tp-col${a?` ${a}`:""}`,style:g,children:o.map(m=>{const x=m.value===r,p=!!m.disabled;return t.jsx("button",{type:"button",disabled:p,onClick:()=>{p||s(m.value)},style:{width:"3rem",height:"1.75rem",flexShrink:0,border:"none",borderRadius:"0.25rem",backgroundColor:x?n.colorPrimaryBg:"transparent",color:x?n.colorPrimary:p?n.colorTextSubtle:n.colorText,cursor:p?"not-allowed":"pointer",fontSize:"0.8125rem",fontWeight:x?600:400,fontFamily:e==="ampm"?"inherit":"monospace",transition:"background-color 0.1s ease",opacity:p?.4:1,padding:0},onMouseEnter:b=>{!p&&!x&&(b.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:b=>{!p&&!x&&(b.currentTarget.style.backgroundColor="transparent")},children:m.label},String(m.value))})})}const br=220,sr=br/2,Tr=85,Qr=55,Ir=32;function Hf({hours:e,minutes:r,seconds:o,onChange:s,use12Hours:l,showSecond:a,disabledTimeConfig:c,minuteStep:u,secondStep:f}){const[d,h]=i.useState("hour"),g=i.useRef(null),m=i.useRef(!1),x=e>=12,p=l?e%12||12:e,b=d==="hour"?e%12/12*360:d==="minute"?r/60*360:o/60*360,v=d==="hour"&&!l&&(e===0||e>12)?Qr:Tr,j=sr+Math.sin(b*Math.PI/180)*v,C=sr-Math.cos(b*Math.PI/180)*v,w=i.useCallback((I,L)=>{if(!g.current)return;const P=g.current.getBoundingClientRect(),H=I-(P.left+P.width/2),z=L-(P.top+P.height/2);let F=Math.atan2(H,-z)*180/Math.PI;if(F<0&&(F+=360),d==="hour"){const M=c?.disabledHours?.()??[],W=Math.round(F/30)%12;if(l){const A=W===0?12:W,D=x?A===12?12:A+12:A===12?0:A;M.includes(D)||s("hour",A)}else{const A=Math.sqrt(H*H+z*z),D=P.width/br,T=(Tr+Qr)/2*D;let O;A<T?O=W===0?0:W+12:O=W===0?12:W,M.includes(O)||s("hour",O)}}else{const M=d==="minute"?u:f;let W=Math.round(F/6)%60;W=Math.round(W/M)*M,W>=60&&(W=0),(d==="minute"?c?.disabledMinutes?.(e)??[]:c?.disabledSeconds?.(e,r)??[]).includes(W)||s(d,W)}},[d,l,x,e,r,s,u,f,c]),y=i.useCallback(I=>{I.preventDefault(),m.current=!0,w(I.clientX,I.clientY)},[w]);i.useEffect(()=>{if(!m.current)return;const I=P=>{m.current&&w(P.clientX,P.clientY)},L=P=>{m.current&&(m.current=!1,w(P.clientX,P.clientY),d==="hour"?h("minute"):d==="minute"&&a&&h("second"))};return document.addEventListener("mousemove",I),document.addEventListener("mouseup",L),()=>{document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",L)}});const k=i.useMemo(()=>{if(d==="hour"){const L=c?.disabledHours?.()??[];if(l)return Array.from({length:12},(z,F)=>{const M=F===0?12:F,W=x?M===12?12:M+12:M===12?0:M;return{value:M,label:String(M),angle:F/12*360,radius:Tr,disabled:L.includes(W)}});const P=Array.from({length:12},(z,F)=>{const M=F===0?12:F;return{value:M,label:String(M),angle:F/12*360,radius:Tr,disabled:L.includes(M)}}),H=Array.from({length:12},(z,F)=>{const M=F===0?0:F+12;return{value:M,label:String(M).padStart(2,"0"),angle:F/12*360,radius:Qr,disabled:L.includes(M)}});return[...P,...H]}const I=d==="minute"?c?.disabledMinutes?.(e)??[]:c?.disabledSeconds?.(e,r)??[];return Array.from({length:12},(L,P)=>{const H=P*5;return{value:H,label:String(H).padStart(2,"0"),angle:P/12*360,radius:Tr,disabled:I.includes(H)}})},[d,l,x,e,r,c]),B=l?String(p).padStart(2,"0"):String(e).padStart(2,"0"),R=String(r).padStart(2,"0"),S=String(o).padStart(2,"0"),E=I=>({border:"none",background:"none",cursor:"pointer",fontFamily:"monospace",fontSize:"1.5rem",fontWeight:I?700:400,color:I?n.colorPrimary:n.colorTextMuted,padding:"0.125rem 0.25rem",borderRadius:"0.25rem",transition:"color 0.15s ease"}),$=I=>({border:"none",background:"none",cursor:"pointer",fontFamily:"inherit",fontSize:"0.6875rem",fontWeight:I?700:400,color:I?n.colorPrimary:n.colorTextMuted,padding:"0 0.25rem",lineHeight:1.2});return t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",padding:"0.75rem"},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",marginBottom:"0.75rem"},children:[t.jsx("button",{type:"button",onClick:()=>h("hour"),style:E(d==="hour"),children:B}),t.jsx("span",{style:{fontSize:"1.5rem",color:n.colorTextMuted,fontFamily:"monospace"},children:":"}),t.jsx("button",{type:"button",onClick:()=>h("minute"),style:E(d==="minute"),children:R}),a&&t.jsxs(t.Fragment,{children:[t.jsx("span",{style:{fontSize:"1.5rem",color:n.colorTextMuted,fontFamily:"monospace"},children:":"}),t.jsx("button",{type:"button",onClick:()=>h("second"),style:E(d==="second"),children:S})]}),l&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",marginLeft:"0.5rem",gap:"0.125rem"},children:[t.jsx("button",{type:"button",onClick:()=>{x&&s("ampm","AM")},style:$(!x),children:"AM"}),t.jsx("button",{type:"button",onClick:()=>{x||s("ampm","PM")},style:$(x),children:"PM"})]})]}),t.jsxs("div",{ref:g,onMouseDown:y,style:{position:"relative",width:br,height:br,borderRadius:"50%",backgroundColor:n.colorBgMuted,cursor:"pointer",touchAction:"none",userSelect:"none"},children:[t.jsxs("svg",{width:br,height:br,style:{position:"absolute",inset:0,pointerEvents:"none"},children:[t.jsx("line",{x1:sr,y1:sr,x2:j,y2:C,stroke:n.colorPrimary,strokeWidth:2}),t.jsx("circle",{cx:sr,cy:sr,r:3,fill:n.colorPrimary}),t.jsx("circle",{cx:j,cy:C,r:Ir/2,fill:n.colorPrimary,opacity:.12})]}),k.map(I=>{const L=I.angle*Math.PI/180,P=sr+Math.sin(L)*I.radius-Ir/2,H=sr-Math.cos(L)*I.radius-Ir/2,z=d==="hour"?I.value===(l?p:e):d==="minute"?I.value===r:I.value===o,F=I.radius===Qr;return t.jsx("div",{style:{position:"absolute",left:P,top:H,width:Ir,height:Ir,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%",fontSize:F?"0.6875rem":"0.8125rem",fontWeight:z?600:400,color:z?"#fff":I.disabled?n.colorTextSubtle:n.colorText,backgroundColor:z?n.colorPrimary:"transparent",opacity:I.disabled?.4:1,pointerEvents:"none",zIndex:1,transition:"background-color 0.15s ease, color 0.15s ease"},children:I.label},`${I.value}-${I.radius}`)})]})]})}function zo({pendingValue:e,onChange:r,onOk:o,onNow:s,formatConfig:l,hourStep:a,minuteStep:c,secondStep:u,disabledTimeConfig:f,showNow:d,needConfirm:h,addon:g,changeOnScroll:m,showAnalog:x,styles:p,classNames:b}){const v=e?e.getHours():0,j=e?e.getMinutes():0,C=e?e.getSeconds():0,w=l.use12Hours,y=w?v%12||12:v,k=v>=12,B=f?.disabledHours?.()??[],R=f?.disabledMinutes?.(v)??[],S=f?.disabledSeconds?.(v,j)??[],E=i.useMemo(()=>{const W=w?12:23,A=w?1:0,D=[];for(let T=A;T<=W;T+=a){let O=T;w&&(O=k?T===12?12:T+12:T===12?0:T),D.push({value:T,label:String(T).padStart(2,"0"),disabled:B.includes(O)})}return D},[w,a,B,k]),$=i.useMemo(()=>{const W=[];for(let A=0;A<=59;A+=c)W.push({value:A,label:String(A).padStart(2,"0"),disabled:R.includes(A)});return W},[c,R]),I=i.useMemo(()=>{const W=[];for(let A=0;A<=59;A+=u)W.push({value:A,label:String(A).padStart(2,"0"),disabled:S.includes(A)});return W},[u,S]),L=[{value:"AM",label:"AM"},{value:"PM",label:"PM"}],P={hour:"Horas",minute:"Minutos",second:"Segundos",ampm:"AM/PM"},z=[{type:"hour",show:l.showHour},{type:"minute",show:l.showMinute},{type:"second",show:l.showSecond},{type:"ampm",show:l.use12Hours}].filter(W=>W.show),F={fontSize:"0.6875rem",fontWeight:600,color:n.colorTextMuted,textAlign:"center",padding:"0.375rem 0",minWidth:li,flex:1},M={border:"none",backgroundColor:"transparent",cursor:"pointer",color:n.colorPrimary,fontSize:"0.8125rem",fontWeight:500,fontFamily:"inherit",padding:"0.25rem 0"};return t.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[x?t.jsx(Hf,{hours:v,minutes:j,seconds:C,onChange:r,use12Hours:w,showSecond:l.showSecond,minuteStep:c,secondStep:u,disabledTimeConfig:f}):t.jsxs(t.Fragment,{children:[t.jsx("div",{style:{display:"flex",borderBottom:`1px solid ${n.colorBorder}`},children:z.map((W,A)=>t.jsx("div",{style:{...F,borderRight:A<z.length-1?`1px solid ${n.colorBorder}`:"none"},children:P[W.type]},W.type))}),t.jsx("div",{style:{display:"flex",padding:"0.5rem 0"},children:z.map((W,A)=>{const D=A===z.length-1;return W.type==="hour"?t.jsx(qr,{type:"hour",value:y,options:E,onChange:T=>r("hour",T),columnStyle:p?.column,columnClassName:b?.column,isLast:D,changeOnScroll:m},"hour"):W.type==="minute"?t.jsx(qr,{type:"minute",value:j,options:$,onChange:T=>r("minute",T),columnStyle:p?.column,columnClassName:b?.column,isLast:D,changeOnScroll:m},"minute"):W.type==="second"?t.jsx(qr,{type:"second",value:C,options:I,onChange:T=>r("second",T),columnStyle:p?.column,columnClassName:b?.column,isLast:D,changeOnScroll:m},"second"):W.type==="ampm"?t.jsx(qr,{type:"ampm",value:k?"PM":"AM",options:L,onChange:T=>r("ampm",T),columnStyle:p?.column,columnClassName:b?.column,isLast:D,changeOnScroll:m},"ampm"):null})})]}),g!=null&&t.jsx("div",{style:{borderTop:`1px solid ${n.colorBorder}`,padding:"0.5rem 0.75rem"},children:g}),(d||h)&&t.jsxs("div",{className:b?.footer,style:V({borderTop:`1px solid ${n.colorBorder}`,padding:"0.5rem 0.75rem",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"1rem"},p?.footer),children:[t.jsx("div",{style:{flex:1},children:d&&t.jsx("button",{type:"button",style:M,onClick:s,children:"Now"})}),h&&t.jsx("button",{type:"button",onClick:o,style:{padding:"0.1875rem 0.75rem",border:"none",borderRadius:"0.25rem",backgroundColor:n.colorPrimary,color:"#fff",cursor:"pointer",fontSize:"0.8125rem",fontWeight:500,fontFamily:"inherit",transition:"filter 0.15s ease"},onMouseEnter:W=>{W.currentTarget.style.filter="brightness(1.1)"},onMouseLeave:W=>{W.currentTarget.style.filter="none"},children:"OK"})]})]})}function Ff({value:e,defaultValue:r,onChange:o,onCalendarChange:s,onOpenChange:l,open:a,defaultOpen:c=!1,format:u,use12Hours:f,hourStep:d=1,minuteStep:h=1,secondStep:g=1,disabled:m=!1,allowClear:x=!0,placeholder:p,placement:b="bottomLeft",size:v="md",variant:j="outlined",status:C,needConfirm:w=!0,showNow:y=!0,prefix:k,suffix:B,addon:R,changeOnScroll:S=!1,showAnalog:E=!1,inputReadOnly:$=!1,disabledTime:I,className:L,style:P,classNames:H,styles:z,id:F,autoFocus:M}){const W=u??si(f),A=i.useMemo(()=>Jo(W),[W]),D=e!==void 0,[T,O]=i.useState(r??null),Y=D?e??null:T,X=a!==void 0,[K,G]=i.useState(c),Q=X?a:K,[N,le]=i.useState(null),[re,q]=i.useState(!1),[_,J]=i.useState(b),[Te,ke]=i.useState(""),[Ie,fe]=i.useState(!1),ze=i.useRef(null),me=i.useRef(null),he=i.useRef(null),Le=i.useRef(null),De=C==="error"?n.colorError:C==="warning"?n.colorWarning:void 0,Oe=C==="error"?n.colorErrorBg:C==="warning"?n.colorWarningBg:n.colorPrimaryLight,Be=i.useCallback(xe=>ii(xe,W),[W]),we=i.useCallback(xe=>{m||(xe&&J(b),X||G(xe),l?.(xe),xe||(fe(!1),Le.current&&j!=="borderless"&&(Le.current.style.borderColor=De??n.colorBorder)))},[m,X,l,b,j,De]);i.useEffect(()=>{J(b)},[b]),i.useLayoutEffect(()=>{if(!Q||!me.current||!ze.current)return;const xe=me.current.getBoundingClientRect(),U=ze.current.getBoundingClientRect(),de=U.top,ue=window.innerHeight-U.bottom,We=_.startsWith("top");!We&&xe.bottom>window.innerHeight?de>ue&&J($e=>$e.replace("bottom","top")):We&&xe.top<0&&ue>de&&J($e=>$e.replace("top","bottom"))}),i.useEffect(()=>{Q&&(q(!1),requestAnimationFrame(()=>{requestAnimationFrame(()=>q(!0))}),le(Y?new Date(Y.getTime()):null))},[Q]),i.useEffect(()=>{if(!Q)return;const xe=U=>{ze.current?.contains(U.target)||me.current?.contains(U.target)||we(!1)};return document.addEventListener("mousedown",xe),()=>document.removeEventListener("mousedown",xe)},[Q]),i.useEffect(()=>{M&&he.current&&he.current.focus()},[]);const ee=i.useCallback(xe=>{D||O(xe);const U=Be(xe);o?.(xe,U)},[D,Be,o]),ae=i.useCallback((xe,U)=>{const de=N??Y??(()=>{const We=new Date;return We.setHours(0,0,0,0),We})(),ue=new Date(de.getTime());if(xe==="hour"){let We=U;A.use12Hours&&(We=ue.getHours()>=12?We===12?12:We+12:We===12?0:We),ue.setHours(We)}else if(xe==="minute")ue.setMinutes(U);else if(xe==="second")ue.setSeconds(U);else if(xe==="ampm"){const We=ue.getHours();U==="AM"&&We>=12&&ue.setHours(We-12),U==="PM"&&We<12&&ue.setHours(We+12)}w?(le(ue),s?.(ue,Be(ue))):(le(ue),ee(ue))},[N,Y,A.use12Hours,w,ee,Be,s]),se=i.useCallback(()=>{const xe=new Date;w?(le(xe),s?.(xe,Be(xe))):ee(xe)},[w,ee,Be,s]),Se=i.useCallback(()=>{N&&(D||O(N),o?.(N,Be(N))),we(!1)},[N,D,o,Be,we]),ie=i.useCallback(xe=>{xe.stopPropagation(),D||O(null),o?.(null,"")},[D,o]),ce=i.useCallback(xe=>{$||(fe(!0),ke(xe.target.value))},[$]),He=i.useCallback(()=>{if(Ie&&Te){const xe=Mn(Te,W);xe&&ee(xe)}fe(!1)},[Ie,Te,W,ee]),Pe=i.useCallback(xe=>{if(xe.key==="Enter"){if(Ie&&Te){const U=Mn(Te,W);U&&ee(U)}fe(!1)}else xe.key==="Escape"&&we(!1)},[Ie,Te,W,ee,we]),Ge=ni[v],Ne=Ie?Te:Be(Y),oe=_.startsWith("top"),Re=_.endsWith("Right"),Ze={position:"absolute",zIndex:1050,...oe?{bottom:"100%",marginBottom:"0.25rem"}:{top:"100%",marginTop:"0.25rem"},...Re?{right:0}:{left:0}},Fe=j==="borderless"?"none":`1px solid ${De??n.colorBorder}`,et=j==="filled"?n.colorBgMuted:"transparent",je=B!==void 0?B:t.jsx("span",{style:{color:n.colorTextMuted,display:"flex"},children:t.jsx(ri,{})}),ve=I?.();return t.jsxs("div",{ref:ze,className:Ye(L,H?.root),style:V({position:"relative",display:"inline-block"},z?.root,P),id:F,children:[t.jsxs("div",{ref:Le,className:H?.input,onClick:()=>{m||(Q||we(!0),he.current?.focus())},style:V({display:"flex",alignItems:"center",gap:"0.5rem",height:Ge.height,padding:`0 ${Ge.paddingH}`,border:Fe,borderRadius:Ge.radius,backgroundColor:et,cursor:m?"not-allowed":"pointer",opacity:m?.5:1,boxShadow:Q&&j!=="borderless"?`0 0 0 2px ${Oe}`:void 0,transition:"border-color 0.2s ease, box-shadow 0.2s ease"},z?.input),onMouseEnter:xe=>{!m&&j!=="borderless"&&(xe.currentTarget.style.borderColor=De??n.colorPrimary)},onMouseLeave:xe=>{!m&&j!=="borderless"&&!Q&&(xe.currentTarget.style.borderColor=De??n.colorBorder)},children:[k!=null&&t.jsx("span",{style:{display:"flex",flexShrink:0,color:n.colorTextMuted},children:k}),t.jsx("input",{ref:he,value:Ne,placeholder:p??"Select time",readOnly:$,disabled:m,onChange:ce,onFocus:()=>{Q||we(!0)},onBlur:He,onKeyDown:Pe,autoFocus:M,style:{flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",fontSize:Ge.inputFontSize,fontFamily:"inherit",color:De??n.colorText,cursor:m?"not-allowed":void 0,padding:0}}),x&&Y&&!m&&t.jsx("span",{onClick:ie,style:{display:"flex",cursor:"pointer",color:n.colorTextMuted,flexShrink:0,transition:"color 0.15s ease"},onMouseEnter:xe=>{xe.currentTarget.style.color=n.colorText},onMouseLeave:xe=>{xe.currentTarget.style.color=n.colorTextMuted},children:t.jsx(oi,{})}),je]}),Q&&t.jsxs("div",{ref:me,className:H?.popup,style:V({...Ze,borderRadius:"0.5rem",border:`1px solid ${n.colorBorder}`,boxShadow:n.shadowMd,backgroundColor:n.colorBg,opacity:re?1:0,transform:re?"translateY(0)":`translateY(${oe?4:-4}px)`,transition:"opacity 0.2s ease, transform 0.2s ease",overflow:"hidden"},z?.popup),onMouseDown:xe=>xe.preventDefault(),children:[t.jsx("style",{children:`
|
|
168
168
|
.j-tp-col::-webkit-scrollbar { width: 4px; }
|
|
169
169
|
.j-tp-col::-webkit-scrollbar-track { background: transparent; }
|
|
170
170
|
.j-tp-col::-webkit-scrollbar-thumb { background: ${n.colorBorderHover}; border-radius: 4px; }
|
|
171
171
|
.j-tp-col::-webkit-scrollbar-thumb:hover { background: ${n.colorTextSubtle}; }
|
|
172
|
-
`}),t.jsx(zo,{pendingValue:w?N:N??Y,onChange:ae,onOk:
|
|
172
|
+
`}),t.jsx(zo,{pendingValue:w?N:N??Y,onChange:ae,onOk:Se,onNow:se,formatConfig:A,hourStep:d,minuteStep:h,secondStep:g,disabledTimeConfig:ve,showNow:y,needConfirm:w,addon:R,changeOnScroll:S,showAnalog:E,styles:z,classNames:H})]})]})}function Af({value:e,defaultValue:r,onChange:o,onCalendarChange:s,onOpenChange:l,open:a,defaultOpen:c=!1,format:u,use12Hours:f,hourStep:d=1,minuteStep:h=1,secondStep:g=1,disabled:m=!1,allowClear:x=!0,placeholder:p,separator:b,placement:v="bottomLeft",size:j="md",variant:C="outlined",status:w,needConfirm:y=!0,showNow:k=!0,order:B=!0,prefix:R,suffix:S,addon:E,changeOnScroll:$=!1,inputReadOnly:I=!1,disabledTime:L,className:P,style:H,classNames:z,styles:F,id:M}){const W=u??si(f),A=i.useMemo(()=>Jo(W),[W]),D=typeof m=="boolean"?m:m[0],T=typeof m=="boolean"?m:m[1],O=D&&T,Y=e!==void 0,[X,K]=i.useState(r??[null,null]),G=Y?e??[null,null]:X,Q=a!==void 0,[N,le]=i.useState(c),re=Q?a:N,[q,_]=i.useState("start"),[J,Te]=i.useState(null),[ke,Ie]=i.useState(null),[fe,ze]=i.useState(!1),[me,he]=i.useState(v),Le=i.useRef(null),De=i.useRef(null),Oe=i.useRef(null),Be=i.useRef(null),we=i.useRef(null),ee=w==="error"?n.colorError:w==="warning"?n.colorWarning:void 0,ae=w==="error"?n.colorErrorBg:w==="warning"?n.colorWarningBg:n.colorPrimaryLight,se=i.useCallback($e=>ii($e,W),[W]),Se=i.useCallback($e=>{O||($e&&he(v),Q||le($e),l?.($e),$e||we.current&&C!=="borderless"&&(we.current.style.borderColor=ee??n.colorBorder))},[O,Q,l,v,C,ee]);i.useEffect(()=>{he(v)},[v]),i.useLayoutEffect(()=>{if(!re||!De.current||!Le.current)return;const $e=De.current.getBoundingClientRect(),ne=Le.current.getBoundingClientRect(),be=ne.top,Ke=window.innerHeight-ne.bottom,Qe=me.startsWith("top");!Qe&&$e.bottom>window.innerHeight?be>Ke&&he(tt=>tt.replace("bottom","top")):Qe&&$e.top<0&&Ke>be&&he(tt=>tt.replace("top","bottom"))}),i.useEffect(()=>{re&&(ze(!1),requestAnimationFrame(()=>{requestAnimationFrame(()=>ze(!0))}),Te(G[0]?new Date(G[0].getTime()):null),Ie(G[1]?new Date(G[1].getTime()):null))},[re]),i.useEffect(()=>{if(!re)return;const $e=ne=>{Le.current?.contains(ne.target)||De.current?.contains(ne.target)||He()};return document.addEventListener("mousedown",$e),()=>document.removeEventListener("mousedown",$e)},[re]);const ie=$e=>$e?$e.getHours()*36e5+$e.getMinutes()*6e4+$e.getSeconds()*1e3:0,ce=i.useCallback(($e,ne)=>{let be=$e,Ke=ne;if(B&&be&&Ke&&ie(be)>ie(Ke)){const tt=be;be=Ke,Ke=tt}const Qe=[be,Ke];Y||K(Qe),o?.(Qe,[se(be),se(Ke)])},[B,Y,o,se]),He=i.useCallback(()=>{y&&ce(J,ke),Se(!1)},[y,J,ke,ce,Se]),Pe=i.useCallback(($e,ne,be)=>{const Ke=$e==="start"?Te:Ie,Qe=()=>{const Ct=new Date;return Ct.setHours(0,0,0,0),Ct},tt=$e==="start"?J??G[0]??Qe():ke??G[1]??Qe(),dt=new Date(tt.getTime());if(ne==="hour"){let Ct=be;A.use12Hours&&(Ct=dt.getHours()>=12?Ct===12?12:Ct+12:Ct===12?0:Ct),dt.setHours(Ct)}else if(ne==="minute")dt.setMinutes(be);else if(ne==="second")dt.setSeconds(be);else if(ne==="ampm"){const Ct=dt.getHours();be==="AM"&&Ct>=12&&dt.setHours(Ct-12),be==="PM"&&Ct<12&&dt.setHours(Ct+12)}Ke(dt);const ft=$e==="start"?dt:J,gt=$e==="end"?dt:ke;y?s?.([ft,gt],[se(ft),se(gt)],{range:$e}):ce(ft,gt)},[J,ke,G,A.use12Hours,y,ce,se,s]),Ge=i.useCallback(()=>{const $e=new Date;q==="start"?(Te($e),y||ce($e,ke)):(Ie($e),y||ce(J,$e))},[q,y,J,ke,ce]),Ne=i.useCallback(()=>{ce(J,ke),Se(!1)},[J,ke,ce,Se]),oe=i.useCallback($e=>{$e.stopPropagation(),Y||K([null,null]),o?.(null,["",""])},[Y,o]),Re=ni[j],Ze=me.startsWith("top"),Fe=me.endsWith("Right"),et={position:"absolute",zIndex:1050,...Ze?{bottom:"100%",marginBottom:"0.25rem"}:{top:"100%",marginTop:"0.25rem"},...Fe?{right:0}:{left:0}},je=C==="borderless"?"none":`1px solid ${ee??n.colorBorder}`,ve=C==="filled"?n.colorBgMuted:"transparent",xe=S!==void 0?S:t.jsx("span",{style:{color:n.colorTextMuted,display:"flex"},children:t.jsx(ri,{})}),U=G[0]||G[1],de={flex:1,minWidth:0,border:"none",outline:"none",backgroundColor:"transparent",fontSize:Re.inputFontSize,fontFamily:"inherit",color:ee??n.colorText,cursor:O?"not-allowed":void 0,padding:0,textAlign:"center"},ue=L?.("start"),We=L?.("end");return t.jsxs("div",{ref:Le,className:Ye(P,z?.root),style:V({position:"relative",display:"inline-block"},F?.root,H),id:M,children:[t.jsxs("div",{ref:we,className:z?.input,onClick:()=>{O||(re||Se(!0),q==="start"?Oe.current?.focus():Be.current?.focus())},style:V({display:"flex",alignItems:"center",gap:"0.5rem",height:Re.height,padding:`0 ${Re.paddingH}`,border:je,borderRadius:Re.radius,backgroundColor:ve,cursor:O?"not-allowed":"pointer",opacity:O?.5:1,boxShadow:re&&C!=="borderless"?`0 0 0 2px ${ae}`:void 0,transition:"border-color 0.2s ease, box-shadow 0.2s ease"},F?.input),onMouseEnter:$e=>{!O&&C!=="borderless"&&($e.currentTarget.style.borderColor=ee??n.colorPrimary)},onMouseLeave:$e=>{!O&&C!=="borderless"&&!re&&($e.currentTarget.style.borderColor=ee??n.colorBorder)},children:[R!=null&&t.jsx("span",{style:{display:"flex",flexShrink:0,color:n.colorTextMuted},children:R}),t.jsx("input",{ref:Oe,value:se(G[0]),placeholder:p?.[0]??"Start time",readOnly:I,disabled:D,onFocus:()=>{_("start"),re||Se(!0)},onChange:()=>{},style:{...de,fontWeight:re&&q==="start"?600:400,opacity:D?.5:1}}),t.jsx("span",{style:{display:"flex",color:n.colorTextMuted,flexShrink:0},children:b??t.jsx(zf,{})}),t.jsx("input",{ref:Be,value:se(G[1]),placeholder:p?.[1]??"End time",readOnly:I,disabled:T,onFocus:()=>{_("end"),re||Se(!0)},onChange:()=>{},style:{...de,fontWeight:re&&q==="end"?600:400,opacity:T?.5:1}}),x&&U&&!O&&t.jsx("span",{onClick:oe,style:{display:"flex",cursor:"pointer",color:n.colorTextMuted,flexShrink:0,transition:"color 0.15s ease"},onMouseEnter:$e=>{$e.currentTarget.style.color=n.colorText},onMouseLeave:$e=>{$e.currentTarget.style.color=n.colorTextMuted},children:t.jsx(oi,{})}),xe]}),re&&t.jsxs("div",{ref:De,className:z?.popup,style:V({...et,borderRadius:"0.5rem",border:`1px solid ${n.colorBorder}`,boxShadow:n.shadowMd,backgroundColor:n.colorBg,opacity:fe?1:0,transform:fe?"translateY(0)":`translateY(${Ze?4:-4}px)`,transition:"opacity 0.2s ease, transform 0.2s ease",overflow:"hidden"},F?.popup),onMouseDown:$e=>$e.preventDefault(),children:[t.jsx("style",{children:`
|
|
173
173
|
.j-tp-col::-webkit-scrollbar { width: 4px; }
|
|
174
174
|
.j-tp-col::-webkit-scrollbar-track { background: transparent; }
|
|
175
175
|
.j-tp-col::-webkit-scrollbar-thumb { background: ${n.colorBorderHover}; border-radius: 4px; }
|
|
176
176
|
.j-tp-col::-webkit-scrollbar-thumb:hover { background: ${n.colorTextSubtle}; }
|
|
177
|
-
`}),t.jsxs("div",{style:{display:"flex"},children:[t.jsxs("div",{style:{borderRight:`1px solid ${n.colorBorder}`},children:[t.jsx("div",{style:{padding:"0.375rem 0.5rem",fontSize:"0.75rem",fontWeight:600,color:q==="start"?n.colorPrimary:n.colorTextMuted,textAlign:"center",borderBottom:`1px solid ${n.colorBorder}`},children:"Start"}),t.jsx(zo,{pendingValue:y?re:re??G[0],onChange:($e,ne)=>Pe("start",$e,ne),formatConfig:F,hourStep:d,minuteStep:h,secondStep:g,disabledTimeConfig:de,showNow:!1,needConfirm:!1,changeOnScroll:$,styles:A,classNames:z})]}),t.jsxs("div",{children:[t.jsx("div",{style:{padding:"0.375rem 0.5rem",fontSize:"0.75rem",fontWeight:600,color:q==="end"?n.colorPrimary:n.colorTextMuted,textAlign:"center",borderBottom:`1px solid ${n.colorBorder}`},children:"End"}),t.jsx(zo,{pendingValue:y?Ce:Ce??G[1],onChange:($e,ne)=>Pe("end",$e,ne),formatConfig:F,hourStep:d,minuteStep:h,secondStep:g,disabledTimeConfig:We,showNow:!1,needConfirm:!1,changeOnScroll:$,styles:A,classNames:z})]})]}),L!=null&&t.jsx("div",{style:{borderTop:`1px solid ${n.colorBorder}`,padding:"0.5rem 0.75rem"},children:L}),(k||y)&&t.jsxs("div",{className:z?.footer,style:V({borderTop:`1px solid ${n.colorBorder}`,padding:"0.5rem 0.75rem",display:"flex",alignItems:"center",justifyContent:"space-between"},A?.footer),children:[t.jsx("div",{children:k&&t.jsx("button",{type:"button",style:{border:"none",backgroundColor:"transparent",cursor:"pointer",color:n.colorPrimary,fontSize:"0.8125rem",fontWeight:500,fontFamily:"inherit",padding:"0.25rem 0"},onClick:Ge,children:"Now"})}),y&&t.jsx("button",{type:"button",onClick:Z,style:{padding:"0.1875rem 0.75rem",border:"none",borderRadius:"0.25rem",backgroundColor:n.colorPrimary,color:"#fff",cursor:"pointer",fontSize:"0.8125rem",fontWeight:500,fontFamily:"inherit",transition:"filter 0.15s ease"},onMouseEnter:$e=>{$e.currentTarget.style.filter="brightness(1.1)"},onMouseLeave:$e=>{$e.currentTarget.style.filter="none"},children:"OK"})]})]})]})}const Of=Object.assign(Ff,{RangePicker:Af});function Nf(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"2 5.5 4 7.5 8 3"})})}function Vf(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("line",{x1:"2.5",y1:"5",x2:"7.5",y2:"5"})})}function Yf(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("circle",{cx:"11",cy:"11",r:"8"}),t.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}function Kf(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"9 18 15 12 9 6"})})}function _f(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"15 18 9 12 15 6"})})}function Xf(){return t.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function Bn({direction:e}){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:e==="right"?t.jsx("polyline",{points:"9 18 15 12 9 6"}):t.jsx("polyline",{points:"15 18 9 12 15 6"})})}function Rn({checked:e,indeterminate:r,disabled:o,onChange:s}){const l=e&&!r,a=r,c={display:"inline-flex",alignItems:"center",justifyContent:"center",width:"0.875rem",height:"0.875rem",borderRadius:"0.1875rem",border:`2px solid ${e||r?n.colorPrimary:n.colorBorder}`,backgroundColor:e||r?n.colorPrimary:"transparent",color:"#fff",flexShrink:0,cursor:o?"not-allowed":"pointer",transition:"border-color 0.2s ease, background-color 0.2s ease",opacity:o?.5:1};return t.jsxs("span",{style:c,onClick:u=>{u.stopPropagation(),o||s()},children:[l&&t.jsx(Nf,{}),a&&t.jsx(Vf,{})]})}function Tn({direction:e,items:r,selectedKeys:o,onSelect:s,onSelectAll:l,title:a,showSearch:c,searchValue:u,onSearchChange:f,filterOption:d,render:h,disabled:g,showSelectAll:m,oneWay:x,onRemove:p,footer:b,pagination:v,listStyle:j,classNames:C,styles:w,statusBorderColor:y}){const k=i.useMemo(()=>new Set(o),[o]),B=i.useMemo(()=>u?r.filter(N=>d(u,N)):r,[r,u,d]),R=i.useMemo(()=>B.filter(N=>!N.disabled),[B]),S=i.useMemo(()=>R.filter(N=>k.has(N.key)).length,[R,k]),[L,$]=i.useState(1),I=v?.pageSize??10,P=v?Math.max(1,Math.ceil(B.length/I)):1,E=Math.min(L,P);i.useEffect(()=>{$(1)},[u]);const H=v?B.slice((E-1)*I,E*I):B,z=R.length>0&&S===R.length,A=S>0&&!z,M=()=>{if(g)return;const N=R.map(le=>le.key);l(N,!z)},W={display:"flex",flexDirection:"column",width:"12rem",height:"18rem",border:`1px solid ${y??n.colorBorder}`,borderRadius:"0.5rem",backgroundColor:n.colorBg,overflow:"hidden",...j},F={display:"flex",alignItems:"center",gap:"0.5rem",padding:"0.5rem 0.75rem",borderBottom:`1px solid ${n.colorBorder}`,backgroundColor:n.colorBgSubtle,color:n.colorText},D={flex:1,fontSize:"0.75rem",opacity:.65,textAlign:"right"},T={display:"flex",alignItems:"center",gap:"0.375rem",padding:"0.375rem 0.75rem",borderBottom:`1px solid ${n.colorBorder}`,color:n.colorTextSubtle},O={flex:1,border:"none",outline:"none",backgroundColor:"transparent",color:n.colorText,fontSize:"0.8125rem",fontFamily:"inherit",padding:0},Y={flex:1,overflowY:"auto",overflowX:"hidden",scrollbarWidth:"thin",scrollbarColor:`${n.colorBorderHover} transparent`},X={display:"flex",alignItems:"center",gap:"0.5rem",padding:"0.375rem 0.75rem",minHeight:"2rem",transition:"background-color 0.15s ease",fontSize:"0.8125rem",color:n.colorText},_={flex:1,display:"flex",alignItems:"center",justifyContent:"center",color:n.colorTextSubtle,fontSize:"0.8125rem"},G=R.length===1?"item":"items",Q=e==="right";return t.jsxs("div",{className:C?.list,style:V(W,w?.list),children:[t.jsxs("div",{className:C?.header,style:V(F,w?.header),children:[m&&t.jsx(Rn,{checked:z,indeterminate:A,disabled:g||R.length===0,onChange:M}),a!=null&&t.jsx("span",{style:{fontSize:"0.8125rem",fontWeight:600},children:a}),t.jsxs("span",{style:D,children:[S>0?`${S}/`:"",R.length," ",G]})]}),c&&t.jsxs("div",{className:C?.search,style:V(T,w?.search),children:[t.jsx(Yf,{}),t.jsx("input",{type:"text",value:u,placeholder:"Search...",disabled:g,onChange:N=>f(N.target.value),style:O})]}),B.length===0?t.jsx("div",{style:_,children:"No data"}):t.jsx("div",{style:Y,children:H.map(N=>{const le=k.has(N.key),oe=g||!!N.disabled,q=x&&Q&&!oe;return t.jsxs("div",{className:C?.item,style:V({...X,cursor:oe?"not-allowed":"pointer",opacity:oe?.5:1},w?.item),onClick:()=>{oe||s(N.key)},onMouseEnter:K=>{oe||(K.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:K=>{K.currentTarget.style.backgroundColor=""},children:[!(x&&Q)&&t.jsx(Rn,{checked:le,disabled:oe,onChange:()=>{oe||s(N.key)}}),t.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h?h(N):N.title}),q&&t.jsx("span",{style:{display:"inline-flex",cursor:"pointer",color:n.colorTextSubtle,padding:"0.125rem",borderRadius:"0.125rem",transition:"color 0.15s ease"},onClick:K=>{K.stopPropagation(),p?.(N.key)},onMouseEnter:K=>{K.currentTarget.style.color=n.colorError},onMouseLeave:K=>{K.currentTarget.style.color=n.colorTextSubtle},children:t.jsx(Xf,{})})]},N.key)})}),v&&B.length>0&&t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"0.375rem",padding:"0.375rem 0.75rem",borderTop:`1px solid ${n.colorBorder}`,fontSize:"0.75rem",color:n.colorTextMuted},children:[t.jsx("button",{type:"button",disabled:E<=1,onClick:()=>$(N=>Math.max(1,N-1)),style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"1.25rem",height:"1.25rem",borderRadius:"0.1875rem",border:"none",backgroundColor:"transparent",padding:0,color:E>1?n.colorPrimary:n.colorTextSubtle,cursor:E>1?"pointer":"not-allowed",opacity:E>1?1:.4},children:t.jsx(Bn,{direction:"left"})}),t.jsxs("span",{children:[E,"/",P]}),t.jsx("button",{type:"button",disabled:E>=P,onClick:()=>$(N=>Math.min(P,N+1)),style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"1.25rem",height:"1.25rem",borderRadius:"0.1875rem",border:"none",backgroundColor:"transparent",padding:0,color:E<P?n.colorPrimary:n.colorTextSubtle,cursor:E<P?"pointer":"not-allowed",opacity:E<P?1:.4},children:t.jsx(Bn,{direction:"right"})})]}),b!=null&&t.jsx("div",{style:{padding:"0.5rem 0.75rem",borderTop:`1px solid ${n.colorBorder}`,fontSize:"0.8125rem"},children:b})]})}function Gf({dataSource:e,targetKeys:r,defaultTargetKeys:o,selectedKeys:s,defaultSelectedKeys:l,onChange:a,onSelectChange:c,onSearch:u,render:f,disabled:d=!1,showSearch:h=!1,filterOption:g,titles:m,operations:x,showSelectAll:p=!0,oneWay:b=!1,status:v,footer:j,pagination:C,listStyle:w,className:y,style:k,classNames:B,styles:R}){const S=r!==void 0,[L,$]=i.useState(o??[]),I=S?r:L,P=s!==void 0,[E,H]=i.useState(l??[]),z=P?s:E,[A,M]=i.useState(""),[W,F]=i.useState(""),D=i.useMemo(()=>new Set(I),[I]),T=i.useMemo(()=>e.filter(ke=>!D.has(ke.key)),[e,D]),O=i.useMemo(()=>e.filter(ke=>D.has(ke.key)),[e,D]),Y=i.useMemo(()=>z.filter(ke=>!D.has(ke)),[z,D]),X=i.useMemo(()=>z.filter(ke=>D.has(ke)),[z,D]),_=i.useCallback((ke,ee)=>ee.title.toLowerCase().includes(ke.toLowerCase()),[]),G=g??_,Q=v==="error"?n.colorError:v==="warning"?n.colorWarning:void 0,N=i.useCallback((ke,ee)=>{const ae=[...ke,...ee];P||H(ae),c?.(ke,ee)},[P,c]),le=i.useCallback((ke,ee)=>{const ae=ke==="left"?Y:X,se=ke==="left"?X:Y,ie=ae.indexOf(ee)>=0?ae.filter(ce=>ce!==ee):[...ae,ee];ke==="left"?N(ie,se):N(se,ie)},[Y,X,N]),oe=i.useCallback((ke,ee,ae)=>{const se=ke==="left"?X:Y,we=ae?ee:[];ke==="left"?N(we,se):N(se,we)},[Y,X,N]),q=i.useCallback(ke=>{const ae=(ke==="right"?Y:X).filter(ce=>{const He=e.find(Pe=>Pe.key===ce);return He&&!He.disabled});if(ae.length===0)return;let se;if(ke==="right")se=[...I,...ae];else{const ce=new Set(ae);se=I.filter(He=>!ce.has(He))}S||$(se),a?.(se,ke,ae);const we=z.filter(ce=>!ae.includes(ce));P||H(we);const ie=new Set(se);c?.(we.filter(ce=>!ie.has(ce)),we.filter(ce=>ie.has(ce)))},[Y,X,I,z,e,S,P,a,c]),K=i.useCallback(ke=>{const ee=I.filter(ae=>ae!==ke);S||$(ee),a?.(ee,"left",[ke])},[I,S,a]),re=i.useCallback((ke,ee)=>{ke==="left"?M(ee):F(ee),u?.(ke,ee)},[u]),Te=typeof w=="function"?w("left"):w,Ce=typeof w=="function"?w("right"):w,Le=typeof j=="function"?j({direction:"left"}):j,ue=typeof j=="function"?j({direction:"right"}):j,ze=C?{pageSize:(typeof C=="object"?C.pageSize:void 0)??10}:void 0,xe=Y.length>0,ge=X.length>0,Ie=!!(x?.[0]||x?.[1]),De=ke=>({display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.25rem",...Ie?{minWidth:"1.75rem",height:"1.75rem",padding:"0 0.5rem"}:{width:"1.75rem",height:"1.75rem",padding:0},borderRadius:"0.25rem",border:"none",cursor:ke&&!d?"pointer":"not-allowed",backgroundColor:ke&&!d?n.colorPrimary:n.colorBgMuted,color:ke&&!d?"#fff":n.colorTextSubtle,opacity:ke&&!d?1:.6,transition:"all 0.15s ease"}),Ae={display:"flex",alignItems:"stretch",gap:"1rem",fontFamily:"inherit",fontSize:"0.875rem",lineHeight:1.5},Re={display:"flex",flexDirection:"column",alignItems:Ie?"stretch":"center",justifyContent:"center",gap:"0.5rem"};return t.jsxs("div",{className:Ve(y,B?.root),style:V(Ae,R?.root,k),children:[t.jsx(Tn,{direction:"left",items:T,selectedKeys:Y,onSelect:ke=>le("left",ke),onSelectAll:(ke,ee)=>oe("left",ke,ee),title:m?.[0]??"Source",showSearch:h,searchValue:A,onSearchChange:ke=>re("left",ke),filterOption:G,render:f,disabled:d,showSelectAll:p,oneWay:!1,footer:Le,pagination:ze,listStyle:Te,classNames:B,styles:R,statusBorderColor:Q}),t.jsxs("div",{className:B?.operation,style:V(Re,R?.operation),children:[t.jsx("button",{type:"button",disabled:d||!xe,style:De(xe),onClick:()=>q("right"),onMouseEnter:ke=>{xe&&!d&&(ke.currentTarget.style.filter="brightness(1.15)")},onMouseLeave:ke=>{ke.currentTarget.style.filter=""},children:x?.[0]?t.jsx("span",{style:{fontSize:"0.6875rem",fontWeight:600},children:x[0]}):t.jsx(Kf,{})}),!b&&t.jsx("button",{type:"button",disabled:d||!ge,style:De(ge),onClick:()=>q("left"),onMouseEnter:ke=>{ge&&!d&&(ke.currentTarget.style.filter="brightness(1.15)")},onMouseLeave:ke=>{ke.currentTarget.style.filter=""},children:x?.[1]?t.jsx("span",{style:{fontSize:"0.6875rem",fontWeight:600},children:x[1]}):t.jsx(_f,{})})]}),t.jsx(Tn,{direction:"right",items:O,selectedKeys:X,onSelect:ke=>le("right",ke),onSelectAll:(ke,ee)=>oe("right",ke,ee),title:m?.[1]??"Target",showSearch:h,searchValue:W,onSearchChange:ke=>re("right",ke),filterOption:G,render:f,disabled:d,showSelectAll:p,oneWay:b,onRemove:K,footer:ue,pagination:ze,listStyle:Ce,classNames:B,styles:R,statusBorderColor:Q})]})}function Uf(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"6 9 12 15 18 9"})})}function qf(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("circle",{cx:"12",cy:"12",r:"10"}),t.jsx("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),t.jsx("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]})}function Qf(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"20 6 9 17 4 12"})})}function Zf(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})})}function Jf(){return t.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function e0(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"6 9 12 15 18 9"})})}function t0(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"9 6 15 12 9 18"})})}function r0(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{animation:"spin 1s linear infinite"},children:t.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})}function o0(){return t.jsx("span",{style:{display:"inline-block",width:12,height:12}})}const n0={large:{height:"2.5rem",fontSize:"1rem",padding:"0.5rem 0.75rem",tagLineHeight:"1.75rem"},middle:{height:"2.25rem",fontSize:"0.875rem",padding:"0.375rem 0.75rem",tagLineHeight:"1.5rem"},small:{height:"1.75rem",fontSize:"0.875rem",padding:"0.125rem 0.5rem",tagLineHeight:"1rem"}};function s0(e){return{label:e?.label??"title",value:e?.value??"value",children:e?.children??"children"}}function Nt(e,r){return e[r.value]}function ai(e,r){return e[r.label]}function Vt(e,r){const o=e[r.children];return Array.isArray(o)?o:void 0}function rr(e,r,o){for(const s of e){if(Nt(s,o)===r)return s;const l=Vt(s,o);if(l){const a=rr(l,r,o);if(a)return a}}}function Zr(e,r,o){const s=rr(e,r,o);return s?ai(s,o):String(r)}function po(e,r){const o=[Nt(e,r)],s=Vt(e,r);if(s)for(const l of s)o.push(...po(l,r));return o}function ci(e,r){const o=Vt(e,r);if(!o||o.length===0)return[Nt(e,r)];const s=[];for(const l of o)s.push(...ci(l,r));return s}function di(e,r,o=null){const s=new Map;for(const l of e){const a=Nt(l,r);s.set(a,o);const c=Vt(l,r);c&&di(c,r,a).forEach((f,d)=>s.set(d,f))}return s}function ui(e,r,o){const s=Vt(e,o);if(!s||s.length===0)return r.has(Nt(e,o))?"checked":"unchecked";let l=!0,a=!1;for(const c of s){const u=ui(c,r,o);u==="checked"?a=!0:(u==="indeterminate"&&(a=!0),l=!1)}return l&&a?"checked":a?"indeterminate":"unchecked"}function In(e,r,o,s,l){const a=new Set(o),c=rr(s,e,l);if(!c)return a;const u=po(c,l);for(const h of u){const g=rr(s,h,l);g?.disabled||g?.disableCheckbox||(r?a.add(h):a.delete(h))}const f=di(s,l);let d=f.get(e);for(;d!=null;){const h=rr(s,d,l);if(!h)break;(Vt(h,l)??[]).every(x=>x.disabled||x.disableCheckbox?!0:a.has(Nt(x,l)))?a.add(d):a.delete(d),d=f.get(d)}return a}function i0(e,r,o,s){const l=Array.from(e);if(s==="SHOW_ALL")return l;if(s==="SHOW_CHILD")return l.filter(f=>{const d=rr(r,f,o);if(!d)return!1;const h=Vt(d,o);return!h||h.length===0});const a=[],c=new Set;function u(f){for(const d of f){const h=Nt(d,o),g=Vt(d,o);if(g&&g.length>0){const m=ci(d,o);if(m.length>0&&m.every(p=>e.has(p))){a.push(h);for(const b of m)c.add(b);const p=po(d,o);for(const b of p)c.add(b)}else u(g)}}}u(r);for(const f of l)c.has(f)||a.push(f);return a}function l0(e,r,o,s,l){if(!r)return e;const c=o??((f,d)=>{const h=l??s.label;return String(d[h]??"").toLowerCase().includes(f.toLowerCase())});function u(f){const d=[];for(const h of f){const g=Vt(h,s),m=g?u(g):[];(c(r,h)||m.length>0)&&d.push(m.length>0&&g?{...h,[s.children]:m}:h)}return d}return u(e)}function a0(e,r,o){if(!o)return[];const s=[];function l(a){for(const c of a){const u=Vt(c,r);u&&u.length>0&&(s.push(Nt(c,r)),l(u))}}return l(e),s}function c0(e,r,o,s,l){if(!r)return[];const c=o??((d,h)=>{const g=l??s.label;return String(h[g]??"").toLowerCase().includes(d.toLowerCase())}),u=new Set;function f(d,h){for(const g of d){const m=Nt(g,s),x=Vt(g,s);if(c(r,g))for(const p of h)u.add(p);x&&f(x,[...h,m])}}return f(e,[]),Array.from(u)}function fi({node:e,depth:r,fa:o,expandedKeys:s,onToggleExpand:l,selectedValue:a,selectedMultiValues:c,checkedSet:u,isMultiple:f,treeCheckable:d,isCheckStrictly:h,onSelect:g,onCheck:m,treeLine:x,switcherIcon:p,loadData:b,loadingKeys:v,loadedKeys:j,search:C,filterProp:w,nodeStyle:y,nodeClassName:k,focusedValue:B,isLastChild:R,parentIsLast:S,disabled:L}){const $=Nt(e,o),I=ai(e,o),P=Vt(e,o),E=P&&P.length>0||b&&!e.isLeaf&&!j.has($),H=s.has($),z=v.has($),A=L||!!e.disabled,M=e.selectable!==!1,W=B===$,F=f||d?c.has($):a===$,D=d?h?u.has($)?"checked":"unchecked":ui(e,u,o):"unchecked",T=i.useRef(null),O=i.useCallback(()=>{A||!T.current||(T.current.style.backgroundColor=n.colorBgMuted)},[A]),Y=i.useCallback(()=>{T.current&&(T.current.style.backgroundColor="")},[]),X=i.useCallback(K=>{K.stopPropagation(),!z&&(b&&!j.has($)&&e.isLeaf,l($))},[$,z,b,j,e.isLeaf,l]),_=i.useCallback(()=>{A||(d?e.disableCheckbox||m($,e):M&&g($,e))},[A,d,M,$,e,m,g]),G=()=>{if(!C||typeof I!="string")return I;const K=I.toLowerCase().indexOf(C.toLowerCase());return K===-1?I:t.jsxs(t.Fragment,{children:[I.slice(0,K),t.jsx("span",{style:{color:n.colorPrimary,fontWeight:600},children:I.slice(K,K+C.length)}),I.slice(K+C.length)]})},Q={display:"flex",alignItems:"center",minHeight:"1.75rem",padding:x?"0 0.5rem":"0.125rem 0.5rem",cursor:A?"not-allowed":"pointer",opacity:A?.5:1,borderRadius:"0.25rem",transition:"background-color 0.1s",outline:W?`2px solid ${n.colorPrimary}`:"none",outlineOffset:-2,...y},N=()=>{if(!d)return null;const K=A||!!e.disableCheckbox,re={display:"inline-flex",alignItems:"center",justifyContent:"center",width:"0.875rem",height:"0.875rem",borderRadius:"0.1875rem",border:`1.5px solid ${D!=="unchecked"?n.colorPrimary:n.colorBorder}`,backgroundColor:D!=="unchecked"?n.colorPrimary:"transparent",color:"#fff",marginRight:"0.375rem",flexShrink:0,transition:"all 0.15s ease",cursor:K?"not-allowed":"pointer",opacity:K?.5:1};return t.jsxs("span",{style:re,children:[D==="checked"&&t.jsx(Qf,{}),D==="indeterminate"&&t.jsx(Zf,{})]})},le=`2px solid ${n.colorBorder}`,oe=()=>{const K=[];for(let re=0;re<r;re++)if(x){const Te=!S[re];K.push(t.jsx("span",{style:{display:"flex",alignItems:"center",width:"1.5rem",alignSelf:"stretch",position:"relative",flexShrink:0},children:Te&&t.jsx("span",{style:{position:"absolute",left:"0.75rem",top:0,bottom:0,borderLeft:le}})},re))}else K.push(t.jsx("span",{style:{display:"inline-block",width:"1.5rem",flexShrink:0}},re));return K},q=()=>{const K={display:"flex",alignItems:"center",justifyContent:"center",width:"1.5rem",flexShrink:0};if(!E)return x&&r>0?t.jsxs("span",{style:{...K,alignSelf:"stretch",position:"relative"},children:[t.jsx("span",{style:{position:"absolute",left:"0.75rem",top:0,height:"50%",borderLeft:le}}),t.jsx("span",{style:{position:"absolute",left:"0.75rem",top:"50%",width:"0.75rem",borderTop:le}}),!R&&t.jsx("span",{style:{position:"absolute",left:"0.75rem",top:"50%",bottom:0,borderLeft:le}})]}):x?t.jsx("span",{style:K}):t.jsx("span",{style:K,children:t.jsx(o0,{})});const re=z?t.jsx(r0,{}):p||(H?t.jsx(e0,{}):t.jsx(t0,{}));return x&&r>0?t.jsxs("span",{onClick:X,style:{...K,alignSelf:"stretch",position:"relative",cursor:"pointer",color:n.colorTextMuted},children:[t.jsx("span",{style:{position:"absolute",left:"0.75rem",top:0,height:"50%",borderLeft:le}}),t.jsx("span",{style:{position:"absolute",left:"0.75rem",top:"50%",width:"0.75rem",borderTop:le}}),!R&&t.jsx("span",{style:{position:"absolute",left:"0.75rem",top:"50%",bottom:0,borderLeft:le}}),t.jsx("span",{style:{position:"relative",zIndex:1,display:"inline-flex",alignItems:"center",justifyContent:"center",width:"1rem",height:"1rem",backgroundColor:n.colorBg,borderRadius:"0.125rem"},children:re})]}):x?t.jsx("span",{onClick:X,style:{...K,cursor:"pointer",color:n.colorTextMuted},children:re}):t.jsx("span",{onClick:X,style:{...K,cursor:"pointer",color:n.colorTextMuted},children:re})};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{ref:T,style:Q,className:k,onClick:_,onMouseEnter:O,onMouseLeave:Y,"data-value":$,children:[oe(),q(),N(),t.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"0.8125rem",...F&&!d?{color:n.colorPrimary,fontWeight:600}:{}},children:G()})]}),H&&P&&P.map((K,re)=>t.jsx(fi,{node:K,depth:r+1,fa:o,expandedKeys:s,onToggleExpand:l,selectedValue:a,selectedMultiValues:c,checkedSet:u,isMultiple:f,treeCheckable:d,isCheckStrictly:h,onSelect:g,onCheck:m,treeLine:x,switcherIcon:p,loadData:b,loadingKeys:v,loadedKeys:j,search:C,filterProp:w,nodeStyle:y,nodeClassName:k,focusedValue:B,isLastChild:re===P.length-1,parentIsLast:[...S,R],disabled:L},String(Nt(K,o))))]})}function d0(e){const{treeData:r=[],fieldNames:o,value:s,defaultValue:l,onChange:a,multiple:c=!1,treeCheckable:u=!1,treeCheckStrictly:f=!1,showCheckedStrategy:d="SHOW_ALL",treeDefaultExpandAll:h=!1,treeDefaultExpandedKeys:g,treeExpandedKeys:m,onTreeExpand:x,loadData:p,treeLine:b=!1,switcherIcon:v,showSearch:j=!1,filterTreeNode:C,treeNodeFilterProp:w,allowClear:y=!1,placeholder:k,disabled:B=!1,size:R="middle",variant:S="outlined",status:L,placement:$="bottomLeft",maxCount:I,maxTagCount:P,maxTagPlaceholder:E,tagRender:H,notFoundContent:z,listHeight:A=256,popupMatchSelectWidth:M=!0,dropdownRender:W,suffixIcon:F,prefix:D,onSearch:T,onDropdownVisibleChange:O,onClear:Y,open:X,className:_,style:G,classNames:Q,styles:N}=e,le=i.useMemo(()=>s0(o),[o]),oe=c||u,q=n0[R],K=i.useRef(null),re=i.useRef(null),Te=i.useRef(null),Ce=i.useRef(!1),Le=i.useRef("keyboard"),ue=X!==void 0,[ze,xe]=i.useState(!1),ge=ue?X:ze,Ie=i.useCallback(ve=>{ue||xe(ve),O?.(ve)},[ue,O]),[De,Ae]=i.useState(!1);i.useEffect(()=>{ge?requestAnimationFrame(()=>Ae(!0)):Ae(!1)},[ge]);const[Re,ke]=i.useState($.startsWith("top"));i.useLayoutEffect(()=>{if(!ge||!re.current||!K.current)return;const ve=K.current.getBoundingClientRect(),ot=ve.top,yt=window.innerHeight-ve.bottom;!Re&&re.current.getBoundingClientRect().bottom>window.innerHeight?ot>yt&&ke(!0):Re&&re.current.getBoundingClientRect().top<0&&yt>ot&&ke(!1)});const ee=s!==void 0,[ae,se]=i.useState(()=>l??(oe?[]:"")),we=ee?s:ae,ie=i.useMemo(()=>oe?Array.isArray(we)?we:we!==""?[we]:[]:[],[oe,we]),ce=i.useMemo(()=>oe?null:Array.isArray(we)?we[0]??null:we!==""?we:null,[oe,we]),He=i.useMemo(()=>new Set(ie),[ie]),Pe=m!==void 0,[Ge,Z]=i.useState(()=>g??a0(r,le,h)),Be=Pe?m:Ge,Oe=i.useMemo(()=>new Set(Be),[Be]),Qe=i.useCallback(ve=>{Pe||Z(ve),x?.(ve)},[Pe,x]),[_e,et]=i.useState(""),[je,Se]=i.useState([]),me=i.useMemo(()=>{if(C!==!1&&typeof C=="function")return C},[C]),U=i.useMemo(()=>!_e||C===!1?r:l0(r,_e,me,le,w),[r,_e,C,me,le,w]),he=i.useMemo(()=>_e&&C!==!1?new Set([...Be,...je]):Oe,[_e,C,Be,je,Oe]),[de,We]=i.useState(new Set),[$e,ne]=i.useState(new Set),[be,Ye]=i.useState(!1),[Ze,tt]=i.useState(null);i.useEffect(()=>{if(!ge&&!be)return;const ve=ot=>{K.current&&!K.current.contains(ot.target)&&(ge&&(Ie(!1),et("")),Ye(!1))};return document.addEventListener("mousedown",ve),()=>document.removeEventListener("mousedown",ve)},[ge,be,Ie]);const dt=i.useMemo(()=>{function ve(ot,yt){const St=[];for(const pt of ot){const Me=Nt(pt,le);St.push({node:pt,value:Me,depth:yt,parentValue:null});const Xe=Vt(pt,le);Xe&&he.has(Me)&&St.push(...ve(Xe,yt+1))}return St}return ve(U,0)},[U,le,he]),ft=i.useCallback(ve=>{const ot=rr(r,ve,le);if(!ot)return;const yt=Be.includes(ve);p&&!$e.has(ve)&&!ot.isLeaf&&!yt&&(We(pt=>new Set([...pt,ve])),p(ot).then(()=>{We(pt=>{const Me=new Set(pt);return Me.delete(ve),Me}),ne(pt=>new Set([...pt,ve]))}));const St=yt?Be.filter(pt=>pt!==ve):[...Be,ve];Qe(St)},[r,le,Be,p,$e,Qe]),gt=i.useCallback((ve,ot)=>{if(ee||se(ve),a){const St=(Array.isArray(ve)?ve:[ve]).map(pt=>Zr(r,pt,le));a(ve,St,{triggerValue:ot})}},[ee,a,r,le]),Ct=i.useCallback((ve,ot)=>{if(oe&&!u){const yt=ie.includes(ve);if(!yt&&I!==void 0&&ie.length>=I)return;const St=yt?ie.filter(pt=>pt!==ve):[...ie,ve];gt(St,ve)}else gt(ve,ve),Ie(!1),et("")},[oe,u,ie,I,gt,Ie]),jt=i.useCallback((ve,ot)=>{let yt;if(f)if(yt=new Set(He),yt.has(ve))yt.delete(ve);else{if(I!==void 0&&yt.size>=I)return;yt.add(ve)}else{const St=He.has(ve);if(!St&&I!==void 0){const pt=rr(r,ve,le);if(pt){const Me=po(pt,le).filter(Xe=>!He.has(Xe));if(He.size+Me.length>I)return}}yt=In(ve,!St,He,r,le)}gt(Array.from(yt),ve)},[f,He,r,le,I,gt]),Mt=i.useCallback(ve=>{if(u&&!f){const ot=In(ve,!1,He,r,le);gt(Array.from(ot),ve)}else{const ot=ie.filter(yt=>yt!==ve);gt(ot,ve)}},[u,f,He,r,le,ie,gt]),pe=i.useCallback(ve=>{ve.stopPropagation(),gt(oe?[]:"",ce??0),Y?.(),et("")},[oe,gt,ce,Y]),Ke=i.useCallback(ve=>{const ot=ve.target.value;if(et(ot),T?.(ot),ot){const yt=c0(r,ot,me,le,w);Se(yt)}else Se([]);ge||Ie(!0)},[T,r,me,le,w,ge,Ie]),qe=i.useCallback(()=>{B||(ge?j||Ie(!1):(ke($.startsWith("top")),Ie(!0),j&&setTimeout(()=>Te.current?.focus(),0)))},[B,ge,Ie,j,$]),st=i.useCallback(ve=>{if(!B){if(ve.key==="Escape"){Ie(!1),et("");return}if(ve.key==="Enter"&&ge&&Ze!==null){ve.preventDefault();const ot=rr(U,Ze,le);ot&&!ot.disabled&&(u?ot.disableCheckbox||jt(Ze,ot):ot.selectable!==!1&&Ct(Ze,ot));return}if(ve.key==="ArrowDown"||ve.key==="ArrowUp"){if(ve.preventDefault(),!ge){Ie(!0);return}const ot=Ze!==null?dt.findIndex(St=>St.value===Ze):-1;let yt;ve.key==="ArrowDown"?yt=ot<dt.length-1?ot+1:0:yt=ot>0?ot-1:dt.length-1,dt[yt]&&(tt(dt[yt].value),re.current?.querySelector(`[data-value="${dt[yt].value}"]`)?.scrollIntoView({block:"nearest"}));return}if(ve.key==="ArrowRight"&&ge&&Ze!==null){he.has(Ze)||ft(Ze);return}if(ve.key==="ArrowLeft"&&ge&&Ze!==null){he.has(Ze)&&ft(Ze);return}if(ve.key==="Backspace"&&oe&&!_e&&ie.length>0){const ot=ie[ie.length-1];Mt(ot)}}},[B,ge,Ze,U,le,u,jt,Ct,dt,he,ft,oe,_e,ie,Mt,Ie]);i.useEffect(()=>{ge||tt(null)},[ge]);const rt=i.useMemo(()=>oe?u&&!f?i0(He,r,le,d):ie:[],[oe,u,f,He,r,le,d,ie]),xt={outlined:{border:`1px solid ${n.colorBorder}`,backgroundColor:n.colorBg},filled:{border:"1px solid transparent",backgroundColor:n.colorBgMuted},borderless:{border:"1px solid transparent",backgroundColor:"transparent"},underlined:{border:"none",borderBottom:`1px solid ${n.colorBorder}`,borderRadius:0,backgroundColor:"transparent"}},Rt=L==="error"?n.colorError:L==="warning"?n.colorWarning:void 0,Lt=L==="error"?n.colorErrorBg:L==="warning"?n.colorWarningBg:n.colorPrimaryLight,fe=oe?ie.length>0:ce!==null,J=V({display:"flex",alignItems:"center",gap:"0.25rem",minHeight:q.height,padding:q.padding,fontSize:q.fontSize,borderRadius:"0.375rem",cursor:B?"not-allowed":"pointer",transition:"border-color 0.2s, box-shadow 0.2s",outline:"none",...xt[S],...Rt?{borderColor:Rt}:{},...be||ge?{borderColor:Rt??n.colorPrimary,...S==="underlined"?{borderBottomColor:Rt??n.colorPrimary}:{},boxShadow:be&&Le.current==="keyboard"?`0 0 0 2px ${Lt}`:"none"}:{},...B?{opacity:.5,pointerEvents:"none"}:{}},N?.selector),te=$.endsWith("Right"),Ee=V({position:"absolute",left:te?void 0:0,right:te?0:void 0,zIndex:1050,...typeof M=="number"?{width:M}:M?{width:"100%"}:{minWidth:"7.5rem"},maxHeight:A,overflowY:"auto",overscrollBehavior:"contain",scrollbarWidth:"thin",scrollbarColor:`${n.colorBorderHover} transparent`,backgroundColor:n.colorBg,border:`1px solid ${n.colorBorder}`,borderRadius:"0.5rem",boxShadow:"0 6px 16px rgba(0,0,0,.08)",padding:"0.25rem",opacity:De?1:0,transition:"opacity 0.15s ease-out, transform 0.15s ease-out",...Re?{bottom:"100%",marginBottom:"0.25rem",transform:De?"translateY(0)":"translateY(6px)"}:{top:"100%",marginTop:"0.25rem",transform:De?"translateY(0)":"translateY(-6px)"}},N?.dropdown),Ne={border:"none",outline:"none",background:"transparent",color:n.colorText,fontSize:q.fontSize,padding:0,margin:0,fontFamily:"inherit"},Ue={display:"inline-flex",alignItems:"center",height:q.tagLineHeight,padding:"0 0.375rem",borderRadius:"0.25rem",backgroundColor:n.colorBgMuted,fontSize:"0.75rem",lineHeight:q.tagLineHeight,maxWidth:"100%",overflow:"hidden"},nt={display:"inline-flex",alignItems:"center",justifyContent:"center",border:"none",background:"transparent",cursor:"pointer",padding:"0.125rem",borderRadius:"50%",color:n.colorTextMuted,transition:"color 0.15s, background-color 0.15s",flexShrink:0},mt=()=>{if(rt.length===0&&!_e)return j&&ge?null:t.jsx("span",{style:{color:n.colorTextSubtle,flex:1,lineHeight:q.tagLineHeight},children:k});const ve=P!==void 0?Math.min(P,rt.length):rt.length,ot=rt.slice(0,ve),yt=rt.slice(ve);return t.jsxs("span",{style:{display:"flex",flexWrap:"wrap",gap:"0.25rem",flex:1,overflow:"hidden",alignItems:"center"},children:[ot.map(St=>{const pt=Zr(r,St,le),Me=!B;return H?t.jsx("span",{children:H({label:pt,value:St,closable:Me,onClose:()=>Mt(St)})},String(St)):t.jsxs("span",{style:V(Ue,N?.tag),className:Q?.tag,children:[t.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:pt}),Me&&t.jsx("span",{style:{display:"inline-flex",cursor:"pointer",marginLeft:"0.25rem",color:n.colorTextMuted},onClick:Xe=>{Xe.stopPropagation(),Mt(St)},onMouseDown:Xe=>Xe.preventDefault(),children:t.jsx(Jf,{})})]},String(St))}),yt.length>0&&t.jsx("span",{style:V(Ue,N?.tag),className:Q?.tag,children:typeof E=="function"?E(yt):E??`+${yt.length}`}),j&&t.jsx("input",{ref:Te,type:"text",value:_e,onChange:Ke,onKeyDown:st,onMouseDown:()=>{Ce.current=!0},onFocus:()=>{be||(Le.current=Ce.current?"mouse":"keyboard",Ce.current=!1),Ye(!0)},style:{...Ne,width:`${Math.max(.25,(_e.length+1)*.5)}rem`,minWidth:rt.length===0&&!_e?"100%":"0.25rem"},autoComplete:"off",placeholder:rt.length===0?k:void 0})]})},Tt=()=>{if(j&&ge){const ve=ce!==null?Zr(r,ce,le):null;return t.jsx("input",{ref:Te,type:"text",value:_e,onChange:Ke,onKeyDown:st,onMouseDown:()=>{Ce.current=!0},onFocus:()=>{be||(Le.current=Ce.current?"mouse":"keyboard",Ce.current=!1),Ye(!0)},style:{...Ne,width:"100%",lineHeight:q.height},autoComplete:"off",placeholder:ve?String(ve):k})}if(ce!==null){const ve=Zr(r,ce,le);return t.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},children:ve})}return t.jsx("span",{style:{color:n.colorTextSubtle,flex:1},children:k})},Fe=t.jsx("div",{style:V({padding:"0.125rem"},N?.tree),className:Q?.tree,children:U.length===0?t.jsx("div",{style:{padding:"1rem",textAlign:"center",color:n.colorTextMuted,fontSize:"0.8125rem"},children:z??"No data"}):U.map((ve,ot)=>t.jsx(fi,{node:ve,depth:0,fa:le,expandedKeys:he,onToggleExpand:ft,selectedValue:ce,selectedMultiValues:He,checkedSet:He,isMultiple:oe&&!u,treeCheckable:u,isCheckStrictly:f,onSelect:Ct,onCheck:jt,treeLine:b,switcherIcon:v,loadData:p,loadingKeys:de,loadedKeys:$e,search:_e,filterProp:w??le.label,nodeStyle:N?.node,nodeClassName:Q?.node,focusedValue:Ze,isLastChild:ot===U.length-1,parentIsLast:[],disabled:B},String(Nt(ve,le))))});return t.jsxs("div",{ref:K,style:V({position:"relative",display:"inline-block",width:"100%"},N?.root,G),className:Ve(_,Q?.root),onKeyDown:j?void 0:st,tabIndex:j?void 0:0,onMouseDown:()=>{Ce.current=!0},onFocus:ve=>{ve.target===ve.currentTarget&&(Le.current=Ce.current?"mouse":"keyboard",Ce.current=!1),Ye(!0)},onBlur:()=>{ge||Ye(!1)},children:[t.jsxs("div",{style:J,className:Q?.selector,onClick:qe,children:[D&&t.jsx("span",{style:{display:"flex",color:n.colorTextMuted,marginRight:"0.25rem",flexShrink:0},children:D}),oe?mt():Tt(),y&&fe&&!B&&t.jsx("button",{type:"button",style:nt,onMouseDown:ve=>ve.preventDefault(),onClick:pe,onMouseEnter:ve=>{ve.currentTarget.style.color=n.colorText,ve.currentTarget.style.backgroundColor=n.colorBgMuted},onMouseLeave:ve=>{ve.currentTarget.style.color=n.colorTextMuted,ve.currentTarget.style.backgroundColor="transparent"},tabIndex:-1,"aria-label":"Clear",children:t.jsx(qf,{})}),t.jsx("span",{style:{display:"flex",color:n.colorTextMuted,pointerEvents:"none",transition:F?void 0:"transform 0.2s ease",transform:F?void 0:ge?"rotate(180deg)":"rotate(0deg)",flexShrink:0},children:F??t.jsx(Uf,{})})]}),ge&&t.jsx("div",{ref:re,style:Ee,className:`j-treeselect-dropdown${Q?.dropdown?` ${Q.dropdown}`:""}`,onMouseDown:ve=>ve.preventDefault(),children:W?W(Fe):Fe}),t.jsx("style",{children:`
|
|
177
|
+
`}),t.jsxs("div",{style:{display:"flex"},children:[t.jsxs("div",{style:{borderRight:`1px solid ${n.colorBorder}`},children:[t.jsx("div",{style:{padding:"0.375rem 0.5rem",fontSize:"0.75rem",fontWeight:600,color:q==="start"?n.colorPrimary:n.colorTextMuted,textAlign:"center",borderBottom:`1px solid ${n.colorBorder}`},children:"Start"}),t.jsx(zo,{pendingValue:y?J:J??G[0],onChange:($e,ne)=>Pe("start",$e,ne),formatConfig:A,hourStep:d,minuteStep:h,secondStep:g,disabledTimeConfig:ue,showNow:!1,needConfirm:!1,changeOnScroll:$,styles:F,classNames:z})]}),t.jsxs("div",{children:[t.jsx("div",{style:{padding:"0.375rem 0.5rem",fontSize:"0.75rem",fontWeight:600,color:q==="end"?n.colorPrimary:n.colorTextMuted,textAlign:"center",borderBottom:`1px solid ${n.colorBorder}`},children:"End"}),t.jsx(zo,{pendingValue:y?ke:ke??G[1],onChange:($e,ne)=>Pe("end",$e,ne),formatConfig:A,hourStep:d,minuteStep:h,secondStep:g,disabledTimeConfig:We,showNow:!1,needConfirm:!1,changeOnScroll:$,styles:F,classNames:z})]})]}),E!=null&&t.jsx("div",{style:{borderTop:`1px solid ${n.colorBorder}`,padding:"0.5rem 0.75rem"},children:E}),(k||y)&&t.jsxs("div",{className:z?.footer,style:V({borderTop:`1px solid ${n.colorBorder}`,padding:"0.5rem 0.75rem",display:"flex",alignItems:"center",justifyContent:"space-between"},F?.footer),children:[t.jsx("div",{children:k&&t.jsx("button",{type:"button",style:{border:"none",backgroundColor:"transparent",cursor:"pointer",color:n.colorPrimary,fontSize:"0.8125rem",fontWeight:500,fontFamily:"inherit",padding:"0.25rem 0"},onClick:Ge,children:"Now"})}),y&&t.jsx("button",{type:"button",onClick:Ne,style:{padding:"0.1875rem 0.75rem",border:"none",borderRadius:"0.25rem",backgroundColor:n.colorPrimary,color:"#fff",cursor:"pointer",fontSize:"0.8125rem",fontWeight:500,fontFamily:"inherit",transition:"filter 0.15s ease"},onMouseEnter:$e=>{$e.currentTarget.style.filter="brightness(1.1)"},onMouseLeave:$e=>{$e.currentTarget.style.filter="none"},children:"OK"})]})]})]})}const Of=Object.assign(Ff,{RangePicker:Af});function Nf(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"2 5.5 4 7.5 8 3"})})}function Vf(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("line",{x1:"2.5",y1:"5",x2:"7.5",y2:"5"})})}function Yf(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("circle",{cx:"11",cy:"11",r:"8"}),t.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}function Kf(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"9 18 15 12 9 6"})})}function _f(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"15 18 9 12 15 6"})})}function Xf(){return t.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function Bn({direction:e}){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:e==="right"?t.jsx("polyline",{points:"9 18 15 12 9 6"}):t.jsx("polyline",{points:"15 18 9 12 15 6"})})}function Rn({checked:e,indeterminate:r,disabled:o,onChange:s}){const l=e&&!r,a=r,c={display:"inline-flex",alignItems:"center",justifyContent:"center",width:"0.875rem",height:"0.875rem",borderRadius:"0.1875rem",border:`2px solid ${e||r?n.colorPrimary:n.colorBorder}`,backgroundColor:e||r?n.colorPrimary:"transparent",color:"#fff",flexShrink:0,cursor:o?"not-allowed":"pointer",transition:"border-color 0.2s ease, background-color 0.2s ease",opacity:o?.5:1};return t.jsxs("span",{style:c,onClick:u=>{u.stopPropagation(),o||s()},children:[l&&t.jsx(Nf,{}),a&&t.jsx(Vf,{})]})}function Tn({direction:e,items:r,selectedKeys:o,onSelect:s,onSelectAll:l,title:a,showSearch:c,searchValue:u,onSearchChange:f,filterOption:d,render:h,disabled:g,showSelectAll:m,oneWay:x,onRemove:p,footer:b,pagination:v,listStyle:j,classNames:C,styles:w,statusBorderColor:y}){const k=i.useMemo(()=>new Set(o),[o]),B=i.useMemo(()=>u?r.filter(N=>d(u,N)):r,[r,u,d]),R=i.useMemo(()=>B.filter(N=>!N.disabled),[B]),S=i.useMemo(()=>R.filter(N=>k.has(N.key)).length,[R,k]),[E,$]=i.useState(1),I=v?.pageSize??10,L=v?Math.max(1,Math.ceil(B.length/I)):1,P=Math.min(E,L);i.useEffect(()=>{$(1)},[u]);const H=v?B.slice((P-1)*I,P*I):B,z=R.length>0&&S===R.length,F=S>0&&!z,M=()=>{if(g)return;const N=R.map(le=>le.key);l(N,!z)},W={display:"flex",flexDirection:"column",width:"12rem",height:"18rem",border:`1px solid ${y??n.colorBorder}`,borderRadius:"0.5rem",backgroundColor:n.colorBg,overflow:"hidden",...j},A={display:"flex",alignItems:"center",gap:"0.5rem",padding:"0.5rem 0.75rem",borderBottom:`1px solid ${n.colorBorder}`,backgroundColor:n.colorBgSubtle,color:n.colorText},D={flex:1,fontSize:"0.75rem",opacity:.65,textAlign:"right"},T={display:"flex",alignItems:"center",gap:"0.375rem",padding:"0.375rem 0.75rem",borderBottom:`1px solid ${n.colorBorder}`,color:n.colorTextSubtle},O={flex:1,border:"none",outline:"none",backgroundColor:"transparent",color:n.colorText,fontSize:"0.8125rem",fontFamily:"inherit",padding:0},Y={flex:1,overflowY:"auto",overflowX:"hidden",scrollbarWidth:"thin",scrollbarColor:`${n.colorBorderHover} transparent`},X={display:"flex",alignItems:"center",gap:"0.5rem",padding:"0.375rem 0.75rem",minHeight:"2rem",transition:"background-color 0.15s ease",fontSize:"0.8125rem",color:n.colorText},K={flex:1,display:"flex",alignItems:"center",justifyContent:"center",color:n.colorTextSubtle,fontSize:"0.8125rem"},G=R.length===1?"item":"items",Q=e==="right";return t.jsxs("div",{className:C?.list,style:V(W,w?.list),children:[t.jsxs("div",{className:C?.header,style:V(A,w?.header),children:[m&&t.jsx(Rn,{checked:z,indeterminate:F,disabled:g||R.length===0,onChange:M}),a!=null&&t.jsx("span",{style:{fontSize:"0.8125rem",fontWeight:600},children:a}),t.jsxs("span",{style:D,children:[S>0?`${S}/`:"",R.length," ",G]})]}),c&&t.jsxs("div",{className:C?.search,style:V(T,w?.search),children:[t.jsx(Yf,{}),t.jsx("input",{type:"text",value:u,placeholder:"Search...",disabled:g,onChange:N=>f(N.target.value),style:O})]}),B.length===0?t.jsx("div",{style:K,children:"No data"}):t.jsx("div",{style:Y,children:H.map(N=>{const le=k.has(N.key),re=g||!!N.disabled,q=x&&Q&&!re;return t.jsxs("div",{className:C?.item,style:V({...X,cursor:re?"not-allowed":"pointer",opacity:re?.5:1},w?.item),onClick:()=>{re||s(N.key)},onMouseEnter:_=>{re||(_.currentTarget.style.backgroundColor=n.colorBgMuted)},onMouseLeave:_=>{_.currentTarget.style.backgroundColor=""},children:[!(x&&Q)&&t.jsx(Rn,{checked:le,disabled:re,onChange:()=>{re||s(N.key)}}),t.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h?h(N):N.title}),q&&t.jsx("span",{style:{display:"inline-flex",cursor:"pointer",color:n.colorTextSubtle,padding:"0.125rem",borderRadius:"0.125rem",transition:"color 0.15s ease"},onClick:_=>{_.stopPropagation(),p?.(N.key)},onMouseEnter:_=>{_.currentTarget.style.color=n.colorError},onMouseLeave:_=>{_.currentTarget.style.color=n.colorTextSubtle},children:t.jsx(Xf,{})})]},N.key)})}),v&&B.length>0&&t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"0.375rem",padding:"0.375rem 0.75rem",borderTop:`1px solid ${n.colorBorder}`,fontSize:"0.75rem",color:n.colorTextMuted},children:[t.jsx("button",{type:"button",disabled:P<=1,onClick:()=>$(N=>Math.max(1,N-1)),style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"1.25rem",height:"1.25rem",borderRadius:"0.1875rem",border:"none",backgroundColor:"transparent",padding:0,color:P>1?n.colorPrimary:n.colorTextSubtle,cursor:P>1?"pointer":"not-allowed",opacity:P>1?1:.4},children:t.jsx(Bn,{direction:"left"})}),t.jsxs("span",{children:[P,"/",L]}),t.jsx("button",{type:"button",disabled:P>=L,onClick:()=>$(N=>Math.min(L,N+1)),style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"1.25rem",height:"1.25rem",borderRadius:"0.1875rem",border:"none",backgroundColor:"transparent",padding:0,color:P<L?n.colorPrimary:n.colorTextSubtle,cursor:P<L?"pointer":"not-allowed",opacity:P<L?1:.4},children:t.jsx(Bn,{direction:"right"})})]}),b!=null&&t.jsx("div",{style:{padding:"0.5rem 0.75rem",borderTop:`1px solid ${n.colorBorder}`,fontSize:"0.8125rem"},children:b})]})}function Gf({dataSource:e,targetKeys:r,defaultTargetKeys:o,selectedKeys:s,defaultSelectedKeys:l,onChange:a,onSelectChange:c,onSearch:u,render:f,disabled:d=!1,showSearch:h=!1,filterOption:g,titles:m,operations:x,showSelectAll:p=!0,oneWay:b=!1,status:v,footer:j,pagination:C,listStyle:w,className:y,style:k,classNames:B,styles:R}){const S=r!==void 0,[E,$]=i.useState(o??[]),I=S?r:E,L=s!==void 0,[P,H]=i.useState(l??[]),z=L?s:P,[F,M]=i.useState(""),[W,A]=i.useState(""),D=i.useMemo(()=>new Set(I),[I]),T=i.useMemo(()=>e.filter(we=>!D.has(we.key)),[e,D]),O=i.useMemo(()=>e.filter(we=>D.has(we.key)),[e,D]),Y=i.useMemo(()=>z.filter(we=>!D.has(we)),[z,D]),X=i.useMemo(()=>z.filter(we=>D.has(we)),[z,D]),K=i.useCallback((we,ee)=>ee.title.toLowerCase().includes(we.toLowerCase()),[]),G=g??K,Q=v==="error"?n.colorError:v==="warning"?n.colorWarning:void 0,N=i.useCallback((we,ee)=>{const ae=[...we,...ee];L||H(ae),c?.(we,ee)},[L,c]),le=i.useCallback((we,ee)=>{const ae=we==="left"?Y:X,se=we==="left"?X:Y,ie=ae.indexOf(ee)>=0?ae.filter(ce=>ce!==ee):[...ae,ee];we==="left"?N(ie,se):N(se,ie)},[Y,X,N]),re=i.useCallback((we,ee,ae)=>{const se=we==="left"?X:Y,Se=ae?ee:[];we==="left"?N(Se,se):N(se,Se)},[Y,X,N]),q=i.useCallback(we=>{const ae=(we==="right"?Y:X).filter(ce=>{const He=e.find(Pe=>Pe.key===ce);return He&&!He.disabled});if(ae.length===0)return;let se;if(we==="right")se=[...I,...ae];else{const ce=new Set(ae);se=I.filter(He=>!ce.has(He))}S||$(se),a?.(se,we,ae);const Se=z.filter(ce=>!ae.includes(ce));L||H(Se);const ie=new Set(se);c?.(Se.filter(ce=>!ie.has(ce)),Se.filter(ce=>ie.has(ce)))},[Y,X,I,z,e,S,L,a,c]),_=i.useCallback(we=>{const ee=I.filter(ae=>ae!==we);S||$(ee),a?.(ee,"left",[we])},[I,S,a]),J=i.useCallback((we,ee)=>{we==="left"?M(ee):A(ee),u?.(we,ee)},[u]),Te=typeof w=="function"?w("left"):w,ke=typeof w=="function"?w("right"):w,Ie=typeof j=="function"?j({direction:"left"}):j,fe=typeof j=="function"?j({direction:"right"}):j,ze=C?{pageSize:(typeof C=="object"?C.pageSize:void 0)??10}:void 0,me=Y.length>0,he=X.length>0,Le=!!(x?.[0]||x?.[1]),De=we=>({display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.25rem",...Le?{minWidth:"1.75rem",height:"1.75rem",padding:"0 0.5rem"}:{width:"1.75rem",height:"1.75rem",padding:0},borderRadius:"0.25rem",border:"none",cursor:we&&!d?"pointer":"not-allowed",backgroundColor:we&&!d?n.colorPrimary:n.colorBgMuted,color:we&&!d?"#fff":n.colorTextSubtle,opacity:we&&!d?1:.6,transition:"all 0.15s ease"}),Oe={display:"flex",alignItems:"stretch",gap:"1rem",fontFamily:"inherit",fontSize:"0.875rem",lineHeight:1.5},Be={display:"flex",flexDirection:"column",alignItems:Le?"stretch":"center",justifyContent:"center",gap:"0.5rem"};return t.jsxs("div",{className:Ye(y,B?.root),style:V(Oe,R?.root,k),children:[t.jsx(Tn,{direction:"left",items:T,selectedKeys:Y,onSelect:we=>le("left",we),onSelectAll:(we,ee)=>re("left",we,ee),title:m?.[0]??"Source",showSearch:h,searchValue:F,onSearchChange:we=>J("left",we),filterOption:G,render:f,disabled:d,showSelectAll:p,oneWay:!1,footer:Ie,pagination:ze,listStyle:Te,classNames:B,styles:R,statusBorderColor:Q}),t.jsxs("div",{className:B?.operation,style:V(Be,R?.operation),children:[t.jsx("button",{type:"button",disabled:d||!me,style:De(me),onClick:()=>q("right"),onMouseEnter:we=>{me&&!d&&(we.currentTarget.style.filter="brightness(1.15)")},onMouseLeave:we=>{we.currentTarget.style.filter=""},children:x?.[0]?t.jsx("span",{style:{fontSize:"0.6875rem",fontWeight:600},children:x[0]}):t.jsx(Kf,{})}),!b&&t.jsx("button",{type:"button",disabled:d||!he,style:De(he),onClick:()=>q("left"),onMouseEnter:we=>{he&&!d&&(we.currentTarget.style.filter="brightness(1.15)")},onMouseLeave:we=>{we.currentTarget.style.filter=""},children:x?.[1]?t.jsx("span",{style:{fontSize:"0.6875rem",fontWeight:600},children:x[1]}):t.jsx(_f,{})})]}),t.jsx(Tn,{direction:"right",items:O,selectedKeys:X,onSelect:we=>le("right",we),onSelectAll:(we,ee)=>re("right",we,ee),title:m?.[1]??"Target",showSearch:h,searchValue:W,onSearchChange:we=>J("right",we),filterOption:G,render:f,disabled:d,showSelectAll:p,oneWay:b,onRemove:_,footer:fe,pagination:ze,listStyle:ke,classNames:B,styles:R,statusBorderColor:Q})]})}function Uf(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"6 9 12 15 18 9"})})}function qf(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("circle",{cx:"12",cy:"12",r:"10"}),t.jsx("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),t.jsx("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]})}function Qf(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"20 6 9 17 4 12"})})}function Zf(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})})}function Jf(){return t.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function e0(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"6 9 12 15 18 9"})})}function t0(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"9 6 15 12 9 18"})})}function r0(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{animation:"spin 1s linear infinite"},children:t.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})}function o0(){return t.jsx("span",{style:{display:"inline-block",width:12,height:12}})}const n0={large:{height:"2.5rem",fontSize:"1rem",padding:"0.5rem 0.75rem",tagLineHeight:"1.75rem"},middle:{height:"2.25rem",fontSize:"0.875rem",padding:"0.375rem 0.75rem",tagLineHeight:"1.5rem"},small:{height:"1.75rem",fontSize:"0.875rem",padding:"0.125rem 0.5rem",tagLineHeight:"1rem"}};function s0(e){return{label:e?.label??"title",value:e?.value??"value",children:e?.children??"children"}}function Nt(e,r){return e[r.value]}function ai(e,r){return e[r.label]}function Vt(e,r){const o=e[r.children];return Array.isArray(o)?o:void 0}function rr(e,r,o){for(const s of e){if(Nt(s,o)===r)return s;const l=Vt(s,o);if(l){const a=rr(l,r,o);if(a)return a}}}function Zr(e,r,o){const s=rr(e,r,o);return s?ai(s,o):String(r)}function po(e,r){const o=[Nt(e,r)],s=Vt(e,r);if(s)for(const l of s)o.push(...po(l,r));return o}function ci(e,r){const o=Vt(e,r);if(!o||o.length===0)return[Nt(e,r)];const s=[];for(const l of o)s.push(...ci(l,r));return s}function di(e,r,o=null){const s=new Map;for(const l of e){const a=Nt(l,r);s.set(a,o);const c=Vt(l,r);c&&di(c,r,a).forEach((f,d)=>s.set(d,f))}return s}function ui(e,r,o){const s=Vt(e,o);if(!s||s.length===0)return r.has(Nt(e,o))?"checked":"unchecked";let l=!0,a=!1;for(const c of s){const u=ui(c,r,o);u==="checked"?a=!0:(u==="indeterminate"&&(a=!0),l=!1)}return l&&a?"checked":a?"indeterminate":"unchecked"}function In(e,r,o,s,l){const a=new Set(o),c=rr(s,e,l);if(!c)return a;const u=po(c,l);for(const h of u){const g=rr(s,h,l);g?.disabled||g?.disableCheckbox||(r?a.add(h):a.delete(h))}const f=di(s,l);let d=f.get(e);for(;d!=null;){const h=rr(s,d,l);if(!h)break;(Vt(h,l)??[]).every(x=>x.disabled||x.disableCheckbox?!0:a.has(Nt(x,l)))?a.add(d):a.delete(d),d=f.get(d)}return a}function i0(e,r,o,s){const l=Array.from(e);if(s==="SHOW_ALL")return l;if(s==="SHOW_CHILD")return l.filter(f=>{const d=rr(r,f,o);if(!d)return!1;const h=Vt(d,o);return!h||h.length===0});const a=[],c=new Set;function u(f){for(const d of f){const h=Nt(d,o),g=Vt(d,o);if(g&&g.length>0){const m=ci(d,o);if(m.length>0&&m.every(p=>e.has(p))){a.push(h);for(const b of m)c.add(b);const p=po(d,o);for(const b of p)c.add(b)}else u(g)}}}u(r);for(const f of l)c.has(f)||a.push(f);return a}function l0(e,r,o,s,l){if(!r)return e;const c=o??((f,d)=>{const h=l??s.label;return String(d[h]??"").toLowerCase().includes(f.toLowerCase())});function u(f){const d=[];for(const h of f){const g=Vt(h,s),m=g?u(g):[];(c(r,h)||m.length>0)&&d.push(m.length>0&&g?{...h,[s.children]:m}:h)}return d}return u(e)}function a0(e,r,o){if(!o)return[];const s=[];function l(a){for(const c of a){const u=Vt(c,r);u&&u.length>0&&(s.push(Nt(c,r)),l(u))}}return l(e),s}function c0(e,r,o,s,l){if(!r)return[];const c=o??((d,h)=>{const g=l??s.label;return String(h[g]??"").toLowerCase().includes(d.toLowerCase())}),u=new Set;function f(d,h){for(const g of d){const m=Nt(g,s),x=Vt(g,s);if(c(r,g))for(const p of h)u.add(p);x&&f(x,[...h,m])}}return f(e,[]),Array.from(u)}function fi({node:e,depth:r,fa:o,expandedKeys:s,onToggleExpand:l,selectedValue:a,selectedMultiValues:c,checkedSet:u,isMultiple:f,treeCheckable:d,isCheckStrictly:h,onSelect:g,onCheck:m,treeLine:x,switcherIcon:p,loadData:b,loadingKeys:v,loadedKeys:j,search:C,filterProp:w,nodeStyle:y,nodeClassName:k,focusedValue:B,isLastChild:R,parentIsLast:S,disabled:E}){const $=Nt(e,o),I=ai(e,o),L=Vt(e,o),P=L&&L.length>0||b&&!e.isLeaf&&!j.has($),H=s.has($),z=v.has($),F=E||!!e.disabled,M=e.selectable!==!1,W=B===$,A=f||d?c.has($):a===$,D=d?h?u.has($)?"checked":"unchecked":ui(e,u,o):"unchecked",T=i.useRef(null),O=i.useCallback(()=>{F||!T.current||(T.current.style.backgroundColor=n.colorBgMuted)},[F]),Y=i.useCallback(()=>{T.current&&(T.current.style.backgroundColor="")},[]),X=i.useCallback(_=>{_.stopPropagation(),!z&&(b&&!j.has($)&&e.isLeaf,l($))},[$,z,b,j,e.isLeaf,l]),K=i.useCallback(()=>{F||(d?e.disableCheckbox||m($,e):M&&g($,e))},[F,d,M,$,e,m,g]),G=()=>{if(!C||typeof I!="string")return I;const _=I.toLowerCase().indexOf(C.toLowerCase());return _===-1?I:t.jsxs(t.Fragment,{children:[I.slice(0,_),t.jsx("span",{style:{color:n.colorPrimary,fontWeight:600},children:I.slice(_,_+C.length)}),I.slice(_+C.length)]})},Q={display:"flex",alignItems:"center",minHeight:"1.75rem",padding:x?"0 0.5rem":"0.125rem 0.5rem",cursor:F?"not-allowed":"pointer",opacity:F?.5:1,borderRadius:"0.25rem",transition:"background-color 0.1s",outline:W?`2px solid ${n.colorPrimary}`:"none",outlineOffset:-2,...y},N=()=>{if(!d)return null;const _=F||!!e.disableCheckbox,J={display:"inline-flex",alignItems:"center",justifyContent:"center",width:"0.875rem",height:"0.875rem",borderRadius:"0.1875rem",border:`1.5px solid ${D!=="unchecked"?n.colorPrimary:n.colorBorder}`,backgroundColor:D!=="unchecked"?n.colorPrimary:"transparent",color:"#fff",marginRight:"0.375rem",flexShrink:0,transition:"all 0.15s ease",cursor:_?"not-allowed":"pointer",opacity:_?.5:1};return t.jsxs("span",{style:J,children:[D==="checked"&&t.jsx(Qf,{}),D==="indeterminate"&&t.jsx(Zf,{})]})},le=`2px solid ${n.colorBorder}`,re=()=>{const _=[];for(let J=0;J<r;J++)if(x){const Te=!S[J];_.push(t.jsx("span",{style:{display:"flex",alignItems:"center",width:"1.5rem",alignSelf:"stretch",position:"relative",flexShrink:0},children:Te&&t.jsx("span",{style:{position:"absolute",left:"0.75rem",top:0,bottom:0,borderLeft:le}})},J))}else _.push(t.jsx("span",{style:{display:"inline-block",width:"1.5rem",flexShrink:0}},J));return _},q=()=>{const _={display:"flex",alignItems:"center",justifyContent:"center",width:"1.5rem",flexShrink:0};if(!P)return x&&r>0?t.jsxs("span",{style:{..._,alignSelf:"stretch",position:"relative"},children:[t.jsx("span",{style:{position:"absolute",left:"0.75rem",top:0,height:"50%",borderLeft:le}}),t.jsx("span",{style:{position:"absolute",left:"0.75rem",top:"50%",width:"0.75rem",borderTop:le}}),!R&&t.jsx("span",{style:{position:"absolute",left:"0.75rem",top:"50%",bottom:0,borderLeft:le}})]}):x?t.jsx("span",{style:_}):t.jsx("span",{style:_,children:t.jsx(o0,{})});const J=z?t.jsx(r0,{}):p||(H?t.jsx(e0,{}):t.jsx(t0,{}));return x&&r>0?t.jsxs("span",{onClick:X,style:{..._,alignSelf:"stretch",position:"relative",cursor:"pointer",color:n.colorTextMuted},children:[t.jsx("span",{style:{position:"absolute",left:"0.75rem",top:0,height:"50%",borderLeft:le}}),t.jsx("span",{style:{position:"absolute",left:"0.75rem",top:"50%",width:"0.75rem",borderTop:le}}),!R&&t.jsx("span",{style:{position:"absolute",left:"0.75rem",top:"50%",bottom:0,borderLeft:le}}),t.jsx("span",{style:{position:"relative",zIndex:1,display:"inline-flex",alignItems:"center",justifyContent:"center",width:"1rem",height:"1rem",backgroundColor:n.colorBg,borderRadius:"0.125rem"},children:J})]}):x?t.jsx("span",{onClick:X,style:{..._,cursor:"pointer",color:n.colorTextMuted},children:J}):t.jsx("span",{onClick:X,style:{..._,cursor:"pointer",color:n.colorTextMuted},children:J})};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{ref:T,style:Q,className:k,onClick:K,onMouseEnter:O,onMouseLeave:Y,"data-value":$,children:[re(),q(),N(),t.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"0.8125rem",...A&&!d?{color:n.colorPrimary,fontWeight:600}:{}},children:G()})]}),H&&L&&L.map((_,J)=>t.jsx(fi,{node:_,depth:r+1,fa:o,expandedKeys:s,onToggleExpand:l,selectedValue:a,selectedMultiValues:c,checkedSet:u,isMultiple:f,treeCheckable:d,isCheckStrictly:h,onSelect:g,onCheck:m,treeLine:x,switcherIcon:p,loadData:b,loadingKeys:v,loadedKeys:j,search:C,filterProp:w,nodeStyle:y,nodeClassName:k,focusedValue:B,isLastChild:J===L.length-1,parentIsLast:[...S,R],disabled:E},String(Nt(_,o))))]})}function d0(e){const{treeData:r=[],fieldNames:o,value:s,defaultValue:l,onChange:a,multiple:c=!1,treeCheckable:u=!1,treeCheckStrictly:f=!1,showCheckedStrategy:d="SHOW_ALL",treeDefaultExpandAll:h=!1,treeDefaultExpandedKeys:g,treeExpandedKeys:m,onTreeExpand:x,loadData:p,treeLine:b=!1,switcherIcon:v,showSearch:j=!1,filterTreeNode:C,treeNodeFilterProp:w,allowClear:y=!1,placeholder:k,disabled:B=!1,size:R="middle",variant:S="outlined",status:E,placement:$="bottomLeft",maxCount:I,maxTagCount:L,maxTagPlaceholder:P,tagRender:H,notFoundContent:z,listHeight:F=256,popupMatchSelectWidth:M=!0,dropdownRender:W,suffixIcon:A,prefix:D,onSearch:T,onDropdownVisibleChange:O,onClear:Y,open:X,className:K,style:G,classNames:Q,styles:N}=e,le=i.useMemo(()=>s0(o),[o]),re=c||u,q=n0[R],_=i.useRef(null),J=i.useRef(null),Te=i.useRef(null),ke=i.useRef(!1),Ie=i.useRef("keyboard"),fe=X!==void 0,[ze,me]=i.useState(!1),he=fe?X:ze,Le=i.useCallback(Ce=>{fe||me(Ce),O?.(Ce)},[fe,O]),[De,Oe]=i.useState(!1);i.useEffect(()=>{he?requestAnimationFrame(()=>Oe(!0)):Oe(!1)},[he]);const[Be,we]=i.useState($.startsWith("top"));i.useLayoutEffect(()=>{if(!he||!J.current||!_.current)return;const Ce=_.current.getBoundingClientRect(),ot=Ce.top,yt=window.innerHeight-Ce.bottom;!Be&&J.current.getBoundingClientRect().bottom>window.innerHeight?ot>yt&&we(!0):Be&&J.current.getBoundingClientRect().top<0&&yt>ot&&we(!1)});const ee=s!==void 0,[ae,se]=i.useState(()=>l??(re?[]:"")),Se=ee?s:ae,ie=i.useMemo(()=>re?Array.isArray(Se)?Se:Se!==""?[Se]:[]:[],[re,Se]),ce=i.useMemo(()=>re?null:Array.isArray(Se)?Se[0]??null:Se!==""?Se:null,[re,Se]),He=i.useMemo(()=>new Set(ie),[ie]),Pe=m!==void 0,[Ge,Ne]=i.useState(()=>g??a0(r,le,h)),oe=Pe?m:Ge,Re=i.useMemo(()=>new Set(oe),[oe]),Ze=i.useCallback(Ce=>{Pe||Ne(Ce),x?.(Ce)},[Pe,x]),[Fe,et]=i.useState(""),[je,ve]=i.useState([]),xe=i.useMemo(()=>{if(C!==!1&&typeof C=="function")return C},[C]),U=i.useMemo(()=>!Fe||C===!1?r:l0(r,Fe,xe,le,w),[r,Fe,C,xe,le,w]),de=i.useMemo(()=>Fe&&C!==!1?new Set([...oe,...je]):Re,[Fe,C,oe,je,Re]),[ue,We]=i.useState(new Set),[$e,ne]=i.useState(new Set),[be,Ke]=i.useState(!1),[Qe,tt]=i.useState(null);i.useEffect(()=>{if(!he&&!be)return;const Ce=ot=>{_.current&&!_.current.contains(ot.target)&&(he&&(Le(!1),et("")),Ke(!1))};return document.addEventListener("mousedown",Ce),()=>document.removeEventListener("mousedown",Ce)},[he,be,Le]);const dt=i.useMemo(()=>{function Ce(ot,yt){const St=[];for(const pt of ot){const Me=Nt(pt,le);St.push({node:pt,value:Me,depth:yt,parentValue:null});const Xe=Vt(pt,le);Xe&&de.has(Me)&&St.push(...Ce(Xe,yt+1))}return St}return Ce(U,0)},[U,le,de]),ft=i.useCallback(Ce=>{const ot=rr(r,Ce,le);if(!ot)return;const yt=oe.includes(Ce);p&&!$e.has(Ce)&&!ot.isLeaf&&!yt&&(We(pt=>new Set([...pt,Ce])),p(ot).then(()=>{We(pt=>{const Me=new Set(pt);return Me.delete(Ce),Me}),ne(pt=>new Set([...pt,Ce]))}));const St=yt?oe.filter(pt=>pt!==Ce):[...oe,Ce];Ze(St)},[r,le,oe,p,$e,Ze]),gt=i.useCallback((Ce,ot)=>{if(ee||se(Ce),a){const St=(Array.isArray(Ce)?Ce:[Ce]).map(pt=>Zr(r,pt,le));a(Ce,St,{triggerValue:ot})}},[ee,a,r,le]),Ct=i.useCallback((Ce,ot)=>{if(re&&!u){const yt=ie.includes(Ce);if(!yt&&I!==void 0&&ie.length>=I)return;const St=yt?ie.filter(pt=>pt!==Ce):[...ie,Ce];gt(St,Ce)}else gt(Ce,Ce),Le(!1),et("")},[re,u,ie,I,gt,Le]),jt=i.useCallback((Ce,ot)=>{let yt;if(f)if(yt=new Set(He),yt.has(Ce))yt.delete(Ce);else{if(I!==void 0&&yt.size>=I)return;yt.add(Ce)}else{const St=He.has(Ce);if(!St&&I!==void 0){const pt=rr(r,Ce,le);if(pt){const Me=po(pt,le).filter(Xe=>!He.has(Xe));if(He.size+Me.length>I)return}}yt=In(Ce,!St,He,r,le)}gt(Array.from(yt),Ce)},[f,He,r,le,I,gt]),Mt=i.useCallback(Ce=>{if(u&&!f){const ot=In(Ce,!1,He,r,le);gt(Array.from(ot),Ce)}else{const ot=ie.filter(yt=>yt!==Ce);gt(ot,Ce)}},[u,f,He,r,le,ie,gt]),ge=i.useCallback(Ce=>{Ce.stopPropagation(),gt(re?[]:"",ce??0),Y?.(),et("")},[re,gt,ce,Y]),_e=i.useCallback(Ce=>{const ot=Ce.target.value;if(et(ot),T?.(ot),ot){const yt=c0(r,ot,xe,le,w);ve(yt)}else ve([]);he||Le(!0)},[T,r,xe,le,w,he,Le]),qe=i.useCallback(()=>{B||(he?j||Le(!1):(we($.startsWith("top")),Le(!0),j&&setTimeout(()=>Te.current?.focus(),0)))},[B,he,Le,j,$]),st=i.useCallback(Ce=>{if(!B){if(Ce.key==="Escape"){Le(!1),et("");return}if(Ce.key==="Enter"&&he&&Qe!==null){Ce.preventDefault();const ot=rr(U,Qe,le);ot&&!ot.disabled&&(u?ot.disableCheckbox||jt(Qe,ot):ot.selectable!==!1&&Ct(Qe,ot));return}if(Ce.key==="ArrowDown"||Ce.key==="ArrowUp"){if(Ce.preventDefault(),!he){Le(!0);return}const ot=Qe!==null?dt.findIndex(St=>St.value===Qe):-1;let yt;Ce.key==="ArrowDown"?yt=ot<dt.length-1?ot+1:0:yt=ot>0?ot-1:dt.length-1,dt[yt]&&(tt(dt[yt].value),J.current?.querySelector(`[data-value="${dt[yt].value}"]`)?.scrollIntoView({block:"nearest"}));return}if(Ce.key==="ArrowRight"&&he&&Qe!==null){de.has(Qe)||ft(Qe);return}if(Ce.key==="ArrowLeft"&&he&&Qe!==null){de.has(Qe)&&ft(Qe);return}if(Ce.key==="Backspace"&&re&&!Fe&&ie.length>0){const ot=ie[ie.length-1];Mt(ot)}}},[B,he,Qe,U,le,u,jt,Ct,dt,de,ft,re,Fe,ie,Mt,Le]);i.useEffect(()=>{he||tt(null)},[he]);const rt=i.useMemo(()=>re?u&&!f?i0(He,r,le,d):ie:[],[re,u,f,He,r,le,d,ie]),xt={outlined:{border:`1px solid ${n.colorBorder}`,backgroundColor:n.colorBg},filled:{border:"1px solid transparent",backgroundColor:n.colorBgMuted},borderless:{border:"1px solid transparent",backgroundColor:"transparent"},underlined:{border:"none",borderBottom:`1px solid ${n.colorBorder}`,borderRadius:0,backgroundColor:"transparent"}},Rt=E==="error"?n.colorError:E==="warning"?n.colorWarning:void 0,Lt=E==="error"?n.colorErrorBg:E==="warning"?n.colorWarningBg:n.colorPrimaryLight,pe=re?ie.length>0:ce!==null,Z=V({display:"flex",alignItems:"center",gap:"0.25rem",minHeight:q.height,padding:q.padding,fontSize:q.fontSize,borderRadius:"0.375rem",cursor:B?"not-allowed":"pointer",transition:"border-color 0.2s, box-shadow 0.2s",outline:"none",...xt[S],...Rt?{borderColor:Rt}:{},...be||he?{borderColor:Rt??n.colorPrimary,...S==="underlined"?{borderBottomColor:Rt??n.colorPrimary}:{},boxShadow:be&&Ie.current==="keyboard"?`0 0 0 2px ${Lt}`:"none"}:{},...B?{opacity:.5,pointerEvents:"none"}:{}},N?.selector),te=$.endsWith("Right"),Ee=V({position:"absolute",left:te?void 0:0,right:te?0:void 0,zIndex:1050,...typeof M=="number"?{width:M}:M?{width:"100%"}:{minWidth:"7.5rem"},maxHeight:F,overflowY:"auto",overscrollBehavior:"contain",scrollbarWidth:"thin",scrollbarColor:`${n.colorBorderHover} transparent`,backgroundColor:n.colorBg,border:`1px solid ${n.colorBorder}`,borderRadius:"0.5rem",boxShadow:"0 6px 16px rgba(0,0,0,.08)",padding:"0.25rem",opacity:De?1:0,transition:"opacity 0.15s ease-out, transform 0.15s ease-out",...Be?{bottom:"100%",marginBottom:"0.25rem",transform:De?"translateY(0)":"translateY(6px)"}:{top:"100%",marginTop:"0.25rem",transform:De?"translateY(0)":"translateY(-6px)"}},N?.dropdown),Ve={border:"none",outline:"none",background:"transparent",color:n.colorText,fontSize:q.fontSize,padding:0,margin:0,fontFamily:"inherit"},Ue={display:"inline-flex",alignItems:"center",height:q.tagLineHeight,padding:"0 0.375rem",borderRadius:"0.25rem",backgroundColor:n.colorBgMuted,fontSize:"0.75rem",lineHeight:q.tagLineHeight,maxWidth:"100%",overflow:"hidden"},nt={display:"inline-flex",alignItems:"center",justifyContent:"center",border:"none",background:"transparent",cursor:"pointer",padding:"0.125rem",borderRadius:"50%",color:n.colorTextMuted,transition:"color 0.15s, background-color 0.15s",flexShrink:0},mt=()=>{if(rt.length===0&&!Fe)return j&&he?null:t.jsx("span",{style:{color:n.colorTextSubtle,flex:1,lineHeight:q.tagLineHeight},children:k});const Ce=L!==void 0?Math.min(L,rt.length):rt.length,ot=rt.slice(0,Ce),yt=rt.slice(Ce);return t.jsxs("span",{style:{display:"flex",flexWrap:"wrap",gap:"0.25rem",flex:1,overflow:"hidden",alignItems:"center"},children:[ot.map(St=>{const pt=Zr(r,St,le),Me=!B;return H?t.jsx("span",{children:H({label:pt,value:St,closable:Me,onClose:()=>Mt(St)})},String(St)):t.jsxs("span",{style:V(Ue,N?.tag),className:Q?.tag,children:[t.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:pt}),Me&&t.jsx("span",{style:{display:"inline-flex",cursor:"pointer",marginLeft:"0.25rem",color:n.colorTextMuted},onClick:Xe=>{Xe.stopPropagation(),Mt(St)},onMouseDown:Xe=>Xe.preventDefault(),children:t.jsx(Jf,{})})]},String(St))}),yt.length>0&&t.jsx("span",{style:V(Ue,N?.tag),className:Q?.tag,children:typeof P=="function"?P(yt):P??`+${yt.length}`}),j&&t.jsx("input",{ref:Te,type:"text",value:Fe,onChange:_e,onKeyDown:st,onMouseDown:()=>{ke.current=!0},onFocus:()=>{be||(Ie.current=ke.current?"mouse":"keyboard",ke.current=!1),Ke(!0)},style:{...Ve,width:`${Math.max(.25,(Fe.length+1)*.5)}rem`,minWidth:rt.length===0&&!Fe?"100%":"0.25rem"},autoComplete:"off",placeholder:rt.length===0?k:void 0})]})},Tt=()=>{if(j&&he){const Ce=ce!==null?Zr(r,ce,le):null;return t.jsx("input",{ref:Te,type:"text",value:Fe,onChange:_e,onKeyDown:st,onMouseDown:()=>{ke.current=!0},onFocus:()=>{be||(Ie.current=ke.current?"mouse":"keyboard",ke.current=!1),Ke(!0)},style:{...Ve,width:"100%",lineHeight:q.height},autoComplete:"off",placeholder:Ce?String(Ce):k})}if(ce!==null){const Ce=Zr(r,ce,le);return t.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},children:Ce})}return t.jsx("span",{style:{color:n.colorTextSubtle,flex:1},children:k})},Ae=t.jsx("div",{style:V({padding:"0.125rem"},N?.tree),className:Q?.tree,children:U.length===0?t.jsx("div",{style:{padding:"1rem",textAlign:"center",color:n.colorTextMuted,fontSize:"0.8125rem"},children:z??"No data"}):U.map((Ce,ot)=>t.jsx(fi,{node:Ce,depth:0,fa:le,expandedKeys:de,onToggleExpand:ft,selectedValue:ce,selectedMultiValues:He,checkedSet:He,isMultiple:re&&!u,treeCheckable:u,isCheckStrictly:f,onSelect:Ct,onCheck:jt,treeLine:b,switcherIcon:v,loadData:p,loadingKeys:ue,loadedKeys:$e,search:Fe,filterProp:w??le.label,nodeStyle:N?.node,nodeClassName:Q?.node,focusedValue:Qe,isLastChild:ot===U.length-1,parentIsLast:[],disabled:B},String(Nt(Ce,le))))});return t.jsxs("div",{ref:_,style:V({position:"relative",display:"inline-block",width:"100%"},N?.root,G),className:Ye(K,Q?.root),onKeyDown:j?void 0:st,tabIndex:j?void 0:0,onMouseDown:()=>{ke.current=!0},onFocus:Ce=>{Ce.target===Ce.currentTarget&&(Ie.current=ke.current?"mouse":"keyboard",ke.current=!1),Ke(!0)},onBlur:()=>{he||Ke(!1)},children:[t.jsxs("div",{style:Z,className:Q?.selector,onClick:qe,children:[D&&t.jsx("span",{style:{display:"flex",color:n.colorTextMuted,marginRight:"0.25rem",flexShrink:0},children:D}),re?mt():Tt(),y&&pe&&!B&&t.jsx("button",{type:"button",style:nt,onMouseDown:Ce=>Ce.preventDefault(),onClick:ge,onMouseEnter:Ce=>{Ce.currentTarget.style.color=n.colorText,Ce.currentTarget.style.backgroundColor=n.colorBgMuted},onMouseLeave:Ce=>{Ce.currentTarget.style.color=n.colorTextMuted,Ce.currentTarget.style.backgroundColor="transparent"},tabIndex:-1,"aria-label":"Clear",children:t.jsx(qf,{})}),t.jsx("span",{style:{display:"flex",color:n.colorTextMuted,pointerEvents:"none",transition:A?void 0:"transform 0.2s ease",transform:A?void 0:he?"rotate(180deg)":"rotate(0deg)",flexShrink:0},children:A??t.jsx(Uf,{})})]}),he&&t.jsx("div",{ref:J,style:Ee,className:`j-treeselect-dropdown${Q?.dropdown?` ${Q.dropdown}`:""}`,onMouseDown:Ce=>Ce.preventDefault(),children:W?W(Ae):Ae}),t.jsx("style",{children:`
|
|
178
178
|
@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }
|
|
179
179
|
.j-treeselect-dropdown::-webkit-scrollbar { width: 4px; }
|
|
180
180
|
.j-treeselect-dropdown::-webkit-scrollbar-track { background: transparent; }
|
|
181
181
|
.j-treeselect-dropdown::-webkit-scrollbar-thumb { background: ${n.colorBorderHover}; border-radius: 4px; }
|
|
182
182
|
.j-treeselect-dropdown::-webkit-scrollbar-thumb:hover { background: ${n.colorTextSubtle}; }
|
|
183
|
-
`})]})}const u0=Object.assign(d0,{SHOW_ALL:"SHOW_ALL",SHOW_PARENT:"SHOW_PARENT",SHOW_CHILD:"SHOW_CHILD"});function f0(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"20 6 9 17 4 12"})})}function h0(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})})}function p0(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"6 9 12 15 18 9"})})}function g0(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"9 6 15 12 9 18"})})}function m0(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{animation:"spin 1s linear infinite"},children:t.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})}function x0(){return t.jsx("span",{style:{display:"inline-block",width:12,height:12}})}function y0(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2v2"}),t.jsx("path",{d:"M2 10h20"})]})}function b0(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})})}function v0(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),t.jsx("polyline",{points:"14 2 14 8 20 8"})]})}function C0(){return t.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"currentColor",stroke:"none",children:[t.jsx("circle",{cx:"5.5",cy:"3",r:"1.5"}),t.jsx("circle",{cx:"10.5",cy:"3",r:"1.5"}),t.jsx("circle",{cx:"5.5",cy:"8",r:"1.5"}),t.jsx("circle",{cx:"10.5",cy:"8",r:"1.5"}),t.jsx("circle",{cx:"5.5",cy:"13",r:"1.5"}),t.jsx("circle",{cx:"10.5",cy:"13",r:"1.5"})]})}function k0(e){return{key:e?.key??"key",title:e?.title??"title",children:e?.children??"children"}}function Ht(e,r){return e[r.key]}function w0(e,r){return e[r.title]}function Ut(e,r){const o=e[r.children];return Array.isArray(o)?o:void 0}function Pr(e,r,o){for(const s of e){if(Ht(s,o)===r)return s;const l=Ut(s,o);if(l){const a=Pr(l,r,o);if(a)return a}}}function hi(e,r){const o=[Ht(e,r)],s=Ut(e,r);if(s)for(const l of s)o.push(...hi(l,r));return o}function go(e,r,o=null){const s=new Map;for(const l of e){const a=Ht(l,r);s.set(a,o);const c=Ut(l,r);c&&go(c,r,a).forEach((f,d)=>s.set(d,f))}return s}function en(e,r,o){const s=Ut(e,o);if(!s||s.length===0)return r.has(Ht(e,o))?"checked":"unchecked";let l=!0,a=!1;for(const c of s){const u=en(c,r,o);u==="checked"?a=!0:(u==="indeterminate"&&(a=!0),l=!1)}return l&&a?"checked":a?"indeterminate":"unchecked"}function j0(e,r,o,s,l){const a=new Set(o),c=Pr(s,e,l);if(!c)return a;const u=hi(c,l);for(const h of u){const g=Pr(s,h,l);g?.disabled||g?.disableCheckbox||(r?a.add(h):a.delete(h))}const f=go(s,l);let d=f.get(e);for(;d!=null;){const h=Pr(s,d,l);if(!h)break;(Ut(h,l)??[]).every(x=>x.disabled||x.disableCheckbox?!0:a.has(Ht(x,l)))?a.add(d):a.delete(d),d=f.get(d)}return a}function S0(e,r,o){if(!o)return[];const s=[];function l(a){for(const c of a){const u=Ut(c,r);u&&u.length>0&&(s.push(Ht(c,r)),l(u))}}return l(e),s}function M0(e,r,o){const s=go(r,o),l=new Set(e);for(const a of e){let c=s.get(a);for(;c!=null;)l.add(c),c=s.get(c)}return Array.from(l)}function B0(e,r,o){const s=[];function l(a){for(const c of a){const u=Ut(c,o);u&&u.length>0&&(en(c,r,o)==="indeterminate"&&s.push(Ht(c,o)),l(u))}}return l(e),s}function Ln(e,r,o){const s=[];function l(a){for(const c of a){r.has(Ht(c,o))&&s.push(c);const u=Ut(c,o);u&&l(u)}}return l(e),s}function pi(e,r,o,s,l=[]){const a=[];for(let c=0;c<e.length;c++){const u=e[c],f=Ht(u,r),d=c===e.length-1;a.push({node:u,key:f,depth:s,isLastChild:d,parentIsLast:[...l]});const h=Ut(u,r);h&&o.has(f)&&a.push(...pi(h,r,o,s+1,[...l,d]))}return a}function Wo({node:e,depth:r,fa:o,treeData:s,expandedKeys:l,onToggleExpand:a,selectable:c,selectedKeys:u,multiple:f,onSelect:d,checkable:h,checkedSet:g,checkStrictly:m,onCheck:x,showLine:p,showLeafIcon:b,showIcon:v,defaultIcon:j,switcherIcon:C,titleRender:w,filterTreeNode:y,loadData:k,loadingKeys:B,loadedKeys:R,draggableEnabled:S,isDraggable:L,dragIcon:$,onDragStartNode:I,onDragEnterNode:P,onDragOverNode:E,onDragLeaveNode:H,onDragEndNode:z,onDropNode:A,dragOverKey:M,dropPosition:W,onRightClick:F,expandAction:D,isLastChild:T,parentIsLast:O,disabled:Y,focusedKey:X,nodeStyle:_,nodeClassName:G,renderChildren:Q=!0}){const N=Ht(e,o),le=w0(e,o),oe=Ut(e,o),q=oe&&oe.length>0||k&&!e.isLeaf&&!R.has(N),K=l.has(N),re=B.has(N),Te=Y||!!e.disabled,Ce=c&&e.selectable!==!1,Le=u.has(N),ue=h&&e.checkable!==!1,ze=y?!y(e):!1,xe=X===N,ge=!q,Ie=S&&L(e),De=M===N,Ae=ue?m?g.has(N)?"checked":"unchecked":en(e,g,o):"unchecked",Re=i.useRef(null),ke=i.useCallback(()=>{Te||!Re.current||(_&&("backgroundColor"in _||"borderColor"in _||"border"in _)?Re.current.style.filter="brightness(1.15)":Re.current.style.backgroundColor=n.colorBgMuted)},[Te,_]),ee=i.useCallback(()=>{Re.current&&(_&&("backgroundColor"in _||"borderColor"in _||"border"in _)?Re.current.style.filter="":Re.current.style.backgroundColor=Le?n.colorPrimary50:"")},[_,Le]),ae=i.useCallback(de=>{de.stopPropagation(),!re&&a(N,e)},[N,e,re,a]),se=i.useCallback(de=>{Te||(ue?e.disableCheckbox||x(N,e,de):Ce&&d(N,e,de),D==="click"&&q&&a(N,e))},[Te,ue,Ce,N,e,x,d,D,q,a]),we=i.useCallback(de=>{Te||(D==="doubleClick"&&q&&a(N,e),de.preventDefault())},[Te,D,q,N,e,a]),ie=i.useCallback(de=>{F&&(de.preventDefault(),F(de,e))},[F,e]),ce=i.useCallback(de=>{de.dataTransfer.setData("text/plain",String(N)),I?.(de,e)},[N,e,I]),He=i.useCallback(de=>{de.preventDefault(),E?.(de,e)},[e,E]),Pe=i.useCallback(de=>{de.preventDefault(),P?.(de,e)},[e,P]),Ge=i.useCallback(de=>{H?.(de,e)},[e,H]),Z=i.useCallback(de=>{z?.(de,e)},[e,z]),Be=i.useCallback(de=>{de.preventDefault(),A?.(de,e)},[e,A]),Oe={display:"flex",alignItems:"center",minHeight:"1.75rem",padding:p?"0 0.5rem":"0.125rem 0.5rem",cursor:Te?"not-allowed":"pointer",opacity:Te?.5:ze?.4:1,borderRadius:"0.25rem",transition:"background-color 0.1s",outline:xe?`2px solid ${n.colorPrimary}`:"none",outlineOffset:-2,backgroundColor:Le?n.colorPrimary50:void 0,position:"relative",..._},Qe=De&&W===0?{outline:`2px solid ${n.colorPrimary}`,outlineOffset:-2,borderRadius:"0.25rem"}:void 0;Qe&&Object.assign(Oe,Qe);const _e=`2px solid ${n.colorBorder}`,et=()=>{const de=[];for(let We=0;We<r;We++)if(p){const $e=!O[We];de.push(t.jsx("span",{style:{display:"flex",alignItems:"center",width:"1.5rem",alignSelf:"stretch",position:"relative",flexShrink:0},children:$e&&t.jsx("span",{style:{position:"absolute",left:"0.75rem",top:0,bottom:0,borderLeft:_e}})},We))}else de.push(t.jsx("span",{style:{display:"inline-block",width:"1.5rem",flexShrink:0}},We));return de},je=()=>{const de={display:"flex",alignItems:"center",justifyContent:"center",width:"1.5rem",flexShrink:0},We=typeof C=="function"?C({expanded:K,isLeaf:ge}):C;if(!q)return p&&r>0?t.jsxs("span",{style:{...de,alignSelf:"stretch",position:"relative"},children:[t.jsx("span",{style:{position:"absolute",left:"0.75rem",top:0,height:"50%",borderLeft:_e}}),t.jsx("span",{style:{position:"absolute",left:"0.75rem",top:"50%",width:"0.75rem",borderTop:_e}}),!T&&t.jsx("span",{style:{position:"absolute",left:"0.75rem",top:"50%",bottom:0,borderLeft:_e}}),b!==void 0&&t.jsx("span",{style:{position:"relative",zIndex:1,display:"inline-flex",alignItems:"center",justifyContent:"center",backgroundColor:n.colorBg},children:b})]}):p?t.jsx("span",{style:de,children:b??null}):t.jsx("span",{style:de,children:t.jsx(x0,{})});const $e=re?t.jsx(m0,{}):We||(K?t.jsx(p0,{}):t.jsx(g0,{}));return p&&r>0?t.jsxs("span",{onClick:ae,style:{...de,alignSelf:"stretch",position:"relative",cursor:"pointer",color:n.colorTextMuted},children:[t.jsx("span",{style:{position:"absolute",left:"0.75rem",top:0,height:"50%",borderLeft:_e}}),t.jsx("span",{style:{position:"absolute",left:"0.75rem",top:"50%",width:"0.75rem",borderTop:_e}}),!T&&t.jsx("span",{style:{position:"absolute",left:"0.75rem",top:"50%",bottom:0,borderLeft:_e}}),t.jsx("span",{style:{position:"relative",zIndex:1,display:"inline-flex",alignItems:"center",justifyContent:"center",width:"1rem",height:"1rem",backgroundColor:n.colorBg,borderRadius:"0.125rem"},children:$e})]}):p?t.jsx("span",{onClick:ae,style:{...de,cursor:"pointer",color:n.colorTextMuted},children:$e}):t.jsx("span",{onClick:ae,style:{...de,cursor:"pointer",color:n.colorTextMuted},children:$e})},Se=()=>{if(!ue)return null;const de=Te||!!e.disableCheckbox,We={display:"inline-flex",alignItems:"center",justifyContent:"center",width:"0.875rem",height:"0.875rem",borderRadius:"0.1875rem",border:`1.5px solid ${Ae!=="unchecked"?n.colorPrimary:n.colorBorder}`,backgroundColor:Ae!=="unchecked"?n.colorPrimary:"transparent",color:"#fff",marginRight:"0.375rem",flexShrink:0,transition:"all 0.15s ease",cursor:de?"not-allowed":"pointer",opacity:de?.5:1};return t.jsxs("span",{style:We,children:[Ae==="checked"&&t.jsx(f0,{}),Ae==="indeterminate"&&t.jsx(h0,{})]})},me=()=>{if(!v)return null;const de=e.icon?typeof e.icon=="function"?e.icon({selected:Le,expanded:K}):e.icon:j?typeof j=="function"?j({selected:Le,expanded:K,isLeaf:ge}):j:null;return de?t.jsx("span",{style:{display:"inline-flex",alignItems:"center",marginRight:"0.25rem",flexShrink:0,color:n.colorTextMuted},children:de}):null},U=()=>{const de=w?w(e):le;return t.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"0.8125rem",...Le?{color:n.colorPrimary,fontWeight:600}:{}},children:de})},he=()=>Ie?t.jsx("span",{style:{display:"inline-flex",alignItems:"center",marginRight:"0.25rem",color:n.colorTextSubtle,cursor:"grab",flexShrink:0},children:$??t.jsx(C0,{})}):null;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{ref:Re,role:"treeitem","aria-expanded":q?K:void 0,"aria-selected":Le,style:Oe,className:G,onClick:se,onDoubleClick:D==="doubleClick"?we:void 0,onMouseEnter:ke,onMouseLeave:ee,onContextMenu:F?ie:void 0,draggable:Ie,onDragStart:Ie?ce:void 0,onDragOver:S?He:void 0,onDragEnter:S?Pe:void 0,onDragLeave:S?Ge:void 0,onDragEnd:Ie?Z:void 0,onDrop:S?Be:void 0,"data-key":N,children:[De&&W===-1&&t.jsx("span",{style:{position:"absolute",top:0,left:`${r*1.5+1.5}rem`,right:0,height:2,backgroundColor:n.colorPrimary,borderRadius:1}}),he(),et(),je(),Se(),me(),U(),De&&W===1&&t.jsx("span",{style:{position:"absolute",bottom:0,left:`${r*1.5+1.5}rem`,right:0,height:2,backgroundColor:n.colorPrimary,borderRadius:1}})]}),Q&&oe&&oe.length>0&&t.jsx("div",{style:{display:"grid",gridTemplateRows:K?"1fr":"0fr",transition:"grid-template-rows 0.2s ease-out"},children:t.jsx("div",{style:{overflow:"hidden"},children:oe.map((de,We)=>t.jsx(Wo,{node:de,depth:r+1,fa:o,treeData:s,expandedKeys:l,onToggleExpand:a,selectable:c,selectedKeys:u,multiple:f,onSelect:d,checkable:h,checkedSet:g,checkStrictly:m,onCheck:x,showLine:p,showLeafIcon:b,showIcon:v,defaultIcon:j,switcherIcon:C,titleRender:w,filterTreeNode:y,loadData:k,loadingKeys:B,loadedKeys:R,draggableEnabled:S,isDraggable:L,dragIcon:$,onDragStartNode:I,onDragEnterNode:P,onDragOverNode:E,onDragLeaveNode:H,onDragEndNode:z,onDropNode:A,dragOverKey:M,dropPosition:W,onRightClick:F,expandAction:D,isLastChild:We===oe.length-1,parentIsLast:[...O,T],disabled:Y,focusedKey:X,nodeStyle:_,nodeClassName:G},String(Ht(de,o))))})})]})}function gi({treeData:e=[],fieldNames:r,checkable:o=!1,checkedKeys:s,defaultCheckedKeys:l,checkStrictly:a=!1,selectable:c=!0,selectedKeys:u,defaultSelectedKeys:f,multiple:d=!1,expandedKeys:h,defaultExpandedKeys:g,defaultExpandAll:m=!1,autoExpandParent:x=!1,showLine:p=!1,showIcon:b=!1,icon:v,switcherIcon:j,disabled:C=!1,height:w,titleRender:y,filterTreeNode:k,loadData:B,draggable:R=!1,onSelect:S,onCheck:L,onExpand:$,onDragStart:I,onDragEnter:P,onDragOver:E,onDragLeave:H,onDragEnd:z,onDrop:A,onRightClick:M,onLoad:W,className:F,style:D,classNames:T,styles:O}){const Y=i.useMemo(()=>k0(r),[r]),X=!!p,_=typeof p=="object"?p.showLeafIcon:void 0,G=!!R,Q=i.useCallback(pe=>R?typeof R=="function"?R(pe):typeof R=="object"&&R.nodeDraggable?R.nodeDraggable(pe):!0:!1,[R]),N=typeof R=="object"?R.icon:void 0,le=h!==void 0,[oe,q]=i.useState(()=>{const pe=g??S0(e,Y,m);return x?M0(pe,e,Y):pe}),K=le?h:oe,re=i.useMemo(()=>new Set(K),[K]),Te=u!==void 0,[Ce,Le]=i.useState(()=>f??[]),ue=Te?u:Ce,ze=i.useMemo(()=>new Set(ue),[ue]),xe=s!==void 0,[ge,Ie]=i.useState(()=>l??[]),Ae=xe?(pe=>pe?Array.isArray(pe)?pe:pe.checked:[])(s):ge,Re=i.useMemo(()=>new Set(Ae),[Ae]),[ke,ee]=i.useState(new Set),[ae,se]=i.useState(new Set),[we,ie]=i.useState(null),[ce,He]=i.useState(null),[Pe,Ge]=i.useState(0),[Z,Be]=i.useState(null),Oe=i.useRef(null),Qe=i.useRef(!1),_e=i.useRef(null),[et,je]=i.useState(0),Se=i.useMemo(()=>pi(e,Y,re,0),[e,Y,re]),me=i.useCallback((pe,Ke)=>{const qe=re.has(pe);B&&!qe&&!ae.has(pe)&&!Ke.isLeaf&&(ee(rt=>{const xt=new Set(rt);return xt.add(pe),xt}),B(Ke).then(()=>{ee(rt=>{const xt=new Set(rt);return xt.delete(pe),xt}),se(rt=>{const xt=new Set(rt);return xt.add(pe),xt}),W?.(Array.from(new Set([...ae,pe])),{node:Ke})}));const st=qe?K.filter(rt=>rt!==pe):[...K,pe];le||q(st),$?.(st,{expanded:!qe,node:Ke})},[re,K,le,B,ae,$,W]),U=i.useCallback((pe,Ke,qe)=>{let st;d?st=ze.has(pe)?ue.filter(xt=>xt!==pe):[...ue,pe]:st=ze.has(pe)?[]:[pe],Te||Le(st);const rt=Ln(e,new Set(st),Y);S?.(st,{selected:!ze.has(pe),selectedNodes:rt,node:Ke,event:qe})},[d,ze,ue,Te,e,Y,S]),he=i.useCallback((pe,Ke,qe)=>{const st=Re.has(pe);let rt;if(a)rt=st?Ae.filter(fe=>fe!==pe):[...Ae,pe];else{const fe=j0(pe,!st,Re,e,Y);rt=Array.from(fe)}xe||Ie(rt);const xt=new Set(rt),Rt=Ln(e,xt,Y),Lt=a?[]:B0(e,xt,Y);a?L?.({checked:rt,halfChecked:Lt},{checked:!st,checkedNodes:Rt,node:Ke,event:qe,halfCheckedKeys:Lt}):L?.(rt,{checked:!st,checkedNodes:Rt,node:Ke,event:qe,halfCheckedKeys:Lt})},[Re,Ae,xe,a,e,Y,L]),de=i.useCallback((pe,Ke)=>{ie(Ht(Ke,Y)),I?.({event:pe,node:Ke})},[Y,I]),We=i.useCallback((pe,Ke)=>{const qe=Ht(Ke,Y);He(qe),P?.({event:pe,node:Ke})},[Y,P]),$e=i.useCallback((pe,Ke)=>{const qe=Ht(Ke,Y);He(qe);const rt=pe.currentTarget.getBoundingClientRect(),xt=pe.clientY-rt.top,Rt=rt.height;xt<Rt*.25?Ge(-1):xt>Rt*.75?Ge(1):Ge(0),E?.({event:pe,node:Ke})},[Y,E]),ne=i.useCallback((pe,Ke)=>{H?.({event:pe,node:Ke})},[H]),be=i.useCallback((pe,Ke)=>{ie(null),He(null),z?.({event:pe,node:Ke})},[z]),Ye=i.useCallback((pe,Ke)=>{const qe=we!==null?Pr(e,we,Y):void 0;qe&&A?.({event:pe,node:Ke,dragNode:qe,dropPosition:Pe,dropToGap:Pe!==0}),ie(null),He(null)},[we,e,Y,Pe,A]),Ze=i.useCallback(pe=>{if(!Se.length)return;const Ke=Z!==null?Se.findIndex(qe=>qe.key===Z):-1;switch(pe.key){case"ArrowDown":{pe.preventDefault();const qe=Ke<Se.length-1?Ke+1:0;Be(Se[qe].key);break}case"ArrowUp":{pe.preventDefault();const qe=Ke>0?Ke-1:Se.length-1;Be(Se[qe].key);break}case"ArrowRight":{if(pe.preventDefault(),Ke>=0){const qe=Se[Ke],st=Ut(qe.node,Y);if(st&&st.length>0)if(!re.has(qe.key))me(qe.key,qe.node);else{const rt=Ht(st[0],Y);Be(rt)}}break}case"ArrowLeft":{if(pe.preventDefault(),Ke>=0){const qe=Se[Ke];if(re.has(qe.key))me(qe.key,qe.node);else{const rt=go(e,Y).get(qe.key);rt!=null&&Be(rt)}}break}case"Enter":case" ":{if(pe.preventDefault(),Ke>=0){const qe=Se[Ke];o&&qe.node.checkable!==!1&&!qe.node.disableCheckbox&&!qe.node.disabled?he(qe.key,qe.node,pe):c&&qe.node.selectable!==!1&&!qe.node.disabled&&U(qe.key,qe.node,pe)}break}case"Home":{pe.preventDefault(),Se.length>0&&Be(Se[0].key);break}case"End":{pe.preventDefault(),Se.length>0&&Be(Se[Se.length-1].key);break}}},[Se,Z,Y,re,e,me,o,c,he,U]),tt=i.useCallback(()=>{if(Qe.current){Qe.current=!1;return}Z===null&&Se.length>0&&Be(Se[0].key)},[Z,Se]),dt=i.useCallback(()=>{Be(null)},[]),ft=i.useCallback(()=>{Qe.current=!0},[]),gt=i.useCallback(pe=>{je(pe.currentTarget.scrollTop)},[]),Ct=D?.__expandAction,jt={padding:"0.25rem",fontSize:"0.875rem",color:n.colorText,lineHeight:1.5,outline:"none"},Mt=(pe,Ke,qe,st)=>({node:pe,depth:Ke,fa:Y,treeData:e,expandedKeys:re,onToggleExpand:me,selectable:c,selectedKeys:ze,multiple:d,onSelect:U,checkable:o,checkedSet:Re,checkStrictly:a,onCheck:he,showLine:X,showLeafIcon:_,showIcon:b,defaultIcon:v,switcherIcon:j,titleRender:y,filterTreeNode:k,loadData:B,loadingKeys:ke,loadedKeys:ae,draggableEnabled:G,isDraggable:Q,dragIcon:N,onDragStartNode:de,onDragEnterNode:We,onDragOverNode:$e,onDragLeaveNode:ne,onDragEndNode:be,onDropNode:Ye,dragOverKey:ce,dropPosition:Pe,onRightClick:M?(rt,xt)=>M({event:rt,node:xt}):void 0,expandAction:Ct,isLastChild:qe,parentIsLast:st,disabled:C,focusedKey:Z,nodeStyle:O?.node,nodeClassName:T?.node});if(w!==void 0){const Ke=Se.length*28,qe=Math.max(0,Math.floor(et/28)-2),st=Math.min(Se.length,Math.ceil((et+w)/28)+2);return t.jsxs("div",{ref:Oe,role:"tree",tabIndex:0,className:Ve(F,T?.root),style:V({...jt,width:"100%"},O?.root,D),onKeyDown:Ze,onFocus:tt,onBlur:dt,onMouseDown:ft,children:[t.jsx("div",{ref:_e,style:{height:w,overflowY:"auto"},onScroll:gt,children:t.jsx("div",{style:{height:Ke,position:"relative"},children:Se.slice(qe,st).map((rt,xt)=>t.jsx("div",{style:{position:"absolute",top:(qe+xt)*28,left:0,right:0},children:t.jsx(Wo,{...Mt(rt.node,rt.depth,rt.isLastChild,rt.parentIsLast),renderChildren:!1})},String(rt.key)))})}),t.jsx("style",{children:"@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }"})]})}return t.jsxs("div",{ref:Oe,role:"tree",tabIndex:0,className:Ve(F,T?.root),style:V(jt,O?.root,D),onKeyDown:Ze,onFocus:tt,onBlur:dt,onMouseDown:ft,children:[e.map((pe,Ke)=>t.jsx(Wo,{...Mt(pe,0,Ke===e.length-1,[])},String(Ht(pe,Y)))),t.jsx("style",{children:"@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }"})]})}function R0({expandAction:e="click",showIcon:r,icon:o,multiple:s,style:l,...a}){const c=i.useCallback(({expanded:f,isLeaf:d})=>d?t.jsx(v0,{}):f?t.jsx(y0,{}):t.jsx(b0,{}),[]),u=i.useMemo(()=>({...l,__expandAction:e}),[l,e]);return t.jsx(gi,{...a,showIcon:r??!0,icon:o??c,multiple:s??!0,style:u})}const T0=Object.assign(gi,{DirectoryTree:R0});function I0({size:e=48,color:r}){return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:r||"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242"}),t.jsx("path",{d:"M12 12v9"}),t.jsx("path",{d:"m16 16-4-4-4 4"})]})}function En({size:e=16}){return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),t.jsx("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"})]})}function $n({size:e=16}){return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}),t.jsx("circle",{cx:"9",cy:"9",r:"2"}),t.jsx("path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"})]})}function Pn({size:e=14}){return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M18 6 6 18"}),t.jsx("path",{d:"m6 6 12 12"})]})}function L0({size:e=16}){return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}),t.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function Dn({size:e=16}){return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),t.jsx("polyline",{points:"7 10 12 15 17 10"}),t.jsx("line",{x1:"12",x2:"12",y1:"15",y2:"3"})]})}function E0({size:e=16}){return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("circle",{cx:"12",cy:"12",r:"10"}),t.jsx("path",{d:"m15 9-6 6"}),t.jsx("path",{d:"m9 9 6 6"})]})}function zn({size:e=16}){return t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{animation:"j-upload-spin 1s linear infinite"},children:t.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})}function $0({size:e=24}){return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M5 12h14"}),t.jsx("path",{d:"M12 5v14"})]})}function P0({size:e=14}){return t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"})})}function D0({size:e=16}){return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),t.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]})}const Wn="j-upload-keyframes";function z0(){if(typeof document>"u"||document.getElementById(Wn))return;const e=document.createElement("style");e.id=Wn,e.textContent=`
|
|
183
|
+
`})]})}const u0=Object.assign(d0,{SHOW_ALL:"SHOW_ALL",SHOW_PARENT:"SHOW_PARENT",SHOW_CHILD:"SHOW_CHILD"});function f0(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"20 6 9 17 4 12"})})}function h0(){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})})}function p0(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"6 9 12 15 18 9"})})}function g0(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"9 6 15 12 9 18"})})}function m0(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{animation:"spin 1s linear infinite"},children:t.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})}function x0(){return t.jsx("span",{style:{display:"inline-block",width:12,height:12}})}function y0(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2v2"}),t.jsx("path",{d:"M2 10h20"})]})}function b0(){return t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})})}function v0(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),t.jsx("polyline",{points:"14 2 14 8 20 8"})]})}function C0(){return t.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"currentColor",stroke:"none",children:[t.jsx("circle",{cx:"5.5",cy:"3",r:"1.5"}),t.jsx("circle",{cx:"10.5",cy:"3",r:"1.5"}),t.jsx("circle",{cx:"5.5",cy:"8",r:"1.5"}),t.jsx("circle",{cx:"10.5",cy:"8",r:"1.5"}),t.jsx("circle",{cx:"5.5",cy:"13",r:"1.5"}),t.jsx("circle",{cx:"10.5",cy:"13",r:"1.5"})]})}function k0(e){return{key:e?.key??"key",title:e?.title??"title",children:e?.children??"children"}}function Ht(e,r){return e[r.key]}function w0(e,r){return e[r.title]}function Ut(e,r){const o=e[r.children];return Array.isArray(o)?o:void 0}function Pr(e,r,o){for(const s of e){if(Ht(s,o)===r)return s;const l=Ut(s,o);if(l){const a=Pr(l,r,o);if(a)return a}}}function hi(e,r){const o=[Ht(e,r)],s=Ut(e,r);if(s)for(const l of s)o.push(...hi(l,r));return o}function go(e,r,o=null){const s=new Map;for(const l of e){const a=Ht(l,r);s.set(a,o);const c=Ut(l,r);c&&go(c,r,a).forEach((f,d)=>s.set(d,f))}return s}function en(e,r,o){const s=Ut(e,o);if(!s||s.length===0)return r.has(Ht(e,o))?"checked":"unchecked";let l=!0,a=!1;for(const c of s){const u=en(c,r,o);u==="checked"?a=!0:(u==="indeterminate"&&(a=!0),l=!1)}return l&&a?"checked":a?"indeterminate":"unchecked"}function j0(e,r,o,s,l){const a=new Set(o),c=Pr(s,e,l);if(!c)return a;const u=hi(c,l);for(const h of u){const g=Pr(s,h,l);g?.disabled||g?.disableCheckbox||(r?a.add(h):a.delete(h))}const f=go(s,l);let d=f.get(e);for(;d!=null;){const h=Pr(s,d,l);if(!h)break;(Ut(h,l)??[]).every(x=>x.disabled||x.disableCheckbox?!0:a.has(Ht(x,l)))?a.add(d):a.delete(d),d=f.get(d)}return a}function S0(e,r,o){if(!o)return[];const s=[];function l(a){for(const c of a){const u=Ut(c,r);u&&u.length>0&&(s.push(Ht(c,r)),l(u))}}return l(e),s}function M0(e,r,o){const s=go(r,o),l=new Set(e);for(const a of e){let c=s.get(a);for(;c!=null;)l.add(c),c=s.get(c)}return Array.from(l)}function B0(e,r,o){const s=[];function l(a){for(const c of a){const u=Ut(c,o);u&&u.length>0&&(en(c,r,o)==="indeterminate"&&s.push(Ht(c,o)),l(u))}}return l(e),s}function Ln(e,r,o){const s=[];function l(a){for(const c of a){r.has(Ht(c,o))&&s.push(c);const u=Ut(c,o);u&&l(u)}}return l(e),s}function pi(e,r,o,s,l=[]){const a=[];for(let c=0;c<e.length;c++){const u=e[c],f=Ht(u,r),d=c===e.length-1;a.push({node:u,key:f,depth:s,isLastChild:d,parentIsLast:[...l]});const h=Ut(u,r);h&&o.has(f)&&a.push(...pi(h,r,o,s+1,[...l,d]))}return a}function Wo({node:e,depth:r,fa:o,treeData:s,expandedKeys:l,onToggleExpand:a,selectable:c,selectedKeys:u,multiple:f,onSelect:d,checkable:h,checkedSet:g,checkStrictly:m,onCheck:x,showLine:p,showLeafIcon:b,showIcon:v,defaultIcon:j,switcherIcon:C,titleRender:w,filterTreeNode:y,loadData:k,loadingKeys:B,loadedKeys:R,draggableEnabled:S,isDraggable:E,dragIcon:$,onDragStartNode:I,onDragEnterNode:L,onDragOverNode:P,onDragLeaveNode:H,onDragEndNode:z,onDropNode:F,dragOverKey:M,dropPosition:W,onRightClick:A,expandAction:D,isLastChild:T,parentIsLast:O,disabled:Y,focusedKey:X,nodeStyle:K,nodeClassName:G,renderChildren:Q=!0}){const N=Ht(e,o),le=w0(e,o),re=Ut(e,o),q=re&&re.length>0||k&&!e.isLeaf&&!R.has(N),_=l.has(N),J=B.has(N),Te=Y||!!e.disabled,ke=c&&e.selectable!==!1,Ie=u.has(N),fe=h&&e.checkable!==!1,ze=y?!y(e):!1,me=X===N,he=!q,Le=S&&E(e),De=M===N,Oe=fe?m?g.has(N)?"checked":"unchecked":en(e,g,o):"unchecked",Be=i.useRef(null),we=i.useCallback(()=>{Te||!Be.current||(K&&("backgroundColor"in K||"borderColor"in K||"border"in K)?Be.current.style.filter="brightness(1.15)":Be.current.style.backgroundColor=n.colorBgMuted)},[Te,K]),ee=i.useCallback(()=>{Be.current&&(K&&("backgroundColor"in K||"borderColor"in K||"border"in K)?Be.current.style.filter="":Be.current.style.backgroundColor=Ie?n.colorPrimary50:"")},[K,Ie]),ae=i.useCallback(ue=>{ue.stopPropagation(),!J&&a(N,e)},[N,e,J,a]),se=i.useCallback(ue=>{Te||(fe?e.disableCheckbox||x(N,e,ue):ke&&d(N,e,ue),D==="click"&&q&&a(N,e))},[Te,fe,ke,N,e,x,d,D,q,a]),Se=i.useCallback(ue=>{Te||(D==="doubleClick"&&q&&a(N,e),ue.preventDefault())},[Te,D,q,N,e,a]),ie=i.useCallback(ue=>{A&&(ue.preventDefault(),A(ue,e))},[A,e]),ce=i.useCallback(ue=>{ue.dataTransfer.setData("text/plain",String(N)),I?.(ue,e)},[N,e,I]),He=i.useCallback(ue=>{ue.preventDefault(),P?.(ue,e)},[e,P]),Pe=i.useCallback(ue=>{ue.preventDefault(),L?.(ue,e)},[e,L]),Ge=i.useCallback(ue=>{H?.(ue,e)},[e,H]),Ne=i.useCallback(ue=>{z?.(ue,e)},[e,z]),oe=i.useCallback(ue=>{ue.preventDefault(),F?.(ue,e)},[e,F]),Re={display:"flex",alignItems:"center",minHeight:"1.75rem",padding:p?"0 0.5rem":"0.125rem 0.5rem",cursor:Te?"not-allowed":"pointer",opacity:Te?.5:ze?.4:1,borderRadius:"0.25rem",transition:"background-color 0.1s",outline:me?`2px solid ${n.colorPrimary}`:"none",outlineOffset:-2,backgroundColor:Ie?n.colorPrimary50:void 0,position:"relative",...K},Ze=De&&W===0?{outline:`2px solid ${n.colorPrimary}`,outlineOffset:-2,borderRadius:"0.25rem"}:void 0;Ze&&Object.assign(Re,Ze);const Fe=`2px solid ${n.colorBorder}`,et=()=>{const ue=[];for(let We=0;We<r;We++)if(p){const $e=!O[We];ue.push(t.jsx("span",{style:{display:"flex",alignItems:"center",width:"1.5rem",alignSelf:"stretch",position:"relative",flexShrink:0},children:$e&&t.jsx("span",{style:{position:"absolute",left:"0.75rem",top:0,bottom:0,borderLeft:Fe}})},We))}else ue.push(t.jsx("span",{style:{display:"inline-block",width:"1.5rem",flexShrink:0}},We));return ue},je=()=>{const ue={display:"flex",alignItems:"center",justifyContent:"center",width:"1.5rem",flexShrink:0},We=typeof C=="function"?C({expanded:_,isLeaf:he}):C;if(!q)return p&&r>0?t.jsxs("span",{style:{...ue,alignSelf:"stretch",position:"relative"},children:[t.jsx("span",{style:{position:"absolute",left:"0.75rem",top:0,height:"50%",borderLeft:Fe}}),t.jsx("span",{style:{position:"absolute",left:"0.75rem",top:"50%",width:"0.75rem",borderTop:Fe}}),!T&&t.jsx("span",{style:{position:"absolute",left:"0.75rem",top:"50%",bottom:0,borderLeft:Fe}}),b!==void 0&&t.jsx("span",{style:{position:"relative",zIndex:1,display:"inline-flex",alignItems:"center",justifyContent:"center",backgroundColor:n.colorBg},children:b})]}):p?t.jsx("span",{style:ue,children:b??null}):t.jsx("span",{style:ue,children:t.jsx(x0,{})});const $e=J?t.jsx(m0,{}):We||(_?t.jsx(p0,{}):t.jsx(g0,{}));return p&&r>0?t.jsxs("span",{onClick:ae,style:{...ue,alignSelf:"stretch",position:"relative",cursor:"pointer",color:n.colorTextMuted},children:[t.jsx("span",{style:{position:"absolute",left:"0.75rem",top:0,height:"50%",borderLeft:Fe}}),t.jsx("span",{style:{position:"absolute",left:"0.75rem",top:"50%",width:"0.75rem",borderTop:Fe}}),!T&&t.jsx("span",{style:{position:"absolute",left:"0.75rem",top:"50%",bottom:0,borderLeft:Fe}}),t.jsx("span",{style:{position:"relative",zIndex:1,display:"inline-flex",alignItems:"center",justifyContent:"center",width:"1rem",height:"1rem",backgroundColor:n.colorBg,borderRadius:"0.125rem"},children:$e})]}):p?t.jsx("span",{onClick:ae,style:{...ue,cursor:"pointer",color:n.colorTextMuted},children:$e}):t.jsx("span",{onClick:ae,style:{...ue,cursor:"pointer",color:n.colorTextMuted},children:$e})},ve=()=>{if(!fe)return null;const ue=Te||!!e.disableCheckbox,We={display:"inline-flex",alignItems:"center",justifyContent:"center",width:"0.875rem",height:"0.875rem",borderRadius:"0.1875rem",border:`1.5px solid ${Oe!=="unchecked"?n.colorPrimary:n.colorBorder}`,backgroundColor:Oe!=="unchecked"?n.colorPrimary:"transparent",color:"#fff",marginRight:"0.375rem",flexShrink:0,transition:"all 0.15s ease",cursor:ue?"not-allowed":"pointer",opacity:ue?.5:1};return t.jsxs("span",{style:We,children:[Oe==="checked"&&t.jsx(f0,{}),Oe==="indeterminate"&&t.jsx(h0,{})]})},xe=()=>{if(!v)return null;const ue=e.icon?typeof e.icon=="function"?e.icon({selected:Ie,expanded:_}):e.icon:j?typeof j=="function"?j({selected:Ie,expanded:_,isLeaf:he}):j:null;return ue?t.jsx("span",{style:{display:"inline-flex",alignItems:"center",marginRight:"0.25rem",flexShrink:0,color:n.colorTextMuted},children:ue}):null},U=()=>{const ue=w?w(e):le;return t.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"0.8125rem",...Ie?{color:n.colorPrimary,fontWeight:600}:{}},children:ue})},de=()=>Le?t.jsx("span",{style:{display:"inline-flex",alignItems:"center",marginRight:"0.25rem",color:n.colorTextSubtle,cursor:"grab",flexShrink:0},children:$??t.jsx(C0,{})}):null;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{ref:Be,role:"treeitem","aria-expanded":q?_:void 0,"aria-selected":Ie,style:Re,className:G,onClick:se,onDoubleClick:D==="doubleClick"?Se:void 0,onMouseEnter:we,onMouseLeave:ee,onContextMenu:A?ie:void 0,draggable:Le,onDragStart:Le?ce:void 0,onDragOver:S?He:void 0,onDragEnter:S?Pe:void 0,onDragLeave:S?Ge:void 0,onDragEnd:Le?Ne:void 0,onDrop:S?oe:void 0,"data-key":N,children:[De&&W===-1&&t.jsx("span",{style:{position:"absolute",top:0,left:`${r*1.5+1.5}rem`,right:0,height:2,backgroundColor:n.colorPrimary,borderRadius:1}}),de(),et(),je(),ve(),xe(),U(),De&&W===1&&t.jsx("span",{style:{position:"absolute",bottom:0,left:`${r*1.5+1.5}rem`,right:0,height:2,backgroundColor:n.colorPrimary,borderRadius:1}})]}),Q&&re&&re.length>0&&t.jsx("div",{style:{display:"grid",gridTemplateRows:_?"1fr":"0fr",transition:"grid-template-rows 0.2s ease-out"},children:t.jsx("div",{style:{overflow:"hidden"},children:re.map((ue,We)=>t.jsx(Wo,{node:ue,depth:r+1,fa:o,treeData:s,expandedKeys:l,onToggleExpand:a,selectable:c,selectedKeys:u,multiple:f,onSelect:d,checkable:h,checkedSet:g,checkStrictly:m,onCheck:x,showLine:p,showLeafIcon:b,showIcon:v,defaultIcon:j,switcherIcon:C,titleRender:w,filterTreeNode:y,loadData:k,loadingKeys:B,loadedKeys:R,draggableEnabled:S,isDraggable:E,dragIcon:$,onDragStartNode:I,onDragEnterNode:L,onDragOverNode:P,onDragLeaveNode:H,onDragEndNode:z,onDropNode:F,dragOverKey:M,dropPosition:W,onRightClick:A,expandAction:D,isLastChild:We===re.length-1,parentIsLast:[...O,T],disabled:Y,focusedKey:X,nodeStyle:K,nodeClassName:G},String(Ht(ue,o))))})})]})}function gi({treeData:e=[],fieldNames:r,checkable:o=!1,checkedKeys:s,defaultCheckedKeys:l,checkStrictly:a=!1,selectable:c=!0,selectedKeys:u,defaultSelectedKeys:f,multiple:d=!1,expandedKeys:h,defaultExpandedKeys:g,defaultExpandAll:m=!1,autoExpandParent:x=!1,showLine:p=!1,showIcon:b=!1,icon:v,switcherIcon:j,disabled:C=!1,height:w,titleRender:y,filterTreeNode:k,loadData:B,draggable:R=!1,onSelect:S,onCheck:E,onExpand:$,onDragStart:I,onDragEnter:L,onDragOver:P,onDragLeave:H,onDragEnd:z,onDrop:F,onRightClick:M,onLoad:W,className:A,style:D,classNames:T,styles:O}){const Y=i.useMemo(()=>k0(r),[r]),X=!!p,K=typeof p=="object"?p.showLeafIcon:void 0,G=!!R,Q=i.useCallback(ge=>R?typeof R=="function"?R(ge):typeof R=="object"&&R.nodeDraggable?R.nodeDraggable(ge):!0:!1,[R]),N=typeof R=="object"?R.icon:void 0,le=h!==void 0,[re,q]=i.useState(()=>{const ge=g??S0(e,Y,m);return x?M0(ge,e,Y):ge}),_=le?h:re,J=i.useMemo(()=>new Set(_),[_]),Te=u!==void 0,[ke,Ie]=i.useState(()=>f??[]),fe=Te?u:ke,ze=i.useMemo(()=>new Set(fe),[fe]),me=s!==void 0,[he,Le]=i.useState(()=>l??[]),Oe=me?(ge=>ge?Array.isArray(ge)?ge:ge.checked:[])(s):he,Be=i.useMemo(()=>new Set(Oe),[Oe]),[we,ee]=i.useState(new Set),[ae,se]=i.useState(new Set),[Se,ie]=i.useState(null),[ce,He]=i.useState(null),[Pe,Ge]=i.useState(0),[Ne,oe]=i.useState(null),Re=i.useRef(null),Ze=i.useRef(!1),Fe=i.useRef(null),[et,je]=i.useState(0),ve=i.useMemo(()=>pi(e,Y,J,0),[e,Y,J]),xe=i.useCallback((ge,_e)=>{const qe=J.has(ge);B&&!qe&&!ae.has(ge)&&!_e.isLeaf&&(ee(rt=>{const xt=new Set(rt);return xt.add(ge),xt}),B(_e).then(()=>{ee(rt=>{const xt=new Set(rt);return xt.delete(ge),xt}),se(rt=>{const xt=new Set(rt);return xt.add(ge),xt}),W?.(Array.from(new Set([...ae,ge])),{node:_e})}));const st=qe?_.filter(rt=>rt!==ge):[..._,ge];le||q(st),$?.(st,{expanded:!qe,node:_e})},[J,_,le,B,ae,$,W]),U=i.useCallback((ge,_e,qe)=>{let st;d?st=ze.has(ge)?fe.filter(xt=>xt!==ge):[...fe,ge]:st=ze.has(ge)?[]:[ge],Te||Ie(st);const rt=Ln(e,new Set(st),Y);S?.(st,{selected:!ze.has(ge),selectedNodes:rt,node:_e,event:qe})},[d,ze,fe,Te,e,Y,S]),de=i.useCallback((ge,_e,qe)=>{const st=Be.has(ge);let rt;if(a)rt=st?Oe.filter(pe=>pe!==ge):[...Oe,ge];else{const pe=j0(ge,!st,Be,e,Y);rt=Array.from(pe)}me||Le(rt);const xt=new Set(rt),Rt=Ln(e,xt,Y),Lt=a?[]:B0(e,xt,Y);a?E?.({checked:rt,halfChecked:Lt},{checked:!st,checkedNodes:Rt,node:_e,event:qe,halfCheckedKeys:Lt}):E?.(rt,{checked:!st,checkedNodes:Rt,node:_e,event:qe,halfCheckedKeys:Lt})},[Be,Oe,me,a,e,Y,E]),ue=i.useCallback((ge,_e)=>{ie(Ht(_e,Y)),I?.({event:ge,node:_e})},[Y,I]),We=i.useCallback((ge,_e)=>{const qe=Ht(_e,Y);He(qe),L?.({event:ge,node:_e})},[Y,L]),$e=i.useCallback((ge,_e)=>{const qe=Ht(_e,Y);He(qe);const rt=ge.currentTarget.getBoundingClientRect(),xt=ge.clientY-rt.top,Rt=rt.height;xt<Rt*.25?Ge(-1):xt>Rt*.75?Ge(1):Ge(0),P?.({event:ge,node:_e})},[Y,P]),ne=i.useCallback((ge,_e)=>{H?.({event:ge,node:_e})},[H]),be=i.useCallback((ge,_e)=>{ie(null),He(null),z?.({event:ge,node:_e})},[z]),Ke=i.useCallback((ge,_e)=>{const qe=Se!==null?Pr(e,Se,Y):void 0;qe&&F?.({event:ge,node:_e,dragNode:qe,dropPosition:Pe,dropToGap:Pe!==0}),ie(null),He(null)},[Se,e,Y,Pe,F]),Qe=i.useCallback(ge=>{if(!ve.length)return;const _e=Ne!==null?ve.findIndex(qe=>qe.key===Ne):-1;switch(ge.key){case"ArrowDown":{ge.preventDefault();const qe=_e<ve.length-1?_e+1:0;oe(ve[qe].key);break}case"ArrowUp":{ge.preventDefault();const qe=_e>0?_e-1:ve.length-1;oe(ve[qe].key);break}case"ArrowRight":{if(ge.preventDefault(),_e>=0){const qe=ve[_e],st=Ut(qe.node,Y);if(st&&st.length>0)if(!J.has(qe.key))xe(qe.key,qe.node);else{const rt=Ht(st[0],Y);oe(rt)}}break}case"ArrowLeft":{if(ge.preventDefault(),_e>=0){const qe=ve[_e];if(J.has(qe.key))xe(qe.key,qe.node);else{const rt=go(e,Y).get(qe.key);rt!=null&&oe(rt)}}break}case"Enter":case" ":{if(ge.preventDefault(),_e>=0){const qe=ve[_e];o&&qe.node.checkable!==!1&&!qe.node.disableCheckbox&&!qe.node.disabled?de(qe.key,qe.node,ge):c&&qe.node.selectable!==!1&&!qe.node.disabled&&U(qe.key,qe.node,ge)}break}case"Home":{ge.preventDefault(),ve.length>0&&oe(ve[0].key);break}case"End":{ge.preventDefault(),ve.length>0&&oe(ve[ve.length-1].key);break}}},[ve,Ne,Y,J,e,xe,o,c,de,U]),tt=i.useCallback(()=>{if(Ze.current){Ze.current=!1;return}Ne===null&&ve.length>0&&oe(ve[0].key)},[Ne,ve]),dt=i.useCallback(()=>{oe(null)},[]),ft=i.useCallback(()=>{Ze.current=!0},[]),gt=i.useCallback(ge=>{je(ge.currentTarget.scrollTop)},[]),Ct=D?.__expandAction,jt={padding:"0.25rem",fontSize:"0.875rem",color:n.colorText,lineHeight:1.5,outline:"none"},Mt=(ge,_e,qe,st)=>({node:ge,depth:_e,fa:Y,treeData:e,expandedKeys:J,onToggleExpand:xe,selectable:c,selectedKeys:ze,multiple:d,onSelect:U,checkable:o,checkedSet:Be,checkStrictly:a,onCheck:de,showLine:X,showLeafIcon:K,showIcon:b,defaultIcon:v,switcherIcon:j,titleRender:y,filterTreeNode:k,loadData:B,loadingKeys:we,loadedKeys:ae,draggableEnabled:G,isDraggable:Q,dragIcon:N,onDragStartNode:ue,onDragEnterNode:We,onDragOverNode:$e,onDragLeaveNode:ne,onDragEndNode:be,onDropNode:Ke,dragOverKey:ce,dropPosition:Pe,onRightClick:M?(rt,xt)=>M({event:rt,node:xt}):void 0,expandAction:Ct,isLastChild:qe,parentIsLast:st,disabled:C,focusedKey:Ne,nodeStyle:O?.node,nodeClassName:T?.node});if(w!==void 0){const _e=ve.length*28,qe=Math.max(0,Math.floor(et/28)-2),st=Math.min(ve.length,Math.ceil((et+w)/28)+2);return t.jsxs("div",{ref:Re,role:"tree",tabIndex:0,className:Ye(A,T?.root),style:V({...jt,width:"100%"},O?.root,D),onKeyDown:Qe,onFocus:tt,onBlur:dt,onMouseDown:ft,children:[t.jsx("div",{ref:Fe,style:{height:w,overflowY:"auto"},onScroll:gt,children:t.jsx("div",{style:{height:_e,position:"relative"},children:ve.slice(qe,st).map((rt,xt)=>t.jsx("div",{style:{position:"absolute",top:(qe+xt)*28,left:0,right:0},children:t.jsx(Wo,{...Mt(rt.node,rt.depth,rt.isLastChild,rt.parentIsLast),renderChildren:!1})},String(rt.key)))})}),t.jsx("style",{children:"@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }"})]})}return t.jsxs("div",{ref:Re,role:"tree",tabIndex:0,className:Ye(A,T?.root),style:V(jt,O?.root,D),onKeyDown:Qe,onFocus:tt,onBlur:dt,onMouseDown:ft,children:[e.map((ge,_e)=>t.jsx(Wo,{...Mt(ge,0,_e===e.length-1,[])},String(Ht(ge,Y)))),t.jsx("style",{children:"@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }"})]})}function R0({expandAction:e="click",showIcon:r,icon:o,multiple:s,style:l,...a}){const c=i.useCallback(({expanded:f,isLeaf:d})=>d?t.jsx(v0,{}):f?t.jsx(y0,{}):t.jsx(b0,{}),[]),u=i.useMemo(()=>({...l,__expandAction:e}),[l,e]);return t.jsx(gi,{...a,showIcon:r??!0,icon:o??c,multiple:s??!0,style:u})}const T0=Object.assign(gi,{DirectoryTree:R0});function I0({size:e=48,color:r}){return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:r||"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242"}),t.jsx("path",{d:"M12 12v9"}),t.jsx("path",{d:"m16 16-4-4-4 4"})]})}function En({size:e=16}){return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),t.jsx("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"})]})}function $n({size:e=16}){return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}),t.jsx("circle",{cx:"9",cy:"9",r:"2"}),t.jsx("path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"})]})}function Pn({size:e=14}){return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M18 6 6 18"}),t.jsx("path",{d:"m6 6 12 12"})]})}function L0({size:e=16}){return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}),t.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function Dn({size:e=16}){return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),t.jsx("polyline",{points:"7 10 12 15 17 10"}),t.jsx("line",{x1:"12",x2:"12",y1:"15",y2:"3"})]})}function E0({size:e=16}){return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("circle",{cx:"12",cy:"12",r:"10"}),t.jsx("path",{d:"m15 9-6 6"}),t.jsx("path",{d:"m9 9 6 6"})]})}function zn({size:e=16}){return t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{animation:"j-upload-spin 1s linear infinite"},children:t.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})}function $0({size:e=24}){return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M5 12h14"}),t.jsx("path",{d:"M12 5v14"})]})}function P0({size:e=14}){return t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"})})}function D0({size:e=16}){return t.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),t.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]})}const Wn="j-upload-keyframes";function z0(){if(typeof document>"u"||document.getElementById(Wn))return;const e=document.createElement("style");e.id=Wn,e.textContent=`
|
|
184
184
|
@keyframes j-upload-spin {
|
|
185
185
|
from { transform: rotate(0deg); }
|
|
186
186
|
to { transform: rotate(360deg); }
|
|
@@ -190,17 +190,17 @@
|
|
|
190
190
|
20% { opacity: 0.5; width: 0; }
|
|
191
191
|
100% { opacity: 0; width: 100%; }
|
|
192
192
|
}
|
|
193
|
-
`,document.head.appendChild(e)}let Hn=0;function W0(){return Hn+=1,`j-upload-${Date.now()}-${Hn}`}const H0=/\.(jpe?g|png|gif|bmp|webp|svg|ico|avif|tiff?)$/i,F0=/^image\//i;function tn(e){return"type"in e&&e.type?F0.test(e.type):"name"in e&&e.name?H0.test(e.name):!1}function A0(e){return new Promise(r=>{if(!tn(e)){r("");return}const o=new FileReader;o.onload=()=>r(o.result),o.onerror=()=>r(""),o.readAsDataURL(e)})}function O0(e){const r=new XMLHttpRequest,o=new FormData;return e.data&&Object.entries(e.data).forEach(([s,l])=>{o.append(s,l)}),o.append(e.filename,e.file),r.open(e.method,e.action,!0),e.withCredentials&&(r.withCredentials=!0),e.headers&&Object.entries(e.headers).forEach(([s,l])=>{r.setRequestHeader(s,l)}),r.upload&&r.upload.addEventListener("progress",s=>{s.lengthComputable&&s.total>0&&e.onProgress({percent:s.loaded/s.total*100})}),r.addEventListener("error",()=>{e.onError(new Error("Upload error"))}),r.addEventListener("load",()=>{if(r.status<200||r.status>=300){e.onError(new Error(`Upload failed with status ${r.status}`),r.response);return}let s;try{s=JSON.parse(r.responseText)}catch{s=r.responseText}e.onSuccess(s,e.file)}),r.send(o),{abort(){r.abort()}}}function N0(e){return{uid:W0(),name:e.name,type:e.type,size:e.size,originFileObj:e}}function V0(e){return e===!1?!1:e===void 0||e===!0?{showPreviewIcon:!0,showRemoveIcon:!0,showDownloadIcon:!1}:{showPreviewIcon:e.showPreviewIcon!==!1,showRemoveIcon:e.showRemoveIcon!==!1,showDownloadIcon:e.showDownloadIcon??!1,previewIcon:e.previewIcon,removeIcon:e.removeIcon,downloadIcon:e.downloadIcon}}const mi="__LIST_IGNORE__";function Y0({file:e,listType:r,showConfig:o,disabled:s,progress:l,onRemove:a,onPreview:c,onDownload:u,itemStyle:f,itemClassName:d,actionsStyle:h,actionsClassName:g,thumbnailStyle:m,thumbnailClassName:x}){const p=i.useRef(null),b=i.useRef(null),v=r==="picture-card"||r==="picture-circle",j=e.status==="error",C=e.status==="done",w=e.status==="uploading",y=e.thumbUrl||e.url||e.preview||"",k=tn(e)||!!y,B=i.useCallback((P,E)=>P?typeof P=="function"?P(e):P:E,[e]),R=()=>c?.(e),S=()=>u?.(e),L=()=>{s||a(e)};if(v){const P="6.5rem",E=r==="picture-circle"?"50%":"0.5rem";return t.jsxs("div",{ref:p,className:d,style:V({position:"relative",width:P,height:P,border:`1px solid ${j?n.colorError:n.colorBorder}`,borderRadius:E,overflow:"hidden",display:"inline-flex",alignItems:"center",justifyContent:"center",backgroundColor:n.colorBgMuted,verticalAlign:"top"},f),onMouseEnter:()=>{b.current&&(b.current.style.opacity="1")},onMouseLeave:()=>{b.current&&(b.current.style.opacity="0")},children:[w?t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"0.5rem"},children:[t.jsx(zn,{size:24}),e.percent!==void 0&&t.jsx("span",{style:{fontSize:"0.75rem",color:n.colorTextMuted},children:l?.format?l.format(e.percent,e):`${Math.round(e.percent)}%`})]}):y?t.jsx("img",{src:y,alt:e.name,className:x,style:V({width:"100%",height:"100%",objectFit:"cover"},m),crossOrigin:e.crossOrigin}):t.jsxs("div",{className:x,style:V({display:"flex",flexDirection:"column",alignItems:"center",gap:"0.25rem",color:n.colorTextMuted},m),children:[k?t.jsx($n,{size:24}):t.jsx(En,{size:24}),t.jsx("span",{style:{fontSize:"0.6875rem",maxWidth:"5.5rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name})]}),j&&!w&&t.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,textAlign:"center",fontSize:"0.6875rem",padding:"0.125rem 0.25rem",backgroundColor:"rgba(255,77,79,0.1)",color:n.colorError},children:"Error"}),!w&&t.jsxs("div",{ref:b,className:g,style:V({position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",gap:"0.5rem",backgroundColor:"rgba(0,0,0,0.45)",opacity:0,transition:"opacity 0.2s",borderRadius:E},h),children:[o.showPreviewIcon&&(C||e.url||e.thumbUrl)&&t.jsx(Wt,{content:"Preview",children:t.jsx("button",{type:"button",onClick:R,style:{background:"none",border:"none",color:"#fff",cursor:"pointer",padding:"0.25rem",display:"flex",lineHeight:1},children:B(o.previewIcon,t.jsx(L0,{}))})}),o.showDownloadIcon&&C&&t.jsx(Wt,{content:"Download",children:t.jsx("button",{type:"button",onClick:S,style:{background:"none",border:"none",color:"#fff",cursor:"pointer",padding:"0.25rem",display:"flex",lineHeight:1},children:B(o.downloadIcon,t.jsx(Dn,{}))})}),o.showRemoveIcon&&!s&&t.jsx(Wt,{content:"Remove",children:t.jsx("button",{type:"button",onClick:L,style:{background:"none",border:"none",color:"#fff",cursor:"pointer",padding:"0.25rem",display:"flex",lineHeight:1},children:B(o.removeIcon,t.jsx(Pn,{}))})})]})]})}const $=r==="picture",I=!!f?.backgroundColor;return t.jsxs("div",{ref:p,className:d,style:V({display:"flex",alignItems:"center",gap:"0.5rem",padding:"0.25rem 0.5rem",borderRadius:"0.375rem",border:`1px solid ${j?n.colorError:n.colorBorder}`,backgroundColor:j?"rgba(255,77,79,0.04)":n.colorBgSubtle,transition:"background-color 0.2s, filter 0.2s",minHeight:$?"3.5rem":"2.25rem"},f),onMouseEnter:()=>{p.current&&!j&&(I?p.current.style.filter="brightness(1.15)":p.current.style.backgroundColor=n.colorBgMuted)},onMouseLeave:()=>{p.current&&!j&&(I?p.current.style.filter="none":p.current.style.backgroundColor=j?"rgba(255,77,79,0.04)":n.colorBgSubtle)},children:[$?y?t.jsx("img",{src:y,alt:e.name,className:x,style:V({width:"3rem",height:"3rem",objectFit:"cover",borderRadius:"0.25rem",flexShrink:0},m),crossOrigin:e.crossOrigin}):t.jsx("div",{className:x,style:V({width:"3rem",height:"3rem",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"0.25rem",backgroundColor:n.colorBgMuted,flexShrink:0,color:n.colorTextMuted},m),children:k?t.jsx($n,{size:20}):t.jsx(En,{size:20})}):t.jsx("span",{style:{flexShrink:0,display:"flex",color:j?n.colorError:n.colorTextMuted},children:t.jsx(P0,{})}),t.jsxs("div",{style:{flex:1,minWidth:0},children:[t.jsx(Wt,{content:e.name,children:t.jsx("span",{style:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"0.875rem",color:j?n.colorError:n.colorText,cursor:c?"pointer":void 0},onClick:c?R:void 0,children:e.name})}),w&&e.percent!==void 0&&t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.25rem",marginTop:"0.25rem"},children:[t.jsx("div",{style:{flex:1,height:l?.strokeWidth??2,borderRadius:(l?.strokeWidth??2)/2,backgroundColor:n.colorBorder,overflow:"hidden"},children:t.jsx("div",{style:{height:"100%",width:`${Math.min(e.percent,100)}%`,backgroundColor:l?.strokeColor??n.colorPrimary,borderRadius:(l?.strokeWidth??2)/2,transition:"width 0.3s"}})}),l?.format&&t.jsx("span",{style:{fontSize:"0.75rem",flexShrink:0,color:n.colorTextMuted},children:l.format(e.percent,e)})]})]}),w&&t.jsx("span",{style:{flexShrink:0,display:"flex",color:n.colorPrimary},children:t.jsx(zn,{})}),C&&t.jsx("span",{style:{flexShrink:0,display:"flex",color:n.colorSuccess},children:t.jsx(D0,{})}),j&&t.jsx("span",{style:{flexShrink:0,display:"flex",color:n.colorError},children:t.jsx(E0,{})}),t.jsxs("div",{className:g,style:V({display:"flex",gap:"0.25rem",flexShrink:0},h),children:[o.showDownloadIcon&&C&&t.jsx(Wt,{content:"Download",children:t.jsx("button",{type:"button",onClick:S,style:{background:"none",border:"none",color:n.colorTextMuted,cursor:"pointer",padding:"0.125rem",display:"flex",lineHeight:1},children:B(o.downloadIcon,t.jsx(Dn,{}))})}),o.showRemoveIcon&&!s&&t.jsx(Wt,{content:"Remove",children:t.jsx("button",{type:"button",onClick:L,style:{background:"none",border:"none",color:n.colorTextMuted,cursor:"pointer",padding:"0.125rem",display:"flex",lineHeight:1},children:B(o.removeIcon,t.jsx(Pn,{}))})})]})]})}function K0({files:e,listType:r,showConfig:o,disabled:s,progress:l,itemRender:a,fullFileList:c,onRemove:u,onPreview:f,onDownload:d,listStyle:h,listClassName:g,itemStyle:m,itemClassName:x,actionsStyle:p,actionsClassName:b,thumbnailStyle:v,thumbnailClassName:j}){const C=r==="picture-card"||r==="picture-circle",w=e.filter(y=>y.status!=="removed");return w.length===0?null:t.jsx("div",{className:g,style:V(C?{display:"flex",flexWrap:"wrap",gap:"0.5rem"}:{display:"flex",flexDirection:"column",gap:"0.5rem"},h),children:w.map(y=>{const k=t.jsx(Y0,{file:y,listType:r,showConfig:o,disabled:s,progress:l,onRemove:u,onPreview:f,onDownload:d,itemStyle:m,itemClassName:x,actionsStyle:p,actionsClassName:b,thumbnailStyle:v,thumbnailClassName:j},y.uid);return a?t.jsx(i.Fragment,{children:a(k,y,c,{download:()=>d?.(y),preview:()=>f?.(y),remove:()=>u(y)})},y.uid):k})})}const xi=i.forwardRef(function(r,o){const{accept:s,action:l,beforeUpload:a,customRequest:c,data:u,defaultFileList:f,fileList:d,directory:h=!1,disabled:g=!1,headers:m,listType:x="text",maxCount:p,method:b="post",multiple:v=!1,name:j="file",openFileDialogOnClick:C=!0,showUploadList:w,withCredentials:y=!1,progress:k,itemRender:B,onChange:R,onPreview:S,onDownload:L,onRemove:$,onDrop:I,children:P,className:E,style:H,classNames:z,styles:A,_dragger:M=!1}=r,[W,F]=i.useState(f||[]),D=d!==void 0?d:W,T=d!==void 0,O=i.useRef(D);O.current=D;const Y=i.useRef(R);Y.current=R;const X=i.useRef(null),_=i.useRef(null),G=i.useRef(new Map),Q=i.useRef(0),[N,le]=i.useState(!1),oe=V0(w);i.useEffect(()=>{z0()},[]);const q=i.useCallback((ee,ae,se)=>{if(T){const we=ee(O.current),ie=ae?we.find(ce=>ce.uid===ae.uid)||ae:we[we.length-1];Y.current?.({file:ie,fileList:we,event:se})}else F(we=>{const ie=ee(we),ce=ae?ie.find(He=>He.uid===ae.uid)||ae:ie[ie.length-1];return Y.current?.({file:ce,fileList:ie,event:se}),ie})},[T]),K=i.useCallback(async ee=>{const ae=ee.originFileObj;if(!ae)return;let se="";typeof l=="function"?se=await l(ee):l&&(se=l);let we;typeof u=="function"?we=await u(ee):we=u;const ce=(c||O0)({action:se,filename:j,data:we,file:ae,headers:m,withCredentials:y,method:b,onProgress:He=>{q(Pe=>Pe.map(Ge=>Ge.uid===ee.uid?{...Ge,status:"uploading",percent:He.percent}:Ge),{...ee,status:"uploading",percent:He.percent},He)},onSuccess:He=>{G.current.delete(ee.uid),q(Pe=>Pe.map(Ge=>Ge.uid===ee.uid?{...Ge,status:"done",percent:100,response:He}:Ge),{...ee,status:"done",percent:100,response:He})},onError:(He,Pe)=>{G.current.delete(ee.uid),q(Ge=>Ge.map(Z=>Z.uid===ee.uid?{...Z,status:"error",error:He,response:Pe}:Z),{...ee,status:"error",error:He,response:Pe})}});ce&&G.current.set(ee.uid,ce)},[l,c,u,j,m,b,q,y]),re=i.useCallback(async ee=>{let ae=ee;if(p!==void 0){const ie=D.length,ce=p-ie;if(p===1)ae=ae.slice(0,1);else{if(ce<=0)return;ae=ae.slice(0,ce)}}const se=[],we=[];for(const ie of ae){let ce=!0,He=ie;if(a){const Ge=a(ie,ae);if(Ge===mi)continue;if(Ge===!1)ce=!1;else if(Ge&&typeof Ge=="object"&&typeof Ge.then=="function")try{const Z=await Ge;Z===!1?ce=!1:Z instanceof File&&(He=Z)}catch{continue}}const Pe=N0(He);if(tn(He)&&(x==="picture"||x==="picture-card"||x==="picture-circle")){const Ge=await A0(He);Pe.thumbUrl=Ge}ce&&(Pe.status="uploading",Pe.percent=0,we.push(Pe)),se.push(Pe)}if(se.length!==0){p===1?(G.current.forEach(ie=>ie.abort()),G.current.clear(),q(()=>se)):q(ie=>[...ie,...se]);for(const ie of we)K(ie)}},[a,D.length,x,p,q,K]);i.useEffect(()=>{const ee=_.current;if(!ee||g)return;const ae=se=>{const we=Array.from(se.clipboardData?.files||[]);we.length!==0&&(se.preventDefault(),re(v?we:[we[0]]))};return ee.addEventListener("paste",ae),()=>ee.removeEventListener("paste",ae)},[g,v,re]),i.useImperativeHandle(o,()=>({upload:ee=>{if(ee){if(!ee.status&&ee.originFileObj){const ae={...ee,status:"uploading",percent:0};q(se=>se.map(we=>we.uid===ee.uid?ae:we),ae),K(ae)}}else{const ae=O.current.filter(se=>!se.status&&se.originFileObj);if(ae.length===0)return;q(se=>se.map(we=>!we.status&&we.originFileObj?{...we,status:"uploading",percent:0}:we));for(const se of ae)K({...se,status:"uploading",percent:0})}},nativeElement:_.current}));const Te=i.useCallback(ee=>{const ae=Array.from(ee.target.files||[]);ae.length>0&&re(ae),X.current&&(X.current.value="")},[re]),Ce=i.useCallback(()=>{g||!C||X.current?.click()},[g,C]),Le=i.useCallback(async ee=>{if($){const se=$(ee);if(se===!1)return;if(se&&typeof se=="object"&&typeof se.then=="function")try{if(await se===!1)return}catch{return}}const ae=G.current.get(ee.uid);ae&&(ae.abort(),G.current.delete(ee.uid)),q(se=>se.filter(we=>we.uid!==ee.uid),{...ee,status:"removed"})},[$,q]),ue=i.useCallback(ee=>{ee.preventDefault(),ee.stopPropagation(),!g&&(Q.current+=1,Q.current===1&&le(!0))},[g]),ze=i.useCallback(ee=>{ee.preventDefault(),ee.stopPropagation()},[]),xe=i.useCallback(ee=>{ee.preventDefault(),ee.stopPropagation(),Q.current-=1,Q.current===0&&le(!1)},[]),ge=i.useCallback(ee=>{if(ee.preventDefault(),ee.stopPropagation(),Q.current=0,le(!1),g)return;I?.(ee);const ae=Array.from(ee.dataTransfer.files);if(ae.length>0){const se=s?ae.filter(we=>s.split(",").map(ce=>ce.trim()).some(ce=>ce.startsWith(".")?we.name.toLowerCase().endsWith(ce.toLowerCase()):ce.endsWith("/*")?we.type.startsWith(ce.replace("/*","/")):we.type===ce)):ae;se.length>0&&re(v?se:[se[0]])}},[s,g,v,I,re]),Ie=x==="picture-card"||x==="picture-circle",De=Ie&&p!==void 0&&D.filter(ee=>ee.status!=="removed").length>=p,Ae=t.jsx("input",{ref:X,type:"file",accept:s,multiple:v,style:{display:"none"},onChange:Te,...h?{webkitdirectory:"",mozdirectory:"",directory:""}:{}}),Re=()=>{if(De)return null;if(M)return t.jsx("div",{className:Ve(z?.dragger,z?.trigger),style:V({border:`1px dashed ${N?n.colorPrimary:n.colorBorder}`,borderRadius:"0.5rem",padding:"1.25rem 0",textAlign:"center",cursor:g?"not-allowed":"pointer",backgroundColor:N?"rgba(22,119,255,0.04)":n.colorBgSubtle,transition:"border-color 0.2s, background-color 0.2s",opacity:g?.5:1},A?.dragger,A?.trigger),onClick:Ce,onDragEnter:ue,onDragOver:ze,onDragLeave:xe,onDrop:ge,children:P||t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"0.5rem"},children:[t.jsx(I0,{size:48,color:n.colorPrimary}),t.jsx("span",{style:{fontSize:"1rem",color:n.colorText},children:"Click or drag file to this area to upload"}),t.jsx("span",{style:{fontSize:"0.875rem",color:n.colorTextMuted},children:"Support for a single or bulk upload."})]})});if(Ie){const ee="6.5rem",ae=x==="picture-circle"?"50%":"0.5rem";return t.jsx("div",{className:z?.trigger,style:V({width:ee,height:ee,border:`1px dashed ${n.colorBorder}`,borderRadius:ae,display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",cursor:g?"not-allowed":"pointer",backgroundColor:n.colorBgSubtle,transition:"border-color 0.2s",verticalAlign:"top",gap:"0.25rem",opacity:g?.5:1,color:n.colorTextMuted},A?.trigger),onClick:Ce,onMouseEnter:se=>{g||(se.currentTarget.style.borderColor=n.colorPrimary)},onMouseLeave:se=>{se.currentTarget.style.borderColor=n.colorBorder},children:P||t.jsxs(t.Fragment,{children:[t.jsx($0,{}),t.jsx("span",{style:{fontSize:"0.875rem"},children:"Upload"})]})})}return P?t.jsx("div",{className:z?.trigger,style:V({display:"inline-block",alignSelf:"flex-start",cursor:g?"not-allowed":"pointer",opacity:g?.5:1},A?.trigger),onClick:Ce,children:P}):null},ke=()=>oe===!1?null:t.jsx(K0,{files:D,listType:x,showConfig:oe,disabled:g,progress:k,itemRender:B,fullFileList:D,onRemove:Le,onPreview:S,onDownload:L,listStyle:A?.list,listClassName:z?.list,itemStyle:A?.item,itemClassName:z?.item,actionsStyle:A?.itemActions,actionsClassName:z?.itemActions,thumbnailStyle:A?.thumbnail,thumbnailClassName:z?.thumbnail});return Ie?t.jsxs("div",{ref:_,tabIndex:0,className:Ve(E,z?.root),style:V({display:"flex",flexWrap:"wrap",gap:"0.5rem",outline:"none"},A?.root,H),children:[Ae,ke(),Re()]}):t.jsxs("div",{ref:_,tabIndex:0,className:Ve(E,z?.root),style:V({display:"flex",flexDirection:"column",gap:"0.5rem",outline:"none"},A?.root,H),children:[Ae,Re(),ke()]})}),_0=i.forwardRef(function(r,o){return t.jsx(xi,{...r,listType:"text",_dragger:!0,ref:o})}),X0=Object.assign(xi,{Dragger:_0,LIST_IGNORE:mi});function G0({size:e=16}){return t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",children:t.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"})})}const U0={small:24,default:32,large:40},q0={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1600},So=["xxl","xl","lg","md","sm","xs"];function Q0(e){return typeof e=="object"&&e!==null}function yi(e,r){if(typeof e=="number")return e;if(typeof e=="string")return U0[e]??32;if(r!==void 0){for(const o of So)if(r>=q0[o]&&e[o]!==void 0)return e[o]}for(let o=So.length-1;o>=0;o--){const s=So[o];if(e[s]!==void 0)return e[s]}return 32}function Ho(e){return`${e/16}rem`}function Z0(e){const[r,o]=i.useState(()=>typeof window<"u"?window.innerWidth:1200);return i.useEffect(()=>{if(!e||typeof window>"u")return;const s=()=>o(window.innerWidth);return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[e]),r}const bi=i.createContext({});function vi({src:e,srcSet:r,alt:o,icon:s,shape:l,size:a,gap:c=4,draggable:u=!0,crossOrigin:f,onError:d,children:h,className:g,style:m,classNames:x,styles:p}){const b=i.useContext(bi),v=l??b.shape??"circle",j=a??b.size??"default",C=Q0(j),w=Z0(C),[y,k]=i.useState(!1),[B,R]=i.useState(1),S=i.useRef(null),L=i.useRef(null);i.useEffect(()=>{k(!1)},[e]),i.useEffect(()=>{if(!L.current||!S.current||e&&!y)return;const D=S.current.offsetWidth,T=L.current.offsetWidth,O=D-c*2;O<=0?R(1):T>O?R(O/T):R(1)},[h,e,y,c,j,w]);const $=()=>{d&&d()===!1||k(!0)},I=yi(j,C?w:void 0),P=Ho(I),E=v==="circle"?"50%":"0.5rem",H=Ho(I*.5),z=Math.round(I*.55),A=e&&!y,M=!A&&s,W=!A&&!M&&h,F=V({display:"inline-flex",alignItems:"center",justifyContent:"center",width:P,height:P,borderRadius:E,backgroundColor:n.colorBgMuted,color:n.colorTextMuted,fontSize:H,fontWeight:500,overflow:"hidden",whiteSpace:"nowrap",verticalAlign:"middle",position:"relative"},p?.root,m);return t.jsxs("span",{ref:S,className:Ve(g,x?.root),style:F,children:[A&&t.jsx("img",{src:e,srcSet:r,alt:o,draggable:u,crossOrigin:f||void 0,className:x?.image,style:V({width:"100%",height:"100%",objectFit:"cover"},p?.image),onError:$}),M&&t.jsx("span",{className:x?.icon,style:V({display:"inline-flex",alignItems:"center",justifyContent:"center"},p?.icon),children:s}),W&&t.jsx("span",{ref:L,className:x?.text,style:V({display:"inline-block",transform:B!==1?`scale(${B})`:void 0,transformOrigin:"center",lineHeight:1,userSelect:"none"},p?.text),children:h}),!A&&!M&&!W&&t.jsx(G0,{size:z})]})}function J0({max:e,size:r="default",shape:o="circle",children:s,className:l,style:a}){const c=i.Children.toArray(s),u=e?.count,f=u!==void 0&&u<c.length?u:c.length,d=c.slice(0,f),h=c.length-f,g=yi(r),m=Ho(Math.round(g*-.3));return t.jsx(bi.Provider,{value:{size:r,shape:o},children:t.jsxs("div",{className:l,style:{display:"inline-flex",alignItems:"center",...a},children:[d.map((x,p)=>t.jsx("span",{style:{marginInlineStart:p===0?void 0:m,position:"relative",zIndex:f-p,display:"inline-flex",padding:"0.125rem",backgroundColor:n.colorBg,borderRadius:o==="circle"?"50%":"0.625rem"},children:x},p)),h>0&&t.jsx("span",{style:{marginInlineStart:m,position:"relative",zIndex:0,display:"inline-flex",padding:"0.125rem",backgroundColor:n.colorBg,borderRadius:o==="circle"?"50%":"0.625rem"},children:t.jsxs(vi,{size:r,shape:o,style:e?.style,children:["+",h]})})]})})}const e1=Object.assign(vi,{Group:J0}),Dr=new Uint8Array(512),Fo=new Uint8Array(256);(()=>{let e=1;for(let r=0;r<255;r++)Dr[r]=e,Fo[e]=r,e=e<<1^(e&128?285:0),e&=255;for(let r=255;r<512;r++)Dr[r]=Dr[r-255]})();function Ci(e,r){return e===0||r===0?0:Dr[Fo[e]+Fo[r]]}function t1(e){let r=new Uint8Array([1]);for(let o=0;o<e;o++){const s=new Uint8Array(r.length+1),l=Dr[o];for(let a=0;a<r.length;a++)s[a]^=r[a],s[a+1]^=Ci(r[a],l);r=s}return r}function r1(e,r){const o=t1(r),s=new Uint8Array(e.length+r);s.set(e);for(let l=0;l<e.length;l++){const a=s[l];if(a!==0)for(let c=0;c<o.length;c++)s[l+c]^=Ci(o[c],a)}return s.slice(e.length)}const rn={L:0,M:1,Q:2,H:3},ki=[[],[[1,19,0,0,7],[1,16,0,0,10],[1,13,0,0,13],[1,9,0,0,17]],[[1,34,0,0,10],[1,28,0,0,16],[1,22,0,0,22],[1,16,0,0,28]],[[1,55,0,0,15],[1,44,0,0,26],[2,17,0,0,18],[2,13,0,0,22]],[[1,80,0,0,20],[2,32,0,0,18],[2,24,0,0,26],[4,9,0,0,16]],[[1,108,0,0,26],[2,43,0,0,24],[2,15,2,16,18],[2,11,2,12,22]],[[2,68,0,0,18],[4,27,0,0,16],[4,19,0,0,24],[4,15,0,0,28]],[[2,78,0,0,20],[4,31,0,0,18],[2,14,4,15,18],[4,13,1,14,26]],[[2,97,0,0,24],[2,38,2,39,22],[4,18,2,19,22],[4,14,2,15,26]],[[2,116,0,0,30],[3,36,2,37,22],[4,16,4,17,20],[4,12,4,13,24]],[[2,68,2,69,18],[4,43,1,44,26],[6,19,2,20,24],[6,15,2,16,28]],[[4,81,0,0,20],[1,50,4,51,30],[4,22,4,23,28],[3,12,8,13,24]],[[2,92,2,93,24],[6,36,2,37,22],[4,20,6,21,26],[7,14,4,15,28]],[[4,107,0,0,26],[8,37,1,38,22],[8,20,4,21,24],[12,11,4,12,22]],[[3,115,1,116,30],[4,40,5,41,24],[11,16,5,17,20],[11,12,5,13,24]],[[5,87,1,88,22],[5,41,5,42,24],[5,24,7,25,30],[11,12,7,13,24]],[[5,98,1,99,24],[7,45,3,46,28],[15,19,2,20,24],[3,15,13,16,30]],[[1,107,5,108,28],[10,46,1,47,28],[1,22,15,23,28],[2,14,17,15,28]],[[5,120,1,121,30],[9,43,4,44,26],[17,22,1,23,28],[2,14,19,15,28]],[[3,113,4,114,28],[3,44,11,45,26],[17,21,4,22,26],[9,13,16,14,26]],[[3,107,5,108,28],[3,41,13,42,26],[15,24,5,25,30],[15,15,10,16,28]],[[4,116,4,117,28],[17,42,0,0,26],[17,22,6,23,28],[19,16,6,17,30]],[[2,111,7,112,28],[17,46,0,0,28],[7,24,16,25,30],[34,13,0,0,24]],[[4,121,5,122,30],[4,47,14,48,28],[11,24,14,25,30],[16,15,14,16,30]],[[6,117,4,118,30],[6,45,14,46,28],[11,24,16,25,30],[30,16,2,17,30]],[[8,106,4,107,26],[8,47,13,48,28],[7,24,22,25,30],[22,15,13,16,30]],[[10,114,2,115,28],[19,46,4,47,28],[28,22,6,23,28],[33,16,4,17,30]],[[8,122,4,123,30],[22,45,3,46,28],[8,23,26,24,30],[12,15,28,16,30]],[[3,117,10,118,30],[3,45,23,46,28],[4,24,31,25,30],[11,15,31,16,30]],[[7,116,7,117,30],[21,45,7,46,28],[1,23,37,24,30],[19,15,26,16,30]],[[5,115,10,116,30],[19,47,10,48,28],[15,24,25,25,30],[23,15,25,16,30]],[[13,115,3,116,30],[2,46,29,47,28],[42,24,1,25,30],[23,15,28,16,30]],[[17,115,0,0,30],[10,46,23,47,28],[10,24,35,25,30],[19,15,35,16,30]],[[17,115,1,116,30],[14,46,21,47,28],[29,24,19,25,30],[11,15,46,16,30]],[[13,115,6,116,30],[14,46,23,47,28],[44,24,7,25,30],[59,16,1,17,30]],[[12,121,7,122,30],[12,47,26,48,28],[39,24,14,25,30],[22,15,41,16,30]],[[6,121,14,122,30],[6,47,34,48,28],[46,24,10,25,30],[2,15,64,16,30]],[[17,122,4,123,30],[29,46,14,47,28],[49,24,10,25,30],[24,15,46,16,30]],[[4,122,18,123,30],[13,46,32,47,28],[48,24,14,25,30],[42,15,32,16,30]],[[20,117,4,118,30],[40,47,7,48,28],[43,24,22,25,30],[10,15,67,16,30]],[[19,118,6,119,30],[18,47,31,48,28],[34,24,34,25,30],[20,15,61,16,30]]],o1=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706],n1=[[],[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]];function s1(e){return new TextEncoder().encode(e)}function i1(e,r){const o=rn[r],s=ki[e][o],[l,a,c,u]=s;return l*a+c*u}function l1(e,r){for(let o=1;o<=40;o++){const a=4+(o<=9?8:16)+e*8,c=Math.ceil(a/8),u=i1(o,r);if(c<=u)return o}return-1}function a1(e,r){const o=s1(e),s=l1(o.length,r);if(s===-1)throw new Error("Data too large for QR code");const l=rn[r],a=ki[s][l],[c,u,f,d,h]=a,g=c*u+f*d,m=s<=9?8:16,x=[];x.push(0,1,0,0);for(let L=m-1;L>=0;L--)x.push(o.length>>L&1);for(const L of o)for(let $=7;$>=0;$--)x.push(L>>$&1);const p=g*8,b=Math.min(4,p-x.length);for(let L=0;L<b;L++)x.push(0);for(;x.length%8!==0;)x.push(0);const v=new Uint8Array(g);for(let L=0;L<x.length/8;L++){let $=0;for(let I=0;I<8;I++)$=$<<1|x[L*8+I];v[L]=$}let j=x.length/8,C=0;for(;j<g;)v[j]=C===0?236:17,C^=1,j++;const w=[];let y=0;for(let L=0;L<c;L++)w.push(v.slice(y,y+u)),y+=u;for(let L=0;L<f;L++)w.push(v.slice(y,y+d)),y+=d;const k=w.map(L=>r1(L,h)),B=Math.max(u,d||0),R=[];for(let L=0;L<B;L++)for(const $ of w)L<$.length&&R.push($[L]);for(let L=0;L<h;L++)for(const $ of k)L<$.length&&R.push($[L]);const S=o1[s];for(;R.length<S;)R.push(0);return{version:s,codewords:new Uint8Array(R)}}function c1(e){const r=Array.from({length:e},()=>Array(e).fill(!1)),o=Array.from({length:e},()=>Array(e).fill(!1));return{matrix:r,reserved:o}}function Mo(e,r,o,s){for(let l=-1;l<=7;l++)for(let a=-1;a<=7;a++){const c=o+l,u=s+a;c<0||c>=e.length||u<0||u>=e.length||(r[c][u]=!0,l===-1||l===7||a===-1||a===7?e[c][u]=!1:l===0||l===6||a===0||a===6||l>=2&&l<=4&&a>=2&&a<=4?e[c][u]=!0:e[c][u]=!1)}}function d1(e,r){const o=e.length;Mo(e,r,0,0),Mo(e,r,0,o-7),Mo(e,r,o-7,0)}function u1(e,r,o){if(o<2)return;const s=n1[o];for(const l of s)for(const a of s)if(!(l<9&&a<9)&&!(l<9&&a>e.length-9)&&!(l>e.length-9&&a<9))for(let c=-2;c<=2;c++)for(let u=-2;u<=2;u++){const f=l+c,d=a+u;r[f][d]=!0,Math.abs(c)===2||Math.abs(u)===2||c===0&&u===0?e[f][d]=!0:e[f][d]=!1}}function f1(e,r){const o=e.length;for(let s=8;s<o-8;s++)r[6][s]||(e[6][s]=s%2===0,r[6][s]=!0),r[s][6]||(e[s][6]=s%2===0,r[s][6]=!0)}function h1(e,r){const o=e.length;for(let s=0;s<=8;s++)r[8][s]||(r[8][s]=!0),r[s][8]||(r[s][8]=!0);for(let s=0;s<=7;s++)r[8][o-1-s]||(r[8][o-1-s]=!0);for(let s=0;s<=7;s++)r[o-1-s][8]||(r[o-1-s][8]=!0);e[o-8][8]=!0,r[o-8][8]=!0}function p1(e,r,o){if(o<7)return;const s=e.length;for(let l=0;l<6;l++)for(let a=0;a<3;a++)r[s-11+a][l]=!0;for(let l=0;l<6;l++)for(let a=0;a<3;a++)r[l][s-11+a]=!0}function g1(e,r,o){const s=e.length;let l=0;const a=o.length*8;let c=!0;for(let u=s-1;u>=1;u-=2){u===6&&(u=5);for(let f=0;f<s;f++){const d=c?s-1-f:f;for(let h=0;h<=1;h++){const g=u-h;if(!r[d][g]&&l<a){const m=l>>3,x=7-(l&7);e[d][g]=(o[m]>>x&1)===1,l++}}}c=!c}}const m1=[(e,r)=>(e+r)%2===0,e=>e%2===0,(e,r)=>r%3===0,(e,r)=>(e+r)%3===0,(e,r)=>(Math.floor(e/2)+Math.floor(r/3))%2===0,(e,r)=>e*r%2+e*r%3===0,(e,r)=>(e*r%2+e*r%3)%2===0,(e,r)=>((e+r)%2+e*r%3)%2===0];function x1(e,r,o){const s=e.length,l=e.map(c=>[...c]),a=m1[o];for(let c=0;c<s;c++)for(let u=0;u<s;u++)!r[c][u]&&a(c,u)&&(l[c][u]=!l[c][u]);return l}function y1(e){const r=e.length;let o=0;for(let d=0;d<r;d++){let h=1;for(let g=1;g<r;g++)e[d][g]===e[d][g-1]?h++:(h>=5&&(o+=h-2),h=1);h>=5&&(o+=h-2)}for(let d=0;d<r;d++){let h=1;for(let g=1;g<r;g++)e[g][d]===e[g-1][d]?h++:(h>=5&&(o+=h-2),h=1);h>=5&&(o+=h-2)}for(let d=0;d<r-1;d++)for(let h=0;h<r-1;h++){const g=e[d][h];g===e[d][h+1]&&g===e[d+1][h]&&g===e[d+1][h+1]&&(o+=3)}const s=[!0,!1,!0,!0,!0,!1,!0,!1,!1,!1,!1],l=[!1,!1,!1,!1,!0,!1,!0,!0,!0,!1,!0];for(let d=0;d<r;d++)for(let h=0;h<=r-11;h++){let g=!0,m=!0;for(let x=0;x<11;x++)e[d][h+x]!==s[x]&&(g=!1),e[d][h+x]!==l[x]&&(m=!1);(g||m)&&(o+=40)}for(let d=0;d<r;d++)for(let h=0;h<=r-11;h++){let g=!0,m=!0;for(let x=0;x<11;x++)e[h+x][d]!==s[x]&&(g=!1),e[h+x][d]!==l[x]&&(m=!1);(g||m)&&(o+=40)}let a=0;for(let d=0;d<r;d++)for(let h=0;h<r;h++)e[d][h]&&a++;const c=a*100/(r*r),u=Math.floor(c/5)*5,f=u+5;return o+=Math.min(Math.abs(u-50)/5,Math.abs(f-50)/5)*10,o}function b1(e,r){let o=1/0,s=0,l=e;for(let a=0;a<8;a++){const c=x1(e,r,a),u=y1(c);u<o&&(o=u,s=a,l=c)}return{maskIndex:s,maskedMatrix:l}}const v1=21522;function C1(e){let r=e<<10,o=1335;for(let s=4;s>=0;s--)r&1<<s+10&&(r^=o<<s);return(e<<10|r)^v1}function k1(e){let r=e<<12,o=7973;for(let s=5;s>=0;s--)r&1<<s+12&&(r^=o<<s);return e<<12|r}function w1(e,r,o){const s=e.length,l=[1,0,3,2][rn[r]],a=C1(l<<3|o),c=[[0,8],[1,8],[2,8],[3,8],[4,8],[5,8],[7,8],[8,8],[8,7],[8,5],[8,4],[8,3],[8,2],[8,1],[8,0]],u=[[8,s-1],[8,s-2],[8,s-3],[8,s-4],[8,s-5],[8,s-6],[8,s-7],[8,s-8],[s-7,8],[s-6,8],[s-5,8],[s-4,8],[s-3,8],[s-2,8],[s-1,8]];for(let f=0;f<15;f++){const d=(a>>f&1)===1,[h,g]=c[f];e[h][g]=d;const[m,x]=u[f];e[m][x]=d}}function j1(e,r){if(r<7)return;const o=e.length,s=k1(r);for(let l=0;l<18;l++){const a=(s>>l&1)===1,c=Math.floor(l/3),u=l%3;e[o-11+u][c]=a,e[c][o-11+u]=a}}function S1(e,r="M"){if(!e)return[[!1]];const{version:o,codewords:s}=a1(e,r),l=o*4+17,{matrix:a,reserved:c}=c1(l);d1(a,c),u1(a,c,o),f1(a,c),h1(a,c),p1(a,c,o),g1(a,c,s);const{maskIndex:u,maskedMatrix:f}=b1(a,c);return w1(f,r,u),j1(f,o),f}function M1(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("polyline",{points:"23 4 23 10 17 10"}),t.jsx("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})]})}function B1(){return t.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:n.colorPrimary,strokeWidth:"2.5",strokeLinecap:"round",style:{animation:"j-qrcode-spin 0.8s linear infinite"},children:t.jsx("path",{d:"M12 2a10 10 0 0 1 10 10"})})}function R1(){return t.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:n.colorSuccess,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),t.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]})}function Fn(e){return typeof e=="number"?{iw:e,ih:e}:{iw:e.width,ih:e.height}}function Bo(e,r){if(!e.startsWith("var("))return e;const o=r.style.color;r.style.color=e;const s=getComputedStyle(r).color;return r.style.color=o,s}function T1({value:e,type:r="canvas",icon:o,size:s=160,iconSize:l=40,color:a=n.colorText,bgColor:c="transparent",marginSize:u=0,bordered:f=!0,errorLevel:d="M",status:h="active",statusRender:g,onRefresh:m,className:x,style:p,classNames:b,styles:v}){const j=i.useMemo(()=>S1(e,d),[e,d]),C=i.useRef(null),w=co();i.useEffect(()=>{if(r!=="canvas"||!C.current)return;const $=C.current,I=$.getContext("2d"),P=window.devicePixelRatio||1,E=j.length,H=E+u*2,z=s/H;$.width=s*P,$.height=s*P,I.setTransform(P,0,0,P,0,0);const A=Bo(a,$),M=c!=="transparent"?Bo(c,$):"transparent",W=M!=="transparent"?M:Bo(n.colorBg,$);I.clearRect(0,0,s,s),M!=="transparent"&&(I.fillStyle=M,I.fillRect(0,0,s,s)),I.fillStyle=A;for(let F=0;F<E;F++)for(let D=0;D<E;D++)if(j[F][D]){const T=Math.floor((D+u)*z),O=Math.floor((F+u)*z),Y=Math.floor((D+u+1)*z)-T,X=Math.floor((F+u+1)*z)-O;I.fillRect(T,O,Y,X)}if(o){let F=!1;const D=new Image;return D.crossOrigin="anonymous",D.onload=()=>{if(F)return;const{iw:T,ih:O}=Fn(l),Y=(s-T)/2,X=(s-O)/2;I.fillStyle=W,I.fillRect(Y-2,X-2,T+4,O+4),I.drawImage(D,Y,X,T,O)},D.src=o,()=>{F=!0}}},[j,s,a,c,u,o,l,r,w]);const y=i.useMemo(()=>{if(r!=="svg")return null;const $=j.length,I=$+u*2,P=s/I,{iw:E,ih:H}=Fn(l),z=(s-E)/2,A=(s-H)/2,M=[];for(let W=0;W<$;W++)for(let F=0;F<$;F++)if(j[W][F]){const D=Math.floor((F+u)*P),T=Math.floor((W+u)*P),O=Math.floor((F+u+1)*P)-D,Y=Math.floor((W+u+1)*P)-T;M.push(t.jsx("rect",{x:D,y:T,width:O,height:Y,fill:a},`${W}-${F}`))}return t.jsxs("svg",{className:b?.canvas,style:V({display:"block"},v?.canvas),width:s,height:s,viewBox:`0 0 ${s} ${s}`,xmlns:"http://www.w3.org/2000/svg",children:[c!=="transparent"&&t.jsx("rect",{x:0,y:0,width:s,height:s,fill:c}),M,o&&t.jsxs(t.Fragment,{children:[t.jsx("rect",{x:z-2,y:A-2,width:E+4,height:H+4,fill:c!=="transparent"?c:n.colorBg}),t.jsx("image",{href:o,x:z,y:A,width:E,height:H})]})]})},[j,s,a,c,u,o,l,r,b?.canvas,v?.canvas]),k={expired:"QR code expired",loading:"Loading...",scanned:"Scanned"},B={position:"absolute",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(255, 255, 255, 0.96)",borderRadius:"0.25rem"};let R=null;h!=="active"&&(g?R=t.jsx("div",{className:b?.mask,style:V(B,v?.mask),children:g({status:h,locale:k,onRefresh:m})}):h==="loading"?R=t.jsx("div",{className:b?.mask,style:V(B,v?.mask),children:t.jsx(B1,{})}):h==="expired"?R=t.jsxs("div",{className:b?.mask,style:V(B,v?.mask),children:[t.jsx("span",{style:{color:n.colorTextMuted,fontSize:"0.875rem",marginBottom:"0.5rem"},children:k.expired}),t.jsxs("button",{onClick:m,style:{display:"inline-flex",alignItems:"center",gap:"0.25rem",padding:"0.25rem 0.75rem",border:"none",borderRadius:"0.25rem",backgroundColor:n.colorPrimary,color:"#fff",fontSize:"0.875rem",cursor:"pointer",fontFamily:"inherit"},children:[t.jsx(M1,{})," Refresh"]})]}):h==="scanned"&&(R=t.jsxs("div",{className:b?.mask,style:V(B,v?.mask),children:[t.jsx(R1,{}),t.jsx("span",{style:{color:n.colorSuccess,fontSize:"0.875rem",marginTop:"0.5rem"},children:k.scanned})]})));const S={position:"relative",display:"inline-block",lineHeight:0,...f?{padding:"0.75rem",border:`1px solid ${n.colorBorder}`,borderRadius:"0.5rem",backgroundColor:n.colorBg}:{}},L=V(S,v?.root,p);return t.jsxs("div",{className:Ve(x,b?.root),style:L,children:[t.jsx("style",{children:"@keyframes j-qrcode-spin { to { transform: rotate(360deg); } }"}),t.jsxs("div",{style:{position:"relative",width:s,height:s},children:[r==="canvas"?t.jsx("canvas",{ref:C,className:b?.canvas,style:V({display:"block",width:s,height:s},v?.canvas)}):y,R]})]})}const I1=`
|
|
193
|
+
`,document.head.appendChild(e)}let Hn=0;function W0(){return Hn+=1,`j-upload-${Date.now()}-${Hn}`}const H0=/\.(jpe?g|png|gif|bmp|webp|svg|ico|avif|tiff?)$/i,F0=/^image\//i;function tn(e){return"type"in e&&e.type?F0.test(e.type):"name"in e&&e.name?H0.test(e.name):!1}function A0(e){return new Promise(r=>{if(!tn(e)){r("");return}const o=new FileReader;o.onload=()=>r(o.result),o.onerror=()=>r(""),o.readAsDataURL(e)})}function O0(e){const r=new XMLHttpRequest,o=new FormData;return e.data&&Object.entries(e.data).forEach(([s,l])=>{o.append(s,l)}),o.append(e.filename,e.file),r.open(e.method,e.action,!0),e.withCredentials&&(r.withCredentials=!0),e.headers&&Object.entries(e.headers).forEach(([s,l])=>{r.setRequestHeader(s,l)}),r.upload&&r.upload.addEventListener("progress",s=>{s.lengthComputable&&s.total>0&&e.onProgress({percent:s.loaded/s.total*100})}),r.addEventListener("error",()=>{e.onError(new Error("Upload error"))}),r.addEventListener("load",()=>{if(r.status<200||r.status>=300){e.onError(new Error(`Upload failed with status ${r.status}`),r.response);return}let s;try{s=JSON.parse(r.responseText)}catch{s=r.responseText}e.onSuccess(s,e.file)}),r.send(o),{abort(){r.abort()}}}function N0(e){return{uid:W0(),name:e.name,type:e.type,size:e.size,originFileObj:e}}function V0(e){return e===!1?!1:e===void 0||e===!0?{showPreviewIcon:!0,showRemoveIcon:!0,showDownloadIcon:!1}:{showPreviewIcon:e.showPreviewIcon!==!1,showRemoveIcon:e.showRemoveIcon!==!1,showDownloadIcon:e.showDownloadIcon??!1,previewIcon:e.previewIcon,removeIcon:e.removeIcon,downloadIcon:e.downloadIcon}}const mi="__LIST_IGNORE__";function Y0({file:e,listType:r,showConfig:o,disabled:s,progress:l,onRemove:a,onPreview:c,onDownload:u,itemStyle:f,itemClassName:d,actionsStyle:h,actionsClassName:g,thumbnailStyle:m,thumbnailClassName:x}){const p=i.useRef(null),b=i.useRef(null),v=r==="picture-card"||r==="picture-circle",j=e.status==="error",C=e.status==="done",w=e.status==="uploading",y=e.thumbUrl||e.url||e.preview||"",k=tn(e)||!!y,B=i.useCallback((L,P)=>L?typeof L=="function"?L(e):L:P,[e]),R=()=>c?.(e),S=()=>u?.(e),E=()=>{s||a(e)};if(v){const L="6.5rem",P=r==="picture-circle"?"50%":"0.5rem";return t.jsxs("div",{ref:p,className:d,style:V({position:"relative",width:L,height:L,border:`1px solid ${j?n.colorError:n.colorBorder}`,borderRadius:P,overflow:"hidden",display:"inline-flex",alignItems:"center",justifyContent:"center",backgroundColor:n.colorBgMuted,verticalAlign:"top"},f),onMouseEnter:()=>{b.current&&(b.current.style.opacity="1")},onMouseLeave:()=>{b.current&&(b.current.style.opacity="0")},children:[w?t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"0.5rem"},children:[t.jsx(zn,{size:24}),e.percent!==void 0&&t.jsx("span",{style:{fontSize:"0.75rem",color:n.colorTextMuted},children:l?.format?l.format(e.percent,e):`${Math.round(e.percent)}%`})]}):y?t.jsx("img",{src:y,alt:e.name,className:x,style:V({width:"100%",height:"100%",objectFit:"cover"},m),crossOrigin:e.crossOrigin}):t.jsxs("div",{className:x,style:V({display:"flex",flexDirection:"column",alignItems:"center",gap:"0.25rem",color:n.colorTextMuted},m),children:[k?t.jsx($n,{size:24}):t.jsx(En,{size:24}),t.jsx("span",{style:{fontSize:"0.6875rem",maxWidth:"5.5rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name})]}),j&&!w&&t.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,textAlign:"center",fontSize:"0.6875rem",padding:"0.125rem 0.25rem",backgroundColor:"rgba(255,77,79,0.1)",color:n.colorError},children:"Error"}),!w&&t.jsxs("div",{ref:b,className:g,style:V({position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",gap:"0.5rem",backgroundColor:"rgba(0,0,0,0.45)",opacity:0,transition:"opacity 0.2s",borderRadius:P},h),children:[o.showPreviewIcon&&(C||e.url||e.thumbUrl)&&t.jsx(Wt,{content:"Preview",children:t.jsx("button",{type:"button",onClick:R,style:{background:"none",border:"none",color:"#fff",cursor:"pointer",padding:"0.25rem",display:"flex",lineHeight:1},children:B(o.previewIcon,t.jsx(L0,{}))})}),o.showDownloadIcon&&C&&t.jsx(Wt,{content:"Download",children:t.jsx("button",{type:"button",onClick:S,style:{background:"none",border:"none",color:"#fff",cursor:"pointer",padding:"0.25rem",display:"flex",lineHeight:1},children:B(o.downloadIcon,t.jsx(Dn,{}))})}),o.showRemoveIcon&&!s&&t.jsx(Wt,{content:"Remove",children:t.jsx("button",{type:"button",onClick:E,style:{background:"none",border:"none",color:"#fff",cursor:"pointer",padding:"0.25rem",display:"flex",lineHeight:1},children:B(o.removeIcon,t.jsx(Pn,{}))})})]})]})}const $=r==="picture",I=!!f?.backgroundColor;return t.jsxs("div",{ref:p,className:d,style:V({display:"flex",alignItems:"center",gap:"0.5rem",padding:"0.25rem 0.5rem",borderRadius:"0.375rem",border:`1px solid ${j?n.colorError:n.colorBorder}`,backgroundColor:j?"rgba(255,77,79,0.04)":n.colorBgSubtle,transition:"background-color 0.2s, filter 0.2s",minHeight:$?"3.5rem":"2.25rem"},f),onMouseEnter:()=>{p.current&&!j&&(I?p.current.style.filter="brightness(1.15)":p.current.style.backgroundColor=n.colorBgMuted)},onMouseLeave:()=>{p.current&&!j&&(I?p.current.style.filter="none":p.current.style.backgroundColor=j?"rgba(255,77,79,0.04)":n.colorBgSubtle)},children:[$?y?t.jsx("img",{src:y,alt:e.name,className:x,style:V({width:"3rem",height:"3rem",objectFit:"cover",borderRadius:"0.25rem",flexShrink:0},m),crossOrigin:e.crossOrigin}):t.jsx("div",{className:x,style:V({width:"3rem",height:"3rem",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"0.25rem",backgroundColor:n.colorBgMuted,flexShrink:0,color:n.colorTextMuted},m),children:k?t.jsx($n,{size:20}):t.jsx(En,{size:20})}):t.jsx("span",{style:{flexShrink:0,display:"flex",color:j?n.colorError:n.colorTextMuted},children:t.jsx(P0,{})}),t.jsxs("div",{style:{flex:1,minWidth:0},children:[t.jsx(Wt,{content:e.name,children:t.jsx("span",{style:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"0.875rem",color:j?n.colorError:n.colorText,cursor:c?"pointer":void 0},onClick:c?R:void 0,children:e.name})}),w&&e.percent!==void 0&&t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.25rem",marginTop:"0.25rem"},children:[t.jsx("div",{style:{flex:1,height:l?.strokeWidth??2,borderRadius:(l?.strokeWidth??2)/2,backgroundColor:n.colorBorder,overflow:"hidden"},children:t.jsx("div",{style:{height:"100%",width:`${Math.min(e.percent,100)}%`,backgroundColor:l?.strokeColor??n.colorPrimary,borderRadius:(l?.strokeWidth??2)/2,transition:"width 0.3s"}})}),l?.format&&t.jsx("span",{style:{fontSize:"0.75rem",flexShrink:0,color:n.colorTextMuted},children:l.format(e.percent,e)})]})]}),w&&t.jsx("span",{style:{flexShrink:0,display:"flex",color:n.colorPrimary},children:t.jsx(zn,{})}),C&&t.jsx("span",{style:{flexShrink:0,display:"flex",color:n.colorSuccess},children:t.jsx(D0,{})}),j&&t.jsx("span",{style:{flexShrink:0,display:"flex",color:n.colorError},children:t.jsx(E0,{})}),t.jsxs("div",{className:g,style:V({display:"flex",gap:"0.25rem",flexShrink:0},h),children:[o.showDownloadIcon&&C&&t.jsx(Wt,{content:"Download",children:t.jsx("button",{type:"button",onClick:S,style:{background:"none",border:"none",color:n.colorTextMuted,cursor:"pointer",padding:"0.125rem",display:"flex",lineHeight:1},children:B(o.downloadIcon,t.jsx(Dn,{}))})}),o.showRemoveIcon&&!s&&t.jsx(Wt,{content:"Remove",children:t.jsx("button",{type:"button",onClick:E,style:{background:"none",border:"none",color:n.colorTextMuted,cursor:"pointer",padding:"0.125rem",display:"flex",lineHeight:1},children:B(o.removeIcon,t.jsx(Pn,{}))})})]})]})}function K0({files:e,listType:r,showConfig:o,disabled:s,progress:l,itemRender:a,fullFileList:c,onRemove:u,onPreview:f,onDownload:d,listStyle:h,listClassName:g,itemStyle:m,itemClassName:x,actionsStyle:p,actionsClassName:b,thumbnailStyle:v,thumbnailClassName:j}){const C=r==="picture-card"||r==="picture-circle",w=e.filter(y=>y.status!=="removed");return w.length===0?null:t.jsx("div",{className:g,style:V(C?{display:"flex",flexWrap:"wrap",gap:"0.5rem"}:{display:"flex",flexDirection:"column",gap:"0.5rem"},h),children:w.map(y=>{const k=t.jsx(Y0,{file:y,listType:r,showConfig:o,disabled:s,progress:l,onRemove:u,onPreview:f,onDownload:d,itemStyle:m,itemClassName:x,actionsStyle:p,actionsClassName:b,thumbnailStyle:v,thumbnailClassName:j},y.uid);return a?t.jsx(i.Fragment,{children:a(k,y,c,{download:()=>d?.(y),preview:()=>f?.(y),remove:()=>u(y)})},y.uid):k})})}const xi=i.forwardRef(function(r,o){const{accept:s,action:l,beforeUpload:a,customRequest:c,data:u,defaultFileList:f,fileList:d,directory:h=!1,disabled:g=!1,headers:m,listType:x="text",maxCount:p,method:b="post",multiple:v=!1,name:j="file",openFileDialogOnClick:C=!0,showUploadList:w,withCredentials:y=!1,progress:k,itemRender:B,onChange:R,onPreview:S,onDownload:E,onRemove:$,onDrop:I,children:L,className:P,style:H,classNames:z,styles:F,_dragger:M=!1}=r,[W,A]=i.useState(f||[]),D=d!==void 0?d:W,T=d!==void 0,O=i.useRef(D);O.current=D;const Y=i.useRef(R);Y.current=R;const X=i.useRef(null),K=i.useRef(null),G=i.useRef(new Map),Q=i.useRef(0),[N,le]=i.useState(!1),re=V0(w);i.useEffect(()=>{z0()},[]);const q=i.useCallback((ee,ae,se)=>{if(T){const Se=ee(O.current),ie=ae?Se.find(ce=>ce.uid===ae.uid)||ae:Se[Se.length-1];Y.current?.({file:ie,fileList:Se,event:se})}else A(Se=>{const ie=ee(Se),ce=ae?ie.find(He=>He.uid===ae.uid)||ae:ie[ie.length-1];return Y.current?.({file:ce,fileList:ie,event:se}),ie})},[T]),_=i.useCallback(async ee=>{const ae=ee.originFileObj;if(!ae)return;let se="";typeof l=="function"?se=await l(ee):l&&(se=l);let Se;typeof u=="function"?Se=await u(ee):Se=u;const ce=(c||O0)({action:se,filename:j,data:Se,file:ae,headers:m,withCredentials:y,method:b,onProgress:He=>{q(Pe=>Pe.map(Ge=>Ge.uid===ee.uid?{...Ge,status:"uploading",percent:He.percent}:Ge),{...ee,status:"uploading",percent:He.percent},He)},onSuccess:He=>{G.current.delete(ee.uid),q(Pe=>Pe.map(Ge=>Ge.uid===ee.uid?{...Ge,status:"done",percent:100,response:He}:Ge),{...ee,status:"done",percent:100,response:He})},onError:(He,Pe)=>{G.current.delete(ee.uid),q(Ge=>Ge.map(Ne=>Ne.uid===ee.uid?{...Ne,status:"error",error:He,response:Pe}:Ne),{...ee,status:"error",error:He,response:Pe})}});ce&&G.current.set(ee.uid,ce)},[l,c,u,j,m,b,q,y]),J=i.useCallback(async ee=>{let ae=ee;if(p!==void 0){const ie=D.length,ce=p-ie;if(p===1)ae=ae.slice(0,1);else{if(ce<=0)return;ae=ae.slice(0,ce)}}const se=[],Se=[];for(const ie of ae){let ce=!0,He=ie;if(a){const Ge=a(ie,ae);if(Ge===mi)continue;if(Ge===!1)ce=!1;else if(Ge&&typeof Ge=="object"&&typeof Ge.then=="function")try{const Ne=await Ge;Ne===!1?ce=!1:Ne instanceof File&&(He=Ne)}catch{continue}}const Pe=N0(He);if(tn(He)&&(x==="picture"||x==="picture-card"||x==="picture-circle")){const Ge=await A0(He);Pe.thumbUrl=Ge}ce&&(Pe.status="uploading",Pe.percent=0,Se.push(Pe)),se.push(Pe)}if(se.length!==0){p===1?(G.current.forEach(ie=>ie.abort()),G.current.clear(),q(()=>se)):q(ie=>[...ie,...se]);for(const ie of Se)_(ie)}},[a,D.length,x,p,q,_]);i.useEffect(()=>{const ee=K.current;if(!ee||g)return;const ae=se=>{const Se=Array.from(se.clipboardData?.files||[]);Se.length!==0&&(se.preventDefault(),J(v?Se:[Se[0]]))};return ee.addEventListener("paste",ae),()=>ee.removeEventListener("paste",ae)},[g,v,J]),i.useImperativeHandle(o,()=>({upload:ee=>{if(ee){if(!ee.status&&ee.originFileObj){const ae={...ee,status:"uploading",percent:0};q(se=>se.map(Se=>Se.uid===ee.uid?ae:Se),ae),_(ae)}}else{const ae=O.current.filter(se=>!se.status&&se.originFileObj);if(ae.length===0)return;q(se=>se.map(Se=>!Se.status&&Se.originFileObj?{...Se,status:"uploading",percent:0}:Se));for(const se of ae)_({...se,status:"uploading",percent:0})}},nativeElement:K.current}));const Te=i.useCallback(ee=>{const ae=Array.from(ee.target.files||[]);ae.length>0&&J(ae),X.current&&(X.current.value="")},[J]),ke=i.useCallback(()=>{g||!C||X.current?.click()},[g,C]),Ie=i.useCallback(async ee=>{if($){const se=$(ee);if(se===!1)return;if(se&&typeof se=="object"&&typeof se.then=="function")try{if(await se===!1)return}catch{return}}const ae=G.current.get(ee.uid);ae&&(ae.abort(),G.current.delete(ee.uid)),q(se=>se.filter(Se=>Se.uid!==ee.uid),{...ee,status:"removed"})},[$,q]),fe=i.useCallback(ee=>{ee.preventDefault(),ee.stopPropagation(),!g&&(Q.current+=1,Q.current===1&&le(!0))},[g]),ze=i.useCallback(ee=>{ee.preventDefault(),ee.stopPropagation()},[]),me=i.useCallback(ee=>{ee.preventDefault(),ee.stopPropagation(),Q.current-=1,Q.current===0&&le(!1)},[]),he=i.useCallback(ee=>{if(ee.preventDefault(),ee.stopPropagation(),Q.current=0,le(!1),g)return;I?.(ee);const ae=Array.from(ee.dataTransfer.files);if(ae.length>0){const se=s?ae.filter(Se=>s.split(",").map(ce=>ce.trim()).some(ce=>ce.startsWith(".")?Se.name.toLowerCase().endsWith(ce.toLowerCase()):ce.endsWith("/*")?Se.type.startsWith(ce.replace("/*","/")):Se.type===ce)):ae;se.length>0&&J(v?se:[se[0]])}},[s,g,v,I,J]),Le=x==="picture-card"||x==="picture-circle",De=Le&&p!==void 0&&D.filter(ee=>ee.status!=="removed").length>=p,Oe=t.jsx("input",{ref:X,type:"file",accept:s,multiple:v,style:{display:"none"},onChange:Te,...h?{webkitdirectory:"",mozdirectory:"",directory:""}:{}}),Be=()=>{if(De)return null;if(M)return t.jsx("div",{className:Ye(z?.dragger,z?.trigger),style:V({border:`1px dashed ${N?n.colorPrimary:n.colorBorder}`,borderRadius:"0.5rem",padding:"1.25rem 0",textAlign:"center",cursor:g?"not-allowed":"pointer",backgroundColor:N?"rgba(22,119,255,0.04)":n.colorBgSubtle,transition:"border-color 0.2s, background-color 0.2s",opacity:g?.5:1},F?.dragger,F?.trigger),onClick:ke,onDragEnter:fe,onDragOver:ze,onDragLeave:me,onDrop:he,children:L||t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"0.5rem"},children:[t.jsx(I0,{size:48,color:n.colorPrimary}),t.jsx("span",{style:{fontSize:"1rem",color:n.colorText},children:"Click or drag file to this area to upload"}),t.jsx("span",{style:{fontSize:"0.875rem",color:n.colorTextMuted},children:"Support for a single or bulk upload."})]})});if(Le){const ee="6.5rem",ae=x==="picture-circle"?"50%":"0.5rem";return t.jsx("div",{className:z?.trigger,style:V({width:ee,height:ee,border:`1px dashed ${n.colorBorder}`,borderRadius:ae,display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",cursor:g?"not-allowed":"pointer",backgroundColor:n.colorBgSubtle,transition:"border-color 0.2s",verticalAlign:"top",gap:"0.25rem",opacity:g?.5:1,color:n.colorTextMuted},F?.trigger),onClick:ke,onMouseEnter:se=>{g||(se.currentTarget.style.borderColor=n.colorPrimary)},onMouseLeave:se=>{se.currentTarget.style.borderColor=n.colorBorder},children:L||t.jsxs(t.Fragment,{children:[t.jsx($0,{}),t.jsx("span",{style:{fontSize:"0.875rem"},children:"Upload"})]})})}return L?t.jsx("div",{className:z?.trigger,style:V({display:"inline-block",alignSelf:"flex-start",cursor:g?"not-allowed":"pointer",opacity:g?.5:1},F?.trigger),onClick:ke,children:L}):null},we=()=>re===!1?null:t.jsx(K0,{files:D,listType:x,showConfig:re,disabled:g,progress:k,itemRender:B,fullFileList:D,onRemove:Ie,onPreview:S,onDownload:E,listStyle:F?.list,listClassName:z?.list,itemStyle:F?.item,itemClassName:z?.item,actionsStyle:F?.itemActions,actionsClassName:z?.itemActions,thumbnailStyle:F?.thumbnail,thumbnailClassName:z?.thumbnail});return Le?t.jsxs("div",{ref:K,tabIndex:0,className:Ye(P,z?.root),style:V({display:"flex",flexWrap:"wrap",gap:"0.5rem",outline:"none"},F?.root,H),children:[Oe,we(),Be()]}):t.jsxs("div",{ref:K,tabIndex:0,className:Ye(P,z?.root),style:V({display:"flex",flexDirection:"column",gap:"0.5rem",outline:"none"},F?.root,H),children:[Oe,Be(),we()]})}),_0=i.forwardRef(function(r,o){return t.jsx(xi,{...r,listType:"text",_dragger:!0,ref:o})}),X0=Object.assign(xi,{Dragger:_0,LIST_IGNORE:mi});function G0({size:e=16}){return t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",children:t.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"})})}const U0={small:24,default:32,large:40},q0={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1600},So=["xxl","xl","lg","md","sm","xs"];function Q0(e){return typeof e=="object"&&e!==null}function yi(e,r){if(typeof e=="number")return e;if(typeof e=="string")return U0[e]??32;if(r!==void 0){for(const o of So)if(r>=q0[o]&&e[o]!==void 0)return e[o]}for(let o=So.length-1;o>=0;o--){const s=So[o];if(e[s]!==void 0)return e[s]}return 32}function Ho(e){return`${e/16}rem`}function Z0(e){const[r,o]=i.useState(()=>typeof window<"u"?window.innerWidth:1200);return i.useEffect(()=>{if(!e||typeof window>"u")return;const s=()=>o(window.innerWidth);return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[e]),r}const bi=i.createContext({});function vi({src:e,srcSet:r,alt:o,icon:s,shape:l,size:a,gap:c=4,draggable:u=!0,crossOrigin:f,onError:d,children:h,className:g,style:m,classNames:x,styles:p}){const b=i.useContext(bi),v=l??b.shape??"circle",j=a??b.size??"default",C=Q0(j),w=Z0(C),[y,k]=i.useState(!1),[B,R]=i.useState(1),S=i.useRef(null),E=i.useRef(null);i.useEffect(()=>{k(!1)},[e]),i.useEffect(()=>{if(!E.current||!S.current||e&&!y)return;const D=S.current.offsetWidth,T=E.current.offsetWidth,O=D-c*2;O<=0?R(1):T>O?R(O/T):R(1)},[h,e,y,c,j,w]);const $=()=>{d&&d()===!1||k(!0)},I=yi(j,C?w:void 0),L=Ho(I),P=v==="circle"?"50%":"0.5rem",H=Ho(I*.5),z=Math.round(I*.55),F=e&&!y,M=!F&&s,W=!F&&!M&&h,A=V({display:"inline-flex",alignItems:"center",justifyContent:"center",width:L,height:L,borderRadius:P,backgroundColor:n.colorBgMuted,color:n.colorTextMuted,fontSize:H,fontWeight:500,overflow:"hidden",whiteSpace:"nowrap",verticalAlign:"middle",position:"relative"},p?.root,m);return t.jsxs("span",{ref:S,className:Ye(g,x?.root),style:A,children:[F&&t.jsx("img",{src:e,srcSet:r,alt:o,draggable:u,crossOrigin:f||void 0,className:x?.image,style:V({width:"100%",height:"100%",objectFit:"cover"},p?.image),onError:$}),M&&t.jsx("span",{className:x?.icon,style:V({display:"inline-flex",alignItems:"center",justifyContent:"center"},p?.icon),children:s}),W&&t.jsx("span",{ref:E,className:x?.text,style:V({display:"inline-block",transform:B!==1?`scale(${B})`:void 0,transformOrigin:"center",lineHeight:1,userSelect:"none"},p?.text),children:h}),!F&&!M&&!W&&t.jsx(G0,{size:z})]})}function J0({max:e,size:r="default",shape:o="circle",children:s,className:l,style:a}){const c=i.Children.toArray(s),u=e?.count,f=u!==void 0&&u<c.length?u:c.length,d=c.slice(0,f),h=c.length-f,g=yi(r),m=Ho(Math.round(g*-.3));return t.jsx(bi.Provider,{value:{size:r,shape:o},children:t.jsxs("div",{className:l,style:{display:"inline-flex",alignItems:"center",...a},children:[d.map((x,p)=>t.jsx("span",{style:{marginInlineStart:p===0?void 0:m,position:"relative",zIndex:f-p,display:"inline-flex",padding:"0.125rem",backgroundColor:n.colorBg,borderRadius:o==="circle"?"50%":"0.625rem"},children:x},p)),h>0&&t.jsx("span",{style:{marginInlineStart:m,position:"relative",zIndex:0,display:"inline-flex",padding:"0.125rem",backgroundColor:n.colorBg,borderRadius:o==="circle"?"50%":"0.625rem"},children:t.jsxs(vi,{size:r,shape:o,style:e?.style,children:["+",h]})})]})})}const e1=Object.assign(vi,{Group:J0}),Dr=new Uint8Array(512),Fo=new Uint8Array(256);(()=>{let e=1;for(let r=0;r<255;r++)Dr[r]=e,Fo[e]=r,e=e<<1^(e&128?285:0),e&=255;for(let r=255;r<512;r++)Dr[r]=Dr[r-255]})();function Ci(e,r){return e===0||r===0?0:Dr[Fo[e]+Fo[r]]}function t1(e){let r=new Uint8Array([1]);for(let o=0;o<e;o++){const s=new Uint8Array(r.length+1),l=Dr[o];for(let a=0;a<r.length;a++)s[a]^=r[a],s[a+1]^=Ci(r[a],l);r=s}return r}function r1(e,r){const o=t1(r),s=new Uint8Array(e.length+r);s.set(e);for(let l=0;l<e.length;l++){const a=s[l];if(a!==0)for(let c=0;c<o.length;c++)s[l+c]^=Ci(o[c],a)}return s.slice(e.length)}const rn={L:0,M:1,Q:2,H:3},ki=[[],[[1,19,0,0,7],[1,16,0,0,10],[1,13,0,0,13],[1,9,0,0,17]],[[1,34,0,0,10],[1,28,0,0,16],[1,22,0,0,22],[1,16,0,0,28]],[[1,55,0,0,15],[1,44,0,0,26],[2,17,0,0,18],[2,13,0,0,22]],[[1,80,0,0,20],[2,32,0,0,18],[2,24,0,0,26],[4,9,0,0,16]],[[1,108,0,0,26],[2,43,0,0,24],[2,15,2,16,18],[2,11,2,12,22]],[[2,68,0,0,18],[4,27,0,0,16],[4,19,0,0,24],[4,15,0,0,28]],[[2,78,0,0,20],[4,31,0,0,18],[2,14,4,15,18],[4,13,1,14,26]],[[2,97,0,0,24],[2,38,2,39,22],[4,18,2,19,22],[4,14,2,15,26]],[[2,116,0,0,30],[3,36,2,37,22],[4,16,4,17,20],[4,12,4,13,24]],[[2,68,2,69,18],[4,43,1,44,26],[6,19,2,20,24],[6,15,2,16,28]],[[4,81,0,0,20],[1,50,4,51,30],[4,22,4,23,28],[3,12,8,13,24]],[[2,92,2,93,24],[6,36,2,37,22],[4,20,6,21,26],[7,14,4,15,28]],[[4,107,0,0,26],[8,37,1,38,22],[8,20,4,21,24],[12,11,4,12,22]],[[3,115,1,116,30],[4,40,5,41,24],[11,16,5,17,20],[11,12,5,13,24]],[[5,87,1,88,22],[5,41,5,42,24],[5,24,7,25,30],[11,12,7,13,24]],[[5,98,1,99,24],[7,45,3,46,28],[15,19,2,20,24],[3,15,13,16,30]],[[1,107,5,108,28],[10,46,1,47,28],[1,22,15,23,28],[2,14,17,15,28]],[[5,120,1,121,30],[9,43,4,44,26],[17,22,1,23,28],[2,14,19,15,28]],[[3,113,4,114,28],[3,44,11,45,26],[17,21,4,22,26],[9,13,16,14,26]],[[3,107,5,108,28],[3,41,13,42,26],[15,24,5,25,30],[15,15,10,16,28]],[[4,116,4,117,28],[17,42,0,0,26],[17,22,6,23,28],[19,16,6,17,30]],[[2,111,7,112,28],[17,46,0,0,28],[7,24,16,25,30],[34,13,0,0,24]],[[4,121,5,122,30],[4,47,14,48,28],[11,24,14,25,30],[16,15,14,16,30]],[[6,117,4,118,30],[6,45,14,46,28],[11,24,16,25,30],[30,16,2,17,30]],[[8,106,4,107,26],[8,47,13,48,28],[7,24,22,25,30],[22,15,13,16,30]],[[10,114,2,115,28],[19,46,4,47,28],[28,22,6,23,28],[33,16,4,17,30]],[[8,122,4,123,30],[22,45,3,46,28],[8,23,26,24,30],[12,15,28,16,30]],[[3,117,10,118,30],[3,45,23,46,28],[4,24,31,25,30],[11,15,31,16,30]],[[7,116,7,117,30],[21,45,7,46,28],[1,23,37,24,30],[19,15,26,16,30]],[[5,115,10,116,30],[19,47,10,48,28],[15,24,25,25,30],[23,15,25,16,30]],[[13,115,3,116,30],[2,46,29,47,28],[42,24,1,25,30],[23,15,28,16,30]],[[17,115,0,0,30],[10,46,23,47,28],[10,24,35,25,30],[19,15,35,16,30]],[[17,115,1,116,30],[14,46,21,47,28],[29,24,19,25,30],[11,15,46,16,30]],[[13,115,6,116,30],[14,46,23,47,28],[44,24,7,25,30],[59,16,1,17,30]],[[12,121,7,122,30],[12,47,26,48,28],[39,24,14,25,30],[22,15,41,16,30]],[[6,121,14,122,30],[6,47,34,48,28],[46,24,10,25,30],[2,15,64,16,30]],[[17,122,4,123,30],[29,46,14,47,28],[49,24,10,25,30],[24,15,46,16,30]],[[4,122,18,123,30],[13,46,32,47,28],[48,24,14,25,30],[42,15,32,16,30]],[[20,117,4,118,30],[40,47,7,48,28],[43,24,22,25,30],[10,15,67,16,30]],[[19,118,6,119,30],[18,47,31,48,28],[34,24,34,25,30],[20,15,61,16,30]]],o1=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706],n1=[[],[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]];function s1(e){return new TextEncoder().encode(e)}function i1(e,r){const o=rn[r],s=ki[e][o],[l,a,c,u]=s;return l*a+c*u}function l1(e,r){for(let o=1;o<=40;o++){const a=4+(o<=9?8:16)+e*8,c=Math.ceil(a/8),u=i1(o,r);if(c<=u)return o}return-1}function a1(e,r){const o=s1(e),s=l1(o.length,r);if(s===-1)throw new Error("Data too large for QR code");const l=rn[r],a=ki[s][l],[c,u,f,d,h]=a,g=c*u+f*d,m=s<=9?8:16,x=[];x.push(0,1,0,0);for(let E=m-1;E>=0;E--)x.push(o.length>>E&1);for(const E of o)for(let $=7;$>=0;$--)x.push(E>>$&1);const p=g*8,b=Math.min(4,p-x.length);for(let E=0;E<b;E++)x.push(0);for(;x.length%8!==0;)x.push(0);const v=new Uint8Array(g);for(let E=0;E<x.length/8;E++){let $=0;for(let I=0;I<8;I++)$=$<<1|x[E*8+I];v[E]=$}let j=x.length/8,C=0;for(;j<g;)v[j]=C===0?236:17,C^=1,j++;const w=[];let y=0;for(let E=0;E<c;E++)w.push(v.slice(y,y+u)),y+=u;for(let E=0;E<f;E++)w.push(v.slice(y,y+d)),y+=d;const k=w.map(E=>r1(E,h)),B=Math.max(u,d||0),R=[];for(let E=0;E<B;E++)for(const $ of w)E<$.length&&R.push($[E]);for(let E=0;E<h;E++)for(const $ of k)E<$.length&&R.push($[E]);const S=o1[s];for(;R.length<S;)R.push(0);return{version:s,codewords:new Uint8Array(R)}}function c1(e){const r=Array.from({length:e},()=>Array(e).fill(!1)),o=Array.from({length:e},()=>Array(e).fill(!1));return{matrix:r,reserved:o}}function Mo(e,r,o,s){for(let l=-1;l<=7;l++)for(let a=-1;a<=7;a++){const c=o+l,u=s+a;c<0||c>=e.length||u<0||u>=e.length||(r[c][u]=!0,l===-1||l===7||a===-1||a===7?e[c][u]=!1:l===0||l===6||a===0||a===6||l>=2&&l<=4&&a>=2&&a<=4?e[c][u]=!0:e[c][u]=!1)}}function d1(e,r){const o=e.length;Mo(e,r,0,0),Mo(e,r,0,o-7),Mo(e,r,o-7,0)}function u1(e,r,o){if(o<2)return;const s=n1[o];for(const l of s)for(const a of s)if(!(l<9&&a<9)&&!(l<9&&a>e.length-9)&&!(l>e.length-9&&a<9))for(let c=-2;c<=2;c++)for(let u=-2;u<=2;u++){const f=l+c,d=a+u;r[f][d]=!0,Math.abs(c)===2||Math.abs(u)===2||c===0&&u===0?e[f][d]=!0:e[f][d]=!1}}function f1(e,r){const o=e.length;for(let s=8;s<o-8;s++)r[6][s]||(e[6][s]=s%2===0,r[6][s]=!0),r[s][6]||(e[s][6]=s%2===0,r[s][6]=!0)}function h1(e,r){const o=e.length;for(let s=0;s<=8;s++)r[8][s]||(r[8][s]=!0),r[s][8]||(r[s][8]=!0);for(let s=0;s<=7;s++)r[8][o-1-s]||(r[8][o-1-s]=!0);for(let s=0;s<=7;s++)r[o-1-s][8]||(r[o-1-s][8]=!0);e[o-8][8]=!0,r[o-8][8]=!0}function p1(e,r,o){if(o<7)return;const s=e.length;for(let l=0;l<6;l++)for(let a=0;a<3;a++)r[s-11+a][l]=!0;for(let l=0;l<6;l++)for(let a=0;a<3;a++)r[l][s-11+a]=!0}function g1(e,r,o){const s=e.length;let l=0;const a=o.length*8;let c=!0;for(let u=s-1;u>=1;u-=2){u===6&&(u=5);for(let f=0;f<s;f++){const d=c?s-1-f:f;for(let h=0;h<=1;h++){const g=u-h;if(!r[d][g]&&l<a){const m=l>>3,x=7-(l&7);e[d][g]=(o[m]>>x&1)===1,l++}}}c=!c}}const m1=[(e,r)=>(e+r)%2===0,e=>e%2===0,(e,r)=>r%3===0,(e,r)=>(e+r)%3===0,(e,r)=>(Math.floor(e/2)+Math.floor(r/3))%2===0,(e,r)=>e*r%2+e*r%3===0,(e,r)=>(e*r%2+e*r%3)%2===0,(e,r)=>((e+r)%2+e*r%3)%2===0];function x1(e,r,o){const s=e.length,l=e.map(c=>[...c]),a=m1[o];for(let c=0;c<s;c++)for(let u=0;u<s;u++)!r[c][u]&&a(c,u)&&(l[c][u]=!l[c][u]);return l}function y1(e){const r=e.length;let o=0;for(let d=0;d<r;d++){let h=1;for(let g=1;g<r;g++)e[d][g]===e[d][g-1]?h++:(h>=5&&(o+=h-2),h=1);h>=5&&(o+=h-2)}for(let d=0;d<r;d++){let h=1;for(let g=1;g<r;g++)e[g][d]===e[g-1][d]?h++:(h>=5&&(o+=h-2),h=1);h>=5&&(o+=h-2)}for(let d=0;d<r-1;d++)for(let h=0;h<r-1;h++){const g=e[d][h];g===e[d][h+1]&&g===e[d+1][h]&&g===e[d+1][h+1]&&(o+=3)}const s=[!0,!1,!0,!0,!0,!1,!0,!1,!1,!1,!1],l=[!1,!1,!1,!1,!0,!1,!0,!0,!0,!1,!0];for(let d=0;d<r;d++)for(let h=0;h<=r-11;h++){let g=!0,m=!0;for(let x=0;x<11;x++)e[d][h+x]!==s[x]&&(g=!1),e[d][h+x]!==l[x]&&(m=!1);(g||m)&&(o+=40)}for(let d=0;d<r;d++)for(let h=0;h<=r-11;h++){let g=!0,m=!0;for(let x=0;x<11;x++)e[h+x][d]!==s[x]&&(g=!1),e[h+x][d]!==l[x]&&(m=!1);(g||m)&&(o+=40)}let a=0;for(let d=0;d<r;d++)for(let h=0;h<r;h++)e[d][h]&&a++;const c=a*100/(r*r),u=Math.floor(c/5)*5,f=u+5;return o+=Math.min(Math.abs(u-50)/5,Math.abs(f-50)/5)*10,o}function b1(e,r){let o=1/0,s=0,l=e;for(let a=0;a<8;a++){const c=x1(e,r,a),u=y1(c);u<o&&(o=u,s=a,l=c)}return{maskIndex:s,maskedMatrix:l}}const v1=21522;function C1(e){let r=e<<10,o=1335;for(let s=4;s>=0;s--)r&1<<s+10&&(r^=o<<s);return(e<<10|r)^v1}function k1(e){let r=e<<12,o=7973;for(let s=5;s>=0;s--)r&1<<s+12&&(r^=o<<s);return e<<12|r}function w1(e,r,o){const s=e.length,l=[1,0,3,2][rn[r]],a=C1(l<<3|o),c=[[0,8],[1,8],[2,8],[3,8],[4,8],[5,8],[7,8],[8,8],[8,7],[8,5],[8,4],[8,3],[8,2],[8,1],[8,0]],u=[[8,s-1],[8,s-2],[8,s-3],[8,s-4],[8,s-5],[8,s-6],[8,s-7],[8,s-8],[s-7,8],[s-6,8],[s-5,8],[s-4,8],[s-3,8],[s-2,8],[s-1,8]];for(let f=0;f<15;f++){const d=(a>>f&1)===1,[h,g]=c[f];e[h][g]=d;const[m,x]=u[f];e[m][x]=d}}function j1(e,r){if(r<7)return;const o=e.length,s=k1(r);for(let l=0;l<18;l++){const a=(s>>l&1)===1,c=Math.floor(l/3),u=l%3;e[o-11+u][c]=a,e[c][o-11+u]=a}}function S1(e,r="M"){if(!e)return[[!1]];const{version:o,codewords:s}=a1(e,r),l=o*4+17,{matrix:a,reserved:c}=c1(l);d1(a,c),u1(a,c,o),f1(a,c),h1(a,c),p1(a,c,o),g1(a,c,s);const{maskIndex:u,maskedMatrix:f}=b1(a,c);return w1(f,r,u),j1(f,o),f}function M1(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("polyline",{points:"23 4 23 10 17 10"}),t.jsx("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})]})}function B1(){return t.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:n.colorPrimary,strokeWidth:"2.5",strokeLinecap:"round",style:{animation:"j-qrcode-spin 0.8s linear infinite"},children:t.jsx("path",{d:"M12 2a10 10 0 0 1 10 10"})})}function R1(){return t.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:n.colorSuccess,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),t.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]})}function Fn(e){return typeof e=="number"?{iw:e,ih:e}:{iw:e.width,ih:e.height}}function Bo(e,r){if(!e.startsWith("var("))return e;const o=r.style.color;r.style.color=e;const s=getComputedStyle(r).color;return r.style.color=o,s}function T1({value:e,type:r="canvas",icon:o,size:s=160,iconSize:l=40,color:a=n.colorText,bgColor:c="transparent",marginSize:u=0,bordered:f=!0,errorLevel:d="M",status:h="active",statusRender:g,onRefresh:m,className:x,style:p,classNames:b,styles:v}){const j=i.useMemo(()=>S1(e,d),[e,d]),C=i.useRef(null),w=co();i.useEffect(()=>{if(r!=="canvas"||!C.current)return;const $=C.current,I=$.getContext("2d"),L=window.devicePixelRatio||1,P=j.length,H=P+u*2,z=s/H;$.width=s*L,$.height=s*L,I.setTransform(L,0,0,L,0,0);const F=Bo(a,$),M=c!=="transparent"?Bo(c,$):"transparent",W=M!=="transparent"?M:Bo(n.colorBg,$);I.clearRect(0,0,s,s),M!=="transparent"&&(I.fillStyle=M,I.fillRect(0,0,s,s)),I.fillStyle=F;for(let A=0;A<P;A++)for(let D=0;D<P;D++)if(j[A][D]){const T=Math.floor((D+u)*z),O=Math.floor((A+u)*z),Y=Math.floor((D+u+1)*z)-T,X=Math.floor((A+u+1)*z)-O;I.fillRect(T,O,Y,X)}if(o){let A=!1;const D=new Image;return D.crossOrigin="anonymous",D.onload=()=>{if(A)return;const{iw:T,ih:O}=Fn(l),Y=(s-T)/2,X=(s-O)/2;I.fillStyle=W,I.fillRect(Y-2,X-2,T+4,O+4),I.drawImage(D,Y,X,T,O)},D.src=o,()=>{A=!0}}},[j,s,a,c,u,o,l,r,w]);const y=i.useMemo(()=>{if(r!=="svg")return null;const $=j.length,I=$+u*2,L=s/I,{iw:P,ih:H}=Fn(l),z=(s-P)/2,F=(s-H)/2,M=[];for(let W=0;W<$;W++)for(let A=0;A<$;A++)if(j[W][A]){const D=Math.floor((A+u)*L),T=Math.floor((W+u)*L),O=Math.floor((A+u+1)*L)-D,Y=Math.floor((W+u+1)*L)-T;M.push(t.jsx("rect",{x:D,y:T,width:O,height:Y,fill:a},`${W}-${A}`))}return t.jsxs("svg",{className:b?.canvas,style:V({display:"block"},v?.canvas),width:s,height:s,viewBox:`0 0 ${s} ${s}`,xmlns:"http://www.w3.org/2000/svg",children:[c!=="transparent"&&t.jsx("rect",{x:0,y:0,width:s,height:s,fill:c}),M,o&&t.jsxs(t.Fragment,{children:[t.jsx("rect",{x:z-2,y:F-2,width:P+4,height:H+4,fill:c!=="transparent"?c:n.colorBg}),t.jsx("image",{href:o,x:z,y:F,width:P,height:H})]})]})},[j,s,a,c,u,o,l,r,b?.canvas,v?.canvas]),k={expired:"QR code expired",loading:"Loading...",scanned:"Scanned"},B={position:"absolute",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(255, 255, 255, 0.96)",borderRadius:"0.25rem"};let R=null;h!=="active"&&(g?R=t.jsx("div",{className:b?.mask,style:V(B,v?.mask),children:g({status:h,locale:k,onRefresh:m})}):h==="loading"?R=t.jsx("div",{className:b?.mask,style:V(B,v?.mask),children:t.jsx(B1,{})}):h==="expired"?R=t.jsxs("div",{className:b?.mask,style:V(B,v?.mask),children:[t.jsx("span",{style:{color:n.colorTextMuted,fontSize:"0.875rem",marginBottom:"0.5rem"},children:k.expired}),t.jsxs("button",{onClick:m,style:{display:"inline-flex",alignItems:"center",gap:"0.25rem",padding:"0.25rem 0.75rem",border:"none",borderRadius:"0.25rem",backgroundColor:n.colorPrimary,color:"#fff",fontSize:"0.875rem",cursor:"pointer",fontFamily:"inherit"},children:[t.jsx(M1,{})," Refresh"]})]}):h==="scanned"&&(R=t.jsxs("div",{className:b?.mask,style:V(B,v?.mask),children:[t.jsx(R1,{}),t.jsx("span",{style:{color:n.colorSuccess,fontSize:"0.875rem",marginTop:"0.5rem"},children:k.scanned})]})));const S={position:"relative",display:"inline-block",lineHeight:0,...f?{padding:"0.75rem",border:`1px solid ${n.colorBorder}`,borderRadius:"0.5rem",backgroundColor:n.colorBg}:{}},E=V(S,v?.root,p);return t.jsxs("div",{className:Ye(x,b?.root),style:E,children:[t.jsx("style",{children:"@keyframes j-qrcode-spin { to { transform: rotate(360deg); } }"}),t.jsxs("div",{style:{position:"relative",width:s,height:s},children:[r==="canvas"?t.jsx("canvas",{ref:C,className:b?.canvas,style:V({display:"block",width:s,height:s},v?.canvas)}):y,R]})]})}const I1=`
|
|
194
194
|
@keyframes j-statistic-loading {
|
|
195
195
|
0%, 100% { opacity: 0.4; }
|
|
196
196
|
50% { opacity: 0.8; }
|
|
197
|
-
}`;let An=!1;function L1(){if(An||typeof document>"u")return;const e=document.createElement("style");e.textContent=I1,document.head.appendChild(e),An=!0}function E1(e,r,o=".",s=","){const l=typeof e=="string"?parseFloat(e):e;if(isNaN(l))return String(e);const a=r!==void 0?l.toFixed(r):String(l),[c,u]=a.split("."),f=c.replace(/\B(?=(\d{3})+(?!\d))/g,s);return u!==void 0?`${f}${o}${u}`:f}function $1(e,r){const o=Math.max(0,e),s=Math.floor(o/(1e3*60*60*24)),l=Math.floor(o%(1e3*60*60*24)/(1e3*60*60)),a=Math.floor(o%(1e3*60*60)/(1e3*60)),c=Math.floor(o%(1e3*60)/1e3),u=Math.floor(o%1e3),f=[];let d=r.replace(/\[([^\]]*)\]/g,(h,g)=>(f.push(g),`\0${f.length-1}\0`));return d=d.replace(/SSS|DD|D|HH|H|mm|m|ss|s/g,h=>{switch(h){case"SSS":return String(u).padStart(3,"0");case"DD":return String(s).padStart(2,"0");case"D":return String(s);case"HH":return String(l).padStart(2,"0");case"H":return String(l);case"mm":return String(a).padStart(2,"0");case"m":return String(a);case"ss":return String(c).padStart(2,"0");case"s":return String(c);default:return h}}),d.replace(/\x00(\d+)\x00/g,(h,g,m)=>{const x=f[Number(g)],p=x.indexOf("|");if(p===-1)return x;const v=d.slice(0,m).match(/(\d+)\s*$/);return(v?parseInt(v[1],10):0)===1?x.slice(0,p):x.slice(p+1)})}function P1({width:e="7rem"}){return L1(),t.jsx("span",{style:{display:"inline-block",width:e,height:"1.5rem",borderRadius:"0.25rem",backgroundColor:n.colorBgMuted,animation:"j-statistic-loading 1.5s ease-in-out infinite",verticalAlign:"middle"}})}const wi={marginBottom:"0.25rem",color:n.colorTextMuted,fontSize:"0.875rem",lineHeight:1.6},ji={color:n.colorText,fontSize:"1.5rem",fontWeight:600,fontFamily:"inherit",fontVariantNumeric:"tabular-nums",lineHeight:1.4},Si={marginRight:"0.25rem",display:"inline-flex",alignItems:"center"},Mi={marginLeft:"0.25rem",display:"inline-flex",alignItems:"center"};function D1({title:e,value:r=0,precision:o,decimalSeparator:s=".",groupSeparator:l=",",prefix:a,suffix:c,formatter:u,loading:f=!1,loadingWidth:d,className:h,style:g,classNames:m,styles:x}){const p=f?t.jsx(P1,{width:d}):u?u(r):E1(r,o,s,l);return t.jsxs("div",{className:Ve(h,m?.root),style:V({},x?.root,g),children:[e!=null&&t.jsx("div",{className:m?.title,style:V(wi,x?.title),children:e}),t.jsxs("div",{className:m?.content,style:V(ji,x?.content),children:[a!=null&&t.jsx("span",{className:m?.prefix,style:V(Si,x?.prefix),children:a}),t.jsx("span",{children:p}),c!=null&&t.jsx("span",{className:m?.suffix,style:V(Mi,x?.suffix),children:c})]})]})}function z1({title:e,value:r,format:o="HH:mm:ss",prefix:s,suffix:l,onFinish:a,onChange:c,className:u,style:f,classNames:d,styles:h}){const[g,m]=i.useState(()=>Math.max(0,r-Date.now())),x=i.useRef(a),p=i.useRef(c),b=i.useRef(!1);x.current=a,p.current=c,i.useEffect(()=>{b.current=!1;const j=()=>{const y=Math.max(0,r-Date.now());m(y),p.current?.(y),y<=0&&!b.current&&(b.current=!0,x.current?.())};j();const C=o.includes("SSS")?33:1e3,w=setInterval(j,C);return()=>clearInterval(w)},[r,o]);const v=$1(g,o);return t.jsxs("div",{className:Ve(u,d?.root),style:V({},h?.root,f),children:[e!=null&&t.jsx("div",{className:d?.title,style:V(wi,h?.title),children:e}),t.jsxs("div",{className:d?.content,style:V(ji,h?.content),children:[s!=null&&t.jsx("span",{className:d?.prefix,style:V(Si,h?.prefix),children:s}),t.jsx("span",{children:v}),l!=null&&t.jsx("span",{className:d?.suffix,style:V(Mi,h?.suffix),children:l})]})]})}const W1=Object.assign(D1,{Countdown:z1});function H1({order:e}){return t.jsxs("span",{style:{display:"inline-flex",flexDirection:"column",marginLeft:"0.25rem",gap:"0.0625rem",lineHeight:0},children:[t.jsx("svg",{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",style:{opacity:e==="ascend"?1:.3},children:t.jsx("path",{d:"M5 0.5L9 5.5H1L5 0.5Z",fill:"currentColor"})}),t.jsx("svg",{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",style:{opacity:e==="descend"?1:.3},children:t.jsx("path",{d:"M5 5.5L1 0.5H9L5 5.5Z",fill:"currentColor"})})]})}function On({expanded:e}){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",style:{transition:"transform 0.2s ease",transform:e?"rotate(90deg)":"rotate(0deg)",cursor:"pointer"},children:t.jsx("path",{d:"M3.5 2L7 5L3.5 8"})})}function F1({active:e}){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:e?n.colorPrimary:"none",stroke:e?n.colorPrimary:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",style:{opacity:e?1:.5},children:t.jsx("path",{d:"M1.5 2.5h9L7 6.5V10L5 9V6.5L1.5 2.5z"})})}function vr(e,r,o){return typeof o=="function"?o(e):e[o]??r}function Ao(e,r){if(r)return typeof r=="string"?e?.[r]:r.reduce((o,s)=>o?.[s],e)}function Dt(e,r){return e.key?e.key:typeof e.dataIndex=="string"?e.dataIndex:Array.isArray(e.dataIndex)?e.dataIndex.join("."):String(r)}function A1(e){return e.sorter?typeof e.sorter=="function"?e.sorter:typeof e.sorter=="object"&&"compare"in e.sorter?e.sorter.compare:(r,o)=>{const s=Ao(r,e.dataIndex),l=Ao(o,e.dataIndex);return s<l?-1:s>l?1:0}:null}function Oo(e){const r=[];for(const o of e)o.hidden||(o.children?.length?r.push(...Oo(o.children)):r.push(o));return r}function O1(e){function r(c){let u=1;for(const f of c)f.hidden||f.children?.length&&(u=Math.max(u,1+r(f.children)));return u}function o(c){let u=0;for(const f of c)f.hidden||(f.children?.length?u+=o(f.children):u++);return u}const s=r(e),l=Array.from({length:s},()=>[]);function a(c,u){for(const f of c)if(!f.hidden)if(f.children?.length){const d=o(f.children);d>0&&(l[u].push({column:f,colSpan:d,rowSpan:1,isLeaf:!1}),a(f.children,u+1))}else l[u].push({column:f,colSpan:1,rowSpan:s-u,isLeaf:!0})}return a(e,0),l}function Bi(e,r,o,s,l,a=0){const c=[];for(let u=0;u<e.length;u++){const f=e[u],d=f[r],h=Array.isArray(d)&&d.length>0;if(c.push({record:f,level:a,hasChildren:h}),h){const g=vr(f,u,l),m=o.has(g),x=s.has(g);if(m||x){const p=Bi(d,r,o,s,l,a+1);x&&!m&&p.forEach(b=>{b.exiting=!0}),c.push(...p)}}}return c}const N1={large:{cellPaddingV:"1rem",cellPaddingH:"1rem",fontSize:"0.875rem"},middle:{cellPaddingV:"0.625rem",cellPaddingH:"0.75rem",fontSize:"0.875rem"},small:{cellPaddingV:"0.375rem",cellPaddingH:"0.5rem",fontSize:"0.8125rem"}};function V1(){const e=i.useRef([]);return i.useEffect(()=>{let r;const o=performance.now(),s=l=>{const a=l-o;e.current.forEach((c,u)=>{if(!c)return;const f=(a/400+u*.33)%1,d=.5+.5*Math.sin(f*Math.PI);c.style.opacity=String(.3+.7*d),c.style.transform=`scale(${.8+.4*d})`}),r=requestAnimationFrame(s)};return r=requestAnimationFrame(s),()=>cancelAnimationFrame(r)},[]),t.jsx("div",{style:{display:"flex",gap:"0.375rem"},children:[0,1,2].map(r=>t.jsx("span",{ref:o=>{e.current[r]=o},style:{width:"0.5rem",height:"0.5rem",borderRadius:"50%",backgroundColor:n.colorPrimary}},r))})}function Y1({expanded:e,children:r}){const o=i.useRef(null),s=i.useRef(null),l=i.useRef(!1);i.useLayoutEffect(()=>{const c=o.current;if(!c)return;if(!l.current){l.current=!0,c.style.maxHeight=e?"none":"0px",c.style.opacity=e?"1":"0";return}const u=s.current;if(u)if(e){const f=u.scrollHeight;c.style.transition="none",c.style.maxHeight="0px",c.style.opacity="0",c.offsetHeight,c.style.transition="max-height 300ms ease, opacity 200ms ease",c.style.maxHeight=f+"px",c.style.opacity="1"}else{const f=u.scrollHeight;c.style.transition="none",c.style.maxHeight=f+"px",c.offsetHeight,c.style.transition="max-height 300ms ease, opacity 200ms ease",c.style.maxHeight="0px",c.style.opacity="0"}},[e]);const a=i.useCallback(c=>{c.propertyName==="max-height"&&e&&o.current&&(o.current.style.maxHeight="none")},[e]);return t.jsx("div",{ref:o,style:{overflow:"hidden"},onTransitionEnd:a,children:t.jsx("div",{ref:s,children:r})})}function K1({column:e,filterValues:r,rect:o,onConfirm:s,onReset:l,onClose:a}){const[c,u]=i.useState(r),[f,d]=i.useState(""),h=i.useRef(null);if(i.useEffect(()=>{const p=v=>{h.current&&!h.current.contains(v.target)&&(e.filterOnClose!==!1&&s(c),a())},b=v=>{v.key==="Escape"&&(e.filterOnClose!==!1&&s(c),a())};return document.addEventListener("mousedown",p),document.addEventListener("keydown",b),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",b)}},[c,s,a,e.filterOnClose]),e.filterDropdown){const p=typeof e.filterDropdown=="function"?e.filterDropdown({selectedKeys:c,setSelectedKeys:u,confirm:()=>{s(c),a()},clearFilters:()=>{u([]),l()},close:a}):e.filterDropdown;return or.createPortal(t.jsx("div",{ref:h,style:{position:"fixed",top:o.bottom+4,left:o.left,zIndex:1050},children:p}),document.body)}const g=e.filters??[],m=f?g.filter(p=>typeof e.filterSearch=="function"?e.filterSearch(f,p):p.text.toLowerCase().includes(f.toLowerCase())):g,x=t.jsxs("div",{ref:h,style:{position:"fixed",top:o.bottom+4,left:Math.max(8,o.right-200),zIndex:1050,minWidth:"10rem",maxWidth:"18rem",backgroundColor:n.colorBg,border:`1px solid ${n.colorBorder}`,borderRadius:"0.5rem",boxShadow:n.shadowMd,padding:"0.5rem"},children:[e.filterSearch&&t.jsx("input",{value:f,onChange:p=>d(p.target.value),placeholder:"Search filters",style:{width:"100%",boxSizing:"border-box",padding:"0.25rem 0.5rem",marginBottom:"0.5rem",border:`1px solid ${n.colorBorder}`,borderRadius:"0.25rem",fontSize:"0.8125rem",outline:"none",backgroundColor:n.colorBg,color:n.colorText}}),t.jsx("div",{style:{maxHeight:"12rem",overflowY:"auto",scrollbarWidth:"thin",scrollbarColor:`${n.colorBorderHover} transparent`},children:m.map(p=>{const b=c.includes(p.value);return t.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"0.375rem",padding:"0.25rem 0.25rem",cursor:"pointer",fontSize:"0.8125rem",color:n.colorText,borderRadius:"0.25rem"},children:[e.filterMultiple!==!1?t.jsx(Er,{checked:b,onChange:()=>u(v=>b?v.filter(j=>j!==p.value):[...v,p.value])}):t.jsx(Zo,{checked:b,onChange:()=>u([p.value])}),p.text]},String(p.value))})}),t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",borderTop:`1px solid ${n.colorBorder}`,marginTop:"0.5rem",paddingTop:"0.5rem",gap:"0.5rem"},children:[t.jsx("button",{onClick:()=>{u([]),l(),a()},style:{padding:"0.25rem 0.5rem",border:`1px solid ${n.colorBorder}`,borderRadius:"0.25rem",backgroundColor:n.colorBg,color:n.colorTextMuted,cursor:"pointer",fontSize:"0.75rem"},children:"Reset"}),t.jsx("button",{onClick:()=>{s(c),a()},style:{padding:"0.25rem 0.5rem",border:"none",borderRadius:"0.25rem",backgroundColor:n.colorPrimary,color:"#fff",cursor:"pointer",fontSize:"0.75rem"},children:"OK"})]})]});return or.createPortal(x,document.body)}function _1({dataSource:e,columns:r,rowKey:o="key",bordered:s=!1,size:l="large",showHeader:a=!0,loading:c=!1,pagination:u,rowSelection:f,scroll:d,expandable:h,sortDirections:g,rowHoverable:m=!0,title:x,footer:p,childrenColumnName:b,indentSize:v=15,keepPreviousData:j=!1,onChange:C,onRow:w,tableLayout:y,locale:k,className:B,style:R,classNames:S,styles:L}){const $=N1[l],I=b??"children",P=`color-mix(in srgb, ${n.colorPrimary} 12%, transparent)`,E=i.useRef(e);i.useEffect(()=>{!c&&e!==void 0&&(E.current=e)},[e,c]);const H=j&&c?E.current??e:e,z=i.useMemo(()=>(r??[]).some(fe=>!fe.hidden&&fe.children?.length),[r]),A=i.useMemo(()=>(r??[]).filter(fe=>!fe.hidden),[r]),M=i.useMemo(()=>z?Oo(r??[]):A,[z,r,A]),W=i.useMemo(()=>z?O1(r??[]):null,[z,r]),F=W?.length??1,D=i.useMemo(()=>(H??[]).some(fe=>{const J=fe[I];return Array.isArray(J)&&J.length>0}),[H,I]),T=!!f,O=!!h?.expandedRowRender,Y=O&&h?.showExpandColumn!==!1&&!D,X=M.length+(Y?1:0)+(T?1:0),_=!!d?.x,G=i.useMemo(()=>{const fe={},J=(r??[]).filter(Ee=>!Ee.hidden),te=z?Oo(J):J;for(let Ee=0;Ee<te.length;Ee++)te[Ee].defaultSortOrder&&(fe[Dt(te[Ee],Ee)]=te[Ee].defaultSortOrder);return fe},[]),[Q,N]=i.useState(G),le=i.useCallback((fe,J)=>fe.sortOrder!==void 0?fe.sortOrder:Q[J]??null,[Q]),oe=i.useMemo(()=>{const fe={};for(let J=0;J<M.length;J++){const te=M[J];te.defaultFilteredValue&&(fe[Dt(te,J)]=te.defaultFilteredValue)}return fe},[]),[q,K]=i.useState(oe),[re,Te]=i.useState(null),Ce=i.useCallback((fe,J)=>fe.filteredValue!==void 0?fe.filteredValue:q[J]??[],[q]),Le=u!==!1,ue=Le&&u?u:{},[ze,xe]=i.useState(ue.defaultCurrent??1),[ge,Ie]=i.useState(ue.defaultPageSize??10),De=ue.current??ze,Ae=ue.pageSize??ge,Re=i.useMemo(()=>{if(h?.defaultExpandAllRows){let fe=function(te,Ee){te.forEach((Ne,Ue)=>{J.push(vr(Ne,Ue,o));const nt=Ne[Ee];nt?.length&&fe(nt,Ee)})};const J=[];return fe(e??[],I),J}return h?.defaultExpandedRowKeys??[]},[]),[ke,ee]=i.useState(Re),ae=h?.expandedRowKeys??ke,se=i.useMemo(()=>new Set(ae),[ae]),[we,ie]=i.useState(new Set),ce=i.useMemo(()=>D?Bi(H??[],I,se,we,o):(H??[]).map(fe=>({record:fe,level:0,hasChildren:!1})),[H,D,I,se,we,o]),He=i.useMemo(()=>M.some((J,te)=>{const Ee=Dt(J,te);return Ce(J,Ee).length>0&&J.onFilter})?ce.filter(({record:J})=>M.every((te,Ee)=>{const Ne=Dt(te,Ee),Ue=Ce(te,Ne);return Ue.length===0||!te.onFilter?!0:Ue.some(nt=>te.onFilter(nt,J))})):ce,[ce,M,Ce]),Pe=i.useMemo(()=>{const fe=[];for(let te=0;te<M.length;te++){const Ee=M[te],Ne=Dt(Ee,te),Ue=le(Ee,Ne);if(!Ue||!Ee.sorter)continue;const nt=typeof Ee.sorter=="object"&&"multiple"in Ee.sorter?Ee.sorter.multiple??1/0:1/0;fe.push({col:Ee,order:Ue,priority:nt})}if(fe.length===0)return He;fe.sort((te,Ee)=>te.priority-Ee.priority);const J=[...He];return J.sort((te,Ee)=>{for(const{col:Ne,order:Ue}of fe){const nt=A1(Ne);if(!nt)continue;const mt=nt(te.record,Ee.record);if(mt!==0)return Ue==="descend"?-mt:mt}return 0}),J},[He,M,le]),Ge=ue.total??Pe.length,Z=ue.total!==void 0&&ue.total>Pe.length,Be=i.useMemo(()=>{if(!Le||Z)return Pe;const fe=(De-1)*Ae;return Pe.slice(fe,fe+Ae)},[Pe,De,Ae,Le,Z]),Oe=i.useMemo(()=>Be.map(fe=>fe.record),[Be]),Qe=i.useCallback(()=>{const fe=[];for(let J=0;J<M.length;J++){const te=M[J],Ee=Dt(te,J),Ne=le(te,Ee);Ne&&te.sorter&&fe.push({column:te,order:Ne,field:te.dataIndex,columnKey:Ee})}return fe.length<=1?fe[0]??{}:fe},[M,le]),_e=i.useCallback(()=>{const fe={};for(let J=0;J<M.length;J++){const te=M[J];if(te.filters||te.filteredValue!==void 0||te.defaultFilteredValue){const Ee=Dt(te,J),Ne=Ce(te,Ee);fe[Ee]=Ne.length>0?[...Ne]:null}}return fe},[M,Ce]),et=i.useCallback((fe,J)=>{if(!fe.sorter)return;const te=fe.sortDirections??g??["ascend","descend"],Ee=le(fe,J),Ne=[...te,null],Ue=Ne.indexOf(Ee),nt=Ne[(Ue+1)%Ne.length];if(fe.sortOrder===void 0){const mt=typeof fe.sorter=="object"&&"multiple"in fe.sorter&&fe.sorter.multiple!==void 0;N(mt?Tt=>({...Tt,[J]:nt}):{[J]:nt})}ue.current||xe(1),C?.({current:1,pageSize:Ae},{column:fe,order:nt,field:fe.dataIndex,columnKey:J},_e())},[le,g,C,Ae,ue.current,_e]),je=i.useCallback((fe,J)=>{ue.current||xe(fe),ue.pageSize||Ie(J),ue.onChange?.(fe,J),C?.({current:fe,pageSize:J},Qe(),_e())},[ue,C,Qe,_e]),Se=i.useCallback((fe,J)=>{const te=M.find((Ne,Ue)=>Dt(Ne,Ue)===fe);te&&te.filteredValue===void 0&&K(Ne=>({...Ne,[fe]:J})),ue.current||xe(1),Te(null);const Ee={..._e(),[fe]:J.length>0?J:null};C?.({current:1,pageSize:Ae},Qe(),Ee)},[M,ue.current,Ae,C,Qe,_e]),me=i.useCallback(fe=>{const J=M.find((Ee,Ne)=>Dt(Ee,Ne)===fe);J&&J.filteredValue===void 0&&K(Ee=>{const Ne={...Ee};return delete Ne[fe],Ne}),ue.current||xe(1),Te(null);const te={..._e(),[fe]:null};C?.({current:1,pageSize:Ae},Qe(),te)},[M,ue.current,Ae,C,Qe,_e]),[U,he]=i.useState([]),de=f?.selectedRowKeys??U,We=i.useMemo(()=>T?Be.filter(({record:fe})=>!f?.getCheckboxProps?.(fe)?.disabled):[],[Be,T,f]),$e=i.useMemo(()=>We.map(({record:fe},J)=>{const te=Le?(De-1)*Ae+J:J;return vr(fe,te,o)}),[We,De,Ae,Le,o]),ne=$e.length>0&&$e.every(fe=>de.includes(fe)),Ye=$e.some(fe=>de.includes(fe))&&!ne,Ze=i.useCallback(fe=>{const J=(H??[]).filter(te=>fe.includes(vr(te,0,o)));f?.selectedRowKeys||he(fe),f?.onChange?.(fe,J)},[H,o,f]),tt=i.useCallback(()=>{if(ne){const fe=new Set($e);Ze(de.filter(J=>!fe.has(J)))}else{const fe=new Set(de);$e.forEach(J=>fe.add(J)),Ze(Array.from(fe))}},[ne,$e,de,Ze]),dt=i.useCallback((fe,J)=>{const te=f?.type==="radio",Ee=de.includes(J);let Ne;te?Ne=Ee?[]:[J]:Ne=Ee?de.filter(nt=>nt!==J):[...de,J];const Ue=(H??[]).filter(nt=>Ne.includes(vr(nt,0,o)));f?.selectedRowKeys||he(Ne),f?.onChange?.(Ne,Ue),f?.onSelect?.(fe,!Ee,Ue)},[f,de,H,o]),ft=i.useCallback((fe,J)=>{const te=ae.includes(J),Ee=te?ae.filter(Ne=>Ne!==J):[...ae,J];D&&(te?(ie(Ne=>new Set([...Ne,J])),setTimeout(()=>{ie(Ne=>{const Ue=new Set(Ne);return Ue.delete(J),Ue})},300)):ie(Ne=>{if(!Ne.has(J))return Ne;const Ue=new Set(Ne);return Ue.delete(J),Ue})),h?.expandedRowKeys||ee(Ee),h?.onExpand?.(!te,fe),h?.onExpandedRowsChange?.(Ee)},[ae,h,D]),gt=i.useCallback(fe=>{m&&(fe.style.backgroundColor=n.colorBgMuted,_&&fe.querySelectorAll(":scope > td").forEach(te=>{te.style.position==="sticky"&&(te.style.backgroundColor=n.colorBgMuted)}))},[m,_]),Ct=i.useCallback((fe,J)=>{if(m&&(fe.style.backgroundColor=J?P:"",_)){const te=J?P:n.colorBg;fe.querySelectorAll(":scope > td").forEach(Ne=>{Ne.style.position==="sticky"&&(Ne.style.backgroundColor=te)})}},[m,P,_]),jt=i.useMemo(()=>{if(!_)return{};const fe={},J=[],te=[];for(let Ue=0;Ue<M.length;Ue++){const nt=M[Ue],mt=Dt(nt,Ue),Tt=nt.fixed===!0?"left":nt.fixed;Tt==="left"?J.push(mt):Tt==="right"&&te.push(mt)}let Ee=0;for(let Ue=0;Ue<J.length;Ue++){const nt=J[Ue],mt=M.find((Tt,Fe)=>Dt(Tt,Fe)===nt);fe[nt]={position:"left",offset:Ee,isEdge:Ue===J.length-1},Ee+=typeof mt.width=="number"?mt.width:parseFloat(String(mt.width))||0}let Ne=0;for(let Ue=te.length-1;Ue>=0;Ue--){const nt=te[Ue],mt=M.find((Tt,Fe)=>Dt(Tt,Fe)===nt);fe[nt]={position:"right",offset:Ne,isEdge:Ue===0},Ne+=typeof mt.width=="number"?mt.width:parseFloat(String(mt.width))||0}return fe},[_,M]),Mt={...s?{border:`1px solid ${n.colorBorder}`,borderRadius:"0.5rem",overflow:"hidden"}:{}},pe={...d?.y?{maxHeight:typeof d.y=="number"?`${d.y/16}rem`:d.y}:{},...d?.y||_?{overflow:"auto"}:{},scrollbarWidth:"thin",scrollbarColor:`${n.colorBorderHover} transparent`},Ke={width:"100%",..._?{minWidth:typeof d.x=="number"?`${d.x/16}rem`:d.x}:{},borderCollapse:s?"collapse":"separate",borderSpacing:0,tableLayout:y??(d?.y||_?"fixed":"auto"),fontSize:$.fontSize,fontFamily:"inherit"},qe={padding:`${$.cellPaddingV} ${$.cellPaddingH}`,textAlign:"left",fontWeight:600,color:n.colorText,backgroundColor:n.colorBgSubtle,borderBottom:`1px solid ${n.colorBorder}`,...s?{borderRight:`1px solid ${n.colorBorder}`}:{},whiteSpace:"nowrap"},st={padding:`${$.cellPaddingV} ${$.cellPaddingH}`,color:n.colorText,borderBottom:`1px solid ${n.colorBorder}`,...s?{borderRight:`1px solid ${n.colorBorder}`}:{}},rt=d?.y?{position:"sticky",top:0,zIndex:2}:{},xt=i.useCallback((fe,J)=>{const te=jt[fe];return te?{position:"sticky",[te.position]:`${te.offset/16}rem`,zIndex:1,backgroundColor:J,...te.isEdge?{boxShadow:te.position==="left"?"2px 0 4px rgba(0,0,0,0.06)":"-2px 0 4px rgba(0,0,0,0.06)"}:{}}:{}},[jt]),Rt=fe=>{if(!Le)return null;const te=(ue.position??["bottomRight"]).find(Ue=>fe==="top"?Ue.startsWith("top"):Ue.startsWith("bottom"));if(!te)return null;const Ee=te.endsWith("Left")?"flex-start":te.endsWith("Center")?"center":"flex-end",Ne=s?{padding:"0.75rem 1rem"}:{padding:fe==="top"?"0 0 1rem":"1rem 0 0"};return t.jsx("div",{className:S?.pagination,style:V({display:"flex",justifyContent:Ee,...Ne},L?.pagination),children:t.jsx(ys,{total:Ge,current:De,pageSize:Ae,size:ue.size??(l==="small"?"small":"default"),showSizeChanger:ue.showSizeChanger,showQuickJumper:ue.showQuickJumper,showTotal:ue.showTotal,simple:ue.simple,hideOnSinglePage:ue.hideOnSinglePage,disabled:ue.disabled,onChange:je})})},Lt=(fe,J,te)=>{const Ee=te&&!!fe.sorter,Ne=Ee?le(fe,J):null,Ue=te&&(fe.filters?.length||fe.filterDropdown),mt=(Ue?Ce(fe,J):[]).length>0,Tt=typeof fe.sorter=="object"&&"multiple"in fe.sorter;return t.jsxs("div",{style:{display:"inline-flex",alignItems:"center"},children:[fe.title,Ee&&t.jsx(H1,{order:Ne}),Ee&&Tt&&Ne&&t.jsx("span",{style:{fontSize:"0.625rem",color:n.colorTextMuted,marginLeft:"0.125rem"},children:fe.sorter.multiple}),Ue&&t.jsx("span",{onClick:Fe=>{Fe.stopPropagation();const ve=Fe.currentTarget.getBoundingClientRect();Te(ot=>ot?.key===J?null:{key:J,rect:ve})},style:{display:"inline-flex",marginLeft:"0.25rem",cursor:"pointer"},children:typeof fe.filterIcon=="function"?fe.filterIcon(mt):fe.filterIcon??t.jsx(F1,{active:mt})})]})};return t.jsxs("div",{className:Ve(B,S?.root),style:V(Mt,L?.root,R),children:[t.jsx("style",{children:`
|
|
197
|
+
}`;let An=!1;function L1(){if(An||typeof document>"u")return;const e=document.createElement("style");e.textContent=I1,document.head.appendChild(e),An=!0}function E1(e,r,o=".",s=","){const l=typeof e=="string"?parseFloat(e):e;if(isNaN(l))return String(e);const a=r!==void 0?l.toFixed(r):String(l),[c,u]=a.split("."),f=c.replace(/\B(?=(\d{3})+(?!\d))/g,s);return u!==void 0?`${f}${o}${u}`:f}function $1(e,r){const o=Math.max(0,e),s=Math.floor(o/(1e3*60*60*24)),l=Math.floor(o%(1e3*60*60*24)/(1e3*60*60)),a=Math.floor(o%(1e3*60*60)/(1e3*60)),c=Math.floor(o%(1e3*60)/1e3),u=Math.floor(o%1e3),f=[];let d=r.replace(/\[([^\]]*)\]/g,(h,g)=>(f.push(g),`\0${f.length-1}\0`));return d=d.replace(/SSS|DD|D|HH|H|mm|m|ss|s/g,h=>{switch(h){case"SSS":return String(u).padStart(3,"0");case"DD":return String(s).padStart(2,"0");case"D":return String(s);case"HH":return String(l).padStart(2,"0");case"H":return String(l);case"mm":return String(a).padStart(2,"0");case"m":return String(a);case"ss":return String(c).padStart(2,"0");case"s":return String(c);default:return h}}),d.replace(/\x00(\d+)\x00/g,(h,g,m)=>{const x=f[Number(g)],p=x.indexOf("|");if(p===-1)return x;const v=d.slice(0,m).match(/(\d+)\s*$/);return(v?parseInt(v[1],10):0)===1?x.slice(0,p):x.slice(p+1)})}function P1({width:e="7rem"}){return L1(),t.jsx("span",{style:{display:"inline-block",width:e,height:"1.5rem",borderRadius:"0.25rem",backgroundColor:n.colorBgMuted,animation:"j-statistic-loading 1.5s ease-in-out infinite",verticalAlign:"middle"}})}const wi={marginBottom:"0.25rem",color:n.colorTextMuted,fontSize:"0.875rem",lineHeight:1.6},ji={color:n.colorText,fontSize:"1.5rem",fontWeight:600,fontFamily:"inherit",fontVariantNumeric:"tabular-nums",lineHeight:1.4},Si={marginRight:"0.25rem",display:"inline-flex",alignItems:"center"},Mi={marginLeft:"0.25rem",display:"inline-flex",alignItems:"center"};function D1({title:e,value:r=0,precision:o,decimalSeparator:s=".",groupSeparator:l=",",prefix:a,suffix:c,formatter:u,loading:f=!1,loadingWidth:d,className:h,style:g,classNames:m,styles:x}){const p=f?t.jsx(P1,{width:d}):u?u(r):E1(r,o,s,l);return t.jsxs("div",{className:Ye(h,m?.root),style:V({},x?.root,g),children:[e!=null&&t.jsx("div",{className:m?.title,style:V(wi,x?.title),children:e}),t.jsxs("div",{className:m?.content,style:V(ji,x?.content),children:[a!=null&&t.jsx("span",{className:m?.prefix,style:V(Si,x?.prefix),children:a}),t.jsx("span",{children:p}),c!=null&&t.jsx("span",{className:m?.suffix,style:V(Mi,x?.suffix),children:c})]})]})}function z1({title:e,value:r,format:o="HH:mm:ss",prefix:s,suffix:l,onFinish:a,onChange:c,className:u,style:f,classNames:d,styles:h}){const[g,m]=i.useState(()=>Math.max(0,r-Date.now())),x=i.useRef(a),p=i.useRef(c),b=i.useRef(!1);x.current=a,p.current=c,i.useEffect(()=>{b.current=!1;const j=()=>{const y=Math.max(0,r-Date.now());m(y),p.current?.(y),y<=0&&!b.current&&(b.current=!0,x.current?.())};j();const C=o.includes("SSS")?33:1e3,w=setInterval(j,C);return()=>clearInterval(w)},[r,o]);const v=$1(g,o);return t.jsxs("div",{className:Ye(u,d?.root),style:V({},h?.root,f),children:[e!=null&&t.jsx("div",{className:d?.title,style:V(wi,h?.title),children:e}),t.jsxs("div",{className:d?.content,style:V(ji,h?.content),children:[s!=null&&t.jsx("span",{className:d?.prefix,style:V(Si,h?.prefix),children:s}),t.jsx("span",{children:v}),l!=null&&t.jsx("span",{className:d?.suffix,style:V(Mi,h?.suffix),children:l})]})]})}const W1=Object.assign(D1,{Countdown:z1});function H1({order:e}){return t.jsxs("span",{style:{display:"inline-flex",flexDirection:"column",marginLeft:"0.25rem",gap:"0.0625rem",lineHeight:0},children:[t.jsx("svg",{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",style:{opacity:e==="ascend"?1:.3},children:t.jsx("path",{d:"M5 0.5L9 5.5H1L5 0.5Z",fill:"currentColor"})}),t.jsx("svg",{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",style:{opacity:e==="descend"?1:.3},children:t.jsx("path",{d:"M5 5.5L1 0.5H9L5 5.5Z",fill:"currentColor"})})]})}function On({expanded:e}){return t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",style:{transition:"transform 0.2s ease",transform:e?"rotate(90deg)":"rotate(0deg)",cursor:"pointer"},children:t.jsx("path",{d:"M3.5 2L7 5L3.5 8"})})}function F1({active:e}){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:e?n.colorPrimary:"none",stroke:e?n.colorPrimary:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",style:{opacity:e?1:.5},children:t.jsx("path",{d:"M1.5 2.5h9L7 6.5V10L5 9V6.5L1.5 2.5z"})})}function vr(e,r,o){return typeof o=="function"?o(e):e[o]??r}function Ao(e,r){if(r)return typeof r=="string"?e?.[r]:r.reduce((o,s)=>o?.[s],e)}function Dt(e,r){return e.key?e.key:typeof e.dataIndex=="string"?e.dataIndex:Array.isArray(e.dataIndex)?e.dataIndex.join("."):String(r)}function A1(e){return e.sorter?typeof e.sorter=="function"?e.sorter:typeof e.sorter=="object"&&"compare"in e.sorter?e.sorter.compare:(r,o)=>{const s=Ao(r,e.dataIndex),l=Ao(o,e.dataIndex);return s<l?-1:s>l?1:0}:null}function Oo(e){const r=[];for(const o of e)o.hidden||(o.children?.length?r.push(...Oo(o.children)):r.push(o));return r}function O1(e){function r(c){let u=1;for(const f of c)f.hidden||f.children?.length&&(u=Math.max(u,1+r(f.children)));return u}function o(c){let u=0;for(const f of c)f.hidden||(f.children?.length?u+=o(f.children):u++);return u}const s=r(e),l=Array.from({length:s},()=>[]);function a(c,u){for(const f of c)if(!f.hidden)if(f.children?.length){const d=o(f.children);d>0&&(l[u].push({column:f,colSpan:d,rowSpan:1,isLeaf:!1}),a(f.children,u+1))}else l[u].push({column:f,colSpan:1,rowSpan:s-u,isLeaf:!0})}return a(e,0),l}function Bi(e,r,o,s,l,a=0){const c=[];for(let u=0;u<e.length;u++){const f=e[u],d=f[r],h=Array.isArray(d)&&d.length>0;if(c.push({record:f,level:a,hasChildren:h}),h){const g=vr(f,u,l),m=o.has(g),x=s.has(g);if(m||x){const p=Bi(d,r,o,s,l,a+1);x&&!m&&p.forEach(b=>{b.exiting=!0}),c.push(...p)}}}return c}const N1={large:{cellPaddingV:"1rem",cellPaddingH:"1rem",fontSize:"0.875rem"},middle:{cellPaddingV:"0.625rem",cellPaddingH:"0.75rem",fontSize:"0.875rem"},small:{cellPaddingV:"0.375rem",cellPaddingH:"0.5rem",fontSize:"0.8125rem"}};function V1(){const e=i.useRef([]);return i.useEffect(()=>{let r;const o=performance.now(),s=l=>{const a=l-o;e.current.forEach((c,u)=>{if(!c)return;const f=(a/400+u*.33)%1,d=.5+.5*Math.sin(f*Math.PI);c.style.opacity=String(.3+.7*d),c.style.transform=`scale(${.8+.4*d})`}),r=requestAnimationFrame(s)};return r=requestAnimationFrame(s),()=>cancelAnimationFrame(r)},[]),t.jsx("div",{style:{display:"flex",gap:"0.375rem"},children:[0,1,2].map(r=>t.jsx("span",{ref:o=>{e.current[r]=o},style:{width:"0.5rem",height:"0.5rem",borderRadius:"50%",backgroundColor:n.colorPrimary}},r))})}function Y1({expanded:e,children:r}){const o=i.useRef(null),s=i.useRef(null),l=i.useRef(!1);i.useLayoutEffect(()=>{const c=o.current;if(!c)return;if(!l.current){l.current=!0,c.style.maxHeight=e?"none":"0px",c.style.opacity=e?"1":"0";return}const u=s.current;if(u)if(e){const f=u.scrollHeight;c.style.transition="none",c.style.maxHeight="0px",c.style.opacity="0",c.offsetHeight,c.style.transition="max-height 300ms ease, opacity 200ms ease",c.style.maxHeight=f+"px",c.style.opacity="1"}else{const f=u.scrollHeight;c.style.transition="none",c.style.maxHeight=f+"px",c.offsetHeight,c.style.transition="max-height 300ms ease, opacity 200ms ease",c.style.maxHeight="0px",c.style.opacity="0"}},[e]);const a=i.useCallback(c=>{c.propertyName==="max-height"&&e&&o.current&&(o.current.style.maxHeight="none")},[e]);return t.jsx("div",{ref:o,style:{overflow:"hidden"},onTransitionEnd:a,children:t.jsx("div",{ref:s,children:r})})}function K1({column:e,filterValues:r,rect:o,onConfirm:s,onReset:l,onClose:a}){const[c,u]=i.useState(r),[f,d]=i.useState(""),h=i.useRef(null);if(i.useEffect(()=>{const p=v=>{h.current&&!h.current.contains(v.target)&&(e.filterOnClose!==!1&&s(c),a())},b=v=>{v.key==="Escape"&&(e.filterOnClose!==!1&&s(c),a())};return document.addEventListener("mousedown",p),document.addEventListener("keydown",b),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",b)}},[c,s,a,e.filterOnClose]),e.filterDropdown){const p=typeof e.filterDropdown=="function"?e.filterDropdown({selectedKeys:c,setSelectedKeys:u,confirm:()=>{s(c),a()},clearFilters:()=>{u([]),l()},close:a}):e.filterDropdown;return or.createPortal(t.jsx("div",{ref:h,style:{position:"fixed",top:o.bottom+4,left:o.left,zIndex:1050},children:p}),document.body)}const g=e.filters??[],m=f?g.filter(p=>typeof e.filterSearch=="function"?e.filterSearch(f,p):p.text.toLowerCase().includes(f.toLowerCase())):g,x=t.jsxs("div",{ref:h,style:{position:"fixed",top:o.bottom+4,left:Math.max(8,o.right-200),zIndex:1050,minWidth:"10rem",maxWidth:"18rem",backgroundColor:n.colorBg,border:`1px solid ${n.colorBorder}`,borderRadius:"0.5rem",boxShadow:n.shadowMd,padding:"0.5rem"},children:[e.filterSearch&&t.jsx("input",{value:f,onChange:p=>d(p.target.value),placeholder:"Search filters",style:{width:"100%",boxSizing:"border-box",padding:"0.25rem 0.5rem",marginBottom:"0.5rem",border:`1px solid ${n.colorBorder}`,borderRadius:"0.25rem",fontSize:"0.8125rem",outline:"none",backgroundColor:n.colorBg,color:n.colorText}}),t.jsx("div",{style:{maxHeight:"12rem",overflowY:"auto",scrollbarWidth:"thin",scrollbarColor:`${n.colorBorderHover} transparent`},children:m.map(p=>{const b=c.includes(p.value);return t.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"0.375rem",padding:"0.25rem 0.25rem",cursor:"pointer",fontSize:"0.8125rem",color:n.colorText,borderRadius:"0.25rem"},children:[e.filterMultiple!==!1?t.jsx(Er,{checked:b,onChange:()=>u(v=>b?v.filter(j=>j!==p.value):[...v,p.value])}):t.jsx(Zo,{checked:b,onChange:()=>u([p.value])}),p.text]},String(p.value))})}),t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",borderTop:`1px solid ${n.colorBorder}`,marginTop:"0.5rem",paddingTop:"0.5rem",gap:"0.5rem"},children:[t.jsx("button",{onClick:()=>{u([]),l(),a()},style:{padding:"0.25rem 0.5rem",border:`1px solid ${n.colorBorder}`,borderRadius:"0.25rem",backgroundColor:n.colorBg,color:n.colorTextMuted,cursor:"pointer",fontSize:"0.75rem"},children:"Reset"}),t.jsx("button",{onClick:()=>{s(c),a()},style:{padding:"0.25rem 0.5rem",border:"none",borderRadius:"0.25rem",backgroundColor:n.colorPrimary,color:"#fff",cursor:"pointer",fontSize:"0.75rem"},children:"OK"})]})]});return or.createPortal(x,document.body)}function _1({dataSource:e,columns:r,rowKey:o="key",bordered:s=!1,size:l="large",showHeader:a=!0,loading:c=!1,pagination:u,rowSelection:f,scroll:d,expandable:h,sortDirections:g,rowHoverable:m=!0,title:x,footer:p,childrenColumnName:b,indentSize:v=15,keepPreviousData:j=!1,onChange:C,onRow:w,tableLayout:y,locale:k,className:B,style:R,classNames:S,styles:E}){const $=N1[l],I=b??"children",L=`color-mix(in srgb, ${n.colorPrimary} 12%, transparent)`,P=i.useRef(e);i.useEffect(()=>{!c&&e!==void 0&&(P.current=e)},[e,c]);const H=j&&c?P.current??e:e,z=i.useMemo(()=>(r??[]).some(pe=>!pe.hidden&&pe.children?.length),[r]),F=i.useMemo(()=>(r??[]).filter(pe=>!pe.hidden),[r]),M=i.useMemo(()=>z?Oo(r??[]):F,[z,r,F]),W=i.useMemo(()=>z?O1(r??[]):null,[z,r]),A=W?.length??1,D=i.useMemo(()=>(H??[]).some(pe=>{const Z=pe[I];return Array.isArray(Z)&&Z.length>0}),[H,I]),T=!!f,O=!!h?.expandedRowRender,Y=O&&h?.showExpandColumn!==!1&&!D,X=M.length+(Y?1:0)+(T?1:0),K=!!d?.x,G=i.useMemo(()=>{const pe={},Z=(r??[]).filter(Ee=>!Ee.hidden),te=z?Oo(Z):Z;for(let Ee=0;Ee<te.length;Ee++)te[Ee].defaultSortOrder&&(pe[Dt(te[Ee],Ee)]=te[Ee].defaultSortOrder);return pe},[]),[Q,N]=i.useState(G),le=i.useCallback((pe,Z)=>pe.sortOrder!==void 0?pe.sortOrder:Q[Z]??null,[Q]),re=i.useMemo(()=>{const pe={};for(let Z=0;Z<M.length;Z++){const te=M[Z];te.defaultFilteredValue&&(pe[Dt(te,Z)]=te.defaultFilteredValue)}return pe},[]),[q,_]=i.useState(re),[J,Te]=i.useState(null),ke=i.useCallback((pe,Z)=>pe.filteredValue!==void 0?pe.filteredValue:q[Z]??[],[q]),Ie=u!==!1,fe=Ie&&u?u:{},[ze,me]=i.useState(fe.defaultCurrent??1),[he,Le]=i.useState(fe.defaultPageSize??10),De=fe.current??ze,Oe=fe.pageSize??he,Be=i.useMemo(()=>{if(h?.defaultExpandAllRows){let pe=function(te,Ee){te.forEach((Ve,Ue)=>{Z.push(vr(Ve,Ue,o));const nt=Ve[Ee];nt?.length&&pe(nt,Ee)})};const Z=[];return pe(e??[],I),Z}return h?.defaultExpandedRowKeys??[]},[]),[we,ee]=i.useState(Be),ae=h?.expandedRowKeys??we,se=i.useMemo(()=>new Set(ae),[ae]),[Se,ie]=i.useState(new Set),ce=i.useMemo(()=>D?Bi(H??[],I,se,Se,o):(H??[]).map(pe=>({record:pe,level:0,hasChildren:!1})),[H,D,I,se,Se,o]),He=i.useMemo(()=>M.some((Z,te)=>{const Ee=Dt(Z,te);return ke(Z,Ee).length>0&&Z.onFilter})?ce.filter(({record:Z})=>M.every((te,Ee)=>{const Ve=Dt(te,Ee),Ue=ke(te,Ve);return Ue.length===0||!te.onFilter?!0:Ue.some(nt=>te.onFilter(nt,Z))})):ce,[ce,M,ke]),Pe=i.useMemo(()=>{const pe=[];for(let te=0;te<M.length;te++){const Ee=M[te],Ve=Dt(Ee,te),Ue=le(Ee,Ve);if(!Ue||!Ee.sorter)continue;const nt=typeof Ee.sorter=="object"&&"multiple"in Ee.sorter?Ee.sorter.multiple??1/0:1/0;pe.push({col:Ee,order:Ue,priority:nt})}if(pe.length===0)return He;pe.sort((te,Ee)=>te.priority-Ee.priority);const Z=[...He];return Z.sort((te,Ee)=>{for(const{col:Ve,order:Ue}of pe){const nt=A1(Ve);if(!nt)continue;const mt=nt(te.record,Ee.record);if(mt!==0)return Ue==="descend"?-mt:mt}return 0}),Z},[He,M,le]),Ge=fe.total??Pe.length,Ne=fe.total!==void 0&&fe.total>Pe.length,oe=i.useMemo(()=>{if(!Ie||Ne)return Pe;const pe=(De-1)*Oe;return Pe.slice(pe,pe+Oe)},[Pe,De,Oe,Ie,Ne]),Re=i.useMemo(()=>oe.map(pe=>pe.record),[oe]),Ze=i.useCallback(()=>{const pe=[];for(let Z=0;Z<M.length;Z++){const te=M[Z],Ee=Dt(te,Z),Ve=le(te,Ee);Ve&&te.sorter&&pe.push({column:te,order:Ve,field:te.dataIndex,columnKey:Ee})}return pe.length<=1?pe[0]??{}:pe},[M,le]),Fe=i.useCallback(()=>{const pe={};for(let Z=0;Z<M.length;Z++){const te=M[Z];if(te.filters||te.filteredValue!==void 0||te.defaultFilteredValue){const Ee=Dt(te,Z),Ve=ke(te,Ee);pe[Ee]=Ve.length>0?[...Ve]:null}}return pe},[M,ke]),et=i.useCallback((pe,Z)=>{if(!pe.sorter)return;const te=pe.sortDirections??g??["ascend","descend"],Ee=le(pe,Z),Ve=[...te,null],Ue=Ve.indexOf(Ee),nt=Ve[(Ue+1)%Ve.length];if(pe.sortOrder===void 0){const mt=typeof pe.sorter=="object"&&"multiple"in pe.sorter&&pe.sorter.multiple!==void 0;N(mt?Tt=>({...Tt,[Z]:nt}):{[Z]:nt})}fe.current||me(1),C?.({current:1,pageSize:Oe},{column:pe,order:nt,field:pe.dataIndex,columnKey:Z},Fe())},[le,g,C,Oe,fe.current,Fe]),je=i.useCallback((pe,Z)=>{fe.current||me(pe),fe.pageSize||Le(Z),fe.onChange?.(pe,Z),C?.({current:pe,pageSize:Z},Ze(),Fe())},[fe,C,Ze,Fe]),ve=i.useCallback((pe,Z)=>{const te=M.find((Ve,Ue)=>Dt(Ve,Ue)===pe);te&&te.filteredValue===void 0&&_(Ve=>({...Ve,[pe]:Z})),fe.current||me(1),Te(null);const Ee={...Fe(),[pe]:Z.length>0?Z:null};C?.({current:1,pageSize:Oe},Ze(),Ee)},[M,fe.current,Oe,C,Ze,Fe]),xe=i.useCallback(pe=>{const Z=M.find((Ee,Ve)=>Dt(Ee,Ve)===pe);Z&&Z.filteredValue===void 0&&_(Ee=>{const Ve={...Ee};return delete Ve[pe],Ve}),fe.current||me(1),Te(null);const te={...Fe(),[pe]:null};C?.({current:1,pageSize:Oe},Ze(),te)},[M,fe.current,Oe,C,Ze,Fe]),[U,de]=i.useState([]),ue=f?.selectedRowKeys??U,We=i.useMemo(()=>T?oe.filter(({record:pe})=>!f?.getCheckboxProps?.(pe)?.disabled):[],[oe,T,f]),$e=i.useMemo(()=>We.map(({record:pe},Z)=>{const te=Ie?(De-1)*Oe+Z:Z;return vr(pe,te,o)}),[We,De,Oe,Ie,o]),ne=$e.length>0&&$e.every(pe=>ue.includes(pe)),Ke=$e.some(pe=>ue.includes(pe))&&!ne,Qe=i.useCallback(pe=>{const Z=(H??[]).filter(te=>pe.includes(vr(te,0,o)));f?.selectedRowKeys||de(pe),f?.onChange?.(pe,Z)},[H,o,f]),tt=i.useCallback(()=>{if(ne){const pe=new Set($e);Qe(ue.filter(Z=>!pe.has(Z)))}else{const pe=new Set(ue);$e.forEach(Z=>pe.add(Z)),Qe(Array.from(pe))}},[ne,$e,ue,Qe]),dt=i.useCallback((pe,Z)=>{const te=f?.type==="radio",Ee=ue.includes(Z);let Ve;te?Ve=Ee?[]:[Z]:Ve=Ee?ue.filter(nt=>nt!==Z):[...ue,Z];const Ue=(H??[]).filter(nt=>Ve.includes(vr(nt,0,o)));f?.selectedRowKeys||de(Ve),f?.onChange?.(Ve,Ue),f?.onSelect?.(pe,!Ee,Ue)},[f,ue,H,o]),ft=i.useCallback((pe,Z)=>{const te=ae.includes(Z),Ee=te?ae.filter(Ve=>Ve!==Z):[...ae,Z];D&&(te?(ie(Ve=>new Set([...Ve,Z])),setTimeout(()=>{ie(Ve=>{const Ue=new Set(Ve);return Ue.delete(Z),Ue})},300)):ie(Ve=>{if(!Ve.has(Z))return Ve;const Ue=new Set(Ve);return Ue.delete(Z),Ue})),h?.expandedRowKeys||ee(Ee),h?.onExpand?.(!te,pe),h?.onExpandedRowsChange?.(Ee)},[ae,h,D]),gt=i.useCallback(pe=>{m&&(pe.style.backgroundColor=n.colorBgMuted,K&&pe.querySelectorAll(":scope > td").forEach(te=>{te.style.position==="sticky"&&(te.style.backgroundColor=n.colorBgMuted)}))},[m,K]),Ct=i.useCallback((pe,Z)=>{if(m&&(pe.style.backgroundColor=Z?L:"",K)){const te=Z?L:n.colorBg;pe.querySelectorAll(":scope > td").forEach(Ve=>{Ve.style.position==="sticky"&&(Ve.style.backgroundColor=te)})}},[m,L,K]),jt=i.useMemo(()=>{if(!K)return{};const pe={},Z=[],te=[];for(let Ue=0;Ue<M.length;Ue++){const nt=M[Ue],mt=Dt(nt,Ue),Tt=nt.fixed===!0?"left":nt.fixed;Tt==="left"?Z.push(mt):Tt==="right"&&te.push(mt)}let Ee=0;for(let Ue=0;Ue<Z.length;Ue++){const nt=Z[Ue],mt=M.find((Tt,Ae)=>Dt(Tt,Ae)===nt);pe[nt]={position:"left",offset:Ee,isEdge:Ue===Z.length-1},Ee+=typeof mt.width=="number"?mt.width:parseFloat(String(mt.width))||0}let Ve=0;for(let Ue=te.length-1;Ue>=0;Ue--){const nt=te[Ue],mt=M.find((Tt,Ae)=>Dt(Tt,Ae)===nt);pe[nt]={position:"right",offset:Ve,isEdge:Ue===0},Ve+=typeof mt.width=="number"?mt.width:parseFloat(String(mt.width))||0}return pe},[K,M]),Mt={...s?{border:`1px solid ${n.colorBorder}`,borderRadius:"0.5rem",overflow:"hidden"}:{}},ge={...d?.y?{maxHeight:typeof d.y=="number"?`${d.y/16}rem`:d.y}:{},...d?.y||K?{overflow:"auto"}:{},scrollbarWidth:"thin",scrollbarColor:`${n.colorBorderHover} transparent`},_e={width:"100%",...K?{minWidth:typeof d.x=="number"?`${d.x/16}rem`:d.x}:{},borderCollapse:s?"collapse":"separate",borderSpacing:0,tableLayout:y??(d?.y||K?"fixed":"auto"),fontSize:$.fontSize,fontFamily:"inherit"},qe={padding:`${$.cellPaddingV} ${$.cellPaddingH}`,textAlign:"left",fontWeight:600,color:n.colorText,backgroundColor:n.colorBgSubtle,borderBottom:`1px solid ${n.colorBorder}`,...s?{borderRight:`1px solid ${n.colorBorder}`}:{},whiteSpace:"nowrap"},st={padding:`${$.cellPaddingV} ${$.cellPaddingH}`,color:n.colorText,borderBottom:`1px solid ${n.colorBorder}`,...s?{borderRight:`1px solid ${n.colorBorder}`}:{}},rt=d?.y?{position:"sticky",top:0,zIndex:2}:{},xt=i.useCallback((pe,Z)=>{const te=jt[pe];return te?{position:"sticky",[te.position]:`${te.offset/16}rem`,zIndex:1,backgroundColor:Z,...te.isEdge?{boxShadow:te.position==="left"?"2px 0 4px rgba(0,0,0,0.06)":"-2px 0 4px rgba(0,0,0,0.06)"}:{}}:{}},[jt]),Rt=pe=>{if(!Ie)return null;const te=(fe.position??["bottomRight"]).find(Ue=>pe==="top"?Ue.startsWith("top"):Ue.startsWith("bottom"));if(!te)return null;const Ee=te.endsWith("Left")?"flex-start":te.endsWith("Center")?"center":"flex-end",Ve=s?{padding:"0.75rem 1rem"}:{padding:pe==="top"?"0 0 1rem":"1rem 0 0"};return t.jsx("div",{className:S?.pagination,style:V({display:"flex",justifyContent:Ee,...Ve},E?.pagination),children:t.jsx(ys,{total:Ge,current:De,pageSize:Oe,size:fe.size??(l==="small"?"small":"default"),showSizeChanger:fe.showSizeChanger,showQuickJumper:fe.showQuickJumper,showTotal:fe.showTotal,simple:fe.simple,hideOnSinglePage:fe.hideOnSinglePage,disabled:fe.disabled,onChange:je})})},Lt=(pe,Z,te)=>{const Ee=te&&!!pe.sorter,Ve=Ee?le(pe,Z):null,Ue=te&&(pe.filters?.length||pe.filterDropdown),mt=(Ue?ke(pe,Z):[]).length>0,Tt=typeof pe.sorter=="object"&&"multiple"in pe.sorter;return t.jsxs("div",{style:{display:"inline-flex",alignItems:"center"},children:[pe.title,Ee&&t.jsx(H1,{order:Ve}),Ee&&Tt&&Ve&&t.jsx("span",{style:{fontSize:"0.625rem",color:n.colorTextMuted,marginLeft:"0.125rem"},children:pe.sorter.multiple}),Ue&&t.jsx("span",{onClick:Ae=>{Ae.stopPropagation();const Ce=Ae.currentTarget.getBoundingClientRect();Te(ot=>ot?.key===Z?null:{key:Z,rect:Ce})},style:{display:"inline-flex",marginLeft:"0.25rem",cursor:"pointer"},children:typeof pe.filterIcon=="function"?pe.filterIcon(mt):pe.filterIcon??t.jsx(F1,{active:mt})})]})};return t.jsxs("div",{className:Ye(B,S?.root),style:V(Mt,E?.root,R),children:[t.jsx("style",{children:`
|
|
198
198
|
.j-table-scroll::-webkit-scrollbar { width: 4px; height: 4px; }
|
|
199
199
|
.j-table-scroll::-webkit-scrollbar-track { background: transparent; }
|
|
200
200
|
.j-table-scroll::-webkit-scrollbar-thumb { background: ${n.colorBorderHover}; border-radius: 4px; }
|
|
201
201
|
.j-table-scroll::-webkit-scrollbar-thumb:hover { background: ${n.colorTextSubtle}; }
|
|
202
202
|
@keyframes j-tree-enter { from { opacity: 0; } to { opacity: 1; } }
|
|
203
|
-
`}),Rt("top"),x&&t.jsx("div",{className:S?.title,style:V({padding:`${$.cellPaddingV} ${$.cellPaddingH}`,fontWeight:600,borderBottom:`1px solid ${n.colorBorder}`,backgroundColor:n.colorBgSubtle},
|
|
203
|
+
`}),Rt("top"),x&&t.jsx("div",{className:S?.title,style:V({padding:`${$.cellPaddingV} ${$.cellPaddingH}`,fontWeight:600,borderBottom:`1px solid ${n.colorBorder}`,backgroundColor:n.colorBgSubtle},E?.title),children:x(Re)}),t.jsxs("div",{style:{position:"relative"},children:[c&&t.jsx("div",{className:S?.loading,style:V({position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:`color-mix(in srgb, ${n.colorBg} 60%, transparent)`,zIndex:10,borderRadius:s?"0.5rem":void 0},E?.loading),children:t.jsx(V1,{})}),t.jsx("div",{className:"j-table-scroll",style:ge,children:t.jsxs("table",{style:_e,children:[a&&t.jsx("thead",{className:S?.header,style:V(rt,E?.header),children:W?W.map((pe,Z)=>t.jsxs("tr",{className:S?.headerRow,style:E?.headerRow,children:[Z===0&&Y&&t.jsx("th",{rowSpan:A,style:{...qe,width:h?.columnWidth??"2.5rem",textAlign:"center"}}),Z===0&&T&&t.jsx("th",{rowSpan:A,style:{...qe,width:f?.columnWidth??"2.5rem",textAlign:"center"},children:f?.type!=="radio"&&!f?.hideSelectAll&&t.jsx(Er,{checked:ne,indeterminate:Ke,onChange:tt})}),pe.map((te,Ee)=>{const Ve=te.column;let Ue;if(te.isLeaf){const ot=M.indexOf(Ve);Ue=Dt(Ve,ot>=0?ot:Ee)}else Ue=Ve.key??`group-${Z}-${Ee}`;const nt=te.isLeaf&&!!Ve.sorter,mt=te.isLeaf?Ve.onHeaderCell?.(Ve)??{}:{},{colSpan:Tt,rowSpan:Ae,...Ce}=mt;return t.jsx("th",{colSpan:te.colSpan>1?te.colSpan:Tt>1?Tt:void 0,rowSpan:te.rowSpan>1?te.rowSpan:Ae>1?Ae:void 0,className:Ye(Ve.className,S?.headerCell),style:V({...qe,textAlign:Ve.align??"left",width:te.isLeaf?Ve.width:void 0,cursor:nt?"pointer":void 0,userSelect:nt?"none":void 0,...xt(Ue,n.colorBgSubtle)},E?.headerCell),onClick:nt?()=>et(Ve,Ue):void 0,...Ce,children:Lt(Ve,Ue,te.isLeaf)},Ue)})]},Z)):t.jsxs("tr",{className:S?.headerRow,style:E?.headerRow,children:[Y&&t.jsx("th",{style:{...qe,width:h?.columnWidth??"2.5rem",textAlign:"center"}}),T&&t.jsx("th",{style:{...qe,width:f?.columnWidth??"2.5rem",textAlign:"center"},children:f?.type!=="radio"&&!f?.hideSelectAll&&t.jsx(Er,{checked:ne,indeterminate:Ke,onChange:tt})}),M.map((pe,Z)=>{const te=Dt(pe,Z),Ee=!!pe.sorter,Ve=pe.onHeaderCell?.(pe)??{},{colSpan:Ue,rowSpan:nt,...mt}=Ve;return Ue===0?null:t.jsx("th",{colSpan:Ue>1?Ue:void 0,rowSpan:nt>1?nt:void 0,className:Ye(pe.className,S?.headerCell),style:V({...qe,textAlign:pe.align??"left",width:pe.width,cursor:Ee?"pointer":void 0,userSelect:Ee?"none":void 0,...xt(te,n.colorBgSubtle)},E?.headerCell),onClick:Ee?()=>et(pe,te):void 0,...mt,children:Lt(pe,te,!0)},te)})]})}),t.jsx("tbody",{className:S?.body,style:E?.body,children:oe.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:X,className:S?.empty,style:V({padding:"2rem",textAlign:"center"},E?.empty),children:t.jsx(Vs,{description:k?.emptyText??"No data"})})}):oe.map(({record:pe,level:Z,hasChildren:te,exiting:Ee},Ve)=>{const Ue=Ie?(De-1)*Oe+Ve:Ve,nt=vr(pe,Ue,o),mt=T&&ue.includes(nt),Tt=se.has(nt),Ae=!h?.rowExpandable||h.rowExpandable(pe),Ce=w?.(pe,Ue)??{},ot=f?.getCheckboxProps?.(pe),yt=mt?{backgroundColor:L}:{},St=D&&Z>0?Ee?{opacity:0,transition:"background-color 0.15s ease, opacity 250ms ease",pointerEvents:"none"}:{animation:"j-tree-enter 250ms ease"}:{};return t.jsxs(i.Fragment,{children:[t.jsxs("tr",{...Ce,className:S?.row,style:V({transition:"background-color 0.15s ease",...yt,...St},E?.row),onMouseEnter:pt=>{Ce.onMouseEnter?.(pt),gt(pt.currentTarget)},onMouseLeave:pt=>{Ce.onMouseLeave?.(pt),Ct(pt.currentTarget,mt)},onClick:pt=>{Ce.onClick?.(pt),h?.expandRowByClick&&(O||D&&te)&&Ae&&ft(pe,nt)},children:[Y&&t.jsx("td",{style:{...st,textAlign:"center",width:h?.columnWidth??"2.5rem"},children:Ae&&t.jsx("span",{onClick:pt=>{pt.stopPropagation(),ft(pe,nt)},style:{display:"inline-flex",cursor:"pointer",color:n.colorTextMuted},children:t.jsx(On,{expanded:Tt})})}),T&&t.jsx("td",{style:{...st,textAlign:"center",width:f?.columnWidth??"2.5rem"},children:f?.type==="radio"?t.jsx(Zo,{checked:mt,disabled:ot?.disabled,onChange:()=>dt(pe,nt)}):t.jsx(Er,{checked:mt,disabled:ot?.disabled,onChange:()=>dt(pe,nt)})}),M.map((pt,Me)=>{const Xe=Dt(pt,Me),at=Ao(pe,pt.dataIndex),it=pt.render?pt.render(at,pe,Ue):at,ut=pt.onCell?.(pe,Ue)??{},{colSpan:ht,rowSpan:bt,style:Bt,...It}=ut;if(ht===0||bt===0)return null;const Et=xt(Xe,mt?L:n.colorBg);return t.jsxs("td",{colSpan:ht>1?ht:void 0,rowSpan:bt>1?bt:void 0,className:Ye(pt.className,S?.cell),style:V({...st,textAlign:pt.align??"left",width:pt.width,...pt.ellipsis?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",maxWidth:0}:{},...Et},E?.cell,Bt),...It,children:[Me===0&&D&&t.jsx("span",{style:{paddingLeft:`${Z*v/16}rem`,display:"inline-flex",alignItems:"center"},children:te?t.jsx("span",{onClick:ye=>{ye.stopPropagation(),ft(pe,nt)},style:{cursor:"pointer",marginRight:"0.25rem",display:"inline-flex",color:n.colorTextMuted},children:t.jsx(On,{expanded:Tt})}):t.jsx("span",{style:{width:"10px",marginRight:"0.25rem",display:"inline-block"}})}),it??null]},Xe)})]}),O&&Ae&&t.jsx("tr",{className:S?.expandedRow,style:V({backgroundColor:n.colorBgSubtle},E?.expandedRow),children:t.jsx("td",{colSpan:X,style:{padding:0,border:"none"},children:t.jsx(Y1,{expanded:Tt,children:t.jsx("div",{style:{padding:`${$.cellPaddingV} ${$.cellPaddingH}`,borderBottom:`1px solid ${n.colorBorder}`},children:h.expandedRowRender(pe,Ue,Z,Tt)})})})})]},String(nt))})})]})})]}),p&&t.jsx("div",{className:S?.footer,style:V({padding:`${$.cellPaddingV} ${$.cellPaddingH}`,borderTop:`1px solid ${n.colorBorder}`,backgroundColor:n.colorBgSubtle},E?.footer),children:p(Re)}),Rt("bottom"),J&&(()=>{const pe=M.findIndex((Ee,Ve)=>Dt(Ee,Ve)===J.key),Z=M[pe];if(!Z)return null;const te=ke(Z,J.key);return t.jsx(K1,{column:Z,filterValues:te,rect:J.rect,onConfirm:Ee=>ve(J.key,Ee),onReset:()=>xe(J.key),onClose:()=>Te(null)})})()]})}const X1=Object.assign(_1,{}),lo={primary:{bg:n.colorPrimaryLight,border:n.colorPrimaryBorder,text:n.colorPrimary,solid:n.colorPrimary},secondary:{bg:n.colorSecondaryLight,border:n.colorSecondaryBorder,text:n.colorSecondary,solid:n.colorSecondary},success:{bg:n.colorSuccessLight,border:n.colorSuccessBorder,text:n.colorSuccess,solid:n.colorSuccess},warning:{bg:n.colorWarningLight,border:n.colorWarningBorder,text:n.colorWarning,solid:n.colorWarning},error:{bg:n.colorErrorLight,border:n.colorErrorBorder,text:n.colorError,solid:n.colorError},info:{bg:n.colorInfoLight,border:n.colorInfoBorder,text:n.colorInfo,solid:n.colorInfo}},on={pink:"#eb2f96",magenta:"#eb2f96",red:"#f5222d",volcano:"#fa541c",orange:"#fa8c16",gold:"#faad14",yellow:"#fadb14",lime:"#a0d911",green:"#52c41a",cyan:"#13c2c2",blue:"#1677ff",geekblue:"#2f54eb",purple:"#722ed1"};function G1(e,r){if(!e)return r==="solid"?{backgroundColor:n.colorTextMuted,borderColor:n.colorTextMuted,color:"#fff"}:r==="filled"?{backgroundColor:n.colorBgMuted,borderColor:"transparent",color:n.colorText}:{backgroundColor:"transparent",borderColor:n.colorBorder,color:n.colorText};const o=lo[e];if(o)return r==="solid"?{backgroundColor:o.solid,borderColor:o.solid,color:"#fff"}:r==="filled"?{backgroundColor:`color-mix(in srgb, ${o.solid} 25%, transparent)`,borderColor:"transparent",color:o.text}:{backgroundColor:"transparent",borderColor:o.border,color:o.text};const s=on[e]??e;return r==="solid"?{backgroundColor:s,borderColor:s,color:"#fff"}:r==="filled"?{backgroundColor:`color-mix(in srgb, ${s} 25%, transparent)`,borderColor:"transparent",color:s}:{backgroundColor:"transparent",borderColor:`color-mix(in srgb, ${s} 45%, transparent)`,color:s}}const U1=`
|
|
204
204
|
@keyframes j-tag-enter {
|
|
205
205
|
from { opacity: 0; transform: scale(0.8); }
|
|
206
206
|
to { opacity: 1; transform: scale(1); }
|
|
@@ -212,18 +212,18 @@
|
|
|
212
212
|
@keyframes j-tag-spin {
|
|
213
213
|
from { transform: rotate(0deg); }
|
|
214
214
|
to { transform: rotate(360deg); }
|
|
215
|
-
}`;let Nn=!1;function q1(){if(Nn||typeof document>"u")return;const e=document.createElement("style");e.textContent=U1,document.head.appendChild(e),Nn=!0}function Q1(){return t.jsx("svg",{viewBox:"0 0 1024 1024",width:"10",height:"10",fill:"currentColor","aria-hidden":"true",children:t.jsx("path",{d:"M563.8 512l262.5-312.9c4.4-5.2 0.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L512 442.2 295.9 191.7c-3-3.6-7.5-5.7-12.3-5.7H203.8c-6.8 0-10.5 7.9-6.1 13.1L460.2 512 197.7 824.9c-4.4 5.2-0.7 13.1 6.1 13.1h79.8c4.7 0 9.2-2.1 12.3-5.7L512 581.8l216.1 250.5c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"})})}function Z1(){return t.jsx("svg",{viewBox:"0 0 1024 1024",width:"14",height:"14",fill:"currentColor","aria-hidden":"true",style:{animation:"j-tag-spin 1s linear infinite"},children:t.jsx("path",{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.3 199.3 0 19.9-16.1 36-36 36z"})})}function J1({children:e,color:r,variant:o="outlined",closable:s=!1,closeIcon:l,onClose:a,icon:c,bordered:u=!0,href:f,target:d,disabled:h=!1,onClick:g,className:m,style:x,classNames:p,styles:b}){q1();const v=i.useRef(null),[j,C]=i.useState(!0),[w,y]=i.useState(!1),k=G1(r,o),B=!!(b?.root&&("backgroundColor"in b.root||"borderColor"in b.root||"border"in b.root)),R=i.useCallback(()=>{if(!(h||!v.current))if(B)v.current.style.filter="brightness(1.15)";else if(o==="solid"||r&&o==="filled")v.current.style.filter="brightness(1.1)";else{const
|
|
215
|
+
}`;let Nn=!1;function q1(){if(Nn||typeof document>"u")return;const e=document.createElement("style");e.textContent=U1,document.head.appendChild(e),Nn=!0}function Q1(){return t.jsx("svg",{viewBox:"0 0 1024 1024",width:"10",height:"10",fill:"currentColor","aria-hidden":"true",children:t.jsx("path",{d:"M563.8 512l262.5-312.9c4.4-5.2 0.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L512 442.2 295.9 191.7c-3-3.6-7.5-5.7-12.3-5.7H203.8c-6.8 0-10.5 7.9-6.1 13.1L460.2 512 197.7 824.9c-4.4 5.2-0.7 13.1 6.1 13.1h79.8c4.7 0 9.2-2.1 12.3-5.7L512 581.8l216.1 250.5c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"})})}function Z1(){return t.jsx("svg",{viewBox:"0 0 1024 1024",width:"14",height:"14",fill:"currentColor","aria-hidden":"true",style:{animation:"j-tag-spin 1s linear infinite"},children:t.jsx("path",{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.3 199.3 0 19.9-16.1 36-36 36z"})})}function J1({children:e,color:r,variant:o="outlined",closable:s=!1,closeIcon:l,onClose:a,icon:c,bordered:u=!0,href:f,target:d,disabled:h=!1,onClick:g,className:m,style:x,classNames:p,styles:b}){q1();const v=i.useRef(null),[j,C]=i.useState(!0),[w,y]=i.useState(!1),k=G1(r,o),B=!!(b?.root&&("backgroundColor"in b.root||"borderColor"in b.root||"border"in b.root)),R=i.useCallback(()=>{if(!(h||!v.current))if(B)v.current.style.filter="brightness(1.15)";else if(o==="solid"||r&&o==="filled")v.current.style.filter="brightness(1.1)";else{const F=r?lo[r]?lo[r].bg:`color-mix(in srgb, ${on[r]??r} 12%, transparent)`:n.colorBgMuted;v.current.style.backgroundColor=F}},[h,B,o,r]),S=i.useCallback(()=>{h||!v.current||(B||o==="solid"||r&&o==="filled"?v.current.style.filter="":v.current.style.backgroundColor=k.backgroundColor)},[h,B,o,r,k.backgroundColor]),E=i.useCallback(F=>{F.stopPropagation(),a?.(F),!F.defaultPrevented&&(y(!0),setTimeout(()=>C(!1),200))},[a]);if(!j)return null;const $={display:"inline-flex",alignItems:"center",gap:"0.25rem",padding:"0 0.4375rem",height:"1.375rem",fontSize:"0.75rem",lineHeight:"1.25rem",borderRadius:"0.25rem",border:u?`1px solid ${k.borderColor}`:"1px solid transparent",backgroundColor:k.backgroundColor,color:k.color,cursor:h?"not-allowed":"pointer",opacity:h?.65:1,transition:"all 0.2s ease",animation:w?"j-tag-exit 0.2s ease forwards":"j-tag-enter 0.2s ease",textDecoration:"none",whiteSpace:"nowrap",boxSizing:"border-box",userSelect:"none"},I={display:"inline-flex",alignItems:"center",fontSize:"0.75rem"},L={display:"inline-flex",alignItems:"center"},P={display:"inline-flex",alignItems:"center",marginLeft:"0.125rem",cursor:h?"not-allowed":"pointer",opacity:.65,transition:"opacity 0.15s ease",fontSize:"0.625rem"},H=f&&!h?"a":"span",z={};return f&&!h&&(z.href=f,z.target=d),t.jsxs(H,{ref:v,...z,className:Ye(m,p?.root),style:V($,b?.root,x),onClick:h?void 0:g,onMouseEnter:R,onMouseLeave:S,children:[c&&t.jsx("span",{className:p?.icon,style:V(I,b?.icon),children:c}),t.jsx("span",{className:p?.content,style:V(L,b?.content),children:e}),s&&t.jsx("span",{className:p?.closeIcon,style:V(P,b?.closeIcon),onClick:E,role:"img","aria-label":"close",onMouseEnter:F=>{F.currentTarget.style.opacity="1"},onMouseLeave:F=>{F.currentTarget.style.opacity="0.65"},children:l||t.jsx(Q1,{})})]})}function eh({children:e,checked:r=!1,onChange:o,color:s,disabled:l=!1,className:a,style:c,classNames:u,styles:f}){const d=i.useRef(null),h=s||"primary",g=lo[h],m=g?g.solid:on[h]??h,x=!!(f?.root&&("backgroundColor"in f.root||"borderColor"in f.root||"border"in f.root)),p=m,b=m,v="#fff",j="transparent",C=n.colorBorder,w=n.colorText,y=i.useCallback(()=>{l||!d.current||(x?d.current.style.filter="brightness(1.15)":r?d.current.style.filter="brightness(1.1)":d.current.style.backgroundColor=n.colorBgMuted)},[l,x,r]),k=i.useCallback(()=>{l||!d.current||(x||r?d.current.style.filter="":d.current.style.backgroundColor=j)},[l,x,r,j]),B=i.useCallback(()=>{l||o?.(!r)},[l,o,r]),R={display:"inline-flex",alignItems:"center",gap:"0.25rem",padding:"0 0.4375rem",height:"1.375rem",fontSize:"0.75rem",lineHeight:"1.25rem",borderRadius:"0.25rem",border:`1px solid ${r?b:C}`,backgroundColor:r?p:j,color:r?v:w,cursor:l?"not-allowed":"pointer",opacity:l?.65:1,transition:"all 0.2s ease",whiteSpace:"nowrap",boxSizing:"border-box",userSelect:"none"};return t.jsx("span",{ref:d,className:Ye(a,u?.root),style:V(R,f?.root,c),onClick:B,onMouseEnter:y,onMouseLeave:k,children:t.jsx("span",{className:u?.content,style:V({},f?.content),children:e})})}const th=Object.assign(J1,{CheckableTag:eh,SpinnerIcon:Z1}),rh={blue:n.colorPrimary,red:n.colorError,green:n.colorSuccess,gray:n.colorTextMuted,primary:n.colorPrimary,secondary:n.colorSecondary,success:n.colorSuccess,warning:n.colorWarning,error:n.colorError,info:n.colorInfo};function oh(e){return e?rh[e]??e:n.colorPrimary}const nh=`
|
|
216
216
|
@keyframes j-timeline-spin {
|
|
217
217
|
from { transform: rotate(0deg); }
|
|
218
218
|
to { transform: rotate(360deg); }
|
|
219
|
-
}`;let Vn=!1;function sh(){if(Vn||typeof document>"u")return;const e=document.createElement("style");e.textContent=nh,document.head.appendChild(e),Vn=!0}function ih(){return t.jsx("svg",{viewBox:"0 0 1024 1024",width:"14",height:"14",fill:"currentColor","aria-hidden":"true",style:{animation:"j-timeline-spin 1s linear infinite",color:n.colorPrimary},children:t.jsx("path",{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.3 199.3 0 19.9-16.1 36-36 36z"})})}function Ri(e,r,o,s,l,a){if(e.dot)return t.jsx("div",{className:l?.dot,style:V({display:"inline-flex",alignItems:"center",justifyContent:"center",color:o,flexShrink:0,marginTop:s?0:"0.1875rem",position:"relative",zIndex:1},a?.dot),children:e.dot});const c=r==="solid";return t.jsx("div",{className:l?.dot,style:V({width:"0.625rem",height:"0.625rem",borderRadius:"50%",...c?{backgroundColor:o}:{border:`2px solid ${o}`,backgroundColor:n.colorBg},boxSizing:"border-box",flexShrink:0,marginTop:s?0:"0.3125rem",position:"relative",zIndex:1},a?.dot)})}function lh({items:e=[],mode:r="left",variant:o="outlined",horizontal:s=!1,titleSpan:l,pending:a,pendingDot:c,reverse:u=!1,className:f,style:d,classNames:h,styles:g}){a&&sh();const m=i.useMemo(()=>{const v=[...e];return a&&v.push({children:typeof a=="boolean"?void 0:a,dot:c??t.jsx(ih,{}),_pending:!0}),u&&v.reverse(),v},[e,a,c,u]),x=i.useMemo(()=>m.some(v=>v.label!=null),[m]),p=!s&&(r==="alternate"||x),b={display:"flex",flexDirection:s?"row":"column",margin:0,padding:0,listStyle:"none",fontSize:"0.875rem",lineHeight:1.5,color:n.colorText};return t.jsx("div",{className:Ve(f,h?.root),style:V(b,g?.root,d),children:m.map((v,j)=>{const C=j===m.length-1,w=j===0;let y=r==="right"?"left":"right";r==="alternate"&&(y=j%2===0?"right":"left"),v.position&&(y=v.position);const k={item:v,isLast:C,isFirst:w,contentSide:y,variant:o,dotColor:oh(v.color),classNames:h,styles:g};return s?t.jsx(ch,{...k},j):t.jsx(ah,{...k,useThreeColumns:p,titleSpan:l},j)})})}function ah({item:e,isLast:r,contentSide:o,useThreeColumns:s,variant:l,titleSpan:a,dotColor:c,classNames:u,styles:f}){const d=r?0:"1.25rem";let h;if(s)if(a){const C=`${a/24*100}%`;h=o==="right"?`${C} 1.5rem 1fr`:`1fr 1.5rem ${C}`}else h="1fr 1.5rem 1fr";else h=o==="right"?"0px 1.5rem 1fr":"1fr 1.5rem 0px";const g={display:"grid",gridTemplateColumns:h},m=o==="right"?{paddingLeft:"0.75rem"}:{paddingRight:"0.75rem",textAlign:"right"},x=t.jsx("div",{className:u?.content,style:V({paddingBottom:d,lineHeight:1.5,...m},f?.content),children:e.children}),p=o==="right"?{paddingRight:"0.75rem",textAlign:"right"}:{paddingLeft:"0.75rem"},b=e.label!=null?t.jsx("div",{className:u?.label,style:V({paddingBottom:d,lineHeight:1.5,color:n.colorTextMuted,fontSize:"0.875rem",...p},f?.label),children:e.label}):t.jsx("div",{style:{paddingBottom:d}});let v,j;return o==="right"?(v=s?b:t.jsx("div",{}),j=x):(v=x,j=s?b:t.jsx("div",{})),t.jsxs("div",{className:u?.item,style:V(g,f?.item),children:[v,t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[Ri(e,l,c,!1,u,f),!r&&t.jsx("div",{style:{flex:1,position:"relative"},children:t.jsx("div",{className:u?.tail,style:V({position:"absolute",left:"50%",transform:"translateX(-50%)",top:0,bottom:"-0.3125rem",width:2,backgroundColor:n.colorBorder,transition:"background-color 0.3s"},f?.tail)})})]}),j]})}function ch({item:e,isLast:r,isFirst:o,contentSide:s,variant:l,dotColor:a,classNames:c,styles:u}){const f=s==="right",d={textAlign:"center",padding:"0.5rem 0.25rem",lineHeight:1.5,minHeight:"1.5rem"},h={...d,color:n.colorTextMuted,fontSize:"0.875rem"},g=t.jsx("div",{className:c?.content,style:V(d,u?.content),children:e.children}),m=e.label!=null?t.jsx("div",{className:c?.label,style:V(h,u?.label),children:e.label}):t.jsx("div",{style:{minHeight:"1.5rem"}});return t.jsxs("div",{className:c?.item,style:V({display:"flex",flexDirection:"column",flex:1,alignItems:"center"},u?.item),children:[f?g:m,t.jsxs("div",{style:{display:"flex",alignItems:"center",width:"100%",padding:"0.25rem 0"},children:[t.jsx("div",{className:o?void 0:c?.tail,style:o?{flex:1}:V({flex:1,height:2,backgroundColor:n.colorBorder,transition:"background-color 0.3s"},u?.tail)}),Ri(e,l,a,!0,c,u),t.jsx("div",{className:r?void 0:c?.tail,style:r?{flex:1}:V({flex:1,height:2,backgroundColor:n.colorBorder,transition:"background-color 0.3s"},u?.tail)})]}),f?m:g]})}const _t=8;function dh(e,r){const o=e.left+e.width/2,s=e.top+e.height/2;switch(r){case"top":return{top:e.top-_t,left:o};case"topLeft":return{top:e.top-_t,left:e.left};case"topRight":return{top:e.top-_t,left:e.right};case"bottom":return{top:e.bottom+_t,left:o};case"bottomLeft":return{top:e.bottom+_t,left:e.left};case"bottomRight":return{top:e.bottom+_t,left:e.right};case"left":return{top:s,left:e.left-_t};case"leftTop":return{top:e.top,left:e.left-_t};case"leftBottom":return{top:e.bottom,left:e.left-_t};case"right":return{top:s,left:e.right+_t};case"rightTop":return{top:e.top,left:e.right+_t};case"rightBottom":return{top:e.bottom,left:e.right+_t}}}function uh(e,r){const o=r?0:6;switch(e){case"top":return`translateX(-50%) translateY(-100%) translateY(${o}px)`;case"topLeft":return`translateY(-100%) translateY(${o}px)`;case"topRight":return`translateX(-100%) translateY(-100%) translateY(${o}px)`;case"bottom":return`translateX(-50%) translateY(${-o}px)`;case"bottomLeft":return`translateY(${-o}px)`;case"bottomRight":return`translateX(-100%) translateY(${-o}px)`;case"left":return`translateX(-100%) translateY(-50%) translateX(${o}px)`;case"leftTop":return`translateX(-100%) translateX(${o}px)`;case"leftBottom":return`translateX(-100%) translateY(-100%) translateX(${o}px)`;case"right":return`translateY(-50%) translateX(${-o}px)`;case"rightTop":return`translateX(${-o}px)`;case"rightBottom":return`translateY(-100%) translateX(${-o}px)`}}function fh(e,r,o){const s={position:"absolute",width:"0.5rem",height:"0.5rem",backgroundColor:r},l=o!=="transparent"?`1px solid ${o}`:"none";switch(e){case"top":return{...s,bottom:"-0.25rem",left:"50%",transform:"translateX(-50%) rotate(45deg)",borderRight:l,borderBottom:l};case"topLeft":return{...s,bottom:"-0.25rem",left:"1rem",transform:"rotate(45deg)",borderRight:l,borderBottom:l};case"topRight":return{...s,bottom:"-0.25rem",right:"1rem",transform:"rotate(45deg)",borderRight:l,borderBottom:l};case"bottom":return{...s,top:"-0.25rem",left:"50%",transform:"translateX(-50%) rotate(-135deg)",borderRight:l,borderBottom:l};case"bottomLeft":return{...s,top:"-0.25rem",left:"1rem",transform:"rotate(-135deg)",borderRight:l,borderBottom:l};case"bottomRight":return{...s,top:"-0.25rem",right:"1rem",transform:"rotate(-135deg)",borderRight:l,borderBottom:l};case"left":return{...s,right:"-0.25rem",top:"50%",transform:"translateY(-50%) rotate(-45deg)",borderRight:l,borderBottom:l};case"leftTop":return{...s,right:"-0.25rem",top:"0.75rem",transform:"rotate(-45deg)",borderRight:l,borderBottom:l};case"leftBottom":return{...s,right:"-0.25rem",bottom:"0.75rem",transform:"rotate(-45deg)",borderRight:l,borderBottom:l};case"right":return{...s,left:"-0.25rem",top:"50%",transform:"translateY(-50%) rotate(135deg)",borderRight:l,borderBottom:l};case"rightTop":return{...s,left:"-0.25rem",top:"0.75rem",transform:"rotate(135deg)",borderRight:l,borderBottom:l};case"rightBottom":return{...s,left:"-0.25rem",bottom:"0.75rem",transform:"rotate(135deg)",borderRight:l,borderBottom:l}}}function hh(e){return e==="top"?"bottom":e==="topLeft"?"bottomLeft":e==="topRight"?"bottomRight":e==="bottom"?"top":e==="bottomLeft"?"topLeft":e==="bottomRight"?"topRight":e==="left"?"right":e==="leftTop"?"rightTop":e==="leftBottom"?"rightBottom":e==="right"?"left":e==="rightTop"?"leftTop":e==="rightBottom"?"leftBottom":e}function ph(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M1 1l10 10M11 1L1 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}let gh=0;function mh(e){return e?typeof e=="function"?e():e:null}function Yn(e,r){return{left:e.left-r[0],top:e.top-r[1],width:e.width+r[0]*2,height:e.height+r[1]*2,right:e.right+r[0],bottom:e.bottom+r[1]}}function xh({steps:e=[],open:r,current:o,onChange:s,onClose:l,onFinish:a,mask:c=!0,arrow:u=!0,type:f="default",placement:d="bottom",gap:h,closeIcon:g,disabledInteraction:m=!1,scrollIntoViewOptions:x=!0,indicatorsRender:p,actionsRender:b,zIndex:v=1001,classNames:j,styles:C}){const[w,y]=i.useState(0),k=o??w,B=o!==void 0,R=i.useRef(!1);i.useEffect(()=>{r&&!R.current&&!B&&y(0),R.current=!!r},[r,B]);const[S,L]=i.useState(null),[$,I]=i.useState(!1),[P,E]=i.useState(d),[H,z]=i.useState({top:0,left:0}),A=i.useRef(null),M=i.useRef(null),W=i.useRef(!0),F=i.useRef(!1),D=i.useRef(`j-tour-mask-${++gh}`),T=i.useRef(0),O=e[k],X=(O?.type??f)==="primary",_=O?.mask??c,G=_!==!1,Q=O?.arrow??u,N=O?.placement??d,le=O?.scrollIntoViewOptions??x,oe=k===e.length-1,q=e.length,K=h?.offset??6,re=Array.isArray(K)?K:[K,K],Te=h?.radius??2,Ce=typeof _=="object"&&_.color?_.color:"rgba(0,0,0,0.45)",Le=typeof _=="object"?_.style:void 0,ue=S?Yn(S,re):null,ze=i.useCallback((Se,me)=>{if(!Se||me==="center"){z(Se?{top:Se.top+Se.height/2,left:Se.left+Se.width/2}:{top:window.innerHeight/2,left:window.innerWidth/2});return}const U=Yn(Se,re),he={left:U.left,top:U.top,right:U.right,bottom:U.bottom,width:U.width,height:U.height,x:U.left,y:U.top};z(dh(he,me))},[re]);i.useEffect(()=>{if(!r||!O){L(null),M.current=null;return}const Se=mh(O.target);if(M.current=Se,Se){if(le){const U=typeof le=="object"?le:{block:"center",behavior:"instant"};Se.scrollIntoView(U)}const me=window.setTimeout(()=>{const U=Se.getBoundingClientRect();L(U);const he=N;E(he),F.current=!1,W.current=!0,ze(U,he),cancelAnimationFrame(T.current),T.current=requestAnimationFrame(()=>{T.current=requestAnimationFrame(()=>{W.current=!1,I(!0)})})},50);return()=>{window.clearTimeout(me),cancelAnimationFrame(T.current)}}else return L(null),E("center"),F.current=!1,W.current=!0,ze(null,"center"),cancelAnimationFrame(T.current),T.current=requestAnimationFrame(()=>{T.current=requestAnimationFrame(()=>{W.current=!1,I(!0)})}),()=>cancelAnimationFrame(T.current)},[r,k]),i.useEffect(()=>{if(!r||!M.current)return;const Se=()=>{if(!M.current)return;const me=M.current.getBoundingClientRect();L(me),ze(me,P)};return window.addEventListener("scroll",Se,!0),window.addEventListener("resize",Se),()=>{window.removeEventListener("scroll",Se,!0),window.removeEventListener("resize",Se)}},[r,k,P,ze]),i.useLayoutEffect(()=>{if(!r||P==="center"||F.current||!A.current||!S)return;F.current=!0;const Se=A.current.getBoundingClientRect(),me=P,U=me.startsWith("top"),he=me.startsWith("bottom"),de=me.startsWith("left"),We=me.startsWith("right");let $e=!1;if(U&&Se.top<0?window.innerHeight-S.bottom>S.top&&($e=!0):he&&Se.bottom>window.innerHeight?S.top>window.innerHeight-S.bottom&&($e=!0):de&&Se.left<0?window.innerWidth-S.right>S.left&&($e=!0):We&&Se.right>window.innerWidth&&S.left>window.innerWidth-S.right&&($e=!0),$e){const ne=hh(me);E(ne),ze(S,ne)}});const xe=i.useRef(0),ge=i.useCallback(Se=>{I(!1),window.clearTimeout(xe.current),xe.current=window.setTimeout(()=>{B||y(Se),s?.(Se)},150)},[B,s]),Ie=i.useCallback(()=>{I(!1),l?.(k)},[k,l]),De=i.useCallback(()=>{O?.prevButtonProps?.onClick?O.prevButtonProps.onClick():k>0&&ge(k-1)},[k,O,ge]),Ae=i.useCallback(()=>{O?.nextButtonProps?.onClick?.(),oe?(a?.(),Ie()):ge(k+1)},[k,oe,O,ge,a,Ie]);if(i.useEffect(()=>()=>{window.clearTimeout(xe.current)},[]),!r||!O||typeof document>"u")return null;const Re=P!=="center"&&!!S&&Q!==!1,ke=X?n.colorPrimary:n.colorBg,ee=X?"transparent":n.colorBorder,ae=Re?{...fh(P,ke,ee),...C?.arrow}:void 0,we=P==="center"?`translate(-50%, -50%) ${$?"":"translateY(6px)"}`:uh(P,$),ie=X?{backgroundColor:n.colorPrimary,color:"#fff",borderRadius:"0.5rem",boxShadow:n.shadowLg,padding:"1rem",minWidth:"16rem",maxWidth:"22rem",position:"relative"}:{backgroundColor:n.colorBg,border:`1px solid ${n.colorBorder}`,borderRadius:"0.5rem",boxShadow:n.shadowLg,padding:"1rem",minWidth:"16rem",maxWidth:"22rem",position:"relative"},ce={fontWeight:600,fontSize:"0.875rem",color:X?"#fff":n.colorText,marginRight:g!==!1?"1.5rem":0},He={fontSize:"0.8125rem",color:X?"rgba(255,255,255,0.85)":n.colorTextMuted,marginTop:O.title?"0.25rem":0,lineHeight:1.5},Pe={display:"flex",alignItems:"center",justifyContent:"space-between",marginTop:"0.75rem",gap:"0.5rem"},Ge={position:"absolute",top:"0.75rem",right:"0.75rem",padding:"0.125rem",border:"none",background:"none",cursor:"pointer",color:X?"rgba(255,255,255,0.65)":n.colorTextMuted,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:"0.25rem",lineHeight:1},Z={marginBottom:"0.75rem",borderRadius:"0.25rem",overflow:"hidden"},Be=p?p(k,q):t.jsx("div",{className:j?.indicators,style:V({display:"flex",gap:"0.375rem",alignItems:"center"},C?.indicators),children:e.map((Se,me)=>t.jsx("div",{style:{width:"0.375rem",height:"0.375rem",borderRadius:"50%",backgroundColor:me===k?X?"#fff":n.colorPrimary:X?"rgba(255,255,255,0.3)":n.colorBorder,transition:"background-color 0.2s"}},me))}),Oe={padding:"0.25rem 0.75rem",borderRadius:"0.375rem",fontSize:"0.8125rem",fontWeight:500,cursor:"pointer",lineHeight:1.5},_e=(k>0||!!O?.prevButtonProps)&&(X?t.jsx("button",{type:"button",style:{...Oe,border:"1px solid rgba(255,255,255,0.35)",background:"transparent",color:"#fff"},onClick:De,children:O.prevButtonProps?.children??"Previous"}):t.jsx(Wr,{variant:"outline",size:"sm",onClick:De,children:O.prevButtonProps?.children??"Previous"})),et=X?t.jsx("button",{type:"button",style:{...Oe,border:"none",background:"#fff",color:n.colorPrimary},onClick:Ae,children:O.nextButtonProps?.children??(oe?"Finish":"Next")}):t.jsx(Wr,{variant:"primary",size:"sm",onClick:Ae,children:O.nextButtonProps?.children??(oe?"Finish":"Next")}),je={position:"fixed",zIndex:v+1,top:H.top,left:H.left,opacity:$?1:0,transform:we,transition:W.current?"none":"opacity 0.15s ease-out, transform 0.15s ease-out",pointerEvents:$?"auto":"none"};return or.createPortal(t.jsxs(t.Fragment,{children:[G&&t.jsxs("svg",{className:j?.mask,style:V({position:"fixed",inset:0,width:"100%",height:"100%",zIndex:v,pointerEvents:"none",opacity:$?1:0,transition:"opacity 0.2s ease-out"},C?.mask,Le),children:[t.jsx("defs",{children:t.jsxs("mask",{id:D.current,children:[t.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"white"}),ue&&t.jsx("rect",{x:ue.left,y:ue.top,width:ue.width,height:ue.height,rx:Te,ry:Te,fill:"black"})]})}),t.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:Ce,mask:`url(#${D.current})`})]}),m&&ue&&t.jsx("div",{style:{position:"fixed",left:ue.left,top:ue.top,width:ue.width,height:ue.height,zIndex:v+1,pointerEvents:"auto",background:"transparent",cursor:"not-allowed"}}),t.jsxs("div",{ref:A,style:je,children:[t.jsxs("div",{className:j?.popup,style:V(ie,C?.popup),role:"dialog",children:[O.cover&&t.jsx("div",{className:j?.cover,style:V(Z,C?.cover),children:O.cover}),g!==!1&&t.jsx("button",{className:j?.close,style:V(Ge,C?.close),onClick:Ie,"aria-label":"Close",type:"button",children:g??t.jsx(ph,{})}),O.title&&t.jsx("div",{className:j?.title,style:V(ce,C?.title),children:O.title}),O.description&&t.jsx("div",{className:j?.description,style:V(He,C?.description),children:O.description}),q>0&&t.jsxs("div",{className:j?.footer,style:V(Pe,C?.footer),children:[Be,t.jsx("div",{style:{display:"flex",gap:"0.5rem"},children:b?b([_e,et],{current:k,total:q,goTo:ge,close:Ie}):t.jsxs(t.Fragment,{children:[_e,et]})})]})]}),Re&&ae&&t.jsx("div",{className:j?.arrow,style:ae})]})]}),document.body)}function yh({size:e=16}){return t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:t.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})})}function bh({size:e=16}){return t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:t.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})})}function vh({size:e=16}){return t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:t.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})})}function Ch({size:e=16}){return t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:t.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"})})}function kh(){return t.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}const wh={success:n.colorSuccess,info:n.colorInfo,warning:n.colorWarning,error:n.colorError};function jh(e,r){const o=wh[e];return r?{bg:`color-mix(in srgb, ${o} 18%, ${n.colorBg})`,border:`color-mix(in srgb, ${o} 30%, ${n.colorBorder})`,icon:o}:{bg:`color-mix(in srgb, ${o} 15%, white)`,border:`color-mix(in srgb, ${o} 40%, ${n.colorBorder})`,icon:o}}const Sh={success:e=>t.jsx(yh,{size:e}),info:e=>t.jsx(bh,{size:e}),warning:e=>t.jsx(vh,{size:e}),error:e=>t.jsx(Ch,{size:e})};function nn({type:e,title:r,description:o,showIcon:s,icon:l,closable:a=!1,action:c,banner:u=!1,className:f,style:d,classNames:h,styles:g}){const x=co()==="dark",p=e??(u?"warning":"info"),b=s??u,v=jh(p,x),j=o!=null,[C,w]=i.useState(!1),[y,k]=i.useState(!1),B=a===!0?{}:a===!1?null:a,R=i.useRef(null),S=i.useCallback(P=>{B?.onClose?.(P),w(!0)},[B]),L=i.useCallback(()=>{C&&(k(!0),B?.afterClose?.())},[C,B]);if(y)return null;const $=j?24:16,I={display:"flex",alignItems:j?"flex-start":"center",padding:j?"0.9375rem 1rem":"0.5rem 0.75rem",backgroundColor:v.bg,...u?{border:"none",borderBottom:`1px solid ${v.border}`,borderRadius:0}:{border:`1px solid ${v.border}`,borderRadius:"0.5rem"},gap:"0.5rem",fontSize:"0.875rem",lineHeight:1.5,color:n.colorText,opacity:C?0:1,transition:"opacity 0.25s ease"};return t.jsx("div",{ref:R,style:{display:"grid",gridTemplateRows:C?"0fr":"1fr",transition:"grid-template-rows 0.3s ease"},onTransitionEnd:P=>{P.target===R.current&&L()},children:t.jsx("div",{style:{overflow:"hidden"},children:t.jsxs("div",{role:"alert",className:Ve(f,h?.root),style:V(I,g?.root,d),children:[b&&t.jsx("span",{className:h?.icon,style:{display:"inline-flex",alignItems:"center",flexShrink:0,color:v.icon,marginTop:j?"0.125rem":0,...g?.icon},children:l??Sh[p]($)}),t.jsxs("div",{className:h?.content,style:{flex:1,minWidth:0,...g?.content},children:[r&&t.jsx("div",{className:h?.message,style:{fontWeight:j?600:void 0,fontSize:j?"0.9375rem":"0.875rem",...g?.message},children:r}),j&&t.jsx("div",{className:h?.description,style:{marginTop:r?"0.25rem":0,fontSize:"0.8125rem",color:n.colorTextMuted,...g?.description},children:o})]}),c&&t.jsx("span",{className:h?.action,style:{display:"inline-flex",alignItems:"center",flexShrink:0,marginLeft:"0.5rem",...g?.action},children:c}),B&&t.jsx("button",{type:"button",onClick:S,className:h?.closeBtn,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"0.125rem",border:"none",background:"none",cursor:"pointer",color:n.colorTextSubtle,flexShrink:0,borderRadius:"0.25rem",transition:"color 0.15s",marginLeft:c?0:"0.5rem",...g?.closeBtn},onMouseEnter:P=>{P.currentTarget.style.color=n.colorText},onMouseLeave:P=>{P.currentTarget.style.color=n.colorTextSubtle},children:B.closeIcon??t.jsx(kh,{})})]})})})}class Mh extends i.Component{state={hasError:!1,error:null};static getDerivedStateFromError(r){return{hasError:!0,error:r}}render(){return this.state.hasError?t.jsx(nn,{type:"error",showIcon:!0,title:this.props.title??"Something went wrong",description:this.props.description??this.state.error?.message}):this.props.children}}Object.assign(nn,{ErrorBoundary:Mh});function Bh(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}const Kn={default:"23.625rem",large:"46rem"};function Rh(e){return e==="left"||e==="right"}function Th(e,r){if(r)return"translate(0, 0)";switch(e){case"right":return"translateX(100%)";case"left":return"translateX(-100%)";case"top":return"translateY(-100%)";case"bottom":return"translateY(100%)"}}function Ih(e){switch(e){case"right":return{top:0,right:0,bottom:0};case"left":return{top:0,left:0,bottom:0};case"top":return{top:0,left:0,right:0};case"bottom":return{bottom:0,left:0,right:0}}}function Lh(){return t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1rem",padding:"0.25rem 0"},children:[t.jsx("style",{children:"@keyframes j-drawer-pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }"}),t.jsx("div",{style:{height:"1rem",width:"60%",borderRadius:"0.25rem",backgroundColor:n.colorBgMuted,animation:"j-drawer-pulse 1.5s ease-in-out infinite"}}),t.jsx("div",{style:{height:"1rem",width:"100%",borderRadius:"0.25rem",backgroundColor:n.colorBgMuted,animation:"j-drawer-pulse 1.5s ease-in-out infinite 0.1s"}}),t.jsx("div",{style:{height:"1rem",width:"80%",borderRadius:"0.25rem",backgroundColor:n.colorBgMuted,animation:"j-drawer-pulse 1.5s ease-in-out infinite 0.2s"}})]})}function Eh({open:e=!1,onClose:r,afterOpenChange:o,placement:s="right",size:l="default",width:a,height:c,title:u,extra:f,footer:d,closable:h=!0,closeIcon:g,mask:m=!0,maskClosable:x=!0,keyboard:p=!0,zIndex:b=1e3,destroyOnClose:v=!1,loading:j=!1,children:C,className:w,style:y,classNames:k,styles:B}){const[R,S]=i.useState(!1),[L,$]=i.useState(!1),I=i.useRef(null),P=i.useRef(""),E=i.useRef(!1);e&&(E.current=!0),i.useEffect(()=>{e?(S(!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{$(!0)})})):$(!1)},[e]);const H=i.useCallback(q=>{q.target===I.current&&(e?o?.(!0):(S(!1),o?.(!1)))},[e,o]);i.useEffect(()=>(R?(P.current=document.body.style.overflow,document.body.style.overflow="hidden"):document.body.style.overflow=P.current,()=>{document.body.style.overflow=P.current}),[R]),i.useEffect(()=>{if(!R||!p)return;const q=K=>{K.key==="Escape"&&r?.(K)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[R,p,r]);const z=i.useCallback(q=>{x&&r?.(q)},[x,r]),A=i.useRef(null);if(!R&&!E.current||!R&&v)return null;const M=Rh(s),W=a??Kn[l],F=c??Kn[l],D=M?{width:W,height:"100%"}:{height:F,width:"100%"},T={position:"fixed",inset:0,zIndex:b,pointerEvents:R?"auto":"none",display:R?void 0:"none"},O={position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.45)",opacity:L?1:0,transition:"opacity 0.3s ease",...B?.mask},Y={position:"absolute",...Ih(s),...D,display:"flex",flexDirection:"column",backgroundColor:n.colorBg,color:n.colorText,boxShadow:n.shadowLg,transform:Th(s,L),transition:"transform 0.3s ease",...B?.root,...y},X={display:"flex",alignItems:"center",padding:"1rem 1.5rem",borderBottom:`1px solid ${n.colorBorder}`,flexShrink:0,...B?.header},_={flex:1,padding:"1.5rem",overflowY:"auto",...B?.body},G={padding:"1rem 1.5rem",borderTop:`1px solid ${n.colorBorder}`,flexShrink:0,...B?.footer},Q={display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"0.25rem",border:"none",background:"none",cursor:"pointer",color:n.colorTextSubtle,borderRadius:"0.25rem",transition:"color 0.15s",marginLeft:"auto",flexShrink:0,...B?.closeBtn},N=u!=null||f!=null||h,le=!v||R;return or.createPortal(t.jsxs("div",{style:T,children:[m&&t.jsx("div",{className:k?.mask,style:O,onClick:z}),t.jsxs("div",{ref:I,role:"dialog","aria-modal":"true",className:Ve(w,k?.root),style:Y,onTransitionEnd:H,children:[N&&t.jsxs("div",{className:k?.header,style:X,children:[u!=null&&t.jsx("div",{style:{flex:1,fontSize:"1rem",fontWeight:600,color:n.colorText,minWidth:0},children:u}),f!=null&&t.jsx("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem",marginLeft:u!=null?"1rem":0},children:f}),h&&t.jsx("button",{ref:A,type:"button",className:k?.closeBtn,style:Q,onClick:q=>r?.(q),onMouseEnter:q=>{q.currentTarget.style.color=n.colorText},onMouseLeave:q=>{q.currentTarget.style.color=n.colorTextSubtle},children:g??t.jsx(Bh,{})})]}),le&&t.jsx("div",{className:k?.body,style:_,children:j?t.jsx(Lh,{}):C}),d!=null&&t.jsx("div",{className:k?.footer,style:G,children:d})]})]}),document.body)}function $h(){return t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:t.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 15v-2h2v2h-2zm0-4V7h2v6h-2z"})})}function Ph(){return t.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",style:{animation:"j-popconfirm-spin 0.75s linear infinite"},children:[t.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeOpacity:"0.25"}),t.jsx("path",{d:"M12 2a10 10 0 0 1 10 10",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]})}function Dh({title:e,description:r,icon:o,onConfirm:s,onCancel:l,okText:a="OK",cancelText:c="Cancel",okButtonProps:u,cancelButtonProps:f,showCancel:d=!0,disabled:h=!1,children:g,placement:m="top",trigger:x="click",open:p,onOpenChange:b,arrow:v=!0,mouseEnterDelay:j,mouseLeaveDelay:C,className:w,style:y,classNames:k,styles:B}){const[R,S]=i.useState(!1),[L,$]=i.useState(!1),I=p!==void 0,P=I?p:R,E=i.useCallback(O=>{I||S(O),b?.(O)},[I,b]),H=i.useCallback(()=>{const O=s?.();O&&typeof O.then=="function"?($(!0),O.then(()=>{$(!1),E(!1)},()=>{$(!1)})):E(!1)},[s,E]),z=i.useCallback(()=>{l?.(),E(!1)},[l,E]),A={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.375rem",padding:"0.25rem 0.75rem",fontSize:"0.8125rem",fontWeight:500,borderRadius:"0.25rem",cursor:"pointer",transition:"filter 0.15s, border-color 0.15s, opacity 0.15s",lineHeight:1.5},{style:M,...W}=f??{},{style:F,...D}=u??{},T=t.jsxs("div",{style:{padding:"0.75rem",...B?.root},className:k?.root,onClick:O=>O.stopPropagation(),children:[t.jsx("style",{children:"@keyframes j-popconfirm-spin { to { transform: rotate(360deg); } }"}),t.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginBottom:"0.75rem"},children:[o!==null&&t.jsx("span",{className:k?.icon,style:{color:n.colorWarning,flexShrink:0,marginTop:"0.125rem",display:"inline-flex",...B?.icon},children:o===void 0?t.jsx($h,{}):o}),t.jsxs("div",{children:[t.jsx("div",{className:k?.title,style:{fontWeight:600,fontSize:"0.875rem",color:n.colorText,...B?.title},children:e}),r!=null&&t.jsx("div",{className:k?.description,style:{fontSize:"0.8125rem",color:n.colorTextMuted,marginTop:"0.25rem",...B?.description},children:r})]})]}),t.jsxs("div",{className:k?.buttons,style:{display:"flex",justifyContent:"flex-end",gap:"0.5rem",...B?.buttons},children:[d&&t.jsx("button",{type:"button",style:{...A,backgroundColor:n.colorBg,color:n.colorText,border:`1px solid ${n.colorBorder}`,...M},onClick:z,onMouseEnter:O=>{O.currentTarget.style.borderColor=n.colorBorderHover},onMouseLeave:O=>{O.currentTarget.style.borderColor=n.colorBorder},...W,children:c}),t.jsxs("button",{type:"button",style:{...A,backgroundColor:n.colorPrimary,color:n.colorPrimaryContrast,border:`1px solid ${n.colorPrimary}`,opacity:L?.7:1,pointerEvents:L?"none":"auto",...F},onClick:H,disabled:L,onMouseEnter:O=>{L||(O.currentTarget.style.filter="brightness(1.15)")},onMouseLeave:O=>{O.currentTarget.style.filter=""},...D,children:[L&&t.jsx(Ph,{}),a]})]})]});return t.jsx(rs,{content:T,placement:m,trigger:x,open:P,onOpenChange:E,arrow:v,disabled:h,mouseEnterDelay:j,mouseLeaveDelay:C,className:w,style:y,styles:{content:{padding:0}},children:g})}const jr=`
|
|
219
|
+
}`;let Vn=!1;function sh(){if(Vn||typeof document>"u")return;const e=document.createElement("style");e.textContent=nh,document.head.appendChild(e),Vn=!0}function ih(){return t.jsx("svg",{viewBox:"0 0 1024 1024",width:"14",height:"14",fill:"currentColor","aria-hidden":"true",style:{animation:"j-timeline-spin 1s linear infinite",color:n.colorPrimary},children:t.jsx("path",{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.3 199.3 0 19.9-16.1 36-36 36z"})})}function Ri(e,r,o,s,l,a){if(e.dot)return t.jsx("div",{className:l?.dot,style:V({display:"inline-flex",alignItems:"center",justifyContent:"center",color:o,flexShrink:0,marginTop:s?0:"0.1875rem",position:"relative",zIndex:1},a?.dot),children:e.dot});const c=r==="solid";return t.jsx("div",{className:l?.dot,style:V({width:"0.625rem",height:"0.625rem",borderRadius:"50%",...c?{backgroundColor:o}:{border:`2px solid ${o}`,backgroundColor:n.colorBg},boxSizing:"border-box",flexShrink:0,marginTop:s?0:"0.3125rem",position:"relative",zIndex:1},a?.dot)})}function lh({items:e=[],mode:r="left",variant:o="outlined",horizontal:s=!1,titleSpan:l,pending:a,pendingDot:c,reverse:u=!1,className:f,style:d,classNames:h,styles:g}){a&&sh();const m=i.useMemo(()=>{const v=[...e];return a&&v.push({children:typeof a=="boolean"?void 0:a,dot:c??t.jsx(ih,{}),_pending:!0}),u&&v.reverse(),v},[e,a,c,u]),x=i.useMemo(()=>m.some(v=>v.label!=null),[m]),p=!s&&(r==="alternate"||x),b={display:"flex",flexDirection:s?"row":"column",margin:0,padding:0,listStyle:"none",fontSize:"0.875rem",lineHeight:1.5,color:n.colorText};return t.jsx("div",{className:Ye(f,h?.root),style:V(b,g?.root,d),children:m.map((v,j)=>{const C=j===m.length-1,w=j===0;let y=r==="right"?"left":"right";r==="alternate"&&(y=j%2===0?"right":"left"),v.position&&(y=v.position);const k={item:v,isLast:C,isFirst:w,contentSide:y,variant:o,dotColor:oh(v.color),classNames:h,styles:g};return s?t.jsx(ch,{...k},j):t.jsx(ah,{...k,useThreeColumns:p,titleSpan:l},j)})})}function ah({item:e,isLast:r,contentSide:o,useThreeColumns:s,variant:l,titleSpan:a,dotColor:c,classNames:u,styles:f}){const d=r?0:"1.25rem";let h;if(s)if(a){const C=`${a/24*100}%`;h=o==="right"?`${C} 1.5rem 1fr`:`1fr 1.5rem ${C}`}else h="1fr 1.5rem 1fr";else h=o==="right"?"0px 1.5rem 1fr":"1fr 1.5rem 0px";const g={display:"grid",gridTemplateColumns:h},m=o==="right"?{paddingLeft:"0.75rem"}:{paddingRight:"0.75rem",textAlign:"right"},x=t.jsx("div",{className:u?.content,style:V({paddingBottom:d,lineHeight:1.5,...m},f?.content),children:e.children}),p=o==="right"?{paddingRight:"0.75rem",textAlign:"right"}:{paddingLeft:"0.75rem"},b=e.label!=null?t.jsx("div",{className:u?.label,style:V({paddingBottom:d,lineHeight:1.5,color:n.colorTextMuted,fontSize:"0.875rem",...p},f?.label),children:e.label}):t.jsx("div",{style:{paddingBottom:d}});let v,j;return o==="right"?(v=s?b:t.jsx("div",{}),j=x):(v=x,j=s?b:t.jsx("div",{})),t.jsxs("div",{className:u?.item,style:V(g,f?.item),children:[v,t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[Ri(e,l,c,!1,u,f),!r&&t.jsx("div",{style:{flex:1,position:"relative"},children:t.jsx("div",{className:u?.tail,style:V({position:"absolute",left:"50%",transform:"translateX(-50%)",top:0,bottom:"-0.3125rem",width:2,backgroundColor:n.colorBorder,transition:"background-color 0.3s"},f?.tail)})})]}),j]})}function ch({item:e,isLast:r,isFirst:o,contentSide:s,variant:l,dotColor:a,classNames:c,styles:u}){const f=s==="right",d={textAlign:"center",padding:"0.5rem 0.25rem",lineHeight:1.5,minHeight:"1.5rem"},h={...d,color:n.colorTextMuted,fontSize:"0.875rem"},g=t.jsx("div",{className:c?.content,style:V(d,u?.content),children:e.children}),m=e.label!=null?t.jsx("div",{className:c?.label,style:V(h,u?.label),children:e.label}):t.jsx("div",{style:{minHeight:"1.5rem"}});return t.jsxs("div",{className:c?.item,style:V({display:"flex",flexDirection:"column",flex:1,alignItems:"center"},u?.item),children:[f?g:m,t.jsxs("div",{style:{display:"flex",alignItems:"center",width:"100%",padding:"0.25rem 0"},children:[t.jsx("div",{className:o?void 0:c?.tail,style:o?{flex:1}:V({flex:1,height:2,backgroundColor:n.colorBorder,transition:"background-color 0.3s"},u?.tail)}),Ri(e,l,a,!0,c,u),t.jsx("div",{className:r?void 0:c?.tail,style:r?{flex:1}:V({flex:1,height:2,backgroundColor:n.colorBorder,transition:"background-color 0.3s"},u?.tail)})]}),f?m:g]})}const _t=8;function dh(e,r){const o=e.left+e.width/2,s=e.top+e.height/2;switch(r){case"top":return{top:e.top-_t,left:o};case"topLeft":return{top:e.top-_t,left:e.left};case"topRight":return{top:e.top-_t,left:e.right};case"bottom":return{top:e.bottom+_t,left:o};case"bottomLeft":return{top:e.bottom+_t,left:e.left};case"bottomRight":return{top:e.bottom+_t,left:e.right};case"left":return{top:s,left:e.left-_t};case"leftTop":return{top:e.top,left:e.left-_t};case"leftBottom":return{top:e.bottom,left:e.left-_t};case"right":return{top:s,left:e.right+_t};case"rightTop":return{top:e.top,left:e.right+_t};case"rightBottom":return{top:e.bottom,left:e.right+_t}}}function uh(e,r){const o=r?0:6;switch(e){case"top":return`translateX(-50%) translateY(-100%) translateY(${o}px)`;case"topLeft":return`translateY(-100%) translateY(${o}px)`;case"topRight":return`translateX(-100%) translateY(-100%) translateY(${o}px)`;case"bottom":return`translateX(-50%) translateY(${-o}px)`;case"bottomLeft":return`translateY(${-o}px)`;case"bottomRight":return`translateX(-100%) translateY(${-o}px)`;case"left":return`translateX(-100%) translateY(-50%) translateX(${o}px)`;case"leftTop":return`translateX(-100%) translateX(${o}px)`;case"leftBottom":return`translateX(-100%) translateY(-100%) translateX(${o}px)`;case"right":return`translateY(-50%) translateX(${-o}px)`;case"rightTop":return`translateX(${-o}px)`;case"rightBottom":return`translateY(-100%) translateX(${-o}px)`}}function fh(e,r,o){const s={position:"absolute",width:"0.5rem",height:"0.5rem",backgroundColor:r},l=o!=="transparent"?`1px solid ${o}`:"none";switch(e){case"top":return{...s,bottom:"-0.25rem",left:"50%",transform:"translateX(-50%) rotate(45deg)",borderRight:l,borderBottom:l};case"topLeft":return{...s,bottom:"-0.25rem",left:"1rem",transform:"rotate(45deg)",borderRight:l,borderBottom:l};case"topRight":return{...s,bottom:"-0.25rem",right:"1rem",transform:"rotate(45deg)",borderRight:l,borderBottom:l};case"bottom":return{...s,top:"-0.25rem",left:"50%",transform:"translateX(-50%) rotate(-135deg)",borderRight:l,borderBottom:l};case"bottomLeft":return{...s,top:"-0.25rem",left:"1rem",transform:"rotate(-135deg)",borderRight:l,borderBottom:l};case"bottomRight":return{...s,top:"-0.25rem",right:"1rem",transform:"rotate(-135deg)",borderRight:l,borderBottom:l};case"left":return{...s,right:"-0.25rem",top:"50%",transform:"translateY(-50%) rotate(-45deg)",borderRight:l,borderBottom:l};case"leftTop":return{...s,right:"-0.25rem",top:"0.75rem",transform:"rotate(-45deg)",borderRight:l,borderBottom:l};case"leftBottom":return{...s,right:"-0.25rem",bottom:"0.75rem",transform:"rotate(-45deg)",borderRight:l,borderBottom:l};case"right":return{...s,left:"-0.25rem",top:"50%",transform:"translateY(-50%) rotate(135deg)",borderRight:l,borderBottom:l};case"rightTop":return{...s,left:"-0.25rem",top:"0.75rem",transform:"rotate(135deg)",borderRight:l,borderBottom:l};case"rightBottom":return{...s,left:"-0.25rem",bottom:"0.75rem",transform:"rotate(135deg)",borderRight:l,borderBottom:l}}}function hh(e){return e==="top"?"bottom":e==="topLeft"?"bottomLeft":e==="topRight"?"bottomRight":e==="bottom"?"top":e==="bottomLeft"?"topLeft":e==="bottomRight"?"topRight":e==="left"?"right":e==="leftTop"?"rightTop":e==="leftBottom"?"rightBottom":e==="right"?"left":e==="rightTop"?"leftTop":e==="rightBottom"?"leftBottom":e}function ph(){return t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:t.jsx("path",{d:"M1 1l10 10M11 1L1 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}let gh=0;function mh(e){return e?typeof e=="function"?e():e:null}function Yn(e,r){return{left:e.left-r[0],top:e.top-r[1],width:e.width+r[0]*2,height:e.height+r[1]*2,right:e.right+r[0],bottom:e.bottom+r[1]}}function xh({steps:e=[],open:r,current:o,onChange:s,onClose:l,onFinish:a,mask:c=!0,arrow:u=!0,type:f="default",placement:d="bottom",gap:h,closeIcon:g,disabledInteraction:m=!1,scrollIntoViewOptions:x=!0,indicatorsRender:p,actionsRender:b,zIndex:v=1001,classNames:j,styles:C}){const[w,y]=i.useState(0),k=o??w,B=o!==void 0,R=i.useRef(!1);i.useEffect(()=>{r&&!R.current&&!B&&y(0),R.current=!!r},[r,B]);const[S,E]=i.useState(null),[$,I]=i.useState(!1),[L,P]=i.useState(d),[H,z]=i.useState({top:0,left:0}),F=i.useRef(null),M=i.useRef(null),W=i.useRef(!0),A=i.useRef(!1),D=i.useRef(`j-tour-mask-${++gh}`),T=i.useRef(0),O=e[k],X=(O?.type??f)==="primary",K=O?.mask??c,G=K!==!1,Q=O?.arrow??u,N=O?.placement??d,le=O?.scrollIntoViewOptions??x,re=k===e.length-1,q=e.length,_=h?.offset??6,J=Array.isArray(_)?_:[_,_],Te=h?.radius??2,ke=typeof K=="object"&&K.color?K.color:"rgba(0,0,0,0.45)",Ie=typeof K=="object"?K.style:void 0,fe=S?Yn(S,J):null,ze=i.useCallback((ve,xe)=>{if(!ve||xe==="center"){z(ve?{top:ve.top+ve.height/2,left:ve.left+ve.width/2}:{top:window.innerHeight/2,left:window.innerWidth/2});return}const U=Yn(ve,J),de={left:U.left,top:U.top,right:U.right,bottom:U.bottom,width:U.width,height:U.height,x:U.left,y:U.top};z(dh(de,xe))},[J]);i.useEffect(()=>{if(!r||!O){E(null),M.current=null;return}const ve=mh(O.target);if(M.current=ve,ve){if(le){const U=typeof le=="object"?le:{block:"center",behavior:"instant"};ve.scrollIntoView(U)}const xe=window.setTimeout(()=>{const U=ve.getBoundingClientRect();E(U);const de=N;P(de),A.current=!1,W.current=!0,ze(U,de),cancelAnimationFrame(T.current),T.current=requestAnimationFrame(()=>{T.current=requestAnimationFrame(()=>{W.current=!1,I(!0)})})},50);return()=>{window.clearTimeout(xe),cancelAnimationFrame(T.current)}}else return E(null),P("center"),A.current=!1,W.current=!0,ze(null,"center"),cancelAnimationFrame(T.current),T.current=requestAnimationFrame(()=>{T.current=requestAnimationFrame(()=>{W.current=!1,I(!0)})}),()=>cancelAnimationFrame(T.current)},[r,k]),i.useEffect(()=>{if(!r||!M.current)return;const ve=()=>{if(!M.current)return;const xe=M.current.getBoundingClientRect();E(xe),ze(xe,L)};return window.addEventListener("scroll",ve,!0),window.addEventListener("resize",ve),()=>{window.removeEventListener("scroll",ve,!0),window.removeEventListener("resize",ve)}},[r,k,L,ze]),i.useLayoutEffect(()=>{if(!r||L==="center"||A.current||!F.current||!S)return;A.current=!0;const ve=F.current.getBoundingClientRect(),xe=L,U=xe.startsWith("top"),de=xe.startsWith("bottom"),ue=xe.startsWith("left"),We=xe.startsWith("right");let $e=!1;if(U&&ve.top<0?window.innerHeight-S.bottom>S.top&&($e=!0):de&&ve.bottom>window.innerHeight?S.top>window.innerHeight-S.bottom&&($e=!0):ue&&ve.left<0?window.innerWidth-S.right>S.left&&($e=!0):We&&ve.right>window.innerWidth&&S.left>window.innerWidth-S.right&&($e=!0),$e){const ne=hh(xe);P(ne),ze(S,ne)}});const me=i.useRef(0),he=i.useCallback(ve=>{I(!1),window.clearTimeout(me.current),me.current=window.setTimeout(()=>{B||y(ve),s?.(ve)},150)},[B,s]),Le=i.useCallback(()=>{I(!1),l?.(k)},[k,l]),De=i.useCallback(()=>{O?.prevButtonProps?.onClick?O.prevButtonProps.onClick():k>0&&he(k-1)},[k,O,he]),Oe=i.useCallback(()=>{O?.nextButtonProps?.onClick?.(),re?(a?.(),Le()):he(k+1)},[k,re,O,he,a,Le]);if(i.useEffect(()=>()=>{window.clearTimeout(me.current)},[]),!r||!O||typeof document>"u")return null;const Be=L!=="center"&&!!S&&Q!==!1,we=X?n.colorPrimary:n.colorBg,ee=X?"transparent":n.colorBorder,ae=Be?{...fh(L,we,ee),...C?.arrow}:void 0,Se=L==="center"?`translate(-50%, -50%) ${$?"":"translateY(6px)"}`:uh(L,$),ie=X?{backgroundColor:n.colorPrimary,color:"#fff",borderRadius:"0.5rem",boxShadow:n.shadowLg,padding:"1rem",minWidth:"16rem",maxWidth:"22rem",position:"relative"}:{backgroundColor:n.colorBg,border:`1px solid ${n.colorBorder}`,borderRadius:"0.5rem",boxShadow:n.shadowLg,padding:"1rem",minWidth:"16rem",maxWidth:"22rem",position:"relative"},ce={fontWeight:600,fontSize:"0.875rem",color:X?"#fff":n.colorText,marginRight:g!==!1?"1.5rem":0},He={fontSize:"0.8125rem",color:X?"rgba(255,255,255,0.85)":n.colorTextMuted,marginTop:O.title?"0.25rem":0,lineHeight:1.5},Pe={display:"flex",alignItems:"center",justifyContent:"space-between",marginTop:"0.75rem",gap:"0.5rem"},Ge={position:"absolute",top:"0.75rem",right:"0.75rem",padding:"0.125rem",border:"none",background:"none",cursor:"pointer",color:X?"rgba(255,255,255,0.65)":n.colorTextMuted,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:"0.25rem",lineHeight:1},Ne={marginBottom:"0.75rem",borderRadius:"0.25rem",overflow:"hidden"},oe=p?p(k,q):t.jsx("div",{className:j?.indicators,style:V({display:"flex",gap:"0.375rem",alignItems:"center"},C?.indicators),children:e.map((ve,xe)=>t.jsx("div",{style:{width:"0.375rem",height:"0.375rem",borderRadius:"50%",backgroundColor:xe===k?X?"#fff":n.colorPrimary:X?"rgba(255,255,255,0.3)":n.colorBorder,transition:"background-color 0.2s"}},xe))}),Re={padding:"0.25rem 0.75rem",borderRadius:"0.375rem",fontSize:"0.8125rem",fontWeight:500,cursor:"pointer",lineHeight:1.5},Fe=(k>0||!!O?.prevButtonProps)&&(X?t.jsx("button",{type:"button",style:{...Re,border:"1px solid rgba(255,255,255,0.35)",background:"transparent",color:"#fff"},onClick:De,children:O.prevButtonProps?.children??"Previous"}):t.jsx(Wr,{variant:"outline",size:"sm",onClick:De,children:O.prevButtonProps?.children??"Previous"})),et=X?t.jsx("button",{type:"button",style:{...Re,border:"none",background:"#fff",color:n.colorPrimary},onClick:Oe,children:O.nextButtonProps?.children??(re?"Finish":"Next")}):t.jsx(Wr,{variant:"primary",size:"sm",onClick:Oe,children:O.nextButtonProps?.children??(re?"Finish":"Next")}),je={position:"fixed",zIndex:v+1,top:H.top,left:H.left,opacity:$?1:0,transform:Se,transition:W.current?"none":"opacity 0.15s ease-out, transform 0.15s ease-out",pointerEvents:$?"auto":"none"};return or.createPortal(t.jsxs(t.Fragment,{children:[G&&t.jsxs("svg",{className:j?.mask,style:V({position:"fixed",inset:0,width:"100%",height:"100%",zIndex:v,pointerEvents:"none",opacity:$?1:0,transition:"opacity 0.2s ease-out"},C?.mask,Ie),children:[t.jsx("defs",{children:t.jsxs("mask",{id:D.current,children:[t.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"white"}),fe&&t.jsx("rect",{x:fe.left,y:fe.top,width:fe.width,height:fe.height,rx:Te,ry:Te,fill:"black"})]})}),t.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:ke,mask:`url(#${D.current})`})]}),m&&fe&&t.jsx("div",{style:{position:"fixed",left:fe.left,top:fe.top,width:fe.width,height:fe.height,zIndex:v+1,pointerEvents:"auto",background:"transparent",cursor:"not-allowed"}}),t.jsxs("div",{ref:F,style:je,children:[t.jsxs("div",{className:j?.popup,style:V(ie,C?.popup),role:"dialog",children:[O.cover&&t.jsx("div",{className:j?.cover,style:V(Ne,C?.cover),children:O.cover}),g!==!1&&t.jsx("button",{className:j?.close,style:V(Ge,C?.close),onClick:Le,"aria-label":"Close",type:"button",children:g??t.jsx(ph,{})}),O.title&&t.jsx("div",{className:j?.title,style:V(ce,C?.title),children:O.title}),O.description&&t.jsx("div",{className:j?.description,style:V(He,C?.description),children:O.description}),q>0&&t.jsxs("div",{className:j?.footer,style:V(Pe,C?.footer),children:[oe,t.jsx("div",{style:{display:"flex",gap:"0.5rem"},children:b?b([Fe,et],{current:k,total:q,goTo:he,close:Le}):t.jsxs(t.Fragment,{children:[Fe,et]})})]})]}),Be&&ae&&t.jsx("div",{className:j?.arrow,style:ae})]})]}),document.body)}function yh({size:e=16}){return t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:t.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})})}function bh({size:e=16}){return t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:t.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})})}function vh({size:e=16}){return t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:t.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})})}function Ch({size:e=16}){return t.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:t.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"})})}function kh(){return t.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}const wh={success:n.colorSuccess,info:n.colorInfo,warning:n.colorWarning,error:n.colorError};function jh(e,r){const o=wh[e];return r?{bg:`color-mix(in srgb, ${o} 18%, ${n.colorBg})`,border:`color-mix(in srgb, ${o} 30%, ${n.colorBorder})`,icon:o}:{bg:`color-mix(in srgb, ${o} 15%, white)`,border:`color-mix(in srgb, ${o} 40%, ${n.colorBorder})`,icon:o}}const Sh={success:e=>t.jsx(yh,{size:e}),info:e=>t.jsx(bh,{size:e}),warning:e=>t.jsx(vh,{size:e}),error:e=>t.jsx(Ch,{size:e})};function nn({type:e,title:r,description:o,showIcon:s,icon:l,closable:a=!1,action:c,banner:u=!1,className:f,style:d,classNames:h,styles:g}){const x=co()==="dark",p=e??(u?"warning":"info"),b=s??u,v=jh(p,x),j=o!=null,[C,w]=i.useState(!1),[y,k]=i.useState(!1),B=a===!0?{}:a===!1?null:a,R=i.useRef(null),S=i.useCallback(L=>{B?.onClose?.(L),w(!0)},[B]),E=i.useCallback(()=>{C&&(k(!0),B?.afterClose?.())},[C,B]);if(y)return null;const $=j?24:16,I={display:"flex",alignItems:j?"flex-start":"center",padding:j?"0.9375rem 1rem":"0.5rem 0.75rem",backgroundColor:v.bg,...u?{border:"none",borderBottom:`1px solid ${v.border}`,borderRadius:0}:{border:`1px solid ${v.border}`,borderRadius:"0.5rem"},gap:"0.5rem",fontSize:"0.875rem",lineHeight:1.5,color:n.colorText,opacity:C?0:1,transition:"opacity 0.25s ease"};return t.jsx("div",{ref:R,style:{display:"grid",gridTemplateRows:C?"0fr":"1fr",transition:"grid-template-rows 0.3s ease"},onTransitionEnd:L=>{L.target===R.current&&E()},children:t.jsx("div",{style:{overflow:"hidden"},children:t.jsxs("div",{role:"alert",className:Ye(f,h?.root),style:V(I,g?.root,d),children:[b&&t.jsx("span",{className:h?.icon,style:{display:"inline-flex",alignItems:"center",flexShrink:0,color:v.icon,marginTop:j?"0.125rem":0,...g?.icon},children:l??Sh[p]($)}),t.jsxs("div",{className:h?.content,style:{flex:1,minWidth:0,...g?.content},children:[r&&t.jsx("div",{className:h?.message,style:{fontWeight:j?600:void 0,fontSize:j?"0.9375rem":"0.875rem",...g?.message},children:r}),j&&t.jsx("div",{className:h?.description,style:{marginTop:r?"0.25rem":0,fontSize:"0.8125rem",color:n.colorTextMuted,...g?.description},children:o})]}),c&&t.jsx("span",{className:h?.action,style:{display:"inline-flex",alignItems:"center",flexShrink:0,marginLeft:"0.5rem",...g?.action},children:c}),B&&t.jsx("button",{type:"button",onClick:S,className:h?.closeBtn,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"0.125rem",border:"none",background:"none",cursor:"pointer",color:n.colorTextSubtle,flexShrink:0,borderRadius:"0.25rem",transition:"color 0.15s",marginLeft:c?0:"0.5rem",...g?.closeBtn},onMouseEnter:L=>{L.currentTarget.style.color=n.colorText},onMouseLeave:L=>{L.currentTarget.style.color=n.colorTextSubtle},children:B.closeIcon??t.jsx(kh,{})})]})})})}class Mh extends i.Component{state={hasError:!1,error:null};static getDerivedStateFromError(r){return{hasError:!0,error:r}}render(){return this.state.hasError?t.jsx(nn,{type:"error",showIcon:!0,title:this.props.title??"Something went wrong",description:this.props.description??this.state.error?.message}):this.props.children}}Object.assign(nn,{ErrorBoundary:Mh});function Bh(){return t.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}const Kn={default:"23.625rem",large:"46rem"};function Rh(e){return e==="left"||e==="right"}function Th(e,r){if(r)return"translate(0, 0)";switch(e){case"right":return"translateX(100%)";case"left":return"translateX(-100%)";case"top":return"translateY(-100%)";case"bottom":return"translateY(100%)"}}function Ih(e){switch(e){case"right":return{top:0,right:0,bottom:0};case"left":return{top:0,left:0,bottom:0};case"top":return{top:0,left:0,right:0};case"bottom":return{bottom:0,left:0,right:0}}}function Lh(){return t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1rem",padding:"0.25rem 0"},children:[t.jsx("style",{children:"@keyframes j-drawer-pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }"}),t.jsx("div",{style:{height:"1rem",width:"60%",borderRadius:"0.25rem",backgroundColor:n.colorBgMuted,animation:"j-drawer-pulse 1.5s ease-in-out infinite"}}),t.jsx("div",{style:{height:"1rem",width:"100%",borderRadius:"0.25rem",backgroundColor:n.colorBgMuted,animation:"j-drawer-pulse 1.5s ease-in-out infinite 0.1s"}}),t.jsx("div",{style:{height:"1rem",width:"80%",borderRadius:"0.25rem",backgroundColor:n.colorBgMuted,animation:"j-drawer-pulse 1.5s ease-in-out infinite 0.2s"}})]})}function Eh({open:e=!1,onClose:r,afterOpenChange:o,placement:s="right",size:l="default",width:a,height:c,title:u,extra:f,footer:d,closable:h=!0,closeIcon:g,mask:m=!0,maskClosable:x=!0,keyboard:p=!0,zIndex:b=1e3,destroyOnClose:v=!1,loading:j=!1,children:C,className:w,style:y,classNames:k,styles:B}){const[R,S]=i.useState(!1),[E,$]=i.useState(!1),I=i.useRef(null),L=i.useRef(""),P=i.useRef(!1);e&&(P.current=!0),i.useEffect(()=>{e?(S(!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{$(!0)})})):$(!1)},[e]);const H=i.useCallback(q=>{q.target===I.current&&(e?o?.(!0):(S(!1),o?.(!1)))},[e,o]);i.useEffect(()=>(R?(L.current=document.body.style.overflow,document.body.style.overflow="hidden"):document.body.style.overflow=L.current,()=>{document.body.style.overflow=L.current}),[R]),i.useEffect(()=>{if(!R||!p)return;const q=_=>{_.key==="Escape"&&r?.(_)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[R,p,r]);const z=i.useCallback(q=>{x&&r?.(q)},[x,r]),F=i.useRef(null);if(!R&&!P.current||!R&&v)return null;const M=Rh(s),W=a??Kn[l],A=c??Kn[l],D=M?{width:W,height:"100%"}:{height:A,width:"100%"},T={position:"fixed",inset:0,zIndex:b,pointerEvents:R?"auto":"none",display:R?void 0:"none"},O={position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.45)",opacity:E?1:0,transition:"opacity 0.3s ease",...B?.mask},Y={position:"absolute",...Ih(s),...D,display:"flex",flexDirection:"column",backgroundColor:n.colorBg,color:n.colorText,boxShadow:n.shadowLg,transform:Th(s,E),transition:"transform 0.3s ease",...B?.root,...y},X={display:"flex",alignItems:"center",padding:"1rem 1.5rem",borderBottom:`1px solid ${n.colorBorder}`,flexShrink:0,...B?.header},K={flex:1,padding:"1.5rem",overflowY:"auto",...B?.body},G={padding:"1rem 1.5rem",borderTop:`1px solid ${n.colorBorder}`,flexShrink:0,...B?.footer},Q={display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"0.25rem",border:"none",background:"none",cursor:"pointer",color:n.colorTextSubtle,borderRadius:"0.25rem",transition:"color 0.15s",marginLeft:"auto",flexShrink:0,...B?.closeBtn},N=u!=null||f!=null||h,le=!v||R;return or.createPortal(t.jsxs("div",{style:T,children:[m&&t.jsx("div",{className:k?.mask,style:O,onClick:z}),t.jsxs("div",{ref:I,role:"dialog","aria-modal":"true",className:Ye(w,k?.root),style:Y,onTransitionEnd:H,children:[N&&t.jsxs("div",{className:k?.header,style:X,children:[u!=null&&t.jsx("div",{style:{flex:1,fontSize:"1rem",fontWeight:600,color:n.colorText,minWidth:0},children:u}),f!=null&&t.jsx("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem",marginLeft:u!=null?"1rem":0},children:f}),h&&t.jsx("button",{ref:F,type:"button",className:k?.closeBtn,style:Q,onClick:q=>r?.(q),onMouseEnter:q=>{q.currentTarget.style.color=n.colorText},onMouseLeave:q=>{q.currentTarget.style.color=n.colorTextSubtle},children:g??t.jsx(Bh,{})})]}),le&&t.jsx("div",{className:k?.body,style:K,children:j?t.jsx(Lh,{}):C}),d!=null&&t.jsx("div",{className:k?.footer,style:G,children:d})]})]}),document.body)}function $h(){return t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:t.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 15v-2h2v2h-2zm0-4V7h2v6h-2z"})})}function Ph(){return t.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",style:{animation:"j-popconfirm-spin 0.75s linear infinite"},children:[t.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeOpacity:"0.25"}),t.jsx("path",{d:"M12 2a10 10 0 0 1 10 10",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]})}function Dh({title:e,description:r,icon:o,onConfirm:s,onCancel:l,okText:a="OK",cancelText:c="Cancel",okButtonProps:u,cancelButtonProps:f,showCancel:d=!0,disabled:h=!1,children:g,placement:m="top",trigger:x="click",open:p,onOpenChange:b,arrow:v=!0,mouseEnterDelay:j,mouseLeaveDelay:C,className:w,style:y,classNames:k,styles:B}){const[R,S]=i.useState(!1),[E,$]=i.useState(!1),I=p!==void 0,L=I?p:R,P=i.useCallback(O=>{I||S(O),b?.(O)},[I,b]),H=i.useCallback(()=>{const O=s?.();O&&typeof O.then=="function"?($(!0),O.then(()=>{$(!1),P(!1)},()=>{$(!1)})):P(!1)},[s,P]),z=i.useCallback(()=>{l?.(),P(!1)},[l,P]),F={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.375rem",padding:"0.25rem 0.75rem",fontSize:"0.8125rem",fontWeight:500,borderRadius:"0.25rem",cursor:"pointer",transition:"filter 0.15s, border-color 0.15s, opacity 0.15s",lineHeight:1.5},{style:M,...W}=f??{},{style:A,...D}=u??{},T=t.jsxs("div",{style:{padding:"0.75rem",...B?.root},className:k?.root,onClick:O=>O.stopPropagation(),children:[t.jsx("style",{children:"@keyframes j-popconfirm-spin { to { transform: rotate(360deg); } }"}),t.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginBottom:"0.75rem"},children:[o!==null&&t.jsx("span",{className:k?.icon,style:{color:n.colorWarning,flexShrink:0,marginTop:"0.125rem",display:"inline-flex",...B?.icon},children:o===void 0?t.jsx($h,{}):o}),t.jsxs("div",{children:[t.jsx("div",{className:k?.title,style:{fontWeight:600,fontSize:"0.875rem",color:n.colorText,...B?.title},children:e}),r!=null&&t.jsx("div",{className:k?.description,style:{fontSize:"0.8125rem",color:n.colorTextMuted,marginTop:"0.25rem",...B?.description},children:r})]})]}),t.jsxs("div",{className:k?.buttons,style:{display:"flex",justifyContent:"flex-end",gap:"0.5rem",...B?.buttons},children:[d&&t.jsx("button",{type:"button",style:{...F,backgroundColor:n.colorBg,color:n.colorText,border:`1px solid ${n.colorBorder}`,...M},onClick:z,onMouseEnter:O=>{O.currentTarget.style.borderColor=n.colorBorderHover},onMouseLeave:O=>{O.currentTarget.style.borderColor=n.colorBorder},...W,children:c}),t.jsxs("button",{type:"button",style:{...F,backgroundColor:n.colorPrimary,color:n.colorPrimaryContrast,border:`1px solid ${n.colorPrimary}`,opacity:E?.7:1,pointerEvents:E?"none":"auto",...A},onClick:H,disabled:E,onMouseEnter:O=>{E||(O.currentTarget.style.filter="brightness(1.15)")},onMouseLeave:O=>{O.currentTarget.style.filter=""},...D,children:[E&&t.jsx(Ph,{}),a]})]})]});return t.jsx(rs,{content:T,placement:m,trigger:x,open:L,onOpenChange:P,arrow:v,disabled:h,mouseEnterDelay:j,mouseLeaveDelay:C,className:w,style:y,styles:{content:{padding:0}},children:g})}const jr=`
|
|
220
220
|
@keyframes j-placeholder-shimmer {
|
|
221
221
|
0% { background-position: -200% 0; }
|
|
222
222
|
100% { background-position: 200% 0; }
|
|
223
|
-
}`,ao={small:"1.5rem",default:"2rem",large:"2.5rem"},Ti={small:"1.5rem",default:"2rem",large:"2.5rem"};function Ii(e,r){return typeof e=="number"?`${e/16}rem`:r[e||"default"]||r.default}function dr(e,r){const o={backgroundColor:n.colorBgMuted,...r};return e&&(o.background=`linear-gradient(90deg, ${n.colorBgMuted} 25%, ${n.colorBorder} 37%, ${n.colorBgMuted} 63%)`,o.backgroundSize="200% 100%",o.animation="j-placeholder-shimmer 1.5s ease-in-out infinite"),o}function zh({active:e=!1,block:r=!1,shape:o="default",size:s="default",className:l,style:a}){const c=ao[s]||ao.default,u=o==="circle",f=o==="square",d=o==="round"?"999px":u?"50%":"0.375rem";return t.jsxs(t.Fragment,{children:[t.jsx("style",{children:jr}),t.jsx("div",{className:l,style:dr(e,{height:c,width:u||f?c:r?"100%":"4rem",borderRadius:d,...a})})]})}function Wh({active:e=!1,shape:r="circle",size:o="default",className:s,style:l}){const a=Ii(o,Ti);return t.jsxs(t.Fragment,{children:[t.jsx("style",{children:jr}),t.jsx("div",{className:s,style:dr(e,{width:a,height:a,borderRadius:r==="circle"?"50%":"0.375rem",flexShrink:0,...l})})]})}function Hh({active:e=!1,size:r="default",className:o,style:s}){const l=ao[r]||ao.default;return t.jsxs(t.Fragment,{children:[t.jsx("style",{children:jr}),t.jsx("div",{className:o,style:dr(e,{width:"100%",height:l,borderRadius:"0.375rem",...s})})]})}function Fh({active:e=!1,className:r,style:o}){return t.jsxs(t.Fragment,{children:[t.jsx("style",{children:jr}),t.jsx("div",{className:r,style:dr(e,{width:"100%",height:"100%",minHeight:"8rem",borderRadius:"0.5rem",display:"flex",alignItems:"center",justifyContent:"center",...o}),children:t.jsxs("svg",{width:"3rem",height:"3rem",viewBox:"0 0 24 24",fill:"none",stroke:n.colorTextSubtle,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),t.jsx("circle",{cx:"8.5",cy:"8.5",r:"1.5",fill:n.colorTextSubtle,stroke:"none"}),t.jsx("path",{d:"M21 15l-5-5L5 21"})]})})]})}function Ah({active:e=!1,children:r,className:o,style:s}){return t.jsxs(t.Fragment,{children:[t.jsx("style",{children:jr}),t.jsx("div",{className:o,style:dr(e,{borderRadius:"0.5rem",display:"flex",alignItems:"center",justifyContent:"center",padding:"1.5rem",...r==null&&{border:`1px dashed ${n.colorBorder}`,minHeight:"4rem",backgroundColor:"transparent",background:"none",animation:"none"},...s}),children:r})]})}function Oh({active:e=!1,avatar:r=!1,loading:o,paragraph:s=!0,round:l=!1,title:a=!0,className:c,style:u,classNames:f,styles:d,children:h}){if(o===!1)return t.jsx(t.Fragment,{children:h});const g=r!==!1,m=typeof r=="object"?r:{},x=m.shape||"circle",p=Ii(m.size,Ti),b=a!==!1,v=(typeof a=="object"?a.width:void 0)??"38%",j=s!==!1,C=typeof s=="object"?s:{},w=C.rows??3,y=C.width,k=l?"999px":"0.25rem",B=[];for(let R=0;R<w;R++)Array.isArray(y)?B.push(y[R]??"100%"):y!=null&&R===w-1?B.push(y):R===w-1?B.push("61%"):B.push("100%");return t.jsxs(t.Fragment,{children:[t.jsx("style",{children:jr}),t.jsxs("div",{className:
|
|
223
|
+
}`,ao={small:"1.5rem",default:"2rem",large:"2.5rem"},Ti={small:"1.5rem",default:"2rem",large:"2.5rem"};function Ii(e,r){return typeof e=="number"?`${e/16}rem`:r[e||"default"]||r.default}function dr(e,r){const o={backgroundColor:n.colorBgMuted,...r};return e&&(o.background=`linear-gradient(90deg, ${n.colorBgMuted} 25%, ${n.colorBorder} 37%, ${n.colorBgMuted} 63%)`,o.backgroundSize="200% 100%",o.animation="j-placeholder-shimmer 1.5s ease-in-out infinite"),o}function zh({active:e=!1,block:r=!1,shape:o="default",size:s="default",className:l,style:a}){const c=ao[s]||ao.default,u=o==="circle",f=o==="square",d=o==="round"?"999px":u?"50%":"0.375rem";return t.jsxs(t.Fragment,{children:[t.jsx("style",{children:jr}),t.jsx("div",{className:l,style:dr(e,{height:c,width:u||f?c:r?"100%":"4rem",borderRadius:d,...a})})]})}function Wh({active:e=!1,shape:r="circle",size:o="default",className:s,style:l}){const a=Ii(o,Ti);return t.jsxs(t.Fragment,{children:[t.jsx("style",{children:jr}),t.jsx("div",{className:s,style:dr(e,{width:a,height:a,borderRadius:r==="circle"?"50%":"0.375rem",flexShrink:0,...l})})]})}function Hh({active:e=!1,size:r="default",className:o,style:s}){const l=ao[r]||ao.default;return t.jsxs(t.Fragment,{children:[t.jsx("style",{children:jr}),t.jsx("div",{className:o,style:dr(e,{width:"100%",height:l,borderRadius:"0.375rem",...s})})]})}function Fh({active:e=!1,className:r,style:o}){return t.jsxs(t.Fragment,{children:[t.jsx("style",{children:jr}),t.jsx("div",{className:r,style:dr(e,{width:"100%",height:"100%",minHeight:"8rem",borderRadius:"0.5rem",display:"flex",alignItems:"center",justifyContent:"center",...o}),children:t.jsxs("svg",{width:"3rem",height:"3rem",viewBox:"0 0 24 24",fill:"none",stroke:n.colorTextSubtle,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),t.jsx("circle",{cx:"8.5",cy:"8.5",r:"1.5",fill:n.colorTextSubtle,stroke:"none"}),t.jsx("path",{d:"M21 15l-5-5L5 21"})]})})]})}function Ah({active:e=!1,children:r,className:o,style:s}){return t.jsxs(t.Fragment,{children:[t.jsx("style",{children:jr}),t.jsx("div",{className:o,style:dr(e,{borderRadius:"0.5rem",display:"flex",alignItems:"center",justifyContent:"center",padding:"1.5rem",...r==null&&{border:`1px dashed ${n.colorBorder}`,minHeight:"4rem",backgroundColor:"transparent",background:"none",animation:"none"},...s}),children:r})]})}function Oh({active:e=!1,avatar:r=!1,loading:o,paragraph:s=!0,round:l=!1,title:a=!0,className:c,style:u,classNames:f,styles:d,children:h}){if(o===!1)return t.jsx(t.Fragment,{children:h});const g=r!==!1,m=typeof r=="object"?r:{},x=m.shape||"circle",p=Ii(m.size,Ti),b=a!==!1,v=(typeof a=="object"?a.width:void 0)??"38%",j=s!==!1,C=typeof s=="object"?s:{},w=C.rows??3,y=C.width,k=l?"999px":"0.25rem",B=[];for(let R=0;R<w;R++)Array.isArray(y)?B.push(y[R]??"100%"):y!=null&&R===w-1?B.push(y):R===w-1?B.push("61%"):B.push("100%");return t.jsxs(t.Fragment,{children:[t.jsx("style",{children:jr}),t.jsxs("div",{className:Ye(c,f?.root),style:V({display:"flex",gap:"1rem"},d?.root,u),children:[g&&t.jsx("div",{className:f?.avatar,style:V(dr(e,{width:p,height:p,borderRadius:x==="circle"?"50%":"0.375rem",flexShrink:0}),d?.avatar)}),t.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[b&&t.jsx("div",{className:f?.title,style:V(dr(e,{height:"1rem",width:typeof v=="number"?`${v}px`:v,borderRadius:k,marginBottom:j?"1.5rem":void 0}),d?.title)}),j&&t.jsx("div",{className:f?.paragraph,style:V({display:"flex",flexDirection:"column",gap:"0.75rem"},d?.paragraph),children:B.map((R,S)=>t.jsx("div",{style:dr(e,{height:"0.875rem",width:typeof R=="number"?`${R}px`:R,borderRadius:k})},S))})]})]})]})}const Nh=Object.assign(Oh,{Button:zh,Avatar:Wh,Input:Hh,Image:Fh,Node:Ah}),Vh={normal:n.colorPrimary,active:n.colorPrimary,success:n.colorSuccess,exception:n.colorError};function Yh(e,r){return e||(r>=100?"success":"normal")}function Kh(e,r){if(!e)return r;if(typeof e=="string")return e;if(Array.isArray(e))return r;if("from"in e&&"to"in e)return`linear-gradient(${e.direction||"to right"}, ${e.from}, ${e.to})`;const o=Object.entries(e).sort((s,l)=>parseFloat(s[0])-parseFloat(l[0]));return o.length>0?`linear-gradient(to right, ${o.map(([s,l])=>`${l} ${s}`).join(", ")})`:r}function _h(e,r,o){if(e==="small")return{strokeHeight:6,lineWidth:void 0,sizePreset:"small",resolvedCircleWidth:o??80};if(e==="default")return{strokeHeight:8,lineWidth:void 0,sizePreset:"default",resolvedCircleWidth:o??120};if(typeof e=="number")return r?{strokeHeight:6,lineWidth:void 0,sizePreset:"default",resolvedCircleWidth:o??e}:{strokeHeight:e,lineWidth:void 0,sizePreset:e<=6?"small":"default",resolvedCircleWidth:o??120};const[s,l]=e;return{strokeHeight:l,lineWidth:typeof s=="number"?s:void 0,sizePreset:l<=6?"small":"default",resolvedCircleWidth:o??120}}function Xh({color:e}){return t.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:e,stroke:"none",children:t.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})})}function Gh({color:e}){return t.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:e,stroke:"none",children:t.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"})})}function Uh({color:e}){return t.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"20 6 9 17 4 12"})})}function qh({color:e}){return t.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:[t.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}let _n=!1;function Qh(){if(_n||typeof document>"u")return;const e=document.createElement("style");e.textContent=`
|
|
224
224
|
@keyframes j-progress-active {
|
|
225
225
|
0% { transform: translateX(-100%); opacity: 0.1; }
|
|
226
226
|
20% { opacity: 0.5; }
|
|
227
227
|
100% { transform: translateX(0); opacity: 0; }
|
|
228
|
-
}`,document.head.appendChild(e),_n=!0}let Zh=0;function Jh(e,r,o,s,l){if(s){const a=s(r,o);return a===null||a===!1?null:a}return e==="success"?l?t.jsx(Uh,{color:n.colorSuccess}):t.jsx(Xh,{color:n.colorSuccess}):e==="exception"?l?t.jsx(qh,{color:n.colorError}):t.jsx(Gh,{color:n.colorError}):`${Math.round(r)}%`}function ep({percent:e=0,format:r,showInfo:o=!0,status:s,strokeColor:l,strokeLinecap:a="round",success:c,trailColor:u,type:f="line",steps:d,strokeWidth:h,size:g="default",percentPosition:m,width:x,gapDegree:p,gapPosition:b="bottom",className:v,style:j,classNames:C,styles:w}){Qh();const y=Math.max(0,Math.min(100,e)),k=Yh(s,y),B=f==="circle"||f==="dashboard",R=Math.max(0,Math.min(295,p??(f==="dashboard"?75:0))),S=Vh[k]||n.colorPrimary,{strokeHeight:L,lineWidth:$,sizePreset:I,resolvedCircleWidth:P}=_h(g,B,x),E=o?Jh(k,y,c?.percent,r,B):null;return B?d!=null&&d>0?t.jsx(np,{percent:y,resolvedStatus:k,statusColor:S,strokeColor:l,strokeWidth:h??6,trailColor:u,circleWidth:P,gapDegree:R,gapPosition:b,steps:d,infoContent:E,className:v,style:j,classNames:C,styles:w}):t.jsx(op,{percent:y,resolvedStatus:k,statusColor:S,strokeColor:l,strokeLinecap:a,strokeWidth:h??6,trailColor:u,success:c,circleWidth:P,gapDegree:R,gapPosition:b,infoContent:E,className:v,style:j,classNames:C,styles:w}):d!=null&&d>0?t.jsx(rp,{percent:y,statusColor:S,strokeColor:l,strokeLinecap:a,strokeWidth:h??L,trailColor:u,steps:d,sizePreset:I,infoContent:E,className:v,style:j,classNames:C,styles:w}):t.jsx(tp,{percent:y,resolvedStatus:k,statusColor:S,strokeColor:l,strokeLinecap:a,strokeWidth:h??L,trailColor:u,success:c,sizePreset:I,lineWidth:$,percentPosition:m,infoContent:E,className:v,style:j,classNames:C,styles:w})}function tp({percent:e,resolvedStatus:r,statusColor:o,strokeColor:s,strokeLinecap:l,strokeWidth:a,trailColor:c,success:u,sizePreset:f,lineWidth:d,percentPosition:h,infoContent:g,className:m,style:x,classNames:p,styles:b}){const v=l==="round"?a/2:0,j=Kh(s,o),C=h?.type||"outer",w=h?.align||"end",y=C==="inner",k=w==="start"?"flex-start":w==="center"?"center":"flex-end",B=t.jsx("div",{style:{flex:d?void 0:1,width:d,minWidth:0},children:t.jsxs("div",{className:p?.trail,style:{position:"relative",height:a,borderRadius:v,backgroundColor:c||n.colorBgMuted,overflow:"hidden",...b?.trail},children:[t.jsxs("div",{className:p?.stroke,style:{position:"absolute",top:0,left:0,height:"100%",width:`${e}%`,borderRadius:v,background:j,transition:"width 0.3s ease",...b?.stroke},children:[r==="active"&&t.jsx("div",{style:{position:"absolute",inset:0,borderRadius:v,background:"linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent)",animation:"j-progress-active 2.4s cubic-bezier(0.23, 1, 0.32, 1) infinite"}}),y&&g!=null&&t.jsx("span",{className:p?.text,style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:k,padding:"0 0.375rem",fontSize:Math.max(a*.7,10),color:"#fff",lineHeight:1,whiteSpace:"nowrap",overflow:"hidden",...b?.text},children:g})]}),u?.percent!=null&&u.percent>0&&t.jsx("div",{style:{position:"absolute",top:0,left:0,height:"100%",width:`${Math.min(100,u.percent)}%`,borderRadius:v,backgroundColor:u.strokeColor||n.colorSuccess,transition:"width 0.3s ease"}})]})}),R=!y&&g!=null?t.jsx("span",{className:p?.text,style:{flexShrink:0,fontSize:f==="small"?"0.8125rem":"0.875rem",color:n.colorText,lineHeight:1,display:"inline-flex",alignItems:"center",minWidth:"2.5em",...b?.text},children:g}):null;return t.jsxs("div",{className:m,style:{display:"flex",alignItems:"center",gap:"0.5rem",width:d?void 0:"100%",...x,...b?.root},children:[w==="start"&&R,B,w!=="start"&&R]})}function rp({percent:e,statusColor:r,strokeColor:o,strokeLinecap:s,strokeWidth:l,trailColor:a,steps:c,sizePreset:u,infoContent:f,className:d,style:h,classNames:g,styles:m}){const x=Math.round(e/100*c),p=s==="round"?l/2:0,b=Array.isArray(o)?o:null,v=typeof o=="string"?o:r;return t.jsxs("div",{className:d,style:{display:"flex",alignItems:"center",gap:"0.5rem",width:"100%",...h,...m?.root},children:[t.jsx("div",{className:g?.trail,style:{display:"flex",gap:"0.125rem",flex:1,...m?.trail},children:Array.from({length:c},(j,C)=>{const w=C<x,y=w?b?b[C%b.length]:v:a||n.colorBgMuted;return t.jsx("div",{className:w?g?.stroke:void 0,style:{flex:1,height:l,borderRadius:p,backgroundColor:y,transition:"background-color 0.3s ease",...w?m?.stroke:void 0}},C)})}),f!=null&&t.jsx("span",{className:g?.text,style:{flexShrink:0,fontSize:u==="small"?"0.8125rem":"0.875rem",color:n.colorText,lineHeight:1,display:"inline-flex",alignItems:"center",minWidth:"2.5em",...m?.text},children:f})]})}function op({percent:e,resolvedStatus:r,statusColor:o,strokeColor:s,strokeLinecap:l,strokeWidth:a,trailColor:c,success:u,circleWidth:f,gapDegree:d,gapPosition:h,infoContent:g,className:m,style:x,classNames:p,styles:b}){const v=i.useMemo(()=>`j-progress-grad-${++Zh}`,[]),j=a/100*f,C=f/2,w=C-j/2,y=2*Math.PI*w,k=d/360*y,B=y-k,R=e/100*B,S=Li(h,d),L=s!=null&&typeof s!="string"&&!Array.isArray(s)&&!("from"in s&&"to"in s)&&Object.keys(s).some(F=>F.includes("%")),$=L?Object.entries(s).sort((F,D)=>parseFloat(F[0])-parseFloat(D[0])):null,I=L?`url(#${v})`:typeof s=="string"?s:s&&"from"in s?s.from:o,P=u?.percent!=null?Math.min(100,u.percent)/100*B:0,E={fill:"none",strokeLinecap:l},H=f*.2,z=f*.3,A=f<=20,M=!A&&g!=null,W=t.jsxs("div",{className:m,style:{display:"inline-flex",position:"relative",...x,...b?.root},children:[t.jsxs("svg",{viewBox:`0 0 ${f} ${f}`,width:f,height:f,children:[$&&t.jsx("defs",{children:t.jsx("linearGradient",{id:v,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:$.map(([F,D])=>t.jsx("stop",{offset:F,stopColor:D},F))})}),t.jsx("circle",{className:p?.trail,cx:C,cy:C,r:w,stroke:c||n.colorBgMuted,strokeWidth:j,strokeDasharray:d>0?`${B} ${k}`:void 0,transform:`rotate(${S} ${C} ${C})`,style:{...E,...b?.trail}}),t.jsx("circle",{className:p?.stroke,cx:C,cy:C,r:w,stroke:I,strokeWidth:j,strokeDasharray:`${R} ${y}`,transform:`rotate(${S} ${C} ${C})`,style:{...E,transition:"stroke-dasharray 0.3s ease",...b?.stroke}}),P>0&&t.jsx("circle",{cx:C,cy:C,r:w,stroke:u.strokeColor||n.colorSuccess,strokeWidth:j,strokeDasharray:`${P} ${y}`,transform:`rotate(${S} ${C} ${C})`,style:E})]}),M&&t.jsx("span",{className:p?.text,style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:r==="success"||r==="exception"?z:H,color:n.colorText,lineHeight:1,...b?.text},children:g})]});return A&&g!=null?t.jsx(Wt,{content:t.jsx("span",{children:g}),children:W}):W}function np({percent:e,resolvedStatus:r,statusColor:o,strokeColor:s,strokeWidth:l,trailColor:a,circleWidth:c,gapDegree:u,gapPosition:f,steps:d,infoContent:h,className:g,style:m,classNames:x,styles:p}){const b=l/100*c,v=c/2,j=v-b/2,C=2*Math.PI*j,w=u/360*C,y=C-w,k=Li(f,u),B=Math.round(e/100*d),S=2/360*C,L=S*d,$=(y-L)/d,I=Array.isArray(s)?s:null,P=typeof s=="string"?s:o,E={fill:"none",strokeLinecap:"butt"},H=c*.2,z=c*.3,A=c<=20,M=!A&&h!=null,W=t.jsxs("div",{className:g,style:{display:"inline-flex",position:"relative",...m,...p?.root},children:[t.jsxs("svg",{viewBox:`0 0 ${c} ${c}`,width:c,height:c,children:[Array.from({length:d},(F,D)=>{const T=D*($+S);return t.jsx("circle",{className:x?.trail,cx:v,cy:v,r:j,stroke:a||n.colorBgMuted,strokeWidth:b,strokeDasharray:`${$} ${C-$}`,strokeDashoffset:-T,transform:`rotate(${k} ${v} ${v})`,style:{...E,...p?.trail}},`trail-${D}`)}),Array.from({length:B},(F,D)=>{const T=D*($+S),O=I?I[D%I.length]:P;return t.jsx("circle",{className:x?.stroke,cx:v,cy:v,r:j,stroke:O,strokeWidth:b,strokeDasharray:`${$} ${C-$}`,strokeDashoffset:-T,transform:`rotate(${k} ${v} ${v})`,style:{...E,transition:"stroke-dasharray 0.3s ease",...p?.stroke}},`fill-${D}`)})]}),M&&t.jsx("span",{className:x?.text,style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:r==="success"||r==="exception"?z:H,color:n.colorText,lineHeight:1,...p?.text},children:h})]});return A&&h!=null?t.jsx(Wt,{content:t.jsx("span",{children:h}),children:W}):W}function Li(e,r){switch(e){case"top":return-90+r/2;case"bottom":return 90+r/2;case"left":return 180+r/2;case"right":return r/2}}const sp={success:n.colorSuccess,error:n.colorError,warning:n.colorWarning,info:n.colorPrimary,403:n.colorWarning,404:n.colorPrimary,500:n.colorError};function ip({color:e}){return t.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:e,stroke:"none",children:t.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})})}function lp({color:e}){return t.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:e,stroke:"none",children:t.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"})})}function ap({color:e}){return t.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:e,stroke:"none",children:t.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})})}function cp({color:e}){return t.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:e,stroke:"none",children:t.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})})}function dp({status:e,color:r}){switch(e){case"success":return t.jsx(ip,{color:r});case"error":return t.jsx(lp,{color:r});case"warning":return t.jsx(ap,{color:r});default:return t.jsx(cp,{color:r})}}function up({color:e}){const r=n.colorBgMuted;return t.jsxs("svg",{width:"250",height:"200",viewBox:"0 0 250 215",fill:"none",children:[t.jsx("path",{d:"M125 20L45 60v50c0 47.5 34 91.8 80 100 46-8.2 80-52.5 80-100V60L125 20z",fill:r,stroke:e,strokeWidth:"3"}),t.jsx("rect",{x:"99",y:"100",width:"52",height:"40",rx:"4",fill:e,opacity:"0.85"}),t.jsx("path",{d:"M108 100V88a17 17 0 0 1 34 0v12",stroke:e,strokeWidth:"4",strokeLinecap:"round",fill:"none"}),t.jsx("circle",{cx:"125",cy:"116",r:"5",fill:"#fff"}),t.jsx("rect",{x:"123",y:"119",width:"4",height:"10",rx:"2",fill:"#fff"})]})}function fp({color:e}){const r=n.colorBgMuted;return t.jsxs("svg",{width:"250",height:"200",viewBox:"0 0 250 200",fill:"none",children:[t.jsx("rect",{x:"65",y:"20",width:"120",height:"160",rx:"8",fill:r,stroke:e,strokeWidth:"3"}),t.jsx("path",{d:"M155 20v30h30",stroke:e,strokeWidth:"3",fill:n.colorBg}),t.jsx("rect",{x:"85",y:"70",width:"80",height:"6",rx:"3",fill:e,opacity:"0.2"}),t.jsx("rect",{x:"85",y:"86",width:"60",height:"6",rx:"3",fill:e,opacity:"0.15"}),t.jsx("rect",{x:"85",y:"102",width:"70",height:"6",rx:"3",fill:e,opacity:"0.1"}),t.jsx("circle",{cx:"175",cy:"140",r:"22",stroke:e,strokeWidth:"4",fill:"none"}),t.jsx("line",{x1:"191",y1:"156",x2:"210",y2:"175",stroke:e,strokeWidth:"5",strokeLinecap:"round"}),t.jsx("text",{x:"175",y:"148",textAnchor:"middle",fontSize:"24",fontWeight:"bold",fill:e,fontFamily:"sans-serif",children:"?"})]})}function hp({color:e}){const r=n.colorBgMuted;return t.jsxs("svg",{width:"250",height:"200",viewBox:"0 0 250 200",fill:"none",children:[t.jsx("rect",{x:"60",y:"50",width:"130",height:"110",rx:"10",fill:r,stroke:e,strokeWidth:"3"}),t.jsx("rect",{x:"80",y:"70",width:"90",height:"10",rx:"3",fill:e,opacity:"0.15"}),t.jsx("rect",{x:"80",y:"90",width:"90",height:"10",rx:"3",fill:e,opacity:"0.15"}),t.jsx("rect",{x:"80",y:"110",width:"90",height:"10",rx:"3",fill:e,opacity:"0.15"}),t.jsx("circle",{cx:"85",cy:"140",r:"4",fill:e,opacity:"0.3"}),t.jsx("circle",{cx:"100",cy:"140",r:"4",fill:e,opacity:"0.3"}),t.jsx("circle",{cx:"115",cy:"140",r:"4",fill:n.colorError}),t.jsxs("g",{transform:"translate(155, 110)",children:[t.jsx("path",{d:"M20 0L40 35H0L20 0z",fill:e}),t.jsx("text",{x:"20",y:"28",textAnchor:"middle",fontSize:"22",fontWeight:"bold",fill:"#fff",fontFamily:"sans-serif",children:"!"})]})]})}function pp({status:e,color:r}){switch(e){case 403:return t.jsx(up,{color:r});case 404:return t.jsx(fp,{color:r});case 500:return t.jsx(hp,{color:r});default:return null}}function gp({status:e="info",icon:r,title:o,subTitle:s,extra:l,children:a,className:c,style:u,classNames:f,styles:d}){const h=String(e),g=sp[h]||n.colorPrimary,m=e===403||e===404||e===500,x=r??(m?t.jsx(pp,{status:e,color:g}):t.jsx(dp,{status:h,color:g}));return t.jsxs("div",{className:Ve(c,f?.root),style:V({textAlign:"center",padding:"3rem 2rem"},d?.root,u),children:[t.jsx("div",{className:f?.icon,style:V({marginBottom:"1.5rem",fontSize:m?void 0:"4.5rem",lineHeight:1,display:"flex",justifyContent:"center",alignItems:"center"},d?.icon),children:x}),o!=null&&t.jsx("div",{className:f?.title,style:V({fontSize:"1.5rem",fontWeight:600,color:n.colorText,marginBottom:"0.5rem",lineHeight:1.35},d?.title),children:o}),s!=null&&t.jsx("div",{className:f?.subtitle,style:V({fontSize:"0.875rem",color:n.colorTextMuted,lineHeight:1.6},d?.subtitle),children:s}),l!=null&&t.jsx("div",{className:f?.extra,style:V({marginTop:"1.5rem",display:"flex",justifyContent:"center",gap:"0.5rem"},d?.extra),children:l}),a!=null&&t.jsx("div",{className:f?.content,style:V({marginTop:"1.5rem",textAlign:"left",background:n.colorBgSubtle,padding:"1.5rem",borderRadius:"0.5rem"},d?.content),children:a})]})}function mp(e,r){if(!e.startsWith("var("))return e;const o=r.style.color;r.style.color=e;const s=getComputedStyle(r).color;return r.style.color=o,s}function xp({content:e,image:r,rotate:o=-22,width:s=120,height:l=64,gap:a=[100,100],offset:c,zIndex:u=9,font:f={},children:d,className:h,style:g,classNames:m,styles:x}){const p=i.useRef(null),[b,v]=i.useState(""),[j,C]=a,w=s+j,y=l+C,[k,B]=c??[0,0],{color:R=n.colorText,fontSize:S=16,fontWeight:L="normal",fontStyle:$="normal",fontFamily:I="sans-serif"}=f;return i.useEffect(()=>{const P=p.current;if(!P)return;const E=document.createElement("canvas"),H=window.devicePixelRatio||1;E.width=w*H,E.height=y*H;const z=E.getContext("2d");if(z.scale(H,H),z.translate(w/2,y/2),z.rotate(o*Math.PI/180),r){let O=!1;const Y=new Image;return Y.crossOrigin="anonymous",Y.onload=()=>{O||(z.drawImage(Y,-s/2,-l/2,s,l),v(E.toDataURL()))},Y.onerror=()=>{O||v("")},Y.src=r,()=>{O=!0}}const A=Array.isArray(e)?e:e?[e]:[];if(A.length===0){v("");return}const M=mp(R,P),W=S*1.5,F=A.length*W;/rgba?\(.*,\s*[\d.]+\s*\)/.test(M)&&M.includes("rgba")||(z.globalAlpha=.15),z.font=`${$==="none"?"normal":$} ${L} ${S}px ${I}`,z.fillStyle=M,z.textAlign="center",z.textBaseline="middle";const T=-((F-W)/2);A.forEach((O,Y)=>{z.fillText(O,0,T+Y*W)}),v(E.toDataURL())},[e,r,o,s,l,w,y,R,S,L,$,I]),t.jsxs("div",{ref:p,className:Ve(h,m?.root),style:V({position:"relative"},x?.root,g),children:[d,b&&t.jsx("div",{className:m?.watermark,style:V({position:"absolute",inset:0,pointerEvents:"none",zIndex:u,backgroundImage:`url('${b}')`,backgroundRepeat:"repeat",backgroundSize:`${w}px ${y}px`,backgroundPosition:`${k}px ${B}px`},x?.watermark)})]})}exports.Affix=tl;exports.Alert=nn;exports.Anchor=Fa;exports.App=Rl;exports.AutoComplete=vc;exports.Avatar=e1;exports.BREAKPOINT_ORDER=Gn;exports.BREAKPOINT_VALUES=ir;exports.BackToTopIcon=na;exports.Badge=Jl;exports.BellIcon=ia;exports.Breadcrumb=Na;exports.Bubble=Hr;exports.Button=Wr;exports.Calendar=jd;exports.CalendarAdapterProvider=gd;exports.Card=Id;exports.Carousel=zd;exports.ChatIcon=sa;exports.Checkbox=Er;exports.CloseIcon=la;exports.Col=ls;exports.Collapse=Nd;exports.ColorPicker=_c;exports.ConfigProvider=Ll;exports.Content=us;exports.DataDisplay=mu;exports.DatePicker=ud;exports.DatePickerAdapterProvider=Qc;exports.DayjsAdapter=hd;exports.Divider=ha;exports.Drawer=Eh;exports.Dropdown=Ua;exports.Empty=Vs;exports.Flex=ga;exports.Footer=ds;exports.Form=Su;exports.Grid=xa;exports.Header=cs;exports.Image=au;exports.Input=Eu;exports.InputNumber=Ou;exports.Layout=Ca;exports.Mention=Uu;exports.Menu=tc;exports.Modal=qn;exports.NativeDateAdapter=_o;exports.NestedSelect=Tc;exports.Pagination=ys;exports.Placeholder=Nh;exports.PopConfirm=Dh;exports.Popover=rs;exports.Progress=ep;exports.QRCode=T1;exports.Radio=Zo;exports.Rate=tf;exports.Result=gp;exports.Row=is;exports.Select=gf;exports.Sider=fs;exports.Slider=bf;exports.Space=Ma;exports.Spinner=If;exports.Splitter=Da;exports.Statistic=W1;exports.Steps=cc;exports.Switch=$f;exports.Table=X1;exports.Tabs=bs;exports.Tag=th;exports.Text=aa;exports.ThemeProvider=Fi;exports.TimePicker=Of;exports.Timeline=lh;exports.Toggle=Df;exports.Tooltip=Wt;exports.Tour=xh;exports.Transfer=Gf;exports.Tree=T0;exports.TreeSelect=u0;exports.Upload=X0;exports.Waterfall=Ea;exports.Watermark=xp;exports.canUseDom=Ui;exports.classNames=Xn;exports.defaultConfig=ts;exports.en_US=Vo;exports.es_ES=Tl;exports.getResponsiveValue=Qi;exports.getScrollBarSize=Yi;exports.mergeSemanticClassName=Ve;exports.mergeSemanticStyle=V;exports.omit=qi;exports.scrollTo=Gi;exports.tokens=n;exports.useApp=es;exports.useBreakpoint=el;exports.useCompactItemContext=ka;exports.useConfig=Gt;exports.useEvent=Zi;exports.useForm=Xo;exports.useFormInstance=qs;exports.useMergedState=Ji;exports.useModal=Qn;exports.usePopAlert=Zn;exports.useSider=va;exports.useTheme=Ai;exports.useThemeMode=co;exports.useWatch=Us;exports.useWindowWidth=Un;
|
|
228
|
+
}`,document.head.appendChild(e),_n=!0}let Zh=0;function Jh(e,r,o,s,l){if(s){const a=s(r,o);return a===null||a===!1?null:a}return e==="success"?l?t.jsx(Uh,{color:n.colorSuccess}):t.jsx(Xh,{color:n.colorSuccess}):e==="exception"?l?t.jsx(qh,{color:n.colorError}):t.jsx(Gh,{color:n.colorError}):`${Math.round(r)}%`}function ep({percent:e=0,format:r,showInfo:o=!0,status:s,strokeColor:l,strokeLinecap:a="round",success:c,trailColor:u,type:f="line",steps:d,strokeWidth:h,size:g="default",percentPosition:m,width:x,gapDegree:p,gapPosition:b="bottom",className:v,style:j,classNames:C,styles:w}){Qh();const y=Math.max(0,Math.min(100,e)),k=Yh(s,y),B=f==="circle"||f==="dashboard",R=Math.max(0,Math.min(295,p??(f==="dashboard"?75:0))),S=Vh[k]||n.colorPrimary,{strokeHeight:E,lineWidth:$,sizePreset:I,resolvedCircleWidth:L}=_h(g,B,x),P=o?Jh(k,y,c?.percent,r,B):null;return B?d!=null&&d>0?t.jsx(np,{percent:y,resolvedStatus:k,statusColor:S,strokeColor:l,strokeWidth:h??6,trailColor:u,circleWidth:L,gapDegree:R,gapPosition:b,steps:d,infoContent:P,className:v,style:j,classNames:C,styles:w}):t.jsx(op,{percent:y,resolvedStatus:k,statusColor:S,strokeColor:l,strokeLinecap:a,strokeWidth:h??6,trailColor:u,success:c,circleWidth:L,gapDegree:R,gapPosition:b,infoContent:P,className:v,style:j,classNames:C,styles:w}):d!=null&&d>0?t.jsx(rp,{percent:y,statusColor:S,strokeColor:l,strokeLinecap:a,strokeWidth:h??E,trailColor:u,steps:d,sizePreset:I,infoContent:P,className:v,style:j,classNames:C,styles:w}):t.jsx(tp,{percent:y,resolvedStatus:k,statusColor:S,strokeColor:l,strokeLinecap:a,strokeWidth:h??E,trailColor:u,success:c,sizePreset:I,lineWidth:$,percentPosition:m,infoContent:P,className:v,style:j,classNames:C,styles:w})}function tp({percent:e,resolvedStatus:r,statusColor:o,strokeColor:s,strokeLinecap:l,strokeWidth:a,trailColor:c,success:u,sizePreset:f,lineWidth:d,percentPosition:h,infoContent:g,className:m,style:x,classNames:p,styles:b}){const v=l==="round"?a/2:0,j=Kh(s,o),C=h?.type||"outer",w=h?.align||"end",y=C==="inner",k=w==="start"?"flex-start":w==="center"?"center":"flex-end",B=t.jsx("div",{style:{flex:d?void 0:1,width:d,minWidth:0},children:t.jsxs("div",{className:p?.trail,style:{position:"relative",height:a,borderRadius:v,backgroundColor:c||n.colorBgMuted,overflow:"hidden",...b?.trail},children:[t.jsxs("div",{className:p?.stroke,style:{position:"absolute",top:0,left:0,height:"100%",width:`${e}%`,borderRadius:v,background:j,transition:"width 0.3s ease",...b?.stroke},children:[r==="active"&&t.jsx("div",{style:{position:"absolute",inset:0,borderRadius:v,background:"linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent)",animation:"j-progress-active 2.4s cubic-bezier(0.23, 1, 0.32, 1) infinite"}}),y&&g!=null&&t.jsx("span",{className:p?.text,style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:k,padding:"0 0.375rem",fontSize:Math.max(a*.7,10),color:"#fff",lineHeight:1,whiteSpace:"nowrap",overflow:"hidden",...b?.text},children:g})]}),u?.percent!=null&&u.percent>0&&t.jsx("div",{style:{position:"absolute",top:0,left:0,height:"100%",width:`${Math.min(100,u.percent)}%`,borderRadius:v,backgroundColor:u.strokeColor||n.colorSuccess,transition:"width 0.3s ease"}})]})}),R=!y&&g!=null?t.jsx("span",{className:p?.text,style:{flexShrink:0,fontSize:f==="small"?"0.8125rem":"0.875rem",color:n.colorText,lineHeight:1,display:"inline-flex",alignItems:"center",minWidth:"2.5em",...b?.text},children:g}):null;return t.jsxs("div",{className:m,style:{display:"flex",alignItems:"center",gap:"0.5rem",width:d?void 0:"100%",...x,...b?.root},children:[w==="start"&&R,B,w!=="start"&&R]})}function rp({percent:e,statusColor:r,strokeColor:o,strokeLinecap:s,strokeWidth:l,trailColor:a,steps:c,sizePreset:u,infoContent:f,className:d,style:h,classNames:g,styles:m}){const x=Math.round(e/100*c),p=s==="round"?l/2:0,b=Array.isArray(o)?o:null,v=typeof o=="string"?o:r;return t.jsxs("div",{className:d,style:{display:"flex",alignItems:"center",gap:"0.5rem",width:"100%",...h,...m?.root},children:[t.jsx("div",{className:g?.trail,style:{display:"flex",gap:"0.125rem",flex:1,...m?.trail},children:Array.from({length:c},(j,C)=>{const w=C<x,y=w?b?b[C%b.length]:v:a||n.colorBgMuted;return t.jsx("div",{className:w?g?.stroke:void 0,style:{flex:1,height:l,borderRadius:p,backgroundColor:y,transition:"background-color 0.3s ease",...w?m?.stroke:void 0}},C)})}),f!=null&&t.jsx("span",{className:g?.text,style:{flexShrink:0,fontSize:u==="small"?"0.8125rem":"0.875rem",color:n.colorText,lineHeight:1,display:"inline-flex",alignItems:"center",minWidth:"2.5em",...m?.text},children:f})]})}function op({percent:e,resolvedStatus:r,statusColor:o,strokeColor:s,strokeLinecap:l,strokeWidth:a,trailColor:c,success:u,circleWidth:f,gapDegree:d,gapPosition:h,infoContent:g,className:m,style:x,classNames:p,styles:b}){const v=i.useMemo(()=>`j-progress-grad-${++Zh}`,[]),j=a/100*f,C=f/2,w=C-j/2,y=2*Math.PI*w,k=d/360*y,B=y-k,R=e/100*B,S=Li(h,d),E=s!=null&&typeof s!="string"&&!Array.isArray(s)&&!("from"in s&&"to"in s)&&Object.keys(s).some(A=>A.includes("%")),$=E?Object.entries(s).sort((A,D)=>parseFloat(A[0])-parseFloat(D[0])):null,I=E?`url(#${v})`:typeof s=="string"?s:s&&"from"in s?s.from:o,L=u?.percent!=null?Math.min(100,u.percent)/100*B:0,P={fill:"none",strokeLinecap:l},H=f*.2,z=f*.3,F=f<=20,M=!F&&g!=null,W=t.jsxs("div",{className:m,style:{display:"inline-flex",position:"relative",...x,...b?.root},children:[t.jsxs("svg",{viewBox:`0 0 ${f} ${f}`,width:f,height:f,children:[$&&t.jsx("defs",{children:t.jsx("linearGradient",{id:v,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:$.map(([A,D])=>t.jsx("stop",{offset:A,stopColor:D},A))})}),t.jsx("circle",{className:p?.trail,cx:C,cy:C,r:w,stroke:c||n.colorBgMuted,strokeWidth:j,strokeDasharray:d>0?`${B} ${k}`:void 0,transform:`rotate(${S} ${C} ${C})`,style:{...P,...b?.trail}}),t.jsx("circle",{className:p?.stroke,cx:C,cy:C,r:w,stroke:I,strokeWidth:j,strokeDasharray:`${R} ${y}`,transform:`rotate(${S} ${C} ${C})`,style:{...P,transition:"stroke-dasharray 0.3s ease",...b?.stroke}}),L>0&&t.jsx("circle",{cx:C,cy:C,r:w,stroke:u.strokeColor||n.colorSuccess,strokeWidth:j,strokeDasharray:`${L} ${y}`,transform:`rotate(${S} ${C} ${C})`,style:P})]}),M&&t.jsx("span",{className:p?.text,style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:r==="success"||r==="exception"?z:H,color:n.colorText,lineHeight:1,...b?.text},children:g})]});return F&&g!=null?t.jsx(Wt,{content:t.jsx("span",{children:g}),children:W}):W}function np({percent:e,resolvedStatus:r,statusColor:o,strokeColor:s,strokeWidth:l,trailColor:a,circleWidth:c,gapDegree:u,gapPosition:f,steps:d,infoContent:h,className:g,style:m,classNames:x,styles:p}){const b=l/100*c,v=c/2,j=v-b/2,C=2*Math.PI*j,w=u/360*C,y=C-w,k=Li(f,u),B=Math.round(e/100*d),S=2/360*C,E=S*d,$=(y-E)/d,I=Array.isArray(s)?s:null,L=typeof s=="string"?s:o,P={fill:"none",strokeLinecap:"butt"},H=c*.2,z=c*.3,F=c<=20,M=!F&&h!=null,W=t.jsxs("div",{className:g,style:{display:"inline-flex",position:"relative",...m,...p?.root},children:[t.jsxs("svg",{viewBox:`0 0 ${c} ${c}`,width:c,height:c,children:[Array.from({length:d},(A,D)=>{const T=D*($+S);return t.jsx("circle",{className:x?.trail,cx:v,cy:v,r:j,stroke:a||n.colorBgMuted,strokeWidth:b,strokeDasharray:`${$} ${C-$}`,strokeDashoffset:-T,transform:`rotate(${k} ${v} ${v})`,style:{...P,...p?.trail}},`trail-${D}`)}),Array.from({length:B},(A,D)=>{const T=D*($+S),O=I?I[D%I.length]:L;return t.jsx("circle",{className:x?.stroke,cx:v,cy:v,r:j,stroke:O,strokeWidth:b,strokeDasharray:`${$} ${C-$}`,strokeDashoffset:-T,transform:`rotate(${k} ${v} ${v})`,style:{...P,transition:"stroke-dasharray 0.3s ease",...p?.stroke}},`fill-${D}`)})]}),M&&t.jsx("span",{className:x?.text,style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:r==="success"||r==="exception"?z:H,color:n.colorText,lineHeight:1,...p?.text},children:h})]});return F&&h!=null?t.jsx(Wt,{content:t.jsx("span",{children:h}),children:W}):W}function Li(e,r){switch(e){case"top":return-90+r/2;case"bottom":return 90+r/2;case"left":return 180+r/2;case"right":return r/2}}const sp={success:n.colorSuccess,error:n.colorError,warning:n.colorWarning,info:n.colorPrimary,403:n.colorWarning,404:n.colorPrimary,500:n.colorError};function ip({color:e}){return t.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:e,stroke:"none",children:t.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})})}function lp({color:e}){return t.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:e,stroke:"none",children:t.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"})})}function ap({color:e}){return t.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:e,stroke:"none",children:t.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})})}function cp({color:e}){return t.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:e,stroke:"none",children:t.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})})}function dp({status:e,color:r}){switch(e){case"success":return t.jsx(ip,{color:r});case"error":return t.jsx(lp,{color:r});case"warning":return t.jsx(ap,{color:r});default:return t.jsx(cp,{color:r})}}function up({color:e}){const r=n.colorBgMuted;return t.jsxs("svg",{width:"250",height:"200",viewBox:"0 0 250 215",fill:"none",children:[t.jsx("path",{d:"M125 20L45 60v50c0 47.5 34 91.8 80 100 46-8.2 80-52.5 80-100V60L125 20z",fill:r,stroke:e,strokeWidth:"3"}),t.jsx("rect",{x:"99",y:"100",width:"52",height:"40",rx:"4",fill:e,opacity:"0.85"}),t.jsx("path",{d:"M108 100V88a17 17 0 0 1 34 0v12",stroke:e,strokeWidth:"4",strokeLinecap:"round",fill:"none"}),t.jsx("circle",{cx:"125",cy:"116",r:"5",fill:"#fff"}),t.jsx("rect",{x:"123",y:"119",width:"4",height:"10",rx:"2",fill:"#fff"})]})}function fp({color:e}){const r=n.colorBgMuted;return t.jsxs("svg",{width:"250",height:"200",viewBox:"0 0 250 200",fill:"none",children:[t.jsx("rect",{x:"65",y:"20",width:"120",height:"160",rx:"8",fill:r,stroke:e,strokeWidth:"3"}),t.jsx("path",{d:"M155 20v30h30",stroke:e,strokeWidth:"3",fill:n.colorBg}),t.jsx("rect",{x:"85",y:"70",width:"80",height:"6",rx:"3",fill:e,opacity:"0.2"}),t.jsx("rect",{x:"85",y:"86",width:"60",height:"6",rx:"3",fill:e,opacity:"0.15"}),t.jsx("rect",{x:"85",y:"102",width:"70",height:"6",rx:"3",fill:e,opacity:"0.1"}),t.jsx("circle",{cx:"175",cy:"140",r:"22",stroke:e,strokeWidth:"4",fill:"none"}),t.jsx("line",{x1:"191",y1:"156",x2:"210",y2:"175",stroke:e,strokeWidth:"5",strokeLinecap:"round"}),t.jsx("text",{x:"175",y:"148",textAnchor:"middle",fontSize:"24",fontWeight:"bold",fill:e,fontFamily:"sans-serif",children:"?"})]})}function hp({color:e}){const r=n.colorBgMuted;return t.jsxs("svg",{width:"250",height:"200",viewBox:"0 0 250 200",fill:"none",children:[t.jsx("rect",{x:"60",y:"50",width:"130",height:"110",rx:"10",fill:r,stroke:e,strokeWidth:"3"}),t.jsx("rect",{x:"80",y:"70",width:"90",height:"10",rx:"3",fill:e,opacity:"0.15"}),t.jsx("rect",{x:"80",y:"90",width:"90",height:"10",rx:"3",fill:e,opacity:"0.15"}),t.jsx("rect",{x:"80",y:"110",width:"90",height:"10",rx:"3",fill:e,opacity:"0.15"}),t.jsx("circle",{cx:"85",cy:"140",r:"4",fill:e,opacity:"0.3"}),t.jsx("circle",{cx:"100",cy:"140",r:"4",fill:e,opacity:"0.3"}),t.jsx("circle",{cx:"115",cy:"140",r:"4",fill:n.colorError}),t.jsxs("g",{transform:"translate(155, 110)",children:[t.jsx("path",{d:"M20 0L40 35H0L20 0z",fill:e}),t.jsx("text",{x:"20",y:"28",textAnchor:"middle",fontSize:"22",fontWeight:"bold",fill:"#fff",fontFamily:"sans-serif",children:"!"})]})]})}function pp({status:e,color:r}){switch(e){case 403:return t.jsx(up,{color:r});case 404:return t.jsx(fp,{color:r});case 500:return t.jsx(hp,{color:r});default:return null}}function gp({status:e="info",icon:r,title:o,subTitle:s,extra:l,children:a,className:c,style:u,classNames:f,styles:d}){const h=String(e),g=sp[h]||n.colorPrimary,m=e===403||e===404||e===500,x=r??(m?t.jsx(pp,{status:e,color:g}):t.jsx(dp,{status:h,color:g}));return t.jsxs("div",{className:Ye(c,f?.root),style:V({textAlign:"center",padding:"3rem 2rem"},d?.root,u),children:[t.jsx("div",{className:f?.icon,style:V({marginBottom:"1.5rem",fontSize:m?void 0:"4.5rem",lineHeight:1,display:"flex",justifyContent:"center",alignItems:"center"},d?.icon),children:x}),o!=null&&t.jsx("div",{className:f?.title,style:V({fontSize:"1.5rem",fontWeight:600,color:n.colorText,marginBottom:"0.5rem",lineHeight:1.35},d?.title),children:o}),s!=null&&t.jsx("div",{className:f?.subtitle,style:V({fontSize:"0.875rem",color:n.colorTextMuted,lineHeight:1.6},d?.subtitle),children:s}),l!=null&&t.jsx("div",{className:f?.extra,style:V({marginTop:"1.5rem",display:"flex",justifyContent:"center",gap:"0.5rem"},d?.extra),children:l}),a!=null&&t.jsx("div",{className:f?.content,style:V({marginTop:"1.5rem",textAlign:"left",background:n.colorBgSubtle,padding:"1.5rem",borderRadius:"0.5rem"},d?.content),children:a})]})}function mp(e,r){if(!e.startsWith("var("))return e;const o=r.style.color;r.style.color=e;const s=getComputedStyle(r).color;return r.style.color=o,s}function xp({content:e,image:r,rotate:o=-22,width:s=120,height:l=64,gap:a=[100,100],offset:c,zIndex:u=9,font:f={},children:d,className:h,style:g,classNames:m,styles:x}){const p=i.useRef(null),[b,v]=i.useState(""),[j,C]=a,w=s+j,y=l+C,[k,B]=c??[0,0],{color:R=n.colorText,fontSize:S=16,fontWeight:E="normal",fontStyle:$="normal",fontFamily:I="sans-serif"}=f;return i.useEffect(()=>{const L=p.current;if(!L)return;const P=document.createElement("canvas"),H=window.devicePixelRatio||1;P.width=w*H,P.height=y*H;const z=P.getContext("2d");if(z.scale(H,H),z.translate(w/2,y/2),z.rotate(o*Math.PI/180),r){let O=!1;const Y=new Image;return Y.crossOrigin="anonymous",Y.onload=()=>{O||(z.drawImage(Y,-s/2,-l/2,s,l),v(P.toDataURL()))},Y.onerror=()=>{O||v("")},Y.src=r,()=>{O=!0}}const F=Array.isArray(e)?e:e?[e]:[];if(F.length===0){v("");return}const M=mp(R,L),W=S*1.5,A=F.length*W;/rgba?\(.*,\s*[\d.]+\s*\)/.test(M)&&M.includes("rgba")||(z.globalAlpha=.15),z.font=`${$==="none"?"normal":$} ${E} ${S}px ${I}`,z.fillStyle=M,z.textAlign="center",z.textBaseline="middle";const T=-((A-W)/2);F.forEach((O,Y)=>{z.fillText(O,0,T+Y*W)}),v(P.toDataURL())},[e,r,o,s,l,w,y,R,S,E,$,I]),t.jsxs("div",{ref:p,className:Ye(h,m?.root),style:V({position:"relative"},x?.root,g),children:[d,b&&t.jsx("div",{className:m?.watermark,style:V({position:"absolute",inset:0,pointerEvents:"none",zIndex:u,backgroundImage:`url('${b}')`,backgroundRepeat:"repeat",backgroundSize:`${w}px ${y}px`,backgroundPosition:`${k}px ${B}px`},x?.watermark)})]})}exports.Affix=tl;exports.Alert=nn;exports.Anchor=Fa;exports.App=Rl;exports.AutoComplete=vc;exports.Avatar=e1;exports.BREAKPOINT_ORDER=Gn;exports.BREAKPOINT_VALUES=ir;exports.BackToTopIcon=na;exports.Badge=Jl;exports.BellIcon=ia;exports.Breadcrumb=Na;exports.Bubble=Hr;exports.Button=Wr;exports.Calendar=jd;exports.CalendarAdapterProvider=gd;exports.Card=Id;exports.Carousel=zd;exports.ChatIcon=sa;exports.Checkbox=Er;exports.CloseIcon=la;exports.Col=ls;exports.Collapse=Nd;exports.ColorPicker=_c;exports.ConfigProvider=Ll;exports.Content=us;exports.DataDisplay=mu;exports.DatePicker=ud;exports.DatePickerAdapterProvider=Qc;exports.DayjsAdapter=hd;exports.Divider=ha;exports.Drawer=Eh;exports.Dropdown=Ua;exports.Empty=Vs;exports.Flex=ga;exports.Footer=ds;exports.Form=Su;exports.Grid=xa;exports.Header=cs;exports.Image=au;exports.Input=Eu;exports.InputNumber=Ou;exports.Layout=Ca;exports.Mention=Uu;exports.Menu=tc;exports.Modal=qn;exports.NativeDateAdapter=_o;exports.NestedSelect=Tc;exports.Pagination=ys;exports.Placeholder=Nh;exports.PopConfirm=Dh;exports.Popover=rs;exports.Progress=ep;exports.QRCode=T1;exports.Radio=Zo;exports.Rate=tf;exports.Result=gp;exports.Row=is;exports.Select=gf;exports.Sider=fs;exports.Slider=bf;exports.Space=Ma;exports.Spinner=If;exports.Splitter=Da;exports.Statistic=W1;exports.Steps=cc;exports.Switch=$f;exports.Table=X1;exports.Tabs=bs;exports.Tag=th;exports.Text=aa;exports.ThemeProvider=Fi;exports.TimePicker=Of;exports.Timeline=lh;exports.Toggle=Df;exports.Tooltip=Wt;exports.Tour=xh;exports.Transfer=Gf;exports.Tree=T0;exports.TreeSelect=u0;exports.Upload=X0;exports.Waterfall=Ea;exports.Watermark=xp;exports.canUseDom=Ui;exports.classNames=Xn;exports.defaultConfig=ts;exports.en_US=Vo;exports.es_ES=Tl;exports.getResponsiveValue=Qi;exports.getScrollBarSize=Yi;exports.mergeSemanticClassName=Ye;exports.mergeSemanticStyle=V;exports.omit=qi;exports.scrollTo=Gi;exports.tokens=n;exports.useApp=es;exports.useBreakpoint=el;exports.useCompactItemContext=ka;exports.useConfig=Gt;exports.useEvent=Zi;exports.useForm=Xo;exports.useFormInstance=qs;exports.useMergedState=Ji;exports.useModal=Qn;exports.usePopAlert=Zn;exports.useSider=va;exports.useTheme=Ai;exports.useThemeMode=co;exports.useWatch=Us;exports.useWindowWidth=Un;
|
|
229
229
|
//# sourceMappingURL=ino-ui.cjs.map
|