@gientech/modual 1.9.4-fix.6 → 1.9.4-fix.8
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/assets/{GientechStreamReader-nzJWel0c.js → GientechStreamReader-DGemvEOS.js} +2 -2
- package/assets/{index-DdVFXD_y.js → index-BVDU9PrK.js} +1 -1
- package/assets/{index-j0kQJd0a.js → index-ByvRmu2a.js} +1 -1
- package/assets/index-CfbTJRNC.js +285 -0
- package/assets/{index-R8HnY_Ab.js → index-CtR7JL1j.js} +1 -1
- package/assets/{index-DwoTKC3G.js → index-D8mrZqFQ.js} +1 -1
- package/assets/index-DNZYgz0p.js +2257 -0
- package/assets/{index-BKe5FgcC.js → index-DZ_BW6Hp.js} +1 -1
- package/assets/{index-D72cKELw.js → index-UHqCy9nm.js} +1 -1
- package/assets/{index-x8IlxRuv.js → index-cZm_IH3D.js} +1 -1
- package/assets/{index-CF21Mbsz.js → index-j7prCwD2.js} +1 -1
- package/assets/{plus-V9zUoSq6.js → plus-Dmqa3k_O.js} +1 -1
- package/assets/style-BSpDpc7m.js +16 -0
- package/assets/style.css +1 -1
- package/assets/{x-CnaaLGJF.js → x-B2JeGn6d.js} +1 -1
- package/assistantConfig.js +1 -1
- package/chat.js +10 -10
- package/database.js +1 -1
- package/databaseId.js +1 -1
- package/databaseTable.js +1 -1
- package/index.js +1 -1
- package/modelManage.js +1 -1
- package/package.json +1 -1
- package/sensitive.js +1 -1
- package/streamFilesReader.js +1 -1
- package/assets/index-g-SUxfJH.js +0 -280
- package/assets/index-h59-yboB.js +0 -1393
- package/assets/style-CGmZ5osp.js +0 -21
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import*as a from"react";import c,{useEffect as Kt,useMemo as Vt}from"react";import{ac as je,A as G,H as Pe,M as Y,f as E,L as X,a5 as nt,E as Gt,ad as Jt,J as Ft,g as vt,m as ft,ae as Ut,r as ht,k as $,af as at,U as Qt,ag as Yt,ah as Zt,ai as kt,aj as ei,ak as ti,al as ii,w as ni,am as ai,u as St,s as ri,an as oi,ao as li,S as ci,N as si,o as ui,K as bt}from"./index-g-SUxfJH.js";var di={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},mi=function(t,n){return a.createElement(je,G({},t,{ref:n,icon:di}))},rt=a.forwardRef(mi),gi={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},pi=function(t,n){return a.createElement(je,G({},t,{ref:n,icon:gi}))},ot=a.forwardRef(pi);function vi(e,t,n){var i=n||{},r=i.noTrailing,g=r===void 0?!1:r,f=i.noLeading,h=f===void 0?!1:f,m=i.debounceMode,y=m===void 0?void 0:m,S,d=!1,x=0;function O(){S&&clearTimeout(S)}function _(v){var N=v||{},I=N.upcomingOnly,R=I===void 0?!1:I;O(),d=!R}function j(){for(var v=arguments.length,N=new Array(v),I=0;I<v;I++)N[I]=arguments[I];var R=this,W=Date.now()-x;if(d)return;function l(){x=Date.now(),t.apply(R,N)}function z(){S=void 0}!h&&y&&!S&&l(),O(),y===void 0&&W>e?h?(x=Date.now(),g||(S=setTimeout(y?z:l,e))):l():g!==!0&&(S=setTimeout(y?z:l,y===void 0?e-W:e))}return j.cancel=_,j}function fi(e,t,n){var i={},r=i.atBegin,g=r===void 0?!1:r;return vi(e,t,{debounceMode:g!==!1})}var hi={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"},Si=function(t,n){return a.createElement(je,G({},t,{ref:n,icon:hi}))},lt=a.forwardRef(Si),bi={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},$i=function(t,n){return a.createElement(je,G({},t,{ref:n,icon:bi}))},ct=a.forwardRef($i),Ci={items_per_page:"\u6761/\u9875",jump_to:"\u8DF3\u81F3",jump_to_confirm:"\u786E\u5B9A",page:"\u9875",prev_page:"\u4E0A\u4E00\u9875",next_page:"\u4E0B\u4E00\u9875",prev_5:"\u5411\u524D 5 \u9875",next_5:"\u5411\u540E 5 \u9875",prev_3:"\u5411\u524D 3 \u9875",next_3:"\u5411\u540E 3 \u9875",page_size:"\u9875\u7801"},yi=[10,20,50,100],xi=function(t){var n=t.pageSizeOptions,i=n===void 0?yi:n,r=t.locale,g=t.changeSize,f=t.pageSize,h=t.goButton,m=t.quickGo,y=t.rootPrefixCls,S=t.disabled,d=t.buildOptionText,x=t.showSizeChanger,O=t.sizeChangerRender,_=c.useState(""),j=Pe(_,2),v=j[0],N=j[1],I=function(){return!v||Number.isNaN(v)?void 0:Number(v)},R=typeof d=="function"?d:function(p){return"".concat(p," ").concat(r.items_per_page)},W=function(b){N(b.target.value)},l=function(b){h||v===""||(N(""),!(b.relatedTarget&&(b.relatedTarget.className.indexOf("".concat(y,"-item-link"))>=0||b.relatedTarget.className.indexOf("".concat(y,"-item"))>=0))&&(m==null||m(I())))},z=function(b){v!==""&&(b.keyCode===Y.ENTER||b.type==="click")&&(N(""),m==null||m(I()))},K=function(){return i.some(function(b){return b.toString()===f.toString()})?i:i.concat([f]).sort(function(b,L){var ee=Number.isNaN(Number(b))?0:Number(b),V=Number.isNaN(Number(L))?0:Number(L);return ee-V})},w="".concat(y,"-options");if(!x&&!m)return null;var B=null,H=null,J=null;return x&&O&&(B=O({disabled:S,size:f,onSizeChange:function(b){g==null||g(Number(b))},"aria-label":r.page_size,className:"".concat(w,"-size-changer"),options:K().map(function(p){return{label:R(p),value:p}})})),m&&(h&&(J=typeof h=="boolean"?c.createElement("button",{type:"button",onClick:z,onKeyUp:z,disabled:S,className:"".concat(w,"-quick-jumper-button")},r.jump_to_confirm):c.createElement("span",{onClick:z,onKeyUp:z},h)),H=c.createElement("div",{className:"".concat(w,"-quick-jumper")},r.jump_to,c.createElement("input",{disabled:S,type:"text",value:v,onChange:W,onKeyUp:z,onBlur:l,"aria-label":r.page}),r.page,J)),c.createElement("li",{className:w},B,H)},ve=function(t){var n=t.rootPrefixCls,i=t.page,r=t.active,g=t.className,f=t.showTitle,h=t.onClick,m=t.onKeyPress,y=t.itemRender,S="".concat(n,"-item"),d=E(S,"".concat(S,"-").concat(i),X(X({},"".concat(S,"-active"),r),"".concat(S,"-disabled"),!i),g),x=function(){h(i)},O=function(v){m(v,h,i)},_=y(i,"page",c.createElement("a",{rel:"nofollow"},i));return _?c.createElement("li",{title:f?String(i):null,className:d,onClick:x,onKeyDown:O,tabIndex:0},_):null},zi=function(t,n,i){return i};function st(){}function ut(e){var t=Number(e);return typeof t=="number"&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function ae(e,t,n){var i=typeof e>"u"?t:e;return Math.floor((n-1)/i)+1}var Ni=function(t){var n=t.prefixCls,i=n===void 0?"rc-pagination":n,r=t.selectPrefixCls,g=r===void 0?"rc-select":r,f=t.className,h=t.current,m=t.defaultCurrent,y=m===void 0?1:m,S=t.total,d=S===void 0?0:S,x=t.pageSize,O=t.defaultPageSize,_=O===void 0?10:O,j=t.onChange,v=j===void 0?st:j,N=t.hideOnSinglePage,I=t.align,R=t.showPrevNextJumpers,W=R===void 0?!0:R,l=t.showQuickJumper,z=t.showLessItems,K=t.showTitle,w=K===void 0?!0:K,B=t.onShowSizeChange,H=B===void 0?st:B,J=t.locale,p=J===void 0?Ci:J,b=t.style,L=t.totalBoundaryShowSizeChanger,ee=L===void 0?50:L,V=t.disabled,D=t.simple,A=t.showTotal,Z=t.showSizeChanger,Me=Z===void 0?d>ee:Z,Be=t.sizeChangerRender,Te=t.pageSizeOptions,fe=t.itemRender,te=fe===void 0?zi:fe,he=t.jumpPrevIcon,F=t.jumpNextIcon,ie=t.prevIcon,le=t.nextIcon,ce=c.useRef(null),ne=nt(10,{value:x,defaultValue:_}),Se=Pe(ne,2),M=Se[0],be=Se[1],De=nt(1,{value:h,defaultValue:y,postState:function(u){return Math.max(1,Math.min(u,ae(void 0,M,d)))}}),re=Pe(De,2),s=re[0],U=re[1],_e=c.useState(s),Xe=Pe(_e,2),oe=Xe[0],$e=Xe[1];Kt(function(){$e(s)},[s]);var We=Math.max(1,s-(z?3:5)),Ke=Math.min(ae(void 0,M,d),s+(z?3:5));function Ce(o,u){var C=o||c.createElement("button",{type:"button","aria-label":u,className:"".concat(i,"-item-link")});return typeof o=="function"&&(C=c.createElement(o,Ft({},t))),C}function Ve(o){var u=o.target.value,C=ae(void 0,M,d),k;return u===""?k=u:Number.isNaN(Number(u))?k=oe:u>=C?k=C:k=Number(u),k}function Nt(o){return ut(o)&&o!==s&&ut(d)&&d>0}var Et=d>M?l:!1;function It(o){(o.keyCode===Y.UP||o.keyCode===Y.DOWN)&&o.preventDefault()}function Ge(o){var u=Ve(o);switch(u!==oe&&$e(u),o.keyCode){case Y.ENTER:q(u);break;case Y.UP:q(u-1);break;case Y.DOWN:q(u+1);break}}function wt(o){q(Ve(o))}function Pt(o){var u=ae(o,M,d),C=s>u&&u!==0?u:s;be(o),$e(C),H==null||H(s,o),U(C),v==null||v(C,o)}function q(o){if(Nt(o)&&!V){var u=ae(void 0,M,d),C=o;return o>u?C=u:o<1&&(C=1),C!==oe&&$e(C),U(C),v==null||v(C,M),C}return s}var ye=s>1,xe=s<ae(void 0,M,d);function Je(){ye&&q(s-1)}function Fe(){xe&&q(s+1)}function Ue(){q(We)}function Qe(){q(Ke)}function se(o,u){if(o.key==="Enter"||o.charCode===Y.ENTER||o.keyCode===Y.ENTER){for(var C=arguments.length,k=new Array(C>2?C-2:0),we=2;we<C;we++)k[we-2]=arguments[we];u.apply(void 0,k)}}function Ot(o){se(o,Je)}function jt(o){se(o,Fe)}function Mt(o){se(o,Ue)}function Bt(o){se(o,Qe)}function Tt(o){var u=te(o,"prev",Ce(ie,"prev page"));return c.isValidElement(u)?c.cloneElement(u,{disabled:!ye}):u}function Dt(o){var u=te(o,"next",Ce(le,"next page"));return c.isValidElement(u)?c.cloneElement(u,{disabled:!xe}):u}function ze(o){(o.type==="click"||o.keyCode===Y.ENTER)&&q(oe)}var Ye=null,_t=Gt(t,{aria:!0,data:!0}),Rt=A&&c.createElement("li",{className:"".concat(i,"-total-text")},A(d,[d===0?0:(s-1)*M+1,s*M>d?d:s*M])),Ze=null,P=ae(void 0,M,d);if(N&&d<=M)return null;var T=[],ue={rootPrefixCls:i,onClick:q,onKeyPress:se,showTitle:w,itemRender:te,page:-1},Ht=s-1>0?s-1:0,Lt=s+1<P?s+1:P,Ne=l&&l.goButton,At=Jt(D)==="object"?D.readOnly:!D,de=Ne,ke=null;D&&(Ne&&(typeof Ne=="boolean"?de=c.createElement("button",{type:"button",onClick:ze,onKeyUp:ze},p.jump_to_confirm):de=c.createElement("span",{onClick:ze,onKeyUp:ze},Ne),de=c.createElement("li",{title:w?"".concat(p.jump_to).concat(s,"/").concat(P):null,className:"".concat(i,"-simple-pager")},de)),ke=c.createElement("li",{title:w?"".concat(s,"/").concat(P):null,className:"".concat(i,"-simple-pager")},At?oe:c.createElement("input",{type:"text","aria-label":p.jump_to,value:oe,disabled:V,onKeyDown:It,onKeyUp:Ge,onChange:Ge,onBlur:wt,size:3}),c.createElement("span",{className:"".concat(i,"-slash")},"/"),P));var Q=z?1:2;if(P<=3+Q*2){P||T.push(c.createElement(ve,G({},ue,{key:"noPager",page:1,className:"".concat(i,"-item-disabled")})));for(var me=1;me<=P;me+=1)T.push(c.createElement(ve,G({},ue,{key:me,page:me,active:s===me})))}else{var qt=z?p.prev_3:p.prev_5,Xt=z?p.next_3:p.next_5,et=te(We,"jump-prev",Ce(he,"prev page")),tt=te(Ke,"jump-next",Ce(F,"next page"));W&&(Ye=et?c.createElement("li",{title:w?qt:null,key:"prev",onClick:Ue,tabIndex:0,onKeyDown:Mt,className:E("".concat(i,"-jump-prev"),X({},"".concat(i,"-jump-prev-custom-icon"),!!he))},et):null,Ze=tt?c.createElement("li",{title:w?Xt:null,key:"next",onClick:Qe,tabIndex:0,onKeyDown:Bt,className:E("".concat(i,"-jump-next"),X({},"".concat(i,"-jump-next-custom-icon"),!!F))},tt):null);var Re=Math.max(1,s-Q),He=Math.min(s+Q,P);s-1<=Q&&(He=1+Q*2),P-s<=Q&&(Re=P-Q*2);for(var ge=Re;ge<=He;ge+=1)T.push(c.createElement(ve,G({},ue,{key:ge,page:ge,active:s===ge})));if(s-1>=Q*2&&s!==3&&(T[0]=c.cloneElement(T[0],{className:E("".concat(i,"-item-after-jump-prev"),T[0].props.className)}),T.unshift(Ye)),P-s>=Q*2&&s!==P-2){var it=T[T.length-1];T[T.length-1]=c.cloneElement(it,{className:E("".concat(i,"-item-before-jump-next"),it.props.className)}),T.push(Ze)}Re!==1&&T.unshift(c.createElement(ve,G({},ue,{key:1,page:1}))),He!==P&&T.push(c.createElement(ve,G({},ue,{key:P,page:P})))}var Ee=Tt(Ht);if(Ee){var Le=!ye||!P;Ee=c.createElement("li",{title:w?p.prev_page:null,onClick:Je,tabIndex:Le?null:0,onKeyDown:Ot,className:E("".concat(i,"-prev"),X({},"".concat(i,"-disabled"),Le)),"aria-disabled":Le},Ee)}var Ie=Dt(Lt);if(Ie){var pe,Ae;D?(pe=!xe,Ae=ye?0:null):(pe=!xe||!P,Ae=pe?null:0),Ie=c.createElement("li",{title:w?p.next_page:null,onClick:Fe,tabIndex:Ae,onKeyDown:jt,className:E("".concat(i,"-next"),X({},"".concat(i,"-disabled"),pe)),"aria-disabled":pe},Ie)}var Wt=E(i,f,X(X(X(X(X({},"".concat(i,"-start"),I==="start"),"".concat(i,"-center"),I==="center"),"".concat(i,"-end"),I==="end"),"".concat(i,"-simple"),D),"".concat(i,"-disabled"),V));return c.createElement("ul",G({className:Wt,style:b,ref:ce},_t),Rt,Ee,D?ke:T,Ie,c.createElement(xi,{locale:p,rootPrefixCls:i,disabled:V,selectPrefixCls:g,changeSize:Pt,pageSize:M,pageSizeOptions:Te,quickGo:Et?q:null,goButton:de,showSizeChanger:Me,sizeChangerRender:Be}))};const Ei=e=>{const{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-item`]:{cursor:"not-allowed",backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"},a:{color:e.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${t}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}}}},Ii=e=>{const{componentCls:t}=e;return{[`&${t}-mini ${t}-total-text, &${t}-mini ${t}-simple-pager`]:{height:e.itemSizeSM,lineHeight:$(e.itemSizeSM)},[`&${t}-mini ${t}-item`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:$(e.calc(e.itemSizeSM).sub(2).equal())},[`&${t}-mini ${t}-prev, &${t}-mini ${t}-next`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:$(e.itemSizeSM)},[`&${t}-mini:not(${t}-disabled)`]:{[`${t}-prev, ${t}-next`]:{[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover ${t}-item-link`]:{backgroundColor:"transparent"}}},[`
|
|
1
|
+
import*as a from"react";import c,{useEffect as Kt,useMemo as Vt}from"react";import{ac as je,A as G,H as Pe,M as Y,f as E,L as X,a5 as nt,E as Gt,ad as Jt,J as Ft,g as vt,m as ft,ae as Ut,r as ht,k as $,af as at,U as Qt,ag as Yt,ah as Zt,ai as kt,aj as ei,ak as ti,al as ii,w as ni,am as ai,u as St,s as ri,an as oi,ao as li,S as ci,N as si,o as ui,K as bt}from"./index-CfbTJRNC.js";var di={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},mi=function(t,n){return a.createElement(je,G({},t,{ref:n,icon:di}))},rt=a.forwardRef(mi),gi={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},pi=function(t,n){return a.createElement(je,G({},t,{ref:n,icon:gi}))},ot=a.forwardRef(pi);function vi(e,t,n){var i=n||{},r=i.noTrailing,g=r===void 0?!1:r,f=i.noLeading,h=f===void 0?!1:f,m=i.debounceMode,y=m===void 0?void 0:m,S,d=!1,x=0;function O(){S&&clearTimeout(S)}function _(v){var N=v||{},I=N.upcomingOnly,R=I===void 0?!1:I;O(),d=!R}function j(){for(var v=arguments.length,N=new Array(v),I=0;I<v;I++)N[I]=arguments[I];var R=this,W=Date.now()-x;if(d)return;function l(){x=Date.now(),t.apply(R,N)}function z(){S=void 0}!h&&y&&!S&&l(),O(),y===void 0&&W>e?h?(x=Date.now(),g||(S=setTimeout(y?z:l,e))):l():g!==!0&&(S=setTimeout(y?z:l,y===void 0?e-W:e))}return j.cancel=_,j}function fi(e,t,n){var i={},r=i.atBegin,g=r===void 0?!1:r;return vi(e,t,{debounceMode:g!==!1})}var hi={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"},Si=function(t,n){return a.createElement(je,G({},t,{ref:n,icon:hi}))},lt=a.forwardRef(Si),bi={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},$i=function(t,n){return a.createElement(je,G({},t,{ref:n,icon:bi}))},ct=a.forwardRef($i),Ci={items_per_page:"\u6761/\u9875",jump_to:"\u8DF3\u81F3",jump_to_confirm:"\u786E\u5B9A",page:"\u9875",prev_page:"\u4E0A\u4E00\u9875",next_page:"\u4E0B\u4E00\u9875",prev_5:"\u5411\u524D 5 \u9875",next_5:"\u5411\u540E 5 \u9875",prev_3:"\u5411\u524D 3 \u9875",next_3:"\u5411\u540E 3 \u9875",page_size:"\u9875\u7801"},yi=[10,20,50,100],xi=function(t){var n=t.pageSizeOptions,i=n===void 0?yi:n,r=t.locale,g=t.changeSize,f=t.pageSize,h=t.goButton,m=t.quickGo,y=t.rootPrefixCls,S=t.disabled,d=t.buildOptionText,x=t.showSizeChanger,O=t.sizeChangerRender,_=c.useState(""),j=Pe(_,2),v=j[0],N=j[1],I=function(){return!v||Number.isNaN(v)?void 0:Number(v)},R=typeof d=="function"?d:function(p){return"".concat(p," ").concat(r.items_per_page)},W=function(b){N(b.target.value)},l=function(b){h||v===""||(N(""),!(b.relatedTarget&&(b.relatedTarget.className.indexOf("".concat(y,"-item-link"))>=0||b.relatedTarget.className.indexOf("".concat(y,"-item"))>=0))&&(m==null||m(I())))},z=function(b){v!==""&&(b.keyCode===Y.ENTER||b.type==="click")&&(N(""),m==null||m(I()))},K=function(){return i.some(function(b){return b.toString()===f.toString()})?i:i.concat([f]).sort(function(b,L){var ee=Number.isNaN(Number(b))?0:Number(b),V=Number.isNaN(Number(L))?0:Number(L);return ee-V})},w="".concat(y,"-options");if(!x&&!m)return null;var B=null,H=null,J=null;return x&&O&&(B=O({disabled:S,size:f,onSizeChange:function(b){g==null||g(Number(b))},"aria-label":r.page_size,className:"".concat(w,"-size-changer"),options:K().map(function(p){return{label:R(p),value:p}})})),m&&(h&&(J=typeof h=="boolean"?c.createElement("button",{type:"button",onClick:z,onKeyUp:z,disabled:S,className:"".concat(w,"-quick-jumper-button")},r.jump_to_confirm):c.createElement("span",{onClick:z,onKeyUp:z},h)),H=c.createElement("div",{className:"".concat(w,"-quick-jumper")},r.jump_to,c.createElement("input",{disabled:S,type:"text",value:v,onChange:W,onKeyUp:z,onBlur:l,"aria-label":r.page}),r.page,J)),c.createElement("li",{className:w},B,H)},ve=function(t){var n=t.rootPrefixCls,i=t.page,r=t.active,g=t.className,f=t.showTitle,h=t.onClick,m=t.onKeyPress,y=t.itemRender,S="".concat(n,"-item"),d=E(S,"".concat(S,"-").concat(i),X(X({},"".concat(S,"-active"),r),"".concat(S,"-disabled"),!i),g),x=function(){h(i)},O=function(v){m(v,h,i)},_=y(i,"page",c.createElement("a",{rel:"nofollow"},i));return _?c.createElement("li",{title:f?String(i):null,className:d,onClick:x,onKeyDown:O,tabIndex:0},_):null},zi=function(t,n,i){return i};function st(){}function ut(e){var t=Number(e);return typeof t=="number"&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function ae(e,t,n){var i=typeof e>"u"?t:e;return Math.floor((n-1)/i)+1}var Ni=function(t){var n=t.prefixCls,i=n===void 0?"rc-pagination":n,r=t.selectPrefixCls,g=r===void 0?"rc-select":r,f=t.className,h=t.current,m=t.defaultCurrent,y=m===void 0?1:m,S=t.total,d=S===void 0?0:S,x=t.pageSize,O=t.defaultPageSize,_=O===void 0?10:O,j=t.onChange,v=j===void 0?st:j,N=t.hideOnSinglePage,I=t.align,R=t.showPrevNextJumpers,W=R===void 0?!0:R,l=t.showQuickJumper,z=t.showLessItems,K=t.showTitle,w=K===void 0?!0:K,B=t.onShowSizeChange,H=B===void 0?st:B,J=t.locale,p=J===void 0?Ci:J,b=t.style,L=t.totalBoundaryShowSizeChanger,ee=L===void 0?50:L,V=t.disabled,D=t.simple,A=t.showTotal,Z=t.showSizeChanger,Me=Z===void 0?d>ee:Z,Be=t.sizeChangerRender,Te=t.pageSizeOptions,fe=t.itemRender,te=fe===void 0?zi:fe,he=t.jumpPrevIcon,F=t.jumpNextIcon,ie=t.prevIcon,le=t.nextIcon,ce=c.useRef(null),ne=nt(10,{value:x,defaultValue:_}),Se=Pe(ne,2),M=Se[0],be=Se[1],De=nt(1,{value:h,defaultValue:y,postState:function(u){return Math.max(1,Math.min(u,ae(void 0,M,d)))}}),re=Pe(De,2),s=re[0],U=re[1],_e=c.useState(s),Xe=Pe(_e,2),oe=Xe[0],$e=Xe[1];Kt(function(){$e(s)},[s]);var We=Math.max(1,s-(z?3:5)),Ke=Math.min(ae(void 0,M,d),s+(z?3:5));function Ce(o,u){var C=o||c.createElement("button",{type:"button","aria-label":u,className:"".concat(i,"-item-link")});return typeof o=="function"&&(C=c.createElement(o,Ft({},t))),C}function Ve(o){var u=o.target.value,C=ae(void 0,M,d),k;return u===""?k=u:Number.isNaN(Number(u))?k=oe:u>=C?k=C:k=Number(u),k}function Nt(o){return ut(o)&&o!==s&&ut(d)&&d>0}var Et=d>M?l:!1;function It(o){(o.keyCode===Y.UP||o.keyCode===Y.DOWN)&&o.preventDefault()}function Ge(o){var u=Ve(o);switch(u!==oe&&$e(u),o.keyCode){case Y.ENTER:q(u);break;case Y.UP:q(u-1);break;case Y.DOWN:q(u+1);break}}function wt(o){q(Ve(o))}function Pt(o){var u=ae(o,M,d),C=s>u&&u!==0?u:s;be(o),$e(C),H==null||H(s,o),U(C),v==null||v(C,o)}function q(o){if(Nt(o)&&!V){var u=ae(void 0,M,d),C=o;return o>u?C=u:o<1&&(C=1),C!==oe&&$e(C),U(C),v==null||v(C,M),C}return s}var ye=s>1,xe=s<ae(void 0,M,d);function Je(){ye&&q(s-1)}function Fe(){xe&&q(s+1)}function Ue(){q(We)}function Qe(){q(Ke)}function se(o,u){if(o.key==="Enter"||o.charCode===Y.ENTER||o.keyCode===Y.ENTER){for(var C=arguments.length,k=new Array(C>2?C-2:0),we=2;we<C;we++)k[we-2]=arguments[we];u.apply(void 0,k)}}function Ot(o){se(o,Je)}function jt(o){se(o,Fe)}function Mt(o){se(o,Ue)}function Bt(o){se(o,Qe)}function Tt(o){var u=te(o,"prev",Ce(ie,"prev page"));return c.isValidElement(u)?c.cloneElement(u,{disabled:!ye}):u}function Dt(o){var u=te(o,"next",Ce(le,"next page"));return c.isValidElement(u)?c.cloneElement(u,{disabled:!xe}):u}function ze(o){(o.type==="click"||o.keyCode===Y.ENTER)&&q(oe)}var Ye=null,_t=Gt(t,{aria:!0,data:!0}),Rt=A&&c.createElement("li",{className:"".concat(i,"-total-text")},A(d,[d===0?0:(s-1)*M+1,s*M>d?d:s*M])),Ze=null,P=ae(void 0,M,d);if(N&&d<=M)return null;var T=[],ue={rootPrefixCls:i,onClick:q,onKeyPress:se,showTitle:w,itemRender:te,page:-1},Ht=s-1>0?s-1:0,Lt=s+1<P?s+1:P,Ne=l&&l.goButton,At=Jt(D)==="object"?D.readOnly:!D,de=Ne,ke=null;D&&(Ne&&(typeof Ne=="boolean"?de=c.createElement("button",{type:"button",onClick:ze,onKeyUp:ze},p.jump_to_confirm):de=c.createElement("span",{onClick:ze,onKeyUp:ze},Ne),de=c.createElement("li",{title:w?"".concat(p.jump_to).concat(s,"/").concat(P):null,className:"".concat(i,"-simple-pager")},de)),ke=c.createElement("li",{title:w?"".concat(s,"/").concat(P):null,className:"".concat(i,"-simple-pager")},At?oe:c.createElement("input",{type:"text","aria-label":p.jump_to,value:oe,disabled:V,onKeyDown:It,onKeyUp:Ge,onChange:Ge,onBlur:wt,size:3}),c.createElement("span",{className:"".concat(i,"-slash")},"/"),P));var Q=z?1:2;if(P<=3+Q*2){P||T.push(c.createElement(ve,G({},ue,{key:"noPager",page:1,className:"".concat(i,"-item-disabled")})));for(var me=1;me<=P;me+=1)T.push(c.createElement(ve,G({},ue,{key:me,page:me,active:s===me})))}else{var qt=z?p.prev_3:p.prev_5,Xt=z?p.next_3:p.next_5,et=te(We,"jump-prev",Ce(he,"prev page")),tt=te(Ke,"jump-next",Ce(F,"next page"));W&&(Ye=et?c.createElement("li",{title:w?qt:null,key:"prev",onClick:Ue,tabIndex:0,onKeyDown:Mt,className:E("".concat(i,"-jump-prev"),X({},"".concat(i,"-jump-prev-custom-icon"),!!he))},et):null,Ze=tt?c.createElement("li",{title:w?Xt:null,key:"next",onClick:Qe,tabIndex:0,onKeyDown:Bt,className:E("".concat(i,"-jump-next"),X({},"".concat(i,"-jump-next-custom-icon"),!!F))},tt):null);var Re=Math.max(1,s-Q),He=Math.min(s+Q,P);s-1<=Q&&(He=1+Q*2),P-s<=Q&&(Re=P-Q*2);for(var ge=Re;ge<=He;ge+=1)T.push(c.createElement(ve,G({},ue,{key:ge,page:ge,active:s===ge})));if(s-1>=Q*2&&s!==3&&(T[0]=c.cloneElement(T[0],{className:E("".concat(i,"-item-after-jump-prev"),T[0].props.className)}),T.unshift(Ye)),P-s>=Q*2&&s!==P-2){var it=T[T.length-1];T[T.length-1]=c.cloneElement(it,{className:E("".concat(i,"-item-before-jump-next"),it.props.className)}),T.push(Ze)}Re!==1&&T.unshift(c.createElement(ve,G({},ue,{key:1,page:1}))),He!==P&&T.push(c.createElement(ve,G({},ue,{key:P,page:P})))}var Ee=Tt(Ht);if(Ee){var Le=!ye||!P;Ee=c.createElement("li",{title:w?p.prev_page:null,onClick:Je,tabIndex:Le?null:0,onKeyDown:Ot,className:E("".concat(i,"-prev"),X({},"".concat(i,"-disabled"),Le)),"aria-disabled":Le},Ee)}var Ie=Dt(Lt);if(Ie){var pe,Ae;D?(pe=!xe,Ae=ye?0:null):(pe=!xe||!P,Ae=pe?null:0),Ie=c.createElement("li",{title:w?p.next_page:null,onClick:Fe,tabIndex:Ae,onKeyDown:jt,className:E("".concat(i,"-next"),X({},"".concat(i,"-disabled"),pe)),"aria-disabled":pe},Ie)}var Wt=E(i,f,X(X(X(X(X({},"".concat(i,"-start"),I==="start"),"".concat(i,"-center"),I==="center"),"".concat(i,"-end"),I==="end"),"".concat(i,"-simple"),D),"".concat(i,"-disabled"),V));return c.createElement("ul",G({className:Wt,style:b,ref:ce},_t),Rt,Ee,D?ke:T,Ie,c.createElement(xi,{locale:p,rootPrefixCls:i,disabled:V,selectPrefixCls:g,changeSize:Pt,pageSize:M,pageSizeOptions:Te,quickGo:Et?q:null,goButton:de,showSizeChanger:Me,sizeChangerRender:Be}))};const Ei=e=>{const{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-item`]:{cursor:"not-allowed",backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"},a:{color:e.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${t}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}}}},Ii=e=>{const{componentCls:t}=e;return{[`&${t}-mini ${t}-total-text, &${t}-mini ${t}-simple-pager`]:{height:e.itemSizeSM,lineHeight:$(e.itemSizeSM)},[`&${t}-mini ${t}-item`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:$(e.calc(e.itemSizeSM).sub(2).equal())},[`&${t}-mini ${t}-prev, &${t}-mini ${t}-next`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:$(e.itemSizeSM)},[`&${t}-mini:not(${t}-disabled)`]:{[`${t}-prev, ${t}-next`]:{[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover ${t}-item-link`]:{backgroundColor:"transparent"}}},[`
|
|
2
2
|
&${t}-mini ${t}-prev ${t}-item-link,
|
|
3
3
|
&${t}-mini ${t}-next ${t}-item-link
|
|
4
4
|
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:e.itemSizeSM,lineHeight:$(e.itemSizeSM)}},[`&${t}-mini ${t}-jump-prev, &${t}-mini ${t}-jump-next`]:{height:e.itemSizeSM,marginInlineEnd:0,lineHeight:$(e.itemSizeSM)},[`&${t}-mini ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:e.miniOptionsSizeChangerTop},"&-quick-jumper":{height:e.itemSizeSM,lineHeight:$(e.itemSizeSM),input:Object.assign(Object.assign({},ti(e)),{width:e.paginationMiniQuickJumperInputWidth,height:e.controlHeightSM})}}}},wi=e=>{const{componentCls:t}=e;return{[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{height:e.itemSize,lineHeight:$(e.itemSize),verticalAlign:"top",[`${t}-item-link`]:{height:e.itemSize,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:e.itemSize,lineHeight:$(e.itemSize)}}},[`${t}-simple-pager`]:{display:"inline-flex",alignItems:"center",height:e.itemSize,marginInlineEnd:e.marginXS,input:{boxSizing:"border-box",height:"100%",width:e.quickJumperInputWidth,padding:`0 ${$(e.paginationItemPaddingInline)}`,textAlign:"center",backgroundColor:e.itemInputBg,border:`${$(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,outline:"none",transition:`border-color ${e.motionDurationMid}`,color:"inherit","&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:`${$(e.inputOutlineOffset)} 0 ${$(e.controlOutlineWidth)} ${e.controlOutline}`},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:"not-allowed"}}},[`&${t}-disabled`]:{[`${t}-prev, ${t}-next`]:{[`${t}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}},[`&${t}-mini`]:{[`${t}-prev, ${t}-next`]:{height:e.itemSizeSM,lineHeight:$(e.itemSizeSM),[`${t}-item-link`]:{height:e.itemSizeSM,"&::after":{height:e.itemSizeSM,lineHeight:$(e.itemSizeSM)}}},[`${t}-simple-pager`]:{height:e.itemSizeSM,input:{width:e.paginationMiniQuickJumperInputWidth}}}}}},Pi=e=>{const{componentCls:t}=e;return{[`${t}-jump-prev, ${t}-jump-next`]:{outline:0,[`${t}-item-container`]:{position:"relative",[`${t}-item-link-icon`]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:`all ${e.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${t}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:e.colorTextDisabled,letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:`all ${e.motionDurationMid}`}},"&:hover":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}}},[`
|
|
@@ -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-g-SUxfJH.js";import{S as Ve,u as Ue}from"./style-CGmZ5osp.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-CfbTJRNC.js";import{S as Ve,u as Ue}from"./style-BSpDpc7m.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,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as le,jsx as k,Fragment as ar}from"react/jsx-runtime";import*as f from"react";import Ee,{forwardRef as pn,createElement as mn,useState as tt,useRef as Jt,useEffect as wt,useMemo as Xt,useContext as Jn,useImperativeHandle as ro,useCallback as ot,memo as or,Suspense as rl}from"react";import{d as ne,c as jt,h as ct,i as ue,a as bn,_ as ut,f as Oe,
|
|
1
|
+
import{jsxs as le,jsx as k,Fragment as ar}from"react/jsx-runtime";import*as f from"react";import Ee,{forwardRef as pn,createElement as mn,useState as tt,useRef as Jt,useEffect as wt,useMemo as Xt,useContext as Jn,useImperativeHandle as ro,useCallback as ot,memo as or,Suspense as rl}from"react";import{d as ne,c as jt,h as ct,i as ue,a as bn,_ as ut,f as Oe,aQ as tn,aR as al,L as Ie,J as pe,H as ee,ad as En,aq as it,a5 as Ht,aS as Nt,G as ol,aT as il,N as Bt,A as Ae,aU as ll,aV as ao,E as ir,y as vn,aW as sl,aX as cl,aC as Wr,aY as ul,g as Zr,m as Ln,k as Ce,r as gn,af as oo,l as nn,V as dl,aZ as lr,as as sr,a_ as Ur,a$ as fl,b0 as io,b1 as ml,b2 as vl,b3 as gl,b4 as hl,s as qr,b5 as pl,b6 as bl,b7 as In,ag as Cl,a2 as xl,b8 as yl,b9 as wl,ba as kl,bb as Sl,ae as $l,bc as Ml,bd as ya,be as wa,bf as Dl,bg as Ll,bh as Il,bi as Pl,bj as El,bk as Al,bl as Hl,ac as Gr,u as Nl,bm as Ol,B as Or,bn as lo,bo as Qr,an as so,W as co,X as uo,bp as fo,bq as mo,br as vo,bs as Kr,al as go,j as Rl,n as Fl,bt as Tl,O as Vl,Q as ka,bu as zl,F as we,bv as Bl,I as lt,S as Nn,ab as On,aa as Sa,a6 as $a,a9 as Ma,T as Xr,a8 as jl}from"./index-CfbTJRNC.js";import{createPortal as ho}from"react-dom";const Yl=ne.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{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-
|
|
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-cZm_IH3D.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-CfbTJRNC.js";import{O as we}from"./index-D8mrZqFQ.js";/* empty css */import{s as Y,M as ye}from"./style-BSpDpc7m.js";import{i as ke}from"./index-DNZYgz0p.js";import{D as Ie}from"./index-UHqCy9nm.js";import{X as ge}from"./x-B2JeGn6d.js";import"react-dom";import{B as De,T as Te}from"./index-BVDU9PrK.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-CfbTJRNC.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{kt as A,G as M,ue as S,Ho as s,go as u};
|