import{o as e,t}from"./chunk-jRWAZmH_.js";import{n}from"./jsx-runtime-CEixWuwE.js";import{In as r,L as i,Ln as a,On as o,Tn as s,Wn as c,Y as l,_t as u,cr as d,ft as f,gt as p,j as m,jt as h,on as g,pt as _,sr as v}from"./axios-DIFBeL1S.js";import{n as y}from"./input-D-p75RoQ.js";import{n as b,t as x}from"./slicedToArray-BEjiv6aE.js";import{n as S,t as C}from"./typeof-C6uZ2mkP.js";import{i as w,r as T}from"./asyncToGenerator-BFc9W-7V.js";import{c as E,d as ee,f as D,l as O,m as k,p as A,s as te,u as ne}from"./button-Z8LWcDu0.js";import{i as re}from"./select-DUipYla6.js";import{t as j}from"./tooltip-DFM1wB7E.js";import{r as ie}from"./styleChecker-BOWkNKwM.js";import{t as ae}from"./transButton-BJQ3PLDs.js";import{t as oe}from"./CopyOutlined-Mwyb5YIL.js";var M=e(n());d(),S(),w(),a(),b();var se={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z`}}]},name:`edit`,theme:`outlined`},ce=M.forwardRef(function(e,t){return M.createElement(h,r(r({},e),{},{ref:t,icon:se}))}),N=t(((e,t)=>{t.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r{var n=N(),r={"text/plain":`Text`,"text/html":`Url`,default:`Text`},i=`Copy to clipboard: #{key}, Enter`;function a(e){var t=(/mac os x/i.test(navigator.userAgent)?`⌘`:`Ctrl`)+`+C`;return e.replace(/#{\s*key\s*}/g,t)}function o(e,t){var o,s,c,l,u,d,f=!1;t||={},o=t.debug||!1;try{if(c=n(),l=document.createRange(),u=document.getSelection(),d=document.createElement(`span`),d.textContent=e,d.ariaHidden=`true`,d.style.all=`unset`,d.style.position=`fixed`,d.style.top=0,d.style.clip=`rect(0, 0, 0, 0)`,d.style.whiteSpace=`pre`,d.style.webkitUserSelect=`text`,d.style.MozUserSelect=`text`,d.style.msUserSelect=`text`,d.style.userSelect=`text`,d.addEventListener(`copy`,function(n){if(n.stopPropagation(),t.format)if(n.preventDefault(),n.clipboardData===void 0){o&&console.warn(`unable to use e.clipboardData`),o&&console.warn(`trying IE specific stuff`),window.clipboardData.clearData();var i=r[t.format]||r.default;window.clipboardData.setData(i,e)}else n.clipboardData.clearData(),n.clipboardData.setData(t.format,e);t.onCopy&&(n.preventDefault(),t.onCopy(n.clipboardData))}),document.body.appendChild(d),l.selectNodeContents(d),u.addRange(l),!document.execCommand(`copy`))throw Error(`copy command was unsuccessful`);f=!0}catch(n){o&&console.error(`unable to copy using execCommand: `,n),o&&console.warn(`trying IE specific stuff`);try{window.clipboardData.setData(t.format||`text`,e),t.onCopy&&t.onCopy(window.clipboardData),f=!0}catch(n){o&&console.error(`unable to copy using clipboardData: `,n),o&&console.error(`falling back to prompt`),s=a(`message`in t?t.message:i),window.prompt(s,e)}}finally{u&&(typeof u.removeRange==`function`?u.removeRange(l):u.removeAllRanges()),d&&document.body.removeChild(d),c()}return f}t.exports=o})),F=e(c());A(),o(),D(),O(),p(),f();var le=e(P()),ue={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z`}}]},name:`enter`,theme:`outlined`};a();var I=M.forwardRef(function(e,t){return M.createElement(h,r(r({},e),{},{ref:t,icon:ue}))});E();var de=function(e){var t=e.prefixCls,n=e[`aria-label`],r=e.className,a=e.style,o=e.direction,s=e.maxLength,c=e.autoSize,l=c===void 0?!0:c,u=e.value,d=e.onSave,f=e.onCancel,p=e.onEnd,m=e.component,h=e.enterIcon,g=h===void 0?M.createElement(I,null):h,_=M.useRef(null),v=M.useRef(!1),b=M.useRef(),S=x(M.useState(u),2),C=S[0],w=S[1];M.useEffect(function(){w(u)},[u]),M.useEffect(function(){if(_.current&&_.current.resizableTextArea){var e=_.current.resizableTextArea.textArea;e.focus();var t=e.value.length;e.setSelectionRange(t,t)}},[]);var E=function(e){var t=e.target;w(t.value.replace(/[\n\r]/g,``))},ee=function(){v.current=!0},D=function(){v.current=!1},O=function(e){var t=e.keyCode;v.current||(b.current=t)},k=function(){d(C.trim())},A=function(e){var t=e.keyCode,n=e.ctrlKey,r=e.altKey,i=e.metaKey,a=e.shiftKey;b.current===t&&!v.current&&!n&&!r&&!i&&!a&&(t===te.ENTER?(k(),p?.()):t===te.ESC&&f())},ne=function(){k()},re=m?`${t}-${m}`:``,j=(0,F.default)(t,`${t}-edit-content`,T({},`${t}-rtl`,o===`rtl`),r,re);return M.createElement(`div`,{className:j,style:a},M.createElement(y,{ref:_,maxLength:s,value:C,onChange:E,onKeyDown:O,onKeyUp:A,onCompositionStart:ee,onCompositionEnd:D,onBlur:ne,"aria-label":n,rows:1,autoSize:l}),g===null?null:i(g,{className:`${t}-edit-content-confirm`}))};function fe(e,t){return M.useMemo(function(){var n=!!e;return[n,v(v({},t),n&&C(e)===`object`?e:null)]},[e])}var pe=function(e,t){var n=M.useRef(!1);M.useEffect(function(){n.current?e():n.current=!0},t)};d(),w();var me=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);it){var c=t-n;return r.push(String(a).slice(0,c)),r}r.push(a),n=s}return e}var _e=0,z=1,ve=2,B=3,V=4,ye=function(e){var t=e.enabledMeasure,n=e.children,r=e.text,i=e.width,a=e.fontSize,o=e.rows,s=e.onEllipsis,c=x(M.useState([0,0,0]),2),l=x(c[0],3),d=l[0],f=l[1],p=l[2],m=c[1],h=x(M.useState(_e),2),g=h[0],_=h[1],y=x(M.useState(0),2),b=y[0],S=y[1],C=M.useRef(null),w=M.useRef(null),T=M.useMemo(function(){return k(r)},[r]),E=M.useMemo(function(){return ge(T)},[T]),ee=M.useMemo(function(){return!t||g!==B?n(T,!1):n(R(T,f),f1&&Z,Qe=function(e){var t;Re(!0),(t=q.onExpand)==null||t.call(q,e)},$e=x(M.useState(0),2),et=$e[0],tt=$e[1],nt=x(M.useState(0),2),rt=nt[0],it=nt[1],at=function(e,t){var n=e.offsetWidth;tt(n),it(parseInt(window.getComputedStyle?.call(window,t).fontSize,10)||0)},ot=function(e){var t;Ve(e),Be!==e&&((t=q.onEllipsis)==null||t.call(q,e))};M.useEffect(function(){var e=D.current;if(K&&Z&&e){var t=Q?e.offsetHeight`u`||!e||!Z||!J)){var t=new IntersectionObserver(function(){qe(!!e.offsetParent)});return t.observe(e),function(){t.disconnect()}}},[Z,J]);var $={};$=q.tooltip===!0?{title:P.text??c}:M.isValidElement(q.tooltip)?{title:q.tooltip}:C(q.tooltip)===`object`?v({title:P.text??c},q.tooltip):{title:q.tooltip};var st=M.useMemo(function(){var e=function(e){return[`string`,`number`].includes(C(e))};if(!(!K||Z)){if(e(P.text))return P.text;if(e(c))return c;if(e(h))return h;if(e($.title))return $.title}},[K,Z,h,$.title,Xe]);if(I)return M.createElement(de,{value:P.text??(typeof c==`string`?c:``),onSave:z,onCancel:ve,onEnd:P.onEnd,prefixCls:A,className:r,style:i,direction:w,component:m,maxLength:P.maxLength,autoSize:P.autoSize,enterIcon:P.enterIcon});var ct=function(){var e=q.expandable,t=q.symbol;if(!e)return null;var n=t||E.expand;return M.createElement(`a`,{key:`expand`,className:`${A}-expand`,onClick:Qe,"aria-label":E.expand},n)},lt=function(){if(N){var e=P.icon,t=P.tooltip,n=k(t)[0]||E.edit,r=typeof n==`string`?n:``;return ge.includes(`icon`)?M.createElement(j,{key:`edit`,title:t===!1?``:n},M.createElement(ae,{ref:O,className:`${A}-edit`,onClick:_e,"aria-label":r},e||M.createElement(ce,{role:`button`}))):null}},ut=function(){if(V){var e=U.tooltips,t=U.icon,n=Ce(e),r=Ce(t),i=W?H(n[1],E.copied):H(n[0],E.copy),a=W?E.copied:E.copy,o=typeof i==`string`?i:a;return M.createElement(j,{key:`copy`,title:i},M.createElement(ae,{className:(0,F.default)(`${A}-copy`,W&&`${A}-copy-success`),onClick:Ae,"aria-label":o},W?H(r[1],M.createElement(re,null),!0):H(r[0],M.createElement(oe,null),!0)))}},dt=function(e){return[e&&ct(),lt(),ut()]},ft=function(e){return[e&&M.createElement(`span`,{"aria-hidden":!0,key:`ellipsis`},we),q.suffix,dt(e)]};return M.createElement(ee,{onResize:at,disabled:!J||Z},function(l){return M.createElement(be,{tooltipProps:$,enabledEllipsis:J,isEllipsis:Xe},M.createElement(he,v({className:(0,F.default)(T(T(T(T(T(T({},`${A}-${a}`,a),`${A}-disabled`,o),`${A}-ellipsis`,K),`${A}-single-line`,J&&Y===1),`${A}-ellipsis-single-line`,Ze),`${A}-ellipsis-multiple-line`,Q),r),prefixCls:n,style:v(v({},i),{WebkitLineClamp:Q?Y:void 0}),component:m,ref:s(l,D,t),direction:w,onClick:ge.includes(`text`)?_e:void 0,"aria-label":st?.toString(),title:h},te),M.createElement(ye,{enabledMeasure:J&&!Z,text:c,rows:Y,width:et,fontSize:rt,onEllipsis:ot},function(t,n){var r=t;return t.length&&n&&st&&(r=M.createElement(`span`,{key:`show-content`,"aria-hidden":!0},r)),Se(e,M.createElement(M.Fragment,null,r,ft(n)))})))})});d();var Te=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i