@gientech/modual 2.0.11 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import{jsx as a,jsxs as O,Fragment as he}from"react/jsx-runtime";import*as j from"react";import{isValidElement as $e,useMemo as ie,useState as h,useRef as Ce,useCallback as ue,useEffect as xe}from"react";import{u as Ve}from"./index-CpW6Dhpp.js";import{F as Pe,J as K,C as Re,T as je,U as We,m as Ue}from"./index-CN2AYX8Q.js";import{a as He,g as Ge,m as Ze,$ as qe,a0 as Ye,r as Ke,a1 as Xe,a2 as Je,a3 as Qe,l as et,f as le,a4 as tt,u as ut,a5 as at,T as ce,Z as st,o as ot,M as nt,b as rt,a6 as it,i as be}from"./index-LDFwTu47.js";import{O as we}from"./index-DYhXjvk4.js";/* empty css */import{s as Y,M as ye}from"./style-Bn7b5XHU.js";import{I as ke}from"./index-D0DDewJ2.js";import{D as Ie}from"./index-CBTA5S-5.js";import{X as ge}from"./x-vfKYzKkK.js";import"react-dom";import{B as De,T as Te}from"./index-s0cmC4Ks.js";/**
1
+ import{jsx as a,jsxs as O,Fragment as he}from"react/jsx-runtime";import*as j from"react";import{isValidElement as $e,useMemo as ie,useState as h,useRef as Ce,useCallback as ue,useEffect as xe}from"react";import{u as Ve}from"./index-CpW6Dhpp.js";import{F as Pe,J as K,C as Re,T as je,U as We,m as Ue}from"./index-md7-ni21.js";import{a as He,g as Ge,m as Ze,$ as qe,a0 as Ye,r as Ke,a1 as Xe,a2 as Je,a3 as Qe,l as et,f as le,a4 as tt,u as ut,a5 as at,T as ce,Z as st,o as ot,M as nt,b as rt,a6 as it,i as be}from"./index-BRq6VK9v.js";import{O as we}from"./index-BDoDq_qz.js";/* empty css */import{s as Y,M as ye}from"./style-BXl32bWg.js";import{q as ke}from"./index-CJZ9OITS.js";import{D as Ie}from"./index-DKwGCqM2.js";import{X as ge}from"./x-D-pV1NCt.js";import"react-dom";import{B as De,T as Te}from"./index-BfDZSwG3.js";/**
2
2
  * @license lucide-react v0.456.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import*as n from"react";import{y as je,z as Ie,A as re,f as x,E as ce,G as Me,H as de,p as me,J as j,L as fe,M as ie,N as ve,P as _e,u as Ce,O as ze,Q as ge,g as He,m as Le,k as q,U as We,V as Ke,W as Te,X as Ae,Y as Be,Z as he,l as Fe}from"./index-LDFwTu47.js";import{S as Ve,u as Ue}from"./style-Bn7b5XHU.js";var be=n.createContext(null),we=n.createContext({}),Xe=["prefixCls","className","containerRef"],Ye=function(t){var a=t.prefixCls,o=t.className,r=t.containerRef,l=je(t,Xe),i=n.useContext(we),s=i.panel,b=Ie(s,r);return n.createElement("div",re({className:x("".concat(a,"-content"),o),role:"dialog",ref:b},ce(t,{aria:!0}),{"aria-modal":"true"},l))};function ye(e){return typeof e=="string"&&String(Number(e))===e?(Me(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(e)):e}var pe={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Ge(e,t){var a,o,r,l=e.prefixCls,i=e.open,s=e.placement,b=e.inline,C=e.push,O=e.forceRender,y=e.autoFocus,E=e.keyboard,f=e.classNames,d=e.rootClassName,u=e.rootStyle,v=e.zIndex,p=e.className,I=e.id,P=e.style,S=e.motion,D=e.width,N=e.height,g=e.children,w=e.mask,M=e.maskClosable,R=e.maskMotion,J=e.maskClassName,L=e.maskStyle,z=e.afterOpenChange,$=e.onClose,K=e.onMouseEnter,Q=e.onMouseOver,ee=e.onMouseLeave,X=e.onClick,te=e.onKeyDown,ne=e.onKeyUp,h=e.styles,T=e.drawerRender,_=n.useRef(),A=n.useRef(),B=n.useRef();n.useImperativeHandle(t,function(){return _.current});var ae=function(k){var Y=k.keyCode,G=k.shiftKey;switch(Y){case ie.TAB:{if(Y===ie.TAB){if(!G&&document.activeElement===B.current){var Z;(Z=A.current)===null||Z===void 0||Z.focus({preventScroll:!0})}else if(G&&document.activeElement===A.current){var le;(le=B.current)===null||le===void 0||le.focus({preventScroll:!0})}}break}case ie.ESC:{$&&E&&(k.stopPropagation(),$(k));break}}};n.useEffect(function(){if(i&&y){var c;(c=_.current)===null||c===void 0||c.focus({preventScroll:!0})}},[i]);var oe=n.useState(!1),F=de(oe,2),H=F[0],W=F[1],m=n.useContext(be),se;typeof C=="boolean"?se=C?{}:{distance:0}:se=C||{};var V=(a=(o=(r=se)===null||r===void 0?void 0:r.distance)!==null&&o!==void 0?o:m==null?void 0:m.pushDistance)!==null&&a!==void 0?a:180,Ne=n.useMemo(function(){return{pushDistance:V,push:function(){W(!0)},pull:function(){W(!1)}}},[V]);n.useEffect(function(){if(i){var c;m==null||(c=m.push)===null||c===void 0||c.call(m)}else{var k;m==null||(k=m.pull)===null||k===void 0||k.call(m)}},[i]),n.useEffect(function(){return function(){var c;m==null||(c=m.pull)===null||c===void 0||c.call(m)}},[]);var Ee=n.createElement(me,re({key:"mask"},R,{visible:w&&i}),function(c,k){var Y=c.className,G=c.style;return n.createElement("div",{className:x("".concat(l,"-mask"),Y,f==null?void 0:f.mask,J),style:j(j(j({},G),L),h==null?void 0:h.mask),onClick:M&&i?$:void 0,ref:k})}),Pe=typeof S=="function"?S(s):S,U={};if(H&&V)switch(s){case"top":U.transform="translateY(".concat(V,"px)");break;case"bottom":U.transform="translateY(".concat(-V,"px)");break;case"left":U.transform="translateX(".concat(V,"px)");break;default:U.transform="translateX(".concat(-V,"px)");break}s==="left"||s==="right"?U.width=ye(D):U.height=ye(N);var De={onMouseEnter:K,onMouseOver:Q,onMouseLeave:ee,onClick:X,onKeyDown:te,onKeyUp:ne},Re=n.createElement(me,re({key:"panel"},Pe,{visible:i,forceRender:O,onVisibleChanged:function(k){z==null||z(k)},removeOnLeave:!1,leavedClassName:"".concat(l,"-content-wrapper-hidden")}),function(c,k){var Y=c.className,G=c.style,Z=n.createElement(Ye,re({id:I,containerRef:k,prefixCls:l,className:x(p,f==null?void 0:f.content),style:j(j({},P),h==null?void 0:h.content)},ce(e,{aria:!0}),De),g);return n.createElement("div",re({className:x("".concat(l,"-content-wrapper"),f==null?void 0:f.wrapper,Y),style:j(j(j({},U),G),h==null?void 0:h.wrapper)},ce(e,{data:!0})),T?T(Z):Z)}),ue=j({},u);return v&&(ue.zIndex=v),n.createElement(be.Provider,{value:Ne},n.createElement("div",{className:x(l,"".concat(l,"-").concat(s),d,fe(fe({},"".concat(l,"-open"),i),"".concat(l,"-inline"),b)),style:ue,tabIndex:-1,ref:_,onKeyDown:ae},Ee,n.createElement("div",{tabIndex:0,ref:A,style:pe,"aria-hidden":"true","data-sentinel":"start"}),Re,n.createElement("div",{tabIndex:0,ref:B,style:pe,"aria-hidden":"true","data-sentinel":"end"})))}var Ze=n.forwardRef(Ge),qe=function(t){var a=t.open,o=a===void 0?!1:a,r=t.prefixCls,l=r===void 0?"rc-drawer":r,i=t.placement,s=i===void 0?"right":i,b=t.autoFocus,C=b===void 0?!0:b,O=t.keyboard,y=O===void 0?!0:O,E=t.width,f=E===void 0?378:E,d=t.mask,u=d===void 0?!0:d,v=t.maskClosable,p=v===void 0?!0:v,I=t.getContainer,P=t.forceRender,S=t.afterOpenChange,D=t.destroyOnClose,N=t.onMouseEnter,g=t.onMouseOver,w=t.onMouseLeave,M=t.onClick,R=t.onKeyDown,J=t.onKeyUp,L=t.panelRef,z=n.useState(!1),$=de(z,2),K=$[0],Q=$[1],ee=n.useState(!1),X=de(ee,2),te=X[0],ne=X[1];ve(function(){ne(!0)},[]);var h=te?o:!1,T=n.useRef(),_=n.useRef();ve(function(){h&&(_.current=document.activeElement)},[h]);var A=function(H){var W;if(Q(H),S==null||S(H),!H&&_.current&&!((W=T.current)!==null&&W!==void 0&&W.contains(_.current))){var m;(m=_.current)===null||m===void 0||m.focus({preventScroll:!0})}},B=n.useMemo(function(){return{panel:L}},[L]);if(!P&&!K&&!h&&D)return null;var ae={onMouseEnter:N,onMouseOver:g,onMouseLeave:w,onClick:M,onKeyDown:R,onKeyUp:J},oe=j(j({},t),{},{open:h,prefixCls:l,placement:s,autoFocus:C,keyboard:y,width:f,mask:u,maskClosable:p,inline:I===!1,afterOpenChange:A,ref:T},ae);return n.createElement(we.Provider,{value:B},n.createElement(_e,{open:h||P||K,autoDestroy:!1,getContainer:I,autoLock:u&&(h||K)},n.createElement(Ze,oe)))};const xe=e=>{var t,a;const{prefixCls:o,title:r,footer:l,extra:i,closable:s,loading:b,onClose:C,headerStyle:O,bodyStyle:y,footerStyle:E,children:f,classNames:d,styles:u}=e,v=Ce("drawer");let p;s===!1?p=void 0:s===void 0||s===!0?p="start":p=(s==null?void 0:s.placement)==="end"?"end":"start";const I=n.useCallback(g=>n.createElement("button",{type:"button",onClick:C,className:x(`${o}-close`,{[`${o}-close-${p}`]:p==="end"})},g),[C,o,p]),[P,S]=ze(ge(e),ge(v),{closable:!0,closeIconRender:I}),D=()=>{var g,w;return!r&&!P?null:n.createElement("div",{style:Object.assign(Object.assign(Object.assign({},(g=v.styles)===null||g===void 0?void 0:g.header),O),u==null?void 0:u.header),className:x(`${o}-header`,{[`${o}-header-close-only`]:P&&!r&&!i},(w=v.classNames)===null||w===void 0?void 0:w.header,d==null?void 0:d.header)},n.createElement("div",{className:`${o}-header-title`},p==="start"&&S,r&&n.createElement("div",{className:`${o}-title`},r)),i&&n.createElement("div",{className:`${o}-extra`},i),p==="end"&&S)},N=()=>{var g,w;if(!l)return null;const M=`${o}-footer`;return n.createElement("div",{className:x(M,(g=v.classNames)===null||g===void 0?void 0:g.footer,d==null?void 0:d.footer),style:Object.assign(Object.assign(Object.assign({},(w=v.styles)===null||w===void 0?void 0:w.footer),E),u==null?void 0:u.footer)},l)};return n.createElement(n.Fragment,null,D(),n.createElement("div",{className:x(`${o}-body`,d==null?void 0:d.body,(t=v.classNames)===null||t===void 0?void 0:t.body),style:Object.assign(Object.assign(Object.assign({},(a=v.styles)===null||a===void 0?void 0:a.body),y),u==null?void 0:u.body)},b?n.createElement(Ve,{active:!0,title:!1,paragraph:{rows:5},className:`${o}-body-skeleton`}):f),N())},Je=e=>{const t="100%";return{left:`translateX(-${t})`,right:`translateX(${t})`,top:`translateY(-${t})`,bottom:`translateY(${t})`}[e]},Se=(e,t)=>({"&-enter, &-appear":Object.assign(Object.assign({},e),{"&-active":t}),"&-leave":Object.assign(Object.assign({},t),{"&-active":e})}),ke=(e,t)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${t}`}}},Se({opacity:e},{opacity:1})),Qe=(e,t)=>[ke(.7,t),Se({transform:Je(e)},{transform:"none"})],et=e=>{const{componentCls:t,motionDurationSlow:a}=e;return{[t]:{[`${t}-mask-motion`]:ke(0,a),[`${t}-panel-motion`]:["left","right","top","bottom"].reduce((o,r)=>Object.assign(Object.assign({},o),{[`&-${r}`]:Qe(r,a)}),{})}}},tt=e=>{const{borderRadiusSM:t,componentCls:a,zIndexPopup:o,colorBgMask:r,colorBgElevated:l,motionDurationSlow:i,motionDurationMid:s,paddingXS:b,padding:C,paddingLG:O,fontSizeLG:y,lineHeightLG:E,lineWidth:f,lineType:d,colorSplit:u,marginXS:v,colorIcon:p,colorIconHover:I,colorBgTextHover:P,colorBgTextActive:S,colorText:D,fontWeightStrong:N,footerPaddingBlock:g,footerPaddingInline:w,calc:M}=e,R=`${a}-content-wrapper`;return{[a]:{position:"fixed",inset:0,zIndex:o,pointerEvents:"none",color:D,"&-pure":{position:"relative",background:l,display:"flex",flexDirection:"column",[`&${a}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${a}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${a}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${a}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${a}-mask`]:{position:"absolute",inset:0,zIndex:o,background:r,pointerEvents:"auto"},[R]:{position:"absolute",zIndex:o,maxWidth:"100vw",transition:`all ${i}`,"&-hidden":{display:"none"}},[`&-left > ${R}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${R}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${R}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${R}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${a}-content`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:l,pointerEvents:"auto"},[`${a}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${q(C)} ${q(O)}`,fontSize:y,lineHeight:E,borderBottom:`${q(f)} ${d} ${u}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${a}-extra`]:{flex:"none"},[`${a}-close`]:Object.assign({display:"inline-flex",width:M(y).add(b).equal(),height:M(y).add(b).equal(),borderRadius:t,justifyContent:"center",alignItems:"center",color:p,fontWeight:N,fontSize:y,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:`all ${s}`,textRendering:"auto",[`&${a}-close-end`]:{marginInlineStart:v},[`&:not(${a}-close-end)`]:{marginInlineEnd:v},"&:hover":{color:I,backgroundColor:P,textDecoration:"none"},"&:active":{backgroundColor:S}},We(e)),[`${a}-title`]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:y,lineHeight:E},[`${a}-body`]:{flex:1,minWidth:0,minHeight:0,padding:O,overflow:"auto",[`${a}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},[`${a}-footer`]:{flexShrink:0,padding:`${q(g)} ${q(w)}`,borderTop:`${q(f)} ${d} ${u}`},"&-rtl":{direction:"rtl"}}}},nt=e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding}),Oe=He("Drawer",e=>{const t=Le(e,{});return[tt(t),et(t)]},nt);var $e=function(e,t){var a={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(a[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(a[o[r]]=e[o[r]]);return a};const at={distance:180},ot=e=>{const{rootClassName:t,width:a,height:o,size:r="default",mask:l=!0,push:i=at,open:s,afterOpenChange:b,onClose:C,prefixCls:O,getContainer:y,panelRef:E=null,style:f,className:d,visible:u,afterVisibleChange:v,maskStyle:p,drawerStyle:I,contentWrapperStyle:P,destroyOnClose:S,destroyOnHidden:D}=e,N=$e(e,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","panelRef","style","className","visible","afterVisibleChange","maskStyle","drawerStyle","contentWrapperStyle","destroyOnClose","destroyOnHidden"]),{getPopupContainer:g,getPrefixCls:w,direction:M,className:R,style:J,classNames:L,styles:z}=Ce("drawer"),$=w("drawer",O),[K,Q,ee]=Oe($),X=y===void 0&&g?()=>g(document.body):y,te=x({"no-mask":!l,[`${$}-rtl`]:M==="rtl"},t,Q,ee),ne=n.useMemo(()=>a??(r==="large"?736:378),[a,r]),h=n.useMemo(()=>o??(r==="large"?736:378),[o,r]),T={motionName:he($,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},_=W=>({motionName:he($,`panel-motion-${W}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),A=Ue(),B=Ke(E,A),[ae,oe]=Te("Drawer",N.zIndex),{classNames:F={},styles:H={}}=N;return K(n.createElement(Ae,{form:!0,space:!0},n.createElement(Be.Provider,{value:oe},n.createElement(qe,Object.assign({prefixCls:$,onClose:C,maskMotion:T,motion:_},N,{classNames:{mask:x(F.mask,L.mask),content:x(F.content,L.content),wrapper:x(F.wrapper,L.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},H.mask),p),z.mask),content:Object.assign(Object.assign(Object.assign({},H.content),I),z.content),wrapper:Object.assign(Object.assign(Object.assign({},H.wrapper),P),z.wrapper)},open:s??u,mask:l,push:i,width:ne,height:h,style:Object.assign(Object.assign({},J),f),className:x(R,d),rootClassName:te,getContainer:X,afterOpenChange:b??v,panelRef:B,zIndex:ae,destroyOnClose:D??S}),n.createElement(xe,Object.assign({prefixCls:$},N,{onClose:C}))))))},rt=e=>{const{prefixCls:t,style:a,className:o,placement:r="right"}=e,l=$e(e,["prefixCls","style","className","placement"]),{getPrefixCls:i}=n.useContext(Fe),s=i("drawer",t),[b,C,O]=Oe(s),y=x(s,`${s}-pure`,`${s}-${r}`,C,O,o);return b(n.createElement("div",{className:y,style:a},n.createElement(xe,Object.assign({prefixCls:s},l))))};ot._InternalPanelDoNotUseOrYouWillBeFired=rt;export{ot as D};
1
+ import*as n from"react";import{y as je,z as Ie,A as re,f as x,E as ce,G as Me,H as de,p as me,J as j,L as fe,M as ie,N as ve,P as _e,u as Ce,O as ze,Q as ge,g as He,m as Le,k as q,U as We,V as Ke,W as Te,X as Ae,Y as Be,Z as he,l as Fe}from"./index-BRq6VK9v.js";import{S as Ve,u as Ue}from"./style-BXl32bWg.js";var be=n.createContext(null),we=n.createContext({}),Xe=["prefixCls","className","containerRef"],Ye=function(t){var a=t.prefixCls,o=t.className,r=t.containerRef,l=je(t,Xe),i=n.useContext(we),s=i.panel,b=Ie(s,r);return n.createElement("div",re({className:x("".concat(a,"-content"),o),role:"dialog",ref:b},ce(t,{aria:!0}),{"aria-modal":"true"},l))};function ye(e){return typeof e=="string"&&String(Number(e))===e?(Me(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(e)):e}var pe={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Ge(e,t){var a,o,r,l=e.prefixCls,i=e.open,s=e.placement,b=e.inline,C=e.push,O=e.forceRender,y=e.autoFocus,E=e.keyboard,f=e.classNames,d=e.rootClassName,u=e.rootStyle,v=e.zIndex,p=e.className,I=e.id,P=e.style,S=e.motion,D=e.width,N=e.height,g=e.children,w=e.mask,M=e.maskClosable,R=e.maskMotion,J=e.maskClassName,L=e.maskStyle,z=e.afterOpenChange,$=e.onClose,K=e.onMouseEnter,Q=e.onMouseOver,ee=e.onMouseLeave,X=e.onClick,te=e.onKeyDown,ne=e.onKeyUp,h=e.styles,T=e.drawerRender,_=n.useRef(),A=n.useRef(),B=n.useRef();n.useImperativeHandle(t,function(){return _.current});var ae=function(k){var Y=k.keyCode,G=k.shiftKey;switch(Y){case ie.TAB:{if(Y===ie.TAB){if(!G&&document.activeElement===B.current){var Z;(Z=A.current)===null||Z===void 0||Z.focus({preventScroll:!0})}else if(G&&document.activeElement===A.current){var le;(le=B.current)===null||le===void 0||le.focus({preventScroll:!0})}}break}case ie.ESC:{$&&E&&(k.stopPropagation(),$(k));break}}};n.useEffect(function(){if(i&&y){var c;(c=_.current)===null||c===void 0||c.focus({preventScroll:!0})}},[i]);var oe=n.useState(!1),F=de(oe,2),H=F[0],W=F[1],m=n.useContext(be),se;typeof C=="boolean"?se=C?{}:{distance:0}:se=C||{};var V=(a=(o=(r=se)===null||r===void 0?void 0:r.distance)!==null&&o!==void 0?o:m==null?void 0:m.pushDistance)!==null&&a!==void 0?a:180,Ne=n.useMemo(function(){return{pushDistance:V,push:function(){W(!0)},pull:function(){W(!1)}}},[V]);n.useEffect(function(){if(i){var c;m==null||(c=m.push)===null||c===void 0||c.call(m)}else{var k;m==null||(k=m.pull)===null||k===void 0||k.call(m)}},[i]),n.useEffect(function(){return function(){var c;m==null||(c=m.pull)===null||c===void 0||c.call(m)}},[]);var Ee=n.createElement(me,re({key:"mask"},R,{visible:w&&i}),function(c,k){var Y=c.className,G=c.style;return n.createElement("div",{className:x("".concat(l,"-mask"),Y,f==null?void 0:f.mask,J),style:j(j(j({},G),L),h==null?void 0:h.mask),onClick:M&&i?$:void 0,ref:k})}),Pe=typeof S=="function"?S(s):S,U={};if(H&&V)switch(s){case"top":U.transform="translateY(".concat(V,"px)");break;case"bottom":U.transform="translateY(".concat(-V,"px)");break;case"left":U.transform="translateX(".concat(V,"px)");break;default:U.transform="translateX(".concat(-V,"px)");break}s==="left"||s==="right"?U.width=ye(D):U.height=ye(N);var De={onMouseEnter:K,onMouseOver:Q,onMouseLeave:ee,onClick:X,onKeyDown:te,onKeyUp:ne},Re=n.createElement(me,re({key:"panel"},Pe,{visible:i,forceRender:O,onVisibleChanged:function(k){z==null||z(k)},removeOnLeave:!1,leavedClassName:"".concat(l,"-content-wrapper-hidden")}),function(c,k){var Y=c.className,G=c.style,Z=n.createElement(Ye,re({id:I,containerRef:k,prefixCls:l,className:x(p,f==null?void 0:f.content),style:j(j({},P),h==null?void 0:h.content)},ce(e,{aria:!0}),De),g);return n.createElement("div",re({className:x("".concat(l,"-content-wrapper"),f==null?void 0:f.wrapper,Y),style:j(j(j({},U),G),h==null?void 0:h.wrapper)},ce(e,{data:!0})),T?T(Z):Z)}),ue=j({},u);return v&&(ue.zIndex=v),n.createElement(be.Provider,{value:Ne},n.createElement("div",{className:x(l,"".concat(l,"-").concat(s),d,fe(fe({},"".concat(l,"-open"),i),"".concat(l,"-inline"),b)),style:ue,tabIndex:-1,ref:_,onKeyDown:ae},Ee,n.createElement("div",{tabIndex:0,ref:A,style:pe,"aria-hidden":"true","data-sentinel":"start"}),Re,n.createElement("div",{tabIndex:0,ref:B,style:pe,"aria-hidden":"true","data-sentinel":"end"})))}var Ze=n.forwardRef(Ge),qe=function(t){var a=t.open,o=a===void 0?!1:a,r=t.prefixCls,l=r===void 0?"rc-drawer":r,i=t.placement,s=i===void 0?"right":i,b=t.autoFocus,C=b===void 0?!0:b,O=t.keyboard,y=O===void 0?!0:O,E=t.width,f=E===void 0?378:E,d=t.mask,u=d===void 0?!0:d,v=t.maskClosable,p=v===void 0?!0:v,I=t.getContainer,P=t.forceRender,S=t.afterOpenChange,D=t.destroyOnClose,N=t.onMouseEnter,g=t.onMouseOver,w=t.onMouseLeave,M=t.onClick,R=t.onKeyDown,J=t.onKeyUp,L=t.panelRef,z=n.useState(!1),$=de(z,2),K=$[0],Q=$[1],ee=n.useState(!1),X=de(ee,2),te=X[0],ne=X[1];ve(function(){ne(!0)},[]);var h=te?o:!1,T=n.useRef(),_=n.useRef();ve(function(){h&&(_.current=document.activeElement)},[h]);var A=function(H){var W;if(Q(H),S==null||S(H),!H&&_.current&&!((W=T.current)!==null&&W!==void 0&&W.contains(_.current))){var m;(m=_.current)===null||m===void 0||m.focus({preventScroll:!0})}},B=n.useMemo(function(){return{panel:L}},[L]);if(!P&&!K&&!h&&D)return null;var ae={onMouseEnter:N,onMouseOver:g,onMouseLeave:w,onClick:M,onKeyDown:R,onKeyUp:J},oe=j(j({},t),{},{open:h,prefixCls:l,placement:s,autoFocus:C,keyboard:y,width:f,mask:u,maskClosable:p,inline:I===!1,afterOpenChange:A,ref:T},ae);return n.createElement(we.Provider,{value:B},n.createElement(_e,{open:h||P||K,autoDestroy:!1,getContainer:I,autoLock:u&&(h||K)},n.createElement(Ze,oe)))};const xe=e=>{var t,a;const{prefixCls:o,title:r,footer:l,extra:i,closable:s,loading:b,onClose:C,headerStyle:O,bodyStyle:y,footerStyle:E,children:f,classNames:d,styles:u}=e,v=Ce("drawer");let p;s===!1?p=void 0:s===void 0||s===!0?p="start":p=(s==null?void 0:s.placement)==="end"?"end":"start";const I=n.useCallback(g=>n.createElement("button",{type:"button",onClick:C,className:x(`${o}-close`,{[`${o}-close-${p}`]:p==="end"})},g),[C,o,p]),[P,S]=ze(ge(e),ge(v),{closable:!0,closeIconRender:I}),D=()=>{var g,w;return!r&&!P?null:n.createElement("div",{style:Object.assign(Object.assign(Object.assign({},(g=v.styles)===null||g===void 0?void 0:g.header),O),u==null?void 0:u.header),className:x(`${o}-header`,{[`${o}-header-close-only`]:P&&!r&&!i},(w=v.classNames)===null||w===void 0?void 0:w.header,d==null?void 0:d.header)},n.createElement("div",{className:`${o}-header-title`},p==="start"&&S,r&&n.createElement("div",{className:`${o}-title`},r)),i&&n.createElement("div",{className:`${o}-extra`},i),p==="end"&&S)},N=()=>{var g,w;if(!l)return null;const M=`${o}-footer`;return n.createElement("div",{className:x(M,(g=v.classNames)===null||g===void 0?void 0:g.footer,d==null?void 0:d.footer),style:Object.assign(Object.assign(Object.assign({},(w=v.styles)===null||w===void 0?void 0:w.footer),E),u==null?void 0:u.footer)},l)};return n.createElement(n.Fragment,null,D(),n.createElement("div",{className:x(`${o}-body`,d==null?void 0:d.body,(t=v.classNames)===null||t===void 0?void 0:t.body),style:Object.assign(Object.assign(Object.assign({},(a=v.styles)===null||a===void 0?void 0:a.body),y),u==null?void 0:u.body)},b?n.createElement(Ve,{active:!0,title:!1,paragraph:{rows:5},className:`${o}-body-skeleton`}):f),N())},Je=e=>{const t="100%";return{left:`translateX(-${t})`,right:`translateX(${t})`,top:`translateY(-${t})`,bottom:`translateY(${t})`}[e]},Se=(e,t)=>({"&-enter, &-appear":Object.assign(Object.assign({},e),{"&-active":t}),"&-leave":Object.assign(Object.assign({},t),{"&-active":e})}),ke=(e,t)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${t}`}}},Se({opacity:e},{opacity:1})),Qe=(e,t)=>[ke(.7,t),Se({transform:Je(e)},{transform:"none"})],et=e=>{const{componentCls:t,motionDurationSlow:a}=e;return{[t]:{[`${t}-mask-motion`]:ke(0,a),[`${t}-panel-motion`]:["left","right","top","bottom"].reduce((o,r)=>Object.assign(Object.assign({},o),{[`&-${r}`]:Qe(r,a)}),{})}}},tt=e=>{const{borderRadiusSM:t,componentCls:a,zIndexPopup:o,colorBgMask:r,colorBgElevated:l,motionDurationSlow:i,motionDurationMid:s,paddingXS:b,padding:C,paddingLG:O,fontSizeLG:y,lineHeightLG:E,lineWidth:f,lineType:d,colorSplit:u,marginXS:v,colorIcon:p,colorIconHover:I,colorBgTextHover:P,colorBgTextActive:S,colorText:D,fontWeightStrong:N,footerPaddingBlock:g,footerPaddingInline:w,calc:M}=e,R=`${a}-content-wrapper`;return{[a]:{position:"fixed",inset:0,zIndex:o,pointerEvents:"none",color:D,"&-pure":{position:"relative",background:l,display:"flex",flexDirection:"column",[`&${a}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${a}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${a}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${a}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${a}-mask`]:{position:"absolute",inset:0,zIndex:o,background:r,pointerEvents:"auto"},[R]:{position:"absolute",zIndex:o,maxWidth:"100vw",transition:`all ${i}`,"&-hidden":{display:"none"}},[`&-left > ${R}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${R}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${R}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${R}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${a}-content`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:l,pointerEvents:"auto"},[`${a}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${q(C)} ${q(O)}`,fontSize:y,lineHeight:E,borderBottom:`${q(f)} ${d} ${u}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${a}-extra`]:{flex:"none"},[`${a}-close`]:Object.assign({display:"inline-flex",width:M(y).add(b).equal(),height:M(y).add(b).equal(),borderRadius:t,justifyContent:"center",alignItems:"center",color:p,fontWeight:N,fontSize:y,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:`all ${s}`,textRendering:"auto",[`&${a}-close-end`]:{marginInlineStart:v},[`&:not(${a}-close-end)`]:{marginInlineEnd:v},"&:hover":{color:I,backgroundColor:P,textDecoration:"none"},"&:active":{backgroundColor:S}},We(e)),[`${a}-title`]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:y,lineHeight:E},[`${a}-body`]:{flex:1,minWidth:0,minHeight:0,padding:O,overflow:"auto",[`${a}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},[`${a}-footer`]:{flexShrink:0,padding:`${q(g)} ${q(w)}`,borderTop:`${q(f)} ${d} ${u}`},"&-rtl":{direction:"rtl"}}}},nt=e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding}),Oe=He("Drawer",e=>{const t=Le(e,{});return[tt(t),et(t)]},nt);var $e=function(e,t){var a={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(a[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(a[o[r]]=e[o[r]]);return a};const at={distance:180},ot=e=>{const{rootClassName:t,width:a,height:o,size:r="default",mask:l=!0,push:i=at,open:s,afterOpenChange:b,onClose:C,prefixCls:O,getContainer:y,panelRef:E=null,style:f,className:d,visible:u,afterVisibleChange:v,maskStyle:p,drawerStyle:I,contentWrapperStyle:P,destroyOnClose:S,destroyOnHidden:D}=e,N=$e(e,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","panelRef","style","className","visible","afterVisibleChange","maskStyle","drawerStyle","contentWrapperStyle","destroyOnClose","destroyOnHidden"]),{getPopupContainer:g,getPrefixCls:w,direction:M,className:R,style:J,classNames:L,styles:z}=Ce("drawer"),$=w("drawer",O),[K,Q,ee]=Oe($),X=y===void 0&&g?()=>g(document.body):y,te=x({"no-mask":!l,[`${$}-rtl`]:M==="rtl"},t,Q,ee),ne=n.useMemo(()=>a??(r==="large"?736:378),[a,r]),h=n.useMemo(()=>o??(r==="large"?736:378),[o,r]),T={motionName:he($,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},_=W=>({motionName:he($,`panel-motion-${W}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),A=Ue(),B=Ke(E,A),[ae,oe]=Te("Drawer",N.zIndex),{classNames:F={},styles:H={}}=N;return K(n.createElement(Ae,{form:!0,space:!0},n.createElement(Be.Provider,{value:oe},n.createElement(qe,Object.assign({prefixCls:$,onClose:C,maskMotion:T,motion:_},N,{classNames:{mask:x(F.mask,L.mask),content:x(F.content,L.content),wrapper:x(F.wrapper,L.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},H.mask),p),z.mask),content:Object.assign(Object.assign(Object.assign({},H.content),I),z.content),wrapper:Object.assign(Object.assign(Object.assign({},H.wrapper),P),z.wrapper)},open:s??u,mask:l,push:i,width:ne,height:h,style:Object.assign(Object.assign({},J),f),className:x(R,d),rootClassName:te,getContainer:X,afterOpenChange:b??v,panelRef:B,zIndex:ae,destroyOnClose:D??S}),n.createElement(xe,Object.assign({prefixCls:$},N,{onClose:C}))))))},rt=e=>{const{prefixCls:t,style:a,className:o,placement:r="right"}=e,l=$e(e,["prefixCls","style","className","placement"]),{getPrefixCls:i}=n.useContext(Fe),s=i("drawer",t),[b,C,O]=Oe(s),y=x(s,`${s}-pure`,`${s}-${r}`,C,O,o);return b(n.createElement("div",{className:y,style:a},n.createElement(xe,Object.assign({prefixCls:s},l))))};ot._InternalPanelDoNotUseOrYouWillBeFired=rt;export{ot as D};
@@ -1 +1 @@
1
- import*as n from"react";import U from"react";import{u as X,t as Y,e as Z,f as O,C as ee}from"./index-LDFwTu47.js";function $(e){return["small","middle","large"].includes(e)}function I(e){return e?typeof e=="number"&&!Number.isNaN(e):!1}const P=U.createContext({latestIndex:0}),te=P.Provider,se=({className:e,index:l,children:s,split:t,style:a})=>{const{latestIndex:o}=n.useContext(P);return s==null?null:n.createElement(n.Fragment,null,n.createElement("div",{className:e,style:a},s),l<o&&t&&n.createElement("span",{className:`${e}-split`},t))};var ae=function(e,l){var s={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&l.indexOf(t)<0&&(s[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,t=Object.getOwnPropertySymbols(e);a<t.length;a++)l.indexOf(t[a])<0&&Object.prototype.propertyIsEnumerable.call(e,t[a])&&(s[t[a]]=e[t[a]]);return s};const ne=n.forwardRef((e,l)=>{var s;const{getPrefixCls:t,direction:a,size:o,className:j,style:w,classNames:E,styles:V}=X("space"),{size:i=o??"small",align:C,className:h,rootClassName:_,children:A,direction:S="horizontal",prefixCls:k,split:G,style:R,wrap:H=!1,classNames:x,styles:g}=e,L=ae(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[m,u]=Array.isArray(i)?i:[i,i],v=$(u),N=$(m),F=I(u),M=I(m),p=Y(A,{keepEmpty:!0}),b=C===void 0&&S==="horizontal"?"center":C,r=t("space",k),[W,q,B]=Z(r),D=O(r,j,q,`${r}-${S}`,{[`${r}-rtl`]:a==="rtl",[`${r}-align-${b}`]:b,[`${r}-gap-row-${u}`]:v,[`${r}-gap-col-${m}`]:N},h,_,B),z=O(`${r}-item`,(s=x==null?void 0:x.item)!==null&&s!==void 0?s:E.item),J=Object.assign(Object.assign({},V.item),g==null?void 0:g.item),K=p.map((c,f)=>{const y=(c==null?void 0:c.key)||`${z}-${f}`;return n.createElement(se,{className:z,key:y,index:f,split:G,style:J},c)}),Q=n.useMemo(()=>({latestIndex:p.reduce((f,y,T)=>y!=null?T:f,0)}),[p]);if(p.length===0)return null;const d={};return H&&(d.flexWrap="wrap"),!N&&M&&(d.columnGap=m),!v&&F&&(d.rowGap=u),W(n.createElement("div",Object.assign({ref:l,className:D,style:Object.assign(Object.assign(Object.assign({},d),w),R)},L),n.createElement(te,{value:Q},K)))}),re=ne;re.Compact=ee;export{re as S};
1
+ import*as n from"react";import U from"react";import{u as X,t as Y,e as Z,f as O,C as ee}from"./index-BRq6VK9v.js";function $(e){return["small","middle","large"].includes(e)}function I(e){return e?typeof e=="number"&&!Number.isNaN(e):!1}const P=U.createContext({latestIndex:0}),te=P.Provider,se=({className:e,index:l,children:s,split:t,style:a})=>{const{latestIndex:o}=n.useContext(P);return s==null?null:n.createElement(n.Fragment,null,n.createElement("div",{className:e,style:a},s),l<o&&t&&n.createElement("span",{className:`${e}-split`},t))};var ae=function(e,l){var s={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&l.indexOf(t)<0&&(s[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,t=Object.getOwnPropertySymbols(e);a<t.length;a++)l.indexOf(t[a])<0&&Object.prototype.propertyIsEnumerable.call(e,t[a])&&(s[t[a]]=e[t[a]]);return s};const ne=n.forwardRef((e,l)=>{var s;const{getPrefixCls:t,direction:a,size:o,className:j,style:w,classNames:E,styles:V}=X("space"),{size:i=o??"small",align:C,className:h,rootClassName:_,children:A,direction:S="horizontal",prefixCls:k,split:G,style:R,wrap:H=!1,classNames:x,styles:g}=e,L=ae(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[m,u]=Array.isArray(i)?i:[i,i],v=$(u),N=$(m),F=I(u),M=I(m),p=Y(A,{keepEmpty:!0}),b=C===void 0&&S==="horizontal"?"center":C,r=t("space",k),[W,q,B]=Z(r),D=O(r,j,q,`${r}-${S}`,{[`${r}-rtl`]:a==="rtl",[`${r}-align-${b}`]:b,[`${r}-gap-row-${u}`]:v,[`${r}-gap-col-${m}`]:N},h,_,B),z=O(`${r}-item`,(s=x==null?void 0:x.item)!==null&&s!==void 0?s:E.item),J=Object.assign(Object.assign({},V.item),g==null?void 0:g.item),K=p.map((c,f)=>{const y=(c==null?void 0:c.key)||`${z}-${f}`;return n.createElement(se,{className:z,key:y,index:f,split:G,style:J},c)}),Q=n.useMemo(()=>({latestIndex:p.reduce((f,y,T)=>y!=null?T:f,0)}),[p]);if(p.length===0)return null;const d={};return H&&(d.flexWrap="wrap"),!N&&M&&(d.columnGap=m),!v&&F&&(d.rowGap=u),W(n.createElement("div",Object.assign({ref:l,className:D,style:Object.assign(Object.assign(Object.assign({},d),w),R)},L),n.createElement(te,{value:Q},K)))}),re=ne;re.Compact=ee;export{re as S};
@@ -1,4 +1,4 @@
1
- import{jsxs as i2,jsx as m,Fragment as g1}from"react/jsx-runtime";import*as I from"react";import b2,{forwardRef as QA,createElement as IA,useState as e0,useRef as $0,useEffect as v0,useMemo as _0,useContext as _A,useImperativeHandle as t3,useCallback as n0,memo as C1,Suspense as O5}from"react";import{d as t2,c as N0,h as a0,i as l2,a as uA,_ as l0,f as F2,aP as eA,aQ as G5,L as x2,J as u2,H as A2,ad as HA,aq as r0,a5 as z0,aR as k0,G as j5,aS as N5,N as j0,A as S2,aT as T5,aU as g3,E as n1,y as sA,aV as X5,aW as J5,aF as X1,aX as V5,g as J1,m as YA,k as w2,r as BA,af as C3,l as tA,V as Z5,aY as r1,as as i1,aZ as V1,a_ as U5,a$ as n3,b0 as W5,b1 as K5,aC as q5,b2 as _5,s as Z1,b3 as $5,b4 as Ag,b5 as PA,ag as eg,a2 as tg,b6 as gg,b7 as Cg,b8 as ng,b9 as rg,ae as ig,ba as og,bb as fe,bc as he,bd as ag,be as lg,bf as Eg,bg as Ig,bh as sg,bi as Bg,bj as cg,ac as U1,u as Qg,bk as ug,B as k1,bl as r3,bm as W1,an as i3,W as o3,X as a3,bn as l3,bo as E3,bp as I3,bq as K1,al as s3,j as dg,n as wg,br as fg,O as hg,Q as ve,bs as vg,F as v2,bt as mg,I as i0,S as zA,ab as kA,aa as me,a6 as pe,a9 as De,T as q1,a8 as pg}from"./index-LDFwTu47.js";import{createPortal as B3}from"react-dom";const Dg=t2.button.attrs({className:"zui-button"})`
1
+ import{jsxs as i2,jsx as m,Fragment as g1}from"react/jsx-runtime";import*as I from"react";import b2,{forwardRef as QA,createElement as IA,useState as e0,useRef as $0,useEffect as v0,useMemo as _0,useContext as _A,useImperativeHandle as t3,useCallback as n0,memo as C1,Suspense as O5}from"react";import{d as t2,c as N0,h as a0,i as l2,a as uA,_ as l0,f as F2,aQ as eA,aR as G5,L as x2,J as u2,H as A2,ad as HA,aq as r0,a5 as z0,aS as k0,G as j5,aT as N5,N as j0,A as S2,aU as T5,aV as g3,E as n1,y as sA,aW as X5,aX as J5,aC as X1,aY as V5,g as J1,m as YA,k as w2,r as BA,af as C3,l as tA,V as Z5,aZ as r1,as as i1,a_ as V1,a$ as U5,b0 as n3,b1 as W5,b2 as K5,b3 as q5,b4 as _5,s as Z1,b5 as $5,b6 as Ag,b7 as PA,ag as eg,a2 as tg,b8 as gg,b9 as Cg,ba as ng,bb as rg,ae as ig,bc as og,bd as fe,be as he,bf as ag,bg as lg,bh as Eg,bi as Ig,bj as sg,bk as Bg,bl as cg,ac as U1,u as Qg,bm as ug,B as k1,bn as r3,bo as W1,an as i3,W as o3,X as a3,bp as l3,bq as E3,br as I3,bs as K1,al as s3,j as dg,n as wg,bt as fg,O as hg,Q as ve,bu as vg,F as v2,bv as mg,I as i0,S as zA,ab as kA,aa as me,a6 as pe,a9 as De,T as q1,a8 as pg}from"./index-BRq6VK9v.js";import{createPortal as B3}from"react-dom";const Dg=t2.button.attrs({className:"zui-button"})`
2
2
  height: 36px;
3
3
  min-height: 36px;
4
4
  max-height: 36px;
@@ -1,4 +1,4 @@
1
- import{a}from"./index-LDFwTu47.js";/**
1
+ import{a}from"./index-BRq6VK9v.js";/**
2
2
  * @license lucide-react v0.456.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -0,0 +1,16 @@
1
+ import{ac as Gt,A as pe,H as V,ad as ct,E as Kt,f as w,L as Ae,M as Xt,ap as Ut,y as it,J as Ce,_ as z,aq as ut,g as dt,m as ft,K as He,r as Yt,ar as mt,l as W,as as Se,at as Zt,au as gt,av as vt,aw as Ct,ax as Qt,ay as Be,az as Jt,B as ze,aA as pt,aB as en,k as Le,aC as We,u as tn,an as De,aD as yt,aE as nn,aF as bt,O as on,Q as Ge,V as sn,W as an,X as rn,Y as ln,aG as cn,Z as Ee,al as un,aH as dn,aI as fn,aJ as mn,aK as qe,am as gn,aL as ht,aM as xt,aN as vn,aO as Cn,aP as pn}from"./index-BRq6VK9v.js";import*as a from"react";import j,{useContext as J,useRef as yn,useState as Ke,useEffect as Xe}from"react";import{createPortal as bn}from"react-dom";var hn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},xn=function(t,s){return a.createElement(Gt,pe({},t,{ref:s,icon:hn}))},Ot=a.forwardRef(xn),$t=a.forwardRef(function(e,t){var s=e.prefixCls,n=e.style,o=e.className,r=e.duration,u=r===void 0?4.5:r,i=e.showProgress,l=e.pauseOnHover,d=l===void 0?!0:l,c=e.eventKey,f=e.content,g=e.closable,m=e.closeIcon,C=m===void 0?"x":m,p=e.props,v=e.onClick,h=e.onNoticeClose,y=e.times,b=e.hovering,E=a.useState(!1),S=V(E,2),$=S[0],H=S[1],P=a.useState(0),x=V(P,2),O=x[0],N=x[1],M=a.useState(0),L=V(M,2),k=L[0],X=L[1],T=b||$,R=u>0&&i,D=function(){h(c)},U=function(I){(I.key==="Enter"||I.code==="Enter"||I.keyCode===Xt.ENTER)&&D()};a.useEffect(function(){if(!T&&u>0){var _=Date.now()-k,I=setTimeout(function(){D()},u*1e3-k);return function(){d&&clearTimeout(I),X(Date.now()-_)}}},[u,T,y]),a.useEffect(function(){if(!T&&R&&(d||k===0)){var _=performance.now(),I,F=function de(){cancelAnimationFrame(I),I=requestAnimationFrame(function(fe){var Y=fe+k-_,K=Math.min(Y/(u*1e3),1);N(K*100),K<1&&de()})};return F(),function(){d&&cancelAnimationFrame(I)}}},[u,k,T,R,y]);var ae=a.useMemo(function(){return ct(g)==="object"&&g!==null?g:g?{closeIcon:C}:{}},[g,C]),re=Kt(ae,!0),ee=100-(!O||O<0?0:O>100?100:O),q="".concat(s,"-notice");return a.createElement("div",pe({},p,{ref:t,className:w(q,o,Ae({},"".concat(q,"-closable"),g)),style:n,onMouseEnter:function(I){var F;H(!0),p==null||(F=p.onMouseEnter)===null||F===void 0||F.call(p,I)},onMouseLeave:function(I){var F;H(!1),p==null||(F=p.onMouseLeave)===null||F===void 0||F.call(p,I)},onClick:v}),a.createElement("div",{className:"".concat(q,"-content")},f),g&&a.createElement("a",pe({tabIndex:0,className:"".concat(q,"-close"),onKeyDown:U,"aria-label":"Close"},re,{onClick:function(I){I.preventDefault(),I.stopPropagation(),D()}}),ae.closeIcon),R&&a.createElement("progress",{className:"".concat(q,"-progress"),max:"100",value:ee},ee+"%"))}),Et=j.createContext({}),On=function(t){var s=t.children,n=t.classNames;return j.createElement(Et.Provider,{value:{classNames:n}},s)},Ue=8,Ye=3,Ze=16,$n=function(t){var s={offset:Ue,threshold:Ye,gap:Ze};if(t&&ct(t)==="object"){var n,o,r;s.offset=(n=t.offset)!==null&&n!==void 0?n:Ue,s.threshold=(o=t.threshold)!==null&&o!==void 0?o:Ye,s.gap=(r=t.gap)!==null&&r!==void 0?r:Ze}return[!!t,s]},En=["className","style","classNames","styles"],Sn=function(t){var s=t.configList,n=t.placement,o=t.prefixCls,r=t.className,u=t.style,i=t.motion,l=t.onAllNoticeRemoved,d=t.onNoticeClose,c=t.stack,f=J(Et),g=f.classNames,m=yn({}),C=Ke(null),p=V(C,2),v=p[0],h=p[1],y=Ke([]),b=V(y,2),E=b[0],S=b[1],$=s.map(function(T){return{config:T,key:String(T.key)}}),H=$n(c),P=V(H,2),x=P[0],O=P[1],N=O.offset,M=O.threshold,L=O.gap,k=x&&(E.length>0||$.length<=M),X=typeof i=="function"?i(n):i;return Xe(function(){x&&E.length>1&&S(function(T){return T.filter(function(R){return $.some(function(D){var U=D.key;return R===U})})})},[E,$,x]),Xe(function(){var T;if(x&&m.current[(T=$[$.length-1])===null||T===void 0?void 0:T.key]){var R;h(m.current[(R=$[$.length-1])===null||R===void 0?void 0:R.key])}},[$,x]),j.createElement(Ut,pe({key:n,className:w(o,"".concat(o,"-").concat(n),g==null?void 0:g.list,r,Ae(Ae({},"".concat(o,"-stack"),!!x),"".concat(o,"-stack-expanded"),k)),style:u,keys:$,motionAppear:!0},X,{onAllRemoved:function(){l(n)}}),function(T,R){var D=T.config,U=T.className,ae=T.style,re=T.index,ee=D,q=ee.key,_=ee.times,I=String(q),F=D,de=F.className,fe=F.style,Y=F.classNames,K=F.styles,je=it(F,En),me=$.findIndex(function($e){return $e.key===I}),le={};if(x){var te=$.length-1-(me>-1?me:re-1),Oe=n==="top"||n==="bottom"?"-50%":"0";if(te>0){var Z,ge,A;le.height=k?(Z=m.current[I])===null||Z===void 0?void 0:Z.offsetHeight:v==null?void 0:v.offsetHeight;for(var ve=0,Q=0;Q<te;Q++){var we;ve+=((we=m.current[$[$.length-1-Q].key])===null||we===void 0?void 0:we.offsetHeight)+L}var Dt=(k?ve:te*N)*(n.startsWith("top")?1:-1),qt=!k&&v!==null&&v!==void 0&&v.offsetWidth&&(ge=m.current[I])!==null&&ge!==void 0&&ge.offsetWidth?((v==null?void 0:v.offsetWidth)-N*2*(te<3?te:3))/((A=m.current[I])===null||A===void 0?void 0:A.offsetWidth):1;le.transform="translate3d(".concat(Oe,", ").concat(Dt,"px, 0) scaleX(").concat(qt,")")}else le.transform="translate3d(".concat(Oe,", 0, 0)")}return j.createElement("div",{ref:R,className:w("".concat(o,"-notice-wrapper"),U,Y==null?void 0:Y.wrapper),style:Ce(Ce(Ce({},ae),le),K==null?void 0:K.wrapper),onMouseEnter:function(){return S(function(ne){return ne.includes(I)?ne:[].concat(z(ne),[I])})},onMouseLeave:function(){return S(function(ne){return ne.filter(function(Vt){return Vt!==I})})}},j.createElement($t,pe({},je,{ref:function(ne){me>-1?m.current[I]=ne:delete m.current[I]},prefixCls:o,classNames:Y,styles:K,className:w(de,g==null?void 0:g.notice),style:fe,times:_,key:q,eventKey:q,onNoticeClose:d,hovering:x&&E.length>0})))})},Pn=a.forwardRef(function(e,t){var s=e.prefixCls,n=s===void 0?"rc-notification":s,o=e.container,r=e.motion,u=e.maxCount,i=e.className,l=e.style,d=e.onAllRemoved,c=e.stack,f=e.renderNotifications,g=a.useState([]),m=V(g,2),C=m[0],p=m[1],v=function(x){var O,N=C.find(function(M){return M.key===x});N==null||(O=N.onClose)===null||O===void 0||O.call(N),p(function(M){return M.filter(function(L){return L.key!==x})})};a.useImperativeHandle(t,function(){return{open:function(x){p(function(O){var N=z(O),M=N.findIndex(function(X){return X.key===x.key}),L=Ce({},x);if(M>=0){var k;L.times=(((k=O[M])===null||k===void 0?void 0:k.times)||0)+1,N[M]=L}else L.times=0,N.push(L);return u>0&&N.length>u&&(N=N.slice(-u)),N})},close:function(x){v(x)},destroy:function(){p([])}}});var h=a.useState({}),y=V(h,2),b=y[0],E=y[1];a.useEffect(function(){var P={};C.forEach(function(x){var O=x.placement,N=O===void 0?"topRight":O;N&&(P[N]=P[N]||[],P[N].push(x))}),Object.keys(b).forEach(function(x){P[x]=P[x]||[]}),E(P)},[C]);var S=function(x){E(function(O){var N=Ce({},O),M=N[x]||[];return M.length||delete N[x],N})},$=a.useRef(!1);if(a.useEffect(function(){Object.keys(b).length>0?$.current=!0:$.current&&(d==null||d(),$.current=!1)},[b]),!o)return null;var H=Object.keys(b);return bn(a.createElement(a.Fragment,null,H.map(function(P){var x=b[P],O=a.createElement(Sn,{key:P,configList:x,placement:P,prefixCls:n,className:i==null?void 0:i(P),style:l==null?void 0:l(P),motion:r,onNoticeClose:v,onAllNoticeRemoved:S,stack:c});return f?f(O,{prefixCls:n,key:P}):O})),o)}),Nn=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],kn=function(){return document.body},Qe=0;function jn(){for(var e={},t=arguments.length,s=new Array(t),n=0;n<t;n++)s[n]=arguments[n];return s.forEach(function(o){o&&Object.keys(o).forEach(function(r){var u=o[r];u!==void 0&&(e[r]=u)})}),e}function wn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.getContainer,s=t===void 0?kn:t,n=e.motion,o=e.prefixCls,r=e.maxCount,u=e.className,i=e.style,l=e.onAllRemoved,d=e.stack,c=e.renderNotifications,f=it(e,Nn),g=a.useState(),m=V(g,2),C=m[0],p=m[1],v=a.useRef(),h=a.createElement(Pn,{container:C,ref:v,prefixCls:o,motion:n,maxCount:r,className:u,style:i,onAllRemoved:l,stack:d,renderNotifications:c}),y=a.useState([]),b=V(y,2),E=b[0],S=b[1],$=ut(function(P){var x=jn(f,P);(x.key===null||x.key===void 0)&&(x.key="rc-notification-".concat(Qe),Qe+=1),S(function(O){return[].concat(z(O),[{type:"open",config:x}])})}),H=a.useMemo(function(){return{open:$,close:function(x){S(function(O){return[].concat(z(O),[{type:"close",key:x}])})},destroy:function(){S(function(x){return[].concat(z(x),[{type:"destroy"}])})}}},[]);return a.useEffect(function(){p(s())}),a.useEffect(function(){if(v.current&&E.length){E.forEach(function(O){switch(O.type){case"open":v.current.open(O.config);break;case"close":v.current.close(O.key);break;case"destroy":v.current.destroy();break}});var P,x;S(function(O){return(P!==O||!x)&&(P=O,x=O.filter(function(N){return!E.includes(N)})),x})}},[E]),[H,h]}const In=()=>{const[e,t]=a.useState([]),s=a.useCallback(n=>(t(o=>[].concat(z(o),[n])),()=>{t(o=>o.filter(r=>r!==n))}),[]);return[e,s]},Rn=e=>{const{componentCls:t,iconCls:s,boxShadow:n,colorText:o,colorSuccess:r,colorError:u,colorWarning:i,colorInfo:l,fontSizeLG:d,motionEaseInOutCirc:c,motionDurationSlow:f,marginXS:g,paddingXS:m,borderRadiusLG:C,zIndexPopup:p,contentPadding:v,contentBg:h}=e,y=`${t}-notice`,b=new He("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:m,transform:"translateY(0)",opacity:1}}),E=new He("MessageMoveOut",{"0%":{maxHeight:e.height,padding:m,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}}),S={padding:m,textAlign:"center",[`${t}-custom-content`]:{display:"flex",alignItems:"center"},[`${t}-custom-content > ${s}`]:{marginInlineEnd:g,fontSize:d},[`${y}-content`]:{display:"inline-block",padding:v,background:h,borderRadius:C,boxShadow:n,pointerEvents:"all"},[`${t}-success > ${s}`]:{color:r},[`${t}-error > ${s}`]:{color:u},[`${t}-warning > ${s}`]:{color:i},[`${t}-info > ${s},
2
+ ${t}-loading > ${s}`]:{color:l}};return[{[t]:Object.assign(Object.assign({},Yt(e)),{color:o,position:"fixed",top:g,width:"100%",pointerEvents:"none",zIndex:p,[`${t}-move-up`]:{animationFillMode:"forwards"},[`
3
+ ${t}-move-up-appear,
4
+ ${t}-move-up-enter
5
+ `]:{animationName:b,animationDuration:f,animationPlayState:"paused",animationTimingFunction:c},[`
6
+ ${t}-move-up-appear${t}-move-up-appear-active,
7
+ ${t}-move-up-enter${t}-move-up-enter-active
8
+ `]:{animationPlayState:"running"},[`${t}-move-up-leave`]:{animationName:E,animationDuration:f,animationPlayState:"paused",animationTimingFunction:c},[`${t}-move-up-leave${t}-move-up-leave-active`]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}})},{[t]:{[`${y}-wrapper`]:Object.assign({},S)}},{[`${t}-notice-pure-panel`]:Object.assign(Object.assign({},S),{padding:0,textAlign:"start"})}]},Tn=e=>({zIndexPopup:e.zIndexPopupBase+mt+10,contentBg:e.colorBgElevated,contentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`}),St=dt("Message",e=>{const t=ft(e,{height:150});return Rn(t)},Tn);var Mn=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(s[n[o]]=e[n[o]]);return s};const Fn={info:a.createElement(Ot,null),success:a.createElement(Ct,null),error:a.createElement(vt,null),warning:a.createElement(gt,null),loading:a.createElement(Zt,null)},Pt=({prefixCls:e,type:t,icon:s,children:n})=>a.createElement("div",{className:w(`${e}-custom-content`,`${e}-${t}`)},s||Fn[t],a.createElement("span",null,n)),An=e=>{const{prefixCls:t,className:s,type:n,icon:o,content:r}=e,u=Mn(e,["prefixCls","className","type","icon","content"]),{getPrefixCls:i}=a.useContext(W),l=t||i("message"),d=Se(l),[c,f,g]=St(l,d);return c(a.createElement($t,Object.assign({},u,{prefixCls:l,className:w(s,f,`${l}-notice-pure-panel`,g,d),eventKey:"pure",duration:null,content:a.createElement(Pt,{prefixCls:l,type:n,icon:o},r)})))};function Hn(e,t){return{motionName:t??`${e}-move-up`}}function Ve(e){let t;const s=new Promise(o=>{t=e(()=>{o(!0)})}),n=()=>{t==null||t()};return n.then=(o,r)=>s.then(o,r),n.promise=s,n}var Ln=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(s[n[o]]=e[n[o]]);return s};const _n=8,Bn=3,zn=({children:e,prefixCls:t})=>{const s=Se(t),[n,o,r]=St(t,s);return n(a.createElement(On,{classNames:{list:w(o,r,s)}},e))},Wn=(e,{prefixCls:t,key:s})=>a.createElement(zn,{prefixCls:t,key:s},e),Dn=a.forwardRef((e,t)=>{const{top:s,prefixCls:n,getContainer:o,maxCount:r,duration:u=Bn,rtl:i,transitionName:l,onAllRemoved:d}=e,{getPrefixCls:c,getPopupContainer:f,message:g,direction:m}=a.useContext(W),C=n||c("message"),p=()=>({left:"50%",transform:"translateX(-50%)",top:s??_n}),v=()=>w({[`${C}-rtl`]:i??m==="rtl"}),h=()=>Hn(C,l),y=a.createElement("span",{className:`${C}-close-x`},a.createElement(Be,{className:`${C}-close-icon`})),[b,E]=wn({prefixCls:C,style:p,className:v,motion:h,closable:!1,closeIcon:y,duration:u,getContainer:()=>(o==null?void 0:o())||(f==null?void 0:f())||document.body,maxCount:r,onAllRemoved:d,renderNotifications:Wn});return a.useImperativeHandle(t,()=>Object.assign(Object.assign({},b),{prefixCls:C,message:g})),E});let Je=0;function Nt(e){const t=a.useRef(null);return Qt(),[a.useMemo(()=>{const n=l=>{var d;(d=t.current)===null||d===void 0||d.close(l)},o=l=>{if(!t.current){const $=()=>{};return $.then=()=>{},$}const{open:d,prefixCls:c,message:f}=t.current,g=`${c}-notice`,{content:m,icon:C,type:p,key:v,className:h,style:y,onClose:b}=l,E=Ln(l,["content","icon","type","key","className","style","onClose"]);let S=v;return S==null&&(Je+=1,S=`antd-message-${Je}`),Ve($=>(d(Object.assign(Object.assign({},E),{key:S,content:a.createElement(Pt,{prefixCls:c,type:p,icon:C},m),placement:"top",className:w(p&&`${g}-${p}`,h,f==null?void 0:f.className),style:Object.assign(Object.assign({},f==null?void 0:f.style),y),onClose:()=>{b==null||b(),$()}})),()=>{n(S)}))},u={open:o,destroy:l=>{var d;l!==void 0?n(l):(d=t.current)===null||d===void 0||d.destroy()}};return["info","success","warning","error","loading"].forEach(l=>{const d=(c,f,g)=>{let m;c&&typeof c=="object"&&"content"in c?m=c:m={content:c};let C,p;typeof f=="function"?p=f:(C=f,p=g);const v=Object.assign(Object.assign({onClose:p,duration:C},m),{type:l});return o(v)};u[l]=d}),u},[]),a.createElement(Dn,Object.assign({key:"message-holder"},e,{ref:t}))]}function qn(e){return Nt(e)}const Ie=e=>typeof(e==null?void 0:e.then)=="function",kt=e=>{const{type:t,children:s,prefixCls:n,buttonProps:o,close:r,autoFocus:u,emitEvent:i,isSilent:l,quitOnNullishReturnValue:d,actionFn:c}=e,f=a.useRef(!1),g=a.useRef(null),[m,C]=Jt(!1),p=(...y)=>{r==null||r.apply(void 0,y)};a.useEffect(()=>{let y=null;return u&&(y=setTimeout(()=>{var b;(b=g.current)===null||b===void 0||b.focus({preventScroll:!0})})),()=>{y&&clearTimeout(y)}},[u]);const v=y=>{Ie(y)&&(C(!0),y.then((...b)=>{C(!1,!0),p.apply(void 0,b),f.current=!1},b=>{if(C(!1,!0),f.current=!1,!(l!=null&&l()))return Promise.reject(b)}))},h=y=>{if(f.current)return;if(f.current=!0,!c){p();return}let b;if(i){if(b=c(y),d&&!Ie(b)){f.current=!1,p(y);return}}else if(c.length)b=c(r),f.current=!1;else if(b=c(),!Ie(b)){p();return}v(b)};return a.createElement(ze,Object.assign({},pt(t),{onClick:h,loading:m,prefixCls:n},o,{ref:g}),s)},he=j.createContext({}),{Provider:jt}=he,et=()=>{const{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:s,isSilent:n,mergedOkCancel:o,rootPrefixCls:r,close:u,onCancel:i,onConfirm:l}=J(he);return o?j.createElement(kt,{isSilent:n,actionFn:i,close:(...d)=>{u==null||u.apply(void 0,d),l==null||l(!1)},autoFocus:e==="cancel",buttonProps:t,prefixCls:`${r}-btn`},s):null},tt=()=>{const{autoFocusButton:e,close:t,isSilent:s,okButtonProps:n,rootPrefixCls:o,okTextLocale:r,okType:u,onConfirm:i,onOk:l}=J(he);return j.createElement(kt,{isSilent:s,type:u||"primary",actionFn:l,close:(...d)=>{t==null||t.apply(void 0,d),i==null||i(!0)},autoFocus:e==="ok",buttonProps:n,prefixCls:`${o}-btn`},r)},Vn=()=>en()&&window.document.documentElement,Pe=e=>{const{prefixCls:t,className:s,style:n,size:o,shape:r}=e,u=w({[`${t}-lg`]:o==="large",[`${t}-sm`]:o==="small"}),i=w({[`${t}-circle`]:r==="circle",[`${t}-square`]:r==="square",[`${t}-round`]:r==="round"}),l=a.useMemo(()=>typeof o=="number"?{width:o,height:o,lineHeight:`${o}px`}:{},[o]);return a.createElement("span",{className:w(t,u,i,s),style:Object.assign(Object.assign({},l),n)})},Gn=new He("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),Ne=e=>({height:e,lineHeight:Le(e)}),ce=e=>Object.assign({width:e},Ne(e)),Kn=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:Gn,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),Re=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},Ne(e)),Xn=e=>{const{skeletonAvatarCls:t,gradientFromColor:s,controlHeight:n,controlHeightLG:o,controlHeightSM:r}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:s},ce(n)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},ce(o)),[`${t}${t}-sm`]:Object.assign({},ce(r))}},Un=e=>{const{controlHeight:t,borderRadiusSM:s,skeletonInputCls:n,controlHeightLG:o,controlHeightSM:r,gradientFromColor:u,calc:i}=e;return{[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:u,borderRadius:s},Re(t,i)),[`${n}-lg`]:Object.assign({},Re(o,i)),[`${n}-sm`]:Object.assign({},Re(r,i))}},nt=e=>Object.assign({width:e},Ne(e)),Yn=e=>{const{skeletonImageCls:t,imageSizeBase:s,gradientFromColor:n,borderRadiusSM:o,calc:r}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:n,borderRadius:o},nt(r(s).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},nt(s)),{maxWidth:r(s).mul(4).equal(),maxHeight:r(s).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}},Te=(e,t,s)=>{const{skeletonButtonCls:n}=e;return{[`${s}${n}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${s}${n}-round`]:{borderRadius:t}}},Me=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},Ne(e)),Zn=e=>{const{borderRadiusSM:t,skeletonButtonCls:s,controlHeight:n,controlHeightLG:o,controlHeightSM:r,gradientFromColor:u,calc:i}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[s]:Object.assign({display:"inline-block",verticalAlign:"top",background:u,borderRadius:t,width:i(n).mul(2).equal(),minWidth:i(n).mul(2).equal()},Me(n,i))},Te(e,n,s)),{[`${s}-lg`]:Object.assign({},Me(o,i))}),Te(e,o,`${s}-lg`)),{[`${s}-sm`]:Object.assign({},Me(r,i))}),Te(e,r,`${s}-sm`))},Qn=e=>{const{componentCls:t,skeletonAvatarCls:s,skeletonTitleCls:n,skeletonParagraphCls:o,skeletonButtonCls:r,skeletonInputCls:u,skeletonImageCls:i,controlHeight:l,controlHeightLG:d,controlHeightSM:c,gradientFromColor:f,padding:g,marginSM:m,borderRadius:C,titleHeight:p,blockRadius:v,paragraphLiHeight:h,controlHeightXS:y,paragraphMarginTop:b}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:g,verticalAlign:"top",[s]:Object.assign({display:"inline-block",verticalAlign:"top",background:f},ce(l)),[`${s}-circle`]:{borderRadius:"50%"},[`${s}-lg`]:Object.assign({},ce(d)),[`${s}-sm`]:Object.assign({},ce(c))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[n]:{width:"100%",height:p,background:f,borderRadius:v,[`+ ${o}`]:{marginBlockStart:c}},[o]:{padding:0,"> li":{width:"100%",height:h,listStyle:"none",background:f,borderRadius:v,"+ li":{marginBlockStart:y}}},[`${o}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${n}, ${o} > li`]:{borderRadius:C}}},[`${t}-with-avatar ${t}-content`]:{[n]:{marginBlockStart:m,[`+ ${o}`]:{marginBlockStart:b}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},Zn(e)),Xn(e)),Un(e)),Yn(e)),[`${t}${t}-block`]:{width:"100%",[r]:{width:"100%"},[u]:{width:"100%"}},[`${t}${t}-active`]:{[`
9
+ ${n},
10
+ ${o} > li,
11
+ ${s},
12
+ ${r},
13
+ ${u},
14
+ ${i}
15
+ `]:Object.assign({},Kn(e))}}},Jn=e=>{const{colorFillContent:t,colorFill:s}=e,n=t,o=s;return{color:n,colorGradientEnd:o,gradientFromColor:n,gradientToColor:o,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},ie=dt("Skeleton",e=>{const{componentCls:t,calc:s}=e,n=ft(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:s(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return Qn(n)},Jn,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),eo=e=>{const{prefixCls:t,className:s,rootClassName:n,active:o,shape:r="circle",size:u="default"}=e,{getPrefixCls:i}=a.useContext(W),l=i("skeleton",t),[d,c,f]=ie(l),g=We(e,["prefixCls","className"]),m=w(l,`${l}-element`,{[`${l}-active`]:o},s,n,c,f);return d(a.createElement("div",{className:m},a.createElement(Pe,Object.assign({prefixCls:`${l}-avatar`,shape:r,size:u},g))))},to=e=>{const{prefixCls:t,className:s,rootClassName:n,active:o,block:r=!1,size:u="default"}=e,{getPrefixCls:i}=a.useContext(W),l=i("skeleton",t),[d,c,f]=ie(l),g=We(e,["prefixCls"]),m=w(l,`${l}-element`,{[`${l}-active`]:o,[`${l}-block`]:r},s,n,c,f);return d(a.createElement("div",{className:m},a.createElement(Pe,Object.assign({prefixCls:`${l}-button`,size:u},g))))},no="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",oo=e=>{const{prefixCls:t,className:s,rootClassName:n,style:o,active:r}=e,{getPrefixCls:u}=a.useContext(W),i=u("skeleton",t),[l,d,c]=ie(i),f=w(i,`${i}-element`,{[`${i}-active`]:r},s,n,d,c);return l(a.createElement("div",{className:f},a.createElement("div",{className:w(`${i}-image`,s),style:o},a.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${i}-image-svg`},a.createElement("title",null,"Image placeholder"),a.createElement("path",{d:no,className:`${i}-image-path`})))))},so=e=>{const{prefixCls:t,className:s,rootClassName:n,active:o,block:r,size:u="default"}=e,{getPrefixCls:i}=a.useContext(W),l=i("skeleton",t),[d,c,f]=ie(l),g=We(e,["prefixCls"]),m=w(l,`${l}-element`,{[`${l}-active`]:o,[`${l}-block`]:r},s,n,c,f);return d(a.createElement("div",{className:m},a.createElement(Pe,Object.assign({prefixCls:`${l}-input`,size:u},g))))},ao=e=>{const{prefixCls:t,className:s,rootClassName:n,style:o,active:r,children:u}=e,{getPrefixCls:i}=a.useContext(W),l=i("skeleton",t),[d,c,f]=ie(l),g=w(l,`${l}-element`,{[`${l}-active`]:r},c,s,n,f);return d(a.createElement("div",{className:g},a.createElement("div",{className:w(`${l}-image`,s),style:o},u)))},ro=(e,t)=>{const{width:s,rows:n=2}=t;if(Array.isArray(s))return s[e];if(n-1===e)return s},lo=e=>{const{prefixCls:t,className:s,style:n,rows:o=0}=e,r=Array.from({length:o}).map((u,i)=>a.createElement("li",{key:i,style:{width:ro(i,e)}}));return a.createElement("ul",{className:w(t,s),style:n},r)},co=({prefixCls:e,className:t,width:s,style:n})=>a.createElement("h3",{className:w(e,t),style:Object.assign({width:s},n)});function Fe(e){return e&&typeof e=="object"?e:{}}function io(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function uo(e,t){return!e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}function fo(e,t){const s={};return(!e||!t)&&(s.width="61%"),!e&&t?s.rows=3:s.rows=2,s}const ue=e=>{const{prefixCls:t,loading:s,className:n,rootClassName:o,style:r,children:u,avatar:i=!1,title:l=!0,paragraph:d=!0,active:c,round:f}=e,{getPrefixCls:g,direction:m,className:C,style:p}=tn("skeleton"),v=g("skeleton",t),[h,y,b]=ie(v);if(s||!("loading"in e)){const E=!!i,S=!!l,$=!!d;let H;if(E){const O=Object.assign(Object.assign({prefixCls:`${v}-avatar`},io(S,$)),Fe(i));H=a.createElement("div",{className:`${v}-header`},a.createElement(Pe,Object.assign({},O)))}let P;if(S||$){let O;if(S){const M=Object.assign(Object.assign({prefixCls:`${v}-title`},uo(E,$)),Fe(l));O=a.createElement(co,Object.assign({},M))}let N;if($){const M=Object.assign(Object.assign({prefixCls:`${v}-paragraph`},fo(E,S)),Fe(d));N=a.createElement(lo,Object.assign({},M))}P=a.createElement("div",{className:`${v}-content`},O,N)}const x=w(v,{[`${v}-with-avatar`]:E,[`${v}-active`]:c,[`${v}-rtl`]:m==="rtl",[`${v}-round`]:f},C,n,o,y,b);return h(a.createElement("div",{className:x,style:Object.assign(Object.assign({},p),r)},H,P))}return u??null};ue.Button=to;ue.Avatar=eo;ue.Input=so;ue.Image=oo;ue.Node=ao;function ot(){}const mo=a.createContext({add:ot,remove:ot});function go(e){const t=a.useContext(mo),s=a.useRef(null);return ut(o=>{if(o){const r=e?o.querySelector(e):o;r&&(t.add(r),s.current=r)}else t.remove(s.current)})}const st=()=>{const{cancelButtonProps:e,cancelTextLocale:t,onCancel:s}=J(he);return j.createElement(ze,Object.assign({onClick:s},e),t)},at=()=>{const{confirmLoading:e,okButtonProps:t,okType:s,okTextLocale:n,onOk:o}=J(he);return j.createElement(ze,Object.assign({},pt(s),{loading:e,onClick:o},t),n)};function wt(e,t){return j.createElement("span",{className:`${e}-close-x`},t||j.createElement(Be,{className:`${e}-close-icon`}))}const It=e=>{const{okText:t,okType:s="primary",cancelText:n,confirmLoading:o,onOk:r,onCancel:u,okButtonProps:i,cancelButtonProps:l,footer:d}=e,[c]=De("Modal",yt()),f=t||(c==null?void 0:c.okText),g=n||(c==null?void 0:c.cancelText),m=j.useMemo(()=>({confirmLoading:o,okButtonProps:i,cancelButtonProps:l,okTextLocale:f,cancelTextLocale:g,okType:s,onOk:r,onCancel:u}),[o,i,l,f,g,s,r,u]);let C;return typeof d=="function"||typeof d>"u"?(C=j.createElement(j.Fragment,null,j.createElement(st,null),j.createElement(at,null)),typeof d=="function"&&(C=d(C,{OkBtn:at,CancelBtn:st})),C=j.createElement(jt,{value:m},C)):C=d,j.createElement(nn,{disabled:!1},C)};var vo=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(s[n[o]]=e[n[o]]);return s};let _e;const Co=e=>{_e={x:e.pageX,y:e.pageY},setTimeout(()=>{_e=null},100)};Vn()&&document.documentElement.addEventListener("click",Co,!0);const Rt=e=>{const{prefixCls:t,className:s,rootClassName:n,open:o,wrapClassName:r,centered:u,getContainer:i,focusTriggerAfterClose:l=!0,style:d,visible:c,width:f=520,footer:g,classNames:m,styles:C,children:p,loading:v,confirmLoading:h,zIndex:y,mousePosition:b,onOk:E,onCancel:S,destroyOnHidden:$,destroyOnClose:H,panelRef:P=null,modalRender:x}=e,O=vo(e,["prefixCls","className","rootClassName","open","wrapClassName","centered","getContainer","focusTriggerAfterClose","style","visible","width","footer","classNames","styles","children","loading","confirmLoading","zIndex","mousePosition","onOk","onCancel","destroyOnHidden","destroyOnClose","panelRef","modalRender"]),{getPopupContainer:N,getPrefixCls:M,direction:L,modal:k}=a.useContext(W),X=A=>{h||S==null||S(A)},T=A=>{E==null||E(A)},R=M("modal",t),D=M(),U=Se(R),[ae,re,ee]=bt(R,U),q=w(r,{[`${R}-centered`]:u??(k==null?void 0:k.centered),[`${R}-wrap-rtl`]:L==="rtl"}),_=g!==null&&!v?a.createElement(It,Object.assign({},e,{onOk:T,onCancel:X})):null,[I,F,de,fe]=on(Ge(e),Ge(k),{closable:!0,closeIcon:a.createElement(Be,{className:`${R}-close-icon`}),closeIconRender:A=>wt(R,A)}),Y=x?A=>a.createElement("div",{className:`${R}-render`},x(A)):void 0,K=`.${R}-${x?"render":"content"}`,je=go(K),me=sn(P,je),[le,te]=an("Modal",y),[Oe,Z]=a.useMemo(()=>f&&typeof f=="object"?[void 0,f]:[f,void 0],[f]),ge=a.useMemo(()=>{const A={};return Z&&Object.keys(Z).forEach(ve=>{const Q=Z[ve];Q!==void 0&&(A[`--${R}-${ve}-width`]=typeof Q=="number"?`${Q}px`:Q)}),A},[R,Z]);return ae(a.createElement(rn,{form:!0,space:!0},a.createElement(ln.Provider,{value:te},a.createElement(cn,Object.assign({width:Oe},O,{zIndex:le,getContainer:i===void 0?N:i,prefixCls:R,rootClassName:w(re,n,ee,U),footer:_,visible:o??c,mousePosition:b??_e,onClose:X,closable:I&&Object.assign({disabled:de,closeIcon:F},fe),closeIcon:F,focusTriggerAfterClose:l,transitionName:Ee(D,"zoom",e.transitionName),maskTransitionName:Ee(D,"fade",e.maskTransitionName),className:w(re,s,k==null?void 0:k.className),style:Object.assign(Object.assign(Object.assign({},k==null?void 0:k.style),d),ge),classNames:Object.assign(Object.assign(Object.assign({},k==null?void 0:k.classNames),m),{wrapper:w(q,m==null?void 0:m.wrapper)}),styles:Object.assign(Object.assign({},k==null?void 0:k.styles),C),panelRef:me,destroyOnClose:$??H,modalRender:Y}),v?a.createElement(ue,{active:!0,title:!1,paragraph:{rows:4},className:`${R}-body-skeleton`}):p))))},po=e=>{const{componentCls:t,titleFontSize:s,titleLineHeight:n,modalConfirmIconSize:o,fontSize:r,lineHeight:u,modalTitleHeight:i,fontHeight:l,confirmBodyPadding:d}=e,c=`${t}-confirm`;return{[c]:{"&-rtl":{direction:"rtl"},[`${e.antCls}-modal-header`]:{display:"none"},[`${c}-body-wrapper`]:Object.assign({},mn()),[`&${t} ${t}-body`]:{padding:d},[`${c}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${e.iconCls}`]:{flex:"none",fontSize:o,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(l).sub(o).equal()).div(2).equal()},[`&-has-title > ${e.iconCls}`]:{marginTop:e.calc(e.calc(i).sub(o).equal()).div(2).equal()}},[`${c}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:e.marginXS,maxWidth:`calc(100% - ${Le(e.marginSM)})`},[`${e.iconCls} + ${c}-paragraph`]:{maxWidth:`calc(100% - ${Le(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`},[`${c}-title`]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:s,lineHeight:n},[`${c}-content`]:{color:e.colorText,fontSize:r,lineHeight:u},[`${c}-btns`]:{textAlign:"end",marginTop:e.confirmBtnsMarginTop,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${c}-error ${c}-body > ${e.iconCls}`]:{color:e.colorError},[`${c}-warning ${c}-body > ${e.iconCls},
16
+ ${c}-confirm ${c}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${c}-info ${c}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${c}-success ${c}-body > ${e.iconCls}`]:{color:e.colorSuccess}}},yo=un(["Modal","confirm"],e=>{const t=dn(e);return po(t)},fn,{order:-1e3});var bo=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(s[n[o]]=e[n[o]]);return s};const Tt=e=>{const{prefixCls:t,icon:s,okText:n,cancelText:o,confirmPrefixCls:r,type:u,okCancel:i,footer:l,locale:d}=e,c=bo(e,["prefixCls","icon","okText","cancelText","confirmPrefixCls","type","okCancel","footer","locale"]);let f=s;if(!s&&s!==null)switch(u){case"info":f=a.createElement(Ot,null);break;case"success":f=a.createElement(Ct,null);break;case"error":f=a.createElement(vt,null);break;default:f=a.createElement(gt,null)}const g=i??u==="confirm",m=e.autoFocusButton===null?!1:e.autoFocusButton||"ok",[C]=De("Modal"),p=d||C,v=n||(g?p==null?void 0:p.okText:p==null?void 0:p.justOkText),h=o||(p==null?void 0:p.cancelText),y=a.useMemo(()=>Object.assign({autoFocusButton:m,cancelTextLocale:h,okTextLocale:v,mergedOkCancel:g},c),[m,h,v,g,c]),b=a.createElement(a.Fragment,null,a.createElement(et,null),a.createElement(tt,null)),E=e.title!==void 0&&e.title!==null,S=`${r}-body`;return a.createElement("div",{className:`${r}-body-wrapper`},a.createElement("div",{className:w(S,{[`${S}-has-title`]:E})},f,a.createElement("div",{className:`${r}-paragraph`},E&&a.createElement("span",{className:`${r}-title`},e.title),a.createElement("div",{className:`${r}-content`},e.content))),l===void 0||typeof l=="function"?a.createElement(jt,{value:y},a.createElement("div",{className:`${r}-btns`},typeof l=="function"?l(b,{OkBtn:tt,CancelBtn:et}):b)):l,a.createElement(yo,{prefixCls:t}))},ho=e=>{const{close:t,zIndex:s,maskStyle:n,direction:o,prefixCls:r,wrapClassName:u,rootPrefixCls:i,bodyStyle:l,closable:d=!1,onConfirm:c,styles:f,title:g}=e,m=`${r}-confirm`,C=e.width||416,p=e.style||{},v=e.mask===void 0?!0:e.mask,h=e.maskClosable===void 0?!1:e.maskClosable,y=w(m,`${m}-${e.type}`,{[`${m}-rtl`]:o==="rtl"},e.className),[,b]=gn(),E=a.useMemo(()=>s!==void 0?s:b.zIndexPopupBase+mt,[s,b]);return a.createElement(Rt,Object.assign({},e,{className:y,wrapClassName:w({[`${m}-centered`]:!!e.centered},u),onCancel:()=>{t==null||t({triggerCancel:!0}),c==null||c(!1)},title:g,footer:null,transitionName:Ee(i||"","zoom",e.transitionName),maskTransitionName:Ee(i||"","fade",e.maskTransitionName),mask:v,maskClosable:h,style:p,styles:Object.assign({body:l,mask:n},f),width:C,zIndex:E,closable:d}),a.createElement(Tt,Object.assign({},e,{confirmPrefixCls:m})))},Mt=e=>{const{rootPrefixCls:t,iconPrefixCls:s,direction:n,theme:o}=e;return a.createElement(qe,{prefixCls:t,iconPrefixCls:s,direction:n,theme:o},a.createElement(ho,Object.assign({},e)))},oe=[];let Ft="";function At(){return Ft}const xo=e=>{var t,s;const{prefixCls:n,getContainer:o,direction:r}=e,u=yt(),i=J(W),l=At()||i.getPrefixCls(),d=n||`${l}-modal`;let c=o;return c===!1&&(c=void 0),j.createElement(Mt,Object.assign({},e,{rootPrefixCls:l,prefixCls:d,iconPrefixCls:i.iconPrefixCls,theme:i.theme,direction:r??i.direction,locale:(s=(t=i.locale)===null||t===void 0?void 0:t.Modal)!==null&&s!==void 0?s:u,getContainer:c}))};function xe(e){const t=ht(),s=document.createDocumentFragment();let n=Object.assign(Object.assign({},e),{close:l,open:!0}),o,r;function u(...c){var f;if(c.some(C=>C==null?void 0:C.triggerCancel)){var m;(f=e.onCancel)===null||f===void 0||(m=f).call.apply(m,[e,()=>{}].concat(z(c.slice(1))))}for(let C=0;C<oe.length;C++)if(oe[C]===l){oe.splice(C,1);break}r()}const i=c=>{clearTimeout(o),o=setTimeout(()=>{const f=t.getPrefixCls(void 0,At()),g=t.getIconPrefixCls(),m=t.getTheme(),C=j.createElement(xo,Object.assign({},c));r=xt()(j.createElement(qe,{prefixCls:f,iconPrefixCls:g,theme:m},typeof t.holderRender=="function"?t.holderRender(C):C),s)})};function l(...c){n=Object.assign(Object.assign({},n),{open:!1,afterClose:()=>{typeof e.afterClose=="function"&&e.afterClose(),u.apply(this,c)}}),n.visible&&delete n.visible,i(n)}function d(c){typeof c=="function"?n=c(n):n=Object.assign(Object.assign({},n),c),i(n)}return i(n),oe.push(l),{destroy:l,update:d}}function Ht(e){return Object.assign(Object.assign({},e),{type:"warning"})}function Lt(e){return Object.assign(Object.assign({},e),{type:"info"})}function _t(e){return Object.assign(Object.assign({},e),{type:"success"})}function Bt(e){return Object.assign(Object.assign({},e),{type:"error"})}function zt(e){return Object.assign(Object.assign({},e),{type:"confirm"})}function Oo({rootPrefixCls:e}){Ft=e}var $o=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(s[n[o]]=e[n[o]]);return s};const Eo=(e,t)=>{var s,{afterClose:n,config:o}=e,r=$o(e,["afterClose","config"]);const[u,i]=a.useState(!0),[l,d]=a.useState(o),{direction:c,getPrefixCls:f}=a.useContext(W),g=f("modal"),m=f(),C=()=>{var y;n(),(y=l.afterClose)===null||y===void 0||y.call(l)},p=(...y)=>{var b;if(i(!1),y.some($=>$==null?void 0:$.triggerCancel)){var S;(b=l.onCancel)===null||b===void 0||(S=b).call.apply(S,[l,()=>{}].concat(z(y.slice(1))))}};a.useImperativeHandle(t,()=>({destroy:p,update:y=>{d(b=>{const E=typeof y=="function"?y(b):y;return Object.assign(Object.assign({},b),E)})}}));const v=(s=l.okCancel)!==null&&s!==void 0?s:l.type==="confirm",[h]=De("Modal",vn.Modal);return a.createElement(Mt,Object.assign({prefixCls:g,rootPrefixCls:m},l,{close:p,open:u,afterClose:C,okText:l.okText||(v?h==null?void 0:h.okText:h==null?void 0:h.justOkText),direction:l.direction||c,cancelText:l.cancelText||(h==null?void 0:h.cancelText)},r))},So=a.forwardRef(Eo);let rt=0;const Po=a.memo(a.forwardRef((e,t)=>{const[s,n]=In();return a.useImperativeHandle(t,()=>({patchElement:n}),[n]),a.createElement(a.Fragment,null,s)}));function No(){const e=a.useRef(null),[t,s]=a.useState([]);a.useEffect(()=>{t.length&&(z(t).forEach(u=>{u()}),s([]))},[t]);const n=a.useCallback(r=>function(i){var l;rt+=1;const d=a.createRef();let c;const f=new Promise(v=>{c=v});let g=!1,m;const C=a.createElement(So,{key:`modal-${rt}`,config:r(i),ref:d,afterClose:()=>{m==null||m()},isSilent:()=>g,onConfirm:v=>{c(v)}});return m=(l=e.current)===null||l===void 0?void 0:l.patchElement(C),m&&oe.push(m),{destroy:()=>{function v(){var h;(h=d.current)===null||h===void 0||h.destroy()}d.current?v():s(h=>[].concat(z(h),[v]))},update:v=>{function h(){var y;(y=d.current)===null||y===void 0||y.update(v)}d.current?h():s(y=>[].concat(z(y),[h]))},then:v=>(g=!0,f.then(v))}},[]);return[a.useMemo(()=>({info:n(Lt),success:n(_t),error:n(Bt),warning:n(Ht),confirm:n(zt)}),[n]),a.createElement(Po,{key:"modal-holder",ref:e})]}const ko=j.createContext({});let B=null,se=e=>e(),ye=[],be={};function lt(){const{getContainer:e,duration:t,rtl:s,maxCount:n,top:o}=be,r=(e==null?void 0:e())||document.body;return{getContainer:()=>r,duration:t,rtl:s,maxCount:n,top:o}}const jo=j.forwardRef((e,t)=>{const{messageConfig:s,sync:n}=e,{getPrefixCls:o}=J(W),r=be.prefixCls||o("message"),u=J(ko),[i,l]=Nt(Object.assign(Object.assign(Object.assign({},s),{prefixCls:r}),u.message));return j.useImperativeHandle(t,()=>{const d=Object.assign({},i);return Object.keys(d).forEach(c=>{d[c]=(...f)=>(n(),i[c].apply(i,f))}),{instance:d,sync:n}}),l}),wo=j.forwardRef((e,t)=>{const[s,n]=j.useState(lt),o=()=>{n(lt)};j.useEffect(o,[]);const r=ht(),u=r.getRootPrefixCls(),i=r.getIconPrefixCls(),l=r.getTheme(),d=j.createElement(jo,{ref:t,sync:o,messageConfig:s});return j.createElement(qe,{prefixCls:u,iconPrefixCls:i,theme:l},r.holderRender?r.holderRender(d):d)}),ke=()=>{if(!B){const e=document.createDocumentFragment(),t={fragment:e};B=t,se(()=>{xt()(j.createElement(wo,{ref:n=>{const{instance:o,sync:r}=n||{};Promise.resolve().then(()=>{!t.instance&&o&&(t.instance=o,t.sync=r,ke())})}}),e)});return}B.instance&&(ye.forEach(e=>{const{type:t,skipped:s}=e;if(!s)switch(t){case"open":{se(()=>{const n=B.instance.open(Object.assign(Object.assign({},be),e.config));n==null||n.then(e.resolve),e.setCloseFn(n)});break}case"destroy":se(()=>{B==null||B.instance.destroy(e.key)});break;default:se(()=>{var n;const o=(n=B.instance)[t].apply(n,z(e.args));o==null||o.then(e.resolve),e.setCloseFn(o)})}}),ye=[])};function Io(e){be=Object.assign(Object.assign({},be),e),se(()=>{var t;(t=B==null?void 0:B.sync)===null||t===void 0||t.call(B)})}function Ro(e){const t=Ve(s=>{let n;const o={type:"open",config:e,resolve:s,setCloseFn:r=>{n=r}};return ye.push(o),()=>{n?se(()=>{n()}):o.skipped=!0}});return ke(),t}function To(e,t){const s=Ve(n=>{let o;const r={type:e,args:t,resolve:n,setCloseFn:u=>{o=u}};return ye.push(r),()=>{o?se(()=>{o()}):r.skipped=!0}});return ke(),s}const Mo=e=>{ye.push({type:"destroy",key:e}),ke()},Fo=["success","info","warning","error","loading"],Ao={open:Ro,destroy:Mo,config:Io,useMessage:qn,_InternalPanelDoNotUseOrYouWillBeFired:An},Ho=Ao;Fo.forEach(e=>{Ho[e]=(...t)=>To(e,t)});var Lo=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(s[n[o]]=e[n[o]]);return s};const _o=e=>{const{prefixCls:t,className:s,closeIcon:n,closable:o,type:r,title:u,children:i,footer:l}=e,d=Lo(e,["prefixCls","className","closeIcon","closable","type","title","children","footer"]),{getPrefixCls:c}=a.useContext(W),f=c(),g=t||c("modal"),m=Se(f),[C,p,v]=bt(g,m),h=`${g}-confirm`;let y={};return r?y={closable:o??!1,title:"",footer:"",children:a.createElement(Tt,Object.assign({},e,{prefixCls:g,confirmPrefixCls:h,rootPrefixCls:f,content:i}))}:y={closable:o??!0,title:u,footer:l!==null&&a.createElement(It,Object.assign({},e)),children:i},C(a.createElement(pn,Object.assign({prefixCls:g,className:w(p,`${g}-pure-panel`,r&&h,r&&`${h}-${r}`,s,v,m)},d,{closeIcon:wt(g,n),closable:o},y)))},Bo=Cn(_o);function Wt(e){return xe(Ht(e))}const G=Rt;G.useModal=No;G.info=function(t){return xe(Lt(t))};G.success=function(t){return xe(_t(t))};G.error=function(t){return xe(Bt(t))};G.warning=Wt;G.warn=Wt;G.confirm=function(t){return xe(zt(t))};G.destroyAll=function(){for(;oe.length;){const t=oe.pop();t&&t()}};G.config=Oo;G._InternalPanelDoNotUseOrYouWillBeFired=Bo;export{G as M,ue as S,Ho as s,go as u};