46 lines
101 KiB
JavaScript
46 lines
101 KiB
JavaScript
import{n as e,t}from"./rolldown-runtime-Dl_DZoUm.js";import{i as n}from"./react-1o5M9n0k.js";import{$ as r,B as i,Ct as a,D as o,Dn as s,En as c,Gt as l,H as u,L as d,Lt as f,M as p,N as m,Nt as h,O as g,Q as _,R as v,St as y,Tn as b,Tt as x,U as S,V as C,Y as w,Z as T,Zt as E,_ as D,_n as O,_t as k,b as A,bn as j,bt as ee,cn as te,ct as ne,dn as M,en as N,fn as P,ft as F,hn as I,ht as L,i as re,in as ie,it as R,j as ae,kt as oe,l as se,ln as z,lt as ce,mn as B,mt as V,n as le,nn as H,nt as U,pn as W,qt as G,rn as ue,tn as K,un as de,v as fe,w as q,wn as pe,x as me,xn as J,yn as he,z as ge}from"./skeleton-B4Z0R3jQ.js";import{B as _e,x as ve}from"./index-D-ox0wtk.js";var Y=e(s()),X=e(n()),ye=X.createContext(null),Z=(function(){if(typeof Map<`u`)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){t===void 0&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()})(),be=typeof window<`u`&&typeof document<`u`&&window.document===document,xe=(function(){return typeof global<`u`&&global.Math===Math?global:typeof self<`u`&&self.Math===Math?self:typeof window<`u`&&window.Math===Math?window:Function(`return this`)()})(),Se=(function(){return typeof requestAnimationFrame==`function`?requestAnimationFrame.bind(xe):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}})(),Q=2;function $(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&s()}function o(){Se(a)}function s(){var e=Date.now();if(n){if(e-i<Q)return;r=!0}else n=!0,r=!1,setTimeout(o,t);i=e}return s}var Ce=20,we=[`top`,`right`,`bottom`,`left`,`width`,`height`,`size`,`weight`],Te=typeof MutationObserver<`u`,Ee=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=$(this.refresh.bind(this),Ce)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){be&&!this.connected_&&(document.addEventListener(`transitionend`,this.onTransitionEnd_),window.addEventListener(`resize`,this.refresh),Te?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener(`DOMSubtreeModified`,this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){be&&this.connected_&&(document.removeEventListener(`transitionend`,this.onTransitionEnd_),window.removeEventListener(`resize`,this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener(`DOMSubtreeModified`,this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=t===void 0?``:t;we.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||=new e,this.instance_},e.instance_=null,e}(),De=(function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e}),Oe=(function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||xe}),ke=ze(0,0,0,0);function Ae(e){return parseFloat(e)||0}function je(e){return[...arguments].slice(1).reduce(function(t,n){return t+Ae(e[`border-`+n+`-width`])},0)}function Me(e){for(var t=[`top`,`right`,`bottom`,`left`],n={},r=0,i=t;r<i.length;r++){var a=i[r];n[a]=Ae(e[`padding-`+a])}return n}function Ne(e){var t=e.getBBox();return ze(0,0,t.width,t.height)}function Pe(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return ke;var r=Oe(e).getComputedStyle(e),i=Me(r),a=i.left+i.right,o=i.top+i.bottom,s=Ae(r.width),c=Ae(r.height);if(r.boxSizing===`border-box`&&(Math.round(s+a)!==t&&(s-=je(r,`left`,`right`)+a),Math.round(c+o)!==n&&(c-=je(r,`top`,`bottom`)+o)),!Ie(e)){var l=Math.round(s+a)-t,u=Math.round(c+o)-n;Math.abs(l)!==1&&(s-=l),Math.abs(u)!==1&&(c-=u)}return ze(i.left,i.top,s,c)}var Fe=(function(){return typeof SVGGraphicsElement<`u`?function(e){return e instanceof Oe(e).SVGGraphicsElement}:function(e){return e instanceof Oe(e).SVGElement&&typeof e.getBBox==`function`}})();function Ie(e){return e===Oe(e).document.documentElement}function Le(e){return be?Fe(e)?Ne(e):Pe(e):ke}function Re(e){var t=e.x,n=e.y,r=e.width,i=e.height,a=Object.create((typeof DOMRectReadOnly<`u`?DOMRectReadOnly:Object).prototype);return De(a,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),a}function ze(e,t,n,r){return{x:e,y:t,width:n,height:r}}var Be=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ze(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=Le(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),Ve=function(){function e(e,t){var n=Re(t);De(this,{target:e,contentRect:n})}return e}(),He=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new Z,typeof e!=`function`)throw TypeError(`The callback provided as parameter 1 is not a function.`);this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw TypeError(`1 argument required, but only 0 present.`);if(typeof Element<`u`&&Element instanceof Object){if(!(e instanceof Oe(e).Element))throw TypeError(`parameter 1 is not of type "Element".`);var t=this.observations_;t.has(e)||(t.set(e,new Be(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw TypeError(`1 argument required, but only 0 present.`);if(typeof Element<`u`&&Element instanceof Object){if(!(e instanceof Oe(e).Element))throw TypeError(`parameter 1 is not of type "Element".`);var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new Ve(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),Ue=typeof WeakMap<`u`?new WeakMap:new Z,We=function(){function e(t){if(!(this instanceof e))throw TypeError(`Cannot call a class as a function.`);if(!arguments.length)throw TypeError(`1 argument required, but only 0 present.`);var n=new He(t,Ee.getInstance(),this);Ue.set(this,n)}return e}();[`observe`,`unobserve`,`disconnect`].forEach(function(e){We.prototype[e]=function(){var t;return(t=Ue.get(this))[e].apply(t,arguments)}});var Ge=(function(){return xe.ResizeObserver===void 0?We:xe.ResizeObserver})(),Ke=new Map;function qe(e){e.forEach(function(e){var t,n=e.target;(t=Ke.get(n))==null||t.forEach(function(e){return e(n)})})}var Je=new Ge(qe);function Ye(e,t){Ke.has(e)||(Ke.set(e,new Set),Je.observe(e)),Ke.get(e).add(t)}function Xe(e,t){Ke.has(e)&&(Ke.get(e).delete(t),Ke.get(e).size||(Je.unobserve(e),Ke.delete(e)))}var Ze=function(e){te(n,e);var t=ie(n);function n(){return de(this,n),t.apply(this,arguments)}return z(n,[{key:`render`,value:function(){return this.props.children}}]),n}(X.Component);function Qe(e,t){var n=e.children,r=e.disabled,i=X.useRef(null),a=X.useRef(null),o=X.useContext(ye),s=typeof n==`function`,c=s?n(i):n,l=X.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),u=!s&&X.isValidElement(c)&&B(c),d=u?W(c):null,f=I(d,i),p=function(){return O(i.current)||(i.current&&b(i.current)===`object`?O(i.current?.nativeElement):null)||O(a.current)};X.useImperativeHandle(t,function(){return p()});var m=X.useRef(e);m.current=e;var h=X.useCallback(function(e){var t=m.current,n=t.onResize,r=t.data,i=e.getBoundingClientRect(),a=i.width,s=i.height,c=e.offsetWidth,u=e.offsetHeight,d=Math.floor(a),f=Math.floor(s);if(l.current.width!==d||l.current.height!==f||l.current.offsetWidth!==c||l.current.offsetHeight!==u){var p={width:d,height:f,offsetWidth:c,offsetHeight:u};l.current=p;var h=c===Math.round(a)?a:c,g=u===Math.round(s)?s:u,_=j(j({},p),{},{offsetWidth:h,offsetHeight:g});o?.(_,e,r),n&&Promise.resolve().then(function(){n(_,e)})}},[]);return X.useEffect(function(){var e=p();return e&&!r&&Ye(e,h),function(){return Xe(e,h)}},[i.current,r]),X.createElement(Ze,{ref:a},u?X.cloneElement(c,{ref:f}):c)}var $e=X.forwardRef(Qe),et=`rc-observer-key`;function tt(e,t){var n=e.children;return(typeof n==`function`?[n]:pe(n)).map(function(n,r){var i=n?.key||`${et}-${r}`;return X.createElement($e,c({},e,{key:i,ref:r===0?t:void 0}),n)})}var nt=X.forwardRef(tt);nt.Collection=function(e){var t=e.children,n=e.onBatchResize,r=X.useRef(0),i=X.useRef([]),a=X.useContext(ye),o=X.useCallback(function(e,t,o){r.current+=1;var s=r.current;i.current.push({size:e,element:t,data:o}),Promise.resolve().then(function(){s===r.current&&(n?.(i.current),i.current=[])}),a?.(e,t,o)},[n,a]);return X.createElement(ye.Provider,{value:o},t)};var rt=e=>e instanceof q?e:new q(e),it=function(e){if(N()&&window.document.documentElement){var t=Array.isArray(e)?e:[e],n=window.document.documentElement;return t.some(function(e){return e in n.style})}return!1},at=function(e,t){if(!it(e))return!1;var n=document.createElement(`div`),r=n.style[e];return n.style[e]=t,n.style[e]!==r};function ot(e,t){return!Array.isArray(e)&&t!==void 0?at(e,t):it(e)}var st=(function(){if(typeof navigator>`u`||typeof window>`u`)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e?.substr(0,4))});function ct(e){var t=e.prefixCls,n=e.align,r=e.arrow,i=e.arrowPos,a=r||{},o=a.className,s=a.content,c=i.x,l=c===void 0?0:c,u=i.y,d=u===void 0?0:u,f=X.useRef();if(!n||!n.points)return null;var p={position:`absolute`};if(n.autoArrow!==!1){var m=n.points[0],h=n.points[1],g=m[0],_=m[1],v=h[0],y=h[1];g===v||![`t`,`b`].includes(g)?p.top=d:g===`t`?p.top=0:p.bottom=0,_===y||![`l`,`r`].includes(_)?p.left=l:_===`l`?p.left=0:p.right=0}return X.createElement(`div`,{ref:f,className:(0,Y.default)(`${t}-arrow`,o),style:p},s)}function lt(e){var t=e.prefixCls,n=e.open,i=e.zIndex,a=e.mask,o=e.motion;return a?X.createElement(r,c({},o,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(e){var n=e.className;return X.createElement(`div`,{style:{zIndex:i},className:(0,Y.default)(`${t}-mask`,n)})}):null}var ut=X.memo(function(e){return e.children},function(e,t){return t.cache}),dt=X.forwardRef(function(e,t){var n=e.popup,i=e.className,a=e.prefixCls,o=e.style,s=e.target,u=e.onVisibleChanged,d=e.open,f=e.keepDom,p=e.fresh,m=e.onClick,h=e.mask,g=e.arrow,_=e.arrowPos,v=e.align,y=e.motion,b=e.maskMotion,x=e.forceRender,S=e.getPopupContainer,C=e.autoDestroy,w=e.portal,T=e.zIndex,E=e.onMouseEnter,D=e.onMouseLeave,O=e.onPointerEnter,k=e.onPointerDownCapture,A=e.ready,ee=e.offsetX,te=e.offsetY,ne=e.offsetR,N=e.offsetB,P=e.onAlign,F=e.onPrepare,I=e.stretch,L=e.targetWidth,re=e.targetHeight,ie=typeof n==`function`?n():n,R=d||f,ae=S?.length>0,oe=X.useState(!S||!ae),se=K(oe,2),z=se[0],ce=se[1];if(l(function(){!z&&ae&&s&&ce(!0)},[z,ae,s]),!z)return null;var B=`auto`,V={left:`-1000vw`,top:`-1000vh`,right:B,bottom:B};if(A||!d){var le=v.points,H=v.dynamicInset||v._experimental?.dynamicInset,U=H&&le[0][1]===`r`,W=H&&le[0][0]===`b`;U?(V.right=ne,V.left=B):(V.left=ee,V.right=B),W?(V.bottom=N,V.top=B):(V.top=te,V.bottom=B)}var G={};return I&&(I.includes(`height`)&&re?G.height=re:I.includes(`minHeight`)&&re&&(G.minHeight=re),I.includes(`width`)&&L?G.width=L:I.includes(`minWidth`)&&L&&(G.minWidth=L)),d||(G.pointerEvents=`none`),X.createElement(w,{open:x||R,getContainer:S&&function(){return S(s)},autoDestroy:C},X.createElement(lt,{prefixCls:a,open:d,zIndex:T,mask:h,motion:b}),X.createElement(nt,{onResize:P,disabled:!d},function(e){return X.createElement(r,c({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:x,leavedClassName:`${a}-hidden`},y,{onAppearPrepare:F,onEnterPrepare:F,visible:d,onVisibleChanged:function(e){var t;y==null||(t=y.onVisibleChanged)==null||t.call(y,e),u(e)}}),function(n,r){var s=n.className,c=n.style,l=(0,Y.default)(a,s,i);return X.createElement(`div`,{ref:M(e,t,r),className:l,style:j(j(j(j({"--arrow-x":`${_.x||0}px`,"--arrow-y":`${_.y||0}px`},V),G),c),{},{boxSizing:`border-box`,zIndex:T},o),onMouseEnter:E,onMouseLeave:D,onPointerEnter:O,onClick:m,onPointerDownCapture:k},g&&X.createElement(ct,{prefixCls:a,arrow:g,arrowPos:_,align:v}),X.createElement(ut,{cache:!d&&!p},ie))})}))}),ft=X.forwardRef(function(e,t){var n=e.children,r=e.getTriggerDOMNode,i=B(n),a=X.useCallback(function(e){P(t,r?r(e):e)},[r]),o=I(a,W(n));return i?X.cloneElement(n,{ref:o}):n}),pt=X.createContext(null);function mt(e){return e?Array.isArray(e)?e:[e]:[]}function ht(e,t,n,r){return X.useMemo(function(){var i=mt(n??t),a=mt(r??t),o=new Set(i),s=new Set(a);return e&&(o.has(`hover`)&&(o.delete(`hover`),o.add(`click`)),s.has(`hover`)&&(s.delete(`hover`),s.add(`click`))),[o,s]},[e,t,n,r])}function gt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return arguments.length>2&&arguments[2]?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function _t(e,t,n,r){for(var i=n.points,a=Object.keys(e),o=0;o<a.length;o+=1){var s=a[o];if(gt(e[s]?.points,i,r))return`${t}-placement-${s}`}return``}function vt(e,t,n,r){return t||(n?{motionName:`${e}-${n}`}:r?{motionName:r}:null)}function yt(e){return e.ownerDocument.defaultView}function bt(e){for(var t=[],n=e?.parentElement,r=[`hidden`,`scroll`,`clip`,`auto`];n;){var i=yt(n).getComputedStyle(n);[i.overflowX,i.overflowY,i.overflow].some(function(e){return r.includes(e)})&&t.push(n),n=n.parentElement}return t}function xt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(e)?t:e}function St(e){return xt(parseFloat(e),0)}function Ct(e,t){var n=j({},e);return(t||[]).forEach(function(e){if(!(e instanceof HTMLBodyElement||e instanceof HTMLHtmlElement)){var t=yt(e).getComputedStyle(e),r=t.overflow,i=t.overflowClipMargin,a=t.borderTopWidth,o=t.borderBottomWidth,s=t.borderLeftWidth,c=t.borderRightWidth,l=e.getBoundingClientRect(),u=e.offsetHeight,d=e.clientHeight,f=e.offsetWidth,p=e.clientWidth,m=St(a),h=St(o),g=St(s),_=St(c),v=xt(Math.round(l.width/f*1e3)/1e3),y=xt(Math.round(l.height/u*1e3)/1e3),b=(f-p-g-_)*v,x=(u-d-m-h)*y,S=m*y,C=h*y,w=g*v,T=_*v,E=0,D=0;if(r===`clip`){var O=St(i);E=O*v,D=O*y}var k=l.x+w-E,A=l.y+S-D,j=k+l.width+2*E-w-T-b,ee=A+l.height+2*D-S-C-x;n.left=Math.max(n.left,k),n.top=Math.max(n.top,A),n.right=Math.min(n.right,j),n.bottom=Math.min(n.bottom,ee)}}),n}function wt(e){var t=`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:0}`,n=t.match(/^(.*)\%$/);return n?e*(parseFloat(n[1])/100):parseFloat(t)}function Tt(e,t){var n=K(t||[],2),r=n[0],i=n[1];return[wt(e.width,r),wt(e.height,i)]}function Et(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:``;return[e[0],e[1]]}function Dt(e,t){var n=t[0],r=t[1],i,a=n===`t`?e.y:n===`b`?e.y+e.height:e.y+e.height/2;return i=r===`l`?e.x:r===`r`?e.x+e.width:e.x+e.width/2,{x:i,y:a}}function Ot(e,t){var n={t:`b`,b:`t`,l:`r`,r:`l`};return e.map(function(e,r){return r===t?n[e]||`c`:e}).join(``)}function kt(e,t,n,r,i,a,o){var s=X.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[r]||{}}),c=K(s,2),u=c[0],d=c[1],f=X.useRef(0),p=X.useMemo(function(){return t?bt(t):[]},[t]),m=X.useRef({});e||function(){m.current={}}();var h=k(function(){if(t&&n&&e){var s,c,l=t,u=l.ownerDocument,f=yt(l),h=f.getComputedStyle(l).position,g=l.style.left,_=l.style.top,v=l.style.right,y=l.style.bottom,b=l.style.overflow,x=j(j({},i[r]),a),S=u.createElement(`div`);(s=l.parentElement)==null||s.appendChild(S),S.style.left=`${l.offsetLeft}px`,S.style.top=`${l.offsetTop}px`,S.style.position=h,S.style.height=`${l.offsetHeight}px`,S.style.width=`${l.offsetWidth}px`,l.style.left=`0`,l.style.top=`0`,l.style.right=`auto`,l.style.bottom=`auto`,l.style.overflow=`hidden`;var C;if(Array.isArray(n))C={x:n[0],y:n[1],width:0,height:0};else{var w=n.getBoundingClientRect();w.x=w.x??w.left,w.y=w.y??w.top,C={x:w.x,y:w.y,width:w.width,height:w.height}}var T=l.getBoundingClientRect(),E=f.getComputedStyle(l),D=E.height,O=E.width;T.x=T.x??T.left,T.y=T.y??T.top;var k=u.documentElement,A=k.clientWidth,ee=k.clientHeight,te=k.scrollWidth,ne=k.scrollHeight,M=k.scrollTop,N=k.scrollLeft,P=T.height,F=T.width,I=C.height,L=C.width,re={left:0,top:0,right:A,bottom:ee},ie={left:-N,top:-M,right:te-N,bottom:ne-M},R=x.htmlRegion,oe=`visible`,se=`visibleFirst`;R!==`scroll`&&R!==se&&(R=oe);var z=R===se,ce=Ct(ie,p),B=Ct(re,p),V=R===oe?B:ce,le=z?B:V;l.style.left=`auto`,l.style.top=`auto`,l.style.right=`0`,l.style.bottom=`0`;var H=l.getBoundingClientRect();l.style.left=g,l.style.top=_,l.style.right=v,l.style.bottom=y,l.style.overflow=b,(c=l.parentElement)==null||c.removeChild(S);var U=xt(Math.round(F/parseFloat(O)*1e3)/1e3),W=xt(Math.round(P/parseFloat(D)*1e3)/1e3);if(U===0||W===0||he(n)&&!ae(n))return;var G=x.offset,ue=x.targetOffset,de=Tt(T,G),fe=K(de,2),q=fe[0],pe=fe[1],me=Tt(C,ue),J=K(me,2),ge=J[0],_e=J[1];C.x-=ge,C.y-=_e;var ve=x.points||[],Y=K(ve,2),X=Y[0],ye=Et(Y[1]),Z=Et(X),be=Dt(C,ye),xe=Dt(T,Z),Se=j({},x),Q=be.x-xe.x+q,$=be.y-xe.y+pe;function e(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:V,r=T.x+e,i=T.y+t,a=r+F,o=i+P,s=Math.max(r,n.left),c=Math.max(i,n.top),l=Math.min(a,n.right),u=Math.min(o,n.bottom);return Math.max(0,(l-s)*(u-c))}var Ce=e(Q,$),we=e(Q,$,B),Te=Dt(C,[`t`,`l`]),Ee=Dt(T,[`t`,`l`]),De=Dt(C,[`b`,`r`]),Oe=Dt(T,[`b`,`r`]),ke=x.overflow||{},Ae=ke.adjustX,je=ke.adjustY,Me=ke.shiftX,Ne=ke.shiftY,Pe=function(e){return typeof e==`boolean`?e:e>=0},Fe,Ie,Le,Re;function ht(){Fe=T.y+$,Ie=Fe+P,Le=T.x+Q,Re=Le+F}ht();var ze=Pe(je),Be=Z[0]===ye[0];if(ze&&Z[0]===`t`&&(Ie>le.bottom||m.current.bt)){var Ve=$;Be?Ve-=P-I:Ve=Te.y-Oe.y-pe;var He=e(Q,Ve),Ue=e(Q,Ve,B);He>Ce||He===Ce&&(!z||Ue>=we)?(m.current.bt=!0,$=Ve,pe=-pe,Se.points=[Ot(Z,0),Ot(ye,0)]):m.current.bt=!1}if(ze&&Z[0]===`b`&&(Fe<le.top||m.current.tb)){var We=$;Be?We+=P-I:We=De.y-Ee.y-pe;var Ge=e(Q,We),Ke=e(Q,We,B);Ge>Ce||Ge===Ce&&(!z||Ke>=we)?(m.current.tb=!0,$=We,pe=-pe,Se.points=[Ot(Z,0),Ot(ye,0)]):m.current.tb=!1}var qe=Pe(Ae),Je=Z[1]===ye[1];if(qe&&Z[1]===`l`&&(Re>le.right||m.current.rl)){var Ye=Q;Je?Ye-=F-L:Ye=Te.x-Oe.x-q;var Xe=e(Ye,$),Ze=e(Ye,$,B);Xe>Ce||Xe===Ce&&(!z||Ze>=we)?(m.current.rl=!0,Q=Ye,q=-q,Se.points=[Ot(Z,1),Ot(ye,1)]):m.current.rl=!1}if(qe&&Z[1]===`r`&&(Le<le.left||m.current.lr)){var Qe=Q;Je?Qe+=F-L:Qe=De.x-Ee.x-q;var $e=e(Qe,$),et=e(Qe,$,B);$e>Ce||$e===Ce&&(!z||et>=we)?(m.current.lr=!0,Q=Qe,q=-q,Se.points=[Ot(Z,1),Ot(ye,1)]):m.current.lr=!1}ht();var tt=Me===!0?0:Me;typeof tt==`number`&&(Le<B.left&&(Q-=Le-B.left-q,C.x+L<B.left+tt&&(Q+=C.x-B.left+L-tt)),Re>B.right&&(Q-=Re-B.right-q,C.x>B.right-tt&&(Q+=C.x-B.right+tt)));var nt=Ne===!0?0:Ne;typeof nt==`number`&&(Fe<B.top&&($-=Fe-B.top-pe,C.y+I<B.top+nt&&($+=C.y-B.top+I-nt)),Ie>B.bottom&&($-=Ie-B.bottom-pe,C.y>B.bottom-nt&&($+=C.y-B.bottom+nt)));var rt=T.x+Q,it=rt+F,at=T.y+$,ot=at+P,st=C.x,ct=st+L,lt=C.y,ut=lt+I,dt=(Math.max(rt,st)+Math.min(it,ct))/2-rt,ft=(Math.max(at,lt)+Math.min(ot,ut))/2-at;o?.(t,Se);var pt=H.right-T.x-(Q+T.width),mt=H.bottom-T.y-($+T.height);U===1&&(Q=Math.floor(Q),pt=Math.floor(pt)),W===1&&($=Math.floor($),mt=Math.floor(mt)),d({ready:!0,offsetX:Q/U,offsetY:$/W,offsetR:pt/U,offsetB:mt/W,arrowX:dt/U,arrowY:ft/W,scaleX:U,scaleY:W,align:Se})}}),g=function(){f.current+=1;var e=f.current;Promise.resolve().then(function(){f.current===e&&h()})},_=function(){d(function(e){return j(j({},e),{},{ready:!1})})};return l(_,[r]),l(function(){e||_()},[e]),[u.ready,u.offsetX,u.offsetY,u.offsetR,u.offsetB,u.arrowX,u.arrowY,u.scaleX,u.scaleY,u.align,g]}function At(e,t,n,r,i){l(function(){if(e&&t&&n){var a=t,o=n,s=bt(a),c=bt(o),l=yt(o),u=new Set([l].concat(ue(s),ue(c)));function e(){r(),i()}return u.forEach(function(t){t.addEventListener(`scroll`,e,{passive:!0})}),l.addEventListener(`resize`,e,{passive:!0}),r(),function(){u.forEach(function(t){t.removeEventListener(`scroll`,e),l.removeEventListener(`resize`,e)})}}},[e,t,n])}function jt(e,t,n,r,i,a,o,s){var c=X.useRef(e);c.current=e;var l=X.useRef(!1);X.useEffect(function(){if(t&&r&&(!i||a)){var e=function(){l.current=!1},u=function(e){var t;c.current&&!o(((t=e.composedPath)==null||(t=t.call(e))==null?void 0:t[0])||e.target)&&!l.current&&s(!1)},d=yt(r);d.addEventListener(`pointerdown`,e,!0),d.addEventListener(`mousedown`,u,!0),d.addEventListener(`contextmenu`,u,!0);var f=_(n);return f&&(f.addEventListener(`mousedown`,u,!0),f.addEventListener(`contextmenu`,u,!0)),function(){d.removeEventListener(`pointerdown`,e,!0),d.removeEventListener(`mousedown`,u,!0),d.removeEventListener(`contextmenu`,u,!0),f&&(f.removeEventListener(`mousedown`,u,!0),f.removeEventListener(`contextmenu`,u,!0))}}},[t,n,r,i,a]);function u(){l.current=!0}return u}var Mt=`prefixCls.children.action.showAction.hideAction.popupVisible.defaultPopupVisible.onPopupVisibleChange.afterPopupVisibleChange.mouseEnterDelay.mouseLeaveDelay.focusDelay.blurDelay.mask.maskClosable.getPopupContainer.forceRender.autoDestroy.destroyPopupOnHide.popup.popupClassName.popupStyle.popupPlacement.builtinPlacements.popupAlign.zIndex.stretch.getPopupClassNameFromAlign.fresh.alignPoint.onPopupClick.onPopupAlign.arrow.popupMotion.maskMotion.popupTransitionName.popupAnimation.maskTransitionName.maskAnimation.className.getTriggerDOMNode`.split(`.`);function Nt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:fe;return X.forwardRef(function(t,n){var r=t.prefixCls,i=r===void 0?`rc-trigger-popup`:r,a=t.children,o=t.action,s=o===void 0?`hover`:o,c=t.showAction,u=t.hideAction,d=t.popupVisible,f=t.defaultPopupVisible,p=t.onPopupVisibleChange,m=t.afterPopupVisibleChange,h=t.mouseEnterDelay,g=t.mouseLeaveDelay,v=g===void 0?.1:g,y=t.focusDelay,b=t.blurDelay,x=t.mask,S=t.maskClosable,C=S===void 0||S,w=t.getPopupContainer,T=t.forceRender,O=t.autoDestroy,A=t.destroyPopupOnHide,ee=t.popup,te=t.popupClassName,ne=t.popupStyle,M=t.popupPlacement,N=t.builtinPlacements,P=N===void 0?{}:N,F=t.popupAlign,I=t.zIndex,L=t.stretch,re=t.getPopupClassNameFromAlign,ie=t.fresh,R=t.alignPoint,ae=t.onPopupClick,oe=t.onPopupAlign,se=t.arrow,z=t.popupMotion,ce=t.maskMotion,B=t.popupTransitionName,V=t.popupAnimation,le=t.maskTransitionName,H=t.maskAnimation,U=t.className,W=t.getTriggerDOMNode,G=E(t,Mt),ue=O||A||!1,de=X.useState(!1),fe=K(de,2),q=fe[0],pe=fe[1];l(function(){pe(st())},[]);var me=X.useRef({}),J=X.useContext(pt),ge=X.useMemo(function(){return{registerSubPopup:function(e,t){me.current[e]=t,J?.registerSubPopup(e,t)}}},[J]),_e=D(),ve=X.useState(null),ye=K(ve,2),Z=ye[0],be=ye[1],xe=X.useRef(null),Se=k(function(e){xe.current=e,he(e)&&Z!==e&&be(e),J?.registerSubPopup(_e,e)}),Q=X.useState(null),$=K(Q,2),Ce=$[0],we=$[1],Te=X.useRef(null),Ee=k(function(e){he(e)&&Ce!==e&&(we(e),Te.current=e)}),De=X.Children.only(a),Oe=De?.props||{},ke={},Ae=k(function(e){var t=Ce;return t?.contains(e)||_(t)?.host===e||e===t||Z?.contains(e)||_(Z)?.host===e||e===Z||Object.values(me.current).some(function(t){return t?.contains(e)||e===t})}),je=vt(i,z,V,B),Me=vt(i,ce,H,le),Ne=X.useState(f||!1),Pe=K(Ne,2),Fe=Pe[0],Ie=Pe[1],Le=d??Fe,Re=k(function(e){d===void 0&&Ie(e)});l(function(){Ie(d||!1)},[d]);var ze=X.useRef(Le);ze.current=Le;var Be=X.useRef([]);Be.current=[];var Ve=k(function(e){Re(e),(Be.current[Be.current.length-1]??Le)!==e&&(Be.current.push(e),p?.(e))}),He=X.useRef(),Ue=function(){clearTimeout(He.current)},We=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Ue(),t===0?Ve(e):He.current=setTimeout(function(){Ve(e)},t*1e3)};X.useEffect(function(){return Ue},[]);var Ge=X.useState(!1),Ke=K(Ge,2),qe=Ke[0],Je=Ke[1];l(function(e){(!e||Le)&&Je(!0)},[Le]);var Ye=X.useState(null),Xe=K(Ye,2),Ze=Xe[0],Qe=Xe[1],$e=X.useState(null),et=K($e,2),tt=et[0],rt=et[1],it=function(e){rt([e.clientX,e.clientY])},at=kt(Le,Z,R&&tt!==null?tt:Ce,M,P,F,oe),ot=K(at,11),ct=ot[0],lt=ot[1],ut=ot[2],mt=ot[3],gt=ot[4],yt=ot[5],bt=ot[6],xt=ot[7],St=ot[8],Ct=ot[9],wt=ot[10],Tt=ht(q,s,c,u),Et=K(Tt,2),Dt=Et[0],Ot=Et[1],Nt=Dt.has(`click`),Pt=Ot.has(`click`)||Ot.has(`contextMenu`),Ft=k(function(){qe||wt()});At(Le,Ce,Z,Ft,function(){ze.current&&R&&Pt&&We(!1)}),l(function(){Ft()},[tt,M]),l(function(){Le&&!(P!=null&&P[M])&&Ft()},[JSON.stringify(F)]);var It=X.useMemo(function(){var e=_t(P,i,Ct,R);return(0,Y.default)(e,re?.(Ct))},[Ct,re,P,i,R]);X.useImperativeHandle(n,function(){return{nativeElement:Te.current,popupElement:xe.current,forceAlign:Ft}});var Lt=X.useState(0),Rt=K(Lt,2),zt=Rt[0],Bt=Rt[1],Vt=X.useState(0),Ht=K(Vt,2),Ut=Ht[0],Wt=Ht[1],Gt=function(){if(L&&Ce){var e=Ce.getBoundingClientRect();Bt(e.width),Wt(e.height)}},Kt=function(){Gt(),Ft()},qt=function(e){Je(!1),wt(),m?.(e)},Jt=function(){return new Promise(function(e){Gt(),Qe(function(){return e})})};l(function(){Ze&&(wt(),Ze(),Qe(null))},[Ze]);function Yt(e,t,n,r){ke[e]=function(i){var a;r?.(i),We(t,n);var o=[...arguments].slice(1);(a=Oe[e])==null||a.call.apply(a,[Oe,i].concat(o))}}(Nt||Pt)&&(ke.onClick=function(e){var t;ze.current&&Pt?We(!1):!ze.current&&Nt&&(it(e),We(!0));var n=[...arguments].slice(1);(t=Oe.onClick)==null||t.call.apply(t,[Oe,e].concat(n))});var Xt=jt(Le,Pt,Ce,Z,x,C,Ae,We),Zt=Dt.has(`hover`),Qt=Ot.has(`hover`),$t,en;Zt&&(Yt(`onMouseEnter`,!0,h,function(e){it(e)}),Yt(`onPointerEnter`,!0,h,function(e){it(e)}),$t=function(e){(Le||qe)&&Z!=null&&Z.contains(e.target)&&We(!0,h)},R&&(ke.onMouseMove=function(e){var t;(t=Oe.onMouseMove)==null||t.call(Oe,e)})),Qt&&(Yt(`onMouseLeave`,!1,v),Yt(`onPointerLeave`,!1,v),en=function(){We(!1,v)}),Dt.has(`focus`)&&Yt(`onFocus`,!0,y),Ot.has(`focus`)&&Yt(`onBlur`,!1,b),Dt.has(`contextMenu`)&&(ke.onContextMenu=function(e){var t;ze.current&&Ot.has(`contextMenu`)?We(!1):(it(e),We(!0)),e.preventDefault();var n=[...arguments].slice(1);(t=Oe.onContextMenu)==null||t.call.apply(t,[Oe,e].concat(n))}),U&&(ke.className=(0,Y.default)(Oe.className,U));var tn=X.useRef(!1);tn.current||=T||Le||qe;var nn=j(j({},Oe),ke),rn={};[`onContextMenu`,`onClick`,`onMouseDown`,`onTouchStart`,`onMouseEnter`,`onMouseLeave`,`onFocus`,`onBlur`].forEach(function(e){G[e]&&(rn[e]=function(){var t,n=[...arguments];(t=nn[e])==null||t.call.apply(t,[nn].concat(n)),G[e].apply(G,n)})});var an=X.cloneElement(De,j(j({},nn),rn)),on={x:yt,y:bt},sn=se?j({},se===!0?{}:se):null;return X.createElement(X.Fragment,null,X.createElement(nt,{disabled:!Le,ref:Ee,onResize:Kt},X.createElement(ft,{getTriggerDOMNode:W},an)),tn.current&&X.createElement(pt.Provider,{value:ge},X.createElement(dt,{portal:e,ref:Se,prefixCls:i,popup:ee,className:(0,Y.default)(te,It),style:ne,target:Ce,onMouseEnter:$t,onMouseLeave:en,onPointerEnter:$t,zIndex:I,open:Le,keepDom:qe,fresh:ie,onClick:ae,onPointerDownCapture:Xt,mask:x,motion:je,maskMotion:Me,onVisibleChanged:qt,onPrepare:Jt,forceRender:T,autoDestroy:ue,getPopupContainer:w,align:Ct,arrow:sn,arrowPos:on,ready:ct,offsetX:lt,offsetY:ut,offsetR:mt,offsetB:gt,onAlign:Ft,stretch:L,targetWidth:zt/xt,targetHeight:Ut/St})))})}var Pt=Nt(fe);function Ft(e,t,n){return(0,Y.default)({[`${e}-status-success`]:t===`success`,[`${e}-status-warning`]:t===`warning`,[`${e}-status-error`]:t===`error`,[`${e}-status-validating`]:t===`validating`,[`${e}-has-feedback`]:n})}var It=(e,t)=>t||e,Lt=(e,t,n)=>{let{variant:r,[e]:i}=X.useContext(y),o=X.useContext(se),s=i?.variant,c;c=t===void 0?n===!1?`borderless`:o??s??r??`outlined`:t;let l=a.includes(c);return[c,l]},Rt={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z`}}]},name:`check`,theme:`outlined`},zt=X.forwardRef(function(e,t){return X.createElement(T,c({},e,{ref:t,icon:Rt}))});function Bt(e){var t=e.children,n=e.prefixCls,r=e.id,i=e.overlayInnerStyle,a=e.bodyClassName,o=e.className,s=e.style;return X.createElement(`div`,{className:(0,Y.default)(`${n}-content`,o),style:s},X.createElement(`div`,{className:(0,Y.default)(`${n}-inner`,a),id:r,role:`tooltip`,style:i},typeof t==`function`?t():t))}var Vt={shiftX:64,adjustY:1},Ht={adjustX:1,shiftY:!0},Ut=[0,0],Wt={left:{points:[`cr`,`cl`],overflow:Ht,offset:[-4,0],targetOffset:Ut},right:{points:[`cl`,`cr`],overflow:Ht,offset:[4,0],targetOffset:Ut},top:{points:[`bc`,`tc`],overflow:Vt,offset:[0,-4],targetOffset:Ut},bottom:{points:[`tc`,`bc`],overflow:Vt,offset:[0,4],targetOffset:Ut},topLeft:{points:[`bl`,`tl`],overflow:Vt,offset:[0,-4],targetOffset:Ut},leftTop:{points:[`tr`,`tl`],overflow:Ht,offset:[-4,0],targetOffset:Ut},topRight:{points:[`br`,`tr`],overflow:Vt,offset:[0,-4],targetOffset:Ut},rightTop:{points:[`tl`,`tr`],overflow:Ht,offset:[4,0],targetOffset:Ut},bottomRight:{points:[`tr`,`br`],overflow:Vt,offset:[0,4],targetOffset:Ut},rightBottom:{points:[`bl`,`br`],overflow:Ht,offset:[4,0],targetOffset:Ut},bottomLeft:{points:[`tl`,`bl`],overflow:Vt,offset:[0,4],targetOffset:Ut},leftBottom:{points:[`br`,`bl`],overflow:Ht,offset:[-4,0],targetOffset:Ut}},Gt=[`overlayClassName`,`trigger`,`mouseEnterDelay`,`mouseLeaveDelay`,`overlayStyle`,`prefixCls`,`children`,`onVisibleChange`,`afterVisibleChange`,`transitionName`,`animation`,`motion`,`placement`,`align`,`destroyTooltipOnHide`,`defaultVisible`,`getTooltipContainer`,`overlayInnerStyle`,`arrowContent`,`overlay`,`id`,`showArrow`,`classNames`,`styles`],Kt=(0,X.forwardRef)(function(e,t){var n=e.overlayClassName,r=e.trigger,i=r===void 0?[`hover`]:r,a=e.mouseEnterDelay,o=a===void 0?0:a,s=e.mouseLeaveDelay,l=s===void 0?.1:s,u=e.overlayStyle,d=e.prefixCls,f=d===void 0?`rc-tooltip`:d,p=e.children,m=e.onVisibleChange,h=e.afterVisibleChange,g=e.transitionName,_=e.animation,v=e.motion,y=e.placement,b=y===void 0?`right`:y,x=e.align,S=x===void 0?{}:x,C=e.destroyTooltipOnHide,w=C!==void 0&&C,T=e.defaultVisible,O=e.getTooltipContainer,k=e.overlayInnerStyle;e.arrowContent;var A=e.overlay,ee=e.id,te=e.showArrow,ne=te===void 0||te,M=e.classNames,N=e.styles,P=E(e,Gt),F=D(ee),I=(0,X.useRef)(null);(0,X.useImperativeHandle)(t,function(){return I.current});var L=j({},P);return`visible`in e&&(L.popupVisible=e.visible),X.createElement(Pt,c({popupClassName:(0,Y.default)(n,M?.root),prefixCls:f,popup:function(){return X.createElement(Bt,{key:`content`,prefixCls:f,id:F,bodyClassName:M?.body,overlayInnerStyle:j(j({},k),N?.body)},A)},action:i,builtinPlacements:Wt,popupPlacement:b,ref:I,popupAlign:S,getPopupContainer:O,onPopupVisibleChange:m,afterPopupVisibleChange:h,popupTransitionName:g,popupAnimation:_,popupMotion:v,defaultPopupVisible:T,autoDestroy:w,mouseLeaveDelay:l,popupStyle:j(j({},u),N?.root),mouseEnterDelay:o,arrow:ne},L),function(){var e=X.Children.only(p)?.props||{},t=j(j({},e),{},{"aria-describedby":A?F:null});return X.cloneElement(p,t)}())});function qt(e){let{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,i=t/2,a=i,o=+r/Math.sqrt(2),s=i-r*(1-1/Math.sqrt(2)),c=i-1/Math.sqrt(2)*n,l=r*(Math.sqrt(2)-1)+1/Math.sqrt(2)*n,u=2*i-c,d=l,f=2*i-o,p=s,m=2*i,h=a,g=i*Math.sqrt(2)+r*(Math.sqrt(2)-2),_=r*(Math.sqrt(2)-1),v=`polygon(${_}px 100%, 50% ${_}px, ${2*i-_}px 100%, ${_}px 100%)`;return{arrowShadowWidth:g,arrowPath:`path('M 0 ${a} A ${r} ${r} 0 0 0 ${o} ${s} L ${c} ${l} A ${n} ${n} 0 0 1 ${u} ${d} L ${f} ${p} A ${r} ${r} 0 0 0 ${m} ${h} Z')`,arrowPolygon:v}}var Jt=(e,t,n)=>{let{sizePopupArrow:r,arrowPolygon:i,arrowPath:a,arrowShadowWidth:o,borderRadiusXS:s,calc:c}=e;return{pointerEvents:`none`,width:r,height:r,overflow:`hidden`,"&::before":{position:`absolute`,bottom:0,insetInlineStart:0,width:r,height:c(r).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[i,a]},content:`""`},"&::after":{content:`""`,position:`absolute`,width:o,height:o,bottom:0,insetInline:0,margin:`auto`,borderRadius:{_skip_check_:!0,value:`0 0 ${G(s)} 0`},transform:`translateY(50%) rotate(-135deg)`,boxShadow:n,zIndex:0,background:`transparent`}}};function Yt(e){let{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?8:r}}function Xt(e,t){return e?t:{}}function Zt(e,t,n){let{componentCls:r,boxShadowPopoverArrow:i,arrowOffsetVertical:a,arrowOffsetHorizontal:o}=e,{arrowDistance:s=0,arrowPlacement:c={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[r]:Object.assign(Object.assign(Object.assign(Object.assign({[`${r}-arrow`]:[Object.assign(Object.assign({position:`absolute`,zIndex:1,display:`block`},Jt(e,t,i)),{"&:before":{background:t}})]},Xt(!!c.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(`,`)]:{bottom:s,transform:`translateY(100%) rotate(180deg)`},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:`50%`},transform:`translateX(-50%) translateY(100%) rotate(180deg)`},"&-placement-topLeft":{"--arrow-offset-horizontal":o,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:o}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${G(o)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:o}}}})),Xt(!!c.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(`,`)]:{top:s,transform:`translateY(-100%)`},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:`50%`},transform:`translateX(-50%) translateY(-100%)`},"&-placement-bottomLeft":{"--arrow-offset-horizontal":o,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:o}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${G(o)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:o}}}})),Xt(!!c.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(`,`)]:{right:{_skip_check_:!0,value:s},transform:`translateX(100%) rotate(90deg)`},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:!0,value:`50%`},transform:`translateY(-50%) translateX(100%) rotate(90deg)`},[`&-placement-leftTop > ${r}-arrow`]:{top:a},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:a}})),Xt(!!c.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(`,`)]:{left:{_skip_check_:!0,value:s},transform:`translateX(-100%) rotate(-90deg)`},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:!0,value:`50%`},transform:`translateY(-50%) translateX(-100%) rotate(-90deg)`},[`&-placement-rightTop > ${r}-arrow`]:{top:a},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:a}}))}}function Qt(e,t,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};let i=r&&typeof r==`object`?r:{},a={};switch(e){case`top`:case`bottom`:a.shiftX=t.arrowOffsetHorizontal*2+n,a.shiftY=!0,a.adjustY=!0;break;case`left`:case`right`:a.shiftY=t.arrowOffsetVertical*2+n,a.shiftX=!0,a.adjustX=!0}let o=Object.assign(Object.assign({},a),i);return o.shiftX||(o.adjustX=!0),o.shiftY||(o.adjustY=!0),o}var $t={left:{points:[`cr`,`cl`]},right:{points:[`cl`,`cr`]},top:{points:[`bc`,`tc`]},bottom:{points:[`tc`,`bc`]},topLeft:{points:[`bl`,`tl`]},leftTop:{points:[`tr`,`tl`]},topRight:{points:[`br`,`tr`]},rightTop:{points:[`tl`,`tr`]},bottomRight:{points:[`tr`,`br`]},rightBottom:{points:[`bl`,`br`]},bottomLeft:{points:[`tl`,`bl`]},leftBottom:{points:[`br`,`bl`]}},en={topLeft:{points:[`bl`,`tc`]},leftTop:{points:[`tr`,`cl`]},topRight:{points:[`br`,`tc`]},rightTop:{points:[`tl`,`cr`]},bottomRight:{points:[`tr`,`bc`]},rightBottom:{points:[`bl`,`cr`]},bottomLeft:{points:[`tl`,`bc`]},leftBottom:{points:[`br`,`cl`]}},tn=new Set([`topLeft`,`topRight`,`bottomLeft`,`bottomRight`,`leftTop`,`leftBottom`,`rightTop`,`rightBottom`]);function nn(e){let{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:i,borderRadius:a,visibleFirst:o}=e,s=t/2,c={},l=Yt({contentRadius:a,limitVerticalRadius:!0});return Object.keys($t).forEach(e=>{let a=r&&en[e]||$t[e],u=Object.assign(Object.assign({},a),{offset:[0,0],dynamicInset:!0});switch(c[e]=u,tn.has(e)&&(u.autoArrow=!1),e){case`top`:case`topLeft`:case`topRight`:u.offset[1]=-s-i;break;case`bottom`:case`bottomLeft`:case`bottomRight`:u.offset[1]=s+i;break;case`left`:case`leftTop`:case`leftBottom`:u.offset[0]=-s-i;break;case`right`:case`rightTop`:case`rightBottom`:u.offset[0]=s+i}if(r)switch(e){case`topLeft`:case`bottomLeft`:u.offset[0]=-l.arrowOffsetHorizontal-s;break;case`topRight`:case`bottomRight`:u.offset[0]=l.arrowOffsetHorizontal+s;break;case`leftTop`:case`rightTop`:u.offset[1]=-l.arrowOffsetHorizontal*2+s;break;case`leftBottom`:case`rightBottom`:u.offset[1]=l.arrowOffsetHorizontal*2-s}u.overflow=Qt(e,l,t,n),o&&(u.htmlRegion=`visibleFirst`)}),c}var rn=e=>{let{calc:t,componentCls:n,tooltipMaxWidth:r,tooltipColor:i,tooltipBg:a,tooltipBorderRadius:o,zIndexPopup:s,controlHeight:c,boxShadowSecondary:l,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:f,sizePopupArrow:p}=e,m=t(o).add(p).add(f).equal(),h=t(o).mul(2).add(p).equal();return[{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},ce(e)),{position:`absolute`,zIndex:s,display:`block`,width:`max-content`,maxWidth:r,visibility:`visible`,"--valid-offset-x":`var(--arrow-offset-horizontal, var(--arrow-x))`,transformOrigin:`var(--valid-offset-x, 50%) var(--arrow-y, 50%)`,"&-hidden":{display:`none`},"--antd-arrow-background-color":a,[`${n}-inner`]:{minWidth:h,minHeight:c,padding:`${G(e.calc(u).div(2).equal())} ${G(d)}`,color:`var(--ant-tooltip-color, ${i})`,textAlign:`start`,textDecoration:`none`,wordWrap:`break-word`,backgroundColor:a,borderRadius:o,boxShadow:l,boxSizing:`border-box`},"&-placement-topLeft,&-placement-topRight,&-placement-bottomLeft,&-placement-bottomRight":{minWidth:m},"&-placement-left,&-placement-leftTop,&-placement-leftBottom,&-placement-right,&-placement-rightTop,&-placement-rightBottom":{[`${n}-inner`]:{borderRadius:e.min(o,8)}},[`${n}-content`]:{position:`relative`}}),_e(e,(e,{darkColor:t})=>({[`&${n}-${e}`]:{[`${n}-inner`]:{backgroundColor:t},[`${n}-arrow`]:{"--antd-arrow-background-color":t}}}))),{"&-rtl":{direction:`rtl`}})},Zt(e,`var(--antd-arrow-background-color)`),{[`${n}-pure`]:{position:`relative`,maxWidth:`none`,margin:e.sizePopupArrow}}]},an=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},Yt({contentRadius:e.borderRadius,limitVerticalRadius:!0})),qt(V(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),on=(e,t=!0)=>U(`Tooltip`,e=>{let{borderRadius:t,colorTextLightSolid:n,colorBgSpotlight:r}=e;return[rn(V(e,{tooltipMaxWidth:250,tooltipColor:n,tooltipBorderRadius:t,tooltipBg:r})),me(e,`zoom-big-fast`)]},an,{resetStyle:!1,injectStyle:t})(e);function sn(e,t){let n=ve(t),r=(0,Y.default)({[`${e}-${t}`]:t&&n}),i={},a={},o=rt(t).toRgb(),s=(.299*o.r+.587*o.g+.114*o.b)/255<.5?`#FFF`:`#000`;return t&&!n&&(i.background=t,i[`--ant-tooltip-color`]=s,a[`--antd-arrow-background-color`]=t),{className:r,overlayStyle:i,arrowStyle:a}}var cn=e=>{let{prefixCls:t,className:n,placement:r=`top`,title:i,color:a,overlayInnerStyle:o}=e,{getPrefixCls:s}=X.useContext(y),c=s(`tooltip`,t),[l,u,d]=on(c),f=sn(c,a),p=f.arrowStyle,m=Object.assign(Object.assign({},o),f.overlayStyle),h=(0,Y.default)(u,d,c,`${c}-pure`,`${c}-placement-${r}`,n,f.className);return l(X.createElement(`div`,{className:h,style:p},X.createElement(`div`,{className:`${c}-arrow`}),X.createElement(Bt,Object.assign({},e,{className:u,prefixCls:c,overlayInnerStyle:m}),i)))},ln=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<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},un=X.forwardRef((e,t)=>{let{prefixCls:n,openClassName:r,getTooltipContainer:i,color:a,overlayInnerStyle:o,children:s,afterOpenChange:c,afterVisibleChange:l,destroyTooltipOnHide:p,destroyOnHidden:h,arrow:g=!0,title:_,overlay:y,builtinPlacements:b,arrowPointAtCenter:C=!1,autoAdjustOverflow:w=!0,motion:T,getPopupContainer:E,placement:D=`top`,mouseEnterDelay:O=.1,mouseLeaveDelay:k=.1,overlayStyle:A,rootClassName:j,overlayClassName:ee,styles:te,classNames:ne}=e,M=ln(e,`prefixCls.openClassName.getTooltipContainer.color.overlayInnerStyle.children.afterOpenChange.afterVisibleChange.destroyTooltipOnHide.destroyOnHidden.arrow.title.overlay.builtinPlacements.arrowPointAtCenter.autoAdjustOverflow.motion.getPopupContainer.placement.mouseEnterDelay.mouseLeaveDelay.overlayStyle.rootClassName.overlayClassName.styles.classNames`.split(`.`)),N=!!g,[,P]=F(),{getPopupContainer:I,getPrefixCls:re,direction:ie,className:R,style:ae,classNames:oe,styles:se}=x(`tooltip`),z=f(`Tooltip`),ce=X.useRef(null),B=()=>{var e;(e=ce.current)==null||e.forceAlign()};X.useImperativeHandle(t,()=>({forceAlign:B,forcePopupAlign:()=>{z.deprecated(!1,`forcePopupAlign`,`forceAlign`),B()},nativeElement:ce.current?.nativeElement,popupElement:ce.current?.popupElement}));let[V,H]=L(!1,{value:e.open??e.visible,defaultValue:e.defaultOpen??e.defaultVisible}),U=!_&&!y&&_!==0,W=t=>{var n,r;H(!U&&t),U||((n=e.onOpenChange)==null||n.call(e,t),(r=e.onVisibleChange)==null||r.call(e,t))},G=X.useMemo(()=>{let e=C;return typeof g==`object`&&(e=g.pointAtCenter??g.arrowPointAtCenter??C),b||nn({arrowPointAtCenter:e,autoAdjustOverflow:w,arrowWidth:N?P.sizePopupArrow:0,borderRadius:P.borderRadius,offset:P.marginXXS,visibleFirst:!0})},[C,g,b,P]),ue=X.useMemo(()=>_===0?_:y||_||``,[y,_]),K=X.createElement(le,{space:!0},typeof ue==`function`?ue():ue),de=re(`tooltip`,n),fe=re(),q=e[`data-popover-inject`],pe=V;!(`open`in e)&&!(`visible`in e)&&U&&(pe=!1);let me=X.isValidElement(s)&&!S(s)?s:X.createElement(`span`,null,s),J=me.props,he=!J.className||typeof J.className==`string`?(0,Y.default)(J.className,r||`${de}-open`):J.className,[ge,_e,ve]=on(de,!q),ye=sn(de,a),Z=ye.arrowStyle,be=(0,Y.default)(ee,{[`${de}-rtl`]:ie===`rtl`},ye.className,j,_e,ve,R,oe.root,ne?.root),xe=(0,Y.default)(oe.body,ne?.body),[Se,Q]=d(`Tooltip`,M.zIndex),$=X.createElement(Kt,Object.assign({},M,{zIndex:Se,showArrow:N,placement:D,mouseEnterDelay:O,mouseLeaveDelay:k,prefixCls:de,classNames:{root:be,body:xe},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Z),se.root),ae),A),te?.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},se.body),o),te?.body),ye.overlayStyle)},getTooltipContainer:E||i||I,ref:ce,builtinPlacements:G,overlay:K,visible:pe,onVisibleChange:W,afterVisibleChange:c??l,arrowContent:X.createElement(`span`,{className:`${de}-arrow-content`}),motion:{motionName:m(fe,`zoom-big-fast`,e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:h??!!p}),pe?u(me,{className:he}):me);return ge(X.createElement(v.Provider,{value:Q},$))});un._InternalPanelDoNotUseOrYouWillBeFired=cn;function dn(e){return V(e,{inputAffixPadding:e.paddingXXS})}var fn=e=>{let{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:i,controlHeightSM:a,controlHeightLG:o,fontSizeLG:s,lineHeightLG:c,paddingSM:l,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:f,colorPrimaryHover:p,colorPrimary:m,controlOutlineWidth:h,controlOutline:g,colorErrorOutline:_,colorWarningOutline:v,colorBgContainer:y,inputFontSize:b,inputFontSizeLG:x,inputFontSizeSM:S}=e,C=b||n,w=S||C,T=x||s,E=Math.round((t-C*r)/2*10)/10-i,D=Math.round((a-w*r)/2*10)/10-i,O=Math.ceil((o-T*c)/2*10)/10-i;return{paddingBlock:Math.max(E,0),paddingBlockSM:Math.max(D,0),paddingBlockLG:Math.max(O,0),paddingInline:l-i,paddingInlineSM:u-i,paddingInlineLG:d-i,addonBg:f,activeBorderColor:m,hoverBorderColor:p,activeShadow:`0 0 0 ${h}px ${g}`,errorActiveShadow:`0 0 0 ${h}px ${_}`,warningActiveShadow:`0 0 0 ${h}px ${v}`,hoverBg:y,activeBg:y,inputFontSize:C,inputFontSizeLG:T,inputFontSizeSM:w}},pn=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),mn=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:`none`,cursor:`not-allowed`,opacity:1,"input[disabled], textarea[disabled]":{cursor:`not-allowed`},"&:hover:not([disabled])":Object.assign({},pn(V(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),hn=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),gn=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},hn(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),_n=(e,t)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},hn(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},mn(e))}),gn(e,{status:`error`,borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),gn(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),vn=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),yn=e=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${G(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},vn(e,{status:`error`,addonBorderColor:e.colorError,addonColor:e.colorErrorText})),vn(e,{status:`warning`,addonBorderColor:e.colorWarning,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:Object.assign({},mn(e))}})}),bn=(e,t)=>{let{componentCls:n}=e;return{"&-borderless":Object.assign({background:`transparent`,border:`none`,"&:focus, &:focus-within":{outline:`none`},[`&${n}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:`not-allowed`},[`&${n}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${n}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}}},t)}},xn=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:`transparent`,"input&, & input, textarea&, & textarea":{color:t?.inputColor??`unset`},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),Sn=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},xn(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}})}),Cn=(e,t)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},xn(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},mn(e))}),Sn(e,{status:`error`,bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),Sn(e,{status:`warning`,bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),wn=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),Tn=e=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:`static`}}},wn(e,{status:`error`,addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),wn(e,{status:`warning`,addonBg:e.colorWarningBg,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${G(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${G(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${G(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${G(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${G(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${G(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}})}),En=(e,t)=>({background:e.colorBgContainer,borderWidth:`${G(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.hoverBorderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),Dn=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},En(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),On=(e,t)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},En(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:`none`,cursor:`not-allowed`,"&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:`not-allowed`}}),Dn(e,{status:`error`,borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),Dn(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),kn=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:`none`},"&:placeholder-shown":{textOverflow:`ellipsis`}}),An=e=>{let{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:i}=e;return{padding:`${G(t)} ${G(i)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},jn=e=>({padding:`${G(e.paddingBlockSM)} ${G(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),Mn=e=>Object.assign(Object.assign({position:`relative`,display:`inline-block`,width:`100%`,minWidth:0,padding:`${G(e.paddingBlock)} ${G(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},kn(e.colorTextPlaceholder)),{"&-lg":Object.assign({},An(e)),"&-sm":Object.assign({},jn(e)),"&-rtl, &-textarea-rtl":{direction:`rtl`}}),Nn=e=>{let{componentCls:t,antCls:n}=e;return{position:`relative`,display:`table`,width:`100%`,borderCollapse:`separate`,borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:Object.assign({},An(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:Object.assign({},jn(e)),[`&-lg ${n}-select-single ${n}-select-selector`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single ${n}-select-selector`]:{height:e.controlHeightSM},[`> ${t}`]:{display:`table-cell`,"&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:`table-cell`,width:1,whiteSpace:`nowrap`,verticalAlign:`middle`,"&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:`block !important`},"&-addon":{position:`relative`,padding:`0 ${G(e.paddingInline)}`,color:e.colorText,fontWeight:`normal`,fontSize:e.inputFontSize,textAlign:`center`,borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${G(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${G(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{[`${n}-select-selector`]:{backgroundColor:`inherit`,border:`${G(e.lineWidth)} ${e.lineType} transparent`,boxShadow:`none`}}},[`${n}-cascader-picker`]:{margin:`-9px ${G(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:`transparent`,[`${n}-cascader-input`]:{textAlign:`start`,border:0,boxShadow:`none`}}}},[t]:{width:`100%`,marginBottom:0,textAlign:`inherit`,"&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${t}-search-with-button &`]:{zIndex:0}}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${t}-search &`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},[`&:not(:first-child), ${t}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:Object.assign(Object.assign({display:`block`},R()),{[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:`inline-flex`,float:`none`,verticalAlign:`top`,borderRadius:0},[`
|
|
& > ${t}-affix-wrapper,
|
|
& > ${t}-number-affix-wrapper,
|
|
& > ${n}-picker-range
|
|
`]:{display:`inline-flex`},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:`none`},[`& > ${n}-select > ${n}-select-selector,
|
|
& > ${n}-select-auto-complete ${t},
|
|
& > ${n}-cascader-picker ${t},
|
|
& > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${n}-select-focused`]:{zIndex:1},[`& > ${n}-select > ${n}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
& > ${n}-select:first-child > ${n}-select-selector,
|
|
& > ${n}-select-auto-complete:first-child ${t},
|
|
& > ${n}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child,
|
|
& > ${n}-select:last-child > ${n}-select-selector,
|
|
& > ${n}-cascader-picker:last-child ${t},
|
|
& > ${n}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${n}-select-auto-complete ${t}`]:{verticalAlign:`top`},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{borderRadius:0}},[`${t}-group-wrapper:not(:last-child)`]:{[`&${t}-search > ${t}-group`]:{[`& > ${t}-group-addon > ${t}-search-button`]:{borderRadius:0},[`& > ${t}`]:{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}}}})}},Pn=e=>{let{componentCls:t,controlHeightSM:n,lineWidth:r,calc:i}=e,a=i(n).sub(i(r).mul(2)).sub(16).div(2).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},ce(e)),Mn(e)),_n(e)),Cn(e)),bn(e)),On(e)),{'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:`none`}})}},Fn=e=>{let{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:`pointer`,transition:`color ${e.motionDurationSlow}`,border:`none`,outline:`none`,backgroundColor:`transparent`,"&:hover":{color:e.colorIcon},"&:active":{color:e.colorText},"&-hidden":{visibility:`hidden`},"&-has-suffix":{margin:`0 ${G(e.inputAffixPadding)}`}}}},In=e=>{let{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:i,colorIcon:a,colorIconHover:o,iconCls:s}=e,c=`${t}-affix-wrapper`,l=`${t}-affix-wrapper-disabled`;return{[c]:Object.assign(Object.assign(Object.assign(Object.assign({},Mn(e)),{display:`inline-flex`,[`&:not(${t}-disabled):hover`]:{zIndex:1,[`${t}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:`inherit`,border:`none`,borderRadius:0,outline:`none`,background:`transparent`,color:`inherit`,"&::-ms-reveal":{display:`none`},"&:focus":{boxShadow:`none !important`}},"&::before":{display:`inline-block`,width:0,visibility:`hidden`,content:`"\\a0"`},[t]:{"&-prefix, &-suffix":{display:`flex`,flex:`none`,alignItems:`center`,"> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:r,direction:`ltr`},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}}}),Fn(e)),{[`${s}${t}-password-icon`]:{color:a,cursor:`pointer`,transition:`all ${i}`,"&:hover":{color:o}}}),[`${t}-underlined`]:{borderRadius:0},[l]:{[`${s}${t}-password-icon`]:{color:a,cursor:`not-allowed`,"&:hover":{color:a}}}}},Ln=e=>{let{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{[`${t}-group`]:Object.assign(Object.assign(Object.assign({},ce(e)),Nn(e)),{"&-rtl":{direction:`rtl`},"&-wrapper":Object.assign(Object.assign(Object.assign({display:`inline-block`,width:`100%`,textAlign:`start`,verticalAlign:`top`,"&-rtl":{direction:`rtl`},"&-lg":{[`${t}-group-addon`]:{borderRadius:n,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:r}}},yn(e)),Tn(e)),{[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},Rn=e=>{let{componentCls:t,antCls:n}=e,r=`${t}-search`;return{[r]:{[t]:{"&:not([disabled]):hover, &:not([disabled]):focus":{[`+ ${t}-group-addon ${r}-button:not(${n}-btn-color-primary):not(${n}-btn-variant-text)`]:{borderInlineStartColor:e.colorPrimaryHover}}},[`${t}-affix-wrapper`]:{height:e.controlHeight,borderRadius:0},[`${t}-lg`]:{lineHeight:e.calc(e.lineHeightLG).sub(2e-4).equal()},[`> ${t}-group`]:{[`> ${t}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${r}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:`none`},[`${r}-button:not(${n}-btn-color-primary)`]:{color:e.colorTextDescription,"&:not([disabled]):hover":{color:e.colorPrimaryHover},"&:active":{color:e.colorPrimaryActive},[`&${n}-btn-loading::before`]:{inset:0}}}},[`${r}-button`]:{height:e.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${t}-affix-wrapper, ${r}-button`]:{height:e.controlHeightLG}},"&-small":{[`${t}-affix-wrapper, ${r}-button`]:{height:e.controlHeightSM}},"&-rtl":{direction:`rtl`},[`&${t}-compact-item`]:{[`&:not(${t}-compact-last-item)`]:{[`${t}-group-addon`]:{[`${t}-search-button`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${t}-compact-first-item)`]:{[`${t},${t}-affix-wrapper`]:{borderRadius:0}},[`> ${t}-group-addon ${t}-search-button,
|
|
> ${t},
|
|
${t}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${t}-affix-wrapper-focused`]:{zIndex:2}}}}},zn=e=>{let{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},Bn=U([`Input`,`Shared`],e=>{let t=V(e,dn(e));return[Pn(t),In(t)]},fn,{resetFont:!1}),Vn=U([`Input`,`Component`],e=>{let t=V(e,dn(e));return[Ln(t),Rn(t),zn(t),A(t)]},fn,{resetFont:!1});function Hn(e){return!!(e.addonBefore||e.addonAfter)}function Un(e){return!!(e.prefix||e.suffix||e.allowClear)}function Wn(e,t,n){var r=t.cloneNode(!0),i=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart==`number`&&typeof t.selectionEnd==`number`&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=function(){t.setSelectionRange.apply(t,arguments)},i}function Gn(e,t,n,r){if(n){var i=t;t.type===`click`?(i=Wn(t,e,``),n(i)):(e.type!==`file`&&r!==void 0&&(i=Wn(t,e,r)),n(i))}}function Kn(e,t){if(e){e.focus(t);var n=(t||{}).cursor;if(n){var r=e.value.length;switch(n){case`start`:e.setSelectionRange(0,0);break;case`end`:e.setSelectionRange(r,r);break;default:e.setSelectionRange(0,r)}}}}var qn=X.forwardRef(function(e,t){var n=e.inputElement,r=e.children,i=e.prefixCls,a=e.prefix,o=e.suffix,s=e.addonBefore,l=e.addonAfter,u=e.className,d=e.style,f=e.disabled,p=e.readOnly,m=e.focused,h=e.triggerFocus,g=e.allowClear,_=e.value,v=e.handleReset,y=e.hidden,x=e.classes,S=e.classNames,C=e.dataAttrs,w=e.styles,T=e.components,E=e.onClear,D=r??n,O=T?.affixWrapper||`span`,k=T?.groupWrapper||`span`,A=T?.wrapper||`span`,ee=T?.groupAddon||`span`,te=(0,X.useRef)(null),ne=function(e){var t;(t=te.current)!=null&&t.contains(e.target)&&h?.()},M=Un(e),N=(0,X.cloneElement)(D,{value:_,className:(0,Y.default)(D.props?.className,!M&&S?.variant)||null}),P=(0,X.useRef)(null);if(X.useImperativeHandle(t,function(){return{nativeElement:P.current||te.current}}),M){var F=null;if(g){var I=!f&&!p&&_,L=`${i}-clear-icon`,re=b(g)===`object`&&g!=null&&g.clearIcon?g.clearIcon:`✖`;F=X.createElement(`button`,{type:`button`,tabIndex:-1,onClick:function(e){v?.(e),E?.()},onMouseDown:function(e){return e.preventDefault()},className:(0,Y.default)(L,J(J({},`${L}-hidden`,!I),`${L}-has-suffix`,!!o))},re)}var ie=`${i}-affix-wrapper`,R=(0,Y.default)(ie,J(J(J(J(J({},`${i}-disabled`,f),`${ie}-disabled`,f),`${ie}-focused`,m),`${ie}-readonly`,p),`${ie}-input-with-clear-btn`,o&&g&&_),x?.affixWrapper,S?.affixWrapper,S?.variant),ae=(o||g)&&X.createElement(`span`,{className:(0,Y.default)(`${i}-suffix`,S?.suffix),style:w?.suffix},F,o);N=X.createElement(O,c({className:R,style:w?.affixWrapper,onClick:ne},C?.affixWrapper,{ref:te}),a&&X.createElement(`span`,{className:(0,Y.default)(`${i}-prefix`,S?.prefix),style:w?.prefix},a),N,ae)}if(Hn(e)){var oe=`${i}-group`,se=`${oe}-addon`,z=`${oe}-wrapper`,ce=(0,Y.default)(`${i}-wrapper`,oe,x?.wrapper,S?.wrapper),B=(0,Y.default)(z,J({},`${z}-disabled`,f),x?.group,S?.groupWrapper);N=X.createElement(k,{className:B,ref:P},X.createElement(A,{className:ce},s&&X.createElement(ee,{className:se},s),N,l&&X.createElement(ee,{className:se},l)))}return X.cloneElement(N,{className:(0,Y.default)(N.props?.className,u)||null,style:j(j({},N.props?.style),d),hidden:y})}),Jn=[`show`];function Yn(e,t){return X.useMemo(function(){var n={};t&&(n.show=b(t)===`object`&&t.formatter?t.formatter:!!t),n=j(j({},n),e);var r=n,i=r.show,a=E(r,Jn);return j(j({},a),{},{show:!!i,showFormatter:typeof i==`function`?i:void 0,strategy:a.strategy||function(e){return e.length}})},[e,t])}var Xn=[`autoComplete`,`onChange`,`onFocus`,`onBlur`,`onPressEnter`,`onKeyDown`,`onKeyUp`,`prefixCls`,`disabled`,`htmlSize`,`className`,`maxLength`,`suffix`,`showCount`,`count`,`type`,`classes`,`classNames`,`styles`,`onCompositionStart`,`onCompositionEnd`],Zn=(0,X.forwardRef)(function(e,t){var n=e.autoComplete,r=e.onChange,i=e.onFocus,a=e.onBlur,o=e.onPressEnter,s=e.onKeyDown,l=e.onKeyUp,u=e.prefixCls,d=u===void 0?`rc-input`:u,f=e.disabled,m=e.htmlSize,h=e.className,g=e.maxLength,_=e.suffix,v=e.showCount,y=e.count,b=e.type,x=b===void 0?`text`:b,S=e.classes,C=e.classNames,w=e.styles,T=e.onCompositionStart,D=e.onCompositionEnd,O=E(e,Xn),k=(0,X.useState)(!1),A=K(k,2),ee=A[0],te=A[1],ne=(0,X.useRef)(!1),M=(0,X.useRef)(!1),N=(0,X.useRef)(null),P=(0,X.useRef)(null),F=function(e){N.current&&Kn(N.current,e)},I=L(e.defaultValue,{value:e.value}),re=K(I,2),ie=re[0],R=re[1],ae=ie==null?``:String(ie),oe=(0,X.useState)(null),se=K(oe,2),z=se[0],ce=se[1],B=Yn(y,v),V=B.max||g,le=B.strategy(ae),H=!!V&&le>V;(0,X.useImperativeHandle)(t,function(){return{focus:F,blur:function(){var e;(e=N.current)==null||e.blur()},setSelectionRange:function(e,t,n){var r;(r=N.current)==null||r.setSelectionRange(e,t,n)},select:function(){var e;(e=N.current)==null||e.select()},input:N.current,nativeElement:P.current?.nativeElement||N.current}}),(0,X.useEffect)(function(){M.current&&=!1,te(function(e){return e&&f?!1:e})},[f]);var U=function(e,t,n){var i=t;if(!ne.current&&B.exceedFormatter&&B.max&&B.strategy(t)>B.max)i=B.exceedFormatter(t,{max:B.max}),t!==i&&ce([N.current?.selectionStart||0,N.current?.selectionEnd||0]);else if(n.source===`compositionEnd`)return;R(i),N.current&&Gn(N.current,e,r,i)};(0,X.useEffect)(function(){if(z){var e;(e=N.current)==null||e.setSelectionRange.apply(e,ue(z))}},[z]);var W=function(e){U(e,e.target.value,{source:`change`})},G=function(e){ne.current=!1,U(e,e.currentTarget.value,{source:`compositionEnd`}),D?.(e)},de=function(e){o&&e.key===`Enter`&&!M.current&&(M.current=!0,o(e)),s?.(e)},fe=function(e){e.key===`Enter`&&(M.current=!1),l?.(e)},q=function(e){te(!0),i?.(e)},pe=function(e){M.current&&=!1,te(!1),a?.(e)},me=function(e){R(``),F(),N.current&&Gn(N.current,e,r)},he=H&&`${d}-out-of-range`;return X.createElement(qn,c({},O,{prefixCls:d,className:(0,Y.default)(h,he),handleReset:me,value:ae,focused:ee,triggerFocus:F,suffix:function(){var e=Number(V)>0;if(_||B.show){var t=B.showFormatter?B.showFormatter({value:ae,count:le,maxLength:V}):`${le}${e?` / ${V}`:``}`;return X.createElement(X.Fragment,null,B.show&&X.createElement(`span`,{className:(0,Y.default)(`${d}-show-count-suffix`,J({},`${d}-show-count-has-suffix`,!!_),C?.count),style:j({},w?.count)},t),_)}return null}(),disabled:f,classes:S,classNames:C,styles:w,ref:P}),function(){var t=p(e,[`prefixCls`,`onPressEnter`,`addonBefore`,`addonAfter`,`prefix`,`suffix`,`allowClear`,`defaultValue`,`showCount`,`count`,`classes`,`htmlSize`,`styles`,`classNames`,`onClear`]);return X.createElement(`input`,c({autoComplete:n},t,{onChange:W,onFocus:q,onBlur:pe,onKeyDown:de,onKeyUp:fe,className:(0,Y.default)(d,J({},`${d}-disabled`,f),C?.input),style:w?.input,ref:N,size:m,type:x,onCompositionStart:function(e){ne.current=!0,T?.(e)},onCompositionEnd:G}))}())}),Qn=e=>{let t;return typeof e==`object`&&e?.clearIcon?t=e:e&&(t={clearIcon:X.createElement(w,null)}),t},$n=`
|
|
min-height:0 !important;
|
|
max-height:none !important;
|
|
height:0 !important;
|
|
visibility:hidden !important;
|
|
overflow:hidden !important;
|
|
position:absolute !important;
|
|
z-index:-1000 !important;
|
|
top:0 !important;
|
|
right:0 !important;
|
|
pointer-events: none !important;
|
|
`,er=[`letter-spacing`,`line-height`,`padding-top`,`padding-bottom`,`font-family`,`font-weight`,`font-size`,`font-variant`,`text-rendering`,`text-transform`,`width`,`text-indent`,`padding-left`,`padding-right`,`border-width`,`box-sizing`,`word-break`,`white-space`],tr={},nr;function rr(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=e.getAttribute(`id`)||e.getAttribute(`data-reactid`)||e.getAttribute(`name`);if(t&&tr[n])return tr[n];var r=window.getComputedStyle(e),i=r.getPropertyValue(`box-sizing`)||r.getPropertyValue(`-moz-box-sizing`)||r.getPropertyValue(`-webkit-box-sizing`),a=parseFloat(r.getPropertyValue(`padding-bottom`))+parseFloat(r.getPropertyValue(`padding-top`)),o=parseFloat(r.getPropertyValue(`border-bottom-width`))+parseFloat(r.getPropertyValue(`border-top-width`)),s={sizingStyle:er.map(function(e){return`${e}:${r.getPropertyValue(e)}`}).join(`;`),paddingSize:a,borderSize:o,boxSizing:i};return t&&n&&(tr[n]=s),s}function ir(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;nr||(nr=document.createElement(`textarea`),nr.setAttribute(`tab-index`,`-1`),nr.setAttribute(`aria-hidden`,`true`),nr.setAttribute(`name`,`hiddenTextarea`),document.body.appendChild(nr)),e.getAttribute(`wrap`)?nr.setAttribute(`wrap`,e.getAttribute(`wrap`)):nr.removeAttribute(`wrap`);var i=rr(e,t),a=i.paddingSize,o=i.borderSize,s=i.boxSizing,c=i.sizingStyle;nr.setAttribute(`style`,`${c};${$n}`),nr.value=e.value||e.placeholder||``;var l=void 0,u=void 0,d,f=nr.scrollHeight;if(s===`border-box`?f+=o:s===`content-box`&&(f-=a),n!==null||r!==null){nr.value=` `;var p=nr.scrollHeight-a;n!==null&&(l=p*n,s===`border-box`&&(l=l+a+o),f=Math.max(l,f)),r!==null&&(u=p*r,s===`border-box`&&(u=u+a+o),d=f>u?``:`hidden`,f=Math.min(u,f))}var m={height:f,overflowY:d,resize:`none`};return l&&(m.minHeight=l),u&&(m.maxHeight=u),m}var ar=[`prefixCls`,`defaultValue`,`value`,`autoSize`,`onResize`,`className`,`style`,`disabled`,`onChange`,`onInternalAutoSize`],or=0,sr=1,cr=2,lr=X.forwardRef(function(e,t){var n=e,r=n.prefixCls,i=n.defaultValue,a=n.value,o=n.autoSize,s=n.onResize,u=n.className,d=n.style,f=n.disabled,p=n.onChange;n.onInternalAutoSize;var m=E(n,ar),h=L(i,{value:a,postState:function(e){return e??``}}),g=K(h,2),_=g[0],v=g[1],y=function(e){v(e.target.value),p?.(e)},x=X.useRef();X.useImperativeHandle(t,function(){return{textArea:x.current}});var S=X.useMemo(function(){return o&&b(o)===`object`?[o.minRows,o.maxRows]:[]},[o]),C=K(S,2),w=C[0],T=C[1],D=!!o,O=X.useState(cr),k=K(O,2),A=k[0],ee=k[1],te=X.useState(),ne=K(te,2),M=ne[0],N=ne[1],P=function(){ee(or)};l(function(){D&&P()},[a,w,T,D]),l(function(){if(A===or)ee(sr);else if(A===sr){var e=ir(x.current,!1,w,T);ee(cr),N(e)}},[A]);var F=X.useRef(),I=function(){H.cancel(F.current)},re=function(e){A===cr&&(s?.(e),o&&(I(),F.current=H(function(){P()})))};X.useEffect(function(){return I},[]);var ie=D?M:null,R=j(j({},d),ie);return(A===or||A===sr)&&(R.overflowY=`hidden`,R.overflowX=`hidden`),X.createElement(nt,{onResize:re,disabled:!(o||s)},X.createElement(`textarea`,c({},m,{ref:x,style:R,className:(0,Y.default)(r,u,J({},`${r}-disabled`,f)),disabled:f,value:_,onChange:y})))}),ur=[`defaultValue`,`value`,`onFocus`,`onBlur`,`onChange`,`allowClear`,`maxLength`,`onCompositionStart`,`onCompositionEnd`,`suffix`,`prefixCls`,`showCount`,`count`,`className`,`style`,`disabled`,`hidden`,`classNames`,`styles`,`onResize`,`onClear`,`onPressEnter`,`readOnly`,`autoSize`,`onKeyDown`],dr=X.forwardRef(function(e,t){var n=e.defaultValue,r=e.value,i=e.onFocus,a=e.onBlur,o=e.onChange,s=e.allowClear,l=e.maxLength,u=e.onCompositionStart,d=e.onCompositionEnd,f=e.suffix,p=e.prefixCls,m=p===void 0?`rc-textarea`:p,h=e.showCount,g=e.count,_=e.className,v=e.style,y=e.disabled,b=e.hidden,x=e.classNames,S=e.styles,C=e.onResize,w=e.onClear,T=e.onPressEnter,D=e.readOnly,O=e.autoSize,k=e.onKeyDown,A=E(e,ur),ee=L(n,{value:r,defaultValue:n}),te=K(ee,2),ne=te[0],M=te[1],N=ne==null?``:String(ne),P=X.useState(!1),F=K(P,2),I=F[0],re=F[1],ie=X.useRef(!1),R=X.useState(null),ae=K(R,2),oe=ae[0],se=ae[1],z=(0,X.useRef)(null),ce=(0,X.useRef)(null),B=function(){return ce.current?.textArea},V=function(){B().focus()};(0,X.useImperativeHandle)(t,function(){return{resizableTextArea:ce.current,focus:V,blur:function(){B().blur()},nativeElement:z.current?.nativeElement||B()}}),(0,X.useEffect)(function(){re(function(e){return!y&&e})},[y]);var le=X.useState(null),H=K(le,2),U=H[0],W=H[1];X.useEffect(function(){if(U){var e;(e=B()).setSelectionRange.apply(e,ue(U))}},[U]);var G=Yn(g,h),de=G.max??l,fe=Number(de)>0,q=G.strategy(N),pe=!!de&&q>de,me=function(e,t){var n=t;!ie.current&&G.exceedFormatter&&G.max&&G.strategy(t)>G.max&&(n=G.exceedFormatter(t,{max:G.max}),t!==n&&W([B().selectionStart||0,B().selectionEnd||0])),M(n),Gn(e.currentTarget,e,o,n)},he=function(e){ie.current=!0,u?.(e)},ge=function(e){ie.current=!1,me(e,e.currentTarget.value),d?.(e)},_e=function(e){me(e,e.target.value)},ve=function(e){e.key===`Enter`&&T&&T(e),k?.(e)},ye=function(e){re(!0),i?.(e)},Z=function(e){re(!1),a?.(e)},be=function(e){M(``),V(),Gn(B(),e,o)},xe=f,Se;G.show&&(Se=G.showFormatter?G.showFormatter({value:N,count:q,maxLength:de}):`${q}${fe?` / ${de}`:``}`,xe=X.createElement(X.Fragment,null,xe,X.createElement(`span`,{className:(0,Y.default)(`${m}-data-count`,x?.count),style:S?.count},Se)));var Q=function(e){var t;C?.(e),(t=B())!=null&&t.style.height&&se(!0)},$=!O&&!h&&!s;return X.createElement(qn,{ref:z,value:N,allowClear:s,handleReset:be,suffix:xe,prefixCls:m,classNames:j(j({},x),{},{affixWrapper:(0,Y.default)(x?.affixWrapper,J(J({},`${m}-show-count`,h),`${m}-textarea-allow-clear`,s))}),disabled:y,focused:I,className:(0,Y.default)(_,pe&&`${m}-out-of-range`),style:j(j({},v),oe&&!$?{height:`auto`}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Se==`string`?Se:void 0}},hidden:b,readOnly:D,onClear:w},X.createElement(lr,c({},A,{autoSize:O,maxLength:l,onKeyDown:ve,onChange:_e,onFocus:ye,onBlur:Z,onCompositionStart:he,onCompositionEnd:ge,className:(0,Y.default)(x?.textarea),style:j(j({},S?.textarea),{},{resize:v?.resize}),disabled:y,prefixCls:m,onResize:Q,ref:ce,readOnly:D})))}),fr=e=>{let{componentCls:t,paddingLG:n}=e,r=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:`100%`,height:`auto`,minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:`bottom`,transition:`all ${e.motionDurationSlow}`,resize:`vertical`,[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:`auto`},[r]:{position:`relative`,"&-show-count":{[`${t}-data-count`]:{position:`absolute`,bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:`nowrap`,pointerEvents:`none`}},[`
|
|
&-allow-clear > ${t},
|
|
&-affix-wrapper${r}-has-feedback ${t}
|
|
`]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:`inherit`,border:`none`,outline:`none`,background:`transparent`,minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:`none !important`}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:`absolute`,insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:`absolute`,top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:`inline-flex`,alignItems:`center`,margin:`auto`,pointerEvents:`none`}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:`ltr`,insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},pr=U([`Input`,`TextArea`],e=>fr(V(e,dn(e))),fn,{resetFont:!1}),mr=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<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},hr=(0,X.forwardRef)((e,t)=>{let{prefixCls:n,bordered:r=!0,size:i,disabled:a,status:s,allowClear:c,classNames:l,rootClassName:u,className:d,style:f,styles:p,variant:m,showCount:h,onMouseDown:_,onResize:v}=e,y=mr(e,[`prefixCls`,`bordered`,`size`,`disabled`,`status`,`allowClear`,`classNames`,`rootClassName`,`className`,`style`,`styles`,`variant`,`showCount`,`onMouseDown`,`onResize`]),{getPrefixCls:b,direction:S,allowClear:w,autoComplete:T,className:E,style:D,classNames:O,styles:k}=x(`textArea`),A=X.useContext(ee),j=a??A,{status:te,hasFeedback:ne,feedbackIcon:M}=X.useContext(re),N=It(te,s),P=X.useRef(null);X.useImperativeHandle(t,()=>({resizableTextArea:P.current?.resizableTextArea,focus:e=>{Kn(P.current?.resizableTextArea?.textArea,e)},blur:()=>P.current?.blur()}));let F=b(`input`,n),I=C(F),[L,ie,R]=Bn(F,u),[ae]=pr(F,I),{compactSize:oe,compactItemClassnames:se}=o(F,S),z=g(e=>i??oe??e),[ce,B]=Lt(`textArea`,m,r),V=Qn(c??w),[le,H]=X.useState(!1),[U,W]=X.useState(!1),G=e=>{H(!0),_?.(e);let t=()=>{H(!1),document.removeEventListener(`mouseup`,t)};document.addEventListener(`mouseup`,t)},ue=e=>{if(v?.(e),le&&typeof getComputedStyle==`function`){let e=(P.current?.nativeElement)?.querySelector(`textarea`);e&&getComputedStyle(e).resize===`both`&&W(!0)}};return L(ae(X.createElement(dr,Object.assign({autoComplete:T},y,{style:Object.assign(Object.assign({},D),f),styles:Object.assign(Object.assign({},k),p),disabled:j,allowClear:V,className:(0,Y.default)(R,I,d,u,se,E,U&&`${F}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},l),O),{textarea:(0,Y.default)({[`${F}-sm`]:z===`small`,[`${F}-lg`]:z===`large`},ie,l?.textarea,O.textarea,le&&`${F}-mouse-active`),variant:(0,Y.default)({[`${F}-${ce}`]:B},Ft(F,N)),affixWrapper:(0,Y.default)(`${F}-textarea-affix-wrapper`,{[`${F}-affix-wrapper-rtl`]:S===`rtl`,[`${F}-affix-wrapper-sm`]:z===`small`,[`${F}-affix-wrapper-lg`]:z===`large`,[`${F}-textarea-show-count`]:h||e.count?.show},ie)}),prefixCls:F,suffix:ne&&X.createElement(`span`,{className:`${F}-textarea-suffix`},M),showCount:h,ref:P,onResize:ue,onMouseDown:G}))))}),gr=(e,t=!1)=>t&&e==null?[]:Array.isArray(e)?e:[e],_r={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`},vr=X.forwardRef(function(e,t){return X.createElement(T,c({},e,{ref:t,icon:_r}))}),yr={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`},br=X.forwardRef(function(e,t){return X.createElement(T,c({},e,{ref:t,icon:yr}))}),xr=(e,t,n,r)=>{let{titleMarginBottom:i,fontWeightStrong:a}=r;return{marginBottom:i,color:n,fontWeight:a,fontSize:e,lineHeight:t}},Sr=e=>{let t=[1,2,3,4,5],n={};return t.forEach(t=>{n[`
|
|
h${t}&,
|
|
div&-h${t},
|
|
div&-h${t} > textarea,
|
|
h${t}
|
|
`]=xr(e[`fontSizeHeading${t}`],e[`lineHeightHeading${t}`],e.colorTextHeading,e)}),n},Cr=e=>{let{componentCls:t}=e;return{"a&, a":Object.assign(Object.assign({},ne(e)),{userSelect:`text`,[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,"&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:`none`}}})}},wr=e=>({code:{margin:`0 0.2em`,paddingInline:`0.4em`,paddingBlock:`0.2em 0.1em`,fontSize:`85%`,fontFamily:e.fontFamilyCode,background:`rgba(150, 150, 150, 0.1)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderRadius:3},kbd:{margin:`0 0.2em`,paddingInline:`0.4em`,paddingBlock:`0.15em 0.1em`,fontSize:`90%`,fontFamily:e.fontFamilyCode,background:`rgba(150, 150, 150, 0.06)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:oe[2]},"u, ins":{textDecoration:`underline`,textDecorationSkipInk:`auto`},"s, del":{textDecoration:`line-through`},strong:{fontWeight:e.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:`0 1em`,padding:0,li:{marginInline:`20px 0`,marginBlock:0,paddingInline:`4px 0`,paddingBlock:0}},ul:{listStyleType:`circle`,ul:{listStyleType:`disc`}},ol:{listStyleType:`decimal`},"pre, blockquote":{margin:`1em 0`},pre:{padding:`0.4em 0.6em`,whiteSpace:`pre-wrap`,wordWrap:`break-word`,background:`rgba(150, 150, 150, 0.1)`,border:`1px solid rgba(100, 100, 100, 0.2)`,borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:`inline`,margin:0,padding:0,fontSize:`inherit`,fontFamily:`inherit`,background:`transparent`,border:0}},blockquote:{paddingInline:`0.6em 0`,paddingBlock:0,borderInlineStart:`4px solid rgba(100, 100, 100, 0.2)`,opacity:.85}}),Tr=e=>{let{componentCls:t,paddingSM:n}=e,r=n;return{"&-edit-content":{position:`relative`,"div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),insetBlockStart:e.calc(r).div(-2).add(1).equal(),marginBottom:e.calc(r).div(2).sub(2).equal()},[`${t}-edit-content-confirm`]:{position:`absolute`,insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorIcon,fontWeight:`normal`,fontSize:e.fontSize,fontStyle:`normal`,pointerEvents:`none`},textarea:{margin:`0!important`,MozTransition:`none`,height:`1em`}}}},Er=e=>({[`${e.componentCls}-copy-success`]:{"\n &,\n &:hover,\n &:focus":{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),Dr=()=>({"\n a&-ellipsis,\n span&-ellipsis\n ":{display:`inline-block`,maxWidth:`100%`},"&-ellipsis-single-line":{whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,"a&, span&":{verticalAlign:`bottom`},"> code":{paddingBlock:0,maxWidth:`calc(100% - 1.2em)`,display:`inline-block`,overflow:`hidden`,textOverflow:`ellipsis`,verticalAlign:`bottom`,boxSizing:`content-box`}},"&-ellipsis-multiple-line":{display:`-webkit-box`,overflow:`hidden`,WebkitLineClamp:3,WebkitBoxOrient:`vertical`}}),Or=U(`Typography`,e=>{let{componentCls:t,titleMarginTop:n}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorText,wordBreak:`break-word`,lineHeight:e.lineHeight,[`&${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success`]:{color:e.colorSuccessText},[`&${t}-warning`]:{color:e.colorWarningText},[`&${t}-danger`]:{color:e.colorErrorText,"a&:active, a&:focus":{color:e.colorErrorTextActive},"a&:hover":{color:e.colorErrorTextHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`,userSelect:`none`},"\n div&,\n p\n ":{marginBottom:`1em`}},Sr(e)),{[`
|
|
& + h1${t},
|
|
& + h2${t},
|
|
& + h3${t},
|
|
& + h4${t},
|
|
& + h5${t}
|
|
`]:{marginTop:n},"\n div,\n ul,\n li,\n p,\n h1,\n h2,\n h3,\n h4,\n h5":{"\n + h1,\n + h2,\n + h3,\n + h4,\n + h5\n ":{marginTop:n}}}),wr(e)),Cr(e)),{[`
|
|
${t}-expand,
|
|
${t}-collapse,
|
|
${t}-edit,
|
|
${t}-copy
|
|
`]:Object.assign(Object.assign({},ne(e)),{marginInlineStart:e.marginXXS})}),Tr(e)),Er(e)),Dr()),{"&-rtl":{direction:`rtl`}})}},()=>({titleMarginTop:`1.2em`,titleMarginBottom:`0.5em`})),kr=e=>{let{prefixCls:t,"aria-label":n,className:r,style:a,direction:o,maxLength:s,autoSize:c=!0,value:l,onSave:d,onCancel:f,onEnd:p,component:m,enterIcon:h=X.createElement(br,null)}=e,g=X.useRef(null),_=X.useRef(!1),v=X.useRef(null),[y,b]=X.useState(l);X.useEffect(()=>{b(l)},[l]),X.useEffect(()=>{if(g.current?.resizableTextArea){let{textArea:e}=g.current.resizableTextArea;e.focus();let{length:t}=e.value;e.setSelectionRange(t,t)}},[]);let x=({target:e})=>{b(e.value.replace(/[\n\r]/g,``))},S=()=>{_.current=!0},C=()=>{_.current=!1},w=({keyCode:e})=>{_.current||(v.current=e)},T=()=>{d(y.trim())},E=({keyCode:e,ctrlKey:t,altKey:n,metaKey:r,shiftKey:a})=>{v.current!==e||_.current||t||n||r||a||(e===i.ENTER?(T(),p?.()):e===i.ESC&&f())},D=()=>{T()},[O,k,A]=Or(t),j=(0,Y.default)(t,`${t}-edit-content`,{[`${t}-rtl`]:o===`rtl`,[`${t}-${m}`]:!!m},r,k,A);return O(X.createElement(`div`,{className:j,style:a},X.createElement(hr,{ref:g,maxLength:s,value:y,onChange:x,onKeyDown:w,onKeyUp:E,onCompositionStart:S,onCompositionEnd:C,onBlur:D,"aria-label":n,rows:1,autoSize:c}),h===null?null:u(h,{className:`${t}-edit-content-confirm`})))},Ar=t(((e,t)=>{t.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case`INPUT`:case`TEXTAREA`:t.blur();break;default:t=null}return e.removeAllRanges(),function(){e.type===`Caret`&&e.removeAllRanges(),e.rangeCount||n.forEach(function(t){e.addRange(t)}),t&&t.focus()}}})),jr=e(t(((e,t)=>{var n=Ar(),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)}t.exports=function(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}}))()),Mr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},Nr=({copyConfig:e,children:t})=>{let[n,r]=X.useState(!1),[i,a]=X.useState(!1),o=X.useRef(null),s=()=>{o.current&&clearTimeout(o.current)},c={};return e.format&&(c.format=e.format),X.useEffect(()=>s,[]),{copied:n,copyLoading:i,onClick:k(n=>Mr(void 0,void 0,void 0,function*(){var i;n?.preventDefault(),n?.stopPropagation(),a(!0);try{let l=typeof e.text==`function`?yield e.text():e.text;(0,jr.default)(l||gr(t,!0).join(``)||``,c),a(!1),r(!0),s(),o.current=setTimeout(()=>{r(!1)},3e3),(i=e.onCopy)==null||i.call(e,n)}catch(e){throw a(!1),e}}))}};function Pr(e,t){return X.useMemo(()=>{let n=!!e;return[n,Object.assign(Object.assign({},t),n&&typeof e==`object`?e:null)]},[e])}var Fr=e=>{let t=(0,X.useRef)(void 0);return(0,X.useEffect)(()=>{t.current=e}),t.current},Ir=(e,t,n)=>(0,X.useMemo)(()=>e===!0?{title:t??n}:(0,X.isValidElement)(e)?{title:e}:typeof e==`object`?Object.assign({title:t??n},e):{title:e},[e,t,n]),Lr=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<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Rr=X.forwardRef((e,t)=>{let{prefixCls:n,component:r=`article`,className:i,rootClassName:a,setContentRef:o,children:s,direction:c,style:l}=e,u=Lr(e,[`prefixCls`,`component`,`className`,`rootClassName`,`setContentRef`,`children`,`direction`,`style`]),{getPrefixCls:d,direction:f,className:p,style:m}=x(`typography`),h=c??f,g=o?M(t,o):t,_=d(`typography`,n),[v,y,b]=Or(_),S=(0,Y.default)(_,p,{[`${_}-rtl`]:h===`rtl`},i,a,y,b),C=Object.assign(Object.assign({},m),l);return v(X.createElement(r,Object.assign({className:S,style:C,ref:g},u),s))}),zr={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z`}}]},name:`copy`,theme:`outlined`},Br=X.forwardRef(function(e,t){return X.createElement(T,c({},e,{ref:t,icon:zr}))});function Vr(e){return e===!1?[!1,!1]:Array.isArray(e)?e:[e]}function Hr(e,t,n){return e===!0||e===void 0?t:e||n&&t}function Ur(e){let t=document.createElement(`em`);e.appendChild(t);let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return e.removeChild(t),n.left>r.left||r.right>n.right||n.top>r.top||r.bottom>n.bottom}var Wr=e=>[`string`,`number`].includes(typeof e),Gr=({prefixCls:e,copied:t,locale:n,iconOnly:r,tooltips:i,icon:a,tabIndex:o,onCopy:s,loading:c})=>{let l=Vr(i),u=Vr(a),{copied:d,copy:f}=n??{},p=t?d:f,m=Hr(l[+!!t],p),h=typeof m==`string`?m:p;return X.createElement(un,{title:m},X.createElement(`button`,{type:`button`,className:(0,Y.default)(`${e}-copy`,{[`${e}-copy-success`]:t,[`${e}-copy-icon-only`]:r}),onClick:s,"aria-label":h,tabIndex:o},t?Hr(u[1],X.createElement(zt,null),!0):Hr(u[0],c?X.createElement(ge,null):X.createElement(Br,null),!0)))},Kr=X.forwardRef(({style:e,children:t},n)=>{let r=X.useRef(null);return X.useImperativeHandle(n,()=>({isExceed:()=>{let e=r.current;return e.scrollHeight>e.clientHeight},getHeight:()=>r.current.clientHeight})),X.createElement(`span`,{"aria-hidden":!0,ref:r,style:Object.assign({position:`fixed`,display:`block`,left:0,top:0,pointerEvents:`none`,backgroundColor:`rgba(255, 0, 0, 0.65)`},e)},t)}),qr=e=>e.reduce((e,t)=>e+(Wr(t)?String(t).length:1),0);function Jr(e,t){let n=0,r=[];for(let i=0;i<e.length;i+=1){if(n===t)return r;let a=e[i],o=Wr(a)?String(a).length:1,s=n+o;if(s>t){let e=t-n;return r.push(String(a).slice(0,e)),r}r.push(a),n=s}return e}var Yr=0,Xr=1,Zr=2,Qr=3,$r=4,ei={display:`-webkit-box`,overflow:`hidden`,WebkitBoxOrient:`vertical`};function ti(e){let{enableMeasure:t,width:n,text:r,children:i,rows:a,expanded:o,miscDeps:s,onEllipsis:c}=e,u=X.useMemo(()=>pe(r),[r]),d=X.useMemo(()=>qr(u),[r]),f=X.useMemo(()=>i(u,!1),[r]),[p,m]=X.useState(null),h=X.useRef(null),g=X.useRef(null),_=X.useRef(null),v=X.useRef(null),y=X.useRef(null),[b,x]=X.useState(!1),[S,C]=X.useState(Yr),[w,T]=X.useState(0),[E,D]=X.useState(null);l(()=>{C(t&&n&&d?Xr:Yr)},[n,r,a,t,u]),l(()=>{if(S===Xr){C(Zr);let e=g.current&&getComputedStyle(g.current).whiteSpace;D(e)}else if(S===Zr){let e=!!_.current?.isExceed();C(e?Qr:$r),m(e?[0,d]:null),x(e);let t=_.current?.getHeight()||0,n=a===1?0:v.current?.getHeight()||0,r=y.current?.getHeight()||0,i=Math.max(t,n+r);T(i+1),c(e)}},[S]);let O=p?Math.ceil((p[0]+p[1])/2):0;l(()=>{let[e,t]=p||[0,0];if(e!==t){let n=(h.current?.getHeight()||0)>w,r=O;t-e===1&&(r=n?e:t),m(n?[e,r]:[r,t])}},[p,O]);let k=X.useMemo(()=>{if(!t)return i(u,!1);if(S!==Qr||!p||p[0]!==p[1]){let e=i(u,!1);return[$r,Yr].includes(S)?e:X.createElement(`span`,{style:Object.assign(Object.assign({},ei),{WebkitLineClamp:a})},e)}return i(o?u:Jr(u,p[0]),b)},[o,S,p,u].concat(ue(s))),A={width:n,margin:0,padding:0,whiteSpace:E===`nowrap`?`normal`:`inherit`};return X.createElement(X.Fragment,null,k,S===Zr&&X.createElement(X.Fragment,null,X.createElement(Kr,{style:Object.assign(Object.assign(Object.assign({},A),ei),{WebkitLineClamp:a}),ref:_},f),X.createElement(Kr,{style:Object.assign(Object.assign(Object.assign({},A),ei),{WebkitLineClamp:a-1}),ref:v},f),X.createElement(Kr,{style:Object.assign(Object.assign(Object.assign({},A),ei),{WebkitLineClamp:1}),ref:y},i([],!0))),S===Qr&&p&&p[0]!==p[1]&&X.createElement(Kr,{style:Object.assign(Object.assign({},A),{top:400}),ref:h},i(Jr(u,O),!0)),S===Xr&&X.createElement(`span`,{style:{whiteSpace:`inherit`},ref:g}))}var ni=({enableEllipsis:e,isEllipsis:t,children:n,tooltipProps:r})=>!r?.title||!e?n:X.createElement(un,Object.assign({open:t?void 0:!1},r),n),ri=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<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function ii({mark:e,code:t,underline:n,delete:r,strong:i,keyboard:a,italic:o},s){let c=s;function l(e,t){t&&(c=X.createElement(e,{},c))}return l(`strong`,i),l(`u`,n),l(`del`,r),l(`code`,t),l(`mark`,e),l(`kbd`,a),l(`i`,o),c}var ai=`...`,oi=[`delete`,`mark`,`code`,`underline`,`strong`,`keyboard`,`italic`],si=X.forwardRef((e,t)=>{let{prefixCls:n,className:r,style:i,type:a,disabled:o,children:s,ellipsis:c,editable:u,copyable:d,component:f,title:m}=e,g=ri(e,[`prefixCls`,`className`,`style`,`type`,`disabled`,`children`,`ellipsis`,`editable`,`copyable`,`component`,`title`]),{getPrefixCls:_,direction:v}=X.useContext(y),[b]=h(`Text`),x=X.useRef(null),S=X.useRef(null),C=_(`typography`,n),w=p(g,oi),[T,E]=Pr(u),[D,O]=L(!1,{value:E.editing}),{triggerType:k=[`icon`]}=E,A=e=>{var t;e&&((t=E.onStart)==null||t.call(E)),O(e)},j=Fr(D);l(()=>{var e;!D&&j&&((e=S.current)==null||e.focus())},[D]);let ee=e=>{e?.preventDefault(),A(!0)},te=e=>{var t;(t=E.onChange)==null||t.call(E,e),A(!1)},ne=()=>{var e;(e=E.onCancel)==null||e.call(E),A(!1)},[N,P]=Pr(d),{copied:F,copyLoading:I,onClick:re}=Nr({copyConfig:P,children:s}),[ie,R]=X.useState(!1),[ae,oe]=X.useState(!1),[se,z]=X.useState(!1),[ce,B]=X.useState(!1),[V,le]=X.useState(!0),[H,U]=Pr(c,{expandable:!1,symbol:e=>e?b?.collapse:b?.expand}),[W,G]=L(U.defaultExpanded||!1,{value:U.expanded}),K=H&&(!W||U.expandable===`collapsible`),{rows:de=1}=U,fe=X.useMemo(()=>K&&(U.suffix!==void 0||U.onEllipsis||U.expandable||T||N),[K,U,T,N]);l(()=>{H&&!fe&&(R(ot(`webkitLineClamp`)),oe(ot(`textOverflow`)))},[fe,H]);let[q,me]=X.useState(K),J=X.useMemo(()=>fe?!1:de===1?ae:ie,[fe,ae,ie]);l(()=>{me(J&&K)},[J,K]);let he=K&&(q?ce:se),ge=K&&de===1&&q,_e=K&&de>1&&q,ve=(e,t)=>{var n;G(t.expanded),(n=U.onExpand)==null||n.call(U,e,t)},[ye,Z]=X.useState(0),be=({offsetWidth:e})=>{Z(e)},xe=e=>{var t;z(e),se!==e&&((t=U.onEllipsis)==null||t.call(U,e))};X.useEffect(()=>{let e=x.current;if(H&&q&&e){let t=Ur(e);ce!==t&&B(t)}},[H,q,s,_e,V,ye]),X.useEffect(()=>{let e=x.current;if(typeof IntersectionObserver>`u`||!e||!q||!K)return;let t=new IntersectionObserver(()=>{le(!!e.offsetParent)});return t.observe(e),()=>{t.disconnect()}},[q,K]);let Se=Ir(U.tooltip,E.text,s),Q=X.useMemo(()=>{if(H&&!q)return[E.text,s,m,Se.title].find(Wr)},[H,q,m,Se.title,he]);if(D)return X.createElement(kr,{value:E.text??(typeof s==`string`?s:``),onSave:te,onCancel:ne,onEnd:E.onEnd,prefixCls:C,className:r,style:i,direction:v,component:f,maxLength:E.maxLength,autoSize:E.autoSize,enterIcon:E.enterIcon});let $=()=>{let{expandable:e,symbol:t}=U;return e?X.createElement(`button`,{type:`button`,key:`expand`,className:`${C}-${W?`collapse`:`expand`}`,onClick:e=>ve(e,{expanded:!W}),"aria-label":W?b.collapse:b?.expand},typeof t==`function`?t(W):t):null},Ce=()=>{if(!T)return;let{icon:e,tooltip:t,tabIndex:n}=E,r=pe(t)[0]||b?.edit,i=typeof r==`string`?r:``;return k.includes(`icon`)?X.createElement(un,{key:`edit`,title:t===!1?``:r},X.createElement(`button`,{type:`button`,ref:S,className:`${C}-edit`,onClick:ee,"aria-label":i,tabIndex:n},e||X.createElement(vr,{role:`button`}))):null},we=()=>N?X.createElement(Gr,Object.assign({key:`copy`},P,{prefixCls:C,copied:F,locale:b,onCopy:re,loading:I,iconOnly:s==null})):null,Te=e=>[e&&$(),Ce(),we()],Ee=e=>[e&&!W&&X.createElement(`span`,{"aria-hidden":!0,key:`ellipsis`},ai),U.suffix,Te(e)];return X.createElement(nt,{onResize:be,disabled:!K},c=>X.createElement(ni,{tooltipProps:Se,enableEllipsis:K,isEllipsis:he},X.createElement(Rr,Object.assign({className:(0,Y.default)({[`${C}-${a}`]:a,[`${C}-disabled`]:o,[`${C}-ellipsis`]:H,[`${C}-ellipsis-single-line`]:ge,[`${C}-ellipsis-multiple-line`]:_e},r),prefixCls:n,style:Object.assign(Object.assign({},i),{WebkitLineClamp:_e?de:void 0}),component:f,ref:M(c,x,t),direction:v,onClick:k.includes(`text`)?ee:void 0,"aria-label":Q?.toString(),title:m},w),X.createElement(ti,{enableMeasure:K&&!q,text:s,rows:de,width:ye,onEllipsis:xe,expanded:W,miscDeps:[F,W,I,T,N,b].concat(ue(oi.map(t=>e[t])))},(t,n)=>ii(e,X.createElement(X.Fragment,null,t.length>0&&n&&!W&&Q?X.createElement(`span`,{key:`show-content`,"aria-hidden":!0},t):t,Ee(n)))))))}),ci=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<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},li=X.forwardRef((e,t)=>{let{ellipsis:n,rel:r,children:i,navigate:a}=e,o=ci(e,[`ellipsis`,`rel`,`children`,`navigate`]),s=Object.assign(Object.assign({},o),{rel:r===void 0&&o.target===`_blank`?`noopener noreferrer`:r});return X.createElement(si,Object.assign({},s,{ref:t,ellipsis:!!n,component:`a`}),i)}),ui=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<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},di=X.forwardRef((e,t)=>{let{children:n}=e,r=ui(e,[`children`]);return X.createElement(si,Object.assign({ref:t},r,{component:`div`}),n)}),fi=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<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},pi=X.forwardRef((e,t)=>{let{ellipsis:n,children:r}=e,i=fi(e,[`ellipsis`,`children`]),a=X.useMemo(()=>n&&typeof n==`object`?p(n,[`expandable`,`rows`]):n,[n]);return X.createElement(si,Object.assign({ref:t},i,{ellipsis:a,component:`span`}),r)}),mi=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<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},hi=[1,2,3,4,5],gi=X.forwardRef((e,t)=>{let{level:n=1,children:r}=e,i=mi(e,[`level`,`children`]),a=hi.includes(n)?`h${n}`:`h1`;return X.createElement(si,Object.assign({ref:t},i,{component:a}),r)}),_i=Rr;_i.Text=pi,_i.Link=li,_i.Title=gi,_i.Paragraph=di;export{It as _,Zn as a,st as b,fn as c,Yt as d,Zt as f,Lt as g,zt as h,Qn as i,dn as l,Bt as m,Br as n,Vn as o,qt as p,hr as r,Bn as s,_i as t,un as u,Ft as v,nt as x,Pt as y}; |