Files
weiyu/deploy/server/admin/8130.2942950e.async.js
jack ning 380409b41c update
2025-10-31 17:17:30 +08:00

1 line
12 KiB
JavaScript

"use strict";(self.webpackChunkadmin=self.webpackChunkadmin||[]).push([[8130],{88130:function(e,t,n){n.d(t,{Z:function(){return B}});var a=n(44194),l=n(51865),o=n.n(l);const s=(0,a.forwardRef)(((e,t)=>{const{prefixCls:n,className:l,children:s,size:r,style:i={}}=e,c=o()(`${n}-panel`,{[`${n}-panel-hidden`]:0===r},l),p=void 0!==r;return a.createElement("div",{ref:t,className:c,style:Object.assign(Object.assign({},i),{flexBasis:p?r:"auto",flexGrow:p?0:1})},s)}));var r=()=>null,i=n(12229),c=n(37853),p=n(35738),u=n(18799),d=n(27079),b=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(a=Object.getOwnPropertySymbols(e);l<a.length;l++)t.indexOf(a[l])<0&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(n[a[l]]=e[a[l]])}return n};function h(e){if(e&&"object"==typeof e)return Object.assign(Object.assign({},e),{showCollapsibleIcon:void 0===e.showCollapsibleIcon?"auto":e.showCollapsibleIcon});const t=!!e;return{start:t,end:t,showCollapsibleIcon:"auto"}}var f=function(e){return a.useMemo((()=>(0,d.Z)(e).filter((e=>a.isValidElement(e))).map((e=>{const{props:t}=e,{collapsible:n}=t,a=b(t,["collapsible"]);return Object.assign(Object.assign({},a),{collapsible:h(n)})}))),[e])};function m(e,t){return e.collapsible&&t.collapsible?!0===e.showCollapsibleIcon||!0===t.showCollapsibleIcon||("auto"===e.showCollapsibleIcon||"auto"===t.showCollapsibleIcon)&&"auto":e.collapsible?e.showCollapsibleIcon:!!t.collapsible&&t.showCollapsibleIcon}var g=n(28548);function v(e){return Number(e.slice(0,-1))/100}function w(e){return"string"==typeof e&&e.endsWith("%")}function $(e,t){const n=e.map((e=>e.size)),l=e.length,o=t||0,s=e=>e*o,[r,i]=a.useState((()=>e.map((e=>e.defaultSize)))),c=a.useMemo((()=>{var e;const t=[];for(let a=0;a<l;a+=1)t[a]=null!==(e=n[a])&&void 0!==e?e:r[a];return t}),[l,r,n]),p=a.useMemo((()=>e.map((e=>w(e.min)?v(e.min):(e.min||0)/o))),[e,o]),u=a.useMemo((()=>e.map((e=>w(e.max)?v(e.max):(e.max||o)/o))),[e,o]),d=a.useMemo((()=>{const e=[];for(let t=0;t<l;t+=1){const n=c[t];if(w(n))e[t]=v(n);else if(n||0===n){const a=Number(n);Number.isNaN(a)||(e[t]=a/o)}else e[t]=void 0}return function(e,t,n){let a=0;const l=[];e.forEach(((e,t)=>{void 0===e?l.push(t):a+=e}));const o=1-a,s=l.length;if(o<0){const t=1/a;return e.map((e=>void 0===e?0:e*t))}let r=0,i=0,c=0,p=1;for(const e of l){const a=t[e]||0,l=n[e]||1;r+=a,i+=l,c=Math.max(c,a),p=Math.min(p,l)}if(r>1&&i<1){const t=1/s;return e.map((e=>void 0===e?t:e))}const u=o/s;if(c<=u&&u<=p)return e.map((e=>void 0===e?u:e));const d=(0,g.Z)(e);let b=o-r;for(let e=0;e<s;e+=1){const a=l[e],o=t[a]||0,s=n[a]||1;d[a]=o;const r=s-o,i=Math.min(r,b);d[a]+=i,b-=i}return d}(e,p,u)}),[c,o,p,u]),b=a.useMemo((()=>d.map(s)),[d,o]);return[a.useMemo((()=>t?b:c),[b,t]),b,d,p,u,i]}var z=n(99024),x=n(33851),C=n(36722),I=n(68641),S=n(29535);function y(e){return"number"==typeof e&&!Number.isNaN(e)&&Number.isFinite(e)?Math.round(e):0}var O=e=>{const{prefixCls:t,vertical:n,index:l,active:s,ariaNow:r,ariaMin:i,ariaMax:p,resizable:u,startCollapsible:d,endCollapsible:b,onOffsetStart:h,onOffsetUpdate:f,onOffsetEnd:m,onCollapse:g,lazy:v,containerSize:w,showStartCollapsibleIcon:$,showEndCollapsibleIcon:O}=e,j=`${t}-bar`,[k,E]=(0,a.useState)(null),[M,N]=(0,a.useState)(0),Z=n?0:M,_=n?M:0,B=(0,c.Z)(((e,t)=>{const a=(e=>{const t=w*r/100,n=t+e,a=Math.max(0,w*i/100),l=Math.min(w,w*p/100);return Math.max(a,Math.min(l,n))-t})(n?t:e);N(a)})),P=(0,c.Z)((()=>{f(l,Z,_,!0),N(0),m(!0)})),R=e=>{switch(e){case!0:return`${j}-collapse-bar-always-visible`;case!1:return`${j}-collapse-bar-always-hidden`;case"auto":return`${j}-collapse-bar-hover-only`}};(0,S.Z)((()=>{if(!k)return;const e={mousemove:e=>{const{pageX:t,pageY:n}=e,a=t-k[0],o=n-k[1];v?B(a,o):f(l,a,o)},mouseup:()=>{v?P():m(),E(null)},touchmove:e=>{if(1===e.touches.length){const t=e.touches[0],n=t.pageX-k[0],a=t.pageY-k[1];v?B(n,a):f(l,n,a)}},touchend:()=>{v?P():m(),E(null)}};for(const[t,n]of Object.entries(e))window.addEventListener(t,n);return()=>{for(const[t,n]of Object.entries(e))window.removeEventListener(t,n)}}),[k,l,v]);const X={[`--${j}-preview-offset`]:`${M}px`},Y=n?I.Z:x.Z,D=n?z.Z:C.Z;return a.createElement("div",{className:j,role:"separator","aria-valuenow":y(r),"aria-valuemin":y(i),"aria-valuemax":y(p)},v&&a.createElement("div",{className:o()(`${j}-preview`,{[`${j}-preview-active`]:!!M}),style:X}),a.createElement("div",{className:o()(`${j}-dragger`,{[`${j}-dragger-disabled`]:!u,[`${j}-dragger-active`]:s}),onMouseDown:e=>{u&&e.currentTarget&&(E([e.pageX,e.pageY]),h(l))},onTouchStart:e=>{if(u&&1===e.touches.length){const t=e.touches[0];E([t.pageX,t.pageY]),h(l)}}}),d&&a.createElement("div",{className:o()(`${j}-collapse-bar`,`${j}-collapse-bar-start`,R($)),onClick:()=>g(l,"start")},a.createElement(Y,{className:o()(`${j}-collapse-icon`,`${j}-collapse-start`)})),b&&a.createElement("div",{className:o()(`${j}-collapse-bar`,`${j}-collapse-bar-end`,R(O)),onClick:()=>g(l,"end")},a.createElement(D,{className:o()(`${j}-collapse-icon`,`${j}-collapse-end`)})))},j=n(5317),k=n(11973);const E=e=>{const{componentCls:t}=e;return{[`&-rtl${t}-horizontal`]:{[`> ${t}-bar`]:{[`${t}-bar-collapse-previous`]:{insetInlineEnd:0,insetInlineStart:"unset"},[`${t}-bar-collapse-next`]:{insetInlineEnd:"unset",insetInlineStart:0}}},[`&-rtl${t}-vertical`]:{[`> ${t}-bar`]:{[`${t}-bar-collapse-previous`]:{insetInlineEnd:"50%",insetInlineStart:"unset"},[`${t}-bar-collapse-next`]:{insetInlineEnd:"50%",insetInlineStart:"unset"}}}}},M={position:"absolute",top:"50%",left:{_skip_check_:!0,value:"50%"},transform:"translate(-50%, -50%)"};var N=(0,k.I$)("Splitter",(e=>{const{componentCls:t,colorFill:n,splitBarDraggableSize:a,splitBarSize:l,splitTriggerSize:o,controlItemBgHover:s,controlItemBgActive:r,controlItemBgActiveHover:i,prefixCls:c}=e,p=`${t}-bar`,u=`${t}-mask`,d=`${t}-panel`,b=e.calc(o).div(2).equal(),h=`${c}-bar-preview-offset`,f={position:"absolute",background:e.colorPrimary,opacity:.2,pointerEvents:"none",transition:"none",zIndex:1,display:"none"};return{[t]:Object.assign(Object.assign(Object.assign({},(0,j.Wf)(e)),{display:"flex",width:"100%",height:"100%",alignItems:"stretch",[`> ${p}`]:{flex:"none",position:"relative",userSelect:"none",[`${p}-dragger`]:Object.assign(Object.assign({},M),{zIndex:1,"&::before":Object.assign({content:'""',background:s},M),"&::after":Object.assign({content:'""',background:n},M),[`&:hover:not(${p}-dragger-active)`]:{"&::before":{background:r}},"&-active":{zIndex:2,"&::before":{background:i}},[`&-disabled${p}-dragger`]:{zIndex:0,"&, &:hover, &-active":{cursor:"default","&::before":{background:s}},"&::after":{display:"none"}}}),[`${p}-collapse-bar`]:Object.assign(Object.assign({},M),{zIndex:e.zIndexPopupBase,background:s,fontSize:e.fontSizeSM,borderRadius:e.borderRadiusXS,color:e.colorText,cursor:"pointer",opacity:0,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{background:r},"&:active":{background:i}}),"&:hover, &:active":{[`${p}-collapse-bar-hover-only`]:{opacity:1}},[`${p}-collapse-bar-hover-only`]:{"@media(hover:none)":{opacity:1}},[`${p}-collapse-bar-always-hidden`]:{display:"none"},[`${p}-collapse-bar-always-visible`]:{opacity:1}},[u]:{position:"fixed",zIndex:e.zIndexPopupBase,inset:0,"&-horizontal":{cursor:"col-resize"},"&-vertical":{cursor:"row-resize"}},"&-horizontal":{flexDirection:"row",[`> ${p}`]:{width:0,[`${p}-preview`]:Object.assign(Object.assign({height:"100%",width:l},f),{[`&${p}-preview-active`]:{display:"block",transform:`translateX(var(--${h}))`}}),[`${p}-dragger`]:{cursor:"col-resize",height:"100%",width:o,"&::before":{height:"100%",width:l},"&::after":{height:a,width:l}},[`${p}-collapse-bar`]:{width:e.fontSizeSM,height:e.controlHeightSM,"&-start":{left:{_skip_check_:!0,value:"auto"},right:{_skip_check_:!0,value:b},transform:"translateY(-50%)"},"&-end":{left:{_skip_check_:!0,value:b},right:{_skip_check_:!0,value:"auto"},transform:"translateY(-50%)"}}}},"&-vertical":{flexDirection:"column",[`> ${p}`]:{height:0,[`${p}-preview`]:Object.assign(Object.assign({height:l,width:"100%"},f),{[`&${p}-preview-active`]:{display:"block",transform:`translateY(var(--${h}))`}}),[`${p}-dragger`]:{cursor:"row-resize",width:"100%",height:o,"&::before":{width:"100%",height:l},"&::after":{width:a,height:l}},[`${p}-collapse-bar`]:{height:e.fontSizeSM,width:e.controlHeightSM,"&-start":{top:"auto",bottom:b,transform:"translateX(-50%)"},"&-end":{top:b,bottom:"auto",transform:"translateX(-50%)"}}}},[d]:{overflow:"auto",padding:"0 1px",scrollbarWidth:"thin",boxSizing:"border-box","&-hidden":{padding:0,overflow:"hidden"},[`&:has(${t}:only-child)`]:{overflow:"hidden"}}}),E(e))}}),(e=>{var t;const n=e.splitBarSize||2,a=e.splitTriggerSize||6,l=e.resizeSpinnerSize||20;return{splitBarSize:n,splitTriggerSize:a,splitBarDraggableSize:null!==(t=e.splitBarDraggableSize)&&void 0!==t?t:l,resizeSpinnerSize:l}}));var Z=e=>{const{prefixCls:t,className:n,style:l,layout:r="horizontal",children:d,rootClassName:b,onResizeStart:h,onResize:w,onResizeEnd:z,lazy:x}=e,{getPrefixCls:C,direction:I,className:S,style:y}=(0,p.dj)("splitter"),j=C("splitter",t),k=(0,u.Z)(j),[E,M,Z]=N(j,k),_="vertical"===r,B="rtl"===I,P=!_&&B,R=f(d);const[X,Y]=(0,a.useState)(),[D,T,H,W,F,A]=$(R,X),L=function(e,t,n){return a.useMemo((()=>{const a=[];for(let l=0;l<e.length-1;l+=1){const o=e[l],s=e[l+1],r=t[l],i=t[l+1],{resizable:c=!0,min:p,collapsible:u}=o,{resizable:d=!0,min:b,collapsible:h}=s,f=c&&d&&(0!==r||!p)&&(0!==i||!b),g=!!u.end&&r>0,v=!!h.start&&0===i&&r>0,w=g||v,$=!!h.start&&i>0,z=!!u.end&&0===r&&i>0,x=$||z,C=m({collapsible:g,showCollapsibleIcon:u.showCollapsibleIcon},{collapsible:v,showCollapsibleIcon:h.showCollapsibleIcon}),I=m({collapsible:$,showCollapsibleIcon:h.showCollapsibleIcon},{collapsible:z,showCollapsibleIcon:u.showCollapsibleIcon});a[l]={resizable:f,startCollapsible:!!(n?x:w),endCollapsible:!!(n?w:x),showStartCollapsibleIcon:n?I:C,showEndCollapsibleIcon:n?C:I}}return a}),[t,e,n])}(R,T,B),[U,q,G,V,J]=function(e,t,n,l,o,s){const r=e.map((e=>[e.min,e.max])),i=l||0,c=e=>e*i;function p(e,t){return"string"==typeof e?c(v(e)):null!=e?e:t}const[u,d]=a.useState([]),b=a.useRef([]),[h,f]=a.useState(null),m=()=>n.map(c);return[e=>{d(m()),f({index:e,confirmed:!1})},(e,n)=>{var a;let l=null;if(!(h&&h.confirmed||0===n))if(n>0)l=e,f({index:e,confirmed:!0});else for(let n=e;n>=0;n-=1)if(u[n]>0&&t[n].resizable){l=n,f({index:n,confirmed:!0});break}const s=null!==(a=null!=l?l:null==h?void 0:h.index)&&void 0!==a?a:e,c=(0,g.Z)(u),d=s+1,b=p(r[s][0],0),m=p(r[d][0],0),v=p(r[s][1],i),w=p(r[d][1],i);let $=n;return c[s]+$<b&&($=b-c[s]),c[d]-$<m&&($=c[d]-m),c[s]+$>v&&($=v-c[s]),c[d]-$>w&&($=c[d]-w),c[s]+=$,c[d]-=$,o(c),c},()=>{f(null)},(e,t)=>{const n=m(),a=s?"start"===t?"end":"start":t,l="start"===a?e:e+1,c="start"===a?e+1:e,u=n[l],d=n[c];if(0!==u&&0!==d)n[l]=0,n[c]+=u,b.current[e]=u;else{const t=u+d,a=p(r[l][0],0),o=p(r[l][1],i),s=p(r[c][0],0),h=p(r[c][1],i),f=Math.max(a,t-h),m=Math.min(o,t-s),g=s||(m-f)/2,v=b.current[e],w=t-v;v&&v<=h&&v>=s&&w<=o&&w>=a?(n[c]=v,n[l]=w):(n[l]-=g,n[c]+=g)}return o(n),n},null==h?void 0:h.index]}(R,L,H,X,A,B),K=(0,c.Z)((e=>{U(e),null==h||h(T)})),Q=(0,c.Z)(((e,t,n)=>{const a=q(e,t);n?null==z||z(a):null==w||w(a)})),ee=(0,c.Z)((e=>{G(),e||null==z||z(T)})),te=(0,c.Z)(((e,t)=>{const n=V(e,t);null==w||w(n),null==z||z(n)})),ne=o()(j,n,`${j}-${r}`,{[`${j}-rtl`]:B},b,S,Z,k,M),ae=`${j}-mask`,le=a.useMemo((()=>{const e=[];let t=0;const n=R.length;for(let a=0;a<n;a+=1)t+=H[a],e.push(t);return e}),[H,R.length]),oe=Object.assign(Object.assign({},y),l);return E(a.createElement(i.Z,{onResize:e=>{const{offsetWidth:t,offsetHeight:n}=e,a=_?n:t;0!==a&&Y(a)}},a.createElement("div",{style:oe,className:ne},R.map(((e,t)=>{const n=a.createElement(s,Object.assign({},e,{prefixCls:j,size:D[t]}));let l=null;const o=L[t];if(o){const e=(le[t-1]||0)+W[t],n=(le[t+1]||100)-F[t+1],s=(le[t-1]||0)+F[t],r=(le[t+1]||100)-W[t+1];l=a.createElement(O,{lazy:x,index:t,active:J===t,prefixCls:j,vertical:_,resizable:o.resizable,ariaNow:100*le[t],ariaMin:100*Math.max(e,n),ariaMax:100*Math.min(s,r),startCollapsible:o.startCollapsible,endCollapsible:o.endCollapsible,showStartCollapsibleIcon:o.showStartCollapsibleIcon,showEndCollapsibleIcon:o.showEndCollapsibleIcon,onOffsetStart:K,onOffsetUpdate:(e,t,n,a)=>{let l=_?n:t;P&&(l=-l),Q(e,l,a)},onOffsetEnd:ee,onCollapse:te,containerSize:X||0})}return a.createElement(a.Fragment,{key:`split-panel-${t}`},n,l)})),"number"==typeof J&&a.createElement("div",{"aria-hidden":!0,className:o()(ae,`${ae}-${r}`)}))))};const _=Z;_.Panel=r;var B=_}}]);