@rsdoctor/client 1.0.0-beta.2 → 1.0.0-beta.3

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.
@@ -220,4 +220,4 @@
220
220
  ${t}-collapse,
221
221
  ${t}-edit,
222
222
  ${t}-copy
223
- `]:Object.assign(Object.assign({},(0,x.N)(e)),{marginInlineStart:e.marginXXS})}),I(e)),z(e)),B()),{"&-rtl":{direction:"rtl"}})}},H=(0,k.I$)("Typography",e=>[F(e)],()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"})),L=e=>{let{prefixCls:t,"aria-label":n,className:o,style:l,direction:a,maxLength:s,autoSize:c=!0,value:d,onSave:u,onCancel:p,onEnd:m,component:g,enterIcon:f=r.createElement($.Z,null)}=e,b=r.useRef(null),h=r.useRef(!1),x=r.useRef(),[k,E]=r.useState(d);r.useEffect(()=>{E(d)},[d]),r.useEffect(()=>{var e;if(null===(e=b.current)||void 0===e?void 0:e.resizableTextArea){let{textArea:e}=b.current.resizableTextArea;e.focus();let{length:t}=e.value;e.setSelectionRange(t,t)}},[]);let O=()=>{u(k.trim())},w=g?`${t}-${g}`:"",[C,M,j]=H(t),I=i()(t,`${t}-edit-content`,{[`${t}-rtl`]:"rtl"===a},o,w,M,j);return C(r.createElement("div",{className:I,style:l},r.createElement(S.Z,{ref:b,maxLength:s,value:k,onChange:e=>{let{target:t}=e;E(t.value.replace(/[\n\r]/g,""))},onKeyDown:e=>{let{keyCode:t}=e;h.current||(x.current=t)},onKeyUp:e=>{let{keyCode:t,ctrlKey:n,altKey:r,metaKey:o,shiftKey:l}=e;x.current!==t||h.current||n||r||o||l||(t===v.Z.ENTER?(O(),null==m||m()):t===v.Z.ESC&&p())},onCompositionStart:()=>{h.current=!0},onCompositionEnd:()=>{h.current=!1},onBlur:()=>{O()},"aria-label":n,rows:1,autoSize:c}),null!==f?(0,y.Tm)(f,{className:`${t}-edit-content-confirm`}):null))};var T=n(86724),D=n.n(T),P=n(81654);let R=e=>{let{copyConfig:t,children:n}=e,[o,l]=r.useState(!1),[i,a]=r.useState(!1),s=r.useRef(null),c=()=>{s.current&&clearTimeout(s.current)},d={};return t.format&&(d.format=t.format),r.useEffect(()=>c,[]),{copied:o,copyLoading:i,onClick:(0,P.zX)(e=>{var r,o,i,u;return r=void 0,o=void 0,i=void 0,u=function*(){var r;null==e||e.preventDefault(),null==e||e.stopPropagation(),a(!0);try{let o="function"==typeof t.text?yield t.text():t.text;D()(o||String(n)||"",d),a(!1),l(!0),c(),s.current=setTimeout(()=>{l(!1)},3e3),null===(r=t.onCopy)||void 0===r||r.call(t,e)}catch(e){throw a(!1),e}},new(i||(i=Promise))(function(e,t){function n(e){try{a(u.next(e))}catch(e){t(e)}}function l(e){try{a(u.throw(e))}catch(e){t(e)}}function a(t){var r;t.done?e(t.value):((r=t.value)instanceof i?r:new i(function(e){e(r)})).then(n,l)}a((u=u.apply(r,o||[])).next())})})}};function N(e,t){return r.useMemo(()=>{let n=!!e;return[n,Object.assign(Object.assign({},t),n&&"object"==typeof e?e:null)]},[e])}let _=e=>{let t=(0,r.useRef)();return(0,r.useEffect)(()=>{t.current=e}),t.current},Z=(e,t)=>{let n=r.useRef(!1);r.useEffect(()=>{n.current?e():n.current=!0},t)};var A=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let W=r.forwardRef((e,t)=>{let{prefixCls:n,component:o="article",className:l,rootClassName:a,setContentRef:s,children:c,direction:d,style:u}=e,m=A(e,["prefixCls","component","className","rootClassName","setContentRef","children","direction","style"]),{getPrefixCls:g,direction:b,typography:h}=r.useContext(f.E_),$=t;s&&($=(0,p.sQ)(t,s));let v=g("typography",n),[y,S,x]=H(v),k=i()(v,null==h?void 0:h.className,{[`${v}-rtl`]:"rtl"===(null!=d?d:b)},l,a,S,x),E=Object.assign(Object.assign({},null==h?void 0:h.style),u);return y(r.createElement(o,Object.assign({className:k,style:E,ref:$},m),c))});var X=n(82826),q=n(9172),G=n(55755);function K(e){return!1===e?[!1,!1]:Array.isArray(e)?e:[e]}function V(e,t,n){return!0===e||void 0===e?t:e||n&&t}let U=e=>{let{prefixCls:t,copied:n,locale:o,iconOnly:l,tooltips:a,icon:s,loading:c,tabIndex:d,onCopy:u}=e,p=K(a),m=K(s),{copied:f,copy:b}=null!=o?o:{},$=n?V(p[1],f):V(p[0],b),v=n?f:b,y="string"==typeof $?$:v;return r.createElement(h.Z,{key:"copy",title:$},r.createElement(g.Z,{className:i()(`${t}-copy`,{[`${t}-copy-success`]:n,[`${t}-copy-icon-only`]:l}),onClick:u,"aria-label":y,tabIndex:d},n?V(m[1],r.createElement(X.Z,null),!0):V(m[0],c?r.createElement(G.Z,null):r.createElement(q.Z,null),!0)))};var Y=n(93406);let Q=r.forwardRef((e,t)=>{let{style:n,children:o}=e,l=r.useRef(null);return r.useImperativeHandle(t,()=>({isExceed:()=>{let e=l.current;return e.scrollHeight>e.clientHeight},getHeight:()=>l.current.clientHeight})),r.createElement("span",{"aria-hidden":!0,ref:l,style:Object.assign({position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)"},n)},o)});function J(e){let t=typeof e;return"string"===t||"number"===t}function ee(e,t){let n=0,r=[];for(let o=0;o<e.length;o+=1){if(n===t)return r;let l=e[o],i=n+(J(l)?String(l).length:1);if(i>t){let e=t-n;return r.push(String(l).slice(0,e)),r}r.push(l),n=i}return e}let et={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function en(e){let{enableMeasure:t,width:n,text:o,children:l,rows:i,expanded:a,miscDeps:d,onEllipsis:u}=e,p=r.useMemo(()=>(0,s.Z)(o),[o]),m=r.useMemo(()=>{let e;return e=0,p.forEach(t=>{J(t)?e+=String(t).length:e+=1}),e},[o]),g=r.useMemo(()=>l(p,!1),[o]),[f,b]=r.useState(null),h=r.useRef(null),$=r.useRef(null),v=r.useRef(null),y=r.useRef(null),S=r.useRef(null),[x,k]=r.useState(!1),[E,O]=r.useState(0),[w,C]=r.useState(0),[M,j]=r.useState(null);(0,c.Z)(()=>{t&&n&&m?O(1):O(0)},[n,o,i,t,p]),(0,c.Z)(()=>{var e,t,n,r;if(1===E)O(2),j($.current&&getComputedStyle($.current).whiteSpace);else if(2===E){let o=!!(null===(e=v.current)||void 0===e?void 0:e.isExceed());O(o?3:4),b(o?[0,m]:null),k(o);let l=(null===(t=v.current)||void 0===t?void 0:t.getHeight())||0,a=1===i?0:(null===(n=y.current)||void 0===n?void 0:n.getHeight())||0;C(Math.max(l,a+((null===(r=S.current)||void 0===r?void 0:r.getHeight())||0))+1),u(o)}},[E]);let I=f?Math.ceil((f[0]+f[1])/2):0;(0,c.Z)(()=>{var e;let[t,n]=f||[0,0];if(t!==n){let r=((null===(e=h.current)||void 0===e?void 0:e.getHeight())||0)>w,o=I;n-t==1&&(o=r?t:n),r?b([t,o]):b([o,n])}},[f,I]);let z=r.useMemo(()=>{if(3!==E||!f||f[0]!==f[1]){let e=l(p,!1);return 4!==E&&0!==E?r.createElement("span",{style:Object.assign(Object.assign({},et),{WebkitLineClamp:i})},e):e}return l(a?p:ee(p,f[0]),x)},[a,E,f,p].concat((0,Y.Z)(d))),B={width:n,margin:0,padding:0,whiteSpace:"nowrap"===M?"normal":"inherit"};return r.createElement(r.Fragment,null,z,2===E&&r.createElement(r.Fragment,null,r.createElement(Q,{style:Object.assign(Object.assign(Object.assign({},B),et),{WebkitLineClamp:i}),ref:v},g),r.createElement(Q,{style:Object.assign(Object.assign(Object.assign({},B),et),{WebkitLineClamp:i-1}),ref:y},g),r.createElement(Q,{style:Object.assign(Object.assign(Object.assign({},B),et),{WebkitLineClamp:1}),ref:S},l([],!0))),3===E&&f&&f[0]!==f[1]&&r.createElement(Q,{style:Object.assign(Object.assign({},B),{top:400}),ref:h},l(ee(p,I),!0)),1===E&&r.createElement("span",{style:{whiteSpace:"inherit"},ref:$}))}let er=e=>{let{enableEllipsis:t,isEllipsis:n,children:o,tooltipProps:l}=e;return(null==l?void 0:l.title)&&t?r.createElement(h.Z,Object.assign({open:!!n&&void 0},l),o):o};var eo=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let el=r.forwardRef((e,t)=>{var n,l,$;let{prefixCls:v,className:y,style:S,type:x,disabled:k,children:E,ellipsis:O,editable:w,copyable:C,component:M,title:j}=e,I=eo(e,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:z,direction:B}=r.useContext(f.E_),[F]=(0,b.Z)("Text"),H=r.useRef(null),T=r.useRef(null),D=z("typography",v),P=(0,u.Z)(I,["mark","code","delete","underline","strong","keyboard","italic"]),[A,X]=N(w),[q,G]=(0,d.Z)(!1,{value:X.editing}),{triggerType:K=["icon"]}=X,V=e=>{var t;e&&(null===(t=X.onStart)||void 0===t||t.call(X)),G(e)},Y=_(q);Z(()=>{var e;!q&&Y&&(null===(e=T.current)||void 0===e||e.focus())},[q]);let Q=e=>{null==e||e.preventDefault(),V(!0)},[J,ee]=N(C),{copied:et,copyLoading:el,onClick:ei}=R({copyConfig:ee,children:E}),[ea,es]=r.useState(!1),[ec,ed]=r.useState(!1),[eu,ep]=r.useState(!1),[em,eg]=r.useState(!1),[ef,eb]=r.useState(!0),[eh,e$]=N(O,{expandable:!1,symbol:e=>e?null==F?void 0:F.collapse:null==F?void 0:F.expand}),[ev,ey]=(0,d.Z)(e$.defaultExpanded||!1,{value:e$.expanded}),eS=eh&&(!ev||"collapsible"===e$.expandable),{rows:ex=1}=e$,ek=r.useMemo(()=>eS&&(void 0!==e$.suffix||e$.onEllipsis||e$.expandable||A||J),[eS,e$,A,J]);(0,c.Z)(()=>{eh&&!ek&&(es((0,m.G)("webkitLineClamp")),ed((0,m.G)("textOverflow")))},[ek,eh]);let[eE,eO]=r.useState(eS),ew=r.useMemo(()=>!ek&&(1===ex?ec:ea),[ek,ec,ea]);(0,c.Z)(()=>{eO(ew&&eS)},[ew,eS]);let eC=eS&&(eE?em:eu),eM=eS&&1===ex&&eE,ej=eS&&ex>1&&eE,eI=(e,t)=>{var n;ey(t.expanded),null===(n=e$.onExpand)||void 0===n||n.call(e$,e,t)},[ez,eB]=r.useState(0),eF=e=>{var t;ep(e),eu!==e&&(null===(t=e$.onEllipsis)||void 0===t||t.call(e$,e))};r.useEffect(()=>{let e=H.current;if(eh&&eE&&e){let t=ej?e.offsetHeight<e.scrollHeight:e.offsetWidth<e.scrollWidth;em!==t&&eg(t)}},[eh,eE,E,ej,ef,ez]),r.useEffect(()=>{let e=H.current;if("undefined"==typeof IntersectionObserver||!e||!eE||!eS)return;let t=new IntersectionObserver(()=>{eb(!!e.offsetParent)});return t.observe(e),()=>{t.disconnect()}},[eE,eS]);let eH={};eH=!0===e$.tooltip?{title:null!==(n=X.text)&&void 0!==n?n:E}:r.isValidElement(e$.tooltip)?{title:e$.tooltip}:"object"==typeof e$.tooltip?Object.assign({title:null!==(l=X.text)&&void 0!==l?l:E},e$.tooltip):{title:e$.tooltip};let eL=r.useMemo(()=>{let e=e=>["string","number"].includes(typeof e);return!eh||eE?void 0:e(X.text)?X.text:e(E)?E:e(j)?j:e(eH.title)?eH.title:void 0},[eh,eE,j,eH.title,eC]);if(q)return r.createElement(L,{value:null!==($=X.text)&&void 0!==$?$:"string"==typeof E?E:"",onSave:e=>{var t;null===(t=X.onChange)||void 0===t||t.call(X,e),V(!1)},onCancel:()=>{var e;null===(e=X.onCancel)||void 0===e||e.call(X),V(!1)},onEnd:X.onEnd,prefixCls:D,className:y,style:S,direction:B,component:M,maxLength:X.maxLength,autoSize:X.autoSize,enterIcon:X.enterIcon});let eT=()=>{let{expandable:e,symbol:t}=e$;return!e||ev&&"collapsible"!==e?null:r.createElement(g.Z,{key:"expand",className:`${D}-${ev?"collapse":"expand"}`,onClick:e=>eI(e,{expanded:!ev}),"aria-label":ev?F.collapse:null==F?void 0:F.expand},"function"==typeof t?t(ev):t)},eD=()=>{if(!A)return;let{icon:e,tooltip:t,tabIndex:n}=X,l=(0,s.Z)(t)[0]||(null==F?void 0:F.edit),i="string"==typeof l?l:"";return K.includes("icon")?r.createElement(h.Z,{key:"edit",title:!1===t?"":l},r.createElement(g.Z,{ref:T,className:`${D}-edit`,onClick:Q,"aria-label":i,tabIndex:n},e||r.createElement(o.Z,{role:"button"}))):null},eP=()=>J?r.createElement(U,Object.assign({key:"copy"},ee,{prefixCls:D,copied:et,locale:F,onCopy:ei,loading:el,iconOnly:null==E})):null,eR=e=>[e&&eT(),eD(),eP()],eN=e=>[e&&!ev&&r.createElement("span",{"aria-hidden":!0,key:"ellipsis"},"..."),e$.suffix,eR(e)];return r.createElement(a.Z,{onResize:e=>{let{offsetWidth:t}=e;eB(t)},disabled:!eS},n=>r.createElement(er,{tooltipProps:eH,enableEllipsis:eS,isEllipsis:eC},r.createElement(W,Object.assign({className:i()({[`${D}-${x}`]:x,[`${D}-disabled`]:k,[`${D}-ellipsis`]:eh,[`${D}-ellipsis-single-line`]:eM,[`${D}-ellipsis-multiple-line`]:ej},y),prefixCls:v,style:Object.assign(Object.assign({},S),{WebkitLineClamp:ej?ex:void 0}),component:M,ref:(0,p.sQ)(n,H,t),direction:B,onClick:K.includes("text")?Q:void 0,"aria-label":null==eL?void 0:eL.toString(),title:j},P),r.createElement(en,{enableMeasure:eS&&!eE,text:E,rows:ex,width:ez,onEllipsis:eF,expanded:ev,miscDeps:[et,ev,el,A,J]},(t,n)=>(function(e,t){let{mark:n,code:o,underline:l,delete:i,strong:a,keyboard:s,italic:c}=e,d=t;function u(e,t){t&&(d=r.createElement(e,{},d))}return u("strong",a),u("u",l),u("del",i),u("code",o),u("mark",n),u("kbd",s),u("i",c),d})(e,r.createElement(r.Fragment,null,t.length>0&&n&&!ev&&eL?r.createElement("span",{key:"show-content","aria-hidden":!0},t):t,eN(n)))))))});var ei=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let ea=r.forwardRef((e,t)=>{var{ellipsis:n,rel:o}=e,l=ei(e,["ellipsis","rel"]);let i=Object.assign(Object.assign({},l),{rel:void 0===o&&"_blank"===l.target?"noopener noreferrer":o});return delete i.navigate,r.createElement(el,Object.assign({},i,{ref:t,ellipsis:!!n,component:"a"}))}),es=r.forwardRef((e,t)=>r.createElement(el,Object.assign({ref:t},e,{component:"div"})));var ec=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let ed=r.forwardRef((e,t)=>{var{ellipsis:n}=e,o=ec(e,["ellipsis"]);let l=r.useMemo(()=>n&&"object"==typeof n?(0,u.Z)(n,["expandable","rows"]):n,[n]);return r.createElement(el,Object.assign({ref:t},o,{ellipsis:l,component:"span"}))});var eu=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let ep=[1,2,3,4,5],em=r.forwardRef((e,t)=>{let n;let{level:o=1}=e,l=eu(e,["level"]);return n=ep.includes(o)?`h${o}`:"h1",r.createElement(el,Object.assign({ref:t},l,{component:n}))});W.Text=ed,W.Link=ea,W.Title=em,W.Paragraph=es;let eg=W},73476:function(e,t,n){n.d(t,{H:()=>a});var r=n(44194),o=n(81654);function l(){}let i=r.createContext({add:l,remove:l});function a(e){let t=r.useContext(i),n=r.useRef();return(0,o.zX)(r=>{if(r){let o=e?r.querySelector(e):r;t.add(o),n.current=o}else t.remove(n.current)})}}}]);
223
+ `]:Object.assign(Object.assign({},(0,x.N)(e)),{marginInlineStart:e.marginXXS})}),I(e)),z(e)),B()),{"&-rtl":{direction:"rtl"}})}},H=(0,k.I$)("Typography",e=>[F(e)],()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"})),L=e=>{let{prefixCls:t,"aria-label":n,className:o,style:l,direction:a,maxLength:s,autoSize:c=!0,value:d,onSave:u,onCancel:p,onEnd:m,component:g,enterIcon:f=r.createElement($.Z,null)}=e,b=r.useRef(null),h=r.useRef(!1),x=r.useRef(),[k,E]=r.useState(d);r.useEffect(()=>{E(d)},[d]),r.useEffect(()=>{var e;if(null===(e=b.current)||void 0===e?void 0:e.resizableTextArea){let{textArea:e}=b.current.resizableTextArea;e.focus();let{length:t}=e.value;e.setSelectionRange(t,t)}},[]);let O=()=>{u(k.trim())},w=g?`${t}-${g}`:"",[C,M,j]=H(t),I=i()(t,`${t}-edit-content`,{[`${t}-rtl`]:"rtl"===a},o,w,M,j);return C(r.createElement("div",{className:I,style:l},r.createElement(S.Z,{ref:b,maxLength:s,value:k,onChange:e=>{let{target:t}=e;E(t.value.replace(/[\n\r]/g,""))},onKeyDown:e=>{let{keyCode:t}=e;h.current||(x.current=t)},onKeyUp:e=>{let{keyCode:t,ctrlKey:n,altKey:r,metaKey:o,shiftKey:l}=e;x.current!==t||h.current||n||r||o||l||(t===v.Z.ENTER?(O(),null==m||m()):t===v.Z.ESC&&p())},onCompositionStart:()=>{h.current=!0},onCompositionEnd:()=>{h.current=!1},onBlur:()=>{O()},"aria-label":n,rows:1,autoSize:c}),null!==f?(0,y.Tm)(f,{className:`${t}-edit-content-confirm`}):null))};var T=n(86724),D=n.n(T),P=n(81654);let R=e=>{let{copyConfig:t,children:n}=e,[o,l]=r.useState(!1),[i,a]=r.useState(!1),s=r.useRef(null),c=()=>{s.current&&clearTimeout(s.current)},d={};t.format&&(d.format=t.format),r.useEffect(()=>c,[]);let u=(0,P.zX)(e=>{var r,o,i,u;return r=void 0,o=void 0,i=void 0,u=function*(){var r;null==e||e.preventDefault(),null==e||e.stopPropagation(),a(!0);try{let o="function"==typeof t.text?yield t.text():t.text;D()(o||String(n)||"",d),a(!1),l(!0),c(),s.current=setTimeout(()=>{l(!1)},3e3),null===(r=t.onCopy)||void 0===r||r.call(t,e)}catch(e){throw a(!1),e}},new(i||(i=Promise))(function(e,t){function n(e){try{a(u.next(e))}catch(e){t(e)}}function l(e){try{a(u.throw(e))}catch(e){t(e)}}function a(t){var r;t.done?e(t.value):((r=t.value)instanceof i?r:new i(function(e){e(r)})).then(n,l)}a((u=u.apply(r,o||[])).next())})});return{copied:o,copyLoading:i,onClick:u}};function N(e,t){return r.useMemo(()=>{let n=!!e;return[n,Object.assign(Object.assign({},t),n&&"object"==typeof e?e:null)]},[e])}let _=e=>{let t=(0,r.useRef)();return(0,r.useEffect)(()=>{t.current=e}),t.current},Z=(e,t)=>{let n=r.useRef(!1);r.useEffect(()=>{n.current?e():n.current=!0},t)};var A=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let W=r.forwardRef((e,t)=>{let{prefixCls:n,component:o="article",className:l,rootClassName:a,setContentRef:s,children:c,direction:d,style:u}=e,m=A(e,["prefixCls","component","className","rootClassName","setContentRef","children","direction","style"]),{getPrefixCls:g,direction:b,typography:h}=r.useContext(f.E_),$=t;s&&($=(0,p.sQ)(t,s));let v=g("typography",n),[y,S,x]=H(v),k=i()(v,null==h?void 0:h.className,{[`${v}-rtl`]:"rtl"===(null!=d?d:b)},l,a,S,x),E=Object.assign(Object.assign({},null==h?void 0:h.style),u);return y(r.createElement(o,Object.assign({className:k,style:E,ref:$},m),c))});var X=n(82826),q=n(9172),G=n(55755);function K(e){return!1===e?[!1,!1]:Array.isArray(e)?e:[e]}function V(e,t,n){return!0===e||void 0===e?t:e||n&&t}let U=e=>{let{prefixCls:t,copied:n,locale:o,iconOnly:l,tooltips:a,icon:s,loading:c,tabIndex:d,onCopy:u}=e,p=K(a),m=K(s),{copied:f,copy:b}=null!=o?o:{},$=n?V(p[1],f):V(p[0],b),v=n?f:b,y="string"==typeof $?$:v;return r.createElement(h.Z,{key:"copy",title:$},r.createElement(g.Z,{className:i()(`${t}-copy`,{[`${t}-copy-success`]:n,[`${t}-copy-icon-only`]:l}),onClick:u,"aria-label":y,tabIndex:d},n?V(m[1],r.createElement(X.Z,null),!0):V(m[0],c?r.createElement(G.Z,null):r.createElement(q.Z,null),!0)))};var Y=n(93406);let Q=r.forwardRef((e,t)=>{let{style:n,children:o}=e,l=r.useRef(null);return r.useImperativeHandle(t,()=>({isExceed:()=>{let e=l.current;return e.scrollHeight>e.clientHeight},getHeight:()=>l.current.clientHeight})),r.createElement("span",{"aria-hidden":!0,ref:l,style:Object.assign({position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)"},n)},o)});function J(e){let t=typeof e;return"string"===t||"number"===t}function ee(e,t){let n=0,r=[];for(let o=0;o<e.length;o+=1){if(n===t)return r;let l=e[o],i=n+(J(l)?String(l).length:1);if(i>t){let e=t-n;return r.push(String(l).slice(0,e)),r}r.push(l),n=i}return e}let et={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function en(e){let{enableMeasure:t,width:n,text:o,children:l,rows:i,expanded:a,miscDeps:d,onEllipsis:u}=e,p=r.useMemo(()=>(0,s.Z)(o),[o]),m=r.useMemo(()=>{let e;return e=0,p.forEach(t=>{J(t)?e+=String(t).length:e+=1}),e},[o]),g=r.useMemo(()=>l(p,!1),[o]),[f,b]=r.useState(null),h=r.useRef(null),$=r.useRef(null),v=r.useRef(null),y=r.useRef(null),S=r.useRef(null),[x,k]=r.useState(!1),[E,O]=r.useState(0),[w,C]=r.useState(0),[M,j]=r.useState(null);(0,c.Z)(()=>{t&&n&&m?O(1):O(0)},[n,o,i,t,p]),(0,c.Z)(()=>{var e,t,n,r;if(1===E)O(2),j($.current&&getComputedStyle($.current).whiteSpace);else if(2===E){let o=!!(null===(e=v.current)||void 0===e?void 0:e.isExceed());O(o?3:4),b(o?[0,m]:null),k(o);let l=(null===(t=v.current)||void 0===t?void 0:t.getHeight())||0,a=1===i?0:(null===(n=y.current)||void 0===n?void 0:n.getHeight())||0;C(Math.max(l,a+((null===(r=S.current)||void 0===r?void 0:r.getHeight())||0))+1),u(o)}},[E]);let I=f?Math.ceil((f[0]+f[1])/2):0;(0,c.Z)(()=>{var e;let[t,n]=f||[0,0];if(t!==n){let r=((null===(e=h.current)||void 0===e?void 0:e.getHeight())||0)>w,o=I;n-t==1&&(o=r?t:n),r?b([t,o]):b([o,n])}},[f,I]);let z=r.useMemo(()=>{if(3!==E||!f||f[0]!==f[1]){let e=l(p,!1);return 4!==E&&0!==E?r.createElement("span",{style:Object.assign(Object.assign({},et),{WebkitLineClamp:i})},e):e}return l(a?p:ee(p,f[0]),x)},[a,E,f,p].concat((0,Y.Z)(d))),B={width:n,margin:0,padding:0,whiteSpace:"nowrap"===M?"normal":"inherit"};return r.createElement(r.Fragment,null,z,2===E&&r.createElement(r.Fragment,null,r.createElement(Q,{style:Object.assign(Object.assign(Object.assign({},B),et),{WebkitLineClamp:i}),ref:v},g),r.createElement(Q,{style:Object.assign(Object.assign(Object.assign({},B),et),{WebkitLineClamp:i-1}),ref:y},g),r.createElement(Q,{style:Object.assign(Object.assign(Object.assign({},B),et),{WebkitLineClamp:1}),ref:S},l([],!0))),3===E&&f&&f[0]!==f[1]&&r.createElement(Q,{style:Object.assign(Object.assign({},B),{top:400}),ref:h},l(ee(p,I),!0)),1===E&&r.createElement("span",{style:{whiteSpace:"inherit"},ref:$}))}let er=e=>{let{enableEllipsis:t,isEllipsis:n,children:o,tooltipProps:l}=e;return(null==l?void 0:l.title)&&t?r.createElement(h.Z,Object.assign({open:!!n&&void 0},l),o):o};var eo=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let el=r.forwardRef((e,t)=>{var n,l,$;let{prefixCls:v,className:y,style:S,type:x,disabled:k,children:E,ellipsis:O,editable:w,copyable:C,component:M,title:j}=e,I=eo(e,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:z,direction:B}=r.useContext(f.E_),[F]=(0,b.Z)("Text"),H=r.useRef(null),T=r.useRef(null),D=z("typography",v),P=(0,u.Z)(I,["mark","code","delete","underline","strong","keyboard","italic"]),[A,X]=N(w),[q,G]=(0,d.Z)(!1,{value:X.editing}),{triggerType:K=["icon"]}=X,V=e=>{var t;e&&(null===(t=X.onStart)||void 0===t||t.call(X)),G(e)},Y=_(q);Z(()=>{var e;!q&&Y&&(null===(e=T.current)||void 0===e||e.focus())},[q]);let Q=e=>{null==e||e.preventDefault(),V(!0)},[J,ee]=N(C),{copied:et,copyLoading:el,onClick:ei}=R({copyConfig:ee,children:E}),[ea,es]=r.useState(!1),[ec,ed]=r.useState(!1),[eu,ep]=r.useState(!1),[em,eg]=r.useState(!1),[ef,eb]=r.useState(!0),[eh,e$]=N(O,{expandable:!1,symbol:e=>e?null==F?void 0:F.collapse:null==F?void 0:F.expand}),[ev,ey]=(0,d.Z)(e$.defaultExpanded||!1,{value:e$.expanded}),eS=eh&&(!ev||"collapsible"===e$.expandable),{rows:ex=1}=e$,ek=r.useMemo(()=>eS&&(void 0!==e$.suffix||e$.onEllipsis||e$.expandable||A||J),[eS,e$,A,J]);(0,c.Z)(()=>{eh&&!ek&&(es((0,m.G)("webkitLineClamp")),ed((0,m.G)("textOverflow")))},[ek,eh]);let[eE,eO]=r.useState(eS),ew=r.useMemo(()=>!ek&&(1===ex?ec:ea),[ek,ec,ea]);(0,c.Z)(()=>{eO(ew&&eS)},[ew,eS]);let eC=eS&&(eE?em:eu),eM=eS&&1===ex&&eE,ej=eS&&ex>1&&eE,eI=(e,t)=>{var n;ey(t.expanded),null===(n=e$.onExpand)||void 0===n||n.call(e$,e,t)},[ez,eB]=r.useState(0),eF=e=>{var t;ep(e),eu!==e&&(null===(t=e$.onEllipsis)||void 0===t||t.call(e$,e))};r.useEffect(()=>{let e=H.current;if(eh&&eE&&e){let t=ej?e.offsetHeight<e.scrollHeight:e.offsetWidth<e.scrollWidth;em!==t&&eg(t)}},[eh,eE,E,ej,ef,ez]),r.useEffect(()=>{let e=H.current;if("undefined"==typeof IntersectionObserver||!e||!eE||!eS)return;let t=new IntersectionObserver(()=>{eb(!!e.offsetParent)});return t.observe(e),()=>{t.disconnect()}},[eE,eS]);let eH={};eH=!0===e$.tooltip?{title:null!==(n=X.text)&&void 0!==n?n:E}:r.isValidElement(e$.tooltip)?{title:e$.tooltip}:"object"==typeof e$.tooltip?Object.assign({title:null!==(l=X.text)&&void 0!==l?l:E},e$.tooltip):{title:e$.tooltip};let eL=r.useMemo(()=>{let e=e=>["string","number"].includes(typeof e);return!eh||eE?void 0:e(X.text)?X.text:e(E)?E:e(j)?j:e(eH.title)?eH.title:void 0},[eh,eE,j,eH.title,eC]);if(q)return r.createElement(L,{value:null!==($=X.text)&&void 0!==$?$:"string"==typeof E?E:"",onSave:e=>{var t;null===(t=X.onChange)||void 0===t||t.call(X,e),V(!1)},onCancel:()=>{var e;null===(e=X.onCancel)||void 0===e||e.call(X),V(!1)},onEnd:X.onEnd,prefixCls:D,className:y,style:S,direction:B,component:M,maxLength:X.maxLength,autoSize:X.autoSize,enterIcon:X.enterIcon});let eT=()=>{let{expandable:e,symbol:t}=e$;return!e||ev&&"collapsible"!==e?null:r.createElement(g.Z,{key:"expand",className:`${D}-${ev?"collapse":"expand"}`,onClick:e=>eI(e,{expanded:!ev}),"aria-label":ev?F.collapse:null==F?void 0:F.expand},"function"==typeof t?t(ev):t)},eD=()=>{if(!A)return;let{icon:e,tooltip:t,tabIndex:n}=X,l=(0,s.Z)(t)[0]||(null==F?void 0:F.edit),i="string"==typeof l?l:"";return K.includes("icon")?r.createElement(h.Z,{key:"edit",title:!1===t?"":l},r.createElement(g.Z,{ref:T,className:`${D}-edit`,onClick:Q,"aria-label":i,tabIndex:n},e||r.createElement(o.Z,{role:"button"}))):null},eP=()=>J?r.createElement(U,Object.assign({key:"copy"},ee,{prefixCls:D,copied:et,locale:F,onCopy:ei,loading:el,iconOnly:null==E})):null,eR=e=>[e&&eT(),eD(),eP()],eN=e=>[e&&!ev&&r.createElement("span",{"aria-hidden":!0,key:"ellipsis"},"..."),e$.suffix,eR(e)];return r.createElement(a.Z,{onResize:e=>{let{offsetWidth:t}=e;eB(t)},disabled:!eS},n=>r.createElement(er,{tooltipProps:eH,enableEllipsis:eS,isEllipsis:eC},r.createElement(W,Object.assign({className:i()({[`${D}-${x}`]:x,[`${D}-disabled`]:k,[`${D}-ellipsis`]:eh,[`${D}-ellipsis-single-line`]:eM,[`${D}-ellipsis-multiple-line`]:ej},y),prefixCls:v,style:Object.assign(Object.assign({},S),{WebkitLineClamp:ej?ex:void 0}),component:M,ref:(0,p.sQ)(n,H,t),direction:B,onClick:K.includes("text")?Q:void 0,"aria-label":null==eL?void 0:eL.toString(),title:j},P),r.createElement(en,{enableMeasure:eS&&!eE,text:E,rows:ex,width:ez,onEllipsis:eF,expanded:ev,miscDeps:[et,ev,el,A,J]},(t,n)=>(function(e,t){let{mark:n,code:o,underline:l,delete:i,strong:a,keyboard:s,italic:c}=e,d=t;function u(e,t){t&&(d=r.createElement(e,{},d))}return u("strong",a),u("u",l),u("del",i),u("code",o),u("mark",n),u("kbd",s),u("i",c),d})(e,r.createElement(r.Fragment,null,t.length>0&&n&&!ev&&eL?r.createElement("span",{key:"show-content","aria-hidden":!0},t):t,eN(n)))))))});var ei=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let ea=r.forwardRef((e,t)=>{var{ellipsis:n,rel:o}=e,l=ei(e,["ellipsis","rel"]);let i=Object.assign(Object.assign({},l),{rel:void 0===o&&"_blank"===l.target?"noopener noreferrer":o});return delete i.navigate,r.createElement(el,Object.assign({},i,{ref:t,ellipsis:!!n,component:"a"}))}),es=r.forwardRef((e,t)=>r.createElement(el,Object.assign({ref:t},e,{component:"div"})));var ec=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let ed=r.forwardRef((e,t)=>{var{ellipsis:n}=e,o=ec(e,["ellipsis"]);let l=r.useMemo(()=>n&&"object"==typeof n?(0,u.Z)(n,["expandable","rows"]):n,[n]);return r.createElement(el,Object.assign({ref:t},o,{ellipsis:l,component:"span"}))});var eu=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let ep=[1,2,3,4,5],em=r.forwardRef((e,t)=>{let n;let{level:o=1}=e,l=eu(e,["level"]);return n=ep.includes(o)?`h${o}`:"h1",r.createElement(el,Object.assign({ref:t},l,{component:n}))});W.Text=ed,W.Link=ea,W.Title=em,W.Paragraph=es;let eg=W},73476:function(e,t,n){n.d(t,{H:()=>a});var r=n(44194),o=n(81654);function l(){}let i=r.createContext({add:l,remove:l});function a(e){let t=r.useContext(i),n=r.useRef();return(0,o.zX)(r=>{if(r){let o=e?r.querySelector(e):r;t.add(o),n.current=o}else t.remove(n.current)})}}}]);